# HG changeset patch # User William Roberts # Date 1270034821 -3600 # Node ID e1b950c65cb4c1b98dd15428244ae41887aec7a8 # Parent 2fe1408b681184b62bd60ff5ae9726f5d26d9259 Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/EGL/egl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/EGL/egl.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,52 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// GLES/EGL.H +// +// + +#ifndef __GLES_EGL_H_ +#define __GLES_EGL_H_ + +/** +@publishedPartner + +__OPENGLESHEADERS_LEGACY_EGL_1_1 + +The purpose of this define is to allow the staged migration to +EGL 1.3 from EGL 1.1 taken from the perspective of OpenGL ES 1.X + +If __OPENGLESHEADERS_LEGACY_EGL_1_1 is defined, then GLES/egl.h and +GLES/egltypes.h will only provide the EGL 1.1 API; in particular no +symbols from a later version of EGL will be seen at a source code level. +This is considered to be legacy behaviour. If +__OPENGLESHEADERS_LEGACY_EGL_1_1 is not defined, the GLES/egl.h +and GLES/egltypes.h header files will re-direct to the system-wide +EGL/egl.h. and EGL/egltypes.h respectively. + +The use of GLES/egl.h or GLES/egltypes.h by applications is considered +legacy behaviour because applications should instead use EGL/egl.h +or EGL/egltypes.h respectively. + +When this legacy behaviour is desired, the define should be placed in an +OEM-specific system-wide .hrh file. Symbian product configurations +never set this legacy behaviour. +*/ +#ifdef __OPENGLESHEADERS_LEGACY_EGL_1_1 +#include +#else +#include +#include +#endif + +#endif /* __GLES_EGL_H_ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/EGL/egltypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/EGL/egltypes.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,52 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// GLES/EGLTYPES.H +// +// + +#ifndef __GLES_EGLTYPES_H_ +#define __GLES_EGLTYPES_H_ + + +/** +@publishedPartner + +__OPENGLESHEADERS_LEGACY_EGL_1_1 + +The purpose of this define is to allow the staged migration to +EGL 1.3 from EGL 1.1 taken from the perspective of OpenGL ES 1.X + +If __OPENGLESHEADERS_LEGACY_EGL_1_1 is defined, then GLES/egl.h and +GLES/egltypes.h will only provide the EGL 1.1 API; in particular no +symbols from a later version of EGL will be seen at a source code level. +This is considered to be legacy behaviour. If +__OPENGLESHEADERS_LEGACY_EGL_1_1 is not defined, the GLES/egl.h +and GLES/egltypes.h header files will re-direct to the system-wide +EGL/egl.h. and EGL/egltypes.h respectively. + +The use of GLES/egl.h or GLES/egltypes.h by applications is considered +legacy behaviour because applications should instead use EGL/egl.h +or EGL/egltypes.h respectively. + +When this legacy behaviour is desired, the define should be placed in an +OEM-specific system-wide .hrh file. Symbian product configurations +never set this legacy behaviour. +*/ +#ifdef __OPENGLESHEADERS_LEGACY_EGL_1_1 +#include +#else +#include +#endif + +#endif /* __GLES_EGLTYPES_H_ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/GLES/egltypes.h --- a/epoc32/include/GLES/egltypes.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// GLES/EGLTYPES.H -// -// - -#ifndef __GLES_EGLTYPES_H_ -#define __GLES_EGLTYPES_H_ - - -/** -@publishedPartner - -__OPENGLESHEADERS_LEGACY_EGL_1_1 - -The purpose of this define is to allow the staged migration to -EGL 1.3 from EGL 1.1 taken from the perspective of OpenGL ES 1.X - -If __OPENGLESHEADERS_LEGACY_EGL_1_1 is defined, then GLES/egl.h and -GLES/egltypes.h will only provide the EGL 1.1 API; in particular no -symbols from a later version of EGL will be seen at a source code level. -This is considered to be legacy behaviour. If -__OPENGLESHEADERS_LEGACY_EGL_1_1 is not defined, the GLES/egl.h -and GLES/egltypes.h header files will re-direct to the system-wide -EGL/egl.h. and EGL/egltypes.h respectively. - -The use of GLES/egl.h or GLES/egltypes.h by applications is considered -legacy behaviour because applications should instead use EGL/egl.h -or EGL/egltypes.h respectively. - -When this legacy behaviour is desired, the define should be placed in an -OEM-specific system-wide .hrh file. Symbian product configurations -never set this legacy behaviour. -*/ -#ifdef __OPENGLESHEADERS_LEGACY_EGL_1_1 -#include -#else -#include -#endif - -#endif /* __GLES_EGLTYPES_H_ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/VG/1.0/openvg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/VG/1.0/openvg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,815 @@ +/*------------------------------------------------------------------------ + * + * OpenVG 1.1 Reference Implementation + * ------------------------------------- + * + * Copyright (c) 2008 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and /or associated documentation files + * (the "Materials "), to deal in the Materials without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Materials, + * and to permit persons to whom the Materials are furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR + * THE USE OR OTHER DEALINGS IN THE MATERIALS. + * + *//** + * \file + * \brief OpenVG 1.1 API. + *//*-------------------------------------------------------------------*/ + +#ifndef __VG_1_1_OPENVG_H +#define __VG_1_1_OPENVG_H + +#ifndef __VG_OPENVG_H_ +#error Do not include this file directly. Use . +#endif + +/* differences from the actual sample implemtation provided by Khronos: +- this comment +- the Doxygen comment with tag 'publishedAll', and tag 'released' +- changing + #define VG_API_CALL extern + to + #define VG_API_CALL IMPORT_C +- the addition of __SOFTFP to all function prototypes +- the addition of VG_PATH_DATATYPE_INVALID in VGPathDatatype +- the addition of VG_IMAGE_FORMAT_INVALID in VGImageFormat +- the addition of VGeglImageKHR typedef for the VG_KHR_EGL_image extension + */ + +/** +@publishedAll +@released +*/ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define OPENVG_VERSION_1_0 1 +#define OPENVG_VERSION_1_1 2 + +typedef khronos_float_t VGfloat; +typedef khronos_int8_t VGbyte; +typedef khronos_uint8_t VGubyte; +typedef khronos_int16_t VGshort; +typedef khronos_int32_t VGint; +typedef khronos_uint32_t VGuint; +typedef khronos_uint32_t VGbitfield; + +typedef enum { + VG_FALSE = 0, + VG_TRUE = 1 +} VGboolean; + +#define VG_MAXSHORT ((VGshort)((~((unsigned)0)) >> 1)) +#define VG_MAXINT ((VGint)((~((unsigned)0)) >> 1)) + +typedef VGuint VGHandle; + +#define VG_INVALID_HANDLE ((VGHandle)0) + +typedef enum { + VG_NO_ERROR = 0, + VG_BAD_HANDLE_ERROR = 0x1000, + VG_ILLEGAL_ARGUMENT_ERROR = 0x1001, + VG_OUT_OF_MEMORY_ERROR = 0x1002, + VG_PATH_CAPABILITY_ERROR = 0x1003, + VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004, + VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005, + VG_IMAGE_IN_USE_ERROR = 0x1006, + VG_NO_CONTEXT_ERROR = 0x1007 +} VGErrorCode; + +typedef enum { + /* Mode settings */ + VG_MATRIX_MODE = 0x1100, + VG_FILL_RULE = 0x1101, + VG_IMAGE_QUALITY = 0x1102, + VG_RENDERING_QUALITY = 0x1103, + VG_BLEND_MODE = 0x1104, + VG_IMAGE_MODE = 0x1105, + + /* Scissoring rectangles */ + VG_SCISSOR_RECTS = 0x1106, + + /* Color Transformation */ + VG_COLOR_TRANSFORM = 0x1170, + VG_COLOR_TRANSFORM_VALUES = 0x1171, + + /* Stroke parameters */ + VG_STROKE_LINE_WIDTH = 0x1110, + VG_STROKE_CAP_STYLE = 0x1111, + VG_STROKE_JOIN_STYLE = 0x1112, + VG_STROKE_MITER_LIMIT = 0x1113, + VG_STROKE_DASH_PATTERN = 0x1114, + VG_STROKE_DASH_PHASE = 0x1115, + VG_STROKE_DASH_PHASE_RESET = 0x1116, + + /* Edge fill color for VG_TILE_FILL tiling mode */ + VG_TILE_FILL_COLOR = 0x1120, + + /* Color for vgClear */ + VG_CLEAR_COLOR = 0x1121, + + /* Glyph origin */ + VG_GLYPH_ORIGIN = 0x1122, + + /* Enable/disable alpha masking and scissoring */ + VG_MASKING = 0x1130, + VG_SCISSORING = 0x1131, + + /* Pixel layout information */ + VG_PIXEL_LAYOUT = 0x1140, + VG_SCREEN_LAYOUT = 0x1141, + + /* Source format selection for image filters */ + VG_FILTER_FORMAT_LINEAR = 0x1150, + VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151, + + /* Destination write enable mask for image filters */ + VG_FILTER_CHANNEL_MASK = 0x1152, + + /* Implementation limits (read-only) */ + VG_MAX_SCISSOR_RECTS = 0x1160, + VG_MAX_DASH_COUNT = 0x1161, + VG_MAX_KERNEL_SIZE = 0x1162, + VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163, + VG_MAX_COLOR_RAMP_STOPS = 0x1164, + VG_MAX_IMAGE_WIDTH = 0x1165, + VG_MAX_IMAGE_HEIGHT = 0x1166, + VG_MAX_IMAGE_PIXELS = 0x1167, + VG_MAX_IMAGE_BYTES = 0x1168, + VG_MAX_FLOAT = 0x1169, + VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A +} VGParamType; + +typedef enum { + VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200, + VG_RENDERING_QUALITY_FASTER = 0x1201, + VG_RENDERING_QUALITY_BETTER = 0x1202 /* Default */ +} VGRenderingQuality; + +typedef enum { + VG_PIXEL_LAYOUT_UNKNOWN = 0x1300, + VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301, + VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302, + VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303, + VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304 +} VGPixelLayout; + +typedef enum { + VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400, + VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401, + VG_MATRIX_FILL_PAINT_TO_USER = 0x1402, + VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403, + VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404 +} VGMatrixMode; + +typedef enum { + VG_CLEAR_MASK = 0x1500, + VG_FILL_MASK = 0x1501, + VG_SET_MASK = 0x1502, + VG_UNION_MASK = 0x1503, + VG_INTERSECT_MASK = 0x1504, + VG_SUBTRACT_MASK = 0x1505 +} VGMaskOperation; + +#define VG_PATH_FORMAT_STANDARD 0 + +typedef enum { + VG_PATH_DATATYPE_INVALID = -1, + VG_PATH_DATATYPE_S_8 = 0, + VG_PATH_DATATYPE_S_16 = 1, + VG_PATH_DATATYPE_S_32 = 2, + VG_PATH_DATATYPE_F = 3 +} VGPathDatatype; + +typedef enum { + VG_ABSOLUTE = 0, + VG_RELATIVE = 1 +} VGPathAbsRel; + +typedef enum { + VG_CLOSE_PATH = ( 0 << 1), + VG_MOVE_TO = ( 1 << 1), + VG_LINE_TO = ( 2 << 1), + VG_HLINE_TO = ( 3 << 1), + VG_VLINE_TO = ( 4 << 1), + VG_QUAD_TO = ( 5 << 1), + VG_CUBIC_TO = ( 6 << 1), + VG_SQUAD_TO = ( 7 << 1), + VG_SCUBIC_TO = ( 8 << 1), + VG_SCCWARC_TO = ( 9 << 1), + VG_SCWARC_TO = (10 << 1), + VG_LCCWARC_TO = (11 << 1), + VG_LCWARC_TO = (12 << 1) +} VGPathSegment; + +typedef enum { + VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE, + VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE, + VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE, + VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE, + VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE, + VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE, + VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE, + VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE, + VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE, + VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE, + VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE, + VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE, + VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE, + VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE, + VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE, + VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE, + VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE, + VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE, + VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE, + VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE, + VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE, + VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE, + VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE, + VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE +} VGPathCommand; + +typedef VGHandle VGPath; + +typedef enum { + VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0), + VG_PATH_CAPABILITY_APPEND_TO = (1 << 1), + VG_PATH_CAPABILITY_MODIFY = (1 << 2), + VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3), + VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4), + VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5), + VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6), + VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7), + VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8), + VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9), + VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10), + VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11), + VG_PATH_CAPABILITY_ALL = (1 << 12) - 1 +} VGPathCapabilities; + +typedef enum { + VG_PATH_FORMAT = 0x1600, + VG_PATH_DATATYPE = 0x1601, + VG_PATH_SCALE = 0x1602, + VG_PATH_BIAS = 0x1603, + VG_PATH_NUM_SEGMENTS = 0x1604, + VG_PATH_NUM_COORDS = 0x1605 +} VGPathParamType; + +typedef enum { + VG_CAP_BUTT = 0x1700, + VG_CAP_ROUND = 0x1701, + VG_CAP_SQUARE = 0x1702 +} VGCapStyle; + +typedef enum { + VG_JOIN_MITER = 0x1800, + VG_JOIN_ROUND = 0x1801, + VG_JOIN_BEVEL = 0x1802 +} VGJoinStyle; + +typedef enum { + VG_EVEN_ODD = 0x1900, + VG_NON_ZERO = 0x1901 +} VGFillRule; + +typedef enum { + VG_STROKE_PATH = (1 << 0), + VG_FILL_PATH = (1 << 1) +} VGPaintMode; + +typedef VGHandle VGPaint; + +typedef enum { + /* Color paint parameters */ + VG_PAINT_TYPE = 0x1A00, + VG_PAINT_COLOR = 0x1A01, + VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02, + VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07, + VG_PAINT_COLOR_RAMP_STOPS = 0x1A03, + + /* Linear gradient paint parameters */ + VG_PAINT_LINEAR_GRADIENT = 0x1A04, + + /* Radial gradient paint parameters */ + VG_PAINT_RADIAL_GRADIENT = 0x1A05, + + /* Pattern paint parameters */ + VG_PAINT_PATTERN_TILING_MODE = 0x1A06 +} VGPaintParamType; + +typedef enum { + VG_PAINT_TYPE_COLOR = 0x1B00, + VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01, + VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02, + VG_PAINT_TYPE_PATTERN = 0x1B03 +} VGPaintType; + +typedef enum { + VG_COLOR_RAMP_SPREAD_PAD = 0x1C00, + VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01, + VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02 +} VGColorRampSpreadMode; + +typedef enum { + VG_TILE_FILL = 0x1D00, + VG_TILE_PAD = 0x1D01, + VG_TILE_REPEAT = 0x1D02, + VG_TILE_REFLECT = 0x1D03 +} VGTilingMode; + +typedef enum { + /* RGB{A,X} channel ordering */ + VG_IMAGE_FORMAT_INVALID = -1, + VG_sRGBX_8888 = 0, + VG_sRGBA_8888 = 1, + VG_sRGBA_8888_PRE = 2, + VG_sRGB_565 = 3, + VG_sRGBA_5551 = 4, + VG_sRGBA_4444 = 5, + VG_sL_8 = 6, + VG_lRGBX_8888 = 7, + VG_lRGBA_8888 = 8, + VG_lRGBA_8888_PRE = 9, + VG_lL_8 = 10, + VG_A_8 = 11, + VG_BW_1 = 12, + VG_A_1 = 13, + VG_A_4 = 14, + + /* {A,X}RGB channel ordering */ + VG_sXRGB_8888 = 0 | (1 << 6), + VG_sARGB_8888 = 1 | (1 << 6), + VG_sARGB_8888_PRE = 2 | (1 << 6), + VG_sARGB_1555 = 4 | (1 << 6), + VG_sARGB_4444 = 5 | (1 << 6), + VG_lXRGB_8888 = 7 | (1 << 6), + VG_lARGB_8888 = 8 | (1 << 6), + VG_lARGB_8888_PRE = 9 | (1 << 6), + + /* BGR{A,X} channel ordering */ + VG_sBGRX_8888 = 0 | (1 << 7), + VG_sBGRA_8888 = 1 | (1 << 7), + VG_sBGRA_8888_PRE = 2 | (1 << 7), + VG_sBGR_565 = 3 | (1 << 7), + VG_sBGRA_5551 = 4 | (1 << 7), + VG_sBGRA_4444 = 5 | (1 << 7), + VG_lBGRX_8888 = 7 | (1 << 7), + VG_lBGRA_8888 = 8 | (1 << 7), + VG_lBGRA_8888_PRE = 9 | (1 << 7), + + /* {A,X}BGR channel ordering */ + VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7), + VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7), + VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7), + VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7), + VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7), + VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7), + VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7), + VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7) +} VGImageFormat; + +typedef VGHandle VGImage; +typedef int VGeglImageKHR; + +typedef enum { + VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0), + VG_IMAGE_QUALITY_FASTER = (1 << 1), + VG_IMAGE_QUALITY_BETTER = (1 << 2) +} VGImageQuality; + +typedef enum { + VG_IMAGE_FORMAT = 0x1E00, + VG_IMAGE_WIDTH = 0x1E01, + VG_IMAGE_HEIGHT = 0x1E02 +} VGImageParamType; + +typedef enum { + VG_DRAW_IMAGE_NORMAL = 0x1F00, + VG_DRAW_IMAGE_MULTIPLY = 0x1F01, + VG_DRAW_IMAGE_STENCIL = 0x1F02 +} VGImageMode; + +typedef enum { + VG_RED = (1 << 3), + VG_GREEN = (1 << 2), + VG_BLUE = (1 << 1), + VG_ALPHA = (1 << 0) +} VGImageChannel; + +typedef enum { + VG_BLEND_SRC = 0x2000, + VG_BLEND_SRC_OVER = 0x2001, + VG_BLEND_DST_OVER = 0x2002, + VG_BLEND_SRC_IN = 0x2003, + VG_BLEND_DST_IN = 0x2004, + VG_BLEND_MULTIPLY = 0x2005, + VG_BLEND_SCREEN = 0x2006, + VG_BLEND_DARKEN = 0x2007, + VG_BLEND_LIGHTEN = 0x2008, + VG_BLEND_ADDITIVE = 0x2009 +} VGBlendMode; + +typedef enum { + VG_IMAGE_FORMAT_QUERY = 0x2100, + VG_PATH_DATATYPE_QUERY = 0x2101 +} VGHardwareQueryType; + +typedef enum { + VG_HARDWARE_ACCELERATED = 0x2200, + VG_HARDWARE_UNACCELERATED = 0x2201 +} VGHardwareQueryResult; + +typedef enum { + VG_VENDOR = 0x2300, + VG_RENDERER = 0x2301, + VG_VERSION = 0x2302, + VG_EXTENSIONS = 0x2303 +} VGStringID; + +typedef enum { + VG_FONT_NUM_GLYPHS = 0x2F00 +} VGFontParamType; + + +/* Function Prototypes */ + +#ifndef VG_API_CALL +#define VG_API_CALL IMPORT_C +#endif +#ifndef VG_APIENTRY +#define VG_APIENTRY /* nothing */ +#endif +#ifndef VG_APIEXIT +#define VG_APIEXIT __SOFTFP +#endif + +VG_API_CALL VGErrorCode VG_APIENTRY + vgGetError(void) VG_APIEXIT; + +VG_API_CALL void VG_APIENTRY + vgFlush(void) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgFinish(void) VG_APIEXIT; + +/* Getters and Setters */ +VG_API_CALL void VG_APIENTRY + vgSetf (VGParamType type, VGfloat value) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSeti (VGParamType type, VGint value) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetfv(VGParamType type, VGint count, + const VGfloat * values) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetiv(VGParamType type, VGint count, + const VGint * values) VG_APIEXIT; +VG_API_CALL VGfloat VG_APIENTRY + vgGetf(VGParamType type) VG_APIEXIT; +VG_API_CALL VGint VG_APIENTRY + vgGeti(VGParamType type) VG_APIEXIT; +VG_API_CALL VGint VG_APIENTRY + vgGetVectorSize(VGParamType type) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetfv(VGParamType type, VGint count, + VGfloat * values) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetiv(VGParamType type, VGint count, + VGint * values) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetParameterf(VGHandle object, + VGint paramType, + VGfloat value) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetParameteri(VGHandle object, + VGint paramType, + VGint value) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetParameterfv(VGHandle object, + VGint paramType, + VGint count, + const VGfloat * values) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetParameteriv(VGHandle object, + VGint paramType, + VGint count, + const VGint * values) VG_APIEXIT; + +VG_API_CALL VGfloat VG_APIENTRY + vgGetParameterf(VGHandle object, + VGint paramType) VG_APIEXIT; +VG_API_CALL VGint VG_APIENTRY + vgGetParameteri(VGHandle object, + VGint paramType) VG_APIEXIT; +VG_API_CALL VGint VG_APIENTRY + vgGetParameterVectorSize(VGHandle object, + VGint paramType) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetParameterfv(VGHandle object, + VGint paramType, + VGint count, + VGfloat * values) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetParameteriv(VGHandle object, + VGint paramType, + VGint count, + VGint * values) VG_APIEXIT; + +/* Matrix Manipulation */ +VG_API_CALL void VG_APIENTRY + vgLoadIdentity(void) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgLoadMatrix(const VGfloat * m) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetMatrix(VGfloat * m) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgMultMatrix(const VGfloat * m) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgTranslate(VGfloat tx, VGfloat ty) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgScale(VGfloat sx, VGfloat sy) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgShear(VGfloat shx, VGfloat shy) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgRotate(VGfloat angle) VG_APIEXIT; + +/* Masking and Clearing */ +typedef VGHandle VGMaskLayer; + +VG_API_CALL void VG_APIENTRY + vgMask(VGHandle mask, VGMaskOperation operation, + VGint x, VGint y, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgRenderToMask(VGPath path, + VGbitfield paintModes, + VGMaskOperation operation) VG_APIEXIT; +VG_API_CALL VGMaskLayer VG_APIENTRY + vgCreateMaskLayer(VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgFillMaskLayer(VGMaskLayer maskLayer, + VGint x, VGint y, + VGint width, VGint height, + VGfloat value) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgCopyMask(VGMaskLayer maskLayer, + VGint sx, VGint sy, + VGint dx, VGint dy, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgClear(VGint x, VGint y, + VGint width, VGint height) VG_APIEXIT; + +/* Paths */ +VG_API_CALL VGPath VG_APIENTRY + vgCreatePath(VGint pathFormat, + VGPathDatatype datatype, + VGfloat scale, VGfloat bias, + VGint segmentCapacityHint, + VGint coordCapacityHint, + VGbitfield capabilities) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgClearPath(VGPath path, VGbitfield capabilities) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDestroyPath(VGPath path) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgRemovePathCapabilities(VGPath path, + VGbitfield capabilities) VG_APIEXIT; +VG_API_CALL VGbitfield VG_APIENTRY + vgGetPathCapabilities(VGPath path) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgAppendPath(VGPath dstPath, VGPath srcPath) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgAppendPathData(VGPath dstPath, + VGint numSegments, + const VGubyte * pathSegments, + const void * pathData) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgModifyPathCoords(VGPath dstPath, + VGint startIndex, + VGint numSegments, + const void * pathData) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgTransformPath(VGPath dstPath, VGPath srcPath) VG_APIEXIT; +VG_API_CALL VGboolean VG_APIENTRY + vgInterpolatePath(VGPath dstPath, + VGPath startPath, + VGPath endPath, + VGfloat amount) VG_APIEXIT; +VG_API_CALL VGfloat VG_APIENTRY + vgPathLength(VGPath path, + VGint startSegment, + VGint numSegments) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgPointAlongPath(VGPath path, + VGint startSegment, + VGint numSegments, + VGfloat distance, + VGfloat * x, VGfloat * y, + VGfloat * tangentX, + VGfloat * tangentY) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgPathBounds(VGPath path, + VGfloat * minX, + VGfloat * minY, + VGfloat * width, + VGfloat * height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgPathTransformedBounds(VGPath path, + VGfloat * minX, + VGfloat * minY, + VGfloat * width, + VGfloat * height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDrawPath(VGPath path, VGbitfield paintModes) VG_APIEXIT; + +/* Paint */ +VG_API_CALL VGPaint VG_APIENTRY + vgCreatePaint(void) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDestroyPaint(VGPaint paint) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_APIEXIT; +VG_API_CALL VGPaint VG_APIENTRY + vgGetPaint(VGPaintMode paintMode) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetColor(VGPaint paint, VGuint rgba) VG_APIEXIT; +VG_API_CALL VGuint VG_APIENTRY + vgGetColor(VGPaint paint) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgPaintPattern(VGPaint paint, VGImage pattern) VG_APIEXIT; + +/* Images */ +VG_API_CALL VGImage VG_APIENTRY + vgCreateImage(VGImageFormat format, + VGint width, VGint height, + VGbitfield allowedQuality) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDestroyImage(VGImage image) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgClearImage(VGImage image, + VGint x, VGint y, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgImageSubData(VGImage image, + const void * data, + VGint dataStride, + VGImageFormat dataFormat, + VGint x, VGint y, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetImageSubData(VGImage image, + void * data, + VGint dataStride, + VGImageFormat dataFormat, + VGint x, VGint y, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL VGImage VG_APIENTRY + vgChildImage(VGImage parent, + VGint x, VGint y, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL VGImage VG_APIENTRY + vgGetParent(VGImage image) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgCopyImage(VGImage dst, VGint dx, VGint dy, + VGImage src, VGint sx, VGint sy, + VGint width, VGint height, + VGboolean dither) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDrawImage(VGImage image) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetPixels(VGint dx, VGint dy, + VGImage src, VGint sx, VGint sy, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgWritePixels(const void * data, VGint dataStride, + VGImageFormat dataFormat, + VGint dx, VGint dy, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGetPixels(VGImage dst, VGint dx, VGint dy, + VGint sx, VGint sy, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgReadPixels(void * data, VGint dataStride, + VGImageFormat dataFormat, + VGint sx, VGint sy, + VGint width, VGint height) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgCopyPixels(VGint dx, VGint dy, + VGint sx, VGint sy, + VGint width, VGint height) VG_APIEXIT; + +/* Text */ +typedef VGHandle VGFont; + +VG_API_CALL VGFont VG_APIENTRY + vgCreateFont(VGint glyphCapacityHint) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDestroyFont(VGFont font) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetGlyphToPath(VGFont font, + VGuint glyphIndex, + VGPath path, + VGboolean isHinted, + const VGfloat glyphOrigin [2], + const VGfloat escapement[2]) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSetGlyphToImage(VGFont font, + VGuint glyphIndex, + VGImage image, + const VGfloat glyphOrigin [2], + const VGfloat escapement[2]) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgClearGlyph(VGFont font, + VGuint glyphIndex) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDrawGlyph(VGFont font, + VGuint glyphIndex, + VGbitfield paintModes, + VGboolean allowAutoHinting) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgDrawGlyphs(VGFont font, + VGint glyphCount, + const VGuint * glyphIndices, + const VGfloat * adjustments_x, + const VGfloat * adjustments_y, + VGbitfield paintModes, + VGboolean allowAutoHinting) VG_APIEXIT; + +/* Image Filters */ +VG_API_CALL void VG_APIENTRY + vgColorMatrix(VGImage dst, VGImage src, + const VGfloat * matrix) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgConvolve(VGImage dst, VGImage src, + VGint kernelWidth, VGint kernelHeight, + VGint shiftX, VGint shiftY, + const VGshort * kernel, + VGfloat scale, + VGfloat bias, + VGTilingMode tilingMode) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgSeparableConvolve(VGImage dst, VGImage src, + VGint kernelWidth, + VGint kernelHeight, + VGint shiftX, VGint shiftY, + const VGshort * kernelX, + const VGshort * kernelY, + VGfloat scale, + VGfloat bias, + VGTilingMode tilingMode) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgGaussianBlur(VGImage dst, VGImage src, + VGfloat stdDeviationX, + VGfloat stdDeviationY, + VGTilingMode tilingMode) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgLookup(VGImage dst, VGImage src, + const VGubyte * redLUT, + const VGubyte * greenLUT, + const VGubyte * blueLUT, + const VGubyte * alphaLUT, + VGboolean outputLinear, + VGboolean outputPremultiplied) VG_APIEXIT; +VG_API_CALL void VG_APIENTRY + vgLookupSingle(VGImage dst, VGImage src, + const VGuint * lookupTable, + VGImageChannel sourceChannel, + VGboolean outputLinear, + VGboolean outputPremultiplied) VG_APIEXIT; + +/* Hardware Queries */ +VG_API_CALL VGHardwareQueryResult VG_APIENTRY + vgHardwareQuery + (VGHardwareQueryType key, + VGint setting) VG_APIEXIT; + +/* Renderer and Extension Information */ +VG_API_CALL const VGubyte * VG_APIENTRY + vgGetString(VGStringID name) VG_APIEXIT; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __VG_1_1_OPENVG_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/VG/1.0/vgu.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/VG/1.0/vgu.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,154 @@ +/*------------------------------------------------------------------------ + * + * VGU 1.1 Reference Implementation + * ------------------------------------- + * + * Copyright (c) 2008 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and /or associated documentation files + * (the "Materials "), to deal in the Materials without restriction, + * including without limitation the rights to use, copy, modify, merge, + * publish, distribute, sublicense, and/or sell copies of the Materials, + * and to permit persons to whom the Materials are furnished to do so, + * subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR + * THE USE OR OTHER DEALINGS IN THE MATERIALS. + * + *//** + * \file + * \brief VGU 1.1 API. + *//*-------------------------------------------------------------------*/ + +#ifndef __VG_1_1_VGU_H +#define __VG_1_1_VGU_H + +#ifndef __VG_VGU_H_ +#error Do not include this file directly. Use . +#endif + +/* differences from the actual sample implemtation provided by Khronos: +- this comment +- the Doxygen comment with tag 'publishedAll', and tag 'released' +- changing + #define VG_API_CALL extern + to + #define VG_API_CALL IMPORT_C +- the addition of __SOFTFP in some of the function prototypes + */ + +/** +@publishedAll +@released +*/ +#ifdef __cplusplus +extern "C" { +#endif + +#include + +#define VGU_VERSION_1_0 1 +#define VGU_VERSION_1_1 2 + +#ifndef VGU_API_CALL +#define VGU_API_CALL IMPORT_C +#endif +#ifndef VGU_APIENTRY +#define VGU_APIENTRY /* nothing */ +#endif +#ifndef VGU_APIEXIT +#define VGU_APIEXIT __SOFTFP +#endif + +typedef enum { + VGU_NO_ERROR = 0, + VGU_BAD_HANDLE_ERROR = 0xF000, + VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001, + VGU_OUT_OF_MEMORY_ERROR = 0xF002, + VGU_PATH_CAPABILITY_ERROR = 0xF003, + VGU_BAD_WARP_ERROR = 0xF004 +} VGUErrorCode; + +typedef enum { + VGU_ARC_OPEN = 0xF100, + VGU_ARC_CHORD = 0xF101, + VGU_ARC_PIE = 0xF102 +} VGUArcType; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguLine(VGPath path, + VGfloat x0, VGfloat y0, + VGfloat x1, VGfloat y1) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguPolygon(VGPath path, + const VGfloat * points, + VGint count, + VGboolean closed) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguRect(VGPath path, + VGfloat x, VGfloat y, + VGfloat width, VGfloat height) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguRoundRect(VGPath path, + VGfloat x, VGfloat y, + VGfloat width, + VGfloat height, + VGfloat arcWidth, + VGfloat arcHeight) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguEllipse(VGPath path, + VGfloat cx, VGfloat cy, + VGfloat width, + VGfloat height) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguArc(VGPath path, + VGfloat x, VGfloat y, + VGfloat width, VGfloat height, + VGfloat startAngle, + VGfloat angleExtent, + VGUArcType arcType) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0, + VGfloat sx1, VGfloat sy1, + VGfloat sx2, VGfloat sy2, + VGfloat sx3, VGfloat sy3, + VGfloat * matrix) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0, + VGfloat dx1, VGfloat dy1, + VGfloat dx2, VGfloat dy2, + VGfloat dx3, VGfloat dy3, + VGfloat * matrix) VGU_APIEXIT; + +VGU_API_CALL VGUErrorCode VGU_APIENTRY + vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0, + VGfloat dx1, VGfloat dy1, + VGfloat dx2, VGfloat dy2, + VGfloat dx3, VGfloat dy3, + VGfloat sx0, VGfloat sy0, + VGfloat sx1, VGfloat sy1, + VGfloat sx2, VGfloat sy2, + VGfloat sx3, VGfloat sy3, + VGfloat * matrix) VGU_APIEXIT; + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif /* __VG_1_1_VGU_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/VG/1.1/openvg.h --- a/epoc32/include/VG/1.1/openvg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,815 +0,0 @@ -/*------------------------------------------------------------------------ - * - * OpenVG 1.1 Reference Implementation - * ------------------------------------- - * - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief OpenVG 1.1 API. - *//*-------------------------------------------------------------------*/ - -#ifndef __VG_1_1_OPENVG_H -#define __VG_1_1_OPENVG_H - -#ifndef __VG_OPENVG_H_ -#error Do not include this file directly. Use . -#endif - -/* differences from the actual sample implemtation provided by Khronos: -- this comment -- the Doxygen comment with tag 'publishedAll', and tag 'released' -- changing - #define VG_API_CALL extern - to - #define VG_API_CALL IMPORT_C -- the addition of __SOFTFP to all function prototypes -- the addition of VG_PATH_DATATYPE_INVALID in VGPathDatatype -- the addition of VG_IMAGE_FORMAT_INVALID in VGImageFormat -- the addition of VGeglImageKHR typedef for the VG_KHR_EGL_image extension - */ - -/** -@publishedAll -@released -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define OPENVG_VERSION_1_0 1 -#define OPENVG_VERSION_1_1 2 - -typedef khronos_float_t VGfloat; -typedef khronos_int8_t VGbyte; -typedef khronos_uint8_t VGubyte; -typedef khronos_int16_t VGshort; -typedef khronos_int32_t VGint; -typedef khronos_uint32_t VGuint; -typedef khronos_uint32_t VGbitfield; - -typedef enum { - VG_FALSE = 0, - VG_TRUE = 1 -} VGboolean; - -#define VG_MAXSHORT ((VGshort)((~((unsigned)0)) >> 1)) -#define VG_MAXINT ((VGint)((~((unsigned)0)) >> 1)) - -typedef VGuint VGHandle; - -#define VG_INVALID_HANDLE ((VGHandle)0) - -typedef enum { - VG_NO_ERROR = 0, - VG_BAD_HANDLE_ERROR = 0x1000, - VG_ILLEGAL_ARGUMENT_ERROR = 0x1001, - VG_OUT_OF_MEMORY_ERROR = 0x1002, - VG_PATH_CAPABILITY_ERROR = 0x1003, - VG_UNSUPPORTED_IMAGE_FORMAT_ERROR = 0x1004, - VG_UNSUPPORTED_PATH_FORMAT_ERROR = 0x1005, - VG_IMAGE_IN_USE_ERROR = 0x1006, - VG_NO_CONTEXT_ERROR = 0x1007 -} VGErrorCode; - -typedef enum { - /* Mode settings */ - VG_MATRIX_MODE = 0x1100, - VG_FILL_RULE = 0x1101, - VG_IMAGE_QUALITY = 0x1102, - VG_RENDERING_QUALITY = 0x1103, - VG_BLEND_MODE = 0x1104, - VG_IMAGE_MODE = 0x1105, - - /* Scissoring rectangles */ - VG_SCISSOR_RECTS = 0x1106, - - /* Color Transformation */ - VG_COLOR_TRANSFORM = 0x1170, - VG_COLOR_TRANSFORM_VALUES = 0x1171, - - /* Stroke parameters */ - VG_STROKE_LINE_WIDTH = 0x1110, - VG_STROKE_CAP_STYLE = 0x1111, - VG_STROKE_JOIN_STYLE = 0x1112, - VG_STROKE_MITER_LIMIT = 0x1113, - VG_STROKE_DASH_PATTERN = 0x1114, - VG_STROKE_DASH_PHASE = 0x1115, - VG_STROKE_DASH_PHASE_RESET = 0x1116, - - /* Edge fill color for VG_TILE_FILL tiling mode */ - VG_TILE_FILL_COLOR = 0x1120, - - /* Color for vgClear */ - VG_CLEAR_COLOR = 0x1121, - - /* Glyph origin */ - VG_GLYPH_ORIGIN = 0x1122, - - /* Enable/disable alpha masking and scissoring */ - VG_MASKING = 0x1130, - VG_SCISSORING = 0x1131, - - /* Pixel layout information */ - VG_PIXEL_LAYOUT = 0x1140, - VG_SCREEN_LAYOUT = 0x1141, - - /* Source format selection for image filters */ - VG_FILTER_FORMAT_LINEAR = 0x1150, - VG_FILTER_FORMAT_PREMULTIPLIED = 0x1151, - - /* Destination write enable mask for image filters */ - VG_FILTER_CHANNEL_MASK = 0x1152, - - /* Implementation limits (read-only) */ - VG_MAX_SCISSOR_RECTS = 0x1160, - VG_MAX_DASH_COUNT = 0x1161, - VG_MAX_KERNEL_SIZE = 0x1162, - VG_MAX_SEPARABLE_KERNEL_SIZE = 0x1163, - VG_MAX_COLOR_RAMP_STOPS = 0x1164, - VG_MAX_IMAGE_WIDTH = 0x1165, - VG_MAX_IMAGE_HEIGHT = 0x1166, - VG_MAX_IMAGE_PIXELS = 0x1167, - VG_MAX_IMAGE_BYTES = 0x1168, - VG_MAX_FLOAT = 0x1169, - VG_MAX_GAUSSIAN_STD_DEVIATION = 0x116A -} VGParamType; - -typedef enum { - VG_RENDERING_QUALITY_NONANTIALIASED = 0x1200, - VG_RENDERING_QUALITY_FASTER = 0x1201, - VG_RENDERING_QUALITY_BETTER = 0x1202 /* Default */ -} VGRenderingQuality; - -typedef enum { - VG_PIXEL_LAYOUT_UNKNOWN = 0x1300, - VG_PIXEL_LAYOUT_RGB_VERTICAL = 0x1301, - VG_PIXEL_LAYOUT_BGR_VERTICAL = 0x1302, - VG_PIXEL_LAYOUT_RGB_HORIZONTAL = 0x1303, - VG_PIXEL_LAYOUT_BGR_HORIZONTAL = 0x1304 -} VGPixelLayout; - -typedef enum { - VG_MATRIX_PATH_USER_TO_SURFACE = 0x1400, - VG_MATRIX_IMAGE_USER_TO_SURFACE = 0x1401, - VG_MATRIX_FILL_PAINT_TO_USER = 0x1402, - VG_MATRIX_STROKE_PAINT_TO_USER = 0x1403, - VG_MATRIX_GLYPH_USER_TO_SURFACE = 0x1404 -} VGMatrixMode; - -typedef enum { - VG_CLEAR_MASK = 0x1500, - VG_FILL_MASK = 0x1501, - VG_SET_MASK = 0x1502, - VG_UNION_MASK = 0x1503, - VG_INTERSECT_MASK = 0x1504, - VG_SUBTRACT_MASK = 0x1505 -} VGMaskOperation; - -#define VG_PATH_FORMAT_STANDARD 0 - -typedef enum { - VG_PATH_DATATYPE_INVALID = -1, - VG_PATH_DATATYPE_S_8 = 0, - VG_PATH_DATATYPE_S_16 = 1, - VG_PATH_DATATYPE_S_32 = 2, - VG_PATH_DATATYPE_F = 3 -} VGPathDatatype; - -typedef enum { - VG_ABSOLUTE = 0, - VG_RELATIVE = 1 -} VGPathAbsRel; - -typedef enum { - VG_CLOSE_PATH = ( 0 << 1), - VG_MOVE_TO = ( 1 << 1), - VG_LINE_TO = ( 2 << 1), - VG_HLINE_TO = ( 3 << 1), - VG_VLINE_TO = ( 4 << 1), - VG_QUAD_TO = ( 5 << 1), - VG_CUBIC_TO = ( 6 << 1), - VG_SQUAD_TO = ( 7 << 1), - VG_SCUBIC_TO = ( 8 << 1), - VG_SCCWARC_TO = ( 9 << 1), - VG_SCWARC_TO = (10 << 1), - VG_LCCWARC_TO = (11 << 1), - VG_LCWARC_TO = (12 << 1) -} VGPathSegment; - -typedef enum { - VG_MOVE_TO_ABS = VG_MOVE_TO | VG_ABSOLUTE, - VG_MOVE_TO_REL = VG_MOVE_TO | VG_RELATIVE, - VG_LINE_TO_ABS = VG_LINE_TO | VG_ABSOLUTE, - VG_LINE_TO_REL = VG_LINE_TO | VG_RELATIVE, - VG_HLINE_TO_ABS = VG_HLINE_TO | VG_ABSOLUTE, - VG_HLINE_TO_REL = VG_HLINE_TO | VG_RELATIVE, - VG_VLINE_TO_ABS = VG_VLINE_TO | VG_ABSOLUTE, - VG_VLINE_TO_REL = VG_VLINE_TO | VG_RELATIVE, - VG_QUAD_TO_ABS = VG_QUAD_TO | VG_ABSOLUTE, - VG_QUAD_TO_REL = VG_QUAD_TO | VG_RELATIVE, - VG_CUBIC_TO_ABS = VG_CUBIC_TO | VG_ABSOLUTE, - VG_CUBIC_TO_REL = VG_CUBIC_TO | VG_RELATIVE, - VG_SQUAD_TO_ABS = VG_SQUAD_TO | VG_ABSOLUTE, - VG_SQUAD_TO_REL = VG_SQUAD_TO | VG_RELATIVE, - VG_SCUBIC_TO_ABS = VG_SCUBIC_TO | VG_ABSOLUTE, - VG_SCUBIC_TO_REL = VG_SCUBIC_TO | VG_RELATIVE, - VG_SCCWARC_TO_ABS = VG_SCCWARC_TO | VG_ABSOLUTE, - VG_SCCWARC_TO_REL = VG_SCCWARC_TO | VG_RELATIVE, - VG_SCWARC_TO_ABS = VG_SCWARC_TO | VG_ABSOLUTE, - VG_SCWARC_TO_REL = VG_SCWARC_TO | VG_RELATIVE, - VG_LCCWARC_TO_ABS = VG_LCCWARC_TO | VG_ABSOLUTE, - VG_LCCWARC_TO_REL = VG_LCCWARC_TO | VG_RELATIVE, - VG_LCWARC_TO_ABS = VG_LCWARC_TO | VG_ABSOLUTE, - VG_LCWARC_TO_REL = VG_LCWARC_TO | VG_RELATIVE -} VGPathCommand; - -typedef VGHandle VGPath; - -typedef enum { - VG_PATH_CAPABILITY_APPEND_FROM = (1 << 0), - VG_PATH_CAPABILITY_APPEND_TO = (1 << 1), - VG_PATH_CAPABILITY_MODIFY = (1 << 2), - VG_PATH_CAPABILITY_TRANSFORM_FROM = (1 << 3), - VG_PATH_CAPABILITY_TRANSFORM_TO = (1 << 4), - VG_PATH_CAPABILITY_INTERPOLATE_FROM = (1 << 5), - VG_PATH_CAPABILITY_INTERPOLATE_TO = (1 << 6), - VG_PATH_CAPABILITY_PATH_LENGTH = (1 << 7), - VG_PATH_CAPABILITY_POINT_ALONG_PATH = (1 << 8), - VG_PATH_CAPABILITY_TANGENT_ALONG_PATH = (1 << 9), - VG_PATH_CAPABILITY_PATH_BOUNDS = (1 << 10), - VG_PATH_CAPABILITY_PATH_TRANSFORMED_BOUNDS = (1 << 11), - VG_PATH_CAPABILITY_ALL = (1 << 12) - 1 -} VGPathCapabilities; - -typedef enum { - VG_PATH_FORMAT = 0x1600, - VG_PATH_DATATYPE = 0x1601, - VG_PATH_SCALE = 0x1602, - VG_PATH_BIAS = 0x1603, - VG_PATH_NUM_SEGMENTS = 0x1604, - VG_PATH_NUM_COORDS = 0x1605 -} VGPathParamType; - -typedef enum { - VG_CAP_BUTT = 0x1700, - VG_CAP_ROUND = 0x1701, - VG_CAP_SQUARE = 0x1702 -} VGCapStyle; - -typedef enum { - VG_JOIN_MITER = 0x1800, - VG_JOIN_ROUND = 0x1801, - VG_JOIN_BEVEL = 0x1802 -} VGJoinStyle; - -typedef enum { - VG_EVEN_ODD = 0x1900, - VG_NON_ZERO = 0x1901 -} VGFillRule; - -typedef enum { - VG_STROKE_PATH = (1 << 0), - VG_FILL_PATH = (1 << 1) -} VGPaintMode; - -typedef VGHandle VGPaint; - -typedef enum { - /* Color paint parameters */ - VG_PAINT_TYPE = 0x1A00, - VG_PAINT_COLOR = 0x1A01, - VG_PAINT_COLOR_RAMP_SPREAD_MODE = 0x1A02, - VG_PAINT_COLOR_RAMP_PREMULTIPLIED = 0x1A07, - VG_PAINT_COLOR_RAMP_STOPS = 0x1A03, - - /* Linear gradient paint parameters */ - VG_PAINT_LINEAR_GRADIENT = 0x1A04, - - /* Radial gradient paint parameters */ - VG_PAINT_RADIAL_GRADIENT = 0x1A05, - - /* Pattern paint parameters */ - VG_PAINT_PATTERN_TILING_MODE = 0x1A06 -} VGPaintParamType; - -typedef enum { - VG_PAINT_TYPE_COLOR = 0x1B00, - VG_PAINT_TYPE_LINEAR_GRADIENT = 0x1B01, - VG_PAINT_TYPE_RADIAL_GRADIENT = 0x1B02, - VG_PAINT_TYPE_PATTERN = 0x1B03 -} VGPaintType; - -typedef enum { - VG_COLOR_RAMP_SPREAD_PAD = 0x1C00, - VG_COLOR_RAMP_SPREAD_REPEAT = 0x1C01, - VG_COLOR_RAMP_SPREAD_REFLECT = 0x1C02 -} VGColorRampSpreadMode; - -typedef enum { - VG_TILE_FILL = 0x1D00, - VG_TILE_PAD = 0x1D01, - VG_TILE_REPEAT = 0x1D02, - VG_TILE_REFLECT = 0x1D03 -} VGTilingMode; - -typedef enum { - /* RGB{A,X} channel ordering */ - VG_IMAGE_FORMAT_INVALID = -1, - VG_sRGBX_8888 = 0, - VG_sRGBA_8888 = 1, - VG_sRGBA_8888_PRE = 2, - VG_sRGB_565 = 3, - VG_sRGBA_5551 = 4, - VG_sRGBA_4444 = 5, - VG_sL_8 = 6, - VG_lRGBX_8888 = 7, - VG_lRGBA_8888 = 8, - VG_lRGBA_8888_PRE = 9, - VG_lL_8 = 10, - VG_A_8 = 11, - VG_BW_1 = 12, - VG_A_1 = 13, - VG_A_4 = 14, - - /* {A,X}RGB channel ordering */ - VG_sXRGB_8888 = 0 | (1 << 6), - VG_sARGB_8888 = 1 | (1 << 6), - VG_sARGB_8888_PRE = 2 | (1 << 6), - VG_sARGB_1555 = 4 | (1 << 6), - VG_sARGB_4444 = 5 | (1 << 6), - VG_lXRGB_8888 = 7 | (1 << 6), - VG_lARGB_8888 = 8 | (1 << 6), - VG_lARGB_8888_PRE = 9 | (1 << 6), - - /* BGR{A,X} channel ordering */ - VG_sBGRX_8888 = 0 | (1 << 7), - VG_sBGRA_8888 = 1 | (1 << 7), - VG_sBGRA_8888_PRE = 2 | (1 << 7), - VG_sBGR_565 = 3 | (1 << 7), - VG_sBGRA_5551 = 4 | (1 << 7), - VG_sBGRA_4444 = 5 | (1 << 7), - VG_lBGRX_8888 = 7 | (1 << 7), - VG_lBGRA_8888 = 8 | (1 << 7), - VG_lBGRA_8888_PRE = 9 | (1 << 7), - - /* {A,X}BGR channel ordering */ - VG_sXBGR_8888 = 0 | (1 << 6) | (1 << 7), - VG_sABGR_8888 = 1 | (1 << 6) | (1 << 7), - VG_sABGR_8888_PRE = 2 | (1 << 6) | (1 << 7), - VG_sABGR_1555 = 4 | (1 << 6) | (1 << 7), - VG_sABGR_4444 = 5 | (1 << 6) | (1 << 7), - VG_lXBGR_8888 = 7 | (1 << 6) | (1 << 7), - VG_lABGR_8888 = 8 | (1 << 6) | (1 << 7), - VG_lABGR_8888_PRE = 9 | (1 << 6) | (1 << 7) -} VGImageFormat; - -typedef VGHandle VGImage; -typedef int VGeglImageKHR; - -typedef enum { - VG_IMAGE_QUALITY_NONANTIALIASED = (1 << 0), - VG_IMAGE_QUALITY_FASTER = (1 << 1), - VG_IMAGE_QUALITY_BETTER = (1 << 2) -} VGImageQuality; - -typedef enum { - VG_IMAGE_FORMAT = 0x1E00, - VG_IMAGE_WIDTH = 0x1E01, - VG_IMAGE_HEIGHT = 0x1E02 -} VGImageParamType; - -typedef enum { - VG_DRAW_IMAGE_NORMAL = 0x1F00, - VG_DRAW_IMAGE_MULTIPLY = 0x1F01, - VG_DRAW_IMAGE_STENCIL = 0x1F02 -} VGImageMode; - -typedef enum { - VG_RED = (1 << 3), - VG_GREEN = (1 << 2), - VG_BLUE = (1 << 1), - VG_ALPHA = (1 << 0) -} VGImageChannel; - -typedef enum { - VG_BLEND_SRC = 0x2000, - VG_BLEND_SRC_OVER = 0x2001, - VG_BLEND_DST_OVER = 0x2002, - VG_BLEND_SRC_IN = 0x2003, - VG_BLEND_DST_IN = 0x2004, - VG_BLEND_MULTIPLY = 0x2005, - VG_BLEND_SCREEN = 0x2006, - VG_BLEND_DARKEN = 0x2007, - VG_BLEND_LIGHTEN = 0x2008, - VG_BLEND_ADDITIVE = 0x2009 -} VGBlendMode; - -typedef enum { - VG_IMAGE_FORMAT_QUERY = 0x2100, - VG_PATH_DATATYPE_QUERY = 0x2101 -} VGHardwareQueryType; - -typedef enum { - VG_HARDWARE_ACCELERATED = 0x2200, - VG_HARDWARE_UNACCELERATED = 0x2201 -} VGHardwareQueryResult; - -typedef enum { - VG_VENDOR = 0x2300, - VG_RENDERER = 0x2301, - VG_VERSION = 0x2302, - VG_EXTENSIONS = 0x2303 -} VGStringID; - -typedef enum { - VG_FONT_NUM_GLYPHS = 0x2F00 -} VGFontParamType; - - -/* Function Prototypes */ - -#ifndef VG_API_CALL -#define VG_API_CALL IMPORT_C -#endif -#ifndef VG_APIENTRY -#define VG_APIENTRY /* nothing */ -#endif -#ifndef VG_APIEXIT -#define VG_APIEXIT __SOFTFP -#endif - -VG_API_CALL VGErrorCode VG_APIENTRY - vgGetError(void) VG_APIEXIT; - -VG_API_CALL void VG_APIENTRY - vgFlush(void) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgFinish(void) VG_APIEXIT; - -/* Getters and Setters */ -VG_API_CALL void VG_APIENTRY - vgSetf (VGParamType type, VGfloat value) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSeti (VGParamType type, VGint value) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetfv(VGParamType type, VGint count, - const VGfloat * values) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetiv(VGParamType type, VGint count, - const VGint * values) VG_APIEXIT; -VG_API_CALL VGfloat VG_APIENTRY - vgGetf(VGParamType type) VG_APIEXIT; -VG_API_CALL VGint VG_APIENTRY - vgGeti(VGParamType type) VG_APIEXIT; -VG_API_CALL VGint VG_APIENTRY - vgGetVectorSize(VGParamType type) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetfv(VGParamType type, VGint count, - VGfloat * values) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetiv(VGParamType type, VGint count, - VGint * values) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetParameterf(VGHandle object, - VGint paramType, - VGfloat value) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetParameteri(VGHandle object, - VGint paramType, - VGint value) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetParameterfv(VGHandle object, - VGint paramType, - VGint count, - const VGfloat * values) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetParameteriv(VGHandle object, - VGint paramType, - VGint count, - const VGint * values) VG_APIEXIT; - -VG_API_CALL VGfloat VG_APIENTRY - vgGetParameterf(VGHandle object, - VGint paramType) VG_APIEXIT; -VG_API_CALL VGint VG_APIENTRY - vgGetParameteri(VGHandle object, - VGint paramType) VG_APIEXIT; -VG_API_CALL VGint VG_APIENTRY - vgGetParameterVectorSize(VGHandle object, - VGint paramType) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetParameterfv(VGHandle object, - VGint paramType, - VGint count, - VGfloat * values) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetParameteriv(VGHandle object, - VGint paramType, - VGint count, - VGint * values) VG_APIEXIT; - -/* Matrix Manipulation */ -VG_API_CALL void VG_APIENTRY - vgLoadIdentity(void) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgLoadMatrix(const VGfloat * m) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetMatrix(VGfloat * m) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgMultMatrix(const VGfloat * m) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgTranslate(VGfloat tx, VGfloat ty) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgScale(VGfloat sx, VGfloat sy) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgShear(VGfloat shx, VGfloat shy) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgRotate(VGfloat angle) VG_APIEXIT; - -/* Masking and Clearing */ -typedef VGHandle VGMaskLayer; - -VG_API_CALL void VG_APIENTRY - vgMask(VGHandle mask, VGMaskOperation operation, - VGint x, VGint y, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgRenderToMask(VGPath path, - VGbitfield paintModes, - VGMaskOperation operation) VG_APIEXIT; -VG_API_CALL VGMaskLayer VG_APIENTRY - vgCreateMaskLayer(VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDestroyMaskLayer(VGMaskLayer maskLayer) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgFillMaskLayer(VGMaskLayer maskLayer, - VGint x, VGint y, - VGint width, VGint height, - VGfloat value) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgCopyMask(VGMaskLayer maskLayer, - VGint sx, VGint sy, - VGint dx, VGint dy, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgClear(VGint x, VGint y, - VGint width, VGint height) VG_APIEXIT; - -/* Paths */ -VG_API_CALL VGPath VG_APIENTRY - vgCreatePath(VGint pathFormat, - VGPathDatatype datatype, - VGfloat scale, VGfloat bias, - VGint segmentCapacityHint, - VGint coordCapacityHint, - VGbitfield capabilities) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgClearPath(VGPath path, VGbitfield capabilities) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDestroyPath(VGPath path) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgRemovePathCapabilities(VGPath path, - VGbitfield capabilities) VG_APIEXIT; -VG_API_CALL VGbitfield VG_APIENTRY - vgGetPathCapabilities(VGPath path) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgAppendPath(VGPath dstPath, VGPath srcPath) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgAppendPathData(VGPath dstPath, - VGint numSegments, - const VGubyte * pathSegments, - const void * pathData) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgModifyPathCoords(VGPath dstPath, - VGint startIndex, - VGint numSegments, - const void * pathData) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgTransformPath(VGPath dstPath, VGPath srcPath) VG_APIEXIT; -VG_API_CALL VGboolean VG_APIENTRY - vgInterpolatePath(VGPath dstPath, - VGPath startPath, - VGPath endPath, - VGfloat amount) VG_APIEXIT; -VG_API_CALL VGfloat VG_APIENTRY - vgPathLength(VGPath path, - VGint startSegment, - VGint numSegments) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgPointAlongPath(VGPath path, - VGint startSegment, - VGint numSegments, - VGfloat distance, - VGfloat * x, VGfloat * y, - VGfloat * tangentX, - VGfloat * tangentY) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgPathBounds(VGPath path, - VGfloat * minX, - VGfloat * minY, - VGfloat * width, - VGfloat * height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgPathTransformedBounds(VGPath path, - VGfloat * minX, - VGfloat * minY, - VGfloat * width, - VGfloat * height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDrawPath(VGPath path, VGbitfield paintModes) VG_APIEXIT; - -/* Paint */ -VG_API_CALL VGPaint VG_APIENTRY - vgCreatePaint(void) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDestroyPaint(VGPaint paint) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetPaint(VGPaint paint, VGbitfield paintModes) VG_APIEXIT; -VG_API_CALL VGPaint VG_APIENTRY - vgGetPaint(VGPaintMode paintMode) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetColor(VGPaint paint, VGuint rgba) VG_APIEXIT; -VG_API_CALL VGuint VG_APIENTRY - vgGetColor(VGPaint paint) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgPaintPattern(VGPaint paint, VGImage pattern) VG_APIEXIT; - -/* Images */ -VG_API_CALL VGImage VG_APIENTRY - vgCreateImage(VGImageFormat format, - VGint width, VGint height, - VGbitfield allowedQuality) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDestroyImage(VGImage image) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgClearImage(VGImage image, - VGint x, VGint y, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgImageSubData(VGImage image, - const void * data, - VGint dataStride, - VGImageFormat dataFormat, - VGint x, VGint y, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetImageSubData(VGImage image, - void * data, - VGint dataStride, - VGImageFormat dataFormat, - VGint x, VGint y, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL VGImage VG_APIENTRY - vgChildImage(VGImage parent, - VGint x, VGint y, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL VGImage VG_APIENTRY - vgGetParent(VGImage image) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgCopyImage(VGImage dst, VGint dx, VGint dy, - VGImage src, VGint sx, VGint sy, - VGint width, VGint height, - VGboolean dither) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDrawImage(VGImage image) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetPixels(VGint dx, VGint dy, - VGImage src, VGint sx, VGint sy, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgWritePixels(const void * data, VGint dataStride, - VGImageFormat dataFormat, - VGint dx, VGint dy, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGetPixels(VGImage dst, VGint dx, VGint dy, - VGint sx, VGint sy, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgReadPixels(void * data, VGint dataStride, - VGImageFormat dataFormat, - VGint sx, VGint sy, - VGint width, VGint height) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgCopyPixels(VGint dx, VGint dy, - VGint sx, VGint sy, - VGint width, VGint height) VG_APIEXIT; - -/* Text */ -typedef VGHandle VGFont; - -VG_API_CALL VGFont VG_APIENTRY - vgCreateFont(VGint glyphCapacityHint) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDestroyFont(VGFont font) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetGlyphToPath(VGFont font, - VGuint glyphIndex, - VGPath path, - VGboolean isHinted, - const VGfloat glyphOrigin [2], - const VGfloat escapement[2]) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSetGlyphToImage(VGFont font, - VGuint glyphIndex, - VGImage image, - const VGfloat glyphOrigin [2], - const VGfloat escapement[2]) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgClearGlyph(VGFont font, - VGuint glyphIndex) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDrawGlyph(VGFont font, - VGuint glyphIndex, - VGbitfield paintModes, - VGboolean allowAutoHinting) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgDrawGlyphs(VGFont font, - VGint glyphCount, - const VGuint * glyphIndices, - const VGfloat * adjustments_x, - const VGfloat * adjustments_y, - VGbitfield paintModes, - VGboolean allowAutoHinting) VG_APIEXIT; - -/* Image Filters */ -VG_API_CALL void VG_APIENTRY - vgColorMatrix(VGImage dst, VGImage src, - const VGfloat * matrix) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgConvolve(VGImage dst, VGImage src, - VGint kernelWidth, VGint kernelHeight, - VGint shiftX, VGint shiftY, - const VGshort * kernel, - VGfloat scale, - VGfloat bias, - VGTilingMode tilingMode) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgSeparableConvolve(VGImage dst, VGImage src, - VGint kernelWidth, - VGint kernelHeight, - VGint shiftX, VGint shiftY, - const VGshort * kernelX, - const VGshort * kernelY, - VGfloat scale, - VGfloat bias, - VGTilingMode tilingMode) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgGaussianBlur(VGImage dst, VGImage src, - VGfloat stdDeviationX, - VGfloat stdDeviationY, - VGTilingMode tilingMode) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgLookup(VGImage dst, VGImage src, - const VGubyte * redLUT, - const VGubyte * greenLUT, - const VGubyte * blueLUT, - const VGubyte * alphaLUT, - VGboolean outputLinear, - VGboolean outputPremultiplied) VG_APIEXIT; -VG_API_CALL void VG_APIENTRY - vgLookupSingle(VGImage dst, VGImage src, - const VGuint * lookupTable, - VGImageChannel sourceChannel, - VGboolean outputLinear, - VGboolean outputPremultiplied) VG_APIEXIT; - -/* Hardware Queries */ -VG_API_CALL VGHardwareQueryResult VG_APIENTRY - vgHardwareQuery - (VGHardwareQueryType key, - VGint setting) VG_APIEXIT; - -/* Renderer and Extension Information */ -VG_API_CALL const VGubyte * VG_APIENTRY - vgGetString(VGStringID name) VG_APIEXIT; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __VG_1_1_OPENVG_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/VG/1.1/vgu.h --- a/epoc32/include/VG/1.1/vgu.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -/*------------------------------------------------------------------------ - * - * VGU 1.1 Reference Implementation - * ------------------------------------- - * - * Copyright (c) 2008 The Khronos Group Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and /or associated documentation files - * (the "Materials "), to deal in the Materials without restriction, - * including without limitation the rights to use, copy, modify, merge, - * publish, distribute, sublicense, and/or sell copies of the Materials, - * and to permit persons to whom the Materials are furnished to do so, - * subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Materials. - * - * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR - * THE USE OR OTHER DEALINGS IN THE MATERIALS. - * - *//** - * \file - * \brief VGU 1.1 API. - *//*-------------------------------------------------------------------*/ - -#ifndef __VG_1_1_VGU_H -#define __VG_1_1_VGU_H - -#ifndef __VG_VGU_H_ -#error Do not include this file directly. Use . -#endif - -/* differences from the actual sample implemtation provided by Khronos: -- this comment -- the Doxygen comment with tag 'publishedAll', and tag 'released' -- changing - #define VG_API_CALL extern - to - #define VG_API_CALL IMPORT_C -- the addition of __SOFTFP in some of the function prototypes - */ - -/** -@publishedAll -@released -*/ -#ifdef __cplusplus -extern "C" { -#endif - -#include - -#define VGU_VERSION_1_0 1 -#define VGU_VERSION_1_1 2 - -#ifndef VGU_API_CALL -#define VGU_API_CALL IMPORT_C -#endif -#ifndef VGU_APIENTRY -#define VGU_APIENTRY /* nothing */ -#endif -#ifndef VGU_APIEXIT -#define VGU_APIEXIT __SOFTFP -#endif - -typedef enum { - VGU_NO_ERROR = 0, - VGU_BAD_HANDLE_ERROR = 0xF000, - VGU_ILLEGAL_ARGUMENT_ERROR = 0xF001, - VGU_OUT_OF_MEMORY_ERROR = 0xF002, - VGU_PATH_CAPABILITY_ERROR = 0xF003, - VGU_BAD_WARP_ERROR = 0xF004 -} VGUErrorCode; - -typedef enum { - VGU_ARC_OPEN = 0xF100, - VGU_ARC_CHORD = 0xF101, - VGU_ARC_PIE = 0xF102 -} VGUArcType; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguLine(VGPath path, - VGfloat x0, VGfloat y0, - VGfloat x1, VGfloat y1) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguPolygon(VGPath path, - const VGfloat * points, - VGint count, - VGboolean closed) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguRect(VGPath path, - VGfloat x, VGfloat y, - VGfloat width, VGfloat height) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguRoundRect(VGPath path, - VGfloat x, VGfloat y, - VGfloat width, - VGfloat height, - VGfloat arcWidth, - VGfloat arcHeight) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguEllipse(VGPath path, - VGfloat cx, VGfloat cy, - VGfloat width, - VGfloat height) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguArc(VGPath path, - VGfloat x, VGfloat y, - VGfloat width, VGfloat height, - VGfloat startAngle, - VGfloat angleExtent, - VGUArcType arcType) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguComputeWarpQuadToSquare(VGfloat sx0, VGfloat sy0, - VGfloat sx1, VGfloat sy1, - VGfloat sx2, VGfloat sy2, - VGfloat sx3, VGfloat sy3, - VGfloat * matrix) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguComputeWarpSquareToQuad(VGfloat dx0, VGfloat dy0, - VGfloat dx1, VGfloat dy1, - VGfloat dx2, VGfloat dy2, - VGfloat dx3, VGfloat dy3, - VGfloat * matrix) VGU_APIEXIT; - -VGU_API_CALL VGUErrorCode VGU_APIENTRY - vguComputeWarpQuadToQuad(VGfloat dx0, VGfloat dy0, - VGfloat dx1, VGfloat dy1, - VGfloat dx2, VGfloat dy2, - VGfloat dx3, VGfloat dy3, - VGfloat sx0, VGfloat sy0, - VGfloat sx1, VGfloat sy1, - VGfloat sx2, VGfloat sy2, - VGfloat sx3, VGfloat sy3, - VGfloat * matrix) VGU_APIEXIT; - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif /* __VG_1_1_VGU_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animation.h --- a/epoc32/include/animation.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATION_H__ -#define __ANIMATION_H__ - -#include - -class TAnimationConfig; - -/** Pure virtual base class for animations. - -This defines an abstracted interface between a client application and an -animation. Most of the implementation details are handled by an animator -plugin. The source of the animation data and its interpretation are usually -handled by a data provider. - -@see CAnimationDataProvider -@see CAnimator -@see MAnimationObserver -@publishedAll -@released*/ -class CAnimation : public CBase - { -public: - /** Causes the animation to start, at the first time step or logical - equivalent. If the animation is already running, it rewinds. - @see TAnimationConfig - @param aConfig Specifies run time attributes of the animation.*/ - virtual void Start(const TAnimationConfig& aConfig) = 0; - /** Causes the animation to stop, and rewinds to the first frame.*/ - virtual void Stop() = 0; - /** Causes the animation to stop, but without rewinding.*/ - virtual void Pause() = 0; - /** Causes a paused animation to continue from where it left off.*/ - virtual void Resume() = 0; - /** Puts an animation on hold, which is similar to pause, but keeps - track of the time steps passing and catches up when resumed. This - can be used to temporarily cease processing an animation without it - getting out of step with others.*/ - virtual void Hold() = 0; - /** Resumes a held animation.*/ - virtual void Unhold() = 0; - /** Sets the coordinates of the animation. This generally refers - to the top left corner of the total area the animation covers. - @param aPoint The new coordinates of the animation (usually the top left - corner)*/ - virtual void SetPosition(const TPoint& aPoint) = 0; - /** Causes whatever ticker this animation provides to its animator to - be frozen untill a corresponding call to unfreeze. - - You should not normally need to call this function. - @see Unfreeze()*/ - virtual void Freeze() = 0; - /** Causes whatever ticker this animation provides to its animator to - be unfrozen. - - You should not normally need to call this function. - @see Freeze()*/ - virtual void Unfreeze() = 0; - }; - -#endif //__ANIMATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationconfig.h --- a/epoc32/include/animationconfig.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONCONFIG_H__ -#define __ANIMATIONCONFIG_H__ - -struct TAnimationConfig -/** These are passed to animator objects when an animation is started and -provide some control over the manner in which the animation runs. -@publishedAll -@released*/ - { - enum TFlags - /** Flag values used by animator objects when an animation is started that - provide some control over the manner in which the animation runs. - - @publishedAll - @released */ - { - /** If set, interpret the iData member as the number of times the - animation should run before automatically stopping itself.*/ - ELoop = 0x0001, - /** If set, the animation will start as soon as it can. By default, - animations wait for the data to be completely loaded before starting.*/ - EStartImmediately = 0x0010, - /** If set, and ELoop is set, interpret the iData member as a number - of frames to run through, instead of complete cycles.*/ - ECountFrames = 0x0020, - /** By default animations which stop after a number of loops return - to the first frame. If this flag is set they stop on the last frame.*/ - EEndOnLastFrame = 0x0040, - }; - /** Set this to a combination of the values in TFlags.*/ - TInt iFlags; - /** The meaning of this item depends on the value of the iFlags member.*/ - TInt iData; - }; - -#endif //__ANIMATIONCONFIG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationdataprovider.h --- a/epoc32/include/animationdataprovider.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONDATAPROVIDER_H__ -#define __ANIMATIONDATAPROVIDER_H__ - -#include -#include - -class MAnimationDataProviderObserver; - -_LIT8(KUndefinedAnimationDataType, "undefined"); - -/** -Pure virtual base class for data providers. - -A data provider takes an animation specification (such as a file), converts -it (if needed) into a format recognised by an animator (such as CAnimationFrame -objects), and passes it to the animator, via the medium of an animation. - -Most animation types take a data provider as an argument during contruction. -For more detailed usage instructions, refer to the documentation of the derived -classes. - -@see CAnimation -@see MAnimationDataProviderObserver -@publishedAll -@released -*/ -class CAnimationDataProvider : public CBase - { -public: - IMPORT_C void SetObserver(MAnimationDataProviderObserver* aObserver); - /** Called from the animation when it is ready to begin receiving data. */ - virtual void StartL() = 0; - /** Called from the animation to obtain the type of data to expect. - @return An 8 bit identifier string*/ - virtual TPtrC8 DataType() = 0; -protected: - IMPORT_C CAnimationDataProvider(); - IMPORT_C virtual void CAnimationDataProvider_Reserved1(); - IMPORT_C virtual void CAnimationDataProvider_Reserved2(); - - IMPORT_C void SendEventL(TInt aEvent); - IMPORT_C void SendEventL(TInt aEvent, TInt aData); - IMPORT_C void SendEventL(TInt aEvent, TAny* aData, TInt aDataSize); -protected: - /** Reserved for future use */ - TInt iCAnimationDataProvider_Reserved; - /** The destination to send data to. Usually an animation class. */ - MAnimationDataProviderObserver* iObserver; - }; - -#endif // __ANIMATIONDATAPROVIDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationevents.h --- a/epoc32/include/animationevents.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONEVENTS_H__ -#define __ANIMATIONEVENTS_H__ - -/** Generic events which all animation data providers can pass to animators. - -An implementation of CAnimation may intercept these and perform additional -processing if necessary. - -Events specific to a particular data type should take values greater than -EAnimationReservedEvents. Implementations of CAnimation should not intercept -or attempt to act on data type specific events. -@publishedAll -@released */ -enum TAnimationEvent - { - /** Sent when the data itself has changed and the animator needs to be - ready to receive the new values */ - EAnimationDataChanged, - /** Sent when an error occurs within the data provider and it is unable - to complete the sending of the animation data */ - EAnimationDataProviderError, - /** Specifies an upper limit for generic events. Events larger than this - are free to use for data type specific information */ - EAnimationReservedEvents = 0xFF - }; - -/** Events specific to the "bitmap" data type. These events are only sent -by data providers dealing with bitmap frame animations, and are only understood -by bitmap animators. -@publishedAll -@released */ -enum TBitmapAnimationEvent - { - /** This event contains data specifying the bitmaps for a new frame of - animation */ - EBitmapAnimationNewFrame = EAnimationReservedEvents + 1, - /** This event indicates that there are no more frames to send */ - EBitmapAnimationComplete, - }; - -#endif //__ANIMATIONEVENTS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationframe.h --- a/epoc32/include/animationframe.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONFRAME_H__ -#define __ANIMATIONFRAME_H__ - -#include - -class CFbsBitmap; - -/** -Data format for individual bitmap format animation frames. - -Animators and data providers which use the "bitmap" data type use objects -of this type to transfer data. - -You do not need to instantiate an object of this type unless you are writing -a new data provider. - -@see CBitmapAnimator -@see CICLAnimationDataProvider -@publishedAll -@released -*/ -class CAnimationFrame : public CBase - { -public: - /** Structure used for passing a CAnimationFrame safely over a - client/server connection.*/ - struct THandles - { - /** A handle to the bitmap into which the decoded frame(s) are put */ - TInt iBitmapHandle; - /** The bitmap mask for the changed area for this frame */ - TInt iMaskHandle; - /** General frame info provided by all plugins */ - TFrameInfo iFrameInfo; - }; -public: - virtual ~CAnimationFrame(); - IMPORT_C static CAnimationFrame* NewL(); - IMPORT_C static CAnimationFrame* NewL(const THandles& aHandles); - IMPORT_C void GetHandles(THandles & aHandles) const; - IMPORT_C void SetHandlesL(const THandles & aHandles); - IMPORT_C void CreateL(const TFrameInfo& aFrameInfo); - /** Returns the bitmap image for the changed area for this frame - @return A pointer to a CFbsBitmap */ - CFbsBitmap* Bitmap() { return iBitmap; } - /** Returns the bitmap image for the changed area for this frame - @return A pointer to a const CFbsBitmap */ - const CFbsBitmap* Bitmap() const { return iBitmap; } - /** Returns the bitmap mask for the changed area for this frame - @return A pointer to a CFbsBitmap */ - CFbsBitmap* Mask() { return iMask; } - /** Returns the bitmap mask for the changed area for this frame - @return A pointer to a const CFbsBitmap */ - const CFbsBitmap* Mask() const { return iMask; } - /** Returns information about the frame. - @return A TFrameInfo */ - TFrameInfo& FrameInfo() { return iFrameInfo; } - /** Returns information about the frame. - @return A const TFrameInfo */ - const TFrameInfo& FrameInfo() const { return iFrameInfo; } -protected: - IMPORT_C virtual void CAnimationFrame_Reserved1(); - IMPORT_C virtual void CAnimationFrame_Reserved2(); -private: - TInt iCAnimationFrame_Reserved; -private: - CAnimationFrame() {}; - CAnimationFrame(const CAnimationFrame&); // no implementation - CAnimationFrame& operator=(const CAnimationFrame&); // no implementation - void ConstructL(); -private: - CFbsBitmap* iBitmap; - CFbsBitmap* iMask; - TFrameInfo iFrameInfo; - }; - -#endif //__ANIMATIONFRAME_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationgroup.h --- a/epoc32/include/animationgroup.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __AnimationGroup_H__ -#define __AnimationGroup_H__ - -#include - -class CAnimationTls; - -/** -Handles groups of other animations. - -When it is appropriate to have several animations starting and stopping -together, add them all to an animation group and control them through that. - -In addition to making the code easier to both read and write, the animation -group handles synchronisation issues which can occur when issuing a sequence -of asynchronous requests. - -Care must be taken to remove an animation from any groups it may have been -added to before deleting it. - -@publishedAll -@released -*/ -class CAnimationGroup : public CAnimation - { -public: - static CAnimationGroup* NewL(); - ~CAnimationGroup(); - IMPORT_C const RPointerArray& Animations() const; - IMPORT_C RPointerArray& Animations(); - // From CAnimation - virtual void Start(const TAnimationConfig& aConfig); - virtual void Stop(); - virtual void Pause(); - virtual void Resume(); - virtual void Hold(); - virtual void Unhold(); - virtual void Freeze(); - virtual void Unfreeze(); - virtual void SetPosition(const TPoint& aPoint); -protected: - IMPORT_C virtual void CAnimationGroup_Reserved1(); - IMPORT_C virtual void CAnimationGroup_Reserved2(); -private: - TInt iCAnimationGroup_Reserved; -private: - CAnimationGroup(); - void ConstructL(); - CAnimationGroup(const CAnimationGroup&); // no implementation - CAnimationGroup& operator=(const CAnimationGroup&); // no implementation -private: - TInt iFreezeCount; - CAnimationTls* iTls; - RPointerArray iAnimations; - }; - -#endif //__AnimationGroup_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationmixins.h --- a/epoc32/include/animationmixins.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONMIXINS_H__ -#define __ANIMATIONMIXINS_H__ - -#include - -/** Interface from a data provider to an animation - -An animation which has a data provider receives information from it via this -interface. - -You do not need to derive an implementation from this class unless you are -writing a new animation type. - -@publishedAll -@released -@see CAnimationDataProvider -@see CAnimation -@see CAnimator*/ -class MAnimationDataProviderObserver - { -public: - /** Receives an event from a data provider. - @param aEvent The event code. - @param aData Any data associated with the event. Can be NULL. - @param aDataSize The size in bytes of the item pointed to by aData.*/ - virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0; -protected: - IMPORT_C virtual void MAnimationDataProviderObserver_Reserved1(); - IMPORT_C virtual void MAnimationDataProviderObserver_Reserved2(); - }; - -class CAnimationTicker; - -/** Interface used by an animator to during the rendering process. - -A class implementing this interface is provided to an animator by an animation. -It may or may not be the animation itself. - -You do not need to derive an implementation from this class unless you are -writing a new animation type. - -@publishedAll -@released -@see CAnimator*/ -class MAnimationDrawer - { -public: - /** Called by the animator when it needs to draw a new frame */ - virtual void AnimatorDraw() = 0; - /** Called by the animator when it is ready to begin running. - @param aSize The size of the smallest bounding rectangle that will be required to render the animation */ - virtual void AnimatorInitialisedL(const TSize& aSize) = 0; - /** Called by the animator when it is no longer ready, usually in - response to TAnimationEvent::EAnimationDataChanged */ - virtual void AnimatorResetL() = 0; - /** Called by the animator plugin loading routine to determine the type - of data for which an animator is required. - @return An 8 bit descriptor containing the data type.*/ - virtual const TPtrC8 AnimatorDataType() const = 0; - /** Called by the animator to obtain an AnimatorTicker, to which it will - add itself whenever it is running. - @return A reference to a CAnimationTicker.*/ - virtual CAnimationTicker& AnimatorTicker() = 0; -private: - IMPORT_C virtual void MAnimationDrawer_Reserved1(); - IMPORT_C virtual void MAnimationDrawer_Reserved2(); - }; - -class CAnimation; - -/** Interface used by an animation to report events to the client application. - -An animation can inform the client application of particular events through this -mechanism. Only errors are reported in this way in v9.1, but more events may -be added in future. - -Use of this interface by the client application is optional. - -@publishedAll -@released -@see CAnimation*/ -class MAnimationObserver - { -public: - /** Represents generic events which can be sent to the observer. */ - enum TEvent - { - /** Indicates that an error has occurred in the data provider. - For events of this type, aData is a pointer to a TInt error code. */ - EDataProviderError, - /** Indicates that the animator initialised (and therefore knows it's size) */ - EAnimationInitialized=0x01, - /** Any user defined animations introducing new events should use - values greater than EReserved */ - EReserved=0xFFFF, - }; -public: - /** Receives events from an animation. - - The receiver is not required to take any action atall in response to this - call. The receiver should not delete the animation whilst responding - to this call. - - @param aSender A reference to the animation which sent the event. - @param aEvent The event code. - @param aData An event specific data item.*/ - virtual void AnimationEvent(CAnimation& aSender, TInt aEvent, TAny* aData) = 0; -protected: - IMPORT_C virtual void MAnimationObserver_Reserved1(); - IMPORT_C virtual void MAnimationObserver_Reserved2(); - }; - -/** Interface used for receiving animation ticks. - -Animators receive regular ticks, during which they perform any required processing. - -You do not need to derive an implementation from this class unless you are writing -a new animator type. - -@publishedAll -@released -@see CAnimator -@see CAnimationTicker*/ -class MAnimationTickee - { -public: - /** This function is called regularly by any ticker to which the tickee - has been added */ - virtual void Tick() = 0; -protected: - IMPORT_C virtual void MAnimationTickee_Reserved1(); - IMPORT_C virtual void MAnimationTickee_Reserved2(); - }; - -/** Internal interface used by the ICL data loader to communicate with the -ICL data provider. Not intended for user derivation. -@internalComponent*/ -class MICLAnimationDataLoaderObserver - { -public: - enum TDataLoaderEvent - { - EImagePartialConvert, - EImageConvertComplete, - }; -public: - IMPORT_C virtual void DataLoaderEventL(TDataLoaderEvent aMessage, TInt aError) = 0; - }; - -#endif //__ANIMATIONMIXINS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationticker.h --- a/epoc32/include/animationticker.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONTICKER_H__ -#define __ANIMATIONTICKER_H__ - -#include - -class MAnimationTickee; - -/** This provides timing information for animators. - -You do not need to instantiate an object of this type unless you are writing a -new animation type. - -@see MAnimationTickee -@see CAnimationTls -@publishedAll -@released*/ -NONSHARABLE_CLASS(CAnimationTicker) : public CBase - { -public: - IMPORT_C static CAnimationTicker* NewL(TTimeIntervalMicroSeconds32 aTickLength = 100000); - IMPORT_C ~CAnimationTicker(); - - IMPORT_C TInt Add(MAnimationTickee* aTickee); - IMPORT_C TInt Remove(MAnimationTickee* aTickee); - IMPORT_C void Freeze(); - IMPORT_C void Unfreeze(); - - /** This provides the resolution of the timer. - @return iTickLength The resolution of the timer */ - inline const TTimeIntervalMicroSeconds32& TickLength() const { return iTickLength; } - void OnTick(); -protected: - IMPORT_C virtual void CAnimationTicker_Reserved1(); - IMPORT_C virtual void CAnimationTicker_Reserved2(); -private: - TInt iCAnimationTicker_Reserved; -private: - CAnimationTicker(); - void ConstructL(TTimeIntervalMicroSeconds32 aTickLength); - void StartTickingL(); - void StopTicking(); -private: - TInt iFreeze; - TTimeIntervalMicroSeconds32 iTickLength; - CPeriodic* iPeriodic; - RPointerArray iTickees; - }; - -#endif //__ANIMATIONTICKER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animationtls.h --- a/epoc32/include/animationtls.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATIONTLS_H__ -#define __ANIMATIONTLS_H__ - -#include - -class CAnimationTicker; - -/** This is a wrapper around the thread local storage, which simplifies its -use for obtaining a CAnimationTicker object that can be shared between -animations. The object is reference counted, and only one will exist per -thread per DLL at any given time. - -You do not need to instantiate an object of this type unless you are writing a -new animation type. If you are writing a new animation type it is optional. - -@see CAnimationTicker -@publishedAll -@released */ -NONSHARABLE_CLASS(CAnimationTls) : public CBase - { -public: - IMPORT_C static CAnimationTls* NewL(); - IMPORT_C void Close(); - IMPORT_C CAnimationTicker* Ticker(); -protected: - CAnimationTls(); - ~CAnimationTls(); - IMPORT_C virtual void CAnimationTls_Reserved1(); - IMPORT_C virtual void CAnimationTls_Reserved2(); -protected: - /** A Reference count of the object */ - TInt iRefCount; - /** This provides timing information for animators */ - CAnimationTicker* iTimer; -private: - TInt iCAnimationTls_Reserved; - }; - -#endif // __ANIMATIONTLS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/animator.h --- a/epoc32/include/animator.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ANIMATOR_H__ -#define __ANIMATOR_H__ - -#include - -const TUid KAnimatorInterfaceUid = {0x10204F59}; - -class MAnimationDrawer; -class CBitmapContext; -class TAnimationConfig; - -/** -Pure virtual base class for animators. - -Each data type supported by the animation framework is represented by an -animator, which handles the data interpretation, timing and control. Each -animator is provided in the form of an ECOM plugin. - -You do not need to instatiate animators in a client application. This is -handled by the animation classes. - -@see CAnimation -@publishedAll -@released -*/ -class CAnimator : public CBase - { -public: - // ECOM instatiation and destruction: - IMPORT_C static CAnimator* NewL(MAnimationDrawer* aRenderer); - IMPORT_C virtual ~CAnimator(); - /** Starts the animation running. - @see TAnimationConfig - @param aConfig Runtime settings*/ - virtual void Start(const TAnimationConfig& aConfig) = 0; - /** Stops the animation and rewinds it.*/ - virtual void Stop() = 0; - /** Pauses the animation.*/ - virtual void Pause() = 0; - /** Resumes a paused animation.*/ - virtual void Resume() = 0; - /** Puts an animation on hold. */ - virtual void Hold() = 0; - /** Restores a held animation and brings it back into synch. */ - virtual void Unhold() = 0; - /** Receives data from a data provider. The mechanism by which data is - actually passed depends on the animation type. - - @see MAnimationDataProviderObserver - @param aEvent The event identifier - @param aData A pointer to any data for the event - @param aDataSize The length of the data in aData*/ - virtual void DataEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0; - /** Called from the renderer and draws the animation. - @param aBitmapContext The context on which the animation will be drawn*/ - virtual void Draw(CBitmapContext& aBitmapContext) const = 0; - /** Called from the renderer and draws the mask for the animation. - @param aBitmapContext The context on which the mask will be drawn*/ - virtual void DrawMask(CBitmapContext& aBitmapContext) const = 0; -protected: - /** Animator ECOM Plugin identifier */ - TUid iDtor_ID_Key; - /** Data */ - TInt iLoop; - }; - -#endif //__ANIMATOR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/ansicomp.h --- a/epoc32/include/ansicomp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Enforce ANSI compliance on Microsoft compilers in 'For loop' behaviour -// -// - - -#if !defined(__ANSICOMP_H__) -#define __ANSICOMP_H__ - -#if defined(__VC32__) && _MSC_VER>=1100 -#pragma warning(disable : 4127) // warning C4127 : conditional expression is constant - -#define for if(false);else for // Enforce the definition of a loop variable to local scope - -#endif - -#endif // __ANSICOMP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apacmdln.h --- a/epoc32/include/apacmdln.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__APACMDLN_H__) -#define __APACMDLN_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__APADEF_H__) -#include -#endif - -#if !defined(__F32FILE_H__) -#include -#endif - -#if !defined(__S32STRM_H__) -#include -#endif - - -class CApaCommandLine : public CBase -/** Information for launching an application. - -This is often referred to as a command line and contains: - -the name of an application EXE to be launched, - -a document name, - -a command code that defines the way the application is launched - -trailing data; the structure of this depends on the application to be launched. - -The information is held in a buffer implemented by a heap descriptor. - -@publishedAll -@released */ - { -public: - // construction/destruction - IMPORT_C static CApaCommandLine* NewL(); - IMPORT_C static CApaCommandLine* NewLC(); - IMPORT_C ~CApaCommandLine(); - - // Getting/setting the CApaCommandLine to/from process environment-slots - IMPORT_C void SetProcessEnvironmentL(RProcess& aProcess) const; - IMPORT_C static TInt GetCommandLineFromProcessEnvironment(CApaCommandLine*& aCommandLine); - - // Getting/setting the CApaCommandLine to/from a server IPC-message - IMPORT_C void GetIpcArgsLC(TIpcArgs& aIpcArgs) const; - IMPORT_C void ConstructCmdLineFromMessageL(const RMessage2& aMessage); - - // operations on the document name - IMPORT_C void SetDocumentNameL(const TDesC& aDocName); - IMPORT_C TPtrC DocumentName() const; - - // operations on the executable name - IMPORT_C void SetExecutableNameL(const TDesC& aAppName); - IMPORT_C TPtrC ExecutableName() const; - - IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData); - IMPORT_C TPtrC8 OpaqueData() const; - - // operations on the tail end - IMPORT_C void SetTailEndL(const TDesC8& aTailEnd); - IMPORT_C TPtrC8 TailEnd() const; - - // operations on the command - IMPORT_C void SetCommandL(TApaCommand aCommand); - IMPORT_C TApaCommand Command() const; - - // operations on the parent process id - IMPORT_C void SetParentProcessId(TProcessId aProcessId); - IMPORT_C TProcessId ParentProcessId() const; - - // operations on the file passed by handle - IMPORT_C void SetFileByHandleL(const RFile& aFile); - IMPORT_C void GetFileByHandleL(RFile& aFile) const; -public: - - // operations on the server requirement/differentiator number - 0 means no server, non-zero sets the differentiator for the server name - IMPORT_C void SetServerNotRequiredL(); - IMPORT_C void SetServerRequiredL(TUint aServerDifferentiator); - IMPORT_C TUint ServerRequired() const; - - // operations to support starting an application with a specific screen number - IMPORT_C void SetDefaultScreenL(TInt aDefaultScreenNumber); - IMPORT_C TInt DefaultScreen() const; - IMPORT_C TBool IsDefaultScreenSet() const; - - // Operations to support window chaining - IMPORT_C void SetParentWindowGroupID(TInt aParentWindowGroupID); - IMPORT_C TInt ParentWindowGroupID() const; - - // operations to support passing memory-allocation failure settings in to applications - IMPORT_C void SetDebugMemFailL(TInt aDebugMemFail); - IMPORT_C TInt DebugMemFail() const; - - // operations to support the instrumentation (i.e. profiling) of application startup - IMPORT_C void SetAppStartupInstrumentationEventIdBaseL(TInt aEventIdBase); - IMPORT_C TInt AppStartupInstrumentationEventIdBase() const; - - IMPORT_C static TInt EnvironmentSlotForPublicUse(TInt aIndex); - -private: - struct SOption - { - const TDesC* iToken; - TInt* iResult; - TRadix iRadix; - HBufC8* iHBufC8Result; - }; - -private: - CApaCommandLine(); - void SetServerDifferentiatorL(TUint aServerDifferentiator); - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); - HBufC8* StreamableAttributesLC() const; - void GetCommandLineFromProcessEnvironmentL(); - TInt Parse(const TDesC& aCmdLine); - TPtrC StripQuotes(const TDesC& aDes) const; - -private: - enum - { - EEnvironmentSlotUnused=0, - - EEnvironmentSlotMain=1, - EEnvironmentSlotFsSession=2, - EEnvironmentSlotFile=3, - - EFirstEnvironmentSlotForPublicUse=8, - ENumberOfEnvironmentSlotsForPublicUse=4 - }; - - enum - { - EIpcSlotMain=0, - EIpcSlotFsSession=1, - EIpcSlotFile=2 - }; -public: - enum - { - EIpcFirstFreeSlot=3 - }; -private: - HBufC* iDocumentName; - HBufC* iExecutableName; - HBufC8* iOpaqueData; - HBufC8* iTailEnd; - TApaCommand iCommand; - TUint iServerDifferentiator; - TInt iDefaultScreenNumber; - TInt iParentWindowGroupID; - TInt iDebugMemFail; - TInt iAppStartupInstrumentationEventIdBase; - RFile iFile; - TProcessId iParentProcessId; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apadbase.h --- a/epoc32/include/apadbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APADBASE_H__ -#define __APADBASE_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__S32STD_H__) -#include -#endif -#if !defined(__GDI_H__) -#include -#endif - - -class CApaDoorBase : public CPicture -// Base class for a wrapper for embedded CApaDocuments -/** The base class for the graphic representation of an embedded document. - -An embedded document can be represented either as an icon or as a glass picture. -Such a graphic representation is known as a door. - -The class is intended for derivation. - -@publishedAll -@released -@see CApaDoor -@see CApaModelDoor */ - { -public: - - /** Defines the possible formats for the graphical representation of the embedded - document. */ - enum TFormat { - /** The representation is an icon. */ - EIconic, - /** The representation is a glass door. */ - EGlassDoor, - /** The representation is a glass door but has been temporarily switched to an icon. */ - ETemporarilyIconic - }; -public: - inline TFormat Format()const; - inline TUid Source()const; - inline void SetSource(TUid aSource); - // Virtuals from CPicture - IMPORT_C virtual TStreamId StoreL(CStreamStore& aStore) const; - IMPORT_C virtual void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); - IMPORT_C virtual void SetCropInTwips(const TMargins& aMargins); - IMPORT_C virtual TPictureCapability Capability() const; - IMPORT_C virtual void GetCropInTwips(TMargins& aMargins) const; - IMPORT_C virtual TInt ScaleFactorWidth() const; - IMPORT_C virtual TInt ScaleFactorHeight() const; - IMPORT_C virtual TBool LineBreakPossible(TUint aClass,TBool aBeforePicture,TBool aHaveSpaces) const; - IMPORT_C virtual TBool NativePixelSize(TSize& aPixelSize); -protected: - IMPORT_C CApaDoorBase(); - IMPORT_C void ExternalizeBaseStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const; - IMPORT_C TSize InternalizeBaseStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict); // returns current size in twips - -private: - IMPORT_C virtual void CApaDoorBase_Reserved1(); - IMPORT_C virtual void CApaDoorBase_Reserved2(); -protected: - - /** Returns the size of the glass door, in twips. - - A concrete implementation of this function is provided by derived classes. - - @return The size of the glass door, in twips. - - @publishedAll - @released */ - virtual TSize GlassDoorSize()const=0; -protected: - TFormat iFormat; - TUid iSource; // foreign representation of a translated door (eg MS Word doc) - -private: - TInt iCApaDoorBase_Reserved1; - }; - -// -// inlines -// - -inline CApaDoorBase::TFormat CApaDoorBase::Format()const - /** Gets the current format of the representation of the embedded document. - - @return The format for the representation of the embedded document. */ - { return iFormat; } - -inline TUid CApaDoorBase::Source()const - /** Gets the UID that identifies this door when the source originates on a non-Symbian - OS device. - - This is used by converters. - - @return The UID for the non-Symbian OS source. For a source that originates - on a Symbian OS phone, this is KNullUid. */ - { return iSource; } - -inline void CApaDoorBase::SetSource(TUid aSource) - /** Sets the UID that identifies this door when the source originates on a non-Symbian - OS device. - - This is used by converters. - - @param aSource The UID for the non-Symbian OS source. For a source that originates - on a Symbian OS phone, this is KNullUid. */ - { iSource=aSource; } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apadef.h --- a/epoc32/include/apadef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,291 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APADEF_H__ -#define __APADEF_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -// comand line tokens - -/** -@internalComponent -*/ -const TUint KApaCommandLetterOpen='O'; - -/** -@internalComponent -*/ -const TUint KApaCommandLetterCreate='C'; - -/** -@internalComponent -*/ -const TUint KApaCommandLetterRun='R'; - -/** -@internalComponent -*/ -const TUint KApaCommandLetterBackground='B'; - -/** -@internalComponent -*/ -const TUint KApaCommandLetterViewActivate='V'; - -/** -@internalComponent -*/ -const TUint KApaCommandLetterRunWithoutViews='W'; - -/** -@internalComponent -*/ -const TUint KApaCommandLetterBackgroundAndWithoutViews='A'; - -/** Defines the command codes used to indicate the way an application is to be -launched. - -@publishedAll -@released -@see CApaCommandLine */ -enum TApaCommand - { - /** The application is to open the document specified on the command line. */ - EApaCommandOpen, - /** The application is to create the document specified on the command line. */ - EApaCommandCreate, - /** The application is to run and open the last used document. */ - EApaCommandRun, - /** The application is to open the last used document and to run in the background. */ - EApaCommandBackground, - /** Reserved for future use. */ - EApaCommandViewActivate, - /** The application is to run without views. - - This should NOT be used for view based applications. */ - EApaCommandRunWithoutViews, - /** The application is to run in the background and viewless mode */ - EApaCommandBackgroundAndWithoutViews - }; - -/** -@publishedAll -@released -*/ -const TInt KApaMaxAppCaption=0x100; // Default name is a file name, so the same limit is used - -// TApaAppCaption is the current language name of the app (for task lists, dialogs etc) - -/** Defines a modifiable buffer descriptor to contain the caption or the short caption -for an application. - -@publishedAll -@released */ -typedef TBuf TApaAppCaption; - -/** -@internalComponent -*/ -const TInt KApaMaxCommandLine=0x100; - -/** -@internalComponent -*/ -typedef TBuf TApaCommandLine; - -/** -@internalComponent -*/ -const TInt KApaMaxAppFileName=0x10; // Length of App's filename without path or extension (not it's caption) - -/** -@internalComponent -*/ -typedef TBuf TApaAppFileName; - -/** Maximum length of an application group name. - -@publishedAll -@released -@see TApaAppGroupName */ -const TInt KApaMaxAppGroupName=0x10; // Length of App's logical groupname - -/** An application group name. - -This is a name that allows applications to be categorized, for instance "Games" -or "Utilities". - -@publishedAll -@released */ -typedef TBuf TApaAppGroupName; - -/** The hexadecimal value of the 2nd UID that identifies a DLL as being an ASCII UI -application. In .mmp files, the hexadecimal number is explicitly inserted -as the first value following the UID keyword. - -@publishedAll -@deprecated */ -const TInt KAppUidValue8 = 0x1000006c; - -/** The 2nd UID that identifies a DLL as being an ASCII UI application. - -@publishedAll -@deprecated */ -const TUid KUidApp8={KAppUidValue8}; - -/** The hexadecimal value of the 2nd UID that defines a DLL as being a Unicode -UI application. In .mmp files, the hexadecimal number is explicitly inserted -as the first value following the UID keyword. - -@publishedAll -@released -@see KAppUidValue */ -const TInt KAppUidValue16 = 0x100039CE; - -/** The 2nd UID that defines a DLL as being a Unicode UI application. - -@publishedAll -@released -@see KUidApp */ -const TUid KUidApp16={KAppUidValue16}; - -// -// 2nd Uid for app doc files -/** -@publishedAll -@deprecated -*/ -const TUid KUidAppDllDoc8={268435565}; - -/** -@publishedAll -@released -*/ -const TUid KUidAppDllDoc16={0x10003A12}; - -/** The UID encoded in a TPictureHeader that identifies a picture as a door (for -ASCII builds). - -@publishedAll -@deprecated -*/ -const TUid KUidPictureTypeDoor8={268435537}; - -/** The UID encoded in a TPictureHeader that identifies a picture as a door (for -Unicode builds). - -@publishedAll -@released -@see KUidPictureTypeDoor */ -const TUid KUidPictureTypeDoor16={0x10003A33}; - -// -// Uid's for streams in stream dictionaries -/** -@publishedAll -@deprecated -*/ -const TUid KUidSecurityStream8={268435661}; - -/** -@publishedAll -@released -*/ -const TUid KUidSecurityStream16={0x10003A40}; - -/** -@publishedAll -@deprecated -*/ -const TUid KUidAppIdentifierStream8={268435593}; // stream containing a TApaAppIdentifier - -/** -@publishedAll -@released -*/ -const TUid KUidAppIdentifierStream16={0x10003A34}; - -#ifdef _UNICODE -/** The type-independent 2nd UID that identifies a DLL as being a UI application. - -@publishedAll -@released -@see KUidApp16 -@see KUidApp8 */ -#define KUidApp KUidApp16 -/** The type-independent hexadecimal value of the 2nd UID that identifies a DLL as -being a UI application. - -@publishedAll -@released -@see KAppUidValue16 -@see KAppUidValue8 */ -#define KAppUidValue KAppUidValue16 //lint !e1923 supress could become const variable -/** -@publishedAll -@released -*/ -#define KUidAppDllDoc KUidAppDllDoc16 -/** The type independent UID encoded in a TPictureHeader that identifies a picture -as a door. - -@publishedAll -@released -@see KUidPictureTypeDoor16 -@see KUidPictureTypeDoor8 -@see TPictureHeader -@see TApaModelDoorFactory::NewPictureL() */ -#define KUidPictureTypeDoor KUidPictureTypeDoor16 -/** -@publishedAll -@released -*/ -#define KUidAppIdentifierStream KUidAppIdentifierStream16 -/** -@publishedAll -@released -*/ -#define KUidSecurityStream KUidSecurityStream16 -#else -/** The type independent 2nd UID that defines a DLL as being a UI application. - -@see KUidApp16 -@see KUidApp8 */ -#define KUidApp KUidApp8 -/** The type independent hexadecimal value of the 2nd UID that defines a DLL as -being a UI application. - -@see KAppUidValue16 -@see KAppUidValue8 */ -#define KAppUidValue KAppUidValue8 -#define KUidAppDllDoc KUidAppDllDoc8 -/** The type independent UID encoded in a TPictureHeader that identifies a picture -as a door. - -@see KUidPictureTypeDoor16 -@see KUidPictureTypeDoor8 -@see TPictureHeader -@see TApaModelDoorFactory::NewPictureL() */ -#define KUidPictureTypeDoor KUidPictureTypeDoor8 -#define KUidAppIdentifierStream KUidAppIdentifierStream8 -#define KUidSecurityStream KUidSecurityStream8 -#endif - -const TUid KUidFileEmbeddedApplicationInterfaceUid={0x101f8c96}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apaflrec.h --- a/epoc32/include/apaflrec.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__APAFLREC_H__) -#define __APAFLREC_H__ - -#if !defined(__APADEF_H__) -#include -#endif -#if !defined(__APAID_H__) -#include -#endif - -// classes defined: -class MApaAppStarter; -class CApaAppLocator; -class CApaFileRecognizer; -class CApaFileRecognizerType; -class CFileRecognizerExtension; -// -// classes referenced: -class TApaAppEntry; -class CApaCommandLine; -class RFs; -// - -// KUidFileRecognizer is UID[1] for app recognizer dll's (UID[2] identifies a particular identifier) -/** -@publishedAll -@released -*/ -#ifdef _UNICODE -#define KUidFileRecognizer KUidFileRecognizer16 -#else -#define KUidFileRecognizer KUidFileRecognizer8 -#endif - -/** -@publishedAll -@deprecated -*/ -const TInt KFileRecognizerUidValue8=0x1000013E; - -/** -@publishedAll -@deprecated -*/ -const TUid KUidFileRecognizer8={KFileRecognizerUidValue8}; - -/** -@publishedAll -@released -*/ -const TUid KUidFileRecognizer16={0x10003A37}; -// - - -class CApaAppLocator : public CBase -/** -@internalComponent -*/ - { -public: - virtual TInt GetAppEntryByUid(TApaAppEntry& aAppEntry,TUid aAppUid)=0; - virtual TInt GetAppCapabilityByUid(TDes8& aCapabilityBuf,TUid aAppUid)=0; - }; - - - -class CApaFileRecognizer : public CBase -/** -@internalComponent -@deprecated -*/ - { -public: - // - IMPORT_C CApaFileRecognizerType* RecognizeFileL(const TDesC& aFullFileName,const TUidType* aUidType=NULL); - IMPORT_C CApaAppLocator* AppLocator() const; - // - IMPORT_C ~CApaFileRecognizer(); -protected: - IMPORT_C CApaFileRecognizer(RFs& aFs); - IMPORT_C void AddFileRecognizerType(CApaFileRecognizerType* aFileRecognizerType); - IMPORT_C TInt RemoveFileRecognizerType(const CApaFileRecognizerType* aFileRecognizerType); - IMPORT_C void SetAppLocator(CApaAppLocator* aAppLocator); // should be called by child-classes eg during construction - static inline void SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter); - IMPORT_C void DestroyRecognizerList(); -protected: - RFs& iFs; - CApaAppLocator* iAppLocator; -private: - CApaFileRecognizerType *iFileRecognizerList; - }; - - - -class MApaAppStarter -/** An interface used by the Application Architecture server to start applications. - -CEikonEnv is derived from this class. - -@publishedPartner -@released -@see CEikonEnv */ - { -public: - virtual TThreadId StartAppL(const CApaCommandLine& aCommandLine)=0; -protected: - IMPORT_C MApaAppStarter(); -private: - IMPORT_C virtual void MApaAppStarter_Reserved1(); - IMPORT_C virtual void MApaAppStarter_Reserved2(); -private: - TInt iMApaAppStarter_Reserved1; - }; - - - -class CApaFileRecognizerType : public CBase -/** -@publishedPartner -@deprecated -*/ - { -public: - enum TRecognizedType {EProgram,EDoc,EOtherFile,ENotRecognized}; -public: - virtual TThreadId RunL(TApaCommand aCommand,const TDesC* aDocFileName,const TDesC8* aTailEnd) const=0; - inline TThreadId RunL(TApaCommand aCommand, const TDesC* aDocFileName) const; - inline TThreadId RunL(TApaCommand aCommand) const; - inline TUid AppUid()const; - inline TUid TypeUid()const; - inline TRecognizedType Type()const; - IMPORT_C void Capability(TDes8& aCapabilityBuf)const; - IMPORT_C void Lock(); - IMPORT_C void Unlock(); -protected: - IMPORT_C CApaFileRecognizerType(); - IMPORT_C ~CApaFileRecognizerType(); - IMPORT_C TThreadId AppRunL(const CApaCommandLine& aCommandLine) const; -private: - inline void SetAppStarter(MApaAppStarter* aAppStarter); // must be called before AppRunL() - virtual TRecognizedType DoRecognizeFileL(RFs& aFs,TUidType aUidType)=0; - TRecognizedType RecognizeFileL(RFs& aFs,const TDesC& aFullFileName,TUidType aUidType); - TBool Locked()const; - IMPORT_C virtual void Reserved_1(); -public: - IMPORT_C static CApaFileRecognizerType* CreateFileRecognizerL(TUid aImplUid); -protected: - CApaFileRecognizer* iFileRecognizer; - MApaAppStarter* iAppStarter; - HBufC* iFullFileName; - TUid iFileType; // type UID of the recognizer file (ie UID[1]) - TUid iAppUid; // UID of the associated app (ie UID[2]) - TRecognizedType iRecognizedType; - TApaAppCapabilityBuf* iCapabilityBuf; -private: - CApaFileRecognizerType* iNext; - TInt iLock; - CFileRecognizerExtension* iFileRecognizerExtn; -private: - friend class CApaFileRecognizer; - }; - - -// -// inlines -// - -inline void CApaFileRecognizer::SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter) - { aRecognizer->SetAppStarter(aAppStarter); } - -inline void CApaFileRecognizerType::SetAppStarter(MApaAppStarter* aAppStarter) - { iAppStarter = aAppStarter; } - -inline TUid CApaFileRecognizerType::AppUid() const - { return iAppUid; } - -inline TUid CApaFileRecognizerType::TypeUid() const - { return iFileType; } - -inline CApaFileRecognizerType::TRecognizedType CApaFileRecognizerType::Type()const - { return iRecognizedType; } - -inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand, const TDesC* aDocFileName) const - /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as third parameter. - @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */ - { return RunL(aCommand, aDocFileName, NULL); } - -inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand) const - /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as second and third parameter. - @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */ - { return RunL(aCommand, NULL, NULL); } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apaid.h --- a/epoc32/include/apaid.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,358 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APAID_H__ -#define __APAID_H__ - -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__APADEF_H__) -#include -#endif - -#include "apmstd.h" - - -// classes defined: -class TApaAppIdentifier; -class TApaAppEntry; -class CApaAppFinder; -// -// classes referenced: -class RReadStream; -class RWriteStream; -class RFs; -// - - -class TApaAppIdentifier -/** The identity of an application. - -An object of this type contains two pieces of information: - -The application specific UID - -The file name and extension of the application DLL - -All persisted documents associated with this application have a stream containing -this information. - -@publishedAll -@released -@see CApaProcess::ReadRootStreamLC() -@see CApaProcess::WriteRootStreamL() -@see CApaProcess::ReadAppIdentifierL() -@see CApaProcess::WriteAppIdentifierL() */ - { -public: - IMPORT_C TApaAppIdentifier(); - IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName); - IMPORT_C void ExternalizeL(RWriteStream& aStream)const; - IMPORT_C void InternalizeL(RReadStream& aStream); - -public: - /** The application-specific UID. */ - TUid iAppUid; - /** The full path name of the application DLL. */ - TFileName iFullName; - -private: - TInt iTApaAppIdentifier_Reserved1; - }; - - -class TApaAppEntry -/** An application entry. - -An object of this type contains two pieces of information: - -the full path name of the application DLL - -the UID type (or compound identifier) of the application DLL. - -@publishedAll -@released */ - { -public: - IMPORT_C TApaAppEntry(); - IMPORT_C TApaAppEntry(const TUidType& aAppUidType,const TFileName& aDllName); - IMPORT_C void ExternalizeL(RWriteStream& aStream)const; - IMPORT_C void InternalizeL(RReadStream& aStream); -public: - /** The UID type (or compound identifier) of the application DLL. */ - TUidType iUidType; - /** The full path name of the application DLL. */ - TFileName iFullName; -private: - TInt iTApaAppEntry_Reserved1; - }; - - -class TApaAppInfo -/** Application information. - -An object of this type contains four pieces of information: - -the application specific UID - -the full path name of the application DLL - -the application's caption - -a short caption; how this is used is up to the UI - -@publishedAll -@released */ - { -public: - IMPORT_C TApaAppInfo(); - IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption); - IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption); - IMPORT_C void ExternalizeL(RWriteStream& aStream)const; - IMPORT_C void InternalizeL(RReadStream& aStream); -public: - /** The application specific UID. */ - TUid iUid; - /** The full path name of the application DLL. */ - TFileName iFullName; - /** The caption for the application. */ - TApaAppCaption iCaption; - /** The short caption for the application. */ - TApaAppCaption iShortCaption; - -private: - TInt iTApaAppInfo_Reserved1; - }; - - -class TApaAppViewInfo -/** Contains the basic information about an application view. - -An object of this type contains two pieces of information: - -The UID that identifies the view - -The application's caption. - -Objects of this type are returned in an array populated by a call to RApaLsSession::GetAppViews(). - -@publishedAll -@released -@see CApaAppViewArray -@see TUid */ - { -public: - IMPORT_C TApaAppViewInfo(); - IMPORT_C TApaAppViewInfo(TUid aViewUid,const TApaAppCaption& aViewCaption,TInt aScreenMode); - IMPORT_C void ExternalizeL(RWriteStream& aStream)const; - IMPORT_C void InternalizeL(RReadStream& aStream); -public: - /** The UID identifying the view. */ - TUid iUid; - /** The application caption. */ - TApaAppCaption iViewCaption; - TInt iScreenMode; -private: - TInt iTApaAppViewInfo_Reserved1; - }; - - -/** Defines an array of TApaAppViewInfo objects contained within a flat dynamic -buffer. - -An array of this type is populated with TApaAppViewInfo objects in a call -to RApaLsSession::GetAppViews(). - -@publishedAll -@released */ -typedef CArrayFixFlat CApaAppViewArray; - - -class TApaAppCapability -// expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no. -// default value for all data members must be 0 -/** Application capabilities. - -@publishedAll -@released */ - { -public: - IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void Internalize7_0L(RReadStream& aStream); // deprecated - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; -private: - IMPORT_C void Externalize7_0L(RWriteStream& aStream) const; // deprecated - void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName); -public: - // - /** Defines an application's support for embeddability. */ - enum TEmbeddability { - /** An application cannot be embedded. */ - ENotEmbeddable=0, - /** An application can be run embedded or standalone and can read/write embedded document-content. */ - EEmbeddable=1, - /** An application can only be run embedded and can read/write embedded document-content. */ - EEmbeddableOnly=2, - /** An application can be run embedded or standalone and cannot read/write embedded document-content. */ - EEmbeddableUiOrStandAlone=5, - /** An application can only be run embedded and cannot read/write embedded document-content. */ - EEmbeddableUiNotStandAlone=6 }; - /** Defines an application's attributes as a set of bit flags. */ - enum TCapabilityAttribute - { - /** If set, the application was built as a DLL, otherwise it was built as an EXE. */ - EBuiltAsDll = 0x00000001, - /** If set, the application provides control panel functionality. */ - EControlPanelItem = 0x00000002, - /** If set, the application is not a native executable, and hence the "path" and "extension" (as well as the "name") must be provided in the app_file field of the APP_REGISTRATION_INFO resource. */ - ENonNative = 0x00000004 - }; -public: - /** Indicates the extent to which the application can be embedded. */ - TEmbeddability iEmbeddability; - /** Indicates whether the application is document-based and supports being asked - to create a new file. */ - TBool iSupportsNewFile; - /** Indicates whether the existence of the application should be advertised to the - user. If this is set to ETrue, the application does not appear on the Extras - Bar (or equivalent). */ - TBool iAppIsHidden; // not shown in the Shell etc. - /** Allows the application to be launched in the foreground (when set to EFalse) - or in the background (when set to ETrue). */ - TBool iLaunchInBackground; // Series 60 extension to allow apps to be launched in the background - /** Stores the application's logical group name. */ - TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' - /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ - TUint iAttributes; -private: - enum { EVersion=4 }; -private: - TInt iTApaAppCapability_Reserved1; - }; - -/** Packages the TApaAppCapability class. - -@publishedAll -@released */ -typedef TPckgBuf TApaAppCapabilityBuf; - - -/** Filter used to define the subset of applications returned by RApaLsSession::GetNextApp() - -@publishedAll -@released -*/ -class TApaEmbeddabilityFilter - { -public: - IMPORT_C TApaEmbeddabilityFilter(); - IMPORT_C void AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability); - IMPORT_C TBool MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const; -private: - TUint iEmbeddabilityFlags; -private: - TInt iTApaEmbeddabilityFilter_Reserved1; - }; - - -class CApaAppFinder : public CBase -/** -@publishedPartner -@deprecated -*/ - { -public: - virtual void FindAllAppsL()=0; // sets up a scan for all apps - virtual TBool NextL(TApaAppEntry& aEntry)=0; // increments a scan for all apps - virtual TFileName FindAppL(const TDesC& aFileName,TUid aFileUid)=0; // searches for a particular app - should support wildcards in aFileName - // - virtual TFileName DefaultAppInfoFileName()const=0; // should return the full name, path and drive of the default icon file -protected: - IMPORT_C CApaAppFinder(); - -private: - IMPORT_C virtual void CApaAppFinder_Reserved1(); - IMPORT_C virtual void CApaAppFinder_Reserved2(); - }; - -/** -The uid for the Open service. - -@publishedPartner -@released -*/ -const TUid KOpenServiceUid = { 0x10208DCA }; - -/** Application service information. - -Encapsulates a service UID and associated opaque data. - -An instance of this class provides information about -a specific implementation of the service identified by -the encapsulated service UID. - -@publishedPartner -@released -*/ -class TApaAppServiceInfo - { -public: - TApaAppServiceInfo(); - TApaAppServiceInfo(TUid aUid, CArrayFixFlat* aDataTypes, - HBufC8* aOpaqueData); - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); - void Release(); - CArrayFixFlat& DataTypes(); - IMPORT_C TUid Uid() const; - IMPORT_C const CArrayFixFlat& DataTypes() const; - IMPORT_C const TDesC8& OpaqueData() const; -private: - TUid iUid; - CArrayFixFlat* iDataTypes; - HBufC8* iOpaqueData; - TInt iTApaAppServiceInfo; - }; - -/** Application service information array. - -Owns an array of TApaAppServiceInfo objects. - -@see TApaAppServiceInfo -@publishedPartner -@released -*/ -class CApaAppServiceInfoArray : public CBase - { -protected: - CApaAppServiceInfoArray(); -public: - /** Provides access to the encapsulated array of - TApaAppServiceInfo objects. - - @return A generic array of TApaAppServiceInfo objects. */ - virtual TArray Array()=0; - -private: - IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1(); - IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2(); - -private: - TInt iCApaAppServiceInfoArray_Reserved1; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apamdr.h --- a/epoc32/include/apamdr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APAMDR_H__ -#define __APAMDR_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__GDI_H__) -#include -#endif -#if !defined(__APADBASE_H__) -#include -#endif - -// classes defined: -class TApaModelDoorFactory; -class CApaModelDoor; -class CApaModelHeader; -class MApaModelHeaderFactory; -// -// classes referenced: -class RReadStream; -class RWriteStream; -class CStreamStore; -class CStreamDictionary; -class CEmbeddedStore; -class TApaAppIdentifier; -// - - -class TApaModelDoorFactory : public MPictureFactory -// Recognizes KUidPictureTypeDoor and creates CApaModelDoor pictures -/** A factory class for instantiating and restoring an application's door using -the application's model. - -@publishedAll -@released */ - { -public: - IMPORT_C TApaModelDoorFactory(const MApaModelHeaderFactory* aFactory); - // - // from MPictureFactory - IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only -private: - const MApaModelHeaderFactory* iHeaderFactory; - TInt iTApaModelDoorFactory_Reserved1; - }; - - -class CApaModelDoor : public CApaDoorBase -/** A persistent representation of a door that also acts as a wrapper around an -application's model. - -The class allows embedded data to be manipulated without requiring the whole -associated application. - -@publishedAll -@released */ - { -public: - IMPORT_C static CApaModelDoor* NewL(CApaModelHeader* aHeader); - IMPORT_C static CApaModelDoor* NewLC(CApaModelHeader* aHeader); - IMPORT_C static CApaModelDoor* NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory); - // - /** Gets the application model wrapper object. - - @return A pointer to the application model wrapper object. */ - inline CApaModelHeader* ModelHeader() { return iModelHeader; } - - /** Sets the format of the door. - - @param aFormat The format for the graphical representation of the embedded - document. */ - inline void SetFormat(TFormat aFormat) { iFormat = aFormat; } - // - IMPORT_C TStreamId StoreL(CStreamStore& aStore) const; - IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory); - // - IMPORT_C ~CApaModelDoor(); - // - // from CPicture - IMPORT_C void DetachFromStoreL(TDetach /*aDegree*/=EDetachFull); //lint !e1735 Virtual function has default parameter - Inherited from CPicture, must be fixed there - IMPORT_C void ExternalizeL(RWriteStream& aStream)const; - IMPORT_C void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap)const; - IMPORT_C void GetOriginalSizeInTwips(TSize& aSize)const; - IMPORT_C void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); - IMPORT_C TInt ScaleFactorWidth()const; - IMPORT_C TInt ScaleFactorHeight()const; - // -private: - CApaModelDoor(); - CApaModelDoor(CApaModelHeader* aHeader); - // - static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aSourceStore,TStreamId aStreamId); - static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream); - void InternalizeModelL(const MApaModelHeaderFactory& aFactory); - // - // from CApaDoorBase - TSize GlassDoorSize()const; -private: - CApaModelHeader* iModelHeader; - CEmbeddedStore* iStore; - TSize iScaleFactor; - CBufSeg* iStoreHost; // the host for the embedded store, if the door has been detached from its originating store - }; - - -class CApaModelHeader : public CBase -// Abstract wrapper for an applications model - used for file format conversion etc -/** An interface class that acts as a wrapper for an application model. - -This is also known as an application model header. - -The class provides the knowledge for internalizing and externalizing an application -model's data. An instance of the class is used by CApaModelDoor. - -A concrete implementation of the class must be supplied by the application -model (not the application UI). An instance of the class is constructed by -a factory object that implements the MApaModelHeaderFactory interface; the -factory object is also supplied by the application model (not the application -UI). - -@publishedAll -@released -@see CApaModelDoor -@see TApaModelDoorFactory -@see MApaModelHeaderFactory */ - { -public: - /** Stores the model and its components in the specified store. - - @param aStore The store in which the model's components are to be stored. - @param aDict The stream dictionary into which stream IDs and associated UIDs - are put. */ - virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aDict) const=0; - /** Gets the identity of the application associated with the application model. - - @return The application identity. */ - virtual TApaAppIdentifier AppId()const=0; - /** Restores the model to the specified degree. - - An implementation of this function should propagate this call to all components - of the model. - - @param aDegree The degree to which restoration is needed. */ - virtual void DetachFromStoreL(CPicture::TDetach aDegree)=0; -protected: - IMPORT_C CApaModelHeader(); -private: - IMPORT_C virtual void Reserved_1(); - IMPORT_C virtual void Reserved_2(); -private: - TInt iCApaModelHeader_Reserved1; - }; - - - -class MApaModelHeaderFactory -/** An interface class that applications implement to construct an application model -wrapper object, also known as the application model header. - -@publishedAll -@released -@see CApaModelHeader */ - { -public: - /** Creates and returns an application model wrapper object. - - @param aStore The store containing model data. - @param aDict The stream dictionary. - @param aAppId The application's identity held as a stream in the application's - store - @return A pointer to the new application model wrapper object. */ - virtual CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,const TApaAppIdentifier& aAppId)const=0; -protected: - IMPORT_C MApaModelHeaderFactory(); -private: - IMPORT_C virtual void MApaModelHeaderFactory_Reserved1(); - IMPORT_C virtual void MApaModelHeaderFactory_Reserved2(); -private: - TInt iMApaModelHeaderFactory_Reserved1; - }; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apcaptionfile.rh --- a/epoc32/include/apcaptionfile.rh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Contains definitions for the resource files that are input to -// caption files for Series 60 -// -// - - - - -/** - @internalComponent -*/ -#define KMaxCaption 256 - -/** -@publishedAll -@released -*/ -STRUCT CAPTION_DATA - { - LTEXT caption(KMaxCaption)=""; - LTEXT shortcaption(KMaxCaption)=""; - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apgcli.h --- a/epoc32/include/apgcli.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,309 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__APGCLI_H__) -#define __APGCLI_H__ - -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__APMSTD_H__) -#include -#endif -#if !defined(__APMREC_H__) -#include -#endif -#if !defined(__APAID_H__) -#include -#endif -#if !defined(__BADESCA_H__) -#include -#endif -#if !defined(__F32FILE_H__) -#include -#endif - -// classes referenced -class CApaCommandLine; -class CApaMaskedBitmap; -class MArrayFiller; -class RFile; - -class CApaLsSessionExtension; - -class CDataRecognitionResultArrayEntry; -class CApaRegistrationResourceFileWriter; -class CApaLocalisableResourceFileWriter; - -/* @internalComponent -*/ -IMPORT_C TUint MinApplicationStackSize(); - -class CDataRecognitionResultArray : public CBase -/** -This class holds the recognition results of a recognized directory. -@publishedAll -@released -*/ - { -public: // exported functions - IMPORT_C CDataRecognitionResultArray(); - IMPORT_C virtual ~CDataRecognitionResultArray(); - IMPORT_C const TFileName& Path() const; - IMPORT_C TUint Count() const; - IMPORT_C void GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const; - IMPORT_C void GetFileNameL(TFileName& aFileName, const TUint aIndex) const; -public: // dll internally - TUint InternalizeL(const CBufFlat& aBuffer); - void SetPath(const TFileName& aPath); -private: - TFileName iPath; - RPointerArray iEntries; - }; - - - -//////////////////////////////////// -// RApaLsSession -//////////////////////////////////// - -class RApaLsSession : public RSessionBase -/** A session with the application architecture server. - -The server provides access to a cached list of the applications on the device. - -To use this class, clients first need to connect to the server. - -Then, one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps() needs to be called. -These functions do some initialisation of server data in preparation for returning the -application list (which is owned by the server). - -Then, GetNextApp() is called in a loop. The first time around, it populates the session's -application list and retrieves the first application in the list. Further calls to GetNextApp() -retrieve the remaining applications in the list, until RApaLsSession::ENoMoreAppsInList is -returned. - -The session should be closed when it is no longer needed, before it goes out of scope. - -Various functions in RApaLsSession need to access the application list, and may return -RApaLsSession::EAppListInvalid to indicate that the function was called before the initial -population of the list is complete. If this occurs, you could try again after a short delay. - -This class provides many other functions, for instance launching applications, querying -application-specific information, recognising data. - -@publishedAll -@released */ - { - friend class CApaLsSessionExtension; -public: - enum { - /** A possible return value from GetNextApp(), to indicate that there are no more - applications in the list. */ - ENoMoreAppsInList=1, - /** Indicates that an RApaLsSession member function was called before the session's - application list is fully populated. */ - EAppListInvalid - }; - /** Defines the way an application is launched. */ - enum TLaunchType { - /** Launches a new instance of the application. */ - ELaunchNewApp=1, - /** Launches a new instance of the application if no existing instance of the application - is running. If an instance of the application is already running, then it - is brought to the foreground. */ - ESwitchFiles - }; - -public: - IMPORT_C RApaLsSession(); - // - IMPORT_C TInt Connect(); - IMPORT_C TVersion Version() const; - // - IMPORT_C TInt AppCount(TInt& aCount) const; // returns error - IMPORT_C TInt EmbeddableAppCount(TInt& aCount) const; // returns error - // - IMPORT_C TInt GetAllApps() const; // Call to initialize - IMPORT_C TInt GetAllApps(TInt aScreenMode) const; // Call to initialize - IMPORT_C TInt GetEmbeddableApps() const; // Call to initialize - IMPORT_C TInt GetEmbeddableApps(TInt aScreenMode) const; // Call to initialize - // 7.0s - IMPORT_C TInt GetFilteredApps(const TApaEmbeddabilityFilter& aFilter) const; // Call to initialize - IMPORT_C TInt GetFilteredApps(const TApaEmbeddabilityFilter& aFilter, TInt aScreenMode) const; // Call to initialize - // 8.1 - IMPORT_C TInt GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue) const; // Call to initialize - IMPORT_C TInt GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue, TInt aScreenMode) const; // Call to initialize - // 9.0 - IMPORT_C TInt GetServerApps(TUid aServiceUid) const; // Call to initialize - IMPORT_C TInt GetServerApps(TUid aServiceUid, TInt aScreenMode) const; // Call to initialize - // - IMPORT_C TInt GetNextApp(TApaAppInfo& aInfo) const; // call repeatedly, returns err (inc ENoMoreAppsInList,EAppListInvalid) - IMPORT_C TInt GetNextApp(TApaAppInfo& aInfo,TInt aScreenMode) const; // call repeatedly, returns err (inc ENoMoreAppsInList,EAppListInvalid) - // - IMPORT_C TInt GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const; - IMPORT_C TInt SetAppShortCaption(const TDesC& aShortCaption, TLanguage aLanguage, TUid aAppUid); - IMPORT_C TInt GetDefaultScreenNumber(TInt& aDefaultScreenNumber, TUid aAppUid) const; - -public: - IMPORT_C TInt GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const; - IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine); // This is only recommended for non document based apps - IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId); - IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId,TRequestStatus* aRequestStatusForRendezvous); - // - IMPORT_C TInt RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const; - IMPORT_C TInt RecognizeData(const RFile& aFile, TDataRecognitionResult& aDataType) const; - IMPORT_C TInt RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const; - IMPORT_C TInt RecognizeSpecificData(const RFile& aFile, const TDataType& aDataType, TBool& aResult) const; - // - IMPORT_C TInt AppForDataType(const TDataType& aDataType, TUid& aAppUid) const; - IMPORT_C TInt StartDocument(const TDesC& aFileName, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); - IMPORT_C TInt StartDocument(RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); - IMPORT_C TInt StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); - IMPORT_C TInt StartDocument(RFile& aFile, const TDataType& aDataType, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); - IMPORT_C TInt StartDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); - IMPORT_C TInt StartDocument(RFile& aFile, TUid aAppUid, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); - IMPORT_C TInt CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); - // - IMPORT_C TInt GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const; - // - IMPORT_C TInt AppForDocument(const TDesC& aFileName, TUid& aAppUid, TDataType& aDataType) const; - IMPORT_C TInt AppForDocument(const RFile& aFile, TUid& aAppUid, TDataType& aDataType) const; - IMPORT_C TInt IsProgram(const TDesC& aFileName, TBool& aProgram) const; - IMPORT_C TInt GetAcceptedConfidence(TInt& aConfidence) const; - IMPORT_C TInt SetAcceptedConfidence(TInt aConfidence); - IMPORT_C TInt GetMaxDataBufSize(TInt& aBufSize) const; - IMPORT_C TInt SetMaxDataBufSize(TInt aBufSize); - IMPORT_C TInt GetPreferredBufSize(TInt& aPreferredBufSize) const; - IMPORT_C TInt GetSupportedDataTypesL(CDataTypeArray& aDataTypes) const; - // - IMPORT_C TInt GetAppIconSizes(TUid aAppUid, CArrayFixFlat& aArrayToFill) const; - IMPORT_C TInt GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const; - IMPORT_C TInt GetAppIcon(TUid aAppUid, RFile& aFile) const; - // - IMPORT_C TInt GetAppViews(CApaAppViewArray& aAppViews, TUid aAppUid) const; - IMPORT_C TInt GetAppViewIcon(TUid aAppUid, TUid aViewUid, const TSize& aSize, CApaMaskedBitmap& aViewBitmap) const; - IMPORT_C TInt GetAppOwnedFiles(CDesCArray& aAppOwnedFiles, TUid aAppUid) const; - // - IMPORT_C TInt NumberOfOwnDefinedIcons(TUid aAppUid, TInt& aCount) const; - // - IMPORT_C TInt GetAppIcon(TUid aAppUid, HBufC*& aFullFileName) const; - IMPORT_C TInt GetAppViewIcon(TUid aAppUid, TUid aViewUid, HBufC*& aFullFileName) const; - IMPORT_C TInt InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); - IMPORT_C TInt InsertDataMappingIfHigher(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TBool& aInserted); - IMPORT_C TInt DeleteDataMapping(const TDataType& aDataType); - /** - @internalComponent - @released - */ - IMPORT_C TInt InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, - TUid aUid, TUid aServiceUid); - /** - @internalComponent - @released - */ - IMPORT_C TInt DeleteDataMapping(const TDataType& aDataType, TUid aServiceUid); - /** - @internalComponent - @released - */ - IMPORT_C TInt GetAppByDataType(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const; - -public: - // - IMPORT_C CApaAppServiceInfoArray* GetAppServicesLC(TUid aAppUid) const; - IMPORT_C CApaAppServiceInfoArray* GetServiceImplementationsLC(TUid aServiceUid) const; - IMPORT_C CApaAppServiceInfoArray* GetServiceImplementationsLC(TUid aServiceUid, const TDataType& aDataType) const; - IMPORT_C void GetAppServicesL(TUid aAppUid, CArrayFixFlat& aServiceUids) const; - IMPORT_C CApaAppServiceInfoArray* GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const; - IMPORT_C TInt AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const; - IMPORT_C TInt AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const; - IMPORT_C TInt AppForDocumentAndService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const; - IMPORT_C TInt ApplicationLanguage(TUid aAppUid, TLanguage& aLanguage) const; - IMPORT_C void Close(); //lint !e1511 Member hides non-virtual member - - IMPORT_C void RegisterListPopulationCompleteObserver(TRequestStatus& aStatus) const; - IMPORT_C TInt CancelListPopulationCompleteObserver() const; - IMPORT_C TInt MatchesSecurityPolicy(TBool& aMatches, TUid aAppUid, const TSecurityPolicy& aSecurityPolicy) const; - IMPORT_C TInt RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult) const; - IMPORT_C void RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); - IMPORT_C TInt RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult) const; - IMPORT_C void RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); - IMPORT_C void CancelRecognizeFiles(); - - IMPORT_C void RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable); - IMPORT_C void DeregisterNonNativeApplicationTypeL(TUid aApplicationType); - IMPORT_C void PrepareNonNativeApplicationsUpdatesL(); - IMPORT_C void RegisterNonNativeApplicationL(TUid aApplicationType, const TDriveUnit& aDrive, CApaRegistrationResourceFileWriter& aRegistrationResourceFile, CApaLocalisableResourceFileWriter* aLocalisableResourceFile, const RFile* aIconFile); - IMPORT_C void DeregisterNonNativeApplicationL(TUid aApplication); - IMPORT_C void CommitNonNativeApplicationsUpdatesL(); - IMPORT_C TInt RollbackNonNativeApplicationsUpdates(); - IMPORT_C void NotifyOnDataMappingChange(TRequestStatus& aRequestStatus); - IMPORT_C void CancelNotifyOnDataMappingChange(); - IMPORT_C TInt GetAppType(TUid& aTypeUid, TUid aAppUid) const; - - IMPORT_C TInt ForceRegistration(const RPointerArray& aRegFiles); - -public: - // not for public use - IMPORT_C static void SetFsSessionL(RFs& aFsSession); - IMPORT_C static void ClearFsSession(); - IMPORT_C static RFs* FsSession(); - IMPORT_C void SetNotify(TBool aCompleteImmediatelyIfNoScanImpendingOrInProgress, TRequestStatus& aStatus); - IMPORT_C void CancelNotify(); - -private: // Reserved for future use - IMPORT_C virtual void RApaLsSession_Reserved1(); - IMPORT_C virtual void RApaLsSession_Reserved2(); - -public: - /** - @publishedPartner - @released - */ - IMPORT_C void ForceCommitNonNativeApplicationsUpdatesL(); - -private: - void DoGetAppOwnedFilesL(CDesCArray& aArrayToFill, TUid aAppUid) const; - void DoGetAppViewsL(CApaAppViewArray& aArrayToFill, TUid aAppUid) const; - void DoGetAppIconSizesL(TUid aAppUid, CArrayFixFlat& aArrayToFill) const; - TInt DoAppCount(TInt& aCount,TInt aCommand) const; - void FetchArrayL(MArrayFiller& aArrayFiller,TUid aAppUid, TInt aOpcode, TInt aInitialBufSize) const; - CBufBase* GetServiceBufferLC(TInt aOpcode, TUid aUid1, TUid aUid2=KNullUid) const; - TInt StartAndCreate(TInt aRqst,const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType); - CBufBase* GetServiceBufferLC(TInt aOpcode, TUid aUid1, const TDataType& aDataType) const; - TInt SendReceiveWithReconnect(TInt aFunction,const TIpcArgs& aIpcArgs) const; - TInt TransferAndInternalizeDataL(const TDesC& aPath, const TInt aRequiredBufferSize, CDataRecognitionResultArray& aResult) const; - TInt GetExecutableName(TDes& aNativeExecutableName, TDes& aLogicalExecutableName, HBufC8*& aOpaqueData, TIpcArgs& aIpcArgs, TInt aOpcode) const; - TInt GetOpaqueData(HBufC8*& aOpaqueData, TInt aLengthOfOpaqueData) const; - TInt StartApplicationPassingFileHandle(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); - TInt StartApplicationPassingDocumentName(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const TDesC& aDocumentName, TThreadId& aThreadId,TApaCommand aCommand, TRequestStatus* aRequestStatusForRendezvous); - void StartApplicationL(const TDesC& aNativeExecutableName, const CApaCommandLine& aCommandLine, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); - TInt DoAppForDocumentOptionallySpecifyingService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const; - TInt DoAppForDocumentOptionallySpecifyingService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const; - TInt GetBufferFromFile(HBufC8*& aBuffer, const TDesC& aFileName) const; - TInt DoStartApp(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous); - void DoStartAppL(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous); - static void GetThreadIdL(TThreadId& aThreadId, const RProcess& aProcess); - static void DeletePointerToPointerToTAny(TAny* aPointerToPointerToTAny); - static CBufFlat* CreateRegFilesBufferL(const RPointerArray& aRegFiles); - static void CleanupOperation(TAny* aAny); - -private: // data - CApaLsSessionExtension* iExtension; // friend! - }; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apgctl.h --- a/epoc32/include/apgctl.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,160 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APGCTL_H__ -#define __APGCTL_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif - -// classes defined: -class CApaSystemControl; -class CApaSystemControlList; -// -// classes referenced: -class RFs; -class CApaMaskedBitmap; -// - -/** -Calls the control DLL's first ordinal function to create and run the control. - -The function leaves with KErrBadLibraryEntryPoint if the ordinal 1 function -cannot be found. - -@publishedAll -@released -*/ -typedef TInt (*ApaRunSystemControl)(const TDesC&); - -/** -@publishedAll -@released -*/ -#ifdef _UNICODE -#define KUidSystemControlDll KUidSystemControlDll16 -#else -#define KUidSystemControlDll KUidSystemControlDll8 -#endif - -/** -@publishedAll -@deprecated -*/ -const TInt KSystemControlDllUidValue8=0x10000297; - -/** -@publishedAll -@deprecated -*/ -const TUid KUidSystemControlDll8={KSystemControlDllUidValue8}; - -/** -@publishedAll -@released -*/ -const TUid KUidSystemControlDll16={0x10003A34}; - - -class CApaSystemControl : public CBase -/** Wrapper to a control panel application. - -An instance of the class represents a control panel application. It is also a cache for the control's icon and caption. - -An instance of the wrapper can only be constructed by the control panel application list, which -is a CApaSystemControlList object. - -@publishedAll -@released */ - { -public: - IMPORT_C void CreateL(); - IMPORT_C TUid Type()const; - IMPORT_C TFileName FileName()const; - IMPORT_C CApaMaskedBitmap* Icon()const; // one size of icon, 48x48? - IMPORT_C TPtrC Caption()const; - IMPORT_C TPtrC ShortCaption()const; -private: - static CApaSystemControl* NewL(RFs& aFs,const TDesC& aFullPath,const TUidType aUidType); - ~CApaSystemControl(); - - CApaSystemControl(RFs& aFs); - void ConstructL(const TDesC& aFullPath,const TUidType aUidType); -private: - CApaSystemControl* iNext; - HBufC* iCaption; - HBufC* iShortCaption; - CApaMaskedBitmap* iIcon; - TBool iExists; // used during updating - TFileName iFullPath; - TUidType iUidType; - RFs& iFs; - - friend class CApaSystemControlList; - }; - - - -class CApaSystemControlList : public CBase -/** Provides a list of all available control panel applications present on the phone. -This class is implemented as a linked list of CApaSystemControl. Updates the control panel application list by removing -control panels that no longer exist, adding new control panels found to the control panel application list and replacing -a control panel if found in an earlier drive. - -@see CApaSystemControl -@publishedPartner -@released -*/ - { -public: - IMPORT_C static CApaSystemControlList* NewL(RFs& aFs); - IMPORT_C ~CApaSystemControlList(); - - IMPORT_C TInt Count()const; - IMPORT_C TInt Index(TUid aType)const; - IMPORT_C CApaSystemControl* Control(TInt aIndex)const; - IMPORT_C CApaSystemControl* Control(TUid aType)const; - - IMPORT_C void UpdateL(); - inline TInt UpdateCount()const; -private: - CApaSystemControlList(RFs& aFs); - CApaSystemControl* PreviousControl(const CApaSystemControl* aControl) const; -private: - TInt iUpdateCount; - RFs& iFs; - CApaSystemControl* iControl; - }; - - -// -// inlines -// - - -inline TInt CApaSystemControlList::UpdateCount()const -/** Gets the number of times the control panel application list has been -updated (by calling UpdateL()). It returns 1 for a newly created list. - -@return The number of times the control panel application list has been changed. */ - { return iUpdateCount; } - - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apgdoor.h --- a/epoc32/include/apgdoor.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APGDOOR_H__ -#define __APGDOOR_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__S32STD_H__) -#include -#endif -#if !defined(__GDI_H__) -#include -#endif -#if !defined(__APPARC_H__) -#include -#endif -#if !defined(__APADBASE_H__) -#include -#endif - -/** -@internalAll -*/ -#ifdef _UNICODE -#define KUidApaDoorDocStream KUidApaDoorDocStream16 -#else -#define KUidApaDoorDocStream KUidApaDoorDocStream8 -#endif - -/** -@internalComponent -@deprecated -*/ -const TUid KUidApaDoorDocStream8={0x10000144}; - -/** -@internalComponent -*/ -const TUid KUidApaDoorDocStream16={0x10003A35}; - -// classes defined: -class CApaDoor; -class TApaPictureFactory; -// -// classes referenced: -class CEmbeddedStore; -// - -class CApaDoor : public CApaDoorBase -/** A wrapper for an embedded document that can be displayed in a user interface -as an icon or a glass door. - -@publishedAll -@released */ - { -public: - IMPORT_C static CApaDoor* NewLC(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); // call to create a new door in iconic format - restoration is achieved with TApaPictureFactory - IMPORT_C static CApaDoor* NewL(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); // call to create a new door in iconic format - restoration is achieved with TApaPictureFactory - IMPORT_C static CApaDoor* NewL(RFs& aFs, const CStreamStore& aStore,TStreamId aStreamId,CApaProcess& aProcess); // restoring constructor called by TApaPictureFactory - // - IMPORT_C void SetFormatToIconL(); - IMPORT_C void SetFormatToGlassL(); - IMPORT_C void SetFormatToTemporaryIconL(TBool aEnabled=ETrue); - // - IMPORT_C CApaDocument* DocumentL(TBool aCheckPassword=EFalse); // returns a pointer to the doc, restoring it if necessary. Checks password if required. - inline TDesC* Caption()const; - IMPORT_C TUid AppUidL()const; - // - // persistence methods - IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId); - TStreamId StoreL(CStreamStore& aStore) const; - // - IMPORT_C ~CApaDoor(); - // - // from CPicture - void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect, - MGraphicsDeviceMap* aMap)const; // draws according to current iPicFormat - void DetachFromStoreL(TDetach aDegree=EDetachFull); //lint !e1735 Virtual function has default parameter - Must use the same default as declared by CPicture - void GetOriginalSizeInTwips(TSize& aSize)const; - void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); - void SetCropInTwips(const TMargins& aMargins); - TPictureCapability Capability() const; - void GetCropInTwips(TMargins& aMargins) const; - TInt ScaleFactorWidth() const; - TInt ScaleFactorHeight() const; -private: - CApaDoor(RFs& aFs, CApaProcess& aProcess); - CApaDoor(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); - void ConstructL(); - // - void SetIconSizeInTwips(TSize aSize); // for use of factory - // - void StoreDocL(CPersistentStore& aStore)const; - void RestoreDocL(const CPersistentStore& aStore); - void RestoreDoorStateL(const CStreamStore& aStore,const CStreamDictionary& streamDic); - static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aStore,TStreamId aStreamId); - static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream); - void ExternalizeStateStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const; - void InternalizeStateStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict,TSize aDefaultIconSize); - // - // required so CPicture's can be swizzled - void ExternalizeL(RWriteStream& aStream)const; - // from CApaDoorBase - virtual TSize GlassDoorSize()const; - TUid AppUidFromStreamL() const; -private: - RFs& iFs; - HBufC* iAppCaption; // name of the app used to create the embedded object - CApaProcess* iApaProcess; - CApaDocument* iApaDoc; - CPicture* iPicture; // the current view of the door, either iconic or glass - CEmbeddedStore* iStore; // store containing the doc - CBufSeg* iStoreHost; // the host for the embedded store, if the door has been detached from its originating store - __MUTABLE TSize iIconSizeInTwips; - // - friend class TApaPictureFactory; - }; - - -class TApaPictureFactory : public MPictureFactory -// Recognizes KUidPictureTypeDoor and creates CApaDoor pictures -/** A factory class for instantiating and restoring an application's door. - -A door factory object is constructed by the UI environment and can be accessed -by calling CEikonEnv::PictureFactory(). - -@publishedAll -@released -@see CEikonEnv::PictureFactory() -@see CApaDoor */ - { -public: - IMPORT_C TApaPictureFactory(CApaProcess* aAppProcess); - inline void SetIconSize(TSize aIconSizeInTwips); - // - // from MPictureFactory - IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only -protected: - IMPORT_C TApaPictureFactory(); - -private: - CApaProcess* iApaProcess; - TSize iIconSize; - TInt iSpare; - }; - - -// -// inlines -// - -inline TDesC* CApaDoor::Caption()const - /** Gets the name of the application with which the embedded document is associated. - - @return A pointer to a descriptor containing the name of the application. */ - { return iAppCaption; } - -inline void TApaPictureFactory::SetIconSize(TSize aIconSizeInTwips) - /** Sets the size of the icon. - - @param aIconSizeInTwips The size of the icon, in twips. */ - { iIconSize = aIconSizeInTwips; } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apgicnfl.h --- a/epoc32/include/apgicnfl.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,561 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APGICNFL_H__ -#define __APGICNFL_H__ - -#include -#include -#include -#include -#include - -class CFbsBitmap; -class CPersistentStore; -class RReadStream; -class RWriteStream; - -class CApaMaskedBitmap : public CFbsBitmap -/** An application icon. - -This is a bitmap and a mask, managed by the Font and Bitmap server. - -An object of this type is passed to RApaLsSession::GetAppIcon() to fetch a -suitable application icon. - -@publishedAll -@released -@see RApaLsSession::GetAppIcon() */ - { -public: - IMPORT_C static CApaMaskedBitmap* NewLC(); - IMPORT_C static CApaMaskedBitmap* NewL(const CApaMaskedBitmap* aSourceIcon); - // - IMPORT_C CFbsBitmap* Mask() const; - IMPORT_C void InternalizeL(RReadStream& aStream); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation - IMPORT_C void ExternalizeL(RWriteStream& aStream) const;//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation - // - IMPORT_C ~CApaMaskedBitmap(); - void SetRomBitmapL(TUint8* aRomPointer); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation - IMPORT_C void SetMaskBitmap(CFbsBitmap* aMask); -private: - CApaMaskedBitmap(); - void ConstructL(); -private: - CFbsBitmap* iMask; - }; - -/** -@internalComponent -*/ -class CApaResourceFileWriterBase : public CBase - { -protected: - class RBufferSink; - class MDataSink - { - public: - void WriteBufferL(const TDesC8& aBuffer); - void WriteCompressedUnicodeRunL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aTextAsCompressedUnicode); - void WriteInCompressedUnicodeFormatL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aData, TBool aInCompressedUnicodeRun); - TInt NumberOfBytesWhenUncompressed() const; - inline TBool CompressedUnicodeFormat() const {return (iBufferSinkForCompressedUnicodeFormat!=NULL);} - protected: - MDataSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat); - void FlushL(TBool aFinalFlush); - void Reset(TInt& aNumberOfBytesWhenUncompressed); - private: - void WriteRunLengthL(TInt aRunLength); - private: - enum - { - EFlag_InCompressedUnicodeRun =0x00000001 - }; - private: - // new virtual functions - virtual void DoWriteBufferL(const TDesC8& aBuffer)=0; - private: - TInt iNumberOfBytesWhenUncompressed; - TUint iFlags; - RBufferSink* iBufferSinkForCompressedUnicodeFormat; // does not own what it points to - }; - class RBufferSink : public MDataSink - { - public: - RBufferSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat); - void ConstructLC(); - void Close(); - void FlushAndGetAndResetL(TInt& aNumberOfBytesWhenUncompressed, RBuf8& aBuffer); - private: - // from MDataSink - virtual void DoWriteBufferL(const TDesC8& aBuffer); - private: - RBuf8 iBuffer; - }; -protected: - CApaResourceFileWriterBase(); - void DoGenerateFileContentsL(RBuf8& aBuffer, TUid aUid2, TUid aUid3) const; - void WriteUidTypeL(MDataSink& aDataSink, TUid aUid2, TUid aUid3) const; - void WriteTextL(MDataSink& aDataSink, const TDesC& aText) const; - void WriteText8L(MDataSink& aDataSink, const TDesC8& aText8) const; - void WriteUint8L(MDataSink& aDataSink, TUint aUint8) const; - void WriteLittleEndianUint16L(MDataSink& aDataSink, TUint aUint16) const; - void WriteLittleEndianUint32L(MDataSink& aDataSink, TUint aUint32) const; - void WriteBufferL(MDataSink& aDataSink, const TDesC8& aBuffer) const; -private: - static HBufC8* AsCompressedUnicodeLC(const TDesC& aUncompressedUnicode); - void MainResourceInCompiledFormatLC(TInt& aMainResourceSizeInBytesWhenUncompressed, RBuf8& aBuffer, TBool aCompressedUnicodeFormat) const; -private: - // new virtual functions - virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const=0; - virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const=0; - }; - -/** -Used to support the registration of non-native applications. - -The task of this class is to generate the resource files expected by the Apparc server. Applications -that register other applications can use functions of this class to customise the generated resource files. - -@publishedPartner -@released -*/ -class CApaRegistrationResourceFileWriter : public CApaResourceFileWriterBase - { -public: - IMPORT_C static CApaRegistrationResourceFileWriter* NewL(TUid aAppUid, const TDesC& aAppFile, TUint aAttributes); - IMPORT_C virtual ~CApaRegistrationResourceFileWriter(); - TUid AppUid() const; - void GenerateFileContentsL(RBuf8& aBuffer) const; - void SetLocalisableResourceFileL(const TDesC& aLocalisableResourceFile); - IMPORT_C void SetAppIsHiddenL(TBool aAppIsHidden); - IMPORT_C void SetEmbeddabilityL(TApaAppCapability::TEmbeddability aEmbeddability); - IMPORT_C void SetSupportsNewFileL(TBool aSupportsNewFile); - IMPORT_C void SetLaunchInBackgroundL(TBool aLaunchInBackground); - IMPORT_C void SetGroupNameL(const TDesC& aGroupName); - IMPORT_C void SetDefaultScreenNumberL(TInt aDefaultScreenNumber); - IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData); - IMPORT_C void AddDataTypeL(TInt aPriority, const TDesC8& aType); - IMPORT_C void AddFileOwnershipInfoL(const TDesC& aFileName); -// Not needing to be supported for the foreseeable future: -// IMPORT_C void AddServiceInfoL(TUid aServiceUid, const TDesC8* aOpaqueData); -// IMPORT_C void AddServiceInfoDataTypeL(TUid aServiceUid, TInt aPriority, const TDesC8& aType); -private: - struct SDataType // DATATYPE - { - TInt iPriority; - HBufC8* iType; - }; - struct SFileOwnershipInfo // FILE_OWNERSHIP_INFO - { - HBufC* iFileName; - }; -private: - CApaRegistrationResourceFileWriter(TUid aAppUid, TUint aAttributes); - void ConstructL(const TDesC& aAppFile); - void WriteDataTypeL(MDataSink& aDataSink, const SDataType& aDataType) const; - void WriteFileOwnershipInfoL(MDataSink& aDataSink, const SFileOwnershipInfo& aFileOwnershipInfo) const; - // from CApaResourceFileWriterBase - virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const; - virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const; -private: - TUid iAppUid; - HBufC* iAppFile; - TUint iAttributes; - HBufC* iLocalisableResourceFile; - TBool iAppIsHidden; - TApaAppCapability::TEmbeddability iEmbeddability; - TBool iSupportsNewFile; - TBool iLaunchInBackground; - HBufC* iGroupName; - TInt iDefaultScreenNumber; - HBufC8* iOpaqueData; - RArray iDataTypeList; - RArray iFileOwnershipList; - }; - -/** -@internalAll -*/ -class CApaLocalisableResourceFileWriter : public CApaResourceFileWriterBase - { -public: - IMPORT_C static CApaLocalisableResourceFileWriter* NewL(const TDesC& aShortCaption, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aGroupName); - IMPORT_C virtual ~CApaLocalisableResourceFileWriter(); - void GenerateFileContentsL(RBuf8& aBuffer) const; - void SetIconFileL(const TDesC& aIconFile); -// Not needing to be supported for the foreseeable future: -// IMPORT_C void AddViewDataL(TUid aViewUid, TInt aScreenMode, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aIconFile); -private: - struct SCaptionAndIconInfo // CAPTION_AND_ICON_INFO - { - HBufC* iCaption; - TInt iNumberOfIcons; - HBufC* iIconFile; - }; -private: - CApaLocalisableResourceFileWriter(TInt aNumberOfIcons); - void ConstructL(const TDesC& aShortCaption, const TDesC& aCaption, const TDesC& aGroupName); - void WriteCaptionAndIconInfoL(MDataSink& aDataSink, const SCaptionAndIconInfo& aCaptionAndIcon) const; - // from CApaResourceFileWriterBase - virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const; - virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const; -private: - HBufC* iShortCaption; - SCaptionAndIconInfo iCaptionAndIcon; - HBufC* iGroupName; - }; - -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - -class CApaAppInfoFileWriter; - -/** -@internalAll -*/ -const TUid KUidInterimFormatFileForJavaMIDletInstaller={0x10208182}; - -/** -@internalAll -*/ -class ForJavaMIDletInstaller - { -public: - IMPORT_C static void CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile); - IMPORT_C static void GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet); - IMPORT_C static CApaAppInfoFileWriter* NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet); - }; - -#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER - -#if (((defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)) || defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)) - -#if !defined(IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER) -// we're compiling a source file that doesn't define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER, so give it it's default "value" of "IMPORT_C" -#define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER IMPORT_C -#endif - -/** -@publishedAll -@deprecated -*/ -#ifdef _UNICODE -#define KUidAppInfoFile KUidAppInfoFile16 -#else -#define KUidAppInfoFile KUidAppInfoFile8 -#endif - -/** -@publishedAll -@deprecated -*/ -const TUid KUidAppInfoFile8={268435562}; - -/** -@publishedAll -@deprecated -*/ -const TUid KUidAppInfoFile16={0x10003A38}; - -/** -@internalComponent -*/ -const TUid KUidAppInfoFileVersion2={0x101fb032}; - -/** -@internalComponent -*/ -enum TAifVersion -// The order here is important, only ever APPEND to the list - { - EAifVersionOriginal, - EAifVersionAddsDataType, - EAifVersionAddsViewData, - EAifVersionAddsFileOwnershipInfo -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - ,EAifVersionAddsJavaMIDletInfo -#endif - }; - -class CApaAIFCaption : public CBase -// -// Represents a caption in an AIF during reading and writing of the file. -/** -@internalComponent -*/ - { -public: - ~CApaAIFCaption(); - CApaAIFCaption(); - void ConstructL(TLanguage aLanguage,const TDesC& aCaption); - static CApaAIFCaption* NewLC(TLanguage aLanguage,const TDesC& aCaption); - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - TLanguage Language() const; - TApaAppCaption Caption() const; -public: - HBufC* iCaption; - TLanguage iLanguage; - }; - -class CApaAIFViewData : public CBase -// -// Represents the data associated with an application view described in an AIF -// during reading and writing of the file. -// implementation class -/** -@internalComponent -*/ - { -public: - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage) const; - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* IconByIndexL(TInt aIndex) const; - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfIcons() const; - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid ViewUid() const; - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt ScreenMode() const; -public: - ~CApaAIFViewData(); - static CApaAIFViewData* NewLC(); - static CApaAIFViewData* NewLC(const CApaAIFViewData& aSourceData); - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - void SetScreenMode(TInt aScreenMode); - void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption); - void AddIconL(CApaMaskedBitmap& aIcon); - void AddIconIndexL(TInt aIndex); - void SetViewUid(TUid aUid); - void LoadIconsL(const TDesC& aFileName, TUint aMbmOffset); -private: - CApaAIFViewData(); - void ConstructL(); - void ConstructL(const CApaAIFViewData& aSourceData); -private: - TInt iScreenMode; - CArrayPtr* iIconArray; - CArrayPtr* iCaptionArray; - TUid iViewUid; - CArrayFixFlat* iIconIndexArray; // used for AIF version 2 format - }; - -class CApaAppInfoFile : public CBase -/** -@internalComponent -*/ - { -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - friend class ForJavaMIDletInstaller; -#endif -public: - ~CApaAppInfoFile(); - // -protected: - CApaAppInfoFile(RFs& aFs); - void ConstructL(); -protected: - - class TCaptionHeader - { - public: - void InternalizeL(RReadStream& aStream); // internalizes the header info only - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only - public: - TSwizzle iCaption; - TLanguage iLanguage; - }; - class TIconHeader - { - public: - void InternalizeL(RReadStream& aStream); // internalizes the header info only - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only - public: - TSwizzle iIcon; // Used for old AIF format Internalize - TInt iIconSideInPixels; - TSwizzle iIconMain; // Used for new AIF format - TSwizzle iIconMask; // Used for new AIF format - }; - class TDataTypeHeader - { - public: - // header info only - void InternalizeL(RReadStream& aStream); // internalizes the header info only - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only - public: - TSwizzle iDataType; - TDataTypePriority iPriority; - }; - class TViewDataHeader - { - public: - void InternalizeL(RReadStream& aStream); // internalizes the header info only - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only - public: - TSwizzle iViewData; - }; - class TFileOwnershipInfoHeader - { - public: - void InternalizeL(RReadStream& aStream); // internalizes the header info only - void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only - public: - TSwizzle iOwnedFileName; - }; -protected: - RFs& iFs; - CPersistentStore* iStore; - CArrayFix* iCaptionHeaderArray; - CArrayFix* iIconHeaderArray; - CArrayFix* iDataTypeHeaderArray; - CArrayFix* iViewDataHeaderArray; - CArrayFix* iFileOwnershipInfoHeaderArray; - TApaAppCapability iCapability; - }; - -class CApaAppInfoFileReader : public CApaAppInfoFile -/** Aif file reader. - -Aif files contain information about an application, including its icons and -captions. - -An application can get a reader for its own aif file by calling CEikApplication::OpenAppInfoFileLC(). - -@publishedAll -@deprecated */ - { -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - friend class ForJavaMIDletInstaller; -#endif -public: - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewL(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid); - // - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void Capability(TDes8& aInfo) const; - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage); - - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapL(TInt aIconSideInPixels); // If there are no bitmaps in the file this method leaves with KErrNotFound - // Not available until ER6 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapByIndexLC(TInt aIndex); // If there are no bitmaps in the file this method leaves with KErrNotFound - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfBitmaps() const; - - // Not available till ER5 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void DataTypesSupportedL(CArrayFix& aTypeList) const; - // - - // Not available till ER6.1 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetViewsL(CArrayPtr& aViewList) const; - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetOwnedFilesL(CDesCArray& aOwnedFilesList) const; - // - - // utility function - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels); - // - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER ~CApaAppInfoFileReader(); -public: - static void GetAifFileNameL(const TDesC& aFullName,TDes& aAifName); -private: - CApaAppInfoFileReader(RFs& aFs); - void InternalizeL(RReadStream& aStream); - void ConstructL(const TDesC& aFileName,TUid aUid); - void LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid); - void AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons); -private: - HBufC* iDefaultCaption; - TUint8* iRomPointer; - TInt iMbmOffset; - HBufC* iAifFileName; -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - TUint32 iJavaMIDletInfo_AmsAuthId; - TInt iJavaMIDletInfo_MIDlet; -#endif - }; - -class CApaAppInfoFileWriter : public CApaAppInfoFile -/** -Aif file writer. - -This class writes application information, including icons and captions into the aif file. - -@publishedAll -@deprecated */ - { -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - friend class ForJavaMIDletInstaller; -#endif -public: - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileWriter* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid); - // - IMPORT_C TInt SetCapability(const TDesC8& aInfo); - IMPORT_C void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddIconL(const TDesC& aIconFileName); - IMPORT_C void AddIconL(CApaMaskedBitmap& aIcon); - - // Not available till ER5 - IMPORT_C void AddDataTypeL(const TDataTypeWithPriority& aTypePriority); - // - - // Not available till ER6.1 - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid,TInt aScreenMode); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewUid); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewUid); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void StoreViewL(TUid aViewId); - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddOwnedFileL(const TDesC& aOwnedFileName); - // - - IMPORT_C void StoreL(); - // - IMPORT_C ~CApaAppInfoFileWriter(); -private: - CApaAppInfoFileWriter(RFs& aFs); - void ExternalizeL(RWriteStream& aStream) const; - void ConstructL(const TDesC& aFileName,TUid aUid -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - ,TUid aMiddleUid=KUidAppInfoFile,TUint32 aJavaMIDletInfo_AmsAuthId=0,TInt aJavaMIDletInfo_MIDlet=0 -#endif - ); -private: - CStoreMap* iMap; -#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) - TUint32 iJavaMIDletInfo_AmsAuthId; - TInt iJavaMIDletInfo_MIDlet; -#endif - }; - -class CApaAppCaptionFileReader : public CBase -/** -@internalComponent -*/ - { -public: - CApaAppCaptionFileReader(RFs& aFs,const TDesC& iAppFileName); - void GetCaptionsL(TApaAppCaption& aCaption,TApaAppCaption& aShortCaption); -private: - RFs& iFs; - TFileName iCaptionFileName; - }; - -class AppInfoFileUtils -// Internal utilities providing helper functions for non-ROM localisation -/** -@internalComponent -*/ - { -public: // For internal use only - IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void GetAifFileName(const RFs& aFs,TDes& aAifName); -public: - static void GetAifFileNameL(const RFs& aFs,const TDesC& aFullName,TDes& aAifName); - }; -#endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1) - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apgtask.h --- a/epoc32/include/apgtask.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APGTASK_H__ -#define __APGTASK_H__ - -#include -#include - -class RWsSession; -struct TKeyEvent; - -/** @internalTechnology */ -static const TInt KApaSystemEventsWithPowerMgmtCapabilityStart = 100; -/** @internalTechnology */ -static const TInt KApaSystemEventsWithPowerMgmtCapabilityEnd = 199; - -/** Defines the event types that a TApaTask object can send to its window group. - -The events are sent by TApaTask::SendSystemEvent() and are handled by CEikAppUi::HandleSystemEventL(). - -@publishedAll -@released -@see TApaTask::SendSystemEvent() -@see CEikAppUi -@see CCoeAppUi::HandleSystemEventL() */ -enum TApaSystemEvent - { - /** The task is being closed. */ - EApaSystemEventShutdown=1, - /** Reserved for future use. */ - EApaSystemEventBackupStarting, - /** Reserved for future use. */ - EApaSystemEventBackupComplete, - /** The task is being brought to the foreground. */ - EApaSystemEventBroughtToForeground, - /** Close any tasks including system tasks. - Events in the range @c KApaSystemEventsWithPowerMgmtCapabilityStart to - @c KApaSystemEventsWithPowerMgmtCapabilityEnd requires capability PowerMgmt*/ - EApaSystemEventSecureShutdown = KApaSystemEventsWithPowerMgmtCapabilityStart - }; - -#ifdef _UNICODE -/** -@publishedAll -@released -*/ -#define KUidApaMessageSwitchOpenFile KUidApaMessageSwitchOpenFile16 - -/** -@publishedAll -@released -*/ -#define KUidApaMessageSwitchCreateFile KUidApaMessageSwitchCreateFile16 - -/** -@publishedAll -@released -*/ -#define KUidApaMessageSwitchOpenFileValue KUidApaMessageSwitchOpenFileValue16 - -/** -@publishedAll -@released -*/ -#define KUidApaMessageSwitchCreateFileValue KUidApaMessageSwitchCreateFileValue16 -#else -#define KUidApaMessageSwitchOpenFile KUidApaMessageSwitchOpenFile8 -#define KUidApaMessageSwitchCreateFile KUidApaMessageSwitchCreateFile8 -#define KUidApaMessageSwitchOpenFileValue KUidApaMessageSwitchOpenFileValue8 -#define KUidApaMessageSwitchCreateFileValue KUidApaMessageSwitchCreateFileValue8 -#endif - -/** -@internalComponent -*/ -const TInt KUidApaMessageSwitchOpenFileValue16=0x10003A39; - -/** -@internalComponent -*/ -const TUid KUidApaMessageSwitchOpenFile16={KUidApaMessageSwitchOpenFileValue16}; - -/** -@internalComponent -*/ -const TInt KUidApaMessageSwitchCreateFileValue16=0x10003A3A; - -/** -@internalComponent -*/ -const TUid KUidApaMessageSwitchCreateFile16={KUidApaMessageSwitchCreateFileValue16}; - -class TApaTask -/** Application task. - -A task is a running application. At any one time, for any given application, -there may be zero, one, or more tasks running on a device. - -A task is identified by its association with the running application's window -group. - -An instance of the TApaTaskList class is used to find and access specific -tasks. - -@publishedAll -@released -@see TApaTaskList -@see RWindowGroup -@see RWsSession */ - { -public: - - IMPORT_C TApaTask(RWsSession& aWsSession); - IMPORT_C void SetWgId(TInt aWgId); - IMPORT_C TInt WgId() const; - IMPORT_C TBool Exists() const; - IMPORT_C TThreadId ThreadId() const; - IMPORT_C void BringToForeground(); - IMPORT_C void SendToBackground(); - IMPORT_C void EndTask(); - IMPORT_C void KillTask(); - IMPORT_C void SendKey(TInt aKeyCode,TInt aModifiers); - IMPORT_C void SendKey(const TKeyEvent& aKey); - IMPORT_C void SendSystemEvent(TApaSystemEvent aEvent); - IMPORT_C TInt SwitchOpenFile(const TDesC& aFilename); - IMPORT_C TInt SwitchCreateFile(const TDesC& aFilename); - IMPORT_C TInt SendMessage(TUid aUid, const TDesC8& aParams); - -private: - TInt CheckSwitchFile() const; - void SendSystemEvent(TApaSystemEvent aEvent, TEventCode aType); -private: - RWsSession& iWsSession; - TInt iWgId; - TInt iTApaTask_Reserved1; - }; - -class TApaTaskList -/** Accesses tasks running on a device. - -Tasks can be identified by document, application specific UID or by caption -name. - -Users of this class can also cycle through a set of tasks running a specific -application, bringing each one, in turn, into the foreground. - -@publishedAll -@released -@see TApaTask */ - { -public: - /** Defines the direction in which tasks are cycled to the foreground. This is used - by the CycleTasks() function. - - @see TApaTaskList::CycleTasks() */ - enum TCycleDirection - { - /** Cycles the task list forwards, i.e. the foreground task is moved to background, - bringing the next foremost task to the foreground. */ - EForwards, - /** Cycles the list backwards, i.e. the task furthest from the foreground is brought - to the foreground, pushing what was the foremost task to the next ordinal - position. */ - EBackwards - }; -public: - IMPORT_C TApaTaskList(RWsSession& aWsSession); - IMPORT_C TApaTask FindApp(const TDesC& aAppName); - IMPORT_C TApaTask FindDoc(const TDesC& aDocName); - IMPORT_C TApaTask FindByPos(TInt aPos); - IMPORT_C TApaTask FindApp(TUid aAppUid); - IMPORT_C TInt CycleTasks(TUid aAppUid,TCycleDirection aDirection=EForwards); - -private: - void FindByPosL(TApaTask& aTask,TInt aPos); -private: - RWsSession& iWsSession; - TInt iTApaTaskList_Reserved1; - }; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apgwgnam.h --- a/epoc32/include/apgwgnam.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__APGWGNAM_H__) -#define __APGWGNAM_H__ - -#if !defined(__W32STD_H__) -#include -#endif - -class CApaWindowGroupName : public CBase -/** Gives access to the name of a window group and the information encoded by that -name. - -A window group is associated with a task, i.e. a running application. The -window group's name encodes four pieces of information for that task: - -the name of the document that the task is handling, - -the task's caption, - -the application specific UID, as eight hexadecimal characters, - -status information for the task, as two hexadecimal characters. - -@publishedAll -@released */ - { -public: - enum { EMaxLength=13+2*KMaxFileName }; -public: - IMPORT_C ~CApaWindowGroupName(); - IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession); - IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession); - IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, TInt aWgId); - IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, TInt aWgId); - IMPORT_C static CApaWindowGroupName* New(const RWsSession& aWsSession, HBufC* aWgName); - IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, const TDesC& aWgName); - IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, const TDesC& aWgName); - IMPORT_C void ConstructFromWgIdL(TInt aWgId); - // - IMPORT_C void SetWindowGroupNameL(const TDesC& aWgName); - IMPORT_C void SetWindowGroupName(HBufC* aWgName); - // - IMPORT_C static void FindByAppUid(TUid aAppUid, RWsSession& aWsSession, TInt& aPrevWgId); - IMPORT_C static void FindByCaption(const TDesC& aCaption, RWsSession& aWsSession, TInt& aPrevWgId); - IMPORT_C static void FindByDocName(const TDesC& aDocName, RWsSession& aWsSession, TInt& aPrevWgId); - // - IMPORT_C void SetBusy(TBool aBusy); - IMPORT_C TBool IsBusy() const; - IMPORT_C void SetSystem(TBool aSystem); - IMPORT_C TBool IsSystem() const; - IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile); - IMPORT_C TBool DocNameIsAFile() const; - IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent); - IMPORT_C TBool RespondsToShutdownEvent() const; - IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent); - IMPORT_C TBool RespondsToSwitchFilesEvent() const; - IMPORT_C void SetHidden(TBool aIsHidden); - IMPORT_C TBool Hidden() const; - IMPORT_C void SetAppReady(TBool aIsReady); - IMPORT_C TBool IsAppReady() const; - // - IMPORT_C void SetAppUid(TUid aAppUid); - IMPORT_C TUid AppUid() const; - // - IMPORT_C void SetCaptionL(const TDesC& aCaption); - IMPORT_C TPtrC Caption() const; - // - IMPORT_C void SetDocNameL(const TDesC& aDocName); - IMPORT_C TPtrC DocName() const; - // - IMPORT_C TInt SetWindowGroupName(RWindowGroup& aGroupWin) const; - IMPORT_C TPtrC WindowGroupName() const; -private: //enums - enum TApaStatus { ESystem =0x01, EBusy =0x02, EDocNameNotAFile =0x04 - ,EDoesNotRespondToShutdownEvent=0x08, EDoesNotRespondToSwitchFilesEvent=0x10 - ,EIsHidden=0x20, EAppReady=0x40 }; - enum TApaDelimiter { EEndStatus=1, EEndUid, EEndCaption, ELast=EEndCaption }; // ELast must be last and same as predecessor -private: - CApaWindowGroupName(const RWsSession& aWsSession); - // - void DefaultConstructL(); - void WriteStatusToName(); - void GetStatusFromName(); - TInt FindDelimiter(TApaDelimiter aDelim) const; - void ReAllocIfNecessaryL(TInt aExtraLengthReqd); -private: - HBufC* iBuf; - TUint iStatus; - const RWsSession& iWsSession; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/btmsgtypeuid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/btmsgtypeuid.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// $Workfile: btmsgtypeuid.h $ +// $Author: Stevep $ +// $Revision: 8 $ +// $Date: 17/12/01 12:02 $ +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#if !defined (__BTMSGTYPEUID_H__) +#define __BTMSGTYPEUID_H__ + +const TInt32 KUidMsgTypeBtTInt32 = 0x10009ED5; +const TUid KUidMsgTypeBt = {KUidMsgTypeBtTInt32}; +const TInt32 KUidBtTechnologyGroup = 0x10009ED6; //used for BtMtm registration details ("\\system\\mtm\\IrMtm.dat") + +#endif // __BTMSGTYPEUID_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cacheman.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cacheman.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,295 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__CACHEMAN_H__) +#define __CACHEMAN_H__ + +#include +#include +#include + +_LIT(KMiutWildCard, "*.*"); + +class CImFinder : public CMsgActive +/** +@internalComponent +@released +*/ + { +public: + IMPORT_C void FindFirstL(TMsvId aRootEntry, TRequestStatus &aStatus); + IMPORT_C ~CImFinder(); + IMPORT_C virtual void FindNextL(TRequestStatus &aStatus); + void FindFirstL(const CMsvEntrySelection& aInitialSelection, TRequestStatus &aStatus); + + class CImEntryStack : public CBase + { + public: + static CImEntryStack* NewL(); + ~CImEntryStack(); + inline void PushL(TMsvId aId); + inline TMsvId PopL(); + inline TBool Empty() const; + inline void Reset(); + + private: + void ConstructL(); + + CMsvEntrySelection* iFolders; + }; + +protected: + void ConstructL(); + CImFinder(CMsvEntry& aEntry); + +private: + void DoRunL(); + + virtual void AddChildEntriesL() = 0; + virtual TBool IsRequiredEntryType(TUid aEntryType) const = 0; + +protected: + CImEntryStack* iEntryStack; + CMsvEntry& iCurrentEntry; + +private: + enum TImmfState + { + EImmfEntryFound, + EImmfFindingEntry, + EImmfNothingFound + }; + + TImmfState iState; + }; + + +class CImMessageFinder : public CImFinder +/** +@internalComponent +@released +*/ + { +public: + IMPORT_C static CImMessageFinder* NewL(CMsvEntry& aEntry); + IMPORT_C static CImMessageFinder* NewLC(CMsvEntry& aEntry); + +protected: + virtual void AddChildEntriesL(); + virtual TBool IsRequiredEntryType(TUid aEntryType) const; + + CImMessageFinder(CMsvEntry& aEntry); + }; + + +class CImEntryFinder : public CImFinder +/** +@internalComponent +@released +*/ + { +public: + IMPORT_C static CImEntryFinder* NewL(CMsvEntry& aEntry); + IMPORT_C static CImEntryFinder* NewLC(CMsvEntry& aEntry); + +protected: + virtual void AddChildEntriesL(); + virtual TBool IsRequiredEntryType(TUid aEntryType) const; + + CImEntryFinder(CMsvEntry& aEntry); + }; + + +class CImMessageCounter : public CImFinder +/** +@internalComponent +@released +*/ + { +public: + IMPORT_C static CImMessageCounter* NewL(CMsvEntry& aEntry); + IMPORT_C static CImMessageCounter* NewLC(CMsvEntry& aEntry); + IMPORT_C TInt Count(); + +protected: + virtual void AddChildEntriesL(); + virtual TBool IsRequiredEntryType(TUid aEntryType) const; + + CImMessageCounter(CMsvEntry& aEntry); + +private: + TInt iCount; + }; + + +class CImPruneMessage : public CMsgActive +/** Deletes the body text and attachment data from an individually specified message. + +Example uses of this class are: + +1. to cleanup after a populating operation has failed + +2. to remove body text and attachment data from remote messages, while preserving +the message structure +@publishedPartner +@released +*/ + { +public: + IMPORT_C static CImPruneMessage* NewL(CMsvEntry& aEntry, RFs& aFs); + IMPORT_C static CImPruneMessage* NewLC(CMsvEntry& aEntry, RFs& aFs); + + IMPORT_C void StartL(TMsvId aMessageEntry, TRequestStatus &aStatus); + ~CImPruneMessage(); + +private: + CImPruneMessage(CMsvEntry& aEntry, RFs& aFs); + void ConstructL(); + void DoRunL(); + void DoComplete(TInt& ); + void DoCancel(); + void PruneEntryL(); + void ResetStoreL(); + +private: + enum TImPruningState + { + EImPruneUpdatingEntry, + EImPruneUpdatingFirstEntry, + EImPruneFindingEntry, + EImPruneFindFirstEntry, + EImPruneFindNextEntry + }; + + TImPruningState iState; + + CMsvEntry& iCurrentEntry; + RFs& iFs; + CImEntryFinder* iEntryFinder; + CFileMan* iFileManager; + TMsvId iRootEntryId; + CMsvOperation* iChangeOperation; + CMsvStore* iStore; + }; + +struct TImCacheManagerProgress +/** Holds progress of a cache management cleanup operation. + +@see CImCacheManager::ProgressL() +@publishedAll +@released +*/ + { +public: + /** Total number of messages to process. + + Note that, immediately after a CImCacheManager object is started, the progress + operation may return 1 for iTotalMessages and 0 for iMessagesProcessed, regardless + of the total number of messages. This is because the counter for the iTotalMessages + operates asynchronously and may not have counted all of the messages at that + time. */ + TInt iTotalMessages; + /** Number of messages processed so far. */ + TInt iMessagesProcessed; + }; + +class CImCacheManager : public CMsvOperation +/** Provides management of the local cache of messages in remote mailboxes. + +A mailbox that is being used in disconnected mode allows the user access to +message data by opening the message directly from the remote mailbox. If the +required message has been downloaded previously, then it will not necessarily +need to be downloaded again. This functionality is achieved by preserving +the message data locally, under the remote service entry. The preserved message +data acts as a cache to allow the user access to the message without the need +for it to be downloaded every time. + +The cache management functionality is required to reduce the amount of memory +that is consumed by the message cache. CImCacheManager provides a mechanism +for asynchronously traversing a message tree and for removing text and attachment +data from messages. Deleting more message data will free up more memory but +there is a higher chance that a user will need to download a message for a +second time. + +CImCacheManager is an abstract base class, which can be specialised to implement +a filter (Filter()) that decides if data for a message shoulded be deleted: +for example, deletion could be restricted to 'all read messages over a week +old,' or, 'all read messages, over 20K in size which are also over a day old.' +@publishedAll +@released +*/ + { +public: + IMPORT_C void StartL(TMsvId aRootEntry, TRequestStatus &aStatus); + IMPORT_C void StartL(const CMsvEntrySelection& aSelection, TRequestStatus &aStatus); + IMPORT_C ~CImCacheManager(); + IMPORT_C const TDesC8& ProgressL(); + IMPORT_C void DoCancel(); + +protected: + IMPORT_C void ConstructL(); + IMPORT_C CImCacheManager(CMsvSession& aSession, TRequestStatus& aObserverRequestStatus); + + IMPORT_C void RunL(); + +private: + // Override this function to filter the currently selected message (iCurrentEntry). + // Return TRUE if the current entry is to be pruned. + /** Tests if cache cleanup should be performed on a message entry. + + After StartL() has been called, this is called once for each message entry. + It should return true if the body text and attachment data belonging to the + current message, as held in iCurrentEntry, should be deleted, or false if + the message should be left unchanged. + + This function must be implemented in any classes derived from CImCacheManager. + + @return True to clean the entry, false to leave it unchanged */ + virtual TBool Filter() const = 0; + + void DoRunL(); + + // Remove the store from the currently selected entry + inline void PruneMessageL(); + +protected: + /** Message entry currently being processed. */ + CMsvEntry* iCurrentEntry; + +private: + CMsvSession& iSession; + CImMessageFinder* iMessageFinder; + CImMessageCounter* iMessageCounter; + CMsvOperation* iDeleteOperation; + + TImCacheManagerProgress iProgress; + TRequestStatus* iReport; + + enum TImcmState + { + EImcmLookingForMessage, + EImcmPruningMessages, + EImcmCountingMessages, + EImcmSkippingPrune + }; + + TMsvId iRootEntry; + TImcmState iState; + TPckgBuf iProgressBuf; + + CMsvEntrySelection* iMessagesToPrune; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calalarm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calalarm.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,58 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALALARM_H__ +#define __CALALARM_H__ + +#include + +/** Alarm category Id for Calendar alarms +@publishedAll +@released +*/ +const TUid KUidAgendaModelAlarmCategory = { 0x101F4A70 }; + +NONSHARABLE_CLASS(CCalAlarm) : public CBase +/** Class representing an alarm. contains associated data extensions + +This can be assigned to a calendar entry. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CCalAlarm* NewL(); + IMPORT_C ~CCalAlarm(); + IMPORT_C void SetTimeOffset(TTimeIntervalMinutes aOffset); + IMPORT_C TTimeIntervalMinutes TimeOffset() const; + IMPORT_C void SetAlarmSoundNameL(const TDesC& aAlarmSoundName); + IMPORT_C const TDesC& AlarmSoundNameL() const; + IMPORT_C void SetAlarmAction(CCalContent* aAlarmAction); + IMPORT_C CCalContent* AlarmAction() const; + +private: + CCalAlarm(); + +private: + TTimeIntervalMinutes iOffset; + HBufC* iAlarmName; + // the associated data for rich alarm action + CCalContent* iAlarmAction; + }; + + +#endif // __CALALARM_H__ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calcategory.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calcategory.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALCATEGORY_H__ +#define __CALCATEGORY_H__ + +#include + +class CCalCategoryImpl; + +/** Calendar categories can be associated with a calendar entry. + +There are 12 built in category types defined by TCalCategoryType. Additionally, +it is possible to define extended category types which are held as a descriptor +of any length. + +Any number of categories can be specified for an entry. CCalEntry provides member +functions for adding, deleting and fetching categories for an entry. + +CCalCategoryManager functions enable the client to add\\delete\\fetch categories +from a Calendar session and to get a list of entries filtered by their category. +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalCategory) : public CBase + { +public: + /** Calendar category type. + @publishedAll + @released + */ + enum TCalCategoryType + { + /** Appointment */ + ECalAppointment, + /** Business */ + ECalBusiness, + /** Education */ + ECalEducation, + /** Holiday */ + ECalHoliday, + /** Meeting */ + ECalMeeting, + /** All other types */ + ECalMiscellaneous, + /** Personal */ + ECalPersonal, + /** Phone call */ + ECalPhoneCall, + /** Sick day */ + ECalSickDay, + /** Special occasion */ + ECalSpecialOccasion, + /** Travel */ + ECalTravel, + /** Vacation */ + ECalVacation, + /** Extended */ + ECalExtended + }; + +public: + IMPORT_C static CCalCategory* NewL(TCalCategoryType aCategory); + IMPORT_C static CCalCategory* NewL(const TDesC& aExtendedName); + IMPORT_C ~CCalCategory(); + + IMPORT_C TCalCategoryType Category() const; + IMPORT_C const TDesC& ExtendedCategoryName() const; + +public: + CCalCategoryImpl* Impl() const; + static CCalCategory* NewL(CCalCategoryImpl* aImpl); + +private: + CCalCategory(); + CCalCategory(CCalCategoryImpl* aImpl); + void ConstructL(TCalCategoryType aCategory); + void ConstructL(const TDesC& aExtendedName); + +private: // member data + CCalCategoryImpl* iCalCategoryImpl; + }; + +#endif // __CALCATEGORY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calcategorymanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calcategorymanager.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALCATEGORYMANAGER_H__ +#define __CALCATEGORYMANAGER_H__ + +#include + +class MCalProgressCallBack; +class CCalCategory; +class CCalEntry; +class CCalCategoryManagerImpl; +class CCalSession; + +/** A category manager used to manipulate the categories held by the Calendar store. + +There are 12 built-in category types which are specified by CCalCategory::TCalCategoryType. +In addition, clients can create as many of their own categories as they like by giving a name to the category. +This class is used along with the class CCalCategory to manipulate the categories in the file, for instance to +add, delete and get a list of entries filtered by their category. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalCategoryManager) : public CBase + { +public: + + IMPORT_C static CCalCategoryManager* NewL(CCalSession& aSession); + IMPORT_C ~CCalCategoryManager(); + + IMPORT_C TInt CategoryCountL() const; + IMPORT_C CCalCategory* CategoryL(TInt aIndex) const; + IMPORT_C void AddCategoryL(const CCalCategory& aCategory); + IMPORT_C void FilterCategoryL(const CCalCategory& aCategory, RPointerArray& aEntries, MCalProgressCallBack& aProgressCallBack); + IMPORT_C void FilterCategoryL(const CCalCategory& aCategory, RPointerArray& aEntries); + IMPORT_C void DeleteCategoryL(const CCalCategory& aCategory, MCalProgressCallBack& aProgressCallBack); + +private: + CCalCategoryManager(); + void ConstructL(CCalSession& aSession); + +private: + CCalCategoryManagerImpl* iCCalCategoryManagerImpl; + }; + +#endif // __CALCATEGORYMANAGER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calchangecallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calchangecallback.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,172 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALCHANGECALLBACK_H__ +#define __CALCHANGECALLBACK_H__ + +#include + +class TCalChangeEntry; + +class MCalChangeCallBack +/** A call back class for observing changes in the model view. + +A client will not be notified of a change if it is the source of +the change. + +@publishedAll +@deprecated +*/ + { +public: + /** Instance view change type + @publishedAll + @deprecated + */ + enum TChangeType + { + /** Entries are added */ + EChangeAdd, + /** Entries are deleted */ + EChangeDelete, + /** Entries are modified */ + EChangeModify, + /** Undefined entries */ + EChangeUndefined, + /** Entries cause overflow error */ + EChangeOverflowError + }; + + /** Instance view entry type + @publishedAll + @deprecated + */ + enum TChangeEntryType + { + /** Entry type is todo */ + EChangeEntryTodo, + /** Entry type is event */ + EChangeEntryEvent, + /** All entry types */ + EChangeEntryAll + }; + /** A call back function for change notification + @param aChangeEntryType Filters notifications to only notify about entries of this type (event/todo/all). + + */ + virtual void CalChangeNotification(TChangeEntryType aChangeEntryType) = 0; + }; + +/** A call back class for observing changes in the model view. + +The call back returns an array containing information about at least +one change to the database. The information includes the type of change +and the identity of the item being changed. + +A client will not be notified of a change if it is the source of +the change. + +@publishedAll +@released +*/ +class MCalChangeCallBack2 + { +public: + /** Instance view change type + @publishedAll + @released + */ + enum TChangeType + { + /** Entries are added */ + EChangeAdd, + /** Entries are deleted */ + EChangeDelete, + /** Entries are modified */ + EChangeModify, + /** Undefined entries */ + EChangeUndefined + }; + + /** Instance view entry type + @publishedAll + @released + */ + enum TChangeEntryType + { + /** Entry type is todo */ + EChangeEntryTodo, + /** Entry type is event */ + EChangeEntryEvent, + /** All entry types */ + EChangeEntryAll + }; + /** A call back function for change notification + @param aChangeItems List of changes since the last notification. + + */ + virtual void CalChangeNotification(RArray& aChangeItems) = 0; + }; + +/** Struct for storing change notification data. +This contains the calendar local ID, the type of change and the entry type. + +The iChangeType will only be set to EChangeEntryTodo or EChangeEntryEvent +values. EChangeEntryAll is provided for callback registration only. + +If iChangeType is EChangeUndefined or EChangeOverflowError, iEntryId and +iEntryType are undefined and should not be used by clients. + +@publishedAll +@released +*/ +struct TCalChangeEntry + { + /** Local UID of the entry */ + TCalLocalUid iEntryId; + /** Type of change to the entry */ + MCalChangeCallBack2::TChangeType iChangeType; + /** Type of entry */ + MCalChangeCallBack2::TChangeEntryType iEntryType; + }; + +/** Class to encapsulate call back registration parameters. + +The type of entries, the date range and whether undated todos are included +can be specified. + +@publishedAll +@released +*/ +class CCalChangeNotificationFilter + { +public: + IMPORT_C static CCalChangeNotificationFilter* NewL(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange); + IMPORT_C ~CCalChangeNotificationFilter(); + + MCalChangeCallBack2::TChangeEntryType ChangeEntryType() const; + TCalTime StartTime() const; + TCalTime EndTime() const; + TBool IncludeUndatedTodos() const; + +private: + CCalChangeNotificationFilter(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange); + + MCalChangeCallBack2::TChangeEntryType iChangeEntryType; + CalCommon::TCalTimeRange iTimeRange; + TBool iIncludeUndatedTodos; + }; + +#endif // __CALCHANGECALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calcommon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calcommon.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,230 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALCOMMON_H__ +#define __CALCOMMON_H__ + +#include + +/** This system-wide #define is for version 2 of the Calendar component. +V1 is the CalInterimAPI. V2 is the refactored Calendar component which includes +support for Attachments, GEO, TRANSP, instance iterator, extended text searching. +@publishedAll +@released +*/ +#define SYMBIAN_CALENDAR_V2 + +/** Calendar local entry ID. +This entry ID is assigned by the calendar server when an entry is created. +It will remain unchanged for the lifetime of that entry. +@publishedAll +@released +*/ +typedef TUint32 TCalLocalUid; + +/** Calendar file ID. +@publishedAll +@released +*/ +typedef TInt64 TCalFileId; + +/** Utility class containing common calendar-related enums. + +@publishedAll +@released +*/ +class CalCommon + { +public: + + /** Entry filter used in the entry view and instance view, filter flags are defined by TCalViewFilterFlags + @publishedAll + @released + */ + typedef TUint TCalViewFilter; + + /** Entry filter flags used in the entry view and instance view. + @publishedAll + @released + */ + enum TCalViewFilterFlags + { + /** Include appointments. */ + EIncludeAppts=0x01, + /** Include reminders. */ + EIncludeReminder=0x02, + /** Include all-day events. */ + EIncludeEvents=0x04, + /** Include anniversaries. */ + EIncludeAnnivs=0x08, + /** Include completed todos. */ + EIncludeCompletedTodos=0x10, + /** Include incompleted todos. */ + EIncludeIncompletedTodos=0x20, + /** Remove non-alarmed entries. This flag cannot be used by itself. */ + EIncludeAlarmedOnly=0x40, + /** Include next only instance of a repeat entry. */ + EIncludeRptsNextInstanceOnly=0x80, + + /** By default all instances which overlap the time range are found. Use the EInstanceStartTimeWithinRange + flag to only include instances whose start time is inside the search time range. + + Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will + only include instances which are completely within the search time range. */ + EInstanceStartTimeWithinRange=0x100, + + /** By default all instances which overlap the time range are found. Use the EInstanceEndTimeWithinRange + flag to only include instances whose end time is inside the search time range. + + Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will + only include instances which are completely within the search time range. + */ + EInstanceEndTimeWithinRange=0x200, + + /** By default all instances which adjoin the search range are found. Use the EExcludeInstanceAdjoiningRange + flag to exclude instances that are outside, but adjoin the search range. + + Instances that are outside, but adjoin the search start or end time are excluded. + Instances that both start and end on the search start time are included. + Instances that both start and end on the search end time are excluded. + */ + EExcludeInstanceAdjoiningRange=0x400, + + /** Include all entries (appointments, day events, reminders, anniversaries and todos). */ + EIncludeAll=EIncludeAppts|EIncludeReminder|EIncludeEvents|EIncludeAnnivs| + EIncludeCompletedTodos|EIncludeIncompletedTodos, + }; + + /** The range of instances referred to in a recurrence ID or instance view. + @publishedAll + @released + */ + enum TRecurrenceRange + { + /** Only this instance is referenced. + If the user set EThisOnly when a repeating child entry is created and stored to the file, only the parent instance + referred to by the child's recurrence ID will be replaced. */ + EThisOnly, + /** This and all other instances are referenced. */ + EThisAndAll, + /** This and all future instances are referenced. */ + EThisAndFuture, + /** This and all previous instances are referenced. */ + EThisAndPrior + }; + + + /** Search filter for use in the CCalInstanceView::FindInstanceL() function. + Note that a folded text search is used if exact text search is not specified. + The summary text field is always searched. It is possible to specify additional text fields to be + searched as well. + @publishedAll + @released + */ + enum TCalSearchBehaviour + { + /** Search for folded text. */ + EFoldedTextSearch=0x0, + + /** Search for the exact text. */ + EExactTextSearch=0x1, + + /** Search location during a text search. + @publishedPartner + @released + */ + ESearchEntryLocation=0x2, + + /** Search description during a text search. + @publishedPartner + @released + */ + ESearchEntryDescription=0x4, + + /** Search attendee addresses during a text search. + @publishedPartner + @released + */ + ESearchAttendeeAddress=0x8, + + /** Search attendee sent by addresses during a text search. + @publishedPartner + @released + */ + ESearchAttendeeSentByAddress=0x10, + + /** Search attendee common names during a text search. + @publishedPartner + @released + */ + ESearchAttendeeCommonName=0x20, + + /** Search organizer's address during a text search. + @publishedPartner + @released + */ + ESearchOrganizerAddress=0x40, + + /** Search organizer's sent by address during a text search. + @publishedPartner + @released + */ + ESearchOrganizerSentByAddress=0x80, + + /** Search organizer's common name during a text search. + @publishedPartner + @released + */ + ESearchOrganizerCommonName=0x100, + + /** Include all possible text fields during a text search. */ + ESearchAllTextFields=ESearchEntryLocation|ESearchEntryDescription| + ESearchAttendeeAddress|ESearchAttendeeSentByAddress|ESearchAttendeeCommonName| + ESearchOrganizerAddress|ESearchOrganizerSentByAddress|ESearchOrganizerCommonName, + }; + + /** Class to implement a time range in the Instance view and Entry view. + @publishedAll + @released + */ + class TCalTimeRange + { + public: + IMPORT_C TCalTimeRange(TCalTime aStartTime, TCalTime aEndTime); + + IMPORT_C TCalTime StartTime() const; + IMPORT_C TCalTime EndTime() const; + + private: + TCalTime iStartTime; + TCalTime iEndTime; + }; + + /** Enumeration returned when opening a file to indicate whether the file is the current version, + needs converting, or is unsupported. + @publishedPartner + @released + */ + enum TCalFileVersionSupport + { + /** The file is the current version and can be loaded immediately. */ + EFileIsCurrentVersion, + /** The file is an older version and will be converted when it is used. */ + EFileNeedsConverting, + /** The file is an old version that is not supported. */ + EUnsupportedFileVersion + }; + }; +#endif // __CALCOMMON_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calcontent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calcontent.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALCONTENT_H__ +#define __CALCONTENT_H__ + +#include + +class RReadStream; +class RWriteStream; +class CAgnContent; + +NONSHARABLE_CLASS(CCalContent) : public CBase +/** +This class holds in memory 8-bit data of any type, or a link to 8-bit +data such as a URI. The MIME type of the data may also be held to help +callers determine the appropriate application to launch the content. + +Because the data is held in memory, callers should only use this class +to store small amounts of data or a URI to some content elsewhere. + +This class can be used to set an alarm action using +CCalAlarm::SetAlarmAction() (such as a link to an internet +radio station, or a small animated icon). + +@see CCalAlarm +@capability None +@publishedAll +@released +*/ + { +public: + /** Disposition of the data which maybe used while setting an alarm. The data can be a link or inline. + @publishedPartner + @released + */ + enum TDisposition + { + /** URL disposition */ + EDispositionUrl = 0, + /** Inline disposition */ + EDispositionInline = 1, + /** Unknown disposition */ + EDispositionUnknown = 15 + }; + + IMPORT_C static CCalContent* NewL(); + IMPORT_C ~CCalContent(); + IMPORT_C void SetContentL(TDesC8* aSmallContent, TDesC8* aContentMIMEType, CCalContent::TDisposition aContentDisposition); + IMPORT_C const TDesC8& Content() const; + IMPORT_C const TDesC8& MimeType() const; + IMPORT_C TDisposition Disposition() const; + CAgnContent* Impl() const; + void SetImpl(CAgnContent* aImpl); + +private: + CCalContent(); + void ConstructL(); + +private: + CAgnContent* iImpl; + }; + + +#endif // __CALCONTENT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/caldataexchange.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/caldataexchange.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,89 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CCALDATAEXCHANGE_H__ +#define __CCALDATAEXCHANGE_H__ + +#include + +class CCalDataExchangeImpl; +class CCalSession; +class RWriteStream; + +/** The default number of entries to import or export between callbacks. +@publishedAll +@released +*/ +const TInt KDefaultNumberOfEntriesToHandle = 10; + +/** A call back class to show the progress of long-running operations. + +When a long-running operation is carried out, this class is used to signal its progress, +and when the function is complete. + +@publishedAll +@released +*/ +class MCalDataExchangeCallBack + { +public: + /** Progress callback. + + This calls the observing class with the percentage complete of the current operation. + This also propagates any error to the observing class. + + @param aPercentageCompleted The percentage complete. */ + virtual void Progress(TInt aPercentageCompleted) = 0; + + /** Progress callback. + + This calls the observing class when the current operation is finished. */ + virtual void Completed() = 0; + + /* Retrieve the number of entries to handle at once. + @return The number of entries to handle at once. + */ + virtual TInt NumberOfEntriesToHandleAtOnce() { return KDefaultNumberOfEntriesToHandle; }; + }; + +/** +This class provides functionality for importing and exporting vCal entries. +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalDataExchange) : public CBase + { +public: + IMPORT_C static CCalDataExchange* NewL(CCalSession& aSession); + IMPORT_C ~CCalDataExchange(); + + IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray); + IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray, TInt aFlags); + IMPORT_C void ExportL(TUid aDataFormat, RWriteStream& aWriteStream, RPointerArray& aCalEntryArray); + + IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray, TInt aFlags, TInt aNumEntries); + + IMPORT_C void ImportAsyncL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray, MCalDataExchangeCallBack& aObserver, TInt aFlags); + IMPORT_C void ExportAsyncL(TUid aDataFormat, RWriteStream& aWriteStream, RPointerArray& aCalEntryArray, MCalDataExchangeCallBack& aObserver); + +private: + CCalDataExchange(); + void ConstructL(CCalSession& aSession); + +private: + CCalDataExchangeImpl* iImpl; + }; + +#endif // __CCALDATAEXCHANGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/caldataformat.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/caldataformat.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CCALDATAFORMAT_H__ +#define __CCALDATAFORMAT_H__ + +#include + +/** +@file +@publishedAll +@released */ + +/** The UID for a VCal 1.0 data parser +Used in vCalendar Import. */ +const TUid KUidVCalendar = {0x1020DB7B}; + + +/** These flags control the behaviour of the data exchange parser.*/ +/** This flag overrides the default character set when parsing +vCalendar 1.0 files to Shift-JIS */ +const TUint32 KCalDataExchangeDefaultShiftJIS = 0x00000001; + +/** This flag ensures that the STATUS property of an imported vCalendar +will map to the CCalEntry::TStatus value with exactly the same name. */ +const TUint32 KCalDataExchangeImportStatusAsVCalendar = 0x00000002; + +#endif // __CCALDATAFORMAT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calendarconverter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calendarconverter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,89 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALENDARCONVERTER_H__ +#define __CALENDARCONVERTER_H__ + +#include +#include + +class TChineseDate +/** Chinese date. + +Its public member data is the year cycle, the year (1-60), the month (1-12), whether or +not the month is a leap month, and the day in the month (1-29 or 30). +@publishedAll +@released */ + { +public: + IMPORT_C TChineseDate(); + IMPORT_C TBool operator==(const TChineseDate& aDate) const; +public: + /** The year cycle. */ + TInt iCycle; + /** The year (1-60). */ + TInt iYear; + /** The month (1-12). */ + TInt iMonth; + /** Whether or not the month is a leap month. */ + TBool iLeapMonth; + /** The day in the month (1-29 or 30). */ + TInt iDay; + }; + + +class CChineseCalendarConverter : public CBase +/** Converts between TDateTime and TChineseDate formats in both directions. Chinese dates +are calculated using the -2636 epoch. This is equivalent to 2637 BCE (Before Common Era). +@publishedAll +@released */ + { +public: + IMPORT_C static CChineseCalendarConverter* NewL(); + + /** Creates a Chinese date from a TDateTime value. + + @param aDateTime The date/time value to convert. + @param aChineseDate On return, contains the Chinese date. If the supplied date + is invalid, this contains KErrArgument. */ + virtual void DateTimeToChineseL(const TDateTime& aDateTime, TChineseDate& aChineseDate)=0; + + /** Creates a TDateTime value from a Chinese date. + + @param aChineseDate A date in Chinese format. + @param aDateTime On return, contains a date value. If the supplied date is + invalid, this contains KErrArgument. */ + virtual void ChineseToDateTimeL(const TChineseDate& aChineseDate, TDateTime& aDateTime)=0; + + /** Returns the range of dates, in standard date format, acceptable to the Chinese + calendar converter. + + @param aLower On return, contains the lower limit of the converter. + @param aUpper On return, contains the upper limit of the converter. */ + virtual void DateRange(TDateTime& aLower, TDateTime& aUpper)=0; + + /** Returns the range of dates, in Chinese date format, acceptable to the Chinese + calendar converter. + + @param aLower On return, contains the lower limit of the converter. + @param aUpper On return, contains the upper limit of the converter. */ + virtual void DateRange(TChineseDate& aLower, TChineseDate& aUpper)=0; + /** Returns the result of the last calendar conversion as a Julian date. + + @return The Julian date. */ + virtual TReal JulianDate() __SOFTFP =0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calentry.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,349 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALENTRY_H__ +#define __CALENTRY_H__ + +#include + +const TReal KCalGEOMinLatitude = -90; +const TReal KCalGEOMaxLatitude = 90; +const TReal KCalGEOMinLongitude = -180; +const TReal KCalGEOMaxLongitude = 180; + +const TUint KCalGEOMaxDecimalPlaces = 6; + +class CCalAlarm; +class CCalAttachment; +class CCalAttendee; +class CCalCategory; +class CCalEntryImpl; +class CCalGeoValue; +class CCalUser; +class CTzRules; +class TCalRRule; +class CCalEntryIdImpl; + +/** Class representing a calendar entry. This can be an appointment, to-do +item, reminder, event or anniversary. + +CCalEntry contains information about a calendar entry, including +a repeat definition, synchronisation information, and group scheduling data. + +A repeating calendar entry has more than one occurrence. Instances are +represented by the CCalInstance class. + +Synchronisation information includes a record of the date/time the entry was +last modified. This can be found by calling the LastModifiedDateL() function. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalEntry) : public CBase + { +public: + /** Defines the type of the calendar entry. + @publishedAll + @released + */ + enum TType + { + /** An appointment, which has a start time and end time. */ + EAppt, + /** A to-do, which can have a start time and end time (the end time is the due date), or can be undated. */ + ETodo, + /** An event, which has a start time and end time. */ + EEvent, + /** A reminder, which has a start time only. */ + EReminder, + /** An anniversary, which has a start time and end time. */ + EAnniv + }; + + /** Defines the possible status values of the entry. + There are values here to support both iCalendar (RFC 2445) and vCalendar v1.0 STATUS properties. + Enumerated values for vCalendar v1.0 contain the prefix 'EVCal'. + @publishedAll + @released + */ + enum TStatus + { + /** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The event is tentative. */ + ETentative, + /** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The event has been confirmed. */ + EConfirmed, + /** Used to support iCalendar (RFC 2445). The event has been cancelled. */ + ECancelled, + /** Used to support iCalendar (RFC 2445). The to-do entry needs action. */ + ETodoNeedsAction, + /** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The to-do entry has been completed. */ + ETodoCompleted, + /** Used to support iCalendar (RFC 2445). The to-do entry is in progress. */ + ETodoInProcess, + /** No status is set. */ + ENullStatus, + + /** Used to support vCalendar 1.0. The entry has been accepted. */ + EVCalAccepted, + /** Used to support vCalendar 1.0. The entry needs action. */ + EVCalNeedsAction, + /** Used to support vCalendar 1.0. The entry has been sent. */ + EVCalSent, + /** Used to support vCalendar 1.0. The entry has been declined. */ + EVCalDeclined, + /** Used to support vCalendar 1.0. The entry has been delegated. */ + EVCalDelegated, + }; + + /** Replication status. + @publishedAll + @released + */ + enum TReplicationStatus + { + /** No restriction on access. */ + EOpen, + /** Data is private (no access). */ + EPrivate, + /** Data is confidential (restricted access). */ + ERestricted + }; + + /** The method property of a Group Scheduling entry. + @publishedAll + @released + */ + enum TMethod + { + /** The RFC2445-defined method value 'None'. */ + EMethodNone, + /** The RFC2445-defined method value 'Publish'. */ + EMethodPublish, + /** The RFC2445-defined method value 'Request'. */ + EMethodRequest, + /** The RFC2445-defined method value 'Reply'. */ + EMethodReply, + /** The RFC2445-defined method value 'Add'. */ + EMethodAdd, + /** The RFC2445-defined method value 'Cancel'. */ + EMethodCancel, + /** The RFC2445-defined method value 'Refresh'. */ + EMethodRefresh, + /** The RFC2445-defined method value 'Counter'. */ + EMethodCounter, + /** The RFC2445-defined method value 'DeclineCounter'. */ + EMethodDeclineCounter + }; + + /** Specify which entry details are to be copied in CCalEntry::CopyFromL functions. + @publishedAll + @released + */ + enum TCopyType + { + /** Copy the ID of the entry */ + ECopyAll, + /** Dont copy ID of the entry */ + EDontCopyId + }; + + /** The busy status of an entry and corresponds to the TRANSP property in the iCalendar (RFC 2445) and vCalendar specifications. + In the vCalendar specification, the TRANSP property can be any positive integer value. 0 is opaque and blocks time, 1 + is transparent and doesn't block time. Any higher values have an implementation-specific meaning. + In the iCalendar specification (RFC 2445), the TRANSP property can be either OPAQUE (blocks time) or TRANSPARENT (doesn't block time). + @publishedPartner + @prototype + */ + enum TTransp + { + /** The entry blocks time. */ + ETranspBusy, + /** The entry doesn't block time. */ + ETranspFree, + /** The entry is tentative and blocks time. */ + ETranspTentative, + /** The entry is an out-of-office calendar event and blocks time. */ + ETranspOutOfOffice, + }; + + // Construction / Destruction + IMPORT_C static CCalEntry* NewL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum); + IMPORT_C static CCalEntry* NewL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum, + const TCalTime& aRecurrenceId, CalCommon::TRecurrenceRange aRange); + + IMPORT_C ~CCalEntry(); + + // Date and Time + IMPORT_C TCalTime StartTimeL() const; + IMPORT_C TCalTime EndTimeL() const; + IMPORT_C void SetStartAndEndTimeL(const TCalTime& aStartTime, const TCalTime& aEndTime); + + IMPORT_C void SetLastModifiedDateL(); + IMPORT_C void SetLastModifiedDateL(const TCalTime& aModifiedTime); + IMPORT_C TCalTime LastModifiedDateL() const; + + IMPORT_C void SetDTStampL(const TCalTime& aTime); + IMPORT_C TCalTime DTStampL() const; + + IMPORT_C TCalTime CompletedTimeL() const; + IMPORT_C void SetCompletedL(TBool aCompleted, const TCalTime& aTime); + + // Repeat rules / RDate / ExDate Methods + IMPORT_C void SetRRuleL(const TCalRRule& aRule); + IMPORT_C TBool GetRRuleL(TCalRRule& aRule) const; + + IMPORT_C void SetRDatesL(const RArray& aRDateList); + IMPORT_C void GetRDatesL(RArray& aRDateList) const; + + IMPORT_C void SetExceptionDatesL(const RArray& aExDateList); + IMPORT_C void GetExceptionDatesL(RArray& aExDateList) const; + + IMPORT_C void ClearRepeatingPropertiesL(); + + // Entry alarm + IMPORT_C void SetAlarmL(CCalAlarm* aAlarm); + IMPORT_C CCalAlarm* AlarmL() const; + + // Comparison + IMPORT_C TBool CompareL(const CCalEntry& aEntry) const; + + // Copy + IMPORT_C void CopyFromL(const CCalEntry& aOther); + IMPORT_C void CopyFromL(const CCalEntry& aOther, TCopyType aCopyType); + + // Text Fields + IMPORT_C void SetSummaryL(const TDesC& aSummary); + IMPORT_C const TDesC& SummaryL() const; + IMPORT_C void SetDescriptionL(const TDesC& aDescription); + IMPORT_C const TDesC& DescriptionL() const; + IMPORT_C void SetLocationL(const TDesC& aLocation); + IMPORT_C const TDesC& LocationL() const; + + // Category list + IMPORT_C void AddCategoryL(CCalCategory* aCategory); + IMPORT_C void DeleteCategoryL(TInt aIndex); + IMPORT_C const RPointerArray& CategoryListL(); + + // Attendee Methods + IMPORT_C void AddAttendeeL(CCalAttendee* aAttendee); + IMPORT_C void DeleteAttendeeL(TInt aIndex); + IMPORT_C RPointerArray& AttendeesL() const; + IMPORT_C void SetOrganizerL(CCalUser* aUser); + IMPORT_C CCalUser* OrganizerL() const; + IMPORT_C void SetPhoneOwnerL(const CCalUser* aOwner); + IMPORT_C CCalUser* PhoneOwnerL() const; + + // Attachments + IMPORT_C void AddAttachmentL(CCalAttachment& aAttachment); + IMPORT_C void DeleteAttachmentL(const CCalAttachment& aAttachment); + IMPORT_C CCalAttachment* AttachmentL(TInt aIndex) const; + IMPORT_C TInt AttachmentCountL() const; + // Other Attributes + IMPORT_C TType EntryTypeL() const; + IMPORT_C void SetStatusL(TStatus aStatus); + IMPORT_C TStatus StatusL() const; + + IMPORT_C void SetReplicationStatusL(TReplicationStatus aReplicationStatus); + IMPORT_C TReplicationStatus ReplicationStatusL() const; + + IMPORT_C void SetPriorityL(TUint aPriority); + IMPORT_C TUint PriorityL() const; + + IMPORT_C void SetMethodL(TMethod aMethod); + IMPORT_C TMethod MethodL() const; + IMPORT_C void SetSequenceNumberL(TInt aSeq); + IMPORT_C TInt SequenceNumberL() const; + IMPORT_C const TDesC8& UidL() const; + IMPORT_C TCalTime RecurrenceIdL() const; + IMPORT_C CalCommon::TRecurrenceRange RecurrenceRangeL() const; + + IMPORT_C CTzRules* TzRulesL() const; + IMPORT_C void SetTzRulesL(const CTzRules& aTzRule); + IMPORT_C void SetTzRulesL(); + + IMPORT_C void SetLocalUidL(TCalLocalUid aLocalId); + IMPORT_C TCalLocalUid LocalUidL() const; + + IMPORT_C TTransp TimeTransparencyL() const; + IMPORT_C void SetTimeTransparencyL(TTransp aBusyStatus); + + IMPORT_C CCalGeoValue* GeoValueL() const; + IMPORT_C void SetGeoValueL(const CCalGeoValue& aGeoValue); + IMPORT_C void ClearGeoValueL(); + + // Internal APIs (Used by Java) + IMPORT_C TCalTime NextInstanceForLocalUIDL(const TCalTime& aTime) const; + IMPORT_C TCalTime PreviousInstanceForLocalUIDL(const TCalTime& aTime) const; + + IMPORT_C TCalTime FindRptUntilTimeL(TInt aCount); + + +public: + // Internal APIs + static CCalEntry* NewL(CCalEntryImpl* aImpl); + CCalEntryImpl* Impl() const; + +private: + void ConstructL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum, const TCalTime& aRecurrenceId, CalCommon::TRecurrenceRange aRange); + void ConstructL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum); + void ConstructL(CCalEntryImpl* aImpl); + +private: // member data + CCalEntryImpl* iImpl; + }; + + +/** Class representing a uniquely identifiable calendar entry in a calendar file. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalEntryId) : public CBase + { +public: + IMPORT_C static CCalEntryId* NewL(TDesC8* aFlatData); + IMPORT_C ~CCalEntryId(); + IMPORT_C TPtrC8 IdL(); + IMPORT_C TPtrC StoreFileNameL(); + IMPORT_C TCalTime RecurrenceIdL(); + IMPORT_C TCalTime InstanceTimeL() const; + IMPORT_C TCalLocalUid LocalUidL() const; +private: + CCalEntryId(); +private: + CCalEntryIdImpl* iImpl; + }; + + +/** Class representing the geographical location of a calendar entry. +This corresponds to the GEO property as defined in vCalendar / iCalendar (RFC 2445). It contains a latitude and a longitude. +@publishedPartner +@prototype +*/ +NONSHARABLE_CLASS(CCalGeoValue) : public CBase + { +public: + IMPORT_C static CCalGeoValue* NewL(); + IMPORT_C ~CCalGeoValue(); + IMPORT_C void SetLatLongL(const TReal& aLatitude, const TReal& aLongitude); + IMPORT_C TBool GetLatLong(TReal& aLatitude, TReal& aLongitude) const; +private: + CCalGeoValue(); +private: + TReal iLatitude; + TReal iLongitude; + }; + +#endif // __CALENTRY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calentryview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calentryview.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,65 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALENTRYVIEW_H__ +#define __CALENTRYVIEW_H__ + +#include +#include + +class MCalProgressCallBack; +class CCalSession; +class CCalEntryViewImpl; + +/** View class for accessing calendar entries. + +Once a session to a calendar file has been created, a view to the session +can be created. + +This view can be used to fetch, store and delete entries. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalEntryView) : public CBase + { +public: + + IMPORT_C static CCalEntryView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack); + IMPORT_C static CCalEntryView* NewL(CCalSession& aSession); + + IMPORT_C ~CCalEntryView(); + + IMPORT_C void FetchL(const TDesC8& aUid, RPointerArray& aCalEntryArray) const; + IMPORT_C CCalEntry* FetchL(TCalLocalUid aId) const; + + IMPORT_C void GetIdsModifiedSinceDateL(const TCalTime& aTime, RArray& aIds) const; + + IMPORT_C void StoreL(const RPointerArray& aCalEntryList, TInt& aNumSuccessfulEntry); + IMPORT_C void UpdateL(const RPointerArray& aCalEntryList, TInt& aNumSuccessfulEntry); + + IMPORT_C void DeleteL(const CDesC8Array& aUidList); + IMPORT_C void DeleteL(const CCalEntry& aCalEntry); + IMPORT_C void DeleteL(const CalCommon::TCalTimeRange& aCalTimeRange, CalCommon::TCalViewFilter aFilter, MCalProgressCallBack& aProgressCallBack); + IMPORT_C void DeleteL(const RArray& aIds, TInt& aNumSuccessfulDeleted); + +private: + CCalEntryView(); + void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack); +private: + CCalEntryViewImpl* iImpl; + }; + +#endif // __CALENTRYVIEW_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calinstance.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calinstance.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALINSTANCE_H__ +#define __CALINSTANCE_H__ + +#include + +class CCalEntry; +class CCalInstanceImpl; + +/** Class representing an instance of a calendar entry. + +A calendar entry (CCalEntry) can have any number of instances. +A non-repeating entry will only have one instance. +Any further instances will appear if the entry has recurrence data. + +The time of an instance is the start time of that instance of the entry. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalInstance) : public CBase + { +public: + static CCalInstance* NewL(CCalEntry* aEntry, const TCalTime& iTime); + IMPORT_C ~CCalInstance(); + + IMPORT_C CCalEntry& Entry() const; + IMPORT_C TCalTime Time() const; + IMPORT_C TCalTime StartTimeL() const; + IMPORT_C TCalTime EndTimeL() const; + +private: + CCalInstance(); + void ConstructL(CCalEntry* aEntry, const TCalTime& aTime); + +private: + CCalInstanceImpl* iImpl; + }; + +#endif // __CALINSTANCE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calinstanceview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calinstanceview.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,129 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALINSTANCEVIEW_H__ +#define __CALINSTANCEVIEW_H__ + +#include +#include +#include + +class CCalFindInstanceSettings; +class CCalInstance; +class CCalInstanceIterator; +class CCalInstanceViewImpl; +class CCalSession; +class MCalProgressCallBack; +class TCalTime; +class CCalLiteEntry; +class TAgnInstanceId; +struct TASShdAlarmedInstanceParams; + +/** View class for accessing instances of calendar entries. + +Once a session to a calendar file has been created, a view to the session +can be created. + +An instance is a calendar entry, a repeated instance of a calendar entry, +or an RDate added to an entry. + +This view can be used to search for instances and also to delete instances. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalInstanceView) : public CBase + { +public: + + /** Parameter struct for storing search data. + This contains a descriptor to store search text and an enum to describe the text search behaviour. + + @publishedAll + @released + */ + class TCalSearchParams + { + public: + IMPORT_C TCalSearchParams(const TDesC& aText, CalCommon::TCalSearchBehaviour aBehaviour); + IMPORT_C const TDesC& Text() const; + IMPORT_C CalCommon::TCalSearchBehaviour Behaviour() const; + + private: + TPtrC iSearchText; + CalCommon::TCalSearchBehaviour iSearchBehaviour; + }; + + IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack); + IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession); + IMPORT_C ~CCalInstanceView(); + + IMPORT_C void FindInstanceL(RPointerArray& aInstanceList, + CalCommon::TCalViewFilter aCalViewFilter, + const CalCommon::TCalTimeRange& aTimeRange) const; + + IMPORT_C void FindInstanceL(RPointerArray& aMatchedInstanceList, + CalCommon::TCalViewFilter aCalViewFilter, + const CalCommon::TCalTimeRange& aTimeRange, + const TCalSearchParams& aSearchParams) const; + + IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings) const; + + IMPORT_C void FindAlarmedInstanceL(RPointerArray& aAlarmedInstanceList, + TASShdAlarmedInstanceParams aAlarmedInstanceParams) const; + + IMPORT_C void DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances); + + IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const; + IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const; + +private: + CCalInstanceView(); + void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack); + +private: + CCalInstanceViewImpl* iImpl; + }; + +/** Class for specifying the search criteria for use in @see CCalInstanceView::FindInstanceL. + +@publishedPartner +@released +*/ +NONSHARABLE_CLASS(CCalFindInstanceSettings) : public CBase + { +public: + IMPORT_C static CCalFindInstanceSettings* NewL(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange); + IMPORT_C ~CCalFindInstanceSettings(); + + IMPORT_C void SetFilter(CalCommon::TCalViewFilter aFilter); + IMPORT_C void SetTimeRange(const CalCommon::TCalTimeRange& aTimeRange); + IMPORT_C void SetTextSearchL(const CCalInstanceView::TCalSearchParams& aSearchParams); + + CalCommon::TCalSearchBehaviour Behaviour() const; + CalCommon::TCalViewFilter Filter() const; + const CalCommon::TCalTimeRange TimeRange() const; + const TDesC& Text() const; +private: + CCalFindInstanceSettings(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange); + +private: + CalCommon::TCalTimeRange iTimeRange; + CalCommon::TCalViewFilter iFilter; + HBufC* iSearchText; + CalCommon::TCalSearchBehaviour iSearchBehaviour; + }; + +#endif // __CALINSTANCEVIEW_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calinterimapipanic.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calinterimapipanic.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,104 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +/** + @file + @publishedAll + @released +*/ + +#ifndef __CALINTERIMAPIPANIC_H__ +#define __CALINTERIMAPIPANIC_H__ + + /** +Panics raised from CallinterimAPI + */ +enum TCalInterimApiPanicCode + { + + /** + Trying to create a CCalCategory object and a wrong type is passed. + */ + EInvalidCategoryParameter = 0, + + /** + Attempt to pass wrong type of TChangeEntryType. + */ + EInvalidChangeEntryType = 1, + + /** + Trying to fetch an undefined TStatus/TCalStatus of an Entry. + */ + EInvalidEntryStatus = 2, + + /** + The TType of an Entry dosen't match the standard types + */ + EInvalidEntryType = 3, + + /** + Atttempt to create an object using NULL object of type CCalEntry. + */ + EInstanceCreatedFromNullEntry = 4, + + /** + Passed invalid Recurrence Range. + */ + EInvalidRecurrenceRangeParameter= 5, + + /** + Attempt to pass a NULL object of type CCalInstance. + */ + ENullInstanceParameter = 6, + + /** + Wrong CCalEntry TType passed to API + */ + EInvalidEntryTypeParameter = 7, + + /** + Attempt to create an invalid repeat rule. + */ + ERepeatRuleBitFailure = 8, + + /** + Attempt to pass incorrect TCalRRule TType. + */ + EInvalidRepeatRuleType = 9, + + /** + Trying to set a repeat rule while one has already been set. + */ + ERepeatRuleTypeAlreadySet = 10, + + /** + Raised by the Class CCalSession's destructor if all the opened references + have not been closed before destruction of CCalSession object. + */ + ESessionHasOpenReferences = 11, + + /** + The type of CCalAttachment is unknown. + */ + EInvalidAttachmentType = 12, + + /** + The instance iterator index is corrupt. + */ + EInstanceIteratorIndexCorrupt = 13 + + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/caliterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/caliterator.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALITER_H__ +#define __CALITER_H__ + + +#include + +class CCalSession; +class CCalIteratorImpl; + +/** +An iterator for iterating though all the entries in the calendar store. + +This may be used by a synchronisation application to iterate all entries in the file to find entries that +have been added\\deleted between two synchronisations. + +The application must not create the entry view or instance view while iterating through the entries. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalIter) : public CBase + + { +public: + IMPORT_C static CCalIter* NewL(CCalSession& aSession); + IMPORT_C ~CCalIter(); + + IMPORT_C const TDesC8& FirstL(); + IMPORT_C const TDesC8& NextL(); + +private: + CCalIter(); + void ConstructL(CCalSession& aSession); + +private: + CCalIteratorImpl* iCalIteratorImpl; + }; + +#endif // __CALITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calnotification.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calnotification.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,50 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALNOTIFICATION_H__ +#define __CALNOTIFICATION_H__ + +/** The calendar publish and subscribe category +@publishedAll + +@released +*/ +const TUid KCalPubSubCategory = { 0x10003a5b }; + +/** Used for subcribing to either todos or event changes +@publishedAll +@released +*/ +enum TCalPubSubValues + { + /** subscribe to todo notifications */ + ECalPubSubTodoNotification, + /** subscribe to event notifications */ + ECalPubSubEventNotification, + }; + +/** The publish and subscribe data +@publishedAll +@released +*/ +struct TCalPubSubData + { + /** The time that the calendar change took place, in universal (UTC) time */ + TTime iTimeOfChangeUtc; + /** The filename hashed into a 4-byte integer. CalInterimAPI provides a method to find the filename from this value. */ + TUint32 iFileNameHash; + }; + +#endif // __CALNOTIFICATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calprogresscallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calprogresscallback.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALPROGRESSCALLBACK_H__ +#define __CALPROGRESSCALLBACK_H__ + +class MCalProgressCallBack +/** A call back class to show the progress of long-running operations. + +When a long-running operation is carried out on the instance view or the entry +view, this class is used to signal its progress, and when the function is complete. + +@publishedAll +@released +*/ + { +public: + + /** Progress callback. + + This calls the observing class with the percentage complete of the current operation. + + @param aPercentageCompleted The percentage complete. */ + virtual void Progress(TInt aPercentageCompleted) = 0; + + /** Progress callback. + + This calls the observing class when the current operation is finished. + + @param aError The error if the operation failed, or KErrNone if successful. */ + virtual void Completed(TInt aError) = 0; + + /** + Asks the observing class whether progress callbacks are required. This + is called once only to check if callbacks are enabled. + + @return If the observing class returns EFalse, then the Progress() function will not be called. + */ + virtual TBool NotifyProgress() = 0; + }; + +#endif // __CALPROGRESSCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calrrule.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calrrule.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,151 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALRRULE_H__ +#define __CALRRULE_H__ + +#include + +/** Class representing iCal repeat types. + +This supports the following standard iCal properties: +- FREQ (rule type), +- DTSTART (start date), +- UNTIL (end date), +- COUNT (number of instances), +- INTERVAL (interval between instances), +- BYDAY, +- BYMONTHDAY, +- BYYEARDAY, +- WKST (start day of week). + +Note that the repeat rule type (FREQ) must be set before any of the following +properties can be set, since their behaviour is dependent on the rule type: +BYDAY, BYMONTHDAY, BYYEARDAY + +The WKST parameter is only significant in weekly repeat rules with an interval of +greater than 1. + +The repeat rule type may not be changed once it has been set. + +If the start date of the entry does not match an instance of its repeat rule then +the entry's start date will be moved forward to the first matching instance. For example, +if the rule repeats every Wednesday but the start date of the entry is Monday, then the +start date will be changed to the Wednesday. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TCalRRule) + { +public: + /** Types of repeat rule. + + @publishedAll + @released + */ + enum TType + { + /** The type has not yet been defined. */ + EInvalid=0, + /** Rule which repeats based on a number of days. */ + EDaily, + /** Rule which repeats based on a number of weeks. */ + EWeekly, + /** Rule which repeats based on a number of months. */ + EMonthly, + /** Rule which repeats based on a number of years. */ + EYearly, + }; + + /** Class to represent a weekday within a month. + + Valid values of iWeekInMonth are 1, 2, 3, 4 for the 1st, 2nd, 3rd and 4th week of + the month, or -1 for the last week of the month. + + For example: + The 3rd Wednesday would have iDay = EWednesday and iWeekInMonth = 3. + The last Sunday would have iDay = ESunday and iWeekInMonth = -1. + + @publishedAll + @released + */ + class TDayOfMonth + { + public: + IMPORT_C TDayOfMonth(TDay aDay, TInt8 aWeekInMonth); + IMPORT_C TDay Day() const; + IMPORT_C TInt8 WeekInMonth() const; + private: + TDay iDay; + TInt8 iWeekInMonth; + }; + + IMPORT_C TCalRRule(); + IMPORT_C TCalRRule(TType aType); + + IMPORT_C void SetType(TType aType); + IMPORT_C TType Type() const; + + IMPORT_C void SetDtStart(const TCalTime& aTime); + IMPORT_C TCalTime DtStart() const; + + IMPORT_C void SetUntil(const TCalTime& aTime); + IMPORT_C TCalTime Until() const; + + IMPORT_C void SetCount(TUint aCount); + IMPORT_C TUint Count() const; + + IMPORT_C void SetInterval(TInt aInterval); + IMPORT_C TInt Interval() const; + + IMPORT_C void SetByDay(const RArray& aDays); + IMPORT_C void GetByDayL(RArray& aDays) const; + + IMPORT_C void SetByDay(const RArray& aDays); + IMPORT_C void GetByDayL(RArray& aDays) const; + + IMPORT_C void SetByMonthDay(const RArray& aMonthDays); + IMPORT_C void GetByMonthDayL(RArray& aMonthDays) const; + + IMPORT_C void SetByMonth(const RArray aMonths); + IMPORT_C void GetByMonthL(RArray& aMonths) const; + + IMPORT_C void SetWkSt(TDay aDay); + IMPORT_C TDay WkSt() const; + + void SetUntilAndCount(const TCalTime& aTime, TUint aCount); + +private: + void InitialiseData(); + + TUint MapToBitsWeekdays(TDay aDay); + + TBool GetNthBit(TUint aNum) const; + void SetNthBit(TUint aNum); + +private: + TUint64 iBuffer; // stores BYDAY/BYMONTHDAY + TCalTime iDtStart; + TCalTime iUntil; + TInt32 iReserved; + TInt32 iReserved2; + TInt iCount; + TDay iWkSt; + TType iType; + TUint8 iInterval; + }; + +#endif // __CALRRULE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/calsession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/calsession.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,106 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALSESSION_H__ +#define __CALSESSION_H__ + +#include + +#include +#include + +class CCalSessionImpl; +class MCalChangeCallBack2; + +/** A handle to the calendar file. + +When the client instantiates a CCalSession, it will connect to the calendar server. +In turn, the client can use its APIs, for instance to create or open a calendar file. + +The agenda data in the file can be accessed as entries. To access the entries, clients should +use class CCalEntryView or CCalInstanceView to process the entry data. However, both view classes +require the handle to the file which is represented by this class. + +A calendar file can be opened on any writable drive. Note that if the file is opened +on a removable media and that media is removed, operations will leave with KErrNotReady. +This error can also happen when trying to access file attachments on removed media. +When this error occurs, the user should close the CCalSession and re-open it once the media +has been replaced. +It is recommended that when using a calendar file on removable media, the user should watch for when +the media is removed / replaced using the RFs::NotifyChange API. + +The session object must not be destroyed until all the objects which where created by referencing it +have been destroyed. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalSession) : public CBase + { +public: + IMPORT_C static CCalSession* NewL(); + IMPORT_C ~CCalSession(); + + IMPORT_C void CreateCalFileL(const TDesC& aFileName) const; + IMPORT_C void OpenL(const TDesC& aFileName) const; + IMPORT_C void OpenL(const TDesC& aFileName, CalCommon::TCalFileVersionSupport& aFileSupportStatus) const; + IMPORT_C const TDesC& DefaultFileNameL() const; + IMPORT_C void DeleteCalFileL(const TDesC& aFileName) const; + IMPORT_C CDesCArray* ListCalFilesL() const; + + IMPORT_C void StartChangeNotification(MCalChangeCallBack2& aCallBack, const CCalChangeNotificationFilter& aFilter); + IMPORT_C void StopChangeNotification(); + IMPORT_C void DisableChangeBroadcast(); + IMPORT_C void EnableChangeBroadcast(); + + IMPORT_C void EnablePubSubNotificationsL(); + IMPORT_C void DisablePubSubNotificationsL(); + + IMPORT_C void FileIdL(TCalFileId& aCalFileId) const; + IMPORT_C void GetFileNameL(TCalPubSubData aPubSubData, TDes& aFileName) const; + IMPORT_C TBool IsFileNameL(TCalPubSubData aPubSubData, const TDesC& aFileName) const; + IMPORT_C TBool IsOpenedFileL(TCalPubSubData aPubSubData) const; + + // debug only +/** +@publishedPartner +@released +*/ + IMPORT_C void _DebugSetHeapFailL(RAllocator::TAllocFail aFail, TInt aRate); + +/** +@publishedPartner +@released +*/ + IMPORT_C TInt _DebugRequestAllocatedCellsL(); + + // deprecated + IMPORT_C void StartChangeNotification(MCalChangeCallBack* aCallBack, MCalChangeCallBack::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, TTime aFilterStartTime, TTime aFilterEndTime); + + IMPORT_C void __dbgClearTzClientCacheL(TBool aRestartCaching); + + IMPORT_C TInt _DebugRequestAllocatedHeapSizeL(); + +public: + CCalSessionImpl& Impl() const; + +private: + CCalSession(); + void ConstructL(); +private: + CCalSessionImpl* iImpl; + }; + +#endif // __CALSESSION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/caltime.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/caltime.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,68 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALTIME_H__ +#define __CALTIME_H__ + +#include + +/** Represents a date/time, as used in the Calendar API. + +This stores a single TTime, which may be set in UTC or local or floating local +time, and can be retrieved in either UTC or system local time. + +There are references to null time throughout the Interim API - this means Time::NullTTime(). + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TCalTime) + { +public: + + /** The time mode for a calendar time + @publishedAll + @released + */ + enum TTimeMode + { + /** Floating time. */ + EFloating, + /** Fixed time in UTC format. */ + EFixedUtc, + /** Fixed time in local time with time zone reference format. */ + EFixedTimeZone + }; + +public: + IMPORT_C TCalTime(); + + IMPORT_C void SetTimeLocalFloatingL(const TTime& aLocalTime); + IMPORT_C void SetTimeUtcL(const TTime& aUtcTime); + IMPORT_C void SetTimeLocalL(const TTime& aLocalTime); + IMPORT_C TTimeMode TimeMode() const; + IMPORT_C TTime TimeUtcL() const; + IMPORT_C TTime TimeLocalL() const; + + IMPORT_C static TTime MaxTime(); + IMPORT_C static TTime MinTime(); +private: + TTime iTime; + TUint8 iTimeMode; + TInt8 iReserved1; + TInt16 iReserved2; + }; + +#endif // __CALTIME_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/caluser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/caluser.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,163 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CALUSER_H__ +#define __CALUSER_H__ + +#include + +class CCalUserImpl; + +/** Class representing a calendar user. + +A calendar user is the base class representation of a meeting participant. +It contains attributes common to all calendar users. + +Contains methods to store and retrieve a user's ADDRESS, SENT-BY and CN +fields. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalUser) : public CBase + { +public: + IMPORT_C static CCalUser* NewL(const TDesC& aAddress); + IMPORT_C static CCalUser* NewL(const TDesC& aAddress, const TDesC& aSentBy); + IMPORT_C ~CCalUser(); + + IMPORT_C void SetCommonNameL(const TDesC& aCommonName); + IMPORT_C const TDesC& Address() const; + IMPORT_C const TDesC& CommonName() const; + IMPORT_C const TDesC& SentBy() const; +public: + static CCalUser* NewL(CCalUserImpl* aImpl); + + CCalUserImpl* Impl() const; +protected: + CCalUser(); + CCalUser(CCalUserImpl* aImpl); + void ConstructL(const TDesC& aAddress); + void ConstructL(const TDesC& aAddress, const TDesC& aSentBy); +protected: +/** Handle to CCalUser implementation */ + CCalUserImpl* iImpl; + }; + + +/** Class representing an attendee of an event. + +CCalAttendee is a specialization of the CCalUser class. + +This class contains extra methods to store and retrieve an Attendee's +ROLE, PART-STAT, and RSVP fields. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CCalAttendee) : public CCalUser + { +public: + /** Attendee's role. + @publishedAll + @released + */ + enum TCalRole + { + /** A required participant of the event. */ + EReqParticipant=0, + /** An optional participant of the event. */ + EOptParticipant, + /** A non-participant of the event. */ + ENonParticipant, + /** This participant will chair the event. */ + EChair, + + /** Indicates an attendee at the event or todo. This value is supported in vCalendar only. */ + EVCalAttendee, + /** Indicates a delegate of another attendee. This value is supported in vCalendar only. */ + EVCalDelegate, + /** Indicates owner of the event or todo (not the same as phone owner). This value is supported in vCalendar only. */ + EVCalOwner, + }; + + /** Attendee's status + @publishedAll + @released + */ + enum TCalStatus + { + /** Action is required by attendee. */ + ENeedsAction=0, + /** Attendee has accepted request. */ + EAccepted, + /** Attendee has tentatively accepted the request. */ + ETentative, + /** Attendee's presence is confirmed. */ + EConfirmed, + /** Attendee has declined request. */ + EDeclined, + /** The required action has been completed by attendee. */ + ECompleted, + /** Attendee has delegated the request to another person. */ + EDelegated, + /** A to-do action in the process of being completed. */ + EInProcess, + + /** An entry has been sent. This value is supported in vCalendar only. */ + EVCalSent, + /** An entry has been received. This value is supported in vCalendar only. */ + EVCalXReceived, + }; + + /** Attendee's expected participation response. + This property is supported in vCalendar only. It is not a property of iCalendar. + @publishedAll + @released + */ + enum TVCalExpect + { + /** Indicates request is for your information. */ + EVCalFyi, + /** Indicates presence is definitely required. */ + EVCalRequire, + /** Indicates presence is being requested. */ + EVCalRequest, + /** Indicates an immediate response needed. */ + EVCalImmediate + }; + +public: + IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress); + IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress, const TDesC& aSentBy); + + IMPORT_C void SetRoleL(TCalRole aRole); + IMPORT_C void SetStatusL(TCalStatus aStatus); + IMPORT_C void SetResponseRequested(TBool aRsvp); + IMPORT_C void SetVCalExpect(TVCalExpect aExpected); + + IMPORT_C TCalRole RoleL() const; + IMPORT_C TCalStatus StatusL() const; + IMPORT_C TBool ResponseRequested() const; + IMPORT_C TVCalExpect VCalExpect() const; +public: + static CCalAttendee* NewL(CCalUserImpl* aImpl); +private: + CCalAttendee(); + CCalAttendee(CCalUserImpl* aImpl); + }; + + +#endif // __CALUSER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cemailaccounts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cemailaccounts.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,628 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CEMAILACCOUNTS_H__ +#define __CEMAILACCOUNTS_H__ + + +#include +#include +#include + + +class CImIAPPreferences; +class CImPop3Settings; +class CImImap4Settings; +class CImSmtpSettings; +class CRepository; +class CImapSyncDownloadRules; +class CImapTransportBufferSizes; +class CImSmtpMobilitySettings; + +/** +Maximum size of email account name + +@publishedAll +@released +*/ +const TInt KEmailAccountNameSize = 256; + +/** +Maximum number of entries allowed in the IAP list for a SMTP mobility account + +@publishedPartner +@released +*/ +const TInt KMaxSmtpMobilityAccountIAPListEntries = 32; + +/** +Identifier number for a POP email account. + +@publishedAll +@released +@see TPopAccount +*/ +typedef TInt TPopAccountId; + +/** +Identifier number for an IMAP email account. + +@publishedAll +@released +@see TImapAccount +*/ +typedef TInt TImapAccountId; + +/** +Identifier number for an SMTP email account. + +@publishedAll +@released +@see TSmtpAccount +*/ +typedef TInt TSmtpAccountId; + +/** +Identifier number for an SMTP moblity account. + +@publishedPartner +@released +*/ +typedef TInt TSmtpMobilityAccountId; + +/** +Array of IAP values + +@publishedPartner +@released +*/ +typedef RArray RArrayIAP; + +/** +Null or undefined SMTP account identifier + +@publishedPartner +@released +*/ +const TSmtpAccountId KNullSmtpAccountId = 0; + +/** +POP account ID. + +Objects of this type identify POP email accounts. +They are obtained when a POP account is created +(CEmailAccounts::CreatePopAccountL()), or by +querying for what POP accounts exist +(CEmailAccounts::GetPopAccountL() and CEmailAccounts::GetPopAccountsL()). + +The object is then used as a handle to the account when getting +the account settings, using CEmailAccounts::LoadPopSettingsL() and +CEmailAccounts::LoadPopIapSettingsL(). + +@publishedAll +@released +*/ +class TPopAccount + { +public: + /** POP account identifier number. + + Each POP account stored on the phone has a different + identifier number to distinguish it from other accounts. + */ + TPopAccountId iPopAccountId; + + /** POP account name. */ + TBuf iPopAccountName; + + /** Entry ID of the POP service for this account. */ + TMsvId iPopService; + + /** Entry ID of the related SMTP service for this account. + + This is set if an SMTP service has been created, using + CEmailAccounts::CreateSmtpAccountL(), that specifies that + it is related to this account. An SMTP service (which provides + email sending functionality) is used in conjunction with + a POP or IMAP service (which provide email retrieval). + */ + TMsvId iSmtpService; + }; + +/** +IMAP account ID. + +Objects of this type identify IMAP email accounts. +They are obtained when a IMAP account is created +(CEmailAccounts::CreateImapAccountL()), or by +querying for what IMAP accounts exist +(CEmailAccounts::GetImapAccountL() and CEmailAccounts::GetImapAccountsL()). + +The object is then used as a handle to the account when getting +the account settings, using CEmailAccounts::LoadImapSettingsL() and +CEmailAccounts::LoadImapIapSettingsL(). + +@publishedAll +@released +*/ +class TImapAccount + { +public: + /** IMAP account identifier number. + + Each IMAP account stored on the phone has a different + identifier number to distinguish it from other accounts. + */ + TImapAccountId iImapAccountId; + + /** IMAP account name */ + TBuf iImapAccountName; + + /** Entry ID of the IMAP service for this account. */ + TMsvId iImapService; + + /** Entry ID of the related SMTP service for this account. + + This is set if an SMTP service has been created, using + CEmailAccounts::CreateSmtpAccountL(), that specifies that + it is related to this account. An SMTP service (which provides + email sending functionality) is used in conjunction with + a POP or IMAP service (which provide email retrieval). + */ + TMsvId iSmtpService; + }; + +/** +SMTP account ID. + +Objects of this type identify SMTP email accounts. +They are obtained when a SMTP account is created +(CEmailAccounts::CreateSmtpAccountL()), or by +querying for what SMTP accounts exist +(CEmailAccounts::GetSmtpAccountL() and CEmailAccounts::GetISmtpAccountsL()). + +The object is then used as a handle to the account when getting +the account settings, using CEmailAccounts::LoadSmtpSettingsL() and +CEmailAccounts::LoadSmtpIapSettingsL(). + +@publishedAll +@released +*/ +class TSmtpAccount + { +public: + /** SMTP account identifier number. */ + TSmtpAccountId iSmtpAccountId; + + /** SMTP account name */ + TBuf iSmtpAccountName; + + /** Entry ID of the SMTP service for this account. */ + TMsvId iSmtpService; + + /** Entry ID of the related POP or IMAP service for this account. + + An SMTP service (which provides email sending functionality) is + used in conjunction with a POP or IMAP service (which provide email retrieval). + */ + TMsvId iRelatedService; + }; + +/** +@publishedPartner +@released +*/ +class TSmtpMobilityAccount + { +public: + /** SMTP mobility account identifier */ + TSmtpMobilityAccountId iAccountId; + + /** SMTP mobility account name */ + TBuf iName; + + /** Parent SMTP account identifier */ + TSmtpAccountId iParentSmtpAccountId; + + /** Linked SMTP account identifier. Identifies the SMTP account whose + settings will be used by this mobility account. If the mobility account + is using its own settings, this will be set to KNullSmtpAccountId. */ + TSmtpAccountId iLinkedSmtpAccountId; + }; + +/** +Creates, loads, saves and deletes email (IMAP, POP, and SMTP) accounts. + +An account encapsulates: + +- Settings for a messaging service. There is a different type of + settings class for each of the email protocols (CImPop3Settings, + CImImap4Settings, CImSmtpSettings). +- IAP (Internet account) settings for accessing the service. + +The class has a family of functions for each protocol to create, get, +and delete accounts: + +- Create\AccountL +- Get\AccountL +- Get\AccountsL +- Delete\AccountL + +where \ is either POP, IMAP, or SMTP. +The Create and Get functions don't directly return settings +objects, but only account identifiers. + +Account identifiers are passed to the following functions +to save and load the service and IAP settings for that account: + +- Load\SettingsL +- Save\SettingsL +- Load\IapSettingsL +- Save\IapSettingsL + +For SMTP only, there is a concept of a default account (as a client +program may want to send an email, and not care which account is used.) +SetDefaultSmtpAccountL(), DefaultSmtpAccountL() and DeleteDefaultSmtpAccountL() +are used to handle this. + +Note that an account is associated with a service entry in the message store, +but account information itself is stored in the central repository. + +@publishedAll +@released +*/ +class CEmailAccounts : public CBase, public MMsvSessionObserver + { +public: + + IMPORT_C static CEmailAccounts* NewL(); + IMPORT_C static CEmailAccounts* NewLC(); + IMPORT_C virtual ~CEmailAccounts(); + + IMPORT_C TPopAccount CreatePopAccountL(const TDesC& aAccountName, const CImPop3Settings& aPopSettings, + const CImIAPPreferences& aPopIAP, TBool aReadOnly); + + IMPORT_C TImapAccount CreateImapAccountL(const TDesC& aAccountName, const CImImap4Settings& aImapSettings, + const CImIAPPreferences& aImapIAP, TBool aReadOnly); + + IMPORT_C TSmtpAccount CreateSmtpAccountL(TPopAccount& aPopAccount, const CImSmtpSettings& aSmtpSettings, + const CImIAPPreferences& aSmtpIAP, TBool aReadOnly); + + IMPORT_C TSmtpAccount CreateSmtpAccountL(TImapAccount& aImapAccount, const CImSmtpSettings& aSmtpSettings, + const CImIAPPreferences& aSmtpIAP, TBool aReadOnly); + + IMPORT_C TSmtpAccount CreateSmtpAccountL(const TDesC& aAccountName, const CImSmtpSettings& aSmtpSettings, + const CImIAPPreferences& aSmtpIAP, TBool aReadOnly); + + IMPORT_C void GetPopAccountsL(RArray& aAccounts); + IMPORT_C void GetPopAccountL(TMsvId aServiceId, TPopAccount& aAccount); + IMPORT_C void DeletePopAccountL(const TPopAccount& aAccount); + + IMPORT_C void GetImapAccountsL(RArray& aAccounts); + IMPORT_C void GetImapAccountL(TMsvId aServiceId, TImapAccount& aAccount); + IMPORT_C void DeleteImapAccountL(const TImapAccount& aAccount); + + IMPORT_C void GetSmtpAccountsL(RArray& aAccounts); + IMPORT_C void GetSmtpAccountL(TMsvId aServiceId, TSmtpAccount& aAccount); + IMPORT_C void DeleteSmtpAccountL(const TSmtpAccount& aAccount); + IMPORT_C void DeleteDefaultSmtpAccountL(); + + IMPORT_C void PopulateDefaultPopSettingsL(CImPop3Settings& aPopSettings, + CImIAPPreferences& aPopIap); + + IMPORT_C void PopulateDefaultImapSettingsL(CImImap4Settings& aImapSettings, + CImIAPPreferences& aImapIap); + + IMPORT_C void PopulateDefaultSmtpSettingsL(CImSmtpSettings& aSmtpSettings, + CImIAPPreferences& aSmtpIap); + + IMPORT_C TInt DefaultSmtpAccountL(TSmtpAccount& aAccount); + IMPORT_C void SetDefaultSmtpAccountL(const TSmtpAccount& aAccount); + + IMPORT_C void LoadPopSettingsL(const TPopAccount& aAccount, CImPop3Settings& aPopSettings); + IMPORT_C void LoadPopIapSettingsL(const TPopAccount& aAccount, CImIAPPreferences& aIAP); + + IMPORT_C void LoadImapSettingsL(const TImapAccount& aAccount, CImImap4Settings& aImapSettings); + IMPORT_C void LoadImapIapSettingsL(const TImapAccount& aAccount, CImIAPPreferences& aIAP); + + IMPORT_C void LoadSmtpSettingsL(const TSmtpAccount& aAccount, CImSmtpSettings& aSmtpSettings); + IMPORT_C void LoadSmtpIapSettingsL(const TSmtpAccount& aAccount, CImIAPPreferences& aIAP); + + IMPORT_C void SavePopSettingsL(const TPopAccount& aAccount, const CImPop3Settings& aPopSettings); + IMPORT_C void SavePopIapSettingsL(const TPopAccount& aAccount, const CImIAPPreferences& aIAP); + + IMPORT_C void SaveImapSettingsL(const TImapAccount& aAccount, const CImImap4Settings& aImapSettings); + + IMPORT_C void SaveImapIapSettingsL(const TImapAccount& aAccount, const CImIAPPreferences& aIAP); + + IMPORT_C void SaveSmtpSettingsL(const TSmtpAccount& aAccount, const CImSmtpSettings& aSmtpSettings); + IMPORT_C void SaveSmtpIapSettingsL(const TSmtpAccount& aAccount, const CImIAPPreferences& aIAP); + + IMPORT_C TBool IsAccountReadOnlyL(const TPopAccount& aAccount); + IMPORT_C TBool IsAccountReadOnlyL(const TImapAccount& aAccount); + IMPORT_C TBool IsAccountReadOnlyL(const TSmtpAccount& aAccount); + + // Published partner routines + IMPORT_C TImapAccount CreateImapAccountL(const TDesC& aAccountName, + const CImImap4Settings& aImapSettings, const CImIAPPreferences& aImapIAP, + const CImapSyncDownloadRules& aSyncDownloadRules, TBool aReadOnly); + IMPORT_C void LoadImapSyncDownloadRulesL(const TImapAccount& aAccount, CImapSyncDownloadRules& aRules); + IMPORT_C void LoadImapTransportBufferSizesL(CImapTransportBufferSizes& aBufferSizes); + IMPORT_C void SaveImapSyncDownloadRulesL(const TImapAccount& aAccount, const CImapSyncDownloadRules& aRules); + IMPORT_C void SaveImapTransportBufferSizesL(const CImapTransportBufferSizes& aBufferSizes); + IMPORT_C void DeleteImapTransportBufferSizesL(); + + IMPORT_C void GetSmtpAccountL(TSmtpAccountId aAccountId, TSmtpAccount& aAccount); + + IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL(const TDesC& aAccountName, const RArrayIAP& aIapList, const TSmtpAccount& aSmtpAccount, const CImSmtpMobilitySettings& aSettings, TBool aReadOnly); + IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL(const TDesC& aAccountName, const RArrayIAP& aIapList, const TSmtpAccount& aSmtpAccount, const TSmtpAccount& aLinkedSmtpAccount, TBool aReadOnly); + IMPORT_C void GetSmtpMobilityAccountsL(const TSmtpAccount& aSmtpAccount, RArray& aAccounts); + IMPORT_C void DeleteSmtpMobilityAccountL(const TSmtpMobilityAccount& aAccount); + + IMPORT_C void PopulateDefaultSmtpMobilitySettingsL(CImSmtpMobilitySettings& aSettings); + IMPORT_C void LoadSmtpMobilitySettingsL(const TSmtpMobilityAccount& aAccount, CImSmtpMobilitySettings& aSettings); + IMPORT_C void SaveSmtpMobilitySettingsL(const TSmtpMobilityAccount& aAccount, const CImSmtpMobilitySettings& aSettings); + + IMPORT_C void LoadSmtpMobilityAccountIapListL(const TSmtpMobilityAccount& aAccount, RArrayIAP& aIapList); + IMPORT_C void SaveSmtpMobilityAccountIapListL(const TSmtpMobilityAccount& aAccount, const RArrayIAP& aIapList); + + IMPORT_C TBool IsAccountReadOnlyL(const TSmtpMobilityAccount& aAccount); + + // Internal routines + IMPORT_C void GetSmtpMobilityAccountsL(RArray& aAccounts); + IMPORT_C TBool LoadSmtpMobilitySettingsL(TSmtpAccountId& aSmtpAccountId, TUint32 aIap, CImSmtpMobilitySettings& aSettings); + +private: + CEmailAccounts(); + void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* ); + CMsvSession& SessionL(); + CRepository& PopRepositoryL(); + CRepository& ImapRepositoryL(); + CRepository& SmtpRepositoryL(); + + TMsvId CreateEmailServiceL(CMsvEntry& aMsvEntry, const TDesC& aAccountName, TUid aMTMType, TBool aVisible); + void SetRelatedIdL(CMsvEntry& aMsvEntry, TMsvId aId, TMsvId aRelatedId); + void SetEntryDetailsL(TMsvId aId, const TDesC& aAccountName); + void UnSetInPreparationFlagsL(CMsvEntry& aMsvEntry, TMsvId aId, TInt aAccountId); + void DeleteServiceEntryL(CMsvEntry& aMsvEntry, TMsvId aId); + + TUint GetNextEmptyAccountSlotL(CRepository& aRepository); + TUint32 FindEmailAccountL(TMsvId aService, CRepository& aRepository); + + void LoadIAPPrefSettingsL(TUint32 aAccountId, CImIAPPreferences& aIAP, CRepository& aRepository); + void DoLoadPopSettingsL(TUint32 aAccountId, CImPop3Settings& aPopSettings); + void DoLoadImapSettingsL(TUint32 aAccountId, CImImap4Settings& aImapSettings); + void DoLoadSmtpSettingsL(TUint32 aAccountId, CImSmtpSettings& aSmtpSettings); + + void SaveIAPPrefSettingsL(TUint32 aAccountId, const CImIAPPreferences& aIAP, CRepository& aRepository); + void DoSavePopSettingsL(TUint32 aAccountId, const CImPop3Settings& aPopSettings); + void DoSaveSmtpSettingsL(TUint32 aAccountId, const CImSmtpSettings& aSmtpSettings); + void DoSaveImapSettingsL(TUint32 aAccountId, const CImImap4Settings& aImapSettings); + void DoSaveImapSyncDownloadRulesL(TUint32 aAccountId, const CImapSyncDownloadRules& aRules, CRepository& aRepository); + + TImapAccount CreateImapAccountL(const TDesC& aAccountName, const CImImap4Settings& aImapSettings, + const CImIAPPreferences& aImapIAP, const CImapSyncDownloadRules* aSyncDownloadRules, TBool aReadOnly); + + TUint32 DoCreatePopAccountL(const TDesC& aAccountName, const CImPop3Settings& aPopSettings, + const CImIAPPreferences& aPopIAP, TMsvId aPopService, TMsvId aRelatedService, TBool aReadOnly); + TUint32 DoCreateImapAccountL(const TDesC& aAccountName, const CImImap4Settings& aImapSettings, + const CImIAPPreferences& aImapIAP, const CImapSyncDownloadRules* aSyncDownloadRules, TMsvId aImapService, + TMsvId aRelatedService, TBool aReadOnly); + TUint32 DoCreateSmtpAccountL(TPopAccount& aPopAccount, const CImSmtpSettings& aSmtpSettings, + const CImIAPPreferences& aSmtpIAP, TMsvId aSmtpService, CMsvEntry& aMsvEntry, TUint32& aPopAccountId, TBool aReadOnly); + TUint32 DoCreateSmtpAccountL(TImapAccount& aImapAccount, const CImSmtpSettings& aSmtpSettings, + const CImIAPPreferences& aSmtpIAP, TMsvId aSmtpService, CMsvEntry& aMsvEntry, TUint32& aImapAccountId, TBool aReadOnly); + TUint32 DoCreateSmtpAccountL(const TDesC& aAccountName, const CImSmtpSettings& aSmtpSettings, + const CImIAPPreferences& aSmtpIAP, TMsvId aSmtpService, TMsvId aRelatedService, TBool aReadOnly); + + void DeleteIAPPrefSettingsL(TUint32 aAccountId, CRepository& aRepository); + void DeletePopSettings(TUint32 aAccountId, CRepository& aRepository); + void DeleteSmtpSettings(TUint32 aAccountId, CRepository& aRepository); + void DeleteImapSettings(TUint32 aAccountId, CRepository& aRepository); + void DeleteImapSyncDownloadRulesL(TUint32 aAccountId, CRepository& aRepository); + + void GetEmailServicesL(CMsvEntrySelection& aServices, TUid aMTMType, CMsvEntry& aMsvEntry); + + TBool IsAsciiPrintable(const TDesC16& aText); + TBool IsAsciiPrintable(const TDesC8& aText); + TBool IsUnicodePrintable(const TDesC16& aText); + + TSmtpMobilityAccount DoCreateSmtpMobilityAccountL(const TDesC& aAccountName, const RArrayIAP& aIapList, const CImSmtpMobilitySettings& aSettings, const TSmtpAccount& aSmtpAccount, TSmtpAccountId aLinkedSmtpAccountId, TBool aReadOnly); + void AddMobilityAccountToSmtpAccountL(const TSmtpAccount& aSmtpAccount, const RArrayIAP& aIapList, TUint32 aMobAccRepId, CRepository& aRepository); + void AddLinkToMobilityAccountL(TSmtpAccountId aLinkedSmtpAccountId, TUint32 aMobAccRepId, CRepository& aRepository); + TInt FindIapListEntryInSmtpMobilityAccountListL(const RArrayIAP& aIapList, CRepository& aRepository, TUint32 aSmtpAccRepId, TInt aNumEntries, TInt aIgnorePos); + TInt FindAccountIdInSmtpMobilityAccountListL(TUint32 aMobAccRepId, CRepository& aRepository, TUint32 aSmtpAccRepId, TInt aNumEntries); + void GetSmtpAccountInfoForMobilityAccountL(TUint32 aMobAccRepId, CRepository& aRepository, TUint32& aSmtpAccRepId, TInt& aPos); + void DeleteAllOwnedMobilityAccountsL(TUint32 aSmtpAccRepId, CRepository& aRepository); + void DeleteAllLinkedMobilityAccountsL(TUint32 aLinkedSmtpAccRepId, CRepository& aRepository); + void DeleteSmtpMobilityAccountListEntryL(TUint32 aMobAccRepId, CRepository& aRepository, TUint32 aSmtpAccRepId); + void DeleteSmtpMobilityAccountFromLinkedSmtpAccountL(TUint32 aMobAccRepId, CRepository& aRepository); + TBool IsSmtpTypeAccountReadOnlyL(TUint32 aAccRepId); + TBool IsSmtpMobilityAccount(CRepository& aRepository, TUint32 aAccRepId); + +private: + enum TEmailSettingTypes + { + // Partial CenRep Id for service settings + EServiceSettingType = 0x00000000, + // Partial CenRep Id for IAP Prefs + EIAPPrefSettingType = 0x00010000, + // CenRep mask for email accounts + EAccountMask = 0x800FFFFF + }; + + enum TPOPServiceSettingsCenRepId + { + EPOPServiceId = 0x00000000, + EPOPAccountNameId = 0x00000001, + EPOPRelatedSMTPServiceId = 0x00000002, + EPOPSettingsVersionId = 0x00000003, + EPOPServerAddressId = 0x00000004, + EPOPPortNumberId = 0x00000005, + EPOPFlagsId = 0x00000006, + EPOPLoginNameId = 0x00000007, + EPOPPasswordId = 0x00000008, + EPOPMaxEmailSizeId = 0x00000009, + EPOPGetEmailOptionsId = 0x0000000A, + EPOPInboxSynchronisationLimitId = 0x0000000B, + EPOPPopulationLimitId = 0x0000000C, + EPOPReadOnlyAccountId = 0x0000000D, + EPOPTlsSslDomainId = 0x0000000F + }; + + enum TIMAPServiceSettingsCenRepId + { + EIMAPServiceId = 0x00000000, + EIMAPAccountNameId = 0x00000001, + EIMAPRelatedSMTPServiceId = 0x00000002, + EIMAPSettingsVersionId = 0x00000003, + EIMAPServerAddressId = 0x00000004, + EIMAPPortNumberId = 0x00000005, + EIMAPFlagsId = 0x00000006, + EIMAPLoginNameId = 0x00000007, + EIMAPPasswordId = 0x00000008, + EIMAPFolderPathId = 0x00000009, + EIMAPPathSeparatorId = 0x0000000A, + EIMAPSynchronisationStrategyId = 0x0000000B, + EIMAPSubscriptionStrategyId = 0x0000000C, + EIMAPMaxEmailSizeId = 0x0000000D, + EIMAPGetMailOptionsId = 0x0000000E, + EIMAPInboxSynchronisationLimitId= 0x0000000F, + EIMAPMailboxSynchronisationLimitId= 0x00000010, + EIMAPTlsSslDomainId = 0x00000012, + EIMAPSyncRateId = 0x00000020, + EIMAPFetchSizeId = 0x00000030, + EIMAPIdleTimeoutId = 0x00000040, + EPartialMailOptionsId = 0x00000050, + EBodyTextSizeLimitId = 0x00000060, + EAttachmentSizeLimitId = 0x00000070, + EIMAPSearchStringId = 0x00000080, + EIMAPReadOnlyAccountId = 0x00000090, + // 0x00001000 - 0x00002FFF reserved for sync download rules + // 0x00010000 - 0x00014FFF reserved for IAP/SNAP preferences + }; + + enum TIMAPSyncDownloadRulesCenRepInfo + { + EIMAPSyncDownloadRulesVersionId = 0x00001000, + EIMAPNumInboxSyncDownloadRulesId = 0x00001001, + EIMAPNumFolderSyncDownloadRulesId = 0x00001002, + + EIMAPInboxSyncDownloadRulesBearerTypesId = 0x00001010, + EIMAPInboxSyncDownloadRulesMailOptionsId = 0x00001011, + EIMAPInboxSyncDownloadRulesTotalSizeLimitId = 0x00001012, + EIMAPInboxSyncDownloadRulesBodyTextSizeLimitId = 0x00001013, + EIMAPInboxSyncDownloadRulesAttachmentSizeLimitId = 0x00001014, + EIMAPInboxSyncDownloadRulesGetMailBodyPartsId = 0x00001015, + EIMAPInboxSyncDownloadRulesMaxEmailSizeId = 0x00001016, + + EIMAPFolderSyncDownloadRulesBearerTypesId = 0x00001030, + EIMAPFolderSyncDownloadRulesMailOptionsId = 0x00001031, + EIMAPFolderSyncDownloadRulesTotalSizeLimitId = 0x00001032, + EIMAPFolderSyncDownloadRulesBodyTextSizeLimitId = 0x00001033, + EIMAPFolderSyncDownloadRulesAttachmentSizeLimitId = 0x00001034, + EIMAPFolderSyncDownloadRulesGetMailBodyPartsId = 0x00001035, + EIMAPFolderSyncDownloadRulesMaxEmailSizeId = 0x00001036, + + // Offset between sets of rules + EIMAPSyncDownloadRulesOffset = 0x40 + }; + + enum TIAPPreferencesCenRepId + { + // single settings + EIAPPrefVersion = 0x00010000, + EIAPChoicesCount = 0x00010001, + + // List of settings + EIAPListIDs = 0x00011000, + EIAPListDialogPrefs = 0x00012000, + // EIAPSnapId placed here is a deviation from Design doc. Remove comment after a decision is made + EIAPSnapId = 0x00014000 // The same value is to be used in all account types + }; + + enum TIMAPTransportBufferSizesCenRepInfo + { + EIMAPTransportBufferSizesVersionId = 0x80000100, + EIMAPNumTransportBufferSizesId = 0x80000101, + + EIMAPTransportBufferSizesBearerTypesId = 0x80000110, + EIMAPTransportBufferSizesFetchRequestSizeId = 0x80000111, + EIMAPTransportBufferSizesMaxOutstandingFetchResponsesId = 0x80000112, + + // Offset between entries + EIMAPTransportBufferSizesOffset = 0x20 + }; + + enum TSMTPServiceSettingsCenRepId + { + ESMTPServiceId = 0x00000000, + ESMTPAccountNameId = 0x00000001, + ESMTPSettingsVersionId = 0x00000002, + ESMTPServerAddressId = 0x00000003, + ESMTPPortNumberId = 0x00000004, + ESMTPFlagsId = 0x00000005, + ESMTPEmailAliasId = 0x00000006, + ESMTPEmailAddressId = 0x00000007, + ESMTPReplyToAddressId = 0x00000008, + ESMTPReceiptAddressId = 0x00000009, + ESMTPBodyEncodingId = 0x0000000A, + ESMTPDefaultMsgCharSetId = 0x0000000B, + ESMTPSendCopyToSelfId = 0x0000000C, + ESMTPSendMessageOptionId = 0x0000000D, + ESMTPLoginNameId = 0x0000000E, + ESMTPPasswordId = 0x0000000F, + ESMTPRelatedServiceId = 0x00000010, + ESMTPIncludeToCcId = 0x00000011, + ESMTPReadOnlyAccountId = 0x00000012, + ESMTPParentAccountId = 0x00000013, + ESMTPTlsSslDomainId = 0x00000014, + ESMTPLinkedAccountId = 0x00000015 + }; + + enum TSMTPLinkedMobilityAccountListCenRepInfo + { + ESMTPLinkedMobilityAccountListVersionId = 0x00015000, + ESMTPLinkedMobilityAccountListNumEntriesId = 0x00015001, + ESMTPLinkedMobilityAccountListEntryId = 0x00015010, + + // Maximum number of list entries + ESMTPLinkedMobilityAccountListMaxEntries = 2048 + }; + + enum TSMTPMobilityAccountListCenRepInfo + { + ESMTPMobilityAccountListVersionId = 0x00016000, + ESMTPMobilityAccountListNumEntriesId = 0x00016001, + + ESMTPMobilityAccountListAccountId = 0x00016010, + ESMTPMobilityAccountListNumIapsId = 0x00016011, + ESMTPMobilityAccountListIapId = 0x00016020, + + // Offset between entries + ESMTPMobilityAccountListOffset = 0x40, + + // Maximum number of list entries + ESMTPMobilityAccountMaxEntries = 32 + }; + +private: + CMsvSession* iMsvSession; + CRepository* iPOPRepository; + CRepository* iSMTPRepository; + CRepository* iIMAPRepository; + }; + +#endif // __CEMAILACCOUNTS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cimattachmentwaiter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cimattachmentwaiter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,50 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CIMATTACHMENTWAITER_H__ +#define __CIMATTACHMENTWAITER_H__ + +#include + +class CImEmailMessage; + +/** +An Waiter object used to wait for an attachment to be added to an email message. + +@publishedAll +@released +*/ +class CImAttachmentWaiter : public CActive + { +public: + IMPORT_C static CImAttachmentWaiter* NewL(); + IMPORT_C ~CImAttachmentWaiter(); + IMPORT_C void StartWaitingL(TRequestStatus& aStatus, CImEmailMessage* aMailMessage, TBool aDeleteMessage = ETrue); + +private: + CImAttachmentWaiter(); + void Reset(); + + // from CActive + void RunL(); + void DoCancel(); + +private: + TRequestStatus* iReportStatus; + CImEmailMessage* iMailMessage; + TBool iDeleteMessage; + }; + +#endif // __CIMATTACHMENTWAITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cimplainbodytext.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cimplainbodytext.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,100 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef _CIMPLAINBODYTEXT_H_ +#define _CIMPLAINBODYTEXT_H_ + +class CImEmailMessage; +class CImStoreMessagePart; +class CMsgActive; +/** +This class is a wrapper over CMsvPlainBodyText class of message server. +The pointer to this class can be obtained by calling OpenPlainBodyTextForReadL +or OpenPlainBodyTextForWriteL API of the CImEmailMessage class. +This can be used to store/restore a email message created by using the +CImEmailOperation class. + +@see CImEmailMessage, CImEmailOperation +@publishedAll +@released +*/ + +class CImPlainBodyText: public CMsgActive + { +public: + static CImPlainBodyText* NewL(CImEmailMessage& aEmailMessage, CMsvEntry& aMsvEntry, CImEmailMessage::TImEmailEntryType aEntryType, TInt aChunkLength, TBool aEditMode); + IMPORT_C ~CImPlainBodyText(); + + IMPORT_C void StoreChunkL(const TDesC8& aChunk, TRequestStatus& aStatus); + IMPORT_C void StoreChunkL(const TDesC8& aChunk); + + IMPORT_C void StoreChunkL(const TDesC16& aChunk, TRequestStatus& aStatus); + IMPORT_C void StoreChunkL(const TDesC16& aChunk); + + IMPORT_C void StoreRichTextAsPlainTextL(CRichText& aRichText); + + IMPORT_C void CommitL(TRequestStatus& aStatus); + IMPORT_C void CommitL(TRequestStatus& aStatus, CImMimeHeader& aMimeHeader); + + IMPORT_C void NextChunkL(TDes8& aChunk, TRequestStatus& aStatus); + IMPORT_C void NextChunkL(TDes8& aChunk); + + IMPORT_C void NextChunkL(TDes16& aChunk, TRequestStatus& aStatus); + IMPORT_C void NextChunkL(TDes16& aChunk); + + IMPORT_C void PreviousChunkL(TDes8& aChunk, TRequestStatus& aStatus); + IMPORT_C void PreviousChunkL(TDes8& aChunk); + + IMPORT_C void PreviousChunkL(TDes16& aChunk, TRequestStatus& aStatus); + IMPORT_C void PreviousChunkL(TDes16& aChunk); + +private: + CImPlainBodyText(CImEmailMessage& aEmailMessage, CMsvEntry& aMsvEntry); + void ConstructL(TInt aChunkLength, CImEmailMessage::TImEmailEntryType aEntryType, TBool aEditMode); + void DoRunL(); // From CMsgActive + void DoCancel(); +private: + CImEmailMessage& iEmailMessage; + CImStoreMessagePart* iStoreMessagePart; + /** The CMsvEntry associated with the message being stored/restored.*/ + CMsvEntry& iMsvEntry; + /** The array of framework/server class to store/restore body text in chunks.*/ + RPointerArray iPlainTextArray; + /** The id of the message. */ + TMsvId iMessageId; + /** The Store associated with the message being stored/restored.*/ + CMsvStore* iStore; + /** For indexing the plaintext array */ + TInt iIndex; + /** The 16-bit pointer to a chunk that will be populated with data when asynchronous + 16-bit versions of NextChunkL / PreviousChunkL returns.*/ + TDes16* iChunk16; + /** The 8-bit pointer to a chunk that will be populated with data when asynchronous + 8-bit versions of NextChunkL / PreviousChunkL returns.*/ + TDes8* iChunk8; + + /** Enum indicating which asynchronous chunk retrieving method resulted in a + call to DoRunl.*/ + enum TChunkRetrievalState + { + EIdleState, + ENextChunk8Bit, + ENextChunk16Bit, + EPreviousChunk8Bit, + EPreviousChunk16Bit, + } iChunkRetrievalState; + }; + +#endif //_CIMPLAINBODYTEXT_H_ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cmmsaccounts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cmmsaccounts.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,127 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMMSACCOUNT_H__ +#define __CMMSACCOUNT_H__ + + +#include + +class CRepository; +class CMmsSettings; +class TMmsAccountId; +class MMmsSettingsObserver; + + +/** +The maximum account name size + +@publishedAll +@released +*/ +const TInt KMmsAccountNameSize = 256; + + + +/** +MMS account ID + +@publishedAll +@released +*/ +class TMmsAccountId + { +public: + /** MMS account Id */ + TInt iMmsAccountId; + + /** MMS account Name */ + TBuf iMmsAccountName; + }; + + +/** +Stores MMS settings. + +@publishedAll +@released +*/ +class CMmsAccounts : public CActive + { +public: + IMPORT_C static CMmsAccounts* NewL( ); + IMPORT_C static CMmsAccounts* NewLC( ); + IMPORT_C virtual ~CMmsAccounts(); + + // Observer functions + IMPORT_C void AddObserverL(MMmsSettingsObserver & aObserver); + IMPORT_C void RemoveObserver(MMmsSettingsObserver & aObserver); + + IMPORT_C TMmsAccountId CreateMMSAccountL(const TDesC& aAccountName, const CMmsSettings& aSettings); + IMPORT_C TInt MaxMMSAccounts(); + + IMPORT_C void GetMMSAccountsL(RArray& aAccountIds) const; + IMPORT_C void DeleteMMSAccountL(const TMmsAccountId& aAccountId); + + IMPORT_C void LoadSettingsL(const TMmsAccountId& aAccountId, CMmsSettings& aSettings); + IMPORT_C void PopulateDefaultSettingsL(CMmsSettings& aSettings); + + IMPORT_C void SaveSettingsL(const TMmsAccountId& aAccountId, const CMmsSettings& aSettings) const; + + IMPORT_C TMmsAccountId DefaultMMSAccountL( ) const; + IMPORT_C void SetDefaultMMSAccountL(const TMmsAccountId& aAccount); + +private: + CMmsAccounts(); + void ConstructL(); + void DoLoadSettingsL(TUint32 aAccountId, CMmsSettings& aSettings); + void DoSaveSettingsL(TUint32 aAccountId, const CMmsSettings& aSettings, const TDesC& aAccountName) const; + + void DoCancel( ); + void RunL( ); + + TUint GetNextEmptyAccountSlotL(); + +private: + enum TMmsSettingsCenRepId + { + EMmsAccountName = 0x00000000, + EMmsSettingsVersion = 0x00000001, + EMmsApplicationID = 0x00000002, + EMmsAddress = 0x00000003, + EMmsCreationMode = 0x00000004, + EMmsSettingsFlags = 0x00000005, + EMmsProxyCount = 0x00000006, + EMmsNapIdCount = 0x00000007, + EMmsAutomaticDownload = 0x00000008, + EMmsValidityPeriod = 0x00000009, + EMmsMaxDownloadSize = 0x0000000A, + EMmsMaxDownloadRetries = 0x0000000B, + EMmsDownloadRetryInterval = 0x0000000C, + EMmsMaxSendMsgSize = 0x0000000D, + EMmsDeviceContentClass = 0x0000000E, + EMmsMaxImageHeight = 0x0000000F, + EMmsMaxImageWidth = 0x00000010, + + EMmsProxyList = 0x00001000, + EMmsNapIdList = 0x00002000, + }; + +private: + CRepository* iRepository; + RPointerArray iObservers; + }; + +#endif // __CMMSACCOUNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cmmssettings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cmmssettings.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,200 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMMSSETTINGS_H__ +#define __CMMSSETTINGS_H__ + + +#include + + +class CRepository; + + +/** +Automatic Download Options. + +@publishedAll +@released +*/ +enum TAutomaticDownloadOptions + { + /** Automatic Download Option Off */ + EAutomaticDownloadOff = 0, + /** Automatic Download Option On */ + EAutomaticDownloadOn, + /** Automatic Download Only When Roaming */ + EAutomaticDownloadOnlyWhenRoaming + }; + + +/** +Creation Mode Options. + +@publishedAll +@released +*/ +enum TCreationMode + { + /** Creation Mode Free */ + ECreationModeFree = 0, + /** Creation Mode Warning */ + ECreationModeWarning, + /** Creation Mode Restricted */ + ECreationModeRestricted + }; + + +/** +Run-time MMS configuration settings. + +Messaging clients should use an instance of this class to specify +and retrieve configuration settings. + +This class should be used with CMmsAccounts to store and restore settings. + +@see CMmsAccounts + +@publishedAll +@released +*/ +class CMmsSettings : public CBase + { +public: + IMPORT_C static CMmsSettings* NewL( ); + IMPORT_C static CMmsSettings* NewLC( ); + IMPORT_C ~CMmsSettings( ); + IMPORT_C void CopyL(const CMmsSettings& aMmsSettings); + + IMPORT_C TInt ApplicationID( ) const; + IMPORT_C void SetApplicationID(const TInt aAppID); + + IMPORT_C TPtrC Address( ) const; + IMPORT_C void SetAddressL(const TDesC& aAddress); + + IMPORT_C TCreationMode CreationMode( ) const; + IMPORT_C void SetCreationModeL(TCreationMode aCreationMode); + + IMPORT_C TInt ProxyCount( ) const; + IMPORT_C TUid GetProxy(TInt aIndex) const; + IMPORT_C void AddProxyL(const TUid aProxy); + IMPORT_C void RemoveProxy(TInt aIndex); + + IMPORT_C TInt NapIdCount( ) const; + IMPORT_C TUid GetNapId (TInt aIndex) const; + IMPORT_C void AddNapIdL(const TUid aNapId); + IMPORT_C void RemoveNapId(TInt aIndex); + + IMPORT_C TBool DisplayNotification( ) const; + IMPORT_C void SetDisplayNotification(TBool aFlag); + + IMPORT_C TAutomaticDownloadOptions AutomaticDownload( ) const; + IMPORT_C void SetAutomaticDownload(TAutomaticDownloadOptions aDownloadOptions); + + IMPORT_C TBool CreationModeReadOnly( ) const; + IMPORT_C void SetCreationModeReadOnly(TBool aFlag); + + IMPORT_C TInt ValidityPeriod( ) const; + IMPORT_C void SetValidityPeriod(const TInt aValidityPeriod); + + IMPORT_C TInt MaxDownloadSize( ) const; + IMPORT_C void SetMaxDownloadSize (const TInt aSize); + + IMPORT_C TBool Priority( ) const; + IMPORT_C void SetPriority (TBool aFlag); + + IMPORT_C TBool HideNumber( ) const; + IMPORT_C void SetHideNumber(TBool aFlag); + + IMPORT_C TBool ReadReport( ) const; + IMPORT_C void SetReadReport(TBool aFlag); + + IMPORT_C TBool DeliveryReport( ) const; + IMPORT_C void SetDeliveryReport(TBool aFlag); + + IMPORT_C TBool ReplyWithHistory( ) const; + IMPORT_C void SetReplyWithHistory (TBool aFlag); + + IMPORT_C TBool AllowDeliveryNotification( ) const; + IMPORT_C void SetAllowDeliveryNotification(TBool aFlag); + + IMPORT_C TBool FilterAdvertisements( ) const; + IMPORT_C void SetFilterAdvertisements(TBool aFlag); + + IMPORT_C TInt MaxDownloadRetries( ) const; + IMPORT_C void SetMaxDownloadRetries(const TInt aRetries); + + IMPORT_C TInt DownloadRetryInterval( ) const; + IMPORT_C void SetDownloadRetryInterval(const TInt aInterval); + + IMPORT_C TInt MaxSendMsgSize( ) const; + IMPORT_C void SetMaxSendMsgSize (const TInt aSize); + + IMPORT_C TBool FullScreenPreview( ) const; + IMPORT_C void SetFullScreenPreview(TBool aFlag); + + IMPORT_C TInt DeviceContentClass( ) const; + IMPORT_C void SetDeviceContentClass(const TInt aClass); + + IMPORT_C TInt MaxImageHeight( ) const; + IMPORT_C void SetMaxImageHeight(const TInt aHeight); + + IMPORT_C TInt MaxImageWidth( ) const; + IMPORT_C void SetMaxImageWidth(const TInt aWidth); + + void RemoveAllProxies(); + void RemoveAllNapIds(); + + TUint32 MmsSettingsFlags() const; + void SetMmsSettingsFlags(TUint32 aFlags); + +private: + CMmsSettings(); + + enum TMmsSettingsFlags + { + ESmsSettingsNoFlags = 0x00000000, + ESmsSettingsDisplayNotification = 0x00000002, + ESmsSettingsCreationModeReadOnly = 0x00000004, + ESmsSettingsPriority = 0x00000008, + ESmsSettingsHideNumber = 0x00000010, + ESmsSettingsReadReport = 0x00000020, + ESmsSettingsDeliveryReport = 0x00000040, + ESmsSettingsReplyWithHistory = 0x00000080, + ESmsSettingsAllowDeliveryNotification = 0x00000100, + ESmsSettingsFilterAdvertisements = 0x00000200, + ESmsSettingsFullScreenPreview = 0x00000400 + }; + +private: + + TUint32 iMmsSettingsFlags; + TInt iApplicationId; + HBufC* iAddress; + TCreationMode iCreationMode; + RArray iProxy; + RArray iNapId; + TAutomaticDownloadOptions iAutomaticDownloadOptions; + TInt iValidityPeriod; + TInt iMaxDownloadSize; + TInt iMaxDownloadRetries; + TInt iDownloadRetryInterval; + TInt iMaxSendMsgSize; + TInt iDeviceContentClass; + TInt iMaxImageHeight; + TInt iMaxImageWidth; + }; + +#endif // __CSMSACCOUNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntdb.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntdb.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1427 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTDB_H__ +#define __CNTDB_H__ + +// System includes +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +// Classes referenced +// +class CContactViewDef; +class CFoundMatches; +class CContactTextDef; +class CContactItem; +class CContactItemViewDef; +class CContactItemFieldSet; +class CContactItemFieldDef; +class CContactActiveCompress; +class CContactActiveRecover; +class CContactDatabase; +class CContactTables; +class CCntFilter; +class CContentType; +class CContactItemField; +class CIdleFinder; +class CContactClientSession; +class CPrivConverter; +class RCntModel; +class CProxyFactory; +class CCntTemplateCache; +class CSortArray; +class CCntIdleSorter; +class MLplPersistenceLayerFactory; +class CContactOpenOperation; +class CDataBaseChangeObserver; +class CContactConverter; + +// Constants +const TInt KMaxContactTextSeperator=4; +const TInt KTextFieldMinimalLength=64; +const TInt KMaxCustomFilterableFields=4; + +const TInt KMajorVersion=1; +const TInt KMinorVersion=0; +const TInt KBuildNumber=40; + + +// +// Classes used for compact +// + +class MContactStorageObserver +/** +Mixin used to observe low disk events + +@publishedAll +@released +*/ + { +public: + virtual void HandleDiskSpaceEvent(TInt aDrive) = 0; + }; + +class MContactUiCompactObserver +/** Mixin used to observe contact database compaction status +@publishedAll +@released +*/ + { +public: + virtual void Step(TInt aStep)=0; + virtual void HandleError(TInt aError)=0; + }; + +class MContactUiActive +/** Mixin used to register the observer. +@publishedAll +@released +*/ + { +public: + virtual void Cancel()=0; + virtual void SetObserver(MContactUiCompactObserver *aObserver)=0; + virtual TInt StepsTogo() const=0; + virtual TInt Step()=0; + virtual TInt Error() const=0; +private: + IMPORT_C virtual void MContactUiActive_Reserved1(); + }; + +class CContactActiveBase : public CBase, public MContactUiActive +/** +@internalTechnology +*/ + { +public: + ~CContactActiveBase(); + void SetObserver(MContactUiCompactObserver *aObserver); + void Cancel(); + TInt StepsTogo() const; + TInt Step(); + TInt Error() const; + void SetContactDatabase(CContactDatabase* aContactDatabase); + void SetFileManager(RCntModel& aCntSvr); + +#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ +protected: + void ConstructL(); + static TInt CompactCallBack(TAny *aThis); +protected: + MContactUiCompactObserver *iObserver; + RCntModel* iCntSvr; + CIdle *iIdle; + TInt iStep; + TInt iError; + CContactDatabase* iContactDatabase; +#endif + }; + +class CContactActiveCompress : public CContactActiveBase +/** +@publishedAll +@released +*/ + { +public: +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) + void ConstructL(RDbNamedDatabase /* &aDataBase */) {}; +#endif + }; + +class CContactActiveRecover : public CContactActiveBase +/** +@publishedAll +@released +*/ + { +public: +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) + void ConstructL(RDbNamedDatabase /* &aDataBase */) {}; +#endif + }; + + + + +class TContactTextDefItem +/** An item in a text definition. + +A TContactTextDefItem has a field type and an optional separator string +with a maximum length of 4 characters. + +@see CContactTextDef +@publishedAll +@released +*/ + { +public: + IMPORT_C TContactTextDefItem(); + IMPORT_C TContactTextDefItem(TFieldType aFieldType); + IMPORT_C TContactTextDefItem(TFieldType aFieldType, const TDesC &aSeperator); +public: + /** The field type. */ + TFieldType iFieldType; + /** The string used to separate the fields in the text definition. */ + TBuf iSeperator; + }; + +class CContactTextDef : public CArrayFixFlat +/** Defines a way of grouping fields to form a string which represents +a contact item. + +A text definition is implemented as an array of text definition items +(TContactTextDefItems). + +For example, CContactDatabase::ReadContactTextDefL() uses a text definition to +build up a string from a contact item. When creating the string, it searches +the item for fields whose type matches one of the fields specified in the text +definition. The contents of the first matching field of each type found in the +item are read into the string. These strings may be separated using a field +separator, which is also specified in the text definition. A separator is not +appended to the last field used to make up the string. It is only inserted when +there is a following non-empty field. + +Additionally, the text definition may also contain a fallback field +type. This is used when none of the fields specified in the text +definition contain any text. If the item's fallback field contains no text +either, or if the fallback field type's value is KUidContactFieldNone, the +text is read from the first non-empty field in the item. + +A contact database can have a default text definition which is set using CContactDatabase::SetTextDefinitionL(). +This may be overridden using the variants of CContactDatabase::ReadContactTextDefL() +which take a CContactTextDef* argument. + +CContactTextDef is derived from CArrayFixFlat, so all +relevant functions can be used, e.g. to add and remove elements. + +@publishedAll +@released +*/ + { + friend class CContactDatabase; + friend class CContactTables; +public: + CContactTextDef(); + IMPORT_C static CContactTextDef* NewL(); + IMPORT_C static CContactTextDef* NewLC(); + static CContactTextDef* NewLC(RReadStream& aStream); + IMPORT_C void SetFallbackField(TFieldType iFieldType); + IMPORT_C TFieldType FallbackField() const; + IMPORT_C TBool ExactMatchOnly(); + IMPORT_C void SetExactMatchOnly(TBool aExactMatchOnly); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); +private: + TFieldType iFallbackFieldType; + TBool iExactMatchOnly;//Default to EFalse cause ReadInTextDef to only match the chosen fields and not attempt a matchall + }; + +class CContactItemViewDef : public CBase +/** A view definition for a contact item. + +When reading or opening a contact item using the CContactDatabase class, +a view definition may be specified to indicate which field data should be +retrieved. See for instance CContactDatabase::ReadContactL(). + +A view definition for a contact item contains an array of field types, a use +(CContactItemViewDef::TUse) and a mode (CContactItemViewDef::TMode). The use +indicates whether the field types contained in the view definition should +be included in or excluded from the view. The mode indicates whether fields +with the hidden attribute should be included or excluded. + +@publishedAll +@released +*/ + { +public: + /** Include or exclude specified fields. */ + enum TUse + { + /** Include specified fields in the view. */ + EIncludeFields, + /** Exclude specified fields from the view. */ + EMaskFields + }; + /** Include or exclude hidden fields.*/ + enum TMode + { + /** Include hidden fields in the view. */ + EIncludeHiddenFields, + /** Exclude hidden fields from the view. */ + EMaskHiddenFields + }; +public: + IMPORT_C static CContactItemViewDef* NewL(TUse aUse, TMode aMode); + IMPORT_C static CContactItemViewDef* NewLC(TUse aUse, TMode aMode); + static CContactItemViewDef* NewLC(RReadStream& aStream); + inline TUid operator[](TInt aIndex) const; + IMPORT_C TInt Find(const CContentType &aContentType) const; + IMPORT_C TInt Find(TFieldType aFieldType) const; + inline TInt Count() const; + inline void Reset(); + IMPORT_C void AddL(TFieldType aFieldType); + IMPORT_C void Remove(TFieldType aFieldType); + IMPORT_C void Remove(TInt aIndex); + inline TUse Use() const; + inline void SetUse(TUse aUse); + inline TMode Mode() const; + inline void SetMode(TMode aMode); + IMPORT_C TBool Contains(const CContactItem& aItem); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C TBool MatchesAll() const; +private: + CContactItemViewDef(TUse aUse,TMode aMode); +private: + CArrayFixFlat iFieldTypes; + TUse iUse; + TMode iMode; + }; + +class CContactViewDef : public CBase +/** Specifies a subset of fields to be loaded when reading a contact item. + +A default view definition is owned by the contact database. +It is set using CContactDatabase::SetViewDefinitionL() and is used in calls +to CContactDatabase::ReadContactL(), ReadContactLC() and ReadContactAndAgentL() +when no view definition is specified. + +The view definition owns the item view definition (see the CContactItemViewDef +class), which stores the view definition's field types, use and mode. + +The following functions declared in class CContactViewDef have not been +implemented:- Groups(), AddL(). + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactViewDef* NewL(); + IMPORT_C static CContactViewDef* NewLC(); + IMPORT_C static CContactViewDef* NewL(CContactItemViewDef* aItemDef); + IMPORT_C static CContactViewDef* NewLC(CContactItemViewDef* aItemDef); + static CContactViewDef* NewLC(RReadStream& aStream); + IMPORT_C ~CContactViewDef(); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C CContactItemViewDef& ItemDef() const; + /** This function is not implemented */ + IMPORT_C CContactIdArray& Groups() const; + /** This function is not implemented. + @param aFieldType The field type to append to the array of field types. */ + inline void AddL(TFieldType aFieldType); +private: + CContactViewDef(); + void ConstructL(CContactItemViewDef* aItemDef); +private: + CContactItemViewDef* iItemDef; +// CContactIdArray* iGroupIds; // unused for now + }; + +class TContactIter +/** Iterates through the sorted contact items in a contact database. + +A value of KNullContactId is returned by the iterator if a requested item cannot +be found. + +@publishedAll +@released +*/ + { +public: + IMPORT_C TContactIter(CContactDatabase &aDatabase); + IMPORT_C TContactItemId FirstL(); + IMPORT_C TContactItemId NextL(); + IMPORT_C TContactItemId PreviousL(); + IMPORT_C TContactItemId LastL(); + IMPORT_C void GotoL(TContactItemId aContactId); + IMPORT_C void Reset(); +private: + void GotoIndexL(TInt aPos); +private: + CContactDatabase &iDatabase; + TContactItemId iCursorId; + }; + +class MIdleFindObserver +/** The interface for an asynchronous find observer. + +An object which implements this interface is passed to the asynchronous find +functions defined in class CContactDatabase, (FindAsyncL() and FindInTextDefAsyncL()). +The observer would typically notify the user of the progress of the operation. + +@publishedAll +@released +*/ + { +public: + /** Asynchronous find observer callback. + + If an observer is supplied to CContactDatabase::FindAsyncL() + or FindInTextDefAsyncL(), this callback function is called by CIdle::RunL() + when nothing of a higher priority can be scheduled. It is called for every + 16 items searched to give the application a chance to update its search status. + + An implementation might test for and handle errors and retrieve information + about the progress of the search. This information may be retrieved using + functions provided by the CIdleFinder class. */ + virtual void IdleFindCallback()=0; + }; + +struct SFindInTextDefWordParser +/** Search string parser struct. + +An object of this type is used in the callback parser function passed to +CContactDatabase::FindInTextDefLC(). The parser function must walk +through and parse iSearchString, adding any words found to iWordArray. + +@publishedAll +@released +*/ + { +public: + inline SFindInTextDefWordParser(const TDesC *aSearchString, CDesCArray *aWordArray) : iSearchString(aSearchString), iWordArray(aWordArray) + /** Initialises the search string and the word array. + + @param aSearchString Pointer to the input string to be parsed. + @param aWordArray Pointer to the array to which words parsed from the input + string should be added. */ + {}; +public: + /** Pointer to the input string to be parsed. */ + const TDesC *iSearchString; + /** Pointer to the array to which words parsed from the input string should be + added. */ + CDesCArray *iWordArray; + }; + +class CIdleFinder : public CIdle +/** Provides information about the progress of an asynchronous contact database search, +and can be used to get the results of the search. + +An instance of this class is returned by calls to CContactDatabase::FindAsyncL() +and CContactDatabase::FindInTextDefAsyncL(). + +@publishedAll +@released +*/ + { +public: + ~CIdleFinder(); + IMPORT_C TBool IsComplete() const; + IMPORT_C CContactIdArray *TakeContactIds(); + IMPORT_C TInt Error() const; + TInt RunError(TInt aError); +private: + friend class CContactDatabase; + static CIdleFinder *NewL(CContactDatabase &aContactDatabase, const TDesC& aText, const CContactItemFieldDef *aFieldDef, MIdleFindObserver *aObserver); + static CIdleFinder *NewL(CContactDatabase &aContactDatabase, const MDesCArray* aFindWords,const CContactTextDef* aTextDef, MIdleFindObserver *aObserver, const TCallBack &aWordParserCallback); + void DoCancel(); + void Start(); + static TInt CallbackL(TAny *aSelf); + void ConstructL(const TDesC *aText, const MDesCArray* aFindWords, const TCallBack *aWordParserCallback); + TBool ScanForMatchL(const TDesC &aFieldText,const TDesC &aFindText, CFoundMatches *aFoundMatches) const; + TBool CheckFindL(TContactItemId aContactId) const; + TBool CheckFindL() const; + CIdleFinder(CContactDatabase &aContactDatabase, const CContactItemFieldDef *aFieldDef, const CContactTextDef* aTextDef, MIdleFindObserver *aObserver); + TBool doFindL(); + + enum TAsyncFindState + { + EFindInBlobFinished =0x00000001, + EFindInIdentityFinished =0x00000002, + EFindInEmailFinished =0x00000004, + EFindInTextDefFinished =0x00000008 + }; +private: + CContactDatabase *iContactDatabase; + CContactIdArray *iIdsFound; + TBool iOwnsIds; + CDesCArray* iFindWords; + TInt iReserved1; + TInt iReserved2; + TInt iReserved3; + const CContactItemFieldDef* iFieldDef; + const CContactTextDef* iTextDef; + MIdleFindObserver *iObserver; + TInt iError; + TCallBack iWordParserCallback; + TInt iReserved4; + TInt iReserved5; + TInt iReserved6; + TInt iReserved7; //was TDbColNo + TInt iReserved8; //was RDbView + TInt iReserved9; //was RDbView + TInt iReserved10; //was CIdentityTableColSet* + }; + +class MContactDbPrivObserver +/** Provides notification of database changes to clients. +* Provides information about database change event details and the type of changed event. +@publishedAll +@released +*/ + { +public: + +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) + virtual void HandleDatabaseEventL(RDbNotifier::TEvent)=0; +#endif + virtual void HandleDatabaseEventL(const TContactDbObserverEvent &aEvent)=0; + }; + + +class MContactSortObserver +/** +@publishedAll +@deprecated +*/ + { +public: + /** + @deprecated + */ + virtual void HandleSortEventL(TInt aContactsSorted, TInt aContactsTotal)=0; + }; + +class MConverterCallBack +/** +Interface class for providing Intra-Contact Properties during a PBAP specific contacts export. +@prototype +@internalTechnology +*/ +{ + public: + /** + PBAP clients are supposed to provide any information regarding the contact item represented by aContactId. + This information should be in form of standard vCard property, all such properties should be appended to the array aPropertyList. + */ + virtual void AddIntraContactPropertiesL(const TContactItemId& aContactId, CArrayPtr* aPropertyList) = 0; +}; + +enum TVCardVersion +/** +Specifies type of export of contact items. +PBAP clients should use EPBAPVCard21 and EPBAPVCard30. +@prototype +@internalTechnology +*/ + { + EVCardUDEF = -1, + EVCard21 = 0, + EVCard30, + EPBAPVCard21, + EPBAPVCard30 + }; + +class CContactDatabase : public CBase, public MContactDbPrivObserver, public MContactStorageObserver +/** A database of contact items. + +Contact items can be added to and removed from the database and items in the +database can be opened or read. To edit an item, it must first be opened. +Changes to the item can then be committed using CommitContactL() +(committing can only take place to an open item). + +If the available disk space is less than 128 kilobytes then changes to the +contact database cannot be started, and methods such as CreateL() or CommitContactL() +will leave with a KErrDiskFull error. Less obviously OpenL() can also fail with +KErrDiskFull when trying to update the system template. + +Each item has an access count. An item cannot be fully deleted unless its +access count is zero. This is to prevent items which have been +synchronised with another contacts application from being deleted. +Also, if the item is a template, it cannot be deleted if other items are based +on it. + +More than one contact database can exist on a phone, but there is a +default contact database. Its filename is contacts.cdb. It +can be moved between drives. + +CContactDatabase implements searching and sorting and also provides +separate phone number matching functions. These provide a fast way of indexing +and looking up phone numbers, e.g. for looking up caller IDs on incoming +calls. + +The database owns speed dial information. This is a mapping between a single +digit integer and a telephone number. There may be up to 9 speed dial telephone +numbers; each of them belongs to a contact item in the database. If a +contact item is deleted, its speed dial mapping is removed. + +The following functions defined in class CContactDatabase are not +supported. If called, they leave with KErrNotSupported. + +- ReplacePrefL() + +- ReadPrefL() + +- CreatePrefL() + +@publishedAll +@released +*/ + { + friend class TContactIter; + friend class CIdleFinder; + friend class CCntIdleSorter; + friend class CContactLocalView; + friend class CContactOpenOperation; + friend class RContactRemoteView; + friend class CViewIteratorProxyManager; + friend class CCollectionProxy; + friend class CContactActiveBase; +public: + class TSortPref + /** Specifies the field type and order preferences used for sorting items in the + contacts database. + + The contents of the first field in a contact item matching the field type + is used as the data to sort on. The order can either be ascending or descending. + + @see CContactDatabase::SortL() + @see CContactDatabase::SortArrayL() + @publishedAll + @deprecated + */ + { + public: + /** The sort order. */ + enum TOrder + { + /** Ascending sort order. */ + EAsc, + /** Descending sort order. */ + EDesc + }; + public: + inline TSortPref(); + inline TSortPref(TFieldType aFieldType,TOrder aOrder=EAsc); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C void InternalizeL(RReadStream& aStream); + public: + /** Specifies whether the sort should be ascending or descending. */ + TOrder iOrder; + /** The first field matching this field type is used for the text to sort on. */ + TFieldType iFieldType; + }; + + /** Import and export format flags. Contacts can be imported into + or exported from the contact database as vCards. + + The following options are available during import and export. + + @deprecated This enum is deprecated. It has been replaced by the TOptions enum in + the plugin convertor class CContactVCardConverter, so that each plugin converter + can define its own options. */ + enum TOptions + { + EDefault=0x0000, + /** Handle Symbian's extended vCard format options. */ + EIncludeX =0x0001, + /** Support non-standard extensions requried by Symbian PC connectivity software + and Microsoft, amongst others. */ + ETTFormat =0x0002, + /** Don't export the contact ID (for exporting only). */ + EExcludeUid=0x0004, + /** Decrease the contact's access count when importing and exporting. */ + EDecreaseAccessCount=0x0008, + /** Only import the first contact in the read stream (for importing only). */ + EImportSingleContact=0x0010, + /** Increase the contact's access count when importing and exporting. */ + EIncreaseAccessCount=0x0020, + /** Sets a contact item to the local time when importing. */ + ELocalTime=0x0040, + /** Allows you to set a template to a contact item that does not exist. */ + ENullTemplateId=0x0080, + /** For use by implementor of converter plug-in. */ + EConverterDefined1=0x0100, + /** For use by implementor of converter plug-in. */ + EConverterDefined2=0x0200, + /** For use by implementor of converter plug-in. */ + EConverterDefined3=0x0400, + /** For use by implementor of converter plug-in. */ + EConverterDefined4=0x0800, + /** For use by implementor of converter plug-in. */ + EConverterDefined5=0x1000, + /** For use by implementor of converter plug-in. */ + EConverterDefined6=0x2000, + /** For use by implementor of converter plug-in. */ + EConverterDefined7=0x4000, + /** For use by implementor of converter plug-in. */ + EConverterDefined8=0x8000, + /** Reserved for use by Symbian. */ + EConverterReserved1=0x00010000, + /** Reserved for use by Symbian. */ + EConverterReserved2=0x00020000, + /** Reserved for use by Symbian. */ + EConverterReserved3=0x00040000, + /** Reserved for use by Symbian. */ + EConverterReserved4=0x00080000, + /** Reserved for use by Symbian. */ + EConverterReserved5=0x00100000, + /** Reserved for use by Symbian. */ + EConverterReserved6=0x00200000, + /** Reserved for use by Symbian. */ + EConverterReserved7=0x00400000, + /** Reserved for use by Symbian. */ + EConverterReserved8=0x00800000, + /** Reserved for use by Symbian. */ + EConverterReserved9=0x01000000, + /** Reserved for use by Symbian. */ + EConverterReserved10=0x02000000, + /** Reserved for use by Symbian. */ + EConverterReserved11=0x04000000, + /** Reserved for use by Symbian. */ + EConverterReserved12=0x08000000, + /** Reserved for use by Symbian. */ + EConverterReserved13=0x10000000, + /** Reserved for use by Symbian. */ + EConverterReserved14=0x20000000, + /** Reserved for use by Symbian. */ + EConverterReserved15=0x40000000, + /** Reserved for use by Symbian. */ + EConverterReserved16=0x80000000 + }; + /** Specifies whether the database can be accessed from single or multiple threads. */ + enum TThreadAccess + { + /** Allows access to the contacts database from a single thread only. */ + ESingleThread, + /** Allows for a multi-threaded program to access the contact database from multiple + threads but note that the contacts model provides no synchronisation support + for such use. */ + EMultiThread + }; +/** +@internalComponent +*/ + enum TSortDataSource + { + ENoOrder, + EUsesIdentityTableOnly, + EUsesAllTables, + EIdentityTableNotUsed //Not used + }; +public: + IMPORT_C static CContactDatabase* OpenL(TThreadAccess aAccess=ESingleThread); + IMPORT_C static CContactDatabase* OpenL(const TDesC& aFileName,TThreadAccess aAccess=ESingleThread); + IMPORT_C static CContactDatabase* CreateL(TThreadAccess aAccess=ESingleThread); + IMPORT_C static CContactDatabase* CreateL(const TDesC& aFileName,TThreadAccess aAccess=ESingleThread); + IMPORT_C static CContactDatabase* ReplaceL(TThreadAccess aAccess=ESingleThread); + IMPORT_C static CContactDatabase* ReplaceL(const TDesC& aFileName,TThreadAccess aAccess=ESingleThread); + // asynchronous Open + IMPORT_C static CContactOpenOperation* Open(TRequestStatus& aStatus, TThreadAccess aAccess=ESingleThread); + IMPORT_C static CContactOpenOperation* Open(const TDesC& aFileName, TRequestStatus& aStatus, TThreadAccess aAccess=ESingleThread); + IMPORT_C static TBool DatabaseDrive(TDriveUnit &aDriveUnit); + inline static TInt NullUidValue(); + IMPORT_C static void SetDatabaseDriveL(TDriveUnit aDriveUnit, TBool aCopy=ETrue); + IMPORT_C static void GetDefaultNameL(TDes &aDes); + IMPORT_C static void DeleteDefaultFileL(); + // database file mangement + IMPORT_C static void DeleteDatabaseL(const TDesC& aFileName); + IMPORT_C static CDesCArray* ListDatabasesL(); + IMPORT_C static CDesCArray* ListDatabasesL(TDriveUnit aDriveUnit); + IMPORT_C static TBool DefaultContactDatabaseExistsL(); + IMPORT_C static TBool ContactDatabaseExistsL(const TDesC& aFileName); + IMPORT_C ~CContactDatabase(); + + IMPORT_C void SetViewDefinitionL(CContactViewDef* aView); + IMPORT_C void SetTextDefinitionL(CContactTextDef* aView); + IMPORT_C const CContactTextDef* TextDefinition() const; + IMPORT_C TInt CountL(); + IMPORT_C void SetDbViewContactType(const TUid aUid); + IMPORT_C TUid GetDbViewContactType() const; + + + IMPORT_C TContactItemId AddNewContactL(CContactItem& aContact); + + IMPORT_C CContactItem* CreateContactGroupL(TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactGroupLC(TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactGroupL(const TDesC& aGroupLabel,TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactGroupLC(const TDesC& aGroupLabel,TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactCardTemplateL(const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactCardTemplateLC(const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactCardTemplateL(const CContactItem* aTemplate,const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); + IMPORT_C CContactItem* CreateContactCardTemplateLC(const CContactItem* aTemplate,const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); + + IMPORT_C CContactIdArray* GetCardTemplateIdListL() const; + IMPORT_C CContactIdArray* GetGroupIdListL() const; + IMPORT_C void AddContactToGroupL(TContactItemId aItemId, TContactItemId aGroupId); + IMPORT_C void AddContactToGroupL(CContactItem& aItem, CContactItem& aGroup); + IMPORT_C void AddContactToGroupL(TContactItemId aItemId, TContactItemId aGroupId,TBool aInTransaction); + IMPORT_C void RemoveContactFromGroupL(CContactItem& aItem, CContactItem& aGroup); + IMPORT_C void RemoveContactFromGroupL(TContactItemId aItemId, TContactItemId aGroupId); + inline TInt GroupCount() const; + inline TInt TemplateCount() const; + + // speed dial functions + IMPORT_C void SetFieldAsSpeedDialL(CContactItem& aItem, TInt aFieldIndex, TInt aSpeedDialPosition); + IMPORT_C TContactItemId GetSpeedDialFieldL(TInt aSpeedDialPosition, TDes& aPhoneNumber); + IMPORT_C void RemoveSpeedDialFieldL(TContactItemId aContactId, TInt aSpeedDialPosition); + + // reading contacts from the db + IMPORT_C CContactItem* ReadMinimalContactL(TContactItemId aContactId); + IMPORT_C CContactItem* ReadMinimalContactLC(TContactItemId aContactId); + IMPORT_C CContactItem* ReadContactL(TContactItemId aContactId); + IMPORT_C CArrayPtr* ReadContactAndAgentL(TContactItemId aContactId); + IMPORT_C CContactItem* ReadContactL(TContactItemId aContactId,const CContactItemViewDef& aViewDef); + IMPORT_C CContactItem* ReadContactLC(TContactItemId aContactId); + IMPORT_C CContactItem* ReadContactLC(TContactItemId aContactId,const CContactItemViewDef& aViewDef); + IMPORT_C void ReadContactTextDefL(const CContactItem &aItem, TDes &aResult); + IMPORT_C void ReadContactTextDefL(const CContactItem &aItem, TDes &aResult,CContactTextDef* aTextDef); + IMPORT_C void ReadContactTextDefL(TContactItemId aContactId, TDes &aResult); + IMPORT_C void ReadContactTextDefL(TContactItemId aContactId, TDes &aResult,CContactTextDef* aTextDef); + IMPORT_C CContactItem* OpenContactL(TContactItemId aContactId); + IMPORT_C CContactItem* OpenContactL(TContactItemId aContactId,const CContactItemViewDef& aViewDef); + IMPORT_C CContactItem* OpenContactLX(TContactItemId aContactId); + IMPORT_C CContactItem* OpenContactLX(TContactItemId aContactId,const CContactItemViewDef& aViewDef); + IMPORT_C void CloseContactL(TContactItemId aContactId); + IMPORT_C void CommitContactL(const CContactItem& aContact); + IMPORT_C void DeleteContactL(TContactItemId aContactId); + IMPORT_C void DeleteContactsL(const CContactIdArray& aContactIds); + IMPORT_C CArrayPtr* ImportContactsL(const TUid& aFormat,RReadStream& aReadStream,TBool& aImportSuccessful,TInt aOption); + IMPORT_C void ExportSelectedContactsL(const TUid& aFormat,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOption,TBool aExportPrivateFields=ETrue); + IMPORT_C void ExportSelectedContactsL(const TUid& aFormat,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOption,const Versit::TVersitCharSet aCharSet, TBool aExportPrivateFields=ETrue); + IMPORT_C void CompactL(); + + IMPORT_C CContactIdArray* FindLC(const TDesC& aText,const CContactItemFieldDef *aFieldDef); + IMPORT_C CIdleFinder* FindAsyncL(const TDesC& aText,const CContactItemFieldDef *aFieldDef, MIdleFindObserver *aObserver); + IMPORT_C CContactIdArray* FindInTextDefLC(const MDesCArray& aFindWords, const TCallBack &aWordParserCallback); + IMPORT_C CContactIdArray* FindInTextDefLC(const MDesCArray& aFindWords,CContactTextDef* aTextDef, const TCallBack &aWordParserCallback); + IMPORT_C CIdleFinder* FindInTextDefAsyncL(const MDesCArray& aFindWords, MIdleFindObserver *aObserver, const TCallBack &aWordParserCallback); + IMPORT_C CIdleFinder* FindInTextDefAsyncL(const MDesCArray& aFindWords,const CContactTextDef* aTextDef, MIdleFindObserver *aObserver, const TCallBack &aWordParserCallback); + IMPORT_C CContactIdArray* SortArrayL(const CContactIdArray* aIdArray, const CArrayFix* aSortOrder); + IMPORT_C CContactIdArray* SortArrayLC(const CContactIdArray* aIdArray, const CArrayFix* aSortOrder); + IMPORT_C void SortByTypeL(CArrayFix* aSortOrder); + IMPORT_C void SortL(CArrayFix* aSortOrder); + IMPORT_C void SortAsyncL(CArrayFix* aSortOrder, TRequestStatus& aStatus); + IMPORT_C void CancelAsyncSort(); + IMPORT_C void SortAsyncL(CArrayFix* aSortOrder, TRequestStatus& aStatus, MContactSortObserver& aObserver); + + IMPORT_C void SetOperationTimeOutL(const TInt aMicroSeconds) const; + IMPORT_C TPtrC FileUid(); + IMPORT_C CContactActiveCompress* CreateCompressorLC(); + IMPORT_C CContactActiveRecover* CreateRecoverLC(); + IMPORT_C void RecoverL(); + IMPORT_C TBool IsDamaged() const; + IMPORT_C TBool CompressRequired(); + IMPORT_C void CloseTables(); + IMPORT_C void OpenTablesL(); + + //New Phone Matching function, takes a number as a TDesc& and will match from the right of the string + //by the the number defined + IMPORT_C CContactIdArray* MatchPhoneNumberL(const TDesC& aNumber, TInt aMatchLengthFromRight); + + + IMPORT_C const CContactIdArray* SortedItemsL(); + IMPORT_C TContactItemId TemplateId() const; + IMPORT_C CContactItem* CreateOwnCardLC(); + IMPORT_C CContactItem* CreateOwnCardL(); + IMPORT_C TContactItemId OwnCardId() const; + IMPORT_C void SetOwnCardL(const CContactItem& aContact); + +// Preferred Template + IMPORT_C TContactItemId PrefTemplateId() const; + IMPORT_C void SetPrefTemplateL(const CContactItem& aContact); + +// Current item + IMPORT_C void SetCurrentItem(const TContactItemId aContactId); + IMPORT_C TContactItemId GetCurrentItem() const; + +// Connectivity + IMPORT_C void SetDateFormatTextL(const TDesC& aFormat); + IMPORT_C void FilterDatabaseL(CCntFilter& aFilter); + IMPORT_C CContactIdArray* ContactsChangedSinceL(const TTime& aTime); + IMPORT_C TContactSyncId SetLastSyncDateL(const TTime& aSyncDate); + IMPORT_C void SetLastSyncDateL(TContactSyncId aSyncId, const TTime& aSyncDate); + IMPORT_C void GetLastSyncDateL(TContactSyncId aSyncId, TTime& aSyncDate); + + IMPORT_C TInt FileSize() const; + IMPORT_C TInt WastedSpaceInBytes() const; + IMPORT_C TUint ConnectionId() const; + IMPORT_C const CContentType &TemplateContentType(const CContactItemField &aField) const; + IMPORT_C TVersion Version() const; + IMPORT_C TInt64 MachineId() const; + IMPORT_C TContactItemId ICCTemplateIdL(); + IMPORT_C TContactItemId ICCTemplateIdL(TUid aPhonebookUid); + IMPORT_C TContactItemId PhonebookGroupIdL(); + +public: // For test code only + IMPORT_C void DamageDatabaseL(TInt aSecretCode); // Don't use this, you don't really want to damage your database do you? + IMPORT_C void OverrideMachineUniqueId(TInt64 aMachineUniqueId); + IMPORT_C TInt CntServerResourceCount(); + IMPORT_C void SetCntServerHeapFailure(TInt aTAllocFailType,TInt aRate); + IMPORT_C CContactIdArray* DeletedContactsLC(); + IMPORT_C void ResetServerSpeedDialsL(); + +public: // For cnt server only +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) + void HandleDatabaseEventL(RDbNotifier::TEvent) {}; +#endif + IMPORT_C void HandleDatabaseEventL(const TContactDbObserverEvent &aEvent); + IMPORT_C TInt GetCurrentDatabase(TDes& aDatabase) const; + IMPORT_C TInt SetCurrentDatabase(const TDesC& aDatabase) const; + + IMPORT_C void StoreSortOrderL(); + IMPORT_C void RestoreSortOrderL(); + IMPORT_C const CArrayFix* SortOrder() const; + //Contact Hint Field Access + + /** Contact view filter flags. + + These flags define the bits that can be set in filtered views (CContactFilteredView) + and in the filter passed to CContactDatabase::ContactMatchesHintFieldL() for + comparing against contact view items (CViewContact). + + If the item's bit field and the view's filter have the same settings for the + CContactDatabase::EHome and CContactDatabase::EWork flags and any of the other + flags are set in both, a match occurs and the item is included in the view. + + Filters only apply to non-hidden contact fields with content. */ + enum TContactViewFilter + { + /** The view is unfiltered; it includes all contact items. */ + EUnfiltered =0x00000000, + /** The filter includes items that have an email address. */ + EMailable =0x00000001, + /** The filter includes items that have a mobile telephone number. */ + ESmsable =0x00000002, + /** The filter includes items that have a landline telephone number. */ + ELandLine =0x00000004, + /** The filter includes items that have a fax number. */ + EFaxable =0x00000008, + /** The filter includes items that are phonable. (All items with any of the above + three flags set also have this flag set). */ + EPhonable =0x00000010, + /** The filter excludes items without a work telephone number or email address. */ + EWork =0x00000020, + /** The filter excludes items without a home telephone number or email address. */ + EHome =0x00000040, + /** The filter includes items that have a non-empty ring tone field (a ring tone + that is associated with the item). */ + ERingTone =0x00000080, + /** The filter includes items that have a non-empty voice dial field (a voice + recording associated with a telephone number field in the item). */ + EVoiceDial =0x00000100, + /** The filter includes items that have any non empty instant messaging address field. */ + EIMAddress =0x00000200, + /** The filter includes items that have a non empty Wireless Village ID field. + An item with this flag set will also have the EIMAddress flag set. */ + EWirelessVillage = 0x00000400, + /** Reserved filters for future use. */ + ECustomFilter1 = 0x00000800, + /** Reserved filters for future use. */ + ECustomFilter2 = 0x00001000, + /** Reserved filters for future use. */ + ECustomFilter3 = 0x00002000, + /** Reserved filters for future use. */ + ECustomFilter4 = 0x00004000 + }; + + IMPORT_C TBool ContactMatchesHintFieldL(TInt aBitWiseFilter,TContactItemId aContactId); +public: // for vCard converter only + IMPORT_C void DatabaseBeginLC(TBool aIsInTransaction); + IMPORT_C void DatabaseCommitLP(TBool aIsInTransaction); + IMPORT_C CContactItem *UpdateContactLC(TContactItemId aContactId,CContactItem* aNewContact); + IMPORT_C TContactItemId doAddNewContactL(CContactItem& aContact,TBool aIsTemplate,TBool aIsInTransaction); + IMPORT_C void doCommitContactL(const CContactItem& aContact,TBool aIsInTransaction, TBool aSendChangedEvent); + IMPORT_C TContactItemId ContactIdByGuidL(const TDesC& aGuid); + IMPORT_C void doDeleteContactL(TContactItemId aContactId, TBool aIsInTransaction, TBool aSendChangedEvent, TBool aDecAccessCount=EFalse); + IMPORT_C CContactItemViewDef* AllFieldsView(); +public: // For Symbian use only + IMPORT_C void DatabaseBeginL(TBool aIsInTransaction); + IMPORT_C void DatabaseCommitL(TBool aIsInTransaction); + IMPORT_C void DatabaseRollback(); + IMPORT_C void SetSortedItemsList(CContactIdArray* aSortedItems, CArrayFix* aSortOrder); + IMPORT_C CContactIdArray* UnfiledContactsL(); + IMPORT_C static void RecreateSystemTemplateL(const TDesC& aFileName); +public: // For Contacts Lock Server use only + IMPORT_C static CContactDatabase* LockServerConnectL(const TDesC& aFileName); + IMPORT_C static CContactDatabase* LockServerConnectL(const TDesC& aFileName, TInt aOperation); + IMPORT_C TInt LockServerCallBackL(TUint aServerOperation); + IMPORT_C void LockServerCleanup(); +public: + IMPORT_C void ExportSelectedContactsL(const TUid& aFormat, const CContactIdArray& aSelectedContactIds, RWriteStream& aWriteStream, TInt aOption, const TInt64 aContactFieldFilter, MConverterCallBack* aCallback, const TVCardVersion aVersion, const TBool aExportTel, Versit::TVersitCharSet aCharSet = Versit::EUTF8CharSet, TBool aExportPrivateFields = ETrue); +private: + //for cntiter + TInt ContactPosL(TContactItemId aContactId); + TInt DoGotoL(TContactItemId aContactId); + + void DoReadContactTextDefL(const CContactItemFieldSet* aFieldSet,TDes& aResult,CContactTextDef* aTextDef); + CContactItem* OpenNoMergeLCX(TContactItemId aContactId); + + void FetchGroupAndTemplateListsL(); + +public: + void CancelNotifyRequestL(); + TBool IsICCSynchronisedL(); + + //for LocalView + void AddObserverL(MContactDbObserver& aChangeNotifier); + void RemoveObserver(const MContactDbObserver& aChangeNotifier); + + void OpenDatabaseAsyncL(TRequestStatus& aStatus, const TDesC& aFileName = KNullDesC); + static void CleanupLastLockedContact(TAny *aDatabase); + +private: + CContactConverter& CContactDatabase::ConverterL(const TUid& aFormat); + CContactConverter& CContactDatabase::ConverterL(const TUid& aFormat, const TInt64 aContactFieldFilter, MConverterCallBack* aCallback, const TVCardVersion aVersion,const TBool aExportTel); + static void CleanupDatabaseRollback(TAny *aDatabase); + + CContactIdArray* SortLC(const CArrayFix* aSortOrder, const CContactIdArray* aIdArray); + TBool CheckType(TUid aUid) const; + void SortDuplicatesL(const CArrayFix& aSortOrder,CSortArray& aList,TInt aPos); + void SortDuplicatesL(const CArrayFix& aSortOrder,CSortArray& aList, + TInt aIndex,TInt aStartPos,TInt aEndPos); + TBool AddContactToSortListL(TContactItemId aReqId, TContactItemId& aActualId,CBase* aItems, TUid& aFieldType, TBool aHasSortOrder); + void RemoveFromSortArray(TContactItemId aContactId); + void HandleDbObserverEventGroupDeletedL(const TContactItemId aContactId); + void RemoveFromGroupIds(const TContactItemId aContactId); + +public: + static void CleanupTableCancel(TAny *aTable); +/** A text buffer of KTextFieldMinimalLength used during sorting and searching of contacts */ + typedef TBuf TTextFieldMinimal; + static TUid SpeedDialFieldUidFromSpeedDialPosition(TInt aSpeedDialPosition); + void HandleDiskSpaceEvent(TInt aDrive); + + /** State of database connection + */ + enum TDbConnState + { + /** Database is open, connection is available for use. */ + EDbConnectionOpen = 0, + /** Initial state. */ + EDbConnectionNotReady, + /** Asynchronous Open failed. */ + EDbConnectionFailed, + /** A Rollback has occurred and a Recover is required now. */ + EDbConnectionRecoverRequired, + /** Write access is locked during backup. */ + EDbConnectionWriteLockedForBackup, + /** The database has been closed whilst a Restore is in progress. */ + EDbConnectionClosedForRestore, + /** Restore is in progress need to close after current transaction. */ + EDbConnectionNeedToCloseForRestore, + }; + /** Currently unused */ + enum TDirection {EAsc,EDesc}; //unused + void SetDbConnectionState(TDbConnState aDbConnectionState); +private: + void CheckDbConnForWriteL() const; + void CheckDbConnForReadL() const; + void CheckDbConnForRecoverL() const; + void CheckTemplateField(CContactItem& aCnt); + static void ValidateDatabaseNameL(const TParse& aParseName); + void StartAsyncActivityL(); + void EndAsyncActivityL(); + TBool DatabaseReadyL() const; + enum TSvrSessionType //unused + { + // Server Session is persistent, for Open(L), CreateL or ReplaceL + ESvrSessionPersistent, + // Server Session is temporary, for a simple static API + ESvrSessionTemporary, + // Session is from the Contacts Lock Server + ESvrSessionFromLockServer, + }; +private: // objec construction/destruction + + CContactDatabase(); + static CContactDatabase* NewLC(); + void ConstructL(); + void CreateViewDefL(); + MLplPersistenceLayerFactory* FactoryL(); + +private: + CContactItem* doCreateContactGroupLC(const TDesC& aGroupLabel = KNullDesC); + void AddCntToOpenedGroupL(TContactItemId aItemId, CContactItem& aGroup); + void ReadTemplateIds(); + void AddToTemplateListL(const TContactItemId aNewTemplateId); + void RemoveFromTemplateList(const TContactItemId aOldTemplateId); + TBool SystemTemplateFieldsValid(const CContactItem& aContact); + void RespondToEventL(const TContactDbObserverEventType aEventType, const TContactItemId aContactId); + void HandleDbObserverEventGroupOrContactChangedL(const TContactItemId aContactId); + void HandleDbObserverEventGroupOrContactAddedL(const TContactDbObserverEventType aEventType, const TContactItemId aContactId); + TBool CheckSortError(TInt aError); + TInt NextExistingL(TInt aIndex); + TInt PreviousExistingL(TInt aIndex); + void ReSortL(CArrayFix* aSortOrder); + void InsertInSortArray(const CContactItem& aContact); + void MoveInSortArray(const CContactItem& aContact); + void InsertInSortArrayL(const CContactItem& aContact); + void MoveInSortArrayL(const CContactItem& aContact); + TInt NewSortIndexL(const CContactItem& aContact,TInt aStartPos,TInt aEndPos); + TInt CompareSortFieldsL(const CContactItem& aContact); + void ConstructTableUsageFlagsFromSortOrderL(TInt& aFlags); + void LoadSyncPluginL(); + void DeleteContactSendEventActionL(TContactItemId aContactId, TCntSendEventAction aActionType); + +private: + // Member variables + RCntModel* iCntSvr; //was RDbNamedDatabase iDatabase; + CProxyFactory* iProxyFactory; //was RDbs iDbsSession; + TDbConnState iDbConnectionState; //was CContactClientSession* iContactClientSession; + CDataBaseChangeObserver* iDataBaseObserver; //was CPrivateDbChangeNotifier* iDbChangeNotifier; + CCntIdleSorter* iIdleSorter; //was CPrivateSvrSessionManager* iServerSessionManager; + CPrivConverter* iConv; //was TContactItemId iLastLockedContactId; + TBool iTablesOpen; //was TContactItemId iTemplateId; + CContactItemViewDef* iAllFieldsView; //was TContactItemId iOwnCardId; + TUid iDbViewContactType; //used to select which contact type to sort / search on + + //These two members are accessed via the inline functions! + CContactIdArray* iCardTemplateIds; + CContactIdArray* iGroupIds; + + CCntTemplateCache* iTemplateCache; //was CContactTables* iItemTable; + CContactTextDef* iTextDef; //remains + CContactIdArray* iSortedItems; //remains + CContactViewDef* iView; //remains + + // Used in SetLastSyncDateL() and GetLastSyncDateL() + TTime iSyncDate; //was TInt64 iMachineUniqueId; + TCollationMethod iCollateMethod; //remains: used for sorting contacts + + TInt iAsyncActivityCount; + CContactSynchroniser* iContactSynchroniser; //a handle to the synchroniser plugin + CArrayFix* iSortOrder; // holds a sort order passed into SortL(), as in cntmodelv1, + // for delayed deletion to maintain backwards compatibility + }; + + +class CContactChangeNotifier : public CBase +/** Receives events reporting changes to a contact database. + +After the change notifier has been created, it notifies the specified +observer whenever a change takes place to the database. + +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CContactChangeNotifier(); + IMPORT_C static CContactChangeNotifier* NewL(CContactDatabase& aDatabase, MContactDbObserver *aObserver); +private: + CContactChangeNotifier(CContactDatabase& aDatabase, MContactDbObserver *aObserver); + void ConstructL(); +private: + CContactDatabase &iDatabase; + MContactDbObserver* iObserver; + }; + + +/** The UID of the default vCard converter implemented by an ECom plugin. */ +#define KUidEComCntVCardConverterDefaultImplementation 0x102035F9 +/** The UID of the default vCard converter plugin implementation. This +implementation is independent of the plugin framework used. */ +#define KUidVCardConvDefaultImpl KUidEComCntVCardConverterDefaultImplementation + +/** The UID of the vCard converter ECom plugin interface. */ +const TUid KUidEcomCntVCardConverterInterface = {0x102035F7}; + +/** The UID of the phone number parser ECom plugin interface. */ +const TUid KUidEcomCntPhoneNumberParserInterface = {0x102035FA}; + +/** The UID of PBAP vCard Converter plugin Implementation. +@prototype +@internalTechnology +*/ +#define KUidPBAPVCardConvImpl 0xA00015C1 + +class TPluginParameters +/** +Class used to pack the extra arguments required for a PBAP conveter, +PBAP client provides these arguments using overloaded CContactDatabase::ExportSelectedContacts. +@prototype +@internalComponent +*/ +{ +public: + TPluginParameters(TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel); + TInt64 GetFilter()const; + MConverterCallBack* GetCallback()const; + TVCardVersion GetExportVersion()const; + TBool IsExportTel()const; +private: + TInt64 iFilter; + MConverterCallBack* iCallback; + TVCardVersion iVersion; + TBool iExportTel; +}; + +inline TBool TPluginParameters::IsExportTel()const + { + return iExportTel; + } +inline TInt64 TPluginParameters::GetFilter()const + { + return iFilter; + } + +inline MConverterCallBack* TPluginParameters::GetCallback()const + { + return iCallback; + } + +inline TVCardVersion TPluginParameters::GetExportVersion()const + { + return iVersion; + } + +inline TPluginParameters::TPluginParameters(TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel):iFilter(aContactFieldFilter), iCallback(aCallback), iVersion(aVersion), iExportTel(aExportTel) + { + } + +class CContactConverter : public CBase +/** Provides functionality to import and export vCards. +One or more vCards can be imported from a read stream (the vCards are converted +into contact items and added to the database). Also, contact items can be exported as vCards. + +@publishedPartner +@released +*/ + { +public: + virtual CArrayPtr* ImportL(CContactDatabase& aDb,RReadStream& aReadStream,TBool& aImportSuccessful,TInt aOptions,TBool aImportSingle)=0; + virtual void ExportL(CContactDatabase& aDb,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOptions,const Versit::TVersitCharSet aCharSet,TBool aExportPrivateFields, TInt aCommitNumber=10)=0; + }; + + +class CContactEcomConverter : public CContactConverter +/** +It provides Ecom Framework based facilities to resolve and load the appropriate implementations at run-time. +The framework supplies a default resolver for selecting appropriate implementations. +@publishedPartner +@released +*/ + { +public: + static CContactEcomConverter* NewL(TUid aImplementationUid); + static CContactEcomConverter* NewL(TUid aImplementationUid, TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel); + inline virtual ~CContactEcomConverter(); +private: + TUid iDtor_ID_Key; + }; + +inline CContactEcomConverter* CContactEcomConverter::NewL(TUid aImplementationUid) +/** Allocates and instantiates an interface implementation to satisfy the specified interface. +@param aImplementationUid Denotes the type of implemetation that needs to be loaded. +@return A pointer to a newly allocated and initialised object of type CContactEcomConverter. */ + +{ + TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, + _FOFF(CContactEcomConverter, + iDtor_ID_Key)); + return reinterpret_cast(ptr); +} + +inline CContactEcomConverter* CContactEcomConverter::NewL(TUid aImplementationUid, TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel) +/** Allocates and instantiates an interface implementation for PBAP export. +@param aImplementationUid Denotes the type of implemetation that needs to be loaded. +@param aContactFieldFilter Specifies contact fields to be exported. +@param aCallback Callback to client for providing intra-contact properties. +@param aVersion Denotes the vCard version for contact export. +@return A pointer to a newly allocated and initialised object of type CContactEcomConverter. */ + +{ + TPluginParameters partr(aContactFieldFilter,aCallback,aVersion,aExportTel); + + TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, + _FOFF(CContactEcomConverter, + iDtor_ID_Key), &partr); + return reinterpret_cast(ptr); +} + +inline CContactEcomConverter::~CContactEcomConverter() +/** The destruction of the interface implementation referred to by iDtor_ID_Key */ + { + REComSession::DestroyedImplementation(iDtor_ID_Key); + } + + +class CContactPhoneNumberParser : public CBase +/** Provides functionality to extract the real phone number from a contact's phone number field. +@publishedPartner +@released +*/ + { +public: + virtual void ExtractRawNumber(const TDesC& aTextualNumber, TDes& aRawNumber)=0; + }; + + +class CContactEcomPhoneNumberParser : public CContactPhoneNumberParser +/** It provides Ecom Framework based facilities to resolve and load the appropriate implementations at run-time. +The framework supplies a default resolver for selecting appropriate implementations. +@publishedPartner +@released +*/ + { +public: + static CContactEcomPhoneNumberParser* NewL(TUid aImplementationUid); + inline virtual ~CContactEcomPhoneNumberParser(); +private: + TUid iDtor_ID_Key; + }; + +inline CContactEcomPhoneNumberParser* CContactEcomPhoneNumberParser::NewL(TUid aImplementationUid) +/** Allocates and Instantiates an interface implementation to satisfy the specified interface. +@param aImplementationUid denotes the type of implemetation that need to be loaded. +@return A pointer to a newly allocated and initialised object of type CContactEcomPhoneNumberParser. */ + { + TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, + _FOFF(CContactEcomPhoneNumberParser, + iDtor_ID_Key)); + return reinterpret_cast(ptr); + } + +inline CContactEcomPhoneNumberParser::~CContactEcomPhoneNumberParser() +/** The destruction of the interface implementation referred to by iDtor_ID_Key */ + { + REComSession::DestroyedImplementation(iDtor_ID_Key); + } + + +inline TInt CContactDatabase::TemplateCount() const +/** Gets the number of contact card templates that exist in the database. +This does not include the system template. +@deprecated +@return The number of contact card templates that exist in the database. */ + { return iCardTemplateIds->Count(); } + +inline TInt CContactDatabase::GroupCount() const +/** Gets the number of groups that exist in the database. +@deprecated +@return The number of groups that exist in the database. */ + { return iGroupIds->Count(); } + +inline TInt CContactDatabase::NullUidValue() +/** Gets the NULL contact ID value. + +@return KNullContactId. */ + { return KNullContactId; } + +inline TUid CContactItemViewDef::operator[](TInt aIndex) const +/** Gets the field type located at a specified index position within the field type array. + +@param aIndex The position of the field type in the array, relative to zero. It +must be non-negative and less than the number of objects in the array otherwise the +function raises a panic. +@return The field type located at index aIndex within the array (this is equivalent to a +TFieldType). */ + { return iFieldTypes[aIndex]; } + +inline TInt CContactItemViewDef::Count() const +/** Gets the number of field types in the view definition. + +@return The number of field types in the view definition. */ + { return iFieldTypes.Count(); } + +inline void CContactItemViewDef::Reset() +/** Deletes all field types from the view definition's field type array. */ + { iFieldTypes.Reset(); } + +inline CContactItemViewDef::TUse CContactItemViewDef::Use() const +/** Gets the view definition's use. + +@return The current TUse setting. */ + { return iUse; } + +inline void CContactItemViewDef::SetUse(CContactItemViewDef::TUse aUse) +/** Sets the view definition's use. + +@param aUse The new TUse setting. */ + { iUse=aUse; } + +inline CContactItemViewDef::TMode CContactItemViewDef::Mode() const +/** Gets the view definition's mode. + +@return The current TMode setting. */ + { return iMode; } + +inline void CContactItemViewDef::SetMode(CContactItemViewDef::TMode aMode) +/** Sets the view definition's mode. + +@param aMode The new TMode setting. */ + { iMode=aMode; } + +inline CContactDatabase::TSortPref::TSortPref() + : iOrder(EAsc), iFieldType(KNullUid) +/** Constructs a TSortPref object. The order is initialised to EAsc and the field +type to KNullUid. +@deprecated +*/ + {} + +inline CContactDatabase::TSortPref::TSortPref(TFieldType aFieldType,TOrder aOrder) + : iOrder(aOrder), iFieldType(aFieldType) +/** Constructs the TSortPref object with a field type and an order. +@param aFieldType Specifies the field type to sort on. +@param aOrder Specifies the sort order. +@deprecated +*/ + {} + + +/** A class that manages the asynchronous open operation for a CContactDatabase. + +The object can be deleted before the asynchronous open completes. This will set +the state of the client supplied TRequestStatus to KErrCancel. + +When the client supplied TRequestStatus is completed with KErrNone the TakeDatabase() +method is called to pass ownership of the open database to the client. + +@publishedAll +@released + +@see CContactDatabase::OpenL() +*/ +class CContactOpenOperation : private CActive + { +public: + IMPORT_C CContactDatabase* TakeDatabase(); + IMPORT_C ~CContactOpenOperation(); + + static CContactOpenOperation* NewL(TRequestStatus& aPtrStatus); + static CContactOpenOperation* NewL(const TDesC& aFileName, TRequestStatus& aPtrStatus); + +private: + // from CActive (for BC reasons) + void RunL(); + TInt RunError(TInt aError); + void DoCancel(); + + CContactOpenOperation (TRequestStatus& aClientStatus); + void ConstructL (const TDesC& aFileName = KNullDesC); + +private: + TRequestStatus* iClientStatus; + CContactDatabase* iContactDatabase; + }; + + +#endif //__CNTDB_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntdbobs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntdbobs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,150 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__CNTDBOBS_H__) +#define __CNTDBOBS_H__ + +#if !defined(__E32DEF_H__) +#include +#endif + +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) && !defined __D32DBMS_H__ +#include +#else +#include +#include +#endif + +#include //for tcontactitemid + +/** Change event type. For events which update, delete or add a contact item, the +ID of the item affected is provided in the TContactDbObserverEvent struct. +@publishedAll +@released + */ +enum TContactDbObserverEventType + { + /** Null event type. */ + EContactDbObserverEventNull, + /** Not currently used. */ + EContactDbObserverEventUnused, + /** A contact item (not a template, group or own card) has been changed. */ + EContactDbObserverEventContactChanged, + /** A contact item (not a template, group or own card) has been deleted. */ + EContactDbObserverEventContactDeleted, + /** A contact item (not a template or group) has been added. */ + EContactDbObserverEventContactAdded, + /** Unknown change event type. */ + EContactDbObserverEventUnknownChanges, + /** Recover from a damaged database. */ + EContactDbObserverEventRecover, + /** Rollback from a change to the database. */ + EContactDbObserverEventRollback, + /** Database tables closed. */ + EContactDbObserverEventTablesClosed, + /** Database tables opened. */ + EContactDbObserverEventTablesOpened, + /** A contact card template has changed. */ + EContactDbObserverEventTemplateChanged, + /** A contact card template has been deleted. */ + EContactDbObserverEventTemplateDeleted, + /** A contact card template has been added. */ + EContactDbObserverEventTemplateAdded, + /** The database's current item has been deleted. */ + EContactDbObserverEventCurrentItemDeleted, + /** The database's current item has changed. */ + EContactDbObserverEventCurrentItemChanged, + /** The database's own card has changed. */ + EContactDbObserverEventOwnCardChanged, + /** The database's preferred template has been set. (See CContactDatabase::SetPrefTemplateL()). */ + EContactDbObserverEventPreferredTemplateChanged, + /** An own card has been deleted from the database. */ + EContactDbObserverEventOwnCardDeleted, + /** A contact item group has been added. */ + EContactDbObserverEventGroupAdded, + /** A contact item group has been updated. */ + EContactDbObserverEventGroupChanged, + /** A contact item group has been deleted from the database. */ + EContactDbObserverEventGroupDeleted, + /** The current database has changed. */ + EContactDbObserverEventCurrentDatabaseChanged, + /** The phone number assigned to one of the speed dial positions + has been replaced, removed or modified.*/ + EContactDbObserverEventSpeedDialsChanged, + /** Not currently used. */ + EContactDbObserverEventSortOrderChanged, + /** Contacts DB about to be backed up */ + EContactDbObserverEventBackupBeginning, + /** Contacts DB about to be restored */ + EContactDbObserverEventRestoreBeginning, + /** The backup/restore operation has completed. */ + EContactDbObserverEventBackupRestoreCompleted, + /** The restore operation has completed but the database could not be opened. */ + EContactDbObserverEventRestoreBadDatabase, + /** Database has been compressed. */ + EContactDbObserverEventCompress + }; + +struct TContactDbObserverEvent +/** Contact database change event details. These include the type of change event +and the ID of the contact item affected by the change, if relevant. + +An object of this type is passed to a contact database's change observer, +see MContactDbObserver::HandleDatabaseEventL(). +@publishedAll +@released +*/ + { + /** The change event type. */ + TContactDbObserverEventType iType; + /** The ID of the contact item affected. */ + TContactItemId iContactId; + /** Identifies which connection to the contacts server generated the event. Use + CContactDatabase::ConnectionId() to get the ID of the current connection. + + Set to zero if the event has no meaningful connection ID. */ + TUint iConnectionId; + }; + +class MContactDbObserver +/** The interface for an observer that handles changes to a contact database. + +It specifies a single pure virtual function which should be implemented by +the observer class to test the type of the change event (see the TContactDbObserverEventType +enum) and handle it. + +There is no need for the observer class to explicitly test for all possible +event types - the event is for information only and event types which are of no interest +to the observer class can safely be ignored. + +The change event type (TContactDbObserverEventType) may be augmented +in future releases with additional values. + +A contact database observer pointer is passed to the NewL() function for the +CContactChangeNotifier class. +@publishedAll +@released +*/ + { +public: + /** Tests the contact database observer event type and handles it. The ID of a + contact affected by the change event, if relevant, can be retrieved via TContactDbObserverEvent::iContactId. + + @param aEvent Provides information about the change event. */ + virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent)=0; + }; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1402 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTDEF_H__ +#define __CNTDEF_H__ + +#include + +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) +#include +#else +#include +#include +#endif + +#include + + +// Constants + +/** +@internalTechnology +@released +*/ +const TInt KSpeedDialPhoneLength = 64; + +/** +@internalTechnology +@released +*/ +const TInt KCntMinSpeedDialIndex = 1; + +/** +@internalTechnology +@released +*/ +const TInt KCntMaxSpeedDialIndex = 9; + +/** +Phone Match Length +@internalTechnology +@released +*/ +const TInt KMaxPhoneMatchLength = 15; + +/** +@internalTechnology +@released +*/ +const TInt KLowerSevenDigits = 7; + +/** +Used for firstname, lastname, companyname, secondname and their +associated pronunciation fields and e-mail address +@internalTechnology +@released +*/ +const TInt KCntMaxTextFieldLength=255; + +// Type definitions + +/** +@internalTechnology +@released +*/ +typedef TBuf TSpeedDialPhoneNumber; + +/** Contact item ID. These are used to uniquely identify contact items within a +contacts database. Contact items include contact cards, contact card templates, +contact card groups and own cards. Contact item IDs are also used to uniquely +identify agents. +@publishedAll +@released +*/ +typedef TInt32 TContactItemId; + +/** A UID which identifies a contact item field's type. The possible values are +defined as UIDs in cntdef.h. +@publishedAll +@released +*/ +typedef TUid TFieldType; + +/** A contact item field's storage type. + +This is an unsigned integer value which identifies the type of data stored +in a contact item field. The possible values are defined in cntdef.hrh as: + +- KStorageTypeText (used by CContactTextFields) + +- KStorageTypeStore (used by CContactStoreFields) + +- KStorageTypeContactItemId (used by CContactAgentFields) + +- KStorageTypeDateTime (used by CContactDateFields) + +Note that numeric fields are not supported. Numbers (e.g. telephone +numbers) are stored in the database using text fields. +@publishedAll +@released +*/ +typedef TUint TStorageType; + +/** Machine identifier. + +This is used when synchronising the contact database to identify the +machine with which the database has been synchronised. +@see CContactDatabase::SetLastSyncDateL() +@see CContactDatabase::GetLastSyncDateL(). +@publishedAll +@released +*/ +typedef TInt32 TContactSyncId; + +/** Stores the value of KUidContactsDbFile as an integer. +@publishedAll +@released +*/ +const TInt KUidContactsDbFileValue=0x100065FF; +/** +The third UID of the contacts database file, c:\\system\\data\\contacts.cdb. +This should be used by file recogniser implementations. +@publishedAll +@released +*/ +const TUid KUidContactsDbFile={KUidContactsDbFileValue}; + + +/** NULL contact item ID. Indicates that no contact item is present. +@publishedAll +@released +*/ +const TContactItemId KNullContactId=-1; +/** +The ID of the system template. +@publishedAll +@released +*/ +const TContactItemId KGoldenTemplateId=0; + +/** Identifies a vCard that has been pasted from the clipboard into the Contacts application. +@publishedAll +@released +*/ +const TUid KClipboardUidTypeVCard={0x100038f6}; + +/** Identifies a contact card (CContactCard). +@publishedAll +@released +*/ +const TUid KUidContactCard={KUidContactCardValue}; +/** Identifies a contact group (CContactGroup). +@publishedAll +@released +*/ +const TUid KUidContactGroup={KUidContactGroupValue}; +/** Identifies the system template (CContactTemplate). +@publishedAll +@released +*/ +const TUid KUidContactTemplate={KUidContactTemplateValue}; +/** Identifies an own card (CContactOwnCard). +@publishedAll +@released +*/ +const TUid KUidContactOwnCard={KUidContactOwnCardValue}; +/** Identifies a non-system template (CContactCardTemplate). +@publishedAll +@released +*/ +const TUid KUidContactCardTemplate={KUidContactCardTemplateValue}; +/** The UID that identifies ICC entries. These are a special type of +contact item that are stored in the SIM (ICC) card on the phone. + +@publishedAll +@released +*/ +const TUid KUidContactICCEntry={KUidContactICCEntryValue}; + +/** Identifies any CContactItem-derived class (all of the above). +@publishedAll +@released +*/ +const TUid KUidContactItem={0x10005673}; +/** This identifies the CContactCard and CContactGroup classes. +It is used internally by the contacts model. +@publishedAll +@released +*/ +const TUid KUidContactCardOrGroup={0x10005F71}; + + +/* + * Speed-dial UIDs. + * These are used to indicate the speed-dial position for a particular field. + * They are added to the content type of a phone number field set as a + * speed-dial using CContactDatabase::SetFieldAsSpeedDialL(). + */ +/** Field maps to the first speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialOne={KUidSpeedDialOneValue}; +/** Field maps to the second speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialTwo={KUidSpeedDialTwoValue}; +/** Field maps to the third speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialThree={KUidSpeedDialThreeValue}; +/** Field maps to the fourth speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialFour={KUidSpeedDialFourValue}; +/** Field maps to the fifth speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialFive={KUidSpeedDialFiveValue}; +/** Field maps to the sixth speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialSix={KUidSpeedDialSixValue}; +/** Field maps to the seventh speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialSeven={KUidSpeedDialSevenValue}; +/** Field maps to the eighth speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialEight={KUidSpeedDialEightValue}; +/** Field maps to the ninth speed dial position. +@publishedAll +@released +*/ +const TUid KUidSpeedDialNine={KUidSpeedDialNineValue}; + +/* + * Contact field type UIDs. + */ +/** Address field. +@publishedAll +@released +*/ +const TUid KUidContactFieldAddress={KUidContactFieldAddressValue}; +/** Post office box field. +@publishedAll +@released +*/ +const TUid KUidContactFieldPostOffice={KUidContactFieldPostOfficeValue}; +/** Extended address field. +@publishedAll +@released +*/ +const TUid KUidContactFieldExtendedAddress={KUidContactFieldExtendedAddressValue}; +/** Locality field. +@publishedAll +@released +*/ +const TUid KUidContactFieldLocality={KUidContactFieldLocalityValue}; +/** Region field. +@publishedAll +@released +*/ +const TUid KUidContactFieldRegion={KUidContactFieldRegionValue}; +/** Post code field. +@publishedAll +@released +*/ +const TUid KUidContactFieldPostcode={KUidContactFieldPostCodeValue}; +/** Country field. +@publishedAll +@released +*/ +const TUid KUidContactFieldCountry={KUidContactFieldCountryValue}; + +/** Company name field. +@publishedAll +@released +*/ +const TUid KUidContactFieldCompanyName={KUidContactFieldCompanyNameValue}; +/** Company name pronunciation field. +@publishedAll +@released +*/ +const TUid KUidContactFieldCompanyNamePronunciation={KUidContactFieldCompanyNamePronunciationValue}; +/** Phone number field. +@publishedAll +@released +*/ +const TUid KUidContactFieldPhoneNumber={KUidContactFieldPhoneNumberValue}; +/** Given name field. +@publishedAll +@released +*/ +const TUid KUidContactFieldGivenName={KUidContactFieldGivenNameValue}; +/** Family name field. +@publishedAll +@released +*/ +const TUid KUidContactFieldFamilyName={KUidContactFieldFamilyNameValue}; +/** Given name pronunciation field. +@publishedAll +@released +*/ +const TUid KUidContactFieldGivenNamePronunciation={KUidContactFieldGivenNamePronunciationValue}; +/** Family name pronunciation field. +@publishedAll +@released +*/ +const TUid KUidContactFieldFamilyNamePronunciation={KUidContactFieldFamilyNamePronunciationValue}; +/** Middle name field. +@publishedAll +@released +*/ +const TUid KUidContactFieldAdditionalName={KUidContactFieldAdditionalNameValue}; +/** Name suffix field. +@publishedAll +@released +*/ +const TUid KUidContactFieldSuffixName={KUidContactFieldSuffixNameValue}; +/** Name prefix field. +@publishedAll +@released +*/ +const TUid KUidContactFieldPrefixName={KUidContactFieldPrefixNameValue}; +/** Hidden field. +@publishedAll +@released +*/ +const TUid KUidContactFieldHidden={KUidContactFieldHiddenValue}; +/** Hidden field. +@publishedAll +@released +*/ +const TUid KUidContactFieldDefinedText={KUidContactFieldDefinedTextValue}; +/** Email address field. +@publishedAll +@released +*/ +const TUid KUidContactFieldEMail={KUidContactFieldEMailValue}; +/** Telephone number used for a messaging service. +@publishedAll +@released +*/ +const TUid KUidContactFieldMsg={KUidContactFieldMsgValue}; +/** Telephone number used for SMS messages. +@publishedAll +@released +*/ +const TUid KUidContactFieldSms={KUidContactFieldSmsValue}; +/** Fax number field. +@publishedAll +@released +*/ +const TUid KUidContactFieldFax={KUidContactFieldFaxValue}; +/** Comment field. +@publishedAll +@released +*/ +const TUid KUidContactFieldNote={KUidContactFieldNoteValue}; +/** Comment field. +@publishedAll +@released +*/ +const TUid KUidContactStorageInline={KUidContactFieldStorageInlineValue}; +/** Birthday field. +@publishedAll +@released +*/ +const TUid KUidContactFieldBirthday={KUidContactFieldBirthdayValue}; +/** URL field. +@publishedAll +@released +*/ +const TUid KUidContactFieldUrl={KUidContactFieldUrlValue}; +/** Template label field (a label which is used to refer to a template, for instance "work +template", "personal template"). +@publishedAll +@released +*/ +const TUid KUidContactFieldTemplateLabel={KUidContactFieldTemplateLabelValue}; +/** A picture field, for instance a logo or a photo. +@publishedAll +@released +*/ +const TUid KUidContactFieldPicture={KUidContactFieldPictureValue}; +/** Used internally by the contacts model. +@publishedAll +@released +*/ +const TUid KUidContactFieldDTMF={KUidContactFieldDTMFValue}; +/** Identifies a ring tone field. This is a ring tone that is associated with a contact item. +@publishedAll +@released +*/ +const TUid KUidContactFieldRingTone={KUidContactFieldRingToneValue}; +/** Identifies a job title field. +@publishedAll +@released +*/ +const TUid KUidContactFieldJobTitle={KUidContactFieldJobTitleValue}; +/** Identifies an instant messaging address field. +@publishedAll +@released +*/ +const TUid KUidContactFieldIMAddress = { KUidContactFieldIMAddressValue }; +/** Identifies a USIM second name field. This field is provided to +store an additional representation of the contact's name, such as a +nickname or a different representation. An example could be a Japanese +contact which has a romanised name and an alternative representation using +kanji (pictogram) characters. +@publishedAll +@released +*/ +const TUid KUidContactFieldSecondName = { KUidContactFieldSecondNameValue }; +/** Identifies a SIP identity field. +@publishedAll +@released +*/ +const TUid KUidContactFieldSIPID = { KUidContactFieldSIPIDValue }; +/** Identifies a Assistant field. +@publishedAll +@released +*/ +const TUid KUidContactFieldAssistant = { KUidContactFieldAssistantValue }; +/** Identifies an Anniversary field. +@publishedAll +@released +*/ +const TUid KUidContactFieldAnniversary = { KUidContactFieldAnniversaryValue }; +/** Identifies a Spouse field. +@publishedAll +@released +*/ +const TUid KUidContactFieldSpouse = { KUidContactFieldSpouseValue }; +/** Identifies a Children field. +@publishedAll +@released +*/ +const TUid KUidContactFieldChildren = { KUidContactFieldChildrenValue }; +/** Identifies a Class field. +@publishedAll +@released +*/ +const TUid KUidContactFieldClass = { KUidContactFieldClassValue }; +/** Identifies a Department field. +@publishedAll +@released +*/ +const TUid KUidContactFieldDepartmentName = { KUidContactFieldDepartmentNameValue }; +/* +* CContactICCEntry (Telephony specific) UIDs. + */ +/** Identifies an ICC slot contact field in the contact item. +@publishedAll +@released +*/ +const TUid KUidContactFieldICCSlot={KUidContactFieldICCSlotValue}; +/** Identifies an ICC Phonebook contact field in the contact item. +@publishedAll +@released +*/ +const TUid KUidContactFieldICCPhonebook={KUidContactFieldICCPhonebookValue}; +/** Identifies an ICC Group contact field in the contact item. +@publishedAll +@released +*/ +const TUid KUidContactFieldICCGroup={KUidContactFieldICCGroupValue}; + +/** Identifies a voice dial field. This is a voice recording associated with a telephone number +field in the item. +@publishedAll +@released +*/ +const TUid KUidContactsVoiceDialField={KUidContactsVoiceDialFieldValue}; + +/** Indicates no field present. +@publishedAll +@released +*/ +const TUid KUidContactFieldNone={KUidContactFieldNoneValue}; +/** Used in field type matching to indicate that all field types match. +@publishedAll +@released +*/ +const TInt32 KUidContactFieldMatchAllValue=0x110FFF22; +const TUid KUidContactFieldMatchAll={KUidContactFieldMatchAllValue}; + +/* + * Contact field type vCard mappings. + * The vCard mapping describes how the field should be handled by the + * vCard import/export code. + */ +/** Field type maps to the Post office box field in an ADR vCard property value. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPOSTOFFICE={KIntContactFieldVCardMapPOSTOFFICE}; +/** Field type maps to the Extended address field in an ADR vCard property value. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapEXTENDEDADR={KIntContactFieldVCardMapEXTENDEDADR}; +/** Field type maps to vCard property ADR. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapADR={KIntContactFieldVCardMapADR}; +/** Field type maps to the Locality field in an ADR vCard property value. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapLOCALITY={KIntContactFieldVCardMapLOCALITY}; +/** Field type maps to the Region field in an ADR vCard property value. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapREGION={KIntContactFieldVCardMapREGION}; +/** Field type maps to the Postcode field in an ADR vCard property value. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPOSTCODE={KIntContactFieldVCardMapPOSTCODE}; +/** Field type maps to the Country field in an ADR vCard property value. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapCOUNTRY={KIntContactFieldVCardMapCOUNTRY}; + +/** Field type maps to vCard property AGENT. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapAGENT={KIntContactFieldVCardMapAGENT}; +/** Field type maps to vCard property BDAY. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapBDAY={KIntContactFieldVCardMapBDAY}; +/** Field type maps to vCard property EMAIL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapEMAILINTERNET={KIntContactFieldVCardMapEMAILINTERNET}; +/** Field type maps to vCard property GEO. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapGEO={KIntContactFieldVCardMapGEO}; +/** Field type maps to vCard property LABEL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapLABEL={KIntContactFieldVCardMapLABEL}; +/** Field type maps to vCard property LOGO. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapLOGO={KIntContactFieldVCardMapLOGO}; +/** Field type maps to vCard property MAILER. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapMAILER={KIntContactFieldVCardMapMAILER}; +/** Field type maps to vCard property NOTE. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapNOTE={KIntContactFieldVCardMapNOTE}; +/** Field type maps to vCard property ORG. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapORG={KIntContactFieldVCardMapORG}; +/** Field type maps to vCard X-IRMC-ORG parameter of property SOUND. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapORGPronunciation={KIntContactFieldVCardMapORGPronunciation}; +/** Field type maps to vCard property PHOTO. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPHOTO={KIntContactFieldVCardMapPHOTO}; +/** Field type maps to vCard property ROLE. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapROLE={KIntContactFieldVCardMapROLE}; +/** Field type maps to vCard property SOUND. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapSOUND={KIntContactFieldVCardMapSOUND}; +/** Field type maps to vCard property TEL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapTEL={KIntContactFieldVCardMapTEL}; +/** Field type maps to vCard property parameter FAX. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapTELFAX={KIntContactFieldVCardMapTELFAX}; +/** Field type maps to vCard property TITLE. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapTITLE={KIntContactFieldVCardMapTITLE}; +/** Field type maps to vCard property URL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapURL={KIntContactFieldVCardMapURL}; +/** Field maps to the vCard property N (name). Must be used in conjunction with +a name-related field type (e.g. KUidContactFieldGivenName) to form the given +name field mapping. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapUnusedN={KIntContactFieldVCardMapUnusedN}; +/** Field type maps to vCard property FN (the display name). +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapUnusedFN={KIntContactFieldVCardMapUnusedFN}; +/** Mapping between the vCard property and field type is not required. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapNotRequired={KIntContactFieldVCardMapNotRequired}; +/** Unknown mapping between a field type and a vCard extension property. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapUnknownXDash={KIntContactFieldVCardMapUnknownXDash}; +/** Unknown mapping between field type and non-extension vCard property. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapUnknown={KIntContactFieldVCardMapUnknown}; +/** Field type maps to vCard property UID. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapUID={KIntContactFieldVCardMapUID}; +/** Field type maps to vCard property parameter WORK. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapWORK={KIntContactFieldVCardMapWORK}; +/** Field type maps to vCard property parameter HOME. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapHOME={KIntContactFieldVCardMapHOME}; +/** Field type maps to vCard property parameter MSG. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapMSG={KIntContactFieldVCardMapMSG}; +/** Field type maps to vCard property parameter VOICE. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapVOICE={KIntContactFieldVCardMapVOICE}; +/** Field type maps to vCard property parameter FAX. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapFAX={KIntContactFieldVCardMapFAX}; +/** Field type maps to vCard property parameter PREF. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPREF={KIntContactFieldVCardMapPREF}; +/** Field type maps to vCard property parameter CELL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapCELL={KIntContactFieldVCardMapCELL}; +/** Field type maps to vCard property parameter PAGER. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPAGER={KIntContactFieldVCardMapPAGER}; +/** Field type maps to vCard property parameter BBS. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapBBS={KIntContactFieldVCardMapBBS}; +/** Field type maps to vCard property parameter MODEM. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapMODEM={KIntContactFieldVCardMapMODEM}; +/** Field type maps to vCard property parameter CAR. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapCAR={KIntContactFieldVCardMapCAR}; +/** Field type maps to vCard property parameter ISDN. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapISDN={KIntContactFieldVCardMapISDN}; +/** Field type maps to vCard property parameter VIDEO. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapVIDEO={KIntContactFieldVCardMapVIDEO}; +/** Field type maps to vCard property parameter DOM. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapDOM={KIntContactFieldVCardMapDOM}; +/** Field type maps to vCard property parameter INTL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapINTL={KIntContactFieldVCardMapINTL}; +/** Field type maps to vCard property parameter POSTAL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPOSTAL={KIntContactFieldVCardMapPOSTAL}; +/** Field type maps to vCard property parameter PARCEL. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPARCEL={KIntContactFieldVCardMapPARCEL}; +/** Field type maps to vCard property parameter value GIF. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapGIF={KIntContactFieldVCardMapGIF}; +/** Field type maps to vCard property parameter value CGM. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapCGM={KIntContactFieldVCardMapCGM}; +/** Field type maps to vCard property parameter value WMF. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapWMF={KIntContactFieldVCardMapWMF}; +/** Field type maps to vCard property parameter value BMP. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapBMP={KIntContactFieldVCardMapBMP}; +/** Field type maps to vCard property parameter value MET. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapMET={KIntContactFieldVCardMapMET}; +/** Field type maps to vCard property parameter value PMB. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPMB={KIntContactFieldVCardMapPMB}; +/** Field type maps to vCard property parameter value DIB. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapDIB={KIntContactFieldVCardMapDIB}; +/** Field type maps to vCard property parameter value PICT. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPICT={KIntContactFieldVCardMapPICT}; +/** Field type maps to vCard property parameter value TIFF. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapTIFF={KIntContactFieldVCardMapTIFF}; +/** Field type maps to vCard property parameter value PDF. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPDF={KIntContactFieldVCardMapPDF}; +/** Field type maps to vCard property parameter value PS. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPS={KIntContactFieldVCardMapPS}; +/** Field type maps to vCard property parameter value JPEG. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapJPEG={KIntContactFieldVCardMapJPEG}; +/** Field type maps to vCard property parameter value MPEG. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapMPEG={KIntContactFieldVCardMapMPEG}; +/** Field type maps to vCard property parameter value MPEG2. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapMPEG2={KIntContactFieldVCardMapMPEG2}; +/** Field type maps to vCard property parameter value AVI. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapAVI={KIntContactFieldVCardMapAVI}; +/** Field type maps to vCard property parameter value QTIME. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapQTIME={KIntContactFieldVCardMapQTIME}; +/** Field type maps to vCard property TZ. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapTZ={KIntContactFieldVCardMapTZ}; +/** Field type maps to vCard property KEY. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapKEY={KIntContactFieldVCardMapKEY}; +/** Field type maps to vCard property parameter value X509. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapX509={KIntContactFieldVCardMapX509}; +/** Field type maps to vCard property parameter value PGP. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPGP={KIntContactFieldVCardMapPGP}; +/** Used internally by the contacts model. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapSMIME={KIntContactFieldVCardMapSMIME}; +/** The field contains a Wireless Village instant messaging ID. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapWV={KIntContactFieldVCardMapWV}; +/** Field type mapping of a vCard property to contacts Second Name Field +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapSECONDNAME={KIntContactFieldVCardMapSECONDNAME}; +/** Field type mapping of a vCard property to contacts SIP Identity Field. +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapSIPID={KIntContactFieldVCardMapSIPID}; +/** Field type maps to vCard extension property parameter value POC +(Push to Talk Over Cellular). +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapPOC={KIntContactFieldVCardMapPOC}; +/** Field type maps to vCard extension property parameter value SWIS +("See What I See"). +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapSWIS={KIntContactFieldVCardMapSWIS}; +/** Field type maps to vCard extension property parameter value VOIP +(Voice Over IP). +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapVOIP={KIntContactFieldVCardMapVOIP}; +/** Field type maps to vCard extension property parameter value Assistant +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapAssistant={KIntContactFieldVCardMapAssistant}; +/** Field type maps to vCard extension property parameter value AssistantTel +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapAssistantTel={KIntContactFieldVCardMapAssistantTel}; +/** Field type maps to vCard extension property parameter value Anniversary +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapAnniversary={KIntContactFieldVCardMapAnniversary}; +/** Field type maps to vCard extension property parameter value Spouse +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapSpouse={KIntContactFieldVCardMapSpouse}; +/** Field type maps to vCard extension property parameter value Children +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapChildren={KIntContactFieldVCardMapChildren}; +/** Field type maps to vCard extension property parameter value Class +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapClass={KIntContactFieldVCardMapClass}; +/** Field type maps to vCard extension property parameter value Department +@publishedAll +@released +*/ +const TUid KUidContactFieldVCardMapDepartment={KIntContactFieldVCardMapDepartment}; + +/** Name of the TYPE property parameter, for which the values are work, home etc. +@publishedAll +@released +*/ +_LIT(KVersitParamType,"TYPE"); +/** Name of the WORK property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamWork,"WORK"); +/** Name of the HOME property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamHome,"HOME"); +/** Name of the MSG property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamMsg,"MSG"); +/** Name of the VOICE property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamVoice,"VOICE"); +/** Name of the FAX property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamFax,"FAX"); +/** Name of the PREF property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPref,"PREF"); +/** Name of the CELL property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamCell,"CELL"); +/** Name of the PAGER property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPager,"PAGER"); +/** Name of the BBS property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamBbs,"BBS"); +/** Name of the MODEM property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamModem,"MODEM"); +/** Name of the CAR property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamCar,"CAR"); +/** Name of the ISDN property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamIsdn,"ISDN"); +/** Name of the VIDEO property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamVideo,"VIDEO"); +/** Name of the DOM property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamDom,"DOM"); +/** Name of the GIF property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamGif,"GIF"); +/** Name of the CGM property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamCgm,"CGM"); +/** Name of the WMF property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamWmf,"WMF"); +/** Name of the BMP property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamBmp,"BMP"); +/** Name of the MET property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamMet,"MET"); +/** Name of the PMB property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPmb,"PMB"); +/** Name of the DIB property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamDib,"DIB"); +/** Name of the PICT property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPict,"PICT"); +/** Name of the TIFF property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamTiff,"TIFF"); +/** Name of the PDF property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPdf,"PDF"); +/** Name of the PS property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPs,"PS"); +/** Name of the JPEG property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamJpeg,"JPEG"); +/** Name of the MPEG property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamMpeg,"MPEG"); +/** Name of the MPEG2 property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamMpeg2,"MPEG2"); +/** Name of the AVI property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamAvi,"AVI"); +/** Name of the QTIME property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamQtime,"QTIME"); +/** Name of the X509 property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamX509,"X509"); +/** Name of the PGP property parameter. +@publishedAll +@released +*/ +_LIT(KVersitParamPGP,"PGP"); + +/** 8 bit name of the TYPE property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Type,"TYPE"); +/** 8 bit name of the WORK property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Work,"WORK"); +/** 8 bit name of the HOME property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Home,"HOME"); +/** 8 bit name of the MSG property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Msg,"MSG"); +/** 8 bit name of the VOICE property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Voice,"VOICE"); +/** 8 bit name of the FAX property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Fax,"FAX"); +/** 8 bit name of the PREF property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Pref,"PREF"); +/** 8 bit name of the CELL property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Cell,"CELL"); +/** 8 bit name of the PAGER property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Pager,"PAGER"); +/** 8 bit name of the BBS property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Bbs,"BBS"); +/** 8 bit name of the MODEM property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Modem,"MODEM"); +/** 8 bit name of the CAR property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Car,"CAR"); +/** 8 bit name of the ISDN property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Isdn,"ISDN"); +/** 8 bit name of the VIDEO property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Video,"VIDEO"); +/** 8 bit name of the DOM property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Dom,"DOM"); +/** 8 bit name of the GIF property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Gif,"GIF"); +/** 8 bit name of the CGM property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Cgm,"CGM"); +/** 8 bit name of the WMF property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Wmf,"WMF"); +/** 8 bit name of the BMP property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Bmp,"BMP"); +/** 8 bit name of the MET property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Met,"MET"); +/** 8 bit name of the PMB property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Pmb,"PMB"); +/** 8 bit name of the DIB property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Dib,"DIB"); +/** 8 bit name of the PICT property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Pict,"PICT"); +/** 8 bit name of the TIFF property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Tiff,"TIFF"); +/** 8 bit name of the PDF property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Pdf,"PDF"); +/** 8 bit name of the PS property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Ps,"PS"); +/** 8 bit name of the JPEG property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Jpeg,"JPEG"); +/** 8 bit name of the MPEG property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Mpeg,"MPEG"); +/** 8 bit name of the MPEG2 property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Mpeg2,"MPEG2"); +/** 8 bit name of the AVI property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Avi,"AVI"); +/** 8 bit name of the QTIME property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8Qtime,"QTIME"); +/** 8 bit name of the X509 property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8X509,"X509"); +/** 8 bit name of the PGP property parameter. +@publishedAll +@released +*/ +_LIT8(KVersitParam8PGP,"PGP"); + +/** +8 bit name of the X-IRMC-N property parameter (family or given +name pronunciation). +@publishedAll +@released +*/ +_LIT8(KVersitParam8NamePrn,"X-IRMC-N"); +/** +8 bit name of the X-IRMC-ORG property parameter (company +name pronunciation). +@publishedAll +@released +*/ +_LIT8(KVersitParam8CompanyPrn,"X-IRMC-ORG"); +/** +8 bit name of the X-IRMC- property parameter (pronunciation field prefix). +@publishedAll +@released +*/ +_LIT8(KVersitParam8PronunciationPrefix,"X-IRMC-"); + + + +class CContactIdArray : public CBase +/** Array of contact item IDs (TContactItemIds). + +Instances of this class are used in several contact database functions, +for instance CContactDatabase::DeleteContactsL(). +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactIdArray* NewL(); + IMPORT_C static CContactIdArray* NewLC(); + IMPORT_C static CContactIdArray* NewL(const CContactIdArray* aArray); + IMPORT_C static CContactIdArray* NewLC(const CContactIdArray* aArray); + static CContactIdArray* NewLC(RReadStream& aStream); + IMPORT_C ~CContactIdArray(); + inline const TContactItemId& operator[](TInt aIndex) const; + inline TContactItemId& operator[](TInt aIndex); + inline TInt Count() const; + inline void Reset(); + IMPORT_C TInt Find(TContactItemId aId) const; + IMPORT_C void AddL(TContactItemId aId); + + inline void Remove(TInt aIndex); + inline void Remove(TInt aIndex,TInt aCount); + inline void InsertL(TInt aIndex,TContactItemId aId); + IMPORT_C void MoveL(TInt aOldIndex,TInt aNewIndex); + IMPORT_C void ReverseOrder(); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; +public: // intended for internal Contacts Model usage only + void Sort(); +private: + CContactIdArray(); + void ConstructL(); + void CloneL(const CContactIdArray* aArray); +private: + CArrayFixFlat *iIds; + }; +inline const TContactItemId& CContactIdArray::operator[](TInt aIndex) const +/** Gets the indexed TContactItemId. + +@param aIndex The position of the contact ID within the array, relative to zero. +This must be non-negative and less than the number of objects in the array +otherwise the operator raises a panic. +@return A reference to a const element of the array. */ + { return (*iIds)[aIndex]; } + +inline TContactItemId& CContactIdArray::operator[](TInt aIndex) +/** Gets the indexed TContactItemId. + +@param aIndex The position of the contact ID within the array, relative to zero. +This must be non-negative and less than the number of objects in the array +otherwise the operator raises a panic. +@return A reference to a non-const element of the array. */ + { return (*iIds)[aIndex]; } + +inline TInt CContactIdArray::Count() const +/** Gets the number of contact IDs in the array. + +@return The number of contact IDs in the array. */ + { return iIds->Count(); } + +inline void CContactIdArray::Reset() +/** Removes all contact IDs from the array. */ + { iIds->Reset(); } + +inline void CContactIdArray::Remove(TInt aIndex) +/** Removes the indexed contact ID from the array. + +The index value must not be negative and must not be greater than the number +of elements in the array, otherwise the function raises a panic. + +@param aIndex The index of the contact ID to remove. */ + { iIds->Delete(aIndex); } + +inline void CContactIdArray::Remove(TInt aIndex,TInt aCount) +/** Removes a block of contact IDs from the array. + +This function raises a panic if any of the following are true:- + +- aCount is negative + +- aIndex is negative or is greater than the number of elements currently in +the array + +- the sum of aIndex and aCount is greater than the number of elements currently +in the array + +@param aIndex The index of the first contact ID to remove. +@param aCount The number of contiguous contact IDs to delete from the array. +If this is not specified, a value of one is assumed. */ + { iIds->Delete(aIndex,aCount); } + +inline void CContactIdArray::InsertL(TInt aIndex,TContactItemId aId) +/** Inserts a contact ID into the array. + +The index must be valid or a panic occurs. + +The function may attempt to expand the array buffer. If there is insufficient +memory available, the function leaves. The leave code is one of the system +error codes. If the function leaves, the array is left in the state it was +in before the call. + +@param aIndex The index at which to insert the contact ID. +@param aId The contact ID to insert. */ + { iIds->InsertL(aIndex,aId); } + + +/** Shows supported event action types that are used when deleting +a contact or an array of contacts +@internalTechnology +@released +*/ +enum TCntSendEventAction + { + EDeferEvent = 0, + ESendEvent = 1, + ESendUnknownChangesEvent = 2, + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,642 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Persistence layer exports +// +// + + + +#if !defined(__CNTFIELD_H__) +#define __CNTFIELD_H__ + +#include + + + +const TInt KNullFieldId=-1; + +//const TInt KIntContactFieldHint???=0x01; +const TInt KIntContactHintIsPhone=0x02; +const TInt KIntContactHintIsMsg=0x04; +const TInt KIntContactHintIsCompanyName=0x08; +const TInt KIntContactHintIsFamilyName=0x10; +const TInt KIntContactHintIsGivenName=0x20; +const TInt KIntContactHintIsAddress=0x40; +const TInt KIntContactHintIsAdditionalName=0x80; +const TInt KIntContactHintIsSuffixName=0x100; +const TInt KIntContactHintIsPrefixName=0x200; +const TInt KIntContactHintStorageInline=0x400; +const TInt KIntContactHintIsEmail=0x4000; +const TInt KIntContactHintIsPronunciation=0x800; +const TInt KIntContactHintIsCompanyNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsCompanyName; +const TInt KIntContactHintIsGivenNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsGivenName; +const TInt KIntContactHintIsFamilyNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsFamilyName; + +const TInt KHintTypeMask = 0x1FFFFF; + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ +const TInt KHintAdditionalMask = 0x7F000000; //Number of additional type ids. +const TInt KHintVCardMappingMask = 0x80000000; //bit flag to show if there is a vCard mapping uid. +const TInt KHintTemplateFieldMask = 0x7FFFFFFF; //Template field mask in low hint value. + +const TInt KHintAdditionalMaskShift = 24; + +#else //_SYMBIAN_USE_SQLITE__ + +const TInt KHintAdditionalMask = 0x200000; +const TInt KHintIdMask = 0xFFC00000; + +#endif //_SYMBIAN_USE_SQLITE__ + + +class RWriteStream; +class RReadStream; +class CContactFieldStorage; +class CContactTextField; +class CContactStoreField; +class CContactAgentField; +class CContactDateField; +class TFieldHeader; +class CContactItemField; +class CContactItemFieldDef; +class CContactItemFieldSet; +class CContactItem; + +class CContentType : public CBase +/** The content type for a contact item field. + +The content type identifies the field's type and the vCard property which +the field maps to. It is owned by the field. Field types are defined as UIDs +in cntdef.h. + +The vCard mapping is optional. It should be specified if the field type alone +is not enough to identify the mapping. The possible values for the vCard +mapping are defined as UIDs in cntdef.h. + +Each field is uniquely identified by the combination of UIDs contained in +the content type. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CContentType(); + IMPORT_C static CContentType* NewL(); + IMPORT_C static CContentType* NewL(TFieldType aFieldType,TUid aMapping=KNullUid); + IMPORT_C static CContentType* NewL(const CContentType &aContentType); + static CContentType* NewLC(RReadStream& aStream); + IMPORT_C void SetMapping(TUid aMapping); + IMPORT_C void AddFieldTypeL(TFieldType aFieldType); + IMPORT_C void RemoveFieldType(TFieldType aFieldType); + IMPORT_C TFieldType FieldType(TInt aIndex) const; + IMPORT_C TInt FieldTypeCount() const; + IMPORT_C TUid Mapping() const; + IMPORT_C TBool ContainsFieldType(TFieldType aFieldType) const; + IMPORT_C TBool SupportsMultipleLines() const; + IMPORT_C TBool operator==(const CContentType &aType) const; + IMPORT_C TBool IsEqualForSyncUpdate(const CContentType& aType) const; + IMPORT_C TBool IsEqual(const CContentType& aType) const; + void Reset(); + void InternalizeAdditionalUidsL(TInt aCount,RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); +private: + CContentType(); + CContentType(TUid aMapping); + void ConstructL(); + void CloneL(const CContentType &aContentType); +private: + TUid iMapping; + CArrayFix* iFieldTypes; + }; + +class CContactItemField : public CBase +/** A field in a contact item. + +Fields are grouped into a field set (CContactItemFieldSet), which is owned by +the contact item. + +The contact item field stores the field data. The data may be text, a date/time +value, or an agent, as indicated by the storage type (TStorageType). The storage +type is also owned by the field. Note that numeric field data is not supported. +All numbers, for instance telephone or fax numbers are stored as text. + +Fields also have a content type, attributes and a label. The label is a string +which identifies the field to a user e.g. First name, Last name. + +The following attributes are supported: + +- hidden: the field is not displayed if the view definition masks hidden +fields + +- disabled: the field cannot be deleted from the original template and thus +is marked as disabled + +- read only: the field cannot be written to + +- synchronise: used by Connectivity applications; set by default for all +contact item fields + +- user added: the field was added by the user and was not taken from the +template + +- template: indicates that the field is part of a template. Template fields +differ from other fields in that they are persisted when they do not contain +any data. + +- speed dial: the field contains a telephone number which maps to one of +the nine possible speed dial positions. + +These attributes can be set using member functions of this class, but they +are normally set automatically by other functions, for instance when +setting a speed dial field, CContactDatabase automatically sets the field's +speed dial attribute. +@publishedAll +@released +*/ + { +private: + friend class TFieldHeader; + friend class CContactItemFieldSet; + friend class CContactDatabase; + friend class CContactTables; + friend class RPplContactTable; + friend class CPackagerTests; + class THint + /** + @internalComponent + @released + */ + { + public: + THint(); + THint(TInt aValue); + TBool operator==(const THint& aHint) const; + TBool operator!=(const THint& aHint) const; + TInt HintType() const; + inline void SetIsMatchAll(); + inline void SetIsPhone(); + inline void SetIsMsg(); + inline void SetIsCompanyName(); + inline void SetIsFamilyName(); + inline void SetIsGivenName(); + inline void SetIsCompanyNamePronunciation(); + inline void SetIsFamilyNamePronunciation(); + inline void SetIsGivenNamePronunciation(); + inline void SetIsAddress(); + inline void SetIsAdditionalName(); + inline void SetIsSuffixName(); + inline void SetIsPrefixName(); + inline void SetStorageIsInline(); + inline void SetIsEmail(); + inline TBool IsMatchAll() const; + inline TBool IsDefault() const; + inline TBool IsPhone() const; + inline TBool IsMsg() const; + inline TBool IsCompanyName() const; + inline TBool IsFamilyName() const; + inline TBool IsGivenName() const; + inline TBool IsCompanyNamePronunciation() const; + inline TBool IsFamilyNamePronunciation() const; + inline TBool IsGivenNamePronunciation() const; + inline TBool IsAddress() const; + inline TBool IsAdditionalName() const; + inline TBool IsSuffixName() const; + inline TBool IsPrefixName() const; + inline TBool IsStorageInline() const; + inline TBool IsEmail() const; + inline TBool Contains(const THint& aHint) const; + +#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ + inline void SetHasAdditionalUids(); + TBool HasAdditionalUids() const; + + TInt FieldId() const; + void SetFieldId(TInt aId); + +#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ + TInt TemplateFieldId() const; + void SetTemplateFieldId(TInt aTemplateFieldId); + + inline void SetHasVCardMappingUid(); + inline TBool HasVCardMappingUid() const; + + inline TInt AdditionalUidsNum() const; + inline void SetAdditionalUidsNum(TInt aNumber); +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + public: + TInt iHintValue; + + }; + +public: + IMPORT_C static CContactItemField* NewLC(); + IMPORT_C static CContactItemField* NewL(TStorageType aType); + IMPORT_C static CContactItemField* NewLC(TStorageType aType); + IMPORT_C static CContactItemField* NewL(TStorageType aType, TFieldType aFieldType); + IMPORT_C static CContactItemField* NewLC(TStorageType aType, TFieldType aFieldType); + IMPORT_C static CContactItemField* NewL(const CContactItemField &aField); + IMPORT_C static CContactItemField* NewLC(const CContactItemField &aField); + IMPORT_C static CContactItemField* NewL(TStorageType aType, const CContentType &aContentType); + IMPORT_C static CContactItemField* NewLC(TStorageType aType, const CContentType &aContentType); + IMPORT_C ~CContactItemField(); + + IMPORT_C TStorageType StorageType() const; + IMPORT_C const CContentType &ContentType() const; + inline TBool IsHidden() const; + inline TBool IsReadOnly() const; + inline TBool IsDisabled() const; + inline TBool IsTemplate() const; + inline TBool IsPrivate() const; + inline TBool IsSpeedDial() const; + inline TBool DoSynchronize() const; + inline TBool OverRidesLabel() const; + inline TBool HasExtraStream() const; + inline TBool UsesTemplateTypes() const; + inline TBool LabelUnspecified() const; + inline TBool UserAddedField() const; + inline TBool IsCustomFilterable() const; + IMPORT_C void SetHintType(TInt aType); + IMPORT_C TPtrC Label() const; + IMPORT_C void ResetStore(); + IMPORT_C CContactFieldStorage* Storage() const; + IMPORT_C CContactTextField * TextStorage() const; + IMPORT_C CContactStoreField * StoreStorage() const; + IMPORT_C CContactAgentField * AgentStorage() const; + IMPORT_C CContactDateField * DateTimeStorage() const; + IMPORT_C void AddFieldTypeL(TFieldType aFieldType); + IMPORT_C void RemoveFieldType(TFieldType aFieldType); + IMPORT_C void SetMapping(TUid aMapping); + IMPORT_C void SetHidden(TBool aHidden); + IMPORT_C void SetReadOnly(TBool aReadOnly); + IMPORT_C void SetSynchronize(TBool aSynchronize); + IMPORT_C void SetDisabled(TBool aDisabled); + IMPORT_C void SetLabelL(const TDesC& aLabel); + IMPORT_C void SetLabel(HBufC* aLabel); + IMPORT_C void SetUserAddedField(TBool aUserAddedField); + IMPORT_C void SetTemplateField(TBool aTemplateField); + IMPORT_C void SetPrivate(TBool aTemplateField); + IMPORT_C void SetSpeedDial(TBool aSpeedDialField); + IMPORT_C void SetId(TInt aId); + IMPORT_C TInt Id() const; + IMPORT_C TUint UserFlags() const; + IMPORT_C void SetUserFlags(TUint aFlags); + IMPORT_C static TBool IsValidLabel(const TDesC& aLabel,TInt& aInvalidPos); + IMPORT_C TBool IsTemplateLabelField() const; + IMPORT_C void GetFieldText(TDes &aText) const; + IMPORT_C void RestoreHeaderL(RReadStream& aStream, const CContactItemFieldSet *aSystemTemplateFields); + IMPORT_C TStreamId RestoreFieldTypesL(RReadStream &aRootStream, const CContactItemFieldSet *aSystemTemplateFields); + IMPORT_C void RestoreTextL(HBufC *aTextStream,TInt aTextFieldIndex); + IMPORT_C TBool RestoreIfMatchL(RReadStream& aStream,const CContactItemFieldDef *aFieldDef, const CContactItemFieldSet *aSystemTemplateFields,HBufC *aTextStream,TInt aTextIndex); + +public: + IMPORT_C void SetCustomFilterable(EContactFieldFlags aContactFilterType); + IMPORT_C void Reset(); + void SetUsesTemplateTypes(TBool aUsesTemplateTypes); + void SetOverRidesLabel(TBool aValue); + TInt TemplateFieldId() const; + void SetDeleted(TBool aDeleted); + inline TBool IsDeleted() const; + void CopyStorageL(const CContactItemField &aField); + void UpdateFieldFlags(const CContactItemFieldSet& aTemplateFieldSet); + void PopulateStoreL(RStoreWriteStream& aRootStream, TInt aCount, CArrayFix& aFieldHeaderArray) const; + void PrepareFieldAsTemplateL(CContactItemFieldSet& aSystemTemplateFieldSet); + IMPORT_C TBool HasCustomFilter(EContactFieldFlags& contactFieldFlag) const; + TBool RestoreIfMatchL(RReadStream& aStream,TFieldType aFieldType, const CContactItemFieldSet *aSystemTemplateFields,HBufC *aTextStream,TInt aTextIndex); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); + +protected: + void UsesTemplateData(TInt aTemplateFieldId); +private: + void UsesTemplateLabel(); + void SetLabelUnspecified(TBool aUnspecified); + const CContentType &TemplateContentType(const CContactItemFieldSet &aSystemTemplateFields) const; + TFieldHeader StoreL(RWriteStream& aTextStream,CStreamStore& aBlobStore,TInt aTextFieldIndex); + TStreamId StoreAdditionalUidsL(CStreamStore& aStore,TStreamId aId, CArrayFixFlat *aAdditionalFields); + TStreamId StoreDataL(CStreamStore& aStore); + + void RestoreL(CStreamStore& aStore,RReadStream& aStream); + void RestoreDataL(CStreamStore& aStore,TStreamId aId); + + TStreamId RestoreHintL(CStreamStore& aStore,RReadStream& aStream); + TBool AddFieldToHint(TFieldType aFieldType, CContactItemField::THint &aHint) const; + void MapHintsToFieldTypesL(THint aHint); + CContactItemField(); + CContactItemField(TStorageType aType); + void CloneL(const CContactItemField &aField); + void ConstructStorageL(); +private: + enum {EUserMaskShift=4}; + enum // er5 hard coded enum most of which have been used but not documented ;o( + { + EHidden =0x00000001, + EReadOnly =0x00000002, + ESynchronize =0x00000004, + EDisabled =0x00000008, + /* 0x00000010,-> 0x00000080 are used for + the user defined attribs / categories like work / + Personal / Other / None - used in er5 UI */ + EUserMask =0x000000F0, + ETemplateMask =EUserMask|ESynchronize|EReadOnly|EHidden, + EOverRidesLabel =0x00000100, + EUsesTemplateData =0x00000200, + EUserAddedField =0x00000400, + ETemplate =0x00000800, + /* 0x00001000,-> 0x0000F000 are used for + the storage type of the contact field */ + ELabelUnspecified =0x40000000, + EDeleted =0x80000000 + }; + enum + // new extended enum to allow cntmodel to have + // more attributes per field + { + EPrivate =0x00000001, + ESpeedDial =0x00000002, + EUserDefinedFilter =0x00000004, + EUserDefinedFilter1 =0x00000008, + EUserDefinedFilter2 =0x00000010, + EUserDefinedFilter3 =0x00000020, + EUserDefinedFilter4 =0x00000040 + }; + +private: + CContentType *iContentType; + TStorageType iStorageType; + HBufC* iLabel; + TInt iId; + TUint32 iAttributes; + TUint32 iExtendedAttributes; + CContactFieldStorage* iStorage; + TInt iTemplateFieldId; + }; + +class CContactItemFieldDef : public CArrayFixFlat +/** A field definition. + +This is an array of field types. Field definitions are used by +CContactDatabase to specify a subset of fields when searching. + +The CContactItemFieldDef class is derived from CArrayFixFlat so all +relevant functions can be used, e.g. to add and remove elements. It adds no +functions other than a constructor. +@publishedAll +@released +*/ + { +public: + inline CContactItemFieldDef() : CArrayFixFlat(8) + /** Constructs the CContactItemFieldDef object, with an array granularity of 8. */ + {}; + }; + +class TContactFieldAtts +/** +@internalComponent +@released +*/ + { +public: + inline TContactFieldAtts() : iStorage(0) + {}; + + void SetAttribs(TUint32 aAttribs); + void SetExtendedAttribs(TUint32 aExtendedAttribs); + void SetType(TStorageType aType); + TUint32 Attribs() const; + TUint32 ExtendedAttribs() const; + TStorageType Type() const; + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + +#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ + TInt Count() const; + void SetCount(TInt aCount); + TInt TemplateFieldId() const; + void SetTemplateFieldId(TInt aId); +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + + +private: + TUint32 iStorage; + +#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ + TUint32 iExtendedAttribs; +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + }; + + +class TFieldHeader +/** +@internalComponent +@released +*/ +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + + { +public: + TFieldHeader(); + TFieldHeader(TContactFieldAtts aAtts, TUint32 aFieldUid, TStreamId aId); + + inline TContactFieldAtts FieldAtts() const; + inline void SetFieldAtts(TContactFieldAtts aAtts); + + inline TInt FieldId() const; + inline void SetFieldId(TInt aId); + + inline TStreamId StreamId() const; + inline void SetStreamId(TStreamId aId); + +private: + TContactFieldAtts iAtts; + TInt iFieldUid; + TStreamId iStreamId; + }; + +#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ + + { +public: + inline TFieldHeader(TStreamId aId,TContactFieldAtts aAtts); + +public: + TStreamId iStreamId; + TContactFieldAtts iAtts; + }; + +inline TFieldHeader::TFieldHeader(TStreamId aId,TContactFieldAtts aAtts) + { iStreamId=aId; iAtts=aAtts; } +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + +inline TBool CContactItemField::IsHidden() const +/** Gets the value of the field's hidden attribute. + +@return ETrue if hidden attribute is set, EFalse if not set. */ + { return iAttributes&EHidden; } + +inline TBool CContactItemField::IsReadOnly() const +/** Gets the value of the field's read only attribute. + +@return ETrue if read only attribute set, EFalse if not set. */ + { return iAttributes&EReadOnly; } + +inline TBool CContactItemField::IsDisabled() const +/** Gets the value of the field's disabled attribute. + +@return ETrue if disabled attribute set, EFalse if not set. */ + { return iAttributes&EDisabled; } + +inline TBool CContactItemField::IsTemplate() const +/** Tests whether the field is in a template, as set by SetTemplateField(). + +@return ETrue if field is a template field. EFalse if not. */ + { return iAttributes&ETemplate; } + +inline TBool CContactItemField::IsPrivate() const +/** Tests whether the field's private attribute is set. + +@return True if the field's private attribute is set, false if not. */ + { return iExtendedAttributes&EPrivate; } + +inline TBool CContactItemField::IsSpeedDial() const +/** Tests whether the field is a speed dial field. + +@return True if the field is a speed dial field, false if not. */ + { return iExtendedAttributes&ESpeedDial; } + +inline TBool CContactItemField::DoSynchronize() const +/** Gets the value of the field's synchronise attribute. + +@return ETrue if synchronise attribute is set, EFalse if not set. */ + { return iAttributes&ESynchronize; } + +inline TBool CContactItemField::IsDeleted() const +/** Gets the value of the field's deleted attribute. + +@return ETrue if the field is deleted, otherwise EFalse. */ + { return iAttributes&EDeleted; } + +inline void CContactItemField::THint::SetIsPhone() + {iHintValue|=KIntContactHintIsPhone;} +inline void CContactItemField::THint::SetIsMsg() + {iHintValue|=KIntContactHintIsMsg;} +// turn off Pronunciation bit too? +inline void CContactItemField::THint::SetIsCompanyName() + {iHintValue|=KIntContactHintIsCompanyName;} +inline void CContactItemField::THint::SetIsFamilyName() + {iHintValue|=KIntContactHintIsFamilyName;} +inline void CContactItemField::THint::SetIsGivenName() + {iHintValue|=KIntContactHintIsGivenName;} +inline void CContactItemField::THint::SetIsCompanyNamePronunciation() + {iHintValue|=KIntContactHintIsCompanyName|KIntContactHintIsPronunciation;} +inline void CContactItemField::THint::SetIsFamilyNamePronunciation() + {iHintValue|=KIntContactHintIsFamilyName|KIntContactHintIsPronunciation;} +inline void CContactItemField::THint::SetIsGivenNamePronunciation() + {iHintValue|=KIntContactHintIsGivenName|KIntContactHintIsPronunciation;} +inline void CContactItemField::THint::SetIsAddress() + {iHintValue|=KIntContactHintIsAddress;} +inline void CContactItemField::THint::SetIsAdditionalName() + {iHintValue|=KIntContactHintIsAdditionalName;} +inline void CContactItemField::THint::SetIsSuffixName() + {iHintValue|=KIntContactHintIsSuffixName;} +inline void CContactItemField::THint::SetIsPrefixName() + {iHintValue|=KIntContactHintIsPrefixName;} +inline void CContactItemField::THint::SetStorageIsInline() + {iHintValue|=KIntContactHintStorageInline;} +inline void CContactItemField::THint::SetIsEmail() + {iHintValue|=KIntContactHintIsEmail;} +inline TBool CContactItemField::THint::IsPhone() const + {return (iHintValue&KIntContactHintIsPhone);} +inline TBool CContactItemField::THint::IsMsg() const + {return (iHintValue&KIntContactHintIsMsg);} +inline TBool CContactItemField::THint::IsCompanyName() const + {return ((iHintValue&KIntContactHintIsCompanyNamePronunciation) == KIntContactHintIsCompanyName);} +inline TBool CContactItemField::THint::IsFamilyName() const + {return ((iHintValue&KIntContactHintIsFamilyNamePronunciation)==KIntContactHintIsFamilyName);} +inline TBool CContactItemField::THint::IsGivenName() const + {return ((iHintValue&KIntContactHintIsGivenNamePronunciation)==KIntContactHintIsGivenName);} +inline TBool CContactItemField::THint::IsCompanyNamePronunciation() const + {return ((iHintValue&KIntContactHintIsCompanyNamePronunciation) == KIntContactHintIsCompanyNamePronunciation);} +inline TBool CContactItemField::THint::IsFamilyNamePronunciation() const + {return ((iHintValue&KIntContactHintIsFamilyNamePronunciation)==KIntContactHintIsFamilyNamePronunciation);} +inline TBool CContactItemField::THint::IsGivenNamePronunciation() const + {return ((iHintValue&KIntContactHintIsGivenNamePronunciation)==KIntContactHintIsGivenNamePronunciation);} +inline TBool CContactItemField::THint::IsAddress() const + {return (iHintValue&KIntContactHintIsAddress);} +inline TBool CContactItemField::THint::IsAdditionalName() const + {return (iHintValue&KIntContactHintIsAdditionalName);} +inline TBool CContactItemField::THint::IsSuffixName() const + {return (iHintValue&KIntContactHintIsSuffixName);} +inline TBool CContactItemField::THint::IsPrefixName() const + {return (iHintValue&KIntContactHintIsPrefixName);} +inline TBool CContactItemField::THint::IsStorageInline() const + {return (iHintValue&KIntContactHintStorageInline);} +inline TBool CContactItemField::THint::IsEmail() const + {return (iHintValue&KIntContactHintIsEmail);} + +#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ +inline void CContactItemField::THint::SetHasAdditionalUids() + {iHintValue|=KHintAdditionalMask;} +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ +inline TBool CContactItemField::THint::Contains(const THint& aHint) const + {return (iHintValue&aHint.iHintValue);} + +inline TBool CContactItemField::OverRidesLabel() const +/** Tests whether the field's label (as set by SetLabel()) overrides the label +specified in the field's template. + +@return True if the field's label overrides the label specified in the template; +false if not. */ + {return iAttributes&EOverRidesLabel;} + +inline TBool CContactItemField::HasExtraStream() const +/** Tests whether the field needs an extra stream to store information not contained +in the template. This is the case if the field's content type is not based +on a template, or if the field has a label which overrides the label specified +in the template. + +@return True if the field uses an extra stream; false if not. */ + {return(!(iAttributes&EUsesTemplateData) || iAttributes&EOverRidesLabel);} + +inline TBool CContactItemField::UsesTemplateTypes() const +/** Tests whether or not the field's content type is based on a template. + +@return True if the field's content type is based on a template; false if not. */ + {return iAttributes&EUsesTemplateData;} + +inline TBool CContactItemField::LabelUnspecified() const +/** Tests whether the field's label has been set, either by a call to SetLabel() +or by inheriting a label specified in the template. + +@return True if the field's label has been set, false if not. */ + {return iAttributes&ELabelUnspecified;} + +inline TBool CContactItemField::UserAddedField() const +/** Gets the value of the user added field attribute. + +@return ETrue if the user added attribute is set, EFalse if not. */ + {return iAttributes&EUserAddedField;} + +inline TBool CContactItemField::IsCustomFilterable() const +/** Tests the value of the user defined filter attribute. + +@return ETrue if the user defined filter attribute is set, EFalse if not. */ + { + return (iExtendedAttributes&EUserDefinedFilter || iExtendedAttributes&EUserDefinedFilter1 || + iExtendedAttributes&EUserDefinedFilter2 || iExtendedAttributes&EUserDefinedFilter3 + || iExtendedAttributes&EUserDefinedFilter4); + } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntfilt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntfilt.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,214 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTFILT_H__ +#define __CNTFILT_H__ + +#include + +#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) +#include +#endif + +#include + +class CCntFilter : public CBase +/** A contact database filter. + +This is used to get a subset of the items in a contact database. +There are three criteria used when filtering a database: + +- the contact item's state + +- the date/time the contact item was created/last modified/deleted + +- the contact item's type + +The state can be one of: deleted, modified or created (since +a specified date/time). The filter can be set to include contact items of +only one state, or it can be set to include contact items of all states, using +the TInclude enumeration. + +The date/time value is used in combination with the contact item's state. + +The contact item's type is one of contact card, contact card group, contact +card template, or own card. Any combination of contact types may be specified +in the filter, in addition to the contact item's state. + +After the filter has been set up, it should be passed to the function +CContactDatabase::FilterDatabaseL(). +@publishedAll +@released +*/ + { + friend class CPackagerTests; //Comparison test +public: + /** Flags to identify which contact items should be included in the filter. + + Only one of the following values can be set in the filter at a time. However + the client may select to filter contacts in all states using EIncludeAllContacts. */ + enum TInclude + { + /** Contact items in all states should be included. */ + EIncludeAllContacts, + /** Only contact items which have been added since the date/time should be included. */ + EIncludeNewContacts, + /** Only contact items which have been modified since the date/time should be included. */ + EIncludeModifiedContacts, + /** Only contact items which have been deleted since the date/time should be included. */ + EIncludeDeletedContacts + }; + /** Contact item types.*/ + enum TContactType + { + /** All contact item types should be included. */ + EIncludeAllTypes = 0x01, + /** Contact cards should be included in the filter. */ + EContactCards = 0x02, + /** Contact card groups should be included in the filter. */ + EContactGroups = 0x04, + /** Contact card templates should be included in the filter. */ + EContactTemplates = 0x08, + /** Own cards should be included in the filter. */ + EContactOwnCard = 0x10 + }; + + IMPORT_C static CCntFilter* NewL(); + IMPORT_C static CCntFilter* NewLC(); + IMPORT_C static CCntFilter* NewL(const CCntFilter* aFilter); + IMPORT_C static CCntFilter* NewLC(const CCntFilter* aFilter); + static CCntFilter* NewLC(RReadStream& aStream); + IMPORT_C ~CCntFilter(); +public: + /** A pointer to an array which stores the filtered list of contact IDs. */ + CContactIdArray* iIds; +// + IMPORT_C void SetIncludeModifiedContacts(TBool aIncludeModified); + IMPORT_C void SetIncludeNewContacts(TBool aIncludeNew); + IMPORT_C void SetIncludeDeletedContacts(TBool aIncludeDeleted); +// + IMPORT_C TBool TestContactFilterType(TUid aTypeUid); + IMPORT_C void SetContactFilterTypeALL(TBool aFilterAllContacts); + IMPORT_C void SetContactFilterTypeCard(TBool aFilterCards); + IMPORT_C void SetContactFilterTypeGroup(TBool aFilterGroups); + IMPORT_C void SetContactFilterTypeTemplate(TBool aFilterTemplates); + IMPORT_C void SetContactFilterTypeOwnCard(TBool aFilterOwnCard); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); +// + inline TBool ContactFilterTypeALL() const; + inline TBool ContactFilterTypeCard() const; + inline TBool ContactFilterTypeGroup() const; + inline TBool ContactFilterTypeOwnCard() const; + inline TBool ContactFilterTypeTemplate() const; +// + inline TBool IncludeModifiedContacts(); + inline TBool IncludeNewContacts(); + inline TBool IncludeDeletedContacts(); +// + inline TTime GetFilterDateTime(); + inline void SetFilterDateTime(TTime aTime); +// + IMPORT_C void Reset(); +// +/** + Intended usage: Reserved to preserve future BC */ + IMPORT_C void Reserved1(); +/** + Intended usage: Reserved to preserve future BC */ + IMPORT_C void Reserved2(); + +private: + TTime iSinceDateTime; + TInclude iInclude; + TInt32 iContactType; + TAny* iReserved1; + TAny* iReserved2; + CCntFilter(); + CCntFilter(const CCntFilter* aFilter); + }; + + +inline TBool CCntFilter::IncludeModifiedContacts() +/** Tests whether the filter includes only contacts modified since the filter's +date/time. + +@return ETrue if the filter only includes modified contacts. EFalse if not. */ + {return iInclude == EIncludeModifiedContacts;}; + +inline TBool CCntFilter::IncludeNewContacts() +/** Tests whether the filter includes only contacts created since the filter's +date/time. + +@return ETrue if the filter only includes new contacts. EFalse if not. */ + {return iInclude == EIncludeNewContacts;}; + +inline TBool CCntFilter::IncludeDeletedContacts() +/** Tests whether the filter includes only contacts deleted since the filter's +date/time. + +@return ETrue if the filter only includes deleted contacts. EFalse if not. */ + {return iInclude == EIncludeDeletedContacts;}; + +inline TTime CCntFilter::GetFilterDateTime() +/** Gets the date and time used by the filter, as set by SetFilterDateTime(). + +@return The filter's date and time value. */ + {return iSinceDateTime;}; + +inline void CCntFilter::SetFilterDateTime(TTime aTime) +/** Sets the date and time used by the filter in combination with the TInclude +value to test contact items against. + +@param aTime The new date and time value. */ + {iSinceDateTime = aTime;}; + +// CONTACT TYPE +inline TBool CCntFilter::ContactFilterTypeALL() const +/** Tests whether all contact item types are included in the filter, as set by +SetContactFilterTypeALL(). + +@return ETrue if all contact item types are included in the filter, EFalse +if not. */ + {return iContactType & EIncludeAllTypes;} + +inline TBool CCntFilter::ContactFilterTypeCard() const +/** Tests whether contact cards are included in the filter, as set by SetContactFilterTypeCard(). + +@return ETrue if contact cards are included in the filter, EFalse if not. */ + {return iContactType & EContactCards;} + +inline TBool CCntFilter::ContactFilterTypeGroup() const +/** Tests whether contact card groups are included in the filter, as set by SetContactFilterTypeGroup(). + +@return ETrue if contact card groups are included in the filter, EFalse if +not. */ + {return iContactType & EContactGroups;} + +inline TBool CCntFilter::ContactFilterTypeOwnCard() const +/** Tests whether own cards are included in the filter, as set by SetContactFilterTypeOwnCard(). + +@return ETrue if own cards are included in the filter, EFalse if not. */ + {return iContactType & EContactOwnCard;} + +inline TBool CCntFilter::ContactFilterTypeTemplate() const +/** Tests whether contact card templates are included in the filter, as set by +SetContactFilterTypeTemplate(). + +@return ETrue if contact card templates are included in the filter, EFalse +if not. */ + {return iContactType & EContactTemplates;} + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntfldst.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntfldst.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,191 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__CNTFLDST_H__) +#define __CNTFLDST_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__BAMDESCA_H__) +#include +#endif + +#if !defined(__S32STD_H__) +#include +#endif + +#if !defined(__CNTDEF_H__) +#include +#endif +#define KTextStreamSeparator 0x00 + + + +class CStreamStore; + +class CContactFieldStorage : public CBase +/** Abstract base class for the different types of contact field data storage. + +CContactTextField, CContactStoreField, CContactAgentField, CContactDateField +and CContactNumberField are all derived from this class. + +A pointer to the base class can be obtained by calling CContactItemField::Storage(). +Pointers to the derived classes can be retrieved by calling CContactItemField::TextStorage(), +CContactItemField::StoreStorage() etc. +@publishedAll +@released +*/ + { +public: + /** Internalises the field data. + + @param aStream Stream from which the the contents of the field should be internalised. */ + virtual void InternalizeL( RReadStream& aStream)=0; + /** Externalises the field data. + + @param aStream Write stream to which the contents of the field should be externalised. */ + virtual void ExternalizeL(RWriteStream& aStream) const=0; + /** Stores the field data. + + @param aStore Reference to the stream store to which the field data is written. + @return The ID of the stream store. */ + virtual TStreamId StoreL(CStreamStore& aStore) const=0; + /** Restores the field data. + + @param aStore Reference to the store from which the object is to be restored. + @param aStream Reference to the stream which should be passed to InternalizeL(). */ + virtual void RestoreL(CStreamStore& aStore,RReadStream& aStream)=0; + /** Tests whether the field storage contains data. + + @return True if the field storage contains data, false if not. */ + virtual TBool IsFull() const=0; +private: + IMPORT_C virtual void CContactFieldStorage_Reserved1(); + TAny* CContactFieldStorage_Reserved; + }; + +class CContactTextField : public CContactFieldStorage +/** Provides access to the text stored in a contact item field. + +An object of this class can be retrieved using CContactItemField::TextStorage(). +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CContactTextField(); +public: + void InternalizeL(HBufC *aTextStream,TInt aTextFieldIndex); + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + void ExternalizeL(RWriteStream& aStream,TBool aIsInlineBlob,TInt aTextFieldIndex) const; + TStreamId StoreL(CStreamStore& aStore) const; + void RestoreL(CStreamStore& aStore,RReadStream& aStream); + IMPORT_C void SetTextL(const TDesC& aText); + IMPORT_C void SetText(HBufC *aHbuf); + IMPORT_C void SetTextArray(MDesCArray* anArray); + IMPORT_C TPtrC Text() const; + TBool IsFull() const; + IMPORT_C TPtrC StandardTextLC() const; + IMPORT_C void SetStandardTextL(const TDesC& aText); + IMPORT_C void SetStandardTextArray(MDesCArray* anArray); +private: + HBufC *EncodeL(const TDesC& aText,TUid aConversion) const; + IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); +private: + HBufC* iText; + }; + +class CContactStoreField : public CContactFieldStorage +/** Provides access to the binary field data stored in an 8-bit descriptor. + +An object of this class can be retrieved using CContactItemField::StoreStorage(). +@publishedAll +@released +*/ + { +public: + ~CContactStoreField(); + TStreamId StoreL(CStreamStore& aStore) const; + void RestoreL(CStreamStore& aStore,RReadStream& aStream); + IMPORT_C void SetThingL(const TDesC8& aDes); + IMPORT_C void SetThingL(const HBufC8& aDes); + IMPORT_C void SetThingL(const CBufBase* aBuf); + IMPORT_C HBufC8* Thing() const; + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TBool IsFull() const; +private: + IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); +private: + HBufC8* iThing; + }; + +class CContactAgentField : public CContactFieldStorage +/** Provides access to an agent ID. + +An agent is a field in a contact item which contains another person's +contact details. It corresponds to the agent property in the vCard +specification (version 2.1). The agent is identified by an agent ID +(a TContactItemId). + +An object of this class can be retrieved using CContactItemField::AgentStorage(). +@publishedAll +@released +*/ + { +public: + TStreamId StoreL(CStreamStore& aStore) const; + void RestoreL(CStreamStore& aStore,RReadStream& aStream); + IMPORT_C void SetAgentId(TContactItemId aId); + IMPORT_C TContactItemId Value() const; + void InternalizeL( RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TBool IsFull() const; +private: + IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); +private: + TContactItemId iAgentId; + }; + +class CContactDateField : public CContactFieldStorage +/** Provides access to the date/time value stored in a contact item field. + +An object of this class can be retrieved using CContactItemField::DateTimeStorage(). +@publishedAll +@released +*/ + { +public: + CContactDateField(); + TStreamId StoreL(CStreamStore& aStore) const; + void RestoreL(CStreamStore& aStore,RReadStream& aStream); + IMPORT_C void SetTime(TTime aTime); + IMPORT_C void SetTime(TDateTime aDateTime); + IMPORT_C TTime Time() const; + void InternalizeL( RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TBool IsFull() const; +private: + IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); +private: + TTime iTime; + }; + + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntitem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntitem.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,559 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Persistence layer exports +// +// + +#if !defined(__CNTITEM_H__) +#define __CNTITEM_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__CNTDEF_H__) +#include +#endif + +#if !defined(__CNTFIELD_H__) +#include +#endif + +#include + + +const TInt KUidStringLength =244; +#define KUidStringSeparator '-' +class CContactItemField; +#define KContactMaxFieldNumber 32 +class CContactItemViewDef; +class CContactItem; + +const TInt KContactFieldSetSearchAll=-1; +class CContactItemFieldSet : public CBase +/** A contact item's field set. The field set owns an array of contact item fields +(CContactItemFields). The field set is owned by a contact item, and can be +retrieved using CContactItem::CardFields(). Use functions in class +CContactItem to add and remove fields to/from the field set. + +A field set can contain more than one field of the same type, but this is +not advisable as it may cause problems when synchronising the contacts database. +@publishedAll +@released +*/ + { + friend class CContactItemField; + friend class CContactDatabase; + friend class CContactTables; + friend class RPplContactTable; +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + friend class TCntPersistenceUtility; +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ +public: + IMPORT_C static CContactItemFieldSet* NewL(); + IMPORT_C static CContactItemFieldSet* NewLC(); + IMPORT_C ~CContactItemFieldSet(); + inline const CContactItemField& operator[](TInt aIndex) const; + inline CContactItemField& operator[](TInt aIndex); + inline TInt Find(TFieldType aFieldType) const; // will only find the first such occurence + inline TInt Find(TFieldType aFieldType,TUid aMapping) const; + IMPORT_C TInt FindNext(TFieldType aFieldType,TInt aStartPos=KContactFieldSetSearchAll) const; + IMPORT_C TInt FindNext(TFieldType aFieldType,TUid aMapping,TInt aStartPos=KContactFieldSetSearchAll) const; + inline TInt Count() const; + inline void Reset(); + IMPORT_C void UpdateFieldL(const CContactItemField& aField, TInt aMatchCount); + IMPORT_C void UpdateFieldSyncL(const CContactItemField& aField, TInt aMatchCount); + IMPORT_C CContactItemFieldSet& AddL(CContactItemField& aField); + IMPORT_C void Remove(TInt aIndex); + IMPORT_C void InsertL(TInt aIndex,CContactItemField& aField); + IMPORT_C void Move(TInt aFrom, TInt aTo); + IMPORT_C TStreamId StoreL(CStreamStore& aStore,RWriteStream& aTextStream,CStreamStore& aBlobStore); + TStreamId StoreL(CStreamStore& aStore,RWriteStream& aTextStream,CStreamStore& aBlobStore,CContactTables* aTables); + IMPORT_C void RestoreL(CStreamStore& aStore, TStreamId anId,CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,RReadStream& aReadStream); + IMPORT_C void RestoreL(CStreamStore& aStore, TStreamId anId,CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,const CContactItem* aTemplate, HBufC* aTextBuf); + TInt FieldText(TFieldType aFieldType, TDes &aText, TInt aStartPosition) const; + CArrayFix* ConstructFieldHeaderArrayLC(RWriteStream& aTextStream, CStreamStore& aBlobStore); + TInt FieldTypeCount(const CContactItemFieldSet& aSystemTemplateFields, TInt aStartIndex, const CContactItemField& aField) const; + TBool ContainsFieldTypeMapping(const CContentType& aBaseFieldContentType, const TFieldType& aContactFieldType) const; + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); +private: + CContactItemFieldSet(); + void ConstructL(); + void SetFieldId(CContactItemField& aField); + const CContactItemField* FindById(TInt aId) const; + IMPORT_C TStreamId StoreL(CStreamStore& aStore,const CContactItem* aTemplate,RWriteStream& aStream,CStreamStore& aBlobStore,CContactTables* aTables); + void RestoreL(CStreamStore& aStore, TStreamId anId, CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,const CContactItem* aTemplate,RReadStream& aReadStream,CContactTables* aContactsTable, RArray* aEmailIdArray); + void RestoreAndAddTemplateL(CStreamStore& aStore, TStreamId aId,CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,const CContactItem* aTemplate, RReadStream& aReadStream,CContactTables* aContactsTable,RArray* aEmailIdArray); + TInt MatchTemplateField(const CContentType& aContentType,TUint aUserFlags,TBool &aExactMatch) const; + static HBufC* LoadTextStreamLC(RReadStream& aStream); + void NonZeroFieldText(TFieldType aFieldType, TDes &aText) const; + +private: + CArrayPtr* iFields; + }; + +class CContactDatabase; +class RCntModel; +class CContactItem : public CBase +/** The abstract base class for contact cards, templates and groups. All contact +items are identified by a contact ID, (TContactItemId), have a last modified +date/time and own one or more fields (the field set). Contact items also +have an access count and attributes (e.g. hidden). Note that fields in a contact +item also have attributes. Attribute values specified in the contact item +override those in the contained fields. The access count is a record of the +number of objects referencing a contact item. A contact item cannot be fully +deleted until its access count is zero. +@publishedAll +@released +*/ + { + friend class CContactCardTemplate; + friend class CContactItemPlusGroup; + friend class CContactCard; + friend class CContactTemplate; + friend class CContactGroup; + friend class CContactOwnCard; + friend class CVCardToContactsAppConverter; + friend class CContactICCEntry; + friend class RPplContactTable; + friend class RPplIdentityTable; + friend class RPplPreferencesTable; + friend class CPackagerTests; //Comparison test + friend class CPackagerCntComparator; + friend class CContactDatabase; + friend class CPplContactItemManager; +public: + IMPORT_C ~CContactItem(); + /** Gets the contact item's type. + + @return The contact item's type. */ + virtual TUid Type() const=0; + static CContactItem* NewLC(RReadStream& aStream); + IMPORT_C static CContactItem* NewLC(TUid aType); + IMPORT_C TContactItemId Id() const; + IMPORT_C TContactItemId TemplateRefId() const; + IMPORT_C TTime LastModified() const; + IMPORT_C void SetLastModified(const TTime& aLastModified); + IMPORT_C void AddFieldL(CContactItemField& aField); + IMPORT_C void RemoveField(TInt aFieldPos); + IMPORT_C void InsertFieldL(CContactItemField& aField,TInt aFieldPos); + IMPORT_C CContactItemFieldSet& CardFields() const; + IMPORT_C void SetHidden(TBool aHidden); + IMPORT_C void SetSystem(TBool aSystem); + IMPORT_C TBool IsHidden(); + IMPORT_C TBool IsSystem(); + IMPORT_C void UpdateFieldSet(CContactItemFieldSet* aNewFieldSet); + IMPORT_C void SetDeleted(TBool aDeleted); + IMPORT_C TBool IsDeleted() const; + IMPORT_C void SetTemplateRefId(TContactItemId aUid); + TContactItemId Agent(); + inline TBool IsDeletable(); + inline void IncAccessCount(); + inline void DecAccessCount(); + inline TInt AccessCount() const; + IMPORT_C void SetUidStringL(TDesC& aString); + IMPORT_C TPtrC UidStringL(TInt64 aMachineUniqueId) const; + TStreamId PopulateStoreL(CStreamStore& aStore, CArrayFix& aFieldHeaderArray) const; + void AddLabelFieldL(); + IMPORT_C void RestoreTemplateFieldsL(const CContactItemFieldSet& aSystemTemplateFields, const CContactItemFieldSet& aTemplateFields, const CContactItemViewDef& aViewDef); + void ClearFieldContent(); + inline TPtrC Guid(); + virtual void ExternalizeL(RWriteStream& aStream) const; + virtual void InternalizeL(RReadStream& aStream); + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + IMPORT_C void SetId(TContactItemId aId); + IMPORT_C TUint32 Attributes() const; + IMPORT_C void SetAttributes(TUint32 aAttributes); + IMPORT_C void SetAccessCount(TUint32 aAccessCount); + IMPORT_C void SetCreationDate(const TTime& aTime); +#endif + +public: + /** Contact item's attribute flags + + These flags can be used to set the various attributes of a contact item. */ + enum + { + /** To set the contact item's system attribute. */ + ESystem=0x01, + /** To set the contact item's hidden attribute. */ + EHidden=0x02, + /** To set the contact item's hidden attribute. */ + ECompressedGuid=0x04, + /** To set the contact item's Is deleted attribute. */ + EDeleted=0x08 + }; +protected: +private: + CContactItem(); + void ConstructL(); + void ConstructL(const CContactItem *aTemplate); + void MakeUidStringL(TInt64 aMachineUniqueId); + IMPORT_C void SetHasCompressedGuid(TBool aCompressed); + TBool GuidIsCompressed() const; + TInt NumberOfFieldsToStore() const; + +private: + CContactItemFieldSet* iFieldSet; + TUint32 iAttributes; + TContactItemId iId; + TContactItemId iTemplateRefId; + TTime iLastModified; + TTime iCreationDate; + TUint32 iAccessCount; + HBufC* iGuid; + friend class CContactDatabase; + }; + +class CContactItemPlusGroup : public CContactItem +/** Abstract base class for CContactGroup, CContactCard and CContactOwnCard. + +The purpose of this class is to avoid duplication of group functionality +in its derived classes. +@publishedAll +@released +*/ + { +public: + IMPORT_C const CContactIdArray* GroupsJoined() const; + IMPORT_C CContactIdArray* GroupsJoinedLC() const; +protected: + CContactItemPlusGroup(); + IMPORT_C ~CContactItemPlusGroup(); +public: + virtual void ExternalizeL(RWriteStream& aStream) const; + virtual void InternalizeL(RReadStream& aStream); + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + IMPORT_C void ResetGroups(); + IMPORT_C void SetGroups(CContactIdArray* aGroups); +#endif + +private: + CContactIdArray* iGroups; + friend class CContactDatabase; + friend class RPplLookupGroupsTable; + friend class RPplGroupMembershipTable; + }; + +class CContactGroup : public CContactItemPlusGroup +/** A contact group. + +A contact group is a contact item which holds a set of associated contact +item IDs. The members of the group may be contact cards, own cards, or even +other groups. The group has a label which identifies the group to users, e.g. +"family", or "colleagues". The type of a contact group is KUidContactGroup, +as returned by Type(). + +Objects of this class are constructed using CContactDatabase::CreateContactGroupL() +or CreateContactGroupLC(). These functions create the group, optionally with +a label, add it to the database, and return a pointer to it. + +To create an association between a card and a group, use CContactDatabase::AddContactToGroupL() +and to remove the association, use RemoveContactFromGroupL(). To find out +which groups a card belongs to, use CContactCard::GroupsJoinedLC() or CContactOwnCard::GroupsJoinedLC(). + +The function CContactDatabase::GetGroupIdListL() may be used to retrieve a +list of IDs for all groups in the database. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactGroup* NewL(); + IMPORT_C static CContactGroup* NewLC(); + IMPORT_C ~CContactGroup(); +public: // from CContactItem + IMPORT_C TUid Type() const; +public: + // default sorted item array is ascending + IMPORT_C CContactIdArray* ItemsContainedLC() const; + IMPORT_C const CContactIdArray* ItemsContained() const; + IMPORT_C TBool IsSystem() const; + IMPORT_C void SetSystem(TBool aSystem); + IMPORT_C TBool ContainsItem(TContactItemId aContactId); + IMPORT_C void SetGroupLabelL(const TDesC& aLabel); + IMPORT_C TPtrC GetGroupLabelL(); + IMPORT_C TBool HasItemLabelField(); + IMPORT_C CContactIdArray* GroupsJoinedLC() const; +// + //IMPORT_C void ReservedFunction1(); + IMPORT_C void AddContactL(TContactItemId aContactId); + //IMPORT_C void ReservedFunction2(); + IMPORT_C void RemoveContactL(TContactItemId aContactId); + virtual void ExternalizeL(RWriteStream& aStream) const; + virtual void InternalizeL(RReadStream& aStream); + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + IMPORT_C void ResetItems(); + IMPORT_C void SetItems(CContactIdArray* aItems); +#endif + +private: + CContactGroup(); +private: + CContactIdArray* iItems; + friend class CContactDatabase; + friend class RPplGroupMembershipTable; + }; + +class CContactCardTemplate : public CContactItem +/** A contact card template. + +This is a contact item containing a set of fields on which new contact items can +be based. Templates have a label which is a string which identifies the template +to a user. For instance, 'work template' could indicate a template used +to create contact cards in the style of a work colleague. Contact card templates +have a type of KUidContactCardTemplate, as returned by Type(). + +Objects of this class cannot be constructed directly because its constructors +are protected. Instead, use either CContactDatabase::CreateContactCardTemplateL() +or CreateContactCardTemplateLC(). These functions create a contact card template, +add it to the database, and return a pointer to it. + +The function CContactDatabase::GetCardTemplateIdListL() gets a list of the +IDs of all contact card templates in the database. +@publishedAll +@released +*/ + { + friend class CContactDatabase; + friend class CContactTables; + friend class RPplContactTable; + friend class CContactItem; +public: + IMPORT_C void SetTemplateLabelL(const TDesC& aLabel); + IMPORT_C TPtrC GetTemplateLabelL(); +protected: + IMPORT_C static CContactCardTemplate* NewL(); + IMPORT_C static CContactCardTemplate* NewLC(); + IMPORT_C static CContactCardTemplate* NewL(const CContactItem *aTemplate); + IMPORT_C static CContactCardTemplate* NewLC(const CContactItem *aTemplate); + IMPORT_C TBool HasItemLabelField(); +// +/** + Intended usage: Reserved to preserve future BC */ + IMPORT_C void ReservedFunction1(); +/** + Intended usage: Reserved to preserve future BC */ + IMPORT_C void ReservedFunction2(); + +protected: // from CContactItem + IMPORT_C TUid Type() const; +private: + CContactCardTemplate(); + }; + +class CContactCard : public CContactItemPlusGroup +/** A contact card. + +Implements the Type() function declared in class CContactItem. +Contact cards may optionally be constructed from a template. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CContactCard(); + IMPORT_C static CContactCard* NewL(); + IMPORT_C static CContactCard* NewLC(); + IMPORT_C static CContactCard* NewL(const CContactItem *aTemplate); + IMPORT_C static CContactCard* NewLC(const CContactItem *aTemplate); +public: // from CContactItem + IMPORT_C TUid Type() const; +public: + IMPORT_C CContactIdArray* GroupsJoinedLC() const; +private: + CContactCard(); +private: + friend class CContactDatabase; + }; + +class CContactOwnCard : public CContactItemPlusGroup +/** Own card. + +An own card is a contact card which contains information about the device's +owner. This can be sent to another compatible electronic device as a vCard. +The contact database recognises a single own card, referred to as the +current own card; its ID is returned by CContactDatabase::OwnCardId(). Like +a contact card, an own card can be a member of one or more contact card groups. +The own card type is identified by a UID of KUidContactOwnCard. + +Own cards can be constructed using either CContactDatabase::CreateOwnCardLC() +or CreateOwnCardL(). These functions create an own card, based on the system +template, add it to the database, set it as the database's current own card +and return a pointer to it. To change the database's current own card, use +CContactDatabase::SetOwnCardL(). +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CContactOwnCard(); + IMPORT_C static CContactOwnCard* NewL(); + IMPORT_C static CContactOwnCard* NewLC(); + IMPORT_C static CContactOwnCard* NewL(const CContactItem *aTemplate); + IMPORT_C static CContactOwnCard* NewLC(const CContactItem *aTemplate); +public: // from CContactItem + IMPORT_C TUid Type() const; +public: + IMPORT_C CContactIdArray* GroupsJoinedLC() const; +private: + CContactOwnCard(); +private: + friend class CContactDatabase; + }; + +class CContactTemplate : public CContactItem +/** A contact item template. + +This is a contact item which is used to seed the initial field set for +other contact items. + +Non-system (i.e. user-defined) templates are implemented +by the CContactCardTemplate class. CContactCardTemplate should be +used in preference to CContactTemplate. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactTemplate* NewL(); + IMPORT_C static CContactTemplate* NewLC(); + IMPORT_C static CContactTemplate* NewL(const CContactItem *aTemplate); + IMPORT_C static CContactTemplate* NewLC(const CContactItem *aTemplate); +public: // from CContactItem + IMPORT_C TUid Type() const; +private: + CContactTemplate(); + }; + + +class CContactICCEntry : public CContactItemPlusGroup +/** A contact ICC entry. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CContactICCEntry(); + IMPORT_C static CContactICCEntry* NewL(const CContactItem& aTemplate); + static CContactICCEntry* NewL(); +public: //from CContactItem + TUid Type() const; +private: + CContactICCEntry(); + }; + + +class ContactGuid +/** A globally unique identifier enquiry utility. + +Each contact item has a unique identifier, stored as a descriptor. It is +referred to as the 'UID string'. This is a combination of the unique +identifier of the database in which the contact item was created, the +contact item ID and the date/time of the contact item's creation. ContactGuid +provides a single static exported function to enquire whether an item was +created in a specified database. +@publishedAll +@released +*/ + { +public: + IMPORT_C static TContactItemId IsLocalContactUidString(const TDesC& aString, TInt64 aMachineUniqueId); + IMPORT_C static TBool GetCreationDate(TDes& aString, TInt64 aMachineUniqueId); + static HBufC* CreateGuidLC(const TDesC& aCreationDate,TContactItemId aId, TInt64 aMachineUniqueId); + static HBufC* CreateGuidLC(const TTime& aCreationDate,TContactItemId aId, TInt64 aMachineUniqueId); + static HBufC* CreateGuidLC(TContactItemId aId, TInt64 aMachineUniqueId); + }; + +inline const CContactItemField& CContactItemFieldSet::operator[](TInt aIndex) const +/** Gets the field located at a specified position in the field set. + +@param aIndex The position of the field in the field set. This is relative to zero. +It must be non-negative and less than the number of objects in the array, otherwise +the operator raises a panic. + +@return A const reference to an element in the array. */ + { return *(*iFields)[aIndex]; } + +inline CContactItemField& CContactItemFieldSet::operator[](TInt aIndex) +/** Gets the field located at a specified position in the field set. + +@param aIndex The position of the field in the field set. This is relative to zero. +It must be non-negative and less than the number of objects in the array, otherwise +the operator raises a panic. + +@return A non-const reference to an element in the array. */ + { return *(*iFields)[aIndex]; } + +inline TInt CContactItemFieldSet::Find(TFieldType aFieldType) const +/** Finds the first field in the field set with the specified field type. + +@param aFieldType The field type of interest. +@return If found, the index of the field within the field set, or KErrNotFound +if not found. */ + { return FindNext(aFieldType,KContactFieldSetSearchAll); } + +inline TInt CContactItemFieldSet::Find(TFieldType aFieldType,TUid aMapping) const +/** Finds the first field in the field set containing both the content type mapping +and the field type specified. + +@param aFieldType The field type of interest. +@param aMapping The content type mapping of interest. +@return If found, the index of the field within the field set, or KErrNotFound +if not found. */ + { return FindNext(aFieldType,aMapping,KContactFieldSetSearchAll); } + +inline TInt CContactItemFieldSet::Count() const +/** Gets the number of fields in the field set. + +@return The number of fields in the field set. */ + { return iFields->Count(); } + +inline void CContactItemFieldSet::Reset() +/** Deletes all fields in the field set. */ + { iFields->ResetAndDestroy(); } + +inline TBool CContactItem::IsDeletable() +/** Tests whether the contact item is deletable. + +This is true if the item's access count is zero. + +@return ETrue if deletable, EFalse if not deletable. */ + {return (iAccessCount == 0);} + +inline void CContactItem::IncAccessCount() +/** Increments the contact item's access count. */ + {iAccessCount++;} + +inline void CContactItem::DecAccessCount() +/** Decrements the contact item's access count. */ + {if(iAccessCount) iAccessCount--;} + +inline TInt CContactItem::AccessCount() const +/** Gets the contact item's access count. + +@return The item's access count. */ + {return(iAccessCount);} + +inline TPtrC CContactItem::Guid() +/** Accessor function for Contact Guid. + * This is used to cache contact items that are added during a sync. + @return Guid */ + { return iGuid ? *iGuid : TPtrC(KNullDesC); } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntsync.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntsync.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,135 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTSYNC_H__ +#define __CNTSYNC_H__ + + +#include +#include + +class CContactICCEntry; +class MContactSynchroniser +/** +Abstract interface for a contacts phonebook synchroniser. + +It should be inherited by classes which implement the phonebook +synchroniser API. The plug-in should have a second UID of +0x101F4A6E (KUidContactSynchroniserDll). + +@internalAll +*/ + { +public: + /** + @internalAll + */ + enum TValidateOperation + { + ERead, /** Check a cached ICC contact can be read */ + ESearch, /** Check a cached ICC contact can be searched */ + EEdit /** Check a cached ICC contact can be edited */ + }; +public: + /* + A CContactICCEntry is wanted for read/search or edit. + */ + virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0; + /* + A CContactICCEntry has being added/edited. + */ + virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0; + /* + A CContactICCEntry is being deleted from the database. + */ + virtual TInt DeleteContact(TContactItemId aId) = 0; + /* + Release resources used by Phonebook Synchroniser. Called prior to unloading plug-in. + */ + virtual void Release() = 0; + /* + A new CContactICCEntry has been added to the database. + (Called after ValidateWriteContact() and database write has completed.) + */ + virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0; + + /* + Id of template contact for specified phonebook + */ + virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0; + + /* + Id of contact group for specified phonebook + */ + virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0; + + /* + Request notifiction of Synchronisation state changes for specified phonebook + */ + virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0; + /* + Cancel notification of Synchronisation state changes for specified phonebook + */ + virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0; + /* + Test Synchronisation state changes for specified phonebook + */ + virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0; + + /* + List of Phonebooks supported by Phonebook Synchroniser that may be present on the ICC. + */ + virtual TInt PhonebookList(RArray& aPhonebookList) = 0; + +private: + IMPORT_C virtual void MContactSynchroniser_Reserved_1(); + }; + + +/** The UID for the default phone book synchroniser ECom plugin interface +*/ +const TUid KUidEcomCntPhBkSyncInterface = {0x102035FD}; + +class CContactSynchroniser : public CBase, public MContactSynchroniser +/** +Abstract interface for a ECom contacts phonebook synchroniser plugin + +It should be inherited by classes which implement the phonebook +synchroniser API in a platform secured environment. The ECom plug-in interface uid is +KUidEcomCntPhBkSyncInterface +@internalAll +*/ + { +public: + // From MContactSynchroniser + virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0; + virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0; + virtual TInt DeleteContact(TContactItemId aId) = 0; + virtual void Release() = 0; + virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0; + virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0; + virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0; + virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0; + virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0; + virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0; + virtual TInt PhonebookList(RArray& aPhonebookList) = 0; +public: + static CContactSynchroniser* NewL(); + IMPORT_C virtual ~CContactSynchroniser(); +private: + TUid iDtor_ID_Key; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntvcard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntvcard.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,131 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTVCARD_H__ +#define __CNTVCARD_H__ + +// System includes +#include +#include + +// Classes referenced +class CVCardAddress; +class CVCardItemAndLabel; +class CVCardToContactsAppConverter; + +// Enumerations +/** +@internalComponent +@released +*/ +enum TCntVCardImportType + { + ECntVCardImportTypeFirstSync, + ECntVCardImportTypeMerge + }; + +class CContactVCardConverter : public CContactEcomConverter +/** +Plug-in vCard to CContactItem converter. +@publishedAll +@released +*/ + { +public: + // Ideally each converter should be able to define its own flags relevant + // to its own mode of operation. Due to the legacy design (defining flags + // in CContactDatabase) they have to be redeclared here. Long term we hope + // to deprecate the CContactDatabase flags and rely on those declared in + // the converter implementation. + /** Import and export format flags. Contacts can be imported into + or exported from the contact database as vCards. + + The following options are available during import and export. + + @publishedAll + @released + */ + enum TOptions + { + EDefault = CContactDatabase::EDefault, + /** Handle Symbian's extended vCard format options. */ + EIncludeX = CContactDatabase::EIncludeX, + /** Support non-standard extensions requried by Symbian PC connectivity software + and Microsoft, amongst others. */ + ETTFormat = CContactDatabase::ETTFormat , + /** Don't export the contact ID (for exporting only). */ + EExcludeUid = CContactDatabase::EExcludeUid, + /** Decrease the contact's access count when importing and exporting. */ + EDecreaseAccessCount = CContactDatabase::EDecreaseAccessCount, + /** Only import the first contact in the read stream (for importing only). */ + EImportSingleContact = CContactDatabase::EImportSingleContact, + /** Increase the contact's access count when importing and exporting. */ + EIncreaseAccessCount = CContactDatabase::EIncreaseAccessCount, + /** Sets a contact item to the local time when importing. */ + ELocalTime = CContactDatabase::ELocalTime, + /** Allows to set a template to a contact item that does not exist. */ + ENullTemplateId = CContactDatabase::ENullTemplateId, + /** Allows to set white spaces as value for an empty field. */ + EConnectWhitespace=0x0100, // Used to correctly manage the TimeIS protocol for syncing. + /** + During import ignore the UID property value of the vCard. By ignoring + the UID the client is indicating that it knows that the contact does not + already exist in the database (i.e. the contact is being added rather + than being updated). Within the CContactVCardConverter::ImportL() + method no attempt to search for the UID in the database will be made. + For a series of addition of vCards with UIDs use of this option will + give a performance improvement since the search for the UID in the + Contacts database can become very costly as the number of contacts + grows. + */ + EIgnoreUid = CContactDatabase::EConverterReserved1, + /** + During import, if it is determined that the contact item being imported + already exists in the database then the contact item in the database will + be deleted before being replaced by the vCard being imported. This option + should be used when the client does not want a merge type behaviour for + existing contact items. This option will typically be used in a sync use case + where the vCard data that the client is provided with has already been through a process + of conflict resolution and so the existing contact item should be replaced not merged. + */ + EReplaceIfExists = CContactDatabase::EConverterReserved2, + }; + + /** + @internalComponent + @released + */ + enum TVersitPropertyType + { + EPropertyValueSingle, + EPropertyValueComposite, + EPropertyValueHandlingNotImplemented + }; +public: // from CContactConverter + static CContactVCardConverter* NewL(); + CArrayPtr* ImportL(CContactDatabase& aDb,RReadStream& aReadStream,TBool& aImportSuccessful,TInt aOptions,TBool aImportSingle); + void ExportL(CContactDatabase& aDb,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOptions,const Versit::TVersitCharSet aCharSet, TBool aExportPrivateFields, TInt aCommitNumber); +public: // Utility + static TBool ContainsExportableData(const TDesC& aText); + static TBool ContainsImportableData(const TDesC& aText, TVersitPropertyType aType, TCntVCardImportType aImportType); +private: + static TBool ContainsData(const TDesC& aText); + void doImportL(CVCardToContactsAppConverter& aConverter, CParserVCard& aVCard, CContactDatabase& aDb, TInt aOption, TBool aIncAccessCount, TBool aDecAccessCount, TBool& aImportSuccessful, CArrayPtr* aContactItems, TBool aIsInTransaction, TContactItemId aIdForUpdate); + TContactItemId IsVCardMergeNeededL(CVCardToContactsAppConverter& aConverter, CParserVCard& aVCard, CContactDatabase& aDb, TInt aOption); + void ModifyAccessCountL(CContactItem& aContact, TBool aIncAccessCount, TBool aDecAccessCount); + void HandleAgentsInVCardL(CVCardToContactsAppConverter& aConverter, CArrayPtr* aAgentProperties, CContactItem& aContact, CContactDatabase& aDb, TInt aOption, TBool aIncAccessCount, TBool aDecAccessCount, CArrayPtr* aContactItemArray, TBool aMerge); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntview.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,480 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTVIEW_H__ +#define __CNTVIEW_H__ + +#include + +/** The maximum length of the string used by contact sub view ranges to find the +item at the upper or lower limit of the range. + +In practice, only the first character in the string is used and this value +is ignored. */ +const TInt KMaxBoundaryMatchLength=8; + +class CContactGroupView: public CContactViewBase, public MContactViewObserver +/** Provides a view of a group of contact items. + +The view uses an underlying view. For items to appear in the group view, they +must exist in the underlying view. + +The TGroupType enumeration defines whether the view displays items that belong +to the group, items that do not belong to the group, or items that do not +belong to any group. + +The group view observes its underlying view so that it is kept up to date +if the contents of the underlying view change. + +The group can be identified by a contact item ID or by a label, e.g. "family", +or "colleagues". + +@see CContactGroup +@publishedAll +@released +*/ + { +friend class CGroupViewTester; +public: + /** Defines the types of contact group view. */ + enum TGroupType + { + /** The view contains contact items in the group. */ + EShowContactsInGroup, + /** The view contains contact items not in the group. */ + EShowContactsNotInGroup, + /** The view contains contact items not in any group. */ + EShowContactsNotInAnyGroup + }; +public: + IMPORT_C static CContactGroupView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver,const TContactItemId aGroupId,const TGroupType aGroupType); + IMPORT_C static CContactGroupView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver, const TDesC& aGroupName,const TGroupType aGroupType); + + // Factory constructor for version 2 behaviour + IMPORT_C static CContactGroupView* NewL(CContactViewBase& aView,const CContactDatabase& aDb, MContactViewObserver& aObserver,const TContactItemId aGroupId,const TGroupType aGroupType); + // Factory constructor for version 2 behaviour + IMPORT_C static CContactGroupView* NewL(CContactViewBase& aView,const CContactDatabase& aDb, MContactViewObserver& aObserver, const TDesC& aGroupName,const TGroupType aGroupType); + //All CContactViewBase derived classes in public headers, + //should mandatorily implement this reserved function. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); + ~CContactGroupView(); +public: // From CContactViewBase + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + const RContactViewSortOrder& SortOrderL() const; +protected: + IMPORT_C virtual void UpdateGroupViewL(); +private: // From MContactViewObserver. + void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); +private: + void ConstructL(MContactViewObserver& aObserver,TContactItemId aGroupId); + void UpdateForContactsInGroupL(); + void UpdateForContactsNotInThisGroupL(); + void UpdateForUnfiledContactsL(); + void UpdateForContactListL(const CContactIdArray* aArray); + TContactItemId GetGroupIdbyNameL(const TDesC& aGroupName); + TBool HandleRemoveEventL(TContactViewEvent& aEvent); + TBool HandleAddEventL(TContactViewEvent& aEvent); + TBool HandleAddEventForUnfiledContactsL(const TContactViewEvent& aEvent ); + static TInt CompareMappingsL(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); + TInt static CompareIndexesAllowingDuplicates(const TContactIdWithMapping& aFirst, const TContactIdWithMapping& aSecond); +private: + CContactGroupView(const CContactDatabase& aDb,CContactViewBase& aView,TGroupType aGroupType); + void UpdateMappingsL(); + void NotifyRemovedMembersL(const CContactIdArray* aArray); +private: + RArray iGroupContacts; + TContactItemId iGroupId; + CContactViewBase& iView; + TGroupType iGroupType; + TUint iClassVersion; //version class - used for TContactViewEvent dispatching + }; + + +class CContactFindView: public CContactViewBase, public MContactViewObserver +/** Provides a view of an existing CContactViewBase-derived object, populated using +search criteria. + +The find view only contains contact items from the underlying view that match +the search criteria. + +The find view observes its underlying view so that it is kept up to date if +the contents of the underlying view change. + +The search criteria (one or more words) are held in an MDesCArray object. +The fields involved in the search are those that have been used to sort the +underlying view. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactFindView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver,MDesCArray* aFindWords); + IMPORT_C static CContactFindView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver,MDesCArray* aFindWords, TSearchType aSearchType); + + // Factory constructor for version 2 behaviour + IMPORT_C static CContactFindView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,MDesCArray* aFindWords); + // Factory constructor for version 2 behaviour + IMPORT_C static CContactFindView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,MDesCArray* aFindWords, TSearchType aSearchType); + + ~CContactFindView(); +public: // From CContactViewBase + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + const RContactViewSortOrder& SortOrderL() const; +protected: + IMPORT_C virtual void UpdateFindViewL(); +public: + IMPORT_C void RefineFindViewL(MDesCArray* aFindWords); + //All CContactViewBase derived classes in public headers, + //should mandatorily implement this reserved function. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); +private: // From MContactViewObserver. + virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); +private: + void ConstructL(MContactViewObserver& aObserver,MDesCArray* aFindWords); + void DeleteFindContacts(); + void TightenFindViewCriteriaL(); + void HandleRemoveEventL(TContactViewEvent& aEvent); + void HandleAddEventL(TContactViewEvent& aEvent); + void CopyNewFindWordsL(MDesCArray* aFindWords); + void DestroyFindWordsArray(); + TInt InsertContact(const CViewContact* aNewContact); +private: + CContactFindView(const CContactDatabase& aDb,CContactViewBase& aView, TSearchType aSearchType); +private: + RPointerArray iFindContacts; + CPtrCArray* iFindWords; + CContactViewBase& iView; + const TSearchType iSearchType; + TUint iClassVersion; //version class - used for TContactViewEvent dispatching + }; + + +class CContactFilteredView : public CContactViewBase, public MContactViewObserver +/** Provides a filtered view over an existing CContactViewBase derived object. + +For example, it might provide a view containing only contacts that have an +email address. For efficiency reasons there are a limited set of filters available +(defined in CContactDatabase::TContactViewFilter). + +The filtered view observes its underlying view so that it is kept up to date +if the contents of the underlying view change. It will, in turn, notify its +observers. + +Filters only apply to non-hidden contact fields with content. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactFilteredView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,CContactViewBase& aView,TInt aFilter); + // Factory constructor for version 2 behaviour + IMPORT_C static CContactFilteredView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,TInt aFilter); + + //All CContactViewBase derived classes in public headers, + //should mandatorily implement this reserved function. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); + ~CContactFilteredView(); +public: // From CContactViewBase. + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + const RContactViewSortOrder& SortOrderL() const; + virtual void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts); + virtual void ContactsMatchingPrefixL(const MDesCArray& aFindWords, RPointerArray& aMatchedContacts); +private: // From MContactViewObserver. + virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); +private: + CContactFilteredView(const CContactDatabase& aDb,TInt aFilter,CContactViewBase& aView); + void ConstructL(MContactViewObserver& aObserver); + void CreateFilteredIdArray(); + void UpdateFilteredIdArrayL(TContactViewEvent& aEvent, TBool& aViewModified); + void HandleAddEventL(TContactViewEvent& aEvent, TBool& aViewModified); + void HandleRemoveEventL(TContactViewEvent& aEvent, TBool& aViewModified); + TInt BinaryInsertL(TContactIdWithMapping aId); + static TInt FilterCallBack(TAny* aSelf); + static TBool CompareMappings(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); + void FilterResultsArray(RPointerArray& aMatchedContacts); + TInt DoFilterIncrementL(); + void UpdateMappingsL(); +private: + const TInt iFilter; + CContactViewBase& iView; + RArray iFilteredIdArray; + TUint iClassVersion; //version class - used for TContactViewEvent dispatching + }; + + +class CContactViewRangeBase : public CBase +/** The abstract base class for all contact view range classes. + +Range classes are used by contact sub views to specify the upper and lower +range boundaries and for searching their underlying view. + +@see CContactSubView +@publishedAll +@released +*/ + { +public: + /** Defines the range criteria. */ + enum TCriteria + { + /** Less than. */ + ELessThan, + /** Less than or equal to. */ + ELessThanOrEqualTo, + /** Greater than. */ + EGreaterThan, + /** Greater than or equal to. */ + EGreaterThanOrEqualTo + }; +public: + ~CContactViewRangeBase(); + inline TInt LowIndex() const; + inline TInt HighIndex() const; + /** Sets the iLow and iHigh members. */ + virtual void SetL()=0; + IMPORT_C TBool IndicesValid() const; +protected: + CContactViewRangeBase(const CContactViewBase& aView); + void ConstructL(); + TInt FindIndexL(const TDesC& aMatch,TCriteria aCriteria) const; + TBool MatchesCriteriaL(TCriteria aCriteria,const TDesC& aMatch,TInt aIndex) const; + void ValidateIndices(); +protected: + /** The sub view's underlying view. */ + const CContactViewBase& iView; + /** The index into the sub view's underlying view of the item at the lower limit + of the range. */ + TInt iLow; + /** The index into the sub view's underlying view of the item at the upper limit + of the range. */ + TInt iHigh; + //ChrisD: contain by value not ptr + /** The collation method used to sort the strings. + + By default, this is the standard collation method for the current locale. */ + TCollationMethod* iCollateMethod; + }; + + +class CContactViewRange : public CContactViewRangeBase +/** A sub view range with both a lower and upper limit. + +This is used by sub views when lower and upper boundary criteria are specified. + +@see CContactSubView +@publishedAll +@released +*/ + { +public: + ~CContactViewRange(); + IMPORT_C static CContactViewRange* NewL(const CContactViewBase& aView,const TDesC& aLowMatch,TCriteria aLowCriteria,const TDesC& aHighMatch,TCriteria aHighCriteria); +private: // From CContactViewRangeBase. + void SetL(); +private: + CContactViewRange(const CContactViewBase& aView,const TDesC& aLowMatch,TCriteria aLowCriteria,const TDesC& aHighMatch,TCriteria aHighCriteria); + void ConstructL(); +private: + TBuf iLowMatch; + TCriteria iLowCriteria; + TBuf iHighMatch; + TCriteria iHighCriteria; + }; + + +class CContactViewLowRange : public CContactViewRangeBase +/** A sub view range with an upper limit only. + +This is used by sub views when the range criteria are CContactViewRangeBase::ELessThan +or CContactViewRangeBase::ELessThanOrEqualTo. + +@see CContactSubView +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactViewLowRange* NewL(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); +private: // From CContactViewRangeBase. + void SetL(); +private: + CContactViewLowRange(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); +//ChrisD: why private d'tor + ~CContactViewLowRange(); +private: + TBuf iMatch; + TCriteria iCriteria; + }; + + +class CContactViewHighRange : public CContactViewRangeBase +/** A sub view range with a lower limit only. + +This is used by sub views when the range criteria are CContactViewRangeBase::EGreaterThan +or CContactViewRangeBase::EGreaterThanOrEqualTo. + +@see CContactSubView +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactViewHighRange* NewL(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); +private: // From CContactViewRangeBase. + void SetL(); +private: + CContactViewHighRange(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); +//ChrisD: why private d'tor + ~CContactViewHighRange(); +private: + TBuf iMatch; + TCriteria iCriteria; + }; + + +class CContactSubView : public CContactViewBase, public MContactViewObserver +/** Provides a view of a range of contact items from a potentially larger underlying +view (another CContactViewBase-derived object). + +All contact items between a lower and upper boundary in the underlying view +are included in the sub view. For example, the sub view might contain all +items whose name begins with a character between 'd' and 'f'. + +The sub view observes its underlying view so that as the underlying view changes, +the sub view is kept up to date. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactSubView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,CContactViewBase& aView,const TDesC& aBoundary);//>= > is infinity <= < =0; + IMPORT_C static CContactSubView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,CContactViewBase& aView,const TDesC& aLowBoundary,const TDesC& aHighBoundary); + + // Factory constructor for version 2 behaviour + IMPORT_C static CContactSubView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,const TDesC& aBoundary);//>= > is infinity <= < =0; + // Factory constructor for version 2 behaviour + IMPORT_C static CContactSubView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,const TDesC& aLowBoundary,const TDesC& aHighBoundary); + + //All CContactViewBase derived classes in public headers, + //should mandatorily implement this reserved function. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); +public: // From CContactViewBase. + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + const RContactViewSortOrder& SortOrderL() const; +private: // From MContactViewObserver. + virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); +private: +//ChrisD: why private d'tor + ~CContactSubView(); + CContactSubView(const CContactDatabase& aDb,CContactViewBase& aView); + CContactSubView(const CContactDatabase& aDb,const CContactSubView& aView); + void CommonConstructL(MContactViewObserver& aObserver); + void ConstructL(MContactViewObserver& aObserver,const TDesC& aBoundary); + void ConstructL(MContactViewObserver& aObserver,const CContactSubView& aView); + void ConstructL(MContactViewObserver& aObserver,const CContactSubView& aView,const TDesC& aBoundary); + void ConstructL(MContactViewObserver& aObserver,const TDesC& aLowBoundary,const TDesC& aHighBoundary); + CContactViewRangeBase::TCriteria DecodeBoundary(TDes& aBoundary) const; + TInt MapToUnderlyingViewIndex(TInt aSubViewIndex) const; + TInt MapToSubViewIndex(TInt aUnderlyingViewIndex) const; +private: + CContactViewBase& iView; + CContactViewRangeBase* iRange; + TUint iClassVersion; //version class - used for TContactViewEvent dispatching + }; + + +class CContactConcatenatedView : public CContactViewBase, public MContactViewObserver +/** Concatenates multiple contact views into a single contiguous view. + +The component views are ordered according to their order in the array passed +into the NewL(). +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactConcatenatedView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,RPointerArray& aComponentViews); + //All CContactViewBase derived classes in public headers, + //should mandatorily implement this reserved function. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); +public: // From CContactViewBase. + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + const RContactViewSortOrder& SortOrderL() const; +private: // From MContactViewObserver. + virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); +private: + struct TComponentView + { + TComponentView(CContactViewBase& aView,TState aState); + CContactViewBase& iView; + TState iState; + }; +private: + ~CContactConcatenatedView(); + CContactConcatenatedView(const CContactDatabase& aDb); + void ConstructL(MContactViewObserver& aObserver,RPointerArray& aComponentViews); + void CopyComponentViewsL(RPointerArray& aComponentViews); + void OpenComponentViewsL(); + void CloseComponentViews(); + TBool ComponentViewsReady(); + void SetComponentViewReady(const CContactViewBase& aView); + TInt OffsetL(const CContactViewBase& aView); + static TBool ComponentViewsEqual(const TComponentView& aFirst,const TComponentView& aSecond); + TInt FindComponentView(const CContactViewBase& aView); +private: + RArray iComponentView; + }; + + +inline TInt CContactViewRangeBase::LowIndex() const +/** Gets the index into the sub view's underlying view of the item at the bottom +of the range. + +@return The index of the item at the bottom of the range. */ + { return iLow; } + +inline TInt CContactViewRangeBase::HighIndex() const +/** Gets the index into the sub view's underlying view of the item at the top of +the range. + +@return The index of the item at the top of the range. */ + { return iHigh; } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cntviewbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cntviewbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,908 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNTVIEWBASE_H__ +#define __CNTVIEWBASE_H__ + +// System includes +#include +#include + +#include + +// Classes referenced +class CViewContactExtension; +class CContactViewBase; +class CContactRemoteViewNotifier; +class CIdleContactSorter; +class CContactViewFindConfigInterface; +class CViewContactSortPlugin; +class TSortPluginViewParams; + +/** View preferences for sorted contact views. + +This is used to specify the types of contact item that should be sorted and +included in the view and the behaviour for items that cannot be sorted because +they do not have content in any of the fields specified in the view's sort +order. + +The default behaviour is to include contact cards only and to sort contact +cards without content in any of the sort order fields using the first available +field containing any text. + +The view preferences for all concrete contact view classes can be retrieved +using their implementation of CContactViewBase::ContactViewPreferences(). +The view preferences are set during construction of a CContactLocalView. + +@publishedAll +@released +*/ +enum TContactViewPreferences + { + /** Only contact cards (of type KUidContactCard or KUidContactOwnCard) are included + in the view. This is the default. */ + EContactsOnly =0x00000000, + /** Only contact groups (of type KUidContactGroup) are included in the view. */ + EGroupsOnly =0x00000001, + /** Contact groups and contact cards (of type KUidContactGroup, KUidContactCard + or KUidContactOwnCard) are included in the view. */ + EContactAndGroups =0x00000002, + /** Excludes contact items from the view which don't have content in any of the + fields specified in the sort order. */ + EIgnoreUnSorted =0x00000004, + /** Includes contacts in the view which don't have content in any of the fields + specified in the sort order. These contacts are placed in an unsorted contact + list which is located before the sorted list. */ + EUnSortedAtBeginning =0x00000008, + /** Includes contacts in the view which don't have content in any of the fields + specified in the sort order. These contacts are placed in an unsorted contact + list which is located after the sorted list. */ + EUnSortedAtEnd =0x00000010, + /** Fields containing a single white space only are treated as empty, and therefore + unsortable. */ + ESingleWhiteSpaceIsEmptyField =0x00000020, + /** Only ICC entries (of type KUidContactICCEntry) are included in the view. */ + EICCEntriesOnly =0x00000040, + /** Only contact cards and ICC entries (of type KUidContactCard, KUidContactOwnCard + or KUidContactICCEntry) are included in the view. */ + EICCEntriesAndContacts =0x00000080 + }; + + +class TContactViewEvent +/** Identifies a contact view event. + +Sent by contact views when notifying their observers of an event. + +@see MContactViewObserver::HandleContactViewEvent() +@publishedAll +@released +*/ + { +public: + /** Identifies the event's type. */ + enum TEventType + { + /** The observed view's state has changed from EReady to either ENotReady or EInitializing, + so is not available for use. */ + EUnavailable, + /** The observed view's state has changed from ENotReady or EInitializing to EReady + so is available for use. */ + EReady, + /** The observed view's sort order has changed, so observer views need to update + themselves. */ + ESortOrderChanged, + /** An error occurred when sorting the observed view or when appending an observer + to its observer array. + + The error code is provided in iInt. */ + ESortError, + /** An error occurred in the contacts server. + + The error code is provided in iInt. */ + EServerError, + /** An error occurred when setting the range for a CContactSubView. + + The error code is provided in iInt. */ + EIndexingError, + /** An item has been added to the observed view. + + The ID of the added item is provided in iContactId and the index into the + observed view of the added item is provided in iInt. + Exception from this are the first version of CContactFindView, CContactSubView and + CContactGroupView classes. + For these classes, iInt has KErrNone value */ + + EItemAdded, + /** An item has been removed from the observed view. + + The ID of the removed item is provided in iContactId and the index into the + observed view of the item is provided in iInt. + Exception from this are the first version of CContactFindView and CContactSubView classes. + For these classes, iInt has KErrNone value */ + + EItemRemoved, + /** A change has occurred in a contact group, for instance a contact item has been + moved into or out of the group. + + The ID of the group affected is provided in iContactId. */ + EGroupChanged + }; +public: + inline TContactViewEvent(); + inline TContactViewEvent(TEventType aEventType,TInt aInt = KErrUnknown,TContactItemId aContactId = KErrUnknown); +public: + /** The type of event. */ + TEventType iEventType; + /** The error code (where relevant) or the index of the contact item added to/removed + from the underlying view. */ + TInt iInt; + /** The ID of the contact item that has been added or removed or the group ID, where + relevant. */ + TContactItemId iContactId;//ContactId that has been added / removed if relevant. + }; + + +struct TContactIdWithMapping +/** A struct used internally by filtered and group views to pair a contact item +ID and its index into the underlying view. +@publishedAll +@released +*/ + { + /** The contact item's ID. */ + TContactItemId iId; + /** The index of the item into the view's underlying view. */ + TInt iMapping; + }; + + +class MContactViewObserver +/** The interface for a contact view observer. + +Objects that need to observe a contact view should implement this interface. +The view observer should be passed to the observed view's OpenL() or Open() +function. This adds the observer to the view's observer array: a view can +have more than one observer. The observers receive notifications when the +observed view becomes ready for use and when changes occur in it. + +Many contact view classes implement this interface to observe an underlying +view. They in turn send notification to any objects observing them. + +@see CContactViewBase::NotifyObservers() +@see CContactViewBase::NotifyObserverAsync() +@publishedAll +@released +*/ + { +public: + /** Handles an event in an observed contact view. + + @param aView The contact view causing the notification. + @param aEvent The event. */ + virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent)=0; + }; + + +class RContactViewSortOrder +/** Specifies the sort order for a contact view. + +It is implemented as an array of TFieldType UIDs, which define the fields +whose contents are used to sort on, and their order. + +The sort order for all concrete contact view classes can be retrieved using +their implementation of CContactViewBase::SortOrderL(). The sort order is +set during construction of local and remote views. +@publishedAll +@released +*/ + { +public: + IMPORT_C RContactViewSortOrder(); + IMPORT_C void Close(); + IMPORT_C void CopyL(const RContactViewSortOrder& aSortOrder); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C TInt ExternalizedSize() const; + IMPORT_C TBool operator==(const RContactViewSortOrder& aSortOrder) const; + inline void AppendL(TFieldType aField); + inline TFieldType operator[](TInt aIndex) const; + inline TInt Count() const; +private: + RArray iFields; + TInt iSpare; + TInt32 iSpare2; + TInt32 iSpare3; + }; + + +/** +Wrapper around RArray, to container TTextFieldMinimal buffers. + +Features: minimum size 1, easy resize of array, persistent last counted total. + +@internalComponent +@released +*/ +class RFieldBufferArray : public RArray + { +public: + explicit RFieldBufferArray(); + + void ResizeL(TInt aNewSize); + void ZeroAll(); + TInt NewTotal(); + TInt LastTotal() const; + +private: + TInt iTotalLength; + }; + + + +class CViewContact : public CBase +/** The representation of a contact item used in contact views. + +It stores the contact item ID and other information. This includes a buffer +holding the contents of all the item's fields, an array of indexes into the +buffer indicating the start position of each field and a hint bit field (a +combination of CContactDatabase::TContactViewFilter values) which is used +in filtered views. + +The fields are defined by the view's sort order (RContactViewSortOrder). +@publishedAll +@released +*/ + { +public: + /** Defines whether the contact view item is a contact group. */ + enum TViewContactType + { + /** The contact view item is not a contact group. */ + EContactItem, + /** The contact view item is a contact group (CContactGroup). */ + EGroup + }; + IMPORT_C CViewContact(TContactItemId aId); + IMPORT_C static CViewContact* NewL(const CViewContact& aContact); + IMPORT_C static CViewContact* NewLC(TContactItemId aId); + IMPORT_C static CViewContact* NewL(TContactItemId aId, TInt aLength); + static CViewContact* NewLC(RReadStream& aStream); + + IMPORT_C ~CViewContact(); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C TInt ExternalizedSize() const; + IMPORT_C TInt FieldCount() const; + IMPORT_C TPtrC Field(TInt aPosition) const; + IMPORT_C TBool ContactMatchesFilter(TInt aFilter) const; + IMPORT_C void AddFieldL(const TDesC& aField); + IMPORT_C TBool IsSortable() const; + IMPORT_C void SetFirstFieldForBlankContactL(const TDesC& aFirstField); + IMPORT_C void Reset(); + IMPORT_C TInt ContactHint() const; + IMPORT_C void SetContactHint(TInt aHint); + IMPORT_C TUid ContactTypeUid() const; + IMPORT_C void SetContactTypeUid(TUid aUid); + + inline TContactItemId Id() const; + inline TViewContactType ContactType() const; +public: + inline void SetId(TContactItemId aId); + inline void SetContactType(CViewContact::TViewContactType aContactType); + static TBool HintFieldMatchesFilter(TInt aHintField, TInt aFilter); + TPtrC FindFirstPopulatedField(TInt aOffset, TInt& aFoundPosition) const; + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + IMPORT_C void ChangeToLightweightObject(); + TBool IsLightweightObject() const; + void CopyL(const CViewContact& aContact); +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + +private: + void ConstructL(TInt aLength = 0); + void ConstructL(const CViewContact& aContact); + friend class CContactViewBase; +private: + TContactItemId iId; + TViewContactType iContactType; + CViewContactExtension* iExtension; + RArray iTextIndexes; + }; + + +/* + * A view can be named or un-named. An un-named view has a fixed sort order - the + * only way to change this is by closing the object and creating a new one with a + * different order. Named views may have their sort order changed. When this is + * done, first all observers will be informed that the view is 'unavailable'. This + * notification will be followed by 'sort order changed' and 'ready'. Only once + * the 'ready' notification has been received may the view be used again. + */ +class CContactViewBase : public CBase +/** The abstract base class for all contact view classes. + +All contact views operate asynchronously, so users of the view must observe +it, by implementing the MContactViewObserver interface. Immediately after +construction, views are not in a usable state (the underlying data may be +being sorted, for instance). Only after the user has received a TContactViewEvent::EReady +event may the view be used. + +View observers are also notified when changes occur, for instance when the +view's state changes (see TState), when an error occurs, or when an item is +added or removed. +@publishedAll +@released +*/ + { +public: + class CContactViewBaseExtension : public CBase + /** An extension class that holds member data added in v7.0s. + + It was created for binary compatibility purposes. + @internalComponent + @released */ + { + public: + static CContactViewBaseExtension* NewL(); + ~CContactViewBaseExtension(); + + private: + CContactViewBaseExtension(); + void ConstructL(); + + public: + /** A standard error code that is passed to view observers by NotifyObservers() + (unless its value is KErrNone). */ + TInt iError; + /** The UID of the view's find configuration plug-in. + + On construction, this is initialised to KNullUid. + + The plug-in is loaded when ContactsMatchingCriteriaL(), ContactsMatchingPrefixL() + or MatchesCriteriaL() is called. */ + TUid iFindPluginUid; + /** The UID of the view's sort plug-in. */ + TUid iSortPluginUid; + private: + CContactViewFindConfigInterface* iFindPluginImpl; + CViewContactSortPlugin* iSortPluginImpl; + TCollationMethod iCollationMethod; + friend class CContactViewBase; + }; + class TVirtualFunction1Params + /** Holds the two parameters passed to the helper method GetContactIdsL() from + the reserved function CContactViewBase_Reserved_1(). It has an inline constructor + to initialise the data members. + @publishedAll + @released */ + { + public: + /** Inline constructor to initialize member data + @param aIndexes Pointer to an array of indexes in a view + @param aIdArray Pointer to array of contact IDs */ + inline TVirtualFunction1Params(const CArrayFix* aIndexes, CContactIdArray* aIdArray) :iIndexes(aIndexes), iIdArray(aIdArray){}; + /** Pointer to an array of indexes in a view */ + const CArrayFix* iIndexes; + /** Pointer to array of contact IDs */ + CContactIdArray* iIdArray; + }; + class TVirtualFunction2Params + /** Holds the two parameters passed to the method GetContactsMatchingFilterL() + from the reserved function CContactViewBase_Reserved_1(). It has an inline + constructor to initialise the data members. + */ + { + public: + /** Inline constructor to initialize member data. + @param aFilter Filter for the contacts + @param aMatchingContacts Contacts matching a particular criterion */ + inline TVirtualFunction2Params(TInt aFilter, RArray& aMatchingContacts) : iFilter(aFilter), iMatchingContacts(aMatchingContacts){}; + public: + /** Filter for the contacts. */ + TInt iFilter; + /** List of contacts matching the criteria. */ + RArray& iMatchingContacts; + }; + class TVirtualFunction3Params + /** Holds the two parameters passed to the method InsertContactInView() from the + reserved function CContactViewBase_Reserved_1(). It has an inline + constructor to initialise the data members. + + @internalAll */ + { + public: + inline TVirtualFunction3Params(RPointerArray& aContacts, const CViewContact* aNewContact) :iContacts(aContacts), iNewContact(aNewContact){}; + RPointerArray& iContacts; + const CViewContact* iNewContact; + }; + /** Search type. + + This controls whether a search term can occur anywhere in a contact item field, + or just at the beginning of the field. */ + enum TSearchType + { + /** The search uses full wildcard matching so that the search string can occur anywhere + in the item's fields. */ + EFullSearch, + /** The search uses partial wildcard matching so that the search string can only + occur at the beginning of the item's fields. */ + EPrefixSearch + }; + /** Identifies the functions that have been added to CContactViewBase, or that + may be added in the future. This identifier is passed to the reserved virtual + function CContactViewBase_Reserved_1() and enables the addition of new virtual + methods without breaking binary compatibility. */ + enum TFunction + { + /** Identifies the function CContactViewBase::GetContactIdsL(). */ + ECContactViewBaseVirtualFunction1, + /** Identifies the function CContactViewBase::GetContactsMatchingFilterL(). */ + ECContactViewBaseVirtualFunction2, + // communication with Sort Plug-in + /** Identifies the function CContactViewBase::InsertContactInView(). */ + ECContactViewBaseVirtualFunction3, + }; +protected: + /** Defines the contact view states. */ + enum TState + { + /** The view is initialising. + + This is the view's state immediately after construction or after a significant change + (e.g CurrentDatabaseChanged or UnknownChanges), indicating that it can't be used yet. */ + EInitializing, + /** The view is ready to be used. */ + EReady, + /** The view is not ready to be used, for instance immediately after the sort order + has changed, or after an error has occurred. */ + ENotReady + }; +public: + IMPORT_C void OpenL(MContactViewObserver& aObserver); + IMPORT_C TInt Open(MContactViewObserver& aObserver); + IMPORT_C TBool Close(const MContactViewObserver& aObserver); + /** Returns the contact item ID at the specified index into the view. + + @capability ReadUserData + @param aIndex Index of the contact item ID into the view. + @return The contact item ID. */ + virtual TContactItemId AtL(TInt aIndex) const=0; + /** Returns the contact item at the specified index into the view. + + @capability ReadUserData + @param aIndex Index of the contact item into the view. + @return The contact item. */ + virtual const CViewContact& ContactAtL(TInt aIndex) const =0; + /** Returns the number of contact items in the view. + + @capability ReadUserData + @return The number of contact items in the view. */ + virtual TInt CountL() const=0; + /** Returns the index into the view of the specified contact item. + + @capability ReadUserData + @param aId The contact item ID to search for. + @return The index into the view of the contact item ID, or KErrNotFound if + no matching ID can be found. */ + virtual TInt FindL(TContactItemId aId) const=0; + /** Returns a descriptor containing the contents of all fields for an item in the view. + + The field separator is used to separate the contents of each field. It is + not appended to the last field. + + @capability ReadUserData + @param aIndex The index of the contact item into the view. + @param aSeparator The string to use to separate the fields. + @return Pointer to the contact item descriptor. */ + virtual HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const=0; + IMPORT_C virtual void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts); + /** Gets the view preferences. + + @capability ReadUserData + @return The view preferences. */ + virtual TContactViewPreferences ContactViewPreferences()=0; + /** Gets the view's sort order. + + @capability ReadUserData + @return The sort order. */ + virtual const RContactViewSortOrder& SortOrderL() const = 0; + IMPORT_C virtual void ContactsMatchingPrefixL(const MDesCArray& aFindWords, RPointerArray& aMatchedContacts); + //This is a reserved virtual exported function that is used for BC proofing against present + //and future additions of new exported virtual functions. Existing exported virtual methods + //that broke BC are now non-virtual exported helper functions called from this method. + //All derived classes of CContactViewBase that are public must mandatorily + //implement this reserved exported virtual method. + IMPORT_C virtual TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); + //New exported method to set the ECOM plug-in to be used + IMPORT_C void SetViewFindConfigPlugin(TUid aUid); + IMPORT_C TUid GetViewFindConfigPlugin(); + IMPORT_C virtual void GetContactIdsL(const CArrayFix& aIndexes, CContactIdArray& aContactIds); + IMPORT_C TInt Error() const; + IMPORT_C TUid GetViewSortPluginImplUid() const; + +protected: + IMPORT_C ~CContactViewBase(); + IMPORT_C void ConstructL(); + + IMPORT_C CContactViewBase(const CContactDatabase& aDb); + IMPORT_C void NotifyObservers(const TContactViewEvent& aEvent); + IMPORT_C TInt NotifyObserverAsync(MContactViewObserver& aObserver,const TContactViewEvent& aEvent); + IMPORT_C static TBool IdsMatch(const CViewContact& aFirst,const CViewContact& aSecond); + IMPORT_C HBufC* FieldsWithSeparatorLC(const RPointerArray& aContacts,TInt aIndex,const TDesC& aSeparator) const; + //Find helper functions + IMPORT_C virtual TBool MatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords); + IMPORT_C static TBool MatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords, TSearchType aSearchType); + IMPORT_C static TBool MatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords, TSearchType aSearchType,CContactViewBase::CContactViewBaseExtension* aExtension); + IMPORT_C static TBool IdsEqual(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); + IMPORT_C static TBool IndexesEqual(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); + IMPORT_C static TInt CompareFieldsL(const CViewContact& aFirst, const CViewContact& aSecond); + // View Sort Plugin changes + IMPORT_C static TInt CompareContactIds(const CViewContact& aFirst, const CViewContact& aSecond); + IMPORT_C static TBool ContactIsSortable(const CViewContact& aContact); + IMPORT_C TInt CompareContactsAndIdsL(const CViewContact& aFirst, const CViewContact& aSecond) const; +protected: // these are needed by CContactLocalView only + TInt InsertContactInView(RPointerArray& aContacts, const CViewContact* aNewContact, TBool aSortByIdOnly, TInt* aIndex) const; + TBool IsContactSortable(const CViewContact& aContact, TContactViewPreferences& aViewPreferences) const; + CViewContactSortPlugin* SortPluginImpl() const; + TUid FindSortPluginImplL (const TDesC8& aSortPluginName,TBool aWildCard=EFalse) const; + TUid FindDefaultViewSortPluginImplL () const; + void LoadViewSortPluginL (TUid aSortPluginUid,TContactViewPreferences& aViewPreferences); + +private: + static TInt AsyncNotifyCallBack(TAny* aSelf); + static CDesCArrayFlat* CreateFindWordArrayLC(const MDesCArray& aFindWords, TSearchType aSearchType); + static TBool ContactMatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords,CContactViewBase::CContactViewBaseExtension* aExtension); + void MatchContactsL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts, TSearchType aSearchType); + static TInt CompareFieldsWithCollationLevel(const CViewContact& aFirst, const CViewContact& aSecond, + TInt aCollationLevel, TCollationMethod* aCollateMethod); + TInt GetErrorValueFromExtensionClass(); + void GetContactsMatchingFilterL(TInt aFilter, RArray& aMatchingContacts); + TInt TextCompareFieldsL(const CViewContact& aFirst, const CViewContact& aSecond) const; + + +private: + struct TObserverAndEvent + { + TContactViewEvent iAsyncEvent; + MContactViewObserver* iObserverToNotify; + }; +protected: + // Reference to CContactDatabase class. + const CContactDatabase& iDb; + // Different Contacts view states. + TState iState; + // The pointer to the ContactViewBase BC extension class. + CContactViewBaseExtension* iExtension; +private: + RPointerArray iObserverArray; + CIdle* iAsyncNotifier; + RArray iOutstandingNotifications; + }; + +inline TInt CContactViewBase::GetErrorValueFromExtensionClass() + { + return iExtension->iError; + } + +class MLplPersistenceLayerFactory; + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + +class CViewContactManager; + +#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ + +class CViewIterator; + +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + +class CContactLocalView : public CContactViewBase, public MContactDbObserver +/** An instantiable base class for contact views. + +The data associated with a local view is allocated within the client's memory +space; CContactRemoteView should be used in preference if the view is likely +to be shared between multiple clients. It is kept up to date by receiving +change events from the underlying CContactDatabase object which it observes. +The view preferences and sort order are specified on construction. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactLocalView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); + IMPORT_C static CContactLocalView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, + const TDesC8& aSortPluginName); + IMPORT_C static CContactLocalView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, + MLplPersistenceLayerFactory* aFactory,const TDesC8& aSortPluginName); + + IMPORT_C const RContactViewSortOrder& SortOrder() const; +public: // From CContactViewBase. + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + const RContactViewSortOrder& SortOrderL() const; + void NotifySortError(TInt aError); + //All derived classes of CContactViewBase that are public should mandatorily + //implement this reserved exported virtual method. + IMPORT_C TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); +protected: + IMPORT_C ~CContactLocalView(); + IMPORT_C CContactLocalView(const CContactDatabase& aDb,TContactViewPreferences aContactTypes); + CContactLocalView(const CContactDatabase& aDb,TContactViewPreferences aContactTypes,MLplPersistenceLayerFactory* aIterFactory); + IMPORT_C void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder); + void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder, const TBool aUseNamedPlugin, const TDesC8& aSortPluginName); + IMPORT_C virtual void SortL(const RContactViewSortOrder& aSortOrder); + IMPORT_C virtual TInt InsertL(TContactItemId aId); + IMPORT_C virtual TInt RemoveL(TContactItemId aId); +protected: + void SetState(TState aState); +private: // From MContactDbObserver. + virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent); + +private: + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + void SortComplete(TInt aSortErr); + void SetSortOrderL(const RContactViewSortOrder& aSortOrder); + void SortL(); + void SafeResort(); + friend class CViewContactManager; +#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ + TInt SortCallBack(); + TInt DoReadIncrementL(); + void ResetSortL(); + void InitialiseSortL(const RContactViewSortOrder& aSortOrder, TBool aChangingSortOrder); + void SortL(); + void SafeResort(); + void ContactsArraySortL(); + TBool ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude); +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + +private: // Metheds for event handling + void HandleOutstandingEvents(); + void HandleOutstandingEventL(); + friend class CIdleContactSorter; +protected: + /** The sort order. + This is set during construction or when SortL() is called. */ + RContactViewSortOrder iSortOrder ; +private: + IMPORT_C virtual void CContactLocalView_Reserved_1(); + IMPORT_C virtual void CContactLocalView_Reserved_2(); + +private: + MLplPersistenceLayerFactory* iFactory; + RPointerArray iContacts; + RPointerArray iUnSortedContacts; + RArray iOutstandingEvents; + CIdleContactSorter* iAsyncSorter; + +#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ + CViewContactManager* iViewCntMgr; +#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ + CViewIterator* iViewIterator; +#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ + + CContactTextDef* iTextDef; + TContactViewPreferences iViewPreferences; + TBool iSpare0; + TInt iSpare; + }; + +class RContactRemoteView : public RSubSessionBase +/** This class is used internally by remote contact views as the handle to the +server side view object. + +@see CContactRemoteViewBase +@internalComponent +@released +*/ + { +public: + void OpenL(const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName); + void OpenL(const CContactDatabase& aDb,const TDesC& aName,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName); + void Close(); +public: // From CContactViewBase + TContactItemId AtL(TInt aIndex) const; + CViewContact* ContactAtL(TInt aIndex); + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const RContactViewSortOrder& SortOrderL(); +public: + void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts, TBool aPrefixSearch,TUid aUid); + void ChangeSortOrderL(const RContactViewSortOrder& aSortOrder); + void GetSortOrderL(RContactViewSortOrder& aSortOrder); + TContactViewPreferences ContactViewPreferencesL(); + + void RequestViewEvent(TPckgBuf& aEvent,TRequestStatus& aStatus); + TInt CancelRequestViewEvent(); + void GetContactIdsL(const CArrayFix& aIndexes, CContactIdArray& aContactIds); + void GetContactsMatchingFilterL(TInt aFilter, RArray& aMatchingContacts); + TUid GetViewSortPluginImplUidL() const; +private: + HBufC8* PackageSortOrderLC(const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes) const; + HBufC8* PackageSortOrderAndPluginDetailsLC(const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName) const; +private: + CViewContact* iContact; + RContactViewSortOrder iSortOrder ; + }; + + +NONSHARABLE_CLASS(CContactRemoteViewBase) : public CContactViewBase +/** Base class for all remote contact view classes. + +It implements all the pure virtual functions in CContactViewBase and additionally +it handles remote view notifications. The data associated with remote views +is allocated within the memory space of the contacts server. This means that +multiple clients can share the same server side view object, thereby reducing +the overhead associated with initial sorting of the view data and keeping +it in sync with the underlying data. Remote views should therefore be used +when the same view is likely to be needed by more than one client. +@internalComponent +@released +*/ + { +public: // From CContactViewBase. + TContactItemId AtL(TInt aIndex) const; + TInt CountL() const; + TInt FindL(TContactItemId aId) const; + HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; + const CViewContact& ContactAtL(TInt aIndex) const; + TContactViewPreferences ContactViewPreferences(); + void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts); + void ContactsMatchingPrefixL(const MDesCArray& aFindWords, RPointerArray& aMatchedContacts); + const RContactViewSortOrder& SortOrderL() const; + //All derived classes of CContactViewBase that are public should mandatorily + //implement this reserved exported virtual method. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); + //This function was virtual in a previous release, if you still need to use it + //in a virtual way then you can call it via the Reserved function. + //The functionality of this function ,however,remains the same. + void GetContactIdsL(const CArrayFix& aIndexes, CContactIdArray& aContactIds); + void GetContactsMatchingFilterL(TInt aFilter, RArray& aMatchingContacts); +protected: + ~CContactRemoteViewBase(); + CContactRemoteViewBase(const CContactDatabase& aDb); + void ConstructL(MContactViewObserver& aObserver); +private: + static TInt NotifierCallBack(TAny* aSelf); + void HandleContactViewEvent(const TContactViewEvent& aEvent); +protected: + /** A handle to the server side view. */ + RContactRemoteView iView; +private: + CContactRemoteViewNotifier* iNotifier; + /** Cached copy of the count of the local view in the contacts server. + If this is KCachedItemCountInvalid then next time CountL is called + the current count is retrieved from the contacts server. */ + mutable TInt iCount; + }; + + +class CContactRemoteView : public CContactRemoteViewBase +/** An instantiable remote contact view class. + +Remote views are associated with a CContactLocalView object held in the contacts +server. They provide an efficient means for multiple clients to share the +same underlying view. + +The view preferences and sort order are specified on construction. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactRemoteView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); + IMPORT_C static CContactRemoteView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, + const TDesC8& aSortPluginName); + IMPORT_C void GetSortOrderL(RContactViewSortOrder& aSortOrder); + //All derived classes of CContactViewBase that are public should mandatorily + //implement this reserved exported virtual method. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); +protected: + ~CContactRemoteView(); + CContactRemoteView(const CContactDatabase& aDb); +private: + void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); + void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypesconst, const TDesC8& aSortPluginName); + }; + + +class CContactNamedRemoteView : public CContactRemoteView +/** A named remote contact view. + +This class enables multiple clients to share a named server side view. It +also provides a function to change the sort order. If the sort order is changed, +a notification is sent to all users of the named view. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CContactNamedRemoteView* NewL(MContactViewObserver& aObserver,const TDesC& aName,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); + IMPORT_C static CContactNamedRemoteView* NewL(MContactViewObserver& aObserver,const TDesC& aName,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, + const TDesC8& aSortPluginName); + IMPORT_C void ChangeSortOrderL(const RContactViewSortOrder& aSortOrder); + //All derived classes of CContactViewBase that are public should mandatorily + //implement this reserved exported virtual method. + TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); +private: + ~CContactNamedRemoteView(); + CContactNamedRemoteView(const CContactDatabase& aDb); + void ConstructL(MContactViewObserver& aObserver,const TDesC& aName,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); + void ConstructL(MContactViewObserver& aObserver,const TDesC& aName,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, const TDesC8& aSortPluginName); + }; + +inline TContactViewEvent::TContactViewEvent() +/** Empty default constructor. */ + {}; + +inline TContactViewEvent::TContactViewEvent(TEventType aEventType,TInt aInt,TContactItemId aContactId) : iEventType(aEventType),iInt(aInt),iContactId(aContactId) +/** Constructor with an event type and an optional error code and contact item ID. + +@param aEventType The event type. +@param aInt Optional standard error code. +@param aContactId Optional contact item ID. */ + {}; + +inline void RContactViewSortOrder::AppendL(TFieldType aField) +/** Appends a field type to the sort order object. + +@param aField The field type to append. */ + { User::LeaveIfError(iFields.Append(aField)); } + +inline TFieldType RContactViewSortOrder::operator[](TInt aIndex) const +/** Gets an indexed field type. + +@param aIndex Index of the required field type. A panic occurs if this is +invalid. +@return The field type located at the indexed position in the array. */ + { return iFields[aIndex]; } + +inline TInt RContactViewSortOrder::Count() const +/** Gets the number of field types in the sort order array. + +@return The number of field types in the array. */ + { return iFields.Count(); } + +inline TContactItemId CViewContact::Id() const +/** Gets the view item's ID. + +@return The view item's ID. */ + {return iId;} + +inline CViewContact::TViewContactType CViewContact::ContactType() const +/** Gets the view item's type. + +@return The view item's type. */ + {return iContactType;} + +inline void CViewContact::SetId(TContactItemId aId) +/** Sets the view item's ID. + +@param aId The contact item ID. */ + {iId=aId;} + +inline void CViewContact::SetContactType(CViewContact::TViewContactType aContactType) +/** Sets the view item's type. + +@param aContactType The view item's type. */ + {iContactType=aContactType;} +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/cobexsendoperation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/cobexsendoperation.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#ifndef __COBEXSENDOPERATION_H__ +#define __COBEXSENDOPERATION_H__ + + +#include + + +class CObexSendOperation : public CMsvSendOperation +/** +@internalComponent +*/ + { +public: + IMPORT_C CObexSendOperation(CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); + // from CMsvSendOperation + IMPORT_C virtual const TDesC8& TranslateProgress(const TDesC8& aProgress); + }; + + +#endif // __COBEXSENDOPERATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/csmsaccount.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/csmsaccount.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CSMSACCOUNT_H__ +#define __CSMSACCOUNT_H__ + + +#include +#include + + +class CSmsSettings; +class CMsvOffPeakTimes; +class CMsvScheduleSettings; +class CMsvSendErrorActions; +class CMsvSysAgentActions; +class CRepository; + + +/** +Stores SMS service and Schedule Send settings to Central Repository. + +@publishedAll +@released +*/ +class CSmsAccount : public CBase, public MMsvSessionObserver + { +public: + + IMPORT_C static CSmsAccount* NewL(); + IMPORT_C static CSmsAccount* NewLC(); + IMPORT_C virtual ~CSmsAccount(); + + IMPORT_C void InitialiseDefaultSettingsL(CSmsSettings& aSmsSettings); + IMPORT_C void InitialiseDefaultSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions); + IMPORT_C void LoadSettingsL(CSmsSettings& aSmsSettings); + IMPORT_C void LoadSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions); + IMPORT_C void SaveSettingsL(const CSmsSettings& aSmsSettings) const; + IMPORT_C void SaveSettingsL(const CMsvScheduleSettings& aScheduleSettings, const CMsvOffPeakTimes& aOffPeakTimes, const CMsvSendErrorActions& aErrorActions, const CMsvSysAgentActions& aSysAgentActions) const; + +private: + CSmsAccount(); + void ConstructL(); + void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* ); + CMsvSession& SessionL(); + + TMsvId CreateSmsServiceL(); + void ResetSettings(); + +private: + enum TSmsSettingsCenRepId + { + // Service Settings + ESmsServiceId = 0x00000000, + ESmsSettingsVersionId = 0x00000001, + ESmsSettingsMesssageVersionId = 0x00000002, + ESmsValidityPeriodId = 0x00000003, + ESmsValidityPeriodFormatId = 0x00000004, + ESmsAlphabetId = 0x00000005, + ESmsMsgFlagsId = 0x00000006, + ESmsMessageConversionId = 0x00000007, + ESmsFlagsId = 0x00000008, + ESmsStatusReportHandlingId = 0x00000009, + ESmsSpecialMessageHandlingId = 0x0000000A, + ESmsCommDbActionId = 0x0000000B, + ESmsDeliveryId = 0x0000000C, + ESmsDefaultSCId = 0x0000000D, + ESmsSCAddressesCountId = 0x0000000E, + ESmsBearerActionId = 0x0000000F, + ESmsBearerId = 0x00000010, + ESmsClass2FolderId = 0x00000020, + ESmsDescriptionLengthId = 0x00000030, + ESmsAccountNameId = 0x00000040, + + ESmsSCAddressesPartialId = 0x00001000, + EMsgSMSTimeStampSettings = 0x000A0020 + }; + +private: + CMsvSession* iMsvSession; + CRepository* iRepository; + }; + +#endif // __CSMSACCOUNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/csmsemailfields.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/csmsemailfields.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,65 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CSMSEMAILFIELDS_H__ +#define __CSMSEMAILFIELDS_H__ + +#include +#include +#include + +class CMsvStore; + +/** +Encapsulates the address and subject fields for Email sent over SMS. + +@publishedAll +@released +*/ +class CSmsEmailFields : public CBase + { +public: + IMPORT_C static CSmsEmailFields* NewL(); + IMPORT_C static CSmsEmailFields* NewL(const CSmsEmailFields& aEmailFields); + IMPORT_C virtual ~CSmsEmailFields(); + + IMPORT_C void Reset(); + IMPORT_C TInt Length() const; + IMPORT_C TBool HasAddress() const; + IMPORT_C HBufC* ComposeLC() const; + TInt ParseL(const TDesC& aBuffer); + + IMPORT_C void AddAddressL(const TDesC& aAddress); + IMPORT_C void RemoveAddress(TInt aIndex); + IMPORT_C const MDesCArray& Addresses() const; + + IMPORT_C void SetSubjectL(const TDesC& aSubject); + IMPORT_C const TDesC& Subject() const; + + void RestoreL(CMsvStore& aStore); + void StoreL(CMsvStore& aStore) const; +private: + CSmsEmailFields(); + void ConstructL(); + void ConstructL(const CSmsEmailFields& aEmailFields); + + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; +private: + CDesCArray* iAddresses; + HBufC* iSubject; + }; + +#endif // __CSMSEMAILFIELDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/hlplch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/hlplch.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,98 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Help Launcher module +// +// + +#ifndef __HLPLCH_H__ +#define __HLPLCH_H__ + +#if !defined(__APGTASK_H__) +#include +#endif + +#if !defined(__EIKDLL_H__) +#include +#endif + +#if !defined(__WSERV_H__) +#include +#endif + +#if !defined(__COEHELP_H__) +#include +#endif + +/** Help application UID. +@internalComponent +@released +*/ +const TUid KHlpAppUid={ 0x10005234 }; + +/** UID of window message to send to application. +@internalComponent +@released +*/ +const TUid KHlpAppWsMsg={ 0x100055c7 }; + +/** Maximum length of command line to launch application. +@internalComponent +@released +*/ +const TInt KMaxCmdLineLength = 512; + +// resource file name +_LIT(KHelpLauncherResource, "z:\\resource\\apps\\lch.rsc"); + +class CHlpCmdLine : public CBase +/** +@internalComponent +@released +*/ + { +public: + static CHlpCmdLine* NewL(CArrayFix* aContextList); + static CHlpCmdLine* NewLC(CArrayFix* aContextList); + ~CHlpCmdLine(); +public: + TPtr8 CmdLineL(); +private: + void BuildCmdLineL(); + void AddContextL(TCoeHelpContext& aContext); +private: + void ConstructL(); + CHlpCmdLine(CArrayFix* aContextList); +private: + CArrayFix* iContextList; + CBufFlat* iCmdLine; + }; + +class HlpLauncher +/** Launches the help application. + +It assumes that such an application is at z:\\Sys\\Bin\\CsHelp.exe + +@publishedAll +@released +*/ + { +public: + IMPORT_C static void LaunchHelpApplicationL(RWsSession& aWsSession, CArrayFix* aContextList); + IMPORT_C static void LaunchHelpApplicationL(RWsSession& aWsSession, TUid aUid); + IMPORT_C static void LaunchHelpApplicationL(RWsSession& aWsSession); +private: + static void DoLaunchHelpApplicationL(RWsSession& aWsSession, const TDesC8& aCmdLine); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/hlpmodel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/hlpmodel.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,557 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __HLPMODEL_H +#define __HLPMODEL_H + +// System includes +#include +#include // For MDesCArray +#include // For MRichTextStoreResolver +#include // For MPictureFactory +#include + +// Help model includes +#include "hlpconstants.h" + +// Classes referenced +class CRichText; +class CHlpDatabase; +class CHlpFileEntry; +class CHlpSQLSearch; +class TCoeHelpContext; +class CParaFormatLayer; +class CCharFormatLayer; +class CHlpPicture; + +// Typedefs +/** +@internalComponent +@released +*/ +typedef CArrayPtrFlat CHlpDatabases; + +/** +@internalComponent +@released +*/ +typedef CArrayPtrFlat CHlpFileList; + + +class MHlpModelObserver +/** Client callback inteface to receive events from the help model. +@publishedAll +@released +*/ + { +public: + /** Receives a help model event. + + @param aEvent Help model event. Events are listed in the enums that begin + ECategoryListAvailable, and ENoRecordsFound. */ + virtual void HandleModelEventL(TInt aEvent) = 0; + }; + +// +// Internal API to handle events reported by the search engine +// +class MHlpDbObserver +/** +@internalComponent +@released +*/ + { +public: // TInt aEvent should be a named enum + virtual void HandleDbEventL(TInt aEvent) = 0; + }; + +// +// Search types (these should be named, but SC cannot be broken until v7.0 +// +/** Defines the search types for use with CHlpModel::SearchL(). */ +enum + { + /** Gets a list of index entries for all help files. + + Success is indicated by an EIndexListAvailable event; failure by EIndexListNoneFound. + The list can be retrieved using CHlpModel::LoadListL(). */ + EIndexList, + /** Gets a list of categories for all help files. + + Success is indicated by an ECategoryListAvailable event; failure by ECategoryListNoneFound. + The list can be retrieved using CHlpModel::CategoryListL(). */ + ECategoryList, + /** Gets a list of topics for a specified category. + + Success is indicated by an ETopicListAvailable event; failure by ETopicListNoneFound. + The list can be retrieved using CHlpModel::LoadListL(). */ + ETopicListForCategory, + /** Gets a list of topics for a specified category UID. + + Success is indicated by an ETopicListAvailable event; failure by ETopicListNoneFound. + The list can be retrieved using CHlpModel::LoadListL(). */ + ETopicListForCategoryUID, + /** Searches for a topic with the specified help context. + + A successful search generates an ETopicAvailable event. The topic can then be retrieved + using CHlpModel::LoadTopicL(). An unsuccessful search generates an ETopicNotFound event. */ + EContextSearch, + /** Searches for index entries for the specified help item. + + A successful search generates an ETopicListAvailable event. The list can then be retrieved + using CHlpModel::LoadListL(). An unsuccessful search generates an ETopicListNoneFound event. */ + EIndexSearch, + /** Searches the topic titles for the specified text. + + A successful search generates an ESearchListAvailable event. The list can then be + retrieved using CHlpModel::LoadListL(). An unsuccessful search generates an + ESearchListNoneFound event. */ + EQuickSearch, + /** Searches the full text of topics for the specified text. + + A successful search generates an ESearchListAvailable event. The list can then be + retrieved using CHlpModel::LoadListL(). An unsuccessful search generates an + ESearchListNoneFound event. */ + EFullTextSearch, + /** Searches for a topic with the specified ID. + + A successful search generates an ETopicAvailable event. The topic can then be + retrieved using CHlpModel::LoadTopicL(). An unsuccessful search generates an + ETopicNotFound event. */ + ETopicIdSearch + }; + +// +// Search progress responses (this should be scoped as members of MHlpModelObserver +// and should also be named, but SC cannot be broken until v7.0 +// +enum + { + ENoRecordsFound, + ESearchInProgress, + ESearchComplete + }; + +// +// Search progress responses (ditto for naming and scoping) +// +/** Help model search result events*/ +enum + { + /** The search returned a category list. + + The list can be retrieved using CHlpModel::CategoryListL(). */ + ECategoryListAvailable, + /** The search did not return a category list. */ + ECategoryListNoneFound, + /** The search returned a results list. + + The list can be retrieved using CHlpModel::LoadListL(). */ + ESearchListAvailable, + /** The search did not return a results list. */ + ESearchListNoneFound, + /** The search returned a topic list. + + The list can be retrieved using CHlpModel::LoadListL(). */ + ETopicListAvailable, // Category expansion + /** The search did not return a topic list. */ + ETopicListNoneFound, + /** The search returned an index item list. + + The list can be retrieved using CHlpModel::LoadListL(). */ + EIndexListAvailable, + /** The search did not return an index item list. */ + EIndexListNoneFound, + /** The search returned a topic list from an index phrase search. + + The list can be retrieved using CHlpModel::LoadListL(). */ + EIndexSearchListAvailable, + /** The search did not return a topic list from an index phrase search. */ + EIndexSearchListNoneFound, + /** The search returned a topic. + + The topic can be retrieved using CHlpModel::LoadTopicL(). */ + ETopicAvailable, + /** The search did not return a topic. */ + ETopicNotFound, + /** The search is in progress. */ + EModelSearchInProgress, + /** The search has been cancelled. */ + EHlpSearchCancelled + }; + +/** Defines help model zoom sizes. */ +enum THlpZoomState + { + /** Small zoom. */ + EHlpZoomStateSmall = 0, + /** Medium zoom. */ + EHlpZoomStateMedium = 1, + /** Large zoom. */ + EHlpZoomStateLarge = 2 + }; + +// Constants +const TInt KHlpModelDefaultNumberOfImagesForV6Point2Files = 1; +const TInt KHlpModelMaximumNumberOfImagesForV6Point2Files = 3; +// +/** Default zoom factor for small zoom size. */ +const TInt KHlpModelZoomFactorSmall = 750; +/** Default zoom factor for medium zoom size. */ +const TInt KHlpModelZoomFactorMedium = 1000; +/** Default zoom factor for large zoom size. */ +const TInt KHlpModelZoomFactorLarge = 1250; +// +/** Default zoom factor for medium zoom size as real number. */ +const TReal KHlpModelDefaultZoomFactorAsRealNumber = 1000.0; + + +class CHlpItem : public CBase +/** Encapsulates an individual item in a help file. + +Note that item IDs are assigned in increasing numerical order by the help +compiler and are not unique. Categories and help files are however specified +by UID, and so are unique. +@publishedAll +@released +*/ + { +public: + static CHlpItem* NewL(const TDesC& aTitle, TUint32 aId, TUid aCategoryId, TUid aHelpFileUid); + static CHlpItem* NewLC(const TDesC& aTitle, TUint32 aId, TUid aCategoryId, TUid aHelpFileUid); + static CHlpItem* NewLC(const TDesC& aTitle, TUint32 aId, TUid aHelpFileUid); + IMPORT_C ~CHlpItem(); + +public: // Access + inline TUid CategoryUid() const + /** Gets the item's category ID. + + @return Category ID */ + { return iCategoryUid; } + inline TUid HelpFileUid() const + /** Gets the item's help file UID. + + @return Help file UID */ + { return iHelpFileUid; } + inline TUint32 Id() const + /** Gets the item's ID. + + @return Item's ID */ + { return iId; } + inline const TDesC& Title() const + /** Gets the item's title. + + @return Item's title */ + { return *iTitle; } + +public: // These should not be public, but I can't break SC (these were inherited from + // the previous author. + /** Item's title */ + HBufC* iTitle; + /** Item's ID */ + TUint32 iId; + +private: + friend class CHlpList; // Needed for searching + CHlpItem(TUint32 aId); + CHlpItem(TUint32 aId, TUid aHelpFileUid); + CHlpItem(TUint32 aId, TUid aCategoryId, TUid aHelpFileUid); + void ConstructL(const TDesC& aTitle); + +private: // Meta data required for correct restoration of topics + TUid iCategoryUid; + TUid iHelpFileUid; + }; + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> MHlpTitleArray +/////////////////////////////////////////////////////////////////////////////////////// +class MHlpTitleArray : public MDesCArray +/** Interface to get a topic ID from an array index. +@publishedAll +@released +*/ + { +public: + /** Gets a topic ID for the specified index. + + @param aIndex Index of item to get + @return Topic ID */ + virtual TUint32 At(TInt aIndex) const = 0; + }; + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> CHlpList +/////////////////////////////////////////////////////////////////////////////////////// +class CHlpList : public CBase, public MHlpTitleArray +/** A list of help items (CHlpItem objects). +@publishedAll +@released +*/ + { +public: // Static construct / destruct + IMPORT_C static CHlpList* NewL(); + IMPORT_C static CHlpList* NewLC(); + IMPORT_C ~CHlpList(); + +public: // From MDesCArray + IMPORT_C TInt MdcaCount() const; + IMPORT_C TPtrC MdcaPoint(TInt aIndex) const; + +public: + // 'At' returns topic Id, but this function is next to useless because you can't + // uniquely identify a help topic by topic id alone. You need to know 3 things:- + // a) topic id, 2) category id, 3) help file uid. This information is all + // encapsulated in CHlpItem so help app authors should use 'Item' instead. + IMPORT_C TUint32 At(TInt aIndex) const; + IMPORT_C CHlpItem* Item(TInt aIndex) const; + IMPORT_C TInt Find(TUint32 aId); + IMPORT_C void Reset(); + IMPORT_C void AppendL(CHlpItem* aItem); + +private: // 2nd phase constructor + void ConstructL(); + +private: + // This is the array of help items that were located as a result of + // performing a search. + CArrayPtr* iList; + }; + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> CHlpTopic +/////////////////////////////////////////////////////////////////////////////////////// +class CHlpTopic : public CBase +/** Encapsulates a help topic. + +A help topic has text, a title, a category, and paragraph and character formatting. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CHlpTopic* NewL(); + IMPORT_C static CHlpTopic* NewLC(); + IMPORT_C ~CHlpTopic(); + +public: + // This function will not behave as expected in the case where it is used to + // restore rich text that includes pictures. Instead, only the text and markup + // will be restored. Help App authors should use 'CHlpModel::LoadTopic' instead. + // I can't remove this as it would break S&BC. + IMPORT_C void RestoreL(RDbView* aView); + + IMPORT_C CRichText* TopicText(); + IMPORT_C TDesC& TopicTitle(); + IMPORT_C TDesC& Category(); + + inline CParaFormatLayer* ParaFormatLayer() const + /** Gets the topic paragraph formatting. + + @return Topic paragraph formatting */ + { return iGlobalParaFormatLayer; } + inline CCharFormatLayer* CharFormatLayer() const + /** Gets the topic character formatting. + + @return Topic character formatting */ + { return iGlobalCharFormatLayer; } + +private: + void ConstructL(); + +private: + friend class CHlpModel; + + TUint32 iTopicId; + TBuf iTopicTitle; + TBuf iCategory; + + CRichText* iTopicText; + CParaFormatLayer* iGlobalParaFormatLayer; + CCharFormatLayer* iGlobalCharFormatLayer; + }; + + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> CHlpModel +/////////////////////////////////////////////////////////////////////////////////////// +class CHlpModel : public CBase, public MHlpDbObserver, public MPictureFactory, public MRichTextStoreResolver +/** Help model interface. + +It provides functions to search help files in various ways. + +The interface implements MHlpDbObserver for help database events, and MRichTextStoreResolver +and MPictureFactory to obtain pictures from rich text stores. +@publishedAll +@released +*/ + { +public: // Construct / destruct + IMPORT_C static CHlpModel* NewL(RFs& aFs, MHlpModelObserver* aObserver); + IMPORT_C static CHlpModel* NewLC(RFs& aFs, MHlpModelObserver* aObserver); + IMPORT_C ~CHlpModel(); + +public: // Opens all the help files in \System\Help + IMPORT_C void OpenL(); + IMPORT_C void CloseL(); + +public: // Opens specific help files + IMPORT_C void OpenFileL(const TDesC& aFileName); + IMPORT_C void CloseFileL(const TDesC& aFileName); + +public: // Specialized searching + IMPORT_C void ContextSearchL(TCoeHelpContext& aContext); + IMPORT_C void CategoryUIDSearchL(TUid aCategoryUID); + IMPORT_C void TopicSearchL(const CHlpItem& aHelpItem); + IMPORT_C void IndexSearchL(const CHlpItem& aHelpItem); + + // Generic searching + IMPORT_C void SearchL(TInt aType, TUint32 aId); + IMPORT_C void SearchL(TInt aType, HBufC* aCriterion=NULL); + IMPORT_C void SearchL(TInt aType, const TDesC& aCriterion); + +public: // Cancel EFullTextSearch types - will return KErrArgument if not the correct type + IMPORT_C TInt CancelSearch(); + +public: // Assumes that the search has already been performed and that the view is valid + IMPORT_C void LoadTopicL(CRichText& aRichText, TDes& aTitle); + IMPORT_C void LoadTopicL(CRichText& aRichText); + IMPORT_C void LoadTopicL(CHlpTopic* aTopic); + IMPORT_C void LoadListL(CHlpList* aList); + IMPORT_C void CategoryListL(CDesCArray* aList); + +public: + IMPORT_C void SetZoomSizeL(THlpZoomState aState = EHlpZoomStateMedium); + IMPORT_C THlpZoomState ZoomSize() const; + IMPORT_C void SetZoomFactors(THlpZoomState aZoomState, TInt aFactor); + TInt CurrentZoomFactor() const; + void RemoveHelpPicture(CHlpPicture* aHelpPicture); + +public: // FROM MPictureFactory + void NewPictureL(TPictureHeader& aHdr, const CStreamStore& aDeferredPictureStore) const; + +public: // FROM MRichTextStoreResolver + IMPORT_C const CStreamStore& StreamStoreL(TInt aPos) const; + +public: + // Check to see if any of the databases have matching meta data + IMPORT_C TInt MatchUidL(TUid aUid); + + // Replace the current observer with another + IMPORT_C void SetObserver(MHlpModelObserver* aObserver); + +public: + void NotifyHelpModelDestructionToPictures(); + +private: // Internal search API + void DoSearchL(TInt aType, const TDesC& aCriterion); + void DoNextSearchL(); + void ResetReadyForSearch(); + void ResetViews(); + void SetCriterionL(const TDesC& aCriterion); + +private: // Event management + void HandleDbEventL(TInt aEvent); + void ReportEventToObserverL(TInt aEvent); + +private: // Misc internal functions + inline CHlpDatabase* CurrentDatabase() const; + inline TInt DatabaseCount() const; + inline void SetSearchType(TInt aSearchType); + inline TInt CurrentSearchType() const; + RDbView* CurrentView() const; + TBool DiskPresent(TInt aDrive) const; + CHlpFileList* BuildListForDriveLC(TDriveUnit aDrive, RFs& aFsSession) const; + static void ResetAndDestroyArrayOfCHlpFileEntry(TAny* aObject); + +private: + CHlpModel(RFs& aFs, MHlpModelObserver& aObserver); + void ConstructL(); + +private: // Member data + RFs& iFsSession; + + // This is required in order to restore rich text pictures from the database + CStreamStore* iCurrentRichTextStore; + + // Creates our SQL string based upon the search type and criteria + CHlpSQLSearch* iSearch; + + // An array of all the help files currently available + CHlpDatabases* iDatabases; + + // Receives help model notifications as various actions are performed + MHlpModelObserver* iObserver; + + // Were any matching results found for this search + TBool iFound; + + // What was being searched for + HBufC* iCriterion; + + // What type of search was being performed + TInt iSearchType; + + // Which database are we currently searching + TInt iCurrentDb; + + // Transient category Uid used when creating category lists + TUid iTransientCategoryUid; + + // What zoom size is used + THlpZoomState iZoomSize; + + // Array to hold the bitmaps that are currently used in the help rich text + CArrayPtr* iPictures; + + // Array to hold the zoom factors that correspond to each zoom size + CArrayFix* iZoomFactors; + }; + + + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> CHlpModel (inlines) +/////////////////////////////////////////////////////////////////////////////////////// +inline TInt CHlpModel::DatabaseCount() const + { + return iDatabases->Count(); + } +inline void CHlpModel::SetSearchType(TInt aSearchType) + { + iSearchType = aSearchType; + } +inline CHlpDatabase* CHlpModel::CurrentDatabase() const + { + return iDatabases->At(iCurrentDb); + } +inline TInt CHlpModel::CurrentSearchType() const + { + return iSearchType; + } + + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/hlpzoom.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/hlpzoom.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,83 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __HLPZOOM_H__ +#define __HLPZOOM_H__ + +// System includes +#include + +// Classes referenced +class MGraphicsDeviceMap; + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> MHlpZoomStateManager (header) +/////////////////////////////////////////////////////////////////////////////////////// +class MHlpZoomStateManager +/** +@internalComponent +@released +*/ + { +public: // Zoom state + enum THlpZoomState + { + EHlpZoomStateSmall = -1, + EHlpZoomStateNormal = 0, + EHlpZoomStateLarge = 1 + }; + +public: // From MHlpZoomStateManager + virtual void SetZoomState(THlpZoomState aState) = 0; + virtual THlpZoomState ZoomState() const = 0; + +public: // From MHlpZoomStateManager + virtual MGraphicsDeviceMap& ZoomDeviceMap() const = 0; + virtual TInt ZoomFactorValueForZoomState(THlpZoomState aState) const = 0; + }; + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> MHlpZoomStateObserver (header) +/////////////////////////////////////////////////////////////////////////////////////// +class MHlpZoomStateObserver +/** +@internalComponent +@released +*/ + { +public: // From MHlpZoomStateObserver + virtual void HandleZoomStateChangedL(MHlpZoomStateManager::THlpZoomState aZoomState) = 0; + }; + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> MHlpZoomStateChangeNotifier (header) +/////////////////////////////////////////////////////////////////////////////////////// +class MHlpZoomStateChangeNotifier : public MHlpZoomStateManager +/** +@internalComponent +@released +*/ + { +public: // From MHlpZoomStateChangeNotifier + virtual void RegisterForZoomStateChangeNotificationsL(MHlpZoomStateObserver& aObserver) = 0; + virtual void RegisterForZoomStateChangeNotificationsCancel(MHlpZoomStateObserver& aObserver) = 0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/iapprefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/iapprefs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,132 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef IAPPrefs__ +#define IAPPrefs__ + + + + +#include +#include +#include +#include + +// Note: Version 1 = EPOC6.1 +// Version 2 = EPOC6.2 / Hurricane +const TInt KImIAPPreferencesVersion = 2; // identify which version of this class has been stored + +// for builds which don't define it. +/* +enum TCommDbDialogPref + { + ECommDbDialogPrefUnknown =0, + ECommDbDialogPrefPrompt, + ECommDbDialogPrefWarn, + ECommDbDialogPrefDoNotPrompt + }; +*/ + +class TImIAPChoice +/** Sets the connection dialog preference to be used with a particular IAP used +for an internet mail service. + +The connection control component (GenConn) allows various options for whether +or not the user should be should be prompted with a dialog at connect time. +For example, a connection using the first choice GPRS IAP might not show a +dialog, but a second choice connection using GSM might bring up a warning. +@publishedAll +@released +*/ + { + public: + /** The IAP identifier, as specified in the CommDb record for the IAP. */ + TUint32 iIAP; + /** Preference for what type of dialog is shown before a connection is made using + the specified IAP. */ + TCommDbDialogPref iDialogPref; + }; + +class CImIAPPreferences : public CBase +/** Encapsulates preferences relating to IAPs for an email service. + +An IAP defines all of the variable factors that determine how an Internet +connection is made. These variable factors can include the bearer (CDMA, GSM +or GPRS), dial-in number. network login names and passwords. + +The Comms Database is capable of storing details of several IAPs, which can +then be used to initiate different types of connection. The database also +stores the preference order of the IAPs: this defines which IAP should be +used as the first choice, and also an optional second choice to be used if +the first choice is not available. + +The CImIAPPreferences class associates a first choice, and optionally a second +choice IAP to use with a particular email service. The preference object is +stored in the service entry's message store. + +For SMTP, if no object has been stored in the service, then the SMTP client +will attempt to use any default Internet settings in the Comms Database, or +will use the existing Internet connection if one does already exist. Note +that SMTP sessions will normally fail to send any email messages if the SMTP +session is not created using an IAP which the SMTP server does not accept. + +Note that in Symbian OS v6.0 a single IAP was associated with an email service +entry through the iMtmData1 field. +@publishedAll +@released +*/ + { + public: + IMPORT_C static CImIAPPreferences* NewLC(); + IMPORT_C TInt Version() const; + IMPORT_C TInt NumberOfIAPs() const; + IMPORT_C TImIAPChoice IAPPreference(TInt aPreference) const; + IMPORT_C void AddIAPL(TImIAPChoice aIap, TInt aIndex=0); + IMPORT_C void RemoveIAPL(TInt aPreferenceNumber); + IMPORT_C TInt FindIAPL(TUint32 aIAP, TInt &aLocation) const; + IMPORT_C void ReplaceIAPL(TInt aPreferenceNumber,TImIAPChoice aIap); + IMPORT_C ~CImIAPPreferences(); + IMPORT_C TBool SNAPDefined() const; + IMPORT_C TUint32 SNAPPreference() const; + IMPORT_C void SetSNAPL(TUint32 aSnap); + IMPORT_C void RemoveSNAP(); + + void Reset(); + + // class constants + /** + @deprecated + */ + enum + { + KSanityCheckOldWins = 0xEFBEADDE, + KSanityCheck = 0xDEADBEEF + }; + /** ID of the stream used to store IAP preference information in a + message store. */ + const static TUid KUidMsgFileInternetAccessPreferences; + private: + CArrayFixFlat* iChoices; + TInt iVersion; + TUint32 iSnapId; + private: + CImIAPPreferences(); + CImIAPPreferences(CImIAPPreferences& aOther); // not implemented + int operator=(CImIAPPreferences& aOther); // not implemented + void ConstructL(); + void Panic(int err) const; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/imapcmds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/imapcmds.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1082 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__IMAPCMDS_H__) +#define __IMAPCMDS_H__ + +#if !defined (__MSVSTD_HRH__) +#include +#endif + +class TImap4RenameFolder +/** Buffer for an IMAP folder name. + +@see KIMAP4MTMRenameFolder + +@publishedAll +@released +*/ + { +public: + /** IMAP folder name. */ + TBuf<128> iNewName; + }; + +/** IMAP4-specific commands that can be issued through either +CImap4ClientMtm::InvokeAsyncFunctionL() or, in a few cases, +CImap4ClientMtm::InvokeSyncFunctionL(). + +These functions take an input message selection parameter +(@c const CMsvEntrySelection& @c aSelection) and an input/output buffer parameter +(TDes8& @c aParameter). The use of these parameters is command specific, and is +described for each command below. + +The commands fall into a number of categories: + +- Connect and logon to remote server: + - #KIMAP4MTMConnect + - #KIMAP4MTMDisconnect +- Synchronise headers: + - #KIMAP4MTMCancelBackgroundSynchronise + - #KIMAP4MTMConnectAndSyncCompleteAfterConnect + - #KIMAP4MTMConnectAndSyncCompleteAfterDisconnect + - #KIMAP4MTMConnectAndSyncCompleteAfterFullSync + - #KIMAP4MTMConnectAndSynchronise + - #KIMAP4MTMFolderFullSync + - #KIMAP4MTMFullSync + - #KIMAP4MTMInboxNewSync + - #KIMAP4MTMSynchronise + - #KIMAP4MTMWaitForBackground +- Subscribe to mailboxes: + - #KIMAP4MTMLocalSubscribe + - #KIMAP4MTMLocalUnsubscribe +- Populate messages: + - #KIMAP4MTMPopulate + - #KIMAP4MTMPopulateAllMailWhenAlreadyConnected + - #KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected + - #KIMAP4MTMPopulateNewMailWhenAlreadyConnected + - #KIMAP4MTMConnectAndPopulateAllMailAndDisconnect + - #KIMAP4MTMConnectAndPopulateAllMailAndStayOnline + - #KIMAP4MTMConnectAndPopulateMailSelectionAndDisconnect + - #KIMAP4MTMConnectAndPopulateMailSelectionAndStayOnline + - #KIMAP4MTMConnectAndPopulateNewMailAndDisconnect + - #KIMAP4MTMConnectAndPopulateNewMailAndStayOnline +- Copy messages: + - #KIMAP4MTMCopyAllMailWhenAlreadyConnected + - #KIMAP4MTMCopyMailSelectionWhenAlreadyConnected + - #KIMAP4MTMCopyNewMailWhenAlreadyConnected + - #KIMAP4MTMConnectAndCopyAllMailAndDisconnect + - #KIMAP4MTMConnectAndCopyAllMailAndStayOnline + - #KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect + - #KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline + - #KIMAP4MTMConnectAndCopyNewMailAndDisconnect + - #KIMAP4MTMConnectAndCopyNewMailAndStayOnline +- Move messages: + - #KIMAP4MTMMoveAllMailWhenAlreadyConnected + - #KIMAP4MTMMoveMailSelectionWhenAlreadyConnected + - #KIMAP4MTMMoveNewMailWhenAlreadyConnected + - #KIMAP4MTMConnectAndMoveAllMailAndDisconnect + - #KIMAP4MTMConnectAndMoveAllMailAndStayOnline + - #KIMAP4MTMConnectAndMoveMailSelectionAndDisconnect + - #KIMAP4MTMConnectAndMoveMailSelectionAndStayOnline + - #KIMAP4MTMConnectAndMoveNewMailAndDisconnect + - #KIMAP4MTMConnectAndMoveNewMailAndStayOnline +- Create messages: + - #KIMAP4MTMCreateForwardAsAttachmentEmailMessage + - #KIMAP4MTMCreateForwardEmailMessage + - #KIMAP4MTMCreateNewEmailMessage + - #KIMAP4MTMCreateReceiptEmailMessage + - #KIMAP4MTMCreateReplyEmailMessage + . + Note that CImEmailOperation is usually a more convenient way + to create messages. +- Query state: + - #KIMAP4MTMBusy + - #KIMAP4MTMIsConnected +- Offline operations: + - #KIMAP4MTMCancelOffLineOperations + - #KIMAP4MTMUndeleteAll +- Miscellaneous: + - #KIMAP4MTMEndBatch + - #KIMAP4MTMRenameFolder + - #KIMAP4MTMSelect + - #KIMAP4MTMStartBatch + +Note that when @c iServiceSelection is referred to in code examples for some +commands, this is assumed to be a CMsvEntrySelection that +contain the entry ID of an IMAP service. + +@see CImap4ClientMtm::InvokeAsyncFunctionL() +@see CImap4ClientMtm::InvokeSyncFunctionL() + +@publishedAll +@released +*/ +enum TImap4Cmds { + /** Tests if a specified service is connected. + + This command is synchronous, and used from @c InvokeSyncFunctionL(). + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to test. + + @c aParameter: a packaged TInt. On return, this is set to + KErrNone if the service is connected or KErrDisconnected if not. + + Example: + @code + TPckgBuf parameter; + iClientMtm->InvokeSyncFunctionL(KIMAP4MTMIsConnected, *iServiceSelection, parameter); + if (parameter()==KErrNone) + { + _LIT(KConnStatus, "\n\n Connected to the service"); + iConsole->Printf(KConnStatus); + } + @endcode + */ + KIMAP4MTMIsConnected = KMtmFirstFreeMtmFunctionId, + + /** Connects to the specified IMAP service. + + This makes a network connection and logs on the IMAP server specified + in the settings for the service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to connect to. + + @c aParameter: packages a pointer to an implementation of the connection observer + interface, MMsvImapConnectionObserver. Callbacks are made to this interface + to notify the client of the stages of connection. + + Completion: KErrBusy if the device is already connected to the specified server. + + Example: + @code + TBuf8<1> parameter; + iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMConnect, *iServiceSelection, parameter, iStatus); + @endcode + */ + KIMAP4MTMConnect, + + /** Connects to the specified IMAP service, and starts a background synchronisation. + + The call completes when the connection occurs and the synchronisation starts. See + CImap4ClientMtm for a description of a background synchronisation. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to connect to. + + @c aParameter: packages a pointer to an implementation of the connection observer + interface, MMsvImapConnectionObserver. Callbacks are made to this interface + to notify the client of the stages of connection and synchronisation. + + Completion: KErrBusy if the device is already connected to the specified server. + + Example: + @code + TPckg parameter(this); + iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMConnectAndSynchronise, *iServiceSelection, parameter, iStatus); + @endcode + */ + KIMAP4MTMConnectAndSynchronise, + + /** Cancels a background synchronisation in progress. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + being synchronised. + + @c aParameter: unused. + + Completion: KErrCancel if a synchronisation was cancelled; KErrNone if no + synchronisation was taking place. + + Example: + @code + TBuf8<1> parameter; + iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMCancelBackgroundSynchronise, *iServiceSelection, parameter, iStatus); + @endcode + */ + KIMAP4MTMCancelBackgroundSynchronise, + + /** Ensures that the IMAP server will remain loaded ready for more commands. + + If this is not set, then the Message Server can unload the IMAP server MTM + after a service is disconnected. It is more efficient if it stays loaded + if further use of the MTM is expected. + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: unused. + + Completion: KErrNone. + */ + KIMAP4MTMStartBatch, + + /** Ends the effect of KIMAP4MTMStartBatch. + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: unused. + + Completion: KErrNone. + */ + KIMAP4MTMEndBatch, + + /** Tests if the server is busy. + + It can be used from either CImap4ClientMtm::InvokeAsyncFunctionL() or + CImap4ClientMtm::InvokeSyncFunctionL(). + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: if the command is called from InvokeSyncFunctionL(), then on return a packaged + TInt holding the result. + + Completion: This completes with either KErrNone (neither session is busy) or KErrServerBusy + otherwise. + */ + KIMAP4MTMBusy, + + /** Issues an IMAP SELECT command on the specified mailbox. + + This is used to select an mailbox for the KIMAP4MTMSynchronise command. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder + to select. + + @c aParameter: Unused. + + Completion: KErrDisconnected if not connected. + */ + KIMAP4MTMSelect, + + /** Synchronises the current folder that is selected on the remote server. + + Note that after a connection is made, the Inbox folder is selected by default. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: unused. + + Completion: KErrDisconnected if not connected. + */ + KIMAP4MTMSynchronise, + + /** Synchronises the connected service's folder tree with the folders on the remote IMAP server. + + This creates and deletes folder entries in the message store under the remote service as needed, + to match the mailboxes that exist on the remote server. Note that this step is done as part of + the normal service synchronisation operation. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: unused. + + Completion: KErrDisconnected if not connected; KErrServerBusy if a + background synchronisation is already in progress. + */ + KIMAP4MTMSyncTree, + + /** Not supported. */ + KIMAP4MTMReserved10, // SyncSubscription + + /** Synchronises the specified service. + + This is a foreground synchronisation, and completes when the synchronisation is done. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to synchronise. + + @c aParameter: unused. + + Pre-condition: a connected service. + + Completion: KErrDisconnected if not connected; KErrServerBusy if a + background synchronisation is already in progress. + */ + KIMAP4MTMFullSync, + + /** Cancels any operations in progress and sends logout messages to server. + + If CImImap4Settings::SetDeleteEmailsWhenDisconnecting() is set, + any messages marked as deleted while offline are deleted before logout. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: unused. + + Completion: KErrDisconnected if not connected. + */ + KIMAP4MTMDisconnect, + + /** Sets the local subscription flag on a specified folder. + + This sets the local subscription flag on the folder's index entry + (see TMsvEmailEntry::SetLocalSubscription()), and saves the changed entry + to the index. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder + to subscribe to. + + @c aParameter: unused. + + Completion: KErrNotSupported if the entry is not a folder; KErrNone on success. + */ + KIMAP4MTMLocalSubscribe, + + /** Clears the local subscription flag on the specified folder. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder + to unsubscribe from. + + @c aParameter: unused. + + Completion: KErrNotSupported if the entry is not a folder; KErrNone on success. + */ + KIMAP4MTMLocalUnsubscribe, + + /** Not supported. */ + KIMAP4MTMReserved15, // MakeRemoteMailboxesInvisible + /** Not supported. */ + KIMAP4MTMReserved16, // MakeRemoteMailboxesVisible + + /** Synchronises any messages received by the remote server Inbox since the + last synchronisation operation. + + Messages that have been deleted from the remote Inbox are not deleted from + the mirror. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. + + @c aParameter: unused. + + Completion: KErrDisconnected if not connected; KErrServerBusy if a + background synchronisation is already in progress. + */ + KIMAP4MTMInboxNewSync, + + /** Selects and synchronises the specified folder. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder to synchronise. + + @c aParameter: unused. + + Completion: KErrDisconnected if not connected. + */ + KIMAP4MTMFolderFullSync, + + /** Completes only when a background synchronisation has finished. + + This turns a background synchronisation into a foreground synchronisation. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + being synchronised. + + @c aParameter: unused. + + Completion: KErrNone when no background synchronisation is in progress. + + Example: + @code + TBuf8<1> parameter; + iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMWaitForBackground, *iServiceSelection, parameter, iStatus); + @endcode + */ + KIMAP4MTMWaitForBackground, + + /** Renames a specified folder. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder to rename. + + @c aParameter: the new name for the folder. This should be a packaged TImap4RenameFolder object. + + Pre-conditions: a connected service. + + Completion: KErrDisconnected if there is no connected service. + + Example: + @code + // rename folder, assumed to be identified in *selection[0], to "newname". + _LIT(KNewName, "newname"); + TImap4RenameFolder newName; + newName.iNewName = KNewName; + TPckg name(newName); + iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMRenameFolder, *selection, name, iStatus); + @endcode + */ + KIMAP4MTMRenameFolder, + + /** Undoes any offline delete operations pending on the specified entries. + + @c aSelection: Entries on which to cancel offline delete operations. + + @c aParameter: Unused. + + Completion: KErrNone. + */ + KIMAP4MTMUndeleteAll, + + /** Cancels any offline operations pending on the specified entries. + + If any item is a folder, then it cancels all operations queued on any item + in that folder. If an IMAP4 service ID is given, then it cancels any Copy() + or MoveFromLocal() operations that are queued. A message can not have its + pending operations cancelled individually. + + @c aSelection: Entries on which to cancel offline operations. + + @c aParameter: Unused. + + Completion: KErrNone. + */ + KIMAP4MTMCancelOffLineOperations, + + /** Fetches the specified messages from the remote server to the mirror. + + @c aSelection: Messages to fetch. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + */ + KIMAP4MTMPopulate, + + /** Not supported. */ + KIMAP4MTMSyncSubscription, + + /** Connect and synchronise the specified service, and complete after connection. + + The operation completes when the connection part completes. The synchronisation + is done in the background. + + The command has the same functionality as KIMAP4MTMConnectAndSynchronise. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to connect to. + + @c aParameter: packages a pointer to an implementation of the connection observer + interface, MMsvImapConnectionObserver. Callbacks are made to this interface + to notify the client of the stages of connection and synchronisation. + + Completion: KErrBusy if a connected session already exists. + */ + KIMAP4MTMConnectAndSyncCompleteAfterConnect, + + /** Connect and synchronise the specified service, and complete after synchronisation. + + This is similar to KIMAP4MTMConnectAndSynchronise, except that the operation + does not complete until synchronisation is complete. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to connect to. + + @c aParameter: packages a pointer to an implementation of the connection observer + interface, MMsvImapConnectionObserver. Callbacks are made to this interface + to notify the client of the stages of connection and synchronisation. + + Completion: KErrBusy if a connected session already exists. + */ + KIMAP4MTMConnectAndSyncCompleteAfterFullSync, + + /** Connect and synchronise the specified service, and complete after disconnection. + + Unlike the other synchronisation commands, this command does not complete + after either connection or synchronisation. Instead, after the initial synchronisation + is complete, it periodically resynchronises the Inbox until the service is disconnected. + CImImap4Settings::SyncRate() sets the refresh period. + + Disconnection can occur because the network connection is closed, either through + user action, or because a networking timeout occurs on the socket. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service + to connect to. + + @c aParameter: packages a pointer to an implementation of the connection + observer interface, MMsvImapConnectionObserver. Callbacks are made to this + interface to notify the client of the stages of connection and + synchronisation. + + Completion: KErrBusy if a connected session already exists. + */ + KIMAP4MTMConnectAndSyncCompleteAfterDisconnect, + + /** Not supported. */ + KIMAP4MTMCancelSendOnNextConnection, + + /** Copy any new messages from a specified folder to another folder, + assuming a new connection does not need to be made. + + This is used after message headers have been synchronised. Any messages marked + as new are populated in the mirror, and then copied to the specified destination folder. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder from which + to copy the entries. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMCopyNewMailWhenAlreadyConnected, + + /** Connect to a specified service, copy any new messages from + a specified folder into another folder, and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to copy. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndCopyNewMailAndStayOnline, + + /** Connect to a specified service, copy any new messages from + a specified folder into another folder, and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to copy. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndCopyNewMailAndDisconnect, + + /** Move any new messages from a specified folder to another folder, + assuming a new connection does not need to be made. + + This is used after message headers have been synchronised. Any messages marked + as new are populated in the mirror, and then moved to the specified destination folder. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder from which + to move the entries. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMMoveNewMailWhenAlreadyConnected, + + /** Connect to a specified service, move any new messages from + a specified folder into another folder, and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndMoveNewMailAndStayOnline, + + /** Connect to a specified service, move any new messages from + a specified folder into another folder, and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndMoveNewMailAndDisconnect, + + /** Copy the specified messages to another folder, assuming a new connection + does not need to be made. + + The specified messages are populated in the mirror, and then copied to + the specified destination folder. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to copy. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to copy, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMCopyMailSelectionWhenAlreadyConnected, + + /** Connect to a specified service, copy the specified messages to another + folder, and stay connected. + + The specified messages are populated in the mirror, and then copied to + the specified destination folder. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to copy. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to copy, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline, + + /** Connect to a specified service, copy the specified messages to another + folder, and disconnect afterwards. + + The specified messages are populated in the mirror, and then copied to + the specified destination folder. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to copy. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to copy, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect, + + /** Move the specified messages to another folder, assuming a new connection + does not need to be made. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to move, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMMoveMailSelectionWhenAlreadyConnected, + + /** Connect to a specified service, move the specified messages to another + folder, and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to move, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndMoveMailSelectionAndStayOnline, + + /** Connect to a specified service, move the specified messages to another + folder, and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to move, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndMoveMailSelectionAndDisconnect, + + /** Copy all messages from the current service, assuming a new connection does + not need to be made. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder from which + to copy the entries. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to copy, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMCopyAllMailWhenAlreadyConnected, + + /** Connect to a specified service, copy all messages from the current service, + and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder from which + to copy the entries. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to copy, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndCopyAllMailAndStayOnline, + + /** Connect to a specified service, copy all messages from the current service, + and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder from which + to copy the entries. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to copy, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndCopyAllMailAndDisconnect, + + /** Move all messages from the specified folder, assuming a new connection does + not need to be made. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder from which + to move the entries. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no entries to move, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMMoveAllMailWhenAlreadyConnected, + + /** Connect to a specified service, move all messages from + a specified folder into another folder, and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndMoveAllMailAndStayOnline, + + /** Connect to a specified service, move all messages from + a specified folder into another folder, and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to move. + + @c aParameter: packaged TImImap4GetMailInfo object. + TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to + move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize + are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: + the entire message is always fetched. + + Completion: note if there are no new entries, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndMoveAllMailAndDisconnect, + + /** Populate the specified messages, assuming a new connection does not need to be made. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected, + + /** Connect to a specified service, populate the specified messages, + and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndPopulateMailSelectionAndStayOnline, + + /** Connect to a specified service, populate the specified messages, + and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service, + followed by the IDs of the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndPopulateMailSelectionAndDisconnect, + + /** Populate the new messages in a specified folder, assuming a new connection does + not need to be made. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMPopulateNewMailWhenAlreadyConnected, + + /** Populate all messages in a specified folder, assuming a new connection does + not need to be made. + + Pre-condition: a connected service. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMPopulateAllMailWhenAlreadyConnected, + + /** Connect to a specified service, populate the new messages in a specified + folder, and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndPopulateNewMailAndStayOnline, + + /** Connect to a specified service, populate the new messages in a specified + folder, and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndPopulateNewMailAndDisconnect, + + /** Connect to a specified service, populate all messages in a specified + folder, and stay connected. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndPopulateAllMailAndStayOnline, + + /** Connect to a specified service, populate all messages in a specified + folder, and disconnect afterwards. + + @c aSelection: @c aSelection[0] should contain the entry ID of the service; + @c aSelection[1] should contain the entry ID of the folder containing + the messages to populate. + + @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo + specifying the message parts to fetch and size limits on what is fetched. + + Completion: note if there are no entries to populate, then KErrNone, and progress + information is a null descriptor. + */ + KIMAP4MTMConnectAndPopulateAllMailAndDisconnect, + + /** Creates a new email message. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder in + which to create the message. + + @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying + message creation flags and message type. + + The operation object returned is a CImEmailOperation. Final progress information + from this contains the ID of the newly created message. + */ + KIMAP4MTMCreateNewEmailMessage, + + /** Creates a new reply message. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder in + which to create the message; @c aSelection[1] should contain the entry ID + of the message to which to create a reply. + + @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying + message creation flags and message type. + + The operation object returned is a CImEmailOperation. Final progress information + from this contains the ID of the newly created message. + */ + KIMAP4MTMCreateReplyEmailMessage, + + /** Creates a new forwarded message. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder in + which to create the message; @c aSelection[1] should contain the entry ID + of the message to forward. + + @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying + message creation flags and message type. + + The operation object returned is a CImEmailOperation. Final progress information + from this contains the ID of the newly created message. + */ + KIMAP4MTMCreateForwardEmailMessage, + + /** Creates a new forwarded message, with the original message as an attachment. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder in + which to create the message; @c aSelection[1] should contain the entry ID + of the message to forward. + + @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying + message creation flags and message type. + + The operation object returned is a CImEmailOperation. Final progress information + from this contains the ID of the newly created message. + */ + KIMAP4MTMCreateForwardAsAttachmentEmailMessage, + + /** Creates a new message-receipt message. + + @c aSelection: @c aSelection[0] should contain the entry ID of the folder in + which to create the message; @c aSelection[1] should contain the entry ID + of the original message for which the receipt is required. + + @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying + message creation flags and message type. + + The operation object returned is a CImEmailOperation. Final progress information + from this contains the ID of the newly created message. + */ + KIMAP4MTMCreateReceiptEmailMessage +}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/imapconnectionobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/imapconnectionobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,67 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__IMAPCONNECTIONOBSERVER_H__) +#define __IMAPCONNECTIONOBSERVER_H__ + +/** IMAP4 connection observer events. + +@see MMsvImapConnectionObserver +@publishedAll +@released +*/ +enum TImapConnectionEvent + { + /** Connecting to server. */ + EConnectingToServer, + /** Synchronising folder list. */ + ESynchronisingFolderList, + /** Synchronising inbox. */ + ESynchronisingInbox, + /** Synchronising folders. */ + ESynchronisingFolders, + /** Synchronisation complete. */ + ESynchronisationComplete, + /** Disconnecting. */ + EDisconnecting, + /** Connection completed. */ + EConnectionCompleted + }; + +// Mix-in class to allow observation of the stages of an IMAP operation +// +class MMsvImapConnectionObserver +/** Abstract base class used for IMAP4 connection observation. + +A derived class to handle IMAP4 connection events should override the HandleImapConnectionEvent() +member function. + +Objects that implement this interface are passed as a packaged parameter +to CImap4ClientMtm::InvokeAsyncFunctionL() when a connection command is issued. + +@publishedAll +@released + +@see TImap4Cmds +*/ + { +public: + /** Called when a connection event occurs. + + @param aConnectionState Connection event */ + virtual void HandleImapConnectionEvent(TImapConnectionEvent aConnectionState)=0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/imapset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/imapset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,708 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __IMAPSET_H__ +#define __IMAPSET_H__ + + + + +#include +#include + +class TBearerTypes; +class TImImap4GetPartialMailInfo; + +/** Default IMAP4 server port number. */ +const TUint32 KIMAPDefaultPortNumber = 143; + +/** Default inbox refresh rate in seconds. */ +const TInt KImapDefaultInboxSyncRate = 300; + +/** Default idle timeout in seconds. */ +const TInt KImapDefaultIdleTimeout = 1740; + +/** Default fetch size in bytes. */ +const TUint KImapDefaultFetchSizeBytes = 20480; + + + +/** @deprecated */ +const TInt32 KImImapSynchroniseAll = -1; + +/** @deprecated */ +const TInt32 KImImapSynchroniseNone = 0; + + +/** +Describes the folder subscription synchronisation strategy. + +This specifies whether the local or remote folder subscription flags, or a +combination of both, are used to determine which mailboxes are synchronised. +For an overview of the synchronisation process, see CImap4ClientMtm. + +@see CImImap4Settings::SetSynchronise() +@see CImImap4Settings::Synchronise() + +@publishedAll +@released +*/ +enum TFolderSyncType + { + /** Folders that are marked for subscription either locally or remotely are synchronised. */ + EUseCombination=0, + /** Only folders marked for subscription locally are synchronised. */ + EUseLocal, + /** Only folders marked for subscription remotely are synchronised. */ + EUseRemote + }; + + +/** +Specifies methods of synchronising IMAP4 subscription information with a server. + +Subscription settings that have been set on folders on the local device, and +subscription settings that have been set on the corresponding mailboxes on the +remote server can be synchronised, as part of the synchronisation process +(see the overview for CImap4ClientMtm). + +@see CImImap4Settings::SetSubscribe() +@see CImImap4Settings::Subscribe() + +@publishedAll +@released +*/ +enum TFolderSubscribeType + { + /** Do not alter local or remote subscription information. */ + EUpdateNeither=0, + /** Update local copy of subscription information when it is received from the + remote IMAP4 server at the beginning of the mail session. */ + EUpdateLocal, + /** Update remote copy of subscription information so that it matches the local + subscription information. */ + EUpdateRemote, + /** Merge local and remote subscription information, store updated information + on the remote server and store merged data on the local message store. */ + EUpdateBoth + }; + + +/** +Defines which components of a message to fetch when copying or moving from +a server. + +@see CImImap4Settings::SetGetMailOptions() +@see CImImap4Settings::GetMailOptions() + +@publishedAll +@released +*/ +enum TImap4GetMailOptions + { + /** Get message headers. */ + EGetImap4EmailHeaders, + /** Get message body. */ + EGetImap4EmailBodyText, + /** Get message body and attachments. */ + EGetImap4EmailBodyTextAndAttachments, + /** Get message attachments. */ + EGetImap4EmailAttachments, + /** Get message body, including non-plain or non-HTML alternative text parts (or attachments). */ + EGetImap4EmailBodyAlternativeText + }; + +/** +Defines which components of a message should be fetched partially when +fetching the message from a server. + +@see +CImImap4Settings + +@publishedAll +@released +*/ +enum TImImap4PartialMailOptions + { + /** No size limits, full message to be fetched.*/ + ENoSizeLimits, + /** Get body text only. + Gets text/plain part only if text/plain part size + text/html part size + is greater than body text size limit. + Gets text/plain part and text/html part if text/plain part size + text/html part size + is less than body text size limit of the message.*/ + EBodyTextOnly, + /** Gets all the attachments less than attachment size limit.*/ + EAttachmentsOnly, + /** Gets the body text less than or equal to body text size limit and attachments + less than or equal to attachment size limit.*/ + EBodyTextAndAttachments, + /** Gets the body text less than total size limit and also attachments whose size + is within total size limit minus fetched body parts.*/ + ECumulative, + /** Gets the body text less than total size limit and all non-HTML text attachments whose size + is within total size limit minus fetched body parts.*/ + EBodyAlternativeText + }; + +/** +Flags to indicate what type of IMAP4 progress information is being returned. + +@publishedAll +@released +*/ +enum TImap4ProgressType + { + /** Progress information is an TImap4GenericProgress object. */ + EImap4GenericProgressType, + /** Progress information is an TImap4SyncProgress object. */ + EImap4SyncProgressType + }; + + +class TImap4GenericProgress +/** +Progress information for an IMAP4 get operation. + +For the 'get mail when already connected' operations, the progress state can +be obtained from TImap4GenericProgress::iState. In the case of the 'connect +and get mail and disconnect' and 'connect and get mail and stay online', the +actual progress defined in TImap4GenericProgress::iState will be of the form +of 'Copy New Mail', 'Populating Message Selection' etc. The sub-operation +state can then be obtained in the form of 'Connecting', 'Fetching', 'Disconnecting' +etc. from TImap4GenericProgress::iImap4SubStateProgress. + +@see +CImImap4GetMail + +@publishedAll +@released +*/ + { +public: + IMPORT_C TInt ConnectionState() const; + IMPORT_C TInt ConnectionIAP() const; + +public: + /** Operation type. */ + enum TImap4GenericProgressOp + { + /** Connect operation. */ + EConnect, + /** Disconnect operation. */ + EDisconnect, + /** Sync operation. */ + ESync, + /** Select operation. */ + ESelect, + /** Copy messages to local operation. */ + ECopyToLocal, + /** Copy messages within remote server operation. */ + ECopyWithinService, + /** Copy messages from local operation. */ + ECopyFromLocal, + /** Move messages to local operation. */ + EMoveToLocal, + /** Move messages within remote server operation. */ + EMoveWithinService, + /** Move messages from local operation. */ + EMoveFromLocal, + /** Message population operation. */ + EPopulate, + /** Delete operation. */ + EDelete, + /** Offline delete operation. */ + EOffLineDelete, + /** Offline undelete operation. */ + EOffLineUndelete, + /** Offline delete operation. */ + EOffLineCopyToLocal, + /** Offline move messages to local operation. */ + EOffLineMoveToLocal, + /** Offline copy messages from local operation. */ + EOffLineCopyFromLocal, + /** Offline move messages from local operation. */ + EOffLineMoveFromLocal, + /** Offline copy messages within remote server operation. */ + EOffLineCopyWithinService, + /** Offline move messages within remote server operation. */ + EOffLineMoveWithinService, + /** Offline message population operation. */ + EOffLinePopulate + }; + + /** Operation state information. */ + enum TImap4GenericProgressState + { + /** Disconnected. */ + EDisconnected, + /** Connecting. */ + EConnecting, + /** Idle. */ + EIdle, + /** Selecting the folder to use. */ + ESelecting, + /** Fetching messages to mirror server. */ + EFetching, + /** Appending local messages to remote server. */ + EAppending, + /** Copying local messages to local or within service. */ + ECopying, + /** Deleting an item, including expunging a folder. */ + EDeleting, + /** Synchronising folder after an operation. */ + ESyncing, + /** Disconnecting. */ + EDisconnecting, + /** Sync already in progress. */ + EBusy, + /** CImImap4GetMail move operation in progress. */ + EMoving, + /** CImImap4GetMail copy new mail operation in progress. */ + ECopyNewMail, + /** CImImap4GetMail move new mail operation in progress. */ + EMoveNewMail, + /** CImImap4GetMail copy selected messages operation in progress. */ + ECopyMailSelection, + /** CImImap4GetMail move selected messages operation in progress. */ + EMoveMailSelection, + /** CImImap4GetMail copy all messages operation in progress. */ + ECopyAllMail, + /** CImImap4GetMail move all messages operation in progress. */ + EMoveAllMail, + /** CImImap4GetMail populate new messages operation in progress. */ + EPopulateNewMail, + /** CImImap4GetMail populate all messages operation in progress. */ + EPopulateAllMail, + /** CImImap4GetMail populate selected messages operation in progress. */ + EPopulateMailSelection + }; + + /** Progress information type: always EImap4GenericProgressType. */ + TImap4ProgressType iType; + /** Operation type. */ + TImap4GenericProgressOp iOperation; + /** + The progress state. + + For 'connect and get mail and disconnect' and 'connect and get mail and stay + online' type operations, additional sub-operation state can be obtained from + iImap4SubStateProgress. + */ + TImap4GenericProgressState iState; + /** + The progress sub-state. + + This only applies to 'connect and get mail and disconnect' and 'connect and + get mail and stay online' type operations. + */ + TImap4GenericProgressState iImap4SubStateProgress; + /** In the EConnecting state, this field holds the connection iap value, + otherwise it holds the number of messages still to be processed. */ + TInt iMsgsToDo; + /** In the EConnecting state, this field holds the connection stage value, + otherwise it holds the number of messages processed. */ + TInt iMsgsDone; + /** Number of message parts still to be processed. */ + TInt iPartsToDo; + /** Number of message parts processed. */ + TInt iPartsDone; + /** Number of bytes (for a multipart fetch) still to be processed. */ + TInt iBytesToDo; + /** Number of bytes (for a multipart fetch) processed. */ + TInt iBytesDone; + /** Error code. */ + TInt iErrorCode; + /** Message ID returned from the operation. */ + TMsvId iReturnedMsvId; + /** The total size of messages to be downloaded (bytes). */ + TInt iTotalSize; + }; + + +class TImap4SyncProgress +/** +IMAP4 synchronisation progress information. + +The client may then use an object of this type created by the server MTM to +track synchronisation progress. + +@publishedAll +@released +*/ + { +public: + /** Synchronisation state. */ + enum TImap4SyncProgressState + { + /** Idle. */ + EIdle, + /** Busy. */ + EBusy, + /** Connecting. */ + EConnecting, + /** Disconnecting. */ + EDisconnecting, + /** Synchronising inbox. */ + ESyncInbox, + /** Synchronising folder tree. */ + ESyncFolderTree, + /** Checking remote subscription. */ + ECheckRemoteSubscription, + /** Updating remote subscription. */ + EUpdateRemoteSubscription, + /** Synchronising other information. */ + ESyncOther, + /** Deleting. */ + EDeleting, + /** Processing pending operations. */ + EProcessingPendingOps + }; + + /** Progress information type: always EImapSyncProgressType. */ + TImap4ProgressType iType; + /** Synchronisation state. */ + TImap4SyncProgressState iState; // Where is the sync up to? + /** + "Folders to do" count for synchronisation. + This is meaningful during the #ESyncOther and #EDeleting + synchronisation stages. + */ + TInt iFoldersToDo; + /** + "Folders done" count for synchronisation. + This is meaningful during the #ESyncOther and #EDeleting + synchronisation stages. + */ + TInt iFoldersDone; + /** + "Message to do" count for synchronisation. + This is meaningful during the #ESyncInbox, #ESyncOther and #EProcessingPendingOps + synchronisation stages. + */ + TInt iMsgsToDo; + /** + "Message done" count for synchronisation. + This is meaningful during the #ESyncInbox, #ESyncOther and #EProcessingPendingOps + synchronisation stages. + */ + TInt iMsgsDone; + /** + Number of headers fetched during synchronisation. + */ + TInt iHeadersFetched; + /** + Number of folders orphaned during synchronisation. + + An orphaned folder is a local folder which existed + under the service, but which did not exist + on the remote server when synchronisation was done. + */ + TInt iOrphanedFolders; + /** + Number of new folders during synchronisation. + */ + TInt iNewFolders; + /** + Number of orphaned messages during synchronisation. + + An orphaned message is one which existed locally + under the service, but which did not exist + on the remote server when synchronisation was done. + */ + TInt iOrphanedMessages; + /** + Number of remote messages tagged for deletion. + + In IMAP, messages can be flagged as deleted, before + they are later permanently removed. + */ + TInt iRemoteMessagesDeleteTagged; + /** Number of messages fetched during synchronisation. + + In the current implementation, this is always 0. Use + iHeadersFetched to get the number of headers fetched. + */ + TInt iMessagesFetchedOK; + /** Number of message parts fetched during synchronisation. + + In the current implementation, this is always 0. + */ + TInt iMessagePartsFetchedOK; + /** Number of message parts not found during synchronisation. + + In the current implementation, this is always 0. + */ + TInt iMessagePartsNotFound; + /** Number of folders not found during synchronisation. + + This can occur if the remote server returns an error when + a client attempts to select a folder during synchronisation. + */ + TInt iFoldersNotFound; + /** Any error-code that the client needs to be informed of. */ + TInt iErrorCode; + }; + +class TImap4CompoundProgress +/** +IMAP operation progress information. + +The class supplies both the two IMAP progress types, generic and synchronisation. + +The IMAP4 server MTM owns two IMAP4 sessions that are used independently of +each other to perform 'background' and 'foreground' operations. In a typical +situation, the user may be downloading the body parts of a message (populating) +in the foreground whilst in the background a full synchronisation may be underway. +In this scenario, the generic progress will give an indication of the 'foreground' +activity and the synchronisation progress will give an indication of the 'background' +progress. The synchronisation progress component of the compound progress +will always show the synchronisation progress irrespective of whether the +synchronisation is running in the foreground or the background. + +@publishedAll +@released +*/ + { +public: + /** Generic progress. */ + TImap4GenericProgress iGenericProgress; + /** Synchronisation progress. */ + TImap4SyncProgress iSyncProgress; + }; + + +class CImImap4Settings : public CImBaseEmailSettings +/** +Settings for connection to and use of an IMAP4 mail server and its mailboxes. + +Messaging clients should use an instance of this class to specify and retrieve +configuration settings that are used by an IMAP4 service when executing email +operations. + +Service settings include: + +- server log on settings (user name and password) +- message header synchronisation strategy and synchronisation limits +- message getting options, such as maximum size. Note that these options + are not used by the IMAP MTM. They can be used by client applications to + store user preferences, and be used by the client when issuing get commands. +- miscelleanous settings, including whether IMAP IDLE should be used + +CImImap4Settings objects are created and accessed through +CEmailAccounts. CEmailAccounts can also be used to get the +connection settings, such as the ISP to use, used to access an IMAP server. + +Settings for a service are associated with a service-type entry in the Message +Server'smessage store. However the settings are not actually stored in the +message store, but in the device's Central Repository data store. + +@see CEmailAccounts + +@publishedAll +@released +*/ + { +public: + IMPORT_C CImImap4Settings(); + IMPORT_C virtual ~CImImap4Settings(); + IMPORT_C void Reset(); + IMPORT_C const TPtrC8 LoginName() const; + IMPORT_C void SetLoginNameL(const TDesC8& aLoginName); + IMPORT_C const TPtrC8 Password() const; + IMPORT_C void SetPasswordL(const TDesC8& aPassword); + IMPORT_C const TPtrC8 FolderPath() const; + IMPORT_C void SetFolderPathL(const TDesC8& aFolderPath); + IMPORT_C const TPtrC8 SearchString() const; + IMPORT_C void SetSearchStringL(const TDesC8& aSearchString); + IMPORT_C TText8 PathSeparator() const; + IMPORT_C void SetPathSeparator(const TText8 aPathSeparator); + IMPORT_C TBool DisconnectedUserMode() const; + IMPORT_C void SetDisconnectedUserMode(TBool aFlag); + IMPORT_C void SetSynchronise(const TFolderSyncType aType); + IMPORT_C TFolderSyncType Synchronise() const; + IMPORT_C void SetSubscribe(const TFolderSubscribeType aType); + IMPORT_C TFolderSubscribeType Subscribe() const; + IMPORT_C TBool AutoSendOnConnect() const; + IMPORT_C void SetAutoSendOnConnect(TBool aFlag); + IMPORT_C TUint MaxEmailSize() const; + IMPORT_C void SetMaxEmailSize(const TUint aMaxEmailSize); + IMPORT_C TBool DeleteEmailsWhenDisconnecting() const; + IMPORT_C void SetDeleteEmailsWhenDisconnecting(TBool aFlag); + IMPORT_C TBool AcknowledgeReceipts() const; + IMPORT_C void SetAcknowledgeReceipts(TBool aFlag); + IMPORT_C TImap4GetMailOptions GetMailOptions() const; + IMPORT_C void SetGetMailOptions(TImap4GetMailOptions aGetMailOptions); + IMPORT_C CImImap4Settings& CopyL(const CImImap4Settings& aCImImap4Settings); + IMPORT_C TBool operator==(const CImImap4Settings& aCImImap4Settings) const; + IMPORT_C TInt32 InboxSynchronisationLimit() const; + IMPORT_C void SetInboxSynchronisationLimit(const TInt32 aInboxSyncLimit); + IMPORT_C TInt32 MailboxSynchronisationLimit() const; + IMPORT_C void SetMailboxSynchronisationLimit(const TInt32 aMailboxSyncLimit); + IMPORT_C TBool UpdatingSeenFlags() const; + IMPORT_C void SetUpdatingSeenFlags(TBool aFlag); + IMPORT_C TInt SyncRate() const; + IMPORT_C void SetSyncRateL(TInt aSyncRate); + IMPORT_C TUint FetchSize() const; + IMPORT_C void SetFetchSizeL(TUint aFetchSizeBytes); + IMPORT_C TBool ImapIdle() const; + IMPORT_C void SetImapIdle(TBool aFlag); + IMPORT_C TInt ImapIdleTimeout() const; + IMPORT_C void SetImapIdleTimeoutL(TInt aIdleTimeout); + IMPORT_C TImImap4PartialMailOptions PartialMailOptions() const; + IMPORT_C void SetPartialMailOptionsL(TImImap4PartialMailOptions aPartialMailOptions); + IMPORT_C TInt32 BodyTextSizeLimit() const; + IMPORT_C void SetBodyTextSizeLimitL(TInt32 aBodyTextSizeLimit); + IMPORT_C TInt32 AttachmentSizeLimit() const; + IMPORT_C void SetAttachmentSizeLimitL(TInt32 aAttachmentSizeLimit); + IMPORT_C TBool UseExpunge() const; + IMPORT_C void SetUseExpunge(TBool aFlag); + IMPORT_C void SetTlsSslDomainL(const TDesC8& aDomainName); + IMPORT_C TPtrC8 TlsSslDomain() const; + IMPORT_C void SetUseSyncDownloadRules(TBool aFlag); + IMPORT_C TBool UseSyncDownloadRules(); + IMPORT_C void SetFolderSyncDisabled(TBool aFlag); + IMPORT_C TBool FolderSyncDisabled(); + +private: + class TImImap4SettingsExtension + { + public: + inline TImImap4SettingsExtension(); + public: + HBufC8* iLoginName; + HBufC8* iPassword; + HBufC8* iFolderPath; + HBufC8* iSearchString; + HBufC8* iTlsSslDomain; + TInt iSyncRate; + TInt iImapIdleTimeout; + TUint iFetchSizeBytes; + TImImap4PartialMailOptions iPartialMailOptions; + TInt32 iBodyTextSizeLimit; + TInt32 iAttachmentSizeLimit; + }; + + inline TImImap4SettingsExtension* Extension() const; + inline void CheckExtensionExistsL(); + + enum TImImap4EmailSettings + { + KImap4EmailSettingsClearFlag = 0x00000000, + KImap4BaseEmailSettingsLastUsedFlag = CImBaseEmailSettings::EBaseEmailSettingsLastUsedFlag, //0x00000002 + KImap4EmailDisconnectedModeFlag = KImap4BaseEmailSettingsLastUsedFlag << 1, //0x00000004 + KImap4EmailAutoSendFlag = KImap4EmailDisconnectedModeFlag << 1, //0x00000008 + KImap4EmailDeleteEmailsWhenDisconnecting = KImap4EmailAutoSendFlag << 1, //0x00000010 + KImap4EmailAcknowledgeReceipts = KImap4EmailDeleteEmailsWhenDisconnecting << 1, //0x00000020 + KImap4EmailUpdatingSeenFlags = KImap4EmailAcknowledgeReceipts << 1, //0x00000040 + KImap4EmailIdleFlag = KImap4EmailUpdatingSeenFlags << 1, //0x00000080 + KImap4EmailExpungeFlag = KImap4EmailIdleFlag << 1, + KImap4EmailUseSyncDownloadRules = KImap4EmailExpungeFlag << 1, //0x00000200 + KImap4EmailSettingsFolderSyncDisabled = KImap4EmailUseSyncDownloadRules << 1, //0x00000400 + KImap4EmailSettingsLastUsedFlag = KImap4EmailSettingsFolderSyncDisabled + }; + + TImImap4SettingsExtension* iExtension; // renamed iReceiptAddress + + TInt32 iInboxSyncLimit; + TInt32 iMailboxSyncLimit; + + TText8 iPathSeparator; + TFolderSyncType iSynchroniseStrategy; + TFolderSubscribeType iSubscriptionStrategy; + TUint32 iMaxEmailSize; + TImap4GetMailOptions iGetMailOptions; + }; + + +class TImImap4GetMailInfo +/** +Specifies options used when retrieving messages with IMAP. + +An TImImap4GetMailInfo is passed as a packaged parameter +to CImap4ClientMtm::InvokeAsyncFunctionL() when a message +getting command is issued. + +Options include the maximum message size, and what +message parts are required. + +@see CImImap4GetMail +@see TImap4Cmds + +@publishedAll +@released +*/ + { +public: + /** The maximum message size (bytes). + Messages of greater size are not fetched. */ + TInt32 iMaxEmailSize; + /** The required message parts. */ + TImap4GetMailOptions iGetMailBodyParts; + /** The destination folder ID, specifying the + target folder when messages are copied or moved. */ + TMsvId iDestinationFolder; + }; + +/** +Specifies message criteria that are used as a filter when retrieving messages partially. + +Options include the maximum size for the whole message, +the maximum size for the body of the message, +the maximum size for the attachments with the message, and +the message parts required. + +An TImImap4GetPartialMailInfo is passed as a packaged parameter +to CImap4ClientMtm::InvokeAsyncFunctionL() when a message +populate command is issued. + +@see +CImImap4GetMail + +@publishedAll +@released +*/ + +class TImImap4GetPartialMailInfo : public TImImap4GetMailInfo + { +public: + /** The maximum size limit for the total message (bytes). */ + TInt32 iTotalSizeLimit; + /** The maximum size limit for body of the message (bytes). */ + TInt32 iBodyTextSizeLimit; + /** The maximum size limit for the attachments (bytes). */ + TInt32 iAttachmentSizeLimit; + /** The required message parts. */ + TImImap4PartialMailOptions iPartialMailOptions; + }; + +inline CImImap4Settings::TImImap4SettingsExtension* CImImap4Settings::Extension() const + { + return iExtension; + } + +inline void CImImap4Settings::CheckExtensionExistsL() + { + if (!iExtension) + iExtension=new (ELeave) CImImap4Settings::TImImap4SettingsExtension; + } +inline CImImap4Settings::TImImap4SettingsExtension::TImImap4SettingsExtension() +: iLoginName(NULL) ,iPassword(NULL) ,iFolderPath(NULL),iSearchString(NULL),iTlsSslDomain(NULL), iSyncRate(KImapDefaultInboxSyncRate), iImapIdleTimeout(KImapDefaultIdleTimeout), iFetchSizeBytes(KImapDefaultFetchSizeBytes), + iPartialMailOptions(ENoSizeLimits),iBodyTextSizeLimit(KMaxTInt),iAttachmentSizeLimit(KMaxTInt) + { + } + + +#endif // __IMAPSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/imcmmain.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/imcmmain.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ + +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @release +*/ + +#if !defined (__IMCMMAIN_H__) +#define __IMCMMAIN_H__ + +#if !defined (__E32STD_H__) +#include +#endif + +#if !defined (__BARSC_H__) +#include // RResourceFile +#endif + + +GLREF_C void OpenResourceFileL(RResourceFile& aFile, RFs& anFs); +GLDEF_C void CloseResourceFile( TAny* aResourceFile ); + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/imcvcodc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/imcvcodc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,360 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__IMCVCODC_H__) +#define __IMCVCODC_H__ + +#include +#include +#include +#include +#include +#include +#include // CMsgActive + +#include +#include +#include + +#define KBase64 _L("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=") +#define KCharFormat _L("%c") + + // Maximum length allowed for an 'encoded-word' rfc2047 +const TInt KEncodedWordMaxLength = 75; + +// All encoding information except data and charset name length. =?B?=? => 7 +const TInt KMaxEncodedInformationLength = 7; + +// Length of the field name, eg "Subject: ". This may change as other fields are processed. +const TInt KMaxHeaderFieldNameLength = 12; + +const TInt KImCvFinished=(-1); +const TInt KImCvAdvance=(1); + + +// error states involved in sending attachments etc. +/** +@internalComponent +@deprecated +*/ +enum TIattErrorCode + { + KImAttNoError = 0, + KImAttFinished = 1 + }; + + +/** +@internalComponent +@released +*/ +enum TImBodyConvAlgorithm + { + ENoAlgorithm, + EQPEncode, + EQPDecode, + EBase64Encode, + EBase64Decode, + EUUEncode, + EUUDecode + }; + +// Used in CImSendConvert +/** +@internalComponent +@deprecated +*/ +enum TImSendEncoding + { + ESendNoAlgorithm, + ESendMimeAlgorithm + }; + +struct SAttachmentInfo +/** +@internalComponent +@released +*/ + { + TInt iSize; + TFileName iName; + TFileName iPath; + TBool iComplete; + }; + +// Shared implementation code +//---------------------------------------------------------------------------------------- +class TImCodec +//---------------------------------------------------------------------------------------- +/** +@internalAll +@released +*/ + { +protected: + // base64 and UU coding defines. + enum EMaskValues{ ESixBitMask = 0x3F, EEightBitMask = 0xFF }; + enum EMaskShiftValues{ ESix = 6, EFour = 4, ETwo = 2, EZero = 0 }; + +public: + virtual TInt Encode( const TDesC8& aSrcString, TDes8& rDestString)=0 ; + virtual TBool Decode( const TDesC8& aInputLine, TDes8& rOutputLine)=0; + +protected: + // TImCodec(); + inline TBool IsDigit( TChar aChar ); + }; + + +// Interface for sending file data. +//---------------------------------------------------------------------------------------- +class TImFileCodec : public TImCodec +//---------------------------------------------------------------------------------------- +/** +@internalAll +@released +*/ + { +public: + virtual TInt PrefixNextLineL( TDes8& rOutputLine, const TFileName& aName, TInt& rPaddingCount ); + virtual TInt PostfixNextLine( TDes8& rOutputLine, TInt& rPaddingCount ); + virtual void Initialise(); + +protected: + TInt iPrefixState; + TInt iPostfixState; + }; + +// Dummy, just copies +//---------------------------------------------------------------------------------------- +class TImCodecNull : public TImFileCodec +//---------------------------------------------------------------------------------------- +/** +@internalComponent +@released +*/ + { +public: + TInt Encode( const TDesC8& aSrcString, TDes8& rDestString); + TBool Decode( const TDesC8& aInputLine, TDes8& rOutputLine); + }; + +// Quoted-printable encoding/decoding + +//---------------------------------------------------------------------------------------- +class TImCodecQP : public TImFileCodec +//---------------------------------------------------------------------------------------- +/** +@internalAll +@released +*/ + { +public: + IMPORT_C TImCodecQP(); + IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString); + IMPORT_C TBool Decode( const TDesC8& aInputLine, TDes8& rOutputLine); + + // Not to be used anymore.. + IMPORT_C TInt EncodeRichText( const TDesC8& aInputLine, TDes8& rOutputLine); + IMPORT_C TInt DecodeRichText( const TDesC8& aSrcString, TDes& rDestString ); + + // Functions which allow flexiblity. Can replace the '=' char or add characters.. + // to what is defined as 'plain. + inline void AddPlainChar(const TDesC8& aCharList ); + inline void AddEncodeChar(const TDesC8& aCharList ); + inline void SetQPChar( TUint8 aChar); + + inline TUint8 ReplacementChar( TChar aControlChar ); + inline TBool IsPlain( TChar aChar ); + +private: + TBool SmartBreak( TInt written, const TDesC8& pSource ); + inline TBool IsBreakable( TChar aChar); + inline void AddSoftLineBreak(TDes8& aPtr, TInt& aPadding, TInt& aWritten); + inline void AddSoftLineBreak(const TUint8* apEnd, TUint8* aPtr, TInt& aPadding, TInt& aWritten); + +private: + TUint8 iQPCharacter; + TPtrC8 iPlainCharList; + TPtrC8 iEncodeCharList; + + TInt iPaddingCount; + }; + + + +// Base64 coding/decoding + +//---------------------------------------------------------------------------------------- +class TImCodecB64 : public TImFileCodec +//---------------------------------------------------------------------------------------- +/** +@publishedAll +@released +*/ + { +private: + // base64 coding defines + enum{ EPadChar = 64 }; + +public: + IMPORT_C TImCodecB64(); + IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString); + IMPORT_C TBool Decode( const TDesC8& aSrcString, TDes8& rDestString); + IMPORT_C void Initialise(); + +protected: + TInt DoEncode(const TDesC8& aSrcString, TDes8& rDestString, TBool aInsertLineBreaks); + +private: + TInt iShiftStored; + TInt iMaskShiftStored; + }; + +class TImCodecB64WithLineBreaks : public TImCodecB64 +/** +@internalComponent +@released +*/ + { +public: + TInt Encode(const TDesC8& aSrcString, TDes8& rDestString); + }; + + +// UU coding/decoding + +//---------------------------------------------------------------------------------------- +class TImCodecUU : public TImFileCodec +//---------------------------------------------------------------------------------------- +/** +@publishedAll +@released +*/ + { +private: + // UU coding defines + + enum{ ESpace = 32, EBackQuote = 96 }; + + enum TImBodyPostfix + { + EInvertedComma = 0, + EEndString, + EEndOfPostfix + }; + +public: + IMPORT_C TImCodecUU(); + IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString ); + IMPORT_C TBool Decode( const TDesC8& aSrcString, TDes8& rDestString ); + TInt PrefixNextLineL( TDes8& rOutputLine, const TFileName& aName, TInt& rPaddingCount ); + TInt PostfixNextLine( TDes8& rOutputLine, TInt& rPaddingCount ); +private: + void AppendFilenameL( TDes8& rOutputLine, const TFileName& aName ); + + }; + + + + +// For converting a text string to/from encoded form +// Note: 'Word' here has special meaning derived from the one defined in rfc2047. +// It refers to one encoding instance. + +//---------------------------------------------------------------------------------------- +class CImConvertHeader : public CBase +//---------------------------------------------------------------------------------------- +/** +@internalTechnology +@released +*/ + { +public: + IMPORT_C static CImConvertHeader* NewL(CImConvertCharconv& aConverter); + ~CImConvertHeader(); + + IMPORT_C void SetMessageType(TBool aIsMIME); + IMPORT_C void DecodeAllHeaderFieldsL(CImHeader& rHeader); + + // Functions for decoding & converting descriptors + + IMPORT_C void DecodeNonMIMEHeaderFieldL(const TDesC8& aBufIn, TDes& aBufOut); + IMPORT_C void DecodeHeaderFieldL(const TDesC8& aBufIn, TDes& aBufOut); + IMPORT_C void DecodeHeaderFieldL(const TDesC16& aBufIn, TDes& aBufOut); + IMPORT_C void ConvertHeaderFieldL(const TDesC16& aBufIn, RBuf8& aBufOut, TBool aIsAddressField); + + // Header needed for retrieving encoding information, used in Send code. + IMPORT_C void EncodeHeaderFieldL(const TDesC& aBufIn, RBuf8& aBufOut, + CArrayFix* aInfoArray, TInt aState, TInt aArrayVal = 0); + + IMPORT_C void EncodeHeaderFieldL(const TDesC& aBufIn, RBuf8& aBufOut, + const TUint aCharset, const TImHeaderEncodingInfo::TEncodingType aType, TBool aIsAddressField); + + IMPORT_C TBool FindEncodedWord(TPtrC8& aData, TInt& aInit,TInt& rStart, TInt& rEnd); + + void Append(TDes& aBuffer, const TDesC8& aAddition); + inline CImConvertCharconv& CharConv(); + + IMPORT_C TUint OverrideCharset() const; + IMPORT_C void SetOverrideCharset(TUint aCharset); + +private: + void ConstructL(); + CImConvertHeader(CImConvertCharconv&); + // Functions dealing only with single 'encoded-word's + void GetCharsetAndEncodeDataL(const TDesC& aBufIn, RBuf8& aBufOut, TImHeaderEncodingInfo& aInfo); + void EncodeWordL(const TDesC& aBufIn, RBuf8& aBufOut, TImHeaderEncodingInfo& aInfo, + const TDesC8& aCharsetName, RBuf8& aEncodedWord); + + TBool DecodeWordL(const TDesC8& aBufIn, TDes& aBufOut, TInt rRemainder); + void DecodeRecipientListL( CDesCArray& aArray); + void DecodeFieldL(const TDesC& aField); + + TBool DoCharsetConversionL(const TDesC& aDataToConvert, RBuf8& aEncodedWord); + + void DoEncodingL(RBuf8& aEncodedWord, TImHeaderEncodingInfo& aInfo); + + TInt AddEncodedWordInfoL(const TDesC8& aEncodedWord, RBuf8& aBufOut, + TImHeaderEncodingInfo& aInfo, const TDesC8& aCharsetName); + + TBool IsAscii( TUint aChar ) const; + TBool ExtractTextToEncode(const TDesC& aBufIn, TInt& rStart, TInt& rEnd, TBool aIsAddressField); + void Insert(TDes8& aBuffer, const TDesC16& aInsert); + +private: + TImHeaderEncodingInfo iEncodingInfo; + CImConvertCharconv& iCharConv; + + // Get access to QP/ Base64 encoding/decoding functions + TImCodecB64 iB64Codec; + TImCodecQP iQPCodec; + + // Need in the narrow build, to check if possible to convert to/from + // the machines character set. + TUint iCharacterSetId; + + CImHeader* iHeader; + + // Converted static variables used in EncodeWordL() + TBool isMIMEMessageHeader; + TUint iOverrideCharset; + }; + + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/impcmtm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/impcmtm.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,416 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Client MTM for the IMAP4 protocol +// +// + + +#if !defined (__IMPCMTM_H__) +#define __IMPCMTM_H__ + +#if !defined (__MTCLBASE_H_) +#include +#endif + +#if !defined (__MIUTHDR_H_) +#include +#endif + +#if !defined (__MIUTPARS_H__) +#include //TImMessageField +#endif + +#if !defined (__IMAPSET_H__) +#include +#endif + +#if !defined (__IMAPCMDS_H__) +#include +#endif + +#if !defined(__OFFOP_H__) +#include +#endif + +#if !defined(__MIUTMSG_H__) +#include +#endif + + + +// Forward declarations. +class CImap4ClientSessionObserver; +class CImImap4GetMail; +class CImEmailAutoSend; + +///////////////////////////////////////////////////////////////////////////// +// Imap4 Client MTM +class CImap4ClientMtm : public CBaseMtm, public MImUndoOffLineOperation + +/** IMAP4 client MTM interface, providing access to the email services using the IMAP4 +protocol. + +The class provides support for: + +- connecting to remote IMAP4 mail servers +- synchronising message headers with mailboxes on these servers +- getting message bodies and attachments +- copying and moving messages +- creating messages that forward or reply to IMAP4 messages +- server notification of new messages using IMAP IDLE +- queueing operations requested when there is no connection to a mail server, to be +performed when a connection is made (offline operations). + +Note that CImap4ClientMtm does not support many of the generic functions defined by +the @c CBaseMtm base class. In particular: + +- Message address information, body, subjects, and attachments are not manipulated +through CImap4ClientMtm. Consequently, SaveMessageL() has an empty +implementation, and is not used. Message access and manipulation is instead done +through CImEmailMessage, which understands the email specific message formats, +including MHTML (RFC 2557). The RFC 822 email header, which includes subject and +address information, is encapsulated in a CImHeader object, which can be obtained from +a CImEmailMessage object. IMAP also has its own specific flags, such as draft, +answered, and deleted: this can be accessed through TMsvEmailEntry, which extends the +message server's generic TMsvEntry to add email-specific information. + +- The idea of a default service used by base class functions DefaultServiceL(), +ChangeDefaultServiceL(), and RemoveDefaultServiceL() is not supported. + +IMAP specific commands are issued through the InvokeAsyncFunctionL() function, with +the commands defined in the #TImap4Cmds enumeration. Details of particular commands +are given in the documentation for that enumeration, but the following describes some of +the key concepts required to use those commands. Note that usually these commands do +not correspond directly to the IMAP protocol commands described in RFC 3501. Instead, +they are at a higher level, to simplify the logic required for an email client program. + +-------------------------------------- + +Connection and services + +Settings for connection to and use of an IMAP4 mail server and its mailboxes are +encapsulated in an CImImap4Settings object, created and accessed through +CEmailAccounts. Preferences for the network connection (e.g. the ISP to use) to be made +to access an IMAP server are also accessed through CEmailAccounts. + +The settings are associated with a service-type entry in the Message Server's message +store. Message and folder type entries under the service entry store a local copy of the +mailboxes and messages that are present on an IMAP server. For this reason, the service +is sometimes referred to as the local mirror of an IMAP server. + +By default, it is assumed that the user has a primary mailbox on the server called INBOX, +though this can be changed if necessary using CImImap4Settings::SetFolderPathL(). (To +avoid confusion, the term "Inbox" used in the IMAP MTM documentation refers to this +mailbox, rather than the Message Server's standard local Inbox folder.) + +The settings store the user's log-in details required to access the IMAP server, and other +settings not related to connection, but which affect the behaviour of commands, such as +synchronisation, made to the service. + +-------------------------------------- + +Synchronisation + +The IMAP4 MTM provides the means to synchronise message headers on a remote +IMAP mailboxes with the messages headers on the phone. Note that synchronisation only +refers to message headers. Once headers are synchronised, populate operations (i.e. +getting the message bodies) can be done. + +The basic steps involved in a full synchronisation are: + +- The headers of messages in the Inbox are synchronised. +- The local list of folders is synchronised with those existing on the remote IMAP service. +Depending on the service settings, the local or remote settings of subscribed mailboxes +may be updated (see below for more information). +- The headers of messages in subscribed folders are synchronised. + +Queued offline operations (see below) pending on the Inbox or subscribed folders are +performed prior to the relevant folder being synchronised. + +Synchronisations can be performed in the background or the foreground. A foreground +synchronisation means no other requests, such as message fetching, can be made to the +MTM, until the synchronisation is complete. A background synchronisation allows some +types of command to be given while it is in progress. Commands that write to the remote +server are not allowed however while a background synchronisation is in progress. A +client is informed of the state of a background synchronisation through the +MMsvImapConnectionObserver callback interface. + +Synchronisations commands are made through +CImap4ClientMtm::InvokeAsyncFunctionL(). There a variety of commands available +that give different options for compounding synchronisation +with other commands, such as connection, and synchronising only particular folders. See +TImap4Cmds for details. Progress information for synchronisation commands can be +obtained from the CMsvOperation object returned by the InvokeAsyncFunctionL(). +Synchronisation progress information is encapsulated in a TImap4SyncProgress object. + +Settings that affect how a synchronisation is performed include: + +- Subscriptions: when an IMAP service had been synchronised, the Messaging server will +contain entries for all folders on the remote server. These entries will be marked invisible +within the TMsvEntry for the folder, implying that they should be invisible to the user. +Messages in these folders are not synchronised unless the folder has been subscribed to. +Note a folder subscription can be set either locally (i.e. just on the phone), using +the #KIMAP4MTMLocalSubscribe command, or remotely (on the server), possibly through email +clients on other devices. A service can be set to synchronise folders using either or both +of these types of subscription (CImImap4Settings::SetSynchronise()). Local and remote +subscriptions can themselves be synchronised in various ways (CImImap4Settings::SetSuscribe()). + +- Filters: a filter prevents certain e-mail messages from being synchronised onto the +device when a client requests a synchronisation. Filters can include anything permitted by +the IMAP Search command, including date, size, content, and message flags. + +- Limits: service settings can limit the number of emails synchronised to the inbox +(CImImap4Settings::SetInboxSynchronisationLimit()), and to other folders +(CImImap4Settings::SetMailboxSynchronisationLimit()). + +- Sync rate: one of the synchronisation commands +(KIMAP4MTMConnectAndSyncCompleteAfterDisconnect) periodically resynchronises +the Inbox until the service is disconnected. CImImap4Settings::SyncRate() sets the +refresh period. + +-------------------------------------- + +Getting and copying messages + +After messages headers have been synchronised, message bodies and attachments can be +fetched from the remote email server. Getting message parts and saving them in the +mirror service is calling populating them. + +Commands for these actions can be made through +CImap4ClientMtm::InvokeAsyncFunctionL(). There are a large number of commands, +for different combinations of these options: + +- action type: whether to just populate messages, or to also copy or move them to a local +folder +- message selection: whether to get all, new, or selected messages +- connection: whether to make a new connection or assume an existing connection +- disconnect: whether to disconnect or stay online after operation is complete + +For the populate type commands, further options can be set that control the message +getting behaviour. Basic options control, encapsulated in TImImap4GetMailInfo, specify +whether body text and/or attachments are fetched, and a maximum message size. There +are also options, encapsulated in TImImap4GetPartialMailInfo, that allow size limits to +be separately specified for body text and/or attachments. If the the body is larger than the +limit, then the body is partially downloaded up to the limit. Only attachments smaller +than the specified size are downloaded. A partially downloaded message can later be +fully downloaded. + +For the copy or move type commands, a TImImap4GetMailInfo parameter is supplied, in +order to specify the destination folder for the messages, and a maximum message size. + +Progress information for getting commands can be obtained from the CMsvOperation +object returned by the InvokeAsyncFunctionL(). Progress information is encapsulated in +a TImap4GenericProgress object. + +Fetching and then copying or moving specified messages can also be performed by using +the standard Messaging Framework @c CMsvEntry::CopyL() and @c +CMsvEntry::MoveL() functions on entries under the remote service. If these functions are +used, then the entire message is fetched without size limits. + +CMsvEntry functions can also be used to: + +- create a folder on a remote server +- delete messages +- copy or move messages from a local folder into a remote folder +- copy or move messages between remote folders + +Note that changing an existing entry through CMsvEntry is not supported. An MTM- +specific command #KIMAP4MTMRenameFolder is instead provided to rename a remote +folder. + +The page "CMsvEntry functions for IMAP4 message entries", linked to in the "See also" +section below, provides more details on using CMsvEntry. + +-------------------------------------- + +Offline operations + +Some operations can only be performed while online, while other commands may +be stored while offline for processing when next connected. An attempt to perform a +command while offline that requires the MTM to be connected results in immediate +completion with the error code KErrDisconnected. + +Permitted offline operations include: + +- copy +- move +- delete + +Queued offline operations are usually performed when a connection is made, prior to the +relevant folder being synchronised. Delete operations can alternatively be set to be done +on disconnection using the service setting +CImImap4Settings::SetDeleteEmailsWhenDisconnecting(). + +Note that: +- Offline operations are only permitted if the service setting SetDisconnectedUserMode() +is true. +- It is possible to undo pending offline operations using the commands +#KIMAP4MTMCancelOffLineOperations and #KIMAP4MTMUndeleteAll. + +-------------------------------------- + +IMAP IDLE support + +IMAP IDLE (RFC 2177) is an optional expansion of the IMAP email accessing protocol +that allows the server to send updates to the client that messages have been created or +deleted in real time. The IDLE command is sent from the client to the server when the +client is ready to accept unsolicited mailbox update messages. Whether the client requests +the server to provide IDLE support is set in the CImImap4Settings::SetImapIdle() service +setting. When the IMAP MTM receives such a notification, it synchronises the changed +folder. Email clients can be notified of such changes by setting a MMsvEntryObserver +observer on a folder. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CImap4ClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession); + + ~CImap4ClientMtm(); + void HandleEntryEvent(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + void StoreL(); // uses a CMsvStore from the Session + void RestoreL(); + CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); + CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); + TUint ValidateMessage(TUint aPartList); + TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); + void SaveMessageL(); + void LoadMessageL(); + IMPORT_C void StoreSettingsL(); // uses a CMsvStore from the session + IMPORT_C void RestoreSettingsL(); + + // --- RTTI functions --- + TInt QueryCapability(TUid aCapability, TInt& aResponse); + void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); + CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); + // Addressees have no meaning in the text mtm. + void AddAddresseeL(const TDesC& aRealAddress); + void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); + void RemoveAddressee(TInt aIndex); + + // Attachment functions to support the SendAs API + + IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); + IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C void CreateMessageL(TMsvId aServiceId); + + IMPORT_C virtual TMsvId DefaultServiceL() const; + IMPORT_C virtual void RemoveDefaultServiceL(); + IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); + +public: // Returning a list of all the offline operations for a service entry. + IMPORT_C CImOperationQueueList* QueueListL(CMsvEntry& aServiceEntry); +public: // Wrapper to settings + IMPORT_C const CImImap4Settings& Imap4Settings() const; + IMPORT_C void SetImap4SettingsL(const CImImap4Settings& aSettings); +public: // inherited from MUndoOffLine + virtual void UndoOffLineChangesL(const CImOffLineOperation& aDeleted, TMsvId aFolderId); +protected: + CImap4ClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession); + void ConstructL(); + void ContextEntrySwitched(); // called after the context of this instance has been changed to another entry + +private: + TBool ValidateAddress(const TPtrC& anAddress); + void SendOnNextConnectionL(); + TMsvPartList DoFindL(const TDesC& aTextToFind, TMsvPartList aPartList); + void FilterAllOrNewMailsL(TInt aFunctionId,const CMsvEntrySelection& aSelection,TDes8& aParameter); + void FilterMailSelectionL(const CMsvEntrySelection& aSelection,TDes8& aParameter); + CMsvOperation* CopyMoveOrPopulateL(TInt aFunctionId,TDes8& aParameter,TRequestStatus& aCompletionStatus); + void ConvertToPartialPopulate(TDes8& aParameter); + // To check whether a partial fetch or full fetch of message has to be done. + TBool IsPartialPopulate(TDes8& aParameter); + +private: + CImImap4Settings iImImap4Settings; + TImMessageField iTImMessageField; + CImap4ClientSessionObserver* iImap4ClientSessionObserver; + HBufC* iEmailAddressFormatString; // defines format of email address used by "Send as" API eg _L("/"%S/" <%S>") + CImHeader* iHeader; + CMsvEntrySelection* iMsvEntrySelection; + CImImap4GetMail* iImIMAP4GetMail; + CImEmailOperation* iImEmailOperation; + TPckgBuf iImap4GetPartialMailInfo; + }; + +class CImImap4GetMail : public CMsvOperation +/** Encapsulates an operation to copy, move, and populate (i.e. download the full +message body) IMAP4 emails from the remote inbox to any local folder. + +Note that the same operations are available by calling CImap4ClientMtm::InvokeAsyncFunctionL() +with a suitable command. + +@publishedAll +@released +*/ + { +public: + IMPORT_C CMsvOperation* GetMailL(TInt aFunctionId, CImap4ClientMtm& aImap4ClientMtm, const CMsvEntrySelection& aMsvEntrySelection, TDes8& aImap4GetMailInfo, TRequestStatus& aObserverRequestStatus); + ~CImImap4GetMail(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); + const TDesC8& FinalProgress(); +private: + CImImap4GetMail(CMsvSession& aMsvSession, CImap4ClientMtm& aImap4ClientMtm, TRequestStatus& aObserverRequestStatus); + void ConstructL(TInt aFunctionId, const CMsvEntrySelection& aMsvEntrySelection, TDes8& aImap4GetMailInfo); + void SelectNextStateL(); // selects next state to go to + void ChangeStateL(); // initiates the next state operation + void SelectAndChangeToNextStateL(); + void RequestComplete(TInt aError); + void Complete(); + void ConnectToMailboxL(); + void CopyMoveNewMessagesL(TBool aCopy); + void CopyMoveMessageSelectionL(TBool aCopy); + void CopyMoveAllMessagesL(TBool aCopy); + void PopulateNewMessagesL(); + void PopulateAllMessagesL(); + void PopulateMessageSelectionL(); + void DisconnectFromMailboxL(); + void ResetProgress(); + void StoreProgressL(); +private: + enum TImImap4GetMailState + { + EConnectToMailbox, + ECopyNewMessages, + EMoveNewMessages, + EPopulateNewMessages, + ECopyMessageSelection, + EMoveMessageSelection, + EPopulateMessageSelection, + ECopyAllMessages, + EMoveAllMessages, + EPopulateAllMessages, + EDisconnectFromMailbox, + EFinished + }; + + CImap4ClientMtm& iImap4ClientMtm; + CMsvEntrySelection* iMsvEntrySelection; + CMsvOperation* iMsvOperation; + + TImap4GenericProgress iProgress; + TImap4GenericProgress iErrorProgress; + TImImap4GetMailState iState; + TInt iCommand; + TPckgBuf iProgressBuf; + TPckgBuf iImap4GetPartialMailInfo; + }; + +#endif // __IMPCMTM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/imsk.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/imsk.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,605 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This file contains the API definition for the class CImTextServerSession. +// This class creates sockets and is responsible for transmitting data between client and the server +// +// + + + +/** + @file +*/ + + +#ifndef __IMSK_H__ +#define __IMSK_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef _DEBUG +#define __IMSK_SIMULATION +#endif + +// Enable Scripting in Debug Builds only +#ifdef _DEBUG +#define __IMSK_SCRIPTING +#endif + +const TInt EActivePriorityHigh = 1; +const TInt KCarriageLineFeedLength=2; +/** Max numeric IP address len = "0:0:0:0:0:0:194.217.242.23" = 45 chars */ +const TInt KImskIPAddressLen=45; // Max numeric IP address len = "255.255.255.255" = 15 chars + +/** Maximum buffer size of the received data +@internalTechnology +@released +*/ +typedef TBuf8 TImMailBuffer; + +/** received buffer data line type +@internalTechnology +@released +*/ +enum TImLineType + { + ECRLFTerminated, + EBufferTooSmall, + EReceiveBufferFull, + EReceiveBufferEmpty + }; + + +class CImLog; +class CImTextServerScript; +class CImIAPPreferences; +class CImConnect; +class CSecureSocket; +class CImSocketIdleTimer; + +/** +Creates/opens socket and sends and receives data. + +@publishedAll +@released +*/ +class CImTextServerSession : public CMsgActive + { +public: + enum TImOperationMode{ + EImServerMode, + EImClientMode + }; + +/** + //cat Construction + @fn NewL() + Intended Usage : Static factory constructor. Uses two phase construction and + leaves nothing on the CleanupStack. + @since 6.0 + @leave KErrNoMemory. + @return A pointer to the newly created CImTextServerSession object. + @pre None + @post A fully constructed and initialised CImTextServerSession object. + + */ + IMPORT_C static CImTextServerSession *NewL(); + + /** + @internalTechnology + @released + */ + IMPORT_C static CImTextServerSession* NewL(RSocketServ& aSocketServ, CImConnect& aConnect); + +/** + //cat Construction + @fn NewL(TInt aSendIdleTime, TInt aReceiveIdleTime) + Intended Usage : Static factory constructor. Uses two phase construction and + leaves nothing on the CleanupStack. + @since 7.0s + @param aSendIdleTime is the time for which the idle timer runs (for a send) + @param aReceiveIdleTime is the time for which the idle timer runs (for a recieve) + @leave KErrNoMemory. + @return A pointer to the newly created CImTextServerSession object. + @pre None + @post A fully constructed and initialised CImTextServerSession object. + */ + IMPORT_C static CImTextServerSession* NewL(TInt aSendIdleTime, TInt aReceiveIdleTime); + + /** + @internalTechnology + @released + */ + IMPORT_C static CImTextServerSession* NewL(TInt aSendIdleTime, TInt aReceiveIdleTime, RSocketServ& aSocketServ, CImConnect& aConnect); + +/** + //cat Destruction + @fn ~CImTextServerSession() + Intended Usage : Destructor. + @since 6.0 + */ + ~CImTextServerSession(); + +/** + @fn QueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue) + Intended Usage : Queue a connect assuming the socket is successfully opened. + Error Condition : KErrNoMemory + @since 6.0 + @param aStatus Asynchronous completion status + @param anAddressDesc is the IP address + @param aIAPPreferences is the IAP connection preference to be used + @param aPortNum is the port number eg. 143, 25, 110. + @param aEnableTimeout Not used + @pre None + @post connection is ready to send and receive data. + */ + IMPORT_C void QueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue); + + IMPORT_C void QueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, const TDesC8& aSSLDomainName); + +/** + @fn SSLQueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue) + Intended Usage : Queue a wrapped SSL connect on an socket assuming the socket is successfully opened. + Error Condition : KErrNoMemory, EImskSocketOpen + @since 7.0s + @param aStatus Asynchronous completion status + @param anAddressDesc is the IP address + @param aIAPPreferences is the IAP connection preference to be used + @param aPortNum is the port number eg. 993, 465, 995. + @param aEnableTimeout Not used + @pre None + @post connection is ready to send and receive data. + */ + IMPORT_C void SSLQueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue); + + IMPORT_C void SSLQueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, const TDesC8& aSSLDomainName); + +/** + @fn Disconnect() + Intended Usage : To disconnect and close socket connection. + Error Condition : None + @since 6.0 + @pre None + @post connection is closed. + */ + IMPORT_C void Disconnect(); + IMPORT_C void Disconnect(TRequestStatus &aStatus); + void TimeOut(); + + + IMPORT_C const TDesC& LocalName(); +/** + This method should be called before Send/SendQueueReceive() + TLS command is sent. + @fn SetSSLTLSResponseL(const TDesC8& aDesc) + Intended Usage : To use for secure connection. + Error Condition : KErrNoMemory + @since 6.2 + @param aDesc is the positive response the MTM expects from the connected + server for TLS command. e.g. OK, +OK, 220 etc.. + @pre aDesc cannot be zero length + @leave EImskNoTLSResponseString + @post iTLSResponse is filled with aDesc contents + + */ + IMPORT_C void SetSSLTLSResponseL(const TDesC8& aDesc); + +/** + @fn Send(TRequestStatus &aStatus, const TDesC8& aDesc) + Intended Usage : To send data. + Error Condition : None + @since 6.0 + @param aStatus Asynchronous completion status + @param aDesc is the aData to be sent + @post None + + */ + + //sends + IMPORT_C void Send(TRequestStatus &aStatus, const TDesC8& aDesc); + IMPORT_C void SendWithTimeout(TRequestStatus& aStatus, TInt aIdleTime, const TDesC8& aDesc); + IMPORT_C void SendQueueReceiveWithTimeout(TRequestStatus& aStatus, TInt aIdleTime, const TDesC8& aDesc); + IMPORT_C void Send(TRequestStatus &aStatus, TRefByValue aFmt,...); +/** + @fn SendQueueReceive(TRequestStatus &aStatus, const TDesC8& aDesc) + Intended Usage : To send data and queue a receive. + Error Condition : None + @since 6.0 + @param aStatus Asynchronous completion status + @param aDesc is the aData to be sent + @post Sends the data and queues a receive. + GetCurrentTextLine should be called after this method to read received data + */ + IMPORT_C void SendQueueReceive(TRequestStatus &aStatus, const TDesC8& aDesc); + IMPORT_C void SendQueueReceive(TRequestStatus &aStatus, TRefByValue aFmt,...); + + //receives +/** + Returns first full line of data received from socket to user + @fn GetCurrentTextLine(TDes8& aDesc) + Intended Usage : To return received data. + Error Condition : None + @since 6.0 + @param aDesc will be filled with received buffer + @post returns the received buffer in the form of aDesc + @return EReceiveBufferEmpty when received data is empty + EBufferTooSmall when aDesc length is smaller than received data + ECRLFTerminated when received data is complete (full line) + EReceiveBufferFull when received data length is more than aDesc length + GetCurrentTextLine should be called after Send methods + */ + IMPORT_C TImLineType GetCurrentTextLine(TDes8& aDesc); +/** + User queues a new request from the socket (unless there's a full line of data in buffer + then signal user and there's no need to make a receive request) + @fn QueueReceiveNextTextLine(TRequestStatus &aStatus) + Intended Usage : User queues a new request from the socket. + Error Condition : None + @since 6.0 + @param aStatus for asynchronous request + + */ + IMPORT_C void QueueReceiveNextTextLine(TRequestStatus &aStatus); +/** + @fn ReceiveBinaryData(TRequestStatus &aStatus, TDes8& aDes,TInt aLen) + Intended Usage : Users queue a request for received data + Error Condition : None + @since 6.0 + @param aStatus Asynchronous completion status + @param aDes is the aData to be received + @param aLen is the length of the data the user wants to read + @post aDes will be filled with received data of aLen. + ReceiveBinaryData should be called after Send. + */ + IMPORT_C void ReceiveBinaryData(TRequestStatus &aStatus, TDes8& aDes,TInt aLen); + + IMPORT_C void LogText(const TDesC8& aString); // write string into log file + IMPORT_C void LogError(const TDesC8& aString,const TInt aError); // write string and integer into log file + +/** + @fn GetIAPValue(TUint32 &aIAP) + Intended Usage : Returns the IAP we are connecting/connected with in aIAP or returns an error code + @since 6.0 + @param aIAP will be the current IAP + @post aIAP will be filled with current IAP connected. + @return will return genconn errors if any + */ + + IMPORT_C TInt GetIAPValue(TUint32 &aIAP); +/** + @fn GetRConnectionName(TName &aName) + Intended Usage : Returns the name of the RConnection. + @since 9.1 + @param aName Buffer in which the name is returned. + @post aName will be filled with current name of the RConnection. + @return KErrNone if successful, or another of the system-wide error codes. + */ + + IMPORT_C TInt GetRConnectionName(TName &aName); + +/** Returns the bearer type we are connected to with in aBearer or returns an error code */ + IMPORT_C TInt GetIAPBearer(TUint32 &aBearer); + +/** + @internalTechnology + + @fn GetLastSocketActivityTimeout(TUint32& aTimeout) + Intended Usage : Returns the last socket activity timeout value + @since 9.1 + @param aTimeout is a return argument containing the timeout if it was found + @post aTimeout will be filled with the timeout value + @return Returns KErrNone, KErrNotFound or KErrBadHandle + */ + IMPORT_C TInt GetLastSocketActivityTimeout(TUint32& aTimeout); + +/** + @fn GetSocketServ() + Intended Usage : Returns the Socket Server + @since 8.0 + @return Socket Server + */ + RSocketServ& GetSocketServ(); + +/** + @fn GetConnectionStage() + Intended Usage : Gets the stage of the connection process obtained from RConnection + @since 7.0s + @return The current connection stage from RConnection or a system-wide error code. + + */ + IMPORT_C TInt GetConnectionStage(); + +/** + @fn SocketIdle() + Intended Usage : disconnects the socket and notifies the observer when the socket has been idle + for some time + @since 7.0s + */ + void SocketIdle(); + +/** + @fn SetPrimaryTextServerSession(CImTextServerSession& aPrimaryTextServerSession) + Intended Usage : Users set only on the secondary session + @since 9.2 + @param aPrimaryTextServerSession is PrimarySession's TextServerSession + @pre None + @post Going to be use on the secondary session +*/ + IMPORT_C void SetPrimaryTextServerSession(CImTextServerSession* aPrimaryTextServerSession); + +/** + @fn GetCImConnect() + Intended Usage : Returns the CImConnect object + @since 9.2 + @return CImConnect + @post Going to be use on the secondary session + */ + CImConnect* GetCImConnect(); + +// Depreciated functions - do not use. + IMPORT_C void QueueConnect(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, TBool aEnableTimeout = ETrue); + IMPORT_C void QueueConnect(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TInt aType, TBool aEnableTimeout = ETrue); + IMPORT_C void QueueConnect(TRequestStatus& aStatus,const TDesC& anAddressDesc, TInt aPortNum, TCallBack aDisconnectFunction,const TUint32 aIntraddress,TInt aType, TBool aEnableTimeout = ETrue); + IMPORT_C void QueueConnect(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum,const TUint32 aIAPaddress, TInt aType, TBool aEnableTimeout = ETrue); + IMPORT_C void QueueConnect(TRequestStatus& aStatus,const TDesC& anAddressDesc, TInt aPortNum, TCallBack aDisconnectFunction, TBool aEnableTimeout = ETrue); + IMPORT_C void QueueConnect(TRequestStatus& aStatus,const TDesC& anAddressDesc, TInt aPortNum, TCallBack aDisconnectFunction, const CImIAPPreferences& aIAPPreferences,TInt aType, TBool aEnableTimeout = ETrue); + IMPORT_C TInt Send(const TDesC8& aDesc); + IMPORT_C TInt Send(TRefByValue aFmt,...); + IMPORT_C TInt SendReceive(const TDesC8& aDesc); + IMPORT_C TInt Receive(TDes8& rDes); + IMPORT_C void Receive(TRequestStatus &aStatus, TDes8& rDes); + IMPORT_C static CImTextServerSession *NewLC (TImOperationMode aMode, RSocketServ &aServerServ); + IMPORT_C static CImTextServerSession *NewL(RSocketServ &aServerServ); + //Do not call SetSecurity. Call SetSSLTLSResponseL + IMPORT_C TInt SetSecurity(TBool aSecurityOn, TBool aUnattendedMode = FALSE); + IMPORT_C void PerformLogging(TBool aLogging); + +private: +/** + //cat Construction and Destruction + @fn CImTextServerSession() + Intended Usage : Constructor. First phase of two-phase construction method. Does + non-allocating construction. + @since 6.0 + + */ + CImTextServerSession(); + + CImTextServerSession(RSocketServ& aSocketServ, CImConnect& aConnect); +/** + //cat Construction + @fn CImTextServerSession(TInt aSendIdleTime, TInt aReceiveIdleTime) + Intended Usage : Constructor. First phase of two-phase construction method. Does + non-allocating construction. + @since 7.0s + @param aSendIdleTime is the time for which the idle timer runs (for a send) + @param aReceiveIdleTime is the time for which the idle timer runs (for a receive) + */ + CImTextServerSession(TInt aSendIdleTime, TInt aReceiveIdleTime); + + CImTextServerSession(TInt aSendIdleTime, TInt aReceiveIdleTime, RSocketServ& aSocketServ, CImConnect& aConnect); + +/** + //cat Construction and Destruction. + @fn ConstructL() + Intended Usage : Second phase of two-phase construction method. Does any + allocations required to fully construct the object. + @since 6.0 + @leave KErrNoMemory. + @pre First phase of construction is complete + @post The object is fully constructed and initialised. + */ + void ConstructL(); + + TInt Open(); + void Close(); + + void CreateLogFile(TInt aPortNum); + void OpenScriptFile(TInt aPortNum); + + void DoRunL(); + void DoComplete(TInt& aStatusValue); // Cleanup code + void DoCancel(); + + // these called from DoRunL; + void SocketConnect(); + void DoConnectedToSocketL(); + void DoQueueConnect(); + + void RealReceive(TDes8& aDesc); + void RealSend(const TDesC8& aDesc); +/** + @fn ParseSSLTLSResponseL() + Intended Usage : session will compare the response(for TLS command) + with the MTMs response + @since 6.2 + @leave KImskSSLTLSNegotiateFailed if the response doesn't match + @post CSecureSocket object is created + */ + void ParseSSLTLSResponseL(); + +/** + @fn CreateSecureSocketL() + Intended Usage : to use secure socket connection + @since 6.2 + @leave None + @post CSecureSocket object is created and iSecurityState is set to EImSecurityStateOn; + */ + void CreateSecureSocketL(); + +/** + @fn QueueGenericConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue) + Intended Usage : Queue a standard or wrapped SSL connect on an socket assuming the socket is successfully opened. Called by SSLQueueConnectL and QueueConnectL + Error Condition : KErrNoMemory, EImskSocketOpen + @since 7.0s + @param aStatus Asynchronous completion status + @param anAddressDesc is the IP address + @param aIAPPreferences is the IAP connection preference to be used + @param aPortNum is the port number eg. 143, 993 + @param aSSLDomainName SSL domain name to use for secure sockets + @pre None + @post connection is ready to send and receive data. + */ + void QueueGenericConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, const TDesC8& aSSLDomainName); + +#if defined(__IMSK_SIMULATION) + void ReadNextPeriod(); + TUint32 GetTokenValue(TInt aTokenLen, const TPtrC8& aBuffer); + TBool IsSuspended(); + TBool SuspendPeriodSet(); + void ResetSuspendPeriod(); + void SetAfterTimer(); + TInt ReadConfigNum(const TDesC& aName); +#endif + + enum TImSocketState + { + EImClosed, + EImResolve, + EImConnect, + EImSendReceive, + EImDialUsingOverride, + EImTLSHandShakeStarted, + EImSendReceiveTimedOut + }; + + enum TImSendReceiveState + { + EImInactive, + EImSending, + EImReceiving, + EImReceivingBinaryData, + EImSendingQueueReceive, + EImSuspended, //used when we are in a simulated GPRS suspend. + }; + + enum TImSecurityState + { + EImSecurityStateOff, + EImSecurityStateOn, + EImSecurityStateFailed + }; +private: + /** handle to the socket */ + RSocket iSocket; + /** handle to RSocketServ */ + RSocketServ iServ; + /** handle to Hostresolver */ + RHostResolver iHostResolver; + /** handle to secure socket for SSL/TLS connection */ + CSecureSocket* iSecureSocket; + + TUint32 iCurrentIAPcache; + /** Used to find if IAP is cached */ + TBool iIAPCached; // true if the above value can be used. + /** result of the host resolver */ + TNameEntry iHostent; + /** port number e.g. 25 for SMTP, 143 for IMAP and 110 for POP */ + TInt iPortNum; + /** server address */ + TPtrC iAddressDesc; + /** data returned by the socket */ + TImMailBuffer iReceive; + TSockXfrLength iLen; + TImSocketState iState; + TImSendReceiveState iSendReceive; + + HBufC8* iBuffer; + TImLineType iCurrentLineType; + + /** to log connection data */ + CImLog* iLog; + /** IP address name */ + TBuf iLocalName; + /** secure state i.e to use Secure socket */ + + TImSecurityState iSecurityState; + const CImIAPPreferences* iIAPPreferences; + + CImConnect* iConnect; + + TDes8* iReceiveData; // buffer we just recieved data into + + + HBufC8* iSentData; + /** response for different mail protocols like 220,+OK, OK, BAD */ + HBufC8* iTLSResponse; //response for different mail protocols like 220,+OK, OK, BAD + /** internal flag to read tls response */ + TBool iReadTLSResponse; + TBool iPerformLogging; + TBool iWrappedSocket; + + CImSocketIdleTimer* iSocketIdleTimer; + TTimeIntervalMicroSeconds32 iSendIdleTime; + TTimeIntervalMicroSeconds32 iReceiveIdleTime; + + /** A shorter idle timeout, used when a fast response is expected */ + TTimeIntervalMicroSeconds32 iSendShortIdleTime; + TTimeIntervalMicroSeconds32 iReceiveShortIdleTime; + + +#ifdef __IMSK_SCRIPTING + CImTextServerScript* iScript; +#endif + +#if defined(__IMSK_SIMULATION) + + RFs iFs; + + + TUint32 iScriptedIAP; // value to return for iap when scripting + TUint32 iBearerIAP; // value to return for bearer when scripting + + + TImSendReceiveState iSuspendedState; + + RTimer iSuspendTimer; + + RFile iGprsFile; + + TBool iGprsConfigExists; + + TInt iCfgFilePos; + + TTime iLastSuspend; // time last suspension took place + // in universal time + + TTimeIntervalSeconds iStart; // number of seconds since last delay + // before the following delay occurs. + // if 0 no suspend is required. + TTimeIntervalSeconds iDuration; // how long to delay. If 0 no suspend is + // required + TBool iRepeat; // repeat the above delay for an + // infinite period + + HBufC8* iSendData; // suspended data +#endif // __IMSK_SIMULATION + + CImTextServerSession* iPrimaryTextServerSession; //Only going to be set on the secondary session + + TBool iClientOwnsConnection; + + /** SSL domain name for secure sockets */ + HBufC8* iSSLDomainName; + TBool iSocketIdleTimeSet; // iSocketIdleTimeSet=ETrue, if smtp server did not responds within 10 seconds after sending "." + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/irmsgtypeuid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/irmsgtypeuid.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// $Workfile: irmsgtypeuid.h $ +// $Author: Stevep $ +// $Revision: 4 $ +// $Date: 4/12/01 9:45 $ +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#if !defined (__IRMSGTYPEUID_H__) +#define __IRMSGTYPEUID_H__ + +const TInt32 KUidMsgTypeIrTInt32 = 0x100053A4; +// This is defined in irobutil.h, which we don't control. +// const TUid KUidMsgTypeIr = {KUidMsgTypeIrTInt32}; + +const TInt32 KUidMsgTypeIr = 0x100053A4; + +const TUid KUidMsgTypeIrUID = {KUidMsgTypeIr}; // we will revert this when we persuade PAN to make the other one a real TUid. + +#endif // __IRMSGTYPEUID_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/irmtmcmds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/irmtmcmds.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,34 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// $Workfile: irmtmcmds.h $ +// $Author: Stevep $ +// $Revision: 3 $ +// $Date: 20/11/01 11:19 $ +// +// + + + +/** + @file + @publishedAll + @released +*/ + + +#if !defined (__IRMTMCMDS_H__) +#define __IRMTMCMDS_H__ + + +#endif //__IRMTMCMDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miut_err.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miut_err.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,521 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MIUT_ERR_H__ +#define __MIUT_ERR_H__ + +// Minimum value for an MTM-specific error +/** +@publishedAll +@released +*/ +const TInt KMiutErrorBase = (-170); + +// POP3-specific error codes + +/** +@publishedAll +@released +*/ +const TInt KPop3ErrorBase = KMiutErrorBase; + +/** +@publishedAll +@released +*/ +const TInt KPop3CannotConnect = KPop3ErrorBase; + +/** +@publishedAll +@released +*/ +const TInt KPop3InvalidUser = KPop3ErrorBase-1; + +/** +@publishedAll +@released +*/ +const TInt KPop3InvalidLogin = KPop3ErrorBase-2; + +/** +@publishedAll +@released +*/ +const TInt KPop3CannotCreateApopLogonString = KPop3ErrorBase-3; + +/** +@publishedAll +@released +*/ +const TInt KPop3ProblemWithRemotePopServer = KPop3ErrorBase-4; + +/** +@publishedAll +@released +*/ +const TInt KPop3CannotOpenServiceEntry = KPop3ErrorBase-5; + +/** +@publishedAll +@released +*/ +const TInt KPop3CannotSetRequiredFolderContext = KPop3ErrorBase-6; + +/** +@publishedAll +@released +*/ +const TInt KPop3InvalidApopLogin = KPop3ErrorBase-7; + +/** +@publishedAll +@released +*/ +const TInt KPopTopError = (-179); + +// IMSK-specific error code +/** +@publishedAll +@released +*/ +const TInt KImskBaseError = (-180); + +/** +@publishedAll +@released +*/ +const TInt KImskErrorDNSNotFound = KImskBaseError; + +/** +@publishedAll +@released +*/ +const TInt KImskErrorControlPanelLocked = KImskBaseError-1; + +/** +@publishedAll +@released +*/ +const TInt KImskErrorISPOrIAPRecordNotFound = KImskBaseError-2; + +/** +@publishedAll +@released +*/ +const TInt KImskErrorActiveSettingIsDifferent = KImskBaseError-3; + +/** +@publishedAll +@released +*/ +const TInt KImskSecuritySettingsFailed = KImskBaseError-4; + +/** +@publishedAll +@released +*/ +const TInt KImskSSLTLSNegotiateFailed = KImskBaseError-5; + +/** +@publishedAll +@released +*/ +const TInt KImskTopError = (-190); + +// error codes -190 to -199 are used by Sockets + +// IMAP-specific error codes +/** +@publishedAll +@released +*/ +const TInt KImapBaseError = (-200); + +/** +@publishedAll +@released +*/ +const TInt KErrImapConnectFail = KImapBaseError; + +/** +@publishedAll +@released +*/ +const TInt KErrImapServerFail = KImapBaseError-1; + +/** +@publishedAll +@released +*/ +const TInt KErrImapServerParse = KImapBaseError-2; + +/** +@publishedAll +@released +*/ +const TInt KErrImapServerBusy = KImapBaseError-3; + +/** +@publishedAll +@released +*/ +const TInt KErrImapServerVersion = KImapBaseError-4; + +/** +@publishedAll +@released +*/ +const TInt KErrImapSendFail = KImapBaseError-5; + +/** +@publishedAll +@released +*/ +const TInt KErrImapBadLogon = KImapBaseError-6; + +/** +@publishedAll +@released +*/ +const TInt KErrImapSelectFail = KImapBaseError-7; + +/** +@publishedAll +@released +*/ +const TInt KErrImapWrongFolder = KImapBaseError-8; + +/** +@publishedAll +@released +*/ +const TInt KErrImapServerNoSecurity = KImapBaseError-9; + +/** +@publishedAll +@released +*/ +const TInt KErrImapServerLoginDisabled = KImapBaseError-10; + +/** +@publishedAll +@released +*/ +const TInt KErrImapTLSNegotiateFailed = KImapBaseError-11; + +/** +@publishedAll +@released +*/ +const TInt KErrImapCantDeleteFolder = KImapBaseError-12; + +/** +@publishedAll +@released +*/ +const TInt KErrImapInvalidServerResponse = KImapBaseError-13; + +/** +@publishedAll +@released +*/ +//This POP error declared in IMAP error range, +//since there is no scope to declare the error within pop range. +const TInt KErrPop3ServerAlreadyConnected = KImapBaseError-14; + +/** +@publishedAll +@released +*/ +const TInt KImapTopError = (-219); + +// DMSS-specific error codes +/** +@publishedAll +@released +*/ +const TInt KDmssBaseError = (-220); + +/** +@publishedAll +@released +*/ +const TInt KDmssUnknownErr = (KDmssBaseError-1); + +/** +@publishedAll +@released +*/ +const TInt KDmssMailboxUnavailableErr = (KDmssBaseError-2); + +/** +@publishedAll +@released +*/ +const TInt KDmssActionAbortedErr = (KDmssBaseError-3); + +/** +@publishedAll +@released +*/ +const TInt KDmssActionNotTakenErr = (KDmssBaseError-4); + +/** +@publishedAll +@released +*/ +const TInt KDmssCmdUnrecognisedErr = (KDmssBaseError-5); + +/** +@publishedAll +@released +*/ +const TInt KDmssSyntaxErrorErr = (KDmssBaseError-6); + +/** +@publishedAll +@released +*/ +const TInt KDmssCmdNotImplementedErr = (KDmssBaseError-7); + +/** +@publishedAll +@released +*/ +const TInt KDmssBadSequenceErr = (KDmssBaseError-8); + +/** +@publishedAll +@released +*/ +const TInt KDmssParamNotImplementedErr = (KDmssBaseError-9); + +/** +@publishedAll +@released +*/ +const TInt KDmssMailboxNoAccessErr = (KDmssBaseError-10); + +/** +@publishedAll +@released +*/ +const TInt KDmssExceededStorageErr = (KDmssBaseError-11); + +/** +@publishedAll +@released +*/ +const TInt KDmssMailboxNameErr = (KDmssBaseError-12); + +/** +@publishedAll +@released +*/ +const TInt KDmssTransactionFailedErr = (KDmssBaseError-13); + +/** +@publishedAll +@released +*/ +const TInt KDmssTimeOutErr = (KDmssBaseError-14); + +/** +@publishedAll +@released +*/ +const TInt KDmssTopError = (-239); + +// SMTP client-specific error codes +/** +@publishedAll +@released +*/ +const TInt KSmtpBaseError = (-240); + +/** +@publishedAll +@released +*/ +const TInt KSmtpNoMailFromErr = KSmtpBaseError; + +/** +@publishedAll +@released +*/ +const TInt KSmtpUnknownErr = (KSmtpBaseError-1); + +/** +@publishedAll +@released +*/ +const TInt KSmtpBadMailFromAddress = (KSmtpBaseError-2); + +/** +@publishedAll +@released +*/ +const TInt KSmtpBadRcptToAddress = (KSmtpBaseError-3); + +/** +@publishedAll +@released +*/ +const TInt KSmtpLoginRefused = (KSmtpBaseError-4); + +/** +@publishedAll +@released +*/ +const TInt KSmtpNoMsgsToSendWithActiveSettings = (KSmtpBaseError-5); + +/** +@publishedAll +@released +*/ +const TInt KErrSmtpTLSNegotiateFailed = (KSmtpBaseError-6); + +/** +@publishedAll +@released +*/ +const TInt KErrSmtpBufferOverFlow = (KSmtpBaseError-7); + +/** +@publishedAll +@released +*/ +const TInt KSmtpTopError = (-249); + +// IMCM error codes +/** +@publishedAll +@released +*/ +const TInt KImcmBaseError = (-250); + +/** +@publishedAll +@released +*/ +const TInt KImcmHTMLPartNotPopulated = KImcmBaseError; + +/** +@publishedAll +@released +*/ +const TInt KImcmInvalidMessageStructure = (KImcmBaseError-1); + +// POPS error codes +/** +@publishedAll +@released +*/ +const TInt KPop3BaseError = (-260); + +/** +@publishedAll +@released +*/ +const TInt KErrPop3TLSNegotiateFailed = KPop3BaseError; + +/** +@internalComponent +@released +*/ +enum TImcmPanic + { + EOffOpNoBodyText = 0, + EOffOpBadMtmTypeUid = 1, + EOffOpNoCMsvEntrySet = 2, + EOffOpEntryShouldBeFolder = 3, + EOffOpTwoSameLinesNotAllowed = 4, + EOffOpNoMemory = 5, + EOffOpInvalidConstruction = 6, + EOffOpListOutOfSync = 7, + EOffOpNoMtmParameters = 8, + EMiutBadStreamVersion = 9, + EEntryIsNotMessage = 10, + EMiutArrayHasOddNumberOfElements = 11, // ie there should be even number of entries in array + EMiutLocalServiceIdSet = 12, // iServiceId should not be set to Local + EPopcMTMNoBodyText = 13, + EPopcMTMBadMtmTypeUid = 14, + EPopcMTMNoCMsvEntrySet = 15, + EPopcMTMOperationNULL = 16, + EPopcMTMNotAServiceEntry = 17, + EPopcUnknownNewEmailType = 18, + EPopcUnknownSyncFunction = 19, + ESmtcMTMNoBodyText = 20, + ESmtcMTMBadMtmTypeUid = 21, + ESmtcMTMNoCMsvEntrySet = 22, + ESmtcMTMOperationNULL = 23, + ESmtcMTMNotAServiceEntry = 24, + ESmtcUnknownNewEmailType = 25, + ESmtcUnknownSyncFunction = 26, + ESmtcMTMStoringBadEntryType = 27, + ESmtcMTMRestoringBadEntryType = 28, + ESmtcMTMNotAMessageEntry = 29, + EMiutActiveInFinalProgress = 30, + EImpcNoBodyText = 31, + EImpcBadMtmTypeUid = 32, + EImpcNoCMsvEntrySet = 33, + EImpcEntryShouldBeFolder = 34, + EImpcTwoSameLinesNotAllowed = 35, + EImpcNoMemory = 36, + EImpcInvalidConstruction = 37, + EImpcBadServiceEntry = 38, + EImpcNoBaseMtm = 39, + EImpcNoAddresseeList = 40, + EImpcInvalidProgress = 41, + EImpcNotSupported = 42, + EImpcMTMNotAMessageEntry = 43, + EImpcMTMNotAServiceEntry = 44, + EImcmMessageEntryHasMoreThanOneFolder = 45, + EImcmUnknownState = 46, + EImcmFinalProgressFailed = 47, + EImcmNoEikonEnvironment = 48, + EImcmSetVersionNotSupported = 49, + EImcmSystemDefaultCharsetNotSupported = 50, + EImcmHtmlConverterNotFound = 51, + EImcmUnknownMtm = 52, + EImEmailOpUnknownAttachmentType = 53, + EImcmNonIdleRetrievalState = 54, + EImcmIdleRetrievalState = 55, + EImcmSyncDownloadRulesInvalidPos1 = 56, + EImcmSyncDownloadRulesInvalidPos2 = 57, + EImcmSyncDownloadRulesInvalidPos3 = 58, + EImcmSyncDownloadRulesInvalidBearerTypes1 = 59, + EImcmSyncDownloadRulesInvalidBearerTypes2 = 60, + EImcmSyncDownloadRulesInvalidBearerTypes3 = 61, + EImcmTransportBufferSizesInvalidPos1 = 62, + EImcmTransportBufferSizesInvalidPos2 = 63, + EImcmTransportBufferSizesInvalidPos3 = 64, + EImcmTransportBufferSizesInvalidBearerTypes1 = 65, + EImcmTransportBufferSizesInvalidBearerTypes2 = 66, + EImcmTransportBufferSizesInvalidBearerTypes3 = 67, + EImcmTransportBufferSizesInvalidFetchRequestSize = 68, + EImcmTransportBufferSizesInvalidMaxOutstandingFetchResponses = 69, + EImcmMobilityAccountsListInvalidPos1 = 70, + EImcmMobilityAccountsListInvalidPos2 = 71, + EImcmMobilityAccountsListInvalidPos3 = 72, + EImcmMobilityAccountsListInvalidIAPListCount = 73 + }; + +/** +@internalComponent +*/ +GLREF_C void gPanic(TImcmPanic aPanic); + +#endif // __MIUT_ERR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miutatch.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miutatch.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,94 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__MIUTATCH_H__) +#define __MIUTATCH_H__ + + +#if !defined (__S32FILE_H__) +#include +#endif + +const TInt KDataLineBufferLength = 4096; +_LIT(KImcvAttachFormatStr, "%S(%d)%S"); + +/** +@internalTechnology +@released +*/ +enum TImAttachmentFileState + { + EFileNotOpen, + EFileIsOpen, + EFileIsClosed, + EFileIsCorrupt, // UU data being decoded is corrupt + EFileIsIncomplete, // file write failed + EFileFailedToOpen, // can't open attach file + EFileTopIncomplete // File is incomplete due to top + }; + +class TImAttachmentFile // utility class to handle file operations with Email attachments +/** +@internalAll +@released +*/ + { +public: + enum TImFileOpenMode + { + /** + File opened for read mode + */ + EImFileRead = 0, + /** + File opened for write mode + */ + EImFileWrite, + }; +public: + IMPORT_C TImAttachmentFile(RFs& aFileSession); // constructor + IMPORT_C ~TImAttachmentFile(); // destructor + + IMPORT_C TInt MakeDir (const TDesC& aDirPath); + IMPORT_C TInt OpenFile (const TDesC& aDirPath ,const TDesC& aFileName ); + IMPORT_C TInt CreateFile (const TDesC& aDirPath ,const TDesC& aFileName ); + IMPORT_C TInt ReadFile (TDes8& rBuffer, TInt aNumBytes ); + IMPORT_C TInt WriteFile (const TDesC8& aBuffer); + IMPORT_C TInt WriteFile (const TDesC16& aBuffer); + IMPORT_C TInt CloseFile(); + IMPORT_C TInt DeleteAttachment(const TDesC& aDirPath,const TDesC& aFileName); + + IMPORT_C void SetFileHandle(RFile& aFile,TImFileOpenMode aFileMode); + + TInt AppendValidFile(const TDesC& aDirPath, const TDesC& aFileName, TFileName& rFullFilePath); +private: + void Reset(); + TInt WriteFile (); + TInt ReadFile (); + TInt FlushFile(); + TPtrC8 SelectFileData(TInt& abufLen, TInt& aDataLen); + +private: + RFs& iFileSession; + RFile iFile; + TFileText iFileText; + TFileName iFullFilePath; + TBuf8 iDataLine; + TBool iWritingToFile; + TInt iSpaceOnCache; + TInt iPositionInCache; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miutconv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miutconv.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,206 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MIUTCONV_H__ +#define __MIUTCONV_H__ + +#include + + +#if !defined (__CHARCONV_H_) +#include +#endif + +#if !defined (__MIUTHDR_H__) +#include +#endif + +#if !defined (__UTF_H_) +#include +#endif + +// IMail-specific stream type within an IMail file store for TImEmailTransformingInfo +// +const TUint KUidMsvCharsetNone = {0x10003C7F}; // 268450943 +const TUid KUidMsgFileTransformingInfo = {0x100094A5}; // 268473509 +const TUid KUidMsgEmailGeneralCenRep = {0x10285A25}; // 271079973 + +// No longer used as the charset information retrieved from resource file. +// Might possibly needed in the future ? maybe +// const TUid KUidMiutSystemDefaultCharset = {0x10009418}; // 268473368 +// const TUid KUidMiutOverrideCharset = {0x10009419}; // 268473369 + +_LIT8(KMiutUndisplayableChar, "?"); + +/** SMTP send methods. +@publishedAll +@released +*/ +enum TImSendMethod + { + /** Simple email. */ + ESendAsSimpleEmail, + /** MIME email. */ + ESendAsMimeEmail + }; + + +// Information to be used when sending an email message. +// Relating to how parts are encoded and converted. +// +class TImEmailTransformingInfo +/** Encapsulates character conversion and encoding settings for sending SMTP email. + +The default outcomes for header, body, HTML, and attachment parts respectively +for each of the listed categories are given below: + +Plain Charset: ISO-8859-1,ISO-8859-1,N/A,N/A + +Plain Encoding:None,None,N/A,UU + +MIME Charset:UTF8,UTF8,UTF8*,N/A + +MIME Encoding:B,QP,Base64,Base64 + +*: the UTF8 value set in the header field, but no conversion is done. The +HTML converter converts to UTF8. +@publishedAll +@released +*/ + { +public: + IMPORT_C TImEmailTransformingInfo& operator=(const TImEmailTransformingInfo& aInfo); + IMPORT_C TBool operator==(const TImEmailTransformingInfo& aInfo); + + // streaming operations + IMPORT_C void ExternalizeL( RWriteStream& aWriteStream ) const; + IMPORT_C void InternalizeL( RReadStream& aReadStream ); + IMPORT_C void StoreL( CMsvStore& aStore ) const; + IMPORT_C void RestoreL( CMsvStore& aStore ); + + // Setting functions + IMPORT_C void SetToDefault(const TImSendMethod aMethod); + IMPORT_C void SetSendMethod(const TImSendMethod aMethod); + IMPORT_C TImSendMethod SendMethod() const; + + IMPORT_C void SetHeaderEncodingQ(); + IMPORT_C void SetHeaderEncodingB(); + IMPORT_C void SetBodyTextEncoding(TImEncodingType aType); + IMPORT_C void SetHTMLEncoding(TImEncodingType aType); + IMPORT_C void SetAttachmentEncoding(TImEncodingType aType); + + IMPORT_C void SetHeaderAndBodyCharset(TUint aCharset); + IMPORT_C void SetHeaderCharset(TUint aCharset); + IMPORT_C void SetBodyTextCharset(TUint aCharset); + IMPORT_C void SetHTMLCharset(TUint aCharset); + + // Accessor functions + IMPORT_C TImEncodingType HeaderEncoding() const; + IMPORT_C TImEncodingType BodyTextEncoding() const; + IMPORT_C TImEncodingType HTMLEncoding() const; + IMPORT_C TImEncodingType AttachmentEncoding() const; + + IMPORT_C TUint HeaderCharset() const; + IMPORT_C TUint BodyTextCharset() const; + IMPORT_C TUint HTMLCharset() const; + +private: + void SetHeaderEncoding(TImEncodingType aType); + +private: + TImEncodingType iHeaderEncoding; + TImEncodingType iBodyEncoding; + TImEncodingType iHTMLEncoding; + TImEncodingType iAttachmentEncoding; + + TUint iHeaderCharset; + TUint iBodyCharset; + TUint iHTMLCharset; + TUint iTextAttachmentCharset; + + TImSendMethod iSendMethod; + }; + + +// Default Sending Charset/Encoding Values +const TImEncodingType KDefaultMIMEHeaderEncoding = EEncodingTypeBASE64; // MIME +const TImEncodingType KDefaultMIMEBodyTextEncoding = EEncodingTypeQP; +const TImEncodingType KDefaultMIMEHTMLEncoding = EEncodingTypeBASE64; +const TImEncodingType KDefaultMIMEAttachmentEncoding= EEncodingTypeBASE64; + +#define KDefaultPlainCharset KCharacterSetIdentifierIso88591 + +const TImEncodingType KDefaultPlainHeaderEncoding = EEncodingTypeNone; // Non-MIME or Plain +const TImEncodingType KDefaultPlainBodyTextEncoding = EEncodingTypeNone; +const TImEncodingType KDefaultPlainAttachmentEncoding = EEncodingTypeUU; + + + + +// Wrapper class for CHARCONV. +// 'Our' charset dependant on build, UNICODE or CodePage 1252. +// +class CImConvertCharconv : public CBase +/** +@internalTechnology +@released +*/ + { +public: + IMPORT_C static CImConvertCharconv* NewL(CCnvCharacterSetConverter& aConverter, RFs& anFs); + ~CImConvertCharconv(); + + // MUST call prepare function first. + IMPORT_C TInt ConvertToOurCharsetL( const TDesC8& aBufIn, TDes& rBufOut, + TInt& rNumUnconvertedChars, + TInt& rIndexOfFirstUnconvertedChar); + IMPORT_C TInt ConvertFromOurCharsetL(const TDesC& aBufIn, TDes8& rBufOut, + TInt& rNumUnconvertedChars, + TInt& rIndexOfFirstUnconvertedChar); + + // MUST be called prior to calling above two functions. + IMPORT_C TInt PrepareToConvertToFromOurCharsetL(const TUint aUid); + + IMPORT_C TUint GetMimeCharsetUidL(const TDesC8& aBufIn) const; + IMPORT_C HBufC8* GetMimeCharsetTextStringL(const TUint& aUid) const; + IMPORT_C TUint DefaultCharset() const; + IMPORT_C TUint SystemDefaultCharset() const; + + static TInt StraightCopy( const TDesC8& aBufIn, TDes& rBufOut); + static TInt StraightCopy( const TDesC& aBufIn, TDes8& rBufOut); +private: + void ConstructL(); + CImConvertCharconv(CCnvCharacterSetConverter& aConverter, RFs& anFs); + TBool CharsetAvailable(const TUint aUid); + void SetSystemDefaultCharsetL(); + + TInt GetSystemCharsetFromCenRepL(TDes8& aMimeCharSet); + + enum TEmailGeneralSettingsCenRepId + { + EEmailGeneralCharSetId = 0x00000000 + }; + +private: + CCnvCharacterSetConverter& iConverter; + CArrayFix* iCharsetsAvailable; + + RFs& iFs; + TUint iCharsetUid; + TUint iSystemDefaultCharset; // Value obtained from .ini file + TInt iCharconvState; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miutdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miutdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This header file defines the bit flags that may be used to instruct +// the CImMessageOperation class how to construct a new Email message +// +// + +#if !defined (__MIUTDEF_H__) +#define __MIUTDEF_H__ + +/** Type for email creation flags used in the @c aMsvEmailTypeList parameter of CImEmailOperation +functions. + +@see KMsvEmailTypeListMHTMLMessage +@see KMsvEmailTypeListInvisibleMessage +@see KMsvEmailTypeListMessageInPreparation +@publishedAll +@released +*/ +typedef TUint TMsvEmailTypeList; + +/** Flags that a new message should be of MHTML type. + +If this is not set, a plain-text message is created. + +@publishedAll +@released +@see TMsvEmailTypeList +*/ +const TMsvEmailTypeList KMsvEmailTypeListMHTMLMessage = 0x00000001; // if not set Email is a "normal" (i.e. non-MHTML) Email message +/** Flags that a new message should be invisible. +@publishedAll +@released +@see TMsvEmailTypeList +*/ +const TMsvEmailTypeList KMsvEmailTypeListInvisibleMessage = 0x00000002; // if set, message stays invisible on completion + +/** Flags that a new message should have the "in preparation" flag set. +@publishedAll +@released +@see TMsvEmailTypeList +*/ +const TMsvEmailTypeList KMsvEmailTypeListMessageInPreparation = 0x00000004; // if set, message stays marked "In preparation" on completion + +#endif //MIUTDEF.H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miuthdr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miuthdr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,849 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MIUTHDR_H__ +#define __MIUTHDR_H__ + +#include +#include +#include +#include +#include // KMsvNullIndexEntryId +#include // KUidMsvEmailTextEntryValue + +// IMail-specific stream type within an IMail file store for CImHeader +const TUid KUidMsgFileMimeHeader = {0x1000160F}; // 268441103 decimal +// IMail-specific stream type within an IMail file store for CImMimeHeader +const TUid KUidMsgFileIMailHeader = {0x100001D8}; // 268435928 decimal + +// Identifies which version of CImHeader has been stored in stream +const TUint16 KImHeaderVersion = 2; + +const TUid KUidMsvEmailTextEntry = {KUidMsvEmailTextEntryValue}; +const TUid KUidMsvEmailHtmlEntry = {KUidMsvEmailHtmlEntryValue}; +const TUid KUidMsvEmailExternalBodyEntry = {KUidMsvEmailExternalBodyEntryValue}; +const TUid KUidMsvEmailRtfEntry = {KUidMsvEmailRtfEntryValue}; + + +_LIT8(KMiutDateFormat, " %S, %2d %S %04d %02d:%02d:%02d "); +_LIT8(KMiutMonthNames, "JanFebMarAprMayJunJulAugSepOctNovDec"); +_LIT8(KMiutDayNames, "MonTueWedThuFriSatSun"); +_LIT8(KMiutTimeZoneNeg, "-%02d%02d"); +_LIT8(KMiutTimeZonePos, "+%02d%02d"); + +_LIT8(KMiutBase64String, "Base64"); +_LIT8(KMiutQPString, "quoted-printable"); +_LIT8(KMiut7BitString, "7bit"); +_LIT8(KMiut8BitString, "8bit"); +_LIT8(KMiutBinaryString, "binary"); +_LIT8(KMiutUUString, "uuencode"); + +_LIT8(KMiutWildcardBase64, "*base64*"); +_LIT8(KMiutWildcardQP, "*quoted-printable*"); +_LIT8(KMiutWildcard7Bit, "*7bit*"); +_LIT8(KMiutWildcard8Bit, "*8bit*"); +_LIT8(KMiutWildcardBinary, "*binary*"); +_LIT8(KMiutWildcardUU, "*uu*"); + +#define KMiutEmptyString KNullDesC + +_LIT(KMiutFormatString, "%S"); +_LIT(KImEngineResourceFile, "\\resource\\messaging\\imcm.rsc"); + +const TInt KMiutDateStringLength = 32; +const TInt KCenturyThreshold = 100; +const TInt KCenturyOffset = 70; +const TInt KThisCentury = 1900; // as defined in 1998 +const TInt KNextCentury = 2000; + +class CMsvStore; +class TMsvEntry; +class RMsvReadStream; +class RMsvWriteStream; +class CImConvertHeader; +class CImEncodedHeader; + +void CopyArrayL(const CDesCArray& aSource, CDesCArray& aDestination); + +// Maximum size for descriptors stored in HBufC members of CImHeader = 1000 chars +const TInt KMaxImHeaderStringLength = 1000; +const TInt KMaxImMimeFieldLength = 1000; +const TInt KImMailMaxBufferSize = 1000; // 1000 is defined by the SMTP spec as max space +const TInt KSmtpMaxBufferExcludingCRLF = 979; // Line length limit is 1000 chars per line including CRLF (RFC2822, Section 2.1.1) + // 1000 chars including "Field name: "+"Field body"+CRLF (here "Resent-Message-ID: " is largest field) + + +/** Defines how emails will be encoded when they are sent. + +MIME standards are defined in RFC 2045, RFC 2046 and RFC 2047. +@publishedAll +@released +*/ +enum TMsgOutboxBodyEncoding + { + /** Emails are sent with the default encoding, which is as for EMsgOutboxMIME. */ + EMsgOutboxDefault, + /** Emails are sent as plain text RFC822 messages. + + Attachments are encoded using UUEncoding algorithm. This method would not + normally be used unless the sender was sure that the receiving mail clients + don't support MIME. */ + EMsgOutboxNoAlgorithm, + /** Text is encoded using quoted-printable encoding, and all attachments are encoded + using BASE64 encoding. + + This is the default setting for this option. */ + EMsgOutboxMIME, + /** Text parts of the message are sent as MIME TEXT/HTML parts, and are encoded + using UTF-8 encoding system. + + All attachments are encoded using BASE64 encoding. Receiving mail clients + that do no support MHTML mail will display the HTML message text to the user + including all HTML tags, etc. */ + EMsgOutboxMHTMLAsMIME, + /** Each text part of the message is sent as two alternative MIME parts. + + The first part is sent as plain text using quoted-printable encoding, the + second part is sent as a TEXT/HTML part which is encoded using UTF-8 encoding + system. All attachments are encoded using BASE64 encoding. This is the standard + encoding method if the user wishes to send MHTML mail. */ + EMsgOutboxMHTMLAlternativeAsMIME + }; + +/** Messaging encoding types. +@publishedAll +@released +*/ +enum TImEncodingType + { + /** Unknown. */ + EEncodingTypeUnknown, + /** None. */ + EEncodingTypeNone, + /** 7-bit. */ + EEncodingType7Bit, + /** 8-bit. */ + EEncodingType8Bit, // ie lines still <1000 chars and terminated by CRLF + /** Binary. */ + EEncodingTypeBinary, // ie any length of data, not terminated by CRLF + /** QP. */ + EEncodingTypeQP, + /** Base64. */ + EEncodingTypeBASE64, + /** UU. */ + EEncodingTypeUU + }; + + +// Class used for storing extracting information (to/from header).. +// regarding the encoding in an incoming email message header. +//---------------------------------------------------------------------------------------- +class TImHeaderEncodingInfo +//---------------------------------------------------------------------------------------- +/** Stores encoding data found in message headers. +@publishedAll +@released +*/ + { +public: + /** Message field types. */ + enum TFieldList + { + EFrom, /**< "From" field. */ + EReplyTo, /**< "Reply To" field. */ + ETo, /**< "To" field. */ + ECc, /**< "Cc" field. */ + EBcc, /**< "Bcc" field. */ + ESubject /**< Subject field. */ + }; + /** Encoding types. */ + enum TEncodingType + { + EBase64, /**< Base64. */ + EQP, /**< QP. */ + ENoEncoding, /**< No encoding */ + EUU /**< UU. */ + }; + +public: + IMPORT_C TImHeaderEncodingInfo(); + IMPORT_C TImHeaderEncodingInfo(const TImHeaderEncodingInfo& aFrom); + + IMPORT_C void ExternalizeL( RWriteStream& aWriteStream ) const; + IMPORT_C void InternalizeL( RReadStream& aReadStream ); + + inline void SetField(const TFieldList aField); + inline TFieldList Field() const; + + inline void SetOffset(const TInt aOffset); + inline TInt Offset() const; + + inline void SetLength(const TInt aLength); + inline TInt Length() const; + + inline void SetCharsetUid(const TUint aUid); + inline TUint CharsetUid() const; + + inline void SetEncodingType(const TDesC8& aChar); + inline void SetEncodingType(const TEncodingType aType); + inline TEncodingType EncodingType() const; + + inline void SetArrayValue(const TInt aValue); + inline TInt ArrayValue() const; + + inline void SetAddSpace(const TBool atrueFalse); + inline TBool AddSpace() const; + + inline void SetEncodedLength(const TInt aLength); + inline TInt EncodedLength() const; + +private: + TFieldList iField; + TUint16 iOffset; + TUint16 iLength; + TEncodingType iType; + TUint16 iArrayValue; + TBool iAddSpace; // A space char needs adding between two adjoining 'encoded-words' + TUint8 iEncodedLength; // This can be used to determine space needed for buffer. + TUint iCharsetUid; + + }; + + +//------------------------------------------------------------------------------ + + +class CImHeader : public CBase +/** Encapsulates an Internet Mail (RFC822) header. + +Note that the class contains some obsolete functions that take a narrow descriptor: +always use the equivalent wide descriptor function instead. +@publishedAll +@released +*/ + { +public: +/** Flags used to determine where to obtain the ReplyTo address for the header +field of that name. */ + enum TReplyTo + { + /** Get address from originator. */ + EOriginator, + /** Get address from sender. */ + ESender, + /** Get address from all sources. */ + EAll, + /** Get address from recipients. */ + ERecipients + }; + + IMPORT_C static CImHeader* NewLC(); + IMPORT_C ~CImHeader(); + IMPORT_C void Reset(); + + // streaming operations + IMPORT_C void InternalizeL(RMsvReadStream& aReadStream); + IMPORT_C void ExternalizeL(RMsvWriteStream& aWriteStream) const; + IMPORT_C void RestoreL(CMsvStore& aMessageStore); + IMPORT_C void StoreL (CMsvStore& aMessageStore) const; + IMPORT_C void StoreWithoutCommitL(CMsvStore& aMessageStore) const; + + // the bulk of the member functions are accessors & mutators so we can use + // objects of the class as data repositories during the data-marshalling stage + // of getting imail headers to/from the internet + IMPORT_C const TPtrC Subject() const; + IMPORT_C void SetSubjectL(const TDesC8& aSubject); + + // Internet message ID + IMPORT_C const TPtrC8 ImMsgId() const; + /** Sets the "MessageId" header field. + + @param aImMsgIdL Field value */ + IMPORT_C void SetImMsgIdL(const TDesC8& aImMsgIdL); + + IMPORT_C const TPtrC From() const; + IMPORT_C void SetFromL(const TDesC8& aFrom); + + IMPORT_C const TPtrC ReplyTo() const; + IMPORT_C void SetReplyToL(const TDesC8& aReplyTo); + + IMPORT_C const TPtrC ReceiptAddress() const; + /** Sets the "Receipt" header field. + + @param aReceiptAddress Field value */ + IMPORT_C void SetReceiptAddressL(const TDesC8& aReceiptAddress); + + IMPORT_C TUint Charset() const; + IMPORT_C void SetCharset(const TUint aCharset); + +#if defined (_UNICODE) + IMPORT_C void SetFromL(const TDesC16& aFrom); + IMPORT_C void SetReplyToL(const TDesC16& aReplyTo); + /** Sets the "Receipt" header field. + + @param aReceiptAddress Field value */ + IMPORT_C void SetReceiptAddressL(const TDesC16& aReceiptAddress); + IMPORT_C void SetSubjectL(const TDesC16& aSubject); +#endif + + IMPORT_C TInt DataSize(); + + inline const TUint RemoteSize() const; + inline void SetRemoteSize(TUint aSize); + + inline const TUint16 Version() const; + inline void SetVersion(TUint16 aVersion); + + // give const access to the recipient lists + inline const CDesCArray& ToRecipients () const; + inline const CDesCArray& CcRecipients () const; + inline const CDesCArray& BccRecipients() const; + + // give non-const access to the recipient lists + inline CDesCArray& ToRecipients () ; + inline CDesCArray& CcRecipients () ; + inline CDesCArray& BccRecipients() ; + + inline CArrayFix& EncodingInfo() ; + inline const CArrayFix& EncodingInfo() const; + + IMPORT_C void AddEncodingInfoL(TImHeaderEncodingInfo& aInfo); + +//------------------------------------------------------------------------------------- +//----------------------Used for forwarding/replying to an email ---------------------- + + IMPORT_C const TPtrC8 ResentMsgId() const; + IMPORT_C void SetResentMsgIdL( const TDesC8& ); + + IMPORT_C const TPtrC ResentFrom() const; + IMPORT_C void SetResentFromL( const TDesC& ); + + // give const access to the recipient lists + inline const CDesCArray& ResentToRecipients () const; + inline const CDesCArray& ResentCcRecipients () const; + inline const CDesCArray& ResentBccRecipients() const; + + // give non-const access to the recipient lists + inline CDesCArray& ResentToRecipients (); + inline CDesCArray& ResentCcRecipients (); + inline CDesCArray& ResentBccRecipients(); + + IMPORT_C const TPtrC8 InReplyTo() const; + IMPORT_C void SetInReplyToL(const TDesC8&); + + IMPORT_C TInt CreateForwardL(CImHeader&, TDesC&); + IMPORT_C TInt CreateReplyL(CImHeader&, TReplyTo, TDesC&); + IMPORT_C void CreateReceiptL(CImHeader&, TDesC&); + +//------------------------------------------------------------------------------------- +//------------------------------------------------------------------------------------- + + // Body Encoding (charset) stored on a per message basis + IMPORT_C TMsgOutboxBodyEncoding BodyEncoding() const; + IMPORT_C void SetBodyEncoding(TMsgOutboxBodyEncoding aMessageBodyEncoding); + + IMPORT_C void ReDecodeL(RFs& aFS); + IMPORT_C TUint OverrideCharset() const; + IMPORT_C void SetOverrideCharset(TUint aCharset); + IMPORT_C void SaveEncodedHeadersL(); + +private: + CImHeader(); + void ConstructL(); + + // these four functions keep the line count down as there are several instances + // of streaming in/out HBufC objects. + void ReadRecipientsL ( RReadStream&, CDesCArray* ); + void WriteRecipientsL( RWriteStream&, const CDesCArray* ) const; + void FormatSubjectL(CImHeader&, TDesC&); + + //finds the duplicate recipients in To and Cc list + TBool IsRecipientPresent(CImHeader& aCImHeader, TPtrC16 newRecipient); + +private: + TUint16 iVersion; + + HBufC16* iFrom; + HBufC* iSubject; + HBufC8* iImMsgId; + HBufC16* iReplyTo; + HBufC16* iReceipt; + + CDesCArray* iTo; + CDesCArray* iCc; + CDesCArray* iBcc; + TUint iRemoteSize; + +//------------------------------------------------------------------------------------- +//----------------------Used for forwarding/replying to an email ---------------------- + + HBufC* iResentFrom; + HBufC8* iResentMsgId; + CDesCArray* iResentTo; + CDesCArray* iResentCc; + CDesCArray* iResentBcc; + HBufC8* iInReplyTo; + +//------------------------------------------------------------------------------------- +//------------------------------------------------------------------------------------- + CArrayFix* iEncodingInfo; + TMsgOutboxBodyEncoding iBodyEncoding; + // The character set to be when sending message. + // Overrides the charset passed in from the settings. + TUint i822HeaderCharset; + + CImEncodedHeader* iEncodedHeader; + }; + +class TImRfc822DateField +/** +@internalTechnology +@released +*/ + { +public: + IMPORT_C TInt ParseDateField(const TDesC8& aRfc822DateField, TTime& rTime); + IMPORT_C void SetDate(const TTime& aTimeDate, TDes8& rOutputLine); // NB assumes that "Date: " string has already been inserted into rOutputLine + +private: + TBool GetMonth( const TDesC8& name, TMonth& month ); + TBool GetTimezone( const TDesC8& name, TInt& minsOffset ); + }; + + +/** Folder type flags. + +The flags correspond to the MIME multipart subtype. +@publishedAll +@released +*/ +enum TImEmailFolderType + { + /** Unknown. */ + EFolderTypeUnknown, + /** Related. */ + EFolderTypeRelated, + /** Mixed. */ + EFolderTypeMixed, + /** Parallel. */ + EFolderTypeParallel, + /** Alternative. */ + EFolderTypeAlternative, + /** Digest. */ + EFolderTypeDigest, + /** RFC822. */ + EFolderTypeRFC822, + /** Partial. */ + EFolderTypePartial, + /** Directory. */ + EFolderTypeDirectory, + /** External. */ + EFolderTypeExternal + }; + +/** Describes the types of off-line email operations than can occur. + +@see TMsvEmailEntry::DisconnectedOperation() +@publishedAll +@released +*/ +enum TImDisconnectedOperationType + { + /** No operation. */ + ENoDisconnectedOperations, + /** Create operation. */ + EDisconnectedCreateOperation, + /** Delete operation. */ + EDisconnectedDeleteOperation, + /** Change operation. */ + EDisconnectedChangeOperation, + /** "Copy to" operation. */ + EDisconnectedCopyToOperation, + /** "Copy from" operation. */ + EDisconnectedCopyFromOperation, + /** "Copy within service" operation. */ + EDisconnectedCopyWithinServiceOperation, + /** "Move to" operation. */ + EDisconnectedMoveToOperation, + /** "Move from" operation. */ + EDisconnectedMoveFromOperation, + /** "Move within service" operation. */ + EDisconnectedMoveWithinServiceOperation, + /** Special operation. */ + EDisconnectedSpecialOperation, + /** Unknown operation. */ + EDisconnectedUnknownOperation, + /** Multiple operations. */ + EDisconnectedMultipleOperation + }; + +// Remote folder message count limited to TUint16 by using lower 16 bits of "iMtmData3". +// Note: The upper 16 bits of "iMtmData3" are not currently used by "TMsvEmailEntry". +const TUint KMsvRemoteFolderEntriesMask = 0x0000FFFF; + +class TMsvEmailEntry : public TMsvEntry +/** Provides storage for and access to extra email specific information for a message. + +To get a TMsvEmailEntry, get the entry's TMsvEntry, e.g. using +@c CMsvEntry::Entry(), and use the constructor that takes a TMsvEntry parameter. + +Many of the flags are only used by IMAP4 entries. These can be grouped as follows: + +- IMAP-specific flags, as defined by the IMAP protocol (see RFC3501, 2.3.2. Flags Message Attribute) + - GetIMAP4Flags() and SetIMAP4Flags() handle all the flags as a group + - \\Seen flag: SetSeenIMAP4Flag(), SeenIMAP4Flag(). + - \\Answered flag: SetAnsweredIMAP4Flag(), AnsweredIMAP4Flag() + - \\Flagged flag: SetFlaggedIMAP4Flag(), FlaggedIMAP4Flag() + - \\Deleted flag: SetDeletedIMAP4Flag(), DeletedIMAP4Flag() + - \\Draft flag: SetDraftIMAP4Flag(), DraftIMAP4Flag() + - \\Recent flag: SetRecentIMAP4Flag(), RecentIMAP4Flag() +- Folder subscriptions and other folder-related flags: + - SetMailbox(), Mailbox(), + - SetSubscribed(), Subscribed(), + - SetLocalSubscription(), LocalSubscription() + - SetRemoteFolderEntries(), RemoteFolderEntries() +- Disconnected operation information: + - SetDisconnectedOperation(), DisconnectedOperation(). +- Partial download flags: these flags allow a client to test if a message or its body has + been partially downloaded (see TImImap4GetPartialMailInfo) + - SetPartialDownloaded(), PartialDownloaded() + - SetBodyTextComplete(), BodyTextComplete() +- UID information: IMAP messages have a unique identifier number (see + RFC3501, 2.3.1.1. Unique Identifier (UID) Message Attribute) + - SetValidUID(), ValidUID() + - SetUID(), UID(). + +The following flags are set only by the IMAP MTM. They indicate if the +message contains a vCard, vCalendar (http://www.imc.org), or iCalendar (RFC 2445) attachment. + +- VCard(), SetVCard() +- VCalendar(), SetVCalendar() +- ICalendar(), SetICalendar() + +The following flags apply to all email protocols: + +- Receipt requested: Receipt(), SetReceipt() +- MHTML content: MHTMLEmail(), SetMHTMLEmail() + +Note that the email specific data is stored in the reserved data members @c iMtmData1, +@c iMtmData2 and @c iMtmData3 of the TMsvEntry base class. These public data members +must not be directly altered by clients. + +@publishedAll +@released +@see CImap4ClientMtm +*/ + { +public: // Public member functions + IMPORT_C TMsvEmailEntry(); // default constructor + IMPORT_C TMsvEmailEntry(const TMsvEntry& aGenericEntry); + + IMPORT_C TBool operator==(const TMsvEntry& aEntry) const; + IMPORT_C TBool operator==(const TMsvEmailEntry& aEntry) const; + + IMPORT_C void GetIMAP4Flags(TBool& rUnread,TBool& rSeen,TBool& rAnswered,TBool& rFlagged,TBool& rDeleted,TBool& rDraft,TBool& rRecent); + IMPORT_C void SetIMAP4Flags(TBool aUnread,TBool aSeen,TBool aAnswered,TBool aFlagged,TBool aDeleted,TBool aDraft,TBool aRecent); + + IMPORT_C void SetMessageFolderType(TImEmailFolderType aFolderType); + IMPORT_C TImEmailFolderType MessageFolderType() const; + + IMPORT_C void SetDisconnectedOperation(TImDisconnectedOperationType aDisconnectedOperationType); + IMPORT_C TImDisconnectedOperationType DisconnectedOperation() const; + + IMPORT_C void SetPartialDownloaded(TBool aPartialDownloaded); + IMPORT_C TBool PartialDownloaded() const; + + // + inline void SetEncrypted(TBool aEncrypt); + inline TBool Encrypted() const; + // + inline void SetSigned(TBool aSignature); + inline TBool Signed() const; + // + inline TBool VCard() const; + inline void SetVCard(TBool aVCard); + // + inline TBool VCalendar() const; + inline void SetVCalendar(TBool aVCal); + // + inline TBool ICalendar() const; + inline void SetICalendar(TBool aICal); + // + inline TBool Receipt() const; + inline void SetReceipt(TBool aReceipt); + + inline TBool MHTMLEmail() const; + inline void SetMHTMLEmail(TBool aMhtml); + + inline TBool BodyTextComplete() const; + inline void SetBodyTextComplete(TBool aFlag); + + // + // IMAP4-specific flags + // + inline void SetUnreadIMAP4Flag(TBool aUnread); + inline TBool UnreadIMAP4Flag() const; + // + inline void SetSeenIMAP4Flag(TBool aSeen); + inline TBool SeenIMAP4Flag() const; + // + inline void SetAnsweredIMAP4Flag(TBool aAnswered); + inline TBool AnsweredIMAP4Flag() const; + // + inline void SetFlaggedIMAP4Flag(TBool aFlagged); + inline TBool FlaggedIMAP4Flag() const; + // + inline void SetDeletedIMAP4Flag(TBool aDeleted); + inline TBool DeletedIMAP4Flag() const; + // + inline void SetDraftIMAP4Flag(TBool aDraft); + inline TBool DraftIMAP4Flag() const; + // + inline void SetRecentIMAP4Flag(TBool aRecent); + inline TBool RecentIMAP4Flag() const; + // + inline void SetMailbox(TBool aMailbox); + inline TBool Mailbox() const; + // + inline TBool Orphan() const; + + inline void SetOrphan(TBool aOrphan); + // + inline void SetValidUID(TBool aValid); + inline TBool ValidUID() const; + // + inline void SetSubscribed(TBool aSubscribed); + inline TBool Subscribed() const; + // + inline void SetLocalSubscription(TBool aLocal); // i.e. is subscription local, or remote + inline TBool LocalSubscription() const; + // + inline void SetUID(TUint32 aUid); + inline TUint32 UID() const; + // + inline TInt RemoteFolderEntries() const; + inline void SetRemoteFolderEntries(TInt aEntries); + +private: + enum TMsvEmailEntryFlags + { + KMsvEmailEntryClearFlag =0x00, + // Flags set on Message entries... + KMsvEmailEntryEncryptedFlag =0x00000001, + KMsvEmailEntrySignedFlag =0x00000002, + KMsvEmailEntryReceiptFlag =0x00000004, + KMsvEmailEntryOrphanFlag =0x00000008, + + // VCard and VCalendar entries may be set on folders or attachments + KMsvEmailEntryVCardFlag =0x00000010, + KMsvEmailEntryVCalendarFlag =0x00000020, + + // Message contains HTML data + // (Note: HTML and not only MHTML) + KMsvEmailEntryMHTMLFlag = 0x00000040, + KMsvEmailEntryBodyTextCompleteFlag = 0x00000080, + + KMsvEmailEntryNoDisconnectedOperations = 0x00000000, + KMsvEmailEntryDisconnectedCreateOperation = 0x00000100, + KMsvEmailEntryDisconnectedDeleteOperation = 0x00000200, + KMsvEmailEntryDisconnectedChangeOperation = 0x00000300, + KMsvEmailEntryDisconnectedCopyToOperation = 0x00000400, + KMsvEmailEntryDisconnectedCopyFromOperation = 0x00000500, + KMsvEmailEntryDisconnectedCopyWithinServiceOperation = 0x00000600, + KMsvEmailEntryDisconnectedMoveToOperation = 0x00000700, + KMsvEmailEntryDisconnectedMoveFromOperation = 0x00000800, + KMsvEmailEntryDisconnectedMoveWithinServiceOperation = 0x00000900, + KMsvEmailEntryDisconnectedSpecialOperation = 0x00000A00, + KMsvEmailEntryDisconnectedUnknownOperation = 0x00000B00, + KMsvEmailEntryDisconnectedMultipleOperation = 0x00000C00, + KMsvEmailEntryDisconnectedOperation = 0x00000F00, + + // IMAP4-specific masks. Can be re-used by non-IMAP4 entries (eg POP3, SMTP) + KMsvEmailEntryIMAP4SubscribedFlag =0x00001000, + KMsvEmailEntryIMAP4UnreadFlag =0x00002000, + KMsvEmailEntryIMAP4SeenFlag =0x00004000, + KMsvEmailEntryIMAP4AnsweredFlag =0x00008000, + KMsvEmailEntryIMAP4FlaggedFlag =0x00010000, + KMsvEmailEntryIMAP4DeletedFlag =0x00020000, + KMsvEmailEntryIMAP4DraftFlag =0x00040000, + KMsvEmailEntryIMAP4RecentFlag =0x00080000, + KMsvEmailEntryIMAP4ValidUIDFlag =0x00100000, + KMsvEmailEntryIMAP4MailboxFlag =0x00200000, + KMsvEmailEntryIMAP4LocalSubFlag =0x00400000, + + // MIME "multipart" types assigned to folders. + KMsvMimeFolderUnknownMask =0x00000000, + KMsvMimeFolderRelatedMask =0x01000000, + KMsvMimeFolderMixedMask =0x02000000, + KMsvMimeFolderAlternativeMask =0x03000000, + KMsvMimeFolderParallelMask =0x04000000, + KMsvMimeFolderDigestMask =0x05000000, + + // MIME message types + KMsvMimeFolderRFC822Mask =0x06000000, + KMsvMimeFolderPartialMask =0x07000000, + KMsvMimeFolderDirectoryMask =0x08000000, // for VCard, VCalendar types + KMsvMimeFolderExternalMask =0x09000000, + KMsvMimeFolderMask =0x0F000000, + + // Can be used by POP3 and IMAP4 MTMs. + KMsvEmailEntryPartialDownloadFlag =0x10000000, + + KMsvEmailEntryICalendarFlag =0x20000000 + }; + + }; + +const TUint16 KImMimeHeaderVersion = 2; // identify which version of this class has been stored + +class CImMimeHeader : public CBase +/** Stores a MIME email header. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CImMimeHeader* NewLC(); + IMPORT_C static CImMimeHeader* NewL(); + IMPORT_C ~CImMimeHeader(); + IMPORT_C void Reset(); + IMPORT_C TInt Size(); // number of header fields stored in object + + // streaming operations + IMPORT_C void InternalizeL( RMsvReadStream& aReadStream ); + IMPORT_C void ExternalizeL( RMsvWriteStream& aWriteStream ) const; + IMPORT_C void RestoreL( CMsvStore& aMessageStore ); + IMPORT_C void StoreL ( CMsvStore& aMessageStore ) const; + IMPORT_C void StoreWithoutCommitL(CMsvStore& aMessageStore) const; + + /** Sets the Content-Type field value (e.g. "text" in Content-Type:text/plain). + + The value is MIME defined and should always be 8-bit. + + @param aPath Field value */ + IMPORT_C void SetContentTypeL(const TDesC8& aPath); + IMPORT_C const TPtrC8 ContentType() const; + + /** Sets the Content-Type subtype field value (e.g. "plain" in Content-Type:text/plain). + + + The value is MIME defined and should always be 8-bit. + + @param aPath Field value */ + IMPORT_C void SetContentSubTypeL(const TDesC8& aPath); + IMPORT_C const TPtrC8 ContentSubType() const; + + /** Sets the Content-Disposition field value (either inline or attachment). + + The value is MIME defined and should always be 8-bit. + + @param aPath Field value */ + IMPORT_C void SetContentDispositionL(const TDesC8& aPath); + IMPORT_C const TPtrC8 ContentDisposition() const; + + /** Sets the Content-Description field value. + + The value is MIME defined and should always be 8-bit. + + @param aPath Field value */ + IMPORT_C void SetContentDescriptionL(const TDesC8& aPath); + IMPORT_C const TPtrC8 ContentDescription() const; + + /** Sets the Content-Base field value. + + @param aPath Field value */ + IMPORT_C void SetContentBaseL(const TDesC8& aPath); + IMPORT_C const TPtrC8 ContentBase() const; + + /** Sets the Content-ID field value. + + @param aPath Field value */ + IMPORT_C void SetContentIDL(const TDesC8& aPath); + IMPORT_C const TPtrC8 ContentID() const; + + /** Sets the Content-Location field value. + + @param aPath Field value */ + IMPORT_C void SetContentLocationL(const TDesC16& aPath); + IMPORT_C const TPtrC16 ContentLocation() const; + + // IMAP-specific info describing relative location of entry w.r.t. parent Email message + /** Sets IMAP-specific information for the relative location of the entry to the + parent email message. + + @param aPath Relative location */ + IMPORT_C void SetRelativePathL(const TDesC8& aPath); + IMPORT_C const TPtrC8 RelativePath() const; + + /** Sets the Content-Transfer-Encoding field value. + + @param aType Field value */ + IMPORT_C void SetContentTransferEncodingL(const TDesC8& aType); + IMPORT_C TImEncodingType ContentTransferEncoding() const; + IMPORT_C TImEncodingType ContentTransferEncoding(TDes8& rType) const; + IMPORT_C const TPtrC8 GetContentTypeValue(const TDesC8& aContentTypeParameter) const; + + // inlines to access arrays + inline const CDesC8Array& ContentTypeParams() const; + inline const CDesC8Array& ContentDispositionParams() const; + inline const CDesC8Array& XTypeParams() const; + + inline CDesC8Array& ContentTypeParams(); + inline CDesC8Array& ContentDispositionParams(); + inline CDesC8Array& XTypeParams(); // anything else that is in the header, but not recognised + + inline const TUint16 Version() const; + inline void SetVersion( TUint16 aVersion ); + + IMPORT_C void SetMimeCharset(const TUint aCharset); + IMPORT_C TUint MimeCharset() const; + +private: + CImMimeHeader(); + void ConstructL(); + TBool ArrayEntryExists(CDesCArray& aArray, TInt aField); + +private: + TUint16 iVersion; + HBufC8* iRelativePath; + HBufC8* iContentDescription; + + TImEncodingType iContentTransferEncoding; + + // MHTML parameters + HBufC8* iContentBase; + HBufC16* iContentLocation; + HBufC8* iContentID; + // + HBufC8* iContentType; + HBufC8* iContentSubType; + HBufC8* iContentDisposition; + // + CDesC8Array* iContentTypeParams; // zero or more "parameter" + CDesC8Array* iContentDispositionParams; // zero or more "parameters" + CDesC8Array* iXTypeParams; // zero or more X-Type "parameters" + // + TBuf<20> iContentTransferEncodingBuffer; // must be big enough to store "quoted-printable" string + + // The uid value is always used in preference to the stored string. + // Only when the uid is not set is the string used when sending. + TUint iMimeCharset; + }; + + + +#include + +#endif // #defined __MIUTHDR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miutmsg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miutmsg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,950 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MIUTMSG_H__ +#define __MIUTMSG_H__ + +#include +#include // TMsvEntry, CMsvOperation etc +#include // CMsgActive +#include // CImHeader, CImMimeHeader +#include // CRichText etc +#include // CImHeader, CImMimeHeader +#include +#include +#include +#include // TImMessageField + +#include // RResourceFile +#include +#include + +#include + + + +//#include +#include + +//Content-Transfer-Encoding: types +_LIT8(KMimeQuotedPrintable, " quoted-printable"); +_LIT8(KMimeApplOctet, " application/octet-stream"); +_LIT8(KMime7Bit, " 7-bit"); +_LIT8(KMimeBase64, " base64"); +_LIT8(KMimeMime, "MIME*"); +// Content-Disposition: types +_LIT8(KMimeInline, "inline"); +_LIT8(KMimeAttachment, "attachment"); +// Content-Type: types +_LIT8(KMimeMultipart, "multipart"); +_LIT8(KMimeText, "text"); +_LIT8(KMimeImage, "image"); +_LIT8(KMimeAudio, "audio"); +_LIT8(KMimeVideo, "video"); +_LIT8(KMimeApplication, "application"); +_LIT8(KMimeMessage, "message"); +// Content-Type: Multipart types +_LIT8(KMimeMixed, "mixed"); +_LIT8(KMimeRelated, "related"); +_LIT8(KMimeAlternative, "alternative"); +_LIT8(KMimeEncrypted, "encrypted"); +_LIT8(KMimeParallel, "parallel"); +_LIT8(KMimeDigest, "digest"); +_LIT8(KMimeSigned, "signed"); +// Content-Type: Text types +_LIT8(KMimeHtml, "html"); +_LIT8(KMimePlain, "plain"); +_LIT8(KMimeDirectory, "directory"); +// Content-Type: Message types +_LIT8(KMimePartial, "partial"); +_LIT8(KMimeExternal, "external-body"); +_LIT8(KMimeRfc822, "rfc822"); +// Content-Type: Directory types +_LIT8(KMimeProfile, "profile"); +_LIT(KMimeVCardExtension, ".vcf"); +_LIT8(KMimeVCalender, "vcalendar"); +// Content-Type: Image, Audio, Video, Application types +_LIT8(KMimeBmp, "bmp"); +_LIT8(KMimeGif, "gif"); +_LIT8(KMimeJpeg, "jpeg"); +_LIT8(KMimeTiff, "tiff"); +_LIT8(KMimeWav, "wav"); +_LIT8(KMimeZip, "x-gzip"); +_LIT(KMimeHtmlExtension, ".html"); +_LIT(KMiutMsgDefaultHtmlFileName, "attachment.html"); +const TUid KUidMimeHeaders = {0x10204281}; + +class CImHtmlConverter; + +class CImAttachmentManager; +class CMsvMimeHeaders; +class CMsvPlainBodyText; +class CImPlainBodyText; + +class TImCreateMessageOptions +/** +@internalComponent +@released +*/ + { +public: + TMsvPartList iMsvPartList; + TMsvEmailTypeList iMsvEmailTypeList; + TUid iMessageType; + }; + +// Mixin provides interface to Browser control to resolve MHTML URIs. + +class MImURITranslator +/** Translates a URI in an MHTML message into a message body part file name. + +MHTML messages may contain multiple HTML body parts. Each of these body parts +is able to reference another body part within the same multipart structure, +or a body part within a parent multipart structure [RFC2110]. These references +are called URI's. + +When an MHTML message is parsed by the message engine, the HTML body of each +part is stored as a binary file. This interface provides a means of finding +the file name of the body part that corresponds to a given a URI. + +The URI resolving process has the potential to become time consuming, therefore +it is broken into two steps: + +Resolve asynchronously the relative URI into an absolute URI. The message +body parts are recursively searched in order to find an absolute base for +the relative URI [RFC2110, RFC1808]. + +Once a relative URI has been resolved in to an absolute URI, then the message +is searched for a body part that corresponds to it [RFC2110]. + +If no matching body part can be found, then the absolute URI is returned to +the caller in place of the filename. This absolute URI should be used to search +for the required data externally, for example by using HTTP. + +@see CImEmailMessage +@publishedAll +@released +*/ + { +public: + /** Starts an asynchronous operation to resolve a specified URI. + + @param aMessageId The ID of the body part containing the URI which is to be + resolved. CImEmailMessage::FindFirstHTMLPageL() can be used to find the aMessageId + parameter for the first HTML page in a message. + @param rBase The base parameter from the HTML part that contains the URI to + be resolved. If there is no base parameter in the HTML, then an empty descriptor + should be passed in. + @param rURI The URI to be resolved. + @param aStatus Asynchronous status word */ + virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC& rBase, const TDesC& rURI, TRequestStatus &aStatus) = 0; + + /** Gets the results after a search. + + @param aLinkedEntryId On return, the message ID of the linked body part, providing + one is found. Note that you should keep a record of the returned message ID + as it is required for resolving any URI's that may be found in the linked + body part. + @param aFileFound On return, true if a linked body part has been found. It + is set to false otherwise. + @return If successful, the filename that corresponds to the URI, or the absolute + URI if no matching file can be found. If failed, NULL. */ + virtual HBufC* GetUniversalResourceIdentifierL(TMsvId& aLinkedEntryId, TBool& aFileFound) const = 0; + + /** Starts an asynchronous operation to resolve a specified URI. + + @param aMessageId The ID of the body part containing the URI which is to be + resolved. CImEmailMessage::FindFirstHTMLPageFileHandleL() can be used to find the aMessageId + parameter for the first HTML page in a message. + @param aBase The base parameter from the HTML part that contains the URI to + be resolved. If there is no base parameter in the HTML, then an empty descriptor + should be passed in. + @param aURI The URI to be resolved. + @param aStatus Asynchronous status word */ + virtual void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus) = 0; + + /** Gets the results after a search. + + @param aLinkedEntryId On return, the message ID of the linked body part, providing + one is found. Note that you should keep a record of the returned message ID + as it is required for resolving any URI's that may be found in the linked + body part. + + @param aFile On return, the file handle corresponding to the URI if successful. + If not successful, then this is not valid. + + @return KErrNone if successful and therefore aFile contains the filehandle + that corresponds to the URI. An error code if unsuccessful and therefore + aFile is not valid. */ + virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId& aLinkedEntryId, RFile& aFile) const = 0; + }; + + + + +class CImMhtmlUriResolver; +class CImRemoveMessagePart; +class CImStoreMessagePart; +class CImMimeHeader; + +class CImEmailMessage : public CMsgActive , public MImURITranslator +/** +This class can be used to manipulate new emails that +have been created using CImEmailOperation when composing a message. + +Use an instance of this class to add attachments, MHTML parts, body +text, and existing messages to a new message before it is to be sent. + +This class can also be used to retrieve the body text, list of attachments, +and embedded messages from emails that have been downloaded and stored within +the message store. + +If the store_8bit_body_text flag in imcm.rss is enabled, an instance of this class +can be used to retrieve the original body text character set for a particular message. +It can also be used to override the original body text character set so it will +be decoded in a new character set next time it is viewed. + +@see CImEmailOperation + +@publishedAll +@released +*/ + { +public: + /** Flags that specify to process on any messages embedded in this message. */ + enum TImEmailEntryType + { + /** Do not process embedded messages. */ + EThisMessageOnly, + /** Process embedded messages. */ + EThisMessageAndEmbeddedMessages // i.e messages with in a message + }; + /** Flags to specify types of attachment. */ + enum TImAttachmentType + { + /** All attachments. */ + EAllAttachments=0, // all attachment files contained within this message (but not inside messages within this message) + /** VCards. */ + EVCards, + /** VCalendars. */ + EVCalendars, + /** VCards, VCalendars and ICalendars. */ + EVEntries, // ie VCards, VCalendars or ICalendars (or all three) + /** Encrypted. */ + EEncrypted, + /** Signed. */ + ESigned, + /** Secure. */ + ESecure, // ie Encrypted or signed (or both) + /** ICalendars. */ + EICalendars + //.. add new items here + }; +public: + IMPORT_C static CImEmailMessage* NewL(CMsvEntry& aEntry); + IMPORT_C static CImEmailMessage* NewLC(CMsvEntry& aEntry); + IMPORT_C ~CImEmailMessage(); + + IMPORT_C void GetAttachmentsListL(TRequestStatus& aStatus, TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType); + IMPORT_C void GetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType); + void DoGetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType); + + IMPORT_C void FindFirstHTMLPageL(TMsvId aMessageId, TRequestStatus& aStatus); + + IMPORT_C const CMsvEntrySelection& Selection() const; // return selection + IMPORT_C const TDesC8& ProgressL() const; + + IMPORT_C void GetBodyTextL(TRequestStatus& aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer,CCharFormatLayer& aCharLayer); + IMPORT_C void GetBodyTextL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer,CCharFormatLayer& aCharLayer); + void DoGetBodyTextInitL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); + + IMPORT_C void GetBodyTextEntryIdL(TRequestStatus& aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType); + IMPORT_C void GetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType); + + IMPORT_C CImPlainBodyText* OpenPlainBodyTextForWriteL(); + + IMPORT_C CImPlainBodyText* OpenPlainBodyTextForReadL(TImEmailEntryType aEntryType, TInt aChunkLength); + + IMPORT_C virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus); + IMPORT_C virtual HBufC* GetUniversalResourceIdentifierL(TMsvId& aLinkedEntryId, TBool& aFileFound) const; + IMPORT_C void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus); + IMPORT_C void FindFirstHTMLPageFileHandleL(TMsvId aMessageId, TRequestStatus& aStatus); + IMPORT_C virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId& aLinkedEntryId, RFile& aFile) const; + IMPORT_C MMsvAttachmentManager& AttachmentManager() const; + void AddAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + void AddAttachmentL(RFile& aFileHandle, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + void AddLinkedAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); + void AddEntryAsAttachmentL(TMsvId aAttachmentEntryId, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); + const RPointerArray& AttachmentInfoSelection() const; + void RemoveAttachmentL(TMsvAttachmentId aAttachmentId,TRequestStatus& aStatus) ; + void RemoveAttachedMessageL(TMsvAttachmentId aAttachmentId,TRequestStatus& aStatus) ; + void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + void CheckEntryAndResetStoreMessageL(TMsvId aMessageId); + void CheckEntryAndResetRemoveMessageL(TMsvId aMessageId); + void DoSetActive(TRequestStatus& aStatus); + CImMimeHeader* ConvertToImMimeHeadersL(CMsvMimeHeaders* aMimeHeaders); + CMsvMimeHeaders* ConvertToMsvMimeHeadersL(CImMimeHeader* aMimeHeader); + void AppendEntryAttachmentInfoL(); + IMPORT_C void AddRelatedPartL(TMsvId aMessageId, const TDesC& aAttachmentFullName, TRequestStatus& aStatus, TMsvId aRelatedPartId, const TDesC8& aContentId); + IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText& aRichText, TRequestStatus& aStatus); + IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText& aRichText, TRequestStatus& aStatus, TBool aUsePlainTextStorage); + IMPORT_C void GetMessageDigestEntriesL(TRequestStatus& aStatus, TMsvId aMessageId); + IMPORT_C void GetCharacterSetL(TMsvId aMessageId, TUint& aCharacterSetId, TBool& aOverride); + IMPORT_C void SetCharacterSetL(TMsvId aMessageId, TUint aCharacterSetId); + IMPORT_C void StoreBodyTextWithMimeHeaderL(TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TRequestStatus& aStatus); + + TMsvId EmailEntryId(); + +private: + void DoRunL(); + void DoCancel(); + CImEmailMessage(CMsvEntry& aEntry); + void ConstructL(); + void DoComplete(TInt&); + void DoStateL(); + + void Start(TRequestStatus& aStatus); + void StartL(); + + void Reset(); + void ChangeMessageContextL(); + void CompareChildrenAndPopulateSelL(); + void AttachmentInfoL(); + void AssembleBodyTextL(); + void CheckAndInitialiseL(TMsvId aMessageId); + + void AppendAttachmentL(); + TBool MessageDigestEntry(); + TBool HandleDifferentFolderTypesL(); + void GetTextForAlternateFolderL(); + void GetTextForRelatedFolderL(); + void GetAttachmentsForRelatedFolderL(); + TBool GetBodyTextCharacterSetL(); + TUint GetOverrideCharacterSetL(); + TInt FindFilename(const CImMimeHeader& aMimeInfo, TPtrC8& aFilename); + void FindFilenameDecodeL( + const CImMimeHeader& aMimeInfo, TFileName& aFileName, TUint aCharset); + void AppendAttachmentNameL(); + void SetBodyTextCharacterSetL(TMsvId aEntryId, TUint8 aNewCharacterSetId); + void FindFirstBodyTextPartL(TMsvId aEntryId, TBool& found); + + CImMimeHeader* FindAttachmentMimeHeaderL(); + TMsvEntry FindIdEntryL(TMsvId aMessageId); + + void DoGetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType); + + + enum TImEmailMessageStates + { + EIdle=0, + ETextForThisMsg, + ETextForMsgDigest, + ETextEntryIdForThisMsg, + ETextEntryIdMsgDigest, + ETextForThisMsgGetCharacterSet, + EAttachmentsForThisMsg, + EAttachmentsForMsgDigest, + EMsgDigestEntries, + EResolveURI, + EStoreMessagePart, + ERemoveMessagePart, + EFinished + }; + CMsvEntry& iClientEntry; + CMsvEntrySelection* iCompleteSel; + CMsvEntrySelection* iResultSel; + + CRichText* iRichText; + CParaFormatLayer* iParaLayer; + CCharFormatLayer* iCharLayer; + TMsvId iParentMsgId; // the Id passed into Getxxx() function representing the 'parent' message ID + TImEmailMessageStates iState; + TImAttachmentType iAttachmentType; + TMsvEmailEntry iEntry; + CImMhtmlUriResolver* iUriResolver; + TBool iUriFileFound; + CImStoreMessagePart* iStoreMessagePart; + CImRemoveMessagePart* iRemoveMessagePart; + TPckgBuf iProgress; + TImEmailEntryType iEntryType; + TBool iIsAMHTMLmessage; + TUint iCharacterSetId; + RFs iFs; + CDesCArray* iAttachmentNameList; + CImAttachmentManager* iAttachmentManager; + CMsvStore* iStore; + + // This is the entry Id using which the CImEmailMessage was created. + // store this , so that when the message id to which attachment is + // retrieved then the CIMEmailMessage is reset with this Id. + TMsvId iEmailEntryId; + enum TImAttachmentStates + { + ENoAttachment=0, + EAddAttachment, + EDeleteAttachment, + ECreateAttachment + }; + TInt iAttachmentState; + + }; + +class CImRemoveMessagePart : public CMsvOperation +/** +@internalComponent +@released +*/ + { +public: + static CImRemoveMessagePart* DeleteAttachmentL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachmentId); + static CImRemoveMessagePart* DeleteAttachedMessageL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachedMessageId); + ~CImRemoveMessagePart(); + const TDesC8& FinalProgress(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); // returns NULL until operation completed - then returns MessageId + TMsvId RemovedAttachmentId(); +private: + CImRemoveMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId); + void ConstructL(TMsvId aAttachmentId); + void ErrorRecovery(TInt aError); + void SelectNextStateL(); // selects next state to go to + void ChangeStateL(); // initiates the next state operation + void SelectAndChangeToNextStateL(); + void RequestComplete(TInt aError); + void Recover(); // leave message in a 'good' state + + void CheckAttachmentParentTypeL(); + void MoveOtherEntryToParentOfFolderL(); + void DeleteAttachmentEntryL(); + void DeleteFolderEntryL(); + void CompleteRemoveMessagePartL(); +private: + enum TImRemoveMessagePartState + { + ECheckAttachmentParentType, + EMoveOtherEntryToParentOfFolder, + EDeleteAttachmentEntry, + EDeleteFolderEntry, + ECompleteRemoveMessagePart, + EFinished + }; + CMsvEntry& iMsvEntry; + CMsvOperation* iMsvOperation; + + CMsvEntrySelection* iMessageEntrySelection; + CImEmailMessage* iEmailMessage; + + TInt iState; + TPckgBuf iDataMember; + TMsvId iMessageId; + TMsvId iFolderToDeleteId; + TInt iAttachmentSize; + TMsvId iAttachmentId; + TMsvId iEntryToMoveId; + }; + +class CImStoreMessagePart : public CMsvOperation +/** +@internalComponent +@released +*/ + { +public: + static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId, const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus ); + static CImStoreMessagePart* AddEntryAsAttachmentL(TMsvId aMessageId,TMsvId aAttachmentMessageId, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); + static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId,RFile& aFile, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + static CImStoreMessagePart* AddLinkedAttachmentL(TMsvId aMessageId,const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus ); + static CImStoreMessagePart* CreateAttachmentL(TMsvId aMessageId,const TDesC& aFileName, RFile& aAttachmentFile,CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); + static CImStoreMessagePart* AddRelatedPartL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId); + static CImStoreMessagePart* StoreBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, TBool aUsePlainTextStorage = EFalse); + static CImStoreMessagePart* StoreBodyTextWithMimeHeaderL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = EFalse); + static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = ETrue); + static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = ETrue); + ~CImStoreMessagePart(); + const TDesC8& FinalProgress(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); +private: + enum TImMessagePart + { + EMessagePartAttachment, + EMessagePartBody, + EMessagePartMessageAttachment + }; + void ConstructL(RFile& aFile); + void ConstructL(RFile& aFile,const TDesC& aAttachmentName); + void ConstructL(const TDesC& aAttachmentFullName, const TDesC8& aContentId); + void ConstructAttachmentInfo(CMsvAttachment* aAttachmentInfo,TInt aAttachmentCreationState); + CImStoreMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = EFalse); + + void ConstructL(); + void ConstructL(const TDesC& aAttachmentFullName); + void ConstructL(TMsvId aAttachmentMessageId); + void ConstructL(const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId); + void ConstructL(CRichText& aRichText); + void ConstructL(CRichText& aRichText, const CImMimeHeader& aMimeHeader); + void ConstructL(CImMimeHeader& aMimeHeader); + void ConstructL(TImMessagePart aMessagePart); + void ErrorRecovery(TInt error); + void SelectNextStateL(); // selects next state to go to + void ChangeStateL(); // initiates the next state operation + void SelectAndChangeToNextStateL(); + void RequestComplete(TInt aError); + void Recover(); + + TBool HTMLMessage() const; + void SetHTMLMessage(TBool aFlag); + TBool MultipartMixedExists() const; + void SetMultipartMixedExists(TBool aFlag); + TBool MultipartMixedCreated() const; + void SetMultipartMixedCreated(TBool aFlag); + TBool MultipartAlternativeExists() const; + void SetMultipartAlternativeExists(TBool aFlag); + TBool MultipartAlternativeCreated() const; + void SetMultipartAlternativeCreated(TBool aFlag); + TBool MultipartRelatedExists() const; + void SetMultipartRelatedExists(TBool aFlag); + TBool MultipartRelatedCreated() const; + void SetMultipartRelatedCreated(TBool aFlag); + TBool TextPartExists() const; + void SetTextPartExists(TBool aFlag); + TBool TextPartCreated() const; + void SetTextPartCreated(TBool aFlag); + TBool AttachmentEntryCreated() const; + void SetAttachmentEntryCreated(TBool aFlag); + + void FindMultipartRelatedFolderL(); + void CheckForSubfolderL(); + void CreateAttachmentEntryL(); + void CopyOrigMessageToMessageL(); + void CreateMultipartMixedFolderEntryL(); + void CreateMultipartAlternativeFolderEntryL(); + void CreateMultipartRelatedFolderEntryL(); + void MoveOriginalMessageEntryChildrenToNewFolderL(); + void CreateTextEntryL(); + void StoreRichTextL(); + void CompleteStoreMessagePartL(); + void CreateHTMLEntryL(); + void PrepareToStoreHTMLEntryTextL(); + void StoreHTMLEntryTextL(); + void RemoveHTMLEntryL(); + void MoveTextEntryToAltFolderL(); + TPtrC GetDefaultAttachmentName(); + void OpenAndReadResourceFileL(); + void StoreMimeHeaderL(); + TBool CreateAttachmentMimeHeaderL(CImMimeHeader& aMimeHeader, const TDesC& aDetails); + void CreateFolderMimeHeaderL(CImMimeHeader& aMimeHeader); + void CreateMessageMimeHeaderL(CImMimeHeader& aMimeHeader); + void AddAttachmentL(); + void AddAttachmentUsingFileHandleL(); + void AddLinkedAttachmentL(); + void AddEntryAsAttachmentL(); + void CreateAttachmentL(); + void DoAttachmentStoreL(); + TInt CheckMimeInAttachmentInfoL(CMsvMimeHeaders& aMsvMimeHeaders); + CImMimeHeader* ProcessAttachmentMimeHeadersL(); + void SetEntryDetailsL(TMsvEntry& aEntry); + void StorePlainTextL(); +private: + enum TImStoreMessagePartState + { + EFindMultipartRelatedFolder, + ECheckForSubfolder, + ECreateAttachmentEntry, + EStoreAttachment, + ECopyOrigMessageToMessage, + ECreateMultipartMixedFolderEntry, + ECreateMultipartRelatedFolderEntry, + ECreateMultipartAlternativeFolderEntry, + EMoveOriginalMessageEntryChildrenToNewFolder, + ECreateTextEntry, + EStoreRichText, + ERemoveHTMLEntry, + EMoveTextToAlternativeFolder, + ECreateHTMLEntry, + EPrepareToStoreHTMLEntryText, + EStoreHTMLEntryText, + ECompleteStoreMessage, + EFinished + ,EStoreHTMLTextInEntry, + EAddEntryAttachment + }; + + enum TImStoreMessagePartFlags + { + KStoreMessagePartClearFlag = 0x00000000, + KStoreMessagePartHTMLMessage = 0x00000001, + KStoreMessagePartMultipartMixedExists = 0x00000002, + KStoreMessagePartMultipartMixedCreated = 0x00000004, + KStoreMessagePartMultipartAlternativeExists = 0x00000008, + KStoreMessagePartMultipartAlternativeCreated = 0x00000010, + KStoreMessagePartTextPartExists = 0x00000020, + KStoreMessagePartTextPartCreated = 0x00000040, + KStoreMessagePartAttachmentEntryCreated = 0x00000080, + KStoreMessagePartOrigMessageEntryChildrenCopied = 0x00000100, + KStoreMessagePartOrigMessageEntryChildrenDeleted = 0x00000200, + KStoreMessagePartMultipartRelatedExists = 0x00000400, + KStoreMessagePartMultipartRelatedCreated = 0x00000800 + }; + CMsvEntry& iMsvEntry; + CMsvOperation* iMsvOperation; + + CRichText* iRichTextToStore; // I don't own this object! + CImMimeHeader* iMimeHeaderOfBodyText; + CRichText* iRichText; + CFileMan* iFileMan; + CMsvEntrySelection* iMessageEntrySelection; + + TInt iState; + TPckgBuf iDataMember; + TMsvId iMessageId; + TImMessagePart iMessagePart; + TMsvId iMixFolderId; + TMsvId iAltFolderId; + TMsvId iRelFolderId; + HBufC* iAttachmentFullName; + TInt iAttachmentSize; + TMsvId iAttachmentId; + TMsvId iTextId; + TMsvId iHtmlId; + TMsvId iRelatedPartId; + TMsvId iAttachmentMessageId; + TUint32 iFlags; + HBufC8* iContentId; + CImEmailMessage* iEmailMessage; + + // Used when converting rich text to html + CParaFormatLayer* iParaLayer; + CCharFormatLayer* iCharLayer; + CImHtmlConverter* iHtmlConverter; + TBool iFinishedConvertingHTML; + CMsvAttachment* iAttachmentInfo; + CMsvStore* iStore; + TInt iAttachmentCreateState; + TBool iIsAddByFileHandle; + RFile* iFileHandle; + RFile iFile; + // Indicates whether to store message body as CRichText or plaintext. + TBool iUsePlainTextStorage; + // Size of the plain text body. + TInt iSizeOfBody; + // Size of the Fwd'ed/ReplyTo plaintext body part. + TInt iSizeFwdReplyBody; + // The error value returned when CRichText is populated with message body text. + TInt iRestoreErr; + enum TImAttachmentCreation + { + EAddAttachment, + EAddAttachmentUsingFileHandle, + EAddLinkedAttachment, + EAddEntryAsAttachment, + ECreateAttachment + }; + }; + +class CImEmailOperation : public CMsvOperation +/** Provides simple email messages creation functions, including creation of new +messages, replies, forwarded messages, and receipts. + +Both plain-text and HTML messages, with or without attachments, can be created. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard); + + IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority , TBool aUsePlainTextStorage); + + IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority); + IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); + IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard); + IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); + IMPORT_C static CImEmailOperation* CreateForwardAsAttachmentL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateForwardAsAttachmentL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aSmtpServiceId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard); + IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority); + IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); + IMPORT_C ~CImEmailOperation(); + IMPORT_C const TDesC8& FinalProgress(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); + + static CImEmailOperation* CreateCopyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); + +private: + enum TImEmailOperation + { + ENew = 0, + EReply = 1, + EForward = 2, + EReceipt = 3, + EDeletingBadEmail = 4, + ECopy = 5, + EAttachOriginal = 0x80, + EForwardAsAttachment = EForward | EAttachOriginal, + EReplyAsAttachment = EReply | EAttachOriginal + }; + +private: + CImEmailOperation(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); + void ConstructL(TMsvId aMessageId, const TDesC& aFormatString, TImEmailOperation aOperation); + void ConstructL(TMsvId aMessageId, TImEmailOperation aOperation); + void ConstructL(TImEmailOperation aOperation); + void OpenAndReadResourceFileL(); + void SetSmtpServiceFromDefaultsL(); + void SetSmtpServiceFromOriginalMessageL(); + void ErrorRecovery(TInt error); + void SelectNextStateL(); + void ProcessStateL(); + void SelectAndProcessNextStateL(); + void RequestComplete(TInt aError); + void CreateNewHeaderL(); + void GetBodyTextL(); + TInt RemoveIncompleteAttachments(); + void CreateEntryDetails(TMsvEmailEntry& aMsvEmailEntry); + void CreateNewMessageL(TMsvId aDestinationId); + void CreateMultipartMixedFolderEntryL(); + void CreateTextEntryL(TMsvId aFolderId); + void StoreBodyL(); + void StorePlainBodyL(); + void CheckForSignatureOrVCardL(); + void CreateAttachmentEntryL(); + void StoreAttachmentL(); + void CreateMultipartAlternativeFolderEntryL(); + void AppendHtmlAttachmentL(); + void AttachOriginalMessageToNewMessageL(); + void CompleteEmailOperationL(); + void CreateHTMLEntryL(); + void PrepareToStoreHTMLEntryTextL(); + void StoreHTMLEntryTextL(); + void CreateVCardAttachmentL(); + void AddVCardAttachmentL(); + void AddMessageAsAttachmentL(); + TPtrC GetDefaultAttachmentName(); + void RestoreSmtpSettingsL(); + TMsvId ServiceId(); + TBool NeedMultipartMixedFolder() const; + void ReadDefaultHtmlAttachmentNameL(TDes& aFileName); + void CreateDefaultAttachmentL(); + void AddMessageAttachmentInfoL(TMsvId aAttachmentMessageId); + void ResetStoreL(); + void CreateAddressListStringL(HBufC*& aListBuffer, const CDesCArray& aAddressArray); + void RestoreOriginalHeaderL(); + void SetBodyHeaderFormatL(); + static void ClosePlainBodyTextArray(TAny* aPtr); + void StorePlainTextL(); + TInt GetPlainBodyTextSizeL(); + +private: + enum TImEmailOperationState + { + ECreateNewHeader, + EGetBodyText, + EGetAttachmentList, + EGetMessageDigest, + ECreateNewMessageEntry, + ECheckMultipartMixedFolderRequired, + ECreateMultipartMixedFolderEntry, + ECheckMultipartAlternativeFolderRequired, + ECreateMultipartAlternativeFolderEntry, + ECheckTextEntryRequired, + ECreateTextEntry, + EStoreBody, + ECheckVCardRequired, + ECreateVCardAttachment, + EAddVCardAttachment, + ECheckHTMLEntryRequired, + ECreateHTMLEntry, + EPrepareToStoreHTMLEntryText, + EStoreHTMLEntryText, + ECheckAttachOriginalMessageRequired, + EAttachOriginalMessage, + ECheckHTMLPageRequired, + EFindHTMLPage, + ECopyHTMLPartToAttachment, + ECheckAttachmentsRequired, + ECreateAttachmentEntry, + EStoreAttachment, + ECheckEmbeddedMessagesRequired, + EAddEmbeddedMessagesAsAttachments, + ECompleteEmailOperation, + EFinished + ,ECreateDefaultHtmlAttachment, + EStoreHTMLTextInEntry, + EAddMessageAttachmentInfo + }; + + // Flags specifying format of body header information to include + // in reply and forwarded email addresses + enum TImBodyHeaderFormat + { + ENoToCcInfo=0, + EToOnly, + ECcOnly, + EToAndCc + }; + + CMsvEntry* iMsvEntry; + CMsvOperation* iMsvOperation; + + CImHeader* iNewHeader; + CParaFormatLayer* iParaLayer; + CCharFormatLayer* iCharLayer; + CRichText* iRichText; + CImEmailMessage* iEmailMessage; + HBufC* iFormatString; + CFileMan* iFileMan; + CImSmtpSettings* iSmtpSettings; + TInt iState; + TImEmailOperation iOperation; + TMsvId iDestinationId; + TMsvId iMultipartMixedId; + TMsvId iMultipartAlternativeId; + TMsvId iOrigMessageId; + TMsvId iNewMessageId; + TMsvId iSmtpServiceId; + TMsvId iAttachedMessageId; + TUid iMsgType; + TMsvPartList iPartList; + TMsvEmailTypeList iMsvEmailTypeList; + TInt iAttachmentCount; + TInt iTotalAttachments; + TPckgBuf iDataMember; + HBufC* iBodyHeaderFormatString; + HBufC* iBodyHeaderDateTimeFormatString; + HBufC* iBodyHeaderToString; + HBufC* iBodyHeaderCcString; + HBufC* iBodyHeader; + HBufC* iUserEmailAddress; + TInt iRichTextSize; + TInt iVCardAndHtmlSize; + TBool iOrigMessageHtml; + TBool iHtmlNoTextAlt; + TInt iEmbeddedMessagesToProcess; + TImMessageField iMessageField; + + // for MIME messages: + TBool iCreateHtmlMessage; + TBool iMultipartMixedFolderCreated; + TBool iMultipartAlternativeFolderCreated; + TMsvId iTextId; + TMsvId iHtmlId; + TMsvId iVcardId; + + // Used when converting rich text to html + CImHtmlConverter* iHtmlConverter; + TBool iFinishedConvertingHTML; + + // Relating to adding Signature and/or Vcard to an email + TBool iNeedToAddVCardAttachment; + HBufC* iDefaultVCardNameFormatString; + TStreamId iVcardStoreId; + CStreamStore* iVcardStore; + CRichText* iSignatureText; + TFileName iFileName; + TImAttachmentFile iAttachmentFile; + + // PCMail + TMsvId iPCMailServiceId; + RPointerArray iAttachmentInfoList; + // set this anytime during the object life cycle attachment manager was used + TBool iAttachmentMgrUsed; + CMsvStore* iStore; + RFile iFile; + + TImBodyHeaderFormat iBodyHeaderFormat; + CImHeader* iOriginalHeader; + /** Indicates if the body text entry is plain text */ + TBool iUsePlainTextStorage; + // The error value returned when CRichText is populated with message body text. + TInt iRestoreErr; + }; + + +class CImHtmlConverter : public CBase +/** +@internalComponent +@released +*/ + { +public: + static CImHtmlConverter* CImHtmlConverter::NewL(CMsvEntry& aMsvEntry, + CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); + ~CImHtmlConverter(); + void PrepareToStoreHTMLEntryTextL(TMsvId& aHtmlId, const TMsvId aTextId); + void ResetStoreL(); + void ResetStoreWithoutCommit(); + TBool StoreHTMLEntryTextAL(TRequestStatus& aStatus); + CMsvOperation* ChangeHTMLTextInEnrtyL(TRequestStatus& aStatus); + + void ReadDefaultAttachmentNameL( RResourceFile& resourceFile); + TInt Size() const; + +private: + CImHtmlConverter(CMsvEntry& aMsvEntry, CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); + TFileName HtmlFilename(CMsvEntry& aEntry, TPtrC aFileName); + TPtrC GetDefaultAttachmentName(); + void ConstructL(); + +private: + CMsvEntry& iMsvEntry; + CParaFormatLayer& iParaLayer; + CCharFormatLayer& iCharLayer; + + CConverterBase* iToHTMLConverter; + CCnaConverterList* iConverterList; + + TMsvId iTextId; + TMsvId iHtmlId; + TInt iSize; + HBufC* iDefaultAttachmentName; + CRichText* iRichText; + RDesReadStream iSourceStream; + RFileWriteStream iTargetStream; + CMsvStore* iStore; + RFile iFile; + }; + +class CImStoreResolver : public CBase, public MRichTextStoreResolver +/** +@internalComponent +@released +*/ + { +public: + CImStoreResolver(CStreamStore* aStore); + ~CImStoreResolver(); + // +private: + const CStreamStore& StreamStoreL(TInt aPos)const; + // +private: + CStreamStore* iStore; + }; + + + + +#endif // __MIUTMSG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miutpars.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miutpars.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,98 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__MIUTPARS_H__) +#define __MIUTPARS_H__ + +#include + +// comment out line below to switch ON Internet message checking +//#define __NO_EMAIL_ADDRESS_CHECKING__ + +class TImMessageField +/** Parses email message header fields for valid Internet email addresses, +comments and aliases. + +A comment is a string surrounded by parentheses, as defined in RFC822, 3.1.4. + +An alias is defined as any substring which appears to the left of a legal email address: +for example, the string "this is an alias" in "this is an alias ". + +For email addresses, the string being parsed: +1) must contain an @ character, surrounded by valid address characters; +2) may not contain more than one address or @ character; +3) may contain aliases and comments. + +Note the following about the implementation of this class: + +1. Functions that test subject lines, ValidSubjectLine(), and alias names, ValidAliasName(), were +initially written to test that the strings did not contain characters outside a limited +ASCII range. Unicode characters are now allowed, so these functions now always return true. + +2. Of the four overloads of GetValidInternetEmailAddressFromString(), only the first has a meaningful +implementation. + +@publishedAll +@released +*/ + { +public: + IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress); + IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress, TInt& rFirstBadCharPos); + IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); + IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar, TInt& rFirstBadCharPos); + + IMPORT_C TBool ValidInternetEmailAddressChar(const TChar& aChar); + + IMPORT_C TBool ValidSubjectLine(const TDesC16& aSubjectLine); + IMPORT_C TBool ValidSubjectLine(const TDesC16& aSubjectLine, TInt& rFirstBadCharPos); + + IMPORT_C TBool ValidSubjectLineChar(const TChar& aChar); + + IMPORT_C TBool ValidAliasName(const TDesC16& aAliasName); + IMPORT_C TBool ValidAliasName(const TDesC16& aAliasName, TInt& rFirstBadCharPos); + + IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress); + IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress, TInt& rError); + IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); + IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar, TInt& rError); + + IMPORT_C TPtrC16 GetValidAlias(const TDesC16& aAddress); + IMPORT_C TPtrC16 GetValidAlias(const TDesC16& aAddress, TInt& rError); + + IMPORT_C TPtrC16 GetValidComment(const TDesC16& aAddress); + IMPORT_C TPtrC16 GetValidComment(const TDesC16& aAddress, TInt& rError); + TBool TruncateAddressString(const TDesC16& aDesc, TInt aLimit, TInt& aLastChar); +private: + TBool isValidEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); + TBool isLegalEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); + TBool isSurroundedByRoundBrackets(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); + TBool isSurroundedByAngledBrackets(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar, TInt aAtPos); + TBool isEnclosedSubString(const TDesC16& anAddress, const TChar& aLeftBracket, const TChar& aRightBracket,TInt& aLeftPos, TInt& aRightPos); + TBool isValidString(const TDesC16& anAddress, TInt& aFirstBadCharPos); + TBool isValidChar(const TChar& aChar); + TBool isValidEmailString(const TDesC16& anAddress, TInt& aFirstBadCharPos); + TBool isValidEmailChar(const TChar& aChar); + TBool LocateSubString(const TDesC16& anAddress, const TInt atPos, TInt& rFirstChar, TInt& rLastChar); + TBool hasAngledBrackets(const TDesC16& anAddress); + TBool isValid_ISO88591String(const TDesC16& aString,TInt& aPos); + TBool isValidRoutedEmailAddress(const TDesC16& anAddress); + TBool isValidDomainNameChar(const TChar& aChar); + TBool isValidMailboxChar(const TChar& aChar); + TBool isDotChar(const TChar& aChar); + }; + + +#endif // !defined __MIUTPARS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/miutset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/miutset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,92 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__MIUTSET_H__) +#define __MIUTSET_H__ + + + +#include +#include + +const TInt KMaxSettingStringLength = 1024; + +/** UID of an SMTP message type. */ +const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592 +/** UID of a POP3 message type. */ +const TUid KUidMsgTypePOP3 = {0x10001029}; // 268439593 +/** UID of an IMAP4 message type. */ +const TUid KUidMsgTypeIMAP4 = {0x1000102A}; // 268439594 + +/** +@deprecated +*/ +const TUid KUidMsgTypeSMTPServer = {0x10003923}; // 268450083 + + +class CImBaseEmailSettings : public CBase +/** +Parent class for CImPop3Settings, CImImap4Settings, CImSmtpSettings. + +This class should not be instantiated directly. It implements common email +settings such as the hostname or IP address of the server, port number, +and whether or not to use SSL. + +@see CImPop3Settings +@see CImImap4Settings +@see CImSmtpSettings + +@publishedAll +@released +*/ + { +public: + IMPORT_C CImBaseEmailSettings(); + IMPORT_C virtual ~CImBaseEmailSettings(); + IMPORT_C void Reset(); + IMPORT_C const TPtrC ServerAddress() const; + IMPORT_C void SetServerAddressL(const TDesC& aServerAddress); + IMPORT_C TUint Port() const; + IMPORT_C void SetPort(const TUint aPortNumber); + IMPORT_C TBool SecureSockets() const; + IMPORT_C void SetSecureSockets(TBool aFlag); + IMPORT_C TBool SSLWrapper() const; + IMPORT_C void SetSSLWrapper(TBool aFlag); + IMPORT_C CImBaseEmailSettings& CopyL(const CImBaseEmailSettings& aCImBaseEmailSettings); + IMPORT_C TBool operator==(const CImBaseEmailSettings& aCImBaseEmailSettings) const; + IMPORT_C void SetBearerMobility(TBool aFlag); + IMPORT_C TBool BearerMobility() const; + + TUint32 SettingsFlags() const; + void SetSettingsFlags(TUint32 aSetFlags); + +protected: + enum TImBaseEmailSettings + { + EBaseEmailSettingsClearFlag = 0x00000000, + EBaseEmailSettingsSecureSockets = 0x00000001, + EBaseEmailSettingsSSLWrappedSockets = EBaseEmailSettingsSecureSockets << 1, //0x00000002, + EBaseEmailSettingsLastUsedFlag = EBaseEmailSettingsSSLWrappedSockets, //0x00000002 + EBaseEmailSettingsBearerMobFlag = 0x80000000 + }; + TUint32 iPortNumber; // the port the TCP/IP connection be made on + + TUint32 iFlags; // space for flags info (now and for future) + +private: + HBufC* iServerAddress; // remote server's IP address + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/mmmssettingsobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/mmmssettingsobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MMMSSETTINGSOBSERVER_H__ +#define __MMMSSETTINGSOBSERVER_H__ + + +#include + + + +/** +Provides the interface for notification of changes that occur in the Central Repository. + +@see CMmsAccounts::AddObserverL() +@see CMmsAccounts::RemoveObserver() + +@publishedAll +@released +*/ +class MMmsSettingsObserver + { +public: + /** + Settings event. + */ + enum TMmsSettingsEvent + { + /** + Settings have been updated. + */ + ESettingsUpdated + }; +public: + /** + Indicates that a settings event has occurred. + + @param aEvent + The Settings Event + */ + virtual void HandleNotify(TMmsSettingsEvent aEvent) = 0; + }; + +#endif // __MMMSSETTINGSOBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/obexheaderlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/obexheaderlist.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,155 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __OBEXHEADERLIST_H__ +#define __OBEXHEADERLIST_H__ + + + +#include +#include //CBase + +//forward declaration +class RReadStream; +class RWriteStream; +class CObexHeader; +class CObexBaseObject; +class CObexServerSendOperation; + + +class CMsvAttachment; + +const TUid KUidObexHeaders = {0x10204282}; + +class CObexHeaderList : public CBase +/** +Encapsulates and owns a list of CObexHeader objects. +Public users of this class can add CObexHeader objects + +@publishedAll +@released +*/ + { +public: + + /* + It provides functionalities for its friend classes to internalize and + externalize itself from a CMsvStore stream, and add all its contained + CObexHeader objects to a CObexBaseObject, as well as two general list + functions to return the number of objects it contained and a contained + object at a specified index into the list. + */ + friend class CObexServerSendOperation; // requires the use of 'AddHeadersToBaseObjectL' + + /** + * Factory function to return a new CObexHeaderList. + @return New CObexHeaderList object + */ + IMPORT_C static CObexHeaderList* NewL(); + + + /** + * Factory function to return a new CObexHeaderList and leave it on the + * cleanup stack. + @return New CObexHeaderList object + */ + IMPORT_C static CObexHeaderList* NewLC(); + + + /** + * Destructor which frees all allocated memory with the list. + */ + IMPORT_C ~CObexHeaderList(); + + /** + * Add a CObexHeader object to the list. The CObexHeader object added + * should have its attribute, header ID and header value set before + * it is added to the list. CObexHeaderlist will not change these + * values of its contained CObexHeader objects + * @param aHeader Pointer to a constant CObexHeader object + * + * @return KErrNone, if the operation is successful, otherwise + * one of the system wide error codes + */ + IMPORT_C TInt AddHeader(const CObexHeader* aHeader); + + IMPORT_C void ExportToAttachmentL(CMsvAttachment& aAttachment) const; + + IMPORT_C void ImportFromAttachmentL(CMsvAttachment& aAttachment); + + IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const; + + IMPORT_C void InternalizeL(RReadStream& aReadStream); + +protected: + + + + /** + * Add all the CObexHeader objects contained in a list to a + * CObexBaseObject. + * + * + * @param aObexBaseObj CObexBaseObject to add the objects to + * + * @leave Error System wide error code + * + */ + IMPORT_C void AddHeadersToBaseObjectL(CObexBaseObject& aObexBaseObj); + + + //General list processing functions + + /** + * Return the number of CObexHeader object pointers contained in the list. + * + * + * @return The number of CObexHeader object pointers in the list + */ + IMPORT_C TInt Count() const; + + /** + * Get a non constant reference to the CObexHeader object pointer at + * position aPos into the list. + * + * + * @param aPos A list index specifying the CObexHeader object pointer to + * be returned + * + * @leave KErrArgument aPos is out of range + * @leave KErrNotFound The list is empty + * + * @return A non constant reference to the CObexHeader object + * pointer + */ + IMPORT_C CObexHeader*& ObexHeaderL(TInt aPos); + +private: + /** + * Leaving constructor function used in 2 phase construction in NewLC() + */ + void ConstructL(); + + /** + * Constructor function used in 2 phase construction in NewLC() + */ + CObexHeaderList(); + +private: + ///* iObexHeaders; + }; + +#endif // __OBEXHEADERLIST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/phbksync.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/phbksync.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,358 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Phonebook Synchroniser API header file. +// Describes the Phonebook Synchroniser API for use by clients of the +// Phonebook Synchroniser Server. +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __PHBKSYNC_H__ +#define __PHBKSYNC_H__ + +#include +#include +#include +#include +#include + +/** + * Index not supplied. + */ +const TInt KSyncIndexNotSupplied=-1; + + +// +// TUid Phonebook Types used by Contacts Model +// +#define KUidIccPhonebookNotSpecifiedValue 0x101F7874 +#define KUidIccGlobalAdnPhonebookValue 0x101F7875 +#define KUidIccGlobalSdnPhonebookValue 0x101F7876 +#define KUidIccGlobalLndPhonebookValue 0x101F7877 +#define KUidUsimAppAdnPhonebookValue 0x101F7878 +#define KUidIccGlobalFdnPhonebookValue 0x101FB2AF + +const TUid KUidIccPhonebookNotSpecified = {KUidIccPhonebookNotSpecifiedValue}; +const TUid KUidIccGlobalAdnPhonebook = {KUidIccGlobalAdnPhonebookValue}; +const TUid KUidIccGlobalSdnPhonebook = {KUidIccGlobalSdnPhonebookValue}; +const TUid KUidIccGlobalLndPhonebook = {KUidIccGlobalLndPhonebookValue}; +const TUid KUidUsimAppAdnPhonebook = {KUidUsimAppAdnPhonebookValue}; +const TUid KUidIccGlobalFdnPhonebook = {KUidIccGlobalFdnPhonebookValue}; + + +/** + * Types of cancel requests for the asynchronous server requests. + * + * @see RPhoneBookSession::CancelRequest + */ +enum TPhonebookSyncRequestCancel + { + /** Cancel the asynchronous RPhoneBookSession::DoSynchronisation() request */ + EDoSynchronisationCancelClient, + + /** Cancel the asynchronous RPhoneBookSession::DeleteContact() request */ + ESyncDeleteCntFromICCCancelClient, + + /** Cancel the asynchronous RPhoneBookSession::WriteContact() request */ + ESyncWriteCntToICCCancelClient, + + /** Cancel the asynchronous RPhoneBookSession::NotifyPhBkCacheStateChange() request */ + ESyncNotifyCacheStateChangeCancelClient + }; + + +/** + * Class to hold the contact field formats. + * + * @publishedAll + * @released + */ +class TContactFieldFormat + { +public: + TContactFieldFormat(TInt aLength, TInt aCount, TBool aDisplayed); + +public: + /** The maximum length (i.e. number of characters) of the field. If the field is + not a string type this attribute should be ignored. */ + TInt iLength; + + /** The maximum number of instances of this field within an item. This is set to + -1 if this is unlimited. */ + TInt iCount; + + /** Indicates whether this is displayed or hidden. */ + TBool iDisplayed; + }; + + +// +// Forward declare the internal data storage class. +// +class CSyncClientData; + +/** + * Provides the CPhoneBookSyncPlugin client access to a session with the + * Phonebook Synchronizer Server. + * + * A handle to an RPhoneBookSession enables the plug-in class to perform + * IPC communications with the server. + * + * @publishedAll + * @released + */ +class RPhoneBookSession : public RSessionBase + { +public: + /** + * Structure holding the template ID and buffer size. The client has + * no need to use this structure. + * + * @deprecated + */ + struct TTemplateAndBufferSize + { + TContactItemId templateId; + TInt bufferSize; + }; + + /** + * The synchronisation mode for phonebooks when the server starts. + */ + enum TPhonebookSyncMode + { + /** Automatic synchronisation will be performed. */ + EAutoCurrentIcc, + + /** Automatic synchronisation will only be performed if the current ICC is + the same as the last ICC to be synchonised. */ + EAutoSameIcc, + + /** Manual synchronisation will be performed when requested. */ + EManual + }; + + /** + * The phonebook cache state. + */ + enum TSyncState + { + /** The server has not yet populated the Contacts Database. */ + EUnsynchronised, + + /** The server has finished populating the Contacts Database. */ + ECacheValid, + + /** The server encountered an error populating the Contacts Database. */ + EErrorDuringSync + }; + + /** + * Specifies format of phonebook fields within an ICC phonebook entry. + * + * @publishedAll + * @released + */ + class TContactFieldsV1 + { + public: + /** + * Enumeration to describe the version ID of the Phonebook Synchronizer. + */ + enum TContactFieldsExtensionId + { + /** Phonebook Synchronizer version 1 */ + KPhBkSyncTContactFieldsV1, + + /** Phonebook Synchronizer version 2 */ + KPhBkSyncTContactFieldsV2, + + /** Phonebook Synchronizer version 3 */ + KPhBkSyncTContactFieldsV3 + }; + + /** + * Returns the Phonebook Synchronizer API extension number of the class. + * + * @return The version ID from TContactFieldsExtensionId. + */ + IMPORT_C TInt ExtensionId() const; + + /** + * Standard constructor. + */ + IMPORT_C TContactFieldsV1(); + + public: + /** The format of the name field within an ICC phonebook entry. */ + TContactFieldFormat iNameField; + + /** The format of the number field within an ICC phonebook entry. */ + TContactFieldFormat iNumberField; + + /** The format of the ICC slot number field within an ICC phonebook entry. */ + TContactFieldFormat iIccSlotField; + + protected: + TInt iExtensionId; + }; + + /** + * A packaged instance of TContactFieldsV1. + */ + typedef TPckg TContactFieldsV1Pckg; + + /** + * Specifies format of phonebook fields within an UICC phonebook entry + * + * @publishedAll + * @released + */ + class TContactFieldsV2 : public TContactFieldsV1 + { + public: + IMPORT_C TContactFieldsV2(); + + public: + /** The format of any additional number fields within an ICC phonebook entry. */ + TContactFieldFormat iAdditionalNumString; + + /** The format of group field within an ICC phonebook entry. */ + TContactFieldFormat iGroupField; + + /** The format of email field within an ICC phonebook entry. */ + TContactFieldFormat iEmailField; + + /** The UID of the phonebook. */ + TUid iPhonebook; + }; + + /** + * A packaged instance of TContactFieldsV2. + */ + typedef TPckg TContactFieldsV2Pckg; + + + /** + * Specifies additional format information for phonebook fields within a + * UICC phonebook entry. + * + * @publishedAll + * @released + */ + class TContactFieldsV3 : public TContactFieldsV2 + { + public: + IMPORT_C TContactFieldsV3(); + + public: + /** The format of an addition number's text field within an ICC phonebook entry. */ + TContactFieldFormat iAdditionalNumAlphaString; + + /** The format of the second name field within an ICC phonebook entry. */ + TContactFieldFormat iSecondNameField; + }; + + /** + * A packaged instance of TContactFieldsV3. + */ + typedef TPckg TContactFieldsV3Pckg; + + + /** + * The phonebook ID type requested from a phonebook. There are two types of IDs + * (group IDs and template IDs). + * + * @see RPhoneBookSession::GetPhoneBookId() + */ + enum TSyncIdType + { + /** Used to allocate a new entry to the right group in the Contacts Database. */ + ESyncGroupId, + + /** Used to define new ICC entries in the Contacts Database. */ + ESyncTemplateId + }; + +public: + IMPORT_C RPhoneBookSession(); + IMPORT_C TInt Connect(); + IMPORT_C void Close(); + IMPORT_C TVersion Version() const; + IMPORT_C TInt ShutdownServer (TBool aUnconditionally); + + // + // Single (ADN) phonebook support and functions not requiring a phonebook UID. + // + IMPORT_C void DoSynchronisation(TRequestStatus& aReqStatus); + IMPORT_C TInt ValidateContact(MContactSynchroniser::TValidateOperation aOperation, TContactItemId aId); + IMPORT_C void WriteContact(TRequestStatus& aReqStatus, CContactICCEntry& aContactItem, + TInt& aSlotNumber); + IMPORT_C void DeleteContact(TRequestStatus& aReqStatus, TContactItemId aId); + IMPORT_C TInt GetPhoneBookId(TContactItemId& aId, TSyncIdType aIdType); + IMPORT_C TInt UpdateLookuptable(TContactItemId aNewUid, TInt aIccSlot); + IMPORT_C TInt GetContactFormat(TDes8& aContactFields); + IMPORT_C TInt GetSyncMode(TPhonebookSyncMode& aSyncMode); + IMPORT_C TInt SetSyncMode(TPhonebookSyncMode aSyncMode); + IMPORT_C TInt GetPhoneBookCacheState(TSyncState& aState); + IMPORT_C void CancelRequest(TPhonebookSyncRequestCancel aReqToCancel); + IMPORT_C TInt GetLastSyncError(TInt& aError); + IMPORT_C void NotifyPhBkCacheStateChange(TRequestStatus& aStatus); + IMPORT_C TInt GetNumSlots(TInt& aNumSlots) const; + IMPORT_C void GetFreeSlotsL(RArray& aFreeSlots) const; + IMPORT_C TInt GetSlotId(TInt aSlot, TContactItemId& aId) const; + + // + // Multiple phonebooks support. These should be used in preference to the above + // ADN specific versions. + // + IMPORT_C void DoSynchronisation(TRequestStatus& aReqStatus, TUid aPhonebookUid); + IMPORT_C void WriteContact(TRequestStatus& aReqStatus, CContactICCEntry& aContactItem, + TInt& aSlotNumber, TUid& aPhonebookUid); + IMPORT_C TInt GetPhoneBookId(TContactItemId& aId, TSyncIdType aIdType, TUid aPhonebookUid); + IMPORT_C TInt UpdateLookuptable(TContactItemId aNewUid, TInt aIccSlot, TUid aPhonebookUid); + IMPORT_C TInt GetSyncMode(TPhonebookSyncMode& aSyncMode, TUid aPhonebookId); + IMPORT_C TInt SetSyncMode(TPhonebookSyncMode aSyncMode, TUid aPhonebookId); + IMPORT_C TInt GetPhoneBookCacheState(TSyncState& aState, TUid aPhonebookId); + IMPORT_C void CancelRequest(TPhonebookSyncRequestCancel aReqToCancel, TUid aPhonebookId); + IMPORT_C TInt GetLastSyncError(TInt& aError, TUid aPhonebookId); + IMPORT_C void NotifyPhBkCacheStateChange(TRequestStatus& aStatus, TUid aPhonebookId); + IMPORT_C TInt GetNumSlots(TInt& aNumSlots, TUid aPhonebookId) const; + IMPORT_C void GetFreeSlotsL(RArray& aFreeSlots, TUid aPhonebookId) const; + IMPORT_C TInt GetSlotId(TInt aSlot, TContactItemId& aId, TUid aPhonebookId) const; + + // + // Memory checking functionality for Debug builds only. + // + IMPORT_C TInt __DbgMarkHeap(); + IMPORT_C TInt __DbgCheckHeap(TInt aCount); + IMPORT_C TInt __DbgMarkEnd(TInt aCount); + IMPORT_C TInt __DbgFailNext(TInt aCount); + +private: + RPhoneBookSession(const RPhoneBookSession& aSession); + +private: + /* Temporary data used by the session. */ + CSyncClientData* iData; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/pop3cmds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/pop3cmds.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,113 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__POP3CMDS_H__) +#define __POP3CMDS_H__ + +#if !defined (__MSVSTD_HRH__) +#include +#endif + +/** POP3-specific commands that can be issued through CPop3ClientMtm::InvokeAsyncFunctionL(). +@publishedAll +@released +*/ +enum TPop3Cmds + { + /** Unsupported. */ + KPOP3MTMIsConnected = KMtmFirstFreeMtmFunctionId, + /** Attempt to connect to the current service. */ + KPOP3MTMConnect, + /** Disconnect from the current service. */ + KPOP3MTMDisconnect, + /** Unused. */ + KPOP3MTMCreateReceipt, + + // need to pass in destination in aParameter + /** Copy any new messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMCopyNewMailWhenAlreadyConnected, + /** Copy any new messages from the current service, and do not disconnect afterwards. */ + KPOP3MTMConnectAndCopyNewMailAndStayOnline, + /** Copy any new messages from the current service, and disconnect afterwards. */ + KPOP3MTMConnectAndCopyNewMailAndDisconnect, + /** Move any new messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMMoveNewMailWhenAlreadyConnected, + /** Move any new messages from the current service, and do not disconnect afterwards. */ + KPOP3MTMConnectAndMoveNewMailAndStayOnline, + /** Connect to current service, move any new messages, and disconnect afterwards. */ + KPOP3MTMConnectAndMoveNewMailAndDisconnect, + + // need to pass in destination in aParameter + /** Copy the specified messages from the current service, assuming a new connection + does not need to be made. */ + KPOP3MTMCopyMailSelectionWhenAlreadyConnected, + /** Connect to current service, copy the specified messages, and do not disconnect + afterwards. */ + KPOP3MTMConnectAndCopyMailSelectionAndStayOnline, + /** Connect to current service, copy the specified messages, and disconnect afterwards. */ + KPOP3MTMConnectAndCopyMailSelectionAndDisconnect, + /** Move the specified messages from the current service, assuming a new connection + does not need to be made. */ + KPOP3MTMMoveMailSelectionWhenAlreadyConnected, + /** Connect to current service, move the specified messages, and do not disconnect + afterwards. */ + KPOP3MTMConnectAndMoveMailSelectionAndStayOnline, + /** Connect to current service, move the specified messages, and disconnect afterwards. */ + KPOP3MTMConnectAndMoveMailSelectionAndDisconnect, + + // need to pass in destination in aParameter + /** Copy all messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMCopyAllMailWhenAlreadyConnected, + /** Connect to current service, copy all messages, and do not disconnect afterwards. */ + KPOP3MTMConnectAndCopyAllMailAndStayOnline, + /** Connect to current service, copy all messages, and disconnect afterwards. */ + KPOP3MTMConnectAndCopyAllMailAndDisconnect, + /** Move all messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMMoveAllMailWhenAlreadyConnected, + /** Connect to current service, move all messages, and do not disconnect afterwards. */ + KPOP3MTMConnectAndMoveAllMailAndStayOnline, + /** Connect to current service, move all messages, and disconnect afterwards. */ + KPOP3MTMConnectAndMoveAllMailAndDisconnect, + + /** Cancel all offline operations. */ + KPOP3MTMCancelOfflineOperations, + /** Unused. */ + KPOP3MTMCancelSendOnNextConnection, + /** Creates a new message. */ + KPOP3MTMCreateNewEmailMessage, + /** Creates a new reply message. */ + KPOP3MTMCreateReplyEmailMessage, + /** Creates a new forwarded message. */ + KPOP3MTMCreateForwardEmailMessage, + /** Creates a new forwarded message as an attachment. */ + KPOP3MTMCreateForwardAsAttachmentEmailMessage, + /** Creates a new message-receipt message. */ + KPOP3MTMCreateReceiptEmailMessage, + /** Populates the selection of messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMPopulate, + /** Populates any new messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMPopulateNew, + /** Populates all messages from the current service, assuming a new connection does + not need to be made. */ + KPOP3MTMPopulateAll + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/pop3set.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/pop3set.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,293 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__POP3SET_H__) +#define __POP3SET_H__ + + + + +#include +#include +#include + + + +/** Default POP3 server port number. */ +const TUint32 KPOP3DefaultPortNumber = 110; + +/** @deprecated */ +const TInt32 KImPop3SynchroniseAll = -1; + +/** @deprecated */ +const TInt32 KImPop3SynchroniseNone = 0; + +/** +Specifies which parts of a POP3 message to download. Used when configuring the +POP3 service settings. + +@see +CImPop3Settings + +@publishedAll +@released +*/ +enum TPop3GetMailOptions + { + /** Message headers only. */ + EGetPop3EmailHeaders, + /** Complete message. */ + EGetPop3EmailMessages + }; + + +class TPop3Progress +/** +Progress information for a POP3 operation. + +@publishedAll +@released +*/ + { +public: + IMPORT_C TInt ConnectionState() const; + IMPORT_C TInt ConnectionIAP() const; + +public: + /** Defines types of POP3 operations. */ + enum TPop3ProgressType + { + /** Refreshing view of remote mail box. */ + EPopRefreshing, + /** Copying messages. */ + EPopCopying, + /** Deleting messages. */ + EPopDeleting, + /** Connecting to remote mail box. */ + EPopConnecting, + /** Internal reorganisation. */ + EPopTidying, + /** Connected to remote mail box and no current operations. */ + EPopConnectedAndIdle, + /** Disconnecting from remote mail box. */ + EPopDisconnecting, + /** Disconnected from remote mail box. */ + EPopDisconnected, + /** Moving messages. */ + EPopMoving, + /** Copying new messages. */ + EPopCopyNewMail, + /** Moving new messages. */ + EPopMoveNewMail, + /** Copying a selection of messages. */ + EPopCopyMailSelection, + /** Moving a selection of messages. */ + EPopMoveMailSelection, + /** Copying all messages. */ + EPopCopyAllMail, + /** Moving all messages. */ + EPopMoveAllMail, + /** Populating view of remote mail box. */ + EPopPopulating, + /** Cancelling all off-line operations. */ + EPopCancellingOfflineOps, + /** Populating mailbox with top command */ + EPopTopPopulating, + /** Defines the maximum value for this enumeration. */ + EPopMaxProgressValue=EPopTopPopulating + }; + + /** Type of operation for which progress is being reported. */ + TPop3ProgressType iPop3Progress; // holds the progress for a 'super operation' + /** When in the EPopConnecting state, this member holds the connection + stage. Otherwise it holds the total number of messages for the operation. */ + TInt iTotalMsgs; + /** Remaining number of messages to process. */ + TInt iMsgsToProcess; + /** Number of bytes processed by the operation. */ + TInt iBytesDone; + /** When in the EPopConnecting state, this member holds the connection + iap value. Otherwise it holds the total number of bytes to progress for the + operation. */ + TInt iTotalBytes; + /** Operation error code. */ + TInt iErrorCode; // client side needs to be informed of an error + /** Type of the sub-operation, where a nested operations is occurring. */ + TPop3ProgressType iPop3SubStateProgress; // holds the progress for the substate of the 'super operation' + /** Service performing the operation. */ + TMsvId iServiceId; + /** The total size of messages to be downloaded. */ + TInt iTotalSize; // The total size of messages to be downloaded. + }; + + +class TImPop3GetMailInfo +/** +Use to specify the maximum message size and the destination folder ID for +certain POP3 operations. + +@see +CPop3ClientMtm + +@publishedAll +@released +*/ + { +public: + /** Maximum message size for the operation. */ + TInt32 iMaxEmailSize; + /** ID of the destination folder for the operation. */ + TMsvId iDestinationFolder; + }; + +class TImPop3PopulateOptions +/** +Use to specify the population limit for the POP3 top command + +@see +CPop3ClientMtm + +@publishedAll +@released +*/ + { +private: + /** Version of this GetMailInfo class, breaks coding standard by putting a private member at + the beginning to enable unpacking code to check the version before unpacking the rest of the class */ + TInt32 iVersion; + +public: + IMPORT_C TImPop3PopulateOptions(); + IMPORT_C static void UnpackL(const TDesC8& aDesc, TImPop3PopulateOptions &aUnpackTo); + + IMPORT_C TInt MaxEmailSize(); + IMPORT_C void SetMaxEmailSize(TInt aMaxEmailSize); + IMPORT_C TInt PopulationLimit(); + IMPORT_C void SetPopulationLimit(TInt aPopulationLimit); + +private: + /** Maximum message size for the operation. */ + TInt32 iMaxEmailSize; + /** Population limit for Populate operation, set to -1 for total populate */ + TInt32 iPopulationLimit; + /** Construction utility function */ + }; + + +class CImPop3Settings : public CImBaseEmailSettings +/** +Run-time configuration settings for POP3. + +Messaging clients should use an instance of this class to specify +and retrieve configuration settings that are used by the POP3 service when +executing email operations. + +Service settings such as the user name and password, whether to authenticate +using APOP or plain text, the maximum size of an email to download, and the +maximum number of messages to synchronise can be specified using this class. +Storing and restoring from the message store is also supported. + +To use this class to change a setting: +1) Set the current context to the POP3 service entry using CMsvStore. +2) Create an instance of CImPop3Settings and put it on the cleanup stack. +3) Retrieve the existing settings by calling CImPop3Settings::RestoreL(). +4) Change the inbox synchronisation limit setting by calling CImPop3Settings::SetInboxSynchronisationLimit(). +5) Save the new settings by calling CImPop3Settings::StoreL(). +6) Pop and destroy the CImPop3Settings instance. + +@see CMsvStore +@publishedAll +@released +*/ + { +public: + IMPORT_C CImPop3Settings(); + IMPORT_C virtual ~CImPop3Settings(); + IMPORT_C void Reset(); + IMPORT_C const TPtrC8 LoginName() const; + IMPORT_C void SetLoginNameL(const TDesC8&); + IMPORT_C const TPtrC8 Password() const; + IMPORT_C void SetPasswordL(const TDesC8&); + IMPORT_C TBool AutoSendOnConnect() const; + IMPORT_C void SetAutoSendOnConnect(TBool aFlag); + IMPORT_C TBool Apop() const; + IMPORT_C void SetApop(TBool aFlag); + IMPORT_C TBool DisconnectedUserMode() const; + IMPORT_C void SetDisconnectedUserMode(TBool aFlag); + IMPORT_C TBool DeleteEmailsWhenDisconnecting() const; + IMPORT_C void SetDeleteEmailsWhenDisconnecting(TBool aFlag); + IMPORT_C TBool AcknowledgeReceipts() const; + IMPORT_C void SetAcknowledgeReceipts(TBool aFlag); + IMPORT_C TInt MaxEmailSize() const; + IMPORT_C void SetMaxEmailSize(const TInt aMaxEmailSize); + IMPORT_C TPop3GetMailOptions GetMailOptions() const; + IMPORT_C void SetGetMailOptions(TPop3GetMailOptions aGetMailOptions); + IMPORT_C CImPop3Settings& CopyL(const CImPop3Settings& aCImPop3Settings); + IMPORT_C TBool operator==(const CImPop3Settings& aCImPop3Settings) const; + IMPORT_C TInt32 InboxSynchronisationLimit() const; + IMPORT_C void SetInboxSynchronisationLimit(const TInt32 aInboxSyncLimit); + IMPORT_C TInt32 PopulationLimit() const; + IMPORT_C void SetPopulationLimitL(const TInt32 aPopulationLimit); + IMPORT_C void SetTlsSslDomainL(const TDesC8& aDomainName); + IMPORT_C TPtrC8 TlsSslDomain() const; + +private: + class TImPop3SettingsExtension + { + public: + inline TImPop3SettingsExtension(); + public: + HBufC8* iLoginName; + HBufC8* iPassword; + HBufC8* iTlsSslDomain; + TInt32 iPopulationLimit; + }; + inline TImPop3SettingsExtension* Extension() const; + inline void CheckExtensionExistsL(); + + enum TImPop3EmailSettings + { + KPop3SettingsClearFlag = 0x00000000, + KPop3BaseEmailSettingsLastUsedFlag = CImBaseEmailSettings::EBaseEmailSettingsLastUsedFlag, //0x00000002 + KPop3ApopFlag = KPop3BaseEmailSettingsLastUsedFlag << 1, //0x00000004 + KPop3AutoSendFlag = KPop3ApopFlag << 1, //0x00000008 + KPop3DisconnectedModeFlag = KPop3AutoSendFlag << 1, //0x00000010 + KPop3DeleteEmailsWhenDisconnectingFlag = KPop3DisconnectedModeFlag << 1, //0x00000020 + KPop3AcknowledgeReceipts = KPop3DeleteEmailsWhenDisconnectingFlag << 1, //0x00000040 + KPop3EmailSettingsLastUsedFlag = KPop3AcknowledgeReceipts //0x00000040 + }; + + TImPop3SettingsExtension* iExtension; // renamed iReceiptAddress + TInt32 iInboxSyncLimit; + TInt32 iMaxEmailSize; + TPop3GetMailOptions iGetMailOptions; + }; + +inline CImPop3Settings::TImPop3SettingsExtension* CImPop3Settings::Extension() const + { + return iExtension; + } + +inline void CImPop3Settings::CheckExtensionExistsL() + { + if (!iExtension) + iExtension=new (ELeave) CImPop3Settings::TImPop3SettingsExtension; + } + +inline CImPop3Settings::TImPop3SettingsExtension::TImPop3SettingsExtension() : iLoginName(NULL) , iPassword(NULL), iTlsSslDomain(NULL) + { + } + +#endif // #define __POP3SET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/popcmtm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/popcmtm.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,233 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Client MTM for the POP3 protocol +// +// + + +#if !defined (__POPCMTM_H__) +#define __POPCMTM_H__ + +#if !defined (__MIUTMSG_H__) +#include +#endif +#if !defined (__MIUTPARS_H__) +#include //TImMessageField +#endif +#if !defined (__POP3CMDS_H__) +#include // KPOP3MTMConnect etc +#endif +#if !defined (__POP3SET_H__) +#include // KPOP3MTMConnect etc +#endif + +class CImPOP3GetMail; +class CImEmailAutoSend; + +/////// Pop3 Client MTM ///////////////////////////////////////////////////////////////////////////// +class CPop3ClientMtm : public CBaseMtm +/** POP3 client MTM interface. + +Most of the functions in this class are implementations of the virtual functions +defined by the base class CBaseMtm. +@publishedAll +@released +*/ + { +/** +@deprecated +*/ + +public: + enum TImPopcNewEmailHeaderType + { + EForwardedEmail, + EReplyToEmail, + EReceiptToEmail + }; + +public: + IMPORT_C static CPop3ClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); + ~CPop3ClientMtm(); + + void SaveMessageL(); + void LoadMessageL(); + + IMPORT_C void StoreSettingsL(); + IMPORT_C void RestoreSettingsL(); + + CMsvOperation* ReplyL (TMsvId aId, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus); + CMsvOperation* ForwardL(TMsvId aId, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); + + TUint ValidateMessage(TMsvPartList aPartList); + TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); + + void AddAddresseeL(const TDesC& aRealAddress); + void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); + void RemoveAddressee(TInt aIndex); + + IMPORT_C void SetSettingsL(const CImPop3Settings& aSettings); + IMPORT_C const CImPop3Settings& Settings() const; + + // --- RTTI functions --- + TInt QueryCapability(TUid aCapability, TInt& aResponse); + void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); + CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); + + // Attachment functions to support the SendAs API + IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); + EXPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void CreateMessageL(TMsvId aServiceId); + + IMPORT_C virtual TMsvId DefaultServiceL() const; + IMPORT_C virtual void RemoveDefaultServiceL(); + IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); + +protected: + CPop3ClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); + void ConstructL(); + void ContextEntrySwitched(); + +private: + TBool ValidateAddress(const TPtrC& anAddress); + void SendOnNextConnectionL(); + TMsvPartList DoFindL(const TDesC& aTextToFind, TMsvPartList aPartList); + CMsvEntrySelection* FilteredChildrenLC(TBool aNewOnly, TInt aMaxEmailSize); + CMsvEntrySelection* FilteredSelectionLC(TInt aMaxEmailSize, const CMsvEntrySelection& aSelection); + + + +private: + CImPop3Settings* iImPop3Settings; + TImMessageField iTImMessageField; + CImHeader* iHeader; + + HBufC* iEmailAddressFormatString; // defines format of email address used by "Send as" API eg _LIT("/"%S/" <%S>") + CImEmailOperation* iImEmailOperation; + CImPOP3GetMail* iImPOP3GetMail; + }; + + +class CImPOP3GetMail : public CMsvOperation +/** Encapsulates an operation to copy/move POP3 emails from the remote inbox to +any local folder. + +Functionality is provided to: + +1. copy/move any new emails + +2. copy/move a selection of emails + +3. copy/move all emails + +4. in the Remote Inbox to a local folder. + +There are three cases for copying/moving the emails from the Remote Inbox: + +1. the user is connected to the account so just copy/move the emails + +2. the user is not connected to the account so connect, copy/move the emails, +and then disconnect + +3. the user is not connected to the account so connect, copy/move the emails, +and then stay online + +Objects of this type are returned from CPop3ClientMtm::InvokeAsyncFunctionL() +when a suitable get command is requested. +@publishedAll +@released +*/ + { +public: + /** Defines types of get mail operation. */ + enum TImPOP3GetMailType + { + /** Connect and copy new mail and stay online. */ + EConnectAndCopyNewMailAndStayOnline, + /** Connect and copy new mail and disconnect. */ + EConnectAndCopyNewMailAndDisconnect, + /** Connect and move new mail and stay online. */ + EConnectAndMoveNewMailAndStayOnline, + /** Connect and move new mail and disconnect. */ + EConnectAndMoveNewMailAndDisconnect, + /** Connect and copy mail selection and stay online. */ + EConnectAndCopyMailSelectionAndStayOnline, + /** Connect and copy mail selection and disconnect. */ + EConnectAndCopyMailSelectionAndDisconnect, + /** Connect and move mail selection and stay online. */ + EConnectAndMoveMailSelectionAndStayOnline, + /** Connect and move mail selection and disconnect. */ + EConnectAndMoveMailSelectionAndDisconnect, + /** Connect and copy all mail and stay online. */ + EConnectAndCopyAllMailAndStayOnline, + /** Connect and copy all mail and disconnect. */ + EConnectAndCopyAllMailAndDisconnect, + /** Connect and move all mail and stay online. */ + EConnectAndMoveAllMailAndStayOnline, + /** Connect and move all mail and disconnect. */ + EConnectAndMoveAllMailAndDisconnect + }; + +public: + IMPORT_C CMsvOperation* GetMailL(CPop3ClientMtm& aPop3ClientMtm, TRequestStatus& aObserverRequestStatus, const CMsvEntrySelection& aMsvEntrySelection, TDes8& aPop3GetMailInfo, TImPOP3GetMailType aPOP3GetMailType); + IMPORT_C const TDesC8& FinalProgress(); + IMPORT_C ~CImPOP3GetMail(); + void DoCancel(); + void RunL(); + const TDesC8& ProgressL(); +private: + CImPOP3GetMail(CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus, CPop3ClientMtm& aPop3ClientMtm, TImPOP3GetMailType aPOP3GetMailType); + void ConstructL(const CMsvEntrySelection& aMsvEntrySelection, TDes8& aPop3GetMailInfo); + void SelectNextStateL(); // selects next state to go to + void ChangeStateL(); // initiates the next state operation + void SelectAndChangeToNextStateL(); + void RequestComplete(TInt aError); + void Complete(); + void ConnectToMailboxL(); + void CopyMoveNewMessagesL(TBool aCopy); + void CopyMoveMessageSelectionL(TBool aCopy); + void CopyMoveAllMessagesL(TBool aCopy); + void DisconnectFromMailboxL(); + void ResetProgress(); + void StoreProgressL(); +private: + enum TImPOP3GetMailState + { + EConnectToMailbox, + ECopyNewMessages, + EMoveNewMessages, + ECopyMessageSelection, + EMoveMessageSelection, + ECopyAllMessages, + EMoveAllMessages, + EDisconnectFromMailbox, + EFinished + }; + + CPop3ClientMtm& iPop3ClientMtm; + CMsvEntrySelection* iMsvEntrySelection; + CMsvOperation* iMsvOperation; + + TPop3Progress iProgress; + TPop3Progress iErrorProgress; + TImPOP3GetMailState iState; + TImPOP3GetMailType iPOP3GetMailType; + TPckgBuf iProgressBuf; + TPckgBuf iPop3GetMailInfo; + }; + +#endif // __POPCMTM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smcmmain.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smcmmain.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,91 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMUTMAIN_H__ +#define __SMUTMAIN_H__ + +#include + +/** +@deprecated +@internalComponent +*/ +const TInt KSmscSessionPriority = CActive::EPriorityStandard; + +/** +@deprecated +@internalComponent +*/ +_LIT(KSmcmDllName,"SMCM"); + +/** +The panic codes used by the SMS client MTM. + +@internalComponent +@released +*/ +enum TSmcmPanic + { + ESmutPanicUnsupportedMsgType = 0, + ESmscEntryNotSet = 1, + ESmscWrongContextType = 2, + ESmscPanicUnexpectedCommand = 3, + ESmscUnrecognizedEntryType = 4, + ESmscAddresseeIndexOutOfRange = 5, + ESmscRecpAddresseeMiscount = 6, + ESmscDefaultSCOutOfRange = 7, + ESmscVPOutOfRange = 8, +/** +@deprecated Currently not used. +*/ + ESmscRetryLimitOutOfRange = 9, + ESmscBioMsgIdTypeError = 10, + ESmscSettingsNotSet = 11, + ESmscServiceIdNotSet = 12, +/** +@deprecated Currently not used. +*/ + ESmscSimParamWrongType = 13, +/** +@deprecated Currently not used. +*/ + ESmscSimParamExistingOperation = 14, +/** +@deprecated Currently not used. +*/ + ESmscSimParamInvalidProgressCount = 15, +/** +@deprecated Currently not used. +*/ + ESmscWrongCommDbAction = 16, + + ESmscFunctionNotSupported = 17 + }; + +/** +Panic function. + +@param aPanic The panic code. + +@internalComponent +@released +*/ +inline void Panic(TSmcmPanic aPanic) + { + _LIT(KSmcmPanic, "SMCM"); + User::Panic(KSmcmPanic, aPanic); + } + +#endif // __SMUTMAIN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smsclnt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smsclnt.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,209 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMSCLNT_H__ +#define __SMSCLNT_H__ + +#include +#include + + +/** +The UID that indentifies the SMS message editor application. + +This is the response to the query for the KUidMsvMtmQueryEditorUidValue +capability. + +@see CSmsClientMtm::QueryCapability + +@publishedPartner +@released +*/ +const TInt KUidMsgSmsEditorAppVal=0x1000163f; + +/** +The maximum number of SMS PDUs allowed in a concatenated SMS message. + +Together with KSmcmMaxCharsInMessageConcatenated7Bit, this is the response to +the query for the KUidMtmQueryMaxTotalMsgSizeValue capability. + +@see CSmsClientMtm::QueryCapability +@see KSmcmMaxCharsInMessageConcatenated7Bit + +@internalComponent +@released +*/ +const TInt KSmcmMaxMessageNumber=0x32; + +/** +The maximum number of characters in a concatenated SMS PDU. + +Together with KSmcmMaxMessageNumber, this is the response to the query for the +KUidMtmQueryMaxTotalMsgSizeValue capability. + +@see CSmsClientMtm::QueryCapability +@see KSmcmMaxCharsInMessageConcatenated7Bit + +@internalComponent +@released +*/ +const TInt KSmcmMaxCharsInMessageConcatenated7Bit=0x99; + +/** +The maximum number of characters in a non-concatenated SMS PDU. + +This is the response to the query for the KUidMtmQueryMaxBodySizeValue +capability. + +@see CSmsClientMtm::QueryCapability + +@internalComponent +@released +*/ +const TInt KSmcmMaxTotalMsgSize=160; + +/** +The granularity of the in-memory buffer for CRichText objects. + +@see CRichText::NewL + +@internalComponent +@released +*/ +const TInt KSmcmRichTextConstant=256; + +class CSmsHeader; +class CSmsMessage; +class CSmsSettings; +class TSmsUtilities; +class CSmsSimParamOperation; +class CMobilePhoneSmspList; +class RResourceFile; + +/** +The SMS client MTM interface. + +Most of the functions in this class are implementations of the virtual functions +defined by the base class CBaseMtm. + +An object of this class can be obtained from the Client MTM registry. The message +server provides the necessary information required by the registry to provide +the SMS client MTM. + +All client MTM objects have a current context. This is an entry in the message +store that will be manipulated by certain APIs supplied by the MTM. If the +current context is not set then certain APIs will panic. + +The CBaseMtm::HasContext API can be used to check that the current context has +been set. It can be set using either the CBaseMtm::SwitchCurrenEntryL API or the +CBaseMtm::SetCurrentEntryL API. + +@see CClientMtmRegistry +@see CBaseMtm::HasContext +@see CBaseMtm::SetCurrentEntryL +@see CBaseMtm::SwitchCurrenEntryL + +@publishedAll +@released +*/ +class CSmsClientMtm : public CBaseMtm + { +public: + + IMPORT_C static CSmsClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aSession); + virtual ~CSmsClientMtm(); + + void HandleEntryEvent(enum MMsvEntryObserver::TMsvEntryEvent,TAny*,TAny*,TAny*); + + inline CSmsHeader& SmsHeader(); + inline const CSmsHeader& SmsHeader() const; + inline CSmsSettings& ServiceSettings(); + inline const CSmsSettings& ServiceSettings() const; + inline TInt ServiceId() const; + + IMPORT_C void RestoreServiceAndSettingsL(); + IMPORT_C CSmsSimParamOperation* ReadSimParamsL(TRequestStatus& aObserverRequestStatus); + IMPORT_C CSmsSimParamOperation* WriteSimParamsL(const CMobilePhoneSmspList& aList, TRequestStatus& aObserverRequestStatus); + + /** + Sets the character encoding value. The character encoding value options are 7-bit, + 8-bit and 16-Bit Unicode. By default the character set encoding is 7 bit encoding. + */ + void SetMessageCharacterSetL(TSmsDataCodingScheme::TSmsAlphabet aTsmsAlphabet); + +public: // methods from CBaseMtm + + virtual void SaveMessageL(); + virtual void LoadMessageL(); + virtual TMsvPartList ValidateMessage(TMsvPartList aPartList); + virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); + virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); + virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); + virtual void AddAddresseeL(const TDesC& aRealAddress); + virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); + virtual void RemoveAddressee(TInt aIndex); + virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); + virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter); + virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); + + IMPORT_C void CreateMessageL(TMsvId aServiceId); + IMPORT_C void BioTypeChangedL(TUid aBioTypeUid); + +protected: + /** + Methods from CBaseMtm, The implementation of this function assumes that + the new service for setting the charset encoding value for a SMS message is supported. + */ + IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); + +private: + + CSmsClientMtm(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aSession); + void ConstructL(); + + void BasicReplyForwardEntry(TMsvEntry& aNewEntry) const; + CMsvOperation* CreateNewEntryL(TMsvEntry& aNewEntry, TMsvId aDestination,CSmsHeader& aSmsHeader,const CRichText& aBody, TRequestStatus& aCompletionStatus); + TBool ValidRecipients() const; + TBool ValidNumber(const TDesC& aNumber) const; + +private: // methods from CBaseMtm + + virtual void ContextEntrySwitched(); + +private: + + void DoAddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); + void AddRecipientL(const TDesC& aRealAddress, const TDesC& aAlias); + void DoAddRecipientL(CSmsHeader* aSmsHeader, const TDesC& aRealAddress, const TDesC& aAlias); + void ResetHeader(); + TMsvPartList DoFindL(const TDesC& aTextToFind,TMsvPartList aPartList); + void FindL(const TDesC& aTextToFind, const TMsvPartList aPartList,TMsvPartList& aFoundList); + void FindInBodyL(const TDesC& aTextToFind, const TMsvPartList& aFoundList, TMsvPartList& aResult); + HBufC* ReadEmailSubjectFormatL(RResourceFile& aResourceFile, TInt aResourceId, const TDesC& aDefaultFormat); + +private: + + CSmsSettings* iServiceSettings; + TMsvId iServiceId; + CSmsHeader* iSmsHeader; + TChar iRealAddressOpen; + TChar iRealAddressClose; + HBufC* iEmailForwardSubjectFormat; + HBufC* iEmailReplySubjectFormat; + }; + +#include + +#endif // __SMSCLNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smscmds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smscmds.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,329 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMSCMDS_H__ +#define __SMSCMDS_H__ + +#include + +/** +Numeric value of the first SMS-specific command. + +This is only used by TSmsMtmCommand. + +@see TSmsMtmCommand + +@internalComponent +@released +*/ +const TInt KMinCommandExpected = 10000; + +/** +The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL. + +SMS messages can be stored in a medium other than the message store itself. For +instance, SMS messages can be stored on the SIM card. This alternative storage +is referred to as the phone store. + +Some of the commands defined allow the contents of the phone store to accessed +and manipulated. + +@see CSmsClientMtm::InvokeAsyncFunctionL +@see CSmsClientMtm::ReadSimParamsL +@see CSmsClientMtm::WriteSimParamsL +@see TSmsProgress + +@publishedAll +@released +*/ +enum TSmsMtmCommand + { +/** +Gets the service centre address (i.e. telephone number) from the GSM handset. + +The result may be retrieved from the iServiceCenterAddress member variable +in the TSmsProgress progress object for this operation. + +The aSelection and aParameter arguments are not used by this command, except +that aSelection must contain at least one member, preferably the SMS Service +ID. + +If the telephone handset is unable to supply the service centre address, then +the progress object for this operation will contain the error. + +NOTE - ESmsMtmCommandReadServiceCenter should only be used if the telephone +handset or TSY module does not support reading the SMS parameters on the SIM. +ESmsMtmCommandReadServiceCenter should only be used if the operation +returned by CSmsClientMtm::ReadSimParamsL completes with KErrNotSupported. + +@removed +This command is not supported from v7.0. The function CSmsClientMtm::ReadSimParamsL +should be used instead to obtain Service Centre number from the phone store. + +@see CSmsClientMtm::ReadSimParamsL +@see TSmsProgress +*/ + ESmsMtmCommandReadServiceCenter = KMinCommandExpected, + +/** +Sets a new service centre address (i.e. telephone number) on the GSM handset. + +The new telephone number is passed in aParameter as an 8-bit descriptor containing +a packaged TSmsServiceCenterAddress. + +The aSelection parameter argument is not used by this command, except that +aSelection must contain at least one member, preferably the SMS Service ID. + +@removed +This command is not supported from v7.0. The function CSmsClientMtm::WriteSimParamsL +should be used instead to write the Service Centre number to the phone store. + +@see CSmsClientMtm::WriteSimParamsL +@see TSmsServiceCenterAddress +*/ + ESmsMtmCommandWriteServiceCenter, + +/** +Schedules the selected SMS messages to be sent. + +The aSelection argument contains the TMsvId of the SMS messages to be sent. An +empty selection will cause a panic in debug mode. In release mode nothing will +happen. + +The time that each message is scheduled to be sent is set by the date field in +the TMsvEntry for that message. Each message in the selection must have the same +scheduled time as the first message in the selection. A send task is scheduled +to occur at this time. + +In debug mode a panic will occur if all the messages in the selection do not +have the safe scheduled time. In release mode, the scheduled time sending all +the messages in the selection will be that of the last message in the selection. + +When the scheduled task occurs not only will the selected messages be sent but +also any waiting SMS messages in the Outbox. + +If the messages are successfully sent by the scheduled task, then all the sent +messages are moved to the Sent folder. + +If any message fails to be sent then the message is marked as failed. Also it +may be re-scheduled to be sent at a later time if that particular error has been +specified as a re-schedulable error. The message remains in its current folder. + +The aParameter agrument is not used. + +@see CMsvSession::TransferCommandL + +@see CBaseMtm::InvokeAsyncCommandL + +*/ + ESmsMtmCommandScheduleCopy, + +/** +Not supported by the SMS MTM. + +@internalComponent +*/ + ESmsMtmCommandScheduleMove, + +/** +Removes all messages specified in aSelection from the task scheduler list. + +If successful, the messages will have their SendingState() set to KMsvSendStateSuspended +on completion of this operation. + +The aParameter argument is not used by this function. + +@see TMsvEntry::SendingState() +*/ + ESmsMtmCommandDeleteSchedule, + +/** +Checks the current scheduled status of the messages specified by aSelection. + +If successful, the Scheduled() and iDate members of each TMsvEntry identified +in the selection will be changed to represent that messages's current status. + +The aParameter argument is not used by this function. + +@see TMsvEntry +*/ + ESmsMtmCommandCheckSchedule, + +/** +Starts sending the specified selection of SMS messages. + +When a selection of SMS messages are scheduled to be sent using the ESmsMtmCommandScheduleCopy +command this is the actual command that is executed the scheduled time occurs. + +The SMS server MTM creates a package contain this command. The package is passed +to the task scheduler who then passes it to the schedule send exe. The exe then +uses the package to ask the SMS server MTM to send the messages. As such this +command should not be used be external clients. + +When the scheduled task occurs not only will the selected messages be sent but +also any waiting SMS messages in the Outbox. + +If the messages are successfully sent by the scheduled task, then all the sent +messages are moved to the Sent folder. + +If any message fails to be sent then the message is marked as failed. Also it +may be re-scheduled to be sent at a later time if that particular error has been +specified as a re-schedulable error. The message remains in its current folder. + +@internalComponent +*/ + ESmsMtmCommandSendScheduledCopy, + +/** +Not supported by the SMS MTM. + +@internalComponent +*/ + ESmsMtmCommandSendScheduledMove, + +/** +Reads the SMS messages on the phone store and creates a copy of those messages +in an invisible folder under the SMS service in the message store. + +If successful, the iEnumerateFolder member of the operation's progress will +identify the invisible folder which contains the messages read from the phone +store. + +The aSelection argument must contain at least the SMS servive ID. The aParameter +argument can optionally be a TPckgC containing the ID of an existing folder to +use for the enumeration. The contents of this folder will be replaced with the +current messages in the phone store. + +The operation will fail with KErrArgument if the ID in aParameter is one of the +following - KMsvRootIndexEntryId, KMsvLocalServiceIndexEntryId, KMsvGlobalInBoxIndexEntryId, +KMsvGlobalOutBoxIndexEntryId, KMsvDraftEntryId or KMsvSentEntryId. + +This command must be called before using ESmsMtmCommandCopyFromPhoneStore, +ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore. + +Pre v7.0, this was named ESmsMtmCommandEnumerateSim. + +@see TSmsProgress +*/ + ESmsMtmCommandEnumeratePhoneStores, + +/** +Moves the messages identified in aSelection to the folder identified in aParameter +(e.g. the inbox). + +The associated SMS messages are not deleted from the phone store. + +The first entry ID in aSelection must be the SMS service ID. All following +entry IDs in the selection must then represent each message to be transferred. +aParameter should contain a packaged TMsvId, which identifies the folder to +which the messages in aSelection will be moved. + +The command ESmsMtmCommandEnumeratePhoneStores must be called before using +this command. + +Pre v7.0, this was named ESmsMtmCommandCopyFromSim. + +@see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores +*/ + ESmsMtmCommandCopyFromPhoneStore, + +/** +Moves the messages identified in aSelection to the folder identified in aParameter +(e.g. the inbox), and then deletes the messages from the phone store. + +The first entry ID in aSelection must be the SMS service ID. All following +entry IDs in the selection must then represent each message to be transferred. +aParameter should contain a packaged TMsvId, which identifies the folder to +which the messages in aSelection will be moved. + +The command ESmsMtmCommandEnumeratePhoneStores must be called before using +this command. + +Pre v7.0, this was named ESmsMtmCommandMoveFromSim. + +@see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores +*/ + ESmsMtmCommandMoveFromPhoneStore, + +/** +Deletes the specified messages from the phone store. + +The first entry ID in aSelection must be the SMS service ID. All following +entry IDs in the selection must then represent each message to be deleted. +aParameter is not used. + +The command ESmsMtmCommandEnumeratePhoneStores must be called before using +this command. + +Pre v7.0, this was named ESmsMtmCommandDeleteFromSim. + +@see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores +*/ + ESmsMtmCommandDeleteFromPhoneStore, + +/** +Reads the SIM parameters. + +This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The +CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters. + +@see CSmsClientMtm::ReadSimParamsL + +@internalComponent +*/ + ESmsMtmCommandReadSimParams, + +/** +Writes the specified SIM parameters. + +This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The +CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters. + +@see CSmsClientMtm::WriteSimParamsL + +@internalComponent +*/ + ESmsMtmCommandWriteSimParams, + +/** +Copies the SMS messages identified in aSelection to the phone store. + +The first entry ID in aSelection must be the SMS service ID. All following +entry IDs in the selection must then represent each message to be copied. +Single message with multiple recipients is copied onto SIM as multiple messages, +one message for each recipient.Copy/Move from SIM will result in multiple messages, +single message will not be reformed out of the mutiple messages on SIM. + + +Pre v7.0, this was named ESmsMtmCommandCopyToSim. +*/ + ESmsMtmCommandCopyToPhoneStore, + +/** +Moves the SMS messages identified in aSelection to the phone store. + +The first entry ID in aSelection must be the SMS service ID. All following +entry IDs in the selection must then represent each message to be moved. +SSingle message with multiple recipients is moved onto SIM as multiple messages, +one message for each recipient.Copy/Move from SIM will result in multiple messages, +single message will not be reformed out of the mutiple messages on SIM. + + +Pre v7.0, this was named ESmsMtmCommandMoveToSim. +*/ + ESmsMtmCommandMoveToPhoneStore + }; + +#endif // __SMSCMDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smtcmtm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smtcmtm.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,154 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SMTCPMTM.H +// Client MTM for the SMTP protocol +// +// + +#if !defined (__SMTCMTM_H__) +#define __SMTCMTM_H__ + +#if !defined (__E32BASE_H__) +#include // CActive, TFileName) +#endif + +#if !defined(__BADESCA_H__) +#include +#endif + +#if !defined (__MSVAPI_H__) +#include +#endif + +#if !defined (__MTCLBASE_H__) +#include +#endif + +#if !defined (__MIUTHDR_H__) +#include +#endif + +#if !defined (__MIUTPARS_H__) +#include //TImMessageField +#endif + +#if !defined (__MIUTMSG_H__) +#include //CImEmailMessage +#endif + +#if !defined (__SMTPSET_H__) +#include +#endif + +#if !defined (__SMTPCMDS_H__) +#include +#endif + +class CMsvEntry; +class CMtmDllRegistry; +class CRichText; +class TMsvEntry; +class CRegisteredMtmDll; +class CImSmtpSettings; +class CMsvSession; +class CImAttachmentWaiter; + +/////// Smtp Client MTM ///////////////////////////////////////////////////////////////////////////// +class CSmtpClientMtm : public CBaseMtm +/** SMTP client MTM interface. + +Most of the functions in this class are implementations of the virtual functions +defined by the base class CBaseMtm. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CSmtpClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); + ~CSmtpClientMtm(); + + void SaveMessageL(); + void LoadMessageL(); + + IMPORT_C void StoreSettingsL(); + IMPORT_C void RestoreSettingsL(); + + CMsvOperation* ReplyL (TMsvId aReplyEntryId, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus); + CMsvOperation* ForwardL(TMsvId aForwardEntryId, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); + + TMsvPartList ValidateMessage(TMsvPartList aPartList); + TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); + + // addresssee list (used by objects with no MTM knowledge) + void AddAddresseeL(const TDesC& aRealAddress); + void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); + void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress); + void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress, const TDesC& aAlias); + void RemoveAddressee(TInt aIndex); + + IMPORT_C void SetSettingsL(const CImSmtpSettings& aSettings); + IMPORT_C const CImSmtpSettings& Settings() const; + IMPORT_C void SetSubjectL(const TDesC& aSubject); + IMPORT_C const TPtrC SubjectL() const; + + // --- RTTI functions --- + TInt QueryCapability(TUid aCapability, TInt& aResponse); + void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter); + CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); + + // Attachment functions to support the SendAs API + IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); + IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void CreateMessageL(TMsvId aServiceId); + + IMPORT_C virtual TMsvId DefaultServiceL() const; + IMPORT_C virtual void RemoveDefaultServiceL(); + IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); + IMPORT_C void CancelAttachmentOperation(); + +protected: + CSmtpClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); + void ConstructL(); + + void ContextEntrySwitched(); // called after the context of this instance has been changed to another entry +private: + TBool ValidateAddress(const TPtrC& anAddress); + void ResetData(); + + void RestoreEmailMessageL(); + void StoreEmailMessageL(); + void SetAddresseeListL(); + void GetBodyTextL(CImEmailMessage& aMessage, TMsvId aMsvId); + TInt32 GetAttachmentSizeL(CImEmailMessage& aMessage, TMsvId aMsvId); + TMsvPartList DoFindL(const TDesC& aTextToFind, TMsvPartList aPartList); + +private: + CMsvOperationActiveSchedulerWait* iWait; + CImSmtpSettings* iImSmtpSettings; + CImHeader* iHeader; + HBufC* iSubject; + + TImMessageField iTImMessageField; + HBufC* iEmailAddressFormatString; // defines format of email address used by "Send as" API eg _LIT("/"%S/" <%S>") + CMsvEntrySelection* iEntrySelection; + CImEmailOperation* iImEmailOperation; + CImAttachmentWaiter* iAttachmentWaiter; + CImEmailMessage* iEmailMessage; + }; + + +#endif // __SMTCMTM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smtpcmds.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smtpcmds.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__SMTPCMDS_H__) +#define __SMTPCMDS_H__ + +#if !defined (__MSVSTD_HRH__) +#include +#endif + +/** SMTP-specific commands that can be issued through CSmtpClientMtm::InvokeAsyncFunctionL(). +@publishedAll +@released +*/ +enum TSmtpCmds + { + /** Not supported. */ + KSMTPMTMIsConnected = KMtmFirstFreeMtmFunctionId, + /** Send messages on next connection. + + The first entry in aSelection specifies the SMTP service entry that is to + be used to send the email messages. aSelection may contain only one entry + ID. The SMTP MTM will append the Ids of all "ready" email messages which exist + in the outbox that match the IAP of the specified SMTP service. Whether an + email message is "ready" is determined from its TMsvEntry::SendingState() + flag. + + If an Internet connection has already been established by another client, + then this function may fail with KSmtpNoMsgsToSendWithActiveSettings if none + of the messages specified in aSelection match the IAP currently in use. */ + KSMTPMTMSendOnNextConnection, + /** Creates a new message. */ + KSMTPMTMCreateNewEmailMessage, + /** Creates a new reply message. */ + KSMTPMTMCreateReplyEmailMessage, + /** Creates a new forwarded message. */ + KSMTPMTMCreateForwardEmailMessage, + /** Creates a new forwarded message as an attachment. */ + KSMTPMTMCreateForwardAsAttachmentEmailMessage, + /** Creates a new message-receipt message. */ + KSMTPMTMCreateReceiptEmailMessage + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smtpset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smtpset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,325 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__SMTPSET_H__) +#define __SMTPSET_H__ + + +#include +#include + +/** Default SMTP server port number.*/ +const TUint32 KSMTPDefaultPortNumber = 25; + +/** Default/maximum addresses to include in body header of reply/forward messages */ +const TInt KSmtpToCcIncludeLimitDefault = 0; +const TInt KSmtpToCcIncludeLimitMax = KMaxTInt; + + +/** +Defines options that allows the user to automatically email themselves a copy +of all emails that are sent from the phone. + +@see CImSmtpSettings::SendCopyToSelf() + +@publishedAll +@released +*/ +enum TImSMTPSendCopyToSelf + { + /** Do not send a copy. */ + ESendNoCopy, + /** Send a copy, with the user's address added to the To address list. */ + ESendCopyAsToRecipient, + /** Send a copy, with the user's address added to the Cc: address list. */ + ESendCopyAsCcRecipient, + /** Send a copy, with the user's address added to the Bcc: address list. */ + ESendCopyAsBccRecipient + }; +/** +Defines sending options for new email messages. + +The option has no direct effect on the SMTP MTM, although messages in the +outbox which are marked as ESendMessageOnNextConnection or ESendMessageImmediately +will be appended automatically to the list of messages supplied by the client +when either CBaseServerMtm::CopyFromLocal() or CBaseServerMtm::MoveFromLocal() +are called. + +@publishedAll +@released +*/ +enum TImSMTPSendMessageOption + { + /** Send message immediately. */ + ESendMessageImmediately, + /** Send message when the next connection occurs. */ + ESendMessageOnNextConnection, + /** Send message only when the user requests this. */ + ESendMessageOnRequest + }; + +/** +Defines status values for the SMTP MTM. + +@publishedAll +@released +*/ +enum TMsgImOutboxSendState + { + /** Idle. */ + EMsgOutboxProgressWaiting, + /** Connecting to server. */ + EMsgOutboxProgressConnecting, + /** Sending messages. */ + EMsgOutboxProgressSending, + /** Sending complete. */ + EMsgOutboxProgressDone + }; + +/** Sending state for SMTP. + +@publishedAll +@released +*/ +enum TSmtpSessionState + { + /** Dialling, looking up DNS, or connecting to SMTP server. */ + EConnectingToSmtp, + /** Waiting for the SMTP server to send welcome message. */ + EWaitingForReply, + /** Sending HELO/EHLO command to the server. */ + EAuthorisingSmtp, + /** Sending the STARTTLS command, if a secure connection was requested. */ + ESendingStarttls, + /** Exchanging certificates with server, if a secure connection was requested. */ + ESettingSecurity, + /** Sending a message to the server. */ + ESendingImail, + /** Logging result. */ + ELogDataEvent, + /** Disconnecting from the SMTP server. */ + EClosingSmtp, + /** AUTH in progress. */ + EAuthInProgress, + /** RSET in progress. */ + EResetSmtp + }; + +class TImImailFileProgress +/** +Status information about the SMTP message which is being sent. + +@publishedAll +@released +*/ + { +public: + /** + Amount of data from the message already sent to the server in bytes. + + Note that the SMTP MTM encodes the text and binary data inside an email message + while it is sending the data. As a result, iBytesToSend is likely to increase + (by as much as one third) while a message is being sent. The size increase + represents all additional bytes which have been added to the RFC 822 message + to encode the data. + */ + TInt iBytesSent; + /** Amount of data from the message still to be sent to the server in bytes. */ + TInt iBytesToSend; + /** Sending state. */ + TSmtpSessionState iSessionState; + }; + +class TImSmtpProgress +/** +Progress information for SMTP operations on the Internet Mail MTM. + +The information is obtained through calling CMsvOperation::Progress() +on the operation. It is packaged into an 8-bit descriptor. + +Messaging clients use the getter functions to get various types +of information about an operation's progress. The setter functions +are for use by the MTM. + +@publishedAll +@released +*/ + { + +public: + IMPORT_C TMsgImOutboxSendState Status() const; // Progress: current progress status of mail session + IMPORT_C TInt MsgNo() const; // Progress: No. of message currently being sent; zero=1st message + IMPORT_C TInt Error() const; // Summary: completion code from end of last session + IMPORT_C TInt Sent() const; // Summary: No. messages sent successfully + IMPORT_C TInt NotSent() const; // Summary: No. messages I didn't attempt to send + IMPORT_C TInt FailedToSend() const; // Summary: No. messages attempted to send but failed + IMPORT_C TInt SendTotal() const; // Sent() + NotSent() + FailedToSend() = SendTotal() + IMPORT_C void SetError(TInt anError); + IMPORT_C void SetStatus(TMsgImOutboxSendState aStatus); + IMPORT_C void SetMsgNo(TInt aMsgNo); + IMPORT_C void InitialiseTotal(const TInt& aTotal); + IMPORT_C void UpdateSent(); + IMPORT_C void UpdateFailedToSend(); + IMPORT_C void DecrementSendTotal(); + IMPORT_C TMsvId ServiceId() const; + IMPORT_C void SetServiceId(TMsvId aServiceId); + IMPORT_C TInt ConnectionState() const; + IMPORT_C TInt ConnectionIAP() const; + IMPORT_C void SetConnectionIAP(TInt aConnectionIAP); + +public: + /** Status information about the message that is currently being sent (if + sending is in progress). */ + TImImailFileProgress iSendFileProgress; + +private: + TMsgImOutboxSendState iStatus; + TInt iError; + TInt iMsgNo; + TInt iSent; + TInt iNotSent; + TInt iFailedToSend; + TInt iSendTotal; + TMsvId iServiceId; + }; + +class CImSmtpSettings : public CImBaseEmailSettings +/** +Run-time configuration settings for an SMTP account. + +Messaging clients should use an instance of this class to specify +and retrieve configuration settings that are used by the SMTP service when +executing email operations. + +Service settings such as the email body encoding, reply address, character set, +and whether to attach a signature or vCard can be specified using this class. +Storing and restoring from the message store is also supported. + +To use this class to change a setting: + +1) Set the current context to the SMTP service entry using CMsvStore. + +2) Create an instance of CImSmtpSettings and put it on the cleanup stack. + +3) Retrieve the existing settings by calling CImSmtpSettings::RestoreL(). + +4) Specify whether to add a vCard to outbound email by calling CImSmtpSettings::SetAddVCardToEmail(). + +5) Save the new settings by calling CImSmtpSettings::StoreL(). + +6) Pop and destroy the CImSmtpSettings instance. + +@see CMsvStore + +@publishedAll +@released +*/ + { +public: + IMPORT_C CImSmtpSettings(); + IMPORT_C virtual ~CImSmtpSettings(); + IMPORT_C void Reset(); + IMPORT_C const TPtrC EmailAlias() const; + IMPORT_C void SetEmailAliasL(const TDesC& aEmailAlias); + IMPORT_C const TPtrC EmailAddress() const; + IMPORT_C void SetEmailAddressL(const TDesC& aEmailAddress); + IMPORT_C const TPtrC ReplyToAddress() const; + IMPORT_C void SetReplyToAddressL(const TDesC& aReplyToAddress); + IMPORT_C const TPtrC ReceiptAddress() const; + IMPORT_C void SetReceiptAddressL(const TDesC& aReceiptAddress); + IMPORT_C TMsgOutboxBodyEncoding BodyEncoding() const; + IMPORT_C void SetBodyEncoding(TMsgOutboxBodyEncoding aBodyEncoding); + IMPORT_C const TUid DefaultMsgCharSet() const; + IMPORT_C void SetDefaultMsgCharSet(TUid aDefaultMsgCharSet); + IMPORT_C TBool AddVCardToEmail() const; + IMPORT_C void SetAddVCardToEmail(TBool aFlag); + IMPORT_C TBool AddSignatureToEmail() const; + IMPORT_C void SetAddSignatureToEmail(TBool aFlag); + IMPORT_C TBool RequestReceipts() const; + IMPORT_C void SetRequestReceipts(TBool aFlag); + IMPORT_C TImSMTPSendCopyToSelf SendCopyToSelf() const; + IMPORT_C void SetSendCopyToSelf(TImSMTPSendCopyToSelf aSendCopyToSelf); + IMPORT_C TImSMTPSendMessageOption SendMessageOption() const; + IMPORT_C void SetSendMessageOption(TImSMTPSendMessageOption aSendMessageOption); + IMPORT_C CImSmtpSettings& CopyL(const CImSmtpSettings& aCImSmtpSettings); + IMPORT_C TBool operator==(const CImSmtpSettings& aCImSmtpSettings) const; + IMPORT_C const TPtrC8 LoginName() const; + IMPORT_C void SetLoginNameL(const TDesC8&); + IMPORT_C const TPtrC8 Password() const; + IMPORT_C void SetPasswordL(const TDesC8&); + IMPORT_C TBool SMTPAuth() const; + IMPORT_C void SetSMTPAuth(TBool aFlag); + IMPORT_C TBool InboxLoginDetails() const; + IMPORT_C void SetInboxLoginDetails(TBool aFlag); + IMPORT_C TInt ToCcIncludeLimit() const; + IMPORT_C void SetToCcIncludeLimitL(TInt aLimit); + IMPORT_C void SetTlsSslDomainL(const TDesC8& aDomainName); + IMPORT_C TPtrC8 TlsSslDomain() const; + +private: + class TImSmtpSettingsExtension + { + public: + inline TImSmtpSettingsExtension(); + public: + HBufC* iReceiptAddress; + HBufC8* iLoginName; + HBufC8* iPassword; + HBufC8* iTlsSslDomain; + TInt iToCcIncludeLimit; + }; + + inline TImSmtpSettingsExtension* Extension() const; + inline void CheckExtensionExistsL(); + +private: + enum TImSMTPEmailSettings + { + KSmtpSettingsClearFlag = 0x00000000, + KSmtpBaseEmailSettingsLastUsedFlag = CImBaseEmailSettings::EBaseEmailSettingsLastUsedFlag, //0x00000002 + KSmtpAddVCardToEmailFlag = KSmtpBaseEmailSettingsLastUsedFlag << 1, //0x00000004 + KSmtpAddSignatureToEmailFlag = KSmtpAddVCardToEmailFlag << 1, //0x00000008 + KSmtpRequestReceipts = KSmtpAddSignatureToEmailFlag << 1, //0x00000010 + KSmtpSmtpAuthFlag = KSmtpRequestReceipts << 1, //0x00000020 + KSmtpInboxLoginDetails = KSmtpSmtpAuthFlag << 1, //0x00000040 + KSmtpEmailSettingsLastUsedFlag = KSmtpInboxLoginDetails //0x00000040 + }; + + HBufC* iEmailAlias; + HBufC* iEmailAddress; + HBufC* iReplyToAddress; + TImSmtpSettingsExtension* iExtension; // renamed iReceiptAddress + TMsgOutboxBodyEncoding iBodyEncoding; + TUid iDefaultMsgCharSet; + TImSMTPSendCopyToSelf iSendCopyToSelf; + TImSMTPSendMessageOption iSendMessageOption; + }; + +inline CImSmtpSettings::TImSmtpSettingsExtension* CImSmtpSettings::Extension() const + { + return iExtension; + } + +inline void CImSmtpSettings::CheckExtensionExistsL() + { + if (!iExtension) + iExtension=new (ELeave) CImSmtpSettings::TImSmtpSettingsExtension; + } + +inline CImSmtpSettings::TImSmtpSettingsExtension::TImSmtpSettingsExtension() : iReceiptAddress(NULL),iLoginName(NULL),iPassword(NULL),iTlsSslDomain(NULL),iToCcIncludeLimit(KSmtpToCcIncludeLimitDefault) + { + } + +#endif // #define __SMTPSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smut.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smut.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,154 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMUT_H__ +#define __SMUT_H__ + +#include +#include +#include + +class CSmsMessage; +class CContactItemField; +class TResourceReader; +class CMsvSession; +class CMsvServerEntry; +class CMsvEntry; +class CSmsSettings; + +/** +The SMS MTM UID. + +Used to identify the MTMs used for handling SMS messages. + +@publishedAll +@released +*/ +const TUid KUidMsgTypeSMS = {0x1000102C}; + +/** +The default maximum length used when extracting a description for an SMS message. + +Used as default value of aMaxLength in TSmsUtilities::GetDescription. This +function is used to extract a string to used as a suitable description field in +the message index for a particular SMS message. + +The CSmsSettings provides accessors to get and set the preferred maximum +description length. + +@deprecated +This should not really be used outside of the SMS client MTM. The value provided +by the CSmsSettings class should be used. + +@see CSmsSettings::GetDescriptionLength +*/ +const TInt KSmsDescriptionLength = 32; + +/** +The default maximum length used when extracting the sender/recipiant details for +an SMS message. + +Used as default value of aMaxLength in TSmsUtilities::GetDetails. This function +is used to extract a string to used as the details field in the message index +for a particular SMS message. + +@deprecated +This should really be used at all. +*/ +const TInt KSmsDetailsLength = 32; + +_LIT(KSmsResourceFile, "\\resource\\messaging\\SMSS.RSC"); + +/** +SMS Messaging utility functions. + +@publishedAll +@released +*/ +class TSmsUtilities + { +public: + +/** +Special SMS Message Indication Type. + +A special SMS message indication is used to notify of waiting services, for +instance a voicemail message. + +The TSmsUtilitiesSpecialMessageType enum represents the flags for the known +indication types. +*/ + enum TSmsUtilitiesSpecialMessageType + { +/** +Voice message waiting. +*/ + EVoiceMessageWaiting = 0, +/** +Fax message waiting. +*/ + EFaxMessageWaiting, +/** +E-mail message waiting. +*/ + EEmailMessageWaiting, +/** +Other message-type waiting (see 3GPP TS 23.038 [9] for definition of "other"). +*/ + EOtherMessageWaiting, +/** +Mask used to obtain the mesasge indication type from the SMS data. +*/ + ESpecialMessageTypeMask = 0x7F + }; + + /** + @internalComponent + @removed + */ + IMPORT_C void Dummy_Export_1(); + /** + @internalComponent + @removed + */ + IMPORT_C void Dummy_Export_2(); + + IMPORT_C static void ServiceIdL(CMsvServerEntry& aEntry, TMsvId& aFirstId, TUid aMtm = KUidMsgTypeSMS, CMsvEntrySelection* aServiceIds = NULL); + IMPORT_C static void ServiceIdL(CMsvEntry& aEntry, TMsvId& aFirstId, TUid aMtm = KUidMsgTypeSMS, CMsvEntrySelection* aServiceIds = NULL); + IMPORT_C static void ServiceIdL(CMsvSession& aSession, TMsvId& aFirstId, TUid aMtm = KUidMsgTypeSMS, CMsvEntrySelection* aServiceIds = NULL); //more efficient version of the previous one + + IMPORT_C static void PopulateMsgEntry(TMsvEntry& aEntry, const CSmsMessage& aMessage, TMsvId aServiceId, TUid aMtm = KUidMsgTypeSMS); + IMPORT_C static void PopulateMsgEntry(TMsvEntry& aEntry, const CSmsMessage& aMessage, TMsvId aServiceId, const CSmsSettings& aSettings, TUid aMtm = KUidMsgTypeSMS); + + IMPORT_C static TInt GetDetails(RFs& aFs, const CSmsMessage& aMessage, TDes& aDetails, TInt aMaxLength = KSmsDetailsLength); + IMPORT_C static TInt GetDetails(RFs& aFs, const TDesC& aFromAddress, TDes& aDetails, TInt aMaxLength = KSmsDetailsLength); + IMPORT_C static TInt GetDescription(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength = KSmsDescriptionLength); + + IMPORT_C static RResourceFile OpenResourceFileL(RFs& aFs); + IMPORT_C static void ReadResourceStringL(RResourceFile aResourceFile, TInt aResourceId, TDes& aString); + +private: + static void CompareEntryL(const TMsvEntry& aEntry, TUid aMtm, TMsvId& aFirstId, CMsvEntrySelection* aServiceIds); + static void GetName(CContactItemField& aField, TUid aFieldType, TDes& aName); + static void DoGetDetailsL(RFs& aFs, const TDesC& aFromAddress, TDes& aDetails, TInt aMaxLength); + static void Replace(const TDesC& aOld, const TDesC& aNew, TDes& aString); + + static TBool DoGetDescriptionL(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); + static void ExtractDescriptionFromMessage(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); + + static TBool ValidGsmNumber(const TDesC& aTelephone); + }; + +#endif // __SMUT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smuthdr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smuthdr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,270 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMUTHDR_H__ +#define __SMUTHDR_H__ + +#include +#include +#include +#include +#include +#include + +class RMsvReadStream; +class RMsvWriteStream; +class CMsvStore; +class CSmsEmailFields; + +/** +The SMS MTM encapsulation of an SMS message. + +This class allows a messaging client to access the lower-level message encapsulation +used by the SMS stack. + +It also provides functionality to restore and store an SMS message from/to the +message store. + +An SMS message is encapsulated in a Protocol Data Unit (PDU). In GSM there are +six types of SMS message PDU. In the descriptions below, SC means Service Center +and MS means Mobile Station (the phone). + +1. SMS-DELIVER - sent from SC to MS + +2. SMS-DELIVER-REPORT - sent from MS to SC + +3. SMS-SUBMIT - sent from MS to SC + +4. SMS-SUBMIT-REPORT - sent from SC to MS + +5. SMS-STATUS-REPORT - sent from SC to MS + +6. SMS-COMMAND - sent from MS to SC + +@publishedAll +@released +*/ +class CSmsHeader : public CBase + { +public: + + IMPORT_C static CSmsHeader* NewL(CSmsPDU::TSmsPDUType aType,CEditableText& aText); + IMPORT_C static CSmsHeader* NewL(CSmsPDU::TSmsPDUType aType,CEditableText& aText,RFs& aFs); + IMPORT_C static CSmsHeader* NewL(CSmsMessage* aMessage); + IMPORT_C ~CSmsHeader(); + + inline CSmsPDU::TSmsPDUType Type() const; + + inline CSmsSubmit& Submit(); + inline const CSmsSubmit& Submit() const; + inline CSmsDeliver& Deliver(); + inline const CSmsDeliver& Deliver() const; + inline CSmsCommand& Command(); + inline const CSmsCommand& Command() const; + inline CSmsStatusReport& StatusReport(); + inline const CSmsStatusReport& StatusReport() const; + + inline CSmsMessage& Message(); + inline const CSmsMessage& Message() const; + + inline TBool ReplyPathProvided() const; + inline void SetReplyPathProvided(TBool aReplyPathProvided); + + inline TBioMsgIdType BioMsgIdType() const; + inline void SetBioMsgIdType(TBioMsgIdType aBioMsgIdType = EBioMsgIdNbs); + + inline TPtrC ServiceCenterAddress() const; + inline void SetServiceCenterAddressL(const TDesC& aAddress); + + IMPORT_C void SetSmsSettingsL(const CSmsMessageSettings& aSmsSettings); + IMPORT_C void GetSmsSettingsL(CSmsMessageSettings& aSmsSettings) const; + + inline const CArrayPtrFlat& Recipients() const; + inline CArrayPtrFlat& Recipients(); + + inline void SetFromAddressL(const TDesC& aAddress); + inline TPtrC FromAddress() const; + + TPtrC ReplyAddressL() const; + + IMPORT_C void SetEmailFieldsL(const CSmsEmailFields& aEmailFields); + void SetReplyEmailFieldsL(const CSmsEmailFields& aEmailFields, const TDesC& aReplySubjectFormat); + void SetForwardEmailFieldsL(const CSmsEmailFields& aEmailFields, const TDesC& aForwardSubjectFormat); + IMPORT_C const CSmsEmailFields& EmailFields() const; + + IMPORT_C void InternalizeL( RMsvReadStream& aStream); + IMPORT_C void ExternalizeL( RMsvWriteStream& aStream) const; + + IMPORT_C void RestoreL(CMsvStore& aStore); + IMPORT_C void StoreL(CMsvStore& aStore) const; + + IMPORT_C TBool ContainsSmsHeaderL(const CMsvStore& aStore); + +private: + CSmsHeader(CSmsMessage* aSmsMessage = NULL); + void ConstructL(CSmsPDU::TSmsPDUType aType, CEditableText& aText); + void ConstructL(CSmsPDU::TSmsPDUType aType, CEditableText& aText, RFs& aFs); + void ConstructL(); + + enum TSmsHeaderFlags + { + ESmsHeaderNoFlags = 0x00, + ESmsHeaderReplyPathProvided = 0x01, + ESmsHeaderCanConcatenate = 0x02 + }; + + TBool CanConcatenate() const; + void SetCanConcatenate(TBool aCanConcatenate); + + void SetEmailReplyForwardSubjectL(CSmsEmailFields* aEmailFields, const TDesC& aSubject, const TDesC& aSubjectFormat); + +private: + CArrayPtrFlat iRecipients; + CSmsMessage* iMessage; + TUint32 iFlags; + RFs iFs; + + // iBioMsgIdType is only used during sending and will be ignored if the + // TMsvEntry.iBioType == 0. The default is EBioMsgIdNbs. + TBioMsgIdType iBioMsgIdType; + CSmsEmailFields* iEmailFields; + TBool iCloseFs; + }; + +/** +A specialisation of the message server index class for SMS message entries. + +It provides accessers for SMS message specific data, for instance the class type +of the SMS message. + +@publishedPartner +@released +*/ +class TMsvSmsEntry : public TMsvEntry + { +public: + +/** +Defines a set flags used to access message entry data specific to an SMS message. + +@internalTechnology +@released + +*/ + enum TMsvSmsEntryFlags + { +/** +Clears the entire set of SMS flags. +*/ + EMsvSmsEntryClearFlag = 0x00000000, +/** +Mask for the protocol identifier data. +*/ + EMsvSmsEntryProtocolIdentifier = 0x000000FF, +/** +Mask for the User Prompt Indicator flag. +*/ + EMsvSmsEntryUserPromptIndicator = 0x00000100, +/** +Mask for the SMS class data. +*/ + EMsvSmsEntryClass = 0x00000E00, +/** +Mask for the flag indicating whether the class data has been defined. +*/ + EMsvSmsEntryClassDefined = 0x00001000, +/** +Mask for the flag indicating whether the message ID is valid. +*/ + EMsvSmsMessageValid = 0x00002000, +/** +Mask for the delivery acknowledgement information. +*/ + EMsvSmsEntryDeliveryAckSummary = 0x0001C000, +/** +Parameter defining the number of bits to be shifted in order for the SMS class +data to be at the LSB of the data block. +*/ + EMsvSmsEntryClassShift = 9, +/** +Parameter defining the number of bits to be shifted in order for the delivery +acknowlwdgement information to be at the LSB of the data block. +*/ + EMsvSmsEntryDeliveryAckSummaryShift = 14 + }; + +/** +Defines the summary acknowledgement information. + +This information indicates whether the SMS message is not supplying a summary +for an acknowledgement, is still expecting acknowledgments or it has received +all expected acknowledgements. + +If all acknowledgements have been received the summary indicates whether all +the recipients have successfully acknowledged the message, all failed or there +was a mixture of successful and failed acknowledgements from the recipients. +*/ + enum TMsvSmsEntryAckSummary + { +/** +No summary information is being formed. +*/ + ENoAckSummary = 0, +/** +The message is waiting for acknowledgements to be received for all recipients +of this message. Some recipients may have received their acknowledgements but +there are still some recipients that have not. +*/ + EPendingAcks, +/** +The summary indicates that the message was successfully acknowledged by all recipients. +*/ + EAllSuccessful, +/** +The summary indicates that the message failed to be acknowledged by all recipients. +*/ + EAllFailed, +/** +The summary indicates a mixture of successful and failed acknowledgements from +the recipients of the message. All recipients of this message have received +their acknowledgements. +*/ + EMixed + }; + +public: + inline TMsvSmsEntry(); + inline TMsvSmsEntry(const TMsvEntry& aEntry); + + inline void SetUserPromptIndicator(TBool aUPI); + inline TBool UserPromptIndicator() const; + + inline TUint8 ProtocolIdentifier() const; + inline void SetProtocolIdentifier(TSmsProtocolIdentifier aPID); + inline void SetProtocolIdentifier(TUint8 aPID); + + inline TBool Class(TSmsDataCodingScheme::TSmsClass& aClass) const; + inline void SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass = TSmsDataCodingScheme::ESmsClass0); + + IMPORT_C TMsvSmsEntryAckSummary AckSummary(TSmsAckType aAckType) const; + IMPORT_C void SetAckSummary(TSmsAckType aAckType, TMsvSmsEntryAckSummary aAckSummary); + + IMPORT_C TBool MessageId(TInt32& aMessageId) const; + IMPORT_C void SetMessageId(TInt32 aMessageId, TBool aIsValid); + }; + +#include + +#endif // __SMUTHDR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smutset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smutset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,752 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMUTSET_H__ +#define __SMUTSET_H__ + + + + +#include +#include +#include +#include + +class CSmsServiceCenter; +class CSmsEmailFields; + +// Both the recipient's number and SC number (TP-Destination-Address and RP-Destination-Address) +// can be 12 octets which means that there can be 21 characters (including + sign) in the number string. + +/** +The maximum length of recipient's number. + +The number returned by CSmsNumber::Address() and CSmsServiceCenter::Address() is limited this maximum length. + +@see CSmsNumber::Address +@see CSmsServiceCenter::Address + +@publishedAll +@released +*/ +const TInt KSmcmSmsNumberMaxNumberLength = 21; + +/** +The maximum length of recipient's name. + +The number returned by CSmsNumber::Name() and CSmsServiceCenter::Name() is limited this maximum length. + +@see CSmsNumber::Name +@see CSmsServiceCenter::Name + +@publishedAll +@released +*/ +const TInt KSmcmSmsNumberMaxNameLength = 256; + +/** +Defines the possible forms in which an SMS message should be delivered to the +recipient by the service centre. + +The specified format may or may not actually be supported by the service centre. +Note that the format of the recipient address(es) may need to be different +to a normal telephone number if the conversion is set to any other value than +ESmsConvPIDNone, ESmsConvFax, ESmsConvPaging or ESmsConvErmes. + +@publishedAll +@released +*/ +enum TSmsPIDConversion + { +/** +No conversion (i.e. use SMS itself). +*/ + ESmsConvPIDNone = TSmsProtocolIdentifier::ESmsNoTelematicDevice, +/** +Convert to fax. +*/ + ESmsConvFax = TSmsProtocolIdentifier::ESmsGroup3TeleFax, +/** +Convert to X.400. +*/ + ESmsConvX400 = TSmsProtocolIdentifier::ESmsX400MessageHandlingSystem, +/** +Convert to pager message. +*/ + ESmsConvPaging = TSmsProtocolIdentifier::ESmsNationalPagingSystem, +/** +Convert to Internet email. +*/ + ESmsConvMail = TSmsProtocolIdentifier::ESmsInternetElectronicMail, +/** +Convert to ERMES paging. +*/ + ESmsConvErmes = TSmsProtocolIdentifier::ESmsERMES, +/** +Convert to sppech. +*/ + ESmsConvSpeech = TSmsProtocolIdentifier::ESmsVoiceTelephone + }; + +/** +Defines the set of possible validity periods for mobile originated messages. + +Mobile originated messages have a PDU type of SMS-SUBMIT. + +@publishedAll +@released +*/ +enum TSmcmValidityPeriod + { +/** +Validity period of an hour. +*/ + ESmsVPHour = TSmsValidityPeriod::EHalfHourUnitInMinutes*2, +/** +Validity period of six hours. +*/ + ESmsVPSixHours = TSmsValidityPeriod::EHalfHourUnitInMinutes*12, +/** +Validity period of 24 hours. +*/ + ESmsVP24Hours = TSmsValidityPeriod::EOneDayUnitInMinutes, +/** +Validity period of a week. +*/ + ESmsVPWeek = TSmsValidityPeriod::EOneWeekUnitInMinutes, +/** +The maximum validity period - currently set as 63 weeks. +*/ + ESmsVPMaximum = TSmsValidityPeriod::EOneWeekUnitInMinutes*63, +/** +An enum that specifies that a validity period is not supported. +*/ + ESmsVPNotSupported = KErrNotSupported, +/** +The default validy period - currently set to a week. +*/ + ESmsVPDefault = ESmsVPWeek + }; + +/** +Defines options for the preferred default sending schedule type of a new message +created using the SMS client MTM. + +The option has no direct effect on the SMS MTM. When it is sending an SMS +message it automatically appends other SMS messages in the outbox whose send +states are marked as KMsvSendStatewaiting or KMsvSendSateUnknown. + +Therefore it is the responsibility of the messaging client to set the correct +send state of new SMS messages correctly given the preferred sending schedule. + +@publishedAll +@released +*/ +enum TSmsDelivery + { +/** +Send message immediately. The message send state should be set to KMsvSendStateWaiting. +*/ + ESmsDeliveryImmediately, +/** +Send message when client requests. The message send state should be set to KMsvSendStateUponRequest. +*/ + ESmsDeliveryUponRequest, +/** +Send message at scheduled time. The message send state should be set to KMsvSendStateScheduled. +*/ + ESmsDeliveryScheduled + }; + +/** +Defines the flags and masks for some of the message settings. + +The settings classes CSmsMessageSettings and CSmsSettings use these flags to +store the specified information. + +@internalComponent +@released +*/ +enum TSmsSettingsFlags + { +/** +Mask that resets the flags. +*/ + ESmsSettingsNoFlags =0, +/** +Flag that indicates if messages can be concatenated. + +If true, the UI should pass a long message in one piece to the MTM. If false, +it should split the message manually into 140 byte parts. The value of this +flag does not affect the behaviour of the SMS MTM. +*/ + ESmsSettingsCanConcatenate =0x00000001, +/** +Flag that indicates whether the original message should be included in relpy +messages. + +If true, the received message should be quoted at the beginning of the reply +message. If false, reply messages should be initially empty. +*/ + ESmsSettingsReplyQuoted =0x00000002, +/** +Flag that indicates whether duplicate messages should be rejected. +*/ + ESmsSettingsRejectDuplicate =0x00000004, +/** +Flag that indicates if a status report (TP-SRR in GSM spec 03.40) should be +requested from the Service Centre. +*/ + ESmsSettingsDeliveryReport =0x00000008, +/** +Flag that indicates if the reply path (Service Centre address) should be included +in the delivered message (TP-RP in GSM spec 03.40). +*/ + ESmsSettingsReplyPathRequested =0x00000010, +/** +Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment +should be requested from the Service Centre. +*/ + ESmsSettingsLastSegmentDeliveryReport =0x00000020 , + +/** +Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment +is not requested from the Service Centre. +*/ + ENoSmsSettingsLastSegmentDeliveryReport =0x00000040, +/** +Flag that indicates that the service center time stamp should be used for the date +field in any TMsvEntry that corresponds to a SMS message. +*/ + ESmsSettingsUseServiceCenterTimeStamp =0x00000080, +/** +Mask for the set of flags defined. +*/ + ESmsSettingsMask =0x000000FF, + }; + + +/** +Defines the types of acknowledgements that can be received from recipients. +*/ +enum TSmsAckType + { +/** +Acknowlwdgement of delivery to a recipient. +*/ + ESmsAckTypeDelivery =0 + }; + +/** +Progress information for SMS MTM operations. + +This information is returned by CMsvOperation::ProgressL() in a TSmsProgressBuf +package. + +@see CMsvOperation::ProgressL + +@publishedAll +@released +*/ +class TSmsProgress + { +public: +/** +Defines type of operation for which progress information is being given. + +These types correspond to the commands defined in TSmsMtmCommand. + +@see TSmsMtmCommand +*/ + enum TSmsProgressType + { +/** +The default operation type - no operation. +*/ + ESmsProgressTypeDefault, +/** +Reading SIM parameters. + +Pre v7.0, this was named ESmsProgressTypeReadingServiceCenterAddress. +*/ + ESmsProgressTypeReadSimParams, +/** +Writing SIM parameters. + +Pre v7.0 this was named ESmsProgressTypeWritingServiceCenterAddress. +*/ + ESmsProgressTypeWriteSimParams, +/** +Sending messages. +*/ + ESmsProgressTypeSending, +/** +Scheduling sending messages. +*/ + ESmsProgressTypeScheduling, +/** +Enumerating phone stores. + +Pre v7.0, this was named ESmsProgressTypeEnumeratingSim. +*/ + ESmsProgressTypeEnumeratingPhoneStores, +/** +Copying messages from phone stores. + +Pre v7.0, this was named ESmsProgressTypeCopyFromSim. +*/ + ESmsProgressTypeCopyFromPhoneStore, +/** +Moving messages from phone stores. + +Pre v7.0, this was named ESmsProgressTypeMoveFromSim. +*/ + ESmsProgressTypeMoveFromPhoneStore, +/** +Deleting messages from phone stores. + +Pre v7.0, this was named ESmsProgressTypeDeleteFromSim. +*/ + ESmsProgressTypeDeleteFromPhoneStore, +/** +Removing all messages from the task scheduler list. +*/ + ESmsProgressTypeDeleteSchedule, +/** +Checking the current scheduled status of the messages. +*/ + ESmsProgressTypeCheckSchedule, +/** +Recursively deleting messages. +*/ + ESmsProgressTypeDeleteAll, +/** +Copying messages to a phone store. + +Pre v7.0, this was named ESmsProgressTypeCopyToSim. +*/ + ESmsProgressTypeCopyToPhoneStore, +/** +Moving messages to a phone store. + +Pre v7.0, this was named ESmsProgressTypeMoveToSim. +*/ + ESmsProgressTypeMoveToPhoneStore, +/** +Moving message entries. + +This is the second part of ESmsProgressTypeMoveFromPhoneStore. The first part +deletes the messages from the phone storageSIM. This second part moves the +messages from the folder that represents the phone storage to the specified +destination. +*/ + ESmsProgressTypeMovingEntries + }; + + inline TSmsProgress(TSmsProgressType aType = ESmsProgressTypeDefault); + +public: + +/** +The error code. +*/ + TInt iError; +/** +The type of operation. + +@see TSmsProgress::TSmsProgressType +*/ + TSmsProgressType iType; +/** +The state of the operation. +*/ + TInt iState; +/** +The number of recipients processed so far for the current message. +*/ + TInt iRcpDone; +/** +The total number of recipients in the current message. +*/ + TInt iRcpCount; +/** +The nmber of messages processed so far for the current operation. +*/ + TInt iMsgDone; +/** +The total number of messages for the current operation. +*/ + TInt iMsgCount; +/** +The Service Centre address. + +This is set by the command ESmsMtmCommandReadServiceCenter. + +@removed +This is no longer used since v7.0. +*/ + TBuf<14> iServiceCenterAddress; +/** +The invisible folder that contains the messages read from the SIM by the command +ESmsMtmCommandEnumeratePhoneStores. +*/ + TMsvId iEnumerateFolder; + }; + +/** +Package buffer for TSmsProgress. + +@see TSmsProgress + +@publishedAll +@released +*/ +typedef TPckgBuf TSmsProgressBuf; + + +/** +The SMS settings that are relevant on a per message basis. + +Each SMS message has its own settings. Initially they have a default set of +values derived from the SMS service settings. They can be changed on an +individual message basis. For instance, a messaging application may allow a +user to specify/not specify status reports individually for each message. + +These settings are only relevant to mobile originated messages - those of +SMS-SUBMIT type. + +@publishedAll +@released +*/ +class CSmsMessageSettings : public CBase + { +public: + IMPORT_C virtual void InternalizeL(RReadStream& aReadStream); + IMPORT_C virtual void ExternalizeL(RWriteStream& aWriteStream) const; + + inline const TTimeIntervalMinutes& ValidityPeriod() const; + inline void SetValidityPeriod(TTimeIntervalMinutes); + + inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat); + inline const TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const; + + inline TBool RejectDuplicate() const; + inline void SetRejectDuplicate(TBool); + + inline TBool DeliveryReport() const; + inline void SetDeliveryReport(TBool); + + inline TBool ReplyPath() const; + inline void SetReplyPath(TBool); + + inline TSmsPIDConversion MessageConversion() const; + inline void SetMessageConversion(TSmsPIDConversion); + + inline TBool CanConcatenate() const; + inline void SetCanConcatenate(TBool); + + inline enum TSmsDataCodingScheme::TSmsAlphabet CharacterSet() const; + inline void SetCharacterSet(TSmsDataCodingScheme::TSmsAlphabet); + + IMPORT_C virtual void CopyL(const CSmsMessageSettings& aSettings); + + TUint32 MessageFlags() const; + void SetMessageFlags(TUint32 aMsgFlags); + inline TBool LastSegmentDeliveryReport() const; + inline void SetLastSegmentDeliveryReport(TBool); + + inline void SetUseServiceCenterTimeStampForDate(TBool aUseServiceCenterTimestamp); + inline TBool UseServiceCenterTimeStampForDate() const; + +protected: + + CSmsMessageSettings(); + +private: + + TUint32 iMsgFlags; + TSmsPIDConversion iMessageConversion; + TSmsDataCodingScheme::TSmsAlphabet iAlphabet; + TTimeIntervalMinutes iValidityPeriod; + TSmsFirstOctet::TSmsValidityPeriodFormat iValidityPeriodFormat; + }; + +/** +The SMS Service settings. + +An SMS service entry stores an object of this type in its message store. These +settings define the default settings for mobile originated messages (SMS-SUBMIT +type messages). They also provide some global settings that are applied to all +messages, both outward going and received messages. + +The SMS service also uses this class to store the set of avilable Servive Centre +numbers. The default Service Centre is defined from this set. + +@publishedAll +@released +*/ +class CSmsSettings : public CSmsMessageSettings + { +public: + +/** +Defines the ways in which status reports that are received by the watcher may +be handled. + +This can be applied to both SMS-STATUS-REPORT type messages and Special Messages +(e.g. Voice Mail Indication messages). +*/ + enum TSmsReportHandling + { +/** +The reports are put in the inbox and made invisible. +*/ + EMoveReportToInboxInvisible, +/** +The reports are put in the inbox and made visible. +*/ + EMoveReportToInboxVisible, +/** +The reports are deleted. +*/ + EDiscardReport, +/** +Not supported. +*/ + EDoNotWatchForReport, +/** +Reports are put in the inbox and made invisible. The status report +is matched against the sent mesasge and its summary info updated. +*/ + EMoveReportToInboxInvisibleAndMatch, +/** +Reports are put in the inbox and made visible. The status report +is matched against the sent mesasge and its summary info updated. +*/ + EMoveReportToInboxVisibleAndMatch, +/** +Reports are deleted. The status report is matched against the sent +mesasge and its summary info updated. +*/ + EDiscardReportAndMatch + }; + +/** +Sets whether the service settings should be used to update the communications +database. + +If the update is specified, it is done when the Service settings are stored into +the message store. +*/ + enum TSmsSettingsCommDbAction + { +/** +The comms database should not be updated. +*/ + ENone, +/** +Use the Service settings to update the comms datebase. +*/ + EStoreToCommDb + }; + +/** Defines the SMS bearer. +Modes: GSM */ +enum TMobileSmsBearer + { + /** SMS messages will only be sent over a packet-switched (GPRS) network. */ + ESmsBearerPacketOnly, + /** SMS messages will only be sent over a circuit-switched (GSM) network. */ + ESmsBearerCircuitOnly, + /** SMS messages will be sent over the packet-switched (GPRS) network if possible, + otherwise over circuit-switched (GSM) network. */ + ESmsBearerPacketPreferred, + /** SMS messages will be sent over the circuit-switched (GSM) network if possible, + otherwise over packet-switched (GPRS) network. */ + ESmsBearerCircuitPreferred + }; + +public: + + IMPORT_C static CSmsSettings* NewL(); + IMPORT_C static CSmsSettings* NewLC(); + IMPORT_C virtual ~CSmsSettings(); + + IMPORT_C TInt ServiceCenterCount() const; + IMPORT_C CSmsServiceCenter& GetServiceCenter(TInt aIndex) const; + IMPORT_C void AddServiceCenterL(const TDesC& aName,const TDesC& aNumber); + IMPORT_C void RemoveServiceCenter(TInt aIndex); + IMPORT_C TInt DefaultServiceCenter() const; + IMPORT_C void SetDefaultServiceCenter(TInt aDefaultSC); + inline TSmsDelivery Delivery() const; + inline void SetDelivery(TSmsDelivery); + + inline TBool ReplyQuoted() const; + inline void SetReplyQuoted(TBool); + + IMPORT_C void CopyL(const CSmsSettings& aSmsSettings); + + inline TSmsReportHandling StatusReportHandling() const; + inline void SetStatusReportHandling(TSmsReportHandling aStatusReportHandling); + inline TSmsReportHandling SpecialMessageHandling() const; + inline void SetSpecialMessageHandling(TSmsReportHandling aSpecialMessageHandling); + + inline void SetCommDbAction(TSmsSettingsCommDbAction aCommDbAction); + inline TSmsSettingsCommDbAction CommDbAction() const; + + inline void SetSmsBearerAction(TSmsSettingsCommDbAction aSmsBearerAction); + inline TSmsSettingsCommDbAction SmsBearerAction() const; + + inline void SetSmsBearer(TMobileSmsBearer aSmsBearer); + inline TMobileSmsBearer SmsBearer() const; + + inline void SetClass2Folder(TMsvId aId); + inline TMsvId Class2Folder() const; + + inline void SetDescriptionLength(TInt aLength); + inline TInt DescriptionLength() const; + + TUint32 SettingsFlags() const; + void SetSettingsFlags(TUint32 aSetFlags); + + void RemoveSCAddresses(); + void StoreToCommDbL() const; + +private: + + CSmsSettings(); + void ConstructL(); + +private: + + TUint32 iSetFlags; + CArrayPtrFlat *iServiceCenters; + TSmsDelivery iDelivery; + TInt iDefaultSC; + TSmsReportHandling iStatusReportHandling; + TSmsReportHandling iSpecialMessageHandling; + TSmsSettingsCommDbAction iCommDbAction; + TSmsSettingsCommDbAction iSmsBearerAction; + TMobileSmsBearer iSmsBearer; + TMsvId iClass2Folder; + TInt iDescriptionLength; + }; + +/** +Recipient information for an SMS message. + +A SMS-SUBMIT message may have several recipients + +@publishedAll +@released +*/ +class CSmsNumber : public CMsvRecipient + { +public: + +/** +Defines the status of an acknowledgement for a recipient. +*/ + enum TSmsAckStatus + { +/** +An acknowledgement for this recipient has not been requested. +*/ + ENoAckRequested = 0, +/** +The delivery status for this recipient has been requested, but the status report +has not yet been received. +*/ + EPendingAck, +/** +A successful acknowledgement for this recipient has been received. +*/ + EAckSuccessful, +/** +A failed acknowledgement for this recipient has been received. +*/ + EAckError + }; + +public: + + IMPORT_C static CSmsNumber* NewL(); + IMPORT_C static CSmsNumber* NewL(const CSmsNumber& aSmsNumber); + IMPORT_C virtual ~CSmsNumber(); + + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + + IMPORT_C TPtrC Address() const; + IMPORT_C void SetAddressL(const TDesC& aAddress); + void SetEmailAddressL(const TDesC& aAddress, CSmsEmailFields* aEmailFields, const TDesC& aAlias); + + IMPORT_C TPtrC Name() const; + IMPORT_C void SetNameL(const TDesC& aName); + + inline TLogId LogId() const; + inline void SetLogId(TLogId aLogId); + + IMPORT_C CSmsNumber& CopyL(const CSmsNumber& aSmsNumber); + + IMPORT_C TSmsAckStatus AckStatus(TSmsAckType aAckType) const; + IMPORT_C void SetAckStatus(TSmsAckType aAckType, TSmsAckStatus aAckStatus); + +private: + + CSmsNumber(); + TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const; + +private: + + HBufC* iNumber; + HBufC* iName; + TLogId iLogId; + TSmsAckStatus iDeliveryStatus; + }; + +/** +Used to store Service Centre numbers and their associated name. + +@publishedAll +@released +*/ +class CSmsServiceCenter : public CBase + { +public: + IMPORT_C static CSmsServiceCenter* NewL(); + IMPORT_C static CSmsServiceCenter* NewL(const CSmsServiceCenter& aSmsSC); + IMPORT_C ~CSmsServiceCenter(); + + IMPORT_C TPtrC Address() const; + IMPORT_C void SetAddressL(const TDesC& aAddress); + + IMPORT_C TPtrC Name() const; + IMPORT_C void SetNameL(const TDesC& aName); + + IMPORT_C CSmsServiceCenter& CopyL(const CSmsServiceCenter& aSmsSc); + +private: + CSmsServiceCenter(); + TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const; + +private: + HBufC* iNumber; + HBufC* iName; + }; + +#include + +#endif // __SMUTSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/smutsimparam.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/smutsimparam.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,147 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SMUTSIMPARAM_H__ +#define __SMUTSIMPARAM_H__ + +#include +#include + +/** +The UID for the stream into which the SIM parameters are stored. + +@internalComponent +@deprecated +Should be moved to the cpp file for this class. +*/ +const TUid KUidMsvSimSmsParams = {0x100081BC}; + +class CMobilePhoneSmspList; +class TSmsProgress; + +/** +A packaged TInt value. + +This is used by CSmsSimParamOperation. + +@see CSmsSimParamOperation::ProgressL() + +@internalComponent +@released +*/ +typedef TPckgBuf TIntBuf; + +/** +Encapsulates an operation to read/write an array of SMS parameters from a SIM. + +An operation of this type if returned by the SMS client MTM for the read and +write SIM paramter operations. + +These operations are generated from calling the SMS client MTM APIs +CSmsClientMtm::ReadSimParamsL and CSmsClientMtm::WriteSimParamsL. The +CSmsClientMtm::InvokeAsyncFunctionL API should not be used for these operations. + +@see CSmsClientMtm::ReadSimParamsL +@see CSmsClientMtm::WriteSimParamsL + +@publishedAll +@released +*/ +class CSmsSimParamOperation : public CMsvOperation + { +public: + + static CSmsSimParamOperation* ReadSimParamsL(TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); + static CSmsSimParamOperation* WriteSimParamsL(const CMobilePhoneSmspList& aList, TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); + virtual ~CSmsSimParamOperation(); + + inline const CMobilePhoneSmspList& SmspList() const; + + IMPORT_C CMobilePhoneSmspList* ServiceCentersLC() const; + IMPORT_C const TDesC8& ProgressL(); + + IMPORT_C static void RestoreSimParamsL(CMsvStore& aStore, CMobilePhoneSmspList& aList); + IMPORT_C static void StoreSimParamsL(CMsvStore& aStore, const CMobilePhoneSmspList& aList); + +private: // methods from CActive + + virtual void RunL(); + virtual void DoCancel(); + virtual TInt RunError(TInt aError); + +private: + + CSmsSimParamOperation(TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); + + void DoReadSimParamsL(); + void DoRunReadSimParamsL(/*TSmsProgress aProgress*/); + void DoWriteSimParamsL(const CMobilePhoneSmspList& aList); + + void TransferCommandL(TInt aCommandId); + void Complete(); + +private: + +/** +This defines the state machine. +*/ + enum TReadSimParamsState + { +/** +Specifies waiting state +*/ + EStateWaiting, +/** +Specifies reading state +*/ + EStateReadingSimParams, +/** +Specifies writing state +*/ + EStateWritingSimParams + } iState; + +/** +A list containing the SMS parameters +*/ + CMobilePhoneSmspList* iSimParams; + TInt iError; + TIntBuf iProgressBuf; + CMsvOperation* iOperation; + }; + +/** +Gets the list of SMS parameters on the SIM, after a successfully completed +read operation. + +If the operation has not successfully completed, this function returns an +empty list. + +This function should ot be used with a write SIM parameters operation. + +@return +The list of SMS parameters read from the SIM. + +@panic SMCM 3 +This operation was not reading the SIM parameters. The operation was not returned +from CSmsClientMtm::ReadSimParamsL (debug only). +*/ +inline const CMobilePhoneSmspList& CSmsSimParamOperation::SmspList() const + { + __ASSERT_DEBUG(iState == EStateReadingSimParams, Panic(ESmscPanicUnexpectedCommand)); + return *iSimParams; + } + +#endif // __SMUTSIMPARAM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vcal.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vcal.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,269 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__VCAL_H__) +#define __VCAL_H__ + +#if !defined(__VERSIT_H__) +#include +#endif + +#if !defined(__VRECUR_H__) +#include +#endif + +_LIT(KVersitTokenVCalVersionNo, "1.0"); + +// +// CParserVCal +// +class CParserVCal : public CVersitParser +/** A vCalendar parser. + +Adds support for parsing vToDos and vEvents, and associated alarms +(see CParserPropertyValueAlarm) to the functionality of CVersitParser. + +Adds a constructor and overrides CVersitParser::InternalizeL() for streams, +ExternalizeL() for streams, RecognizeToken(), RecognizeEntityName() and MakeEntityL(). + +The vCalendar data is read from or written to a stream or file, using the +InternalizeL() and ExternalizeL() functions. Most users of this class will +only need to use these functions. + +Note: if you are sequentially creating and destroying multiple +parsers, a major performance improvement may be achieved by using thread local +storage to store an instance of CVersitUnicodeUtils which persists and can be +used by all of the parsers. + +See CVersitTlsData for more information. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserVCal* NewL(); +public: // from CVersitParser + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream); +protected: // from CVersitParser + IMPORT_C CVersitParser* MakeEntityL(TInt aEntityUid,HBufC* aEntityName); +public: // from CVersitParser + IMPORT_C TUid RecognizeToken(const TDesC8& aToken) const; + IMPORT_C TInt RecognizeEntityName() const; +private: + CParserVCal(); +private: // from CVersitParser + IMPORT_C virtual void Reserved1(); + IMPORT_C virtual void Reserved2(); + }; + +// +// CVersitAlarm +// +class CVersitAlarm : public CBase +/** An alarm for a vEvent or a vTodo. + +Specifies the date/time for the alarm, the amount of time the alarm will be +snoozed (optional), the number of times that the alarm will repeat, the binary +data of the sound to be played when the alarm runs (optional), and some text +to associate with the alarm (optional). + +An object of this class is owned by the CParserPropertyValueAlarm class. + +This class supports the following types of alarm: + +- Audible Alarm + +- Display Alarm (displays message on the screen) + +- Procedure Alarm (calls a procedure) + +- Mail Alarm (sends an email). + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CVersitAlarm* NewL(TVersitDateTime* aRunTime, TTime* aSnoozeTime, TInt aRepeatCount, const TDesC& aAudioContent, const TDesC& aNote); + IMPORT_C ~CVersitAlarm(); +private: + CVersitAlarm(TVersitDateTime* aRunTime, TTime* aSnoozeTime, TInt aRepeatCount); + void ConstructL(const TDesC& aAudioContent, const TDesC& aNote); +public: + /** The date/time for the alarm. */ + TVersitDateTime* iRunTime; + /** The amount of time the alarm will be snoozed (optional). */ + TTime* iSnoozeTime; + /** The number of times that the alarm will repeat. */ + TInt iRepeatCount; + /** The binary data describing the sound to play for an AALARM (optional), or + the string which specifies the address to send the e-mail to, for an MALARM. */ + HBufC* iAudioContent; + /** The mesage to display on the screen for a DALARM (optional), or + the body of the e-mail to be sent for an MALARM, or the name of the procedure + to call for a PALARM. */ + HBufC* iNote;//Empty except for MAlarm + }; + +class CVersitExtendedAlarm : public CBase +/** An extended alarm for a vEvent or a vTodo. + +Specifies the date/time for the alarm, the amount of time the alarm will be +snoozed (optional), the number of times that the alarm will repeat, and the +action for the alarm. +An object of this class is owned by the CParserPropertyValueAlarm class. + +This class supports the following types of alarm: +- X-EPOCALARM + +@publishedPartner +@released +*/ + { +public: + + /** Extended Alarm's disposition types. + */ + enum TDisposition + { + /** URL disposition + */ + EDispositionUrl = 0, + /** Inline disposition + */ + EDispositionInline = 1, + /** Unknown disposition + */ + EDispositionUnknown = 15 + }; + + IMPORT_C static CVersitExtendedAlarm* NewL(const TDesC8& aContent,const TDesC8& aContentMimeType, CVersitExtendedAlarm::TDisposition aDisposition); + IMPORT_C ~CVersitExtendedAlarm(); +private: + CVersitExtendedAlarm(); + void ConstructL(const TDesC8& aContent, const TDesC8& aContentMimeType, CVersitExtendedAlarm::TDisposition aContentDisposition); +public: + /** The data describing the action for the alarm.*/ + HBufC8* iContent; + /** The MIME type of the data describing the action for the alarm.*/ + HBufC8* iMimeType; + /** The disposition of the data for the alarm action (i.e whether it is inline or an URI).*/ + CVersitExtendedAlarm::TDisposition iDisposition; + }; + +// +// CParserVCalEntity +// +class CParserVCalEntity : public CRecurrenceParser +/** A parser for vCalendar sub-entities. + +A vCalendar sub-entity is a vEvent or vToDo contained in a vCalendar. vEvents +and vToDos are derived from CRecurrenceParser, which provides recurrence functionality. + +vEvents and vTodos may have alarm properties (see CParserPropertyValueAlarm). + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserVCalEntity* NewL(); + IMPORT_C ~CParserVCalEntity(); +public: // from CVersitParser + IMPORT_C void ExternalizeL(RWriteStream& aStream); +protected: // from CVersitParser + IMPORT_C CParserPropertyValue* MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue); + IMPORT_C CVersitAlarm* MakePropertyValueAlarmL(TPtr16 aAlarmValue); + IMPORT_C CVersitExtendedAlarm* MakePropertyValueExtendedAlarmL(TPtr16 aAlarmValue); + IMPORT_C CVersitExtendedAlarm* MakePropertyValueExtendedAlarmL(CBufSeg& aAlarmValue); + IMPORT_C CVersitExtendedAlarm::TDisposition DecodeDisposition(const TDesC8& aContentDispositionToken) const; + IMPORT_C TUid RecognizeToken(const TDesC8& aToken) const; +private: + CParserVCalEntity(); +private: // from CVersitParser + IMPORT_C virtual void Reserved1(); + IMPORT_C virtual void Reserved2(); + }; + + +// +// CParserPropertyValueAlarm +// +class CParserPropertyValueAlarm : public CParserTimePropertyValue +/** An alarm property value parser for a vCalendar entity. + +An alarm can be associated with a vEvent or a vTodo. The value for the alarm +is stored as a CVersitAlarm. + +Note: The UID for an alarm property value is KVCalPropertyAlarmUid. + +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueAlarm(CVersitAlarm* aValue); + IMPORT_C CParserPropertyValueAlarm(); + IMPORT_C ~CParserPropertyValueAlarm(); + inline CVersitAlarm* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); + IMPORT_C TBool IsAsciiCharacterSetSufficient(); +private: + CVersitAlarm* iValue; + }; + + +// +// CParserPropertyValueExtendedAlarm +// +class CParserPropertyValueExtendedAlarm : public CParserTimePropertyValue +/** An extended alarm property value parser for a vCalendar entity. + +An alarm action can be attached with a vEvent or a vTodo. The value for the alarm +action is stored as a CVersitExtendedAlarm object. + +Note: The UID for an extended alarm property value is KVCalPropertyExtendedAlarmUid. + +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueExtendedAlarm(CVersitExtendedAlarm* aValue); + IMPORT_C ~CParserPropertyValueExtendedAlarm(); + inline CVersitExtendedAlarm* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput); + IMPORT_C TBool IsAsciiCharacterSetSufficient(); +private: + void ExternalizeUrlL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput); + void ExternalizeInlineL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput); + +private: + CVersitExtendedAlarm* iValue; + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vcal.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vcal.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,31 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CParserPropertyValueAlarm +// +// + +inline CVersitAlarm* CParserPropertyValueAlarm::Value() const +/** Gets a pointer to the alarm property value. + +@return Pointer to the alarm property value. */ + {return iValue;} + +// +// CParserPropertyValueExtendedAlarm +// +inline CVersitExtendedAlarm* CParserPropertyValueExtendedAlarm::Value() const +/** Gets a pointer to the extended alarm property value. + +@return Pointer to the extended alarm property value. */ + {return iValue;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vcard.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vcard.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,183 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VCARD_H__ +#define __VCARD_H__ + +#ifndef __VERSIT_H__ +#include +#endif + +#include + +_LIT(KVersitTokenVCardVersionNo, "2.1"); + +class CVCard3ParserPlugIn; + +// +// CParserVCard +// +class CParserVCard : public CVersitParser +/** A vCard parser. + +Adds support for property groups (see CParserGroupedProperty) and agents +(see CParserPropertyValueAgent) to the functionality of CVersitParser. + +Provides a constructor and overrides CVersitParser::InternalizeL(), +ExternalizeL(), RecognizeToken(), ConvertAllPropertyDateTimesToMachineLocalL(), +ParsePropertyL() and MakePropertyValueL(). + +The vCard data is read from or written to a stream or file, using the InternalizeL() +and ExternalizeL() functions. Most users of this class will only need to use +these functions. + +If you are sequentially creating and destroying multiple parsers, a major performance +improvement may be achieved by using thread local storage to store an instance of +CVersitUnicodeUtils which persists and can be used by all of the parsers. + +See CVersitTlsData for more information. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserVCard* NewL(); + IMPORT_C CArrayPtr* GroupOfPropertiesL(const TDesC8& aName) const; +public: //from CVersitParser + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream); + IMPORT_C void ConvertAllPropertyDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); +protected: + IMPORT_C virtual CParserPropertyValue* MakePropertyValueAgentL(TPtr16 aValue); + IMPORT_C CDesC8Array* GetGroupNamesL(TPtr8& aGroupsAndName); +protected: // from CVersitParser + IMPORT_C void ParsePropertyL(); + IMPORT_C CParserPropertyValue* MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue); + IMPORT_C CParserPropertyValue* MakePropertyValueSoundL(HBufC16*& aValue); +public: //from CVersitParser + IMPORT_C TUid RecognizeToken(const TDesC8& aToken) const; + IMPORT_C void ConvertDateTimesToMachineLocalAndDeleteTZL(); +protected: + CParserVCard(); +private: // from CVersitParser + IMPORT_C virtual void Reserved1(); + IMPORT_C virtual void Reserved2(); + }; + +NONSHARABLE_CLASS(CParserVCard3) : public CParserVCard +/** A vCard 3.0 parser. + +Overrides CParserVCard::InternalizeL(). Internalizing of vCard 3.0 +objects is not supported + +@internalTechnology +@prototype +*/ + { +public: + IMPORT_C static CParserVCard3* NewL(); + ~CParserVCard3(); + +public: //from CParserVCard + IMPORT_C void InternalizeL(RReadStream& aStream); + +private: + CParserVCard3(); + void ConstructL(); + void CreateParserPlugInL(); + +private: + CVCard3ParserPlugIn* iPlugInImpl; + }; + +// +// CParserGroupedProperty +// +class CParserGroupedProperty : public CParserProperty +/** A grouped property. + +This is a vCard property which may be a member of one or more property groups. +It owns an array of descriptors, each of which identifies a group +to which the property belongs. + +An example of how grouped properties may be useful is for a person with two +homes. Each home has an address and telephone number, both of which are to +be stored on the vCard. The address and telephone number are grouped for each +home. A prefix for the address and telephone number properties is provided: +one for each home. Each prefix is stored as a property group. + +When the property is externalised, the identities of all the groups to which +the property belongs (i.e. the prefixes) are written to the stream before +CParserProperty::ExternalizeL() is called. + +The class also provides a function which can be used to test whether +the property is a member of a given group. + +Note that the vCard parser stores all properties using this class; if the +vCard property is not grouped then the array of property groups is empty. +Conversely, the vCalender parser does not have property groups, and so stores +all properties using the CParserProperty base class. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserGroupedProperty* NewL(CParserPropertyValue& aPropertyValue, const TDesC8& aName, CDesC8Array* aArrayOfGroups, CArrayPtr* aArrayOfParams); + IMPORT_C CParserGroupedProperty(CDesC8Array* aArrayOfGroups, CArrayPtr* aArrayOfParams); + IMPORT_C ~CParserGroupedProperty(); + IMPORT_C TBool Group(const TDesC8& aGroup) const; + inline void SetGroups(CDesC8Array* aArrayOfGroups); + inline const CDesC8Array* Groups(); +public: //from CParserProperty + IMPORT_C TBool SupportsInterface(const TUid& aInterfaceUid) const; + IMPORT_C void ExternalizeL(RWriteStream& aStream, CVersitParser* aVersitParser = NULL); +protected: + CParserGroupedProperty(CParserPropertyValue& aPropertyValue, CDesC8Array* aArrayOfGroups, CArrayPtr* aArrayOfParams); +private: //from CParserProperty + IMPORT_C virtual void Reserved(); +protected: + CDesC8Array* iArrayOfGroups; + }; + +// +// CParserPropertyValueAgent +// +class CParserPropertyValueAgent : public CParserPropertyValue +/** An agent property value parser. + +An agent property value contains information about a person who is not the +main subject of the vCard. It is implemented as a vCard nested within another +vCard. The agent's vCard is held in the property value of the parent vCard. + +The UID for an agent property value is KVCardPropertyAgentUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueAgent(CParserVCard* aValue); + IMPORT_C ~CParserPropertyValueAgent(); + inline CParserVCard* Value() const; + +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt /*aLengthOutput*/); +protected: + CParserVCard* iValue; +private: + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vcard.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vcard.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CParserPropertyValueAgent +// +// + +inline CParserVCard* CParserPropertyValueAgent::Value() const +/** Gets the agent object owned by the property value. + +@return A pointer to the agent property value. */ + {return iValue;} + +inline void CParserGroupedProperty::SetGroups(CDesC8Array* aArrayOfGroups) +/** Sets the list of groups to which the property belongs, replacing any existing +list. + +@param aArrayOfGroups Array of descriptors; each of which specifies +a group name. The grouped property takes ownership of the array. */ + {iArrayOfGroups=aArrayOfGroups;} + +inline const CDesC8Array* CParserGroupedProperty::Groups() +/** Gets the groups to which the property belongs. + +@return Pointer to an array of descriptors. Each one specifies a group name. */ + {return iArrayOfGroups;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/versit.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/versit.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,485 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VERSIT_H__ +#define __VERSIT_H__ + +// System includes +#include +#include +#include + +// User includes +#include +#include +#include +#include + +// Classes referenced +class RFile; +class TVersitDateTime; +class MVersitObserver; +class MVersitPlugIn; + +// Panic enumeration +/** Versit panic numbers. The Versit panic numbers have a category of "Versit-Parser". +@internalComponent +@released +*/ +enum TVersitParserPanic + { + ECurrentTokenNotFound, //Unused + EUnicodeUtilsNotFound, //Unused + ENoPropertyValue, //Unused + /** A CWeekDayArray contains an invalid value (not between EMonday + and ESunday inclusive). */ + ENoWeekdayFound, + /** The number of a week within a month is invalid. */ + EWeekNoOverTen, + /** The repeat type for a recurrence rule property value is not one of the values + specified in CVersitRecurrence::TType. */ + ENoRecognizedRepeatType, + EVersitPanicEscapedTextAlreadyExists, //Unused + /** 8-bit encoding is proposed as the default for a parser but may not be appropriate. */ + EVersitPanicCannotSetEightBitEncoding, + /** 8-bit encoding is encountered or proposed where it is not expected. */ + EVersitPanicUnexpectedEightBitEncoding, + /** A parser was not specified when externalising a property. */ + EVersitPanicNeedToSpecifyParser, + /** The additional storage slot for the given property has already been used */ + EVersitPanicAdditionalStorageSlotAlreadyInUse, + /** Attempting to assign a NULL value to an additional storage slot */ + EVersitPanicNullValueAssignedToAdditionalStorageSlot, + // + EVersitPanicLast + }; + +/** +Used as key into additional storage within tls object, for CVersitTLSContainer +Value should not conflict with genuine compiler generated pointer values +*/ +const static TInt* const KTLSVars = reinterpret_cast(1); + +GLREF_C void DestroyHBufC(TAny* aHBufC); +IMPORT_C void Panic(TVersitParserPanic aPanic); + + +/** Extension mechanism for CLineReader +This is an internal class and is only for use by CLineReader +@internalComponent +@released +*/ +class CLineReaderExtension : public CBase + { + friend class CLineReader; +private: + CLineReaderExtension(); + static CLineReaderExtension* NewL(); +private: + TUint8 iBuf[1024]; + TInt iOffset; + TInt iSize; + }; + +class CLineReader : public CBase +/** Line reader for a vCalendar or vCard parser. + +Reads in a line at a time for the parser. + +Also allows the first character of the next line to be checked to see if it +is a space, which can indicate that the line is wrapped. This enables the +reading of multi-line property values. + +Used by CVersitParser to internalise streams. +@publishedAll +@released +*/ + { +public: + /** Defines the initial line size of, and the size of expansions to, the buffer + which stores the line being read. */ + enum + { + /** The initial size of the buffer (pointed to by iBuf). */ + EInitialLineSize=96, + /** The size by which the buffer (pointed to by iBuf) + is expanded when it has run out of room. */ + EExpandSize=16, + }; + /** Defines values which describe the content of a line that has been read. + + This is the return value from the function ReadLine(). */ + enum + { + /** The line has content (not white space). */ + ELineHasContent=0, + /** The line has white space only. */ + ELineIsWhiteSpace=1, //Doesn't include next case + /** The line has no content, and so is just a carriage return and line + feed ("/r/n"). */ + ELineIsCRLFOnly=2, + }; +public: + IMPORT_C static CLineReader* NewL(RReadStream& aStream); + IMPORT_C ~CLineReader(); + IMPORT_C virtual TBool ReadLineL(TInt aPos,TInt& aErr); + IMPORT_C TBool AppendLineIfSpaceNextL(); + IMPORT_C TBool IsSpaceNextL(); + IMPORT_C TInt AppendSpaceL(); + inline void SetPlugIn(MVersitPlugIn* aPlugIn); + inline void SetSkipWhiteSpaceAtStart(TBool aDoSkip); +protected: + inline CLineReader(RReadStream& aStream) :iReadStream(&aStream), iBufPtr(NULL,0), iFirstCharNextLine(-1) {} + IMPORT_C void ConstructL(); + IMPORT_C void ExpandBufferL(TInt aCurrentSize); + IMPORT_C TUint8 ReadChar(TInt& aErr); +private: + IMPORT_C virtual void Reserved(); +public: + /** A pointer to an RReadStream object, the ReadUint8L() function of which is used + to read single characters from the stream. + + This is passed into the NewL() function upon construction. */ + RReadStream* iReadStream; + /** A pointer to a buffer which stores data read from the stream. + + Its size on construction is EInitialLineSize, and it is expanded by EExpandSize + when necessary. + + A copy of this value should not be stored, since the buffer location may change + if the buffer is expanded. + + Data in the buffer is not lost when the buffer is expanded, but is copied + to the new location. */ + TPtr8 iBufPtr; +protected: + HBufC8* iLineBuf; + TInt iFirstCharNextLine; +private: + MVersitPlugIn* iPlugIn; + TBool iSkipWhiteSpaceAtStart; + CLineReaderExtension* iExtension; + }; + +class CVersitParser : public CBase +/** A generic Versit parser. + +Provides generic functions which implement behaviour common to both vCalendar +and vCard parsers. For instance: + +- InternalizeL() and ExternalizeL() functions, for writing and reading +data from a stream or file. + +- adding/retrieving properties and sub-entities to/from an existing entity. + +- encoding and character set conversion capabilities. + +Although this is not an abstract class, in practice you would create and use +objects of a derived class instead (CParserVCal or CParserVCard), as these +provide additional functionality needed for parsing vCalendars and vCards. + +Note: a flag used in the class constructor indicates whether the entity needs +a version property. The version property will be inserted at the start of +the array of properties for the entity, and specifies the version of the vCard/vCalendar +specification used by the data of this particular vCard/vCalendar. The versions +that are currently supported are vCard v2.1 and vCalendar v1.0. + +A typical vCard looks like this: + +BEGIN VCARD + +VERSION 2.1 ... + +END VCARD + +Note: if you are sequentially creating and destroying multiple +parsers, a major performance improvement may be achieved +by using thread local storage to store an instance of CVersitUnicodeUtils +which persists and can be used by all of the parsers. + +See CVersitTlsData for more details. +@publishedAll +@released +*/ + { + friend class CParserProperty; +public: + IMPORT_C CVersitParser(TUint aFlags); + IMPORT_C void ConstructL(); + IMPORT_C ~CVersitParser(); + IMPORT_C void InternalizeL(RFile& aInputFile,TInt& aBytesThroughFile); + IMPORT_C virtual void InternalizeL(RReadStream& aStream); + IMPORT_C virtual void InternalizeL(HBufC* aEntityName,CLineReader* aLineReader); + IMPORT_C void ExternalizeL(RFile& aOutputFile); + IMPORT_C virtual void ExternalizeL(RWriteStream& aStream); + IMPORT_C void AddEntityL(CVersitParser* aEntity); + IMPORT_C void AddPropertyL(CParserProperty* aProperty,TBool aInternalizing=EFalse); + IMPORT_C CArrayPtr* EntityL(const TDesC& aEntityName,TBool aTakeOwnership=ETrue); + IMPORT_C CArrayPtr* ArrayOfEntities(TBool aTakeOwnership=ETrue); + IMPORT_C CArrayPtr* PropertyL(const TDesC8& aPropertyName,const TUid& aPropertyUid,TBool aTakeOwnership=ETrue) const; + IMPORT_C CArrayPtr* ArrayOfProperties(TBool aTakeOwnership=ETrue); + IMPORT_C virtual void ConvertAllPropertyDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void AdjustAllPropertyDateTimesToMachineLocalL(); + IMPORT_C static TBool IsValidParameterValue(TInt& aPos,const TDesC& aParamValue); + IMPORT_C void SetEntityNameL(const TDesC& aEntityName); + IMPORT_C TPtrC EntityName() const; + IMPORT_C static TBool IsValidLabel(const TDesC& aLabel, TInt& aPos); + IMPORT_C static TInt Val(const TDesC& aString, TInt& aNumber); + IMPORT_C void SetCharacterConverter(Versit::TEncodingAndCharset& encodingAndCharset); + + // + // Set/Get the default settings for the [en|de]coding process + // + IMPORT_C Versit::TVersitEncoding DefaultEncoding() const; + IMPORT_C void SetDefaultEncoding(const Versit::TVersitEncoding aEncoding); + IMPORT_C Versit::TVersitCharSet DefaultCharSet() const; + IMPORT_C TUint DefaultCharSetId() const; + IMPORT_C void SetDefaultCharSet(const Versit::TVersitCharSet aCharSet); + IMPORT_C void SetDefaultCharSetId(TUint aCharSetId); + IMPORT_C void SetAutoDetect(TBool aOn,const CArrayFix* aAutoDetectCharSets=NULL); + + // + // Set/Get Observers and PlugIn's + // + inline void SetObserver(MVersitObserver* aObserver); + inline MVersitObserver* Observer(); + inline void SetPlugIn(MVersitPlugIn* aPlugIn); + inline MVersitPlugIn* PlugIn(); + +public: + + IMPORT_C TInt LoadBinaryValuesFromFilesL(); + IMPORT_C TInt LoadBinaryValuesFromFilesL(RFs& aFileSession); + IMPORT_C TInt SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath); + IMPORT_C TInt SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath,RFs& aFileSession); +public: + /** White space character codes: used while analysing the syntax of the received + data and while externalising data. + @publishedAll + @released + */ + enum TCharCodes + { + /** ' ' */ + ESpace = ' ', + /** 9 */ + EHTab = 9, + /** 10 */ + ELineFeed = 10, + /** 13 */ + ECarriageReturn = 13 + }; + /** Flags that can be specified on construction. + @publishedAll + @released + */ + enum TVersitParserFlags + { + /** This entity does not need a version property. */ + ENoVersionProperty = 0, + /** This entity should have a version property. */ + ESupportsVersion = 0x01, + //Gaps since other flags have been used in past + EImportSyncML = 0x1000, //Importing from a SyncML server + /** Indicates whether the parser should use auto-detection of character sets when + one has not been explicitly specified. */ + EUseAutoDetection = 0x4000, + //versit Internal use only + /** The current property has specified a character set. */ + ECharSetIdentified = 0x8000, + /** If the charset is not explicitly specified, the default charset will be used instead of US-ASCII as required + by the Versit specification . */ + EUseDefaultCharSetForAllProperties = 0x2000 + }; + + // + // Unicode support conversion functions + // + IMPORT_C static TInt ConvertFromUnicodeToISOL(TDes8& aIso, const TDesC16& aUnicode, CCnvCharacterSetConverter* aConverter); + IMPORT_C TVersitDateTime* DecodeDateTimeL(TDes& aToken) const; + +protected: + IMPORT_C TInt ConvertToUnicodeFromISOL(TDes16& aUnicode, const TDesC8& aIso, TUint aCharacterSet); + + // + // Parsing high level functions + // + IMPORT_C void ParsePropertiesL(); + IMPORT_C void ParseBeginL(); + IMPORT_C void ParseEndL(); + void ParseEndL(HBufC16& aEntityName); + IMPORT_C TBool ParseEntityL(); + IMPORT_C virtual void ParsePropertyL(); + IMPORT_C CArrayPtr* ReadLineAndDecodeParamsLC(TInt& aValueStart,TInt& aNameLen); + IMPORT_C void MakePropertyL(TPtr8& aPropName,TInt aValueStart); + IMPORT_C CArrayPtr* GetPropertyParamsLC(TPtr8 aParams); + IMPORT_C void ParseParamL(CArrayPtr* aArray,TPtr8 aParam); + IMPORT_C void AnalysesEncodingCharset(CArrayPtr* aArrayOfParams); + IMPORT_C void ReadMultiLineValueL(TPtr8& aValue,TInt aValueStart,TBool aBinaryData); + inline TPtr8& BufPtr(); + + // + // Append standard versit tokens to streams + // + IMPORT_C void AppendBeginL(); + IMPORT_C void AppendEndL(); + void AppendEntityNameL(); + IMPORT_C void DoAddPropertyL(CParserProperty* aProperty); + + // + // Dispatcher functions to create entities/properties based upon a Versit identifying Uid + // + IMPORT_C virtual CVersitParser* MakeEntityL(TInt aEntityUid,HBufC* aEntityName); + CParserPropertyValueHBufC* MakeDefaultPropertyValueL(HBufC16*& aValue); + IMPORT_C virtual CParserPropertyValue* MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue); + IMPORT_C HBufC* DecodePropertyValueL(const TDesC8& aValue); + IMPORT_C void DecodePropertyValueL(const TDesC8& aValue,const TUid& aEncodingUid); + HBufC* ConvertToUnicodeL(const TDesC8& aValue); + IMPORT_C CDesCArray* MakePropertyValueCDesCArrayL(TPtr16 aStringValue); + IMPORT_C CArrayPtr* MakePropertyValueMultiDateTimeL(TPtr16 aDateTimeGroup); + IMPORT_C CVersitDaylight* MakePropertyValueDaylightL(TPtr16 aDaylightValue); + IMPORT_C TBool FindFirstField(TPtr16& aField,TPtr16& aRemaining, TBool aTrimSpace=ETrue); + IMPORT_C void FindRemainingField(TPtr16& aField,TPtr16& aRemaining); + + // + // Helper methods to decode versit dates, times, and time periods + // + IMPORT_C TTimeIntervalSeconds DecodeTimeZoneL(const TDesC& aToken) const; + IMPORT_C TTime* DecodeTimePeriodL(const TDesC& aToken) const; + IMPORT_C TInt GetNumberL(const TDesC& aToken,TInt& aNumChars) const; + +public: + IMPORT_C virtual TUid RecognizeToken(const TDesC8& aToken) const; + IMPORT_C virtual TInt RecognizeEntityName() const; + // + // Cleanup support methods + // + IMPORT_C static void ResetAndDestroyArrayOfParams(TAny* aObject); + IMPORT_C static void ResetAndDestroyArrayOfProperties(TAny* aObject); + IMPORT_C static void ResetAndDestroyArrayOfEntities(TAny* aObject); + IMPORT_C static void ResetAndDestroyArrayOfDateTimes(TAny* aObject); + + inline void SetFlags(TUint aFlags); + + + +protected: + // + // Enquiry functions + // + static TBool IsPunctuationToken(TUint aChar); + inline TBool SupportsVersion() const; + inline void SetSupportsVersion(); + inline void ClearSupportsVersion(); + + // + // Set the settings for the [en|de]coding of the current property + // + IMPORT_C void RestoreLineCodingDetailsToDefault(); + IMPORT_C void SetLineEncoding(Versit::TVersitEncoding aLineEncoding); + IMPORT_C void SetLineEncoding(TUint aVersitEncodingUid); + IMPORT_C void SetLineCharacterSet(Versit::TVersitCharSet aLineCharSet); + IMPORT_C void SetLineCharacterSetId(TUint aLineCharSetId); + IMPORT_C void SetLineCoding(Versit::TVersitCharSet aLineCharSet, Versit::TVersitEncoding aLineEncoding); + + // + // Return the settings for the current property + // + IMPORT_C Versit::TVersitEncoding LineEncoding() const; + IMPORT_C Versit::TVersitCharSet LineCharSet() const; + IMPORT_C TUint LineEncodingId() const; + IMPORT_C TUint LineCharSetId() const; + + inline CVersitUnicodeUtils& UnicodeUtils(); + +public: + // + // Static utility functions to aid with the Unicode conversion process + // + static TUint MapVersitCharsetToCharConvCharset(Versit::TVersitCharSet aVersitSet); + static TUint MapVersitEncodingToConArcUid(Versit::TVersitEncoding aVersitEncoding); + +private: + void SetLineCharsetDetailsToDefault(); + void SetLineEncodingDetailsToDefault(); + +private: //To fix TimeZone SyncML bug + void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + void ConvertUTCDateTimeToMachineLocal(TVersitDateTime* aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + //void AddTimeZonePropertyL(); + +protected: + struct TParserCodingDetails + { + Versit::TVersitEncoding iEncoding; + TUint iEncodingUid; + Versit::TVersitCharSet iCharSet; + TUint iCharSetUid; + }; + +protected: + // Default settings & internal flags + TInt iFlags; + TParserCodingDetails iDefaultCodingDetails; + TParserCodingDetails iCurrentPropertyCodingDetails; + TBuf iDefaultVersion; + const CArrayFix* iAutoDetectCharSets; + + // Member data relating to the current item being parsed + HBufC* iEntityName; + CArrayPtr* iArrayOfEntities; + CArrayPtr* iArrayOfProperties; + CParserProperty* iCurrentProperty; + CLineReader* iOwnedLineReader; + CLineReader* iLineReader; + HBufC8* iDecodedValue; + CBufSeg* iLargeDataBuf; + + // In memory buffers + RWriteStream* iWriteStream; + + // General utility class + CVersitTlsData* iStaticUtils; + + // Plug-in classes + MVersitObserver* iObserver; + MVersitPlugIn* iPlugIn; + +private: + void DoInternalizeL(); + IMPORT_C virtual void Reserved1(); + IMPORT_C virtual void Reserved2(); +private: + TInt iParseBegin; + TInt iReserved2; + }; + +NONSHARABLE_CLASS( CVersitTLSContainer ): public CBase +/** +Wrapper class for static variables to be stored in TLS +@internalComponent +@released +*/ + { +public: + static CVersitTLSContainer *NewLC(const TInt aSize); + ~CVersitTLSContainer(); +public: + HBufC * iShiftJisEscape;//Store shift-jis escape charcter, as generated by relevant charconv plugin + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/versit.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/versit.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,112 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CVersitParser +// +// + +inline void CLineReader::SetPlugIn(MVersitPlugIn* aPlugIn) +/** Sets the plug-in. + +Allows implemented functions of the MVersitPlugIn class to be used in specifying +options for adding and deleting spaces to/from the buffer. + +Specifically, the plug-in is used to determine whether an additional space should +be added when appending a line to the buffer (by default a space will be added), +and whether the white space at the start of a line should form part of the data +(by default it will not form part of the data). + +Using a plug-in is optional. + +@param aPlugIn A pointer to an MVersitPlugIn instance. */ + {iPlugIn=aPlugIn;} + +inline void CLineReader::SetSkipWhiteSpaceAtStart(TBool aDoSkip) + {iSkipWhiteSpaceAtStart=aDoSkip;} + + +// +// CVersitParser +// + +inline void CVersitParser::SetObserver(MVersitObserver* aObserver) +/** Sets the Versit observer. + +@param aObserver A pointer to the observer. */ + {iObserver=aObserver;} + +inline MVersitObserver* CVersitParser::Observer() +/** Gets a pointer to the Versit observer. + +@return A pointer to the observer. */ + {return iObserver;} + +inline void CVersitParser::SetPlugIn(MVersitPlugIn* aPlugIn) +/** Sets the Versit plug-in. + +If there is one, the Versit plug-in needs to be set before any properties are +added to the parser. This is done for you when internalising (using InternalizeL()) +or adding properties (using AddPropertyL()). + +@param aPlugIn A pointer to the plug in. */ + {iPlugIn=aPlugIn;} + +inline MVersitPlugIn* CVersitParser::PlugIn() +/** Gets a pointer to the Versit plug-in. + +@return A pointer to the plug-in. */ + {return iPlugIn;} + +/* Gets a pointer to the read buffer owned by the CLineReader. + * + * @return Pointer to the read buffer. */ +inline TPtr8& CVersitParser::BufPtr() + {return iLineReader->iBufPtr;} + +/* + * Check the iFlags to see if ESupportsVersion is set + * + * @return " TBool " + * ETrue if the parser supports the version property + * EFalse otherwise + */ +inline TBool CVersitParser::SupportsVersion() const + {return iFlags & ESupportsVersion;} + +/* + * Sets the iFlags to ESupportsVersion + */ +inline void CVersitParser::SetSupportsVersion() + {iFlags |= ESupportsVersion;} + +/* + * Clear the bit of ESupportsVersion in iFlags' + */ +inline void CVersitParser::ClearSupportsVersion() + {iFlags &= ~ESupportsVersion;} + +/* + * Set Flags + */ +inline void CVersitParser::SetFlags(TUint aFlags) + {iFlags |= aFlags;} + +/* + * Gets a reference to CVersitUnicodeUtils + * which is used for charset conversion + * + * @return " CVersitUnicodeUtils&" + * reference to CVersitUnicodeUtils + */ +inline CVersitUnicodeUtils& CVersitParser::UnicodeUtils() + { return iStaticUtils->UnicodeUtils(); } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/versittls.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/versittls.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,110 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VERSITTLS_H__ +#define __VERSITTLS_H__ + +// System includes +#include +#include + +#include + +class CVersitTimer; +class CVersitAdditionalStorage; + +class CVersitTlsData : public CBase +/** Versit thread local storage. + +This class provides a performance improvement by allowing a CVersitUnicodeUtils +instance to be shared between parsers operating in the same thread, so that +a new instance does not have to be created for each parser. A pointer to the +unicode utilities object is held in thread local storage: a single word (32bits) +of data. Each unicode utilities object is managed by an instance of this class. + +Every time a parser is created, CVersitParser::ConstructL() calls the +CVersitTlsData constructor, and when the parser is destroyed the CVersitTlsData +destructor is called. If a CVersitTlsData object exists, the constructor +returns a pointer to it, otherwise a new one is constructed. The CVersitTlsData +object is only destroyed when no more parsers refer to it: a count is kept, +which is incremented every time the constructor is called and decremented each +time the destructor is called, and the object is only destroyed when the count +reaches zero. + +This class provides an additional major performance improvement +if you are sequentially constructing and destructing multiple parsers. +By default, when the count of parsers reaches zero, the thread local +storage object is destroyed (even if the thread has not finished). However, +by using the technique described below, the thread local storage object, and therefore +the unicode utilities object, can be made to persist, significantly reducing +the overhead of sequentially constructing and destructing parsers. + +The constructor needs to be called an extra time before creating any parsers, +and the destructor needs to be called an extra time once the parsers have +been destroyed. This has the effect of adding one to the reference count so +that during all the parser construction and deletion the count never hits +zero, which would trigger the TLS object's destruction. + +This can be implemented as follows: + +1. Create a thread local storage data class instance as follows: +@code +CVersitTlsData* versitTLS = CVersitTlsData::VersitTlsDataL(); +@endcode + +2. Create and delete the parsers. + +3. Delete the Thread Local Storage Data class instance: +@code +delete versitTLS; +@endcode +@publishedAll +@released +*/ + { + friend class CVersitTimer; + +public: + IMPORT_C static CVersitTlsData& VersitTlsDataL(); + IMPORT_C static void CloseVersitTlsData(); + IMPORT_C void VersitTlsDataClose(); + +public: + inline CVersitUnicodeUtils& UnicodeUtils() + /** Returns a pointer to the current Unicode utilities object. + + @return A pointer to the current Unicode utilities object. */ + { return *iUnicodeUtils; } + + inline CVersitAdditionalStorage& AdditionalStorage() + /** Returns a pointer to the additional property storage object. + + @return A pointer to the additional property storage. */ + { + return *iAdditionalStorage; + } + +private: + static CVersitTlsData* NewL(); + void ConstructL(); + ~CVersitTlsData(); + +private: + TInt iRefCount; + CVersitUnicodeUtils* iUnicodeUtils; + CVersitAdditionalStorage* iAdditionalStorage; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vobserv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vobserv.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,257 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VOBSERV_H__ +#define __VOBSERV_H__ + +#ifndef __E32DEF_H__ +#include +#endif +#ifndef __E32STD_H__ +#include +#endif +#ifndef __E32DES16_H__ +#include +#endif +#ifndef __S32STRM_H__ +#include +#endif +#ifndef __VUTIL_H__ +#include +#endif + +class CVersitParser; + +class MVersitObserver +/** A Versit parser observer. + +This is a plug-in class and contains only pure virtual functions. + +An implementator of this class can find out the version number of an entity +being parsed. The version number specifies the version of the vCard/vCalendar +specification used by the data of the vCard/vCalendar. This is for use in +conjunction with the MVersitPlugin class, which adjusts the parser's behaviour +according to the vCard/vCalendar version. + +An implementator of this class can also respond to the creation of a new parser +for an embedded sub-entity. This is so that the observer can set the MVersitPlugin, +as well as itself, for each new parser that is created. + +An observer is set up for a Versit parser using CVersitParser::SetObserver(). +@publishedAll +@released +*/ + { +public: + /** Called when the version property (a property of the name KVersitTokenVERSION) + of an entity is parsed during internalisation of a stream, if the Versit parser + has an observer. + + An implementation of this function can determine the version of an entity + being parsed. + + Called by CVersitParser::ParsePropertiesL(). + + @param aParser A pointer to the parser object that detected the version. + @param aVersion A unicode string containing the version number detected. */ + virtual void VersionSet(CVersitParser* aParser,const TDesC16& aVersion)=0; + /** Called when a new Versit parser is created to parse an embedded object, + specifically a vEvent, a vTodo or an agent, if the Versit parser has an observer. + + @param aParser The newly created Versit entity. */ + virtual void NewParser(CVersitParser* aParser)=0; +private: + IMPORT_C virtual void Reserved1(); + IMPORT_C virtual void Reserved2(); + }; + +class MVersitPlugIn +/** A Versit parser plug-in. + +This is a plug-in class and contains only pure virtual functions. + +An implementator of this class can override some of the low level behaviour +of a Versit parser. For instance, options are provided to determine behaviour +during line wrapping and unwrapping. + +The use of this plug-in is optional, and when there is no plug-in the parser +object will use default behaviour. However, vCard v3.0 has some differences +to vCard v2.1, such as for line wrapping and unwrapping. Symbian OS supports +vCard v2.1 in its default behaviour. Therefore this plug-in can be used to +provide compatibility with vCard v3.0. +@publishedAll +@released +*/ + { +public: + /** Tests whether a space is to be added when merging (unwrapping) two lines + while internalising a stream. + + If there is no plug-in then a space will be added. + + Used by the CLineReader class. + + @return ETrue if a space is to be added and EFalse if not. */ + virtual TBool AddSpace()=0; //Unwrapping lines + /** Tests whether white space at the start of a line, apart from the first space, + forms part of the data when internalising a stream. + + Note that the first space is always ignored and never included. + + If there is no plug-in then the rest of the white space at the start of a + line (tabs and spaces) is skipped and does not form part of the data when + internalising a stream. + + Used by the CLineReader class. + + @return EFalse if the spaces are to be part of the data and ETrue if not. */ + virtual TBool DeleteAllSpaces()=0; //Unwrapping lines + /** Tests how the end of Base64 data (data encoded using Versit::EBase64Encoding) + should be detected when internalising a stream. + + To determine the end of Base64 data, either a blank line can be used, or a line + without a space at the start. + + If there is no plug-in then a blank line will be looked for. + + Used by the CVersitParser class. + + @return ETrue if a blank line should be used and EFalse if a line without + a space at the start should be used. */ + virtual TBool NeedsBlankLine()=0; //Unwrapping Base64 data + /** Allows the removal of escape characters from a property value when internalising + from a stream. + + Versit deals with the escaping of semi-colons and the escape character itself + (that is, the Yen character for Shift-JIS or a backslash for other character + sets) without the help of a plug-in. Other characters, such as commas and + carriage returns, can be escaped and un-escaped using the plug-in's AddEscaping() + and RemoveEscaping(). + + This function is needed as escaping is done differently in vCard v3.0: firstly, + commas are used as syntactical characters and so need to be escaped when they + are just part of the text; secondly, \\r\\n in plain (un-encoded) text is used + to mean a CRLF, whereas v2.1 forces you to use Quoted Printble encoding if + there is a CRLF in the data. + + Note that, although the string passed into this function can be changed, it + must not be made longer. + + Used by the CVersitParser class. + + @param aText The property value text from which escape characters are to be + removed. */ + virtual void RemoveEscaping(TPtr16& aText)=0; + /** Allows the addition of escape characters to a property value when externalising + to a stream. + + Versit deals with the escaping of semi-colons and the escape character itself + (that is, the Yen character for Shift-JIS or a backslash for other character + sets) without the help of a plug-in. Other characters, such as commas and + carriage returns, can be escaped and un-escaped using the plug-in's RemoveEscaping() + and AddEscaping(). + + This function is needed as escaping is done differently in vCard v3.0: firstly, + commas are used as syntactical characters and so need to be escaped when they + are just part of the text; secondly, \\r\\n in plain (un-encoded) text is used + to mean a CRLF, whereas v2.1 forces you to use Quoted Printble encoding if + there is a CRLF in the data. + + If the string passed into this function needs to be made longer, then this + should be done with the following command, otherwise the cleanup stack will + eventually panic: + + @code + aText=aText->ReAllocL(newSize); + @endcode + + Used by the CParserPropertyValue class. + + @param aText The property value text to which escape characters are to be + added. */ + virtual void AddEscaping(HBufC16*& aText)=0; + /** Determines how an unencoded property value should be wrapped when externalising + to a stream. + + If there is no plug-in then line wrapping will follow vCal v1.0 and vCard + v2.1 wrapping rules. In this case, the text is split into lines with a maximum + length of KMaxExternalizedTokenLength (70) characters, and two spaces are inserted + at the beginning of each new line. + + Used by the CParserPropertyValue class. + + @param aStream The stream to write the text to. + @param aCurrentLineLength The number of characters already written to the current + line, which needs to be taken into account when calculating where the next + line break should occur. This value should be updated before returning. + @param aText The property value text to write to the stream, in the correct + character set and encoded as necessary. + @return ETrue if the property value is wrapped using the method defined in + this (overloaded) function. EFalse if the property value text is not wrapped + by this function (in which case the default wrapping rules are implemented). */ + virtual TBool WrapLine(RWriteStream& aStream,TInt& aCurrentLineLength,const TPtr8& aText)=0; + /** Determines how property values are encoded when externalising a property to + a stream. + + This function is called for each property in turn and can specify how encoding + should be implemented for the value of that property. + + If there is no plug-in, or this function returns EFalse, then the default + rules are used to determine how each property value is encoded. + + Used by the CVersitParser plug-in when externalising a property. + + @param aEncoding On return, specifies the encoding type used. + @param aRequiresEncoding ETrue if encoding is required. This is the case if + either the default encoding is not Versit::ENoEncoding, or if the property + value contains characters that cannot be written out directly (e.g. equals, + CR, LF, tab or non-ASCII characters). + @param aDefaultEncoding The default encoding specifed by the user of the parser. + @param aPropertyUid The property UID of the property being externalised. These are + defined in vuid.h. + @param aPropertyCharsetId The character set UID of the character set being + used to output the property. + @return ETrue if the encoding type to be used is defined in this (overloaded) + function. EFalse if this function does not determine the encoding type (in + which case Versit's default method is used to decide the encoding type). */ + virtual TBool EncodingType(Versit::TVersitEncoding& aEncoding,TBool aRequiresEncoding,Versit::TVersitEncoding aDefaultEncoding + ,TUid aPropertyUid,TUint aPropertyCharsetId)=0; + /** Returns the encoding name to be used for a specified encoding type when externalising + a property to a stream, or allows the default name to be used. + + Can override the default name Versit would select if there was no plug-in ("BASE64", + "QUOTED-PRINTABLE", "8-BIT"). + + The default names are selected using VersitUtils::IANAEncodingName(). + + Used by the CVersitParser class when externalising a property. + + @param aEncoding The encoding type the name is required for. + @return The name to use for the encoding type, or a zero length descriptor + if the default name should be used. */ + virtual const TDesC8& EncodingName(Versit::TVersitEncoding aEncoding)=0; + + /** Returns a pointer to a specified interface extension - to allow future extension + of this class without breaking binary compatibility + + @param aInterfaceUid Identifier of the interface to be retrieved + @param aInterface A reference to a pointer that retrieves the specified interface. + */ + IMPORT_C virtual void GetInterface(TUid aInterfaceUid, TAny*& aInterface); +private: + IMPORT_C virtual void Reserved2(); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vprop.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vprop.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,697 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VPROP_H__ +#define __VPROP_H__ + +#ifndef __E32BASE_H__ +#include +#endif + +#ifndef __BADESCA_H__ +#include +#endif + +#ifndef __S32STRM_H__ +#include +#endif + +#ifndef __E32MATH_H__ +#include +#endif + + +#ifndef __VUID_H__ +#include +#endif + +#ifndef __VTOKEN_H__ +#include +#endif + +#ifndef __VUTIL_H__ +#include +#endif + +#ifndef __S32FILE_H__ +#include +#endif +// + +class CParserProperty; +class CVersitParser; +class MVersitPlugIn; +class CParserPropertyValueCDesCArray; + +const TInt KRandomnumberlen = 5; +const TInt KMaxGeneratedfilenamelen =16; +// +// CParserParam +// + +class CParserParam : public CBase +/** A Versit property parameter. + +A property parameter consists of a name and optionally a value, both in descriptor +form. Parser properties (class CParserProperty) may own one or more property +parameters. + +Note: + +The private parameter name and value members are stored as narrow (8-bit) +rather than 16-bit Unicode descriptors. + +However, certain member functions take or return a Unicode value, +for the purpose of backwards compatibility. In this case a simple conversion +takes place: this ignores the top 8 bits (for Unicode -> Narrow) or adds zero +for the top 8-bits (for Narrow->Unicode). +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserParam* NewL(const TDesC8& aName, const TDesC8& aValue); + IMPORT_C static CParserParam* NewL(const TDesC8& aName, const TDesC& aValue); + IMPORT_C ~CParserParam(); + IMPORT_C void SetValueL(const TDesC8& aValue); + IMPORT_C void SetValueL(HBufC8* aValue); + IMPORT_C TInt ExternalizeL(RWriteStream& aStream) const; + IMPORT_C TPtrC8 Name() const; + IMPORT_C TPtrC8 Value() const; + IMPORT_C HBufC* ValueL() const; + IMPORT_C TInt ExternalizeL(RWriteStream& aStream, TInt& aLengthOutput, CVersitParser* aVersitParser) const; +private: + CParserParam(HBufC8* aName, HBufC8* aValue); +private: + HBufC8* iParamName; + HBufC8* iValue; + }; + +// +// TVersitDateTime +// + +class TVersitDateTime +/** Defines a Versit date and time. + +This class is used throughout Versit to represent the date and time. It uses +a TDateTime object to store the date/time value and records whether this value +is local to the machine which originated the vCard, local to the machine on +which the code is running, or universal time (UTC). + +The Year(), Month() and Day() member functions of class TDateTime may be used +to extract the date and time components from the TVersitDateTime::iDateTime. +@publishedAll +@released */ + { +public: + /** Relative time flags. */ + enum TRelativeTime + { + /** Time is stored in UTC. */ + EIsUTC, + /** Time is local to the machine which originated the vCard. */ + EIsVCardLocal, + /** Time is local to the machine on which the code is running. */ + EIsMachineLocal, + /** Unused. */ + EIsCorrect + }; + IMPORT_C TVersitDateTime(const TDateTime& aDateTime,TRelativeTime aRelativeTime); + + /** Date/time flags. + @publishedAll + @deprecated since 9.1*/ + enum TVersitDateTimeFlags + { + EExportNullFlag=0, + /** Indicates whether the relative time is to be externalized along with the date/time + value. + + The flag is set to 'EExportNullFlag' by default. + + This is only implemented (by CParserTimePropertyValue::EncodeVersitDateTimeL()) + if the date/time is universal. When the flag is set, the externalised value + is followed by the token, KVersitTokenUniversalTime. */ + EExportTimeZoneDesignator=0x01, + EExportLeaveAsLocalTime=0x02 + }; + /** + @deprecated since 9.1 + */ + inline void SetFlag(TVersitDateTimeFlags aFlag) { iFlags |= aFlag; } + /** + @deprecated since 9.1 + */ + inline TBool IsFlagSet(TVersitDateTimeFlags aFlag) const { return iFlags & aFlag; } + /** + @deprecated since 9.1 + */ + inline void ClearFlag(TVersitDateTimeFlags aFlag) { iFlags &= ~aFlag; } +public: + /** The date/time value. */ + TDateTime iDateTime; + /** Specifies whether the time value is local to the machine which originated the + vCard, local to the machine on which the code is running, or universal. */ + TRelativeTime iRelativeTime; +private: + TInt iFlags; + }; + +// +// CParserPropertyValue +// +class CParserPropertyValue : public CBase +/** Abstract base class for all property values. + +Defines a pure virtual ExternalizeL() function which should write out the +property value to a stream. + +The type of derived class is returned by the Uid() function; the UID value is +specified on construction. + +The other functions relate to the character set, encoding format and plug-in +used during externalising. +@publishedAll +@released +*/ + { +public: + /** Externalises the property value to a write stream. + + Implementations of this function are invoked by the parser's ExternalizeL() + function. + + @param aStream Stream to which the property value is externalised. + @param aEncodingCharset The character set and encoding information. + @param aLengthOutput The amount of text that has been outputted so far on the + line (for the property name), which may need to be taken into account when + calculating if and where any line break should occur. */ + virtual void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput)=0; + IMPORT_C virtual TBool IsAsciiCharacterSetSufficient(); + IMPORT_C virtual void EncodeL(CBufBase* aTarget,const TDesC8& aSource,const TUid& aEncoding) const; + IMPORT_C virtual TBool SupportsInterface(const TUid& /*aInterfaceUid*/) const; + inline TUid Uid() const; + inline void SetPlugIn(MVersitPlugIn* aPlugIn); +protected: + IMPORT_C CParserPropertyValue(const TUid& aPropertyValueUid); + IMPORT_C void FoldEncodeAndWriteValueToStreamL(RWriteStream& aStream, const TDesC& aValue + ,const Versit::TEncodingAndCharset& aEncodingCharset,TInt& aLengthOutput) const; + IMPORT_C void FoldEncodeAndWriteValueToStreamL(RWriteStream& aStream, const CDesCArray* aValueArray + ,const Versit::TEncodingAndCharset& aEncodingCharset,TInt& aLengthOutput) const; + IMPORT_C void FoldAndWriteValueToStreamL(RWriteStream& aStream, const TDesC& aValue + ,const Versit::TEncodingAndCharset& aEncodingCharset,TInt& aLengthOutput) const; + IMPORT_C static void Append(TDes16& aTarget,TDesC8& aSource); +protected: + inline MVersitPlugIn* PlugIn(); + +private: + TUid iPropertyValueTypeUid; + MVersitPlugIn* iPlugIn; + }; + +// +// CParserTimePropertyValue +// + +class CVersitDaylight; + +class CParserTimePropertyValue : public CParserPropertyValue +/** Abstract base class for all of the date/time property value classes. + +Provides date/time conversion functions between machine-local and universal +time. + +The date/time property value classes are CParserPropertyValueAlarm, +CParserPropertyValueDate, CParserPropertyValueDateTime, +CParserPropertyValueMultiDateTime, CParserPropertyValueDaylight and +CParserPropertyValueRecurrence. +@publishedAll +@released +*/ + { +public: + /** This is implemented, where applicable, to convert date/time + values into universal time. + + The date/time is checked against the daylight saving information provided + in aDaylight. If it falls inside the daylight saving period then the daylight + saving offset is subtracted from the time to convert it to universal time. + Otherwise aIncrement is added to the date/time of the alarm to convert it + to universal time. + + Note that the daylight savings offset will adjust the time both for the daylight + saving and for the time zone. + + The function has no effect if it date/times are already stored in universal + time. + + If aDaylight is a NULL pointer then aIncrement is used. + + @param aIncrement A time interval in seconds which represents the time zone's + offset from universal time. + @param aDaylight Pointer to the specification for daylight saving. If the alarm's + time value is within the period for daylight saving, the value is modified + by the daylight saving offset (which accounts for both the time zone and daylight + saving rule). + @deprecated since 9.1 + */ + IMPORT_C virtual void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight)=0; + /** Pure virtual function which is implemented, where applicable, to convert the + date/time property value into machine-local time. + + This process involves adjusting the date/time value by the offset in aIncrement. + + The function has no effect if the value is already stored as machine-local + time. + + The universal date/times are assumed to have been corrected for any daylight saving + rule in effect. + + @param aIncrement A time interval which represents the number of seconds which + is to be added to the date/time value. This should normally be the universal + time offset for the machine's locale. + @deprecated since 9.1 */ + IMPORT_C virtual void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement)=0; + static void ConvertDateTime(TDateTime& aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight,TBool aTo); +public: //from CParserPropertyValue + IMPORT_C virtual TBool SupportsInterface(const TUid& aInterfaceUid) const; +protected: + IMPORT_C CParserTimePropertyValue(const TUid& aPropertyValueUid); + IMPORT_C void ConvertDateTime(TDateTime* aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void EncodeVersitDateTimeL(TDes8& aBuf,const TVersitDateTime& aDateTime,TBool aEncodeTime=ETrue) const; + IMPORT_C void EncodeTimePeriodL(TDes8& aBuf,const TTime& aTimePeriod) const; + }; + +// +// CParserPropertyValueHBufC +// +class CParserPropertyValueHBufC : public CParserPropertyValue +/** A heap descriptor property value parser. + +Many properties are stored using this class. Examples are vCard e-mails and +vCalendar locations. + +The UID for a heap descriptor property value is KVersitPropertyHBufCUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserPropertyValueHBufC* NewL(const TDesC& aValue); + IMPORT_C CParserPropertyValueHBufC(HBufC16* aValue); + IMPORT_C ~CParserPropertyValueHBufC(); + IMPORT_C TPtrC Value() const; + IMPORT_C HBufC* TakeValueOwnership(); + IMPORT_C CParserPropertyValueCDesCArray* TreatAsArrayPropertyLC(const CParserProperty& aOwningProperty) const; +public: // from CParserPropertyValue + IMPORT_C TBool IsAsciiCharacterSetSufficient(); + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); +private: + CParserPropertyValueHBufC(); + void ConstructL(const TDesC& aValue); +protected: + HBufC* iValue; + }; + +// +// CParserPropertyValueBinary +// + +class CParserPropertyValueBinary : public CParserPropertyValue +/** A binary property value parser. + +It is used to store logos, photos, alarm content and binary attachment as binary values. + +The UID for a binary property value is KVersitPropertyBinaryUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserPropertyValueBinary* NewL(const TDesC8& aValue); + IMPORT_C static CParserPropertyValueBinary* NewLC(const TDesC8& aValue); + + inline CParserPropertyValueBinary(CBufSeg& aValue); + IMPORT_C ~CParserPropertyValueBinary(); + IMPORT_C const CBufSeg* Value() const; +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); +protected: + inline CParserPropertyValueBinary(); + void ConstructL(const TDesC8& aValue); + void ExternalizeL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput, RReadStream& aReadStream); + +protected: + CBufSeg* iValue; + };// + +NONSHARABLE_CLASS(CParserPropertyValueBinaryFile) : public CParserPropertyValueBinary +/** A file property value parser. + +It is used to store a file handle so that the binary data can be read through the handle when exporting. +It is not used when importing. +The UID for a binary property value is KVersitPropertyBinaryUid. +@publishedPartner +@prototype +*/ + { +public: + IMPORT_C static CParserPropertyValueBinaryFile* NewL(const RFile& aFileHandle); + IMPORT_C ~CParserPropertyValueBinaryFile(); +public: // from CParserPropertyValue + void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); + +private: + void ConstructL(const RFile& aFileHandle); +private: + RFileReadStream iFileStream; + }; + +// CParserPropertyValueCDesCArray +// +class CParserPropertyValueCDesCArray : public CParserPropertyValue +/** A property value parser which stores an array of descriptors. + +Can be used by both vCards and vCalendars, for example to store a postal address +or information about an organisation. + +The UID for a descriptor array property value is KVersitPropertyCDesCArrayUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueCDesCArray(CDesCArray* aValue); + IMPORT_C ~CParserPropertyValueCDesCArray(); + inline CDesCArray* Value() const; + IMPORT_C TBool IsPresent(const TDesC& aValue) const; +public: // from CParserPropertyValue + IMPORT_C TBool IsAsciiCharacterSetSufficient(); + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); +protected: + CDesCArray* iValue; + }; + +// +// CParserPropertyValueTimeZone +// + +class CParserPropertyValueTimeZone: public CParserPropertyValue +/** A time zone property value parser. + +Stores and externalises a property value which represents the time zone information +for a vCard or vCalendar. + +The time zone is specified as the universal time offset. This is a time interval +which is a positive or negative number of seconds from universal time. Time +zones east of universal time have positive numbers. Time zones west of universal +time have negative numbers. + +The UID for a time zone property value is KVersitPropertyTimeZoneUid. +@publishedAll +@released +*/ + { +public: + static void EncodeTimeZone(TDes8& aBuf,TTimeIntervalSeconds iValue); + IMPORT_C CParserPropertyValueTimeZone(TTimeIntervalSeconds aValue); + inline TTimeIntervalSeconds Value() const; +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); +protected: + TTimeIntervalSeconds iValue; + }; + +// +// CVersitDaylight +// +class CVersitDaylight : public CBase +/** Universal time offset information, including the daylight savings offset. + +This class deals with the daylight saving offset: a one hour offset that occurs +in many countries during part of the year. This offset needs to be taken into +account when converting Versit times (TVersitDateTimes) between universal +and machine-local times. + +This class stores information about the offset, including its length in seconds, +when it takes effect and the standard time designations. + +Note that the universal offset (iOffset) is the sum of the daylight saving +offset and any time zone offset, as it is the absolute offset from GMT. + +An instance of this class is owned by the CParserPropertyValueDaylight class. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CVersitDaylight* NewL(TBool aSavings, TTimeIntervalSeconds aOffset, TVersitDateTime* aStartTime, TVersitDateTime* aEndTime, const TDesC& aStandardDesignation, const TDesC& aDaylightDesignation); + IMPORT_C ~CVersitDaylight(); +private: + CVersitDaylight(TBool aSavings, TTimeIntervalSeconds aOffset, TVersitDateTime* aStartTime, TVersitDateTime* aEndTime); + void ConstructL(const TDesC& aStandardDesignation, const TDesC& aDaylightDesignation); +public: + /** A sort key than can be used when sorting an array of properties by start date/time. */ + TInt64 iStartTimeSortKey; + /** The daylight savings flag: this is ETrue if daylight saving is in effect + in the locale and EFalse if not. */ + TBool iSavings; + /** The absolute offset from GMT, which is the sum of the time zone and daylight + saving offsets (in seconds). */ + TTimeIntervalSeconds iOffset; + /** The date/time at which the period for daylight saving begins. */ + TVersitDateTime* iStartTime; + /** The date/time at which the period for daylight saving ends. */ + TVersitDateTime* iEndTime; + /** The standard time designation, e.g. GMT, EST. */ + HBufC* iStandardDesignation; + /** The daylight saving time designation, e.g. BST, EDT. */ + HBufC* iDaylightDesignation; + }; + +// +// CParserPropertyValueDaylight +// +class CParserPropertyValueDaylight : public CParserTimePropertyValue +/** A property value parser which contains the daylight savings rule for a vCalendar. + +The property value is stored using an instance of the CVersitDaylight class. + +The UID for a daylight savings rule property value is KVersitPropertyDaylightUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueDaylight(CVersitDaylight* aValue); + IMPORT_C ~CParserPropertyValueDaylight(); + inline CVersitDaylight* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); +private: + CVersitDaylight* iValue; + }; + +// +// CParserPropertyValueDateTime +// +class CParserPropertyValueDateTime : public CParserTimePropertyValue +/** A date/time property value parser. + +The date/time value is contained in a TVersitDateTime object. + +The UID for a date/time property value is KVersitPropertyDateTimeUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueDateTime(TVersitDateTime* aValue); + IMPORT_C ~CParserPropertyValueDateTime(); + inline TVersitDateTime* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt /*aLengthOutput*/); +protected: + TVersitDateTime* iValue; + }; + +// +// CParserPropertyValueDate +// +class CParserPropertyValueDate : public CParserTimePropertyValue +/** A date property value parser. + +The date value is contained in a TVersitDateTime object. + +The UID for a date property value is KVersitPropertyDateUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueDate(TVersitDateTime* aValue); + IMPORT_C ~CParserPropertyValueDate(); + inline TVersitDateTime* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& /*aIncrement*/,const CVersitDaylight* /*aDaylight*/); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& /*aIncrement*/); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); +private: + TVersitDateTime* iValue; + }; + +// +// CParserPropertyValueMultiDateTime +// +class CParserPropertyValueMultiDateTime : public CParserTimePropertyValue +/** A property value parser which stores a list of date/time values using an array +of TVersitDateTime objects. + +The UID for a multiple date/time property value is KVersitPropertyMultiDateTimeUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueMultiDateTime(CArrayPtr* aValue); + IMPORT_C ~CParserPropertyValueMultiDateTime(); + inline CArrayPtr* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt aLengthOutput); +protected: + CArrayPtr* iValue; + }; + +// +// CParserPropertyValueInt +// +class CParserPropertyValueInt : public CParserPropertyValue +/** An integer property value parser. + +This stores a property value as a signed integer. For example, an employee +ID number might be stored using this class. + +The UID for an integer property value is KVersitPropertyIntUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueInt(TInt aValue); + inline TInt Value() const; +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); +protected: + TInt iValue; + }; + +// +// CParserProperty +// + +class CParserProperty : public CBase +/** A vCard or vCalendar property. + +A property consists of a name, an optional value and one or more optional +parameters. + +The name, value and parameters are initialised on construction. + +Versit properties have the general form: + +Property Name (; Property Parameter Name(=Property Parameter Value)* : Property +Value) + +where items in brackets are optional and * indicates that the item may be +repeated. + +For instance, TEL; HOME; ENCODING=QUOTED-PRINTABLE; CHARSET=US-ASCII : 01234 567890 + +Here, TEL is the property name; HOME, ENCODING and CHARSET are property parameter +names; QUOTED-PRINTABLE and US-ASCII are property parameter values. The component +following the colon is the property value. + +Properties also have a name UID, which set during internalisation of a property +and used only during internalisation. It is set by SetNameUid() and is used +to allow number comparisons during internalisation. This provides a faster +alternative to string comparisons when checking a property to see if it is +a significant one (e.g. a begin or binary property). This is the only use +of the name UID: it is not used during externalisation of a property. + +Note that grouped properties are supported by the derived class, CParserGroupedProperty. +The vCalender parser does not have property groups, and so stores all properties +using this base class, whereas the vCard parser stores all properties using +CParserGroupedProperty. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CParserProperty* NewL(CParserPropertyValue& aPropertyValue, const TDesC8& aName, CArrayPtr* aArrayOfParams); + IMPORT_C CParserProperty(CArrayPtr* aArrayOfParams); + IMPORT_C ~CParserProperty(); + IMPORT_C virtual void ExternalizeL(RWriteStream& aStream, CVersitParser* aVersitParser = NULL); + IMPORT_C CParserParam* Param(const TDesC8& aParamName) const; // note params can only appear once + IMPORT_C void AddParamL(CParserParam* aParam); + IMPORT_C void DeleteParam(TDesC8& aParamName); + IMPORT_C void SetNameL(const TDesC8& aName); + IMPORT_C virtual TBool SupportsInterface(const TUid& /*aInterfaceUid*/) const; + IMPORT_C TPtrC8 Name() const; + inline void SetValue(CParserPropertyValue* aPropertyValue); + inline CParserPropertyValue* Value() const; + inline TUid Uid() const; + inline void SetNameUid(TUid aUid); + inline TUid NameUid() const; + inline void SetParamArray(CArrayPtr* aArrayOfParams); + + + IMPORT_C TBool LoadBinaryValuesFromFilesL(RFs& aFileSession); + IMPORT_C TBool SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath,RFs& aFileSession); +protected: + IMPORT_C CParserProperty(CParserPropertyValue& aPropertyValue, CArrayPtr* aArrayOfParams); + IMPORT_C static void ConstructSelfL(CParserProperty& aSelf,const TDesC8& aName); + +public: + IMPORT_C CArrayPtr* ParamArray()const; + +protected: + CParserPropertyValue* iPropertyValue; + HBufC8* iPropertyName; + TUid iPropertyNameUid; + CArrayPtr* iArrayOfParams; + +private: + friend class CVersitParser; + inline HBufC8*& NameBuf(); + IMPORT_C virtual void Reserved(); + void ReadBinaryDataL(const CBufSeg* aBufseg_ptr,HBufC8** aBuffer); + void GenerateNameAndCreateFileL(RFs& aFileSession,TPtr8 aPropertyName,RFile& aFile,TDes& aFileName); + + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vprop.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vprop.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,181 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CParserPropertyValue +// +// + +inline TUid CParserPropertyValue::Uid() const +/** Returns the property value's UID. + +This UID identifies the property value's type and is specified on construction. +The values are defined in vuid.h. + +@return The property value's UID. */ + {return iPropertyValueTypeUid;} + +inline void CParserPropertyValue::SetPlugIn(MVersitPlugIn* aPlugIn) +/** Assigns a Versit plug-in to the property value. + +Allows functions of the MVersitPlugIn class to be used when writing to a stream. + +If a plug-in is in use then this function needs to be called with each property value +before it is externalised. However, this will be done for you if you add a property +using the function CVersitParser::AddPropertyL(). + +@param aPlugIn A pointer to an MVersitPlugIn instance. */ + {iPlugIn=aPlugIn;} + +inline MVersitPlugIn* CParserPropertyValue::PlugIn() +/** Gets a pointer to the Versit plug-in + +@return A pointer to the plug-in. */ + {return iPlugIn;} + +// +// CParserPropertyValueCDesCArray +// +inline CParserPropertyValueBinary::CParserPropertyValueBinary() :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)) +/** Constructs a binary property value. + +Sets the property value UID to KVersitPropertyBinaryUid. */ + {} + +inline CParserPropertyValueBinary::CParserPropertyValueBinary(CBufSeg& aValue) :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)), iValue(&aValue) +/** Constructs a binary property value. + +Sets the property value to aValue and the property value UID to KVersitPropertyBinaryUid. + +@param aValue The property value. */ + {} + +// +// CParserPropertyValueCDesCArray +// +inline CDesCArray* CParserPropertyValueCDesCArray::Value() const +/** Gets the property value. + +@return Pointer to the array of descriptors owned by the property value object. */ + {return iValue;} + +// +// CParserPropertyValueTimeZone +// +inline TTimeIntervalSeconds CParserPropertyValueTimeZone::Value() const +/** Gets the time zone property value. + +@return A time interval (in seconds) which represents the offset from universal +time. */ + {return iValue;} + +// +// CParserPropertyValueDaylight +// +inline CVersitDaylight* CParserPropertyValueDaylight::Value() const +/** Gets the daylight saving property value. + +@return Pointer to the daylight saving specification. */ + {return iValue;} + +// +// CParserPropertyValueDateTime +// +inline TVersitDateTime* CParserPropertyValueDateTime::Value() const +/** Gets a pointer to the date/time property value. + +@return Pointer to the date/time property value. */ + {return iValue;} + +// +// CParserPropertyValueDate +// +inline TVersitDateTime* CParserPropertyValueDate::Value() const +/** Gets a pointer to the date property value. + +@return Pointer to the date property value. */ + {return iValue;} + +// +// CParserPropertyValueMultiDateTime +// +inline CArrayPtr* CParserPropertyValueMultiDateTime::Value() const +/** Gets a pointer to the object's list of date/time property values. + +@return Pointer to the array of date/time property values. */ + {return iValue;} + +// +// CParserPropertyValueInt +// +inline TInt CParserPropertyValueInt::Value() const +/** Gets the signed integer property value. + +@return The signed integer property value. */ + {return iValue;} + +// +// CParserProperty +// +inline void CParserProperty::SetValue(CParserPropertyValue* aPropertyValue) +/** Sets the property value. + +The property takes ownership of the property value. + +@param aPropertyValue A pointer to the property value to be set. */ + {iPropertyValue=aPropertyValue;} + +inline CParserPropertyValue* CParserProperty::Value() const +/** Gets a pointer to the property value. + +Ownership of the property value is not transferred by this function. + +@return Pointer to generic parser property value. */ + {return iPropertyValue;} + +inline TUid CParserProperty::Uid() const +/** Gets the UID of the property value. + +@return UID of the property value. */ + {return iPropertyValue->Uid();} + +/* + * Gets the name of the property. + * + * @return " HBufC8*& " + * Pointer to the property name. + */ +inline HBufC8*& CParserProperty::NameBuf() + {return iPropertyName;} + +inline void CParserProperty::SetNameUid(TUid aUid) +/** Sets a property name UID. + +This function is called by CVersitParser::AddProperty() when internalising, +and will not normally be used directly. + +@param aUid A property name UID. */ + {iPropertyNameUid=aUid;} + +inline TUid CParserProperty::NameUid() const +/** Gets the property name UID. + +@return UID of the property name. */ + {return iPropertyNameUid;} + +inline void CParserProperty::SetParamArray(CArrayPtr* aArrayOfParams) +/** Sets the array of property parameters. + +The property takes ownership of aArrayOfParams + +@param aArrayOfParams Array of property parameters. */ + {iArrayOfParams=aArrayOfParams;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vrecur.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vrecur.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,355 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VRECUR_H__ +#define __VRECUR_H__ + +#include + +// +// CWeekDayArray +// + +class CWeekDayArray : public CBase +/** Defines an array of the days in the week on which a 'weekly' +or 'monthly by position' repeat event occurs. +@publishedAll +@released +*/ + { +public: + IMPORT_C CWeekDayArray(); + IMPORT_C ~CWeekDayArray(); + IMPORT_C void ExternalizeL(RWriteStream& aStream); +public: + /** The array of days in the week. */ + CArrayFix* iArray; + }; + +// +// CVersitRecurrence +// +class CVersitRecurrence : public CBase +/** Abstract base class for all recurrence property value classes. + +A pointer to a derived recurrence property value class instance is owned by +the CParserPropertyValueRecurrence class. + +Implementations of this class define when an event is to repeat. +@publishedAll +@released +*/ + { +public: + IMPORT_C CVersitRecurrence(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate); + IMPORT_C ~CVersitRecurrence(); + /** Externalises an occurrence list to aStream. + + @param aStream The stream to which the occurrence list is to be externalised. */ + virtual void ExternalizeOccurrenceListsL(RWriteStream& aStream) const=0; + /** Repeat type. + @publishedAll + @released */ + enum TType + { + /** Daily repeat. */ + EDaily=1, + /** Weekly repeat. */ + EWeekly, + /** Monthly repeat, by relative position within the month. */ + EMonthlyByPos, + /** Monthly repeat, by day number within the month. */ + EMonthlyByDay, + /** Yearly repeat, by specific months within the year. */ + EYearlyByMonth, + /** Yearly repeat, by specific days within the year. */ + EYearlyByDay + }; +public: + /** The type of repeat (daily, weekly etc.). */ + TType iRepeatType; + /** The interval between repeats: a number of days, weeks, months or years, depending + on the repeat type. */ + TInt iInterval; + /** The duration in days, weeks, months or years (depending on the repeat type) + for the repeat. + + A value of zero indicates the repeat should continue forever. */ + TInt iDuration; + /** Specification for the date at which the repeat will end. If a duration and + an end date are both specified, the end date takes precedence. */ + TVersitDateTime* iEndDate; + }; + +// +// CVersitRecurrenceDaily +// +class CVersitRecurrenceDaily : public CVersitRecurrence +/** Defines when a 'daily' recurrence is to be repeated. + +Used by a repeating event (a vCalendar event or to-do) to define when it is +to occur. The days on which the event occurs are identified by the number +of days between repeats, e.g. every third day. + +A pointer to this object may be owned by a CParserPropertyValueRecurrence +object. +@publishedAll +@released +*/ + { +public: + IMPORT_C CVersitRecurrenceDaily(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate); +public: //from CVersitRecurrence + IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& /*aStream*/) const; + }; + +// +// CVersitRecurrenceWeekly +// +class CVersitRecurrenceWeekly : public CVersitRecurrence +/** Defines a list of days when a 'weekly' recurrence is to be +repeated. + +Used by a repeating event (a vCalendar event or to-do) to define when it is +to occur. The days on which the event occurs are identified by the number +of weeks between repeats and the day(s) of the week on which the event occurs, +e.g. on Monday every other week. + +A pointer to this object may be owned by a CParserPropertyValueRecurrence +object. +@publishedAll +@released +*/ + { +public: + IMPORT_C CVersitRecurrenceWeekly(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CWeekDayArray* aArrayOfWeekDayOccurrences); + IMPORT_C ~CVersitRecurrenceWeekly(); +public: //from CVersitRecurrence + IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; +public: + CWeekDayArray* iArrayOfWeekDayOccurrences; //Mon-Sun + }; + +// +// CVersitRecurrenceMonthlyByPos +// +class CVersitRecurrenceMonthlyByPos : public CVersitRecurrence +/** Defines a list of days when a 'monthly by position' recurrence +is to be repeated. + +Used by a repeating event (a vCalendar event or to-do) to define when it is +to occur. + +The days on which the event occurs are identified by their relative position +within the month, for example the second Monday or the last Friday. + +A pointer to this object may be owned by a CParserPropertyValueRecurrence +object + +Note: The CMonthPosition class, defined within this class, is used to +define the positions of days within the month. +@publishedAll +@released +*/ + { +public: + class CMonthPosition : public CBase + /** Defines a week within the month, using the numeric occurrence of the week + (between 1 and 5 inclusive) counting from either the start or end of the month, + and defines an array of days within this week. + @publishedAll + @released + */ + { + public: + IMPORT_C ~CMonthPosition(); + public: + /** Flags that define whether the week number is counted from the start or end of the month. + @publishedAll + @released */ + enum TSign + { + /** Indicates that the iWeekNo member specifies a number counting forwards + from the start of the month. */ + EWeeksFromStartOfMonth, + /** Indicates that the iWeekNo member specifies a number counting backwards from + the end of the month. */ + EWeeksFromEndOfMonth + }; + public: + /** Indicates whether the week number iWeekNo is counted from the start or the + end of the month. A plus sign denotes from the start of the month and a minus + sign denotes from the end. */ + TSign iSign; + /** A week number within the month, between 1 and 5 inclusive. */ + TInt iWeekNo; + /** Pointer to an array of week days. */ + CWeekDayArray* iArrayOfWeekDays; + }; + IMPORT_C CVersitRecurrenceMonthlyByPos(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CArrayPtrFlat* aMonthPositions); + IMPORT_C ~CVersitRecurrenceMonthlyByPos(); +public: //framework + IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; +public: + /** Array of 'month positions' which define the days on which the event occurs. */ + CArrayPtrFlat* iMonthPositions; + }; + +// +// CVersitRecurrenceMonthlyByDay +// +class CVersitRecurrenceMonthlyByDay : public CVersitRecurrence +/** Defines a list of days when a 'monthly by day' recurrence +is to repeat. + +Used by a repeating event (a vCalendar event or to-do) to define when it is +to occur. + +The days on which the event occurs are identified by a number, counting +either from the start or the end of the month. + +A pointer to this object may be owned by a CParserPropertyValueRecurrence +object. +@publishedAll +@released +*/ + { +public: + IMPORT_C CVersitRecurrenceMonthlyByDay(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate, CArrayFix* aArrayOfOccurrencesInDaysFromStartOfMonth + ,CArrayFix* aArrayOfOccurrencesInDaysFromEndOfMonth,TBool aLastDay); + IMPORT_C ~CVersitRecurrenceMonthlyByDay(); +public: //framework + IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; +public: + /** Array of days, counting from the start of the month, on which the event occurs. */ + CArrayFix* iArrayOfOccurrencesInDaysFromStartOfMonth; //1-31 + /** Array of days, counting from the end of the month, on which the event occurs. */ + CArrayFix* iArrayOfOccurrencesInDaysFromEndOfMonth; //1-31 + /** Identifies whether the event occurs on the last day of the month. */ + TBool iLastDay; + }; + +// +// CVersitRecurrenceYearlyByMonth +// +class CVersitRecurrenceYearlyByMonth : public CVersitRecurrence +/** Defines a list of months when a 'yearly by month' recurrence +is to repeat. + +Used by a repeating event (a vCalendar event or to-do) to define the months +in which it is to occur. The months on which the event occurs are identified +by their number in the year (between 1 and 12 inclusive). + +A pointer to this object may be owned by a CParserPropertyValueRecurrence +object. +@publishedAll +@released +*/ + { +public: + IMPORT_C CVersitRecurrenceYearlyByMonth(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CArrayFix* aArrayOfMonthsInYearOccurrences); + IMPORT_C ~CVersitRecurrenceYearlyByMonth(); +public: //framework + IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; +public: + /** Pointer to an array of month values. */ + CArrayFix* iArrayOfMonthsInYearOccurrences; //Jan-Dec + }; + +// +// CVersitRecurrenceYearlyByDay +// +class CVersitRecurrenceYearlyByDay : public CVersitRecurrence +/** Defines a list of days when a 'yearly by day' recurrence is +to be repeated. + +Used by a repeating event (a vCalendar event or to-do) to define when it is +to occur. + +The days on which the repeat occurs are identified by their day number in +the year (between 1 and 366 inclusive). + +A pointer to this object may be owned by a CParserPropertyValueRecurrence +object. +@publishedAll +@released +*/ + { +public: + IMPORT_C CVersitRecurrenceYearlyByDay(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CArrayFix* aArrayOfDaysInYearOccurrences); + IMPORT_C ~CVersitRecurrenceYearlyByDay(); +public: //framework + IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; +public: + /** Pointer to an array of integers between 1 and 366 inclusive. + + Each integer represents a day on which the repeat event occurs. */ + CArrayFix* iArrayOfDaysInYearOccurrences; + }; + +// +// CParserPropertyValueRecurrence +// +class CParserPropertyValueRecurrence : public CParserTimePropertyValue +/** A recurrence property value parser. + +This is used to store and retrieve the recurrence information for a repeating +vEvent or vTodo. This information is stored as a CVersitRecurrence object. + +The UID for a recurrence property value is KVCalPropertyRecurrenceUid. +@publishedAll +@released +*/ + { +public: + IMPORT_C CParserPropertyValueRecurrence(CVersitRecurrence* aValue); + IMPORT_C ~CParserPropertyValueRecurrence(); + inline CVersitRecurrence* Value() const; +public: // from CParserTimePropertyValue + IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); + IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); +public: // from CParserPropertyValue + IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt /*aLengthOutput*/); +protected: + CVersitRecurrence* iValue; + }; + +// +// CRecurrenceParser +// +class CRecurrenceParser : public CVersitParser +/** Base class used in the derivation of CParserVCalEntity. + +Provides recurrence functionality for vEvents and vToDos in vCalendars. +@publishedAll +@released +*/ + { +public: + IMPORT_C CRecurrenceParser(TBool aHasVersion); + IMPORT_C CParserPropertyValue* MakePropertyValueRecurrenceL(TDes& aRecurringEntity); +private: + static void ResetAndDestroyArrayOfMonthPositions(TAny* aObject); + void GetFrequencyAndIntervalL(CVersitRecurrence::TType& aFrequency,TInt& aInterval, const TDesC& aRecurrenceType); + CVersitRecurrence* GetFrequencyModifiersL(const CVersitRecurrence::TType& aRepeatType,TInt aInterval, const TDesC& aListDates); + CWeekDayArray* GetListOfWeekDayOccurrencesL(const TDesC& aListDays); +private: // from CVersitParser + IMPORT_C virtual void Reserved1(); + IMPORT_C virtual void Reserved2(); + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vrecur.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vrecur.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,22 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CParserPropertyValueRecurrence +// +// + +inline CVersitRecurrence* CParserPropertyValueRecurrence::Value() const +/** Gets the recurrence value. + +@return A pointer to the recurrence value. */ + {return iValue;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vstaticutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vstaticutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,86 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VSTATICUTILS_H__ +#define __VSTATICUTILS_H__ + +// System includes +#include + +// User includes +#include + +// Classes referenced +class CVersitAdditionalPropertyStorage; + +class VersitUtils +/** A utility class which provides functions for handling character set conversions, +and for the parsing of character strings. +@publishedAll +@released +*/ + { +public: + IMPORT_C static TBool EightBitEncoding(Versit::TVersitCharSet aCharSet); + IMPORT_C static TBool EightBitEncoding(TUint aCharSetId); + IMPORT_C static TUid ConArcEncodingUid(Versit::TVersitEncoding aEncoding); + IMPORT_C static const TDesC8& IANACharacterSetName(Versit::TVersitCharSet aCharSet); + IMPORT_C static const TDesC8& IANAEncodingName(Versit::TVersitEncoding aEncoding); + IMPORT_C static TUid CharConvCharSetUid(Versit::TVersitCharSet aVersitSet); + static Versit::TVersitCharSet CharSet(TUint aCharConvCharSetUid); + IMPORT_C static TBool DescriptorContainsOnlySevenBitCharacters(const TDesC& aText); + IMPORT_C static TBool RequiresEncoding(const TDesC& aText); + IMPORT_C static void UncodeToNarrowL(const TDesC& aUnicode, TDes8& aNarrow, const Versit::TEncodingAndCharset& aEncodingCharset); + IMPORT_C static void AddEscapedString(TDes& aDestination,const TDesC& aTextToEscape,Versit::TVersitCharSet aCharSet); + IMPORT_C static void AddEscapedString(TDes& aDestination,const TDesC& aTextToEscape,TUint aCharSetId); + IMPORT_C static void ConArcEncodeL(RReadStream& aSource, CBufBase& aTarget, TUid aConArcEncodingUid); + IMPORT_C static void WrapLinesL(CBufBase& aBuffer, TInt aMaxLineLength); + IMPORT_C static TBool CheckAndIgnoreCustomErrorL(TInt aError); + IMPORT_C static void RemoveEscapeChars(TPtr8& aText); + IMPORT_C static void RemoveEscapeChars(HBufC16& aText); + IMPORT_C static void RemoveEscapeChars(HBufC16& aText, TUint aCharSetUid); + IMPORT_C static void RemoveEscapeChars(TPtr16& aText, TUint aCharSetUid); + IMPORT_C static TBool IsNoneWhiteSpaceChar(const TDesC8& aString); + IMPORT_C static void StripWhiteSpace(TPtr8& aString); + IMPORT_C static void StripWhiteSpace(TPtr16& aString); + static inline TBool IsWhiteSpace(TUint aChar); + static inline TBool IsBeginOrEnd(TUid aUid); + IMPORT_C static TBool IsNoneWhiteSpaceWideChar(const TDesC16& aString); + IMPORT_C static CDesCArray* ParseForArrayPropertiesL(TPtr16 aStringValue, TUint aLineCharacterSetId); + // + IMPORT_C static void AllocateAdditionalPropertyStorageL(CVersitTlsData& aTlsData, CParserProperty& aProperty, TPtr16& aStringValue, TUint aLineCharacterSetId); + IMPORT_C static void FreeAdditionalPropertyStorageL(const CParserProperty& aProperty); + IMPORT_C static CParserPropertyValue* AdditionalPropertyValueFromStorageL(const CParserProperty& aProperty); + +private: + static void AddEscapedString(TBool aIsShiftJis,TDes& aDestination,const TDesC& aTextToEscape); + static const TDesC &VersitUtils::EscapeChar(TBool aIsShiftJis); + }; + +inline TBool VersitUtils::IsWhiteSpace(TUint aChar) +/** Tests whether the specified character is white space +(either a tab or a space character). + +@param aChar The character to test. +@return ETrue if the character is white space, otherwise EFalse. */ + {return (aChar==CVersitParser::ESpace || aChar==CVersitParser::EHTab);} +inline TBool VersitUtils::IsBeginOrEnd(TUid aUid) +/** Tests whether the specified UID is the Versit Begin or End UID (KVersitTokenBeginUid +or KVersitTokenEndUid). + +@param aUid The UID to test. +@return ETrue if the UID is the Begin or End UID, otherwise EFalse. */ + {return (aUid.iUid==KVersitTokenBeginUid || aUid.iUid==KVersitTokenEndUid);} +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vtoken.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vtoken.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,366 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __VTOKEN_H__ +#define __VTOKEN_H__ + +#include + +#define KMaxExternalizedTokenLength 70 +#define KMinLineLengthToWriteTo 1 + +/** A colon string. */ +_LIT8(KVersitTokenColon, ":"); +/** A Unicode colon string. */ +_LIT(KVersitTokenColonUnicode, ":"); +/** A semi-colon string. */ +_LIT8(KVersitTokenSemiColon, ";"); +/** A Unicode semi-colon string. */ +_LIT(KVersitTokenSemiColonUnicode, ";"); +/** A backslash string (escaped). */ +_LIT8(KVersitBackSlash, "\\"); +/** An escaped semi-colon string. */ +_LIT8(KVersitEscapedSemiColon, "\\;"); +/** An escaped Unicode semi-colon string. */ +_LIT(KVersitEscapedSemiColonUnicode, "\\;"); +/** An equals sign string. */ +_LIT8(KVersitTokenEquals, "="); +/** A full stop string. */ +_LIT8(KVersitTokenPeriod, "."); +/** A space string. */ +_LIT8(KVersitTokenSpace, " "); +/** A minus sign string. */ +_LIT8(KVersitTokenMinus, "-"); +/** A plus sign string. */ +_LIT8(KVersitTokenPlus, "+"); +/** A line break string. */ +_LIT8(KVersitLineBreak, "\r\n "); +/** The string used at the start of a time interval string. */ +_LIT8(KVersitTimePeriodBegin, "P"); +/** The string appended to the number of years when encoding a time interval. */ +_LIT8(KVersitTimePeriodYear, "Y"); +/** The string appended to the number of months when encoding a time interval. */ +_LIT8(KVersitTimePeriodMonth, "M"); +/** Not used. */ +_LIT8(KVersitTimePeriodWeek, "W"); //unused +/** The string appended to the number of days when encoding a time interval. */ +_LIT8(KVersitTimePeriodDay, "D"); +/** The string added before the time of day when encoding a Versit date/time. + +Also the string added before the time of day when encoding a time interval. */ +_LIT8(KVersitTimePeriodTime, "T"); +/** The string appended to the hour value when encoding a time interval. */ +_LIT8(KVersitTimePeriodHour, "H"); +/** The string appended to the minutes value when encoding a time interval. */ +_LIT8(KVersitTimePeriodMinute, "M"); +/** The string appended to the seconds value when encoding a time interval. */ +_LIT8(KVersitTimePeriodSecond, "S"); +/** The string appended to a date/time when encoding a Versit +date/time, if the value is in universal time. */ +_LIT8(KVersitTokenUniversalTime, "Z"); + +/** A colon character. */ +const TUint KVersitTokenColonVal =':'; +/** A semi-colon character. */ +const TUint KVersitTokenSemiColonVal =';'; +/** A backslash character. */ +const TUint KVersitTokenBackslashVal ='\\'; +/** An equals sign character. */ +const TUint KVersitTokenEqualsVal ='='; +/** A full stop character. */ +const TUint KVersitTokenPeriodVal ='.'; +/** A comma character. */ +const TUint KVersitTokenCommaVal =','; +/** A left square bracket character. */ +const TUint KVersitTokenLSquareBracketVal ='['; +/** A right square bracket character. */ +const TUint KVersitTokenRSquareBracketVal =']'; +/** A minus sign character. */ +const TUint KVersitTokenMinusVal ='-'; +/** A plus sign character. */ +const TUint KVersitTokenPlusVal ='+'; +/** A Yen character: the escape character for the 'ShiftJis' character set. */ +const TUint KVersitTokenYenVal =0xa5; +/** The character at the beginning of a time interval string. */ +const TUint KVersitTimePeriodBeginVal ='P'; +/** The character following the number of years in a time interval string. */ +const TUint KVersitTimePeriodYearVal ='Y'; +/** The character following the number of months in a time interval string. */ +const TUint KVersitTimePeriodMonthVal ='M'; +/** The character following the number of weeks in a time interval string. */ +const TUint KVersitTimePeriodWeekVal ='W'; +/** The character following the number of days in a time interval string. */ +const TUint KVersitTimePeriodDayVal ='D'; +/** The character preceding a length of day (hours,minutes and seconds) in a time +interval string. + +Also the character preceding the time of day in a date/time string. */ +const TUint KVersitTimePeriodTimeVal ='T'; +/** The character following the number of hours in a time interval string. */ +const TUint KVersitTimePeriodHourVal ='H'; +/** The character following the number of minutes in a time interval string. */ +const TUint KVersitTimePeriodMinuteVal ='M'; +/** The character following the number of seconds in a time interval string. */ +const TUint KVersitTimePeriodSecondVal ='S'; +/** The character at the end of a universal date/time string. */ +const TUint KVersitTokenUniversalTimeVal ='Z'; +/** The character at the start of a daily recurring entity string. */ +const TUint KVersitRecurrenceDailyVal ='D'; +/** The character at the start of a weekly recurring entity string. */ +const TUint KVersitRecurrenceWeeklyVal ='W'; +/** The character which precedes the number of recurrences, when specified, in +a recurring entity. */ +const TUint KVersitRecurrenceNumberOfVal ='#'; +/** The string at the beginning of a 'monthly by position' recurring entity +(see CVersitRecurrenceMonthlyByPos). Used when internalising. */ +_LIT(KVersitRecurrenceMonthlyByPos, "MP"); +/** Not used. */ +_LIT(KVersitRecurrenceMonthlyByDay, "MD"); +/** Not used. */ +_LIT(KVersitRecurrenceYearlyByMonth, "YM"); +/** The string at the beginning of a 'yearly by day' recurring entity, +(see CVersitRecurrenceYearlyByDay). Used when internalising. */ +_LIT(KVersitRecurrenceYearlyByDay, "YD"); +/** A string in the date list (if a date list is defined) of an entity +that recurs either weekly or 'monthly by position' on Mondays. Used when +internalising. */ +_LIT(KVersitRecurrenceMonday, "MO"); +/** A string in the date list (if a date list is defined) of an entity +that recurs either weekly or 'monthly by position' on Tuesdays. Used when internalising. */ +_LIT(KVersitRecurrenceTuesday, "TU"); +/** A string in the date list (if a date list is defined) of an entity +that recurs either weekly or 'monthly by position' on Wednesdays. Used when internalising. */ +_LIT(KVersitRecurrenceWednesday, "WE"); +/** A string in the date list (if a date list is defined) of an entity that +recurs either weekly or 'monthly by position' on Thursdays. Used when internalising. */ +_LIT(KVersitRecurrenceThursday, "TH"); +/** A string in the date list (if a date list is defined) of an entity that +recurs either weekly or 'monthly by position' on Fridays. Used when internalising. */ +_LIT(KVersitRecurrenceFriday, "FR"); +/** A string in the date list (if a date list is defined) of an entity that +recurs either weekly or 'monthly by position' on Saturdays. Used when internalising. */ +_LIT(KVersitRecurrenceSaturday, "SA"); +/** A string in the date list (if a date list is defined) of an entity that +recurs either weekly or 'monthly by position' on Sundays. Used when internalising. */ +_LIT(KVersitRecurrenceSunday, "SU"); +/** The string appended to the 'occurrence list' section of an entity that +recurs on the last day of the month. Used when internalising. */ +_LIT(KVersitRecurrenceLastDay, "LD"); + +/** The string used at the start of a daily recurring entity. */ +_LIT8(KVersitRecurrenceDaily, "D"); +/** The string used at the start of a weekly recurring entity. */ +_LIT8(KVersitRecurrenceWeekly, "W"); +/** The string appended just before the number of occurrences, when encoding a recurring +entity as a descriptor. */ +_LIT8(KVersitRecurrenceNumberOf, "#"); +/** The string used at the start of a 'monthly by position' recurring entity, +(see CVersitRecurrenceMonthlyByPos). Used when externalising. */ +_LIT8(KVersitRecurrenceMonthlyByPos8, "MP"); +/** Not used. */ +_LIT8(KVersitRecurrenceMonthlyByDay8, "MD"); +/** Not used. */ +_LIT8(KVersitRecurrenceYearlyByMonth8, "YM"); +/** The string used at the start of a 'yearly by day' recurring entity, +(see CVersitRecurrenceYearlyByDay). Used when externalising. */ +_LIT8(KVersitRecurrenceYearlyByDay8, "YD"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Mondays. +Used when externalising. */ +_LIT8(KVersitRecurrenceMonday8, "MO"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Tuesdays. +Used when externalising. */ +_LIT8(KVersitRecurrenceTuesday8, "TU"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Wednesdays. +Used when externalising. */ +_LIT8(KVersitRecurrenceWednesday8, "WE"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Thursdays. +Used when externalising. */ +_LIT8(KVersitRecurrenceThursday8, "TH"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Fridays. +Used when externalising. */ +_LIT8(KVersitRecurrenceFriday8, "FR"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Saturdays. +Used when externalising. */ +_LIT8(KVersitRecurrenceSaturday8, "SA"); +/** The string appended to the 'occurrence list' section of an entity that recurs on Sundays. +Used when externalising. */ +_LIT8(KVersitRecurrenceSunday8, "SU"); +/** The string appended to the 'occurrence list' section of an entity that recurs on the last day of +the month. Used when externalising. */ +_LIT8(KVersitRecurrenceLastDay8, "LD"); +/** The string at the start of an entity encoded in a stream. + +This is implemented as the name of a property, but this property is not stored in the entity's array +of properties. */ +_LIT8(KVersitTokenBEGIN, "BEGIN"); +/** The string at the start of an agent vCard entity encoded in a stream. + +The reason for needing a Unicode version, is that the agent vCard is held in a +property value in the parent vCard, and all property values are converted +to Unicode when they are internalised, in order to make them character set-independent. + +This is implemented as the name of a property, but this property is not stored in the +entity's array of properties. */ +_LIT(KVersitVarTokenBEGIN, "BEGIN"); +/** The string which follows the body of data of a vCard/vCalendar encoded in a stream. +It is followed only by the entity name. + +This is implemented as the name of a property, but this property is not stored in the +entity's array of properties. */ +_LIT8(KVersitTokenEND, "END"); +/** A carriage return and line feed */ +_LIT8(KVersitTokenCRLF, "\r\n"); // carriage return, line feed +/** A boolean true value. Not used. */ +_LIT8(KVersitTokenTRUE, "TRUE"); +/** A boolean true value. */ +_LIT(KVersitVarTokenTRUE, "TRUE"); +/** A boolean false value. Not used. */ +_LIT8(KVersitTokenFALSE, "FALSE"); +/** A boolean false value. */ +_LIT(KVersitVarTokenFALSE, "FALSE"); +/** The symbol added to the beginning of an unrecognised property name while +internalising from a stream. */ +_LIT8(KVersitTokenXDashEPOC, "X-EPOC"); +_LIT8(KVersitTokenXDash, "X-"); +/** An empty string. */ +_LIT8(KVersitTokenEmptyNarrow, ""); +/** An empty string. */ +_LIT(KVersitTokenEmpty, ""); + +//The following names should not be used, versit now uses CharConv character set names. +// params +_LIT8(KVersitTokenENCODING, "ENCODING"); +_LIT8(KVersitTokenBASE64, "BASE64"); +_LIT8(KVersitTokenQUOTEDPRINTABLE, "QUOTED-PRINTABLE"); +_LIT8(KVersitToken8BIT, "8-BIT"); +_LIT8(KVersitTokenCHARSET, "CHARSET"); +_LIT8(KVersitTokenUTF8, "UTF-8"); +_LIT8(KVersitTokenUTF7, "UTF-7"); +_LIT8(KVersitTokenISO1, "ISO-8859-1"); +_LIT8(KVersitTokenISO2, "ISO-8859-2"); +_LIT8(KVersitTokenISO4, "ISO-8859-4"); +_LIT8(KVersitTokenISO5, "ISO-8859-5"); +_LIT8(KVersitTokenISO7, "ISO-8859-7"); +_LIT8(KVersitTokenISO9, "ISO-8859-9"); +_LIT8(KVersitTokenTYPE, "TYPE"); //used for photo format type + +// parameters for the X-EPOCALARM +_LIT8(KVersitTokenVALUE, "VALUE"); +_LIT8(KVersitTokenCONTENTTYPE, "X-CONTENTTYPE"); +_LIT8(KVersitTokenINLINE, "INLINE"); +_LIT8(KVersitTokenBINARY, "BINARY"); + +// additional character sets +_LIT8(KVersitTokenISO3, "ISO-8859-3"); +_LIT8(KVersitTokenISO10, "ISO-8859-10"); +_LIT8(KVersitTokenShiftJIS, "SHIFT_JIS"); +_LIT8(KVersitTokenGB2312, "GB 2312-80"); //This and the following contain the wrong name. +_LIT8(KVersitTokenGBK, "GBK"); +_LIT8(KVersitTokenBIG5, "BIG5 level 1 and 2"); +_LIT8(KVersitTokenISO2022JP, "ISO 2022-JP"); +_LIT8(KVersitTokenEUCJP, "EUC-JP"); +_LIT8(KVersitTokenJIS, "JIS"); + + +// entities +_LIT8(KVersitTokenVCALENDAR, "VCALENDAR"); +_LIT8(KVersitTokenVCARD, "VCARD"); +_LIT(KVersitVarTokenVCALENDAR, "VCALENDAR"); +_LIT(KVersitVarTokenVCARD, "VCARD"); +_LIT(KVersitVarTokenVEVENT, "VEVENT"); +_LIT(KVersitVarTokenVTODO, "VTODO"); + +// properties +_LIT8(KVersitTokenXALARM, "X-EPOCALARM"); +_LIT8(KVersitTokenAALARM, "AALARM"); +_LIT8(KVersitTokenDALARM, "DALARM"); +_LIT8(KVersitTokenPALARM, "PALARM"); +_LIT8(KVersitTokenMALARM, "MALARM"); +_LIT8(KVersitTokenDAYLIGHT, "DAYLIGHT"); +_LIT(KVersitVarTokenDAYLIGHT, "DAYLIGHT"); +_LIT8(KVersitTokenVERSION, "VERSION"); +_LIT8(KVersitTokenCATEGORIES, "CATEGORIES"); +_LIT8(KVersitTokenRESOURCES, "RESOURCES"); +_LIT8(KVersitTokenDCREATED, "DCREATED"); +_LIT8(KVersitTokenDTSTART, "DTSTART"); +_LIT8(KVersitTokenDTEND, "DTEND"); +_LIT8(KVersitTokenLASTMODIFIED, "LAST-MODIFIED"); +_LIT8(KVersitTokenCOMPLETED, "COMPLETED"); +_LIT8(KVersitTokenDUE, "DUE"); +_LIT8(KVersitTokenEXDATE, "EXDATE"); +_LIT8(KVersitTokenEXRULE, "EXRULE"); +_LIT8(KVersitTokenRDATE, "RDATE"); +_LIT8(KVersitTokenRRULE, "RRULE"); +_LIT8(KVersitTokenRNUM, "RNUM"); +_LIT8(KVersitTokenPRIORITY, "PRIORITY"); +_LIT8(KVersitTokenSEQUENCE, "SEQUENCE"); +_LIT8(KVersitTokenTRANSP, "TRANSP"); +_LIT8(KVersitTokenBDAY, "BDAY"); +_LIT8(KVersitTokenAGENT, "AGENT"); +_LIT8(KVersitTokenLABEL, "LABEL"); +_LIT8(KVersitTokenPHOTO, "PHOTO"); +_LIT8(KVersitTokenEMAIL, "EMAIL"); +_LIT8(KVersitTokenINTERNET, "INTERNET"); +_LIT8(KVersitTokenTITLE, "TITLE"); +_LIT8(KVersitTokenROLE, "ROLE"); +_LIT8(KVersitTokenLOGO, "LOGO"); +_LIT8(KVersitTokenNOTE, "NOTE"); +_LIT8(KVersitTokenSOUND, "SOUND"); +_LIT8(KVersitTokenMAILER, "MAILER"); +_LIT8(KVersitTokenPRODID, "PRODID"); +_LIT8(KVersitTokenATTACH, "ATTACH"); +_LIT8(KVersitTokenATTENDEE, "ATTENDEE"); +_LIT8(KVersitTokenCLASS, "CLASS"); +_LIT8(KVersitTokenDESCRIPTION, "DESCRIPTION"); +_LIT8(KVersitTokenLOCATION, "LOCATION"); +_LIT8(KVersitTokenRELATEDTO, "RELATED-TO"); +_LIT8(KVersitTokenSTATUS, "STATUS"); +_LIT8(KVersitTokenSUMMARY, "SUMMARY"); +_LIT8(KVersitTokenN, "N"); +_LIT8(KVersitTokenTZ, "TZ"); +_LIT8(KVersitTokenADR, "ADR"); +_LIT8(KVersitTokenORG, "ORG"); +_LIT8(KVersitTokenREV, "REV"); +_LIT8(KVersitTokenFN, "FN"); +_LIT8(KVersitTokenTEL, "TEL"); +_LIT8(KVersitTokenURL, "URL"); +_LIT8(KVersitTokenGEO, "GEO"); +_LIT8(KVersitTokenUID, "UID"); +_LIT8(KVersitTokenKEY, "KEY"); +_LIT8(KVersitTokenSECONDNAME, "X-EPOCSECONDNAME"); +_LIT8(KVersitTokenXMETHOD, "X-METHOD"); // For Group Scheduling +_LIT8(KVersitTokenXRECURRENCEID, "X-RECURRENCE-ID"); // For Group Scheduling +_LIT8(KVersitTokenXLOCALUID, "X-SYMBIAN-LUID"); +_LIT8(KVersitTokenXDTSTAMP, "X-SYMBIAN-DTSTAMP"); +_LIT(KVersitVarTokenINTERNET, "INTERNET"); //Used by Jave Phone and not by versit +_LIT8(KVersitTokenAssistant, "X-ASSISTANT"); +_LIT8(KVersitTokenAssistantTel, "X-ASSISTANT-TEL"); +_LIT8(KVersitTokenAnniversary, "X-ANNIVERSARY"); +_LIT8(KVersitTokenSpouse, "X-SPOUSE"); +_LIT8(KVersitTokenChildren, "X-CHILDREN"); +_LIT8(KVersitTokenClass, "X-CLASS"); +_LIT8(KVersitAttachLabel, "X-NAME"); +_LIT8(KVersitAttachMimeType, "X-FMTTYPE"); +_LIT8(KVersitXUserIntType, "X-SYMBIAN-USERINT"); + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vuid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vuid.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,156 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __VUID_H__ +#define __VUID_H__ + +/** The default size for 8-bit buffers used in Versit. */ +#define KVersitDefaultBufferSize 32 +/** The maximum length for a Versit date/time buffer. */ +#define KVersitMaxDateTimeLength 16 +/** Not used. */ +#define KVersitMaxVersionLength 16 +_LIT8(KVersitQuestionMark, "?"); + +// +// Uid's +// 268440459-268440508 have been allocated to Versit initially +// + +/** The UID for a KVersitTokenBEGIN property. + +Used in vCards and vCalendars. */ +#define KVersitTokenBeginUid 268440459 +/** The UID for a KVersitTokenEND property. + +Used in vCards and vCalendars. */ +#define KVersitTokenEndUid 268440460 +/** The UID for a property with an unrecognised name. */ +#define KVersitTokenUnknownUid 268440461 +/** The UID for a version property. + +Used in vCards and vCalendars. */ +#define KVersitTokenVersionUid 270490587 +/** The UID for an agent property. + +Used in vCards. */ +#define KVCardPropertyAgentUid 268440471 +/** The UID for a SOUND property. + +Used in vCards. */ +#define KVCardPropertySoundUid 270537213 +/** The UID for an alarm property. + +Used in vCalendars and associated with a vEvent or vToDo. */ +#define KVCalPropertyAlarmUid 268440472 +/** The UID for a vEvent entity. */ +#define KVCalEntityUidVEvent 268440473 +/** The UID for a vTodo entity. */ +#define KVCalEntityUidVTodo 268440474 +/** A grouped property UID. This is used to determine whether a property +is grouped. */ +#define KVersitGroupedPropertyUid 268440475 +/** The UID for a time zone property. + +Used in vCards and vCalendars. */ +#define KVersitPropertyTimeZoneUid 268440476 +/** The UID for a date property. */ +#define KVersitPropertyDateUid 268440477 +/** A time property UID. */ +#define KVersitTimePropertyUid 268440478 + +/** The UID for an rich (extended) alarm property. + +Used in vCalendars and associated with a vEvent or vToDo. */ +#define KVCalPropertyExtendedAlarmUid 268440479 + + + +/** Used by the contacts database to identify a vCard. */ +#define KVersitEntityUidVCard 268440483 //Used by cntmodel and not by versit +/** The UID for a recurrence property. */ +#define KVCalPropertyRecurrenceUid 268440484 +/** The UID for a daylight savings property. */ +#define KVersitPropertyDaylightUid 268440485 +/** The UID for a character set property parameter. */ +#define KVersitParamCharsetUid 268440488 + +/** The UID for a quoted printable to text converter. */ +#define KQuotedPrintableToTextConverter 268441637 +/** The UID for a text to quoted printable converter. */ +#define KTextToQuotedPrintableConverter 268441638 +/** The UID for a base 64 to text converter. */ +#define KBase64ToTextConverter 268440005 +/** The UID for a text to base 64 converter. */ +#define KTextToBase64Converter 268437281 + +/** The UID for a character encoding property parameter. */ +#define KVersitParamEncodingUid 268440463 +/** The UID for a QUOTED-PRINTABLE property parameter. */ +#define KVersitParamEncodingQuotedPrintableUid 268440464 +/** The UID for a BASE64 property parameter. */ +#define KVersitParamEncodingBase64Uid 268440465 + + +/* + * These are versit data-type uids for property values. They + * are versit-internal. + */ + +/** The UID for a heap descriptor property. */ +#define KVersitPropertyHBufCUid 268440466 +/** The UID for a binary property. + +Used in vCards for logos and photos. */ +#define KVersitPropertyBinaryUid 268470833 +/** The UID for a descriptor array property. + +Used in vCards and vCalendars. */ +#define KVersitPropertyCDesCArrayUid 268440467 +/** The UID for a multiple date/time property. + +Used in vCalendars. */ +#define KVersitPropertyMultiDateTimeUid 268440468 +/** The UID for a date/time property. + +Used in vCards and vCalendars. */ +#define KVersitPropertyDateTimeUid 268440469 +/** The UID for an integer property. + +Used in vCalendars, e.g. for priorities and sequences. */ +#define KVersitPropertyIntUid 268440470 + + +/* + * The following is a list of UIDs that were used by versit but are not now + */ +//UID's for tokens +//268440462 +//UID's used for character sets +//268440489, 268440499-506, 268457255-6, 268457654-8, 268478097 +//UID's used for Quoted Printable with a character set +//268440486, 268440490-8, 268457253-4, 268457801-5 +//UID's used for Base64 with a character set +//268440480-82, 268440487, 268440508, 268456960, 268457257-62, 268470904-6, 268479493 + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/app/vutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/app/vutil.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,189 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VUTIL_H__ +#define __VUTIL_H__ + +// System includes +#ifndef __E32BASE_H__ +#include +#endif +#ifndef __F32FILE_H__ +#include +#endif +#ifndef __CHARCONV_H__ +#include +#endif + + +class Versit +/** Provides Versit-specific encoding and character set identifiers. +@publishedAll +@released +*/ + { +public: + /** Versit-specific encoding identifiers. + @publishedAll + @released + */ + enum TVersitEncoding + { + /** No encoding. */ + ENoEncoding, + /** Quoted Printable encoding. */ + EQuotedPrintableEncoding, + /** Base 64 encoding. */ + EBase64Encoding, + + // Used internally - not to be used by versit clients + /** Eight bit encoding. */ + EEightBitEncoding + }; + + /** Versit-specific character set identifiers. These are used in the Versit API + to represent foreign (non-Unicode) character sets for vCard and vCalendar + properties. + @publishedAll + @released */ + enum TVersitCharSet + { + /** Unknown character set. */ + EUnknownCharSet, + /** ASCII (7-bit).*/ + EUSAsciiCharSet, + /** UTF-8 Unicode transformation format. */ + EUTF8CharSet, + /** UTF-7 Unicode transformation format. */ + EUTF7CharSet, + /** ISO 8859-1 (8-bit). */ + EISO88591CharSet, + /** ISO 8859-2 (8-bit). */ + EISO88592CharSet, + /** ISO 8859-4 (8-bit). */ + EISO88594CharSet, + /** ISO 8859-5 (8-bit). */ + EISO88595CharSet, + /** ISO 8859-7 (8-bit). */ + EISO88597CharSet, + /** ISO 8859-9 (8-bit). */ + EISO88599CharSet, + /** ISO 8859-3 (8-bit). */ + EISO88593CharSet, + /** ISO 8859-10 (8-bit). */ + EISO885910CharSet, + /** GB 2312. */ + EGB231280CharSet, + /** GBK. */ + EGBKCharSet, + /** Big 5. */ + EBIG5CharSet, + /** ISO-2022-JP. */ + EISO2022JPCharSet, + /** EUC-JP. */ + EEUCJPCharSet, + /** Shift JIS. */ + EShiftJISCharSet, + /** JIS. */ + EJISCharSet, + /** Must be first character set. */ + EFirstCharSet=EUSAsciiCharSet, + /** Must be last character set. */ + ELastCharSet=EJISCharSet + }; + + class TEncodingAndCharset + /** Specifies an encoding, a character set and a character set converter. + @publishedAll + @released */ + { + public: + inline TEncodingAndCharset(TVersitEncoding aEncoding,TUint aCharSetId) :iEncoding(aEncoding), iCharSetId(aCharSetId) + /** The C++ constructor initialises the encoding and character set. + + @param aEncoding An encoding. + @param aCharSetId A character set. */ + {} + public: + /** An encoding. */ + TVersitEncoding iEncoding; + /** A character set. */ + TUint iCharSetId; + /** A character set converter. */ + CCnvCharacterSetConverter* iConverter; + }; + }; + +class CVersitUnicodeUtils : public CBase +/** Versit Unicode utilities class. + +This enables conversion between Unicode and ISO character sets. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CVersitUnicodeUtils(); + IMPORT_C HBufC8* NarrowL(const TDesC& aDesC); + IMPORT_C HBufC8* NarrowLC(const TDesC& aDesC); + IMPORT_C HBufC* WidenL(const TDesC8& aDesC8); + IMPORT_C HBufC* WidenLC(const TDesC8& aDesC8); + IMPORT_C void CreateConverterL(); + CCnvCharacterSetConverter::TAvailability SetCurrentCharSetL(TUint aCharacterSet); + +public: + inline CCnvCharacterSetConverter& CharacterSetConverter() const; + inline TUint ConvertStandardNameL(const TDesC8& aStandardNameOfCharacterSet); + inline HBufC8* StandardNameL(TUint aCharSetId); + TUint AutoDetectCharSetL(const TDesC8& aSample,const CArrayFix* aAutoDetectCharSets); + +private: + RFs iFsSession; + CCnvCharacterSetConverter* iUnicodeConverter; + TBool iFsConnected; + TUint iCurrentConverterCharSet; + CArrayFix* iCharSetsAvailable; + }; + + +inline CCnvCharacterSetConverter& CVersitUnicodeUtils::CharacterSetConverter() const +/** Returns the character set converter created in CreateConverterL(). + +@return A character set converter. */ + { + return *iUnicodeConverter; + } +inline TUint CVersitUnicodeUtils::ConvertStandardNameL(const TDesC8& aStandardNameOfCharacterSet) +/** Returns the Symbian OS UID for a character set from its Internet-standard +name. + +@param aStandardNameOfCharacterSet Internet-standard name of a character set +encoded in 8-bit ASCII. +@return The Symbian OS UID of the specified character set. If the name is not +known, zero is returned. */ + { + return iUnicodeConverter->ConvertStandardNameOfCharacterSetToIdentifierL(aStandardNameOfCharacterSet,iFsSession); + } +inline HBufC8* CVersitUnicodeUtils::StandardNameL(TUint aCharSetId) +/** Returns the Internet-standard name of a character set, from its Symbian OS UID. + +@param aCharSetId The Symbian OS UID of a character set. +@return The Internet-standard name or MIME name of the specified character +set, or NULL if the UID is not known. The name is encoded in 8-bit ASCII. */ + { + return iUnicodeConverter->ConvertCharacterSetIdentifierToStandardNameL(aCharSetId,iFsSession); + } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/apparc.h --- a/epoc32/include/apparc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,608 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __APPARC_H__ -#define __APPARC_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__F32FILE_H__) -#include -#endif -#if !defined(__GDI_H__) -#include -#endif -#if !defined(__APADEF_H__) -#include -#endif -#if !defined(__APAID_H__) -#include -#endif - -// classes defined: -class CApaApplication; -class CApaDocument; -class CApaProcess; -class MApaEmbeddedDocObserver; -// -// classes referenced: -class CApaDll; -class CApaExe; -class RFile; -class RReadStream; -class RWriteStream; -class CFileStore; -class CPersistentStore; -class CStreamDictionary; -class CDictionaryStore; -class TApaAppHolderInfo; -class CImplementationInformation; -class TApaApplicationFactory; -class CApaAppHolder; -class CApaAppServer; - -/** Creates an application interface object. - -Provides the basic roles of an application class as a factory that -creates concrete document objects, and supplies utility functions -not specific to any particular instance of a document. - -@publishedAll -@released -*/ -typedef CApaApplication* (*CreateCApaApplication)(); - - -// CApaApplication - -class CApaApplication : public CBase -// base class for applications; allows creation of documents & file stores + display of app icon and name. -/** Defines the basic behaviour for applications. - -The class defines the basic twin roles of an application class as a factory -that creates concrete document objects, and as a supplier of utility functions -not specific to any particular instance of a document. For example, returning -an application's caption, or accessing its .ini file. - -The class is derived from by the UI framework and is further derived from -by the UI application. - -@publishedAll -@released -@see CEikApplication */ - { -public: - /** Completes construction of this application object. - - The function is called after an instance of a derived class has been successfully - created using the ordinal 1 function of the application DLL. - - After calling this function, an application can create document objects. - - An implementation of this function is supplied by the UI framework. - - @see CEikApplication */ - virtual void PreDocConstructL()=0; // call once before creating document - - /** Creates a document object. - - The function is called by the application process when a new document is required. - The application process adds the new document to its list of documents. - - An implementation of this function is supplied by the UI framework. - - @param aProcess A pointer to the process associated with the application. - @return A pointer to the newly created document. - @see CApaProcess::AddNewDocumentL() */ - virtual CApaDocument* CreateDocumentL(CApaProcess* aProcess)=0; - - /** Gets the application specific UID. - - The UID is used to differentiate between UI applications. - - An implementation of this function must be supplied by the UI application. - - @return The application specific UID. */ - virtual TUid AppDllUid()const=0; - - // - // utility functions - IMPORT_C static TInt GenerateFileName(RFs& aFs,TFileName& aRootName); - IMPORT_C CDictionaryStore* OpenIniFileL(RFs& aFs)const; - - /** Opens the .ini file associated with the application, constructs the dictionary - store object, returns a pointer to it and puts the pointer onto the cleanupstack. - - The .ini file must be created, if it does not already exist. - - An implementation of this function is supplied by the UI framework. - - @param aFs Handle to a file server session - @return A pointer to the dictionary store object that represents the application's - .ini file. - @see CEikApplication */ - virtual CDictionaryStore* OpenIniFileLC(RFs& aFs)const=0; - // - // enquiry functions - IMPORT_C virtual TFileName AppFullName()const; // returns the full path and name of the app - /** Returns the capabilities of the application. - - Application capability information is represented by an instance of a TApaAppCapability - object wrapped in a packaged modifiable buffer descriptor. - - The function is called from a number of places within the application framework. - - An implementation of this function is supplied by the UI framework. - - @param aInfo A packaged modifiable buffer descriptor (a TPckgBuf), encapsulating - a TApaAppCapability object. - @see CEikApplication - @see TApaAppCapability - @see TPckgBuf */ - virtual void Capability(TDes8& aInfo)const=0; - // - // accessor function - IMPORT_C TFileName DllName()const; - - IMPORT_C ~CApaApplication(); - - // formerly a reserved virtual, Reserved_1() - IMPORT_C virtual void NewAppServerL(CApaAppServer*& aAppServer); -protected: - IMPORT_C CApaApplication(); - - IMPORT_C virtual void CApaApplication_Reserved1(); - IMPORT_C virtual void CApaApplication_Reserved2(); - -private: - CApaAppHolder* iAppHolder; // the CApaAppHolder that owns me - TUid iDtorKey; // TInt iSpare; - friend class CApaAppHolder; - friend class CApaProcess; - friend class TApaApplicationFactory; // so that it can access iDtorKey - -private: - TInt iCApaApplication_Reserved1; - }; - -class CApaDocument : public CBase -// base class for documents; allows insertion of glass doors. -/** Defines basic behaviour for documents. - -This is the base class for all documents. A document contains the data associated -with the application's content. - -The class is derived from by the UI framework and is further derived from -by the UI application. - -@publishedAll -@released -@see CEikDocument */ - { -public: - class TCapability - /** CApaDocument capabilities.*/ - { - public: - IMPORT_C TCapability(); - // - inline TBool CanDrawGlass()const; - inline TBool CanPrint()const; - inline void SetCanDrawGlass(); - inline void SetCanPrint(); - // - private: - enum { - ECanDrawGlass =0x01, - ECanPrint =0x02 - }; - private: - TUint iCapability; - TInt TCapability_Reserved1; - }; - // -public: - // document instantiation functions - /** Initialises a new, empty, document with a default setup. - - This can be the main document or an embedded document. The function is called - by the UI framework when it creates a default document file. - - An implementation of this function must be supplied by the UI application. - - If initialisation fails, the document must be left in the same state as it - was before the function was called. */ - virtual void NewDocumentL()=0; // builds a new embedded or main document without loading from a store (may create the content from eg code or a template file). - - /** Creates and fully initialises a new filestore and stores the document into it, - replacing any existing file of the same name. - - The function should put the pointer to the filestore object onto the cleanup - stack. - - An implementation of this function is supplied by the UI framework. - - @param aFs Handle to a file server session. - @param aFileName The full path name of the file to be created. - @return A pointer to the newly constructed file store. - @see CEikDocument */ - virtual CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName)=0; // creates a file for a document and stores itself to that store (store should be put on cleanup stack). - // - // interaction functions - IMPORT_C virtual CPicture* GlassPictureL(); // Does nothing by default, override to return handle to glass picture. - - /** Starts an editing session on an embedded document. - - The function should cause the application's UI to be created and the document - to be fully restored for editing. - - An implementation of this function is supplied by the UI framework. - - @param aContainer This document's observer. - @param aReadOnly True, the document should be opened in read-only mode and - should not persist any changes made to the content. False, the document can - be opened in read/write mode; this is the default. - @see CEikDocument */ - virtual void EditL(MApaEmbeddedDocObserver* aContainer,TBool aReadOnly=EFalse)=0; // Edit the document in the context of the container's environment. If aContainer is null, edit as the main document - - /** Prints the document without a need for it to be open for editing. - - Typically, this is called from a shell or a file manager type application - that wants to print the document without opening it fully. - - An empty implementation of this function is supplied by the UI framework. - - The UI application can provide its own implementation. - - @param aSourceStore A reference to the store containing the document. - @see CEikDocument */ - virtual void PrintL(const CStreamStore& aSourceStore)=0; // default print parameters, assume print context supplied by environment - // - // persistence functions - - /** Stores the document to the current file, commits the changes, and marks the - document status as unchanged. - - Typically, the function is called by the application when it implements a - "Save" type menu option in its User Interface. - - An implementation of this function is supplied by the UI framework. This is - adequate for direct file store applications. Applications using a permanent - file store model, need to provide their own implementation. - - If the function leaves, an implementation should ensure that any changes made - to the file are rolled back, leaving the file in the state it was in before - the function was called. - - @see CEikDocument */ - virtual void SaveL()=0; // save the doc to the file in the custody of iAppProcess. This fn should be called by any "Save" menu option. store->Commit() should be called within it. - /** Stores the document's content and state to the specified store, recording the - identity of any headstreams created in the specified stream dictionary. - - The store must be fully constructed before this function is called. - - An empty implementation of this function is supplied by the UI framework. - UI applications that need to persist any data must provide their own implementation. - - If the function leaves, an implementation should ensure that the store and - the stream dictionary are returned to the state they were in before the function - was called. - - @param aStore The store into which document data is to be stored. - @param aStreamDic The stream dictionary into which stream IDs and associated - UIDs are to be recorded. - @see CEikDocument */ - virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const=0; // store to aStore, lodging the headstream in aStreamDic - - /** Restores the document's content and state from data persisted in the specified - store. - - An empty implementation of this function is supplied by the UI framework. - UI applications that need to restore data must provide their own implementation. - - If the function leaves, an implementation should ensure that the store and - the stream dictionary are returned to the state they were in before the function - was called. - - @param aStore The store from which document data is to be restored. - @param aStreamDic The stream dictionary containing stream IDs and associated - UIDs. - @see CEikDocument */ - virtual void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic)=0; // restore from aStore using aStreamDic - - /** Restores the document to the extent that it does not need the store - further. - - A document only keeps a pointer to a store if it implements deferred - loading. This also tells the document that any store pointer that it - might have is just about to become invalid. - - An empty implementation of this function is supplied by the UI framework. - UI applications that support deferred loading or embedding should provide an - implementation. - - If a document supports embedding, then it should - propagate the DetachFromStoreL() call on to all embedded objects that - it contains. - - If the function leaves, the operation should be aborted - because the document has not successfully detached from the store. - Continuing with the operation may leave the document in an unsafe - state or cause user data to be lost. - - @param aDegree The degree of detachment required. */ - virtual void DetachFromStoreL(CPicture::TDetach /*aDegree*/=CPicture::EDetachFull) {} // supply an implementation if you support deferred loading or embedding - - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream)const; - // - // enquiry functions - - /** Tests whether the document is empty. - - The UI framework provides a default implementation which always returns a - true value. - - The UI application can provide its own implementation. Typically, any application - that has editable content should supply an implementation that acts according - to the state of that content. Applications without associated document data - need not supply an implementation. - - @return True if the document is empty, false otherwise. - @see CEikDocument */ - virtual TBool IsEmpty()const=0; // return ETrue if the document is empty - IMPORT_C virtual void ValidatePasswordL()const; // return EFalse if there *is* a password *and* the user doesn't get it right, ETrue otherwise (ie they get it right or there isn't one). Returns ETrue by default - - IMPORT_C virtual TCapability Capability()const; // returns "cant do anything" by default - inline CApaApplication* Application()const; - inline CApaProcess* Process()const; - - /** Tests whether the document has changed since it was last persisted. - - An implementation of this function is supplied by the UI framework and need - not be changed by the UI application. - - @return True, if the document has changed since the last time that it was - persisted, false, otherwise. - @see CEikDocument */ - virtual TBool HasChanged()const =0; - // - IMPORT_C virtual ~CApaDocument(); -protected: - IMPORT_C CApaDocument(); - IMPORT_C CApaDocument(CApaApplication& aApp,CApaProcess& aProcess); -private: - IMPORT_C virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile); // was previously Reserved_1 - // Reserved virtual functions... - IMPORT_C virtual void Reserved_2(); -protected: - MApaEmbeddedDocObserver* iContainer; // null unless this is an embedded object currently being edited -private: - CApaApplication* iApplication; // the doc's associated application - CApaProcess* iApaProcess; - TInt iSpare; - }; - - - -class TApaApplicationFactory -/** Encapsulates the functionality of creating an application, whether it be via a factory function -or an ECOM plugin. Instances of this class can usually be created implicitly when required as -function parameters - just specify the function pointer, ECOM plugin UID or CImplementationInformation -reference. - -@publishedAll -@released -@see CApaProcess -@see EikStart */ - { -public: - typedef CApaApplication* (*TFunction)(); -public: - IMPORT_C TApaApplicationFactory(); - IMPORT_C TApaApplicationFactory(TFunction aFunction); - IMPORT_C TApaApplicationFactory(const CImplementationInformation& aEmbeddedApplicationInformation); - IMPORT_C TApaApplicationFactory(TUid aEmbeddedApplicationUid); - CApaApplication* CreateApplicationL() const; - HBufC* AppFileNameL() const; - TUid AppFileUid() const; -private: - enum TType - { - ETypeFunction, // if iType is this, iData is a TFunction - ETypeEmbeddedApplicationInformation, // if iType is this, iData is an ECOM CImplementationInformation - ETypeEmbeddedApplicationUid // if iType is this, iData is an ECOM implementation TUid - }; -private: - static CApaApplication* CreateEmbeddedApplicationL(TUid aUid); - static HBufC* EmbeddedApplicationDisplayNameLC(TUid aUid); - static HBufC* FullAppFileNameL(const TDesC& aAppName); - static void CleanupImplementationArray(TAny* aImplementationArray); -private: - TType iType; - TUint iData; - mutable CApaApplication* iApplication; // used to be iSpare1 - TInt iSpare2; - }; - -class CApaParentProcessMonitor; - -class CApaProcess : public CBase -/** Maintains a list of documents and all of the potentially shared resources used -by documents. - -This includes the application DLLs. The class also supplies utility functions -that provide the basic structure for persisted document files. - -The class deals with the loading of application DLLs and manages the creation -and destruction of application (CApaApplication) objects and document (CApaDocument) -objects. - -The class is derived from by the UI framework and further derivation by the -UI application is not necessary unless it needs to add extra utility functions -for the use of applications. - -@publishedAll -@released -@see CApaApplication -@see CApaDocument */ - { -public: - IMPORT_C static CApaProcess* NewL(const RFs& aFs); - IMPORT_C void ResetL(); - // - // static utility functions - IMPORT_C static CStreamDictionary* ReadRootStreamLC(RFs& aFs,CFileStore*& aStore,const TDesC& aDocFullFileName,TUint aFileMode); // opens aDocFileName as aStore and returns the stream dictionary contained in its root stream on the cleanup stack - IMPORT_C static CStreamDictionary* ReadRootStreamLC(CFileStore*& aStore, const RFile& aFile); - IMPORT_C static void WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const CApaApplication& aApp); - IMPORT_C static void WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId); - IMPORT_C static TApaAppIdentifier ReadAppIdentifierL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic); - IMPORT_C static void WriteAppIdentifierL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId); - // - // document management - IMPORT_C CApaDocument* AddNewDocumentL(TApaApplicationFactory aApplicationFactory); - IMPORT_C CApaDocument* OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode); // Open a file and restore the contained document - IMPORT_C void DestroyDocument(CApaDocument* aDoc); // Removes a doc (identified by the object) from the list and destroys it. Also removes the app and closes the AppDll if appropriate. - // - // setter functions - IMPORT_C void SetMainDocument(CApaDocument* aDocument); - IMPORT_C void SetMainDocFileName(const TDesC& aMainDocFileName); // panics if the descriptor is too long - IMPORT_C void SetMainDocFileNameL(const TDesC& aMainDocFileName); - // - // accessor functions - IMPORT_C TPtrC MainDocFileName()const; - inline RFs& FsSession()const; - inline CApaDocument* MainDocument()const; - // - IMPORT_C ~CApaProcess(); -protected: - IMPORT_C CApaProcess(); - IMPORT_C CApaProcess(const RFs& aFs); - IMPORT_C void ConstructL(); - IMPORT_C void ConstructL(TProcessId aParentProcessId); - - IMPORT_C virtual void CApaProcess_Reserved1(); - IMPORT_C virtual void CApaProcess_Reserved2(); -public: - static TInt IdleRemoveApplications(TAny* aThis); - void RemoveMarkedApplications(); -private: - CApaDll* AddAppDllL(const TDesC& aDllFullPath); - CApaExe* AddAppExeL(TApaApplicationFactory aApplicationFactory); - void RemoveApp(CApaAppHolder* aAppHolder); - CApaDocument* CreateDocL(CApaApplication* aApp); - CApaAppHolder* FindAppInListL(const TDesC& aAppFileName,TUid aUid)const; // returns NULL if not in list - void DeleteAllDocs(); - void MarkApplicationForRemoval(const CApaApplication* aApp); - static void DoReadRootStreamL(CStreamDictionary& aStreamDictionary, const CFileStore& aStore); -private: - CArrayFixFlat* iAppList; // array of apps in use - CArrayFixFlat* iDocList; // array of documents (1 main + n embedded) - CApaDocument* iMainDoc; - HBufC* iMainDocFileName; - RFs iFsSession; // file server session for doc store - CIdle* iApplicationRemover; - CApaParentProcessMonitor* iMonitor; - TInt iCApaProcess_Reserved1; - }; - - -class MApaEmbeddedDocObserver -/** An interface class for handling the completion of the editing of an embedded -document. - -@publishedAll -@released -@see CApaDocument::EditL() */ - { -public: - /** Defines the state of the embedded document on completion of editing. */ - enum TExitMode { - /** Changes to the embedded document must be saved. */ - EKeepChanges, - /** Reverts back to the saved version of the embedded document, i.e. reloads the - whole document. */ - ERevertToSaved, - /** No changes have been made to the embedded document. */ - ENoChanges, - /** The embedded document is empty. */ - EEmpty - }; -public: - /** Implements the required behaviour when the editing of an embedded document completes. - - @param aMode Indicates the state of the document. */ - virtual void NotifyExit(TExitMode aMode)=0; // called on completion of editing of an embedded document -protected: - IMPORT_C MApaEmbeddedDocObserver(); -private: - IMPORT_C virtual void MApaEmbeddedDocObserver_Reserved1(); - IMPORT_C virtual void MApaEmbeddedDocObserver_Reserved2(); -private: - TInt iMApaEmbeddedDocObserver_Reserved1; - }; - - -//// inlines //// -inline CApaApplication* CApaDocument::Application()const -/** Returns a pointer to the application that created the document. - -@return A pointer to the document's associated application. */ - { return iApplication; } - -inline CApaProcess* CApaDocument::Process()const -/** Returns a pointer to the application process associated with this document. - -@return A pointer to the application process associated with this document. */ - { return iApaProcess; } - -inline TBool CApaDocument::TCapability::CanDrawGlass()const -/** Tests whether the document supports being embedded as a glass door. - -@return True if embedding as a glass door is supported; false otherwise. */ - { return iCapability&ECanDrawGlass; } - -inline TBool CApaDocument::TCapability::CanPrint()const -/** Tests whether the document supports being printed without using the full application -UI. - -@return True, if printing is supported; false, otherwise. */ - { return iCapability&ECanPrint; } - -inline void CApaDocument::TCapability::SetCanDrawGlass() -/** Sets the document as being capable of being embedded as a glass door. */ - { iCapability = iCapability|ECanDrawGlass; } - -inline void CApaDocument::TCapability::SetCanPrint() -/** Sets the document as being capable of being printed without using the full application -UI. */ - { iCapability = iCapability|ECanPrint; } - -inline RFs& CApaProcess::FsSession()const -/** Returns a handle to the file server session used by this application process. - -@return The file server session. */ - { return (RFs&)iFsSession; } //lint !e1536 Exposing low access member - Kept for backward BC - -inline CApaDocument* CApaProcess::MainDocument()const -/** Returns a pointer to the main document. - -@return A pointer to the main document. */ - { return iMainDoc; } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asaltdefs.h --- a/epoc32/include/asaltdefs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,247 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASALTDEFS_H__ -#define __ASALTDEFS_H__ - -/** @file -@publishedAll -@released -*/ -// System includes -#include -#include - -/** - Flags used to indicate the States for enum TASAltStateFlags - */ -typedef TBitFlags TASAltClientServerStateFlags; - -/** - Major Version used while connecting to the Alarm Alert Server - */ -const TInt KASAltVersionMajor = 3; - -/** - Minor Version used while connecting to the Alarm Alert Server - */ -const TInt KASAltVersionMinor = 0; - -/** - Build Version used while connecting to the Alarm Alert Server - */ -const TInt KASAltVersionBuild = 0; - -/** - Number of message Slots - */ -const TInt KAlmMessageSlots = 5; - -/** - The individual op codes which the Alert Server and Alarm Server - handshake using - */ -enum TASAltOpCode - { - /** - Notify the alarm server (asynchronously) when the Alert Server - wishes to perform some action. - */ - EASAltOpCodeNotify = 0, - - /** - Cancel an earlier notification - */ - EASAltOpCodeNotifyCancel, - - /** - Change the visibility of the Alert Server UI furniture - */ - EASAltOpCodeVisible, - - /** - Update the Alert Server flags - */ - EASAltOpCodeSetState, - - /** - Inform the Alert Server of the currently notifying alarm - */ - EASAltOpCodeSetAlarm, - - /** - Inform the Alert Server that the currently alerting alarm - has been snoozed. - */ - EASAltOpCodeSetDeferTime, - - /** - Retrieve the time from the Alert Server when a quiet period - should be terminated - */ - EASAltOpCodeGetUserTime, - - /** - Create an outstanding request with the Alert Server. Used - as a mechanism to obtain Alert Server thread death notifications. - */ - EASAltOpCodeLogon, - - /** - Ask the Alert Server to start playing the specified alarm sound - */ - EASAltOpCodeStartPlayingSound, - - /** - Ask the Alert Server to stop playing any sound - */ - EASAltOpCodeStopPlayingSound - - /** - Ask the Alert Server to change vissibility for all alarms - */ - , EASAltOpCodeVisibleAll, - - /** - Ask the Alert Server to update states for all alarms - */ - EASAltOpCodeSetStateAll, - - /** - Ask the Alert Server to stop playing all sounds. - */ - EASAltOpCodeStopPlayingSoundAll, - - /** - Ask the Alert Server to delete alarm with provided Id - */ - EASAltOpCodeDeleteAlarm, - - /** - Retrieve the time from the Alert Server when a quiet period - should be terminated - */ - - EASAltOpCodeGetEndQuietTime, - - /** - Ask the Alarm Server to get number of simultaneously supported alarms - */ - EASAltOpCodeGetMaxAlarms, - - /** - Ask the Alert Server to delete all alarms - */ - EASAltOpCodeDeleteAlarmAll, - - EASAltOpCodeLast - - - }; - -/** - All communication from the Alert Server to the Alarm Server - occurs via a single outstanding TRequesStatus which is handled - by the Alarm Server (as an active object). This enumeration - describes the type of action that the Alarm Server should take in - response to a request from the Alert Server. - */ -enum TASAltAlertServerResponse - { - /** - The Alert Server wishes the Alarm Server to - silence all alarms. - */ - EASAltAlertServerResponseSilence = 0, - - /** - The Alert Server wishes the Alarm Server to - enter a global quiet period. - */ - EASAltAlertServerResponseQuietPeriod, - - /** - The Alert Server wishes the Alarm Server to - acknowledge (clear) the currently notifying alarm. - */ - EASAltAlertServerResponseClear, - - /** - The Alert Server wishes the Alarm Server to - acknowledge (clear) the currently notifying alarm - and all others that are awaiting notification. - */ - EASAltAlertServerResponseClearAll, - - /** - The Alert Server wishes the Alarm Server to - snooze the currently notifying alarm. - */ - EASAltAlertServerResponseSnooze, - - /** - The Alert Server wishes the Alarm Server to - temporarily pause all sound (i.e stop sending sound - play events to the Alert Server). - */ - EASAltAlertServerResponsePauseSound - }; - -/** - Flags for TASAltClientServerStateFlags - */ -enum TASAltStateFlags - { - /** - The Alert Server should not play any sound - */ - EASAltStateFlagsSilentRunning = 1, - - /** - The Alarm Server is currently within a quiet period - */ - EASAltStateFlagsInQuietPeriod = 2, - - /** - The Alarm Server currently has more than one alarm - ready to notify. - */ - EASAltStateFlagsMoreThanOneDueAlarm = 3, - - /** - There wasn't sufficient memory within the Alarm - Server to allocate room for a snoozed alarm. I'm - note convinced we need this anymore - */ - EASAltStateFlagsNoMemoryForSnoozeAlarm = 4, - - /** - There isn't any sound filename for the current - alarm. - */ - EASAltStateFlagsAlarmHasNoSoundFileName = 5, - - /** - This isn't used by the Alert Server. - */ - EASAltStateFlagsSoundIsPaused = 6 - - }; - -// Literal constants -_LIT(KAlarmAlertServerName, "!AlarmAlertServer"); - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/ascliclientutils.h --- a/epoc32/include/ascliclientutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASCLICLIENTUTILS_H__ -#define __ASCLICLIENTUTILS_H__ - -// System includes -#include - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> AlarmClientUtils (header) -/////////////////////////////////////////////////////////////////////////////////////// -class AlarmClientUtils -/** -@publishedAll -@released -*/ - { -/////////////////////////////////////////////////////////////////////////////////////// -public: // ENUMERATIONS -/////////////////////////////////////////////////////////////////////////////////////// - /** Panic numbers associated with the ALMSRVCLI panic category. */ - enum TAlarmClientPanic - { - EAlarmClientPanicArgument = 0, - EAlarmClientPanicCancel = 1, - EAlarmClientPanicSessionClose = 2, - EAlarmClientPanicSetAlarm = 3, - EAlarmClientPanicGetAlarm = 4, - EAlarmClientPanicInvalidAlarmID = 5, - EAlarmClientPanicAlarmInfo = 6, - EAlarmClientPanicSound = 7, - EAlarmClientPanicOwner = 8, - EAlarmClientPanicVerify = 9, - EAlarmClientPanicAlarmDay = 10, - EAlarmClientPanicNumber = 11, - EAlarmClientPanicNoArray = 12, - EAlarmClientPanicNotificationCancel = 13, - // - EAlarmClientPanicLast - }; - /** Panic numbers associated with the ALMSRVCLIFAULT panic category. */ - enum TAlarmClientFault - { - EAlarmClientFaultLogic = 0, - EAlarmClientFaultData = 1, - EAlarmClientFaultCouldNotLoadServer = 2, - // - EAlarmClientFaultDebugFuncError = 3, - // - EAlarmClientFaultLast - }; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // INTERNAL CONSTRUCT -/////////////////////////////////////////////////////////////////////////////////////// - - static void Panic(TAlarmClientPanic aPanic); - - static void Fault(TAlarmClientFault aFault); - - IMPORT_C static TInt StartAlarmServer(); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asclidefinitions.h --- a/epoc32/include/asclidefinitions.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASCLIDEFINITIONS_H__ -#define __ASCLIDEFINITIONS_H__ - -// System includes -#include - -// User includes - -// Type definitions - -// Constants - -// Enumerations - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> ASCliDefinitions (header) -/////////////////////////////////////////////////////////////////////////////////////// -class ASCliDefinitions -/** This is a utility class that retrieves the name and version number of the alarm -server. -@publishedAll -@released -*/ - { -/////////////////////////////////////////////////////////////////////////////////////// -public: // STATIC ACCESS METHODS -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C static const TDesC& ServerAndThreadName(); - - static const TDesC& ServerImageName(); - - static TUidType ServerUidType(); - - static TVersion Version(); - - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asclisession.h --- a/epoc32/include/asclisession.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASCLISESSION_H__ -#define __ASCLISESSION_H__ - -// System includes -#include - -// User includes -#include - -// Classes referenced -class TASShdAlarm; -class TASCliSoundPlayDefinition; - - -class RASCliSession : public RSessionBase -/** The client-side interface to the Symbian OS alarm server. -@publishedAll -@released -*/ - { -/////////////////////////////////////////////////////////////////////////////////////// -public: // CONNECT TO SERVER & VERSIONING -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C RASCliSession(); - - IMPORT_C TInt Connect(); - - IMPORT_C TVersion Version() const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // ALARM SPECIFIC FUNCTIONALITY -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C TInt AlarmAdd(TASShdAlarm& aAlarm) const; - - IMPORT_C TInt AlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const; - - IMPORT_C void AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm); - - IMPORT_C void AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData); - - IMPORT_C void AlarmNotificationCancelAndDequeue(TAlarmId aAlarmId) const; - - IMPORT_C TInt GetAlarmDetails(TAlarmId aAlarmId, TASShdAlarm& aAlarm) const; - - IMPORT_C TInt AlarmDelete(TAlarmId aAlarmId) const; - - IMPORT_C TInt GetAlarmCategory(TAlarmId aAlarmId, TAlarmCategory& aCategory) const; - - IMPORT_C TInt GetAlarmOwner(TAlarmId aAlarmId, TFullName& aThreadName) const; - - IMPORT_C TInt SetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus aStatus) const; - - IMPORT_C TInt GetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus& aStatus) const; - - IMPORT_C TInt SetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed aDayOrTimed) const; - - IMPORT_C TInt GetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed& aDayOrTimed) const; - - IMPORT_C TInt SetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags aCharacteristics) const; - - IMPORT_C TInt GetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags& aCharacteristics) const; - - IMPORT_C TInt SetClientData(const TASShdAlarm& aAlarm); - - IMPORT_C TInt SetAlarmDays(TAlarmId aAlarmId, TUint8 aAlarmDays) const; - IMPORT_C TInt GetAlarmDays(TAlarmId aAlarmId, TUint8& aAlarmDays) const; - IMPORT_C TInt SetContinuous(TAlarmId aAlarmId, TBool aContinuous) const; - IMPORT_C TInt GetContinuous(TAlarmId aAlarmId, TBool& aContinuous) const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // ALARM DATA FUNCTIONALITY -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C TInt AlarmDataAttachL(TAlarmId aAlarmId, const TDesC8& aData) const; - - IMPORT_C TInt AlarmDataDetach(TAlarmId aAlarmId) const; - - inline TInt AlarmDataDetatch(TAlarmId aAlarmId) const; - - IMPORT_C TInt AlarmDataSize(TAlarmId aAlarmId) const; - - IMPORT_C TInt GetAlarmData(TAlarmId aAlarmId, TDes8& aSink) const; - - IMPORT_C TInt GetAlarmData(TAlarmId aAlarmId, HBufC8*& aSink) const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // CATEGORY-SPECIFIC FUNCTIONALITY -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C TInt SetAlarmStatusByCategory(TAlarmCategory aCategory, TAlarmStatus aStatus) const; - - IMPORT_C TInt GetAlarmCountForCategory(TAlarmCategory aCategory) const; - - IMPORT_C TInt AlarmDeleteAllByCategory(TAlarmCategory aCategory, TBool aDeleteOnlyOrphanedAlarmsInCategory) const; - - IMPORT_C TInt AlarmDeleteByCategory(TAlarmCategory aCategory, TDeleteType aWhatToDelete) const; - - IMPORT_C void GetAvailableCategoryListL(RArray& aCategories) const; - - IMPORT_C void GetAlarmIdListForCategoryL(TAlarmCategory aCategory, RArray& aAlarmIds) const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // MISC FUNCTIONALITY -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C TInt AlarmCountByState(TAlarmState aState) const; - - IMPORT_C void GetAlarmIdListByStateL(TAlarmState aState, RArray& aAlarmIds) const; - - IMPORT_C void GetAlarmIdListL(RArray& aAlarmIds) const; - - IMPORT_C TInt GetNextDueAlarmId(TAlarmId& aAlarmId) const; - - IMPORT_C TInt NumberOfAlarmsActiveInQueue() const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // SOUND CONTROL -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C TInt SetAlarmSoundState(TAlarmGlobalSoundState aState) const; - - IMPORT_C TInt GetAlarmSoundState(TAlarmGlobalSoundState& aState) const; - - IMPORT_C TInt SetAlarmSoundsSilentUntil(const TTime& aLocalTime) const; - - IMPORT_C TInt SetAlarmSoundsSilentFor(TTimeIntervalMinutes aTimeToRemainSilentFor) const; - - IMPORT_C TInt GetAlarmSoundsSilentUntil(TTime& aLocalTime) const; - - IMPORT_C TInt CancelAlarmSilence() const; - - IMPORT_C TBool AlarmSoundsTemporarilySilenced() const; - - IMPORT_C void SetAlarmPlayIntervalsL(const CArrayFix& aIntervals) const; - - IMPORT_C void GetAlarmPlayIntervalsL(CArrayFix& aIntervals) const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // CHANGE NOTIFICATION -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C void NotifyChange(TRequestStatus& aStatus, TAlarmId& aAlarmId); - - IMPORT_C void NotifyChangeCancel() const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // DEBUG ONLY -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C void __DbgShutDownServer() const; - - IMPORT_C void __DbgFailAlloc(TInt aCount) const; - - IMPORT_C void __DbgPreventUserNotify(TBool aShouldStop) const; - - IMPORT_C TInt __DbgSnoozeAlarm(TAlarmId aAlarmId, const TTime& aNewTime) const; - - IMPORT_C TInt __DbgSetEnvChgHandling(TBool aFlag) const; -/////////////////////////////////////////////////////////////////////////////////////// -private: // MEMBER DATA -/////////////////////////////////////////////////////////////////////////////////////// - - void FetchAlarmIdsFromBufferL(RArray& aAlarmIds, TInt aBufferSize) const; - - CBufBase* FetchTransferBufferLC(TInt aBufferSize) const; - - void DoAlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData); - TInt DoAlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const; - -/////////////////////////////////////////////////////////////////////////////////////// -private: // MEMBER DATA -/////////////////////////////////////////////////////////////////////////////////////// - - TPtr8 iPackage; - TPtr8 iAlarmIdPointer; - }; - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> RASCliSession (inlines) -/////////////////////////////////////////////////////////////////////////////////////// -inline TInt RASCliSession::AlarmDataDetatch(TAlarmId aAlarmId) const -/** @deprecated 8.0 - -RASCliSession::AlarmDataDetach() should be used instead */ - { - return AlarmDataDetach(aAlarmId); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asclisoundplay.h --- a/epoc32/include/asclisoundplay.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASCLISOUNDPLAY_H__ -#define __ASCLISOUNDPLAY_H__ - -// System includes -#include - -// User includes -#include - -// Type definitions - -// Constants - -// Enumerations - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> TASCliSoundPlayDefinition (header) -/////////////////////////////////////////////////////////////////////////////////////// -class TASCliSoundPlayDefinition -/** Defines when alarm sounds are to be played, and for how long. - -Alarm sounds are played according to intervals that consist of a duration -and an offset. - -The duration is the number of seconds that the alarm sound plays. - -The offset is the number of minutes after the alarm expires that the alarm -sound plays. - -The sound play definition is set using class RASCliSession. -@publishedAll -@released -*/ - { -/////////////////////////////////////////////////////////////////////////////////////// -public: // CONSTRUCT -/////////////////////////////////////////////////////////////////////////////////////// - - inline TASCliSoundPlayDefinition(); - - inline TASCliSoundPlayDefinition(TTimeIntervalMinutes aOffset, TTimeIntervalSeconds aDuration); - -//////////////////////////////////////////////////////////////////////////////////////// -public: // ACCESS -/////////////////////////////////////////////////////////////////////////////////////// - - inline TTimeIntervalMinutes Offset() const - /** Retrieves the offset. - - @return The offset in minutes. */ - { return iOffset; } - - inline TTimeIntervalSeconds Duration() const - /** Retrieves the duration. - - @return The duration in seconds. */ - { return iDuration; } - -////////////////////////////////////////////////////////////////////////////////////// -private: // MEMBER DATA -/////////////////////////////////////////////////////////////////////////////////////// - - /* - * From the time an alarm is first displayed - */ - TTimeIntervalMinutes iOffset; - - /* - * How long the alarm playing lasts - */ - TTimeIntervalSeconds iDuration; - }; - - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> TASCliSoundPlayDefinition (inlines) -/////////////////////////////////////////////////////////////////////////////////////// -inline TASCliSoundPlayDefinition::TASCliSoundPlayDefinition() -: iOffset(KDefaultSoundPlayOffsetInSeconds), iDuration(KDefaultSoundPlayDurationInSeconds) -/** Default constructor. - -The default offset is zero, and the default duration is 30 seconds. */ - {} -inline TASCliSoundPlayDefinition::TASCliSoundPlayDefinition(TTimeIntervalMinutes aOffset, TTimeIntervalSeconds aDuration) -: iOffset(aOffset), iDuration(aDuration) -/** Constructor that initializes the offset and duration to specified values. - -@param aOffset Time in minutes for the offset. -@param aDuration Time in seconds for the duration. */ - {} - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asshdalarm.h --- a/epoc32/include/asshdalarm.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,546 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASSHDALARM_H__ -#define __ASSHDALARM_H__ - - -// System includes -#include -#include - -// User includes -#include - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> TASShdAlarm (header) -/////////////////////////////////////////////////////////////////////////////////////// - -/** The Alarm publish and subscribe category -@publishedPartner -@released -*/ -const TUid KAlarmServerPubSubCategory = { 0x101f5027 }; - -/** Used for subcribing missed alarms or time zone changes -@publishedPartner -@released -*/ -const TUint KMissingAlarmPubSubKey = 100; - -/** The publish and subscribe data for KMissingAlarmPubSubKey -@publishedPartner -@released -*/ -struct TMissedAlarmPubSubData - { - /** The value indicating the changes. - 1 - Time zone has been changes but there are no missed alarms - 2 - Some alarms have been missed after system time or time zone has changed. - */ - TUint8 iValue; - - /** The time that system time change took place, in universal (UTC) time */ - TTime iTimeOfChangeUtc; - }; - -/** Used for subscribing to data used when searching for instances in Calendar -@publishedPartner -@released -*/ -const TUint KSkippedAlarmInstancesPubSubKey = 101; - -/** The publish and subscribe data for KMissingAlarmInstancesPubSubKey -@publishedPartner -@released -*/ -struct TASShdAlarmedInstanceParams - { - /** The start of the time range in local time. */ - TTime iLocalStartTime; - - /** The end of the time range in local time. */ - TTime iLocalEndTime; - - /** The alarm time types to include. */ - TASShdAlarmTimeType iTimeType; - }; - - -class TASShdAlarm -/** A client-side alarm object. - -It contains all of the information needed to create an alarm in -the Alarm Server. -@publishedAll -@released -*/ - { -/////////////////////////////////////////////////////////////////////////////////////// -public: // CONSTRUCT -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C TASShdAlarm(); - -/////////////////////////////////////////////////////////////////////////////////////// -public: // INTERNALIZE / EXTERNALIZE -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C void InternalizeL(RReadStream& aStream); - - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // READ-ONLY ACCESS -/////////////////////////////////////////////////////////////////////////////////////// - - inline TAlarmStatus Status() const - /** Returns the alarm status. - - @return Alarm status. */ - { return iStatus; } - - inline TAlarmState State() const - /** Returns the alarm state. - - @return Alarm state. */ - { return iState; } - - inline TBool HasAssociatedData() const; - - inline TBool HasOwningSession() const; - - inline TBool HasBecomeOrphaned() const; - -/////////////////////////////////////////////////////////////////////////////////////// -public: // READ-ONLY & MODIFIABLE -/////////////////////////////////////////////////////////////////////////////////////// - - IMPORT_C void Reset(); - - inline TAlarmId& Id() - /** Returns a writable version of the alarm's unique identifier. - - @return Reference to the unique identifier. */ - { return iAlarmId; } - - inline TAlarmId Id() const - /** Return the alarm's unique identifier. - - @return The unique identifier. */ - { return iAlarmId; } - -//The Secure ID is only used in the secured platform - - // adds a SID to the alarms private field - inline void SetSid(const TSecureId& aSecureID) - {iTASShdAlarmSID = aSecureID;} - - // returns the SID of the alarm's creator - inline TSecureId GetSid() const - {return iTASShdAlarmSID;} - - inline TTime& NextDueTime() - /** Returns a writable version of the next time the alarm is scheduled to expire. - - @return Next expiry time. */ - { return iNextDueTime; } - - inline const TTime& NextDueTime() const - /** Returns the next time that the alarm is scheduled to expire. - - @return Next expiry time. */ - { return iNextDueTime; } - - inline TTime& OriginalExpiryTime() - /** Returns a writable version of the alarm's original expiry time. - - @return Original expiry time. */ - { return iOriginalExpiryTime; } - - inline const TTime& OriginalExpiryTime() const - /** Returns the alarm's original expiry time. - - The original expiry time is the same as the next due time, unless the alarm - has been snoozed. In that case, the original expiry time is the time when - the alarm first expired, and the next due time is when it is to re-awaken - after the snooze. - - @return Original expiry time. */ - { return iOriginalExpiryTime; } - - inline TAlarmCategory& Category() - /** Returns a writable version of the alarm's category. - - Clients can use the category to tag each alarm with a specific code. This - allows clients to identify all related alarms, such as all alarms associated - with a particular application or application engine. - - @return Alarm category. */ - { return iCategory; } - - inline TAlarmCategory Category() const - /** Return this alarm's category. - - @return Alarm category. */ - { return iCategory; } - - inline TAlarmCharacteristicsFlags& Characteristics() - /** Returns a writable version of the alarm's characteristics. - - @return Alarm characteristics bit flags. */ - { return iCharacteristics; } - - inline TAlarmCharacteristicsFlags Characteristics() const - /** Returns the alarm's characteristics - - @return Alarm characteristics bit flags. */ - { return iCharacteristics; } - - inline TAlarmRepeatDefinition& RepeatDefinition() - /** Returns a writable version of the alarm's repeat definition. - - The repeat definition controls the alarm's behaviour after it has expired. - For example, you can set the repeat definition so that the server automatically - queues the alarm to expire again in exactly 24 hours time. - - @return Alarm repeat definition. */ - { return iRepeatDefinition; } - - inline TAlarmRepeatDefinition RepeatDefinition() const - /** Returns the repeat definition for the alarm. - - @return The alarm's repeat definition. */ - { return iRepeatDefinition; } - - inline TAlarmMessage& Message() - /** Returns a writable version of the alarm's message. - - The message is usually displayed in the application UI - when the alarm expires. - - @return Reference to the alarm's associated message. */ - { return iMessage; } - - inline const TAlarmMessage& Message() const - /** Returns the alarm's message. - - The message is usually displayed in the application UI when the alarm expires. - - @return Reference to the alarm's associated message. */ - { return iMessage; } - - inline TAlarmSoundName& SoundName() - /** Return a writable version of the alarm sound's filename. - - @return Reference to the alarm's sound filename. */ - { return iSoundName; } - - inline const TAlarmSoundName& SoundName() const - /** Returns the alarm's sound filename. - - @return Sound filename. */ - { return iSoundName; } - - inline TAlarmDayOrTimed DayOrTimed() const - /** Returns the alarm session type. - - @return Alarm session type. */ - { return iDayOrTimed; } - - - inline TAlarmDayOrTimed& DayOrTimed() - /** Returns a writable version of the alarm type, i.e. day, timed - - @return iDayOrTimed. */ - { return iDayOrTimed; } - - - IMPORT_C void SetUtcNextDueTime(TTime aUtcTime); - - IMPORT_C void SetDeQueueIfDueTimeInPast(); - - IMPORT_C TInt SetAlarmDays(TUint8 aAlarmDays); - IMPORT_C TUint8 AlarmDays() const; - IMPORT_C void SetContinuous(TBool aContinuous); - IMPORT_C TBool Continuous(); - -/////////////////////////////////////////////////////////////////////////////////////// -public: // CLIENT DATA ACCESS -/////////////////////////////////////////////////////////////////////////////////////// - - inline TBitFlags16& ClientFlags() - /** Returns a writable version of the alarm's client flags. - - The client flags may be used for any client-specific data - - the alarm server does not use them. - - @return Reference to the alarm's bit flags. */ - { return iClientFlags; } - - inline TBitFlags16 ClientFlags() const - /** Returns this alarm's client flags. - - @return Reference to the alarm's bit flags. */ - { return iClientFlags; } - - inline TInt ClientData1() const - /** Returns the client data from slot 1 for this alarm. - - @return The first client-specific integer. */ - { return iClientData1; } - - inline TInt& ClientData1() - /** Returns a writable version of the client data from slot 1 for this alarm. - - @return Reference to the first client-specific integer. */ - { return iClientData1; } - - inline TInt ClientData2() const - /** Returns the client data from slot 2 for this alarm. - - @return The second client-specific integer. */ - { return iClientData2; } - - inline TInt& ClientData2() - /** Returns the client data from slot 2 for this alarm. - - @return The second client-specific integer. */ - { return iClientData2; } - - inline TBool IsFloating() const - /** Tests whether the alarm is floating. - - Floating alarms expire at a given wall-clock time regardless of the current locale and - whether any daylight saving time rules are in force. - - @return True if the alarm is floating. - */ - { return iCharacteristics.IsClear(EAlarmCharacteristicsIsFixed); } - - - - - -/////////////////////////////////////////////////////////////////////////////////////// -protected: // INTERNAL FLAGS -/////////////////////////////////////////////////////////////////////////////////////// - - /* - * @internalAll - */ - enum TASShdAlarmFlags - { - - /* - * @internalAll - */ - EASShdAlarmFlagsHasAssociatedData = 0, - - /* - * @internalAll - */ - EASShdAlarmFlagsHasOwningSession = 1, - - /* - * @internalAll - */ - EASShdAlarmFlagsHasBecomeOrphaned = 2, - - /* - * @internalAll Set if alarm is disabled manually so that can not be enabled when - * locale changes. - */ - EASShdAlarmFlagsPermanentDisabled = 4 - - }; - -private: - /* - * @internalComponent - */ - enum TASShdAlarmFlags2 - { - EASShdAlarmFlag2Wakeup = 0, - }; - - enum TASShdAlarmFlags2AlarmRepeatExtensions - { - EASShdAlarmFlag2AlarmDayMonday = 1, - EASShdAlarmFlag2AlarmDayTuesday = 2, - EASShdAlarmFlag2AlarmDayWednesday = 3, - EASShdAlarmFlag2AlarmDayThursday = 4, - EASShdAlarmFlag2AlarmDayFriday = 5, - EASShdAlarmFlag2AlarmDaySaturday = 6, - EASShdAlarmFlag2AlarmDaySunday = 7, - EASShdAlarmFlag2Continuous = 8 - }; - - -/////////////////////////////////////////////////////////////////////////////////////// -protected: // MEMBER DATA -/////////////////////////////////////////////////////////////////////////////////////// - - /* - * Various flags - used internally by the alarm object - */ - TBitFlags8 iFlags; - - /* - * This represents the desired behaviour for a given alarm. - * The Alarm Server uses this information to control the - * behaviour of the alarm. - * - * @see TAlarmCharacteristics - */ - TAlarmCharacteristicsFlags iCharacteristics; - - /* - * The unique identifier assoicated with each alarm maintained - * by the alarm world server. - */ - TAlarmId iAlarmId; - - /* - * The status of this alarm (e.g. enabled, disabled) - */ - TAlarmStatus iStatus; - - /* - * The state of this alarm (e.g. queued, notifying, notified, snoozed etc) - */ - TAlarmState iState; - - /* - * The type of this alarm (e.g. day, timed) - */ - TAlarmDayOrTimed iDayOrTimed; - - /* - * Controls how the alarm repeats after it has expired. Note that - * session alarms are not allowed to repeat (they must be "once - * only"). - */ - TAlarmRepeatDefinition iRepeatDefinition; - - /* - * This UID is supplied by the client and is used to indicate - * the category that this alarm is part of. The Alarm Server - * is category-agnostic, that is, this information is for - * the client's use only - */ - TAlarmCategory iCategory; - - /* - * The date and time at which this alarm is next due. For alarms - * that haven't been snoozed, then this is the original due time. - * - * For alarms that have been snoozed, this is the time at which - * the alarm will reawaken. - */ - TTime iNextDueTime; - - /* - * This attribute is only used in the instance whereby an alarm - * is snoozed. It represents the time at which the alarm first - * expired. - */ - TTime iOriginalExpiryTime; - - /* - * The message associated with this alarm, typically used - * in an application UI to inform the user as to the reason - * for the alarm. - */ - TAlarmMessage iMessage; - - /* - * A descriptor which holds the name of the sound file which - * should be played when the alarm expires. - */ - TAlarmSoundName iSoundName; - -/////////////////////////////////////////////////////////////////////////////////////// -protected: // CLIENT SPECIFIC DATA -/////////////////////////////////////////////////////////////////////////////////////// - - /* - * Flags for use by any particular client. These will - * only be relevant to a client who can interpret them. - */ - TBitFlags16 iClientFlags; - - /* - * For arbitrary client data 1 - */ - TInt iClientData1; - - /* - * For arbitrary client data 2 - */ - TInt iClientData2; - -/////////////////////////////////////////////////////////////////////////////////////// -private: // BC PROOFING -/////////////////////////////////////////////////////////////////////////////////////// - TSecureId iTASShdAlarmSID; - /* - * Various flags - used internally by the alarm object - */ - TBitFlags16 iFlags2; - TUint16 iTASShdAlarm_2; - TAny* iTASShdAlarm_3; - }; - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> TASShdAlarm (inline) -/////////////////////////////////////////////////////////////////////////////////////// - - -/** Tests whether the alarm has any associated data. - -@return True if the alarm has associated data. */ -inline TBool TASShdAlarm::HasAssociatedData() const - - { - return iFlags.IsSet(EASShdAlarmFlagsHasAssociatedData); - } - - -/** Tests whether the alarm has an active owning session. - -@return True if the alarm has an active owning session. */ -inline TBool TASShdAlarm::HasOwningSession() const - - { - return iFlags.IsSet(EASShdAlarmFlagsHasOwningSession); - } - -inline TBool TASShdAlarm::HasBecomeOrphaned() const -/** Tests whether the alarm is orphaned. - -An alarm is ophaned if it used to have an owning session, but no longer does. -If an alarm is owned by a session, it is removed from the queue when the session -disconnects. However, orphaned alarms stay in the queue. - -@return True if the alarm has becomed orphaned. */ - { - return iFlags.IsSet(EASShdAlarmFlagsHasBecomeOrphaned); - } - - - -#endif // #ifndef __ASSHDALARM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asshdbitflags.h --- a/epoc32/include/asshdbitflags.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#include diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/asshddefs.h --- a/epoc32/include/asshddefs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,414 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ASSHDDEFS_H__ -#define __ASSHDDEFS_H__ - -/** @file -@publishedAll -@released */ - -// System includes -#include -#include - -// Constants - -/** Maximum length of an alarm message. The message is usually displayed by the -alarm UI. */ -const TInt KMaxAlarmMessageLength = 0x80; -/** Maximum length of the filename of the sound played when an alarm expires. */ -const TInt KMaxAlarmSoundNameLength = KMaxFileName; - -// Type definitions -/** A unique identifier allocated to each new alarm by the alarm server, so that -the client can identify them. By default, KNullAlarmId. */ -typedef TInt TAlarmId; -/** A unique identifier that can optionally be used by clients to group -alarms into categories, for instance alarms associated with a particular application -or application engine. The alarm server ignores the category. It is relevant -to the client alone. */ -typedef TUid TAlarmCategory; -// -/** Flags that define an alarm's characteristics. - -@see TAlarmCharacteristics */ -typedef TBitFlags8 TAlarmCharacteristicsFlags; -// - -/** A type to identify what kind of alarms should be deleted when using the API -RASCliSession::AlarmDeleteByCategory() -@see TTDeleteTypeEnum */ -typedef TInt TDeleteType; - -/** Stores the text message associated with an alarm. */ -typedef TBuf TAlarmMessage; -/** Stores the name of a sound file which is played when an alarm activates. */ -typedef TBuf TAlarmSoundName; -// -/** Defines a null alarm identifier. */ -const TAlarmId KNullAlarmId = 0; -// -/** Defines the length in seconds of an alarm sound offset. */ -const TInt KDefaultSoundPlayOffsetInSeconds = 0; -/** Defines the length in seconds of an alarm sound duration. */ -const TInt KDefaultSoundPlayDurationInSeconds = 30; - -// Constants -/** A category that can be assigned to identify clock alarms to the client. The -server does not distinguish between alarm types. */ -const TAlarmCategory KASCliCategoryClock = { 0x101F5030 }; - -/** Defines whether an alarm is enabled or disabled: - -An enabled alarm activates at a specified time. - -A disabled alarm remains in the alarm server queue but is not active. - -You can get or set an alarm's status using the RASCliSession class. */ -enum TAlarmStatus - { - /** The alarm is currently enabled. */ - EAlarmStatusEnabled = 0, - - /** The alarm is currently disabled, and will not expire. */ - EAlarmStatusDisabled, - }; - -/** Represents an alarm's state. Alarms can have only one state. */ -enum TAlarmState - { - /** The alarm state is not currently known by the alarm server. */ - EAlarmStateInPreparation = -1, - - /** The alarm is waiting for its expiry time to be reached. */ - EAlarmStateQueued = 0, - - /** The alarm is snoozed. When the snooze period is over, the alarm expires again. */ - EAlarmStateSnoozed, - - /** The alarm is waiting to be notified. - - This state occurs when an alarm expires while another is being notified. When - this happens, the alarm being notified changes state to EAlarmStateWaitingToNotify. - This means that if it is set to be the next alarm to be notified, notification - will happen after the newly expired alarm has been notified and dismissed. */ - EAlarmStateWaitingToNotify, - - /** The alarm is currently notifying. */ - EAlarmStateNotifying, - - /** The alarm has already notified and has been dismissed. Any alarm which remains - in this state is dead. */ - EAlarmStateNotified - }; - -/** Defines an alarm session type as timed or untimed. This property is ignored by -the alarm server, and is for use by the client only. */ -enum TAlarmDayOrTimed - { - /** Timed alarm type (default). This alarm belongs to a timed event. This is an event - with a defined start and finish time. The alarm notification - time is specified as an offset from the event's start time, so that when the - event time changes, so does the alarm time. */ - EASShdAlarmTypeTimed = 0, - - /** Day alarm type. This alarm belongs to untimed events; these do not have - a defined start and finish time, but have an activation time. */ - EASShdAlarmTypeDay - }; - -/** Defines the sound state of the global alarm server . */ -enum TAlarmGlobalSoundState - { - /** When an alarm expires, the alarm sound is played. */ - EAlarmGlobalSoundStateOn = 0, - - /** When an alarm expires, no sound plays. */ - EAlarmGlobalSoundStateOff - }; - -/** Defines how an alarm is to be repeated. */ -enum TAlarmRepeatDefinition - { - /** The alarm expires only once, and is then deleted from the alarm server. By - default, all alarms behave this way. - - Standard repeat-once alarms are date relative, that is, they occur on a fixed - date and point in time. - - If the user changes the system date or time so that the new time is in the - future, and the new time is after the previously calculated expiry time: - - By less than 12 hours, the alarm expires immediately. - - By more than 12 horus, the alarm is silently discarded. - - If the user changes the system date or time so that the new time is before - the next calculated expiry time, the alarm type continues to be a - "Repeat once" alarm*/ - EAlarmRepeatDefintionRepeatOnce = 0, - - /** When initially scheduling the alarm, the date is always within the - next 24 hours. For example: - - The current time is 15:00, and the alarm time specified is 14:00. The - alarm expires tomorrow at 14:00. - - The current time is 15:00, and the alarm time specified is 16:00. The - alarm expires today at 16:00. - - If the alarm is missed, i.e. because the alarm server is inactive, then - the alarm changes its type from "Repeat in the next 24 Hours" to "Repeat once". - - If the user changes the system date or time so that the new time is in the - future, and the new time is after the previously calculated expiry time: - - By less than 12 hours, the alarm expires immediately. - - By more than 12 horus, the alarm is silently discarded. - - If the user changes the system date or time so that the new time is - before the next calculated expiry time: - - By less than 12 hours, no change in alarm type, and the alarm - remains queued. - - By greater than 12 hours, the alarm changes its type from - "Repeat in the next 24 Hours" to "Repeat once". Subsequent changes in system - time result in the behaviour described by the EAlarmRepeatDefintionRepeatOnce - characteristic. */ - EAlarmRepeatDefintionRepeatNext24Hours, - - /** The alarm repeats every day at the same time. If the user changes the system - date or time, this alarm behaves in the same way as a "Repeat once" alarm, - except that the alarm is not deleted, but rescheduled for the next available - time. - - If the user changes the system date or time to a point in the past, there - are no phantom alarm expiries. */ - EAlarmRepeatDefintionRepeatDaily, - - /** The alarm repeats every work day at the same time. If the user changes the - system date or time, this alarm behaves in the same way as a "Repeat once" - alarm, except that the alarm is not deleted, but rescheduled for the next - available time. - - If the user changes the system date or time to a point in the past, there - are no phantom alarm expiries. */ - EAlarmRepeatDefintionRepeatWorkday, - - /** The alarm repeats every week, on the same day at the same time. If the user - changes the system date or time, this alarm behaves in the same way as a "Repeat - once" alarm, except that the alarm is not deleted, but rescheduled for the - next available time. - - If the user changes the system date or time to a point in the past, there - are no phantom alarm expiries. */ - EAlarmRepeatDefintionRepeatWeekly, - - /** The alarm repeats every specified day at the same time. If the user - changes the system date or time, this alarm behaves in the same way as a - "repeat once" alarm, except that the alarm is not deleted, but rescheduled - for the next available time. - - If the user changes the system date or time to a point in the past, there - are no phantom alarm expiries.*/ - EAlarmRepeatDefinitionRepeatDailyOnGivenDays - }; - -/** Defines various alarm characteristics. */ -enum TAlarmCharacteristics - { - /** Sets an alarm to be session-only. This alarm only exists as long as a session - is maintained with the alarm server. Session alarms are removed from the alarm - queue when the originating session disconnects from the server. By default, - all alarms are persistent and remain so, even after the initiating session - has disconnected. */ - EAlarmCharacteristicsSessionSpecific = 0, - - /** Do not display a screen. By default, all alarms result in a suitable screen - being displayed, depending on the device. Use this flag to disable this default - behaviour. */ - EAlarmCharacteristicsDoNotNotifyAlarmAlertServer = 1, - - /** Sets an alarm to be floating - floating alarms expire at the current local time, - regardless of the current locale or DST rules.*/ - EAlarmCharacteristicsIsFixed = 2, - - /** Do not notify if its due time is in the past.*/ - EAlarmCharacteristicsDeQueueIfDueTimeInPast = 3, - // - EAlarmCharacteristicsLast - }; - -/** This enumeration defines the events that can be reported by the alarm server. - -These events are channelled to the client using the RASCliSession::NotifyChange() -method. - -@see TAlarmState */ -enum TAlarmChangeEvent - { - /** An alarm has changed state. - - @see TAlarmState */ - EAlarmChangeEventState = 1, - - /** An alarm has changed status. - - @see TAlarmStatus */ - EAlarmChangeEventStatus = 2, - - /** An alarm has changed characteristics. - - @see TAlarmCharacteristics */ - EAlarmChangeEventCharacteristics = 3, - - /** An alarm has been deleted from the queue of alarms. */ - EAlarmChangeEventAlarmDeletion = 4, - - /** An alarm has been added to the queue of alarms. */ - EAlarmChangeEventAlarmAddition = 5, - - /** An alarm has expired. */ - EAlarmChangeEventTimerExpired = 6, - - /** The sound for an alarm has just started playing. */ - EAlarmChangeEventSoundPlaying = 7, - - /** The sound for an alarm has just stopped playing. */ - EAlarmChangeEventSoundStopped = 8, - - /** The sound intervals associated with sound timing have changed. */ - EAlarmChangeEventPlayIntervalsChanged = 9, - - /** The global sound state (on/off) has changed. */ - EAlarmChangeEventGlobalSoundStateChanged = 10, - - /** The next alarm at the head of the alarm queue has changed. */ - EAlarmChangeEventHeadQueueItemChanged = 11, - - /** The system date or time has changed, or the days defined as workdays have changed. */ - EAlarmChangeEventSystemDateTimeChanged = 12, - - /** The alarm alert server has been instructed to show the 'alarm expired' display. */ - EAlarmChangeEventAlarmUIVisible = 13, - - /** The alarm alert server has been instructed to hide the 'alarm expired' display. */ - EAlarmChangeEventAlarmUIInvisible = 14, - - /** Alarm sounds have been temporarily silenced, the current alarm has been paused - or re-enabled. */ - EAlarmChangeEventSoundSilence = 15, - - /** The data associated with an alarm has changed. */ - EAlarmChangeEventAlarmData = 16, - - /** A restore from backup of the alarm server has started. Alarms cannot be added/deleted - until this has finished. */ - EAlarmChangeEventRestoreStarted = 17, - - /** A restore from backup of the alarm server has failed. Alarms can be added/deleted again. */ - EAlarmChangeEventRestoreFailed = 18, - - /** A restore from backup of the alarm server has completed. The alarm queue has changed. */ - EAlarmChangeEventRestoreCompleted = 19, - - /** Last change event (anchor). This is always at the end of the list. */ - EAlarmChangeEventLast, - - /** An undefined alarm event has occurred. */ - EAlarmChangeEventUndefined = 0 - }; - -/** Identifies server-initiated panics relating to the client session. */ -enum TAlarmServerInitiatedClientPanic - { - /** This panic occurs when the client requests a copy of any data attached to an - alarm, but does not supply enough buffer space to contain the data. */ - EAlarmServerInitiatedClientPanicInsufficientRoomForAlarmData = 0, - - /** This panic usually occurs when a client method tries to write to a descriptor - (sometimes asynchronously), and the client-supplied descriptor is not valid. */ - EAlarmServerInitiatedClientPanicBadDescriptor = 1, - - /** This panic occurs when a client already has an outstanding notification request, - but attempts to request another. */ - EAlarmServerInitiatedClientPanicChangeNotificationAlreadyOutstanding = 2, - - /** This panic occurs when a client tries to perform an invalid operation. */ - EAlarmServerInitiatedClientPanicInvalidOperation = 3, - - /** This panic occurs when a request to add an alarm contains a null alarm identiifer. - In the case of alarms with notifications, the client should pre-allocate the - alarm identifier before requesting the notification. */ - EAlarmServerInitiatedClientPanicBadPreAllocatedAlarmId = 4 - - }; - -/** Identifies what kind of alarms the client wants to delete. */ -enum TDeleteTypeEnum - { - /** All type of alarms. */ - EAllAlarms = 0, - /** Alarms future of the current time */ - EFuture = 1, - /** Alarms in the past of the current time but notifying, or waiting to notify, or snoozed by, the user */ - EActive = 2, - /** alarms that has been dismissed by the user */ - EExpired = 4 - }; - -/** -This enumeration indicates which days of the week an alarm with a repeat -definition of EAlarmRepeatDefinitionRepeatDailyOnGivenDays activates on. Days -are combined using the bitwise OR operator. - -@prototype -*/ -enum TAlarmDays - { - /** Alarm is active on Monday. */ - EAlarmDayMonday = 0x01, - /** Alarm is active on Tuesday. */ - EAlarmDayTuesday = 0x02, - /** Alarm is active on Wednesday. */ - EAlarmDayWednesday = 0x04, - /** Alarm is active on Thursday. */ - EAlarmDayThursday = 0x08, - /** Alarm is active on Friday. */ - EAlarmDayFriday = 0x10, - /** Alarm is active on Saturday. */ - EAlarmDaySaturday = 0x20, - /** Alarm is active on Sunday. */ - EAlarmDaySunday = 0x40 - }; - -/** Identifies the type of alarm which was missed. A UTC offset change will only -affect floating alarms whereas a system time change may affect either floating -or fixed alarms. -@see TASShdAlarmedInstanceParams -@see CASSrvAlarmQueue::MEnvChangeHandleEvent -*/ -enum TASShdAlarmTimeType - { - /** Floating time alarm. */ - EFloating, - /** Floating or fixed time alarm. */ - EFloatingOrFixed - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/attrlut.h --- a/epoc32/include/attrlut.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Attribute Look-Up-Table header -// The Attribute Lookup Table maintains a global set of unique IDs to be defined for document -// node attributes and language tags. It does this by generating a unique ID for any descriptor -// passed to it. This descriptor is in fact a pointer to a copy of the string. Once a string -// has been seen once, any further references to it will map back to the same ID (pointer) -// value. -// -// - -#if !defined(__CWAPENGINE_LUT_H__) -#define __CWAPENGINE_LUT_H__ - -#include - -class RTest; -class CAttributeLookupTableNode; - -//##ModelId=3B666BC70189 - -class CAttributeLookupTable : public CBase -/** Provides an attribute lookup table, which maintains a global set of unique IDs to be defined - for document node attributes and language tags. - - It does this by generating a unique (in the scope of the lookup table object) ID for any string - passed to it. Once a string has been seen once, any further references to it will map back to the - same ID value. - - @publishedAll - @released -*/ -{ -public: - //##ModelId=3B666BC701E3 - IMPORT_C ~CAttributeLookupTable(); - //##ModelId=3B666BC701DC - IMPORT_C static CAttributeLookupTable* CAttributeLookupTable::NewL(); - //##ModelId=3B666BC701DA - IMPORT_C const HBufC* Des2IDL( const TDesC& ); // map descriptor to ID - //##ModelId=3B666BC701D3 - IMPORT_C const HBufC* KeyExists( const TDesC& ); // check to see if the given descriptor already exists - //##ModelId=3B666BC701D2 - IMPORT_C void Reset(); // clear the table - - // debug hook - typedef enum{ - EPrint, - EPrintWholeTable - } TDebugSelectorType; - //##ModelId=3B666BC701C6 - IMPORT_C void Debug( TDebugSelectorType aSelector, TAny* aParam1, TAny* aParam2 ); - -private: - //##ModelId=3B666BC701C5 - CAttributeLookupTable(); - //##ModelId=3B666BC701BF - void ConstructL(); - //##ModelId=3B666BC701BD - CAttributeLookupTableNode* FindDes( const TDesC& ); - //##ModelId=3B666BC701BB - TUint Hash( const TDesC& ); - //##ModelId=3B666BC701A9 - CArrayPtrFlat >* iList; -}; - - -#endif // __CWAPENGINE_LUT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/bafl/sysutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/bafl/sysutil.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,210 @@ +/* +* Copyright (c) 2000-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: SysUtil API provides functions for applications to retrieve +* SW and language package versions and check whether there is +* free space on a disk drive. +* +*/ + + +#ifndef SYSUTIL_H +#define SYSUTIL_H + +#include + +/** +* Helper constant to allocate buffers for GetSWVersion, GetLangSWVersion, +* GetLangVersion. +*/ +const TInt KSysUtilVersionTextLength = 64; + +class RFs; + +/** + * SysUtil provides various utility methods for applications. + * + * SysUtil API provides functions for applications to retrieve SW and language + * package versions and check whether there is free space on a disk drive. + * + * @lib sysutil.lib + * @since S60 v2.0 + */ +class SysUtil + { + +public: + + /** + * Obtains the software version string. + * + * @since S60 v2.0 + * + * Usage example: + * @code + * TBuf version; + * if ( SysUtil::GetSWVersion( version ) == KErrNone ) + * { + * // Use the version string. + * ... + * } + * @endcode + * + * @param aValue On return, contains the software version string. + * The buffer should have space for KSysUtilVersionTextLength + * characters. + * + * @return KErrNone on success, or one of the Symbian error codes if reading + * the version string fails. + */ + IMPORT_C static TInt GetSWVersion( TDes& aValue ); + + /** + * Returns software version which the currently installed language package + * is compatible with. + * + * @since S60 v2.0 + * + * @param aValue On return, contains the version string. + * The buffer should have space for KSysUtilVersionTextLength + * characters. + * + * @return KErrNone on success, or one of the Symbian error codes if reading + * the version string fails. + */ + IMPORT_C static TInt GetLangSWVersion( TDes& aValue ); + + /** + * Obtains the version of the currently installed language package. + * + * @since S60 v2.0 + * + * @param aValue On return, contains the language package version string. + * The buffer should have space for KSysUtilVersionTextLength + * characters. + * + * @return KErrNone on success, or one of the Symbian error codes if reading + * the version string fails. + */ + IMPORT_C static TInt GetLangVersion( TDes& aValue ); + + /** + * Checks if free FFS (internal flash file system) storage space is or will + * fall below critical level. Static configuration value stored in Central + * Repository is used to determine the critical level for the FFS drive. + * + * @since S60 v2.0 + * + * @param aFs File server session. Must be given if available, e.g. from + * EIKON environment. If NULL, this method will create a + * temporary session, which causes the method to consume more + * time and system resources. + * @param aBytesToWrite Number of bytes the caller is about to write to + * FFS. If value 0 is given, this method checks + * if the current FFS space is already below critical + * level. + * + * @return ETrue if FFS space would go below critical level after writing + * aBytesToWrite more data, EFalse otherwise. + * + * @leave Leaves with one of the Symbian error codes if checking the FFS + * space fails, for instance if there is not enough free memory to + * create a temporary connection to file server. + */ + IMPORT_C static TBool FFSSpaceBelowCriticalLevelL( + RFs* aFs, + TInt aBytesToWrite = 0 ); + + + /** + * Checks if free MMC storage space is or will fall below critical + * level. Static configuration value stored in Central Repository is + * used to determine the critical level for the MMC drive. + * PathInfo API is used to determine the drive letter for the MMC drive. + * + * @since S60 v2.0 + * + * @param aFs File server session. Must be given if available, e.g. from + * EIKON environment. If NULL, this method will create a + * temporary session, which causes the method to consume more + * time and system resources. + * @param aBytesToWrite Number of bytes the caller is about to write to + * MMC. If value 0 is given, this method checks + * if the current MMC space is already below critical + * level. + * + * @return ETrue if MMC space would go below critical level after writing + * aBytesToWrite more data, EFalse otherwise. + * EFalse if the system has no MMC drive support. + * + * @leave Leaves with one of the Symbian error codes if checking the MMC + * space fails, for instance if the MMC drive contains no media or + * there is not enough free memory to create a temporary connection to + * file server. + */ + IMPORT_C static TBool MMCSpaceBelowCriticalLevelL( + RFs* aFs, + TInt aBytesToWrite = 0 ); + + /** + * Checks if free disk drive storage space is or will fall below critical + * level. Static configuration values stored in Central Repository are + * used to determine a critical level for each drive. + * + * Usage example: + * @code + * TInt dataSize = 500; + * if ( SysUtil::DiskSpaceBelowCriticalLevelL( &iFsSession, dataSize, EDriveC ) ) + * { + * // Can not write the data, there's not enough free space on disk. + * ... + * } + * else + * { + * // It's ok to actually write the data. + * ... + * } + * @endcode + * + * @since S60 v2.0 + * + * @param aFs File server session. Must be given if available, e.g. from + * EIKON environment. If NULL, this method will create a + * temporary session, which causes the method to consume more + * time and system resources. + * @param aBytesToWrite Number of bytes the caller is about to write to + * disk. If value 0 is given, this method checks + * if the current disk space is already below critical + * level. + * @param aDrive Identifies the disk drive to be checked. Numeric values + * for identifying disk drives are defined in TDriveNumber + * enumeration. + * + * @see TDriveNumber in f32file.h. + * + * @return ETrue if disk space would go below critical level after writing + * aBytesToWrite more data, EFalse otherwise. + * + * @leave Leaves with one of the Symbian error codes if checking the disk + * space fails, for instance if the drive contains no media or there + * is not enough free memory to create a temporary connection to + * file server. + */ + IMPORT_C static TBool DiskSpaceBelowCriticalLevelL( + RFs* aFs, + TInt aBytesToWrite, + TInt aDrive ); + + }; + +#endif // SYSUTIL_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/basicanimation.h --- a/epoc32/include/basicanimation.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __BASICANIMATION_H__ -#define __BASICANIMATION_H__ - -#include -#include - -class RWsSession; -class RWindow; -class CWindowGc; -class CFbsBitmap; -class CFbsBitmapDevice; -class CFbsBitGc; -class CAnimationDataProvider; -class CAnimator; -class TAnimationConfig; -class CAnimationTls; -class CAnimationTicker; -class CBasicAnimationExt; -class CCoeControl; - -/** -Implementation of CAnimation for purely client side animations. - -A basic animation accepts a data provider during construction, loads the -appropriate animator plugin, and implements the interface defined in -CAnimation. - -A basic animation must be associated with an RWindow. Redraw events will be -received by the client application whenever the animation needs to draw a new -frame, and it is the applications responsibility to call Draw() while handling -these events. It is also the client applications responsibility to handle -visibility events and place the animation on hold when it isn't visible. This -saves on CPU usage and ultimately prolongs battery life. - -@see CAnimationDataProvider -@publishedAll -@released -*/ -class CBasicAnimation : public CAnimation, public MAnimationDrawer, public MAnimationDataProviderObserver - { -private: - enum TFlags - { - EAnimationInitialised = 0x0001, - }; -public: - IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWs, RWindow& aWindow, MAnimationObserver* aObserver = 0); - IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWs, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver = 0); - IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver, const CCoeControl* aHost); - IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, const TDesC8& aDataType, MAnimationObserver* aObserver, const CCoeControl* aHost); - IMPORT_C ~CBasicAnimation(); - - IMPORT_C void Draw(CWindowGc& aGc) const; - - /** Provides an CAnimationDataProvider interface to the client application. - @return iDataProvider A CAnimationDataProvider */ - inline CAnimationDataProvider* DataProvider() { return iDataProvider; } - - /** Returns the current drawing position. - @return ipoint const Tpoint& */ - inline const TPoint& Position() const { return iPoint; } - - /** Gets the size of the smallest bounding rectangle that will be required to render the animation. - - This function is called when the animator is ready to begin animating. The animator cannot be started - until it has called this function. - @return iSize The size of the smallest bounding rectangle */ - inline const TSize& Size() const { return iSize; } - // From CAnimation: - virtual void Start(const TAnimationConfig& aConfig); - virtual void Stop(); - virtual void Pause(); - virtual void Resume(); - virtual void Hold(); - virtual void Unhold(); - virtual void SetPosition(const TPoint& aPoint); - virtual void Freeze(); - virtual void Unfreeze(); -public: - IMPORT_C void SetHostL(const CCoeControl* aHost); -protected: - CBasicAnimation(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession* aWs, RWindow* aWindow, MAnimationObserver* aObserver); - CBasicAnimation(); - CBasicAnimation(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver); - void ConstructL(const TDesC8& aDataType); - IMPORT_C virtual void CBasicAnimation_Reserved1(); - IMPORT_C virtual void CBasicAnimation_Reserved2(); - void ConstructL(const TDesC8& aDataType,const CCoeControl* aHost); -private: - CBasicAnimation(const CBasicAnimation&); // no implementation - CBasicAnimation& operator=(const CBasicAnimation&); // no implementation - // from MAnimationDataProviderObserver - virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize); - // From MAnimatorDrawer - virtual void AnimatorDraw(); - virtual void AnimatorInitialisedL(const TSize& aSize); - virtual void AnimatorResetL(); - virtual const TPtrC8 AnimatorDataType() const; - virtual CAnimationTicker& AnimatorTicker(); -private: - CBasicAnimationExt* iBasicAnimationExt; - MAnimationObserver* iObserver; - CAnimationDataProvider* iDataProvider; - CAnimationTls* iTls; - TPoint iPoint; - RWsSession* iWs; - RWindow* iWindow; - HBufC8* iDataType; - TInt iFreezeCount; - TInt iFlags; - TSize iSize; - CAnimator* iAnimator; - CFbsBitmap* iBitmap; - CFbsBitmap* iMask; - CFbsBitmapDevice* iBitmapDevice; - CFbsBitmapDevice* iMaskDevice; - CFbsBitGc* iRenderGc; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/beagle/iolines.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/beagle/iolines.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,132 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// template\template_variant\inc\iolines.h +// Variant layer header for Template Platform +// +// + + + +#ifndef __V32TEMPLATEV1_H__ +#define __V32TEMPLATEV1_H__ +#include +#include + +//---------------------------------------------------------------------------- +// Variant-specific constants: use #define if constant dependencies are not +// declared within this file (this breaks the dependency on other header files) +//---------------------------------------------------------------------------- + +// Examples of what goes in here include: +// +// - General-purpose I/O allocation such as +// #define KtVariantGpio32KHzClkOut KHtGpioPort1 +// #define KtVariantGpioRClkOut KHtGpioPort0 +// +// #define KmVariantPinDirectionIn Sleep 0 +// +// - Memory constants (type, geometry, wait states, etc) such as: +// #define KwVariantRom0Type TTemplate::ERomTypeBurst4Rom +// #define KwVariantRom0Width TTemplate::ERomWidth32 +// const TUint KwVariantRom0WaitNs = 150; +// const TUint KwVariantRom0PageNs = 30; +// const TUint KwVariantRom0RecoverNs = 55; +// +// - Specific Peripherals (Keyboard, LCD, CODECS, Serial Ports) such as +// const TUint KwVariantKeyColLshift = 7; +// #define KwVariantLcdBpp TTemplate::ELcd8BitsPerPixel +// const TUint KwVariantLcdMaxColors = 4096; +// const TUint KwVariantCodecMaxVolume = 0; +// +// - Off-chip hardware control blocks (addresses, register make-up) +// +// - Interrupts (second-level Interrupt controller base address, register make-up): +// (EXAMPLE ONLY:) +const TUint32 KHwVariantPhysBase = 0x40000000; +const TUint32 KHoVariantRegSpacing = 0x200; + +const TUint32 KHoBaseIntCont = 0x0B*KHoVariantRegSpacing; + +const TUint32 KHoIntContEnable = 0x00; // offsets from KHwVariantPhysBase+KHoBaseIntCont +const TUint32 KHoIntContPending = 0x04; +// other Variant and external blocks Base adrress offsets to KHwVariantPhysBase + + +// TO DO: (optional) +// +// Enumerate here all Variant (2nd level) interrupt sources. It could be a good idea to enumerate them in a way that +// facilitates operating on the corresponding interrupt controller registers (e.g using their value as a shift count) +// +// (EXAMPLE ONLY:) +enum TTemplateInterruptId + { + // the top-level bit is set to distinguish from first level (ASSP) Interrupts + EXIntIdA=0x80000000, + EXIntIdB=0x80000001, + // ... + EXIntIdZ=0x80000019, + + ENumXInts=0x1A + }; + +// +// TO DO: (optional) +// +// Define here some commonly used Variant (2nd level) interrupts +// +// (EXAMPLE ONLY:) +const TInt KIntIdKeyboard=EXIntIdB; + +class Variant + { + // below is a selection of functions usually implemented at this level. This do not constitute a mandatory + // set and it might not be relevant for your hardware... +public: + /** + * initialisation + */ + static void Init3(); + /** + * Returns the Linear Base address of the Variant Hardware + */ + IMPORT_C static TUint BaseLinAddress(); + /** + * When invoked, turns off all power supplies + */ + IMPORT_C static void PowerReset(); + /** + * When invoked, it marks the Serial port used for outputting debug strings as requiring re-initialisation + * As in, for example, the serial port was used by a device driver or the system is coming back from Standby + */ + IMPORT_C static void MarkDebugPortOff(); + /** + * When invoked, initialises the Serial Port hardware for the serial port used to output Debug strings + * Called by Template::DebugInit() + */ + IMPORT_C static void UartInit(); + /** + * When invoked, read the state of on-board switches + * @return A bitmask with the state of on-board switches + */ + IMPORT_C static TUint Switches(); + // other functions to access hardware not covered by specific device-drivres, which may be called from drivers + // or platform-specifc code + // ... +public: + static TUint32 iBaseAddress; + // (optional): May need to have a follower variable to store the value of a read only register initialised at boot time + // static TUint aFollower; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/beagle/mconf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/beagle/mconf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// template\template_variant\inc\mconf.h +// Template Persistent Machine Configuration +// +// + + + +#ifndef __MCONF_H__ +#define __MCONF_H__ +#include + +class TDigitizerCalibrateValues + { +public: + TInt iR11; + TInt iR12; + TInt iR21; + TInt iR22; + TInt iTx; + TInt iTy; + }; + +class TTemplateMachineConfig : public TMachineConfig + { +public: + TSoundInfoV1 iSoundInfo; + TOnOffInfoV1 iOnOffInfo; + TTimeK iMainBatteryInsertionTime; + Int64 iMainBatteryInUseMicroSeconds; + Int64 iExternalPowerInUseMicroSeconds; + Int64 iMainBatteryMilliAmpTicks; + TDigitizerCalibrateValues iCalibration; + TDigitizerCalibrateValues iCalibrationSaved; + TDigitizerCalibrateValues iCalibrationFactory; + }; + +typedef TTemplateMachineConfig TActualMachineConfig; + +inline TActualMachineConfig& TheActualMachineConfig() + {return (TActualMachineConfig&)Kern::MachineConfig();} + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/beagle/variantmediadef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/beagle/variantmediadef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// wins\inc\variantmediadef.h +// Media definitions for the Wins Variant. +// Each Media Driver requires the following definitions +// DRIVECOUNT - The total number of local drive object to be assigned to the Media Driver (1-KMaxLocalDrives) +// DRIVELIST - A list of the local drive numbers (each separated with a comma) to be assigned to the Media Driver. +// Each in the range 0 - (KMaxLocalDrives-1). Total number of drive numbers must equal the value +// of DRIVECOUNT. +// NUMMEDIA - The total number of media objects to be assigned to the Media Driver. +// DRIVENAME - A name for the drive group. +// For the complete set of media definitions +// - The total number of local drive objects assigned should not exceed KMaxLocalDrives. +// - Each Media Driver should be assigned a unique set of drive numbers - no conflicts between Media Drivers. +// - The total number of media objects assigned should not exceed KMaxLocalDrives. +// +// + +#ifndef __VARIANTMEDIADEF_H__ +#define __VARIANTMEDIADEF_H__ + +// Variant parameters for IRAM Media Driver (MEDINT.PDD) +#define IRAM_DRIVECOUNT 1 +#define IRAM_DRIVELIST 0 +#define IRAM_NUMMEDIA 1 +#define IRAM_DRIVENAME "IRam" + +// Variant parameters for LFFS Media Driver (MEDLFS.PDD) +#define LFFS_DRIVECOUNT 1 +#define LFFS_DRIVELIST 8 +#define LFFS_NUMMEDIA 1 +#define LFFS_DRIVENAME "Flash" + +// Variant parameters for the MMC Controller (EPBUSMMC.DLL) +#define MMC0_DRIVECOUNT 4 +#define MMC0_DRIVELIST 1,2,3,4 +#define MMC0_NUMMEDIA 4 +#define MMC0_DRIVENAME "MultiMediaCard0" + +// Variant parameters for NAND flash media driver (mednand.pdd) +#define NAND_DRIVECOUNT 3 +#define NAND_DRIVELIST 5,6,9 +#define NAND_NUMMEDIA 1 +#define NAND_DRIVENAME "Nand" + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/bif.h --- a/epoc32/include/bif.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __BIF_H__ -#define __BIF_H__ - -#include - -class CBifEntry; - -// -// Constants -/** 2nd UID of BIF file stores. */ -const TUid KUidBioInfoFile={0x10005233}; // unicode Uid, used as 2nd Uid of file store -/** Indicates that when opening the message no application should be launched. */ -const TUid KUidBioUseNoApp={0x00000000}; -/** Indicates that when opened the message is to be viewed by the default application. */ -const TUid KUidBioUseDefaultApp={0x100052b2}; -/** Maximum length of BIO_INFO_FILE description field. */ -const TInt KMaxBioDescription=128; -/** Maximum length of ID text field. */ -const TInt KMaxBioIdText=128; -/** Unused from v7.0. - -Previously, it specified the maximum length of a command line to BIFTOOL. */ -const TInt KMaxBioCommandLine=256; -/** Maximum length of BIO_INFO_FILE file_extension field. */ -const TInt KMaxBioFileExtension=10; - -// -// Data types -/** Buffer to hold a BIF ID identifier text field. */ -typedef TBuf TBioMsgIdText; -/** Unused from v7.0. - -Previously, it held a command line to BIFTOOL. */ -typedef TBuf TBioCommand; - -/** Identifies bearers for the BIF ID type field. - -It is the C++ equivalent of the resource enum ID_TYPE. */ -enum TBioMsgIdType - { - /** Unknown. - - Item will not be used in matching. */ - EBioMsgIdUnknown, - - /** MIME type. - - Specifies that a bearer that transports MIME messages (e.g. e-mail) should - match the MIME type against the ID text field. */ - EBioMsgIdIana, - - /** Narrow band (SMS). - - Specifies that the SMS bearer should match messages against the ID port field. */ - EBioMsgIdNbs, - - /** WAP WDP. - - Specifies that the WAP bearer should match messages against the ID port field. */ - EBioMsgIdWap, - - /** WAP secure WDP. - - Specifies that the WAP bearer should match messages against the ID port field. */ - EBioMsgIdWapSecure, - - /** WAP WSP. - - Specifies that the WAP bearer should match messages against the ID port field. */ - EBioMsgIdWsp, - - /** WAP secure WSP. - - Specifies that the WAP bearer should match messages against the ID port field. */ - EBioMsgIdWspSecure - }; - -/** Encapsulates an ID from a BIF (BIO_INFO_FILE). -@internalTechnology -@released -*/ -class TBioMsgId - { -public: - /** Identifies the bearer that should use this resource to match messages. */ - TBioMsgIdType iType; - /** Confidence level. */ - CApaDataRecognizerType::TRecognitionConfidence iConfidence; // from APMREC.H - /** Text field that can be used to match the message to this BIO type. */ - TBioMsgIdText iText; - /** Receiving port number that can be used to match the message to this BIO type. */ - TUint16 iPort; - /** Expected receiving character set of messages. */ - TUid iCharacterSet; - /** This is available for 3rd party use for BIO message type identity specific - data. */ - TInt16 iGeneralIdData; - }; - -// NOTE - this is included here cos the CBioInfoFile requires some of the enums -// defined above. -#include "bifbase.h" // for CBioInfoFile - -/** BIO information file (BIF) reader. - -Allows reading (all but the icons) from an existing BIF file. - -@publishedAll -@released -*/ -class CBioInfoFileReader : public CBioInfoFile - { -public: - // - // Construction/destruction - IMPORT_C static CBioInfoFileReader* NewLC(RFs& aFs,const TDesC& aFileName,TUid aMsgTypeUid=KNullUid); - IMPORT_C static CBioInfoFileReader* NewL(RFs& aFs,const TDesC& aFileName,TUid aMsgTypeUid=KNullUid); - IMPORT_C virtual ~CBioInfoFileReader(); - - // - // Data getters - IMPORT_C TUid MessageTypeUid() const; - IMPORT_C const TPtrC MessageParserName() const; - IMPORT_C TUid MessageAppUid() const; - IMPORT_C TUid MessageAppCtrlUid() const; - IMPORT_C const TPtrC MessageAppCtrlName() const; - IMPORT_C TInt16 GeneralData1() const; - IMPORT_C TInt16 GeneralData2() const; - IMPORT_C TInt16 GeneralData3() const; - IMPORT_C const TPtrC Description() const; - IMPORT_C const TPtrC FileExtension() const; - - IMPORT_C const TPtrC IconsFilename() const; - IMPORT_C const CArrayFixFlat* ZoomLevelsLC() const; - IMPORT_C TInt ZoomLevelsCount() const; - - IMPORT_C const CArrayFixFlat* IdsLC() const; - - IMPORT_C const CBifEntry& BifEntry() const; - -private: - CBioInfoFileReader(RFs& aFs); - void ConstructL(const TDesC& aFileName, TUid aMsgTypeUid); - -private: - void InternalizeL(RReadStream& aStream); - void LoadResourceL(TUid aMsgTypeUid); - void LoadDataL(TUid aMsgTypeUid); - TBool IsResFileL() const; - TBool IsDatFile(const TUidType& aUidType) const; - // - HBufC* iFileName; - CBifEntry* iEntry; - }; - -#endif // __BIF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/biodb.h --- a/epoc32/include/biodb.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,221 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __BIODB_H__ -#define __BIODB_H__ - -#include // the bif reader -#include - -class CBifEntry; - -/** UID of the BIODB.DLL. */ -const TUid KUidBioDBDll ={0x10005542}; - -/** Buffer to hold BIF identification text. */ -typedef TBuf TBioMsgIdText; - -/** BIO information file (BIF) database. - -This class reads the installed BIF files and allows information from them -to be easily extracted. - -@see BIO_INFO_FILE -@publishedAll -@released -*/ -class CBIODatabase : public CBase - { -public: - /** Search methods. */ - enum TSearchList - { - /** Begin search from the start. */ - EStart, - /** Begin search from the last index position. */ - ENext - }; -public: - IMPORT_C static CBIODatabase* NewLC(RFs& afileSystem); - IMPORT_C static CBIODatabase* NewL(RFs& afileSystem); - IMPORT_C ~CBIODatabase(); - -public: - // BIF files contain all the information that needs to be registered - // for each BIO Message type - - // Completely refresh the database will all the BIF Files in the - // default directory - IMPORT_C void AddAllBifsL(RFs& afileSystem); - - // Add one bifFile using the file name, then using Neil's handy - // class to read it - // This will add the Parser - IMPORT_C void AddBifL(CBioInfoFileReader* aBifReader); - IMPORT_C void RemoveBifL(TUid aMsgID); - IMPORT_C void RemoveBifL(TInt aIndex); - - // BIO Messages are determined to of a BIO type if we have the BIO - // Parser identified by a WAP/NBS port, IANA MIME type or a Pattern - IMPORT_C TInt BIOCount(); - - // Get the BioEntry at this index - // Return Index if found, NULL if not - IMPORT_C const CArrayFix* BIOEntryLC(TInt index); - - - // Get the whole bif file class - IMPORT_C const CBioInfoFileReader& BifReader(TInt aIndex) const; - - // Get the BIO Entry based on what type it is, pos indicates where to start looking - // after, and will get updated to current pos - IMPORT_C const CArrayFix* BioEntryByTypeLC( - TSearchList aSearchType, - TBioMsgIdType portType, - TInt& rIndex); - - IMPORT_C void GetBioIndexWithMsgIDL(TUid aMsgID, TInt& rIndex); - - // Get the BioMessageID for the Index - IMPORT_C void GetBioMsgID(TInt aIndex, TUid& rMsgID); - - // Get the BioParserName for the Index - IMPORT_C const TPtrC GetBioParserName(TInt aIndex); - - // Get the BioParserName for the BioMessageID - IMPORT_C const TPtrC GetBioParserNameL(TUid aMsgID); - - // Get the ControlID for the Index - IMPORT_C void GetBioControlID(TInt aIndex, TUid& rControlID); - - // Get the ControlID for the BioMessageID - IMPORT_C void GetBioControlIDL(TUid aMsgID, TUid& rControlID); - - IMPORT_C const TPtrC GetBioControlName(TInt aIndex); - IMPORT_C const TPtrC GetBioControlNameL(TUid aMsgID); - - // Get the String Extension for the BioMessageID - IMPORT_C const TPtrC GetFileExtL(TUid aMsgID); - - IMPORT_C void GetDefaultSendBearerL(TUid aBioUID, TBioMsgId& rBioMsgIdentifier); - IMPORT_C void GetDefaultSendBearerTypeL(TUid aBioUID, TBioMsgIdType& rPortType); - IMPORT_C void GetDefaultSendBearerByTypeL(TUid aBioUID, TBioMsgIdType aPortType, TBioMsgId& rBioMsgIdentifier); - - // BIO Messages are determined to of a BIO type if we have the BIO - // Parser identified by a WAP/NBS port, IANA MIME type or a Pattern - // Return an Index - - // Get the Port# or Identifying string for sending - IMPORT_C void GetPortNumberL(TUid aMsgID, TBioMsgIdType aPortType, TInt& aPortNumber); - IMPORT_C void GetIdentifierTextL(TUid aMsgID, TBioMsgIdType aPortType, TBioMsgIdText& aText); - - // Test to see if this is a BioMessage - // Pass in the type ... if its NBS or IANA pass in the string pattern - // if its WAP or SecureWap, pass in the port number - // return kErrNone if success, kErrNotFound if it fails - IMPORT_C TInt IsBioMessageL(TBioMsgIdType aPortType, const TDesC& aPattern, TUint16 aPort, TUid& rBioMsgUID); - - IMPORT_C TInt IsBioMessageL(TBioMsgId bioMessageData, TUid& rBioMsgUID); - -private: - CBIODatabase(); - void ConstructL(RFs& afileSystem); - -private: - //Utilities - void GetTransportIDL(TInt aIndex, TBioMsgIdType aPortType, TBioMsgId& aBioMsgID); - TBool IsLanguageFileL(const TDesC& aFileName, TInt& aExtLength) const; - // If Persistence is required... - // void InternalizeL(RReadStream& aStream); - // void ExternalizeL(RWriteStream& aStream) const; - -private: - CArrayPtrFlat* iBifReaders; - -}; - -/** Callback interface implemented by classes to receive notifications of BIF files -changes from CBifChangeObserver. - -@publishedPartner -@released -*/ -class MBifChangeObserver - { -public: - /** BIF change events. */ - enum TBifChangeEvent - { - /** Unknown change. */ - EBifChangeUnknown = 0, - /** BIF added. */ - EBifAdded, - /** BIF deleted. */ - EBifDeleted, - /** BIF changed. */ - EBifChanged - }; - -public: - /** Called when a BIF change occurs. - - @param aEvent Change event type - @param aBioID BIO message type of changed BIF */ - virtual void HandleBifChangeL(TBifChangeEvent aEvent, TUid aBioID)=0; - }; - -/** Active object that watches for changes made to the installed BIF files. - -@publishedPartner -@released -*/ -class CBifChangeObserver : public CActive - { -public: - IMPORT_C static CBifChangeObserver* NewL(MBifChangeObserver& aObserver, RFs& aFs); - IMPORT_C void Start(); - ~CBifChangeObserver(); - - static void CleanupBifArray(TAny* aBifArray); - -private: - // from CActive - virtual void RunL(); - virtual void DoCancel(); - -private: - CBifChangeObserver(MBifChangeObserver& aObserver, RFs& aFs); - void ConstructL(); - - void NotifyObserverL(); - void WaitForFileNotification(); - void DoRunL(); - void CopyEntriesL(const CDir& aDir, CArrayFixFlat& aEntries); - TBool CompareReaders(const CBioInfoFileReader& aReader1, const CBioInfoFileReader& aReader2) const; - - TInt FindEntry(const CBifEntry& aBifEntry, const RPointerArray& aEntries, TInt& aIndex) const; - -private: - MBifChangeObserver& iChangeObserver; - RFs& iFs; - - RPointerArray iEntries; - - CBIODatabase* iBioDB; - RTimer iTimer; - TInt iRetryCount; - }; - -#endif // __BIODB_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/biouids.h --- a/epoc32/include/biouids.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// BIOUUIDS.H -// Contains the TUid defines for the Bio Messaging -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#if !defined(__BIOUTILS_H__) -#define __BIOUTILS_H__ - -//forward declarations -/** -* @publishedAll -* @released -*/ -class TUid; -/** -*UID of the Smart Message Parser DLL. -* @publishedPartner -* @released -*/ -const TUid KUidSmartMessageParserDll = { 0x10001251}; -/** -* BIO specific error/panic code base. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageBaseError = -505; -/** -* BIO message not found error. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageNotFound = KBIOMessageBaseError; -/** -* BIO server MTM already active error. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageSvrMtmNotInactive = KBIOMessageBaseError-1; -/** -* No BIO parser error. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageNoParserCreated = KBIOMessageBaseError-2; -/** -* BIO parser in use error. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageParserDllStillInUse = KBIOMessageBaseError-3; -/** -* BIO operation already active error. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageOperationNotInactive = KBIOMessageBaseError-4; -/** -* BIO server MTM operation not supported. -* @publishedPartner -* @released -*/ -const TInt KBIOMessageSvrNotSupported = KBIOMessageBaseError-5; -/** -* Unused. -* @internalComponent -* @removed -*/ -const TUid KUidMsvNbsEditor={0x10001264}; - -// New BIO Messaging TUids -/** -* Stream ID used for storing parsed BIO data. -* @internalAll -* @released -*/ -const TUid KUidMsvBIODataStream = {0x10005268}; // stream used for storing parsed data - -// BIO Mtm components - -/** -* BIO message type UID. -* @publishedAll -* @released -*/ -const TUid KUidBIOMessageTypeMtm = {0x10001262}; -/** -* BIO client MTM UID. -* @internalTechnology -* @released -*/ -const TUid KUidBIOMessageClientMtmDll = {0x1000125A}; //previously NBSC, now BIOC -/** -* BIO server MTM UID. -* @internalTechnology -* @released -*/ -const TUid KUidBIOMessageServerMtmDll = {0x1000125C}; //previously NBSS, now BIOS -/** -* BIO UI MTM UID. -* @internalTechnology -* @released -*/ -const TUid KUidBIOMessageUiLayerMtmDll = {0x10001265}; //previously NBUM, now BIUM -/** -* BIO message viewer UID. -* @internalTechnology -* @released -*/ -const TUid KUidBIOMessageViewerApp = {0x10001264}; //previously NBED,now BIED - -#endif *__BIOUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/bmpancli.h --- a/epoc32/include/bmpancli.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#if !defined(__BMPANCLI_H__) -#define __BMPANCLI_H__ - -#include -#include -#include - -// -// CFrameData -// - - -/** -Encapsulates the information required for one frame of an animation. - -Each animation frame includes a bitmap that is displayed in a specified position -for a specified length of time. You can optionally include a mask that either -hides part of the bitmap, or makes part of the bitmap transparent so that the -background can be seen. - -You will probably need to define several frames for a complete animation. -When you have defined the frames you require, use CBitmapAnimClientData to -construct the animation itself. - -@publishedAll -@released -*/ -class CBitmapFrameData : public CBase - { -public: - IMPORT_C ~CBitmapFrameData(); - IMPORT_C static CBitmapFrameData* NewL(); - IMPORT_C static CBitmapFrameData* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask=NULL); - IMPORT_C static CBitmapFrameData* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aIntervalInMilliSeconds, TPoint aPosition); -// - IMPORT_C void SetBitmap(CFbsBitmap* aBitmap); - IMPORT_C void SetMask(CFbsBitmap* aMask); - IMPORT_C void SetPosition(TPoint aPosition); - IMPORT_C void SetInterval(TInt aIntervalInMilliSeconds); - IMPORT_C void SetBitmapsOwnedExternally(TBool aOwnedExternally); -// - IMPORT_C CFbsBitmap* Bitmap() const; - IMPORT_C CFbsBitmap* Mask() const; - IMPORT_C TInt IntervalInMilliSeconds() const; - IMPORT_C TPoint Position() const; - IMPORT_C TBool BitmapsOwnedExternally() const; -private: - CBitmapFrameData(); -private: - CFbsBitmap* iBitmap; - CFbsBitmap* iMaskBitmap; - TBool iBitmapsOwnedExternally; - TInt iIntervalInMilliSeconds; - TPoint iPosition; - }; - - -// -// CBitmapAnimClientData -// - - -/** -Encapsulates one or more animation frames into an entire animation. - -In addition to specifying the frames you wish to include in your animation, -you can also specify: - -- whether the animation will flash - -- whether the animation is played once, or continuously - -- the background frame that is drawn to clear each frame in the animation - -You can also specify a default frame interval that is used for all frames -in an animation. If the interval is already set for any of the individual -frames, that takes precedence. - -When you have defined your animation, use RBitmapAnim to play the animation. - -@publishedAll -@released -*/ -class CBitmapAnimClientData : public CBase - { -public: - /** Animation play mode flags. - - The animation can be played in any of the ways described below. */ - enum TPlayMode - { - /** Plays the animation once, from the first frame to the last one. */ - EPlay = 0x00, - /** Plays the animation from the first frame to the last one continuously. */ - ECycle = 0x01, - /** Plays the animation from the first frame to the last one then from the last - frame to the first continuously. */ - EBounce = 0x02 - }; -public: - IMPORT_C static CBitmapAnimClientData* NewL(); - IMPORT_C ~CBitmapAnimClientData(); -// - IMPORT_C void AppendFrameL(CBitmapFrameData* aFrame); - IMPORT_C void ResetFrameArray(); - IMPORT_C void SetBackgroundFrame(CBitmapFrameData* aBackgroundFrame); - IMPORT_C void SetFlash(TBool aFlash); - IMPORT_C void SetFrameInterval(TInt aFrameIntervalInMilliSeconds); - IMPORT_C void SetPlayMode(TPlayMode aPlayMode); -// - IMPORT_C CBitmapFrameData* BackgroundFrame() const; - IMPORT_C TBool Flash() const; - IMPORT_C const CArrayPtrFlat& FrameArray() const; - IMPORT_C TInt FrameIntervalInMilliSeconds() const; - IMPORT_C TPlayMode PlayMode() const; -// - IMPORT_C TInt DurationInMilliSeconds() const; - IMPORT_C TSize Size() const; -private: - CBitmapAnimClientData(); -private: - TBool iFlash; - TPlayMode iPlayMode; - TInt iFrameIntervalInMilliSeconds; - CArrayPtrFlat iFrameArray; - CBitmapFrameData* iBackgroundFrame; - }; - - - -/** -Enables a client to package animation data, and send it to the window server -for display. - -Before using RBitmapAnim, a client must instantiate an RAnimDll. This provides -a reference to the window server DLL that runs the animation specified through -the RBitmapAnim() object. To complete construction, call ConstructL(). - -@publishedAll -@released -*/ -class RBitmapAnim : public RAnim - { -public: - IMPORT_C RBitmapAnim(RAnimDll& aAnimDll); - IMPORT_C void ConstructL(const RWindowBase& aWindow); - IMPORT_C void DisplayFrameL(TInt aIndex); - IMPORT_C void SetBitmapAnimDataL(const CBitmapAnimClientData& aBitmapAnimData); - IMPORT_C void SetFlashL(TBool aFlash); - IMPORT_C void SetFrameIntervalL(TInt aFrameIntervalInMilliSeconds); - IMPORT_C void SetPlayModeL(CBitmapAnimClientData::TPlayMode aPlayMode); - IMPORT_C void StartL(); - IMPORT_C void StopL(); - IMPORT_C void SetNumberOfCyclesL(TInt aNumberOfCycles); - IMPORT_C void SetPositionL(TPoint aPosition); -private: - void SetAttributesL(const CBitmapAnimClientData& aBitmapAnimData); - void SetBackgroundFrameL(const CBitmapFrameData& aFrame); - void SetFrameArrayL(const CArrayPtrFlat& aFrameArray); - void SetFrameL(const CBitmapFrameData& aFrame, TInt aOpCode); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/bmpanconsts.h --- a/epoc32/include/bmpanconsts.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#if !defined(__BMPANCONSTS_H__) -#define __BMPANCONSTS_H__ - -/** -TBitmapAnimCommand - -@internalComponent -*/ -enum TBitmapAnimCommand - { - EBitmapAnimCommandSetBackgroundFrame, - EBitmapAnimCommandSetDataFrame, - EBitmapAnimCommandSetFlash, - EBitmapAnimCommandSetFrameIndex, - EBitmapAnimCommandSetFrameInterval, - EBitmapAnimCommandSetNumberOfCycles, - EBitmapAnimCommandSetPlayMode, - EBitmapAnimCommandSetPosition, - EBitmapAnimCommandStartAnimation, - EBitmapAnimCommandStopAnimation, - EBitmapAnimCommandStartAnimationAndKeepLastFrame, - EBitmapAnimCommandResetFrameArray, - EBitmapAnimCommandClearDataFrames - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/bmpansrv.h --- a/epoc32/include/bmpansrv.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,328 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @internalComponent -*/ - -#if !defined(__BMPANSRV_H__) -#define __BMPANSRV_H__ - -#include -#include -#include -#include "bmpancli.h" -#include - - - -enum TBitmapAnimServerPanic - { - EAnimationServerPanicIndexOutOfRange, - EAnimationServerPanicFrameIntervalNegative - }; - -// For packaging the new animation position offset -struct SBitmapAnimNewPosition - { - TPoint iPosition; - }; - -// For packaging the new animation index -struct SBitmapAnimIndexFrame - { - TInt iIndex; - }; - -// For packaging the number of cycles -struct SBitmapAnimNumberOfCycles - { - TInt iCycles; - }; - - - -/** - TFrameData - - This class is used for packaging the data of one frame. -*/ -class TFrameData - { -public: - TInt iBitmapHandle; - TInt iMaskBitmapHandle; - TPoint iPosition; - TInt iIntervalInMilliSeconds; // the time is expressed in ms - }; - - - -/** - TBmpAnimAttributes - - This class is used for packaging the attriutes of the animation. -*/ -class TBmpAnimAttributes - { -public: - TBool iFlash; - TInt iFrameIntervalInMilliSeconds; - CBitmapAnimClientData::TPlayMode iPlayMode; - }; - - - - -/** - class MBitmapAnimTimerObserver -*/ -class MBitmapAnimTimerObserver - { -public: - virtual void DisplayNextFrameL()=0; - }; - - - -/** - class CBitmapAnimTimer - - This class is used to determine when to swap the current frame with the next one. -*/ -class CBitmapAnimTimer : public CTimer - { -public: - ~CBitmapAnimTimer(); - static CBitmapAnimTimer* NewL(MBitmapAnimTimerObserver* aObserver); - void RunL(); -private: - CBitmapAnimTimer(MBitmapAnimTimerObserver* aObserver); - void ConstructL(); -private: - MBitmapAnimTimerObserver* iAnimate; - }; - - - -/** - class MBitmapAnimFlashTimerObserver -*/ - -class MBitmapAnimFlashTimerObserver - { -public: - virtual void FlashFrame(TBool aFlash)=0; - }; - - - -/** - class CBitmapAnimFlashTimer -*/ - -class CBitmapAnimFlashTimer : public CTimer - { -public: - ~CBitmapAnimFlashTimer(); - static CBitmapAnimFlashTimer* NewL(MBitmapAnimFlashTimerObserver* aObserver); - void DoCancel(); - void RunL(); -private: - CBitmapAnimFlashTimer(MBitmapAnimFlashTimerObserver* aObserver); - void ConstructL(); -private: - MBitmapAnimFlashTimerObserver* iAnimate; - TBool iFlash; - }; - - - -/** - class CBitmapAnimFrameData - - This class encapsulates the information of one frame. -*/ - -class CBitmapAnimFrameData : public CBase - { -public: - static CBitmapAnimFrameData* NewL(); - static CBitmapAnimFrameData* NewLC(); - ~CBitmapAnimFrameData(); - void FillFrameDataL(const TFrameData& aFrameDataArg); - void CheckAndCreateBitmapsL(); - -private: - CBitmapAnimFrameData(); - void InitialiseMembers(); - -public: - CFbsBitmap* iBitmap; - CFbsBitmap* iMaskBitmap; - TPoint iPosition; - TTimeIntervalMicroSeconds32 iInterval; - }; - - - -/** - class CBitmapAnim - - This class encapsulates the enire animation: attributes and frames. -*/ - -class CBitmapAnim : public CFreeTimerWindowAnim, MBitmapAnimTimerObserver//, MBitmapAnimFlashTimerObserver - { -public: - ~CBitmapAnim(); - static CBitmapAnim* NewL(); -private: - CBitmapAnim(); -private: - enum TAnimateFlags - { -// State - ERunning = 0x0001, - EFlashing = 0x0002, - EFrozen = 0x0004, -// Play mode - EPlayModeCycle = 0x0010, - EPlayModeBounce = 0x0020, - EPlayForwards = 0x0040, - EPlayBackwards = 0x0080, -// General - EFlash = 0x0100, - EBackgroundBitmapProvided = 0x0200, - EWindowContentsInitialized = 0x0400, - ENoBitmapWindowRestoring = 0x0800, - EChangedBackgroundFramePending = 0x1000, - EBackgroundShouldIncludeWindowContents = 0x2000, - EDisplayLastFrameWhenFinished = 0x4000, - EBackgroundMaskProvided = 0x8000 - }; - -private: //Pure Virtual function from CAnim - virtual void ConstructL(TAny *aArgs, TBool aHasFocus); - virtual void Command(TInt aOpcode, TAny* aArgs); - virtual TInt CommandReplyL(TInt aOpcode, TAny *aArgs); - virtual void Animate(TDateTime* aDateTime); - virtual void Redraw(); - virtual void FocusChanged(TBool aState); -private: //Pure Virtual function from MEventHandler - virtual TBool OfferRawEvent(const TRawEvent &aRawEvent); -private: //Pure Virtual function from MBitmapAnimTimerObserver - virtual void DisplayNextFrameL(); -private: //Pure Virtual function from MBitmapAnimFlashTimerObserver - virtual void FlashFrame(TBool aFlash); -private: - void AppendFrameL(const TFrameData& aFrameData); - inline TInt Count() const; - void DisplayFrame(TInt aPreviousIndex=-1); - void DrawBitmap(TInt aPreviousIndex=-1, TBool aRedraw=EFalse); - inline TBool IsFrameDisplayable() const; - inline TBool IsRunning() const; - inline TBool IsFrozen() const; - void ResetAnimation(); - void ClearFrame(TInt aIndex); - void ClearFrameNow(TInt aIndex); - void RenderFrameBackground(TInt aIndex); - TRect CalcFrameRect(TInt aIndex); - void SetBackgroundFrameL(TFrameData aFrameDataArg); - void SetFlash(TBmpAnimAttributes aFlash); - void SetFrameInterval(TBmpAnimAttributes aFrameInterval); - TInt SetIndexFrame(SBitmapAnimIndexFrame aIndexFrame); - void SetNumberOfCycles(SBitmapAnimNumberOfCycles aNumberOfCycles); - void SetPlayMode(TBmpAnimAttributes aPlayMode); - void SetPosition(SBitmapAnimNewPosition aNewPosition); - void StartAnimationL(); - void StopAnimation(); - void StoreWindowContentsToBackgroundBitmapL(const TRegion* aRegion); - void UpdateCurrentIndex(); - inline TRect WindowRect() const; - CFbsBitmap* CreateRestoringBitmapL(TPoint& aPosition, TInt aPreviousIndex); - void UpdateBackgroundBitmapIfNeeded(const TRegion* aRegion, TRect aBackgroundBitmapScreenRect); - static TBool FrameNeedsRedrawing(const TRegion* aRedrawRegion, TRect aFrameScreenRect); - void ResetFrameArray(); - void ClearFrameData(); - TBool CanDrawNextFrameWithoutErasingPreviousFrameL(TInt aPreviousIndex); - TBool CompareBitmapsL(CFbsBitmap* aBmp1, CFbsBitmap* aBmp2); - -private: - RPointerArray iBitmapAnimFrameDataArray; - CBitmapAnimTimer* iAnimTimer; - CBitmapAnimFlashTimer* iFlashTimer; - CBitmapAnimFrameData* iBackgroundFrame; - CFbsBitmap* iBackgroundBitmap; - CFbsBitmapDevice* iBackgroundbitmapDevice; - CFbsBitGc* iBackgroundbitmapGc; - -// - TInt iDummy; - TInt iFlags; - TInt iIndex; - TInt iNumberOfCycles; - TPoint iPosition; - TInt iWindowConfig; - TTimeIntervalMicroSeconds32 iFrameInterval; -// - CFbsBitGc* iRestoringGc; - }; - -// Returns the number of frames store in the frame array. -inline TInt CBitmapAnim::Count() const - { return iBitmapAnimFrameDataArray.Count(); } - -// Returns ETrue every time the index frame is valid, otherwise it returns EFalse. -inline TBool CBitmapAnim::IsFrameDisplayable() const - { return ( (iIndex >= 0) && iBitmapAnimFrameDataArray[iIndex]->iBitmap ); } - -// Returns ETrue if the animation is running, otherwise it returns EFalse. -inline TBool CBitmapAnim::IsRunning() const - { return iFlags&ERunning; } - -//Returns ETrue if the animation is frozen (app is not in the foreground) -inline TBool CBitmapAnim::IsFrozen() const -{ return iFlags&EFrozen; } - -// Returns the available window rect. -inline TRect CBitmapAnim::WindowRect() const - { return TRect(TPoint(0, 0), iWindowFunctions->WindowSize()); } - - - - -/** - CBitmapAnimDll class -*/ - -class CBitmapAnimDll : public CAnimDll - { -public: - CBitmapAnimDll(); - virtual CAnim* CreateInstanceL(TInt aType); - }; - - -/** - global functions -*/ -GLREF_C void Panic(TBitmapAnimServerPanic aReason); - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/bsp.h --- a/epoc32/include/bsp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// BSP.H (Base Script Parser) -// Abstract class for different Parsers. -// -// - - -#if !defined(__BSP_H__) -#define __BSP_H__ - -#if !defined(__MTCLREG_H__) -#include -#endif - -#if !defined(__MTCLBASE_H__) -#include -#endif - -#include -#if !defined(__S32STRM_H__) -#include -#endif - -#include -// CRichText etc. includes -#include -#include - -#include - - - -// Symbols: -/** Space character. */ -#define KCharSpace ' ' -/** Tab character. */ -#define KCharTab '\t' -/** Line feed character. */ -#define KCharLineFeed '\n' - - -// Define some generic error codes: -/** BIO error code base. */ -const TInt KBspBaseError = (-500); - -/** Invalid BIO message error code. */ -const TInt KBspInvalidMessage = (KBspBaseError); -/** Invalid smart message token error code. */ -const TInt KBspSmartMessageInvalidToken = (KBspBaseError-1); -/** No smart message parser defined error code. */ -const TInt KBspSmartMessageNoParserDefined = (KBspBaseError-2); - -// Parsed field class for use by parsers. -class CParsedField : public CBase -/** Represents a single token-value pair for a given field in a BIO/smart message -grammar. -@publishedAll -@released -*/ -{ -public: - IMPORT_C CParsedField(); - IMPORT_C ~CParsedField(); - - IMPORT_C TPtrC FieldName() const; - IMPORT_C void SetFieldNameL( const TDesC& aFieldName); - IMPORT_C TPtrC FieldValue() const; - IMPORT_C void SetFieldValueL( const TDesC& aFieldValue); - IMPORT_C TBool MandatoryField() const; - IMPORT_C void SetMandatoryField(TBool aMandatoryField); - - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; -private: - void Reset(); -private: - HBufC* iFieldName; - HBufC* iFieldValue; - TBool iMandatoryField; -}; - -// Forward declarations: -class CMsvServerEntry; -class CMsvEntry; -class CRegisteredParserDll; -class RMsvReadStream; -class RMsvWriteStream; -class CMsvStore; -class CSmsMessage; - - - -/** Base class for BIO message parsers V2. - -Concrete derived classes are implemented in parser DLL's to parse particular -types of BIO message. - -On receiving an appropriate command (see TBioOperation), the BIO server MTM -loads the appropriate parser and passes the message body to it for interpretation. -In fact, the parser interface expects the parser to divide its operation into -two stages: - -1. parsing: which involves extracting information from the raw message body and -storing it in a structured format. The parsing stage can also alter the message -body, and create files in the directory associated with the message (e.g. -parsing a ring tones message will generate a ring tone file). - -2. processing: which involves using the extracted information to achieve the -purpose of the BIO message (e.g. setting some phone configuration setttings). - -This separation allows, for example, a UI to display the parsed information -to the user for confirmation, before it is acted upon. For some parsers, however, -this two stage division is not sensible, in which case they implement only -the first. - -The base class provides a pointer iSettings to reference the raw message data, -and an array of token-value pairs, iParsedFieldArray, for storing parsed information -(if this is appropriate). -@publishedAll -@released -*/ -class CBaseScriptParser2: public CActive - { -public: - IMPORT_C CBaseScriptParser2(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs); - IMPORT_C ~CBaseScriptParser2(); - - /** Called by the BIO server MTM to asynchronously parse message body data. - - When parsing is complete, the function should indicate this by setting the - message's index field iMtmData3 to 1. - - The function should leave if the buffer cannot be parsed successfully. - - @param aStatus Asynchronous status word - @param aSms Buffer to parse */ - virtual void ParseL(TRequestStatus& aStatus, const TDesC& aSms)=0; //parses sms data into CParsedField - /** Called by the BIO server MTM to asynchronously process the parsed data. - - The function takes appropriate parser-specific action on the results of a - previous call to ParseL(). - - When processing is complete, the function should indicate this by setting - the message's index field iMtmData3 to 2. - - The function should leave if processing is not successful. - - @param aStatus Asynchronous status word */ - virtual void ProcessL(TRequestStatus& aStatus)=0; //stores parsed data into streams and data base - - IMPORT_C TUid ParserUid(); - IMPORT_C void RestoreL(CMsvStore& aMessageStore); - IMPORT_C void StoreL(CMsvStore& aMsvStore) const; - IMPORT_C void RestoreL(const TFileName& aFileName); - IMPORT_C void StoreL(const TFileName& aFileName) const; - IMPORT_C void ResetL(); - -protected: -// Parsing: - IMPORT_C void UnfoldMessageL(); - -// Streaming operations: - void InternalizeL(RMsvReadStream& aStream); - void ExternalizeL(RMsvWriteStream& aStream) const; - -protected: - /** Object that loaded the parser. It contains a reference counter of the use of - the parser. */ - CRegisteredParserDll& iRegisteredParserDll; - /** The message entry the parser should parse. */ - CMsvEntry& iEntry; - /** Connected file server handle. */ - RFs& iFs; - - /** Lexer intended for Smart Message use. - - This is not used by the base class. */ - TLex iSms; - /** Array of token-value pairs. - - Derived classes can use this for storing parsed information (if this is appropriate). */ - CArrayPtrSeg* iParsedFieldArray; - - /** Flag intended for Smart Message use. - - This is not used by the base class. */ - TBool iSmsParsed; - /** ID of iEntry. */ - TMsvId iEntryId; - - /** Pointer to message data. - - This is not set by the base class. */ - HBufC* iSettings; - /** Pointer to SMS data (intended for Smart Message use). - - This is not set by the base class. */ - HBufC* iSmsBuf; // Local copy of buffer passed to ParseL() - /** Temporary pointer used by RestoreL(). */ - HBufC8* iReadBuffer; // used to restore data from file - }; - - -/** BIO data location flag values. - -@see TMsvBIOEntry */ -enum TMsvBIODataLocation - { - /** Unknown. */ - EUnknown, - /** Parser wrote data into the body text. */ - EBodyText, // parser wrote data back into richText - /** Parser wrote data into the parsed fields data stream. */ - EBIODataStream, // parser wrote data into KUIDMsvBioStream - /** Parser wrote data into an attachment file. */ - EFile // parser wrote data into attachment file - }; - - -/** Bearer Independent Object entry. -Specialises the TMsvEntry message entry class to store additional BIO message-specific -information. -@internalTechnology -@released -*/ -class TMsvBIOEntry : public TMsvEntry - { -public: - /** Constructor. */ - TMsvBIOEntry() : TMsvEntry() {}; - void SetBIOParserUid(const TUid aId); - const TUid BIOParserUid() const; - void SetLocationOfData(const TMsvBIODataLocation aLocation); - const TMsvBIODataLocation LocationOfData() const; - -private: - TMsvBIODataLocation iLocationOfData; - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/btmsgtypeuid.h --- a/epoc32/include/btmsgtypeuid.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// $Workfile: btmsgtypeuid.h $ -// $Author: Stevep $ -// $Revision: 8 $ -// $Date: 17/12/01 12:02 $ -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#if !defined (__BTMSGTYPEUID_H__) -#define __BTMSGTYPEUID_H__ - -const TInt32 KUidMsgTypeBtTInt32 = 0x10009ED5; -const TUid KUidMsgTypeBt = {KUidMsgTypeBtTInt32}; -const TInt32 KUidBtTechnologyGroup = 0x10009ED6; //used for BtMtm registration details ("\\system\\mtm\\IrMtm.dat") - -#endif // __BTMSGTYPEUID_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cacheman.h --- a/epoc32/include/cacheman.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__CACHEMAN_H__) -#define __CACHEMAN_H__ - -#include -#include -#include - -_LIT(KMiutWildCard, "*.*"); - -class CImFinder : public CMsgActive -/** -@internalComponent -@released -*/ - { -public: - IMPORT_C void FindFirstL(TMsvId aRootEntry, TRequestStatus &aStatus); - IMPORT_C ~CImFinder(); - IMPORT_C virtual void FindNextL(TRequestStatus &aStatus); - void FindFirstL(const CMsvEntrySelection& aInitialSelection, TRequestStatus &aStatus); - - class CImEntryStack : public CBase - { - public: - static CImEntryStack* NewL(); - ~CImEntryStack(); - inline void PushL(TMsvId aId); - inline TMsvId PopL(); - inline TBool Empty() const; - inline void Reset(); - - private: - void ConstructL(); - - CMsvEntrySelection* iFolders; - }; - -protected: - void ConstructL(); - CImFinder(CMsvEntry& aEntry); - -private: - void DoRunL(); - - virtual void AddChildEntriesL() = 0; - virtual TBool IsRequiredEntryType(TUid aEntryType) const = 0; - -protected: - CImEntryStack* iEntryStack; - CMsvEntry& iCurrentEntry; - -private: - enum TImmfState - { - EImmfEntryFound, - EImmfFindingEntry, - EImmfNothingFound - }; - - TImmfState iState; - }; - - -class CImMessageFinder : public CImFinder -/** -@internalComponent -@released -*/ - { -public: - IMPORT_C static CImMessageFinder* NewL(CMsvEntry& aEntry); - IMPORT_C static CImMessageFinder* NewLC(CMsvEntry& aEntry); - -protected: - virtual void AddChildEntriesL(); - virtual TBool IsRequiredEntryType(TUid aEntryType) const; - - CImMessageFinder(CMsvEntry& aEntry); - }; - - -class CImEntryFinder : public CImFinder -/** -@internalComponent -@released -*/ - { -public: - IMPORT_C static CImEntryFinder* NewL(CMsvEntry& aEntry); - IMPORT_C static CImEntryFinder* NewLC(CMsvEntry& aEntry); - -protected: - virtual void AddChildEntriesL(); - virtual TBool IsRequiredEntryType(TUid aEntryType) const; - - CImEntryFinder(CMsvEntry& aEntry); - }; - - -class CImMessageCounter : public CImFinder -/** -@internalComponent -@released -*/ - { -public: - IMPORT_C static CImMessageCounter* NewL(CMsvEntry& aEntry); - IMPORT_C static CImMessageCounter* NewLC(CMsvEntry& aEntry); - IMPORT_C TInt Count(); - -protected: - virtual void AddChildEntriesL(); - virtual TBool IsRequiredEntryType(TUid aEntryType) const; - - CImMessageCounter(CMsvEntry& aEntry); - -private: - TInt iCount; - }; - - -class CImPruneMessage : public CMsgActive -/** Deletes the body text and attachment data from an individually specified message. - -Example uses of this class are: - -1. to cleanup after a populating operation has failed - -2. to remove body text and attachment data from remote messages, while preserving -the message structure -@publishedPartner -@released -*/ - { -public: - IMPORT_C static CImPruneMessage* NewL(CMsvEntry& aEntry, RFs& aFs); - IMPORT_C static CImPruneMessage* NewLC(CMsvEntry& aEntry, RFs& aFs); - - IMPORT_C void StartL(TMsvId aMessageEntry, TRequestStatus &aStatus); - ~CImPruneMessage(); - -private: - CImPruneMessage(CMsvEntry& aEntry, RFs& aFs); - void ConstructL(); - void DoRunL(); - void DoComplete(TInt& ); - void DoCancel(); - void PruneEntryL(); - void ResetStoreL(); - -private: - enum TImPruningState - { - EImPruneUpdatingEntry, - EImPruneUpdatingFirstEntry, - EImPruneFindingEntry, - EImPruneFindFirstEntry, - EImPruneFindNextEntry - }; - - TImPruningState iState; - - CMsvEntry& iCurrentEntry; - RFs& iFs; - CImEntryFinder* iEntryFinder; - CFileMan* iFileManager; - TMsvId iRootEntryId; - CMsvOperation* iChangeOperation; - CMsvStore* iStore; - }; - -struct TImCacheManagerProgress -/** Holds progress of a cache management cleanup operation. - -@see CImCacheManager::ProgressL() -@publishedAll -@released -*/ - { -public: - /** Total number of messages to process. - - Note that, immediately after a CImCacheManager object is started, the progress - operation may return 1 for iTotalMessages and 0 for iMessagesProcessed, regardless - of the total number of messages. This is because the counter for the iTotalMessages - operates asynchronously and may not have counted all of the messages at that - time. */ - TInt iTotalMessages; - /** Number of messages processed so far. */ - TInt iMessagesProcessed; - }; - -class CImCacheManager : public CMsvOperation -/** Provides management of the local cache of messages in remote mailboxes. - -A mailbox that is being used in disconnected mode allows the user access to -message data by opening the message directly from the remote mailbox. If the -required message has been downloaded previously, then it will not necessarily -need to be downloaded again. This functionality is achieved by preserving -the message data locally, under the remote service entry. The preserved message -data acts as a cache to allow the user access to the message without the need -for it to be downloaded every time. - -The cache management functionality is required to reduce the amount of memory -that is consumed by the message cache. CImCacheManager provides a mechanism -for asynchronously traversing a message tree and for removing text and attachment -data from messages. Deleting more message data will free up more memory but -there is a higher chance that a user will need to download a message for a -second time. - -CImCacheManager is an abstract base class, which can be specialised to implement -a filter (Filter()) that decides if data for a message shoulded be deleted: -for example, deletion could be restricted to 'all read messages over a week -old,' or, 'all read messages, over 20K in size which are also over a day old.' -@publishedAll -@released -*/ - { -public: - IMPORT_C void StartL(TMsvId aRootEntry, TRequestStatus &aStatus); - IMPORT_C void StartL(const CMsvEntrySelection& aSelection, TRequestStatus &aStatus); - IMPORT_C ~CImCacheManager(); - IMPORT_C const TDesC8& ProgressL(); - IMPORT_C void DoCancel(); - -protected: - IMPORT_C void ConstructL(); - IMPORT_C CImCacheManager(CMsvSession& aSession, TRequestStatus& aObserverRequestStatus); - - IMPORT_C void RunL(); - -private: - // Override this function to filter the currently selected message (iCurrentEntry). - // Return TRUE if the current entry is to be pruned. - /** Tests if cache cleanup should be performed on a message entry. - - After StartL() has been called, this is called once for each message entry. - It should return true if the body text and attachment data belonging to the - current message, as held in iCurrentEntry, should be deleted, or false if - the message should be left unchanged. - - This function must be implemented in any classes derived from CImCacheManager. - - @return True to clean the entry, false to leave it unchanged */ - virtual TBool Filter() const = 0; - - void DoRunL(); - - // Remove the store from the currently selected entry - inline void PruneMessageL(); - -protected: - /** Message entry currently being processed. */ - CMsvEntry* iCurrentEntry; - -private: - CMsvSession& iSession; - CImMessageFinder* iMessageFinder; - CImMessageCounter* iMessageCounter; - CMsvOperation* iDeleteOperation; - - TImCacheManagerProgress iProgress; - TRequestStatus* iReport; - - enum TImcmState - { - EImcmLookingForMessage, - EImcmPruningMessages, - EImcmCountingMessages, - EImcmSkippingPrune - }; - - TMsvId iRootEntry; - TImcmState iState; - TPckgBuf iProgressBuf; - - CMsvEntrySelection* iMessagesToPrune; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calalarm.h --- a/epoc32/include/calalarm.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALALARM_H__ -#define __CALALARM_H__ - -#include - -/** Alarm category Id for Calendar alarms -@publishedAll -@released -*/ -const TUid KUidAgendaModelAlarmCategory = { 0x101F4A70 }; - -NONSHARABLE_CLASS(CCalAlarm) : public CBase -/** Class representing an alarm. contains associated data extensions - -This can be assigned to a calendar entry. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CCalAlarm* NewL(); - IMPORT_C ~CCalAlarm(); - IMPORT_C void SetTimeOffset(TTimeIntervalMinutes aOffset); - IMPORT_C TTimeIntervalMinutes TimeOffset() const; - IMPORT_C void SetAlarmSoundNameL(const TDesC& aAlarmSoundName); - IMPORT_C const TDesC& AlarmSoundNameL() const; - IMPORT_C void SetAlarmAction(CCalContent* aAlarmAction); - IMPORT_C CCalContent* AlarmAction() const; - -private: - CCalAlarm(); - -private: - TTimeIntervalMinutes iOffset; - HBufC* iAlarmName; - // the associated data for rich alarm action - CCalContent* iAlarmAction; - }; - - -#endif // __CALALARM_H__ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calcategory.h --- a/epoc32/include/calcategory.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALCATEGORY_H__ -#define __CALCATEGORY_H__ - -#include - -class CCalCategoryImpl; - -/** Calendar categories can be associated with a calendar entry. - -There are 12 built in category types defined by TCalCategoryType. Additionally, -it is possible to define extended category types which are held as a descriptor -of any length. - -Any number of categories can be specified for an entry. CCalEntry provides member -functions for adding, deleting and fetching categories for an entry. - -CCalCategoryManager functions enable the client to add\\delete\\fetch categories -from a Calendar session and to get a list of entries filtered by their category. -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalCategory) : public CBase - { -public: - /** Calendar category type. - @publishedAll - @released - */ - enum TCalCategoryType - { - /** Appointment */ - ECalAppointment, - /** Business */ - ECalBusiness, - /** Education */ - ECalEducation, - /** Holiday */ - ECalHoliday, - /** Meeting */ - ECalMeeting, - /** All other types */ - ECalMiscellaneous, - /** Personal */ - ECalPersonal, - /** Phone call */ - ECalPhoneCall, - /** Sick day */ - ECalSickDay, - /** Special occasion */ - ECalSpecialOccasion, - /** Travel */ - ECalTravel, - /** Vacation */ - ECalVacation, - /** Extended */ - ECalExtended - }; - -public: - IMPORT_C static CCalCategory* NewL(TCalCategoryType aCategory); - IMPORT_C static CCalCategory* NewL(const TDesC& aExtendedName); - IMPORT_C ~CCalCategory(); - - IMPORT_C TCalCategoryType Category() const; - IMPORT_C const TDesC& ExtendedCategoryName() const; - -public: - CCalCategoryImpl* Impl() const; - static CCalCategory* NewL(CCalCategoryImpl* aImpl); - -private: - CCalCategory(); - CCalCategory(CCalCategoryImpl* aImpl); - void ConstructL(TCalCategoryType aCategory); - void ConstructL(const TDesC& aExtendedName); - -private: // member data - CCalCategoryImpl* iCalCategoryImpl; - }; - -#endif // __CALCATEGORY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calcategorymanager.h --- a/epoc32/include/calcategorymanager.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALCATEGORYMANAGER_H__ -#define __CALCATEGORYMANAGER_H__ - -#include - -class MCalProgressCallBack; -class CCalCategory; -class CCalEntry; -class CCalCategoryManagerImpl; -class CCalSession; - -/** A category manager used to manipulate the categories held by the Calendar store. - -There are 12 built-in category types which are specified by CCalCategory::TCalCategoryType. -In addition, clients can create as many of their own categories as they like by giving a name to the category. -This class is used along with the class CCalCategory to manipulate the categories in the file, for instance to -add, delete and get a list of entries filtered by their category. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalCategoryManager) : public CBase - { -public: - - IMPORT_C static CCalCategoryManager* NewL(CCalSession& aSession); - IMPORT_C ~CCalCategoryManager(); - - IMPORT_C TInt CategoryCountL() const; - IMPORT_C CCalCategory* CategoryL(TInt aIndex) const; - IMPORT_C void AddCategoryL(const CCalCategory& aCategory); - IMPORT_C void FilterCategoryL(const CCalCategory& aCategory, RPointerArray& aEntries, MCalProgressCallBack& aProgressCallBack); - IMPORT_C void FilterCategoryL(const CCalCategory& aCategory, RPointerArray& aEntries); - IMPORT_C void DeleteCategoryL(const CCalCategory& aCategory, MCalProgressCallBack& aProgressCallBack); - -private: - CCalCategoryManager(); - void ConstructL(CCalSession& aSession); - -private: - CCalCategoryManagerImpl* iCCalCategoryManagerImpl; - }; - -#endif // __CALCATEGORYMANAGER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calchangecallback.h --- a/epoc32/include/calchangecallback.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALCHANGECALLBACK_H__ -#define __CALCHANGECALLBACK_H__ - -#include - -class TCalChangeEntry; - -class MCalChangeCallBack -/** A call back class for observing changes in the model view. - -A client will not be notified of a change if it is the source of -the change. - -@publishedAll -@deprecated -*/ - { -public: - /** Instance view change type - @publishedAll - @deprecated - */ - enum TChangeType - { - /** Entries are added */ - EChangeAdd, - /** Entries are deleted */ - EChangeDelete, - /** Entries are modified */ - EChangeModify, - /** Undefined entries */ - EChangeUndefined, - /** Entries cause overflow error */ - EChangeOverflowError - }; - - /** Instance view entry type - @publishedAll - @deprecated - */ - enum TChangeEntryType - { - /** Entry type is todo */ - EChangeEntryTodo, - /** Entry type is event */ - EChangeEntryEvent, - /** All entry types */ - EChangeEntryAll - }; - /** A call back function for change notification - @param aChangeEntryType Filters notifications to only notify about entries of this type (event/todo/all). - - */ - virtual void CalChangeNotification(TChangeEntryType aChangeEntryType) = 0; - }; - -/** A call back class for observing changes in the model view. - -The call back returns an array containing information about at least -one change to the database. The information includes the type of change -and the identity of the item being changed. - -A client will not be notified of a change if it is the source of -the change. - -@publishedAll -@released -*/ -class MCalChangeCallBack2 - { -public: - /** Instance view change type - @publishedAll - @released - */ - enum TChangeType - { - /** Entries are added */ - EChangeAdd, - /** Entries are deleted */ - EChangeDelete, - /** Entries are modified */ - EChangeModify, - /** Undefined entries */ - EChangeUndefined - }; - - /** Instance view entry type - @publishedAll - @released - */ - enum TChangeEntryType - { - /** Entry type is todo */ - EChangeEntryTodo, - /** Entry type is event */ - EChangeEntryEvent, - /** All entry types */ - EChangeEntryAll - }; - /** A call back function for change notification - @param aChangeItems List of changes since the last notification. - - */ - virtual void CalChangeNotification(RArray& aChangeItems) = 0; - }; - -/** Struct for storing change notification data. -This contains the calendar local ID, the type of change and the entry type. - -The iChangeType will only be set to EChangeEntryTodo or EChangeEntryEvent -values. EChangeEntryAll is provided for callback registration only. - -If iChangeType is EChangeUndefined or EChangeOverflowError, iEntryId and -iEntryType are undefined and should not be used by clients. - -@publishedAll -@released -*/ -struct TCalChangeEntry - { - /** Local UID of the entry */ - TCalLocalUid iEntryId; - /** Type of change to the entry */ - MCalChangeCallBack2::TChangeType iChangeType; - /** Type of entry */ - MCalChangeCallBack2::TChangeEntryType iEntryType; - }; - -/** Class to encapsulate call back registration parameters. - -The type of entries, the date range and whether undated todos are included -can be specified. - -@publishedAll -@released -*/ -class CCalChangeNotificationFilter - { -public: - IMPORT_C static CCalChangeNotificationFilter* NewL(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange); - IMPORT_C ~CCalChangeNotificationFilter(); - - MCalChangeCallBack2::TChangeEntryType ChangeEntryType() const; - TCalTime StartTime() const; - TCalTime EndTime() const; - TBool IncludeUndatedTodos() const; - -private: - CCalChangeNotificationFilter(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange); - - MCalChangeCallBack2::TChangeEntryType iChangeEntryType; - CalCommon::TCalTimeRange iTimeRange; - TBool iIncludeUndatedTodos; - }; - -#endif // __CALCHANGECALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calcommon.h --- a/epoc32/include/calcommon.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALCOMMON_H__ -#define __CALCOMMON_H__ - -#include - -/** This system-wide #define is for version 2 of the Calendar component. -V1 is the CalInterimAPI. V2 is the refactored Calendar component which includes -support for Attachments, GEO, TRANSP, instance iterator, extended text searching. -@publishedAll -@released -*/ -#define SYMBIAN_CALENDAR_V2 - -/** Calendar local entry ID. -This entry ID is assigned by the calendar server when an entry is created. -It will remain unchanged for the lifetime of that entry. -@publishedAll -@released -*/ -typedef TUint32 TCalLocalUid; - -/** Calendar file ID. -@publishedAll -@released -*/ -typedef TInt64 TCalFileId; - -/** Utility class containing common calendar-related enums. - -@publishedAll -@released -*/ -class CalCommon - { -public: - - /** Entry filter used in the entry view and instance view, filter flags are defined by TCalViewFilterFlags - @publishedAll - @released - */ - typedef TUint TCalViewFilter; - - /** Entry filter flags used in the entry view and instance view. - @publishedAll - @released - */ - enum TCalViewFilterFlags - { - /** Include appointments. */ - EIncludeAppts=0x01, - /** Include reminders. */ - EIncludeReminder=0x02, - /** Include all-day events. */ - EIncludeEvents=0x04, - /** Include anniversaries. */ - EIncludeAnnivs=0x08, - /** Include completed todos. */ - EIncludeCompletedTodos=0x10, - /** Include incompleted todos. */ - EIncludeIncompletedTodos=0x20, - /** Remove non-alarmed entries. This flag cannot be used by itself. */ - EIncludeAlarmedOnly=0x40, - /** Include next only instance of a repeat entry. */ - EIncludeRptsNextInstanceOnly=0x80, - - /** By default all instances which overlap the time range are found. Use the EInstanceStartTimeWithinRange - flag to only include instances whose start time is inside the search time range. - - Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will - only include instances which are completely within the search time range. */ - EInstanceStartTimeWithinRange=0x100, - - /** By default all instances which overlap the time range are found. Use the EInstanceEndTimeWithinRange - flag to only include instances whose end time is inside the search time range. - - Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will - only include instances which are completely within the search time range. - */ - EInstanceEndTimeWithinRange=0x200, - - /** By default all instances which adjoin the search range are found. Use the EExcludeInstanceAdjoiningRange - flag to exclude instances that are outside, but adjoin the search range. - - Instances that are outside, but adjoin the search start or end time are excluded. - Instances that both start and end on the search start time are included. - Instances that both start and end on the search end time are excluded. - */ - EExcludeInstanceAdjoiningRange=0x400, - - /** Include all entries (appointments, day events, reminders, anniversaries and todos). */ - EIncludeAll=EIncludeAppts|EIncludeReminder|EIncludeEvents|EIncludeAnnivs| - EIncludeCompletedTodos|EIncludeIncompletedTodos, - }; - - /** The range of instances referred to in a recurrence ID or instance view. - @publishedAll - @released - */ - enum TRecurrenceRange - { - /** Only this instance is referenced. - If the user set EThisOnly when a repeating child entry is created and stored to the file, only the parent instance - referred to by the child's recurrence ID will be replaced. */ - EThisOnly, - /** This and all other instances are referenced. */ - EThisAndAll, - /** This and all future instances are referenced. */ - EThisAndFuture, - /** This and all previous instances are referenced. */ - EThisAndPrior - }; - - - /** Search filter for use in the CCalInstanceView::FindInstanceL() function. - Note that a folded text search is used if exact text search is not specified. - The summary text field is always searched. It is possible to specify additional text fields to be - searched as well. - @publishedAll - @released - */ - enum TCalSearchBehaviour - { - /** Search for folded text. */ - EFoldedTextSearch=0x0, - - /** Search for the exact text. */ - EExactTextSearch=0x1, - - /** Search location during a text search. - @publishedPartner - @released - */ - ESearchEntryLocation=0x2, - - /** Search description during a text search. - @publishedPartner - @released - */ - ESearchEntryDescription=0x4, - - /** Search attendee addresses during a text search. - @publishedPartner - @released - */ - ESearchAttendeeAddress=0x8, - - /** Search attendee sent by addresses during a text search. - @publishedPartner - @released - */ - ESearchAttendeeSentByAddress=0x10, - - /** Search attendee common names during a text search. - @publishedPartner - @released - */ - ESearchAttendeeCommonName=0x20, - - /** Search organizer's address during a text search. - @publishedPartner - @released - */ - ESearchOrganizerAddress=0x40, - - /** Search organizer's sent by address during a text search. - @publishedPartner - @released - */ - ESearchOrganizerSentByAddress=0x80, - - /** Search organizer's common name during a text search. - @publishedPartner - @released - */ - ESearchOrganizerCommonName=0x100, - - /** Include all possible text fields during a text search. */ - ESearchAllTextFields=ESearchEntryLocation|ESearchEntryDescription| - ESearchAttendeeAddress|ESearchAttendeeSentByAddress|ESearchAttendeeCommonName| - ESearchOrganizerAddress|ESearchOrganizerSentByAddress|ESearchOrganizerCommonName, - }; - - /** Class to implement a time range in the Instance view and Entry view. - @publishedAll - @released - */ - class TCalTimeRange - { - public: - IMPORT_C TCalTimeRange(TCalTime aStartTime, TCalTime aEndTime); - - IMPORT_C TCalTime StartTime() const; - IMPORT_C TCalTime EndTime() const; - - private: - TCalTime iStartTime; - TCalTime iEndTime; - }; - - /** Enumeration returned when opening a file to indicate whether the file is the current version, - needs converting, or is unsupported. - @publishedPartner - @released - */ - enum TCalFileVersionSupport - { - /** The file is the current version and can be loaded immediately. */ - EFileIsCurrentVersion, - /** The file is an older version and will be converted when it is used. */ - EFileNeedsConverting, - /** The file is an old version that is not supported. */ - EUnsupportedFileVersion - }; - }; -#endif // __CALCOMMON_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calcontent.h --- a/epoc32/include/calcontent.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALCONTENT_H__ -#define __CALCONTENT_H__ - -#include - -class RReadStream; -class RWriteStream; -class CAgnContent; - -NONSHARABLE_CLASS(CCalContent) : public CBase -/** -This class holds in memory 8-bit data of any type, or a link to 8-bit -data such as a URI. The MIME type of the data may also be held to help -callers determine the appropriate application to launch the content. - -Because the data is held in memory, callers should only use this class -to store small amounts of data or a URI to some content elsewhere. - -This class can be used to set an alarm action using -CCalAlarm::SetAlarmAction() (such as a link to an internet -radio station, or a small animated icon). - -@see CCalAlarm -@capability None -@publishedAll -@released -*/ - { -public: - /** Disposition of the data which maybe used while setting an alarm. The data can be a link or inline. - @publishedPartner - @released - */ - enum TDisposition - { - /** URL disposition */ - EDispositionUrl = 0, - /** Inline disposition */ - EDispositionInline = 1, - /** Unknown disposition */ - EDispositionUnknown = 15 - }; - - IMPORT_C static CCalContent* NewL(); - IMPORT_C ~CCalContent(); - IMPORT_C void SetContentL(TDesC8* aSmallContent, TDesC8* aContentMIMEType, CCalContent::TDisposition aContentDisposition); - IMPORT_C const TDesC8& Content() const; - IMPORT_C const TDesC8& MimeType() const; - IMPORT_C TDisposition Disposition() const; - CAgnContent* Impl() const; - void SetImpl(CAgnContent* aImpl); - -private: - CCalContent(); - void ConstructL(); - -private: - CAgnContent* iImpl; - }; - - -#endif // __CALCONTENT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/caldataexchange.h --- a/epoc32/include/caldataexchange.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CCALDATAEXCHANGE_H__ -#define __CCALDATAEXCHANGE_H__ - -#include - -class CCalDataExchangeImpl; -class CCalSession; -class RWriteStream; - -/** The default number of entries to import or export between callbacks. -@publishedAll -@released -*/ -const TInt KDefaultNumberOfEntriesToHandle = 10; - -/** A call back class to show the progress of long-running operations. - -When a long-running operation is carried out, this class is used to signal its progress, -and when the function is complete. - -@publishedAll -@released -*/ -class MCalDataExchangeCallBack - { -public: - /** Progress callback. - - This calls the observing class with the percentage complete of the current operation. - This also propagates any error to the observing class. - - @param aPercentageCompleted The percentage complete. */ - virtual void Progress(TInt aPercentageCompleted) = 0; - - /** Progress callback. - - This calls the observing class when the current operation is finished. */ - virtual void Completed() = 0; - - /* Retrieve the number of entries to handle at once. - @return The number of entries to handle at once. - */ - virtual TInt NumberOfEntriesToHandleAtOnce() { return KDefaultNumberOfEntriesToHandle; }; - }; - -/** -This class provides functionality for importing and exporting vCal entries. -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalDataExchange) : public CBase - { -public: - IMPORT_C static CCalDataExchange* NewL(CCalSession& aSession); - IMPORT_C ~CCalDataExchange(); - - IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray); - IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray, TInt aFlags); - IMPORT_C void ExportL(TUid aDataFormat, RWriteStream& aWriteStream, RPointerArray& aCalEntryArray); - - IMPORT_C void ImportL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray, TInt aFlags, TInt aNumEntries); - - IMPORT_C void ImportAsyncL(TUid aDataFormat, RReadStream& aReadStream, RPointerArray& aCalEntryArray, MCalDataExchangeCallBack& aObserver, TInt aFlags); - IMPORT_C void ExportAsyncL(TUid aDataFormat, RWriteStream& aWriteStream, RPointerArray& aCalEntryArray, MCalDataExchangeCallBack& aObserver); - -private: - CCalDataExchange(); - void ConstructL(CCalSession& aSession); - -private: - CCalDataExchangeImpl* iImpl; - }; - -#endif // __CCALDATAEXCHANGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/caldataformat.h --- a/epoc32/include/caldataformat.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CCALDATAFORMAT_H__ -#define __CCALDATAFORMAT_H__ - -#include - -/** -@file -@publishedAll -@released */ - -/** The UID for a VCal 1.0 data parser -Used in vCalendar Import. */ -const TUid KUidVCalendar = {0x1020DB7B}; - - -/** These flags control the behaviour of the data exchange parser.*/ -/** This flag overrides the default character set when parsing -vCalendar 1.0 files to Shift-JIS */ -const TUint32 KCalDataExchangeDefaultShiftJIS = 0x00000001; - -/** This flag ensures that the STATUS property of an imported vCalendar -will map to the CCalEntry::TStatus value with exactly the same name. */ -const TUint32 KCalDataExchangeImportStatusAsVCalendar = 0x00000002; - -#endif // __CCALDATAFORMAT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calendarconverter.h --- a/epoc32/include/calendarconverter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,89 +0,0 @@ -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALENDARCONVERTER_H__ -#define __CALENDARCONVERTER_H__ - -#include -#include - -class TChineseDate -/** Chinese date. - -Its public member data is the year cycle, the year (1-60), the month (1-12), whether or -not the month is a leap month, and the day in the month (1-29 or 30). -@publishedAll -@released */ - { -public: - IMPORT_C TChineseDate(); - IMPORT_C TBool operator==(const TChineseDate& aDate) const; -public: - /** The year cycle. */ - TInt iCycle; - /** The year (1-60). */ - TInt iYear; - /** The month (1-12). */ - TInt iMonth; - /** Whether or not the month is a leap month. */ - TBool iLeapMonth; - /** The day in the month (1-29 or 30). */ - TInt iDay; - }; - - -class CChineseCalendarConverter : public CBase -/** Converts between TDateTime and TChineseDate formats in both directions. Chinese dates -are calculated using the -2636 epoch. This is equivalent to 2637 BCE (Before Common Era). -@publishedAll -@released */ - { -public: - IMPORT_C static CChineseCalendarConverter* NewL(); - - /** Creates a Chinese date from a TDateTime value. - - @param aDateTime The date/time value to convert. - @param aChineseDate On return, contains the Chinese date. If the supplied date - is invalid, this contains KErrArgument. */ - virtual void DateTimeToChineseL(const TDateTime& aDateTime, TChineseDate& aChineseDate)=0; - - /** Creates a TDateTime value from a Chinese date. - - @param aChineseDate A date in Chinese format. - @param aDateTime On return, contains a date value. If the supplied date is - invalid, this contains KErrArgument. */ - virtual void ChineseToDateTimeL(const TChineseDate& aChineseDate, TDateTime& aDateTime)=0; - - /** Returns the range of dates, in standard date format, acceptable to the Chinese - calendar converter. - - @param aLower On return, contains the lower limit of the converter. - @param aUpper On return, contains the upper limit of the converter. */ - virtual void DateRange(TDateTime& aLower, TDateTime& aUpper)=0; - - /** Returns the range of dates, in Chinese date format, acceptable to the Chinese - calendar converter. - - @param aLower On return, contains the lower limit of the converter. - @param aUpper On return, contains the upper limit of the converter. */ - virtual void DateRange(TChineseDate& aLower, TChineseDate& aUpper)=0; - /** Returns the result of the last calendar conversion as a Julian date. - - @return The Julian date. */ - virtual TReal JulianDate() __SOFTFP =0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calentry.h --- a/epoc32/include/calentry.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,349 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALENTRY_H__ -#define __CALENTRY_H__ - -#include - -const TReal KCalGEOMinLatitude = -90; -const TReal KCalGEOMaxLatitude = 90; -const TReal KCalGEOMinLongitude = -180; -const TReal KCalGEOMaxLongitude = 180; - -const TUint KCalGEOMaxDecimalPlaces = 6; - -class CCalAlarm; -class CCalAttachment; -class CCalAttendee; -class CCalCategory; -class CCalEntryImpl; -class CCalGeoValue; -class CCalUser; -class CTzRules; -class TCalRRule; -class CCalEntryIdImpl; - -/** Class representing a calendar entry. This can be an appointment, to-do -item, reminder, event or anniversary. - -CCalEntry contains information about a calendar entry, including -a repeat definition, synchronisation information, and group scheduling data. - -A repeating calendar entry has more than one occurrence. Instances are -represented by the CCalInstance class. - -Synchronisation information includes a record of the date/time the entry was -last modified. This can be found by calling the LastModifiedDateL() function. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalEntry) : public CBase - { -public: - /** Defines the type of the calendar entry. - @publishedAll - @released - */ - enum TType - { - /** An appointment, which has a start time and end time. */ - EAppt, - /** A to-do, which can have a start time and end time (the end time is the due date), or can be undated. */ - ETodo, - /** An event, which has a start time and end time. */ - EEvent, - /** A reminder, which has a start time only. */ - EReminder, - /** An anniversary, which has a start time and end time. */ - EAnniv - }; - - /** Defines the possible status values of the entry. - There are values here to support both iCalendar (RFC 2445) and vCalendar v1.0 STATUS properties. - Enumerated values for vCalendar v1.0 contain the prefix 'EVCal'. - @publishedAll - @released - */ - enum TStatus - { - /** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The event is tentative. */ - ETentative, - /** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The event has been confirmed. */ - EConfirmed, - /** Used to support iCalendar (RFC 2445). The event has been cancelled. */ - ECancelled, - /** Used to support iCalendar (RFC 2445). The to-do entry needs action. */ - ETodoNeedsAction, - /** Used to support iCalendar (RFC 2445) and vCalendar 1.0. The to-do entry has been completed. */ - ETodoCompleted, - /** Used to support iCalendar (RFC 2445). The to-do entry is in progress. */ - ETodoInProcess, - /** No status is set. */ - ENullStatus, - - /** Used to support vCalendar 1.0. The entry has been accepted. */ - EVCalAccepted, - /** Used to support vCalendar 1.0. The entry needs action. */ - EVCalNeedsAction, - /** Used to support vCalendar 1.0. The entry has been sent. */ - EVCalSent, - /** Used to support vCalendar 1.0. The entry has been declined. */ - EVCalDeclined, - /** Used to support vCalendar 1.0. The entry has been delegated. */ - EVCalDelegated, - }; - - /** Replication status. - @publishedAll - @released - */ - enum TReplicationStatus - { - /** No restriction on access. */ - EOpen, - /** Data is private (no access). */ - EPrivate, - /** Data is confidential (restricted access). */ - ERestricted - }; - - /** The method property of a Group Scheduling entry. - @publishedAll - @released - */ - enum TMethod - { - /** The RFC2445-defined method value 'None'. */ - EMethodNone, - /** The RFC2445-defined method value 'Publish'. */ - EMethodPublish, - /** The RFC2445-defined method value 'Request'. */ - EMethodRequest, - /** The RFC2445-defined method value 'Reply'. */ - EMethodReply, - /** The RFC2445-defined method value 'Add'. */ - EMethodAdd, - /** The RFC2445-defined method value 'Cancel'. */ - EMethodCancel, - /** The RFC2445-defined method value 'Refresh'. */ - EMethodRefresh, - /** The RFC2445-defined method value 'Counter'. */ - EMethodCounter, - /** The RFC2445-defined method value 'DeclineCounter'. */ - EMethodDeclineCounter - }; - - /** Specify which entry details are to be copied in CCalEntry::CopyFromL functions. - @publishedAll - @released - */ - enum TCopyType - { - /** Copy the ID of the entry */ - ECopyAll, - /** Dont copy ID of the entry */ - EDontCopyId - }; - - /** The busy status of an entry and corresponds to the TRANSP property in the iCalendar (RFC 2445) and vCalendar specifications. - In the vCalendar specification, the TRANSP property can be any positive integer value. 0 is opaque and blocks time, 1 - is transparent and doesn't block time. Any higher values have an implementation-specific meaning. - In the iCalendar specification (RFC 2445), the TRANSP property can be either OPAQUE (blocks time) or TRANSPARENT (doesn't block time). - @publishedPartner - @prototype - */ - enum TTransp - { - /** The entry blocks time. */ - ETranspBusy, - /** The entry doesn't block time. */ - ETranspFree, - /** The entry is tentative and blocks time. */ - ETranspTentative, - /** The entry is an out-of-office calendar event and blocks time. */ - ETranspOutOfOffice, - }; - - // Construction / Destruction - IMPORT_C static CCalEntry* NewL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum); - IMPORT_C static CCalEntry* NewL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum, - const TCalTime& aRecurrenceId, CalCommon::TRecurrenceRange aRange); - - IMPORT_C ~CCalEntry(); - - // Date and Time - IMPORT_C TCalTime StartTimeL() const; - IMPORT_C TCalTime EndTimeL() const; - IMPORT_C void SetStartAndEndTimeL(const TCalTime& aStartTime, const TCalTime& aEndTime); - - IMPORT_C void SetLastModifiedDateL(); - IMPORT_C void SetLastModifiedDateL(const TCalTime& aModifiedTime); - IMPORT_C TCalTime LastModifiedDateL() const; - - IMPORT_C void SetDTStampL(const TCalTime& aTime); - IMPORT_C TCalTime DTStampL() const; - - IMPORT_C TCalTime CompletedTimeL() const; - IMPORT_C void SetCompletedL(TBool aCompleted, const TCalTime& aTime); - - // Repeat rules / RDate / ExDate Methods - IMPORT_C void SetRRuleL(const TCalRRule& aRule); - IMPORT_C TBool GetRRuleL(TCalRRule& aRule) const; - - IMPORT_C void SetRDatesL(const RArray& aRDateList); - IMPORT_C void GetRDatesL(RArray& aRDateList) const; - - IMPORT_C void SetExceptionDatesL(const RArray& aExDateList); - IMPORT_C void GetExceptionDatesL(RArray& aExDateList) const; - - IMPORT_C void ClearRepeatingPropertiesL(); - - // Entry alarm - IMPORT_C void SetAlarmL(CCalAlarm* aAlarm); - IMPORT_C CCalAlarm* AlarmL() const; - - // Comparison - IMPORT_C TBool CompareL(const CCalEntry& aEntry) const; - - // Copy - IMPORT_C void CopyFromL(const CCalEntry& aOther); - IMPORT_C void CopyFromL(const CCalEntry& aOther, TCopyType aCopyType); - - // Text Fields - IMPORT_C void SetSummaryL(const TDesC& aSummary); - IMPORT_C const TDesC& SummaryL() const; - IMPORT_C void SetDescriptionL(const TDesC& aDescription); - IMPORT_C const TDesC& DescriptionL() const; - IMPORT_C void SetLocationL(const TDesC& aLocation); - IMPORT_C const TDesC& LocationL() const; - - // Category list - IMPORT_C void AddCategoryL(CCalCategory* aCategory); - IMPORT_C void DeleteCategoryL(TInt aIndex); - IMPORT_C const RPointerArray& CategoryListL(); - - // Attendee Methods - IMPORT_C void AddAttendeeL(CCalAttendee* aAttendee); - IMPORT_C void DeleteAttendeeL(TInt aIndex); - IMPORT_C RPointerArray& AttendeesL() const; - IMPORT_C void SetOrganizerL(CCalUser* aUser); - IMPORT_C CCalUser* OrganizerL() const; - IMPORT_C void SetPhoneOwnerL(const CCalUser* aOwner); - IMPORT_C CCalUser* PhoneOwnerL() const; - - // Attachments - IMPORT_C void AddAttachmentL(CCalAttachment& aAttachment); - IMPORT_C void DeleteAttachmentL(const CCalAttachment& aAttachment); - IMPORT_C CCalAttachment* AttachmentL(TInt aIndex) const; - IMPORT_C TInt AttachmentCountL() const; - // Other Attributes - IMPORT_C TType EntryTypeL() const; - IMPORT_C void SetStatusL(TStatus aStatus); - IMPORT_C TStatus StatusL() const; - - IMPORT_C void SetReplicationStatusL(TReplicationStatus aReplicationStatus); - IMPORT_C TReplicationStatus ReplicationStatusL() const; - - IMPORT_C void SetPriorityL(TUint aPriority); - IMPORT_C TUint PriorityL() const; - - IMPORT_C void SetMethodL(TMethod aMethod); - IMPORT_C TMethod MethodL() const; - IMPORT_C void SetSequenceNumberL(TInt aSeq); - IMPORT_C TInt SequenceNumberL() const; - IMPORT_C const TDesC8& UidL() const; - IMPORT_C TCalTime RecurrenceIdL() const; - IMPORT_C CalCommon::TRecurrenceRange RecurrenceRangeL() const; - - IMPORT_C CTzRules* TzRulesL() const; - IMPORT_C void SetTzRulesL(const CTzRules& aTzRule); - IMPORT_C void SetTzRulesL(); - - IMPORT_C void SetLocalUidL(TCalLocalUid aLocalId); - IMPORT_C TCalLocalUid LocalUidL() const; - - IMPORT_C TTransp TimeTransparencyL() const; - IMPORT_C void SetTimeTransparencyL(TTransp aBusyStatus); - - IMPORT_C CCalGeoValue* GeoValueL() const; - IMPORT_C void SetGeoValueL(const CCalGeoValue& aGeoValue); - IMPORT_C void ClearGeoValueL(); - - // Internal APIs (Used by Java) - IMPORT_C TCalTime NextInstanceForLocalUIDL(const TCalTime& aTime) const; - IMPORT_C TCalTime PreviousInstanceForLocalUIDL(const TCalTime& aTime) const; - - IMPORT_C TCalTime FindRptUntilTimeL(TInt aCount); - - -public: - // Internal APIs - static CCalEntry* NewL(CCalEntryImpl* aImpl); - CCalEntryImpl* Impl() const; - -private: - void ConstructL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum, const TCalTime& aRecurrenceId, CalCommon::TRecurrenceRange aRange); - void ConstructL(TType aType, HBufC8* aUid, TMethod aMethod, TUint aSeqNum); - void ConstructL(CCalEntryImpl* aImpl); - -private: // member data - CCalEntryImpl* iImpl; - }; - - -/** Class representing a uniquely identifiable calendar entry in a calendar file. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalEntryId) : public CBase - { -public: - IMPORT_C static CCalEntryId* NewL(TDesC8* aFlatData); - IMPORT_C ~CCalEntryId(); - IMPORT_C TPtrC8 IdL(); - IMPORT_C TPtrC StoreFileNameL(); - IMPORT_C TCalTime RecurrenceIdL(); - IMPORT_C TCalTime InstanceTimeL() const; - IMPORT_C TCalLocalUid LocalUidL() const; -private: - CCalEntryId(); -private: - CCalEntryIdImpl* iImpl; - }; - - -/** Class representing the geographical location of a calendar entry. -This corresponds to the GEO property as defined in vCalendar / iCalendar (RFC 2445). It contains a latitude and a longitude. -@publishedPartner -@prototype -*/ -NONSHARABLE_CLASS(CCalGeoValue) : public CBase - { -public: - IMPORT_C static CCalGeoValue* NewL(); - IMPORT_C ~CCalGeoValue(); - IMPORT_C void SetLatLongL(const TReal& aLatitude, const TReal& aLongitude); - IMPORT_C TBool GetLatLong(TReal& aLatitude, TReal& aLongitude) const; -private: - CCalGeoValue(); -private: - TReal iLatitude; - TReal iLongitude; - }; - -#endif // __CALENTRY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calentryview.h --- a/epoc32/include/calentryview.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALENTRYVIEW_H__ -#define __CALENTRYVIEW_H__ - -#include -#include - -class MCalProgressCallBack; -class CCalSession; -class CCalEntryViewImpl; - -/** View class for accessing calendar entries. - -Once a session to a calendar file has been created, a view to the session -can be created. - -This view can be used to fetch, store and delete entries. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalEntryView) : public CBase - { -public: - - IMPORT_C static CCalEntryView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack); - IMPORT_C static CCalEntryView* NewL(CCalSession& aSession); - - IMPORT_C ~CCalEntryView(); - - IMPORT_C void FetchL(const TDesC8& aUid, RPointerArray& aCalEntryArray) const; - IMPORT_C CCalEntry* FetchL(TCalLocalUid aId) const; - - IMPORT_C void GetIdsModifiedSinceDateL(const TCalTime& aTime, RArray& aIds) const; - - IMPORT_C void StoreL(const RPointerArray& aCalEntryList, TInt& aNumSuccessfulEntry); - IMPORT_C void UpdateL(const RPointerArray& aCalEntryList, TInt& aNumSuccessfulEntry); - - IMPORT_C void DeleteL(const CDesC8Array& aUidList); - IMPORT_C void DeleteL(const CCalEntry& aCalEntry); - IMPORT_C void DeleteL(const CalCommon::TCalTimeRange& aCalTimeRange, CalCommon::TCalViewFilter aFilter, MCalProgressCallBack& aProgressCallBack); - IMPORT_C void DeleteL(const RArray& aIds, TInt& aNumSuccessfulDeleted); - -private: - CCalEntryView(); - void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack); -private: - CCalEntryViewImpl* iImpl; - }; - -#endif // __CALENTRYVIEW_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calinstance.h --- a/epoc32/include/calinstance.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALINSTANCE_H__ -#define __CALINSTANCE_H__ - -#include - -class CCalEntry; -class CCalInstanceImpl; - -/** Class representing an instance of a calendar entry. - -A calendar entry (CCalEntry) can have any number of instances. -A non-repeating entry will only have one instance. -Any further instances will appear if the entry has recurrence data. - -The time of an instance is the start time of that instance of the entry. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalInstance) : public CBase - { -public: - static CCalInstance* NewL(CCalEntry* aEntry, const TCalTime& iTime); - IMPORT_C ~CCalInstance(); - - IMPORT_C CCalEntry& Entry() const; - IMPORT_C TCalTime Time() const; - IMPORT_C TCalTime StartTimeL() const; - IMPORT_C TCalTime EndTimeL() const; - -private: - CCalInstance(); - void ConstructL(CCalEntry* aEntry, const TCalTime& aTime); - -private: - CCalInstanceImpl* iImpl; - }; - -#endif // __CALINSTANCE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calinstanceview.h --- a/epoc32/include/calinstanceview.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALINSTANCEVIEW_H__ -#define __CALINSTANCEVIEW_H__ - -#include -#include -#include - -class CCalFindInstanceSettings; -class CCalInstance; -class CCalInstanceIterator; -class CCalInstanceViewImpl; -class CCalSession; -class MCalProgressCallBack; -class TCalTime; -class CCalLiteEntry; -class TAgnInstanceId; -struct TASShdAlarmedInstanceParams; - -/** View class for accessing instances of calendar entries. - -Once a session to a calendar file has been created, a view to the session -can be created. - -An instance is a calendar entry, a repeated instance of a calendar entry, -or an RDate added to an entry. - -This view can be used to search for instances and also to delete instances. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalInstanceView) : public CBase - { -public: - - /** Parameter struct for storing search data. - This contains a descriptor to store search text and an enum to describe the text search behaviour. - - @publishedAll - @released - */ - class TCalSearchParams - { - public: - IMPORT_C TCalSearchParams(const TDesC& aText, CalCommon::TCalSearchBehaviour aBehaviour); - IMPORT_C const TDesC& Text() const; - IMPORT_C CalCommon::TCalSearchBehaviour Behaviour() const; - - private: - TPtrC iSearchText; - CalCommon::TCalSearchBehaviour iSearchBehaviour; - }; - - IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession, MCalProgressCallBack& aProgressCallBack); - IMPORT_C static CCalInstanceView* NewL(CCalSession& aSession); - IMPORT_C ~CCalInstanceView(); - - IMPORT_C void FindInstanceL(RPointerArray& aInstanceList, - CalCommon::TCalViewFilter aCalViewFilter, - const CalCommon::TCalTimeRange& aTimeRange) const; - - IMPORT_C void FindInstanceL(RPointerArray& aMatchedInstanceList, - CalCommon::TCalViewFilter aCalViewFilter, - const CalCommon::TCalTimeRange& aTimeRange, - const TCalSearchParams& aSearchParams) const; - - IMPORT_C CCalInstanceIterator* FindInstanceL(const CCalFindInstanceSettings& aSettings) const; - - IMPORT_C void FindAlarmedInstanceL(RPointerArray& aAlarmedInstanceList, - TASShdAlarmedInstanceParams aAlarmedInstanceParams) const; - - IMPORT_C void DeleteL(CCalInstance* aInstance, CalCommon::TRecurrenceRange aWhichInstances); - - IMPORT_C TCalTime NextInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const; - IMPORT_C TCalTime PreviousInstanceL(CalCommon::TCalViewFilter aCalViewFilter, const TCalTime& aStartDate) const; - -private: - CCalInstanceView(); - void ConstructL(CCalSession& aSession, MCalProgressCallBack* aProgressCallBack); - -private: - CCalInstanceViewImpl* iImpl; - }; - -/** Class for specifying the search criteria for use in @see CCalInstanceView::FindInstanceL. - -@publishedPartner -@released -*/ -NONSHARABLE_CLASS(CCalFindInstanceSettings) : public CBase - { -public: - IMPORT_C static CCalFindInstanceSettings* NewL(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange); - IMPORT_C ~CCalFindInstanceSettings(); - - IMPORT_C void SetFilter(CalCommon::TCalViewFilter aFilter); - IMPORT_C void SetTimeRange(const CalCommon::TCalTimeRange& aTimeRange); - IMPORT_C void SetTextSearchL(const CCalInstanceView::TCalSearchParams& aSearchParams); - - CalCommon::TCalSearchBehaviour Behaviour() const; - CalCommon::TCalViewFilter Filter() const; - const CalCommon::TCalTimeRange TimeRange() const; - const TDesC& Text() const; -private: - CCalFindInstanceSettings(CalCommon::TCalViewFilter aFilter, const CalCommon::TCalTimeRange& aTimeRange); - -private: - CalCommon::TCalTimeRange iTimeRange; - CalCommon::TCalViewFilter iFilter; - HBufC* iSearchText; - CalCommon::TCalSearchBehaviour iSearchBehaviour; - }; - -#endif // __CALINSTANCEVIEW_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calinterimapipanic.h --- a/epoc32/include/calinterimapipanic.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -/** - @file - @publishedAll - @released -*/ - -#ifndef __CALINTERIMAPIPANIC_H__ -#define __CALINTERIMAPIPANIC_H__ - - /** -Panics raised from CallinterimAPI - */ -enum TCalInterimApiPanicCode - { - - /** - Trying to create a CCalCategory object and a wrong type is passed. - */ - EInvalidCategoryParameter = 0, - - /** - Attempt to pass wrong type of TChangeEntryType. - */ - EInvalidChangeEntryType = 1, - - /** - Trying to fetch an undefined TStatus/TCalStatus of an Entry. - */ - EInvalidEntryStatus = 2, - - /** - The TType of an Entry dosen't match the standard types - */ - EInvalidEntryType = 3, - - /** - Atttempt to create an object using NULL object of type CCalEntry. - */ - EInstanceCreatedFromNullEntry = 4, - - /** - Passed invalid Recurrence Range. - */ - EInvalidRecurrenceRangeParameter= 5, - - /** - Attempt to pass a NULL object of type CCalInstance. - */ - ENullInstanceParameter = 6, - - /** - Wrong CCalEntry TType passed to API - */ - EInvalidEntryTypeParameter = 7, - - /** - Attempt to create an invalid repeat rule. - */ - ERepeatRuleBitFailure = 8, - - /** - Attempt to pass incorrect TCalRRule TType. - */ - EInvalidRepeatRuleType = 9, - - /** - Trying to set a repeat rule while one has already been set. - */ - ERepeatRuleTypeAlreadySet = 10, - - /** - Raised by the Class CCalSession's destructor if all the opened references - have not been closed before destruction of CCalSession object. - */ - ESessionHasOpenReferences = 11, - - /** - The type of CCalAttachment is unknown. - */ - EInvalidAttachmentType = 12, - - /** - The instance iterator index is corrupt. - */ - EInstanceIteratorIndexCorrupt = 13 - - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/caliterator.h --- a/epoc32/include/caliterator.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALITER_H__ -#define __CALITER_H__ - - -#include - -class CCalSession; -class CCalIteratorImpl; - -/** -An iterator for iterating though all the entries in the calendar store. - -This may be used by a synchronisation application to iterate all entries in the file to find entries that -have been added\\deleted between two synchronisations. - -The application must not create the entry view or instance view while iterating through the entries. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalIter) : public CBase - - { -public: - IMPORT_C static CCalIter* NewL(CCalSession& aSession); - IMPORT_C ~CCalIter(); - - IMPORT_C const TDesC8& FirstL(); - IMPORT_C const TDesC8& NextL(); - -private: - CCalIter(); - void ConstructL(CCalSession& aSession); - -private: - CCalIteratorImpl* iCalIteratorImpl; - }; - -#endif // __CALITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calnotification.h --- a/epoc32/include/calnotification.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALNOTIFICATION_H__ -#define __CALNOTIFICATION_H__ - -/** The calendar publish and subscribe category -@publishedAll - -@released -*/ -const TUid KCalPubSubCategory = { 0x10003a5b }; - -/** Used for subcribing to either todos or event changes -@publishedAll -@released -*/ -enum TCalPubSubValues - { - /** subscribe to todo notifications */ - ECalPubSubTodoNotification, - /** subscribe to event notifications */ - ECalPubSubEventNotification, - }; - -/** The publish and subscribe data -@publishedAll -@released -*/ -struct TCalPubSubData - { - /** The time that the calendar change took place, in universal (UTC) time */ - TTime iTimeOfChangeUtc; - /** The filename hashed into a 4-byte integer. CalInterimAPI provides a method to find the filename from this value. */ - TUint32 iFileNameHash; - }; - -#endif // __CALNOTIFICATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calprogresscallback.h --- a/epoc32/include/calprogresscallback.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALPROGRESSCALLBACK_H__ -#define __CALPROGRESSCALLBACK_H__ - -class MCalProgressCallBack -/** A call back class to show the progress of long-running operations. - -When a long-running operation is carried out on the instance view or the entry -view, this class is used to signal its progress, and when the function is complete. - -@publishedAll -@released -*/ - { -public: - - /** Progress callback. - - This calls the observing class with the percentage complete of the current operation. - - @param aPercentageCompleted The percentage complete. */ - virtual void Progress(TInt aPercentageCompleted) = 0; - - /** Progress callback. - - This calls the observing class when the current operation is finished. - - @param aError The error if the operation failed, or KErrNone if successful. */ - virtual void Completed(TInt aError) = 0; - - /** - Asks the observing class whether progress callbacks are required. This - is called once only to check if callbacks are enabled. - - @return If the observing class returns EFalse, then the Progress() function will not be called. - */ - virtual TBool NotifyProgress() = 0; - }; - -#endif // __CALPROGRESSCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calrrule.h --- a/epoc32/include/calrrule.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALRRULE_H__ -#define __CALRRULE_H__ - -#include - -/** Class representing iCal repeat types. - -This supports the following standard iCal properties: -- FREQ (rule type), -- DTSTART (start date), -- UNTIL (end date), -- COUNT (number of instances), -- INTERVAL (interval between instances), -- BYDAY, -- BYMONTHDAY, -- BYYEARDAY, -- WKST (start day of week). - -Note that the repeat rule type (FREQ) must be set before any of the following -properties can be set, since their behaviour is dependent on the rule type: -BYDAY, BYMONTHDAY, BYYEARDAY - -The WKST parameter is only significant in weekly repeat rules with an interval of -greater than 1. - -The repeat rule type may not be changed once it has been set. - -If the start date of the entry does not match an instance of its repeat rule then -the entry's start date will be moved forward to the first matching instance. For example, -if the rule repeats every Wednesday but the start date of the entry is Monday, then the -start date will be changed to the Wednesday. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TCalRRule) - { -public: - /** Types of repeat rule. - - @publishedAll - @released - */ - enum TType - { - /** The type has not yet been defined. */ - EInvalid=0, - /** Rule which repeats based on a number of days. */ - EDaily, - /** Rule which repeats based on a number of weeks. */ - EWeekly, - /** Rule which repeats based on a number of months. */ - EMonthly, - /** Rule which repeats based on a number of years. */ - EYearly, - }; - - /** Class to represent a weekday within a month. - - Valid values of iWeekInMonth are 1, 2, 3, 4 for the 1st, 2nd, 3rd and 4th week of - the month, or -1 for the last week of the month. - - For example: - The 3rd Wednesday would have iDay = EWednesday and iWeekInMonth = 3. - The last Sunday would have iDay = ESunday and iWeekInMonth = -1. - - @publishedAll - @released - */ - class TDayOfMonth - { - public: - IMPORT_C TDayOfMonth(TDay aDay, TInt8 aWeekInMonth); - IMPORT_C TDay Day() const; - IMPORT_C TInt8 WeekInMonth() const; - private: - TDay iDay; - TInt8 iWeekInMonth; - }; - - IMPORT_C TCalRRule(); - IMPORT_C TCalRRule(TType aType); - - IMPORT_C void SetType(TType aType); - IMPORT_C TType Type() const; - - IMPORT_C void SetDtStart(const TCalTime& aTime); - IMPORT_C TCalTime DtStart() const; - - IMPORT_C void SetUntil(const TCalTime& aTime); - IMPORT_C TCalTime Until() const; - - IMPORT_C void SetCount(TUint aCount); - IMPORT_C TUint Count() const; - - IMPORT_C void SetInterval(TInt aInterval); - IMPORT_C TInt Interval() const; - - IMPORT_C void SetByDay(const RArray& aDays); - IMPORT_C void GetByDayL(RArray& aDays) const; - - IMPORT_C void SetByDay(const RArray& aDays); - IMPORT_C void GetByDayL(RArray& aDays) const; - - IMPORT_C void SetByMonthDay(const RArray& aMonthDays); - IMPORT_C void GetByMonthDayL(RArray& aMonthDays) const; - - IMPORT_C void SetByMonth(const RArray aMonths); - IMPORT_C void GetByMonthL(RArray& aMonths) const; - - IMPORT_C void SetWkSt(TDay aDay); - IMPORT_C TDay WkSt() const; - - void SetUntilAndCount(const TCalTime& aTime, TUint aCount); - -private: - void InitialiseData(); - - TUint MapToBitsWeekdays(TDay aDay); - - TBool GetNthBit(TUint aNum) const; - void SetNthBit(TUint aNum); - -private: - TUint64 iBuffer; // stores BYDAY/BYMONTHDAY - TCalTime iDtStart; - TCalTime iUntil; - TInt32 iReserved; - TInt32 iReserved2; - TInt iCount; - TDay iWkSt; - TType iType; - TUint8 iInterval; - }; - -#endif // __CALRRULE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/calsession.h --- a/epoc32/include/calsession.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALSESSION_H__ -#define __CALSESSION_H__ - -#include - -#include -#include - -class CCalSessionImpl; -class MCalChangeCallBack2; - -/** A handle to the calendar file. - -When the client instantiates a CCalSession, it will connect to the calendar server. -In turn, the client can use its APIs, for instance to create or open a calendar file. - -The agenda data in the file can be accessed as entries. To access the entries, clients should -use class CCalEntryView or CCalInstanceView to process the entry data. However, both view classes -require the handle to the file which is represented by this class. - -A calendar file can be opened on any writable drive. Note that if the file is opened -on a removable media and that media is removed, operations will leave with KErrNotReady. -This error can also happen when trying to access file attachments on removed media. -When this error occurs, the user should close the CCalSession and re-open it once the media -has been replaced. -It is recommended that when using a calendar file on removable media, the user should watch for when -the media is removed / replaced using the RFs::NotifyChange API. - -The session object must not be destroyed until all the objects which where created by referencing it -have been destroyed. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalSession) : public CBase - { -public: - IMPORT_C static CCalSession* NewL(); - IMPORT_C ~CCalSession(); - - IMPORT_C void CreateCalFileL(const TDesC& aFileName) const; - IMPORT_C void OpenL(const TDesC& aFileName) const; - IMPORT_C void OpenL(const TDesC& aFileName, CalCommon::TCalFileVersionSupport& aFileSupportStatus) const; - IMPORT_C const TDesC& DefaultFileNameL() const; - IMPORT_C void DeleteCalFileL(const TDesC& aFileName) const; - IMPORT_C CDesCArray* ListCalFilesL() const; - - IMPORT_C void StartChangeNotification(MCalChangeCallBack2& aCallBack, const CCalChangeNotificationFilter& aFilter); - IMPORT_C void StopChangeNotification(); - IMPORT_C void DisableChangeBroadcast(); - IMPORT_C void EnableChangeBroadcast(); - - IMPORT_C void EnablePubSubNotificationsL(); - IMPORT_C void DisablePubSubNotificationsL(); - - IMPORT_C void FileIdL(TCalFileId& aCalFileId) const; - IMPORT_C void GetFileNameL(TCalPubSubData aPubSubData, TDes& aFileName) const; - IMPORT_C TBool IsFileNameL(TCalPubSubData aPubSubData, const TDesC& aFileName) const; - IMPORT_C TBool IsOpenedFileL(TCalPubSubData aPubSubData) const; - - // debug only -/** -@publishedPartner -@released -*/ - IMPORT_C void _DebugSetHeapFailL(RAllocator::TAllocFail aFail, TInt aRate); - -/** -@publishedPartner -@released -*/ - IMPORT_C TInt _DebugRequestAllocatedCellsL(); - - // deprecated - IMPORT_C void StartChangeNotification(MCalChangeCallBack* aCallBack, MCalChangeCallBack::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, TTime aFilterStartTime, TTime aFilterEndTime); - - IMPORT_C void __dbgClearTzClientCacheL(TBool aRestartCaching); - - IMPORT_C TInt _DebugRequestAllocatedHeapSizeL(); - -public: - CCalSessionImpl& Impl() const; - -private: - CCalSession(); - void ConstructL(); -private: - CCalSessionImpl* iImpl; - }; - -#endif // __CALSESSION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/caltime.h --- a/epoc32/include/caltime.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALTIME_H__ -#define __CALTIME_H__ - -#include - -/** Represents a date/time, as used in the Calendar API. - -This stores a single TTime, which may be set in UTC or local or floating local -time, and can be retrieved in either UTC or system local time. - -There are references to null time throughout the Interim API - this means Time::NullTTime(). - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TCalTime) - { -public: - - /** The time mode for a calendar time - @publishedAll - @released - */ - enum TTimeMode - { - /** Floating time. */ - EFloating, - /** Fixed time in UTC format. */ - EFixedUtc, - /** Fixed time in local time with time zone reference format. */ - EFixedTimeZone - }; - -public: - IMPORT_C TCalTime(); - - IMPORT_C void SetTimeLocalFloatingL(const TTime& aLocalTime); - IMPORT_C void SetTimeUtcL(const TTime& aUtcTime); - IMPORT_C void SetTimeLocalL(const TTime& aLocalTime); - IMPORT_C TTimeMode TimeMode() const; - IMPORT_C TTime TimeUtcL() const; - IMPORT_C TTime TimeLocalL() const; - - IMPORT_C static TTime MaxTime(); - IMPORT_C static TTime MinTime(); -private: - TTime iTime; - TUint8 iTimeMode; - TInt8 iReserved1; - TInt16 iReserved2; - }; - -#endif // __CALTIME_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/caluser.h --- a/epoc32/include/caluser.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,163 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CALUSER_H__ -#define __CALUSER_H__ - -#include - -class CCalUserImpl; - -/** Class representing a calendar user. - -A calendar user is the base class representation of a meeting participant. -It contains attributes common to all calendar users. - -Contains methods to store and retrieve a user's ADDRESS, SENT-BY and CN -fields. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalUser) : public CBase - { -public: - IMPORT_C static CCalUser* NewL(const TDesC& aAddress); - IMPORT_C static CCalUser* NewL(const TDesC& aAddress, const TDesC& aSentBy); - IMPORT_C ~CCalUser(); - - IMPORT_C void SetCommonNameL(const TDesC& aCommonName); - IMPORT_C const TDesC& Address() const; - IMPORT_C const TDesC& CommonName() const; - IMPORT_C const TDesC& SentBy() const; -public: - static CCalUser* NewL(CCalUserImpl* aImpl); - - CCalUserImpl* Impl() const; -protected: - CCalUser(); - CCalUser(CCalUserImpl* aImpl); - void ConstructL(const TDesC& aAddress); - void ConstructL(const TDesC& aAddress, const TDesC& aSentBy); -protected: -/** Handle to CCalUser implementation */ - CCalUserImpl* iImpl; - }; - - -/** Class representing an attendee of an event. - -CCalAttendee is a specialization of the CCalUser class. - -This class contains extra methods to store and retrieve an Attendee's -ROLE, PART-STAT, and RSVP fields. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CCalAttendee) : public CCalUser - { -public: - /** Attendee's role. - @publishedAll - @released - */ - enum TCalRole - { - /** A required participant of the event. */ - EReqParticipant=0, - /** An optional participant of the event. */ - EOptParticipant, - /** A non-participant of the event. */ - ENonParticipant, - /** This participant will chair the event. */ - EChair, - - /** Indicates an attendee at the event or todo. This value is supported in vCalendar only. */ - EVCalAttendee, - /** Indicates a delegate of another attendee. This value is supported in vCalendar only. */ - EVCalDelegate, - /** Indicates owner of the event or todo (not the same as phone owner). This value is supported in vCalendar only. */ - EVCalOwner, - }; - - /** Attendee's status - @publishedAll - @released - */ - enum TCalStatus - { - /** Action is required by attendee. */ - ENeedsAction=0, - /** Attendee has accepted request. */ - EAccepted, - /** Attendee has tentatively accepted the request. */ - ETentative, - /** Attendee's presence is confirmed. */ - EConfirmed, - /** Attendee has declined request. */ - EDeclined, - /** The required action has been completed by attendee. */ - ECompleted, - /** Attendee has delegated the request to another person. */ - EDelegated, - /** A to-do action in the process of being completed. */ - EInProcess, - - /** An entry has been sent. This value is supported in vCalendar only. */ - EVCalSent, - /** An entry has been received. This value is supported in vCalendar only. */ - EVCalXReceived, - }; - - /** Attendee's expected participation response. - This property is supported in vCalendar only. It is not a property of iCalendar. - @publishedAll - @released - */ - enum TVCalExpect - { - /** Indicates request is for your information. */ - EVCalFyi, - /** Indicates presence is definitely required. */ - EVCalRequire, - /** Indicates presence is being requested. */ - EVCalRequest, - /** Indicates an immediate response needed. */ - EVCalImmediate - }; - -public: - IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress); - IMPORT_C static CCalAttendee* NewL(const TDesC& aAddress, const TDesC& aSentBy); - - IMPORT_C void SetRoleL(TCalRole aRole); - IMPORT_C void SetStatusL(TCalStatus aStatus); - IMPORT_C void SetResponseRequested(TBool aRsvp); - IMPORT_C void SetVCalExpect(TVCalExpect aExpected); - - IMPORT_C TCalRole RoleL() const; - IMPORT_C TCalStatus StatusL() const; - IMPORT_C TBool ResponseRequested() const; - IMPORT_C TVCalExpect VCalExpect() const; -public: - static CCalAttendee* NewL(CCalUserImpl* aImpl); -private: - CCalAttendee(); - CCalAttendee(CCalUserImpl* aImpl); - }; - - -#endif // __CALUSER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cbioasyncwaiter.h --- a/epoc32/include/cbioasyncwaiter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CBIOASYNCWAITER_H__ -#define __CBIOASYNCWAITER_H__ - -#include - -/** -Utility class for waiting for asychronous requests. - -This class allows asynchronous requests to be made from synchronous -objects. This object is used by passing its iStatus to an asynchronous -request and then calling Start(). The result of the request can be -obtained by calling the Result() method. - -@publishedAll -@released -*/ -class CBioAsyncWaiter : public CActive - { -public: - IMPORT_C static CBioAsyncWaiter* NewLC(); - IMPORT_C ~CBioAsyncWaiter(); - - IMPORT_C void StartAndWait(); - IMPORT_C TInt Result() const; - -private: - CBioAsyncWaiter(); - - // from CActive - virtual void RunL(); - virtual void DoCancel(); - -private: - TInt iError; - }; - -#endif // __CBIOASYNCWAITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cbnfnode.h --- a/epoc32/include/cbnfnode.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// BNF node header -// -// - -#ifndef __CBNFNODE_H__ -#define __CBNFNODE_H__ - -#include -#include - -/** Declares that the "type" for node attributes is stored as a string. */ -typedef const TDesC* CBNFNodeAttributeType; - -#define _SHAREDSTRING(X) IMPORT_C static CBNFNodeAttributeType K##X(); -#define _SHAREDSTRINGBODY(X) EXPORT_C CBNFNodeAttributeType CBNFNode::K##X() \ - { \ - _LIT(K##X, #X); \ - return &(K##X); \ - } - - -class CBNFNode : public CTypedNode -/** Backus-Naur Form (BNF) node that forms part of a BNF tree (CBNFParser). - -Node types are stored as TInts, and attribute types as descriptors. -@publishedAll -@released -*/ -{ -public: - //##ModelId=3B666BC70146 - IMPORT_C ~CBNFNode(); - - //##ModelId=3B666BC70144 - IMPORT_C static CBNFNode* NewL(TInt aType); - - _SHAREDSTRING(PreRuleCallback) - _SHAREDSTRING(PostRuleCallback) - _SHAREDSTRING(Reference) - _SHAREDSTRING(RangeStart) - _SHAREDSTRING(RangeEnd) - _SHAREDSTRING(NMoreCount) - _SHAREDSTRING(NMoreMinimum) - _SHAREDSTRING(NMoreMaximum) - -protected: - IMPORT_C CBNFNode(TInt aType); -}; - -#endif // __CBNFNODE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cbnfparser.h --- a/epoc32/include/cbnfparser.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// This class provides a mechanism to use a BNF tree to parse an input stream. -// The notation of the EBNF is based upon that described in the XML1.0 specification. -// The BNF tree form used is a variation on Extended BNF and has the following rule types, -// where the input stream must: -// , Exact - match exactly with the provided string. -// , Range - next character must be in the specified range. -// , Select - next character must exist in the selected string. -// If the select string starts with ^ it is a NOT Select. -// , And - match all of the given sub rules -// , Or - match one of the given sub rules -// , NMore - match N or more times the the SINGLE subrule. -// , Optional - match 0/1 times to the SINGLE subrule. -// , Without - match the first subrule but NOT the second. -// , Reference - match the referred to rule. -// The iterative parser not only validates an input stream against the -// BNF grammer but allows pre/post actions to be performed during the parsing. -// Partial parsing is also allowed in that the input stream does not have to -// completed before parsing can begin. As soon as data is added the parser -// attempts to parse it. -// Numerous methods are provided to assist in the building of the BNF Tree this parser uses. -// To use this class: -// Create a derivation and implement the virtual method TreeL() to creat a BNF rule tree -// (the assistance methods NewBNF/NewRule etc should be used) - see DTDModel -// To use your new parser invoke Reset and pass input data using the ProcessData method. -// -// - -#ifndef __CBNFPARSER_H__ -#define __CBNFPARSER_H__ - -#include -#include -#include -#include -#include - -// -// forward class declarations -// -class CAttributeLookupTable; - - -// Rule Tree node type definitions -/** Defines types of node in a BNF tree (CBNFParser). - -Except for ERoot, EIncomplete, EReference, and ELastParserNodeType, the -types define different types of rule that the input stream must meet to -satisfy the grammar. */ -enum TParserNodeTypes - { - /** Root node. */ - ERoot, - /** Incomplete node. */ - EIncomplete, - /** Exact rule: match exactly with the provided string. */ - EExact, - /** Range rule: next character must be in the specified range. - - The start of the range is specified by a CBNFNode::KRangeStart() - attribute; the end by a CBNFNode::KRangeEnd() attribute. */ - ERange, - /** Select rule: next character must exist in the selected string. - - If the select string starts with ^, it is a NOT Select. */ - ESelect, - /** And rule: match all of the given sub-rules. - - Sub-rules are defined by the child nodes of the AND rule node. */ - EAnd, - /** Or rule: match one of the given sub-rules. - - Sub-rules are defined by the child nodes of the OR rule node. */ - EOr, - /** NMore rule: match a single subrule N or more times. - - A minimum is specified by a CBNFNode::KNMoreMinimum() attribute; a maximum by - a CBNFNode::KNMoreMaximum() attribute; an exact figure by a CBNFNode::KNMoreCount() attribute. */ - ENMore, - /** Optional rule: match a single sub-rule 0/1 times. - - A sub-rule is defined by the child node of the Optional rule node. */ - EOptional, - /** Without rule: match the first sub-rule but not the second. - - Sub-rules are defined by the child nodes of the Without rule node. */ - EWithout, - /** Reference rule: match the referred to rule. - - The target rule name is identified by a CBNFNode::KReference() attribute. */ - EReference, - /** Indicates final node type. */ - ELastParserNodeType - }; - -// Parser states -// -// When a the state is EActive. -// Setting the parser state to something else in a pre-/post-rule callback function -// causes the parser to exit on next loop in ParseL. If the state is set to EStopped -// we have finished the parser operation (e.g. in event of an error), in state EPaused -// we are likely to resume the parser operation after some external operations. -/** CBNFParser parser states. */ -enum TParseState - { - /** Parser has stopped. */ - EStopped, - /** Rarser is running. */ - EActive, - /** Parser has paused: e.g. waiting for further input to continue. */ - EPaused - }; - - - -class CBNFParser : public CBase, public MDataProviderObserver -/** Base class for parsers that use a BNF tree to parse an input stream. - -The BNF tree form used is a variation on Extended BNF described in the XML1.0 -specification. The general form of the tree is as follows: - -Each node in the tree defines a rule that the input stream must meet to satisfy the grammar. - -1. a node type is set to the rule type, as defined in TParserNodeTypes - -2. node data stores any string required by the rule: e.g. for a comparison rule, the string - to match against - -3. the parser allows callback functions to be called either before or after the rule is processed. - If these are present, they are stored as attributes of the node. - -4. some rules allow sub-rules: for example, the AND rule expects a number of sub-rules, all - of which must be successful if the AND rule itself is to succeed. Each sub-rule is - represented as a child node of the parent rule. Sub-rules in turn can have sub-rules. - -5. reference rule nodes are also allowed: these do not define themselves rules, but direct the - parser to another rule. They can link rules to each other and so build rule sequences more - complex than a simple tree. - -All the top-level rules are stored as attributes of the root node. The attribute type is a string - that names the rule; the attribute value is a pointer to the node that implements the rule. - -The class supplies functions that encapsulate adding rules appropriately to the tree. The parser -provider creates a derived class that implements the virtual method TreeL() that uses these -functions to create a BNF rule tree. - -The user of the parser initialises the parser with ResetL(), and then passes input data to the -parser using ProcessData(). The parser supports partial parsing: the input stream does not have -to completed before parsing can begin. As soon as data is added, the parser attempts to parse it. - - @publishedAll - @released - -*/ - { -protected: - /** Defines a type to handle a stack of rules. */ - typedef CStack CRuleStack; - - /** Type definition for a callback function pointer - Callback functions need to get a reference to the parser as parameter - and they need to be static. */ - typedef void (TRuleCallback)(CBNFParser&); - -public: - // Constructor for a new parser instance - // - // Input: - // aLUT - reference to attribute lookuptable; used to store all the stuff in the parser rule tree - // - //##ModelId=3B6669EA00F8 - IMPORT_C static CBNFParser* NewL(CAttributeLookupTable& aLUT); - - //##ModelId=3B6669EA00F7 - IMPORT_C virtual ~CBNFParser(); - - // Prepare the parser to take in fresh stream of data. - // THIS METHOD MUST BE CALLED BEFORE DATA CAN BE PROCESSED BY THE PARSER!! - // Calls TreeL in order to create the parsing rule tree if no tree already - // exists. - //##ModelId=3B6669EA00EF - IMPORT_C virtual void ResetL(); - - /** Checks if the input stream was completely processed - @return ETrue if all of the data was processed, EFalse if the data didn't match to the parsing rules - */ - //##ModelId=3B6669EA00EE - TBool Valid() const { return iStringComplete && (iString.Length() == 0); } - - /** Concatenates the rest of the input stream (which hasn't yet been processed) - into a single string. The ownership of the string is given to the caller. - @return String containing the remaining data to be parsed. OWNERSHIP PASSED TO CALLED. */ - //##ModelId=3B6669EA00ED - HBufC* StringL() const { return iString.StringL(); } - - /** Gets a pointer to the rule node currently being processed. - @return Rule node */ - //##ModelId=3B6669EA00E3 - CBNFNode* CurrentRule() { return iCurrentRule; } - - // Set reference to an attribute lookup table - //##ModelId=3B6669EA00C5 - void SetAttributeLookupTable(CAttributeLookupTable& aAttributeLookupTable); - - // methods to allow the input stream to be marked so that the callbacks - // can determine those parts which successfully matched - - /** Set a mark to the current position of the input stream. - - The mark acts as a tag in the stream currently being processed. - As we process further along the stream after adding the mark, we can perform - a rollback to the most previously set mark and start processing again (e.g. OR rule - works this way). The string fragments won't be consumed (deleted) until - all the marks on a fragment (and fragments before that) are deleted. */ - //##ModelId=3B6669EA00BC - void Mark() { iString.Mark(); }; // **Mark can leave** - - /** Get string between the "cursor position" and the latest mark on the stream. - - @return Pointer to the string from the previous mark on to the current position - of processed string. OWNERSHIP OF THE STRING GIVEN TO THE CALLER. */ - //##ModelId=3B6669EA00BB - HBufC* MarkedL() { return iString.MarkedL(); }; - - /** Gets the marked string with a string added before the mached string. - @see MarkedL() - @return A string cosisting of aInitialText appended with the marked string. - OWNERSHIP OF THE CONSTRUCTED STRING IS GIVEN TO THE CALLER. */ - //##ModelId=3B6669EA009E - HBufC* MarkedWithInitialTextL(const TDesC& aInitialText) { return iString.MarkedWithInitialTextL(aInitialText); }; - - /** Removes the latest mark. All the marks are stored in a stack and this removes - the topmost mark.*/ - //##ModelId=3B6669EA009D - void DeleteMark() { iString.DeleteMark(); }; - - // methods to determine it the used rule actually matched (typically used in post callbacks) - /** Tests if the used rule matched. - - This is typically used in post-rule callbacks. - - @return True if the used rule matched; otherwise false - */ - //##ModelId=3B6669EA0094 - TBool RuleMatched() const { return iSubRuleMatched; }; - /** Tests if an Optional node sub-rule matched. - - @return True if the sub- rule matched; otherwise false - */ - //##ModelId=3B6669EA0093 - TBool OptionalMatched() const { return iOptionalMatched; }; - - // Create new rule tree root node. - // This method creates a new single instance of CBNFNode, which shall act as the root - // node of the rule tree, which implements the BNF rules for parsing the input stream. - // All the other rules are attached as attributes to this node. - // The root node should have single child node, which should be a reference to the - // "logical root" of the rule tree. This can be done be attaching the logical root - // rule as a component to the root rule. - //##ModelId=3B6669EA0089 - IMPORT_C CBNFNode* NewBNFL(); - - // Add a new rule to a rule tree. - // - // Input: - // aRootRule - Pointer to the root bnf node (created with NewBNFL() ). - // aRuleName - Reference to a string identifying this rule. The string is used - // to make references to this rule from other rule's subtrees. - // aData - Pointer to a data string; used with EExact and ESelect type rules - // to match actual text strings. - // aPreRule - Function pointer to a prerule function that gets called _BEFORE_ - // we start processing this rule and its children (i.e. the rule subtree) - // aPostRule - Function pointer to a postrule function which is called _AFTER_ - // we have processed this rule (i.e. when we return up from the subtree - // and this rule is finished). - // - // Return: - // CBNFNode& - Reference to the newly created rule node in the rule tree - // - //##ModelId=3B6669E90326 - IMPORT_C CBNFNode& NewRuleL(CBNFNode* aRootRule, - const TDesC& aRuleName, - TParserNodeTypes aRuleType, - HBufC* aData, - TRuleCallback* aPreRule, - TRuleCallback* aPostRule); - - // Overridden version of the NewRuleL. Takes reference to the data instead of owning it. - //##ModelId=3B6669E903D1 - IMPORT_C CBNFNode& NewRuleL(CBNFNode* aRootRule, - const TDesC& aRuleName, - TParserNodeTypes aRuleType, - const TDesC& aData, - TRuleCallback* aPreRule, - TRuleCallback* aPostRule); - - // construct a new rule component not attached to a rule. - //##ModelId=3B6669E9018C - IMPORT_C CBNFNode* NewComponentL(TParserNodeTypes aRuleType, const TDesC& aData); - //##ModelId=3B6669E901B4 - IMPORT_C CBNFNode* NewComponentL(TParserNodeTypes aRuleType, HBufC* aData = NULL, TRuleCallback* aPreRule = NULL, TRuleCallback* aPostRule = NULL); - - // create a reference component to the rule of the given name - // which is not attached to any rule. - //##ModelId=3B6669E90204 - IMPORT_C CBNFNode* NewComponentL(CBNFNode* aRootRule, const TDesC& aRuleName); - - // Methods to create a new subrule to the given parent rule. - // These methods can be used to build the subtrees to the "main rules" attached to the root node. - // - // Input: - // aParentRule - The rule for which the new rule shall be added as a child - // aRuleType - Type of the new rule - // aData - Data for the rule; the string to match for an EExact rule, the selection character set for ESelect - // - // aPreRule - Pre rule callback function pointer - // aPostRule - Post rule callback function pointer - // Return: - // CBNFNode& - reference to the new rule - // - //##ModelId=3B6669E9022C - IMPORT_C CBNFNode& NewComponentL(CBNFNode &aParentRule, TParserNodeTypes aRuleType, const TDesC& aData); - //##ModelId=3B6669E90268 - IMPORT_C CBNFNode& NewComponentL(CBNFNode &aParentRule, TParserNodeTypes aRuleType, HBufC* aData = NULL, TRuleCallback* aPreRule = NULL, TRuleCallback* aPostRule = NULL); - - // Create a reference to another rule and attach this reference as a child of the given parent. - // Creates a child node of type EReference for the parent. This reference node - // hold the pointer to the rule we are refering to. - // Using references we can link rules to each other and build complex rule trees - // even though they don't physically form a complete tree. - // Notice, that the rule we are refering to does not necessarily need to exist, yet! - // - // Input: - // aRootRule - The Root node to the rule tree (created with NewBNFL). This is needed to - // find the rule we are refering to with the string. - // aParentRule - The parent rule of the newly created reference - // aRuleName - The "id string" of the rule we are refering to. - //##ModelId=3B6669E902CC - IMPORT_C CBNFNode& NewComponentL(CBNFNode* aRootRule, CBNFNode &aParentRule, const TDesC& aRuleName); - - // add additional attributes to components of rules (i.e. range values) - //##ModelId=3B6669E900F6 - IMPORT_C void AddComponentAttributeL(CBNFNode& aRule, CBNFNodeAttributeType aAttribute, TInt aInt); - - // re-implementations of MDataProviderObserver methods - //##ModelId=3B6669E900D8 - IMPORT_C virtual void ProcessDataL(HBufC8& aData); - //##ModelId=3B6669E900AF - IMPORT_C virtual void SetStatus(TInt aStatus = KErrNone); - //##ModelId=3B6669E90069 - IMPORT_C virtual void SetDocumentTypeL(const TDesC&); - //##ModelId=3B6669E90087 - IMPORT_C virtual void SetDocumentTypeL(const TDesC&, const TDesC&); - //##ModelId=3B6669E90055 - IMPORT_C virtual void SetDataExpected(TInt); - //##ModelId=3B6669E90041 - IMPORT_C virtual void SetBaseUriL(const TDesC* aBaseUri); - //##ModelId=3B6669E90038 - IMPORT_C virtual void MDataProviderObserverReserved1(); - //##ModelId=3B6669E90037 - IMPORT_C virtual void MDataProviderObserverReserved2(); - - // Tell the parser, that we all the data has been passed in. - // This method attempts to parse what ever is left of the input stream if it wasn't - // already finished. - //##ModelId=3B6669E9002E - IMPORT_C void CommitL(); - - /** Get the current state of the parser. - @return Parser state */ - //##ModelId=3B6669E9002D - TParseState State() const {return(iParsing);}; - -protected: - IMPORT_C CBNFParser(CAttributeLookupTable& aLUT); - - // Each of the following functions is a handler method for a specific type of a rule - // node. For example, ReferenceL handles reference nodes etc. - // These methods are called by PerformRuleL. - // - // Input: - // aRule - reference to the rule being processed - // aMatched - reference to a CFragmentedString::TStringMatch variable, which holds - // the information if the string or character we previously were trying to - // match actually matched. - // Return: - // TBool - We return ETrue if we have completed processing this node. If the processing - // still continues we return EFalse. For example, an EAnd rule would return - // ETrue if all of its chidren had matched or if a rule didn't match. In the first - // case the EAnd rule would have turned out to be true (aMatched = EMatched) since - // all of its children were true, but in the latter case we can stop processing the - // EAnd rule, since a subrule to the And didn't match and this means that the And - // expression can not be true. Either way, the processing of the And ends and we - // may return ETrue; - // - //##ModelId=3B6669E90005 - IMPORT_C virtual TBool ReferenceL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E803BB - IMPORT_C virtual TBool ExactL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E80389 - IMPORT_C virtual TBool RangeL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E80343 - IMPORT_C virtual TBool SelectL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E80311 - IMPORT_C virtual TBool WithoutL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E802D5 - IMPORT_C virtual TBool AndL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E80299 - IMPORT_C virtual TBool OrL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E80271 - IMPORT_C virtual TBool OptionalL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - //##ModelId=3B6669E8023F - IMPORT_C virtual TBool NMoreL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - - // A method to add a callback to a rule - // - // Input: - // aRule - The rule to which the callback is to be added - // aCallbackID - Either CBNFNode::KPreRuleCallback() or CBNFNode::KPostRuleCallback() - // Defines the type of the callback function (i.e. is it to be called before - // or after the rule has been processed). - // aCallback - The callback function pointer - // - //##ModelId=3B6669E80203 - IMPORT_C virtual void AddRuleCallbackL(CBNFNode& aRule, const TDesC* aCallbackID, TRuleCallback* aCallback); - //##ModelId=3B6669E801EF - IMPORT_C virtual void ExecutePreRuleCallbackL(CBNFNode& aRule); - //##ModelId=3B6669E801D1 - IMPORT_C virtual void ExecutePostRuleCallbackL(CBNFNode& aRule); - - // the method TreeL() should be reimplemented to generate a BNF rule tree and return - // ownership of it. This is the rule tree which will be to parse the input stream. - // See XmlPars.cpp or DTDMDL.cpp for example. - //##ModelId=3B6669E801D0 - IMPORT_C virtual CBNFNode* TreeL(); - - // methods which are invoked when the parser encounters a conditional - // point in the BNF grammar (i.e. And/Or) - //##ModelId=3B6669E801B2 - IMPORT_C virtual void StartConditional(TParserNodeTypes aRuleType); - //##ModelId=3B6669E80180 - IMPORT_C virtual void EndConditional(TParserNodeTypes aRuleType, TBool aSuccess); - - // A callback function to insert a mark to the current position of the stream - // being processed. Adding mark is a very common callback operation befor starting - // to process a rule, hence the method is provided by the parser. - //##ModelId=3B6669E8016C - IMPORT_C static void MarkCallback(CBNFParser& aParser); - - // returns the LUT used by this parser. - //##ModelId=3B6669E80163 - IMPORT_C CAttributeLookupTable& AttributeLUT() const; - - // method which does the actual iterative parsing - //##ModelId=3B6669E80162 - IMPORT_C TBool ParseL(); - - // A rule to handle a node in the rule tree. This method just calls the appropriate - // handler method according to the rule type. - //##ModelId=3B6669E8013A - IMPORT_C virtual TBool PerformRuleL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); - - //##ModelId=3B6669E8011C - /** Sets the parser state. - - @param aState Parser state - */ - void SetState(TParseState aState) {iParsing=aState;}; - -protected: - /** Storage object for all the attributes and identifiers in a tree */ - //##ModelId=3B6669E80108 - CAttributeLookupTable& iLUT; - - /** An utility object which stores all the buffers passed into the parser - and represents them as if they would form a single, continuous string. - This class also performs the actual physical matching/selection of the strings - and holds the marks set onto the string.*/ - //##ModelId=3B6669E800EA - CFragmentedString iString; - /** Flag indicating if the input stream has been completely processed. */ - //##ModelId=3B6669E800D6 - TBool iStringComplete; // more input stream has completed - - /** The BNF tree the parser is using to parse the input stream.*/ - //##ModelId=3B6669E800C2 - CBNFNode* iTree; // the BNF tree we are using to parse the input stream - - /** A stack of rules from iTree which are waiting to be completed. - The stack basically holds the path along the rule tree. */ - //##ModelId=3B6669E800AE - CRuleStack iRuleStack; - /** The BNF rule that is currently being processed. */ - //##ModelId=3B6669E80090 - CBNFNode* iCurrentRule; // the BNF rule we are currently using - - // when returning to a rule in the rulestack this indicates - // if the child rule matched correctly - /** Flag that indicates when returning to a rule in the rulestack if the child rule matched correctly. */ - //##ModelId=3B6669E8007C - TBool iSubRuleMatched; - /** Flag that indicates when returning to a rule in the rulestack if an optional rule matched correctly. */ - //##ModelId=3B6669E8006A - TBool iOptionalMatched; - - /** The child rule we are returning from (if any). - If this is NULL we are new to this BNF rule.*/ - //##ModelId=3B6669E80054 - CBNFNode* iSubRule; - - /** Parser state. */ - //##ModelId=3B6669E8004A - TParseState iParsing; - /** Input stream matched rule flag. */ - //##ModelId=3B6669E80038 - CFragmentedString::TStringMatch iMatched; - - // Storage pointers for strings identifying certain attributes on the rule nodes - /** Stores attribute identifier for reference string attributes. */ - //##ModelId=3B6669E8002C - const TDesC* iReferenceString; - /** Stores attribute identifier for range start attributes. */ - //##ModelId=3B6669E8001A - const TDesC* iRangeStart; - /** Stores attribute identifier for range end attributes. */ - //##ModelId=3B6669E80010 - const TDesC* iRangeEnd; - /** Stores attribute identifier for nmore minimum attributes. */ - //##ModelId=3B6669E80006 - const TDesC* iMoreMinimum; - /** Stores attribute identifier for nmore count attributes. */ - //##ModelId=3B6669E703DA - const TDesC* iMoreCount; - /** Stores attribute identifier for nmore maximum attributes. */ - //##ModelId=3B6669E703D0 - const TDesC* iMoreMaximum; - /** Stores attribute identifier for pre-rule callback attributes. */ - //##ModelId=3B6669E703C6 - const TDesC* iPreRuleCallback; - /** Stores attribute identifier for post-rule callback attributes. */ - //##ModelId=3B6669E703BC - const TDesC* iPostRuleCallback; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cdtdmodel.h --- a/epoc32/include/cdtdmodel.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,237 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// contains the parser specialisation (BNF grammar) for a DTD parser. -// See CBNFParser for function details -// -// - -#ifndef __CDTDMODEL_H__ -#define __CDTDMODEL_H__ - -#include -#include -#include - -//##ModelId=3B666BCB001C - - - -class CDTDModel : public CBNFParser -/** Creates a tree that represents a specified DTD. - -To use it: - -1. call the base class function ProcessDataL() with the filename of the DTD, and call CommitL() - -2. call GeneratedTree() to get the tree - - @publishedAll - @released -*/ - { -public: - class CDTDElementAttribute : public CBase - /** Represents an attribute of a DTD element. */ - { - public: - /** DTD element attribute value types. */ - enum KValueType - { - /** Attribute supplies a default. */ - EDefault, - /** Attribute is #REQUIRED. */ - ERequired, - /** Attribute is #IMPLIED. */ - EImplied, - /** Attribute is #FIXED. */ - EFixed, - /** Attribute is a reference. */ - EReference - }; - - public: - /** Destructor. - */ - virtual ~CDTDElementAttribute() - { - delete iType; - delete iValue; - } - - public: - /** Node that specifies the attribute type. */ - CBNFNode* iType; - /** Node that specifies the attribute value. */ - CBNFNode* iValue; - /** Attribute value type. */ - KValueType iValueType; - }; - - - enum TRuleMarks - { - ERuleStartMark = 1, - EConditionalMark, - EGroupMark - }; - - //##ModelId=3B666BCB0321 - IMPORT_C static CDTDModel* NewL(CAttributeLookupTable& aLUT); - //##ModelId=3B666BCB0320 - IMPORT_C virtual ~CDTDModel(); - - // This method MUST be invoked before data can be processed by the parser. - //##ModelId=3B666BCB031F - IMPORT_C virtual void ResetL(); - - //##ModelId=3B666BCB0315 - IMPORT_C CBNFNode* GeneratedTree(); - - // Building method for a hard coded WML1.1 DTD tree - // Input: - // aPackageRoot - A root node to which the generated tree is attached - // - //##ModelId=3B666BCB030B - IMPORT_C void BuildWml11DTDL(CBNFNode& aPackageRootNode); - -protected: - IMPORT_C CDTDModel(CAttributeLookupTable& aLUT); - - // construct our BNF rule tree - //##ModelId=3B666BCB0302 - IMPORT_C virtual CBNFNode* TreeL(); - - // to control our internal state on conditional rules. - //##ModelId=3B666BCB02F7 - IMPORT_C virtual void StartConditional(TParserNodeTypes aRuleType); - //##ModelId=3B666BCB02E3 - IMPORT_C virtual void EndConditional(TParserNodeTypes aRuleType, TBool aSuccess); - - // rule callbacks to build the DTD Tree - //##ModelId=3B666BCB02D9 - static void PreRulesL(CBNFParser& aParser); - //##ModelId=3B666BCB02CF - static void PostRulesL(CBNFParser& aParser); - //##ModelId=3B666BCB02C5 - static void PreElementDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB02B1 - static void PostElementDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB02A7 - static void PreEntityDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB0294 - static void PostEntityDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB0289 - static void PreAttlistLineL(CBNFParser& aParser); - //##ModelId=3B666BCB027F - static void PostAttlistLineL(CBNFParser& aParser); - //##ModelId=3B666BCB0275 - static void PostAttlistReferenceL(CBNFParser& aParser); - //##ModelId=3B666BCB026B - static void PreAttValueL(CBNFParser& aParser); - //##ModelId=3B666BCB0261 - static void PostAttValueL(CBNFParser& aParser); - //##ModelId=3B666BCB024E - static void PostRequiredL(CBNFParser& aParser); - //##ModelId=3B666BCB0243 - static void PostFixedL(CBNFParser& aParser); - //##ModelId=3B666BCB0239 - static void PostImpliedL(CBNFParser& aParser); - //##ModelId=3B666BCB022F - static void PostAndL(CBNFParser& aParser); - //##ModelId=3B666BCB0225 - static void PostOrL(CBNFParser& aParser); - //##ModelId=3B666BCB021B - static void PreGroupL(CBNFParser& aParser); - //##ModelId=3B666BCB0208 - static void PostGroupL(CBNFParser& aParser); - //##ModelId=3B666BCB01FD - static void PostMatch0PlusL(CBNFParser& aParser); - //##ModelId=3B666BCB01F3 - static void PostMatch1PlusL(CBNFParser& aParser); - //##ModelId=3B666BCB01E9 - static void PostOptionalL(CBNFParser& aParser); - //##ModelId=3B666BCB01DF - static void PostIdentifierL(CBNFParser& aParser); - //##ModelId=3B666BCB01CC - static void PostEntityDeclNameL(CBNFParser& aParser); - //##ModelId=3B666BCB01C1 - static void PostElementDeclNameL(CBNFParser& aParser); - //##ModelId=3B666BCB01B7 - static void PostAttlistDeclNameL(CBNFParser& aParser); - //##ModelId=3B666BCB01AD - static void PostAttfieldNameL(CBNFParser& aParser); - //##ModelId=3B666BCB01A3 - static void PostReferenceNameL(CBNFParser& aParser); - //##ModelId=3B666BCB0199 - static void PostStringL(CBNFParser& aParser); - //##ModelId=3B666BCB0186 - static void PostValidHexCharL(CBNFParser& aParser); - //##ModelId=3B666BCB017B - static void PostValidDecCharL(CBNFParser& aParser); - //##ModelId=3B666BCB0171 - static void PrePEDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB0167 - static void PostPEDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB015D - static void PostGEDeclL(CBNFParser& aParser); - //##ModelId=3B666BCB0153 - static void PreGEContentL(CBNFParser& aParser); - //##ModelId=3B666BCB0149 - static void PostGEContentL(CBNFParser& aParser); - - // utility functions - //##ModelId=3B666BCB0135 - static void PostValidCharL(CBNFParser& aParser, TRadix aRadix); - //##ModelId=3B666BCB0117 - static void PostRuleL(CBNFParser& aParser, TParserNodeTypes aType, const TDesC* aAttribute); - - //##ModelId=3B666BCB0104 - void CharRefReplacement(TPtr& aString); - - //##ModelId=3B666BCB0103 - void DoClear(); - - // Help methods for the hardcoded WML 1.1 tree - //##ModelId=3B666BCB00DB - void AddNewAttributeL(CBNFNode& aNode, const TDesC* aAttributeId, const TDesC& aAttributeType, CDTDElementAttribute::KValueType aAttributeValueType, CBNFNode* aRootNode); - //##ModelId=3B666BCB00BD - void AddNewReferenceAttributeL(CBNFNode& aNode, const TDesC& aAttributeType, CBNFNode* aRootNode); - //##ModelId=3B666BCB0095 - void AddNewAttributeWithValueL(CBNFNode& aNode, const TDesC* aAttributeId, const TDesC& aAttributeType, const TDesC& aAttributeDefaultValue, CBNFNode* aRootNode); - - -protected: - typedef CRuleMarkedStack COwnerRuleMarkedStack; - -protected: - //##ModelId=3B666BCB008B - TBool iInPEDecl; - //##ModelId=3B666BCB0078 - TBool iCharRefCheck; - //##ModelId=3B666BCB006E - HBufC* iGEContent; - - //##ModelId=3B666BCB0064 - HBufC* iNewAttfieldName; - //##ModelId=3B666BCB005A - CDTDElementAttribute* iNewElementAttribute; - //##ModelId=3B666BCB0046 - CBNFNode* iNewRule; - //##ModelId=3B666BCB003C - CBNFNode* iNewTree; - //##ModelId=3B666BCB0030 - COwnerRuleMarkedStack iNewRuleStack; - }; - -#endif // __CDTDMODEL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cemailaccounts.h --- a/epoc32/include/cemailaccounts.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,628 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CEMAILACCOUNTS_H__ -#define __CEMAILACCOUNTS_H__ - - -#include -#include -#include - - -class CImIAPPreferences; -class CImPop3Settings; -class CImImap4Settings; -class CImSmtpSettings; -class CRepository; -class CImapSyncDownloadRules; -class CImapTransportBufferSizes; -class CImSmtpMobilitySettings; - -/** -Maximum size of email account name - -@publishedAll -@released -*/ -const TInt KEmailAccountNameSize = 256; - -/** -Maximum number of entries allowed in the IAP list for a SMTP mobility account - -@publishedPartner -@released -*/ -const TInt KMaxSmtpMobilityAccountIAPListEntries = 32; - -/** -Identifier number for a POP email account. - -@publishedAll -@released -@see TPopAccount -*/ -typedef TInt TPopAccountId; - -/** -Identifier number for an IMAP email account. - -@publishedAll -@released -@see TImapAccount -*/ -typedef TInt TImapAccountId; - -/** -Identifier number for an SMTP email account. - -@publishedAll -@released -@see TSmtpAccount -*/ -typedef TInt TSmtpAccountId; - -/** -Identifier number for an SMTP moblity account. - -@publishedPartner -@released -*/ -typedef TInt TSmtpMobilityAccountId; - -/** -Array of IAP values - -@publishedPartner -@released -*/ -typedef RArray RArrayIAP; - -/** -Null or undefined SMTP account identifier - -@publishedPartner -@released -*/ -const TSmtpAccountId KNullSmtpAccountId = 0; - -/** -POP account ID. - -Objects of this type identify POP email accounts. -They are obtained when a POP account is created -(CEmailAccounts::CreatePopAccountL()), or by -querying for what POP accounts exist -(CEmailAccounts::GetPopAccountL() and CEmailAccounts::GetPopAccountsL()). - -The object is then used as a handle to the account when getting -the account settings, using CEmailAccounts::LoadPopSettingsL() and -CEmailAccounts::LoadPopIapSettingsL(). - -@publishedAll -@released -*/ -class TPopAccount - { -public: - /** POP account identifier number. - - Each POP account stored on the phone has a different - identifier number to distinguish it from other accounts. - */ - TPopAccountId iPopAccountId; - - /** POP account name. */ - TBuf iPopAccountName; - - /** Entry ID of the POP service for this account. */ - TMsvId iPopService; - - /** Entry ID of the related SMTP service for this account. - - This is set if an SMTP service has been created, using - CEmailAccounts::CreateSmtpAccountL(), that specifies that - it is related to this account. An SMTP service (which provides - email sending functionality) is used in conjunction with - a POP or IMAP service (which provide email retrieval). - */ - TMsvId iSmtpService; - }; - -/** -IMAP account ID. - -Objects of this type identify IMAP email accounts. -They are obtained when a IMAP account is created -(CEmailAccounts::CreateImapAccountL()), or by -querying for what IMAP accounts exist -(CEmailAccounts::GetImapAccountL() and CEmailAccounts::GetImapAccountsL()). - -The object is then used as a handle to the account when getting -the account settings, using CEmailAccounts::LoadImapSettingsL() and -CEmailAccounts::LoadImapIapSettingsL(). - -@publishedAll -@released -*/ -class TImapAccount - { -public: - /** IMAP account identifier number. - - Each IMAP account stored on the phone has a different - identifier number to distinguish it from other accounts. - */ - TImapAccountId iImapAccountId; - - /** IMAP account name */ - TBuf iImapAccountName; - - /** Entry ID of the IMAP service for this account. */ - TMsvId iImapService; - - /** Entry ID of the related SMTP service for this account. - - This is set if an SMTP service has been created, using - CEmailAccounts::CreateSmtpAccountL(), that specifies that - it is related to this account. An SMTP service (which provides - email sending functionality) is used in conjunction with - a POP or IMAP service (which provide email retrieval). - */ - TMsvId iSmtpService; - }; - -/** -SMTP account ID. - -Objects of this type identify SMTP email accounts. -They are obtained when a SMTP account is created -(CEmailAccounts::CreateSmtpAccountL()), or by -querying for what SMTP accounts exist -(CEmailAccounts::GetSmtpAccountL() and CEmailAccounts::GetISmtpAccountsL()). - -The object is then used as a handle to the account when getting -the account settings, using CEmailAccounts::LoadSmtpSettingsL() and -CEmailAccounts::LoadSmtpIapSettingsL(). - -@publishedAll -@released -*/ -class TSmtpAccount - { -public: - /** SMTP account identifier number. */ - TSmtpAccountId iSmtpAccountId; - - /** SMTP account name */ - TBuf iSmtpAccountName; - - /** Entry ID of the SMTP service for this account. */ - TMsvId iSmtpService; - - /** Entry ID of the related POP or IMAP service for this account. - - An SMTP service (which provides email sending functionality) is - used in conjunction with a POP or IMAP service (which provide email retrieval). - */ - TMsvId iRelatedService; - }; - -/** -@publishedPartner -@released -*/ -class TSmtpMobilityAccount - { -public: - /** SMTP mobility account identifier */ - TSmtpMobilityAccountId iAccountId; - - /** SMTP mobility account name */ - TBuf iName; - - /** Parent SMTP account identifier */ - TSmtpAccountId iParentSmtpAccountId; - - /** Linked SMTP account identifier. Identifies the SMTP account whose - settings will be used by this mobility account. If the mobility account - is using its own settings, this will be set to KNullSmtpAccountId. */ - TSmtpAccountId iLinkedSmtpAccountId; - }; - -/** -Creates, loads, saves and deletes email (IMAP, POP, and SMTP) accounts. - -An account encapsulates: - -- Settings for a messaging service. There is a different type of - settings class for each of the email protocols (CImPop3Settings, - CImImap4Settings, CImSmtpSettings). -- IAP (Internet account) settings for accessing the service. - -The class has a family of functions for each protocol to create, get, -and delete accounts: - -- Create\AccountL -- Get\AccountL -- Get\AccountsL -- Delete\AccountL - -where \ is either POP, IMAP, or SMTP. -The Create and Get functions don't directly return settings -objects, but only account identifiers. - -Account identifiers are passed to the following functions -to save and load the service and IAP settings for that account: - -- Load\SettingsL -- Save\SettingsL -- Load\IapSettingsL -- Save\IapSettingsL - -For SMTP only, there is a concept of a default account (as a client -program may want to send an email, and not care which account is used.) -SetDefaultSmtpAccountL(), DefaultSmtpAccountL() and DeleteDefaultSmtpAccountL() -are used to handle this. - -Note that an account is associated with a service entry in the message store, -but account information itself is stored in the central repository. - -@publishedAll -@released -*/ -class CEmailAccounts : public CBase, public MMsvSessionObserver - { -public: - - IMPORT_C static CEmailAccounts* NewL(); - IMPORT_C static CEmailAccounts* NewLC(); - IMPORT_C virtual ~CEmailAccounts(); - - IMPORT_C TPopAccount CreatePopAccountL(const TDesC& aAccountName, const CImPop3Settings& aPopSettings, - const CImIAPPreferences& aPopIAP, TBool aReadOnly); - - IMPORT_C TImapAccount CreateImapAccountL(const TDesC& aAccountName, const CImImap4Settings& aImapSettings, - const CImIAPPreferences& aImapIAP, TBool aReadOnly); - - IMPORT_C TSmtpAccount CreateSmtpAccountL(TPopAccount& aPopAccount, const CImSmtpSettings& aSmtpSettings, - const CImIAPPreferences& aSmtpIAP, TBool aReadOnly); - - IMPORT_C TSmtpAccount CreateSmtpAccountL(TImapAccount& aImapAccount, const CImSmtpSettings& aSmtpSettings, - const CImIAPPreferences& aSmtpIAP, TBool aReadOnly); - - IMPORT_C TSmtpAccount CreateSmtpAccountL(const TDesC& aAccountName, const CImSmtpSettings& aSmtpSettings, - const CImIAPPreferences& aSmtpIAP, TBool aReadOnly); - - IMPORT_C void GetPopAccountsL(RArray& aAccounts); - IMPORT_C void GetPopAccountL(TMsvId aServiceId, TPopAccount& aAccount); - IMPORT_C void DeletePopAccountL(const TPopAccount& aAccount); - - IMPORT_C void GetImapAccountsL(RArray& aAccounts); - IMPORT_C void GetImapAccountL(TMsvId aServiceId, TImapAccount& aAccount); - IMPORT_C void DeleteImapAccountL(const TImapAccount& aAccount); - - IMPORT_C void GetSmtpAccountsL(RArray& aAccounts); - IMPORT_C void GetSmtpAccountL(TMsvId aServiceId, TSmtpAccount& aAccount); - IMPORT_C void DeleteSmtpAccountL(const TSmtpAccount& aAccount); - IMPORT_C void DeleteDefaultSmtpAccountL(); - - IMPORT_C void PopulateDefaultPopSettingsL(CImPop3Settings& aPopSettings, - CImIAPPreferences& aPopIap); - - IMPORT_C void PopulateDefaultImapSettingsL(CImImap4Settings& aImapSettings, - CImIAPPreferences& aImapIap); - - IMPORT_C void PopulateDefaultSmtpSettingsL(CImSmtpSettings& aSmtpSettings, - CImIAPPreferences& aSmtpIap); - - IMPORT_C TInt DefaultSmtpAccountL(TSmtpAccount& aAccount); - IMPORT_C void SetDefaultSmtpAccountL(const TSmtpAccount& aAccount); - - IMPORT_C void LoadPopSettingsL(const TPopAccount& aAccount, CImPop3Settings& aPopSettings); - IMPORT_C void LoadPopIapSettingsL(const TPopAccount& aAccount, CImIAPPreferences& aIAP); - - IMPORT_C void LoadImapSettingsL(const TImapAccount& aAccount, CImImap4Settings& aImapSettings); - IMPORT_C void LoadImapIapSettingsL(const TImapAccount& aAccount, CImIAPPreferences& aIAP); - - IMPORT_C void LoadSmtpSettingsL(const TSmtpAccount& aAccount, CImSmtpSettings& aSmtpSettings); - IMPORT_C void LoadSmtpIapSettingsL(const TSmtpAccount& aAccount, CImIAPPreferences& aIAP); - - IMPORT_C void SavePopSettingsL(const TPopAccount& aAccount, const CImPop3Settings& aPopSettings); - IMPORT_C void SavePopIapSettingsL(const TPopAccount& aAccount, const CImIAPPreferences& aIAP); - - IMPORT_C void SaveImapSettingsL(const TImapAccount& aAccount, const CImImap4Settings& aImapSettings); - - IMPORT_C void SaveImapIapSettingsL(const TImapAccount& aAccount, const CImIAPPreferences& aIAP); - - IMPORT_C void SaveSmtpSettingsL(const TSmtpAccount& aAccount, const CImSmtpSettings& aSmtpSettings); - IMPORT_C void SaveSmtpIapSettingsL(const TSmtpAccount& aAccount, const CImIAPPreferences& aIAP); - - IMPORT_C TBool IsAccountReadOnlyL(const TPopAccount& aAccount); - IMPORT_C TBool IsAccountReadOnlyL(const TImapAccount& aAccount); - IMPORT_C TBool IsAccountReadOnlyL(const TSmtpAccount& aAccount); - - // Published partner routines - IMPORT_C TImapAccount CreateImapAccountL(const TDesC& aAccountName, - const CImImap4Settings& aImapSettings, const CImIAPPreferences& aImapIAP, - const CImapSyncDownloadRules& aSyncDownloadRules, TBool aReadOnly); - IMPORT_C void LoadImapSyncDownloadRulesL(const TImapAccount& aAccount, CImapSyncDownloadRules& aRules); - IMPORT_C void LoadImapTransportBufferSizesL(CImapTransportBufferSizes& aBufferSizes); - IMPORT_C void SaveImapSyncDownloadRulesL(const TImapAccount& aAccount, const CImapSyncDownloadRules& aRules); - IMPORT_C void SaveImapTransportBufferSizesL(const CImapTransportBufferSizes& aBufferSizes); - IMPORT_C void DeleteImapTransportBufferSizesL(); - - IMPORT_C void GetSmtpAccountL(TSmtpAccountId aAccountId, TSmtpAccount& aAccount); - - IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL(const TDesC& aAccountName, const RArrayIAP& aIapList, const TSmtpAccount& aSmtpAccount, const CImSmtpMobilitySettings& aSettings, TBool aReadOnly); - IMPORT_C TSmtpMobilityAccount CreateSmtpMobilityAccountL(const TDesC& aAccountName, const RArrayIAP& aIapList, const TSmtpAccount& aSmtpAccount, const TSmtpAccount& aLinkedSmtpAccount, TBool aReadOnly); - IMPORT_C void GetSmtpMobilityAccountsL(const TSmtpAccount& aSmtpAccount, RArray& aAccounts); - IMPORT_C void DeleteSmtpMobilityAccountL(const TSmtpMobilityAccount& aAccount); - - IMPORT_C void PopulateDefaultSmtpMobilitySettingsL(CImSmtpMobilitySettings& aSettings); - IMPORT_C void LoadSmtpMobilitySettingsL(const TSmtpMobilityAccount& aAccount, CImSmtpMobilitySettings& aSettings); - IMPORT_C void SaveSmtpMobilitySettingsL(const TSmtpMobilityAccount& aAccount, const CImSmtpMobilitySettings& aSettings); - - IMPORT_C void LoadSmtpMobilityAccountIapListL(const TSmtpMobilityAccount& aAccount, RArrayIAP& aIapList); - IMPORT_C void SaveSmtpMobilityAccountIapListL(const TSmtpMobilityAccount& aAccount, const RArrayIAP& aIapList); - - IMPORT_C TBool IsAccountReadOnlyL(const TSmtpMobilityAccount& aAccount); - - // Internal routines - IMPORT_C void GetSmtpMobilityAccountsL(RArray& aAccounts); - IMPORT_C TBool LoadSmtpMobilitySettingsL(TSmtpAccountId& aSmtpAccountId, TUint32 aIap, CImSmtpMobilitySettings& aSettings); - -private: - CEmailAccounts(); - void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* ); - CMsvSession& SessionL(); - CRepository& PopRepositoryL(); - CRepository& ImapRepositoryL(); - CRepository& SmtpRepositoryL(); - - TMsvId CreateEmailServiceL(CMsvEntry& aMsvEntry, const TDesC& aAccountName, TUid aMTMType, TBool aVisible); - void SetRelatedIdL(CMsvEntry& aMsvEntry, TMsvId aId, TMsvId aRelatedId); - void SetEntryDetailsL(TMsvId aId, const TDesC& aAccountName); - void UnSetInPreparationFlagsL(CMsvEntry& aMsvEntry, TMsvId aId, TInt aAccountId); - void DeleteServiceEntryL(CMsvEntry& aMsvEntry, TMsvId aId); - - TUint GetNextEmptyAccountSlotL(CRepository& aRepository); - TUint32 FindEmailAccountL(TMsvId aService, CRepository& aRepository); - - void LoadIAPPrefSettingsL(TUint32 aAccountId, CImIAPPreferences& aIAP, CRepository& aRepository); - void DoLoadPopSettingsL(TUint32 aAccountId, CImPop3Settings& aPopSettings); - void DoLoadImapSettingsL(TUint32 aAccountId, CImImap4Settings& aImapSettings); - void DoLoadSmtpSettingsL(TUint32 aAccountId, CImSmtpSettings& aSmtpSettings); - - void SaveIAPPrefSettingsL(TUint32 aAccountId, const CImIAPPreferences& aIAP, CRepository& aRepository); - void DoSavePopSettingsL(TUint32 aAccountId, const CImPop3Settings& aPopSettings); - void DoSaveSmtpSettingsL(TUint32 aAccountId, const CImSmtpSettings& aSmtpSettings); - void DoSaveImapSettingsL(TUint32 aAccountId, const CImImap4Settings& aImapSettings); - void DoSaveImapSyncDownloadRulesL(TUint32 aAccountId, const CImapSyncDownloadRules& aRules, CRepository& aRepository); - - TImapAccount CreateImapAccountL(const TDesC& aAccountName, const CImImap4Settings& aImapSettings, - const CImIAPPreferences& aImapIAP, const CImapSyncDownloadRules* aSyncDownloadRules, TBool aReadOnly); - - TUint32 DoCreatePopAccountL(const TDesC& aAccountName, const CImPop3Settings& aPopSettings, - const CImIAPPreferences& aPopIAP, TMsvId aPopService, TMsvId aRelatedService, TBool aReadOnly); - TUint32 DoCreateImapAccountL(const TDesC& aAccountName, const CImImap4Settings& aImapSettings, - const CImIAPPreferences& aImapIAP, const CImapSyncDownloadRules* aSyncDownloadRules, TMsvId aImapService, - TMsvId aRelatedService, TBool aReadOnly); - TUint32 DoCreateSmtpAccountL(TPopAccount& aPopAccount, const CImSmtpSettings& aSmtpSettings, - const CImIAPPreferences& aSmtpIAP, TMsvId aSmtpService, CMsvEntry& aMsvEntry, TUint32& aPopAccountId, TBool aReadOnly); - TUint32 DoCreateSmtpAccountL(TImapAccount& aImapAccount, const CImSmtpSettings& aSmtpSettings, - const CImIAPPreferences& aSmtpIAP, TMsvId aSmtpService, CMsvEntry& aMsvEntry, TUint32& aImapAccountId, TBool aReadOnly); - TUint32 DoCreateSmtpAccountL(const TDesC& aAccountName, const CImSmtpSettings& aSmtpSettings, - const CImIAPPreferences& aSmtpIAP, TMsvId aSmtpService, TMsvId aRelatedService, TBool aReadOnly); - - void DeleteIAPPrefSettingsL(TUint32 aAccountId, CRepository& aRepository); - void DeletePopSettings(TUint32 aAccountId, CRepository& aRepository); - void DeleteSmtpSettings(TUint32 aAccountId, CRepository& aRepository); - void DeleteImapSettings(TUint32 aAccountId, CRepository& aRepository); - void DeleteImapSyncDownloadRulesL(TUint32 aAccountId, CRepository& aRepository); - - void GetEmailServicesL(CMsvEntrySelection& aServices, TUid aMTMType, CMsvEntry& aMsvEntry); - - TBool IsAsciiPrintable(const TDesC16& aText); - TBool IsAsciiPrintable(const TDesC8& aText); - TBool IsUnicodePrintable(const TDesC16& aText); - - TSmtpMobilityAccount DoCreateSmtpMobilityAccountL(const TDesC& aAccountName, const RArrayIAP& aIapList, const CImSmtpMobilitySettings& aSettings, const TSmtpAccount& aSmtpAccount, TSmtpAccountId aLinkedSmtpAccountId, TBool aReadOnly); - void AddMobilityAccountToSmtpAccountL(const TSmtpAccount& aSmtpAccount, const RArrayIAP& aIapList, TUint32 aMobAccRepId, CRepository& aRepository); - void AddLinkToMobilityAccountL(TSmtpAccountId aLinkedSmtpAccountId, TUint32 aMobAccRepId, CRepository& aRepository); - TInt FindIapListEntryInSmtpMobilityAccountListL(const RArrayIAP& aIapList, CRepository& aRepository, TUint32 aSmtpAccRepId, TInt aNumEntries, TInt aIgnorePos); - TInt FindAccountIdInSmtpMobilityAccountListL(TUint32 aMobAccRepId, CRepository& aRepository, TUint32 aSmtpAccRepId, TInt aNumEntries); - void GetSmtpAccountInfoForMobilityAccountL(TUint32 aMobAccRepId, CRepository& aRepository, TUint32& aSmtpAccRepId, TInt& aPos); - void DeleteAllOwnedMobilityAccountsL(TUint32 aSmtpAccRepId, CRepository& aRepository); - void DeleteAllLinkedMobilityAccountsL(TUint32 aLinkedSmtpAccRepId, CRepository& aRepository); - void DeleteSmtpMobilityAccountListEntryL(TUint32 aMobAccRepId, CRepository& aRepository, TUint32 aSmtpAccRepId); - void DeleteSmtpMobilityAccountFromLinkedSmtpAccountL(TUint32 aMobAccRepId, CRepository& aRepository); - TBool IsSmtpTypeAccountReadOnlyL(TUint32 aAccRepId); - TBool IsSmtpMobilityAccount(CRepository& aRepository, TUint32 aAccRepId); - -private: - enum TEmailSettingTypes - { - // Partial CenRep Id for service settings - EServiceSettingType = 0x00000000, - // Partial CenRep Id for IAP Prefs - EIAPPrefSettingType = 0x00010000, - // CenRep mask for email accounts - EAccountMask = 0x800FFFFF - }; - - enum TPOPServiceSettingsCenRepId - { - EPOPServiceId = 0x00000000, - EPOPAccountNameId = 0x00000001, - EPOPRelatedSMTPServiceId = 0x00000002, - EPOPSettingsVersionId = 0x00000003, - EPOPServerAddressId = 0x00000004, - EPOPPortNumberId = 0x00000005, - EPOPFlagsId = 0x00000006, - EPOPLoginNameId = 0x00000007, - EPOPPasswordId = 0x00000008, - EPOPMaxEmailSizeId = 0x00000009, - EPOPGetEmailOptionsId = 0x0000000A, - EPOPInboxSynchronisationLimitId = 0x0000000B, - EPOPPopulationLimitId = 0x0000000C, - EPOPReadOnlyAccountId = 0x0000000D, - EPOPTlsSslDomainId = 0x0000000F - }; - - enum TIMAPServiceSettingsCenRepId - { - EIMAPServiceId = 0x00000000, - EIMAPAccountNameId = 0x00000001, - EIMAPRelatedSMTPServiceId = 0x00000002, - EIMAPSettingsVersionId = 0x00000003, - EIMAPServerAddressId = 0x00000004, - EIMAPPortNumberId = 0x00000005, - EIMAPFlagsId = 0x00000006, - EIMAPLoginNameId = 0x00000007, - EIMAPPasswordId = 0x00000008, - EIMAPFolderPathId = 0x00000009, - EIMAPPathSeparatorId = 0x0000000A, - EIMAPSynchronisationStrategyId = 0x0000000B, - EIMAPSubscriptionStrategyId = 0x0000000C, - EIMAPMaxEmailSizeId = 0x0000000D, - EIMAPGetMailOptionsId = 0x0000000E, - EIMAPInboxSynchronisationLimitId= 0x0000000F, - EIMAPMailboxSynchronisationLimitId= 0x00000010, - EIMAPTlsSslDomainId = 0x00000012, - EIMAPSyncRateId = 0x00000020, - EIMAPFetchSizeId = 0x00000030, - EIMAPIdleTimeoutId = 0x00000040, - EPartialMailOptionsId = 0x00000050, - EBodyTextSizeLimitId = 0x00000060, - EAttachmentSizeLimitId = 0x00000070, - EIMAPSearchStringId = 0x00000080, - EIMAPReadOnlyAccountId = 0x00000090, - // 0x00001000 - 0x00002FFF reserved for sync download rules - // 0x00010000 - 0x00014FFF reserved for IAP/SNAP preferences - }; - - enum TIMAPSyncDownloadRulesCenRepInfo - { - EIMAPSyncDownloadRulesVersionId = 0x00001000, - EIMAPNumInboxSyncDownloadRulesId = 0x00001001, - EIMAPNumFolderSyncDownloadRulesId = 0x00001002, - - EIMAPInboxSyncDownloadRulesBearerTypesId = 0x00001010, - EIMAPInboxSyncDownloadRulesMailOptionsId = 0x00001011, - EIMAPInboxSyncDownloadRulesTotalSizeLimitId = 0x00001012, - EIMAPInboxSyncDownloadRulesBodyTextSizeLimitId = 0x00001013, - EIMAPInboxSyncDownloadRulesAttachmentSizeLimitId = 0x00001014, - EIMAPInboxSyncDownloadRulesGetMailBodyPartsId = 0x00001015, - EIMAPInboxSyncDownloadRulesMaxEmailSizeId = 0x00001016, - - EIMAPFolderSyncDownloadRulesBearerTypesId = 0x00001030, - EIMAPFolderSyncDownloadRulesMailOptionsId = 0x00001031, - EIMAPFolderSyncDownloadRulesTotalSizeLimitId = 0x00001032, - EIMAPFolderSyncDownloadRulesBodyTextSizeLimitId = 0x00001033, - EIMAPFolderSyncDownloadRulesAttachmentSizeLimitId = 0x00001034, - EIMAPFolderSyncDownloadRulesGetMailBodyPartsId = 0x00001035, - EIMAPFolderSyncDownloadRulesMaxEmailSizeId = 0x00001036, - - // Offset between sets of rules - EIMAPSyncDownloadRulesOffset = 0x40 - }; - - enum TIAPPreferencesCenRepId - { - // single settings - EIAPPrefVersion = 0x00010000, - EIAPChoicesCount = 0x00010001, - - // List of settings - EIAPListIDs = 0x00011000, - EIAPListDialogPrefs = 0x00012000, - // EIAPSnapId placed here is a deviation from Design doc. Remove comment after a decision is made - EIAPSnapId = 0x00014000 // The same value is to be used in all account types - }; - - enum TIMAPTransportBufferSizesCenRepInfo - { - EIMAPTransportBufferSizesVersionId = 0x80000100, - EIMAPNumTransportBufferSizesId = 0x80000101, - - EIMAPTransportBufferSizesBearerTypesId = 0x80000110, - EIMAPTransportBufferSizesFetchRequestSizeId = 0x80000111, - EIMAPTransportBufferSizesMaxOutstandingFetchResponsesId = 0x80000112, - - // Offset between entries - EIMAPTransportBufferSizesOffset = 0x20 - }; - - enum TSMTPServiceSettingsCenRepId - { - ESMTPServiceId = 0x00000000, - ESMTPAccountNameId = 0x00000001, - ESMTPSettingsVersionId = 0x00000002, - ESMTPServerAddressId = 0x00000003, - ESMTPPortNumberId = 0x00000004, - ESMTPFlagsId = 0x00000005, - ESMTPEmailAliasId = 0x00000006, - ESMTPEmailAddressId = 0x00000007, - ESMTPReplyToAddressId = 0x00000008, - ESMTPReceiptAddressId = 0x00000009, - ESMTPBodyEncodingId = 0x0000000A, - ESMTPDefaultMsgCharSetId = 0x0000000B, - ESMTPSendCopyToSelfId = 0x0000000C, - ESMTPSendMessageOptionId = 0x0000000D, - ESMTPLoginNameId = 0x0000000E, - ESMTPPasswordId = 0x0000000F, - ESMTPRelatedServiceId = 0x00000010, - ESMTPIncludeToCcId = 0x00000011, - ESMTPReadOnlyAccountId = 0x00000012, - ESMTPParentAccountId = 0x00000013, - ESMTPTlsSslDomainId = 0x00000014, - ESMTPLinkedAccountId = 0x00000015 - }; - - enum TSMTPLinkedMobilityAccountListCenRepInfo - { - ESMTPLinkedMobilityAccountListVersionId = 0x00015000, - ESMTPLinkedMobilityAccountListNumEntriesId = 0x00015001, - ESMTPLinkedMobilityAccountListEntryId = 0x00015010, - - // Maximum number of list entries - ESMTPLinkedMobilityAccountListMaxEntries = 2048 - }; - - enum TSMTPMobilityAccountListCenRepInfo - { - ESMTPMobilityAccountListVersionId = 0x00016000, - ESMTPMobilityAccountListNumEntriesId = 0x00016001, - - ESMTPMobilityAccountListAccountId = 0x00016010, - ESMTPMobilityAccountListNumIapsId = 0x00016011, - ESMTPMobilityAccountListIapId = 0x00016020, - - // Offset between entries - ESMTPMobilityAccountListOffset = 0x40, - - // Maximum number of list entries - ESMTPMobilityAccountMaxEntries = 32 - }; - -private: - CMsvSession* iMsvSession; - CRepository* iPOPRepository; - CRepository* iSMTPRepository; - CRepository* iIMAPRepository; - }; - -#endif // __CEMAILACCOUNTS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cfragmentedstring.h --- a/epoc32/include/cfragmentedstring.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// A string class implementation which allows quick addition of partial strings -// (no copying) by using an internal array of fragmented strings. -// The class allows comprehensive character based matching functionality -// along with infinite depth marking. -// -// - -#ifndef __CFRAGMENTEDSTRING_H__ -#define __CFRAGMENTEDSTRING_H__ - -// includes -#include -#include - - -// -// CFragmentedString - -//##ModelId=3B666BC6034A - - - -class CFragmentedString : protected CArrayPtrFlat -/** -Utility that allows a single string to be built from an array of consecutive sub-strings. - -The sub-strings can be inserted by reference or copied. - -The object maintains information that points to a current position within the string. A typical -use is to test the contents of the string using one of the Match...() functions, and then use -ConsumeMatched() to advance past the matched area. - -The class also supports inserting an unlimited number of marks in the string, and performing -operations relative to the head (i.e. last inserted) mark. - @publishedAll - @released -*/ - { -protected: - class TStringMark - /** A mark at a string position. */ - { - public: - /** Constructor. - - @param aIndex Array index of the marked sub-string - @param aCharacter Character position within the sub-string for the mark - */ - TStringMark(TInt aIndex, TInt aCharacter) - : iMarkIndex(aIndex), iMarkCharacter(aCharacter) - { - } - - public: - /** Array index of the marked sub-string. */ - TInt iMarkIndex; - /** Character position within the sub-string for the mark. */ - TInt iMarkCharacter; - }; - /** A stack of string position marks. */ - typedef CStack CMarkStack; - -public: - /** Defines possible results of a string matching operation for this class. */ - enum TStringMatch - { - /** There was no match. */ - ENoMatch, - /** There was a complete match. */ - EMatch, - /** String contained insufficient data to perform the match operation. - - This can mean that the start of the target string was matched, but the string - being searched ended before a complete match was found. */ - EInsufficientData - }; - -public: - IMPORT_C CFragmentedString(); - //##ModelId=3B666BC700AD - IMPORT_C ~CFragmentedString(); - - //##ModelId=3B666BC70099 - IMPORT_C void AddStringL(HBufC* aString); // this version is more efficient - //##ModelId=3B666BC700A3 - IMPORT_C void AddStringL(const TDesC& aString); - - //##ModelId=3B666BC70090 - IMPORT_C TInt Length() const; - //##ModelId=3B666BC70071 - IMPORT_C HBufC* StringL() const; - //##ModelId=3B666BC70068 - IMPORT_C HBufC* ContentL() const; - //##ModelId=3B666BC70067 - IMPORT_C void Reset(); - - //##ModelId=3B666BC7005D - IMPORT_C TStringMatch Match(const TDesC& aString); - //##ModelId=3B666BC70049 - IMPORT_C TStringMatch MatchRange(const TUint aLower, const TUint aUpper); - //##ModelId=3B666BC7003F - IMPORT_C TStringMatch MatchSelect(const TDesC& aSelection); - //##ModelId=3B666BC70037 - IMPORT_C TStringMatch MatchNotSelect(const TDesC& aSelection); - //##ModelId=3B666BC70036 - IMPORT_C void ConsumeMatched(); - - //##ModelId=3B666BC70035 - IMPORT_C HBufC* MarkedL(); - //##ModelId=3B666BC7002B - IMPORT_C HBufC* MarkedWithInitialTextL(const TDesC& aInitialText); - //##ModelId=3B666BC70022 - IMPORT_C void Mark(); // Mark can leave - //##ModelId=3B666BC70021 - IMPORT_C void DeleteMark(); - //##ModelId=3B666BC70018 - IMPORT_C void ResetToMark(); - - //##ModelId=3B666BC7000E - IMPORT_C void ReplaceMarkedL(HBufC* aString); - //##ModelId=3B666BC70005 - IMPORT_C void ReplaceMarkedAndSkipL(HBufC* aString); - //##ModelId=3B666BC70003 - IMPORT_C void InsertStringL(HBufC* aString); - -protected: - //##ModelId=3B666BC603E1 - IMPORT_C void DeleteToMark(const TStringMark& aStringMark); - //##ModelId=3B666BC603C4 - IMPORT_C void InsertStringToL(HBufC* aString, TInt aStringIndex, TInt aLengthIntoString); - //##ModelId=3B666BC70072 - HBufC* StringL(TInt aStartIndex, TInt aStartCharacter, TInt aEndIndex, TInt aEndCharacter, const TDesC* aInitialText=NULL) const; - //##ModelId=3B666BC603C3 - void StartMatch(); - //##ModelId=3B666BC603B8 - CFragmentedString::TStringMatch DoMatchSelect(const TDesC& aSelection, TBool aInSelection); - //##ModelId=3B666BC603AE - TBool FindNextMatchChar(TUint& aChar); - -protected: - //##ModelId=3B666BC603A4 - /** Result of the last match operation. */ - TStringMatch iMatched; - - /** Array index of the sub-string found in the last match operation. */ - //##ModelId=3B666BC6039A - TInt iMatchedToIndex; - /** Current character position within the iMatchedToIndex sub-string found in the last match operation. */ - //##ModelId=3B666BC60390 - TInt iMatchedToCharacter; - /** Array index of the current sub-string. */ - //##ModelId=3B666BC60386 - TInt iCurrentIndex; - /** Current character position within the current sub-string. */ - //##ModelId=3B666BC6037C - TInt iCurrentCharacter; - /** Stack of marks in the string. - - Mark() pushes a mark on the stack; DeleteMark() pops one off. - */ - //##ModelId=3B666BC60372 - CMarkStack iMarkStack; - }; - -#endif // __CFRAGMENTEDSTRING_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/chttpformencoder.h --- a/epoc32/include/chttpformencoder.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CHTTPFormEncoder.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CHTTPFORMENCODER__ -#define __CHTTPFORMENCODER__ - -// System includes -#include - -//##ModelId=3C4C187902EB -class CHTTPFormEncoder : public CBase, public MHTTPDataSupplier -/** -A data supplier class that is used to build up data that is to be encoded to application/x-www-form-urlencoded. - -A client will create an instance of this class and add name/value pairs. They then use this as the data supplier for the -body of an http request that is a forms submission. - -The name and value must both be supplied in the correct character encoding that you want to send to the server. This then -gets url encoded. -@publishedAll -@released -*/ - { -public: - //##ModelId=3C4C18790347 - IMPORT_C static CHTTPFormEncoder* NewL(); - //##ModelId=3C4C18790346 - IMPORT_C ~CHTTPFormEncoder(); - - // from MHTTPDataSupplier - //##ModelId=3C4C1879033D - virtual TBool GetNextDataPart(TPtrC8& aDataPart); - //##ModelId=3C4C1879033C - virtual void ReleaseData(); - //##ModelId=3C4C1879033B - virtual TInt OverallDataSize(); - // - //##ModelId=3C4C18790335 - virtual TInt Reset(); - - /** Adds a field to the data. - A field consists a name and value pair - @param aFieldName A name. This must not be empty - @param aFieldValue A value. This may be an empty descriptor - @leave KErrNoMemory There was not enough memory - @leave KErrArgument aFieldName was empty - @panic Will panic if called after the first data has been supplied or OverallDataSize has been called - */ - //##ModelId=3C4C18790332 - IMPORT_C void AddFieldL(const TDesC8& aFieldName, const TDesC8& aFieldValue); - - -private: - //##ModelId=3C4C18790331 - CHTTPFormEncoder(); - //##ModelId=3C4C1879032A - void ConstructL(); - - //##ModelId=3C4C18790328 - TBool IsAlphaNumeric(TUint8 aChar); - //##ModelId=3C4C1879031F - void AppendSpecialChar(TUint8 aChar); - //##ModelId=3C4C1879031D - void AppendData(const TDesC8& aData); - -private: - enum THTTPFormEncoderState - { - EAllowAppendData, // when first constructed - ESuppliedSize, - ESupplyingData, // GetDataChunk has been called but ReleaseData has not - EDataReleased - }; - - //##ModelId=3C4C18790315 - THTTPFormEncoderState iState; - //##ModelId=3C4C1879030D - HBufC8* iData; // data is ALWAYS kept in the form-url-encoded format - }; - -#endif // __CHTTPFORMENCODER__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/chttpresponse.h --- a/epoc32/include/chttpresponse.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,363 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Purpose: This file provides the definition of the CHTTPResponse class. -// The HTTP Response class encodes HTTP response headers only. It -// contains the methods used to transcode from WSP->HTTP fields -// -// - -#ifndef __CHTTPRESPONSE_H__ -#define __CHTTPRESPONSE_H__ - -// System includes -// -#include -#include -#include -#include - - -// Forward class declarations -// -class CPushMessage; - -// Class definition for CHTTPResponse -// -//##ModelId=3B712B9A0231 -class CHTTPResponse : public CBase -/** -@publishedAll -@deprecated -*/ - { -public: // Methods - - // Factory method to construct this class. - // - // Rtn: a new CHTTPResponse object, by ptr. Ownership is transferred to the - // caller. - // - //##ModelId=3B712B9B000A - IMPORT_C static CHTTPResponse* NewL(); - - // Destructor for this class. Removes this object and releases memory held - // by it - // - //##ModelId=3B712B9B0000 - IMPORT_C virtual ~CHTTPResponse(); - - // Clean out the fields buffer - // - //##ModelId=3B712B9A03D6 - IMPORT_C void Reset(); - - // Set the fields buffer with the response received from the WAP Stack - // - // In: - // aResponse - an 8-bit descriptor field containing the origin server's - // WSP-encoded response header. Ownership is transferred to - // this class. - // - //##ModelId=3B712B9A03D4 - IMPORT_C void AddResponse(HBufC8* aResponse); - - // Accessor to the HTTP response fields buffer - // - // Rtn: a reference to the response. Ownership is _NOT_ transferred - // - // NOTE THIS SHOULD RETURN CONST - BUT CAN'T BE CHANGED SINCE IT WOULD - // BREAK BC. - //##ModelId=3B712B9A03CA - IMPORT_C HBufC8& Response() const; - - // Accessor to the HTTP status code (e.g. 400, 300, 200, 500) - // - // Rtn: the status code - series number only. - // - //##ModelId=3B712B9A03C1 - IMPORT_C THttpStatusCode StatusCode() const; - - // Accessor to the HTTP detailed status code (e.g. 404, 304, 200, 501) - // - // Rtn: the status code - series and specific code value - // - //##ModelId=3B712B9A03C0 - IMPORT_C THttpStatusCode DetailedStatusCode() const; - - // Accessor to set the HTTP response status. - // - // In: - // aCode - the WSP-encoded status code - // - //##ModelId=3B712B9A03B6 - IMPORT_C void SetStatusCode(TInt aCode); - - // Method to find a named field, that returns null terminated - // WSP text strings. - // - // In: - // aField - the field type - // aStartIndex - the index to search from (defaults to the buffer start) - // - // Out: - // aDesc - a pointer-type descriptor into the response buffer at the - // position where the field was located. The caller must NOT - // modify the descriptor contents - // - // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise - // - //##ModelId=3B712B9A0390 - IMPORT_C TBool FindField(THttpHeaderField aField - , TPtrC8& aDesc - , TInt aStartIndex = 0) const; - - // Method to find a named field, that returns 8-bit octet data (binary - // or strings - not stipulated which). - // - // In: - // aField - the field type - // aStartIndex - the index to search from (defaults to the buffer start) - // - // Out: - // aDesc - a pointer-type descriptor into the response buffer at the - // position where the field was located. The caller must NOT - // modify the descriptor contents - // - // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise - // - //##ModelId=3B712B9A0384 - IMPORT_C TBool FindBinaryDescField(THttpHeaderField aField - , TPtrC8& aDesc - , TInt aStartIndex = 0) const; - - // Method to find a named field, that returns an EPOC date/time structure. - // - // In: - // aField - the field type - // aStartIndex - the index to search from (defaults to the buffer start) - // - // Out: - // aTime - a structure containing the time (and date) found in the header - // - // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise - // - //##ModelId=3B712B9A03A2 - IMPORT_C TBool FindField(THttpHeaderField aField - , TTime& aTime - , TInt aStartIndex = 0) const; - - // Method to find a named field within the Cache Control header - // - // In: - // aField - the field type - // - // Out: - // - // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise - // - //##ModelId=3B712B9A0370 - IMPORT_C TInt FindCacheControlFieldValue(TCacheControlFieldValue aField) const; - - // Method to find a named field within the Cache Control header, - // that returns an EPOC date/time structure. - // - // In: - // aField - the field type - // - // Out: - // aTime - a structure containing the time (and date) found in the header field - // - // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise - // - //##ModelId=3B712B9A035C - IMPORT_C TBool ExtractCacheControlTime(TCacheControlFieldValue aField, TTime& aTime) const; - - // Method to search for the content type encoded in the response header - // - // Out: - // aDesc - a pointer-type descriptor into the appropriate element of an - // array prefilled with all the content types that have WSP - // encodings. e.g. "text/vnd.wap.wml". The contents of the - // descriptor must NOT be modified. - // - //##ModelId=3B712B9A0348 - IMPORT_C void ContentType(TPtrC8& aDesc) const; - - // Method to search for the realm encoded in the response header, when the - // response challenges the client for HTTP authentication (code 401) - // - // Out: - // aDesc - a pointer-type descriptor into the response header buffer - // positioned at the realm string within the challenge. The - // contents of the descriptor must NOT be modified. - // - // Rtn: TBool - set to ETrue if a www-authenticate realm was found, EFalse - // otherwise - // - //##ModelId=3B712B9A033F - IMPORT_C TBool FindRealm(TPtrC8& aRealm) const; - - // Method to search for the character set encoded in the Content-Type - // field ofthe response header - // - // Out: - // aDesc - a pointer-type descriptor into the appropriate element of an - // array prefilled with all the character sets that have WSP - // encodings. e.g. "utf-8". The contents of the descriptor must - // NOT be modified. - // - // Rtn: TBool - set to ETrue if a character set was found, EFalse if not - // - //##ModelId=3B712B9A032A - IMPORT_C TBool CharSet(TPtrC8& aDesc) const; - -protected: // Methods - - // Normal constructor - do non-allocating creation of this class - // - IMPORT_C CHTTPResponse(); - - // Second phase construction - any allocation for this class must take place - // here. Sets up the resources required by an HTTP Response. - // - //##ModelId=3B712B9A0322 - IMPORT_C void ConstructL(); - - //friend class declaration - only need the following function - friend class CPushMessage; - // Method to locate a named field in the response header, starting at the - // specified index position. - // - // In: - // aField - the header field type - // aStartIndex - the (optional) position in the header to start searching - // - // Rtn: TInt - the index position of the required field _value_ (not the - // field name), or KErrNotFound otherwise. - // - //##ModelId=3B712B9A030D - IMPORT_C TInt LocateField(THttpHeaderField aField, TInt aStartIndex = 0) const; - - // Perform a look-up of content type given a WSP encoding value, used as - // an index. - // - // In: - // aIndex - the WSP encoding value - // - // Rtn: const TText8* - the required content type text - NOT to be changed - // - //##ModelId=3B712B9A0352 - IMPORT_C const TText8* ContentType(TInt aContentTypeCode) const; - - // Perform a look-up of character set given a WSP encoding value, used as - // an index. - // - // In: - // aCharsetCode - the index into the content types table/ - // - // Rtn: const TText8* - the required 8-bit character set text - NOT to be - // changed by the caller - // - //##ModelId=3B712B9A0334 - IMPORT_C const TText8* CharSet(TInt aCharsetCode) const; - -private: // Attributes - - // The 8-bit buffer used to store the HTTP response fields - // - //##ModelId=3B712B9A02AA - HBufC8* iResponse; - - // The HTTP Status code (coarse - ie. series only, e.g. 100, 200 etc.) - // - //##ModelId=3B712B9A0296 - THttpStatusCode iStatusCode; - - // The detailed HTTP Status code (within series, e.g. 102, 204, 401 etc.) - // - //##ModelId=3B712B9A0282 - THttpStatusCode iDetailedStatusCode; - - // Declare the CLogClient pointer - __DECLARE_LOG - -private: // Methods - - // Do a conversion from 32-bit UIntVar encoding into 32-bit integer - // - TInt ParseUIntVar(const TDesC8& aBuffer, TInt& aVal) const; - - // Extract a WSP encoded MultiOctet Integer encoding into 32-bit integer - // - // In: - // aSource - the source Multi-Octet integer - // - // Out: - // aInt - the 32-bit resulting integer - // - //##ModelId=3B712B9A02F8 - void ExtractMultiOctetInteger(TInt& aInt, const TPtrC8& aSource) const; - - // Method to find a named field within the Cache Control header - // - // In: - // aSource - the descriptor containing the date value - // aFrom - The position in the descriptor to start from - // - // Out: - // aTime - a structure containing the time (and date) found in the descriptor - // - //##ModelId=3B712B9A02E4 - void ExtractFieldDateValue(const TPtrC8& aSource, TInt aFrom, TTime& aTime) const; - - // Method to find a named field within the Cache Control header - // - // In: - // aField - the field type - // - // Out: - // the found aCacheControl string - // - // Rtn: TInt - set to KErrNotFound if the field was not found, - // otherwise the position in the cache control descriptor that the field was found - // - //##ModelId=3B712B9A0372 - TInt FindCacheControlFieldValue(TCacheControlFieldValue aField,TPtrC8& aCacheControl) const; - - //##ModelId=3B712B9A02DA - void Panic(THttpPanicCode aPanicCode) const; - - // Spare methods for future BC. Const- and non-const versions to assist - // the caller in preserving const-ness. IMPORT_C ensures they reserve a - // slot in the vtbl, which is essential to preseve future BC. - // - //##ModelId=3B712B9A02D0 - IMPORT_C virtual TAny* Extend_CHTTPResponse(TAny* aArgs); - //##ModelId=3B712B9A02C6 - IMPORT_C virtual TAny* Extend_CHTTPResponse_const(TAny* aArgs) const; - -#if defined _DEBUG - // Debug method definition to allow class invariant testing - // Called by the standard macro __TEST_INVARIANT - // - //##ModelId=3B712B9A02BD - void __DbgTestInvariant() const; - - //##ModelId=3B712B9A02B2 - void DumpToLog(const TDesC8& aData) const; -#endif - - }; - -#endif // __CHTTPRESPONSE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cimattachmentwaiter.h --- a/epoc32/include/cimattachmentwaiter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CIMATTACHMENTWAITER_H__ -#define __CIMATTACHMENTWAITER_H__ - -#include - -class CImEmailMessage; - -/** -An Waiter object used to wait for an attachment to be added to an email message. - -@publishedAll -@released -*/ -class CImAttachmentWaiter : public CActive - { -public: - IMPORT_C static CImAttachmentWaiter* NewL(); - IMPORT_C ~CImAttachmentWaiter(); - IMPORT_C void StartWaitingL(TRequestStatus& aStatus, CImEmailMessage* aMailMessage, TBool aDeleteMessage = ETrue); - -private: - CImAttachmentWaiter(); - void Reset(); - - // from CActive - void RunL(); - void DoCancel(); - -private: - TRequestStatus* iReportStatus; - CImEmailMessage* iMailMessage; - TBool iDeleteMessage; - }; - -#endif // __CIMATTACHMENTWAITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cimplainbodytext.h --- a/epoc32/include/cimplainbodytext.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef _CIMPLAINBODYTEXT_H_ -#define _CIMPLAINBODYTEXT_H_ - -class CImEmailMessage; -class CImStoreMessagePart; -class CMsgActive; -/** -This class is a wrapper over CMsvPlainBodyText class of message server. -The pointer to this class can be obtained by calling OpenPlainBodyTextForReadL -or OpenPlainBodyTextForWriteL API of the CImEmailMessage class. -This can be used to store/restore a email message created by using the -CImEmailOperation class. - -@see CImEmailMessage, CImEmailOperation -@publishedAll -@released -*/ - -class CImPlainBodyText: public CMsgActive - { -public: - static CImPlainBodyText* NewL(CImEmailMessage& aEmailMessage, CMsvEntry& aMsvEntry, CImEmailMessage::TImEmailEntryType aEntryType, TInt aChunkLength, TBool aEditMode); - IMPORT_C ~CImPlainBodyText(); - - IMPORT_C void StoreChunkL(const TDesC8& aChunk, TRequestStatus& aStatus); - IMPORT_C void StoreChunkL(const TDesC8& aChunk); - - IMPORT_C void StoreChunkL(const TDesC16& aChunk, TRequestStatus& aStatus); - IMPORT_C void StoreChunkL(const TDesC16& aChunk); - - IMPORT_C void StoreRichTextAsPlainTextL(CRichText& aRichText); - - IMPORT_C void CommitL(TRequestStatus& aStatus); - IMPORT_C void CommitL(TRequestStatus& aStatus, CImMimeHeader& aMimeHeader); - - IMPORT_C void NextChunkL(TDes8& aChunk, TRequestStatus& aStatus); - IMPORT_C void NextChunkL(TDes8& aChunk); - - IMPORT_C void NextChunkL(TDes16& aChunk, TRequestStatus& aStatus); - IMPORT_C void NextChunkL(TDes16& aChunk); - - IMPORT_C void PreviousChunkL(TDes8& aChunk, TRequestStatus& aStatus); - IMPORT_C void PreviousChunkL(TDes8& aChunk); - - IMPORT_C void PreviousChunkL(TDes16& aChunk, TRequestStatus& aStatus); - IMPORT_C void PreviousChunkL(TDes16& aChunk); - -private: - CImPlainBodyText(CImEmailMessage& aEmailMessage, CMsvEntry& aMsvEntry); - void ConstructL(TInt aChunkLength, CImEmailMessage::TImEmailEntryType aEntryType, TBool aEditMode); - void DoRunL(); // From CMsgActive - void DoCancel(); -private: - CImEmailMessage& iEmailMessage; - CImStoreMessagePart* iStoreMessagePart; - /** The CMsvEntry associated with the message being stored/restored.*/ - CMsvEntry& iMsvEntry; - /** The array of framework/server class to store/restore body text in chunks.*/ - RPointerArray iPlainTextArray; - /** The id of the message. */ - TMsvId iMessageId; - /** The Store associated with the message being stored/restored.*/ - CMsvStore* iStore; - /** For indexing the plaintext array */ - TInt iIndex; - /** The 16-bit pointer to a chunk that will be populated with data when asynchronous - 16-bit versions of NextChunkL / PreviousChunkL returns.*/ - TDes16* iChunk16; - /** The 8-bit pointer to a chunk that will be populated with data when asynchronous - 8-bit versions of NextChunkL / PreviousChunkL returns.*/ - TDes8* iChunk8; - - /** Enum indicating which asynchronous chunk retrieving method resulted in a - call to DoRunl.*/ - enum TChunkRetrievalState - { - EIdleState, - ENextChunk8Bit, - ENextChunk16Bit, - EPreviousChunk8Bit, - EPreviousChunk16Bit, - } iChunkRetrievalState; - }; - -#endif //_CIMPLAINBODYTEXT_H_ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/clock.h --- a/epoc32/include/clock.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,389 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__CLOCK_H__) -#define __CLOCK_H__ - -#if !defined(__E32STD_H__) -#include -#endif - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__W32STD_H__) -#include -#endif - -// -// miscellaneous typedefs -// -/** @internalComponent */ -typedef TBuf8<1024> TConstructorBuf8; // implementation class - -// -// miscellaneous enums -// - -/** @internalComponent */ -enum TDisplayType // implementation class - { - EDisplayDigital, - EDisplayAnalog - }; - -/** @internalComponent */ -enum TAnalogDisplayHandFeatureType // implementation class - { - EAnalogDisplayHandFeatureLine, - EAnalogDisplayHandFeaturePolyLine, - EAnalogDisplayHandFeatureCircle - }; - -/** Horizontal alignment options for text in a digital clock's display. - -@see TDigitalDisplayTextSection -@publishedAll -@released */ -enum TDigitalDisplayHorizontalTextAlignment - { - /** Left align text. */ - EDigitalDisplayHorizontalTextAlignmentLeft, - /** Centre align text. */ - EDigitalDisplayHorizontalTextAlignmentCenter, - /** Right align text. */ - EDigitalDisplayHorizontalTextAlignmentRight - }; - -/** Vertical alignment options for text in a digital clock's display. - -@see TDigitalDisplayTextSection -@publishedAll -@released */ -enum TDigitalDisplayVerticalTextAlignment - { - /** Top align text. */ - EDigitalDisplayVerticalTextAlignmentTop, - /** Centre align text, including the character descent. */ - EDigitalDisplayVerticalTextAlignmentCenterInclDescent, - /** Centre align text, excluding the character descent. */ - EDigitalDisplayVerticalTextAlignmentCenterExclDescent, - /** Bottom align text, including the character descent. */ - EDigitalDisplayVerticalTextAlignmentBottomInclDescent, - /** Bottom align text, excluding the character descent. */ - EDigitalDisplayVerticalTextAlignmentBottomExclDescent - }; - -/** Special characters that can be used in a digital clock display. - -@see TDigitalDisplayTextSection -@publishedAll -@released */ -enum TDigitalDisplayLayoutChar - { - /** A flashing block to delimit different sections of the display. - */ - /** A flashing block to delimit different sections of the display. */ - EDigitalDisplayLayoutCharFlashingBlockDelimiter=1 - }; - -// -/** Different types of hand for an analogue clock. - -@publishedAll -@released */ -enum TAnalogDisplayHandType - { - /** A hand that performs one revolution every 12 hours. */ - EAnalogDisplayHandOneRevPer12Hours, - /** A hand that performs one revolution every hour. */ - EAnalogDisplayHandOneRevPerHour, - /** A hand that performs one revolution every minute. */ - EAnalogDisplayHandOneRevPerMinute - }; - -// -// miscellaneous structs -// - -struct STimeDeviceShadow -/** Determines how shadows are added to the clock display. - -@publishedAll -@released */ - { - /** True if shadows should be displayed, else false. */ - TBool iIsOn; - /** Colour of the shadows. */ - TRgb iColor; - /** Offset of shadows from foreground. */ - TPoint iOffset; - }; - -struct SAnalogDisplayAmPm -/** Defines the display parameters of the AM/PM display for an analogue clock. - -@see RAnalogClock -@publishedAll -@released */ - { - /** Position relative to the clock face. */ - TPoint iPositionRelativeToFace; - /** Size. */ - TSize iSize; - /** Shadow settings. */ - STimeDeviceShadow iShadow; - /** Background colour. */ - TRgb iBackgroundColor; - /** Handle to the font to use. This can be obtained using CFbsFont::Handle(). - - @see CFbsFont::Handle() */ - TInt iFontHandle; - /** Colour for text. */ - TRgb iTextColor; - }; - -// -// display-addition classes -// - - -class TDisplayAddition -/** This class is used in the derivation of TAnalogDisplayHand and TDigitalDisplayTextSection. - -@internalComponent */ - { -public: - const TDesC8& Buf() const; -protected: - TConstructorBuf8 iBuf; - }; - -// - -class TDigitalDisplayTextSection : public TDisplayAddition -/** A text section for a digital clock. - -@see RDigitalClock -@publishedAll -@released */ - { -public: - IMPORT_C TDigitalDisplayTextSection(TInt aFontHandle, TRgb aTextColor, TDigitalDisplayHorizontalTextAlignment aHorizontalAlignment, - TDigitalDisplayVerticalTextAlignment aVerticalAlignment, - TInt aHorizontalMargin, TInt aVerticalMargin, const TDesC& aFormat); - // N.B. the font passed in to aFontHandle cannot be destroyed until the - // RDigitalClock has been completely constructed, including all necessary - // calls to RDigitalClock::AddTextSectionL() - }; - -// - -class TAnalogDisplayHand : public TDisplayAddition -/** A hand for an analogue clock. - -A hand is a vector drawing made from a number of features (lines, circles, -polylines). These are specified with the hand assumed to be in the 12 o'clock -position, with TPoint(0,0) being the center of the clock. - -@see RAnalogClock -@publishedAll -@released */ - { -public: - IMPORT_C TAnalogDisplayHand(TAnalogDisplayHandType aType); - IMPORT_C void AddLine(CGraphicsContext::TPenStyle aPenStyle, TRgb aPenColor, const TSize& aPenSize, - const TPoint& aStartPoint, const TPoint& aEndPoint); - IMPORT_C void AddPolyLine(CGraphicsContext::TPenStyle aPenStyle, TRgb aPenColor, const TSize& aPenSize, - CGraphicsContext::TBrushStyle aBrushStyle, TRgb aBrushColor, - TBool aClosed, const CArrayFix* aPointList); // aPointList is not destroyed - IMPORT_C void AddCircle(CGraphicsContext::TPenStyle aPenStyle, TRgb aPenColor, const TSize& aPenSize, - CGraphicsContext::TBrushStyle aBrushStyle, TRgb aBrushColor, - const TPoint& aCircleCenter, TInt aRadius); - inline TInt NumFeatures() const - /** Gets the number of features added to the hand. */ - {return *iNumFeaturesPtr;} -private: - void AppendType(TAnalogDisplayHandFeatureType aType); -private: - TInt* iNumFeaturesPtr; - }; - -// -// utility class -// - -class RAnimWithUtils : public RAnim -/** Utility class to support clock animation. - -@publishedAll -@released -*/ - { -protected: - RAnimWithUtils(RAnimDll& aAnimDll, const RWindowBase& aWindow); - void AppendToConstructorBufL(const TDesC8& aData); - void SendConstructorBufIfCompleteL(TInt aAnimatedObjectType); - void SendConstructorBufL(TInt aAnimatedObjectType); - TBool ConstructorBufExists() const; - TBool ConstructorBufAlreadySent() const; - TConstructorBuf8& ConstructorBuf() const; - void SetNumAdditionsStillExpected(TInt aNumAdditionsStillExpected); -public: - IMPORT_C virtual void Close(); -private: - TConstructorBuf8* iConstructorBuf; // on the heap as it is only required for construction - TBool iConstructorBufAlreadySent; - const RWindowBase& iWindow; - TInt iNumAdditionsStillExpected; - }; - -// -// time-device abstract classes -// - - -class RTimeDevice : public RAnimWithUtils -/** Sets display parameters for clocks. - -@publishedAll -@released -*/ - { -protected: - RTimeDevice(RAnimDll& aAnimDll, const RWindowBase& aWindow); - void AppendDisplayTypeL(TDisplayType aType); - void AppendDigitalDisplayConstructorArgsL(const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, const STimeDeviceShadow& aShadow, - TRgb aBackgroundColor, TInt aNumTextSections); - void AppendAnalogDisplayConstructorArgsL(const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, const STimeDeviceShadow& aShadow, - TInt aFaceHandle, TInt aFaceMaskHandle, TInt aNumHands, const SAnalogDisplayAmPm* aAmPm); -public: - IMPORT_C void SetVisible(TBool aVisible); // can only be called after full construction - by default clocks are invisible - IMPORT_C void SetPositionAndSize(const TPoint& aPosition, const TSize& aSize); // can only be called after full construction - IMPORT_C void SetPosition(const TPoint& aPosition); // can only be called after full construction - IMPORT_C void SetSize(const TSize& aSize); // can only be called after full construction - IMPORT_C void UpdateDisplay(); // can only be called after full construction - IMPORT_C void Draw(); // can only be called after full construction - }; - -// - -class RClock : public RTimeDevice -/** Sets the time for clocks. - -@publishedAll -@released */ - { -protected: - RClock(RAnimDll& aAnimDll, const RWindowBase& aWindow); - void AppendClockConstructorArgsL(TTimeIntervalSeconds aUniversalTimeOffset); -public: - IMPORT_C void SetUniversalTimeOffset(TTimeIntervalSeconds aUniversalTimeOffset); // can only be called after full construction - }; - -// -// time-device concrete classes -// - -class RDigitalClock : public RClock -/** A digital clock. - -A digital clock is composed of one or more text sections, which define -how the time information is displayed. - -@publishedAll -@released */ - { -public: - IMPORT_C RDigitalClock(RAnimDll& aAnimDll, const RWindowBase& aWindow); - IMPORT_C void ConstructL(TTimeIntervalSeconds aUniversalTimeOffset, const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, - const STimeDeviceShadow& aShadow, TRgb aBackgroundColor, TInt aNumTextSections); - IMPORT_C void AddTextSectionL(const TDigitalDisplayTextSection& aTextSection); - IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor, TRgb aShadowColor); // can only be called after full construction - IMPORT_C void SetTextColor(TRgb aTextColor); - - }; - -// - - -class RAnalogClock : public RClock -/** An analogue clock. - -@see CFbsBitmap::Handle() -@publishedAll -@released */ - - { -public: - IMPORT_C RAnalogClock(RAnimDll& aAnimDll, const RWindowBase& aWindow); - IMPORT_C void ConstructL(TTimeIntervalSeconds aUniversalTimeOffset, const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, - const STimeDeviceShadow& aShadow, TInt aFaceHandle, TInt aFaceMaskHandle, TInt aNumHands, const SAnalogDisplayAmPm* aAmPm=NULL); - // N.B. the bitmap(s) passed in to aFaceHandle and aFaceMaskHandle in these - // ConstructL functions cannot be destroyed until the RAnalogClock has been - // completely constructed, including all necessary calls to - // RAnalogClock::AddHandL() - aFaceMaskHandle may be 0 - IMPORT_C void AddHandL(const TAnalogDisplayHand& aHand); - IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor, TRgb aShadowColor); // can only be called after full construction - IMPORT_C void SetTextColor(TRgb aTextColor); - IMPORT_C void SetPenColor(const TRgb aPenColor); - IMPORT_C void SetBrushColor(const TRgb aBrushColor); - }; - -// -// message-window class -// - - -class RMessageWindow : public RAnimWithUtils -/** A configurable window that appears for a brief time to display a message to -the user and then disappears. - -This is the basic class that is used by classes such as CEikonEnv and CEikMsgWin -to provide information and message windows. Such higher-level classes would -normally be used by client applications rather than RMessageWindow. This class -can be used though to implement specialist new classes. - -Note that this class is in the same library as the Clock API for implementation -reasons only. - -@see CEikMsgWin -@see CEikonEnv -@publishedAll -@released */ - { -public: - /** Defines the maximum length of text in the message. */ - enum - { - /** Maximum length of text in the message. */ - EMaxTextLength=80 - }; -public: - IMPORT_C RMessageWindow(RAnimDll& aAnimDll, const RWindowBase& aWindow); - IMPORT_C void ConstructL(TInt aBaselineOffset, TInt aFontHandle, TRgb aBackgroundColor, TRgb aTextColor); - IMPORT_C void ConstructL(TInt aBaselineOffset, TInt aFontHandle, TRgb aBackgroundColor, TRgb aTextColor, TRgb aBorderColor); - IMPORT_C void StartDisplay(TBool aFlash, TTimeIntervalMicroSeconds32 aInitialDelay, const TDesC& aText); - IMPORT_C void StartDisplay(TBool aFlash, TTimeIntervalMicroSeconds32 aInitialDelay, TTimeIntervalMicroSeconds32 aDuration, const TDesC& aText); - IMPORT_C void CancelDisplay(); - IMPORT_C void GetBorders(TMargins& aBorders); - IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor); - IMPORT_C void SetTextColor(TRgb aTextColor); - IMPORT_C void SetBorderColor(TRgb aBorderColor); - IMPORT_C void SetPlinthColors(TRgb aTl,TRgb aBr); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmarkedstack.h --- a/epoc32/include/cmarkedstack.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Template class to implement a marked stack. Conatins a stack itself of marks -// providing basic marking functionality. -// -// - -#ifndef __CMARKEDSTACK_H__ -#define __CMARKEDSTACK_H__ - -// includes -#include -#include - -//##ModelId=3B666BCD0001 - -template -class CMarkedStack : public CStack -/** Provides a templated stack that allows items in the stack to be marked. - -The class allows each mark to have an associated TInt value, which allows different -types of mark to be used on the same stack. - -Template parameter T specifies the type of object on the stack. Owner should be set to -ETrue if the object's destructor should delete the objects on the stack. - @publishedAll - @released - -*/ -{ -protected: -class TMarkPoint -/** Represents a mark. - */ -{ -public: - /** Represents a mark. */ - TMarkPoint(TInt aMarkType - , TInt aIndex) - : iMarkType(aMarkType) - , iStackIndex(aIndex) - {} - /** Mark type. */ - TInt iMarkType; - /** Index of the marked stack item. */ - TInt iStackIndex; -}; -/** Defines a stack of marks. */ -typedef CStack CMarks; -public: - //##ModelId=3B666BCD0048 - inline virtual ~CMarkedStack(); - - //##ModelId=3B666BCD0041 - inline void MarkL(TInt aMarkType); - //##ModelId=3B666BCD003F - inline TInt RemoveMark(TInt aMarkType); - //##ModelId=3B666BCD003D - inline void DeleteToMark(TInt aMarkType); - //##ModelId=3B666BCD0033 - inline void ResetToMark(TInt aMarkType); -protected: - /** A stack of marks. - - Items are added and removed from this stack by MarkL(), RemoveMark() etc. - */ - //##ModelId=3B666BCD002D - CMarks iMarks; -}; - -#include - -#endif // __CMARKEDSTACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmmsaccounts.h --- a/epoc32/include/cmmsaccounts.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMMSACCOUNT_H__ -#define __CMMSACCOUNT_H__ - - -#include - -class CRepository; -class CMmsSettings; -class TMmsAccountId; -class MMmsSettingsObserver; - - -/** -The maximum account name size - -@publishedAll -@released -*/ -const TInt KMmsAccountNameSize = 256; - - - -/** -MMS account ID - -@publishedAll -@released -*/ -class TMmsAccountId - { -public: - /** MMS account Id */ - TInt iMmsAccountId; - - /** MMS account Name */ - TBuf iMmsAccountName; - }; - - -/** -Stores MMS settings. - -@publishedAll -@released -*/ -class CMmsAccounts : public CActive - { -public: - IMPORT_C static CMmsAccounts* NewL( ); - IMPORT_C static CMmsAccounts* NewLC( ); - IMPORT_C virtual ~CMmsAccounts(); - - // Observer functions - IMPORT_C void AddObserverL(MMmsSettingsObserver & aObserver); - IMPORT_C void RemoveObserver(MMmsSettingsObserver & aObserver); - - IMPORT_C TMmsAccountId CreateMMSAccountL(const TDesC& aAccountName, const CMmsSettings& aSettings); - IMPORT_C TInt MaxMMSAccounts(); - - IMPORT_C void GetMMSAccountsL(RArray& aAccountIds) const; - IMPORT_C void DeleteMMSAccountL(const TMmsAccountId& aAccountId); - - IMPORT_C void LoadSettingsL(const TMmsAccountId& aAccountId, CMmsSettings& aSettings); - IMPORT_C void PopulateDefaultSettingsL(CMmsSettings& aSettings); - - IMPORT_C void SaveSettingsL(const TMmsAccountId& aAccountId, const CMmsSettings& aSettings) const; - - IMPORT_C TMmsAccountId DefaultMMSAccountL( ) const; - IMPORT_C void SetDefaultMMSAccountL(const TMmsAccountId& aAccount); - -private: - CMmsAccounts(); - void ConstructL(); - void DoLoadSettingsL(TUint32 aAccountId, CMmsSettings& aSettings); - void DoSaveSettingsL(TUint32 aAccountId, const CMmsSettings& aSettings, const TDesC& aAccountName) const; - - void DoCancel( ); - void RunL( ); - - TUint GetNextEmptyAccountSlotL(); - -private: - enum TMmsSettingsCenRepId - { - EMmsAccountName = 0x00000000, - EMmsSettingsVersion = 0x00000001, - EMmsApplicationID = 0x00000002, - EMmsAddress = 0x00000003, - EMmsCreationMode = 0x00000004, - EMmsSettingsFlags = 0x00000005, - EMmsProxyCount = 0x00000006, - EMmsNapIdCount = 0x00000007, - EMmsAutomaticDownload = 0x00000008, - EMmsValidityPeriod = 0x00000009, - EMmsMaxDownloadSize = 0x0000000A, - EMmsMaxDownloadRetries = 0x0000000B, - EMmsDownloadRetryInterval = 0x0000000C, - EMmsMaxSendMsgSize = 0x0000000D, - EMmsDeviceContentClass = 0x0000000E, - EMmsMaxImageHeight = 0x0000000F, - EMmsMaxImageWidth = 0x00000010, - - EMmsProxyList = 0x00001000, - EMmsNapIdList = 0x00002000, - }; - -private: - CRepository* iRepository; - RPointerArray iObservers; - }; - -#endif // __CMMSACCOUNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmmssettings.h --- a/epoc32/include/cmmssettings.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMMSSETTINGS_H__ -#define __CMMSSETTINGS_H__ - - -#include - - -class CRepository; - - -/** -Automatic Download Options. - -@publishedAll -@released -*/ -enum TAutomaticDownloadOptions - { - /** Automatic Download Option Off */ - EAutomaticDownloadOff = 0, - /** Automatic Download Option On */ - EAutomaticDownloadOn, - /** Automatic Download Only When Roaming */ - EAutomaticDownloadOnlyWhenRoaming - }; - - -/** -Creation Mode Options. - -@publishedAll -@released -*/ -enum TCreationMode - { - /** Creation Mode Free */ - ECreationModeFree = 0, - /** Creation Mode Warning */ - ECreationModeWarning, - /** Creation Mode Restricted */ - ECreationModeRestricted - }; - - -/** -Run-time MMS configuration settings. - -Messaging clients should use an instance of this class to specify -and retrieve configuration settings. - -This class should be used with CMmsAccounts to store and restore settings. - -@see CMmsAccounts - -@publishedAll -@released -*/ -class CMmsSettings : public CBase - { -public: - IMPORT_C static CMmsSettings* NewL( ); - IMPORT_C static CMmsSettings* NewLC( ); - IMPORT_C ~CMmsSettings( ); - IMPORT_C void CopyL(const CMmsSettings& aMmsSettings); - - IMPORT_C TInt ApplicationID( ) const; - IMPORT_C void SetApplicationID(const TInt aAppID); - - IMPORT_C TPtrC Address( ) const; - IMPORT_C void SetAddressL(const TDesC& aAddress); - - IMPORT_C TCreationMode CreationMode( ) const; - IMPORT_C void SetCreationModeL(TCreationMode aCreationMode); - - IMPORT_C TInt ProxyCount( ) const; - IMPORT_C TUid GetProxy(TInt aIndex) const; - IMPORT_C void AddProxyL(const TUid aProxy); - IMPORT_C void RemoveProxy(TInt aIndex); - - IMPORT_C TInt NapIdCount( ) const; - IMPORT_C TUid GetNapId (TInt aIndex) const; - IMPORT_C void AddNapIdL(const TUid aNapId); - IMPORT_C void RemoveNapId(TInt aIndex); - - IMPORT_C TBool DisplayNotification( ) const; - IMPORT_C void SetDisplayNotification(TBool aFlag); - - IMPORT_C TAutomaticDownloadOptions AutomaticDownload( ) const; - IMPORT_C void SetAutomaticDownload(TAutomaticDownloadOptions aDownloadOptions); - - IMPORT_C TBool CreationModeReadOnly( ) const; - IMPORT_C void SetCreationModeReadOnly(TBool aFlag); - - IMPORT_C TInt ValidityPeriod( ) const; - IMPORT_C void SetValidityPeriod(const TInt aValidityPeriod); - - IMPORT_C TInt MaxDownloadSize( ) const; - IMPORT_C void SetMaxDownloadSize (const TInt aSize); - - IMPORT_C TBool Priority( ) const; - IMPORT_C void SetPriority (TBool aFlag); - - IMPORT_C TBool HideNumber( ) const; - IMPORT_C void SetHideNumber(TBool aFlag); - - IMPORT_C TBool ReadReport( ) const; - IMPORT_C void SetReadReport(TBool aFlag); - - IMPORT_C TBool DeliveryReport( ) const; - IMPORT_C void SetDeliveryReport(TBool aFlag); - - IMPORT_C TBool ReplyWithHistory( ) const; - IMPORT_C void SetReplyWithHistory (TBool aFlag); - - IMPORT_C TBool AllowDeliveryNotification( ) const; - IMPORT_C void SetAllowDeliveryNotification(TBool aFlag); - - IMPORT_C TBool FilterAdvertisements( ) const; - IMPORT_C void SetFilterAdvertisements(TBool aFlag); - - IMPORT_C TInt MaxDownloadRetries( ) const; - IMPORT_C void SetMaxDownloadRetries(const TInt aRetries); - - IMPORT_C TInt DownloadRetryInterval( ) const; - IMPORT_C void SetDownloadRetryInterval(const TInt aInterval); - - IMPORT_C TInt MaxSendMsgSize( ) const; - IMPORT_C void SetMaxSendMsgSize (const TInt aSize); - - IMPORT_C TBool FullScreenPreview( ) const; - IMPORT_C void SetFullScreenPreview(TBool aFlag); - - IMPORT_C TInt DeviceContentClass( ) const; - IMPORT_C void SetDeviceContentClass(const TInt aClass); - - IMPORT_C TInt MaxImageHeight( ) const; - IMPORT_C void SetMaxImageHeight(const TInt aHeight); - - IMPORT_C TInt MaxImageWidth( ) const; - IMPORT_C void SetMaxImageWidth(const TInt aWidth); - - void RemoveAllProxies(); - void RemoveAllNapIds(); - - TUint32 MmsSettingsFlags() const; - void SetMmsSettingsFlags(TUint32 aFlags); - -private: - CMmsSettings(); - - enum TMmsSettingsFlags - { - ESmsSettingsNoFlags = 0x00000000, - ESmsSettingsDisplayNotification = 0x00000002, - ESmsSettingsCreationModeReadOnly = 0x00000004, - ESmsSettingsPriority = 0x00000008, - ESmsSettingsHideNumber = 0x00000010, - ESmsSettingsReadReport = 0x00000020, - ESmsSettingsDeliveryReport = 0x00000040, - ESmsSettingsReplyWithHistory = 0x00000080, - ESmsSettingsAllowDeliveryNotification = 0x00000100, - ESmsSettingsFilterAdvertisements = 0x00000200, - ESmsSettingsFullScreenPreview = 0x00000400 - }; - -private: - - TUint32 iMmsSettingsFlags; - TInt iApplicationId; - HBufC* iAddress; - TCreationMode iCreationMode; - RArray iProxy; - RArray iNapId; - TAutomaticDownloadOptions iAutomaticDownloadOptions; - TInt iValidityPeriod; - TInt iMaxDownloadSize; - TInt iMaxDownloadRetries; - TInt iDownloadRetryInterval; - TInt iMaxSendMsgSize; - TInt iDeviceContentClass; - TInt iMaxImageHeight; - TInt iMaxImageWidth; - }; - -#endif // __CSMSACCOUNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmsvattachment.h --- a/epoc32/include/cmsvattachment.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMSVATTACHMENT_H__ -#define __CMSVATTACHMENT_H__ - -#include -#include - -/** -Attachment Id for uniquely identifying attachments. - -This is unique on a per message entry basis. - -@publishedAll -@released -*/ -typedef TUint TMsvAttachmentId; - -/** -DRM Mime type - -@publishedPartner -@released -*/ -_LIT8(KEpocMimeTypeDrm,"X-Epoc/DRM.Receipt"); - -class CMsvAttributeManager; - -/** -Represents a single attachment and information about the attachment. - -This object is used to represent all types of attachments (file, linked file or message -entry). Note that some APIs may not be valid for particular attachment types. This is -described under each method. It is the responsibility of the client to ensure that the -data about the attachment is set such as its mime-type or size. - -@publishedAll -@released -*/ -class CMsvAttachment : public CBase - { -public: - /** - Enum to define the different types of attachments supported by messaging. - */ - enum TMsvAttachmentType - { - /** - File attachment. This is a file attachment that is copied into the message store. - */ - EMsvFile = 0, - /** - Linked file attachment. This is an attachment that is linked to using its file path, - this is not copied into the message store. - */ - EMsvLinkedFile, - /** - Message entry attachment. This is a message entry that is registered as an attachment. - */ - EMsvMessageEntry - }; - -public: - IMPORT_C static CMsvAttachment* NewL(TMsvAttachmentType aType); - IMPORT_C static CMsvAttachment* NewL(TMsvAttachmentType aType, TInt aSize, HBufC8* aMimeType, HBufC* aAttachmentName); - - IMPORT_C static CMsvAttachment* NewL(const CMsvAttachment& aAttachment); - - IMPORT_C ~CMsvAttachment(); - - IMPORT_C TMsvAttachmentId Id() const; - IMPORT_C void SetId(TMsvAttachmentId aId); - - IMPORT_C TMsvAttachmentType Type() const; - - IMPORT_C TMsvId EntryAttachmentId() const; - void SetEntryAttachmentId(TMsvId aEntryId); - - IMPORT_C const TDesC& AttachmentName() const; - IMPORT_C void SetAttachmentNameL(const TDesC& aAttachmentName); - - IMPORT_C const TDesC& FilePath() const; - void SetFilePathL(const TDesC& aFilePath); - - IMPORT_C TInt Size() const; - IMPORT_C void SetSize(TInt aSize); - - IMPORT_C const TDesC8& MimeType() const; - IMPORT_C void SetMimeTypeL(const TDesC8& aMimeType); - - IMPORT_C TBool Complete() const; - IMPORT_C void SetComplete(TBool aComplete); - - IMPORT_C void SetDesC8AttributeL(TUid aAttributeId, const TDesC8& aAttribute); - IMPORT_C TInt GetDesC8Attribute(TUid aAttributeId, TPtrC8& aAttribute) const; - IMPORT_C void RemoveDesC8Attribute(TUid aAttributeId); - - IMPORT_C void SetIntAttributeL(TUid aAttributeId, TInt aAttribute); - IMPORT_C TInt GetIntAttribute(TUid aAttributeId, TInt& aAttribute) const; - IMPORT_C void RemoveIntAttribute(TUid aAttributeId); - - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - - TBool IsPathRequired() const; - -private: - CMsvAttachment(TMsvAttachmentType aType); - CMsvAttachment(TMsvAttachmentType aType, TInt aSize, HBufC8* aMimeType, HBufC* aAttachmentName); - void ConstructL(); - void ConstructL(const CMsvAttachment& aAttachment); - -private: - /** The unique attachment Id. This is unique per message entry and is auto-assigned. */ - TMsvAttachmentId iId; - - /** The attachment type. */ - TMsvAttachmentType iType; - - /** Size of the attachment in bytes. */ - TInt iSize; - - /** Descriptor indicating the mime type of the attachment. */ - HBufC8* iMimeType; - - /** The full file path and file name of attachment files and linked files. */ - HBufC* iFilePath; - - /** The message entry Id of the entry attachment. */ - TMsvId iEntryId; - - /** Name of the attachment to identify to the attachment. */ - HBufC* iAttachmentName; - - /** Attachment entry completeness flag. */ - TBool iComplete; - - /** Attribute manager for handling the attributes for this attachment. */ - CMsvAttributeManager* iAttributeManager; - - /** Flag to indicate whether a path needs to be added. */ - TBool iNeedsPath; - }; - -#endif // __CMSVATTACHMENT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmsvmimeheaders.h --- a/epoc32/include/cmsvmimeheaders.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMSVMIMEHEADERS_H__ -#define __CMSVMIMEHEADERS_H__ - -#include - -class CDesC8ArrayFlat; -class CMsvAttachment; -class CDesC8Array; - -/** -String literal for Base64 encoding. -@publishedAll -@released -*/ -_LIT8(KMsvBase64String, "Base64"); - -/** -String literal for Quoted-Printable encoding. -@publishedAll -@released -*/ -_LIT8(KMsvQPString, "quoted-printable"); - -/** -String literal for 7 bit encoding. -@publishedAll -@released -*/ -_LIT8(KMsv7BitString, "7bit"); - -/** -String literal for 8 bit encoding. -@publishedAll -@released -*/ -_LIT8(KMsv8BitString, "8bit"); - -/** -String literal for binary encoding. -@publishedAll -@released -*/ -_LIT8(KMsvBinaryString, "binary"); - -/** -String literal for UU encoding. -@publishedAll -@released -*/ -_LIT8(KMsvUUString, "uuencode"); - -/** -Utility class to represent commonly used Mime Headers. This object represents a number -of common Mime Headers into a single class. It is intended that this class is used to -represent the Mime Headers for an attachment represented by the CMsvAttachment class when -using the Attachment API. The Mime header data can be associated with an attachment and -stored and restored using the StoreL and RestoreL methods. -@publishedAll -@released -*/ -class CMsvMimeHeaders : public CBase - { -public: - -/** Messaging encoding types. -@publishedAll -@released -*/ -enum TMsvEncodingType - { - /** Unknown. */ - EEncodingTypeUnknown, - /** None. */ - EEncodingTypeNone, - /** 7-bit. */ - EEncodingType7Bit, - /** 8-bit. */ - EEncodingType8Bit, // ie lines still <1000 chars and terminated by CRLF - /** Binary. */ - EEncodingTypeBinary, // ie any length of data, not terminated by CRLF - /** QP. */ - EEncodingTypeQP, - /** Base64. */ - EEncodingTypeBASE64, - /** UU. */ - EEncodingTypeUU - }; - -public: - IMPORT_C static CMsvMimeHeaders* NewL(); - IMPORT_C static CMsvMimeHeaders* NewLC(); - IMPORT_C ~CMsvMimeHeaders(); - - IMPORT_C void StoreL(CMsvAttachment& aAttachment) const; - IMPORT_C void RestoreL(CMsvAttachment& aAttachment); - - IMPORT_C void SetContentDescriptionL(const TDesC8& aContentDescription); - IMPORT_C const TDesC8& ContentDescription() const; - - IMPORT_C void SetContentBaseL(const TDesC8& aContentBase); - IMPORT_C const TDesC8& ContentBase() const; - - IMPORT_C void SetContentLocationL(const TDesC16& aContentLocation); - IMPORT_C const TDesC16& ContentLocation() const; - - IMPORT_C void SetContentIdL(const TDesC8& aContentId); - IMPORT_C const TDesC8& ContentId() const; - - IMPORT_C void SetContentTypeL(const TDesC8& aContentType); - IMPORT_C const TDesC8& ContentType() const; - - IMPORT_C void SetContentSubTypeL(const TDesC8& aSubContentType); - IMPORT_C const TDesC8& ContentSubType() const; - - IMPORT_C void SetContentDispositionL(const TDesC8& aContentDisposition); - IMPORT_C const TDesC8& ContentDisposition() const; - - IMPORT_C CDesC8Array& ContentTypeParams(); - IMPORT_C CDesC8Array& ContentDispositionParams(); - IMPORT_C CDesC8Array& XTypeParams(); - - IMPORT_C const CDesC8Array& ContentTypeParams() const; - IMPORT_C const CDesC8Array& ContentDispositionParams() const; - IMPORT_C const CDesC8Array& XTypeParams() const; - - IMPORT_C void SetMimeCharset(TUint aMimeCharset); - IMPORT_C TUint MimeCharset() const; - - IMPORT_C void SetSuggestedFilenameL(const TDesC16& aSuggestedFilename); - IMPORT_C const TDesC16& SuggestedFilename() const; - - IMPORT_C void SetRelativePathL(const TDesC8& aRelativePath); - IMPORT_C const TDesC8& RelativePath() const; - - IMPORT_C void SetContentTransferEncoding(const TDesC8& aEncodingType); - IMPORT_C TMsvEncodingType ContentTransferEncoding() const; - IMPORT_C TMsvEncodingType ContentTransferEncoding(TPtrC8& aEncodingType) const; - IMPORT_C const TPtrC8 GetContentTypeValue(const TDesC8& aContentTypeParameter) const; - - IMPORT_C void Reset(); - IMPORT_C TInt Size() const; - IMPORT_C TBool ContainsMimeHeaders(const CMsvAttachment& aAttachment); - -private: - CMsvMimeHeaders(); - void ConstructL(); - -private: - HBufC8* iContentDescription; - HBufC8* iContentBase; - HBufC16* iContentLocation; - HBufC8* iContentId; - HBufC8* iContentType; - HBufC8* iContentSubType; - HBufC8* iContentDisposition; - CDesC8ArrayFlat* iContentTypeParams; // zero or more "parameter" - CDesC8ArrayFlat* iContentDispositionParams; // zero or more "parameters" - CDesC8ArrayFlat* iXTypeParams; // zero or more X-Type "parameters" - TUint iMimeCharset; - HBufC16* iSuggestedFilename; - HBufC8* iRelativePath; - TMsvEncodingType iContentTransferEncoding; - }; - -#endif // __CMSVMIMEHEADERS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmsvplainbodytext.h --- a/epoc32/include/cmsvplainbodytext.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -// CMSVPLAINBODYTEXT.H - -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMSVPLAINBODYTEXT_H__ -#define __CMSVPLAINBODYTEXT_H__ - - -#include -#include -#include - -class CMsvStore; -class CRichText; -class CParaFormatLayer; -class CCharFormatLayer; -class CCnvCharacterSetConverter; - -/** -This class encapsulates plainbody text information for storage within the -Message Store.It also populates a CRichText object with the 8 bit data -decoded to the specified character set.If a character set is not specified, -then the default character set is used. - -@publishedAll -@released -*/ -class CMsvPlainBodyText : public CMsgActive - { -public: - static CMsvPlainBodyText* NewL(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore, TBool aIs8Bit, TUint aCharsetId, TUint aDefaultCharsetId, TMsvId aMessageId, RFs& aFs); - static CMsvPlainBodyText* NewL(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore, TMsvId aMessageId, RFs& aFs, TInt aChunkLength); - - IMPORT_C ~CMsvPlainBodyText(); - - IMPORT_C void StoreChunkL(const TDesC8& aChunk, TRequestStatus& aStatus); - IMPORT_C void StoreChunkL(const TDesC8& aChunk); - - IMPORT_C void StoreChunkL(const TDesC16& aChunk, TRequestStatus& aStatus); - IMPORT_C void StoreChunkL(const TDesC16& aChunk); - - IMPORT_C void StoreRichTextAsPlainTextL(CRichText& aRichText); - - IMPORT_C void CommitL(); - - IMPORT_C void NextChunkL(TDes8& aChunk, TRequestStatus& aStatus); - IMPORT_C void NextChunkL(TDes8& aChunk); - - IMPORT_C void NextChunkL(TDes16& aChunk, TRequestStatus& aStatus); - IMPORT_C void NextChunkL(TDes16& aChunk); - - IMPORT_C void PreviousChunkL(TDes8& aChunk, TRequestStatus& aStatus); - IMPORT_C void PreviousChunkL(TDes8& aChunk); - - IMPORT_C void PreviousChunkL(TDes16& aChunk, TRequestStatus& aStatus); - IMPORT_C void PreviousChunkL(TDes16& aChunk); - - - IMPORT_C void SetCharacterSetL(const TUint aCharset); - IMPORT_C TUint CharacterSet(); - IMPORT_C TUint DefaultCharacterSet(); - - IMPORT_C TInt Size(); - -private: - CMsvPlainBodyText(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore, TBool aIs8Bit, TUint aCharsetId, TUint aDefaultCharsetId, TMsvId aMessageId, RFs& aFs); - void ConstructWriteL(); - - CMsvPlainBodyText(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore,TMsvId aMessageId, RFs& aFs,TInt aChunkLength); - void ConstructReadL(); - - void PrepareToConvertL(); - void ConvertChunkToUnicodeForStoreL(const TDesC8& aChunk); - TInt ConvertChunkToUnicodeForRestoreL(); - void ExtractNextChunkFromRichText(TDes16& aChunk); - void ExtractPreviousChunkFromRichText(TDes16& aChunk); - void RevertL(); - void DoRunL(); - void DoComplete(); - void DoCancel(); - -private: - /** To access APIs related to RFile operations.*/ - MMsvStoreManager& iMsvStoreManager; - CMsvStore& iStore; - /** Indicates whether to store text as 8 bit or 16 bit.*/ - TBool iIs8Bit; - /** The charset of the body text*/ - TUint iCharsetId; - TUint iDefaultCharsetId; - - /** The RFile Path.*/ - HBufC* iFilePath; - TMsvId iMessageId; - RFs& iFSession; - - /** The RFile to which body text is written.*/ - RFile iFile; - /** Character converter for 8 to 16 bit conversion.*/ - CCnvCharacterSetConverter* iConverter; - CRichText* iRichText; - CParaFormatLayer* iParaLayer; - CCharFormatLayer* iCharLayer; - TInt iReadChunkLength; - /** Temporary buffer created to Store chunk while it is being written aynchronously.*/ - RBuf16 iTempChunk16; - /** Buffer used to read data from RFile.*/ - RBuf8 iRfileReadBuf8; - /** Pointer to 8-bit buffer that needs to be written to RFile.*/ - TPtrC8 iRfileWritePtr8; - /** The position from where to extract data in CRichText*/ - TInt iPos; - /** Contains the size of the chunk that will be read or write in the RFile*/ - TInt iChunkMaxLength; - /** Contains the remaining unconverted Unicode Data*/ - HBufC8* iRemainingUnConvertedData; - /** Array that stores the start positions of each chunk,in Rfile*/ - RArray iStartPosOfEachChunkInFile; - /** Contains the start position of the next chunk*/ - TInt iStartPosOfNextChunk; - /** Contains the remaining converted Unicode Data*/ - RBuf16 iRemainingConvertedData; - /** Pointer to a 16 bit chunk that is being read from the store.*/ - TDes16* iChunk16; - /** Pointer to a 8 bit chunk that is being read from the store.*/ - TDes8* iChunk8; - /** Indicates whether the Rfile is commited or not.*/ - TBool iIsCommitted; - - /** Indicates whether the chunk being read is last.*/ - TBool iIsLastChunk; - /** Indicates whether call to DoRunl was initiated by PreviousChunkL method.*/ - TBool iPrevChunk; - /** Indicates whether call to DoRunl was initiated by 8 bit PreviousChunkL and NextChunkL methods.*/ - TBool iRetrieving8bit; - /** Enum indicating if RFile is being written or read */ - enum {EMsvFileReading, EMsvFileWriting} iMsvFileStatus; - CCnvCharacterSetConverter::TAvailability iAvailable; - //Containes current position of the Rfile - TInt iCurrentFilePos; - }; - -#endif//__CMSVPLAINBODYTEXT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmsvrecipientlist.h --- a/epoc32/include/cmsvrecipientlist.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMSVRECIPIENTLIST_H__ -#define __CMSVRECIPIENTLIST_H__ - -#include -#include - - - -// must be 4 bytes so that RArray works. -typedef TUint32 TMsvRecipientType; - -/** -@publishedAll -@released -*/ -enum TMsvRecipientTypeValues - { - EMsvRecipientTo = 0, - EMsvRecipientCc, - EMsvRecipientBcc, - }; - -/** -@publishedAll -@released -*/ -class CMsvRecipientList : public CBase - { -public: - static CMsvRecipientList* NewL(); - static CMsvRecipientList* NewLC(); - virtual ~CMsvRecipientList(); - // - IMPORT_C void Reset(); - IMPORT_C TInt Count() const; - // - IMPORT_C void AppendL(const TDesC& aPtr); - IMPORT_C void AppendL(TMsvRecipientType aValue, const TDesC& aPtr); - // - IMPORT_C void Delete(TInt aPos); - IMPORT_C void Delete(TInt aPos, TInt aCount); - // - IMPORT_C TMsvRecipientType Type(TInt aPos) const; - IMPORT_C const TDesC& operator[](TInt aIndex) const; - // - IMPORT_C const MDesCArray& RecipientList() const; -private: - CMsvRecipientList(); - void ConstructL(); -private: - RArray iRecipientType; - CDesCArrayFlat* iRecipients; - }; - -#endif //__CMSVRECIPIENTLIST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cmsvtechnologytypedefaultmtmsettings.h --- a/epoc32/include/cmsvtechnologytypedefaultmtmsettings.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__ -#define __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__ - -#include -#include - -class RFs; -class CRepository; - - -/** -Stores default MTM settings for a technology type to the Central Repository. - -@publishedAll -@released -*/ -class CMsvTechnologyTypeDefaultMtmSettings : public CBase - { -private: - struct TMsvTechnologyTypeDefaultMtmInfo - { - TUid iTechnologyTypeUid; - TUid iMtmUid; - }; - -public: - IMPORT_C static CMsvTechnologyTypeDefaultMtmSettings* NewL( RFs& aFs ); - IMPORT_C ~CMsvTechnologyTypeDefaultMtmSettings( ); - - IMPORT_C TInt DefaultMtm( TUid aTechnologyTypeUid, TUid& aMtmUid ) const; - IMPORT_C void SetDefaultMtmL( TUid aTechnologyTypeUid, TUid aMtmUid ); - IMPORT_C TInt RemoveDefaultMtm( TUid aTechnologyTypeUid ); - - // Stores and Restores data in the central repository - IMPORT_C void LoadSettingsL( ); - IMPORT_C void SaveSettingsL( ); - -private: - CMsvTechnologyTypeDefaultMtmSettings( RFs& aFs ); - void ConstructL(); - void CheckIfMtmIsPartOfTechnologyTypeGroupL( const TUid aTechnologyTypeUid, - const TUid aMtmUid, const TUid aMtmTypeUid ) const; - TInt FindDefaultMtm( const TUid aTechnologyTypeUid, - TMsvTechnologyTypeDefaultMtmInfo& aTechnologyTypeDefaultMtmInfo ) const; - -private: - CRepository* iRepository; - RArray iTechnologyTypeDefaultMtmArray; - RArray iRemovedTechnologyTypes; - RFs& iFs; - }; -#endif //__CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cnftool.rh --- a/epoc32/include/cnftool.rh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// HEADER INFO -// -// - -STRUCT CNF_FILE -/** Describes the converter DLL. - -@publishedAll -@deprecated */ - { - /** Future use, do not use */ - LLINK extension = 0; - /** The DLL's UID3. */ - LONG dll_uid; - /** An array of CONVERTER_DATA resources describing the converters in the DLL. - Target type: CONVERTER_DATA */ - LEN WORD STRUCT converter_list[]; // Converter_data - } - -#include diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cnode.h --- a/epoc32/include/cnode.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,456 +0,0 @@ -/// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -/// All rights reserved. -/// This component and the accompanying materials are made available -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -/// which accompanies this distribution, and is available -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -/// -/// Initial Contributors: -/// Nokia Corporation - initial contribution. -/// -/// Contributors: -/// -/// Description: -/// All rights reserved. -/// This component and the accompanying materials are made available -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -/// which accompanies this distribution, and is available -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -/// Initial Contributors: -/// Nokia Corporation - initial contribution. -/// Contributors: -/// This contains the definitions of CDataDelete, CDataNoDelete, CIntAttribute, CNode, and CTypedNode. -/// CDataNoDelete is a base class to CDataDelete and are essentially a wrapper around an HBufC16. -/// The node owns the data that is added to it and therefore is responsible for deleting all its data, -/// hence theses two classes allow a user to have non deletable data. Internally to the node it is also -/// sometimes necessary to change the data into either deletable or non-deletable data api's are provided -/// for this. -/// CIntAttribute is wrapper around a TInt, this is provided as the nodes attribute value is a CBase* however -/// it might be desirable to store integer's in here. Attribute value is owned by the node therefore the node is -/// responsible for deleting it. -/// CNode is the basis for constructing a tree. It consists of an array of child nodes, node type, a parent node, -/// an array of attributes, and a data member. Internally the data member is defined as CDataNoDelete however -/// to the user all the exported api's take an HBufC16*. Data is owned by the node and is destroyed by the node, -/// However in certain circumstances this is not desirable hence the api's to make the data non-deletable. The -/// node type is defined as a TAny* however normal usage would use the templated node - CTypedNode. The node type -/// is used to identify groups of nodes. The attribute array is fairy simple and consists of AttributeType and -/// AttributeValue. AttributeType can be defined by using the templated class and should be a 32bit value. AttributeValue -/// can be any object derived from CBase and the node takes ownership therefore the node delete's it. -/// Basic usage should be to use the templated class in order to make use of the templated types (TNodeType,TAttributeType). -/// Create a node for example: -/// CTypedNode *tree = CTypedNode::NewL(0,0); -/// add a new child: -/// CNODE *TestChildNode1 = tree->AppendNodeL(aTempNodeForNodeType); -/// add some data: -/// TestChildNode1->SetDataL(aHBufC16); -/// add an attribute: -/// TestChildNode1->->AddAttributeL(aTAttributeType,aCBasePointerAttributeValue); -/// Explanation of individual api's is documented below. -/// - - - - -#ifndef __CNODE_H__ -#define __CNODE_H__ - -#include -#include - - -/** - @file - @publishedAll - @released -*/ - -//Granularity of arrays -const TInt KGranularity = 5; - -//enum of panic reasons -enum TNodePanic - { - ENodeBadArgument, - ENodeNoChildren, - ENoData, - EAttributeFailure - }; - -//node panic function -inline void Panic(TNodePanic aPanic); - -//Wrapper around an HBufC16 doesn't delete data -//##ModelId=3B666BCC0303 -class CDataNoDelete : public CBase -/** Provides a wrapper around an HBufC16: the buffer is not deleted when the object is deleted. -*/ - { -public: - //##ModelId=3B666BCC032D - CDataNoDelete(HBufC16* aData); - //##ModelId=3B666BCC032C - virtual ~CDataNoDelete(); - //##ModelId=3B666BCC0324 - HBufC16* SetData(HBufC16* aData); - //##ModelId=3B666BCC0322 - virtual void ResetDataPointer(HBufC16* aData); - //##ModelId=3B666BCC0321 - HBufC16* Data(); - -protected: - /** The wrapped buffer. */ - //##ModelId=3B666BCC0319 - HBufC16* iData; - }; - -//Wrapper around an HBufC16 does delete data -//##ModelId=3B666BCC0399 -class CDataDelete : public CDataNoDelete -/** Provides a wrapper around an HBufC16: the buffer is deleted when the -object is deleted. -*/ - { -public: - //##ModelId=3B666BCC03B7 - CDataDelete(HBufC16* aData); - //##ModelId=3B666BCC03B0 - virtual ~CDataDelete(); - //##ModelId=3B666BCC03AE - virtual void ResetDataPointer(HBufC16* aData); - }; - -//Wrapper around an HBufC16 does delete data (FileName) -// After Removing referenced File -//##ModelId=3B666BC7026F -class CFileDataDelete : public CDataNoDelete -/** Provides a wrapper around a filename: the referenced file is deleted when the object is deleted. -*/ - { -public: - //##ModelId=3B666BC7028F - CFileDataDelete(HBufC16* aData); - //##ModelId=3B666BC7028E - virtual ~CFileDataDelete(); - //##ModelId=3B666BC70285 - virtual void ResetDataPointer(HBufC16* aData); -private: - //##ModelId=3B666BC70284 - void RemoveFile(); - }; - -//Wrapper around a TInt used for attribute values in order to allow the node to call a dtor -//##ModelId=3B666BC6023E -class CIntAttribute : public CBase -/** Provides an object wrapper around a TInt value. */ - { -public: - //##ModelId=3B666BC6025B - inline CIntAttribute(TInt aInteger); - //##ModelId=3B666BC6025A - inline TInt Int() const; -private: - //##ModelId=3B666BC60264 - CIntAttribute(); - //##ModelId=3B666BC60253 - TInt iInteger; - }; - -// -// Node class -// Normal usage would be to use CTypedNode in order to use specific templated types -// - -//##ModelId=3B666BCD02D2 -class CNode : public CBase - { -public: - //##ModelId=3B666BCE0139 - IMPORT_C ~CNode(); - - //NewL parameters aType to indentify the type of node, CNode* to set the parent of this node - //##ModelId=3B666BCE0125 - IMPORT_C static CNode* NewL(TAny* aType,CNode* aParent); - - //Deletes a child node which is passed in as a parameter - //##ModelId=3B666BCE011C - IMPORT_C void DeleteChildNode(CNode* aNode); - - //Deletes all the child nodes haging of this node - //##ModelId=3B666BCE011B - IMPORT_C void DeleteAllChildNodes(); - - //Creates a new node and adds it to the childlist, reference to new node is returned. Can leave if it can't allocate memory for a new node - //Type of node is the parameter - //##ModelId=3B666BCE0108 - IMPORT_C CNode& AppendNodeL(TAny* aType = 0); - - //Appends a node which is passed in as a parameter to this node, so its added to the childlist - //##ModelId=3B666BCE00FD - IMPORT_C void AppendNodeToThisNodeL(CNode* aNode); - - //Sets the data in the node to the parameter that is passed in. It's deletable and the node will delete it in dtor - //Push aDataNowNodeOwns onto the CleanupStack before calling then pop off on return - //##ModelId=3B666BCE00F3 - IMPORT_C void SetDataL(HBufC16* aDataNowNodeOwns); - - //returns the data stored in the node, which is returned as an HBufC16* - //##ModelId=3B666BCE00EB - IMPORT_C HBufC16* Data() const; - - //WARNING this function can leave as it deletes the wrapper object and then creates - //a new non deletable wrapper object and sets the data pointer inside the new object - //IF THIS LEAVES YOU WILL LOSE YOUR DATA - //##ModelId=3B666BCE00EA - IMPORT_C void SetDataNoDeleteL(); - - //WARNING this function can leave as it deletes the wrapper object and then creates - //a new deletable wrapper object then sets the pointer in the new object - //##ModelId=3B666BCE00E9 - IMPORT_C void ClearSetDataNoDeleteL(); - - // Sets the data in the node to the FileName parameter that is passed in. - // It's deletable and the node will delete it, and the file it refers to in dtor - // Push aDataLocationNowNodeOwns onto the CleanupStack before calling then pop off on return - //##ModelId=3B666BCE00DF - IMPORT_C void SetFileDataL(HBufC16* aFileDataLocationNowNodeOwns); - - //Resets the data pointer to point to aData parameter will delete the data that is owned by the node - //##ModelId=3B666BCE00D5 - IMPORT_C void ResetDataPointer(HBufC16* aData); - - //returns a reference to the absolute root of the tree - //##ModelId=3B666BCE00CB - IMPORT_C const CNode& Root() const; - - //returns a child node which is stored in the array of children. The child node is accessed by the index that is the parameter. - //##ModelId=3B666BCE00C1 - IMPORT_C CNode* Child(TInt aByIndex) const; - - //Returns either the first child of this node if the parameter is NULL. Or it returns the next chld in the array after - //the child passed in as a parameter - //##ModelId=3B666BCE00AE - IMPORT_C CNode* NextChild(const CNode* aNode = NULL) const; - - //returns the previous child to the child passed in as a parameter. The node parameter is a reference because its the child previous - //to the node passed in which obviously must exist - //##ModelId=3B666BCE00A4 - IMPORT_C CNode* PrevChild(const CNode& aNode) const; - - //Returns the parent of this node - //##ModelId=3B666BCE00A3 - IMPORT_C CNode* Parent() const; - - //WARNING this function can leave as it calls AppendNodeToThisNode. The aParent parameter is the node to which you would like to make - //the parent of 'this' node. - //It removes itself from the childlist of it's current parent - //##ModelId=3B666BCE0099 - IMPORT_C void ReparentL(CNode* aParent); - - //Returns the next sibling which means in effect that it asks for the next child of its parent. - //Sibling means brother or sister. - //##ModelId=3B666BCE0090 - IMPORT_C CNode* NextSibling() const; - - //Returns the previous sibling which means in effect that it asks for the previous child of its parent. - //Sibling means brother or sister. - //##ModelId=3B666BCE008F - IMPORT_C CNode* PrevSibling() const; - - //returns the number of children that this node has - //##ModelId=3B666BCE0085 - IMPORT_C TInt NumberImmediateChildren() const; - - //Deletes the attribute of which is of aAttributeType (the parameter) - //WARNING Attribute values of nodes will be deleted as the node owns them if you don't want it deleted then use a wrapper - //##ModelId=3B666BCE007C - IMPORT_C void DeleteAttribute(TAny* aAttributeType); - - //Deletes all the attributes of this node - //WARNING Attribute values of nodes will be deleted as the node owns them if you don't want it deleted then use a wrapper - //##ModelId=3B666BCE007B - IMPORT_C void DeleteAllAttributes(); - - //remove an attribute without deleting it, this is done by simply setting the attributeValue pointer to NULL - //WARNING you are now responsiblefor the destruction of this attribute value - //##ModelId=3B666BCE0071 - IMPORT_C void RemoveAttributeNoDelete(TAny* aAttributeType); - - // Returns the number of attributes that this node has - //##ModelId=3B666BCE0067 - IMPORT_C TInt AttributeCount() const; - - //Returns the type of attribute (AttributeType) at a given index...NOT the attributeValue - //##ModelId=3B666BCE005D - IMPORT_C TAny* AttributeTypeByIndex(TInt aIndex) const; - - //Returns the value of an attribute (AttributeValue) at a given index...NOT the attributeType - //##ModelId=3B666BCE003F - IMPORT_C CBase* AttributeByIndex(TInt aIndex) const; - //##ModelId=3B666BCE0049 - IMPORT_C CBase* AttributeByIndex(TInt aIndex,TAny*& aType) const; - - //Adds an attribute, parameters are the type of attribute and its value - //WARNING node takes ownership of aAttributeValue - ////Push aAttributeValue onto the CleanupStack before calling then pop off on return - //##ModelId=3B666BCE002B - IMPORT_C void AddAttributeL(TAny* AttributeType, CBase* aAttributeValue); - - //Adds data to the node and also adds an attribute, parameters are the Data to be added, the type of attribute and its value - //WARNING node takes ownership of aData and aAttributeValue - ////Push aAttributeValue and aData onto the CleanupStack before calling then pop off on return - //##ModelId=3B666BCE000D - IMPORT_C void AddDataAndAttributeL(HBufC16 *aData, TAny* AttributeType, CBase* aAttributeValue); - - //Returns an attribute value for the given AttributeType(the parameter) - //##ModelId=3B666BCE0003 - IMPORT_C CBase* Attribute(TAny* AttributeType) const; - - //Returns TRUE if the attribute of the given type exists - //##ModelId=3B666BCD03E1 - IMPORT_C TBool AttributeExists(TAny* aAttributeType) const; - - //Returns the node type - //##ModelId=3B666BCD03D7 - IMPORT_C TAny* Type() const; - - //Sets the node type to be aType (the parameter) - //##ModelId=3B666BCD03CD - IMPORT_C void SetType(TAny* aType); - - -protected: - //ctor - //##ModelId=3B666BCD03B9 - CNode(TAny* aType, CNode* aParent); - - //internal finds a child which is passed in as a parameter - //##ModelId=3B666BCD03AF - TInt FindChild(const CNode* aNode) const; - - //##ModelId=3B666BCD03A7 - HBufC16* SetupDeletableOrNonDeleteableDataLC(); - //##ModelId=3B666BCD03A6 - void AdjustBasePointers(); -private: - // Reserved for future expansion - //##ModelId=3B666BCD039B - virtual void Reserved1(); - //##ModelId=3B666BCD03A5 - virtual void Reserved1() const; - -protected: - //the Type of Node - //##ModelId=3B666BCD0392 - TAny* iType; - - //This Nodes parent - //##ModelId=3B666BCD037E - CNode *iParent; - - // stores attribute type and value. iTypes must be Flat array - //##ModelId=3B666BCD0372 - CArrayPtrFlat iValues; - //##ModelId=3B666BCD034C - CArrayPtrFlat iTypes; - - //##ModelId=3B666BCD0324 - TInt32* iTypesBasePtr; - //##ModelId=3B666BCD0310 - CDataNoDelete* iDataValue; -// - //An array of child nodes - //##ModelId=3B666BCD02FC - CArrayPtr *iChildList; -private: - //##ModelId=3B666BCD02DF - TAny* iReserved; // Reserved for future expansion - }; - - -//CTypedNode is derived from CNode and is a thin template. TNodeType you should define as a 32 bit value -//TAttributeType should be defined as a 32 bit value -//FOR EXPLANATION OF API'S SEE ABOVE -//##ModelId=3B666BCC01A4 -template -class CTypedNode : public CNode -/** Template class for a node in a node tree. - -The node type is set to the template parameter TNodeType and the attribute type to -TAttributeType. These parameters should be pointers to the type required to store -the type value: e.g. for a string, a const TDesC*. - -The class is thin template over CNode. */ - { -public: - //##ModelId=3B666BCC024A - inline static CTypedNode* NewL(TNodeType aType,CNode* aParent); - //##ModelId=3B666BCC0248 - inline void DeleteChildNode(CNode* aNode); - //##ModelId=3B666BCC0247 - inline void DeleteAllChildNodes(); - //##ModelId=3B666BCC0245 - inline CTypedNode& AppendNodeL(TNodeType aType); - //##ModelId=3B666BCC023B - inline void AppendNodeToThisNodeL(CNode* aNode); - //##ModelId=3B666BCC0228 - inline void SetDataL(HBufC16* aDataNowNodeOwns); - //##ModelId=3B666BCC0227 - inline void SetDataNoDeleteL(); - //##ModelId=3B666BCC0221 - inline void ClearSetDataNoDeleteL(); - //##ModelId=3B666BCC021F - inline void SetFileDataL(HBufC16* aFileDataLocationNowNodeOwns); - //##ModelId=3B666BCC021D - inline void ResetDataPointer(HBufC16* aData); - //##ModelId=3B666BCC0215 - inline HBufC16* Data() const; - //##ModelId=3B666BCC0214 - inline const CTypedNode& Root() const; - //##ModelId=3B666BCC020B - inline CTypedNode* Child(TInt aByIndex) const; - //##ModelId=3B666BCC0209 - inline CTypedNode* NextChild(const CNode* aNode = NULL) const; - //##ModelId=3B666BCC0201 - inline CTypedNode* PrevChild( const CNode& aNode) const; - //##ModelId=3B666BCC0200 - inline CTypedNode* Parent() const; - //##ModelId=3B666BCC01FE - inline void ReparentL(CNode* aParent); - //##ModelId=3B666BCC01F5 - inline CTypedNode* NextSibling() const; - //##ModelId=3B666BCC01F4 - inline CTypedNode* PrevSibling() const; - //##ModelId=3B666BCC01EE - inline TInt NumberImmediateChildren() const; - //##ModelId=3B666BCC01EC - inline void DeleteAttribute(TAttributeType aAttributeType); - //##ModelId=3B666BCC01EB - inline void DeleteAllAttributes(); - //##ModelId=3B666BCC01E5 - inline void RemoveAttributeNoDelete(TAttributeType aAttributeType); - //##ModelId=3B666BCC01E4 - inline TInt AttributeCount() const; // Returns the number of attributes - //##ModelId=3B666BCC01E2 - inline TAttributeType AttributeTypeByIndex(TInt aIndex) const; - //##ModelId=3B666BCC01DC - inline CBase* AttributeByIndex(TInt aIndex) const; - //##ModelId=3B666BCC01DE - inline CBase* AttributeByIndex(TInt aIndex,TAttributeType& aType) const; - //##ModelId=3B666BCC01D9 - inline void AddAttributeL(TAttributeType aAttributeType, CBase* aAttributeValue); - //##ModelId=3B666BCC01D0 - inline void AddDataAndAttributeL(HBufC16 *aData, TAttributeType aAttributeType, CBase* aAttributeValue); - //##ModelId=3B666BCC01CE - inline CBase* Attribute(TAttributeType aAttributeType) const; - //##ModelId=3B666BCC01CC - inline TBool AttributeExists(TAttributeType aAttributeType) const; - //##ModelId=3B666BCC01C9 - inline TNodeType Type() const; - //##ModelId=3B666BCC01C7 - inline void SetType(TNodeType aType); -protected: - //##ModelId=3B666BCC01C4 - CTypedNode(TNodeType aType, CNode* aParent); - }; -#include -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cnodeleteattribute.h --- a/epoc32/include/cnodeleteattribute.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNODELETEATTRIBUTE_H__ -#define __CNODELETEATTRIBUTE_H__ - -// System includes -// -#include - - - -template -class CNoDeleteAttributeT : public CBase -/** - @publishedAll - @released -*/ - { -public: - - CNoDeleteAttributeT(T aAttribute) : iAttribute(aAttribute) {}; - ~CNoDeleteAttributeT() {}; - - T Attribute() { return iAttribute; } - void SetAttribute(T aAttribute) { iAttribute = aAttribute; } - -protected: - - T iAttribute; - - }; - -#endif // __CNODELETEATTRIBUTE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntdb.h --- a/epoc32/include/cntdb.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1427 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTDB_H__ -#define __CNTDB_H__ - -// System includes -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -// Classes referenced -// -class CContactViewDef; -class CFoundMatches; -class CContactTextDef; -class CContactItem; -class CContactItemViewDef; -class CContactItemFieldSet; -class CContactItemFieldDef; -class CContactActiveCompress; -class CContactActiveRecover; -class CContactDatabase; -class CContactTables; -class CCntFilter; -class CContentType; -class CContactItemField; -class CIdleFinder; -class CContactClientSession; -class CPrivConverter; -class RCntModel; -class CProxyFactory; -class CCntTemplateCache; -class CSortArray; -class CCntIdleSorter; -class MLplPersistenceLayerFactory; -class CContactOpenOperation; -class CDataBaseChangeObserver; -class CContactConverter; - -// Constants -const TInt KMaxContactTextSeperator=4; -const TInt KTextFieldMinimalLength=64; -const TInt KMaxCustomFilterableFields=4; - -const TInt KMajorVersion=1; -const TInt KMinorVersion=0; -const TInt KBuildNumber=40; - - -// -// Classes used for compact -// - -class MContactStorageObserver -/** -Mixin used to observe low disk events - -@publishedAll -@released -*/ - { -public: - virtual void HandleDiskSpaceEvent(TInt aDrive) = 0; - }; - -class MContactUiCompactObserver -/** Mixin used to observe contact database compaction status -@publishedAll -@released -*/ - { -public: - virtual void Step(TInt aStep)=0; - virtual void HandleError(TInt aError)=0; - }; - -class MContactUiActive -/** Mixin used to register the observer. -@publishedAll -@released -*/ - { -public: - virtual void Cancel()=0; - virtual void SetObserver(MContactUiCompactObserver *aObserver)=0; - virtual TInt StepsTogo() const=0; - virtual TInt Step()=0; - virtual TInt Error() const=0; -private: - IMPORT_C virtual void MContactUiActive_Reserved1(); - }; - -class CContactActiveBase : public CBase, public MContactUiActive -/** -@internalTechnology -*/ - { -public: - ~CContactActiveBase(); - void SetObserver(MContactUiCompactObserver *aObserver); - void Cancel(); - TInt StepsTogo() const; - TInt Step(); - TInt Error() const; - void SetContactDatabase(CContactDatabase* aContactDatabase); - void SetFileManager(RCntModel& aCntSvr); - -#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ -protected: - void ConstructL(); - static TInt CompactCallBack(TAny *aThis); -protected: - MContactUiCompactObserver *iObserver; - RCntModel* iCntSvr; - CIdle *iIdle; - TInt iStep; - TInt iError; - CContactDatabase* iContactDatabase; -#endif - }; - -class CContactActiveCompress : public CContactActiveBase -/** -@publishedAll -@released -*/ - { -public: -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) - void ConstructL(RDbNamedDatabase /* &aDataBase */) {}; -#endif - }; - -class CContactActiveRecover : public CContactActiveBase -/** -@publishedAll -@released -*/ - { -public: -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) - void ConstructL(RDbNamedDatabase /* &aDataBase */) {}; -#endif - }; - - - - -class TContactTextDefItem -/** An item in a text definition. - -A TContactTextDefItem has a field type and an optional separator string -with a maximum length of 4 characters. - -@see CContactTextDef -@publishedAll -@released -*/ - { -public: - IMPORT_C TContactTextDefItem(); - IMPORT_C TContactTextDefItem(TFieldType aFieldType); - IMPORT_C TContactTextDefItem(TFieldType aFieldType, const TDesC &aSeperator); -public: - /** The field type. */ - TFieldType iFieldType; - /** The string used to separate the fields in the text definition. */ - TBuf iSeperator; - }; - -class CContactTextDef : public CArrayFixFlat -/** Defines a way of grouping fields to form a string which represents -a contact item. - -A text definition is implemented as an array of text definition items -(TContactTextDefItems). - -For example, CContactDatabase::ReadContactTextDefL() uses a text definition to -build up a string from a contact item. When creating the string, it searches -the item for fields whose type matches one of the fields specified in the text -definition. The contents of the first matching field of each type found in the -item are read into the string. These strings may be separated using a field -separator, which is also specified in the text definition. A separator is not -appended to the last field used to make up the string. It is only inserted when -there is a following non-empty field. - -Additionally, the text definition may also contain a fallback field -type. This is used when none of the fields specified in the text -definition contain any text. If the item's fallback field contains no text -either, or if the fallback field type's value is KUidContactFieldNone, the -text is read from the first non-empty field in the item. - -A contact database can have a default text definition which is set using CContactDatabase::SetTextDefinitionL(). -This may be overridden using the variants of CContactDatabase::ReadContactTextDefL() -which take a CContactTextDef* argument. - -CContactTextDef is derived from CArrayFixFlat, so all -relevant functions can be used, e.g. to add and remove elements. - -@publishedAll -@released -*/ - { - friend class CContactDatabase; - friend class CContactTables; -public: - CContactTextDef(); - IMPORT_C static CContactTextDef* NewL(); - IMPORT_C static CContactTextDef* NewLC(); - static CContactTextDef* NewLC(RReadStream& aStream); - IMPORT_C void SetFallbackField(TFieldType iFieldType); - IMPORT_C TFieldType FallbackField() const; - IMPORT_C TBool ExactMatchOnly(); - IMPORT_C void SetExactMatchOnly(TBool aExactMatchOnly); - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); -private: - TFieldType iFallbackFieldType; - TBool iExactMatchOnly;//Default to EFalse cause ReadInTextDef to only match the chosen fields and not attempt a matchall - }; - -class CContactItemViewDef : public CBase -/** A view definition for a contact item. - -When reading or opening a contact item using the CContactDatabase class, -a view definition may be specified to indicate which field data should be -retrieved. See for instance CContactDatabase::ReadContactL(). - -A view definition for a contact item contains an array of field types, a use -(CContactItemViewDef::TUse) and a mode (CContactItemViewDef::TMode). The use -indicates whether the field types contained in the view definition should -be included in or excluded from the view. The mode indicates whether fields -with the hidden attribute should be included or excluded. - -@publishedAll -@released -*/ - { -public: - /** Include or exclude specified fields. */ - enum TUse - { - /** Include specified fields in the view. */ - EIncludeFields, - /** Exclude specified fields from the view. */ - EMaskFields - }; - /** Include or exclude hidden fields.*/ - enum TMode - { - /** Include hidden fields in the view. */ - EIncludeHiddenFields, - /** Exclude hidden fields from the view. */ - EMaskHiddenFields - }; -public: - IMPORT_C static CContactItemViewDef* NewL(TUse aUse, TMode aMode); - IMPORT_C static CContactItemViewDef* NewLC(TUse aUse, TMode aMode); - static CContactItemViewDef* NewLC(RReadStream& aStream); - inline TUid operator[](TInt aIndex) const; - IMPORT_C TInt Find(const CContentType &aContentType) const; - IMPORT_C TInt Find(TFieldType aFieldType) const; - inline TInt Count() const; - inline void Reset(); - IMPORT_C void AddL(TFieldType aFieldType); - IMPORT_C void Remove(TFieldType aFieldType); - IMPORT_C void Remove(TInt aIndex); - inline TUse Use() const; - inline void SetUse(TUse aUse); - inline TMode Mode() const; - inline void SetMode(TMode aMode); - IMPORT_C TBool Contains(const CContactItem& aItem); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C TBool MatchesAll() const; -private: - CContactItemViewDef(TUse aUse,TMode aMode); -private: - CArrayFixFlat iFieldTypes; - TUse iUse; - TMode iMode; - }; - -class CContactViewDef : public CBase -/** Specifies a subset of fields to be loaded when reading a contact item. - -A default view definition is owned by the contact database. -It is set using CContactDatabase::SetViewDefinitionL() and is used in calls -to CContactDatabase::ReadContactL(), ReadContactLC() and ReadContactAndAgentL() -when no view definition is specified. - -The view definition owns the item view definition (see the CContactItemViewDef -class), which stores the view definition's field types, use and mode. - -The following functions declared in class CContactViewDef have not been -implemented:- Groups(), AddL(). - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactViewDef* NewL(); - IMPORT_C static CContactViewDef* NewLC(); - IMPORT_C static CContactViewDef* NewL(CContactItemViewDef* aItemDef); - IMPORT_C static CContactViewDef* NewLC(CContactItemViewDef* aItemDef); - static CContactViewDef* NewLC(RReadStream& aStream); - IMPORT_C ~CContactViewDef(); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C CContactItemViewDef& ItemDef() const; - /** This function is not implemented */ - IMPORT_C CContactIdArray& Groups() const; - /** This function is not implemented. - @param aFieldType The field type to append to the array of field types. */ - inline void AddL(TFieldType aFieldType); -private: - CContactViewDef(); - void ConstructL(CContactItemViewDef* aItemDef); -private: - CContactItemViewDef* iItemDef; -// CContactIdArray* iGroupIds; // unused for now - }; - -class TContactIter -/** Iterates through the sorted contact items in a contact database. - -A value of KNullContactId is returned by the iterator if a requested item cannot -be found. - -@publishedAll -@released -*/ - { -public: - IMPORT_C TContactIter(CContactDatabase &aDatabase); - IMPORT_C TContactItemId FirstL(); - IMPORT_C TContactItemId NextL(); - IMPORT_C TContactItemId PreviousL(); - IMPORT_C TContactItemId LastL(); - IMPORT_C void GotoL(TContactItemId aContactId); - IMPORT_C void Reset(); -private: - void GotoIndexL(TInt aPos); -private: - CContactDatabase &iDatabase; - TContactItemId iCursorId; - }; - -class MIdleFindObserver -/** The interface for an asynchronous find observer. - -An object which implements this interface is passed to the asynchronous find -functions defined in class CContactDatabase, (FindAsyncL() and FindInTextDefAsyncL()). -The observer would typically notify the user of the progress of the operation. - -@publishedAll -@released -*/ - { -public: - /** Asynchronous find observer callback. - - If an observer is supplied to CContactDatabase::FindAsyncL() - or FindInTextDefAsyncL(), this callback function is called by CIdle::RunL() - when nothing of a higher priority can be scheduled. It is called for every - 16 items searched to give the application a chance to update its search status. - - An implementation might test for and handle errors and retrieve information - about the progress of the search. This information may be retrieved using - functions provided by the CIdleFinder class. */ - virtual void IdleFindCallback()=0; - }; - -struct SFindInTextDefWordParser -/** Search string parser struct. - -An object of this type is used in the callback parser function passed to -CContactDatabase::FindInTextDefLC(). The parser function must walk -through and parse iSearchString, adding any words found to iWordArray. - -@publishedAll -@released -*/ - { -public: - inline SFindInTextDefWordParser(const TDesC *aSearchString, CDesCArray *aWordArray) : iSearchString(aSearchString), iWordArray(aWordArray) - /** Initialises the search string and the word array. - - @param aSearchString Pointer to the input string to be parsed. - @param aWordArray Pointer to the array to which words parsed from the input - string should be added. */ - {}; -public: - /** Pointer to the input string to be parsed. */ - const TDesC *iSearchString; - /** Pointer to the array to which words parsed from the input string should be - added. */ - CDesCArray *iWordArray; - }; - -class CIdleFinder : public CIdle -/** Provides information about the progress of an asynchronous contact database search, -and can be used to get the results of the search. - -An instance of this class is returned by calls to CContactDatabase::FindAsyncL() -and CContactDatabase::FindInTextDefAsyncL(). - -@publishedAll -@released -*/ - { -public: - ~CIdleFinder(); - IMPORT_C TBool IsComplete() const; - IMPORT_C CContactIdArray *TakeContactIds(); - IMPORT_C TInt Error() const; - TInt RunError(TInt aError); -private: - friend class CContactDatabase; - static CIdleFinder *NewL(CContactDatabase &aContactDatabase, const TDesC& aText, const CContactItemFieldDef *aFieldDef, MIdleFindObserver *aObserver); - static CIdleFinder *NewL(CContactDatabase &aContactDatabase, const MDesCArray* aFindWords,const CContactTextDef* aTextDef, MIdleFindObserver *aObserver, const TCallBack &aWordParserCallback); - void DoCancel(); - void Start(); - static TInt CallbackL(TAny *aSelf); - void ConstructL(const TDesC *aText, const MDesCArray* aFindWords, const TCallBack *aWordParserCallback); - TBool ScanForMatchL(const TDesC &aFieldText,const TDesC &aFindText, CFoundMatches *aFoundMatches) const; - TBool CheckFindL(TContactItemId aContactId) const; - TBool CheckFindL() const; - CIdleFinder(CContactDatabase &aContactDatabase, const CContactItemFieldDef *aFieldDef, const CContactTextDef* aTextDef, MIdleFindObserver *aObserver); - TBool doFindL(); - - enum TAsyncFindState - { - EFindInBlobFinished =0x00000001, - EFindInIdentityFinished =0x00000002, - EFindInEmailFinished =0x00000004, - EFindInTextDefFinished =0x00000008 - }; -private: - CContactDatabase *iContactDatabase; - CContactIdArray *iIdsFound; - TBool iOwnsIds; - CDesCArray* iFindWords; - TInt iReserved1; - TInt iReserved2; - TInt iReserved3; - const CContactItemFieldDef* iFieldDef; - const CContactTextDef* iTextDef; - MIdleFindObserver *iObserver; - TInt iError; - TCallBack iWordParserCallback; - TInt iReserved4; - TInt iReserved5; - TInt iReserved6; - TInt iReserved7; //was TDbColNo - TInt iReserved8; //was RDbView - TInt iReserved9; //was RDbView - TInt iReserved10; //was CIdentityTableColSet* - }; - -class MContactDbPrivObserver -/** Provides notification of database changes to clients. -* Provides information about database change event details and the type of changed event. -@publishedAll -@released -*/ - { -public: - -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) - virtual void HandleDatabaseEventL(RDbNotifier::TEvent)=0; -#endif - virtual void HandleDatabaseEventL(const TContactDbObserverEvent &aEvent)=0; - }; - - -class MContactSortObserver -/** -@publishedAll -@deprecated -*/ - { -public: - /** - @deprecated - */ - virtual void HandleSortEventL(TInt aContactsSorted, TInt aContactsTotal)=0; - }; - -class MConverterCallBack -/** -Interface class for providing Intra-Contact Properties during a PBAP specific contacts export. -@prototype -@internalTechnology -*/ -{ - public: - /** - PBAP clients are supposed to provide any information regarding the contact item represented by aContactId. - This information should be in form of standard vCard property, all such properties should be appended to the array aPropertyList. - */ - virtual void AddIntraContactPropertiesL(const TContactItemId& aContactId, CArrayPtr* aPropertyList) = 0; -}; - -enum TVCardVersion -/** -Specifies type of export of contact items. -PBAP clients should use EPBAPVCard21 and EPBAPVCard30. -@prototype -@internalTechnology -*/ - { - EVCardUDEF = -1, - EVCard21 = 0, - EVCard30, - EPBAPVCard21, - EPBAPVCard30 - }; - -class CContactDatabase : public CBase, public MContactDbPrivObserver, public MContactStorageObserver -/** A database of contact items. - -Contact items can be added to and removed from the database and items in the -database can be opened or read. To edit an item, it must first be opened. -Changes to the item can then be committed using CommitContactL() -(committing can only take place to an open item). - -If the available disk space is less than 128 kilobytes then changes to the -contact database cannot be started, and methods such as CreateL() or CommitContactL() -will leave with a KErrDiskFull error. Less obviously OpenL() can also fail with -KErrDiskFull when trying to update the system template. - -Each item has an access count. An item cannot be fully deleted unless its -access count is zero. This is to prevent items which have been -synchronised with another contacts application from being deleted. -Also, if the item is a template, it cannot be deleted if other items are based -on it. - -More than one contact database can exist on a phone, but there is a -default contact database. Its filename is contacts.cdb. It -can be moved between drives. - -CContactDatabase implements searching and sorting and also provides -separate phone number matching functions. These provide a fast way of indexing -and looking up phone numbers, e.g. for looking up caller IDs on incoming -calls. - -The database owns speed dial information. This is a mapping between a single -digit integer and a telephone number. There may be up to 9 speed dial telephone -numbers; each of them belongs to a contact item in the database. If a -contact item is deleted, its speed dial mapping is removed. - -The following functions defined in class CContactDatabase are not -supported. If called, they leave with KErrNotSupported. - -- ReplacePrefL() - -- ReadPrefL() - -- CreatePrefL() - -@publishedAll -@released -*/ - { - friend class TContactIter; - friend class CIdleFinder; - friend class CCntIdleSorter; - friend class CContactLocalView; - friend class CContactOpenOperation; - friend class RContactRemoteView; - friend class CViewIteratorProxyManager; - friend class CCollectionProxy; - friend class CContactActiveBase; -public: - class TSortPref - /** Specifies the field type and order preferences used for sorting items in the - contacts database. - - The contents of the first field in a contact item matching the field type - is used as the data to sort on. The order can either be ascending or descending. - - @see CContactDatabase::SortL() - @see CContactDatabase::SortArrayL() - @publishedAll - @deprecated - */ - { - public: - /** The sort order. */ - enum TOrder - { - /** Ascending sort order. */ - EAsc, - /** Descending sort order. */ - EDesc - }; - public: - inline TSortPref(); - inline TSortPref(TFieldType aFieldType,TOrder aOrder=EAsc); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C void InternalizeL(RReadStream& aStream); - public: - /** Specifies whether the sort should be ascending or descending. */ - TOrder iOrder; - /** The first field matching this field type is used for the text to sort on. */ - TFieldType iFieldType; - }; - - /** Import and export format flags. Contacts can be imported into - or exported from the contact database as vCards. - - The following options are available during import and export. - - @deprecated This enum is deprecated. It has been replaced by the TOptions enum in - the plugin convertor class CContactVCardConverter, so that each plugin converter - can define its own options. */ - enum TOptions - { - EDefault=0x0000, - /** Handle Symbian's extended vCard format options. */ - EIncludeX =0x0001, - /** Support non-standard extensions requried by Symbian PC connectivity software - and Microsoft, amongst others. */ - ETTFormat =0x0002, - /** Don't export the contact ID (for exporting only). */ - EExcludeUid=0x0004, - /** Decrease the contact's access count when importing and exporting. */ - EDecreaseAccessCount=0x0008, - /** Only import the first contact in the read stream (for importing only). */ - EImportSingleContact=0x0010, - /** Increase the contact's access count when importing and exporting. */ - EIncreaseAccessCount=0x0020, - /** Sets a contact item to the local time when importing. */ - ELocalTime=0x0040, - /** Allows you to set a template to a contact item that does not exist. */ - ENullTemplateId=0x0080, - /** For use by implementor of converter plug-in. */ - EConverterDefined1=0x0100, - /** For use by implementor of converter plug-in. */ - EConverterDefined2=0x0200, - /** For use by implementor of converter plug-in. */ - EConverterDefined3=0x0400, - /** For use by implementor of converter plug-in. */ - EConverterDefined4=0x0800, - /** For use by implementor of converter plug-in. */ - EConverterDefined5=0x1000, - /** For use by implementor of converter plug-in. */ - EConverterDefined6=0x2000, - /** For use by implementor of converter plug-in. */ - EConverterDefined7=0x4000, - /** For use by implementor of converter plug-in. */ - EConverterDefined8=0x8000, - /** Reserved for use by Symbian. */ - EConverterReserved1=0x00010000, - /** Reserved for use by Symbian. */ - EConverterReserved2=0x00020000, - /** Reserved for use by Symbian. */ - EConverterReserved3=0x00040000, - /** Reserved for use by Symbian. */ - EConverterReserved4=0x00080000, - /** Reserved for use by Symbian. */ - EConverterReserved5=0x00100000, - /** Reserved for use by Symbian. */ - EConverterReserved6=0x00200000, - /** Reserved for use by Symbian. */ - EConverterReserved7=0x00400000, - /** Reserved for use by Symbian. */ - EConverterReserved8=0x00800000, - /** Reserved for use by Symbian. */ - EConverterReserved9=0x01000000, - /** Reserved for use by Symbian. */ - EConverterReserved10=0x02000000, - /** Reserved for use by Symbian. */ - EConverterReserved11=0x04000000, - /** Reserved for use by Symbian. */ - EConverterReserved12=0x08000000, - /** Reserved for use by Symbian. */ - EConverterReserved13=0x10000000, - /** Reserved for use by Symbian. */ - EConverterReserved14=0x20000000, - /** Reserved for use by Symbian. */ - EConverterReserved15=0x40000000, - /** Reserved for use by Symbian. */ - EConverterReserved16=0x80000000 - }; - /** Specifies whether the database can be accessed from single or multiple threads. */ - enum TThreadAccess - { - /** Allows access to the contacts database from a single thread only. */ - ESingleThread, - /** Allows for a multi-threaded program to access the contact database from multiple - threads but note that the contacts model provides no synchronisation support - for such use. */ - EMultiThread - }; -/** -@internalComponent -*/ - enum TSortDataSource - { - ENoOrder, - EUsesIdentityTableOnly, - EUsesAllTables, - EIdentityTableNotUsed //Not used - }; -public: - IMPORT_C static CContactDatabase* OpenL(TThreadAccess aAccess=ESingleThread); - IMPORT_C static CContactDatabase* OpenL(const TDesC& aFileName,TThreadAccess aAccess=ESingleThread); - IMPORT_C static CContactDatabase* CreateL(TThreadAccess aAccess=ESingleThread); - IMPORT_C static CContactDatabase* CreateL(const TDesC& aFileName,TThreadAccess aAccess=ESingleThread); - IMPORT_C static CContactDatabase* ReplaceL(TThreadAccess aAccess=ESingleThread); - IMPORT_C static CContactDatabase* ReplaceL(const TDesC& aFileName,TThreadAccess aAccess=ESingleThread); - // asynchronous Open - IMPORT_C static CContactOpenOperation* Open(TRequestStatus& aStatus, TThreadAccess aAccess=ESingleThread); - IMPORT_C static CContactOpenOperation* Open(const TDesC& aFileName, TRequestStatus& aStatus, TThreadAccess aAccess=ESingleThread); - IMPORT_C static TBool DatabaseDrive(TDriveUnit &aDriveUnit); - inline static TInt NullUidValue(); - IMPORT_C static void SetDatabaseDriveL(TDriveUnit aDriveUnit, TBool aCopy=ETrue); - IMPORT_C static void GetDefaultNameL(TDes &aDes); - IMPORT_C static void DeleteDefaultFileL(); - // database file mangement - IMPORT_C static void DeleteDatabaseL(const TDesC& aFileName); - IMPORT_C static CDesCArray* ListDatabasesL(); - IMPORT_C static CDesCArray* ListDatabasesL(TDriveUnit aDriveUnit); - IMPORT_C static TBool DefaultContactDatabaseExistsL(); - IMPORT_C static TBool ContactDatabaseExistsL(const TDesC& aFileName); - IMPORT_C ~CContactDatabase(); - - IMPORT_C void SetViewDefinitionL(CContactViewDef* aView); - IMPORT_C void SetTextDefinitionL(CContactTextDef* aView); - IMPORT_C const CContactTextDef* TextDefinition() const; - IMPORT_C TInt CountL(); - IMPORT_C void SetDbViewContactType(const TUid aUid); - IMPORT_C TUid GetDbViewContactType() const; - - - IMPORT_C TContactItemId AddNewContactL(CContactItem& aContact); - - IMPORT_C CContactItem* CreateContactGroupL(TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactGroupLC(TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactGroupL(const TDesC& aGroupLabel,TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactGroupLC(const TDesC& aGroupLabel,TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactCardTemplateL(const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactCardTemplateLC(const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactCardTemplateL(const CContactItem* aTemplate,const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); - IMPORT_C CContactItem* CreateContactCardTemplateLC(const CContactItem* aTemplate,const TDesC& aTemplateLabel,TBool aInTransaction=EFalse); - - IMPORT_C CContactIdArray* GetCardTemplateIdListL() const; - IMPORT_C CContactIdArray* GetGroupIdListL() const; - IMPORT_C void AddContactToGroupL(TContactItemId aItemId, TContactItemId aGroupId); - IMPORT_C void AddContactToGroupL(CContactItem& aItem, CContactItem& aGroup); - IMPORT_C void AddContactToGroupL(TContactItemId aItemId, TContactItemId aGroupId,TBool aInTransaction); - IMPORT_C void RemoveContactFromGroupL(CContactItem& aItem, CContactItem& aGroup); - IMPORT_C void RemoveContactFromGroupL(TContactItemId aItemId, TContactItemId aGroupId); - inline TInt GroupCount() const; - inline TInt TemplateCount() const; - - // speed dial functions - IMPORT_C void SetFieldAsSpeedDialL(CContactItem& aItem, TInt aFieldIndex, TInt aSpeedDialPosition); - IMPORT_C TContactItemId GetSpeedDialFieldL(TInt aSpeedDialPosition, TDes& aPhoneNumber); - IMPORT_C void RemoveSpeedDialFieldL(TContactItemId aContactId, TInt aSpeedDialPosition); - - // reading contacts from the db - IMPORT_C CContactItem* ReadMinimalContactL(TContactItemId aContactId); - IMPORT_C CContactItem* ReadMinimalContactLC(TContactItemId aContactId); - IMPORT_C CContactItem* ReadContactL(TContactItemId aContactId); - IMPORT_C CArrayPtr* ReadContactAndAgentL(TContactItemId aContactId); - IMPORT_C CContactItem* ReadContactL(TContactItemId aContactId,const CContactItemViewDef& aViewDef); - IMPORT_C CContactItem* ReadContactLC(TContactItemId aContactId); - IMPORT_C CContactItem* ReadContactLC(TContactItemId aContactId,const CContactItemViewDef& aViewDef); - IMPORT_C void ReadContactTextDefL(const CContactItem &aItem, TDes &aResult); - IMPORT_C void ReadContactTextDefL(const CContactItem &aItem, TDes &aResult,CContactTextDef* aTextDef); - IMPORT_C void ReadContactTextDefL(TContactItemId aContactId, TDes &aResult); - IMPORT_C void ReadContactTextDefL(TContactItemId aContactId, TDes &aResult,CContactTextDef* aTextDef); - IMPORT_C CContactItem* OpenContactL(TContactItemId aContactId); - IMPORT_C CContactItem* OpenContactL(TContactItemId aContactId,const CContactItemViewDef& aViewDef); - IMPORT_C CContactItem* OpenContactLX(TContactItemId aContactId); - IMPORT_C CContactItem* OpenContactLX(TContactItemId aContactId,const CContactItemViewDef& aViewDef); - IMPORT_C void CloseContactL(TContactItemId aContactId); - IMPORT_C void CommitContactL(const CContactItem& aContact); - IMPORT_C void DeleteContactL(TContactItemId aContactId); - IMPORT_C void DeleteContactsL(const CContactIdArray& aContactIds); - IMPORT_C CArrayPtr* ImportContactsL(const TUid& aFormat,RReadStream& aReadStream,TBool& aImportSuccessful,TInt aOption); - IMPORT_C void ExportSelectedContactsL(const TUid& aFormat,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOption,TBool aExportPrivateFields=ETrue); - IMPORT_C void ExportSelectedContactsL(const TUid& aFormat,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOption,const Versit::TVersitCharSet aCharSet, TBool aExportPrivateFields=ETrue); - IMPORT_C void CompactL(); - - IMPORT_C CContactIdArray* FindLC(const TDesC& aText,const CContactItemFieldDef *aFieldDef); - IMPORT_C CIdleFinder* FindAsyncL(const TDesC& aText,const CContactItemFieldDef *aFieldDef, MIdleFindObserver *aObserver); - IMPORT_C CContactIdArray* FindInTextDefLC(const MDesCArray& aFindWords, const TCallBack &aWordParserCallback); - IMPORT_C CContactIdArray* FindInTextDefLC(const MDesCArray& aFindWords,CContactTextDef* aTextDef, const TCallBack &aWordParserCallback); - IMPORT_C CIdleFinder* FindInTextDefAsyncL(const MDesCArray& aFindWords, MIdleFindObserver *aObserver, const TCallBack &aWordParserCallback); - IMPORT_C CIdleFinder* FindInTextDefAsyncL(const MDesCArray& aFindWords,const CContactTextDef* aTextDef, MIdleFindObserver *aObserver, const TCallBack &aWordParserCallback); - IMPORT_C CContactIdArray* SortArrayL(const CContactIdArray* aIdArray, const CArrayFix* aSortOrder); - IMPORT_C CContactIdArray* SortArrayLC(const CContactIdArray* aIdArray, const CArrayFix* aSortOrder); - IMPORT_C void SortByTypeL(CArrayFix* aSortOrder); - IMPORT_C void SortL(CArrayFix* aSortOrder); - IMPORT_C void SortAsyncL(CArrayFix* aSortOrder, TRequestStatus& aStatus); - IMPORT_C void CancelAsyncSort(); - IMPORT_C void SortAsyncL(CArrayFix* aSortOrder, TRequestStatus& aStatus, MContactSortObserver& aObserver); - - IMPORT_C void SetOperationTimeOutL(const TInt aMicroSeconds) const; - IMPORT_C TPtrC FileUid(); - IMPORT_C CContactActiveCompress* CreateCompressorLC(); - IMPORT_C CContactActiveRecover* CreateRecoverLC(); - IMPORT_C void RecoverL(); - IMPORT_C TBool IsDamaged() const; - IMPORT_C TBool CompressRequired(); - IMPORT_C void CloseTables(); - IMPORT_C void OpenTablesL(); - - //New Phone Matching function, takes a number as a TDesc& and will match from the right of the string - //by the the number defined - IMPORT_C CContactIdArray* MatchPhoneNumberL(const TDesC& aNumber, TInt aMatchLengthFromRight); - - - IMPORT_C const CContactIdArray* SortedItemsL(); - IMPORT_C TContactItemId TemplateId() const; - IMPORT_C CContactItem* CreateOwnCardLC(); - IMPORT_C CContactItem* CreateOwnCardL(); - IMPORT_C TContactItemId OwnCardId() const; - IMPORT_C void SetOwnCardL(const CContactItem& aContact); - -// Preferred Template - IMPORT_C TContactItemId PrefTemplateId() const; - IMPORT_C void SetPrefTemplateL(const CContactItem& aContact); - -// Current item - IMPORT_C void SetCurrentItem(const TContactItemId aContactId); - IMPORT_C TContactItemId GetCurrentItem() const; - -// Connectivity - IMPORT_C void SetDateFormatTextL(const TDesC& aFormat); - IMPORT_C void FilterDatabaseL(CCntFilter& aFilter); - IMPORT_C CContactIdArray* ContactsChangedSinceL(const TTime& aTime); - IMPORT_C TContactSyncId SetLastSyncDateL(const TTime& aSyncDate); - IMPORT_C void SetLastSyncDateL(TContactSyncId aSyncId, const TTime& aSyncDate); - IMPORT_C void GetLastSyncDateL(TContactSyncId aSyncId, TTime& aSyncDate); - - IMPORT_C TInt FileSize() const; - IMPORT_C TInt WastedSpaceInBytes() const; - IMPORT_C TUint ConnectionId() const; - IMPORT_C const CContentType &TemplateContentType(const CContactItemField &aField) const; - IMPORT_C TVersion Version() const; - IMPORT_C TInt64 MachineId() const; - IMPORT_C TContactItemId ICCTemplateIdL(); - IMPORT_C TContactItemId ICCTemplateIdL(TUid aPhonebookUid); - IMPORT_C TContactItemId PhonebookGroupIdL(); - -public: // For test code only - IMPORT_C void DamageDatabaseL(TInt aSecretCode); // Don't use this, you don't really want to damage your database do you? - IMPORT_C void OverrideMachineUniqueId(TInt64 aMachineUniqueId); - IMPORT_C TInt CntServerResourceCount(); - IMPORT_C void SetCntServerHeapFailure(TInt aTAllocFailType,TInt aRate); - IMPORT_C CContactIdArray* DeletedContactsLC(); - IMPORT_C void ResetServerSpeedDialsL(); - -public: // For cnt server only -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) - void HandleDatabaseEventL(RDbNotifier::TEvent) {}; -#endif - IMPORT_C void HandleDatabaseEventL(const TContactDbObserverEvent &aEvent); - IMPORT_C TInt GetCurrentDatabase(TDes& aDatabase) const; - IMPORT_C TInt SetCurrentDatabase(const TDesC& aDatabase) const; - - IMPORT_C void StoreSortOrderL(); - IMPORT_C void RestoreSortOrderL(); - IMPORT_C const CArrayFix* SortOrder() const; - //Contact Hint Field Access - - /** Contact view filter flags. - - These flags define the bits that can be set in filtered views (CContactFilteredView) - and in the filter passed to CContactDatabase::ContactMatchesHintFieldL() for - comparing against contact view items (CViewContact). - - If the item's bit field and the view's filter have the same settings for the - CContactDatabase::EHome and CContactDatabase::EWork flags and any of the other - flags are set in both, a match occurs and the item is included in the view. - - Filters only apply to non-hidden contact fields with content. */ - enum TContactViewFilter - { - /** The view is unfiltered; it includes all contact items. */ - EUnfiltered =0x00000000, - /** The filter includes items that have an email address. */ - EMailable =0x00000001, - /** The filter includes items that have a mobile telephone number. */ - ESmsable =0x00000002, - /** The filter includes items that have a landline telephone number. */ - ELandLine =0x00000004, - /** The filter includes items that have a fax number. */ - EFaxable =0x00000008, - /** The filter includes items that are phonable. (All items with any of the above - three flags set also have this flag set). */ - EPhonable =0x00000010, - /** The filter excludes items without a work telephone number or email address. */ - EWork =0x00000020, - /** The filter excludes items without a home telephone number or email address. */ - EHome =0x00000040, - /** The filter includes items that have a non-empty ring tone field (a ring tone - that is associated with the item). */ - ERingTone =0x00000080, - /** The filter includes items that have a non-empty voice dial field (a voice - recording associated with a telephone number field in the item). */ - EVoiceDial =0x00000100, - /** The filter includes items that have any non empty instant messaging address field. */ - EIMAddress =0x00000200, - /** The filter includes items that have a non empty Wireless Village ID field. - An item with this flag set will also have the EIMAddress flag set. */ - EWirelessVillage = 0x00000400, - /** Reserved filters for future use. */ - ECustomFilter1 = 0x00000800, - /** Reserved filters for future use. */ - ECustomFilter2 = 0x00001000, - /** Reserved filters for future use. */ - ECustomFilter3 = 0x00002000, - /** Reserved filters for future use. */ - ECustomFilter4 = 0x00004000 - }; - - IMPORT_C TBool ContactMatchesHintFieldL(TInt aBitWiseFilter,TContactItemId aContactId); -public: // for vCard converter only - IMPORT_C void DatabaseBeginLC(TBool aIsInTransaction); - IMPORT_C void DatabaseCommitLP(TBool aIsInTransaction); - IMPORT_C CContactItem *UpdateContactLC(TContactItemId aContactId,CContactItem* aNewContact); - IMPORT_C TContactItemId doAddNewContactL(CContactItem& aContact,TBool aIsTemplate,TBool aIsInTransaction); - IMPORT_C void doCommitContactL(const CContactItem& aContact,TBool aIsInTransaction, TBool aSendChangedEvent); - IMPORT_C TContactItemId ContactIdByGuidL(const TDesC& aGuid); - IMPORT_C void doDeleteContactL(TContactItemId aContactId, TBool aIsInTransaction, TBool aSendChangedEvent, TBool aDecAccessCount=EFalse); - IMPORT_C CContactItemViewDef* AllFieldsView(); -public: // For Symbian use only - IMPORT_C void DatabaseBeginL(TBool aIsInTransaction); - IMPORT_C void DatabaseCommitL(TBool aIsInTransaction); - IMPORT_C void DatabaseRollback(); - IMPORT_C void SetSortedItemsList(CContactIdArray* aSortedItems, CArrayFix* aSortOrder); - IMPORT_C CContactIdArray* UnfiledContactsL(); - IMPORT_C static void RecreateSystemTemplateL(const TDesC& aFileName); -public: // For Contacts Lock Server use only - IMPORT_C static CContactDatabase* LockServerConnectL(const TDesC& aFileName); - IMPORT_C static CContactDatabase* LockServerConnectL(const TDesC& aFileName, TInt aOperation); - IMPORT_C TInt LockServerCallBackL(TUint aServerOperation); - IMPORT_C void LockServerCleanup(); -public: - IMPORT_C void ExportSelectedContactsL(const TUid& aFormat, const CContactIdArray& aSelectedContactIds, RWriteStream& aWriteStream, TInt aOption, const TInt64 aContactFieldFilter, MConverterCallBack* aCallback, const TVCardVersion aVersion, const TBool aExportTel, Versit::TVersitCharSet aCharSet = Versit::EUTF8CharSet, TBool aExportPrivateFields = ETrue); -private: - //for cntiter - TInt ContactPosL(TContactItemId aContactId); - TInt DoGotoL(TContactItemId aContactId); - - void DoReadContactTextDefL(const CContactItemFieldSet* aFieldSet,TDes& aResult,CContactTextDef* aTextDef); - CContactItem* OpenNoMergeLCX(TContactItemId aContactId); - - void FetchGroupAndTemplateListsL(); - -public: - void CancelNotifyRequestL(); - TBool IsICCSynchronisedL(); - - //for LocalView - void AddObserverL(MContactDbObserver& aChangeNotifier); - void RemoveObserver(const MContactDbObserver& aChangeNotifier); - - void OpenDatabaseAsyncL(TRequestStatus& aStatus, const TDesC& aFileName = KNullDesC); - static void CleanupLastLockedContact(TAny *aDatabase); - -private: - CContactConverter& CContactDatabase::ConverterL(const TUid& aFormat); - CContactConverter& CContactDatabase::ConverterL(const TUid& aFormat, const TInt64 aContactFieldFilter, MConverterCallBack* aCallback, const TVCardVersion aVersion,const TBool aExportTel); - static void CleanupDatabaseRollback(TAny *aDatabase); - - CContactIdArray* SortLC(const CArrayFix* aSortOrder, const CContactIdArray* aIdArray); - TBool CheckType(TUid aUid) const; - void SortDuplicatesL(const CArrayFix& aSortOrder,CSortArray& aList,TInt aPos); - void SortDuplicatesL(const CArrayFix& aSortOrder,CSortArray& aList, - TInt aIndex,TInt aStartPos,TInt aEndPos); - TBool AddContactToSortListL(TContactItemId aReqId, TContactItemId& aActualId,CBase* aItems, TUid& aFieldType, TBool aHasSortOrder); - void RemoveFromSortArray(TContactItemId aContactId); - void HandleDbObserverEventGroupDeletedL(const TContactItemId aContactId); - void RemoveFromGroupIds(const TContactItemId aContactId); - -public: - static void CleanupTableCancel(TAny *aTable); -/** A text buffer of KTextFieldMinimalLength used during sorting and searching of contacts */ - typedef TBuf TTextFieldMinimal; - static TUid SpeedDialFieldUidFromSpeedDialPosition(TInt aSpeedDialPosition); - void HandleDiskSpaceEvent(TInt aDrive); - - /** State of database connection - */ - enum TDbConnState - { - /** Database is open, connection is available for use. */ - EDbConnectionOpen = 0, - /** Initial state. */ - EDbConnectionNotReady, - /** Asynchronous Open failed. */ - EDbConnectionFailed, - /** A Rollback has occurred and a Recover is required now. */ - EDbConnectionRecoverRequired, - /** Write access is locked during backup. */ - EDbConnectionWriteLockedForBackup, - /** The database has been closed whilst a Restore is in progress. */ - EDbConnectionClosedForRestore, - /** Restore is in progress need to close after current transaction. */ - EDbConnectionNeedToCloseForRestore, - }; - /** Currently unused */ - enum TDirection {EAsc,EDesc}; //unused - void SetDbConnectionState(TDbConnState aDbConnectionState); -private: - void CheckDbConnForWriteL() const; - void CheckDbConnForReadL() const; - void CheckDbConnForRecoverL() const; - void CheckTemplateField(CContactItem& aCnt); - static void ValidateDatabaseNameL(const TParse& aParseName); - void StartAsyncActivityL(); - void EndAsyncActivityL(); - TBool DatabaseReadyL() const; - enum TSvrSessionType //unused - { - // Server Session is persistent, for Open(L), CreateL or ReplaceL - ESvrSessionPersistent, - // Server Session is temporary, for a simple static API - ESvrSessionTemporary, - // Session is from the Contacts Lock Server - ESvrSessionFromLockServer, - }; -private: // objec construction/destruction - - CContactDatabase(); - static CContactDatabase* NewLC(); - void ConstructL(); - void CreateViewDefL(); - MLplPersistenceLayerFactory* FactoryL(); - -private: - CContactItem* doCreateContactGroupLC(const TDesC& aGroupLabel = KNullDesC); - void AddCntToOpenedGroupL(TContactItemId aItemId, CContactItem& aGroup); - void ReadTemplateIds(); - void AddToTemplateListL(const TContactItemId aNewTemplateId); - void RemoveFromTemplateList(const TContactItemId aOldTemplateId); - TBool SystemTemplateFieldsValid(const CContactItem& aContact); - void RespondToEventL(const TContactDbObserverEventType aEventType, const TContactItemId aContactId); - void HandleDbObserverEventGroupOrContactChangedL(const TContactItemId aContactId); - void HandleDbObserverEventGroupOrContactAddedL(const TContactDbObserverEventType aEventType, const TContactItemId aContactId); - TBool CheckSortError(TInt aError); - TInt NextExistingL(TInt aIndex); - TInt PreviousExistingL(TInt aIndex); - void ReSortL(CArrayFix* aSortOrder); - void InsertInSortArray(const CContactItem& aContact); - void MoveInSortArray(const CContactItem& aContact); - void InsertInSortArrayL(const CContactItem& aContact); - void MoveInSortArrayL(const CContactItem& aContact); - TInt NewSortIndexL(const CContactItem& aContact,TInt aStartPos,TInt aEndPos); - TInt CompareSortFieldsL(const CContactItem& aContact); - void ConstructTableUsageFlagsFromSortOrderL(TInt& aFlags); - void LoadSyncPluginL(); - void DeleteContactSendEventActionL(TContactItemId aContactId, TCntSendEventAction aActionType); - -private: - // Member variables - RCntModel* iCntSvr; //was RDbNamedDatabase iDatabase; - CProxyFactory* iProxyFactory; //was RDbs iDbsSession; - TDbConnState iDbConnectionState; //was CContactClientSession* iContactClientSession; - CDataBaseChangeObserver* iDataBaseObserver; //was CPrivateDbChangeNotifier* iDbChangeNotifier; - CCntIdleSorter* iIdleSorter; //was CPrivateSvrSessionManager* iServerSessionManager; - CPrivConverter* iConv; //was TContactItemId iLastLockedContactId; - TBool iTablesOpen; //was TContactItemId iTemplateId; - CContactItemViewDef* iAllFieldsView; //was TContactItemId iOwnCardId; - TUid iDbViewContactType; //used to select which contact type to sort / search on - - //These two members are accessed via the inline functions! - CContactIdArray* iCardTemplateIds; - CContactIdArray* iGroupIds; - - CCntTemplateCache* iTemplateCache; //was CContactTables* iItemTable; - CContactTextDef* iTextDef; //remains - CContactIdArray* iSortedItems; //remains - CContactViewDef* iView; //remains - - // Used in SetLastSyncDateL() and GetLastSyncDateL() - TTime iSyncDate; //was TInt64 iMachineUniqueId; - TCollationMethod iCollateMethod; //remains: used for sorting contacts - - TInt iAsyncActivityCount; - CContactSynchroniser* iContactSynchroniser; //a handle to the synchroniser plugin - CArrayFix* iSortOrder; // holds a sort order passed into SortL(), as in cntmodelv1, - // for delayed deletion to maintain backwards compatibility - }; - - -class CContactChangeNotifier : public CBase -/** Receives events reporting changes to a contact database. - -After the change notifier has been created, it notifies the specified -observer whenever a change takes place to the database. - -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CContactChangeNotifier(); - IMPORT_C static CContactChangeNotifier* NewL(CContactDatabase& aDatabase, MContactDbObserver *aObserver); -private: - CContactChangeNotifier(CContactDatabase& aDatabase, MContactDbObserver *aObserver); - void ConstructL(); -private: - CContactDatabase &iDatabase; - MContactDbObserver* iObserver; - }; - - -/** The UID of the default vCard converter implemented by an ECom plugin. */ -#define KUidEComCntVCardConverterDefaultImplementation 0x102035F9 -/** The UID of the default vCard converter plugin implementation. This -implementation is independent of the plugin framework used. */ -#define KUidVCardConvDefaultImpl KUidEComCntVCardConverterDefaultImplementation - -/** The UID of the vCard converter ECom plugin interface. */ -const TUid KUidEcomCntVCardConverterInterface = {0x102035F7}; - -/** The UID of the phone number parser ECom plugin interface. */ -const TUid KUidEcomCntPhoneNumberParserInterface = {0x102035FA}; - -/** The UID of PBAP vCard Converter plugin Implementation. -@prototype -@internalTechnology -*/ -#define KUidPBAPVCardConvImpl 0xA00015C1 - -class TPluginParameters -/** -Class used to pack the extra arguments required for a PBAP conveter, -PBAP client provides these arguments using overloaded CContactDatabase::ExportSelectedContacts. -@prototype -@internalComponent -*/ -{ -public: - TPluginParameters(TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel); - TInt64 GetFilter()const; - MConverterCallBack* GetCallback()const; - TVCardVersion GetExportVersion()const; - TBool IsExportTel()const; -private: - TInt64 iFilter; - MConverterCallBack* iCallback; - TVCardVersion iVersion; - TBool iExportTel; -}; - -inline TBool TPluginParameters::IsExportTel()const - { - return iExportTel; - } -inline TInt64 TPluginParameters::GetFilter()const - { - return iFilter; - } - -inline MConverterCallBack* TPluginParameters::GetCallback()const - { - return iCallback; - } - -inline TVCardVersion TPluginParameters::GetExportVersion()const - { - return iVersion; - } - -inline TPluginParameters::TPluginParameters(TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel):iFilter(aContactFieldFilter), iCallback(aCallback), iVersion(aVersion), iExportTel(aExportTel) - { - } - -class CContactConverter : public CBase -/** Provides functionality to import and export vCards. -One or more vCards can be imported from a read stream (the vCards are converted -into contact items and added to the database). Also, contact items can be exported as vCards. - -@publishedPartner -@released -*/ - { -public: - virtual CArrayPtr* ImportL(CContactDatabase& aDb,RReadStream& aReadStream,TBool& aImportSuccessful,TInt aOptions,TBool aImportSingle)=0; - virtual void ExportL(CContactDatabase& aDb,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOptions,const Versit::TVersitCharSet aCharSet,TBool aExportPrivateFields, TInt aCommitNumber=10)=0; - }; - - -class CContactEcomConverter : public CContactConverter -/** -It provides Ecom Framework based facilities to resolve and load the appropriate implementations at run-time. -The framework supplies a default resolver for selecting appropriate implementations. -@publishedPartner -@released -*/ - { -public: - static CContactEcomConverter* NewL(TUid aImplementationUid); - static CContactEcomConverter* NewL(TUid aImplementationUid, TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel); - inline virtual ~CContactEcomConverter(); -private: - TUid iDtor_ID_Key; - }; - -inline CContactEcomConverter* CContactEcomConverter::NewL(TUid aImplementationUid) -/** Allocates and instantiates an interface implementation to satisfy the specified interface. -@param aImplementationUid Denotes the type of implemetation that needs to be loaded. -@return A pointer to a newly allocated and initialised object of type CContactEcomConverter. */ - -{ - TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, - _FOFF(CContactEcomConverter, - iDtor_ID_Key)); - return reinterpret_cast(ptr); -} - -inline CContactEcomConverter* CContactEcomConverter::NewL(TUid aImplementationUid, TInt64 aContactFieldFilter, MConverterCallBack* aCallback, TVCardVersion aVersion, TBool aExportTel) -/** Allocates and instantiates an interface implementation for PBAP export. -@param aImplementationUid Denotes the type of implemetation that needs to be loaded. -@param aContactFieldFilter Specifies contact fields to be exported. -@param aCallback Callback to client for providing intra-contact properties. -@param aVersion Denotes the vCard version for contact export. -@return A pointer to a newly allocated and initialised object of type CContactEcomConverter. */ - -{ - TPluginParameters partr(aContactFieldFilter,aCallback,aVersion,aExportTel); - - TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, - _FOFF(CContactEcomConverter, - iDtor_ID_Key), &partr); - return reinterpret_cast(ptr); -} - -inline CContactEcomConverter::~CContactEcomConverter() -/** The destruction of the interface implementation referred to by iDtor_ID_Key */ - { - REComSession::DestroyedImplementation(iDtor_ID_Key); - } - - -class CContactPhoneNumberParser : public CBase -/** Provides functionality to extract the real phone number from a contact's phone number field. -@publishedPartner -@released -*/ - { -public: - virtual void ExtractRawNumber(const TDesC& aTextualNumber, TDes& aRawNumber)=0; - }; - - -class CContactEcomPhoneNumberParser : public CContactPhoneNumberParser -/** It provides Ecom Framework based facilities to resolve and load the appropriate implementations at run-time. -The framework supplies a default resolver for selecting appropriate implementations. -@publishedPartner -@released -*/ - { -public: - static CContactEcomPhoneNumberParser* NewL(TUid aImplementationUid); - inline virtual ~CContactEcomPhoneNumberParser(); -private: - TUid iDtor_ID_Key; - }; - -inline CContactEcomPhoneNumberParser* CContactEcomPhoneNumberParser::NewL(TUid aImplementationUid) -/** Allocates and Instantiates an interface implementation to satisfy the specified interface. -@param aImplementationUid denotes the type of implemetation that need to be loaded. -@return A pointer to a newly allocated and initialised object of type CContactEcomPhoneNumberParser. */ - { - TAny* ptr = REComSession::CreateImplementationL(aImplementationUid, - _FOFF(CContactEcomPhoneNumberParser, - iDtor_ID_Key)); - return reinterpret_cast(ptr); - } - -inline CContactEcomPhoneNumberParser::~CContactEcomPhoneNumberParser() -/** The destruction of the interface implementation referred to by iDtor_ID_Key */ - { - REComSession::DestroyedImplementation(iDtor_ID_Key); - } - - -inline TInt CContactDatabase::TemplateCount() const -/** Gets the number of contact card templates that exist in the database. -This does not include the system template. -@deprecated -@return The number of contact card templates that exist in the database. */ - { return iCardTemplateIds->Count(); } - -inline TInt CContactDatabase::GroupCount() const -/** Gets the number of groups that exist in the database. -@deprecated -@return The number of groups that exist in the database. */ - { return iGroupIds->Count(); } - -inline TInt CContactDatabase::NullUidValue() -/** Gets the NULL contact ID value. - -@return KNullContactId. */ - { return KNullContactId; } - -inline TUid CContactItemViewDef::operator[](TInt aIndex) const -/** Gets the field type located at a specified index position within the field type array. - -@param aIndex The position of the field type in the array, relative to zero. It -must be non-negative and less than the number of objects in the array otherwise the -function raises a panic. -@return The field type located at index aIndex within the array (this is equivalent to a -TFieldType). */ - { return iFieldTypes[aIndex]; } - -inline TInt CContactItemViewDef::Count() const -/** Gets the number of field types in the view definition. - -@return The number of field types in the view definition. */ - { return iFieldTypes.Count(); } - -inline void CContactItemViewDef::Reset() -/** Deletes all field types from the view definition's field type array. */ - { iFieldTypes.Reset(); } - -inline CContactItemViewDef::TUse CContactItemViewDef::Use() const -/** Gets the view definition's use. - -@return The current TUse setting. */ - { return iUse; } - -inline void CContactItemViewDef::SetUse(CContactItemViewDef::TUse aUse) -/** Sets the view definition's use. - -@param aUse The new TUse setting. */ - { iUse=aUse; } - -inline CContactItemViewDef::TMode CContactItemViewDef::Mode() const -/** Gets the view definition's mode. - -@return The current TMode setting. */ - { return iMode; } - -inline void CContactItemViewDef::SetMode(CContactItemViewDef::TMode aMode) -/** Sets the view definition's mode. - -@param aMode The new TMode setting. */ - { iMode=aMode; } - -inline CContactDatabase::TSortPref::TSortPref() - : iOrder(EAsc), iFieldType(KNullUid) -/** Constructs a TSortPref object. The order is initialised to EAsc and the field -type to KNullUid. -@deprecated -*/ - {} - -inline CContactDatabase::TSortPref::TSortPref(TFieldType aFieldType,TOrder aOrder) - : iOrder(aOrder), iFieldType(aFieldType) -/** Constructs the TSortPref object with a field type and an order. -@param aFieldType Specifies the field type to sort on. -@param aOrder Specifies the sort order. -@deprecated -*/ - {} - - -/** A class that manages the asynchronous open operation for a CContactDatabase. - -The object can be deleted before the asynchronous open completes. This will set -the state of the client supplied TRequestStatus to KErrCancel. - -When the client supplied TRequestStatus is completed with KErrNone the TakeDatabase() -method is called to pass ownership of the open database to the client. - -@publishedAll -@released - -@see CContactDatabase::OpenL() -*/ -class CContactOpenOperation : private CActive - { -public: - IMPORT_C CContactDatabase* TakeDatabase(); - IMPORT_C ~CContactOpenOperation(); - - static CContactOpenOperation* NewL(TRequestStatus& aPtrStatus); - static CContactOpenOperation* NewL(const TDesC& aFileName, TRequestStatus& aPtrStatus); - -private: - // from CActive (for BC reasons) - void RunL(); - TInt RunError(TInt aError); - void DoCancel(); - - CContactOpenOperation (TRequestStatus& aClientStatus); - void ConstructL (const TDesC& aFileName = KNullDesC); - -private: - TRequestStatus* iClientStatus; - CContactDatabase* iContactDatabase; - }; - - -#endif //__CNTDB_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntdbobs.h --- a/epoc32/include/cntdbobs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__CNTDBOBS_H__) -#define __CNTDBOBS_H__ - -#if !defined(__E32DEF_H__) -#include -#endif - -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) && !defined __D32DBMS_H__ -#include -#else -#include -#include -#endif - -#include //for tcontactitemid - -/** Change event type. For events which update, delete or add a contact item, the -ID of the item affected is provided in the TContactDbObserverEvent struct. -@publishedAll -@released - */ -enum TContactDbObserverEventType - { - /** Null event type. */ - EContactDbObserverEventNull, - /** Not currently used. */ - EContactDbObserverEventUnused, - /** A contact item (not a template, group or own card) has been changed. */ - EContactDbObserverEventContactChanged, - /** A contact item (not a template, group or own card) has been deleted. */ - EContactDbObserverEventContactDeleted, - /** A contact item (not a template or group) has been added. */ - EContactDbObserverEventContactAdded, - /** Unknown change event type. */ - EContactDbObserverEventUnknownChanges, - /** Recover from a damaged database. */ - EContactDbObserverEventRecover, - /** Rollback from a change to the database. */ - EContactDbObserverEventRollback, - /** Database tables closed. */ - EContactDbObserverEventTablesClosed, - /** Database tables opened. */ - EContactDbObserverEventTablesOpened, - /** A contact card template has changed. */ - EContactDbObserverEventTemplateChanged, - /** A contact card template has been deleted. */ - EContactDbObserverEventTemplateDeleted, - /** A contact card template has been added. */ - EContactDbObserverEventTemplateAdded, - /** The database's current item has been deleted. */ - EContactDbObserverEventCurrentItemDeleted, - /** The database's current item has changed. */ - EContactDbObserverEventCurrentItemChanged, - /** The database's own card has changed. */ - EContactDbObserverEventOwnCardChanged, - /** The database's preferred template has been set. (See CContactDatabase::SetPrefTemplateL()). */ - EContactDbObserverEventPreferredTemplateChanged, - /** An own card has been deleted from the database. */ - EContactDbObserverEventOwnCardDeleted, - /** A contact item group has been added. */ - EContactDbObserverEventGroupAdded, - /** A contact item group has been updated. */ - EContactDbObserverEventGroupChanged, - /** A contact item group has been deleted from the database. */ - EContactDbObserverEventGroupDeleted, - /** The current database has changed. */ - EContactDbObserverEventCurrentDatabaseChanged, - /** The phone number assigned to one of the speed dial positions - has been replaced, removed or modified.*/ - EContactDbObserverEventSpeedDialsChanged, - /** Not currently used. */ - EContactDbObserverEventSortOrderChanged, - /** Contacts DB about to be backed up */ - EContactDbObserverEventBackupBeginning, - /** Contacts DB about to be restored */ - EContactDbObserverEventRestoreBeginning, - /** The backup/restore operation has completed. */ - EContactDbObserverEventBackupRestoreCompleted, - /** The restore operation has completed but the database could not be opened. */ - EContactDbObserverEventRestoreBadDatabase, - /** Database has been compressed. */ - EContactDbObserverEventCompress - }; - -struct TContactDbObserverEvent -/** Contact database change event details. These include the type of change event -and the ID of the contact item affected by the change, if relevant. - -An object of this type is passed to a contact database's change observer, -see MContactDbObserver::HandleDatabaseEventL(). -@publishedAll -@released -*/ - { - /** The change event type. */ - TContactDbObserverEventType iType; - /** The ID of the contact item affected. */ - TContactItemId iContactId; - /** Identifies which connection to the contacts server generated the event. Use - CContactDatabase::ConnectionId() to get the ID of the current connection. - - Set to zero if the event has no meaningful connection ID. */ - TUint iConnectionId; - }; - -class MContactDbObserver -/** The interface for an observer that handles changes to a contact database. - -It specifies a single pure virtual function which should be implemented by -the observer class to test the type of the change event (see the TContactDbObserverEventType -enum) and handle it. - -There is no need for the observer class to explicitly test for all possible -event types - the event is for information only and event types which are of no interest -to the observer class can safely be ignored. - -The change event type (TContactDbObserverEventType) may be augmented -in future releases with additional values. - -A contact database observer pointer is passed to the NewL() function for the -CContactChangeNotifier class. -@publishedAll -@released -*/ - { -public: - /** Tests the contact database observer event type and handles it. The ID of a - contact affected by the change event, if relevant, can be retrieved via TContactDbObserverEvent::iContactId. - - @param aEvent Provides information about the change event. */ - virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent)=0; - }; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntdef.h --- a/epoc32/include/cntdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1402 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTDEF_H__ -#define __CNTDEF_H__ - -#include - -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) -#include -#else -#include -#include -#endif - -#include - - -// Constants - -/** -@internalTechnology -@released -*/ -const TInt KSpeedDialPhoneLength = 64; - -/** -@internalTechnology -@released -*/ -const TInt KCntMinSpeedDialIndex = 1; - -/** -@internalTechnology -@released -*/ -const TInt KCntMaxSpeedDialIndex = 9; - -/** -Phone Match Length -@internalTechnology -@released -*/ -const TInt KMaxPhoneMatchLength = 15; - -/** -@internalTechnology -@released -*/ -const TInt KLowerSevenDigits = 7; - -/** -Used for firstname, lastname, companyname, secondname and their -associated pronunciation fields and e-mail address -@internalTechnology -@released -*/ -const TInt KCntMaxTextFieldLength=255; - -// Type definitions - -/** -@internalTechnology -@released -*/ -typedef TBuf TSpeedDialPhoneNumber; - -/** Contact item ID. These are used to uniquely identify contact items within a -contacts database. Contact items include contact cards, contact card templates, -contact card groups and own cards. Contact item IDs are also used to uniquely -identify agents. -@publishedAll -@released -*/ -typedef TInt32 TContactItemId; - -/** A UID which identifies a contact item field's type. The possible values are -defined as UIDs in cntdef.h. -@publishedAll -@released -*/ -typedef TUid TFieldType; - -/** A contact item field's storage type. - -This is an unsigned integer value which identifies the type of data stored -in a contact item field. The possible values are defined in cntdef.hrh as: - -- KStorageTypeText (used by CContactTextFields) - -- KStorageTypeStore (used by CContactStoreFields) - -- KStorageTypeContactItemId (used by CContactAgentFields) - -- KStorageTypeDateTime (used by CContactDateFields) - -Note that numeric fields are not supported. Numbers (e.g. telephone -numbers) are stored in the database using text fields. -@publishedAll -@released -*/ -typedef TUint TStorageType; - -/** Machine identifier. - -This is used when synchronising the contact database to identify the -machine with which the database has been synchronised. -@see CContactDatabase::SetLastSyncDateL() -@see CContactDatabase::GetLastSyncDateL(). -@publishedAll -@released -*/ -typedef TInt32 TContactSyncId; - -/** Stores the value of KUidContactsDbFile as an integer. -@publishedAll -@released -*/ -const TInt KUidContactsDbFileValue=0x100065FF; -/** -The third UID of the contacts database file, c:\\system\\data\\contacts.cdb. -This should be used by file recogniser implementations. -@publishedAll -@released -*/ -const TUid KUidContactsDbFile={KUidContactsDbFileValue}; - - -/** NULL contact item ID. Indicates that no contact item is present. -@publishedAll -@released -*/ -const TContactItemId KNullContactId=-1; -/** -The ID of the system template. -@publishedAll -@released -*/ -const TContactItemId KGoldenTemplateId=0; - -/** Identifies a vCard that has been pasted from the clipboard into the Contacts application. -@publishedAll -@released -*/ -const TUid KClipboardUidTypeVCard={0x100038f6}; - -/** Identifies a contact card (CContactCard). -@publishedAll -@released -*/ -const TUid KUidContactCard={KUidContactCardValue}; -/** Identifies a contact group (CContactGroup). -@publishedAll -@released -*/ -const TUid KUidContactGroup={KUidContactGroupValue}; -/** Identifies the system template (CContactTemplate). -@publishedAll -@released -*/ -const TUid KUidContactTemplate={KUidContactTemplateValue}; -/** Identifies an own card (CContactOwnCard). -@publishedAll -@released -*/ -const TUid KUidContactOwnCard={KUidContactOwnCardValue}; -/** Identifies a non-system template (CContactCardTemplate). -@publishedAll -@released -*/ -const TUid KUidContactCardTemplate={KUidContactCardTemplateValue}; -/** The UID that identifies ICC entries. These are a special type of -contact item that are stored in the SIM (ICC) card on the phone. - -@publishedAll -@released -*/ -const TUid KUidContactICCEntry={KUidContactICCEntryValue}; - -/** Identifies any CContactItem-derived class (all of the above). -@publishedAll -@released -*/ -const TUid KUidContactItem={0x10005673}; -/** This identifies the CContactCard and CContactGroup classes. -It is used internally by the contacts model. -@publishedAll -@released -*/ -const TUid KUidContactCardOrGroup={0x10005F71}; - - -/* - * Speed-dial UIDs. - * These are used to indicate the speed-dial position for a particular field. - * They are added to the content type of a phone number field set as a - * speed-dial using CContactDatabase::SetFieldAsSpeedDialL(). - */ -/** Field maps to the first speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialOne={KUidSpeedDialOneValue}; -/** Field maps to the second speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialTwo={KUidSpeedDialTwoValue}; -/** Field maps to the third speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialThree={KUidSpeedDialThreeValue}; -/** Field maps to the fourth speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialFour={KUidSpeedDialFourValue}; -/** Field maps to the fifth speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialFive={KUidSpeedDialFiveValue}; -/** Field maps to the sixth speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialSix={KUidSpeedDialSixValue}; -/** Field maps to the seventh speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialSeven={KUidSpeedDialSevenValue}; -/** Field maps to the eighth speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialEight={KUidSpeedDialEightValue}; -/** Field maps to the ninth speed dial position. -@publishedAll -@released -*/ -const TUid KUidSpeedDialNine={KUidSpeedDialNineValue}; - -/* - * Contact field type UIDs. - */ -/** Address field. -@publishedAll -@released -*/ -const TUid KUidContactFieldAddress={KUidContactFieldAddressValue}; -/** Post office box field. -@publishedAll -@released -*/ -const TUid KUidContactFieldPostOffice={KUidContactFieldPostOfficeValue}; -/** Extended address field. -@publishedAll -@released -*/ -const TUid KUidContactFieldExtendedAddress={KUidContactFieldExtendedAddressValue}; -/** Locality field. -@publishedAll -@released -*/ -const TUid KUidContactFieldLocality={KUidContactFieldLocalityValue}; -/** Region field. -@publishedAll -@released -*/ -const TUid KUidContactFieldRegion={KUidContactFieldRegionValue}; -/** Post code field. -@publishedAll -@released -*/ -const TUid KUidContactFieldPostcode={KUidContactFieldPostCodeValue}; -/** Country field. -@publishedAll -@released -*/ -const TUid KUidContactFieldCountry={KUidContactFieldCountryValue}; - -/** Company name field. -@publishedAll -@released -*/ -const TUid KUidContactFieldCompanyName={KUidContactFieldCompanyNameValue}; -/** Company name pronunciation field. -@publishedAll -@released -*/ -const TUid KUidContactFieldCompanyNamePronunciation={KUidContactFieldCompanyNamePronunciationValue}; -/** Phone number field. -@publishedAll -@released -*/ -const TUid KUidContactFieldPhoneNumber={KUidContactFieldPhoneNumberValue}; -/** Given name field. -@publishedAll -@released -*/ -const TUid KUidContactFieldGivenName={KUidContactFieldGivenNameValue}; -/** Family name field. -@publishedAll -@released -*/ -const TUid KUidContactFieldFamilyName={KUidContactFieldFamilyNameValue}; -/** Given name pronunciation field. -@publishedAll -@released -*/ -const TUid KUidContactFieldGivenNamePronunciation={KUidContactFieldGivenNamePronunciationValue}; -/** Family name pronunciation field. -@publishedAll -@released -*/ -const TUid KUidContactFieldFamilyNamePronunciation={KUidContactFieldFamilyNamePronunciationValue}; -/** Middle name field. -@publishedAll -@released -*/ -const TUid KUidContactFieldAdditionalName={KUidContactFieldAdditionalNameValue}; -/** Name suffix field. -@publishedAll -@released -*/ -const TUid KUidContactFieldSuffixName={KUidContactFieldSuffixNameValue}; -/** Name prefix field. -@publishedAll -@released -*/ -const TUid KUidContactFieldPrefixName={KUidContactFieldPrefixNameValue}; -/** Hidden field. -@publishedAll -@released -*/ -const TUid KUidContactFieldHidden={KUidContactFieldHiddenValue}; -/** Hidden field. -@publishedAll -@released -*/ -const TUid KUidContactFieldDefinedText={KUidContactFieldDefinedTextValue}; -/** Email address field. -@publishedAll -@released -*/ -const TUid KUidContactFieldEMail={KUidContactFieldEMailValue}; -/** Telephone number used for a messaging service. -@publishedAll -@released -*/ -const TUid KUidContactFieldMsg={KUidContactFieldMsgValue}; -/** Telephone number used for SMS messages. -@publishedAll -@released -*/ -const TUid KUidContactFieldSms={KUidContactFieldSmsValue}; -/** Fax number field. -@publishedAll -@released -*/ -const TUid KUidContactFieldFax={KUidContactFieldFaxValue}; -/** Comment field. -@publishedAll -@released -*/ -const TUid KUidContactFieldNote={KUidContactFieldNoteValue}; -/** Comment field. -@publishedAll -@released -*/ -const TUid KUidContactStorageInline={KUidContactFieldStorageInlineValue}; -/** Birthday field. -@publishedAll -@released -*/ -const TUid KUidContactFieldBirthday={KUidContactFieldBirthdayValue}; -/** URL field. -@publishedAll -@released -*/ -const TUid KUidContactFieldUrl={KUidContactFieldUrlValue}; -/** Template label field (a label which is used to refer to a template, for instance "work -template", "personal template"). -@publishedAll -@released -*/ -const TUid KUidContactFieldTemplateLabel={KUidContactFieldTemplateLabelValue}; -/** A picture field, for instance a logo or a photo. -@publishedAll -@released -*/ -const TUid KUidContactFieldPicture={KUidContactFieldPictureValue}; -/** Used internally by the contacts model. -@publishedAll -@released -*/ -const TUid KUidContactFieldDTMF={KUidContactFieldDTMFValue}; -/** Identifies a ring tone field. This is a ring tone that is associated with a contact item. -@publishedAll -@released -*/ -const TUid KUidContactFieldRingTone={KUidContactFieldRingToneValue}; -/** Identifies a job title field. -@publishedAll -@released -*/ -const TUid KUidContactFieldJobTitle={KUidContactFieldJobTitleValue}; -/** Identifies an instant messaging address field. -@publishedAll -@released -*/ -const TUid KUidContactFieldIMAddress = { KUidContactFieldIMAddressValue }; -/** Identifies a USIM second name field. This field is provided to -store an additional representation of the contact's name, such as a -nickname or a different representation. An example could be a Japanese -contact which has a romanised name and an alternative representation using -kanji (pictogram) characters. -@publishedAll -@released -*/ -const TUid KUidContactFieldSecondName = { KUidContactFieldSecondNameValue }; -/** Identifies a SIP identity field. -@publishedAll -@released -*/ -const TUid KUidContactFieldSIPID = { KUidContactFieldSIPIDValue }; -/** Identifies a Assistant field. -@publishedAll -@released -*/ -const TUid KUidContactFieldAssistant = { KUidContactFieldAssistantValue }; -/** Identifies an Anniversary field. -@publishedAll -@released -*/ -const TUid KUidContactFieldAnniversary = { KUidContactFieldAnniversaryValue }; -/** Identifies a Spouse field. -@publishedAll -@released -*/ -const TUid KUidContactFieldSpouse = { KUidContactFieldSpouseValue }; -/** Identifies a Children field. -@publishedAll -@released -*/ -const TUid KUidContactFieldChildren = { KUidContactFieldChildrenValue }; -/** Identifies a Class field. -@publishedAll -@released -*/ -const TUid KUidContactFieldClass = { KUidContactFieldClassValue }; -/** Identifies a Department field. -@publishedAll -@released -*/ -const TUid KUidContactFieldDepartmentName = { KUidContactFieldDepartmentNameValue }; -/* -* CContactICCEntry (Telephony specific) UIDs. - */ -/** Identifies an ICC slot contact field in the contact item. -@publishedAll -@released -*/ -const TUid KUidContactFieldICCSlot={KUidContactFieldICCSlotValue}; -/** Identifies an ICC Phonebook contact field in the contact item. -@publishedAll -@released -*/ -const TUid KUidContactFieldICCPhonebook={KUidContactFieldICCPhonebookValue}; -/** Identifies an ICC Group contact field in the contact item. -@publishedAll -@released -*/ -const TUid KUidContactFieldICCGroup={KUidContactFieldICCGroupValue}; - -/** Identifies a voice dial field. This is a voice recording associated with a telephone number -field in the item. -@publishedAll -@released -*/ -const TUid KUidContactsVoiceDialField={KUidContactsVoiceDialFieldValue}; - -/** Indicates no field present. -@publishedAll -@released -*/ -const TUid KUidContactFieldNone={KUidContactFieldNoneValue}; -/** Used in field type matching to indicate that all field types match. -@publishedAll -@released -*/ -const TInt32 KUidContactFieldMatchAllValue=0x110FFF22; -const TUid KUidContactFieldMatchAll={KUidContactFieldMatchAllValue}; - -/* - * Contact field type vCard mappings. - * The vCard mapping describes how the field should be handled by the - * vCard import/export code. - */ -/** Field type maps to the Post office box field in an ADR vCard property value. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPOSTOFFICE={KIntContactFieldVCardMapPOSTOFFICE}; -/** Field type maps to the Extended address field in an ADR vCard property value. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapEXTENDEDADR={KIntContactFieldVCardMapEXTENDEDADR}; -/** Field type maps to vCard property ADR. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapADR={KIntContactFieldVCardMapADR}; -/** Field type maps to the Locality field in an ADR vCard property value. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapLOCALITY={KIntContactFieldVCardMapLOCALITY}; -/** Field type maps to the Region field in an ADR vCard property value. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapREGION={KIntContactFieldVCardMapREGION}; -/** Field type maps to the Postcode field in an ADR vCard property value. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPOSTCODE={KIntContactFieldVCardMapPOSTCODE}; -/** Field type maps to the Country field in an ADR vCard property value. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapCOUNTRY={KIntContactFieldVCardMapCOUNTRY}; - -/** Field type maps to vCard property AGENT. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapAGENT={KIntContactFieldVCardMapAGENT}; -/** Field type maps to vCard property BDAY. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapBDAY={KIntContactFieldVCardMapBDAY}; -/** Field type maps to vCard property EMAIL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapEMAILINTERNET={KIntContactFieldVCardMapEMAILINTERNET}; -/** Field type maps to vCard property GEO. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapGEO={KIntContactFieldVCardMapGEO}; -/** Field type maps to vCard property LABEL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapLABEL={KIntContactFieldVCardMapLABEL}; -/** Field type maps to vCard property LOGO. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapLOGO={KIntContactFieldVCardMapLOGO}; -/** Field type maps to vCard property MAILER. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapMAILER={KIntContactFieldVCardMapMAILER}; -/** Field type maps to vCard property NOTE. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapNOTE={KIntContactFieldVCardMapNOTE}; -/** Field type maps to vCard property ORG. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapORG={KIntContactFieldVCardMapORG}; -/** Field type maps to vCard X-IRMC-ORG parameter of property SOUND. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapORGPronunciation={KIntContactFieldVCardMapORGPronunciation}; -/** Field type maps to vCard property PHOTO. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPHOTO={KIntContactFieldVCardMapPHOTO}; -/** Field type maps to vCard property ROLE. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapROLE={KIntContactFieldVCardMapROLE}; -/** Field type maps to vCard property SOUND. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapSOUND={KIntContactFieldVCardMapSOUND}; -/** Field type maps to vCard property TEL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapTEL={KIntContactFieldVCardMapTEL}; -/** Field type maps to vCard property parameter FAX. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapTELFAX={KIntContactFieldVCardMapTELFAX}; -/** Field type maps to vCard property TITLE. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapTITLE={KIntContactFieldVCardMapTITLE}; -/** Field type maps to vCard property URL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapURL={KIntContactFieldVCardMapURL}; -/** Field maps to the vCard property N (name). Must be used in conjunction with -a name-related field type (e.g. KUidContactFieldGivenName) to form the given -name field mapping. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapUnusedN={KIntContactFieldVCardMapUnusedN}; -/** Field type maps to vCard property FN (the display name). -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapUnusedFN={KIntContactFieldVCardMapUnusedFN}; -/** Mapping between the vCard property and field type is not required. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapNotRequired={KIntContactFieldVCardMapNotRequired}; -/** Unknown mapping between a field type and a vCard extension property. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapUnknownXDash={KIntContactFieldVCardMapUnknownXDash}; -/** Unknown mapping between field type and non-extension vCard property. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapUnknown={KIntContactFieldVCardMapUnknown}; -/** Field type maps to vCard property UID. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapUID={KIntContactFieldVCardMapUID}; -/** Field type maps to vCard property parameter WORK. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapWORK={KIntContactFieldVCardMapWORK}; -/** Field type maps to vCard property parameter HOME. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapHOME={KIntContactFieldVCardMapHOME}; -/** Field type maps to vCard property parameter MSG. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapMSG={KIntContactFieldVCardMapMSG}; -/** Field type maps to vCard property parameter VOICE. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapVOICE={KIntContactFieldVCardMapVOICE}; -/** Field type maps to vCard property parameter FAX. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapFAX={KIntContactFieldVCardMapFAX}; -/** Field type maps to vCard property parameter PREF. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPREF={KIntContactFieldVCardMapPREF}; -/** Field type maps to vCard property parameter CELL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapCELL={KIntContactFieldVCardMapCELL}; -/** Field type maps to vCard property parameter PAGER. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPAGER={KIntContactFieldVCardMapPAGER}; -/** Field type maps to vCard property parameter BBS. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapBBS={KIntContactFieldVCardMapBBS}; -/** Field type maps to vCard property parameter MODEM. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapMODEM={KIntContactFieldVCardMapMODEM}; -/** Field type maps to vCard property parameter CAR. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapCAR={KIntContactFieldVCardMapCAR}; -/** Field type maps to vCard property parameter ISDN. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapISDN={KIntContactFieldVCardMapISDN}; -/** Field type maps to vCard property parameter VIDEO. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapVIDEO={KIntContactFieldVCardMapVIDEO}; -/** Field type maps to vCard property parameter DOM. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapDOM={KIntContactFieldVCardMapDOM}; -/** Field type maps to vCard property parameter INTL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapINTL={KIntContactFieldVCardMapINTL}; -/** Field type maps to vCard property parameter POSTAL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPOSTAL={KIntContactFieldVCardMapPOSTAL}; -/** Field type maps to vCard property parameter PARCEL. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPARCEL={KIntContactFieldVCardMapPARCEL}; -/** Field type maps to vCard property parameter value GIF. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapGIF={KIntContactFieldVCardMapGIF}; -/** Field type maps to vCard property parameter value CGM. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapCGM={KIntContactFieldVCardMapCGM}; -/** Field type maps to vCard property parameter value WMF. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapWMF={KIntContactFieldVCardMapWMF}; -/** Field type maps to vCard property parameter value BMP. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapBMP={KIntContactFieldVCardMapBMP}; -/** Field type maps to vCard property parameter value MET. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapMET={KIntContactFieldVCardMapMET}; -/** Field type maps to vCard property parameter value PMB. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPMB={KIntContactFieldVCardMapPMB}; -/** Field type maps to vCard property parameter value DIB. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapDIB={KIntContactFieldVCardMapDIB}; -/** Field type maps to vCard property parameter value PICT. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPICT={KIntContactFieldVCardMapPICT}; -/** Field type maps to vCard property parameter value TIFF. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapTIFF={KIntContactFieldVCardMapTIFF}; -/** Field type maps to vCard property parameter value PDF. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPDF={KIntContactFieldVCardMapPDF}; -/** Field type maps to vCard property parameter value PS. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPS={KIntContactFieldVCardMapPS}; -/** Field type maps to vCard property parameter value JPEG. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapJPEG={KIntContactFieldVCardMapJPEG}; -/** Field type maps to vCard property parameter value MPEG. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapMPEG={KIntContactFieldVCardMapMPEG}; -/** Field type maps to vCard property parameter value MPEG2. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapMPEG2={KIntContactFieldVCardMapMPEG2}; -/** Field type maps to vCard property parameter value AVI. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapAVI={KIntContactFieldVCardMapAVI}; -/** Field type maps to vCard property parameter value QTIME. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapQTIME={KIntContactFieldVCardMapQTIME}; -/** Field type maps to vCard property TZ. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapTZ={KIntContactFieldVCardMapTZ}; -/** Field type maps to vCard property KEY. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapKEY={KIntContactFieldVCardMapKEY}; -/** Field type maps to vCard property parameter value X509. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapX509={KIntContactFieldVCardMapX509}; -/** Field type maps to vCard property parameter value PGP. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPGP={KIntContactFieldVCardMapPGP}; -/** Used internally by the contacts model. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapSMIME={KIntContactFieldVCardMapSMIME}; -/** The field contains a Wireless Village instant messaging ID. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapWV={KIntContactFieldVCardMapWV}; -/** Field type mapping of a vCard property to contacts Second Name Field -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapSECONDNAME={KIntContactFieldVCardMapSECONDNAME}; -/** Field type mapping of a vCard property to contacts SIP Identity Field. -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapSIPID={KIntContactFieldVCardMapSIPID}; -/** Field type maps to vCard extension property parameter value POC -(Push to Talk Over Cellular). -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapPOC={KIntContactFieldVCardMapPOC}; -/** Field type maps to vCard extension property parameter value SWIS -("See What I See"). -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapSWIS={KIntContactFieldVCardMapSWIS}; -/** Field type maps to vCard extension property parameter value VOIP -(Voice Over IP). -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapVOIP={KIntContactFieldVCardMapVOIP}; -/** Field type maps to vCard extension property parameter value Assistant -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapAssistant={KIntContactFieldVCardMapAssistant}; -/** Field type maps to vCard extension property parameter value AssistantTel -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapAssistantTel={KIntContactFieldVCardMapAssistantTel}; -/** Field type maps to vCard extension property parameter value Anniversary -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapAnniversary={KIntContactFieldVCardMapAnniversary}; -/** Field type maps to vCard extension property parameter value Spouse -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapSpouse={KIntContactFieldVCardMapSpouse}; -/** Field type maps to vCard extension property parameter value Children -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapChildren={KIntContactFieldVCardMapChildren}; -/** Field type maps to vCard extension property parameter value Class -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapClass={KIntContactFieldVCardMapClass}; -/** Field type maps to vCard extension property parameter value Department -@publishedAll -@released -*/ -const TUid KUidContactFieldVCardMapDepartment={KIntContactFieldVCardMapDepartment}; - -/** Name of the TYPE property parameter, for which the values are work, home etc. -@publishedAll -@released -*/ -_LIT(KVersitParamType,"TYPE"); -/** Name of the WORK property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamWork,"WORK"); -/** Name of the HOME property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamHome,"HOME"); -/** Name of the MSG property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamMsg,"MSG"); -/** Name of the VOICE property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamVoice,"VOICE"); -/** Name of the FAX property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamFax,"FAX"); -/** Name of the PREF property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPref,"PREF"); -/** Name of the CELL property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamCell,"CELL"); -/** Name of the PAGER property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPager,"PAGER"); -/** Name of the BBS property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamBbs,"BBS"); -/** Name of the MODEM property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamModem,"MODEM"); -/** Name of the CAR property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamCar,"CAR"); -/** Name of the ISDN property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamIsdn,"ISDN"); -/** Name of the VIDEO property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamVideo,"VIDEO"); -/** Name of the DOM property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamDom,"DOM"); -/** Name of the GIF property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamGif,"GIF"); -/** Name of the CGM property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamCgm,"CGM"); -/** Name of the WMF property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamWmf,"WMF"); -/** Name of the BMP property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamBmp,"BMP"); -/** Name of the MET property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamMet,"MET"); -/** Name of the PMB property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPmb,"PMB"); -/** Name of the DIB property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamDib,"DIB"); -/** Name of the PICT property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPict,"PICT"); -/** Name of the TIFF property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamTiff,"TIFF"); -/** Name of the PDF property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPdf,"PDF"); -/** Name of the PS property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPs,"PS"); -/** Name of the JPEG property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamJpeg,"JPEG"); -/** Name of the MPEG property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamMpeg,"MPEG"); -/** Name of the MPEG2 property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamMpeg2,"MPEG2"); -/** Name of the AVI property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamAvi,"AVI"); -/** Name of the QTIME property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamQtime,"QTIME"); -/** Name of the X509 property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamX509,"X509"); -/** Name of the PGP property parameter. -@publishedAll -@released -*/ -_LIT(KVersitParamPGP,"PGP"); - -/** 8 bit name of the TYPE property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Type,"TYPE"); -/** 8 bit name of the WORK property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Work,"WORK"); -/** 8 bit name of the HOME property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Home,"HOME"); -/** 8 bit name of the MSG property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Msg,"MSG"); -/** 8 bit name of the VOICE property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Voice,"VOICE"); -/** 8 bit name of the FAX property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Fax,"FAX"); -/** 8 bit name of the PREF property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Pref,"PREF"); -/** 8 bit name of the CELL property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Cell,"CELL"); -/** 8 bit name of the PAGER property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Pager,"PAGER"); -/** 8 bit name of the BBS property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Bbs,"BBS"); -/** 8 bit name of the MODEM property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Modem,"MODEM"); -/** 8 bit name of the CAR property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Car,"CAR"); -/** 8 bit name of the ISDN property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Isdn,"ISDN"); -/** 8 bit name of the VIDEO property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Video,"VIDEO"); -/** 8 bit name of the DOM property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Dom,"DOM"); -/** 8 bit name of the GIF property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Gif,"GIF"); -/** 8 bit name of the CGM property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Cgm,"CGM"); -/** 8 bit name of the WMF property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Wmf,"WMF"); -/** 8 bit name of the BMP property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Bmp,"BMP"); -/** 8 bit name of the MET property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Met,"MET"); -/** 8 bit name of the PMB property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Pmb,"PMB"); -/** 8 bit name of the DIB property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Dib,"DIB"); -/** 8 bit name of the PICT property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Pict,"PICT"); -/** 8 bit name of the TIFF property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Tiff,"TIFF"); -/** 8 bit name of the PDF property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Pdf,"PDF"); -/** 8 bit name of the PS property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Ps,"PS"); -/** 8 bit name of the JPEG property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Jpeg,"JPEG"); -/** 8 bit name of the MPEG property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Mpeg,"MPEG"); -/** 8 bit name of the MPEG2 property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Mpeg2,"MPEG2"); -/** 8 bit name of the AVI property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Avi,"AVI"); -/** 8 bit name of the QTIME property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8Qtime,"QTIME"); -/** 8 bit name of the X509 property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8X509,"X509"); -/** 8 bit name of the PGP property parameter. -@publishedAll -@released -*/ -_LIT8(KVersitParam8PGP,"PGP"); - -/** -8 bit name of the X-IRMC-N property parameter (family or given -name pronunciation). -@publishedAll -@released -*/ -_LIT8(KVersitParam8NamePrn,"X-IRMC-N"); -/** -8 bit name of the X-IRMC-ORG property parameter (company -name pronunciation). -@publishedAll -@released -*/ -_LIT8(KVersitParam8CompanyPrn,"X-IRMC-ORG"); -/** -8 bit name of the X-IRMC- property parameter (pronunciation field prefix). -@publishedAll -@released -*/ -_LIT8(KVersitParam8PronunciationPrefix,"X-IRMC-"); - - - -class CContactIdArray : public CBase -/** Array of contact item IDs (TContactItemIds). - -Instances of this class are used in several contact database functions, -for instance CContactDatabase::DeleteContactsL(). -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactIdArray* NewL(); - IMPORT_C static CContactIdArray* NewLC(); - IMPORT_C static CContactIdArray* NewL(const CContactIdArray* aArray); - IMPORT_C static CContactIdArray* NewLC(const CContactIdArray* aArray); - static CContactIdArray* NewLC(RReadStream& aStream); - IMPORT_C ~CContactIdArray(); - inline const TContactItemId& operator[](TInt aIndex) const; - inline TContactItemId& operator[](TInt aIndex); - inline TInt Count() const; - inline void Reset(); - IMPORT_C TInt Find(TContactItemId aId) const; - IMPORT_C void AddL(TContactItemId aId); - - inline void Remove(TInt aIndex); - inline void Remove(TInt aIndex,TInt aCount); - inline void InsertL(TInt aIndex,TContactItemId aId); - IMPORT_C void MoveL(TInt aOldIndex,TInt aNewIndex); - IMPORT_C void ReverseOrder(); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; -public: // intended for internal Contacts Model usage only - void Sort(); -private: - CContactIdArray(); - void ConstructL(); - void CloneL(const CContactIdArray* aArray); -private: - CArrayFixFlat *iIds; - }; -inline const TContactItemId& CContactIdArray::operator[](TInt aIndex) const -/** Gets the indexed TContactItemId. - -@param aIndex The position of the contact ID within the array, relative to zero. -This must be non-negative and less than the number of objects in the array -otherwise the operator raises a panic. -@return A reference to a const element of the array. */ - { return (*iIds)[aIndex]; } - -inline TContactItemId& CContactIdArray::operator[](TInt aIndex) -/** Gets the indexed TContactItemId. - -@param aIndex The position of the contact ID within the array, relative to zero. -This must be non-negative and less than the number of objects in the array -otherwise the operator raises a panic. -@return A reference to a non-const element of the array. */ - { return (*iIds)[aIndex]; } - -inline TInt CContactIdArray::Count() const -/** Gets the number of contact IDs in the array. - -@return The number of contact IDs in the array. */ - { return iIds->Count(); } - -inline void CContactIdArray::Reset() -/** Removes all contact IDs from the array. */ - { iIds->Reset(); } - -inline void CContactIdArray::Remove(TInt aIndex) -/** Removes the indexed contact ID from the array. - -The index value must not be negative and must not be greater than the number -of elements in the array, otherwise the function raises a panic. - -@param aIndex The index of the contact ID to remove. */ - { iIds->Delete(aIndex); } - -inline void CContactIdArray::Remove(TInt aIndex,TInt aCount) -/** Removes a block of contact IDs from the array. - -This function raises a panic if any of the following are true:- - -- aCount is negative - -- aIndex is negative or is greater than the number of elements currently in -the array - -- the sum of aIndex and aCount is greater than the number of elements currently -in the array - -@param aIndex The index of the first contact ID to remove. -@param aCount The number of contiguous contact IDs to delete from the array. -If this is not specified, a value of one is assumed. */ - { iIds->Delete(aIndex,aCount); } - -inline void CContactIdArray::InsertL(TInt aIndex,TContactItemId aId) -/** Inserts a contact ID into the array. - -The index must be valid or a panic occurs. - -The function may attempt to expand the array buffer. If there is insufficient -memory available, the function leaves. The leave code is one of the system -error codes. If the function leaves, the array is left in the state it was -in before the call. - -@param aIndex The index at which to insert the contact ID. -@param aId The contact ID to insert. */ - { iIds->InsertL(aIndex,aId); } - - -/** Shows supported event action types that are used when deleting -a contact or an array of contacts -@internalTechnology -@released -*/ -enum TCntSendEventAction - { - EDeferEvent = 0, - ESendEvent = 1, - ESendUnknownChangesEvent = 2, - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntfield.h --- a/epoc32/include/cntfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,642 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Persistence layer exports -// -// - - - -#if !defined(__CNTFIELD_H__) -#define __CNTFIELD_H__ - -#include - - - -const TInt KNullFieldId=-1; - -//const TInt KIntContactFieldHint???=0x01; -const TInt KIntContactHintIsPhone=0x02; -const TInt KIntContactHintIsMsg=0x04; -const TInt KIntContactHintIsCompanyName=0x08; -const TInt KIntContactHintIsFamilyName=0x10; -const TInt KIntContactHintIsGivenName=0x20; -const TInt KIntContactHintIsAddress=0x40; -const TInt KIntContactHintIsAdditionalName=0x80; -const TInt KIntContactHintIsSuffixName=0x100; -const TInt KIntContactHintIsPrefixName=0x200; -const TInt KIntContactHintStorageInline=0x400; -const TInt KIntContactHintIsEmail=0x4000; -const TInt KIntContactHintIsPronunciation=0x800; -const TInt KIntContactHintIsCompanyNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsCompanyName; -const TInt KIntContactHintIsGivenNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsGivenName; -const TInt KIntContactHintIsFamilyNamePronunciation=KIntContactHintIsPronunciation|KIntContactHintIsFamilyName; - -const TInt KHintTypeMask = 0x1FFFFF; - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ -const TInt KHintAdditionalMask = 0x7F000000; //Number of additional type ids. -const TInt KHintVCardMappingMask = 0x80000000; //bit flag to show if there is a vCard mapping uid. -const TInt KHintTemplateFieldMask = 0x7FFFFFFF; //Template field mask in low hint value. - -const TInt KHintAdditionalMaskShift = 24; - -#else //_SYMBIAN_USE_SQLITE__ - -const TInt KHintAdditionalMask = 0x200000; -const TInt KHintIdMask = 0xFFC00000; - -#endif //_SYMBIAN_USE_SQLITE__ - - -class RWriteStream; -class RReadStream; -class CContactFieldStorage; -class CContactTextField; -class CContactStoreField; -class CContactAgentField; -class CContactDateField; -class TFieldHeader; -class CContactItemField; -class CContactItemFieldDef; -class CContactItemFieldSet; -class CContactItem; - -class CContentType : public CBase -/** The content type for a contact item field. - -The content type identifies the field's type and the vCard property which -the field maps to. It is owned by the field. Field types are defined as UIDs -in cntdef.h. - -The vCard mapping is optional. It should be specified if the field type alone -is not enough to identify the mapping. The possible values for the vCard -mapping are defined as UIDs in cntdef.h. - -Each field is uniquely identified by the combination of UIDs contained in -the content type. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CContentType(); - IMPORT_C static CContentType* NewL(); - IMPORT_C static CContentType* NewL(TFieldType aFieldType,TUid aMapping=KNullUid); - IMPORT_C static CContentType* NewL(const CContentType &aContentType); - static CContentType* NewLC(RReadStream& aStream); - IMPORT_C void SetMapping(TUid aMapping); - IMPORT_C void AddFieldTypeL(TFieldType aFieldType); - IMPORT_C void RemoveFieldType(TFieldType aFieldType); - IMPORT_C TFieldType FieldType(TInt aIndex) const; - IMPORT_C TInt FieldTypeCount() const; - IMPORT_C TUid Mapping() const; - IMPORT_C TBool ContainsFieldType(TFieldType aFieldType) const; - IMPORT_C TBool SupportsMultipleLines() const; - IMPORT_C TBool operator==(const CContentType &aType) const; - IMPORT_C TBool IsEqualForSyncUpdate(const CContentType& aType) const; - IMPORT_C TBool IsEqual(const CContentType& aType) const; - void Reset(); - void InternalizeAdditionalUidsL(TInt aCount,RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); -private: - CContentType(); - CContentType(TUid aMapping); - void ConstructL(); - void CloneL(const CContentType &aContentType); -private: - TUid iMapping; - CArrayFix* iFieldTypes; - }; - -class CContactItemField : public CBase -/** A field in a contact item. - -Fields are grouped into a field set (CContactItemFieldSet), which is owned by -the contact item. - -The contact item field stores the field data. The data may be text, a date/time -value, or an agent, as indicated by the storage type (TStorageType). The storage -type is also owned by the field. Note that numeric field data is not supported. -All numbers, for instance telephone or fax numbers are stored as text. - -Fields also have a content type, attributes and a label. The label is a string -which identifies the field to a user e.g. First name, Last name. - -The following attributes are supported: - -- hidden: the field is not displayed if the view definition masks hidden -fields - -- disabled: the field cannot be deleted from the original template and thus -is marked as disabled - -- read only: the field cannot be written to - -- synchronise: used by Connectivity applications; set by default for all -contact item fields - -- user added: the field was added by the user and was not taken from the -template - -- template: indicates that the field is part of a template. Template fields -differ from other fields in that they are persisted when they do not contain -any data. - -- speed dial: the field contains a telephone number which maps to one of -the nine possible speed dial positions. - -These attributes can be set using member functions of this class, but they -are normally set automatically by other functions, for instance when -setting a speed dial field, CContactDatabase automatically sets the field's -speed dial attribute. -@publishedAll -@released -*/ - { -private: - friend class TFieldHeader; - friend class CContactItemFieldSet; - friend class CContactDatabase; - friend class CContactTables; - friend class RPplContactTable; - friend class CPackagerTests; - class THint - /** - @internalComponent - @released - */ - { - public: - THint(); - THint(TInt aValue); - TBool operator==(const THint& aHint) const; - TBool operator!=(const THint& aHint) const; - TInt HintType() const; - inline void SetIsMatchAll(); - inline void SetIsPhone(); - inline void SetIsMsg(); - inline void SetIsCompanyName(); - inline void SetIsFamilyName(); - inline void SetIsGivenName(); - inline void SetIsCompanyNamePronunciation(); - inline void SetIsFamilyNamePronunciation(); - inline void SetIsGivenNamePronunciation(); - inline void SetIsAddress(); - inline void SetIsAdditionalName(); - inline void SetIsSuffixName(); - inline void SetIsPrefixName(); - inline void SetStorageIsInline(); - inline void SetIsEmail(); - inline TBool IsMatchAll() const; - inline TBool IsDefault() const; - inline TBool IsPhone() const; - inline TBool IsMsg() const; - inline TBool IsCompanyName() const; - inline TBool IsFamilyName() const; - inline TBool IsGivenName() const; - inline TBool IsCompanyNamePronunciation() const; - inline TBool IsFamilyNamePronunciation() const; - inline TBool IsGivenNamePronunciation() const; - inline TBool IsAddress() const; - inline TBool IsAdditionalName() const; - inline TBool IsSuffixName() const; - inline TBool IsPrefixName() const; - inline TBool IsStorageInline() const; - inline TBool IsEmail() const; - inline TBool Contains(const THint& aHint) const; - -#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ - inline void SetHasAdditionalUids(); - TBool HasAdditionalUids() const; - - TInt FieldId() const; - void SetFieldId(TInt aId); - -#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ - TInt TemplateFieldId() const; - void SetTemplateFieldId(TInt aTemplateFieldId); - - inline void SetHasVCardMappingUid(); - inline TBool HasVCardMappingUid() const; - - inline TInt AdditionalUidsNum() const; - inline void SetAdditionalUidsNum(TInt aNumber); -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - public: - TInt iHintValue; - - }; - -public: - IMPORT_C static CContactItemField* NewLC(); - IMPORT_C static CContactItemField* NewL(TStorageType aType); - IMPORT_C static CContactItemField* NewLC(TStorageType aType); - IMPORT_C static CContactItemField* NewL(TStorageType aType, TFieldType aFieldType); - IMPORT_C static CContactItemField* NewLC(TStorageType aType, TFieldType aFieldType); - IMPORT_C static CContactItemField* NewL(const CContactItemField &aField); - IMPORT_C static CContactItemField* NewLC(const CContactItemField &aField); - IMPORT_C static CContactItemField* NewL(TStorageType aType, const CContentType &aContentType); - IMPORT_C static CContactItemField* NewLC(TStorageType aType, const CContentType &aContentType); - IMPORT_C ~CContactItemField(); - - IMPORT_C TStorageType StorageType() const; - IMPORT_C const CContentType &ContentType() const; - inline TBool IsHidden() const; - inline TBool IsReadOnly() const; - inline TBool IsDisabled() const; - inline TBool IsTemplate() const; - inline TBool IsPrivate() const; - inline TBool IsSpeedDial() const; - inline TBool DoSynchronize() const; - inline TBool OverRidesLabel() const; - inline TBool HasExtraStream() const; - inline TBool UsesTemplateTypes() const; - inline TBool LabelUnspecified() const; - inline TBool UserAddedField() const; - inline TBool IsCustomFilterable() const; - IMPORT_C void SetHintType(TInt aType); - IMPORT_C TPtrC Label() const; - IMPORT_C void ResetStore(); - IMPORT_C CContactFieldStorage* Storage() const; - IMPORT_C CContactTextField * TextStorage() const; - IMPORT_C CContactStoreField * StoreStorage() const; - IMPORT_C CContactAgentField * AgentStorage() const; - IMPORT_C CContactDateField * DateTimeStorage() const; - IMPORT_C void AddFieldTypeL(TFieldType aFieldType); - IMPORT_C void RemoveFieldType(TFieldType aFieldType); - IMPORT_C void SetMapping(TUid aMapping); - IMPORT_C void SetHidden(TBool aHidden); - IMPORT_C void SetReadOnly(TBool aReadOnly); - IMPORT_C void SetSynchronize(TBool aSynchronize); - IMPORT_C void SetDisabled(TBool aDisabled); - IMPORT_C void SetLabelL(const TDesC& aLabel); - IMPORT_C void SetLabel(HBufC* aLabel); - IMPORT_C void SetUserAddedField(TBool aUserAddedField); - IMPORT_C void SetTemplateField(TBool aTemplateField); - IMPORT_C void SetPrivate(TBool aTemplateField); - IMPORT_C void SetSpeedDial(TBool aSpeedDialField); - IMPORT_C void SetId(TInt aId); - IMPORT_C TInt Id() const; - IMPORT_C TUint UserFlags() const; - IMPORT_C void SetUserFlags(TUint aFlags); - IMPORT_C static TBool IsValidLabel(const TDesC& aLabel,TInt& aInvalidPos); - IMPORT_C TBool IsTemplateLabelField() const; - IMPORT_C void GetFieldText(TDes &aText) const; - IMPORT_C void RestoreHeaderL(RReadStream& aStream, const CContactItemFieldSet *aSystemTemplateFields); - IMPORT_C TStreamId RestoreFieldTypesL(RReadStream &aRootStream, const CContactItemFieldSet *aSystemTemplateFields); - IMPORT_C void RestoreTextL(HBufC *aTextStream,TInt aTextFieldIndex); - IMPORT_C TBool RestoreIfMatchL(RReadStream& aStream,const CContactItemFieldDef *aFieldDef, const CContactItemFieldSet *aSystemTemplateFields,HBufC *aTextStream,TInt aTextIndex); - -public: - IMPORT_C void SetCustomFilterable(EContactFieldFlags aContactFilterType); - IMPORT_C void Reset(); - void SetUsesTemplateTypes(TBool aUsesTemplateTypes); - void SetOverRidesLabel(TBool aValue); - TInt TemplateFieldId() const; - void SetDeleted(TBool aDeleted); - inline TBool IsDeleted() const; - void CopyStorageL(const CContactItemField &aField); - void UpdateFieldFlags(const CContactItemFieldSet& aTemplateFieldSet); - void PopulateStoreL(RStoreWriteStream& aRootStream, TInt aCount, CArrayFix& aFieldHeaderArray) const; - void PrepareFieldAsTemplateL(CContactItemFieldSet& aSystemTemplateFieldSet); - IMPORT_C TBool HasCustomFilter(EContactFieldFlags& contactFieldFlag) const; - TBool RestoreIfMatchL(RReadStream& aStream,TFieldType aFieldType, const CContactItemFieldSet *aSystemTemplateFields,HBufC *aTextStream,TInt aTextIndex); - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); - -protected: - void UsesTemplateData(TInt aTemplateFieldId); -private: - void UsesTemplateLabel(); - void SetLabelUnspecified(TBool aUnspecified); - const CContentType &TemplateContentType(const CContactItemFieldSet &aSystemTemplateFields) const; - TFieldHeader StoreL(RWriteStream& aTextStream,CStreamStore& aBlobStore,TInt aTextFieldIndex); - TStreamId StoreAdditionalUidsL(CStreamStore& aStore,TStreamId aId, CArrayFixFlat *aAdditionalFields); - TStreamId StoreDataL(CStreamStore& aStore); - - void RestoreL(CStreamStore& aStore,RReadStream& aStream); - void RestoreDataL(CStreamStore& aStore,TStreamId aId); - - TStreamId RestoreHintL(CStreamStore& aStore,RReadStream& aStream); - TBool AddFieldToHint(TFieldType aFieldType, CContactItemField::THint &aHint) const; - void MapHintsToFieldTypesL(THint aHint); - CContactItemField(); - CContactItemField(TStorageType aType); - void CloneL(const CContactItemField &aField); - void ConstructStorageL(); -private: - enum {EUserMaskShift=4}; - enum // er5 hard coded enum most of which have been used but not documented ;o( - { - EHidden =0x00000001, - EReadOnly =0x00000002, - ESynchronize =0x00000004, - EDisabled =0x00000008, - /* 0x00000010,-> 0x00000080 are used for - the user defined attribs / categories like work / - Personal / Other / None - used in er5 UI */ - EUserMask =0x000000F0, - ETemplateMask =EUserMask|ESynchronize|EReadOnly|EHidden, - EOverRidesLabel =0x00000100, - EUsesTemplateData =0x00000200, - EUserAddedField =0x00000400, - ETemplate =0x00000800, - /* 0x00001000,-> 0x0000F000 are used for - the storage type of the contact field */ - ELabelUnspecified =0x40000000, - EDeleted =0x80000000 - }; - enum - // new extended enum to allow cntmodel to have - // more attributes per field - { - EPrivate =0x00000001, - ESpeedDial =0x00000002, - EUserDefinedFilter =0x00000004, - EUserDefinedFilter1 =0x00000008, - EUserDefinedFilter2 =0x00000010, - EUserDefinedFilter3 =0x00000020, - EUserDefinedFilter4 =0x00000040 - }; - -private: - CContentType *iContentType; - TStorageType iStorageType; - HBufC* iLabel; - TInt iId; - TUint32 iAttributes; - TUint32 iExtendedAttributes; - CContactFieldStorage* iStorage; - TInt iTemplateFieldId; - }; - -class CContactItemFieldDef : public CArrayFixFlat -/** A field definition. - -This is an array of field types. Field definitions are used by -CContactDatabase to specify a subset of fields when searching. - -The CContactItemFieldDef class is derived from CArrayFixFlat so all -relevant functions can be used, e.g. to add and remove elements. It adds no -functions other than a constructor. -@publishedAll -@released -*/ - { -public: - inline CContactItemFieldDef() : CArrayFixFlat(8) - /** Constructs the CContactItemFieldDef object, with an array granularity of 8. */ - {}; - }; - -class TContactFieldAtts -/** -@internalComponent -@released -*/ - { -public: - inline TContactFieldAtts() : iStorage(0) - {}; - - void SetAttribs(TUint32 aAttribs); - void SetExtendedAttribs(TUint32 aExtendedAttribs); - void SetType(TStorageType aType); - TUint32 Attribs() const; - TUint32 ExtendedAttribs() const; - TStorageType Type() const; - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - -#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ - TInt Count() const; - void SetCount(TInt aCount); - TInt TemplateFieldId() const; - void SetTemplateFieldId(TInt aId); -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - - -private: - TUint32 iStorage; - -#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ - TUint32 iExtendedAttribs; -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - }; - - -class TFieldHeader -/** -@internalComponent -@released -*/ -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - - { -public: - TFieldHeader(); - TFieldHeader(TContactFieldAtts aAtts, TUint32 aFieldUid, TStreamId aId); - - inline TContactFieldAtts FieldAtts() const; - inline void SetFieldAtts(TContactFieldAtts aAtts); - - inline TInt FieldId() const; - inline void SetFieldId(TInt aId); - - inline TStreamId StreamId() const; - inline void SetStreamId(TStreamId aId); - -private: - TContactFieldAtts iAtts; - TInt iFieldUid; - TStreamId iStreamId; - }; - -#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ - - { -public: - inline TFieldHeader(TStreamId aId,TContactFieldAtts aAtts); - -public: - TStreamId iStreamId; - TContactFieldAtts iAtts; - }; - -inline TFieldHeader::TFieldHeader(TStreamId aId,TContactFieldAtts aAtts) - { iStreamId=aId; iAtts=aAtts; } -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - -inline TBool CContactItemField::IsHidden() const -/** Gets the value of the field's hidden attribute. - -@return ETrue if hidden attribute is set, EFalse if not set. */ - { return iAttributes&EHidden; } - -inline TBool CContactItemField::IsReadOnly() const -/** Gets the value of the field's read only attribute. - -@return ETrue if read only attribute set, EFalse if not set. */ - { return iAttributes&EReadOnly; } - -inline TBool CContactItemField::IsDisabled() const -/** Gets the value of the field's disabled attribute. - -@return ETrue if disabled attribute set, EFalse if not set. */ - { return iAttributes&EDisabled; } - -inline TBool CContactItemField::IsTemplate() const -/** Tests whether the field is in a template, as set by SetTemplateField(). - -@return ETrue if field is a template field. EFalse if not. */ - { return iAttributes&ETemplate; } - -inline TBool CContactItemField::IsPrivate() const -/** Tests whether the field's private attribute is set. - -@return True if the field's private attribute is set, false if not. */ - { return iExtendedAttributes&EPrivate; } - -inline TBool CContactItemField::IsSpeedDial() const -/** Tests whether the field is a speed dial field. - -@return True if the field is a speed dial field, false if not. */ - { return iExtendedAttributes&ESpeedDial; } - -inline TBool CContactItemField::DoSynchronize() const -/** Gets the value of the field's synchronise attribute. - -@return ETrue if synchronise attribute is set, EFalse if not set. */ - { return iAttributes&ESynchronize; } - -inline TBool CContactItemField::IsDeleted() const -/** Gets the value of the field's deleted attribute. - -@return ETrue if the field is deleted, otherwise EFalse. */ - { return iAttributes&EDeleted; } - -inline void CContactItemField::THint::SetIsPhone() - {iHintValue|=KIntContactHintIsPhone;} -inline void CContactItemField::THint::SetIsMsg() - {iHintValue|=KIntContactHintIsMsg;} -// turn off Pronunciation bit too? -inline void CContactItemField::THint::SetIsCompanyName() - {iHintValue|=KIntContactHintIsCompanyName;} -inline void CContactItemField::THint::SetIsFamilyName() - {iHintValue|=KIntContactHintIsFamilyName;} -inline void CContactItemField::THint::SetIsGivenName() - {iHintValue|=KIntContactHintIsGivenName;} -inline void CContactItemField::THint::SetIsCompanyNamePronunciation() - {iHintValue|=KIntContactHintIsCompanyName|KIntContactHintIsPronunciation;} -inline void CContactItemField::THint::SetIsFamilyNamePronunciation() - {iHintValue|=KIntContactHintIsFamilyName|KIntContactHintIsPronunciation;} -inline void CContactItemField::THint::SetIsGivenNamePronunciation() - {iHintValue|=KIntContactHintIsGivenName|KIntContactHintIsPronunciation;} -inline void CContactItemField::THint::SetIsAddress() - {iHintValue|=KIntContactHintIsAddress;} -inline void CContactItemField::THint::SetIsAdditionalName() - {iHintValue|=KIntContactHintIsAdditionalName;} -inline void CContactItemField::THint::SetIsSuffixName() - {iHintValue|=KIntContactHintIsSuffixName;} -inline void CContactItemField::THint::SetIsPrefixName() - {iHintValue|=KIntContactHintIsPrefixName;} -inline void CContactItemField::THint::SetStorageIsInline() - {iHintValue|=KIntContactHintStorageInline;} -inline void CContactItemField::THint::SetIsEmail() - {iHintValue|=KIntContactHintIsEmail;} -inline TBool CContactItemField::THint::IsPhone() const - {return (iHintValue&KIntContactHintIsPhone);} -inline TBool CContactItemField::THint::IsMsg() const - {return (iHintValue&KIntContactHintIsMsg);} -inline TBool CContactItemField::THint::IsCompanyName() const - {return ((iHintValue&KIntContactHintIsCompanyNamePronunciation) == KIntContactHintIsCompanyName);} -inline TBool CContactItemField::THint::IsFamilyName() const - {return ((iHintValue&KIntContactHintIsFamilyNamePronunciation)==KIntContactHintIsFamilyName);} -inline TBool CContactItemField::THint::IsGivenName() const - {return ((iHintValue&KIntContactHintIsGivenNamePronunciation)==KIntContactHintIsGivenName);} -inline TBool CContactItemField::THint::IsCompanyNamePronunciation() const - {return ((iHintValue&KIntContactHintIsCompanyNamePronunciation) == KIntContactHintIsCompanyNamePronunciation);} -inline TBool CContactItemField::THint::IsFamilyNamePronunciation() const - {return ((iHintValue&KIntContactHintIsFamilyNamePronunciation)==KIntContactHintIsFamilyNamePronunciation);} -inline TBool CContactItemField::THint::IsGivenNamePronunciation() const - {return ((iHintValue&KIntContactHintIsGivenNamePronunciation)==KIntContactHintIsGivenNamePronunciation);} -inline TBool CContactItemField::THint::IsAddress() const - {return (iHintValue&KIntContactHintIsAddress);} -inline TBool CContactItemField::THint::IsAdditionalName() const - {return (iHintValue&KIntContactHintIsAdditionalName);} -inline TBool CContactItemField::THint::IsSuffixName() const - {return (iHintValue&KIntContactHintIsSuffixName);} -inline TBool CContactItemField::THint::IsPrefixName() const - {return (iHintValue&KIntContactHintIsPrefixName);} -inline TBool CContactItemField::THint::IsStorageInline() const - {return (iHintValue&KIntContactHintStorageInline);} -inline TBool CContactItemField::THint::IsEmail() const - {return (iHintValue&KIntContactHintIsEmail);} - -#ifndef __SYMBIAN_CNTMODEL_USE_SQLITE__ -inline void CContactItemField::THint::SetHasAdditionalUids() - {iHintValue|=KHintAdditionalMask;} -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ -inline TBool CContactItemField::THint::Contains(const THint& aHint) const - {return (iHintValue&aHint.iHintValue);} - -inline TBool CContactItemField::OverRidesLabel() const -/** Tests whether the field's label (as set by SetLabel()) overrides the label -specified in the field's template. - -@return True if the field's label overrides the label specified in the template; -false if not. */ - {return iAttributes&EOverRidesLabel;} - -inline TBool CContactItemField::HasExtraStream() const -/** Tests whether the field needs an extra stream to store information not contained -in the template. This is the case if the field's content type is not based -on a template, or if the field has a label which overrides the label specified -in the template. - -@return True if the field uses an extra stream; false if not. */ - {return(!(iAttributes&EUsesTemplateData) || iAttributes&EOverRidesLabel);} - -inline TBool CContactItemField::UsesTemplateTypes() const -/** Tests whether or not the field's content type is based on a template. - -@return True if the field's content type is based on a template; false if not. */ - {return iAttributes&EUsesTemplateData;} - -inline TBool CContactItemField::LabelUnspecified() const -/** Tests whether the field's label has been set, either by a call to SetLabel() -or by inheriting a label specified in the template. - -@return True if the field's label has been set, false if not. */ - {return iAttributes&ELabelUnspecified;} - -inline TBool CContactItemField::UserAddedField() const -/** Gets the value of the user added field attribute. - -@return ETrue if the user added attribute is set, EFalse if not. */ - {return iAttributes&EUserAddedField;} - -inline TBool CContactItemField::IsCustomFilterable() const -/** Tests the value of the user defined filter attribute. - -@return ETrue if the user defined filter attribute is set, EFalse if not. */ - { - return (iExtendedAttributes&EUserDefinedFilter || iExtendedAttributes&EUserDefinedFilter1 || - iExtendedAttributes&EUserDefinedFilter2 || iExtendedAttributes&EUserDefinedFilter3 - || iExtendedAttributes&EUserDefinedFilter4); - } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntfilt.h --- a/epoc32/include/cntfilt.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTFILT_H__ -#define __CNTFILT_H__ - -#include - -#if !( defined __SYMBIAN_CNTMODEL_HIDE_DBMS__ && defined __SYMBIAN_CNTMODEL_USE_SQLITE__ ) -#include -#endif - -#include - -class CCntFilter : public CBase -/** A contact database filter. - -This is used to get a subset of the items in a contact database. -There are three criteria used when filtering a database: - -- the contact item's state - -- the date/time the contact item was created/last modified/deleted - -- the contact item's type - -The state can be one of: deleted, modified or created (since -a specified date/time). The filter can be set to include contact items of -only one state, or it can be set to include contact items of all states, using -the TInclude enumeration. - -The date/time value is used in combination with the contact item's state. - -The contact item's type is one of contact card, contact card group, contact -card template, or own card. Any combination of contact types may be specified -in the filter, in addition to the contact item's state. - -After the filter has been set up, it should be passed to the function -CContactDatabase::FilterDatabaseL(). -@publishedAll -@released -*/ - { - friend class CPackagerTests; //Comparison test -public: - /** Flags to identify which contact items should be included in the filter. - - Only one of the following values can be set in the filter at a time. However - the client may select to filter contacts in all states using EIncludeAllContacts. */ - enum TInclude - { - /** Contact items in all states should be included. */ - EIncludeAllContacts, - /** Only contact items which have been added since the date/time should be included. */ - EIncludeNewContacts, - /** Only contact items which have been modified since the date/time should be included. */ - EIncludeModifiedContacts, - /** Only contact items which have been deleted since the date/time should be included. */ - EIncludeDeletedContacts - }; - /** Contact item types.*/ - enum TContactType - { - /** All contact item types should be included. */ - EIncludeAllTypes = 0x01, - /** Contact cards should be included in the filter. */ - EContactCards = 0x02, - /** Contact card groups should be included in the filter. */ - EContactGroups = 0x04, - /** Contact card templates should be included in the filter. */ - EContactTemplates = 0x08, - /** Own cards should be included in the filter. */ - EContactOwnCard = 0x10 - }; - - IMPORT_C static CCntFilter* NewL(); - IMPORT_C static CCntFilter* NewLC(); - IMPORT_C static CCntFilter* NewL(const CCntFilter* aFilter); - IMPORT_C static CCntFilter* NewLC(const CCntFilter* aFilter); - static CCntFilter* NewLC(RReadStream& aStream); - IMPORT_C ~CCntFilter(); -public: - /** A pointer to an array which stores the filtered list of contact IDs. */ - CContactIdArray* iIds; -// - IMPORT_C void SetIncludeModifiedContacts(TBool aIncludeModified); - IMPORT_C void SetIncludeNewContacts(TBool aIncludeNew); - IMPORT_C void SetIncludeDeletedContacts(TBool aIncludeDeleted); -// - IMPORT_C TBool TestContactFilterType(TUid aTypeUid); - IMPORT_C void SetContactFilterTypeALL(TBool aFilterAllContacts); - IMPORT_C void SetContactFilterTypeCard(TBool aFilterCards); - IMPORT_C void SetContactFilterTypeGroup(TBool aFilterGroups); - IMPORT_C void SetContactFilterTypeTemplate(TBool aFilterTemplates); - IMPORT_C void SetContactFilterTypeOwnCard(TBool aFilterOwnCard); - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); -// - inline TBool ContactFilterTypeALL() const; - inline TBool ContactFilterTypeCard() const; - inline TBool ContactFilterTypeGroup() const; - inline TBool ContactFilterTypeOwnCard() const; - inline TBool ContactFilterTypeTemplate() const; -// - inline TBool IncludeModifiedContacts(); - inline TBool IncludeNewContacts(); - inline TBool IncludeDeletedContacts(); -// - inline TTime GetFilterDateTime(); - inline void SetFilterDateTime(TTime aTime); -// - IMPORT_C void Reset(); -// -/** - Intended usage: Reserved to preserve future BC */ - IMPORT_C void Reserved1(); -/** - Intended usage: Reserved to preserve future BC */ - IMPORT_C void Reserved2(); - -private: - TTime iSinceDateTime; - TInclude iInclude; - TInt32 iContactType; - TAny* iReserved1; - TAny* iReserved2; - CCntFilter(); - CCntFilter(const CCntFilter* aFilter); - }; - - -inline TBool CCntFilter::IncludeModifiedContacts() -/** Tests whether the filter includes only contacts modified since the filter's -date/time. - -@return ETrue if the filter only includes modified contacts. EFalse if not. */ - {return iInclude == EIncludeModifiedContacts;}; - -inline TBool CCntFilter::IncludeNewContacts() -/** Tests whether the filter includes only contacts created since the filter's -date/time. - -@return ETrue if the filter only includes new contacts. EFalse if not. */ - {return iInclude == EIncludeNewContacts;}; - -inline TBool CCntFilter::IncludeDeletedContacts() -/** Tests whether the filter includes only contacts deleted since the filter's -date/time. - -@return ETrue if the filter only includes deleted contacts. EFalse if not. */ - {return iInclude == EIncludeDeletedContacts;}; - -inline TTime CCntFilter::GetFilterDateTime() -/** Gets the date and time used by the filter, as set by SetFilterDateTime(). - -@return The filter's date and time value. */ - {return iSinceDateTime;}; - -inline void CCntFilter::SetFilterDateTime(TTime aTime) -/** Sets the date and time used by the filter in combination with the TInclude -value to test contact items against. - -@param aTime The new date and time value. */ - {iSinceDateTime = aTime;}; - -// CONTACT TYPE -inline TBool CCntFilter::ContactFilterTypeALL() const -/** Tests whether all contact item types are included in the filter, as set by -SetContactFilterTypeALL(). - -@return ETrue if all contact item types are included in the filter, EFalse -if not. */ - {return iContactType & EIncludeAllTypes;} - -inline TBool CCntFilter::ContactFilterTypeCard() const -/** Tests whether contact cards are included in the filter, as set by SetContactFilterTypeCard(). - -@return ETrue if contact cards are included in the filter, EFalse if not. */ - {return iContactType & EContactCards;} - -inline TBool CCntFilter::ContactFilterTypeGroup() const -/** Tests whether contact card groups are included in the filter, as set by SetContactFilterTypeGroup(). - -@return ETrue if contact card groups are included in the filter, EFalse if -not. */ - {return iContactType & EContactGroups;} - -inline TBool CCntFilter::ContactFilterTypeOwnCard() const -/** Tests whether own cards are included in the filter, as set by SetContactFilterTypeOwnCard(). - -@return ETrue if own cards are included in the filter, EFalse if not. */ - {return iContactType & EContactOwnCard;} - -inline TBool CCntFilter::ContactFilterTypeTemplate() const -/** Tests whether contact card templates are included in the filter, as set by -SetContactFilterTypeTemplate(). - -@return ETrue if contact card templates are included in the filter, EFalse -if not. */ - {return iContactType & EContactTemplates;} - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntfldst.h --- a/epoc32/include/cntfldst.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__CNTFLDST_H__) -#define __CNTFLDST_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__BAMDESCA_H__) -#include -#endif - -#if !defined(__S32STD_H__) -#include -#endif - -#if !defined(__CNTDEF_H__) -#include -#endif -#define KTextStreamSeparator 0x00 - - - -class CStreamStore; - -class CContactFieldStorage : public CBase -/** Abstract base class for the different types of contact field data storage. - -CContactTextField, CContactStoreField, CContactAgentField, CContactDateField -and CContactNumberField are all derived from this class. - -A pointer to the base class can be obtained by calling CContactItemField::Storage(). -Pointers to the derived classes can be retrieved by calling CContactItemField::TextStorage(), -CContactItemField::StoreStorage() etc. -@publishedAll -@released -*/ - { -public: - /** Internalises the field data. - - @param aStream Stream from which the the contents of the field should be internalised. */ - virtual void InternalizeL( RReadStream& aStream)=0; - /** Externalises the field data. - - @param aStream Write stream to which the contents of the field should be externalised. */ - virtual void ExternalizeL(RWriteStream& aStream) const=0; - /** Stores the field data. - - @param aStore Reference to the stream store to which the field data is written. - @return The ID of the stream store. */ - virtual TStreamId StoreL(CStreamStore& aStore) const=0; - /** Restores the field data. - - @param aStore Reference to the store from which the object is to be restored. - @param aStream Reference to the stream which should be passed to InternalizeL(). */ - virtual void RestoreL(CStreamStore& aStore,RReadStream& aStream)=0; - /** Tests whether the field storage contains data. - - @return True if the field storage contains data, false if not. */ - virtual TBool IsFull() const=0; -private: - IMPORT_C virtual void CContactFieldStorage_Reserved1(); - TAny* CContactFieldStorage_Reserved; - }; - -class CContactTextField : public CContactFieldStorage -/** Provides access to the text stored in a contact item field. - -An object of this class can be retrieved using CContactItemField::TextStorage(). -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CContactTextField(); -public: - void InternalizeL(HBufC *aTextStream,TInt aTextFieldIndex); - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - void ExternalizeL(RWriteStream& aStream,TBool aIsInlineBlob,TInt aTextFieldIndex) const; - TStreamId StoreL(CStreamStore& aStore) const; - void RestoreL(CStreamStore& aStore,RReadStream& aStream); - IMPORT_C void SetTextL(const TDesC& aText); - IMPORT_C void SetText(HBufC *aHbuf); - IMPORT_C void SetTextArray(MDesCArray* anArray); - IMPORT_C TPtrC Text() const; - TBool IsFull() const; - IMPORT_C TPtrC StandardTextLC() const; - IMPORT_C void SetStandardTextL(const TDesC& aText); - IMPORT_C void SetStandardTextArray(MDesCArray* anArray); -private: - HBufC *EncodeL(const TDesC& aText,TUid aConversion) const; - IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); -private: - HBufC* iText; - }; - -class CContactStoreField : public CContactFieldStorage -/** Provides access to the binary field data stored in an 8-bit descriptor. - -An object of this class can be retrieved using CContactItemField::StoreStorage(). -@publishedAll -@released -*/ - { -public: - ~CContactStoreField(); - TStreamId StoreL(CStreamStore& aStore) const; - void RestoreL(CStreamStore& aStore,RReadStream& aStream); - IMPORT_C void SetThingL(const TDesC8& aDes); - IMPORT_C void SetThingL(const HBufC8& aDes); - IMPORT_C void SetThingL(const CBufBase* aBuf); - IMPORT_C HBufC8* Thing() const; - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - TBool IsFull() const; -private: - IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); -private: - HBufC8* iThing; - }; - -class CContactAgentField : public CContactFieldStorage -/** Provides access to an agent ID. - -An agent is a field in a contact item which contains another person's -contact details. It corresponds to the agent property in the vCard -specification (version 2.1). The agent is identified by an agent ID -(a TContactItemId). - -An object of this class can be retrieved using CContactItemField::AgentStorage(). -@publishedAll -@released -*/ - { -public: - TStreamId StoreL(CStreamStore& aStore) const; - void RestoreL(CStreamStore& aStore,RReadStream& aStream); - IMPORT_C void SetAgentId(TContactItemId aId); - IMPORT_C TContactItemId Value() const; - void InternalizeL( RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - TBool IsFull() const; -private: - IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); -private: - TContactItemId iAgentId; - }; - -class CContactDateField : public CContactFieldStorage -/** Provides access to the date/time value stored in a contact item field. - -An object of this class can be retrieved using CContactItemField::DateTimeStorage(). -@publishedAll -@released -*/ - { -public: - CContactDateField(); - TStreamId StoreL(CStreamStore& aStore) const; - void RestoreL(CStreamStore& aStore,RReadStream& aStream); - IMPORT_C void SetTime(TTime aTime); - IMPORT_C void SetTime(TDateTime aDateTime); - IMPORT_C TTime Time() const; - void InternalizeL( RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - TBool IsFull() const; -private: - IMPORT_C /*virtual*/ void CContactFieldStorage_Reserved1(); -private: - TTime iTime; - }; - - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntitem.h --- a/epoc32/include/cntitem.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,559 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Persistence layer exports -// -// - -#if !defined(__CNTITEM_H__) -#define __CNTITEM_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__CNTDEF_H__) -#include -#endif - -#if !defined(__CNTFIELD_H__) -#include -#endif - -#include - - -const TInt KUidStringLength =244; -#define KUidStringSeparator '-' -class CContactItemField; -#define KContactMaxFieldNumber 32 -class CContactItemViewDef; -class CContactItem; - -const TInt KContactFieldSetSearchAll=-1; -class CContactItemFieldSet : public CBase -/** A contact item's field set. The field set owns an array of contact item fields -(CContactItemFields). The field set is owned by a contact item, and can be -retrieved using CContactItem::CardFields(). Use functions in class -CContactItem to add and remove fields to/from the field set. - -A field set can contain more than one field of the same type, but this is -not advisable as it may cause problems when synchronising the contacts database. -@publishedAll -@released -*/ - { - friend class CContactItemField; - friend class CContactDatabase; - friend class CContactTables; - friend class RPplContactTable; -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - friend class TCntPersistenceUtility; -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ -public: - IMPORT_C static CContactItemFieldSet* NewL(); - IMPORT_C static CContactItemFieldSet* NewLC(); - IMPORT_C ~CContactItemFieldSet(); - inline const CContactItemField& operator[](TInt aIndex) const; - inline CContactItemField& operator[](TInt aIndex); - inline TInt Find(TFieldType aFieldType) const; // will only find the first such occurence - inline TInt Find(TFieldType aFieldType,TUid aMapping) const; - IMPORT_C TInt FindNext(TFieldType aFieldType,TInt aStartPos=KContactFieldSetSearchAll) const; - IMPORT_C TInt FindNext(TFieldType aFieldType,TUid aMapping,TInt aStartPos=KContactFieldSetSearchAll) const; - inline TInt Count() const; - inline void Reset(); - IMPORT_C void UpdateFieldL(const CContactItemField& aField, TInt aMatchCount); - IMPORT_C void UpdateFieldSyncL(const CContactItemField& aField, TInt aMatchCount); - IMPORT_C CContactItemFieldSet& AddL(CContactItemField& aField); - IMPORT_C void Remove(TInt aIndex); - IMPORT_C void InsertL(TInt aIndex,CContactItemField& aField); - IMPORT_C void Move(TInt aFrom, TInt aTo); - IMPORT_C TStreamId StoreL(CStreamStore& aStore,RWriteStream& aTextStream,CStreamStore& aBlobStore); - TStreamId StoreL(CStreamStore& aStore,RWriteStream& aTextStream,CStreamStore& aBlobStore,CContactTables* aTables); - IMPORT_C void RestoreL(CStreamStore& aStore, TStreamId anId,CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,RReadStream& aReadStream); - IMPORT_C void RestoreL(CStreamStore& aStore, TStreamId anId,CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,const CContactItem* aTemplate, HBufC* aTextBuf); - TInt FieldText(TFieldType aFieldType, TDes &aText, TInt aStartPosition) const; - CArrayFix* ConstructFieldHeaderArrayLC(RWriteStream& aTextStream, CStreamStore& aBlobStore); - TInt FieldTypeCount(const CContactItemFieldSet& aSystemTemplateFields, TInt aStartIndex, const CContactItemField& aField) const; - TBool ContainsFieldTypeMapping(const CContentType& aBaseFieldContentType, const TFieldType& aContactFieldType) const; - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); -private: - CContactItemFieldSet(); - void ConstructL(); - void SetFieldId(CContactItemField& aField); - const CContactItemField* FindById(TInt aId) const; - IMPORT_C TStreamId StoreL(CStreamStore& aStore,const CContactItem* aTemplate,RWriteStream& aStream,CStreamStore& aBlobStore,CContactTables* aTables); - void RestoreL(CStreamStore& aStore, TStreamId anId, CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,const CContactItem* aTemplate,RReadStream& aReadStream,CContactTables* aContactsTable, RArray* aEmailIdArray); - void RestoreAndAddTemplateL(CStreamStore& aStore, TStreamId aId,CStreamStore* aBlobStore,const CContactItemViewDef& aViewDef,const CContactItem* aTemplate, RReadStream& aReadStream,CContactTables* aContactsTable,RArray* aEmailIdArray); - TInt MatchTemplateField(const CContentType& aContentType,TUint aUserFlags,TBool &aExactMatch) const; - static HBufC* LoadTextStreamLC(RReadStream& aStream); - void NonZeroFieldText(TFieldType aFieldType, TDes &aText) const; - -private: - CArrayPtr* iFields; - }; - -class CContactDatabase; -class RCntModel; -class CContactItem : public CBase -/** The abstract base class for contact cards, templates and groups. All contact -items are identified by a contact ID, (TContactItemId), have a last modified -date/time and own one or more fields (the field set). Contact items also -have an access count and attributes (e.g. hidden). Note that fields in a contact -item also have attributes. Attribute values specified in the contact item -override those in the contained fields. The access count is a record of the -number of objects referencing a contact item. A contact item cannot be fully -deleted until its access count is zero. -@publishedAll -@released -*/ - { - friend class CContactCardTemplate; - friend class CContactItemPlusGroup; - friend class CContactCard; - friend class CContactTemplate; - friend class CContactGroup; - friend class CContactOwnCard; - friend class CVCardToContactsAppConverter; - friend class CContactICCEntry; - friend class RPplContactTable; - friend class RPplIdentityTable; - friend class RPplPreferencesTable; - friend class CPackagerTests; //Comparison test - friend class CPackagerCntComparator; - friend class CContactDatabase; - friend class CPplContactItemManager; -public: - IMPORT_C ~CContactItem(); - /** Gets the contact item's type. - - @return The contact item's type. */ - virtual TUid Type() const=0; - static CContactItem* NewLC(RReadStream& aStream); - IMPORT_C static CContactItem* NewLC(TUid aType); - IMPORT_C TContactItemId Id() const; - IMPORT_C TContactItemId TemplateRefId() const; - IMPORT_C TTime LastModified() const; - IMPORT_C void SetLastModified(const TTime& aLastModified); - IMPORT_C void AddFieldL(CContactItemField& aField); - IMPORT_C void RemoveField(TInt aFieldPos); - IMPORT_C void InsertFieldL(CContactItemField& aField,TInt aFieldPos); - IMPORT_C CContactItemFieldSet& CardFields() const; - IMPORT_C void SetHidden(TBool aHidden); - IMPORT_C void SetSystem(TBool aSystem); - IMPORT_C TBool IsHidden(); - IMPORT_C TBool IsSystem(); - IMPORT_C void UpdateFieldSet(CContactItemFieldSet* aNewFieldSet); - IMPORT_C void SetDeleted(TBool aDeleted); - IMPORT_C TBool IsDeleted() const; - IMPORT_C void SetTemplateRefId(TContactItemId aUid); - TContactItemId Agent(); - inline TBool IsDeletable(); - inline void IncAccessCount(); - inline void DecAccessCount(); - inline TInt AccessCount() const; - IMPORT_C void SetUidStringL(TDesC& aString); - IMPORT_C TPtrC UidStringL(TInt64 aMachineUniqueId) const; - TStreamId PopulateStoreL(CStreamStore& aStore, CArrayFix& aFieldHeaderArray) const; - void AddLabelFieldL(); - IMPORT_C void RestoreTemplateFieldsL(const CContactItemFieldSet& aSystemTemplateFields, const CContactItemFieldSet& aTemplateFields, const CContactItemViewDef& aViewDef); - void ClearFieldContent(); - inline TPtrC Guid(); - virtual void ExternalizeL(RWriteStream& aStream) const; - virtual void InternalizeL(RReadStream& aStream); - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - IMPORT_C void SetId(TContactItemId aId); - IMPORT_C TUint32 Attributes() const; - IMPORT_C void SetAttributes(TUint32 aAttributes); - IMPORT_C void SetAccessCount(TUint32 aAccessCount); - IMPORT_C void SetCreationDate(const TTime& aTime); -#endif - -public: - /** Contact item's attribute flags - - These flags can be used to set the various attributes of a contact item. */ - enum - { - /** To set the contact item's system attribute. */ - ESystem=0x01, - /** To set the contact item's hidden attribute. */ - EHidden=0x02, - /** To set the contact item's hidden attribute. */ - ECompressedGuid=0x04, - /** To set the contact item's Is deleted attribute. */ - EDeleted=0x08 - }; -protected: -private: - CContactItem(); - void ConstructL(); - void ConstructL(const CContactItem *aTemplate); - void MakeUidStringL(TInt64 aMachineUniqueId); - IMPORT_C void SetHasCompressedGuid(TBool aCompressed); - TBool GuidIsCompressed() const; - TInt NumberOfFieldsToStore() const; - -private: - CContactItemFieldSet* iFieldSet; - TUint32 iAttributes; - TContactItemId iId; - TContactItemId iTemplateRefId; - TTime iLastModified; - TTime iCreationDate; - TUint32 iAccessCount; - HBufC* iGuid; - friend class CContactDatabase; - }; - -class CContactItemPlusGroup : public CContactItem -/** Abstract base class for CContactGroup, CContactCard and CContactOwnCard. - -The purpose of this class is to avoid duplication of group functionality -in its derived classes. -@publishedAll -@released -*/ - { -public: - IMPORT_C const CContactIdArray* GroupsJoined() const; - IMPORT_C CContactIdArray* GroupsJoinedLC() const; -protected: - CContactItemPlusGroup(); - IMPORT_C ~CContactItemPlusGroup(); -public: - virtual void ExternalizeL(RWriteStream& aStream) const; - virtual void InternalizeL(RReadStream& aStream); - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - IMPORT_C void ResetGroups(); - IMPORT_C void SetGroups(CContactIdArray* aGroups); -#endif - -private: - CContactIdArray* iGroups; - friend class CContactDatabase; - friend class RPplLookupGroupsTable; - friend class RPplGroupMembershipTable; - }; - -class CContactGroup : public CContactItemPlusGroup -/** A contact group. - -A contact group is a contact item which holds a set of associated contact -item IDs. The members of the group may be contact cards, own cards, or even -other groups. The group has a label which identifies the group to users, e.g. -"family", or "colleagues". The type of a contact group is KUidContactGroup, -as returned by Type(). - -Objects of this class are constructed using CContactDatabase::CreateContactGroupL() -or CreateContactGroupLC(). These functions create the group, optionally with -a label, add it to the database, and return a pointer to it. - -To create an association between a card and a group, use CContactDatabase::AddContactToGroupL() -and to remove the association, use RemoveContactFromGroupL(). To find out -which groups a card belongs to, use CContactCard::GroupsJoinedLC() or CContactOwnCard::GroupsJoinedLC(). - -The function CContactDatabase::GetGroupIdListL() may be used to retrieve a -list of IDs for all groups in the database. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactGroup* NewL(); - IMPORT_C static CContactGroup* NewLC(); - IMPORT_C ~CContactGroup(); -public: // from CContactItem - IMPORT_C TUid Type() const; -public: - // default sorted item array is ascending - IMPORT_C CContactIdArray* ItemsContainedLC() const; - IMPORT_C const CContactIdArray* ItemsContained() const; - IMPORT_C TBool IsSystem() const; - IMPORT_C void SetSystem(TBool aSystem); - IMPORT_C TBool ContainsItem(TContactItemId aContactId); - IMPORT_C void SetGroupLabelL(const TDesC& aLabel); - IMPORT_C TPtrC GetGroupLabelL(); - IMPORT_C TBool HasItemLabelField(); - IMPORT_C CContactIdArray* GroupsJoinedLC() const; -// - //IMPORT_C void ReservedFunction1(); - IMPORT_C void AddContactL(TContactItemId aContactId); - //IMPORT_C void ReservedFunction2(); - IMPORT_C void RemoveContactL(TContactItemId aContactId); - virtual void ExternalizeL(RWriteStream& aStream) const; - virtual void InternalizeL(RReadStream& aStream); - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - IMPORT_C void ResetItems(); - IMPORT_C void SetItems(CContactIdArray* aItems); -#endif - -private: - CContactGroup(); -private: - CContactIdArray* iItems; - friend class CContactDatabase; - friend class RPplGroupMembershipTable; - }; - -class CContactCardTemplate : public CContactItem -/** A contact card template. - -This is a contact item containing a set of fields on which new contact items can -be based. Templates have a label which is a string which identifies the template -to a user. For instance, 'work template' could indicate a template used -to create contact cards in the style of a work colleague. Contact card templates -have a type of KUidContactCardTemplate, as returned by Type(). - -Objects of this class cannot be constructed directly because its constructors -are protected. Instead, use either CContactDatabase::CreateContactCardTemplateL() -or CreateContactCardTemplateLC(). These functions create a contact card template, -add it to the database, and return a pointer to it. - -The function CContactDatabase::GetCardTemplateIdListL() gets a list of the -IDs of all contact card templates in the database. -@publishedAll -@released -*/ - { - friend class CContactDatabase; - friend class CContactTables; - friend class RPplContactTable; - friend class CContactItem; -public: - IMPORT_C void SetTemplateLabelL(const TDesC& aLabel); - IMPORT_C TPtrC GetTemplateLabelL(); -protected: - IMPORT_C static CContactCardTemplate* NewL(); - IMPORT_C static CContactCardTemplate* NewLC(); - IMPORT_C static CContactCardTemplate* NewL(const CContactItem *aTemplate); - IMPORT_C static CContactCardTemplate* NewLC(const CContactItem *aTemplate); - IMPORT_C TBool HasItemLabelField(); -// -/** - Intended usage: Reserved to preserve future BC */ - IMPORT_C void ReservedFunction1(); -/** - Intended usage: Reserved to preserve future BC */ - IMPORT_C void ReservedFunction2(); - -protected: // from CContactItem - IMPORT_C TUid Type() const; -private: - CContactCardTemplate(); - }; - -class CContactCard : public CContactItemPlusGroup -/** A contact card. - -Implements the Type() function declared in class CContactItem. -Contact cards may optionally be constructed from a template. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CContactCard(); - IMPORT_C static CContactCard* NewL(); - IMPORT_C static CContactCard* NewLC(); - IMPORT_C static CContactCard* NewL(const CContactItem *aTemplate); - IMPORT_C static CContactCard* NewLC(const CContactItem *aTemplate); -public: // from CContactItem - IMPORT_C TUid Type() const; -public: - IMPORT_C CContactIdArray* GroupsJoinedLC() const; -private: - CContactCard(); -private: - friend class CContactDatabase; - }; - -class CContactOwnCard : public CContactItemPlusGroup -/** Own card. - -An own card is a contact card which contains information about the device's -owner. This can be sent to another compatible electronic device as a vCard. -The contact database recognises a single own card, referred to as the -current own card; its ID is returned by CContactDatabase::OwnCardId(). Like -a contact card, an own card can be a member of one or more contact card groups. -The own card type is identified by a UID of KUidContactOwnCard. - -Own cards can be constructed using either CContactDatabase::CreateOwnCardLC() -or CreateOwnCardL(). These functions create an own card, based on the system -template, add it to the database, set it as the database's current own card -and return a pointer to it. To change the database's current own card, use -CContactDatabase::SetOwnCardL(). -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CContactOwnCard(); - IMPORT_C static CContactOwnCard* NewL(); - IMPORT_C static CContactOwnCard* NewLC(); - IMPORT_C static CContactOwnCard* NewL(const CContactItem *aTemplate); - IMPORT_C static CContactOwnCard* NewLC(const CContactItem *aTemplate); -public: // from CContactItem - IMPORT_C TUid Type() const; -public: - IMPORT_C CContactIdArray* GroupsJoinedLC() const; -private: - CContactOwnCard(); -private: - friend class CContactDatabase; - }; - -class CContactTemplate : public CContactItem -/** A contact item template. - -This is a contact item which is used to seed the initial field set for -other contact items. - -Non-system (i.e. user-defined) templates are implemented -by the CContactCardTemplate class. CContactCardTemplate should be -used in preference to CContactTemplate. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactTemplate* NewL(); - IMPORT_C static CContactTemplate* NewLC(); - IMPORT_C static CContactTemplate* NewL(const CContactItem *aTemplate); - IMPORT_C static CContactTemplate* NewLC(const CContactItem *aTemplate); -public: // from CContactItem - IMPORT_C TUid Type() const; -private: - CContactTemplate(); - }; - - -class CContactICCEntry : public CContactItemPlusGroup -/** A contact ICC entry. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CContactICCEntry(); - IMPORT_C static CContactICCEntry* NewL(const CContactItem& aTemplate); - static CContactICCEntry* NewL(); -public: //from CContactItem - TUid Type() const; -private: - CContactICCEntry(); - }; - - -class ContactGuid -/** A globally unique identifier enquiry utility. - -Each contact item has a unique identifier, stored as a descriptor. It is -referred to as the 'UID string'. This is a combination of the unique -identifier of the database in which the contact item was created, the -contact item ID and the date/time of the contact item's creation. ContactGuid -provides a single static exported function to enquire whether an item was -created in a specified database. -@publishedAll -@released -*/ - { -public: - IMPORT_C static TContactItemId IsLocalContactUidString(const TDesC& aString, TInt64 aMachineUniqueId); - IMPORT_C static TBool GetCreationDate(TDes& aString, TInt64 aMachineUniqueId); - static HBufC* CreateGuidLC(const TDesC& aCreationDate,TContactItemId aId, TInt64 aMachineUniqueId); - static HBufC* CreateGuidLC(const TTime& aCreationDate,TContactItemId aId, TInt64 aMachineUniqueId); - static HBufC* CreateGuidLC(TContactItemId aId, TInt64 aMachineUniqueId); - }; - -inline const CContactItemField& CContactItemFieldSet::operator[](TInt aIndex) const -/** Gets the field located at a specified position in the field set. - -@param aIndex The position of the field in the field set. This is relative to zero. -It must be non-negative and less than the number of objects in the array, otherwise -the operator raises a panic. - -@return A const reference to an element in the array. */ - { return *(*iFields)[aIndex]; } - -inline CContactItemField& CContactItemFieldSet::operator[](TInt aIndex) -/** Gets the field located at a specified position in the field set. - -@param aIndex The position of the field in the field set. This is relative to zero. -It must be non-negative and less than the number of objects in the array, otherwise -the operator raises a panic. - -@return A non-const reference to an element in the array. */ - { return *(*iFields)[aIndex]; } - -inline TInt CContactItemFieldSet::Find(TFieldType aFieldType) const -/** Finds the first field in the field set with the specified field type. - -@param aFieldType The field type of interest. -@return If found, the index of the field within the field set, or KErrNotFound -if not found. */ - { return FindNext(aFieldType,KContactFieldSetSearchAll); } - -inline TInt CContactItemFieldSet::Find(TFieldType aFieldType,TUid aMapping) const -/** Finds the first field in the field set containing both the content type mapping -and the field type specified. - -@param aFieldType The field type of interest. -@param aMapping The content type mapping of interest. -@return If found, the index of the field within the field set, or KErrNotFound -if not found. */ - { return FindNext(aFieldType,aMapping,KContactFieldSetSearchAll); } - -inline TInt CContactItemFieldSet::Count() const -/** Gets the number of fields in the field set. - -@return The number of fields in the field set. */ - { return iFields->Count(); } - -inline void CContactItemFieldSet::Reset() -/** Deletes all fields in the field set. */ - { iFields->ResetAndDestroy(); } - -inline TBool CContactItem::IsDeletable() -/** Tests whether the contact item is deletable. - -This is true if the item's access count is zero. - -@return ETrue if deletable, EFalse if not deletable. */ - {return (iAccessCount == 0);} - -inline void CContactItem::IncAccessCount() -/** Increments the contact item's access count. */ - {iAccessCount++;} - -inline void CContactItem::DecAccessCount() -/** Decrements the contact item's access count. */ - {if(iAccessCount) iAccessCount--;} - -inline TInt CContactItem::AccessCount() const -/** Gets the contact item's access count. - -@return The item's access count. */ - {return(iAccessCount);} - -inline TPtrC CContactItem::Guid() -/** Accessor function for Contact Guid. - * This is used to cache contact items that are added during a sync. - @return Guid */ - { return iGuid ? *iGuid : TPtrC(KNullDesC); } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntsync.h --- a/epoc32/include/cntsync.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTSYNC_H__ -#define __CNTSYNC_H__ - - -#include -#include - -class CContactICCEntry; -class MContactSynchroniser -/** -Abstract interface for a contacts phonebook synchroniser. - -It should be inherited by classes which implement the phonebook -synchroniser API. The plug-in should have a second UID of -0x101F4A6E (KUidContactSynchroniserDll). - -@internalAll -*/ - { -public: - /** - @internalAll - */ - enum TValidateOperation - { - ERead, /** Check a cached ICC contact can be read */ - ESearch, /** Check a cached ICC contact can be searched */ - EEdit /** Check a cached ICC contact can be edited */ - }; -public: - /* - A CContactICCEntry is wanted for read/search or edit. - */ - virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0; - /* - A CContactICCEntry has being added/edited. - */ - virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0; - /* - A CContactICCEntry is being deleted from the database. - */ - virtual TInt DeleteContact(TContactItemId aId) = 0; - /* - Release resources used by Phonebook Synchroniser. Called prior to unloading plug-in. - */ - virtual void Release() = 0; - /* - A new CContactICCEntry has been added to the database. - (Called after ValidateWriteContact() and database write has completed.) - */ - virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0; - - /* - Id of template contact for specified phonebook - */ - virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0; - - /* - Id of contact group for specified phonebook - */ - virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0; - - /* - Request notifiction of Synchronisation state changes for specified phonebook - */ - virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0; - /* - Cancel notification of Synchronisation state changes for specified phonebook - */ - virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0; - /* - Test Synchronisation state changes for specified phonebook - */ - virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0; - - /* - List of Phonebooks supported by Phonebook Synchroniser that may be present on the ICC. - */ - virtual TInt PhonebookList(RArray& aPhonebookList) = 0; - -private: - IMPORT_C virtual void MContactSynchroniser_Reserved_1(); - }; - - -/** The UID for the default phone book synchroniser ECom plugin interface -*/ -const TUid KUidEcomCntPhBkSyncInterface = {0x102035FD}; - -class CContactSynchroniser : public CBase, public MContactSynchroniser -/** -Abstract interface for a ECom contacts phonebook synchroniser plugin - -It should be inherited by classes which implement the phonebook -synchroniser API in a platform secured environment. The ECom plug-in interface uid is -KUidEcomCntPhBkSyncInterface -@internalAll -*/ - { -public: - // From MContactSynchroniser - virtual TInt ValidateContact(TValidateOperation aOp, TContactItemId aId) = 0; - virtual TInt ValidateWriteContact(CContactICCEntry& aContactItem) = 0; - virtual TInt DeleteContact(TContactItemId aId) = 0; - virtual void Release() = 0; - virtual void UpdatePostWriteL(const CContactICCEntry& aContactItem) = 0; - virtual TContactItemId ICCTemplateIdL(TUid aPhonebookUid) = 0; - virtual TContactItemId GroupIdL(TUid aPhonebookUid) = 0; - virtual void NotifySyncStateChange(TRequestStatus& aStatus, TUid aPhonebookUid) = 0; - virtual void CancelNotifyRequest(TUid aPhonebookUid) = 0; - virtual TBool IsSynchronisedL(TUid aPhonebookUid) = 0; - virtual TInt PhonebookList(RArray& aPhonebookList) = 0; -public: - static CContactSynchroniser* NewL(); - IMPORT_C virtual ~CContactSynchroniser(); -private: - TUid iDtor_ID_Key; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntvcard.h --- a/epoc32/include/cntvcard.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTVCARD_H__ -#define __CNTVCARD_H__ - -// System includes -#include -#include - -// Classes referenced -class CVCardAddress; -class CVCardItemAndLabel; -class CVCardToContactsAppConverter; - -// Enumerations -/** -@internalComponent -@released -*/ -enum TCntVCardImportType - { - ECntVCardImportTypeFirstSync, - ECntVCardImportTypeMerge - }; - -class CContactVCardConverter : public CContactEcomConverter -/** -Plug-in vCard to CContactItem converter. -@publishedAll -@released -*/ - { -public: - // Ideally each converter should be able to define its own flags relevant - // to its own mode of operation. Due to the legacy design (defining flags - // in CContactDatabase) they have to be redeclared here. Long term we hope - // to deprecate the CContactDatabase flags and rely on those declared in - // the converter implementation. - /** Import and export format flags. Contacts can be imported into - or exported from the contact database as vCards. - - The following options are available during import and export. - - @publishedAll - @released - */ - enum TOptions - { - EDefault = CContactDatabase::EDefault, - /** Handle Symbian's extended vCard format options. */ - EIncludeX = CContactDatabase::EIncludeX, - /** Support non-standard extensions requried by Symbian PC connectivity software - and Microsoft, amongst others. */ - ETTFormat = CContactDatabase::ETTFormat , - /** Don't export the contact ID (for exporting only). */ - EExcludeUid = CContactDatabase::EExcludeUid, - /** Decrease the contact's access count when importing and exporting. */ - EDecreaseAccessCount = CContactDatabase::EDecreaseAccessCount, - /** Only import the first contact in the read stream (for importing only). */ - EImportSingleContact = CContactDatabase::EImportSingleContact, - /** Increase the contact's access count when importing and exporting. */ - EIncreaseAccessCount = CContactDatabase::EIncreaseAccessCount, - /** Sets a contact item to the local time when importing. */ - ELocalTime = CContactDatabase::ELocalTime, - /** Allows to set a template to a contact item that does not exist. */ - ENullTemplateId = CContactDatabase::ENullTemplateId, - /** Allows to set white spaces as value for an empty field. */ - EConnectWhitespace=0x0100, // Used to correctly manage the TimeIS protocol for syncing. - /** - During import ignore the UID property value of the vCard. By ignoring - the UID the client is indicating that it knows that the contact does not - already exist in the database (i.e. the contact is being added rather - than being updated). Within the CContactVCardConverter::ImportL() - method no attempt to search for the UID in the database will be made. - For a series of addition of vCards with UIDs use of this option will - give a performance improvement since the search for the UID in the - Contacts database can become very costly as the number of contacts - grows. - */ - EIgnoreUid = CContactDatabase::EConverterReserved1, - /** - During import, if it is determined that the contact item being imported - already exists in the database then the contact item in the database will - be deleted before being replaced by the vCard being imported. This option - should be used when the client does not want a merge type behaviour for - existing contact items. This option will typically be used in a sync use case - where the vCard data that the client is provided with has already been through a process - of conflict resolution and so the existing contact item should be replaced not merged. - */ - EReplaceIfExists = CContactDatabase::EConverterReserved2, - }; - - /** - @internalComponent - @released - */ - enum TVersitPropertyType - { - EPropertyValueSingle, - EPropertyValueComposite, - EPropertyValueHandlingNotImplemented - }; -public: // from CContactConverter - static CContactVCardConverter* NewL(); - CArrayPtr* ImportL(CContactDatabase& aDb,RReadStream& aReadStream,TBool& aImportSuccessful,TInt aOptions,TBool aImportSingle); - void ExportL(CContactDatabase& aDb,const CContactIdArray& aSelectedContactIds,RWriteStream& aWriteStream,TInt aOptions,const Versit::TVersitCharSet aCharSet, TBool aExportPrivateFields, TInt aCommitNumber); -public: // Utility - static TBool ContainsExportableData(const TDesC& aText); - static TBool ContainsImportableData(const TDesC& aText, TVersitPropertyType aType, TCntVCardImportType aImportType); -private: - static TBool ContainsData(const TDesC& aText); - void doImportL(CVCardToContactsAppConverter& aConverter, CParserVCard& aVCard, CContactDatabase& aDb, TInt aOption, TBool aIncAccessCount, TBool aDecAccessCount, TBool& aImportSuccessful, CArrayPtr* aContactItems, TBool aIsInTransaction, TContactItemId aIdForUpdate); - TContactItemId IsVCardMergeNeededL(CVCardToContactsAppConverter& aConverter, CParserVCard& aVCard, CContactDatabase& aDb, TInt aOption); - void ModifyAccessCountL(CContactItem& aContact, TBool aIncAccessCount, TBool aDecAccessCount); - void HandleAgentsInVCardL(CVCardToContactsAppConverter& aConverter, CArrayPtr* aAgentProperties, CContactItem& aContact, CContactDatabase& aDb, TInt aOption, TBool aIncAccessCount, TBool aDecAccessCount, CArrayPtr* aContactItemArray, TBool aMerge); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntview.h --- a/epoc32/include/cntview.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,480 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTVIEW_H__ -#define __CNTVIEW_H__ - -#include - -/** The maximum length of the string used by contact sub view ranges to find the -item at the upper or lower limit of the range. - -In practice, only the first character in the string is used and this value -is ignored. */ -const TInt KMaxBoundaryMatchLength=8; - -class CContactGroupView: public CContactViewBase, public MContactViewObserver -/** Provides a view of a group of contact items. - -The view uses an underlying view. For items to appear in the group view, they -must exist in the underlying view. - -The TGroupType enumeration defines whether the view displays items that belong -to the group, items that do not belong to the group, or items that do not -belong to any group. - -The group view observes its underlying view so that it is kept up to date -if the contents of the underlying view change. - -The group can be identified by a contact item ID or by a label, e.g. "family", -or "colleagues". - -@see CContactGroup -@publishedAll -@released -*/ - { -friend class CGroupViewTester; -public: - /** Defines the types of contact group view. */ - enum TGroupType - { - /** The view contains contact items in the group. */ - EShowContactsInGroup, - /** The view contains contact items not in the group. */ - EShowContactsNotInGroup, - /** The view contains contact items not in any group. */ - EShowContactsNotInAnyGroup - }; -public: - IMPORT_C static CContactGroupView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver,const TContactItemId aGroupId,const TGroupType aGroupType); - IMPORT_C static CContactGroupView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver, const TDesC& aGroupName,const TGroupType aGroupType); - - // Factory constructor for version 2 behaviour - IMPORT_C static CContactGroupView* NewL(CContactViewBase& aView,const CContactDatabase& aDb, MContactViewObserver& aObserver,const TContactItemId aGroupId,const TGroupType aGroupType); - // Factory constructor for version 2 behaviour - IMPORT_C static CContactGroupView* NewL(CContactViewBase& aView,const CContactDatabase& aDb, MContactViewObserver& aObserver, const TDesC& aGroupName,const TGroupType aGroupType); - //All CContactViewBase derived classes in public headers, - //should mandatorily implement this reserved function. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); - ~CContactGroupView(); -public: // From CContactViewBase - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - const RContactViewSortOrder& SortOrderL() const; -protected: - IMPORT_C virtual void UpdateGroupViewL(); -private: // From MContactViewObserver. - void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); -private: - void ConstructL(MContactViewObserver& aObserver,TContactItemId aGroupId); - void UpdateForContactsInGroupL(); - void UpdateForContactsNotInThisGroupL(); - void UpdateForUnfiledContactsL(); - void UpdateForContactListL(const CContactIdArray* aArray); - TContactItemId GetGroupIdbyNameL(const TDesC& aGroupName); - TBool HandleRemoveEventL(TContactViewEvent& aEvent); - TBool HandleAddEventL(TContactViewEvent& aEvent); - TBool HandleAddEventForUnfiledContactsL(const TContactViewEvent& aEvent ); - static TInt CompareMappingsL(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); - TInt static CompareIndexesAllowingDuplicates(const TContactIdWithMapping& aFirst, const TContactIdWithMapping& aSecond); -private: - CContactGroupView(const CContactDatabase& aDb,CContactViewBase& aView,TGroupType aGroupType); - void UpdateMappingsL(); - void NotifyRemovedMembersL(const CContactIdArray* aArray); -private: - RArray iGroupContacts; - TContactItemId iGroupId; - CContactViewBase& iView; - TGroupType iGroupType; - TUint iClassVersion; //version class - used for TContactViewEvent dispatching - }; - - -class CContactFindView: public CContactViewBase, public MContactViewObserver -/** Provides a view of an existing CContactViewBase-derived object, populated using -search criteria. - -The find view only contains contact items from the underlying view that match -the search criteria. - -The find view observes its underlying view so that it is kept up to date if -the contents of the underlying view change. - -The search criteria (one or more words) are held in an MDesCArray object. -The fields involved in the search are those that have been used to sort the -underlying view. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactFindView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver,MDesCArray* aFindWords); - IMPORT_C static CContactFindView* NewL(const CContactDatabase& aDb,CContactViewBase& aView,MContactViewObserver& aObserver,MDesCArray* aFindWords, TSearchType aSearchType); - - // Factory constructor for version 2 behaviour - IMPORT_C static CContactFindView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,MDesCArray* aFindWords); - // Factory constructor for version 2 behaviour - IMPORT_C static CContactFindView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,MDesCArray* aFindWords, TSearchType aSearchType); - - ~CContactFindView(); -public: // From CContactViewBase - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - const RContactViewSortOrder& SortOrderL() const; -protected: - IMPORT_C virtual void UpdateFindViewL(); -public: - IMPORT_C void RefineFindViewL(MDesCArray* aFindWords); - //All CContactViewBase derived classes in public headers, - //should mandatorily implement this reserved function. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); -private: // From MContactViewObserver. - virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); -private: - void ConstructL(MContactViewObserver& aObserver,MDesCArray* aFindWords); - void DeleteFindContacts(); - void TightenFindViewCriteriaL(); - void HandleRemoveEventL(TContactViewEvent& aEvent); - void HandleAddEventL(TContactViewEvent& aEvent); - void CopyNewFindWordsL(MDesCArray* aFindWords); - void DestroyFindWordsArray(); - TInt InsertContact(const CViewContact* aNewContact); -private: - CContactFindView(const CContactDatabase& aDb,CContactViewBase& aView, TSearchType aSearchType); -private: - RPointerArray iFindContacts; - CPtrCArray* iFindWords; - CContactViewBase& iView; - const TSearchType iSearchType; - TUint iClassVersion; //version class - used for TContactViewEvent dispatching - }; - - -class CContactFilteredView : public CContactViewBase, public MContactViewObserver -/** Provides a filtered view over an existing CContactViewBase derived object. - -For example, it might provide a view containing only contacts that have an -email address. For efficiency reasons there are a limited set of filters available -(defined in CContactDatabase::TContactViewFilter). - -The filtered view observes its underlying view so that it is kept up to date -if the contents of the underlying view change. It will, in turn, notify its -observers. - -Filters only apply to non-hidden contact fields with content. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactFilteredView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,CContactViewBase& aView,TInt aFilter); - // Factory constructor for version 2 behaviour - IMPORT_C static CContactFilteredView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,TInt aFilter); - - //All CContactViewBase derived classes in public headers, - //should mandatorily implement this reserved function. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); - ~CContactFilteredView(); -public: // From CContactViewBase. - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - const RContactViewSortOrder& SortOrderL() const; - virtual void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts); - virtual void ContactsMatchingPrefixL(const MDesCArray& aFindWords, RPointerArray& aMatchedContacts); -private: // From MContactViewObserver. - virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); -private: - CContactFilteredView(const CContactDatabase& aDb,TInt aFilter,CContactViewBase& aView); - void ConstructL(MContactViewObserver& aObserver); - void CreateFilteredIdArray(); - void UpdateFilteredIdArrayL(TContactViewEvent& aEvent, TBool& aViewModified); - void HandleAddEventL(TContactViewEvent& aEvent, TBool& aViewModified); - void HandleRemoveEventL(TContactViewEvent& aEvent, TBool& aViewModified); - TInt BinaryInsertL(TContactIdWithMapping aId); - static TInt FilterCallBack(TAny* aSelf); - static TBool CompareMappings(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); - void FilterResultsArray(RPointerArray& aMatchedContacts); - TInt DoFilterIncrementL(); - void UpdateMappingsL(); -private: - const TInt iFilter; - CContactViewBase& iView; - RArray iFilteredIdArray; - TUint iClassVersion; //version class - used for TContactViewEvent dispatching - }; - - -class CContactViewRangeBase : public CBase -/** The abstract base class for all contact view range classes. - -Range classes are used by contact sub views to specify the upper and lower -range boundaries and for searching their underlying view. - -@see CContactSubView -@publishedAll -@released -*/ - { -public: - /** Defines the range criteria. */ - enum TCriteria - { - /** Less than. */ - ELessThan, - /** Less than or equal to. */ - ELessThanOrEqualTo, - /** Greater than. */ - EGreaterThan, - /** Greater than or equal to. */ - EGreaterThanOrEqualTo - }; -public: - ~CContactViewRangeBase(); - inline TInt LowIndex() const; - inline TInt HighIndex() const; - /** Sets the iLow and iHigh members. */ - virtual void SetL()=0; - IMPORT_C TBool IndicesValid() const; -protected: - CContactViewRangeBase(const CContactViewBase& aView); - void ConstructL(); - TInt FindIndexL(const TDesC& aMatch,TCriteria aCriteria) const; - TBool MatchesCriteriaL(TCriteria aCriteria,const TDesC& aMatch,TInt aIndex) const; - void ValidateIndices(); -protected: - /** The sub view's underlying view. */ - const CContactViewBase& iView; - /** The index into the sub view's underlying view of the item at the lower limit - of the range. */ - TInt iLow; - /** The index into the sub view's underlying view of the item at the upper limit - of the range. */ - TInt iHigh; - //ChrisD: contain by value not ptr - /** The collation method used to sort the strings. - - By default, this is the standard collation method for the current locale. */ - TCollationMethod* iCollateMethod; - }; - - -class CContactViewRange : public CContactViewRangeBase -/** A sub view range with both a lower and upper limit. - -This is used by sub views when lower and upper boundary criteria are specified. - -@see CContactSubView -@publishedAll -@released -*/ - { -public: - ~CContactViewRange(); - IMPORT_C static CContactViewRange* NewL(const CContactViewBase& aView,const TDesC& aLowMatch,TCriteria aLowCriteria,const TDesC& aHighMatch,TCriteria aHighCriteria); -private: // From CContactViewRangeBase. - void SetL(); -private: - CContactViewRange(const CContactViewBase& aView,const TDesC& aLowMatch,TCriteria aLowCriteria,const TDesC& aHighMatch,TCriteria aHighCriteria); - void ConstructL(); -private: - TBuf iLowMatch; - TCriteria iLowCriteria; - TBuf iHighMatch; - TCriteria iHighCriteria; - }; - - -class CContactViewLowRange : public CContactViewRangeBase -/** A sub view range with an upper limit only. - -This is used by sub views when the range criteria are CContactViewRangeBase::ELessThan -or CContactViewRangeBase::ELessThanOrEqualTo. - -@see CContactSubView -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactViewLowRange* NewL(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); -private: // From CContactViewRangeBase. - void SetL(); -private: - CContactViewLowRange(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); -//ChrisD: why private d'tor - ~CContactViewLowRange(); -private: - TBuf iMatch; - TCriteria iCriteria; - }; - - -class CContactViewHighRange : public CContactViewRangeBase -/** A sub view range with a lower limit only. - -This is used by sub views when the range criteria are CContactViewRangeBase::EGreaterThan -or CContactViewRangeBase::EGreaterThanOrEqualTo. - -@see CContactSubView -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactViewHighRange* NewL(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); -private: // From CContactViewRangeBase. - void SetL(); -private: - CContactViewHighRange(const CContactViewBase& aView,const TDesC& aMatch,TCriteria aCriteria); -//ChrisD: why private d'tor - ~CContactViewHighRange(); -private: - TBuf iMatch; - TCriteria iCriteria; - }; - - -class CContactSubView : public CContactViewBase, public MContactViewObserver -/** Provides a view of a range of contact items from a potentially larger underlying -view (another CContactViewBase-derived object). - -All contact items between a lower and upper boundary in the underlying view -are included in the sub view. For example, the sub view might contain all -items whose name begins with a character between 'd' and 'f'. - -The sub view observes its underlying view so that as the underlying view changes, -the sub view is kept up to date. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactSubView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,CContactViewBase& aView,const TDesC& aBoundary);//>= > is infinity <= < =0; - IMPORT_C static CContactSubView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,CContactViewBase& aView,const TDesC& aLowBoundary,const TDesC& aHighBoundary); - - // Factory constructor for version 2 behaviour - IMPORT_C static CContactSubView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,const TDesC& aBoundary);//>= > is infinity <= < =0; - // Factory constructor for version 2 behaviour - IMPORT_C static CContactSubView* NewL(CContactViewBase& aView,const CContactDatabase& aDb,MContactViewObserver& aObserver,const TDesC& aLowBoundary,const TDesC& aHighBoundary); - - //All CContactViewBase derived classes in public headers, - //should mandatorily implement this reserved function. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); -public: // From CContactViewBase. - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - const RContactViewSortOrder& SortOrderL() const; -private: // From MContactViewObserver. - virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); -private: -//ChrisD: why private d'tor - ~CContactSubView(); - CContactSubView(const CContactDatabase& aDb,CContactViewBase& aView); - CContactSubView(const CContactDatabase& aDb,const CContactSubView& aView); - void CommonConstructL(MContactViewObserver& aObserver); - void ConstructL(MContactViewObserver& aObserver,const TDesC& aBoundary); - void ConstructL(MContactViewObserver& aObserver,const CContactSubView& aView); - void ConstructL(MContactViewObserver& aObserver,const CContactSubView& aView,const TDesC& aBoundary); - void ConstructL(MContactViewObserver& aObserver,const TDesC& aLowBoundary,const TDesC& aHighBoundary); - CContactViewRangeBase::TCriteria DecodeBoundary(TDes& aBoundary) const; - TInt MapToUnderlyingViewIndex(TInt aSubViewIndex) const; - TInt MapToSubViewIndex(TInt aUnderlyingViewIndex) const; -private: - CContactViewBase& iView; - CContactViewRangeBase* iRange; - TUint iClassVersion; //version class - used for TContactViewEvent dispatching - }; - - -class CContactConcatenatedView : public CContactViewBase, public MContactViewObserver -/** Concatenates multiple contact views into a single contiguous view. - -The component views are ordered according to their order in the array passed -into the NewL(). -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactConcatenatedView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,RPointerArray& aComponentViews); - //All CContactViewBase derived classes in public headers, - //should mandatorily implement this reserved function. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); -public: // From CContactViewBase. - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - const RContactViewSortOrder& SortOrderL() const; -private: // From MContactViewObserver. - virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent); -private: - struct TComponentView - { - TComponentView(CContactViewBase& aView,TState aState); - CContactViewBase& iView; - TState iState; - }; -private: - ~CContactConcatenatedView(); - CContactConcatenatedView(const CContactDatabase& aDb); - void ConstructL(MContactViewObserver& aObserver,RPointerArray& aComponentViews); - void CopyComponentViewsL(RPointerArray& aComponentViews); - void OpenComponentViewsL(); - void CloseComponentViews(); - TBool ComponentViewsReady(); - void SetComponentViewReady(const CContactViewBase& aView); - TInt OffsetL(const CContactViewBase& aView); - static TBool ComponentViewsEqual(const TComponentView& aFirst,const TComponentView& aSecond); - TInt FindComponentView(const CContactViewBase& aView); -private: - RArray iComponentView; - }; - - -inline TInt CContactViewRangeBase::LowIndex() const -/** Gets the index into the sub view's underlying view of the item at the bottom -of the range. - -@return The index of the item at the bottom of the range. */ - { return iLow; } - -inline TInt CContactViewRangeBase::HighIndex() const -/** Gets the index into the sub view's underlying view of the item at the top of -the range. - -@return The index of the item at the top of the range. */ - { return iHigh; } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cntviewbase.h --- a/epoc32/include/cntviewbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,908 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CNTVIEWBASE_H__ -#define __CNTVIEWBASE_H__ - -// System includes -#include -#include - -#include - -// Classes referenced -class CViewContactExtension; -class CContactViewBase; -class CContactRemoteViewNotifier; -class CIdleContactSorter; -class CContactViewFindConfigInterface; -class CViewContactSortPlugin; -class TSortPluginViewParams; - -/** View preferences for sorted contact views. - -This is used to specify the types of contact item that should be sorted and -included in the view and the behaviour for items that cannot be sorted because -they do not have content in any of the fields specified in the view's sort -order. - -The default behaviour is to include contact cards only and to sort contact -cards without content in any of the sort order fields using the first available -field containing any text. - -The view preferences for all concrete contact view classes can be retrieved -using their implementation of CContactViewBase::ContactViewPreferences(). -The view preferences are set during construction of a CContactLocalView. - -@publishedAll -@released -*/ -enum TContactViewPreferences - { - /** Only contact cards (of type KUidContactCard or KUidContactOwnCard) are included - in the view. This is the default. */ - EContactsOnly =0x00000000, - /** Only contact groups (of type KUidContactGroup) are included in the view. */ - EGroupsOnly =0x00000001, - /** Contact groups and contact cards (of type KUidContactGroup, KUidContactCard - or KUidContactOwnCard) are included in the view. */ - EContactAndGroups =0x00000002, - /** Excludes contact items from the view which don't have content in any of the - fields specified in the sort order. */ - EIgnoreUnSorted =0x00000004, - /** Includes contacts in the view which don't have content in any of the fields - specified in the sort order. These contacts are placed in an unsorted contact - list which is located before the sorted list. */ - EUnSortedAtBeginning =0x00000008, - /** Includes contacts in the view which don't have content in any of the fields - specified in the sort order. These contacts are placed in an unsorted contact - list which is located after the sorted list. */ - EUnSortedAtEnd =0x00000010, - /** Fields containing a single white space only are treated as empty, and therefore - unsortable. */ - ESingleWhiteSpaceIsEmptyField =0x00000020, - /** Only ICC entries (of type KUidContactICCEntry) are included in the view. */ - EICCEntriesOnly =0x00000040, - /** Only contact cards and ICC entries (of type KUidContactCard, KUidContactOwnCard - or KUidContactICCEntry) are included in the view. */ - EICCEntriesAndContacts =0x00000080 - }; - - -class TContactViewEvent -/** Identifies a contact view event. - -Sent by contact views when notifying their observers of an event. - -@see MContactViewObserver::HandleContactViewEvent() -@publishedAll -@released -*/ - { -public: - /** Identifies the event's type. */ - enum TEventType - { - /** The observed view's state has changed from EReady to either ENotReady or EInitializing, - so is not available for use. */ - EUnavailable, - /** The observed view's state has changed from ENotReady or EInitializing to EReady - so is available for use. */ - EReady, - /** The observed view's sort order has changed, so observer views need to update - themselves. */ - ESortOrderChanged, - /** An error occurred when sorting the observed view or when appending an observer - to its observer array. - - The error code is provided in iInt. */ - ESortError, - /** An error occurred in the contacts server. - - The error code is provided in iInt. */ - EServerError, - /** An error occurred when setting the range for a CContactSubView. - - The error code is provided in iInt. */ - EIndexingError, - /** An item has been added to the observed view. - - The ID of the added item is provided in iContactId and the index into the - observed view of the added item is provided in iInt. - Exception from this are the first version of CContactFindView, CContactSubView and - CContactGroupView classes. - For these classes, iInt has KErrNone value */ - - EItemAdded, - /** An item has been removed from the observed view. - - The ID of the removed item is provided in iContactId and the index into the - observed view of the item is provided in iInt. - Exception from this are the first version of CContactFindView and CContactSubView classes. - For these classes, iInt has KErrNone value */ - - EItemRemoved, - /** A change has occurred in a contact group, for instance a contact item has been - moved into or out of the group. - - The ID of the group affected is provided in iContactId. */ - EGroupChanged - }; -public: - inline TContactViewEvent(); - inline TContactViewEvent(TEventType aEventType,TInt aInt = KErrUnknown,TContactItemId aContactId = KErrUnknown); -public: - /** The type of event. */ - TEventType iEventType; - /** The error code (where relevant) or the index of the contact item added to/removed - from the underlying view. */ - TInt iInt; - /** The ID of the contact item that has been added or removed or the group ID, where - relevant. */ - TContactItemId iContactId;//ContactId that has been added / removed if relevant. - }; - - -struct TContactIdWithMapping -/** A struct used internally by filtered and group views to pair a contact item -ID and its index into the underlying view. -@publishedAll -@released -*/ - { - /** The contact item's ID. */ - TContactItemId iId; - /** The index of the item into the view's underlying view. */ - TInt iMapping; - }; - - -class MContactViewObserver -/** The interface for a contact view observer. - -Objects that need to observe a contact view should implement this interface. -The view observer should be passed to the observed view's OpenL() or Open() -function. This adds the observer to the view's observer array: a view can -have more than one observer. The observers receive notifications when the -observed view becomes ready for use and when changes occur in it. - -Many contact view classes implement this interface to observe an underlying -view. They in turn send notification to any objects observing them. - -@see CContactViewBase::NotifyObservers() -@see CContactViewBase::NotifyObserverAsync() -@publishedAll -@released -*/ - { -public: - /** Handles an event in an observed contact view. - - @param aView The contact view causing the notification. - @param aEvent The event. */ - virtual void HandleContactViewEvent(const CContactViewBase& aView,const TContactViewEvent& aEvent)=0; - }; - - -class RContactViewSortOrder -/** Specifies the sort order for a contact view. - -It is implemented as an array of TFieldType UIDs, which define the fields -whose contents are used to sort on, and their order. - -The sort order for all concrete contact view classes can be retrieved using -their implementation of CContactViewBase::SortOrderL(). The sort order is -set during construction of local and remote views. -@publishedAll -@released -*/ - { -public: - IMPORT_C RContactViewSortOrder(); - IMPORT_C void Close(); - IMPORT_C void CopyL(const RContactViewSortOrder& aSortOrder); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C TInt ExternalizedSize() const; - IMPORT_C TBool operator==(const RContactViewSortOrder& aSortOrder) const; - inline void AppendL(TFieldType aField); - inline TFieldType operator[](TInt aIndex) const; - inline TInt Count() const; -private: - RArray iFields; - TInt iSpare; - TInt32 iSpare2; - TInt32 iSpare3; - }; - - -/** -Wrapper around RArray, to container TTextFieldMinimal buffers. - -Features: minimum size 1, easy resize of array, persistent last counted total. - -@internalComponent -@released -*/ -class RFieldBufferArray : public RArray - { -public: - explicit RFieldBufferArray(); - - void ResizeL(TInt aNewSize); - void ZeroAll(); - TInt NewTotal(); - TInt LastTotal() const; - -private: - TInt iTotalLength; - }; - - - -class CViewContact : public CBase -/** The representation of a contact item used in contact views. - -It stores the contact item ID and other information. This includes a buffer -holding the contents of all the item's fields, an array of indexes into the -buffer indicating the start position of each field and a hint bit field (a -combination of CContactDatabase::TContactViewFilter values) which is used -in filtered views. - -The fields are defined by the view's sort order (RContactViewSortOrder). -@publishedAll -@released -*/ - { -public: - /** Defines whether the contact view item is a contact group. */ - enum TViewContactType - { - /** The contact view item is not a contact group. */ - EContactItem, - /** The contact view item is a contact group (CContactGroup). */ - EGroup - }; - IMPORT_C CViewContact(TContactItemId aId); - IMPORT_C static CViewContact* NewL(const CViewContact& aContact); - IMPORT_C static CViewContact* NewLC(TContactItemId aId); - IMPORT_C static CViewContact* NewL(TContactItemId aId, TInt aLength); - static CViewContact* NewLC(RReadStream& aStream); - - IMPORT_C ~CViewContact(); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C TInt ExternalizedSize() const; - IMPORT_C TInt FieldCount() const; - IMPORT_C TPtrC Field(TInt aPosition) const; - IMPORT_C TBool ContactMatchesFilter(TInt aFilter) const; - IMPORT_C void AddFieldL(const TDesC& aField); - IMPORT_C TBool IsSortable() const; - IMPORT_C void SetFirstFieldForBlankContactL(const TDesC& aFirstField); - IMPORT_C void Reset(); - IMPORT_C TInt ContactHint() const; - IMPORT_C void SetContactHint(TInt aHint); - IMPORT_C TUid ContactTypeUid() const; - IMPORT_C void SetContactTypeUid(TUid aUid); - - inline TContactItemId Id() const; - inline TViewContactType ContactType() const; -public: - inline void SetId(TContactItemId aId); - inline void SetContactType(CViewContact::TViewContactType aContactType); - static TBool HintFieldMatchesFilter(TInt aHintField, TInt aFilter); - TPtrC FindFirstPopulatedField(TInt aOffset, TInt& aFoundPosition) const; - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - IMPORT_C void ChangeToLightweightObject(); - TBool IsLightweightObject() const; - void CopyL(const CViewContact& aContact); -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - -private: - void ConstructL(TInt aLength = 0); - void ConstructL(const CViewContact& aContact); - friend class CContactViewBase; -private: - TContactItemId iId; - TViewContactType iContactType; - CViewContactExtension* iExtension; - RArray iTextIndexes; - }; - - -/* - * A view can be named or un-named. An un-named view has a fixed sort order - the - * only way to change this is by closing the object and creating a new one with a - * different order. Named views may have their sort order changed. When this is - * done, first all observers will be informed that the view is 'unavailable'. This - * notification will be followed by 'sort order changed' and 'ready'. Only once - * the 'ready' notification has been received may the view be used again. - */ -class CContactViewBase : public CBase -/** The abstract base class for all contact view classes. - -All contact views operate asynchronously, so users of the view must observe -it, by implementing the MContactViewObserver interface. Immediately after -construction, views are not in a usable state (the underlying data may be -being sorted, for instance). Only after the user has received a TContactViewEvent::EReady -event may the view be used. - -View observers are also notified when changes occur, for instance when the -view's state changes (see TState), when an error occurs, or when an item is -added or removed. -@publishedAll -@released -*/ - { -public: - class CContactViewBaseExtension : public CBase - /** An extension class that holds member data added in v7.0s. - - It was created for binary compatibility purposes. - @internalComponent - @released */ - { - public: - static CContactViewBaseExtension* NewL(); - ~CContactViewBaseExtension(); - - private: - CContactViewBaseExtension(); - void ConstructL(); - - public: - /** A standard error code that is passed to view observers by NotifyObservers() - (unless its value is KErrNone). */ - TInt iError; - /** The UID of the view's find configuration plug-in. - - On construction, this is initialised to KNullUid. - - The plug-in is loaded when ContactsMatchingCriteriaL(), ContactsMatchingPrefixL() - or MatchesCriteriaL() is called. */ - TUid iFindPluginUid; - /** The UID of the view's sort plug-in. */ - TUid iSortPluginUid; - private: - CContactViewFindConfigInterface* iFindPluginImpl; - CViewContactSortPlugin* iSortPluginImpl; - TCollationMethod iCollationMethod; - friend class CContactViewBase; - }; - class TVirtualFunction1Params - /** Holds the two parameters passed to the helper method GetContactIdsL() from - the reserved function CContactViewBase_Reserved_1(). It has an inline constructor - to initialise the data members. - @publishedAll - @released */ - { - public: - /** Inline constructor to initialize member data - @param aIndexes Pointer to an array of indexes in a view - @param aIdArray Pointer to array of contact IDs */ - inline TVirtualFunction1Params(const CArrayFix* aIndexes, CContactIdArray* aIdArray) :iIndexes(aIndexes), iIdArray(aIdArray){}; - /** Pointer to an array of indexes in a view */ - const CArrayFix* iIndexes; - /** Pointer to array of contact IDs */ - CContactIdArray* iIdArray; - }; - class TVirtualFunction2Params - /** Holds the two parameters passed to the method GetContactsMatchingFilterL() - from the reserved function CContactViewBase_Reserved_1(). It has an inline - constructor to initialise the data members. - */ - { - public: - /** Inline constructor to initialize member data. - @param aFilter Filter for the contacts - @param aMatchingContacts Contacts matching a particular criterion */ - inline TVirtualFunction2Params(TInt aFilter, RArray& aMatchingContacts) : iFilter(aFilter), iMatchingContacts(aMatchingContacts){}; - public: - /** Filter for the contacts. */ - TInt iFilter; - /** List of contacts matching the criteria. */ - RArray& iMatchingContacts; - }; - class TVirtualFunction3Params - /** Holds the two parameters passed to the method InsertContactInView() from the - reserved function CContactViewBase_Reserved_1(). It has an inline - constructor to initialise the data members. - - @internalAll */ - { - public: - inline TVirtualFunction3Params(RPointerArray& aContacts, const CViewContact* aNewContact) :iContacts(aContacts), iNewContact(aNewContact){}; - RPointerArray& iContacts; - const CViewContact* iNewContact; - }; - /** Search type. - - This controls whether a search term can occur anywhere in a contact item field, - or just at the beginning of the field. */ - enum TSearchType - { - /** The search uses full wildcard matching so that the search string can occur anywhere - in the item's fields. */ - EFullSearch, - /** The search uses partial wildcard matching so that the search string can only - occur at the beginning of the item's fields. */ - EPrefixSearch - }; - /** Identifies the functions that have been added to CContactViewBase, or that - may be added in the future. This identifier is passed to the reserved virtual - function CContactViewBase_Reserved_1() and enables the addition of new virtual - methods without breaking binary compatibility. */ - enum TFunction - { - /** Identifies the function CContactViewBase::GetContactIdsL(). */ - ECContactViewBaseVirtualFunction1, - /** Identifies the function CContactViewBase::GetContactsMatchingFilterL(). */ - ECContactViewBaseVirtualFunction2, - // communication with Sort Plug-in - /** Identifies the function CContactViewBase::InsertContactInView(). */ - ECContactViewBaseVirtualFunction3, - }; -protected: - /** Defines the contact view states. */ - enum TState - { - /** The view is initialising. - - This is the view's state immediately after construction or after a significant change - (e.g CurrentDatabaseChanged or UnknownChanges), indicating that it can't be used yet. */ - EInitializing, - /** The view is ready to be used. */ - EReady, - /** The view is not ready to be used, for instance immediately after the sort order - has changed, or after an error has occurred. */ - ENotReady - }; -public: - IMPORT_C void OpenL(MContactViewObserver& aObserver); - IMPORT_C TInt Open(MContactViewObserver& aObserver); - IMPORT_C TBool Close(const MContactViewObserver& aObserver); - /** Returns the contact item ID at the specified index into the view. - - @capability ReadUserData - @param aIndex Index of the contact item ID into the view. - @return The contact item ID. */ - virtual TContactItemId AtL(TInt aIndex) const=0; - /** Returns the contact item at the specified index into the view. - - @capability ReadUserData - @param aIndex Index of the contact item into the view. - @return The contact item. */ - virtual const CViewContact& ContactAtL(TInt aIndex) const =0; - /** Returns the number of contact items in the view. - - @capability ReadUserData - @return The number of contact items in the view. */ - virtual TInt CountL() const=0; - /** Returns the index into the view of the specified contact item. - - @capability ReadUserData - @param aId The contact item ID to search for. - @return The index into the view of the contact item ID, or KErrNotFound if - no matching ID can be found. */ - virtual TInt FindL(TContactItemId aId) const=0; - /** Returns a descriptor containing the contents of all fields for an item in the view. - - The field separator is used to separate the contents of each field. It is - not appended to the last field. - - @capability ReadUserData - @param aIndex The index of the contact item into the view. - @param aSeparator The string to use to separate the fields. - @return Pointer to the contact item descriptor. */ - virtual HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const=0; - IMPORT_C virtual void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts); - /** Gets the view preferences. - - @capability ReadUserData - @return The view preferences. */ - virtual TContactViewPreferences ContactViewPreferences()=0; - /** Gets the view's sort order. - - @capability ReadUserData - @return The sort order. */ - virtual const RContactViewSortOrder& SortOrderL() const = 0; - IMPORT_C virtual void ContactsMatchingPrefixL(const MDesCArray& aFindWords, RPointerArray& aMatchedContacts); - //This is a reserved virtual exported function that is used for BC proofing against present - //and future additions of new exported virtual functions. Existing exported virtual methods - //that broke BC are now non-virtual exported helper functions called from this method. - //All derived classes of CContactViewBase that are public must mandatorily - //implement this reserved exported virtual method. - IMPORT_C virtual TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); - //New exported method to set the ECOM plug-in to be used - IMPORT_C void SetViewFindConfigPlugin(TUid aUid); - IMPORT_C TUid GetViewFindConfigPlugin(); - IMPORT_C virtual void GetContactIdsL(const CArrayFix& aIndexes, CContactIdArray& aContactIds); - IMPORT_C TInt Error() const; - IMPORT_C TUid GetViewSortPluginImplUid() const; - -protected: - IMPORT_C ~CContactViewBase(); - IMPORT_C void ConstructL(); - - IMPORT_C CContactViewBase(const CContactDatabase& aDb); - IMPORT_C void NotifyObservers(const TContactViewEvent& aEvent); - IMPORT_C TInt NotifyObserverAsync(MContactViewObserver& aObserver,const TContactViewEvent& aEvent); - IMPORT_C static TBool IdsMatch(const CViewContact& aFirst,const CViewContact& aSecond); - IMPORT_C HBufC* FieldsWithSeparatorLC(const RPointerArray& aContacts,TInt aIndex,const TDesC& aSeparator) const; - //Find helper functions - IMPORT_C virtual TBool MatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords); - IMPORT_C static TBool MatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords, TSearchType aSearchType); - IMPORT_C static TBool MatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords, TSearchType aSearchType,CContactViewBase::CContactViewBaseExtension* aExtension); - IMPORT_C static TBool IdsEqual(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); - IMPORT_C static TBool IndexesEqual(const TContactIdWithMapping& aFirst,const TContactIdWithMapping& aSecond); - IMPORT_C static TInt CompareFieldsL(const CViewContact& aFirst, const CViewContact& aSecond); - // View Sort Plugin changes - IMPORT_C static TInt CompareContactIds(const CViewContact& aFirst, const CViewContact& aSecond); - IMPORT_C static TBool ContactIsSortable(const CViewContact& aContact); - IMPORT_C TInt CompareContactsAndIdsL(const CViewContact& aFirst, const CViewContact& aSecond) const; -protected: // these are needed by CContactLocalView only - TInt InsertContactInView(RPointerArray& aContacts, const CViewContact* aNewContact, TBool aSortByIdOnly, TInt* aIndex) const; - TBool IsContactSortable(const CViewContact& aContact, TContactViewPreferences& aViewPreferences) const; - CViewContactSortPlugin* SortPluginImpl() const; - TUid FindSortPluginImplL (const TDesC8& aSortPluginName,TBool aWildCard=EFalse) const; - TUid FindDefaultViewSortPluginImplL () const; - void LoadViewSortPluginL (TUid aSortPluginUid,TContactViewPreferences& aViewPreferences); - -private: - static TInt AsyncNotifyCallBack(TAny* aSelf); - static CDesCArrayFlat* CreateFindWordArrayLC(const MDesCArray& aFindWords, TSearchType aSearchType); - static TBool ContactMatchesCriteriaL(const CViewContact& aContact,const MDesCArray& aFindWords,CContactViewBase::CContactViewBaseExtension* aExtension); - void MatchContactsL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts, TSearchType aSearchType); - static TInt CompareFieldsWithCollationLevel(const CViewContact& aFirst, const CViewContact& aSecond, - TInt aCollationLevel, TCollationMethod* aCollateMethod); - TInt GetErrorValueFromExtensionClass(); - void GetContactsMatchingFilterL(TInt aFilter, RArray& aMatchingContacts); - TInt TextCompareFieldsL(const CViewContact& aFirst, const CViewContact& aSecond) const; - - -private: - struct TObserverAndEvent - { - TContactViewEvent iAsyncEvent; - MContactViewObserver* iObserverToNotify; - }; -protected: - // Reference to CContactDatabase class. - const CContactDatabase& iDb; - // Different Contacts view states. - TState iState; - // The pointer to the ContactViewBase BC extension class. - CContactViewBaseExtension* iExtension; -private: - RPointerArray iObserverArray; - CIdle* iAsyncNotifier; - RArray iOutstandingNotifications; - }; - -inline TInt CContactViewBase::GetErrorValueFromExtensionClass() - { - return iExtension->iError; - } - -class MLplPersistenceLayerFactory; - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - -class CViewContactManager; - -#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ - -class CViewIterator; - -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - -class CContactLocalView : public CContactViewBase, public MContactDbObserver -/** An instantiable base class for contact views. - -The data associated with a local view is allocated within the client's memory -space; CContactRemoteView should be used in preference if the view is likely -to be shared between multiple clients. It is kept up to date by receiving -change events from the underlying CContactDatabase object which it observes. -The view preferences and sort order are specified on construction. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactLocalView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); - IMPORT_C static CContactLocalView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, - const TDesC8& aSortPluginName); - IMPORT_C static CContactLocalView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, - MLplPersistenceLayerFactory* aFactory,const TDesC8& aSortPluginName); - - IMPORT_C const RContactViewSortOrder& SortOrder() const; -public: // From CContactViewBase. - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - const RContactViewSortOrder& SortOrderL() const; - void NotifySortError(TInt aError); - //All derived classes of CContactViewBase that are public should mandatorily - //implement this reserved exported virtual method. - IMPORT_C TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); -protected: - IMPORT_C ~CContactLocalView(); - IMPORT_C CContactLocalView(const CContactDatabase& aDb,TContactViewPreferences aContactTypes); - CContactLocalView(const CContactDatabase& aDb,TContactViewPreferences aContactTypes,MLplPersistenceLayerFactory* aIterFactory); - IMPORT_C void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder); - void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder, const TBool aUseNamedPlugin, const TDesC8& aSortPluginName); - IMPORT_C virtual void SortL(const RContactViewSortOrder& aSortOrder); - IMPORT_C virtual TInt InsertL(TContactItemId aId); - IMPORT_C virtual TInt RemoveL(TContactItemId aId); -protected: - void SetState(TState aState); -private: // From MContactDbObserver. - virtual void HandleDatabaseEventL(TContactDbObserverEvent aEvent); - -private: - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - void SortComplete(TInt aSortErr); - void SetSortOrderL(const RContactViewSortOrder& aSortOrder); - void SortL(); - void SafeResort(); - friend class CViewContactManager; -#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ - TInt SortCallBack(); - TInt DoReadIncrementL(); - void ResetSortL(); - void InitialiseSortL(const RContactViewSortOrder& aSortOrder, TBool aChangingSortOrder); - void SortL(); - void SafeResort(); - void ContactsArraySortL(); - TBool ContactCorrectType(TUid aType,TContactViewPreferences aTypeToInclude); -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - -private: // Metheds for event handling - void HandleOutstandingEvents(); - void HandleOutstandingEventL(); - friend class CIdleContactSorter; -protected: - /** The sort order. - This is set during construction or when SortL() is called. */ - RContactViewSortOrder iSortOrder ; -private: - IMPORT_C virtual void CContactLocalView_Reserved_1(); - IMPORT_C virtual void CContactLocalView_Reserved_2(); - -private: - MLplPersistenceLayerFactory* iFactory; - RPointerArray iContacts; - RPointerArray iUnSortedContacts; - RArray iOutstandingEvents; - CIdleContactSorter* iAsyncSorter; - -#ifdef __SYMBIAN_CNTMODEL_USE_SQLITE__ - CViewContactManager* iViewCntMgr; -#else //__SYMBIAN_CNTMODEL_USE_SQLITE__ - CViewIterator* iViewIterator; -#endif //__SYMBIAN_CNTMODEL_USE_SQLITE__ - - CContactTextDef* iTextDef; - TContactViewPreferences iViewPreferences; - TBool iSpare0; - TInt iSpare; - }; - -class RContactRemoteView : public RSubSessionBase -/** This class is used internally by remote contact views as the handle to the -server side view object. - -@see CContactRemoteViewBase -@internalComponent -@released -*/ - { -public: - void OpenL(const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName); - void OpenL(const CContactDatabase& aDb,const TDesC& aName,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName); - void Close(); -public: // From CContactViewBase - TContactItemId AtL(TInt aIndex) const; - CViewContact* ContactAtL(TInt aIndex); - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const RContactViewSortOrder& SortOrderL(); -public: - void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts, TBool aPrefixSearch,TUid aUid); - void ChangeSortOrderL(const RContactViewSortOrder& aSortOrder); - void GetSortOrderL(RContactViewSortOrder& aSortOrder); - TContactViewPreferences ContactViewPreferencesL(); - - void RequestViewEvent(TPckgBuf& aEvent,TRequestStatus& aStatus); - TInt CancelRequestViewEvent(); - void GetContactIdsL(const CArrayFix& aIndexes, CContactIdArray& aContactIds); - void GetContactsMatchingFilterL(TInt aFilter, RArray& aMatchingContacts); - TUid GetViewSortPluginImplUidL() const; -private: - HBufC8* PackageSortOrderLC(const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes) const; - HBufC8* PackageSortOrderAndPluginDetailsLC(const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes,const TUid& aSortPluginImplUid,const TDesC8& aSortPluginName) const; -private: - CViewContact* iContact; - RContactViewSortOrder iSortOrder ; - }; - - -NONSHARABLE_CLASS(CContactRemoteViewBase) : public CContactViewBase -/** Base class for all remote contact view classes. - -It implements all the pure virtual functions in CContactViewBase and additionally -it handles remote view notifications. The data associated with remote views -is allocated within the memory space of the contacts server. This means that -multiple clients can share the same server side view object, thereby reducing -the overhead associated with initial sorting of the view data and keeping -it in sync with the underlying data. Remote views should therefore be used -when the same view is likely to be needed by more than one client. -@internalComponent -@released -*/ - { -public: // From CContactViewBase. - TContactItemId AtL(TInt aIndex) const; - TInt CountL() const; - TInt FindL(TContactItemId aId) const; - HBufC* AllFieldsLC(TInt aIndex,const TDesC& aSeparator) const; - const CViewContact& ContactAtL(TInt aIndex) const; - TContactViewPreferences ContactViewPreferences(); - void ContactsMatchingCriteriaL(const MDesCArray& aFindWords,RPointerArray& aMatchedContacts); - void ContactsMatchingPrefixL(const MDesCArray& aFindWords, RPointerArray& aMatchedContacts); - const RContactViewSortOrder& SortOrderL() const; - //All derived classes of CContactViewBase that are public should mandatorily - //implement this reserved exported virtual method. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); - //This function was virtual in a previous release, if you still need to use it - //in a virtual way then you can call it via the Reserved function. - //The functionality of this function ,however,remains the same. - void GetContactIdsL(const CArrayFix& aIndexes, CContactIdArray& aContactIds); - void GetContactsMatchingFilterL(TInt aFilter, RArray& aMatchingContacts); -protected: - ~CContactRemoteViewBase(); - CContactRemoteViewBase(const CContactDatabase& aDb); - void ConstructL(MContactViewObserver& aObserver); -private: - static TInt NotifierCallBack(TAny* aSelf); - void HandleContactViewEvent(const TContactViewEvent& aEvent); -protected: - /** A handle to the server side view. */ - RContactRemoteView iView; -private: - CContactRemoteViewNotifier* iNotifier; - /** Cached copy of the count of the local view in the contacts server. - If this is KCachedItemCountInvalid then next time CountL is called - the current count is retrieved from the contacts server. */ - mutable TInt iCount; - }; - - -class CContactRemoteView : public CContactRemoteViewBase -/** An instantiable remote contact view class. - -Remote views are associated with a CContactLocalView object held in the contacts -server. They provide an efficient means for multiple clients to share the -same underlying view. - -The view preferences and sort order are specified on construction. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactRemoteView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); - IMPORT_C static CContactRemoteView* NewL(MContactViewObserver& aObserver,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, - const TDesC8& aSortPluginName); - IMPORT_C void GetSortOrderL(RContactViewSortOrder& aSortOrder); - //All derived classes of CContactViewBase that are public should mandatorily - //implement this reserved exported virtual method. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); -protected: - ~CContactRemoteView(); - CContactRemoteView(const CContactDatabase& aDb); -private: - void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); - void ConstructL(MContactViewObserver& aObserver,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypesconst, const TDesC8& aSortPluginName); - }; - - -class CContactNamedRemoteView : public CContactRemoteView -/** A named remote contact view. - -This class enables multiple clients to share a named server side view. It -also provides a function to change the sort order. If the sort order is changed, -a notification is sent to all users of the named view. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CContactNamedRemoteView* NewL(MContactViewObserver& aObserver,const TDesC& aName,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); - IMPORT_C static CContactNamedRemoteView* NewL(MContactViewObserver& aObserver,const TDesC& aName,const CContactDatabase& aDb,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, - const TDesC8& aSortPluginName); - IMPORT_C void ChangeSortOrderL(const RContactViewSortOrder& aSortOrder); - //All derived classes of CContactViewBase that are public should mandatorily - //implement this reserved exported virtual method. - TAny* CContactViewBase_Reserved_1(TFunction aFunction,TAny* aParams); -private: - ~CContactNamedRemoteView(); - CContactNamedRemoteView(const CContactDatabase& aDb); - void ConstructL(MContactViewObserver& aObserver,const TDesC& aName,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes); - void ConstructL(MContactViewObserver& aObserver,const TDesC& aName,const RContactViewSortOrder& aSortOrder,TContactViewPreferences aContactTypes, const TDesC8& aSortPluginName); - }; - -inline TContactViewEvent::TContactViewEvent() -/** Empty default constructor. */ - {}; - -inline TContactViewEvent::TContactViewEvent(TEventType aEventType,TInt aInt,TContactItemId aContactId) : iEventType(aEventType),iInt(aInt),iContactId(aContactId) -/** Constructor with an event type and an optional error code and contact item ID. - -@param aEventType The event type. -@param aInt Optional standard error code. -@param aContactId Optional contact item ID. */ - {}; - -inline void RContactViewSortOrder::AppendL(TFieldType aField) -/** Appends a field type to the sort order object. - -@param aField The field type to append. */ - { User::LeaveIfError(iFields.Append(aField)); } - -inline TFieldType RContactViewSortOrder::operator[](TInt aIndex) const -/** Gets an indexed field type. - -@param aIndex Index of the required field type. A panic occurs if this is -invalid. -@return The field type located at the indexed position in the array. */ - { return iFields[aIndex]; } - -inline TInt RContactViewSortOrder::Count() const -/** Gets the number of field types in the sort order array. - -@return The number of field types in the array. */ - { return iFields.Count(); } - -inline TContactItemId CViewContact::Id() const -/** Gets the view item's ID. - -@return The view item's ID. */ - {return iId;} - -inline CViewContact::TViewContactType CViewContact::ContactType() const -/** Gets the view item's type. - -@return The view item's type. */ - {return iContactType;} - -inline void CViewContact::SetId(TContactItemId aId) -/** Sets the view item's ID. - -@param aId The contact item ID. */ - {iId=aId;} - -inline void CViewContact::SetContactType(CViewContact::TViewContactType aContactType) -/** Sets the view item's type. - -@param aContactType The view item's type. */ - {iContactType=aContactType;} -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cobexsendoperation.h --- a/epoc32/include/cobexsendoperation.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#ifndef __COBEXSENDOPERATION_H__ -#define __COBEXSENDOPERATION_H__ - - -#include - - -class CObexSendOperation : public CMsvSendOperation -/** -@internalComponent -*/ - { -public: - IMPORT_C CObexSendOperation(CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); - // from CMsvSendOperation - IMPORT_C virtual const TDesC8& TranslateProgress(const TDesC8& aProgress); - }; - - -#endif // __COBEXSENDOPERATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coeaui.h --- a/epoc32/include/coeaui.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,245 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEAUI_H__ -#define __COEAUI_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -class CCoeEnv; -class CCoeControl; - -/** -Creates a FEP interface object. - -@publishedAll -@released -*/ -typedef CCoeFep* (*TCoeFepFactoryFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll, const CCoeFepParameters& aFepParameters); - -/** -Calls the second ordinal function of the FEP for which the settings dialog is to be executed. - -@publishedAll -@released -*/ -typedef void (*TCoeSynchronouslyExecuteFepSettingsDialogFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll); - -/** Stack priority flags. - -Controls with higher priorities get offered key events before controls -with lower priorities. - -@publishedAll -@released */ -enum - { - /** 0 */ - ECoeStackPriorityDefault=0, - /** 10 */ - ECoeStackPriorityMenu=10, - /** 50 */ - ECoeStackPriorityDialog=50, - /** 60 */ - ECoeStackPriorityCba=60, - /** 200 */ - ECoeStackPriorityAlert=200, - /** 240 */ - ECoeStackPrioritySoftkey=240, - /** 250 */ - ECoeStackPriorityFep=250, - /** 300 */ - ECoeStackPriorityEnvironmentFilter=300 - }; - - -/** Control stack flags. - -Each control on the stack has a set of these flags which can be used -to refuse to accept key events and to refuse requests for focus. - -@publishedAll -@released */ -enum - { - /** The default value */ - ECoeStackFlagStandard = 0, - /** The control does not accept key events. */ - ECoeStackFlagRefusesAllKeys = 0x01, - /** The control does not accept keyboard focus. */ - ECoeStackFlagRefusesFocus = 0x02, - /** The control is owned and deleted by the stack. */ - ECoeStackFlagOwnershipTransfered= 0x04, - /** The control is also added to the stack of any embedded app UI. For - example, an alert dialog added through CEikonEnv will be - shared on the stack of all embedded app UIs that may appear in the - application. */ - ECoeStackFlagSharable = 0x08 - }; - -class CCoeControlStack; -class CCoeViewManager; - -/** Application user interface (app UI) base class. - -The app UI's responsibilities include owning the application's control stack and views, -handling user commands, (see the derived class CEikAppUi), and handling events sent by -the OS to the application, for instance being brought to the foreground. - -The UI framework class CEikAppUi is derived from this class. UIs may derive -further to add their own UI-specific features to the app UI; each application must -derive its own concrete app UI class from this. - -@publishedAll -@released */ -class CCoeAppUi : public CBase - { -public: - // Construction and destruction - IMPORT_C CCoeAppUi(); - IMPORT_C ~CCoeAppUi(); - IMPORT_C void ConstructL(CCoeAppUi* aPrevious=NULL); - // Control stack - IMPORT_C void AddToStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); - IMPORT_C void AddToStackL(CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); - IMPORT_C void RemoveFromStack(CCoeControl* aControl); - IMPORT_C void HandleStackChanged(); - IMPORT_C void HandleStackedControlsResourceChange(TInt aType); - IMPORT_C void UpdateStackedControlFlags(CCoeControl* aControl,TInt aFlags,TInt aMask); - // Help context - IMPORT_C CArrayFix* AppHelpContextL() const; - // Text input - IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const; - // Control focus - IMPORT_C CCoeControl* TopFocusedControl() const; - // Utility - IMPORT_C TBool IsDisplayingMenuOrDialog() const; - IMPORT_C TBool IsDisplayingDialog() const; - IMPORT_C TBool IsDisplayingControlBetweenPriorities(TInt aLowerPriority, TInt aHigherPriority) const; - // View registration - IMPORT_C void RegisterViewL(MCoeView& aView); - IMPORT_C void DeregisterView(const MCoeView& aView); - IMPORT_C void SetDefaultViewL(const MCoeView& aView); - IMPORT_C TInt GetDefaultViewId(TVwsViewId& aViewId) const; - // Pseudo-view registration - IMPORT_C void CheckInitializeViewsL(TUid aAppUid); - IMPORT_C void RegisterApplicationViewL(TUid aAppUid); - IMPORT_C void DeregisterApplicationView(); - // View construction - IMPORT_C TBool IsViewConstructed(const TVwsViewId& aViewId) const; - // View activation - IMPORT_C void ActivateViewL(const TVwsViewId& aViewId); - IMPORT_C void ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); - IMPORT_C void ActivateTopViewL(); - IMPORT_C void CreateActivateViewEventL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); - IMPORT_C void DeactivateActiveViewIfOwnerMatchL(); - IMPORT_C void DeactivateActiveViewL(); - IMPORT_C TInt GetActiveViewId(TVwsViewId& aViewId) const; - // View registration - IMPORT_C void AddViewObserverL(MCoeViewObserver* aViewObserver); - IMPORT_C void RemoveViewObserver(MCoeViewObserver* aViewObserver); - // View activation observer - IMPORT_C void AddViewActivationObserverL(MCoeViewActivationObserver* aViewActivationObserver); - IMPORT_C void RemoveViewActivationObserver(MCoeViewActivationObserver* aViewActivationObserver); - IMPORT_C void NotifyNextActivation(const TVwsViewId& aViewId, MCoeViewActivationObserver& aViewActivationObserver); - IMPORT_C void NotifyNextActivation(MCoeViewActivationObserver& aViewActivationObserver); - IMPORT_C TBool CheckSourceOfViewSwitchL(const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic=NULL) const; - // View decativation observer - IMPORT_C void AddViewDeactivationObserverL(MCoeViewDeactivationObserver* aViewDeactivationObserver); - IMPORT_C void RemoveViewDeactivationObserver(MCoeViewDeactivationObserver* aViewDeactivationObserver); - IMPORT_C void NotifyNextDeactivation(const TVwsViewId& aViewId, MCoeViewDeactivationObserver& aViewDeactivationObserver); - IMPORT_C void NotifyNextDeactivation(MCoeViewDeactivationObserver& aViewDeactivationObserver); - // View session configuration - IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable); - IMPORT_C void UpdateViewServerBackgroundColor(const TRgb& aBgColor); - - // New APIs - IMPORT_C void SetCustomControl(TInt aCustomControl); - IMPORT_C TInt GetTopViewId(TVwsViewId& aViewId) const; - IMPORT_C void SetWindowGroupOrdinal(TInt aWindowGroupOrdinal); - -public: // Internal - IMPORT_C void SetApplicationViewAsDefaultL(); // internalTechnology - IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId,TInt aMode); // internalTechnology - IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId); // internalTechnology - IMPORT_C void GetSystemDefaultViewL(TVwsViewId& aViewId); // internalTechnology - IMPORT_C virtual void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination); - IMPORT_C virtual void PrepareToExit(); -protected: // Internal - IMPORT_C virtual void HandleScreenDeviceChangedL(); -private: // Internal - IMPORT_C virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); - IMPORT_C virtual void HandleForegroundEventL(TBool aForeground); - IMPORT_C virtual void HandleSwitchOnEventL(CCoeControl* aDestination); - IMPORT_C virtual void HandleSystemEventL(const TWsEvent& aEvent); - IMPORT_C virtual void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent); - IMPORT_C virtual void SetAndDrawFocus(TBool aFocus); - IMPORT_C virtual CArrayFix* HelpContextL() const; -public: // Internal - IMPORT_C virtual TBool FrameworkCallsRendezvous() const; -public: // Internal - IMPORT_C void WriteInternalStateOfStackedControlsL(RWriteStream& aWriteStream) const; // internalTechnology -public: // Deprecated. Do not use! - IMPORT_C void RegisterViewAndAddStackL(MCoeView& aView); // deprecated - IMPORT_C void DeregisterViewAndRemoveStack(const MCoeView& aView); // deprecated - IMPORT_C void RemoveFromViewStack(const MCoeView& aView,CCoeControl* aControl); // deprecated - IMPORT_C void UpdateViewStackedControlFlags(const MCoeView& aView,CCoeControl* aControl,TInt aFlags,TInt aMask); // deprecated - IMPORT_C void AddToViewStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); // deprecated -public: // not exported - TBool IsControlOnStack(CCoeControl* aControl) const; - void SetCurrentControlStackGroupId(TInt aGroupId); - void NotifyFontChange(const CCoeFontProvider& aFontProvider); - void RefetchPixelMappingL(); -private: - enum TRemoveCondition - { - ERemoveUnconditionally, - ERemoveOnlyIfSharable - }; -private:// Internal - IMPORT_C virtual void CCoeAppUi_Reserved_2(); -private: - CCoeControl* TopFocusableControl() const; - TInt FindPos(CCoeControlStack* aStack,CCoeControl* aControl) const; - void SetFocusToControl(CCoeControl* aControl,TBool aFocus); - void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags); - void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags, TInt aGroupId); - void DoRemoveFromStack(CCoeControlStack* aStack,CCoeControl* aControl,TRemoveCondition aRemoveCondition=ERemoveUnconditionally); - void DoUpdateStackedControlFlags(CCoeControlStack* aStack,CCoeControl* aControl,TInt aFlags,TInt aMask); -public: -/**Monitor function for passing all windows events to registered monitor observers for optional inspection*/ - void MonitorWsEvent(const TWsEvent& aEvent); -private: - class CExtra; - friend class CExtra; - friend class CTestDriver; -protected: - CCoeEnv* iCoeEnv; -private: - CCoeViewManager* iViewManager; - CCoeControlStack* iStack; - CExtra* iExtra; - TInt iCCoeAppUi_Reserved1; - }; - - -#endif // __COEAUI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coeccntx.h --- a/epoc32/include/coeccntx.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COECCNTX_H__ -#define __COECCNTX_H__ - -#include -#include -#include - -/** Interface to allow sharing of graphics settings between controls. - -The interface provides functions to set the graphics context of a control -before drawing. If a control has its iContext member set, the UI Control Framework -calls functions defined by this interface when a control is about to be drawn. -Developers must implement PrepareContext(), which is called by the framework, -to initialise the control's window with the required graphics settings. - -To use control contexts, a control should inherit from an MCoeControlContext-derived -class. To share the context between controls, this control should then be -set as the context for all controls that wish to share it. This is done by -setting the iContext member of each of the controls, using CCoeControl::SetControlContext() -and CCoeControl::CopyControlContextFrom(). - -@publishedAll -@released */ -class MCoeControlContext - { -public: - IMPORT_C virtual void ActivateContext(CWindowGc& aGc,RDrawableWindow& aWindow) const; - IMPORT_C virtual void ResetContext(CWindowGc& aGc) const; - IMPORT_C virtual void PrepareContext(CWindowGc& aGc) const; -protected: - IMPORT_C MCoeControlContext(); - -private: - IMPORT_C virtual void MCoeControlContext_Reserved1(); - IMPORT_C virtual void MCoeControlContext_Reserved2(); - -private: - TInt iMCoeControlContext_Reserved1; - }; - -/** Brush and pen graphics context. - -This class allows an MCoeControlContext to be instantiated and used to set -brush and pen properties before drawing a control. - -@publishedAll -@released */ -class CCoeBrushAndPenContext : public CBase, public MCoeControlContext - { -public: - IMPORT_C static CCoeBrushAndPenContext* NewL(); - // - IMPORT_C void SetBrushStyle(CWindowGc::TBrushStyle aBrushStyle); - IMPORT_C void SetBrushColor(TRgb aColor); - IMPORT_C void SetBrushBitmap(const CFbsBitmap& aBitmap); - IMPORT_C void SetPenColor(TRgb aColor); - // - IMPORT_C CWindowGc::TBrushStyle BrushStyle() const; - IMPORT_C TRgb BrushColor() const; - IMPORT_C const CFbsBitmap& BrushBitmap() const; - IMPORT_C TRgb PenColor() const; -protected: // from MCoeControlContext - IMPORT_C void PrepareContext(CWindowGc& aGc) const; -private: - CCoeBrushAndPenContext(); -private: - CWindowGc::TBrushStyle iBrushStyle; - TRgb iBrushColor; - const CFbsBitmap* iBitmap; - TRgb iPenColor; - }; - - -/** Protocol for sharing brush settings used in graphics operations. - -It can be used to set brush and pen properties before drawing a control. - -The mixin provides a default implementation of a control context. It implements -PrepareContext() to initialise brush settings used in graphics operations. -Its data members are public so that the brush style, brush colour and brush -pattern can be set by application code. - -@publishedAll -@deprecated */ -class MCoeControlBrushContext : public MCoeControlContext - { -public: - /** Cause vtable & typeinfo to be exported */ - IMPORT_C MCoeControlBrushContext(); -protected: // from MCoeControlContext - IMPORT_C void PrepareContext(CWindowGc& aGc) const; -public: - /** Brush style. (Not required if iBitmap is set.) */ - CWindowGc::TBrushStyle iBrushStyle; - /** Brush colour. (Not required if iBitmap is set.) */ - TRgb iBrushColor; - /** Brush pattern. */ - const CFbsBitmap* iBitmap; - -private: - TInt iMCoeControlBrushContext_Reserved1; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coecntrl.h --- a/epoc32/include/coecntrl.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,418 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COECNTRL_H__ -#define __COECNTRL_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include // class TCoeColorUse - -class TResourceReader; -class CCoeEnv; -class MCoeControlContext; -class RCoeDynamicDataStorage; - -class MCoeLayoutManager; -class TCoeZoomWithType; -class CCoeFontProvider; - -// forward declarations. -class CCoeControl; -class CCoeTextDrawerBase; - -/** Interface to be used if a control elects to be a background drawer. - -Parent controls can elect to take responsibility for drawing the background for their child -controls. To achieve this, they should aggregate an object that implements this interface. -CCoeControl::SetBackground() accepts the object and sets it as the background drawer - -@see CCoeControl::EnableWindowTransparency() -@publishedAll -@released -*/ -class MCoeControlBackground - { -public: - /** Draw the background for a given control. - The text drawer that shall be used to draw text on the specific background can be - fetched through the GetTextDrawer() method. - - @param aGc Graphics context used for drawing - @param aControl The control being drawn (may be a child of the drawer) - @param aRect The area to be redrawn - - @publishedAll - @released - */ - virtual void Draw(CWindowGc& aGc, const CCoeControl& aControl, const TRect& aRect) const = 0; - /** - This function retrieves the text drawer associated with the background. - @param aTextDrawer The text drawer associated with the background. This may be null. The default implementation - always sets this to 0. - @param aDrawingControl The control that is requesting the text drawer. - */ - IMPORT_C virtual void GetTextDrawer(CCoeTextDrawerBase*& aTextDrawer, const CCoeControl* aDrawingControl) const; -protected: - IMPORT_C MCoeControlBackground(); -private: - IMPORT_C virtual void MCoeControlBackground_Reserved1(); - IMPORT_C virtual void MCoeControlBackground_Reserved2(); - IMPORT_C virtual void MCoeControlBackground_Reserved3(); - IMPORT_C virtual void MCoeControlBackground_Reserved4(); - IMPORT_C virtual void MCoeControlBackground_Reserved5(); -private: - TInt iMCoeControlBackground_Reserved1(); - }; - -/** Abstract interface for defining a control's hit region. - -This could be implemented by a CCoeControl-derived class to -define hit region checking. The object is installed by calling CCoeControl::SetHitTest(). - -The hit region is the area inside the control's rectangle in which pointer events are handled. -It can be any shape, not necessarily rectangular. - -@publishedAll -@released -*/ -class MCoeControlHitTest - { -public: - /** Tests whether a pointer event occurred inside the control's hit region. - This function is called by CCoeControl::HandlePointerEventL(). - - @param aPoint The position of the pointer event. - @return ETrue if the specified point lies inside the hit region, EFalse if not. - - @publishedAll - @released - */ - virtual TBool HitRegionContains(const TPoint& aPoint, const CCoeControl& aControl) const = 0; -protected: - IMPORT_C MCoeControlHitTest(); -private: - IMPORT_C virtual void MCoeControlHitTest_Reserved1(); - IMPORT_C virtual void MCoeControlHitTest_Reserved2(); -private: - TInt iMCoeControlHitTest_Reserved1; - }; - - -/** -Control base class from which all other controls are derived. - -@publishedAll -@released -*/ -class CCoeControl : public CBase, public MObjectProvider - { -public: - enum TZoomType - { - EAbsoluteZoom, // absolute - ERelativeZoom // relative to parent's zoom - }; -public: - // Construction and destruction - IMPORT_C CCoeControl(); - IMPORT_C CCoeControl(CCoeEnv* aCoeEnv); - IMPORT_C ~CCoeControl(); - IMPORT_C TBool ComponentArrayExists() const; -public: // Virtuals (see more related non-virtuals further down) - // Key input - IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); - // Visual state - IMPORT_C virtual void MakeVisible(TBool aVisible); - IMPORT_C virtual void SetDimmed(TBool aDimmed); - // Construction - IMPORT_C virtual void SetContainerWindowL(const CCoeControl& aContainer); - IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aReader); - IMPORT_C virtual void ActivateL(); - // Focus - IMPORT_C virtual void PrepareForFocusLossL(); - IMPORT_C virtual void PrepareForFocusGainL(); - // Control proximity - IMPORT_C virtual void SetAdjacent(TInt aAdjacent); - IMPORT_C virtual void SetNeighbor(CCoeControl* aNeighbor); - IMPORT_C virtual TBool HasBorder() const; // deprecated from 9.2 - // Control size - IMPORT_C virtual TSize MinimumSize(); - // Resource change handling - IMPORT_C virtual void HandleResourceChange(TInt aType); - // Logical color use (for Java) - IMPORT_C virtual void GetColorUseListL(CArrayFix& aColorUseList) const; - // User help - IMPORT_C virtual void GetHelpContext(TCoeHelpContext& aContext) const; - // Text input - IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const; -public: - // Environment - inline CCoeEnv* ControlEnv() const; - // Container window - IMPORT_C RDrawableWindow* DrawableWindow() const; - IMPORT_C TBool OwnsWindow() const; - IMPORT_C TBool IsBackedUp() const; - IMPORT_C void SetContainerWindowL(RWindow& aWindow); // deprecated from 9.2 - IMPORT_C void SetContainerWindowL(RBackedUpWindow& aWindow); // deprecated from 9.2 - // Control parent - IMPORT_C CCoeControl* Parent(); - IMPORT_C const CCoeControl* Parent() const; - IMPORT_C virtual TInt SetParent(CCoeControl* aParent); - // Size and position - IMPORT_C TRect Rect() const; - IMPORT_C void SetRect(const TRect& aRect); - IMPORT_C void SetExtent(const TPoint& aPosition,const TSize& aSize); - IMPORT_C void SetExtentToWholeScreen(); - IMPORT_C TSize Size() const; - IMPORT_C void SetSize(const TSize& aSize); - IMPORT_C TPoint Position() const; - IMPORT_C TPoint PositionRelativeToScreen() const; - IMPORT_C void SetPosition(const TPoint& aPosition); - IMPORT_C TInt MaximumWidth() const; - IMPORT_C TInt SetMaximumWidth(TInt aMaxWidth); - // Layout - IMPORT_C MCoeLayoutManager* LayoutManager() const; - IMPORT_C virtual void SetLayoutManagerL(MCoeLayoutManager* aLayout); - IMPORT_C virtual TBool RequestRelayout(const CCoeControl* aChildControl); - // Visibility - IMPORT_C TBool IsVisible() const; - IMPORT_C void SetComponentsToInheritVisibility(TBool aInherit=ETrue); - // Dimmed - IMPORT_C TBool IsDimmed() const; - // State observer - IMPORT_C void SetObserver(MCoeControlObserver* aObserver); - IMPORT_C MCoeControlObserver* Observer() const; - // Focus - IMPORT_C TBool IsFocused() const; - IMPORT_C void SetFocus(TBool aFocus,TDrawNow aDrawNow=ENoDrawNow); - IMPORT_C void SetNonFocusing(); - IMPORT_C void SetFocusing(TBool aFocusing); - IMPORT_C TBool IsNonFocusing() const; - // Drawing (see also Draw() below) - IMPORT_C void DrawNow() const; - IMPORT_C void DrawNow(const TRect &aRect) const; - IMPORT_C void DrawDeferred() const; - IMPORT_C CWindowGc& SystemGc() const; - IMPORT_C TInt SetCustomGc(CWindowGc* aGraphicsContext); - IMPORT_C CWindowGc* CustomGc() const; - // Control context (background color etc). Deprecated (use MCoeControlBackground) - IMPORT_C void SetControlContext(MCoeControlContext* aContext); // deprecated from 9.2 - IMPORT_C void CopyControlContextFrom(const CCoeControl* aControl); // deprecated from 9.2 - IMPORT_C MCoeControlContext* ControlContext() const; // deprecated from 9.2 - // Pointer events - IMPORT_C void SetPointerCapture(TBool aCapture=ETrue); - IMPORT_C void ClaimPointerGrab(TBool aSendUpEvent=ETrue); - IMPORT_C void IgnoreEventsUntilNextPointerUp(); - IMPORT_C void SetGloballyCapturing(TBool aGlobal); - // Pointer hit test - IMPORT_C TInt SetHitTest(const MCoeControlHitTest* aHitTestControl); - IMPORT_C const MCoeControlHitTest* HitTest() const; - // Logical colors - IMPORT_C void OverrideColorL(TInt aLogicalColor,TRgb aColor); - IMPORT_C TBool GetColor(TInt aLogicalColor,TRgb& aColor) const; - // Control background - IMPORT_C void DrawBackground(const TRect& aRect) const; - IMPORT_C void DrawForeground(const TRect& aRect) const; - IMPORT_C const MCoeControlBackground* Background() const; - IMPORT_C const MCoeControlBackground* FindBackground() const; - IMPORT_C void SetBackground(const MCoeControlBackground* aBackground); - // Zooming - IMPORT_C void SetZoomFactorL(TInt aZoomFactor, TZoomType aZoomType = ERelativeZoom); - IMPORT_C TZoomFactor AccumulatedZoom() const; - IMPORT_C const TCoeZoomWithType* ZoomWithType() const; - // Font provider (see ScreenFont() below) - IMPORT_C const CCoeFontProvider& FindFontProvider() const; - IMPORT_C void SetFontProviderL(const CCoeFontProvider& aFontProvider); - // Text baseline (virtuals) - IMPORT_C virtual TInt TextBaselineOffset(const TSize& aSize) const; - IMPORT_C virtual void SetTextBaselineSpacing(TInt aSpacing); - // Input capabilities - IMPORT_C TCoeInputCapabilities RecursivelyMergedInputCapabilities() const; - // Interface access - IMPORT_C void SetMopParent(MObjectProvider* aParent); - // Instance identification - IMPORT_C TInt UniqueHandle() const; - IMPORT_C TInt SetUniqueHandle(TInt aUniqueHandle); -public: // Pointer events (virtuals) - IMPORT_C virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent); -protected: // Virtuals. Override to handle these events. - IMPORT_C virtual void HandlePointerBufferReadyL(); // See HandlePointerEventL() - // Change of focus - IMPORT_C virtual void FocusChanged(TDrawNow aDrawNow); - // Change of size and position - IMPORT_C virtual void SizeChanged(); - IMPORT_C virtual void PositionChanged(); -public: - // Component control access - IMPORT_C virtual TInt CountComponentControls() const; - IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const; - IMPORT_C TInt Index(const CCoeControl* aControl) const; -protected: - // Control state - IMPORT_C TBool IsActivated() const; - IMPORT_C TBool IsBeingDestroyed() const; - // Component ownership - IMPORT_C void InitComponentArrayL(); - IMPORT_C CCoeControlArray& Components(); - IMPORT_C const CCoeControlArray& Components() const; - // Container window - IMPORT_C RWindow& Window() const; - IMPORT_C RBackedUpWindow& BackedUpWindow() const; - IMPORT_C void CloseWindow(); - IMPORT_C void CreateWindowL(); - IMPORT_C void CreateWindowL(const CCoeControl* aParent); - IMPORT_C void CreateWindowL(RWindowTreeNode& aParent); - IMPORT_C void CreateWindowL(RWindowGroup* aParent); - IMPORT_C void CreateBackedUpWindowL(RWindowTreeNode& aParent); - IMPORT_C void CreateBackedUpWindowL(RWindowTreeNode& aParent,TDisplayMode aDisplayMode); - IMPORT_C void EnableWindowTransparency(); - // Size and position - IMPORT_C void SetCornerAndSize(TGulAlignment aCorner,const TSize& aSize); - IMPORT_C void SetSizeWithoutNotification(const TSize& aSize); - // Font access - IMPORT_C const CFont& ScreenFont(const TCoeFont& aFont) const; - // Text drawer - IMPORT_C CCoeTextDrawerBase& TextDrawer(TInt aKey = KErrNotFound) const; - // Pointer events - IMPORT_C void EnableDragEvents(); - IMPORT_C void HandleRedrawEvent(const TRect& aRect) const; - IMPORT_C void SetAllowStrayPointers(); - IMPORT_C CCoeControl* GrabbingComponent() const; - IMPORT_C TBool CapturesPointer() const; - // Drawing - IMPORT_C TBool IsReadyToDraw() const; - IMPORT_C TBool IsBlank() const; - IMPORT_C void SetBlank(); - IMPORT_C void SetCanDrawOutsideRect(); - IMPORT_C void ActivateGc() const; - IMPORT_C void DeactivateGc() const; - IMPORT_C void ResetGc() const; - // State events - IMPORT_C void ReportEventL(MCoeControlObserver::TCoeEvent aEvent); - // Resource changes - IMPORT_C void HandleComponentControlsResourceChange(TInt aType); - // Copy Constructor and Assignment Operator - inline CCoeControl(const CCoeControl& aControl); - inline CCoeControl& operator=(const CCoeControl& aControl); -protected: - friend class CCoeControlArray; - IMPORT_C virtual void HandleControlArrayEventL(CCoeControlArray::TEvent aEvent, const CCoeControlArray* aArray, CCoeControl* aControl, TInt aControlId); -private: // reserved - IMPORT_C virtual void Reserved_CCoeControl_10(); - IMPORT_C virtual void Reserved_CCoeControl_11(); - IMPORT_C virtual void Reserved_CCoeControl_12(); - IMPORT_C virtual void Reserved_CCoeControl_13(); -private: - IMPORT_C virtual void GetTextDrawer(CCoeTextDrawerBase*& aTextDrawer, const CCoeControl* aDrawingControl, TInt aKey) const; -private: // reserved - IMPORT_C virtual void Reserved_CCoeControl_8(); - IMPORT_C virtual void Reserved_CCoeControl_9(); -protected: // from MObjectProvider - IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId); -private: // from MObjectProvider - IMPORT_C MObjectProvider* MopNext(); -private: - // Drawing (override this to draw) - IMPORT_C virtual void Draw(const TRect& aRect) const; -protected: - // Debugging - IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const; -private: // reserved - IMPORT_C virtual void Reserved_2(); -public: // but not exported - void ProcessPointerEventL(const TPointerEvent& aPointerEvent); - void ProcessPointerBufferReadyL(); - void RecursivelyMergeInputCapabilities(TCoeInputCapabilities& aInputCapabilities) const; - void WriteInternalStateNowL(RWriteStream& aWriteStream) const; - void NotifyFontChange(const CCoeFontProvider* aFontProvider); - void RemoveFromParent(); - void RefetchPixelMappingL(); -public: // deprecated - inline TInt SetGc(CWindowGc* aGraphicsContext) const; - inline CWindowGc* GetGc() const; -private: - friend class CCoeRedrawer; - void DrawComponents(const TRect& aRect) const; - void DrawWindowOwningComponentsNow() const; - void DrawWindowOwningComponentsNow(const TRect &aRect) const; - void SetGrabbed(TBool aGrabbed); - TBool IsGrabbed() const; - void DoMakeVisible(TBool aVisible); - void CheckPointerEventPurge() const; - void RecursivelyMergeTextDrawers(CCoeTextDrawerBase*& aTextDrawer, const CCoeControl* aDrawingControl, TInt aKey) const; - CCoeControl* WindowOwningParent(); - const CCoeControl* WindowOwningParent() const { return const_cast(this)->WindowOwningParent(); } - const CCoeControl* SearchParent(const CCoeControl* aParentToFind) const; - TInt SetZoomWithType(TCoeZoomWithType* aZoomWithType); - TCoeZoomWithType* GetZoomWithType() const; - TInt SetFontProvider(const CCoeFontProvider* aFontProvider); - const CCoeFontProvider* GetFontProvider() const; - TInt FindColor(TInt aLogicalColor) const; - void ActivateGcRecursive() const; - void DeactivateGcRecursive() const; - void ReportControlStateChange(MCoeControlStateObserver::TCoeState aType); -public: - IMPORT_C void EnableReportControlStateChange(TBool aState); - -protected: - CCoeEnv* iCoeEnv; - MCoeControlContext* iContext; // deprecated - TPoint iPosition; - TSize iSize; -private: - TInt iFlags; - RDrawableWindow* iWin; - RCoeDynamicDataStorage* iData; - MObjectProvider* iMopParent; - }; - - -/** -Gets the control environment object for this control. - -@return The control's control environment object. -*/ -inline CCoeEnv* CCoeControl::ControlEnv() const - { return(iCoeEnv); } - -/** -Deprecated. See CCoeControl::SetCustomGc(). -@deprecated -*/ -inline TInt CCoeControl::SetGc(CWindowGc* aGraphicsContext) const - { return const_cast(this)->SetCustomGc(aGraphicsContext); } - -/** -Deprecated. See CCoeControl::CustomGc(). -@deprecated -*/ -inline CWindowGc* CCoeControl::GetGc() const - { return CustomGc(); } - - -#endif // __COECNTRL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coecobs.h --- a/epoc32/include/coecobs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COECOBS_H__ -#define __COECOBS_H__ - -#include -#include - -class CCoeControl; - -class MCoeControlObserver -/** Interface for a control to send events to its observer control. - -@publishedAll -@released */ - { -public: - /** Observer event types. */ - enum TCoeEvent - { - /** Request exit. - This event is used to indicate exit from a mode when - the user has completed an operation 'successfully'. For example, this - event might be sent when the user has a choice list open and presses - enter to select an item. The UI Control Framework does not use this - event itself. */ - EEventRequestExit, - /** Request cancel. - This event is used to indicate exit from a mode when the user has cancelled - the operation that caused entry into the mode originally. For example, this - event might be sent when the user presses escape to close the list and leave - the choice as it was. The UI Control Framework does not use this event itself. */ - EEventRequestCancel, - /** Request focus. - This event is notified by the UI Control Framework during pointer down event - processing after EEventPrepareFocusTransition is handled. */ - EEventRequestFocus, - /** Prepare focus transition. - This event is notified by the UI Control Framework during pointer down event - processing if the control does not yet have, but could get, focus. */ - EEventPrepareFocusTransition, - /** State changed. - This event can be used by a control to report that some piece of internal - data has changed, and hence that any observer should be notified accordingly. - The UI Control Framework does not use this value itself. */ - EEventStateChanged, - /** Interaction refused. - This event is notified by the UI Control Framework during pointer down event - processing if the control is dimmed (disabled). */ - EEventInteractionRefused - }; -public: - /** Handles an event from an observed control. - - This function is called when a control for which this control is the observer - calls CCoeControl::ReportEventL(). It should be implemented by the observer - control, and should handle all events sent by controls it observes. - - @param aControl The control that sent the event. - @param aEventType The event type. */ - virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)=0; -protected: - IMPORT_C MCoeControlObserver(); - -private: - IMPORT_C virtual void MCoeControlObserver_Reserved1(); - IMPORT_C virtual void MCoeControlObserver_Reserved2(); - -private: - TInt iMCoeControlObserver_Reserved1; - }; - -class MCoeControlStateObserver -/** This class defines an interface which will given notification of when a CCoeControl -changes its visibility or dimmed state. - -@publishedAll -@released */ - { - friend class CCoeControl; -public: - /** The MObjectProvider framework should use this UID to know when to return a concrete instance of this interface. */ - DECLARE_TYPE_ID(0x10285A45) - enum TCoeState - { - /** This enum is used to say that the control has changed its Dimmed state */ - EStateDimmed, - /** This enum is used to say that the control has changed its Visibility state */ - EStateVisibility - }; -private: - /** - If an object implementing this interface has been attached to the MObjectProvider - hierarchy in which a CCoeControl is a member, any call to the CCoeControl's - SetDimmed() or MakeVisible() (that results in an actual state change) will trigger - a call to this interface. - - @param aControl A pointer to the control that has changed. - @param aState An enum from TCoeState to say how the control has changed. - @return A system wide error code, currently ignored but may not be in future.*/ - virtual TInt HandleControlStateChange(CCoeControl* aControl,TCoeState aState)=0; - }; - -#endif // __COECOBS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coecoloruse.h --- a/epoc32/include/coecoloruse.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COECOLORUSE_H__ -#define __COECOLORUSE_H__ - -#include - -/** Logical colour used when drawing in controls. - -This class pairs a logical colour value with an explanation of how it is used -when drawing a control. The explanation is in terms of categories of use, e.g. -in the TGround category, the colour can used for either the foreground or -background. - -@publishedAll -@released */ -class TCoeColorUse - { -public: - /** Foreground and background category flags */ - enum TGround - { - /** The logical colour is used to draw the control when it is in the foreground. */ - EFore=0x01, - /** The logical colour is used to draw the control when it is in the background. */ - EBack=0x02 - }; - - /** Flags that control the area in which colour is used. */ - enum TAreas - { - /** The logical colour is used to draw a control's contents. */ - EContents=0x10, - /** The logical colour is used to draw a control's highlighted contents. */ - EHighlights=0x20, - /** The logical colour is used to draw a control's surrounds. */ - ESurrounds=0x40, - /** The logical colour is used to draw a control's borders. */ - EBorders=0x80 - }; - - /** Focus category flags */ - enum TFocus - { - /** The logical colour is used to draw the control when active and either focused - or unfocused. */ - EActive=0x100, - /** The logical colour is used to draw the control when dimmed and either focused - or unfocused. */ - EDimmed=0x200, - /** The logical colour is used to draw the control when it is shadowed. */ - EShadowed=0x400, - /** The logical colour is used to draw the control when focused and pressed. */ - EPressed=0x800 - }; - - /** State category flags */ - enum TState - { - /** The logical colour is used to draw the control in the normal state. */ - ENormal=0x1000, - /** The logical colour is used to draw the control in the set state. */ - ESet=0x2000, - /** The logical colour is used to draw the control in the checked state. */ - EChecked=0x4000 - }; - - /** Tone flags */ - enum TTones - { - /** The logical colour is used to draw the control in neutral tones. */ - ENeutral=0x10000, - /** The logical colour is used to draw the control in light tones. */ - ELight=0x20000, - /** The logical colour is used to draw the control in midlight tones. */ - EMidLight=0x40000, - /** The logical colour is used to draw the control in mid tones. */ - EMid=0x80000, - /** The logical colour is used to draw the control in dark tones. */ - EDark=0x100000 - }; -public: - IMPORT_C TCoeColorUse(); - // - IMPORT_C void SetUse(TInt aUse); - IMPORT_C void SetLogicalColor(TInt aLogicalColor); - IMPORT_C TInt LogicalColor() const; - IMPORT_C TInt Use() const; - // - IMPORT_C TBool IsForeground() const; - IMPORT_C TBool IsBackground() const; - // - IMPORT_C TBool IsContents() const; - IMPORT_C TBool IsHighlights() const; - IMPORT_C TBool IsSurrounds() const; - IMPORT_C TBool IsBorders() const; - IMPORT_C TBool IsActive() const; - IMPORT_C TBool IsDimmed() const; - IMPORT_C TBool IsPressed() const; - IMPORT_C TBool IsNormal() const; - IMPORT_C TBool IsSet() const; -private: - TInt iLogicalColor; - TInt iUse; - TInt iTCoeColorUse_Reserved1; - }; - - -#endif // __COECOLORUSE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coecontrolarray.h --- a/epoc32/include/coecontrolarray.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#ifndef __COECONTROLARRAY_H__ -#define __COECONTROLARRAY_H__ - -#include // class CBase - -class CCoeControl; - -/** Default id for controls that have no associated id. This is equal -to KErrNotFound -@publishedAll -@released -*/ -const TInt KCoeNoControlId = KErrNotFound; - -/** Class that encapsulates a control and the identifier for that control. - -Controls in a CCoeControlArray can be associated with an id. This class encapsulates the control and its id. - -@publishedAll -@released */ -class TCoeControlWithId - { -public: - TCoeControlWithId(TInt aControlId, CCoeControl* aControl = NULL); -public: - /** The control */ - CCoeControl* iControl; - /** The id of the control */ - TInt iId; - }; - -/** Class that represents an array of controls. - -The CCoeControlArray class is used to store the child controls of a container control. -The method CCoeControl::InitComponentArrayL() must be used to create the array and the method -CCoeControlArray& CCoeControl::Components() can be used to get this array. - -@publishedAll -@released */ -class CCoeControlArray : public CBase - { -public: - /** This class is an iterator for the CCoeControlArray class. - @publishedAll - @released - */ - class TCursor // robust iterator - { - public: - template T* Control(); - template const T* Control() const; - IMPORT_C TBool Prev(); - IMPORT_C TBool Next(); - IMPORT_C TBool IsValid() const; - - IMPORT_C TBool operator==(const TCursor& aCursor) const; - IMPORT_C TBool operator!=(const TCursor& aCursor) const; - public: - TCursor(const CCoeControlArray& aArray, TInt aIndex); - TInt Index() const; - private: - IMPORT_C CCoeControl* Ctrl() const; - void UpdateMemento() const; - void UpdateIndex() const; - private: - const CCoeControlArray* iArray; - mutable TInt iIndex; - mutable TCoeControlWithId iMemento; - }; -public: - IMPORT_C static CCoeControlArray* NewL(CCoeControl& aOwner); - IMPORT_C ~CCoeControlArray(); - IMPORT_C TInt Count() const; - IMPORT_C void Reset(); - IMPORT_C void ResetAndDestroy(); - IMPORT_C void SortById(); - - IMPORT_C TBool ControlsOwnedExternally() const; - IMPORT_C void SetControlsOwnedExternally(TBool aOwnedExternally); - - IMPORT_C TBool IsArrayLocked() const; - IMPORT_C void SetArrayLocked(); - - template T* ControlById(TInt aControlId); - template const T* ControlById(TInt aControlId) const; - - IMPORT_C TCursor Begin() const; - IMPORT_C TCursor End() const; - IMPORT_C TCursor Find(const CCoeControl* aControl) const; - IMPORT_C TCursor Find(TInt aControlId) const; - - IMPORT_C TCursor AppendLC(CCoeControl* aControl, TInt aControlId = KCoeNoControlId); - IMPORT_C TCursor InsertAfterLC(TInt aInsertAfterId, CCoeControl* aControl, TInt aControlId = KCoeNoControlId); - IMPORT_C TCursor InsertLC(TCursor& aInsertAt, CCoeControl* aControl, TInt aControlId = KCoeNoControlId); - - IMPORT_C TInt Remove(const CCoeControl* aControl); - IMPORT_C CCoeControl* Remove(TCursor aRemoveAt); - IMPORT_C CCoeControl* RemoveById(TInt aControlId); -public: - IMPORT_C TInt Replace(CCoeControl* aOriginalControl, CCoeControl* aNewControl); - -public: // internal use only - IMPORT_C TCoeControlWithId At(TInt aIndex); - IMPORT_C const TCoeControlWithId At(TInt aIndex) const; - IMPORT_C TInt Id(const CCoeControl& aControl) const; - IMPORT_C void Sort(TLinearOrder< TCoeControlWithId > aOrder); -public: - /** Defines the possible events related to a change to the contents - of the array. */ - enum TEvent - { - /** A control has been added to the array */ - EControlAdded, - /** A control has been removed from the array */ - EControlRemoved - }; - -private: - IMPORT_C CCoeControlArray(CCoeControl& aOwner); - TInt IndexById(TInt aControlId) const; - IMPORT_C CCoeControl* CtrlById(TInt aControlId) const; - -private: - CCoeControl& iOwner; - TInt iFlags; - RArray iControls; - }; - -/** Gets the control. -@return The control at the current cursor position. -*/ -template -T* CCoeControlArray::TCursor::Control() - { - return static_cast(Ctrl()); - } - -/** Gets the control. -@return The control at the current cursor position. -*/ -template -const T* CCoeControlArray::TCursor::Control() const - { - return static_cast(Ctrl()); - } - -/** Gets the control with the given id. -@param aControlId The id of the desired control. -@return The control with the given id. -*/ -template -T* CCoeControlArray::ControlById(TInt aControlId) - { - return static_cast(CtrlById(aControlId)); - } - -/** Gets the control with the given id. -@param aControlId The id of the desired control. -@return The control with the given id. -*/ -template -const T* CCoeControlArray::ControlById(TInt aControlId) const - { - return static_cast(CtrlById(aControlId)); - } - -#endif //__COECONTROLARRAY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coedef.h --- a/epoc32/include/coedef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,138 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEDEF_H__ -#define __COEDEF_H__ - -#include -#include // only requried for limited source compatability with releases prior to 250 - -const TInt KCoeCustomColorsArrayValue=0x100057C2; -const TInt KCoeColorGray4=0x19bd6002; -const TInt KCoeColorColor16=0x19bd6003; -const TInt ECoeResourceSignatureValue=4; - -/** Event handling flags. - -These should be returned by CCoeControl::OfferKeyEventL() to indicate whether -or not a key event was processed by the control. - -@publishedAll -@released */ -enum TKeyResponse - { - /** The key event was not handled. */ - EKeyWasNotConsumed, - /** The key event was handled. */ - EKeyWasConsumed - }; - -/** Control redraw flags. - -Passed to CCoeControl::SetFocus() to indicate the requirements for control -redrawing. - -@publishedAll -@released */ -enum TDrawNow - { - /** Redraw of the control is not required immediately. */ - ENoDrawNow, - /** Redraw control immediately. */ - EDrawNow - }; - -/** Window priority values. - -These are passed in the aOrdinalPriority argument to RWindowTreeNode::SetOrdinalPosition(). - -@publishedAll -@released */ -enum TCoeWinPriority - { - /** -1000 */ - ECoeWinPriorityNeverAtFront =-1000, - /** -750 */ - ECoeWinPriorityLow =-750, - /** 0 */ - ECoeWinPriorityNormal =0, - /** 500 */ - ECoeWinPriorityMedium =500, - /** 750 */ - ECoeWinPriorityHigh =750, - /** 900 */ - ECoeWinPriorityFep =900, - /** 1000 */ - ECoeWinPriorityAlwaysAtFront =1000 - }; - -/** The message UID sent when a colour scheme change event occurs. - -@internalTechnology */ -const TInt KUidValueCoeColorSchemeChangeEvent =0x100056C4; -const TInt KUidValueCoeZoomChangeEvent =0x100057C3; -const TInt KUidValueCoeFontChangeEvent =0x100057C4; - -/** @internalTechnology */ -const TUint KUidFepFrameworkRepository=0x10272618; - -/** @internalTechnology */ -enum // key-masks and keys for the "KUidFepFrameworkRepository" repository - { - ERepositoryKeyMask_DefaultSetting =0x00001000, - ERepositoryKeyMask_DynamicSetting =0x00002000, - - ERepositoryKeyMask_FepId =0x00000001, - ERepositoryKeyMask_OnState =0x00000002, - ERepositoryKeyMask_OnKeyData =0x00000004, - ERepositoryKeyMask_OffKeyData =0x00000008, - - ERepositoryKey_DefaultFepId =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_FepId, - ERepositoryKey_DefaultOnState =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_OnState, - ERepositoryKey_DefaultOnKeyData =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_OnKeyData, - ERepositoryKey_DefaultOffKeyData =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_OffKeyData, - - ERepositoryKey_DynamicFepId =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_FepId, - ERepositoryKey_DynamicOnState =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_OnState, - ERepositoryKey_DynamicOnKeyData =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_OnKeyData, - ERepositoryKey_DynamicOffKeyData =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_OffKeyData - }; - -/** @internalTechnology */ -#if defined(_DEBUG) -#define __DEBUG_CHECK_HEAP_INTEGRITY User::Heap().Check() -#else -#define __DEBUG_CHECK_HEAP_INTEGRITY -#endif - -/** Control key modifier. - -Key codes get changed when the Ctrl key modifier is pressed at the same time as the key . -The CTRL macro is used to shift the key character appropriately. - -Note: this is not an inline function since that can't be used as the case of a switch -statement. - -@publishedAll -@released */ -#define CTRL(x) ((x)-'a'+1) - -/** Constant that represents all standard keyboard modifier keys. - -@publishedAll -@released */ -#define EAllStdModifiers (EModifierFunc|EModifierCtrl|EModifierShift) - -#endif // __COEDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coeerror.h --- a/epoc32/include/coeerror.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEERROR_H__ -#define __COEERROR_H__ - -/** -@internalTechnology -*/ -#define KUidConeDllValue16 0x10003a41 - -/** -@internalTechnology -*/ -const TUid KUidConeDll16={KUidConeDllValue16}; - - -#if defined(_UNICODE) -/** -@internalTechnology -*/ -#define KUidConeDllValue KUidConeDllValue16 -/** -@internalTechnology -*/ -const TUid KUidConeDll={KUidConeDllValue}; -#else -#define KUidConeDllValue KUidConeDllValue8 -const TUid KUidConeDll={KUidConeDllValue}; -#endif - - -/** UI Control Framework errors. - -@publishedAll -@deprecated */ -enum - { - /** Not used. */ - KErrCoeResourceFileDuplicateOffset, - /** Read fail. CCoeEnv::ReadResource() sets this as the - active scheduler's extended error number if the read fails. */ - KErrCoeFailedToReadFromProgDisk - }; - -#endif // __COEERROR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coefepff.h --- a/epoc32/include/coefepff.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEFEPFF_H__ -#define __COEFEPFF_H__ - -#include - -class CCoeFepParameters; -class CCoeFep; - -/** FEP factory function which must be exported by every FEP. - -The function is called by the UI Control Framework when it loads the -FEP. It returns a fully constructed object of a CCoeFep-derived class, -and passes ownership of that object to the caller. - -The function can leave with any of the system-wide error codes, -for instance KErrNoMemory. - -@publishedAll -@released -@param aConeEnvironment A reference to the application's control environment. -@param aFullFileNameOfDll The full file name of the FEP's top-level DLL, i.e. -something like "z:\system\fep\TFEP1.FEP". A FEP could use this parameter to -work out the location of its resource file. -@param aFepParameters FEP parameters. These should simply be passed to -CCoeFep::BaseConstructL(). -@return A pointer to the newly created object belonging to a -CCoeFep-derived class. */ -IMPORT_C CCoeFep* NewFepL(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll, const CCoeFepParameters& aFepParameters); - -/** Runs the FEP settings dialog. - -The function is called by the FEPs control panel plug-in in order -to run the settings dialog for the FEP. It must be exported by -every FEP. - -The function can leave with any of the system-wide error codes, -for instance KErrNoMemory. - -Note: the FEP may or may not be loaded when this function is called. - -@publishedAll -@released -@param aConeEnvironment A reference to the application's control environment. -@param aFullFileNameOfDll The full file name of the FEP's top-level DLL, i.e. -something like "z:\system\fep\TFEP1.FEP". */ -IMPORT_C void SynchronouslyExecuteSettingsDialogL(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll); -IMPORT_C void Reserved_1(); -IMPORT_C void Reserved_2(); -IMPORT_C void Reserved_3(); -IMPORT_C void Reserved_4(); -IMPORT_C void Reserved_5(); -IMPORT_C void Reserved_6(); -IMPORT_C void Reserved_7(); -IMPORT_C void Reserved_8(); - -#endif // __COEFEPFF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coefont.h --- a/epoc32/include/coefont.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEFONT_H__ -#define __COEFONT_H__ - -#include -#include - -/** A class to simplify font usage - -@publishedAll -@released -*/ -class TCoeFont - { -public: - enum TFlags - { - ENoFlags = 0x00, - ENonZooming = 0x01 - }; - - enum TLogicalSize - { - EExtraSmall = 0, - ESmall, - EMedium, - ELarge, - EExtraLarge, - EUndefinedSize = -1 - }; - - enum TStyle - { - EPlain = 0x00, - EItalic = 0x01, - EBold = 0x02, - ESuper = 0x04, - ESub = 0x08 - }; - -public: - IMPORT_C TCoeFont(TLogicalSize aSize, TInt aStyle, TInt aFlags = ENoFlags); - IMPORT_C TCoeFont(TInt aHeightInPixels, TInt aStyle, TInt aFlags = ENoFlags); - IMPORT_C TCoeFont(const TCoeFont& aFont); - IMPORT_C TCoeFont(); - IMPORT_C static TCoeFont NormalFont(TInt aFlags = ENoFlags); // Medium, Plain - IMPORT_C static TCoeFont LegendFont(TInt aFlags = ENoFlags); // Medium, Bold - IMPORT_C static TCoeFont AnnotationFont(TInt aFlags = ENoFlags);// Small, Plain - IMPORT_C static TCoeFont TitleFont(TInt aFlags = ENoFlags); // Large, Bold -public: // properties - IMPORT_C TLogicalSize LogicalSize() const; - IMPORT_C TInt HeightInPixels() const; - IMPORT_C TFontStyle Style() const; - IMPORT_C TBool IsNonZooming() const; -public: - static TInt Compare(const TCoeFont& aFirst, const TCoeFont& aSecond); -private: - TLogicalSize iLogicalSize; - TInt8 iHeightInPixels; - TInt8 iStyle; - TInt8 iFlags; - TTypeface iTypeface; // Member unused at the moment but included for possible future extension -private: - TInt iSpare; - }; - -#endif // __COEFONT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coefontprovider.h --- a/epoc32/include/coefontprovider.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEFONTPROVIDER_H__ -#define __COEFONTPROVIDER_H__ - -#include -#include -#include -#include -#include -#include - -/** A helper object designed to make obtaining a font easier, taking into account -zoom factors. - -@publishedAll -@released -*/ -class CCoeFontProvider : public CBase - { -public: // life - IMPORT_C static CCoeFontProvider* NewL(); - IMPORT_C static CCoeFontProvider* NewL(const TDesC& aTypefaceName); - ~CCoeFontProvider(); -public: // methods - IMPORT_C const CFont& Font(const TCoeFont& aFont, const TZoomFactor& aZoomFactor) const; -public: // properties - IMPORT_C void SetTypeface(const TTypeface aTypeface); - IMPORT_C void UseSystemTypeface(); - IMPORT_C TTypeface Typeface() const; -public: //but not exported - void RefetchPixelMappingL(); - -private: - CCoeFontProvider(const TDesC& aTypefaceName); - void ConstructL(); - void ReleaseAllFonts(); -private: - class TFont - { - public: - TFont(const TCoeFont& aFontSpec, TInt aZoomFactor, const CFont* aFont = NULL); - static TInt Compare(const TFont& aFirst, const TFont& aSecond); - public: - const TCoeFont iCoeFont; - const TInt iZoomFactor; - const CFont* iFont; - }; -private: - mutable RArray iFonts; - TTypeface iTypeface; - RArray iLogicalToPixelSizes; - }; - -#endif // __COEFONTPROVIDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coehelp.h --- a/epoc32/include/coehelp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEHELP_H__ -#define __COEHELP_H__ - -#include - -/** Holds the name of the help context. - -@publishedAll -@released */ -typedef TBuf<30> TCoeContextName; - - -class TCoeHelpContext -/** Help context. - -This class contains the information required to link the control and the appropriate -context sensitive help topic. This information includes the UID of the help -file and the literal descriptor for the appropriate help topic context. - -@see CCoeControl::GetHelpContext() -@publishedAll -@released */ - { -public: - IMPORT_C TCoeHelpContext(); - IMPORT_C TCoeHelpContext(TUid aMajor,const TDesC& aContext); - IMPORT_C TBool IsNull() const; - IMPORT_C TBool operator==(const TCoeHelpContext& aContext) const; - IMPORT_C TBool operator!=(const TCoeHelpContext& aContext) const; -public: - /** The UID of the context sensitive help file containing the topic information. */ - TUid iMajor; - /** The name of the help context. This is the literal descriptor generated from - a context string by the context sensitive help compiler. */ - TCoeContextName iContext; -private: - TInt iTCoeHelpContext_Reserved1; - }; - -#endif // __COEHELP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coeinput.h --- a/epoc32/include/coeinput.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEINPUT_H__ -#define __COEINPUT_H__ - -#include - -// classes defined in FEPBASE, declared here -class MCoeFepAwareTextEditor; -class MCoeCaptionRetrieverForFep; - -class MObjectProvider; - -class TCoeInputCapabilities -/** Describes which forms of text input are consumed by a control or view. - -@publishedAll -@released */ - { -public: - /** Text input capability flags. These are used to define the text input - capabilities of a control or view. */ - enum - { - /** No text input capabilities supported. */ - ENone =0, - /** Supports positive western integers. */ - EWesternNumericIntegerPositive =0x00000001, - /** Supports negative western integers. */ - EWesternNumericIntegerNegative =0x00000002, - /** Supports real numbers. */ - EWesternNumericReal =0x00000004, - /** Supports the western alphabets. */ - EWesternAlphabetic =0x00000008, - /** Supports Hiragana. */ - EJapaneseHiragana =0x00000010, - /** Supports half width Katakana. */ - EJapaneseKatakanaHalfWidth =0x00000020, - /** Supports full width Katakana. */ - EJapaneseKatakanaFullWidth =0x00000040, - /** Supports dialable characters */ - EDialableCharacters =0x00000080, - /** Supports secret text. This is text in which characters appear - as asterisks. */ - ESecretText =0x00000100, - /** Supports auto sentence case. - This is text in which first word in a sentence begins with an uppercase letter, - with all other letters and words in lowercase. */ - EAutoSentenceCase =0x00000200, - /** Supports non-predictive input. */ - ENonPredictive =0x00000400, - /** Supports all types of text. */ - EAllText =0x01000000, - /** Supports navigation keys. These include arrow keys, page-up, - page-down, home, end, tab, etc. */ - ENavigation =0x02000000 - }; - class MCoeFepSpecificExtensions; // to be defined by concrete FEPs, declared here -public: - // all these functions are exported (rather than inline) so that binary compatibility becomes easier to maintain - IMPORT_C TCoeInputCapabilities(); - IMPORT_C TCoeInputCapabilities(TUint aCapabilities); - IMPORT_C TCoeInputCapabilities(TUint aCapabilities, MCoeFepAwareTextEditor* aFepAwareTextEditor, MCoeCaptionRetrieverForFep* aCaptionRetrieverForFep); - IMPORT_C TCoeInputCapabilities(TUint aCapabilities, MCoeFepAwareTextEditor* aFepAwareTextEditor, MCoeCaptionRetrieverForFep* aCaptionRetrieverForFep, TUid aFepUid, MCoeFepSpecificExtensions* aFepSpecificExtensions); - IMPORT_C TCoeInputCapabilities(const TCoeInputCapabilities& aAnother); // defined so that iSpareForFutureUse is not copied - IMPORT_C TCoeInputCapabilities& operator=(const TCoeInputCapabilities& aAnother); // defined so that iSpareForFutureUse is not copied - IMPORT_C TBool operator==(const TCoeInputCapabilities& aAnother) const; // defined so that iSpareForFutureUse is not tested - IMPORT_C TBool operator!=(const TCoeInputCapabilities& aAnother) const; // defined so that iSpareForFutureUse is not tested - IMPORT_C void MergeWith(const TCoeInputCapabilities& aAnother); - IMPORT_C void SetCapabilities(TUint aCapabilities); - IMPORT_C TUint Capabilities() const; - IMPORT_C TBool IsNone() const; - IMPORT_C TBool SupportsWesternNumericIntegerPositive() const; - IMPORT_C TBool SupportsWesternNumericIntegerNegative() const; - IMPORT_C TBool SupportsWesternNumericReal() const; - IMPORT_C TBool SupportsWesternAlphabetic() const; - IMPORT_C TBool SupportsJapaneseHiragana() const; - IMPORT_C TBool SupportsJapaneseKatakanaHalfWidth() const; - IMPORT_C TBool SupportsJapaneseKatakanaFullWidth() const; - IMPORT_C TBool SupportsDialableCharacters() const; - IMPORT_C TBool SupportsSecretText() const; - IMPORT_C TBool SupportsAutoSentenceCase() const; - IMPORT_C TBool SupportsNonPredictive() const; - IMPORT_C TBool SupportsAllText() const; - IMPORT_C TBool SupportsNavigation() const; - IMPORT_C MCoeFepAwareTextEditor* FepAwareTextEditor() const; - IMPORT_C MCoeCaptionRetrieverForFep* CaptionRetrieverForFep() const; - IMPORT_C MCoeFepSpecificExtensions* FepSpecificExtensions(TUid aFepUid) const; - IMPORT_C MObjectProvider* ObjectProvider() const; - IMPORT_C void SetObjectProvider(MObjectProvider* aObjectProvider); - -private: - TUint iCapabilities; - MCoeFepAwareTextEditor* iFepAwareTextEditor; - MCoeCaptionRetrieverForFep* iCaptionRetrieverForFep; - TUint iFepUid; - MCoeFepSpecificExtensions* iFepSpecificExtensions; - MObjectProvider* iObjectProvider; - TAny* iSpareForFutureUse[5]; - }; - -#endif // __COEINPUT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coelayoutman.h --- a/epoc32/include/coelayoutman.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CoeLayoutManager.H -// -// - -#ifndef __COELAYOUTMANAGER_H__ -#define __COELAYOUTMANAGER_H__ - -#include - -class CCoeControl; - - -/** -Base class for layout managers. - -A layout manager can be attached to one, or many (depending on the concrete layout -manager), compound controls. The layout manager handles the layout of the components -of the attached compound controls, and calculates the attached compound controls' -minimum size. - -@publishedAll -@released -*/ -class MCoeLayoutManager - { -protected: - IMPORT_C MCoeLayoutManager(); - -public: - - /** Determines if it is possible to attach another control to the layout manager. - @return ETrue if possible, otherwise EFalse - */ - virtual TBool CanAttach() const = 0; - - /** Attaches aCompoundControl to the layout manager. - Is normally not called manually since CCoeControl::SetLayoutManagerL() - calls this function. - Once a compound control is attached to a layout manager, the layout manager owns itself. - @see Detach() - @see CCoeControl::SetLayoutManagerL() - @param aCompoundControl The compound control. - */ - virtual void AttachL(CCoeControl& aCompoundControl) = 0; - - /** Detaches aCompoundControl from the layout manager. - Is normally not called manually since CCoeControl::SetLayoutManagerL() - calls this function when you switch layout managers on a control. It is also called - from CCoeControl::~CCoeControl - When the last attached compound control detaches, the layout manager deletes itself. - @see CCoeControl::SetLayoutManagerL() - @param aCompoundControl The compound control. - */ - virtual void Detach(CCoeControl& aCompoundControl) = 0; - - /** Calculates the minimum size of aCompoundControl - Is normally not called manually since CCoeControl::MinimumSize() - calls this function in the default implementation on controls with layout managers. - - To calculate the minimum size is almost as time consuming as performing an actual layout - and should be used with caution. The minimum size depends on aCompoundControl's - maximum width. - @see CCoeControl::MaximumWidth() - @param aCompoundControl The compound control - @return The minimum size - */ - virtual TSize CalcMinimumSize(const CCoeControl& aCompoundControl) const = 0; - - /** Performs the layout of the attached controls - Is normally not called manually since CCoeControl::SizeChanged() - calls this function in the default implementation on controls with layout managers. - - The layout is generally performed by calling the component controls' - SetMaximumWidth(), followed by MinimumSize(), and then the - layout manager tries to place the component controls according to their minimum - sizes and the settings. - - @see CCoeControl::SetMaximumWidth() - @see CCoeControl::MinimumSize() - */ - virtual void PerformLayout() = 0; - - /** Gets the offset to the first text baseline relative to the top of the control. - - @param aCompoundControl The control - @param aSize The size of the control - @return The baseline - @see CCoeControl::TextBaselineOffset() - */ - virtual TInt CalcTextBaselineOffset(const CCoeControl& aCompoundControl, const TSize& aSize) const = 0; - - /** Sets the spacing between text baselines. - - @param aBaselineSpacing The new value for the baseline - @see CCoeControl::SetTextBaseLineSpacing() - */ - virtual void SetTextBaselineSpacing(TInt aBaselineSpacing) = 0; - - /** Returns the baseline spacing. - @return The baseline value. - */ - virtual TInt TextBaselineSpacing() const = 0; - - /** Handles when a component control is added to an attached compound control - Is normally not called manually since CCoeControlArray::InsertLC() - calls this function for controls with layout managers. - Is used by layout managers to prepare to layout one more component control. - @see CCoeControlArray::InsertLC() - @param aCompoundControl The compound control. - @param aAddedControl The added control - */ - virtual void HandleAddedControlL(const CCoeControl& aCompoundControl, const CCoeControl& aAddedControl) = 0; - - /** Handles when a component control is removed from an attached compound control - Is normally not called manually since CCoeControlArray::Remove() - calls this function for controls with layout managers. - Is used by layout managers to remove all settings and similar that are specific for - aRemovedControl. - @see CCoeControlArray::Remove() - @param aCompoundControl The compound control. - @param aRemovedControl The removed control - */ - virtual void HandleRemovedControl(const CCoeControl& aCompoundControl, const CCoeControl& aRemovedControl) = 0; - - /** Handles when a component control is replaced by another component control - in an attached compound control - - Is not called by CCoeControl. - Is used by layout managers to move settings and similar that are specified for - aOldControl to aNewControl - If this function is called, neither HandleAddedControlL nor - HandleRemovedControl is allowed to be called. - @param aOldControl The old component control - @param aNewControl The new component control - @return KErrNone if no error. KErrNotFound if the - layout manager cannot find aOldControl - */ - virtual TInt HandleControlReplaced(const CCoeControl& aOldControl, const CCoeControl& aNewControl) = 0; - - -private: - IMPORT_C virtual void Reserved_MCoeLayoutManager_1(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_2(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_3(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_4(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_5(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_6(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_7(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_8(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_9(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_10(); - IMPORT_C virtual void Reserved_MCoeLayoutManager_11(); -private: - TInt iMCoeLayoutManager_Reserved1; - }; - - -#endif // __COELAYOUTMANAGER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coemain.h --- a/epoc32/include/coemain.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,558 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEMAIN_H__ -#define __COEMAIN_H__ - -#include -#include -#include -#include -#include -#include -#include - -#if defined(USE_IH_RAISE_EVENT) -#include -#include -#endif - -class CVwsSessionWrapper; -class MVwsSessionWrapperObserver; -class TCoeInputCapabilities; // forward declaration of class defined in COEINPUT.H -class CCoeAppUi; -class CCoeEnv; -class TResourceReader; -class RGenericPointerArray; -class CCoeFep; // must derive from CBase -class CCoeFontProvider; -class CCoeEnvExtra; -class CCoeStatic; - - -/** UI Control framework active object priorities. -These are in addition to the values contained in the TPriority enum in class CActive. - -@publishedAll -@released */ -enum TActivePriority - { - /** 300 */ - EActivePriorityClockTimer=300, - /** 200 */ - EActivePriorityIpcEventsHigh=200, - /** 150 */ - EActivePriorityFepLoader=150, - /** 100 */ - EActivePriorityWsEvents=100, - /** 50 */ - EActivePriorityRedrawEvents=50, - /** 0 */ - EActivePriorityDefault=0, - /** 10 */ - EActivePriorityLogonA=-10 - }; - - -/** Interface providing notification when there is a change in the currently -loaded FEP. - -This happens either on application start-up, or as a result of a different -front end processor having been installed. - -Anyone requiring this notification should derive from this class and implement -its pure virtual function. Derived classes also need to call CCoeEnv::AddObserverOfLoadedFepL() -during construction, and CCoeEnv::RemoveObserverOfLoadedFep() in their destructor. - -@publishedAll -@released */ -class MCoeObserverOfLoadedFep - { -public: - /** Handles a change in the loaded FEP. - - The function is called if a new FEP is loaded, or if the current one is unloaded. */ - virtual void HandleChangeInLoadedFep()=0; -protected: - IMPORT_C MCoeObserverOfLoadedFep(); - -private: - IMPORT_C virtual void MCoeObserverOfLoadedFep_Reserved_1(); - IMPORT_C virtual void MCoeObserverOfLoadedFep_Reserved_2(); -private: - TInt iMCoeObserverOfLoadedFep_Reserved1; - }; - - -/** Interface providing notification if any control gains or loses focus or is -destroyed. - -The FEP framework uses this class to observe when a target control changes -for reasons unrelated to the FEP. - -Anything that needs such notification should derive from this class and implement -its two pure virtual functions. - -In addition, derived classes need to call CCoeEnv::AddFocusObserverL() during -construction, and CCoeEnv::RemoveFocusObserver() in their destructors. - -@publishedAll -@released -@see CCoeFep */ -class MCoeFocusObserver - { -public: - /** Handles changes in focus. The function is called if any control gains or loses - focus. */ - virtual void HandleChangeInFocus()=0; - /** Handles the destruction of any control. It is called by the framework if any - control is destroyed. */ - virtual void HandleDestructionOfFocusedItem()=0; -protected: - IMPORT_C MCoeFocusObserver(); -private: - IMPORT_C virtual void MCoeFocusObserver_Reserved_1(); - IMPORT_C virtual void MCoeFocusObserver_Reserved_2(); -private: - TInt iMCoeFocusObserver_Reserved1; - }; - -/** An interface which enables message windows to observe resource changes. - -Resource change observers should be added to the control environment using -CCoeEnv::AddResourceChangeObserverL(). - -@publishedAll -@released */ -class MCoeResourceChangeObserver - { -public: - /** Handles a change to the application's resources. */ - virtual void HandleResourceChange()=0; -protected: - IMPORT_C MCoeResourceChangeObserver(); -private: - IMPORT_C virtual void MCoeResourceChangeObserver_Reserved_1(); - IMPORT_C virtual void MCoeResourceChangeObserver_Reserved_2(); -private: - TInt iMCoeResourceChangeObserver_Reserved1; - }; - -/** Interface providing notification of foreground/background changes. - -The FEP framework class, CCoeFep, derives from MCoeForegroundObserver, which -enables FEPs to receive notification when the target application (which receives -the FEP's output) goes into the foreground or background. - -Anything that needs this notification should derive from this class and override -its two pure virtual functions. - -In addition, derived classes also need to call CCoeEnv::AddForegroundObserverL() -during construction, and CCoeEnv::RemoveForegroundObserver() in their destructors. - -@publishedAll -@released -@see CCoeFep */ -class MCoeForegroundObserver - { -public: - /** Handles the application coming to the foreground. */ - virtual void HandleGainingForeground()=0; - /** Handles the application going into the background. */ - virtual void HandleLosingForeground()=0; -protected: - IMPORT_C MCoeForegroundObserver(); -private: - IMPORT_C virtual void MCoeForegroundObserver_Reserved_1(); - IMPORT_C virtual void MCoeForegroundObserver_Reserved_2(); -private: - TInt iMCoeForegroundObserver_Reserved1; - }; - - -/** Interface for handling incoming window server messages. - -This interface is used to enable FEPs to keep their settings synchronised -across all running instances. - -Anything that needs to be notified of messages that get sent by the window server's -message-sending service should derive from this class and override its pure -virtual function. - -In addition, derived classes also need to call CCoeEnv::AddMessageObserverL() -during construction and CCoeEnv::RemoveMessageObserver() in their destructors. - -@publishedAll -@released */ -class MCoeMessageObserver - { -public: - /** Message response flags. */ - enum TMessageResponse - { - /** Message not handled. */ - EMessageNotHandled, - /** Message handled. */ - EMessageHandled - }; -public: - /** Handles window server messages. - - Implementations should return EMessageHandled if they are able to handle the - message, or EMessageNotHandled if the message is not appropriate to this observer. - - @param aClientHandleOfTargetWindowGroup The window group that the message - was sent to. Many implementations will not need this information. - @param aMessageUid The message UID. - @param aMessageParameters The message parameters. - @return Indicates whether the message was handled or not handled - by the function. */ - virtual TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8& aMessageParameters)=0; -protected: - IMPORT_C MCoeMessageObserver(); -private: - IMPORT_C virtual void MCoeMessageObserver_Reserved_1(); - IMPORT_C virtual void MCoeMessageObserver_Reserved_2(); - }; - -/** Mix-in interface for handling window visibility messages. - -@publishedAll -@released */ -class MCoeMessageMonitorObserver - { -public: - /** Received windows messages for monitoring. - @param aEvent The windows server event data.*/ - virtual void MonitorWsMessage(const TWsEvent& aEvent)=0; -private: - IMPORT_C virtual void MCoeMessageMonitorObserver_Reserved_1(); - IMPORT_C virtual void MCoeMessageMonitorObserver_Reserved_2(); - }; - -// classes defined in FEPBASE, declared here -class MCoeFepObserver; - -/** -@publishedAll -@released -*/ -typedef void (*TCoeFepObserverFunction)(MCoeFepObserver& aFepObserver); - -/** -@publishedAll -@released -*/ -class CCoeFepParameters : public CBase - { -public: - static CCoeFepParameters* NewLC(); -private: - inline CCoeFepParameters() {} - }; - - -/** Implements the active scheduler presupposed by the control environment. - -@publishedPartner -@deprecated -*/ -class CCoeScheduler : public CBaActiveScheduler - { -public: - IMPORT_C CCoeScheduler(CCoeEnv* aCoeEnv); - IMPORT_C virtual void WaitForAnyRequest(); - IMPORT_C virtual void DisplayError(TInt aError) const; - /** Gets the control environment. - - @return A pointer to the control environment. */ - inline CCoeEnv* CoeEnv() {return iCoeEnv;} - TBool Flush() const; // not to be called from outside CONE - void SetFlush(TBool aFlush); // not to be called from outside CONE -private: - // from CBaActiveScheduler - IMPORT_C virtual void Reserved_1(); - IMPORT_C virtual void Reserved_2(); -private: - CCoeEnv* iCoeEnv; - TBool iFlush; - }; - - - -/** Control environment. - -CCoeEnv provides an active environment for creating controls. It implements -active objects and an active scheduler, which provide access to the window -server, simplifying the API for application programs. It also provides utility -functions that are useful to many applications. - -When a standard event occurs, the active scheduler calls CCoeEnv::RunL(). -When a redraw event occurs, it calls CCoeRedrawer::RunL(). Priority key events -must be accessed using the Window Server API directly. - -Note: standard events are all events except redraw events and priority key events. - -@publishedAll -@released */ -class CCoeEnv : public CActive, public MObjectProvider - { -public: - // Properties - IMPORT_C static TVersion Version(); - IMPORT_C static CCoeEnv* Static(); - // Construction and destruction - IMPORT_C CCoeEnv(); - IMPORT_C ~CCoeEnv(); - IMPORT_C void ConstructL(); - IMPORT_C void ConstructL(TBool aInitialFocusState); - IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aDefaultScreenNumber); - IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aDefaultScreenNumber, TInt aWindowGroupID); - IMPORT_C CCoeAppUi* SetAppUi(CCoeAppUi* aAppUi); - IMPORT_C void ExecuteD(); - IMPORT_C void Execute(); - IMPORT_C void RunL(); - IMPORT_C void DoCancel(); - IMPORT_C void PrepareToExit(); - IMPORT_C virtual void DestroyEnvironment(); - IMPORT_C void DisableExitChecks(TBool aDisable); - IMPORT_C virtual void HandleError(TInt aError); - // System resources - inline CCoeAppUi* AppUi() const; - inline RFs& FsSession() const; - inline RWsSession& WsSession() const; - inline RWindowGroup& RootWin() const; - inline CWsScreenDevice* ScreenDevice() const; - inline CWindowGc& SystemGc() const; - inline const CFont* NormalFont() const; - inline const TWsEvent& LastEvent() const; - inline TBool IsSchedulerRunning() const; - // Graphics - IMPORT_C CWindowGc* CreateGcL(); - IMPORT_C CWindowGc* SwapSystemGc(CWindowGc* aGc); - IMPORT_C void Flush(TTimeIntervalMicroSeconds32 aDelay=0); - IMPORT_C void SuppressNextFlush(); - IMPORT_C TBool IsWservEventPending() const; - IMPORT_C TBool IsRedrawEventPending() const; - // Fonts (legacy API) - IMPORT_C CFbsFont* CreateDeviceFontL(CGraphicsDevice* aDevice,const TFontSpec& aFontSpec); - IMPORT_C CFbsFont* CreateScreenFontL(const TFontSpec& aFontSpec); - IMPORT_C void ReleaseScreenFont(CFont* aFont) const; - // Font provider - IMPORT_C const CCoeFontProvider& DefaultFontProvider() const; - // Text drawer - IMPORT_C CCoeTextDrawerBase& DefaultTextDrawer() const; - // Zooming - IMPORT_C TZoomFactor ZoomFactor() const; - IMPORT_C void SetZoomFactor(const TZoomFactor& aZoomFactor); - // Resource reading - IMPORT_C TInt AddResourceFileL(const TDesC& aFileName); - IMPORT_C void DeleteResourceFile(TInt aOffset); - IMPORT_C TBool IsResourceAvailableL(TInt aResourceId) const; - IMPORT_C void CreateResourceReaderLC(TResourceReader& aReader,TInt aResourceId) const; - inline void ReadResource(TDes& aDes,TInt aResourceId) const; - inline void ReadResourceL(TDes& aDes,TInt aResourceId) const; - inline HBufC* AllocReadResourceL(TInt aResourceId) const; - inline HBufC* AllocReadResourceLC(TInt aResourceId) const; - inline CDesCArrayFlat* ReadDesCArrayResourceL(TInt aResourceId); - IMPORT_C void ReadResourceAsDes8(TDes8& aDes,TInt aResourceId) const; /** @deprecated 7.0*/ - IMPORT_C void ReadResourceAsDes8L(TDes8& aDes,TInt aResourceId) const; - IMPORT_C HBufC8* AllocReadResourceAsDes8L(TInt aResourceId) const; - IMPORT_C HBufC8* AllocReadResourceAsDes8LC(TInt aResourceId) const; - IMPORT_C CDesC8ArrayFlat* ReadDesC8ArrayResourceL(TInt aResourceId); - IMPORT_C void ReadResourceAsDes16(TDes16& aDes,TInt aResourceId) const; /** @deprecated 7.0*/ - IMPORT_C void ReadResourceAsDes16L(TDes16& aDes,TInt aResourceId) const; - IMPORT_C HBufC16* AllocReadResourceAsDes16L(TInt aResourceId) const; - IMPORT_C HBufC16* AllocReadResourceAsDes16LC(TInt aResourceId) const; - IMPORT_C CDesC16ArrayFlat* ReadDesC16ArrayResourceL(TInt aResourceId); - IMPORT_C void Format128(TDes& aDes,TInt aResourceId,...); - IMPORT_C void Format256(TDes& aDes,TInt aResourceId,...); - // Error handling - IMPORT_C void LeaveWithErrorText(const TDesC& aMsg,const TDesC* aContextText=NULL); - // Key handling - IMPORT_C void SimulateKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); - // FEP handling - IMPORT_C void AddObserverOfLoadedFepL(MCoeObserverOfLoadedFep& aObserverOfLoadedFep); - IMPORT_C void RemoveObserverOfLoadedFep(MCoeObserverOfLoadedFep& aObserverOfLoadedFep); - IMPORT_C void AddFepObserverL(MCoeFepObserver& aFepObserver); - IMPORT_C void RemoveFepObserver(MCoeFepObserver& aFepObserver); - IMPORT_C void ForEachFepObserverCall(TCoeFepObserverFunction aFepObserverFunction); - void EnsureCorrectFepIsLoadedL(); - void EnsureSpecifiedFepIsLoadedL(TUid aFepUid); - IMPORT_C void InstallFepL(TUid aFepUid); - IMPORT_C void InstallFepL(TUid aFepUid, const TBool aLeave); - IMPORT_C void AvailableFepsL(RArray& aUids, CDesCArray* aDisplayNames); - IMPORT_C void ExecuteFepSettingsDialogL(TUid aFepUid); - IMPORT_C CCoeFep* Fep() const; - IMPORT_C TUid FepUid() const; - IMPORT_C void InputCapabilitiesChanged(); - // Control focus handling - IMPORT_C void AddFocusObserverL(MCoeFocusObserver& aFocusObserver); - IMPORT_C void RemoveFocusObserver(MCoeFocusObserver& aFocusObserver); - IMPORT_C void SyncNotifyFocusObserversOfChangeInFocus(); - void NotifyFocusObserversOfDestructionOfFocusedItem(); - // Application focus (foreground) handling - IMPORT_C void BringOwnerToFront(); - IMPORT_C void AddForegroundObserverL(MCoeForegroundObserver& aForegroundObserver); - IMPORT_C void RemoveForegroundObserver(MCoeForegroundObserver& aForegroundObserver); - void NotifyForegroundObserversOfGainingForeground(); - void NotifyForegroundObserversOfLosingForeground(); - // Resource change handling - IMPORT_C void AddResourceChangeObserverL(MCoeResourceChangeObserver& aResourceChangeObserver); - IMPORT_C void RemoveResourceChangeObserver(MCoeResourceChangeObserver& aResourceChangeObserver); - void NotifyResourceObserversOfChangeInResource(); - // Window server message handling - IMPORT_C void AddMessageObserverL(MCoeMessageObserver& aMessageObserver); - IMPORT_C void RemoveMessageObserver(MCoeMessageObserver& aMessageObserver); - IMPORT_C void AddMessageMonitorObserverL(MCoeMessageMonitorObserver& aMessageMonitorObserver); - IMPORT_C void RemoveMessageMonitorObserver(MCoeMessageMonitorObserver& aMessageMonitorObserver); - void NotifyMessageMonitorObserversOfEvent(const TWsEvent& aEvent); - // Singleton access - IMPORT_C static CCoeStatic* Static(TUid aUid); - IMPORT_C CCoeStatic* FindStatic(TUid aUid); -#if defined(SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS) - //multiple screens - IMPORT_C CWsScreenDevice* ScreenDevice(TInt aScreenNumber) const; - IMPORT_C RWindowGroup* RootWin(TInt aScreenNumber) const; -#endif -public: // *** Do not use! API liable to change *** - TInt AppStartupInstrumentationEventIdBase(); -public: // Internal to Symbian - IMPORT_C void GetMessageNotifyingObserversLC(TUint32 aClientHandleOfTargetWindowGroup, TUid& aMessageUid, TPtr8& aMessageParameters, const TWsEvent& aMessageEvent); - IMPORT_C TBool DisableShutdownChecks() const; -protected: // Internal to Symbian - IMPORT_C void SetAppStartupInstrumentationEventIdBaseL(TInt aAppStartupInstrumentationEventIdBase); - IMPORT_C void DestroyEnvironmentStatic(); - IMPORT_C void DestroyEnvironmentEnd(); - IMPORT_C TInt CoeEnvConstructorError() const; -private: // reserved virtual function space - IMPORT_C virtual void Reserved_1(); - IMPORT_C virtual void Reserved_2(); -private: // from CActive - IMPORT_C TInt RunError(TInt aError); -protected: // from MObjectProvider - IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId); -protected: - IMPORT_C virtual void DestroyScreen(); - inline TDes& ErrorText(); - inline TDes& ErrorContextText(); -public: // but not exported - void ReadEvent(); - CVwsSessionWrapper* InitViewServerSessionL(MVwsSessionWrapperObserver& aObserver); - void AddStatic(CCoeStatic* aStatic); - void QueueNotificationToFocusObserversOfChangeInFocus(); - TInt FocusObserverNotificationIdentifier() const; - TBool FocusObserverNotificationIsStillPending(TInt aFocusObserverNotificationIdentifier) const; - void RefetchPixelMappingL(); - TBool ControlStateChange(); -private: - void CreateActiveSchedulerL(); - void ConnectToFileServerL(); - void ConnectToWindowServerL(); - void InitScreenL( TInt aDefaultScreenNumber ); - void InitRootWindowL(TBool aInitialFocusState, TInt aWindowGroupID=0); - void InitSystemGcL(); - IMPORT_C virtual void InitSystemFontsL(); - IMPORT_C virtual TInt ResourceFileVersionNumber() const; - RResourceFile& ResourceFileForId(TInt aResourceId) const; - void DestroyAllResourceFiles(); - void AddObserverL(TAny* aObserver, RGenericPointerArray& aArray); - void RemoveObserver(TAny* aObserver, RGenericPointerArray& aArray); - void UpdateStatic(CCoeAppUi* aNewAppUi); - void SetInitialHandleCount(); - TUint InitialHandleCount() const; - RResourceFile* DoResourceFileForIdL(TInt aResourceId) const; -#if defined(SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS) - void PopulateArrayOfScreenItemsL(); - void DeleteArrayOfScreensItems(); -#endif -protected: - CCoeAppUi* iAppUi; - RFs iFsSession; - RWsSession iWsSession; - RWindowGroup iRootWin; - CWindowGc* iSystemGc; - const CFont* iNormalFont; - CWsScreenDevice* iScreen; - TWsEvent iLastEvent; - CArrayFix* iResourceFileArray; -private: - enum TFlags // used in the bottom 16 bits only of iEnvFlags - { - ENoShutdownChecks =0x0001, - EExtraPointerIsErrorCode =0x0002, - ESchedulerIsRunning =0x0004 - }; -private: - TDes* iErrorText; - TDes* iErrorContextText; - CCoeEnvExtra* iExtra; - CTrapCleanup* iCleanup; - TUint iEnvFlags; - }; - -/** Base class for creating singleton objects that will be stored by CCoeEnv. - -Each object must have a unique TUid. - -Symbian OS does not provide writeable global static data. Singleton objects -provide its equivalent in thread local storage, which is supported. - -This behaviour is useful for objects in which only one copy is ever needed -in the thread or application, e.g. in alert windows. - -@publishedAll -@released */ -class CCoeStatic : public CBase - { -public: - /** Scope of access to the singleton object. */ - enum TScope - { - /** Access from the entire thread. */ - EThread, - /** Access from an appUi in that thread. */ - EApp, - }; - /** The default destruction priority if none is specified in the constructor */ - enum {EDefaultDestructionPriority=100}; -public: - IMPORT_C ~CCoeStatic(); -protected: - IMPORT_C CCoeStatic(); - IMPORT_C CCoeStatic(TUid aUid,TScope=EThread); - IMPORT_C CCoeStatic(TUid aUid,TInt aDestructionPriority,TScope aScope=EThread); -private: - IMPORT_C virtual void CCoeStatic_Reserved1(); - IMPORT_C virtual void CCoeStatic_Reserved2(); -private: - void DoConstruction(const TUid& aUid,TInt aDestructionPriority,TScope aScope); - void SetCsAppUi(CCoeAppUi* aAppUi); - CCoeAppUi* CsAppUi() const; - TScope CsScope() const; - inline TInt DestructionPriority() const {return iCsLink.iPriority;} -private: - TPriQueLink iCsLink; - TUid iCsUid; - TUint iCsAppUiAndScope; - TInt iCCoeStatic_Reserved1; -private: - friend class CCoeEnv; - friend class CCoeEnvExtra; - }; - -#include - -#endif // __COEMAIN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coemain.inl --- a/epoc32/include/coemain.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - Gets the most recent standard event that was received by the application. - - Note: standard events are all events except redraw events and priority key events. - - @return The last event. -*/ -inline const TWsEvent& CCoeEnv::LastEvent() const - { return(iLastEvent); } - -/** Gets the application UI owned by this application. - -@return Pointer to the app UI owned by the application. */ -inline CCoeAppUi* CCoeEnv::AppUi() const - { return(iAppUi); } - -/** Gets the file server session owned by this CCoeEnv. - -This session is normally only used for accessing the application's resource -file. - -@return The file server session owned by this CCoeEnv. */ -inline RFs& CCoeEnv::FsSession() const - { return((RFs&)iFsSession); } - -/** Gets the window server session owned by the application. - -This provides access to window server functions not directly accessible via -the UI control framework. - -@return The window server session opened by the application. */ -inline RWsSession& CCoeEnv::WsSession() const - { return((RWsSession&)iWsSession); } - -/** Gets the application's window group. - -Note: a window group is an invisible window which acts as the parent window for -all other windows in an application. Typically, each application has one window -group. In the window server, window groups are also the unit of keyboard focus. - -@return The application's window group. */inline RWindowGroup& CCoeEnv::RootWin() const - { return((RWindowGroup&)iRootWin); } - -/** Gets the system graphics context. - -This is the graphics context typically used for drawing controls, but an -alternative graphics context can be created if required using CreateGcL(). - -@return The system graphics context. */ -inline CWindowGc& CCoeEnv::SystemGc() const - { return((CWindowGc&)*iSystemGc); } - -/** Gets the normal environment font. - -This is the font created during construction of the control environment. - -@return Pointer to the normal environment font. -@see InitSystemFontsL() */ -inline const CFont* CCoeEnv::NormalFont() const - { return(iNormalFont); } - -/** Gets the default screen device owned by this CCoeEnv. - -This is typically used as the standard screen device for the CCoeEnv's application. - -@return The default screen device owned by this CCoeEnv. */ -inline CWsScreenDevice* CCoeEnv::ScreenDevice() const - { return(iScreen); } - -/** Gets the current error message text. - -@return The current error message text. */ -inline TDes& CCoeEnv::ErrorText() - { return *iErrorText; } - -/** Gets the current error context text. - -@return The current error context text. */ -inline TDes& CCoeEnv::ErrorContextText() - { return *iErrorContextText; } - -#if defined(_UNICODE) -/** Reads a resource into a descriptor. - -The descriptor must be long enough to contain the entire resource. No memory -is allocated by this function. If the read fails, the function sets an error -condition and performs any cleanup required. The error condition causes the -GUI to launch an alert window. - -Deprecated - Use CCoeEnv::ReadResourceL() instead. - -@deprecated -@param aDes On return, contains the resource data. -@param aResourceId The numeric ID of the resource to be read. -@see RResourceFile::ReadL() -@see KErrCoeFailedToReadFromProgDisk */ -inline void CCoeEnv::ReadResource(TDes& aDes,TInt aResourceId) const - { ReadResourceAsDes16(aDes,aResourceId); } - -/** Reads a resource into a descriptor. - -The descriptor must be long enough to contain the entire resource. -No memory is allocated by this function. - -@param aDes On return, contains the resource data. -@param aResourceId The numeric ID of the resource to be read. -@return Pointer to a heap descriptor containing the resource. */ -inline void CCoeEnv::ReadResourceL(TDes& aDes,TInt aResourceId) const - { ReadResourceAsDes16L(aDes,aResourceId); } - -/** Reads a resource into a heap descriptor, allocating memory for it. - -Note: the calling program must destroy the heap descriptor when it is no longer -needed. - -@param aResourceId The numeric ID of the resource to be read. -@return Pointer to a heap descriptor containing the resource data. -@see RResourceFile::AllocReadL() */ -inline HBufC* CCoeEnv::AllocReadResourceL(TInt aResourceId) const - { return AllocReadResourceAsDes16L(aResourceId); } - -/** Reads a specified resource into a heap descriptor, allocating memory for it, -and pushing the descriptor onto the cleanup stack. - -The calling program should pop and destroy the heap descriptor when it is -no longer needed. - -@param aResourceId The numeric ID of the resource to be read. -@return Pointer to a heap descriptor containing the resource data. -@see RResourceFile::AllocReadLC() */ -inline HBufC* CCoeEnv::AllocReadResourceLC(TInt aResourceId) const - { return AllocReadResourceAsDes16LC(aResourceId); } - -/** Reads a resource into a Unicode descriptor array. - -@param aResourceId The numeric ID of the resource to be read. -@return A pointer to the descriptor array containing the resource data. -@see TResourceReader::ReadDesCArrayL() */ -inline CDesCArrayFlat* CCoeEnv::ReadDesCArrayResourceL(TInt aResourceId) - { return ReadDesC16ArrayResourceL(aResourceId); } -#else // not UNICODE - -/** Deprecated - use CCoeEnv::ReadResourceL() instead. - -@deprecated */ -inline void CCoeEnv::ReadResource(TDes& aDes,TInt aResourceId) const - { ReadResourceAsDes8(aDes,aResourceId); } - -inline void CCoeEnv::ReadResourceL(TDes& aDes,TInt aResourceId) const - { ReadResourceAsDes8L(aDes,aResourceId); } -inline HBufC* CCoeEnv::AllocReadResourceL(TInt aResourceId) const - { return AllocReadResourceAsDes8L(aResourceId); } -inline HBufC* CCoeEnv::AllocReadResourceLC(TInt aResourceId) const - { return AllocReadResourceAsDes8LC(aResourceId); } -inline CDesCArrayFlat* CCoeEnv::ReadDesCArrayResourceL(TInt aResourceId) - { return ReadDesC8ArrayResourceL(aResourceId); } -#endif // UNICODE - -// -// Tests if the Active Scheduler is started in the CCoeEnv::ExecuteD -// -// @return "TBool" -// ETrue if Active Scheduler is started in -// CCoeEnv::ExecuteD() -// EFalse if Active Scheduler is not started in -// CCoeEnv::ExecuteD() -// -inline TBool CCoeEnv::IsSchedulerRunning() const - {return iEnvFlags&ESchedulerIsRunning;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coemop.h --- a/epoc32/include/coemop.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEMOP_H__ -#define __COEMOP_H__ - -#include - -/** Declares an object type, ETypeId, for a class, in order to allow the object -provider mechanism to locate and provide objects from the class. - -@publishedAll -@released -@see MObjectProvider */ -#define DECLARE_TYPE_ID(id) enum { ETypeId = id }; - -// -// Used to wrap object type IDs in a standardised manner. Object type IDs must be asserted -// in an ETypeId member data property by any types of object which -// are capable of being retrieved by the MObjectProvider interface -// -class TTypeUid : public TUid -/** Part of the object provider mechanism, this class encapsulates the Uid that -identifies the type of object that an object provider is to get. - -The class is also used to encapsulate a pointer to the object that the object -provider has found. - -An object that is intended to be capable of being retrieved by the object -provider mechanism must include enum {ETypeId = 0xabcdefgh}; in its class -definition, where 0xabcdefgh is the Uid value. The macro DECLARE_TYPE_ID can -be used to do this. - -An instance of this class is passed to the MObjectProvider::MopSupplyObject() -function implemented by an object provider. A TTypeUid::Ptr is also returned -by this function. - -@publishedAll -@released -@see MObjectProvider */ - { -public: - class Ptr - /** Encapsulates a pointer to an object fetched by an object provider. - - The class has no public constructor. TTypeUid::MakePtr() or TTypeUid::Null() - must be used to construct instances of this class. */ - { - friend class TTypeUid; - private: - explicit inline Ptr(TAny* aPtr) - : iPtr(aPtr) - {} - public: - inline TAny* Pointer() const - /** Retrieves the pointer to an object which is encapsulated by the Ptr. - - @return A pointer to an object. */ - {return iPtr;} - private: - TAny* iPtr; - }; -public: - inline TTypeUid(TInt aUid) - /** Constructor that takes a Uid value. - - @param aUid The Uid value that defines the type of object that an object provider - is to get. */ - { iUid = aUid; } - inline static Ptr Null() - /** Constructs a Ptr which encapsulates a NULL pointer. - - @return The constructed Ptr object */ - { return Ptr(NULL); } - template inline Ptr MakePtr(T* aT) const - /** Constructs a Ptr which encapsulates the specified object pointer. - - @param aT A pointer to the object which is to be encapsulated. - @return The constructed Ptr object */ - { __ASSERT_DEBUG(iUid == T::ETypeId,User::Invariant()); return Ptr(aT); } - }; - - -class MObjectProvider -/** An interface that allows an object to be part of a network of object providers. - -The object provider mechanism can be used to find and access objects of a -given type, where the type is defined by a TTypeUid object. Object providers -may be arranged in a hierarchy, i.e. an object provider may have a parent-child -relationship with another object provider. - -An object provider must provide an implementation for the MopSupplyObject() -function and can choose to provide an implementation for the MopNext() function. -Typically, it will also have functionality to define who its parent is. - -CCoeControl is an example of a class that implements this interface. Top level -controls must have the view or app UI set as their object provider. This is -done by calling CCoeControl::SetMopParent() on the view or the app UI. The -view or app UI does this by calling the top level control's CCoeControl::SetMopParent() -function. - -@publishedAll -@released */ - { -public: - template - T* MopGetObject(T*& aPtr) - /** Gets an object of the type defined by the template parameter. - - The object may be supplied directly by this object provider, or by other object - providers higher up the hierarchy. - - @param aPtr A reference to a pointer to an object of a type that is to be - retrieved. - @return A pointer to an object of the type required, or NULL if none can be - found. */ - { return (aPtr=(T*)MopGetById(T::ETypeId)); } - - - template - T* MopGetObjectNoChaining(T*& aPtr) - /** Gets an object of the type defined by the template parameter. - - The object will be supplied directly by this object provider, or NULL - will be returned, this function does not recurse through the object chain. - - @param aPtr A reference to a pointer to an object of a type that is to be - retrieved. - @return A pointer to an object of the type required, or NULL if none can be - found. */ - { return (aPtr=(T*)MopGetByIdNoChaining(T::ETypeId)); } - - /** - @publishedAll - @released */ - MObjectProvider* FindParent(MObjectProvider* aMopToFind); - -private: // must be overridden - /** Gets an object whose type is encapsulated by the specified TTypeUid object. - - @param aId Encapsulates the Uid that identifies the type of object required. - @return Encapsulates the pointer to the object provided. - Note that the encapsulated pointer may be NULL. - - @publishedAll - @released */ - virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId) = 0; - -protected: - IMPORT_C MObjectProvider(); - -private: // may be overridden to continue chain of responsibility - /** - @publishedAll - @released */ - IMPORT_C virtual MObjectProvider* MopNext(); - IMPORT_C virtual void MObjectProvider_Reserved1(); - IMPORT_C virtual void MObjectProvider_Reserved2(); - -private: - IMPORT_C TAny* MopGetById(TTypeUid aId); - IMPORT_C TAny* MopGetByIdNoChaining(TTypeUid aId); - -private: - TInt iMObjectProvider_Reserved1; - }; - -#endif // __COEMOP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coesndpy.h --- a/epoc32/include/coesndpy.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COESNDPY_H__ -#define __COESNDPY_H__ - -#include - -class TBaSystemSoundType; -class CCoeSoundPlayerManager; - - -/** Utility class for simple sound playing. - -Must be used in the same thread as an active UI Control Framework environment -(CCoeEnv). - -This class plays the sound specified by a TBaSystemSoundType object. The -caller can request the sound to be repeated, and the time between repeats. -If the exact sound cannot be found on a particular device, a match only by -category (first UID) is used. No sound will play if a match is not found. - -@publishedAll -@released */ -class CoeSoundPlayer - { -public: - enum { ENoRepeat=1, ERepeatForever=KMaxTInt}; -public: - inline static void PlaySound(const TBaSystemSoundType& aType); - inline static void PlaySound(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap); - inline static void PlaySoundNow(const TBaSystemSoundType& aType); - inline static void PlaySoundNow(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap); - IMPORT_C static void CancelSound(const TBaSystemSoundType& aType); -private: - IMPORT_C static void PlaySound(const TBaSystemSoundType& aType,TInt aPlayCount, - TTimeIntervalMicroSeconds32 aGap,TBool aInterrupt); - static CCoeSoundPlayerManager* ManagerL(); - }; - - - - - -/** Plays the specified sound. - -This function only interrupts another, currently playing, sound if the new -sound has a higher priority than the currently playing sound. If you wish -to interrupt any currently playing sound and play a new one, use PlaySoundNow() -instead of PlaySound(). - -@param aType The sound to play.*/ -inline void CoeSoundPlayer::PlaySound(const TBaSystemSoundType& aType) - {CoeSoundPlayer::PlaySound(aType,ENoRepeat,TTimeIntervalMicroSeconds32(0),EFalse);} - -/** Plays the specified sound for the specifed number of times with the specified -interval. - -This function only interrupts another, currently playing, sound if the new sound -has a higher priority than the current one. If you wish to interrupt -any currently playing sound and play a new one, use PlaySoundNow() instead of PlaySound(). - -@param aType The sound to play. -@param aPlayCount The number of times the sound is played. -@param aGap The interval in microseconds between each time the sound is played. */ -inline void CoeSoundPlayer::PlaySound(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap) - {CoeSoundPlayer::PlaySound(aType,aPlayCount,aGap,EFalse);} - -/** Plays the specified sound, interrupting any other sound that is currently playing. - -@param aType The sound to play. */ -inline void CoeSoundPlayer::PlaySoundNow(const TBaSystemSoundType& aType) - {CoeSoundPlayer::PlaySound(aType,ENoRepeat,TTimeIntervalMicroSeconds32(0),ETrue);} - -/** Plays the specified sound the specifed number of times with the -specified interval, interrupting any other sound that is currently playing. - -@param aType The sound to play. -@param aPlayCount The number of times the sound is played. -@param aGap The interval in microseconds between each time the sound is played. */ -inline void CoeSoundPlayer::PlaySoundNow(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap) - {CoeSoundPlayer::PlaySound(aType,aPlayCount,aGap,ETrue);} - -#endif // __COESNDPY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coetextdrawer.h --- a/epoc32/include/coetextdrawer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,324 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COETEXTDRAWER_H__ -#define __COETEXTDRAWER_H__ - -#include -#include -#include -#include - -// -// TEXT DRAWER CODE -// - -// forward declarations -class CCoeTextDrawerBase; -class TCoeTextTypeAdaptor; - -/** -This class serves as a smart-pointer handle to a CCoeTextDrawerBase-derived object, used for drawing -user interface text. Through the use of the CCoeControl's TextDrawer() and GetTextDrawer() methods, a -container control can control the text style and color used by its child controls. For example, a button -class can override its GetTextDrawer() method to set the text color used by its text label child control -depending on the buttons state (e.g. unpressed, pressed, or dimmed). - -The XCoeTextDrawer object manages the life of the heap allocated CCoeTextDrawerBase (deleting it or -resetting it depending on whether the object is reusable or not). - -XCoeTextDrawer objects shall be allocated on the stack in the control's Draw() method and initialized -with a heap allocated CCoeTextDrawerBase object fetched from the control's skin, or from its parent or -background through the CCoeControl::TextDrawer() method. - -Never create a CCoeTextDrawer-derived object inside your CCoeControl::Draw() method, as this is not -guaranteed to work in low-memory situations. Non-reusable text drawers must only be created in your -control's GetTextDrawer() method, as this provides error handling in case the text drawer could not be -created. - -Hence, typical use from inside a CCoeControl's Draw() method: - -XCoeTextDrawer textDrawer(TextDrawer()); -textDrawer.SetAlignment(EHLeftVCenter); -textDrawer.SetMargins(iTextMargins); -textDrawer.DrawText(SystemGc(), *iText, iTextRect, ScreenFont(TCoeFont::NormalFont())); - - -@publishedAll -@released -*/ -class XCoeTextDrawer - { -public: - IMPORT_C XCoeTextDrawer(CCoeTextDrawerBase& aTextDrawer); - IMPORT_C ~XCoeTextDrawer(); - - IMPORT_C void operator=(CCoeTextDrawerBase& aTextDrawer); - - IMPORT_C void DrawText(CGraphicsContext& aGc, const TBidiText& aText, const TRect& aTextRect, const CFont& aFont) const; - IMPORT_C void DrawDisplayOrderedText(CGraphicsContext& aGc, const TDesC& aText, const TRect& aTextRect, const CFont& aFont) const; - - IMPORT_C void DrawTextVertical(CGraphicsContext& aGc, const TBidiText& aText, const TRect& aTextRect, const CFont& aFont, TBool aUp = ETrue) const; - IMPORT_C void DrawDisplayOrderedTextVertical(CGraphicsContext& aGc, const TDesC& aText, const TRect& aTextRect, const CFont& aFont, TBool aUp = ETrue) const; - - IMPORT_C TRect ClipRect() const; - IMPORT_C void SetClipRect(const TRect& aClipRect); - - inline TRgb TextColor() const; - inline void SetTextColor(TRgb aColor); - - inline TGulAlignment Alignment() const; - inline void SetAlignment(const TGulAlignment& aAlignment); - - inline TMargins8 Margins() const; - inline void SetMargins(const TMargins8& aMargins); - - inline TInt LineGapInPixels() const; - inline void SetLineGapInPixels(TInt aLineGapInPixels); -public: - IMPORT_C CCoeTextDrawerBase *operator ->(); // deprecated -private: - XCoeTextDrawer(const XCoeTextDrawer& aTextDrawer); -private: - CCoeTextDrawerBase* iTextDrawer; - TRect iClipRect; - }; - - -// forward declaration -class CCoeTextDrawerBaseExt; - -/** -This is the base class for all text drawers implementing different text effects (for example -shadow or glowing/outlined text). The object can be created and deleted each time it's used, -or Reset() and reused if it IsReusable(). The latter is recommended. - -Note that the pure virtual DrawText() method is private. This ensures that the object is used -through the XCoeTextDrawer class (which manages its life). - -Note also that the accessor and set methods should be used via the owning XCoeTextDrawer object, -and that the MObjectProvider mechanism can be used to identify the actual text drawer implementation. - -@publishedAll -@released -*/ -class CCoeTextDrawerBase : public CBase, public MObjectProvider - { - friend class XCoeTextDrawer; -public: - IMPORT_C ~CCoeTextDrawerBase(); - IMPORT_C virtual void Reset(); - - /** - This method returns the main color used by the CCoeTextDrawer to draw text. - @return The color used to draw text. - */ - virtual TRgb TextColor() const = 0; - /** - This method sets the main color to use to draw text. - @param aColor The color to use to draw text. - */ - virtual void SetTextColor(TRgb aColor) = 0; - - IMPORT_C TGulAlignment Alignment() const; - IMPORT_C void SetAlignment(const TGulAlignment& aAlignment); - - IMPORT_C TMargins8 Margins() const; - IMPORT_C void SetMargins(const TMargins8& aMargins); - - IMPORT_C TInt LineGapInPixels() const; - IMPORT_C void SetLineGapInPixels(TInt aLineGapInPixels); -public: // public methods only for use by the owner/creator of the CCoeTextDrawerBase-derived object - IMPORT_C TBool IsReusable() const; - IMPORT_C void SetReusable(TBool aIsReusable); - - IMPORT_C void SetAppLanguage(TLanguage aAppLang); -protected: - IMPORT_C CCoeTextDrawerBase(); - IMPORT_C TInt Construct(); - IMPORT_C TGulHAlignment ActualHorizontalAlignment(const TCoeTextTypeAdaptor& aText) const; -private: - /** - Any actual text drawer must implement this method to draw the text passed as argument. - The implementation must draw the text inside the text rectangle, cropped to the clipping - rectangle, and with the given margins and alignment taken into account. - - Note that the actual horizontal alignment shall depend on the script directionality. - Calling ActualHorizontalAlignment() will return the horizontal alignment where left and - right has been swapped for right-to-left scripts. - */ - virtual void DrawText(CGraphicsContext& aGc, const TCoeTextTypeAdaptor& aText, const CFont& aFont, - const TRect& aTextRect, const TRect& aClipRect) const = 0; -public: - IMPORT_C virtual TMargins8 EffectMargins(); -private: - /** - Draws the text vertically inside the text rectangle, cropped to the clipping - rectangle, and with the given margins and alignment taken into account. - If aUp is ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise. - - Note that the actual horizontal alignment shall depend on the script directionality. - Calling ActualHorizontalAlignment() will return the horizontal alignment where left and - right has been swapped for right-to-left scripts. - Also note that the margines are relative to the orientation of the text. - */ - IMPORT_C virtual void DrawTextVertical(CGraphicsContext& aGc, const TCoeTextTypeAdaptor& aText, const CFont& aFont, - const TRect& aTextRect, const TRect& aClipRect, TBool aUp) const; - IMPORT_C virtual void CCoeTextDrawerBase_Reserved3(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved4(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved5(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved6(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved7(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved8(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved9(); - IMPORT_C virtual void CCoeTextDrawerBase_Reserved10(); - private: - TBool iIsReusable; - TGulAlignment iAlignment; - TMargins8 iMargins; - TInt iLineGap; - CCoeTextDrawerBaseExt* iExtension; - }; - - -/** -This class allows the XCoeTextDrawer to draw text that is in the form of a TBidiText -object as well as pre-reordered new-line separated plain text descriptors. (The descriptor -text is especially useful when using the XCoeTextDrawer together with the FORM component). - -This removes the need to implement two versions of the DrawText() method. - -@publishedAll -@released -*/ -class TCoeTextTypeAdaptor - { -public: - IMPORT_C TCoeTextTypeAdaptor(const TDesC& aText); // text lines separated with '\n' - IMPORT_C TCoeTextTypeAdaptor(const TBidiText& aText); // TBidiText object - IMPORT_C TInt NumberOfLines() const; - IMPORT_C TPtrC LineOfText(TInt aLineNumber, TInt& aWidthInPixels, const CFont& aFont) const; - IMPORT_C TBool HasRightToLeftDirectionality() const; -private: - enum TTextType - { - ENewlineSeparated, - EBidiText - }; - const TAny* iText; - TTextType iTextType; - }; - - -/** -This is a basic text drawer without any text effects. The default text drawer that can be -used if no other (device specific) text drawers has been added to the system. - -@publishedAll -@released -*/ -class CCoePlainTextDrawer : public CCoeTextDrawerBase - { -public: - DECLARE_TYPE_ID(0x1020831A) -public: - IMPORT_C static CCoePlainTextDrawer* New(TRgb aTextColor); - - IMPORT_C TRgb TextColor() const; - IMPORT_C void SetTextColor(TRgb aTextColor); -protected: // from MObjectProvider - IMPORT_C virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId); -private: - void DrawText(CGraphicsContext& aGc, const TCoeTextTypeAdaptor& aText, const CFont& aFont, - const TRect& aTextRect, const TRect& aClipRect) const; - void Reset(); - CCoePlainTextDrawer(TRgb aTextColor); - TInt Construct(); //lint !e1511 Suppress member hides non-virtual member -private: - TRgb iTextColor; - }; - - - -// Inlines - -/** -This method returns the main color used by by DrawText() and DrawDisplayOrderedText(). -@return The color used to draw text. -*/ -TRgb XCoeTextDrawer::TextColor() const - { return iTextDrawer->TextColor(); } - -/** -This method sets the main color to use by DrawText() and DrawDisplayOrderedText() to draw text. -@param aColor The color to use to draw text. -*/ -void XCoeTextDrawer::SetTextColor(TRgb aColor) - { iTextDrawer->SetTextColor(aColor); } - -/** -Returns the text alignment that will be used by DrawText() and DrawDisplayOrderedText(). -Note that left and right alignment will be swapped for right-to-left scripts, unless -the alignment has been set to be absolute (see TGulAlignment). - -@return TGulAlignment value of iAlignment data member -*/ -TGulAlignment XCoeTextDrawer::Alignment() const - { return iTextDrawer->Alignment(); } - -/** -Set the text alignment that will be used by DrawText() and DrawDisplayOrderedText(). -Note that left and right alignment will be swapped for right-to-left scripts, unless -the alignment has been set to be absolute (see TGulAlignment). - -@param aAlignment TGulAlignment value. -*/ -void XCoeTextDrawer::SetAlignment(const TGulAlignment& aAlignment) - { iTextDrawer->SetAlignment(aAlignment); } - -/** -Returns the text margins that will be used by DrawText() and DrawDisplayOrderedText(). -Note that text effects may intrude on the margin. - -@return The margins between the text rect and the actual text, in pixels. -*/ -TMargins8 XCoeTextDrawer::Margins() const - { return iTextDrawer->Margins(); } - -/** -Set the text margins that will be used by DrawText() and DrawDisplayOrderedText(). -Note that text effects may intrude on the margin, and that margins are always relative to the text orientation. - -@param aMargins The margins between the text rect and the actual text, in pixels. -*/ -void XCoeTextDrawer::SetMargins(const TMargins8& aMargins) - { iTextDrawer->SetMargins(aMargins); } - -/** -Returns the gap (in pixels) between lines of text. Default gap is 1 (one) pixel. -@return The gap between lines of text, in pixels. -*/ -TInt XCoeTextDrawer::LineGapInPixels() const - { return iTextDrawer->LineGapInPixels(); } - -/** -Set the gap (in pixels) between lines of text. Default gap is 1 (one) pixel. -@param aLineGapInPixels The gap between lines of text, in pixels. -*/ -void XCoeTextDrawer::SetLineGapInPixels(TInt aLineGapInPixels) - { iTextDrawer->SetLineGapInPixels(aLineGapInPixels); } - - -#endif // __COETEXTDRAWER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coeutils.h --- a/epoc32/include/coeutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -// COEUTILS.H - -/* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __COEUTILS_H__ -#define __COEUTILS_H__ - -#include -class CCoeEnv; - -/** Provides file and path utility functions. - -@publishedAll -@released */ -class ConeUtils - { -public: - IMPORT_C static TBool FileExists(const TDesC& aFileName); - IMPORT_C static void EnsurePathExistsL(const TPtrC& aFileName); - }; - - -/** -Class encapsulates methods for opening and closing localised resource files -in the CONE environment. The actual reading of resources from an opened -resource file is done using various CCoeEnv provided resource-reading -methods. The Cone Resource Loader API consists of the RCoeResourceLoader class. - -Only one resource at a time may be opened by one RCoeResourceLoader instance. -You can use several RCoeResourceLoader instances for accessing several -resources simultaneously or use one instance and close the previous resource -before opening a new one. - -The implementation uses BaflUtils::NearestLanguageFile to search for -a localised resource in proper search order. - -Usage example: - -@code -#include - -// Get CCoeEnv instance -CEikonEnv* eikEnv = CEikonEnv::Static(); -// Initialize loader -RCoeResourceLoader rLoader(eikEnv); - -// Push resource loader to cleanup stack, so that it will always be properly -// closed when popped. -CleanupClosePushL(rLoader); - -// Open resource file -_LIT( KSampleResourceFileName, "Z:\\System\\Apps\\sample\\sample.rsc" ); -TFileName fileName(KSampleResourceFileName); -rLoader.OpenL(fileName); - -// Read a resource -iSomeArray = eikEnv->ReadDesC16ArrayResourceL(R_SOME_RESOURCE); - -// Pop and destroy rLoader from stack. -// This also calls the rLoader close function after CleanupClosePushL is used. -CleanupStack::PopAndDestroy(); // rLoader -@endcode - -@publishedAll -@released */ -NONSHARABLE_CLASS(RCoeResourceLoader) - { -public: - IMPORT_C RCoeResourceLoader(CCoeEnv& aEnv); - IMPORT_C TInt Open(TFileName& aFileName); - IMPORT_C void OpenL(TFileName& aFileName); - IMPORT_C void Close(); -private: - // Prohibit copy constructor and assigment operator because not deriving from CBase. - RCoeResourceLoader(); - RCoeResourceLoader(const RCoeResourceLoader&); - RCoeResourceLoader& operator= (const RCoeResourceLoader&); -private: - // Needed for closing - CCoeEnv& iEnv; - TInt iResourceFileOffset; - }; - - -#endif // __COEUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/coeview.h --- a/epoc32/include/coeview.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __COEVIEW_H__ -#define __COEVIEW_H__ - -#include -#include // for CCoeStatic - -class CCoeAppUi; - -/** Specifies an interface for views. - -This class should be implemented by all application views. - -@publishedAll -@released */ -class MCoeView - { -public: - /** Returns a TVwsViewId uniquely identifying the view. - - @return Represents a view in the server. */ - virtual TVwsViewId ViewId() const=0; -private: - /** Takes any action required when a view is activated. Reimplemented versions - should read the contents of aCustomMessage for any message type identified - by aCustomMessageId that the view understands. - - The ID of the previously active view aPrevViewId is supplied so that the activated - view can subsequently switch back to the caller if required. - - @param aPrevViewId The UID of the previously active view. - @param aCustomMessageId Message type. - @param aCustomMessage Message contents. - - @publishedAll - @released */ - virtual void ViewActivatedL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage)=0; - /** Takes any action that is required following deactivation of the view. - - This reduces the work required of the window server. - - @publishedAll - @released */ - virtual void ViewDeactivated()=0; - -protected: - IMPORT_C MCoeView(); - IMPORT_C virtual TVwsViewIdAndMessage ViewScreenDeviceChangedL(); -private: - IMPORT_C virtual void ViewConstructL(); -protected: - IMPORT_C virtual TBool ViewScreenModeCompatible(TInt aScreenMode); // was MCoeView_Reserved_1() -private: - friend class CCoeViewManager; - IMPORT_C virtual void PrepareForViewActivation(); - IMPORT_C virtual void MCoeView_Reserved_2(); - IMPORT_C virtual void MCoeView_Reserved_3(); -private: - TInt iMCoeView_Reserved1; - }; - -/** An interface through which view deactivations can be -notified to an observer. - -Dialogs and other floating windows such as virtual keyboards which should be dismissed -when a view is deactivated can implement this interface and take any action required. - -@publishedAll -@released */ -class MCoeViewDeactivationObserver - { -public: - // - // Handles the deactivation of the view identified by aViewIdToBeDeactivated before the newly activated - // view with id aNewlyActivatedViewId is marked as current. - // - virtual void HandleViewDeactivation(const TVwsViewId& aViewIdToBeDeactivated,const TVwsViewId& aNewlyActivatedViewId)=0; -protected: - IMPORT_C MCoeViewDeactivationObserver(); -private: - IMPORT_C virtual void MCoeViewDeactivationObserver_Reserved_1(); - IMPORT_C virtual void MCoeViewDeactivationObserver_Reserved_2(); -private: - TInt iMCoeViewDeactivationObserver_Reserved1; - }; - -/** An interface through which view activations can be notified to an observer. - -@publishedPartner -@released -*/ -class MCoeViewActivationObserver - { -public: - // - // Handles the activation of the view aNewlyActivatedViewId before the old view aViewIdToBeDeactivated is - // to be deactivated. - // - virtual void HandleViewActivation(const TVwsViewId& aNewlyActivatedViewId,const TVwsViewId& aViewIdToBeDeactivated)=0; -protected: - IMPORT_C MCoeViewActivationObserver(); -private: - IMPORT_C virtual void MCoeViewActivationObserver_Reserved_1(); - IMPORT_C virtual void MCoeViewActivationObserver_Reserved_2(); -private: - TInt iMCoeViewActivationObserver_Reserved1; - }; - - -/** An interface through which view events can be notified to an observer. - -@publishedPartner -@released */ -class MCoeViewObserver - { -public: - virtual void HandleViewEventL(const TVwsViewEvent& aEvent)=0; -protected: - IMPORT_C MCoeViewObserver(); -private: - IMPORT_C virtual void MCoeViewObserver_Reserved1(); - IMPORT_C virtual void MCoeViewObserver_Reserved2(); -private: - TInt iMCoeViewObserver_Reserved1; - }; - - -// -// Handles any screen device changes that occur while a view is active -// -/** A default screen device change handler. - -This class is used to activate a default view when a screen "flip" occurs, -if the currently active view does not implement MCoeView::ViewScreenDeviceChangedL(). - -@publishedAll -@released -@see MCoeView::ViewScreenDeviceChangedL() */ -class CCoeScreenDeviceChangeDefaultHandler : public CCoeStatic - { -public: - IMPORT_C ~CCoeScreenDeviceChangeDefaultHandler(); - IMPORT_C static CCoeScreenDeviceChangeDefaultHandler* Self(); -protected: - IMPORT_C CCoeScreenDeviceChangeDefaultHandler(); - IMPORT_C CCoeScreenDeviceChangeDefaultHandler(TInt aDestructionPriority); -private: - IMPORT_C virtual void CCoeStatic_Reserved1(); - IMPORT_C virtual void CCoeStatic_Reserved2(); - IMPORT_C virtual void CCoeScreenDeviceChangeDefaultHandler_Reserved1(); - IMPORT_C virtual void CCoeScreenDeviceChangeDefaultHandler_Reserved2(); -public: - virtual void HandleScreenDeviceChangedL()=0; - virtual TVwsViewIdAndMessage DefaultViewOnScreenDeviceChanged()=0; -private: - TInt iCCoeScreenDeviceChangeDefaultHandler; - }; - - -#endif // __COEVIEW_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/comms-infras/cftransportmacro.h --- a/epoc32/include/comms-infras/cftransportmacro.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Comms-infras\Elements\cftransportmacro.h -// This header file is exported to \EPOC32\include\comms-infras -// -// - -#ifndef CFTRANSPORTMACRO_H -#define CFTRANSPORTMACRO_H - -#if (defined SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY) || (defined SYMBIAN_C32_SERCOMMS_V2) - #define SYMBIAN_NETWORKING_CFTRANSPORT -#endif - -#endif // CFTRANSPORTMACRO_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/comms-infras/metadata.inl --- a/epoc32/include/comms-infras/metadata.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/** -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - - - -/** - @file MetaData.inl - @internalTechnology -*/ - -#ifndef __METADATA_INL__ -#define __METADATA_INL__ - -namespace Meta -{ - - -STypeId::STypeId() -/** - * Constructor - */ - { - iUid.iUid = 0; - iType = 0; - } - -STypeId::STypeId(TUint32 aUid, TUint32 aTypeId) -/** - * Constructor - */ - { - iUid.iUid = aUid; - iType = aTypeId; - } - -} // namespace Meta -#endif // __METADATA_INL__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/conarc.h --- a/epoc32/include/conarc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,305 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__CONARC_H__) -#define __CONARC_H__ - -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__APMSTD_H__) -#include -#endif - -// -// base interface for converters -// - -/** -@publishedAll -@released -*/ -const TInt KUidConverterToBase64=0x10000721; -/** -@publishedAll -@released -*/ -const TInt KUidConverterFromBase64=0x100011C5; -/** -@publishedAll -@released -*/ -const TInt KUidPlainTextToQuotedPrintableConverter=0x10001826; -/** -@publishedAll -@released -*/ -const TInt KUidQuotedPrintableToPlainTextConverter=0x10001825; -/** -@publishedAll -@released -*/ -const TInt KUidETextToPlainTextConverter= -#if defined(ETEXT_CONVERTER_UIDS_CORRECTED) - 0x100040c8; -#else - 0x100040c7; -#endif - -/** -@publishedAll -@released -*/ -const TInt KUidPlainTextToETextConverter= -#if defined(ETEXT_CONVERTER_UIDS_CORRECTED) - 0x100040c7; -#else - 0x100040c8; -#endif - -/** -@publishedAll -@released -*/ -#ifdef _UNICODE -#define KUidConverterDll KUidConverterDll16 -#else -#define KUidConverterDll KUidConverterDll8 -#endif - -/** -@internalComponent -@deprecated -*/ -const TInt KUidConverterDllValue8=0x10000C61; - -/** -@internalComponent -@deprecated -*/ -const TUid KUidConverterDll8={KUidConverterDllValue8}; - -/** -@internalComponent -*/ -const TInt KUidConverterInfoFileValue=0x10000C62; - -/** -@publishedAll -@released -*/ -const TUid KUidConverterInfoFile={KUidConverterInfoFileValue}; - -/** -@internalComponent -*/ -const TInt KUidConverterInfoStreamValue=0x10000CD0; - -/** -@internalComponent -*/ -const TUid KUidConverterInfoStream={KUidConverterInfoStreamValue}; - -/** -The UID2 of converter-type DLLs. -@publishedAll -@released -*/ -const TUid KUidConverterDll16={0x10003A30}; - -/** -The extension of converter information files. -@publishedAll -@released -*/ -_LIT(KConverterInfoFileExtension,".CNF"); -/** -The extension of converter DLLs. -@publishedAll -@released -*/ -_LIT(KConverterDllExtension,".CNV"); - - -class MConverterUiObserver -/** -Interface implemented by the client of a conversion operation to observe conversion -progress. - -@see CConverterBase2 -@publishedAll -@released -*/ - { -public: - /** Describes the result of a conversion operation. */ - enum TResult - { - /** Conversion succeeded. */ - ESuccess, - /** Conversion partially succeeded. */ - EPartialSuccess, - /** Conversion failed. */ - EFailure - }; - /** Describes the actions that the converter should take. */ - enum TAction - { - /** Keep already converted data. */ - ERetain, - /** Delete converted data. */ - ERemove, - /** Reconvert data. */ - ERepeat - }; -public: - /** Gets the maximum number of steps that the conversion operation can take. - - The conversion may complete in less than this number of steps (for example - if an error occurs or the action is cancelled). - - Each step is a call to CConverterBase2::DoConvert(), although during synchronous - conversions this is transparent to the client code. - - @param aMax Maximum number of conversion steps. - @param aObject Index that identifies an embedded object when one is being converted. */ - virtual void MaxSteps(TInt aMax, TInt aObject)=0; - /** Alerts the client to an error in conversion. - - @param aResult A TResult value indicating the conversion state. - @param aObject Index that identifies an embedded object when one is being converted. - @return A TAction value that indicates what action the converter should take. */ - virtual TInt Result(TInt aResult, TInt aObject)=0; - /** Queries the client for a password in order to access the data. - - @param aClue Data with a meaning that is specific to each converter: it could for - example indicate where the password is stored. - @return The password entered. */ - virtual HBufC* QueryPasswordL(const TDesC& aClue)=0; - IMPORT_C virtual void Reserved1_Conv_Obs(); - }; - - -class CConverterBase : public CBase -/** For Ecom Style Converters i.e.,for v9.1 and above CConverterBase2 should be used. - -Polymorphic interface for converters from one data format to another. - -Clients use this interface to access data converters. The implementator of -a data converter derives a class from this in which to implement the appropriate -conversion functionality. - -The interface offers conversions between files, and between objects that support -the stream interfaces, e.g. stream stores. - -There are two flavours of conversion methods: - -the synchronous interfaces, ConvertL() and ConvertObjectL(), which perform -the specified conversion and then return - -the asynchronous interfaces, ConvertAL() and ConvertObjectAL(), which initialise -the converter object, and allow the client code to call DoConvertL() a number -of times until the conversion is complete or abandoned. - -@see CConverterBase2 -@publishedAll -@released */ - { -public: - /** Bitmask values that describe the capabilities of the converter. */ - enum TCapability - { - /** The converter can convert files. */ - EConvertsFiles=0x01, - /** The converter can convert stream objects. */ - EConvertsObjects=0x02, - /** The converter can extract embedded objects. */ - EConvertsExtract=0x04 - }; -public: - IMPORT_C virtual void ConvertL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // These default to calling the async versions in a loop - IMPORT_C virtual void ConvertObjectL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); - IMPORT_C virtual void ConvertAL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported - IMPORT_C virtual void ConvertObjectAL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported - IMPORT_C virtual TBool DoConvertL(); // these default to leaving with KErrNotSupported - /** Gets the converter's UID. - - @return Converter's UID */ - virtual TUid Uid() =0; - IMPORT_C virtual TInt Capabilities(); // defaults to "everything" - IMPORT_C virtual void CancelConvert(); // for any cleanup - IMPORT_C virtual CConverterBase* EmbeddedObjectL(TDataType& aType); - IMPORT_C virtual TBool GetEmbeddedFileName(TFileName& aFileName); - IMPORT_C virtual void ExtendedInterfaceL(TUid aInterfaceUid, CBase*& aInterface); - }; - - -class CConverterLibrary : public CBase -/** A converter DLL's factory for individual CConverterBase-derived objects. - -The implementor of a converter DLL should implement this class. - -@publishedAll -@deprecated */ - { -public: - /** Creates and returns an instance of the converter with the specified UID. - - This class should not allocate any resources that are not returned to the - caller. - - @param aUid UID of the converter to create - @return The specified converter. If the converter does not implement a converter - associated with the UID, then it should return NULL. */ - virtual CConverterBase* Converter(TUid aUid)=0; // passes ownership - }; - -class CConverterBase2 : public CConverterBase -/** Base Class for Ecom Style Converters -The methods in CConverterBase2 are inherited from CConverterBase - -There are two flavours of conversion methods: - -the synchronous interfaces, ConvertL() and ConvertObjectL(), which perform -the specified conversion and then return - -the asynchronous interfaces, ConvertAL() and ConvertObjectAL(), which initialise -the converter object, and allow the client code to call DoConvertL() a number -of times until the conversion is complete or abandoned. - -@publishedAll -@released */ - { -public: - static CConverterBase2* CreateConverterL(TUid aImplUid); - IMPORT_C virtual ~CConverterBase2(); - IMPORT_C virtual void ConvertL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // These default to calling the async versions in a loop - IMPORT_C virtual void ConvertObjectL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); - IMPORT_C virtual void ConvertAL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported - IMPORT_C virtual void ConvertObjectAL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported - IMPORT_C virtual TBool DoConvertL(); // these default to leaving with KErrNotSupported - virtual TUid Uid()=0; - IMPORT_C virtual TInt Capabilities(); // defaults to "everything" - IMPORT_C virtual void CancelConvert(); // for any cleanup - IMPORT_C virtual CConverterBase* EmbeddedObjectL(TDataType& aType); - IMPORT_C virtual TBool GetEmbeddedFileName(TFileName& aFileName); - IMPORT_C virtual void ExtendedInterfaceL(TUid aInterfaceUid, CBase*& aInterface); - IMPORT_C virtual void Reserved_1(); - IMPORT_C virtual void Reserved_2(); -private: - TUid iDestructionKey; - TInt iSpare; - }; -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/concnf.h --- a/epoc32/include/concnf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__CONCNF_H__) -#define __CONCNF_H__ - -#include -#include -#include -#include -#include -#include - -/** -@publishedAll -@released -*/ -#define KMaxTranslation 50 - -/** Buffer to contain a localised data type name. - -@publishedAll -@released */ -typedef TBuf TTranslation; - - -class TLanguageInfo -/** Holds a localised name for a data type. - -@publishedAll -@released */ - { -public: - TLanguageInfo(); - IMPORT_C TLanguageInfo(TLanguage aLanguage,TTranslation aTranslation); -public: - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - TLanguage Language(); - TTranslation Translation(); - void ReadFromResource(TResourceReader& aReader); -public: - TLanguage iLanguage; - TTranslation iTranslation; - }; - -class CMimeInfo : public CBase -/** Holds the localised names for a data type. - -@publishedAll -@released */ - { -public: - IMPORT_C ~CMimeInfo(); - IMPORT_C static CMimeInfo* NewLC(TDataType& aMime); - static CMimeInfo* NewL(); - static CMimeInfo* NewLC(const CMimeInfo* aInfo); -public: - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - TDataType Mime(); - TTranslation Text(); - IMPORT_C void AddLanguageL(TLanguageInfo aLang); - static CMimeInfo* NewLC(TResourceReader& aReader); -private: - void ConstructL(); - void ConstructL(TResourceReader& aReader); - void AddLanguageInfoL(TResourceReader& aReader); -private: - TDataType iMime; - CArrayFixFlat *iLanguageInfo; - }; - -class CCnaConverter : public CBase -/** Holds the inherent properties of a converter. - -These are its UID and the data types it supports. - -Note that the setter functions affect only the current object, not the stored -information for the converter. - -@publishedAll -@released */ - { -public: - static CCnaConverter* NewLC(); - static CCnaConverter* NewL(); - IMPORT_C static CCnaConverter* NewL(TUid aUid); - IMPORT_C static CCnaConverter* NewLC(TUid aUid); - IMPORT_C static CCnaConverter* NewL(const CCnaConverter& aConverter); - IMPORT_C static CCnaConverter* NewLC(const CCnaConverter& aConverter); - IMPORT_C ~CCnaConverter(); - IMPORT_C void SetUid(TUid aUid); - IMPORT_C TBool MimeFrom(const TDataType& aMimeType) const; - IMPORT_C TBool MimeTo(const TDataType& aMimeType) const; - IMPORT_C TTranslation MimeFromText(const TDataType& aMimeType) const; - IMPORT_C TTranslation MimeToText(const TDataType& aMimeType) const; - IMPORT_C TInt CountFrom() const; - IMPORT_C TInt CountTo() const; - IMPORT_C TDataType MimeFrom(TInt aIndex) const; - IMPORT_C TDataType MimeTo(TInt aIndex) const; - IMPORT_C TTranslation MimeFromText(TInt aIndex) const; - IMPORT_C TTranslation MimeToText(TInt aIndex) const; - inline TUid Uid() const; - static CCnaConverter* NewL(TUid aUid,TResourceReader& aReader); -private: - CCnaConverter(); - void ConstructL(); - TBool FindMime(const TDataType& aMimeType, const CArrayPtrFlat* aList) const; - TTranslation FindMimeText(const TDataType& aMimeType, const CArrayPtrFlat* aList) const; - void ConstructL(TUid aUid,TResourceReader& aReader); - void AddMimeDataL(TResourceReader& aReader, CArrayPtrFlat& aMimeInfo); -private: - TUid iUid; - CArrayPtrFlat* iMimeFrom; - CArrayPtrFlat* iMimeTo; - }; - -inline TUid CCnaConverter::Uid() const -/** Gets the converter UID. - -@return Converter UID */ - {return iUid;} - -class CCnaConvInfoFile2 : public CBase -/** -implementation class -@internalComponent -*/ - { -public: - ~CCnaConvInfoFile2(); - // -protected: - void ConstructL(); -protected: - RFs iFs; - RResourceFile iResourceFile; - CArrayPtr* iConverters; - }; - -/** Encapsulates a collection of converter properties (CCnaConverter) read from a converter -information (.rsc) file. - -@publishedAll -@released -*/ -// Each RSC file contains CCnaConverter information for each -// available CConverterBase2 derived class in its associated DLL. - -// In addition there may be INI files for each converter which supply run time extended -// CCnaConverter information such as additional mime types. -class CCnaConvInfoFileReader2 : public CCnaConvInfoFile2 - { -public: - IMPORT_C static CCnaConvInfoFileReader2* NewLC(const TDesC& aFileName); - IMPORT_C static CCnaConvInfoFileReader2* NewL(const TDesC& aFileName); - IMPORT_C TInt Count(); - IMPORT_C CCnaConverter* AtL(TInt anIndex); - // - IMPORT_C void RestoreL(); -private: - CCnaConvInfoFileReader2(); - void RestoreConverterL(TResourceReader& aReader); - void ConstructL(const TDesC& aFileName); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/confndr.h --- a/epoc32/include/confndr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// This header is useless but we still export it to maintain SC. Should be removed when possible. -// -// diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/conlist.h --- a/epoc32/include/conlist.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__CONLIST_H__) -#define __CONLIST_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__F32FILE_H__) -#include -#endif - -#if !defined(__CONARC_H__) -#include -#endif - -#if !defined(__CONCNF_H__) -#include -#endif - -#if !defined(__IMPLEMENTATION_INFORMATION_H__) -#include -#endif -#if !defined(__ECOM_H__) -#include -#endif - - -/** Creates a converter dll's factory interface object. - -@publishedAll -@deprecated -*/ -typedef CConverterLibrary* (*CreateCConverterLibrary)(); - -struct SConverterInfo -/** Describes a converter, as obtained from a converter list (CCnaConverterList). - -@publishedAll -@released -@see CCnaConverterList */ - { - /** Localised name of the data type. */ - TTranslation iTranslation; - /** Converter UID. */ - TUid iUid; - /** Position of the converter in the list. */ - TInt iIndex; - }; - -class CCnaConverterList : public CBase -/** Provides a list of available converters, allowing clients to search for and -obtain converters for specific source and target data types. - -@publishedAll -@released */ - { -public: - IMPORT_C static CCnaConverterList* NewL(); - IMPORT_C static CCnaConverterList* NewLC(); - IMPORT_C void Release(); - IMPORT_C ~CCnaConverterList(); -// - IMPORT_C TInt CountL(); - inline TInt Count(); - IMPORT_C CConverterBase* NewConverterL(TUid aUid); - IMPORT_C void UpdateL(); - IMPORT_C TUid ConvFromL(const TDataType& aMimeType); // searches for a particular converter - IMPORT_C TUid ConvToL(const TDataType& aMimeType); - IMPORT_C TUid ConverterL(const TDataType& aFrom,const TDataType& aTo); - IMPORT_C void ConvFromListL(const TDataType& aMimeType,CArrayFix* aSConverterInfoArray); - IMPORT_C void ConvToListL(const TDataType& aMimeType,CArrayFix* aSConverterInfoArray); - IMPORT_C TInt MimeTypeFrom(TDataType& aDataType,const SConverterInfo& aConverterInfo) const; - IMPORT_C TInt MimeTypeTo(TDataType& aDataType,const SConverterInfo& aConverterInfo) const; -private: - CCnaConverterList(); - void ConstructL(); - CConverterBase* LoadConverterL(TUid aImplUid); -private: - TBool iDoneScan; - CArrayPtr* iConverters; - RImplInfoPtrArray iImplementationArray; - }; - -class ConverterListUtil -/** @internalComponent */ - { -public: - static CConverterBase* UtilityConverterL(TUid aUid); - static TInt CountUtilityConverters(); - }; - -inline TInt CCnaConverterList::Count() -/** @deprecated - -Deprecated - Use CCnaConverterList::CountL instead. -Rescan of the disk to refresh the list of converters could leave. */ - { - return CountL(); - } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/conplugin.rh --- a/epoc32/include/conplugin.rh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// HEADER INFO -// Describes the converter. -// -// - - - -/** - @publishedAll - @released -*/ -STRUCT CONARC_RESOURCE_FILE - { - /** Future use, do not use */ - LLINK extension = 0; - // - LEN WORD STRUCT converter_list[]; // Converter_data - } - -STRUCT CONVERTER_DATA -/** Describes a converter within a converter DLL. - -@publishedAll -@released */ - { - /** Future use, do not use */ - LLINK extension = 0; - /** The UID of the converter. */ - LONG conv_uid; - // - /** Array of MIME resources describing the data types that the converter can convert. - - Target type: MIME */ - LEN WORD STRUCT from_list[]; // Mime Type - /** Array of MIME resources describing the data types to which the converter can convert. - - Target type: MIME */ - LEN WORD STRUCT to_list[]; // Mime Type - // - } - -/** -@publishedAll -@released -*/ -#define KMaxMimeType 256 - -/** -@publishedAll -@released -*/ -#define KMaxTranslation 50 - -STRUCT MIME -/** Describes a data type that a converter can convert to or from. - -@publishedAll -@released */ - { - /** Future use, do not use */ - LLINK extension = 0; - /** The supported MIME type, e.g. text/html. */ - LTEXT8 type(KMaxMimeType); - /** Array of LANG_DATA resources giving localised human-readable names for the MIME type. - - Target type: LANG_DATA */ - LEN WORD STRUCT lang_list[] ; //lang_data - } - -STRUCT LANG_DATA -/** A localised human-readable name for a MIME type. - -@publishedAll -@released */ - { - /** Future use, do not use */ - LLINK extension = 0; - /** The ID of the language being used.Values should be as defined in TLanguage. */ - WORD lang_id; - /** The human-readable name for the MIME type. */ - LTEXT translation(KMaxTranslation); - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/crulemarkedstack.h --- a/epoc32/include/crulemarkedstack.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// A speciales marked stack specifically for PARSE rules. -// Allows a rule stack to merge rules upto a given mark type. -// -// - -#ifndef __CRULEMARKEDSTACK_H__ -#define __CRULEMARKEDSTACK_H__ - - -// includes -#include -#include -#include - -#pragma warning (disable : 4127) // conditional expression is constant - - -template -class CRuleMarkedStack : public CMarkedStack -/** -@publishedAll -@released -*/ - { -public: - void MergeToMarkL(TInt aMarkType); - }; - -#include - -#pragma warning ( default : 4127 ) // conditional expression is constant - -#endif // __CRULEMARKEDSTACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/csendasaccounts.h --- a/epoc32/include/csendasaccounts.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CSENDASACCOUNTS_H__ -#define __CSENDASACCOUNTS_H__ - -#include -#include -#include - -// Forward declarations -class RReadStream; -class RWriteStream; - -/** -Identifies accounts for use by SendAs. - -@publishedAll -@released -*/ -typedef TMsvId TSendAsAccount; - -/** -Provides human-readable names and IDs for the list of accounts for a given -message type. - -@publishedAll -@released -*/ -class CSendAsAccounts : public CBase - { -public: - IMPORT_C static CSendAsAccounts* NewL(); - IMPORT_C virtual ~CSendAsAccounts(); - - IMPORT_C TUid MessageType() const; - IMPORT_C void SetMessageType(TUid aMessageType); - - IMPORT_C const MDesCArray& AccountNames() const; - IMPORT_C TSendAsAccount Account(TInt aIndex) const; - IMPORT_C TPtrC NameFromAccountL(const TSendAsAccount aAccount) const; - IMPORT_C TSendAsAccount AccountFromNameL(const TDesC& aName) const; - IMPORT_C TInt Count() const; - IMPORT_C void Reset(); - - IMPORT_C void InternalizeL(RReadStream& aReadStream); - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const; - - IMPORT_C void AppendAccountL(const TDesC& aAccountName, TSendAsAccount aAccount); - IMPORT_C void RemoveAccount(TInt aIndex); - IMPORT_C TInt Size() const; - -private: - CSendAsAccounts(); - void ConstructL(); - -private: - TUid iMessageType; - CDesCArrayFlat* iAccountNames; - RArray iAccounts; - }; - -#endif // __CSENDASACCOUNTS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/csendasmessagetypes.h --- a/epoc32/include/csendasmessagetypes.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CSENDASMESSAGETYPES_H__ -#define __CSENDASMESSAGETYPES_H__ - -#include -#include - -// Forward declarations -class RReadStream; -class RWriteStream; - -/** -Provides human-readable names and UIDs for the filtered list of message types. - -@publishedAll -@released -*/ -class CSendAsMessageTypes : public CBase - { -public: - IMPORT_C static CSendAsMessageTypes* NewL(); - IMPORT_C virtual ~CSendAsMessageTypes(); - - IMPORT_C const MDesCArray& AvailableMessageTypes() const; - IMPORT_C TUid MessageTypeUid(TInt aIndex) const; - IMPORT_C TPtrC NameFromUidL(const TUid aUid) const; - IMPORT_C TUid UidFromNameL(const TDesC& aName) const; - IMPORT_C TInt Count() const; - IMPORT_C void Reset(); - - IMPORT_C void InternalizeL(RReadStream& aReadStream); - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const; - - IMPORT_C void AppendMessageTypeL(const TDesC& aMessageTypeName, TUid aMessageTypeUid); - IMPORT_C void RemoveMessageType(TInt aIndex); - IMPORT_C TInt Size() const; - -private: - CSendAsMessageTypes(); - void ConstructL(); - -private: - CDesCArrayFlat* iMessageTypeNames; - RArray iMessageTypeUids; - }; - -#endif // __CSENDASMESSAGETYPES_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/csmsaccount.h --- a/epoc32/include/csmsaccount.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CSMSACCOUNT_H__ -#define __CSMSACCOUNT_H__ - - -#include -#include - - -class CSmsSettings; -class CMsvOffPeakTimes; -class CMsvScheduleSettings; -class CMsvSendErrorActions; -class CMsvSysAgentActions; -class CRepository; - - -/** -Stores SMS service and Schedule Send settings to Central Repository. - -@publishedAll -@released -*/ -class CSmsAccount : public CBase, public MMsvSessionObserver - { -public: - - IMPORT_C static CSmsAccount* NewL(); - IMPORT_C static CSmsAccount* NewLC(); - IMPORT_C virtual ~CSmsAccount(); - - IMPORT_C void InitialiseDefaultSettingsL(CSmsSettings& aSmsSettings); - IMPORT_C void InitialiseDefaultSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions); - IMPORT_C void LoadSettingsL(CSmsSettings& aSmsSettings); - IMPORT_C void LoadSettingsL(CMsvScheduleSettings& aScheduleSettings, CMsvOffPeakTimes& aOffPeakTimes, CMsvSendErrorActions& aErrorActions, CMsvSysAgentActions& aSysAgentActions); - IMPORT_C void SaveSettingsL(const CSmsSettings& aSmsSettings) const; - IMPORT_C void SaveSettingsL(const CMsvScheduleSettings& aScheduleSettings, const CMsvOffPeakTimes& aOffPeakTimes, const CMsvSendErrorActions& aErrorActions, const CMsvSysAgentActions& aSysAgentActions) const; - -private: - CSmsAccount(); - void ConstructL(); - void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* ); - CMsvSession& SessionL(); - - TMsvId CreateSmsServiceL(); - void ResetSettings(); - -private: - enum TSmsSettingsCenRepId - { - // Service Settings - ESmsServiceId = 0x00000000, - ESmsSettingsVersionId = 0x00000001, - ESmsSettingsMesssageVersionId = 0x00000002, - ESmsValidityPeriodId = 0x00000003, - ESmsValidityPeriodFormatId = 0x00000004, - ESmsAlphabetId = 0x00000005, - ESmsMsgFlagsId = 0x00000006, - ESmsMessageConversionId = 0x00000007, - ESmsFlagsId = 0x00000008, - ESmsStatusReportHandlingId = 0x00000009, - ESmsSpecialMessageHandlingId = 0x0000000A, - ESmsCommDbActionId = 0x0000000B, - ESmsDeliveryId = 0x0000000C, - ESmsDefaultSCId = 0x0000000D, - ESmsSCAddressesCountId = 0x0000000E, - ESmsBearerActionId = 0x0000000F, - ESmsBearerId = 0x00000010, - ESmsClass2FolderId = 0x00000020, - ESmsDescriptionLengthId = 0x00000030, - ESmsAccountNameId = 0x00000040, - - ESmsSCAddressesPartialId = 0x00001000, - EMsgSMSTimeStampSettings = 0x000A0020 - }; - -private: - CMsvSession* iMsvSession; - CRepository* iRepository; - }; - -#endif // __CSMSACCOUNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/csmsclass0base.h --- a/epoc32/include/csmsclass0base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Base class for Class 0 SMS plugin -// -// - - - -/** - @publishedAll - @released -*/ - -#ifndef __CSMSCLASS0BASE_H_ -#define __CSMSCLASS0BASE_H_ - -#include - -class CSmsClass0Base : public CBase - { - -public: - virtual void DisplayMessageHandler(TDesC8& aSmsMessage, TBool aComplete); - ~CSmsClass0Base(); - -protected: - CSmsClass0Base(); - - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/csmsemailfields.h --- a/epoc32/include/csmsemailfields.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __CSMSEMAILFIELDS_H__ -#define __CSMSEMAILFIELDS_H__ - -#include -#include -#include - -class CMsvStore; - -/** -Encapsulates the address and subject fields for Email sent over SMS. - -@publishedAll -@released -*/ -class CSmsEmailFields : public CBase - { -public: - IMPORT_C static CSmsEmailFields* NewL(); - IMPORT_C static CSmsEmailFields* NewL(const CSmsEmailFields& aEmailFields); - IMPORT_C virtual ~CSmsEmailFields(); - - IMPORT_C void Reset(); - IMPORT_C TInt Length() const; - IMPORT_C TBool HasAddress() const; - IMPORT_C HBufC* ComposeLC() const; - TInt ParseL(const TDesC& aBuffer); - - IMPORT_C void AddAddressL(const TDesC& aAddress); - IMPORT_C void RemoveAddress(TInt aIndex); - IMPORT_C const MDesCArray& Addresses() const; - - IMPORT_C void SetSubjectL(const TDesC& aSubject); - IMPORT_C const TDesC& Subject() const; - - void RestoreL(CMsvStore& aStore); - void StoreL(CMsvStore& aStore) const; -private: - CSmsEmailFields(); - void ConstructL(); - void ConstructL(const CSmsEmailFields& aEmailFields); - - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; -private: - CDesCArray* iAddresses; - HBufC* iSubject; - }; - -#endif // __CSMSEMAILFIELDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/cstack.h --- a/epoc32/include/cstack.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// A template class to provide a classic stack like interface & functionality -// The entries on the stack are owned (i.e. deleted) by the stack if the -// StackOwnsEntry argument is ETrue -// -// - -#ifndef __CSTACK_H__ -#define __CSTACK_H__ - -#include - -#pragma warning (disable : 4127) // conditional expression is constant - - -/** - @file - @publishedAll - @released -*/ - - -template -class CStack : /*protected CArrayPtrSeg*/ public CArrayPtrSeg - { -public: - inline CStack(); - inline ~CStack(); - - inline void Clear(); - inline TBool IsEmpty() const; - inline void PushL(T* aItem); - inline T* Pop(); - inline T* Head() const; - inline T* Last() const; - }; - -#include - -#pragma warning ( default : 4127 ) // conditional expression is constant - -#endif // __CSTACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/dtdnode.h --- a/epoc32/include/dtdnode.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// DTD node header -// -// - -#if !defined(__CDTDNODE_H__) -#define __CDTDNODE_H__ - -#include -#include - -class CDTDNode : public CBNFNode -/** -Document Type Definition (DTD) node that forms part of a DTD tree. -@publishedAll -@released -*/ -{ -public: - //##ModelId=3B66675300CE - inline ~CDTDNode(); - - //##ModelId=3B66675300CD - static inline CDTDNode* NewL(); - //##ModelId=3B66675300CC - inline void AddCompletedAttributeL(); - - //##ModelId=3B66675300C4 - const TDesC* CompletedAttrID(); - - enum{ // attribute IDs start at -6000 - KCompletedAttrID = -6000 - }; -private: - //##ModelId=3B66675300C3 - inline CDTDNode(); -}; - - -#include - -#endif // __CDTDNODE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikamnt.h --- a/epoc32/include/eikamnt.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKAMNT_H__ -#define __EIKAMNT_H__ - -#include - -class CGulIcon; -class MEikAutoMenuObserver; - -/** A menu title that will be added to a standard resource-constructed menu bar. - -If added to the CEikAutoMenuTitleArray stored by CEikonEnv during standard -application start up, the menu pane specified will appear in all applications. -The menu observer passed in is notified of any events on such menu panes in -preference to the usual observer (CAppUi). - -@publishedAll -@released */ -NONSHARABLE_CLASS(CEikAutoMenuTitle) : public CBase - { -public: - /** Specifies the position of a menu title in a menu. - - If an array of menu titles holds more than one menu title that is specified - for the start or end of a menu, the menu titles are placed in the same order - as that in which they appear in the array. This means the first menu title - specified with EStart in an array will be the first on a menu bar and the last - EEnd will be the last on a menu bar. */ - enum TTitlePos - { - /** The menu title is placed first in a menu. */ - EStart, - /** The menu title is placed last in a menu. */ - EEnd - }; - enum { ENominalTextLength=40 }; -public: - IMPORT_C static CEikAutoMenuTitle* NewLC(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver, - TInt aMenuPaneResourceId = 0, CGulIcon* aIcon = NULL); - IMPORT_C ~CEikAutoMenuTitle(); -private: - CEikAutoMenuTitle(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver, - TInt aMenuPaneResourceId, CGulIcon* aIcon); -public: - TTitlePos iPos; - TBuf iText; - MEikAutoMenuObserver& iMenuObserver; - TInt iMenuPaneResourceId; - CGulIcon* iIcon; - }; - - -/** Creates a standard array of CEikAutoMenuTitle objects. - -@publishedPartner -@released */ -NONSHARABLE_CLASS(CEikAutoMenuTitleArray) : public CArrayPtrFlat -// If more than one title is specified for the start or end, they will be placed in the same order they appear -// in the array (so the first EStart in the array will be the first on a menu bar also but the last EEnd will -// be the last). - { -public: - CEikAutoMenuTitleArray(); - ~CEikAutoMenuTitleArray(); - }; - -#endif // __EIKAMNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikapp.h --- a/epoc32/include/eikapp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKAPP_H__ -#define __EIKAPP_H__ - -#include // class CApaApplication -#include - -class CCoeEnv; - -/** The base of all Uikon applications. - -CEikApplication builds on CApaApplication, providing a basis for applications -working within the framework provided by Uikon. It also contains an interface -to the resource file and the document object belonging to the application. - -Each Uikon application class is derived from CEikApplication. Application -writers must provide at least an implementation of the pure virtual function -CreateDocumentL(). - -The application's resource file can be changed from the default by overriding -ResourceFileName(). - -@publishedAll -@released -@see CEikDocument */ -class CEikApplication : public CApaApplication - { -public: - IMPORT_C ~CEikApplication(); - inline TInt ResourceFileOffset() const; - inline CApaProcess* Process() const; - inline const TApaAppCaption& AppCaption() const; - IMPORT_C virtual void GetDefaultDocumentFileName(TFileName& aDocumentName) const; - IMPORT_C virtual TFileName BitmapStoreName() const; -public: // from CApaApplication - IMPORT_C CDictionaryStore* OpenIniFileLC(RFs& aFs) const; - IMPORT_C void Capability(TDes8& aInfo) const; - IMPORT_C void SetToIniFileNameL(TParse& aParser) const; -protected: // from CApaApplication - IMPORT_C void PreDocConstructL(); - IMPORT_C CApaDocument* CreateDocumentL(CApaProcess* aProcess); - IMPORT_C void NewAppServerL(CApaAppServer*& aAppServer); -protected: - IMPORT_C CEikApplication(); - IMPORT_C void EnsureCaptionIsLocalisedL(const TDesC& aLocalisableResourceFile); -public: - IMPORT_C virtual TFileName ResourceFileName() const; -private: - IMPORT_C virtual void CEikApplication_Reserved1(); - IMPORT_C virtual void CEikApplication_Reserved2(); -private: - /** - @publishedAll - @released - */ - virtual CApaDocument* CreateDocumentL()=0; -private: // internal use - void InitAppNameParserWithPathAndExt(TParse& aParser, const TDesC& aPath, const TDesC& aExt) const; -protected: - CCoeEnv* iCoeEnv; - TInt iResourceFileOffset; -private: - enum - { - EFlagCaptionCorrectlyLocalised = 0x00000001 - }; -private: - CApaProcess* iProcess; - TApaAppCaption iCaption; - TApaAppCapabilityBuf* iCapabilityBuf; - TUint iAppFlags; - TInt iSpare; - }; - -/** Gets the offset value defined for this application's default resource file. - -As the resource file offset can also be accessed through iResourceFileOffset, -this function should not be needed by any apps. - -@return Offset of a resource file. */ -inline TInt CEikApplication::ResourceFileOffset() const - { return iResourceFileOffset; } - - -/** Gets the managing process. - -@return A pointer to the process object managing this application's documents. */ -inline CApaProcess* CEikApplication::Process() const - { return iProcess; } - - -/** Gets the caption for this application. - -Captions are displayed in the task list. - -@return Application caption. */ -inline const TApaAppCaption& CEikApplication::AppCaption() const - { return iCaption; } - -#endif // __EIKAPP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikappui.h --- a/epoc32/include/eikappui.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKAPPUI_H__ -#define __EIKAPPUI_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class CEikDocument; -class CEikApplication; -class CEikAppUiExtra; -class MApaEmbeddedDocObserver; -struct SExtendedError; -class CApaCommandLine; - -/** Handles application-wide aspects of the application's user interface such -as the menu bar, toolbar pop-up menus, opening and closing files and exiting the -application cleanly. - -Every GUI application should use its own class derived from CEikAppUi. - -An app UI's main role is to handle commands, in its HandleCommandL() function. -These may be invoked using the menu bar, toolbar, or hotkeys; the commands -that an app UI handles are specified in the application's resource file. - -In addition, the app UI normally needs to respond to other kinds of events, by -providing suitable implementations of the following virtual functions, all -inherited from CCoeAppUi: - -- HandleKeyEventL(): Key events. - -- HandleForegroundEventL(): Application switched to foreground. - -- HandleSwitchOnEventL(): Machine switched on. - -- HandleSystemEventL(): System events. - -- HandleApplicationSpecificEventL(): Application-specific events. - -@publishedAll -@released */ -class CEikAppUi : public CCoeAppUi, public MEikMenuObserver, public MCoeMessageObserver, public MObjectProvider - { -public: - IMPORT_C ~CEikAppUi(); - IMPORT_C CEikAppUi(); -public: // new functions - IMPORT_C virtual void ConstructL(); - IMPORT_C virtual void HandleModelChangeL(); - IMPORT_C TLanguage ApplicationLanguageL() const; - IMPORT_C CEikApplication* Application() const; - IMPORT_C CEikDocument* Document() const; - IMPORT_C void SetDocument(CEikDocument* aDocument); - inline CEikAppUi* ContainerAppUi() const; - IMPORT_C void SetEmbeddedDocInfo(MApaEmbeddedDocObserver* aObserver, TBool aReadOnly); - IMPORT_C virtual TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); - IMPORT_C virtual TBool ProcessCommandParametersL(CApaCommandLine& aCommandLine); - // Application screen extent - IMPORT_C TRect ClientRect() const; - IMPORT_C virtual TRect ApplicationRect() const; - // Menu utilities - IMPORT_C void LaunchPopupMenuL(TInt aResourceId, const TPoint& aTargetPos, TPopupTargetPosType aTargetType, const CEikHotKeyTable* aHotKeyTable = NULL); - IMPORT_C virtual void StopDisplayingMenuBar(); - // Fading effect - IMPORT_C TBool FadeWhenInBackground(); - IMPORT_C virtual void SetFadedL(TBool aFaded); - inline void SetFaded(TBool aFaded); //mm: has no implementation -public: // new function - IMPORT_C virtual void ReportResourceChangedToAppL(TInt aType); - IMPORT_C virtual void HandleCommandL(TInt aCommand); - IMPORT_C virtual void ProcessMessageL(TUid aUid, const TDesC8& aParams); - IMPORT_C virtual void OpenFileL(const TDesC& aFileName); - IMPORT_C virtual void CreateFileL(const TDesC& aFileName); - IMPORT_C virtual TErrorHandlerResponse HandleError(TInt aError, const SExtendedError& aExtErr, TDes& aErrorText, TDes& aContextText); - IMPORT_C virtual void HandleResourceChangeL(TInt aType); -public: // from CCoeAppUi - IMPORT_C void PrepareToExit(); -protected: // new functions - // Construction - IMPORT_C void BaseConstructL(TInt aAppUiFlags = 0); - IMPORT_C void ReadAppInfoResourceL(TInt aResourceFileOffset = 0); - IMPORT_C void CreateHotKeyControlL(TInt aResourceId); - IMPORT_C TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName); - // User data change management - IMPORT_C void SetDocChanged(); - IMPORT_C void SaveAnyChangesL(); - IMPORT_C void SaveL(); - IMPORT_C virtual void Exit(); - // Utility - IMPORT_C void ClosePopup(); //mm: deprecate? -protected: // from MEikMenuObserver - IMPORT_C void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable); -protected: // from CCoeAppUi - IMPORT_C void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent); - IMPORT_C void HandleForegroundEventL(TBool aForeground); - IMPORT_C void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); - IMPORT_C void HandleSystemEventL(const TWsEvent& aEvent); - IMPORT_C void HandleScreenDeviceChangedL(); -protected: // from MEikCommandObserver - IMPORT_C void ProcessCommandL(TInt aCommand); -private: // from MEikMenuObserver - IMPORT_C void SetEmphasis(CCoeControl* aMenuWindow,TBool aEmphasis); -protected: // from MCoeMessageObserver - IMPORT_C MCoeMessageObserver::TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8& aMessageParameters); -protected: // from MObjectProvider - IMPORT_C virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId); - IMPORT_C virtual MObjectProvider* MopNext(); -private: - // Validate document file type - IMPORT_C virtual TBool ValidFileType(TUid aFileUid) const; -private: // spare virtuals - IMPORT_C virtual void Reserved_3(); - IMPORT_C virtual void Reserved_4(); -public: - /** Application resource file and screen furniture flags, passed to BaseConstructL(). */ - enum - { - /** Application uses a standard resource file. */ - EStandardApp = 0x00, - /** Application has no resource file. */ - ENoAppResourceFile = 0x01, - /** Application uses a different resource file from the standard. */ - ENonStandardResourceFile= 0x02, - /** Application uses no screen furniture. */ - ENoScreenFurniture = 0x04, - /** Indicates the last value in the enum. */ - ELastReservedEikAppUiFlag = 0x8000 - }; -public: - IMPORT_C void ReportResourceChangedToAppStackL(CEikAppUi* aTopApp, TInt aEventId); - CEikAppUiExtra* AppUiExtra(); -private: - void CreateResourceIndependentFurnitureL(); - TBool ValidFileExistsL(const TDesC& aFileName); -protected: - /** A pointer to the application's document. */ - CEikDocument* iDocument; - /** A pointer to the containing app UI. This is NULL for non-embedded - apps. */ - CEikAppUi* iContainerAppUi; - /** Embedded document observer. */ - MApaEmbeddedDocObserver* iDoorObserver; - /** Indicates whether or not this is the app UI for an embedded, - read-only document. */ - TBool iEmbeddedAndReadOnly; - TInt iFlags; -private: - enum - { - EEmbedded = 0x01 - }; -private: - CEikAppUiExtra* iAppUiExtra; - }; - - - -/** Returns the app UI inside which this app UI is embedded. -Embedded app UIs are used for editing embedded documents. - -@return A pointer to this object's container app UI. NULL if this app -UI is not embedded */ -inline CEikAppUi* CEikAppUi::ContainerAppUi() const - { return iContainerAppUi; } - -#endif // __EIKAPPUI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikaufty.h --- a/epoc32/include/eikaufty.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Defines mix-in interace to break dependencey of Eikon Application UI -// on controls -// -// - -#ifndef __EIKAUFTY_H__ -#define __EIKAUFTY_H__ - -#include -#include -#include - -#include - -class CEikHotKeyTable; -class CEikMenuBar; -class CEikMenuPane; -class CEikCommandButton; -class CEikToolBar; -class CEikButtonGroupContainer; -class CEikAppUi; -class CEikonEnv; -class CEikStatusPane; - - -/** This class defines a mixin interface to break the dependency of the Uikon Application -User Interface on controls. - -@publishedAll -@released */ -class MEikAppUiFactory : public MObjectProvider - { -public: - virtual void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi) =0; - virtual TRect ClientRect() = 0; - virtual void ReadAppInfoResourceL(TInt aResourceFileOffset,CEikAppUi* aAppUi) = 0; - virtual void LaunchPopupMenuL( TInt aResourceId, - const TPoint& aTargetPos, - TPopupTargetPosType aTargetType, - const CEikHotKeyTable* aHotKeyTable, - CEikAppUi* aAppUi) = 0; - - virtual void DoLaunchPopupL(TInt aResourceId,const TPoint& aTargetPos, const CEikHotKeyTable* aHotKeyTable, - TPopupTargetPosType aTargetType,CEikAppUi* aAppUi) = 0; - - virtual void ClosePopup(CEikAppUi* aAppUi) = 0; - virtual void StopDisplayingMenuBar() = 0; - virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos, - const CEikHotKeyTable* aHotKeyTable,CEikAppUi* aAppUi) = 0; - virtual void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi) = 0; - /** Gets a pointer to the menu bar. - - @return Pointer to the menu bar. */ - virtual CEikMenuBar* MenuBar() const = 0; - /** Replaces or clears a menu bar, returning a pointer to the replaced menu bar. - - @param aMenu The new menu bar. This can be NULL to clear an existing menu bar. - @return Pointer to the replaced menu bar. */ - virtual CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu) = 0; - virtual CEikMenuPane* Popup() const = 0; - /** Gets a pointer to the tool bar. - - @return Pointer to the tool bar. */ - virtual CEikButtonGroupContainer* ToolBar() const = 0; - /** Replaces or clears a button group, returning a pointer to the replaced button - group. - - @param aNewGroup The new button group. This can be NULL to clear an existing - button group. - @return Pointer to the replaced button group. */ - virtual CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup) = 0; - /** Gets a pointer to the tool band. - - @return Pointer to the tool band. */ - virtual CEikToolBar* ToolBand() const = 0; - /** Gets a pointer to the title band. - - @return Pointer to the title band. */ - virtual CEikToolBar* TitleBand() const = 0; - /** Gets a pointer to the status pane. - - @return Pointer to the status pane */ - virtual CEikStatusPane* StatusPane() const = 0; - /** Gets a pointer to the CBA. - - @return Pointer to the CBA */ - virtual CEikButtonGroupContainer* Cba() const = 0; - inline CEikToolBar* SwapToolBand(CEikToolBar* aToolBand); - inline CEikToolBar* SwapTitleBand(CEikToolBar* aTitleBand); - /** Creates a standard tab button. - - @return Pointer to the created tab button. */ - virtual CEikCommandButton* CreateStandardTabButtonL() const = 0; - virtual void CreateEmbeddedL(CEikonEnv& aEikonEnv) = 0; - virtual void DestroyEmbedded(CEikonEnv& aEikonEnv) = 0; - virtual void HandleResourceChangeL(TInt aType) = 0; -protected: - /** Defines the type of tool bar. */ - enum TToolBarType - { - /** Defines a band tool bar. */ - EBand, - /** Defines a title tool bar. */ - ETitle - }; -private: - virtual CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType) = 0; - }; - - - -/** Replaces or clears a tool band, returning a pointer to the replaced tool band. - -@param aToolBand The new tool band. This can be NULL to clear an existing -tool band. -@return Pointer to the replaced tool band. */ -inline CEikToolBar* MEikAppUiFactory::SwapToolBand(CEikToolBar* aToolBand) - {return SwapToolBar(aToolBand,EBand);} - - -/** Replaces or clears a title band, returning a pointer to the replaced title -band. - -@param aTitleBand The new title band. This can be NULL to clear an existing -title band. -@return Pointer to the replaced title band. */ -inline CEikToolBar* MEikAppUiFactory::SwapTitleBand(CEikToolBar* aTitleBand) - {return SwapToolBar(aTitleBand,ETitle);} - -#endif // __EIKAUFTY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikbhelp.h --- a/epoc32/include/eikbhelp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKBHELP_H__ -#define __EIKBHELP_H__ - -#include - -const TUid KEikBubbleHelpUid={0x10008E48}; - -class CCoeControl; - -/** -@publishedPartner -@deprecated -*/ -class MEikTriggeredHelp - { -// The MEikTriggeredHelp class defines an interface for UI classes -// to implement triggered, transient help message display. -public: - virtual void TriggerHelp(const TDesC& aDes,const TRect& aRect,TInt aHandle)=0; - virtual void CancelHelp()=0; - virtual void CancelHelpTrigger()=0; - virtual TBool IsDisplayingHelp(TInt aHandle)=0; - virtual void Release()=0; -protected: - IMPORT_C virtual void MEikTriggeredHelp_Reserved_1(); - IMPORT_C virtual void MEikTriggeredHelp_Reserved_2(); - }; - - -/** Provides the static functions that control bubble help. - -Bubble help is a feature that enables short help messages to be displayed -for controls in transient windows which pop up close to the control bodies. - -@publishedAll -@released */ -class EikBubbleHelp - { -public: - IMPORT_C static void Trigger(const TDesC& aDes,const TRect& aRect,TInt aHandle=-1); - IMPORT_C static void Cancel(); - IMPORT_C static void CancelTrigger(); - IMPORT_C static TBool IsDisplaying(TInt aHandle); - }; - - -/** -@publishedPartner -@deprecated -*/ -class CEikBubbleHelp : public CCoeStatic -// The CEikBubbleHelp class implements global static storage and access to the object providing bubble help -// for the application. - { - ~CEikBubbleHelp(); -public: - IMPORT_C static void SetTriggeredHelpL(MEikTriggeredHelp* aTriggeredHelp); -public: - static void Trigger(const TDesC& aDes,const TRect& aRect,TInt aHandle=-1); - static void Cancel(); - static void CancelTrigger(); - static TBool IsDisplaying(TInt aHandle); -private: - inline CEikBubbleHelp(); - inline static CEikBubbleHelp* Self(); -private: - MEikTriggeredHelp* iHelp; - }; - -inline CEikBubbleHelp::CEikBubbleHelp() - : CCoeStatic(KEikBubbleHelpUid) - {} - -inline CEikBubbleHelp* CEikBubbleHelp::Self() - {return STATIC_CAST(CEikBubbleHelp*,CCoeEnv::Static(KEikBubbleHelpUid));} - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikcmobs.h --- a/epoc32/include/eikcmobs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKCMOBS_H__ -#define __EIKCMOBS_H__ - -#include - -class CCoeControl; - -/** Command observers respond to user commands, and have the secondary function -of creating custom controls on request for classes such as CEikToolbar, or -user-defined classes. - -An implementation of the pure virtual function ProcessCommandL() must be provided -for each concrete class derived from MEikCommandObserver. CreateCustomCommandControlL() -may also be re-implemented. - -@publishedAll -@released */ -class MEikCommandObserver - { -public: - /** Processes user commands. - - Derived classes must provide an implementation of this function which responds - to user commands appropriately based on a user-defined ID for the command. - - @param aCommandId ID of the command to respond to. */ - virtual void ProcessCommandL(TInt aCommandId)=0; - /** Glue for creating custom controls. - - This function can be called to create custom controls on request from their - control ID. Custom controls are user-supplied control classes. - - Given the ID of a custom control, this function should return a pointer to - a newly-instantiated and fully constructed control. If the ID is unrecognised, - NULL should be returned. The control returned will be owned by the caller. - - @param aControlType A custom control ID. - @return By default, NULL. */ - IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); -protected: - IMPORT_C MEikCommandObserver(); -private: - IMPORT_C virtual void MEikCommandObserver_Reserved1(); - IMPORT_C virtual void MEikCommandObserver_Reserved2(); -private: - TInt iMEikCommandObserver_Reserved1; - }; - -#endif // __EIKCMOBS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikdef.h --- a/epoc32/include/eikdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,321 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKDEF_H__ -#define __EIKDEF_H__ - -#include -#include - -/** This is used in combination with a specified position to place a popout on -the display. - -The TPopupTargetPosType enum identifies which corner of the popout -will be placed in the given target position. The default is the top left corner. - -@publishedAll -@released */ -enum TPopupTargetPosType - { - /** Places the popout with the top left corner in the specified position. */ - EPopupTargetTopLeft, - /** Places the popout with the top right corner in the specified position. */ - EPopupTargetTopRight, - /** Places the popout with the bottom left corner in the specified position. */ - EPopupTargetBottomLeft, - /** Places the popout with the bottom right corner in the specified position. */ - EPopupTargetBottomRight - }; - - -/** Defines the printer port settings. This is used by GUI print dialogs.*/ -enum TEikPortFlag - { - /** Printing is via a serial port.*/ - ESerialPort = 0x01, - /** Printing is via a parallel port.*/ - EParallelPort = 0x02, - /** Printing is via infra red.*/ - EIrdaPort = 0x04, - /** Printing is to a file. */ - EFilePort = 0x08, - /** Printing is via a PC.*/ - EViaPCPort = 0x10 - }; - -/** Macro to allow easy access to the CEikonEnv instance. - -@publishedAll -@released -*/ -#define iEikonEnv (STATIC_CAST(CEikonEnv*,iCoeEnv)) - -/** Defines the border style for an editable control. - -@publishedPartner -@released -*/ -#define KEikEditableControlBorder TGulBorder::EShallowSunken - -/** Name of the default bitmap store. - -@publishedPartner -@released -*/ -_LIT(KEikDefaultAppBitmapStore,"*"); - -/** Uid of the KEikMessageColorSchemeChange message. - -@publishedPartner -@released -*/ -const TInt KUidValueEikColorSchemeChangeEvent =0x10006956; - -/** -@internalComponent -*/ -const TInt KEikCustomColorsArrayValue =0x100057C2; - -/** Indicates that all windows should appear faded. - -@publishedAll -@released -*/ -const TInt KEikMessageFadeAllWindows =0x100056C2; - -/** Indicates that all windows should appear unfaded. - -@publishedAll -@released -*/ -const TInt KEikMessageUnfadeWindows =0x100056C3; - -/** Indicates that the colour scheme has changed. - -@publishedAll -@released -*/ -const TInt KEikMessageColorSchemeChange =KUidValueCoeColorSchemeChangeEvent; - -/** Indicates that the color scheme has changed. - -@publishedAll -@released -*/ -#define KEikColorResourceChange KEikMessageColorSchemeChange // for source compatibility - -/** Indicates that the zoom level has changed. - -@publishedAll -@released -*/ -const TInt KEikMessageZoomChange =KUidValueCoeZoomChangeEvent; - -/** Indicates that a font has changed. Controls should ensure they are using -the right font after receiving this message. - -@publishedAll -@released -*/ -const TInt KEikMessageFontChange = KUidValueCoeFontChangeEvent; - -/** Indicates that the state of the virtual cursor has changed. - -@publishedAll -@released -*/ -const TInt KEikMessageVirtualCursorStateChange =0x10005D0A; - -/** Indicates that caps lock key has been pressed. - -@publishedAll -@released -*/ -const TInt KEikMessageCapsLock =0x100048F9; - -/** Indicates that the application should be ready to save any data that needs saving. - -@publishedAll -@released -*/ -const TInt KEikMessagePrepareForSave =0x100069FD; - -/** Indicates that the level of embedding of the application has changed. - -@publishedAll -@released -*/ -const TInt KEikMessageEmbedLevelChange =0x1000A4AA; - -/** Passed immediately after completion of the call to CCoeEnv::SetAppUi() -when aNewAppUi has become current AppUi. This happens during the destruction of the embedded -AppUi. - -@publishedAll -@released -*/ -const TInt KEikHasBecomeCurrentAppUiWhileEmbeddedAppUiDeletes = 0x10207F75; - -/** Passed immediately before CEikAppUiFactory::CreateEmbeddedL() - -@publishedAll -@released -*/ -const TInt KEikNotifyPreCreateEmbeddedL = 0x10207F67; - -/** Passed immediately after CEikAppUiFactory::CreateEmbeddedL() - -@publishedAll -@released -*/ -const TInt KEikNotifyPostCreateEmbeddedL = 0x10207F65; - -/** Passed immediately after CCoeAppUi::ConstructL() - -@publishedAll -@released -*/ -const TInt KEikPostCoeAppUiConstructL = 0x10207F66; - -/** -@publishedAll -@released -*/ -_LIT8(KDebugStart, "-DebugMemFail:"); - -/** -@publishedPartner -@released -*/ -const TInt KEikDefaultCursorWidth=2; - -/** -@publishedPartner -@released -*/ -const TInt KTimeBetweenClicks=1000000; // in Microseconds - -/** -@publishedPartner -@released -*/ -const TInt KDoubleClickDistance=10; - -/** -@publishedPartner -@released -*/ -const TInt KKeyboardRepeatRate=50000; - -/** -@publishedPartner -@released -*/ -const TInt KKeyboardRepeatInitialDelay=800000; - -/** Resource id of the query dialog. -@publishedPartner -@released -*/ -const TInt KEikResIdQueryDialog =0; - -/** Resource id of the info dialog. -@publishedPartner -@released -*/ -const TInt KEikResIdInfoDialog =1; - -/** -@publishedPartner -@released -*/ -const TInt KEikErrorResolverMaxTextLength = 256; - -/** -@internalTechnology -*/ -#define COMPARE_BOOLS(a,b) (((a) && (b)) || (!(a) && !(b))) - -/** -@internalComponent -*/ -#if defined(_DEBUG) -#define __UHEAP_CHECK_INTEGRITY User::Heap().Check() -#else -#define __UHEAP_CHECK_INTEGRITY -#endif - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_FIRST 32 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_LAST 39 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_SIMPLE 32 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_DIALOG_LOAD 33 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_APP_LAUNCH 34 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_CLOCK 35 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_CALENDER 35 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_LIBS_LOAD 36 - -/** -@internalComponent -*/ -#define PROFILE_POINT_EIKON_ADD_RES 37 - -/** -@internalComponent -*/ -#define KEikEikonBitmapStore KNullDesC - -/** -@internalComponent -*/ -const TUid KSystemIniFileUid = {0x1000010C}; - -/** -@internalComponent -*/ -const TInt KLastSystemWideErrCode = KErrCommsBreak; - - -#endif // __EIKDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikdll.h --- a/epoc32/include/eikdll.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKDLL_H__ -#define __EIKDLL_H__ - -#include -#include - -#endif // __EIKDLL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikdoc.h --- a/epoc32/include/eikdoc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKDOC_H__ -#define __EIKDOC_H__ - -#include -#include - -class CEikAppUi; -class CEikApplication; -class CApaWindowGroupName; - - -/** The base class for all GUI applications' documents. - -In file-based applications, the document represents the data that relates to a -particular instance of the application, and should handle storing and restoring -it. In all applications, whether file-based or not, the document is used to create -the application UI. - -A class derived from CEikDocument must be defined by each GUI application, and minimally -it must implement CreateAppUiL(). Note that UIs may implement their own document base class, -derived from CEikDocument, which applications may need to derive from instead. - -The document is created by the application's CreateDocumentL() function. - -@publishedAll -@released -@see CEikApplication::CreateDocumentL() -@see CEikAppUi */ -class CEikDocument : public CApaDocument, public MSaveObserver - { -public: // new functions - /** Constructs the application UI. - - This function is called by the UI framework during application start-up. It should - only carry out first phase construction of the app UI, in other words, using new(ELeave). - It should not call the app UI's ConstructL(), because the UI framework is responsible - for this. Note also that the UI framework takes ownership of the app UI, so the - document does not need to destroy it. - - @return A partially-constructed app UI object. */ - virtual CEikAppUi* CreateAppUiL()=0; - IMPORT_C virtual CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs); - IMPORT_C void PrepareToEditL(MApaEmbeddedDocObserver* aObserver,TBool aReadOnly); - IMPORT_C void PrepareToEditL(); - IMPORT_C void SetAppFileMode(TUint aMode); - IMPORT_C TUint AppFileMode() const; - IMPORT_C virtual void UpdateTaskNameL(CApaWindowGroupName* aWgName); - IMPORT_C const TApaAppCaption& AppCaption() const; - IMPORT_C void SetChanged(TBool aHasChanged); - IMPORT_C void SetEditStoreL(CStreamStore* aStore); - void SetEditStoreWithoutAppUiNotificationL(CStreamStore* aStore); - inline CStreamStore* EditStore() const; - IMPORT_C ~CEikDocument(); -public: // from MSaveObserver - IMPORT_C virtual void SaveL(MSaveObserver::TSaveType aSaveType); -public: // from CApaDocument - IMPORT_C void NewDocumentL(); - IMPORT_C CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName); - IMPORT_C void EditL(MApaEmbeddedDocObserver* aObserver,TBool aReadOnly=EFalse); - IMPORT_C void PrintL(const CStreamStore& aSourceStore); - IMPORT_C void SaveL(); - IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const; - IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C TBool IsEmpty() const; - IMPORT_C TBool HasChanged() const; - IMPORT_C virtual void ValidatePasswordL() const; // return EFalse if there *is* a password *and* the user doesn't get it right, ETrue otherwise (ie they get it right or there isn't one). Returns ETrue by default -protected: - IMPORT_C CEikDocument(); - IMPORT_C CEikDocument(CEikApplication& aApp); -public: - IMPORT_C virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile); -private: - void NullAppUi(); - // reserved functions from CApaDocument - IMPORT_C virtual void Reserved_2(); -protected: - /** A pointer to the app UI which the document is associated with. */ - CEikAppUi* iAppUi; - /** A pointer to the file store object which is used to edit the document. */ - CStreamStore* iEditStore; -private: - TBool iChanged; - TUint iAppFileMode; - friend class CEikAppUi; - }; - -/** A pointer to the application process associated with this document. - -@publishedAll -@released */ -#define iEikProcess ((CEikProcess*)Process()) - -/** A pointer to the application that created this document. - -@publishedAll -@released */ -#define iEikApplication ((CEikApplication*)Application()) - -/** The default size in twips of icons that represent embedded objects. - -@publishedPartner -@released */ -#define KDefaultIconicDoorSize TSize(500,500) - - -/** Gets the file store object which is used to edit the document. - -@return A pointer to the file store object which is used to edit the document. */ -inline CStreamStore* CEikDocument::EditStore() const - { return(iEditStore); } - -#endif // __EIKDOC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikembal.h --- a/epoc32/include/eikembal.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKEMBAL_H__ -#define __EIKEMBAL_H__ - -#include -#include -#include -#include -#include - -class CEikDocument; -class CApaProcess; -class RApaLsSession; - - -/** Provides a list of all embeddable applications on the device. - -Hidden applications are omitted from the list. The list is sorted by UID. - -@see TApaAppCapability::iAppIsHidden -@publishedAll -@released */ -class CEikEmbeddableAppList : public CArrayFixFlat, public MDesCArray - { -public: - IMPORT_C CEikEmbeddableAppList(); - IMPORT_C ~CEikEmbeddableAppList(); - IMPORT_C void ConstructL(); - IMPORT_C void ConstructL(const TApaEmbeddabilityFilter& aFilter); - IMPORT_C CEikDocument* CreateEmbeddedDocumentL(TInt aIndex,CApaProcess* aProcess); -private: // from MDesCArray - IMPORT_C TInt MdcaCount() const; - IMPORT_C TPtrC MdcaPoint(TInt aIndex) const; -private: // Reserved methods - IMPORT_C virtual void CEikEmbeddableAppList_Reserved1(); - IMPORT_C virtual void CEikEmbeddableAppList_Reserved2(); -private: // utility methods - TInt GetAppListL(const TApaEmbeddabilityFilter& aFilter); - TInt DoGetAppListL(RApaLsSession& aLs, const TApaEmbeddabilityFilter& aFilter); - void SortAppListL(); -private: - TInt iCEikEmbeddableAppList_Reserved1; - }; - -#endif // __EIKEMBAL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikenv.h --- a/epoc32/include/eikenv.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,493 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKENV_H__ -#define __EIKENV_H__ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -class CEikProcess; -class MEikInfoMsgWin; -class MEikBusyMsgWin; -class CEikAppUi; -class CEikHotKeyTable; -class CCoeControl; -class CParaFormatLayer; -class CCharFormatLayer; -class CCoeBrushAndPenContext; -class CEikCommandButton; -class CPrintSetup; -class CDictionaryStore; -class CApaWindowGroupName; -class CEikErrorIdler; -class CEikApplication; -class MEikInfoDialog; -class MEikAlertWin; -class CEikDialog; -class MEikDebugKeys; -class CEikLibrary; -class MEikAppUiFactory; -class MEikIrFactory; -class CGulIcon; -class CApaMaskedBitmap; -class CEikLogicalBorderProxy; -class CEikLafEnv; -class TLogicalFont; -class CEikPictureFactory; -class CEikEnvExtra; -class TApaApplicationFactory; -class CEikAppServer; -class CLafSystemFont; -class RApaLsSession; - -/** -@publishedAll -@released -*/ -typedef void (*TRequestDialogFunc)(); - -/** -@internalComponent -*/ -const TUid KUikonLibraryUid = {KUidUikonLibraryValue}; - -/** -Creates the CEikLibrary interface object by calling the first ordinal function which is mapped to NewL method. - -The function leaves with KErrBadLibraryEntryPoint if the ordinal 1 function -cannot be found. - -@publishedPartner -@released -*/ -typedef CEikLibrary* (*EikLibraryEntryPoint)(); - - -/** An environment for creating controls and utility functions for manipulating -them. - -Every GUI application is provided with an instance of CEikonEnv -by the framework, which can be accessed through either CEikonEnv::Static() -or the iEikonEnv macro of CEikApplication. - -@publishedAll -@released */ -class CEikonEnv : public CCoeEnv - { -public: - enum TErrorValidity - { EErrorNumValid, EErrorNumInvalid }; -public: - // Properties - IMPORT_C static TVersion Version(); - inline static CEikonEnv* Static(); - // Construction and destruction - IMPORT_C ~CEikonEnv(); - IMPORT_C CEikonEnv(); - IMPORT_C void ConstructL(); - IMPORT_C void ConstructL(TBool aInitialFocusState); - IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aWindowGroupID); - IMPORT_C void ConstructAppFromCommandLineL(const TApaApplicationFactory& aApplicationFactory, const CApaCommandLine& aCommandLine); - IMPORT_C void ControlStackReadyL(); - IMPORT_C void DestroyEnvironment(); - // - inline CEikAppUi* EikAppUi() const; - inline CEikProcess* Process() const; - // Legacy font support (see new TCoeFont and CCoeControl::ScreenFont()) - IMPORT_C const CFont* AnnotationFont() const; - IMPORT_C const CFont* TitleFont() const; - IMPORT_C const CFont* LegendFont() const; - IMPORT_C const CFont* SymbolFont() const; - IMPORT_C const CFont* DenseFont() const; - IMPORT_C const CFont* Font(const TLogicalFont& aLogicalFont) const; - IMPORT_C void UpdateSystemFontsL(); - // System bitmaps - IMPORT_C const CFbsBitmap* TexturedBitmap() const; // deprecated - IMPORT_C const CFbsBitmap* GrayBitmap() const; // deprecated - IMPORT_C const CFbsBitmap* OptionBitmap() const; // deprecated - IMPORT_C const CFbsBitmap* HighlightedOptionBitmap() const; - IMPORT_C const CFbsBitmap* OptionMaskBitmap() const; // deprecated - IMPORT_C const CFbsBitmap* Bitmap(TUid aUidBmp) const; -public: - IMPORT_C TBool ConfirmLossOfAllChangesL() const; - - IMPORT_C MPictureFactory* PictureFactory() const; - IMPORT_C MEikPictureFactory* ExtendedPictureFactory(TUid aPictureType) const; - IMPORT_C void AddPictureFactoryL(MEikPictureFactory& aFactory); - IMPORT_C void RemovePictureFactory(TUid aFactoryId); - // Alert dialogs - IMPORT_C void AlertWin(const TDesC& aMsg); - IMPORT_C void AlertWin(const TDesC& aMsg1, const TDesC& aMsg2); - inline const MEikAlertWin* Alert() const; - IMPORT_C void SetAlertWin(MEikAlertWin* aAlertWin); - // Error handling - IMPORT_C void LeaveWithInfoMsg(TInt aResourceId,...); - IMPORT_C void LeaveWithErrorContext(TInt aError, const TDesC& aContextText); // deprecated - IMPORT_C void GetErrorText(TDes& aDes,TInt aError) const; - IMPORT_C TErrorValidity GetErrorText(TDes& aErrorText, TInt aError, TUid aAppUid) const; - IMPORT_C TErrorValidity GetErrorTextAndTitle(TDes& aErrorText, TInt aError, TDes& aTitleText) const; - IMPORT_C void ResolveError(TInt aError, TUid aAppUid = KNullUid) const; - IMPORT_C void NotifyIdleErrorWhileRedrawing(TInt aError); - IMPORT_C void NotifyIdleError(TInt aError, TInt aContextResourceId); - IMPORT_C void HandleErrorWithContext(TInt aError,TInt aContextResourceId); - // Info prints - IMPORT_C void InfoMsg(const TDesC& aDes); - IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner,const TDesC& aDes); - IMPORT_C void InfoMsg(TInt aResourceId, ...); - IMPORT_C void InfoMsg(TInt aResourceId, VA_LIST aList); - IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, TInt aResourceId,...); - IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, TInt aResourceId, VA_LIST aList); - IMPORT_C void InfoMsgWithDuration(const TDesC& aDes, TTimeIntervalMicroSeconds32 aDuration); - IMPORT_C void InfoMsgWithDuration(TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, ...); - IMPORT_C void InfoMsgWithDuration(TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, VA_LIST aList); - IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, const TDesC& aDes, TTimeIntervalMicroSeconds32 aDuration); - IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, ...); - IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, VA_LIST aList); - IMPORT_C void InfoMsgCancel(); - IMPORT_C void VerboseInfoMsg(const TDesC& aDes); - IMPORT_C void SetVerboseInfoReporting(TBool aVerbose); // deprecated - // Busy messages - IMPORT_C void BusyMsgL(const TDesC& aDes); - IMPORT_C void BusyMsgL(const TDesC& aDes, TGulAlignment aCorner); - IMPORT_C void BusyMsgL(TInt aResourceId); - IMPORT_C void BusyMsgL(const TDesC& aDes, TTimeIntervalMicroSeconds32 aInitialDelay); - IMPORT_C void BusyMsgL(const TDesC& aDes, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay); - IMPORT_C void BusyMsgL(TInt aResourceId, TTimeIntervalMicroSeconds32 aInitialDelay); - IMPORT_C void BusyMsgCancel(); - // Query dialogs - IMPORT_C static TBool QueryWinL(const TDesC& aFirstLine, const TDesC& aSecondLine); - IMPORT_C TBool QueryWinL(TInt aFirstLineId, TInt aSecondLineId = 0) const; - IMPORT_C void SetQueryDialog(MEikInfoDialog* aQueryDialog); - IMPORT_C void SetRequestQueryDialogFunc(TRequestDialogFunc aQueryDialogFunc); - // Info dialogs - IMPORT_C static void InfoWinL(const TDesC& aFirstLine, const TDesC& aSecondLine); - IMPORT_C void InfoWinL(TInt aFirstLineId, TInt aSecondLineId = 0) const; - IMPORT_C void SetInfoDialog(MEikInfoDialog* aInfoDialog); - IMPORT_C void SetRequestInfoDialogFunc(TRequestDialogFunc aInfoDialogFunc); - IMPORT_C void AllocInfoMsg(); - IMPORT_C void WservAllocInfoMsg(); - IMPORT_C void FservAllocInfoMsg(); - // Sound notificatons - IMPORT_C static void Beep(); // deprecated - // Bitmap utilities - IMPORT_C CWsBitmap* CreateBitmapL(const TDesC& aFileName, TInt aId); - IMPORT_C CWsBitmap* CreateBitmapL(const TDesC& aFileName, TInt aId, TBool aShowDlgIfErr); - IMPORT_C CGulIcon* CreateIconL(const TDesC& aFileName, TInt aBitmapId, TInt aMaskId = KErrNotFound); - IMPORT_C static CGulIcon* CreateIconFromMaskedBitmapL(const CApaMaskedBitmap& aApaMaskedBitmap); - // Debugging - IMPORT_C void SetDebugKeys(MEikDebugKeys* aDebugKeys); - // Menu utilities - IMPORT_C void LaunchPopupMenuL(TInt aResourceId, const TPoint& aTargetPos, TPopupTargetPosType aTargetType = EPopupTargetTopLeft, const CEikHotKeyTable* aHotKeyTable = NULL); - // Graphical effects - IMPORT_C static void AddWindowShadow(CCoeControl* aWinArea); - IMPORT_C RAnimDll& ClockDllL(); - // Text formatting parameters - IMPORT_C CParaFormatLayer* SystemSingleLineParaFormatLayerL(); - IMPORT_C CParaFormatLayer* SystemParaFormatLayerL(); - IMPORT_C CCharFormatLayer* SystemCharFormatLayerL(); - IMPORT_C static CParaFormatLayer* NewDefaultSingleLineParaFormatLayerL(); - IMPORT_C static CParaFormatLayer* NewDefaultParaFormatLayerL(); - IMPORT_C static CCharFormatLayer* NewDefaultCharFormatLayerL(); - // Control stack utilities - IMPORT_C void AddDialogLikeControlToStackL(CCoeControl* aControl); - IMPORT_C void AddAlertDialogLikeControlToStackL(CCoeControl* aControl); - IMPORT_C void RemoveFromStack(CCoeControl* aControl); - IMPORT_C void AddSleepingDialogToStackL(CCoeControl* aControl); - IMPORT_C void AddSleepingAlertDialogToStackL(CCoeControl* aControl); - IMPORT_C void RouseSleepingDialog(CCoeControl* aControl, TBool aRoused); - // Text cursors - IMPORT_C void DrawCursor(const CCoeControl* aControl, const TPoint& aPosition, TInt aWidth); - IMPORT_C void DrawCursor(const CCoeControl* aControl, const TPoint& aPosition, TInt aWidth, TInt aAscent, TInt aHeight); - IMPORT_C void HideCursor(const CCoeControl* aControl); - // Virtual pointer device cursor - IMPORT_C TEikVirtualCursor& VirtualCursor(); - // Control of the application's ordinal position - IMPORT_C void BringForwards(TBool aForwards, TInt aPriority = ECoeWinPriorityAlwaysAtFront); - IMPORT_C void SetAutoForwarding(TBool aAutoBringToForeground); - // - IMPORT_C TPtrC KeyPressLabel(TInt aIndex) const; // deprecated - // Printing - IMPORT_C CPrintSetup* NewDefaultPrintSetupL(); - IMPORT_C static void GetPrinterNamesL(CPrinterModelList* aModelNameList, CDesCArray& aPrinterNameList); - // Application properties - IMPORT_C void UpdateTaskNameL(); - IMPORT_C void SetBusy(TBool aBusy); - IMPORT_C TBool IsBusy() const; - IMPORT_C void SetSystem(TBool aSystem); - IMPORT_C TBool IsSystem() const; - IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile); - IMPORT_C TBool DocNameIsAFile() const; - IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent); - IMPORT_C TBool RespondsToShutdownEvent() const; - IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent); - IMPORT_C TBool RespondsToSwitchFilesEvent() const; - // Task list dialog - IMPORT_C void DisplayTaskList(); - IMPORT_C void DismissTaskList(); -public: // Internal (for Symbian and partners only) - // Dialog factories - inline MEikCDlgDialogFactory* CDlgDialogFactory() const; - inline MEikPrintDialogFactory* PrintDialogFactory() const; - inline MEikFileDialogFactory* FileDialogFactory() const; - inline MEikIrFactory* IrFactory() const; - inline void SetCDlgDialogFactory(MEikCDlgDialogFactory* aDialogFactory); - inline void SetPrintDialogFactory(MEikPrintDialogFactory* aDialogFactory); - inline void SetFileDialogFactory(MEikFileDialogFactory* aDialogFactory); - inline void SetIrFactory(MEikIrFactory* aIrFactory); - CArrayFix* ControlFactoryFuncArray() const; - // Color scheme - inline CColorList& ColorList() const; - inline TRgb Color(TLogicalColor aLogicalColor) const; - inline void SetColor(TLogicalColor aLogicalColor, TRgb aColor); - IMPORT_C TRgb ControlColor(TLogicalColor aLogicalColor,const CCoeControl& aControl) const; - inline CColorArray& CustomColorArray() const; - IMPORT_C CColorList* CreateSystemColorListL(); - IMPORT_C CColorList* CreateSystemColorListL(const CColorList& aColorList); - IMPORT_C void UpdateSystemColorListL(const CColorList& aColorList); - IMPORT_C CColorList* PopulateColorArrayL(); - // Library loading and unloading - IMPORT_C TInt AddLibraryL(TCreateByTypeFunction aControlFactory, TFileName* aResourceFile); - inline TInt AddLibraryL(TCreateByTypeFunction aControlFactory); - inline TInt AddLibraryL(TFileName* aResourceFile); - IMPORT_C void RemoveLibrary(TCreateByTypeFunction aControlFactory, TInt aResourceFileOffset); - inline void RemoveLibrary(TCreateByTypeFunction aControlFactory); - inline void RemoveLibrary(TInt aResourceFileOffset); - // Legacy UI utilities - inline TChar NudgeCharMinus() const; - inline TChar NudgeCharPlus() const; - // Status pane - inline TInt StatusPaneCoreResId() const; - inline void SetStatusPaneCoreResId(TInt aStatusPaneCoreResId); - // Auto menus - IMPORT_C void AddAutoMenuTitleL(CEikAutoMenuTitle* aTitle); - inline CEikAutoMenuTitleArray* AutoMenuTitleArray() const; - // Display mode - IMPORT_C TDisplayMode DefaultDisplayMode() const; -public: // internal - IMPORT_C MLafEnv& LafEnv() const; // deprecated - inline TInt EditableControlStandardHeight() const; - IMPORT_C void SendEventToEikonServer(TInt aEvent,const TAny* aPtr,TInt aLength); - // Object factories - IMPORT_C MEikAppUiFactory* AppUiFactory() const; - IMPORT_C MEikAppUiFactory* AppUiFactory(const CEikAppUi& aAppUi) const; - IMPORT_C void SetAppUiFactoryL(MEikAppUiFactory* aAppUiFactory); - IMPORT_C void AddAppUiFactoryL(MEikAppUiFactory* aAppUiFactory); - IMPORT_C void RemoveAppUiFactory(); -public: // Internal. Do not use! - IMPORT_C void SetExtension(CBase* aExtension); // deprecated - inline CBase* Extension() const; // deprecated - IMPORT_C void HandleError(TInt aError); - IMPORT_C void WriteInternalStateOfStackedControlsL(); - IMPORT_C void DoGetErrorText(TDes& aDes,TInt aError) const; - IMPORT_C TErrorValidity DoGetErrorTextAndTitle(TDes& aErrorText, TInt aError, TInt& aTextId, TUint& aFlags, TDes& aTitleText, TBool aIsMemoryAllocatedByErrResolver = EFalse) const; - void InitSystemBitmapsL(); - void UpdateColorListL(); - void PostAppUiInitializeL(); - TLanguage ApplicationLanguage() const; - void PostAppUiDestroy(); -private: - IMPORT_C virtual void CEikonEnv_Reserved_1(); - IMPORT_C virtual void CEikonEnv_Reserved_2(); - IMPORT_C virtual void CEikonEnv_Reserved_3(); - IMPORT_C virtual void CEikonEnv_Reserved_4(); - IMPORT_C virtual void CEikonEnv_Reserved_5(); -private: // framework functions - IMPORT_C void DestroyScreen(); - IMPORT_C void InitSystemFontsL(); - IMPORT_C TInt ResourceFileVersionNumber() const; -public: - IMPORT_C MEikInfoDialog* QueryDialog() const; - IMPORT_C MEikInfoDialog* InfoDialog() const; -public: - IMPORT_C CEikAppServer* AppServer() const; - IMPORT_C TBool StartedAsServerApp() const; -protected: - friend class CEikServAppUi; -private: // Internal - void InitSystemResourceFileL(); - void InitPrivateResourceFileL(); - void InitInfoMsgL(); - void PrepareBusyMsgL(); - void InitAlertWinL(); - void InitDebugKeysL(); - TErrorHandlerResponse PrepareToHandleError(TInt aError); - void DoHandleError(TErrorHandlerResponse aType); - static TInt IdleErrorCallBack(TAny* aThis); - void InitColorSchemeL(); - void LoadParserListL(); - void LoadLibrariesL(); - void CloseLibraries(); - TRequestDialogFunc RequestQueryDialogFunc(); - TRequestDialogFunc RequestInfoDialogFunc(); - void SetAppReady(); -public: - TBool IsEiksrvThread() const; -private: - TBool InfoWinOrQueryWinL(TInt aFirstLineId,TInt aSecondLineId,TBool aIsQueryWin=EFalse) const; - void SetCommandLineDebugMemFailL(const CApaCommandLine& aCommandLine); - void StoreAppLanguageL(const RApaLsSession& aLsSession); - void ErrorContextL(TInt aError,const TDesC& aContextText); -private: - IMPORT_C virtual void CEikonEnv_Reserved_6(); - IMPORT_C virtual void CEikonEnv_Reserved_7(); - IMPORT_C virtual void CEikonEnv_Reserved_8(); - IMPORT_C virtual void CEikonEnv_Reserved_9(); - IMPORT_C virtual void CEikonEnv_Reserved_10(); -private: - NONSHARABLE_CLASS(TEikAppUiFactory) - { - public: - MEikAppUiFactory* iFactory; - CEikAppUi* iAppUi; - }; -private: - TBitFlags iEikonEnvFlags; - TInt iForwardsCount; - TInt iBusyCount; - CEikProcess* iProcess; - RAnimDll* iClockDll; - CArrayPtr* iFontArray; - MEikInfoMsgWin* iInfoMsgWin; - MEikBusyMsgWin* iBusyMsgWin; - MEikAlertWin* iAlertWin; - TInt iSystemResourceFileOffset; - HBufC8* iKeyPressLabels; - CParaFormatLayer* iSingleLineParaFormatLayer; - CParaFormatLayer* iParaFormatLayer; - CCharFormatLayer* iCharFormatLayer; - const CCoeControl* iCursorWindow; - TInt iEditableControlStandardHeight; - CApaWindowGroupName* iWgName; - CEikErrorIdler* iErrorIdler; - TInt iPrivateResourceFileOffset; - CColorList* iColorList; - CEikPictureFactory* iPictureFactory; - TBuf<2> iNudgeChars; - MEikInfoDialog* iQueryDialog; - MEikInfoDialog* iInfoDialog; - TRequestDialogFunc iQueryDialogFunc; - TRequestDialogFunc iInfoDialogFunc; - CArrayFix* iControlFactoryFuncArray; - CArrayFix* iResourceFileOffsetArray; - TBool iAlertWinInitialized; - MEikDebugKeys* iDebugKeys; - MEikCDlgDialogFactory* iCDlgDialogFactory; - MEikPrintDialogFactory* iPrintDialogFactory; - MEikFileDialogFactory* iFileDialogFactory; - CArrayFix* iAppUiFactoryArray; - MEikIrFactory* iIrFactory; - CArrayPtr* iLibraries; - TInt iEmbeddedAppLevel; - TInt iAutoLoadedResourceFiles; - TInt iAutoLoadedControlFactories; - CBase* iExtension; - TInt iStatusPaneCoreResId; - CEikAutoMenuTitleArray* iAutoMenuTitleArray; - TEikVirtualCursor iVirtualCursor; - CEikLogicalBorderProxy* iLogicalBorderProxy; - CEikLafEnv* iLafEnv; - CArrayPtrFlat* iBitmapArray; - CEikEnvExtra* iEikEnvExtra; // used to be TInt iSpare1; - HBufC* iOOMErrorText; // used to be TInt iSpare2; - TInt iSpare3; - }; - - -/** Interface for launching a dialog with a title and a message, for instance a -query dialog. - -Dialogs implementing this interface can be passed to CEikonEnv::SetQueryDialog() -or CEikonEnv::SetInfoDialog(). - -@publishedAll -@released */ -class MEikInfoDialog - { -public: - /** Initialises and executes the dialog. - - @param aResource The ID of the DIALOG resource that identifies the dialog's - type. For instance, a query dialog (with Yes/No buttons) or an info dialog - (with a Continue button). - @param aTitle The dialog's title. - @param aMsg The message to display in the dialog. - @return True if the Confirm button (or equivalent) was pressed, false if the - dialog was cancelled. */ - virtual TBool RunDlgLD(TInt aResource, const TDesC& aTitle, const TDesC& aMsg) = 0; - }; - - -/** -@publishedPartner -@released -*/ -class MEikAlertWin - { -public: - virtual void ConstructL() = 0; - virtual void RunAlert(const TDesC& aTitle, const TDesC& aMsg) = 0; - virtual void Release() = 0; - virtual CEikDialog* AsEikDialog() = 0; - inline const CEikDialog* AsEikDialog() const; - IMPORT_C virtual CCoeControl* AsCoeControl(); - inline const CCoeControl* AsCoeControl() const; -private: - IMPORT_C virtual void MEikAlertWin_Reserved2(); - IMPORT_C virtual void MEikAlertWin_Reserved3(); - }; - - -/** -@publishedPartner -@released -*/ -class MEikDebugKeys - { -public: - virtual void ConstructL() = 0; - virtual void Release() = 0; -private: - IMPORT_C virtual void MEikDebugKeys_Reserved1(); - IMPORT_C virtual void MEikDebugKeys_Reserved2(); - IMPORT_C virtual void MEikDebugKeys_Reserved3(); - }; - - -IMPORT_C void InternalizeL(TEikPortFlag& aThing,RReadStream& aStream); -inline RWriteStream& operator<<(RWriteStream& aStream,const TEikPortFlag& aThing) - {aStream.WriteUint8L(aThing);return aStream;} -inline RReadStream& operator>>(RReadStream& aStream,TEikPortFlag& aThing) - {InternalizeL(aThing,aStream);return aStream;} - -#include - -#endif // __EIKENV_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikenv.inl --- a/epoc32/include/eikenv.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - Gets the CEikonEnv maintained by the framework for the application. - - This function should never be run in a thread where such a static Uikon environment - does not exist. Code that may run on the server side of an application server - is one such case. - - @return A static CEikonEnv. - @see CCoeEnv::Static() -*/ -inline CEikonEnv* CEikonEnv::Static() - { return((CEikonEnv*)(CCoeEnv::Static())); } - -/** -@publishedPartner -@released -*/ -inline TInt CEikonEnv::EditableControlStandardHeight() const - { return(iEditableControlStandardHeight); } - -/** Gets the Uikon process that manages the files of applications started in this -environment. - -@return The CEikProcess object. */ -inline CEikProcess* CEikonEnv::Process() const - { return(iProcess); } - -/** Gets the application UI of the application using this CEikonEnv. - -@return Pointer to the CEikAppUi. */ -inline CEikAppUi* CEikonEnv::EikAppUi() const - { return((CEikAppUi*)iAppUi); } -inline const MEikAlertWin* CEikonEnv::Alert() const - { return(iAlertWin); } - -/** Gets the minus nudge character, this could be the left arrow for example. - -@return Minus nudge character. */ -inline TChar CEikonEnv::NudgeCharMinus() const - {return(iNudgeChars[0]);} - -/** Gets the plus nudge character, this could be the right arrow for example. - -@return Plus nudge character. */ -inline TChar CEikonEnv::NudgeCharPlus() const - {return(iNudgeChars[1]);} - -/** Gets the physical (TRgb) colour which corresponds to a logical colour. - -@param aLogicalColor A logical colour value. -@return The physical colour which corresponds to aLogicalColor. */ -inline TRgb CEikonEnv::Color(TLogicalColor aLogicalColor) const - {return ColorList().Color(aLogicalColor); } - -/** Gets the custom colour array. - -@return The custom colour array. */ -inline CColorArray& CEikonEnv::CustomColorArray() const - {return *(ColorList().ColorArray(TUid::Uid(KEikCustomColorsArrayValue)));} - -/** Gets the application's colour list. - -The colour list provides member functions to retrieve and modify colours -in the list, and to append new arrays of colours to the colour list. - -@return The application's colour list */ -inline CColorList& CEikonEnv::ColorList() const - {__ASSERT_DEBUG(iColorList,User::Invariant()); return *iColorList; } - -/** Sets a mapping in the application's colour list between the logical and physical -colours specified. - -@param aLogicalColor A logical colour value. -@param aColor A physical colour value. */ -inline void CEikonEnv::SetColor(TLogicalColor aLogicalColor, TRgb aColor) - { ColorList().SetColor(aLogicalColor, aColor); } - -/** -@publishedPartner -@released -*/ -inline void CEikonEnv::SetCDlgDialogFactory(MEikCDlgDialogFactory* aDialogFactory) - {iCDlgDialogFactory=aDialogFactory;} - -/** -@publishedPartner -@released -*/ -inline void CEikonEnv::SetPrintDialogFactory(MEikPrintDialogFactory* aDialogFactory) - {iPrintDialogFactory=aDialogFactory;} - -/** -@publishedPartner -@released -*/ -inline void CEikonEnv::SetFileDialogFactory(MEikFileDialogFactory* aDialogFactory) - {iFileDialogFactory=aDialogFactory;} - -/** -@publishedPartner -@released -*/ -inline void CEikonEnv::SetIrFactory(MEikIrFactory* aIrFactory) - {iIrFactory=aIrFactory;} - -/** -@publishedPartner -@released -*/ -inline MEikCDlgDialogFactory* CEikonEnv::CDlgDialogFactory() const - {return iCDlgDialogFactory;} - -/** -@publishedPartner -@released -*/ -inline MEikPrintDialogFactory* CEikonEnv::PrintDialogFactory() const - {return iPrintDialogFactory;} - -/** -@publishedPartner -@released -*/ -inline MEikFileDialogFactory* CEikonEnv::FileDialogFactory() const - {return iFileDialogFactory;} - -/** -@publishedPartner -@released -*/ -inline MEikIrFactory* CEikonEnv::IrFactory() const - {return iIrFactory;} - - -inline TInt CEikonEnv::AddLibraryL(TCreateByTypeFunction aControlFactory) - {return(AddLibraryL(aControlFactory, NULL));} -inline TInt CEikonEnv::AddLibraryL(TFileName* aResourceFile) - {return(AddLibraryL(NULL, aResourceFile));} -inline void CEikonEnv::RemoveLibrary(TCreateByTypeFunction aControlFactory) - {RemoveLibrary(aControlFactory, NULL);} -inline void CEikonEnv::RemoveLibrary(TInt aResourceFileOffset) - {RemoveLibrary(NULL, aResourceFileOffset);} - - -/** -@publishedPartner -@deprecated -*/ -inline CBase* CEikonEnv::Extension() const - {return iExtension;} - -/** -@publishedPartner -@released -*/ -inline TInt CEikonEnv::StatusPaneCoreResId() const - {return iStatusPaneCoreResId;} - -/** -@publishedPartner -@released -*/ -inline void CEikonEnv::SetStatusPaneCoreResId(TInt aStatusPaneCoreResId) - {iStatusPaneCoreResId=aStatusPaneCoreResId;} - -/** -@publishedPartner -@released -*/ -inline CEikAutoMenuTitleArray* CEikonEnv::AutoMenuTitleArray() const - {return iAutoMenuTitleArray;} - -inline const CEikDialog* MEikAlertWin::AsEikDialog() const - {return (const CEikDialog*)const_cast(this)->AsEikDialog();} - -inline const CCoeControl* MEikAlertWin::AsCoeControl() const - {return (const CCoeControl*)const_cast(this)->AsCoeControl();} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikfctry.h --- a/epoc32/include/eikfctry.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKFCTRY_H__ -#define __EIKFCTRY_H__ - -#include - -class CCoeControl; - -/** Flags to determine the control status. - -@publishedPartner -@released -*/ -enum - { - /** Flag to determine whether a control has ears. Ears are triangular buttons - for moving forwards or backwards through the list. */ - EEikControlHasEars=0x01, - /** Flag to determine whether the control is unable to receive keyboard focus. */ - EEikControlIsNonFocusing=0x02, - /** Flag to determine whether the control is higher than a normal control. */ - EEikControlHasExtraAscent=0x04, - /** Flag to determine if a control should be placed directly - in the view/dialog or if it should be placed in a pop-out control. */ - EEikControlIsNonEditInPlace=0x08 - }; - -/** Structure to hold the control specific information. It is used by -EikControlFactory. - -@see EikControlFactory -@publishedAll -@released -*/ -struct SEikControlInfo - { - CCoeControl* iControl; - TInt iTrailerTextId; - TInt iFlags; - }; - - -/** Abstract factory that creates controls by type. - -This class provides a unified way to create controls according to the -specified control integer ID. - -@publishedAll -@released */ -class EikControlFactory - { -public: - IMPORT_C static SEikControlInfo CreateByTypeL(TInt aControlType); - }; - -#endif // __EIKFCTRY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikfutil.h --- a/epoc32/include/eikfutil.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,315 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKFUTIL_H__ -#define __EIKFUTIL_H__ - -#include -#include -#include -#include -#include - -class CFont; -class CBaflFileSortTable; -class TResourceReader; - - -/** Provides a set of drive, path and file utility functions. - -This class is essentially a thin layer over the BaflUtils class. - -@publishedAll -@released */ -NONSHARABLE_CLASS(EikFileUtils) - { -public: - inline static TBool PathExists(const TDesC& aPath); - inline static TInt IsFolder(const TDesC& aFullName, TBool& aIsFolder); - inline static TBool FolderExists(const TDesC& aFolderName); - inline static TFileName FolderNameFromFullName(const TDesC& aFullName); - inline static TFileName DriveAndPathFromFullName(const TDesC& aFullName); - inline static TFileName RootFolderPath(const TBuf<1> aDriveLetter); - inline static void AbbreviateFileName(const TFileName& aOriginalFileName, TDes& aAbbreviatedFileName); - IMPORT_C static TFileName AbbreviatePath(TDesC& aPathName, const CFont& aFont, TInt aMaxWidthInPixels); - inline static TBool UidTypeMatches(const TUidType& aFileUid, const TUidType& aMatchUid); - inline static TInt Parse(const TDesC& aName); - IMPORT_C static TFileName ValidateFolderNameTypedByUserL(const TDesC& aFolderNameTypedByUser, const TDesC& aCurrentPath); - inline static TInt CopyFile(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch = CFileMan::EOverWrite); - inline static TInt RenameFile(const TDesC& aOldFullName, const TDesC& aNewFullName, TUint aSwitch = CFileMan::EOverWrite); - inline static TInt DeleteFile(const TDesC& aSourceFullName, TUint aSwitch=0); - inline static TInt CheckWhetherFullNameRefersToFolder(const TDesC& aFullName, TBool& aIsFolder); - inline static TInt MostSignificantPartOfFullName(const TDesC& aFullName, TFileName& aMostSignificantPart); - inline static TInt CheckFolder(const TDesC& aFolderName); - inline static TInt DiskIsReadOnly(const TDesC& aFullName, TBool& aIsReadOnly); - inline static void UpdateDiskListL(const RFs& aFs,CDesCArray& aArray,TBool aIncludeRom,TDriveNumber aDriveNumber); - inline static void RemoveSystemDirectory(CDir& aDir); - inline static TBool IsFirstDriveForSocket(TDriveUnit aDriveUnit); - inline static TInt SortByTable(CDir& aDir,CBaflFileSortTable* aTable); -private: - EikFileUtils(); - }; - - -/** Tests whether a path exists. - -@param aPath The path to check. -@return ETrue if the path exists, EFalse otherwise. */ -inline TBool EikFileUtils::PathExists(const TDesC& aPath) - { return BaflUtils::PathExists(CEikonEnv::Static()->FsSession(),aPath); } - -/** Tests whether aFullName is a folder. - -@param aFullName The drive and path to test. -@param aIsFolder On return, indicates whether aFullName is a folder. -@return KErrNone if successful otherwise another of the system-wide error codes. */ -inline TInt EikFileUtils::IsFolder(const TDesC& aFullName, TBool& aIsFolder) - { return BaflUtils::IsFolder(CEikonEnv::Static()->FsSession(), aFullName,aIsFolder); } - -/** Tests whether a specified folder exists. - -This returns a boolean value indicating whether the folder exists: see also -CheckFolder() which returns an error code instead. - -@param aFolderName The folder's path. -@return ETrue if the folder exists, EFalse if not. */ -inline TBool EikFileUtils::FolderExists(const TDesC& aFolderName) - { return BaflUtils::FolderExists(CEikonEnv::Static()->FsSession(), aFolderName); } - -/** Gets a folder name from a path and file name. - -@param aFullName The full path and file name from which the folder will be -obtained. -@return Folder name */ -inline TFileName EikFileUtils::FolderNameFromFullName(const TDesC& aFullName) - { return BaflUtils::FolderNameFromFullName(aFullName); } - -/** Parses the specified full path and file name to obtain the drive and path. - -@param aFullName The full path and file name from which the drive and path -will be obtained. -@return The drive and path. */ -inline TFileName EikFileUtils::DriveAndPathFromFullName(const TDesC& aFullName) - { return BaflUtils::DriveAndPathFromFullName(aFullName); } - -/** Gets the root folder for the specified drive. - -@param aDriveLetter The drive letter, C for example. -@return The root folder for the drive, C:\ for example. */ -inline TFileName EikFileUtils::RootFolderPath(const TBuf<1> aDriveLetter) - { return BaflUtils::RootFolderPath(aDriveLetter); } - -/** Abbreviates a file name. - -If aOriginalFileName is less than the maximum length of aAbbreviatedFileName, -then the name is simply copied to aAbbreviatedFileName. - -If this is not the case, then the left-most characters of aOriginalFileName are -copied to aAbbreviatedFileName, up to aAbbreviatedFileName's maximum length-1 and -aAbbreviatedFileName's first character is set to be an ellipsis. - -For example, if c:\\home\\letters\\abcdef is the original file name and aAbbreviatedFileName -allows only 7 characters, the abbreviated file name will be ...abcdef. -This can be used to display a file or folder name in an error or progress -dialog. - -@param aOriginalFileName Original file name. -@param aAbbreviatedFileName On return, the abbreviated file name. */ -inline void EikFileUtils::AbbreviateFileName(const TFileName& aOriginalFileName, TDes& aAbbreviatedFileName) - { BaflUtils::AbbreviateFileName(aOriginalFileName,aAbbreviatedFileName); } - -/** Tests whether two UID types match. - -A match is made if each UID in aMatchUid is either identical to the corresponding -one in aFileUid, or is KNullUid. - -@param aFileUid The UID type to match. -@param aMatchUid The UID type to match against. -@return ETrue if the UIDs match, EFalse if not. */ -inline TBool EikFileUtils::UidTypeMatches(const TUidType& aFileUid, const TUidType& aMatchUid) - { return BaflUtils::UidTypeMatches(aFileUid,aMatchUid); } - -/** Tests whether a specified file name can be parsed. - -@param aName The file name to parse. -@return KErrNone if the filename can be parsed, otherwise one -of the system-wide error codes. -@see TParse */ -inline TInt EikFileUtils::Parse(const TDesC& aName) - { return BaflUtils::Parse(aName); } - -/** Copies the specified file. - -Notes: - -- files can be copied across drives - -- open files can be copied only if they have been opened using the EFileShareReadersOnly -file share mode - -- the source file's attributes are preserved in the target file - -@param aSourceFullName Path indicating the file(s) to be copied. Any path -components which are not specified here will be taken from the session path. -@param aTargetFullName Path indicating the directory into which the file(s) -are to be copied. -@param aSwitch Optional switch to allow overwriting files with the same name -in the target directory, or recursion. By default, this function operates with -overwriting and non-recursively. Switch options are defined using the enum TSwitch. -If recursive operation is set, any intermediate directories are created. If no overwriting -is set, any files with the same name are not overwritten, and an error is returned -for that file. -@return KErrNone if the copy is successful, otherwise another of the system-wide -error codes. */ -inline TInt EikFileUtils::CopyFile(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch) - { return BaflUtils::CopyFile(CEikonEnv::Static()->FsSession(),aSourceFullName,aTargetFullName,aSwitch); } - -/** Renames one or more files or directories. - -This can also be used to move files by specifying different destination and -source directories, but note that the destination and source directories must be -on the same drive. - -If moving files, you can set aSwitch so that any files with the same name -that exist in the target directory are overwritten. If aSwitch is set for -no overwriting, any files with the same name are not overwritten, and an error -(KErrAlreadyExists) is returned for that file. - -This function can only operate non-recursively, so that only the matching -files located in the single directory specified by aOldFullName may be renamed. - -Read-only, system and hidden files may be renamed or moved, and the source -file's attributes are preserved in the target file, but attempting to rename -or move an open file will return an error for that file. - -@param aOldFullName Path specifying the file or directory to be renamed. -@param aNewFullName Path specifying the new name for the file or directory. -Any directories specified in this path which do not exist will be created. -@param aSwitch Optional, sets whether files are overwritten on the target. -@return KErrNone if successful otherwise another of the system-wide error codes. */ -inline TInt EikFileUtils::RenameFile(const TDesC& aOldFullName, const TDesC& aNewFullName, TUint aSwitch) - { return BaflUtils::RenameFile(CEikonEnv::Static()->FsSession(),aOldFullName,aNewFullName,aSwitch); } - -/** Deletes one or more files. - -This function may operate recursively or non-recursively. When operating non-recursively, -only the matching files located in the directory specified in aSourceFullName -are affected. When operating recursively, all matching files in the directory -hierarchy below the directory specified in aSourceFullName are deleted. - -Attempting to delete read-only or open files returns an error. - -@param aSourceFullName Path indicating the file(s) to be deleted. This can -either be a full path, or a path relative to the session path. Use wildcards -to specify more than one file. -@param aSwitch Determines whether this function operates recursively. By default, -this function operates non-recursively. -@return KErrNone if aSourceFullName is successfully deleted, otherwise another -of the system-wide error codes. */ -inline TInt EikFileUtils::DeleteFile(const TDesC& aSourceFullName, TUint aSwitch) - { return BaflUtils::DeleteFile(CEikonEnv::Static()->FsSession(), aSourceFullName,aSwitch); } - -/** Tests whether a file specification is a valid folder name. - -@param aFullName The string to check. -@param aIsFolder True if aFullName is a valid folder name, otherwise false. -@return KErrNone if successful, otherwise another of the system-wide error codes -(probably because aFullName cannot be parsed). */ -inline TInt EikFileUtils::CheckWhetherFullNameRefersToFolder(const TDesC& aFullName, TBool& aIsFolder) - { return BaflUtils::CheckWhetherFullNameRefersToFolder(aFullName,aIsFolder); } - -/** Gets the folder name if the specified item is a valid folder name, otherwise gets the file name. - -@param aFullName Item to parse. -@param aMostSignificantPart On return, the folder or file name. -@return KErrNone if successful otherwise another of the system-wide error codes. */ -inline TInt EikFileUtils::MostSignificantPartOfFullName(const TDesC& aFullName, TFileName& aMostSignificantPart) - { return BaflUtils::MostSignificantPartOfFullName(aFullName,aMostSignificantPart); } - -/** Tests whether the specified folder exists and can be opened. - -This returns an error code if the folder does not exist: see also FolderExists() -which returns a boolean value. - -@param aFolderName The folder's name and path. -@return KErrNone if aFolderName exists, otherwise another of the system-wide -error codes. */ -inline TInt EikFileUtils::CheckFolder(const TDesC& aFolderName) - { return BaflUtils::CheckFolder(CEikonEnv::Static()->FsSession(),aFolderName); } - -/** Tests whether the specified drive is read-only. - -@param aFullName File name, including drive. -@param aIsReadOnly On return, true if the drive is read-only, otherwise false. -@return KErrNone if successful otherwise another of the system-wide error codes. */ -inline TInt EikFileUtils::DiskIsReadOnly(const TDesC& aFullName, TBool& aIsReadOnly) - { return BaflUtils::DiskIsReadOnly(CEikonEnv::Static()->FsSession(),aFullName,aIsReadOnly); } - -/** Gets a list of all drives present on the system. - -The file server is interrogated for a list of the drive letters for all available -drives. The drive letter that corresponds to aDriveNumber is added to the list -regardless of whether it is present, or is corrupt. Also, the C: drive and the -primary partitions on removable media slots are forced onto the list, even if -corrupt or not present. - -@param aFs A connected session with the file server. -@param aArray On return, contains the drive letters that correspond to the available -drives. The drive letters are uppercase and are in alphabetical order. -@param aIncludeRom ETrue if the ROM is included as a drive, EFalse otherwise. -@param aDriveNumber The drive to force into the list, e.g. the drive in the default -path. */ -inline void EikFileUtils::UpdateDiskListL(const RFs& aFs,CDesCArray& aArray,TBool aIncludeRom,TDriveNumber aDriveNumber) - { BaflUtils::UpdateDiskListL(aFs,aArray,aIncludeRom,aDriveNumber); } - -/** Removes the System directory from a list of directory entries. - -@param aDir Array of directory entries. */ -inline void EikFileUtils::RemoveSystemDirectory(CDir& aDir) - { BaflUtils::RemoveSystemDirectory(aDir); } - -/** Tests whether the specified drive corresponds to the primary partition -in a removable media slot. - -Note that the function assumes that the D: drive corresponds to the primary -partition on socket 0, and that the E: drive corresponds to the primary -partition on socket 1 (a socket is a slot for removable media). This mapping -may not always be the case because it is set up in the variant layer of Symbian -OS. - -@param aDriveUnit The drive to check. -@return True if the drive is the primary partition in a removable media -slot. True is also returned if the drive is C:. False is returned otherwise. */ -inline TBool EikFileUtils::IsFirstDriveForSocket(TDriveUnit aDriveUnit) - { return BaflUtils::IsFirstDriveForSocket(aDriveUnit); } - -/** Sorts files by UID. - -The caller supplies a table which specifies the order in which files are to be sorted. -The files whose UID3 is the first UID in the table appear first. The files whose UID3 -is the UID specified second appear next, and so on. Files whose UID3 is not specified -in the table, and directories, appear at the end of the list, with directories preceding -the files, and with files sorted in ascending order of UID3. - -This function is used for customising how lists of application files are sorted. - -@param aDir The array of files and directories to sort. -@param aTable A sort order table containing the UIDs to use in the sort. -@return KErrNone if successful otherwise another of the system-wide error codes. */ -inline TInt EikFileUtils::SortByTable(CDir& aDir,CBaflFileSortTable* aTable) - { return BaflUtils::SortByTable(aDir,aTable); } - - -#endif // __EIKFUTIL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikmobs.h --- a/epoc32/include/eikmobs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKMOBS_H__ -#define __EIKMOBS_H__ - -#include -#include -#include - -class CCoeControl; -class CEikMenuPane; -class CEikMenuBar; -class CEikHotKeyTable; -class TPoint; - -/** Menu observer interface. - -Menu observers cooperate with menu bars and menu panes, initialising them -before display and responding to menu events appropriately. CEikAppUi implements -MEikMenuObserver, so these functions may be implemented on an application's -App UI. - -@publishedAll -@released */ -class MEikMenuObserver : public MEikCommandObserver - { -public: - /** Menu types */ - enum TMenuType - { - /** Menu pane. */ - EMenuPane, - /** Menu bar. */ - EMenuBar - }; -public: - IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId); - IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId); - IMPORT_C virtual void RestoreMenuL(CCoeControl* aMenuControl,TInt aResourceId,TMenuType aType); - IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar); - IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable); - IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent& aKeyEvent,TEventCode aType); - /** Called by the Uikon framework to handle the emphasising or de-emphasising of - a menu window. - - CEikMenuBar objects call this on their observer to emphasise - themselves when they are displayed, and de-emphasise themselves when they - stop displaying. - - @param aMenuControl The menu control. - @param aEmphasis ETrue to emphasize the menu, EFalse otherwise. */ - virtual void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis)=0; -public: - IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); -protected: - IMPORT_C MEikMenuObserver(); -private: - IMPORT_C virtual void Reserved_1_MenuObserver(); - IMPORT_C virtual void Reserved_2_MenuObserver(); -private: // from MEikCommandObserver. do not override! - IMPORT_C void MEikCommandObserver_Reserved1(); - IMPORT_C void MEikCommandObserver_Reserved2(); -private: - TInt iMEikMenuObserver_Spare1; - }; - - -/** Provides additional functionality to an auto menu title, in the form of an -OfferHotKeyL() method, which is not required in the normal MEikMenuObserver. - -Auto menu titles are used to ensure that some menu panes appear in every menu -constructed for an application. - -@publishedAll -@released */ -class MEikAutoMenuObserver : public MEikMenuObserver - { -public: - /** Offers the specified hot key to the auto menu title. - - Implement this function if you expect to handle any events from an auto menu. - - @param aKeyEvent The key event. - @param aType The type of key event. - @return The auto menu title's response. */ - virtual TKeyResponse OfferHotKeyL(const TKeyEvent& aKeyEvent,TEventCode aType)=0; -public: // from MEikMenuObserver - IMPORT_C void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); -public: - IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId); - IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId); - IMPORT_C virtual void RestoreMenuL(CCoeControl* aMenuControl,TInt aResourceId,TMenuType aType); - IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar); - IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable); - IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent& aKeyEvent,TEventCode aType); - IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); -protected: - IMPORT_C MEikAutoMenuObserver(); -private: - IMPORT_C virtual void Reserved_1_MenuObserver(); - IMPORT_C virtual void Reserved_2_MenuObserver(); -private: // from MEikCommandObserver. do not override! - IMPORT_C void MEikCommandObserver_Reserved1(); - IMPORT_C void MEikCommandObserver_Reserved2(); -private: - TInt iMEikAutoMenuObserver_Spare1; - }; - - -#endif // __EIKMOBS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikmsg.h --- a/epoc32/include/eikmsg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,148 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKMSG_H__ -#define __EIKMSG_H__ - -#include -#include - -#include -#include - -class CCoeControl; -class CEikonEnv; -class RWindowGroup; -class CEikResourceChange; - - -/** Base class providing functions to construct and display an information message. - -@publishedAll -@released */ -class CEikMsgWin : public CBase - { -protected: - IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv); -public: - IMPORT_C void ConstructL(RWindowGroup& aWindowGroup); - IMPORT_C virtual ~CEikMsgWin(); - IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); - IMPORT_C void CancelDisplay(); -private: - IMPORT_C virtual void CEikMsgWin_Reserved1(); - IMPORT_C virtual void CEikMsgWin_Reserved2(); -protected: - TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner); -private: - virtual void DoStartDisplay(const TDesC& aText)=0; -protected: - /** A CEikonEnv*, which all applications have. This is required for construction - of a CEikMsgWin as it provides access to services which the message window - needs, the window server session for example. */ - CEikonEnv& iEikonEnv_; // the underscore is to prevent a name clash with the iEikonEnv #define - /** An empty control required for construction of a blank window. This defines - a handle back to the client side object, which is only required if you need - to later initiate client side drawing. */ - CCoeControl* iDummy; - /** The window in which the message will be drawn. */ - RBlankWindow* iBlankWindow; - /** An RAnim derived class, which is responsible for interacting with server side - classes to provide the message window's animation on the screen. It is constructed - by passing in the RWindowBase which it will use to draw its contents to, and - also a handle to an animation DLL, which provides the animation functionality. */ - RMessageWindow* iMessageWindow; -private: - CEikResourceChange* iResourceChange; - TInt iCEikMsgWin_Spare1; - }; - -/** -@publishedAll -@released -*/ -const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength; - -/** Specifies the maximum length of the message buffer. - -@publishedAll -@released */ -typedef TBuf TEikInfoMsgBuf; - -class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin -/** Enables construction of an information message window. - -@publishedAll -@released */ - { -public: - IMPORT_C void ConstructL(RWindowGroup& aWindowGroup, TInt aParam = 0); - IMPORT_C CEikInfoMsgWin(CEikonEnv& aEikonEnv); -public: //from MEikInfoMsgWin - IMPORT_C void StartDisplaySpecifyingDuration(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aDuration); - IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); - IMPORT_C void CancelDisplay(); - IMPORT_C void Release(); -private: - virtual void DoStartDisplay(const TDesC& aText); - IMPORT_C virtual void CEikInfoMsgWin_Reserved1(); - IMPORT_C virtual void CEikInfoMsgWin_Reserved2(); -private: // From CEikMsgWin. do not override! - IMPORT_C void CEikMsgWin_Reserved1(); - IMPORT_C void CEikMsgWin_Reserved2(); -private: - TInt iCEikInfoMsgWin_Spare1; - }; - - -/** -@publishedAll -@released -*/ -const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength; - -/** -@publishedAll -@released -*/ -typedef TBuf TEikBusyMsgBuf; - -/** -@publishedAll -@released -*/ -class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin - { -public: - IMPORT_C void ConstructL(RWindowGroup& aWindowGroup); - IMPORT_C CEikBusyMsgWin(CEikonEnv& aEikonEnv); -public: //from MEikBusyMsgWin - IMPORT_C void StartDisplaySpecifyingInitialDelay(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay); - IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); - IMPORT_C void Release(); -private: - IMPORT_C virtual void CEikBusyMsgWin_Reserved1(); - IMPORT_C virtual void CEikBusyMsgWin_Reserved2(); -private: // From CEikMsgWin. do not override! - IMPORT_C void CEikMsgWin_Reserved1(); - IMPORT_C void CEikMsgWin_Reserved2(); -private: - virtual void DoStartDisplay(const TDesC& aText); -private: - TTimeIntervalMicroSeconds32 iInitialDelay; - TInt iCEikBusyMsgWin_Spare1; - }; - -#endif // __EIKMSG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eiknotapi.h --- a/epoc32/include/eiknotapi.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKNOTAPI_H__ -#define __EIKNOTAPI_H__ - -#include -#include -#include - -/** Defines the second Uid value for plug in notifier DLLs. - -@publishedAll -@released */ -const TUid KUidNotifierPlugIn = {0x10005522}; -const TUid KUidNotifierPlugInV2 = {0x101fdfae}; - -/** -@publishedAll -@released -*/ -enum TEikNotExtStatus - { - EEikNotExtRequestCompleted = 0, - EEikNotExtRequestQueued = 1 - }; - -/** The Uid that identifies a screen change event. - -@see MEikSrvNotifierBase2::HandleSystemEventL() -@internalTechnology */ -const TUid KUidEventScreenModeChanged = {0x101F3648}; - -/** A set of flags that define the capabilities of the notifier. - -Capabilities are returned by calling MEikSrvNotifierBase2::NotifierCapabilites(). - -@publishedAll -@released */ -enum TNotifierCapabilities - { - /** The notifier has no special capabilities. */ - ENoSpecialCapabilities = 0x00000000, - /** The notifier can handle a change to the screen device. */ - EScreenDeviceChangeSupported = 0x00000001, - }; - -/** -Interface to allow notifiers to manage their own startup/shutdown. This class is likely to be of most -interest to notifiers that observe engines using publically available APIs rather than those that are run -via RNotifier. - -@publishedAll -@released -*/ -class MEikSrvNotifierManager - { -public: - virtual void StartNotifierL(TUid aNotifierUid, const TDesC8& aBuffer, TDes8& aResponse) = 0; - virtual void CancelNotifier(TUid aNotifierUid) = 0; - virtual void UpdateNotifierL(TUid aNotifierUid, const TDesC8& aBuffer, TDes8& aResponse) = 0; -protected: - IMPORT_C MEikSrvNotifierManager(); -private: - IMPORT_C virtual void MEikSrvNotifierManager_Reserved1(); - IMPORT_C virtual void MEikSrvNotifierManager_Reserved2(); -private: - TInt iMEikSrvNotifierManager_Spare1; - }; - - -/** Interface to a plug-in server side notifier. - -Any number of MEikSrvNotifierBase2 objects can be included in a single DLL. -All notifiers are loaded during device startup and are not destroyed until -the Uikon server closes down. - -All notifiers run in the uikon server thread so are able to directly access -server side status panes but cannot call any functions on REikAppUiSession. - -@publishedAll -@released */ -class MEikSrvNotifierBase2 - { -public: - /** Defines a set of notifier priorities. The use and application of these values - is implementation-dependent. */ - enum TNotifierPriority - { - /** The highest priority value. */ - ENotifierPriorityAbsolute = 500, - /** The second highest priority value. */ - ENotifierPriorityVHigh = 400, - /** The third highest priority value. */ - ENotifierPriorityHigh = 300, - /** The fourth highest priority value. */ - ENotifierPriorityLow = 200, - /** The fifth highest priority value. */ - ENotifierPriorityVLow = 100, - /** The lowest priority value. */ - ENotifierPriorityLowest = 0 - }; -public: - /** Contains the notifier parameters. - - @see TNotifierPriority */ - class TNotifierInfo - { - public: - /** The Uid that identifies the notifier. */ - TUid iUid; - /** The Uid that identifies the channel to be used by the notifier (e.g. the screen, - an LED etc) */ - TUid iChannel; - /** The notifier priority, typically chosen from the standard set. - - @see TNotifierPriority */ - TInt iPriority; - }; - -public: - IMPORT_C MEikSrvNotifierBase2(); - IMPORT_C virtual ~MEikSrvNotifierBase2(); -public: - /** Frees all resources owned by this notifier. - - This function is called by the notifier framework when all resources allocated - by notifiers should be freed. As a minimum, this function should delete this - object (i.e. delete this;). - - Note that it is important to implement this function correctly to avoid memory - leaks. */ - virtual void Release() = 0; - /** Performs any initialisation that this notifier may require. - - The function is called when the notifier is loaded (when the plug-in DLL is - loaded). It is called only once. - - As a minimum, the function should return a TNotifierInfo instance describing - the notifier parameters. A good implementation would be to set this into a - data member, and then to return it. This is because the same information is - returned by Info(). - - The function is safe to leave from, so it is possible, although rarely necessary, - to allocate objects as you would normally do in a ConstructL() function as - part of two-phase construction. - - @return Describes the parameters of the notifier. */ - virtual TNotifierInfo RegisterL() = 0; - /** Gets the notifier parameters. - - This is usually the same information as returned by RegisterL() but can be - varied at run time. - - @return Describes the parameters of the notifier. */ - virtual TNotifierInfo Info() const = 0; - /** Starts the notifier. - - This is called as a result of a client-side call to RNotifier::StartNotifier(), - which the client uses to start a notifier from which it does not expect a - response. - - The function is synchronous, but it should be implemented so that it completes - as soon as possible, allowing the notifier framework to enforce its priority - mechanism. - - It is not possible to to wait for a notifier to complete before returning - from this function unless the notifier is likely to finish implementing its - functionality immediately. - - @param aBuffer Data that can be passed from the client-side. The format and - meaning of any data is implementation dependent. - @return A pointer descriptor representing data that may be returned. The format - and meaning of any data is implementation dependent. */ - virtual TPtrC8 StartL(const TDesC8& aBuffer) = 0; - /** Starts the notifier. - - This is called as a result of a client-side call to the asynchronous function - RNotifier::StartNotifierAndGetResponse(). This means that the client is waiting, - asynchronously, for the notifier to tell the client that it has finished its - work. - - It is important to return from this function as soon as possible, and derived - classes may find it useful to take a copy of the reply-slot number and - the RMessage object. - - The implementation of a derived class must make sure that Complete() is called - on the RMessage object when the notifier is deactivated. - - This function may be called multiple times if more than one client starts - the notifier. - - @param aBuffer Data that can be passed from the client-side. The format and - meaning of any data is implementation dependent. - @param aReplySlot Identifies which message argument to use for the reply. - This message argument will refer to a modifiable descriptor, a TDes8 type, - into which data can be returned. The format and meaning of any returned data - is implementation dependent. - @param aMessage Encapsulates a client request. */ - virtual void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage) = 0; - - /** Cancels an active notifier. - - This is called as a result of a client-side call to RNotifier::CancelNotifier(). - - An implementation should free any relevant resources and complete any outstanding - messages, if relevant. */ - virtual void Cancel() = 0; - /** Updates a currently active notifier with new data. - - This is called as a result of a client-side call to RNotifier::UpdateNotifier(). - - @param aBuffer Data that can be passed from the client-side. The format and - meaning of any data is implementation dependent. - @return A pointer descriptor representing data that may be returned. The format - and meaning of any data is implementation dependent. */ - virtual TPtrC8 UpdateL(const TDesC8& aBuffer) = 0; - /** Updates a currently active notifier with new data. - - This is called as a result of a client-side call to the asynchronous function - RNotifier::UpdateNotifierAndGetResponse(). This means that the client is waiting, - asynchronously, for the notifier to tell the client that it has finished its - work. - - It is important to return from this function as soon as possible, and derived - classes may find it useful to take a copy of the reply-slot number and - the RMessage object. - - The implementation of a derived class must make sure that Complete() is called - on the RMessage object when the notifier is deactivated. - - This function may be called multiple times if more than one client updates - the notifier. - - @param aBuffer Data that can be passed from the client-side. The format and - meaning of any data is implementation dependent. - @param aReplySlot Identifies which message argument to use for the reply. - This message argument will refer to a modifiable descriptor, a TDes8 type, - into which data can be returned. The format and meaning of any returned data - is implementation dependent. - @param aMessage Encapsulates a client request. */ - IMPORT_C virtual void UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); -public: - void SetManager(MEikSrvNotifierManager* aManager); -protected: - MEikSrvNotifierManager* iManager; -private: - IMPORT_C virtual void MEikSrvNotifierBase2_Reserved_2(); -public: // internal - IMPORT_C virtual void HandleSystemEventL(TUid aEvent); - IMPORT_C virtual TInt NotifierCapabilites(); -private: - TInt iNotBSpare; - TInt iMEikSrvNotifierBase2_Spare; - }; - - -#endif // __EIKNOTAPI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikproc.h --- a/epoc32/include/eikproc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKPROC_H__ -#define __EIKPROC_H__ - -#include -#include - -class CFileStore; -class CEikDocument; - -/** The controlling process for an application. - -An instance of this class is created by the Uikon environment. This instance -calls CApaProcess::AddNewDocumentL() to load the application DLL and -construct the new application which runs in this environment. - -It also provides services related to an application's main (non-embedded) document, -including: -- saving the main document to a direct file store -- providing the name of the most recently accessed file -- getting the name of the application DLL associated with a document. - -@publishedAll -@released */ -NONSHARABLE_CLASS(CEikProcess) : public CApaProcess - { -public: - /** Used as a parameter by CEikProcess::SetLastUsedFileL() and LastUsedFileL() - to indicate whether the function relates to the last opened or last created file.*/ - enum TLastUsedFile - { - /** Last opened file.*/ - ELastOpenFile, - /** Last created file. */ - ELastCreatedFile - }; -public: - static CEikProcess* NewL(const RFs& aFs, TProcessId aProcessId=KNullProcessId); - IMPORT_C TPtrC CommandTailEnd() const; - IMPORT_C TFileName MainDocFolder() const; - IMPORT_C void SetLastUsedFileL(TLastUsedFile aType,const TDesC& aFileName) const; - IMPORT_C TFileName LastUsedFileL(TLastUsedFile aType) const; - IMPORT_C void SetMainStore(CFileStore* aMainStore); - IMPORT_C CFileStore* MainStore() const; - IMPORT_C void AppFromDocL(TDes& aLibraryName,const TDesC& aDocumentName) const; - IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName=NULL); - IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName,TBool aReopen,TFileName* aTempFile=NULL); - IMPORT_C ~CEikProcess(); -private: - CEikProcess(const RFs& aFs); - void GetLibraryNameL(TDes& aLibraryName,const CFileStore& aDocStore, const CStreamDictionary& aStreamDic) const; - void OpenNewFileL(const TFileName* aNewFileName, const TParse& aNewFilePath); - CDictionaryStore* OpenMainAppIniFileLC() const; -private: - TPtrC iCommandTailEnd; - CFileStore* iMainStore; - }; - -#endif // __EIKPROC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikrutil.h --- a/epoc32/include/eikrutil.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKRUTIL_H__ -#define __EIKRUTIL_H__ - -#include -#include - -class CFbsFont; -class CEikonEnv; -class CWsScreenDevice; -class TResourceReader; - - -/** Provides utilities for reading standard resources. - -@publishedAll -@released */ -NONSHARABLE_CLASS(EikResourceUtils) - { -public: - inline static CFbsFont* CreateScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); - IMPORT_C static CFbsFont* CreateScreenFontL(TInt aResourceId,CEikonEnv* aEnv=NULL); - inline static TInt8 ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv=NULL); - inline static TInt16 ReadTInt16L(TInt aResourceId,CEikonEnv* aEnv=NULL); - inline static TInt32 ReadTInt32L(TInt aResourceId,CEikonEnv* aEnv=NULL); - IMPORT_C static CColorArray* CreateColorArrayL(TInt aResourceId,CEikonEnv* aEnv=NULL); - IMPORT_C static CColorArray* CreateColorArrayLC(TInt aResourceId,CEikonEnv* aEnv=NULL); -private: - enum TResourceTypeInt { EResourceInt8,EResourceInt16,EResourceInt32 }; -private: - IMPORT_C static TInt32 ReadResourceIntL(TInt aResourceId, CEikonEnv* aEnv, TResourceTypeInt aSize); - EikResourceUtils(); - }; - -/** Create a screen font from resource. - -Creates a font for the specified screen device by reading a font UID and font -flags from the given position in a resource. Returns a pointer to the font -and transfers ownership. - -@param aResourceReader The resource reader to use to read the font. -@param aScreenDevice The screen device for which the font will be created. -@return Screen font object. */ -inline CFbsFont* EikResourceUtils::CreateScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice) - { return(ResourceUtils::CreateScreenFontL(aResourceReader,aScreenDevice)); } - -/** Gets the 8 bit signed integer held in a specified resource location. - -@param aResourceId The location in the resource to be read. -@param aEnv The UI environment. -@return The eight bits that follow the specified location in the resource. */ -inline TInt8 EikResourceUtils::ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv) - { return static_cast(ReadResourceIntL(aResourceId,aEnv,EResourceInt8)); } - -/** Gets the 16 bit signed integer held in a specified resource location. - -@param aResourceId The location in the resource to be read. -@param aEnv The UI environment. -@return The 16 bits that follow the specified location in the resource. */ -inline TInt16 EikResourceUtils::ReadTInt16L(TInt aResourceId,CEikonEnv* aEnv) - { return static_cast(ReadResourceIntL(aResourceId,aEnv,EResourceInt16)); } - -/** Gets the 32 bit signed integer held in a specified resource location. - -@param aResourceId The location in the resource to be read. -@param aEnv The UI environment. -@return The 32 bits that follow the specified location in the resource. */ -inline TInt32 EikResourceUtils::ReadTInt32L(TInt aResourceId,CEikonEnv* aEnv) - { return static_cast(ReadResourceIntL(aResourceId,aEnv,EResourceInt32)); } - -#endif // __EIKRUTIL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikstart.h --- a/epoc32/include/eikstart.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKSTART_H__ -#define __EIKSTART_H__ - -#include -#include - -class CApaCommandLine; - -/** -This is the API to initialise and run the application architecture for applications built as exes. -It is not intended to be used for generally running applications from other code. Use RApaLsSession for that. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(EikStart) - { -public: - IMPORT_C static TInt RunApplication(TApaApplicationFactory aApplicationFactory); -private: - EikStart(); - }; - -#endif // __EIKSTART_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikunder.h --- a/epoc32/include/eikunder.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __EIKUNDER_H__ -#define __EIKUNDER_H__ - -#include // class CActive - -class RThread; - -/** -@publishedAll -@released -*/ -class MEikUndertakerObserver - { -public: - virtual void HandleThreadExitL(RThread& aThread) = 0; - }; - -/** -@publishedAll -@released -*/ -class CEikUndertaker : public CActive - { -public: - IMPORT_C static CEikUndertaker* NewL(MEikUndertakerObserver& aObserver); - IMPORT_C ~CEikUndertaker(); -private: - CEikUndertaker(MEikUndertakerObserver& aObserver); - void ConstructL(); - void Request(); -private: // from CActive - void DoCancel(); - void RunL(); -private: - MEikUndertakerObserver& iObserver; - RUndertaker iUndertaker; - TInt iThreadHandle; - }; - -#endif // __EIKUNDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/eikvcurs.h --- a/epoc32/include/eikvcurs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// class TEikVirtualCursor -// -// - -#ifndef __EIKVCURS_H__ -#define __EIKVCURS_H__ - -#include -#include - - -/** Provides support for the virtual cursor's state within an application. - -There is one instance of this object per CEikonEnv. - -@publishedAll -@released */ -class TEikVirtualCursor - { -public: - /** Specifies the virtual cursor's state. - - The state may be on, off or suspended. The suspended state is for use by applications - that wish to temporarily disable the cursor, but do not want to switch it - off completely. For example, an editor control which when focused needs to - capture arrow keys would disable the virtual cursor when it gains focus, - and enable it when unfocused. */ - enum TState - { - /** Sets the virtual cursor off. */ - EOff=0, - /** Sets the virtual cursor on. */ - EOn, - /** Sets the virtual cursor as suspended. */ - ESuspended - }; -public: - TEikVirtualCursor(); -private: //prevent passing by value - inline TEikVirtualCursor(const TEikVirtualCursor&); -public: - IMPORT_C void SetCursorStateL(TState aState, CCoeEnv& aEnv); - IMPORT_C TState CursorState(CCoeEnv& aEnv); -public: // but not exported - void HandleAppToForeground(CCoeEnv& aEnv); -private: - void SwitchOffEmulationAndBitmap(CCoeEnv& aEnv); - void SwitchOnEmulationAndBitmap(CCoeEnv& aEnv); -private: - TState iState; - }; - - -// inlines - -/** Constructor. - -Sets the cursor's state to ESuspended so that the call to switch off the virtual -cursor will succeed when the application starts. Required due to the efficient -implementation of SetCursorState(). */ -inline TEikVirtualCursor::TEikVirtualCursor(const TEikVirtualCursor&) - {} - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/elements/cftransportmacro.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/elements/cftransportmacro.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,26 @@ +// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Comms-infras\Elements\cftransportmacro.h +// This header file is exported to \EPOC32\include\comms-infras +// +// + +#ifndef CFTRANSPORTMACRO_H +#define CFTRANSPORTMACRO_H + +#if (defined SYMBIAN_NON_SEAMLESS_NETWORK_BEARER_MOBILITY) || (defined SYMBIAN_C32_SERCOMMS_V2) + #define SYMBIAN_NETWORKING_CFTRANSPORT +#endif + +#endif // CFTRANSPORTMACRO_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/elements/metadata.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/elements/metadata.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,53 @@ +/** +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + + + +/** + @file MetaData.inl + @internalTechnology +*/ + +#ifndef __METADATA_INL__ +#define __METADATA_INL__ + +namespace Meta +{ + + +STypeId::STypeId() +/** + * Constructor + */ + { + iUid.iUid = 0; + iType = 0; + } + +STypeId::STypeId(TUint32 aUid, TUint32 aTypeId) +/** + * Constructor + */ + { + iUid.iUid = aUid; + iType = aTypeId; + } + +} // namespace Meta +#endif // __METADATA_INL__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/estatus.h --- a/epoc32/include/estatus.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Created at: 04-Jan-99 10:35:54 AM -// Status enumeration for Data Collectors, Data Providers and Data Handlers. -// -// - - -#if !defined(__ESTATUS_H__) -#define __ESTATUS_H__ - -#ifndef __E32DEF_H__ -#include // for TInt -#endif - -// -// values < 0 are error codes -// 0 - 100 are % processed -// > 100 are the enum values below... -// -enum TPluginStatus { - EPluginComplete=100, - EPluginInitialised, - EPluginWaitingForChild, - EPluginProcessing, - EPluginSuspend, - EPluginCancelled, - EConnectionChanged - }; - -#endif // __ESTATUS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/fepbase.h --- a/epoc32/include/fepbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,634 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __FEPBASE_H__ -#define __FEPBASE_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -class CCoeControl; - - -/** Specifies the mixin protocol for observing a FEP transaction. - -Applications which need to implement this protocol should derive from this -class. The functions are not pure virtual because most applications will only -need to override one of them. - -@see CCoeFep::MakeDeferredFunctionCall() -@publishedAll -@released */ -class MCoeFepObserver - { -public: - // both of these functions do nothing by default - the reason that they are not pure - // virtual is that most applications will only want to override one of them - IMPORT_C virtual void HandleStartOfTransactionL(); // the responsibility of FEPs to call - IMPORT_C virtual void HandleCompletionOfTransactionL(); // the responsibility of FEPBASE to call - not to be called if the transaction is canceled -private: // reserved. do not override! - IMPORT_C virtual void MCoeFepObserver_Reserved_1(); - IMPORT_C virtual void MCoeFepObserver_Reserved_2(); - }; - -/** Handles the start of a FEP transaction. - -This is a non-member function which just calls aFepObserver.HandleStartOfTransactionL(). - -It is called indirectly by a FEP to notify the application that it is starting a transaction. -This is done by calling CCoeEnv::ForEachFepObserverCall() passing in -FepObserverHandleStartOfTransactionL. Internally, this calls HandleStartOfTransactionL() for -each MCoeFepObserver object that has been registered with the control environment. - -@param aFepObserver The FEP observer. -@see MCoeFepObserver::HandleStartOfTransactionL() -@publishedAll -@released */ -IMPORT_C void FepObserverHandleStartOfTransactionL(MCoeFepObserver& aFepObserver); - - -/** Abstract base class for all FEPs. - -FEP authors must derive a class from CCoeFep. The CCoeFep-derived class should -implement all of its pure virtual functions including the ones which CCoeFep -inherits from its base classes. For information on these functions, see the -documentation of the base classes. The global NewFepL() function is used to -create a fully initialised object of the derived class. - -FEPs that need to intercept key events should own a CCoeControl-derived object. -This object is referred to as the FEP control. The FEP control should -be added to the control stack at a priority of ECoeStackPriorityFep, so that -it receives first refusal of key events from the window server. - -In general, focus is retained by the underlying application. This has the -advantage that the user can see where the output produced by the FEP will -go. When focus is switched between controls, the FEP must be notified in case -the input capability of the focussed control changes. For instance, the FEP -needs to prevent the user composing a large amount of text only for it to -be passed to a newly focussed control that cannot accept text input. CCoeFep -derives from MCoeFocusObserver, which enables FEPs to receive notification -when the focus for the underlying control changes. The implementation of MCoeFocusObserver's -functions can call the enquiry functions of class TCoeInputCapabilities to -find out what input capabilities are supported by the new target control (you -need to get the TCoeInputCapabilities object from the application UI first: -see CCoeAppUi::InputCapabilities()). - -@see NewFepL() -@publishedAll -@released */ -class CCoeFep : public CBase, protected MFepAttributeStorer, public MCoeForegroundObserver, public MCoeFocusObserver, private MCoeMessageObserver - { -public: - /** Response to key or pointer event */ - enum TEventResponse - { - EEventWasNotConsumed, /** < Indicates that the FEP did not process the event. */ - EEventWasConsumed /** < Indicates that the FEP did process the event. */ - }; - - /** Enables FEPs to have some code called but not in the context of the current - call stack, hence the name "deferred". - - For an explanation of the intended use of this class, see - CCoeFep::MakeDeferredFunctionCall(). */ - class MDeferredFunctionCall - { - public: - /** This function is called from within a high-priority active object's RunL() - shortly after the active object has been queued by calling CCoeFep::MakeDeferredFunctionCall(). */ - virtual void ExecuteFunctionL()=0; - private: // reserved. do not override! - IMPORT_C virtual void MDeferredFunctionCall_Reserved_1(); - IMPORT_C virtual void MDeferredFunctionCall_Reserved_2(); - }; - - /** FEPs send character codes to the application underneath them using SimulateKeyEventsL(). - Occasionally a FEP may wish to also specify the modifiers (e.g. Fn, Ctrl, - Shift) to be sent with that character code. In this case, they should use - the overload of CCoeFep::SimulateKeyEventsL() which takes an array of MModifiedCharacters. */ - class MModifiedCharacter - { - public: - /** Returns the character code of the key combination. - - @return The character code of the key combination. */ - virtual TUint CharacterCode() const=0; - /** Returns a TUint which indicates which modifiers to override, rather than using - the current state of the keyboard's modifiers. - - @return The modifiers to override in the key combination. */ - virtual TUint ModifierMask() const=0; - /** Returns a TUint which indicates which of the modifiers specified in the mask - (returned by ModifierMask()) must be on and which must be off. - - @return Indicates which of the modifiers specified in the mask (returned by - ModifierMask()) must be on and which must be off. */ - virtual TUint ModifierValues() const=0; - private: // reserved. do not override! - IMPORT_C virtual void MModifiedCharacter_Reserved_1(); - IMPORT_C virtual void MModifiedCharacter_Reserved_2(); - }; - -public: - IMPORT_C virtual ~CCoeFep(); - IMPORT_C TBool IsSimulatingKeyEvent() const; - IMPORT_C TBool IsTurnedOnByL(const TKeyEvent& aKeyEvent) const; - IMPORT_C TBool IsTurnedOffByL(const TKeyEvent& aKeyEvent) const; -public: // new public virtual functions - /** Cancels the FEP transaction. - - A FEP transaction begins when an event is first intercepted by the FEP and - ends either when the processed text is committed to the application underneath, - or if it is cancelled. */ - virtual void CancelTransaction()=0; -public: - IMPORT_C void OnStartingHandlingKeyEvent_WithDownUpFilterLC(); - IMPORT_C void OnStartingHandlingKeyEvent_NoDownUpFilterLC(); - IMPORT_C TKeyResponse OnFinishingHandlingKeyEvent_WithDownUpFilterL(TEventCode aEventCode, const TKeyEvent& aKeyEvent, TKeyResponse aKeyResponse); - IMPORT_C TKeyResponse OnFinishingHandlingKeyEvent_NoDownUpFilterL(TEventCode aEventCode, const TKeyEvent& aKeyEvent, TKeyResponse aKeyResponse); -protected: - IMPORT_C CCoeFep(CCoeEnv& aConeEnvironment); - IMPORT_C void BaseConstructL(const CCoeFepParameters& aFepParameters); - IMPORT_C void ReadAllAttributesL(); - IMPORT_C void MakeDeferredFunctionCall(MDeferredFunctionCall& aDeferredFunctionCall); - IMPORT_C void SimulateKeyEventsL(const TArray& aArrayOfCharacters); - IMPORT_C void SimulateKeyEventsL(const TArray& aArrayOfModifiedCharacters); - IMPORT_C void WriteAttributeDataAndBroadcastL(TUid aAttributeUid); - IMPORT_C void WriteAttributeDataAndBroadcastL(const TArray& aAttributeUids); - IMPORT_C TBool IsOn() const; -public: // not for external use - void SetOnState(TBool aOnState); -private: - class CHighPriorityActive; - class CLowPriorityActive; - class CCoeFepExtra; -private: - void DoOnStartingHandlingKeyEventLC(TUint aFlagNoDownUpFilter); - TKeyResponse DoOnFinishingHandlingKeyEventL(TEventCode aEventCode, const TKeyEvent& aKeyEvent, TKeyResponse aKeyResponse); - static void TurnOffKeyEventHandlingFlags(TAny* aFlags); - // from MFepAttributeStorer - IMPORT_C virtual void MFepAttributeStorer_Reserved_1(); - IMPORT_C virtual void MFepAttributeStorer_Reserved_2(); - // from MCoeForegroundObserver - IMPORT_C virtual void MCoeForegroundObserver_Reserved_1(); - IMPORT_C virtual void MCoeForegroundObserver_Reserved_2(); - // from MCoeFocusObserver - IMPORT_C virtual void MCoeFocusObserver_Reserved_1(); - IMPORT_C virtual void MCoeFocusObserver_Reserved_2(); - // from MCoeMessageObserver - IMPORT_C virtual TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8& aMessageParameters); - IMPORT_C virtual void MCoeMessageObserver_Reserved_1(); - IMPORT_C virtual void MCoeMessageObserver_Reserved_2(); - // new private virtual functions - /** Called to notify the FEP that it has either just been turned on or just been - turned off (it can find out which by calling CCoeFep::IsOn()). - - If FEPs want to change their appearance when they are off (e.g. make themselves - invisible), then they should implement this function accordingly. - - @publishedAll - @released */ - virtual void IsOnHasChangedState()=0; - - /** - @deprecated */ - virtual void OfferKeyEventL(TEventResponse& /*aEventResponse*/, const TKeyEvent& /*aKeyEvent*/, TEventCode /*aEventCode*/){}; - - /** - @deprecated */ - virtual void OfferPointerEventL(TEventResponse& /*aEventResponse*/, const TPointerEvent& /*aPointerEvent*/, const CCoeControl* /*aWindowOwningControl*/){}; - - /** - @deprecated */ - virtual void OfferPointerBufferReadyEventL(TEventResponse& /*aEventResponse*/, const CCoeControl* /*aWindowOwningControl*/){}; -private: // reserved. do not override! - IMPORT_C virtual void CCoeFep_Reserved_1(); - IMPORT_C virtual void CCoeFep_Reserved_2(); -private: - class SKeyEvent; - CCoeEnv& iConeEnvironment; - TUint iFlags; - CHighPriorityActive* iHighPriorityActive; - CCoeFepExtra* iExtra; - SKeyEvent* iLastKeyEvent; - TUint iSpare[13]; - }; - - -/** Specifies the mixin protocol for handling pointer events in inline text. - -This class should be overridden by front end processors which support inline editing. - -An instance of a class which implements this protocol should be passed to -MCoeFepAwareTextEditor::StartFepInlineEditL(). - -@publishedAll -@released */ -class MFepPointerEventHandlerDuringInlineEdit // to be overridden by inline-editing front-end processors - { -public: - /** This function is called when a pointer event is received within the inline - text. It may need to update the cursor position within the inline text and - do text selection in response to drag events. - - @param aType Pointer event types. - @param aModifiers Modifier keys (SHIFT, CTRL, FN etc.). - @param aPositionInInlineText The position at which the pointer event occurred, - as an offset from the start of the inline text string. */ - virtual void HandlePointerEventInInlineTextL(TPointerEvent::TType aType, TUint aModifiers, TInt aPositionInInlineText)=0; -private: // reserved. do not override! - IMPORT_C virtual void MFepPointerEventHandlerDuringInlineEdit_Reserved_1(); - IMPORT_C virtual void MFepPointerEventHandlerDuringInlineEdit_Reserved_2(); - }; - -class TCharFormat; -class TCursorSelection; -class MFormCustomDraw; -class MFepInlineTextFormatRetriever; -class MCoeFepAwareTextEditor_Extension1; - - -/** Specifies a protocol for FEP-aware text editors. - -TCoeInputCapabilities::FepAwareTextEditor() returns a pointer to an object -of this class. A NULL return value indicates that the interface is not supported -by any of the currently focused controls. - -Inline editing means composing text directly in the target text editor control -rather than in the FEP's edit window first. The target text editor must implement -the MCoeFepAwareTextEditor interface in order to support inline text. The -inline text may be differentiated from the surrounding text by the use of -different formatting. These differences are removed when the inline text transaction -is committed (causing the inline text to become a real part of the document). -Cancelling the inline text transaction deletes the inline text and restores -any previously selected text. A benefit of inline editing is that the user -only has to concentrate on one area of the screen rather than two. - -An inline editing transaction consists of the following sequence of function -calls: - -- a call to StartFepInlineEditL() - -- zero, one or more calls to UpdateFepInlineTextL() - -- a call to either CommitFepInlineEditL() or CancelFepInlineEdit() - -@publishedAll -@released */ -class MCoeFepAwareTextEditor // to be overridden by text-editors - { -public: - /** - Starts a FEP inline editing transaction. - - Inserts a descriptor containing the initial inline text into the text editor. - The inline text should normally replace any selected text. - - The final three parameters are instances of abstract classes, so that the - caller of this function must create and instantiate classes deriving from - them. These instances must remain in existence for the entire duration of - the inline editing transaction. - - Inline editing should not already be taking place when this function is called. - - @param aInitialInlineText The inline text to insert into the text editor. - @param aPositionOfInsertionPointInInlineText An insertion position within the - inline text. This is an offset from the start of the inline text. - @param aCursorVisibility ETrue for visible text cursor, EFalse for invisible - text cursor in the text editor. - @param aCustomDraw Pointer to a custom drawing object. May be used to do advanced - formatting of the inline text. This parameter is optional; a NULL pointer - may be specified. - @param aInlineTextFormatRetriever Defines a single member function, GetFormatOfFepInlineText() - which is used by the text editor to find out the formatting to apply to the - inline text. It is also possible to apply different formatting to different - parts of the inline text. - @param aPointerEventHandlerDuringInlineEdit Defines a single function, HandlePointerEventInInlineTextL() - which is called when a pointer event is received within the inline text. This - function might update the cursor position within the inline text and do text - selection. - */ - virtual void StartFepInlineEditL(const TDesC& aInitialInlineText, TInt aPositionOfInsertionPointInInlineText, - TBool aCursorVisibility, const MFormCustomDraw* aCustomDraw, MFepInlineTextFormatRetriever& aInlineTextFormatRetriever, - MFepPointerEventHandlerDuringInlineEdit& aPointerEventHandlerDuringInlineEdit)=0; - /** Updates the inline text. - - Called when a character is added to or deleted from the inline text. - - The descriptor aNewInlineText contains the entire new inline text string, - not just the new text to be combined with the old inline text. - - @param aNewInlineText Descriptor which holds the entire new inline text string. - @param aPositionOfInsertionPointInInlineText The position of the insertion - point (i.e. the cursor) within the inline text string aNewInlineText. This - is an offset from the start of the string. */ - virtual void UpdateFepInlineTextL(const TDesC& aNewInlineText, TInt aPositionOfInsertionPointInInlineText)=0; - /** Sets the visibility of the text cursor in the text editor. - - The cursor visibility is initialised using StartFepInlineEditL(). SetInlineEditingCursorVisibilityL() - is provided for FEPs which need to change the visibility of the cursor during - the inline editing transaction. - - @param aCursorVisibility ETrue for visible text cursor, EFalse for invisible - text cursor. */ - virtual void SetInlineEditingCursorVisibilityL(TBool aCursorVisibility)=0; - IMPORT_C void CommitFepInlineEditL(CCoeEnv& aConeEnvironment); - /** Cancels the inline editing transaction. - - The edit window should be rolled back to the state it was in before the FEP - transaction started, i.e. any inline text in the document which has not yet - been committed should be removed. If the inline text has replaced existing text, - (e.g. a selection) the replaced text should be reinstated. */ - virtual void CancelFepInlineEdit()=0; - // with regard to the behaviour of the following functions (except GetScreenCoordinatesForFepL), - // note that when inline editing, the contents of the editor will be such that the text constituting - // the selection immediately prior to inline editing will be replaced by the inline text - // (CancelFepInlineEdit reinstates the previous selection) - /** Returns the total number of characters in the text editor. - - @return The total number of characters in the text editor. */ - virtual TInt DocumentLengthForFep() const=0; - /** Returns the upper limit (if any) on the length of text that the text editor - can hold. - - @return The maximum number of characters that the text editor can hold. */ - virtual TInt DocumentMaximumLengthForFep() const=0; - /** Sets the range of characters in the text editor which should be selected. - - @param aCursorSelection Contains the cursor and anchor positions for the selection. */ - virtual void SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection)=0; - /** Gets the range of characters in the text editor which are selected. - - @param aCursorSelection On return, contains the cursor and anchor positions - of the selection. */ - virtual void GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const=0; - /** Copies a portion of the text editor's text content into a descriptor. - - @param aEditorContent A descriptor; on return contains a copy of a portion - of the text. - @param aDocumentPosition The document position in the text editor from which - to copy. - @param aLengthToRetrieve The number of characters to copy. */ - virtual void GetEditorContentForFep(TDes& aEditorContent, TInt aDocumentPosition, TInt aLengthToRetrieve) const=0; - /** Gets the character formatting which applies to the document position specified. - - This function allows FEPs to find out the ambient formatting so that the FEP - can choose a format for the inline text that will clearly differentiate it - from the surrounding text. - - @param aFormat On return, contains the character formatting which applies - to the character at aDocumentPosition. - @param aDocumentPosition The document position of interest. */ - virtual void GetFormatForFep(TCharFormat& aFormat, TInt aDocumentPosition) const=0; - /** Gets the x,y screen coordinates for the left hand side of the baseline of the - character located at a specified document position. - - Also gets the height (ascent + descent) and ascent of the font of the character. - This function could be used to position the FEP window as close as possible to - the insertion point in the text editor. - - @param aLeftSideOfBaseLine On return, contains the x,y coordinates of the - left side of the baseline of the character located at aDocumentPosition. - @param aHeight On return, contains the height (ascent + descent) of the font - of the character at aDocumentPosition. - @param aAscent On return, contains the ascent of the font of the character - at aDocumentPosition. - @param aDocumentPosition The document position of interest. */ - virtual void GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLine, TInt& aHeight, TInt& aAscent, TInt aDocumentPosition) const=0; - - IMPORT_C MCoeFepAwareTextEditor_Extension1* Extension1(); -private: - /** Private function called by CommitFepInlineEditL(). - - Implementations should commit the inline text to the document. This - ends the inline editing transaction and causes the inline text to - become a part of the document. - - @publishedAll - @released */ - virtual void DoCommitFepInlineEditL()=0; - IMPORT_C virtual MCoeFepAwareTextEditor_Extension1* Extension1(TBool& aSetToTrue); -private: // reserved. do not override! - IMPORT_C virtual void MCoeFepAwareTextEditor_Reserved_2(); - }; - - -class MLayDoc; - -/** -MCoeFepLayDocExtension is an interface class which should be derived from by test editors to -provide access to the current MLayDoc object, and to set a new MLayDoc object. -Used directly from the FEP to decorate the inline edit text, without changing -the actual document text. - -@publishedAll -@released -*/ -class MCoeFepLayDocExtension - { -public: - /** - Retrives the current MLayDoc object from the text editor - - @return Pointer to a MLayDoc object. - */ - virtual MLayDoc* GetCurrentMLayDoc() const = 0; - - /** - Sets a new MLayDoc object into the CTextLayout object - - @param aLayDoc The new layout document - */ - virtual void SetMLayDoc(MLayDoc* aLayDoc) = 0; - - /** - Retrives inline edit positioning information from the editor - @param "TInt& aPositionInDocument" Position of the text in the document - @param "TInt& aCursorPositionInDocument" Position of the cursor in the document - @param "TInt& aSelectionLength" The number of characters in the selected text - */ - virtual void GetFepEditorState(TInt& aPositionInDocument, TInt& aCursorPositionInDocument, TInt& aSelectionLength) = 0; - - /** - Used to tell the editor when the size of the inline edit has changed, so - the text layout can update itself. Should be called before and after the inline - edit has been decorated. - @param "TCursorSelection aSelection" Position of the line edit from the beginning of the text - @param "TInt aDeletedChars" Number of character deleted since the last time the text was formatted. - - */ - virtual void HandleInsertDeleteL(TCursorSelection aSelection,TInt aDeletedChars) = 0; -private: // reserved. do not override! - IMPORT_C virtual void MCoeFepLayDocExtension_Reserved_1(); - IMPORT_C virtual void MCoeFepLayDocExtension_Reserved_2(); - }; - - -/** An interface class which may be derived from by text editors to enable FEPs -to store state information inside the editor. -To be overridden by text-editors - -The CState class, defined within the scope of MCoeFepAwareTextEditor_Extension1 -represents the state information. This is information specific to the control -which is only of interest to the FEP. - -A class which implements this interface must implement the pure virtual functions -State() and SetStateTransferingOwnershipL() , to get and set the state. The -class should also implement the MCoeFepAwareTextEditor interface. It must -override the private virtual MCoeFepAwareTextEditor::Extension1() to return -a pointer to itself (the default implementation returns NULL). The private -virtual MCoeFepAwareTextEditor::Extension1() function is called by the public, -non-virtual MCoeFepAwareTextEditor::Extension1() function. - -For example, if a FEP wants to set some state information in a text editor -which is about to lose focus, the FEP should first call the editor's Extension1() -function. If this returns non-NULL, the FEP should call the editor's implementation -of SetStateTransferingOwnershipL() , passing in an object of a class derived -from CState , which holds the state information. It should also pass in a -UID which uniquely identifies the FEP. Later, when focus returns to the editor, -the FEP can call State() to retrieve the state information it previously set. -Note that CState has several reserved functions, to enable it to be extended -in future, while retaining backwards compatibility. - -@publishedAll -@released */ -class MCoeFepAwareTextEditor_Extension1 - { -public: - class CState : public CBase - /** State information for a text editor control. - This is information specific to the control which is only of interest to the - FEP which sets it. */ - { - protected: - IMPORT_C CState(); - IMPORT_C void BaseConstructL(); - public: - IMPORT_C virtual ~CState(); - private: // reserved. do not override! - IMPORT_C virtual void CState_Reserved_1(); - IMPORT_C virtual void CState_Reserved_2(); - IMPORT_C virtual void CState_Reserved_3(); - IMPORT_C virtual void CState_Reserved_4(); - private: - TAny* iSpareForFutureUse; - }; -public: - /** Sets state information in the text editor. - - This function must only transfer ownership of the state object after it has - successfully done everything that can leave. - - @param aState Pointer to the state information object. - @param aTypeSafetyUid A UID which uniquely identifies the FEP which is calling - this function. The text editor should store this value for use by the State() - function. */ - virtual void SetStateTransferingOwnershipL(CState* aState, TUid aTypeSafetyUid)=0; // this function must only transfer ownership after it has successfully done everything that can leave - /** Gets the state information previously set using SetStateTransferingOwnershipL(). - - This function does not transfer ownership. The function should first check - that aTypeSafetyUid matches the UID value previously specified by SetStateTransferingOwnershipL(). - If it doesn't match, the function should return NULL. - - @param aTypeSafetyUid A UID which uniquely identifies the FEP which is calling - this function. The purpose of this is to enable the FEP to safely downcast - the CState pointer returned by this function to a pointer to a derived class - known about by the FEP. - @return Pointer to the state information object. */ - virtual CState* State(TUid aTypeSafetyUid)=0; -public: - /** Updates the inline text. - - Called when a character is added to or deleted from the inline text. - - The descriptor aNewInlineText contains the entire new inline text string, - not just the new text to be combined with the old inline text. - - @param aSetToTrue Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that - this is the implemented version and not the previous reserved funtion. - @param aCursorSelection The position of any hilighted text. - @param aNewInlineText Descriptor which holds the entire new inline text string. - @param aPositionOfInsertionPointInInlineText - The position of the insertion point (i.e. the cursor) within the inline text string aNewInlineText. - This is an offset from the start of the string. - */ - IMPORT_C virtual void StartFepInlineEditL(TBool& aSetToTrue, const TCursorSelection& aCursorSelection, - const TDesC& aInitialInlineText, TInt aPositionOfInsertionPointInInlineText, TBool aCursorVisibility, - const MFormCustomDraw* aCustomDraw, MFepInlineTextFormatRetriever& aInlineTextFormatRetriever, - MFepPointerEventHandlerDuringInlineEdit& aPointerEventHandlerDuringInlineEdit); - - /** Changes the cursor displayed to indicate different modes of operation. For example how text is enterered - @param aSetToTrue Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that - this is the implemented version and not the previously reserved funtion. - @param aTextCursor The new cursor to be displayed. - */ - IMPORT_C virtual void SetCursorType(TBool& aSetToTrue, const TTextCursor& aTextCursor); - - /** - Retrieves the current MCoeFepLayDocExtension object from the text editor - @param aSetToTrue Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that - this is the implemented version and not the previously reserved funtion. - */ - IMPORT_C virtual MCoeFepLayDocExtension* GetFepLayDocExtension(TBool& aSetToTrue); -private: // reserved. do not override! - IMPORT_C virtual void MCoeFepAwareTextEditor_Extension1_Reserved_4(); - }; - - -/** Retrieves a control's caption for use by a FEP. - -An example of a caption is the non-editable text description displayed -alongside each item in a dialog. - -TCoeInputCapabilities::CaptionRetrieverForFep() returns a pointer to an object -of this class. A NULL return value indicates that the interface is not supported -by any of the currently focused controls. If not NULL, call GetCaptionForFep(), -which fills the supplied buffer with the control's caption, truncating it -if the supplied buffer is too small for the whole caption. - -@publishedAll -@released */ -class MCoeCaptionRetrieverForFep // to be overridden by captioned-controls - { -public: - /** An implementation of this function should fill aCaption with the target control's - caption (or as much of the caption as will fit). - - For example, code similar to the following might be used (assuming that your caption is - stored internally in iCaption): - - @code - const TInt maximumLength=aCaption.MaxLength(); - if (iCaption.Length()>maximumLength) - aCaption=iCaption.Left(maximumLength); - else - aCaption=iCaption; - - @endcode - @param aCaption On return, this should be set to the caption of the target - control. */ - virtual void GetCaptionForFep(TDes& aCaption) const=0; // gets as much as will fit in aCaption -private: // reserved. do not override! - IMPORT_C virtual void MCoeCaptionRetrieverForFep_Reserved_1(); - IMPORT_C virtual void MCoeCaptionRetrieverForFep_Reserved_2(); - }; - -#endif // __FEPBASE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/fepbconfig.h --- a/epoc32/include/fepbconfig.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,226 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __FEPBCONFIG_H__ -#define __FEPBCONFIG_H__ - -#include -#include // class CCoeEnv - -class CRepository; - -/** Specifies the maximum size of a FEP attribute in bytes. - -@publishedAll -@released */ -const TInt KCoeFepMaxAttribDataSize = 200; - - -/** On or off key data for FEPs. - -The CCoeFep class uses instances of this class to specify the key combination which -is used to turn the FEP on and off. These values are initialised during construction -of the FEP (see CCoeFep::BaseConstructL()). - -The class consists of three TUints. They represent: - -- the character code of the key combination - -- a modifier mask which indicates which modifiers are relevant to the key combination - -- the modifier values which indicate which of the modifiers specified in the -modifier mask must be on and which must be off - -For example, if the key combination to turn the FEP off is Fn+Enter, where -the Shift modifier must not be down (and the state of all other modifiers -is irrelevant), the TFepOnOrOffKeyData object would be constructed as follows: - -@code -TFepOnOrOffKeyData(EKeyEnter, EModifierFunc|EModifierShift, EModifierFunc) -@endcode - -Note that modifiers should not be set in the values if they are not also set -in the mask. - -@publishedAll -@released */ -class TFepOnOrOffKeyData - { -public: - inline TFepOnOrOffKeyData(TUint aCharacterCodeForFoldedMatch, TUint aModifierMask, TUint aModifierValues) :iCharacterCodeForFoldedMatch(aCharacterCodeForFoldedMatch), iModifierMask(aModifierMask), iModifierValues(aModifierValues) - /** The C++ constructor is used to construct the key data object with the character - code, the modifier mask and the modifier values. - - @param aCharacterCodeForFoldedMatch The character code. - @param aModifierMask The modifier mask. - @param aModifierValues The modifier values. */ - {} - - inline TUint CharacterCodeForFoldedMatch() const - /** Gets the character code. - - @return The character code. */ - {return iCharacterCodeForFoldedMatch;} - inline TUint ModifierMask() const - /** Gets the modifier mask. - - @return The modifier mask. */ - {return iModifierMask;} - inline TUint ModifierValues() const - /** Gets the modifier values. - - @return The modifier values. */ - {return iModifierValues;} - /** - Checks if 2 TFepOnOrOffKeyData objects have the same values. - - returns Etrue if the 2 objects have the same values, EFalse otherwise - */ - IMPORT_C TBool operator==(const TFepOnOrOffKeyData& aAnother) const; - - - /** - Checks if 2 TFepOnOrOffKeyData objects do not have the the same values. - - returns Etrue if the 2 objects have the same values, EFalse otherwise - */ - IMPORT_C TBool operator!=(const TFepOnOrOffKeyData& aAnother) const; -private: - TUint iCharacterCodeForFoldedMatch; - TUint iModifierMask; - TUint iModifierValues; - }; - -class CDictionaryStore; -class RWriteStream; -class RReadStream; - - -/** Reads and writes generic FEP settings. - -Used by the CCoeFep class. The generic FEP settings are whether the FEP is -on or off and what key combinations should turn the FEP on or off. Also used -to synchronise these settings across all running instances of the FEP. These -settings are generic, unlike FEP attributes which are FEP-specific. FEP attributes -are stored, restored and synchronised using class MFepAttributeStorer. Generic -FEP settings are changed locally using the Set...() member functions. Then, -to store these as the system settings and to apply them globally, call StoreChangesAndBroadcastL(). - -Class CCoeFep initialises its generic FEP settings from the global system -settings during construction. Its generic FEP settings are updated when the -settings are changed by a call to StoreChangesAndBroadcastL() by another running -instance of the FEP. - -@publishedAll -@released */ -class CFepGenericGlobalSettings : public CBase - { -public: - IMPORT_C static CFepGenericGlobalSettings* NewL(CCoeEnv& aConeEnvironment, const TFepOnOrOffKeyData& aDefaultOnKeyData, const TFepOnOrOffKeyData& aDefaultOffKeyData, TBool aDefaultIsOn); - IMPORT_C static CFepGenericGlobalSettings* NewLC(CCoeEnv& aConeEnvironment, const TFepOnOrOffKeyData& aDefaultOnKeyData, const TFepOnOrOffKeyData& aDefaultOffKeyData, TBool aDefaultIsOn); - IMPORT_C static CFepGenericGlobalSettings* NewL(); - IMPORT_C static CFepGenericGlobalSettings* NewLC(); - IMPORT_C TFepOnOrOffKeyData OnKeyData() const; - IMPORT_C void SetOnKeyData(const TFepOnOrOffKeyData& aOnKeyData); - IMPORT_C TFepOnOrOffKeyData OffKeyData() const; - IMPORT_C void SetOffKeyData(const TFepOnOrOffKeyData& aOffKeyData); - IMPORT_C TBool IsOn() const; - IMPORT_C void SetIsOn(TBool aIsOn); - IMPORT_C void StoreChangesAndBroadcastL(); - IMPORT_C void RefreshL(); -public: // not for external use - IMPORT_C static void ReadOnState(CRepository& aRepository, TBool& aOnState, TInt* aError=NULL); - IMPORT_C static void ReadOnOrOffKeyData(CRepository& aRepository, TFepOnOrOffKeyData& aOnOrOffKeyData, TUint32 aRepositoryKeyMask_OnOrOff, TInt* aError=NULL); - IMPORT_C static void WriteOnStateAndBroadcastL(CRepository& aRepository, TBool aOnState, TUint32 aRepositoryKeyMask_DefaultOrDynamic); - IMPORT_C static void WriteOnOrOffKeyDataAndBroadcastL(CRepository& aRepository, const TFepOnOrOffKeyData& aOnOrOffKeyData, TUint32 aRepositoryKey); -private: - CFepGenericGlobalSettings(); - void ConstructL(); -private: - enum - { - EFlagIsOn =0x00000001, - // the EFlagStoreXxx flags below indicate whether this object has had any SetXxx functions called on it, which can be used to optimize what work StoreChangesAndBroadcastL has to do - EFlagStoreIsOn =0x00000002, - EFlagStoreOnKeyData =0x00000004, - EFlagStoreOffKeyData =0x00000008 - }; -private: - TUint iFlags; - TFepOnOrOffKeyData iOnKeyData; - TFepOnOrOffKeyData iOffKeyData; - }; - - -/** Protocol for storing, restoring and synchronising FEP attributes. - -An abstract base class for CCoeFep, so FEPs must implement the pure virtual -functions declared in this class. - -Rather than using a single device-wide instance of a FEP, each application -has its own instance of the FEP. MFepAttributeStorer provides a framework -for synchronising FEP attributes across each running instance of the same -FEP. For this to happen, the FEP must implement MFepAttributeStorer::WriteAttributeDataToStreamL() -and MFepAttributeStorer::ReadAttributeDataFromStreamL(). - -Attributes are FEP-specific, and are identified by a UID which can be accessed -using AttributeAtIndex(). An example of a FEP attribute might be whether inline -editing is enabled or disabled. - -@publishedAll -@released */ -class MFepAttributeStorer - { -public: - IMPORT_C void ReadAllAttributesL(CCoeEnv& aConeEnvironment); - IMPORT_C void WriteAttributeDataAndBroadcastL(CCoeEnv& aConeEnvironment, TUid aAttributeUid); - IMPORT_C void WriteAttributeDataAndBroadcastL(CCoeEnv& aConeEnvironment, const TArray& aAttributeUids); - /** Returns the total number of FEP attributes. - - @return The number of FEP attributes. */ - virtual TInt NumberOfAttributes() const=0; - /** Returns the UID of the FEP attribute at the index specified. - - @param aIndex An array index. - @return The UID of the FEP attribute at aIndex. */ - virtual TUid AttributeAtIndex(TInt aIndex) const=0; - /** Writes the value of the attribute specified to the specified write stream. - - Called by MFepAttributeStorer::WriteAttributeDataAndBroadcastL() for each - attribute passed to it. - - @param aAttributeUid UID of the attribute to write to the stream. - @param aStream The stream to which to write the attribute. */ - virtual void WriteAttributeDataToStreamL(TUid aAttributeUid, RWriteStream& aStream) const=0; - /** Reads the value of the attribute identified by the UID specified in aAttributeUid - from the specified read stream. - - You should take appropriate action if the attribute has changed, e.g. - if inline editing has been disabled, you might cancel the current transaction. - - This function is called by MFepAttributeStorer::ReadAllAttributesL() for all - attributes. It is also called when the FEP receives a message that an attribute - has been changed by another running instance of the FEP (using WriteAttributeDataAndBroadcastL()). - - @param aAttributeUid Identifies the attribute whose value should be read. - @param aStream Read stream from which to read the attribute's value. */ - virtual void ReadAttributeDataFromStreamL(TUid aAttributeUid, RReadStream& aStream)=0; -private: - IMPORT_C virtual void MFepAttributeStorer_Reserved_1(); - IMPORT_C virtual void MFepAttributeStorer_Reserved_2(); - TInt NumberOfOccurrencesOfAttributeUid(TUid aAttributeUid) const; - }; - -#endif // __FEPBCONFIG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/fepbutils.h --- a/epoc32/include/fepbutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __FEPBUTILS_H__ -#define __FEPBUTILS_H__ - - - - -/** Macro to be called by a keyboard-based FEP at the start of its CCoeControl::OfferKeyEventL()-overriding -function. - -It causes key up and key down events to be consumed so that the FEP only receives -standard key events (of type EEventKey, see the TEventCode enumeration). It -also causes key events that turn the FEP on or off to be consumed. If the -FEP is simulating key events, or is off, no key events are consumed (so that -all are passed on to the underlying application) and the macro returns with -EKeyWasNotConsumed. - -This should be the first thing called in the OfferKeyEventL() function. The -FEP_END_KEY_EVENT_HANDLER_L macro should be used to return from the function. - -@param aFep The CCoeFep object, should not be a pointer -@param aKeyEvent The TKeyEvent object from OfferKeyEventL() -@param aEventCode The TEventCode object from OfferKeyEventL() - -@see TEventCode -@publishedAll -@released */ -#define FEP_START_KEY_EVENT_HANDLER_L(aFep, aKeyEvent, aEventCode)\ - {\ - if ((aFep).IsSimulatingKeyEvent())\ - {\ - return EKeyWasNotConsumed;\ - }\ - (aFep).OnStartingHandlingKeyEvent_WithDownUpFilterLC();\ - if (((aEventCode)!=EEventKey))\ - {\ - return (aFep).OnFinishingHandlingKeyEvent_WithDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasConsumed);\ - }\ - if (!(aFep).IsOn())\ - {\ - return (aFep).OnFinishingHandlingKeyEvent_WithDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasNotConsumed);\ - }\ - } - -/** Macro to be called by a keyboard-based FEP to return from its CCoeControl::OfferKeyEventL()-overriding -function. - -It should be used instead of the return statement. It should only be used -if the FEP_START_KEY_EVENT_HANDLER_L macro was used at the start of the function. - -@param aFep The CCoeFep object, should not be a pointer -@param aKeyEvent The TKeyEvent object from OfferKeyEventL() -@param aKeyResponse Defined in EPOC32\INCLUDE\COEDEF.H - If set to EKeyWasNotConsumed, allows the key event to reach the underlying application. - If set to EKeyWasConsumed, prevents the key event reaching the underlying application. - -@publishedAll -@released */ -#define FEP_END_KEY_EVENT_HANDLER_L(aFep, aKeyEvent, aKeyResponse)\ - {\ - return (aFep).OnFinishingHandlingKeyEvent_WithDownUpFilterL(EEventKey, (aKeyEvent), (aKeyResponse));\ - } - -/** Macro to be called by a keyboard-based FEP at the start of its CCoeControl::OfferKeyEventL()-overriding -function. - -It causes events that turn the FEP on or off to be consumed. This variant -of the macro ignores key up and key down events so that it should be used -in preference to FEP_START_KEY_EVENT_HANDLER_L in the rare cases where the -FEP wishes to handle EEventKeyDown or EEventKeyUp events. If the FEP is simulating -key events, or is off, no key events are consumed and OfferKeyEventL() returns -with EKeyWasNotConsumed. - -This should be the first thing called in the OfferKeyEventL() function. The -FEP_END_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L macro should be used to return -from the function. - -@param aFep The CCoeFep object, should not be a pointer -@param aKeyEvent The TKeyEvent object from OfferKeyEventL() -@param aEventCode The TEventCode object from OfferKeyEventL() - -@publishedAll -@released */ -#define FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L(aFep, aKeyEvent, aEventCode)\ - {\ - if ((aFep).IsSimulatingKeyEvent())\ - {\ - return EKeyWasNotConsumed;\ - }\ - (aFep).OnStartingHandlingKeyEvent_NoDownUpFilterLC();\ - if ((aEventCode)==EEventKey)\ - {\ - if (!(aFep).IsOn())\ - {\ - return (aFep).OnFinishingHandlingKeyEvent_NoDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasNotConsumed);\ - }\ - }\ - } - -/** Macro to be called by a keyboard-based FEP to return from its CCoeControl::OfferKeyEventL()-overriding -function. - -It should be used instead of the return statement. This variant of the macro -should only be used if the FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L -macro was used at the start of the function. - -@param aFep The CCoeFep object, should not be a pointer -@param aKeyEvent The TKeyEvent object from OfferKeyEventL() -@param aEventCode The TEventCode object from OfferKeyEventL() -@param aKeyResponse Defined in EPOC32\INCLUDE\COEDEF. - If set to EKeyWasNotConsumed, allows the key event to reach the underlying application. - If set to EKeyWasConsumed, prevents the key event reaching the underlying application. - -@publishedAll -@released */ -#define FEP_END_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L(aFep, aKeyEvent, aEventCode, aKeyResponse)\ - {\ - return (aFep).OnFinishingHandlingKeyEvent_NoDownUpFilterL((aEventCode), (aKeyEvent), (aKeyResponse));\ - } - - - -#endif // __FEPBUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/fepplugin.h --- a/epoc32/include/fepplugin.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __FEPPLUGIN_H__ -#define __FEPPLUGIN_H__ - -#include - -class CCoeEnv; -class CCoeFep; -class CCoeFepParameters; - -const TUid KUidFepPluginInterface = { 0x1020233F }; - -/** -CCoeFepPlugIn -Abstract base class for FEP plug ins -@publishedAll -@released -*/ -class CCoeFepPlugIn : public CBase - { -public: - inline static CCoeFepPlugIn* NewL(TUid aFepUid); - virtual ~CCoeFepPlugIn(); -public: - /** Creates a fully constructed object of CCoeFEP. - - @param aConeEnvironment A reference to the application's control environment. - @param aFepParameters FEP parameters. - @return A pointer to the newly created object. - */ - virtual CCoeFep* NewFepL(CCoeEnv& aConeEnvironment, const CCoeFepParameters& aFepParameters) = 0; - - /** Runs the FEP settings dialog. - - @param aConeEnvironment A reference to the application's control environment. - */ - virtual void SynchronouslyExecuteSettingsDialogL(CCoeEnv& aConeEnvironment) = 0; - -private: - TUid iDtorTag; - }; - -#include - -#endif // __FEPPLUGIN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/fepplugin.inl --- a/epoc32/include/fepplugin.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __FEPPLUGIN_INL__ -#define __FEPPLUGIN_INL__ - -#include - -/** -Factory function to create and return a FEP plug-in with the specified UID. - -@return A FEP plug-in object instance corresponding to the UID provided -@param aFepUid The UID of the FEP plug-in implementation to be loaded -*/ -inline CCoeFepPlugIn* CCoeFepPlugIn::NewL(TUid aFepUid) - { // static - TAny* any = REComSession::CreateImplementationL(aFepUid, _FOFF(CCoeFepPlugIn, iDtorTag)); - CCoeFepPlugIn* feppi = reinterpret_cast(any); - return feppi; - } - -/** -Destructor that destroys the FEP plug-in. -*/ -inline CCoeFepPlugIn::~CCoeFepPlugIn() - { - REComSession::DestroyedImplementation(iDtorTag); - } - - -#endif // __FEPPLUGIN_INL__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gles/egl.h --- a/epoc32/include/gles/egl.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// GLES/EGL.H -// -// - -#ifndef __GLES_EGL_H_ -#define __GLES_EGL_H_ - -/** -@publishedPartner - -__OPENGLESHEADERS_LEGACY_EGL_1_1 - -The purpose of this define is to allow the staged migration to -EGL 1.3 from EGL 1.1 taken from the perspective of OpenGL ES 1.X - -If __OPENGLESHEADERS_LEGACY_EGL_1_1 is defined, then GLES/egl.h and -GLES/egltypes.h will only provide the EGL 1.1 API; in particular no -symbols from a later version of EGL will be seen at a source code level. -This is considered to be legacy behaviour. If -__OPENGLESHEADERS_LEGACY_EGL_1_1 is not defined, the GLES/egl.h -and GLES/egltypes.h header files will re-direct to the system-wide -EGL/egl.h. and EGL/egltypes.h respectively. - -The use of GLES/egl.h or GLES/egltypes.h by applications is considered -legacy behaviour because applications should instead use EGL/egl.h -or EGL/egltypes.h respectively. - -When this legacy behaviour is desired, the define should be placed in an -OEM-specific system-wide .hrh file. Symbian product configurations -never set this legacy behaviour. -*/ -#ifdef __OPENGLESHEADERS_LEGACY_EGL_1_1 -#include -#else -#include -#include -#endif - -#endif /* __GLES_EGL_H_ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/grdcells.h --- a/epoc32/include/grdcells.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GRDCELLS_H__) -#define __GRDCELLS_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__BACELL_H__) -#include -#endif - - - -class CGridCellRegion : public CBase -/** Defines a selected region. - -A selected region consists of one or more cell ranges, represented by TRangeRef -objects, that exist within a defined boundary. The boundary is itself defined -as a cell range. - -Cell ranges map cell selections, and the class provides the behaviour to manage -these selections. - -@publishedAll -@released */ - { -public: - IMPORT_C static CGridCellRegion* NewL(const TRangeRef& aBounds); - IMPORT_C virtual ~CGridCellRegion(); - IMPORT_C void AddColL(TInt aCol); - IMPORT_C void AddRowL(TInt aRow); - IMPORT_C void AddCellRangeL(const TRangeRef& aCellRange); - IMPORT_C void SetLastCellRange(const TRangeRef& aCellRange); - IMPORT_C void ResizeBounds(const TCellRef& aNewToBounds); - IMPORT_C void Reset(); - IMPORT_C TInt Count() const; - IMPORT_C TBool IsCellSelected(const TCellRef &aCell) const; - IMPORT_C TBool IsCellSelected(const TCellRef &aCell,TInt aIndex) const; - IMPORT_C TBool IsCellSelectedLastIndex(const TCellRef &aCell) const; - IMPORT_C TBool IsRowSelected(TInt aRow) const; - IMPORT_C TBool IsRowSelected(TInt aRow,TInt aIndex) const; - IMPORT_C TBool IsRowSelectedLastIndex(TInt aRow) const; - IMPORT_C TBool IsAnyRowSelected() const; - IMPORT_C TBool IsColSelected(TInt aCol) const; - IMPORT_C TBool IsColSelected(TInt aCol,TInt aIndex) const; - IMPORT_C TBool IsColSelectedLastIndex(TInt aCol) const; - IMPORT_C TBool IsAnyColSelected() const; - IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange) const; - IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange,TInt aIndex) const; - IMPORT_C TBool IsRangeSelectedLastIndex(const TRangeRef &aRange) const; - IMPORT_C TRangeRef operator[](TInt aIndex) const; - IMPORT_C const CArrayFix* RangeList() const; -private: - CGridCellRegion(const TRangeRef& aBounds); - void ConstructL(); -private: - TRangeRef iBounds; - CArrayFix* iRangeList; - }; -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/grddef.h --- a/epoc32/include/grddef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Some standard definitions used in GRID -// -// - -#if !defined(__GRDDEF_H__) -#define __GRDDEF_H__ - -/** Defines the direction and the amount by which a -cursor is to move, when performing a scrolling operation. -@publishedAll -@released -@see CGridLay::PageScroll() -@see CGridImg::MoveCursorL() */ -enum TMoveDirectionAndAmount - { - /** Move up by one row. */ - EMoveRowUp, - /** Move down by one row. */ - EMoveRowDown, - /** Move left by one column. */ - EMoveColumnLeft, - /** Move right by one column. */ - EMoveColumnRight, - /** Move up by one page. */ - EMovePageUp, - /** Move down by one page. */ - EMovePageDown, - /** Move left by one page. */ - EMovePageLeft, - /** Move right by one page. */ - EMovePageRight, - /** Move to the start of the row. */ - EMoveRowStart, - /** Move to the end of the row */ - EMoveRowEnd, - /** Move to the home position. */ - EMoveHome, - /** Move to the end position. */ - EMoveEnd, - /** Do not move the cursor. */ - EMoveNone, - /** Move to the start of the column. */ - EMoveColumnStart, - /** Move to the end of the column. */ - EMoveColumnEnd - }; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/grdprint.h --- a/epoc32/include/grdprint.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GRDPRINT_H__) -#define __GRDPRINT_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__GRDSTD_H__) -#include -#endif - - - -class CGridPrinter : public CBase, public MPageRegionPrinter -/** Handles printing and print preview functionality for grid. -@publishedAll -@released */ - { -public: - IMPORT_C static CGridPrinter* NewL(CGridLay* aGridLay,CGridLabelImg* aPrintLabelImg, - CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor); - IMPORT_C virtual ~CGridPrinter(); - inline void SetRealPrintingDeviceMap(const MGraphicsDeviceMap* aGraphicsDeviceMap); - IMPORT_C void SetTopLeftMargin(const TPoint& aTlMarginInTwips); - IMPORT_C void SetPageSizeInTwipsL(const TSize& aSizeInTwips); - IMPORT_C void PaginateL(); - inline CGridLay& GridLay(); -public: // from MPageRegionPrinter - IMPORT_C virtual void PrintBandL(CGraphicsDevice* aDevice,TInt aPageNo,const TBandAttributes& aBandInPixels); -private: - CGridPrinter(CGridLabelImg* aPrintLabelImg,CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor); - void ConstructL(CGridLay* aGridLay); - void SetGdMapAndPushLabelImgLC(); -private: - CGridLay* iGridLay; - CGridImg* iGridImg; - CGridLabelImg* iPrintLabelImg; - CGridCellImg* iPrintCellImg; - TZoomFactor* iZoomFactor; - const MGraphicsDeviceMap* iGraphicsDeviceMap; - TPoint iTlMarginInTwips; - TRect iPrintablePage; - TInt iScaleFactor; - }; - -#include -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/grdprint.inl --- a/epoc32/include/grdprint.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -inline void CGridPrinter::SetRealPrintingDeviceMap(const MGraphicsDeviceMap* aGraphicsDeviceMap) -/** Supplies the object that deals with the mapping between twips and device-specific -units for a specific printer. - -@param aGraphicsDeviceMap The interface object for mapping between twips and -device-specific units. */ - { - iGraphicsDeviceMap=aGraphicsDeviceMap; - } - -inline CGridLay& CGridPrinter::GridLay() -/** Gets the grid layout used by this printing object. - -Note that this is not the same object passed to CGridPrinter::NewL(). Internally, -the class creates its own CGridLay object from the information supplied in the -CGridLay object passed to CGridPrinter::NewL(). - -@return The grid layout object. */ - { - return *iGridLay; - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/grdstd.h --- a/epoc32/include/grdstd.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,753 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GRDSTD_H__) -#define __GRDSTD_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__GDI_H__) -#include -#endif -#if !defined(__GRDCELLS_H__) -#include -#endif -#if !defined(__GRDDEF_H__) -#include -#endif - - - -class MGridTable -/** An interface that can be implemented to provide row and column information. - -Note that for grids that have indefinite row boundaries, an implementation -is mandatory. - -A concrete implementation is passed to a CGridLay object through its CGridLay::ConstructL() -functions or its CGridLay::SetGridTable() function. - -@publishedAll -@released */ - { -public: - enum - { - /** The number of rows returned by the default implementation of RowExtent(). */ - EDefaultRowExtent=20, - /** The number of columns returned by the default implementation of ColumnExtent(). */ - EDefaultColumnExtent=20 - }; -public: - IMPORT_C virtual TBool RequestRow(TInt aRow,TInt& aReturnRow) const;//If used should be derived from - IMPORT_C virtual TInt RowExtent() const; - IMPORT_C virtual TInt ColumnExtent() const; - }; - - -////////////////////////-> - -class TGridColors -/** The grid colour specification. - -An object of this type encapsulates the colours to be used when drawing a -grid cell. - -@publishedAll -@released -@see CGridLabelImg */ - { -public: - IMPORT_C TGridColors(); - IMPORT_C TGridColors(TRgb aForeground, TRgb aBackground, TRgb aLines, TRgb aLabelSeparators); -public: - /** The foreground colour. */ - TRgb iForeground; - /** The background colour. */ - TRgb iBackground; - /** The colour of lines. */ - TRgb iLines; - /** The colour of label separators. */ - TRgb iLabelSeparators; -// TRgb iEdge; - }; -////////////////////////-> - - -class RReadStream; -class RWriteStream; -class CStreamStore; -class CGridImg; -class CSparseMap; - - -class CGridLay : public CBase -/** Handles the layout of a grid, and controls how columns, rows and selections -appear. - -@publishedAll -@released */ - { - friend class CGridImg; -public: - /** Defines the order in which pages are printed. */ - enum TPageOrder - { - /** All pages in a horizontal line are drawn before starting on the next horizontal - line. */ - ERightThenDown, - /** All pages in a vertical line are drawn before starting on the next vertical - line to the right. */ - EDownThenRight - }; - /** Indicates whether the size of the grid should be adjusted when columns and - rows are inserted or deleted. */ - enum TFixGridRange - { - /** The grid range should not be adjusted on insertion or deletion of rows and/or columns. */ - EFixGridRange, - /** The grid range can be adjusted on insertion or deletion of rows and/or columns. */ - EAdjustGridRange - }; -public: - IMPORT_C CGridLay(MGraphicsDeviceMap* aGraphicsDeviceMap); - IMPORT_C void ConstructL(CGridLay* aGridLay,CGridImg* aGridImg);//Constructs Partial Copy - IMPORT_C void ConstructL(const MGridTable *aGridTable,CGridImg *aGridImg,TInt aNoOfRows,TInt aNoOfCols); - IMPORT_C void ConstructL(const MGridTable *aGridTable,CGridImg *aGridImg,TInt aNoOfCols); - IMPORT_C virtual ~CGridLay(); - - IMPORT_C TPoint PageScroll(TMoveDirectionAndAmount aPageScroll); - IMPORT_C TPoint ExposeCell(const TCellRef &aCell); - IMPORT_C TPoint ExposeCellToTopLeft(const TCellRef &aCell); - - IMPORT_C void SetGridImgL(CGridImg* aGridImg); - inline void SetGridTable(const MGridTable* aGridTable); - inline TRangeRef VisibleRange() const; - IMPORT_C void SetVisibleRange(const TCellRef& aTopLeftCell); - inline TRangeRef TitleRange() const; - inline TRangeRef GridRange() const; - IMPORT_C void SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap); - IMPORT_C void SetGridToDefault(); - - IMPORT_C TInt ColumnWidthInTwips(TInt aCol) const; - IMPORT_C void SetColumnWidthInTwipsL(TInt aCol,TInt aWidthInTwips); - IMPORT_C TInt SetColumnWidthInTwipsL(TInt aStartCol,TInt aEndCol,TInt aWidthInTwips); - IMPORT_C TInt DefaultColumnWidthInTwips() const; - IMPORT_C void SetDefaultColumnWidthInTwips(TInt aWidthInTwips); - IMPORT_C void SetColumnWidthsToDefault(); - IMPORT_C TInt MinColumnWidthInPixels() const; - IMPORT_C void SetMinColumnWidthInPixels(TInt aWidthInPixels); - IMPORT_C TInt ColumnWidthOfSelectedInTwips() const; - IMPORT_C void SetColumnWidthOfSelectedInTwipsL(TInt aWidthInTwips); - IMPORT_C TInt RowHeightInTwips(TInt aRow) const; - IMPORT_C void SetRowHeightInTwipsL(TInt aRow,TInt aHeightInTwips); - IMPORT_C TInt SetRowHeightInTwipsL(TInt aStartRow,TInt aEndRow,TInt aHeightInTwips); - IMPORT_C TInt DefaultRowHeightInTwips() const; - IMPORT_C void SetDefaultRowHeightInTwips(TInt aHeightInTwips); - IMPORT_C void SetRowHeightsToDefault(); - IMPORT_C TInt MinRowHeightInPixels() const; - IMPORT_C void SetMinRowHeightInPixels(TInt aHeightInPixels); - IMPORT_C TInt RowHeightOfSelectedInTwips() const; - IMPORT_C void SetRowHeightOfSelectedInTwipsL(TInt aHeightInTwips); - IMPORT_C void RecalcPixelSparseMaps(); - IMPORT_C void InsertDeleteColumns(TInt aStartCol,TInt aNoOfCols, - TFixGridRange aFixGridRange=EFixGridRange); - IMPORT_C void InsertDeleteRows(TInt aStartRow,TInt aNoOfRows, - TFixGridRange aFixGridRange=EFixGridRange); - - inline TBool IsSideLabels() const; - IMPORT_C void SetSideLabels(TBool aState); - inline TBool IsTopLabels() const; - IMPORT_C void SetTopLabels(TBool aState); - inline TBool IsVerticalGridLines() const; - IMPORT_C void SetVerticalGridLines(TBool aState); - inline TBool IsHorizontalGridLines() const; - IMPORT_C void SetHorizontalGridLines(TBool aState); - inline TBool IsGridLabelSeparators() const; - IMPORT_C void SetGridLabelSeparators(TBool aState); - inline TBool IsColumnBursting() const; - IMPORT_C void SetColumnBursting(TBool aState); - inline TBool IsCursorVisible() const; - IMPORT_C void SetCursorVisible(TBool aVisible); - inline TBool IsHighlightVisible() const; - IMPORT_C void SetHighlightVisible(TBool aVisible); - inline TBool IsRowPermanentlySelected() const; - IMPORT_C void SetRowPermanentlySelectedL(TBool aState); - inline TBool IsTitleLines() const; - inline TBool IsHorizontalTitleLine() const; - inline TBool IsVerticalTitleLine() const; - IMPORT_C void SetTitleLinesL(TBool aState); - IMPORT_C void SetTitleLinesL(const TCellRef& aCellRef); - IMPORT_C void ToggleTitleLinesL(); - inline TBool IsIndefiniteRowBoundaries() const; - inline TBool IsUniformRowHeight() const; - IMPORT_C void SetUniformRowHeight(TBool aState); - inline TBool IsUniformColumnWidth() const; - IMPORT_C void SetUniformColumnWidth(TBool aState); - inline TBool IsTopLabelDragDisabled() const; - IMPORT_C void SetTopLabelDragDisabled(TBool aState); - inline TBool IsSideLabelDragDisabled() const; - IMPORT_C void SetSideLabelDragDisabled(TBool aState); - inline TBool IsPrintedLabels() const; - IMPORT_C void SetPrintedLabels(TBool aState); - inline TBool IsPrintedGridLines() const; - IMPORT_C void SetPrintedGridLines(TBool aState); - inline TBool IsEncroachingCellBorders() const; - IMPORT_C void SetEncroachingCellBorders(TBool aState); - inline TBool IsRowSelectionDisabled() const; - IMPORT_C void SetRowSelectionDisabled(TBool aState); - inline TBool IsColumnSelectionDisabled() const; - IMPORT_C void SetColumnSelectionDisabled(TBool aState); - inline TBool IsAutoClearGridCells() const; - IMPORT_C void SetAutoClearGridCells(TBool aState); - inline TBool IsPageBreakLinesHidden() const; - IMPORT_C void SetPageBreakLinesHidden(TBool aState); - inline TBool HasChanged() const; - inline void SetHasChanged(TBool aHasChanged); - inline void SetGridEdgeColor(TRgb aColor); - - IMPORT_C TInt MinVisibleFromRow() const; - IMPORT_C TInt MinVisibleFromColumn() const; - IMPORT_C void ResetVisibleToRow(); - IMPORT_C void ResetVisibleToColumn(); - IMPORT_C void ResetVisibleToCell(); - IMPORT_C TInt RowExtent() const; - IMPORT_C TInt ColumnExtent() const; - - IMPORT_C TInt RowToYVal(TInt aRow) const; - IMPORT_C TInt RowToYVal(TInt aStartRow,TInt aEndRow) const; - IMPORT_C TInt VisibleRowToYVal(TInt aRow) const; - IMPORT_C TInt TitleRowToYVal(TInt aTitleRow) const; - IMPORT_C TInt ColumnToXVal(TInt aCol) const; - IMPORT_C TInt ColumnToXVal(TInt aStartCol,TInt aEndCol) const; - IMPORT_C TInt VisibleColumnToXVal(TInt aCol) const; - IMPORT_C TInt TitleColumnToXVal(TInt aTitleCol) const; - IMPORT_C TInt YValToRow(TInt aYVal) const; - IMPORT_C TInt YValToRow(TInt aStartRow,TInt aDisp) const; - IMPORT_C TInt YValToTitleRow(TInt aYVal) const; - IMPORT_C TInt XValToColumn(TInt aXVal) const; - IMPORT_C TInt XValToColumn(TInt aStartCol,TInt aDisp) const; - IMPORT_C TInt XValToTitleColumn(TInt aXVal) const; - IMPORT_C TCellRef PointToCell(const TPoint &aPoint) const; - IMPORT_C TCellRef PointToCell(const TCellRef &aStartCell,const TPoint &aPointDisp) const; - IMPORT_C TPoint CellToPoint(const TCellRef &aCell) const; - IMPORT_C TPoint CellToPoint(const TCellRef &aStartCell,const TCellRef &aEndCell) const; - IMPORT_C TPoint TitleCellToPoint(const TCellRef& aTitleCell) const; - IMPORT_C TRect CellToRect(const TCellRef& aCell) const; - IMPORT_C TInt YValToNearestRow(TInt aStartRow,TInt aDisp) const; - IMPORT_C TInt XValToNearestColumn(TInt aStartCol,TInt aDisp) const; - IMPORT_C TSize TopLeftTitleRangeSize() const; - - IMPORT_C void PaginateL(); - IMPORT_C void ClearPagination(); - IMPORT_C void NotifyPaginationOutOfDateL(); - inline TBool IsPaginated() const; - IMPORT_C TRangeRef PageToRange(TInt aPageNo,TPageOrder aPageOrder) const; - inline void SetPrintRange(const TRangeRef& aPrintRange); - IMPORT_C TInt NoOfPages() const; - IMPORT_C void SetPageSizeInTwipsL(const TSize& aPageSize); - inline TSize PageSizeInTwips() const; - inline TBool IsAutoPagination() const; - IMPORT_C void SetAutoPagination(TBool aState); - IMPORT_C TBool IsHardRowPageBreak(TInt aRow) const; - IMPORT_C TBool IsHardColumnPageBreak(TInt aCol) const; - IMPORT_C void SetHardRowPageBreakL(TInt aRow); - IMPORT_C void ClearHardRowPageBreakL(TInt aRow); - IMPORT_C void SetHardColumnPageBreakL(TInt aCol); - IMPORT_C void ClearHardColumnPageBreakL(TInt aCol); - IMPORT_C void ClearAllHardPageBreaksL(); - - IMPORT_C void ExternalizeL(RWriteStream &aStream) const; - IMPORT_C void InternalizeL(RReadStream &aStream); - IMPORT_C TStreamId StoreL(CStreamStore& aStore) const; - IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aStreamId); -////////////////////////-> -// Setting the grid colors - IMPORT_C void SetGridColors(TGridColors aColors); -// Getting the grid colors - IMPORT_C const TGridColors& GridColors() const; -////////////////////////-> -private: - void SetIndefiniteRowBoundaries(TBool aState); - inline TBool IsVisibleToRowFullyVisible() const; - void SetVisibleToRowFullyVisible(TBool aState); - inline TBool IsVisibleToColumnFullyVisible() const; - void SetVisibleToColumnFullyVisible(TBool aState); - TInt ColumnWidthInPixels(TInt aCol) const; - void SetColumnWidthInPixelsL(TInt aCol,TInt aWidthInPixels); - void PreCheckColumnWidthChange(TInt aCol,TBool aNonZeroWidth); - void PostCheckColumnWidthChange(TInt aCol,TBool aNonZeroWidth); - TInt DefaultColumnWidthInPixels() const; - void SetDefaultColumnWidthInPixels(TInt aWidthInPixels); - TInt RowHeightInPixels(TInt aRow) const; - void SetRowHeightInPixelsL(TInt aRow,TInt aHeightInPixels); - void PreCheckRowHeightChange(TInt aRow,TBool aNonZeroHeight); - void PostCheckRowHeightChange(TInt aRow,TBool aNonZeroHeight); - TInt DefaultRowHeightInPixels() const; - void SetDefaultRowHeightInPixels(TInt aHeightInPixels); - TPoint CalcOffsetBetweenCells(const TCellRef& aCell1,const TCellRef& aCell2) const; - TBool LimitRow(TInt& aRow) const; - TBool LimitColumn(TInt &aColumn) const; - void LimitRow(TInt& aRow,TInt aLowerLimit,TInt aUpperLimit) const; - void LimitColumn(TInt& aCol,TInt aLowerLimit,TInt aUpperLimit) const; - TBool LimitCell(TCellRef& aCell) const; - void LimitRowToVisible(TInt& aRow) const; - void LimitColumnToVisible(TInt& aCol) const; - void LimitCellToVisible(TCellRef& aCell) const; - TBool IsCellOutOfVisibleRange(const TCellRef &aCell) const; - TBool IsCellOutOfGridRange(const TCellRef& aCell) const; - void StepRowForward(TInt& aRow) const; - void StepRowBackward(TInt& aRow) const; - void StepColumnForward(TInt& aCol) const; - void StepColumnBackward(TInt& aCol) const; - void CalcVisibleFromRow(TInt aVisibleToRow,TInt& aNewVisibleFromRow) const; - TBool CalcVisibleToRow(TInt aVisibleFromRow,TInt& aNewVisibleToRow) const; - void CalcVisibleFromColumn(TInt aVisibleToCol,TInt& aNewVisibleFromCol) const; - TBool CalcVisibleToColumn(TInt aVisibleFromCol,TInt& aNewVisibleToCol) const; - TInt CalcVisibleFromRowAfterPageScroll(TMoveDirectionAndAmount aPageScroll) const; - TInt CalcVisibleFromColumnAfterPageScroll(TMoveDirectionAndAmount aPageScroll) const; - TCellRef CalcVisibleFromCellAfterPageScroll(TMoveDirectionAndAmount aPageScroll) const; - TBool FindNextRowPageBreak(TInt aSearchStart,TInt& aFoundRow) const; - TBool FindNextColumnPageBreak(TInt aSearchStart,TInt& aFoundCol) const; - void DoMainPaginationLoopL(TInt aPageSpan,CSparseMap* aCellSpanMap,CSparseMap* aPageMap, - CArrayFix* aHardPageBreaks,TInt aStartId); - TBool RequestRow(TInt aRow,TInt& aReturnRow) const; - - void ConstructL(const MGridTable *aGridTable,CGridImg *aGridImg,const TRangeRef& aGridRange); -//private: -private: - enum - { - EMaxArrayChanges=256, - EInitialDefaultRowHeightInTwips = 300, - EInitialDefaultColumnWidthInTwips = 900 - }; - enum - { - EIsTopLabels = 0x1, - EIsSideLabels = 0x2, - EIsHorizontalGridLines = 0x4, - EIsVerticalGridLines = 0x8, - EIsColumnBursting = 0x10, - EIsCursorVisible = 0x20, - EIsRowPermanentlySelected = 0x40, - EIsHorizontalTitleLine = 0x80, - EIsVerticalTitleLine = 0x100, - EIsIndefiniteRowBoundaries = 0x200, - EIsUniformRowHeight = 0x400, - EIsUniformColumnWidth = 0x800, - EIsTopLabelDragDisabled = 0x1000, - EIsSideLabelDragDisabled = 0x2000, - EIsPaginated = 0x4000, - EIsAutoPagination = 0x8000, - EIsPrintedLabels = 0x10000, - EIsPrintedGridLines = 0x20000, - EIsVisibleToRowFullyVisible = 0x40000, - EIsVisibleToColumnFullyVisible = 0x80000, - EIsEncroachingCellBorders = 0x100000, - EIsColumnSelectionDisabled = 0x200000, - EIsRowSelectionDisabled = 0x400000, - EIsAutoClearGridCells = 0x800000, - EIsGridLabelSeparators = 0x1000000, - EIsHighlightVisible = 0x2000000, - EIsPageBreakLinesHidden = 0x4000000 - }; -private: - const MGridTable* iGridTable; - const MGraphicsDeviceMap* iGraphicsDeviceMap; //* - CGridImg* iGridImg; //* -// persistent - TRangeRef iGridRange; //* - TRangeRef iVisibleRange; - TRangeRef iTitleRange; - CSparseMap* iColumnWidthMap; //* - CSparseMap* iRowHeightMap; //* - CSparseMap* iColumnPageMap; //* - CSparseMap* iRowPageMap; //* - CArrayFix* iHardRowPageBreaks; - CArrayFix* iHardColumnPageBreaks; - TRgb iGridEdgeColor; - TInt iMinRowHeightInPixels; - TInt iMinColumnWidthInPixels; - TSize iPageSizeInTwips; //* - TUint32 iFlags; //* Starred items are used in printing -////////////////////////-> - TGridColors iColors; -////////////////////////-> -// End of persistent data - TBool iHasChanged; - }; - - - - -class CGridLabelImg : public CBase -/** Draws a grid cell's label. - -@publishedAll -@released */ - { - friend class CGridImg; -public: - IMPORT_C virtual ~CGridLabelImg(); - IMPORT_C void ConstructL(); - inline void SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap); - inline TFontSpec FontSpec() const; - IMPORT_C void ReleaseFont(); - IMPORT_C void NotifyGraphicsDeviceMapChangeL(); - inline void SetGridColors(const TGridColors& aGridColors); -protected: - IMPORT_C CGridLabelImg(const TFontSpec& aFontSpec,MGraphicsDeviceMap* aGraphicsDeviceMap); -////////////////////////-> - IMPORT_C void DrawTopLeftLabelL(CGraphicsContext* aGc,const TRect& aRect, TRgb aColor) const; -////////////////////////-> -private: - /** Draws a row label. - - @publishedAll - @released - @param aGc The graphics context to be used. - @param aRow The row for which the label is to be drawn. - @param aRect The rectangle in which the label is to be drawn. */ - virtual void DrawRowLabelL(CGraphicsContext* aGc,TInt aRow,const TRect& aRect) const=0; - /** Draws a column label. - - @publishedAll - @released - @param aGc The graphics context to be used. - @param aCol The column for which the label is to be drawn. - @param aRect The rectangle in which the label is to be drawn. */ - virtual void DrawColLabelL(CGraphicsContext* aGc,TInt aCol,const TRect& aRect) const=0; - IMPORT_C virtual void DrawTopLeftLabelL(CGraphicsContext* aGc,const TRect& aRect) const; - IMPORT_C virtual TInt SideLabelWidthInPixels(TInt aStartRow,TInt aEndRow) const; - IMPORT_C virtual TInt TopLabelHeightInPixels() const; - IMPORT_C virtual void DrawRowCursorL(CGraphicsContext* aGc,const TRect& aRect) const; -protected: - enum - { - /** The default width of side labels, in twips. - - This is used by the default implementation of SideLabelWidthInPixels(). */ - EDefaultSideLabelWidthInTwips=300, - /** The default height of top labels, in twips. - - This is used by the default implementation of TopLabelHeightInPixels(). */ - EDefaultTopLabelHeightInTwips=300 - }; -protected: - /** The nearest font to that specified in the font specification. */ - CFont* iFont; - /** The font specification in device independent terms. */ - TFontSpec iFontSpec; - /** The graphics device map, an interface for mapping between twips and device-specific - units. */ - MGraphicsDeviceMap* iGraphicsDeviceMap; - /** The grid colour specification. */ - TGridColors iGridColors; -private: - TInt iSpare; - }; - - -class CGridCellImg : public CBase -/** Draws a grid cell's contents. - -@publishedAll -@released */ - { - friend class CGridImg; -public: - IMPORT_C virtual ~CGridCellImg(); - inline TInt BurstColOffset() const; - inline TInt BurstLeft() const; - inline TInt BurstRight() const; - inline TBool IsHorizontalGridLines() const; - inline TBool IsVerticalGridLines() const; - inline void SetGridColors(const TGridColors& aGridColors); -protected: - IMPORT_C CGridCellImg(); -private: - /** Draws the contents of the specified cell. - - @publishedAll - @released - @param aGc The graphics context to be used. - @param aCell The cell whose contents are to be drawn. - @param aDrawRect The rectangle in which the cell is to be drawn. - @param aClipRect The rectangle to which drawing is clipped. */ - virtual void DrawL(CGraphicsContext* aGc,const TCellRef& aCell,const TRect& aDrawRect, - const TRect& aClipRect) const=0; - IMPORT_C virtual TInt DataWidthInPixelsL(const TCellRef& aCell) const; - IMPORT_C virtual TBool DoesCellContainDataL(const TCellRef& aCell) const; -// reserved virtual function - IMPORT_C virtual void Reserved_1(); -private: - void SetBurstingData(TInt aBurstColOffset=0,TInt aBurstLeft=0,TInt aBurstRight=0); -private: - enum { EIsHorizontalGridLines = 0x1, EIsVerticalGridLines = 0x2 }; -protected: - /** The grid colour specification. */ - TGridColors iGridColors; -private: - TInt iBurstColOffset; - TInt iBurstLeft; - TInt iBurstRight; - TUint32 iGridLineFlags; - }; - - -class MGridCursorMoveCallBack -/** An interface to a callback function that is intended to be called whenever -there is a change to the cursor position. - -If such a callback is needed, a concrete implementation is defined, instantiated -and passed to CGridImg::SetCursorMoveCallBack(). - -@publishedAll -@released */ - { -public: - /** Deals with the change to the cursor position. - - This function is called immediately before exiting the following functions: - CGridImg::SetCursorPosL(), CGridImg::SetAnchorPosL(), CGridImg::MoveCursorL(),CGridImg::ResetSelectedL(), - CGridImg::AddRangeToSelectedL(), CGridImg::AddRegionToSelectedL(), CGridImg::AddRowToSelectedL(), - CGridImg::AddColToSelectedL(). - - The function is commonly used to do any necessary redrawing. */ - virtual void HandleCursorMoveL()=0; - }; - -class RWindow; -class CWindowGc; - - -class CGridImg : public CBase -/** Draws the contents of the grid. - -@publishedAll -@released -*/ - { - friend class CGridLay; -public: - enum - { - /** Indicates that the selection state is to be maintained. - - If a region of cells is selected, then this selection is to be kept. - - Typically, this is set by a control when a drag operation is in - progress and the shift modifier key is also pressed. */ - EIsWithSelect=0x0001, - /** Indicates that the control modifier key has been pressed. */ - EIsWithControl=0x0002, - /** Indicates that a drag operation is in progress. */ - EIsWithDrag=0x0004, - /** Indicates that the cursor is the edge of the grid. */ - EIsAtBoundary=0x0008, - /** Indicates that a new cell is being selected, without dragging. */ - EIsAbsoluteMove=0x0010, - /** Indicates that a whole row is selected. */ - EIsRowSelected=0x0020, - /** Indicates that a whole column is selected. - - This also means that the label cell for the column is included in the selection. */ - EIsColumnSelected=0x0040 - }; - enum - { - /** Defines a scale value of 100. - - Scale factor values are divided into this value to calculate - drawing points, rectangles etc. */ - EScaleOneToOne=100 - }; - - enum TSelectType - { - /** Indicates that an existing selected region is to be reset (i.e. emptied) before - adding a new region. */ - ESelectOverwrite, - /** Indicates that a new region is to be appended to any existing selected region. */ - ESelectAppend - }; -public: - IMPORT_C virtual ~CGridImg(); - IMPORT_C static CGridImg* NewL(CGraphicsDevice* aGraphicsDevice,CGridCellImg* aGridCellImg,CGridLay* aGridLay); - IMPORT_C static CGridImg* NewL(CGridCellImg* aGridCellImg,CGridLay* aGridLay); //Creates Partial GridImg - inline void SetGridLay(CGridLay* aGridLay); - inline void SetWindow(RWindow* aWin); -////////////////////////-> - IMPORT_C void SetGridLabelImg(CGridLabelImg* aGridLabelImg); -////////////////////////-> - inline void SetCursorMoveCallBack(MGridCursorMoveCallBack* aCursorMoveCallBack); - inline const CGridCellRegion* Selected() const; - inline const CGridLabelImg* GridLabelImg() const; - - IMPORT_C void ScrollL(const TPoint &aOffset); - IMPORT_C void MoveCursorL(TMoveDirectionAndAmount aCursorMove,TUint aSelectState); - IMPORT_C void SetCursorWithPointerL(const TPoint& aPoint,TUint aFlagList); - IMPORT_C void ResetSelectedL(); - IMPORT_C void AddRangeToSelectedL(const TRangeRef& aRange,TSelectType aType=ESelectOverwrite); - IMPORT_C void AddRegionToSelectedL(const CArrayFix* aCellRegion,TSelectType aType=ESelectOverwrite); - IMPORT_C void AddRowToSelectedL(TInt aRow,TSelectType aType=ESelectOverwrite); - IMPORT_C void AddColToSelectedL(TInt aCol,TSelectType aType=ESelectOverwrite); - IMPORT_C void DrawL(CGraphicsContext* aGc) const; - IMPORT_C void DrawL(CGraphicsContext* aGc,const TRect& aRect) const; - IMPORT_C void DrawCellL(const TCellRef& aCell) const; - IMPORT_C void DrawRangeL(const TRangeRef& aRange) const; - IMPORT_C void DrawSelectedL() const; - IMPORT_C void DrawTitleLines() const; - IMPORT_C void ClearTitleLineRegionL(const TPoint& aCrossPoint) const; - IMPORT_C void PrintGridLinesAndCellsInRangeL(CGraphicsContext* aPrinterGc,const TRangeRef& aRange, - TInt aScaleFactor) const; - - inline TCellRef CursorPos() const; - IMPORT_C void SetCursorPosL(const TCellRef& aCursorPos); - inline TCellRef NewCursorPos() const; - inline TCellRef AnchorPos() const; - IMPORT_C void SetAnchorPosL(const TCellRef& aAnchorPos); - inline TRect GridRect() const; - IMPORT_C void SetGridRect(const TRect& aNewRect); - IMPORT_C void SetPrintGridRect(const TRect& aPrintRect); - inline TPoint TitlePoint() const; - inline TPoint MainPoint() const; - inline TRect MainRect() const; - IMPORT_C void ResetReferencePoints(); - IMPORT_C void NotifyGridRangeResize(); - - IMPORT_C void CheckSideLabelWidthAndScrollL(); - IMPORT_C TInt CheckSideLabelWidth(); - IMPORT_C TInt SideLabelWidthInPixels() const; - IMPORT_C TInt MaxSideLabelWidthInPixels() const; - IMPORT_C TInt TopLabelHeightInPixels() const; - IMPORT_C void FinishLabelDragL(); - IMPORT_C TBool StartLabelDrag(const TPoint &aPoint); - IMPORT_C TBool UpdateLabelDrag(const TPoint &aPoint); - IMPORT_C TBool StartLabelResize(TBool aIsColumnLabel, TInt aIndex); - IMPORT_C TBool UpdateLabelResize(TInt aDelta); - IMPORT_C void FinishLabelResizeL(TBool aResize); -private: - enum TDragDim {EXDrag,EYDrag,ENoDrag}; - enum TRefPoint {ETitleRef,EMainRef}; - enum TDragDraw {EDragDrawWithBitmap,EDragDrawWithoutBitmap}; - enum TArrows {EBothArrows,ESecondArrowOnly}; - enum - { - EIsLabelDraggingIgnored = 0x1, - EIsSidewaysScrollIgnored = 0x2 - }; -private: - void DrawResizingDragHiglights(const TRect& aRect); - void DrawAllGridLabelsL() const; - void DrawTopLeftGridLabelL() const; - void DrawTopGridLabelsL(TInt aStartCol,TInt aEndCol,TRefPoint aXRef=EMainRef) const; - void DrawSideGridLabelsL(TInt aStartRow,TInt aEndRow,TRefPoint aYRef=EMainRef) const; - void DrawSideGridLabelIfOnScreenL(TInt aRow) const; - void DrawAllGridLinesAndCellsL() const; - void DrawGridLinesAndCellsInRangeL(const TRangeRef& aRange,const TRect& aClipRect, - TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; - void DrawCellsToGcL(CGraphicsContext* aGc,const TRangeRef& aRange,const TRect& aClipRect, - const TPoint& aStartPoint,TInt aScaleFactor=EScaleOneToOne) const; - void DrawBurstingCellL(CGraphicsContext* aGc,const TCellRef& aCell,const TRect& aRect,const TRect& aClipRect, - TInt aScaleFactor,TInt aBurstLeft,const TCellRef& aBurstCell) const; - TInt CalcBurstLeftL(TCellRef& aBurstCell,TInt aScaleFactor) const; - TInt CalcBurstRightL(const TCellRef& aCell,TInt aExcessRight,TInt aScaleFactor) const; - void DrawVerticalTitleLine() const; - void DrawHorizontalTitleLine() const; - void BeginRedrawAndDrawL() const; - void BeginRedrawAndDrawL(const TRect& aRect) const; - - void AppendTotalHighlightRegionL(TRegion& aRegion) const; - void AppendPartialHighlightRegionL(TRegion& aRegion,const TRect& aClipRect, - TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; - void RemoveRowLabelFromRegionL(TInt aRow,TRegion& aRegion) const; - void HighlightMinRegionL(const TRegion &aOldRegion,const TRegion &aNewRegion); - void HighlightRegion(const TRegion &aRegion) const; - void HighlightNewRegionFromOldL(const TRegion& aOldRegion); - void DrawCursorOrRegionL(TUint aMoveFlags); - void UpdateSelectedRegion(TInt aSelectCount,TUint aMoveFlags); - void AddLabelToRegionL(TUint aMoveFlags); - void StartSelectedRegionL(TUint aMoveFlags); - TBool ScanColumnsForDrag(TInt aFromColumn,TInt aToColumn,TInt aPointerPos,TInt& aPrevious,TInt& aCurrent); - TBool ScanRowsForDrag(TInt aFromRow,TInt aToRow,TInt aPointerPos,TInt& aPrevious,TInt& aCurrent); - void DrawDraggingHighlight(const TRect aLine,TDragDraw aDragDraw); - void DrawArrowsToInMemoryBitmap(TArrows aArrows); - TPoint RelativeCellToPoint(const TCellRef& aCell,TRefPoint aXRef=EMainRef, - TRefPoint aYRef=EMainRef) const; - TCellRef RelativePointToCell(const TPoint& aPoint,TRefPoint aXRef=EMainRef, - TRefPoint aYRef=EMainRef) const; - TRect PartialCellRectL(const TCellRef& aCell,const TRect& aClipRect, - TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; - TRect PartialRangeRect(const TRangeRef& aRange,const TRect& aClipRect, - TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; - void CreateGc(CGraphicsContext* aGc); - void DeleteGc(); - static void CleanupGc(TAny* aObject); - void ResetGcToDefault(CGraphicsContext* aGc) const; - void ScaleDown(TPoint& aPoint,TInt aScaleFactor) const; - void ConstructSelectedL(const TRangeRef& aGridRange); - - CGridImg(CGraphicsDevice* aGraphicsDevice,CGridCellImg* aGridCellImg,CGridLay* aGridLay); - CGridImg(CGridCellImg* aGridCellImg,CGridLay* aGridLay); - void ConstructL(); - -////////////////////////-> - void SetGridColors(const TGridColors& aGridColors); -////////////////////////-> -private: - TRect iGridRect; - TPoint iTitlePoint; - TPoint iMainPoint; - TCellRef iCursorPos; // Persisted - TCellRef iNewCursorPos; - TCellRef iAnchorPos; - - CGraphicsDevice* iGraphicsDevice; - CGraphicsContext* iGcPtr; - CWindowGc* iGc; - RWindow* iWin; - CGridCellImg* iGridCellImg; //* - CGridLabelImg* iGridLabelImg; //* - CGridLay* iGridLay; //* Starred items are used in printing - CGridCellRegion* iSelected; - MGridCursorMoveCallBack* iCursorMoveCallBack; - TBool iDrawResizeLines; - TInt iDragLabel; - TInt iCurrentDragPos; - TInt iDragDiff; - TInt iDragFlags; - TDragDim iDragDim; - CFbsBitmap* iDragBmp; - TRefPoint iXRefPoint; - TRefPoint iYRefPoint; - }; - - -class TGridUtils -/** A collection of Grid utilities. - -@publishedAll -@released */ - { -public: - IMPORT_C static void FillRect(CGraphicsContext* aGc,TRgb aColor,const TRect &aRect); - }; - - -#include -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/grdstd.inl --- a/epoc32/include/grdstd.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,421 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CGridLay -// -// - -inline void CGridLay::SetGridTable(const MGridTable* aGridTable) -/** Sets the specified grid table object. - -@param aGridTable The grid table object. */ - { iGridTable = aGridTable; } - -inline TRangeRef CGridLay::VisibleRange() const -/** Gets the range of cells that are currently visible. - -@return The visible cell range. Note that the TRangeRef::iFrom member is the -cell that is visible at the top of the window, and the TRangeRef::iTo member -is the cell that is partially visible at the bottom right of the window. */ - { return iVisibleRange; } - -inline TRangeRef CGridLay::TitleRange() const -/** Gets the range of cells that form the grid titles. - -@return The range of cells that form the grid titles. */ - { return iTitleRange; } - -inline TRangeRef CGridLay::GridRange() const -/** Gets the range of cells that defines the grid boundary. - -@return The range of cells that defines the grid boundary. */ - { return iGridRange; } - -inline TBool CGridLay::IsSideLabels() const -/** Tests whether side grid labels are printed. - -@return True, if the side labels are printed; false, otherwise. */ - { return (iFlags&EIsSideLabels); } - -inline TBool CGridLay::IsTopLabels() const -/** Tests whether top labels are printed. - -@return True, if the top labels are printed; false, otherwise. */ - { return (iFlags&EIsTopLabels); } - -inline TBool CGridLay::IsVerticalGridLines() const -/** Tests whether vertical grid lines are to be drawn. - -@return True, if vertical grid lines are to be drawn; false, otherwise. */ - { return (iFlags&EIsVerticalGridLines); } - -inline TBool CGridLay::IsHorizontalGridLines() const -/** Tests whether horizontal grid lines are to be drawn. - -@return True, if horizontal grid lines are to be drawn; false, otherwise. */ - { return (iFlags&EIsHorizontalGridLines); } - -inline TBool CGridLay::IsGridLabelSeparators() const -/** Tests whether label separators are to be drawn. - -@return True, if label separators are to be drawn; false, otherwise. */ - { return (iFlags&EIsGridLabelSeparators); } - -inline TBool CGridLay::IsColumnBursting() const -/** Tests whether column bursting is permitted. - -Column bursting occurs when the contents of a cell are too wide; adjacent -cells are then overwritten, provided they are empty. - -@return True, if column bursting is permitted; false, otherwise. */ - { return (iFlags&EIsColumnBursting); } - -inline TBool CGridLay::IsCursorVisible() const -/** Tests whether the cursor is visible. - -@return True, if the cursor is visible; false, otherwise. */ - { return (iFlags&EIsCursorVisible); } - -inline TBool CGridLay::IsHighlightVisible() const -/** Tests whether selected cells are highlighted. - -@return True, if selected cells are highlighted; false, otherwise. */ - { return (iFlags&EIsHighlightVisible); } - -inline TBool CGridLay::IsRowPermanentlySelected() const -/** Tests whether rows are permanently selected. - -@return True, if rows are permanently selected; false, otherwise. */ - { return (iFlags&EIsRowPermanentlySelected); } - -inline TBool CGridLay::IsTitleLines() const -/** Tests whether the grid has both horizontal and vertical title lines. - -@return True, if the grid has both a horizontal and vertical title line; false, -otherwise. */ - { return (iFlags&(EIsHorizontalTitleLine|EIsVerticalTitleLine)); } - -inline TBool CGridLay::IsHorizontalTitleLine() const -/** Tests whether the grid has a horizontal title line. - -@return True, if the grid is to have a horizontal title line; false otherwise. */ - { return (iFlags&EIsHorizontalTitleLine); } - -inline TBool CGridLay::IsVerticalTitleLine() const -/** Tests whether the grid has a vertical title line. - -@return True, if the grid is to have a vertical title line; false otherwise. */ - { return (iFlags&EIsVerticalTitleLine); } - -inline TBool CGridLay::IsIndefiniteRowBoundaries() const -/** Tests whether the grid has indefinite row boundaries. - -@return True, if the grid has indefinite row boundaries; false, otherwise. */ - { return (iFlags&EIsIndefiniteRowBoundaries); } - -inline TBool CGridLay::IsUniformRowHeight() const -/** Tests whether all the rows have the same height. - -@return True, if all rows have the same height; false, otherwise. */ - { return (iFlags&EIsUniformRowHeight); } - -inline TBool CGridLay::IsUniformColumnWidth() const -/** Tests whether all columns have the same width. - -@return True, if all columns have the same width; false, otherwise. */ - { return (iFlags&EIsUniformColumnWidth); } - -inline TBool CGridLay::IsTopLabelDragDisabled() const -/** Tests whether a drag operation on the boundary between two columns is permitted. - -@return True, if a drag operation on a column boundary is permitted; false otherwise. */ - { return (iFlags&EIsTopLabelDragDisabled); } - -inline TBool CGridLay::IsSideLabelDragDisabled() const -/** Tests whether a drag operation on the boundary between two rows is permitted. - -@return True, if a drag operation on a row boundary is permitted; false otherwise. */ - { return (iFlags&EIsSideLabelDragDisabled); } - -inline TBool CGridLay::IsPrintedLabels() const -/** Tests whether labels are printed. - -@return True, if labels are printed; false, otherwise. */ - { return (iFlags&EIsPrintedLabels); } - -inline TBool CGridLay::IsPrintedGridLines() const -/** Tests whether grid lines are printed. - -@return True, if grid lines are printed; false, otherwise. */ - { return (iFlags&EIsPrintedGridLines); } - -inline TBool CGridLay::IsVisibleToRowFullyVisible() const - { return (iFlags&EIsVisibleToRowFullyVisible); } - -inline TBool CGridLay::IsVisibleToColumnFullyVisible() const - { return (iFlags&EIsVisibleToColumnFullyVisible); } - -inline TBool CGridLay::IsEncroachingCellBorders() const -/** Tests whether encroaching cell borders are permitted. - -Encroaching cell borders are where cell borders wider than one pixel are drawn -inside the cell, as opposed to outside. - -@return True, if encroaching cells borders are permitted; false, otherwise. */ - { return (iFlags&EIsEncroachingCellBorders); } - -inline TBool CGridLay::IsRowSelectionDisabled() const -/** Tests whether row selection is disabled. - -@return True, if row selection is disabled; false, otherwise. */ - { return (iFlags&EIsRowSelectionDisabled); } - -inline TBool CGridLay::IsColumnSelectionDisabled() const -/** Tests whether column selection is disabled. - -@return True, if column selection is disabled; false, otherwise. */ - { return (iFlags&EIsColumnSelectionDisabled); } - -inline TBool CGridLay::IsAutoClearGridCells() const -/** Tests whether automatic clearing of grid cells is done. - -Automatic clearing of grid cells is where all cells are cleared on redraw, -in case drawing the contents doesn't guarantee to write to every pixel (the -usual way of doing flicker-free redraws). - -@return True, if automatic clearing of grid cells is done; false, otherwise. */ - { return (iFlags&EIsAutoClearGridCells); } - -inline TBool CGridLay::IsPageBreakLinesHidden() const -/** Tests whether lines marking page breaks are hidden. - -@return True, if lines marking page breaks are hidden; false, otherwise. */ - { return (iFlags&EIsPageBreakLinesHidden); } - -inline TBool CGridLay::HasChanged() const -/** Tests whether any change has occurred to the grid layout. - -Such changes include alterations to the height of a row or the -width of a column, additions or deletions of rows or columns, -and changes to the visibility of grid lines. -Note that this list is not exhaustive. - -@return True, if the grid layout has changed; false, otherwise. */ - { return iHasChanged; } - -inline void CGridLay::SetHasChanged(TBool aHasChanged) -/** Sets whether any change has occurred to the grid layout. - -@param aHasChanged ETrue, if any change has occurred to the grid layout; EFalse, -otherwise. */ - { iHasChanged=aHasChanged; } - -inline void CGridLay::SetGridEdgeColor(TRgb aColor) -/** Defines the colour that the edges of the grid beyond the grid range are to -have. - -If not changed by this function, the default colour is white. - -@param aColor The colour value. */ - { iGridEdgeColor=aColor; } - -inline TBool CGridLay::IsPaginated() const -/** Tests whether the grid has been paginated. - -@return True, if the grid has been paginated; false, otherwise. */ - { return (iFlags&EIsPaginated); } - -inline void CGridLay::SetPrintRange(const TRangeRef& aPrintRange) -/** Sets the range of cells that are visible for printing. - -@param aPrintRange The cell range. */ - { iVisibleRange=aPrintRange; } - -inline TSize CGridLay::PageSizeInTwips() const -/** Gets the size of a page. - -@return The size of a page, in twips. */ - { return iPageSizeInTwips; } - -inline TBool CGridLay::IsAutoPagination() const -/** Tests whether automatic pagination is in effect. - -@return True, if automatic pagination is in effect, false, otherwise. */ - { return (iFlags&EIsAutoPagination); } - -// CGridLabelImg - -inline void CGridLabelImg::SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap) -/** Supplies a new interface object for mapping between twips and device-specific -units. - -Note that the caller must call ReleaseFont() before calling this function, -and must call NotifyGraphicsDeviceMapChangeL() afterwards. - -@param aGraphicsDeviceMap A new interface object for mapping between twips -and device-specific units. */ - { - iGraphicsDeviceMap=aGraphicsDeviceMap; - } - -inline TFontSpec CGridLabelImg::FontSpec() const -/** Gets the font specification. - -@return The font specification. */ - { - return iFontSpec; - } - -inline void CGridLabelImg::SetGridColors(const TGridColors& aGridColors) -/** Sets the colours to be used when drawing the label. - -@param aGridColors The object containing the grid colours specification. */ - { - iGridColors = aGridColors; - } - -// CGridCellImg - -inline TInt CGridCellImg::BurstColOffset() const -/** Gets the bursting column offset. - -@return The burst column offset */ - { return iBurstColOffset; } - -inline TInt CGridCellImg::BurstLeft() const -/** Gets the left hand bursting value. - -@return The burst value. */ - { return iBurstLeft; } - -inline TInt CGridCellImg::BurstRight() const -/** Gets the right hand bursting value. - -@return The burst value */ - { return iBurstRight; } - -inline TBool CGridCellImg::IsHorizontalGridLines() const -/** Tests whether horizontal grid lines are drawn. - -This function is set by the CGridImg object and allows classes derived from -CGridCellImg to modify or restrict the area into which they draw. - -@return True, if horizontal grid lines are drawn; false, otherwise. */ - { return iGridLineFlags&EIsHorizontalGridLines; } - -inline TBool CGridCellImg::IsVerticalGridLines() const -/** Tests whether vertical grid lines are drawn. - -This function is set by the CGridImg object and allows classes derived from -CGridCellImg to modify or restrict the area into which they draw. - -@return True, if vertical grid lines are drawn; false, otherwise. */ - { return iGridLineFlags&EIsVerticalGridLines; } - -inline void CGridCellImg::SetGridColors(const TGridColors& aGridColors) -/** Sets the colours to be used when drawing. - -@param aGridColors The object containing the grid colours specification. */ - { - iGridColors = aGridColors; - } - -// CGridImg - -inline void CGridImg::SetGridLay(CGridLay* aGridLay) -/** Sets the specified grid layout object. - -@param aGridLay A pointer to the object that controls the layout of rows and -columns. */ - { iGridLay = aGridLay; } - -inline void CGridImg::SetWindow(RWindow *aWin) -/** Sets the specified window. - -@param aWin A pointer to the currently active window. */ - { iWin = aWin; } - -////////////////////////-> -//inline void CGridImg::SetGridLabelImg(CGridLabelImg *aGridLabelImg) -// { iGridLabelImg = aGridLabelImg; } -////////////////////////-> - -inline void CGridImg::SetCursorMoveCallBack(MGridCursorMoveCallBack *aCursorMoveCallBack) -/** Sets the cursor moved call-back object. - -The call-back object encapsulates the implementation of a call-back function -that is called whenever there is a change to the cursor position. - -@param aCursorMoveCallBack A pointer to the callback object. */ - { iCursorMoveCallBack = aCursorMoveCallBack; } - -inline const CGridCellRegion* CGridImg::Selected() const -/** Gets the currently selected region. - -@return A pointer to the selected region object. */ - { return iSelected; } - -inline const CGridLabelImg* CGridImg::GridLabelImg() const -/** Gets the the object that is used to draw a cell label. - -@return A pointer to the object that is used to draw a cell label. */ - { return iGridLabelImg; } - -inline TCellRef CGridImg::CursorPos() const -/** Gets the current position of the cursor. - -@return The cell reference of the current cursor position. */ - { return iCursorPos; } - -inline TCellRef CGridImg::AnchorPos() const -/** Gets the cursor's anchor position. - -This is the cell reference of the position that the cursor must return to -after a series of selected movements have been made. - -@return The cell reference of the cursor's anchor position. */ - { return iAnchorPos; } - -inline TCellRef CGridImg::NewCursorPos() const -/** Gets the new position of the cursor. - -@return The cell reference of the new cursor position. -@see SetCursorPosL() */ - { return iNewCursorPos; } - -inline TRect CGridImg::GridRect() const -/** Gets the rectangle containing the grid. - -@return The rectangle containing the grid. */ - { return iGridRect; } - -inline TPoint CGridImg::TitlePoint() const -/** Gets the position of the title. - -This is the point at the top left of the grid excluding the labels. - -@return The position of the title. */ - { return iTitlePoint; } - -inline TPoint CGridImg::MainPoint() const -// Returns the most commonly used point in the grid (usually same as TitlePoint()). -/** Gets the position at which the visible range starts. - -@return The position at which the visible range starts. */ - { return iMainPoint; } - -inline TRect CGridImg::MainRect() const -/** Gets the rectangle that corresponds to the visible range. - -@return The rectangle that corresponds to the visible range. */ - { return TRect(iMainPoint,iGridRect.iBr); } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gulalign.h --- a/epoc32/include/gulalign.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,153 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __GULALIGN_H__ -#define __GULALIGN_H__ - -#include -#include -#include -#include // enum TBidiText::TDirectionality -#include // enum CParaFormat::TAlignment - -/** Horizontal layout settings for graphic objects. - -@publishedAll -@released */ -enum TGulHAlignment - { - /** Object is left-aligned. */ - EHLeft=CGraphicsContext::ELeft, - /** Object is centred horizontally. */ - EHCenter=CGraphicsContext::ECenter, - /** Object is right-aligned. */ - EHRight=CGraphicsContext::ERight - }; - -/** Vertical layout settings for graphic objects. - -@publishedAll -@released */ -enum TGulVAlignment - { - /** Object is aligned with the top. */ - EVTop=0x00, - /** Object is centred vertically. */ - EVCenter=0x10, - /** Object is aligned with the bottom. */ - EVBottom=0x20 - }; - -/** Alignment settings for the layout of graphic objects. - -@publishedAll -@released */ -enum TGulAlignmentValue - { - /** Object is left and top aligned. */ - EHLeftVTop=EHLeft|EVTop, - /** Object is left aligned and centred vertically. */ - EHLeftVCenter=EHLeft|EVCenter, - /** Object is left aligned and at the bottom. */ - EHLeftVBottom=EHLeft|EVBottom, - /** Object is centre aligned horizontally and at the top. */ - EHCenterVTop=EHCenter|EVTop, - /** Object is centred horizontally and vertically. */ - EHCenterVCenter=EHCenter|EVCenter, - /** Object is centred horizontally and at the bottom. */ - EHCenterVBottom=EHCenter|EVBottom, - /** Object is right and top aligned. */ - EHRightVTop=EHRight|EVTop, - /** Object is right aligned and centred vertically. */ - EHRightVCenter=EHRight|EVCenter, - /** Object is right aligned and at the bottom. */ - EHRightVBottom=EHRight|EVBottom - }; - - -/** Provides a convenient way to describe horizontal and vertical layouts of rectangular -objects and to enquire how they occupy an area given their alignment. - -@publishedAll -@released */ -class TGulAlignment - { -private: - enum {EHMask=0x03, EHAbsoluteFlag=0x04, EVMask=0x30}; -public: - inline TGulAlignment(); - inline TGulAlignment(TGulAlignmentValue aValue); - inline TGulAlignment(CGraphicsContext::TTextAlign aHAlign, TGulVAlignment aVAlign = EVTop); - IMPORT_C operator TGulAlignmentValue() const; - inline TGulVAlignment VAlignment() const; - inline TGulHAlignment HAlignment() const; - IMPORT_C TGulHAlignment HAlignment(TBidiText::TDirectionality aLanguageDirectionality) const; - IMPORT_C TBool HasAbsoluteHAlignment() const; - IMPORT_C void SetAbsoluteHAlignment(TBool aAbsoluteHAlignment); - - // Returns the horizontal text alignment. - inline CGraphicsContext::TTextAlign TextAlign() const; - IMPORT_C CGraphicsContext::TTextAlign TextAlign(TBidiText::TDirectionality aLanguageDirectionality) const; - IMPORT_C CParaFormat::TAlignment ParaAlign() const; - - IMPORT_C void SetVAlignment(TGulVAlignment aVAlign); - IMPORT_C void SetHAlignment(TGulHAlignment aHAlign); - IMPORT_C void SetHAlignment(CGraphicsContext::TTextAlign aHAlign); - IMPORT_C void SetHAlignment(CParaFormat::TAlignment aHAlign); - IMPORT_C TPoint InnerTopLeft(const TRect& aOuter, const TSize& aInnerSize) const; - IMPORT_C TPoint InnerTopLeft(const TRect& aOuter, const TSize& aInnerSize, TBidiText::TDirectionality aLanguageDirectionality) const; - IMPORT_C TRect InnerRect(const TRect& aOuter, const TSize& aInnerSize) const; - IMPORT_C TRect InnerRect(const TRect& aOuter, const TSize& aInnerSize, TBidiText::TDirectionality aLanguageDirectionality) const; -private: - TInt iValue; - }; - -/** Default constructor. */ -inline TGulAlignment::TGulAlignment() - {}; - -/** Constructor initialising the object with an alignment value. -@param aValue The alignment value. */ -inline TGulAlignment::TGulAlignment(TGulAlignmentValue aValue) - {iValue=aValue;} - -/** Constructor initialising the object with an alignment value. -@param aHAlign The horizontal alignment value. -@param aVAlign The vertical alignment value. */ -inline TGulAlignment::TGulAlignment(CGraphicsContext::TTextAlign aHAlign, TGulVAlignment aVAlign) - { iValue = static_cast(((TGulHAlignment)aHAlign) |aVAlign); } - -/** Gets the vertical alignment. -@return Vertical alignment. */ -inline TGulVAlignment TGulAlignment::VAlignment() const - {return((TGulVAlignment)(iValue&EVMask));} - -/** Gets the absolute horizontal alignment. - -Note that this is the alignment in absolute terms. I.e. left and right -alignment will not be swapped depending on language directionality. -@return Horizontal alignment. */ -inline TGulHAlignment TGulAlignment::HAlignment() const - {return((TGulHAlignment)(iValue&EHMask));} - -/** Gets the absolute horizontal text alignment. - -Note that this is the alignment in absolute terms. I.e. left and right -alignment will not be swapped depending on language directionality. -@return The horizontal text alignment. */ -inline CGraphicsContext::TTextAlign TGulAlignment::TextAlign() const - {return((CGraphicsContext::TTextAlign)(HAlignment()));} - -#endif // __GULALIGN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gulbordr.h --- a/epoc32/include/gulbordr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,348 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GULBORDR_H__) -#define __GULBORDR_H__ - -#if !defined(__E32DEF_H__) -#include -#endif - -#if !defined(__GULDEF_H__) -#include -#endif - -#if !defined(__GDI_H__) -#include -#endif - - -class TGulBorder -/** Draws a border around a control. - -The rectangular areas enclosed by borders are typically working areas of the -graphics context so the class supplies a number of methods which describe -how it occupies the area. - -A distinction between descriptive and logical borders is made. For descriptive -borders the appearance of the border is known and fixed. The type of border -drawn is determined by flags which describe how it is to be constructed. These -flags can be combined to achieve many different effects, and standard combinations -have been supplied (see the TBorderType enumeration). For logical borders -the use of the border is known and fixed but the appearance is not specified. -The appearance and sizing functions must be supplied in custom written code. -@publishedAll -@released*/ - { -public: - class TColors - /** Represents the colours used within the border and for the optional single pixel - border outlines. - - These colours are stored using TRgb values. - - An object of this type can be populated using ColorUtils::GetRgbDerivedBorderColors(). - - The colours used inside the border are derived from iBack, the border's background - colour, so that border colours can be lighter or darker shades of the colour - used in the main body of the control they enclose. Different combinations - of light and dark shades are used to draw opposite border sides, to achieve - a raised or sunken effect. */ - { - public: - IMPORT_C TColors(); - public: - /** The line colour. - - This is the colour used to draw the outlines on either side of the border. - Not all border types have an outline. By default, KRgbBlack. */ - TRgb iLine; - /** The background colour for the border. - - The other colours used in the border are derived from this. - - By default, KRgbWhite. */ - TRgb iBack; - /** The lightest colour. - - By default, KRgbWhite. */ - TRgb iLight; - /** The mid light colour. - - This colour is midway between iBack and iLight. By default, KRgbWhite. */ - TRgb iMidlight; - /** The mid dark colour. - - This colour is midway between iBack and iDark. By default, KRgbDarkGray. */ - TRgb iMid; - /** The darkest colour. - - By default, KRgbDarkGray. */ - TRgb iDark; - /** Not used. */ - TRgb iInternalBack; - }; - -public: - /** Defines the border outline style. - - Note that not all border types have an outline. */ - enum TOutlineStyle - { - /** The border has a single pixel outline, either solid (by default) or dotted. */ - EWithOutline=0x01, - /** The border outline is drawn using a dotted pen. */ - EDottedOutline=0x02 - }; - - /** Defines whether or not the border has a single pixel interior border. - - By default it does not. */ - enum TInlineStyle - { - /** The border has an interior border. */ - EWithInline=0x04 - }; - - /** Defines the 3D border style. */ - enum T3DStyle - { - /** A flat border. */ - EFlat=0x10, - /** A 3D effect sunken border. */ - ESunken=0x20, - /** A 3D effect raised border. */ - ERaised=0x40 - }; - - /** Defines the border's construction style. */ - enum TConstructionStyle - { - /** One step border construction. - - This type of border is drawn using the mid light and mid dark colours on opposite - sides of the border. */ - EOneStep=0x100, - /** Two step border construction. - - This type of border uses light and dark colours for the main border frame - (or mid light for the flat border), and an additional half frame using mid - light or mid dark colours. */ - ETwoStep=0x200, - /** Three step border construction. - - This type of border is drawn with an outer frame, a repeating one pixel band - in mid tones, and an inner frame. */ - EThreeStep=0x400, - /** Inverted two step border construction. - - This is the same as ETwoStep except that for raised and sunken borders, the - additional half frame is drawn on the opposite side to that used in ETwoStep. */ - EInvertedTwoStep=0x800 - }; - - /** Defines the number of pixels to add to the border thickness. - - The border thickness is the central part of the border, coloured in the mid-tone - highlights and lowlights. - - For two step-constructed borders, the additional pixels are only added to - either the top left or bottom right hand sides. */ - enum TThickness - { - /** The border has one extra pixel. */ - EAddOnePixel=0x1000, - /** The border has two extra pixels. */ - EAddTwoPixels=0x2000, - /** The border has four extra pixels. */ - EAddFourPixels=0x4000 - }; - - /** Defines the number of pixels that are removed to produce rounded corners. */ - enum TRounding - { - /** Border rounded by removing one extra pixel. */ - EAddOneRoundingPixel=0x10000, - /** Border rounded by removing two extra pixels. */ - EAddTwoRoundingPixels=0x20000, - /** Border rounded by by removing four extra pixels. */ - EAddFourRoundingPixels=0x40000 - }; -private: - enum TNull - { - ENoBorder=0x00 - }; - - enum TLegacyStyle - { - EShallow=EAddOnePixel, - EDeep=EAddTwoPixels, - EThick=EAddFourPixels, - EHorizontal=0x100000, - EWithOverlap=0x200000, - EGray=0x400000, - EBlack=0x80000 - }; - - enum TLogicalStyle - { - ELogical=0x800000 - }; -public: - /** For logical borders, defines whether the border encloses a window, a container - control or a control. */ - enum TLogicalFamily - { - /** Logical border around a window. */ - EWindowFamily=ELogical|0x1, - /** Logical border around a container. */ - EContainerFamily=ELogical|0x2, - /** Logical border around a control. */ - EControlFamily=ELogical|0x3 - }; -public: - /** Defines the descriptive border types. */ - enum TBorderType - { - /** No border. */ - ENone=ENoBorder, - /** Border is a 1 pixel wide grey outline. */ - ESingleGray=EWithOutline|EGray, - /** Border is a 1 pixel wide black outline. */ - ESingleBlack=EWithOutline|EBlack, - /** Border is a 1 pixel wide dotted outline. */ - ESingleDotted=EWithOutline|EDottedOutline, - /** A 3D raised border, with 1 pixel thickness. */ - EShallowRaised=ERaised|EOneStep|EAddOnePixel, - /** A 3D sunken border, with 1 pixel thickness. */ - EShallowSunken=ESunken|EOneStep|EAddOnePixel, - /** A 3D raised border, with outline, and 2 pixel thickness. */ - EDeepRaised=EWithOutline|ERaised|EOneStep|EAddTwoPixels, - /** The same as EDeepRaised. */ - EDeepRaisedWithOutline=EWithOutline|ERaised|EOneStep|EAddTwoPixels, - /** A 3D sunken border, with outline, and 2 pixel thickness. */ - EDeepSunken=EWithOutline|ESunken|EOneStep|EAddTwoPixels, - /** The same as EDeepSunken. */ - EDeepSunkenWithOutline=EWithOutline|ESunken|EOneStep|EAddTwoPixels, - /** A 3D raised border, with outline, and 3 pixel thickness. */ - EThickDeepRaisedWithOutline=EWithOutline|ERaised|EOneStep|EAddOnePixel|EAddTwoPixels, - /** A 3D raised border, with 2 pixels thickness and no outline on the left and - right hand sides. */ - EVerticalBar=ERaised|EOneStep|EAddTwoPixels|EWithOverlap, - /** A 3D raised border, with 2 pixels thickness and no outline on the top and bottom. */ - EHorizontalBar=ERaised|EOneStep|EAddTwoPixels|EHorizontal|EWithOverlap - }; - - /** Defines the logical border types. */ - enum TLogicalType - { - // Window family - /** Raised border around a window. */ - EWindow=EWindowFamily|ERaised, - // Container family - /** Flat border around a container. */ - EFlatContainer=EContainerFamily|EFlat, - /** Raised border around a container. */ - ERaisedContainer=EContainerFamily|ERaised, - /** Sunken border around a container. */ - ESunkenContainer=EContainerFamily|ESunken, - // Control Family - /** Flat border around a control. */ - EFlatControl=EControlFamily|EFlat, - /** Raised border around a control. */ - ERaisedControl=EControlFamily|ERaised, - /** Sunken border around a control. */ - ESunkenControl=EControlFamily|ESunken, - /** Raised border around a control with focus. */ - EFocusedRaisedControl=EControlFamily|ERaised|0x100, - /** Sunken border around a control with focus. */ - EFocusedSunkenControl=EControlFamily|ESunken|0x100 - }; - -public: - IMPORT_C TGulBorder(); - IMPORT_C TGulBorder(TBorderType aType); - IMPORT_C TGulBorder(TBorderType aType,TGulAdjacent aAdjacent); - IMPORT_C TGulBorder(TInt aType); - IMPORT_C TGulBorder(TInt aType,TGulAdjacent aAdjacent); - IMPORT_C void Draw(CGraphicsContext& aGc,const TRect& aRect,const TColors& aBorderColors) const; - IMPORT_C void Draw(CGraphicsContext& aGc,const TRect& aRect) const; - IMPORT_C TRect InnerRect(const TRect& aOuterRect) const; - IMPORT_C TRect OuterRect(const TRect& aInnerRect) const; - IMPORT_C void SetType(TInt aType); - IMPORT_C void SetAdjacent(TInt aAdjacent); - IMPORT_C TSize SizeDelta() const; - IMPORT_C TMargins Margins() const; - IMPORT_C TBool HasBorder() const; - IMPORT_C TInt Adjacent() const; - IMPORT_C TInt Type() const; -public: // Internal to Symbian - IMPORT_C TInt Thickness() const; - IMPORT_C TInt Rounding() const; -private: - TBool IsSunken() const; - TInt Depth() const; - void DrawOutline(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor) const; - void DrawRectOutline(CGraphicsContext& aGc,const TRect& aRect) const; - void DrawInline(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor) const; - TMargins OutlineMargins() const; - TMargins BorderMargins() const; - TMargins InlineMargins() const; - TRect OutlineInnerRect(const TRect& aOuterRect) const; - TRect BorderInnerRect(const TRect& aOuterRect) const; - TInt BorderRounding() const; - TInt InlineRounding() const; - void DrawOneStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aMidlight,TRgb aMid) const; - void DrawTwoStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aLight,TRgb aMidlight,TRgb aMid,TRgb aDark) const; - void DrawInvertedTwoStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aLight,TRgb aMidlight,TRgb aMid,TRgb aDark) const; - void DrawThreeStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aBack,TRgb aLight,TRgb aMidlight,TRgb aMid,TRgb aDark) const; - void DrawTopLeft(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor,const TInt aRounding) const; - void DrawRoundedTopLeft(CGraphicsContext& aGc,const TRect& aRect,const TInt aRounding) const; - void DrawBottomRight(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor,const TInt aRounding) const; - void DrawRoundedBottomRight(CGraphicsContext& aGc,const TRect& aRect,const TInt aRounding) const; - void DrawRoundedCorner(CGraphicsContext& aGc,const TPoint& aStart,const TInt aRoundedLength, const TBool aUp, const TBool aRight) const; - TInt RoundingMargin(const TInt aRoundedLength) const; - inline TInt InternalType() const; - void TranslateLegacyTypes(); -private: - TInt iType; - }; - -/** -The MGulLogicalBorder class specifices an interface for logical borders. - -@internalTechnology*/ -class MGulLogicalBorder - { -public: - virtual void Draw(const TGulBorder& aBorder,CGraphicsContext& aGc, const TRect& aRect, const TGulBorder::TColors& aBorderColors) const=0; - virtual TMargins Margins(const TGulBorder& aBorder) const=0; -private: - IMPORT_C virtual void MGulLogicalBorderReserved(); - }; - -/** -The GulTls class sets and gets the thread local storage for EGul. - -@internalTechnology*/ -class GulTls - { -public: - IMPORT_C static void SetLogicalBorder(MGulLogicalBorder* aLogicalBorder); - IMPORT_C static const MGulLogicalBorder* LogicalBorder(); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gulcolor.h --- a/epoc32/include/gulcolor.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,274 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GULCOLOR_H__) -#define __GULCOLOR_H__ - -#if !defined(__W32STD_H__) -#include -#endif - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__GDI_H__) -#include -#endif - -/** Logical colours. - -Logical colours are used to specify the colour scheme for the controls in -an application. - -Many controls have one logical colour for text and another logical colour -for the background. Some logical colours have a dimmed variant for when the -control becomes inactive or disabled. Highlighted and pressed variants exist -for controls that support selection or which can be pressed. - -@publishedAll -@released */ -enum TLogicalColor - { - // Windows - /** The colour of a window's background. */ - EColorWindowBackground, - /** The colour of text in a window. */ - EColorWindowText, - // Controls - /** The colour of the background contents of a control. */ - EColorControlBackground, - /** The colour of the text inside a control. */ - EColorControlText, - /** The background colour of a control's border. */ - EColorControlSurroundBackground, - /** The colour of text in a control's border. */ - EColorControlSurroundText, - /** The colour of a control's background when highlighted for selection. */ - EColorControlHighlightBackground, - /** The colour of the text in a control when highlighted for selection. */ - EColorControlHighlightText, - /** The colour of a control's background when dimmed. */ - EColorControlDimmedBackground, - /** The colour of the text in a control when dimmed. */ - EColorControlDimmedText, - /** The colour of a control's background when dimmed and highlighted for selection. */ - EColorControlDimmedHighlightBackground, - /** The colour of the text in a control when dimmed and highlighted for selection. */ - EColorControlDimmedHighlightText, - // Dialogs - /** The colour of a dialog's background. */ - EColorDialogBackground, - /** The colour of text inside a dialog. */ - EColorDialogText, - /** A dialog title's background colour. */ - EColorDialogTitle, - /** A dialog title's background colour when pressed. */ - EColorDialogTitlePressed, - /** The text colour in a dialog's title. */ - EColorDialogTitleText, - /** The text colour in a dialog's title when pressed. */ - EColorDialogTitleTextPressed, - // Menus - /** The colour of the menubar's background. */ - EColorMenubarBackground, - /** The colour of text in the menubar. */ - EColorMenubarText, - /** The colour of the menubar title's background. */ - EColorMenubarTitleBackground, - /** The colour of text in the menubar title. */ - EColorMenubarTitleText, - /** The colour of the menu pane background. */ - EColorMenuPaneBackground, - /** The colour of text in the menu pane. */ - EColorMenuPaneText, - /** The colour of the menu pane background when highlighted for selection. */ - EColorMenuPaneHighlight, - /** The colour of text in the menu pane when highlighted for selection. */ - EColorMenuPaneTextHighlight, - /** The colour of the menu pane background when dimmed and highlighted. */ - EColorMenuPaneDimmedHighlight, - /** The colour of text in the menu pane when dimmed. */ - EColorMenuPaneDimmedText, - /** The colour of text in the menu pane when dimmed and highlighted for selection. */ - EColorMenuPaneDimmedTextHighlight, - // Command buttons - /** The colour of the button background, when the button is in the unset state. */ - EColorButtonFaceClear, - /** The colour of the button background when the button is in the set state. */ - EColorButtonFaceSet, - /** The colour of the button background when the button is in the set state and - is pressed. */ - EColorButtonFaceSetPressed, - /** The colour of the button background when the button is in the unset state and - is pressed. */ - EColorButtonFaceClearPressed, - /** The colour of the button text. */ - EColorButtonText, - /** The colour of the button text when the button is pressed. */ - EColorButtonTextPressed, - /** The colour of the button text when the button is dimmed. */ - EColorButtonTextDimmed, - // Message windows - /** The colour of the message window foreground. */ - EColorMsgWinForeground, - EColorMsgWinBackground, - // Scrollbars - /** The colour of the scroll bar border. */ - EColorScrollBarBorder, - EColorScrollBarShaft, - /** The colour of the scroll bar shaft background when dimmed. */ - EColorScrollBarShaftDimmed, - /** The colour of the scroll bar shaft background when pressed. */ - EColorScrollBarShaftPressed, - /** The colour of the background for scroll bars with no thumb and no shaft. */ - EColorScrollBarNoShaftOrThumb, - /** The colour of scroll bar buttons. */ - EColorScrollButtonIcon, - /** The colour of scroll bar buttons when pressed. */ - EColorScrollButtonIconPressed, - /** The colour of scroll bar buttons when dimmed. */ - EColorScrollButtonIconDimmed, - /** The colour of a scroll bar thumb's background. */ - EColorScrollButtonThumbBackground, - /** The colour of a scroll bar thumb's background when pressed. */ - EColorScrollButtonThumbBackgroundPressed, - /** The colour of a scroll bar thumb's background when dimmed. */ - EColorScrollThumbDimmed, - /** The colour of a scroll bar thumb's edge. */ - EColorScrollThumbEdge, - // Toolbars - /** The colour of a toolbar's background. */ - EColorToolbarBackground, - /** The colour of the text in a toolbar. */ - EColorToolbarText, - // Status pane - /** The colour of a status pane's background. */ - EColorStatusPaneBackground, - /** The colour of the text in a status pane. */ - EColorStatusPaneText, - // Labels - /** The colour of the text in a label. */ - EColorLabelText, - /** The colour of emphasised text in a label. */ - EColorLabelTextEmphasis, - /** The colour of the text in a label when dimmed. */ - EColorLabelDimmedText, - /** The colour of the label background when highlighted and dimmed. */ - EColorLabelHighlightPartialEmphasis, - /** The colour of the label background when highlighted. */ - EColorLabelHighlightFullEmphasis, - /** The number of logical colours */ - EColorNumberOfLogicalColors - }; - -class RReadStream; -class RWriteStream; -class CColorArray; - -// not available before Release 005 - -class CColorList : public CBase -/** A palette that maps logical colours (TLogicalColor) to physical (TRgb) values. It -also supports independent sections for applications: a section is identified by an -application UID, and the mappings are held as a colour array (CColorArray). - -A colour list also supports mapping for both four-grey and 256-colour schemes; the -256-colour scheme will be used and will look good if the screen mode supports 16 or -more colours. Otherwise, the four-grey scheme will be used. - -@publishedAll -@released */ - { -public: - IMPORT_C static CColorList* NewL(CArrayFix* aColors); - IMPORT_C ~CColorList(); - // Accessors - IMPORT_C TRgb Color(TLogicalColor aColor) const; - IMPORT_C TInt Count() const; - IMPORT_C TRgb Color(TUid aApp,TInt aColor) const; - IMPORT_C CColorArray* ColorArray(TUid aApp) const; - IMPORT_C TBool ContainsColorArray(TUid aApp) const; - // Manipulators - IMPORT_C void SetColor(TLogicalColor aLogicalColor,TRgb aColor); - IMPORT_C void AddColorArrayL(TUid aApp,CColorArray* aArray); // takes ownership - IMPORT_C void DeleteColorArray(TUid aApp); -public: - IMPORT_C static CColorList* NewLC(); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C void MergeL(const CColorList& aList); -private: - CColorList(CArrayFix* aColors); - TInt Find(TUid aApp) const; -private: - class TAppColorList - { - public: - inline TAppColorList(TUid aApp,CColorArray* aColorArray); - public: - TUid iApp; - CColorArray* iColorArray; - }; -private: - CArrayFix* iEikColors; - CArrayFix* iAppColors; - }; - -// not available before Release 005 - -class CColorArray : public CBase -/** A dynamic array of mappings between logical and physical colours (TRgb values). - -@publishedAll -@released */ - { -public: - IMPORT_C static CColorArray* NewL(); - IMPORT_C static CColorArray* NewLC(); - IMPORT_C ~CColorArray(); - IMPORT_C TRgb Color(TInt aLogicalColor) const; - IMPORT_C void SetColor(TInt aLogicalColor,TRgb aColor); - IMPORT_C TBool Contains(TInt aLogicalColor) const; - IMPORT_C TInt Count() const; - IMPORT_C void Reset(); - IMPORT_C void AddL(TInt aLogicalColor,TRgb aColor); - IMPORT_C void Remove(TInt aLogicalColor); -public: - static CColorArray* NewLC(const CColorArray& aArray); -public: - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; -private: - CColorArray(); - void ConstructL(); - TInt Find(TInt aLogicalColor) const; -private: - class TColor - { - public: - inline TColor(); - inline TColor(TRgb aColor,TInt aLogicalColor); - public: - void InternalizeL(RReadStream& aStream); - void ExternalizeL(RWriteStream& aStream) const; - public: - TRgb iColor; - TInt iLogicalColor; - }; - CArrayFixFlat iColors; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/guldef.h --- a/epoc32/include/guldef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GULDEF_H__) -#define __GULDEF_H__ - -/** The sides on which borders can be adjacent. - -@publishedAll -@released */ -enum TGulAdjacent - { - /** Indicates that rectangle borders are not adjacent. */ - EGulAdjNone =0x00, - /** Adjacent at the top. */ - EGulAdjTop =0x01, - /** Adjacent at the bottom. */ - EGulAdjBottom =0x02, - /** Adjacent at the left. */ - EGulAdjLeft =0x04, - /** Adjacent at the right. */ - EGulAdjRight =0x08 - }; - -/** Symbian light grey. - -@publishedAll -@released */ -#define KRgbDitheredLightGray TRgb(204,204,204) - -/** Symbian dithered grey. - -@publishedAll -@released */ -#define KRgb1in4DitheredGray TRgb(238,238,238) - -/** Symbian green. - -@publishedAll -@released */ -#define KRgbSymbianGreen TRgb(0,153,153) - -/** Symbian light green. - -@publishedAll -@released */ -#define KRgbSymbianGreenLight TRgb(0,183,183) - -/** Symbian blue. - -@publishedAll -@released */ -#define KRgbSymbianBlue TRgb(0,102,153) - -/** Symbian dark blue. - -@publishedAll -@released */ -#define KRgbSymbianBlueDark TRgb(0,72,123) - -/** Symbian orange. - -@publishedAll -@released */ -#define KRgbSymbianOrange TRgb(255,218,155) - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gulfont.h --- a/epoc32/include/gulfont.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GULFONT_H__) -#define __GULFONT_H__ - -#include -#include - -class TResourceReader; - -class TLogicalFont -/** Packages the attributes of a logical font. - -These attributes include a UID (iFontId) and a category (iCategory), either -of which can be used to identify a required system font. The possible values -for the UID are defined in the UI variant's look and feel layer, so are not -the same as the UID values that may be used to create a physical font. - -An object of this class can be passed by any application to CEikonEnv::Font(), -to return the closest matching system font (a CFont-derived object). - -@publishedAll -@released */ - { -public: - /** Logical font categories. - - The font category specifies the type of font that is required. It can be specified - as an alternative to the logical font UID. The physical fonts associated with - these categories are specified in the LAF layer, so are UI variant-specific. */ - enum TFontCategory - { - /** The normal system font. */ - EView, - /** The font used in buttons. */ - EButton, - /** The font used for annotations. This is smaller than the normal font. - For instance, it is used to draw the page number in some applications. */ - EAnnotation, - /** The font used for titles. */ - ETitle - }; - /** Font styles. */ - enum TFontStyle - { - /** Normal style. */ - ENormal, - /** Bold. */ - EBold, - /** Italics. */ - EItalic, - /** Bold and italics. */ - EBoldItalic, - /** Superscript. */ - ESuperscript, - /** Subscript. */ - ESubscript, - /** Light. This is the opposite of bold, i.e. a smaller than normal pen size is - used to draw it. */ - ELight, - /** Custom font. */ - ECustom - }; -public: - IMPORT_C TLogicalFont(); - IMPORT_C TLogicalFont(TUid aId); - IMPORT_C TLogicalFont(TFontCategory aCategory,TFontStyle aStyle,const TZoomFactor& aZoomFactor); - IMPORT_C TLogicalFont(TUid aId,TFontCategory aCategory,TFontStyle aStyle,const TZoomFactor& aZoomFactor); -public: - /** The logical font ID. */ - TUid iFontId; - /** The logical font category. */ - TFontCategory iCategory; - /** The font style. */ - TFontStyle iStyle; - /** The zoom factor. */ - TZoomFactor iZoomFactor; - }; - - -class CCleanupStackableFont : public CBase -/** Wraps a font (CFbsFont) object that can be pushed onto the cleanup stack. - -By default, the cleanup stack only handles CBase-derived classes, and untyped -(TAny*) objects that can be cleaned up by a simple memory free call. Fonts -must also be released, which this class handles automatically in its destructor. - -The font is initialised from a resource file, and can be identified by name -or UID. - -@publishedAll -@released -@see CFbsFont */ - { -public: - IMPORT_C static CCleanupStackableFont* NewL(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); - IMPORT_C static CCleanupStackableFont* NewLC(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); - IMPORT_C static CCleanupStackableFont* NewByNameL(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); - IMPORT_C static CCleanupStackableFont* NewByNameLC(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); - IMPORT_C virtual ~CCleanupStackableFont(); -public: - IMPORT_C CFbsFont& Font() const; - IMPORT_C CFbsFont* TakeOwnershipOfFont(); -private: - CCleanupStackableFont(CWsScreenDevice& aScreenDevice); - static CCleanupStackableFont* NewLC(TBool aByUid,TResourceReader& aReader, CWsScreenDevice& aScreenDevice); -private: - CWsScreenDevice& iScreenDevice; - CFbsFont* iFont; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gulicon.h --- a/epoc32/include/gulicon.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#if !defined(__GULICON_H__) -#define __GULICON_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -class CFbsBitmap; - -class CGulIcon : public CBase -/** Packages two bitmaps, one each for an icon image and its mask. - -@publishedAll -@released */ - { -public: - IMPORT_C static CGulIcon* NewLC(); - IMPORT_C static CGulIcon* NewL(); - IMPORT_C static CGulIcon* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask=NULL); - // - IMPORT_C void SetBitmap(CFbsBitmap* aBitmap); - IMPORT_C void SetMask(CFbsBitmap* aMask); - IMPORT_C CFbsBitmap* Bitmap() const; - IMPORT_C CFbsBitmap* Mask() const; - IMPORT_C void SetBitmapsOwnedExternally(TBool aOwnedExternally); - IMPORT_C TBool BitmapsOwnedExternally() const; - // - IMPORT_C ~CGulIcon(); -private: - CGulIcon(); -private: - CFbsBitmap* iBitmap; - CFbsBitmap* iMask; - TBool iBitmapsOwnedExternally; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/gulutil.h --- a/epoc32/include/gulutil.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,370 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__GULUTIL_H__) -#define __GULUTIL_H__ - -#include -#include -#include -#include -#include - -/** -@publishedAll -@released -*/ -const TUint KTextUtilClipEndChar=0x2026; - -/** -@publishedAll -@released -*/ -const TUint KColumnListSeparator='\t'; - -class CFont; -class CFbsFont; -class CWsScreenDevice; -class TResourceReader; -class CColorArray; -class CGraphicsDevice; -class RWsSession; -class CColorList; -template class CArrayFix; - - -class TMargins8 -/** A set of margins stored as 8 bit integer values which can represent -either pixels or twips between -128 and +127. - -@publishedAll -@released */ - { -public : - /** Left margin in twips or pixels. */ - TInt8 iLeft; - /** Right margin in twips or pixels. */ - TInt8 iRight; - /** Top margin in twips or pixels. */ - TInt8 iTop; - /** Bottom margin in twips or pixels. */ - TInt8 iBottom; -public : - IMPORT_C TMargins8(); - IMPORT_C TMargins8(TInt8 aLeft, TInt8 aTop, TInt8 aRight, TInt8 aBottom); - IMPORT_C void SetAllValuesTo(TInt aCommonValue); - IMPORT_C TRect InnerRect(const TRect& aOuterRect) const; - IMPORT_C TRect OuterRect(const TRect& aInnerRect) const; - IMPORT_C TSize SizeDelta() const; - }; - - -class DrawUtils -/** Provides static functions for drawing text in a rectangle. - -@publishedAll -@released */ - { -public: - IMPORT_C static void DrawText(CGraphicsContext& aGc,const TDesC& aString,const TRect& aBox,TInt aBaseLineOffset, - CGraphicsContext::TTextAlign aHoriz,TInt aMargin,const CFont* aFont); - IMPORT_C static void DrawBetweenRects(CGraphicsContext& aGc,const TRect& aOuterRect,const TRect& aInnerRect); - IMPORT_C static void ClearBetweenRects(CGraphicsContext& aGc,const TRect& aOuterRect,const TRect& aInnerRect); - }; - - -class TextUtils -/** Provides static functions for truncating and aligning text strings. - -@publishedAll -@released */ - { -public: - IMPORT_C static void ClipToFit(TDes& aBuffer,const CFont& aFont,TInt aMaxWidthInPixels,TChar aAlternativeEnd=KTextUtilClipEndChar); - IMPORT_C static TInt ColumnText(TPtrC& aColumnText,TInt aColumn,const TDesC* aSourceText,TChar aColumnSeparator=KColumnListSeparator); - IMPORT_C static void TruncateToNumChars(TDes& aBuffer, TInt numChars); - }; - -class FontUtils -/** Provides static functions for getting information about the fonts supported by a graphics -device. - -@publishedAll -@released */ - { -public: - IMPORT_C static void GetAvailableFontsL(const CGraphicsDevice& aDevice,CDesCArray& aFontNameList, - TInt aFonts=EGulNoSymbolFonts); - IMPORT_C static TInt TypefaceAttributes(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName); - IMPORT_C static TInt GetAvailableHeightsInTwipsL(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName, - CArrayFix& aHeightList); - IMPORT_C static TInt GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName, - CArrayFix& aTwipsList,CDesCArray& aPointsList); - IMPORT_C static TInt PointsFromTwips(TInt aTwips); - IMPORT_C static TInt TwipsFromPoints(TInt aPoints); - IMPORT_C static TInt TwipsFromPoints(const TDesC& aPoints); - IMPORT_C static TInt IndexOfNearestHeight(CArrayFix& aTwipsList,TInt aHeight); - }; - - -class ResourceUtils -/** Provides static functions for resource reading. - -All functions use pre-initialised resource reader objects to read information -from resource files. - -@publishedAll -@released -@see CCoeEnv::CreateResourceReaderLC() */ - { -public: - IMPORT_C static CFbsFont* CreateNamedScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); - IMPORT_C static CFbsFont* CreateNamedScreenFontInPixelsL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); - IMPORT_C static CFbsFont* CreateScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); - inline static TInt8 ReadTInt8L(TResourceReader& aReader); - inline static TInt16 ReadTInt16L(TResourceReader& aReader); - inline static TInt32 ReadTInt32L(TResourceReader& aReader); - IMPORT_C static void PopulateColorArrayL(CColorArray& aColors,TResourceReader& aReader); -private: - enum TResourceTypeInt { EResourceInt8,EResourceInt16,EResourceInt32 }; -private: - IMPORT_C static TInt32 ReadResourceIntL(TResourceReader& aReader,TResourceTypeInt aSize); - }; - -class ColorUtils -/** Provides static functions for manipulating colours. - -@publishedAll -@released -@see TDisplayMode */ - { -public: - /** The orientation of a bitmap. */ - enum TBitmapOrientation - { - /** The bitmap is vertical. */ - EBitmapOrientationVertical, - /** The bitmap is horizontal. */ - EBitmapOrientationHorizontal - }; -public: - IMPORT_C static TRgb ColorAdjust(TRgb aColor,TInt aPercentage); - IMPORT_C static void CreateGradientBitmapL(CFbsBitmap& aBitmap, const RWsSession& aWs, TInt aBreadth, - TBitmapOrientation aOrientation, TRgb aStartColor, TRgb aEndColor); - IMPORT_C static CColorList* CreateSystemColorListL(RFs& aFs); - IMPORT_C static CColorList* CreateSystemColorListL(RFs& aFs,const CColorList& aColorList); - IMPORT_C static void UpdateSystemColorListL(RFs& aFs,CColorList& aColorList); - IMPORT_C static void GetRgbDerivedBorderColors(TGulBorder::TColors& aBorderColors,TRgb aBackgroundColor,TDisplayMode aMode); - IMPORT_C static TRgb RgbDarkerColor(TRgb aRgb,TDisplayMode aMode); - IMPORT_C static TRgb RgbMidDarkerColor(TRgb aRgb,TDisplayMode aMode); - IMPORT_C static TRgb RgbLighterColor(TRgb aRgb,TDisplayMode aMode); - }; - - -class TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest item in a range of indexed text items. - -This is the base class for several classes used to get the maximum width for -date and time components. - -Derived classes should override the pure virtual methods to supply an appropriate -range of items. - -@publishedAll -@released */ - { -protected: - /** Default constructor. */ - inline TFindWidthOfWidestTextItem() {} -public: - IMPORT_C TInt MaximumWidthInPixels(const CFont& aFont) const; -private: - /** Gets the first and last index in the range of items. - - @param aFirstIndex On return, the first index. - @param aLastIndex On return, the last index. - @publishedAll - @released */ - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const=0; - /** Gets the text item at the specfied index. - - @param aText On return, the indexed text item. - @param aIndex The index. - @publishedAll - @released */ - virtual void GetTextItem(TDes& aText, TInt aIndex) const=0; - }; - - -class TFindWidthOfWidestDigit : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest digit, when displayed in a specified -font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released */ - { -public: - IMPORT_C TFindWidthOfWidestDigit(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - -class TFindWidthOfWidestDigitType : public TFindWidthOfWidestTextItem -/** -@publishedAll -@released -*/ - { -public: - IMPORT_C TFindWidthOfWidestDigitType(TDigitType aDigitType); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - -private: - TDigitType iDigitType; - }; - -class TFindWidthOfWidestAmPmName : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest Am or Pm text, when displayed in a specified -font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released -@see TAmPmName */ - { -public: - IMPORT_C TFindWidthOfWidestAmPmName(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - -class TFindWidthOfWidestAbbreviatedDayName : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest abbreviated day name (for instance Mon, Tue) -when displayed in a specified font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released -@see TDayNameAbb */ - { -public: - IMPORT_C TFindWidthOfWidestAbbreviatedDayName(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - - -class TFindWidthOfWidestDayName : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest day name, when displayed in a specified -font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released */ - { -public: - IMPORT_C TFindWidthOfWidestDayName(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - - -class TFindWidthOfWidestAbbreviatedMonthName : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest abbreviated month name (for instance Jan, Feb), -when displayed in a specified font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released */ - { -public: - IMPORT_C TFindWidthOfWidestAbbreviatedMonthName(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - -class TFindWidthOfWidestMonthName : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest month name, when displayed in a specified -font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released */ - { -public: - IMPORT_C TFindWidthOfWidestMonthName(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - -class TFindWidthOfWidestDateSuffix : public TFindWidthOfWidestTextItem -/** Finds the width in pixels of the widest date suffix (for instance st, nd), -when displayed in a specified font. - -After construction, call MaximumWidthInPixels(), defined in the base class, -specifying the font. - -@publishedAll -@released */ - { -public: - IMPORT_C TFindWidthOfWidestDateSuffix(); -private: - virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; - virtual void GetTextItem(TDes& aText, TInt aIndex) const; - }; - -// class ResourceUtils -inline TInt8 ResourceUtils::ReadTInt8L(TResourceReader& aReader) -/** Reads an 8 bit signed integer from a resource. - -@param aReader Resource reader to use to read the integer. -@return The 8 bit signed integer. */ - { return((TInt8)ReadResourceIntL(aReader,EResourceInt8)); } -inline TInt16 ResourceUtils::ReadTInt16L(TResourceReader& aReader) -/** Reads a 16 bit signed integer from a resource. - -@param aReader Resource reader to use to read the integer. -@return The 16 bit signed integer. */ - { return((TInt16)ReadResourceIntL(aReader,EResourceInt16)); } -inline TInt32 ResourceUtils::ReadTInt32L(TResourceReader& aReader) -/** Reads a 32 bit signed integer from a resource. - -@param aReader Resource reader to use to read the integer. -@return The 32 bit signed integer. */ - { return((TInt32)ReadResourceIntL(aReader,EResourceInt32)); } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/hlplch.h --- a/epoc32/include/hlplch.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Help Launcher module -// -// - -#ifndef __HLPLCH_H__ -#define __HLPLCH_H__ - -#if !defined(__APGTASK_H__) -#include -#endif - -#if !defined(__EIKDLL_H__) -#include -#endif - -#if !defined(__WSERV_H__) -#include -#endif - -#if !defined(__COEHELP_H__) -#include -#endif - -/** Help application UID. -@internalComponent -@released -*/ -const TUid KHlpAppUid={ 0x10005234 }; - -/** UID of window message to send to application. -@internalComponent -@released -*/ -const TUid KHlpAppWsMsg={ 0x100055c7 }; - -/** Maximum length of command line to launch application. -@internalComponent -@released -*/ -const TInt KMaxCmdLineLength = 512; - -// resource file name -_LIT(KHelpLauncherResource, "z:\\resource\\apps\\lch.rsc"); - -class CHlpCmdLine : public CBase -/** -@internalComponent -@released -*/ - { -public: - static CHlpCmdLine* NewL(CArrayFix* aContextList); - static CHlpCmdLine* NewLC(CArrayFix* aContextList); - ~CHlpCmdLine(); -public: - TPtr8 CmdLineL(); -private: - void BuildCmdLineL(); - void AddContextL(TCoeHelpContext& aContext); -private: - void ConstructL(); - CHlpCmdLine(CArrayFix* aContextList); -private: - CArrayFix* iContextList; - CBufFlat* iCmdLine; - }; - -class HlpLauncher -/** Launches the help application. - -It assumes that such an application is at z:\\Sys\\Bin\\CsHelp.exe - -@publishedAll -@released -*/ - { -public: - IMPORT_C static void LaunchHelpApplicationL(RWsSession& aWsSession, CArrayFix* aContextList); - IMPORT_C static void LaunchHelpApplicationL(RWsSession& aWsSession, TUid aUid); - IMPORT_C static void LaunchHelpApplicationL(RWsSession& aWsSession); -private: - static void DoLaunchHelpApplicationL(RWsSession& aWsSession, const TDesC8& aCmdLine); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/hlpmodel.h --- a/epoc32/include/hlpmodel.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,557 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __HLPMODEL_H -#define __HLPMODEL_H - -// System includes -#include -#include // For MDesCArray -#include // For MRichTextStoreResolver -#include // For MPictureFactory -#include - -// Help model includes -#include "hlpconstants.h" - -// Classes referenced -class CRichText; -class CHlpDatabase; -class CHlpFileEntry; -class CHlpSQLSearch; -class TCoeHelpContext; -class CParaFormatLayer; -class CCharFormatLayer; -class CHlpPicture; - -// Typedefs -/** -@internalComponent -@released -*/ -typedef CArrayPtrFlat CHlpDatabases; - -/** -@internalComponent -@released -*/ -typedef CArrayPtrFlat CHlpFileList; - - -class MHlpModelObserver -/** Client callback inteface to receive events from the help model. -@publishedAll -@released -*/ - { -public: - /** Receives a help model event. - - @param aEvent Help model event. Events are listed in the enums that begin - ECategoryListAvailable, and ENoRecordsFound. */ - virtual void HandleModelEventL(TInt aEvent) = 0; - }; - -// -// Internal API to handle events reported by the search engine -// -class MHlpDbObserver -/** -@internalComponent -@released -*/ - { -public: // TInt aEvent should be a named enum - virtual void HandleDbEventL(TInt aEvent) = 0; - }; - -// -// Search types (these should be named, but SC cannot be broken until v7.0 -// -/** Defines the search types for use with CHlpModel::SearchL(). */ -enum - { - /** Gets a list of index entries for all help files. - - Success is indicated by an EIndexListAvailable event; failure by EIndexListNoneFound. - The list can be retrieved using CHlpModel::LoadListL(). */ - EIndexList, - /** Gets a list of categories for all help files. - - Success is indicated by an ECategoryListAvailable event; failure by ECategoryListNoneFound. - The list can be retrieved using CHlpModel::CategoryListL(). */ - ECategoryList, - /** Gets a list of topics for a specified category. - - Success is indicated by an ETopicListAvailable event; failure by ETopicListNoneFound. - The list can be retrieved using CHlpModel::LoadListL(). */ - ETopicListForCategory, - /** Gets a list of topics for a specified category UID. - - Success is indicated by an ETopicListAvailable event; failure by ETopicListNoneFound. - The list can be retrieved using CHlpModel::LoadListL(). */ - ETopicListForCategoryUID, - /** Searches for a topic with the specified help context. - - A successful search generates an ETopicAvailable event. The topic can then be retrieved - using CHlpModel::LoadTopicL(). An unsuccessful search generates an ETopicNotFound event. */ - EContextSearch, - /** Searches for index entries for the specified help item. - - A successful search generates an ETopicListAvailable event. The list can then be retrieved - using CHlpModel::LoadListL(). An unsuccessful search generates an ETopicListNoneFound event. */ - EIndexSearch, - /** Searches the topic titles for the specified text. - - A successful search generates an ESearchListAvailable event. The list can then be - retrieved using CHlpModel::LoadListL(). An unsuccessful search generates an - ESearchListNoneFound event. */ - EQuickSearch, - /** Searches the full text of topics for the specified text. - - A successful search generates an ESearchListAvailable event. The list can then be - retrieved using CHlpModel::LoadListL(). An unsuccessful search generates an - ESearchListNoneFound event. */ - EFullTextSearch, - /** Searches for a topic with the specified ID. - - A successful search generates an ETopicAvailable event. The topic can then be - retrieved using CHlpModel::LoadTopicL(). An unsuccessful search generates an - ETopicNotFound event. */ - ETopicIdSearch - }; - -// -// Search progress responses (this should be scoped as members of MHlpModelObserver -// and should also be named, but SC cannot be broken until v7.0 -// -enum - { - ENoRecordsFound, - ESearchInProgress, - ESearchComplete - }; - -// -// Search progress responses (ditto for naming and scoping) -// -/** Help model search result events*/ -enum - { - /** The search returned a category list. - - The list can be retrieved using CHlpModel::CategoryListL(). */ - ECategoryListAvailable, - /** The search did not return a category list. */ - ECategoryListNoneFound, - /** The search returned a results list. - - The list can be retrieved using CHlpModel::LoadListL(). */ - ESearchListAvailable, - /** The search did not return a results list. */ - ESearchListNoneFound, - /** The search returned a topic list. - - The list can be retrieved using CHlpModel::LoadListL(). */ - ETopicListAvailable, // Category expansion - /** The search did not return a topic list. */ - ETopicListNoneFound, - /** The search returned an index item list. - - The list can be retrieved using CHlpModel::LoadListL(). */ - EIndexListAvailable, - /** The search did not return an index item list. */ - EIndexListNoneFound, - /** The search returned a topic list from an index phrase search. - - The list can be retrieved using CHlpModel::LoadListL(). */ - EIndexSearchListAvailable, - /** The search did not return a topic list from an index phrase search. */ - EIndexSearchListNoneFound, - /** The search returned a topic. - - The topic can be retrieved using CHlpModel::LoadTopicL(). */ - ETopicAvailable, - /** The search did not return a topic. */ - ETopicNotFound, - /** The search is in progress. */ - EModelSearchInProgress, - /** The search has been cancelled. */ - EHlpSearchCancelled - }; - -/** Defines help model zoom sizes. */ -enum THlpZoomState - { - /** Small zoom. */ - EHlpZoomStateSmall = 0, - /** Medium zoom. */ - EHlpZoomStateMedium = 1, - /** Large zoom. */ - EHlpZoomStateLarge = 2 - }; - -// Constants -const TInt KHlpModelDefaultNumberOfImagesForV6Point2Files = 1; -const TInt KHlpModelMaximumNumberOfImagesForV6Point2Files = 3; -// -/** Default zoom factor for small zoom size. */ -const TInt KHlpModelZoomFactorSmall = 750; -/** Default zoom factor for medium zoom size. */ -const TInt KHlpModelZoomFactorMedium = 1000; -/** Default zoom factor for large zoom size. */ -const TInt KHlpModelZoomFactorLarge = 1250; -// -/** Default zoom factor for medium zoom size as real number. */ -const TReal KHlpModelDefaultZoomFactorAsRealNumber = 1000.0; - - -class CHlpItem : public CBase -/** Encapsulates an individual item in a help file. - -Note that item IDs are assigned in increasing numerical order by the help -compiler and are not unique. Categories and help files are however specified -by UID, and so are unique. -@publishedAll -@released -*/ - { -public: - static CHlpItem* NewL(const TDesC& aTitle, TUint32 aId, TUid aCategoryId, TUid aHelpFileUid); - static CHlpItem* NewLC(const TDesC& aTitle, TUint32 aId, TUid aCategoryId, TUid aHelpFileUid); - static CHlpItem* NewLC(const TDesC& aTitle, TUint32 aId, TUid aHelpFileUid); - IMPORT_C ~CHlpItem(); - -public: // Access - inline TUid CategoryUid() const - /** Gets the item's category ID. - - @return Category ID */ - { return iCategoryUid; } - inline TUid HelpFileUid() const - /** Gets the item's help file UID. - - @return Help file UID */ - { return iHelpFileUid; } - inline TUint32 Id() const - /** Gets the item's ID. - - @return Item's ID */ - { return iId; } - inline const TDesC& Title() const - /** Gets the item's title. - - @return Item's title */ - { return *iTitle; } - -public: // These should not be public, but I can't break SC (these were inherited from - // the previous author. - /** Item's title */ - HBufC* iTitle; - /** Item's ID */ - TUint32 iId; - -private: - friend class CHlpList; // Needed for searching - CHlpItem(TUint32 aId); - CHlpItem(TUint32 aId, TUid aHelpFileUid); - CHlpItem(TUint32 aId, TUid aCategoryId, TUid aHelpFileUid); - void ConstructL(const TDesC& aTitle); - -private: // Meta data required for correct restoration of topics - TUid iCategoryUid; - TUid iHelpFileUid; - }; - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> MHlpTitleArray -/////////////////////////////////////////////////////////////////////////////////////// -class MHlpTitleArray : public MDesCArray -/** Interface to get a topic ID from an array index. -@publishedAll -@released -*/ - { -public: - /** Gets a topic ID for the specified index. - - @param aIndex Index of item to get - @return Topic ID */ - virtual TUint32 At(TInt aIndex) const = 0; - }; - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> CHlpList -/////////////////////////////////////////////////////////////////////////////////////// -class CHlpList : public CBase, public MHlpTitleArray -/** A list of help items (CHlpItem objects). -@publishedAll -@released -*/ - { -public: // Static construct / destruct - IMPORT_C static CHlpList* NewL(); - IMPORT_C static CHlpList* NewLC(); - IMPORT_C ~CHlpList(); - -public: // From MDesCArray - IMPORT_C TInt MdcaCount() const; - IMPORT_C TPtrC MdcaPoint(TInt aIndex) const; - -public: - // 'At' returns topic Id, but this function is next to useless because you can't - // uniquely identify a help topic by topic id alone. You need to know 3 things:- - // a) topic id, 2) category id, 3) help file uid. This information is all - // encapsulated in CHlpItem so help app authors should use 'Item' instead. - IMPORT_C TUint32 At(TInt aIndex) const; - IMPORT_C CHlpItem* Item(TInt aIndex) const; - IMPORT_C TInt Find(TUint32 aId); - IMPORT_C void Reset(); - IMPORT_C void AppendL(CHlpItem* aItem); - -private: // 2nd phase constructor - void ConstructL(); - -private: - // This is the array of help items that were located as a result of - // performing a search. - CArrayPtr* iList; - }; - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> CHlpTopic -/////////////////////////////////////////////////////////////////////////////////////// -class CHlpTopic : public CBase -/** Encapsulates a help topic. - -A help topic has text, a title, a category, and paragraph and character formatting. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CHlpTopic* NewL(); - IMPORT_C static CHlpTopic* NewLC(); - IMPORT_C ~CHlpTopic(); - -public: - // This function will not behave as expected in the case where it is used to - // restore rich text that includes pictures. Instead, only the text and markup - // will be restored. Help App authors should use 'CHlpModel::LoadTopic' instead. - // I can't remove this as it would break S&BC. - IMPORT_C void RestoreL(RDbView* aView); - - IMPORT_C CRichText* TopicText(); - IMPORT_C TDesC& TopicTitle(); - IMPORT_C TDesC& Category(); - - inline CParaFormatLayer* ParaFormatLayer() const - /** Gets the topic paragraph formatting. - - @return Topic paragraph formatting */ - { return iGlobalParaFormatLayer; } - inline CCharFormatLayer* CharFormatLayer() const - /** Gets the topic character formatting. - - @return Topic character formatting */ - { return iGlobalCharFormatLayer; } - -private: - void ConstructL(); - -private: - friend class CHlpModel; - - TUint32 iTopicId; - TBuf iTopicTitle; - TBuf iCategory; - - CRichText* iTopicText; - CParaFormatLayer* iGlobalParaFormatLayer; - CCharFormatLayer* iGlobalCharFormatLayer; - }; - - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> CHlpModel -/////////////////////////////////////////////////////////////////////////////////////// -class CHlpModel : public CBase, public MHlpDbObserver, public MPictureFactory, public MRichTextStoreResolver -/** Help model interface. - -It provides functions to search help files in various ways. - -The interface implements MHlpDbObserver for help database events, and MRichTextStoreResolver -and MPictureFactory to obtain pictures from rich text stores. -@publishedAll -@released -*/ - { -public: // Construct / destruct - IMPORT_C static CHlpModel* NewL(RFs& aFs, MHlpModelObserver* aObserver); - IMPORT_C static CHlpModel* NewLC(RFs& aFs, MHlpModelObserver* aObserver); - IMPORT_C ~CHlpModel(); - -public: // Opens all the help files in \System\Help - IMPORT_C void OpenL(); - IMPORT_C void CloseL(); - -public: // Opens specific help files - IMPORT_C void OpenFileL(const TDesC& aFileName); - IMPORT_C void CloseFileL(const TDesC& aFileName); - -public: // Specialized searching - IMPORT_C void ContextSearchL(TCoeHelpContext& aContext); - IMPORT_C void CategoryUIDSearchL(TUid aCategoryUID); - IMPORT_C void TopicSearchL(const CHlpItem& aHelpItem); - IMPORT_C void IndexSearchL(const CHlpItem& aHelpItem); - - // Generic searching - IMPORT_C void SearchL(TInt aType, TUint32 aId); - IMPORT_C void SearchL(TInt aType, HBufC* aCriterion=NULL); - IMPORT_C void SearchL(TInt aType, const TDesC& aCriterion); - -public: // Cancel EFullTextSearch types - will return KErrArgument if not the correct type - IMPORT_C TInt CancelSearch(); - -public: // Assumes that the search has already been performed and that the view is valid - IMPORT_C void LoadTopicL(CRichText& aRichText, TDes& aTitle); - IMPORT_C void LoadTopicL(CRichText& aRichText); - IMPORT_C void LoadTopicL(CHlpTopic* aTopic); - IMPORT_C void LoadListL(CHlpList* aList); - IMPORT_C void CategoryListL(CDesCArray* aList); - -public: - IMPORT_C void SetZoomSizeL(THlpZoomState aState = EHlpZoomStateMedium); - IMPORT_C THlpZoomState ZoomSize() const; - IMPORT_C void SetZoomFactors(THlpZoomState aZoomState, TInt aFactor); - TInt CurrentZoomFactor() const; - void RemoveHelpPicture(CHlpPicture* aHelpPicture); - -public: // FROM MPictureFactory - void NewPictureL(TPictureHeader& aHdr, const CStreamStore& aDeferredPictureStore) const; - -public: // FROM MRichTextStoreResolver - IMPORT_C const CStreamStore& StreamStoreL(TInt aPos) const; - -public: - // Check to see if any of the databases have matching meta data - IMPORT_C TInt MatchUidL(TUid aUid); - - // Replace the current observer with another - IMPORT_C void SetObserver(MHlpModelObserver* aObserver); - -public: - void NotifyHelpModelDestructionToPictures(); - -private: // Internal search API - void DoSearchL(TInt aType, const TDesC& aCriterion); - void DoNextSearchL(); - void ResetReadyForSearch(); - void ResetViews(); - void SetCriterionL(const TDesC& aCriterion); - -private: // Event management - void HandleDbEventL(TInt aEvent); - void ReportEventToObserverL(TInt aEvent); - -private: // Misc internal functions - inline CHlpDatabase* CurrentDatabase() const; - inline TInt DatabaseCount() const; - inline void SetSearchType(TInt aSearchType); - inline TInt CurrentSearchType() const; - RDbView* CurrentView() const; - TBool DiskPresent(TInt aDrive) const; - CHlpFileList* BuildListForDriveLC(TDriveUnit aDrive, RFs& aFsSession) const; - static void ResetAndDestroyArrayOfCHlpFileEntry(TAny* aObject); - -private: - CHlpModel(RFs& aFs, MHlpModelObserver& aObserver); - void ConstructL(); - -private: // Member data - RFs& iFsSession; - - // This is required in order to restore rich text pictures from the database - CStreamStore* iCurrentRichTextStore; - - // Creates our SQL string based upon the search type and criteria - CHlpSQLSearch* iSearch; - - // An array of all the help files currently available - CHlpDatabases* iDatabases; - - // Receives help model notifications as various actions are performed - MHlpModelObserver* iObserver; - - // Were any matching results found for this search - TBool iFound; - - // What was being searched for - HBufC* iCriterion; - - // What type of search was being performed - TInt iSearchType; - - // Which database are we currently searching - TInt iCurrentDb; - - // Transient category Uid used when creating category lists - TUid iTransientCategoryUid; - - // What zoom size is used - THlpZoomState iZoomSize; - - // Array to hold the bitmaps that are currently used in the help rich text - CArrayPtr* iPictures; - - // Array to hold the zoom factors that correspond to each zoom size - CArrayFix* iZoomFactors; - }; - - - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> CHlpModel (inlines) -/////////////////////////////////////////////////////////////////////////////////////// -inline TInt CHlpModel::DatabaseCount() const - { - return iDatabases->Count(); - } -inline void CHlpModel::SetSearchType(TInt aSearchType) - { - iSearchType = aSearchType; - } -inline CHlpDatabase* CHlpModel::CurrentDatabase() const - { - return iDatabases->At(iCurrentDb); - } -inline TInt CHlpModel::CurrentSearchType() const - { - return iSearchType; - } - - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/hlpzoom.h --- a/epoc32/include/hlpzoom.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __HLPZOOM_H__ -#define __HLPZOOM_H__ - -// System includes -#include - -// Classes referenced -class MGraphicsDeviceMap; - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> MHlpZoomStateManager (header) -/////////////////////////////////////////////////////////////////////////////////////// -class MHlpZoomStateManager -/** -@internalComponent -@released -*/ - { -public: // Zoom state - enum THlpZoomState - { - EHlpZoomStateSmall = -1, - EHlpZoomStateNormal = 0, - EHlpZoomStateLarge = 1 - }; - -public: // From MHlpZoomStateManager - virtual void SetZoomState(THlpZoomState aState) = 0; - virtual THlpZoomState ZoomState() const = 0; - -public: // From MHlpZoomStateManager - virtual MGraphicsDeviceMap& ZoomDeviceMap() const = 0; - virtual TInt ZoomFactorValueForZoomState(THlpZoomState aState) const = 0; - }; - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> MHlpZoomStateObserver (header) -/////////////////////////////////////////////////////////////////////////////////////// -class MHlpZoomStateObserver -/** -@internalComponent -@released -*/ - { -public: // From MHlpZoomStateObserver - virtual void HandleZoomStateChangedL(MHlpZoomStateManager::THlpZoomState aZoomState) = 0; - }; - - - -/////////////////////////////////////////////////////////////////////////////////////// -// ----> MHlpZoomStateChangeNotifier (header) -/////////////////////////////////////////////////////////////////////////////////////// -class MHlpZoomStateChangeNotifier : public MHlpZoomStateManager -/** -@internalComponent -@released -*/ - { -public: // From MHlpZoomStateChangeNotifier - virtual void RegisterForZoomStateChangeNotificationsL(MHlpZoomStateObserver& aObserver) = 0; - virtual void RegisterForZoomStateChangeNotificationsCancel(MHlpZoomStateObserver& aObserver) = 0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http.h --- a/epoc32/include/http.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file http.h - @warning : This file contains Rose Model ID comments - please do not delete - @publishedAll - @released -*/ - -#ifndef __HTTP_H__ -#define __HTTP_H__ - -// System includes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // __HTTP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/cauthenticationfilterinterface.h --- a/epoc32/include/http/cauthenticationfilterinterface.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CAuthenticationFilterInterface.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CAUTHENTICATIONFILTERINTERFACE_H__ -#define __CAUTHENTICATIONFILTERINTERFACE_H__ - -// System includes -#include -#include -#include - -// Forward declarations -class MHTTPAuthenticationCallback; - - -class CAuthenticationFilterInterface : public CBase -/** -The ECOM interface definition for an HTTP authentication filter. Implementations -of an authentication filter must inherit this class. -@publishedAll -@released -*/ - { -public: // Methods - /** - @fn InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback) - Intended Usage: This method is used to install the authentication filter to the filter queue. - The returned pointer is not owned as the filters must be self-destroying when - they are unloaded. - @param aSession A handle to the transport session - @param aCallback A pointer to the object implementing the callback function - @return Pointer to the newly installed plugin - @pre The session had already been setup - @post The filter(s) have been installed - */ - inline static void InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback); - - /** - @fn ~CAuthenticationFilterInterface() - Intended Usage: Virtual destructor - @pre The object identified by the destructor key in iEcomDtorID exists - @post The object is destroyed - */ - inline ~CAuthenticationFilterInterface(); - -public: - struct TAuthenticationParams - { - RHTTPSession* iSession; - MHTTPAuthenticationCallback* iCallback; - }; - -private: // Attributes - /// The ECom destructor key identifier - TUid iEcomDtorID; - }; - -//---------------------------------------------------------------------------------------- - -inline void CAuthenticationFilterInterface::InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback) - { - const TUid KUidAuthenticationFilter = {0x101F447C}; - TAuthenticationParams authParams; - authParams.iSession = &aSession; - authParams.iCallback = aCallback; - REComSession::CreateImplementationL(KUidAuthenticationFilter, _FOFF(CAuthenticationFilterInterface,iEcomDtorID), &authParams); - } - -inline CAuthenticationFilterInterface::~CAuthenticationFilterInterface() - { - REComSession::DestroyedImplementation(iEcomDtorID); - } - -#endif // __CAUTHENTICATIONFILTERINTERFACE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/cecomfilter.h --- a/epoc32/include/http/cecomfilter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CEComFilter.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CECOMFILTER_H__ -#define __CECOMFILTER_H__ - -// System includes -#include -#include -#include - -/** -The ECom filter interface UID -@publishedAll -@released -*/ -const TUid KUidFilterPluginInterface = {0x101F446D}; - - -//##ModelId=3C4C0F400280 -class CEComFilter : public CBase -/** -This class serves as the base class for ECom filter plugins. It provides minimal functionality -to simply install and destroy filters specified by their UID or data type. The RHTTPSession -passed in is passed onto the filter as a TAny* pointer and therefore must be casted back to -an RHTTPSession pointer by the filter. -@publishedAll -@released -*/ - { -public: // Methods - /** - @fn InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid) - Intended Usage: This method is used to install filters to the filter queue. The implementation - UID of the filter plugin is passed to identify the plugin that is required. - The returned pointer is not owned as the filters must be self-destroying when - they are unloaded. - @param aSession A handle to the transport session - @param aEComFilterUid The implementation UID of the plugin - @return Pointer to the newly installed plugin - @pre The session had already been setup - @post The filter(s) have been installed - */ - //##ModelId=3C4C0F4002A8 - inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid); - - /** - @fn InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType) - Intended Usage: This method is used to install filters to the filter queue. The implementation - UID of the filter plugin is passed to identify the plugin that is required. - The returned pointer is not owned as the filters must be self-destroying when - they are unloaded. - @param aSession A handle to the transport session - @param aEComFilterDataType A descriptor containing the datatype of the filter to load - @return Pointer to the newly installed plugin - @pre The session had already been setup - @post The filter(s) have been installed - */ - //##ModelId=3C4C0F4002AB - inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType); - - /** - @fn ~CEComFilter() - Intended Usage: Virtual destructor - @pre The object identified by the destructor key in iEcomDtorID exists - @post The object is destroyed - */ - //##ModelId=3C4C0F40029E - inline ~CEComFilter(); - -private: // Attributes - /// The ECom destructor key identifier - //##ModelId=3C4C0F400297 - TUid iEcomDtorID; - }; - -//---------------------------------------------------------------------------------------- - -inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid) - { - TAny* filterPlugin = REComSession::CreateImplementationL(aEComFilterUid, _FOFF(CEComFilter,iEcomDtorID), &aSession); - return REINTERPRET_CAST(CEComFilter*, filterPlugin); - } - -inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession,const TDesC8& aEComFilterDataType) - { - TEComResolverParams resolverParams; - resolverParams.SetDataType(aEComFilterDataType); - // This will leave if the plugin is not found - TAny* filterPlugin = REComSession::CreateImplementationL(KUidFilterPluginInterface, - _FOFF(CEComFilter,iEcomDtorID), - &aSession, resolverParams); - return REINTERPRET_CAST(CEComFilter*, filterPlugin); - } - -inline CEComFilter::~CEComFilter() - { - REComSession::DestroyedImplementation(iEcomDtorID); - } - -#endif // __CECOMFILTER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/cheadercodec.h --- a/epoc32/include/http/framework/cheadercodec.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,318 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CHeaderCodec.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CHEADERCODEC_H__ -#define __CHEADERCODEC_H__ - -// System includes -#include -#include - -// Forward declarations -class CHeaderWriter; -class CHeaderReader; - - -//##ModelId=3C4C18850126 -class CHeaderCodec : public CBase -/** -An abstract HTTP header codec. - -Each instance of a concrete subclass of CHeaderCodec is associated with, and owned -by, a specific CProtocolHandler. It provides on-demand encoding/decoding of -HTTP header data, between the generic format used by clients/filters to formulate -requests and interpret responses, and the raw format used by -the transport handlers (and origin servers/gateways/etc.) - -The CHeaderCodec has an associated instance of a sub-class of each of -CHeaderReader and CHeaderWriter. It delegates the actual encoding and -decoding function to these instances. - -Header codecs provide a mechanism for extensibility whereby if one codec can't -decode (or encode) a given header, it locates a codec that can, and then delegates -the task to that codec instead. -@publishedAll -@released -*/ - { -public: // methods - -/** - Intended Usage: Destructor - cleans up and releases resources to the system. -*/ - //##ModelId=3C4C18850194 - IMPORT_C virtual ~CHeaderCodec(); - -/** - Encode the supplied header field. This method uses the associated - concrete CHeaderWriter object to do a conversion of the field into - raw form from the generic internal representation. - - @param aHeader (in) A proxy for the header field to be encoded - @leave KErrNotSupported if a codec that supports encoding this header - cannot be found -*/ - //##ModelId=3C4C1885018C - IMPORT_C void EncodeHeaderL(RHeaderField& aHeader) const; - -/** - Decode the supplied header field. This method uses the associated - concrete CHeaderReader object to do a conversion of the field into - the generic internal representation from the raw form. - - @param aHeader (in) A proxy for the header field to be decoded - - @leave KErrNotSupported if a codec that supports decoding this header - cannot be found - -*/ - //##ModelId=3C4C1885018A - IMPORT_C void DecodeHeaderL(RHeaderField& aHeader) const; - -/** - Intended Usage: Concrete header codec classes must implement this method to - indicate to the framework whether their concrete CHeaderWriter is - capable of encoding the named header field. - @param aHeaderField (in) A proxy for the header field to be encoded - @return A flag indicating ETrue if the field can be encoded. -*/ - //##ModelId=3C4C18850181 - virtual TBool CanEncode(RStringF aHeaderField) const = 0; - -/** - Intended Usage: Concrete header codec classes must implement this method to - indicate to the framework whether their concrete CHeaderReader is - capable of decoding the named header field. - @param aHeaderField (in) A proxy for the header field to be encoded - @return A flag indicating ETrue if the field can be decoded. - */ - //##ModelId=3C4C18850178 - virtual TBool CanDecode(RStringF aHeaderField) const = 0; - -/** - Intended Usage: Concrete header codecs must be implement this method if they wish to - delegate the encoding/decoding of particular header fields to a - different codec. - This would be done if the codec doesn't have the ability itself to - do the encode/decode but can locate an alternative that does. This - function may leave with a Standard Symbian OS error code. eg. KErrNoMemory - - The caller takes ownership of the returned codec. - @param aHeaderField (in) A proxy for the header field to be encoded - @return A pointer to the new CHeaderCodec, or NULL if one couldn't be found. - @leave KErrNoMemory, Not enough memory to create object. -*/ - //##ModelId=3C4C18850176 - virtual CHeaderCodec* FindDelegateCodecL(RStringF aHeaderField) const = 0; - -protected: // methods - -/** - Default constructor. - */ - //##ModelId=3A914DF20273 - IMPORT_C CHeaderCodec(); - -/** - Second phase construction in which any necessary allocation is done - Implementations of this interface may leave with standard erros like KErrNoMemory if there is - insufficient memory for allocation in the second phase. - */ - //##ModelId=3C4C1885016E - IMPORT_C void ConstructL(); - -protected: // attributes - - /** The owned header writer object that does actual encoding of header fields. - */ - //##ModelId=3C4C18850164 - CHeaderWriter* iWriter; - - /** The owned header reader object that does actual decoding of header fields. - */ - //##ModelId=3C4C1885015A - CHeaderReader* iReader; - -private: // methods - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C1885016D - inline virtual void Reserved1(); - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C1885016C - inline virtual void Reserved2(); - -private: // attributes - - /** The most recently-obtained delegate codec - */ - //##ModelId=3C4C18850150 - mutable CHeaderCodec* iDelegateCodec; - }; - - -//##ModelId=3C4C188601D1 -class CHeaderWriter : public CBase -/** -An abstract HTTP header encoder. CHeaderWriter provides an interface used by its -owning codec to do conversion of header data from the generic internal header -representation to the raw representation used for a particular protocol/transport. -Specific sub-classes of CHeaderWriter are associated with specific protocol handlers. -@publishedAll -@released -*/ - { -public: // methods - -/** - Intended Usage: Destructor - cleans up and release resources to the system. -*/ - //##ModelId=3C4C188601FC - IMPORT_C virtual ~CHeaderWriter(); - -/** - Intended Usage: Encodes the supplied header field. This method does a conversion - of the field into raw form from the generic internal representation. - - Implementations of this interface may leave with any of KErrNotSupported, KErrHttpEncodeDoWWWAuthenticate, - KErrHttpEncodeAuthorization, KErrHttpEncodeDoAge, KErrHttpEncodeDoVary, KErrHttpEncodeDoContentLanguage. - - Specific header writer sub-classes must implement this method. - @param aHeader (in) A proxy for the header field to be encoded - */ - //##ModelId=3C4C188601FA - virtual void EncodeHeaderL(RHeaderField& aHeader) = 0; - -protected: // methods - -/** - Default constructor. - */ - IMPORT_C CHeaderWriter(); - -/** - Second phase construction in which any necessary allocation is done - Implementations of this interface may leave with standard errors like KErrNoMemory. - */ - //##ModelId=3C4C188601F9 - IMPORT_C void ConstructL(); - -private: // methods - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C188601F1 - inline virtual void Reserved1(); - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C188601F0 - inline virtual void Reserved2(); - }; - - -//##ModelId=3C4C188602FE -class CHeaderReader : public CBase -/** -An abstract HTTP header decoder. CHeaderReader provides an interface used by its -owning codec to do conversion of header data from the raw representation used for -a particular protocol/transport to the generic internal header representation. -Specific sub-classes of CHeaderWriter are associated with specific protocol -handlers. -@publishedAll -@released -*/ - { -public: // methods - -/** - Intended Usage: Destructor - cleans up and release resources to the system. -*/ - //##ModelId=3C4C1886031E - IMPORT_C virtual ~CHeaderReader(); - -/** - Intended Usage: Decodes the supplied header field. This method does a conversion - of the field from the generic internal representation into raw form. - - Specific header reader sub-classes must implement this method. - - Implementations of this interface may leave with any of KErrHttpDecodeAccept, KErrHttpDecodeAcceptCharset, - KErrHttpDecodeAcceptLanguage, KErrHttpDecodeAcceptEncoding, KErrNotSupported. - - @param aHeader (in) A proxy for the header field to be decoded - -*/ - //##ModelId=3C4C1886031C - virtual void DecodeHeaderL(RHeaderField& aHeader) = 0; - -protected: // methods - -/** - Default constructor. - */ - IMPORT_C CHeaderReader(); - -/** - Second phase construction in which any necessary allocation is done - Implementations of this interface may leave with standard errors like KErrNoMemory. - */ - //##ModelId=3C4C18860315 - IMPORT_C void ConstructL(); - -private: // methods - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C18860314 - inline virtual void Reserved1(); - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C18860313 - inline virtual void Reserved2(); - }; - - -inline void CHeaderCodec::Reserved1() - {} -inline void CHeaderCodec::Reserved2() - {} -inline void CHeaderWriter::Reserved1() - {} -inline void CHeaderWriter::Reserved2() - {} -inline void CHeaderReader::Reserved1() - {} -inline void CHeaderReader::Reserved2() - {} - -#endif /* __CHEADERCODEC_H__ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/cprotocolhandler.h --- a/epoc32/include/http/framework/cprotocolhandler.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,555 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// please do not delete -// -// - - - -/** - @file CProtocolHandler.h - @warning : This file contains Rose Model ID comments -*/ - -#ifndef __CPROTOCOLHANDLER_H__ -#define __CPROTOCOLHANDLER_H__ - -// System includes -#include -#include -#include -#include - -// Forward declarations -class CHeaderCodec; -class CProtTransaction; -class CSecurityPolicy; -class MProtHandlerInterface; - -/** -The ECom protocol handler plugin interface UID. -@publishedAll -@released -*/ -const TUid KUidProtocolHandlerPluginInterface = {0x1000A449}; - -// -/** -Defined active object priorities for the Protocol Handler -@publishedAll -@released -*/ -const TInt KProtocolHandlerActivePriority = CActive::EPriorityStandard; -/** -Defined active object priorities for the Transaction -@publishedAll -@released -*/ -const TInt KTransactionActivePriority = KProtocolHandlerActivePriority+1; - - -//##ModelId=3C4C186A02A3 -class CProtocolHandler : public CActive, public MHTTPFilter -/** -An abstract protocol handler. Protocol handlers are required to -act as the bridge between abstract representations of sessions, transactions and -headers (the client side of the HTTP architecture) and specific comms transports -(the network side of the architecture). - -Each instance of a concrete subclass of CProtocolHandler is associated -with a specific client session, and hence with a particular choice of proxy type, -and by implication, transport type. It is designed to appear like a filter in -order to be placed at the end of a session's filter queue. This allows it to -receive transaction-related events in the same way that any other filter -(or indeed, the client) does. An active object, it may implement a queuing -system for submitted transactions, according to the chosen internal service -model. - -In order to divide the abstract functionality associated with handling the HTTP -protocol handler from the specifics needed for a particular choice of transport, -this class defines a number of pure virtual methods which allow it to defer -transport-specific choices or mechamisms. These are mainly concerned with the -service model (ie. allocation of transactions to objects that can handle them), the -codec model (ie. on-demand encoding/decoding of HTTP header data) and general -housekeeping (eg. instantiation and cleanup of objects at particular points in -a transaction lifecycle). -@publishedAll -@released -*/ - { -public: // Methods - -/** - Standard factory constructor. This is the ECOM interface class from - which concrete protocol handlers are derived. The method queries - ECOM for the protocol handler plugin that matches the protocol - description passed in. - @param aProtocol (in) The name of the protocol required. - @param aSession (in) The HTTP session on which this protocol handler - will be installed. - @leave KErrNoMemory if there was not enough memory to create the object. -*/ - //##ModelId=3C4C186B007E - static CProtocolHandler* NewL(const TDesC8& aProtocol, RHTTPSession aSession); - -/** - Intended Usage: Class destructor. -*/ - //##ModelId=3C4C186B0075 - IMPORT_C virtual ~CProtocolHandler(); - -/** - Obtain the protocol handler's header codec. - @return The header codec owned by this protocol handler, or NULL if one - has not yet been created. - @see CHeaderCodec -*/ - //##ModelId=3C4C186B0074 - IMPORT_C CHeaderCodec* Codec() const; - - -/** - Get the Server Certificate for the current session. - @return The certificate information or NULL if it is not available -*/ - IMPORT_C const CCertificate* SessionServerCert(); - -/** - Get the Server Certificate for the specified transaction. - @param aTransaction The transaction for which the certificate is requested - @return The certificate information or NULL if it is not available -*/ - IMPORT_C const CCertificate* TransactionServerCert( RHTTPTransaction aTransaction); - -public: // Methods to be implemented in specific protocol handlers - -/** - Intended Usage: Get the Server Certificate for the current session. - @param aServerCert A TCertInfo which will be filled with the certificate information - @return An error code. KErrNone if aServerCert has been completed, otherwise one of - the system wide error codes -*/ - virtual TInt SessionServerCert(TCertInfo& aServerCert) = 0; - -/** - Intended Usage: Get the Server Certificate for the specified transaction. - @param aServerCert A TCertInfo which will be filled with the certificate information - @param aTransaction The transaction for which the certificate is requested - @return An error code. KErrNone if aServerCert has been completed, otherwise one of - the system wide error codes -*/ - virtual TInt TransactionServerCert(TCertInfo& aServerCert, RHTTPTransaction aTransaction) = 0; - -public: // Methods from MHTTPFilterBase - -/** - Intended Usage: Called when the filter's registration conditions are satisfied for events that - occur on a transaction. Any Leaves must be handled by the appropriate MHFRunError. - Note that this function is not allowed to leave if called with certain events. - @see THTTPEvent - @param aTransaction The transaction that the event has occurred on. - @param aEvent aEvent The event that has occurred. - @leave Standard Symbian OS error codes. e.g. KErrNoMemory. - @see MHTTPFilterBase -*/ - //##ModelId=3C4C186B0061 - IMPORT_C virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent); - -/** - Intended Usage: Called when the filters registration conditions are satisfied for events that occur - on the session. Any leaves must be handled by the appropriate MHFRunError. - @param aEvent The session event that has occured. - @leave KErrNoMemory if an attempt to allocate memory has failed - @leave KErrHttpCantResetRequestBody if the request body needed to be rewound by the client - but it doesn't support this - @see MHTTPFilterBase -*/ - //##ModelId=3C4C186B0057 - IMPORT_C virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent); - -/** - Intended Usage: Called when RunL leaves from a transaction event. This works in the same - way as CActve::RunError; return KErrNone if you have handled the error. - If you don't completely handle the error, a panic will occur. - @param aError The leave code that RunL left with. - @param aTransaction The transaction that was being processed. - @param aEvent The Event that was being processed. - @return KErrNone if the error has been cancelled or the code - of the continuing error otherwise. - @see MHTTPFilterBase -*/ - //##ModelId=3C4C186B0043 - IMPORT_C virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent); - -/** - Intended Usage: Called when MHFRunL leaves from a session event. This works in the same - way as CActve::RunError. If you don't completely handle the error, a panic will occur. - @param aError The leave code that RunL left with. - @param aEvent The Event that was being processed. - @return KErrNone if the error has been cancelled or the code - of the continuing error otherwise. - @see MHTTPFilterBase -*/ - //##ModelId=3C4C186B0038 - IMPORT_C virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent); - -public: // Methods from MHTTPFilter - -/** - Intended Usage: Called when the filter is being removed from a session's filter queue. - @param aSession The session it's being removed from - @param aHandle The filter handle. Complex filters may need to - refer to this to keep track of which particular registration is - being unloaded. - @see MHTTFilter -*/ - //##ModelId=3C4C186B0025 - IMPORT_C virtual void MHFUnload(RHTTPSession aSession, THTTPFilterHandle aHandle); - -/** - Intended Usage: Called when the filter is being added to the session's filter queue. - @param aSession The session it's being added to. - @param aHandle The filter handle. Complex filters may need to keep - track of this, for instance if generating events in response to - external stimuli - @see MHTTFilter - */ - //##ModelId=3C4C186B001A - IMPORT_C virtual void MHFLoad(RHTTPSession aSession, THTTPFilterHandle aHandle); - -protected: // callbacks/methods for sub-classes - -/** - Callback method for concrete protocol handler sub-classes to - inform the base protocol handler that a transaction has completed. - The concrete protocol handler must call this method in order to - supply a completion event that will be sent to the client. - In addition, the method allows the base protocol handler to do some - queue management. - @param aTrans (in) the completed transaction - @param aEventStatus (in) an event to be sent back to the client along - the filter queue - @leave THTTPPanic::EInvalidFilterHandle if unable to send event. - */ - //##ModelId=3C4C186B0010 - IMPORT_C void TransactionCompletedL(RHTTPTransaction aTrans, THTTPEvent aEventStatus); - -/** - Obtain the number of currently active transactions - @return The number of currently active transactions - */ - //##ModelId=3C4C186B0006 - IMPORT_C TInt NumActiveTransactions() const; - -/** - Callback method for concrete protocol handler sub-classes to - inform the base protocol handler that a transaction has failed - utterly. (i.e. the sub-class used aTrans.Fail().) The base protocol - handler sets the transaction state to be cancelled. - @param aTrans (in) the completed transaction - */ - //##ModelId=3C4C186A03E5 - IMPORT_C void TransactionFailed(RHTTPTransaction aTrans); - -/** - Completes this active object - allows the protocol handler to - reevaluate the queue of pending transactions and service new ones - if possible. - */ - //##ModelId=3C4C186A03E4 - IMPORT_C void CompleteSelf(); - -/** - Searches the array of CProtTransaction objects to if the - aTransaction object is wrapped by one of them. If one is found aProtTransaction is set to it - @param aTransaction The transaction to search for. - @param aProtTransaction Reference to a CProtTransaction which will be set to the - CProtTransaction which wraps the RHTTPTransaction. - @return If a CProtTransaction object is found, a positive value is - returned that is the index to that object in the array. If - no object is found, KErrNotFound is returned. - */ - IMPORT_C TInt FindTransaction(RHTTPTransaction aTransaction, const CProtTransaction*& aProtTransaction) const; - -private: // methods to be implemented in specific protocol handlers - -/** Intended usage: Creates the specific type of codec required for a specific type - of protocol handler. - - This must be implemented by a concrete protocol handler sub-class. - */ - //##ModelId=3C4C186A03DC - virtual void CreateCodecL() = 0; - -/** Intended Usage: Creates a representation of a client transaction to be used in the - protocol handler. Since the protocol handler deals with the low- - level data for a transaction as sent over a particular transport, - an appropriate CProtTransaction-derived class is used that owns a - CRxData and a CTxData to handle the low-level data. - - This must be implemented by a concrete protocol handler sub-class. - @leave KErrNoMemory if there was not enough memory to create the object. - create the object. - @param aTransaction The RHTTPTransaction object associated with - this CProtTransaction object. - @return A pointer to a created CProtTransaction-derived class. - @see CRxData - @see CTxData - */ - //##ModelId=3C4C186A03DA - virtual CProtTransaction* CreateProtTransactionL(RHTTPTransaction aTransaction) = 0; - -/** Intended Usage: Attempt to service the transaction. This implies that the concrete - protocol handler will allocate some transport resources to the - transaction - which could fail if the protocol handler has hit an - internal limit of resources or bandwidth. - Implementations of this interface may leave with any of KErrHttpInvalidUri, - KErrGeneral, KErrNoMemory - - This must be implemented by a concrete protocol handler sub-class. - @param aTrans The pending protocol transaction object which is to be - serviced. - @return A flag that indicates if the transaction can be serviced immediately. - */ - //##ModelId=3C4C186A03D0 - virtual TBool ServiceL(CProtTransaction& aTrans) = 0; - -/** Intended Usage: Called when the RHTTPTransaction object corresponding to aTrans has - been closed by the client. This allows the concrete protocol handler - to do any cleanup required for this particular transaction. - - Ownership of the CProtTransaction object is transferred back to the - concrete protocol handler, which then has deletion responsibility - for it. By the time this function has been called, the base - protocol handler will have dequeued the transaction. - - The client's RHTTPTransaction will be closed when this function - returns, so it is not possible to send events to the client during - the function's execution. - - This must be implemented by a concrete protocol handler sub-class. - @param aTrans (in) A pointer to the transaction about to be closed. - */ - //##ModelId=3C4C186A03C6 - virtual void ClosedTransactionHook(CProtTransaction* aTrans) = 0; - -/** Intended Usage: Called when the RHTTPTransaction object corresponding to aTrans has - been cancelled by the client or an intermediate filter. This allows - the concrete protocol handler to do any cleanup and to perform the - necessary actions for cancellation on its transport layer. - - This must be implemented by a concrete protocol handler sub-class. - @param aTrans (in) A reference to the transaction being cancelled. - */ - //##ModelId=3C4C186A03B3 - virtual void CancelTransactionHook(CProtTransaction& aTransaction) = 0; - -/** Intended Usage: Called to notify the concrete protocol handler that new request - body data is available for transmission. - - This must be implemented by a concrete protocol handler sub-class. - @param aTrans (in) A reference to the transaction whose request body - has new data available. - */ - //##ModelId=3C4C186A03A8 - virtual void NotifyNewRequestBodyPart(CProtTransaction& aTransaction) = 0; - -protected: // Methods inherited from CActive - -/** Intended Usage: Do some processing when a previous asynchronous request made by - this object has completed. - */ - //##ModelId=3C4C186A0377 - IMPORT_C virtual void RunL(); - -/** Intended Usage: Do any cleanup required should RunL leave - @param aError (in) The error code that RunL left with - @return A final error code - KErrNone if the error was handled by this - method. - */ - //##ModelId=3C4C186A036E - IMPORT_C virtual TInt RunError(TInt aError); - -/** Intended Usage: Cancel outstanding asynchronous requests that this object has made - */ - //##ModelId=3C4C186A036D - IMPORT_C virtual void DoCancel(); - -protected: // Methods - -/** - Constructs a protocol handler associated with the supplied HTTP - client session. - @param aSession (in) The session on which the new protocol handler will - be installed. - */ - IMPORT_C CProtocolHandler(RHTTPSession aSession); - -/** - Second phase construction in which any necessary allocation is done - Implementations of this interface may leave with KErrNoMemory - @param aSession The HTTP session on which this protocol handler - will be installed. - */ - //##ModelId=3C4C186A036C - IMPORT_C void ConstructL(RHTTPSession aSession); - -protected: // Attributes - - /** The session to which this protocol handler is dedicated - */ - //##ModelId=3C4C186A033C - RHTTPSession iSession; - - /** The codec used for this protocol handler (to be specialised in subclasses) - */ - //##ModelId=3C4C186A032F - CHeaderCodec* iCodec; - - /** HTTP logger handle (debug only) - */ - __DECLARE_LOG - - /** An interface providing the security policy. This may be NULL if there is no security policy plugin */ - //##ModelId=3C4C186A031D - CSecurityPolicy* iSecurityPolicy; - -private: // Methods - -/** - Called after a client RHTTPTransaction::SubmitL(), this method - enqueues the supplied client transaction. It checks to see if there - already exists a CProtTransaction for this transaction. If there is - and its state is ECancelled, then the associated request data is - reset and the state changed to EPending. A CompleteSelf() is issued. - In the case of an existing CProtTransaction that has not been - cancelled, the submit event is ignored. If no CProtTransaction - object existed, then one is created for the transaction and a - CompleteSelf() is issued. - @leave KErrHttpCantResetRequestBody if the request body data cannot - be reset. KErrNoMemory if a new CProtTransaction cannot be - created or added to the transaction queue. - @param aTransaction The submitted transaction. - @pre None - @post If there is a new pending CProtTransaction object the protocol - handler will have been self-completed (i.e. the RunL will be - called). - */ - //##ModelId=3C4C186A0362 - void SubmitTransactionL(RHTTPTransaction aTransaction); - -/** - Sets the state of the CProtTransaction object for this - transaction to ECancelled, and resets the object. This - object can be reused if the transaction is resubmitted. - @param RHTTPTransaction aTrans - @pre A CProtTransaction object exists for this transaction. - @post The state of the CProtTransaction object is set to ECancelled - and it has been reset. - */ - //##ModelId=3C4C186A0359 - void HandleCancelTransaction(RHTTPTransaction aTrans); - -/** - Removes the CProtTransaction object for the transaction - from the queue of CProtTransaction objects. - @param RHTTPTransaction aTrans - @pre A CProtTransaction object exists for this transaction. - @post The CProtTransaction object has been removed from the queue. - */ - //##ModelId=3C4C186A034F - void HandleClosedTransaction(RHTTPTransaction aTrans); - -/** - Searches the array of CProtTransaction objects to if the - aTransaction object is wrapped by one of them. - @param aTransaction The transaction to search for. - @return If a CProtTransaction object is found, a positive value is - returned that is the index to that object in the array. If - no object is found, KErrNotFound is returned. - */ - //##ModelId=3C4C186A0346 - TInt FindTransaction(RHTTPTransaction aTransaction) const; - -protected: -/** - Intended Usage: This is a mechanism for allowing future change to CProtocolHandler API - without breaking BC. - @param aInterfaceId the UID of the API function being called. - @param aInterfacePtr reference to pointer to actual function implementation (in the derived class) - */ - inline virtual void GetInterfaceL(TUid aInterfaceId, MProtHandlerInterface*& aInterfacePtr); - -public: -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C186A0344 - inline virtual void Reserved2(); - - -private: // Attributes - - /** A list of transactions. Each transaction has a list state, e.g. pending, - active, etc. - */ - //##ModelId=3C4C186A0313 - RPointerArray iTransactions; - - /** The transaction which is currently being serviced - used in RunError so - we know which transaction caused RunL to leave. - */ - //##ModelId=3C4C186A02FF - RHTTPTransaction iCurrentTransaction; - - /** The destructor key UID indentification required by ECom - */ - //##ModelId=3C4C186A02F5 - TUid iDtor_ID_Key; - }; - - - -/** -Interface for adding to ProtocolHandler API -@publishedAll -@released -*/ - -const TInt KProtHandlerSessionServerCertUid = 0x1028180D; -const TInt KProtHandlerTransactionServerCertUid = 0x1028180E; - -class MProtHandlerInterface - { -public: - /** - Intended Usage: Get the Server Certificate for the current session. - @return The certificate information or NULL if it is not available - */ - virtual const CCertificate* SessionServerCert() = 0; - - /** - Intended Usage: Get the Server Certificate for the specified transaction. - @param aTransaction The transaction for which the certificate is requested - @return The certificate information or NULL if it is not available - */ - virtual const CCertificate* TransactionServerCert( RHTTPTransaction aTransaction) = 0; - }; - -inline void CProtocolHandler::GetInterfaceL(TUid, MProtHandlerInterface*&) - {} - -inline void CProtocolHandler::Reserved2() - {} - -#endif // __CPROTOCOLHANDLER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/cprottransaction.h --- a/epoc32/include/http/framework/cprottransaction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,210 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CProtTransaction.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CPROTTRANSACTION_H__ -#define __CPROTTRANSACTION_H__ - -// System includes -#include -#include - -// Forward declarations -class CTxData; -class CRxData; -class MRxDataObserver; - - -//##ModelId=3B1E52B30382 -class CProtTransaction : public CBase -/** -A representation of a transaction used by protocol handlers. -This class is lower-level than the RHTTPTransaction class, -since it owns objects that represent the request and response data as -transmitted and received over a transport medium. -@publishedAll -@released -*/ - { -public: // Enums - -/** The TTransactionState type defines the states of a transaction. -*/ - enum TTransactionState - { - /** Specifies that the transaction is pending servicing. - */ - EPending = 0, - /** Specifies that the transaction is being serviced - active. - */ - EActive, - /** Specifies that the transaction has been cancelled. - */ - ECancelled, - /** Specifies that the transaction has completed. - */ - ECompleted - }; - -public: - -/** - Intended Usage: Destructor - cleans up and releases resources to the system -*/ - //##ModelId=3B1E52B40031 - IMPORT_C virtual ~CProtTransaction(); - -public: // accessors - -/** - Provides the state of the transaction, e.g. pending, - active, etc. - @return A enum specifying the state of the transaction. -*/ - //##ModelId=3C4C37E50306 - TTransactionState TransactionState() const; - -/** - Sets the state of the transaction. - @param aState The state that the transaction is in. - @post The state of the transaction has been updated. -*/ - //##ModelId=3C4C37E502D4 - void SetTransactionState(TTransactionState aState); - -/** - Resets the Rx data object. The Rx data object must be - created again to be used. - @post The Rx data objects has been reset. -*/ - //##ModelId=3C4C37E502CA - IMPORT_C void ResetRxData(); - -/** - Resets the Tx data object. The Tx data object must be - created again to be used. - @post The Tx data objects has been reset. -*/ - //##ModelId=3C4C37E502C0 - IMPORT_C void ResetTxData(); - -/** - Obtain the API-level transaction to which this object - corresponds to. - @return The API-level transaction that this object corresponds to. -*/ - //##ModelId=3B1E52B40013 - IMPORT_C RHTTPTransaction Transaction() const; - -/** - Obtain the Transmit Data portion of the transaction. - @return A reference to the Tx data object of the transaction. -*/ - //##ModelId=3B1E52B40012 - IMPORT_C CTxData& TxData() const; - -/** - Obtain the Receive Data portion of the transaction. - @return A reference to the Rx data object of the transaction. -*/ - //##ModelId=3B1E52B40009 - IMPORT_C CRxData& RxData() const; - -public: // Methods to be implemented by derived classes - -/** - Intended Usage: Creates the appropriate CTxData object. - @leave KErrNoMemory if there is not enough memory available to - create the object. -*/ - //##ModelId=3C4C37E502AC - virtual void CreateTxDataL() =0; - -/** - Intended Usage: Creates the appropriate CRxData object. - @leave KErrNoMemory if there is not enough memory available to - create the object. - @param aObserver A reference to the observer for the Rx data object. -*/ - //##ModelId=3C4C37E50284 - virtual void CreateRxDataL(MRxDataObserver& aObserver) =0; - -protected: // Methods - -/** - Default constructor -*/ - //##ModelId=3B1E52B303E6 - CProtTransaction(); - -/** - Normal constructor, of a CProtTransaction that corresponds to the - supplied client transaction handle. - @param aTrans (in) The client transaction handle. -*/ - //##ModelId=3B1E52B303E7 - IMPORT_C CProtTransaction(RHTTPTransaction aTrans); - -protected: // Attributes - - /** The client transaction - */ - //##ModelId=3B1E52B303D4 - RHTTPTransaction iTrans; - - /** The transmission data - */ - //##ModelId=3B1E52B303CA - CTxData* iTxData; - - /** The received data - */ - //##ModelId=3B1E52B303C0 - CRxData* iRxData; - - /** Transaction state indicator. - */ - //##ModelId=3C4C37E50247 - TTransactionState iTransactionState; - -private: // methods - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37E5026F - inline virtual void Reserved1(); - -/** - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37E50251 - inline virtual void Reserved2(); - }; - - -inline void CProtTransaction::Reserved1() - {} -inline void CProtTransaction::Reserved2() - {} - - -#endif // __CPROTTRANSACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/crxdata.h --- a/epoc32/include/http/framework/crxdata.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,127 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CRxData.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CRXDATA_H__ -#define __CRXDATA_H__ - -// System includes -#include -#include -#include -#include // this include is needed to ensure that the is compiled by gcc... - -// Forward declarations -class MRxDataObserver; - - -//##ModelId=3B1E52AB0087 -class CRxData : public CBase, public MHTTPDataSupplier -/** -An abstract base class for the decoding of response data received by a -protocol handler. -@publishedAll -@released -*/ - { -public: - -/** Intended Usage: Destructor - cleans up and releases resources to the system -*/ - IMPORT_C - //##ModelId=3B1E52AB00ED - virtual ~CRxData(); - -/** Intended Usage: Obtain the protocol transaction whose request part is represented - as encoded data by this object. - @return The protocol transaction object -*/ - IMPORT_C - //##ModelId=3B1E52AB00EC - CProtTransaction& ProtTrans(); - -public: - -/** Intended Usage: Resets the received data object to its initial state following - construction. This method must be implemented for specific sub- - classes of received data. - @post The object is reset. -*/ - //##ModelId=3BA60048014B - virtual void ResetRxData() = 0; - -protected: - -/** Intended Usage: Default constructor - creates an Rx data object not associated - with any protocol transaction. -*/ - IMPORT_C - //##ModelId=3A914E5F008F - CRxData(); - -/** Intended Usage: Normal constructor, of a CRxData that corresponds to the supplied - protocol transaction, and which sends status updates to the supplied - observer interface, - @param aProtTrans (in) The transaction for which this object - represents the transmitted data. - @param aObserver (in) The object's observer. -*/ - IMPORT_C CRxData(CProtTransaction& aProtTrans, MRxDataObserver& aObserver); - -/** Intended Usage: Second phase construction, default -*/ - IMPORT_C - //##ModelId=3B1E52AB00BA - void ConstructL(); - -protected: - - /** The protocol transaction for which this object represents the encoded received data - */ - //##ModelId=3B1E52AB00B2 - CProtTransaction* iProtTrans; - - /** This object's observer, to whom we forward status information - */ - //##ModelId=3B1E7738028B - MRxDataObserver* iObserver; - -private: // methods - -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37DA0007 - inline virtual void Reserved1(); - -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37D903DB - inline virtual void Reserved2(); - }; - - -inline void CRxData::Reserved1() - {} -inline void CRxData::Reserved2() - {} - - -#endif // __CRXDATA_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/csecuritypolicy.h --- a/epoc32/include/http/framework/csecuritypolicy.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file csecuritypolicy.h - @warning : This file may contain Rose Model ID comments - please do not delete -*/ - -#ifndef __CSECURITYPOLICY_H__ -#define __CSECURITYPOLICY_H__ - -// System includes -#include -#include -#include -#include -#include - - -//##ModelId=3C4C37E401CE -class MSecurityPolicy -/** -The Security Policy Interface. This interface class must be the base -class of a security policy plug-in. -@publishedAll -@released -*/ - { -public: - -/** Intended Usage: Ask the client to accept or reject a certificate. Not - applicable to TLS, as the SSL layer does this itself. - The call is asynchronous, returning the result via the TRequestStatus. - @param aServerCert (in) A structure containing the certificate details. - @param aStatus (out) A status flag used to indicate errors. A value of 0 is used to indicate - that the cert is untrusted and 1 that it is trusted -*/ - //##ModelId=3C4C37E4020B - virtual void ValidateUntrustedServerCert(TCertInfo& aServerCert, TRequestStatus& aStatus) const = 0; - -/** Intended Usage: Cancel a previous request to ask the client to accept or reject - an untrusted WTLS server certificate. -*/ - //##ModelId=3C4C37E4020A - virtual void CancelValidateUntrustedServerCert() = 0; - - -/** Intended Usage: Obtain an array of WTLS cipher suites. Not applicable to TLS clients. - @return An array of cipher suites, consisting of paired bulk encryption - algorithms and MAC algorithms. The array must be ordered with - strongest cipher suites at the start. -*/ - //##ModelId=3C4C37E40201 - virtual const RArray& GetWtlsCipherSuites() =0; - -/** Intended Usage: Obtain a list of TLS cipher suites. Not applicable to WTLS - clients. - @return An descriptor containing a list of the TLS cipher suites. Each cipher suite is a 2 byte pair -*/ - //##ModelId=3C4C37E40200 - virtual const TDesC8& GetTlsCipherSuites() = 0; - -/** Intended Usage: Obtain the WTLS key exchange suites. Not applicable - to TLS clients. - @return An array of the WTLS key exchange suites. The array must be ordered - with authenticating key exchange suites at the start followed by - anonymous key exchange suites if desired. Within each group of keys - longer keys should precede shorter ones. -*/ - //##ModelId=3C4C37E401FA - virtual const RArray& GetWtlsKeyExchangeSuites() = 0; - -/** Intended Usage: Obtain arbitrary, named security policy properties, in a generic - 'stringified' form. - @param aPropertyName (in) The policy property name. - @param aPropertyValue (out) The property value. Parsing of the value is - left to the caller. The caller must close the - RString. - @return An error code: KErrNone if the property exists or KErrNotFound if - it doesn't. -*/ - //##ModelId=3C4C37E401F7 - virtual TInt GetNamedPolicyProperty(RStringF aPropertyName, RString& aPropertyValue) = 0; - -protected: -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37E401F6 - virtual void Reserved1() =0; - -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37E401EC - virtual void Reserved2() =0; - }; - -//##ModelId=3C4C37C50300 -class CSecurityPolicy : public CBase, public MSecurityPolicy -/** -The Security Policy Plug-in API. This ECOM interface class must be implemented -by each instance of a security policy plug-in. -@publishedAll -@released -*/ - { -public: // methods - -/** Intended Usage: Factory construction - instantiates the plug-in. - @param aStringPool (in) An open string pool reference that can be used by the plugin. - @return The constructed plug-in. -*/ - //##ModelId=3C4C37C503C8 - inline static CSecurityPolicy* NewL(RStringPool aStringPool); - -/** Intended Usage: Class destructor. -*/ - //##ModelId=3C4C37C503BE - inline virtual ~CSecurityPolicy(); - - -protected: // methods - -/** Intended Usage: Normal constructor. Creates an instance of the plug-in base. - @param aStrPool (in) An open string pool reference that can be used by the plugin. - @return The constructed plug-in base. -*/ - //##ModelId=3C4C37C503B5 - inline CSecurityPolicy(RStringPool aStrPool); - - -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37C503B4 - inline virtual void Reserved1(); - -/** Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37C503AD - inline virtual void Reserved2(); - -protected: // attributes - - /** The stringpool reference - */ - //##ModelId=3C4C37C503AA - RStringPool iStrPool; - -private: // attributes - - /** D'tor Key identification required for ECOM - @internalAll - */ - //##ModelId=3C4C37C50396 - TUid iDtor_ID_Key; - }; - -#include - -#endif // __CSECURITYPOLICY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/csecuritypolicy.inl --- a/epoc32/include/http/framework/csecuritypolicy.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CSecurityPolicy.inl - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CSECURITYPOLICY_INL__ -#define __CSECURITYPOLICY_INL__ - - -inline CSecurityPolicy* CSecurityPolicy::NewL(RStringPool aStringPool) - { - _LIT8(KDataTypeName, "security-policy"); - - // CSecurityPolicy ECOM Interface UID = 101F4485 - const TUid KUidSecPolInterface = {0x101F4485}; - - // Set up the parameters which allow ECOM's resolver to pick the right implementation - TEComResolverParams resParams; - resParams.SetDataType(KDataTypeName()); - - // Get the instantiation. Allow ECOM to use the default resolver. Pass in the init params. - TAny* ptr = REComSession::CreateImplementationL(KUidSecPolInterface, - _FOFF(CSecurityPolicy, iDtor_ID_Key), - &aStringPool, - resParams); - - return REINTERPRET_CAST(CSecurityPolicy*, ptr); - } - -inline CSecurityPolicy::~CSecurityPolicy() - { - REComSession::DestroyedImplementation(iDtor_ID_Key); - } - -inline CSecurityPolicy::CSecurityPolicy(RStringPool aStrPool) - : iStrPool(aStrPool) - { - } - - - -inline void CSecurityPolicy::Reserved1() - {} -inline void CSecurityPolicy::Reserved2() - {} - - -#endif // __CSECURITYPOLICY_INL__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/ctxdata.h --- a/epoc32/include/http/framework/ctxdata.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file CTxData.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __CTXDATA_H__ -#define __CTXDATA_H__ - -// System includes -#include -#include -#include -#include // this include is needed to ensure that the is compiled by gcc... - - -//##ModelId=3B1E52A8001F -class CTxData : public CBase, public MHTTPDataSupplier -/** -An abstract base class for the encoding of request data to be transmitted by a -protocol handler. -@publishedAll -@released -*/ - { -public: // methods - -/** @fn ~CTxData() - Intended Usage: Destructor - cleans up and releases resources to the system -*/ - IMPORT_C - //##ModelId=3B1E52A80051 - virtual ~CTxData(); - -/** @fn CProtTransaction& ProtTrans() - Intended Usage: Obtain the protocol transaction whose request part is represented - as encoded data by this object. - @return The protocol transaction object -*/ - IMPORT_C - //##ModelId=3B1E52A80049 - CProtTransaction& ProtTrans(); - -protected: - -/** @fn CTxData() - Intended Usage: Default constructor - creates a Tx data object not associated - with any protocol transaction. -*/ - IMPORT_C - //##ModelId=3A925A44019E - CTxData(); - -/** @fn CTxData(CProtTransaction& aProtTransaction) - Intended Usage: Normal constructor, of a CTxData that corresponds to the supplied - protocol transaction. - @param aProtTransaction (in) The transaction for which this object - represents the transmitted data. -*/ - IMPORT_C CTxData(CProtTransaction& aProtTransaction); - -/** @fn ConstructL() - Intended Usage: Second phase construction, default -*/ - IMPORT_C - //##ModelId=3B1E52A8003D - void ConstructL(); - -protected: // attributes - - /** The HTTP transaction from whose request this OTA transmission data is built. - Note that the transaction is not owned by this object. - */ - //##ModelId=3B1E52A80035 - CProtTransaction* iProtTrans; - -private: // methods - -/** @fn Reserved1() - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37D6010F - inline virtual void Reserved1(); - -/** @fn Reserved2() - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37D600FB - inline virtual void Reserved2(); - }; - - -inline void CTxData::Reserved1() - {} -inline void CTxData::Reserved2() - {} - - -#endif // __CTXDATA_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/mrxdataobserver.h --- a/epoc32/include/http/framework/mrxdataobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MRxDataObserver.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MRXDATAOBSERVER_H__ -#define __MRXDATAOBSERVER_H__ - -// System includes -#include - -// Forward declarations -class CRxData; - - -//##ModelId=3A914E570296 -class MRxDataObserver -/** -An interface to be implemented by classes that wish to receive status information -from an implementation of the CRxData class. -@publishedAll -@released -*/ - { -public: -/** @fn void SetStatusL(CRxData& aRxData, TInt aStatus) - Intended Usage: Receive a status message from the object that processes received - data in a protocol handler. - @param aRxData The object which is processing the data. - @param aStatus The status (or error) code. -*/ - //##ModelId=3B1E6B5800E5 - virtual void SetStatusL(CRxData& aRxData, TInt aStatus) =0; - -private: // methods - -/** @fn Reserved1() - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37CE035D - inline virtual void MRDO_Reserved1(); - -/** @fn Reserved2() - Intended Usage: Reserve a slot in the v-table to preserve future BC - */ - //##ModelId=3C4C37CE0349 - inline virtual void MRDO_Reserved2(); - }; - - -inline void MRxDataObserver::MRDO_Reserved1() - {} -inline void MRxDataObserver::MRDO_Reserved2() - {} - -#endif // __MRXDATAOBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/framework/rheaderfield.h --- a/epoc32/include/http/framework/rheaderfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHeaderField.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHEADERFIELD_H__ -#define __RHEADERFIELD_H__ - -// System includes -#include -#include -#include -#include - -// Forward declarations -class CHeaderField; -class THeaderFieldPartIter; - - -/** -The default chunk size for Raw data should be set to the average length of a header field when encoded in -plaintext. -@publishedAll -@released -*/ -const TInt KDefaultRawChunkSize= 32; - - -//##ModelId=3B1E52A50396 -class RHeaderField -/** -An proxy object for a single field in an HTTP header. The class is used by -implementations of CHeaderCodec in order to manipulate the header at the part and -parameter level, or to obtain raw data, during a header encode/decode operation. -@publishedAll -@released -*/ - { -public: // methods - - //##ModelId=3BA6004002BC - RHeaderField(CHeaderField& aHeaderField); - - IMPORT_C - //##ModelId=3B1E52A503C0 - RStringF Name() const; - - IMPORT_C - //##ModelId=3B1E52A503BF - THeaderFieldPartIter PartsL(); - - IMPORT_C - //##ModelId=3B1E52A503B9 - void RawDataL(TPtrC8& aRawData); - - IMPORT_C - //##ModelId=3BA6004002B2 - RHTTPHeaders Collection(); - - IMPORT_C - //##ModelId=3B1E52A503B6 - void SetPartL(CHeaderFieldPart* aPart, TInt aIndex); - - IMPORT_C - //##ModelId=3B1E52A503B4 - void BeginRawDataL(TInt aChunkSize = KDefaultRawChunkSize); - - IMPORT_C - //##ModelId=3B1E52A503AB - void WriteRawDataL(const TDesC8& aData); - - IMPORT_C - //##ModelId=3B1E52A503AD - void WriteRawDataL(TChar aData); - - IMPORT_C - //##ModelId=3B1E52A503AA - void CommitRawData(); - -private: // attributes - - /** The internal representation of this header field - */ - //##ModelId=3B1E52A503A2 - CHeaderField& iHeaderField; -}; - -inline RHeaderField::RHeaderField(CHeaderField& aHeaderField) - : iHeaderField(aHeaderField) - { - } - -#endif // __CHEADERFIELD_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttpauthenticationcallback.h --- a/epoc32/include/http/mhttpauthenticationcallback.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPAuthenticationCallback.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPAUTHENTICATIONCALLBACK_H__ -#define __MHTTPAUTHENTICATIONCALLBACK_H__ - -// System includes -#include -#include -#include -#include - - -//##ModelId=3B1E52A50151 -class MHTTPAuthenticationCallback -/** -The mixin that needs to be implemented if authentication is to be -supported. This supplies the username and password when they are -needed for authentication. -To use, subclass off this class and implement GetCredentialsL. To install -the class into a session, call InstallAuthenticationL. -@publishedAll -@released -*/ - { - public: - /** Gets some credentials. Note that the first 3 parameters are - informational and many clients may not have a use for - them. Clients may want to display some or all of these - parameters to the user, so that the user knows who they are - giving their credentials to, and how securely they will be - transmitted. - @param aURI The URI being requested - @param aRealm The realm being requested - @param aAuthenticationType The type of authentication (basic or digest) - @param aUsername The username is returned in this parameter. - The caller will close the returned string. - @param aPassword The password is returned in this parameter - The caller will close the returned string. - @return True if credentials have been obtained. - @leave Anything. If this function leaves the transaction will be - failed. - */ - //##ModelId=3B1E52A5015D - virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, - RStringF aAuthenticationType, - RString& aUsername, - RString& aPassword) = 0; - - /** Installs the callback into the session. - Typicaly called from the implementation class's ConstructL(). - @pre The session is opened, but no transactions have been created on it - @post The session supports authentication, and uses this API to - get its credentials. - @param aSession the session to install the filter into. - @leave KErrNoMemory There was not enough memory. - */ - //##ModelId=3B1E52A5015B - inline void InstallAuthenticationL(RHTTPSession aSession); - }; - -inline void MHTTPAuthenticationCallback::InstallAuthenticationL(RHTTPSession aSession) - { - CAuthenticationFilterInterface::InstallFilterL(aSession, this); - } - - -#endif // __MHTTPAUTHENTICATIONCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttpdatasupplier.h --- a/epoc32/include/http/mhttpdatasupplier.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPDataSupplier.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPDATASUPPLIER_H__ -#define __MHTTPDATASUPPLIER_H__ - -// System includes -#include - - -//##ModelId=3C4C187903E5 -class MHTTPDataSupplier -/** -A data supplier - This class is used to deliver the response data -to the client, and is also used by the client to supply request -body data to HTTP in POST transactions. Data is supplied in a -number of parts. When a part is available it can be retreived -with GetNextDataPart. The returned descriptor will remain valid until -ReleaseData is called. - -To use this class to supply POST data, you have a number of -options. If the post data needs to be URL Form encoded, you should -use CHTTPFormEncoder, which will do the encoding and interface to -the MHTTPDataSupplier for you. If you have all the data available, -return its length in OverallDataSize, and pass back all the data -from GetNextDataPart, returning ETrue to indicate that this is the -last part. - -If you don't want to form all the data at once, but know how much -you'll eventualy have, return the total length from -OverallDataSize. When GetNextDataPart is first called, return the -first part. If GetNextDataPart is called again before ReleaseData, -you should still return the first part. Only when ReleaseData is -called should you move to the second part. If you don't know the -total size of the data, the procedure is the same but you should -return KErrNotFound from OverallDataSize. - -When the next part is available, clients should call -RHTTPTransaction::NotifyNewRequestBodyPartL to inform HTTP that -the new data is available. They can do this from ReleaseData if -more data is instantly available, or in some applications they may -need to call it some time later when the next part has been -assembled. - -Filter writers should note that the MHTTPDataSupplier interface is -designed to be used by 1 client, as 1 component needs to know when -to call ReleaseData(). However, filters can be written to -transform the data in some way. For instance, a filter could be -written to automaticaly handle a particular content encoding. When -this filter first receives a GotResponseBodyData, it should take a -copy of the response's body and replace the body with a -MHTTPDataSupplier supplied by the filter. The filter should then -receive the data from HTTP via the saved data supplier and give it -to the client via its own data supplier. -@publishedAll -@released -*/ - { - public: - /** Obtain a data part from the supplier. The data is guaranteed - to survive until a call is made to ReleaseData(). - @param aDataPart - the data part - @return ETrue if this is the last part. EFalse otherwise */ - //##ModelId=3C4C187A0026 - virtual TBool GetNextDataPart(TPtrC8& aDataPart) = 0; - - /** Release the current data part being held at the data - supplier. This call indicates to the supplier that the part - is no longer needed, and another one can be supplied, if - appropriate. */ - //##ModelId=3C4C187A0025 - virtual void ReleaseData() = 0; - - /** Obtain the overall size of the data being supplied, if known - to the supplier. Where a body of data is supplied in several - parts this size will be the sum of all the part sizes. If - the size is not known, KErrNotFound is returned; in this case - the client must use the return code of GetNextDataPart to find - out when the data is complete. - - @return A size in bytes, or KErrNotFound if the size is not known. */ - //##ModelId=3C4C187A001D - virtual TInt OverallDataSize() = 0; - - /** Reset the data supplier. This indicates to the data supplier that it should - return to the first part of the data. This could be used in a situation where - the data consumer has encountered an error and needs the data to be supplied - afresh. Even if the last part has been supplied (i.e. GetNextDataPart has - returned ETrue), the data supplier should reset to the first part. - - If the supplier cannot reset it should return an error code; otherwise it should - return KErrNone, where the reset will be assumed to have succeeded*/ - //##ModelId=3C4C187A001C - virtual TInt Reset() = 0; - -private: - // Some reserved methods for future expansion (e.g. better support - // for ZCD) - //##ModelId=3C4C187A001B - inline virtual void MHDS_Reserved1(); - //##ModelId=3C4C187A0012 - inline virtual void MHDS_Reserved2(); - //##ModelId=3C4C187A0011 - inline virtual void MHDS_Reserved3(); - }; - -inline void MHTTPDataSupplier::MHDS_Reserved1() - {} - -inline void MHTTPDataSupplier::MHDS_Reserved2() - {} - -inline void MHTTPDataSupplier::MHDS_Reserved3() - {} - -#endif // __MHTTPDATASUPPLIER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttpfilter.h --- a/epoc32/include/http/mhttpfilter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPFilter.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPFILTER_H__ -#define __MHTTPFILTER_H__ - -// System includes -#include -#include -#include -#include - - -//##ModelId=3C4C187D03E1 -class MHTTPFilter : public MHTTPFilterBase -/** -A HTTP filter -@publishedAll -@released -*/ - { - public: - /** Called when the filter is being removed from a session's filter queue. - @param aSession The session it's being removed from - @param aHandle The filter handle. Complex filters may need to - refer to this to keep track of which particular registration is - being unloaded. - */ - //##ModelId=3C4C187E0011 - IMPORT_C virtual void MHFUnload(RHTTPSession aSession, - THTTPFilterHandle aHandle); - - /** Called when the filter is being added to the session's filter queue. - @param aSession The session it's being added to. - @param aHandle The filter handle. Complex filters may need to keep - track of this, for instance if generating events in response to - external stimuli - */ - //##ModelId=3C4C187E000E - IMPORT_C virtual void MHFLoad(RHTTPSession aSession, - THTTPFilterHandle aHandle); - public: - /** - @enum TPositions - Default filter positions - */ - enum TPositions - { - /** The Protocol Handler :- At the base of the filter chain - and nearest to the transport layer */ - EProtocolHandler = 0, - // Filters that should be downstream of any status-code related processing - /** Filters to handle caching behaviours.*/ - ECache = 100, - /** Filters to handle particular status codes. - e.g.Redirection and authentication. */ - EStatusCodeHandler = 200, - /** The UAProf filter. */ - EUAProf = 250, - /** The cookie filter, and other filters that don't need to be - concerned with resubmitting of transactions due to things - like redirection. */ - ECookies = 300, - /** The validation filter and any other final tidy up or - initial preprocessing of transactions*/ - ETidyUp = 400, - /** Client filters that assume all standard behaviour is - already there.*/ - EClientFilters = 500, - /** The client :- At the head of the filter chain : - No position above this must be used. */ - EClient = 1000 - }; - }; - -#endif // __MHTTPFILTER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttpfilterbase.h --- a/epoc32/include/http/mhttpfilterbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPFilterBase.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPFILTERBASE_H__ -#define __MHTTPFILTERBASE_H__ - -// System includes -#include - -// Forward declarations -class RHTTPTransaction; -class THTTPEvent; -class THTTPSessionEvent; - - -//##ModelId=3A914DF9034F -class MHTTPFilterBase -/** -A HTTP Filter. This is the base class for normal filters -(MHTTPFilter) which adds an unload function, and -MHTTPTransactionCallback, which doesn't add an unload function. -@publishedAll -@released -*/ - { -public: - /** Called when the filter's registration conditions are satisfied for events that - occur on a transaction. Any Leaves must be handled by the appropriate MHFRunError. - Note that this function is not allowed to leave if called with - certain events. @see THTTPEvent - @param aTransaction The transaction that the event has occurred on. - @param aEvent The event that has occurred. - */ - //##ModelId=3A914DF9035D - IMPORT_C virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent); - - /** Called when the filters registration conditions are satisfied for events that occur - on the session. Any leaves must be handled by the appropriate MHFRunError. - @param aEvent The session event that has occured. - */ - //##ModelId=3C4C37D401C1 - IMPORT_C virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent); - - /** Called when RunL leaves from a transaction event. This works in the same - way as CActve::RunError; return KErrNone if you have handled the error. - If you don't completely handle the error, a panic will occur. - @param aError The leave code that RunL left with. - @param aTransaction The transaction that was being processed. - @param aEvent The Event that was being processed. - @return KErrNone if the error has been cancelled or the code - of the continuing error otherwise. - */ - //##ModelId=3A914DF90359 - IMPORT_C virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent); - - /** Called when MHFRunL leaves from a session event. This works in the same - way as CActve::RunError - If you don't completely handle the error, a panic will occur. - @param aError The leave code that RunL left with. - @param aEvent The Event that was being processed. - @return KErrNone if the error has been cancelled or the code - of the continuing error otherwise. - */ - //##ModelId=3C4C37D302C4 - IMPORT_C virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent); - }; - - -#endif // __MHTTPFILTERBASE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttpfiltercreationcallback.h --- a/epoc32/include/http/mhttpfiltercreationcallback.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPFilterCreationCallback.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPFILTERCREATIONCALLBACK_H__ -#define __MHTTPFILTERCREATIONCALLBACK_H__ - -// Forward declarations -class TFilterConfigurationIterator; - - -//##ModelId=3C4C0F450132 -class MHTTPFilterCreationCallback -/** -This class serves as a pure virtual interface required as a session callback to the client -when the client requires to configure the filters that are installed. The session calls the -method in the interface when the construction of the session is complete. The callback passes -an object of CFilterConfigurationIterator that allows the client to configure the filters that -are installed. -@publishedAll -@released -*/ - { -public: // Methods - /** - @fn ConfigureSessionFiltersL(TFilterConfigurationIterator* aFilterConfigIter) = 0 - Intended Usage: Pure virtual that is called by the session when the session construction - is complete. This passes a CFilterConfigurationIterator back to the client - which allows the client to install or install selected filters. - @param aFilterConfigIter Pointer to the filter configuration iterator. Ownership of - CFilterConfigurationIterator remains with the session and is not transfered - @pre The session has been constructed - @post The filters that are installed are have been configured by the client - */ - //##ModelId=3C4C0F450150 - virtual void ConfigureSessionFiltersL(TFilterConfigurationIterator* aFilterConfigIter) = 0; - }; - -#endif // __MHTTPFILTERCREATIONCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttpsessioneventcallback.h --- a/epoc32/include/http/mhttpsessioneventcallback.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPSessionEventCallback.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPSESSIONEVENTCALLBACK_H__ -#define __MHTTPSESSIONEVENTCALLBACK_H__ - -// System includes -#include -#include -#include - - -//##ModelId=3C4C0F460242 -class MHTTPSessionEventCallback -/** -The per-session callback for receiving session event callbacks. -@publishedAll -@released -*/ - { -public: // Methods - - /** Called when the filters registration conditions are satisfied for events that occur - on the session. Any leaves must be handled by the appropriate MHFRunError. - @param aEvent The session event that has occured. - */ - //##ModelId=3C4C0F460262 - virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent) =0; - - /** Called when MHFRunL leaves from a session event. This works in the same - way as CActve::RunError - If you don't completely handle the error, a panic will occur. - @param aError The leave code that RunL left with. - @param aEvent The Event that was being processed. - @return KErrNone if the error has been cancelled or the code - of the continuing error otherwise. - */ - //##ModelId=3C4C0F460256 - virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent) =0; - }; - - -#endif // __MHTTPSESSIONEVENTCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/mhttptransactioncallback.h --- a/epoc32/include/http/mhttptransactioncallback.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file MHTTPTransactionCallback.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __MHTTPTRANSACTIONCALLBACK_H__ -#define __MHTTPTRANSACTIONCALLBACK_H__ - -// System includes -#include -#include -#include - - -//##ModelId=3C4C1886022B -class MHTTPTransactionCallback -/** -The per-transaction callback for receiving HTTP events. -@publishedAll -@released -*/ - { -public: // Methods - - /** Called when the filter's registration conditions are satisfied for events that - occur on a transaction. - Note that this function is not allowed to leave if called with - certain events. @see THTTPEvent - @param aTransaction The transaction that the event has occurred on. - @param aEvent The event that has occurred. - @leave Any Leaves must be handled by the appropriate MHFRunError. - */ - //##ModelId=3C4C1886024C - virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent) =0; - - /** Called when RunL leaves from a transaction event. This works in the same - way as CActve::RunError; return KErrNone if you have handled the error. - If you don't completely handle the error, a panic will occur. - @param aError The leave code that RunL left with. - @param aTransaction The transaction that was being processed. - @param aEvent The Event that was being processed. - @return KErrNone if the error has been cancelled or the code - of the continuing error otherwise. - */ - //##ModelId=3C4C1886023F - virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent) =0; - - }; - -#endif // __MHTTPTRANSACTIONCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttpconnectioninfo.h --- a/epoc32/include/http/rhttpconnectioninfo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPConnectionInfo.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPCONNECTIONINFO_H__ -#define __RHTTPCONNECTIONINFO_H__ - -// System includes -#include -#include -#include - -//##ModelId=3C4C187A01CA -class RHTTPConnectionInfo : public RHTTPPropertySet -/** -The RHTTPConnectionInfo is used for setting/getting -values used for setting up a connection over a protocol. All methods are inherited -directly from RHTTPPropertySet. - -To lookup/change any of the following properties, use -RHTTPPropertySet::Property(...) and RHTTPPropertySet::SetPropertyL(...) - -To remove properties, use RHTTPPropertySet::RemoveProperty(...) for a named property, -or RHTTPPropertySet::RemoveAllProperties() for all. - -The following values are currently defined. Note that new values -could be added by individual filters. In general, properties -should be defined before the first transaction is created; filters -are not obliged to check with the connection info if the values -have changed after this point. - -HTTP::EProxyUsage (default HTTP::EDoNotUseProxy) (HTTP::EDoNotUseProxy | HTTP::EUseProxy) - -HTTP::EProxyAddress (A Uri for the Proxy server. Should include the port number -if it is not the default of 8080) - -HTTP::EMaxNumTransportHandlers (default 4) - -HTTP::EMaxNumTransPerTranspHndlr (default 5) - -HTTP::EHTTPVersion (default HTTP::EHttp11) (HTTP::EHttp11 | HTTP::EHttp10) - -HTTP::EProtocol (default, and currently only defined value is HTTP::EHTTP) - -HTTP::EHttpBatching (default HTTP::EDoNotEnableBatching) (HTTP::EDoNotEnableBatching | HTTP::EEnableBatching) - -HTTP::EBatchingBufferSize (default 1400) - -HTTP Client can create a connection and set its own preferences, instead of using the -default connection preferences specified in COMMS Database. In such cases, the client -is responsible for creating the RSocketServ session and RConnection using -RSocketServ::Connect(..) and RConnection::Open(..). -Client must also start the connection using RConnection::Start(..) and pass the -connection preferences to the function using TConnPref. -The following session properties should then be set by the client. - -HTTP::EHttpSocketServ (Handle to RSocketServ session, which is the value obtained - by calling RSocketServ::Handle()) - -HTTP::EHttpSocketConnection (Reference to the RConnection object, obtained from - reinterpret_cast(TInt, &connection)) - -The HTTP Client can also specify what action should be take if during a secure -handshakes the server cert cannot be trusted. The choice is for the handshake -to automatically cancelled or for a dialog to be raised and the user given the -option of continuing with the handshake or cancelling it. The following session -property should be used to specify the behaviour. - -HTTP::ESecureDialog (default HTTP::EDialogPrompt) (HTTP::EDialogPrompt | EDialogNoPrompt) - -The HTTP Client can specify the socket shutdown mode when the session is closing. At the time -of closing the session, any outstanding transactions on open sockets can specify that the -socket shutdown mode be set to immediate. The following property can be used to enable this -behaviour. - -HTTP::ESocketShutdownMode (default HTTP::ESocketShutdownNormal) (HTTP::ESocketShutdownNormal | HTTP::ESocketShutdownImmediate - -The HTTP Client can limit the number of transactions that it will send down one connection when -using pipelining. The following value should be set to an integer. When set any outstanding transaction -that exceed this number will either be sent separately down a different connection or will -be queued until a space becomes available. - -HTTP::EMaxNumTransactionsToPipeline (default KMaxTInt) (Integer) - -The session ID is an optional non-negative integer which is attached to the session and any sockets -it creates. The session ID will be set on any sockets created by using RSocket::SetOpt() with -the level KSOLHttpSessionInfo and the name KSOHttpSessionId (defined in httpsocketconstants.h). -The session ID can be retrieved in a Flow Hook by implementing MIp6Hook::SetFlowOption() to -look for the aforementioned option level and name. -@see MIp6Hook - -HTTP::ESessionId (no default) (Integer) - - -@publishedAll -@released -*/ - { - }; - -#endif // __RHTTPCONNECTIONINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttpfiltercollection.h --- a/epoc32/include/http/rhttpfiltercollection.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPFilterCollection.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPFILTERCOLLECTION_H__ -#define __RHTTPFILTERCOLLECTION_H__ - -// System includes -#include -#include -#include - -// Forward declarations -class CHTTPSession; -class RHTTPSession; -class MHTTPFilter; -class THTTPFilterIterator; - - -//##ModelId=3C4C187C02B3 -class RHTTPFilterCollection -/** -A Handle on the filter collection in a session. It provides -facilities for adding and deleting filters and for querying what -filters are installed. -@publishedAll -@released -@see RHTTPSession::FilterCollection -@see MHTTPFilter::TPositions -*/ - { - public: - //##ModelId=3C4C187C02F9 - inline RHTTPFilterCollection(); - - //##ModelId=3C4C187C02E5 - IMPORT_C void AddFilterL(MHTTPFilter& aFilter, THTTPEvent aEvent, - RStringF aHeader, TInt aStatusCode, - TInt aPosition, RStringF aName); - - - //##ModelId=3C4C187C02F1 - IMPORT_C void AddFilterL(MHTTPFilter& aFilter, THTTPEvent aEvent, - TInt aPosition, RStringF aName); - - //##ModelId=3C4C187C02DF - IMPORT_C TBool CanChangeFilters() const; - - //##ModelId=3C4C187C02DD - IMPORT_C void RemoveFilter(RStringF aFilter); - - //##ModelId=3C4C187C02DB - IMPORT_C THTTPFilterIterator Query(RStringF aName = RStringF()); - - //##ModelId=3C4C187C02D1 - inline RHTTPSession Session() const; - - private: - friend class CHTTPSession; - friend class RHTTPSession; - - //##ModelId=3C4C187C02C9 - CHTTPSession* iImplementation; - }; - -/** Constructor - */ -inline RHTTPFilterCollection::RHTTPFilterCollection() - : iImplementation(NULL) - { - } - -#endif // __RHTTPFILTERCOLLECTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttpheaders.h --- a/epoc32/include/http/rhttpheaders.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,214 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPHeaders.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPHEADERS_H__ -#define __RHTTPHEADERS_H__ - -// System includes -#include -#include - - -//##ModelId=3C4C1880001A -class RHTTPHeaders -/** -The collection of headers (or more correctly, header fields) -associated with a message. Header (fields) can be created, read and -modified. They may be composed of several parts (by repeated -invocations of API methods, see below) and may be assigned one or -more parameters. Individual field parts and parameters take -values described using THTTPHdrVal. -@publishedAll -@released -@see RHTTPMessage -@see THTTPHdrVal -*/ - { - public: - /** Default constructor - */ - //##ModelId=3C4C18800088 - inline RHTTPHeaders(); - - /**Getter methods - Methods for reading data. - */ - //@{ - /** Obtain the number of parts in the named header field's value, - Simple headers are created with a single part following one - call to SetFieldL. Subsequent calls to SetFieldL create - additional parts if the field exists already. - @leave KErrNoMemory - @param aFieldName The header name - @return The number of parts, or zero if the field does not exist. */ - //##ModelId=3C4C18800081 - IMPORT_C TInt FieldPartsL(RStringF aFieldName) const; - - /** Obtain the named header field's value. The index - of a part within the field must be specified. Parts are indexed - from 0 and fields with only one part return the entire field for index 0 - @param aFieldName The header name - @param aPartIdx The index of the part - @param aHeaderValue The header field value - @return An error condition. Returns KErrNotFound if there is not a field with the - specifed field name - */ - //##ModelId=3C4C18800079 - IMPORT_C TInt GetField(RStringF aFieldName, - TInt aPartIdx, THTTPHdrVal& aHeaderValue) const; - - /** Obtain an Raw representation of the named header - field's value. Note that general client use of this method is - strongly discouraged since it exposes the Raw representation of particular headers. - However it may be needed for some cases where received headers could not be - decoded by HTTP. It will normally be used internally when - preparing header data to be transmitted with a request. - Note that this API may not return the field values for all the headers. - @param aFieldName The field name, e.g, 'Content-Type' - @param aRawFieldData The field's data content, in an appropriate Raw form - @return An error condition. Returns KErrNotFound if there is not a field with the - specifed field name - */ - //##ModelId=3C4C18800076 - IMPORT_C TInt GetRawField(RStringF aFieldName, - TPtrC8& aRawFieldData) const; - - /** Obtain the value of a named parameter, associated with the - named header field. An optional index to a part within the - header field may be supplied, if not it is assumed that it is - the first part. - @param aFieldName The header name - @param aParamName The parameter name - @param aReturn The returned value. Note that this - must be Copy()d by the caller, if it wants to keep the value. - @param aPartIdx The optional index of the part - @return An error condition. Returns KErrNotFound if there is not a field with the - specifed field name */ - //##ModelId=3C4C1880006C - IMPORT_C TInt GetParam(RStringF aFieldName, - RStringF aParamName, - THTTPHdrVal& aReturn, - TInt aPartIdx = 0) const; - - /** Access the fields within this header collection, via an - iterator. Each application of the iterator returns the name - of the next field type. This may then be accessed via - RHTTPHeaders methods. - @return The iterator. */ - //##ModelId=3C4C1880006B - IMPORT_C THTTPHdrFieldIter Fields() const; - //@} - - /** Setter Methods - Methods for writing data. - */ - //@{ - /** Set a named field in the header. On the first instance that - this API method is used for a given field name, the first will - be created. On subsequent calls, the same field will be - extended to have several parts, with a new part created to - hold the supplied value. - @param aFieldName The field name, e.g, 'Content-Type' - @param aFieldValue The field value, e.g. 'text/html' */ - //##ModelId=3C4C18800060 - IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue); - - /** Set a named field in the header, and associate with it the - supplied parameter. If the field doesn't already exist it will - be created along with a parameter; if it does exist, then a - new part will be created along with the parameter. - @param aFieldName The field name, e.g. 'Accept' - @param aFieldValue The field value. e.g. 'text/plain' - @param aParamName The parameter name, e.g. 'q' - @param aParamValue The parameter value, e.g. '0.3' */ - //##ModelId=3C4C18800063 - IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue, - RStringF aParamName, THTTPHdrVal aParamValue); - - /** Set a parameter in an existing header. - @param aFieldName The field name, e.g. 'Accept' - @param aPartIdx The part of the header to add the parameter to - @param aParamName The parameter name, e.g. 'q' - @param aParamValue The parameter value, e.g. '0.3' - @leave KErrNotFoud if the field, or the part within the field doesn't exist - */ - //##ModelId=3C4C18800058 - IMPORT_C void SetParamL(RStringF aFieldName, RStringF aParamName, THTTPHdrVal aParamValue, TInt aPartIdx); - - /** Set a named field in the header to contain the supplied Raw header - data. If the header already exists then a LF and the new data will be added to the existing data. This is used to - indicate that there are multiple instances of this header - - - Note that general client use of this method is strongly - discouraged since it exposes the raw representation of particular headers. - However it may be needed for some cases where headers to be transmitted have no encoding known - to HTTP. It will normally be used internally when receiving data from a service provider. - @param aFieldName The field name, e.g, 'Content-Type' - @param aRawFieldData The field's data content, in a raw form - @param aFieldSeparator The header field separator - */ - //##ModelId=3C4C1880004F - IMPORT_C void SetRawFieldL(RStringF aFieldName, - const TDesC8& aRawFieldData, - const TDesC8& aFieldSeparator); - - /** Remove, entirely, the named header field from the header - collection. All its parts and associated parameters (where - they exist) are also removed. - @param aFieldName The field name. - @return KErrNone if the removal is successful; KErrNotFound if - the field didn't exist within the headers. */ - //##ModelId=3C4C1880004D - IMPORT_C TInt RemoveField(RStringF aFieldName); - - /** Remove a single part of a header field. Just the part and any associated paramters are removed. If this - results in no parts being present in the header then it will also be removed - @param aFieldName The header name - @param aIndex The particular part of the field to be removed - @return KErrNone if the removal is sucessful; KErrNotFound if the header didn't exist. No exception is raised if - the particular value is not found as part of that header */ - //##ModelId=3C4C18800043 - IMPORT_C TInt RemoveFieldPart(RStringF aFieldName, TInt aIndex); - - /** Remove all the fields of this header collection - */ - //##ModelId=3C4C18800042 - IMPORT_C void RemoveAllFields(); - - //@} - - -private: - friend class CHeaders; - //##ModelId=3C4C1880003A - CHeaders* iImplementation; - }; - - -inline RHTTPHeaders::RHTTPHeaders() - : iImplementation(NULL) - { - } - - -#endif // __RHTTPHEADERS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttpmessage.h --- a/epoc32/include/http/rhttpmessage.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPMessage.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPMESSAGE_H__ -#define __RHTTPMESSAGE_H__ - -// Forward declarations -class RHTTPHeaders; -class MHTTPDataSupplier; -class CMessage; - - -//##ModelId=3A375D1F0377 -class RHTTPMessage -/** -An abstract HTTP message. In RFC2616, an HTTP message is defined as having a -header and an optional body. This class is specialised for HTTP requests and -responses. -@publishedAll -@released -*/ - { - public: - /// Default (uninitialised) constructor. - //##ModelId=3A375DD60140 - inline RHTTPMessage(); - - /** Returns the header collection for the message */ - //##ModelId=3A375DDE0368 - IMPORT_C RHTTPHeaders GetHeaderCollection(); - - /** Sets the messages body, replacing any existing body. The body - is supplied as a MHTTPDataSupplier, which will then return the - data in 1 or more chunks on request. - @param aBody The data supplier that will supply the body. */ - //##ModelId=3A375DE0019E - IMPORT_C void SetBody(MHTTPDataSupplier& aBody); - - /** Removes the body */ - //##ModelId=3B1E66FF004E - IMPORT_C void RemoveBody(); - - /** Determine whether this message has any associated body data. - @return ETrue if there is some body data, EFalse if not. - */ - //##ModelId=3A914DFF01E5 - IMPORT_C TBool HasBody() const; - - /** Gets the body. The body is supplied as a MHTTPDataSupplier, - which can be used to return the current data chunk, and to - acknowledge when that chunk has been consumed by the client. - - Note that the client can assume the body object will remain - unchanged from when it receives the first data until the end - of the transaction. - - @return A data supplier that provides access to a body - data chunk. NULL if the body has not been set, or has been removed */ - //##ModelId=3A375DE40190 - IMPORT_C MHTTPDataSupplier* Body() const; - - protected: - //##ModelId=3A914DFF01C7 - CMessage* iImplementation; -}; - - -inline RHTTPMessage::RHTTPMessage() - : iImplementation(NULL) - { - }; - - -#endif // __RHTTPMESSAGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttppropertyset.h --- a/epoc32/include/http/rhttppropertyset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPPropertySet.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPPROPERTYSET_H__ -#define __RHTTPPROPERTYSET_H__ - -// System includes -#include - -// Forward declarations -class CHeaderFieldPart; - - -//##ModelId=3C4C188201EA -class RHTTPPropertySet -/** -A set of named THTTPHdrVal objects. Used for storing arbitrary -collections of information. -@publishedAll -@released -*/ - { - public: - /** Default (uninitialised) constructor. An object constructed in this way - means 'use text-mode HTTP with default settings' - */ - //##ModelId=3A63217800E0 - IMPORT_C RHTTPPropertySet(); - - /** Returns a property. - @param aPropertyName The name of the property. - @param aVal The returned value of the property (if defined) - @return ETrue if the property exists - */ - //##ModelId=3C4C1882021F - IMPORT_C TBool Property(RStringF aPropertyName, THTTPHdrVal& aVal) const; - - /** Sets or creates a property. - @param aPropertyName The name of the property - @param aValue The new value of the property - @leave KErrNoMemory There was not enough memory. - */ - //##ModelId=3C4C1882021C - IMPORT_C void SetPropertyL(RStringF aPropertyName, THTTPHdrVal aValue); - - /** Removes a named property. - @param aPropertyName The name of the property - */ - //##ModelId=3C4C18820213 - IMPORT_C void RemoveProperty(RStringF aPropertyName); - - /** Removes all properties - */ - //##ModelId=3C4C18820212 - IMPORT_C void RemoveAllProperties(); - - protected: - //##ModelId=3C4C18820208 - CHeaderFieldPart* iImplementation; - - friend class CHeaderFieldPart; - friend class CHTTPSession; - }; - - - -#endif // __RHTTPPROPERTYSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttprequest.h --- a/epoc32/include/http/rhttprequest.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPRequest.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPREQUEST_H__ -#define __RHTTPREQUEST_H__ - -// System includes -#include -#include -#include - - -//##ModelId=3C4C186E0191 -class RHTTPRequest : public RHTTPMessage -/** -An HTTP Request. This class extends the abstract HTTP Message to add an HTTP -method to be invoked on the resource at the remote HTTP server, and the URL that -identifies that resource. -@publishedAll -@released -*/ - { - public: - /** Get Methods - Methods for reading information from the response. - */ - //@{ - /// Gets the method name - /// @return The method to be used in the HTTP request. - //##ModelId=3C4C186E01B3 - IMPORT_C RStringF Method() const; - /// Gets the URI - /// @return The URI to be used in the HTTP request. - //##ModelId=3C4C186E01B2 - IMPORT_C const TUriC8& URI() const; - //@} - /**Set Methods - - Methods for setting information. These methods will not be of - use to the client; they are intended for the use of advanced - filters - */ - //@{ - /// Sets the method name - /// @param aMethod The method name to be used in the HTTP request. - //##ModelId=3C4C186E01B0 - IMPORT_C void SetMethod(RStringF aMethod); - /// Sets the URI - /// @param aURI The URI to be used in the HTTP request. - //##ModelId=3C4C186E01A6 - IMPORT_C void SetURIL(const TUriC8& aURI); - //@} - - friend class CRequest; - }; - - -#endif // __RHTTPREQUEST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttpresponse.h --- a/epoc32/include/http/rhttpresponse.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPResponse.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPRESPONSE_H__ -#define __RHTTPRESPONSE_H__ - -// System includes -#include -#include -#include - - -//##ModelId=3A375D1203B5 -class RHTTPResponse : public RHTTPMessage -/** -An HTTP Response. This class extends the abstract HTTP Message to add an HTTP -version, a status code and status text. -@publishedAll -@released -*/ - { -public: - /**Get Methods - Methods for reading information from the response. - */ - //@{ - /** - Returns the status code - */ - //##ModelId=3A914DF801B3 - IMPORT_C TInt StatusCode() const; - /** Returns the status text, that is the text after the number on - the first line of the response. */ - //##ModelId=3A914DF80195 - IMPORT_C RStringF StatusText() const; - /** - Returns the version of HTTP used by the server - */ - //##ModelId=3A914DF80163 - IMPORT_C TVersion Version() const; - //@} - /** Set Methods - - Methods for setting information. These methods will not be of - use to the client; they are intended for the use of advanced - filters - */ - //@{ - /** Sets the status code. - */ - //##ModelId=3A3765310382 - IMPORT_C void SetStatusCode(TInt aStatus); - /// Sets the status string - //##ModelId=3A914DF8019F - IMPORT_C void SetStatusText(RStringF aStatusString); - /// Sets the HTTP version - //##ModelId=3A914DF8016D - IMPORT_C void SetVersion(TVersion aVersion); - //@} - - friend class CResponse; - }; - - - -#endif // __RHTTPRESPONSE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttpsession.h --- a/epoc32/include/http/rhttpsession.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPSession.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPSESSION_H__ -#define __RHTTPSESSION_H__ - -// System includes -#include -#include -#include -#include -#include -#include - -// Forward declarations -class MHTTPTransactionCallback; -class CHTTPSession; -class MHTTPSessionEventCallback; -class MHTTPFilterCreationCallback; -class TCertInfo; -class CCertificate; - -/** -Constant to represent any HTTP Status code when registering filters. -@publishedAll -@released -*/ -const TInt KAnyStatusCode = -1; - - -//##ModelId=3C4C187B0280 -class RHTTPSession -/** -A session handle. A session is a set of HTTP transactions using -the same connection settings (e.g. proxy) and the same set of filters. - Multi-homing support provided by HTTP framework enables clients to - specify Connection preferences through the session property - EHttpSocketConnection. - -Note that RHTTPSession (and consequently the whole of HTTP) -depends on the active scheduler; a scheduler must be installed -when the session is opened and it must be running if a transaction -is actually to do anything. -@publishedAll -@released -@see RHTTPTransaction -*/ - { - public: - /** Constructor. - @post The session is closed. (It must be opened with OpenL) - @see OpenL */ - //##ModelId=3C4C187B02EF - inline RHTTPSession(); - - /** Sets the session event callback. - Until it is set all incoming session events are consumed - */ - //##ModelId=3C4C187B02EA - IMPORT_C void SetSessionEventCallback(MHTTPSessionEventCallback* aSessionEventCallback); - - /** Send an session event - @param aEvent. The session event to sent. - */ - //##ModelId=3C4C187B02E6 - IMPORT_C void SendSessionEventL(THTTPSessionEvent aStatus, THTTPSessionEvent::TDirection aDirection, - THTTPFilterHandle aStart = THTTPFilterHandle::EClient); - - /** Fail the session event - */ - IMPORT_C void FailSessionEvent(THTTPFilterHandle aStart = THTTPFilterHandle::EClient); - - //##ModelId=3A49F701013F - /** Opens the session using the default protocol HTTP/TCP. - This function leaves with an apropriate code if the open failed. - @pre The session is closed. An active scheduler is installed. - @post The session is open. - */ - //##ModelId=3C4C187B02DA - IMPORT_C void OpenL(); - - /** Opens the session using the protocol indicated by the parameter passed in. - This function leaves with an apropriate code if the open failed. - @param aProtocol The protocol required - @pre The session is closed. An active scheduler is installed. - @post The session is open. - */ - //##ModelId=3C4C187B02DB - IMPORT_C void OpenL(const TDesC8& aProtocol); - - /** Opens the session using the protocol indicated by the parameter passed in. - This method should be used if configuring the installed filters is required. - Once construction if the session is complete the callback method passed in is - called passing in a TFilterConfigurationIterator to allow the filters that - are installed to be configured. - This function leaves with an apropriate code if the open failed. - @param aProtocol The protocol required - @param aSessionCallback The pointer to the object providing the call back method - @pre The session is closed. An active scheduler is installed. - @post The session is open. - */ - //##ModelId=3C4C187B02DD - IMPORT_C void OpenL(const TDesC8& aProtocol, MHTTPFilterCreationCallback* aSessionCallback); - - /** This is a static methods that lists all the available protocols by adding the - prorocol descriptors to the descriptor array passed in. Any existing data in the - descriptor array passed in is deleted. - This function leaves if the descriptor array can not be updated with the appropriate - array code. - @param aProtocolArray A pointer array to heap based descriptors. The data in this - array will be deleted and filled with descriptors containing the available protocols - @see OpenL - */ - //##ModelId=3C4C187B02D4 - IMPORT_C static void ListAvailableProtocolsL(RPointerArray& aProtocolArray); - - /** Creates a transaction. - @pre The session is open - @param aURI The URI that the request will be sent to. - @param aCallback A callback for all status events relating to - this transaction. - @param aMethod The HTTP method to use (default: GET) - @leave KErrNoMemory There was not enough memory. - */ - //##ModelId=3C4C187B02D0 - IMPORT_C RHTTPTransaction OpenTransactionL(const TUriC8& aURI, - MHTTPTransactionCallback& aCallback, - RStringF aMethod = RStringF()); - - /** Closes the session. All transactions will be stopped and closed - @post The session and all open transactions in it are closed. - */ - //##ModelId=3C4C187B02C8 - IMPORT_C void Close(); - - - //##ModelId=3C4C187B02C7 - IMPORT_C static const TStringTable& GetTable(); - - /** Accessor for the HTTP string pool. - @return A handle for the string pool used in HTTP. - */ - //##ModelId=3C4C187B02C6 - IMPORT_C RStringPool StringPool() const; - - /** Accessor for the connection info for this session, and which - is used for all transactions in the session. Note that by and - large, the connection info should be set up before the first - transaction is created. @return A handle to the connection - inf. */ - //##ModelId=3C4C187B02BE - IMPORT_C RHTTPConnectionInfo ConnectionInfo() const; - - /** Accessor for the filter collection. Note that the filter - collection can't be edited after the first transaction has - been created. */ - //##ModelId=3C4C187B02BD - inline RHTTPFilterCollection FilterCollection() const; - - - /** Accessor for the session headers. These are headers that will get added to each request - They only become part of the transaction headers when a transaction is submitted and they will not - replace headers that already exist in the transaction request - */ - //##ModelId=3C4C187B02BC - IMPORT_C RHTTPHeaders RequestSessionHeadersL(); - - - /** Accessor for the response session headers. These are headers that will get added to each response if the - corresponding header doesn't already exist - */ - //##ModelId=3C4C187B02B6 - IMPORT_C RHTTPHeaders ResponseSessionHeadersL(); - - /** Equality operator. - @param aTrans The session to compare this one to. - */ - //##ModelId=3C4C187B02B4 - TBool operator==(RHTTPSession aTrans) const; - /** Inequality operator - @param aTrans The session to compare this one to. - */ - - //##ModelId=3C4C187B02B2 - TBool operator!=(RHTTPSession aTrans) const; - - /** Obtain the server certificate information for this session. This function - should only be used for WSP, for text-mode use RHttpTransaction::ServerCert. - @see RHttpTransaction::ServerCert - @param aServerCert A client supplied object into which the certificate - information will be placed. - @return KErrNone if certificate has been completed, KErrNotSupported if - this function is called for text-mode. - @deprecated v9.2 onwards - maintained for compatibility with v9.1 and before - TCertInfo has been deprecated since v9.2. CCertificate may be used as an alternative. - */ - //##ModelId=3C4C187B02AA - IMPORT_C TInt ServerCert(TCertInfo& aServerCert); - - - /** Obtain the server certificate information for this session. This function - should only be used for WSP. HTTP should use RHttpTransaction::ServerCert. - @see RHttpSession::ServerCert - @internalAll - @prototype - @return a CCertificate pointer to an CWTLSCertificate object. - Calling code can safely cast to CWTLSCertificate if using "WSP/WSP". - NULL returned if certificate information not found. - */ - IMPORT_C const CCertificate* RHTTPSession::ServerCert(); - - /** Connect this WSP session. This function does nothing when called for text-mode. - */ - //##ModelId=3C4C187B02A9 - IMPORT_C void ConnectL(); - - /** Disconnect this WSP session. This function does nothing when called for text-mode. - */ - //##ModelId=3C4C187B02A8 - IMPORT_C void DisconnectL(); - - /**Set the default Proxy for Http Session. This function reads default proxy information,if available, from CommsDat - and uses it for the current Session. - @internalAll - */ - IMPORT_C void SetupDefaultProxyFromCommsDatL(); - - /**Sets the HTTP data optimiser for the session. - @param aHttpOptimiser An object of the implementation of interface, MHttpDataOptimiser, supplied by the client. - @publishedPartner - */ - IMPORT_C void SetupHttpDataOptimiser (MHttpDataOptimiser& aHttpOptimiser); - - /**Returns the object of the MHttpDataOptimiser implementation class. - @internalTechnology - */ - IMPORT_C MHttpDataOptimiser* HttpDataOptimiser (); - -private: - friend class RHTTPFilterCollection; - friend class CHTTPSession; - - //##ModelId=3C4C187B0296 - CHTTPSession* iImplementation; -}; - -inline RHTTPSession::RHTTPSession() - : iImplementation(0) - { - } - - -inline RHTTPFilterCollection RHTTPSession::FilterCollection() const - { - RHTTPFilterCollection c; - c.iImplementation = iImplementation; - return c; - } - -inline TBool RHTTPSession::operator==(RHTTPSession aTrans) const - { - return (iImplementation == aTrans.iImplementation); - }; -inline TBool RHTTPSession::operator!=(RHTTPSession aTrans) const - { - return !(*this == aTrans); - }; - - - -inline RHTTPSession RHTTPFilterCollection::Session() const - { - RHTTPSession s; - s.iImplementation = iImplementation; - return s; - } - - - - -#endif // __RHTTPSESSION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttptransaction.h --- a/epoc32/include/http/rhttptransaction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,225 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPTransaction.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPTRANSACTION_H__ -#define __RHTTPTRANSACTION_H__ - -// System includes -#include -#include -#include -#include -#include -#include - -// Forward declarations -class CHTTPTransaction; -class CTransaction; -class MHTTPTransactionCallback; -class RHTTPSession; -class TCertInfo; -class CCertificate; - - -//##ModelId=3C4C18860091 -class RHTTPTransaction -/** -A HTTP Transaction. This encapsulates 1 HTTP request and -response. A Transaction is associated with a session, and must be -created using the session's CreateTransactionL method. -@publishedAll -@released -@see RHTTPSession -@see RHTTPSession::CreateTransactionL -*/ - { - public: - /** - Default (uninitialised) constructor - */ - //##ModelId=3C4C188600F5 - inline RHTTPTransaction(); - - /** Submits a transaction. Once all the headers and other details - have been set up, this call actualy causes the request to be - made. - @leave KErrNoMemory There was not enough memory. - */ - //##ModelId=3C4C188600ED - IMPORT_C void SubmitL(THTTPFilterHandle aStart = - THTTPFilterHandle::EClient); - - /** Notify HTTP of the availability of more request body data, - when submitting body data in several parts. - - @param aStart The filter supplying the new data. This will almost always be the client (default value) - @leave KErrNoMemory There was not enough memory. - */ - //##ModelId=3C4C188600EB - IMPORT_C void NotifyNewRequestBodyPartL(THTTPFilterHandle aStart = - THTTPFilterHandle::EClient); - - /** Sends a status message to all relevant filters. This function - is predominantly used by filters, rather than by the client. - @param aStatus The status message to send. - @param aDirection The direction down the filter queue that this event - will be propogated. - @leave KErrNoMemory There was not enough memory. - */ - //##ModelId=3C4C188600E2 - IMPORT_C void SendEventL(THTTPEvent aStatus, - THTTPEvent::TDirection aDirection, - THTTPFilterHandle aStart); - - /** Gets the response. Note that the returned response may not be - valid if it hasn't been created yet. - @see RHTTPMessage::IsValid() - */ -//##ModelId=3C4C188600E1 - IMPORT_C RHTTPResponse Response() const; - - /// Gets the request. - //##ModelId=3C4C188600DA - IMPORT_C RHTTPRequest Request() const; - - /// Returns the session associated with the transaction. - //##ModelId=3C4C188600D9 - IMPORT_C RHTTPSession Session() const; - - /** Returns the transaction's property set. This is used by filters - to store transaction-specific information, and by clients to - specify things like reload or no cache behaviour. - */ - //##ModelId=3C4C188600D8 - IMPORT_C RHTTPTransactionPropertySet PropertySet() const; - - /** Cancels the transaction. - - @param aStart The entity that is initiating the cancel (defaults - to the client). See THTTPFilterHandle for the values this can take. - */ - //##ModelId=3C4C188600CF - IMPORT_C void Cancel(THTTPFilterHandle aStart = - THTTPFilterHandle::EClient); - - /** Closes the transaction and frees all owned resources. - Transactions must be opened using RHTTPSession::OpenTransactionL. - It is also closed when you close the session. - */ - //##ModelId=3C4C188600CE - IMPORT_C void Close(); - - /** This function should be called by filters when they have - failed due to running out of memory. It cancels the transaction - and sends the synchronous events EUnrecoverableError and EFailed - to the client to inform it of the failure. For instance in a - filter that attempts to send an event to the client from a - MHFRunError to inform the client of a failure, if the call to - SendEventL leaves, Fail() may be used to 'give up'. */ - //##ModelId=3C4C188600C7 - IMPORT_C void Fail(THTTPFilterHandle aStart = - THTTPFilterHandle::ECurrentFilter); - - /** Equality operator to check if this transaction is the same as that one. - @param aTrans The transaction to compare this one to. - */ - //##ModelId=3C4C188600C5 - TBool operator==(RHTTPTransaction aTrans) const; - /** Inequality operator - @param aTrans The transaction to compare this one to. - */ - //##ModelId=3C4C188600C3 - TBool operator!=(RHTTPTransaction aTrans) const; - /** Obtain this transaction's ID, which is unique within its - session. This is mostly used for producing a - slightly-meaningful way of identifying transactions in logging - code. - @return The transaction ID. - */ - //##ModelId=3C4C188600BB - IMPORT_C TInt Id() const; - - /** Obtain the server certificate information for this transaction. This function - should only be used for text-mode, for WSP use RHttpSession::ServerCert. - @see RHttpSession::ServerCert - @param aServerCert A client supplied object into which the certificate - information will be placed. - @return KErrNone if certificate has been completed, KErrNotSupported if - this function is called for WSP. - @deprecated v9.2 onwards - maintained for compatibility with v9.1 and before - TCertInfo has been deprecated since v9.2. CCertificate may be used as an alternative. - */ - //##ModelId=3C4C188600B9 - IMPORT_C TInt ServerCert(TCertInfo& aServerCert); - - /** Obtain the server certificate information for this transaction. This function - should only be used for HTTP. WSP should use RHttpSession::ServerCert. - @see RHttpSession::ServerCert - @internalAll - @prototype - @return a CCertificate pointer to an CX509Certificate object. - Calling code can safely cast to CX509Certificate if using "HTTP/TCP". - NULL returned if certificate information not found. - */ - IMPORT_C const CCertificate* ServerCert(); - - /** Obtain the cipher suite information for this transaction. - @return RString containing the cipher suite as per RFC2246. - */ - IMPORT_C RString CipherSuite(); - - /**Sets the HTTP data optimiser for the transaction. - @param aHttpOptimiser An object of the implementation of interface, MHttpDataOptimiser, supplied by the client. - @publishedPartner - */ - IMPORT_C void SetupHttpDataOptimiser (MHttpDataOptimiser& aHttpOptimiser); - - /**Returns the object of the MHttpDataOptimiser implementation class. - @internalTechnology - */ - IMPORT_C MHttpDataOptimiser* HttpDataOptimiser (); - -private: - friend class RHTTPSession; - friend class CTransaction; - - private: - //##ModelId=3C4C188600A7 - CTransaction* iImplementation; - }; - -inline TBool RHTTPTransaction::operator==(RHTTPTransaction aTrans) const - { - return (iImplementation == aTrans.iImplementation); - }; -inline TBool RHTTPTransaction::operator!=(RHTTPTransaction aTrans) const - { - return !(*this == aTrans); - }; - -inline RHTTPTransaction::RHTTPTransaction() - : iImplementation(NULL) - { - } - - -#endif // __RHTTPTRANSACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/rhttptransactionpropertyset.h --- a/epoc32/include/http/rhttptransactionpropertyset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file RHTTPTransactionPropertySet.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __RHTTPTRANSACTIONPROPERTYSET_H__ -#define __RHTTPTRANSACTIONPROPERTYSET_H__ - -// System includes -#include - - -//##ModelId=3B1E670402C2 -class RHTTPTransactionPropertySet : public RHTTPPropertySet -/** -The set of properties of a transaction. This is used by filters to -store per-transaction information, and is also used by the client -to specify transaction properties (such as no caching, reload and -so on) - -Transaction properties always take precendence over session properties. - -To lookup/change any of the following properties, use -RHTTPPropertySet::Property(...) and RHTTPPropertySet::SetPropertyL(...) - -To remove properties, use RHTTPPropertySet::RemoveProperty(...) for a named property, -or RHTTPPropertySet::RemoveAllProperties() for all. - - -The following values are currently defined. - -HTTP::EProxyUsage (HTTP::EDoNotUseProxy | HTTP::EUseProxy) - -HTTP::EProxyAddress (A Uri for the Proxy server. Should include the port number -if it is not the default of 8080) - -HTTP::EHttpPipelining (default HTTP::EEnablePipelining) (HTTP::EEnablePipelining | HTTP::EDisablePipelining) -@publishedAll -@released -*/ - { - }; - -#endif // __RHTTPTRANSACTIONPROPERTYSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/tfilterconfigurationiter.h --- a/epoc32/include/http/tfilterconfigurationiter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,201 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file TFilterConfigurationIter.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __TFILTERCONFIGURATIONITER_H__ -#define __TFILTERCONFIGURATIONITER_H__ - -// System includes -#include - -// User includes -#include - -// Forward declarations -class CHTTPSession; -class TSessionFilterInfo; -class CFilterConfigurationIterator_UnitTestContext; - - -//##ModelId=3C4C0F45009C -class TFilterConfigurationIterator -/** -This class can only be created and destroyed by the session. It is supplied to the -client, if the client wishes to configure the filter that are installed or install -filters that must be installed explicitly. The API of the class allows the client to -navigate, install, uninstall and query the filter list. The filters visible in this -list are only the implicit and explicit filters declared as plugins. This iterator MUST -be initialised using the First() method and the return error code checked before any -other operations are called. -@publishedAll -@released -*/ - { -public: // Methods - /** - @fn First() - Intended Usage: This method sets the current filter to the first filter in the list. - This method must be used initially to set the - current filter and the returned error code must be noted prior to - using any of the methods that query or modify the current filter. - @return KErrNone if the first filter is found, KErrNotFound if the filter - can't be found or no filters exist - @pre Object is constructed - @post Current filter is set to the first filter in the list - */ - //##ModelId=3C4C0F45010C - IMPORT_C TInt First(); - - /** - @fn Next() - Intended Usage: This method sets the current filter to the next filter in the list. - @return KErrNone if the next filter is found, KErrNotFound if the filter - can't be found, or no filters exist, or the current filter is at the - end of the list. - @pre Object is constructed - @post Current filter is set to the next filter in the list - */ - //##ModelId=3C4C0F45010B - IMPORT_C TInt Next(); - - /** - @fn AtStart() - Intended Usage: This method indicates whether the current filter is the first filter in - the list. This method will panic if the iterator has not been initialised - using the First() method. - @return ETrue if the current filter is the first in the list - @pre The iterator has been initialised using the First() method - */ - //##ModelId=3C4C0F45010A - IMPORT_C TBool AtStart(); - - /** - @fn AtEnd() - Intended Usage: This method indicates whether the current filter is the last filter in - the list. This method will panic if the iterator has not been initialised - using the First() method. - @return ETrue if the current filter is the last in the list - @pre The iterator has been initialised using the First() method - */ - //##ModelId=3C4C0F450101 - IMPORT_C TBool AtEnd(); - - /** - @fn FindByDataType(const TDesC8& aDataType) - Intended Usage: This method find the first filter in the list that has a matching data - type that is passed in. The method will set the current filter to the - filter that matches the data type or if not found the current filter - will not change. This method will always begin its search - from the beginning of the list. - @param aDataType An 8-bit descriptor containing the data type to match the - filter plug-in with - @return KErrNone is the filter plug-in is found, KErrNotFound if not found - @pre Object is constructed - @post The current filter is set to the filter that matches the data type - */ - //##ModelId=3C4C0F4500F8 - IMPORT_C TInt FindByDataType(const TDesC8& aDataType); - - /** - @fn CurrentFilterInformation() const - Intended Usage: This method will return the information of the current filter. The - information is provided in a TFilterInformation structure containing the - following information: - 1) Display name - 2) Data type - 3) Version - 4) UID - 5) Category - 6) Install status - This method will panic if the iterator has not been initialised using the - First() method - @return A struct containing the current filter information - @pre The iterator has been initialised using the First() method - @see TFilterInformation - */ - //##ModelId=3C4C0F4500F7 - IMPORT_C const TFilterInformation CurrentFilterInformation() const; - - /** - @fn InstallCurrentFilter() const - Intended Usage: This method will install the current filter. This method will panic if a - current filter is not set. - @return KErrNone if the filter installed, KErrAlreadyExists if the filter has - already been installed, KErrNotFound if the filter cannot be found, - KErrNotConnected if the ECom plug-in architecture is not connected, - KErrNoMemory is the filter is not installed due to low memory, or any - other system-wide error codes. - @pre A current filter has been set and is not already installed - @post The filter is installed - */ - //##ModelId=3C4C0F4500F6 - IMPORT_C TInt InstallCurrentFilter() const; - - /** - @fn UninstallCurrentFilter() const - Intended Usage: This method will uninstall the current filter. This method will panic if - a current filter is not set. - @return KErrNone is the filter uninstalled correctly, KErrNotFound if the filter - has not already been installed - @pre A current filter has been set and has already been installed - @post The filter is uninstalled - */ - //##ModelId=3C4C0F4500EF - IMPORT_C TInt UninstallCurrentFilter() const; - -private: // Methods - // Friend class - friend class CHTTPSession; - - // Friend class for testing purposes - friend class CFilterConfigurationIterator_UnitTestContext; - - // Standard default constructor, this is private as it is designed so that only - // the CHTTPSession object that create it. - //##ModelId=3C4C0F4500ED - TFilterConfigurationIterator(CHTTPSession* aSession); - - // Standard destructor, this is private as it is designed so that only the - // CHTTPSession object can delete it. - //##ModelId=3C4C0F4500EC - ~TFilterConfigurationIterator(); - -private: // Attributes - // Pointer to the session implementation. This is not owned. - //##ModelId=3C4C0F4500DA - CHTTPSession* iSession; - - // Pointer array containing all the information for all the filter plugins - // discovered by ECom. The list is stored and owned by the session. This is - // not owned. - //##ModelId=3C4C0F4500D0 - RPointerArray& iFilterInfoList; - - // Value conatining the index of the current filter in the list - //##ModelId=3C4C0F4500C6 - TInt iCurrentFilterIndex; - - // Value containing the number filters in the list - //##ModelId=3C4C0F4500BC - TInt iFilterCount; - }; - -#endif // __TFILTERCONFIGURATIONITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/tfilterinformation.h --- a/epoc32/include/http/tfilterinformation.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file TFilterInformation.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __TFILTERINFORMATION_H__ -#define __TFILTERINFORMATION_H__ - - -//##ModelId=3C4C37DF0343 -struct TFilterInformation -/** -This structure is used by the TFilterConfigurationIterator to hold the information of the -current filter. This structure simply contains public members containing the following -information, the display name, data type, version, UID, category and install status. -@publishedAll -@released -@see TFilterConfigurationIterator -*/ - { -public: - /** - Public enum defining the filter categories available to the client. - */ - enum TFilterCategory - { - EImplicitFilter, - EExplicitFilter - }; - - /** - Contains a constant reference to the descriptor containing the filter's display name - */ - //##ModelId=3C4C37DF03A7 - const TDesC& iDisplayName; - - /** - Contains a constant reference to the descriptor containing the filter's data type - */ - //##ModelId=3C4C37DF039D - const TDesC8& iDataType; - - /** - The filter's version number - */ - //##ModelId=3C4C37DF038B - TInt iVersion; - - /** - The filter's plugin UID - */ - //##ModelId=3C4C37DF0381 - TUid iFilterUid; - - /** - The filter's category - */ - //##ModelId=3C4C37DF0375 - TFilterCategory iFilterCategory; - - /** - The install status of the filter. Contains ETrue if installed, otherwise EFalse - */ - //##ModelId=3C4C37DF036B - TBool iInstallStatus; - - /** - Default constructor that simply initialises the data members. - @param aDisplayName Reference to descriptor containing the display name - @param aDataType Reference to descriptor containing the data type - @param aVersion Integer of the version number - @param aFilterUid The UID of the filter plugin - @param aFilterCategory The category of the filter - @param aInstallStatus The install status of the filter plugin. Contains ETrue - if installed or EFalse otherwise. - @pre None - @post Object is fully constructed and initialised - */ - //##ModelId=3C4C37DF03B1 - inline TFilterInformation(const TDesC& aDisplayName, const TDesC8& aDataType, - TInt aVersion, TUid aFilterUid, - TFilterCategory aFilterCategory, TBool aInstallStatus); - }; - -// Inline constructor, initialises data members -inline TFilterInformation::TFilterInformation(const TDesC& aDisplayName, const TDesC8& aDataType, - TInt aVersion, TUid aFilterUid, - TFilterCategory aFilterCategory, TBool aInstallStatus) - :iDisplayName(aDisplayName), - iDataType(aDataType), - iVersion(aVersion), - iFilterUid(aFilterUid), - iFilterCategory(aFilterCategory), - iInstallStatus(aInstallStatus) - { - } - -#endif // __TFILTERINFORMATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttpevent.h --- a/epoc32/include/http/thttpevent.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,485 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file THTTPEvent.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __THTTPEVENT_H__ -#define __THTTPEVENT_H__ - -// System includes -#include - -/** -The HTTP UID. This UID is used for all events defined here. -@publishedAll -@released -*/ -const TUint KHTTPUid = 0x1000A441; - -/** -Wildcard Matching UID. When specified as part of an event then the UID event -part of the match will be ignored. -@publishedAll -@released -*/ -const TUint KHTTPMatchAnyEventUid = 0x1000A44C; - -/** -The base status code for transaction events. Any number above this but below -KSessionEventBaseStatus is a transaction event. -@publishedAll -@released -*/ -const TInt KTransactionEventBaseStatus = 0; - -/** -The base status code for transaction warning events. -@publishedAll -@released -*/ -const TInt KTransactionWarningBaseStatus = 10000; - -/** -The base status code for session events. Any number above this is a session -event. -@publishedAll -@released -*/ -const TInt KSessionEventBaseStatus = 100000; - -/** -The base status code for session warning events. -@publishedAll -@released -*/ -const TInt KSessionWarningBaseStatus = 110000; - - -//##ModelId=3C4C18740294 -class THTTPEvent -/** -A HTTP status message. Status messages consist of a UID and a -status code within that UID. Extension dlls that needs to create -new status messages should use their own UID and create status codes -within that UID. -@publishedAll -@released -*/ - { -public: - - /** The TStandardEvent type is used to specify a family of event types. Any - negative event number is used to convey error codes. All events are - incoming (originate with the origin server) unless otherwise indicated. - Outgoing messages will not be seen by the MHTTPTransactionCallback's - MHFRunL. - */ - enum TStandardEvent - { - /** Used when registering filter to indicate the filter is instrested - in ALL events, both transaction and session events. - */ - EAll = KRequestPending + 1, - /** Used when registering filters to indicate the filter is interested - in any transaction event, from any direction. - */ - EAnyTransactionEvent = KRequestPending, - /** Used when registering filters to indicate the filter is interested - in any session event. - */ - EAnySessionEvent = KSessionEventBaseStatus - }; - - /** The TTransactionEvents type defines the events that correspond to - transactions. Outgoing events originate from the client or from filters. - The clients do not send these explicitly since the API methods of - RHTTPTransaction do it on their behalf. Incoming events originate from - the protocol handler or from filters, and clients should handle these. - The ESucceeded and EFailed events are mutually exclusive, but one will - always be sent to the client as the final event for a transaction. - */ - enum TTransactionEvent - { - /** The transaction is being submitted. An outgoing event. - */ - ESubmit = KTransactionEventBaseStatus, - /** The transaction is being cancelled. An outgoing event. - */ - ECancel = KTransactionEventBaseStatus + 1, - /** A new part of request body data is available for transmission. An - outgoing event - */ - ENotifyNewRequestBodyPart = KTransactionEventBaseStatus + 2, - /** The transaction is being closed. An outgoing event. - */ - EClosed = KTransactionEventBaseStatus + 3, - /** All the response headers have been received. An incoming event. - */ - EGotResponseHeaders = KTransactionEventBaseStatus + 4, - /** Some (more) body data has been received (in the HTTP response). An - incoming event. - */ - EGotResponseBodyData = KTransactionEventBaseStatus + 5, - /** The transaction's response is complete. An incoming event. - */ - EResponseComplete = KTransactionEventBaseStatus + 6, - /** Some trailer headers have been received. An incoming event. - */ - EGotResponseTrailerHeaders = KTransactionEventBaseStatus + 7, - /** The transaction has succeeded. An incoming event. - */ - ESucceeded = KTransactionEventBaseStatus + 8, - /** The transaction has failed. This is a 'catch-all' for communicating - failures, and more details of the failure should have been notified - in previous messages or status codes. If the client could process - these then it is possible that it should not consider the transaction - a failure. For instance a browser that displays the body of 404 - responses to the user would not consider a 404 response to be a - failure, as it would display it just like a 200 response even though - a 404 will be flagged as a 'failure'. An incoming event. - */ - EFailed = KTransactionEventBaseStatus + 9, - /** Generated from RHTTPTransaction::Fail(). A filter has failed in a - way that prevents it from using the normal event mechanism to inform - the client of the error. This probably means it's run out of memory. - An incoming event. - */ - EUnrecoverableError = KTransactionEventBaseStatus + 10, - /** An event that indicates that there is too much request data to be - sent. The transaction will subsequently be cancelled. An incoming - event. - */ - ETooMuchRequestData = KTransactionEventBaseStatus + 11, - - - /** If the returned status code for a transaciton is either 301, 302 or 307 - and the requested method is NOT a GET or HEAD, then the filter sends the - client an event ERedirectRequiresConfirmation as stated in RFC2616. - - On receiving this event, the transaction is already setup with the redirected URI - and the client is required to make the decision to whether to submit the - transaction or close the transaction. - - If the requested method is GET or HEAD the transaction is automatically - redirected and this event is not used. - */ - ERedirectRequiresConfirmation = KTransactionEventBaseStatus + 12, - - /** A transaction has been specified to use a proxy and the request - requires a tunnel to be establised to the origin server. - */ - ENeedTunnel = KTransactionEventBaseStatus + 13, - - /** The client wishes to view the current cipher suite. - */ - EGetCipherSuite = KTransactionEventBaseStatus + 14, - - /** The transaction's request is complete. An incoming event. - */ - ERequestComplete = KTransactionEventBaseStatus + 15, - - /**An event to signal that 100 Continue response has been received. - */ - EReceived100Continue = KTransactionEventBaseStatus + 16, - - /**An event to cancel the wait for a 100-Continue event. - */ - ECancelWaitFor100Continue = KTransactionEventBaseStatus + 17, - - /**An event of Send Timeout for a Request. - */ - ESendTimeOut = KTransactionEventBaseStatus + 18, - - /**An event of Receive Timeout for a Response. - */ - EReceiveTimeOut = KTransactionEventBaseStatus + 19 - - }; - - /** The TDirection type defines the direction of an event. An outgoing event - originates from the client or from filters. The clients do not send these - explicitly since the API methods of RHTTPTransaction or RHTTPSession do - it on their behalf. Incoming events originate from the protocol handler - or from filters, and clients should handle these. - */ - enum TDirection - { - /** An event originating with the client (e.g. start transaction). - */ - EOutgoing, - /** An event originating with the server (e.g. something received). - */ - EIncoming - }; - - /** The TTransactionWarning type indicates that something in a transaction - may be incorrect but the transaction may continue. It may also indicate - that something (e.g. a filter) may have performed an action that has - changed the transaction and that the client should be informed of this. - */ - enum TTransactionWarning - { - /** An event indicating that the transaction has been redirected and the - original origin server indicated that it was a permanent redirection. - The URI for the transaction is now the redirected location. A - permanent redirection may require further client behavior if the - request came from a stored URI. This is to avoid further redirections - on subsequent requests for this resource. - */ - ERedirectedPermanently = KTransactionWarningBaseStatus, - /** An event indicating that the transaction has been redirected and the - original server indicated that it was a temporary redirection. - */ - ERedirectedTemporarily = KTransactionWarningBaseStatus + 1, - /** An event generated by the Protocol Handler when it receives a Content- - Length value that does not match the actual length of the body data. - */ - EMoreDataReceivedThanExpected = KTransactionWarningBaseStatus + 2 - }; - -public: // Methods - - /** Constructor - @param aStatus The status value. - @param aUID The UID. - */ - //##ModelId=3C4C187402FB - inline THTTPEvent(TInt aStatus, TUint aUID = KHTTPUid); - - /** Constructor (using a standard event and the HTTP UID) - @param aStatus The standard event to use. - */ - //##ModelId=3C4C18740304 - inline THTTPEvent(TStandardEvent aStatus = EAnyTransactionEvent); - - /** Constructor (using a transaction event and the HTTP UID) - @param aStatus The transaction event to use. - */ - //##ModelId=3C4C1874030C - inline THTTPEvent(TTransactionEvent aStatus); - - /** Assigns a standard event code to an event object - @param aStatus The standard event. - @return The HTTP event object. - */ - //##ModelId=3C4C187402EF - inline THTTPEvent& operator=(TStandardEvent aStatus); - - /** Assigns a transaction event code to an event object - @param aStatus The transaction event. - @return The HTTP event object. - */ - //##ModelId=3C4C187402F1 - inline THTTPEvent& operator=(TTransactionEvent aStatus); - - /** Equality operator - @param The HTTP event object to compare. - @return ETrue if the HTTP event objects are equal. - */ - //##ModelId=3C4C187402DA - inline TBool operator==(THTTPEvent aThat) const; - - /** Inequality operator - @param The HTTP event object to compare. - @return ETrue if the HTTP event objects are not equal. - */ - //##ModelId=3C4C187402BD - inline TBool operator!=(THTTPEvent aThat) const; - - /** Equality operator (compares with a standard event) - @param The standard event object to compare. - @return ETrue if the standard event objects are equal. - */ - //##ModelId=3C4C187402DC - inline TBool operator==(TStandardEvent aStatus) const; - - /** Inequality operator (compares with a standard event) - @param The standard event object to compare. - @return ETrue if the standard event objects are not equal. - */ - //##ModelId=3C4C187402C7 - inline TBool operator!=(TStandardEvent aStatus) const; - - /** Equality operator (compares with a transaction event) - @param The transaction event object to compare. - @return ETrue if the transaction event objects are equal. - */ - //##ModelId=3C4C187402E4 - inline TBool operator==(TTransactionEvent aStatus) const; - - /** Inequality operator (compares with a transaction event) - @param The transaction event object to compare. - @return ETrue if the transaction event objects are not equal. - */ - //##ModelId=3C4C187402D0 - inline TBool operator!=(TTransactionEvent aStatus) const; - - /** @return ETrue if the event is a session event - */ - //##ModelId=3C4C187402BC - inline TBool IsSessionEvent() const; - -public: // Attributes - - /** The status value. - */ - //##ModelId=3C4C187402B4 - TInt iStatus; - - /** The UID. - */ - //##ModelId=3C4C187402AA - TUint iUID; - -protected: // Attributes - /** Flag to indicate whether the event is a session event - */ - TBool iIsSessionEventFlag; - - }; - - -class THTTPSessionEvent : public THTTPEvent -/** -A HTTP session status message. Status messages consist of a UID and a -status code within that UID. Extension dlls that needs to create -new status messages should use their own UID and create status codes -within that UID. -@publishedAll -@released -*/ - { -public: // Enumerations - /** The TSessionEvents type defines the evenst that correspond to the - of a session entity. Outgoing events originate from the client or from - filters. Incoming events originate from the protocol handler or from - filters, and clients should handle these. - */ - enum TSessionEvent - { - /** A session connection should be initiated. An outgoing event. - */ - EConnect = KSessionEventBaseStatus, - /** The session should be disconnected. An outgoing event. - */ - EDisconnect = KSessionEventBaseStatus + 1, - /** The session has been successfully connected. None of the client - requested capabilities were denied or reduced by the proxy. An - incoming event. - */ - EConnectedOK = KSessionEventBaseStatus + 2, - /** The session has been connected, but with one or more of the client - requested capabilities denied or reduced by the proxy. An incoming - event. - */ - EConnectedWithReducedCapabilities = KSessionEventBaseStatus + 3, - /** The session has been disconnected. This either confirms an earlier - EDisconnect event or indicates a forced disconnection by the proxy. - An incoming event. - */ - EDisconnected = KSessionEventBaseStatus + 4, - /** The authentication handshake succeeded with the automatic validation - of the (proxy) server certificate. - */ - EAuthenticatedOK = KSessionEventBaseStatus + 5, - /** The authentication handshake failed. - */ - EAuthenticationFailure = KSessionEventBaseStatus + 6, - /** The connection attempt to the proxy timed out. - */ - EConnectionTimedOut = KSessionEventBaseStatus + 7 - }; - - /** - HTTP session warning events. - */ - enum TSessionWarning - { - /** The client has requested a transaction event that requires a session - to be connected or the connection to be initiated, but neither is - currently true. The transaction event will be left pending until the - session is connected. An incoming event. - */ - ENotConnected = KSessionWarningBaseStatus, - /** The proxy has sent some information that is not related to a - transaction and has no effect on the state of the session. The - information from the proxy is in the EProxyExceptionInfo property. - */ - EExceptionInfo = KSessionWarningBaseStatus + 1, - /** The client connection request was (permanently) redirected to a new - WAP proxy address. The client should check the EWspProxyAddress - property for the new address. The client's access-point database can - then be updated with this address. No notification is given of a - temporary redirection. - */ - ERedirected = KSessionWarningBaseStatus + 2, - /** The client has requested a session event that is not valid whilst - the WSP session is trying to establish a connection. - */ - EAlreadyConnecting = KSessionWarningBaseStatus + 3, - /** The client has requested a session event that is not valid whilst - the WSP session is in the Connected state. - */ - EAlreadyConnected = KSessionWarningBaseStatus + 4, - /** The client has requested a session event that is not valid whilst - the WSP session is trying to close the connection. - */ - EAlreadyDisconnecting = KSessionWarningBaseStatus + 5, - /** The client has requested a session event that is not valid whilst - the WSP session is in the Null (or disconnected) state. - */ - EAlreadyDisconnected = KSessionWarningBaseStatus + 6 - }; - -public: - /** Constructor - @param aStatus The status value. - @param aUID The UID. - */ - inline THTTPSessionEvent(TInt aStatus, TUint aUID = KHTTPUid); - - /** Constructor (using a standard event and the HTTP UID) - @param aStatus The standard event to use. - */ - inline THTTPSessionEvent(TStandardEvent aStatus = EAnySessionEvent); - - /** Constructor (using a session event and the HTTP UID) - @param aStatus The session event to use. - */ - inline THTTPSessionEvent(TSessionEvent aStatus); - - /** Assigns a session event code to an event object - @param aStatus The session event. - */ - //##ModelId=3C4C187402F9 - inline THTTPSessionEvent& operator=(TSessionEvent aStatus); - - /// Equality operator (compares with a session event) - //##ModelId=3C4C187402E6 - inline TBool operator==(TSessionEvent aStatus) const; - - /// Inequality operator (compares with a session event) - //##ModelId=3C4C187402D2 - inline TBool operator!=(TSessionEvent aStatus) const; - }; - -#include - -#endif // __THTTPEVENT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttpevent.inl --- a/epoc32/include/http/thttpevent.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -inline THTTPEvent::THTTPEvent(TInt aStatus, TUint aUID) -: iStatus(aStatus), iUID(aUID), iIsSessionEventFlag(EFalse) - { - } - -inline THTTPEvent::THTTPEvent(TStandardEvent aStatus) -: iStatus(aStatus), iUID(KHTTPUid), iIsSessionEventFlag(EFalse) - { - } - -inline THTTPEvent::THTTPEvent(TTransactionEvent aStatus) -: iStatus(aStatus), iUID(KHTTPUid), iIsSessionEventFlag(EFalse) - { - } - -inline THTTPEvent& THTTPEvent::operator=(TStandardEvent aStatus) - { - iUID = KHTTPUid; - iStatus = aStatus; - return *this; - } - -inline THTTPEvent& THTTPEvent::operator=(TTransactionEvent aStatus) - { - iUID = KHTTPUid; - iStatus = aStatus; - return *this; - } - -inline TBool THTTPEvent::operator==(THTTPEvent aThat) const - { - return (iStatus == aThat.iStatus && iUID == aThat.iUID); - } - -inline TBool THTTPEvent::operator!=(THTTPEvent aThat) const - { - return !(*this == aThat); - } - -inline TBool THTTPEvent::operator==(TStandardEvent aStatus) const - { - return (iStatus == aStatus && iUID == KHTTPUid); - } - -inline TBool THTTPEvent::operator!=(TStandardEvent aStatus) const - { - return !(*this == aStatus); - } - -inline TBool THTTPEvent::operator==(TTransactionEvent aStatus) const - { - return (iStatus == aStatus && iUID == KHTTPUid); - } - -inline TBool THTTPEvent::operator!=(TTransactionEvent aStatus) const - { - return !(*this == aStatus); - } - -inline TBool THTTPEvent::IsSessionEvent() const - { - return iIsSessionEventFlag; - } - -inline THTTPSessionEvent::THTTPSessionEvent(TInt aStatus, TUint aUID) -: THTTPEvent(aStatus, aUID) - { - iIsSessionEventFlag = ETrue; - } - -inline THTTPSessionEvent::THTTPSessionEvent(TStandardEvent aStatus) -: THTTPEvent(aStatus) - { - iIsSessionEventFlag = ETrue; - } - -inline THTTPSessionEvent::THTTPSessionEvent(TSessionEvent aStatus) -: THTTPEvent(aStatus) - { - iIsSessionEventFlag = ETrue; - } - -inline THTTPSessionEvent& THTTPSessionEvent::operator=(TSessionEvent aStatus) - { - iUID = KHTTPUid; - iStatus = aStatus; - return *this; - } - -inline TBool THTTPSessionEvent::operator==(TSessionEvent aStatus) const - { - return (iStatus == aStatus && iUID == KHTTPUid); - } - -inline TBool THTTPSessionEvent::operator!=(TSessionEvent aStatus) const - { - return !(*this == aStatus); - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttpfilterhandle.h --- a/epoc32/include/http/thttpfilterhandle.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file THTTPFilterHandle.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __THTTPFILTERHANDLE_H__ -#define __THTTPFILTERHANDLE_H__ - -// System includes -#include - - -//##ModelId=3A914DF50317 -class THTTPFilterHandle -/** -A Filter registration handle. This identifies a particular filter -registration, and is passed to the filter in MHFLoad. It is used -to identify filters for deletion and for locating the start point -for sending events. It is an opaque class; all you need to be able -to do with it is to compare them for equality. -@publishedAll -@released -*/ - { - public: - /* Note. These are negative as values for particular filters use - positive values.*/ - /** Alisases for the client, and the filters you're most likely to want - to refer to. - */ - enum TStandardValues - { - EUndefined = 0, ///< Undefined default value. - EClient = -1, ///< Placeholder for the client. - EProtocolHandler = -2, ///< Constant value for the protocol handler. - /// When sending an event from a MHFRunL, indicates the current filter. - ECurrentFilter = -3 - }; - public: - //##ModelId=3A914DF50336 - inline THTTPFilterHandle(TStandardValues aVal = EUndefined); - //##ModelId=3A914DF5032D - inline TBool operator==(THTTPFilterHandle aThat) const; - //##ModelId=3A914DF5032B - inline TBool operator!=(THTTPFilterHandle aThat) const; - private: - //##ModelId=3A914DF50323 - TInt iValue; - friend class RHTTPSession; - friend class RHTTPFilterCollection; - friend class CHTTPSession; - friend class CTransaction; - }; - -inline THTTPFilterHandle::THTTPFilterHandle(TStandardValues aVal) - : iValue(aVal) - { - } - -inline TBool THTTPFilterHandle::operator==(THTTPFilterHandle aThat) const - { - return iValue == aThat.iValue; - } - -inline TBool THTTPFilterHandle::operator!=(THTTPFilterHandle aThat) const - { - return !(*this == aThat); - } - - -#endif // __THTTPFILTERHANDLE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttpfilteriterator.h --- a/epoc32/include/http/thttpfilteriterator.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file THTTPFilterIterator.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __THTTPFILTERITERATOR_H__ -#define __THTTPFILTERITERATOR_H__ - -// System includes -#include -#include -#include - -// Forward declarations -class CHTTPSession; - - -//##ModelId=3C4C187A0152 -class THTTPFilterIterator -/** -An iterator for RHTTPFilterCollection. The iterator can iterate -over a subset of the filters in the collection, depending on how it -was created. See RHTTPFilterCollection::Query for more details. In -the documentation here, 'the collection' always refers to the -filters that this iterator can see. -@publishedAll -@released -*/ - { - public: - /** Non-initialised constructor. Note, to get an initialised one - that actualy points to a filter collection, use - RHTTPFilterCollection::Query */ - //##ModelId=3C4C187A01A2 - inline THTTPFilterIterator(); - - /** Moves the iterator to the first member of the collection */ - //##ModelId=3C4C187A019A - inline void First(); - - /** Returns ETrue if the iterator is at the end of the collection */ - //##ModelId=3C4C187A0199 - IMPORT_C TBool AtEnd() const; - - /** Moves on to the next item in the collection */ - //##ModelId=3C4C187A0198 - IMPORT_C THTTPFilterIterator& operator++(); - - /** Returns the filter that the iterator is pointing at */ - //##ModelId=3C4C187A0190 - IMPORT_C const THTTPFilterRegistration& operator()() const; - - /** Returns the filter that the iterator is pointing at */ - //##ModelId=3C4C187A018F - inline const THTTPFilterRegistration& operator*() const; - - /** Returns the filter that the iterator is pointing at */ - //##ModelId=3C4C187A018E - inline const THTTPFilterRegistration& operator->() const; - - private: - friend class RHTTPFilterCollection; - - //##ModelId=3C4C187A017C - CHTTPSession* iImplementation; - - //##ModelId=3C4C187A0172 - TInt iPos; - - //##ModelId=3C4C187A0168 - RStringTokenF iName; - }; - - -inline THTTPFilterIterator::THTTPFilterIterator() - : iImplementation(NULL), iPos(0) - { - } - -inline void THTTPFilterIterator::First() - { - iPos = -1; - operator++(); - } - -inline const THTTPFilterRegistration& THTTPFilterIterator::operator*() const - { - return operator()(); - } - -inline const THTTPFilterRegistration& THTTPFilterIterator::operator->() const - { - return operator()(); - } - - - -#endif // __THTTPFILTERITERATOR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttpfilterregistration.h --- a/epoc32/include/http/thttpfilterregistration.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file THTTPFilterRegistration.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __THTTPFILTERREGISTRATION_H__ -#define __THTTPFILTERREGISTRATION_H__ - -// System includes -#include -#include -#include - -// Forward declarations -class MHTTPFilter; - - -//##ModelId=3C4C187D0188 -class THTTPFilterRegistration -/** -A registration of a filter in the filter queue -@publishedAll -@released -*/ - { - public: - /// Default constructor - //##ModelId=3C4C187D020B - THTTPFilterRegistration(); - /// Constructor - //##ModelId=3C4C187D0214 - THTTPFilterRegistration(MHTTPFilter& aFilter, THTTPEvent aEvent, - RStringTokenF aHeader, TInt aStatusCode, - TInt aPosition, RStringTokenF aName, TInt aHandle); - /// Equality operator - //##ModelId=3C4C187D0201 - TBool operator==(THTTPFilterRegistration& aThat); - /// Inequality operator - //##ModelId=3C4C187D01F9 - TBool operator!=(THTTPFilterRegistration& aThat); - - public: - /// The position - //##ModelId=3C4C187D01F6 - TInt iPosition; // This MUST be first! - /// The filter - //##ModelId=3C4C187D01E4 - MHTTPFilter* iFilter; - /// The event it's interested in (or any) - //##ModelId=3C4C187D01D8 - THTTPEvent iEvent; - /// The header it's interested in (or any) - //##ModelId=3C4C187D01C6 - RStringTokenF iHeader; - /// The status it's interested in (or any) - //##ModelId=3C4C187D01BC - TInt iStatus; - /// The name of the filter - //##ModelId=3C4C187D01B2 - RStringTokenF iName; - /// The handle of the filter - //##ModelId=3C4C187D01A8 - TInt iHandle; - }; - -inline THTTPFilterRegistration::THTTPFilterRegistration() - : iEvent(THTTPEvent::EAll) - { - } - -inline THTTPFilterRegistration::THTTPFilterRegistration(MHTTPFilter& aFilter, - THTTPEvent aEvent, - RStringTokenF aHeader, - TInt aStatusCode, - TInt aPosition, - RStringTokenF aName, - TInt aHandle) - :iPosition(aPosition), iFilter(&aFilter), iEvent(aEvent), - iHeader(aHeader), iStatus(aStatusCode) , iName(aName), iHandle(aHandle) - { - } - - - -#endif // __THTTPFILTERREGISTRATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttphdrfielditer.h --- a/epoc32/include/http/thttphdrfielditer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file THTTPHdrFieldIter.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __THTTPHDRFIELDITER_H__ -#define __THTTPHDRFIELDITER_H__ - -// System includes -#include -#include - -// Forward declarations -class CHeaders; - - -//##ModelId=3A914DFD005C -class THTTPHdrFieldIter -/** -Iterator class to iterate the fields within a RHTTPHeaders. -@publishedAll -@released -*/ - { -public: - /** Construct an iterator for the fields of the supplied header collection. - @param aHeaders The header collection whose fields we want to iterate - */ - //##ModelId=3A914DFD0087 - THTTPHdrFieldIter(const CHeaders* aHeaders); - /** Class destructor - */ - //##ModelId=3A914DFD0086 - IMPORT_C ~THTTPHdrFieldIter(); - - /** Reset iterator to point at the first field in the header collection - */ - //##ModelId=3A914DFD0085 - IMPORT_C void First(); - - /** Check if the iterator is at the end of the collection. If so, - further calls to operator() will return NULL. - @return True if the iterator has reached the end of the header - fields - */ - //##ModelId=3A914DFD0084 - IMPORT_C TBool AtEnd() const; - - /** Advance the iterator to the next field. - @return True if the iterator still points at a valid part - after advancing. - */ - //##ModelId=3A914DFD007E - IMPORT_C void operator++(); - - /** Obtain the name of the header field currently pointed at by - the iterator. - @return The field name; or if the iterator has - gone off the end of the header collection - */ - //##ModelId=3A914DFD007D - IMPORT_C RStringTokenF operator()(); - -private: - - /** Check the iterator state for invalidity following deletions in the collection - */ - //##ModelId=3BA613240002 - void CheckInvalidation(); - - /** The headers whose fields we are iterating. - */ - //##ModelId=3A914DFD007A - const CHeaders* iHeaders; - /** The index of the field in the header that is currently pointed - at by the iterator - */ - //##ModelId=3A914DFD0072 - TInt iPosIdx; - }; - -inline THTTPHdrFieldIter::THTTPHdrFieldIter(const CHeaders* aHeaders) - : iHeaders(aHeaders) - { - First(); - } - - -#endif // __THTTPHDRFIELDITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/http/thttphdrval.h --- a/epoc32/include/http/thttphdrval.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,280 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file THTTPHdrVal.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __THTTPHDRVAL_H__ -#define __THTTPHDRVAL_H__ - -// System includes -#include -#include - - -//##ModelId=3C4C187E027A -class THTTPHdrVal -/** -A representation of a value found in an HTTP header field. Three -fundamental types are used in HTTP - integers, strings (which may -be free text, 'enumeration values', URIs, etc. or date/times. - -The class allows any of the three values to be held and the current -value (as well as its type) to be determined. - -THTTPHdrVal instances are used to assign values to header fields, their -parts and their associated parameters. -@publishedAll -@released -@see RHTTPHeaders -*/ - { -public: - /** - @enum THTTPValType - */ - typedef enum { - KTIntVal = 0x00, /**< the value is an integer*/ - KStrVal = 0x01, /**< the value is a case-sensitive string*/ - KDateVal = 0x02, /**< the value is a date/time*/ - KStrFVal = 0x03, /**< the value is a case-insensitive string*/ - KNoType = 0x04 /**< no value has yet been set*/ - } THTTPValType; - -public: // classes - - // A converter for 'q' parameter values; apparently real numbers in the HTTP RFC but here passed as fixed point -//##ModelId=3B1E66F2024E - class TQConv - { - public: - /// Construct from a real number representation of 'q' - //##ModelId=3B1E66F20282 - TQConv(TReal aQ); - - /// Construct from a fixed-point representation of 'q' - //##ModelId=3B1E66F2028C - TQConv(TInt aQ); - - /// Integer cast operator to get the fixed-point representation - //##ModelId=3B1E66F20281 - operator TInt() const; - - /// TReal cast operator to get the real number representation - //##ModelId=3B1E66F20280 - operator TReal() const; - private: - /// The real number q-value - //##ModelId=3B1E66F2027A - TReal iQ; - /// The integer fixed-point q-value representation - //##ModelId=3B1E66F2026E - TInt iFQ; - }; - -public: - /** Default constructor - Used when constructing an empty header value that is to be filled in by - a call to a function. e.g. RHTTPHeaders::GetField - */ - IMPORT_C THTTPHdrVal(); - - /** Constructor for an integer field value - @param aIntVal The integer value - */ - IMPORT_C THTTPHdrVal(TInt aIntVal); - - /** Constructor for an string value - @param aStrVal The string value - */ - IMPORT_C THTTPHdrVal(RStringF aStrVal); - /** Constructor for an string value - @param aStrVal The string value - */ - IMPORT_C THTTPHdrVal(RString aStrVal); - - /** Constructor for an date/time value - @param aDateVal The date/time value - */ - IMPORT_C THTTPHdrVal(TDateTime aDateVal); - - /** Obtain a copy of this header value. This is critical when the header contains a string, since - a new string reference must be created - @return The copied header value - */ - //##ModelId=3C4C187E02F3 - IMPORT_C THTTPHdrVal Copy() const; - - /** Determine the type of this header field value - @return A THTTPValType enumeration describing the value's type - */ - //##ModelId=3C4C187E02F2 - IMPORT_C THTTPValType Type() const; - - /** Obtain the (integer) value held within - Panics if the value is of the wring type - @pre Requires that the object was previously set to hold a TInt - @return An integer value - */ - //##ModelId=3C4C187E02EA - IMPORT_C TInt Int() const; - - /** Cast operator to obtain the HTTP value as an integer. - Note this doesn't convert from a different form to integer! - Panics if the value is of the wrong type - @pre Requires that the object was previously set to hold a TInt - */ - //##ModelId=3C4C187E02E9 - inline operator TInt() const; - - /** Obtain the (string) value held within - Panics if the value is of the wring type - @pre Requires that the object was previously set to hold a string - @return A string - */ - //##ModelId=3C4C187E02E8 - IMPORT_C RStringF StrF() const; - //##ModelId=3C4C187E02E0 - IMPORT_C RString Str() const; - - /** Cast operator to obtain the HTTP value as a string. - Note this doesn't convert from a different form to string! - Panics if the value is of the wring type - @pre Requires that the object was previously set to hold a string - */ - //##ModelId=3C4C187E02DF - inline operator RStringF() const; - /** Cast operator to obtain the HTTP value as a string. - Note this doesn't convert from a different form to string! - Panics if the value is of the wring type - @pre Requires that the object was previously set to hold a string - */ - //##ModelId=3C4C187E02DE - inline operator RString() const; - - /** Obtain the (date/time) value held within. - Panics if the value is of the wrong type - @pre Requires that the object was previously set to hold a TDateTime - @return An date/time value - */ - //##ModelId=3C4C187E02D6 - IMPORT_C TDateTime DateTime() const; - - /** Cast operator to obtain the HTTP value as an date/time. - Note this doesn't convert from a different form to date! - Panics if the value is of the wring type - @pre Requires that the object was previously set to hold a TDateTime - */ - //##ModelId=3C4C187E02D5 - inline operator TDateTime() const; - - /** Set the header value to be the supplied integer. - @warning Any previous value, or its type, are lost. - @param aIntVal The integer value - */ - //##ModelId=3C4C187E02CC - IMPORT_C void SetInt(TInt aIntVal); - - /** Set the header value to be the supplied string. - @warning Any previous value, or its type, are lost. - @param aStrVal The string value - */ - //##ModelId=3C4C187E02CA - IMPORT_C void SetStrF(RStringF aStrVal); - /** Set the header value to be the supplied string. Any previous - value, or its type, are lost. - @param aStrVal The string value */ - //##ModelId=3C4C187E02C2 - IMPORT_C void SetStr(RString aStrVal); - - /** Set the header value to be the supplied date/time. Any previous value, or its type, are lost. - @param aDateVal The date/time value - */ - //##ModelId=3C4C187E02C0 - IMPORT_C void SetDateTime(TDateTime aDateVal); - - /** Comparison operator. Does a comparison based on the current type. - @param aVal The header value to compare. */ - //##ModelId=3C4C187E02B8 - IMPORT_C TBool operator==(THTTPHdrVal aVal) const; - - /** Comparison operator. Does a comparison based on the current type. - @param aVal The string to compare. */ - //##ModelId=3C4C187E02B6 - IMPORT_C TBool operator!=(THTTPHdrVal aVal) const; - -private: - /** - The current type - */ - //##ModelId=3C4C187E02AC - THTTPValType iType; - - /** - The value - */ - //##ModelId=3C4C187E02A4 - TInt iVal; - //##ModelId=3C4C187E029A - TInt iMoreSpace; - }; - -inline THTTPHdrVal::TQConv::TQConv(TReal aQ) - : iQ(aQ), iFQ((TInt)(iQ*1000)) - { - } - -inline THTTPHdrVal::TQConv::TQConv(TInt aFQ) - : iQ((TReal)(aFQ/1000.)), iFQ(aFQ) - { - } - -inline THTTPHdrVal::TQConv::operator TInt() const - { - return iFQ; - } - -inline THTTPHdrVal::TQConv::operator TReal() const - { - return iQ; - } - -inline THTTPHdrVal::operator TInt() const - { - return Int(); - } - -inline THTTPHdrVal::operator RStringF() const - { - return StrF(); - } - -inline THTTPHdrVal::operator RString() const - { - return Str(); - } - -inline THTTPHdrVal::operator TDateTime() const - { - return DateTime(); - } - - - -#endif // __THTTPHDRVAL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/httperr.h --- a/epoc32/include/httperr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,882 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file httperr.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __HTTPERR_H__ -#define __HTTPERR_H__ - -// System includes -#include - -//##ModelId=3C4C18750141 -class HTTPStatus -/** -The complete set of HTTP Status codes, as defined in RFC2616. -@publishedAll -@released -*/ - { -public: - enum - { - /** 'Informational' range of codes 1xx - */ - /** Continue. - */ - EContinue = 100, - /** Switching Protocols. - */ - ESwitchingProtocols = 101, - /** 'Successful' range of codes 2xx - */ - /** Ok. - */ - EOk = 200, - /** Created. - */ - ECreated = 201, - /** The entry has been accepted. - */ - EAccepted = 202, - /** Non-Authoritative Information. - */ - ENonAuthoritativeInfo = 203, - /** No Content. - */ - ENoContent = 204, - /** Reset Content. - */ - EResetContent = 205, - /** Partial Content. - */ - EPartialContent = 206, - /** 'Redirection' range of codes 3xx - */ - /** Multiple Choices. - */ - EMultipleChoices = 300, - /** Moved Permanently. - */ - EMovedPermanently = 301, - /** Found. - Note, this is deprecated in HTTP/1.1 - 307 will be used instead - */ - EFound = 302, - /** See Other. - */ - ESeeOther = 303, - /** Not Modified. - */ - ENotModified = 304, - /** Use Proxy. - */ - EUseProxy = 305, - /** Unused. - */ - EUnused = 306, - /** Temporary Redirect. - */ - ETemporaryRedirect = 307, - /** 'Client Error' range of codes 4xx - */ - /** Bad Request. - */ - EBadRequest = 400, - /** Unauthorized. - */ - EUnauthorized = 401, - /** Payment Required. Note, this is reserved in HTTP/1.1 - */ - EPaymentRequired = 402, - /** Forbidden. - */ - EForbidden = 403, - /** Not Found. - */ - ENotFound = 404, - /** Method Not Allowed. - */ - EMethodNotAllowed = 405, - /** Not Acceptable. - */ - ENotAcceptable = 406, - /** Proxy Authentication Required. - */ - EProxyAuthenticationRequired = 407, - /** Request Timeout. - */ - ERequestTimeout = 408, - /** Conflict. - */ - EConflict = 409, - /** Gone. - */ - EGone = 410, - /** Length Required. - */ - ELengthRequired = 411, - /** Precondition Failed. - */ - EPreconditionFailed = 412, - /** Request Entity Too Large. - */ - ERequestEntityTooLarge = 413, - /** Request-URI Too Long. - */ - ERequestURITooLong = 414, - /** Unsupported Media Type. - */ - EUnsupportedMediaType = 415, - /** Requested Range Not Satisfiable. - */ - ERequestedRangeNotSatisfiable = 416, - /** Expectation Failed. - */ - EExpectationFailed = 417, - /** 'Server Error' range of codes 5xx - */ - /** Internal Server Error. - */ - EInternalServerError = 500, - /** Not Implemented. - */ - ENotImplemented = 501, - /** Bad Gateway. - */ - EBadGateway = 502, - /** Service Unavailable. - */ - EServiceUnavailable = 503, - /** Gateway Timeout. - */ - EGatewayTimeout = 504, - /** HTTP Version Not Supported. - */ - EHTTPVersionNotSupported = 505 - }; - - /** Is the supplied status code in the 1xx Informational range? - @param aStatus Is the supplied status code in the 1xx Informational range? - @return ETrue if the specified status code is in the 1xx Informational range. - ##ModelId=3C4C18750162 - */ - inline static TBool IsInformational(TInt aStatus); - - - /** Is the supplied status code in the 2xx Successful range? - @param aStatus Is the supplied status code in the 2xx Successful range? - @return ETrue if the specified status code is in the 2xx Successful range - ##ModelId=3C4C18750160 - */ - inline static TBool IsSuccessful(TInt aStatus); - - /** Is the supplied status code in the 3xx Redirection range? - @param aStatus Is the supplied status code in the 3xx Redirection range? - @return ETrue if the specified status code is in the 3xx Redirection range. - ##ModelId=3C4C18750159 - */ - inline static TBool IsRedirection(TInt aStatus); - - /** Is the supplied status code in the 4xx Client Error range? - @param aStatus Is the supplied status code in the 4xx Client Error range? - @return ETrue if the specified status code is in the 4xx Client Error range. - ##ModelId=3C4C18750157 - */ - inline static TBool IsClientError(TInt aStatus); - - /** Is the supplied status code in the 5xx Server Error range? - @param aStatus Is the supplied status code in the 5xx Server Error range? - @return ETrue if the specified status code is in the 5xx Server Error range. - ##ModelId=3C4C18750155 - */ - inline static TBool IsServerError(TInt aStatus); - }; - -// -// HTTP Panic codes -// - -#include - -// HTTPPanic::Panic(HTTPPanic:: ) - -//##ModelId=3C4C18740352 -class HTTPPanic -/** -HTTP panic codes -@publishedAll -@released -*/ - { -public: - enum THTTPPanic - { - /** RHTTPSession session is already open. ( Panic HTTP-CORE 0 ) - */ - ESessionAlreadyOpen, - /** Specified field is missing. ( Panic HTTP-CORE 1 ) - */ - EHeaderFieldMissing, - /** Unused. ( Panic HTTP-CORE 2 ) - */ - EHeaderParamMissing, - /** Unused. ( Panic HTTP-CORE 2 ) - */ - EHeaderInvalidPart, - /** Mismatch between header's type and its attempted use. ( Panic HTTP-CORE 4 ) - */ - EHeaderInvalidType, - /** Unused. ( Panic HTTP-CORE 5 ) - */ - ETransactionEventOutstanding, - /** A transaction error occurred, and the MHFRunError() in use didn't handle it. ( Panic HTTP-CORE 6 ) - */ - ETransactionUnhandledError, - /** Attempted to add a filter while there is a transaction outstanding. ( Panic HTTP-CORE 6 ) - */ - EAddingFilterWithOutstandingTransactions, - /** Attempted to add a filter at a position not between the protocol handler and the client. ( Panic HTTP-CORE 8 ) - */ - EFilterInvalidPosition, - /** CHTTPEncoder object destroyed without its data being released. ( Panic HTTP-CORE 9 ) - */ - EHTTPFormDataUnreleased, - /** CHTTPEncoder object at the wrong state for adding data. ( Panic HTTP-CORE 10 ) - */ - EHTTPFormSupplyingData, - /** Unused. ( Panic HTTP-CORE 11 ) - */ - EValidationFilterFailure, - /** Invalid request data. ( Panic HTTP-CORE 12 ) - */ - EInvalidTxData, - /** Invalid response data. ( Panic HTTP-CORE 13 ) - */ - EInvalidRxData, - /** Unused. ( Panic HTTP-CORE 14 ) - */ - ENoTransportHandlerSet, - /** Unused. ( Panic HTTP-CORE 15 ) - */ - EAuthenticationFilterBadState, - /** An invalid filter handle was specified. ( Panic HTTP-CORE 16 ) - */ - EInvalidFilterHandle - }; - - //##ModelId=3C4C18740366 - static void Panic(THTTPPanic aPanic); - }; - -// HTTP external errors/leave codes. Add new sub-ranges at the end; do not insert between the sub-ranges that -// are already here. This is to allow a client to reasonably check for errors between two adjacent range -// base values rather than check for individual codes. - -/** -Base value for the HTTP error code range (-7200 to -7399) -@publishedAll -@released -*/ -const TInt KHttpErrorBase = -7200; - -// -// Text mode HTTP protocol handler -// - -/** -Codec encoding errors for HTTP headers -@publishedAll -@released -*/ -const TInt KHttpHeaderEncodeErrorBase = KHttpErrorBase; - -/** -Error making a default encoding of unrecognised headers -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDefault = KHttpHeaderEncodeErrorBase; -/** -Error encoding the Accept field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeAccept = KHttpHeaderEncodeErrorBase - 1; -/** -Error encoding the Accept-Charset field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeAcceptCharset = KHttpHeaderEncodeErrorBase - 2; -/** -Error encoding a q-value parameter -@publishedAll -@released -*/ -const TInt KErrHttpEncodeQValue = KHttpHeaderEncodeErrorBase - 3; -/** -Error encoding the Authorization field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeAuthorization = KHttpHeaderEncodeErrorBase - 4; -/** -Error encoding Basic credentials -@publishedAll -@released -*/ -const TInt KErrHttpEncodeBasicAuth = KHttpHeaderEncodeErrorBase - 5; -/** -Error encoding Digest credentials -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDigestAuth = KHttpHeaderEncodeErrorBase - 6; -/** -Error encoding the Connection field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeConnection = KHttpHeaderEncodeErrorBase - 7; -/** -Error encoding the Content-Length field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeContentLength = KHttpHeaderEncodeErrorBase - 8; -/** -Error encoding the Content-Type field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeContentType = KHttpHeaderEncodeErrorBase - 9; -/** -Error encoding the Host field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeHost = KHttpHeaderEncodeErrorBase - 10; -/** -Error encoding the Host field's port parameter -@publishedAll -@released -*/ -const TInt KErrHttpEncodeHostPort = KHttpHeaderEncodeErrorBase - 11; -/** -Error encoding the Transfer-Encoding field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeTransferEncoding = KHttpHeaderEncodeErrorBase - 12; -/** -Error encoding the User-Agent field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeUserAgent = KHttpHeaderEncodeErrorBase - 13; -/** -Error encoding the Date field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDate = KHttpHeaderEncodeErrorBase - 14; -/** -Error encoding the Cookie field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeCookie = KHttpHeaderEncodeErrorBase - 15; -/** -Error encoding the Cache-Control field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeCacheControl = KHttpHeaderEncodeErrorBase - 16; -/** -Error encoding the Pragma field -@publishedAll -@released -*/ -const TInt KErrHttpEncodePragma = KHttpHeaderEncodeErrorBase - 17; -/** -Error encoding the if match field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeIfMatch = KHttpHeaderEncodeErrorBase - 18; -/** -Error encoding the if none match field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeIfNoneMatch = KHttpHeaderEncodeErrorBase - 19; -/** -Error encoding the if modified since field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeIfModifiedSince = KHttpHeaderEncodeErrorBase - 20; -/** -Error encoding the if unmodified since field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeIfUnmodifiedSince = KHttpHeaderEncodeErrorBase - 21; -/** -Error encoding the Cookie2 field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeCookie2 = KHttpHeaderEncodeErrorBase - 22; -/** -Error encoding the Content-Language field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeContentLanguage = KHttpHeaderEncodeErrorBase - 23; -/** -Error encoding the WWWAuthenticate field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDoWWWAuthenticate = KHttpHeaderEncodeErrorBase - 24; -/** -Error encoding the Age field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDoAge = KHttpHeaderEncodeErrorBase - 25; -/** -Error encoding the Vary field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDoVary = KHttpHeaderEncodeErrorBase - 26; -/** -Error encoding the Content-Language field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeDoContentLanguage = KHttpHeaderEncodeErrorBase - 27; -/** -Error encoding the Content-Encoding field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeContentEncoding = KHttpHeaderEncodeErrorBase - 28; -/** -Error encoding the Content-Location field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeContentLocation = KHttpHeaderEncodeErrorBase - 29; -/** -Error encoding the Content-MD5 field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeContentMD5 = KHttpHeaderEncodeErrorBase - 30; -/** -Error encoding the Accept-Encoding field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeAcceptLanguage = KHttpHeaderEncodeErrorBase - 31; -/** -Error encoding the Accept-Language field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeAcceptEncoding = KHttpHeaderEncodeErrorBase - 32; -/** -Error encoding the TE field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeTE = KHttpHeaderEncodeErrorBase - 33; -/** -Error encoding the Upgrade field -@publishedAll -@released -*/ -const TInt KErrHttpEncodeUpgrade = KHttpHeaderEncodeErrorBase - 34; - -/** -Codec decoding errors for values found in HTTP headers -@publishedAll -@released -*/ -const TInt KHttpValueDecodeErrorBase = KHttpErrorBase - 60; - -/** -General formatting error for date values -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedDate = KHttpValueDecodeErrorBase; -/** -Malformed year -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedYear = KHttpValueDecodeErrorBase - 1; -/** -Malformed short month name -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedMonth = KHttpValueDecodeErrorBase - 2; -/** -Malformed number of day in month -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedDay = KHttpValueDecodeErrorBase - 3; -/** -Malformed short day name -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedWkDay = KHttpValueDecodeErrorBase - 4; -/** -Malformed long day name -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedWeekDay = KHttpValueDecodeErrorBase - 5; -/** -Malformed integer value -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedInteger = KHttpValueDecodeErrorBase - 6; -/** -Malformed quoted string -@publishedAll -@released -*/ -const TInt KErrHttpDecodeMalformedQuotedStr = KHttpValueDecodeErrorBase - 7; - -/** -Codec decoding errors for HTTP headers -@publishedAll -@released -*/ -const TInt KHttpHeaderDecodeErrorBase = KHttpErrorBase - 70; - -/** -Error decoding the Accept field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeAccept = KHttpHeaderDecodeErrorBase; -/** -Error decoding the Connection field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeConnection = KHttpHeaderDecodeErrorBase - 1; -/** -Error decoding the Content-Length field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeContentLength = KHttpHeaderDecodeErrorBase - 2; -/** -Error decoding the Content-Type field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeContentType = KHttpHeaderDecodeErrorBase - 3; -/** -Error decoding the Transfer-Encoding field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeTransferEncoding = KHttpHeaderDecodeErrorBase - 4; -/** -Error decoding the WWWAuthenticate field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeWWWAuthenticate = KHttpHeaderDecodeErrorBase - 5; -/** -The WWWAuthenticate field contained an unrecognised authentication scheme -@publishedAll -@released -*/ -const TInt KErrHttpDecodeUnknownAuthScheme = KHttpHeaderDecodeErrorBase - 6; -/** -Error decoding a Basic WWWAuthenticate challenge -@publishedAll -@released -*/ -const TInt KErrHttpDecodeBasicAuth = KHttpHeaderDecodeErrorBase - 7; -/** -Error decoding a Digest WWWAuthenticate challenge -@publishedAll -@released -*/ -const TInt KErrHttpDecodeDigestAuth = KHttpHeaderDecodeErrorBase - 8; -/** -Error decoding a Set-Cookie field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeCookie = KHttpHeaderDecodeErrorBase - 9; -/** -Error decoding the Authorization field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeAuthorization = KHttpHeaderDecodeErrorBase - 10; -/** -Error decoding the Accept-Charset field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeAcceptCharset = KHttpHeaderDecodeErrorBase - 11; -/** -Error decoding the Accept-Language field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeAcceptLanguage = KHttpHeaderDecodeErrorBase - 12; -/** -Error decoding the Accept-Encoding field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeAcceptEncoding = KHttpHeaderDecodeErrorBase - 13; -/** -Error decoding the TE field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeTE = KHttpHeaderEncodeErrorBase - 14; -/** -Error decoding the Expect field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeExpect = KHttpHeaderEncodeErrorBase - 15; -/** -Error decoding the Content-Disposition field -@publishedAll -@released -*/ -const TInt KErrHttpDecodeContentDisposition = KHttpHeaderDecodeErrorBase - 14; -/** -Response errors. These represent specific failure cases -@publishedAll -@released -*/ -const TInt KErrHttpResponseFailureBase = KHttpErrorBase - 100; - -/** -A uri redirected too many times, possibly indicating a circular redirection -@publishedAll -@released -*/ -const TInt KErrHttpRedirectExceededLimit = KErrHttpResponseFailureBase; -/** -A server responded that the uri must be fetched via a proxy -@publishedAll -@released -*/ -const TInt KErrHttpRedirectUseProxy = KErrHttpResponseFailureBase - 1; -/** -A server sent a redirection response that did not include a Location header -@publishedAll -@released -*/ -const TInt KErrHttpRedirectNoLocationField = KErrHttpResponseFailureBase - 2; -/** -An error occured in parsing which left the parser in a unknown state -@publishedAll -@released -*/ -const TInt KErrHttpUnknownParseState = KErrHttpResponseFailureBase - 3; - -/** -Request building errors: cause the Validation Filter to make a transaction fail and terminate -@publishedAll -@released -*/ -const TInt KErrHttpReqBuildErrorBase = KHttpErrorBase - 130; - -/** -A body is provided with a method that doesn't allow bodys to be transmitted -@publishedAll -@released -*/ -const TInt KErrHttpRequestHasBody = KErrHttpReqBuildErrorBase; -/** -A body is missing from a method that requires it -@publishedAll -@released -*/ -const TInt KErrHttpRequestBodyMissing = KErrHttpReqBuildErrorBase - 1; -/** -Should contain The Max-Forward header -@publishedAll -@released -*/ -const TInt KErrHttpTraceReqWithoutMaxForwardHeader = KErrHttpReqBuildErrorBase - 2; -/** -Body must NOT be sent chunked if using HTTP/1.0 -@publishedAll -@released -*/ -const TInt KErrHttpPostReqBodyWithoutSizeOnHTTP10 = KErrHttpReqBuildErrorBase - 3; -/** -Request contained a response header or a entity header but no body -@publishedAll -@released -*/ -const TInt KErrHttpInvalidHeaderInRequest = KErrHttpReqBuildErrorBase - 4; -/** -Missing but required header errors -@publishedAll -@released -*/ - -const TInt KErrHttpMissingHeaderBase = KHttpErrorBase - 160; -/** -A body was provided in the request but no Content-Type header was set -@publishedAll -@released -*/ - -const TInt KErrHttpEntityHeaderMissingContentType = KErrHttpMissingHeaderBase; -/** -The request URI was relative, but no Host header was set to indicate a server to connect to -@publishedAll -@released -*/ -const TInt KErrHttpGeneralHeaderMissingHost = KErrHttpMissingHeaderBase - 1; -/** -Protocol handler errors -@publishedAll -@released -*/ -const TInt KErrHttpProtocolHandlerBase = KHttpErrorBase - 170; -/** -The request body needed to be rewound but the client but it doesn't support -@publishedAll -@released -*/ -const TInt KErrHttpCantResetRequestBody = KErrHttpProtocolHandlerBase; -/** -The Protocol handler is not initialised -@publishedAll -@released -*/ -const TInt KErrHttpProtTransactionNotInitialised = KErrHttpProtocolHandlerBase -1; -/** -Unable to establish a tunnel. -@publishedAll -@released -*/ -const TInt KErrHttpCannotEstablishTunnel = KErrHttpProtocolHandlerBase -2; -/** -Invalid URI -@publishedAll -@released -*/ -const TInt KErrHttpInvalidUri = KErrHttpProtocolHandlerBase -3; -/** -Protocol handler experienced a non-pipelining error -@publishedAll -@released -*/ -const TInt KErrHttpNonPipeliningError = KErrHttpProtocolHandlerBase -4; -/** -Protocol handler experienced a pipelining error -@publishedAll -@released -*/ -const TInt KErrHttpPipeliningError = KErrHttpProtocolHandlerBase -5; - -/** -The request has been not sent for the transaction and connection has been disconnected. -This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property -is set with a value HTTP::EEnableDisconnectNotification - -@publishedAll -@released -*/ -const TInt KErrHttpRequestNotSent = KErrHttpProtocolHandlerBase -6; - -/** -The response has been not received for the transaction and connection has been disconnected. -This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property is -set with a value HTTP::EEnableDisconnectNotification - -@publishedAll -@released -*/ -const TInt KErrHttpResponseNotReceived = KErrHttpProtocolHandlerBase -7; - -/** -Partial response has been received and connection has been disconnected. This error will be -propagated to the client only, if the HTTP:ENotifyOnDisconnect property is set with a value -HTTP::EEnableDisconnectNotification - -@publishedAll -@released -*/ -const TInt KErrHttpPartialResponseReceived = KErrHttpProtocolHandlerBase -8; - -/** -ClientApplication wants to fail the transaction that was in process by the HTTPMessageParser -@publishedAll -@released -*/ -const TInt KErrHttpOptimiserFailsTrans = KErrHttpProtocolHandlerBase -9; - -// end of error codes - maximum error value is -7399 - must not be exceeded! -// Inline methods from HTTPStatus - -inline TBool HTTPStatus::IsInformational(TInt aStatus) - { - return ((aStatus >= HTTPStatus::EContinue) && (aStatus < HTTPStatus::EOk)); - } -inline TBool HTTPStatus::IsSuccessful(TInt aStatus) - { - return ((aStatus >= HTTPStatus::EOk) && (aStatus < HTTPStatus::EMultipleChoices)); - } -inline TBool HTTPStatus::IsRedirection(TInt aStatus) - { - return ((aStatus >= HTTPStatus::EMultipleChoices) && (aStatus < HTTPStatus::EBadRequest)); - } -inline TBool HTTPStatus::IsClientError(TInt aStatus) - { - return ((aStatus >= HTTPStatus::EBadRequest) && (aStatus < HTTPStatus::EInternalServerError)); - } -inline TBool HTTPStatus::IsServerError(TInt aStatus) - { - return (aStatus >= HTTPStatus::EInternalServerError); - } - - - -#endif // __HTTPERR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/httpstd.h --- a/epoc32/include/httpstd.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Purpose: This file sets the values for HTTP's return/error codes and -// panic codes. -// -// - -#if !defined(__HTTPSTD_H__) -#define __HTTPSTD_H__ - -// System includes -// -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__WAPENGSTD_H__) -#include -#endif - -enum -/** -Base values of code ranges -@publishedAll -@deprecated -*/{ - EHttpRetCodeBase = -20000, - EHttpPanicCodeBase = EHttpRetCodeBase - 200 - }; - -typedef enum -/** -Return/leave codes for HTTPUTIL and HTTP plugins -@publishedAll -@deprecated -*/ - { - // Informational (+ve) status codes - EHttp_401_Unauthorized = KHttpPluginStatusBase + 401,// occurs when HTTP authentication is used, username/password dialogs raised as a response. Need to consider how UI deals with authentication failures here. - EHttpAuthenticationAborted = KHttpPluginStatusBase + 11,// The user cancelled the password box - EHttpAuthenticationFailed = KHttpPluginStatusBase + 10,// The user's password was rejected by the origin server - EHttpNoError = KErrNone, // No error - // Error (-ve) status codes - EHttpGeneralError = EHttpRetCodeBase, // Unspecified error condition - EHttpCannotFindServer = EHttpRetCodeBase - 1, // URL specified a non-existent or inaccessible domain - EHttpCannotFindPlugin = EHttpRetCodeBase - 2, // Plug-in server failed to create an HTTP plugin - EHttpUnsupportedMethod = EHttpRetCodeBase - 3, // An HTTP method was specified that is not supported - EHttpWapAPReadFailure = EHttpRetCodeBase - 4, // An error occurred when reading the WAP AP from CommsDB - EHttpNetDialSetupFailed = EHttpRetCodeBase - 5, // Failed to configure Net Dial - EHttpWtlsConfigFailed = EHttpRetCodeBase - 6, // Failed to configure the WTLS layer of the WAP Stack - EHttpWtlsBadServerCert = EHttpRetCodeBase - 7, // WTLS rejected the certificate obtained from the WAP GW - EHttpWtlsServerCertRejected = EHttpRetCodeBase - 8, // The user rejected the certificate from the WAP GW - EHttpWtlsCipherRejected = EHttpRetCodeBase - 9, // The user rejected the cipher strength negotiated in WTLS - EHttpGatewayCannotBeReached = EHttpRetCodeBase - 10,// A session could not be established with the WAP Gateway - EHttpGatewayTransactionAbort = EHttpRetCodeBase - 11,// A transaction was aborted by the gateway or the stack - EHttpGatewaySessionDisconnect = EHttpRetCodeBase - 12,// The session was disconnected by the WAP Gateway - EHttpCancellationAbort = EHttpRetCodeBase - 13,// Error code for leave when cancellation has occured during RunL() - EHttpReceivingErrorDeck = EHttpRetCodeBase - 14 // Could not find document, so receiving an error deck - } THttpReturnCode; - -// Note that HTTP Status codes series 40x and 50x are error conditions. They -// will be added to the EHttpRetCodeBase to send to the HTTP Data Provider -// observer. e.g. HTTP/404 will become EHttpRetCodeBase-404 = -20404. The -// exception to this rule is HTTP/401, which gets fully handled in HTTP and -// so is treated above as an informational status message. - -typedef enum -/** -Panic codes for HTTPUTIL and HTTP plugins -@publishedAll -@deprecated -*/ - { - EHttpGeneralPanic = EHttpPanicCodeBase, // Unspecified panic condition - EHttpDialInNotSupported = EHttpPanicCodeBase - 1, // The WAP Access Point specified a dial-in ISP! - EHttpWapAccessPointInfoChanged = EHttpPanicCodeBase - 2, // The WAP AP info changed between initial read and - // the subsequent NetDial override (debug only) - EHttpCommDBContainsBadData = EHttpPanicCodeBase - 3, // Comms DB contains garbled/inconsistent WAP AP data - EHttpConnectionLessNotSupported = EHttpPanicCodeBase - 4, // Comms DB specified a CL mode, which isn't available (yet) - EHttpNoHandlerAvailable = EHttpPanicCodeBase - 5, // Very bad situation for HTTP Methods - EHttpResourceFileLoadFailed = EHttpPanicCodeBase - 6, // Resource file missing or corrupt - EHttpReservedForFutureExpansion = EHttpPanicCodeBase - 7 // Feature not available - reserved for BC only - } THttpPanicCode; - - -#endif // __HTTPSTD_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/iapprefs.h --- a/epoc32/include/iapprefs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef IAPPrefs__ -#define IAPPrefs__ - - - - -#include -#include -#include -#include - -// Note: Version 1 = EPOC6.1 -// Version 2 = EPOC6.2 / Hurricane -const TInt KImIAPPreferencesVersion = 2; // identify which version of this class has been stored - -// for builds which don't define it. -/* -enum TCommDbDialogPref - { - ECommDbDialogPrefUnknown =0, - ECommDbDialogPrefPrompt, - ECommDbDialogPrefWarn, - ECommDbDialogPrefDoNotPrompt - }; -*/ - -class TImIAPChoice -/** Sets the connection dialog preference to be used with a particular IAP used -for an internet mail service. - -The connection control component (GenConn) allows various options for whether -or not the user should be should be prompted with a dialog at connect time. -For example, a connection using the first choice GPRS IAP might not show a -dialog, but a second choice connection using GSM might bring up a warning. -@publishedAll -@released -*/ - { - public: - /** The IAP identifier, as specified in the CommDb record for the IAP. */ - TUint32 iIAP; - /** Preference for what type of dialog is shown before a connection is made using - the specified IAP. */ - TCommDbDialogPref iDialogPref; - }; - -class CImIAPPreferences : public CBase -/** Encapsulates preferences relating to IAPs for an email service. - -An IAP defines all of the variable factors that determine how an Internet -connection is made. These variable factors can include the bearer (CDMA, GSM -or GPRS), dial-in number. network login names and passwords. - -The Comms Database is capable of storing details of several IAPs, which can -then be used to initiate different types of connection. The database also -stores the preference order of the IAPs: this defines which IAP should be -used as the first choice, and also an optional second choice to be used if -the first choice is not available. - -The CImIAPPreferences class associates a first choice, and optionally a second -choice IAP to use with a particular email service. The preference object is -stored in the service entry's message store. - -For SMTP, if no object has been stored in the service, then the SMTP client -will attempt to use any default Internet settings in the Comms Database, or -will use the existing Internet connection if one does already exist. Note -that SMTP sessions will normally fail to send any email messages if the SMTP -session is not created using an IAP which the SMTP server does not accept. - -Note that in Symbian OS v6.0 a single IAP was associated with an email service -entry through the iMtmData1 field. -@publishedAll -@released -*/ - { - public: - IMPORT_C static CImIAPPreferences* NewLC(); - IMPORT_C TInt Version() const; - IMPORT_C TInt NumberOfIAPs() const; - IMPORT_C TImIAPChoice IAPPreference(TInt aPreference) const; - IMPORT_C void AddIAPL(TImIAPChoice aIap, TInt aIndex=0); - IMPORT_C void RemoveIAPL(TInt aPreferenceNumber); - IMPORT_C TInt FindIAPL(TUint32 aIAP, TInt &aLocation) const; - IMPORT_C void ReplaceIAPL(TInt aPreferenceNumber,TImIAPChoice aIap); - IMPORT_C ~CImIAPPreferences(); - IMPORT_C TBool SNAPDefined() const; - IMPORT_C TUint32 SNAPPreference() const; - IMPORT_C void SetSNAPL(TUint32 aSnap); - IMPORT_C void RemoveSNAP(); - - void Reset(); - - // class constants - /** - @deprecated - */ - enum - { - KSanityCheckOldWins = 0xEFBEADDE, - KSanityCheck = 0xDEADBEEF - }; - /** ID of the stream used to store IAP preference information in a - message store. */ - const static TUid KUidMsgFileInternetAccessPreferences; - private: - CArrayFixFlat* iChoices; - TInt iVersion; - TUint32 iSnapId; - private: - CImIAPPreferences(); - CImIAPPreferences(CImIAPPreferences& aOther); // not implemented - int operator=(CImIAPPreferences& aOther); // not implemented - void ConstructL(); - void Panic(int err) const; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/icl/imageprocessor.h --- a/epoc32/include/icl/imageprocessor.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,526 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef ___IMAGEPROCESSOR_H__ -#define ___IMAGEPROCESSOR_H__ - -#include -#include - -/** -@internalTechnology -*/ -enum TImageBitmapUtilPanic - { - ECorrupt - }; - -/** -@publishedAll -@released - -Interface to colour conversion classes for various display modes. -Manages the mapping between RGB/Greyscale values and the index -into the color palette for the given display mode. -*/ -class TColorConvertor - { -public: - IMPORT_C static TColorConvertor* NewL(TDisplayMode aDisplayMode); - - /** - Returns the colour index corresponding to the supplied RGB value. - Operates in the context of the current display mode. - - This is a virtual function that each derived class must implement. - - @param aColor - The colour in RGB format. - - @return The colour index. - */ - virtual TInt ColorIndex(TRgb aColor) const = 0; - - /** - Returns the RGB value corresponding to the supplied colour index. - Operates in the context of the current display mode. - - This is a virtual function that each derived class must implement. - - @param aColorIndex - The colour in RGB format. - - @return The RGB value. - */ - virtual TRgb Color(TInt aColorIndex) const = 0; - - /** - Gets an array of colour indices from a corresponding array of RGB values. - Operates in the context of the current display mode. - - This is a virtual function that each derived class must implement. - - @param aIndexBuffer - A pointer to the first element in destination array. - @param aColorBuffer - A pointer to the first element in the source array. - @param aCount - The number of elements to get. - */ - virtual void ColorToIndex(TInt* aIndexBuffer,TRgb* aColorBuffer,TInt aCount) const = 0; - - inline static TInt RgbToMonochrome(TRgb aRgb); - }; - - -/** -@publishedAll -@released - -Bitmap utility class. -*/ -class TImageBitmapUtil - { -public: - IMPORT_C TImageBitmapUtil(); - IMPORT_C void Begin(); - IMPORT_C TBool Begin(const TPoint& aPosition); - IMPORT_C void End(); - IMPORT_C void SetBitmapL(CFbsBitmap* aBitmap); - IMPORT_C void SetPixel(TUint32 aPixelIndex); - IMPORT_C void SetPixels(TUint32* aPixelIndex,TInt aNumberOfPixels); - IMPORT_C TBool SetPos(const TPoint& aPosition); - -private: - union TDataPointer - { - TUint32* iWordPos; - TUint8* iBytePos; - }; -private: - CFbsBitmap* iBitmap; - TSize iSize; - TPoint iPosition; - TDataPointer iData; - TDataPointer iBase; - TInt iBpp; - TInt iBppShift; - TInt iPixelShift; - TInt iPixelsPerWord; - TInt iBitShift; - TInt iScanlineWordLength; - TUint32 iMask; - TBool iWordAccess; - }; - - -class CImageProcessor; -class CImageProcessorExtension; - -/** -@publishedAll -@released - -Utility class providing static factory functions for creating instances of -CImageProcessor derived classes. -*/ -class ImageProcessorUtility - { -public: - IMPORT_C static TInt ReductionFactor(const TSize& aOriginalSize,const TSize& aReducedSize); - IMPORT_C static CImageProcessor* NewImageProcessorL(const CFbsBitmap& aBitmap,const TSize& aImageSize,TDisplayMode aImageDisplayMode, TBool aDisableErrorDiffusion); - IMPORT_C static CImageProcessor* NewImageProcessorL(const CFbsBitmap& aBitmap,TInt aReductionFactor,TDisplayMode aImageDisplayMode, TBool aDisableErrorDiffusion); - IMPORT_C static CImageProcessorExtension* ImageProcessorUtility::NewImageProcessorExtensionL(const CFbsBitmap& aBitmap,TInt aReductionFactor,TDisplayMode aImageDisplayMode, TBool aDisableErrorDiffusion); - -private: - TBool static UseErrorDiffuser(const TDisplayMode& aBitmapDisplayMode, const TDisplayMode& aImageDisplayMode); - TBool static IsMonochrome(const TDisplayMode& aBitmapDisplayMode, const TDisplayMode& aImageDisplayMode); - }; - - - -/** -@publishedAll -@released - -Interface to image processing classes. -*/ -class CImageProcessor : public CBase - { -public: - // Setup - - /** - Initialises internal data structures prior to conversion. - - This is a virtual function that each derived class must implement. - - @param aBitmap - A reference to a fully constucted bitmap with the required - display mode and size. - @param aImageRect - The region of the image to convert. - */ - virtual void PrepareL(CFbsBitmap& aBitmap,const TRect& aImageRect) = 0; - - /** - Initialises internal data structures prior to the manipulation of the specified pixel block. - - This overloaded version allows specification of a block size - for those formats which support blocked pixel data eg. JPEG - - This is a virtual function that each derived class must implement. - - @param aBitmap - A reference to a fully constucted bitmap with the required - display mode and size. - @param aImageRect - The region of the image to convert. - @param aRgbBlockSize - The size of the block to use. - */ - virtual void PrepareL(CFbsBitmap& aBitmap,const TRect& aImageRect,const TSize& aRgbBlockSize) = 0; - - /** - Sets the number of pixels by which to increment the current position in - the Y-axis. This is used when rendering images supporting interlacing. - eg GIF - - This is a virtual function that each derived class must implement. - - @param aYInc - The number of pixels. - */ - virtual void SetYPosIncrement(TInt aYInc) = 0; - - /** - Sets the number times the current line should be repeated. The lines - are repeated in the same direction as set by SetYPosIncrement(). This - is used to fill blank lines when rendering interlaced images. eg GIF. - @param aLineRepeat The number of times the current line should be repeated - */ - virtual void SetLineRepeat(TInt aLineRepeat) = 0; - - /** - Sets the pixel padding to the value specified by aNumberOfPixels. - - This is a virtual function that each derived class must implement. - - @param aNumberOfPixels - The number of pixels to use for padding. - */ - virtual void SetPixelPadding(TInt aNumberOfPixels) = 0; - - // Color pixel writing - - /** - Sets the pixel at the current position to aColor. - - This is a virtual function that each derived class must implement. - - @post - The current position is updated. - - @param aColor - The RGB value to set the current pixel to. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetPixel(TRgb aColor) = 0; - - /** - Sets aCount number of pixels to the value given by aColor, starting at - the current position. - - This is a virtual function that each derived class must implement. - - @post - On success, the current position is updated. - - @param aColor - The RGB value to set the pixels to. - @param aCount - The number of pixels to set. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetPixelRun(TRgb aColor,TInt aCount) = 0; - - /** - Updates the bitmap with colour information from the array of colour values. - - Uses the array of colour values supplied by aColorBuffer, whose length - is specified by aBufferLength, to update successive pixels with values in the - buffer, starting at the current position. - - This is a virtual function that each derived class must implement. - - @post - The current position is updated. - - @param aColorBuffer - A pointer to the first element in the array. - @param aBufferLength - The number of elements in the array. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetPixels(TRgb* aColorBuffer,TInt aBufferLength) = 0; - - /** - Sets the current pixel block using the data supplied in aColorBuffer. - - Note: - For use with image types that support blocking of pixels eg JPEG. - - This is a virtual function that each derived class must implement. - - @param aColorBuffer - A pointer to a buffer representing a block of pixel color values. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetPixelBlock(TRgb* aColorBuffer) = 0; - - // Monochrome pixel writing - - /** - Sets the pixel at the current position to aGray256. - - This is a virtual function that each derived class must implement. - - @post - The current position is updated. - - @param aGray256 - The greyscale value to set the current pixel to. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetMonoPixel(TInt aGray256) = 0; - - /** - Sets the number of pixels specified by aCount to the value given by aGray256, starting at - the current position. - - This is a virtual function that each derived class must implement. - - @post - The current position is updated. - - @param aGray256 - The greyscale value to set the pixels to. - @param aCount - The number of pixels to set. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetMonoPixelRun(TInt aGray256,TInt aCount) = 0; - - /** - Updates the bitmap with greyscale information from the array of greyscale values. - - The array of values supplied by aGray256Buffer, whose length - is specified in aBufferLength, is used to update successive pixels with the - greyscales values. - - This is a virtual function that each derived class must implement. - - @post - The current position is updated. - - @param aGray256Buffer - A pointer to the first element in the array of greyscale values. - @param aBufferLength - The number of elements in the array. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetMonoPixels(TUint32* aGray256Buffer,TInt aBufferLength) = 0; - - /** - Sets a specified number of pixels to the specified greyscale value. - - For image types which support blocking of pixels eg JPEG, the current - pixel block is set using the data supplied in aGray256Buffer. - - This is a virtual function that each derived class must implement. - - @param aGray256Buffer - A pointer to a buffer representing a block of pixel color values. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetMonoPixelBlock(TUint32* aGray256Buffer) = 0; - - // Processor flow control - - /** - Sets the current position in the bitmap to aPosition. - - This is a virtual function that each derived class must implement. - - @param aPosition - A reference to TPoint object defining the position to move to. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool SetPos(const TPoint& aPosition) = 0; - - /** - Commits the changes made to the current bitmap by flushing the buffer. - - This is a virtual function that each derived class must implement. - - @post - The current position is updated. - - @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, - otherwise EFalse. - */ - virtual TBool FlushPixels() = 0; - -private: - // Future proofing - IMPORT_C virtual void ReservedVirtual1(); - IMPORT_C virtual void ReservedVirtual2(); - IMPORT_C virtual void ReservedVirtual3(); - IMPORT_C virtual void ReservedVirtual4(); - }; - -/** -@publishedAll -@released - -Flag used to determine the type of transformation which is the result of -single or multiple transformation operations requested via calls to -COperationExtension::AddOperationL. - -8 unique orientations: - -@code -normal 90 180 270 -00 10 01 00 11 01 10 11 -01 11 11 10 10 00 00 01 - -V flip 90 180 270 -10 00 11 10 =Hflip =Hflip+90 -11 01 01 00 - -H flip 90 180 270 -01 11 00 01 =Vflip =Vflip+90 -00 10 10 11 -@endcode - -@see COperationExtension::AddOperationL -*/ -enum TTransformOptions - { - /** Normal Decode - */ - EDecodeNormal = 0x11011000, - - /** Rotate 90 degrees. - */ - EDecodeRotate90 = 0x10110001, - - /** Rotate 180 degrees. - */ - EDecodeRotate180 = 0x00100111, - - /** Rotate 270 degrees. - */ - EDecodeRotate270 = 0x01001110, - - /** Horizontal flip. - */ - EDecodeHorizontalFlip = 0x10001101, - - /** Horizontal flip and rotate 90 degrees. - */ - EDecodeHorizontalFlipRotate90 = 0x11100100, - - /** Vertical flip. - */ - EDecodeVerticalFlip = 0x01110010, - - /** Vertical flip and rotate 90 degrees. - */ - EDecodeVerticalFlipRotate90 = 0x00011011 - }; - - -/** -@publishedAll -@released - -Class that provides support for Framework Extensions. - -@see CImageProcessor -@see CImageReadCodec -@see CImageDecoderPlugin -*/ -class CImageProcessorExtension : public CImageProcessor - { -public: - IMPORT_C virtual ~CImageProcessorExtension(); - IMPORT_C void SetClippingRect(const TRect& aRect); - IMPORT_C void SetScaling(TInt aScalingCoeff); - IMPORT_C void SetScaling(const TSize& aDesiredSize); - IMPORT_C void SetOperation(TTransformOptions aOperation); - IMPORT_C void SetInitialScanlineSkipPadding(TInt aNumberOfScanlines); - -protected: - IMPORT_C CImageProcessorExtension(); - -protected: - /** Clipping rectangle */ - TRect iClippingRect; - /** Scaling coefficient */ - TInt iScalingCoeff; - /** Desired size after scaling */ - TSize iDesiredSize; - /** Operations to apply to image */ - TTransformOptions iOperation; - /** Position in destination at which start rendering */ - TPoint iStartPosition; - /** Position in destination at which rendering is complete */ - TPoint iEndPosition; - /** An initial one-off number of scanlines to be skipped */ - TInt iNumberOfScanlinesToSkip; - }; - -inline TInt TColorConvertor::RgbToMonochrome(TRgb aRgb) - { - TInt value = aRgb.Internal(); - TInt r = value&0xFF0000; - TInt g = value&0xFF00; - value = (value&0xFF)<<16; // blue<<16 - value += r<<1; // + (red<<16)*2 - value += g<<(16+2-8); // + (green<<16)*4 - value += g<<(16+0-8); // + (green<<16) - return value>>(16+3); // total/8 - } - -#endif //___IMAGEPROCESSOR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/iclanimationdataprovider.h --- a/epoc32/include/iclanimationdataprovider.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __ICLANIMATIONDATAPROVIDER_H__ -#define __ICLANIMATIONDATAPROVIDER_H__ - -#include - -#include -#include -#include - -_LIT8(KBitmapAnimationDataType, "bitmap"); - -class CICLAnimationDataLoader; - -/** -Data provider for frame based animations. - -This data provider expects to be provided with a file which can be interpreted -as an animation using the Image Conversion Library (ICL). An example would be -an animated GIF. The default data type for this provider is "bitmap". - -@see CBitmapAnimator -@publishedAll -@released -*/ -class CICLAnimationDataProvider : public CAnimationDataProvider, public MICLAnimationDataLoaderObserver - { -public: - IMPORT_C CICLAnimationDataProvider(); - IMPORT_C ~CICLAnimationDataProvider(); - IMPORT_C void SetFileL(RFs & aFs, const TFileName& aFileName); - IMPORT_C TPtrC8 DataType(); - virtual void StartL(); -protected: - IMPORT_C virtual void CICLAnimationDataProvider_Reserved1(); - IMPORT_C virtual void CICLAnimationDataProvider_Reserved2(); - // From CAnimationDataProvider - IMPORT_C virtual void CAnimationDataProvider_Reserved1(); - IMPORT_C virtual void CAnimationDataProvider_Reserved2(); -private: - TInt iCICLAnimationDataProvider_Reserved; -private: - CAnimationFrame::THandles CurrentFrame() const; - void DecodeImageL(); - void DataDeliveryL(); - void Reset(); - // From MICLAnimationDataLoaderObserver - virtual void DataLoaderEventL(TDataLoaderEvent aEvent, TInt aError); -private: - CICLAnimationDataLoader* iDataLoader; - CAnimationFrame* iCurrentFrame; - TInt iFlags; - }; - -#endif //__ICLANIMATIONDATAPROVIDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imageprocessor/imageprocessor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/imageprocessor/imageprocessor.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,526 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef ___IMAGEPROCESSOR_H__ +#define ___IMAGEPROCESSOR_H__ + +#include +#include + +/** +@internalTechnology +*/ +enum TImageBitmapUtilPanic + { + ECorrupt + }; + +/** +@publishedAll +@released + +Interface to colour conversion classes for various display modes. +Manages the mapping between RGB/Greyscale values and the index +into the color palette for the given display mode. +*/ +class TColorConvertor + { +public: + IMPORT_C static TColorConvertor* NewL(TDisplayMode aDisplayMode); + + /** + Returns the colour index corresponding to the supplied RGB value. + Operates in the context of the current display mode. + + This is a virtual function that each derived class must implement. + + @param aColor + The colour in RGB format. + + @return The colour index. + */ + virtual TInt ColorIndex(TRgb aColor) const = 0; + + /** + Returns the RGB value corresponding to the supplied colour index. + Operates in the context of the current display mode. + + This is a virtual function that each derived class must implement. + + @param aColorIndex + The colour in RGB format. + + @return The RGB value. + */ + virtual TRgb Color(TInt aColorIndex) const = 0; + + /** + Gets an array of colour indices from a corresponding array of RGB values. + Operates in the context of the current display mode. + + This is a virtual function that each derived class must implement. + + @param aIndexBuffer + A pointer to the first element in destination array. + @param aColorBuffer + A pointer to the first element in the source array. + @param aCount + The number of elements to get. + */ + virtual void ColorToIndex(TInt* aIndexBuffer,TRgb* aColorBuffer,TInt aCount) const = 0; + + inline static TInt RgbToMonochrome(TRgb aRgb); + }; + + +/** +@publishedAll +@released + +Bitmap utility class. +*/ +class TImageBitmapUtil + { +public: + IMPORT_C TImageBitmapUtil(); + IMPORT_C void Begin(); + IMPORT_C TBool Begin(const TPoint& aPosition); + IMPORT_C void End(); + IMPORT_C void SetBitmapL(CFbsBitmap* aBitmap); + IMPORT_C void SetPixel(TUint32 aPixelIndex); + IMPORT_C void SetPixels(TUint32* aPixelIndex,TInt aNumberOfPixels); + IMPORT_C TBool SetPos(const TPoint& aPosition); + +private: + union TDataPointer + { + TUint32* iWordPos; + TUint8* iBytePos; + }; +private: + CFbsBitmap* iBitmap; + TSize iSize; + TPoint iPosition; + TDataPointer iData; + TDataPointer iBase; + TInt iBpp; + TInt iBppShift; + TInt iPixelShift; + TInt iPixelsPerWord; + TInt iBitShift; + TInt iScanlineWordLength; + TUint32 iMask; + TBool iWordAccess; + }; + + +class CImageProcessor; +class CImageProcessorExtension; + +/** +@publishedAll +@released + +Utility class providing static factory functions for creating instances of +CImageProcessor derived classes. +*/ +class ImageProcessorUtility + { +public: + IMPORT_C static TInt ReductionFactor(const TSize& aOriginalSize,const TSize& aReducedSize); + IMPORT_C static CImageProcessor* NewImageProcessorL(const CFbsBitmap& aBitmap,const TSize& aImageSize,TDisplayMode aImageDisplayMode, TBool aDisableErrorDiffusion); + IMPORT_C static CImageProcessor* NewImageProcessorL(const CFbsBitmap& aBitmap,TInt aReductionFactor,TDisplayMode aImageDisplayMode, TBool aDisableErrorDiffusion); + IMPORT_C static CImageProcessorExtension* ImageProcessorUtility::NewImageProcessorExtensionL(const CFbsBitmap& aBitmap,TInt aReductionFactor,TDisplayMode aImageDisplayMode, TBool aDisableErrorDiffusion); + +private: + TBool static UseErrorDiffuser(const TDisplayMode& aBitmapDisplayMode, const TDisplayMode& aImageDisplayMode); + TBool static IsMonochrome(const TDisplayMode& aBitmapDisplayMode, const TDisplayMode& aImageDisplayMode); + }; + + + +/** +@publishedAll +@released + +Interface to image processing classes. +*/ +class CImageProcessor : public CBase + { +public: + // Setup + + /** + Initialises internal data structures prior to conversion. + + This is a virtual function that each derived class must implement. + + @param aBitmap + A reference to a fully constucted bitmap with the required + display mode and size. + @param aImageRect + The region of the image to convert. + */ + virtual void PrepareL(CFbsBitmap& aBitmap,const TRect& aImageRect) = 0; + + /** + Initialises internal data structures prior to the manipulation of the specified pixel block. + + This overloaded version allows specification of a block size + for those formats which support blocked pixel data eg. JPEG + + This is a virtual function that each derived class must implement. + + @param aBitmap + A reference to a fully constucted bitmap with the required + display mode and size. + @param aImageRect + The region of the image to convert. + @param aRgbBlockSize + The size of the block to use. + */ + virtual void PrepareL(CFbsBitmap& aBitmap,const TRect& aImageRect,const TSize& aRgbBlockSize) = 0; + + /** + Sets the number of pixels by which to increment the current position in + the Y-axis. This is used when rendering images supporting interlacing. + eg GIF + + This is a virtual function that each derived class must implement. + + @param aYInc + The number of pixels. + */ + virtual void SetYPosIncrement(TInt aYInc) = 0; + + /** + Sets the number times the current line should be repeated. The lines + are repeated in the same direction as set by SetYPosIncrement(). This + is used to fill blank lines when rendering interlaced images. eg GIF. + @param aLineRepeat The number of times the current line should be repeated + */ + virtual void SetLineRepeat(TInt aLineRepeat) = 0; + + /** + Sets the pixel padding to the value specified by aNumberOfPixels. + + This is a virtual function that each derived class must implement. + + @param aNumberOfPixels + The number of pixels to use for padding. + */ + virtual void SetPixelPadding(TInt aNumberOfPixels) = 0; + + // Color pixel writing + + /** + Sets the pixel at the current position to aColor. + + This is a virtual function that each derived class must implement. + + @post + The current position is updated. + + @param aColor + The RGB value to set the current pixel to. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetPixel(TRgb aColor) = 0; + + /** + Sets aCount number of pixels to the value given by aColor, starting at + the current position. + + This is a virtual function that each derived class must implement. + + @post + On success, the current position is updated. + + @param aColor + The RGB value to set the pixels to. + @param aCount + The number of pixels to set. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetPixelRun(TRgb aColor,TInt aCount) = 0; + + /** + Updates the bitmap with colour information from the array of colour values. + + Uses the array of colour values supplied by aColorBuffer, whose length + is specified by aBufferLength, to update successive pixels with values in the + buffer, starting at the current position. + + This is a virtual function that each derived class must implement. + + @post + The current position is updated. + + @param aColorBuffer + A pointer to the first element in the array. + @param aBufferLength + The number of elements in the array. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetPixels(TRgb* aColorBuffer,TInt aBufferLength) = 0; + + /** + Sets the current pixel block using the data supplied in aColorBuffer. + + Note: + For use with image types that support blocking of pixels eg JPEG. + + This is a virtual function that each derived class must implement. + + @param aColorBuffer + A pointer to a buffer representing a block of pixel color values. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetPixelBlock(TRgb* aColorBuffer) = 0; + + // Monochrome pixel writing + + /** + Sets the pixel at the current position to aGray256. + + This is a virtual function that each derived class must implement. + + @post + The current position is updated. + + @param aGray256 + The greyscale value to set the current pixel to. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetMonoPixel(TInt aGray256) = 0; + + /** + Sets the number of pixels specified by aCount to the value given by aGray256, starting at + the current position. + + This is a virtual function that each derived class must implement. + + @post + The current position is updated. + + @param aGray256 + The greyscale value to set the pixels to. + @param aCount + The number of pixels to set. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetMonoPixelRun(TInt aGray256,TInt aCount) = 0; + + /** + Updates the bitmap with greyscale information from the array of greyscale values. + + The array of values supplied by aGray256Buffer, whose length + is specified in aBufferLength, is used to update successive pixels with the + greyscales values. + + This is a virtual function that each derived class must implement. + + @post + The current position is updated. + + @param aGray256Buffer + A pointer to the first element in the array of greyscale values. + @param aBufferLength + The number of elements in the array. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetMonoPixels(TUint32* aGray256Buffer,TInt aBufferLength) = 0; + + /** + Sets a specified number of pixels to the specified greyscale value. + + For image types which support blocking of pixels eg JPEG, the current + pixel block is set using the data supplied in aGray256Buffer. + + This is a virtual function that each derived class must implement. + + @param aGray256Buffer + A pointer to a buffer representing a block of pixel color values. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetMonoPixelBlock(TUint32* aGray256Buffer) = 0; + + // Processor flow control + + /** + Sets the current position in the bitmap to aPosition. + + This is a virtual function that each derived class must implement. + + @param aPosition + A reference to TPoint object defining the position to move to. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool SetPos(const TPoint& aPosition) = 0; + + /** + Commits the changes made to the current bitmap by flushing the buffer. + + This is a virtual function that each derived class must implement. + + @post + The current position is updated. + + @return A boolean indicating if the operation was successful. ETrue if the operation succeeded, + otherwise EFalse. + */ + virtual TBool FlushPixels() = 0; + +private: + // Future proofing + IMPORT_C virtual void ReservedVirtual1(); + IMPORT_C virtual void ReservedVirtual2(); + IMPORT_C virtual void ReservedVirtual3(); + IMPORT_C virtual void ReservedVirtual4(); + }; + +/** +@publishedAll +@released + +Flag used to determine the type of transformation which is the result of +single or multiple transformation operations requested via calls to +COperationExtension::AddOperationL. + +8 unique orientations: + +@code +normal 90 180 270 +00 10 01 00 11 01 10 11 +01 11 11 10 10 00 00 01 + +V flip 90 180 270 +10 00 11 10 =Hflip =Hflip+90 +11 01 01 00 + +H flip 90 180 270 +01 11 00 01 =Vflip =Vflip+90 +00 10 10 11 +@endcode + +@see COperationExtension::AddOperationL +*/ +enum TTransformOptions + { + /** Normal Decode + */ + EDecodeNormal = 0x11011000, + + /** Rotate 90 degrees. + */ + EDecodeRotate90 = 0x10110001, + + /** Rotate 180 degrees. + */ + EDecodeRotate180 = 0x00100111, + + /** Rotate 270 degrees. + */ + EDecodeRotate270 = 0x01001110, + + /** Horizontal flip. + */ + EDecodeHorizontalFlip = 0x10001101, + + /** Horizontal flip and rotate 90 degrees. + */ + EDecodeHorizontalFlipRotate90 = 0x11100100, + + /** Vertical flip. + */ + EDecodeVerticalFlip = 0x01110010, + + /** Vertical flip and rotate 90 degrees. + */ + EDecodeVerticalFlipRotate90 = 0x00011011 + }; + + +/** +@publishedAll +@released + +Class that provides support for Framework Extensions. + +@see CImageProcessor +@see CImageReadCodec +@see CImageDecoderPlugin +*/ +class CImageProcessorExtension : public CImageProcessor + { +public: + IMPORT_C virtual ~CImageProcessorExtension(); + IMPORT_C void SetClippingRect(const TRect& aRect); + IMPORT_C void SetScaling(TInt aScalingCoeff); + IMPORT_C void SetScaling(const TSize& aDesiredSize); + IMPORT_C void SetOperation(TTransformOptions aOperation); + IMPORT_C void SetInitialScanlineSkipPadding(TInt aNumberOfScanlines); + +protected: + IMPORT_C CImageProcessorExtension(); + +protected: + /** Clipping rectangle */ + TRect iClippingRect; + /** Scaling coefficient */ + TInt iScalingCoeff; + /** Desired size after scaling */ + TSize iDesiredSize; + /** Operations to apply to image */ + TTransformOptions iOperation; + /** Position in destination at which start rendering */ + TPoint iStartPosition; + /** Position in destination at which rendering is complete */ + TPoint iEndPosition; + /** An initial one-off number of scanlines to be skipped */ + TInt iNumberOfScanlinesToSkip; + }; + +inline TInt TColorConvertor::RgbToMonochrome(TRgb aRgb) + { + TInt value = aRgb.Internal(); + TInt r = value&0xFF0000; + TInt g = value&0xFF00; + value = (value&0xFF)<<16; // blue<<16 + value += r<<1; // + (red<<16)*2 + value += g<<(16+2-8); // + (green<<16)*4 + value += g<<(16+0-8); // + (green<<16) + return value>>(16+3); // total/8 + } + +#endif //___IMAGEPROCESSOR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imapcmds.h --- a/epoc32/include/imapcmds.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1082 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__IMAPCMDS_H__) -#define __IMAPCMDS_H__ - -#if !defined (__MSVSTD_HRH__) -#include -#endif - -class TImap4RenameFolder -/** Buffer for an IMAP folder name. - -@see KIMAP4MTMRenameFolder - -@publishedAll -@released -*/ - { -public: - /** IMAP folder name. */ - TBuf<128> iNewName; - }; - -/** IMAP4-specific commands that can be issued through either -CImap4ClientMtm::InvokeAsyncFunctionL() or, in a few cases, -CImap4ClientMtm::InvokeSyncFunctionL(). - -These functions take an input message selection parameter -(@c const CMsvEntrySelection& @c aSelection) and an input/output buffer parameter -(TDes8& @c aParameter). The use of these parameters is command specific, and is -described for each command below. - -The commands fall into a number of categories: - -- Connect and logon to remote server: - - #KIMAP4MTMConnect - - #KIMAP4MTMDisconnect -- Synchronise headers: - - #KIMAP4MTMCancelBackgroundSynchronise - - #KIMAP4MTMConnectAndSyncCompleteAfterConnect - - #KIMAP4MTMConnectAndSyncCompleteAfterDisconnect - - #KIMAP4MTMConnectAndSyncCompleteAfterFullSync - - #KIMAP4MTMConnectAndSynchronise - - #KIMAP4MTMFolderFullSync - - #KIMAP4MTMFullSync - - #KIMAP4MTMInboxNewSync - - #KIMAP4MTMSynchronise - - #KIMAP4MTMWaitForBackground -- Subscribe to mailboxes: - - #KIMAP4MTMLocalSubscribe - - #KIMAP4MTMLocalUnsubscribe -- Populate messages: - - #KIMAP4MTMPopulate - - #KIMAP4MTMPopulateAllMailWhenAlreadyConnected - - #KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected - - #KIMAP4MTMPopulateNewMailWhenAlreadyConnected - - #KIMAP4MTMConnectAndPopulateAllMailAndDisconnect - - #KIMAP4MTMConnectAndPopulateAllMailAndStayOnline - - #KIMAP4MTMConnectAndPopulateMailSelectionAndDisconnect - - #KIMAP4MTMConnectAndPopulateMailSelectionAndStayOnline - - #KIMAP4MTMConnectAndPopulateNewMailAndDisconnect - - #KIMAP4MTMConnectAndPopulateNewMailAndStayOnline -- Copy messages: - - #KIMAP4MTMCopyAllMailWhenAlreadyConnected - - #KIMAP4MTMCopyMailSelectionWhenAlreadyConnected - - #KIMAP4MTMCopyNewMailWhenAlreadyConnected - - #KIMAP4MTMConnectAndCopyAllMailAndDisconnect - - #KIMAP4MTMConnectAndCopyAllMailAndStayOnline - - #KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect - - #KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline - - #KIMAP4MTMConnectAndCopyNewMailAndDisconnect - - #KIMAP4MTMConnectAndCopyNewMailAndStayOnline -- Move messages: - - #KIMAP4MTMMoveAllMailWhenAlreadyConnected - - #KIMAP4MTMMoveMailSelectionWhenAlreadyConnected - - #KIMAP4MTMMoveNewMailWhenAlreadyConnected - - #KIMAP4MTMConnectAndMoveAllMailAndDisconnect - - #KIMAP4MTMConnectAndMoveAllMailAndStayOnline - - #KIMAP4MTMConnectAndMoveMailSelectionAndDisconnect - - #KIMAP4MTMConnectAndMoveMailSelectionAndStayOnline - - #KIMAP4MTMConnectAndMoveNewMailAndDisconnect - - #KIMAP4MTMConnectAndMoveNewMailAndStayOnline -- Create messages: - - #KIMAP4MTMCreateForwardAsAttachmentEmailMessage - - #KIMAP4MTMCreateForwardEmailMessage - - #KIMAP4MTMCreateNewEmailMessage - - #KIMAP4MTMCreateReceiptEmailMessage - - #KIMAP4MTMCreateReplyEmailMessage - . - Note that CImEmailOperation is usually a more convenient way - to create messages. -- Query state: - - #KIMAP4MTMBusy - - #KIMAP4MTMIsConnected -- Offline operations: - - #KIMAP4MTMCancelOffLineOperations - - #KIMAP4MTMUndeleteAll -- Miscellaneous: - - #KIMAP4MTMEndBatch - - #KIMAP4MTMRenameFolder - - #KIMAP4MTMSelect - - #KIMAP4MTMStartBatch - -Note that when @c iServiceSelection is referred to in code examples for some -commands, this is assumed to be a CMsvEntrySelection that -contain the entry ID of an IMAP service. - -@see CImap4ClientMtm::InvokeAsyncFunctionL() -@see CImap4ClientMtm::InvokeSyncFunctionL() - -@publishedAll -@released -*/ -enum TImap4Cmds { - /** Tests if a specified service is connected. - - This command is synchronous, and used from @c InvokeSyncFunctionL(). - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to test. - - @c aParameter: a packaged TInt. On return, this is set to - KErrNone if the service is connected or KErrDisconnected if not. - - Example: - @code - TPckgBuf parameter; - iClientMtm->InvokeSyncFunctionL(KIMAP4MTMIsConnected, *iServiceSelection, parameter); - if (parameter()==KErrNone) - { - _LIT(KConnStatus, "\n\n Connected to the service"); - iConsole->Printf(KConnStatus); - } - @endcode - */ - KIMAP4MTMIsConnected = KMtmFirstFreeMtmFunctionId, - - /** Connects to the specified IMAP service. - - This makes a network connection and logs on the IMAP server specified - in the settings for the service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to connect to. - - @c aParameter: packages a pointer to an implementation of the connection observer - interface, MMsvImapConnectionObserver. Callbacks are made to this interface - to notify the client of the stages of connection. - - Completion: KErrBusy if the device is already connected to the specified server. - - Example: - @code - TBuf8<1> parameter; - iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMConnect, *iServiceSelection, parameter, iStatus); - @endcode - */ - KIMAP4MTMConnect, - - /** Connects to the specified IMAP service, and starts a background synchronisation. - - The call completes when the connection occurs and the synchronisation starts. See - CImap4ClientMtm for a description of a background synchronisation. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to connect to. - - @c aParameter: packages a pointer to an implementation of the connection observer - interface, MMsvImapConnectionObserver. Callbacks are made to this interface - to notify the client of the stages of connection and synchronisation. - - Completion: KErrBusy if the device is already connected to the specified server. - - Example: - @code - TPckg parameter(this); - iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMConnectAndSynchronise, *iServiceSelection, parameter, iStatus); - @endcode - */ - KIMAP4MTMConnectAndSynchronise, - - /** Cancels a background synchronisation in progress. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - being synchronised. - - @c aParameter: unused. - - Completion: KErrCancel if a synchronisation was cancelled; KErrNone if no - synchronisation was taking place. - - Example: - @code - TBuf8<1> parameter; - iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMCancelBackgroundSynchronise, *iServiceSelection, parameter, iStatus); - @endcode - */ - KIMAP4MTMCancelBackgroundSynchronise, - - /** Ensures that the IMAP server will remain loaded ready for more commands. - - If this is not set, then the Message Server can unload the IMAP server MTM - after a service is disconnected. It is more efficient if it stays loaded - if further use of the MTM is expected. - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: unused. - - Completion: KErrNone. - */ - KIMAP4MTMStartBatch, - - /** Ends the effect of KIMAP4MTMStartBatch. - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: unused. - - Completion: KErrNone. - */ - KIMAP4MTMEndBatch, - - /** Tests if the server is busy. - - It can be used from either CImap4ClientMtm::InvokeAsyncFunctionL() or - CImap4ClientMtm::InvokeSyncFunctionL(). - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: if the command is called from InvokeSyncFunctionL(), then on return a packaged - TInt holding the result. - - Completion: This completes with either KErrNone (neither session is busy) or KErrServerBusy - otherwise. - */ - KIMAP4MTMBusy, - - /** Issues an IMAP SELECT command on the specified mailbox. - - This is used to select an mailbox for the KIMAP4MTMSynchronise command. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder - to select. - - @c aParameter: Unused. - - Completion: KErrDisconnected if not connected. - */ - KIMAP4MTMSelect, - - /** Synchronises the current folder that is selected on the remote server. - - Note that after a connection is made, the Inbox folder is selected by default. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: unused. - - Completion: KErrDisconnected if not connected. - */ - KIMAP4MTMSynchronise, - - /** Synchronises the connected service's folder tree with the folders on the remote IMAP server. - - This creates and deletes folder entries in the message store under the remote service as needed, - to match the mailboxes that exist on the remote server. Note that this step is done as part of - the normal service synchronisation operation. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: unused. - - Completion: KErrDisconnected if not connected; KErrServerBusy if a - background synchronisation is already in progress. - */ - KIMAP4MTMSyncTree, - - /** Not supported. */ - KIMAP4MTMReserved10, // SyncSubscription - - /** Synchronises the specified service. - - This is a foreground synchronisation, and completes when the synchronisation is done. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to synchronise. - - @c aParameter: unused. - - Pre-condition: a connected service. - - Completion: KErrDisconnected if not connected; KErrServerBusy if a - background synchronisation is already in progress. - */ - KIMAP4MTMFullSync, - - /** Cancels any operations in progress and sends logout messages to server. - - If CImImap4Settings::SetDeleteEmailsWhenDisconnecting() is set, - any messages marked as deleted while offline are deleted before logout. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: unused. - - Completion: KErrDisconnected if not connected. - */ - KIMAP4MTMDisconnect, - - /** Sets the local subscription flag on a specified folder. - - This sets the local subscription flag on the folder's index entry - (see TMsvEmailEntry::SetLocalSubscription()), and saves the changed entry - to the index. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder - to subscribe to. - - @c aParameter: unused. - - Completion: KErrNotSupported if the entry is not a folder; KErrNone on success. - */ - KIMAP4MTMLocalSubscribe, - - /** Clears the local subscription flag on the specified folder. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder - to unsubscribe from. - - @c aParameter: unused. - - Completion: KErrNotSupported if the entry is not a folder; KErrNone on success. - */ - KIMAP4MTMLocalUnsubscribe, - - /** Not supported. */ - KIMAP4MTMReserved15, // MakeRemoteMailboxesInvisible - /** Not supported. */ - KIMAP4MTMReserved16, // MakeRemoteMailboxesVisible - - /** Synchronises any messages received by the remote server Inbox since the - last synchronisation operation. - - Messages that have been deleted from the remote Inbox are not deleted from - the mirror. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the TMsvId of the IMAP4service. - - @c aParameter: unused. - - Completion: KErrDisconnected if not connected; KErrServerBusy if a - background synchronisation is already in progress. - */ - KIMAP4MTMInboxNewSync, - - /** Selects and synchronises the specified folder. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder to synchronise. - - @c aParameter: unused. - - Completion: KErrDisconnected if not connected. - */ - KIMAP4MTMFolderFullSync, - - /** Completes only when a background synchronisation has finished. - - This turns a background synchronisation into a foreground synchronisation. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - being synchronised. - - @c aParameter: unused. - - Completion: KErrNone when no background synchronisation is in progress. - - Example: - @code - TBuf8<1> parameter; - iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMWaitForBackground, *iServiceSelection, parameter, iStatus); - @endcode - */ - KIMAP4MTMWaitForBackground, - - /** Renames a specified folder. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder to rename. - - @c aParameter: the new name for the folder. This should be a packaged TImap4RenameFolder object. - - Pre-conditions: a connected service. - - Completion: KErrDisconnected if there is no connected service. - - Example: - @code - // rename folder, assumed to be identified in *selection[0], to "newname". - _LIT(KNewName, "newname"); - TImap4RenameFolder newName; - newName.iNewName = KNewName; - TPckg name(newName); - iOperation = iClientMtm->InvokeAsyncFunctionL(KIMAP4MTMRenameFolder, *selection, name, iStatus); - @endcode - */ - KIMAP4MTMRenameFolder, - - /** Undoes any offline delete operations pending on the specified entries. - - @c aSelection: Entries on which to cancel offline delete operations. - - @c aParameter: Unused. - - Completion: KErrNone. - */ - KIMAP4MTMUndeleteAll, - - /** Cancels any offline operations pending on the specified entries. - - If any item is a folder, then it cancels all operations queued on any item - in that folder. If an IMAP4 service ID is given, then it cancels any Copy() - or MoveFromLocal() operations that are queued. A message can not have its - pending operations cancelled individually. - - @c aSelection: Entries on which to cancel offline operations. - - @c aParameter: Unused. - - Completion: KErrNone. - */ - KIMAP4MTMCancelOffLineOperations, - - /** Fetches the specified messages from the remote server to the mirror. - - @c aSelection: Messages to fetch. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - */ - KIMAP4MTMPopulate, - - /** Not supported. */ - KIMAP4MTMSyncSubscription, - - /** Connect and synchronise the specified service, and complete after connection. - - The operation completes when the connection part completes. The synchronisation - is done in the background. - - The command has the same functionality as KIMAP4MTMConnectAndSynchronise. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to connect to. - - @c aParameter: packages a pointer to an implementation of the connection observer - interface, MMsvImapConnectionObserver. Callbacks are made to this interface - to notify the client of the stages of connection and synchronisation. - - Completion: KErrBusy if a connected session already exists. - */ - KIMAP4MTMConnectAndSyncCompleteAfterConnect, - - /** Connect and synchronise the specified service, and complete after synchronisation. - - This is similar to KIMAP4MTMConnectAndSynchronise, except that the operation - does not complete until synchronisation is complete. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to connect to. - - @c aParameter: packages a pointer to an implementation of the connection observer - interface, MMsvImapConnectionObserver. Callbacks are made to this interface - to notify the client of the stages of connection and synchronisation. - - Completion: KErrBusy if a connected session already exists. - */ - KIMAP4MTMConnectAndSyncCompleteAfterFullSync, - - /** Connect and synchronise the specified service, and complete after disconnection. - - Unlike the other synchronisation commands, this command does not complete - after either connection or synchronisation. Instead, after the initial synchronisation - is complete, it periodically resynchronises the Inbox until the service is disconnected. - CImImap4Settings::SyncRate() sets the refresh period. - - Disconnection can occur because the network connection is closed, either through - user action, or because a networking timeout occurs on the socket. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service - to connect to. - - @c aParameter: packages a pointer to an implementation of the connection - observer interface, MMsvImapConnectionObserver. Callbacks are made to this - interface to notify the client of the stages of connection and - synchronisation. - - Completion: KErrBusy if a connected session already exists. - */ - KIMAP4MTMConnectAndSyncCompleteAfterDisconnect, - - /** Not supported. */ - KIMAP4MTMCancelSendOnNextConnection, - - /** Copy any new messages from a specified folder to another folder, - assuming a new connection does not need to be made. - - This is used after message headers have been synchronised. Any messages marked - as new are populated in the mirror, and then copied to the specified destination folder. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder from which - to copy the entries. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMCopyNewMailWhenAlreadyConnected, - - /** Connect to a specified service, copy any new messages from - a specified folder into another folder, and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to copy. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndCopyNewMailAndStayOnline, - - /** Connect to a specified service, copy any new messages from - a specified folder into another folder, and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to copy. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndCopyNewMailAndDisconnect, - - /** Move any new messages from a specified folder to another folder, - assuming a new connection does not need to be made. - - This is used after message headers have been synchronised. Any messages marked - as new are populated in the mirror, and then moved to the specified destination folder. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder from which - to move the entries. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMMoveNewMailWhenAlreadyConnected, - - /** Connect to a specified service, move any new messages from - a specified folder into another folder, and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndMoveNewMailAndStayOnline, - - /** Connect to a specified service, move any new messages from - a specified folder into another folder, and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndMoveNewMailAndDisconnect, - - /** Copy the specified messages to another folder, assuming a new connection - does not need to be made. - - The specified messages are populated in the mirror, and then copied to - the specified destination folder. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to copy. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to copy, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMCopyMailSelectionWhenAlreadyConnected, - - /** Connect to a specified service, copy the specified messages to another - folder, and stay connected. - - The specified messages are populated in the mirror, and then copied to - the specified destination folder. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to copy. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to copy, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndCopyMailSelectionAndStayOnline, - - /** Connect to a specified service, copy the specified messages to another - folder, and disconnect afterwards. - - The specified messages are populated in the mirror, and then copied to - the specified destination folder. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to copy. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to copy, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndCopyMailSelectionAndDisconnect, - - /** Move the specified messages to another folder, assuming a new connection - does not need to be made. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to move, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMMoveMailSelectionWhenAlreadyConnected, - - /** Connect to a specified service, move the specified messages to another - folder, and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to move, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndMoveMailSelectionAndStayOnline, - - /** Connect to a specified service, move the specified messages to another - folder, and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to move, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndMoveMailSelectionAndDisconnect, - - /** Copy all messages from the current service, assuming a new connection does - not need to be made. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder from which - to copy the entries. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to copy, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMCopyAllMailWhenAlreadyConnected, - - /** Connect to a specified service, copy all messages from the current service, - and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder from which - to copy the entries. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to copy, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndCopyAllMailAndStayOnline, - - /** Connect to a specified service, copy all messages from the current service, - and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder from which - to copy the entries. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - copy the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to copy, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndCopyAllMailAndDisconnect, - - /** Move all messages from the specified folder, assuming a new connection does - not need to be made. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder from which - to move the entries. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not moved. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no entries to move, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMMoveAllMailWhenAlreadyConnected, - - /** Connect to a specified service, move all messages from - a specified folder into another folder, and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndMoveAllMailAndStayOnline, - - /** Connect to a specified service, move all messages from - a specified folder into another folder, and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to move. - - @c aParameter: packaged TImImap4GetMailInfo object. - TImImap4GetMailInfo::iDestinationFolder specifies the folder into which to - move the new messages. Messages with a size greater than TImImap4GetMailInfo::iMaxEmailSize - are not copied. TImImap4GetMailInfo::iGetMailBodyParts is ignored: - the entire message is always fetched. - - Completion: note if there are no new entries, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndMoveAllMailAndDisconnect, - - /** Populate the specified messages, assuming a new connection does not need to be made. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMPopulateMailSelectionWhenAlreadyConnected, - - /** Connect to a specified service, populate the specified messages, - and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndPopulateMailSelectionAndStayOnline, - - /** Connect to a specified service, populate the specified messages, - and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service, - followed by the IDs of the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndPopulateMailSelectionAndDisconnect, - - /** Populate the new messages in a specified folder, assuming a new connection does - not need to be made. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMPopulateNewMailWhenAlreadyConnected, - - /** Populate all messages in a specified folder, assuming a new connection does - not need to be made. - - Pre-condition: a connected service. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMPopulateAllMailWhenAlreadyConnected, - - /** Connect to a specified service, populate the new messages in a specified - folder, and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndPopulateNewMailAndStayOnline, - - /** Connect to a specified service, populate the new messages in a specified - folder, and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndPopulateNewMailAndDisconnect, - - /** Connect to a specified service, populate all messages in a specified - folder, and stay connected. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndPopulateAllMailAndStayOnline, - - /** Connect to a specified service, populate all messages in a specified - folder, and disconnect afterwards. - - @c aSelection: @c aSelection[0] should contain the entry ID of the service; - @c aSelection[1] should contain the entry ID of the folder containing - the messages to populate. - - @c aParameter: A packaged TImImap4GetPartialMailInfo or TImImap4GetMailInfo - specifying the message parts to fetch and size limits on what is fetched. - - Completion: note if there are no entries to populate, then KErrNone, and progress - information is a null descriptor. - */ - KIMAP4MTMConnectAndPopulateAllMailAndDisconnect, - - /** Creates a new email message. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder in - which to create the message. - - @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying - message creation flags and message type. - - The operation object returned is a CImEmailOperation. Final progress information - from this contains the ID of the newly created message. - */ - KIMAP4MTMCreateNewEmailMessage, - - /** Creates a new reply message. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder in - which to create the message; @c aSelection[1] should contain the entry ID - of the message to which to create a reply. - - @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying - message creation flags and message type. - - The operation object returned is a CImEmailOperation. Final progress information - from this contains the ID of the newly created message. - */ - KIMAP4MTMCreateReplyEmailMessage, - - /** Creates a new forwarded message. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder in - which to create the message; @c aSelection[1] should contain the entry ID - of the message to forward. - - @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying - message creation flags and message type. - - The operation object returned is a CImEmailOperation. Final progress information - from this contains the ID of the newly created message. - */ - KIMAP4MTMCreateForwardEmailMessage, - - /** Creates a new forwarded message, with the original message as an attachment. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder in - which to create the message; @c aSelection[1] should contain the entry ID - of the message to forward. - - @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying - message creation flags and message type. - - The operation object returned is a CImEmailOperation. Final progress information - from this contains the ID of the newly created message. - */ - KIMAP4MTMCreateForwardAsAttachmentEmailMessage, - - /** Creates a new message-receipt message. - - @c aSelection: @c aSelection[0] should contain the entry ID of the folder in - which to create the message; @c aSelection[1] should contain the entry ID - of the original message for which the receipt is required. - - @c aParameter: a packaged TImCreateMessageOptions (see miutmsg.h) object, specifying - message creation flags and message type. - - The operation object returned is a CImEmailOperation. Final progress information - from this contains the ID of the newly created message. - */ - KIMAP4MTMCreateReceiptEmailMessage -}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imapconnectionobserver.h --- a/epoc32/include/imapconnectionobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__IMAPCONNECTIONOBSERVER_H__) -#define __IMAPCONNECTIONOBSERVER_H__ - -/** IMAP4 connection observer events. - -@see MMsvImapConnectionObserver -@publishedAll -@released -*/ -enum TImapConnectionEvent - { - /** Connecting to server. */ - EConnectingToServer, - /** Synchronising folder list. */ - ESynchronisingFolderList, - /** Synchronising inbox. */ - ESynchronisingInbox, - /** Synchronising folders. */ - ESynchronisingFolders, - /** Synchronisation complete. */ - ESynchronisationComplete, - /** Disconnecting. */ - EDisconnecting, - /** Connection completed. */ - EConnectionCompleted - }; - -// Mix-in class to allow observation of the stages of an IMAP operation -// -class MMsvImapConnectionObserver -/** Abstract base class used for IMAP4 connection observation. - -A derived class to handle IMAP4 connection events should override the HandleImapConnectionEvent() -member function. - -Objects that implement this interface are passed as a packaged parameter -to CImap4ClientMtm::InvokeAsyncFunctionL() when a connection command is issued. - -@publishedAll -@released - -@see TImap4Cmds -*/ - { -public: - /** Called when a connection event occurs. - - @param aConnectionState Connection event */ - virtual void HandleImapConnectionEvent(TImapConnectionEvent aConnectionState)=0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imapset.h --- a/epoc32/include/imapset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,708 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __IMAPSET_H__ -#define __IMAPSET_H__ - - - - -#include -#include - -class TBearerTypes; -class TImImap4GetPartialMailInfo; - -/** Default IMAP4 server port number. */ -const TUint32 KIMAPDefaultPortNumber = 143; - -/** Default inbox refresh rate in seconds. */ -const TInt KImapDefaultInboxSyncRate = 300; - -/** Default idle timeout in seconds. */ -const TInt KImapDefaultIdleTimeout = 1740; - -/** Default fetch size in bytes. */ -const TUint KImapDefaultFetchSizeBytes = 20480; - - - -/** @deprecated */ -const TInt32 KImImapSynchroniseAll = -1; - -/** @deprecated */ -const TInt32 KImImapSynchroniseNone = 0; - - -/** -Describes the folder subscription synchronisation strategy. - -This specifies whether the local or remote folder subscription flags, or a -combination of both, are used to determine which mailboxes are synchronised. -For an overview of the synchronisation process, see CImap4ClientMtm. - -@see CImImap4Settings::SetSynchronise() -@see CImImap4Settings::Synchronise() - -@publishedAll -@released -*/ -enum TFolderSyncType - { - /** Folders that are marked for subscription either locally or remotely are synchronised. */ - EUseCombination=0, - /** Only folders marked for subscription locally are synchronised. */ - EUseLocal, - /** Only folders marked for subscription remotely are synchronised. */ - EUseRemote - }; - - -/** -Specifies methods of synchronising IMAP4 subscription information with a server. - -Subscription settings that have been set on folders on the local device, and -subscription settings that have been set on the corresponding mailboxes on the -remote server can be synchronised, as part of the synchronisation process -(see the overview for CImap4ClientMtm). - -@see CImImap4Settings::SetSubscribe() -@see CImImap4Settings::Subscribe() - -@publishedAll -@released -*/ -enum TFolderSubscribeType - { - /** Do not alter local or remote subscription information. */ - EUpdateNeither=0, - /** Update local copy of subscription information when it is received from the - remote IMAP4 server at the beginning of the mail session. */ - EUpdateLocal, - /** Update remote copy of subscription information so that it matches the local - subscription information. */ - EUpdateRemote, - /** Merge local and remote subscription information, store updated information - on the remote server and store merged data on the local message store. */ - EUpdateBoth - }; - - -/** -Defines which components of a message to fetch when copying or moving from -a server. - -@see CImImap4Settings::SetGetMailOptions() -@see CImImap4Settings::GetMailOptions() - -@publishedAll -@released -*/ -enum TImap4GetMailOptions - { - /** Get message headers. */ - EGetImap4EmailHeaders, - /** Get message body. */ - EGetImap4EmailBodyText, - /** Get message body and attachments. */ - EGetImap4EmailBodyTextAndAttachments, - /** Get message attachments. */ - EGetImap4EmailAttachments, - /** Get message body, including non-plain or non-HTML alternative text parts (or attachments). */ - EGetImap4EmailBodyAlternativeText - }; - -/** -Defines which components of a message should be fetched partially when -fetching the message from a server. - -@see -CImImap4Settings - -@publishedAll -@released -*/ -enum TImImap4PartialMailOptions - { - /** No size limits, full message to be fetched.*/ - ENoSizeLimits, - /** Get body text only. - Gets text/plain part only if text/plain part size + text/html part size - is greater than body text size limit. - Gets text/plain part and text/html part if text/plain part size + text/html part size - is less than body text size limit of the message.*/ - EBodyTextOnly, - /** Gets all the attachments less than attachment size limit.*/ - EAttachmentsOnly, - /** Gets the body text less than or equal to body text size limit and attachments - less than or equal to attachment size limit.*/ - EBodyTextAndAttachments, - /** Gets the body text less than total size limit and also attachments whose size - is within total size limit minus fetched body parts.*/ - ECumulative, - /** Gets the body text less than total size limit and all non-HTML text attachments whose size - is within total size limit minus fetched body parts.*/ - EBodyAlternativeText - }; - -/** -Flags to indicate what type of IMAP4 progress information is being returned. - -@publishedAll -@released -*/ -enum TImap4ProgressType - { - /** Progress information is an TImap4GenericProgress object. */ - EImap4GenericProgressType, - /** Progress information is an TImap4SyncProgress object. */ - EImap4SyncProgressType - }; - - -class TImap4GenericProgress -/** -Progress information for an IMAP4 get operation. - -For the 'get mail when already connected' operations, the progress state can -be obtained from TImap4GenericProgress::iState. In the case of the 'connect -and get mail and disconnect' and 'connect and get mail and stay online', the -actual progress defined in TImap4GenericProgress::iState will be of the form -of 'Copy New Mail', 'Populating Message Selection' etc. The sub-operation -state can then be obtained in the form of 'Connecting', 'Fetching', 'Disconnecting' -etc. from TImap4GenericProgress::iImap4SubStateProgress. - -@see -CImImap4GetMail - -@publishedAll -@released -*/ - { -public: - IMPORT_C TInt ConnectionState() const; - IMPORT_C TInt ConnectionIAP() const; - -public: - /** Operation type. */ - enum TImap4GenericProgressOp - { - /** Connect operation. */ - EConnect, - /** Disconnect operation. */ - EDisconnect, - /** Sync operation. */ - ESync, - /** Select operation. */ - ESelect, - /** Copy messages to local operation. */ - ECopyToLocal, - /** Copy messages within remote server operation. */ - ECopyWithinService, - /** Copy messages from local operation. */ - ECopyFromLocal, - /** Move messages to local operation. */ - EMoveToLocal, - /** Move messages within remote server operation. */ - EMoveWithinService, - /** Move messages from local operation. */ - EMoveFromLocal, - /** Message population operation. */ - EPopulate, - /** Delete operation. */ - EDelete, - /** Offline delete operation. */ - EOffLineDelete, - /** Offline undelete operation. */ - EOffLineUndelete, - /** Offline delete operation. */ - EOffLineCopyToLocal, - /** Offline move messages to local operation. */ - EOffLineMoveToLocal, - /** Offline copy messages from local operation. */ - EOffLineCopyFromLocal, - /** Offline move messages from local operation. */ - EOffLineMoveFromLocal, - /** Offline copy messages within remote server operation. */ - EOffLineCopyWithinService, - /** Offline move messages within remote server operation. */ - EOffLineMoveWithinService, - /** Offline message population operation. */ - EOffLinePopulate - }; - - /** Operation state information. */ - enum TImap4GenericProgressState - { - /** Disconnected. */ - EDisconnected, - /** Connecting. */ - EConnecting, - /** Idle. */ - EIdle, - /** Selecting the folder to use. */ - ESelecting, - /** Fetching messages to mirror server. */ - EFetching, - /** Appending local messages to remote server. */ - EAppending, - /** Copying local messages to local or within service. */ - ECopying, - /** Deleting an item, including expunging a folder. */ - EDeleting, - /** Synchronising folder after an operation. */ - ESyncing, - /** Disconnecting. */ - EDisconnecting, - /** Sync already in progress. */ - EBusy, - /** CImImap4GetMail move operation in progress. */ - EMoving, - /** CImImap4GetMail copy new mail operation in progress. */ - ECopyNewMail, - /** CImImap4GetMail move new mail operation in progress. */ - EMoveNewMail, - /** CImImap4GetMail copy selected messages operation in progress. */ - ECopyMailSelection, - /** CImImap4GetMail move selected messages operation in progress. */ - EMoveMailSelection, - /** CImImap4GetMail copy all messages operation in progress. */ - ECopyAllMail, - /** CImImap4GetMail move all messages operation in progress. */ - EMoveAllMail, - /** CImImap4GetMail populate new messages operation in progress. */ - EPopulateNewMail, - /** CImImap4GetMail populate all messages operation in progress. */ - EPopulateAllMail, - /** CImImap4GetMail populate selected messages operation in progress. */ - EPopulateMailSelection - }; - - /** Progress information type: always EImap4GenericProgressType. */ - TImap4ProgressType iType; - /** Operation type. */ - TImap4GenericProgressOp iOperation; - /** - The progress state. - - For 'connect and get mail and disconnect' and 'connect and get mail and stay - online' type operations, additional sub-operation state can be obtained from - iImap4SubStateProgress. - */ - TImap4GenericProgressState iState; - /** - The progress sub-state. - - This only applies to 'connect and get mail and disconnect' and 'connect and - get mail and stay online' type operations. - */ - TImap4GenericProgressState iImap4SubStateProgress; - /** In the EConnecting state, this field holds the connection iap value, - otherwise it holds the number of messages still to be processed. */ - TInt iMsgsToDo; - /** In the EConnecting state, this field holds the connection stage value, - otherwise it holds the number of messages processed. */ - TInt iMsgsDone; - /** Number of message parts still to be processed. */ - TInt iPartsToDo; - /** Number of message parts processed. */ - TInt iPartsDone; - /** Number of bytes (for a multipart fetch) still to be processed. */ - TInt iBytesToDo; - /** Number of bytes (for a multipart fetch) processed. */ - TInt iBytesDone; - /** Error code. */ - TInt iErrorCode; - /** Message ID returned from the operation. */ - TMsvId iReturnedMsvId; - /** The total size of messages to be downloaded (bytes). */ - TInt iTotalSize; - }; - - -class TImap4SyncProgress -/** -IMAP4 synchronisation progress information. - -The client may then use an object of this type created by the server MTM to -track synchronisation progress. - -@publishedAll -@released -*/ - { -public: - /** Synchronisation state. */ - enum TImap4SyncProgressState - { - /** Idle. */ - EIdle, - /** Busy. */ - EBusy, - /** Connecting. */ - EConnecting, - /** Disconnecting. */ - EDisconnecting, - /** Synchronising inbox. */ - ESyncInbox, - /** Synchronising folder tree. */ - ESyncFolderTree, - /** Checking remote subscription. */ - ECheckRemoteSubscription, - /** Updating remote subscription. */ - EUpdateRemoteSubscription, - /** Synchronising other information. */ - ESyncOther, - /** Deleting. */ - EDeleting, - /** Processing pending operations. */ - EProcessingPendingOps - }; - - /** Progress information type: always EImapSyncProgressType. */ - TImap4ProgressType iType; - /** Synchronisation state. */ - TImap4SyncProgressState iState; // Where is the sync up to? - /** - "Folders to do" count for synchronisation. - This is meaningful during the #ESyncOther and #EDeleting - synchronisation stages. - */ - TInt iFoldersToDo; - /** - "Folders done" count for synchronisation. - This is meaningful during the #ESyncOther and #EDeleting - synchronisation stages. - */ - TInt iFoldersDone; - /** - "Message to do" count for synchronisation. - This is meaningful during the #ESyncInbox, #ESyncOther and #EProcessingPendingOps - synchronisation stages. - */ - TInt iMsgsToDo; - /** - "Message done" count for synchronisation. - This is meaningful during the #ESyncInbox, #ESyncOther and #EProcessingPendingOps - synchronisation stages. - */ - TInt iMsgsDone; - /** - Number of headers fetched during synchronisation. - */ - TInt iHeadersFetched; - /** - Number of folders orphaned during synchronisation. - - An orphaned folder is a local folder which existed - under the service, but which did not exist - on the remote server when synchronisation was done. - */ - TInt iOrphanedFolders; - /** - Number of new folders during synchronisation. - */ - TInt iNewFolders; - /** - Number of orphaned messages during synchronisation. - - An orphaned message is one which existed locally - under the service, but which did not exist - on the remote server when synchronisation was done. - */ - TInt iOrphanedMessages; - /** - Number of remote messages tagged for deletion. - - In IMAP, messages can be flagged as deleted, before - they are later permanently removed. - */ - TInt iRemoteMessagesDeleteTagged; - /** Number of messages fetched during synchronisation. - - In the current implementation, this is always 0. Use - iHeadersFetched to get the number of headers fetched. - */ - TInt iMessagesFetchedOK; - /** Number of message parts fetched during synchronisation. - - In the current implementation, this is always 0. - */ - TInt iMessagePartsFetchedOK; - /** Number of message parts not found during synchronisation. - - In the current implementation, this is always 0. - */ - TInt iMessagePartsNotFound; - /** Number of folders not found during synchronisation. - - This can occur if the remote server returns an error when - a client attempts to select a folder during synchronisation. - */ - TInt iFoldersNotFound; - /** Any error-code that the client needs to be informed of. */ - TInt iErrorCode; - }; - -class TImap4CompoundProgress -/** -IMAP operation progress information. - -The class supplies both the two IMAP progress types, generic and synchronisation. - -The IMAP4 server MTM owns two IMAP4 sessions that are used independently of -each other to perform 'background' and 'foreground' operations. In a typical -situation, the user may be downloading the body parts of a message (populating) -in the foreground whilst in the background a full synchronisation may be underway. -In this scenario, the generic progress will give an indication of the 'foreground' -activity and the synchronisation progress will give an indication of the 'background' -progress. The synchronisation progress component of the compound progress -will always show the synchronisation progress irrespective of whether the -synchronisation is running in the foreground or the background. - -@publishedAll -@released -*/ - { -public: - /** Generic progress. */ - TImap4GenericProgress iGenericProgress; - /** Synchronisation progress. */ - TImap4SyncProgress iSyncProgress; - }; - - -class CImImap4Settings : public CImBaseEmailSettings -/** -Settings for connection to and use of an IMAP4 mail server and its mailboxes. - -Messaging clients should use an instance of this class to specify and retrieve -configuration settings that are used by an IMAP4 service when executing email -operations. - -Service settings include: - -- server log on settings (user name and password) -- message header synchronisation strategy and synchronisation limits -- message getting options, such as maximum size. Note that these options - are not used by the IMAP MTM. They can be used by client applications to - store user preferences, and be used by the client when issuing get commands. -- miscelleanous settings, including whether IMAP IDLE should be used - -CImImap4Settings objects are created and accessed through -CEmailAccounts. CEmailAccounts can also be used to get the -connection settings, such as the ISP to use, used to access an IMAP server. - -Settings for a service are associated with a service-type entry in the Message -Server'smessage store. However the settings are not actually stored in the -message store, but in the device's Central Repository data store. - -@see CEmailAccounts - -@publishedAll -@released -*/ - { -public: - IMPORT_C CImImap4Settings(); - IMPORT_C virtual ~CImImap4Settings(); - IMPORT_C void Reset(); - IMPORT_C const TPtrC8 LoginName() const; - IMPORT_C void SetLoginNameL(const TDesC8& aLoginName); - IMPORT_C const TPtrC8 Password() const; - IMPORT_C void SetPasswordL(const TDesC8& aPassword); - IMPORT_C const TPtrC8 FolderPath() const; - IMPORT_C void SetFolderPathL(const TDesC8& aFolderPath); - IMPORT_C const TPtrC8 SearchString() const; - IMPORT_C void SetSearchStringL(const TDesC8& aSearchString); - IMPORT_C TText8 PathSeparator() const; - IMPORT_C void SetPathSeparator(const TText8 aPathSeparator); - IMPORT_C TBool DisconnectedUserMode() const; - IMPORT_C void SetDisconnectedUserMode(TBool aFlag); - IMPORT_C void SetSynchronise(const TFolderSyncType aType); - IMPORT_C TFolderSyncType Synchronise() const; - IMPORT_C void SetSubscribe(const TFolderSubscribeType aType); - IMPORT_C TFolderSubscribeType Subscribe() const; - IMPORT_C TBool AutoSendOnConnect() const; - IMPORT_C void SetAutoSendOnConnect(TBool aFlag); - IMPORT_C TUint MaxEmailSize() const; - IMPORT_C void SetMaxEmailSize(const TUint aMaxEmailSize); - IMPORT_C TBool DeleteEmailsWhenDisconnecting() const; - IMPORT_C void SetDeleteEmailsWhenDisconnecting(TBool aFlag); - IMPORT_C TBool AcknowledgeReceipts() const; - IMPORT_C void SetAcknowledgeReceipts(TBool aFlag); - IMPORT_C TImap4GetMailOptions GetMailOptions() const; - IMPORT_C void SetGetMailOptions(TImap4GetMailOptions aGetMailOptions); - IMPORT_C CImImap4Settings& CopyL(const CImImap4Settings& aCImImap4Settings); - IMPORT_C TBool operator==(const CImImap4Settings& aCImImap4Settings) const; - IMPORT_C TInt32 InboxSynchronisationLimit() const; - IMPORT_C void SetInboxSynchronisationLimit(const TInt32 aInboxSyncLimit); - IMPORT_C TInt32 MailboxSynchronisationLimit() const; - IMPORT_C void SetMailboxSynchronisationLimit(const TInt32 aMailboxSyncLimit); - IMPORT_C TBool UpdatingSeenFlags() const; - IMPORT_C void SetUpdatingSeenFlags(TBool aFlag); - IMPORT_C TInt SyncRate() const; - IMPORT_C void SetSyncRateL(TInt aSyncRate); - IMPORT_C TUint FetchSize() const; - IMPORT_C void SetFetchSizeL(TUint aFetchSizeBytes); - IMPORT_C TBool ImapIdle() const; - IMPORT_C void SetImapIdle(TBool aFlag); - IMPORT_C TInt ImapIdleTimeout() const; - IMPORT_C void SetImapIdleTimeoutL(TInt aIdleTimeout); - IMPORT_C TImImap4PartialMailOptions PartialMailOptions() const; - IMPORT_C void SetPartialMailOptionsL(TImImap4PartialMailOptions aPartialMailOptions); - IMPORT_C TInt32 BodyTextSizeLimit() const; - IMPORT_C void SetBodyTextSizeLimitL(TInt32 aBodyTextSizeLimit); - IMPORT_C TInt32 AttachmentSizeLimit() const; - IMPORT_C void SetAttachmentSizeLimitL(TInt32 aAttachmentSizeLimit); - IMPORT_C TBool UseExpunge() const; - IMPORT_C void SetUseExpunge(TBool aFlag); - IMPORT_C void SetTlsSslDomainL(const TDesC8& aDomainName); - IMPORT_C TPtrC8 TlsSslDomain() const; - IMPORT_C void SetUseSyncDownloadRules(TBool aFlag); - IMPORT_C TBool UseSyncDownloadRules(); - IMPORT_C void SetFolderSyncDisabled(TBool aFlag); - IMPORT_C TBool FolderSyncDisabled(); - -private: - class TImImap4SettingsExtension - { - public: - inline TImImap4SettingsExtension(); - public: - HBufC8* iLoginName; - HBufC8* iPassword; - HBufC8* iFolderPath; - HBufC8* iSearchString; - HBufC8* iTlsSslDomain; - TInt iSyncRate; - TInt iImapIdleTimeout; - TUint iFetchSizeBytes; - TImImap4PartialMailOptions iPartialMailOptions; - TInt32 iBodyTextSizeLimit; - TInt32 iAttachmentSizeLimit; - }; - - inline TImImap4SettingsExtension* Extension() const; - inline void CheckExtensionExistsL(); - - enum TImImap4EmailSettings - { - KImap4EmailSettingsClearFlag = 0x00000000, - KImap4BaseEmailSettingsLastUsedFlag = CImBaseEmailSettings::EBaseEmailSettingsLastUsedFlag, //0x00000002 - KImap4EmailDisconnectedModeFlag = KImap4BaseEmailSettingsLastUsedFlag << 1, //0x00000004 - KImap4EmailAutoSendFlag = KImap4EmailDisconnectedModeFlag << 1, //0x00000008 - KImap4EmailDeleteEmailsWhenDisconnecting = KImap4EmailAutoSendFlag << 1, //0x00000010 - KImap4EmailAcknowledgeReceipts = KImap4EmailDeleteEmailsWhenDisconnecting << 1, //0x00000020 - KImap4EmailUpdatingSeenFlags = KImap4EmailAcknowledgeReceipts << 1, //0x00000040 - KImap4EmailIdleFlag = KImap4EmailUpdatingSeenFlags << 1, //0x00000080 - KImap4EmailExpungeFlag = KImap4EmailIdleFlag << 1, - KImap4EmailUseSyncDownloadRules = KImap4EmailExpungeFlag << 1, //0x00000200 - KImap4EmailSettingsFolderSyncDisabled = KImap4EmailUseSyncDownloadRules << 1, //0x00000400 - KImap4EmailSettingsLastUsedFlag = KImap4EmailSettingsFolderSyncDisabled - }; - - TImImap4SettingsExtension* iExtension; // renamed iReceiptAddress - - TInt32 iInboxSyncLimit; - TInt32 iMailboxSyncLimit; - - TText8 iPathSeparator; - TFolderSyncType iSynchroniseStrategy; - TFolderSubscribeType iSubscriptionStrategy; - TUint32 iMaxEmailSize; - TImap4GetMailOptions iGetMailOptions; - }; - - -class TImImap4GetMailInfo -/** -Specifies options used when retrieving messages with IMAP. - -An TImImap4GetMailInfo is passed as a packaged parameter -to CImap4ClientMtm::InvokeAsyncFunctionL() when a message -getting command is issued. - -Options include the maximum message size, and what -message parts are required. - -@see CImImap4GetMail -@see TImap4Cmds - -@publishedAll -@released -*/ - { -public: - /** The maximum message size (bytes). - Messages of greater size are not fetched. */ - TInt32 iMaxEmailSize; - /** The required message parts. */ - TImap4GetMailOptions iGetMailBodyParts; - /** The destination folder ID, specifying the - target folder when messages are copied or moved. */ - TMsvId iDestinationFolder; - }; - -/** -Specifies message criteria that are used as a filter when retrieving messages partially. - -Options include the maximum size for the whole message, -the maximum size for the body of the message, -the maximum size for the attachments with the message, and -the message parts required. - -An TImImap4GetPartialMailInfo is passed as a packaged parameter -to CImap4ClientMtm::InvokeAsyncFunctionL() when a message -populate command is issued. - -@see -CImImap4GetMail - -@publishedAll -@released -*/ - -class TImImap4GetPartialMailInfo : public TImImap4GetMailInfo - { -public: - /** The maximum size limit for the total message (bytes). */ - TInt32 iTotalSizeLimit; - /** The maximum size limit for body of the message (bytes). */ - TInt32 iBodyTextSizeLimit; - /** The maximum size limit for the attachments (bytes). */ - TInt32 iAttachmentSizeLimit; - /** The required message parts. */ - TImImap4PartialMailOptions iPartialMailOptions; - }; - -inline CImImap4Settings::TImImap4SettingsExtension* CImImap4Settings::Extension() const - { - return iExtension; - } - -inline void CImImap4Settings::CheckExtensionExistsL() - { - if (!iExtension) - iExtension=new (ELeave) CImImap4Settings::TImImap4SettingsExtension; - } -inline CImImap4Settings::TImImap4SettingsExtension::TImImap4SettingsExtension() -: iLoginName(NULL) ,iPassword(NULL) ,iFolderPath(NULL),iSearchString(NULL),iTlsSslDomain(NULL), iSyncRate(KImapDefaultInboxSyncRate), iImapIdleTimeout(KImapDefaultIdleTimeout), iFetchSizeBytes(KImapDefaultFetchSizeBytes), - iPartialMailOptions(ENoSizeLimits),iBodyTextSizeLimit(KMaxTInt),iAttachmentSizeLimit(KMaxTInt) - { - } - - -#endif // __IMAPSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imcmmain.h --- a/epoc32/include/imcmmain.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ - -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @release -*/ - -#if !defined (__IMCMMAIN_H__) -#define __IMCMMAIN_H__ - -#if !defined (__E32STD_H__) -#include -#endif - -#if !defined (__BARSC_H__) -#include // RResourceFile -#endif - - -GLREF_C void OpenResourceFileL(RResourceFile& aFile, RFs& anFs); -GLDEF_C void CloseResourceFile( TAny* aResourceFile ); - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imcvcodc.h --- a/epoc32/include/imcvcodc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,360 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#if !defined(__IMCVCODC_H__) -#define __IMCVCODC_H__ - -#include -#include -#include -#include -#include -#include -#include // CMsgActive - -#include -#include -#include - -#define KBase64 _L("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=") -#define KCharFormat _L("%c") - - // Maximum length allowed for an 'encoded-word' rfc2047 -const TInt KEncodedWordMaxLength = 75; - -// All encoding information except data and charset name length. =?B?=? => 7 -const TInt KMaxEncodedInformationLength = 7; - -// Length of the field name, eg "Subject: ". This may change as other fields are processed. -const TInt KMaxHeaderFieldNameLength = 12; - -const TInt KImCvFinished=(-1); -const TInt KImCvAdvance=(1); - - -// error states involved in sending attachments etc. -/** -@internalComponent -@deprecated -*/ -enum TIattErrorCode - { - KImAttNoError = 0, - KImAttFinished = 1 - }; - - -/** -@internalComponent -@released -*/ -enum TImBodyConvAlgorithm - { - ENoAlgorithm, - EQPEncode, - EQPDecode, - EBase64Encode, - EBase64Decode, - EUUEncode, - EUUDecode - }; - -// Used in CImSendConvert -/** -@internalComponent -@deprecated -*/ -enum TImSendEncoding - { - ESendNoAlgorithm, - ESendMimeAlgorithm - }; - -struct SAttachmentInfo -/** -@internalComponent -@released -*/ - { - TInt iSize; - TFileName iName; - TFileName iPath; - TBool iComplete; - }; - -// Shared implementation code -//---------------------------------------------------------------------------------------- -class TImCodec -//---------------------------------------------------------------------------------------- -/** -@internalAll -@released -*/ - { -protected: - // base64 and UU coding defines. - enum EMaskValues{ ESixBitMask = 0x3F, EEightBitMask = 0xFF }; - enum EMaskShiftValues{ ESix = 6, EFour = 4, ETwo = 2, EZero = 0 }; - -public: - virtual TInt Encode( const TDesC8& aSrcString, TDes8& rDestString)=0 ; - virtual TBool Decode( const TDesC8& aInputLine, TDes8& rOutputLine)=0; - -protected: - // TImCodec(); - inline TBool IsDigit( TChar aChar ); - }; - - -// Interface for sending file data. -//---------------------------------------------------------------------------------------- -class TImFileCodec : public TImCodec -//---------------------------------------------------------------------------------------- -/** -@internalAll -@released -*/ - { -public: - virtual TInt PrefixNextLineL( TDes8& rOutputLine, const TFileName& aName, TInt& rPaddingCount ); - virtual TInt PostfixNextLine( TDes8& rOutputLine, TInt& rPaddingCount ); - virtual void Initialise(); - -protected: - TInt iPrefixState; - TInt iPostfixState; - }; - -// Dummy, just copies -//---------------------------------------------------------------------------------------- -class TImCodecNull : public TImFileCodec -//---------------------------------------------------------------------------------------- -/** -@internalComponent -@released -*/ - { -public: - TInt Encode( const TDesC8& aSrcString, TDes8& rDestString); - TBool Decode( const TDesC8& aInputLine, TDes8& rOutputLine); - }; - -// Quoted-printable encoding/decoding - -//---------------------------------------------------------------------------------------- -class TImCodecQP : public TImFileCodec -//---------------------------------------------------------------------------------------- -/** -@internalAll -@released -*/ - { -public: - IMPORT_C TImCodecQP(); - IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString); - IMPORT_C TBool Decode( const TDesC8& aInputLine, TDes8& rOutputLine); - - // Not to be used anymore.. - IMPORT_C TInt EncodeRichText( const TDesC8& aInputLine, TDes8& rOutputLine); - IMPORT_C TInt DecodeRichText( const TDesC8& aSrcString, TDes& rDestString ); - - // Functions which allow flexiblity. Can replace the '=' char or add characters.. - // to what is defined as 'plain. - inline void AddPlainChar(const TDesC8& aCharList ); - inline void AddEncodeChar(const TDesC8& aCharList ); - inline void SetQPChar( TUint8 aChar); - - inline TUint8 ReplacementChar( TChar aControlChar ); - inline TBool IsPlain( TChar aChar ); - -private: - TBool SmartBreak( TInt written, const TDesC8& pSource ); - inline TBool IsBreakable( TChar aChar); - inline void AddSoftLineBreak(TDes8& aPtr, TInt& aPadding, TInt& aWritten); - inline void AddSoftLineBreak(const TUint8* apEnd, TUint8* aPtr, TInt& aPadding, TInt& aWritten); - -private: - TUint8 iQPCharacter; - TPtrC8 iPlainCharList; - TPtrC8 iEncodeCharList; - - TInt iPaddingCount; - }; - - - -// Base64 coding/decoding - -//---------------------------------------------------------------------------------------- -class TImCodecB64 : public TImFileCodec -//---------------------------------------------------------------------------------------- -/** -@publishedAll -@released -*/ - { -private: - // base64 coding defines - enum{ EPadChar = 64 }; - -public: - IMPORT_C TImCodecB64(); - IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString); - IMPORT_C TBool Decode( const TDesC8& aSrcString, TDes8& rDestString); - IMPORT_C void Initialise(); - -protected: - TInt DoEncode(const TDesC8& aSrcString, TDes8& rDestString, TBool aInsertLineBreaks); - -private: - TInt iShiftStored; - TInt iMaskShiftStored; - }; - -class TImCodecB64WithLineBreaks : public TImCodecB64 -/** -@internalComponent -@released -*/ - { -public: - TInt Encode(const TDesC8& aSrcString, TDes8& rDestString); - }; - - -// UU coding/decoding - -//---------------------------------------------------------------------------------------- -class TImCodecUU : public TImFileCodec -//---------------------------------------------------------------------------------------- -/** -@publishedAll -@released -*/ - { -private: - // UU coding defines - - enum{ ESpace = 32, EBackQuote = 96 }; - - enum TImBodyPostfix - { - EInvertedComma = 0, - EEndString, - EEndOfPostfix - }; - -public: - IMPORT_C TImCodecUU(); - IMPORT_C TInt Encode( const TDesC8& aSrcString, TDes8& rDestString ); - IMPORT_C TBool Decode( const TDesC8& aSrcString, TDes8& rDestString ); - TInt PrefixNextLineL( TDes8& rOutputLine, const TFileName& aName, TInt& rPaddingCount ); - TInt PostfixNextLine( TDes8& rOutputLine, TInt& rPaddingCount ); -private: - void AppendFilenameL( TDes8& rOutputLine, const TFileName& aName ); - - }; - - - - -// For converting a text string to/from encoded form -// Note: 'Word' here has special meaning derived from the one defined in rfc2047. -// It refers to one encoding instance. - -//---------------------------------------------------------------------------------------- -class CImConvertHeader : public CBase -//---------------------------------------------------------------------------------------- -/** -@internalTechnology -@released -*/ - { -public: - IMPORT_C static CImConvertHeader* NewL(CImConvertCharconv& aConverter); - ~CImConvertHeader(); - - IMPORT_C void SetMessageType(TBool aIsMIME); - IMPORT_C void DecodeAllHeaderFieldsL(CImHeader& rHeader); - - // Functions for decoding & converting descriptors - - IMPORT_C void DecodeNonMIMEHeaderFieldL(const TDesC8& aBufIn, TDes& aBufOut); - IMPORT_C void DecodeHeaderFieldL(const TDesC8& aBufIn, TDes& aBufOut); - IMPORT_C void DecodeHeaderFieldL(const TDesC16& aBufIn, TDes& aBufOut); - IMPORT_C void ConvertHeaderFieldL(const TDesC16& aBufIn, RBuf8& aBufOut, TBool aIsAddressField); - - // Header needed for retrieving encoding information, used in Send code. - IMPORT_C void EncodeHeaderFieldL(const TDesC& aBufIn, RBuf8& aBufOut, - CArrayFix* aInfoArray, TInt aState, TInt aArrayVal = 0); - - IMPORT_C void EncodeHeaderFieldL(const TDesC& aBufIn, RBuf8& aBufOut, - const TUint aCharset, const TImHeaderEncodingInfo::TEncodingType aType, TBool aIsAddressField); - - IMPORT_C TBool FindEncodedWord(TPtrC8& aData, TInt& aInit,TInt& rStart, TInt& rEnd); - - void Append(TDes& aBuffer, const TDesC8& aAddition); - inline CImConvertCharconv& CharConv(); - - IMPORT_C TUint OverrideCharset() const; - IMPORT_C void SetOverrideCharset(TUint aCharset); - -private: - void ConstructL(); - CImConvertHeader(CImConvertCharconv&); - // Functions dealing only with single 'encoded-word's - void GetCharsetAndEncodeDataL(const TDesC& aBufIn, RBuf8& aBufOut, TImHeaderEncodingInfo& aInfo); - void EncodeWordL(const TDesC& aBufIn, RBuf8& aBufOut, TImHeaderEncodingInfo& aInfo, - const TDesC8& aCharsetName, RBuf8& aEncodedWord); - - TBool DecodeWordL(const TDesC8& aBufIn, TDes& aBufOut, TInt rRemainder); - void DecodeRecipientListL( CDesCArray& aArray); - void DecodeFieldL(const TDesC& aField); - - TBool DoCharsetConversionL(const TDesC& aDataToConvert, RBuf8& aEncodedWord); - - void DoEncodingL(RBuf8& aEncodedWord, TImHeaderEncodingInfo& aInfo); - - TInt AddEncodedWordInfoL(const TDesC8& aEncodedWord, RBuf8& aBufOut, - TImHeaderEncodingInfo& aInfo, const TDesC8& aCharsetName); - - TBool IsAscii( TUint aChar ) const; - TBool ExtractTextToEncode(const TDesC& aBufIn, TInt& rStart, TInt& rEnd, TBool aIsAddressField); - void Insert(TDes8& aBuffer, const TDesC16& aInsert); - -private: - TImHeaderEncodingInfo iEncodingInfo; - CImConvertCharconv& iCharConv; - - // Get access to QP/ Base64 encoding/decoding functions - TImCodecB64 iB64Codec; - TImCodecQP iQPCodec; - - // Need in the narrow build, to check if possible to convert to/from - // the machines character set. - TUint iCharacterSetId; - - CImHeader* iHeader; - - // Converted static variables used in EncodeWordL() - TBool isMIMEMessageHeader; - TUint iOverrideCharset; - }; - - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/impcmtm.h --- a/epoc32/include/impcmtm.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,416 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Client MTM for the IMAP4 protocol -// -// - - -#if !defined (__IMPCMTM_H__) -#define __IMPCMTM_H__ - -#if !defined (__MTCLBASE_H_) -#include -#endif - -#if !defined (__MIUTHDR_H_) -#include -#endif - -#if !defined (__MIUTPARS_H__) -#include //TImMessageField -#endif - -#if !defined (__IMAPSET_H__) -#include -#endif - -#if !defined (__IMAPCMDS_H__) -#include -#endif - -#if !defined(__OFFOP_H__) -#include -#endif - -#if !defined(__MIUTMSG_H__) -#include -#endif - - - -// Forward declarations. -class CImap4ClientSessionObserver; -class CImImap4GetMail; -class CImEmailAutoSend; - -///////////////////////////////////////////////////////////////////////////// -// Imap4 Client MTM -class CImap4ClientMtm : public CBaseMtm, public MImUndoOffLineOperation - -/** IMAP4 client MTM interface, providing access to the email services using the IMAP4 -protocol. - -The class provides support for: - -- connecting to remote IMAP4 mail servers -- synchronising message headers with mailboxes on these servers -- getting message bodies and attachments -- copying and moving messages -- creating messages that forward or reply to IMAP4 messages -- server notification of new messages using IMAP IDLE -- queueing operations requested when there is no connection to a mail server, to be -performed when a connection is made (offline operations). - -Note that CImap4ClientMtm does not support many of the generic functions defined by -the @c CBaseMtm base class. In particular: - -- Message address information, body, subjects, and attachments are not manipulated -through CImap4ClientMtm. Consequently, SaveMessageL() has an empty -implementation, and is not used. Message access and manipulation is instead done -through CImEmailMessage, which understands the email specific message formats, -including MHTML (RFC 2557). The RFC 822 email header, which includes subject and -address information, is encapsulated in a CImHeader object, which can be obtained from -a CImEmailMessage object. IMAP also has its own specific flags, such as draft, -answered, and deleted: this can be accessed through TMsvEmailEntry, which extends the -message server's generic TMsvEntry to add email-specific information. - -- The idea of a default service used by base class functions DefaultServiceL(), -ChangeDefaultServiceL(), and RemoveDefaultServiceL() is not supported. - -IMAP specific commands are issued through the InvokeAsyncFunctionL() function, with -the commands defined in the #TImap4Cmds enumeration. Details of particular commands -are given in the documentation for that enumeration, but the following describes some of -the key concepts required to use those commands. Note that usually these commands do -not correspond directly to the IMAP protocol commands described in RFC 3501. Instead, -they are at a higher level, to simplify the logic required for an email client program. - --------------------------------------- - -Connection and services - -Settings for connection to and use of an IMAP4 mail server and its mailboxes are -encapsulated in an CImImap4Settings object, created and accessed through -CEmailAccounts. Preferences for the network connection (e.g. the ISP to use) to be made -to access an IMAP server are also accessed through CEmailAccounts. - -The settings are associated with a service-type entry in the Message Server's message -store. Message and folder type entries under the service entry store a local copy of the -mailboxes and messages that are present on an IMAP server. For this reason, the service -is sometimes referred to as the local mirror of an IMAP server. - -By default, it is assumed that the user has a primary mailbox on the server called INBOX, -though this can be changed if necessary using CImImap4Settings::SetFolderPathL(). (To -avoid confusion, the term "Inbox" used in the IMAP MTM documentation refers to this -mailbox, rather than the Message Server's standard local Inbox folder.) - -The settings store the user's log-in details required to access the IMAP server, and other -settings not related to connection, but which affect the behaviour of commands, such as -synchronisation, made to the service. - --------------------------------------- - -Synchronisation - -The IMAP4 MTM provides the means to synchronise message headers on a remote -IMAP mailboxes with the messages headers on the phone. Note that synchronisation only -refers to message headers. Once headers are synchronised, populate operations (i.e. -getting the message bodies) can be done. - -The basic steps involved in a full synchronisation are: - -- The headers of messages in the Inbox are synchronised. -- The local list of folders is synchronised with those existing on the remote IMAP service. -Depending on the service settings, the local or remote settings of subscribed mailboxes -may be updated (see below for more information). -- The headers of messages in subscribed folders are synchronised. - -Queued offline operations (see below) pending on the Inbox or subscribed folders are -performed prior to the relevant folder being synchronised. - -Synchronisations can be performed in the background or the foreground. A foreground -synchronisation means no other requests, such as message fetching, can be made to the -MTM, until the synchronisation is complete. A background synchronisation allows some -types of command to be given while it is in progress. Commands that write to the remote -server are not allowed however while a background synchronisation is in progress. A -client is informed of the state of a background synchronisation through the -MMsvImapConnectionObserver callback interface. - -Synchronisations commands are made through -CImap4ClientMtm::InvokeAsyncFunctionL(). There a variety of commands available -that give different options for compounding synchronisation -with other commands, such as connection, and synchronising only particular folders. See -TImap4Cmds for details. Progress information for synchronisation commands can be -obtained from the CMsvOperation object returned by the InvokeAsyncFunctionL(). -Synchronisation progress information is encapsulated in a TImap4SyncProgress object. - -Settings that affect how a synchronisation is performed include: - -- Subscriptions: when an IMAP service had been synchronised, the Messaging server will -contain entries for all folders on the remote server. These entries will be marked invisible -within the TMsvEntry for the folder, implying that they should be invisible to the user. -Messages in these folders are not synchronised unless the folder has been subscribed to. -Note a folder subscription can be set either locally (i.e. just on the phone), using -the #KIMAP4MTMLocalSubscribe command, or remotely (on the server), possibly through email -clients on other devices. A service can be set to synchronise folders using either or both -of these types of subscription (CImImap4Settings::SetSynchronise()). Local and remote -subscriptions can themselves be synchronised in various ways (CImImap4Settings::SetSuscribe()). - -- Filters: a filter prevents certain e-mail messages from being synchronised onto the -device when a client requests a synchronisation. Filters can include anything permitted by -the IMAP Search command, including date, size, content, and message flags. - -- Limits: service settings can limit the number of emails synchronised to the inbox -(CImImap4Settings::SetInboxSynchronisationLimit()), and to other folders -(CImImap4Settings::SetMailboxSynchronisationLimit()). - -- Sync rate: one of the synchronisation commands -(KIMAP4MTMConnectAndSyncCompleteAfterDisconnect) periodically resynchronises -the Inbox until the service is disconnected. CImImap4Settings::SyncRate() sets the -refresh period. - --------------------------------------- - -Getting and copying messages - -After messages headers have been synchronised, message bodies and attachments can be -fetched from the remote email server. Getting message parts and saving them in the -mirror service is calling populating them. - -Commands for these actions can be made through -CImap4ClientMtm::InvokeAsyncFunctionL(). There are a large number of commands, -for different combinations of these options: - -- action type: whether to just populate messages, or to also copy or move them to a local -folder -- message selection: whether to get all, new, or selected messages -- connection: whether to make a new connection or assume an existing connection -- disconnect: whether to disconnect or stay online after operation is complete - -For the populate type commands, further options can be set that control the message -getting behaviour. Basic options control, encapsulated in TImImap4GetMailInfo, specify -whether body text and/or attachments are fetched, and a maximum message size. There -are also options, encapsulated in TImImap4GetPartialMailInfo, that allow size limits to -be separately specified for body text and/or attachments. If the the body is larger than the -limit, then the body is partially downloaded up to the limit. Only attachments smaller -than the specified size are downloaded. A partially downloaded message can later be -fully downloaded. - -For the copy or move type commands, a TImImap4GetMailInfo parameter is supplied, in -order to specify the destination folder for the messages, and a maximum message size. - -Progress information for getting commands can be obtained from the CMsvOperation -object returned by the InvokeAsyncFunctionL(). Progress information is encapsulated in -a TImap4GenericProgress object. - -Fetching and then copying or moving specified messages can also be performed by using -the standard Messaging Framework @c CMsvEntry::CopyL() and @c -CMsvEntry::MoveL() functions on entries under the remote service. If these functions are -used, then the entire message is fetched without size limits. - -CMsvEntry functions can also be used to: - -- create a folder on a remote server -- delete messages -- copy or move messages from a local folder into a remote folder -- copy or move messages between remote folders - -Note that changing an existing entry through CMsvEntry is not supported. An MTM- -specific command #KIMAP4MTMRenameFolder is instead provided to rename a remote -folder. - -The page "CMsvEntry functions for IMAP4 message entries", linked to in the "See also" -section below, provides more details on using CMsvEntry. - --------------------------------------- - -Offline operations - -Some operations can only be performed while online, while other commands may -be stored while offline for processing when next connected. An attempt to perform a -command while offline that requires the MTM to be connected results in immediate -completion with the error code KErrDisconnected. - -Permitted offline operations include: - -- copy -- move -- delete - -Queued offline operations are usually performed when a connection is made, prior to the -relevant folder being synchronised. Delete operations can alternatively be set to be done -on disconnection using the service setting -CImImap4Settings::SetDeleteEmailsWhenDisconnecting(). - -Note that: -- Offline operations are only permitted if the service setting SetDisconnectedUserMode() -is true. -- It is possible to undo pending offline operations using the commands -#KIMAP4MTMCancelOffLineOperations and #KIMAP4MTMUndeleteAll. - --------------------------------------- - -IMAP IDLE support - -IMAP IDLE (RFC 2177) is an optional expansion of the IMAP email accessing protocol -that allows the server to send updates to the client that messages have been created or -deleted in real time. The IDLE command is sent from the client to the server when the -client is ready to accept unsolicited mailbox update messages. Whether the client requests -the server to provide IDLE support is set in the CImImap4Settings::SetImapIdle() service -setting. When the IMAP MTM receives such a notification, it synchronises the changed -folder. Email clients can be notified of such changes by setting a MMsvEntryObserver -observer on a folder. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CImap4ClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession); - - ~CImap4ClientMtm(); - void HandleEntryEvent(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - void StoreL(); // uses a CMsvStore from the Session - void RestoreL(); - CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); - CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); - TUint ValidateMessage(TUint aPartList); - TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); - void SaveMessageL(); - void LoadMessageL(); - IMPORT_C void StoreSettingsL(); // uses a CMsvStore from the session - IMPORT_C void RestoreSettingsL(); - - // --- RTTI functions --- - TInt QueryCapability(TUid aCapability, TInt& aResponse); - void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); - CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); - // Addressees have no meaning in the text mtm. - void AddAddresseeL(const TDesC& aRealAddress); - void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); - void RemoveAddressee(TInt aIndex); - - // Attachment functions to support the SendAs API - - IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); - IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C void CreateMessageL(TMsvId aServiceId); - - IMPORT_C virtual TMsvId DefaultServiceL() const; - IMPORT_C virtual void RemoveDefaultServiceL(); - IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); - -public: // Returning a list of all the offline operations for a service entry. - IMPORT_C CImOperationQueueList* QueueListL(CMsvEntry& aServiceEntry); -public: // Wrapper to settings - IMPORT_C const CImImap4Settings& Imap4Settings() const; - IMPORT_C void SetImap4SettingsL(const CImImap4Settings& aSettings); -public: // inherited from MUndoOffLine - virtual void UndoOffLineChangesL(const CImOffLineOperation& aDeleted, TMsvId aFolderId); -protected: - CImap4ClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession); - void ConstructL(); - void ContextEntrySwitched(); // called after the context of this instance has been changed to another entry - -private: - TBool ValidateAddress(const TPtrC& anAddress); - void SendOnNextConnectionL(); - TMsvPartList DoFindL(const TDesC& aTextToFind, TMsvPartList aPartList); - void FilterAllOrNewMailsL(TInt aFunctionId,const CMsvEntrySelection& aSelection,TDes8& aParameter); - void FilterMailSelectionL(const CMsvEntrySelection& aSelection,TDes8& aParameter); - CMsvOperation* CopyMoveOrPopulateL(TInt aFunctionId,TDes8& aParameter,TRequestStatus& aCompletionStatus); - void ConvertToPartialPopulate(TDes8& aParameter); - // To check whether a partial fetch or full fetch of message has to be done. - TBool IsPartialPopulate(TDes8& aParameter); - -private: - CImImap4Settings iImImap4Settings; - TImMessageField iTImMessageField; - CImap4ClientSessionObserver* iImap4ClientSessionObserver; - HBufC* iEmailAddressFormatString; // defines format of email address used by "Send as" API eg _L("/"%S/" <%S>") - CImHeader* iHeader; - CMsvEntrySelection* iMsvEntrySelection; - CImImap4GetMail* iImIMAP4GetMail; - CImEmailOperation* iImEmailOperation; - TPckgBuf iImap4GetPartialMailInfo; - }; - -class CImImap4GetMail : public CMsvOperation -/** Encapsulates an operation to copy, move, and populate (i.e. download the full -message body) IMAP4 emails from the remote inbox to any local folder. - -Note that the same operations are available by calling CImap4ClientMtm::InvokeAsyncFunctionL() -with a suitable command. - -@publishedAll -@released -*/ - { -public: - IMPORT_C CMsvOperation* GetMailL(TInt aFunctionId, CImap4ClientMtm& aImap4ClientMtm, const CMsvEntrySelection& aMsvEntrySelection, TDes8& aImap4GetMailInfo, TRequestStatus& aObserverRequestStatus); - ~CImImap4GetMail(); - void DoCancel(); - void RunL(); - const TDesC8& ProgressL(); - const TDesC8& FinalProgress(); -private: - CImImap4GetMail(CMsvSession& aMsvSession, CImap4ClientMtm& aImap4ClientMtm, TRequestStatus& aObserverRequestStatus); - void ConstructL(TInt aFunctionId, const CMsvEntrySelection& aMsvEntrySelection, TDes8& aImap4GetMailInfo); - void SelectNextStateL(); // selects next state to go to - void ChangeStateL(); // initiates the next state operation - void SelectAndChangeToNextStateL(); - void RequestComplete(TInt aError); - void Complete(); - void ConnectToMailboxL(); - void CopyMoveNewMessagesL(TBool aCopy); - void CopyMoveMessageSelectionL(TBool aCopy); - void CopyMoveAllMessagesL(TBool aCopy); - void PopulateNewMessagesL(); - void PopulateAllMessagesL(); - void PopulateMessageSelectionL(); - void DisconnectFromMailboxL(); - void ResetProgress(); - void StoreProgressL(); -private: - enum TImImap4GetMailState - { - EConnectToMailbox, - ECopyNewMessages, - EMoveNewMessages, - EPopulateNewMessages, - ECopyMessageSelection, - EMoveMessageSelection, - EPopulateMessageSelection, - ECopyAllMessages, - EMoveAllMessages, - EPopulateAllMessages, - EDisconnectFromMailbox, - EFinished - }; - - CImap4ClientMtm& iImap4ClientMtm; - CMsvEntrySelection* iMsvEntrySelection; - CMsvOperation* iMsvOperation; - - TImap4GenericProgress iProgress; - TImap4GenericProgress iErrorProgress; - TImImap4GetMailState iState; - TInt iCommand; - TPckgBuf iProgressBuf; - TPckgBuf iImap4GetPartialMailInfo; - }; - -#endif // __IMPCMTM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/imsk.h --- a/epoc32/include/imsk.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,605 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// This file contains the API definition for the class CImTextServerSession. -// This class creates sockets and is responsible for transmitting data between client and the server -// -// - - - -/** - @file -*/ - - -#ifndef __IMSK_H__ -#define __IMSK_H__ - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifdef _DEBUG -#define __IMSK_SIMULATION -#endif - -// Enable Scripting in Debug Builds only -#ifdef _DEBUG -#define __IMSK_SCRIPTING -#endif - -const TInt EActivePriorityHigh = 1; -const TInt KCarriageLineFeedLength=2; -/** Max numeric IP address len = "0:0:0:0:0:0:194.217.242.23" = 45 chars */ -const TInt KImskIPAddressLen=45; // Max numeric IP address len = "255.255.255.255" = 15 chars - -/** Maximum buffer size of the received data -@internalTechnology -@released -*/ -typedef TBuf8 TImMailBuffer; - -/** received buffer data line type -@internalTechnology -@released -*/ -enum TImLineType - { - ECRLFTerminated, - EBufferTooSmall, - EReceiveBufferFull, - EReceiveBufferEmpty - }; - - -class CImLog; -class CImTextServerScript; -class CImIAPPreferences; -class CImConnect; -class CSecureSocket; -class CImSocketIdleTimer; - -/** -Creates/opens socket and sends and receives data. - -@publishedAll -@released -*/ -class CImTextServerSession : public CMsgActive - { -public: - enum TImOperationMode{ - EImServerMode, - EImClientMode - }; - -/** - //cat Construction - @fn NewL() - Intended Usage : Static factory constructor. Uses two phase construction and - leaves nothing on the CleanupStack. - @since 6.0 - @leave KErrNoMemory. - @return A pointer to the newly created CImTextServerSession object. - @pre None - @post A fully constructed and initialised CImTextServerSession object. - - */ - IMPORT_C static CImTextServerSession *NewL(); - - /** - @internalTechnology - @released - */ - IMPORT_C static CImTextServerSession* NewL(RSocketServ& aSocketServ, CImConnect& aConnect); - -/** - //cat Construction - @fn NewL(TInt aSendIdleTime, TInt aReceiveIdleTime) - Intended Usage : Static factory constructor. Uses two phase construction and - leaves nothing on the CleanupStack. - @since 7.0s - @param aSendIdleTime is the time for which the idle timer runs (for a send) - @param aReceiveIdleTime is the time for which the idle timer runs (for a recieve) - @leave KErrNoMemory. - @return A pointer to the newly created CImTextServerSession object. - @pre None - @post A fully constructed and initialised CImTextServerSession object. - */ - IMPORT_C static CImTextServerSession* NewL(TInt aSendIdleTime, TInt aReceiveIdleTime); - - /** - @internalTechnology - @released - */ - IMPORT_C static CImTextServerSession* NewL(TInt aSendIdleTime, TInt aReceiveIdleTime, RSocketServ& aSocketServ, CImConnect& aConnect); - -/** - //cat Destruction - @fn ~CImTextServerSession() - Intended Usage : Destructor. - @since 6.0 - */ - ~CImTextServerSession(); - -/** - @fn QueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue) - Intended Usage : Queue a connect assuming the socket is successfully opened. - Error Condition : KErrNoMemory - @since 6.0 - @param aStatus Asynchronous completion status - @param anAddressDesc is the IP address - @param aIAPPreferences is the IAP connection preference to be used - @param aPortNum is the port number eg. 143, 25, 110. - @param aEnableTimeout Not used - @pre None - @post connection is ready to send and receive data. - */ - IMPORT_C void QueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue); - - IMPORT_C void QueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, const TDesC8& aSSLDomainName); - -/** - @fn SSLQueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue) - Intended Usage : Queue a wrapped SSL connect on an socket assuming the socket is successfully opened. - Error Condition : KErrNoMemory, EImskSocketOpen - @since 7.0s - @param aStatus Asynchronous completion status - @param anAddressDesc is the IP address - @param aIAPPreferences is the IAP connection preference to be used - @param aPortNum is the port number eg. 993, 465, 995. - @param aEnableTimeout Not used - @pre None - @post connection is ready to send and receive data. - */ - IMPORT_C void SSLQueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue); - - IMPORT_C void SSLQueueConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, const TDesC8& aSSLDomainName); - -/** - @fn Disconnect() - Intended Usage : To disconnect and close socket connection. - Error Condition : None - @since 6.0 - @pre None - @post connection is closed. - */ - IMPORT_C void Disconnect(); - IMPORT_C void Disconnect(TRequestStatus &aStatus); - void TimeOut(); - - - IMPORT_C const TDesC& LocalName(); -/** - This method should be called before Send/SendQueueReceive() - TLS command is sent. - @fn SetSSLTLSResponseL(const TDesC8& aDesc) - Intended Usage : To use for secure connection. - Error Condition : KErrNoMemory - @since 6.2 - @param aDesc is the positive response the MTM expects from the connected - server for TLS command. e.g. OK, +OK, 220 etc.. - @pre aDesc cannot be zero length - @leave EImskNoTLSResponseString - @post iTLSResponse is filled with aDesc contents - - */ - IMPORT_C void SetSSLTLSResponseL(const TDesC8& aDesc); - -/** - @fn Send(TRequestStatus &aStatus, const TDesC8& aDesc) - Intended Usage : To send data. - Error Condition : None - @since 6.0 - @param aStatus Asynchronous completion status - @param aDesc is the aData to be sent - @post None - - */ - - //sends - IMPORT_C void Send(TRequestStatus &aStatus, const TDesC8& aDesc); - IMPORT_C void SendWithTimeout(TRequestStatus& aStatus, TInt aIdleTime, const TDesC8& aDesc); - IMPORT_C void SendQueueReceiveWithTimeout(TRequestStatus& aStatus, TInt aIdleTime, const TDesC8& aDesc); - IMPORT_C void Send(TRequestStatus &aStatus, TRefByValue aFmt,...); -/** - @fn SendQueueReceive(TRequestStatus &aStatus, const TDesC8& aDesc) - Intended Usage : To send data and queue a receive. - Error Condition : None - @since 6.0 - @param aStatus Asynchronous completion status - @param aDesc is the aData to be sent - @post Sends the data and queues a receive. - GetCurrentTextLine should be called after this method to read received data - */ - IMPORT_C void SendQueueReceive(TRequestStatus &aStatus, const TDesC8& aDesc); - IMPORT_C void SendQueueReceive(TRequestStatus &aStatus, TRefByValue aFmt,...); - - //receives -/** - Returns first full line of data received from socket to user - @fn GetCurrentTextLine(TDes8& aDesc) - Intended Usage : To return received data. - Error Condition : None - @since 6.0 - @param aDesc will be filled with received buffer - @post returns the received buffer in the form of aDesc - @return EReceiveBufferEmpty when received data is empty - EBufferTooSmall when aDesc length is smaller than received data - ECRLFTerminated when received data is complete (full line) - EReceiveBufferFull when received data length is more than aDesc length - GetCurrentTextLine should be called after Send methods - */ - IMPORT_C TImLineType GetCurrentTextLine(TDes8& aDesc); -/** - User queues a new request from the socket (unless there's a full line of data in buffer - then signal user and there's no need to make a receive request) - @fn QueueReceiveNextTextLine(TRequestStatus &aStatus) - Intended Usage : User queues a new request from the socket. - Error Condition : None - @since 6.0 - @param aStatus for asynchronous request - - */ - IMPORT_C void QueueReceiveNextTextLine(TRequestStatus &aStatus); -/** - @fn ReceiveBinaryData(TRequestStatus &aStatus, TDes8& aDes,TInt aLen) - Intended Usage : Users queue a request for received data - Error Condition : None - @since 6.0 - @param aStatus Asynchronous completion status - @param aDes is the aData to be received - @param aLen is the length of the data the user wants to read - @post aDes will be filled with received data of aLen. - ReceiveBinaryData should be called after Send. - */ - IMPORT_C void ReceiveBinaryData(TRequestStatus &aStatus, TDes8& aDes,TInt aLen); - - IMPORT_C void LogText(const TDesC8& aString); // write string into log file - IMPORT_C void LogError(const TDesC8& aString,const TInt aError); // write string and integer into log file - -/** - @fn GetIAPValue(TUint32 &aIAP) - Intended Usage : Returns the IAP we are connecting/connected with in aIAP or returns an error code - @since 6.0 - @param aIAP will be the current IAP - @post aIAP will be filled with current IAP connected. - @return will return genconn errors if any - */ - - IMPORT_C TInt GetIAPValue(TUint32 &aIAP); -/** - @fn GetRConnectionName(TName &aName) - Intended Usage : Returns the name of the RConnection. - @since 9.1 - @param aName Buffer in which the name is returned. - @post aName will be filled with current name of the RConnection. - @return KErrNone if successful, or another of the system-wide error codes. - */ - - IMPORT_C TInt GetRConnectionName(TName &aName); - -/** Returns the bearer type we are connected to with in aBearer or returns an error code */ - IMPORT_C TInt GetIAPBearer(TUint32 &aBearer); - -/** - @internalTechnology - - @fn GetLastSocketActivityTimeout(TUint32& aTimeout) - Intended Usage : Returns the last socket activity timeout value - @since 9.1 - @param aTimeout is a return argument containing the timeout if it was found - @post aTimeout will be filled with the timeout value - @return Returns KErrNone, KErrNotFound or KErrBadHandle - */ - IMPORT_C TInt GetLastSocketActivityTimeout(TUint32& aTimeout); - -/** - @fn GetSocketServ() - Intended Usage : Returns the Socket Server - @since 8.0 - @return Socket Server - */ - RSocketServ& GetSocketServ(); - -/** - @fn GetConnectionStage() - Intended Usage : Gets the stage of the connection process obtained from RConnection - @since 7.0s - @return The current connection stage from RConnection or a system-wide error code. - - */ - IMPORT_C TInt GetConnectionStage(); - -/** - @fn SocketIdle() - Intended Usage : disconnects the socket and notifies the observer when the socket has been idle - for some time - @since 7.0s - */ - void SocketIdle(); - -/** - @fn SetPrimaryTextServerSession(CImTextServerSession& aPrimaryTextServerSession) - Intended Usage : Users set only on the secondary session - @since 9.2 - @param aPrimaryTextServerSession is PrimarySession's TextServerSession - @pre None - @post Going to be use on the secondary session -*/ - IMPORT_C void SetPrimaryTextServerSession(CImTextServerSession* aPrimaryTextServerSession); - -/** - @fn GetCImConnect() - Intended Usage : Returns the CImConnect object - @since 9.2 - @return CImConnect - @post Going to be use on the secondary session - */ - CImConnect* GetCImConnect(); - -// Depreciated functions - do not use. - IMPORT_C void QueueConnect(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, TBool aEnableTimeout = ETrue); - IMPORT_C void QueueConnect(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TInt aType, TBool aEnableTimeout = ETrue); - IMPORT_C void QueueConnect(TRequestStatus& aStatus,const TDesC& anAddressDesc, TInt aPortNum, TCallBack aDisconnectFunction,const TUint32 aIntraddress,TInt aType, TBool aEnableTimeout = ETrue); - IMPORT_C void QueueConnect(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum,const TUint32 aIAPaddress, TInt aType, TBool aEnableTimeout = ETrue); - IMPORT_C void QueueConnect(TRequestStatus& aStatus,const TDesC& anAddressDesc, TInt aPortNum, TCallBack aDisconnectFunction, TBool aEnableTimeout = ETrue); - IMPORT_C void QueueConnect(TRequestStatus& aStatus,const TDesC& anAddressDesc, TInt aPortNum, TCallBack aDisconnectFunction, const CImIAPPreferences& aIAPPreferences,TInt aType, TBool aEnableTimeout = ETrue); - IMPORT_C TInt Send(const TDesC8& aDesc); - IMPORT_C TInt Send(TRefByValue aFmt,...); - IMPORT_C TInt SendReceive(const TDesC8& aDesc); - IMPORT_C TInt Receive(TDes8& rDes); - IMPORT_C void Receive(TRequestStatus &aStatus, TDes8& rDes); - IMPORT_C static CImTextServerSession *NewLC (TImOperationMode aMode, RSocketServ &aServerServ); - IMPORT_C static CImTextServerSession *NewL(RSocketServ &aServerServ); - //Do not call SetSecurity. Call SetSSLTLSResponseL - IMPORT_C TInt SetSecurity(TBool aSecurityOn, TBool aUnattendedMode = FALSE); - IMPORT_C void PerformLogging(TBool aLogging); - -private: -/** - //cat Construction and Destruction - @fn CImTextServerSession() - Intended Usage : Constructor. First phase of two-phase construction method. Does - non-allocating construction. - @since 6.0 - - */ - CImTextServerSession(); - - CImTextServerSession(RSocketServ& aSocketServ, CImConnect& aConnect); -/** - //cat Construction - @fn CImTextServerSession(TInt aSendIdleTime, TInt aReceiveIdleTime) - Intended Usage : Constructor. First phase of two-phase construction method. Does - non-allocating construction. - @since 7.0s - @param aSendIdleTime is the time for which the idle timer runs (for a send) - @param aReceiveIdleTime is the time for which the idle timer runs (for a receive) - */ - CImTextServerSession(TInt aSendIdleTime, TInt aReceiveIdleTime); - - CImTextServerSession(TInt aSendIdleTime, TInt aReceiveIdleTime, RSocketServ& aSocketServ, CImConnect& aConnect); - -/** - //cat Construction and Destruction. - @fn ConstructL() - Intended Usage : Second phase of two-phase construction method. Does any - allocations required to fully construct the object. - @since 6.0 - @leave KErrNoMemory. - @pre First phase of construction is complete - @post The object is fully constructed and initialised. - */ - void ConstructL(); - - TInt Open(); - void Close(); - - void CreateLogFile(TInt aPortNum); - void OpenScriptFile(TInt aPortNum); - - void DoRunL(); - void DoComplete(TInt& aStatusValue); // Cleanup code - void DoCancel(); - - // these called from DoRunL; - void SocketConnect(); - void DoConnectedToSocketL(); - void DoQueueConnect(); - - void RealReceive(TDes8& aDesc); - void RealSend(const TDesC8& aDesc); -/** - @fn ParseSSLTLSResponseL() - Intended Usage : session will compare the response(for TLS command) - with the MTMs response - @since 6.2 - @leave KImskSSLTLSNegotiateFailed if the response doesn't match - @post CSecureSocket object is created - */ - void ParseSSLTLSResponseL(); - -/** - @fn CreateSecureSocketL() - Intended Usage : to use secure socket connection - @since 6.2 - @leave None - @post CSecureSocket object is created and iSecurityState is set to EImSecurityStateOn; - */ - void CreateSecureSocketL(); - -/** - @fn QueueGenericConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, TBool aEnableTimeout = ETrue) - Intended Usage : Queue a standard or wrapped SSL connect on an socket assuming the socket is successfully opened. Called by SSLQueueConnectL and QueueConnectL - Error Condition : KErrNoMemory, EImskSocketOpen - @since 7.0s - @param aStatus Asynchronous completion status - @param anAddressDesc is the IP address - @param aIAPPreferences is the IAP connection preference to be used - @param aPortNum is the port number eg. 143, 993 - @param aSSLDomainName SSL domain name to use for secure sockets - @pre None - @post connection is ready to send and receive data. - */ - void QueueGenericConnectL(TRequestStatus &aStatus,const TDesC& anAddressDesc, TInt aPortNum, const CImIAPPreferences& aIAPPreferences, const TDesC8& aSSLDomainName); - -#if defined(__IMSK_SIMULATION) - void ReadNextPeriod(); - TUint32 GetTokenValue(TInt aTokenLen, const TPtrC8& aBuffer); - TBool IsSuspended(); - TBool SuspendPeriodSet(); - void ResetSuspendPeriod(); - void SetAfterTimer(); - TInt ReadConfigNum(const TDesC& aName); -#endif - - enum TImSocketState - { - EImClosed, - EImResolve, - EImConnect, - EImSendReceive, - EImDialUsingOverride, - EImTLSHandShakeStarted, - EImSendReceiveTimedOut - }; - - enum TImSendReceiveState - { - EImInactive, - EImSending, - EImReceiving, - EImReceivingBinaryData, - EImSendingQueueReceive, - EImSuspended, //used when we are in a simulated GPRS suspend. - }; - - enum TImSecurityState - { - EImSecurityStateOff, - EImSecurityStateOn, - EImSecurityStateFailed - }; -private: - /** handle to the socket */ - RSocket iSocket; - /** handle to RSocketServ */ - RSocketServ iServ; - /** handle to Hostresolver */ - RHostResolver iHostResolver; - /** handle to secure socket for SSL/TLS connection */ - CSecureSocket* iSecureSocket; - - TUint32 iCurrentIAPcache; - /** Used to find if IAP is cached */ - TBool iIAPCached; // true if the above value can be used. - /** result of the host resolver */ - TNameEntry iHostent; - /** port number e.g. 25 for SMTP, 143 for IMAP and 110 for POP */ - TInt iPortNum; - /** server address */ - TPtrC iAddressDesc; - /** data returned by the socket */ - TImMailBuffer iReceive; - TSockXfrLength iLen; - TImSocketState iState; - TImSendReceiveState iSendReceive; - - HBufC8* iBuffer; - TImLineType iCurrentLineType; - - /** to log connection data */ - CImLog* iLog; - /** IP address name */ - TBuf iLocalName; - /** secure state i.e to use Secure socket */ - - TImSecurityState iSecurityState; - const CImIAPPreferences* iIAPPreferences; - - CImConnect* iConnect; - - TDes8* iReceiveData; // buffer we just recieved data into - - - HBufC8* iSentData; - /** response for different mail protocols like 220,+OK, OK, BAD */ - HBufC8* iTLSResponse; //response for different mail protocols like 220,+OK, OK, BAD - /** internal flag to read tls response */ - TBool iReadTLSResponse; - TBool iPerformLogging; - TBool iWrappedSocket; - - CImSocketIdleTimer* iSocketIdleTimer; - TTimeIntervalMicroSeconds32 iSendIdleTime; - TTimeIntervalMicroSeconds32 iReceiveIdleTime; - - /** A shorter idle timeout, used when a fast response is expected */ - TTimeIntervalMicroSeconds32 iSendShortIdleTime; - TTimeIntervalMicroSeconds32 iReceiveShortIdleTime; - - -#ifdef __IMSK_SCRIPTING - CImTextServerScript* iScript; -#endif - -#if defined(__IMSK_SIMULATION) - - RFs iFs; - - - TUint32 iScriptedIAP; // value to return for iap when scripting - TUint32 iBearerIAP; // value to return for bearer when scripting - - - TImSendReceiveState iSuspendedState; - - RTimer iSuspendTimer; - - RFile iGprsFile; - - TBool iGprsConfigExists; - - TInt iCfgFilePos; - - TTime iLastSuspend; // time last suspension took place - // in universal time - - TTimeIntervalSeconds iStart; // number of seconds since last delay - // before the following delay occurs. - // if 0 no suspend is required. - TTimeIntervalSeconds iDuration; // how long to delay. If 0 no suspend is - // required - TBool iRepeat; // repeat the above delay for an - // infinite period - - HBufC8* iSendData; // suspended data -#endif // __IMSK_SIMULATION - - CImTextServerSession* iPrimaryTextServerSession; //Only going to be set on the secondary session - - TBool iClientOwnsConnection; - - /** SSL domain name for secure sockets */ - HBufC8* iSSLDomainName; - TBool iSocketIdleTimeSet; // iSocketIdleTimeSet=ETrue, if smtp server did not responds within 10 seconds after sending "." - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/ineturi.h --- a/epoc32/include/ineturi.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Class for storing URI and its properties. -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __INETURI_H__ -#define __INETURI_H__ - - -class CInetUriImpl; -class CInetUriProperties; -class CUri8; - -using namespace InetUriList; - -/** -RInetUri represents a handle to the URI and its associated URI properties. A URI must always be associated with -a service type and a list type. Service type defines the purpose for which the URI is added (for example, -Browser, WAP Push, Push EMail, and so on), and the list type defines the permission associated with the URI -(for example, whitelist or blacklist). - -@publishedAll -@released -*/ -class RInetUri - { -public: - friend class CInetUriListImpl; - - IMPORT_C RInetUri (); - - IMPORT_C void CreateL ( const TDesC8& aUri, TServiceType aServiceType, TListType aListType ); - IMPORT_C void Close (); - - IMPORT_C TServiceType ServiceType () const; - IMPORT_C TPermission Permission () const; - IMPORT_C TListType ListType () const; - IMPORT_C const TDesC8& FavouriteName () const; - IMPORT_C const CUri8& Uri () const; - - IMPORT_C void SetListType ( TListType aListType ); - IMPORT_C void SetFavouriteNameL ( const TDesC8& aFavouriteName ); - -private: - // Used internally. Not intended for external use - CInetUriImpl& Impl () const; - void Attach ( CInetUriImpl& aInetUri ); -private: - CInetUriImpl* iInetUriImpl; // // The internal URI object that this handle is connected to - }; - -#endif //__INETURI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/ineturilist.h --- a/epoc32/include/ineturilist.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Class for opening and manipulating the internet uri list. -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __INETURILIST_H__ -#define __INETURILIST_H__ - -#include -#include -#include -#include - -class CInetUriListImpl; - - - - -/** -This class defines the interface that can be implemented by an application to receive the -query results. - -@publishedAll -@released -*/ -class MQueryResultsCallback - { - public: - /** - The callback function that will be called when there is at least one query result. - - @param aUri The Inet URI object. Ownership will be passed. The application should close the - object handle. - @return ETrue - More query results, if any, should follow. - EFalse - No more query result is required and querying will be stopped. - */ - virtual TBool OnQueryResultsL ( RInetUri aUri ) =0; - }; - - -/** -This class defines the interface that can be implemented by an application that wishes to do -protocol and scheme-based normalisation of the URI before query operation. - -@publishedAll -@released -*/ -class MUriCustomiser - { - public: - /** - The callback function that will be called to perform scheme and protocol-based normalisation. - The URI will be syntax normalised before calling this function. - - @param aUri The syntax normalised URI. - @return Final normalised URI, which is syntax and protocol/scheme based. - */ - virtual CUri8* OnUriCustomisationL ( const TUriC8& aUri ) =0; - }; - - - -/** -RInetUriList represents a handle to the list as a whole. Opening the handle will initiate a connection the -URI List server. This class is responsible for adding, removing, updating, or retrieving the URI and -its associated properties. - -@publishedAll -@released -*/ -class RInetUriList - { -public: - IMPORT_C RInetUriList (); - - IMPORT_C void OpenL (); - IMPORT_C void Close (); - - IMPORT_C void AddL ( const RInetUri& aInetUri ); - IMPORT_C void RemoveL ( const RInetUri& aInetUri ); - IMPORT_C void UpdateL ( const RInetUri& aInetUri ); - - IMPORT_C RInetUri OpenInetUriL ( const TDesC8& aUri, InetUriList::TServiceType aServiceType ); - IMPORT_C TInt Count ( InetUriList::TServiceType aServiceType, InetUriList::TListType aListType ); - - IMPORT_C TInt GetListType ( const TDesC8& aUri, InetUriList::TServiceType aServiceType, InetUriList::TListType& aListType ); - - IMPORT_C void QueryUriL ( const TQueryArgs& aArgs, MQueryResultsCallback* aQueryCallback, MUriCustomiser* aUriOptimiser =NULL ); -private: - CInetUriListImpl* iInetUriListImpl; // // The internal list object that this handle is connected to - }; - -#endif //__INETURILIST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/ineturilistdef.h --- a/epoc32/include/ineturilistdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,333 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Place holder for common constants, type definitions and enums. -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __INETURILISTDEF_H__ -#define __INETURILISTDEF_H__ - -#include - -/** -@publishedAll -@released -*/ -namespace InetUriList - { - /** - Types of supported service type. - - @publishedAll - @released - */ - enum TServiceType - { - /** Browser */ - EBrowser =0x01, - /** WapPush */ - EWapPush =0x02, - /** PushEMail */ - EPushEMail =0x03, - /** DevProv */ - EDevProv =0x04, - /** VOIP */ - EVoip =0x05 - }; - - /** - Types of supported list type. - - @publishedAll - @released - */ - enum TListType - { - /** BlackList **/ - EBlackList =0x01, - /** WhiteList **/ - EWhiteList =0x02 - }; - - /** - Types of permission. - - @publishedAll - @released - */ - enum TPermission - { - /** ReadOnly **/ - EReadOnly =0x01, - /** ReadWrite **/ - EReadWrite =0x02 - }; - - /** - Types of matches. - - @publishedAll - @released - */ - enum TURIMatch - { - /** Exact match **/ - EExact =0x01, - /** Domain match **/ - EDomain =0x02, - /** Exact path match **/ - EExactPath =0x03, - /** partial prefix path match **/ - EPartialPrefixPath =0x04, - /** Partial suffix path match **/ - EPartialSuffixPath =0x05 - }; - - /** - Error codes error numbers -7650 to -7699 have been reserved for InetUriList. - */ - static const TInt KErrorBase = -7650; - /** - URI already exists in database. - */ - static const TInt KErrUriAlreadyExists = KErrorBase; - /** - URI not found in database. - */ - static const TInt KErrUriNotFound = KErrorBase - 1; - /** - Addition of URI failed. - */ - static const TInt KErrUriAddFailed = KErrorBase - 2; - /** - Removal of URI failed. - */ - static const TInt KErrUriRemoveFailed = KErrorBase - 3; - /** - Updation of URI properties failed. - */ - static const TInt KErrUriUpdateFailed = KErrorBase - 4; - /** - URI is read only. - */ - static const TInt KErrUriReadOnly = KErrorBase - 5; - /** - Service type of URI is missing. - */ - static const TInt KErrServiceTypeNotPresent = KErrorBase - 6; - /** - Handle is not open. - */ - static const TInt KErrNotOpen = KErrorBase - 7; - /** - Invalid stream handle - */ - static const TInt KErrInvalidStreamHandle = KErrorBase - 8; - - /** - Panic text if handle is not open. - */ - _LIT(KInetUriListErrHandleNotOpen, "Handle not open"); - - } - -/** -This class defines the argument parameters for the query operation. It is possible to -set the arguments in various combinations. The argument types can be ServiceType, -ListType, URI in TDesC8 form, and URIMatch. - -@publishedAll -@released -*/ -class TQueryArgs - { - public: - /** - The argument types. - - @internalComponent - */ - enum TArgType - { - EUri = 1, - EServiceType, - EListType, - EURIMatch - }; - /** - Bit width of the type. - - @internalComponent - */ - enum - { - KBitsPerType = 3 - }; - - /** - Default constructor - */ - inline TQueryArgs () - :iFlags ( 0 ) - {} - - - /** - A templated constructor that constructs the query argument. - It takes one argument. - */ - template < class T0 > - explicit inline TQueryArgs ( T0 a0 ) - { - Assign ( a0 ); - iFlags=(Type(a0)<<(( Type(a0))*KBitsPerType)); - } - - /** - A templated constructor that constructs the query argument. - It takes two arguments. - */ - template < class T0, class T1 > - inline TQueryArgs ( T0 a0, T1 a1 ) - { - Assign ( a0 ); - Assign ( a1 ); - iFlags=(Type(a0)<<(( Type(a0))*KBitsPerType)) | - (Type(a1)<<(( Type(a1))*KBitsPerType)); - } - - /** - A templated constructor that constructs the query argument. - It takes three arguments. - */ - template < class T0, class T1, class T2 > - inline TQueryArgs ( T0 a0, T1 a1, T2 a2 ) - { - Assign ( a0 ); - Assign ( a1 ); - Assign ( a2 ); - iFlags=(Type(a0)<<(Type(a0)*KBitsPerType)) | - (Type(a1)<<(Type(a1)*KBitsPerType)) | - (Type(a2)<<(Type(a2)*KBitsPerType)); - } - - /** - A templated constructor that constructs the query argument. - It takes four arguments. - */ - template < class T0, class T1, class T2, class T3 > - inline TQueryArgs ( T0 a0, T1 a1, T2 a2, T3 a3 ) - { - Assign ( a0 ); - Assign ( a1 ); - Assign ( a2 ); - Assign ( a3 ); - iFlags=(Type(a0)<<(Type(a0)*KBitsPerType)) | - (Type(a1)<<(Type(a1)*KBitsPerType)) | - (Type(a2)<<(Type(a2)*KBitsPerType)) | - (Type(a3)<<(Type(a3)*KBitsPerType)); - } - - - /** - Checks whether the flag is set for the given argument type. - - @internalComponent - */ - TBool IsSet ( TArgType aType ) const - { - TInt val = iFlags & ( aType << ( aType * KBitsPerType ) ); - return iFlags & ( aType << ( aType * KBitsPerType ) ); - } - - /** - Returns the argument if set, otherwise returns KErrNotFound. - - @internalComponent - */ - TInt Get ( TArgType aType ) const - { - if ( IsSet ( aType ) ) - return iArgs[aType - 1]; - return KErrNotFound; - } - - /** - Maximum number of arguments. Currently set as 4. - - @internalComponent - */ - enum - { - KMaxArguments = 4 - }; - - private: - - /** - @internalComponent - */ - TArgType Type ( const TDesC8* ) - { - return EUri; - } - - TArgType Type ( InetUriList::TServiceType ) - { - return EServiceType; - } - - TArgType Type ( InetUriList::TListType ) - { - return EListType; - } - - TArgType Type ( InetUriList::TURIMatch ) - { - return EURIMatch; - } - - void Assign ( const TDesC8* aValue ) - { - iArgs[Type(aValue)-1] = (TInt)aValue; - } - - void Assign ( InetUriList::TServiceType aValue ) - { - iArgs[Type(aValue)-1] = aValue; - } - - void Assign ( InetUriList::TListType aValue ) - { - iArgs[Type(aValue)-1] = aValue; - } - - void Assign ( InetUriList::TURIMatch aValue ) - { - iArgs[Type(aValue)-1] = aValue; - } - - private: - TInt iArgs [KMaxArguments]; - TInt iFlags; - }; - -#endif // __INETURILISTDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/ipaddr.h --- a/epoc32/include/ipaddr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef CIPADDRESS___ -#define CIPADDRESS___ - -#include - -/** Size of CIpAddress buffer. */ -const TInt KIpAddressSize = 39; // large enough for full IPv6 address = 39 (8 * 4 + 7) - -class CIpAddress : public CBase -/** Utility class to hold an IP address as a string on the heap. - -This can be useful for parsers that have IP address fields. -@publishedAll -@released -*/ - { - public: - IMPORT_C static CIpAddress* NewL(const TDesC& aAddr); - IMPORT_C static CIpAddress* NewLC(const TDesC& aAddr); - inline static CIpAddress* NewL(); - inline static CIpAddress* NewLC(); - IMPORT_C ~CIpAddress(); - IMPORT_C void SetAddrL(const TDesC& aAddr); - IMPORT_C const TDesC& Addr() const; - private: - CIpAddress(); - private: - HBufC* iAddr; - }; - -inline CIpAddress* CIpAddress::NewL() -/** Allocates and constructs a new empty IP address object. - -@return New IP address object */ - { - return NewL(KNullDesC); - } - -inline CIpAddress* CIpAddress::NewLC() -/** Allocates and constructs a new empty IP address object, leaving the object -on the cleanup stack. - -@return New IP address object */ - { - return NewLC(KNullDesC); - } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/irmsgtypeuid.h --- a/epoc32/include/irmsgtypeuid.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// $Workfile: irmsgtypeuid.h $ -// $Author: Stevep $ -// $Revision: 4 $ -// $Date: 4/12/01 9:45 $ -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#if !defined (__IRMSGTYPEUID_H__) -#define __IRMSGTYPEUID_H__ - -const TInt32 KUidMsgTypeIrTInt32 = 0x100053A4; -// This is defined in irobutil.h, which we don't control. -// const TUid KUidMsgTypeIr = {KUidMsgTypeIrTInt32}; - -const TInt32 KUidMsgTypeIr = 0x100053A4; - -const TUid KUidMsgTypeIrUID = {KUidMsgTypeIr}; // we will revert this when we persuade PAN to make the other one a real TUid. - -#endif // __IRMSGTYPEUID_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/irmtmcmds.h --- a/epoc32/include/irmtmcmds.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// $Workfile: irmtmcmds.h $ -// $Author: Stevep $ -// $Revision: 3 $ -// $Date: 20/11/01 11:19 $ -// -// - - - -/** - @file - @publishedAll - @released -*/ - - -#if !defined (__IRMTMCMDS_H__) -#define __IRMTMCMDS_H__ - - -#endif //__IRMTMCMDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/logdef.h --- a/epoc32/include/logdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Define Logging Service Constants, Macros and Definitions -// intended for inclusion into any source file -// which define classes wishing to use log server services. -// -// - -#if !defined(__LOGDEF_H__) -#define __LOGDEF_H__ - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__ANSICOMP_H__) -#include // Enforce ANSI compliance upon Microsoft Compilers -#endif - -// This define removed for sanity and performance sake. To enable logging in -// your component, redefine the __LOGGING macro in your own .cpp files, prior to -// the #include of this file. -// #define __LOGGING 1 - -/** -Define a constant to control the maximum length of a log message -@publishedAll -@deprecated -*/ -const TInt KMaxLogEntrySize = KMaxFileName; - -// Logging definitions -#if defined (__LOGGING) && defined (_DEBUG) - -// Logging activity is enabled -#if !defined(__CLOG_H__) -#include "clog.h" -#endif - - // Define an error message for failed open calls - _LIT(KLogOpenFailed,"No log available"); - - // Define a set of macros to control logging activity - // The log server client pointer - #define __DECLARE_LOG CLogClient* iLogPtr; - - // Open a connection to the log server for appended log messages - #define __OPEN_LOG(aLogName) {iLogPtr = NULL; TRAPD(logError,(iLogPtr = CLogClient::NewL(aLogName,EFalse))); if(logError !=KErrNone) __QINFO(KLogOpenFailed);} - // Open a connection to the log server for log messages to go to a clean log - #define __OPEN_CLEANLOG(aLogName) {iLogPtr = NULL; TRAPD(logError,(iLogPtr = CLogClient::NewL(aLogName,ETrue))); if(logError !=KErrNone) __QINFO(KLogOpenFailed);} - // Close the connection to the log server - #define __CLOSE_LOG {delete iLogPtr; iLogPtr = NULL;} - // Push and pop the log onto the cleanup stack - #define __PUSHLOGL {CleanupStack::PushL(iLogPtr);} - #define __POPLOG {CleanupStack::Pop();} - - // Log a simple message - #define __LOG(aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,CLogClient::ELogLight);} - // Log a message with single parameter formatting. - #define __LOG1(aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(CLogClient::ELogLight,aText,aV1);} - - #if defined (__PROFILING__) - // Define additional macros for logging profiling information - #define __PROFILELOG(aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,CLogClient::ELogProfile);} - #define __PROFILELOG1(aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(CLogClient::ELogProfile,aText,aV1);} - #else - // Empty macros for non-profiling builds - #define __PROFILELOG(aText); - #define __PROFILELOG1(aText,aV1); - #endif - - // A log method entry macro - #define __LOG_ENTER(aText) {if(iLogPtr != NULL) iLogPtr->LogEnter(aText,CLogClient::ELogProfile); } - // A log method exit macro - #define __LOG_RETURN {if(iLogPtr != NULL) iLogPtr->LogReturn(); } - // Log a simple message at a particular level of detail - #define __LOGX(aLevel,aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,aLevel);} - // Log a simple message at a particular level of detail with single parameter formatting. - #define __LOGX1(aLevel,aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(aLevel,aText,aV1);} - // Log a simple message at trace level of detail - #define __TRACELOG(aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,CLogClient::ELogTrace); } - // Log a simple message at trace level of detail with single parameter formatting. - #define __TRACELOG1(aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(CLogClient::ELogTrace,aText,aV1);} - // Show a simple message within the info window. - #define __QINFO(aText) {User::InfoPrint(aText);} - // Configuration of logging server behaviour - // Turn on the RDebug::Print() when logging (Default setting) - #define __ENABLE_LOGRDEBUG() {if(iLogPtr != NULL) iLogPtr->RDebugConfig(ETrue);} - // Turn off the RDebug::Print() when logging - #define __DISABLE_LOGRDEBUG() {if(iLogPtr != NULL) iLogPtr->RDebugConfig(EFalse);} - -#else - #if !defined (_DEBUG) - // In Release builds we want no macro definition whatsoever - #define __DECLARE_LOG - - #else // In debug builds... - // Empty macros for non-logging builds, except for __DECLARE_LOG - we want to ensure the - // object sizes of classes are identical when headers are included in classes with a mixture - // of __LOGGING turned on and off, to avoid nasty run-time linking errors. - #define __DECLARE_LOG void* iLogPtrNotInUse; - #endif - #define __OPEN_LOG(aLogName) - #define __OPEN_CLEANLOG(aLogName) - #define __CLOSE_LOG - #define __PUSHLOGL - #define __POPLOG - #define __LOG_ENTER(aText) - #define __LOG_RETURN - #define __LOG(aText) - #define __LOG1(aText,aV1) - #define __LOGX(aLevel,aText) - #define __LOGX1(aLevel,aText,aV1) - #define __PROFILELOG(aText) - #define __PROFILELOG1(aText,aV1) - #define __TRACELOG(aText) - #define __TRACELOG1(aText,aV1) - #define __QINFO(aText) - #define __ENABLE_LOGRDEBUG() - #define __DISABLE_LOGRDEBUG() - -#endif // __LOGGING - -#endif // __LOGDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mdataproviderobserver.h --- a/epoc32/include/mdataproviderobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Definition of the data provider observer abstract class -// It is anticipated that this class will be used as a mixin for -// those objects which wish to provide services for an MDataProvider -// plugin. -// -// - - -#ifndef __MDATAPROVIDEROBSERVER_H__ -#define __MDATAPROVIDEROBSERVER_H__ - -// System includes -// -#include - -//##ModelId=3B712B2B01C2 -class MDataProviderObserver -/** -MDataProviderObserver provides a virtual interface for any class to observe -any MDataProvider, and provide data receiving services. -@publishedAll -@deprecated -*/ - { -public: // Methods - -/** - Intended Usage : Called by the data provider to request processing of - the data within the buffer. - @since 6.0 - @param aBuffer A reference to the buffer with the data to process - */ - //##ModelId=3B712B2B0209 - virtual void ProcessDataL(HBufC8& aBuffer) = 0; - -/** - Intended Usage : Called by the data provider to report its status to - its observer. A status code which is either a standard error condition, - (i.e. < 0), a percentage complete value, ( 0 > aStatus < 100), OR a - TPluginStatus value. - @since 6.0 - @param aStatusCode The status of the data provider - */ - //##ModelId=3B712B2B0203 - virtual void SetStatus(TInt aStatusCode = KErrNone) = 0; - -/** - Intended Usage : The request to construct a CDataHandler to process data - of aDataType, where aDataType is a string to match against some plugins - declared data handling ability. - @since 6.0 - @param aDataType A reference to a descriptor with the data type - */ - //##ModelId=3B712B2B01FE - virtual void SetDocumentTypeL(const TDesC& aDataType) = 0; - -/** - Intended Usage : The request to construct a CDataHandler for aDataType with - non default document encoding where aDataType is a string to match against - some plugins declared data handling ability. - @since 6.0 - @param aDataType A reference to a descriptor with the data type - @param aContentType A reference to a descriptor with the content type - */ - //##ModelId=3B712B2B0200 - virtual void SetDocumentTypeL(const TDesC& aDataType, const TDesC& aContentType) = 0; - -/** - Intended Usage : The report of how many bytes of data is expected to be - passed to ProcessDataL, enabling %age reporting capabilities. - @since 6.0 - @param aAmountExpected An integer value of the expected amount - */ - //##ModelId=3B712B2B01EC - virtual void SetDataExpected(TInt aAmountExpected) = 0; - -/** - Intended Usage : Set the URI that the DataProvider considers the base - URI for the current data. - @since 6.0 - @param aBaseUri A const pointer to the uri - */ - //##ModelId=3B712B2B01EA - virtual void SetBaseUriL(const TDesC* aBaseUri) = 0; - -private: - -/** - Intended Usage : Reserved for future expansion. - @since 6.0 - */ - //##ModelId=3B712B2B01E1 - virtual void MDataProviderObserverReserved1() =0; - -/** - Intended Usage : Reserved for future expansion. - @since 6.0 - */ - //##ModelId=3B712B2B01E0 - virtual void MDataProviderObserverReserved2() =0; - - }; // MDataProviderObserver - -#endif // __MDATAPROVIDEROBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mdptx.h --- a/epoc32/include/mdptx.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Data generator for data transmission, used by URL Handler when transmitting data -// -// - -#if !defined(__MDPTX_H__) -#define __MDPTX_H__ - -#include - -/** - @publishedAll - @released -*/ -class MDataProviderTransmissionData - { -public: - // This should return the data that the url handler should transmit. - // This call will be repeated until datasize amounts of data has been - // transmitted - virtual const TDesC8& DataL()=0; - - // Returns the size of the amount of data that needs to be transmitted. - virtual TInt DataSize()=0; - - // This returns the name of the data, this will depend on the type of - // data transmission, - virtual const TDesC& DataNameL()=0; - - // This should return the refering url or NULL; - virtual const TDesC& RefererUrlL()=0; - - // This returns the accepted charset. - virtual const TDesC& AcceptedCharsetL()=0; - - // This returns the accepted mimetype - virtual const TDesC& AcceptedMimetypes()=0; - -private: - // Reserved for future expansion - IMPORT_C virtual void MDataProviderTransmissionData_Reserved1()=0; - }; - -#endif // __MDPTX_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mframeworksp.h --- a/epoc32/include/mframeworksp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// MMFrameworkSP.h -// -// - -#ifndef __MFRAMEWORKSP_H__ -#define __MFRAMEWORKSP_H__ - -// System includes -// -#include - -// Forward class declarations -// -class MWAPEngineObserver; -class CXmlTaskCoordinator; -class CLocalContext; -class CWapGCtxClient; -class CAttributeLookupTable; -class MWtaiPublicObserver; - -//##ModelId=3B666FA40394 -class MFrameworkSP -/** -@publishedAll -@deprecated -*/ - { -public: - -/** - Intended Usage : Return a pointer to the engine observer (pointer - because it could be NULL). - @since 6.0 - @return A pointer to the MWAPEngineObsever object. - */ - //##ModelId=3B666FA403C7 - virtual MWAPEngineObserver* Observer() =0; - -/** - Intended Usage : Gets the Task Coordinator. - @since 6.0 - @return A reference to the Task Coordinater. - */ - //##ModelId=3B666FA403C6 - virtual CXmlTaskCoordinator& TaskCoordinator() =0; - -/** - Intended Usage : Gets WAP Local Context. - @since 6.0 - @return A reference to the WAP Local Context. - */ - //##ModelId=3B666FA403BE - virtual CLocalContext& LocalContext() =0; - -/** - Intended Usage : Gets WAP Global Context. - @since 6.0 - @return A reference to the WAP Global Context. - */ - //##ModelId=3B666FA403BD - virtual CWapGCtxClient& GlobalContext() =0; - -/** - Intended Usage : Gets the Attribute Look Up Table. - @since 6.0 - @return A reference to the Attribute Look Up Table. - */ - //##ModelId=3B666FA403BC - virtual CAttributeLookupTable& AttributeLookup() =0; - -/** - Intended Usage : - @since 6.0 - @return A reference to the WtaiPublic observer - */ - //##ModelId=3B666FA403B2 - virtual MWtaiPublicObserver& WtaiPublicObserver() =0; - - }; - -#endif // __MFRAMEWORKSP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miut_err.h --- a/epoc32/include/miut_err.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,521 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MIUT_ERR_H__ -#define __MIUT_ERR_H__ - -// Minimum value for an MTM-specific error -/** -@publishedAll -@released -*/ -const TInt KMiutErrorBase = (-170); - -// POP3-specific error codes - -/** -@publishedAll -@released -*/ -const TInt KPop3ErrorBase = KMiutErrorBase; - -/** -@publishedAll -@released -*/ -const TInt KPop3CannotConnect = KPop3ErrorBase; - -/** -@publishedAll -@released -*/ -const TInt KPop3InvalidUser = KPop3ErrorBase-1; - -/** -@publishedAll -@released -*/ -const TInt KPop3InvalidLogin = KPop3ErrorBase-2; - -/** -@publishedAll -@released -*/ -const TInt KPop3CannotCreateApopLogonString = KPop3ErrorBase-3; - -/** -@publishedAll -@released -*/ -const TInt KPop3ProblemWithRemotePopServer = KPop3ErrorBase-4; - -/** -@publishedAll -@released -*/ -const TInt KPop3CannotOpenServiceEntry = KPop3ErrorBase-5; - -/** -@publishedAll -@released -*/ -const TInt KPop3CannotSetRequiredFolderContext = KPop3ErrorBase-6; - -/** -@publishedAll -@released -*/ -const TInt KPop3InvalidApopLogin = KPop3ErrorBase-7; - -/** -@publishedAll -@released -*/ -const TInt KPopTopError = (-179); - -// IMSK-specific error code -/** -@publishedAll -@released -*/ -const TInt KImskBaseError = (-180); - -/** -@publishedAll -@released -*/ -const TInt KImskErrorDNSNotFound = KImskBaseError; - -/** -@publishedAll -@released -*/ -const TInt KImskErrorControlPanelLocked = KImskBaseError-1; - -/** -@publishedAll -@released -*/ -const TInt KImskErrorISPOrIAPRecordNotFound = KImskBaseError-2; - -/** -@publishedAll -@released -*/ -const TInt KImskErrorActiveSettingIsDifferent = KImskBaseError-3; - -/** -@publishedAll -@released -*/ -const TInt KImskSecuritySettingsFailed = KImskBaseError-4; - -/** -@publishedAll -@released -*/ -const TInt KImskSSLTLSNegotiateFailed = KImskBaseError-5; - -/** -@publishedAll -@released -*/ -const TInt KImskTopError = (-190); - -// error codes -190 to -199 are used by Sockets - -// IMAP-specific error codes -/** -@publishedAll -@released -*/ -const TInt KImapBaseError = (-200); - -/** -@publishedAll -@released -*/ -const TInt KErrImapConnectFail = KImapBaseError; - -/** -@publishedAll -@released -*/ -const TInt KErrImapServerFail = KImapBaseError-1; - -/** -@publishedAll -@released -*/ -const TInt KErrImapServerParse = KImapBaseError-2; - -/** -@publishedAll -@released -*/ -const TInt KErrImapServerBusy = KImapBaseError-3; - -/** -@publishedAll -@released -*/ -const TInt KErrImapServerVersion = KImapBaseError-4; - -/** -@publishedAll -@released -*/ -const TInt KErrImapSendFail = KImapBaseError-5; - -/** -@publishedAll -@released -*/ -const TInt KErrImapBadLogon = KImapBaseError-6; - -/** -@publishedAll -@released -*/ -const TInt KErrImapSelectFail = KImapBaseError-7; - -/** -@publishedAll -@released -*/ -const TInt KErrImapWrongFolder = KImapBaseError-8; - -/** -@publishedAll -@released -*/ -const TInt KErrImapServerNoSecurity = KImapBaseError-9; - -/** -@publishedAll -@released -*/ -const TInt KErrImapServerLoginDisabled = KImapBaseError-10; - -/** -@publishedAll -@released -*/ -const TInt KErrImapTLSNegotiateFailed = KImapBaseError-11; - -/** -@publishedAll -@released -*/ -const TInt KErrImapCantDeleteFolder = KImapBaseError-12; - -/** -@publishedAll -@released -*/ -const TInt KErrImapInvalidServerResponse = KImapBaseError-13; - -/** -@publishedAll -@released -*/ -//This POP error declared in IMAP error range, -//since there is no scope to declare the error within pop range. -const TInt KErrPop3ServerAlreadyConnected = KImapBaseError-14; - -/** -@publishedAll -@released -*/ -const TInt KImapTopError = (-219); - -// DMSS-specific error codes -/** -@publishedAll -@released -*/ -const TInt KDmssBaseError = (-220); - -/** -@publishedAll -@released -*/ -const TInt KDmssUnknownErr = (KDmssBaseError-1); - -/** -@publishedAll -@released -*/ -const TInt KDmssMailboxUnavailableErr = (KDmssBaseError-2); - -/** -@publishedAll -@released -*/ -const TInt KDmssActionAbortedErr = (KDmssBaseError-3); - -/** -@publishedAll -@released -*/ -const TInt KDmssActionNotTakenErr = (KDmssBaseError-4); - -/** -@publishedAll -@released -*/ -const TInt KDmssCmdUnrecognisedErr = (KDmssBaseError-5); - -/** -@publishedAll -@released -*/ -const TInt KDmssSyntaxErrorErr = (KDmssBaseError-6); - -/** -@publishedAll -@released -*/ -const TInt KDmssCmdNotImplementedErr = (KDmssBaseError-7); - -/** -@publishedAll -@released -*/ -const TInt KDmssBadSequenceErr = (KDmssBaseError-8); - -/** -@publishedAll -@released -*/ -const TInt KDmssParamNotImplementedErr = (KDmssBaseError-9); - -/** -@publishedAll -@released -*/ -const TInt KDmssMailboxNoAccessErr = (KDmssBaseError-10); - -/** -@publishedAll -@released -*/ -const TInt KDmssExceededStorageErr = (KDmssBaseError-11); - -/** -@publishedAll -@released -*/ -const TInt KDmssMailboxNameErr = (KDmssBaseError-12); - -/** -@publishedAll -@released -*/ -const TInt KDmssTransactionFailedErr = (KDmssBaseError-13); - -/** -@publishedAll -@released -*/ -const TInt KDmssTimeOutErr = (KDmssBaseError-14); - -/** -@publishedAll -@released -*/ -const TInt KDmssTopError = (-239); - -// SMTP client-specific error codes -/** -@publishedAll -@released -*/ -const TInt KSmtpBaseError = (-240); - -/** -@publishedAll -@released -*/ -const TInt KSmtpNoMailFromErr = KSmtpBaseError; - -/** -@publishedAll -@released -*/ -const TInt KSmtpUnknownErr = (KSmtpBaseError-1); - -/** -@publishedAll -@released -*/ -const TInt KSmtpBadMailFromAddress = (KSmtpBaseError-2); - -/** -@publishedAll -@released -*/ -const TInt KSmtpBadRcptToAddress = (KSmtpBaseError-3); - -/** -@publishedAll -@released -*/ -const TInt KSmtpLoginRefused = (KSmtpBaseError-4); - -/** -@publishedAll -@released -*/ -const TInt KSmtpNoMsgsToSendWithActiveSettings = (KSmtpBaseError-5); - -/** -@publishedAll -@released -*/ -const TInt KErrSmtpTLSNegotiateFailed = (KSmtpBaseError-6); - -/** -@publishedAll -@released -*/ -const TInt KErrSmtpBufferOverFlow = (KSmtpBaseError-7); - -/** -@publishedAll -@released -*/ -const TInt KSmtpTopError = (-249); - -// IMCM error codes -/** -@publishedAll -@released -*/ -const TInt KImcmBaseError = (-250); - -/** -@publishedAll -@released -*/ -const TInt KImcmHTMLPartNotPopulated = KImcmBaseError; - -/** -@publishedAll -@released -*/ -const TInt KImcmInvalidMessageStructure = (KImcmBaseError-1); - -// POPS error codes -/** -@publishedAll -@released -*/ -const TInt KPop3BaseError = (-260); - -/** -@publishedAll -@released -*/ -const TInt KErrPop3TLSNegotiateFailed = KPop3BaseError; - -/** -@internalComponent -@released -*/ -enum TImcmPanic - { - EOffOpNoBodyText = 0, - EOffOpBadMtmTypeUid = 1, - EOffOpNoCMsvEntrySet = 2, - EOffOpEntryShouldBeFolder = 3, - EOffOpTwoSameLinesNotAllowed = 4, - EOffOpNoMemory = 5, - EOffOpInvalidConstruction = 6, - EOffOpListOutOfSync = 7, - EOffOpNoMtmParameters = 8, - EMiutBadStreamVersion = 9, - EEntryIsNotMessage = 10, - EMiutArrayHasOddNumberOfElements = 11, // ie there should be even number of entries in array - EMiutLocalServiceIdSet = 12, // iServiceId should not be set to Local - EPopcMTMNoBodyText = 13, - EPopcMTMBadMtmTypeUid = 14, - EPopcMTMNoCMsvEntrySet = 15, - EPopcMTMOperationNULL = 16, - EPopcMTMNotAServiceEntry = 17, - EPopcUnknownNewEmailType = 18, - EPopcUnknownSyncFunction = 19, - ESmtcMTMNoBodyText = 20, - ESmtcMTMBadMtmTypeUid = 21, - ESmtcMTMNoCMsvEntrySet = 22, - ESmtcMTMOperationNULL = 23, - ESmtcMTMNotAServiceEntry = 24, - ESmtcUnknownNewEmailType = 25, - ESmtcUnknownSyncFunction = 26, - ESmtcMTMStoringBadEntryType = 27, - ESmtcMTMRestoringBadEntryType = 28, - ESmtcMTMNotAMessageEntry = 29, - EMiutActiveInFinalProgress = 30, - EImpcNoBodyText = 31, - EImpcBadMtmTypeUid = 32, - EImpcNoCMsvEntrySet = 33, - EImpcEntryShouldBeFolder = 34, - EImpcTwoSameLinesNotAllowed = 35, - EImpcNoMemory = 36, - EImpcInvalidConstruction = 37, - EImpcBadServiceEntry = 38, - EImpcNoBaseMtm = 39, - EImpcNoAddresseeList = 40, - EImpcInvalidProgress = 41, - EImpcNotSupported = 42, - EImpcMTMNotAMessageEntry = 43, - EImpcMTMNotAServiceEntry = 44, - EImcmMessageEntryHasMoreThanOneFolder = 45, - EImcmUnknownState = 46, - EImcmFinalProgressFailed = 47, - EImcmNoEikonEnvironment = 48, - EImcmSetVersionNotSupported = 49, - EImcmSystemDefaultCharsetNotSupported = 50, - EImcmHtmlConverterNotFound = 51, - EImcmUnknownMtm = 52, - EImEmailOpUnknownAttachmentType = 53, - EImcmNonIdleRetrievalState = 54, - EImcmIdleRetrievalState = 55, - EImcmSyncDownloadRulesInvalidPos1 = 56, - EImcmSyncDownloadRulesInvalidPos2 = 57, - EImcmSyncDownloadRulesInvalidPos3 = 58, - EImcmSyncDownloadRulesInvalidBearerTypes1 = 59, - EImcmSyncDownloadRulesInvalidBearerTypes2 = 60, - EImcmSyncDownloadRulesInvalidBearerTypes3 = 61, - EImcmTransportBufferSizesInvalidPos1 = 62, - EImcmTransportBufferSizesInvalidPos2 = 63, - EImcmTransportBufferSizesInvalidPos3 = 64, - EImcmTransportBufferSizesInvalidBearerTypes1 = 65, - EImcmTransportBufferSizesInvalidBearerTypes2 = 66, - EImcmTransportBufferSizesInvalidBearerTypes3 = 67, - EImcmTransportBufferSizesInvalidFetchRequestSize = 68, - EImcmTransportBufferSizesInvalidMaxOutstandingFetchResponses = 69, - EImcmMobilityAccountsListInvalidPos1 = 70, - EImcmMobilityAccountsListInvalidPos2 = 71, - EImcmMobilityAccountsListInvalidPos3 = 72, - EImcmMobilityAccountsListInvalidIAPListCount = 73 - }; - -/** -@internalComponent -*/ -GLREF_C void gPanic(TImcmPanic aPanic); - -#endif // __MIUT_ERR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miutatch.h --- a/epoc32/include/miutatch.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__MIUTATCH_H__) -#define __MIUTATCH_H__ - - -#if !defined (__S32FILE_H__) -#include -#endif - -const TInt KDataLineBufferLength = 4096; -_LIT(KImcvAttachFormatStr, "%S(%d)%S"); - -/** -@internalTechnology -@released -*/ -enum TImAttachmentFileState - { - EFileNotOpen, - EFileIsOpen, - EFileIsClosed, - EFileIsCorrupt, // UU data being decoded is corrupt - EFileIsIncomplete, // file write failed - EFileFailedToOpen, // can't open attach file - EFileTopIncomplete // File is incomplete due to top - }; - -class TImAttachmentFile // utility class to handle file operations with Email attachments -/** -@internalAll -@released -*/ - { -public: - enum TImFileOpenMode - { - /** - File opened for read mode - */ - EImFileRead = 0, - /** - File opened for write mode - */ - EImFileWrite, - }; -public: - IMPORT_C TImAttachmentFile(RFs& aFileSession); // constructor - IMPORT_C ~TImAttachmentFile(); // destructor - - IMPORT_C TInt MakeDir (const TDesC& aDirPath); - IMPORT_C TInt OpenFile (const TDesC& aDirPath ,const TDesC& aFileName ); - IMPORT_C TInt CreateFile (const TDesC& aDirPath ,const TDesC& aFileName ); - IMPORT_C TInt ReadFile (TDes8& rBuffer, TInt aNumBytes ); - IMPORT_C TInt WriteFile (const TDesC8& aBuffer); - IMPORT_C TInt WriteFile (const TDesC16& aBuffer); - IMPORT_C TInt CloseFile(); - IMPORT_C TInt DeleteAttachment(const TDesC& aDirPath,const TDesC& aFileName); - - IMPORT_C void SetFileHandle(RFile& aFile,TImFileOpenMode aFileMode); - - TInt AppendValidFile(const TDesC& aDirPath, const TDesC& aFileName, TFileName& rFullFilePath); -private: - void Reset(); - TInt WriteFile (); - TInt ReadFile (); - TInt FlushFile(); - TPtrC8 SelectFileData(TInt& abufLen, TInt& aDataLen); - -private: - RFs& iFileSession; - RFile iFile; - TFileText iFileText; - TFileName iFullFilePath; - TBuf8 iDataLine; - TBool iWritingToFile; - TInt iSpaceOnCache; - TInt iPositionInCache; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miutconv.h --- a/epoc32/include/miutconv.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,206 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MIUTCONV_H__ -#define __MIUTCONV_H__ - -#include - - -#if !defined (__CHARCONV_H_) -#include -#endif - -#if !defined (__MIUTHDR_H__) -#include -#endif - -#if !defined (__UTF_H_) -#include -#endif - -// IMail-specific stream type within an IMail file store for TImEmailTransformingInfo -// -const TUint KUidMsvCharsetNone = {0x10003C7F}; // 268450943 -const TUid KUidMsgFileTransformingInfo = {0x100094A5}; // 268473509 -const TUid KUidMsgEmailGeneralCenRep = {0x10285A25}; // 271079973 - -// No longer used as the charset information retrieved from resource file. -// Might possibly needed in the future ? maybe -// const TUid KUidMiutSystemDefaultCharset = {0x10009418}; // 268473368 -// const TUid KUidMiutOverrideCharset = {0x10009419}; // 268473369 - -_LIT8(KMiutUndisplayableChar, "?"); - -/** SMTP send methods. -@publishedAll -@released -*/ -enum TImSendMethod - { - /** Simple email. */ - ESendAsSimpleEmail, - /** MIME email. */ - ESendAsMimeEmail - }; - - -// Information to be used when sending an email message. -// Relating to how parts are encoded and converted. -// -class TImEmailTransformingInfo -/** Encapsulates character conversion and encoding settings for sending SMTP email. - -The default outcomes for header, body, HTML, and attachment parts respectively -for each of the listed categories are given below: - -Plain Charset: ISO-8859-1,ISO-8859-1,N/A,N/A - -Plain Encoding:None,None,N/A,UU - -MIME Charset:UTF8,UTF8,UTF8*,N/A - -MIME Encoding:B,QP,Base64,Base64 - -*: the UTF8 value set in the header field, but no conversion is done. The -HTML converter converts to UTF8. -@publishedAll -@released -*/ - { -public: - IMPORT_C TImEmailTransformingInfo& operator=(const TImEmailTransformingInfo& aInfo); - IMPORT_C TBool operator==(const TImEmailTransformingInfo& aInfo); - - // streaming operations - IMPORT_C void ExternalizeL( RWriteStream& aWriteStream ) const; - IMPORT_C void InternalizeL( RReadStream& aReadStream ); - IMPORT_C void StoreL( CMsvStore& aStore ) const; - IMPORT_C void RestoreL( CMsvStore& aStore ); - - // Setting functions - IMPORT_C void SetToDefault(const TImSendMethod aMethod); - IMPORT_C void SetSendMethod(const TImSendMethod aMethod); - IMPORT_C TImSendMethod SendMethod() const; - - IMPORT_C void SetHeaderEncodingQ(); - IMPORT_C void SetHeaderEncodingB(); - IMPORT_C void SetBodyTextEncoding(TImEncodingType aType); - IMPORT_C void SetHTMLEncoding(TImEncodingType aType); - IMPORT_C void SetAttachmentEncoding(TImEncodingType aType); - - IMPORT_C void SetHeaderAndBodyCharset(TUint aCharset); - IMPORT_C void SetHeaderCharset(TUint aCharset); - IMPORT_C void SetBodyTextCharset(TUint aCharset); - IMPORT_C void SetHTMLCharset(TUint aCharset); - - // Accessor functions - IMPORT_C TImEncodingType HeaderEncoding() const; - IMPORT_C TImEncodingType BodyTextEncoding() const; - IMPORT_C TImEncodingType HTMLEncoding() const; - IMPORT_C TImEncodingType AttachmentEncoding() const; - - IMPORT_C TUint HeaderCharset() const; - IMPORT_C TUint BodyTextCharset() const; - IMPORT_C TUint HTMLCharset() const; - -private: - void SetHeaderEncoding(TImEncodingType aType); - -private: - TImEncodingType iHeaderEncoding; - TImEncodingType iBodyEncoding; - TImEncodingType iHTMLEncoding; - TImEncodingType iAttachmentEncoding; - - TUint iHeaderCharset; - TUint iBodyCharset; - TUint iHTMLCharset; - TUint iTextAttachmentCharset; - - TImSendMethod iSendMethod; - }; - - -// Default Sending Charset/Encoding Values -const TImEncodingType KDefaultMIMEHeaderEncoding = EEncodingTypeBASE64; // MIME -const TImEncodingType KDefaultMIMEBodyTextEncoding = EEncodingTypeQP; -const TImEncodingType KDefaultMIMEHTMLEncoding = EEncodingTypeBASE64; -const TImEncodingType KDefaultMIMEAttachmentEncoding= EEncodingTypeBASE64; - -#define KDefaultPlainCharset KCharacterSetIdentifierIso88591 - -const TImEncodingType KDefaultPlainHeaderEncoding = EEncodingTypeNone; // Non-MIME or Plain -const TImEncodingType KDefaultPlainBodyTextEncoding = EEncodingTypeNone; -const TImEncodingType KDefaultPlainAttachmentEncoding = EEncodingTypeUU; - - - - -// Wrapper class for CHARCONV. -// 'Our' charset dependant on build, UNICODE or CodePage 1252. -// -class CImConvertCharconv : public CBase -/** -@internalTechnology -@released -*/ - { -public: - IMPORT_C static CImConvertCharconv* NewL(CCnvCharacterSetConverter& aConverter, RFs& anFs); - ~CImConvertCharconv(); - - // MUST call prepare function first. - IMPORT_C TInt ConvertToOurCharsetL( const TDesC8& aBufIn, TDes& rBufOut, - TInt& rNumUnconvertedChars, - TInt& rIndexOfFirstUnconvertedChar); - IMPORT_C TInt ConvertFromOurCharsetL(const TDesC& aBufIn, TDes8& rBufOut, - TInt& rNumUnconvertedChars, - TInt& rIndexOfFirstUnconvertedChar); - - // MUST be called prior to calling above two functions. - IMPORT_C TInt PrepareToConvertToFromOurCharsetL(const TUint aUid); - - IMPORT_C TUint GetMimeCharsetUidL(const TDesC8& aBufIn) const; - IMPORT_C HBufC8* GetMimeCharsetTextStringL(const TUint& aUid) const; - IMPORT_C TUint DefaultCharset() const; - IMPORT_C TUint SystemDefaultCharset() const; - - static TInt StraightCopy( const TDesC8& aBufIn, TDes& rBufOut); - static TInt StraightCopy( const TDesC& aBufIn, TDes8& rBufOut); -private: - void ConstructL(); - CImConvertCharconv(CCnvCharacterSetConverter& aConverter, RFs& anFs); - TBool CharsetAvailable(const TUint aUid); - void SetSystemDefaultCharsetL(); - - TInt GetSystemCharsetFromCenRepL(TDes8& aMimeCharSet); - - enum TEmailGeneralSettingsCenRepId - { - EEmailGeneralCharSetId = 0x00000000 - }; - -private: - CCnvCharacterSetConverter& iConverter; - CArrayFix* iCharsetsAvailable; - - RFs& iFs; - TUint iCharsetUid; - TUint iSystemDefaultCharset; // Value obtained from .ini file - TInt iCharconvState; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miutdef.h --- a/epoc32/include/miutdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// This header file defines the bit flags that may be used to instruct -// the CImMessageOperation class how to construct a new Email message -// -// - -#if !defined (__MIUTDEF_H__) -#define __MIUTDEF_H__ - -/** Type for email creation flags used in the @c aMsvEmailTypeList parameter of CImEmailOperation -functions. - -@see KMsvEmailTypeListMHTMLMessage -@see KMsvEmailTypeListInvisibleMessage -@see KMsvEmailTypeListMessageInPreparation -@publishedAll -@released -*/ -typedef TUint TMsvEmailTypeList; - -/** Flags that a new message should be of MHTML type. - -If this is not set, a plain-text message is created. - -@publishedAll -@released -@see TMsvEmailTypeList -*/ -const TMsvEmailTypeList KMsvEmailTypeListMHTMLMessage = 0x00000001; // if not set Email is a "normal" (i.e. non-MHTML) Email message -/** Flags that a new message should be invisible. -@publishedAll -@released -@see TMsvEmailTypeList -*/ -const TMsvEmailTypeList KMsvEmailTypeListInvisibleMessage = 0x00000002; // if set, message stays invisible on completion - -/** Flags that a new message should have the "in preparation" flag set. -@publishedAll -@released -@see TMsvEmailTypeList -*/ -const TMsvEmailTypeList KMsvEmailTypeListMessageInPreparation = 0x00000004; // if set, message stays marked "In preparation" on completion - -#endif //MIUTDEF.H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miuthdr.h --- a/epoc32/include/miuthdr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,849 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MIUTHDR_H__ -#define __MIUTHDR_H__ - -#include -#include -#include -#include -#include // KMsvNullIndexEntryId -#include // KUidMsvEmailTextEntryValue - -// IMail-specific stream type within an IMail file store for CImHeader -const TUid KUidMsgFileMimeHeader = {0x1000160F}; // 268441103 decimal -// IMail-specific stream type within an IMail file store for CImMimeHeader -const TUid KUidMsgFileIMailHeader = {0x100001D8}; // 268435928 decimal - -// Identifies which version of CImHeader has been stored in stream -const TUint16 KImHeaderVersion = 2; - -const TUid KUidMsvEmailTextEntry = {KUidMsvEmailTextEntryValue}; -const TUid KUidMsvEmailHtmlEntry = {KUidMsvEmailHtmlEntryValue}; -const TUid KUidMsvEmailExternalBodyEntry = {KUidMsvEmailExternalBodyEntryValue}; -const TUid KUidMsvEmailRtfEntry = {KUidMsvEmailRtfEntryValue}; - - -_LIT8(KMiutDateFormat, " %S, %2d %S %04d %02d:%02d:%02d "); -_LIT8(KMiutMonthNames, "JanFebMarAprMayJunJulAugSepOctNovDec"); -_LIT8(KMiutDayNames, "MonTueWedThuFriSatSun"); -_LIT8(KMiutTimeZoneNeg, "-%02d%02d"); -_LIT8(KMiutTimeZonePos, "+%02d%02d"); - -_LIT8(KMiutBase64String, "Base64"); -_LIT8(KMiutQPString, "quoted-printable"); -_LIT8(KMiut7BitString, "7bit"); -_LIT8(KMiut8BitString, "8bit"); -_LIT8(KMiutBinaryString, "binary"); -_LIT8(KMiutUUString, "uuencode"); - -_LIT8(KMiutWildcardBase64, "*base64*"); -_LIT8(KMiutWildcardQP, "*quoted-printable*"); -_LIT8(KMiutWildcard7Bit, "*7bit*"); -_LIT8(KMiutWildcard8Bit, "*8bit*"); -_LIT8(KMiutWildcardBinary, "*binary*"); -_LIT8(KMiutWildcardUU, "*uu*"); - -#define KMiutEmptyString KNullDesC - -_LIT(KMiutFormatString, "%S"); -_LIT(KImEngineResourceFile, "\\resource\\messaging\\imcm.rsc"); - -const TInt KMiutDateStringLength = 32; -const TInt KCenturyThreshold = 100; -const TInt KCenturyOffset = 70; -const TInt KThisCentury = 1900; // as defined in 1998 -const TInt KNextCentury = 2000; - -class CMsvStore; -class TMsvEntry; -class RMsvReadStream; -class RMsvWriteStream; -class CImConvertHeader; -class CImEncodedHeader; - -void CopyArrayL(const CDesCArray& aSource, CDesCArray& aDestination); - -// Maximum size for descriptors stored in HBufC members of CImHeader = 1000 chars -const TInt KMaxImHeaderStringLength = 1000; -const TInt KMaxImMimeFieldLength = 1000; -const TInt KImMailMaxBufferSize = 1000; // 1000 is defined by the SMTP spec as max space -const TInt KSmtpMaxBufferExcludingCRLF = 979; // Line length limit is 1000 chars per line including CRLF (RFC2822, Section 2.1.1) - // 1000 chars including "Field name: "+"Field body"+CRLF (here "Resent-Message-ID: " is largest field) - - -/** Defines how emails will be encoded when they are sent. - -MIME standards are defined in RFC 2045, RFC 2046 and RFC 2047. -@publishedAll -@released -*/ -enum TMsgOutboxBodyEncoding - { - /** Emails are sent with the default encoding, which is as for EMsgOutboxMIME. */ - EMsgOutboxDefault, - /** Emails are sent as plain text RFC822 messages. - - Attachments are encoded using UUEncoding algorithm. This method would not - normally be used unless the sender was sure that the receiving mail clients - don't support MIME. */ - EMsgOutboxNoAlgorithm, - /** Text is encoded using quoted-printable encoding, and all attachments are encoded - using BASE64 encoding. - - This is the default setting for this option. */ - EMsgOutboxMIME, - /** Text parts of the message are sent as MIME TEXT/HTML parts, and are encoded - using UTF-8 encoding system. - - All attachments are encoded using BASE64 encoding. Receiving mail clients - that do no support MHTML mail will display the HTML message text to the user - including all HTML tags, etc. */ - EMsgOutboxMHTMLAsMIME, - /** Each text part of the message is sent as two alternative MIME parts. - - The first part is sent as plain text using quoted-printable encoding, the - second part is sent as a TEXT/HTML part which is encoded using UTF-8 encoding - system. All attachments are encoded using BASE64 encoding. This is the standard - encoding method if the user wishes to send MHTML mail. */ - EMsgOutboxMHTMLAlternativeAsMIME - }; - -/** Messaging encoding types. -@publishedAll -@released -*/ -enum TImEncodingType - { - /** Unknown. */ - EEncodingTypeUnknown, - /** None. */ - EEncodingTypeNone, - /** 7-bit. */ - EEncodingType7Bit, - /** 8-bit. */ - EEncodingType8Bit, // ie lines still <1000 chars and terminated by CRLF - /** Binary. */ - EEncodingTypeBinary, // ie any length of data, not terminated by CRLF - /** QP. */ - EEncodingTypeQP, - /** Base64. */ - EEncodingTypeBASE64, - /** UU. */ - EEncodingTypeUU - }; - - -// Class used for storing extracting information (to/from header).. -// regarding the encoding in an incoming email message header. -//---------------------------------------------------------------------------------------- -class TImHeaderEncodingInfo -//---------------------------------------------------------------------------------------- -/** Stores encoding data found in message headers. -@publishedAll -@released -*/ - { -public: - /** Message field types. */ - enum TFieldList - { - EFrom, /**< "From" field. */ - EReplyTo, /**< "Reply To" field. */ - ETo, /**< "To" field. */ - ECc, /**< "Cc" field. */ - EBcc, /**< "Bcc" field. */ - ESubject /**< Subject field. */ - }; - /** Encoding types. */ - enum TEncodingType - { - EBase64, /**< Base64. */ - EQP, /**< QP. */ - ENoEncoding, /**< No encoding */ - EUU /**< UU. */ - }; - -public: - IMPORT_C TImHeaderEncodingInfo(); - IMPORT_C TImHeaderEncodingInfo(const TImHeaderEncodingInfo& aFrom); - - IMPORT_C void ExternalizeL( RWriteStream& aWriteStream ) const; - IMPORT_C void InternalizeL( RReadStream& aReadStream ); - - inline void SetField(const TFieldList aField); - inline TFieldList Field() const; - - inline void SetOffset(const TInt aOffset); - inline TInt Offset() const; - - inline void SetLength(const TInt aLength); - inline TInt Length() const; - - inline void SetCharsetUid(const TUint aUid); - inline TUint CharsetUid() const; - - inline void SetEncodingType(const TDesC8& aChar); - inline void SetEncodingType(const TEncodingType aType); - inline TEncodingType EncodingType() const; - - inline void SetArrayValue(const TInt aValue); - inline TInt ArrayValue() const; - - inline void SetAddSpace(const TBool atrueFalse); - inline TBool AddSpace() const; - - inline void SetEncodedLength(const TInt aLength); - inline TInt EncodedLength() const; - -private: - TFieldList iField; - TUint16 iOffset; - TUint16 iLength; - TEncodingType iType; - TUint16 iArrayValue; - TBool iAddSpace; // A space char needs adding between two adjoining 'encoded-words' - TUint8 iEncodedLength; // This can be used to determine space needed for buffer. - TUint iCharsetUid; - - }; - - -//------------------------------------------------------------------------------ - - -class CImHeader : public CBase -/** Encapsulates an Internet Mail (RFC822) header. - -Note that the class contains some obsolete functions that take a narrow descriptor: -always use the equivalent wide descriptor function instead. -@publishedAll -@released -*/ - { -public: -/** Flags used to determine where to obtain the ReplyTo address for the header -field of that name. */ - enum TReplyTo - { - /** Get address from originator. */ - EOriginator, - /** Get address from sender. */ - ESender, - /** Get address from all sources. */ - EAll, - /** Get address from recipients. */ - ERecipients - }; - - IMPORT_C static CImHeader* NewLC(); - IMPORT_C ~CImHeader(); - IMPORT_C void Reset(); - - // streaming operations - IMPORT_C void InternalizeL(RMsvReadStream& aReadStream); - IMPORT_C void ExternalizeL(RMsvWriteStream& aWriteStream) const; - IMPORT_C void RestoreL(CMsvStore& aMessageStore); - IMPORT_C void StoreL (CMsvStore& aMessageStore) const; - IMPORT_C void StoreWithoutCommitL(CMsvStore& aMessageStore) const; - - // the bulk of the member functions are accessors & mutators so we can use - // objects of the class as data repositories during the data-marshalling stage - // of getting imail headers to/from the internet - IMPORT_C const TPtrC Subject() const; - IMPORT_C void SetSubjectL(const TDesC8& aSubject); - - // Internet message ID - IMPORT_C const TPtrC8 ImMsgId() const; - /** Sets the "MessageId" header field. - - @param aImMsgIdL Field value */ - IMPORT_C void SetImMsgIdL(const TDesC8& aImMsgIdL); - - IMPORT_C const TPtrC From() const; - IMPORT_C void SetFromL(const TDesC8& aFrom); - - IMPORT_C const TPtrC ReplyTo() const; - IMPORT_C void SetReplyToL(const TDesC8& aReplyTo); - - IMPORT_C const TPtrC ReceiptAddress() const; - /** Sets the "Receipt" header field. - - @param aReceiptAddress Field value */ - IMPORT_C void SetReceiptAddressL(const TDesC8& aReceiptAddress); - - IMPORT_C TUint Charset() const; - IMPORT_C void SetCharset(const TUint aCharset); - -#if defined (_UNICODE) - IMPORT_C void SetFromL(const TDesC16& aFrom); - IMPORT_C void SetReplyToL(const TDesC16& aReplyTo); - /** Sets the "Receipt" header field. - - @param aReceiptAddress Field value */ - IMPORT_C void SetReceiptAddressL(const TDesC16& aReceiptAddress); - IMPORT_C void SetSubjectL(const TDesC16& aSubject); -#endif - - IMPORT_C TInt DataSize(); - - inline const TUint RemoteSize() const; - inline void SetRemoteSize(TUint aSize); - - inline const TUint16 Version() const; - inline void SetVersion(TUint16 aVersion); - - // give const access to the recipient lists - inline const CDesCArray& ToRecipients () const; - inline const CDesCArray& CcRecipients () const; - inline const CDesCArray& BccRecipients() const; - - // give non-const access to the recipient lists - inline CDesCArray& ToRecipients () ; - inline CDesCArray& CcRecipients () ; - inline CDesCArray& BccRecipients() ; - - inline CArrayFix& EncodingInfo() ; - inline const CArrayFix& EncodingInfo() const; - - IMPORT_C void AddEncodingInfoL(TImHeaderEncodingInfo& aInfo); - -//------------------------------------------------------------------------------------- -//----------------------Used for forwarding/replying to an email ---------------------- - - IMPORT_C const TPtrC8 ResentMsgId() const; - IMPORT_C void SetResentMsgIdL( const TDesC8& ); - - IMPORT_C const TPtrC ResentFrom() const; - IMPORT_C void SetResentFromL( const TDesC& ); - - // give const access to the recipient lists - inline const CDesCArray& ResentToRecipients () const; - inline const CDesCArray& ResentCcRecipients () const; - inline const CDesCArray& ResentBccRecipients() const; - - // give non-const access to the recipient lists - inline CDesCArray& ResentToRecipients (); - inline CDesCArray& ResentCcRecipients (); - inline CDesCArray& ResentBccRecipients(); - - IMPORT_C const TPtrC8 InReplyTo() const; - IMPORT_C void SetInReplyToL(const TDesC8&); - - IMPORT_C TInt CreateForwardL(CImHeader&, TDesC&); - IMPORT_C TInt CreateReplyL(CImHeader&, TReplyTo, TDesC&); - IMPORT_C void CreateReceiptL(CImHeader&, TDesC&); - -//------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------- - - // Body Encoding (charset) stored on a per message basis - IMPORT_C TMsgOutboxBodyEncoding BodyEncoding() const; - IMPORT_C void SetBodyEncoding(TMsgOutboxBodyEncoding aMessageBodyEncoding); - - IMPORT_C void ReDecodeL(RFs& aFS); - IMPORT_C TUint OverrideCharset() const; - IMPORT_C void SetOverrideCharset(TUint aCharset); - IMPORT_C void SaveEncodedHeadersL(); - -private: - CImHeader(); - void ConstructL(); - - // these four functions keep the line count down as there are several instances - // of streaming in/out HBufC objects. - void ReadRecipientsL ( RReadStream&, CDesCArray* ); - void WriteRecipientsL( RWriteStream&, const CDesCArray* ) const; - void FormatSubjectL(CImHeader&, TDesC&); - - //finds the duplicate recipients in To and Cc list - TBool IsRecipientPresent(CImHeader& aCImHeader, TPtrC16 newRecipient); - -private: - TUint16 iVersion; - - HBufC16* iFrom; - HBufC* iSubject; - HBufC8* iImMsgId; - HBufC16* iReplyTo; - HBufC16* iReceipt; - - CDesCArray* iTo; - CDesCArray* iCc; - CDesCArray* iBcc; - TUint iRemoteSize; - -//------------------------------------------------------------------------------------- -//----------------------Used for forwarding/replying to an email ---------------------- - - HBufC* iResentFrom; - HBufC8* iResentMsgId; - CDesCArray* iResentTo; - CDesCArray* iResentCc; - CDesCArray* iResentBcc; - HBufC8* iInReplyTo; - -//------------------------------------------------------------------------------------- -//------------------------------------------------------------------------------------- - CArrayFix* iEncodingInfo; - TMsgOutboxBodyEncoding iBodyEncoding; - // The character set to be when sending message. - // Overrides the charset passed in from the settings. - TUint i822HeaderCharset; - - CImEncodedHeader* iEncodedHeader; - }; - -class TImRfc822DateField -/** -@internalTechnology -@released -*/ - { -public: - IMPORT_C TInt ParseDateField(const TDesC8& aRfc822DateField, TTime& rTime); - IMPORT_C void SetDate(const TTime& aTimeDate, TDes8& rOutputLine); // NB assumes that "Date: " string has already been inserted into rOutputLine - -private: - TBool GetMonth( const TDesC8& name, TMonth& month ); - TBool GetTimezone( const TDesC8& name, TInt& minsOffset ); - }; - - -/** Folder type flags. - -The flags correspond to the MIME multipart subtype. -@publishedAll -@released -*/ -enum TImEmailFolderType - { - /** Unknown. */ - EFolderTypeUnknown, - /** Related. */ - EFolderTypeRelated, - /** Mixed. */ - EFolderTypeMixed, - /** Parallel. */ - EFolderTypeParallel, - /** Alternative. */ - EFolderTypeAlternative, - /** Digest. */ - EFolderTypeDigest, - /** RFC822. */ - EFolderTypeRFC822, - /** Partial. */ - EFolderTypePartial, - /** Directory. */ - EFolderTypeDirectory, - /** External. */ - EFolderTypeExternal - }; - -/** Describes the types of off-line email operations than can occur. - -@see TMsvEmailEntry::DisconnectedOperation() -@publishedAll -@released -*/ -enum TImDisconnectedOperationType - { - /** No operation. */ - ENoDisconnectedOperations, - /** Create operation. */ - EDisconnectedCreateOperation, - /** Delete operation. */ - EDisconnectedDeleteOperation, - /** Change operation. */ - EDisconnectedChangeOperation, - /** "Copy to" operation. */ - EDisconnectedCopyToOperation, - /** "Copy from" operation. */ - EDisconnectedCopyFromOperation, - /** "Copy within service" operation. */ - EDisconnectedCopyWithinServiceOperation, - /** "Move to" operation. */ - EDisconnectedMoveToOperation, - /** "Move from" operation. */ - EDisconnectedMoveFromOperation, - /** "Move within service" operation. */ - EDisconnectedMoveWithinServiceOperation, - /** Special operation. */ - EDisconnectedSpecialOperation, - /** Unknown operation. */ - EDisconnectedUnknownOperation, - /** Multiple operations. */ - EDisconnectedMultipleOperation - }; - -// Remote folder message count limited to TUint16 by using lower 16 bits of "iMtmData3". -// Note: The upper 16 bits of "iMtmData3" are not currently used by "TMsvEmailEntry". -const TUint KMsvRemoteFolderEntriesMask = 0x0000FFFF; - -class TMsvEmailEntry : public TMsvEntry -/** Provides storage for and access to extra email specific information for a message. - -To get a TMsvEmailEntry, get the entry's TMsvEntry, e.g. using -@c CMsvEntry::Entry(), and use the constructor that takes a TMsvEntry parameter. - -Many of the flags are only used by IMAP4 entries. These can be grouped as follows: - -- IMAP-specific flags, as defined by the IMAP protocol (see RFC3501, 2.3.2. Flags Message Attribute) - - GetIMAP4Flags() and SetIMAP4Flags() handle all the flags as a group - - \\Seen flag: SetSeenIMAP4Flag(), SeenIMAP4Flag(). - - \\Answered flag: SetAnsweredIMAP4Flag(), AnsweredIMAP4Flag() - - \\Flagged flag: SetFlaggedIMAP4Flag(), FlaggedIMAP4Flag() - - \\Deleted flag: SetDeletedIMAP4Flag(), DeletedIMAP4Flag() - - \\Draft flag: SetDraftIMAP4Flag(), DraftIMAP4Flag() - - \\Recent flag: SetRecentIMAP4Flag(), RecentIMAP4Flag() -- Folder subscriptions and other folder-related flags: - - SetMailbox(), Mailbox(), - - SetSubscribed(), Subscribed(), - - SetLocalSubscription(), LocalSubscription() - - SetRemoteFolderEntries(), RemoteFolderEntries() -- Disconnected operation information: - - SetDisconnectedOperation(), DisconnectedOperation(). -- Partial download flags: these flags allow a client to test if a message or its body has - been partially downloaded (see TImImap4GetPartialMailInfo) - - SetPartialDownloaded(), PartialDownloaded() - - SetBodyTextComplete(), BodyTextComplete() -- UID information: IMAP messages have a unique identifier number (see - RFC3501, 2.3.1.1. Unique Identifier (UID) Message Attribute) - - SetValidUID(), ValidUID() - - SetUID(), UID(). - -The following flags are set only by the IMAP MTM. They indicate if the -message contains a vCard, vCalendar (http://www.imc.org), or iCalendar (RFC 2445) attachment. - -- VCard(), SetVCard() -- VCalendar(), SetVCalendar() -- ICalendar(), SetICalendar() - -The following flags apply to all email protocols: - -- Receipt requested: Receipt(), SetReceipt() -- MHTML content: MHTMLEmail(), SetMHTMLEmail() - -Note that the email specific data is stored in the reserved data members @c iMtmData1, -@c iMtmData2 and @c iMtmData3 of the TMsvEntry base class. These public data members -must not be directly altered by clients. - -@publishedAll -@released -@see CImap4ClientMtm -*/ - { -public: // Public member functions - IMPORT_C TMsvEmailEntry(); // default constructor - IMPORT_C TMsvEmailEntry(const TMsvEntry& aGenericEntry); - - IMPORT_C TBool operator==(const TMsvEntry& aEntry) const; - IMPORT_C TBool operator==(const TMsvEmailEntry& aEntry) const; - - IMPORT_C void GetIMAP4Flags(TBool& rUnread,TBool& rSeen,TBool& rAnswered,TBool& rFlagged,TBool& rDeleted,TBool& rDraft,TBool& rRecent); - IMPORT_C void SetIMAP4Flags(TBool aUnread,TBool aSeen,TBool aAnswered,TBool aFlagged,TBool aDeleted,TBool aDraft,TBool aRecent); - - IMPORT_C void SetMessageFolderType(TImEmailFolderType aFolderType); - IMPORT_C TImEmailFolderType MessageFolderType() const; - - IMPORT_C void SetDisconnectedOperation(TImDisconnectedOperationType aDisconnectedOperationType); - IMPORT_C TImDisconnectedOperationType DisconnectedOperation() const; - - IMPORT_C void SetPartialDownloaded(TBool aPartialDownloaded); - IMPORT_C TBool PartialDownloaded() const; - - // - inline void SetEncrypted(TBool aEncrypt); - inline TBool Encrypted() const; - // - inline void SetSigned(TBool aSignature); - inline TBool Signed() const; - // - inline TBool VCard() const; - inline void SetVCard(TBool aVCard); - // - inline TBool VCalendar() const; - inline void SetVCalendar(TBool aVCal); - // - inline TBool ICalendar() const; - inline void SetICalendar(TBool aICal); - // - inline TBool Receipt() const; - inline void SetReceipt(TBool aReceipt); - - inline TBool MHTMLEmail() const; - inline void SetMHTMLEmail(TBool aMhtml); - - inline TBool BodyTextComplete() const; - inline void SetBodyTextComplete(TBool aFlag); - - // - // IMAP4-specific flags - // - inline void SetUnreadIMAP4Flag(TBool aUnread); - inline TBool UnreadIMAP4Flag() const; - // - inline void SetSeenIMAP4Flag(TBool aSeen); - inline TBool SeenIMAP4Flag() const; - // - inline void SetAnsweredIMAP4Flag(TBool aAnswered); - inline TBool AnsweredIMAP4Flag() const; - // - inline void SetFlaggedIMAP4Flag(TBool aFlagged); - inline TBool FlaggedIMAP4Flag() const; - // - inline void SetDeletedIMAP4Flag(TBool aDeleted); - inline TBool DeletedIMAP4Flag() const; - // - inline void SetDraftIMAP4Flag(TBool aDraft); - inline TBool DraftIMAP4Flag() const; - // - inline void SetRecentIMAP4Flag(TBool aRecent); - inline TBool RecentIMAP4Flag() const; - // - inline void SetMailbox(TBool aMailbox); - inline TBool Mailbox() const; - // - inline TBool Orphan() const; - - inline void SetOrphan(TBool aOrphan); - // - inline void SetValidUID(TBool aValid); - inline TBool ValidUID() const; - // - inline void SetSubscribed(TBool aSubscribed); - inline TBool Subscribed() const; - // - inline void SetLocalSubscription(TBool aLocal); // i.e. is subscription local, or remote - inline TBool LocalSubscription() const; - // - inline void SetUID(TUint32 aUid); - inline TUint32 UID() const; - // - inline TInt RemoteFolderEntries() const; - inline void SetRemoteFolderEntries(TInt aEntries); - -private: - enum TMsvEmailEntryFlags - { - KMsvEmailEntryClearFlag =0x00, - // Flags set on Message entries... - KMsvEmailEntryEncryptedFlag =0x00000001, - KMsvEmailEntrySignedFlag =0x00000002, - KMsvEmailEntryReceiptFlag =0x00000004, - KMsvEmailEntryOrphanFlag =0x00000008, - - // VCard and VCalendar entries may be set on folders or attachments - KMsvEmailEntryVCardFlag =0x00000010, - KMsvEmailEntryVCalendarFlag =0x00000020, - - // Message contains HTML data - // (Note: HTML and not only MHTML) - KMsvEmailEntryMHTMLFlag = 0x00000040, - KMsvEmailEntryBodyTextCompleteFlag = 0x00000080, - - KMsvEmailEntryNoDisconnectedOperations = 0x00000000, - KMsvEmailEntryDisconnectedCreateOperation = 0x00000100, - KMsvEmailEntryDisconnectedDeleteOperation = 0x00000200, - KMsvEmailEntryDisconnectedChangeOperation = 0x00000300, - KMsvEmailEntryDisconnectedCopyToOperation = 0x00000400, - KMsvEmailEntryDisconnectedCopyFromOperation = 0x00000500, - KMsvEmailEntryDisconnectedCopyWithinServiceOperation = 0x00000600, - KMsvEmailEntryDisconnectedMoveToOperation = 0x00000700, - KMsvEmailEntryDisconnectedMoveFromOperation = 0x00000800, - KMsvEmailEntryDisconnectedMoveWithinServiceOperation = 0x00000900, - KMsvEmailEntryDisconnectedSpecialOperation = 0x00000A00, - KMsvEmailEntryDisconnectedUnknownOperation = 0x00000B00, - KMsvEmailEntryDisconnectedMultipleOperation = 0x00000C00, - KMsvEmailEntryDisconnectedOperation = 0x00000F00, - - // IMAP4-specific masks. Can be re-used by non-IMAP4 entries (eg POP3, SMTP) - KMsvEmailEntryIMAP4SubscribedFlag =0x00001000, - KMsvEmailEntryIMAP4UnreadFlag =0x00002000, - KMsvEmailEntryIMAP4SeenFlag =0x00004000, - KMsvEmailEntryIMAP4AnsweredFlag =0x00008000, - KMsvEmailEntryIMAP4FlaggedFlag =0x00010000, - KMsvEmailEntryIMAP4DeletedFlag =0x00020000, - KMsvEmailEntryIMAP4DraftFlag =0x00040000, - KMsvEmailEntryIMAP4RecentFlag =0x00080000, - KMsvEmailEntryIMAP4ValidUIDFlag =0x00100000, - KMsvEmailEntryIMAP4MailboxFlag =0x00200000, - KMsvEmailEntryIMAP4LocalSubFlag =0x00400000, - - // MIME "multipart" types assigned to folders. - KMsvMimeFolderUnknownMask =0x00000000, - KMsvMimeFolderRelatedMask =0x01000000, - KMsvMimeFolderMixedMask =0x02000000, - KMsvMimeFolderAlternativeMask =0x03000000, - KMsvMimeFolderParallelMask =0x04000000, - KMsvMimeFolderDigestMask =0x05000000, - - // MIME message types - KMsvMimeFolderRFC822Mask =0x06000000, - KMsvMimeFolderPartialMask =0x07000000, - KMsvMimeFolderDirectoryMask =0x08000000, // for VCard, VCalendar types - KMsvMimeFolderExternalMask =0x09000000, - KMsvMimeFolderMask =0x0F000000, - - // Can be used by POP3 and IMAP4 MTMs. - KMsvEmailEntryPartialDownloadFlag =0x10000000, - - KMsvEmailEntryICalendarFlag =0x20000000 - }; - - }; - -const TUint16 KImMimeHeaderVersion = 2; // identify which version of this class has been stored - -class CImMimeHeader : public CBase -/** Stores a MIME email header. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CImMimeHeader* NewLC(); - IMPORT_C static CImMimeHeader* NewL(); - IMPORT_C ~CImMimeHeader(); - IMPORT_C void Reset(); - IMPORT_C TInt Size(); // number of header fields stored in object - - // streaming operations - IMPORT_C void InternalizeL( RMsvReadStream& aReadStream ); - IMPORT_C void ExternalizeL( RMsvWriteStream& aWriteStream ) const; - IMPORT_C void RestoreL( CMsvStore& aMessageStore ); - IMPORT_C void StoreL ( CMsvStore& aMessageStore ) const; - IMPORT_C void StoreWithoutCommitL(CMsvStore& aMessageStore) const; - - /** Sets the Content-Type field value (e.g. "text" in Content-Type:text/plain). - - The value is MIME defined and should always be 8-bit. - - @param aPath Field value */ - IMPORT_C void SetContentTypeL(const TDesC8& aPath); - IMPORT_C const TPtrC8 ContentType() const; - - /** Sets the Content-Type subtype field value (e.g. "plain" in Content-Type:text/plain). - - - The value is MIME defined and should always be 8-bit. - - @param aPath Field value */ - IMPORT_C void SetContentSubTypeL(const TDesC8& aPath); - IMPORT_C const TPtrC8 ContentSubType() const; - - /** Sets the Content-Disposition field value (either inline or attachment). - - The value is MIME defined and should always be 8-bit. - - @param aPath Field value */ - IMPORT_C void SetContentDispositionL(const TDesC8& aPath); - IMPORT_C const TPtrC8 ContentDisposition() const; - - /** Sets the Content-Description field value. - - The value is MIME defined and should always be 8-bit. - - @param aPath Field value */ - IMPORT_C void SetContentDescriptionL(const TDesC8& aPath); - IMPORT_C const TPtrC8 ContentDescription() const; - - /** Sets the Content-Base field value. - - @param aPath Field value */ - IMPORT_C void SetContentBaseL(const TDesC8& aPath); - IMPORT_C const TPtrC8 ContentBase() const; - - /** Sets the Content-ID field value. - - @param aPath Field value */ - IMPORT_C void SetContentIDL(const TDesC8& aPath); - IMPORT_C const TPtrC8 ContentID() const; - - /** Sets the Content-Location field value. - - @param aPath Field value */ - IMPORT_C void SetContentLocationL(const TDesC16& aPath); - IMPORT_C const TPtrC16 ContentLocation() const; - - // IMAP-specific info describing relative location of entry w.r.t. parent Email message - /** Sets IMAP-specific information for the relative location of the entry to the - parent email message. - - @param aPath Relative location */ - IMPORT_C void SetRelativePathL(const TDesC8& aPath); - IMPORT_C const TPtrC8 RelativePath() const; - - /** Sets the Content-Transfer-Encoding field value. - - @param aType Field value */ - IMPORT_C void SetContentTransferEncodingL(const TDesC8& aType); - IMPORT_C TImEncodingType ContentTransferEncoding() const; - IMPORT_C TImEncodingType ContentTransferEncoding(TDes8& rType) const; - IMPORT_C const TPtrC8 GetContentTypeValue(const TDesC8& aContentTypeParameter) const; - - // inlines to access arrays - inline const CDesC8Array& ContentTypeParams() const; - inline const CDesC8Array& ContentDispositionParams() const; - inline const CDesC8Array& XTypeParams() const; - - inline CDesC8Array& ContentTypeParams(); - inline CDesC8Array& ContentDispositionParams(); - inline CDesC8Array& XTypeParams(); // anything else that is in the header, but not recognised - - inline const TUint16 Version() const; - inline void SetVersion( TUint16 aVersion ); - - IMPORT_C void SetMimeCharset(const TUint aCharset); - IMPORT_C TUint MimeCharset() const; - -private: - CImMimeHeader(); - void ConstructL(); - TBool ArrayEntryExists(CDesCArray& aArray, TInt aField); - -private: - TUint16 iVersion; - HBufC8* iRelativePath; - HBufC8* iContentDescription; - - TImEncodingType iContentTransferEncoding; - - // MHTML parameters - HBufC8* iContentBase; - HBufC16* iContentLocation; - HBufC8* iContentID; - // - HBufC8* iContentType; - HBufC8* iContentSubType; - HBufC8* iContentDisposition; - // - CDesC8Array* iContentTypeParams; // zero or more "parameter" - CDesC8Array* iContentDispositionParams; // zero or more "parameters" - CDesC8Array* iXTypeParams; // zero or more X-Type "parameters" - // - TBuf<20> iContentTransferEncodingBuffer; // must be big enough to store "quoted-printable" string - - // The uid value is always used in preference to the stored string. - // Only when the uid is not set is the string used when sending. - TUint iMimeCharset; - }; - - - -#include - -#endif // #defined __MIUTHDR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miutmsg.h --- a/epoc32/include/miutmsg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,950 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MIUTMSG_H__ -#define __MIUTMSG_H__ - -#include -#include // TMsvEntry, CMsvOperation etc -#include // CMsgActive -#include // CImHeader, CImMimeHeader -#include // CRichText etc -#include // CImHeader, CImMimeHeader -#include -#include -#include -#include // TImMessageField - -#include // RResourceFile -#include -#include - -#include - - - -//#include -#include - -//Content-Transfer-Encoding: types -_LIT8(KMimeQuotedPrintable, " quoted-printable"); -_LIT8(KMimeApplOctet, " application/octet-stream"); -_LIT8(KMime7Bit, " 7-bit"); -_LIT8(KMimeBase64, " base64"); -_LIT8(KMimeMime, "MIME*"); -// Content-Disposition: types -_LIT8(KMimeInline, "inline"); -_LIT8(KMimeAttachment, "attachment"); -// Content-Type: types -_LIT8(KMimeMultipart, "multipart"); -_LIT8(KMimeText, "text"); -_LIT8(KMimeImage, "image"); -_LIT8(KMimeAudio, "audio"); -_LIT8(KMimeVideo, "video"); -_LIT8(KMimeApplication, "application"); -_LIT8(KMimeMessage, "message"); -// Content-Type: Multipart types -_LIT8(KMimeMixed, "mixed"); -_LIT8(KMimeRelated, "related"); -_LIT8(KMimeAlternative, "alternative"); -_LIT8(KMimeEncrypted, "encrypted"); -_LIT8(KMimeParallel, "parallel"); -_LIT8(KMimeDigest, "digest"); -_LIT8(KMimeSigned, "signed"); -// Content-Type: Text types -_LIT8(KMimeHtml, "html"); -_LIT8(KMimePlain, "plain"); -_LIT8(KMimeDirectory, "directory"); -// Content-Type: Message types -_LIT8(KMimePartial, "partial"); -_LIT8(KMimeExternal, "external-body"); -_LIT8(KMimeRfc822, "rfc822"); -// Content-Type: Directory types -_LIT8(KMimeProfile, "profile"); -_LIT(KMimeVCardExtension, ".vcf"); -_LIT8(KMimeVCalender, "vcalendar"); -// Content-Type: Image, Audio, Video, Application types -_LIT8(KMimeBmp, "bmp"); -_LIT8(KMimeGif, "gif"); -_LIT8(KMimeJpeg, "jpeg"); -_LIT8(KMimeTiff, "tiff"); -_LIT8(KMimeWav, "wav"); -_LIT8(KMimeZip, "x-gzip"); -_LIT(KMimeHtmlExtension, ".html"); -_LIT(KMiutMsgDefaultHtmlFileName, "attachment.html"); -const TUid KUidMimeHeaders = {0x10204281}; - -class CImHtmlConverter; - -class CImAttachmentManager; -class CMsvMimeHeaders; -class CMsvPlainBodyText; -class CImPlainBodyText; - -class TImCreateMessageOptions -/** -@internalComponent -@released -*/ - { -public: - TMsvPartList iMsvPartList; - TMsvEmailTypeList iMsvEmailTypeList; - TUid iMessageType; - }; - -// Mixin provides interface to Browser control to resolve MHTML URIs. - -class MImURITranslator -/** Translates a URI in an MHTML message into a message body part file name. - -MHTML messages may contain multiple HTML body parts. Each of these body parts -is able to reference another body part within the same multipart structure, -or a body part within a parent multipart structure [RFC2110]. These references -are called URI's. - -When an MHTML message is parsed by the message engine, the HTML body of each -part is stored as a binary file. This interface provides a means of finding -the file name of the body part that corresponds to a given a URI. - -The URI resolving process has the potential to become time consuming, therefore -it is broken into two steps: - -Resolve asynchronously the relative URI into an absolute URI. The message -body parts are recursively searched in order to find an absolute base for -the relative URI [RFC2110, RFC1808]. - -Once a relative URI has been resolved in to an absolute URI, then the message -is searched for a body part that corresponds to it [RFC2110]. - -If no matching body part can be found, then the absolute URI is returned to -the caller in place of the filename. This absolute URI should be used to search -for the required data externally, for example by using HTTP. - -@see CImEmailMessage -@publishedAll -@released -*/ - { -public: - /** Starts an asynchronous operation to resolve a specified URI. - - @param aMessageId The ID of the body part containing the URI which is to be - resolved. CImEmailMessage::FindFirstHTMLPageL() can be used to find the aMessageId - parameter for the first HTML page in a message. - @param rBase The base parameter from the HTML part that contains the URI to - be resolved. If there is no base parameter in the HTML, then an empty descriptor - should be passed in. - @param rURI The URI to be resolved. - @param aStatus Asynchronous status word */ - virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC& rBase, const TDesC& rURI, TRequestStatus &aStatus) = 0; - - /** Gets the results after a search. - - @param aLinkedEntryId On return, the message ID of the linked body part, providing - one is found. Note that you should keep a record of the returned message ID - as it is required for resolving any URI's that may be found in the linked - body part. - @param aFileFound On return, true if a linked body part has been found. It - is set to false otherwise. - @return If successful, the filename that corresponds to the URI, or the absolute - URI if no matching file can be found. If failed, NULL. */ - virtual HBufC* GetUniversalResourceIdentifierL(TMsvId& aLinkedEntryId, TBool& aFileFound) const = 0; - - /** Starts an asynchronous operation to resolve a specified URI. - - @param aMessageId The ID of the body part containing the URI which is to be - resolved. CImEmailMessage::FindFirstHTMLPageFileHandleL() can be used to find the aMessageId - parameter for the first HTML page in a message. - @param aBase The base parameter from the HTML part that contains the URI to - be resolved. If there is no base parameter in the HTML, then an empty descriptor - should be passed in. - @param aURI The URI to be resolved. - @param aStatus Asynchronous status word */ - virtual void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus) = 0; - - /** Gets the results after a search. - - @param aLinkedEntryId On return, the message ID of the linked body part, providing - one is found. Note that you should keep a record of the returned message ID - as it is required for resolving any URI's that may be found in the linked - body part. - - @param aFile On return, the file handle corresponding to the URI if successful. - If not successful, then this is not valid. - - @return KErrNone if successful and therefore aFile contains the filehandle - that corresponds to the URI. An error code if unsuccessful and therefore - aFile is not valid. */ - virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId& aLinkedEntryId, RFile& aFile) const = 0; - }; - - - - -class CImMhtmlUriResolver; -class CImRemoveMessagePart; -class CImStoreMessagePart; -class CImMimeHeader; - -class CImEmailMessage : public CMsgActive , public MImURITranslator -/** -This class can be used to manipulate new emails that -have been created using CImEmailOperation when composing a message. - -Use an instance of this class to add attachments, MHTML parts, body -text, and existing messages to a new message before it is to be sent. - -This class can also be used to retrieve the body text, list of attachments, -and embedded messages from emails that have been downloaded and stored within -the message store. - -If the store_8bit_body_text flag in imcm.rss is enabled, an instance of this class -can be used to retrieve the original body text character set for a particular message. -It can also be used to override the original body text character set so it will -be decoded in a new character set next time it is viewed. - -@see CImEmailOperation - -@publishedAll -@released -*/ - { -public: - /** Flags that specify to process on any messages embedded in this message. */ - enum TImEmailEntryType - { - /** Do not process embedded messages. */ - EThisMessageOnly, - /** Process embedded messages. */ - EThisMessageAndEmbeddedMessages // i.e messages with in a message - }; - /** Flags to specify types of attachment. */ - enum TImAttachmentType - { - /** All attachments. */ - EAllAttachments=0, // all attachment files contained within this message (but not inside messages within this message) - /** VCards. */ - EVCards, - /** VCalendars. */ - EVCalendars, - /** VCards, VCalendars and ICalendars. */ - EVEntries, // ie VCards, VCalendars or ICalendars (or all three) - /** Encrypted. */ - EEncrypted, - /** Signed. */ - ESigned, - /** Secure. */ - ESecure, // ie Encrypted or signed (or both) - /** ICalendars. */ - EICalendars - //.. add new items here - }; -public: - IMPORT_C static CImEmailMessage* NewL(CMsvEntry& aEntry); - IMPORT_C static CImEmailMessage* NewLC(CMsvEntry& aEntry); - IMPORT_C ~CImEmailMessage(); - - IMPORT_C void GetAttachmentsListL(TRequestStatus& aStatus, TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType); - IMPORT_C void GetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType); - void DoGetAttachmentsListL(TMsvId aMessageId, TImAttachmentType aAttachmentType,TImEmailEntryType aEntryType); - - IMPORT_C void FindFirstHTMLPageL(TMsvId aMessageId, TRequestStatus& aStatus); - - IMPORT_C const CMsvEntrySelection& Selection() const; // return selection - IMPORT_C const TDesC8& ProgressL() const; - - IMPORT_C void GetBodyTextL(TRequestStatus& aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer,CCharFormatLayer& aCharLayer); - IMPORT_C void GetBodyTextL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer,CCharFormatLayer& aCharLayer); - void DoGetBodyTextInitL(TMsvId aMessageId, TImEmailEntryType aEntryType, CRichText& aRichText,CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); - - IMPORT_C void GetBodyTextEntryIdL(TRequestStatus& aStatus, TMsvId aMessageId, TImEmailEntryType aEntryType); - IMPORT_C void GetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType); - - IMPORT_C CImPlainBodyText* OpenPlainBodyTextForWriteL(); - - IMPORT_C CImPlainBodyText* OpenPlainBodyTextForReadL(TImEmailEntryType aEntryType, TInt aChunkLength); - - IMPORT_C virtual void FindUniversalResourceIdentifierL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus); - IMPORT_C virtual HBufC* GetUniversalResourceIdentifierL(TMsvId& aLinkedEntryId, TBool& aFileFound) const; - IMPORT_C void FindUniversalResourceIdentifierFileHandleL(TMsvId aMessageId, const TDesC& aBase, const TDesC& aURI, TRequestStatus &aStatus); - IMPORT_C void FindFirstHTMLPageFileHandleL(TMsvId aMessageId, TRequestStatus& aStatus); - IMPORT_C virtual TInt GetUniversalResourceIdentifierFileHandle(TMsvId& aLinkedEntryId, RFile& aFile) const; - IMPORT_C MMsvAttachmentManager& AttachmentManager() const; - void AddAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); - void AddAttachmentL(RFile& aFileHandle, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); - void AddLinkedAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); - void AddEntryAsAttachmentL(TMsvId aAttachmentEntryId, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); - const RPointerArray& AttachmentInfoSelection() const; - void RemoveAttachmentL(TMsvAttachmentId aAttachmentId,TRequestStatus& aStatus) ; - void RemoveAttachedMessageL(TMsvAttachmentId aAttachmentId,TRequestStatus& aStatus) ; - void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); - void CheckEntryAndResetStoreMessageL(TMsvId aMessageId); - void CheckEntryAndResetRemoveMessageL(TMsvId aMessageId); - void DoSetActive(TRequestStatus& aStatus); - CImMimeHeader* ConvertToImMimeHeadersL(CMsvMimeHeaders* aMimeHeaders); - CMsvMimeHeaders* ConvertToMsvMimeHeadersL(CImMimeHeader* aMimeHeader); - void AppendEntryAttachmentInfoL(); - IMPORT_C void AddRelatedPartL(TMsvId aMessageId, const TDesC& aAttachmentFullName, TRequestStatus& aStatus, TMsvId aRelatedPartId, const TDesC8& aContentId); - IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText& aRichText, TRequestStatus& aStatus); - IMPORT_C void StoreBodyTextL(TMsvId aMessageId, CRichText& aRichText, TRequestStatus& aStatus, TBool aUsePlainTextStorage); - IMPORT_C void GetMessageDigestEntriesL(TRequestStatus& aStatus, TMsvId aMessageId); - IMPORT_C void GetCharacterSetL(TMsvId aMessageId, TUint& aCharacterSetId, TBool& aOverride); - IMPORT_C void SetCharacterSetL(TMsvId aMessageId, TUint aCharacterSetId); - IMPORT_C void StoreBodyTextWithMimeHeaderL(TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TRequestStatus& aStatus); - - TMsvId EmailEntryId(); - -private: - void DoRunL(); - void DoCancel(); - CImEmailMessage(CMsvEntry& aEntry); - void ConstructL(); - void DoComplete(TInt&); - void DoStateL(); - - void Start(TRequestStatus& aStatus); - void StartL(); - - void Reset(); - void ChangeMessageContextL(); - void CompareChildrenAndPopulateSelL(); - void AttachmentInfoL(); - void AssembleBodyTextL(); - void CheckAndInitialiseL(TMsvId aMessageId); - - void AppendAttachmentL(); - TBool MessageDigestEntry(); - TBool HandleDifferentFolderTypesL(); - void GetTextForAlternateFolderL(); - void GetTextForRelatedFolderL(); - void GetAttachmentsForRelatedFolderL(); - TBool GetBodyTextCharacterSetL(); - TUint GetOverrideCharacterSetL(); - TInt FindFilename(const CImMimeHeader& aMimeInfo, TPtrC8& aFilename); - void FindFilenameDecodeL( - const CImMimeHeader& aMimeInfo, TFileName& aFileName, TUint aCharset); - void AppendAttachmentNameL(); - void SetBodyTextCharacterSetL(TMsvId aEntryId, TUint8 aNewCharacterSetId); - void FindFirstBodyTextPartL(TMsvId aEntryId, TBool& found); - - CImMimeHeader* FindAttachmentMimeHeaderL(); - TMsvEntry FindIdEntryL(TMsvId aMessageId); - - void DoGetBodyTextEntryIdL(TMsvId aMessageId, TImEmailEntryType aEntryType); - - - enum TImEmailMessageStates - { - EIdle=0, - ETextForThisMsg, - ETextForMsgDigest, - ETextEntryIdForThisMsg, - ETextEntryIdMsgDigest, - ETextForThisMsgGetCharacterSet, - EAttachmentsForThisMsg, - EAttachmentsForMsgDigest, - EMsgDigestEntries, - EResolveURI, - EStoreMessagePart, - ERemoveMessagePart, - EFinished - }; - CMsvEntry& iClientEntry; - CMsvEntrySelection* iCompleteSel; - CMsvEntrySelection* iResultSel; - - CRichText* iRichText; - CParaFormatLayer* iParaLayer; - CCharFormatLayer* iCharLayer; - TMsvId iParentMsgId; // the Id passed into Getxxx() function representing the 'parent' message ID - TImEmailMessageStates iState; - TImAttachmentType iAttachmentType; - TMsvEmailEntry iEntry; - CImMhtmlUriResolver* iUriResolver; - TBool iUriFileFound; - CImStoreMessagePart* iStoreMessagePart; - CImRemoveMessagePart* iRemoveMessagePart; - TPckgBuf iProgress; - TImEmailEntryType iEntryType; - TBool iIsAMHTMLmessage; - TUint iCharacterSetId; - RFs iFs; - CDesCArray* iAttachmentNameList; - CImAttachmentManager* iAttachmentManager; - CMsvStore* iStore; - - // This is the entry Id using which the CImEmailMessage was created. - // store this , so that when the message id to which attachment is - // retrieved then the CIMEmailMessage is reset with this Id. - TMsvId iEmailEntryId; - enum TImAttachmentStates - { - ENoAttachment=0, - EAddAttachment, - EDeleteAttachment, - ECreateAttachment - }; - TInt iAttachmentState; - - }; - -class CImRemoveMessagePart : public CMsvOperation -/** -@internalComponent -@released -*/ - { -public: - static CImRemoveMessagePart* DeleteAttachmentL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachmentId); - static CImRemoveMessagePart* DeleteAttachedMessageL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TMsvId aAttachedMessageId); - ~CImRemoveMessagePart(); - const TDesC8& FinalProgress(); - void DoCancel(); - void RunL(); - const TDesC8& ProgressL(); // returns NULL until operation completed - then returns MessageId - TMsvId RemovedAttachmentId(); -private: - CImRemoveMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId); - void ConstructL(TMsvId aAttachmentId); - void ErrorRecovery(TInt aError); - void SelectNextStateL(); // selects next state to go to - void ChangeStateL(); // initiates the next state operation - void SelectAndChangeToNextStateL(); - void RequestComplete(TInt aError); - void Recover(); // leave message in a 'good' state - - void CheckAttachmentParentTypeL(); - void MoveOtherEntryToParentOfFolderL(); - void DeleteAttachmentEntryL(); - void DeleteFolderEntryL(); - void CompleteRemoveMessagePartL(); -private: - enum TImRemoveMessagePartState - { - ECheckAttachmentParentType, - EMoveOtherEntryToParentOfFolder, - EDeleteAttachmentEntry, - EDeleteFolderEntry, - ECompleteRemoveMessagePart, - EFinished - }; - CMsvEntry& iMsvEntry; - CMsvOperation* iMsvOperation; - - CMsvEntrySelection* iMessageEntrySelection; - CImEmailMessage* iEmailMessage; - - TInt iState; - TPckgBuf iDataMember; - TMsvId iMessageId; - TMsvId iFolderToDeleteId; - TInt iAttachmentSize; - TMsvId iAttachmentId; - TMsvId iEntryToMoveId; - }; - -class CImStoreMessagePart : public CMsvOperation -/** -@internalComponent -@released -*/ - { -public: - static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId, const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus ); - static CImStoreMessagePart* AddEntryAsAttachmentL(TMsvId aMessageId,TMsvId aAttachmentMessageId, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus); - static CImStoreMessagePart* AddAttachmentL(TMsvId aMessageId,RFile& aFile, CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); - static CImStoreMessagePart* AddLinkedAttachmentL(TMsvId aMessageId,const TDesC& aFilePath, CMsvEntry& aMsvEntry,CMsvAttachment* aAttachmentInfo,TRequestStatus& aStatus ); - static CImStoreMessagePart* CreateAttachmentL(TMsvId aMessageId,const TDesC& aFileName, RFile& aAttachmentFile,CMsvEntry& aMsvEntry, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus); - static CImStoreMessagePart* AddRelatedPartL(TRequestStatus &aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId); - static CImStoreMessagePart* StoreBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, TBool aUsePlainTextStorage = EFalse); - static CImStoreMessagePart* StoreBodyTextWithMimeHeaderL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CRichText& aRichText, const CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = EFalse); - static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = ETrue); - static CImStoreMessagePart* StorePlainBodyTextL(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, CImMimeHeader& aMimeHeader, TBool aUsePlainTextStorage = ETrue); - ~CImStoreMessagePart(); - const TDesC8& FinalProgress(); - void DoCancel(); - void RunL(); - const TDesC8& ProgressL(); -private: - enum TImMessagePart - { - EMessagePartAttachment, - EMessagePartBody, - EMessagePartMessageAttachment - }; - void ConstructL(RFile& aFile); - void ConstructL(RFile& aFile,const TDesC& aAttachmentName); - void ConstructL(const TDesC& aAttachmentFullName, const TDesC8& aContentId); - void ConstructAttachmentInfo(CMsvAttachment* aAttachmentInfo,TInt aAttachmentCreationState); - CImStoreMessagePart(TRequestStatus& aStatus, CMsvEntry& aMsvEntry, TMsvId aMessageId, TBool aUsePlainTextStorage = EFalse); - - void ConstructL(); - void ConstructL(const TDesC& aAttachmentFullName); - void ConstructL(TMsvId aAttachmentMessageId); - void ConstructL(const TDesC& aAttachmentFullName, TMsvId aRelatedPartId, const TDesC8& aContentId); - void ConstructL(CRichText& aRichText); - void ConstructL(CRichText& aRichText, const CImMimeHeader& aMimeHeader); - void ConstructL(CImMimeHeader& aMimeHeader); - void ConstructL(TImMessagePart aMessagePart); - void ErrorRecovery(TInt error); - void SelectNextStateL(); // selects next state to go to - void ChangeStateL(); // initiates the next state operation - void SelectAndChangeToNextStateL(); - void RequestComplete(TInt aError); - void Recover(); - - TBool HTMLMessage() const; - void SetHTMLMessage(TBool aFlag); - TBool MultipartMixedExists() const; - void SetMultipartMixedExists(TBool aFlag); - TBool MultipartMixedCreated() const; - void SetMultipartMixedCreated(TBool aFlag); - TBool MultipartAlternativeExists() const; - void SetMultipartAlternativeExists(TBool aFlag); - TBool MultipartAlternativeCreated() const; - void SetMultipartAlternativeCreated(TBool aFlag); - TBool MultipartRelatedExists() const; - void SetMultipartRelatedExists(TBool aFlag); - TBool MultipartRelatedCreated() const; - void SetMultipartRelatedCreated(TBool aFlag); - TBool TextPartExists() const; - void SetTextPartExists(TBool aFlag); - TBool TextPartCreated() const; - void SetTextPartCreated(TBool aFlag); - TBool AttachmentEntryCreated() const; - void SetAttachmentEntryCreated(TBool aFlag); - - void FindMultipartRelatedFolderL(); - void CheckForSubfolderL(); - void CreateAttachmentEntryL(); - void CopyOrigMessageToMessageL(); - void CreateMultipartMixedFolderEntryL(); - void CreateMultipartAlternativeFolderEntryL(); - void CreateMultipartRelatedFolderEntryL(); - void MoveOriginalMessageEntryChildrenToNewFolderL(); - void CreateTextEntryL(); - void StoreRichTextL(); - void CompleteStoreMessagePartL(); - void CreateHTMLEntryL(); - void PrepareToStoreHTMLEntryTextL(); - void StoreHTMLEntryTextL(); - void RemoveHTMLEntryL(); - void MoveTextEntryToAltFolderL(); - TPtrC GetDefaultAttachmentName(); - void OpenAndReadResourceFileL(); - void StoreMimeHeaderL(); - TBool CreateAttachmentMimeHeaderL(CImMimeHeader& aMimeHeader, const TDesC& aDetails); - void CreateFolderMimeHeaderL(CImMimeHeader& aMimeHeader); - void CreateMessageMimeHeaderL(CImMimeHeader& aMimeHeader); - void AddAttachmentL(); - void AddAttachmentUsingFileHandleL(); - void AddLinkedAttachmentL(); - void AddEntryAsAttachmentL(); - void CreateAttachmentL(); - void DoAttachmentStoreL(); - TInt CheckMimeInAttachmentInfoL(CMsvMimeHeaders& aMsvMimeHeaders); - CImMimeHeader* ProcessAttachmentMimeHeadersL(); - void SetEntryDetailsL(TMsvEntry& aEntry); - void StorePlainTextL(); -private: - enum TImStoreMessagePartState - { - EFindMultipartRelatedFolder, - ECheckForSubfolder, - ECreateAttachmentEntry, - EStoreAttachment, - ECopyOrigMessageToMessage, - ECreateMultipartMixedFolderEntry, - ECreateMultipartRelatedFolderEntry, - ECreateMultipartAlternativeFolderEntry, - EMoveOriginalMessageEntryChildrenToNewFolder, - ECreateTextEntry, - EStoreRichText, - ERemoveHTMLEntry, - EMoveTextToAlternativeFolder, - ECreateHTMLEntry, - EPrepareToStoreHTMLEntryText, - EStoreHTMLEntryText, - ECompleteStoreMessage, - EFinished - ,EStoreHTMLTextInEntry, - EAddEntryAttachment - }; - - enum TImStoreMessagePartFlags - { - KStoreMessagePartClearFlag = 0x00000000, - KStoreMessagePartHTMLMessage = 0x00000001, - KStoreMessagePartMultipartMixedExists = 0x00000002, - KStoreMessagePartMultipartMixedCreated = 0x00000004, - KStoreMessagePartMultipartAlternativeExists = 0x00000008, - KStoreMessagePartMultipartAlternativeCreated = 0x00000010, - KStoreMessagePartTextPartExists = 0x00000020, - KStoreMessagePartTextPartCreated = 0x00000040, - KStoreMessagePartAttachmentEntryCreated = 0x00000080, - KStoreMessagePartOrigMessageEntryChildrenCopied = 0x00000100, - KStoreMessagePartOrigMessageEntryChildrenDeleted = 0x00000200, - KStoreMessagePartMultipartRelatedExists = 0x00000400, - KStoreMessagePartMultipartRelatedCreated = 0x00000800 - }; - CMsvEntry& iMsvEntry; - CMsvOperation* iMsvOperation; - - CRichText* iRichTextToStore; // I don't own this object! - CImMimeHeader* iMimeHeaderOfBodyText; - CRichText* iRichText; - CFileMan* iFileMan; - CMsvEntrySelection* iMessageEntrySelection; - - TInt iState; - TPckgBuf iDataMember; - TMsvId iMessageId; - TImMessagePart iMessagePart; - TMsvId iMixFolderId; - TMsvId iAltFolderId; - TMsvId iRelFolderId; - HBufC* iAttachmentFullName; - TInt iAttachmentSize; - TMsvId iAttachmentId; - TMsvId iTextId; - TMsvId iHtmlId; - TMsvId iRelatedPartId; - TMsvId iAttachmentMessageId; - TUint32 iFlags; - HBufC8* iContentId; - CImEmailMessage* iEmailMessage; - - // Used when converting rich text to html - CParaFormatLayer* iParaLayer; - CCharFormatLayer* iCharLayer; - CImHtmlConverter* iHtmlConverter; - TBool iFinishedConvertingHTML; - CMsvAttachment* iAttachmentInfo; - CMsvStore* iStore; - TInt iAttachmentCreateState; - TBool iIsAddByFileHandle; - RFile* iFileHandle; - RFile iFile; - // Indicates whether to store message body as CRichText or plaintext. - TBool iUsePlainTextStorage; - // Size of the plain text body. - TInt iSizeOfBody; - // Size of the Fwd'ed/ReplyTo plaintext body part. - TInt iSizeFwdReplyBody; - // The error value returned when CRichText is populated with message body text. - TInt iRestoreErr; - enum TImAttachmentCreation - { - EAddAttachment, - EAddAttachmentUsingFileHandle, - EAddLinkedAttachment, - EAddEntryAsAttachment, - ECreateAttachment - }; - }; - -class CImEmailOperation : public CMsvOperation -/** Provides simple email messages creation functions, including creation of new -messages, replies, forwarded messages, and receipts. - -Both plain-text and HTML messages, with or without attachments, can be created. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard); - - IMPORT_C static CImEmailOperation* CreateNewL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority , TBool aUsePlainTextStorage); - - IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority); - IMPORT_C static CImEmailOperation* CreateReplyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); - IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard); - IMPORT_C static CImEmailOperation* CreateForwardL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); - IMPORT_C static CImEmailOperation* CreateForwardAsAttachmentL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateForwardAsAttachmentL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aSmtpServiceId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority = EPriorityStandard); - IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TDesC& aFormatString, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority); - IMPORT_C static CImEmailOperation* CreateReceiptL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); - IMPORT_C ~CImEmailOperation(); - IMPORT_C const TDesC8& FinalProgress(); - void DoCancel(); - void RunL(); - const TDesC8& ProgressL(); - - static CImEmailOperation* CreateCopyL(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aMessageId, TMsvId aDestination, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType); - -private: - enum TImEmailOperation - { - ENew = 0, - EReply = 1, - EForward = 2, - EReceipt = 3, - EDeletingBadEmail = 4, - ECopy = 5, - EAttachOriginal = 0x80, - EForwardAsAttachment = EForward | EAttachOriginal, - EReplyAsAttachment = EReply | EAttachOriginal - }; - -private: - CImEmailOperation(TRequestStatus& aObserverRequestStatus, CMsvSession& aMsvSession, TMsvId aDestination, TMsvId aSmtpServiceId, TMsvPartList aPartList, const TMsvEmailTypeList& aMsvEmailTypeList, TUid aMsgType, TInt aPriority, TBool aUsePlainTextStorage); - void ConstructL(TMsvId aMessageId, const TDesC& aFormatString, TImEmailOperation aOperation); - void ConstructL(TMsvId aMessageId, TImEmailOperation aOperation); - void ConstructL(TImEmailOperation aOperation); - void OpenAndReadResourceFileL(); - void SetSmtpServiceFromDefaultsL(); - void SetSmtpServiceFromOriginalMessageL(); - void ErrorRecovery(TInt error); - void SelectNextStateL(); - void ProcessStateL(); - void SelectAndProcessNextStateL(); - void RequestComplete(TInt aError); - void CreateNewHeaderL(); - void GetBodyTextL(); - TInt RemoveIncompleteAttachments(); - void CreateEntryDetails(TMsvEmailEntry& aMsvEmailEntry); - void CreateNewMessageL(TMsvId aDestinationId); - void CreateMultipartMixedFolderEntryL(); - void CreateTextEntryL(TMsvId aFolderId); - void StoreBodyL(); - void StorePlainBodyL(); - void CheckForSignatureOrVCardL(); - void CreateAttachmentEntryL(); - void StoreAttachmentL(); - void CreateMultipartAlternativeFolderEntryL(); - void AppendHtmlAttachmentL(); - void AttachOriginalMessageToNewMessageL(); - void CompleteEmailOperationL(); - void CreateHTMLEntryL(); - void PrepareToStoreHTMLEntryTextL(); - void StoreHTMLEntryTextL(); - void CreateVCardAttachmentL(); - void AddVCardAttachmentL(); - void AddMessageAsAttachmentL(); - TPtrC GetDefaultAttachmentName(); - void RestoreSmtpSettingsL(); - TMsvId ServiceId(); - TBool NeedMultipartMixedFolder() const; - void ReadDefaultHtmlAttachmentNameL(TDes& aFileName); - void CreateDefaultAttachmentL(); - void AddMessageAttachmentInfoL(TMsvId aAttachmentMessageId); - void ResetStoreL(); - void CreateAddressListStringL(HBufC*& aListBuffer, const CDesCArray& aAddressArray); - void RestoreOriginalHeaderL(); - void SetBodyHeaderFormatL(); - static void ClosePlainBodyTextArray(TAny* aPtr); - void StorePlainTextL(); - TInt GetPlainBodyTextSizeL(); - -private: - enum TImEmailOperationState - { - ECreateNewHeader, - EGetBodyText, - EGetAttachmentList, - EGetMessageDigest, - ECreateNewMessageEntry, - ECheckMultipartMixedFolderRequired, - ECreateMultipartMixedFolderEntry, - ECheckMultipartAlternativeFolderRequired, - ECreateMultipartAlternativeFolderEntry, - ECheckTextEntryRequired, - ECreateTextEntry, - EStoreBody, - ECheckVCardRequired, - ECreateVCardAttachment, - EAddVCardAttachment, - ECheckHTMLEntryRequired, - ECreateHTMLEntry, - EPrepareToStoreHTMLEntryText, - EStoreHTMLEntryText, - ECheckAttachOriginalMessageRequired, - EAttachOriginalMessage, - ECheckHTMLPageRequired, - EFindHTMLPage, - ECopyHTMLPartToAttachment, - ECheckAttachmentsRequired, - ECreateAttachmentEntry, - EStoreAttachment, - ECheckEmbeddedMessagesRequired, - EAddEmbeddedMessagesAsAttachments, - ECompleteEmailOperation, - EFinished - ,ECreateDefaultHtmlAttachment, - EStoreHTMLTextInEntry, - EAddMessageAttachmentInfo - }; - - // Flags specifying format of body header information to include - // in reply and forwarded email addresses - enum TImBodyHeaderFormat - { - ENoToCcInfo=0, - EToOnly, - ECcOnly, - EToAndCc - }; - - CMsvEntry* iMsvEntry; - CMsvOperation* iMsvOperation; - - CImHeader* iNewHeader; - CParaFormatLayer* iParaLayer; - CCharFormatLayer* iCharLayer; - CRichText* iRichText; - CImEmailMessage* iEmailMessage; - HBufC* iFormatString; - CFileMan* iFileMan; - CImSmtpSettings* iSmtpSettings; - TInt iState; - TImEmailOperation iOperation; - TMsvId iDestinationId; - TMsvId iMultipartMixedId; - TMsvId iMultipartAlternativeId; - TMsvId iOrigMessageId; - TMsvId iNewMessageId; - TMsvId iSmtpServiceId; - TMsvId iAttachedMessageId; - TUid iMsgType; - TMsvPartList iPartList; - TMsvEmailTypeList iMsvEmailTypeList; - TInt iAttachmentCount; - TInt iTotalAttachments; - TPckgBuf iDataMember; - HBufC* iBodyHeaderFormatString; - HBufC* iBodyHeaderDateTimeFormatString; - HBufC* iBodyHeaderToString; - HBufC* iBodyHeaderCcString; - HBufC* iBodyHeader; - HBufC* iUserEmailAddress; - TInt iRichTextSize; - TInt iVCardAndHtmlSize; - TBool iOrigMessageHtml; - TBool iHtmlNoTextAlt; - TInt iEmbeddedMessagesToProcess; - TImMessageField iMessageField; - - // for MIME messages: - TBool iCreateHtmlMessage; - TBool iMultipartMixedFolderCreated; - TBool iMultipartAlternativeFolderCreated; - TMsvId iTextId; - TMsvId iHtmlId; - TMsvId iVcardId; - - // Used when converting rich text to html - CImHtmlConverter* iHtmlConverter; - TBool iFinishedConvertingHTML; - - // Relating to adding Signature and/or Vcard to an email - TBool iNeedToAddVCardAttachment; - HBufC* iDefaultVCardNameFormatString; - TStreamId iVcardStoreId; - CStreamStore* iVcardStore; - CRichText* iSignatureText; - TFileName iFileName; - TImAttachmentFile iAttachmentFile; - - // PCMail - TMsvId iPCMailServiceId; - RPointerArray iAttachmentInfoList; - // set this anytime during the object life cycle attachment manager was used - TBool iAttachmentMgrUsed; - CMsvStore* iStore; - RFile iFile; - - TImBodyHeaderFormat iBodyHeaderFormat; - CImHeader* iOriginalHeader; - /** Indicates if the body text entry is plain text */ - TBool iUsePlainTextStorage; - // The error value returned when CRichText is populated with message body text. - TInt iRestoreErr; - }; - - -class CImHtmlConverter : public CBase -/** -@internalComponent -@released -*/ - { -public: - static CImHtmlConverter* CImHtmlConverter::NewL(CMsvEntry& aMsvEntry, - CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); - ~CImHtmlConverter(); - void PrepareToStoreHTMLEntryTextL(TMsvId& aHtmlId, const TMsvId aTextId); - void ResetStoreL(); - void ResetStoreWithoutCommit(); - TBool StoreHTMLEntryTextAL(TRequestStatus& aStatus); - CMsvOperation* ChangeHTMLTextInEnrtyL(TRequestStatus& aStatus); - - void ReadDefaultAttachmentNameL( RResourceFile& resourceFile); - TInt Size() const; - -private: - CImHtmlConverter(CMsvEntry& aMsvEntry, CParaFormatLayer& aParaLayer, CCharFormatLayer& aCharLayer); - TFileName HtmlFilename(CMsvEntry& aEntry, TPtrC aFileName); - TPtrC GetDefaultAttachmentName(); - void ConstructL(); - -private: - CMsvEntry& iMsvEntry; - CParaFormatLayer& iParaLayer; - CCharFormatLayer& iCharLayer; - - CConverterBase* iToHTMLConverter; - CCnaConverterList* iConverterList; - - TMsvId iTextId; - TMsvId iHtmlId; - TInt iSize; - HBufC* iDefaultAttachmentName; - CRichText* iRichText; - RDesReadStream iSourceStream; - RFileWriteStream iTargetStream; - CMsvStore* iStore; - RFile iFile; - }; - -class CImStoreResolver : public CBase, public MRichTextStoreResolver -/** -@internalComponent -@released -*/ - { -public: - CImStoreResolver(CStreamStore* aStore); - ~CImStoreResolver(); - // -private: - const CStreamStore& StreamStoreL(TInt aPos)const; - // -private: - CStreamStore* iStore; - }; - - - - -#endif // __MIUTMSG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miutpars.h --- a/epoc32/include/miutpars.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,98 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__MIUTPARS_H__) -#define __MIUTPARS_H__ - -#include - -// comment out line below to switch ON Internet message checking -//#define __NO_EMAIL_ADDRESS_CHECKING__ - -class TImMessageField -/** Parses email message header fields for valid Internet email addresses, -comments and aliases. - -A comment is a string surrounded by parentheses, as defined in RFC822, 3.1.4. - -An alias is defined as any substring which appears to the left of a legal email address: -for example, the string "this is an alias" in "this is an alias ". - -For email addresses, the string being parsed: -1) must contain an @ character, surrounded by valid address characters; -2) may not contain more than one address or @ character; -3) may contain aliases and comments. - -Note the following about the implementation of this class: - -1. Functions that test subject lines, ValidSubjectLine(), and alias names, ValidAliasName(), were -initially written to test that the strings did not contain characters outside a limited -ASCII range. Unicode characters are now allowed, so these functions now always return true. - -2. Of the four overloads of GetValidInternetEmailAddressFromString(), only the first has a meaningful -implementation. - -@publishedAll -@released -*/ - { -public: - IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress); - IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress, TInt& rFirstBadCharPos); - IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); - IMPORT_C TBool ValidInternetEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar, TInt& rFirstBadCharPos); - - IMPORT_C TBool ValidInternetEmailAddressChar(const TChar& aChar); - - IMPORT_C TBool ValidSubjectLine(const TDesC16& aSubjectLine); - IMPORT_C TBool ValidSubjectLine(const TDesC16& aSubjectLine, TInt& rFirstBadCharPos); - - IMPORT_C TBool ValidSubjectLineChar(const TChar& aChar); - - IMPORT_C TBool ValidAliasName(const TDesC16& aAliasName); - IMPORT_C TBool ValidAliasName(const TDesC16& aAliasName, TInt& rFirstBadCharPos); - - IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress); - IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress, TInt& rError); - IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); - IMPORT_C TPtrC16 GetValidInternetEmailAddressFromString(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar, TInt& rError); - - IMPORT_C TPtrC16 GetValidAlias(const TDesC16& aAddress); - IMPORT_C TPtrC16 GetValidAlias(const TDesC16& aAddress, TInt& rError); - - IMPORT_C TPtrC16 GetValidComment(const TDesC16& aAddress); - IMPORT_C TPtrC16 GetValidComment(const TDesC16& aAddress, TInt& rError); - TBool TruncateAddressString(const TDesC16& aDesc, TInt aLimit, TInt& aLastChar); -private: - TBool isValidEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); - TBool isLegalEmailAddress(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); - TBool isSurroundedByRoundBrackets(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar); - TBool isSurroundedByAngledBrackets(const TDesC16& aAddress, TInt& rFirstChar, TInt& rLastChar, TInt aAtPos); - TBool isEnclosedSubString(const TDesC16& anAddress, const TChar& aLeftBracket, const TChar& aRightBracket,TInt& aLeftPos, TInt& aRightPos); - TBool isValidString(const TDesC16& anAddress, TInt& aFirstBadCharPos); - TBool isValidChar(const TChar& aChar); - TBool isValidEmailString(const TDesC16& anAddress, TInt& aFirstBadCharPos); - TBool isValidEmailChar(const TChar& aChar); - TBool LocateSubString(const TDesC16& anAddress, const TInt atPos, TInt& rFirstChar, TInt& rLastChar); - TBool hasAngledBrackets(const TDesC16& anAddress); - TBool isValid_ISO88591String(const TDesC16& aString,TInt& aPos); - TBool isValidRoutedEmailAddress(const TDesC16& anAddress); - TBool isValidDomainNameChar(const TChar& aChar); - TBool isValidMailboxChar(const TChar& aChar); - TBool isDotChar(const TChar& aChar); - }; - - -#endif // !defined __MIUTPARS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/miutset.h --- a/epoc32/include/miutset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__MIUTSET_H__) -#define __MIUTSET_H__ - - - -#include -#include - -const TInt KMaxSettingStringLength = 1024; - -/** UID of an SMTP message type. */ -const TUid KUidMsgTypeSMTP = {0x10001028}; // 268439592 -/** UID of a POP3 message type. */ -const TUid KUidMsgTypePOP3 = {0x10001029}; // 268439593 -/** UID of an IMAP4 message type. */ -const TUid KUidMsgTypeIMAP4 = {0x1000102A}; // 268439594 - -/** -@deprecated -*/ -const TUid KUidMsgTypeSMTPServer = {0x10003923}; // 268450083 - - -class CImBaseEmailSettings : public CBase -/** -Parent class for CImPop3Settings, CImImap4Settings, CImSmtpSettings. - -This class should not be instantiated directly. It implements common email -settings such as the hostname or IP address of the server, port number, -and whether or not to use SSL. - -@see CImPop3Settings -@see CImImap4Settings -@see CImSmtpSettings - -@publishedAll -@released -*/ - { -public: - IMPORT_C CImBaseEmailSettings(); - IMPORT_C virtual ~CImBaseEmailSettings(); - IMPORT_C void Reset(); - IMPORT_C const TPtrC ServerAddress() const; - IMPORT_C void SetServerAddressL(const TDesC& aServerAddress); - IMPORT_C TUint Port() const; - IMPORT_C void SetPort(const TUint aPortNumber); - IMPORT_C TBool SecureSockets() const; - IMPORT_C void SetSecureSockets(TBool aFlag); - IMPORT_C TBool SSLWrapper() const; - IMPORT_C void SetSSLWrapper(TBool aFlag); - IMPORT_C CImBaseEmailSettings& CopyL(const CImBaseEmailSettings& aCImBaseEmailSettings); - IMPORT_C TBool operator==(const CImBaseEmailSettings& aCImBaseEmailSettings) const; - IMPORT_C void SetBearerMobility(TBool aFlag); - IMPORT_C TBool BearerMobility() const; - - TUint32 SettingsFlags() const; - void SetSettingsFlags(TUint32 aSetFlags); - -protected: - enum TImBaseEmailSettings - { - EBaseEmailSettingsClearFlag = 0x00000000, - EBaseEmailSettingsSecureSockets = 0x00000001, - EBaseEmailSettingsSSLWrappedSockets = EBaseEmailSettingsSecureSockets << 1, //0x00000002, - EBaseEmailSettingsLastUsedFlag = EBaseEmailSettingsSSLWrappedSockets, //0x00000002 - EBaseEmailSettingsBearerMobFlag = 0x80000000 - }; - TUint32 iPortNumber; // the port the TCP/IP connection be made on - - TUint32 iFlags; // space for flags info (now and for future) - -private: - HBufC* iServerAddress; // remote server's IP address - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mmf/plugin/mmfformatimplementationuids.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mmf/plugin/mmfformatimplementationuids.hrh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,33 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MMF_FORMATIMPLEMENTATIONUIDS_HRH__ +#define __MMF_FORMATIMPLEMENTATIONUIDS_HRH__ + + +// These are the ECOM Implementation UIDs for the Formats supplied in Symbian plugins. + +#define KMmfUidFormatWAVRead 0x101F55E1 +#define KMmfUidFormatWAVWrite 0x101F55E2 +#define KMmfUidFormatRAWRead 0x101F5C16 +#define KMmfUidFormatRAWWrite 0x101F5C17 +#define KMmfUidFormatAURead 0x101F5C12 +#define KMmfUidFormatAUWrite 0x101F5C13 + +#define KAdvancedUidFormatAMRRead 0x101FAF65 +#define KAdvancedUidFormatAMRWrite 0x101FAF66 + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mmfformatimplementationuids.hrh --- a/epoc32/include/mmfformatimplementationuids.hrh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MMF_FORMATIMPLEMENTATIONUIDS_HRH__ -#define __MMF_FORMATIMPLEMENTATIONUIDS_HRH__ - - -// These are the ECOM Implementation UIDs for the Formats supplied in Symbian plugins. - -#define KMmfUidFormatWAVRead 0x101F55E1 -#define KMmfUidFormatWAVWrite 0x101F55E2 -#define KMmfUidFormatRAWRead 0x101F5C16 -#define KMmfUidFormatRAWWrite 0x101F5C17 -#define KMmfUidFormatAURead 0x101F5C12 -#define KMmfUidFormatAUWrite 0x101F5C13 - -#define KAdvancedUidFormatAMRRead 0x101FAF65 -#define KAdvancedUidFormatAMRWrite 0x101FAF66 - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mmmssettingsobserver.h --- a/epoc32/include/mmmssettingsobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MMMSSETTINGSOBSERVER_H__ -#define __MMMSSETTINGSOBSERVER_H__ - - -#include - - - -/** -Provides the interface for notification of changes that occur in the Central Repository. - -@see CMmsAccounts::AddObserverL() -@see CMmsAccounts::RemoveObserver() - -@publishedAll -@released -*/ -class MMmsSettingsObserver - { -public: - /** - Settings event. - */ - enum TMmsSettingsEvent - { - /** - Settings have been updated. - */ - ESettingsUpdated - }; -public: - /** - Indicates that a settings event has occurred. - - @param aEvent - The Settings Event - */ - virtual void HandleNotify(TMmsSettingsEvent aEvent) = 0; - }; - -#endif // __MMMSSETTINGSOBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mmsvattachmentmanager.h --- a/epoc32/include/mmsvattachmentmanager.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MMSVATTACHMENTMANAGER_H__ -#define __MMSVATTACHMENTMANAGER_H__ - -#include -#include -#include - -class MMsvAttachmentManager -/** -Defines the attachment management interface. - -This class is a pure virtual interface class that defines the APIs to be used for -attachment management in the Messaging Framework. It is expected that the clients of -this interface will be MTMs implementations that require attachment management. - -The API allows is based around the use of the CMsvAttachment object that represents -any type of attachment that is supported by the Messaging Framework. The CMsvAttachment -object provides users with various attributes about the attachment without having to -actually load or retrieve the attachment. - -This attachment manager API supports the following different types of attachments: -1 - File attachments, file based attachments that are copied or created in the message - store. -2 - Linked file attachments, file based attachments that are not copied and are simply - linked to the file location on disk. -3 - Message entry attachments, existing message entries that can be registered as - attachments of another message entry. - -For file based attachments, this API also supports the retrieval of the files as -open read-only file handles. - -All functionality that requires the attachment manager to be in edit mode have been -defined as asynchronous. The attachment manager does not allow multiple asynchronous -requests to be made at the same time. - -@see CMsvAttachment -@publishedAll -@released -*/ - { -public: - /** - Adds an attachment to the message store by file path. - - The attachment file must be located in a public area. The file path must also be a - full path specification. The file is copied into the message store. - - @param aFilePath The absolute file path of the attachment file. - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @param aStatus The client's request status to complete when the operation has completed. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void AddAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; - - /** - Adds an attachment to the message store by file handle. - - This is used to add an attachment from an open file handle such as when adding a file - from the caller's private area. The file is copied into the message store. The message - server is responsible for closing the file handle once copied. - - @param aFileHandle An open file handle for the attachment file. Ownership is transferred. The caller must close the file handle. - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @param aStatus The client's request status to complete. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void AddAttachmentL(RFile& aFileHandle, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; - - /** - Adds an attachment as a linked file attachment. - - The attachment is added as a link by its file path. The attachment is not copied to the - message store. The attachment is linked and therefore must be in a public location. - - It is possible to change a linked attachment file after it has been attached to a message - entry. No integrity checking is carried out. This is left to individual MTMs or implementors - of this interface to decide if any checking is required such as checking if the size has changed. - - @param aFilePath The absolute file path of the linked attachment file. - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @param aStatus The client's request status to complete. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void AddLinkedAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; - - /** - Adds a message entry as an attachment. - - The message entry is registered as an attachment of the current message entry. The attachment - message entry is not copied. - - @param aEntryId The message Id of the entry to register as an attachment. - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @param aStatus The client's request status to complete. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void AddEntryAsAttachmentL(TMsvId aEntryId, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; - - /** - Creates a new empty attachment file. - - The caller is returned an open writable file handle to an empty attachment file in the message - store. The caller must pass in an uninitialised file handle. The file handle cannot be used - until the asynchronous request completes successfully. If the request is sucessful the file handle - is open and must close by the caller once the data has been written to it. - - @param aFileName The filename to assign to the newly create attachment file. - @param aAttachmentFile An uninitialised file handle. This is opened and can be written to if the - request is successful. Ownership is transferred . The caller must close the file handle. - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; - - - /** - Renames the physical filename of an attachment. - - @param aIndex The array index position of the attachment to be renamed. - @param aNewName The new name of the attachment. - @param aStatus The client's request status to complete. - @leave KErrAccessDenied If attachment manager is in read-only mode. - @leave KErrAlreadyExists If the supplied attachment filename already exists. - */ - virtual void RenameAttachmentL(TInt aIndex, const TDesC& aNewName, TRequestStatus& aStatus) = 0; - - - /** - Counts the number of attachments. - - Returns the number of attachments associated with the message entry. This includes all the - attachments that have not been commited yet. - @return The number of attachments. - */ - virtual TInt AttachmentCount() const = 0; - - /** - Returns an attachment info object. - - This object contains attributes and information about the attachment without having actually - retrieving the actual attachment. The caller assumes ownership of the returned object. - - @param aIndex The array index position of the attachment. - @return The attachment info for the attachment. Ownership is passed to caller, - */ - virtual CMsvAttachment* GetAttachmentInfoL(TInt aIndex) = 0; - - /** - Returns an attachment info object. - - This object contains attributes and information about the attachment without having actually - retrieving the actual attachment. The caller assumes ownership of the returned object. - - @param aId The attachment Id of the attachment. - @return The attachment info for the attachment. Ownership is passed to caller, - @leave KErrNotFound If an attachment with the specified attachment Id is not found. - */ - virtual CMsvAttachment* GetAttachmentInfoL(TMsvAttachmentId aId) = 0; - - /** - Modifies the attachment info for a particular attachment. - - This allows callers to modify an existing attachment info object for a particular attachment. - The attachment info object passed in replaces the existing attachment info object and takes - ownership for the object passed in. It is expected that callers will use GetAttachmentInfoL - to get the object, make some changes and pass it back into this method. - - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @param aStatus The client's request status to complete. - @leave KErrNotFound If the attachment that is trying to be modified cannot be found. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void ModifyAttachmentInfoL(CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; - - /** - Returns an open file handle for the attachment file. - - Returns a read-only open file handle for the attachment file. This only applies to file based - attachments ie. file attachment and linked file attachments. The caller is responsible for - closing the returned file handle. - - @param aIndex The array index position of the attachment. - @return A read-only open file handle for the attachment file. Caller must close the handle. - @leave KErrNotSupported If the attachment is not a file attachment in the message store. - */ - virtual RFile GetAttachmentFileL(TInt aIndex) = 0; - - /** - Returns an open file handle for the attachment file. - - Returns a read-only open file handle for the attachment file. This only applies to file based - attachments ie. file attachment and linked file attachments. The caller is responsible for - closing the returned file handle. - - @param aIndex The array index position of the attachment. - @return A read-only open file handle for the attachment file. Caller must close the handle. - @leave KErrNotSupported If the attachment is not a file attachment in the message store. - @leave KErrNotFound If an attachment with the specified attachment Id is not found. - */ - virtual RFile GetAttachmentFileL(TMsvAttachmentId aId) = 0; - - /** - Returns an open writable file handle for the attachment file. - - Returns a writable open file handle for the attachment file. This only applies to file based - attachments ie. file attachment and linked file attachments. The caller is responsible for - closing the returned file handle. - - @param aIndex The array index position of the attachment. - @return A writable open file handle for the attachment file. Caller must close the handle. - @leave KErrNotSupported If the attachment is not a file attachment in the message store. - @leave KErrAccessDenied If attachment manager is in read-only mode. - @internalComponent - */ - virtual RFile GetAttachmentFileForWriteL(TInt aIndex) = 0; - - /** - Returns an open writable file handle for the attachment file. - - Returns a writable open file handle for the attachment file. This only applies to file based - attachments ie. file attachment and linked file attachments. The caller is responsible for - closing the returned file handle. - - @param aIndex The array index position of the attachment. - @return A writable open file handle for the attachment file. Caller must close the handle. - @leave KErrNotSupported If the attachment is not a file attachment in the message store. - @leave KErrNotFound If an attachment with the specified attachment Id is not found. - @leave KErrAccessDenied If attachment manager is in read-only mode. - @internalComponent - */ - virtual RFile GetAttachmentFileForWriteL(TMsvAttachmentId aId) = 0; - - /** - Removes the attachment from the message entry. - - This changes the array index values of all the attachments after the removed one. - Attachment files stored in the message store are deleted. Linked files and message entry - attachments are not deleted, this is left to the caller to do if required. - - @param aParam The array index position of the attachment to be removed. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void RemoveAttachmentL(TInt aIndex, TRequestStatus& aStatus) = 0; - - /** - Removes the attachment from the message entry. - - This changes the array index values of all the attachments after the removed one. - Attachment files stored in the message store are deleted. Linked files and message entry - attachments are not deleted, this is left to the caller to do if required. - - @param aParam The array index position of the attachment to be removed. - @leave KErrAccessDenied If attachment manager is in read-only mode. - @leave KErrNotFound If an attachment with the specified attachment Id is not found. - */ - virtual void RemoveAttachmentL(TMsvAttachmentId aId, TRequestStatus& aStatus) = 0; - - /** - Cancels the last asynchronous operation that was requested. - - Allows callers to cancel the last asynchronous operation. This will have no effect - if an asynchronous is not waiting to complete. - */ - virtual void CancelRequest() = 0; - }; - -#endif // __MMSVATTACHMENTMANAGER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mmsvattachmentmanagersync.h --- a/epoc32/include/mmsvattachmentmanagersync.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MMSVATTACHMENTMANAGERSYNC_H__ -#define __MMSVATTACHMENTMANAGERSYNC_H__ - -#include -#include -#include - -class MMsvAttachmentManagerSync -/** -Defines the attachment management extensions interface. - -This class is a pure virtual interface class that defines the APIs to be used for -by MTMs and implementors of MMsvAttachmentManager. - -This API extends the MMsvAttachmentManager with synchronous calls for deleting -and creating attachments. - -@see CMsvAttachment -@publishedAll -@released -*/ - { -public: - /** - Creates a new empty attachment file. - - The caller is returned an open writable file handle to an empty attachment file in the message - store. The caller must pass in an uninitialised file handle. If the request is sucessful the file handle - is open and must close by the caller once the data has been written to it. - - @param aFileName The filename to assign to the newly create attachment file. - @param aAttachmentFile An uninitialised file handle. This is opened and can be written to if the - request is successful. The ownership is transferred . The caller must close the file handle. - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo) = 0; - - - - /** - Renames the physical filename of an attachment. - - @param aIndex The array index position of the attachment to be renamed. - @param aNewName The new name of the attachment. - @leave KErrAccessDenied If attachment manager is in read-only mode. - @leave KErrAlreadyExists If the supplied attachment filename already exists. - */ - virtual void RenameAttachmentL(TInt aIndex, const TDesC& aNewName) = 0; - - - /** - Removes the attachment from the message entry. - - This changes the array index values of all the attachments after the removed one. - Attachment files stored in the message store are deleted. Linked files and message entry - attachments are not deleted, this is left to the caller to do if required. - - @param aParam The array index position of the attachment to be removed. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void RemoveAttachmentL(TInt aIndex) = 0; - - /** - Modify existing attachment - @param aAttachmentInfo The attachment info associated with the file. - If the routine does not leave, then ownership will be transferred to the - attachment manager. If the routine does leave then ownership will not have - been transfered and the caller is responsible for cleanup. - @leave KErrAccessDenied If attachment manager is in read-only mode. - */ - virtual void ModifyAttachmentInfoL(CMsvAttachment* aAttachmentInfo) = 0; - - }; - -#endif // __MMSVATTACHMENTMANAGERSYNC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mobexnotify.h --- a/epoc32/include/mobexnotify.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MOBEXNOTIFY_H__ -#define __MOBEXNOTIFY_H__ - -#include - -class CObexPacket; - -/** -@internalComponent - -Provides the call back interface for anything owned by CObex. -Note: This is an internal class which is not intended for use outside of -the Transport<->Obex interface. Even where access rules allow it, external -users should not call these functions as their implementation may change. -*/ -NONSHARABLE_CLASS(MObexNotify) - - { - public: - virtual void Process(CObexPacket &aPacket) =0; - virtual void Error(TInt aError) =0; - virtual void TransportUp() =0; // Call back to start the obex session - virtual void TransportDown(TBool aForceTransportDeletion) =0; - }; - -#endif // __MOBEXNOTIFY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvapi.h --- a/epoc32/include/msvapi.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1002 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifdef _DEBUG -#undef _NO_SESSION_LOGGING_ -#endif - -#ifndef __MSVAPI_H__ -#define __MSVAPI_H__ - -#include -#include - -#ifdef _MSVAPI_DONT_INCLUDE_FLOGGER_ - #ifndef _NO_SESSION_LOGGING_ - #define _NO_SESSION_LOGGING_ - #endif -#else - #include -#endif - -#include -#include -#include -#include -#include - -// Forward declarations -class CMsvSession; -class CMsvEntry; -class CBaseMtm; -class CMsvClientEntry; -class CMsvEntryArray; -class CMsvServer; -class CMsvServerEntry; - -// Remove these to remove client logging -//#define _NO_SESSION_LOGGING_ -#define _NO_SESSION_LOGGING_SERIAL_ - -// Single export used to start the message server -IMPORT_C TInt StartMessageServer(TAny*); - -// Create Message Server and return a server entry owned by caller -// This is all that is required to test server Mtm's -IMPORT_C CServer2* CreateMessageServerL(CMsvServerEntry*& aServerEntry); - -//********************************** -// CMsvOperation -//********************************** -// -// Abstract base class for operations controlling asynchronous functions -// - -class CMsvOperation : public CActive -/** Defines an interface for use by objects which control asynchronous commands -in the messaging system. - -Such objects are returned by CMsvEntry and User Interface MTM functions that -complete asynchronously. The interface allows clients to: - -1. get progress information about the operation - -2. cancel the operation - -3. be signalled asynchronously when the operation completes; a client passes -in a TRequestStatus of a suitable active object for this purpose - -The client only needs to understand the CMsvOperation interface, not the concrete -implementation used. - -Writing derived classes: - -As the base class interface for User Interface MTMs, CBaseUiMtm, defines functions -that return CMsvOperation objects for control of asynchronous operations, -implementers of these MTM components are required to provide suitable derived -classes. For example, if CBaseUiMtm::EditL() is implemented to provide message -editing, a CMsvOperation -derived class would be provided that completes when -the editing operation is complete. - -Concrete derived classes must provide implementations of the pure virtual -DoCancel() and RunL() functions defined by CActive. DoCancel() should be provided -in the normal way to cancel the operation. RunL() should, in addition to any -other required functionality, always end by signalling the client that the -operation is complete with a suitable completion code. - -@publishedAll -@released -*/ - { -public: - IMPORT_C CMsvOperation(CMsvSession& aMsvSession, TInt aPriority, TRequestStatus& aObserverRequestStatus); - IMPORT_C ~CMsvOperation(); - /** Gets information on the progress of the operation. - - All operations on local entries share the same progress information format, - which defined by TMsvLocalOperationProgress. - - For MTM-specific operations, progress information can be extracted by calling - CBaseUiMtm::GetProgress() or displayed by CBaseUiMtm::DisplayProgressSummary() - on the appropriate User Interface MTM. - - Requirements: - - Derived classes should implement this function so that the client can check - on the progress of the operation. The function should share an understanding - of the format of the buffer with the implementations of CBaseUiMtm::GetProgress() - and CBaseUiMtm::DisplayProgressSummary() in the User Interface MTM. The arguments - of CBaseUiMtm::GetProgress() show some information that should be included - where appropriate. - - @leave KErrNotReady The operation has not yet been started: it has been queued - for execution in the Message Server - @return Descriptor holding progress information. The maximum buffer size should - be KMsvProgressBufferLength (defined in msvipc.h). */ - virtual const TDesC8& ProgressL()=0; - IMPORT_C virtual const TDesC8& FinalProgress(); - IMPORT_C TInt SystemProgress(TMsvSystemProgress& aOutSysProg); - IMPORT_C virtual TUid Mtm() const; - // - inline TMsvOp Id() const; - inline TMsvId Service() const; - // -protected: - IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1); - -protected: - /** The ID of the service that is associated with this operation. - - Usually, the derived class constructor will contain a suitable argument to - allow the caller to set this. - - @see Service() */ - TMsvId iService; - /** The UID of the MTM associated with the operation. - - The appropriate value should be set by the derived class constructor. - - @see Mtm() */ - TUid iMtm; - /** Request status of the operation observer. - - This is the aObserverRequestStatus passed in the constructor. */ - TRequestStatus& iObserverRequestStatus; - /** Message Server session used by object. This is set by the constructor. */ - CMsvSession& iMsvSession; - -private: - TMsvOp iId; - }; - - -//********************************** -// CMsvOperationWait -//********************************** -// -// Allows a synchronous wait on a operation -// - -class CMsvOperationWait: public CActive -/** Utility class used to wait until an asynchronous messaging operation -has completed. - -Note that CMsvOperationActiveSchedulerWait is simpler to use, and should be used in -preference to this class. - -To use the class: - -1. Create a new CMsvOperationWait object - -2. Call the messaging function that returns the asynchronous operation. -The operation observer parameter should be the iStatus word of the CMsvOperationWait -object. This means that the CMsvOperationWait object will be signalled when -the operation completes. - -3. Call the CMsvOperationWait object's Start() function. This sets the object -to be active. - -4. Call CActiveScheduler::Start(). This starts a nested active scheduler. The -program will then wait until this active scheduler is stopped. The CMsvOperationWait -object stops the scheduler when the operation completes, allowing the program to -continue. - -These steps cause the program to wait until the operation completes. - -@code - CMsvOperationWait* waiter=CMsvOperationWait::NewLC(); - CMsvOperation* op = function_returning_opLC(waiter->iStatus); - waiter->Start(); - CActiveScheduler::Start(); - CleanupStack::PopAndDestroy(2); // op, waiter -@endcode - -@see CActiveScheduler -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvOperationWait* NewLC(TInt aPriority=EPriorityStandard); - IMPORT_C ~CMsvOperationWait(); - IMPORT_C void Start(); -protected: - CMsvOperationWait(TInt aPriority); - void RunL(); - void DoCancel(); - }; - - -//********************************** -// CMsvOperationActiveSchedulerWait -//********************************** -// -// Allows a synchronous wait on a operation using CActiveSchedulerWait class -// This class should be used in preference to CMsvOperationWait -// DOES NOT require an explicit call to CActiveScheduler::Start()--CMsvOperationActiveSchedulerWait::Start() -// effectively encapsulates this functionality -// - -class CMsvOperationActiveSchedulerWait: public CActive -/** Utility class used to wait until an asynchronous messaging operation -has completed. - -To use the class: - -1. Create a new CMsvOperationActiveSchedulerWait object - -2. Call the messaging function that returns the asynchronous operation. -The operation observer parameter should be the iStatus word of the CMsvOperationActiveSchedulerWait -object. This means that the CMsvOperationActiveSchedulerWait object will be signalled when -the operation completes. - -3. Call the CMsvOperationActiveSchedulerWait object's Start() function. This sets the object -to be active. - -These steps cause the program to wait until the operation completes. - -@code - CMsvOperationActiveSchedulerWait* waiter=CMsvOperationActiveSchedulerWait::NewLC(); - CMsvOperation* op = function_returning_opLC(waiter->iStatus); - waiter->Start(); - - CleanupStack::PopAndDestroy(2); // op, waiter -@endcode - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvOperationActiveSchedulerWait* NewLC(TInt aPriority=EPriorityStandard); - IMPORT_C ~CMsvOperationActiveSchedulerWait(); - IMPORT_C void Start(); -private: - CMsvOperationActiveSchedulerWait(TInt aPriority); - void RunL(); - void DoCancel(); -private: - CActiveSchedulerWait iActiveSchedulerWait; - }; - -//********************************** -// CMsvCompletedOperation -//********************************** -// -// An operation which is already completed on construction -// - -class CMsvCompletedOperation : public CMsvOperation -/** Utility to create a messaging operation object for an operation that has already -completed. - -This utility is useful, for example, for writers of MTMs, where the API requires that an -asynchronous operation is returned, but where in reality, the operation has performed -synchronously. It allows the program to construct an operation object for which -the operation is already completed, with the progress information and error code set. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvCompletedOperation* NewL(CMsvSession& aMsvSession, TUid aMtm, const TDesC8& aProgress, TMsvId aService, TRequestStatus& aObserverRequestStatus, TInt aErr=KErrNone); - IMPORT_C ~CMsvCompletedOperation(); - // - const TDesC8& ProgressL(); - const TDesC8& FinalProgress(); -private: - CMsvCompletedOperation(CMsvSession& aSession, TRequestStatus& aObserverRequestStatus); - void ConstructL(TUid aMtm, TInt aError, const TDesC8& aProgress, TMsvId aService); - // from CActive - void DoCancel(); - void RunL(); - // -private: - HBufC8* iProgress; - }; - -//********************************** -// CMsvSendOperation -//********************************** -// -// A send operation which returns a standard progress (used by SendAs2) -// - -/** Utility to create an operation containing a sending operation which may be used -to retrieve a standard progress structure. - -This class is intended to be derived from. The derived class must define the TranslateProgress() -member function. This function is responsible for translating the native progress of the given -mtm into the standard progress structure, CMsvSendOperation::TSendOperationProgress. - -@publishedAll -@released -*/ -class CMsvSendOperation : public CMsvOperation - { -public: - /** Send progress state. - - @see TSendOperationProgress - */ - enum TSendOperationState - { - ESendStateInPreparation, - ESendStateWaitingToSend, - ESendStateConnecting, - ESendStateSending, - ESendStateDone, - ESendStateFailed - }; - /** Send progress. - - Structure holding send progress. For mtms unable to provide detailed progress - information, iProgressMax and iProgress must be zeroed. This will then allow - the client to check for this case and display a busy status dialog as opposed to - a progress dialog. If the mtm is capable of detailed progress, iProgressMax - should be set to the total number of units to be sent and iProgress the number - of units sent. - - @see TSendOperationState - */ - class TSendOperationProgress - { - public: - TSendOperationState iState; - TInt iError; - TInt iProgressMax; - TInt iProgress; - }; - -public: - IMPORT_C virtual ~CMsvSendOperation(); - // methods from CMsvOperation - IMPORT_C virtual const TDesC8& ProgressL(); - IMPORT_C virtual const TDesC8& FinalProgress(); - IMPORT_C void Start(CMsvOperation* aOperation); -protected: - IMPORT_C CMsvSendOperation(CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); -private: // methods from CActive - IMPORT_C virtual void DoCancel(); - IMPORT_C virtual void RunL(); -private: - /** Translates the progress from sending operation's progress into TSendOperationProgress. - - This member function must be defined by derived classes. Must not leave. - @see TSendOperationProgress - @return Descriptor holding progress information. - */ - virtual const TDesC8& TranslateProgress(const TDesC8& aProgress)=0; - void Complete(TInt anError); -protected: - /** The progress that is associated with this operation. - - The TranslateProgress defined by derived classes must populate and return - this progress structure. - @see TranslateProgress() - @see TSendOperationProgress */ - TPckgBuf iProgress; - /** The sending operation. - - Assigned when ConstructL is called - */ - CMsvOperation* iOperation; - }; - -/** Package buffer for a TSendOperationProgress -*/ -typedef TPckgBuf TMsvSendOperationProgress; - - -//********************************** -// MMsvSessionObserver -//********************************** -// -// -// - -class MMsvSessionObserver -/** Provides the interface for notification of events from a Message Server session. - - -The types of event are given in the enumeration TMsvSessionEvent. Clients -must provide an object that implements the interface, and set it to be notified -through CMsvSession::OpenSyncL() or CMsvSession::OpenASyncL(). Additional -observers can also be added and removed through CMsvSession. - -@see CMsvSession::AddObserverL() -@see CMsvSession::RemoveObserver() -@publishedAll -@released -*/ - { -public: - /** Session event type. - - @see EMsvMediaUnavailable - @see TDriveNumber - */ - enum TMsvSessionEvent - { - /** One or more entries have been created. - - aArg1 is a CMsvEntrySelection of the new entries. aArg2 is the TMsvId of the - parent entry. */ - EMsvEntriesCreated, - /** One or more index entries have been changed. - - aArg1 is a CMsvEntrySelection of the index entries. aArg2 is the TMsvId of - the parent entry. */ - EMsvEntriesChanged, - /** One or more entries have been deleted. - - aArg1 is a CMsvEntrySelection containing the IDs of the deleted entries. aArg2 - is the TMsvId of the parent entry. */ - EMsvEntriesDeleted, - /** One or more entries have been moved. - - aArg1 is a CMsvEntrySelection containing the IDs of the moved entries. aArg2 - is the TMsvId of the new parent. aArg3 is the TMsvId of the old parent entry. */ - EMsvEntriesMoved, - /** A new MTM has been installed. - - aArg2 points to a TUid for the new MTM. */ - EMsvMtmGroupInstalled, - /** A MTM has been uninstalled. - - aArg2 points to a TUid of the removed MTM. */ - EMsvMtmGroupDeInstalled, - /** Something has happening in the server, but this client was unable to retrieve - the information. - - aArg1 points to the error code. */ - EMsvGeneralError, - /** The client should immediately close the session with the Message Server. */ - EMsvCloseSession, - /** Received after a client has used CMsvSession::OpenAsyncL() to create a session. - - - The session can now be used. */ - EMsvServerReady, - /** Received after a client has used CMsvSession::OpenAsyncL() to create a session. - - - The server could not be started, and aArg1 points to the error code. */ - EMsvServerFailedToStart, - /** The Message Server index had been corrupted and had to be rebuilt. - - All local entries are recovered, but all remote entries have been lost. */ - EMsvCorruptedIndexRebuilt, - /** The Message Server has been terminated. - - All clients must close their sessions immediately. */ - EMsvServerTerminated, - /** The Message Server has automatically changed the index location to use the - internal disk. - - aArg1 is a TDriveNumber value that identifies the drive used by the Message - Server to hold the index prior to the change. - - aArg2 is also a TDriveNumber value; it identifies the new drive that the Message - Server is using. - - CMsvEntry contexts either refresh themselves or mark themselves invalid. - - @see EMsvMediaUnavailable - @see TDriveNumber */ - EMsvMediaChanged, // I assume the following four are in sequential order - /** The media (disk) containing the Message Server index has been removed. - - aArg1 is a TDriveNumber value that identifies the drive that is no longer - available. - - Future requests may fail with KMsvMediaUnavailable. A EMsvMediaChanged event - may be received in the future, as the Message Server switches back to the - internal drive. */ - EMsvMediaUnavailable, - /** The disk containing the Message Store is available again. - - aArg1 is a TDriveNumber value that identifies the drive that is being used. - - The Message Server can now operate as normal. No client action is necessary. */ - EMsvMediaAvailable, - /** An incorrect disk is inserted. - - aArg1 is a TDriveNumber value that identifies the drive in which the incorrect - disk has been inserted. - - Some requests may fail with KMsvMediaIncorrect. Clients may get an EMsvMediaChanged - event in the future telling them that the Message Server has switched back - to the internal drive. */ - EMsvMediaIncorrect, - /** The Message Server has started to rebuild its index after it has been corrupted. - - @see EMsvCorruptedIndexRebuilt */ - EMsvCorruptedIndexRebuilding - }; -public: - /** Indicates an event has occurred. - - The type of event is indicated by the value of aEvent. The interpretation - of the TAny arguments depends on this type. - - For most event types, the action that is taken, for example, updating the - display, is client-specific. All clients though should respond to EMsvCloseSession - and EMsvServerTerminated events. - - @param aEvent Indicates the event type. - @param aArg1 Event type-specific argument value - @param aArg2 Event type-specific argument value - @param aArg3 Event type-specific argument value */ - virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)=0; - }; - -//********************************** -// CMsvSession -//********************************** -// -// -// - -class TCapabilitySet; - -const TInt KMsvSessionObserverGranularity=4; //??? - -class CMsvSession: public CActive -/** Represents a channel of communication between a client thread (Client-side -MTM, User Interface MTM, or message client application) and the Message Server -thread. - -The class provides the means by which clients are notified when important -Message Server events occur. - -Note the following significant groups of functions: - -Creation functions: a message client application must use OpenSyncL() or OpenASyncL() -to create a session object, before it can instantiate any MTM or CMsvEntry -object. Only a single session should be created within a thread. As Client-side -MTM, User Interface MTM, and CMsvEntry objects are created in the client thread, -these use the client session, and do not create their own. Note that to close -a session, delete all objects relying on that session, and then the session -object itself. - -Cleanup functions: CMsvSession provides the ability to handle the cleanup -of entries in the event of a leave occurring, in a very similar manner to -the standard cleanup stack. The difference is that, on a leave, any entries -that are on the entry cleanup stack are removed from the Message Server. The -implementation uses the standard cleanup stack, so entry push and pop functions -should be used in the same order as all other types of push and pop. The functions -can be used both by MTM implementations and message client applications. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver); - IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver); - IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver); - - IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver, RFs& aFs); - IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver, RFs& aFs); - IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver, RFs& aFs); - - IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver, TInt aPriority); - IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver, TInt aPriority); - IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver, TInt aPriority); - - IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); - IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); - IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); - - ~CMsvSession(); - // --- Observer functions --- - IMPORT_C void AddObserverL(MMsvSessionObserver& aObserver); - IMPORT_C void RemoveObserver(MMsvSessionObserver& aObserver); - IMPORT_C TInt SetReceiveEntryEvents(TBool aReceive); - // --- Utility functions --- - IMPORT_C CMsvEntry* GetEntryL(TMsvId aEntId); - IMPORT_C TInt GetEntry(TMsvId aId, TMsvId& aService, TMsvEntry& aEntry); - - IMPORT_C CMsvOperation* TransferCommandL(const CMsvEntrySelection& aSelection, TInt aCommandId, const TDesC8& aParameter, TRequestStatus& aStatus); - IMPORT_C void TransferCommandL(const CMsvEntrySelection& aSelection, TInt aCommandId, const TDesC8& aParameter, TDes8& aProgress); - IMPORT_C void IncPcSyncCountL(const CMsvEntrySelection& aSelection); - IMPORT_C void DecPcSyncCountL(const CMsvEntrySelection& aSelection); - IMPORT_C void GetChildIdsL(TMsvId aId, const CMsvEntryFilter& aFilter, CMsvEntrySelection& aSelection); - IMPORT_C void ChangeAttributesL(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes); - IMPORT_C CMsvOperation* ChangeDriveL(TInt aDrive, TRequestStatus& aStatus); - IMPORT_C TInt OutstandingOperationsL(); - IMPORT_C CMsvOperation* CopyStoreL(const TDriveUnit& aDrive, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* DeleteStoreL(const TDriveUnit& aDrive, TRequestStatus& aStatus); - // --- cleanup functions - IMPORT_C static void CleanupEntry(TAny* aPtr); - IMPORT_C void CleanupEntryPushL(TMsvId aId); - IMPORT_C void CleanupEntryPop(TInt aCount=1); - - IMPORT_C void RemoveEntry(TMsvId aId); - /// MTM functions - IMPORT_C TInt InstallMtmGroup(const TDesC& aFullName); - IMPORT_C TInt DeInstallMtmGroup(const TDesC& aFullName); - - IMPORT_C TInt StopService(TMsvId aServiceId); - IMPORT_C TBool ServiceActive(TMsvId aServiceId); - IMPORT_C TInt ServiceProgress(TMsvId aServiceId, TDes8& aProgress); - - IMPORT_C void CloseMessageServer(); - IMPORT_C RFs& FileSession(); - - IMPORT_C void GetMtmRequiredCapabilitiesL(TUid aMtmTypeUid, TCapabilitySet& aCapSet) const; - MMsvStoreManager& StoreManager(); - - IMPORT_C TBool GetAndClearIndexCorruptFlagL(); - IMPORT_C TDriveUnit CurrentDriveL(); - IMPORT_C TBool DriveContainsStoreL(TDriveUnit aDrive); - IMPORT_C TBool MessageStoreDrivePresentL(); - - IMPORT_C TInt ServiceAccessPointId(TMsvId aServiceId, TUint32& aAccessPointId); - -protected: - CMsvSession(MMsvSessionObserver& aObserver); - CMsvSession(MMsvSessionObserver& aObserver, RFs& aFs); - CMsvSession(MMsvSessionObserver& aObserver, TInt aPriority); - CMsvSession(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); - - void ConstructL(TBool aSyncOpening); - void ConstructAsObserverL(); - // - IMPORT_C TInt OperationId(); - IMPORT_C RMsvServerSession& Session(); - - void CheckDrive(); - // - // from CActive - void RunL(); - void DoCancel(); - TInt RunError(TInt aError); - // -private: - void NotifyAllObserversL(MMsvSessionObserver::TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - void CleanupEntryDelete(); - void DoRunL(TMsvNotifBuffer& aBuffer); - void HandleNotifyL(); - void DoHandleNotifyL(TMsvNotifBuffer& aBuffer); - void GetMessageFolderL(); - // -private: - TInt iOperationId; - RFs iFs; - RMsvServerSession iSession; - TMsvNotifBuffer iChange; - MMsvSessionObserver& iMainObserver; - CArrayPtrFlat* iObservers; - CMsvEntrySelection* iCleanupList; - TInt iSyncStart; - HBufC* iMessageFolder; - TDriveNumber iDrive; - CMsvEntrySelection* iNotifSelection; - TPckgBuf iSequenceBuf; - TUint32 iNotifySequence; - TBool iReceiveEntryEvents; - /** Specifies whether to use the shared file server session */ - TBool iUseSharedFs; - // -#ifndef _NO_SESSION_LOGGING_ - void CreateSessionLogL(); - void Log(TRefByValue aFmt, ...); - - // must be the last data member in the class to preserve BC. - mutable RFileLogger iLog; -#endif - // -friend class CSendAs; -friend class CMsvEntry; -friend class CMsvOperation; -friend class CMsvEntryOperation; -friend class CObserverRegistry; - // - }; - - - - -//********************************** -// MMsvEntryObserver -//********************************** -// -// -// - -class MMsvEntryObserver -/** Provides the interface for notification of events associated with an entry. - -The types of event are given in the enumeration TMsvEntryEvent. Clients can -provide an object that implements the interface, and set it to be notified -through CMsvEntry::AddObserverL(). -@publishedAll -@released -*/ - { -public: - /** Defines entry event types. -@publishedAll -@released -*/ - enum TMsvEntryEvent - { - /** The entry has been changed, either as a result of a CMsvEntry::ChangeL() or - by another client. */ - EMsvEntryChanged, - /** New children have been created. aArg1 points to a CMsvEntrySelection contain - the ID of the new children. */ - EMsvNewChildren, - /** Children have been deleted. aArg1 points to a CMsvEntrySelection contain the - ID of the deleted children. */ - EMsvDeletedChildren, - /** One or more of the children have been changed. aArg1 points to a CMsvEntrySelection - containing the IDs of the changed children. */ - EMsvChildrenChanged, - /** The entry has been deleted by another client. The context is now invalid. */ - EMsvEntryDeleted, - /** The context has become invalid. The entry has been changed, but the CMsvEntry - was unable to update the context. The context will only become valid by a - successful CMsvEntry::SetEntryL() call. aArg1 points to a TInt containing - the error code for the invalid context. */ - EMsvContextInvalid, - /** Some new children have been created, but CMsvEntry was unable to retrieve the - data from the Message Server. The children will be correct only after a successful - call to CMsvEntry::SetEntryL(). */ - EMsvChildrenMissing, - /** An error has occurred such that the status of the children is unknown and probably - invalid. aArg1 points to a TInt containing the error code for the invalid - context */ - EMsvChildrenInvalid, - /** The current entry has been moved by another client. The CMsvEntry has already - been updated to reflect the new parent. */ - EMsvEntryMoved}; -public: - /** Indicates when called by a CMsvEntry object that an event has occurred. - - The type of event is indicated by the value of aEvent. The interpretation of the aArg1-3 values depends on this type. - For most event types, the action that is taken, for example, updating the display, is client-specific. Most clients will - need to handle events that make the current context invalid: EMsvContextInvalid and EMsvEntryDeleted. - - An implementation can leave if an error occurs. The leave is not trapped by the framework, so - the error code may be displayed to the user. - - @param aEvent Indicates the event type. - @param aArg1 Event-specific argument value - @param aArg2 Event-specific argument value - @param aArg3 Event-specific argument value - */ - virtual void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)=0; - }; - - - -//********************************** -// CMsvEntry -//********************************** -// -// -// - -class CMsvEntry: public CBase, public MMsvSessionObserver, public MMsvStoreObserver -/** Accesses and acts upon a particular Message Server entry. The current entry -that a CMsvEntry object relates is referred to as its context. - -It may be helpful to consider CMsvEntry functions in two broad groups. The -first provides means to access the various types of storage associated with -an entry. The second provides a means to discover and access other entries -that the entry owns (its children). - -Message client applications, Client-side MTMs, and User Interface MTMs all -commonly use CMsvEntry objects. CMsvEntry objects though represent a lower -level of access to an entry than that provided by a Client-side MTM or User -Interface MTM. In particular, any MTM-specific functionality, such as address -lists or subject fields, must be accessed by a message client application -through an MTM inteface. - -A CMsvEntry object is relatively expensive in RAM usage, as it caches its -children, updating them as necessary when notified of changes. They should -therefore be created sparingly. - -Note that Server-side MTMs do not use this class, but a similar one, CMsvServerEntry. - -@publishedAll -@released -*/ - { -public: // Public member functions - IMPORT_C static CMsvEntry* NewL(CMsvSession& aMsvSession, TMsvId aMsvId, const TMsvSelectionOrdering& aOrdering); - IMPORT_C ~CMsvEntry(); - // - // --- Observer functions --- - IMPORT_C void AddObserverL(MMsvEntryObserver& aObserver); - IMPORT_C void RemoveObserver(MMsvEntryObserver& aObserver); - // - // --- Accessor for associated session --- - inline CMsvSession& Session(); - // - // --- Accessors the associated message store --- - IMPORT_C CMsvStore* ReadStoreL(); - IMPORT_C CMsvStore* EditStoreL(); - // - // --- Synchronous Current Entry functions --- - inline TMsvId EntryId() const; - inline const TMsvEntry& Entry() const; - inline const TMsvSelectionOrdering& SortType() const; - inline TMsvId OwningService() const; - IMPORT_C void SetSortTypeL(const TMsvSelectionOrdering& aOrdering); - IMPORT_C void SetMtmListL(const CArrayFix& aMtmList); - IMPORT_C void SetEntryL(TMsvId aId); - IMPORT_C void ChangeL(const TMsvEntry& aEntry); - IMPORT_C void ChangeL(const TMsvEntry& aEntry, TSecureId aOwnerId); - - - // - // --- Asynchronous Current Entry functions --- - IMPORT_C CMsvOperation* ChangeL(const TMsvEntry& aEntry, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* ChangeL(const TMsvEntry& aEntry, TSecureId aOwnerId, TRequestStatus& aStatus); - // - // --- Asynchronous Child Entry functions --- - IMPORT_C CMsvOperation* CreateL(const TMsvEntry& aEntry, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* CreateL(const TMsvEntry& aEntry, TSecureId aOwnerId, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* DeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* DeleteL(TMsvId aMsvId, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* CopyL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* CopyL(TMsvId aMsvId, TMsvId aTargetId, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* MoveL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus); - IMPORT_C CMsvOperation* MoveL(TMsvId aMsvId, TMsvId aTargetId, TRequestStatus& aStatus); - // - // --- Synchronous Child Entry functions --- - IMPORT_C CMsvEntrySelection* ChildrenL() const; - IMPORT_C CMsvEntrySelection* ChildrenWithServiceL(TMsvId aServiceId) const; - IMPORT_C CMsvEntrySelection* ChildrenWithMtmL(TUid aMtm) const; - IMPORT_C CMsvEntrySelection* ChildrenWithTypeL(TUid aType) const; - inline TInt Count() const; - IMPORT_C const TMsvEntry& ChildDataL(TMsvId aId) const; - IMPORT_C const TMsvEntry& operator[](TInt aIndex) const; - IMPORT_C CMsvEntry* ChildEntryL(TMsvId aId) const; - IMPORT_C void MoveL(TMsvId aMsvId, TMsvId aTargetId); - IMPORT_C void MoveL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TMsvLocalOperationProgress& aProgress); - IMPORT_C void CopyL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TMsvLocalOperationProgress& aProgress); - IMPORT_C void CopyL(TMsvId aMsvId, TMsvId aTargetId); - - - IMPORT_C void CreateL(TMsvEntry& aEntry); - IMPORT_C void CreateL(TMsvEntry& aEntry, TSecureId aOwnerId); - IMPORT_C void DeleteL(TMsvId aId); - IMPORT_C void DeleteL(const CMsvEntrySelection& aSelection, TMsvLocalOperationProgress& aProgress); - IMPORT_C void ChangeAttributesL(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes); - // - // from MMsvSessionObserver - void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - // From MMsvStoreObserver - void HandleStoreEvent(TMsvStoreEvent aEvent, TMsvId aId); - - - IMPORT_C TBool HasStoreL() const; - // - /** @internalTechnology */ - IMPORT_C void SetEntryNoCheckL(TMsvId aId); - // -private: // Private members - CMsvEntry(CMsvSession& aMsvSession, const TMsvSelectionOrdering& aOrdering); - void ConstructL(TMsvId aMsvId); - // - void NotifyAllObserversL(MMsvEntryObserver::TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - void ContextChangedL(MMsvEntryObserver::TMsvEntryEvent aEvent); - void NewChildrenL(const CMsvEntrySelection& aSelection); - CMsvEntrySelection* DoGetNewChildrenL(const CMsvEntrySelection& aSelection); - void DeletedChildrenL(const CMsvEntrySelection& aSelection); - void ChildrenChangedL(const CMsvEntrySelection& aSelection); - void CheckNewGrandchildrenL(TMsvId aId); - void CheckDeletedGrandchildrenL(TMsvId aId); - void NotifyChildChangedL(TMsvId aId); - CMsvEntrySelection* DoMakeSelectionL(TMsvId aId); - void CheckIfContextMovedL(const CMsvEntrySelection& aSelection); - // - TBool IsAChild(TMsvId aId) const; - TBool AreChildren(const CMsvEntrySelection& aSelection) const; - // - CMsvOperation* DoDeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); - CMsvClientEntry* DoGetEntryLC(TMsvId aId, TMsvId& aOwningService); - void DoGetChildrenL(); - CMsvEntryArray* GetNewSortedListL(const TMsvSelectionOrdering& aOrdering, const CArrayFix& aMtmList); - void DoSortTypeL(CMsvClientEntry* aContext); - void ReplaceChildL(TInt pos, const TMsvEntry& aEntry); - void DeleteChild(TInt aPosition); - void HandleMediaChangeL(); - - TInt MoveOneL(TMsvId aMsvId, TMsvId aTargetId); - TInt CopyOneL(TMsvId aMsvId, TMsvId aTargetId); - TInt DeleteOneL(TMsvId aMsvId); - // -private: - enum TEntryState { EValid, - EInvalidChangingContext, - EInvalidDeletedContext, - EInvalidOldContext, - EInvalidMissingChildren}; - // -#ifndef _NO_SESSION_LOGGING_ - void Log(TRefByValue aFmt, ...); -#endif - // -private: - TBool iOberserverAdded; - TEntryState iState; - CMsvSession& iMsvSession; - TMsvSelectionOrdering iOrdering; - const TMsvEntry* iEntryPtr; - CArrayPtrFlat* iObservers; - CArrayPtrFlat* iEntries; - CMsvEntryArray* iSortedChildren; - CMsvStore* iStore; - CArrayFixFlat* iMtmList; - TMsvId iOwningService; - TUint32 iNotifySequence; - }; - -//********************************** -// MessageServer -//********************************** -// -// -// - -class MessageServer -/** Provides various static information functions relating to the Message Server. - -@see TDriveNumber -@publishedAll -@released -*/ - { -public: - IMPORT_C static TVersion Version(); - IMPORT_C static TMsvId NullUidValue(); - // - IMPORT_C static TBool DriveContainsStore(RFs& aFs, TInt aDrive); - IMPORT_C static TInt CurrentDriveL(RFs& aFs); - IMPORT_C static TBool IsMessageStoreDrivePresentL(RFs& aFs); - }; - -//********************************** -// MtmClientUtils -//********************************** -// -// -// - -class McliUtils -/** Utility class to simplify getting progress information from a messaging operation object. - -The functions get and unpack the progress information buffers from an operation object. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static TMsvLocalOperationProgress GetLocalProgressL(CMsvOperation& aOperation); - IMPORT_C static TMsvLocalOperationProgress GetFinalLocalProgress(CMsvOperation& aOperation); - IMPORT_C static TInt GetProgressErrorL(CMsvOperation& aOperation); - IMPORT_C static TMsvId GetProgressIdL(CMsvOperation& aOperation); - }; - -#include - -#endif // __MSVAPI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msventry.h --- a/epoc32/include/msventry.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,182 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVENTRY_H__ -#define __MSVENTRY_H__ - - - -#if !defined(__E32BASE_H__) -#include -#endif - -#if !defined(__MSVSTORE_H__) -#include -#endif - -////////////////////////////////////// -// Forward declarations -class CMsvStore; -class CMsvCopyMoveEntriesBase; -class CMsvServer; - -//********************************** -// CMsvServerEntry -//********************************** -// -// -// - -class CMsvServerEntry : public CActive, public MMsvStoreObserver -/** Accesses and acts upon a particular Message Server entry. - -It provides similar -functionality to that which CMsvEntry gives to client-side programs. The current -entry that a CMsvServerEntry object relates is similarly referred to as its -context. - -A difference to note is that CMsvEntry functions, when used on a remote context, -can result in requests to Server-side MTMs to change data on a remote server, -as well as the local Message Server index. Naturally, as CMsvServerEntry is -designed to be used by Server-side MTMs themselves, its comparable functions -only alter the Message Server index. - -A CBaseServerMTM-derived object gets an initial CMsvServerEntry on construction. -It can get further CMsvServerEntry objects by calling NewEntryL(). The context -can be changed by SetEntry(). - -The context is locked, preventing it being accessed by other MTMs. The lock -is released when the object is deleted, or the context changes. - -As with CMsvEntry, CBaseServerMTM functions can be divided into two broad -groups. The first provides means to access the various types of storage associated -with an entry. The second provides a means to discover and access other entries -that the entry owns (its children). -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvServerEntry* NewL(CMsvServer& aServer, TMsvId aId); - ~CMsvServerEntry(); - // - // Set and get the current context - IMPORT_C TInt SetEntry(TMsvId aId); - inline const TMsvEntry& Entry() const; - IMPORT_C TMsvId OwningService() const; - // - // current entry only functions - IMPORT_C TInt ChangeEntry(const TMsvEntry& aEntry, TSecureId aOwnerId); - IMPORT_C TInt ChangeEntry(const TMsvEntry& aEntry); - - - // - // child entry only functions - IMPORT_C TInt CreateEntry(TMsvEntry& aEntry); - IMPORT_C TInt CreateEntry(TMsvEntry& aEntry, TSecureId aOwnerId); - IMPORT_C TInt CreateEntry(TMsvEntry& aEntry, TSecureId aOwnerId, TBool aBulk); - IMPORT_C TInt DeleteEntry(TMsvId aId); - IMPORT_C TInt DeleteEntries(CMsvEntrySelection& aSelection); - IMPORT_C TInt MoveEntryWithinService(TMsvId aId, TMsvId aDestination); - IMPORT_C TInt MoveEntriesWithinService(CMsvEntrySelection& aSelection, TMsvId aDestination); - IMPORT_C TInt ChangeAttributes(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes); - IMPORT_C void MoveEntryL(TMsvId aId, TMsvId aDestination, TRequestStatus& aObserverStatus); - IMPORT_C void MoveEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, TRequestStatus& aObserverStatus); - IMPORT_C void CopyEntryL(TMsvId aId, TMsvId aDestination, TRequestStatus& aObserverStatus); - IMPORT_C void CopyEntryL(TMsvId aId, TMsvId aDestination, TMsvId& aCompletedEntry, TRequestStatus& aObserverStatus); - IMPORT_C void CopyEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, TRequestStatus& aObserverStatus); - IMPORT_C void CopyEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, CMsvEntrySelection& aCompletedSelection, TRequestStatus& aObserverStatus); - IMPORT_C TInt GetEntryFromId(TMsvId aId,TMsvEntry*& aEntry); - // - // read and write the store associated with the context - IMPORT_C CMsvStore* ReadStoreL(); - IMPORT_C CMsvStore* EditStoreL(); - // - // List the children of the context - inline const TMsvSelectionOrdering& Sort(); - inline void SetSort(TMsvSelectionOrdering& aOrdering); - inline void SetMtm(TUid aMtm); - IMPORT_C TInt GetChildren(CMsvEntrySelection& aSelection); - // - IMPORT_C TInt GetChildrenWithService(TMsvId aServiceId, CMsvEntrySelection& aSelection); - IMPORT_C TInt GetChildrenWithMtm(TUid aMtm, CMsvEntrySelection& aSelection); - IMPORT_C TInt GetChildrenWithType(TUid aType, CMsvEntrySelection& aSelection); - // - // Spawns a new CMsvServerEntry object - IMPORT_C CMsvServerEntry* NewEntryL(TMsvId aId); - // - // from MMsvStoreObserver - void HandleStoreEvent(MMsvStoreObserver::TMsvStoreEvent aEvent, TMsvId aId); - // - // - - IMPORT_C TBool HasStoreL() const; - // - IMPORT_C RFs& FileSession(); - // - // Methods for creating and changing entries in bulk - // (e.g. during email header downloading) - IMPORT_C TInt CreateEntryBulk(TMsvEntry& aEntry, TSecureId aOwnerId); - - IMPORT_C TInt CreateEntryBulk(TMsvEntry& aEntry); - - IMPORT_C TInt ChangeEntryBulk(const TMsvEntry& aEntry, TSecureId aOwnerId); - IMPORT_C TInt ChangeEntryBulk(const TMsvEntry& aEntry); - - IMPORT_C void CompleteBulk(); - -protected: - CMsvServerEntry(CMsvServer& aIndex); - void ConstructL(TMsvId aId); - // - void RunL(); - void DoCancel(); - // -private: - TInt IncreaseBufferSizes(TInt aNewDescriptionSize, TInt aNewDetailsSize); - TBool AreChildren(const CMsvEntrySelection& aSelection) const; - TBool IsAChild(TMsvId aId) const; - void DoMoveEntryL(TMsvId aId, TMsvId aDestination); - void DoDeleteEntryL(TMsvId aId, CMsvEntrySelection*& aDeleted, CMsvEntrySelection*& aMoved); - void DoDeleteEntriesL(CMsvEntrySelection& aSelection, CMsvEntrySelection*& aDeleted, CMsvEntrySelection*& aMoved); - void DoMoveEntriesL(CMsvEntrySelection& aSelection, TMsvId aDestination, CMsvEntrySelection*& aMoved); - TInt DoGetChildren(TMsvId aServiceId, TUid aMtm, TUid aType, CMsvEntrySelection& aSelection); - void DoGetChildrenL(TMsvId aServiceId, TUid aMtm, TUid aType, CMsvEntrySelection& aSelection); - void DoCopyEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, TRequestStatus& aObserverStatus); - TInt DoChangeEntry(const TMsvEntry& aEntry, TSecureId aOwnerId, TBool aForcedUpdate, TBool aBulk); - - // -private: - TBool iLockedStore; - TMsvSelectionOrdering iOrdering; - TMsvEntry iEntry; - HBufC* iDescription; - HBufC* iDetails; - CMsvServer& iServer; - CMsvStore* iStore; - TUid iMtm; - CMsvCopyMoveEntriesBase* iCopyMove; - TMsvId iSource; - enum { EMsvIdle, EMsvMoving, EMsvCopying } iEntryState; - TRequestStatus* iObserverStatus; - CMsvEntrySelection* iCompletedSelection; - TMsvId* iCompletedEntryId; - TSecureId iContextOwnerId; - }; - - -#include - -#endif // __MSVENTRY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msventryscheduledata.h --- a/epoc32/include/msventryscheduledata.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -/// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -/// All rights reserved. -/// This component and the accompanying materials are made available -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -/// which accompanies this distribution, and is available -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -/// -/// Initial Contributors: -/// Nokia Corporation - initial contribution. -/// -/// Contributors: -/// -/// Description: -/// All rights reserved. -/// This component and the accompanying materials are made available -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -/// which accompanies this distribution, and is available -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -/// Initial Contributors: -/// Nokia Corporation - initial contribution. -/// Contributors: -/// - -#ifndef MSV_ENTRY_SCHEDULE_DATA_H_ -#define MSV_ENTRY_SCHEDULE_DATA_H_ - -///////////////////////////////////////////////////////////////////////////// -// -// Includes -// -///////////////////////////////////////////////////////////////////////////// - -#include -#include -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// -// Constants -// -///////////////////////////////////////////////////////////////////////////// - -const TUid KUidMsvFileScheduleData = {0x100056A2}; //Used by TMsvEntryScheduleData -const TInt16 KMsvEntryScheduleDataVersion = 1; - -///////////////////////////////////////////////////////////////////////////// -// -// TMsvEntryScheduleData Declaration -// -///////////////////////////////////////////////////////////////////////////// - -/** -Stores message-specific data related to scheduling. - -The data is not required by the Client/UI side. This data is stored in a -stream associated with the TMsvEntry. - -@publishedAll -@released -*/ - -class TMsvEntryScheduleData - { -public: - IMPORT_C TMsvEntryScheduleData(); - - IMPORT_C void RestoreL(CMsvStore& aStore); - IMPORT_C void StoreL(CMsvStore& aStore) const; - IMPORT_C void RemoveL(CMsvStore& aStore) const; - - IMPORT_C void Reset(); - IMPORT_C TBool IsReset() const; - - IMPORT_C TInt Retries() const; - IMPORT_C void IncreaseRetries(); - IMPORT_C void ResetRetries(); - - /** - The Task ID returned by the Task Scheduler when the message is - scheduled. - */ - TInt iTaskId; - - /** - The TSchedulerItemRef returned by the Task Scheduler when the schedule - on which the message is scheduled is created. - */ - TSchedulerItemRef iRef; - -protected: - /** The number of retries that have been made to send this message. */ - TInt iRetryCount; - /** Structure version. */ - TInt16 iVersion; - - void ExternalizeL(RWriteStream& aWriteStream) const; - void InternalizeL(RReadStream& aReadStream); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvfind.h --- a/epoc32/include/msvfind.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MSVFIND_H__) -#define __MSVFIND_H__ - -#if !defined(__MSVAPI_H__) -#include -#endif - -#if !defined __MTCLBASE_H__ -#include -#endif - -#if !defined(__MTMDEF_H__) -#include -#endif - -//********************************** -// TMsvFindResult -//********************************** -// -// Contains the result of a find operation for a particular entry -// - -class TMsvFindResult -/** A single result from a text search operation. The class encapsulates information -which: - -1. identifies the message in which the search text is found - -2. identifies the parts of the message that contain the search text. -@publishedAll -@released -*/ - { -public: - IMPORT_C TMsvFindResult(); - IMPORT_C TMsvFindResult(TMsvPartList aPartList, TMsvId aId); - // -public: - /** The parts of the message that contain the search text. */ - TMsvPartList iPartList; - /** The entry Id of the message that contains the search text. */ - TMsvId iId; - }; - -//********************************** -// CMsvFindResultSelection -//********************************** -// -// A list of find operation results with an accessor to find -// the position for a particular entry -// - -class CMsvFindResultSelection : public CArrayFixFlat -/** Collection of results from a text search operation. The collection is organized -as an array. -@publishedAll -@released -*/ - { -public: - IMPORT_C CMsvFindResultSelection(); - // -public: - IMPORT_C CMsvFindResultSelection* CopyL() const; - IMPORT_C CMsvFindResultSelection* CopyLC() const; - IMPORT_C TInt Find(TMsvId aId) const; - }; - -//********************************** -// TMsvFindOperationProgress -//********************************** -// -// Find operation progress -// - -class TMsvFindOperationProgress -/** Encapsulates progress information for a text search operation. The class has -public data members. -@publishedAll -@released -*/ - { -public: - IMPORT_C TMsvFindOperationProgress(); - // -public: - /** KErrNone if the search operation completed successfully otherwise one of the - system-wide error codes. - - This has no meaning while the search operation is in progress. */ - TInt iError; - /** The number of messages already searched. */ - TInt iCompleted; - /** The number of messages remaining to be searched. - - If the search operation is for text within a specified root, folder or service, - then this value is zero until the total number of messages has been determined. */ - TInt iRemaining; - /** The entry Id identifying the message currently being searched */ - TMsvId iCurrentId; - }; - -class CClientMtmRegistry; -class CMsvChildMessages; - -//********************************** -// CMsvFindOperation -//********************************** -// -// The find operation. Created by calling the relevant static function -// The results for all of these are added to the CMsvFindResultSelection which -// can be accessed via the accessor function GetFindResult -// - -class CMsvFindOperation : public CMsvOperation -/** Encapsulates a text search operation. - -The class offers an interface for locating messages which contain specified -text. Messages may contain data created for, or received from, any of the -transport protocols that are supported by the Messaging Architecture (e.g. -Email, FAX and SMS). - -Clients create a new instance for each search operation to be performed. They -are also responsible for destroying the instance once a search operation is -complete. - -Clients can derive from this class, typically to implement their own version -of the function IsValid(). -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvFindOperation* FindInChildrenL(CMsvSession& aSession, const TDesC& aTextToFind, TMsvId aParentId, TMsvPartList aPartList, TRequestStatus& aObserverRequestStatus); - IMPORT_C static CMsvFindOperation* FindInSelectionL(CMsvSession& aSession, const TDesC& aTextToFind, const CMsvEntrySelection& aSelection, TMsvPartList aPartList, TRequestStatus& aObserverRequestStatus); - IMPORT_C ~CMsvFindOperation(); - // - IMPORT_C const TDesC8& ProgressL(); - IMPORT_C const TDesC8& FinalProgress(); - // - inline const CMsvFindResultSelection& GetFindResult() const; - // -protected: - IMPORT_C CMsvFindOperation(CMsvSession& aSession, const TDesC& aTextToFind, TMsvPartList aPartList, TRequestStatus& aObserverRequestStatus); - IMPORT_C void ConstructFindInChildrenL(TMsvId aId); - IMPORT_C void ConstructFindInSelectionL(const CMsvEntrySelection& aSelection); - // -private: - void ConstructL(); - // - IMPORT_C void DoCancel(); - IMPORT_C void RunL(); - // - void DoRunL(); - void FindL(); - void Complete(TInt aStatus); - void StartL(); - // - virtual TBool IsValid(const TMsvEntry& aEntry) const; - // -private: - enum { EMsvFindingText, EMsvExpandingFolders } iState; - TBuf iTextToFind; - TMsvPartList iPartList; - CMsvFindResultSelection* iFindResultSel; - TPckgBuf iProgress; - CMsvEntrySelection* iSelection; - CClientMtmRegistry* iClientRegistry; - CArrayPtrFlat* iMtmArray; - CMsvChildMessages* iChildMessages; - TMsvId iCurrentId; - TMsvEntry iEntry; - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvftext.h --- a/epoc32/include/msvftext.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVFTEXT_H__ -#define __MSVFTEXT_H__ - -#include - -#include -#include -#include - -class CRichText; - -class CMsvFindText : public CMsgActive -/** A utility class which searches through given plain text or rich text for a -specified text string. - -The class is an active object and searching can be done synchronously or asynchronously. -An instance of this class can be re-used to perform multiple searches for -text. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMsvFindText* NewLC(TInt aPriority = EPriorityStandard); - IMPORT_C static CMsvFindText* NewL(TInt aPriority = EPriorityStandard); - IMPORT_C ~CMsvFindText(); - // - IMPORT_C void FindTextL(const TDesC& aFind, const TDesC& aSource, TMsvPartList aFlags, TRequestStatus& aStatus); - IMPORT_C void FindRichTextL(const TDesC& aFind, const CRichText& aSource, TMsvPartList aFlags, TRequestStatus& aStatus); - // - IMPORT_C TBool FindTextL(const TDesC& aFind, const TDesC& aSource, TMsvPartList aFlags); - IMPORT_C TBool FindRichTextL(const TDesC& aFind, const CRichText& aSource, TMsvPartList aFlags); - // - inline TBool FoundText() const; - // -private: - CMsvFindText(TInt aPriority); - // - void InitialiseL(const TDesC& aFind, const TDesC* aPlainSource, const CRichText* aRichSource, TMsvPartList aFlags); - void DoFindAsyncL(TRequestStatus& aStatus); - void DoComplete(TInt&); - TBool DoFindSyncL(); - TBool DoFindStepL(); - TBool DoFindTextL(); - void DoRunL(); - void Check(); - // -private: - HBufC* iBuf; - HBufC* iFind; - TInt iSourcePos; - TInt iMaxRead; - TInt iSourceLen; - const CRichText* iRichText; - const TDesC* iPlainText; - TMsvPartList iFlags; - TChar iPreChar; - TChar iPostChar; - TBool iFoundText; - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvids.h --- a/epoc32/include/msvids.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#if !defined(__MSVIDS_H__) -#define __MSVIDS_H__ -#if !defined(__MSVSTD_HRH__) -#include -#endif -#if !defined(__MSVSTD_H__) -#include -#endif - -// Predefined entry ids - values #defined in MSVSTD.HRH - -/** -A NULL ID. -This is typically used to indicate that the ID has not yet been set. It can -also be used to "park" a CMsvServerEntry so that it doesn't lock an index -entry. -@publishedAll -@released -@see TMsvId -@see KMsvNullIndexEntryIdValue -*/ -const TMsvId KMsvNullIndexEntryId=KMsvNullIndexEntryIdValue;//0 - -/** -Temporary ID used for testing purpose -@internalAll -@released -@see TMsvId -@see KMsvTempIndexEntryIdValue -*/ -const TMsvId KMsvTempIndexEntryId=KMsvTempIndexEntryIdValue;//1 - -/** -ID of root entry of entire index -@publishedAll -@released -@see TMsvId -@see KMsvRootIndexEntryIdValue -*/ -const TMsvId KMsvRootIndexEntryId=KMsvRootIndexEntryIdValue;//0x1000 - -/** -ID of local service (containing the standard folders) -@publishedAll -@released -@see TMsvId -@see KMsvLocalServiceIndexEntryIdValue -*/ -const TMsvId KMsvLocalServiceIndexEntryId=KMsvLocalServiceIndexEntryIdValue;//0x1001 - -/** -ID of Inbox folder -@publishedAll -@released -@see TMsvId -@see KMsvGlobalInBoxIndexEntryIdValue -*/ -const TMsvId KMsvGlobalInBoxIndexEntryId=KMsvGlobalInBoxIndexEntryIdValue;//0x1002 - -/** -ID of Outbox folder -@publishedAll -@released -@see TMsvId -@see KMsvGlobalOutBoxIndexEntryIdValue -*/ -const TMsvId KMsvGlobalOutBoxIndexEntryId=KMsvGlobalOutBoxIndexEntryIdValue;//0x1003 - -/** -ID of Draft folder -@publishedAll -@released -@see TMsvId -@see KMsvDraftEntryIdValue -*/ -const TMsvId KMsvDraftEntryId=KMsvDraftEntryIdValue; //0x1004 - -/** -ID of Sent folder -@publishedAll -@released -@see TMsvId -@see KMsvSentEntryIdValue -*/ -const TMsvId KMsvSentEntryId=KMsvSentEntryIdValue; //0x1005 - -/** -ID of Deleted folder - Invisible folder -@publishedAll -@released -@see TMsvId -@see KMsvDeletedEntryFolderEntryIdValue -*/ -const TMsvId KMsvDeletedEntryFolderEntryId=KMsvDeletedEntryFolderEntryIdValue;//0x1006 - -/** -ID used to indicate Unknown/Invalid Service entry folder -@publishedAll -@released -@see TMsvId -@see KMsvUnkownServiceIndexEntryIdValue -*/ -const TMsvId KMsvUnknownServiceIndexEntryId=KMsvUnkownServiceIndexEntryIdValue; //0x1007 - -/** -@internalAll -@released -@see TMsvId -*/ -const TMsvId KFirstFreeEntryId=0x100000; - -/** -Uid for POPService -@publishedAll -@released -*/ -const TUid KUidPOPService = {0x2000BB68}; - -/** -Uid for IMAPService -@publishedAll -@released -*/ -const TUid KUidIMAPService = {0x2000BB69}; - -/** -Uid for SMTPService -@publishedAll -@released -*/ -const TUid KUidSMTPService = {0x2000BB6A}; - -/** -Uid for SendAs2Service -@publishedAll -@released -*/ -const TUid KUidSendAs2Service = {0x2000BB6B}; - -/** -Uid for SMSService -@publishedAll -@released -*/ -const TUid KUidSMSService = {0x2000BB6C}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvoffpeaktime.h --- a/epoc32/include/msvoffpeaktime.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVOFFPEAKTIME_H__ -#define __MSVOFFPEAKTIME_H__ - - - - -///////////////////////////////////////////////////////////////////////////// -// -// Constants -// -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// -// TMsvOffPeakTime Declaration -// -///////////////////////////////////////////////////////////////////////////// - -/** -Defines an off-peak period for message sending. - -An off-peak period is specified as a start time and a duration. - -@publishedAll -@released -*/ - -class TMsvOffPeakTime - { -public: - IMPORT_C TMsvOffPeakTime(); - IMPORT_C TMsvOffPeakTime(const TDay aDay, const TInt aHour, const TInt aMinute, const TTimeIntervalMinutes aValidityPeriod); - - - IMPORT_C void Reset(); - - IMPORT_C TDay Day() const; - IMPORT_C void SetDay(const TDay aDay); - - IMPORT_C TInt Hour() const; - IMPORT_C void SetHour(const TInt aHour); - - IMPORT_C TInt Minute() const; - IMPORT_C void SetMinute(const TInt aMinute); - - IMPORT_C const TTimeIntervalMinutes ValidityPeriod() const; - IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes aValidityPeriod); - - IMPORT_C const TTime NextTimeInclusive(const TTime& aFromTime) const; - -private: - TDay iDay; - TInt8 iHour; //Start hour - TInt8 iMinute; //Start minute - TTimeIntervalMinutes iValidityPeriod; //Validity period. Must be less than 24 hours - }; - -///////////////////////////////////////////////////////////////////////////// -// -// CMsvOffPeakTimes Declaration -// -///////////////////////////////////////////////////////////////////////////// - -/** -Array of off-peak time data. - -This represents all the off-peak time periods in each week. - -@publishedAll -@released -*/ - -class CMsvOffPeakTimes : public CArrayFixFlat - { -public: - IMPORT_C CMsvOffPeakTimes(); - - - IMPORT_C TInt GetNextOffPeakTime(const TTime& aFromTime, TMsvOffPeakTime& aNext, TTime& aNextTime) const; - -protected: - - -private: - }; - -#endif // __MSVOFFPEAKTIME_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvrcpt.h --- a/epoc32/include/msvrcpt.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MSVRCPT_H__) -#define __MSVRCPT_H__ - -class RWriteStream; - -//********************************** -// CMsvRecipient -//********************************** -// -// Base class for multiple recipients -// - -class CMsvRecipient : public CBase -/** Base class for information relating to a message recipient. -@publishedAll -@released -*/ - { -public: - /** Message sending status for a recipient. -@publishedAll -@released -*/ - enum TRecipientStatus - { - /** Message is not sent. */ - ENotYetSent=0, - /** Message has been sent. */ - ESentSuccessfully=1, - /** Message sending failed. */ - EFailedToSend=2}; - IMPORT_C virtual void InternalizeL(RReadStream& aStream); - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream) const; - inline TRecipientStatus Status() const; - inline void SetStatus(TRecipientStatus aStatus); - inline TInt Error() const; - inline void SetError(TInt aError); - inline const TTime& Time() const; - inline TTime& Time(); - inline TInt Retries() const; - inline void IncreaseRetries(); - inline void ResetRetries(); -protected: - IMPORT_C CMsvRecipient(); -private: - TRecipientStatus iStatus; - TInt iError; - TInt iRetries; - TTime iTime; - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvreg.h --- a/epoc32/include/msvreg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,275 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MSVREG_H__) -#define __MSVREG_H__ -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__F32FILE_H__) -#include -#endif - - - -/** -@internalComponent -@released -*/ -enum TMtsrDllIndex // Used in CMtmGroupData - { - EMtsrServerComponentIndex, - EMtsrClientComponentIndex, - EMtsrUiComponentIndex, - EMtsrUiDataComponentIndex - }; - -const TInt KHumanReadableNameLength=50; -typedef TBuf THumanReadableName; // could be used client side - -#define KMsvDefaultTimeoutMicroSeconds32 30000000 - -// forward declarations -class RWriteStream; -class RReadStream; -class RFs; - - -class CMtmDllInfo : public CBase -/** Encapsulates the registration data for a single concrete MTM component. - -It is used in the creation of registration data for an MTM group. Typically, -an application gathers a number of CMtmDllInfo objects into an CMtmDllInfoArray. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMtmDllInfo* NewL(const TDesC& aHumanReadableName,const TUidType& aUidType,const TDesC& aFilename,TInt aEntryPointOrdinalNumber,const TVersion aVersion); - IMPORT_C static CMtmDllInfo* NewL(const CMtmDllInfo& aMtmDllInfo); - IMPORT_C static CMtmDllInfo* NewL(RReadStream& aStream); - IMPORT_C ~CMtmDllInfo(); - IMPORT_C void SetHumanReadableNameL(const TDesC& aHumanReadableName); - inline TPtrC HumanReadableName() const; - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept - IMPORT_C TBool operator==(const CMtmDllInfo& aMtmDllInfo) const; - void SetMessagingCapability(TBool aCapability); - void SetSendBodyCapability(TBool aCapability); - void SetCapabilitiesAvailable(TBool aBool); - IMPORT_C TBool MessagingCapability() const; - IMPORT_C TBool SendBodyCapability() const; - IMPORT_C TBool CapabilitiesAvailable() const; - TPtrC FileName() const; -private: - CMtmDllInfo(); - CMtmDllInfo(const TUidType& aUidType,TInt aEntryPointOrdinalNumber,const TVersion aVersion); - CMtmDllInfo(const CMtmDllInfo& aMtmDllInfo); - void ConstructL(const TDesC& aHumanReadableName, const TDesC& aFilename); -private: - HBufC* iHumanReadableName; // Should be less than KHumanReadableNameLength -public: - /** Group of UIDs for the MTM. See NewL() for details. */ - TUidType iUidType; // Three uids - /** Ordinal of factory function for the MTM component */ - TInt iEntryPointOrdinalNumber; - /** Version information for the MTM component */ - TVersion iVersion; - - /** Flag that indicates if the MTM can send messages */ - TBool iMessagingCapability; - /** Flag that indicates if the MTM can handle body text */ - TBool iSendBodyCapability; - /** Flag that indicates if settings have been made for the - MessagingCapability() and SendBodyCapability() flags */ - TBool iCapabilitiesAvailable; -private: - HBufC* iFilename; - }; - - -class CMtmDllInfoArray : public CArrayPtrFlat -/** Collects the registration data for concrete MTM components, as encapsulated -in CMtmDllInfo objects, into an array. - -Basic array functionality is provided by the base class CArrayPtrFlat. - -It is used in the creation of registration data for an MTM group: see CMtmGroupData. - -@publishedAll -@released -*/ - { -public: - IMPORT_C CMtmDllInfoArray(); - IMPORT_C ~CMtmDllInfoArray(); - IMPORT_C void AddMtmDllInfoL(CMtmDllInfo* aMtmDllInfo); - }; - -class TCapabilitySet; - -class CMtmGroupData : public CBase -/** Encapsulates the registration data for an MTM group. - -It is used to access and write the registration data file for an MTM group. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMtmGroupData* NewL(TUid aMtmTypeUid, TUid aTechnologyTypeUid,CMtmDllInfoArray* aMtmDllInfoArray, const TCapabilitySet& aMtmRequiredCaps); - IMPORT_C static CMtmGroupData* NewL(const CMtmGroupData& aMtmGroupData); - IMPORT_C static CMtmGroupData* NewL(RReadStream& aStream); - IMPORT_C ~CMtmGroupData(); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept - inline TUid MtmTypeUid() const; - inline TUid TechnologyTypeUid() const; - IMPORT_C const CMtmDllInfoArray& MtmDllInfoArray() const; - IMPORT_C const TCapabilitySet& GetMtmRequiredCapabilities() const; - IMPORT_C TBool operator==(const CMtmGroupData& aMtmGroupData) const; -private: - CMtmGroupData(TUid aMtmTypeUid, TUid aTechnologyTypeUid, CMtmDllInfoArray* aMtmDllInfoArray, const TCapabilitySet& aMtmRequiredCaps); - void ConstructL(const CMtmGroupData& aMtmGroupData); - void ConstructL(); - void AppendMtmDllInfoArrayL(const CMtmDllInfoArray& aMtmDllInfoArray); - CMtmDllInfoArray& MtmDllInfoArrayPrivate(); - CMtmGroupData(TUid aMtmTypeUid=KNullUid,TUid aTechnologyTypeUid=KNullUid); - void AppendMtmDllInfoL(CMtmDllInfo* aMtmDllInfo); // Leaves if second uid wrong -private: - TUid iMtmTypeUid; - TUid iTechnologyTypeUid; - CMtmDllInfoArray* iMtmDllInfoArray; - TCapabilitySet iMtmRequiredCaps; - }; - - -class MRegisteredMtmDllObserver -/** -@internalComponent -@released -*/ - { -public: - virtual TInt UseMtmGroup(TUid aMtmTypeUid)=0; - virtual TInt ReleaseMtmGroup(TUid aMtmTypeUid)=0; - }; - - -// Real non-derivable class - -class CRegisteredMtmDll : public CTimer -/** Allows an MTM object to access registry information about itself. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CRegisteredMtmDll* NewL(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,const TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); - IMPORT_C ~CRegisteredMtmDll(); - - inline TUid MtmTypeUid() const; - inline TUid TechnologyTypeUid() const; - inline const CMtmDllInfo& MtmDllInfo() const; - - inline TInt MtmDllRefCount() const; - - IMPORT_C TInt GetLibrary(RFs& aFs,RLibrary& aMtmDllLibrary); // Increments reference count if successful or returns error - IMPORT_C void ReleaseLibrary(); // Decrements access count - // Should be called from destructor of any objects created from the library -private: - CRegisteredMtmDll(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); - void ConstructL(const CMtmDllInfo& aMtmDllInfo); - void LoadLibraryL(RFs& aFs); - - void RunL(); - -private: - TUid iMtmTypeUid; - TUid iTechnologyTypeUid; - CMtmDllInfo* iMtmDllInfo; - RLibrary iMtmDllLibrary; - TInt iMtmDllRefCount; - TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; - MRegisteredMtmDllObserver& iRegisteredMtmDllObserver; - }; - - - -class CRegisteredMtmDllArray : public CArrayPtrFlat -/** -@internalComponent -@released -*/ - { -public: - IMPORT_C CRegisteredMtmDllArray(); - IMPORT_C ~CRegisteredMtmDllArray(); - IMPORT_C void AddRegisteredMtmDllL(CRegisteredMtmDll* aRegisteredMtmDll); - }; - -// Base class - -class CMtmDllRegistry : public CBase -/** Accesses the various MTM component registries. - -The derived classes used by -clients are CClientMtmRegistry, CMtmUiDataRegistry, and CMtmUiRegistry. It -provides functions to discover the MTMs registered in such a registry. The -registered MTMs can be regarded as existing in a list: you can use NumRegisteredMtmDlls() -to get the number in the list, and MtmTypeUid() to index into it. - -@internalComponent -@released -*/ - { -public: - IMPORT_C ~CMtmDllRegistry(); - - inline TInt NumRegisteredMtmDlls() const; - IMPORT_C TUid MtmTypeUid(TInt anIndex) const; - - inline TBool IsPresent(TUid aMtmTypeUid) const; - IMPORT_C TUid TechnologyTypeUid(TUid aMtmTypeUid) const; - IMPORT_C const CMtmDllInfo& RegisteredMtmDllInfo(TUid aMtmTypeUid) const; - IMPORT_C TBool IsInUse(TUid aMtmTypeUid) const; // returns true if specified DLL in use - IMPORT_C TBool IsInUse() const; // returns true if any DLL in use - -protected: - IMPORT_C CMtmDllRegistry(RFs& aFs,TUid aMtmDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=KMsvDefaultTimeoutMicroSeconds32); - - IMPORT_C TInt MtmTypeUidToIndex(TUid anMtmTypeUid) const; - - IMPORT_C TInt AddRegisteredMtmDll(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); // returns error - IMPORT_C void RemoveRegisteredMtmDll(TUid aMtmTypeUid); - IMPORT_C void RemoveAllRegisteredMtmDlls(); - -private: - void DoAddRegisteredMtmDllL(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); // returns error - -protected: - RFs& iFs; - TUid iMtmDllTypeUid; // Second Uid in all Dlls - CRegisteredMtmDllArray iRegisteredMtmDllArray; // Inline CArray, OK because no NewL(); - TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; - }; - - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvruids.h --- a/epoc32/include/msvruids.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ -#if !defined(__MSVREGUD_H__) -#define __MSVREGUD_H__ - -#include -#include - -/** -* @internalAll -* @released -*/ -const TInt KMsvNumMtmDllTypes=4; -/** -* @internalAll -* @released -*/ -const TUid KUidMsvDataComponent ={0x10003C69}; -// Server-side MTM -/** -* @publishedAll -* @released -*/ -const TUid KUidMtmServerComponent ={KUidMtmServerComponentVal}; -// Client-side MTM -/** -* @publishedAll -* @released -*/ -const TUid KUidMtmClientComponent ={KUidMtmClientComponentVal}; -// User Interface MTM -/** -* @internalAll -* @released -*/ -const TUid KUidMtmUiComponent ={KUidMtmUiComponentVal}; -// UI Data MTM -/** -* @internalAll -* @released -*/ -const TUid KUidMtmUiDataComponent ={KUidMtmUiDataComponentVal}; -/** -* @internalTechnology -* @released -*/ -const TUid KMsvDllType1Uid={0x10003C62}; -/** -* @internalTechnology -* @released -*/ -const TUid KMsvDllType2Uid={0x10003C63}; -/** -* @internalTechnology -* @released -*/ -const TUid KMsvDllType3Uid={0x10003C64}; -/** -* @internalTechnology -* @released -*/ -const TUid KMsvDllType4Uid={0x10003C65}; -/** -* @internalTechnology -* @released -*/ -const TUid KMsvDllType5Uid={0x10003C66}; -/** -* @internalTechnology -* @released -*/ -const TUid KMsvDllType6Uid={0x10003C67}; -/** -* @internalComponent -* @released -*/ -const TUid KUidMtmMultipleComponent ={0x10004845}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvscheduledentry.h --- a/epoc32/include/msvscheduledentry.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVSCHEDULEDENTRY_H__ -#define __MSVSCHEDULEDENTRY_H__ - -#include -#include - -/** -Abstract base class which stores the schedule data and recipients of a message. - -CMsvScheduledEntry does not force the Server MTM to store the message -recipients in a certain way. However, it is recommended that the Server MTM -derive its recipients class from CMsvRecipient, because the class already has -support for the number of retries to send a message to a recipient. - -CMsvScheduledEntry stores the TMsvEntry to which it relates to provide quick -access to the scheduling-related index data without needing calls to -CMsvServerEntry::SetEntry(). -However, CMsvScheduledEntry does not provide access to all the members of -the TMsvEntry. This is to stop the user of the CMsvScheduledEntry from -accessing the descriptor members of the TMsvEntry while the server entry is -not set to the TMsvEntry. - -@publishedAll -@released -*/ - -class CMsvScheduledEntry : public CBase - { -public: - /** - Tests if any of the recipients of this message can still be sent to. - - @param aErrorActions - Error-actions - - @param aAction - Default error-action - - @return True if at least one of the recipients has not been sent - the message. - */ - virtual TBool CanSendToAnyRecipients(const CMsvSendErrorActions& aErrorActions, TMsvSendErrorAction& aAction) = 0; - - /** - Tests if any of the recipients of this message can still be sent to. - - @param aAction - Default error-action - - @return True if at least one of the recipients has not been sent - the message. - */ - virtual TBool CanSendToAnyRecipients(const TMsvSendErrorAction& aAction) = 0; - - /** - Sets all the recipients' retries to zero. - */ - virtual void RecipientsResetRetries() = 0; - - /** - Increases all the recipients' retries by one. - */ - virtual void RecipientsIncreaseRetries() = 0; - - /** - Sets all the recipients' flags to sending failed. - */ - virtual void RecipientsSetFailed() = 0; - - /** - Tests if all recipients of the message have been sent successfully. - - @return True if all recipients have been sent successfully. - */ - virtual TBool RecipientsAllSent() const = 0; - - IMPORT_C virtual void StoreL(CMsvStore& aStore) const; - IMPORT_C virtual void RestoreL(CMsvStore& aStore); - - /** - Stores the recipients. - - @param aStore - Store to write to. - */ - virtual void RecipientsStoreL(CMsvStore& aStore) const = 0; - - /** - Restores the recipients. - - @param aStore - Store to read from. - */ - virtual void RecipientsRestoreL(CMsvStore& aStore) = 0; - - inline const TTime& ScheduleDate() const; - inline void SetScheduleDate(const TTime& aDate); - - inline const TBool Scheduled() const; - inline void SetScheduled(const TBool aScheduled); - - inline const TInt SendingState() const; - inline void SetSendingState(TInt aState); - - inline const TInt Error() const; - inline const TMsvId Id() const; - inline const TBool OffPeak() const; - - inline void SetFailed(const TBool aFail); - inline const TBool Failed() const; - - IMPORT_C TBool PendingConditions() const; - IMPORT_C void SetPendingConditions(TBool aPendingConditions); - - inline const TUid Mtm() const; - - IMPORT_C void Entry(TMsvEntry& aEntry) const; - -protected: - - IMPORT_C CMsvScheduledEntry(const TMsvEntry& aEntry); - -public: - - /** Message schedule data. */ - TMsvEntryScheduleData iData; - -private: - - TMsvEntry iEntry; - }; - -/** -Dynamic array of CMsvScheduledEntry objects. - -@publishedAll -@released -*/ -typedef CArrayPtrFlat CMsvScheduledEntries; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvschedulepackage.h --- a/epoc32/include/msvschedulepackage.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -/// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -/// All rights reserved. -/// This component and the accompanying materials are made available -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -/// which accompanies this distribution, and is available -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -/// -/// Initial Contributors: -/// Nokia Corporation - initial contribution. -/// -/// Contributors: -/// -/// Description: -/// All rights reserved. -/// This component and the accompanying materials are made available -/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -/// which accompanies this distribution, and is available -/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -/// Initial Contributors: -/// Nokia Corporation - initial contribution. -/// Contributors: -/// - -#ifndef MSV_SCHEDULE_PACKAGE_H_ -#define MSV_SCHEDULE_PACKAGE_H_ - -///////////////////////////////////////////////////////////////////////////// -// -// TMsvSchedulePackage Declaration -// -///////////////////////////////////////////////////////////////////////////// - -const TInt KMaxParameterLength = 256; - -class TTaskInfo; - - -/** -Packaged message scheduling information. - -@publishedAll -@released -*/ - -class TMsvSchedulePackage - { -public: - IMPORT_C TMsvSchedulePackage(); - - IMPORT_C void PackLC(TTaskInfo& aTask, HBufC*& aDes) const; - IMPORT_C void UnpackL(const TTaskInfo& aTask, const TDesC& aDes); - -private: - - HBufC* PackLC() const; - void UnpackL(const TDesC& aDes); - - void ExternalizeL(RWriteStream&) const; - void InternalizeL(RReadStream&); - - TPtrC Convert(const TDesC8& aDes) const; - TPtrC8 Convert(const TDesC16& aDes) const; - -public: - - /** Message ID. */ - TMsvId iId; - - /** Command ID to be passed to CMsvSession::TransferCommandL() when it is - time to send the messages. */ - TInt iCommandId; - - /** Intervals at which the scheduler should check the sending operation's - progress. */ - TTimeIntervalMicroSeconds32 iPollProgress; - - /** Server MTM specific binary data to be passed to - CMsvSession::TransferCommandL() when it is time to send the messages. */ - TBuf8 iParameter; - - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvschedulesend.h --- a/epoc32/include/msvschedulesend.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVSCHEDULESEND_H__ -#define __MSVSCHEDULESEND_H__ - -#ifdef _DEBUG -#undef _MSG_NO_LOGGING -#endif - - - - -#include -#include -#include -#include -#include - -class CMsvEntrySelection; -class TMsvSchedulePackage; -class TMsvSendErrorAction; -class CMsvStore; -class TMsvEntry; -class CMsvOffPeakTimes; -class CMsvScheduleSettings; -class CMsvSendErrorActions; -class CMsvSysAgentActions; -class TMsvSchedulePackage; -class TMsvEntryScheduleData; -class CMsvServerEntry; -class CRepository; - -const TUid KUidMsvScheduledSendingDLL = {0x100056A0}; -const TInt KMsvSchsendArrayGrowth = 10; - -#ifdef _MSG_NO_LOGGING -#define SCHSENDLOG(a) -#else -_LIT(KSchSendLogDir, "schsend"); -_LIT(KSchSendLogFile,"SchSend.txt"); -#define SCHSENDLOG(a) a -#endif - -/** -Provides a Server MTM's interface to the Task Scheduler for messaging -scheduling. - -Server MTM's must provide a derived class that implements GetMessageL() to -provide a factory for MTM-specific scheduling CMsvScheduledEntry-based objects. - -@publishedAll -@released -*/ -class CMsvScheduleSend : public CBase - { -public: - IMPORT_C ~CMsvScheduleSend(); - - IMPORT_C void ScheduleL(const CMsvEntrySelection& aSelection, const TMsvSchedulePackage& aPackage); - - IMPORT_C void ReScheduleL(const CMsvEntrySelection& aSelection, const TMsvSchedulePackage& aPackage, const TMsvSendErrorAction* aErrorAction = NULL); - - IMPORT_C void CheckScheduleL(const CMsvEntrySelection& aSelection); - IMPORT_C void DeleteScheduleL(const CMsvEntrySelection& aSelection); - - IMPORT_C void SendingCompleteL(TMsvEntry& aEntry, const TBool aChangeEntry = EFalse); - IMPORT_C void SendingCompleteL(const CMsvEntrySelection& aSelection); - - - inline CMsvOffPeakTimes& OffPeakTimes() const; - inline CMsvScheduleSettings& ScheduleSettings() const; - inline CMsvSendErrorActions& SendErrorActions() const; - inline CMsvSysAgentActions& AgentActions() const; - - IMPORT_C static void CreateScheduleL(RScheduler& aScheduler, const CMsvScheduleSettings& aSettings, const TTime& aStartTime, const TTimeIntervalMinutes& aValidityPeriod, TSchedulerItemRef& aRef); - IMPORT_C static void CreateScheduleL(RScheduler& aScheduler, const CArrayFixFlat& aConditions, const TTime& aTimeout, TSchedulerItemRef& aRef); - IMPORT_C static void FindScheduleL(RScheduler& aScheduler, const TTime& aStartTime, TSchedulerItemRef& aRef); - IMPORT_C static void FindScheduleL(RScheduler& aScheduler, const CArrayFixFlat& aConditions, const TTime& aTimeout, TSchedulerItemRef& aRef); - IMPORT_C static void RoundUpToMinute(TTime& aTime); - IMPORT_C static void ScheduleEntryL(RScheduler& aScheduler, const TSchedulerItemRef& aRef, const TMsvSchedulePackage& aPackage, TTaskInfo& aInfo); - IMPORT_C static void UpdateEntryAfterSchedule(const TSchedulerItemRef& aRef, const TTaskInfo& aInfo, const TTime& aTime, TInt aFinalState, TMsvEntry& aEntry, TMsvEntryScheduleData& aData); - IMPORT_C static void ConnectAndRegisterL(RScheduler& aScheduler, const CMsvScheduleSettings& aSettings); - - IMPORT_C void LoadScheduleSettingsL(CRepository& aRepository); - -protected: - - IMPORT_C CMsvScheduleSend(CMsvServerEntry& aServerEntry); - IMPORT_C virtual void ConstructL(); - -/** -Gets the schedule data and recipients of a message. - -Recipient information is MTM-specific, so the server MTM must provide a -derived class that implements CMsvScheduledEntry, and return objects of -that type from this function. - -@param aId -The message ID. - -@return -The message's schedule data. -*/ - virtual CMsvScheduledEntry* GetMessageL(const TMsvId aId) const = 0; - -private: - - enum - { - EDefaultTaskPriority = 1, //used when scheduling a task in the task scheduler - EDefaultTaskRepeat = 0 //used when scheduling a task in the task scheduler - }; - - void SendingCompleteL(CMsvScheduledEntry& aScheduledEntry, const TBool aChangeEntry); - - TBool GetNextRetry(CMsvScheduledEntry& aMessage, const TMsvSendErrorAction& aErrorAction, TTimeIntervalSeconds& aInterval) const; - - void DoScheduleL(CMsvScheduledEntries& aSchEntries, const TInt aFinalState, const TTime& aTime, TBool aPendingConditions); - void DoReScheduleL(CMsvScheduledEntries& aSchEntries); - - void GetMessagesL(const CMsvEntrySelection& aSelection); - - void ConnectAndRegisterL(); - - void ScheduleEntryL(CMsvScheduledEntry& aMessage, const TInt aFinalState, const TTime& aStartTime, const TSchedulerItemRef& aRef, TBool aPendingConditions); - - void GetOffPeakL(TTime aFromTime, TTime& aStartTime, TTimeIntervalMinutes& aValidityPeriod) const; - - void DeleteScheduleForEntryL(CMsvScheduledEntry& aMessage); - void ResetScheduleInfoForEntryL(CMsvScheduledEntry& aMessage, const TBool aChangeEntry); - void SortByDateAndPendingConditionsL(CMsvScheduledEntries& aScheduledEntries); - void CreateScheduleL(const TTime& aStartTime, const TTimeIntervalMinutes& aValidityPeriod, const CArrayFixFlat& aSchConditions, TBool aPendingConditions, TSchedulerItemRef& aRef); - void FindScheduleL(const TTime& aTime, const CArrayFixFlat& aSchConditions, TBool aPendingConditions, TSchedulerItemRef& aRef); - - void PopulateScheduleConditionsL(CArrayFixFlat& aSchConditions); - TBool SetMessageStartTime(CMsvScheduledEntry& aMessage, const TTime& aFromTime, const TMsvSendErrorAction* aErrorAction = NULL); - - TBool TaskAndMessageMatchL(const CMsvScheduledEntry& aMessage); - TMsvId GetMessageIdForTaskL(TInt aTaskId); -#ifndef _MSG_NO_LOGGING - void FLog(TRefByValue aFormat, ...); - void FLog(TRefByValue aFormat, ...); -#endif - -protected: - - /** The Server MTM specific scheduled message sending settings. */ - CMsvScheduleSettings* iSettings; - /** The Server MTM specific off peak time periods. */ - CMsvOffPeakTimes* iOffPeakTimes; - /** The Server MTM specific actions to take when particular errors occur during - message sending. */ - CMsvSendErrorActions* iErrorActions; - /** The System Agent conditions that must be satisfied before a sending attempt. */ - CMsvSysAgentActions* iAgentActions; - - /** Indicates if this has been registered with the Task Scheduler. - - Initially set to EFalse. */ - TBool iRegistered; - /** Provides an interface to the Task Scheduler. */ - RScheduler iScheduler; - /** The CMsvServerEntry of the server MTM. */ - CMsvServerEntry& iServerEntry; - /** Scheduling options. */ - TMsvSchedulePackage iPackage; - - /** Array of message schedule data. */ - CMsvScheduledEntries* iSchEntries; - - /** Array of schedule entry data. */ - CArrayFixFlat* iSchEntryInfo; - /** Array of schedule task data. */ - CArrayFixFlat* iSchTaskInfo; - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvschedulesettings.h --- a/epoc32/include/msvschedulesettings.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVSCHEDULESETTINGS_H__ -#define __MSVSCHEDULESETTINGS_H__ - - - - -#include -#include -#include - - - - - -/** -Stores the MTM-specific (general) settings for scheduling messages on the -Task Scheduler. - -These settings include the latency (minimum amount of time between now and when -the message is scheduled for), the intervals (short, long or variable) to wait -for before attempting to re-send the message and the timout value for messages -pending conditions to be met. - -The other MTM scheduling releated settings are stored in CMsvOffPeakTimes -and CMsvSendErrorActions. - -@publishedAll -@released -*/ - -class CMsvScheduleSettings : public CBase - { -public: - - IMPORT_C static CMsvScheduleSettings* NewL(); - IMPORT_C static CMsvScheduleSettings* NewLC(); - IMPORT_C ~CMsvScheduleSettings(); - - - IMPORT_C void Reset(); - - - IMPORT_C void SetPriority(const TInt aPriority); - IMPORT_C TInt Priority() const; - - IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aValidityPeriod); - IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const; - - IMPORT_C void SetIntervalType(const TIntervalType aIntervalType); - IMPORT_C TIntervalType IntervalType() const; - - IMPORT_C void SetLongInterval(const TTimeIntervalSeconds& aInterval); - IMPORT_C const TTimeIntervalSeconds& LongInterval() const; - - IMPORT_C void SetShortInterval(const TTimeIntervalSeconds& aInterval); - IMPORT_C const TTimeIntervalSeconds& ShortInterval() const; - - IMPORT_C const CArrayFixFlat& VariableIntervals() const; - IMPORT_C void SetVariableIntervalsL(const CArrayFixFlat& aIntervals); - - IMPORT_C const TTimeIntervalMicroSeconds32& Latency() const; - IMPORT_C void SetLatency(const TTimeIntervalMicroSeconds32& aLatency); - - IMPORT_C void SetPendingConditionsTimeout(const TTimeIntervalMinutes& aTimeout); - IMPORT_C const TTimeIntervalMinutes& PendingConditionsTimeout() const; - - /** Default scheduler settings values. */ - enum - { - /** Default priority. */ - EDefaultPriority = 27, - /** Default validity period: 10080 Minutes in 1 week. */ - EDefaultValidityPeriod = 10080, - /** Default interval type: EYearly */ - EDefaultIntervalType = 3, - /** Default short retry interval. */ - EDefaultShortInterval = 5, - /** Default long retry interval. */ - EDefaultLongInterval = 120, - /** Default latency. */ - EDefaultLatency = 1500000, - /** Default timeout. Zero minutes - no timeout. */ - EDefaultPendingConditionsTimeout = 0 - }; - -private: - CMsvScheduleSettings(); - - void ConstructL(); - - - TInt iPriority; //Priority of the schedules on the task scheduler - TTimeIntervalMinutes iValidityPeriod;//Validity period of message on the task scheduler - TIntervalType iIntervalType; //See TIntervalType declaration and Task Scheduler user documentation - TTimeIntervalMicroSeconds32 iLatency; //Minimum amount of time between now and when the message is scheduled for. Cannot be negative. - TTimeIntervalMinutes iPendingConditionsTimeout; - - TTimeIntervalSeconds iLongInterval; - TTimeIntervalSeconds iShortInterval; - CArrayFixFlat* iVariableIntervals; - }; - -#endif // __MSVSCHEDULESETTINGS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvsenderroraction.h --- a/epoc32/include/msvsenderroraction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVSENDERRORACTION_H__ -#define __MSVSENDERRORACTION_H__ - - - - -///////////////////////////////////////////////////////////////////////////// -// -// Includes -// -///////////////////////////////////////////////////////////////////////////// - -#include -#include -#include - -///////////////////////////////////////////////////////////////////////////// -// -// Constants -// -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// -// TMsvSendErrorAction Declaration -// -///////////////////////////////////////////////////////////////////////////// - -/** -Encapsulates the action to take for a particular error. - -An error may occur when the Server MTM is attempting to send a message or -messages. If the Server MTM supports scheduling, then, depending on the error -or conditions, the Server MTM may want to re-schedule the message on the Task -Scheduler to send at a later time. CMsvScheduleSend::ReScheduleL() -(in combination with CMsvSendErrorActions) uses the TMsvSendErrorAction -to determine whether to re-schedule the message. - -@publishedAll -@released -*/ - -class TMsvSendErrorAction - { -public: - IMPORT_C TMsvSendErrorAction(); - - IMPORT_C void Reset(); - - IMPORT_C void SetMaxRetries(const TInt16 aMaxRetries); - IMPORT_C TInt16 MaxRetries() const; - - /** The error. */ - TInt iError; - - /** The action to take if this error occurs. */ - TMsvSendAction iAction; - - /** The number of attempts to make at sending a message if this error occurs. - - If iRetries equals ESendRetriesInfinite, then sending will be attempted until - successful (or the user intervenes). This member is ignored if iAction equals - ESendActionFail. */ - TMsvSendRetries iRetries; - - /** Retry behaviour. - - This member is used by CMsvSendErrorActions to determine when to resend the - message. This member is ignored if iAction equals ESendActionFail. */ - TMsvSendRetrySpacing iRetrySpacing; - -private: - TInt16 iMaxRetries; - }; - - -///////////////////////////////////////////////////////////////////////////// -// -// CMsvSendErrorActions -// -///////////////////////////////////////////////////////////////////////////// - -/** -This class determines what action to take if an error occurs while the Server -MTM is sending a message (or messages). - -It encapsulates an array of TMsvSendErrorAction objects, which it uses to -determine the action to take for a particular error. If the error is not -found in the array, then CMsvSendErrorActions uses its default -TMsvSendErrorAction object. - -@publishedAll -@released -*/ - -class CMsvSendErrorActions : public CBase - { -public: - IMPORT_C static CMsvSendErrorActions* NewL(); - IMPORT_C static CMsvSendErrorActions* NewLC(); - IMPORT_C ~CMsvSendErrorActions(); - - IMPORT_C void AddSendErrorActionL(const TMsvSendErrorAction& aErrorAction); - IMPORT_C TInt RemoveSendErrorAction(const TInt aError); - IMPORT_C TInt GetSendErrorAction(const TInt aError, TMsvSendErrorAction& aErrorAction) const; - - IMPORT_C void Reset(); - - IMPORT_C void RestoreFromResourceL(TResourceReader& aReader); - - IMPORT_C void SetErrorsL(const CArrayFixFlat& aErrors); - IMPORT_C const CArrayFixFlat& Errors() const; - - IMPORT_C const TMsvSendErrorAction& Default() const; - IMPORT_C void SetDefault(const TMsvSendErrorAction& aAction); - -private: - CMsvSendErrorActions(); - void ConstructL(); - void RestoreErrorActionL(TResourceReader& aReader, TInt aActionCount, const TBool aDefault); - - - TInt Find(const TInt aError, TInt& aIndex) const; - - - CArrayFixFlat* iErrors; - TMsvSendErrorAction iDefault; - }; - -#endif // __MSVSENDERRORACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvstd.h --- a/epoc32/include/msvstd.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,616 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MSVSTD_H__ -#define __MSVSTD_H__ - - - - -#include -#include - -/** -Specifies an entry in the Message Server index. -@publishedAll -@released -@see #KMsvNullIndexEntryId -@see #KMsvTempIndexEntryId -@see #KMsvRootIndexEntryId -@see #KMsvLocalServiceIndexEntryId -@see #KMsvGlobalInBoxIndexEntryId -@see #KMsvGlobalOutBoxIndexEntryId -@see #KMsvDraftEntryId -@see #KMsvSentEntryId -@see #KMsvDeletedEntryFolderEntryId -@see #KMsvUnknownServiceIndexEntryId -*/ -typedef TInt32 TMsvId; - -/** Identifies an asynchronous messaging operation. - -This ID is unique within a -Message Server session. The ID of an operation can be obtained from CMsvOperation::Id(). */ -typedef TInt32 TMsvOp; - -/** Supplies the standard values for the message priority index entry field. -@publishedAll -@released -*/ -enum TMsvPriority { - /** High message priority */ - EMsvHighPriority, - /** Medium message priority */ - EMsvMediumPriority, - /** Low message priority */ - EMsvLowPriority}; - -class CRichText; -class CMsvStore; -class CMsvEntry; -class CMsvMove; -class CMsvServer; -class CMsvServerEntry; - -_LIT(KMsvDefaultFolder, "\\Private\\1000484b\\Mail\\"); -_LIT(KMsvDefaultIndexFile, "\\Private\\1000484b\\Mail\\Index"); -_LIT(KMsvDefaultFolder2, "\\Private\\1000484b\\Mail2\\"); -_LIT(KMsvDefaultIndexFile2, "\\Private\\1000484b\\Mail2\\Index"); -_LIT(KMsvDirectoryExt, "_S\\"); -_LIT(KMsvBinaryFolderExt, "_F\\"); - -const TInt KFileNameFixedWidth=8; -const TInt KMaxSubjectSkipStringLength=8; // For subject based email thread sorting -_LIT(KSendAsRenderedImage, "Image"); - -// Server name and moving semaphore -_LIT(KMsvServerName, "!MsvServer"); -_LIT(KMsvMovingSemaphore, "MsvMovingSemaphore"); - -_LIT_SECURE_ID(KMsvServerId, 0x1000484B); - - -/** Represents an entry in the Message Server index. - -MTM implementations and message client applications use it to access and manipulate -index entry values. Note that a TMsvEntry is effectively a local cache of -the index entry, and changes to it are not automatically written into the -index. To commit changes to the Message Server, you need to call CMsvEntry::ChangeL() -(or CMsvServerEntry::ChangeEntry()). - -To avoid repetition, the functions and data members are simply listed here, -without detailed explanation of the fields. The public data members can be -used to get and set the values of some index entry fields. -@publishedAll -@released -*/ -class TMsvEntry - { -public: - IMPORT_C TMsvEntry(); - IMPORT_C TMsvEntry(const TMsvEntry& aEntry); - IMPORT_C TMsvEntry& operator=(const TMsvEntry& aEntry); - IMPORT_C TBool operator==(const TMsvEntry& aEntry) const; - IMPORT_C TBool PermanentDataUnchanged(const TMsvEntry& aEntry) const; - // - IMPORT_C TMsvPriority Priority() const; - IMPORT_C void SetPriority(TMsvPriority aPriority); - // - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - // Read only for clients - inline TMsvId Id() const; - inline TMsvId Parent() const; - inline TBool Owner() const; - inline TBool Deleted() const; - // Read & write for clients - inline TBool Complete() const; - inline void SetComplete(TBool aComplete); - inline TBool New() const; - inline void SetNew(TBool aNew); - inline TBool Unread() const; - inline void SetUnread(TBool aUnread); - inline TBool Failed() const; - inline void SetFailed(TBool aFailed); - inline TBool Operation() const; - inline void SetOperation(TBool aOperation); - inline TBool Visible() const; - inline void SetVisible(TBool aVisble); - inline TBool MultipleRecipients() const; - inline void SetMultipleRecipients(TBool aMultipleRecipient); - inline TBool ReadOnly() const; - inline void SetReadOnly(TBool aReadOnly); - inline TBool StandardFolder() const; - inline void SetStandardFolder(TBool aStanardFolder); - inline TBool Attachment() const; - inline void SetAttachment(TBool aAttachmentFlag); - inline TBool Connected() const; - inline void SetConnected(TBool aConnected); - inline TBool InPreparation() const; - inline void SetInPreparation(TBool aInPreparation); - // - inline TInt PcSyncCount() const; - inline void DecPcSyncCount(); - inline void IncPcSyncCount(); - // - inline TBool OffPeak() const; - inline void SetOffPeak(TBool aOffPeak); - inline TBool Scheduled() const; - inline void SetScheduled(TBool aScheduled); - inline TUint SendingState() const; - inline void SetSendingState(TUint aSendingState); - inline TBool PendingDelete() const; - inline void SetPendingDelete(TBool aPendingDelete); - - /** This method sets bit 24 of iMtmData1, if you are using this bit elsewhere don't call this method.*/ - inline void SetDeleteProtected(TBool aDeleteProtected); - inline TBool DeleteProtected() const; - /** This method sets bit 31 of iMtmData1, if you are using this bit elsewhere don't call this method.*/ - inline void SetForwarded(TBool aForwarded); - inline TBool Forwarded() const; - /** This method sets bit 32 of iMtmData1, if you are using this bit elsewhere don't call this method.*/ - inline void SetLocallyDeleted(TBool aLocallyDeleted); - inline TBool LocallyDeleted() const; - - IMPORT_C TBool PendingConditions() const; - IMPORT_C void SetPendingConditions(TBool aPendingConditions); - // - IMPORT_C TInt32 MtmData1() const; - IMPORT_C TInt32 MtmData2() const; - IMPORT_C TInt32 MtmData3() const; - - /** - @internalTechnology - */ - IMPORT_C void SetMtmData1(TInt32 aMtmData); - /** - @internalTechnology - */ - IMPORT_C void SetMtmData2(TInt32 aMtmData); - /** - @internalTechnology - */ - IMPORT_C void SetMtmData3(TInt32 aMtmData); - // -protected: - // only the server will be able to set the following - inline void SetId(TMsvId aId); - inline void SetParent(TMsvId aId); - inline void SetOwner(TBool aAttachment); - inline void SetDeleted(TBool aDeletedFlag); - // - inline TUint PersistedFlags() const; - inline TUint TemporaryFlags() const; - // -private: - void Copy(const TMsvEntry& aEntry); - // -private: - TMsvId iId; - TMsvId iParentId; - TInt32 iData; - TInt32 iPcSyncCount; - TInt32 iReserved; // reserved for future proofing -public: - /** Service ID. */ - TMsvId iServiceId; - /** Related folder ID. */ - TMsvId iRelatedId; - /** Entry type */ - TUid iType; - /** MTM */ - TUid iMtm; - /** Time */ - TTime iDate; - /** Size */ - TInt32 iSize; - /** Error */ - TInt32 iError; - /** BIO message type */ - TInt32 iBioType; - // following three can be used by MTM - /** MTM data 1: this can be used for any purpose by an MTM. This member must - only be accessed through the predefined set and get functions. If you must - write data to a bit that has no meaning in the predefined derived classes - then you must derive your own class from TMsvEntry. - */ - TInt32 iMtmData1; - /** MTM data 2: this can be used for any purpose by an MTM. This member must - only be accessed through the predefined set and get functions. If you must - write data to a bit that has no meaning in the predefined derived classes - then you must derive your own class from TMsvEntry. - */ - TInt32 iMtmData2; - /** MTM data 3: this can be used for any purpose by an MTM. This member must - only be accessed through the predefined set and get functions. If you must - write data to a bit that has no meaning in the predefined derived classes - then you must derive your own class from TMsvEntry. - */ - TInt32 iMtmData3; -public: - // The TPtrC must be kept at end of class to simplify comparisons and initialisation - /** Description */ - TPtrC iDescription; - /** Details */ - TPtrC iDetails; - // - // -private: - // -friend class CMsvEntry; -friend class CMsvServer; -friend class CMsvServerEntry; -friend class CMsvClientEntry; -friend class CMsvServerSession; -friend class TMsvServerEntry; -friend class CMsvServerIndex; -friend class RMsvServerSession; -friend class CMsvLocalCopyOperation; -friend class CMsvMove; -friend class CMsvIndexRebuild; -friend class CMsvCopyEntry; -friend class CMsvDelete; -friend class CMsvIndexContext; -friend class CMsvEntryArray; - // -private: - // -enum { KMsvEntryPriorityMask= 0x00000003, - KMsvEntryHighPriority= 0x00000002, - KMsvEntryMediumPriority= 0x00000001, - KMsvEntryLowPriority= 0x00000000, - KMsvEntryClearFlag= 0x00000000, - KMsvOffPeakFlag= 0x00000004, - KMsvEntryNotCompleteFlag= 0x00000008, - KMsvEntryNewFlag= 0x00000010, - KMsvEntryUnreadFlag= 0x00000020, - KMsvEntryFailedFlag= 0x00000040, - KMsvEntryOperationFlag= 0x00000080, - KMsvEntryOwnerFlag= 0x00000100, - KMsvEntryInvisibleFlag= 0x00000200, - KMsvEntryMultipleRecipientFlag= 0x00000400, - KMsvScheduledFlag= 0x00000800, - KMsvEntryReadOnlyFlag= 0x00001000, - KMsvEntryDeletedFlag= 0x00002000, - KMsvEntryStandardFolderFlag= 0x00004000, - KMsvEntryAttachmentFlag= 0x00008000, - KMsvEntryInPreparationFlag= 0x00010000, - KMsvSendingStateFlags= 0x001E0000, // Note: Sending state is shifted KMsvSendingStateShift places left - KMsvEntryPersistedFlags= 0x00FFFFFF, - KMsvEntryPendingConditionsFlag= 0x00800000, - KMsvEntryTemporaryFlags= 0xFF000000, - KMsvEntryConnectedFlag= 0x01000000, - KMsvEntryPendingDeleteFlag= 0x02000000}; - }; -enum - { - KMsvEntryDeleteProtected= 0x800000, - KMsvEntryForwarded= 0x40000000, - KMsvEntryLocallyDeleted= 0x80000000 - }; - -const TUint KMsvSendingStateShift=0x11; // Places to shift sending state - -/** Defines sending state flags. -@publishedAll -@released -*/ -enum TMsvSendState - { - /** State unknown. */ - KMsvSendStateUnknown = 0x0, - /** Message will be sent on request. */ - KMsvSendStateUponRequest = 0x1, - /** Waiting to be sent. - - Messages in the outbox with this state can be sent automatically by the relevant - MTM once an appropriate connection is established. */ - KMsvSendStateWaiting = 0x2, - /** Sending in progress. */ - KMsvSendStateSending = 0x3, - /** Sending scheduled. */ - KMsvSendStateScheduled = 0x4, - /** Resending. */ - KMsvSendStateResend = 0x5, - /** Sending suspended. */ - KMsvSendStateSuspended = 0x6, - /** Sending failed. */ - KMsvSendStateFailed = 0x7, - /** Sending complete. */ - KMsvSendStateSent = 0x8, - /** Not applicable. */ - KMsvSendStateNotApplicable = 0x9 - }; - -const TUint KMsvSendStateLast = KMsvSendStateNotApplicable; -const TUint KMsvSendStateMax = 0x0F; - -/** Supplies values for bitmasks that allows the rapid setting or clearing of a -number of TMsvEntry fields. - -The fields that can be manipulated are: - -1. PC synchronisation - -2. Visibility flag - -3. Read flag - -4. In-preparation flag - -5. Connected flag - -6. Pending deletion flag. - -7. New flag - -@see TMsvEntry -@see CMsvSession::ChangeAttributesL() -@see CMsvServerEntry::ChangeAttributes() -@publishedAll -@released -*/ -enum TMsvAttribute { - /** PC synchronisation field. */ - KMsvPcSyncCountAttribute =0x00000001, - /** Visibility flag field. */ - KMsvVisibilityAttribute =0x00000200, - /** Read flag field. */ - KMsvUnreadAttribute =0x00000020, - /** In-preparation field. */ - KMsvInPreparationAttribute =0x00010000, - /** Connected flag field. */ - KMsvConnectedAttribute =0x01000000, - /** Pending deletion flag. */ - KMsvPendingDeleteAttribute =0x02000000, - /** New flag field. */ - KMsvNewAttribute =0x00000010}; - -/** Defines the sort order options for a TMsvSelectionOrdering object. Options -are set through TMsvSelectionOrdering::SetSorting(). - -@see TMsvSelectionOrdering -@publishedAll -@released -*/ -enum TMsvSorting - { - /** Don't sort */ - EMsvSortByNone=0, // Don't sort - /** Date (earliest-latest) */ - EMsvSortByDate, // Date (earliest-latest) - /** Date (latest-earliest) */ - EMsvSortByDateReverse, // Date (latest-earliest) - /** Size (smallest-largest) */ - EMsvSortBySize, // Size (smallest-largest) - /** Size (largest-smallest) */ - EMsvSortBySizeReverse, // Size (largest-smallest) - /** To/From (A-Z folded) */ - EMsvSortByDetails, // ToFrom (A-Z collated) - /** To/From (Z-A folded) */ - EMsvSortByDetailsReverse, // ToFrom (Z-A collated) - /** Description (A-Z folded) */ - EMsvSortByDescription, // Description (A-Z collated) - /** Description (Z-A folded) */ - EMsvSortByDescriptionReverse, // Description (Z-A collated) - /** Sort by message ID. */ - EMsvSortById, // Id (lowest-highest) - /** Sort in reverse order by message ID. */ - EMsvSortByIdReverse // Id (highest-lowest) - }; - -/** Defines grouping order options for a TMsvEntrySelection object. Grouping options -can be combined in a bitmask and set through the TMsvEntrySelection constructor -@publishedAll -@released -*/ -enum TMsvGrouping - { - /** No grouping */ - KMsvNoGrouping=0, // No grouping - /** Group by entry type, in order, services, folders, messages, attachments */ - KMsvGroupByType=0x2, // Folder, Message, Attachment - /** Place standard folders first, in the order they were created */ - KMsvGroupByStandardFolders=0x6, // Standrad folders first (must have sorting by type set aswell) - /** Group by message priority, in order, high, medium, then low */ - KMsvGroupByPriority=0x8, // High, Mediem, Low - /** Group by MTM, either in the order set by CMsvEntry::SetMtmListL() or by MTM - Uid value */ - KMsvGroupByMtm=0x10, // By increasing uid value - }; - -/** Defines the sorting and grouping rules used to prepare a selection of entries. - -It is used in the interfaces of CMsvEntry and CMsvServerEntry to set the ordering -of an entry's children. - -Firstly, the entries will be grouped, if the appropriate grouping option is -set, by: - -1. Standard folders: any entries marked as standard folders are placed first, -in the order they were created. - -2. Entry type: in the order services, folders, messages, attachments, unknown - -3. Priority: in the order high, medium, then low - -4. MTM: either in the MTM order set by CMsvEntry::SetMtmListL() or just in MTM -Uid value - -Grouping options are simply Boolean flags that can be set on or off by functions -of this class. - -Secondly, the order of entries within these groups is defined by a sorting -order option. - -@see CMsvEntry -@see CMsvServerEntry -@publishedAll -@released -*/ -class TMsvSelectionOrdering - { -public: - IMPORT_C TMsvSelectionOrdering(); - IMPORT_C TMsvSelectionOrdering(TInt aGroupingKey, TMsvSorting aSorting, TBool aShowInvisible=EFalse); - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C TBool operator==(const TMsvSelectionOrdering& aOrdering) const; - IMPORT_C void SetSubjectSkipString(const TDesC& aSubjectSkipString); - IMPORT_C const TDesC& SubjectSkipString() const; - - // - inline TMsvSorting Sorting() const; - inline TBool GroupByType() const; - inline TBool GroupStandardFolders() const; - inline TBool GroupByPriority() const; - inline TBool GroupByMtm() const; - inline TBool ShowInvisibleEntries() const; - inline TBool GroupingOn() const; - // - inline void SetGroupByType(TBool aFlag); - inline void SetGroupStandardFolders(TBool aFlag); - inline void SetGroupByPriority(TBool aFlag); - inline void SetGroupByMtm(TBool aFlag); - inline void SetShowInvisibleEntries(TBool aFlag); - inline void SetSorting(TMsvSorting aSortType); - - // - // -private: - - enum TMsvGroupingPrivate - { - KMsvInvisibleFlag=0x1, - KMsvStandardFolders=0x4, - KMsvAllGroupingFlags=0x1e - }; - TInt iGrouping; - TMsvSorting iSortType; - TBuf iSubjectSkipString; - }; - -const TInt KMsvInvisibleFlag=1; - -/** Encapsulates an array of entry IDs. - -An object of this type is commonly passed to a function to indicate the set -of entries on which the function should operate. The array base class (CArrayFixFlat) -provide methods to access, sort, and manipulate members of the array. - -@publishedAll -@released -*/ -class CMsvEntrySelection : public CArrayFixFlat - { -public: - IMPORT_C CMsvEntrySelection(); - IMPORT_C CMsvEntrySelection* CopyL() const; - IMPORT_C CMsvEntrySelection* CopyLC() const; - IMPORT_C TInt Find(TMsvId aId) const; - }; - -/** Specifies a default service for a MTM. - -@publishedAll -@released -*/ -class TMsvDefaultService - { -public: - /** MTM for which the default service is specified. */ - TUid iMtm; - /** ID of the default service. */ - TMsvId iService; - }; - - - -/** Used to query the Message Server for entries that match the specification defined -in the filter. - -It allows a query to be performed on service, MTM, type and last change date. -The filter also enables the specification of the order in which the entries -are returned. - -@see CMsvSession::GetChildIdsL() -@publishedAll -@released -*/ -class CMsvEntryFilter : public CBase - { -public: - IMPORT_C static CMsvEntryFilter* NewLC(); - IMPORT_C static CMsvEntryFilter* NewL(); - // -public: - inline TMsvId Service() const; - inline void SetService(TMsvId aServiceId); - // - inline TUid Mtm() const; - inline void SetMtm(TUid aMtm); - // - inline TUid Type() const; - inline void SetType(TUid aType); - // - inline const TTime& LastChangeDate() const; - inline void SetLastChangeDate(const TTime& aLastChange); - // - inline const TMsvSelectionOrdering& Order() const; - inline void SetOrder(const TMsvSelectionOrdering& aOrder); - // - inline TUid SortMtm() const; - inline void SetSortMtm(TUid aSortMtm); - // -private: - CMsvEntryFilter(); - // -private: - TMsvId iServiceId; - TUid iMtm; - TUid iType; - TTime iLastChange; - TMsvSelectionOrdering iOrdering; - TUid iSortMtm; - }; - -// Error resolver leave codes -7000 to -7127 -/** Defines error codes that relate to the Message Server. - -@see MMsvEntryObserver::EMsvContextInvalid -@publishedAll -@released -*/ -enum TMsvResolverLeave - { - /** There is no disk in the drive containing the Message Server index. */ - KMsvMediaUnavailable = -7000, - /** There is a disk in the drive containing the Message Server index, but it is - the wrong one. */ - KMsvMediaIncorrect = -7001, - /** A CMsvEntry context is no longer valid because the location of the Message Server's - index has changed. - - Such contexts will need refreshing by the client. - - @see MMsvEntryObserver::EMsvContextInvalid */ - KMsvMediaChanged = -7002, - KMsvIndexBackup = -7003, - KMsvIndexRestore = -7004 - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvstore.h --- a/epoc32/include/msvstore.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,246 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MSVSTORE_H__) -#define __MSVSTORE_H__ - -#include -#include -#include - -class CMsvCachedStore; -class CMsvBodyText; -class CMsvAttachment; - -//********************************** -// MMsvStoreObserver -//********************************** -// -// -// - -class MMsvStoreObserver -/** Observer interface to get events relating to a message store. - -This is used in the derivation of CMsvServerEntry and CMsvEntry. - -@publishedAll -@released -*/ - { -public: -/** -Defines message store event types. - -@publishedAll -@released -*/ - enum TMsvStoreEvent { /** A read-only message store was closed. */ - EMsvReadStoreClosed, // read only CMsvStore closed - /** An editable message store was closed. */ - EMsvEditStoreClosed // edit only CMsvStore closed - }; -public: - /** Receives a message store event. - - @param aEvent Event type - @param aId ID of the message to which the event relates - */ - virtual void HandleStoreEvent(TMsvStoreEvent aEvent, TMsvId aId)=0; - }; - - -//********************************** -// CMsvStore -//********************************** -// -// The entry structure that the client uses -// - -/* -Uid which are not needed to be known outside CMsvStore -@internalComponent -@deprecated -*/ -const TUid KMsvEntryRichTextBody={0x10000F70}; - - -/** -UId for the 16-bit chunk storage mechanism. -@internalTechnology -@prototype -*/ -const TUid KMsvPlainBodyText16={0x10000F90}; - -/** -UId for the 8-bit chunk storage mechanism. -@internalTechnology -@prototype -*/ -const TUid KMsvPlainBodyText8={0x10000F80}; - -class MMsvAttachmentManager; -class MMsvAttachmentManagerSync; -class CMsvAttachmentManager; -class MMsvStoreManager; -class CMsvPlainBodyText; -class CMsvStore : public CBase -/** Provides an interface over the message store that is associated with a message -entry. It is similar to the dictionary store in supporting the concept of -streams referenced by UID. - -This class is intended for use by MTM implementations. Message client applications -access the store through the higher-level functions provided by Client-side -and User Interface MTMs. - -A CMsvStore object is created by a CMsvEntry object and passed to a client -process. The client process then becomes responsible for deleting the CMsvStore -object. The store can be opened in two modes, read or edit, and only one CMsvStore -object can have edit access to a store. - -CMsvStore provides functions for general manipulation of the store, and for -accessing the standard body text stream. RMsvReadStream and RMsvWriteStream -must be used to access other streams. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CMsvStore(); - // - IMPORT_C void StoreBodyTextL(const CRichText& aRichTextBody); - - IMPORT_C void RestoreBodyTextL(CRichText& aRichTextBody); - IMPORT_C void RestoreBodyTextL(CRichText& aRichTextBody, TUint aCharsetOverride); - - IMPORT_C void DeleteBodyTextL(); - IMPORT_C TBool HasBodyTextL() const; - // - IMPORT_C void DeleteL(); // deletes the message store - IMPORT_C TInt SizeL(); // the size of the store - // - // The following give the Dictionary store interface - IMPORT_C TBool IsNullL() const; - IMPORT_C TBool IsPresentL(TUid aUid) const; - IMPORT_C void Remove(TUid aUid); - IMPORT_C void RemoveL(TUid aUid); - IMPORT_C void Revert(); - IMPORT_C void RevertL(); - IMPORT_C TInt Commit(); - IMPORT_C void CommitL(); - - // Attachment Management - IMPORT_C MMsvAttachmentManager& AttachmentManagerL(); - IMPORT_C MMsvAttachmentManagerSync& AttachmentManagerExtensionsL(); - - // APIs to get the CMsvPlainBodyText interface. - IMPORT_C CMsvPlainBodyText* InitialisePlainBodyTextForWriteL(TBool aIs8Bit, TUint aCharsetId, TUint aDefaultCharsetId); - IMPORT_C CMsvPlainBodyText* InitialisePlainBodyTextForReadL(TInt aChunkLength); - - /** - @internalTechnology - @released - */ - IMPORT_C void CreateShareProtectedAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo); - void Restore8BitBodyTextL(RFileReadStream& aInputStream); - -protected: - - IMPORT_C CMsvStore(MMsvStoreObserver& aObserver, RFs& aFs, TMsvId aId, MMsvStoreManager& aStoreManager); - IMPORT_C static CMsvStore* OpenForReadL(MMsvStoreObserver& aObserver, RFs& aFs, MMsvStoreManager& aStoreManager, TMsvId aId); - IMPORT_C static CMsvStore* OpenForWriteL(MMsvStoreObserver& aObserver, RFs& aFs, MMsvStoreManager& aStoreManager, TMsvId aId); - -private: - - - void ConstructL(TBool aReadOnly); - - //Methods to handle plain bodytext. - void RestorePlainBodyTextL(CRichText& aRichText, TUint aCharsetOverride); - void GetRichTextFrom8BitL(RFile& aBodyTextFile, CRichText& aRichText, TUint aCharSet, TUint aDefaultCharSet); - void GetRichTextFrom16BitL(RFile& aBodyTextFile, CRichText& aRichText); - void Convert8BitToRichTextL(RFile& aBodyTextFile, CRichText& aRichText, TUint aCharSet, TUint aDefaultCharSet); - - void Lock(); - inline const CMsvCachedStore& Store() const; - inline CMsvCachedStore& Store(); -private: - enum {EMsvStoreUnlocked, EMsvStoreLocked} iLockStatus; - - RFs& iFs; - MMsvStoreObserver& iObserver; - - - const TMsvId iId; - CMsvCachedStore* iStore; - TBool iConstructed; - CMsvBodyText* iBodyText; - - MMsvStoreManager& iStoreManager; - CMsvAttachmentManager* iAttachmentManager; - -friend class CMsvEntry; -friend class CMsvServerEntry; -friend class RMsvReadStream; -friend class RMsvWriteStream; - }; - - -class RMsvReadStream : public RReadStream -/** Accesses the streams in a message store with read access. - -Before it is used, -a CMsvStore must have been opened on the message store with read or read/write -access. - -This class is intended for use by MTM implementations to store MTM-specific -information. Message client applications access the store through the higher-level -functions provided by Client-side and User Interface MTMs. - -Most of its functionality is provided by the base class RReadStream. -@publishedAll -@released -*/ - { -public: - IMPORT_C void OpenL(const CMsvStore& aMsvStore, TUid aUid); - IMPORT_C void OpenLC(const CMsvStore& aMsvStore,TUid aUid); - void OpenLC(CMsvCachedStore& aStore,TUid aUid); - }; - - -class RMsvWriteStream : public RWriteStream -/** Accesses the streams in a message store with write access, or creates new streams. -Before it is used, a CMsvStore must have been opened on the message store -with write access. - -This class is intended for use by MTM implementations to store MTM-specific -information. Message client applications access the store through the higher-level -functions provided by Client-side and User Interface MTMs. - -Most of its functionality is provided by the base class RWriteStream. -@publishedAll -@released -*/ - { -public: - IMPORT_C void AssignLC(CMsvStore &aMsvStore, TUid aUid); - IMPORT_C void AssignL(CMsvStore &aMsvStore, TUid aUid); - void AssignLC(CMsvCachedStore &aStore, TUid aUid); - }; - - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvsysagentaction.h --- a/epoc32/include/msvsysagentaction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// MsvSysAgentCondAction.H -// -// - -#ifndef __MSVSYSAGENTCONDACTION_H__ -#define __MSVSYSAGENTCONDACTION_H__ - - - - -#include - -///////////////////////////////////////////////////////////////////////////// -// -// System Agent-related Class Declarations -// -///////////////////////////////////////////////////////////////////////////// - - - -/** -Defines a condition which a Publish and Subscribe Uid must satisfy. - -@see RProperty - -@publishedAll -@released -*/ -class TMsvCondition - { -public: -/** -An enumeration defining the type of test to be made against a Publish -and Subscribe property. -*/ - enum TMsvSchSendConditionType - { - /** Tests that a value is equal to a state variable value. */ - EMsvSchSendEquals, - /** Tests that a value is unequal to a state variable value. */ - EMsvSchSendNotEquals, - /** Tests that a value is greater than a state variable value. */ - EMsvSchSendGreaterThan, - /** Tests that a value is less than a state variable value. */ - EMsvSchSendLessThan - }; - -public: - /** second UID of the process which set the condition*/ - TUid iVariable; - /** Integer state of corresponding P&S variable to be tested against*/ - TInt iState; - /** type of test to be performed */ - TMsvSchSendConditionType iType; - }; - - -/** -Schedule Send condition must be satisfied before a message sending attempt. - -@publishedAll -@released -*/ - -class TMsvSysAgentConditionAction - { -public: - IMPORT_C TMsvSysAgentConditionAction(); - - - /** Condition to meet. */ - TMsvCondition iCondition; - - /** Error action to use. */ - TMsvSendErrorAction iErrorAction; - - /** Default error action. */ - TBool iUseDefaultSysAgentAction; - -private: - }; - - - -/** -Defines an array of schedule send conditions that must be satisfied before a message sending attempt. - -@see TMsvSysAgentConditionAction - -@publishedAll -@released -*/ - -class CMsvSysAgentActions : public CArrayFixFlat - { -public: - IMPORT_C CMsvSysAgentActions(); - IMPORT_C ~CMsvSysAgentActions(); - - - IMPORT_C TBool ConditionsMetL(TMsvSendErrorAction& aErrorAction); - - /** Default send error action. */ - TMsvSendErrorAction iDefault; - -private: - - - void GetConditionVariablesL(CArrayFix& aUids) const; - TBool CheckStates(const CArrayFix& aStates, TMsvSendErrorAction& aErrorAction) const; - TBool ConditionOK(const TMsvSysAgentConditionAction& aCondAction, const TInt aState) const; - - }; - -#endif // __MSVSYSAGENTCONDACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/msvuids.h --- a/epoc32/include/msvuids.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ -#if !defined(__MSVUIDS_H__) -#define __MSVUIDS_H__ -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__MSVSTD_HRH__) -#include -#endif - - -/** -* Entry type Uids -* @publishedAll -* @released -*/ -const TUid KUidMsvNullEntry={0}; -/** -* Root entry of entire index -* @publishedAll -* @released -*/ -const TUid KUidMsvRootEntry={KUidMsvRootEntryValue}; -// Service -/** -* @publishedAll -* @released -*/ -const TUid KUidMsvServiceEntry={KUidMsvServiceEntryValue}; -// Folder -/** -* @publishedAll -* @released -*/ -const TUid KUidMsvFolderEntry={KUidMsvFolderEntryValue}; -// Message -/** -* @publishedAll -* @released -*/ -const TUid KUidMsvMessageEntry={KUidMsvMessageEntryValue}; -// Entry -/** -* @publishedAll -* @released -*/ -const TUid KUidMsvAttachmentEntry={KUidMsvAttachmentEntryValue}; - -// Local Service Uid -// An operation that affects only local entries. -/** -* @publishedAll -* @released -*/ -const TUid KUidMsvLocalServiceMtm={KUidMsvLocalServiceMtmValue}; -//An operation performed by the Message Server. -/** -* @publishedAll -* @released -*/ -const TUid KUidMsvServerMtm={KUidMsvServerMtmValue}; -// Key for Publish & Subscribe Disk Space Monitor -/** -* @publishedAll -* @released -*/ -const TInt KUidPSDiskSpaceMonitorKeyType={0x2001FC30}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtclbase.h --- a/epoc32/include/mtclbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,550 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#ifndef __MTCLBASE_H__ -#define __MTCLBASE_H__ - -#include -#include -#include - -#include -#include -#include - -/** -UId for 8-bit/16-bit Character set mechanism. -@internalTechnology -@prototype -*/ -const TInt KUIDCharacterSet = 999; - -class CMsvAttachmentWaiter; - - -/** Specifies one or more parts of a message in message-forwarding, message-reply, -and message-validation functions. - -Standard message parts are defined by the constants that can be added (or -bitwise-or'ed) together to specify multiple parts. Some message parts may -not be meaningful for some MTMs. - -Specifies find attributes which modify the behaviour of the search text utility -provided by the Global Find API. This does not apply to v5.1 nor to v5. */ -typedef TUint TMsvPartList; - -class CParaFormatLayer; -class CCharFormatLayer; - - -/** Specifies function IDs for standard MTM functions. - -The function IDs are specified such that they do not coincide -with the free area defined for MTM commands. - -If MTMs also offer their own equivalents of these functions, -they may implement these function IDs by considering the -two IDs to be the same in their client MTM. - -MTMs that support SendAs must support SendMessage. -*/ -enum TMtmStandardAsyncCommands - { - KMTMStandardFunctionsSendMessage = KMtmFirstFreeStandardMtmFunctionId - }; - - -//////////////////////////////////////////////////////// -// Prototype of expected factory function - -typedef CBaseMtm* MtmFactoryFunctionL(CRegisteredMtmDll&, CMsvSession&); - - -/*********************************************** -***********************************************/ -class CBaseMtm : public CBase, public MMsvEntryObserver -/** Provides a high-level interface for accessing and manipulating a Message Server -entry. - -Message client applications use the class to access such functionality polymorphically. -MTM implementers implement a derived class to provide such functionality for -their message protocol. - -The following are some significant groups of functions: - -Context functions: the SetCurrentEntryL() and SwitchCurrentEntryL() functions -change the context - the entry on which later actions are performed. After -creating a new Client-side MTM object, a message client application should -set an initial context before using other functions. Note that: any changes -made to an existing context are not automatically saved: the message client -application should ensure this itself by calling SaveMessageL(); no message -data for the new context is retrieved from the Message Server, to retrieve -entry data, call LoadMessageL() after setting the context; calling Body() -immediately after setting the context returns an empty CRichText object: this -is because the private cache of context body text that the base class maintains -is re-initialised to an empty value. MTM implementers should note that the -virtual ContextEntrySwitched() is called from these functions to allow derived -classes to also clear any caches of MTM-specific entry data. - -Store and restore entry data functions: the changes that a message client -application makes to a message context through Client-side MTM functions, -such as altering the body text obtained through Body(), are, for efficiency, -cached in memory by a Client-side MTM. The message store and restore functions -are concerned with transferring data between that cache and committed storage. -Note that, unlike message contexts, message client applications are not expected -to manipulate directly service contexts. Instead, the corresponding User Interface -MTM will provide dialogs to allow the user to alter service settings, and -call Client-side MTM functions to handle their retrieval and storage. Symbian -OS v5 expects the base class functions to handle storage and retrieval for -both message and service contexts, and their implementations must detect what -the context is, and act accordingly. Post-v5, the API is clarified by restricting -the base class functions to handle message contexts only. To handle service -contexts, a Client-side MTM must define its own functions for the User Interface -MTM to call. - -Store and restore body text functions: the base class maintains a private -CRichText object cache to store the body text for the current context. This -can be accessed for reading and writing by message client applications through -Body(). StoreBodyL() and RestoreBodyL() encapsulate for implementers of derived -classes the retrieval and storage of this CRichText object to a CMsvStore. - -Address list functions: the format and storage of message addresses is MTM-specific. -AddresseeList(), AddAddresseeL(), and RemoveAddressee() are designed to allow -clients with no MTM-specific knowledge to access address information in a -generic way. The base class has a protected data member iAddresseeList, an -array of descriptors, which these functions manipulate. Implementations should -save the address information to the appropriate place in the message store -when the message is stored. - -MTM-specific functionality: MTM components can offer protocol-specific functionality -not provided by base class interface functions. MTM components define IDs -that correspond to each protocol-specific operation offered, and implement -the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients -to access these operations by passing in the appropriate ID. Two functions -are provided to allow the MTM component to offer both synchronous and asynchronous -functionality. Message client applications can dynamically add user-interface -features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). -MTM developers should document the IDs if they wish to make the operations -available to clients. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CBaseMtm(); - IMPORT_C TUid Type() const; - // - // context related - IMPORT_C void SetCurrentEntryL(CMsvEntry* aEntry); - IMPORT_C void SwitchCurrentEntryL(TMsvId aId); - IMPORT_C CMsvEntry& Entry() const; - IMPORT_C TBool HasContext() const; - // - // - /** Commits cached changes to the storage controlled by the Message Server. - - It can only be called on message contexts. It should be called in the following circumstances: - - 1. to preserve changes when the context is changed, or when the Client-side MTM - object is deleted - - 2. to enable other parts of the Messaging to access the updated entry, as required, - for example, before sending a message - - Requirements: - - An implementation must update the store and index entry relating to the message - context. Typically, the message store should be opened for editing with CMsvEntry::EditStoreL(). - It should be updated as follows: - - 1. body text: call StoreBodyL() to update the store's body text stream - - 2. address list: update the appropriate MTM-specific area of the store from the - data in iAddresseeList - - 3. subject: if supported, update the appropriate MTM-specific area of the store - from the private cache set by SetSubjectL() - - Changes can then be committed to the store with CMsvStore::CommitL(). - - The index entry should also be updated to reflect changes. Possible fields - that may need updating include: Description (for subject changes); Details - and Multiple Recipients (for recipient changes); and Size. Index entry changes - are committed using CMsvEntry::ChangeL(). - - The function should panic for non-message contexts. */ - virtual void SaveMessageL()=0; - /** Loads the cache with the message data for the current context. - - It can only be called on message contexts. - - It is typically used after the context has been set with SetCurrentEntryL() - or SwitchCurrentEntryL(). CBaseMtm functions to manipulate the entry can only - be called after this function has been called. - - Requirements: - - An implementation must restore the store and index entry relating to the message - context. Typically, the message store should be opened for reading with CMsvEntry::ReadStoreL(). - It should be then be read to set the following: - - 1. body text: call RestoreBodyL() to update the cached body text - - 2. address list: read the appropriate MTM-specific area of the store to update - iAddresseeList - - 3. subject: if supported, read the appropriate MTM-specific area of the store - and update the cache with SetSubjectL() - - The function should panic for non-message contexts. */ - virtual void LoadMessageL()=0; - /** Validates the current message context. - - The precise validation performed is specific to the MTM, but, typically, checks - that the specified message parts are well-formed. - - Requirements: - - Implementation of this function is highly protocol-specific. A minimum step - is to check that the current context is a message. - - @param aPartList Indicates the message parts for which validation is requested - - @return If valid, KErrNone If invalid, identifies the invalid part(s). The - error value is the bitmask of the TMsvPartList IDs for each invalid part */ - virtual TMsvPartList ValidateMessage(TMsvPartList aPartList)=0; - /** Searches the specified message part(s) for the plain-text version of the text - to be found. - - If the specified part list indicates a part that is not supported, or is not - present in the current message, the function behaves as if the specified part - exists but does not contain the required text. - - Requirements: - - The parts of the entry for which searching is allowed is implementation specific. - If no searching is supported, always return 0. - - @param aTextToFind The plain-text version of the text to be found. - @param aPartList Indicates the message parts which should be searched. - @return If the text was not found, or searching is unsupported, 0. If the text - was found, a bitmask of the TMsvPartList IDs for each part in which the text - was present. */ - virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList)=0; - // - // - /** Creates a reply message to the current message context. - - Some MTMs may support inclusion of elements, specified by aPartlist, from - the original message in the reply. The parent for the new entry is specified - in aDestination. - - The returned CMsvOperation object completes when creating the reply is complete. - On completion, the context is set to the reply message. - - Requirements: - - A typical implementation for this function would include the following steps: - - 1. create a new message in the specified destination by calling CMsvEntry::CreateL() - - 2. set the entry index values as appropriate - - 3. set the properties of the message as required. The normal minimum is to set - the address to the sender of the original message. An implementation may also - follow the options specified in aPartlist to set other properties, for example, - to include the original message text. - - 4. set the context to the reply - - 5. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - If message replies are not supported, implementations should leave with KErrNotSupported. - - The implementation of this function may be similar to that of ForwardL(), - allowing opportunities for code sharing. - - @param aDestination The entry to which to assign the reply - @param aPartlist Defines the parts that are to be copied from the original - message into the reply - @param aCompletionStatus The request status to be completed when the operation - has finished - @leave KErrNotSupported The Client-side MTM does not support reply operations - @leave Other leave codes Dependent on implementation - @return If successful, this is an asynchronously completing reply operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus)=0; - /** Creates a forwarded message from the current message context. - - Some MTMs may - support inclusion of elements, specified by aPartlist, from the original message - in the forwarded message. The parent for the new entry is specified in aDestination. - The returned CMsvOperation object completes when editing the forwarded message - is complete. On completion, the context is set to the forwarded message. - - Requirements: - - A typical implementation for this function would include the following steps: - - 1. create a new message in the specified destination by calling CMsvEntry::CreateL() - - 2. set the entry index values as appropriate - - 3. set message content as required. The normal minimum is to include the text - of the original message. An implementation may also follow the options specified - in aPartlist to include other properties of the original message. - - 4. set the context to the reply - - 5. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - If forwarded messages are not supported, implementations should leave with - KErrNotSupported. - - The implementation of this function may be similar to that of ReplyL(), allowing - opportunities for code sharing. - - @param aDestination The entry to which to assign the forwarded message - @param aPartList Defines the parts that are to be copied from the original - message into the forwarded message - @param aCompletionStatus The request status to be completed when the operation - has finished - @leave KErrNotSupported The Client-side MTM does not support creation of forwarded - messages - @leave Other leave codes Dependent on implementation - @return If successful, this is an asynchronously completing forward message - operation. If failed, this is a completed operation, with status set to the - relevant error code. */ - virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus)=0; - // - // addresssee list (used by objects with no MTM knowledge) - IMPORT_C const CMsvRecipientList& AddresseeList() const; - - /** Adds an addressee for the current context. - - Addresses are not validated by checking their format by this function. Usually - that is performed by calling ValidateMessage(). - - Requirements: - - Implementations should append the address to the object's address cache - in the protected iAddresseeList data member. Some implementations may also - wish to store addresses in an internal data structure appropriate for the - protocol, for example, a class holding message header information. - - @param aRealAddress String representing an address to be added to the list - for the current message - @leave KErrNotSupported The message already has the maximum number of addressees - - @leave Other leave codes Dependent on implementation */ - virtual void AddAddresseeL(const TDesC& aRealAddress)=0; - /** Adds an addressee for the current context, and enables the client to specify - an alias, which may be useful for some protocols. For example, for fax, if - the address is the fax number, the alias could supply the recipient's name. - - Addresses are not validated by checking their format by this function. Usually - that is performed by calling ValidateMessage(). - - Requirements: - - Implementations should append the address to the object's address cache - in the protected iAddresseeList data member. Some implementations may also - wish to store addresses in an internal data structure appropriate for the - protocol, for example, a class holding message header information. - - @param aRealAddress String representing an address to be added to the list - for the current message - @param aAlias Alias information - @leave KErrNotSupported The message already has the maximum number of addressees - - @leave Other leave codes Dependent on implementation */ - virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias)=0; - - IMPORT_C virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress); - IMPORT_C virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress, const TDesC& aAlias); - - /** Removes an address from the current address list. The address is specified - by a zero-based index into the address list. If the index is not known, applications - can use AddresseeList() to retrieve the entire list to find the item. - - Requirements: - - Implementations should call iAddresseeList->Delete(aIndex) to remove the address - from in the address list protected data member. - - @param aIndex Index of address to be removed */ - virtual void RemoveAddressee(TInt aIndex)=0; - // - // standard data accessor/mutators - IMPORT_C CRichText& Body(); - IMPORT_C const CRichText& Body() const; - IMPORT_C virtual void SetSubjectL(const TDesC& aSubject); // default leaves with KErrNotSupported - IMPORT_C virtual const TPtrC SubjectL() const; // default leaves with KErrNotSupported - // - // RTTI functions - IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); // default returns KErrNotSupported - /** Invokes synchronous protocol-specific operations. For asynchronous operations, - a similar function, InvokeAsyncFunctionL(), is available. - - aSelection and aParameter allow data to be passed to the operation. - - Requirements: - - For functionality that requires message transport access, such as making a - connection, the implementation should pass the request onto the corresponding - Server-side MTM. This is done through calling CMsvSession::TransferCommandL(). - Implementations may also provide protocol-specific functions themselves if - this is useful. - - @param aFunctionId ID of the requested operation - @param aSelection Selection of message entries. This is used if the operation - requires message entries to work on. - @param aParameter Buffer containing input and output parameters. The format - of this is specific to the operation. - @leave KErrNotSupported aFunctionId is not a recognised operation ID - @leave Other leave codes Dependent on implementation */ - virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter)=0; - /** Invokes asynchronous protocol-specific operations. For synchronous operations, - a similar function, InvokeSyncFunctionL(), is available. - - aSelection and aParameter allow data to be passed to the operation. The TRequestStatus - and CMsvOperation objects are used as normal to control and monitor the operation. - - Requirements: - - For functionality that requires message transport access, such as making a - connection, the implementation should pass the request onto the corresponding - Server-side MTM. This is done through calling CMsvSession::TransferCommandL(). - Implementations may also provide protocol-specific functions themselves if - this is useful. - - InvokeAsyncFunctionL() should return a CMsvOperation-derived object to provide - asynchronous control and monitoring of the operation. If CMsvSession::TransferCommandL() - is called, this should be the CMsvOperation object returned by that function. - - @param aFunctionId ID of the requested operation - @param aSelection Selection of message entries. This is used if the operation - requires message entries to work on. - @param aParameter Buffer containing input and output parameters. The format - of this is specific to the operation. - @param aCompletionStatus The request status to be completed when the operation - has finished - @leave KErrNotSupported aFunctionId is not a recognised operation ID - @leave Other leave codes Dependent on implementation - @return If successful, this is an asynchronously completing operation. If failed, - this is a completed operation, with status set to the relevant error code. */ - virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus)=0; - // - IMPORT_C CMsvSession& Session(); - - // Attachment functions to support the SendAs API - virtual inline void Filler1() {}; - virtual inline void Filler2() {}; - IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); - IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void CancelAttachmentOperation(); - - IMPORT_C virtual void CreateMessageL(TMsvId aServiceId); - - // BIO functions to support the SendAs API - // Entry().Entry().iBioType will be set by SendAs if this function does not leave. - // The default implementation in CBaseMtm is to do nothing. - IMPORT_C virtual void BioTypeChangedL(TUid aBioTypeUid); - - IMPORT_C virtual TMsvId DefaultServiceL() const; - IMPORT_C virtual void RemoveDefaultServiceL(); - IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); - - //For setting the character encoding value, options are 7-bit, 8-bit and 16-bit Unicode. - IMPORT_C TInt SetMessageCharacterSet(TUint aCharSet); - -protected: - IMPORT_C CBaseMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession); - // - IMPORT_C void StoreBodyL(CMsvStore& aStore); - IMPORT_C void RestoreBodyL(CMsvStore& aStore); - // - /** Called by the base class functions SwitchCurrentEntryL() and SetCurrentEntryL() - when the context is changed to another entry. - - Client applications do not use this function. It is relevant only to implementers - of derived classes. - - Requirements: - - An implementation should clear: - - 1. address data stored in iAddresseeList - - 2. any caches of MTM-specific entry data relating to a previous context. For - example, if the implementation has a private buffer storing a message subject, - for access through Subject(), this buffer should be cleared. */ - virtual void ContextEntrySwitched()=0; // called after the context of this instance has been changed to another entry - // - IMPORT_C void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - - // Method used for extension: called by non virtual methods that need - // to have a polymorphic behaviour. - IMPORT_C virtual TAny* GetInterface(TUid aUid); - - // From CBase - IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); - - -private: - void DeleteEntry(); - - void AddFilePathAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, CMsvAttachment::TMsvAttachmentType aType, TRequestStatus& aStatus); - -protected: - /** The current context. */ - CMsvEntry* iMsvEntry; - /** The address list for the current context. */ - CMsvRecipientList* iAddresseeList; - - /** Paragraph formatting applied to the CRichText object for the body text, as - returned by Body(). This is set to an empty CParaFormatLayer instance whenever - the context is set. - - Implementations can modify this if they wish to apply particular formatting - to body text. */ - CParaFormatLayer* iParaFormatLayer; - /** Character formatting applied to the CRichText object for the body text, as - returned by Body(). - - Implementations can modify this if they wish to apply particular formatting - to body text. */ - CCharFormatLayer* iCharFormatLayer; - -private: - TMsvId iEntryId; - CRichText* iRichTextBody; - CRegisteredMtmDll& iRegisteredMtmDll; - CMsvSession& iSession; - CMsvAttachmentWaiter* iAttachmentWaiter; - - // Extra data member to allow for future extensions - TAny* iExtensionData; - }; - - -#endif // __MTCLBASE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtclreg.h --- a/epoc32/include/mtclreg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#if !defined __MTCLREG_H__ -#define __MTCLREG_H__ - -#include // CActive, TFileName etc. -#include -#include // MMsvSessionObserver - -// CObserverRegistry mixes in session notification API -// this allows run-time update of the registries on the client-side. -// the server registry should inherit from CMtmDllRegistry -class CObserverRegistry : public CMtmDllRegistry, public MMsvSessionObserver -/** Base class for client, UI and UI data MTM registries. - -It implements the session observer interface to update the registry information -when MTM groups are installed or uninstalled. -@publishedAll -@released -*/ - { -public: - IMPORT_C virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); - IMPORT_C ~CObserverRegistry(); - -protected: - IMPORT_C CObserverRegistry(CMsvSession& aMsvSession,TUid aDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); - IMPORT_C void ConstructL(); - -protected: - CMsvSession& iMsvSession; - TBool iIsAdded; - }; - -// Client side MTM registry -class CClientMtmRegistry : public CObserverRegistry -/** Accesses the Client-side MTM registry. - -This registry holds details of the all the Client-side MTMs currently available -on the system. Message client applications use this class to get a CBaseMtm-derived -object by which to access Client-side MTM functionality. - -Note that the base class CMtmDllRegistry provides functions for discovering -what MTMs are present in the registry. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CClientMtmRegistry* NewL(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)); - IMPORT_C ~CClientMtmRegistry(); - IMPORT_C CBaseMtm* NewMtmL(TUid aMtmTypeUid); - // -protected: - CClientMtmRegistry(CMsvSession& aMsvSession,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); - void ConstructL(); - // -private: - CBaseMtm* DoNewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const; - }; - -#endif // __MTCLREG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtmdef.h --- a/epoc32/include/mtmdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#if !defined(__MTMDEF_H__) -#define __MTMDEF_H__ -#if !defined(__MTCLBASE_H__) -#include -#endif -#if !defined(__MTMDEF_HRH__) -#include -#endif - -// no matching message parts - -const TMsvPartList KMsvMessagePartNone = 0x00000000; -// message parts - -// Message body -const TMsvPartList KMsvMessagePartBody = 0x00000001; - -// Message recipients - -const TMsvPartList KMsvMessagePartRecipient = 0x00000002; - -// Message originator - -const TMsvPartList KMsvMessagePartOriginator = 0x00000004; -// Message description -const TMsvPartList KMsvMessagePartDescription = 0x00000008; -// Message date - -const TMsvPartList KMsvMessagePartDate = 0x00000010; -// Message attachments - -const TMsvPartList KMsvMessagePartAttachments = 0x00000020; - -// find attributes -//Flag to specify case-sensitive search. - -const TMsvPartList KMsvFindCaseSensitive = 0x80000000; -// Flag to specify search for whole words. - -const TMsvPartList KMsvFindWholeWord = 0x40000000; - -// Maximum length (in characters) of find text. - -const TInt KMsvMaxFindTextLength = 500; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtmuibas.h --- a/epoc32/include/mtmuibas.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,527 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MTMUIBAS_H__) -#define __MTMUIBAS_H__ - -#if !defined(__MSVSTD_H__) -#include -#endif -#if !defined(__MTCLBASE_H__) -#include -#endif - -// Forward references -class CMsvSession; -class CMsvOperation; -class CCoeEnv; - -/////////////////////////////////// -// CBaseMtmUi - MTMUi base API // -/////////////////////////////////// -class CBaseMtmUi : public CBase -/** Provides MTM-specific user interaction, such as editing, viewing, deleting, -and copying of message entries. - -Message client applications use the class to access such functionality polymorphically. -MTM implementers implement a derived class to provide such functionality for -their message protocol. - -The base class is largely an interface definition: it implements little important -functionality itself. For implementers, this documentation defines conditions -that any implementation must fulfil, plus suggested semantics for behaviour. -This still leaves many decisions in the hands of the implementer. A key design -time activity is to define how the particular characteristics of the implemented -protocol are best mapped to the interface. As this class is concerned with -user interfaces, implementers should be sensitive to the look and feel of -the target phone. - -Many functions are required to return an instance of a CMsvOperation-derived -class to provide asynchronous control and monitoring to the caller of the -operation being performed. - -The following are some significant groups of functions: - -Entry manipulation functions: OpenL(), CloseL(), EditL(), and ViewL() are -all available in two overloaded versions. The first version operates on the -current context. The second version operates upon groups of entries specified -by a CMsvEntrySelection argument. All entries must be in same folder and all -of the correct MTM type. The context may change after calling these functions. -Concrete User Interface MTMs can legally ignore any of the entries within -the selection - many may, for example, simply open the first entry. - -Copying and moving functions: the CopyToL(), CopyFromL(), MoveToL(), and MoveFromL() -functions are concerned with copying and moving entries to and from remote -servers. MTMs can implement these functions to provide any user interaction -needed before copying or moving can proceed, such as dialogs to confirm settings; -and, any protocol-specific setup steps that can be done at this stage: for -example, a fax MTM could render messages into the required image format. - -Progress information functions: DisplayProgressSummary() and GetProgress() -convert MTM-specific progress information about some asynchronous operation, -such as message sending, to a human-readable form. The progress information -to pass into these functions is, in general, obtained from an on-going CMsvOperation -by calling CMsvOperation::Progress(). The nature of any information provided -is MTM-specific. - -MTM-specific UI functions: MTM components can offer protocol-specific functionality -not provided by base class interface functions. MTM components define IDs -that correspond to each protocol-specific operation offered, and implement -the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients -to access these operations by passing in the appropriate ID. Two functions -are provided to allow the MTM component to offer both synchronous and asynchronous -functionality. Message client applications can dynamically add user-interface -features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). -MTM developers should document the IDs if they wish to make the operations -available to clients. -@publishedAll -@released -*/ - { -public: - // --- enums --- - /** Progress information buffer length. */ - enum { - /** Defines the maximum buffer length used in GetProgress() to hold progress information. */ - EProgressStringMaxLen=255}; - // - // --- Set up functionality --- - IMPORT_C void SetPreferences(TUint aFlags); - IMPORT_C TUint Preferences() const; - // - // --- Destruction --- - IMPORT_C virtual ~CBaseMtmUi(); - // - // --- Accessor functions --- - IMPORT_C TUid Type() const; - IMPORT_C CBaseMtm& BaseMtm() const; - // - // --- Functions NOT dependent on the current context --- - IMPORT_C virtual CMsvOperation* CreateL(const TMsvEntry& aEntry, CMsvEntry& aParent, TRequestStatus& aStatus); - // - // --- Functions dependent on the current context --- - /** Opens an entry. - - The behaviour that this implies is dependent on the current context: - - 1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only - messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific. - - 2. for service contexts, the function may initiate a connection to obtain the - service contents from the server, completing asynchronously - - 3. for remote folder contexts, dependent on implementation, the function may - initiate a connection to obtain the folder contents from the server, completing - asynchronously - - The returned CMsvOperation object completes when opening is complete. - - Requirements: - - If opening entries is not supported, implementations should leave with KErrNotSupported. - Otherwise, implementations should: - - 1. check aEntry.iType.iUid to ensure that they can open the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - 3. for remote messages, typically, copy the messages to the Inbox - - @param aStatus The request status to be completed when the operation has finished - - @leave KErrNotSupported The User Interface MTM does not support open operations, - or opening is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing open operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* OpenL(TRequestStatus& aStatus) = 0; - /** Closes an entry. The behaviour that this implies is dependent on the current - context: - - 1. for message contexts, this usually closes any launched editors or viewers - - 2. for folder contexts, leaves with KErrNotSupported - - 3. for service contexts, causes closure of a connection to a server - - The returned CMsvOperation object completes when closing is complete. - - Requirements: - - Implementations should: - - 1. check aEntry.iType.iUid to ensure that they can close the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - @param aStatus The request status to be completed when the operation has finished - - @leave KErrNotSupported The User Interface MTM does not support close operations, - or closing is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing close operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* CloseL(TRequestStatus& aStatus) = 0; - /** Edits an entry. - - The behaviour that this implies is dependent on the current - context: - - 1. for message contexts, this usually launches the appropriate message editor, - or returns status KErrReadOnly if the message is not editable - - 2. for remote folder contexts, launches a settings dialog, for example to rename - the folder, completing asynchronously - - 3. for service contexts, launches a service settings dialog, completing asynchronously - - The returned CMsvOperation object completes when editing is complete. - - Requirements: - - Implementations should: - - 1. check aEntry.iType.iUid to ensure that they can edit the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - 3. for remote messages, typically, copy the messages to the Inbox - - 4. follow the leave protocols described in Leave considerations below - - @param aStatus The request status to be completed when the operation has finished - @leave KErrNotSupported The User Interface MTM does not support edit operations, - or editing is inappropriate to the current context - @leave KErrReadOnly Context is read-only - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing edit operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* EditL(TRequestStatus& aStatus) = 0;// Launches editor/settings dialog as appropriate - /** Views an entry. - - For message contexts, this usually launches the appropriate - message viewer. Other context types leave with KErrNotSupported. The returned - CMsvOperation object completes when viewing is complete. - - Requirements: - - Implementations should: - - 1. check aEntry.iType.iUid to ensure that they can view the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - @param aStatus The request status to be completed when the operation has finished - @leave KErrNotSupported The User Interface MTM does not support view operations, - or viewing is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing view operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* ViewL(TRequestStatus& aStatus) = 0;// Launches viewer/settings dialog as appropriate - // - // --- Actions upon message selections --- - // --- Selections must be in same folder and all of the correct MTM type --- - // --- Context may change after calling these functions --- - /** Opens a selection of entries. - - The behaviour that this implies is dependent on the current context: - - 1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only - messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific. - - 2. for service contexts, the function may initiate a connection to obtain the - service contents from the server, completing asynchronously - - 3. for remote folder contexts, dependent on implementation, the function may - initiate a connection to obtain the folder contents from the server, completing - asynchronously - - The returned CMsvOperation object completes when opening is complete. - - Requirements: - - If opening entries is not supported, implementations should leave with KErrNotSupported. - Otherwise, implementations should: - - 1. check aEntry.iType.iUid to ensure that they can open the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - 3. for remote messages, typically, copy the messages to the Inbox - - @param aStatus The request status to be completed when the operation has finished - @param aSelection Selection of message entries - @leave KErrNotSupported The User Interface MTM does not support open operations, - or opening is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing open operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* OpenL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; - /** Closes a selection of entries. - - The behaviour that this implies is dependent on the current context: - - 1. for message contexts, this usually closes any launched editors or viewers - - 2. for folder contexts, leaves with KErrNotSupported - - 3. for service contexts, causes closure of a connection to a server - - The returned CMsvOperation object completes when closing is complete. - - Requirements: - - Implementations should: - - 1. check aEntry.iType.iUid to ensure that they can close the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - @param aStatus The request status to be completed when the operation has finished - @param aSelection Selection of message entries - @leave KErrNotSupported The User Interface MTM does not support close operations, - or closing is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing close operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* CloseL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; - /** Edits a selection of entries. - - The behaviour that this implies is dependent on the current context: - - 1. for message contexts, this usually launches the appropriate message editor, - or returns status KErrReadOnly if the message is not editable - - 2. for remote folder contexts, launches a settings dialog, for example to rename - the folder, completing asynchronously - - 3. for service contexts, launches a service settings dialog, completing asynchronously - - The returned CMsvOperation object completes when editing is complete. - - Requirements: - - Implementations should: - - 1. check aEntry.iType.iUid to ensure that they can edit the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - 3. for remote messages, typically, copy the messages to the Inbox - - 4. follow the leave protocols described in Leave considerations below - - @param aStatus The request status to be completed when the operation has finished - @param aSelection Selection of message entries - @leave KErrNotSupported The User Interface MTM does not support edit operations, - or editing is inappropriate to the current context - @leave KErrReadOnly Context is read-only - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing edit operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* EditL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches editor/settings dialog as appropriate - /** Views a selection of entries. - - For message contexts, this usually launches the appropriate - message viewer. Other context types leave with KErrNotSupported. The returned - CMsvOperation object completes when viewing is complete. - - Requirements: - - Implementations should: - - 1. check aEntry.iType.iUid to ensure that they can view the requested type of - entry and leave with code KErrNotSupported if they cannot - - 2. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - @param aStatus The request status to be completed when the operation has finished - @param aSelection Selection of message entries - @leave KErrNotSupported The User Interface MTM does not support view operations, - or viewing is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing view operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* ViewL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches viewer/settings dialog as appropriate - /** Cancels the sending of specified messages. - - @param aStatus The request status to be completed when the operation has finished - @param aSelection Selection of message entries - @leave KErrNotSupported The User Interface MTM does not support cancel operations, - or cancelling is inappropriate to the current context - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing cancel operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* CancelL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; - // - // --- Deletion --- - // --- Deletes entries from the current context, which must be a folder or service of the relevant MTM --- - IMPORT_C virtual CMsvOperation* DeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Deletes selection from current context - // --- Un-deletes entries from the current context, which must be a folder or service of the relevant MTM --- - IMPORT_C virtual CMsvOperation* UnDeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Un-deletes selection from current context - // --- Deletes service, which need not be the current context --- - IMPORT_C virtual CMsvOperation* DeleteServiceL(const TMsvEntry& aService, TRequestStatus& aStatus); // default implementation simply delegates to the server - // - // --- Message responding --- - /** Creates a reply message to the current message context, and allows the user - to edit it through a message-type specific editor. - - Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the reply. - The parent for the new entry is specified in aDestination. The returned CMsvOperation - object completes when editing the reply is complete. On completion, the context - is set to the reply message. - - Requirements: - - A typical implementation for this function would include the following steps: - - 1. create a new reply entry by calling CBaseMtm::ReplyL() - - 2. call EditL() allow the user to edit the reply - - 3. return a CMsvOperation-derived object to provide asynchronous control and - monitoring of the operation - - If message replies are not supported, implementations should leave with KErrNotSupported. - - @param aDestination The entry to which to assign the reply - @param aPartlist Defines the parts which are to be copied from the original - message into the reply. See CBaseMtm::ReplyL() for details. - @param aCompletionStatus The request status to be completed when the operation - has finished - @leave KErrNotSupported The User Interface MTM does not support reply operations - @leave Other Dependent on implementation - @return If successful, this is an asynchronously completing reply operation. - If failed, this is a completed operation, with status set to the relevant - error code. */ - virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus) = 0; - /** - Creates a forwarded message from the current message context, and allows the user to edit it through a message-type - specific editor. - - Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the - forwarded message. The parent for the new entry is specified in aDestination. The returned CMsvOperation - object completes when editing the forwarded message is complete. On completion, the context is set to the forwarded message. - - Requirements: - - A typical implementation for this function would include the following steps: - - 1. create a new forwarded message entry by calling CBaseMtm::ForwardL() - - 2. call EditL() allow the user to edit the forwarded message - - 3. return a CMsvOperation-derived object to provide asynchronous control and monitoring of the operation - - If forwarded messages are not supported, implementations should leave with KErrNotSupported. - - @return If successful, this is an asynchronously completing forward message operation. If failed, - this is a completed operation, with status set to the relevant error code. - @param aDestination The entry to which to assign the forwarded message - @param aPartList Defines the parts which are to be copied from the original message into the forwarded message - @param aCompletionStatus The request status to be completed when the operation has finished - @leave KErrNotSupported The User Interface MTM does not support message forwarding operations - @leave Other Dependent on implementation - */ - virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus) = 0; - - // - // --- Copy and move functions --- - // --- Context should be set to folder or entry of this MTM --- - // --- Default implementations imply call the relevant CMsvEntry functions --- - IMPORT_C virtual CMsvOperation* CopyToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to copy to - IMPORT_C virtual CMsvOperation* MoveToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to move to - IMPORT_C virtual CMsvOperation* CopyFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to copy from - IMPORT_C virtual CMsvOperation* MoveFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to move from - // - // --- Interpret transfer progress --- - IMPORT_C virtual TInt DisplayProgressSummary(const TDesC8& aProgress) const;// Used for display operation summary (usually completed operations). Default implementation returns KErrNotSupported. - IMPORT_C virtual TInt GetProgress(const TDesC8& aProgress, TBuf& aReturnString, TInt& aTotalEntryCount, TInt& aEntriesDone, - TInt& aCurrentEntrySize, TInt& aCurrentBytesTrans) const;// Default implementation returns KErrNotSupported - // - // --- RTTI functions --- - IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); - IMPORT_C virtual void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); - IMPORT_C virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TRequestStatus& aCompletionStatus, - TDes8& aParameter); - -protected: - // --- Construction --- - IMPORT_C CBaseMtmUi(CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll); - IMPORT_C virtual void ConstructL(); - /** Sets the full path and name of the resource file associated with the User Interface MTM. - - Client applications do not use this function. It is relevant only to implementers of derived classes. - - Requirements: - - The function is called by CBaseMtmUi::ConstructL(), which then loads the resource - file. - - @param aFileName Filename buffer to be filled with the resource file path - and name */ - virtual void GetResourceFileName(TFileName& aFileName) const = 0; - // - // --- Utility functions --- - IMPORT_C CMsvSession& Session() const; - - // Method used for extension: called by non virtual methods that need - // to have a polymorphic behaviour. - IMPORT_C virtual TAny* GetInterface(TUid aUid); - -protected: - // --- Data --- - /** The CBaseMtm-derived object (Client-side MTM) that requested the User Interface - MTM. It is set by the constructor. */ - CBaseMtm& iBaseMtm; - /** Control environment object. It is set by the constructor. */ - CCoeEnv* iCoeEnv; - /** This flag records the preferences as set by SetPreferences(). */ - TUint iFlags; - -private: - // --- Data --- - CRegisteredMtmDll& iRegisteredMtmDll; - TInt iResourceFileOffset; - // Extra data member to allow for future extensions - TAny* iExtensionData; - }; - - -#endif // __MTMUIBAS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtmuids.h --- a/epoc32/include/mtmuids.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ -#if !defined(__MTMUIDS_H__) -#define __MTMUIDS_H__ -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__MTMDEF_HRH__) -#include -#endif - -// capabilities (TUid) -/** -* Maximum message body size. -* @Return type: TInt. -* @publishedAll -* @released -*/ -const TUid KUidMtmQueryMaxBodySize={KUidMtmQueryMaxBodySizeValue}; -/** -* Maximum total size of message. -* @publishedAll -* @released -* @Return type: TInt. -*/ -const TUid KUidMtmQueryMaxTotalMsgSize={KUidMtmQueryMaxTotalMsgSizeValue}; -/** Character widths supported by message type (returned TInt is the sum of the -appropriate values KMtm7BitBody, KMtm8BitBody, KMtm16BitBody, and KMtmBinaryBody). */ - -/** -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySupportedBody={KUidMtmQuerySupportedBodyValue}; -/** -* Are attachments supported. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySupportAttachments={KUidMtmQuerySupportAttachmentsValue}; -/** -* Does the MTM message type have a subject field. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySupportSubject={KUidMtmQuerySupportSubjectValue}; -/** -* Does the MTM support folders. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySupportsFolder={KUidMtmQuerySupportsFolderValue}; -/** -* Off-line operation allowed. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQueryOffLineAllowed={KUidMtmQueryOffLineAllowedValue}; -/** -* Send message. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQueryCanSendMsg={KUidMtmQueryCanSendMsgValue}; -/** -* Receive message. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQueryCanReceiveMsg={KUidMtmQueryCanReceiveMsgValue}; -/** -* Maximum number of recipients (-1 indicates unlimited numbers). -* @Return type: TInt -* @publishedAll -* @released -*/ -const TUid KUidMtmQueryMaxRecipientCount={KUidMtmQueryMaxRecipientCountValue}; -/** -* When using the MTM in Send-As, does a rendered image have to be prepared (i.e.fax). -* @Return type: TBool. -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySendAsRequiresRenderedImage={KUidMtmQuerySendAsRequiresRenderedImageValue}; -/** -* Printer driver UID for rendering the fax image. -* @Return type: TUid -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySendAsRenderingUid={KUidMtmQuerySendAsRenderingUidValue}; -/** -* UID of default message editor. -* @Return type: TUid. -* @publishedAll -* @released -*/ -const TUid KUidMsvMtmQueryEditorUid={KUidMsvMtmQueryEditorUidValue}; -/** -* Does the MTM support BIO messages. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMsvQuerySupportsBioMsg={KUidMtmQuerySupportsBioMsgValue}; -/** -* Does the MTM support scheduled sending. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMsvQuerySupportsScheduling={KUidMtmQuerySupportsSchedulingValue}; -/** -* Does the MTM support the use of recipient type. -* @No return value. -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySupportsRecipientType={KUidMtmQuerySupportsRecipientTypeValue}; -/** -* Support for Sending messages using SendAs. -* If this is supported, then the MTM supports sending messages created through the SendAs API. -* @Return type: TBool. -* @publishedAll -* @released -*/ -const TUid KUidMtmQuerySendAsMessageSendSupport={KUidMtmQuerySendAsMessageSendSupportValue}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtsr.h --- a/epoc32/include/mtsr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,504 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MTSR_H__ -#define __MTSR_H__ - -#include -#include -#include -#include -#include - -// forward declarations -class RWriteStream; -class RReadStream; -class RFs; -class CDictionaryFileStore; -class CInstalledMtmGroup; -class CMsvServerEntry; -class TMsvSystemProgress; - -class CBaseServerMtm : public CActive -/** Base class for Server-side MTM components. Server-side MTMs provide all message -transport functionality for a particular messaging protocol. - -MTM implementers implement a derived class to provide such functionality for -their message protocol. Writers of message client applications are never concerned -with this class and its sub-classes, as these are only accessed by the Message -Server. - -Each MTM interprets the generic commands in different ways. For example, a -Fax MTM would transmit a fax when asked to copy a fax from a local folder -to a fax service. For the same function, an IMAP MTM would create a copy of -the message on the remote server and update the message index to show the -copy of the message on the remote server. An important initial design task -is to the map the functions to the functionality provided by the protocol. - -Server-side MTM functions are called by the Message Server as a result of -a client request that requires some remote operation with the MTM's protocol. -The following steps give a simplified view of the usual sequence of events: - -1. the Message Server instantiates a Server-side MTM object through the factory -function - -2. the Message Server calls the appropriate asynchronous function on the Server-side -MTM interface, passing a TRequestStatus argument - -3. the Server-side MTM function typically starts whatever asynchronous communications -it requires and returns - -4. the Server-side MTM is signalled when the asynchronous communications complete, -and handles the result - -5. the Server-side MTM signals the Message Server, through the TRequestStatus -passed earlier - -6. the Message Server deletes the Server-side MTM object - -To qualify this somewhat: - -1. it is up to the Server-side MTM implementation to decide how to translate -data back and forth between the formats used by Message Server (index entry, -message store, binary files), and that required by the protocol; this is another -important design task - -2. depending on the protocol being used, the communications sequence can be of -considerable complexity; typically it requires division into a number of asynchronous -steps - -3. for greater efficiency where further commands are shortly expected, deletion -of the Server-side MTM object can be prevented - -For asynchronous requests, a Server-side MTM should always complete the TRequestStatus -with KErrNone. Any errors should be returned in the progress information. - -Note the following significant groups of functions: - -1. Copy and move from remote functions: CopyToLocalL() and MoveToLocalL() are -called by the Message Server to get a selection of entries from a remote location. -For many protocols, this should be interpreted as message retrieval. For protocols -where messages exist on a remote server, this function is typically used to -download specific messages, after an initial connection has downloaded message -headers. - -2. Copy and move to remote functions: CopyFromLocalL() and MoveFromLocalL() are -called by the Message Server to copy/move a selection of entries to a remote -location. For many protocols, this should be interpreted as message sending. - -3. Copy and move within remote functions: CopyWithinServiceL() and MoveWithinServiceL() -are called by the Message Server to copy a selection of entries within a remote -service. An example of their use might be for a user rearranging messages -within remote folders. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CBaseServerMtm(); - // - /** Copies a selection of entries from a remote location to a local location. This - will only be meaningful for some protocols. - - Requirements: - - Implementations should provide this function if the messaging protocol supports - retrieval of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - Implementations of this function have three fundamental steps: - - 1. doing the transfer operation using the appropriate communications protocols - - 2. converting protocol-specific data into the three-part storage format (index - entry, message store, binary files) required by the Message Server - - 3. updating entries in the Message Server - - @param aSelection The collection of message index entries for which the copy/moving - is required. - @param aDestination The entry ID to which the selection is to be copied - @param aStatus Asynchronous completion word for the operation - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; - /** Copies a selection of entries from a local location to a remote location. - - Requirements: - - Implementations should provide this function if the messaging protocol supports - retrieval of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - Implementations of this function have three fundamental steps: - - 1. reading entry data - - 2. converting entry data from the Message Server format into that required by - the protocol - - 3. doing the transfer operation using the appropriate communications protocols - - @param aSelection The collection of message index entries for which the copy - is required - @param aDestination The entry ID of the service by which the entries should - be transferred - @param aStatus Asynchronous completion word for the operation - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; - /** Copies a selection of entries within a remote location. - - Requirements: - - Implementations should provide this function if the messaging protocol supports - the ability to copy entries within a remote service. If this is not supported, - implementations should leave with KErrNotSupported. - - @param aSelection The collection of message index entries for which the copy - is required - @param aDestination The server entry ID to which the selection is to be copied - @param aStatus Asynchronous completion word for the operation - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; - /** Deletes each entry in the supplied selection when called by the message Server. - If any of the entries in the selection is a parent entry, then all its children - should also be deleted, recursively to the bottom of the ownership tree. - - Implementations should provide this function if the messaging protocol supports - deletion of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - @param aSelection The collection of entries that are to be deleted. - @param aStatus Asynchronous completion object. - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus)=0; - /** Creates a new remote entry with relevant data when called by the Message Server. - - Implementations should provide this function if the messaging protocol supports - creation of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - As with ChangeL(), the Server-side MTM implementation must decide what information - in the TMsvEntry is relevant to the remote entry, and translate it appropriately - for the specific protocol. Most of the data contained in the TMsvEntry is - specific to the Message Server, and would probably have no direct correlation - with the protocol's own storage format. For example, for a folder, probably - only the name and parent are needed, so if the protocol supports creation - of remote folders, the implementation could: - - 1. check for a folder type entry - - 2. get the folder name and parent details from aNewEntry - - 3. initiate a protocol-specific action to create the remote folder - - @param aNewEntry Data by which to create entry - @param aStatus Asynchronous completion word for the operation. - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus)=0; - /** Updates a remote entry with relevant data when called by the Message Server. - - Implementations should provide this function if the messaging protocol supports - updating of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - The Server-side MTM implementation must decide what information in the TMsvEntry - is relevant to the remote entry, and translate it appropriately for the specific - protocol. Most of the data contained in the TMsvEntry is specific to the Symbian - OS Message Server, and would probably have no direct correlation with the - protocol's own storage format. Some entry data may however be useful. For - example, if the protocol supports remote renaming of folders, the implementation - could: - - 1. check for a folder type entry - - 2. extract the folder name from aNewEntry.iDetails - - 3. check if the folder name has changed by comparing the new name with iDetails - in the index entry currently; if not, complete with KErrNone - - 4. initiate a protocol-specific action to rename the remote folder - - The implementation should also always update the local Message Server index - through CMsvServerEntry::ChangeL(). - - @param aNewEntry Data by which to update entry - @param aStatus Asynchronous completion word for the operation. - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus)=0; - // - /** Executes an MTM-specific operation on a selection of entries when called by - the Message Server. - - The call is made as a response to a client program invoking an MTM-specific - operation through CBaseMtm::InvokeSyncFunctionL()/InvokeAsyncFunctionL(). - The aSelection, aCommand, and aParameter arguments pass the values of the - original aSelection, aFunctionId, and aParameter respectively arguments from - such a call. The use (if any) of the aSelection and aParameter arguments by - the function depends on the command. - - @param aSelection A selection of message entries on which the command is to - be executed - @param aCommand The MTM-specific command to be carried out - @param aParameter Command-specific parameters - @param aStatus Asynchronous completion word for the operation */ - virtual void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus)=0; - // - /** Tests if the Server-side MTM object should be deleted when called by the Message - Server - - It is useful to stop the MTM being deleted when more commands are expected - shortly. This would be the case, for example, after receiving a command to - go online. - - If there are no more commands expected by the Server-side MTM object, then - the function should return EFalse, and the Message Server will delete it. - - @return ETrue: the MTM object should not be deleted EFalse: the MTM object - can be deleted */ - virtual TBool CommandExpected()=0; - // - /** This function is called by the Message Server to get progress information for - the current asynchronous operation. - - The call is made as a response to a client program requesting progress information - through CMsvOperation::ProgressL(). The packing format used in the TDesC8 - is MTM-specific. Only the implementation of the User Interface MTM progress - information functions need to understand the format. - - The progress buffer should have a maximum size of 256 bytes. - - @return Progress information on current asynchronous operation - @see CBaseMtmUi::DisplayProgressSummary() - @see CBaseMtmUi::GetProgress() */ - virtual const TDesC8& Progress()=0; - // - /** Moves a selection of entries from a remote location to a local location. - - Requirements: - - Implementations should provide this function if the messaging protocol supports - retrieval of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - Implementations of this function have three fundamental steps: - - 1. doing the transfer operation using the appropriate communications protocols - - 2. converting protocol-specific data into the three-part storage format (index - entry, message store, binary files) required by the Message Server - - 3. updating entries in the Message Server - - MoveToLocalL() should differ from CopyToLocalL() in additionally deleting - the original remote data. - - @param aSelection The collection of message index entries for which the moving - is required. - @param aDestination The entry ID to which the selection is to be copied/moved - @param aStatus Asynchronous completion word for the operation - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; - /** Moves a selection of entries from a local location to a remote location. - - Requirements: - - Implementations should provide this function if the messaging protocol supports - retrieval of remote entries. If this is not supported, implementations should - leave with KErrNotSupported. - - Implementations of this function have three fundamental steps: - - 1. reading entry data - - 2. converting entry data from the Message Server format into that required by - the protocol - - 3. doing the transfer operation using the appropriate communications protocols - - The implementation of MoveFromLocalL() should differ from CopyFromLocalL() - in additionally deleting the original local data. - - @param aSelection The collection of message index entries for which the move - is required - @param aDestination The entry ID of the service by which the entries should - be transferred - @param aStatus Asynchronous completion word for the operation - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; - /** Moves a selection of entries within a remote location. - - Requirements: - - Implementations should provide this function if the messaging protocol supports - the ability to move entries within a remote service. If this is not supported, - implementations should leave with KErrNotSupported. - - The implementation of MoveWithinServiceL() should differ from CopyWithinServiceL() - in additionally deleting the original data. - - @param aSelection The collection of message index entries for which the move - is required - @param aDestination The server entry ID to which the selection is to be moved - @param aStatus Asynchronous completion word for the operation - @leave KErrNotSupported The Server-side MTM does not support this operation - @leave Other leave codes Dependent on implementation */ - virtual void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; - - IMPORT_C TInt SystemProgress(TMsvSystemProgress& aOutSysProg); - TInt GetNonOperationMtmData(TNonOperationMtmDataType& aMtmDataType, TPtrC8& aResultBuffer); - -protected: - IMPORT_C CBaseServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry); - /** Handles the completion of any asynchronous requests that it makes. It is called - from the base class RunL() . - - Note that any leaves made by this function result in DoComplete() being called - with the leave code. */ - virtual void DoRunL()=0; - /** Called by the base class RunL() if DoRunL() leaves. - - It should be implemented to handle this error. For example, progress information - could be updated to reflect the problem. - - @param aError The leave code given by DoRunL(). */ - virtual void DoComplete(TInt aError)=0; - // - IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1); - // -private: - // from CActive - IMPORT_C void RunL(); - IMPORT_C TInt RunError(TInt aError); - // -protected: - /** The entry on which to operate. It is set in the constructor. - - The destructor deletes this member. */ - CMsvServerEntry* iServerEntry; - - // Method used for extension: called by non virtual methods that need - // to have a polymorphic behaviour. - IMPORT_C virtual TAny* GetInterface(TUid aUid); - // -private: - CRegisteredMtmDll& iRegisteredMtmDll; - -private: - // Extra data member to allow for future extensions - TAny* iExtensionData; - }; - - -class CServerMtmDllRegistry : public CMtmDllRegistry -/** -@publishedAll -@released -*/ - { -friend class CMtmRegistryControl; -public: - IMPORT_C static CServerMtmDllRegistry* NewL(RFs& aFs,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=KMsvDefaultTimeoutMicroSeconds32); - IMPORT_C ~CServerMtmDllRegistry(); - IMPORT_C CBaseServerMtm* NewServerMtmL(TUid aMtmTypeUid, CMsvServerEntry* aInitialEntry); - // -protected: - CServerMtmDllRegistry(RFs& aFs,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); - // -private: - CBaseServerMtm* NewMtmL(const RLibrary& aLib, CMsvServerEntry* aServerEntry, CRegisteredMtmDll& aReg) const; - }; - - -class CInstalledMtmGroupArray : public CArrayPtrFlat -/** -@internalComponent -@released -*/ - { -public: - CInstalledMtmGroupArray(); - ~CInstalledMtmGroupArray(); - void AddInstalledMtmGroupL(CInstalledMtmGroup* aInstalledMtmGroup); - }; - -//********************************** -// CMsvMtmCache -//********************************** - - -//********************************** -// CMtmRegistryControl -//********************************** - -class CMtmRegistryControl : public CBase, public MRegisteredMtmDllObserver -/** -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMtmRegistryControl* NewL(RFs& anFs,CServerMtmDllRegistry& aServerMtmDllRegistry); - IMPORT_C ~CMtmRegistryControl(); - - IMPORT_C TInt InstallMtmGroup(const TDesC& aFullName,TUid& aMtmTypeUid); - IMPORT_C TInt FullNameToMtmTypeUid(const TDesC& aFullName,TUid& aMtmTypeUid) const; - IMPORT_C TInt DeInstallMtmGroup(TUid aMtmTypeUid); // returns error on storing registry - - IMPORT_C TInt UseMtmGroup(TUid aMtmTypeUid); - IMPORT_C TInt ReleaseMtmGroup(TUid aMtmTypeUid); - IMPORT_C TBool IsInUse(TUid aMtmTypeUid) const; - - IMPORT_C TInt FillRegisteredMtmDllArray(TUid aMtmDllTypeUid,CRegisteredMtmDllArray& aRegisteredMtmDllArray,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=0); // Fill array with Dlls whose second uid is aMtmDllTypeUid - IMPORT_C CMtmGroupData* GetMtmGroupDataL(TUid aMtmTypeUid) const; - const CMtmGroupData& GetMtmGroupDataReferenceL(TUid aMtmTypeUid) const; - - IMPORT_C void StoreRegistryL() const; - IMPORT_C void RestoreRegistryL(); - - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - -private: - CMtmRegistryControl(RFs& anFs,CServerMtmDllRegistry& aServerMtmDllRegistry); - void ConstructL(); - TInt MtmTypeUidToIndex(TUid aMtmTypeUid) const; - TInt UidTypeToIndex(TUidType aUidType) const; - void DoInstallMtmGroupL(const TDesC& aFullName,TUid& aMtmTypeUid); - CMtmGroupData* ReadDataFileStoreL(const TDesC& aFullName) const; - void DoDeInstallMtmGroupL(TUid aMtmTypeUid); - void DoInternalizeL(RReadStream& aStream); - void AddInstalledMtmGroupL(CInstalledMtmGroup* aInstalledMtmGroup); - void RemoveInstalledMtmGroup(TUid aMtmTypeUid); - TBool IsResFileL(const TDesC& aFullName) const; - TUid DoFindMtmTypeUidL(const TDesC& aFullName) const; - - CMtmGroupData *LoadMTMFileL(const TDesC& aFullName, TUid &aUid); - CMtmGroupData *LoadDatFileL(const TDesC& aFullName, TUid &aUid); - CMtmGroupData *LoadResFileL(const TDesC& aFullName, TUid &aUid); -private: - RFs& iFs; - CInstalledMtmGroupArray iInstalledMtmGroupArray; - CServerMtmDllRegistry& iServerMtmDllRegistry; - }; - -#endif // __MTSR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtud.rh --- a/epoc32/include/mtud.rh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#include - -STRUCT MTUD_FUNCTION - { - LTEXT functiontext="";// Cannot be longer that 40 characters - LONG command=0; - LONG key; - BYTE keymodifiers=EMtudCtrl; - LONG flags=0; - BYTE type=0; - } - -STRUCT MTUD_FUNCTION_ARRAY - { - STRUCT functions[]; - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtudcbas.h --- a/epoc32/include/mtudcbas.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,362 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__MTUDBAS_H__) -#define __MTUDBAS_H__ - -#if !defined(__MSVSTD_H__) -#include -#endif - -#if !defined(__MSVREG_H__) -#include -#endif - -#if !defined(__MTCLREG_H__) -#include -#endif - -#if !defined(__BARSREAD_H__) -#include -#endif - -// Forward references -class CFbsBitmap; -class CCoeEnv; - -/////////////////////////////////////////////////// -// CBaseMtmUiData - MTM Ui data layer base API // -/////////////////////////////////////////////////// -class CBaseMtmUiData : public CBase -/** Base class for UI Data MTM components. - -CBaseMtmUiData-derived classes allow message client applications to customise -dynamically their user interfaces for a particular message type. For example, -if a message client application currently had a fax entry selected, then it -could use the fax MTM's concrete class to get information on the menus and -icons that it should display. - -Specifically, functionality falls into the following three areas: - -1. supplying MTM-specific icons for Message Server entries - -2. supplying user interface text, e.g. for menus, for MTM-specific operations - -3. providing checks that MTM functions are suitable for use on an entry. It is -intended that client applications will use these functions to select dynamically -the user interface features available dependent on the entry currently selected -within the application. For example, menu items that do not apply to particular -entries could be greyed out. Note that OperationSupportedL() performs a similar -function for MTM-specific functions. Implementations should determine if the -operation is supported by checking the properties of the entry, such as its -type. If the operation is not appropriate on the entry, then the aReasonResourceId -argument is set to the ID of a string in the UI Data MTM's resource file -that explains why not. Otherwise, aReasonResourceId is 0. - -Message client applications use the class to access such functionality polymorphically. -MTM implementers implement this class to provide such functionality for their -message protocol. -@publishedAll -@released -*/ - { -public: - // --- Types --- - /** Defines an array of icon bitmaps for the UI Data MTM. - - It is used in the definition of CBaseMtmUiData::iIconArrays. */ - typedef CArrayPtr CBitmapArray; - // - // --- Inline class --- - class TMtmUiFunction - /** Provides the interface for clients to access MTM-specific functions, and present - these functions to the user. A message client application can use this information to customise the UI. - - The class encapsulates information relating to an MTM-specific operation: - - 1. human-readable name: for display on the UI - - 2. ID: used to invoke the operation through the CBaseMtmUi::InvokeSyncFunctionL()/InvokeAsyncFunctionL() functions on the associated User Interface MTM - - 3. a suggested hot-key that the UI should support for the operation - - 4. flags that describe further operation characteristics. -@publishedAll -@released -*/ - { - friend class CBaseMtmUiData;// For access to constructor - public: - // --- Constants --- - /** Enum to define UI Data base class constants. */ - enum - { - /** Maximum length for operation caption. Used in defining iCaption. */ - ECaptionMaxLen=40 - }; - - public: - // --- Construction --- - IMPORT_C TMtmUiFunction(TResourceReader& aResourceReader); - IMPORT_C TMtmUiFunction(const TMtmUiFunction& aFunc); - - private: - // --- Private functions --- - void SetModifiersFromResourceDefinition(TInt aResourceFileModifiers); - - public: - // --- Data --- - /** String, suitable for a menu, describing the operation. */ - TBuf iCaption; - /** Character code for a suggested hotkey for the operation. */ - TInt iPreferredHotKeyKeyCode; - /** Suggested key modifiers for the hotkey. */ - TInt iPreferredHotKeyModifiers; - /** The ID that can be used to invoke the operation. */ - TInt iFunctionId; - /** Flags setting location characteristics of the operation. */ - TUint8 iFunctionType; // see MTUD.HRH - /** Flags setting characteristics of the operation. */ - TInt iFlags; // see MTUD.HRH - }; - // - // --- Destruction --- - IMPORT_C virtual ~CBaseMtmUiData(); - // - // --- Accessor functions --- - IMPORT_C TUid Type() const; - // - // --- Context icons --- - /** Gets an array of bitmaps relevant to the passed context entry. - - The bitmaps within the array should be representations of the same bitmap at various sizes. - - The aStateFlags argument indicates the user interface state, for example, - "open", of the entry. - - Requirements: - - Implementations should check the type of the context, using TMsvEntry::iType::iUid, - and the passed state, and return an appropriate bitmap array. - - @param aContext Context entry to return the icons for. - @param aStateFlags Flasgs indicating the user interface state of the entry. - @return Bitmap array for the given context.. */ - virtual const CBitmapArray& ContextIcon(const TMsvEntry& aContext, TInt aStateFlags) const = 0; - // - // --- MTM-Specific function information (e.g. for dynamically-added menu items) --- - IMPORT_C const CArrayFix& MtmSpecificFunctions() const; - IMPORT_C TBool FunctionRecognised(TInt aFunctionId) const; - // - // --- Provide context-specific function information --- - /** Tests if an entry can be created as a child. - - @param aParent The entry under which aNewEntry should be created. - @param aNewEntry The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanCreateEntryL(const TMsvEntry& aParent, TMsvEntry& aNewEntry, TInt& aReasonResourceId) const = 0; - /** Tests if a delete operation is supported. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanDeleteFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if the entry can be undeleted. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - IMPORT_C virtual TBool CanUnDeleteFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const; - /** Tests if the service entry can be deleted. - - @param aService The service entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanDeleteServiceL(const TMsvEntry& aService, TInt& aReasonResourceId) const = 0; - /** Tests if an entry can be replied to. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanReplyToEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if an entry can be forwarded. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanForwardEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if the entry can be edited. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanEditEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if an entry can be viewed. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanViewEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if an entry can be opened. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanOpenEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if a close operation is supported. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID, or 0 if operation - is supported. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanCloseEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if a copy from or move to operation is supported. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanCopyMoveToEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests whether a copy from or move from operation is supported. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID or 0. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanCopyMoveFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - /** Tests if the current operation on the entry can be cancelled. - - @param aContext The entry to which the operation applies. - @param aReasonResourceId On return, a resource string ID, or 0 if operation - is supported. - @return ETrue, if the operation is appropriate on the entry; - EFalse, if the operation is NOT appropriate on the entry. */ - virtual TBool CanCancelL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; - // - // --- RTTI --- - /** Tests if an MTM-specific operation is appropriate to the specified entry. The - operation specified must have been obtained from a call to MtmSpecificFunctions(). - - It is intended that client applications will use this function to select dynamically - the MTM-specific user interface features available dependent on the entry - currently selected within the application. - - Requirements: - - Implementations should check the type of the context, using TMsvEntry::iType::iUid, - and use any other information required available from the context, to determine - if the operation is supported. - - @param aOperationId ID of operation to query. - @param aContext The entry to which the operation applies. - @return KErrNone: operation is appropriate to User Interface MTM and entry. - Other: if the operation is not appropriate on the entry, then this is the - ID of a string in the UI Data MTM's resource file that explains why not. */ - virtual TInt OperationSupportedL(TInt aOperationId, const TMsvEntry& aContext) const = 0; // returns 0 if operation *IS* supported, otherwise a resource ID for the reason text - /** Queries if the MTM supports a particular capability, specified by a UID. - - Requirements: - - Implementations should check aCapability for the standard capability values - and return a suitable response in aResponse. If aFunctionId is unknown, return - KErrNotSupported. - - @param aFunctionId UID of capability to be queried - @param aResponse Response value. The format of the response varies according - to the capability. - @return KErrNone: aFunctionId is a recognised value and a response is returned - KErrNotSupported: aFunctionId is not a recognised value */ - virtual TInt QueryCapability(TUid aFunctionId, TInt& aResponse) const = 0; - /** Provides status text for the sending state of the entry. - - @param aContext Entry to query - @return Descriptor containing status text. */ - virtual HBufC* StatusTextL(const TMsvEntry& aContext) const = 0; - -protected: - // --- Construction --- - IMPORT_C CBaseMtmUiData(CRegisteredMtmDll& aRegisteredMtmDll); - IMPORT_C void ConstructL(); - /** Initialises bitmaps and function information. - - Client applications do not use this function. It is relevant only to implementers of derived classes. - - Requirements: - - This function is called by the base class ConstructL() function. Implementations - should provide this function to: - - 1. insert MTM-specific icon bitmap arrays into the iIconArrays array data member - - 2. insert MTM-specific operation information into the iMtmSpecificFunctions array - data member */ - virtual void PopulateArraysL() = 0; // Should populate iCapabilities, iMtmSpecificFunctions and iIconArrays - /** Gets the resource file name. - - Client applications do not use this function. It is relevant only to implementers of derived classes. - - Requirements: - - Each UI Data MTM can have a resource file associated with it. Implementations - should set aFilename to the full path and name of this resource file. The - function is called by CBaseMtmUiData::ConstructL(), which then loads the resource - file. - - @param aFileName Filename buffer to be filled with the resource file path - and name */ - virtual void GetResourceFileName(TFileName& aFileName) const = 0; - // - // --- Utility --- - IMPORT_C void ReadFunctionsFromResourceFileL(TInt aResourceId);// Up to clients to call this if necessary - IMPORT_C void CreateBitmapsL(TInt aNumZoomStates, const TDesC& aBitmapFile, TInt aStartBitmap, TInt aEndBitmap); - CFbsBitmap* CreateBitmapL(const TDesC& aFileName, TInt aId) const; - - // Method used for extension: called by non virtual methods that need - // to have a polymorphic behaviour. - IMPORT_C virtual TAny* GetInterface(TUid aUid); - -protected: - // --- Data --- - /** Control environment object. It is set by the constructor. */ - CCoeEnv* iCoeEnv; - /** The array that stores the arrays of icon bitmaps for the UI Data MTM. Items - are added to the array by PopulateArraysL(). */ - CArrayPtr* iIconArrays; - /** The array that stores MTM-specific function information for the UI Data MTM. - Items are added to the array by ReadFunctionsFromResourceFileL(). */ - CArrayFix* iMtmSpecificFunctions; - -private: - // --- Data --- - TInt iResourceFileOffset; - CRegisteredMtmDll& iRegisteredMtmDll; // Required in order to call ReleaseLibrary() - - // Extra data member to allow for future extensions - TAny* iExtensionData; - }; - - -#endif // __MTUDBAS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtudreg.h --- a/epoc32/include/mtudreg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined __MTUDREG_H__ -#define __MTUDREG_H__ - -#if !defined (__MTCLREG_H__) -#include -#endif - -class CBaseMtmUiData; - -/** UI Data MTM factory function. - -A concrete UI Data MTM must implement an exported factory function of this -type. It should return an instance of the CBaseMtmUiData-derived class that -provides the implementation. The factory function is called by the UI Data -MTM registry when a client requests this UI Data MTM. - -A CBaseMtmUiData-derived class typically provides a NewL() function, which -the factory function calls. - -The factory function is called by ordinal. The ordinal of the function must -match that recorded in the MTM's registry information. - -The CRegisteredMtmDll& argument passes the registration data for the MTM DLL. - -The return value is a newly-created instance of the CBaseMtmUi-derived class -for the User Interface MTM. - -The factory function should leave if it cannot create the object. - -For example, a UI Data MTM whose concrete class was CEgMtmUiData could define -a suitable factory function as: - -@code -EXPORT_C CBaseMtmUiData* NewEgMtmL(CRegisteredMtmDll& aRegisteredMtmDll) - { - return CEgMtmUiData::NewL(aRegisteredMtmDll); - } -@endcode */ -typedef CBaseMtmUiData* MtmUiDataFactoryFunctionL(CRegisteredMtmDll&); - -// Client side MTM UI data registry - -class CMtmUiDataRegistry : public CObserverRegistry -/** Accesses the UI Data MTM registry. - -This registry holds details of the all the -UI Data MTMs currently available on the system. Message client applications -use this class to get a CBaseMtmUiData-derived object by which to access UI -Data MTM functionality. - -Note that the base class CMtmDllRegistry provides functions for discovering -what MTMs are present in the registry. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMtmUiDataRegistry* NewL(CMsvSession& aMsvSession, - TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)); - virtual ~CMtmUiDataRegistry(); - IMPORT_C CBaseMtmUiData* NewMtmUiDataLayerL(const TUid& aMtmTypeUid); - // -protected: - CMtmUiDataRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); - // -private: - CBaseMtmUiData* NewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const; - }; - - - -#endif // __MTUDREG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mtuireg.h --- a/epoc32/include/mtuireg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// MTM client-side MTMUI registry class -// -// - -#if !defined __MTUIREG_H__ -#define __MTUIREG_H__ - - -#if !defined (__E32BASE_H__) -#include // CActive, TFileName etc. -#endif - -#if !defined (__MTCLREG_H__) -#include -#endif - -class CBaseMtmUi; - -/** UI MTM factory function. - -A concrete User Interface MTM must implement an exported factory function of -this type. It should return an instance of the CBaseMtmUi-derived class that -provides the implementation. The factory function is called by the User Interface -MTM registry when a client requests this User Interface MTM. - -A CBaseMtmUi-derived class typically provides a NewL() function, which the -factory function calls. - -The factory function is called by ordinal. The ordinal of the function must -match that recorded in the MTM's registry information. - -For example, a User Interface MTM whose concrete class was CEgMtmUi could -define a suitable factory function as: - -@code -EXPORT_C CBaseMtmUi* NewEgMtmUiL(CBaseMtm& aMtm, CRegisteredMtmDll& aRegisteredDll) - { - return CEgMtmUi::NewL(aMtm, aRegisteredDll); - }@endcode - -@param aBaseMtm The CBaseMtm requesting the object. -@param aRegisteredMtmDll Registration data for the MTM DLL. -@return A newly-created instance of the CBaseMtmUi-derived class -for the User Interface MTM. -@leave Any The factory function should leave if it cannot create the object. */ -typedef CBaseMtmUi* MtmUiFactoryFunctionL(CBaseMtm&, CRegisteredMtmDll&); - -// Client side MTM registry - -class CMtmUiRegistry : public CObserverRegistry -/** Accesses the User Interface MTM registry. - -This registry holds details of the -all the User Interface MTMs currently available on the system. Message client -applications use this class to get a CBaseMtmUi-derived object by which to -access User Interface MTM functionality. - -Note that the base class CMtmDllRegistry provides functions for discovering -what MTMs are present in the registry. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CMtmUiRegistry* NewL(CMsvSession& aMsvSession, - TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)); - virtual ~CMtmUiRegistry(); - IMPORT_C CBaseMtmUi* NewMtmUiL(CBaseMtm& aMtm); - // -protected: - CMtmUiRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); - // -private: - CBaseMtmUi* NewMtmL(const RLibrary& aLib, CBaseMtm& aMtm, CRegisteredMtmDll& aReg) const; - }; - - - -#endif // __MTUIREG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mturutils.h --- a/epoc32/include/mturutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MTURUTILS_H__ -#define __MTURUTILS_H__ - -#include - -class MturUtils -/** Utility class that is used to start an application to -edit a specified message. - -@publishedAll -@released -*/ -{ -public: - IMPORT_C static void LaunchEditorL(TMsvId aId); - IMPORT_C static void LaunchEditorAndWaitL(TMsvId aId); - IMPORT_C static void LaunchEditorL(TMsvId aId, RThread& aThread, TRequestStatus& aStatus); -}; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animation.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,75 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATION_H__ +#define __ANIMATION_H__ + +#include + +class TAnimationConfig; + +/** Pure virtual base class for animations. + +This defines an abstracted interface between a client application and an +animation. Most of the implementation details are handled by an animator +plugin. The source of the animation data and its interpretation are usually +handled by a data provider. + +@see CAnimationDataProvider +@see CAnimator +@see MAnimationObserver +@publishedAll +@released*/ +class CAnimation : public CBase + { +public: + /** Causes the animation to start, at the first time step or logical + equivalent. If the animation is already running, it rewinds. + @see TAnimationConfig + @param aConfig Specifies run time attributes of the animation.*/ + virtual void Start(const TAnimationConfig& aConfig) = 0; + /** Causes the animation to stop, and rewinds to the first frame.*/ + virtual void Stop() = 0; + /** Causes the animation to stop, but without rewinding.*/ + virtual void Pause() = 0; + /** Causes a paused animation to continue from where it left off.*/ + virtual void Resume() = 0; + /** Puts an animation on hold, which is similar to pause, but keeps + track of the time steps passing and catches up when resumed. This + can be used to temporarily cease processing an animation without it + getting out of step with others.*/ + virtual void Hold() = 0; + /** Resumes a held animation.*/ + virtual void Unhold() = 0; + /** Sets the coordinates of the animation. This generally refers + to the top left corner of the total area the animation covers. + @param aPoint The new coordinates of the animation (usually the top left + corner)*/ + virtual void SetPosition(const TPoint& aPoint) = 0; + /** Causes whatever ticker this animation provides to its animator to + be frozen untill a corresponding call to unfreeze. + + You should not normally need to call this function. + @see Unfreeze()*/ + virtual void Freeze() = 0; + /** Causes whatever ticker this animation provides to its animator to + be unfrozen. + + You should not normally need to call this function. + @see Freeze()*/ + virtual void Unfreeze() = 0; + }; + +#endif //__ANIMATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationconfig.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationconfig.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,51 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONCONFIG_H__ +#define __ANIMATIONCONFIG_H__ + +struct TAnimationConfig +/** These are passed to animator objects when an animation is started and +provide some control over the manner in which the animation runs. +@publishedAll +@released*/ + { + enum TFlags + /** Flag values used by animator objects when an animation is started that + provide some control over the manner in which the animation runs. + + @publishedAll + @released */ + { + /** If set, interpret the iData member as the number of times the + animation should run before automatically stopping itself.*/ + ELoop = 0x0001, + /** If set, the animation will start as soon as it can. By default, + animations wait for the data to be completely loaded before starting.*/ + EStartImmediately = 0x0010, + /** If set, and ELoop is set, interpret the iData member as a number + of frames to run through, instead of complete cycles.*/ + ECountFrames = 0x0020, + /** By default animations which stop after a number of loops return + to the first frame. If this flag is set they stop on the last frame.*/ + EEndOnLastFrame = 0x0040, + }; + /** Set this to a combination of the values in TFlags.*/ + TInt iFlags; + /** The meaning of this item depends on the value of the iFlags member.*/ + TInt iData; + }; + +#endif //__ANIMATIONCONFIG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationdataprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationdataprovider.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,66 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONDATAPROVIDER_H__ +#define __ANIMATIONDATAPROVIDER_H__ + +#include +#include + +class MAnimationDataProviderObserver; + +_LIT8(KUndefinedAnimationDataType, "undefined"); + +/** +Pure virtual base class for data providers. + +A data provider takes an animation specification (such as a file), converts +it (if needed) into a format recognised by an animator (such as CAnimationFrame +objects), and passes it to the animator, via the medium of an animation. + +Most animation types take a data provider as an argument during contruction. +For more detailed usage instructions, refer to the documentation of the derived +classes. + +@see CAnimation +@see MAnimationDataProviderObserver +@publishedAll +@released +*/ +class CAnimationDataProvider : public CBase + { +public: + IMPORT_C void SetObserver(MAnimationDataProviderObserver* aObserver); + /** Called from the animation when it is ready to begin receiving data. */ + virtual void StartL() = 0; + /** Called from the animation to obtain the type of data to expect. + @return An 8 bit identifier string*/ + virtual TPtrC8 DataType() = 0; +protected: + IMPORT_C CAnimationDataProvider(); + IMPORT_C virtual void CAnimationDataProvider_Reserved1(); + IMPORT_C virtual void CAnimationDataProvider_Reserved2(); + + IMPORT_C void SendEventL(TInt aEvent); + IMPORT_C void SendEventL(TInt aEvent, TInt aData); + IMPORT_C void SendEventL(TInt aEvent, TAny* aData, TInt aDataSize); +protected: + /** Reserved for future use */ + TInt iCAnimationDataProvider_Reserved; + /** The destination to send data to. Usually an animation class. */ + MAnimationDataProviderObserver* iObserver; + }; + +#endif // __ANIMATIONDATAPROVIDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationevents.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationevents.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONEVENTS_H__ +#define __ANIMATIONEVENTS_H__ + +/** Generic events which all animation data providers can pass to animators. + +An implementation of CAnimation may intercept these and perform additional +processing if necessary. + +Events specific to a particular data type should take values greater than +EAnimationReservedEvents. Implementations of CAnimation should not intercept +or attempt to act on data type specific events. +@publishedAll +@released */ +enum TAnimationEvent + { + /** Sent when the data itself has changed and the animator needs to be + ready to receive the new values */ + EAnimationDataChanged, + /** Sent when an error occurs within the data provider and it is unable + to complete the sending of the animation data */ + EAnimationDataProviderError, + /** Specifies an upper limit for generic events. Events larger than this + are free to use for data type specific information */ + EAnimationReservedEvents = 0xFF + }; + +/** Events specific to the "bitmap" data type. These events are only sent +by data providers dealing with bitmap frame animations, and are only understood +by bitmap animators. +@publishedAll +@released */ +enum TBitmapAnimationEvent + { + /** This event contains data specifying the bitmaps for a new frame of + animation */ + EBitmapAnimationNewFrame = EAnimationReservedEvents + 1, + /** This event indicates that there are no more frames to send */ + EBitmapAnimationComplete, + }; + +#endif //__ANIMATIONEVENTS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationframe.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationframe.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,92 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONFRAME_H__ +#define __ANIMATIONFRAME_H__ + +#include + +class CFbsBitmap; + +/** +Data format for individual bitmap format animation frames. + +Animators and data providers which use the "bitmap" data type use objects +of this type to transfer data. + +You do not need to instantiate an object of this type unless you are writing +a new data provider. + +@see CBitmapAnimator +@see CICLAnimationDataProvider +@publishedAll +@released +*/ +class CAnimationFrame : public CBase + { +public: + /** Structure used for passing a CAnimationFrame safely over a + client/server connection.*/ + struct THandles + { + /** A handle to the bitmap into which the decoded frame(s) are put */ + TInt iBitmapHandle; + /** The bitmap mask for the changed area for this frame */ + TInt iMaskHandle; + /** General frame info provided by all plugins */ + TFrameInfo iFrameInfo; + }; +public: + virtual ~CAnimationFrame(); + IMPORT_C static CAnimationFrame* NewL(); + IMPORT_C static CAnimationFrame* NewL(const THandles& aHandles); + IMPORT_C void GetHandles(THandles & aHandles) const; + IMPORT_C void SetHandlesL(const THandles & aHandles); + IMPORT_C void CreateL(const TFrameInfo& aFrameInfo); + /** Returns the bitmap image for the changed area for this frame + @return A pointer to a CFbsBitmap */ + CFbsBitmap* Bitmap() { return iBitmap; } + /** Returns the bitmap image for the changed area for this frame + @return A pointer to a const CFbsBitmap */ + const CFbsBitmap* Bitmap() const { return iBitmap; } + /** Returns the bitmap mask for the changed area for this frame + @return A pointer to a CFbsBitmap */ + CFbsBitmap* Mask() { return iMask; } + /** Returns the bitmap mask for the changed area for this frame + @return A pointer to a const CFbsBitmap */ + const CFbsBitmap* Mask() const { return iMask; } + /** Returns information about the frame. + @return A TFrameInfo */ + TFrameInfo& FrameInfo() { return iFrameInfo; } + /** Returns information about the frame. + @return A const TFrameInfo */ + const TFrameInfo& FrameInfo() const { return iFrameInfo; } +protected: + IMPORT_C virtual void CAnimationFrame_Reserved1(); + IMPORT_C virtual void CAnimationFrame_Reserved2(); +private: + TInt iCAnimationFrame_Reserved; +private: + CAnimationFrame() {}; + CAnimationFrame(const CAnimationFrame&); // no implementation + CAnimationFrame& operator=(const CAnimationFrame&); // no implementation + void ConstructL(); +private: + CFbsBitmap* iBitmap; + CFbsBitmap* iMask; + TFrameInfo iFrameInfo; + }; + +#endif //__ANIMATIONFRAME_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationgroup.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationgroup.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __AnimationGroup_H__ +#define __AnimationGroup_H__ + +#include + +class CAnimationTls; + +/** +Handles groups of other animations. + +When it is appropriate to have several animations starting and stopping +together, add them all to an animation group and control them through that. + +In addition to making the code easier to both read and write, the animation +group handles synchronisation issues which can occur when issuing a sequence +of asynchronous requests. + +Care must be taken to remove an animation from any groups it may have been +added to before deleting it. + +@publishedAll +@released +*/ +class CAnimationGroup : public CAnimation + { +public: + static CAnimationGroup* NewL(); + ~CAnimationGroup(); + IMPORT_C const RPointerArray& Animations() const; + IMPORT_C RPointerArray& Animations(); + // From CAnimation + virtual void Start(const TAnimationConfig& aConfig); + virtual void Stop(); + virtual void Pause(); + virtual void Resume(); + virtual void Hold(); + virtual void Unhold(); + virtual void Freeze(); + virtual void Unfreeze(); + virtual void SetPosition(const TPoint& aPoint); +protected: + IMPORT_C virtual void CAnimationGroup_Reserved1(); + IMPORT_C virtual void CAnimationGroup_Reserved2(); +private: + TInt iCAnimationGroup_Reserved; +private: + CAnimationGroup(); + void ConstructL(); + CAnimationGroup(const CAnimationGroup&); // no implementation + CAnimationGroup& operator=(const CAnimationGroup&); // no implementation +private: + TInt iFreezeCount; + CAnimationTls* iTls; + RPointerArray iAnimations; + }; + +#endif //__AnimationGroup_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationmixins.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationmixins.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,165 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONMIXINS_H__ +#define __ANIMATIONMIXINS_H__ + +#include + +/** Interface from a data provider to an animation + +An animation which has a data provider receives information from it via this +interface. + +You do not need to derive an implementation from this class unless you are +writing a new animation type. + +@publishedAll +@released +@see CAnimationDataProvider +@see CAnimation +@see CAnimator*/ +class MAnimationDataProviderObserver + { +public: + /** Receives an event from a data provider. + @param aEvent The event code. + @param aData Any data associated with the event. Can be NULL. + @param aDataSize The size in bytes of the item pointed to by aData.*/ + virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0; +protected: + IMPORT_C virtual void MAnimationDataProviderObserver_Reserved1(); + IMPORT_C virtual void MAnimationDataProviderObserver_Reserved2(); + }; + +class CAnimationTicker; + +/** Interface used by an animator to during the rendering process. + +A class implementing this interface is provided to an animator by an animation. +It may or may not be the animation itself. + +You do not need to derive an implementation from this class unless you are +writing a new animation type. + +@publishedAll +@released +@see CAnimator*/ +class MAnimationDrawer + { +public: + /** Called by the animator when it needs to draw a new frame */ + virtual void AnimatorDraw() = 0; + /** Called by the animator when it is ready to begin running. + @param aSize The size of the smallest bounding rectangle that will be required to render the animation */ + virtual void AnimatorInitialisedL(const TSize& aSize) = 0; + /** Called by the animator when it is no longer ready, usually in + response to TAnimationEvent::EAnimationDataChanged */ + virtual void AnimatorResetL() = 0; + /** Called by the animator plugin loading routine to determine the type + of data for which an animator is required. + @return An 8 bit descriptor containing the data type.*/ + virtual const TPtrC8 AnimatorDataType() const = 0; + /** Called by the animator to obtain an AnimatorTicker, to which it will + add itself whenever it is running. + @return A reference to a CAnimationTicker.*/ + virtual CAnimationTicker& AnimatorTicker() = 0; +private: + IMPORT_C virtual void MAnimationDrawer_Reserved1(); + IMPORT_C virtual void MAnimationDrawer_Reserved2(); + }; + +class CAnimation; + +/** Interface used by an animation to report events to the client application. + +An animation can inform the client application of particular events through this +mechanism. Only errors are reported in this way in v9.1, but more events may +be added in future. + +Use of this interface by the client application is optional. + +@publishedAll +@released +@see CAnimation*/ +class MAnimationObserver + { +public: + /** Represents generic events which can be sent to the observer. */ + enum TEvent + { + /** Indicates that an error has occurred in the data provider. + For events of this type, aData is a pointer to a TInt error code. */ + EDataProviderError, + /** Indicates that the animator initialised (and therefore knows it's size) */ + EAnimationInitialized=0x01, + /** Any user defined animations introducing new events should use + values greater than EReserved */ + EReserved=0xFFFF, + }; +public: + /** Receives events from an animation. + + The receiver is not required to take any action atall in response to this + call. The receiver should not delete the animation whilst responding + to this call. + + @param aSender A reference to the animation which sent the event. + @param aEvent The event code. + @param aData An event specific data item.*/ + virtual void AnimationEvent(CAnimation& aSender, TInt aEvent, TAny* aData) = 0; +protected: + IMPORT_C virtual void MAnimationObserver_Reserved1(); + IMPORT_C virtual void MAnimationObserver_Reserved2(); + }; + +/** Interface used for receiving animation ticks. + +Animators receive regular ticks, during which they perform any required processing. + +You do not need to derive an implementation from this class unless you are writing +a new animator type. + +@publishedAll +@released +@see CAnimator +@see CAnimationTicker*/ +class MAnimationTickee + { +public: + /** This function is called regularly by any ticker to which the tickee + has been added */ + virtual void Tick() = 0; +protected: + IMPORT_C virtual void MAnimationTickee_Reserved1(); + IMPORT_C virtual void MAnimationTickee_Reserved2(); + }; + +/** Internal interface used by the ICL data loader to communicate with the +ICL data provider. Not intended for user derivation. +@internalComponent*/ +class MICLAnimationDataLoaderObserver + { +public: + enum TDataLoaderEvent + { + EImagePartialConvert, + EImageConvertComplete, + }; +public: + IMPORT_C virtual void DataLoaderEventL(TDataLoaderEvent aMessage, TInt aError) = 0; + }; + +#endif //__ANIMATIONMIXINS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationticker.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationticker.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,64 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONTICKER_H__ +#define __ANIMATIONTICKER_H__ + +#include + +class MAnimationTickee; + +/** This provides timing information for animators. + +You do not need to instantiate an object of this type unless you are writing a +new animation type. + +@see MAnimationTickee +@see CAnimationTls +@publishedAll +@released*/ +NONSHARABLE_CLASS(CAnimationTicker) : public CBase + { +public: + IMPORT_C static CAnimationTicker* NewL(TTimeIntervalMicroSeconds32 aTickLength = 100000); + IMPORT_C ~CAnimationTicker(); + + IMPORT_C TInt Add(MAnimationTickee* aTickee); + IMPORT_C TInt Remove(MAnimationTickee* aTickee); + IMPORT_C void Freeze(); + IMPORT_C void Unfreeze(); + + /** This provides the resolution of the timer. + @return iTickLength The resolution of the timer */ + inline const TTimeIntervalMicroSeconds32& TickLength() const { return iTickLength; } + void OnTick(); +protected: + IMPORT_C virtual void CAnimationTicker_Reserved1(); + IMPORT_C virtual void CAnimationTicker_Reserved2(); +private: + TInt iCAnimationTicker_Reserved; +private: + CAnimationTicker(); + void ConstructL(TTimeIntervalMicroSeconds32 aTickLength); + void StartTickingL(); + void StopTicking(); +private: + TInt iFreeze; + TTimeIntervalMicroSeconds32 iTickLength; + CPeriodic* iPeriodic; + RPointerArray iTickees; + }; + +#endif //__ANIMATIONTICKER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animationtls.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animationtls.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATIONTLS_H__ +#define __ANIMATIONTLS_H__ + +#include + +class CAnimationTicker; + +/** This is a wrapper around the thread local storage, which simplifies its +use for obtaining a CAnimationTicker object that can be shared between +animations. The object is reference counted, and only one will exist per +thread per DLL at any given time. + +You do not need to instantiate an object of this type unless you are writing a +new animation type. If you are writing a new animation type it is optional. + +@see CAnimationTicker +@publishedAll +@released */ +NONSHARABLE_CLASS(CAnimationTls) : public CBase + { +public: + IMPORT_C static CAnimationTls* NewL(); + IMPORT_C void Close(); + IMPORT_C CAnimationTicker* Ticker(); +protected: + CAnimationTls(); + ~CAnimationTls(); + IMPORT_C virtual void CAnimationTls_Reserved1(); + IMPORT_C virtual void CAnimationTls_Reserved2(); +protected: + /** A Reference count of the object */ + TInt iRefCount; + /** This provides timing information for animators */ + CAnimationTicker* iTimer; +private: + TInt iCAnimationTls_Reserved; + }; + +#endif // __ANIMATIONTLS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/animator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/animator.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,82 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ANIMATOR_H__ +#define __ANIMATOR_H__ + +#include + +const TUid KAnimatorInterfaceUid = {0x10204F59}; + +class MAnimationDrawer; +class CBitmapContext; +class TAnimationConfig; + +/** +Pure virtual base class for animators. + +Each data type supported by the animation framework is represented by an +animator, which handles the data interpretation, timing and control. Each +animator is provided in the form of an ECOM plugin. + +You do not need to instatiate animators in a client application. This is +handled by the animation classes. + +@see CAnimation +@publishedAll +@released +*/ +class CAnimator : public CBase + { +public: + // ECOM instatiation and destruction: + IMPORT_C static CAnimator* NewL(MAnimationDrawer* aRenderer); + IMPORT_C virtual ~CAnimator(); + /** Starts the animation running. + @see TAnimationConfig + @param aConfig Runtime settings*/ + virtual void Start(const TAnimationConfig& aConfig) = 0; + /** Stops the animation and rewinds it.*/ + virtual void Stop() = 0; + /** Pauses the animation.*/ + virtual void Pause() = 0; + /** Resumes a paused animation.*/ + virtual void Resume() = 0; + /** Puts an animation on hold. */ + virtual void Hold() = 0; + /** Restores a held animation and brings it back into synch. */ + virtual void Unhold() = 0; + /** Receives data from a data provider. The mechanism by which data is + actually passed depends on the animation type. + + @see MAnimationDataProviderObserver + @param aEvent The event identifier + @param aData A pointer to any data for the event + @param aDataSize The length of the data in aData*/ + virtual void DataEventL(TInt aEvent, TAny* aData, TInt aDataSize) = 0; + /** Called from the renderer and draws the animation. + @param aBitmapContext The context on which the animation will be drawn*/ + virtual void Draw(CBitmapContext& aBitmapContext) const = 0; + /** Called from the renderer and draws the mask for the animation. + @param aBitmapContext The context on which the mask will be drawn*/ + virtual void DrawMask(CBitmapContext& aBitmapContext) const = 0; +protected: + /** Animator ECOM Plugin identifier */ + TUid iDtor_ID_Key; + /** Data */ + TInt iLoop; + }; + +#endif //__ANIMATOR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/ansicomp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/ansicomp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Enforce ANSI compliance on Microsoft compilers in 'For loop' behaviour +// +// + + +#if !defined(__ANSICOMP_H__) +#define __ANSICOMP_H__ + +#if defined(__VC32__) && _MSC_VER>=1100 +#pragma warning(disable : 4127) // warning C4127 : conditional expression is constant + +#define for if(false);else for // Enforce the definition of a loop variable to local scope + +#endif + +#endif // __ANSICOMP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apacmdln.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apacmdln.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,178 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APACMDLN_H__) +#define __APACMDLN_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__APADEF_H__) +#include +#endif + +#if !defined(__F32FILE_H__) +#include +#endif + +#if !defined(__S32STRM_H__) +#include +#endif + + +class CApaCommandLine : public CBase +/** Information for launching an application. + +This is often referred to as a command line and contains: + +the name of an application EXE to be launched, + +a document name, + +a command code that defines the way the application is launched + +trailing data; the structure of this depends on the application to be launched. + +The information is held in a buffer implemented by a heap descriptor. + +@publishedAll +@released */ + { +public: + // construction/destruction + IMPORT_C static CApaCommandLine* NewL(); + IMPORT_C static CApaCommandLine* NewLC(); + IMPORT_C ~CApaCommandLine(); + + // Getting/setting the CApaCommandLine to/from process environment-slots + IMPORT_C void SetProcessEnvironmentL(RProcess& aProcess) const; + IMPORT_C static TInt GetCommandLineFromProcessEnvironment(CApaCommandLine*& aCommandLine); + + // Getting/setting the CApaCommandLine to/from a server IPC-message + IMPORT_C void GetIpcArgsLC(TIpcArgs& aIpcArgs) const; + IMPORT_C void ConstructCmdLineFromMessageL(const RMessage2& aMessage); + + // operations on the document name + IMPORT_C void SetDocumentNameL(const TDesC& aDocName); + IMPORT_C TPtrC DocumentName() const; + + // operations on the executable name + IMPORT_C void SetExecutableNameL(const TDesC& aAppName); + IMPORT_C TPtrC ExecutableName() const; + + IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData); + IMPORT_C TPtrC8 OpaqueData() const; + + // operations on the tail end + IMPORT_C void SetTailEndL(const TDesC8& aTailEnd); + IMPORT_C TPtrC8 TailEnd() const; + + // operations on the command + IMPORT_C void SetCommandL(TApaCommand aCommand); + IMPORT_C TApaCommand Command() const; + + // operations on the parent process id + IMPORT_C void SetParentProcessId(TProcessId aProcessId); + IMPORT_C TProcessId ParentProcessId() const; + + // operations on the file passed by handle + IMPORT_C void SetFileByHandleL(const RFile& aFile); + IMPORT_C void GetFileByHandleL(RFile& aFile) const; +public: + + // operations on the server requirement/differentiator number - 0 means no server, non-zero sets the differentiator for the server name + IMPORT_C void SetServerNotRequiredL(); + IMPORT_C void SetServerRequiredL(TUint aServerDifferentiator); + IMPORT_C TUint ServerRequired() const; + + // operations to support starting an application with a specific screen number + IMPORT_C void SetDefaultScreenL(TInt aDefaultScreenNumber); + IMPORT_C TInt DefaultScreen() const; + IMPORT_C TBool IsDefaultScreenSet() const; + + // Operations to support window chaining + IMPORT_C void SetParentWindowGroupID(TInt aParentWindowGroupID); + IMPORT_C TInt ParentWindowGroupID() const; + + // operations to support passing memory-allocation failure settings in to applications + IMPORT_C void SetDebugMemFailL(TInt aDebugMemFail); + IMPORT_C TInt DebugMemFail() const; + + // operations to support the instrumentation (i.e. profiling) of application startup + IMPORT_C void SetAppStartupInstrumentationEventIdBaseL(TInt aEventIdBase); + IMPORT_C TInt AppStartupInstrumentationEventIdBase() const; + + IMPORT_C static TInt EnvironmentSlotForPublicUse(TInt aIndex); + +private: + struct SOption + { + const TDesC* iToken; + TInt* iResult; + TRadix iRadix; + HBufC8* iHBufC8Result; + }; + +private: + CApaCommandLine(); + void SetServerDifferentiatorL(TUint aServerDifferentiator); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); + HBufC8* StreamableAttributesLC() const; + void GetCommandLineFromProcessEnvironmentL(); + TInt Parse(const TDesC& aCmdLine); + TPtrC StripQuotes(const TDesC& aDes) const; + +private: + enum + { + EEnvironmentSlotUnused=0, + + EEnvironmentSlotMain=1, + EEnvironmentSlotFsSession=2, + EEnvironmentSlotFile=3, + + EFirstEnvironmentSlotForPublicUse=8, + ENumberOfEnvironmentSlotsForPublicUse=4 + }; + + enum + { + EIpcSlotMain=0, + EIpcSlotFsSession=1, + EIpcSlotFile=2 + }; +public: + enum + { + EIpcFirstFreeSlot=3 + }; +private: + HBufC* iDocumentName; + HBufC* iExecutableName; + HBufC8* iOpaqueData; + HBufC8* iTailEnd; + TApaCommand iCommand; + TUint iServerDifferentiator; + TInt iDefaultScreenNumber; + TInt iParentWindowGroupID; + TInt iDebugMemFail; + TInt iAppStartupInstrumentationEventIdBase; + RFile iFile; + TProcessId iParentProcessId; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apadbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apadbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,127 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APADBASE_H__ +#define __APADBASE_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__S32STD_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif + + +class CApaDoorBase : public CPicture +// Base class for a wrapper for embedded CApaDocuments +/** The base class for the graphic representation of an embedded document. + +An embedded document can be represented either as an icon or as a glass picture. +Such a graphic representation is known as a door. + +The class is intended for derivation. + +@publishedAll +@released +@see CApaDoor +@see CApaModelDoor */ + { +public: + + /** Defines the possible formats for the graphical representation of the embedded + document. */ + enum TFormat { + /** The representation is an icon. */ + EIconic, + /** The representation is a glass door. */ + EGlassDoor, + /** The representation is a glass door but has been temporarily switched to an icon. */ + ETemporarilyIconic + }; +public: + inline TFormat Format()const; + inline TUid Source()const; + inline void SetSource(TUid aSource); + // Virtuals from CPicture + IMPORT_C virtual TStreamId StoreL(CStreamStore& aStore) const; + IMPORT_C virtual void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + IMPORT_C virtual void SetCropInTwips(const TMargins& aMargins); + IMPORT_C virtual TPictureCapability Capability() const; + IMPORT_C virtual void GetCropInTwips(TMargins& aMargins) const; + IMPORT_C virtual TInt ScaleFactorWidth() const; + IMPORT_C virtual TInt ScaleFactorHeight() const; + IMPORT_C virtual TBool LineBreakPossible(TUint aClass,TBool aBeforePicture,TBool aHaveSpaces) const; + IMPORT_C virtual TBool NativePixelSize(TSize& aPixelSize); +protected: + IMPORT_C CApaDoorBase(); + IMPORT_C void ExternalizeBaseStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const; + IMPORT_C TSize InternalizeBaseStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict); // returns current size in twips + +private: + IMPORT_C virtual void CApaDoorBase_Reserved1(); + IMPORT_C virtual void CApaDoorBase_Reserved2(); +protected: + + /** Returns the size of the glass door, in twips. + + A concrete implementation of this function is provided by derived classes. + + @return The size of the glass door, in twips. + + @publishedAll + @released */ + virtual TSize GlassDoorSize()const=0; +protected: + TFormat iFormat; + TUid iSource; // foreign representation of a translated door (eg MS Word doc) + +private: + TInt iCApaDoorBase_Reserved1; + }; + +// +// inlines +// + +inline CApaDoorBase::TFormat CApaDoorBase::Format()const + /** Gets the current format of the representation of the embedded document. + + @return The format for the representation of the embedded document. */ + { return iFormat; } + +inline TUid CApaDoorBase::Source()const + /** Gets the UID that identifies this door when the source originates on a non-Symbian + OS device. + + This is used by converters. + + @return The UID for the non-Symbian OS source. For a source that originates + on a Symbian OS phone, this is KNullUid. */ + { return iSource; } + +inline void CApaDoorBase::SetSource(TUid aSource) + /** Sets the UID that identifies this door when the source originates on a non-Symbian + OS device. + + This is used by converters. + + @param aSource The UID for the non-Symbian OS source. For a source that originates + on a Symbian OS phone, this is KNullUid. */ + { iSource=aSource; } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apadef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apadef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,291 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APADEF_H__ +#define __APADEF_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +// comand line tokens + +/** +@internalComponent +*/ +const TUint KApaCommandLetterOpen='O'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterCreate='C'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterRun='R'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterBackground='B'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterViewActivate='V'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterRunWithoutViews='W'; + +/** +@internalComponent +*/ +const TUint KApaCommandLetterBackgroundAndWithoutViews='A'; + +/** Defines the command codes used to indicate the way an application is to be +launched. + +@publishedAll +@released +@see CApaCommandLine */ +enum TApaCommand + { + /** The application is to open the document specified on the command line. */ + EApaCommandOpen, + /** The application is to create the document specified on the command line. */ + EApaCommandCreate, + /** The application is to run and open the last used document. */ + EApaCommandRun, + /** The application is to open the last used document and to run in the background. */ + EApaCommandBackground, + /** Reserved for future use. */ + EApaCommandViewActivate, + /** The application is to run without views. + + This should NOT be used for view based applications. */ + EApaCommandRunWithoutViews, + /** The application is to run in the background and viewless mode */ + EApaCommandBackgroundAndWithoutViews + }; + +/** +@publishedAll +@released +*/ +const TInt KApaMaxAppCaption=0x100; // Default name is a file name, so the same limit is used + +// TApaAppCaption is the current language name of the app (for task lists, dialogs etc) + +/** Defines a modifiable buffer descriptor to contain the caption or the short caption +for an application. + +@publishedAll +@released */ +typedef TBuf TApaAppCaption; + +/** +@internalComponent +*/ +const TInt KApaMaxCommandLine=0x100; + +/** +@internalComponent +*/ +typedef TBuf TApaCommandLine; + +/** +@internalComponent +*/ +const TInt KApaMaxAppFileName=0x10; // Length of App's filename without path or extension (not it's caption) + +/** +@internalComponent +*/ +typedef TBuf TApaAppFileName; + +/** Maximum length of an application group name. + +@publishedAll +@released +@see TApaAppGroupName */ +const TInt KApaMaxAppGroupName=0x10; // Length of App's logical groupname + +/** An application group name. + +This is a name that allows applications to be categorized, for instance "Games" +or "Utilities". + +@publishedAll +@released */ +typedef TBuf TApaAppGroupName; + +/** The hexadecimal value of the 2nd UID that identifies a DLL as being an ASCII UI +application. In .mmp files, the hexadecimal number is explicitly inserted +as the first value following the UID keyword. + +@publishedAll +@deprecated */ +const TInt KAppUidValue8 = 0x1000006c; + +/** The 2nd UID that identifies a DLL as being an ASCII UI application. + +@publishedAll +@deprecated */ +const TUid KUidApp8={KAppUidValue8}; + +/** The hexadecimal value of the 2nd UID that defines a DLL as being a Unicode +UI application. In .mmp files, the hexadecimal number is explicitly inserted +as the first value following the UID keyword. + +@publishedAll +@released +@see KAppUidValue */ +const TInt KAppUidValue16 = 0x100039CE; + +/** The 2nd UID that defines a DLL as being a Unicode UI application. + +@publishedAll +@released +@see KUidApp */ +const TUid KUidApp16={KAppUidValue16}; + +// +// 2nd Uid for app doc files +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppDllDoc8={268435565}; + +/** +@publishedAll +@released +*/ +const TUid KUidAppDllDoc16={0x10003A12}; + +/** The UID encoded in a TPictureHeader that identifies a picture as a door (for +ASCII builds). + +@publishedAll +@deprecated +*/ +const TUid KUidPictureTypeDoor8={268435537}; + +/** The UID encoded in a TPictureHeader that identifies a picture as a door (for +Unicode builds). + +@publishedAll +@released +@see KUidPictureTypeDoor */ +const TUid KUidPictureTypeDoor16={0x10003A33}; + +// +// Uid's for streams in stream dictionaries +/** +@publishedAll +@deprecated +*/ +const TUid KUidSecurityStream8={268435661}; + +/** +@publishedAll +@released +*/ +const TUid KUidSecurityStream16={0x10003A40}; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppIdentifierStream8={268435593}; // stream containing a TApaAppIdentifier + +/** +@publishedAll +@released +*/ +const TUid KUidAppIdentifierStream16={0x10003A34}; + +#ifdef _UNICODE +/** The type-independent 2nd UID that identifies a DLL as being a UI application. + +@publishedAll +@released +@see KUidApp16 +@see KUidApp8 */ +#define KUidApp KUidApp16 +/** The type-independent hexadecimal value of the 2nd UID that identifies a DLL as +being a UI application. + +@publishedAll +@released +@see KAppUidValue16 +@see KAppUidValue8 */ +#define KAppUidValue KAppUidValue16 //lint !e1923 supress could become const variable +/** +@publishedAll +@released +*/ +#define KUidAppDllDoc KUidAppDllDoc16 +/** The type independent UID encoded in a TPictureHeader that identifies a picture +as a door. + +@publishedAll +@released +@see KUidPictureTypeDoor16 +@see KUidPictureTypeDoor8 +@see TPictureHeader +@see TApaModelDoorFactory::NewPictureL() */ +#define KUidPictureTypeDoor KUidPictureTypeDoor16 +/** +@publishedAll +@released +*/ +#define KUidAppIdentifierStream KUidAppIdentifierStream16 +/** +@publishedAll +@released +*/ +#define KUidSecurityStream KUidSecurityStream16 +#else +/** The type independent 2nd UID that defines a DLL as being a UI application. + +@see KUidApp16 +@see KUidApp8 */ +#define KUidApp KUidApp8 +/** The type independent hexadecimal value of the 2nd UID that defines a DLL as +being a UI application. + +@see KAppUidValue16 +@see KAppUidValue8 */ +#define KAppUidValue KAppUidValue8 +#define KUidAppDllDoc KUidAppDllDoc8 +/** The type independent UID encoded in a TPictureHeader that identifies a picture +as a door. + +@see KUidPictureTypeDoor16 +@see KUidPictureTypeDoor8 +@see TPictureHeader +@see TApaModelDoorFactory::NewPictureL() */ +#define KUidPictureTypeDoor KUidPictureTypeDoor8 +#define KUidAppIdentifierStream KUidAppIdentifierStream8 +#define KUidSecurityStream KUidSecurityStream8 +#endif + +const TUid KUidFileEmbeddedApplicationInterfaceUid={0x101f8c96}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apaflrec.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apaflrec.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,208 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APAFLREC_H__) +#define __APAFLREC_H__ + +#if !defined(__APADEF_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif + +// classes defined: +class MApaAppStarter; +class CApaAppLocator; +class CApaFileRecognizer; +class CApaFileRecognizerType; +class CFileRecognizerExtension; +// +// classes referenced: +class TApaAppEntry; +class CApaCommandLine; +class RFs; +// + +// KUidFileRecognizer is UID[1] for app recognizer dll's (UID[2] identifies a particular identifier) +/** +@publishedAll +@released +*/ +#ifdef _UNICODE +#define KUidFileRecognizer KUidFileRecognizer16 +#else +#define KUidFileRecognizer KUidFileRecognizer8 +#endif + +/** +@publishedAll +@deprecated +*/ +const TInt KFileRecognizerUidValue8=0x1000013E; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidFileRecognizer8={KFileRecognizerUidValue8}; + +/** +@publishedAll +@released +*/ +const TUid KUidFileRecognizer16={0x10003A37}; +// + + +class CApaAppLocator : public CBase +/** +@internalComponent +*/ + { +public: + virtual TInt GetAppEntryByUid(TApaAppEntry& aAppEntry,TUid aAppUid)=0; + virtual TInt GetAppCapabilityByUid(TDes8& aCapabilityBuf,TUid aAppUid)=0; + }; + + + +class CApaFileRecognizer : public CBase +/** +@internalComponent +@deprecated +*/ + { +public: + // + IMPORT_C CApaFileRecognizerType* RecognizeFileL(const TDesC& aFullFileName,const TUidType* aUidType=NULL); + IMPORT_C CApaAppLocator* AppLocator() const; + // + IMPORT_C ~CApaFileRecognizer(); +protected: + IMPORT_C CApaFileRecognizer(RFs& aFs); + IMPORT_C void AddFileRecognizerType(CApaFileRecognizerType* aFileRecognizerType); + IMPORT_C TInt RemoveFileRecognizerType(const CApaFileRecognizerType* aFileRecognizerType); + IMPORT_C void SetAppLocator(CApaAppLocator* aAppLocator); // should be called by child-classes eg during construction + static inline void SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter); + IMPORT_C void DestroyRecognizerList(); +protected: + RFs& iFs; + CApaAppLocator* iAppLocator; +private: + CApaFileRecognizerType *iFileRecognizerList; + }; + + + +class MApaAppStarter +/** An interface used by the Application Architecture server to start applications. + +CEikonEnv is derived from this class. + +@publishedPartner +@released +@see CEikonEnv */ + { +public: + virtual TThreadId StartAppL(const CApaCommandLine& aCommandLine)=0; +protected: + IMPORT_C MApaAppStarter(); +private: + IMPORT_C virtual void MApaAppStarter_Reserved1(); + IMPORT_C virtual void MApaAppStarter_Reserved2(); +private: + TInt iMApaAppStarter_Reserved1; + }; + + + +class CApaFileRecognizerType : public CBase +/** +@publishedPartner +@deprecated +*/ + { +public: + enum TRecognizedType {EProgram,EDoc,EOtherFile,ENotRecognized}; +public: + virtual TThreadId RunL(TApaCommand aCommand,const TDesC* aDocFileName,const TDesC8* aTailEnd) const=0; + inline TThreadId RunL(TApaCommand aCommand, const TDesC* aDocFileName) const; + inline TThreadId RunL(TApaCommand aCommand) const; + inline TUid AppUid()const; + inline TUid TypeUid()const; + inline TRecognizedType Type()const; + IMPORT_C void Capability(TDes8& aCapabilityBuf)const; + IMPORT_C void Lock(); + IMPORT_C void Unlock(); +protected: + IMPORT_C CApaFileRecognizerType(); + IMPORT_C ~CApaFileRecognizerType(); + IMPORT_C TThreadId AppRunL(const CApaCommandLine& aCommandLine) const; +private: + inline void SetAppStarter(MApaAppStarter* aAppStarter); // must be called before AppRunL() + virtual TRecognizedType DoRecognizeFileL(RFs& aFs,TUidType aUidType)=0; + TRecognizedType RecognizeFileL(RFs& aFs,const TDesC& aFullFileName,TUidType aUidType); + TBool Locked()const; + IMPORT_C virtual void Reserved_1(); +public: + IMPORT_C static CApaFileRecognizerType* CreateFileRecognizerL(TUid aImplUid); +protected: + CApaFileRecognizer* iFileRecognizer; + MApaAppStarter* iAppStarter; + HBufC* iFullFileName; + TUid iFileType; // type UID of the recognizer file (ie UID[1]) + TUid iAppUid; // UID of the associated app (ie UID[2]) + TRecognizedType iRecognizedType; + TApaAppCapabilityBuf* iCapabilityBuf; +private: + CApaFileRecognizerType* iNext; + TInt iLock; + CFileRecognizerExtension* iFileRecognizerExtn; +private: + friend class CApaFileRecognizer; + }; + + +// +// inlines +// + +inline void CApaFileRecognizer::SetAppStarter(CApaFileRecognizerType* aRecognizer,MApaAppStarter* aAppStarter) + { aRecognizer->SetAppStarter(aAppStarter); } + +inline void CApaFileRecognizerType::SetAppStarter(MApaAppStarter* aAppStarter) + { iAppStarter = aAppStarter; } + +inline TUid CApaFileRecognizerType::AppUid() const + { return iAppUid; } + +inline TUid CApaFileRecognizerType::TypeUid() const + { return iFileType; } + +inline CApaFileRecognizerType::TRecognizedType CApaFileRecognizerType::Type()const + { return iRecognizedType; } + +inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand, const TDesC* aDocFileName) const + /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as third parameter. + @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */ + { return RunL(aCommand, aDocFileName, NULL); } + +inline TThreadId CApaFileRecognizerType::RunL(TApaCommand aCommand) const + /** Calls RunL(TApaCommand,const TDesC*,const TDesC8*) with NULL as second and third parameter. + @see CApaFileRecognizerType::RunL(TApaCommand,const TDesC*,const TDesC8*) */ + { return RunL(aCommand, NULL, NULL); } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apaid.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apaid.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,358 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APAID_H__ +#define __APAID_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APADEF_H__) +#include +#endif + +#include "apmstd.h" + + +// classes defined: +class TApaAppIdentifier; +class TApaAppEntry; +class CApaAppFinder; +// +// classes referenced: +class RReadStream; +class RWriteStream; +class RFs; +// + + +class TApaAppIdentifier +/** The identity of an application. + +An object of this type contains two pieces of information: + +The application specific UID + +The file name and extension of the application DLL + +All persisted documents associated with this application have a stream containing +this information. + +@publishedAll +@released +@see CApaProcess::ReadRootStreamLC() +@see CApaProcess::WriteRootStreamL() +@see CApaProcess::ReadAppIdentifierL() +@see CApaProcess::WriteAppIdentifierL() */ + { +public: + IMPORT_C TApaAppIdentifier(); + IMPORT_C TApaAppIdentifier(TUid aAppUidType,const TFileName& aDllName); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); + +public: + /** The application-specific UID. */ + TUid iAppUid; + /** The full path name of the application DLL. */ + TFileName iFullName; + +private: + TInt iTApaAppIdentifier_Reserved1; + }; + + +class TApaAppEntry +/** An application entry. + +An object of this type contains two pieces of information: + +the full path name of the application DLL + +the UID type (or compound identifier) of the application DLL. + +@publishedAll +@released */ + { +public: + IMPORT_C TApaAppEntry(); + IMPORT_C TApaAppEntry(const TUidType& aAppUidType,const TFileName& aDllName); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); +public: + /** The UID type (or compound identifier) of the application DLL. */ + TUidType iUidType; + /** The full path name of the application DLL. */ + TFileName iFullName; +private: + TInt iTApaAppEntry_Reserved1; + }; + + +class TApaAppInfo +/** Application information. + +An object of this type contains four pieces of information: + +the application specific UID + +the full path name of the application DLL + +the application's caption + +a short caption; how this is used is up to the UI + +@publishedAll +@released */ + { +public: + IMPORT_C TApaAppInfo(); + IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption); + IMPORT_C TApaAppInfo(TUid aAppUid,const TFileName& aDllName,const TApaAppCaption& aCaption,const TApaAppCaption& aShortCaption); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); +public: + /** The application specific UID. */ + TUid iUid; + /** The full path name of the application DLL. */ + TFileName iFullName; + /** The caption for the application. */ + TApaAppCaption iCaption; + /** The short caption for the application. */ + TApaAppCaption iShortCaption; + +private: + TInt iTApaAppInfo_Reserved1; + }; + + +class TApaAppViewInfo +/** Contains the basic information about an application view. + +An object of this type contains two pieces of information: + +The UID that identifies the view + +The application's caption. + +Objects of this type are returned in an array populated by a call to RApaLsSession::GetAppViews(). + +@publishedAll +@released +@see CApaAppViewArray +@see TUid */ + { +public: + IMPORT_C TApaAppViewInfo(); + IMPORT_C TApaAppViewInfo(TUid aViewUid,const TApaAppCaption& aViewCaption,TInt aScreenMode); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void InternalizeL(RReadStream& aStream); +public: + /** The UID identifying the view. */ + TUid iUid; + /** The application caption. */ + TApaAppCaption iViewCaption; + TInt iScreenMode; +private: + TInt iTApaAppViewInfo_Reserved1; + }; + + +/** Defines an array of TApaAppViewInfo objects contained within a flat dynamic +buffer. + +An array of this type is populated with TApaAppViewInfo objects in a call +to RApaLsSession::GetAppViews(). + +@publishedAll +@released */ +typedef CArrayFixFlat CApaAppViewArray; + + +class TApaAppCapability +// expandable class - add new members to the end, add them to the end of int/ext also, and increment the version no. +// default value for all data members must be 0 +/** Application capabilities. + +@publishedAll +@released */ + { +public: + IMPORT_C static void CopyCapability(TDes8& aDest,const TDesC8& aSource); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void Internalize7_0L(RReadStream& aStream); // deprecated + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; +private: + IMPORT_C void Externalize7_0L(RWriteStream& aStream) const; // deprecated + void DoInternalizeL(RReadStream& aStream, TBool& aLaunchInBackground, TApaAppGroupName& aGroupName); +public: + // + /** Defines an application's support for embeddability. */ + enum TEmbeddability { + /** An application cannot be embedded. */ + ENotEmbeddable=0, + /** An application can be run embedded or standalone and can read/write embedded document-content. */ + EEmbeddable=1, + /** An application can only be run embedded and can read/write embedded document-content. */ + EEmbeddableOnly=2, + /** An application can be run embedded or standalone and cannot read/write embedded document-content. */ + EEmbeddableUiOrStandAlone=5, + /** An application can only be run embedded and cannot read/write embedded document-content. */ + EEmbeddableUiNotStandAlone=6 }; + /** Defines an application's attributes as a set of bit flags. */ + enum TCapabilityAttribute + { + /** If set, the application was built as a DLL, otherwise it was built as an EXE. */ + EBuiltAsDll = 0x00000001, + /** If set, the application provides control panel functionality. */ + EControlPanelItem = 0x00000002, + /** If set, the application is not a native executable, and hence the "path" and "extension" (as well as the "name") must be provided in the app_file field of the APP_REGISTRATION_INFO resource. */ + ENonNative = 0x00000004 + }; +public: + /** Indicates the extent to which the application can be embedded. */ + TEmbeddability iEmbeddability; + /** Indicates whether the application is document-based and supports being asked + to create a new file. */ + TBool iSupportsNewFile; + /** Indicates whether the existence of the application should be advertised to the + user. If this is set to ETrue, the application does not appear on the Extras + Bar (or equivalent). */ + TBool iAppIsHidden; // not shown in the Shell etc. + /** Allows the application to be launched in the foreground (when set to EFalse) + or in the background (when set to ETrue). */ + TBool iLaunchInBackground; // Series 60 extension to allow apps to be launched in the background + /** Stores the application's logical group name. */ + TApaAppGroupName iGroupName; // Series 60 extension to allow apps to be categorized according a logical group name, e.g. 'games' + /** Indicates the application attributes. One or more values from TCapabilityAttribute may be specified. */ + TUint iAttributes; +private: + enum { EVersion=4 }; +private: + TInt iTApaAppCapability_Reserved1; + }; + +/** Packages the TApaAppCapability class. + +@publishedAll +@released */ +typedef TPckgBuf TApaAppCapabilityBuf; + + +/** Filter used to define the subset of applications returned by RApaLsSession::GetNextApp() + +@publishedAll +@released +*/ +class TApaEmbeddabilityFilter + { +public: + IMPORT_C TApaEmbeddabilityFilter(); + IMPORT_C void AddEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability); + IMPORT_C TBool MatchesEmbeddability(TApaAppCapability::TEmbeddability aEmbeddability) const; +private: + TUint iEmbeddabilityFlags; +private: + TInt iTApaEmbeddabilityFilter_Reserved1; + }; + + +class CApaAppFinder : public CBase +/** +@publishedPartner +@deprecated +*/ + { +public: + virtual void FindAllAppsL()=0; // sets up a scan for all apps + virtual TBool NextL(TApaAppEntry& aEntry)=0; // increments a scan for all apps + virtual TFileName FindAppL(const TDesC& aFileName,TUid aFileUid)=0; // searches for a particular app - should support wildcards in aFileName + // + virtual TFileName DefaultAppInfoFileName()const=0; // should return the full name, path and drive of the default icon file +protected: + IMPORT_C CApaAppFinder(); + +private: + IMPORT_C virtual void CApaAppFinder_Reserved1(); + IMPORT_C virtual void CApaAppFinder_Reserved2(); + }; + +/** +The uid for the Open service. + +@publishedPartner +@released +*/ +const TUid KOpenServiceUid = { 0x10208DCA }; + +/** Application service information. + +Encapsulates a service UID and associated opaque data. + +An instance of this class provides information about +a specific implementation of the service identified by +the encapsulated service UID. + +@publishedPartner +@released +*/ +class TApaAppServiceInfo + { +public: + TApaAppServiceInfo(); + TApaAppServiceInfo(TUid aUid, CArrayFixFlat* aDataTypes, + HBufC8* aOpaqueData); + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); + void Release(); + CArrayFixFlat& DataTypes(); + IMPORT_C TUid Uid() const; + IMPORT_C const CArrayFixFlat& DataTypes() const; + IMPORT_C const TDesC8& OpaqueData() const; +private: + TUid iUid; + CArrayFixFlat* iDataTypes; + HBufC8* iOpaqueData; + TInt iTApaAppServiceInfo; + }; + +/** Application service information array. + +Owns an array of TApaAppServiceInfo objects. + +@see TApaAppServiceInfo +@publishedPartner +@released +*/ +class CApaAppServiceInfoArray : public CBase + { +protected: + CApaAppServiceInfoArray(); +public: + /** Provides access to the encapsulated array of + TApaAppServiceInfo objects. + + @return A generic array of TApaAppServiceInfo objects. */ + virtual TArray Array()=0; + +private: + IMPORT_C virtual void CApaAppServiceInfoArray_Reserved1(); + IMPORT_C virtual void CApaAppServiceInfoArray_Reserved2(); + +private: + TInt iCApaAppServiceInfoArray_Reserved1; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apamdr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apamdr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,202 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APAMDR_H__ +#define __APAMDR_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__APADBASE_H__) +#include +#endif + +// classes defined: +class TApaModelDoorFactory; +class CApaModelDoor; +class CApaModelHeader; +class MApaModelHeaderFactory; +// +// classes referenced: +class RReadStream; +class RWriteStream; +class CStreamStore; +class CStreamDictionary; +class CEmbeddedStore; +class TApaAppIdentifier; +// + + +class TApaModelDoorFactory : public MPictureFactory +// Recognizes KUidPictureTypeDoor and creates CApaModelDoor pictures +/** A factory class for instantiating and restoring an application's door using +the application's model. + +@publishedAll +@released */ + { +public: + IMPORT_C TApaModelDoorFactory(const MApaModelHeaderFactory* aFactory); + // + // from MPictureFactory + IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only +private: + const MApaModelHeaderFactory* iHeaderFactory; + TInt iTApaModelDoorFactory_Reserved1; + }; + + +class CApaModelDoor : public CApaDoorBase +/** A persistent representation of a door that also acts as a wrapper around an +application's model. + +The class allows embedded data to be manipulated without requiring the whole +associated application. + +@publishedAll +@released */ + { +public: + IMPORT_C static CApaModelDoor* NewL(CApaModelHeader* aHeader); + IMPORT_C static CApaModelDoor* NewLC(CApaModelHeader* aHeader); + IMPORT_C static CApaModelDoor* NewL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory); + // + /** Gets the application model wrapper object. + + @return A pointer to the application model wrapper object. */ + inline CApaModelHeader* ModelHeader() { return iModelHeader; } + + /** Sets the format of the door. + + @param aFormat The format for the graphical representation of the embedded + document. */ + inline void SetFormat(TFormat aFormat) { iFormat = aFormat; } + // + IMPORT_C TStreamId StoreL(CStreamStore& aStore) const; + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId,const MApaModelHeaderFactory* aFactory); + // + IMPORT_C ~CApaModelDoor(); + // + // from CPicture + IMPORT_C void DetachFromStoreL(TDetach /*aDegree*/=EDetachFull); //lint !e1735 Virtual function has default parameter - Inherited from CPicture, must be fixed there + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; + IMPORT_C void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect,MGraphicsDeviceMap* aMap)const; + IMPORT_C void GetOriginalSizeInTwips(TSize& aSize)const; + IMPORT_C void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + IMPORT_C TInt ScaleFactorWidth()const; + IMPORT_C TInt ScaleFactorHeight()const; + // +private: + CApaModelDoor(); + CApaModelDoor(CApaModelHeader* aHeader); + // + static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aSourceStore,TStreamId aStreamId); + static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream); + void InternalizeModelL(const MApaModelHeaderFactory& aFactory); + // + // from CApaDoorBase + TSize GlassDoorSize()const; +private: + CApaModelHeader* iModelHeader; + CEmbeddedStore* iStore; + TSize iScaleFactor; + CBufSeg* iStoreHost; // the host for the embedded store, if the door has been detached from its originating store + }; + + +class CApaModelHeader : public CBase +// Abstract wrapper for an applications model - used for file format conversion etc +/** An interface class that acts as a wrapper for an application model. + +This is also known as an application model header. + +The class provides the knowledge for internalizing and externalizing an application +model's data. An instance of the class is used by CApaModelDoor. + +A concrete implementation of the class must be supplied by the application +model (not the application UI). An instance of the class is constructed by +a factory object that implements the MApaModelHeaderFactory interface; the +factory object is also supplied by the application model (not the application +UI). + +@publishedAll +@released +@see CApaModelDoor +@see TApaModelDoorFactory +@see MApaModelHeaderFactory */ + { +public: + /** Stores the model and its components in the specified store. + + @param aStore The store in which the model's components are to be stored. + @param aDict The stream dictionary into which stream IDs and associated UIDs + are put. */ + virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aDict) const=0; + /** Gets the identity of the application associated with the application model. + + @return The application identity. */ + virtual TApaAppIdentifier AppId()const=0; + /** Restores the model to the specified degree. + + An implementation of this function should propagate this call to all components + of the model. + + @param aDegree The degree to which restoration is needed. */ + virtual void DetachFromStoreL(CPicture::TDetach aDegree)=0; +protected: + IMPORT_C CApaModelHeader(); +private: + IMPORT_C virtual void Reserved_1(); + IMPORT_C virtual void Reserved_2(); +private: + TInt iCApaModelHeader_Reserved1; + }; + + + +class MApaModelHeaderFactory +/** An interface class that applications implement to construct an application model +wrapper object, also known as the application model header. + +@publishedAll +@released +@see CApaModelHeader */ + { +public: + /** Creates and returns an application model wrapper object. + + @param aStore The store containing model data. + @param aDict The stream dictionary. + @param aAppId The application's identity held as a stream in the application's + store + @return A pointer to the new application model wrapper object. */ + virtual CApaModelHeader* NewHeaderL(const CStreamStore& aStore,const CStreamDictionary& aDict,const TApaAppIdentifier& aAppId)const=0; +protected: + IMPORT_C MApaModelHeaderFactory(); +private: + IMPORT_C virtual void MApaModelHeaderFactory_Reserved1(); + IMPORT_C virtual void MApaModelHeaderFactory_Reserved2(); +private: + TInt iMApaModelHeaderFactory_Reserved1; + }; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apcaptionfile.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apcaptionfile.rh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Contains definitions for the resource files that are input to +// caption files for Series 60 +// +// + + + + +/** + @internalComponent +*/ +#define KMaxCaption 256 + +/** +@publishedAll +@released +*/ +STRUCT CAPTION_DATA + { + LTEXT caption(KMaxCaption)=""; + LTEXT shortcaption(KMaxCaption)=""; + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apgcli.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apgcli.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,309 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGCLI_H__) +#define __APGCLI_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APMSTD_H__) +#include +#endif +#if !defined(__APMREC_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif +#if !defined(__BADESCA_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif + +// classes referenced +class CApaCommandLine; +class CApaMaskedBitmap; +class MArrayFiller; +class RFile; + +class CApaLsSessionExtension; + +class CDataRecognitionResultArrayEntry; +class CApaRegistrationResourceFileWriter; +class CApaLocalisableResourceFileWriter; + +/* @internalComponent +*/ +IMPORT_C TUint MinApplicationStackSize(); + +class CDataRecognitionResultArray : public CBase +/** +This class holds the recognition results of a recognized directory. +@publishedAll +@released +*/ + { +public: // exported functions + IMPORT_C CDataRecognitionResultArray(); + IMPORT_C virtual ~CDataRecognitionResultArray(); + IMPORT_C const TFileName& Path() const; + IMPORT_C TUint Count() const; + IMPORT_C void GetDataRecognitionResultL(TDataRecognitionResult& aResult, const TUint aIndex) const; + IMPORT_C void GetFileNameL(TFileName& aFileName, const TUint aIndex) const; +public: // dll internally + TUint InternalizeL(const CBufFlat& aBuffer); + void SetPath(const TFileName& aPath); +private: + TFileName iPath; + RPointerArray iEntries; + }; + + + +//////////////////////////////////// +// RApaLsSession +//////////////////////////////////// + +class RApaLsSession : public RSessionBase +/** A session with the application architecture server. + +The server provides access to a cached list of the applications on the device. + +To use this class, clients first need to connect to the server. + +Then, one of GetAllApps(), GetEmbeddableApps() or GetFilteredApps() needs to be called. +These functions do some initialisation of server data in preparation for returning the +application list (which is owned by the server). + +Then, GetNextApp() is called in a loop. The first time around, it populates the session's +application list and retrieves the first application in the list. Further calls to GetNextApp() +retrieve the remaining applications in the list, until RApaLsSession::ENoMoreAppsInList is +returned. + +The session should be closed when it is no longer needed, before it goes out of scope. + +Various functions in RApaLsSession need to access the application list, and may return +RApaLsSession::EAppListInvalid to indicate that the function was called before the initial +population of the list is complete. If this occurs, you could try again after a short delay. + +This class provides many other functions, for instance launching applications, querying +application-specific information, recognising data. + +@publishedAll +@released */ + { + friend class CApaLsSessionExtension; +public: + enum { + /** A possible return value from GetNextApp(), to indicate that there are no more + applications in the list. */ + ENoMoreAppsInList=1, + /** Indicates that an RApaLsSession member function was called before the session's + application list is fully populated. */ + EAppListInvalid + }; + /** Defines the way an application is launched. */ + enum TLaunchType { + /** Launches a new instance of the application. */ + ELaunchNewApp=1, + /** Launches a new instance of the application if no existing instance of the application + is running. If an instance of the application is already running, then it + is brought to the foreground. */ + ESwitchFiles + }; + +public: + IMPORT_C RApaLsSession(); + // + IMPORT_C TInt Connect(); + IMPORT_C TVersion Version() const; + // + IMPORT_C TInt AppCount(TInt& aCount) const; // returns error + IMPORT_C TInt EmbeddableAppCount(TInt& aCount) const; // returns error + // + IMPORT_C TInt GetAllApps() const; // Call to initialize + IMPORT_C TInt GetAllApps(TInt aScreenMode) const; // Call to initialize + IMPORT_C TInt GetEmbeddableApps() const; // Call to initialize + IMPORT_C TInt GetEmbeddableApps(TInt aScreenMode) const; // Call to initialize + // 7.0s + IMPORT_C TInt GetFilteredApps(const TApaEmbeddabilityFilter& aFilter) const; // Call to initialize + IMPORT_C TInt GetFilteredApps(const TApaEmbeddabilityFilter& aFilter, TInt aScreenMode) const; // Call to initialize + // 8.1 + IMPORT_C TInt GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue) const; // Call to initialize + IMPORT_C TInt GetFilteredApps(TUint aCapabilityAttributeMask, TUint aCapabilityAttributeValue, TInt aScreenMode) const; // Call to initialize + // 9.0 + IMPORT_C TInt GetServerApps(TUid aServiceUid) const; // Call to initialize + IMPORT_C TInt GetServerApps(TUid aServiceUid, TInt aScreenMode) const; // Call to initialize + // + IMPORT_C TInt GetNextApp(TApaAppInfo& aInfo) const; // call repeatedly, returns err (inc ENoMoreAppsInList,EAppListInvalid) + IMPORT_C TInt GetNextApp(TApaAppInfo& aInfo,TInt aScreenMode) const; // call repeatedly, returns err (inc ENoMoreAppsInList,EAppListInvalid) + // + IMPORT_C TInt GetAppInfo(TApaAppInfo& aInfo,TUid aAppUid) const; + IMPORT_C TInt SetAppShortCaption(const TDesC& aShortCaption, TLanguage aLanguage, TUid aAppUid); + IMPORT_C TInt GetDefaultScreenNumber(TInt& aDefaultScreenNumber, TUid aAppUid) const; + +public: + IMPORT_C TInt GetAppCapability(TDes8& aCapabilityBuf,TUid aAppUid) const; + IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine); // This is only recommended for non document based apps + IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId); + IMPORT_C TInt StartApp(const CApaCommandLine& aCommandLine,TThreadId& aThreadId,TRequestStatus* aRequestStatusForRendezvous); + // + IMPORT_C TInt RecognizeData(const TDesC& aName, const TDesC8& aBuffer, TDataRecognitionResult& aDataType) const; + IMPORT_C TInt RecognizeData(const RFile& aFile, TDataRecognitionResult& aDataType) const; + IMPORT_C TInt RecognizeSpecificData(const TDesC& aName, const TDesC8& aBuffer, const TDataType& aDataType, TBool& aResult) const; + IMPORT_C TInt RecognizeSpecificData(const RFile& aFile, const TDataType& aDataType, TBool& aResult) const; + // + IMPORT_C TInt AppForDataType(const TDataType& aDataType, TUid& aAppUid) const; + IMPORT_C TInt StartDocument(const TDesC& aFileName, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + IMPORT_C TInt StartDocument(RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); + IMPORT_C TInt StartDocument(const TDesC& aFileName, const TDataType& aDataType, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + IMPORT_C TInt StartDocument(RFile& aFile, const TDataType& aDataType, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); + IMPORT_C TInt StartDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + IMPORT_C TInt StartDocument(RFile& aFile, TUid aAppUid, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous=NULL); + IMPORT_C TInt CreateDocument(const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType=ELaunchNewApp); + // + IMPORT_C TInt GetAppIcon(TUid aAppUid, TInt aSize, CApaMaskedBitmap& aAppBitmap) const; + // + IMPORT_C TInt AppForDocument(const TDesC& aFileName, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt AppForDocument(const RFile& aFile, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt IsProgram(const TDesC& aFileName, TBool& aProgram) const; + IMPORT_C TInt GetAcceptedConfidence(TInt& aConfidence) const; + IMPORT_C TInt SetAcceptedConfidence(TInt aConfidence); + IMPORT_C TInt GetMaxDataBufSize(TInt& aBufSize) const; + IMPORT_C TInt SetMaxDataBufSize(TInt aBufSize); + IMPORT_C TInt GetPreferredBufSize(TInt& aPreferredBufSize) const; + IMPORT_C TInt GetSupportedDataTypesL(CDataTypeArray& aDataTypes) const; + // + IMPORT_C TInt GetAppIconSizes(TUid aAppUid, CArrayFixFlat& aArrayToFill) const; + IMPORT_C TInt GetAppIcon(TUid aAppUid, TSize aSize, CApaMaskedBitmap& aAppBitmap) const; + IMPORT_C TInt GetAppIcon(TUid aAppUid, RFile& aFile) const; + // + IMPORT_C TInt GetAppViews(CApaAppViewArray& aAppViews, TUid aAppUid) const; + IMPORT_C TInt GetAppViewIcon(TUid aAppUid, TUid aViewUid, const TSize& aSize, CApaMaskedBitmap& aViewBitmap) const; + IMPORT_C TInt GetAppOwnedFiles(CDesCArray& aAppOwnedFiles, TUid aAppUid) const; + // + IMPORT_C TInt NumberOfOwnDefinedIcons(TUid aAppUid, TInt& aCount) const; + // + IMPORT_C TInt GetAppIcon(TUid aAppUid, HBufC*& aFullFileName) const; + IMPORT_C TInt GetAppViewIcon(TUid aAppUid, TUid aViewUid, HBufC*& aFullFileName) const; + IMPORT_C TInt InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid); + IMPORT_C TInt InsertDataMappingIfHigher(const TDataType& aDataType, TDataTypePriority aPriority, TUid aUid, TBool& aInserted); + IMPORT_C TInt DeleteDataMapping(const TDataType& aDataType); + /** + @internalComponent + @released + */ + IMPORT_C TInt InsertDataMapping(const TDataType& aDataType, TDataTypePriority aPriority, + TUid aUid, TUid aServiceUid); + /** + @internalComponent + @released + */ + IMPORT_C TInt DeleteDataMapping(const TDataType& aDataType, TUid aServiceUid); + /** + @internalComponent + @released + */ + IMPORT_C TInt GetAppByDataType(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const; + +public: + // + IMPORT_C CApaAppServiceInfoArray* GetAppServicesLC(TUid aAppUid) const; + IMPORT_C CApaAppServiceInfoArray* GetServiceImplementationsLC(TUid aServiceUid) const; + IMPORT_C CApaAppServiceInfoArray* GetServiceImplementationsLC(TUid aServiceUid, const TDataType& aDataType) const; + IMPORT_C void GetAppServicesL(TUid aAppUid, CArrayFixFlat& aServiceUids) const; + IMPORT_C CApaAppServiceInfoArray* GetAppServiceOpaqueDataLC(TUid aAppUid, TUid aServiceUid) const; + IMPORT_C TInt AppForDataTypeAndService(const TDataType& aDataType, TUid aServiceUid, TUid& aAppUid) const; + IMPORT_C TInt AppForDocumentAndService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt AppForDocumentAndService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType) const; + IMPORT_C TInt ApplicationLanguage(TUid aAppUid, TLanguage& aLanguage) const; + IMPORT_C void Close(); //lint !e1511 Member hides non-virtual member + + IMPORT_C void RegisterListPopulationCompleteObserver(TRequestStatus& aStatus) const; + IMPORT_C TInt CancelListPopulationCompleteObserver() const; + IMPORT_C TInt MatchesSecurityPolicy(TBool& aMatches, TUid aAppUid, const TSecurityPolicy& aSecurityPolicy) const; + IMPORT_C TInt RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult) const; + IMPORT_C void RecognizeFilesL(const TDesC& aPath, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); + IMPORT_C TInt RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult) const; + IMPORT_C void RecognizeFilesL(const TDesC& aPath, const TDesC8& aDataType, CDataRecognitionResultArray& aResult, TRequestStatus& aStatus); + IMPORT_C void CancelRecognizeFiles(); + + IMPORT_C void RegisterNonNativeApplicationTypeL(TUid aApplicationType, const TDesC& aNativeExecutable); + IMPORT_C void DeregisterNonNativeApplicationTypeL(TUid aApplicationType); + IMPORT_C void PrepareNonNativeApplicationsUpdatesL(); + IMPORT_C void RegisterNonNativeApplicationL(TUid aApplicationType, const TDriveUnit& aDrive, CApaRegistrationResourceFileWriter& aRegistrationResourceFile, CApaLocalisableResourceFileWriter* aLocalisableResourceFile, const RFile* aIconFile); + IMPORT_C void DeregisterNonNativeApplicationL(TUid aApplication); + IMPORT_C void CommitNonNativeApplicationsUpdatesL(); + IMPORT_C TInt RollbackNonNativeApplicationsUpdates(); + IMPORT_C void NotifyOnDataMappingChange(TRequestStatus& aRequestStatus); + IMPORT_C void CancelNotifyOnDataMappingChange(); + IMPORT_C TInt GetAppType(TUid& aTypeUid, TUid aAppUid) const; + + IMPORT_C TInt ForceRegistration(const RPointerArray& aRegFiles); + +public: + // not for public use + IMPORT_C static void SetFsSessionL(RFs& aFsSession); + IMPORT_C static void ClearFsSession(); + IMPORT_C static RFs* FsSession(); + IMPORT_C void SetNotify(TBool aCompleteImmediatelyIfNoScanImpendingOrInProgress, TRequestStatus& aStatus); + IMPORT_C void CancelNotify(); + +private: // Reserved for future use + IMPORT_C virtual void RApaLsSession_Reserved1(); + IMPORT_C virtual void RApaLsSession_Reserved2(); + +public: + /** + @publishedPartner + @released + */ + IMPORT_C void ForceCommitNonNativeApplicationsUpdatesL(); + +private: + void DoGetAppOwnedFilesL(CDesCArray& aArrayToFill, TUid aAppUid) const; + void DoGetAppViewsL(CApaAppViewArray& aArrayToFill, TUid aAppUid) const; + void DoGetAppIconSizesL(TUid aAppUid, CArrayFixFlat& aArrayToFill) const; + TInt DoAppCount(TInt& aCount,TInt aCommand) const; + void FetchArrayL(MArrayFiller& aArrayFiller,TUid aAppUid, TInt aOpcode, TInt aInitialBufSize) const; + CBufBase* GetServiceBufferLC(TInt aOpcode, TUid aUid1, TUid aUid2=KNullUid) const; + TInt StartAndCreate(TInt aRqst,const TDesC& aFileName, TUid aAppUid, TThreadId& aThreadId, TLaunchType aLaunchType); + CBufBase* GetServiceBufferLC(TInt aOpcode, TUid aUid1, const TDataType& aDataType) const; + TInt SendReceiveWithReconnect(TInt aFunction,const TIpcArgs& aIpcArgs) const; + TInt TransferAndInternalizeDataL(const TDesC& aPath, const TInt aRequiredBufferSize, CDataRecognitionResultArray& aResult) const; + TInt GetExecutableName(TDes& aNativeExecutableName, TDes& aLogicalExecutableName, HBufC8*& aOpaqueData, TIpcArgs& aIpcArgs, TInt aOpcode) const; + TInt GetOpaqueData(HBufC8*& aOpaqueData, TInt aLengthOfOpaqueData) const; + TInt StartApplicationPassingFileHandle(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const RFile& aFile, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); + TInt StartApplicationPassingDocumentName(const TDesC& aNativeExecutableName, const TDesC& aLogicalExecutableName, const TDesC8* aOpaqueData, const TDesC& aDocumentName, TThreadId& aThreadId,TApaCommand aCommand, TRequestStatus* aRequestStatusForRendezvous); + void StartApplicationL(const TDesC& aNativeExecutableName, const CApaCommandLine& aCommandLine, TThreadId& aThreadId, TRequestStatus* aRequestStatusForRendezvous); + TInt DoAppForDocumentOptionallySpecifyingService(const TDesC& aFileName, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const; + TInt DoAppForDocumentOptionallySpecifyingService(const RFile& aFile, TUid aServiceUid, TUid& aAppUid, TDataType& aDataType, TInt aOpcode) const; + TInt GetBufferFromFile(HBufC8*& aBuffer, const TDesC& aFileName) const; + TInt DoStartApp(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous); + void DoStartAppL(const CApaCommandLine& aCommandLine, TThreadId* aThreadId,TRequestStatus* aRequestStatusForRendezvous); + static void GetThreadIdL(TThreadId& aThreadId, const RProcess& aProcess); + static void DeletePointerToPointerToTAny(TAny* aPointerToPointerToTAny); + static CBufFlat* CreateRegFilesBufferL(const RPointerArray& aRegFiles); + static void CleanupOperation(TAny* aAny); + +private: // data + CApaLsSessionExtension* iExtension; // friend! + }; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apgctl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apgctl.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,160 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGCTL_H__ +#define __APGCTL_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif + +// classes defined: +class CApaSystemControl; +class CApaSystemControlList; +// +// classes referenced: +class RFs; +class CApaMaskedBitmap; +// + +/** +Calls the control DLL's first ordinal function to create and run the control. + +The function leaves with KErrBadLibraryEntryPoint if the ordinal 1 function +cannot be found. + +@publishedAll +@released +*/ +typedef TInt (*ApaRunSystemControl)(const TDesC&); + +/** +@publishedAll +@released +*/ +#ifdef _UNICODE +#define KUidSystemControlDll KUidSystemControlDll16 +#else +#define KUidSystemControlDll KUidSystemControlDll8 +#endif + +/** +@publishedAll +@deprecated +*/ +const TInt KSystemControlDllUidValue8=0x10000297; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidSystemControlDll8={KSystemControlDllUidValue8}; + +/** +@publishedAll +@released +*/ +const TUid KUidSystemControlDll16={0x10003A34}; + + +class CApaSystemControl : public CBase +/** Wrapper to a control panel application. + +An instance of the class represents a control panel application. It is also a cache for the control's icon and caption. + +An instance of the wrapper can only be constructed by the control panel application list, which +is a CApaSystemControlList object. + +@publishedAll +@released */ + { +public: + IMPORT_C void CreateL(); + IMPORT_C TUid Type()const; + IMPORT_C TFileName FileName()const; + IMPORT_C CApaMaskedBitmap* Icon()const; // one size of icon, 48x48? + IMPORT_C TPtrC Caption()const; + IMPORT_C TPtrC ShortCaption()const; +private: + static CApaSystemControl* NewL(RFs& aFs,const TDesC& aFullPath,const TUidType aUidType); + ~CApaSystemControl(); + + CApaSystemControl(RFs& aFs); + void ConstructL(const TDesC& aFullPath,const TUidType aUidType); +private: + CApaSystemControl* iNext; + HBufC* iCaption; + HBufC* iShortCaption; + CApaMaskedBitmap* iIcon; + TBool iExists; // used during updating + TFileName iFullPath; + TUidType iUidType; + RFs& iFs; + + friend class CApaSystemControlList; + }; + + + +class CApaSystemControlList : public CBase +/** Provides a list of all available control panel applications present on the phone. +This class is implemented as a linked list of CApaSystemControl. Updates the control panel application list by removing +control panels that no longer exist, adding new control panels found to the control panel application list and replacing +a control panel if found in an earlier drive. + +@see CApaSystemControl +@publishedPartner +@released +*/ + { +public: + IMPORT_C static CApaSystemControlList* NewL(RFs& aFs); + IMPORT_C ~CApaSystemControlList(); + + IMPORT_C TInt Count()const; + IMPORT_C TInt Index(TUid aType)const; + IMPORT_C CApaSystemControl* Control(TInt aIndex)const; + IMPORT_C CApaSystemControl* Control(TUid aType)const; + + IMPORT_C void UpdateL(); + inline TInt UpdateCount()const; +private: + CApaSystemControlList(RFs& aFs); + CApaSystemControl* PreviousControl(const CApaSystemControl* aControl) const; +private: + TInt iUpdateCount; + RFs& iFs; + CApaSystemControl* iControl; + }; + + +// +// inlines +// + + +inline TInt CApaSystemControlList::UpdateCount()const +/** Gets the number of times the control panel application list has been +updated (by calling UpdateL()). It returns 1 for a newly created list. + +@return The number of times the control panel application list has been changed. */ + { return iUpdateCount; } + + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apgdoor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apgdoor.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,181 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGDOOR_H__ +#define __APGDOOR_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__S32STD_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__APPARC_H__) +#include +#endif +#if !defined(__APADBASE_H__) +#include +#endif + +/** +@internalAll +*/ +#ifdef _UNICODE +#define KUidApaDoorDocStream KUidApaDoorDocStream16 +#else +#define KUidApaDoorDocStream KUidApaDoorDocStream8 +#endif + +/** +@internalComponent +@deprecated +*/ +const TUid KUidApaDoorDocStream8={0x10000144}; + +/** +@internalComponent +*/ +const TUid KUidApaDoorDocStream16={0x10003A35}; + +// classes defined: +class CApaDoor; +class TApaPictureFactory; +// +// classes referenced: +class CEmbeddedStore; +// + +class CApaDoor : public CApaDoorBase +/** A wrapper for an embedded document that can be displayed in a user interface +as an icon or a glass door. + +@publishedAll +@released */ + { +public: + IMPORT_C static CApaDoor* NewLC(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); // call to create a new door in iconic format - restoration is achieved with TApaPictureFactory + IMPORT_C static CApaDoor* NewL(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); // call to create a new door in iconic format - restoration is achieved with TApaPictureFactory + IMPORT_C static CApaDoor* NewL(RFs& aFs, const CStreamStore& aStore,TStreamId aStreamId,CApaProcess& aProcess); // restoring constructor called by TApaPictureFactory + // + IMPORT_C void SetFormatToIconL(); + IMPORT_C void SetFormatToGlassL(); + IMPORT_C void SetFormatToTemporaryIconL(TBool aEnabled=ETrue); + // + IMPORT_C CApaDocument* DocumentL(TBool aCheckPassword=EFalse); // returns a pointer to the doc, restoring it if necessary. Checks password if required. + inline TDesC* Caption()const; + IMPORT_C TUid AppUidL()const; + // + // persistence methods + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aHeadStreamId); + TStreamId StoreL(CStreamStore& aStore) const; + // + IMPORT_C ~CApaDoor(); + // + // from CPicture + void Draw(CGraphicsContext& aGc,const TPoint& aTopLeft,const TRect& aClipRect, + MGraphicsDeviceMap* aMap)const; // draws according to current iPicFormat + void DetachFromStoreL(TDetach aDegree=EDetachFull); //lint !e1735 Virtual function has default parameter - Must use the same default as declared by CPicture + void GetOriginalSizeInTwips(TSize& aSize)const; + void SetScaleFactor(TInt aScaleFactorWidth,TInt aScaleFactorHeight); + void SetCropInTwips(const TMargins& aMargins); + TPictureCapability Capability() const; + void GetCropInTwips(TMargins& aMargins) const; + TInt ScaleFactorWidth() const; + TInt ScaleFactorHeight() const; +private: + CApaDoor(RFs& aFs, CApaProcess& aProcess); + CApaDoor(RFs& aFs, CApaDocument& aDoc,const TSize& aDefaultIconSizeInTwips); + void ConstructL(); + // + void SetIconSizeInTwips(TSize aSize); // for use of factory + // + void StoreDocL(CPersistentStore& aStore)const; + void RestoreDocL(const CPersistentStore& aStore); + void RestoreDoorStateL(const CStreamStore& aStore,const CStreamDictionary& streamDic); + static CStreamDictionary* ReadStreamDictionaryLC(const CStreamStore& aStore,TStreamId aStreamId); + static void CopyStoreL(const CEmbeddedStore& aSourceStore,RWriteStream& aTargetStream); + void ExternalizeStateStreamL(CStreamStore& aStore,CStreamDictionary& aStreamDict)const; + void InternalizeStateStreamL(const CStreamStore& aStore,const CStreamDictionary& aStreamDict,TSize aDefaultIconSize); + // + // required so CPicture's can be swizzled + void ExternalizeL(RWriteStream& aStream)const; + // from CApaDoorBase + virtual TSize GlassDoorSize()const; + TUid AppUidFromStreamL() const; +private: + RFs& iFs; + HBufC* iAppCaption; // name of the app used to create the embedded object + CApaProcess* iApaProcess; + CApaDocument* iApaDoc; + CPicture* iPicture; // the current view of the door, either iconic or glass + CEmbeddedStore* iStore; // store containing the doc + CBufSeg* iStoreHost; // the host for the embedded store, if the door has been detached from its originating store + __MUTABLE TSize iIconSizeInTwips; + // + friend class TApaPictureFactory; + }; + + +class TApaPictureFactory : public MPictureFactory +// Recognizes KUidPictureTypeDoor and creates CApaDoor pictures +/** A factory class for instantiating and restoring an application's door. + +A door factory object is constructed by the UI environment and can be accessed +by calling CEikonEnv::PictureFactory(). + +@publishedAll +@released +@see CEikonEnv::PictureFactory() +@see CApaDoor */ + { +public: + IMPORT_C TApaPictureFactory(CApaProcess* aAppProcess); + inline void SetIconSize(TSize aIconSizeInTwips); + // + // from MPictureFactory + IMPORT_C void NewPictureL(TPictureHeader& aPictureHeader,const CStreamStore& aPictureStore)const; // used to create CApaDoor's during document restore only +protected: + IMPORT_C TApaPictureFactory(); + +private: + CApaProcess* iApaProcess; + TSize iIconSize; + TInt iSpare; + }; + + +// +// inlines +// + +inline TDesC* CApaDoor::Caption()const + /** Gets the name of the application with which the embedded document is associated. + + @return A pointer to a descriptor containing the name of the application. */ + { return iAppCaption; } + +inline void TApaPictureFactory::SetIconSize(TSize aIconSizeInTwips) + /** Sets the size of the icon. + + @param aIconSizeInTwips The size of the icon, in twips. */ + { iIconSize = aIconSizeInTwips; } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apgicnfl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apgicnfl.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,561 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGICNFL_H__ +#define __APGICNFL_H__ + +#include +#include +#include +#include +#include + +class CFbsBitmap; +class CPersistentStore; +class RReadStream; +class RWriteStream; + +class CApaMaskedBitmap : public CFbsBitmap +/** An application icon. + +This is a bitmap and a mask, managed by the Font and Bitmap server. + +An object of this type is passed to RApaLsSession::GetAppIcon() to fetch a +suitable application icon. + +@publishedAll +@released +@see RApaLsSession::GetAppIcon() */ + { +public: + IMPORT_C static CApaMaskedBitmap* NewLC(); + IMPORT_C static CApaMaskedBitmap* NewL(const CApaMaskedBitmap* aSourceIcon); + // + IMPORT_C CFbsBitmap* Mask() const; + IMPORT_C void InternalizeL(RReadStream& aStream); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation + IMPORT_C void ExternalizeL(RWriteStream& aStream) const;//lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation + // + IMPORT_C ~CApaMaskedBitmap(); + void SetRomBitmapL(TUint8* aRomPointer); //lint !e1511 Member hides non-virtual member - CFbsBitmap not primary intended for derivation + IMPORT_C void SetMaskBitmap(CFbsBitmap* aMask); +private: + CApaMaskedBitmap(); + void ConstructL(); +private: + CFbsBitmap* iMask; + }; + +/** +@internalComponent +*/ +class CApaResourceFileWriterBase : public CBase + { +protected: + class RBufferSink; + class MDataSink + { + public: + void WriteBufferL(const TDesC8& aBuffer); + void WriteCompressedUnicodeRunL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aTextAsCompressedUnicode); + void WriteInCompressedUnicodeFormatL(TInt aNumberOfBytesWhenUncompressed, const TDesC8& aData, TBool aInCompressedUnicodeRun); + TInt NumberOfBytesWhenUncompressed() const; + inline TBool CompressedUnicodeFormat() const {return (iBufferSinkForCompressedUnicodeFormat!=NULL);} + protected: + MDataSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat); + void FlushL(TBool aFinalFlush); + void Reset(TInt& aNumberOfBytesWhenUncompressed); + private: + void WriteRunLengthL(TInt aRunLength); + private: + enum + { + EFlag_InCompressedUnicodeRun =0x00000001 + }; + private: + // new virtual functions + virtual void DoWriteBufferL(const TDesC8& aBuffer)=0; + private: + TInt iNumberOfBytesWhenUncompressed; + TUint iFlags; + RBufferSink* iBufferSinkForCompressedUnicodeFormat; // does not own what it points to + }; + class RBufferSink : public MDataSink + { + public: + RBufferSink(RBufferSink* aBufferSinkForCompressedUnicodeFormat); + void ConstructLC(); + void Close(); + void FlushAndGetAndResetL(TInt& aNumberOfBytesWhenUncompressed, RBuf8& aBuffer); + private: + // from MDataSink + virtual void DoWriteBufferL(const TDesC8& aBuffer); + private: + RBuf8 iBuffer; + }; +protected: + CApaResourceFileWriterBase(); + void DoGenerateFileContentsL(RBuf8& aBuffer, TUid aUid2, TUid aUid3) const; + void WriteUidTypeL(MDataSink& aDataSink, TUid aUid2, TUid aUid3) const; + void WriteTextL(MDataSink& aDataSink, const TDesC& aText) const; + void WriteText8L(MDataSink& aDataSink, const TDesC8& aText8) const; + void WriteUint8L(MDataSink& aDataSink, TUint aUint8) const; + void WriteLittleEndianUint16L(MDataSink& aDataSink, TUint aUint16) const; + void WriteLittleEndianUint32L(MDataSink& aDataSink, TUint aUint32) const; + void WriteBufferL(MDataSink& aDataSink, const TDesC8& aBuffer) const; +private: + static HBufC8* AsCompressedUnicodeLC(const TDesC& aUncompressedUnicode); + void MainResourceInCompiledFormatLC(TInt& aMainResourceSizeInBytesWhenUncompressed, RBuf8& aBuffer, TBool aCompressedUnicodeFormat) const; +private: + // new virtual functions + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const=0; + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const=0; + }; + +/** +Used to support the registration of non-native applications. + +The task of this class is to generate the resource files expected by the Apparc server. Applications +that register other applications can use functions of this class to customise the generated resource files. + +@publishedPartner +@released +*/ +class CApaRegistrationResourceFileWriter : public CApaResourceFileWriterBase + { +public: + IMPORT_C static CApaRegistrationResourceFileWriter* NewL(TUid aAppUid, const TDesC& aAppFile, TUint aAttributes); + IMPORT_C virtual ~CApaRegistrationResourceFileWriter(); + TUid AppUid() const; + void GenerateFileContentsL(RBuf8& aBuffer) const; + void SetLocalisableResourceFileL(const TDesC& aLocalisableResourceFile); + IMPORT_C void SetAppIsHiddenL(TBool aAppIsHidden); + IMPORT_C void SetEmbeddabilityL(TApaAppCapability::TEmbeddability aEmbeddability); + IMPORT_C void SetSupportsNewFileL(TBool aSupportsNewFile); + IMPORT_C void SetLaunchInBackgroundL(TBool aLaunchInBackground); + IMPORT_C void SetGroupNameL(const TDesC& aGroupName); + IMPORT_C void SetDefaultScreenNumberL(TInt aDefaultScreenNumber); + IMPORT_C void SetOpaqueDataL(const TDesC8& aOpaqueData); + IMPORT_C void AddDataTypeL(TInt aPriority, const TDesC8& aType); + IMPORT_C void AddFileOwnershipInfoL(const TDesC& aFileName); +// Not needing to be supported for the foreseeable future: +// IMPORT_C void AddServiceInfoL(TUid aServiceUid, const TDesC8* aOpaqueData); +// IMPORT_C void AddServiceInfoDataTypeL(TUid aServiceUid, TInt aPriority, const TDesC8& aType); +private: + struct SDataType // DATATYPE + { + TInt iPriority; + HBufC8* iType; + }; + struct SFileOwnershipInfo // FILE_OWNERSHIP_INFO + { + HBufC* iFileName; + }; +private: + CApaRegistrationResourceFileWriter(TUid aAppUid, TUint aAttributes); + void ConstructL(const TDesC& aAppFile); + void WriteDataTypeL(MDataSink& aDataSink, const SDataType& aDataType) const; + void WriteFileOwnershipInfoL(MDataSink& aDataSink, const SFileOwnershipInfo& aFileOwnershipInfo) const; + // from CApaResourceFileWriterBase + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const; + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const; +private: + TUid iAppUid; + HBufC* iAppFile; + TUint iAttributes; + HBufC* iLocalisableResourceFile; + TBool iAppIsHidden; + TApaAppCapability::TEmbeddability iEmbeddability; + TBool iSupportsNewFile; + TBool iLaunchInBackground; + HBufC* iGroupName; + TInt iDefaultScreenNumber; + HBufC8* iOpaqueData; + RArray iDataTypeList; + RArray iFileOwnershipList; + }; + +/** +@internalAll +*/ +class CApaLocalisableResourceFileWriter : public CApaResourceFileWriterBase + { +public: + IMPORT_C static CApaLocalisableResourceFileWriter* NewL(const TDesC& aShortCaption, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aGroupName); + IMPORT_C virtual ~CApaLocalisableResourceFileWriter(); + void GenerateFileContentsL(RBuf8& aBuffer) const; + void SetIconFileL(const TDesC& aIconFile); +// Not needing to be supported for the foreseeable future: +// IMPORT_C void AddViewDataL(TUid aViewUid, TInt aScreenMode, const TDesC& aCaption, TInt aNumberOfIcons, const TDesC& aIconFile); +private: + struct SCaptionAndIconInfo // CAPTION_AND_ICON_INFO + { + HBufC* iCaption; + TInt iNumberOfIcons; + HBufC* iIconFile; + }; +private: + CApaLocalisableResourceFileWriter(TInt aNumberOfIcons); + void ConstructL(const TDesC& aShortCaption, const TDesC& aCaption, const TDesC& aGroupName); + void WriteCaptionAndIconInfoL(MDataSink& aDataSink, const SCaptionAndIconInfo& aCaptionAndIcon) const; + // from CApaResourceFileWriterBase + virtual void MainResourceInCompiledFormatL(MDataSink& aDataSink) const; + virtual const TDesC8* SecondResourceL(TBool& aSecondResourceInCompressedUnicodeFormat) const; +private: + HBufC* iShortCaption; + SCaptionAndIconInfo iCaptionAndIcon; + HBufC* iGroupName; + }; + +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + +class CApaAppInfoFileWriter; + +/** +@internalAll +*/ +const TUid KUidInterimFormatFileForJavaMIDletInstaller={0x10208182}; + +/** +@internalAll +*/ +class ForJavaMIDletInstaller + { +public: + IMPORT_C static void CheckInterimFormatFileNotCorruptL(RFile& aInterimFormatFile); + IMPORT_C static void GetJavaMIDletInfoL(RFs& aFs, const TDesC& aFileName,TUint32& aJavaMIDletInfo_AmsAuthId,TUint32& aJavaMIDletInfo_MIDlet); + IMPORT_C static CApaAppInfoFileWriter* NewInterimFormatFileWriterLC(RFs& aFs,const TDesC& aFileName,TUid aApplicationUid,TUint32 aJavaMIDletInfo_AmsAuthId,TInt aJavaMIDletInfo_MIDlet); + }; + +#endif // UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER + +#if (((defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1)) || defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER)) + +#if !defined(IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER) +// we're compiling a source file that doesn't define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER, so give it it's default "value" of "IMPORT_C" +#define IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER IMPORT_C +#endif + +/** +@publishedAll +@deprecated +*/ +#ifdef _UNICODE +#define KUidAppInfoFile KUidAppInfoFile16 +#else +#define KUidAppInfoFile KUidAppInfoFile8 +#endif + +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppInfoFile8={268435562}; + +/** +@publishedAll +@deprecated +*/ +const TUid KUidAppInfoFile16={0x10003A38}; + +/** +@internalComponent +*/ +const TUid KUidAppInfoFileVersion2={0x101fb032}; + +/** +@internalComponent +*/ +enum TAifVersion +// The order here is important, only ever APPEND to the list + { + EAifVersionOriginal, + EAifVersionAddsDataType, + EAifVersionAddsViewData, + EAifVersionAddsFileOwnershipInfo +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + ,EAifVersionAddsJavaMIDletInfo +#endif + }; + +class CApaAIFCaption : public CBase +// +// Represents a caption in an AIF during reading and writing of the file. +/** +@internalComponent +*/ + { +public: + ~CApaAIFCaption(); + CApaAIFCaption(); + void ConstructL(TLanguage aLanguage,const TDesC& aCaption); + static CApaAIFCaption* NewLC(TLanguage aLanguage,const TDesC& aCaption); + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TLanguage Language() const; + TApaAppCaption Caption() const; +public: + HBufC* iCaption; + TLanguage iLanguage; + }; + +class CApaAIFViewData : public CBase +// +// Represents the data associated with an application view described in an AIF +// during reading and writing of the file. +// implementation class +/** +@internalComponent +*/ + { +public: + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* IconByIndexL(TInt aIndex) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfIcons() const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TUid ViewUid() const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt ScreenMode() const; +public: + ~CApaAIFViewData(); + static CApaAIFViewData* NewLC(); + static CApaAIFViewData* NewLC(const CApaAIFViewData& aSourceData); + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + void SetScreenMode(TInt aScreenMode); + void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption); + void AddIconL(CApaMaskedBitmap& aIcon); + void AddIconIndexL(TInt aIndex); + void SetViewUid(TUid aUid); + void LoadIconsL(const TDesC& aFileName, TUint aMbmOffset); +private: + CApaAIFViewData(); + void ConstructL(); + void ConstructL(const CApaAIFViewData& aSourceData); +private: + TInt iScreenMode; + CArrayPtr* iIconArray; + CArrayPtr* iCaptionArray; + TUid iViewUid; + CArrayFixFlat* iIconIndexArray; // used for AIF version 2 format + }; + +class CApaAppInfoFile : public CBase +/** +@internalComponent +*/ + { +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + friend class ForJavaMIDletInstaller; +#endif +public: + ~CApaAppInfoFile(); + // +protected: + CApaAppInfoFile(RFs& aFs); + void ConstructL(); +protected: + + class TCaptionHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iCaption; + TLanguage iLanguage; + }; + class TIconHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iIcon; // Used for old AIF format Internalize + TInt iIconSideInPixels; + TSwizzle iIconMain; // Used for new AIF format + TSwizzle iIconMask; // Used for new AIF format + }; + class TDataTypeHeader + { + public: + // header info only + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iDataType; + TDataTypePriority iPriority; + }; + class TViewDataHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iViewData; + }; + class TFileOwnershipInfoHeader + { + public: + void InternalizeL(RReadStream& aStream); // internalizes the header info only + void ExternalizeL(RWriteStream& aStream) const; // externalizes the header info only + public: + TSwizzle iOwnedFileName; + }; +protected: + RFs& iFs; + CPersistentStore* iStore; + CArrayFix* iCaptionHeaderArray; + CArrayFix* iIconHeaderArray; + CArrayFix* iDataTypeHeaderArray; + CArrayFix* iViewDataHeaderArray; + CArrayFix* iFileOwnershipInfoHeaderArray; + TApaAppCapability iCapability; + }; + +class CApaAppInfoFileReader : public CApaAppInfoFile +/** Aif file reader. + +Aif files contain information about an application, including its icons and +captions. + +An application can get a reader for its own aif file by calling CEikApplication::OpenAppInfoFileLC(). + +@publishedAll +@deprecated */ + { +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + friend class ForJavaMIDletInstaller; +#endif +public: + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileReader* NewL(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid=KNullUid); + // + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void Capability(TDes8& aInfo) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TApaAppCaption CaptionL(TLanguage aLanguage); + + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapL(TInt aIconSideInPixels); // If there are no bitmaps in the file this method leaves with KErrNotFound + // Not available until ER6 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER CApaMaskedBitmap* CreateMaskedBitmapByIndexLC(TInt aIndex); // If there are no bitmaps in the file this method leaves with KErrNotFound + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER TInt NumberOfBitmaps() const; + + // Not available till ER5 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void DataTypesSupportedL(CArrayFix& aTypeList) const; + // + + // Not available till ER6.1 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetViewsL(CArrayPtr& aViewList) const; + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void GetOwnedFilesL(CDesCArray& aOwnedFilesList) const; + // + + // utility function + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void StretchDrawL(CFbsBitmap* aSource,CFbsBitmap* aTarget,TSize aSizeInPixels); + // + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER ~CApaAppInfoFileReader(); +public: + static void GetAifFileNameL(const TDesC& aFullName,TDes& aAifName); +private: + CApaAppInfoFileReader(RFs& aFs); + void InternalizeL(RReadStream& aStream); + void ConstructL(const TDesC& aFileName,TUid aUid); + void LoadAifFileVersionTwoL(const TDesC& aFileName, TUid aMostDerivedUid); + void AddIconHeadersL(const TDesC& aFileName, TInt32 aFileOffset, TInt aNumIcons); +private: + HBufC* iDefaultCaption; + TUint8* iRomPointer; + TInt iMbmOffset; + HBufC* iAifFileName; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + TUint32 iJavaMIDletInfo_AmsAuthId; + TInt iJavaMIDletInfo_MIDlet; +#endif + }; + +class CApaAppInfoFileWriter : public CApaAppInfoFile +/** +Aif file writer. + +This class writes application information, including icons and captions into the aif file. + +@publishedAll +@deprecated */ + { +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + friend class ForJavaMIDletInstaller; +#endif +public: + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static CApaAppInfoFileWriter* NewLC(RFs& aFs, const TDesC& aFileName,TUid aApplicationUid); + // + IMPORT_C TInt SetCapability(const TDesC8& aInfo); + IMPORT_C void AddCaptionL(TLanguage aLanguage,const TDesC& aCaption); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddIconL(const TDesC& aIconFileName); + IMPORT_C void AddIconL(CApaMaskedBitmap& aIcon); + + // Not available till ER5 + IMPORT_C void AddDataTypeL(const TDataTypeWithPriority& aTypePriority); + // + + // Not available till ER6.1 + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewL(TUid aViewUid,TInt aScreenMode); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewCaptionL(TLanguage aLanguage,const TDesC& aCaption,TUid aViewUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddViewIconL(CApaMaskedBitmap& aIcon,TUid aViewUid); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void StoreViewL(TUid aViewId); + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER void AddOwnedFileL(const TDesC& aOwnedFileName); + // + + IMPORT_C void StoreL(); + // + IMPORT_C ~CApaAppInfoFileWriter(); +private: + CApaAppInfoFileWriter(RFs& aFs); + void ExternalizeL(RWriteStream& aStream) const; + void ConstructL(const TDesC& aFileName,TUid aUid +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + ,TUid aMiddleUid=KUidAppInfoFile,TUint32 aJavaMIDletInfo_AmsAuthId=0,TInt aJavaMIDletInfo_MIDlet=0 +#endif + ); +private: + CStoreMap* iMap; +#if defined(UI_FRAMEWORKS_V1_REMNANT_FOR_JAVA_MIDLET_INSTALLER) + TUint32 iJavaMIDletInfo_AmsAuthId; + TInt iJavaMIDletInfo_MIDlet; +#endif + }; + +class CApaAppCaptionFileReader : public CBase +/** +@internalComponent +*/ + { +public: + CApaAppCaptionFileReader(RFs& aFs,const TDesC& iAppFileName); + void GetCaptionsL(TApaAppCaption& aCaption,TApaAppCaption& aShortCaption); +private: + RFs& iFs; + TFileName iCaptionFileName; + }; + +class AppInfoFileUtils +// Internal utilities providing helper functions for non-ROM localisation +/** +@internalComponent +*/ + { +public: // For internal use only + IMPORT_C_NOT_NEEDED_FOR_JAVA_MIDLET_INSTALLER static void GetAifFileName(const RFs& aFs,TDes& aAifName); +public: + static void GetAifFileNameL(const RFs& aFs,const TDesC& aFullName,TDes& aAifName); + }; +#endif // #if (defined(SYMBIAN_SUPPORT_UI_FRAMEWORKS_V1) || !defined(SYMBIAN_HIDE_UI_FRAMEWORKS_V1)) && !defined(SYMBIAN_REMOVE_UI_FRAMEWORKS_V1) + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apgtask.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apgtask.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,195 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APGTASK_H__ +#define __APGTASK_H__ + +#include +#include + +class RWsSession; +struct TKeyEvent; + +/** @internalTechnology */ +static const TInt KApaSystemEventsWithPowerMgmtCapabilityStart = 100; +/** @internalTechnology */ +static const TInt KApaSystemEventsWithPowerMgmtCapabilityEnd = 199; + +/** Defines the event types that a TApaTask object can send to its window group. + +The events are sent by TApaTask::SendSystemEvent() and are handled by CEikAppUi::HandleSystemEventL(). + +@publishedAll +@released +@see TApaTask::SendSystemEvent() +@see CEikAppUi +@see CCoeAppUi::HandleSystemEventL() */ +enum TApaSystemEvent + { + /** The task is being closed. */ + EApaSystemEventShutdown=1, + /** Reserved for future use. */ + EApaSystemEventBackupStarting, + /** Reserved for future use. */ + EApaSystemEventBackupComplete, + /** The task is being brought to the foreground. */ + EApaSystemEventBroughtToForeground, + /** Close any tasks including system tasks. + Events in the range @c KApaSystemEventsWithPowerMgmtCapabilityStart to + @c KApaSystemEventsWithPowerMgmtCapabilityEnd requires capability PowerMgmt*/ + EApaSystemEventSecureShutdown = KApaSystemEventsWithPowerMgmtCapabilityStart + }; + +#ifdef _UNICODE +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchOpenFile KUidApaMessageSwitchOpenFile16 + +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchCreateFile KUidApaMessageSwitchCreateFile16 + +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchOpenFileValue KUidApaMessageSwitchOpenFileValue16 + +/** +@publishedAll +@released +*/ +#define KUidApaMessageSwitchCreateFileValue KUidApaMessageSwitchCreateFileValue16 +#else +#define KUidApaMessageSwitchOpenFile KUidApaMessageSwitchOpenFile8 +#define KUidApaMessageSwitchCreateFile KUidApaMessageSwitchCreateFile8 +#define KUidApaMessageSwitchOpenFileValue KUidApaMessageSwitchOpenFileValue8 +#define KUidApaMessageSwitchCreateFileValue KUidApaMessageSwitchCreateFileValue8 +#endif + +/** +@internalComponent +*/ +const TInt KUidApaMessageSwitchOpenFileValue16=0x10003A39; + +/** +@internalComponent +*/ +const TUid KUidApaMessageSwitchOpenFile16={KUidApaMessageSwitchOpenFileValue16}; + +/** +@internalComponent +*/ +const TInt KUidApaMessageSwitchCreateFileValue16=0x10003A3A; + +/** +@internalComponent +*/ +const TUid KUidApaMessageSwitchCreateFile16={KUidApaMessageSwitchCreateFileValue16}; + +class TApaTask +/** Application task. + +A task is a running application. At any one time, for any given application, +there may be zero, one, or more tasks running on a device. + +A task is identified by its association with the running application's window +group. + +An instance of the TApaTaskList class is used to find and access specific +tasks. + +@publishedAll +@released +@see TApaTaskList +@see RWindowGroup +@see RWsSession */ + { +public: + + IMPORT_C TApaTask(RWsSession& aWsSession); + IMPORT_C void SetWgId(TInt aWgId); + IMPORT_C TInt WgId() const; + IMPORT_C TBool Exists() const; + IMPORT_C TThreadId ThreadId() const; + IMPORT_C void BringToForeground(); + IMPORT_C void SendToBackground(); + IMPORT_C void EndTask(); + IMPORT_C void KillTask(); + IMPORT_C void SendKey(TInt aKeyCode,TInt aModifiers); + IMPORT_C void SendKey(const TKeyEvent& aKey); + IMPORT_C void SendSystemEvent(TApaSystemEvent aEvent); + IMPORT_C TInt SwitchOpenFile(const TDesC& aFilename); + IMPORT_C TInt SwitchCreateFile(const TDesC& aFilename); + IMPORT_C TInt SendMessage(TUid aUid, const TDesC8& aParams); + +private: + TInt CheckSwitchFile() const; + void SendSystemEvent(TApaSystemEvent aEvent, TEventCode aType); +private: + RWsSession& iWsSession; + TInt iWgId; + TInt iTApaTask_Reserved1; + }; + +class TApaTaskList +/** Accesses tasks running on a device. + +Tasks can be identified by document, application specific UID or by caption +name. + +Users of this class can also cycle through a set of tasks running a specific +application, bringing each one, in turn, into the foreground. + +@publishedAll +@released +@see TApaTask */ + { +public: + /** Defines the direction in which tasks are cycled to the foreground. This is used + by the CycleTasks() function. + + @see TApaTaskList::CycleTasks() */ + enum TCycleDirection + { + /** Cycles the task list forwards, i.e. the foreground task is moved to background, + bringing the next foremost task to the foreground. */ + EForwards, + /** Cycles the list backwards, i.e. the task furthest from the foreground is brought + to the foreground, pushing what was the foremost task to the next ordinal + position. */ + EBackwards + }; +public: + IMPORT_C TApaTaskList(RWsSession& aWsSession); + IMPORT_C TApaTask FindApp(const TDesC& aAppName); + IMPORT_C TApaTask FindDoc(const TDesC& aDocName); + IMPORT_C TApaTask FindByPos(TInt aPos); + IMPORT_C TApaTask FindApp(TUid aAppUid); + IMPORT_C TInt CycleTasks(TUid aAppUid,TCycleDirection aDirection=EForwards); + +private: + void FindByPosL(TApaTask& aTask,TInt aPos); +private: + RWsSession& iWsSession; + TInt iTApaTaskList_Reserved1; + }; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apgwgnam.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apgwgnam.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,106 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__APGWGNAM_H__) +#define __APGWGNAM_H__ + +#if !defined(__W32STD_H__) +#include +#endif + +class CApaWindowGroupName : public CBase +/** Gives access to the name of a window group and the information encoded by that +name. + +A window group is associated with a task, i.e. a running application. The +window group's name encodes four pieces of information for that task: + +the name of the document that the task is handling, + +the task's caption, + +the application specific UID, as eight hexadecimal characters, + +status information for the task, as two hexadecimal characters. + +@publishedAll +@released */ + { +public: + enum { EMaxLength=13+2*KMaxFileName }; +public: + IMPORT_C ~CApaWindowGroupName(); + IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession); + IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession); + IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, TInt aWgId); + IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, TInt aWgId); + IMPORT_C static CApaWindowGroupName* New(const RWsSession& aWsSession, HBufC* aWgName); + IMPORT_C static CApaWindowGroupName* NewL(const RWsSession& aWsSession, const TDesC& aWgName); + IMPORT_C static CApaWindowGroupName* NewLC(const RWsSession& aWsSession, const TDesC& aWgName); + IMPORT_C void ConstructFromWgIdL(TInt aWgId); + // + IMPORT_C void SetWindowGroupNameL(const TDesC& aWgName); + IMPORT_C void SetWindowGroupName(HBufC* aWgName); + // + IMPORT_C static void FindByAppUid(TUid aAppUid, RWsSession& aWsSession, TInt& aPrevWgId); + IMPORT_C static void FindByCaption(const TDesC& aCaption, RWsSession& aWsSession, TInt& aPrevWgId); + IMPORT_C static void FindByDocName(const TDesC& aDocName, RWsSession& aWsSession, TInt& aPrevWgId); + // + IMPORT_C void SetBusy(TBool aBusy); + IMPORT_C TBool IsBusy() const; + IMPORT_C void SetSystem(TBool aSystem); + IMPORT_C TBool IsSystem() const; + IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile); + IMPORT_C TBool DocNameIsAFile() const; + IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent); + IMPORT_C TBool RespondsToShutdownEvent() const; + IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent); + IMPORT_C TBool RespondsToSwitchFilesEvent() const; + IMPORT_C void SetHidden(TBool aIsHidden); + IMPORT_C TBool Hidden() const; + IMPORT_C void SetAppReady(TBool aIsReady); + IMPORT_C TBool IsAppReady() const; + // + IMPORT_C void SetAppUid(TUid aAppUid); + IMPORT_C TUid AppUid() const; + // + IMPORT_C void SetCaptionL(const TDesC& aCaption); + IMPORT_C TPtrC Caption() const; + // + IMPORT_C void SetDocNameL(const TDesC& aDocName); + IMPORT_C TPtrC DocName() const; + // + IMPORT_C TInt SetWindowGroupName(RWindowGroup& aGroupWin) const; + IMPORT_C TPtrC WindowGroupName() const; +private: //enums + enum TApaStatus { ESystem =0x01, EBusy =0x02, EDocNameNotAFile =0x04 + ,EDoesNotRespondToShutdownEvent=0x08, EDoesNotRespondToSwitchFilesEvent=0x10 + ,EIsHidden=0x20, EAppReady=0x40 }; + enum TApaDelimiter { EEndStatus=1, EEndUid, EEndCaption, ELast=EEndCaption }; // ELast must be last and same as predecessor +private: + CApaWindowGroupName(const RWsSession& aWsSession); + // + void DefaultConstructL(); + void WriteStatusToName(); + void GetStatusFromName(); + TInt FindDelimiter(TApaDelimiter aDelim) const; + void ReAllocIfNecessaryL(TInt aExtraLengthReqd); +private: + HBufC* iBuf; + TUint iStatus; + const RWsSession& iWsSession; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/apparc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/apparc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,608 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __APPARC_H__ +#define __APPARC_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__APADEF_H__) +#include +#endif +#if !defined(__APAID_H__) +#include +#endif + +// classes defined: +class CApaApplication; +class CApaDocument; +class CApaProcess; +class MApaEmbeddedDocObserver; +// +// classes referenced: +class CApaDll; +class CApaExe; +class RFile; +class RReadStream; +class RWriteStream; +class CFileStore; +class CPersistentStore; +class CStreamDictionary; +class CDictionaryStore; +class TApaAppHolderInfo; +class CImplementationInformation; +class TApaApplicationFactory; +class CApaAppHolder; +class CApaAppServer; + +/** Creates an application interface object. + +Provides the basic roles of an application class as a factory that +creates concrete document objects, and supplies utility functions +not specific to any particular instance of a document. + +@publishedAll +@released +*/ +typedef CApaApplication* (*CreateCApaApplication)(); + + +// CApaApplication + +class CApaApplication : public CBase +// base class for applications; allows creation of documents & file stores + display of app icon and name. +/** Defines the basic behaviour for applications. + +The class defines the basic twin roles of an application class as a factory +that creates concrete document objects, and as a supplier of utility functions +not specific to any particular instance of a document. For example, returning +an application's caption, or accessing its .ini file. + +The class is derived from by the UI framework and is further derived from +by the UI application. + +@publishedAll +@released +@see CEikApplication */ + { +public: + /** Completes construction of this application object. + + The function is called after an instance of a derived class has been successfully + created using the ordinal 1 function of the application DLL. + + After calling this function, an application can create document objects. + + An implementation of this function is supplied by the UI framework. + + @see CEikApplication */ + virtual void PreDocConstructL()=0; // call once before creating document + + /** Creates a document object. + + The function is called by the application process when a new document is required. + The application process adds the new document to its list of documents. + + An implementation of this function is supplied by the UI framework. + + @param aProcess A pointer to the process associated with the application. + @return A pointer to the newly created document. + @see CApaProcess::AddNewDocumentL() */ + virtual CApaDocument* CreateDocumentL(CApaProcess* aProcess)=0; + + /** Gets the application specific UID. + + The UID is used to differentiate between UI applications. + + An implementation of this function must be supplied by the UI application. + + @return The application specific UID. */ + virtual TUid AppDllUid()const=0; + + // + // utility functions + IMPORT_C static TInt GenerateFileName(RFs& aFs,TFileName& aRootName); + IMPORT_C CDictionaryStore* OpenIniFileL(RFs& aFs)const; + + /** Opens the .ini file associated with the application, constructs the dictionary + store object, returns a pointer to it and puts the pointer onto the cleanupstack. + + The .ini file must be created, if it does not already exist. + + An implementation of this function is supplied by the UI framework. + + @param aFs Handle to a file server session + @return A pointer to the dictionary store object that represents the application's + .ini file. + @see CEikApplication */ + virtual CDictionaryStore* OpenIniFileLC(RFs& aFs)const=0; + // + // enquiry functions + IMPORT_C virtual TFileName AppFullName()const; // returns the full path and name of the app + /** Returns the capabilities of the application. + + Application capability information is represented by an instance of a TApaAppCapability + object wrapped in a packaged modifiable buffer descriptor. + + The function is called from a number of places within the application framework. + + An implementation of this function is supplied by the UI framework. + + @param aInfo A packaged modifiable buffer descriptor (a TPckgBuf), encapsulating + a TApaAppCapability object. + @see CEikApplication + @see TApaAppCapability + @see TPckgBuf */ + virtual void Capability(TDes8& aInfo)const=0; + // + // accessor function + IMPORT_C TFileName DllName()const; + + IMPORT_C ~CApaApplication(); + + // formerly a reserved virtual, Reserved_1() + IMPORT_C virtual void NewAppServerL(CApaAppServer*& aAppServer); +protected: + IMPORT_C CApaApplication(); + + IMPORT_C virtual void CApaApplication_Reserved1(); + IMPORT_C virtual void CApaApplication_Reserved2(); + +private: + CApaAppHolder* iAppHolder; // the CApaAppHolder that owns me + TUid iDtorKey; // TInt iSpare; + friend class CApaAppHolder; + friend class CApaProcess; + friend class TApaApplicationFactory; // so that it can access iDtorKey + +private: + TInt iCApaApplication_Reserved1; + }; + +class CApaDocument : public CBase +// base class for documents; allows insertion of glass doors. +/** Defines basic behaviour for documents. + +This is the base class for all documents. A document contains the data associated +with the application's content. + +The class is derived from by the UI framework and is further derived from +by the UI application. + +@publishedAll +@released +@see CEikDocument */ + { +public: + class TCapability + /** CApaDocument capabilities.*/ + { + public: + IMPORT_C TCapability(); + // + inline TBool CanDrawGlass()const; + inline TBool CanPrint()const; + inline void SetCanDrawGlass(); + inline void SetCanPrint(); + // + private: + enum { + ECanDrawGlass =0x01, + ECanPrint =0x02 + }; + private: + TUint iCapability; + TInt TCapability_Reserved1; + }; + // +public: + // document instantiation functions + /** Initialises a new, empty, document with a default setup. + + This can be the main document or an embedded document. The function is called + by the UI framework when it creates a default document file. + + An implementation of this function must be supplied by the UI application. + + If initialisation fails, the document must be left in the same state as it + was before the function was called. */ + virtual void NewDocumentL()=0; // builds a new embedded or main document without loading from a store (may create the content from eg code or a template file). + + /** Creates and fully initialises a new filestore and stores the document into it, + replacing any existing file of the same name. + + The function should put the pointer to the filestore object onto the cleanup + stack. + + An implementation of this function is supplied by the UI framework. + + @param aFs Handle to a file server session. + @param aFileName The full path name of the file to be created. + @return A pointer to the newly constructed file store. + @see CEikDocument */ + virtual CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName)=0; // creates a file for a document and stores itself to that store (store should be put on cleanup stack). + // + // interaction functions + IMPORT_C virtual CPicture* GlassPictureL(); // Does nothing by default, override to return handle to glass picture. + + /** Starts an editing session on an embedded document. + + The function should cause the application's UI to be created and the document + to be fully restored for editing. + + An implementation of this function is supplied by the UI framework. + + @param aContainer This document's observer. + @param aReadOnly True, the document should be opened in read-only mode and + should not persist any changes made to the content. False, the document can + be opened in read/write mode; this is the default. + @see CEikDocument */ + virtual void EditL(MApaEmbeddedDocObserver* aContainer,TBool aReadOnly=EFalse)=0; // Edit the document in the context of the container's environment. If aContainer is null, edit as the main document + + /** Prints the document without a need for it to be open for editing. + + Typically, this is called from a shell or a file manager type application + that wants to print the document without opening it fully. + + An empty implementation of this function is supplied by the UI framework. + + The UI application can provide its own implementation. + + @param aSourceStore A reference to the store containing the document. + @see CEikDocument */ + virtual void PrintL(const CStreamStore& aSourceStore)=0; // default print parameters, assume print context supplied by environment + // + // persistence functions + + /** Stores the document to the current file, commits the changes, and marks the + document status as unchanged. + + Typically, the function is called by the application when it implements a + "Save" type menu option in its User Interface. + + An implementation of this function is supplied by the UI framework. This is + adequate for direct file store applications. Applications using a permanent + file store model, need to provide their own implementation. + + If the function leaves, an implementation should ensure that any changes made + to the file are rolled back, leaving the file in the state it was in before + the function was called. + + @see CEikDocument */ + virtual void SaveL()=0; // save the doc to the file in the custody of iAppProcess. This fn should be called by any "Save" menu option. store->Commit() should be called within it. + /** Stores the document's content and state to the specified store, recording the + identity of any headstreams created in the specified stream dictionary. + + The store must be fully constructed before this function is called. + + An empty implementation of this function is supplied by the UI framework. + UI applications that need to persist any data must provide their own implementation. + + If the function leaves, an implementation should ensure that the store and + the stream dictionary are returned to the state they were in before the function + was called. + + @param aStore The store into which document data is to be stored. + @param aStreamDic The stream dictionary into which stream IDs and associated + UIDs are to be recorded. + @see CEikDocument */ + virtual void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const=0; // store to aStore, lodging the headstream in aStreamDic + + /** Restores the document's content and state from data persisted in the specified + store. + + An empty implementation of this function is supplied by the UI framework. + UI applications that need to restore data must provide their own implementation. + + If the function leaves, an implementation should ensure that the store and + the stream dictionary are returned to the state they were in before the function + was called. + + @param aStore The store from which document data is to be restored. + @param aStreamDic The stream dictionary containing stream IDs and associated + UIDs. + @see CEikDocument */ + virtual void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic)=0; // restore from aStore using aStreamDic + + /** Restores the document to the extent that it does not need the store + further. + + A document only keeps a pointer to a store if it implements deferred + loading. This also tells the document that any store pointer that it + might have is just about to become invalid. + + An empty implementation of this function is supplied by the UI framework. + UI applications that support deferred loading or embedding should provide an + implementation. + + If a document supports embedding, then it should + propagate the DetachFromStoreL() call on to all embedded objects that + it contains. + + If the function leaves, the operation should be aborted + because the document has not successfully detached from the store. + Continuing with the operation may leave the document in an unsafe + state or cause user data to be lost. + + @param aDegree The degree of detachment required. */ + virtual void DetachFromStoreL(CPicture::TDetach /*aDegree*/=CPicture::EDetachFull) {} // supply an implementation if you support deferred loading or embedding + + IMPORT_C virtual void ExternalizeL(RWriteStream& aStream)const; + // + // enquiry functions + + /** Tests whether the document is empty. + + The UI framework provides a default implementation which always returns a + true value. + + The UI application can provide its own implementation. Typically, any application + that has editable content should supply an implementation that acts according + to the state of that content. Applications without associated document data + need not supply an implementation. + + @return True if the document is empty, false otherwise. + @see CEikDocument */ + virtual TBool IsEmpty()const=0; // return ETrue if the document is empty + IMPORT_C virtual void ValidatePasswordL()const; // return EFalse if there *is* a password *and* the user doesn't get it right, ETrue otherwise (ie they get it right or there isn't one). Returns ETrue by default + + IMPORT_C virtual TCapability Capability()const; // returns "cant do anything" by default + inline CApaApplication* Application()const; + inline CApaProcess* Process()const; + + /** Tests whether the document has changed since it was last persisted. + + An implementation of this function is supplied by the UI framework and need + not be changed by the UI application. + + @return True, if the document has changed since the last time that it was + persisted, false, otherwise. + @see CEikDocument */ + virtual TBool HasChanged()const =0; + // + IMPORT_C virtual ~CApaDocument(); +protected: + IMPORT_C CApaDocument(); + IMPORT_C CApaDocument(CApaApplication& aApp,CApaProcess& aProcess); +private: + IMPORT_C virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile); // was previously Reserved_1 + // Reserved virtual functions... + IMPORT_C virtual void Reserved_2(); +protected: + MApaEmbeddedDocObserver* iContainer; // null unless this is an embedded object currently being edited +private: + CApaApplication* iApplication; // the doc's associated application + CApaProcess* iApaProcess; + TInt iSpare; + }; + + + +class TApaApplicationFactory +/** Encapsulates the functionality of creating an application, whether it be via a factory function +or an ECOM plugin. Instances of this class can usually be created implicitly when required as +function parameters - just specify the function pointer, ECOM plugin UID or CImplementationInformation +reference. + +@publishedAll +@released +@see CApaProcess +@see EikStart */ + { +public: + typedef CApaApplication* (*TFunction)(); +public: + IMPORT_C TApaApplicationFactory(); + IMPORT_C TApaApplicationFactory(TFunction aFunction); + IMPORT_C TApaApplicationFactory(const CImplementationInformation& aEmbeddedApplicationInformation); + IMPORT_C TApaApplicationFactory(TUid aEmbeddedApplicationUid); + CApaApplication* CreateApplicationL() const; + HBufC* AppFileNameL() const; + TUid AppFileUid() const; +private: + enum TType + { + ETypeFunction, // if iType is this, iData is a TFunction + ETypeEmbeddedApplicationInformation, // if iType is this, iData is an ECOM CImplementationInformation + ETypeEmbeddedApplicationUid // if iType is this, iData is an ECOM implementation TUid + }; +private: + static CApaApplication* CreateEmbeddedApplicationL(TUid aUid); + static HBufC* EmbeddedApplicationDisplayNameLC(TUid aUid); + static HBufC* FullAppFileNameL(const TDesC& aAppName); + static void CleanupImplementationArray(TAny* aImplementationArray); +private: + TType iType; + TUint iData; + mutable CApaApplication* iApplication; // used to be iSpare1 + TInt iSpare2; + }; + +class CApaParentProcessMonitor; + +class CApaProcess : public CBase +/** Maintains a list of documents and all of the potentially shared resources used +by documents. + +This includes the application DLLs. The class also supplies utility functions +that provide the basic structure for persisted document files. + +The class deals with the loading of application DLLs and manages the creation +and destruction of application (CApaApplication) objects and document (CApaDocument) +objects. + +The class is derived from by the UI framework and further derivation by the +UI application is not necessary unless it needs to add extra utility functions +for the use of applications. + +@publishedAll +@released +@see CApaApplication +@see CApaDocument */ + { +public: + IMPORT_C static CApaProcess* NewL(const RFs& aFs); + IMPORT_C void ResetL(); + // + // static utility functions + IMPORT_C static CStreamDictionary* ReadRootStreamLC(RFs& aFs,CFileStore*& aStore,const TDesC& aDocFullFileName,TUint aFileMode); // opens aDocFileName as aStore and returns the stream dictionary contained in its root stream on the cleanup stack + IMPORT_C static CStreamDictionary* ReadRootStreamLC(CFileStore*& aStore, const RFile& aFile); + IMPORT_C static void WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const CApaApplication& aApp); + IMPORT_C static void WriteRootStreamL(CPersistentStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId); + IMPORT_C static TApaAppIdentifier ReadAppIdentifierL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic); + IMPORT_C static void WriteAppIdentifierL(CStreamStore& aStore,CStreamDictionary& aStreamDic,const TApaAppIdentifier& aAppId); + // + // document management + IMPORT_C CApaDocument* AddNewDocumentL(TApaApplicationFactory aApplicationFactory); + IMPORT_C CApaDocument* OpenNewDocumentL(CFileStore*& aStore,CStreamDictionary*& aStreamDic,const TDesC& aDocFullFileName,TUint aFileMode); // Open a file and restore the contained document + IMPORT_C void DestroyDocument(CApaDocument* aDoc); // Removes a doc (identified by the object) from the list and destroys it. Also removes the app and closes the AppDll if appropriate. + // + // setter functions + IMPORT_C void SetMainDocument(CApaDocument* aDocument); + IMPORT_C void SetMainDocFileName(const TDesC& aMainDocFileName); // panics if the descriptor is too long + IMPORT_C void SetMainDocFileNameL(const TDesC& aMainDocFileName); + // + // accessor functions + IMPORT_C TPtrC MainDocFileName()const; + inline RFs& FsSession()const; + inline CApaDocument* MainDocument()const; + // + IMPORT_C ~CApaProcess(); +protected: + IMPORT_C CApaProcess(); + IMPORT_C CApaProcess(const RFs& aFs); + IMPORT_C void ConstructL(); + IMPORT_C void ConstructL(TProcessId aParentProcessId); + + IMPORT_C virtual void CApaProcess_Reserved1(); + IMPORT_C virtual void CApaProcess_Reserved2(); +public: + static TInt IdleRemoveApplications(TAny* aThis); + void RemoveMarkedApplications(); +private: + CApaDll* AddAppDllL(const TDesC& aDllFullPath); + CApaExe* AddAppExeL(TApaApplicationFactory aApplicationFactory); + void RemoveApp(CApaAppHolder* aAppHolder); + CApaDocument* CreateDocL(CApaApplication* aApp); + CApaAppHolder* FindAppInListL(const TDesC& aAppFileName,TUid aUid)const; // returns NULL if not in list + void DeleteAllDocs(); + void MarkApplicationForRemoval(const CApaApplication* aApp); + static void DoReadRootStreamL(CStreamDictionary& aStreamDictionary, const CFileStore& aStore); +private: + CArrayFixFlat* iAppList; // array of apps in use + CArrayFixFlat* iDocList; // array of documents (1 main + n embedded) + CApaDocument* iMainDoc; + HBufC* iMainDocFileName; + RFs iFsSession; // file server session for doc store + CIdle* iApplicationRemover; + CApaParentProcessMonitor* iMonitor; + TInt iCApaProcess_Reserved1; + }; + + +class MApaEmbeddedDocObserver +/** An interface class for handling the completion of the editing of an embedded +document. + +@publishedAll +@released +@see CApaDocument::EditL() */ + { +public: + /** Defines the state of the embedded document on completion of editing. */ + enum TExitMode { + /** Changes to the embedded document must be saved. */ + EKeepChanges, + /** Reverts back to the saved version of the embedded document, i.e. reloads the + whole document. */ + ERevertToSaved, + /** No changes have been made to the embedded document. */ + ENoChanges, + /** The embedded document is empty. */ + EEmpty + }; +public: + /** Implements the required behaviour when the editing of an embedded document completes. + + @param aMode Indicates the state of the document. */ + virtual void NotifyExit(TExitMode aMode)=0; // called on completion of editing of an embedded document +protected: + IMPORT_C MApaEmbeddedDocObserver(); +private: + IMPORT_C virtual void MApaEmbeddedDocObserver_Reserved1(); + IMPORT_C virtual void MApaEmbeddedDocObserver_Reserved2(); +private: + TInt iMApaEmbeddedDocObserver_Reserved1; + }; + + +//// inlines //// +inline CApaApplication* CApaDocument::Application()const +/** Returns a pointer to the application that created the document. + +@return A pointer to the document's associated application. */ + { return iApplication; } + +inline CApaProcess* CApaDocument::Process()const +/** Returns a pointer to the application process associated with this document. + +@return A pointer to the application process associated with this document. */ + { return iApaProcess; } + +inline TBool CApaDocument::TCapability::CanDrawGlass()const +/** Tests whether the document supports being embedded as a glass door. + +@return True if embedding as a glass door is supported; false otherwise. */ + { return iCapability&ECanDrawGlass; } + +inline TBool CApaDocument::TCapability::CanPrint()const +/** Tests whether the document supports being printed without using the full application +UI. + +@return True, if printing is supported; false, otherwise. */ + { return iCapability&ECanPrint; } + +inline void CApaDocument::TCapability::SetCanDrawGlass() +/** Sets the document as being capable of being embedded as a glass door. */ + { iCapability = iCapability|ECanDrawGlass; } + +inline void CApaDocument::TCapability::SetCanPrint() +/** Sets the document as being capable of being printed without using the full application +UI. */ + { iCapability = iCapability|ECanPrint; } + +inline RFs& CApaProcess::FsSession()const +/** Returns a handle to the file server session used by this application process. + +@return The file server session. */ + { return (RFs&)iFsSession; } //lint !e1536 Exposing low access member - Kept for backward BC + +inline CApaDocument* CApaProcess::MainDocument()const +/** Returns a pointer to the main document. + +@return A pointer to the main document. */ + { return iMainDoc; } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asaltdefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asaltdefs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,247 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASALTDEFS_H__ +#define __ASALTDEFS_H__ + +/** @file +@publishedAll +@released +*/ +// System includes +#include +#include + +/** + Flags used to indicate the States for enum TASAltStateFlags + */ +typedef TBitFlags TASAltClientServerStateFlags; + +/** + Major Version used while connecting to the Alarm Alert Server + */ +const TInt KASAltVersionMajor = 3; + +/** + Minor Version used while connecting to the Alarm Alert Server + */ +const TInt KASAltVersionMinor = 0; + +/** + Build Version used while connecting to the Alarm Alert Server + */ +const TInt KASAltVersionBuild = 0; + +/** + Number of message Slots + */ +const TInt KAlmMessageSlots = 5; + +/** + The individual op codes which the Alert Server and Alarm Server + handshake using + */ +enum TASAltOpCode + { + /** + Notify the alarm server (asynchronously) when the Alert Server + wishes to perform some action. + */ + EASAltOpCodeNotify = 0, + + /** + Cancel an earlier notification + */ + EASAltOpCodeNotifyCancel, + + /** + Change the visibility of the Alert Server UI furniture + */ + EASAltOpCodeVisible, + + /** + Update the Alert Server flags + */ + EASAltOpCodeSetState, + + /** + Inform the Alert Server of the currently notifying alarm + */ + EASAltOpCodeSetAlarm, + + /** + Inform the Alert Server that the currently alerting alarm + has been snoozed. + */ + EASAltOpCodeSetDeferTime, + + /** + Retrieve the time from the Alert Server when a quiet period + should be terminated + */ + EASAltOpCodeGetUserTime, + + /** + Create an outstanding request with the Alert Server. Used + as a mechanism to obtain Alert Server thread death notifications. + */ + EASAltOpCodeLogon, + + /** + Ask the Alert Server to start playing the specified alarm sound + */ + EASAltOpCodeStartPlayingSound, + + /** + Ask the Alert Server to stop playing any sound + */ + EASAltOpCodeStopPlayingSound + + /** + Ask the Alert Server to change vissibility for all alarms + */ + , EASAltOpCodeVisibleAll, + + /** + Ask the Alert Server to update states for all alarms + */ + EASAltOpCodeSetStateAll, + + /** + Ask the Alert Server to stop playing all sounds. + */ + EASAltOpCodeStopPlayingSoundAll, + + /** + Ask the Alert Server to delete alarm with provided Id + */ + EASAltOpCodeDeleteAlarm, + + /** + Retrieve the time from the Alert Server when a quiet period + should be terminated + */ + + EASAltOpCodeGetEndQuietTime, + + /** + Ask the Alarm Server to get number of simultaneously supported alarms + */ + EASAltOpCodeGetMaxAlarms, + + /** + Ask the Alert Server to delete all alarms + */ + EASAltOpCodeDeleteAlarmAll, + + EASAltOpCodeLast + + + }; + +/** + All communication from the Alert Server to the Alarm Server + occurs via a single outstanding TRequesStatus which is handled + by the Alarm Server (as an active object). This enumeration + describes the type of action that the Alarm Server should take in + response to a request from the Alert Server. + */ +enum TASAltAlertServerResponse + { + /** + The Alert Server wishes the Alarm Server to + silence all alarms. + */ + EASAltAlertServerResponseSilence = 0, + + /** + The Alert Server wishes the Alarm Server to + enter a global quiet period. + */ + EASAltAlertServerResponseQuietPeriod, + + /** + The Alert Server wishes the Alarm Server to + acknowledge (clear) the currently notifying alarm. + */ + EASAltAlertServerResponseClear, + + /** + The Alert Server wishes the Alarm Server to + acknowledge (clear) the currently notifying alarm + and all others that are awaiting notification. + */ + EASAltAlertServerResponseClearAll, + + /** + The Alert Server wishes the Alarm Server to + snooze the currently notifying alarm. + */ + EASAltAlertServerResponseSnooze, + + /** + The Alert Server wishes the Alarm Server to + temporarily pause all sound (i.e stop sending sound + play events to the Alert Server). + */ + EASAltAlertServerResponsePauseSound + }; + +/** + Flags for TASAltClientServerStateFlags + */ +enum TASAltStateFlags + { + /** + The Alert Server should not play any sound + */ + EASAltStateFlagsSilentRunning = 1, + + /** + The Alarm Server is currently within a quiet period + */ + EASAltStateFlagsInQuietPeriod = 2, + + /** + The Alarm Server currently has more than one alarm + ready to notify. + */ + EASAltStateFlagsMoreThanOneDueAlarm = 3, + + /** + There wasn't sufficient memory within the Alarm + Server to allocate room for a snoozed alarm. I'm + note convinced we need this anymore + */ + EASAltStateFlagsNoMemoryForSnoozeAlarm = 4, + + /** + There isn't any sound filename for the current + alarm. + */ + EASAltStateFlagsAlarmHasNoSoundFileName = 5, + + /** + This isn't used by the Alert Server. + */ + EASAltStateFlagsSoundIsPaused = 6 + + }; + +// Literal constants +_LIT(KAlarmAlertServerName, "!AlarmAlertServer"); + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/ascliclientutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/ascliclientutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,78 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASCLICLIENTUTILS_H__ +#define __ASCLICLIENTUTILS_H__ + +// System includes +#include + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> AlarmClientUtils (header) +/////////////////////////////////////////////////////////////////////////////////////// +class AlarmClientUtils +/** +@publishedAll +@released +*/ + { +/////////////////////////////////////////////////////////////////////////////////////// +public: // ENUMERATIONS +/////////////////////////////////////////////////////////////////////////////////////// + /** Panic numbers associated with the ALMSRVCLI panic category. */ + enum TAlarmClientPanic + { + EAlarmClientPanicArgument = 0, + EAlarmClientPanicCancel = 1, + EAlarmClientPanicSessionClose = 2, + EAlarmClientPanicSetAlarm = 3, + EAlarmClientPanicGetAlarm = 4, + EAlarmClientPanicInvalidAlarmID = 5, + EAlarmClientPanicAlarmInfo = 6, + EAlarmClientPanicSound = 7, + EAlarmClientPanicOwner = 8, + EAlarmClientPanicVerify = 9, + EAlarmClientPanicAlarmDay = 10, + EAlarmClientPanicNumber = 11, + EAlarmClientPanicNoArray = 12, + EAlarmClientPanicNotificationCancel = 13, + // + EAlarmClientPanicLast + }; + /** Panic numbers associated with the ALMSRVCLIFAULT panic category. */ + enum TAlarmClientFault + { + EAlarmClientFaultLogic = 0, + EAlarmClientFaultData = 1, + EAlarmClientFaultCouldNotLoadServer = 2, + // + EAlarmClientFaultDebugFuncError = 3, + // + EAlarmClientFaultLast + }; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // INTERNAL CONSTRUCT +/////////////////////////////////////////////////////////////////////////////////////// + + static void Panic(TAlarmClientPanic aPanic); + + static void Fault(TAlarmClientFault aFault); + + IMPORT_C static TInt StartAlarmServer(); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asclidefinitions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asclidefinitions.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASCLIDEFINITIONS_H__ +#define __ASCLIDEFINITIONS_H__ + +// System includes +#include + +// User includes + +// Type definitions + +// Constants + +// Enumerations + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> ASCliDefinitions (header) +/////////////////////////////////////////////////////////////////////////////////////// +class ASCliDefinitions +/** This is a utility class that retrieves the name and version number of the alarm +server. +@publishedAll +@released +*/ + { +/////////////////////////////////////////////////////////////////////////////////////// +public: // STATIC ACCESS METHODS +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C static const TDesC& ServerAndThreadName(); + + static const TDesC& ServerImageName(); + + static TUidType ServerUidType(); + + static TVersion Version(); + + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asclisession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asclisession.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,206 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASCLISESSION_H__ +#define __ASCLISESSION_H__ + +// System includes +#include + +// User includes +#include + +// Classes referenced +class TASShdAlarm; +class TASCliSoundPlayDefinition; + + +class RASCliSession : public RSessionBase +/** The client-side interface to the Symbian OS alarm server. +@publishedAll +@released +*/ + { +/////////////////////////////////////////////////////////////////////////////////////// +public: // CONNECT TO SERVER & VERSIONING +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C RASCliSession(); + + IMPORT_C TInt Connect(); + + IMPORT_C TVersion Version() const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // ALARM SPECIFIC FUNCTIONALITY +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C TInt AlarmAdd(TASShdAlarm& aAlarm) const; + + IMPORT_C TInt AlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const; + + IMPORT_C void AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm); + + IMPORT_C void AlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData); + + IMPORT_C void AlarmNotificationCancelAndDequeue(TAlarmId aAlarmId) const; + + IMPORT_C TInt GetAlarmDetails(TAlarmId aAlarmId, TASShdAlarm& aAlarm) const; + + IMPORT_C TInt AlarmDelete(TAlarmId aAlarmId) const; + + IMPORT_C TInt GetAlarmCategory(TAlarmId aAlarmId, TAlarmCategory& aCategory) const; + + IMPORT_C TInt GetAlarmOwner(TAlarmId aAlarmId, TFullName& aThreadName) const; + + IMPORT_C TInt SetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus aStatus) const; + + IMPORT_C TInt GetAlarmStatus(TAlarmId aAlarmId, TAlarmStatus& aStatus) const; + + IMPORT_C TInt SetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed aDayOrTimed) const; + + IMPORT_C TInt GetAlarmDayOrTimed(TAlarmId aAlarmId, TAlarmDayOrTimed& aDayOrTimed) const; + + IMPORT_C TInt SetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags aCharacteristics) const; + + IMPORT_C TInt GetAlarmCharacteristics(TAlarmId aAlarmId, TAlarmCharacteristicsFlags& aCharacteristics) const; + + IMPORT_C TInt SetClientData(const TASShdAlarm& aAlarm); + + IMPORT_C TInt SetAlarmDays(TAlarmId aAlarmId, TUint8 aAlarmDays) const; + IMPORT_C TInt GetAlarmDays(TAlarmId aAlarmId, TUint8& aAlarmDays) const; + IMPORT_C TInt SetContinuous(TAlarmId aAlarmId, TBool aContinuous) const; + IMPORT_C TInt GetContinuous(TAlarmId aAlarmId, TBool& aContinuous) const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // ALARM DATA FUNCTIONALITY +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C TInt AlarmDataAttachL(TAlarmId aAlarmId, const TDesC8& aData) const; + + IMPORT_C TInt AlarmDataDetach(TAlarmId aAlarmId) const; + + inline TInt AlarmDataDetatch(TAlarmId aAlarmId) const; + + IMPORT_C TInt AlarmDataSize(TAlarmId aAlarmId) const; + + IMPORT_C TInt GetAlarmData(TAlarmId aAlarmId, TDes8& aSink) const; + + IMPORT_C TInt GetAlarmData(TAlarmId aAlarmId, HBufC8*& aSink) const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // CATEGORY-SPECIFIC FUNCTIONALITY +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C TInt SetAlarmStatusByCategory(TAlarmCategory aCategory, TAlarmStatus aStatus) const; + + IMPORT_C TInt GetAlarmCountForCategory(TAlarmCategory aCategory) const; + + IMPORT_C TInt AlarmDeleteAllByCategory(TAlarmCategory aCategory, TBool aDeleteOnlyOrphanedAlarmsInCategory) const; + + IMPORT_C TInt AlarmDeleteByCategory(TAlarmCategory aCategory, TDeleteType aWhatToDelete) const; + + IMPORT_C void GetAvailableCategoryListL(RArray& aCategories) const; + + IMPORT_C void GetAlarmIdListForCategoryL(TAlarmCategory aCategory, RArray& aAlarmIds) const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // MISC FUNCTIONALITY +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C TInt AlarmCountByState(TAlarmState aState) const; + + IMPORT_C void GetAlarmIdListByStateL(TAlarmState aState, RArray& aAlarmIds) const; + + IMPORT_C void GetAlarmIdListL(RArray& aAlarmIds) const; + + IMPORT_C TInt GetNextDueAlarmId(TAlarmId& aAlarmId) const; + + IMPORT_C TInt NumberOfAlarmsActiveInQueue() const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // SOUND CONTROL +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C TInt SetAlarmSoundState(TAlarmGlobalSoundState aState) const; + + IMPORT_C TInt GetAlarmSoundState(TAlarmGlobalSoundState& aState) const; + + IMPORT_C TInt SetAlarmSoundsSilentUntil(const TTime& aLocalTime) const; + + IMPORT_C TInt SetAlarmSoundsSilentFor(TTimeIntervalMinutes aTimeToRemainSilentFor) const; + + IMPORT_C TInt GetAlarmSoundsSilentUntil(TTime& aLocalTime) const; + + IMPORT_C TInt CancelAlarmSilence() const; + + IMPORT_C TBool AlarmSoundsTemporarilySilenced() const; + + IMPORT_C void SetAlarmPlayIntervalsL(const CArrayFix& aIntervals) const; + + IMPORT_C void GetAlarmPlayIntervalsL(CArrayFix& aIntervals) const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // CHANGE NOTIFICATION +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C void NotifyChange(TRequestStatus& aStatus, TAlarmId& aAlarmId); + + IMPORT_C void NotifyChangeCancel() const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // DEBUG ONLY +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C void __DbgShutDownServer() const; + + IMPORT_C void __DbgFailAlloc(TInt aCount) const; + + IMPORT_C void __DbgPreventUserNotify(TBool aShouldStop) const; + + IMPORT_C TInt __DbgSnoozeAlarm(TAlarmId aAlarmId, const TTime& aNewTime) const; + + IMPORT_C TInt __DbgSetEnvChgHandling(TBool aFlag) const; +/////////////////////////////////////////////////////////////////////////////////////// +private: // MEMBER DATA +/////////////////////////////////////////////////////////////////////////////////////// + + void FetchAlarmIdsFromBufferL(RArray& aAlarmIds, TInt aBufferSize) const; + + CBufBase* FetchTransferBufferLC(TInt aBufferSize) const; + + void DoAlarmAddWithNotification(TRequestStatus& aStatus, TASShdAlarm& aAlarm, const TDesC8& aData); + TInt DoAlarmAdd(TASShdAlarm& aAlarm, const TDesC8& aData) const; + +/////////////////////////////////////////////////////////////////////////////////////// +private: // MEMBER DATA +/////////////////////////////////////////////////////////////////////////////////////// + + TPtr8 iPackage; + TPtr8 iAlarmIdPointer; + }; + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> RASCliSession (inlines) +/////////////////////////////////////////////////////////////////////////////////////// +inline TInt RASCliSession::AlarmDataDetatch(TAlarmId aAlarmId) const +/** @deprecated 8.0 + +RASCliSession::AlarmDataDetach() should be used instead */ + { + return AlarmDataDetach(aAlarmId); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asclisoundplay.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asclisoundplay.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,110 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASCLISOUNDPLAY_H__ +#define __ASCLISOUNDPLAY_H__ + +// System includes +#include + +// User includes +#include + +// Type definitions + +// Constants + +// Enumerations + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> TASCliSoundPlayDefinition (header) +/////////////////////////////////////////////////////////////////////////////////////// +class TASCliSoundPlayDefinition +/** Defines when alarm sounds are to be played, and for how long. + +Alarm sounds are played according to intervals that consist of a duration +and an offset. + +The duration is the number of seconds that the alarm sound plays. + +The offset is the number of minutes after the alarm expires that the alarm +sound plays. + +The sound play definition is set using class RASCliSession. +@publishedAll +@released +*/ + { +/////////////////////////////////////////////////////////////////////////////////////// +public: // CONSTRUCT +/////////////////////////////////////////////////////////////////////////////////////// + + inline TASCliSoundPlayDefinition(); + + inline TASCliSoundPlayDefinition(TTimeIntervalMinutes aOffset, TTimeIntervalSeconds aDuration); + +//////////////////////////////////////////////////////////////////////////////////////// +public: // ACCESS +/////////////////////////////////////////////////////////////////////////////////////// + + inline TTimeIntervalMinutes Offset() const + /** Retrieves the offset. + + @return The offset in minutes. */ + { return iOffset; } + + inline TTimeIntervalSeconds Duration() const + /** Retrieves the duration. + + @return The duration in seconds. */ + { return iDuration; } + +////////////////////////////////////////////////////////////////////////////////////// +private: // MEMBER DATA +/////////////////////////////////////////////////////////////////////////////////////// + + /* + * From the time an alarm is first displayed + */ + TTimeIntervalMinutes iOffset; + + /* + * How long the alarm playing lasts + */ + TTimeIntervalSeconds iDuration; + }; + + + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> TASCliSoundPlayDefinition (inlines) +/////////////////////////////////////////////////////////////////////////////////////// +inline TASCliSoundPlayDefinition::TASCliSoundPlayDefinition() +: iOffset(KDefaultSoundPlayOffsetInSeconds), iDuration(KDefaultSoundPlayDurationInSeconds) +/** Default constructor. + +The default offset is zero, and the default duration is 30 seconds. */ + {} +inline TASCliSoundPlayDefinition::TASCliSoundPlayDefinition(TTimeIntervalMinutes aOffset, TTimeIntervalSeconds aDuration) +: iOffset(aOffset), iDuration(aDuration) +/** Constructor that initializes the offset and duration to specified values. + +@param aOffset Time in minutes for the offset. +@param aDuration Time in seconds for the duration. */ + {} + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asshdalarm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asshdalarm.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,546 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASSHDALARM_H__ +#define __ASSHDALARM_H__ + + +// System includes +#include +#include + +// User includes +#include + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> TASShdAlarm (header) +/////////////////////////////////////////////////////////////////////////////////////// + +/** The Alarm publish and subscribe category +@publishedPartner +@released +*/ +const TUid KAlarmServerPubSubCategory = { 0x101f5027 }; + +/** Used for subcribing missed alarms or time zone changes +@publishedPartner +@released +*/ +const TUint KMissingAlarmPubSubKey = 100; + +/** The publish and subscribe data for KMissingAlarmPubSubKey +@publishedPartner +@released +*/ +struct TMissedAlarmPubSubData + { + /** The value indicating the changes. + 1 - Time zone has been changes but there are no missed alarms + 2 - Some alarms have been missed after system time or time zone has changed. + */ + TUint8 iValue; + + /** The time that system time change took place, in universal (UTC) time */ + TTime iTimeOfChangeUtc; + }; + +/** Used for subscribing to data used when searching for instances in Calendar +@publishedPartner +@released +*/ +const TUint KSkippedAlarmInstancesPubSubKey = 101; + +/** The publish and subscribe data for KMissingAlarmInstancesPubSubKey +@publishedPartner +@released +*/ +struct TASShdAlarmedInstanceParams + { + /** The start of the time range in local time. */ + TTime iLocalStartTime; + + /** The end of the time range in local time. */ + TTime iLocalEndTime; + + /** The alarm time types to include. */ + TASShdAlarmTimeType iTimeType; + }; + + +class TASShdAlarm +/** A client-side alarm object. + +It contains all of the information needed to create an alarm in +the Alarm Server. +@publishedAll +@released +*/ + { +/////////////////////////////////////////////////////////////////////////////////////// +public: // CONSTRUCT +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C TASShdAlarm(); + +/////////////////////////////////////////////////////////////////////////////////////// +public: // INTERNALIZE / EXTERNALIZE +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C void InternalizeL(RReadStream& aStream); + + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // READ-ONLY ACCESS +/////////////////////////////////////////////////////////////////////////////////////// + + inline TAlarmStatus Status() const + /** Returns the alarm status. + + @return Alarm status. */ + { return iStatus; } + + inline TAlarmState State() const + /** Returns the alarm state. + + @return Alarm state. */ + { return iState; } + + inline TBool HasAssociatedData() const; + + inline TBool HasOwningSession() const; + + inline TBool HasBecomeOrphaned() const; + +/////////////////////////////////////////////////////////////////////////////////////// +public: // READ-ONLY & MODIFIABLE +/////////////////////////////////////////////////////////////////////////////////////// + + IMPORT_C void Reset(); + + inline TAlarmId& Id() + /** Returns a writable version of the alarm's unique identifier. + + @return Reference to the unique identifier. */ + { return iAlarmId; } + + inline TAlarmId Id() const + /** Return the alarm's unique identifier. + + @return The unique identifier. */ + { return iAlarmId; } + +//The Secure ID is only used in the secured platform + + // adds a SID to the alarms private field + inline void SetSid(const TSecureId& aSecureID) + {iTASShdAlarmSID = aSecureID;} + + // returns the SID of the alarm's creator + inline TSecureId GetSid() const + {return iTASShdAlarmSID;} + + inline TTime& NextDueTime() + /** Returns a writable version of the next time the alarm is scheduled to expire. + + @return Next expiry time. */ + { return iNextDueTime; } + + inline const TTime& NextDueTime() const + /** Returns the next time that the alarm is scheduled to expire. + + @return Next expiry time. */ + { return iNextDueTime; } + + inline TTime& OriginalExpiryTime() + /** Returns a writable version of the alarm's original expiry time. + + @return Original expiry time. */ + { return iOriginalExpiryTime; } + + inline const TTime& OriginalExpiryTime() const + /** Returns the alarm's original expiry time. + + The original expiry time is the same as the next due time, unless the alarm + has been snoozed. In that case, the original expiry time is the time when + the alarm first expired, and the next due time is when it is to re-awaken + after the snooze. + + @return Original expiry time. */ + { return iOriginalExpiryTime; } + + inline TAlarmCategory& Category() + /** Returns a writable version of the alarm's category. + + Clients can use the category to tag each alarm with a specific code. This + allows clients to identify all related alarms, such as all alarms associated + with a particular application or application engine. + + @return Alarm category. */ + { return iCategory; } + + inline TAlarmCategory Category() const + /** Return this alarm's category. + + @return Alarm category. */ + { return iCategory; } + + inline TAlarmCharacteristicsFlags& Characteristics() + /** Returns a writable version of the alarm's characteristics. + + @return Alarm characteristics bit flags. */ + { return iCharacteristics; } + + inline TAlarmCharacteristicsFlags Characteristics() const + /** Returns the alarm's characteristics + + @return Alarm characteristics bit flags. */ + { return iCharacteristics; } + + inline TAlarmRepeatDefinition& RepeatDefinition() + /** Returns a writable version of the alarm's repeat definition. + + The repeat definition controls the alarm's behaviour after it has expired. + For example, you can set the repeat definition so that the server automatically + queues the alarm to expire again in exactly 24 hours time. + + @return Alarm repeat definition. */ + { return iRepeatDefinition; } + + inline TAlarmRepeatDefinition RepeatDefinition() const + /** Returns the repeat definition for the alarm. + + @return The alarm's repeat definition. */ + { return iRepeatDefinition; } + + inline TAlarmMessage& Message() + /** Returns a writable version of the alarm's message. + + The message is usually displayed in the application UI + when the alarm expires. + + @return Reference to the alarm's associated message. */ + { return iMessage; } + + inline const TAlarmMessage& Message() const + /** Returns the alarm's message. + + The message is usually displayed in the application UI when the alarm expires. + + @return Reference to the alarm's associated message. */ + { return iMessage; } + + inline TAlarmSoundName& SoundName() + /** Return a writable version of the alarm sound's filename. + + @return Reference to the alarm's sound filename. */ + { return iSoundName; } + + inline const TAlarmSoundName& SoundName() const + /** Returns the alarm's sound filename. + + @return Sound filename. */ + { return iSoundName; } + + inline TAlarmDayOrTimed DayOrTimed() const + /** Returns the alarm session type. + + @return Alarm session type. */ + { return iDayOrTimed; } + + + inline TAlarmDayOrTimed& DayOrTimed() + /** Returns a writable version of the alarm type, i.e. day, timed + + @return iDayOrTimed. */ + { return iDayOrTimed; } + + + IMPORT_C void SetUtcNextDueTime(TTime aUtcTime); + + IMPORT_C void SetDeQueueIfDueTimeInPast(); + + IMPORT_C TInt SetAlarmDays(TUint8 aAlarmDays); + IMPORT_C TUint8 AlarmDays() const; + IMPORT_C void SetContinuous(TBool aContinuous); + IMPORT_C TBool Continuous(); + +/////////////////////////////////////////////////////////////////////////////////////// +public: // CLIENT DATA ACCESS +/////////////////////////////////////////////////////////////////////////////////////// + + inline TBitFlags16& ClientFlags() + /** Returns a writable version of the alarm's client flags. + + The client flags may be used for any client-specific data - + the alarm server does not use them. + + @return Reference to the alarm's bit flags. */ + { return iClientFlags; } + + inline TBitFlags16 ClientFlags() const + /** Returns this alarm's client flags. + + @return Reference to the alarm's bit flags. */ + { return iClientFlags; } + + inline TInt ClientData1() const + /** Returns the client data from slot 1 for this alarm. + + @return The first client-specific integer. */ + { return iClientData1; } + + inline TInt& ClientData1() + /** Returns a writable version of the client data from slot 1 for this alarm. + + @return Reference to the first client-specific integer. */ + { return iClientData1; } + + inline TInt ClientData2() const + /** Returns the client data from slot 2 for this alarm. + + @return The second client-specific integer. */ + { return iClientData2; } + + inline TInt& ClientData2() + /** Returns the client data from slot 2 for this alarm. + + @return The second client-specific integer. */ + { return iClientData2; } + + inline TBool IsFloating() const + /** Tests whether the alarm is floating. + + Floating alarms expire at a given wall-clock time regardless of the current locale and + whether any daylight saving time rules are in force. + + @return True if the alarm is floating. + */ + { return iCharacteristics.IsClear(EAlarmCharacteristicsIsFixed); } + + + + + +/////////////////////////////////////////////////////////////////////////////////////// +protected: // INTERNAL FLAGS +/////////////////////////////////////////////////////////////////////////////////////// + + /* + * @internalAll + */ + enum TASShdAlarmFlags + { + + /* + * @internalAll + */ + EASShdAlarmFlagsHasAssociatedData = 0, + + /* + * @internalAll + */ + EASShdAlarmFlagsHasOwningSession = 1, + + /* + * @internalAll + */ + EASShdAlarmFlagsHasBecomeOrphaned = 2, + + /* + * @internalAll Set if alarm is disabled manually so that can not be enabled when + * locale changes. + */ + EASShdAlarmFlagsPermanentDisabled = 4 + + }; + +private: + /* + * @internalComponent + */ + enum TASShdAlarmFlags2 + { + EASShdAlarmFlag2Wakeup = 0, + }; + + enum TASShdAlarmFlags2AlarmRepeatExtensions + { + EASShdAlarmFlag2AlarmDayMonday = 1, + EASShdAlarmFlag2AlarmDayTuesday = 2, + EASShdAlarmFlag2AlarmDayWednesday = 3, + EASShdAlarmFlag2AlarmDayThursday = 4, + EASShdAlarmFlag2AlarmDayFriday = 5, + EASShdAlarmFlag2AlarmDaySaturday = 6, + EASShdAlarmFlag2AlarmDaySunday = 7, + EASShdAlarmFlag2Continuous = 8 + }; + + +/////////////////////////////////////////////////////////////////////////////////////// +protected: // MEMBER DATA +/////////////////////////////////////////////////////////////////////////////////////// + + /* + * Various flags - used internally by the alarm object + */ + TBitFlags8 iFlags; + + /* + * This represents the desired behaviour for a given alarm. + * The Alarm Server uses this information to control the + * behaviour of the alarm. + * + * @see TAlarmCharacteristics + */ + TAlarmCharacteristicsFlags iCharacteristics; + + /* + * The unique identifier assoicated with each alarm maintained + * by the alarm world server. + */ + TAlarmId iAlarmId; + + /* + * The status of this alarm (e.g. enabled, disabled) + */ + TAlarmStatus iStatus; + + /* + * The state of this alarm (e.g. queued, notifying, notified, snoozed etc) + */ + TAlarmState iState; + + /* + * The type of this alarm (e.g. day, timed) + */ + TAlarmDayOrTimed iDayOrTimed; + + /* + * Controls how the alarm repeats after it has expired. Note that + * session alarms are not allowed to repeat (they must be "once + * only"). + */ + TAlarmRepeatDefinition iRepeatDefinition; + + /* + * This UID is supplied by the client and is used to indicate + * the category that this alarm is part of. The Alarm Server + * is category-agnostic, that is, this information is for + * the client's use only + */ + TAlarmCategory iCategory; + + /* + * The date and time at which this alarm is next due. For alarms + * that haven't been snoozed, then this is the original due time. + * + * For alarms that have been snoozed, this is the time at which + * the alarm will reawaken. + */ + TTime iNextDueTime; + + /* + * This attribute is only used in the instance whereby an alarm + * is snoozed. It represents the time at which the alarm first + * expired. + */ + TTime iOriginalExpiryTime; + + /* + * The message associated with this alarm, typically used + * in an application UI to inform the user as to the reason + * for the alarm. + */ + TAlarmMessage iMessage; + + /* + * A descriptor which holds the name of the sound file which + * should be played when the alarm expires. + */ + TAlarmSoundName iSoundName; + +/////////////////////////////////////////////////////////////////////////////////////// +protected: // CLIENT SPECIFIC DATA +/////////////////////////////////////////////////////////////////////////////////////// + + /* + * Flags for use by any particular client. These will + * only be relevant to a client who can interpret them. + */ + TBitFlags16 iClientFlags; + + /* + * For arbitrary client data 1 + */ + TInt iClientData1; + + /* + * For arbitrary client data 2 + */ + TInt iClientData2; + +/////////////////////////////////////////////////////////////////////////////////////// +private: // BC PROOFING +/////////////////////////////////////////////////////////////////////////////////////// + TSecureId iTASShdAlarmSID; + /* + * Various flags - used internally by the alarm object + */ + TBitFlags16 iFlags2; + TUint16 iTASShdAlarm_2; + TAny* iTASShdAlarm_3; + }; + + +/////////////////////////////////////////////////////////////////////////////////////// +// ----> TASShdAlarm (inline) +/////////////////////////////////////////////////////////////////////////////////////// + + +/** Tests whether the alarm has any associated data. + +@return True if the alarm has associated data. */ +inline TBool TASShdAlarm::HasAssociatedData() const + + { + return iFlags.IsSet(EASShdAlarmFlagsHasAssociatedData); + } + + +/** Tests whether the alarm has an active owning session. + +@return True if the alarm has an active owning session. */ +inline TBool TASShdAlarm::HasOwningSession() const + + { + return iFlags.IsSet(EASShdAlarmFlagsHasOwningSession); + } + +inline TBool TASShdAlarm::HasBecomeOrphaned() const +/** Tests whether the alarm is orphaned. + +An alarm is ophaned if it used to have an owning session, but no longer does. +If an alarm is owned by a session, it is removed from the queue when the session +disconnects. However, orphaned alarms stay in the queue. + +@return True if the alarm has becomed orphaned. */ + { + return iFlags.IsSet(EASShdAlarmFlagsHasBecomeOrphaned); + } + + + +#endif // #ifndef __ASSHDALARM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asshdbitflags.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asshdbitflags.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,16 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/asshddefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/asshddefs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,414 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ASSHDDEFS_H__ +#define __ASSHDDEFS_H__ + +/** @file +@publishedAll +@released */ + +// System includes +#include +#include + +// Constants + +/** Maximum length of an alarm message. The message is usually displayed by the +alarm UI. */ +const TInt KMaxAlarmMessageLength = 0x80; +/** Maximum length of the filename of the sound played when an alarm expires. */ +const TInt KMaxAlarmSoundNameLength = KMaxFileName; + +// Type definitions +/** A unique identifier allocated to each new alarm by the alarm server, so that +the client can identify them. By default, KNullAlarmId. */ +typedef TInt TAlarmId; +/** A unique identifier that can optionally be used by clients to group +alarms into categories, for instance alarms associated with a particular application +or application engine. The alarm server ignores the category. It is relevant +to the client alone. */ +typedef TUid TAlarmCategory; +// +/** Flags that define an alarm's characteristics. + +@see TAlarmCharacteristics */ +typedef TBitFlags8 TAlarmCharacteristicsFlags; +// + +/** A type to identify what kind of alarms should be deleted when using the API +RASCliSession::AlarmDeleteByCategory() +@see TTDeleteTypeEnum */ +typedef TInt TDeleteType; + +/** Stores the text message associated with an alarm. */ +typedef TBuf TAlarmMessage; +/** Stores the name of a sound file which is played when an alarm activates. */ +typedef TBuf TAlarmSoundName; +// +/** Defines a null alarm identifier. */ +const TAlarmId KNullAlarmId = 0; +// +/** Defines the length in seconds of an alarm sound offset. */ +const TInt KDefaultSoundPlayOffsetInSeconds = 0; +/** Defines the length in seconds of an alarm sound duration. */ +const TInt KDefaultSoundPlayDurationInSeconds = 30; + +// Constants +/** A category that can be assigned to identify clock alarms to the client. The +server does not distinguish between alarm types. */ +const TAlarmCategory KASCliCategoryClock = { 0x101F5030 }; + +/** Defines whether an alarm is enabled or disabled: + +An enabled alarm activates at a specified time. + +A disabled alarm remains in the alarm server queue but is not active. + +You can get or set an alarm's status using the RASCliSession class. */ +enum TAlarmStatus + { + /** The alarm is currently enabled. */ + EAlarmStatusEnabled = 0, + + /** The alarm is currently disabled, and will not expire. */ + EAlarmStatusDisabled, + }; + +/** Represents an alarm's state. Alarms can have only one state. */ +enum TAlarmState + { + /** The alarm state is not currently known by the alarm server. */ + EAlarmStateInPreparation = -1, + + /** The alarm is waiting for its expiry time to be reached. */ + EAlarmStateQueued = 0, + + /** The alarm is snoozed. When the snooze period is over, the alarm expires again. */ + EAlarmStateSnoozed, + + /** The alarm is waiting to be notified. + + This state occurs when an alarm expires while another is being notified. When + this happens, the alarm being notified changes state to EAlarmStateWaitingToNotify. + This means that if it is set to be the next alarm to be notified, notification + will happen after the newly expired alarm has been notified and dismissed. */ + EAlarmStateWaitingToNotify, + + /** The alarm is currently notifying. */ + EAlarmStateNotifying, + + /** The alarm has already notified and has been dismissed. Any alarm which remains + in this state is dead. */ + EAlarmStateNotified + }; + +/** Defines an alarm session type as timed or untimed. This property is ignored by +the alarm server, and is for use by the client only. */ +enum TAlarmDayOrTimed + { + /** Timed alarm type (default). This alarm belongs to a timed event. This is an event + with a defined start and finish time. The alarm notification + time is specified as an offset from the event's start time, so that when the + event time changes, so does the alarm time. */ + EASShdAlarmTypeTimed = 0, + + /** Day alarm type. This alarm belongs to untimed events; these do not have + a defined start and finish time, but have an activation time. */ + EASShdAlarmTypeDay + }; + +/** Defines the sound state of the global alarm server . */ +enum TAlarmGlobalSoundState + { + /** When an alarm expires, the alarm sound is played. */ + EAlarmGlobalSoundStateOn = 0, + + /** When an alarm expires, no sound plays. */ + EAlarmGlobalSoundStateOff + }; + +/** Defines how an alarm is to be repeated. */ +enum TAlarmRepeatDefinition + { + /** The alarm expires only once, and is then deleted from the alarm server. By + default, all alarms behave this way. + + Standard repeat-once alarms are date relative, that is, they occur on a fixed + date and point in time. + + If the user changes the system date or time so that the new time is in the + future, and the new time is after the previously calculated expiry time: + + By less than 12 hours, the alarm expires immediately. + + By more than 12 horus, the alarm is silently discarded. + + If the user changes the system date or time so that the new time is before + the next calculated expiry time, the alarm type continues to be a + "Repeat once" alarm*/ + EAlarmRepeatDefintionRepeatOnce = 0, + + /** When initially scheduling the alarm, the date is always within the + next 24 hours. For example: + + The current time is 15:00, and the alarm time specified is 14:00. The + alarm expires tomorrow at 14:00. + + The current time is 15:00, and the alarm time specified is 16:00. The + alarm expires today at 16:00. + + If the alarm is missed, i.e. because the alarm server is inactive, then + the alarm changes its type from "Repeat in the next 24 Hours" to "Repeat once". + + If the user changes the system date or time so that the new time is in the + future, and the new time is after the previously calculated expiry time: + + By less than 12 hours, the alarm expires immediately. + + By more than 12 horus, the alarm is silently discarded. + + If the user changes the system date or time so that the new time is + before the next calculated expiry time: + + By less than 12 hours, no change in alarm type, and the alarm + remains queued. + + By greater than 12 hours, the alarm changes its type from + "Repeat in the next 24 Hours" to "Repeat once". Subsequent changes in system + time result in the behaviour described by the EAlarmRepeatDefintionRepeatOnce + characteristic. */ + EAlarmRepeatDefintionRepeatNext24Hours, + + /** The alarm repeats every day at the same time. If the user changes the system + date or time, this alarm behaves in the same way as a "Repeat once" alarm, + except that the alarm is not deleted, but rescheduled for the next available + time. + + If the user changes the system date or time to a point in the past, there + are no phantom alarm expiries. */ + EAlarmRepeatDefintionRepeatDaily, + + /** The alarm repeats every work day at the same time. If the user changes the + system date or time, this alarm behaves in the same way as a "Repeat once" + alarm, except that the alarm is not deleted, but rescheduled for the next + available time. + + If the user changes the system date or time to a point in the past, there + are no phantom alarm expiries. */ + EAlarmRepeatDefintionRepeatWorkday, + + /** The alarm repeats every week, on the same day at the same time. If the user + changes the system date or time, this alarm behaves in the same way as a "Repeat + once" alarm, except that the alarm is not deleted, but rescheduled for the + next available time. + + If the user changes the system date or time to a point in the past, there + are no phantom alarm expiries. */ + EAlarmRepeatDefintionRepeatWeekly, + + /** The alarm repeats every specified day at the same time. If the user + changes the system date or time, this alarm behaves in the same way as a + "repeat once" alarm, except that the alarm is not deleted, but rescheduled + for the next available time. + + If the user changes the system date or time to a point in the past, there + are no phantom alarm expiries.*/ + EAlarmRepeatDefinitionRepeatDailyOnGivenDays + }; + +/** Defines various alarm characteristics. */ +enum TAlarmCharacteristics + { + /** Sets an alarm to be session-only. This alarm only exists as long as a session + is maintained with the alarm server. Session alarms are removed from the alarm + queue when the originating session disconnects from the server. By default, + all alarms are persistent and remain so, even after the initiating session + has disconnected. */ + EAlarmCharacteristicsSessionSpecific = 0, + + /** Do not display a screen. By default, all alarms result in a suitable screen + being displayed, depending on the device. Use this flag to disable this default + behaviour. */ + EAlarmCharacteristicsDoNotNotifyAlarmAlertServer = 1, + + /** Sets an alarm to be floating - floating alarms expire at the current local time, + regardless of the current locale or DST rules.*/ + EAlarmCharacteristicsIsFixed = 2, + + /** Do not notify if its due time is in the past.*/ + EAlarmCharacteristicsDeQueueIfDueTimeInPast = 3, + // + EAlarmCharacteristicsLast + }; + +/** This enumeration defines the events that can be reported by the alarm server. + +These events are channelled to the client using the RASCliSession::NotifyChange() +method. + +@see TAlarmState */ +enum TAlarmChangeEvent + { + /** An alarm has changed state. + + @see TAlarmState */ + EAlarmChangeEventState = 1, + + /** An alarm has changed status. + + @see TAlarmStatus */ + EAlarmChangeEventStatus = 2, + + /** An alarm has changed characteristics. + + @see TAlarmCharacteristics */ + EAlarmChangeEventCharacteristics = 3, + + /** An alarm has been deleted from the queue of alarms. */ + EAlarmChangeEventAlarmDeletion = 4, + + /** An alarm has been added to the queue of alarms. */ + EAlarmChangeEventAlarmAddition = 5, + + /** An alarm has expired. */ + EAlarmChangeEventTimerExpired = 6, + + /** The sound for an alarm has just started playing. */ + EAlarmChangeEventSoundPlaying = 7, + + /** The sound for an alarm has just stopped playing. */ + EAlarmChangeEventSoundStopped = 8, + + /** The sound intervals associated with sound timing have changed. */ + EAlarmChangeEventPlayIntervalsChanged = 9, + + /** The global sound state (on/off) has changed. */ + EAlarmChangeEventGlobalSoundStateChanged = 10, + + /** The next alarm at the head of the alarm queue has changed. */ + EAlarmChangeEventHeadQueueItemChanged = 11, + + /** The system date or time has changed, or the days defined as workdays have changed. */ + EAlarmChangeEventSystemDateTimeChanged = 12, + + /** The alarm alert server has been instructed to show the 'alarm expired' display. */ + EAlarmChangeEventAlarmUIVisible = 13, + + /** The alarm alert server has been instructed to hide the 'alarm expired' display. */ + EAlarmChangeEventAlarmUIInvisible = 14, + + /** Alarm sounds have been temporarily silenced, the current alarm has been paused + or re-enabled. */ + EAlarmChangeEventSoundSilence = 15, + + /** The data associated with an alarm has changed. */ + EAlarmChangeEventAlarmData = 16, + + /** A restore from backup of the alarm server has started. Alarms cannot be added/deleted + until this has finished. */ + EAlarmChangeEventRestoreStarted = 17, + + /** A restore from backup of the alarm server has failed. Alarms can be added/deleted again. */ + EAlarmChangeEventRestoreFailed = 18, + + /** A restore from backup of the alarm server has completed. The alarm queue has changed. */ + EAlarmChangeEventRestoreCompleted = 19, + + /** Last change event (anchor). This is always at the end of the list. */ + EAlarmChangeEventLast, + + /** An undefined alarm event has occurred. */ + EAlarmChangeEventUndefined = 0 + }; + +/** Identifies server-initiated panics relating to the client session. */ +enum TAlarmServerInitiatedClientPanic + { + /** This panic occurs when the client requests a copy of any data attached to an + alarm, but does not supply enough buffer space to contain the data. */ + EAlarmServerInitiatedClientPanicInsufficientRoomForAlarmData = 0, + + /** This panic usually occurs when a client method tries to write to a descriptor + (sometimes asynchronously), and the client-supplied descriptor is not valid. */ + EAlarmServerInitiatedClientPanicBadDescriptor = 1, + + /** This panic occurs when a client already has an outstanding notification request, + but attempts to request another. */ + EAlarmServerInitiatedClientPanicChangeNotificationAlreadyOutstanding = 2, + + /** This panic occurs when a client tries to perform an invalid operation. */ + EAlarmServerInitiatedClientPanicInvalidOperation = 3, + + /** This panic occurs when a request to add an alarm contains a null alarm identiifer. + In the case of alarms with notifications, the client should pre-allocate the + alarm identifier before requesting the notification. */ + EAlarmServerInitiatedClientPanicBadPreAllocatedAlarmId = 4 + + }; + +/** Identifies what kind of alarms the client wants to delete. */ +enum TDeleteTypeEnum + { + /** All type of alarms. */ + EAllAlarms = 0, + /** Alarms future of the current time */ + EFuture = 1, + /** Alarms in the past of the current time but notifying, or waiting to notify, or snoozed by, the user */ + EActive = 2, + /** alarms that has been dismissed by the user */ + EExpired = 4 + }; + +/** +This enumeration indicates which days of the week an alarm with a repeat +definition of EAlarmRepeatDefinitionRepeatDailyOnGivenDays activates on. Days +are combined using the bitwise OR operator. + +@prototype +*/ +enum TAlarmDays + { + /** Alarm is active on Monday. */ + EAlarmDayMonday = 0x01, + /** Alarm is active on Tuesday. */ + EAlarmDayTuesday = 0x02, + /** Alarm is active on Wednesday. */ + EAlarmDayWednesday = 0x04, + /** Alarm is active on Thursday. */ + EAlarmDayThursday = 0x08, + /** Alarm is active on Friday. */ + EAlarmDayFriday = 0x10, + /** Alarm is active on Saturday. */ + EAlarmDaySaturday = 0x20, + /** Alarm is active on Sunday. */ + EAlarmDaySunday = 0x40 + }; + +/** Identifies the type of alarm which was missed. A UTC offset change will only +affect floating alarms whereas a system time change may affect either floating +or fixed alarms. +@see TASShdAlarmedInstanceParams +@see CASSrvAlarmQueue::MEnvChangeHandleEvent +*/ +enum TASShdAlarmTimeType + { + /** Floating time alarm. */ + EFloating, + /** Floating or fixed time alarm. */ + EFloatingOrFixed + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/attrlut.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/attrlut.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Attribute Look-Up-Table header +// The Attribute Lookup Table maintains a global set of unique IDs to be defined for document +// node attributes and language tags. It does this by generating a unique ID for any descriptor +// passed to it. This descriptor is in fact a pointer to a copy of the string. Once a string +// has been seen once, any further references to it will map back to the same ID (pointer) +// value. +// +// + +#if !defined(__CWAPENGINE_LUT_H__) +#define __CWAPENGINE_LUT_H__ + +#include + +class RTest; +class CAttributeLookupTableNode; + +//##ModelId=3B666BC70189 + +class CAttributeLookupTable : public CBase +/** Provides an attribute lookup table, which maintains a global set of unique IDs to be defined + for document node attributes and language tags. + + It does this by generating a unique (in the scope of the lookup table object) ID for any string + passed to it. Once a string has been seen once, any further references to it will map back to the + same ID value. + + @publishedAll + @released +*/ +{ +public: + //##ModelId=3B666BC701E3 + IMPORT_C ~CAttributeLookupTable(); + //##ModelId=3B666BC701DC + IMPORT_C static CAttributeLookupTable* CAttributeLookupTable::NewL(); + //##ModelId=3B666BC701DA + IMPORT_C const HBufC* Des2IDL( const TDesC& ); // map descriptor to ID + //##ModelId=3B666BC701D3 + IMPORT_C const HBufC* KeyExists( const TDesC& ); // check to see if the given descriptor already exists + //##ModelId=3B666BC701D2 + IMPORT_C void Reset(); // clear the table + + // debug hook + typedef enum{ + EPrint, + EPrintWholeTable + } TDebugSelectorType; + //##ModelId=3B666BC701C6 + IMPORT_C void Debug( TDebugSelectorType aSelector, TAny* aParam1, TAny* aParam2 ); + +private: + //##ModelId=3B666BC701C5 + CAttributeLookupTable(); + //##ModelId=3B666BC701BF + void ConstructL(); + //##ModelId=3B666BC701BD + CAttributeLookupTableNode* FindDes( const TDesC& ); + //##ModelId=3B666BC701BB + TUint Hash( const TDesC& ); + //##ModelId=3B666BC701A9 + CArrayPtrFlat >* iList; +}; + + +#endif // __CWAPENGINE_LUT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/basicanimation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/basicanimation.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,135 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __BASICANIMATION_H__ +#define __BASICANIMATION_H__ + +#include +#include + +class RWsSession; +class RWindow; +class CWindowGc; +class CFbsBitmap; +class CFbsBitmapDevice; +class CFbsBitGc; +class CAnimationDataProvider; +class CAnimator; +class TAnimationConfig; +class CAnimationTls; +class CAnimationTicker; +class CBasicAnimationExt; +class CCoeControl; + +/** +Implementation of CAnimation for purely client side animations. + +A basic animation accepts a data provider during construction, loads the +appropriate animator plugin, and implements the interface defined in +CAnimation. + +A basic animation must be associated with an RWindow. Redraw events will be +received by the client application whenever the animation needs to draw a new +frame, and it is the applications responsibility to call Draw() while handling +these events. It is also the client applications responsibility to handle +visibility events and place the animation on hold when it isn't visible. This +saves on CPU usage and ultimately prolongs battery life. + +@see CAnimationDataProvider +@publishedAll +@released +*/ +class CBasicAnimation : public CAnimation, public MAnimationDrawer, public MAnimationDataProviderObserver + { +private: + enum TFlags + { + EAnimationInitialised = 0x0001, + }; +public: + IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWs, RWindow& aWindow, MAnimationObserver* aObserver = 0); + IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWs, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver = 0); + IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver, const CCoeControl* aHost); + IMPORT_C static CBasicAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, const TDesC8& aDataType, MAnimationObserver* aObserver, const CCoeControl* aHost); + IMPORT_C ~CBasicAnimation(); + + IMPORT_C void Draw(CWindowGc& aGc) const; + + /** Provides an CAnimationDataProvider interface to the client application. + @return iDataProvider A CAnimationDataProvider */ + inline CAnimationDataProvider* DataProvider() { return iDataProvider; } + + /** Returns the current drawing position. + @return ipoint const Tpoint& */ + inline const TPoint& Position() const { return iPoint; } + + /** Gets the size of the smallest bounding rectangle that will be required to render the animation. + + This function is called when the animator is ready to begin animating. The animator cannot be started + until it has called this function. + @return iSize The size of the smallest bounding rectangle */ + inline const TSize& Size() const { return iSize; } + // From CAnimation: + virtual void Start(const TAnimationConfig& aConfig); + virtual void Stop(); + virtual void Pause(); + virtual void Resume(); + virtual void Hold(); + virtual void Unhold(); + virtual void SetPosition(const TPoint& aPoint); + virtual void Freeze(); + virtual void Unfreeze(); +public: + IMPORT_C void SetHostL(const CCoeControl* aHost); +protected: + CBasicAnimation(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession* aWs, RWindow* aWindow, MAnimationObserver* aObserver); + CBasicAnimation(); + CBasicAnimation(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver); + void ConstructL(const TDesC8& aDataType); + IMPORT_C virtual void CBasicAnimation_Reserved1(); + IMPORT_C virtual void CBasicAnimation_Reserved2(); + void ConstructL(const TDesC8& aDataType,const CCoeControl* aHost); +private: + CBasicAnimation(const CBasicAnimation&); // no implementation + CBasicAnimation& operator=(const CBasicAnimation&); // no implementation + // from MAnimationDataProviderObserver + virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize); + // From MAnimatorDrawer + virtual void AnimatorDraw(); + virtual void AnimatorInitialisedL(const TSize& aSize); + virtual void AnimatorResetL(); + virtual const TPtrC8 AnimatorDataType() const; + virtual CAnimationTicker& AnimatorTicker(); +private: + CBasicAnimationExt* iBasicAnimationExt; + MAnimationObserver* iObserver; + CAnimationDataProvider* iDataProvider; + CAnimationTls* iTls; + TPoint iPoint; + RWsSession* iWs; + RWindow* iWindow; + HBufC8* iDataType; + TInt iFreezeCount; + TInt iFlags; + TSize iSize; + CAnimator* iAnimator; + CFbsBitmap* iBitmap; + CFbsBitmap* iMask; + CFbsBitmapDevice* iBitmapDevice; + CFbsBitmapDevice* iMaskDevice; + CFbsBitGc* iRenderGc; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/bif.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/bif.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,171 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __BIF_H__ +#define __BIF_H__ + +#include + +class CBifEntry; + +// +// Constants +/** 2nd UID of BIF file stores. */ +const TUid KUidBioInfoFile={0x10005233}; // unicode Uid, used as 2nd Uid of file store +/** Indicates that when opening the message no application should be launched. */ +const TUid KUidBioUseNoApp={0x00000000}; +/** Indicates that when opened the message is to be viewed by the default application. */ +const TUid KUidBioUseDefaultApp={0x100052b2}; +/** Maximum length of BIO_INFO_FILE description field. */ +const TInt KMaxBioDescription=128; +/** Maximum length of ID text field. */ +const TInt KMaxBioIdText=128; +/** Unused from v7.0. + +Previously, it specified the maximum length of a command line to BIFTOOL. */ +const TInt KMaxBioCommandLine=256; +/** Maximum length of BIO_INFO_FILE file_extension field. */ +const TInt KMaxBioFileExtension=10; + +// +// Data types +/** Buffer to hold a BIF ID identifier text field. */ +typedef TBuf TBioMsgIdText; +/** Unused from v7.0. + +Previously, it held a command line to BIFTOOL. */ +typedef TBuf TBioCommand; + +/** Identifies bearers for the BIF ID type field. + +It is the C++ equivalent of the resource enum ID_TYPE. */ +enum TBioMsgIdType + { + /** Unknown. + + Item will not be used in matching. */ + EBioMsgIdUnknown, + + /** MIME type. + + Specifies that a bearer that transports MIME messages (e.g. e-mail) should + match the MIME type against the ID text field. */ + EBioMsgIdIana, + + /** Narrow band (SMS). + + Specifies that the SMS bearer should match messages against the ID port field. */ + EBioMsgIdNbs, + + /** WAP WDP. + + Specifies that the WAP bearer should match messages against the ID port field. */ + EBioMsgIdWap, + + /** WAP secure WDP. + + Specifies that the WAP bearer should match messages against the ID port field. */ + EBioMsgIdWapSecure, + + /** WAP WSP. + + Specifies that the WAP bearer should match messages against the ID port field. */ + EBioMsgIdWsp, + + /** WAP secure WSP. + + Specifies that the WAP bearer should match messages against the ID port field. */ + EBioMsgIdWspSecure + }; + +/** Encapsulates an ID from a BIF (BIO_INFO_FILE). +@internalTechnology +@released +*/ +class TBioMsgId + { +public: + /** Identifies the bearer that should use this resource to match messages. */ + TBioMsgIdType iType; + /** Confidence level. */ + CApaDataRecognizerType::TRecognitionConfidence iConfidence; // from APMREC.H + /** Text field that can be used to match the message to this BIO type. */ + TBioMsgIdText iText; + /** Receiving port number that can be used to match the message to this BIO type. */ + TUint16 iPort; + /** Expected receiving character set of messages. */ + TUid iCharacterSet; + /** This is available for 3rd party use for BIO message type identity specific + data. */ + TInt16 iGeneralIdData; + }; + +// NOTE - this is included here cos the CBioInfoFile requires some of the enums +// defined above. +#include "bifbase.h" // for CBioInfoFile + +/** BIO information file (BIF) reader. + +Allows reading (all but the icons) from an existing BIF file. + +@publishedAll +@released +*/ +class CBioInfoFileReader : public CBioInfoFile + { +public: + // + // Construction/destruction + IMPORT_C static CBioInfoFileReader* NewLC(RFs& aFs,const TDesC& aFileName,TUid aMsgTypeUid=KNullUid); + IMPORT_C static CBioInfoFileReader* NewL(RFs& aFs,const TDesC& aFileName,TUid aMsgTypeUid=KNullUid); + IMPORT_C virtual ~CBioInfoFileReader(); + + // + // Data getters + IMPORT_C TUid MessageTypeUid() const; + IMPORT_C const TPtrC MessageParserName() const; + IMPORT_C TUid MessageAppUid() const; + IMPORT_C TUid MessageAppCtrlUid() const; + IMPORT_C const TPtrC MessageAppCtrlName() const; + IMPORT_C TInt16 GeneralData1() const; + IMPORT_C TInt16 GeneralData2() const; + IMPORT_C TInt16 GeneralData3() const; + IMPORT_C const TPtrC Description() const; + IMPORT_C const TPtrC FileExtension() const; + + IMPORT_C const TPtrC IconsFilename() const; + IMPORT_C const CArrayFixFlat* ZoomLevelsLC() const; + IMPORT_C TInt ZoomLevelsCount() const; + + IMPORT_C const CArrayFixFlat* IdsLC() const; + + IMPORT_C const CBifEntry& BifEntry() const; + +private: + CBioInfoFileReader(RFs& aFs); + void ConstructL(const TDesC& aFileName, TUid aMsgTypeUid); + +private: + void InternalizeL(RReadStream& aStream); + void LoadResourceL(TUid aMsgTypeUid); + void LoadDataL(TUid aMsgTypeUid); + TBool IsResFileL() const; + TBool IsDatFile(const TUidType& aUidType) const; + // + HBufC* iFileName; + CBifEntry* iEntry; + }; + +#endif // __BIF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/biodb.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/biodb.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,221 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __BIODB_H__ +#define __BIODB_H__ + +#include // the bif reader +#include + +class CBifEntry; + +/** UID of the BIODB.DLL. */ +const TUid KUidBioDBDll ={0x10005542}; + +/** Buffer to hold BIF identification text. */ +typedef TBuf TBioMsgIdText; + +/** BIO information file (BIF) database. + +This class reads the installed BIF files and allows information from them +to be easily extracted. + +@see BIO_INFO_FILE +@publishedAll +@released +*/ +class CBIODatabase : public CBase + { +public: + /** Search methods. */ + enum TSearchList + { + /** Begin search from the start. */ + EStart, + /** Begin search from the last index position. */ + ENext + }; +public: + IMPORT_C static CBIODatabase* NewLC(RFs& afileSystem); + IMPORT_C static CBIODatabase* NewL(RFs& afileSystem); + IMPORT_C ~CBIODatabase(); + +public: + // BIF files contain all the information that needs to be registered + // for each BIO Message type + + // Completely refresh the database will all the BIF Files in the + // default directory + IMPORT_C void AddAllBifsL(RFs& afileSystem); + + // Add one bifFile using the file name, then using Neil's handy + // class to read it + // This will add the Parser + IMPORT_C void AddBifL(CBioInfoFileReader* aBifReader); + IMPORT_C void RemoveBifL(TUid aMsgID); + IMPORT_C void RemoveBifL(TInt aIndex); + + // BIO Messages are determined to of a BIO type if we have the BIO + // Parser identified by a WAP/NBS port, IANA MIME type or a Pattern + IMPORT_C TInt BIOCount(); + + // Get the BioEntry at this index + // Return Index if found, NULL if not + IMPORT_C const CArrayFix* BIOEntryLC(TInt index); + + + // Get the whole bif file class + IMPORT_C const CBioInfoFileReader& BifReader(TInt aIndex) const; + + // Get the BIO Entry based on what type it is, pos indicates where to start looking + // after, and will get updated to current pos + IMPORT_C const CArrayFix* BioEntryByTypeLC( + TSearchList aSearchType, + TBioMsgIdType portType, + TInt& rIndex); + + IMPORT_C void GetBioIndexWithMsgIDL(TUid aMsgID, TInt& rIndex); + + // Get the BioMessageID for the Index + IMPORT_C void GetBioMsgID(TInt aIndex, TUid& rMsgID); + + // Get the BioParserName for the Index + IMPORT_C const TPtrC GetBioParserName(TInt aIndex); + + // Get the BioParserName for the BioMessageID + IMPORT_C const TPtrC GetBioParserNameL(TUid aMsgID); + + // Get the ControlID for the Index + IMPORT_C void GetBioControlID(TInt aIndex, TUid& rControlID); + + // Get the ControlID for the BioMessageID + IMPORT_C void GetBioControlIDL(TUid aMsgID, TUid& rControlID); + + IMPORT_C const TPtrC GetBioControlName(TInt aIndex); + IMPORT_C const TPtrC GetBioControlNameL(TUid aMsgID); + + // Get the String Extension for the BioMessageID + IMPORT_C const TPtrC GetFileExtL(TUid aMsgID); + + IMPORT_C void GetDefaultSendBearerL(TUid aBioUID, TBioMsgId& rBioMsgIdentifier); + IMPORT_C void GetDefaultSendBearerTypeL(TUid aBioUID, TBioMsgIdType& rPortType); + IMPORT_C void GetDefaultSendBearerByTypeL(TUid aBioUID, TBioMsgIdType aPortType, TBioMsgId& rBioMsgIdentifier); + + // BIO Messages are determined to of a BIO type if we have the BIO + // Parser identified by a WAP/NBS port, IANA MIME type or a Pattern + // Return an Index + + // Get the Port# or Identifying string for sending + IMPORT_C void GetPortNumberL(TUid aMsgID, TBioMsgIdType aPortType, TInt& aPortNumber); + IMPORT_C void GetIdentifierTextL(TUid aMsgID, TBioMsgIdType aPortType, TBioMsgIdText& aText); + + // Test to see if this is a BioMessage + // Pass in the type ... if its NBS or IANA pass in the string pattern + // if its WAP or SecureWap, pass in the port number + // return kErrNone if success, kErrNotFound if it fails + IMPORT_C TInt IsBioMessageL(TBioMsgIdType aPortType, const TDesC& aPattern, TUint16 aPort, TUid& rBioMsgUID); + + IMPORT_C TInt IsBioMessageL(TBioMsgId bioMessageData, TUid& rBioMsgUID); + +private: + CBIODatabase(); + void ConstructL(RFs& afileSystem); + +private: + //Utilities + void GetTransportIDL(TInt aIndex, TBioMsgIdType aPortType, TBioMsgId& aBioMsgID); + TBool IsLanguageFileL(const TDesC& aFileName, TInt& aExtLength) const; + // If Persistence is required... + // void InternalizeL(RReadStream& aStream); + // void ExternalizeL(RWriteStream& aStream) const; + +private: + CArrayPtrFlat* iBifReaders; + +}; + +/** Callback interface implemented by classes to receive notifications of BIF files +changes from CBifChangeObserver. + +@publishedPartner +@released +*/ +class MBifChangeObserver + { +public: + /** BIF change events. */ + enum TBifChangeEvent + { + /** Unknown change. */ + EBifChangeUnknown = 0, + /** BIF added. */ + EBifAdded, + /** BIF deleted. */ + EBifDeleted, + /** BIF changed. */ + EBifChanged + }; + +public: + /** Called when a BIF change occurs. + + @param aEvent Change event type + @param aBioID BIO message type of changed BIF */ + virtual void HandleBifChangeL(TBifChangeEvent aEvent, TUid aBioID)=0; + }; + +/** Active object that watches for changes made to the installed BIF files. + +@publishedPartner +@released +*/ +class CBifChangeObserver : public CActive + { +public: + IMPORT_C static CBifChangeObserver* NewL(MBifChangeObserver& aObserver, RFs& aFs); + IMPORT_C void Start(); + ~CBifChangeObserver(); + + static void CleanupBifArray(TAny* aBifArray); + +private: + // from CActive + virtual void RunL(); + virtual void DoCancel(); + +private: + CBifChangeObserver(MBifChangeObserver& aObserver, RFs& aFs); + void ConstructL(); + + void NotifyObserverL(); + void WaitForFileNotification(); + void DoRunL(); + void CopyEntriesL(const CDir& aDir, CArrayFixFlat& aEntries); + TBool CompareReaders(const CBioInfoFileReader& aReader1, const CBioInfoFileReader& aReader2) const; + + TInt FindEntry(const CBifEntry& aBifEntry, const RPointerArray& aEntries, TInt& aIndex) const; + +private: + MBifChangeObserver& iChangeObserver; + RFs& iFs; + + RPointerArray iEntries; + + CBIODatabase* iBioDB; + RTimer iTimer; + TInt iRetryCount; + }; + +#endif // __BIODB_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/biouids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/biouids.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,132 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// BIOUUIDS.H +// Contains the TUid defines for the Bio Messaging +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#if !defined(__BIOUTILS_H__) +#define __BIOUTILS_H__ + +//forward declarations +/** +* @publishedAll +* @released +*/ +class TUid; +/** +*UID of the Smart Message Parser DLL. +* @publishedPartner +* @released +*/ +const TUid KUidSmartMessageParserDll = { 0x10001251}; +/** +* BIO specific error/panic code base. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageBaseError = -505; +/** +* BIO message not found error. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageNotFound = KBIOMessageBaseError; +/** +* BIO server MTM already active error. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageSvrMtmNotInactive = KBIOMessageBaseError-1; +/** +* No BIO parser error. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageNoParserCreated = KBIOMessageBaseError-2; +/** +* BIO parser in use error. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageParserDllStillInUse = KBIOMessageBaseError-3; +/** +* BIO operation already active error. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageOperationNotInactive = KBIOMessageBaseError-4; +/** +* BIO server MTM operation not supported. +* @publishedPartner +* @released +*/ +const TInt KBIOMessageSvrNotSupported = KBIOMessageBaseError-5; +/** +* Unused. +* @internalComponent +* @removed +*/ +const TUid KUidMsvNbsEditor={0x10001264}; + +// New BIO Messaging TUids +/** +* Stream ID used for storing parsed BIO data. +* @internalAll +* @released +*/ +const TUid KUidMsvBIODataStream = {0x10005268}; // stream used for storing parsed data + +// BIO Mtm components + +/** +* BIO message type UID. +* @publishedAll +* @released +*/ +const TUid KUidBIOMessageTypeMtm = {0x10001262}; +/** +* BIO client MTM UID. +* @internalTechnology +* @released +*/ +const TUid KUidBIOMessageClientMtmDll = {0x1000125A}; //previously NBSC, now BIOC +/** +* BIO server MTM UID. +* @internalTechnology +* @released +*/ +const TUid KUidBIOMessageServerMtmDll = {0x1000125C}; //previously NBSS, now BIOS +/** +* BIO UI MTM UID. +* @internalTechnology +* @released +*/ +const TUid KUidBIOMessageUiLayerMtmDll = {0x10001265}; //previously NBUM, now BIUM +/** +* BIO message viewer UID. +* @internalTechnology +* @released +*/ +const TUid KUidBIOMessageViewerApp = {0x10001264}; //previously NBED,now BIED + +#endif *__BIOUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/bmpancli.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/bmpancli.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__BMPANCLI_H__) +#define __BMPANCLI_H__ + +#include +#include +#include + +// +// CFrameData +// + + +/** +Encapsulates the information required for one frame of an animation. + +Each animation frame includes a bitmap that is displayed in a specified position +for a specified length of time. You can optionally include a mask that either +hides part of the bitmap, or makes part of the bitmap transparent so that the +background can be seen. + +You will probably need to define several frames for a complete animation. +When you have defined the frames you require, use CBitmapAnimClientData to +construct the animation itself. + +@publishedAll +@released +*/ +class CBitmapFrameData : public CBase + { +public: + IMPORT_C ~CBitmapFrameData(); + IMPORT_C static CBitmapFrameData* NewL(); + IMPORT_C static CBitmapFrameData* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask=NULL); + IMPORT_C static CBitmapFrameData* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask, TInt aIntervalInMilliSeconds, TPoint aPosition); +// + IMPORT_C void SetBitmap(CFbsBitmap* aBitmap); + IMPORT_C void SetMask(CFbsBitmap* aMask); + IMPORT_C void SetPosition(TPoint aPosition); + IMPORT_C void SetInterval(TInt aIntervalInMilliSeconds); + IMPORT_C void SetBitmapsOwnedExternally(TBool aOwnedExternally); +// + IMPORT_C CFbsBitmap* Bitmap() const; + IMPORT_C CFbsBitmap* Mask() const; + IMPORT_C TInt IntervalInMilliSeconds() const; + IMPORT_C TPoint Position() const; + IMPORT_C TBool BitmapsOwnedExternally() const; +private: + CBitmapFrameData(); +private: + CFbsBitmap* iBitmap; + CFbsBitmap* iMaskBitmap; + TBool iBitmapsOwnedExternally; + TInt iIntervalInMilliSeconds; + TPoint iPosition; + }; + + +// +// CBitmapAnimClientData +// + + +/** +Encapsulates one or more animation frames into an entire animation. + +In addition to specifying the frames you wish to include in your animation, +you can also specify: + +- whether the animation will flash + +- whether the animation is played once, or continuously + +- the background frame that is drawn to clear each frame in the animation + +You can also specify a default frame interval that is used for all frames +in an animation. If the interval is already set for any of the individual +frames, that takes precedence. + +When you have defined your animation, use RBitmapAnim to play the animation. + +@publishedAll +@released +*/ +class CBitmapAnimClientData : public CBase + { +public: + /** Animation play mode flags. + + The animation can be played in any of the ways described below. */ + enum TPlayMode + { + /** Plays the animation once, from the first frame to the last one. */ + EPlay = 0x00, + /** Plays the animation from the first frame to the last one continuously. */ + ECycle = 0x01, + /** Plays the animation from the first frame to the last one then from the last + frame to the first continuously. */ + EBounce = 0x02 + }; +public: + IMPORT_C static CBitmapAnimClientData* NewL(); + IMPORT_C ~CBitmapAnimClientData(); +// + IMPORT_C void AppendFrameL(CBitmapFrameData* aFrame); + IMPORT_C void ResetFrameArray(); + IMPORT_C void SetBackgroundFrame(CBitmapFrameData* aBackgroundFrame); + IMPORT_C void SetFlash(TBool aFlash); + IMPORT_C void SetFrameInterval(TInt aFrameIntervalInMilliSeconds); + IMPORT_C void SetPlayMode(TPlayMode aPlayMode); +// + IMPORT_C CBitmapFrameData* BackgroundFrame() const; + IMPORT_C TBool Flash() const; + IMPORT_C const CArrayPtrFlat& FrameArray() const; + IMPORT_C TInt FrameIntervalInMilliSeconds() const; + IMPORT_C TPlayMode PlayMode() const; +// + IMPORT_C TInt DurationInMilliSeconds() const; + IMPORT_C TSize Size() const; +private: + CBitmapAnimClientData(); +private: + TBool iFlash; + TPlayMode iPlayMode; + TInt iFrameIntervalInMilliSeconds; + CArrayPtrFlat iFrameArray; + CBitmapFrameData* iBackgroundFrame; + }; + + + +/** +Enables a client to package animation data, and send it to the window server +for display. + +Before using RBitmapAnim, a client must instantiate an RAnimDll. This provides +a reference to the window server DLL that runs the animation specified through +the RBitmapAnim() object. To complete construction, call ConstructL(). + +@publishedAll +@released +*/ +class RBitmapAnim : public RAnim + { +public: + IMPORT_C RBitmapAnim(RAnimDll& aAnimDll); + IMPORT_C void ConstructL(const RWindowBase& aWindow); + IMPORT_C void DisplayFrameL(TInt aIndex); + IMPORT_C void SetBitmapAnimDataL(const CBitmapAnimClientData& aBitmapAnimData); + IMPORT_C void SetFlashL(TBool aFlash); + IMPORT_C void SetFrameIntervalL(TInt aFrameIntervalInMilliSeconds); + IMPORT_C void SetPlayModeL(CBitmapAnimClientData::TPlayMode aPlayMode); + IMPORT_C void StartL(); + IMPORT_C void StopL(); + IMPORT_C void SetNumberOfCyclesL(TInt aNumberOfCycles); + IMPORT_C void SetPositionL(TPoint aPosition); +private: + void SetAttributesL(const CBitmapAnimClientData& aBitmapAnimData); + void SetBackgroundFrameL(const CBitmapFrameData& aFrame); + void SetFrameArrayL(const CArrayPtrFlat& aFrameArray); + void SetFrameL(const CBitmapFrameData& aFrame, TInt aOpCode); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/bmpanconsts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/bmpanconsts.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__BMPANCONSTS_H__) +#define __BMPANCONSTS_H__ + +/** +TBitmapAnimCommand + +@internalComponent +*/ +enum TBitmapAnimCommand + { + EBitmapAnimCommandSetBackgroundFrame, + EBitmapAnimCommandSetDataFrame, + EBitmapAnimCommandSetFlash, + EBitmapAnimCommandSetFrameIndex, + EBitmapAnimCommandSetFrameInterval, + EBitmapAnimCommandSetNumberOfCycles, + EBitmapAnimCommandSetPlayMode, + EBitmapAnimCommandSetPosition, + EBitmapAnimCommandStartAnimation, + EBitmapAnimCommandStopAnimation, + EBitmapAnimCommandStartAnimationAndKeepLastFrame, + EBitmapAnimCommandResetFrameArray, + EBitmapAnimCommandClearDataFrames + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/bmpansrv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/bmpansrv.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,328 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent +*/ + +#if !defined(__BMPANSRV_H__) +#define __BMPANSRV_H__ + +#include +#include +#include +#include "bmpancli.h" +#include + + + +enum TBitmapAnimServerPanic + { + EAnimationServerPanicIndexOutOfRange, + EAnimationServerPanicFrameIntervalNegative + }; + +// For packaging the new animation position offset +struct SBitmapAnimNewPosition + { + TPoint iPosition; + }; + +// For packaging the new animation index +struct SBitmapAnimIndexFrame + { + TInt iIndex; + }; + +// For packaging the number of cycles +struct SBitmapAnimNumberOfCycles + { + TInt iCycles; + }; + + + +/** + TFrameData + + This class is used for packaging the data of one frame. +*/ +class TFrameData + { +public: + TInt iBitmapHandle; + TInt iMaskBitmapHandle; + TPoint iPosition; + TInt iIntervalInMilliSeconds; // the time is expressed in ms + }; + + + +/** + TBmpAnimAttributes + + This class is used for packaging the attriutes of the animation. +*/ +class TBmpAnimAttributes + { +public: + TBool iFlash; + TInt iFrameIntervalInMilliSeconds; + CBitmapAnimClientData::TPlayMode iPlayMode; + }; + + + + +/** + class MBitmapAnimTimerObserver +*/ +class MBitmapAnimTimerObserver + { +public: + virtual void DisplayNextFrameL()=0; + }; + + + +/** + class CBitmapAnimTimer + + This class is used to determine when to swap the current frame with the next one. +*/ +class CBitmapAnimTimer : public CTimer + { +public: + ~CBitmapAnimTimer(); + static CBitmapAnimTimer* NewL(MBitmapAnimTimerObserver* aObserver); + void RunL(); +private: + CBitmapAnimTimer(MBitmapAnimTimerObserver* aObserver); + void ConstructL(); +private: + MBitmapAnimTimerObserver* iAnimate; + }; + + + +/** + class MBitmapAnimFlashTimerObserver +*/ + +class MBitmapAnimFlashTimerObserver + { +public: + virtual void FlashFrame(TBool aFlash)=0; + }; + + + +/** + class CBitmapAnimFlashTimer +*/ + +class CBitmapAnimFlashTimer : public CTimer + { +public: + ~CBitmapAnimFlashTimer(); + static CBitmapAnimFlashTimer* NewL(MBitmapAnimFlashTimerObserver* aObserver); + void DoCancel(); + void RunL(); +private: + CBitmapAnimFlashTimer(MBitmapAnimFlashTimerObserver* aObserver); + void ConstructL(); +private: + MBitmapAnimFlashTimerObserver* iAnimate; + TBool iFlash; + }; + + + +/** + class CBitmapAnimFrameData + + This class encapsulates the information of one frame. +*/ + +class CBitmapAnimFrameData : public CBase + { +public: + static CBitmapAnimFrameData* NewL(); + static CBitmapAnimFrameData* NewLC(); + ~CBitmapAnimFrameData(); + void FillFrameDataL(const TFrameData& aFrameDataArg); + void CheckAndCreateBitmapsL(); + +private: + CBitmapAnimFrameData(); + void InitialiseMembers(); + +public: + CFbsBitmap* iBitmap; + CFbsBitmap* iMaskBitmap; + TPoint iPosition; + TTimeIntervalMicroSeconds32 iInterval; + }; + + + +/** + class CBitmapAnim + + This class encapsulates the enire animation: attributes and frames. +*/ + +class CBitmapAnim : public CFreeTimerWindowAnim, MBitmapAnimTimerObserver//, MBitmapAnimFlashTimerObserver + { +public: + ~CBitmapAnim(); + static CBitmapAnim* NewL(); +private: + CBitmapAnim(); +private: + enum TAnimateFlags + { +// State + ERunning = 0x0001, + EFlashing = 0x0002, + EFrozen = 0x0004, +// Play mode + EPlayModeCycle = 0x0010, + EPlayModeBounce = 0x0020, + EPlayForwards = 0x0040, + EPlayBackwards = 0x0080, +// General + EFlash = 0x0100, + EBackgroundBitmapProvided = 0x0200, + EWindowContentsInitialized = 0x0400, + ENoBitmapWindowRestoring = 0x0800, + EChangedBackgroundFramePending = 0x1000, + EBackgroundShouldIncludeWindowContents = 0x2000, + EDisplayLastFrameWhenFinished = 0x4000, + EBackgroundMaskProvided = 0x8000 + }; + +private: //Pure Virtual function from CAnim + virtual void ConstructL(TAny *aArgs, TBool aHasFocus); + virtual void Command(TInt aOpcode, TAny* aArgs); + virtual TInt CommandReplyL(TInt aOpcode, TAny *aArgs); + virtual void Animate(TDateTime* aDateTime); + virtual void Redraw(); + virtual void FocusChanged(TBool aState); +private: //Pure Virtual function from MEventHandler + virtual TBool OfferRawEvent(const TRawEvent &aRawEvent); +private: //Pure Virtual function from MBitmapAnimTimerObserver + virtual void DisplayNextFrameL(); +private: //Pure Virtual function from MBitmapAnimFlashTimerObserver + virtual void FlashFrame(TBool aFlash); +private: + void AppendFrameL(const TFrameData& aFrameData); + inline TInt Count() const; + void DisplayFrame(TInt aPreviousIndex=-1); + void DrawBitmap(TInt aPreviousIndex=-1, TBool aRedraw=EFalse); + inline TBool IsFrameDisplayable() const; + inline TBool IsRunning() const; + inline TBool IsFrozen() const; + void ResetAnimation(); + void ClearFrame(TInt aIndex); + void ClearFrameNow(TInt aIndex); + void RenderFrameBackground(TInt aIndex); + TRect CalcFrameRect(TInt aIndex); + void SetBackgroundFrameL(TFrameData aFrameDataArg); + void SetFlash(TBmpAnimAttributes aFlash); + void SetFrameInterval(TBmpAnimAttributes aFrameInterval); + TInt SetIndexFrame(SBitmapAnimIndexFrame aIndexFrame); + void SetNumberOfCycles(SBitmapAnimNumberOfCycles aNumberOfCycles); + void SetPlayMode(TBmpAnimAttributes aPlayMode); + void SetPosition(SBitmapAnimNewPosition aNewPosition); + void StartAnimationL(); + void StopAnimation(); + void StoreWindowContentsToBackgroundBitmapL(const TRegion* aRegion); + void UpdateCurrentIndex(); + inline TRect WindowRect() const; + CFbsBitmap* CreateRestoringBitmapL(TPoint& aPosition, TInt aPreviousIndex); + void UpdateBackgroundBitmapIfNeeded(const TRegion* aRegion, TRect aBackgroundBitmapScreenRect); + static TBool FrameNeedsRedrawing(const TRegion* aRedrawRegion, TRect aFrameScreenRect); + void ResetFrameArray(); + void ClearFrameData(); + TBool CanDrawNextFrameWithoutErasingPreviousFrameL(TInt aPreviousIndex); + TBool CompareBitmapsL(CFbsBitmap* aBmp1, CFbsBitmap* aBmp2); + +private: + RPointerArray iBitmapAnimFrameDataArray; + CBitmapAnimTimer* iAnimTimer; + CBitmapAnimFlashTimer* iFlashTimer; + CBitmapAnimFrameData* iBackgroundFrame; + CFbsBitmap* iBackgroundBitmap; + CFbsBitmapDevice* iBackgroundbitmapDevice; + CFbsBitGc* iBackgroundbitmapGc; + +// + TInt iDummy; + TInt iFlags; + TInt iIndex; + TInt iNumberOfCycles; + TPoint iPosition; + TInt iWindowConfig; + TTimeIntervalMicroSeconds32 iFrameInterval; +// + CFbsBitGc* iRestoringGc; + }; + +// Returns the number of frames store in the frame array. +inline TInt CBitmapAnim::Count() const + { return iBitmapAnimFrameDataArray.Count(); } + +// Returns ETrue every time the index frame is valid, otherwise it returns EFalse. +inline TBool CBitmapAnim::IsFrameDisplayable() const + { return ( (iIndex >= 0) && iBitmapAnimFrameDataArray[iIndex]->iBitmap ); } + +// Returns ETrue if the animation is running, otherwise it returns EFalse. +inline TBool CBitmapAnim::IsRunning() const + { return iFlags&ERunning; } + +//Returns ETrue if the animation is frozen (app is not in the foreground) +inline TBool CBitmapAnim::IsFrozen() const +{ return iFlags&EFrozen; } + +// Returns the available window rect. +inline TRect CBitmapAnim::WindowRect() const + { return TRect(TPoint(0, 0), iWindowFunctions->WindowSize()); } + + + + +/** + CBitmapAnimDll class +*/ + +class CBitmapAnimDll : public CAnimDll + { +public: + CBitmapAnimDll(); + virtual CAnim* CreateInstanceL(TInt aType); + }; + + +/** + global functions +*/ +GLREF_C void Panic(TBitmapAnimServerPanic aReason); + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/bsp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/bsp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,254 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// BSP.H (Base Script Parser) +// Abstract class for different Parsers. +// +// + + +#if !defined(__BSP_H__) +#define __BSP_H__ + +#if !defined(__MTCLREG_H__) +#include +#endif + +#if !defined(__MTCLBASE_H__) +#include +#endif + +#include +#if !defined(__S32STRM_H__) +#include +#endif + +#include +// CRichText etc. includes +#include +#include + +#include + + + +// Symbols: +/** Space character. */ +#define KCharSpace ' ' +/** Tab character. */ +#define KCharTab '\t' +/** Line feed character. */ +#define KCharLineFeed '\n' + + +// Define some generic error codes: +/** BIO error code base. */ +const TInt KBspBaseError = (-500); + +/** Invalid BIO message error code. */ +const TInt KBspInvalidMessage = (KBspBaseError); +/** Invalid smart message token error code. */ +const TInt KBspSmartMessageInvalidToken = (KBspBaseError-1); +/** No smart message parser defined error code. */ +const TInt KBspSmartMessageNoParserDefined = (KBspBaseError-2); + +// Parsed field class for use by parsers. +class CParsedField : public CBase +/** Represents a single token-value pair for a given field in a BIO/smart message +grammar. +@publishedAll +@released +*/ +{ +public: + IMPORT_C CParsedField(); + IMPORT_C ~CParsedField(); + + IMPORT_C TPtrC FieldName() const; + IMPORT_C void SetFieldNameL( const TDesC& aFieldName); + IMPORT_C TPtrC FieldValue() const; + IMPORT_C void SetFieldValueL( const TDesC& aFieldValue); + IMPORT_C TBool MandatoryField() const; + IMPORT_C void SetMandatoryField(TBool aMandatoryField); + + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; +private: + void Reset(); +private: + HBufC* iFieldName; + HBufC* iFieldValue; + TBool iMandatoryField; +}; + +// Forward declarations: +class CMsvServerEntry; +class CMsvEntry; +class CRegisteredParserDll; +class RMsvReadStream; +class RMsvWriteStream; +class CMsvStore; +class CSmsMessage; + + + +/** Base class for BIO message parsers V2. + +Concrete derived classes are implemented in parser DLL's to parse particular +types of BIO message. + +On receiving an appropriate command (see TBioOperation), the BIO server MTM +loads the appropriate parser and passes the message body to it for interpretation. +In fact, the parser interface expects the parser to divide its operation into +two stages: + +1. parsing: which involves extracting information from the raw message body and +storing it in a structured format. The parsing stage can also alter the message +body, and create files in the directory associated with the message (e.g. +parsing a ring tones message will generate a ring tone file). + +2. processing: which involves using the extracted information to achieve the +purpose of the BIO message (e.g. setting some phone configuration setttings). + +This separation allows, for example, a UI to display the parsed information +to the user for confirmation, before it is acted upon. For some parsers, however, +this two stage division is not sensible, in which case they implement only +the first. + +The base class provides a pointer iSettings to reference the raw message data, +and an array of token-value pairs, iParsedFieldArray, for storing parsed information +(if this is appropriate). +@publishedAll +@released +*/ +class CBaseScriptParser2: public CActive + { +public: + IMPORT_C CBaseScriptParser2(CRegisteredParserDll& aRegisteredParserDll, CMsvEntry& aEntry, RFs& aFs); + IMPORT_C ~CBaseScriptParser2(); + + /** Called by the BIO server MTM to asynchronously parse message body data. + + When parsing is complete, the function should indicate this by setting the + message's index field iMtmData3 to 1. + + The function should leave if the buffer cannot be parsed successfully. + + @param aStatus Asynchronous status word + @param aSms Buffer to parse */ + virtual void ParseL(TRequestStatus& aStatus, const TDesC& aSms)=0; //parses sms data into CParsedField + /** Called by the BIO server MTM to asynchronously process the parsed data. + + The function takes appropriate parser-specific action on the results of a + previous call to ParseL(). + + When processing is complete, the function should indicate this by setting + the message's index field iMtmData3 to 2. + + The function should leave if processing is not successful. + + @param aStatus Asynchronous status word */ + virtual void ProcessL(TRequestStatus& aStatus)=0; //stores parsed data into streams and data base + + IMPORT_C TUid ParserUid(); + IMPORT_C void RestoreL(CMsvStore& aMessageStore); + IMPORT_C void StoreL(CMsvStore& aMsvStore) const; + IMPORT_C void RestoreL(const TFileName& aFileName); + IMPORT_C void StoreL(const TFileName& aFileName) const; + IMPORT_C void ResetL(); + +protected: +// Parsing: + IMPORT_C void UnfoldMessageL(); + +// Streaming operations: + void InternalizeL(RMsvReadStream& aStream); + void ExternalizeL(RMsvWriteStream& aStream) const; + +protected: + /** Object that loaded the parser. It contains a reference counter of the use of + the parser. */ + CRegisteredParserDll& iRegisteredParserDll; + /** The message entry the parser should parse. */ + CMsvEntry& iEntry; + /** Connected file server handle. */ + RFs& iFs; + + /** Lexer intended for Smart Message use. + + This is not used by the base class. */ + TLex iSms; + /** Array of token-value pairs. + + Derived classes can use this for storing parsed information (if this is appropriate). */ + CArrayPtrSeg* iParsedFieldArray; + + /** Flag intended for Smart Message use. + + This is not used by the base class. */ + TBool iSmsParsed; + /** ID of iEntry. */ + TMsvId iEntryId; + + /** Pointer to message data. + + This is not set by the base class. */ + HBufC* iSettings; + /** Pointer to SMS data (intended for Smart Message use). + + This is not set by the base class. */ + HBufC* iSmsBuf; // Local copy of buffer passed to ParseL() + /** Temporary pointer used by RestoreL(). */ + HBufC8* iReadBuffer; // used to restore data from file + }; + + +/** BIO data location flag values. + +@see TMsvBIOEntry */ +enum TMsvBIODataLocation + { + /** Unknown. */ + EUnknown, + /** Parser wrote data into the body text. */ + EBodyText, // parser wrote data back into richText + /** Parser wrote data into the parsed fields data stream. */ + EBIODataStream, // parser wrote data into KUIDMsvBioStream + /** Parser wrote data into an attachment file. */ + EFile // parser wrote data into attachment file + }; + + +/** Bearer Independent Object entry. +Specialises the TMsvEntry message entry class to store additional BIO message-specific +information. +@internalTechnology +@released +*/ +class TMsvBIOEntry : public TMsvEntry + { +public: + /** Constructor. */ + TMsvBIOEntry() : TMsvEntry() {}; + void SetBIOParserUid(const TUid aId); + const TUid BIOParserUid() const; + void SetLocationOfData(const TMsvBIODataLocation aLocation); + const TMsvBIODataLocation LocationOfData() const; + +private: + TMsvBIODataLocation iLocationOfData; + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cbioasyncwaiter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cbioasyncwaiter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,52 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CBIOASYNCWAITER_H__ +#define __CBIOASYNCWAITER_H__ + +#include + +/** +Utility class for waiting for asychronous requests. + +This class allows asynchronous requests to be made from synchronous +objects. This object is used by passing its iStatus to an asynchronous +request and then calling Start(). The result of the request can be +obtained by calling the Result() method. + +@publishedAll +@released +*/ +class CBioAsyncWaiter : public CActive + { +public: + IMPORT_C static CBioAsyncWaiter* NewLC(); + IMPORT_C ~CBioAsyncWaiter(); + + IMPORT_C void StartAndWait(); + IMPORT_C TInt Result() const; + +private: + CBioAsyncWaiter(); + + // from CActive + virtual void RunL(); + virtual void DoCancel(); + +private: + TInt iError; + }; + +#endif // __CBIOASYNCWAITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cbnfnode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cbnfnode.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,63 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// BNF node header +// +// + +#ifndef __CBNFNODE_H__ +#define __CBNFNODE_H__ + +#include +#include + +/** Declares that the "type" for node attributes is stored as a string. */ +typedef const TDesC* CBNFNodeAttributeType; + +#define _SHAREDSTRING(X) IMPORT_C static CBNFNodeAttributeType K##X(); +#define _SHAREDSTRINGBODY(X) EXPORT_C CBNFNodeAttributeType CBNFNode::K##X() \ + { \ + _LIT(K##X, #X); \ + return &(K##X); \ + } + + +class CBNFNode : public CTypedNode +/** Backus-Naur Form (BNF) node that forms part of a BNF tree (CBNFParser). + +Node types are stored as TInts, and attribute types as descriptors. +@publishedAll +@released +*/ +{ +public: + //##ModelId=3B666BC70146 + IMPORT_C ~CBNFNode(); + + //##ModelId=3B666BC70144 + IMPORT_C static CBNFNode* NewL(TInt aType); + + _SHAREDSTRING(PreRuleCallback) + _SHAREDSTRING(PostRuleCallback) + _SHAREDSTRING(Reference) + _SHAREDSTRING(RangeStart) + _SHAREDSTRING(RangeEnd) + _SHAREDSTRING(NMoreCount) + _SHAREDSTRING(NMoreMinimum) + _SHAREDSTRING(NMoreMaximum) + +protected: + IMPORT_C CBNFNode(TInt aType); +}; + +#endif // __CBNFNODE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cbnfparser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cbnfparser.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,557 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This class provides a mechanism to use a BNF tree to parse an input stream. +// The notation of the EBNF is based upon that described in the XML1.0 specification. +// The BNF tree form used is a variation on Extended BNF and has the following rule types, +// where the input stream must: +// , Exact - match exactly with the provided string. +// , Range - next character must be in the specified range. +// , Select - next character must exist in the selected string. +// If the select string starts with ^ it is a NOT Select. +// , And - match all of the given sub rules +// , Or - match one of the given sub rules +// , NMore - match N or more times the the SINGLE subrule. +// , Optional - match 0/1 times to the SINGLE subrule. +// , Without - match the first subrule but NOT the second. +// , Reference - match the referred to rule. +// The iterative parser not only validates an input stream against the +// BNF grammer but allows pre/post actions to be performed during the parsing. +// Partial parsing is also allowed in that the input stream does not have to +// completed before parsing can begin. As soon as data is added the parser +// attempts to parse it. +// Numerous methods are provided to assist in the building of the BNF Tree this parser uses. +// To use this class: +// Create a derivation and implement the virtual method TreeL() to creat a BNF rule tree +// (the assistance methods NewBNF/NewRule etc should be used) - see DTDModel +// To use your new parser invoke Reset and pass input data using the ProcessData method. +// +// + +#ifndef __CBNFPARSER_H__ +#define __CBNFPARSER_H__ + +#include +#include +#include +#include +#include + +// +// forward class declarations +// +class CAttributeLookupTable; + + +// Rule Tree node type definitions +/** Defines types of node in a BNF tree (CBNFParser). + +Except for ERoot, EIncomplete, EReference, and ELastParserNodeType, the +types define different types of rule that the input stream must meet to +satisfy the grammar. */ +enum TParserNodeTypes + { + /** Root node. */ + ERoot, + /** Incomplete node. */ + EIncomplete, + /** Exact rule: match exactly with the provided string. */ + EExact, + /** Range rule: next character must be in the specified range. + + The start of the range is specified by a CBNFNode::KRangeStart() + attribute; the end by a CBNFNode::KRangeEnd() attribute. */ + ERange, + /** Select rule: next character must exist in the selected string. + + If the select string starts with ^, it is a NOT Select. */ + ESelect, + /** And rule: match all of the given sub-rules. + + Sub-rules are defined by the child nodes of the AND rule node. */ + EAnd, + /** Or rule: match one of the given sub-rules. + + Sub-rules are defined by the child nodes of the OR rule node. */ + EOr, + /** NMore rule: match a single subrule N or more times. + + A minimum is specified by a CBNFNode::KNMoreMinimum() attribute; a maximum by + a CBNFNode::KNMoreMaximum() attribute; an exact figure by a CBNFNode::KNMoreCount() attribute. */ + ENMore, + /** Optional rule: match a single sub-rule 0/1 times. + + A sub-rule is defined by the child node of the Optional rule node. */ + EOptional, + /** Without rule: match the first sub-rule but not the second. + + Sub-rules are defined by the child nodes of the Without rule node. */ + EWithout, + /** Reference rule: match the referred to rule. + + The target rule name is identified by a CBNFNode::KReference() attribute. */ + EReference, + /** Indicates final node type. */ + ELastParserNodeType + }; + +// Parser states +// +// When a the state is EActive. +// Setting the parser state to something else in a pre-/post-rule callback function +// causes the parser to exit on next loop in ParseL. If the state is set to EStopped +// we have finished the parser operation (e.g. in event of an error), in state EPaused +// we are likely to resume the parser operation after some external operations. +/** CBNFParser parser states. */ +enum TParseState + { + /** Parser has stopped. */ + EStopped, + /** Rarser is running. */ + EActive, + /** Parser has paused: e.g. waiting for further input to continue. */ + EPaused + }; + + + +class CBNFParser : public CBase, public MDataProviderObserver +/** Base class for parsers that use a BNF tree to parse an input stream. + +The BNF tree form used is a variation on Extended BNF described in the XML1.0 +specification. The general form of the tree is as follows: + +Each node in the tree defines a rule that the input stream must meet to satisfy the grammar. + +1. a node type is set to the rule type, as defined in TParserNodeTypes + +2. node data stores any string required by the rule: e.g. for a comparison rule, the string + to match against + +3. the parser allows callback functions to be called either before or after the rule is processed. + If these are present, they are stored as attributes of the node. + +4. some rules allow sub-rules: for example, the AND rule expects a number of sub-rules, all + of which must be successful if the AND rule itself is to succeed. Each sub-rule is + represented as a child node of the parent rule. Sub-rules in turn can have sub-rules. + +5. reference rule nodes are also allowed: these do not define themselves rules, but direct the + parser to another rule. They can link rules to each other and so build rule sequences more + complex than a simple tree. + +All the top-level rules are stored as attributes of the root node. The attribute type is a string + that names the rule; the attribute value is a pointer to the node that implements the rule. + +The class supplies functions that encapsulate adding rules appropriately to the tree. The parser +provider creates a derived class that implements the virtual method TreeL() that uses these +functions to create a BNF rule tree. + +The user of the parser initialises the parser with ResetL(), and then passes input data to the +parser using ProcessData(). The parser supports partial parsing: the input stream does not have +to completed before parsing can begin. As soon as data is added, the parser attempts to parse it. + + @publishedAll + @released + +*/ + { +protected: + /** Defines a type to handle a stack of rules. */ + typedef CStack CRuleStack; + + /** Type definition for a callback function pointer + Callback functions need to get a reference to the parser as parameter + and they need to be static. */ + typedef void (TRuleCallback)(CBNFParser&); + +public: + // Constructor for a new parser instance + // + // Input: + // aLUT - reference to attribute lookuptable; used to store all the stuff in the parser rule tree + // + //##ModelId=3B6669EA00F8 + IMPORT_C static CBNFParser* NewL(CAttributeLookupTable& aLUT); + + //##ModelId=3B6669EA00F7 + IMPORT_C virtual ~CBNFParser(); + + // Prepare the parser to take in fresh stream of data. + // THIS METHOD MUST BE CALLED BEFORE DATA CAN BE PROCESSED BY THE PARSER!! + // Calls TreeL in order to create the parsing rule tree if no tree already + // exists. + //##ModelId=3B6669EA00EF + IMPORT_C virtual void ResetL(); + + /** Checks if the input stream was completely processed + @return ETrue if all of the data was processed, EFalse if the data didn't match to the parsing rules + */ + //##ModelId=3B6669EA00EE + TBool Valid() const { return iStringComplete && (iString.Length() == 0); } + + /** Concatenates the rest of the input stream (which hasn't yet been processed) + into a single string. The ownership of the string is given to the caller. + @return String containing the remaining data to be parsed. OWNERSHIP PASSED TO CALLED. */ + //##ModelId=3B6669EA00ED + HBufC* StringL() const { return iString.StringL(); } + + /** Gets a pointer to the rule node currently being processed. + @return Rule node */ + //##ModelId=3B6669EA00E3 + CBNFNode* CurrentRule() { return iCurrentRule; } + + // Set reference to an attribute lookup table + //##ModelId=3B6669EA00C5 + void SetAttributeLookupTable(CAttributeLookupTable& aAttributeLookupTable); + + // methods to allow the input stream to be marked so that the callbacks + // can determine those parts which successfully matched + + /** Set a mark to the current position of the input stream. + + The mark acts as a tag in the stream currently being processed. + As we process further along the stream after adding the mark, we can perform + a rollback to the most previously set mark and start processing again (e.g. OR rule + works this way). The string fragments won't be consumed (deleted) until + all the marks on a fragment (and fragments before that) are deleted. */ + //##ModelId=3B6669EA00BC + void Mark() { iString.Mark(); }; // **Mark can leave** + + /** Get string between the "cursor position" and the latest mark on the stream. + + @return Pointer to the string from the previous mark on to the current position + of processed string. OWNERSHIP OF THE STRING GIVEN TO THE CALLER. */ + //##ModelId=3B6669EA00BB + HBufC* MarkedL() { return iString.MarkedL(); }; + + /** Gets the marked string with a string added before the mached string. + @see MarkedL() + @return A string cosisting of aInitialText appended with the marked string. + OWNERSHIP OF THE CONSTRUCTED STRING IS GIVEN TO THE CALLER. */ + //##ModelId=3B6669EA009E + HBufC* MarkedWithInitialTextL(const TDesC& aInitialText) { return iString.MarkedWithInitialTextL(aInitialText); }; + + /** Removes the latest mark. All the marks are stored in a stack and this removes + the topmost mark.*/ + //##ModelId=3B6669EA009D + void DeleteMark() { iString.DeleteMark(); }; + + // methods to determine it the used rule actually matched (typically used in post callbacks) + /** Tests if the used rule matched. + + This is typically used in post-rule callbacks. + + @return True if the used rule matched; otherwise false + */ + //##ModelId=3B6669EA0094 + TBool RuleMatched() const { return iSubRuleMatched; }; + /** Tests if an Optional node sub-rule matched. + + @return True if the sub- rule matched; otherwise false + */ + //##ModelId=3B6669EA0093 + TBool OptionalMatched() const { return iOptionalMatched; }; + + // Create new rule tree root node. + // This method creates a new single instance of CBNFNode, which shall act as the root + // node of the rule tree, which implements the BNF rules for parsing the input stream. + // All the other rules are attached as attributes to this node. + // The root node should have single child node, which should be a reference to the + // "logical root" of the rule tree. This can be done be attaching the logical root + // rule as a component to the root rule. + //##ModelId=3B6669EA0089 + IMPORT_C CBNFNode* NewBNFL(); + + // Add a new rule to a rule tree. + // + // Input: + // aRootRule - Pointer to the root bnf node (created with NewBNFL() ). + // aRuleName - Reference to a string identifying this rule. The string is used + // to make references to this rule from other rule's subtrees. + // aData - Pointer to a data string; used with EExact and ESelect type rules + // to match actual text strings. + // aPreRule - Function pointer to a prerule function that gets called _BEFORE_ + // we start processing this rule and its children (i.e. the rule subtree) + // aPostRule - Function pointer to a postrule function which is called _AFTER_ + // we have processed this rule (i.e. when we return up from the subtree + // and this rule is finished). + // + // Return: + // CBNFNode& - Reference to the newly created rule node in the rule tree + // + //##ModelId=3B6669E90326 + IMPORT_C CBNFNode& NewRuleL(CBNFNode* aRootRule, + const TDesC& aRuleName, + TParserNodeTypes aRuleType, + HBufC* aData, + TRuleCallback* aPreRule, + TRuleCallback* aPostRule); + + // Overridden version of the NewRuleL. Takes reference to the data instead of owning it. + //##ModelId=3B6669E903D1 + IMPORT_C CBNFNode& NewRuleL(CBNFNode* aRootRule, + const TDesC& aRuleName, + TParserNodeTypes aRuleType, + const TDesC& aData, + TRuleCallback* aPreRule, + TRuleCallback* aPostRule); + + // construct a new rule component not attached to a rule. + //##ModelId=3B6669E9018C + IMPORT_C CBNFNode* NewComponentL(TParserNodeTypes aRuleType, const TDesC& aData); + //##ModelId=3B6669E901B4 + IMPORT_C CBNFNode* NewComponentL(TParserNodeTypes aRuleType, HBufC* aData = NULL, TRuleCallback* aPreRule = NULL, TRuleCallback* aPostRule = NULL); + + // create a reference component to the rule of the given name + // which is not attached to any rule. + //##ModelId=3B6669E90204 + IMPORT_C CBNFNode* NewComponentL(CBNFNode* aRootRule, const TDesC& aRuleName); + + // Methods to create a new subrule to the given parent rule. + // These methods can be used to build the subtrees to the "main rules" attached to the root node. + // + // Input: + // aParentRule - The rule for which the new rule shall be added as a child + // aRuleType - Type of the new rule + // aData - Data for the rule; the string to match for an EExact rule, the selection character set for ESelect + // + // aPreRule - Pre rule callback function pointer + // aPostRule - Post rule callback function pointer + // Return: + // CBNFNode& - reference to the new rule + // + //##ModelId=3B6669E9022C + IMPORT_C CBNFNode& NewComponentL(CBNFNode &aParentRule, TParserNodeTypes aRuleType, const TDesC& aData); + //##ModelId=3B6669E90268 + IMPORT_C CBNFNode& NewComponentL(CBNFNode &aParentRule, TParserNodeTypes aRuleType, HBufC* aData = NULL, TRuleCallback* aPreRule = NULL, TRuleCallback* aPostRule = NULL); + + // Create a reference to another rule and attach this reference as a child of the given parent. + // Creates a child node of type EReference for the parent. This reference node + // hold the pointer to the rule we are refering to. + // Using references we can link rules to each other and build complex rule trees + // even though they don't physically form a complete tree. + // Notice, that the rule we are refering to does not necessarily need to exist, yet! + // + // Input: + // aRootRule - The Root node to the rule tree (created with NewBNFL). This is needed to + // find the rule we are refering to with the string. + // aParentRule - The parent rule of the newly created reference + // aRuleName - The "id string" of the rule we are refering to. + //##ModelId=3B6669E902CC + IMPORT_C CBNFNode& NewComponentL(CBNFNode* aRootRule, CBNFNode &aParentRule, const TDesC& aRuleName); + + // add additional attributes to components of rules (i.e. range values) + //##ModelId=3B6669E900F6 + IMPORT_C void AddComponentAttributeL(CBNFNode& aRule, CBNFNodeAttributeType aAttribute, TInt aInt); + + // re-implementations of MDataProviderObserver methods + //##ModelId=3B6669E900D8 + IMPORT_C virtual void ProcessDataL(HBufC8& aData); + //##ModelId=3B6669E900AF + IMPORT_C virtual void SetStatus(TInt aStatus = KErrNone); + //##ModelId=3B6669E90069 + IMPORT_C virtual void SetDocumentTypeL(const TDesC&); + //##ModelId=3B6669E90087 + IMPORT_C virtual void SetDocumentTypeL(const TDesC&, const TDesC&); + //##ModelId=3B6669E90055 + IMPORT_C virtual void SetDataExpected(TInt); + //##ModelId=3B6669E90041 + IMPORT_C virtual void SetBaseUriL(const TDesC* aBaseUri); + //##ModelId=3B6669E90038 + IMPORT_C virtual void MDataProviderObserverReserved1(); + //##ModelId=3B6669E90037 + IMPORT_C virtual void MDataProviderObserverReserved2(); + + // Tell the parser, that we all the data has been passed in. + // This method attempts to parse what ever is left of the input stream if it wasn't + // already finished. + //##ModelId=3B6669E9002E + IMPORT_C void CommitL(); + + /** Get the current state of the parser. + @return Parser state */ + //##ModelId=3B6669E9002D + TParseState State() const {return(iParsing);}; + +protected: + IMPORT_C CBNFParser(CAttributeLookupTable& aLUT); + + // Each of the following functions is a handler method for a specific type of a rule + // node. For example, ReferenceL handles reference nodes etc. + // These methods are called by PerformRuleL. + // + // Input: + // aRule - reference to the rule being processed + // aMatched - reference to a CFragmentedString::TStringMatch variable, which holds + // the information if the string or character we previously were trying to + // match actually matched. + // Return: + // TBool - We return ETrue if we have completed processing this node. If the processing + // still continues we return EFalse. For example, an EAnd rule would return + // ETrue if all of its chidren had matched or if a rule didn't match. In the first + // case the EAnd rule would have turned out to be true (aMatched = EMatched) since + // all of its children were true, but in the latter case we can stop processing the + // EAnd rule, since a subrule to the And didn't match and this means that the And + // expression can not be true. Either way, the processing of the And ends and we + // may return ETrue; + // + //##ModelId=3B6669E90005 + IMPORT_C virtual TBool ReferenceL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E803BB + IMPORT_C virtual TBool ExactL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E80389 + IMPORT_C virtual TBool RangeL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E80343 + IMPORT_C virtual TBool SelectL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E80311 + IMPORT_C virtual TBool WithoutL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E802D5 + IMPORT_C virtual TBool AndL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E80299 + IMPORT_C virtual TBool OrL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E80271 + IMPORT_C virtual TBool OptionalL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + //##ModelId=3B6669E8023F + IMPORT_C virtual TBool NMoreL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + + // A method to add a callback to a rule + // + // Input: + // aRule - The rule to which the callback is to be added + // aCallbackID - Either CBNFNode::KPreRuleCallback() or CBNFNode::KPostRuleCallback() + // Defines the type of the callback function (i.e. is it to be called before + // or after the rule has been processed). + // aCallback - The callback function pointer + // + //##ModelId=3B6669E80203 + IMPORT_C virtual void AddRuleCallbackL(CBNFNode& aRule, const TDesC* aCallbackID, TRuleCallback* aCallback); + //##ModelId=3B6669E801EF + IMPORT_C virtual void ExecutePreRuleCallbackL(CBNFNode& aRule); + //##ModelId=3B6669E801D1 + IMPORT_C virtual void ExecutePostRuleCallbackL(CBNFNode& aRule); + + // the method TreeL() should be reimplemented to generate a BNF rule tree and return + // ownership of it. This is the rule tree which will be to parse the input stream. + // See XmlPars.cpp or DTDMDL.cpp for example. + //##ModelId=3B6669E801D0 + IMPORT_C virtual CBNFNode* TreeL(); + + // methods which are invoked when the parser encounters a conditional + // point in the BNF grammar (i.e. And/Or) + //##ModelId=3B6669E801B2 + IMPORT_C virtual void StartConditional(TParserNodeTypes aRuleType); + //##ModelId=3B6669E80180 + IMPORT_C virtual void EndConditional(TParserNodeTypes aRuleType, TBool aSuccess); + + // A callback function to insert a mark to the current position of the stream + // being processed. Adding mark is a very common callback operation befor starting + // to process a rule, hence the method is provided by the parser. + //##ModelId=3B6669E8016C + IMPORT_C static void MarkCallback(CBNFParser& aParser); + + // returns the LUT used by this parser. + //##ModelId=3B6669E80163 + IMPORT_C CAttributeLookupTable& AttributeLUT() const; + + // method which does the actual iterative parsing + //##ModelId=3B6669E80162 + IMPORT_C TBool ParseL(); + + // A rule to handle a node in the rule tree. This method just calls the appropriate + // handler method according to the rule type. + //##ModelId=3B6669E8013A + IMPORT_C virtual TBool PerformRuleL(CBNFNode& aRule, CFragmentedString::TStringMatch& aMatched); + + //##ModelId=3B6669E8011C + /** Sets the parser state. + + @param aState Parser state + */ + void SetState(TParseState aState) {iParsing=aState;}; + +protected: + /** Storage object for all the attributes and identifiers in a tree */ + //##ModelId=3B6669E80108 + CAttributeLookupTable& iLUT; + + /** An utility object which stores all the buffers passed into the parser + and represents them as if they would form a single, continuous string. + This class also performs the actual physical matching/selection of the strings + and holds the marks set onto the string.*/ + //##ModelId=3B6669E800EA + CFragmentedString iString; + /** Flag indicating if the input stream has been completely processed. */ + //##ModelId=3B6669E800D6 + TBool iStringComplete; // more input stream has completed + + /** The BNF tree the parser is using to parse the input stream.*/ + //##ModelId=3B6669E800C2 + CBNFNode* iTree; // the BNF tree we are using to parse the input stream + + /** A stack of rules from iTree which are waiting to be completed. + The stack basically holds the path along the rule tree. */ + //##ModelId=3B6669E800AE + CRuleStack iRuleStack; + /** The BNF rule that is currently being processed. */ + //##ModelId=3B6669E80090 + CBNFNode* iCurrentRule; // the BNF rule we are currently using + + // when returning to a rule in the rulestack this indicates + // if the child rule matched correctly + /** Flag that indicates when returning to a rule in the rulestack if the child rule matched correctly. */ + //##ModelId=3B6669E8007C + TBool iSubRuleMatched; + /** Flag that indicates when returning to a rule in the rulestack if an optional rule matched correctly. */ + //##ModelId=3B6669E8006A + TBool iOptionalMatched; + + /** The child rule we are returning from (if any). + If this is NULL we are new to this BNF rule.*/ + //##ModelId=3B6669E80054 + CBNFNode* iSubRule; + + /** Parser state. */ + //##ModelId=3B6669E8004A + TParseState iParsing; + /** Input stream matched rule flag. */ + //##ModelId=3B6669E80038 + CFragmentedString::TStringMatch iMatched; + + // Storage pointers for strings identifying certain attributes on the rule nodes + /** Stores attribute identifier for reference string attributes. */ + //##ModelId=3B6669E8002C + const TDesC* iReferenceString; + /** Stores attribute identifier for range start attributes. */ + //##ModelId=3B6669E8001A + const TDesC* iRangeStart; + /** Stores attribute identifier for range end attributes. */ + //##ModelId=3B6669E80010 + const TDesC* iRangeEnd; + /** Stores attribute identifier for nmore minimum attributes. */ + //##ModelId=3B6669E80006 + const TDesC* iMoreMinimum; + /** Stores attribute identifier for nmore count attributes. */ + //##ModelId=3B6669E703DA + const TDesC* iMoreCount; + /** Stores attribute identifier for nmore maximum attributes. */ + //##ModelId=3B6669E703D0 + const TDesC* iMoreMaximum; + /** Stores attribute identifier for pre-rule callback attributes. */ + //##ModelId=3B6669E703C6 + const TDesC* iPreRuleCallback; + /** Stores attribute identifier for post-rule callback attributes. */ + //##ModelId=3B6669E703BC + const TDesC* iPostRuleCallback; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cdtdmodel.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cdtdmodel.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,237 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// contains the parser specialisation (BNF grammar) for a DTD parser. +// See CBNFParser for function details +// +// + +#ifndef __CDTDMODEL_H__ +#define __CDTDMODEL_H__ + +#include +#include +#include + +//##ModelId=3B666BCB001C + + + +class CDTDModel : public CBNFParser +/** Creates a tree that represents a specified DTD. + +To use it: + +1. call the base class function ProcessDataL() with the filename of the DTD, and call CommitL() + +2. call GeneratedTree() to get the tree + + @publishedAll + @released +*/ + { +public: + class CDTDElementAttribute : public CBase + /** Represents an attribute of a DTD element. */ + { + public: + /** DTD element attribute value types. */ + enum KValueType + { + /** Attribute supplies a default. */ + EDefault, + /** Attribute is #REQUIRED. */ + ERequired, + /** Attribute is #IMPLIED. */ + EImplied, + /** Attribute is #FIXED. */ + EFixed, + /** Attribute is a reference. */ + EReference + }; + + public: + /** Destructor. + */ + virtual ~CDTDElementAttribute() + { + delete iType; + delete iValue; + } + + public: + /** Node that specifies the attribute type. */ + CBNFNode* iType; + /** Node that specifies the attribute value. */ + CBNFNode* iValue; + /** Attribute value type. */ + KValueType iValueType; + }; + + + enum TRuleMarks + { + ERuleStartMark = 1, + EConditionalMark, + EGroupMark + }; + + //##ModelId=3B666BCB0321 + IMPORT_C static CDTDModel* NewL(CAttributeLookupTable& aLUT); + //##ModelId=3B666BCB0320 + IMPORT_C virtual ~CDTDModel(); + + // This method MUST be invoked before data can be processed by the parser. + //##ModelId=3B666BCB031F + IMPORT_C virtual void ResetL(); + + //##ModelId=3B666BCB0315 + IMPORT_C CBNFNode* GeneratedTree(); + + // Building method for a hard coded WML1.1 DTD tree + // Input: + // aPackageRoot - A root node to which the generated tree is attached + // + //##ModelId=3B666BCB030B + IMPORT_C void BuildWml11DTDL(CBNFNode& aPackageRootNode); + +protected: + IMPORT_C CDTDModel(CAttributeLookupTable& aLUT); + + // construct our BNF rule tree + //##ModelId=3B666BCB0302 + IMPORT_C virtual CBNFNode* TreeL(); + + // to control our internal state on conditional rules. + //##ModelId=3B666BCB02F7 + IMPORT_C virtual void StartConditional(TParserNodeTypes aRuleType); + //##ModelId=3B666BCB02E3 + IMPORT_C virtual void EndConditional(TParserNodeTypes aRuleType, TBool aSuccess); + + // rule callbacks to build the DTD Tree + //##ModelId=3B666BCB02D9 + static void PreRulesL(CBNFParser& aParser); + //##ModelId=3B666BCB02CF + static void PostRulesL(CBNFParser& aParser); + //##ModelId=3B666BCB02C5 + static void PreElementDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB02B1 + static void PostElementDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB02A7 + static void PreEntityDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB0294 + static void PostEntityDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB0289 + static void PreAttlistLineL(CBNFParser& aParser); + //##ModelId=3B666BCB027F + static void PostAttlistLineL(CBNFParser& aParser); + //##ModelId=3B666BCB0275 + static void PostAttlistReferenceL(CBNFParser& aParser); + //##ModelId=3B666BCB026B + static void PreAttValueL(CBNFParser& aParser); + //##ModelId=3B666BCB0261 + static void PostAttValueL(CBNFParser& aParser); + //##ModelId=3B666BCB024E + static void PostRequiredL(CBNFParser& aParser); + //##ModelId=3B666BCB0243 + static void PostFixedL(CBNFParser& aParser); + //##ModelId=3B666BCB0239 + static void PostImpliedL(CBNFParser& aParser); + //##ModelId=3B666BCB022F + static void PostAndL(CBNFParser& aParser); + //##ModelId=3B666BCB0225 + static void PostOrL(CBNFParser& aParser); + //##ModelId=3B666BCB021B + static void PreGroupL(CBNFParser& aParser); + //##ModelId=3B666BCB0208 + static void PostGroupL(CBNFParser& aParser); + //##ModelId=3B666BCB01FD + static void PostMatch0PlusL(CBNFParser& aParser); + //##ModelId=3B666BCB01F3 + static void PostMatch1PlusL(CBNFParser& aParser); + //##ModelId=3B666BCB01E9 + static void PostOptionalL(CBNFParser& aParser); + //##ModelId=3B666BCB01DF + static void PostIdentifierL(CBNFParser& aParser); + //##ModelId=3B666BCB01CC + static void PostEntityDeclNameL(CBNFParser& aParser); + //##ModelId=3B666BCB01C1 + static void PostElementDeclNameL(CBNFParser& aParser); + //##ModelId=3B666BCB01B7 + static void PostAttlistDeclNameL(CBNFParser& aParser); + //##ModelId=3B666BCB01AD + static void PostAttfieldNameL(CBNFParser& aParser); + //##ModelId=3B666BCB01A3 + static void PostReferenceNameL(CBNFParser& aParser); + //##ModelId=3B666BCB0199 + static void PostStringL(CBNFParser& aParser); + //##ModelId=3B666BCB0186 + static void PostValidHexCharL(CBNFParser& aParser); + //##ModelId=3B666BCB017B + static void PostValidDecCharL(CBNFParser& aParser); + //##ModelId=3B666BCB0171 + static void PrePEDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB0167 + static void PostPEDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB015D + static void PostGEDeclL(CBNFParser& aParser); + //##ModelId=3B666BCB0153 + static void PreGEContentL(CBNFParser& aParser); + //##ModelId=3B666BCB0149 + static void PostGEContentL(CBNFParser& aParser); + + // utility functions + //##ModelId=3B666BCB0135 + static void PostValidCharL(CBNFParser& aParser, TRadix aRadix); + //##ModelId=3B666BCB0117 + static void PostRuleL(CBNFParser& aParser, TParserNodeTypes aType, const TDesC* aAttribute); + + //##ModelId=3B666BCB0104 + void CharRefReplacement(TPtr& aString); + + //##ModelId=3B666BCB0103 + void DoClear(); + + // Help methods for the hardcoded WML 1.1 tree + //##ModelId=3B666BCB00DB + void AddNewAttributeL(CBNFNode& aNode, const TDesC* aAttributeId, const TDesC& aAttributeType, CDTDElementAttribute::KValueType aAttributeValueType, CBNFNode* aRootNode); + //##ModelId=3B666BCB00BD + void AddNewReferenceAttributeL(CBNFNode& aNode, const TDesC& aAttributeType, CBNFNode* aRootNode); + //##ModelId=3B666BCB0095 + void AddNewAttributeWithValueL(CBNFNode& aNode, const TDesC* aAttributeId, const TDesC& aAttributeType, const TDesC& aAttributeDefaultValue, CBNFNode* aRootNode); + + +protected: + typedef CRuleMarkedStack COwnerRuleMarkedStack; + +protected: + //##ModelId=3B666BCB008B + TBool iInPEDecl; + //##ModelId=3B666BCB0078 + TBool iCharRefCheck; + //##ModelId=3B666BCB006E + HBufC* iGEContent; + + //##ModelId=3B666BCB0064 + HBufC* iNewAttfieldName; + //##ModelId=3B666BCB005A + CDTDElementAttribute* iNewElementAttribute; + //##ModelId=3B666BCB0046 + CBNFNode* iNewRule; + //##ModelId=3B666BCB003C + CBNFNode* iNewTree; + //##ModelId=3B666BCB0030 + COwnerRuleMarkedStack iNewRuleStack; + }; + +#endif // __CDTDMODEL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cfragmentedstring.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cfragmentedstring.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,178 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A string class implementation which allows quick addition of partial strings +// (no copying) by using an internal array of fragmented strings. +// The class allows comprehensive character based matching functionality +// along with infinite depth marking. +// +// + +#ifndef __CFRAGMENTEDSTRING_H__ +#define __CFRAGMENTEDSTRING_H__ + +// includes +#include +#include + + +// +// CFragmentedString + +//##ModelId=3B666BC6034A + + + +class CFragmentedString : protected CArrayPtrFlat +/** +Utility that allows a single string to be built from an array of consecutive sub-strings. + +The sub-strings can be inserted by reference or copied. + +The object maintains information that points to a current position within the string. A typical +use is to test the contents of the string using one of the Match...() functions, and then use +ConsumeMatched() to advance past the matched area. + +The class also supports inserting an unlimited number of marks in the string, and performing +operations relative to the head (i.e. last inserted) mark. + @publishedAll + @released +*/ + { +protected: + class TStringMark + /** A mark at a string position. */ + { + public: + /** Constructor. + + @param aIndex Array index of the marked sub-string + @param aCharacter Character position within the sub-string for the mark + */ + TStringMark(TInt aIndex, TInt aCharacter) + : iMarkIndex(aIndex), iMarkCharacter(aCharacter) + { + } + + public: + /** Array index of the marked sub-string. */ + TInt iMarkIndex; + /** Character position within the sub-string for the mark. */ + TInt iMarkCharacter; + }; + /** A stack of string position marks. */ + typedef CStack CMarkStack; + +public: + /** Defines possible results of a string matching operation for this class. */ + enum TStringMatch + { + /** There was no match. */ + ENoMatch, + /** There was a complete match. */ + EMatch, + /** String contained insufficient data to perform the match operation. + + This can mean that the start of the target string was matched, but the string + being searched ended before a complete match was found. */ + EInsufficientData + }; + +public: + IMPORT_C CFragmentedString(); + //##ModelId=3B666BC700AD + IMPORT_C ~CFragmentedString(); + + //##ModelId=3B666BC70099 + IMPORT_C void AddStringL(HBufC* aString); // this version is more efficient + //##ModelId=3B666BC700A3 + IMPORT_C void AddStringL(const TDesC& aString); + + //##ModelId=3B666BC70090 + IMPORT_C TInt Length() const; + //##ModelId=3B666BC70071 + IMPORT_C HBufC* StringL() const; + //##ModelId=3B666BC70068 + IMPORT_C HBufC* ContentL() const; + //##ModelId=3B666BC70067 + IMPORT_C void Reset(); + + //##ModelId=3B666BC7005D + IMPORT_C TStringMatch Match(const TDesC& aString); + //##ModelId=3B666BC70049 + IMPORT_C TStringMatch MatchRange(const TUint aLower, const TUint aUpper); + //##ModelId=3B666BC7003F + IMPORT_C TStringMatch MatchSelect(const TDesC& aSelection); + //##ModelId=3B666BC70037 + IMPORT_C TStringMatch MatchNotSelect(const TDesC& aSelection); + //##ModelId=3B666BC70036 + IMPORT_C void ConsumeMatched(); + + //##ModelId=3B666BC70035 + IMPORT_C HBufC* MarkedL(); + //##ModelId=3B666BC7002B + IMPORT_C HBufC* MarkedWithInitialTextL(const TDesC& aInitialText); + //##ModelId=3B666BC70022 + IMPORT_C void Mark(); // Mark can leave + //##ModelId=3B666BC70021 + IMPORT_C void DeleteMark(); + //##ModelId=3B666BC70018 + IMPORT_C void ResetToMark(); + + //##ModelId=3B666BC7000E + IMPORT_C void ReplaceMarkedL(HBufC* aString); + //##ModelId=3B666BC70005 + IMPORT_C void ReplaceMarkedAndSkipL(HBufC* aString); + //##ModelId=3B666BC70003 + IMPORT_C void InsertStringL(HBufC* aString); + +protected: + //##ModelId=3B666BC603E1 + IMPORT_C void DeleteToMark(const TStringMark& aStringMark); + //##ModelId=3B666BC603C4 + IMPORT_C void InsertStringToL(HBufC* aString, TInt aStringIndex, TInt aLengthIntoString); + //##ModelId=3B666BC70072 + HBufC* StringL(TInt aStartIndex, TInt aStartCharacter, TInt aEndIndex, TInt aEndCharacter, const TDesC* aInitialText=NULL) const; + //##ModelId=3B666BC603C3 + void StartMatch(); + //##ModelId=3B666BC603B8 + CFragmentedString::TStringMatch DoMatchSelect(const TDesC& aSelection, TBool aInSelection); + //##ModelId=3B666BC603AE + TBool FindNextMatchChar(TUint& aChar); + +protected: + //##ModelId=3B666BC603A4 + /** Result of the last match operation. */ + TStringMatch iMatched; + + /** Array index of the sub-string found in the last match operation. */ + //##ModelId=3B666BC6039A + TInt iMatchedToIndex; + /** Current character position within the iMatchedToIndex sub-string found in the last match operation. */ + //##ModelId=3B666BC60390 + TInt iMatchedToCharacter; + /** Array index of the current sub-string. */ + //##ModelId=3B666BC60386 + TInt iCurrentIndex; + /** Current character position within the current sub-string. */ + //##ModelId=3B666BC6037C + TInt iCurrentCharacter; + /** Stack of marks in the string. + + Mark() pushes a mark on the stack; DeleteMark() pops one off. + */ + //##ModelId=3B666BC60372 + CMarkStack iMarkStack; + }; + +#endif // __CFRAGMENTEDSTRING_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/chttpformencoder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/chttpformencoder.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,100 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CHTTPFormEncoder.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CHTTPFORMENCODER__ +#define __CHTTPFORMENCODER__ + +// System includes +#include + +//##ModelId=3C4C187902EB +class CHTTPFormEncoder : public CBase, public MHTTPDataSupplier +/** +A data supplier class that is used to build up data that is to be encoded to application/x-www-form-urlencoded. + +A client will create an instance of this class and add name/value pairs. They then use this as the data supplier for the +body of an http request that is a forms submission. + +The name and value must both be supplied in the correct character encoding that you want to send to the server. This then +gets url encoded. +@publishedAll +@released +*/ + { +public: + //##ModelId=3C4C18790347 + IMPORT_C static CHTTPFormEncoder* NewL(); + //##ModelId=3C4C18790346 + IMPORT_C ~CHTTPFormEncoder(); + + // from MHTTPDataSupplier + //##ModelId=3C4C1879033D + virtual TBool GetNextDataPart(TPtrC8& aDataPart); + //##ModelId=3C4C1879033C + virtual void ReleaseData(); + //##ModelId=3C4C1879033B + virtual TInt OverallDataSize(); + // + //##ModelId=3C4C18790335 + virtual TInt Reset(); + + /** Adds a field to the data. + A field consists a name and value pair + @param aFieldName A name. This must not be empty + @param aFieldValue A value. This may be an empty descriptor + @leave KErrNoMemory There was not enough memory + @leave KErrArgument aFieldName was empty + @panic Will panic if called after the first data has been supplied or OverallDataSize has been called + */ + //##ModelId=3C4C18790332 + IMPORT_C void AddFieldL(const TDesC8& aFieldName, const TDesC8& aFieldValue); + + +private: + //##ModelId=3C4C18790331 + CHTTPFormEncoder(); + //##ModelId=3C4C1879032A + void ConstructL(); + + //##ModelId=3C4C18790328 + TBool IsAlphaNumeric(TUint8 aChar); + //##ModelId=3C4C1879031F + void AppendSpecialChar(TUint8 aChar); + //##ModelId=3C4C1879031D + void AppendData(const TDesC8& aData); + +private: + enum THTTPFormEncoderState + { + EAllowAppendData, // when first constructed + ESuppliedSize, + ESupplyingData, // GetDataChunk has been called but ReleaseData has not + EDataReleased + }; + + //##ModelId=3C4C18790315 + THTTPFormEncoderState iState; + //##ModelId=3C4C1879030D + HBufC8* iData; // data is ALWAYS kept in the form-url-encoded format + }; + +#endif // __CHTTPFORMENCODER__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/chttpresponse.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/chttpresponse.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,363 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Purpose: This file provides the definition of the CHTTPResponse class. +// The HTTP Response class encodes HTTP response headers only. It +// contains the methods used to transcode from WSP->HTTP fields +// +// + +#ifndef __CHTTPRESPONSE_H__ +#define __CHTTPRESPONSE_H__ + +// System includes +// +#include +#include +#include +#include + + +// Forward class declarations +// +class CPushMessage; + +// Class definition for CHTTPResponse +// +//##ModelId=3B712B9A0231 +class CHTTPResponse : public CBase +/** +@publishedAll +@deprecated +*/ + { +public: // Methods + + // Factory method to construct this class. + // + // Rtn: a new CHTTPResponse object, by ptr. Ownership is transferred to the + // caller. + // + //##ModelId=3B712B9B000A + IMPORT_C static CHTTPResponse* NewL(); + + // Destructor for this class. Removes this object and releases memory held + // by it + // + //##ModelId=3B712B9B0000 + IMPORT_C virtual ~CHTTPResponse(); + + // Clean out the fields buffer + // + //##ModelId=3B712B9A03D6 + IMPORT_C void Reset(); + + // Set the fields buffer with the response received from the WAP Stack + // + // In: + // aResponse - an 8-bit descriptor field containing the origin server's + // WSP-encoded response header. Ownership is transferred to + // this class. + // + //##ModelId=3B712B9A03D4 + IMPORT_C void AddResponse(HBufC8* aResponse); + + // Accessor to the HTTP response fields buffer + // + // Rtn: a reference to the response. Ownership is _NOT_ transferred + // + // NOTE THIS SHOULD RETURN CONST - BUT CAN'T BE CHANGED SINCE IT WOULD + // BREAK BC. + //##ModelId=3B712B9A03CA + IMPORT_C HBufC8& Response() const; + + // Accessor to the HTTP status code (e.g. 400, 300, 200, 500) + // + // Rtn: the status code - series number only. + // + //##ModelId=3B712B9A03C1 + IMPORT_C THttpStatusCode StatusCode() const; + + // Accessor to the HTTP detailed status code (e.g. 404, 304, 200, 501) + // + // Rtn: the status code - series and specific code value + // + //##ModelId=3B712B9A03C0 + IMPORT_C THttpStatusCode DetailedStatusCode() const; + + // Accessor to set the HTTP response status. + // + // In: + // aCode - the WSP-encoded status code + // + //##ModelId=3B712B9A03B6 + IMPORT_C void SetStatusCode(TInt aCode); + + // Method to find a named field, that returns null terminated + // WSP text strings. + // + // In: + // aField - the field type + // aStartIndex - the index to search from (defaults to the buffer start) + // + // Out: + // aDesc - a pointer-type descriptor into the response buffer at the + // position where the field was located. The caller must NOT + // modify the descriptor contents + // + // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise + // + //##ModelId=3B712B9A0390 + IMPORT_C TBool FindField(THttpHeaderField aField + , TPtrC8& aDesc + , TInt aStartIndex = 0) const; + + // Method to find a named field, that returns 8-bit octet data (binary + // or strings - not stipulated which). + // + // In: + // aField - the field type + // aStartIndex - the index to search from (defaults to the buffer start) + // + // Out: + // aDesc - a pointer-type descriptor into the response buffer at the + // position where the field was located. The caller must NOT + // modify the descriptor contents + // + // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise + // + //##ModelId=3B712B9A0384 + IMPORT_C TBool FindBinaryDescField(THttpHeaderField aField + , TPtrC8& aDesc + , TInt aStartIndex = 0) const; + + // Method to find a named field, that returns an EPOC date/time structure. + // + // In: + // aField - the field type + // aStartIndex - the index to search from (defaults to the buffer start) + // + // Out: + // aTime - a structure containing the time (and date) found in the header + // + // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise + // + //##ModelId=3B712B9A03A2 + IMPORT_C TBool FindField(THttpHeaderField aField + , TTime& aTime + , TInt aStartIndex = 0) const; + + // Method to find a named field within the Cache Control header + // + // In: + // aField - the field type + // + // Out: + // + // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise + // + //##ModelId=3B712B9A0370 + IMPORT_C TInt FindCacheControlFieldValue(TCacheControlFieldValue aField) const; + + // Method to find a named field within the Cache Control header, + // that returns an EPOC date/time structure. + // + // In: + // aField - the field type + // + // Out: + // aTime - a structure containing the time (and date) found in the header field + // + // Rtn: TBool - set to ETrue if the field was found, EFalse otherwise + // + //##ModelId=3B712B9A035C + IMPORT_C TBool ExtractCacheControlTime(TCacheControlFieldValue aField, TTime& aTime) const; + + // Method to search for the content type encoded in the response header + // + // Out: + // aDesc - a pointer-type descriptor into the appropriate element of an + // array prefilled with all the content types that have WSP + // encodings. e.g. "text/vnd.wap.wml". The contents of the + // descriptor must NOT be modified. + // + //##ModelId=3B712B9A0348 + IMPORT_C void ContentType(TPtrC8& aDesc) const; + + // Method to search for the realm encoded in the response header, when the + // response challenges the client for HTTP authentication (code 401) + // + // Out: + // aDesc - a pointer-type descriptor into the response header buffer + // positioned at the realm string within the challenge. The + // contents of the descriptor must NOT be modified. + // + // Rtn: TBool - set to ETrue if a www-authenticate realm was found, EFalse + // otherwise + // + //##ModelId=3B712B9A033F + IMPORT_C TBool FindRealm(TPtrC8& aRealm) const; + + // Method to search for the character set encoded in the Content-Type + // field ofthe response header + // + // Out: + // aDesc - a pointer-type descriptor into the appropriate element of an + // array prefilled with all the character sets that have WSP + // encodings. e.g. "utf-8". The contents of the descriptor must + // NOT be modified. + // + // Rtn: TBool - set to ETrue if a character set was found, EFalse if not + // + //##ModelId=3B712B9A032A + IMPORT_C TBool CharSet(TPtrC8& aDesc) const; + +protected: // Methods + + // Normal constructor - do non-allocating creation of this class + // + IMPORT_C CHTTPResponse(); + + // Second phase construction - any allocation for this class must take place + // here. Sets up the resources required by an HTTP Response. + // + //##ModelId=3B712B9A0322 + IMPORT_C void ConstructL(); + + //friend class declaration - only need the following function + friend class CPushMessage; + // Method to locate a named field in the response header, starting at the + // specified index position. + // + // In: + // aField - the header field type + // aStartIndex - the (optional) position in the header to start searching + // + // Rtn: TInt - the index position of the required field _value_ (not the + // field name), or KErrNotFound otherwise. + // + //##ModelId=3B712B9A030D + IMPORT_C TInt LocateField(THttpHeaderField aField, TInt aStartIndex = 0) const; + + // Perform a look-up of content type given a WSP encoding value, used as + // an index. + // + // In: + // aIndex - the WSP encoding value + // + // Rtn: const TText8* - the required content type text - NOT to be changed + // + //##ModelId=3B712B9A0352 + IMPORT_C const TText8* ContentType(TInt aContentTypeCode) const; + + // Perform a look-up of character set given a WSP encoding value, used as + // an index. + // + // In: + // aCharsetCode - the index into the content types table/ + // + // Rtn: const TText8* - the required 8-bit character set text - NOT to be + // changed by the caller + // + //##ModelId=3B712B9A0334 + IMPORT_C const TText8* CharSet(TInt aCharsetCode) const; + +private: // Attributes + + // The 8-bit buffer used to store the HTTP response fields + // + //##ModelId=3B712B9A02AA + HBufC8* iResponse; + + // The HTTP Status code (coarse - ie. series only, e.g. 100, 200 etc.) + // + //##ModelId=3B712B9A0296 + THttpStatusCode iStatusCode; + + // The detailed HTTP Status code (within series, e.g. 102, 204, 401 etc.) + // + //##ModelId=3B712B9A0282 + THttpStatusCode iDetailedStatusCode; + + // Declare the CLogClient pointer + __DECLARE_LOG + +private: // Methods + + // Do a conversion from 32-bit UIntVar encoding into 32-bit integer + // + TInt ParseUIntVar(const TDesC8& aBuffer, TInt& aVal) const; + + // Extract a WSP encoded MultiOctet Integer encoding into 32-bit integer + // + // In: + // aSource - the source Multi-Octet integer + // + // Out: + // aInt - the 32-bit resulting integer + // + //##ModelId=3B712B9A02F8 + void ExtractMultiOctetInteger(TInt& aInt, const TPtrC8& aSource) const; + + // Method to find a named field within the Cache Control header + // + // In: + // aSource - the descriptor containing the date value + // aFrom - The position in the descriptor to start from + // + // Out: + // aTime - a structure containing the time (and date) found in the descriptor + // + //##ModelId=3B712B9A02E4 + void ExtractFieldDateValue(const TPtrC8& aSource, TInt aFrom, TTime& aTime) const; + + // Method to find a named field within the Cache Control header + // + // In: + // aField - the field type + // + // Out: + // the found aCacheControl string + // + // Rtn: TInt - set to KErrNotFound if the field was not found, + // otherwise the position in the cache control descriptor that the field was found + // + //##ModelId=3B712B9A0372 + TInt FindCacheControlFieldValue(TCacheControlFieldValue aField,TPtrC8& aCacheControl) const; + + //##ModelId=3B712B9A02DA + void Panic(THttpPanicCode aPanicCode) const; + + // Spare methods for future BC. Const- and non-const versions to assist + // the caller in preserving const-ness. IMPORT_C ensures they reserve a + // slot in the vtbl, which is essential to preseve future BC. + // + //##ModelId=3B712B9A02D0 + IMPORT_C virtual TAny* Extend_CHTTPResponse(TAny* aArgs); + //##ModelId=3B712B9A02C6 + IMPORT_C virtual TAny* Extend_CHTTPResponse_const(TAny* aArgs) const; + +#if defined _DEBUG + // Debug method definition to allow class invariant testing + // Called by the standard macro __TEST_INVARIANT + // + //##ModelId=3B712B9A02BD + void __DbgTestInvariant() const; + + //##ModelId=3B712B9A02B2 + void DumpToLog(const TDesC8& aData) const; +#endif + + }; + +#endif // __CHTTPRESPONSE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/clock.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/clock.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,389 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__CLOCK_H__) +#define __CLOCK_H__ + +#if !defined(__E32STD_H__) +#include +#endif + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__W32STD_H__) +#include +#endif + +// +// miscellaneous typedefs +// +/** @internalComponent */ +typedef TBuf8<1024> TConstructorBuf8; // implementation class + +// +// miscellaneous enums +// + +/** @internalComponent */ +enum TDisplayType // implementation class + { + EDisplayDigital, + EDisplayAnalog + }; + +/** @internalComponent */ +enum TAnalogDisplayHandFeatureType // implementation class + { + EAnalogDisplayHandFeatureLine, + EAnalogDisplayHandFeaturePolyLine, + EAnalogDisplayHandFeatureCircle + }; + +/** Horizontal alignment options for text in a digital clock's display. + +@see TDigitalDisplayTextSection +@publishedAll +@released */ +enum TDigitalDisplayHorizontalTextAlignment + { + /** Left align text. */ + EDigitalDisplayHorizontalTextAlignmentLeft, + /** Centre align text. */ + EDigitalDisplayHorizontalTextAlignmentCenter, + /** Right align text. */ + EDigitalDisplayHorizontalTextAlignmentRight + }; + +/** Vertical alignment options for text in a digital clock's display. + +@see TDigitalDisplayTextSection +@publishedAll +@released */ +enum TDigitalDisplayVerticalTextAlignment + { + /** Top align text. */ + EDigitalDisplayVerticalTextAlignmentTop, + /** Centre align text, including the character descent. */ + EDigitalDisplayVerticalTextAlignmentCenterInclDescent, + /** Centre align text, excluding the character descent. */ + EDigitalDisplayVerticalTextAlignmentCenterExclDescent, + /** Bottom align text, including the character descent. */ + EDigitalDisplayVerticalTextAlignmentBottomInclDescent, + /** Bottom align text, excluding the character descent. */ + EDigitalDisplayVerticalTextAlignmentBottomExclDescent + }; + +/** Special characters that can be used in a digital clock display. + +@see TDigitalDisplayTextSection +@publishedAll +@released */ +enum TDigitalDisplayLayoutChar + { + /** A flashing block to delimit different sections of the display. + */ + /** A flashing block to delimit different sections of the display. */ + EDigitalDisplayLayoutCharFlashingBlockDelimiter=1 + }; + +// +/** Different types of hand for an analogue clock. + +@publishedAll +@released */ +enum TAnalogDisplayHandType + { + /** A hand that performs one revolution every 12 hours. */ + EAnalogDisplayHandOneRevPer12Hours, + /** A hand that performs one revolution every hour. */ + EAnalogDisplayHandOneRevPerHour, + /** A hand that performs one revolution every minute. */ + EAnalogDisplayHandOneRevPerMinute + }; + +// +// miscellaneous structs +// + +struct STimeDeviceShadow +/** Determines how shadows are added to the clock display. + +@publishedAll +@released */ + { + /** True if shadows should be displayed, else false. */ + TBool iIsOn; + /** Colour of the shadows. */ + TRgb iColor; + /** Offset of shadows from foreground. */ + TPoint iOffset; + }; + +struct SAnalogDisplayAmPm +/** Defines the display parameters of the AM/PM display for an analogue clock. + +@see RAnalogClock +@publishedAll +@released */ + { + /** Position relative to the clock face. */ + TPoint iPositionRelativeToFace; + /** Size. */ + TSize iSize; + /** Shadow settings. */ + STimeDeviceShadow iShadow; + /** Background colour. */ + TRgb iBackgroundColor; + /** Handle to the font to use. This can be obtained using CFbsFont::Handle(). + + @see CFbsFont::Handle() */ + TInt iFontHandle; + /** Colour for text. */ + TRgb iTextColor; + }; + +// +// display-addition classes +// + + +class TDisplayAddition +/** This class is used in the derivation of TAnalogDisplayHand and TDigitalDisplayTextSection. + +@internalComponent */ + { +public: + const TDesC8& Buf() const; +protected: + TConstructorBuf8 iBuf; + }; + +// + +class TDigitalDisplayTextSection : public TDisplayAddition +/** A text section for a digital clock. + +@see RDigitalClock +@publishedAll +@released */ + { +public: + IMPORT_C TDigitalDisplayTextSection(TInt aFontHandle, TRgb aTextColor, TDigitalDisplayHorizontalTextAlignment aHorizontalAlignment, + TDigitalDisplayVerticalTextAlignment aVerticalAlignment, + TInt aHorizontalMargin, TInt aVerticalMargin, const TDesC& aFormat); + // N.B. the font passed in to aFontHandle cannot be destroyed until the + // RDigitalClock has been completely constructed, including all necessary + // calls to RDigitalClock::AddTextSectionL() + }; + +// + +class TAnalogDisplayHand : public TDisplayAddition +/** A hand for an analogue clock. + +A hand is a vector drawing made from a number of features (lines, circles, +polylines). These are specified with the hand assumed to be in the 12 o'clock +position, with TPoint(0,0) being the center of the clock. + +@see RAnalogClock +@publishedAll +@released */ + { +public: + IMPORT_C TAnalogDisplayHand(TAnalogDisplayHandType aType); + IMPORT_C void AddLine(CGraphicsContext::TPenStyle aPenStyle, TRgb aPenColor, const TSize& aPenSize, + const TPoint& aStartPoint, const TPoint& aEndPoint); + IMPORT_C void AddPolyLine(CGraphicsContext::TPenStyle aPenStyle, TRgb aPenColor, const TSize& aPenSize, + CGraphicsContext::TBrushStyle aBrushStyle, TRgb aBrushColor, + TBool aClosed, const CArrayFix* aPointList); // aPointList is not destroyed + IMPORT_C void AddCircle(CGraphicsContext::TPenStyle aPenStyle, TRgb aPenColor, const TSize& aPenSize, + CGraphicsContext::TBrushStyle aBrushStyle, TRgb aBrushColor, + const TPoint& aCircleCenter, TInt aRadius); + inline TInt NumFeatures() const + /** Gets the number of features added to the hand. */ + {return *iNumFeaturesPtr;} +private: + void AppendType(TAnalogDisplayHandFeatureType aType); +private: + TInt* iNumFeaturesPtr; + }; + +// +// utility class +// + +class RAnimWithUtils : public RAnim +/** Utility class to support clock animation. + +@publishedAll +@released +*/ + { +protected: + RAnimWithUtils(RAnimDll& aAnimDll, const RWindowBase& aWindow); + void AppendToConstructorBufL(const TDesC8& aData); + void SendConstructorBufIfCompleteL(TInt aAnimatedObjectType); + void SendConstructorBufL(TInt aAnimatedObjectType); + TBool ConstructorBufExists() const; + TBool ConstructorBufAlreadySent() const; + TConstructorBuf8& ConstructorBuf() const; + void SetNumAdditionsStillExpected(TInt aNumAdditionsStillExpected); +public: + IMPORT_C virtual void Close(); +private: + TConstructorBuf8* iConstructorBuf; // on the heap as it is only required for construction + TBool iConstructorBufAlreadySent; + const RWindowBase& iWindow; + TInt iNumAdditionsStillExpected; + }; + +// +// time-device abstract classes +// + + +class RTimeDevice : public RAnimWithUtils +/** Sets display parameters for clocks. + +@publishedAll +@released +*/ + { +protected: + RTimeDevice(RAnimDll& aAnimDll, const RWindowBase& aWindow); + void AppendDisplayTypeL(TDisplayType aType); + void AppendDigitalDisplayConstructorArgsL(const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, const STimeDeviceShadow& aShadow, + TRgb aBackgroundColor, TInt aNumTextSections); + void AppendAnalogDisplayConstructorArgsL(const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, const STimeDeviceShadow& aShadow, + TInt aFaceHandle, TInt aFaceMaskHandle, TInt aNumHands, const SAnalogDisplayAmPm* aAmPm); +public: + IMPORT_C void SetVisible(TBool aVisible); // can only be called after full construction - by default clocks are invisible + IMPORT_C void SetPositionAndSize(const TPoint& aPosition, const TSize& aSize); // can only be called after full construction + IMPORT_C void SetPosition(const TPoint& aPosition); // can only be called after full construction + IMPORT_C void SetSize(const TSize& aSize); // can only be called after full construction + IMPORT_C void UpdateDisplay(); // can only be called after full construction + IMPORT_C void Draw(); // can only be called after full construction + }; + +// + +class RClock : public RTimeDevice +/** Sets the time for clocks. + +@publishedAll +@released */ + { +protected: + RClock(RAnimDll& aAnimDll, const RWindowBase& aWindow); + void AppendClockConstructorArgsL(TTimeIntervalSeconds aUniversalTimeOffset); +public: + IMPORT_C void SetUniversalTimeOffset(TTimeIntervalSeconds aUniversalTimeOffset); // can only be called after full construction + }; + +// +// time-device concrete classes +// + +class RDigitalClock : public RClock +/** A digital clock. + +A digital clock is composed of one or more text sections, which define +how the time information is displayed. + +@publishedAll +@released */ + { +public: + IMPORT_C RDigitalClock(RAnimDll& aAnimDll, const RWindowBase& aWindow); + IMPORT_C void ConstructL(TTimeIntervalSeconds aUniversalTimeOffset, const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, + const STimeDeviceShadow& aShadow, TRgb aBackgroundColor, TInt aNumTextSections); + IMPORT_C void AddTextSectionL(const TDigitalDisplayTextSection& aTextSection); + IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor, TRgb aShadowColor); // can only be called after full construction + IMPORT_C void SetTextColor(TRgb aTextColor); + + }; + +// + + +class RAnalogClock : public RClock +/** An analogue clock. + +@see CFbsBitmap::Handle() +@publishedAll +@released */ + + { +public: + IMPORT_C RAnalogClock(RAnimDll& aAnimDll, const RWindowBase& aWindow); + IMPORT_C void ConstructL(TTimeIntervalSeconds aUniversalTimeOffset, const TPoint& aPosition, const TSize& aSize, const TMargins& aMargins, + const STimeDeviceShadow& aShadow, TInt aFaceHandle, TInt aFaceMaskHandle, TInt aNumHands, const SAnalogDisplayAmPm* aAmPm=NULL); + // N.B. the bitmap(s) passed in to aFaceHandle and aFaceMaskHandle in these + // ConstructL functions cannot be destroyed until the RAnalogClock has been + // completely constructed, including all necessary calls to + // RAnalogClock::AddHandL() - aFaceMaskHandle may be 0 + IMPORT_C void AddHandL(const TAnalogDisplayHand& aHand); + IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor, TRgb aShadowColor); // can only be called after full construction + IMPORT_C void SetTextColor(TRgb aTextColor); + IMPORT_C void SetPenColor(const TRgb aPenColor); + IMPORT_C void SetBrushColor(const TRgb aBrushColor); + }; + +// +// message-window class +// + + +class RMessageWindow : public RAnimWithUtils +/** A configurable window that appears for a brief time to display a message to +the user and then disappears. + +This is the basic class that is used by classes such as CEikonEnv and CEikMsgWin +to provide information and message windows. Such higher-level classes would +normally be used by client applications rather than RMessageWindow. This class +can be used though to implement specialist new classes. + +Note that this class is in the same library as the Clock API for implementation +reasons only. + +@see CEikMsgWin +@see CEikonEnv +@publishedAll +@released */ + { +public: + /** Defines the maximum length of text in the message. */ + enum + { + /** Maximum length of text in the message. */ + EMaxTextLength=80 + }; +public: + IMPORT_C RMessageWindow(RAnimDll& aAnimDll, const RWindowBase& aWindow); + IMPORT_C void ConstructL(TInt aBaselineOffset, TInt aFontHandle, TRgb aBackgroundColor, TRgb aTextColor); + IMPORT_C void ConstructL(TInt aBaselineOffset, TInt aFontHandle, TRgb aBackgroundColor, TRgb aTextColor, TRgb aBorderColor); + IMPORT_C void StartDisplay(TBool aFlash, TTimeIntervalMicroSeconds32 aInitialDelay, const TDesC& aText); + IMPORT_C void StartDisplay(TBool aFlash, TTimeIntervalMicroSeconds32 aInitialDelay, TTimeIntervalMicroSeconds32 aDuration, const TDesC& aText); + IMPORT_C void CancelDisplay(); + IMPORT_C void GetBorders(TMargins& aBorders); + IMPORT_C void SetBackgroundColor(TRgb aBackgroundColor); + IMPORT_C void SetTextColor(TRgb aTextColor); + IMPORT_C void SetBorderColor(TRgb aBorderColor); + IMPORT_C void SetPlinthColors(TRgb aTl,TRgb aBr); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cmarkedstack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cmarkedstack.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,84 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Template class to implement a marked stack. Conatins a stack itself of marks +// providing basic marking functionality. +// +// + +#ifndef __CMARKEDSTACK_H__ +#define __CMARKEDSTACK_H__ + +// includes +#include +#include + +//##ModelId=3B666BCD0001 + +template +class CMarkedStack : public CStack +/** Provides a templated stack that allows items in the stack to be marked. + +The class allows each mark to have an associated TInt value, which allows different +types of mark to be used on the same stack. + +Template parameter T specifies the type of object on the stack. Owner should be set to +ETrue if the object's destructor should delete the objects on the stack. + @publishedAll + @released + +*/ +{ +protected: +class TMarkPoint +/** Represents a mark. + */ +{ +public: + /** Represents a mark. */ + TMarkPoint(TInt aMarkType + , TInt aIndex) + : iMarkType(aMarkType) + , iStackIndex(aIndex) + {} + /** Mark type. */ + TInt iMarkType; + /** Index of the marked stack item. */ + TInt iStackIndex; +}; +/** Defines a stack of marks. */ +typedef CStack CMarks; +public: + //##ModelId=3B666BCD0048 + inline virtual ~CMarkedStack(); + + //##ModelId=3B666BCD0041 + inline void MarkL(TInt aMarkType); + //##ModelId=3B666BCD003F + inline TInt RemoveMark(TInt aMarkType); + //##ModelId=3B666BCD003D + inline void DeleteToMark(TInt aMarkType); + //##ModelId=3B666BCD0033 + inline void ResetToMark(TInt aMarkType); +protected: + /** A stack of marks. + + Items are added and removed from this stack by MarkL(), RemoveMark() etc. + */ + //##ModelId=3B666BCD002D + CMarks iMarks; +}; + +#include + +#endif // __CMARKEDSTACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cmsvattachment.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cmsvattachment.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,158 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMSVATTACHMENT_H__ +#define __CMSVATTACHMENT_H__ + +#include +#include + +/** +Attachment Id for uniquely identifying attachments. + +This is unique on a per message entry basis. + +@publishedAll +@released +*/ +typedef TUint TMsvAttachmentId; + +/** +DRM Mime type + +@publishedPartner +@released +*/ +_LIT8(KEpocMimeTypeDrm,"X-Epoc/DRM.Receipt"); + +class CMsvAttributeManager; + +/** +Represents a single attachment and information about the attachment. + +This object is used to represent all types of attachments (file, linked file or message +entry). Note that some APIs may not be valid for particular attachment types. This is +described under each method. It is the responsibility of the client to ensure that the +data about the attachment is set such as its mime-type or size. + +@publishedAll +@released +*/ +class CMsvAttachment : public CBase + { +public: + /** + Enum to define the different types of attachments supported by messaging. + */ + enum TMsvAttachmentType + { + /** + File attachment. This is a file attachment that is copied into the message store. + */ + EMsvFile = 0, + /** + Linked file attachment. This is an attachment that is linked to using its file path, + this is not copied into the message store. + */ + EMsvLinkedFile, + /** + Message entry attachment. This is a message entry that is registered as an attachment. + */ + EMsvMessageEntry + }; + +public: + IMPORT_C static CMsvAttachment* NewL(TMsvAttachmentType aType); + IMPORT_C static CMsvAttachment* NewL(TMsvAttachmentType aType, TInt aSize, HBufC8* aMimeType, HBufC* aAttachmentName); + + IMPORT_C static CMsvAttachment* NewL(const CMsvAttachment& aAttachment); + + IMPORT_C ~CMsvAttachment(); + + IMPORT_C TMsvAttachmentId Id() const; + IMPORT_C void SetId(TMsvAttachmentId aId); + + IMPORT_C TMsvAttachmentType Type() const; + + IMPORT_C TMsvId EntryAttachmentId() const; + void SetEntryAttachmentId(TMsvId aEntryId); + + IMPORT_C const TDesC& AttachmentName() const; + IMPORT_C void SetAttachmentNameL(const TDesC& aAttachmentName); + + IMPORT_C const TDesC& FilePath() const; + void SetFilePathL(const TDesC& aFilePath); + + IMPORT_C TInt Size() const; + IMPORT_C void SetSize(TInt aSize); + + IMPORT_C const TDesC8& MimeType() const; + IMPORT_C void SetMimeTypeL(const TDesC8& aMimeType); + + IMPORT_C TBool Complete() const; + IMPORT_C void SetComplete(TBool aComplete); + + IMPORT_C void SetDesC8AttributeL(TUid aAttributeId, const TDesC8& aAttribute); + IMPORT_C TInt GetDesC8Attribute(TUid aAttributeId, TPtrC8& aAttribute) const; + IMPORT_C void RemoveDesC8Attribute(TUid aAttributeId); + + IMPORT_C void SetIntAttributeL(TUid aAttributeId, TInt aAttribute); + IMPORT_C TInt GetIntAttribute(TUid aAttributeId, TInt& aAttribute) const; + IMPORT_C void RemoveIntAttribute(TUid aAttributeId); + + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + + TBool IsPathRequired() const; + +private: + CMsvAttachment(TMsvAttachmentType aType); + CMsvAttachment(TMsvAttachmentType aType, TInt aSize, HBufC8* aMimeType, HBufC* aAttachmentName); + void ConstructL(); + void ConstructL(const CMsvAttachment& aAttachment); + +private: + /** The unique attachment Id. This is unique per message entry and is auto-assigned. */ + TMsvAttachmentId iId; + + /** The attachment type. */ + TMsvAttachmentType iType; + + /** Size of the attachment in bytes. */ + TInt iSize; + + /** Descriptor indicating the mime type of the attachment. */ + HBufC8* iMimeType; + + /** The full file path and file name of attachment files and linked files. */ + HBufC* iFilePath; + + /** The message entry Id of the entry attachment. */ + TMsvId iEntryId; + + /** Name of the attachment to identify to the attachment. */ + HBufC* iAttachmentName; + + /** Attachment entry completeness flag. */ + TBool iComplete; + + /** Attribute manager for handling the attributes for this attachment. */ + CMsvAttributeManager* iAttributeManager; + + /** Flag to indicate whether a path needs to be added. */ + TBool iNeedsPath; + }; + +#endif // __CMSVATTACHMENT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cmsvmimeheaders.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cmsvmimeheaders.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,180 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMSVMIMEHEADERS_H__ +#define __CMSVMIMEHEADERS_H__ + +#include + +class CDesC8ArrayFlat; +class CMsvAttachment; +class CDesC8Array; + +/** +String literal for Base64 encoding. +@publishedAll +@released +*/ +_LIT8(KMsvBase64String, "Base64"); + +/** +String literal for Quoted-Printable encoding. +@publishedAll +@released +*/ +_LIT8(KMsvQPString, "quoted-printable"); + +/** +String literal for 7 bit encoding. +@publishedAll +@released +*/ +_LIT8(KMsv7BitString, "7bit"); + +/** +String literal for 8 bit encoding. +@publishedAll +@released +*/ +_LIT8(KMsv8BitString, "8bit"); + +/** +String literal for binary encoding. +@publishedAll +@released +*/ +_LIT8(KMsvBinaryString, "binary"); + +/** +String literal for UU encoding. +@publishedAll +@released +*/ +_LIT8(KMsvUUString, "uuencode"); + +/** +Utility class to represent commonly used Mime Headers. This object represents a number +of common Mime Headers into a single class. It is intended that this class is used to +represent the Mime Headers for an attachment represented by the CMsvAttachment class when +using the Attachment API. The Mime header data can be associated with an attachment and +stored and restored using the StoreL and RestoreL methods. +@publishedAll +@released +*/ +class CMsvMimeHeaders : public CBase + { +public: + +/** Messaging encoding types. +@publishedAll +@released +*/ +enum TMsvEncodingType + { + /** Unknown. */ + EEncodingTypeUnknown, + /** None. */ + EEncodingTypeNone, + /** 7-bit. */ + EEncodingType7Bit, + /** 8-bit. */ + EEncodingType8Bit, // ie lines still <1000 chars and terminated by CRLF + /** Binary. */ + EEncodingTypeBinary, // ie any length of data, not terminated by CRLF + /** QP. */ + EEncodingTypeQP, + /** Base64. */ + EEncodingTypeBASE64, + /** UU. */ + EEncodingTypeUU + }; + +public: + IMPORT_C static CMsvMimeHeaders* NewL(); + IMPORT_C static CMsvMimeHeaders* NewLC(); + IMPORT_C ~CMsvMimeHeaders(); + + IMPORT_C void StoreL(CMsvAttachment& aAttachment) const; + IMPORT_C void RestoreL(CMsvAttachment& aAttachment); + + IMPORT_C void SetContentDescriptionL(const TDesC8& aContentDescription); + IMPORT_C const TDesC8& ContentDescription() const; + + IMPORT_C void SetContentBaseL(const TDesC8& aContentBase); + IMPORT_C const TDesC8& ContentBase() const; + + IMPORT_C void SetContentLocationL(const TDesC16& aContentLocation); + IMPORT_C const TDesC16& ContentLocation() const; + + IMPORT_C void SetContentIdL(const TDesC8& aContentId); + IMPORT_C const TDesC8& ContentId() const; + + IMPORT_C void SetContentTypeL(const TDesC8& aContentType); + IMPORT_C const TDesC8& ContentType() const; + + IMPORT_C void SetContentSubTypeL(const TDesC8& aSubContentType); + IMPORT_C const TDesC8& ContentSubType() const; + + IMPORT_C void SetContentDispositionL(const TDesC8& aContentDisposition); + IMPORT_C const TDesC8& ContentDisposition() const; + + IMPORT_C CDesC8Array& ContentTypeParams(); + IMPORT_C CDesC8Array& ContentDispositionParams(); + IMPORT_C CDesC8Array& XTypeParams(); + + IMPORT_C const CDesC8Array& ContentTypeParams() const; + IMPORT_C const CDesC8Array& ContentDispositionParams() const; + IMPORT_C const CDesC8Array& XTypeParams() const; + + IMPORT_C void SetMimeCharset(TUint aMimeCharset); + IMPORT_C TUint MimeCharset() const; + + IMPORT_C void SetSuggestedFilenameL(const TDesC16& aSuggestedFilename); + IMPORT_C const TDesC16& SuggestedFilename() const; + + IMPORT_C void SetRelativePathL(const TDesC8& aRelativePath); + IMPORT_C const TDesC8& RelativePath() const; + + IMPORT_C void SetContentTransferEncoding(const TDesC8& aEncodingType); + IMPORT_C TMsvEncodingType ContentTransferEncoding() const; + IMPORT_C TMsvEncodingType ContentTransferEncoding(TPtrC8& aEncodingType) const; + IMPORT_C const TPtrC8 GetContentTypeValue(const TDesC8& aContentTypeParameter) const; + + IMPORT_C void Reset(); + IMPORT_C TInt Size() const; + IMPORT_C TBool ContainsMimeHeaders(const CMsvAttachment& aAttachment); + +private: + CMsvMimeHeaders(); + void ConstructL(); + +private: + HBufC8* iContentDescription; + HBufC8* iContentBase; + HBufC16* iContentLocation; + HBufC8* iContentId; + HBufC8* iContentType; + HBufC8* iContentSubType; + HBufC8* iContentDisposition; + CDesC8ArrayFlat* iContentTypeParams; // zero or more "parameter" + CDesC8ArrayFlat* iContentDispositionParams; // zero or more "parameters" + CDesC8ArrayFlat* iXTypeParams; // zero or more X-Type "parameters" + TUint iMimeCharset; + HBufC16* iSuggestedFilename; + HBufC8* iRelativePath; + TMsvEncodingType iContentTransferEncoding; + }; + +#endif // __CMSVMIMEHEADERS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cmsvplainbodytext.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cmsvplainbodytext.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,156 @@ +// CMSVPLAINBODYTEXT.H + +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMSVPLAINBODYTEXT_H__ +#define __CMSVPLAINBODYTEXT_H__ + + +#include +#include +#include + +class CMsvStore; +class CRichText; +class CParaFormatLayer; +class CCharFormatLayer; +class CCnvCharacterSetConverter; + +/** +This class encapsulates plainbody text information for storage within the +Message Store.It also populates a CRichText object with the 8 bit data +decoded to the specified character set.If a character set is not specified, +then the default character set is used. + +@publishedAll +@released +*/ +class CMsvPlainBodyText : public CMsgActive + { +public: + static CMsvPlainBodyText* NewL(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore, TBool aIs8Bit, TUint aCharsetId, TUint aDefaultCharsetId, TMsvId aMessageId, RFs& aFs); + static CMsvPlainBodyText* NewL(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore, TMsvId aMessageId, RFs& aFs, TInt aChunkLength); + + IMPORT_C ~CMsvPlainBodyText(); + + IMPORT_C void StoreChunkL(const TDesC8& aChunk, TRequestStatus& aStatus); + IMPORT_C void StoreChunkL(const TDesC8& aChunk); + + IMPORT_C void StoreChunkL(const TDesC16& aChunk, TRequestStatus& aStatus); + IMPORT_C void StoreChunkL(const TDesC16& aChunk); + + IMPORT_C void StoreRichTextAsPlainTextL(CRichText& aRichText); + + IMPORT_C void CommitL(); + + IMPORT_C void NextChunkL(TDes8& aChunk, TRequestStatus& aStatus); + IMPORT_C void NextChunkL(TDes8& aChunk); + + IMPORT_C void NextChunkL(TDes16& aChunk, TRequestStatus& aStatus); + IMPORT_C void NextChunkL(TDes16& aChunk); + + IMPORT_C void PreviousChunkL(TDes8& aChunk, TRequestStatus& aStatus); + IMPORT_C void PreviousChunkL(TDes8& aChunk); + + IMPORT_C void PreviousChunkL(TDes16& aChunk, TRequestStatus& aStatus); + IMPORT_C void PreviousChunkL(TDes16& aChunk); + + + IMPORT_C void SetCharacterSetL(const TUint aCharset); + IMPORT_C TUint CharacterSet(); + IMPORT_C TUint DefaultCharacterSet(); + + IMPORT_C TInt Size(); + +private: + CMsvPlainBodyText(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore, TBool aIs8Bit, TUint aCharsetId, TUint aDefaultCharsetId, TMsvId aMessageId, RFs& aFs); + void ConstructWriteL(); + + CMsvPlainBodyText(MMsvStoreManager& aMsvStoreManager, CMsvStore& aStore,TMsvId aMessageId, RFs& aFs,TInt aChunkLength); + void ConstructReadL(); + + void PrepareToConvertL(); + void ConvertChunkToUnicodeForStoreL(const TDesC8& aChunk); + TInt ConvertChunkToUnicodeForRestoreL(); + void ExtractNextChunkFromRichText(TDes16& aChunk); + void ExtractPreviousChunkFromRichText(TDes16& aChunk); + void RevertL(); + void DoRunL(); + void DoComplete(); + void DoCancel(); + +private: + /** To access APIs related to RFile operations.*/ + MMsvStoreManager& iMsvStoreManager; + CMsvStore& iStore; + /** Indicates whether to store text as 8 bit or 16 bit.*/ + TBool iIs8Bit; + /** The charset of the body text*/ + TUint iCharsetId; + TUint iDefaultCharsetId; + + /** The RFile Path.*/ + HBufC* iFilePath; + TMsvId iMessageId; + RFs& iFSession; + + /** The RFile to which body text is written.*/ + RFile iFile; + /** Character converter for 8 to 16 bit conversion.*/ + CCnvCharacterSetConverter* iConverter; + CRichText* iRichText; + CParaFormatLayer* iParaLayer; + CCharFormatLayer* iCharLayer; + TInt iReadChunkLength; + /** Temporary buffer created to Store chunk while it is being written aynchronously.*/ + RBuf16 iTempChunk16; + /** Buffer used to read data from RFile.*/ + RBuf8 iRfileReadBuf8; + /** Pointer to 8-bit buffer that needs to be written to RFile.*/ + TPtrC8 iRfileWritePtr8; + /** The position from where to extract data in CRichText*/ + TInt iPos; + /** Contains the size of the chunk that will be read or write in the RFile*/ + TInt iChunkMaxLength; + /** Contains the remaining unconverted Unicode Data*/ + HBufC8* iRemainingUnConvertedData; + /** Array that stores the start positions of each chunk,in Rfile*/ + RArray iStartPosOfEachChunkInFile; + /** Contains the start position of the next chunk*/ + TInt iStartPosOfNextChunk; + /** Contains the remaining converted Unicode Data*/ + RBuf16 iRemainingConvertedData; + /** Pointer to a 16 bit chunk that is being read from the store.*/ + TDes16* iChunk16; + /** Pointer to a 8 bit chunk that is being read from the store.*/ + TDes8* iChunk8; + /** Indicates whether the Rfile is commited or not.*/ + TBool iIsCommitted; + + /** Indicates whether the chunk being read is last.*/ + TBool iIsLastChunk; + /** Indicates whether call to DoRunl was initiated by PreviousChunkL method.*/ + TBool iPrevChunk; + /** Indicates whether call to DoRunl was initiated by 8 bit PreviousChunkL and NextChunkL methods.*/ + TBool iRetrieving8bit; + /** Enum indicating if RFile is being written or read */ + enum {EMsvFileReading, EMsvFileWriting} iMsvFileStatus; + CCnvCharacterSetConverter::TAvailability iAvailable; + //Containes current position of the Rfile + TInt iCurrentFilePos; + }; + +#endif//__CMSVPLAINBODYTEXT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cmsvrecipientlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cmsvrecipientlist.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMSVRECIPIENTLIST_H__ +#define __CMSVRECIPIENTLIST_H__ + +#include +#include + + + +// must be 4 bytes so that RArray works. +typedef TUint32 TMsvRecipientType; + +/** +@publishedAll +@released +*/ +enum TMsvRecipientTypeValues + { + EMsvRecipientTo = 0, + EMsvRecipientCc, + EMsvRecipientBcc, + }; + +/** +@publishedAll +@released +*/ +class CMsvRecipientList : public CBase + { +public: + static CMsvRecipientList* NewL(); + static CMsvRecipientList* NewLC(); + virtual ~CMsvRecipientList(); + // + IMPORT_C void Reset(); + IMPORT_C TInt Count() const; + // + IMPORT_C void AppendL(const TDesC& aPtr); + IMPORT_C void AppendL(TMsvRecipientType aValue, const TDesC& aPtr); + // + IMPORT_C void Delete(TInt aPos); + IMPORT_C void Delete(TInt aPos, TInt aCount); + // + IMPORT_C TMsvRecipientType Type(TInt aPos) const; + IMPORT_C const TDesC& operator[](TInt aIndex) const; + // + IMPORT_C const MDesCArray& RecipientList() const; +private: + CMsvRecipientList(); + void ConstructL(); +private: + RArray iRecipientType; + CDesCArrayFlat* iRecipients; + }; + +#endif //__CMSVRECIPIENTLIST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cmsvtechnologytypedefaultmtmsettings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cmsvtechnologytypedefaultmtmsettings.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,67 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__ +#define __CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__ + +#include +#include + +class RFs; +class CRepository; + + +/** +Stores default MTM settings for a technology type to the Central Repository. + +@publishedAll +@released +*/ +class CMsvTechnologyTypeDefaultMtmSettings : public CBase + { +private: + struct TMsvTechnologyTypeDefaultMtmInfo + { + TUid iTechnologyTypeUid; + TUid iMtmUid; + }; + +public: + IMPORT_C static CMsvTechnologyTypeDefaultMtmSettings* NewL( RFs& aFs ); + IMPORT_C ~CMsvTechnologyTypeDefaultMtmSettings( ); + + IMPORT_C TInt DefaultMtm( TUid aTechnologyTypeUid, TUid& aMtmUid ) const; + IMPORT_C void SetDefaultMtmL( TUid aTechnologyTypeUid, TUid aMtmUid ); + IMPORT_C TInt RemoveDefaultMtm( TUid aTechnologyTypeUid ); + + // Stores and Restores data in the central repository + IMPORT_C void LoadSettingsL( ); + IMPORT_C void SaveSettingsL( ); + +private: + CMsvTechnologyTypeDefaultMtmSettings( RFs& aFs ); + void ConstructL(); + void CheckIfMtmIsPartOfTechnologyTypeGroupL( const TUid aTechnologyTypeUid, + const TUid aMtmUid, const TUid aMtmTypeUid ) const; + TInt FindDefaultMtm( const TUid aTechnologyTypeUid, + TMsvTechnologyTypeDefaultMtmInfo& aTechnologyTypeDefaultMtmInfo ) const; + +private: + CRepository* iRepository; + RArray iTechnologyTypeDefaultMtmArray; + RArray iRemovedTechnologyTypes; + RFs& iFs; + }; +#endif //__CMSVTECHNOLOGYTYPEDEFAULTMTMSETTINGS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cnftool.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cnftool.rh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,33 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// HEADER INFO +// +// + +STRUCT CNF_FILE +/** Describes the converter DLL. + +@publishedAll +@deprecated */ + { + /** Future use, do not use */ + LLINK extension = 0; + /** The DLL's UID3. */ + LONG dll_uid; + /** An array of CONVERTER_DATA resources describing the converters in the DLL. + Target type: CONVERTER_DATA */ + LEN WORD STRUCT converter_list[]; // Converter_data + } + +#include diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cnode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cnode.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,456 @@ +/// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +/// All rights reserved. +/// This component and the accompanying materials are made available +/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +/// which accompanies this distribution, and is available +/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +/// +/// Initial Contributors: +/// Nokia Corporation - initial contribution. +/// +/// Contributors: +/// +/// Description: +/// All rights reserved. +/// This component and the accompanying materials are made available +/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +/// which accompanies this distribution, and is available +/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +/// Initial Contributors: +/// Nokia Corporation - initial contribution. +/// Contributors: +/// This contains the definitions of CDataDelete, CDataNoDelete, CIntAttribute, CNode, and CTypedNode. +/// CDataNoDelete is a base class to CDataDelete and are essentially a wrapper around an HBufC16. +/// The node owns the data that is added to it and therefore is responsible for deleting all its data, +/// hence theses two classes allow a user to have non deletable data. Internally to the node it is also +/// sometimes necessary to change the data into either deletable or non-deletable data api's are provided +/// for this. +/// CIntAttribute is wrapper around a TInt, this is provided as the nodes attribute value is a CBase* however +/// it might be desirable to store integer's in here. Attribute value is owned by the node therefore the node is +/// responsible for deleting it. +/// CNode is the basis for constructing a tree. It consists of an array of child nodes, node type, a parent node, +/// an array of attributes, and a data member. Internally the data member is defined as CDataNoDelete however +/// to the user all the exported api's take an HBufC16*. Data is owned by the node and is destroyed by the node, +/// However in certain circumstances this is not desirable hence the api's to make the data non-deletable. The +/// node type is defined as a TAny* however normal usage would use the templated node - CTypedNode. The node type +/// is used to identify groups of nodes. The attribute array is fairy simple and consists of AttributeType and +/// AttributeValue. AttributeType can be defined by using the templated class and should be a 32bit value. AttributeValue +/// can be any object derived from CBase and the node takes ownership therefore the node delete's it. +/// Basic usage should be to use the templated class in order to make use of the templated types (TNodeType,TAttributeType). +/// Create a node for example: +/// CTypedNode *tree = CTypedNode::NewL(0,0); +/// add a new child: +/// CNODE *TestChildNode1 = tree->AppendNodeL(aTempNodeForNodeType); +/// add some data: +/// TestChildNode1->SetDataL(aHBufC16); +/// add an attribute: +/// TestChildNode1->->AddAttributeL(aTAttributeType,aCBasePointerAttributeValue); +/// Explanation of individual api's is documented below. +/// + + + + +#ifndef __CNODE_H__ +#define __CNODE_H__ + +#include +#include + + +/** + @file + @publishedAll + @released +*/ + +//Granularity of arrays +const TInt KGranularity = 5; + +//enum of panic reasons +enum TNodePanic + { + ENodeBadArgument, + ENodeNoChildren, + ENoData, + EAttributeFailure + }; + +//node panic function +inline void Panic(TNodePanic aPanic); + +//Wrapper around an HBufC16 doesn't delete data +//##ModelId=3B666BCC0303 +class CDataNoDelete : public CBase +/** Provides a wrapper around an HBufC16: the buffer is not deleted when the object is deleted. +*/ + { +public: + //##ModelId=3B666BCC032D + CDataNoDelete(HBufC16* aData); + //##ModelId=3B666BCC032C + virtual ~CDataNoDelete(); + //##ModelId=3B666BCC0324 + HBufC16* SetData(HBufC16* aData); + //##ModelId=3B666BCC0322 + virtual void ResetDataPointer(HBufC16* aData); + //##ModelId=3B666BCC0321 + HBufC16* Data(); + +protected: + /** The wrapped buffer. */ + //##ModelId=3B666BCC0319 + HBufC16* iData; + }; + +//Wrapper around an HBufC16 does delete data +//##ModelId=3B666BCC0399 +class CDataDelete : public CDataNoDelete +/** Provides a wrapper around an HBufC16: the buffer is deleted when the +object is deleted. +*/ + { +public: + //##ModelId=3B666BCC03B7 + CDataDelete(HBufC16* aData); + //##ModelId=3B666BCC03B0 + virtual ~CDataDelete(); + //##ModelId=3B666BCC03AE + virtual void ResetDataPointer(HBufC16* aData); + }; + +//Wrapper around an HBufC16 does delete data (FileName) +// After Removing referenced File +//##ModelId=3B666BC7026F +class CFileDataDelete : public CDataNoDelete +/** Provides a wrapper around a filename: the referenced file is deleted when the object is deleted. +*/ + { +public: + //##ModelId=3B666BC7028F + CFileDataDelete(HBufC16* aData); + //##ModelId=3B666BC7028E + virtual ~CFileDataDelete(); + //##ModelId=3B666BC70285 + virtual void ResetDataPointer(HBufC16* aData); +private: + //##ModelId=3B666BC70284 + void RemoveFile(); + }; + +//Wrapper around a TInt used for attribute values in order to allow the node to call a dtor +//##ModelId=3B666BC6023E +class CIntAttribute : public CBase +/** Provides an object wrapper around a TInt value. */ + { +public: + //##ModelId=3B666BC6025B + inline CIntAttribute(TInt aInteger); + //##ModelId=3B666BC6025A + inline TInt Int() const; +private: + //##ModelId=3B666BC60264 + CIntAttribute(); + //##ModelId=3B666BC60253 + TInt iInteger; + }; + +// +// Node class +// Normal usage would be to use CTypedNode in order to use specific templated types +// + +//##ModelId=3B666BCD02D2 +class CNode : public CBase + { +public: + //##ModelId=3B666BCE0139 + IMPORT_C ~CNode(); + + //NewL parameters aType to indentify the type of node, CNode* to set the parent of this node + //##ModelId=3B666BCE0125 + IMPORT_C static CNode* NewL(TAny* aType,CNode* aParent); + + //Deletes a child node which is passed in as a parameter + //##ModelId=3B666BCE011C + IMPORT_C void DeleteChildNode(CNode* aNode); + + //Deletes all the child nodes haging of this node + //##ModelId=3B666BCE011B + IMPORT_C void DeleteAllChildNodes(); + + //Creates a new node and adds it to the childlist, reference to new node is returned. Can leave if it can't allocate memory for a new node + //Type of node is the parameter + //##ModelId=3B666BCE0108 + IMPORT_C CNode& AppendNodeL(TAny* aType = 0); + + //Appends a node which is passed in as a parameter to this node, so its added to the childlist + //##ModelId=3B666BCE00FD + IMPORT_C void AppendNodeToThisNodeL(CNode* aNode); + + //Sets the data in the node to the parameter that is passed in. It's deletable and the node will delete it in dtor + //Push aDataNowNodeOwns onto the CleanupStack before calling then pop off on return + //##ModelId=3B666BCE00F3 + IMPORT_C void SetDataL(HBufC16* aDataNowNodeOwns); + + //returns the data stored in the node, which is returned as an HBufC16* + //##ModelId=3B666BCE00EB + IMPORT_C HBufC16* Data() const; + + //WARNING this function can leave as it deletes the wrapper object and then creates + //a new non deletable wrapper object and sets the data pointer inside the new object + //IF THIS LEAVES YOU WILL LOSE YOUR DATA + //##ModelId=3B666BCE00EA + IMPORT_C void SetDataNoDeleteL(); + + //WARNING this function can leave as it deletes the wrapper object and then creates + //a new deletable wrapper object then sets the pointer in the new object + //##ModelId=3B666BCE00E9 + IMPORT_C void ClearSetDataNoDeleteL(); + + // Sets the data in the node to the FileName parameter that is passed in. + // It's deletable and the node will delete it, and the file it refers to in dtor + // Push aDataLocationNowNodeOwns onto the CleanupStack before calling then pop off on return + //##ModelId=3B666BCE00DF + IMPORT_C void SetFileDataL(HBufC16* aFileDataLocationNowNodeOwns); + + //Resets the data pointer to point to aData parameter will delete the data that is owned by the node + //##ModelId=3B666BCE00D5 + IMPORT_C void ResetDataPointer(HBufC16* aData); + + //returns a reference to the absolute root of the tree + //##ModelId=3B666BCE00CB + IMPORT_C const CNode& Root() const; + + //returns a child node which is stored in the array of children. The child node is accessed by the index that is the parameter. + //##ModelId=3B666BCE00C1 + IMPORT_C CNode* Child(TInt aByIndex) const; + + //Returns either the first child of this node if the parameter is NULL. Or it returns the next chld in the array after + //the child passed in as a parameter + //##ModelId=3B666BCE00AE + IMPORT_C CNode* NextChild(const CNode* aNode = NULL) const; + + //returns the previous child to the child passed in as a parameter. The node parameter is a reference because its the child previous + //to the node passed in which obviously must exist + //##ModelId=3B666BCE00A4 + IMPORT_C CNode* PrevChild(const CNode& aNode) const; + + //Returns the parent of this node + //##ModelId=3B666BCE00A3 + IMPORT_C CNode* Parent() const; + + //WARNING this function can leave as it calls AppendNodeToThisNode. The aParent parameter is the node to which you would like to make + //the parent of 'this' node. + //It removes itself from the childlist of it's current parent + //##ModelId=3B666BCE0099 + IMPORT_C void ReparentL(CNode* aParent); + + //Returns the next sibling which means in effect that it asks for the next child of its parent. + //Sibling means brother or sister. + //##ModelId=3B666BCE0090 + IMPORT_C CNode* NextSibling() const; + + //Returns the previous sibling which means in effect that it asks for the previous child of its parent. + //Sibling means brother or sister. + //##ModelId=3B666BCE008F + IMPORT_C CNode* PrevSibling() const; + + //returns the number of children that this node has + //##ModelId=3B666BCE0085 + IMPORT_C TInt NumberImmediateChildren() const; + + //Deletes the attribute of which is of aAttributeType (the parameter) + //WARNING Attribute values of nodes will be deleted as the node owns them if you don't want it deleted then use a wrapper + //##ModelId=3B666BCE007C + IMPORT_C void DeleteAttribute(TAny* aAttributeType); + + //Deletes all the attributes of this node + //WARNING Attribute values of nodes will be deleted as the node owns them if you don't want it deleted then use a wrapper + //##ModelId=3B666BCE007B + IMPORT_C void DeleteAllAttributes(); + + //remove an attribute without deleting it, this is done by simply setting the attributeValue pointer to NULL + //WARNING you are now responsiblefor the destruction of this attribute value + //##ModelId=3B666BCE0071 + IMPORT_C void RemoveAttributeNoDelete(TAny* aAttributeType); + + // Returns the number of attributes that this node has + //##ModelId=3B666BCE0067 + IMPORT_C TInt AttributeCount() const; + + //Returns the type of attribute (AttributeType) at a given index...NOT the attributeValue + //##ModelId=3B666BCE005D + IMPORT_C TAny* AttributeTypeByIndex(TInt aIndex) const; + + //Returns the value of an attribute (AttributeValue) at a given index...NOT the attributeType + //##ModelId=3B666BCE003F + IMPORT_C CBase* AttributeByIndex(TInt aIndex) const; + //##ModelId=3B666BCE0049 + IMPORT_C CBase* AttributeByIndex(TInt aIndex,TAny*& aType) const; + + //Adds an attribute, parameters are the type of attribute and its value + //WARNING node takes ownership of aAttributeValue + ////Push aAttributeValue onto the CleanupStack before calling then pop off on return + //##ModelId=3B666BCE002B + IMPORT_C void AddAttributeL(TAny* AttributeType, CBase* aAttributeValue); + + //Adds data to the node and also adds an attribute, parameters are the Data to be added, the type of attribute and its value + //WARNING node takes ownership of aData and aAttributeValue + ////Push aAttributeValue and aData onto the CleanupStack before calling then pop off on return + //##ModelId=3B666BCE000D + IMPORT_C void AddDataAndAttributeL(HBufC16 *aData, TAny* AttributeType, CBase* aAttributeValue); + + //Returns an attribute value for the given AttributeType(the parameter) + //##ModelId=3B666BCE0003 + IMPORT_C CBase* Attribute(TAny* AttributeType) const; + + //Returns TRUE if the attribute of the given type exists + //##ModelId=3B666BCD03E1 + IMPORT_C TBool AttributeExists(TAny* aAttributeType) const; + + //Returns the node type + //##ModelId=3B666BCD03D7 + IMPORT_C TAny* Type() const; + + //Sets the node type to be aType (the parameter) + //##ModelId=3B666BCD03CD + IMPORT_C void SetType(TAny* aType); + + +protected: + //ctor + //##ModelId=3B666BCD03B9 + CNode(TAny* aType, CNode* aParent); + + //internal finds a child which is passed in as a parameter + //##ModelId=3B666BCD03AF + TInt FindChild(const CNode* aNode) const; + + //##ModelId=3B666BCD03A7 + HBufC16* SetupDeletableOrNonDeleteableDataLC(); + //##ModelId=3B666BCD03A6 + void AdjustBasePointers(); +private: + // Reserved for future expansion + //##ModelId=3B666BCD039B + virtual void Reserved1(); + //##ModelId=3B666BCD03A5 + virtual void Reserved1() const; + +protected: + //the Type of Node + //##ModelId=3B666BCD0392 + TAny* iType; + + //This Nodes parent + //##ModelId=3B666BCD037E + CNode *iParent; + + // stores attribute type and value. iTypes must be Flat array + //##ModelId=3B666BCD0372 + CArrayPtrFlat iValues; + //##ModelId=3B666BCD034C + CArrayPtrFlat iTypes; + + //##ModelId=3B666BCD0324 + TInt32* iTypesBasePtr; + //##ModelId=3B666BCD0310 + CDataNoDelete* iDataValue; +// + //An array of child nodes + //##ModelId=3B666BCD02FC + CArrayPtr *iChildList; +private: + //##ModelId=3B666BCD02DF + TAny* iReserved; // Reserved for future expansion + }; + + +//CTypedNode is derived from CNode and is a thin template. TNodeType you should define as a 32 bit value +//TAttributeType should be defined as a 32 bit value +//FOR EXPLANATION OF API'S SEE ABOVE +//##ModelId=3B666BCC01A4 +template +class CTypedNode : public CNode +/** Template class for a node in a node tree. + +The node type is set to the template parameter TNodeType and the attribute type to +TAttributeType. These parameters should be pointers to the type required to store +the type value: e.g. for a string, a const TDesC*. + +The class is thin template over CNode. */ + { +public: + //##ModelId=3B666BCC024A + inline static CTypedNode* NewL(TNodeType aType,CNode* aParent); + //##ModelId=3B666BCC0248 + inline void DeleteChildNode(CNode* aNode); + //##ModelId=3B666BCC0247 + inline void DeleteAllChildNodes(); + //##ModelId=3B666BCC0245 + inline CTypedNode& AppendNodeL(TNodeType aType); + //##ModelId=3B666BCC023B + inline void AppendNodeToThisNodeL(CNode* aNode); + //##ModelId=3B666BCC0228 + inline void SetDataL(HBufC16* aDataNowNodeOwns); + //##ModelId=3B666BCC0227 + inline void SetDataNoDeleteL(); + //##ModelId=3B666BCC0221 + inline void ClearSetDataNoDeleteL(); + //##ModelId=3B666BCC021F + inline void SetFileDataL(HBufC16* aFileDataLocationNowNodeOwns); + //##ModelId=3B666BCC021D + inline void ResetDataPointer(HBufC16* aData); + //##ModelId=3B666BCC0215 + inline HBufC16* Data() const; + //##ModelId=3B666BCC0214 + inline const CTypedNode& Root() const; + //##ModelId=3B666BCC020B + inline CTypedNode* Child(TInt aByIndex) const; + //##ModelId=3B666BCC0209 + inline CTypedNode* NextChild(const CNode* aNode = NULL) const; + //##ModelId=3B666BCC0201 + inline CTypedNode* PrevChild( const CNode& aNode) const; + //##ModelId=3B666BCC0200 + inline CTypedNode* Parent() const; + //##ModelId=3B666BCC01FE + inline void ReparentL(CNode* aParent); + //##ModelId=3B666BCC01F5 + inline CTypedNode* NextSibling() const; + //##ModelId=3B666BCC01F4 + inline CTypedNode* PrevSibling() const; + //##ModelId=3B666BCC01EE + inline TInt NumberImmediateChildren() const; + //##ModelId=3B666BCC01EC + inline void DeleteAttribute(TAttributeType aAttributeType); + //##ModelId=3B666BCC01EB + inline void DeleteAllAttributes(); + //##ModelId=3B666BCC01E5 + inline void RemoveAttributeNoDelete(TAttributeType aAttributeType); + //##ModelId=3B666BCC01E4 + inline TInt AttributeCount() const; // Returns the number of attributes + //##ModelId=3B666BCC01E2 + inline TAttributeType AttributeTypeByIndex(TInt aIndex) const; + //##ModelId=3B666BCC01DC + inline CBase* AttributeByIndex(TInt aIndex) const; + //##ModelId=3B666BCC01DE + inline CBase* AttributeByIndex(TInt aIndex,TAttributeType& aType) const; + //##ModelId=3B666BCC01D9 + inline void AddAttributeL(TAttributeType aAttributeType, CBase* aAttributeValue); + //##ModelId=3B666BCC01D0 + inline void AddDataAndAttributeL(HBufC16 *aData, TAttributeType aAttributeType, CBase* aAttributeValue); + //##ModelId=3B666BCC01CE + inline CBase* Attribute(TAttributeType aAttributeType) const; + //##ModelId=3B666BCC01CC + inline TBool AttributeExists(TAttributeType aAttributeType) const; + //##ModelId=3B666BCC01C9 + inline TNodeType Type() const; + //##ModelId=3B666BCC01C7 + inline void SetType(TNodeType aType); +protected: + //##ModelId=3B666BCC01C4 + CTypedNode(TNodeType aType, CNode* aParent); + }; +#include +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cnodeleteattribute.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cnodeleteattribute.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,46 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CNODELETEATTRIBUTE_H__ +#define __CNODELETEATTRIBUTE_H__ + +// System includes +// +#include + + + +template +class CNoDeleteAttributeT : public CBase +/** + @publishedAll + @released +*/ + { +public: + + CNoDeleteAttributeT(T aAttribute) : iAttribute(aAttribute) {}; + ~CNoDeleteAttributeT() {}; + + T Attribute() { return iAttribute; } + void SetAttribute(T aAttribute) { iAttribute = aAttribute; } + +protected: + + T iAttribute; + + }; + +#endif // __CNODELETEATTRIBUTE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coeaui.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coeaui.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,245 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEAUI_H__ +#define __COEAUI_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +class CCoeEnv; +class CCoeControl; + +/** +Creates a FEP interface object. + +@publishedAll +@released +*/ +typedef CCoeFep* (*TCoeFepFactoryFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll, const CCoeFepParameters& aFepParameters); + +/** +Calls the second ordinal function of the FEP for which the settings dialog is to be executed. + +@publishedAll +@released +*/ +typedef void (*TCoeSynchronouslyExecuteFepSettingsDialogFunctionL)(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll); + +/** Stack priority flags. + +Controls with higher priorities get offered key events before controls +with lower priorities. + +@publishedAll +@released */ +enum + { + /** 0 */ + ECoeStackPriorityDefault=0, + /** 10 */ + ECoeStackPriorityMenu=10, + /** 50 */ + ECoeStackPriorityDialog=50, + /** 60 */ + ECoeStackPriorityCba=60, + /** 200 */ + ECoeStackPriorityAlert=200, + /** 240 */ + ECoeStackPrioritySoftkey=240, + /** 250 */ + ECoeStackPriorityFep=250, + /** 300 */ + ECoeStackPriorityEnvironmentFilter=300 + }; + + +/** Control stack flags. + +Each control on the stack has a set of these flags which can be used +to refuse to accept key events and to refuse requests for focus. + +@publishedAll +@released */ +enum + { + /** The default value */ + ECoeStackFlagStandard = 0, + /** The control does not accept key events. */ + ECoeStackFlagRefusesAllKeys = 0x01, + /** The control does not accept keyboard focus. */ + ECoeStackFlagRefusesFocus = 0x02, + /** The control is owned and deleted by the stack. */ + ECoeStackFlagOwnershipTransfered= 0x04, + /** The control is also added to the stack of any embedded app UI. For + example, an alert dialog added through CEikonEnv will be + shared on the stack of all embedded app UIs that may appear in the + application. */ + ECoeStackFlagSharable = 0x08 + }; + +class CCoeControlStack; +class CCoeViewManager; + +/** Application user interface (app UI) base class. + +The app UI's responsibilities include owning the application's control stack and views, +handling user commands, (see the derived class CEikAppUi), and handling events sent by +the OS to the application, for instance being brought to the foreground. + +The UI framework class CEikAppUi is derived from this class. UIs may derive +further to add their own UI-specific features to the app UI; each application must +derive its own concrete app UI class from this. + +@publishedAll +@released */ +class CCoeAppUi : public CBase + { +public: + // Construction and destruction + IMPORT_C CCoeAppUi(); + IMPORT_C ~CCoeAppUi(); + IMPORT_C void ConstructL(CCoeAppUi* aPrevious=NULL); + // Control stack + IMPORT_C void AddToStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); + IMPORT_C void AddToStackL(CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); + IMPORT_C void RemoveFromStack(CCoeControl* aControl); + IMPORT_C void HandleStackChanged(); + IMPORT_C void HandleStackedControlsResourceChange(TInt aType); + IMPORT_C void UpdateStackedControlFlags(CCoeControl* aControl,TInt aFlags,TInt aMask); + // Help context + IMPORT_C CArrayFix* AppHelpContextL() const; + // Text input + IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const; + // Control focus + IMPORT_C CCoeControl* TopFocusedControl() const; + // Utility + IMPORT_C TBool IsDisplayingMenuOrDialog() const; + IMPORT_C TBool IsDisplayingDialog() const; + IMPORT_C TBool IsDisplayingControlBetweenPriorities(TInt aLowerPriority, TInt aHigherPriority) const; + // View registration + IMPORT_C void RegisterViewL(MCoeView& aView); + IMPORT_C void DeregisterView(const MCoeView& aView); + IMPORT_C void SetDefaultViewL(const MCoeView& aView); + IMPORT_C TInt GetDefaultViewId(TVwsViewId& aViewId) const; + // Pseudo-view registration + IMPORT_C void CheckInitializeViewsL(TUid aAppUid); + IMPORT_C void RegisterApplicationViewL(TUid aAppUid); + IMPORT_C void DeregisterApplicationView(); + // View construction + IMPORT_C TBool IsViewConstructed(const TVwsViewId& aViewId) const; + // View activation + IMPORT_C void ActivateViewL(const TVwsViewId& aViewId); + IMPORT_C void ActivateViewL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); + IMPORT_C void ActivateTopViewL(); + IMPORT_C void CreateActivateViewEventL(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); + IMPORT_C void DeactivateActiveViewIfOwnerMatchL(); + IMPORT_C void DeactivateActiveViewL(); + IMPORT_C TInt GetActiveViewId(TVwsViewId& aViewId) const; + // View registration + IMPORT_C void AddViewObserverL(MCoeViewObserver* aViewObserver); + IMPORT_C void RemoveViewObserver(MCoeViewObserver* aViewObserver); + // View activation observer + IMPORT_C void AddViewActivationObserverL(MCoeViewActivationObserver* aViewActivationObserver); + IMPORT_C void RemoveViewActivationObserver(MCoeViewActivationObserver* aViewActivationObserver); + IMPORT_C void NotifyNextActivation(const TVwsViewId& aViewId, MCoeViewActivationObserver& aViewActivationObserver); + IMPORT_C void NotifyNextActivation(MCoeViewActivationObserver& aViewActivationObserver); + IMPORT_C TBool CheckSourceOfViewSwitchL(const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic=NULL) const; + // View decativation observer + IMPORT_C void AddViewDeactivationObserverL(MCoeViewDeactivationObserver* aViewDeactivationObserver); + IMPORT_C void RemoveViewDeactivationObserver(MCoeViewDeactivationObserver* aViewDeactivationObserver); + IMPORT_C void NotifyNextDeactivation(const TVwsViewId& aViewId, MCoeViewDeactivationObserver& aViewDeactivationObserver); + IMPORT_C void NotifyNextDeactivation(MCoeViewDeactivationObserver& aViewDeactivationObserver); + // View session configuration + IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable); + IMPORT_C void UpdateViewServerBackgroundColor(const TRgb& aBgColor); + + // New APIs + IMPORT_C void SetCustomControl(TInt aCustomControl); + IMPORT_C TInt GetTopViewId(TVwsViewId& aViewId) const; + IMPORT_C void SetWindowGroupOrdinal(TInt aWindowGroupOrdinal); + +public: // Internal + IMPORT_C void SetApplicationViewAsDefaultL(); // internalTechnology + IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId,TInt aMode); // internalTechnology + IMPORT_C void SetSystemDefaultViewL(const TVwsViewId& aViewId); // internalTechnology + IMPORT_C void GetSystemDefaultViewL(TVwsViewId& aViewId); // internalTechnology + IMPORT_C virtual void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination); + IMPORT_C virtual void PrepareToExit(); +protected: // Internal + IMPORT_C virtual void HandleScreenDeviceChangedL(); +private: // Internal + IMPORT_C virtual TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); + IMPORT_C virtual void HandleForegroundEventL(TBool aForeground); + IMPORT_C virtual void HandleSwitchOnEventL(CCoeControl* aDestination); + IMPORT_C virtual void HandleSystemEventL(const TWsEvent& aEvent); + IMPORT_C virtual void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent); + IMPORT_C virtual void SetAndDrawFocus(TBool aFocus); + IMPORT_C virtual CArrayFix* HelpContextL() const; +public: // Internal + IMPORT_C virtual TBool FrameworkCallsRendezvous() const; +public: // Internal + IMPORT_C void WriteInternalStateOfStackedControlsL(RWriteStream& aWriteStream) const; // internalTechnology +public: // Deprecated. Do not use! + IMPORT_C void RegisterViewAndAddStackL(MCoeView& aView); // deprecated + IMPORT_C void DeregisterViewAndRemoveStack(const MCoeView& aView); // deprecated + IMPORT_C void RemoveFromViewStack(const MCoeView& aView,CCoeControl* aControl); // deprecated + IMPORT_C void UpdateViewStackedControlFlags(const MCoeView& aView,CCoeControl* aControl,TInt aFlags,TInt aMask); // deprecated + IMPORT_C void AddToViewStackL(const MCoeView& aView,CCoeControl* aControl,TInt aPriority=ECoeStackPriorityDefault,TInt aStackingFlags=ECoeStackFlagStandard); // deprecated +public: // not exported + TBool IsControlOnStack(CCoeControl* aControl) const; + void SetCurrentControlStackGroupId(TInt aGroupId); + void NotifyFontChange(const CCoeFontProvider& aFontProvider); + void RefetchPixelMappingL(); +private: + enum TRemoveCondition + { + ERemoveUnconditionally, + ERemoveOnlyIfSharable + }; +private:// Internal + IMPORT_C virtual void CCoeAppUi_Reserved_2(); +private: + CCoeControl* TopFocusableControl() const; + TInt FindPos(CCoeControlStack* aStack,CCoeControl* aControl) const; + void SetFocusToControl(CCoeControl* aControl,TBool aFocus); + void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags); + void DoAddToStackL(CCoeControlStack* aStack,CCoeControl* aControl,TInt aPriority,TInt aStackingFlags, TInt aGroupId); + void DoRemoveFromStack(CCoeControlStack* aStack,CCoeControl* aControl,TRemoveCondition aRemoveCondition=ERemoveUnconditionally); + void DoUpdateStackedControlFlags(CCoeControlStack* aStack,CCoeControl* aControl,TInt aFlags,TInt aMask); +public: +/**Monitor function for passing all windows events to registered monitor observers for optional inspection*/ + void MonitorWsEvent(const TWsEvent& aEvent); +private: + class CExtra; + friend class CExtra; + friend class CTestDriver; +protected: + CCoeEnv* iCoeEnv; +private: + CCoeViewManager* iViewManager; + CCoeControlStack* iStack; + CExtra* iExtra; + TInt iCCoeAppUi_Reserved1; + }; + + +#endif // __COEAUI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coeccntx.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coeccntx.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COECCNTX_H__ +#define __COECCNTX_H__ + +#include +#include +#include + +/** Interface to allow sharing of graphics settings between controls. + +The interface provides functions to set the graphics context of a control +before drawing. If a control has its iContext member set, the UI Control Framework +calls functions defined by this interface when a control is about to be drawn. +Developers must implement PrepareContext(), which is called by the framework, +to initialise the control's window with the required graphics settings. + +To use control contexts, a control should inherit from an MCoeControlContext-derived +class. To share the context between controls, this control should then be +set as the context for all controls that wish to share it. This is done by +setting the iContext member of each of the controls, using CCoeControl::SetControlContext() +and CCoeControl::CopyControlContextFrom(). + +@publishedAll +@released */ +class MCoeControlContext + { +public: + IMPORT_C virtual void ActivateContext(CWindowGc& aGc,RDrawableWindow& aWindow) const; + IMPORT_C virtual void ResetContext(CWindowGc& aGc) const; + IMPORT_C virtual void PrepareContext(CWindowGc& aGc) const; +protected: + IMPORT_C MCoeControlContext(); + +private: + IMPORT_C virtual void MCoeControlContext_Reserved1(); + IMPORT_C virtual void MCoeControlContext_Reserved2(); + +private: + TInt iMCoeControlContext_Reserved1; + }; + +/** Brush and pen graphics context. + +This class allows an MCoeControlContext to be instantiated and used to set +brush and pen properties before drawing a control. + +@publishedAll +@released */ +class CCoeBrushAndPenContext : public CBase, public MCoeControlContext + { +public: + IMPORT_C static CCoeBrushAndPenContext* NewL(); + // + IMPORT_C void SetBrushStyle(CWindowGc::TBrushStyle aBrushStyle); + IMPORT_C void SetBrushColor(TRgb aColor); + IMPORT_C void SetBrushBitmap(const CFbsBitmap& aBitmap); + IMPORT_C void SetPenColor(TRgb aColor); + // + IMPORT_C CWindowGc::TBrushStyle BrushStyle() const; + IMPORT_C TRgb BrushColor() const; + IMPORT_C const CFbsBitmap& BrushBitmap() const; + IMPORT_C TRgb PenColor() const; +protected: // from MCoeControlContext + IMPORT_C void PrepareContext(CWindowGc& aGc) const; +private: + CCoeBrushAndPenContext(); +private: + CWindowGc::TBrushStyle iBrushStyle; + TRgb iBrushColor; + const CFbsBitmap* iBitmap; + TRgb iPenColor; + }; + + +/** Protocol for sharing brush settings used in graphics operations. + +It can be used to set brush and pen properties before drawing a control. + +The mixin provides a default implementation of a control context. It implements +PrepareContext() to initialise brush settings used in graphics operations. +Its data members are public so that the brush style, brush colour and brush +pattern can be set by application code. + +@publishedAll +@deprecated */ +class MCoeControlBrushContext : public MCoeControlContext + { +public: + /** Cause vtable & typeinfo to be exported */ + IMPORT_C MCoeControlBrushContext(); +protected: // from MCoeControlContext + IMPORT_C void PrepareContext(CWindowGc& aGc) const; +public: + /** Brush style. (Not required if iBitmap is set.) */ + CWindowGc::TBrushStyle iBrushStyle; + /** Brush colour. (Not required if iBitmap is set.) */ + TRgb iBrushColor; + /** Brush pattern. */ + const CFbsBitmap* iBitmap; + +private: + TInt iMCoeControlBrushContext_Reserved1; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coecntrl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coecntrl.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,418 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COECNTRL_H__ +#define __COECNTRL_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include // class TCoeColorUse + +class TResourceReader; +class CCoeEnv; +class MCoeControlContext; +class RCoeDynamicDataStorage; + +class MCoeLayoutManager; +class TCoeZoomWithType; +class CCoeFontProvider; + +// forward declarations. +class CCoeControl; +class CCoeTextDrawerBase; + +/** Interface to be used if a control elects to be a background drawer. + +Parent controls can elect to take responsibility for drawing the background for their child +controls. To achieve this, they should aggregate an object that implements this interface. +CCoeControl::SetBackground() accepts the object and sets it as the background drawer + +@see CCoeControl::EnableWindowTransparency() +@publishedAll +@released +*/ +class MCoeControlBackground + { +public: + /** Draw the background for a given control. + The text drawer that shall be used to draw text on the specific background can be + fetched through the GetTextDrawer() method. + + @param aGc Graphics context used for drawing + @param aControl The control being drawn (may be a child of the drawer) + @param aRect The area to be redrawn + + @publishedAll + @released + */ + virtual void Draw(CWindowGc& aGc, const CCoeControl& aControl, const TRect& aRect) const = 0; + /** + This function retrieves the text drawer associated with the background. + @param aTextDrawer The text drawer associated with the background. This may be null. The default implementation + always sets this to 0. + @param aDrawingControl The control that is requesting the text drawer. + */ + IMPORT_C virtual void GetTextDrawer(CCoeTextDrawerBase*& aTextDrawer, const CCoeControl* aDrawingControl) const; +protected: + IMPORT_C MCoeControlBackground(); +private: + IMPORT_C virtual void MCoeControlBackground_Reserved1(); + IMPORT_C virtual void MCoeControlBackground_Reserved2(); + IMPORT_C virtual void MCoeControlBackground_Reserved3(); + IMPORT_C virtual void MCoeControlBackground_Reserved4(); + IMPORT_C virtual void MCoeControlBackground_Reserved5(); +private: + TInt iMCoeControlBackground_Reserved1(); + }; + +/** Abstract interface for defining a control's hit region. + +This could be implemented by a CCoeControl-derived class to +define hit region checking. The object is installed by calling CCoeControl::SetHitTest(). + +The hit region is the area inside the control's rectangle in which pointer events are handled. +It can be any shape, not necessarily rectangular. + +@publishedAll +@released +*/ +class MCoeControlHitTest + { +public: + /** Tests whether a pointer event occurred inside the control's hit region. + This function is called by CCoeControl::HandlePointerEventL(). + + @param aPoint The position of the pointer event. + @return ETrue if the specified point lies inside the hit region, EFalse if not. + + @publishedAll + @released + */ + virtual TBool HitRegionContains(const TPoint& aPoint, const CCoeControl& aControl) const = 0; +protected: + IMPORT_C MCoeControlHitTest(); +private: + IMPORT_C virtual void MCoeControlHitTest_Reserved1(); + IMPORT_C virtual void MCoeControlHitTest_Reserved2(); +private: + TInt iMCoeControlHitTest_Reserved1; + }; + + +/** +Control base class from which all other controls are derived. + +@publishedAll +@released +*/ +class CCoeControl : public CBase, public MObjectProvider + { +public: + enum TZoomType + { + EAbsoluteZoom, // absolute + ERelativeZoom // relative to parent's zoom + }; +public: + // Construction and destruction + IMPORT_C CCoeControl(); + IMPORT_C CCoeControl(CCoeEnv* aCoeEnv); + IMPORT_C ~CCoeControl(); + IMPORT_C TBool ComponentArrayExists() const; +public: // Virtuals (see more related non-virtuals further down) + // Key input + IMPORT_C virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); + // Visual state + IMPORT_C virtual void MakeVisible(TBool aVisible); + IMPORT_C virtual void SetDimmed(TBool aDimmed); + // Construction + IMPORT_C virtual void SetContainerWindowL(const CCoeControl& aContainer); + IMPORT_C virtual void ConstructFromResourceL(TResourceReader& aReader); + IMPORT_C virtual void ActivateL(); + // Focus + IMPORT_C virtual void PrepareForFocusLossL(); + IMPORT_C virtual void PrepareForFocusGainL(); + // Control proximity + IMPORT_C virtual void SetAdjacent(TInt aAdjacent); + IMPORT_C virtual void SetNeighbor(CCoeControl* aNeighbor); + IMPORT_C virtual TBool HasBorder() const; // deprecated from 9.2 + // Control size + IMPORT_C virtual TSize MinimumSize(); + // Resource change handling + IMPORT_C virtual void HandleResourceChange(TInt aType); + // Logical color use (for Java) + IMPORT_C virtual void GetColorUseListL(CArrayFix& aColorUseList) const; + // User help + IMPORT_C virtual void GetHelpContext(TCoeHelpContext& aContext) const; + // Text input + IMPORT_C virtual TCoeInputCapabilities InputCapabilities() const; +public: + // Environment + inline CCoeEnv* ControlEnv() const; + // Container window + IMPORT_C RDrawableWindow* DrawableWindow() const; + IMPORT_C TBool OwnsWindow() const; + IMPORT_C TBool IsBackedUp() const; + IMPORT_C void SetContainerWindowL(RWindow& aWindow); // deprecated from 9.2 + IMPORT_C void SetContainerWindowL(RBackedUpWindow& aWindow); // deprecated from 9.2 + // Control parent + IMPORT_C CCoeControl* Parent(); + IMPORT_C const CCoeControl* Parent() const; + IMPORT_C virtual TInt SetParent(CCoeControl* aParent); + // Size and position + IMPORT_C TRect Rect() const; + IMPORT_C void SetRect(const TRect& aRect); + IMPORT_C void SetExtent(const TPoint& aPosition,const TSize& aSize); + IMPORT_C void SetExtentToWholeScreen(); + IMPORT_C TSize Size() const; + IMPORT_C void SetSize(const TSize& aSize); + IMPORT_C TPoint Position() const; + IMPORT_C TPoint PositionRelativeToScreen() const; + IMPORT_C void SetPosition(const TPoint& aPosition); + IMPORT_C TInt MaximumWidth() const; + IMPORT_C TInt SetMaximumWidth(TInt aMaxWidth); + // Layout + IMPORT_C MCoeLayoutManager* LayoutManager() const; + IMPORT_C virtual void SetLayoutManagerL(MCoeLayoutManager* aLayout); + IMPORT_C virtual TBool RequestRelayout(const CCoeControl* aChildControl); + // Visibility + IMPORT_C TBool IsVisible() const; + IMPORT_C void SetComponentsToInheritVisibility(TBool aInherit=ETrue); + // Dimmed + IMPORT_C TBool IsDimmed() const; + // State observer + IMPORT_C void SetObserver(MCoeControlObserver* aObserver); + IMPORT_C MCoeControlObserver* Observer() const; + // Focus + IMPORT_C TBool IsFocused() const; + IMPORT_C void SetFocus(TBool aFocus,TDrawNow aDrawNow=ENoDrawNow); + IMPORT_C void SetNonFocusing(); + IMPORT_C void SetFocusing(TBool aFocusing); + IMPORT_C TBool IsNonFocusing() const; + // Drawing (see also Draw() below) + IMPORT_C void DrawNow() const; + IMPORT_C void DrawNow(const TRect &aRect) const; + IMPORT_C void DrawDeferred() const; + IMPORT_C CWindowGc& SystemGc() const; + IMPORT_C TInt SetCustomGc(CWindowGc* aGraphicsContext); + IMPORT_C CWindowGc* CustomGc() const; + // Control context (background color etc). Deprecated (use MCoeControlBackground) + IMPORT_C void SetControlContext(MCoeControlContext* aContext); // deprecated from 9.2 + IMPORT_C void CopyControlContextFrom(const CCoeControl* aControl); // deprecated from 9.2 + IMPORT_C MCoeControlContext* ControlContext() const; // deprecated from 9.2 + // Pointer events + IMPORT_C void SetPointerCapture(TBool aCapture=ETrue); + IMPORT_C void ClaimPointerGrab(TBool aSendUpEvent=ETrue); + IMPORT_C void IgnoreEventsUntilNextPointerUp(); + IMPORT_C void SetGloballyCapturing(TBool aGlobal); + // Pointer hit test + IMPORT_C TInt SetHitTest(const MCoeControlHitTest* aHitTestControl); + IMPORT_C const MCoeControlHitTest* HitTest() const; + // Logical colors + IMPORT_C void OverrideColorL(TInt aLogicalColor,TRgb aColor); + IMPORT_C TBool GetColor(TInt aLogicalColor,TRgb& aColor) const; + // Control background + IMPORT_C void DrawBackground(const TRect& aRect) const; + IMPORT_C void DrawForeground(const TRect& aRect) const; + IMPORT_C const MCoeControlBackground* Background() const; + IMPORT_C const MCoeControlBackground* FindBackground() const; + IMPORT_C void SetBackground(const MCoeControlBackground* aBackground); + // Zooming + IMPORT_C void SetZoomFactorL(TInt aZoomFactor, TZoomType aZoomType = ERelativeZoom); + IMPORT_C TZoomFactor AccumulatedZoom() const; + IMPORT_C const TCoeZoomWithType* ZoomWithType() const; + // Font provider (see ScreenFont() below) + IMPORT_C const CCoeFontProvider& FindFontProvider() const; + IMPORT_C void SetFontProviderL(const CCoeFontProvider& aFontProvider); + // Text baseline (virtuals) + IMPORT_C virtual TInt TextBaselineOffset(const TSize& aSize) const; + IMPORT_C virtual void SetTextBaselineSpacing(TInt aSpacing); + // Input capabilities + IMPORT_C TCoeInputCapabilities RecursivelyMergedInputCapabilities() const; + // Interface access + IMPORT_C void SetMopParent(MObjectProvider* aParent); + // Instance identification + IMPORT_C TInt UniqueHandle() const; + IMPORT_C TInt SetUniqueHandle(TInt aUniqueHandle); +public: // Pointer events (virtuals) + IMPORT_C virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent); +protected: // Virtuals. Override to handle these events. + IMPORT_C virtual void HandlePointerBufferReadyL(); // See HandlePointerEventL() + // Change of focus + IMPORT_C virtual void FocusChanged(TDrawNow aDrawNow); + // Change of size and position + IMPORT_C virtual void SizeChanged(); + IMPORT_C virtual void PositionChanged(); +public: + // Component control access + IMPORT_C virtual TInt CountComponentControls() const; + IMPORT_C virtual CCoeControl* ComponentControl(TInt aIndex) const; + IMPORT_C TInt Index(const CCoeControl* aControl) const; +protected: + // Control state + IMPORT_C TBool IsActivated() const; + IMPORT_C TBool IsBeingDestroyed() const; + // Component ownership + IMPORT_C void InitComponentArrayL(); + IMPORT_C CCoeControlArray& Components(); + IMPORT_C const CCoeControlArray& Components() const; + // Container window + IMPORT_C RWindow& Window() const; + IMPORT_C RBackedUpWindow& BackedUpWindow() const; + IMPORT_C void CloseWindow(); + IMPORT_C void CreateWindowL(); + IMPORT_C void CreateWindowL(const CCoeControl* aParent); + IMPORT_C void CreateWindowL(RWindowTreeNode& aParent); + IMPORT_C void CreateWindowL(RWindowGroup* aParent); + IMPORT_C void CreateBackedUpWindowL(RWindowTreeNode& aParent); + IMPORT_C void CreateBackedUpWindowL(RWindowTreeNode& aParent,TDisplayMode aDisplayMode); + IMPORT_C void EnableWindowTransparency(); + // Size and position + IMPORT_C void SetCornerAndSize(TGulAlignment aCorner,const TSize& aSize); + IMPORT_C void SetSizeWithoutNotification(const TSize& aSize); + // Font access + IMPORT_C const CFont& ScreenFont(const TCoeFont& aFont) const; + // Text drawer + IMPORT_C CCoeTextDrawerBase& TextDrawer(TInt aKey = KErrNotFound) const; + // Pointer events + IMPORT_C void EnableDragEvents(); + IMPORT_C void HandleRedrawEvent(const TRect& aRect) const; + IMPORT_C void SetAllowStrayPointers(); + IMPORT_C CCoeControl* GrabbingComponent() const; + IMPORT_C TBool CapturesPointer() const; + // Drawing + IMPORT_C TBool IsReadyToDraw() const; + IMPORT_C TBool IsBlank() const; + IMPORT_C void SetBlank(); + IMPORT_C void SetCanDrawOutsideRect(); + IMPORT_C void ActivateGc() const; + IMPORT_C void DeactivateGc() const; + IMPORT_C void ResetGc() const; + // State events + IMPORT_C void ReportEventL(MCoeControlObserver::TCoeEvent aEvent); + // Resource changes + IMPORT_C void HandleComponentControlsResourceChange(TInt aType); + // Copy Constructor and Assignment Operator + inline CCoeControl(const CCoeControl& aControl); + inline CCoeControl& operator=(const CCoeControl& aControl); +protected: + friend class CCoeControlArray; + IMPORT_C virtual void HandleControlArrayEventL(CCoeControlArray::TEvent aEvent, const CCoeControlArray* aArray, CCoeControl* aControl, TInt aControlId); +private: // reserved + IMPORT_C virtual void Reserved_CCoeControl_10(); + IMPORT_C virtual void Reserved_CCoeControl_11(); + IMPORT_C virtual void Reserved_CCoeControl_12(); + IMPORT_C virtual void Reserved_CCoeControl_13(); +private: + IMPORT_C virtual void GetTextDrawer(CCoeTextDrawerBase*& aTextDrawer, const CCoeControl* aDrawingControl, TInt aKey) const; +private: // reserved + IMPORT_C virtual void Reserved_CCoeControl_8(); + IMPORT_C virtual void Reserved_CCoeControl_9(); +protected: // from MObjectProvider + IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId); +private: // from MObjectProvider + IMPORT_C MObjectProvider* MopNext(); +private: + // Drawing (override this to draw) + IMPORT_C virtual void Draw(const TRect& aRect) const; +protected: + // Debugging + IMPORT_C virtual void WriteInternalStateL(RWriteStream& aWriteStream) const; +private: // reserved + IMPORT_C virtual void Reserved_2(); +public: // but not exported + void ProcessPointerEventL(const TPointerEvent& aPointerEvent); + void ProcessPointerBufferReadyL(); + void RecursivelyMergeInputCapabilities(TCoeInputCapabilities& aInputCapabilities) const; + void WriteInternalStateNowL(RWriteStream& aWriteStream) const; + void NotifyFontChange(const CCoeFontProvider* aFontProvider); + void RemoveFromParent(); + void RefetchPixelMappingL(); +public: // deprecated + inline TInt SetGc(CWindowGc* aGraphicsContext) const; + inline CWindowGc* GetGc() const; +private: + friend class CCoeRedrawer; + void DrawComponents(const TRect& aRect) const; + void DrawWindowOwningComponentsNow() const; + void DrawWindowOwningComponentsNow(const TRect &aRect) const; + void SetGrabbed(TBool aGrabbed); + TBool IsGrabbed() const; + void DoMakeVisible(TBool aVisible); + void CheckPointerEventPurge() const; + void RecursivelyMergeTextDrawers(CCoeTextDrawerBase*& aTextDrawer, const CCoeControl* aDrawingControl, TInt aKey) const; + CCoeControl* WindowOwningParent(); + const CCoeControl* WindowOwningParent() const { return const_cast(this)->WindowOwningParent(); } + const CCoeControl* SearchParent(const CCoeControl* aParentToFind) const; + TInt SetZoomWithType(TCoeZoomWithType* aZoomWithType); + TCoeZoomWithType* GetZoomWithType() const; + TInt SetFontProvider(const CCoeFontProvider* aFontProvider); + const CCoeFontProvider* GetFontProvider() const; + TInt FindColor(TInt aLogicalColor) const; + void ActivateGcRecursive() const; + void DeactivateGcRecursive() const; + void ReportControlStateChange(MCoeControlStateObserver::TCoeState aType); +public: + IMPORT_C void EnableReportControlStateChange(TBool aState); + +protected: + CCoeEnv* iCoeEnv; + MCoeControlContext* iContext; // deprecated + TPoint iPosition; + TSize iSize; +private: + TInt iFlags; + RDrawableWindow* iWin; + RCoeDynamicDataStorage* iData; + MObjectProvider* iMopParent; + }; + + +/** +Gets the control environment object for this control. + +@return The control's control environment object. +*/ +inline CCoeEnv* CCoeControl::ControlEnv() const + { return(iCoeEnv); } + +/** +Deprecated. See CCoeControl::SetCustomGc(). +@deprecated +*/ +inline TInt CCoeControl::SetGc(CWindowGc* aGraphicsContext) const + { return const_cast(this)->SetCustomGc(aGraphicsContext); } + +/** +Deprecated. See CCoeControl::CustomGc(). +@deprecated +*/ +inline CWindowGc* CCoeControl::GetGc() const + { return CustomGc(); } + + +#endif // __COECNTRL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coecobs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coecobs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,117 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COECOBS_H__ +#define __COECOBS_H__ + +#include +#include + +class CCoeControl; + +class MCoeControlObserver +/** Interface for a control to send events to its observer control. + +@publishedAll +@released */ + { +public: + /** Observer event types. */ + enum TCoeEvent + { + /** Request exit. + This event is used to indicate exit from a mode when + the user has completed an operation 'successfully'. For example, this + event might be sent when the user has a choice list open and presses + enter to select an item. The UI Control Framework does not use this + event itself. */ + EEventRequestExit, + /** Request cancel. + This event is used to indicate exit from a mode when the user has cancelled + the operation that caused entry into the mode originally. For example, this + event might be sent when the user presses escape to close the list and leave + the choice as it was. The UI Control Framework does not use this event itself. */ + EEventRequestCancel, + /** Request focus. + This event is notified by the UI Control Framework during pointer down event + processing after EEventPrepareFocusTransition is handled. */ + EEventRequestFocus, + /** Prepare focus transition. + This event is notified by the UI Control Framework during pointer down event + processing if the control does not yet have, but could get, focus. */ + EEventPrepareFocusTransition, + /** State changed. + This event can be used by a control to report that some piece of internal + data has changed, and hence that any observer should be notified accordingly. + The UI Control Framework does not use this value itself. */ + EEventStateChanged, + /** Interaction refused. + This event is notified by the UI Control Framework during pointer down event + processing if the control is dimmed (disabled). */ + EEventInteractionRefused + }; +public: + /** Handles an event from an observed control. + + This function is called when a control for which this control is the observer + calls CCoeControl::ReportEventL(). It should be implemented by the observer + control, and should handle all events sent by controls it observes. + + @param aControl The control that sent the event. + @param aEventType The event type. */ + virtual void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType)=0; +protected: + IMPORT_C MCoeControlObserver(); + +private: + IMPORT_C virtual void MCoeControlObserver_Reserved1(); + IMPORT_C virtual void MCoeControlObserver_Reserved2(); + +private: + TInt iMCoeControlObserver_Reserved1; + }; + +class MCoeControlStateObserver +/** This class defines an interface which will given notification of when a CCoeControl +changes its visibility or dimmed state. + +@publishedAll +@released */ + { + friend class CCoeControl; +public: + /** The MObjectProvider framework should use this UID to know when to return a concrete instance of this interface. */ + DECLARE_TYPE_ID(0x10285A45) + enum TCoeState + { + /** This enum is used to say that the control has changed its Dimmed state */ + EStateDimmed, + /** This enum is used to say that the control has changed its Visibility state */ + EStateVisibility + }; +private: + /** + If an object implementing this interface has been attached to the MObjectProvider + hierarchy in which a CCoeControl is a member, any call to the CCoeControl's + SetDimmed() or MakeVisible() (that results in an actual state change) will trigger + a call to this interface. + + @param aControl A pointer to the control that has changed. + @param aState An enum from TCoeState to say how the control has changed. + @return A system wide error code, currently ignored but may not be in future.*/ + virtual TInt HandleControlStateChange(CCoeControl* aControl,TCoeState aState)=0; + }; + +#endif // __COECOBS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coecoloruse.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coecoloruse.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,122 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COECOLORUSE_H__ +#define __COECOLORUSE_H__ + +#include + +/** Logical colour used when drawing in controls. + +This class pairs a logical colour value with an explanation of how it is used +when drawing a control. The explanation is in terms of categories of use, e.g. +in the TGround category, the colour can used for either the foreground or +background. + +@publishedAll +@released */ +class TCoeColorUse + { +public: + /** Foreground and background category flags */ + enum TGround + { + /** The logical colour is used to draw the control when it is in the foreground. */ + EFore=0x01, + /** The logical colour is used to draw the control when it is in the background. */ + EBack=0x02 + }; + + /** Flags that control the area in which colour is used. */ + enum TAreas + { + /** The logical colour is used to draw a control's contents. */ + EContents=0x10, + /** The logical colour is used to draw a control's highlighted contents. */ + EHighlights=0x20, + /** The logical colour is used to draw a control's surrounds. */ + ESurrounds=0x40, + /** The logical colour is used to draw a control's borders. */ + EBorders=0x80 + }; + + /** Focus category flags */ + enum TFocus + { + /** The logical colour is used to draw the control when active and either focused + or unfocused. */ + EActive=0x100, + /** The logical colour is used to draw the control when dimmed and either focused + or unfocused. */ + EDimmed=0x200, + /** The logical colour is used to draw the control when it is shadowed. */ + EShadowed=0x400, + /** The logical colour is used to draw the control when focused and pressed. */ + EPressed=0x800 + }; + + /** State category flags */ + enum TState + { + /** The logical colour is used to draw the control in the normal state. */ + ENormal=0x1000, + /** The logical colour is used to draw the control in the set state. */ + ESet=0x2000, + /** The logical colour is used to draw the control in the checked state. */ + EChecked=0x4000 + }; + + /** Tone flags */ + enum TTones + { + /** The logical colour is used to draw the control in neutral tones. */ + ENeutral=0x10000, + /** The logical colour is used to draw the control in light tones. */ + ELight=0x20000, + /** The logical colour is used to draw the control in midlight tones. */ + EMidLight=0x40000, + /** The logical colour is used to draw the control in mid tones. */ + EMid=0x80000, + /** The logical colour is used to draw the control in dark tones. */ + EDark=0x100000 + }; +public: + IMPORT_C TCoeColorUse(); + // + IMPORT_C void SetUse(TInt aUse); + IMPORT_C void SetLogicalColor(TInt aLogicalColor); + IMPORT_C TInt LogicalColor() const; + IMPORT_C TInt Use() const; + // + IMPORT_C TBool IsForeground() const; + IMPORT_C TBool IsBackground() const; + // + IMPORT_C TBool IsContents() const; + IMPORT_C TBool IsHighlights() const; + IMPORT_C TBool IsSurrounds() const; + IMPORT_C TBool IsBorders() const; + IMPORT_C TBool IsActive() const; + IMPORT_C TBool IsDimmed() const; + IMPORT_C TBool IsPressed() const; + IMPORT_C TBool IsNormal() const; + IMPORT_C TBool IsSet() const; +private: + TInt iLogicalColor; + TInt iUse; + TInt iTCoeColorUse_Reserved1; + }; + + +#endif // __COECOLORUSE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coecontrolarray.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coecontrolarray.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,183 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#ifndef __COECONTROLARRAY_H__ +#define __COECONTROLARRAY_H__ + +#include // class CBase + +class CCoeControl; + +/** Default id for controls that have no associated id. This is equal +to KErrNotFound +@publishedAll +@released +*/ +const TInt KCoeNoControlId = KErrNotFound; + +/** Class that encapsulates a control and the identifier for that control. + +Controls in a CCoeControlArray can be associated with an id. This class encapsulates the control and its id. + +@publishedAll +@released */ +class TCoeControlWithId + { +public: + TCoeControlWithId(TInt aControlId, CCoeControl* aControl = NULL); +public: + /** The control */ + CCoeControl* iControl; + /** The id of the control */ + TInt iId; + }; + +/** Class that represents an array of controls. + +The CCoeControlArray class is used to store the child controls of a container control. +The method CCoeControl::InitComponentArrayL() must be used to create the array and the method +CCoeControlArray& CCoeControl::Components() can be used to get this array. + +@publishedAll +@released */ +class CCoeControlArray : public CBase + { +public: + /** This class is an iterator for the CCoeControlArray class. + @publishedAll + @released + */ + class TCursor // robust iterator + { + public: + template T* Control(); + template const T* Control() const; + IMPORT_C TBool Prev(); + IMPORT_C TBool Next(); + IMPORT_C TBool IsValid() const; + + IMPORT_C TBool operator==(const TCursor& aCursor) const; + IMPORT_C TBool operator!=(const TCursor& aCursor) const; + public: + TCursor(const CCoeControlArray& aArray, TInt aIndex); + TInt Index() const; + private: + IMPORT_C CCoeControl* Ctrl() const; + void UpdateMemento() const; + void UpdateIndex() const; + private: + const CCoeControlArray* iArray; + mutable TInt iIndex; + mutable TCoeControlWithId iMemento; + }; +public: + IMPORT_C static CCoeControlArray* NewL(CCoeControl& aOwner); + IMPORT_C ~CCoeControlArray(); + IMPORT_C TInt Count() const; + IMPORT_C void Reset(); + IMPORT_C void ResetAndDestroy(); + IMPORT_C void SortById(); + + IMPORT_C TBool ControlsOwnedExternally() const; + IMPORT_C void SetControlsOwnedExternally(TBool aOwnedExternally); + + IMPORT_C TBool IsArrayLocked() const; + IMPORT_C void SetArrayLocked(); + + template T* ControlById(TInt aControlId); + template const T* ControlById(TInt aControlId) const; + + IMPORT_C TCursor Begin() const; + IMPORT_C TCursor End() const; + IMPORT_C TCursor Find(const CCoeControl* aControl) const; + IMPORT_C TCursor Find(TInt aControlId) const; + + IMPORT_C TCursor AppendLC(CCoeControl* aControl, TInt aControlId = KCoeNoControlId); + IMPORT_C TCursor InsertAfterLC(TInt aInsertAfterId, CCoeControl* aControl, TInt aControlId = KCoeNoControlId); + IMPORT_C TCursor InsertLC(TCursor& aInsertAt, CCoeControl* aControl, TInt aControlId = KCoeNoControlId); + + IMPORT_C TInt Remove(const CCoeControl* aControl); + IMPORT_C CCoeControl* Remove(TCursor aRemoveAt); + IMPORT_C CCoeControl* RemoveById(TInt aControlId); +public: + IMPORT_C TInt Replace(CCoeControl* aOriginalControl, CCoeControl* aNewControl); + +public: // internal use only + IMPORT_C TCoeControlWithId At(TInt aIndex); + IMPORT_C const TCoeControlWithId At(TInt aIndex) const; + IMPORT_C TInt Id(const CCoeControl& aControl) const; + IMPORT_C void Sort(TLinearOrder< TCoeControlWithId > aOrder); +public: + /** Defines the possible events related to a change to the contents + of the array. */ + enum TEvent + { + /** A control has been added to the array */ + EControlAdded, + /** A control has been removed from the array */ + EControlRemoved + }; + +private: + IMPORT_C CCoeControlArray(CCoeControl& aOwner); + TInt IndexById(TInt aControlId) const; + IMPORT_C CCoeControl* CtrlById(TInt aControlId) const; + +private: + CCoeControl& iOwner; + TInt iFlags; + RArray iControls; + }; + +/** Gets the control. +@return The control at the current cursor position. +*/ +template +T* CCoeControlArray::TCursor::Control() + { + return static_cast(Ctrl()); + } + +/** Gets the control. +@return The control at the current cursor position. +*/ +template +const T* CCoeControlArray::TCursor::Control() const + { + return static_cast(Ctrl()); + } + +/** Gets the control with the given id. +@param aControlId The id of the desired control. +@return The control with the given id. +*/ +template +T* CCoeControlArray::ControlById(TInt aControlId) + { + return static_cast(CtrlById(aControlId)); + } + +/** Gets the control with the given id. +@param aControlId The id of the desired control. +@return The control with the given id. +*/ +template +const T* CCoeControlArray::ControlById(TInt aControlId) const + { + return static_cast(CtrlById(aControlId)); + } + +#endif //__COECONTROLARRAY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coedef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coedef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,138 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEDEF_H__ +#define __COEDEF_H__ + +#include +#include // only requried for limited source compatability with releases prior to 250 + +const TInt KCoeCustomColorsArrayValue=0x100057C2; +const TInt KCoeColorGray4=0x19bd6002; +const TInt KCoeColorColor16=0x19bd6003; +const TInt ECoeResourceSignatureValue=4; + +/** Event handling flags. + +These should be returned by CCoeControl::OfferKeyEventL() to indicate whether +or not a key event was processed by the control. + +@publishedAll +@released */ +enum TKeyResponse + { + /** The key event was not handled. */ + EKeyWasNotConsumed, + /** The key event was handled. */ + EKeyWasConsumed + }; + +/** Control redraw flags. + +Passed to CCoeControl::SetFocus() to indicate the requirements for control +redrawing. + +@publishedAll +@released */ +enum TDrawNow + { + /** Redraw of the control is not required immediately. */ + ENoDrawNow, + /** Redraw control immediately. */ + EDrawNow + }; + +/** Window priority values. + +These are passed in the aOrdinalPriority argument to RWindowTreeNode::SetOrdinalPosition(). + +@publishedAll +@released */ +enum TCoeWinPriority + { + /** -1000 */ + ECoeWinPriorityNeverAtFront =-1000, + /** -750 */ + ECoeWinPriorityLow =-750, + /** 0 */ + ECoeWinPriorityNormal =0, + /** 500 */ + ECoeWinPriorityMedium =500, + /** 750 */ + ECoeWinPriorityHigh =750, + /** 900 */ + ECoeWinPriorityFep =900, + /** 1000 */ + ECoeWinPriorityAlwaysAtFront =1000 + }; + +/** The message UID sent when a colour scheme change event occurs. + +@internalTechnology */ +const TInt KUidValueCoeColorSchemeChangeEvent =0x100056C4; +const TInt KUidValueCoeZoomChangeEvent =0x100057C3; +const TInt KUidValueCoeFontChangeEvent =0x100057C4; + +/** @internalTechnology */ +const TUint KUidFepFrameworkRepository=0x10272618; + +/** @internalTechnology */ +enum // key-masks and keys for the "KUidFepFrameworkRepository" repository + { + ERepositoryKeyMask_DefaultSetting =0x00001000, + ERepositoryKeyMask_DynamicSetting =0x00002000, + + ERepositoryKeyMask_FepId =0x00000001, + ERepositoryKeyMask_OnState =0x00000002, + ERepositoryKeyMask_OnKeyData =0x00000004, + ERepositoryKeyMask_OffKeyData =0x00000008, + + ERepositoryKey_DefaultFepId =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_FepId, + ERepositoryKey_DefaultOnState =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_OnState, + ERepositoryKey_DefaultOnKeyData =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_OnKeyData, + ERepositoryKey_DefaultOffKeyData =ERepositoryKeyMask_DefaultSetting|ERepositoryKeyMask_OffKeyData, + + ERepositoryKey_DynamicFepId =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_FepId, + ERepositoryKey_DynamicOnState =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_OnState, + ERepositoryKey_DynamicOnKeyData =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_OnKeyData, + ERepositoryKey_DynamicOffKeyData =ERepositoryKeyMask_DynamicSetting|ERepositoryKeyMask_OffKeyData + }; + +/** @internalTechnology */ +#if defined(_DEBUG) +#define __DEBUG_CHECK_HEAP_INTEGRITY User::Heap().Check() +#else +#define __DEBUG_CHECK_HEAP_INTEGRITY +#endif + +/** Control key modifier. + +Key codes get changed when the Ctrl key modifier is pressed at the same time as the key . +The CTRL macro is used to shift the key character appropriately. + +Note: this is not an inline function since that can't be used as the case of a switch +statement. + +@publishedAll +@released */ +#define CTRL(x) ((x)-'a'+1) + +/** Constant that represents all standard keyboard modifier keys. + +@publishedAll +@released */ +#define EAllStdModifiers (EModifierFunc|EModifierCtrl|EModifierShift) + +#endif // __COEDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coeerror.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coeerror.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,58 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEERROR_H__ +#define __COEERROR_H__ + +/** +@internalTechnology +*/ +#define KUidConeDllValue16 0x10003a41 + +/** +@internalTechnology +*/ +const TUid KUidConeDll16={KUidConeDllValue16}; + + +#if defined(_UNICODE) +/** +@internalTechnology +*/ +#define KUidConeDllValue KUidConeDllValue16 +/** +@internalTechnology +*/ +const TUid KUidConeDll={KUidConeDllValue}; +#else +#define KUidConeDllValue KUidConeDllValue8 +const TUid KUidConeDll={KUidConeDllValue}; +#endif + + +/** UI Control Framework errors. + +@publishedAll +@deprecated */ +enum + { + /** Not used. */ + KErrCoeResourceFileDuplicateOffset, + /** Read fail. CCoeEnv::ReadResource() sets this as the + active scheduler's extended error number if the read fails. */ + KErrCoeFailedToReadFromProgDisk + }; + +#endif // __COEERROR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coefepff.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coefepff.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,71 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEFEPFF_H__ +#define __COEFEPFF_H__ + +#include + +class CCoeFepParameters; +class CCoeFep; + +/** FEP factory function which must be exported by every FEP. + +The function is called by the UI Control Framework when it loads the +FEP. It returns a fully constructed object of a CCoeFep-derived class, +and passes ownership of that object to the caller. + +The function can leave with any of the system-wide error codes, +for instance KErrNoMemory. + +@publishedAll +@released +@param aConeEnvironment A reference to the application's control environment. +@param aFullFileNameOfDll The full file name of the FEP's top-level DLL, i.e. +something like "z:\system\fep\TFEP1.FEP". A FEP could use this parameter to +work out the location of its resource file. +@param aFepParameters FEP parameters. These should simply be passed to +CCoeFep::BaseConstructL(). +@return A pointer to the newly created object belonging to a +CCoeFep-derived class. */ +IMPORT_C CCoeFep* NewFepL(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll, const CCoeFepParameters& aFepParameters); + +/** Runs the FEP settings dialog. + +The function is called by the FEPs control panel plug-in in order +to run the settings dialog for the FEP. It must be exported by +every FEP. + +The function can leave with any of the system-wide error codes, +for instance KErrNoMemory. + +Note: the FEP may or may not be loaded when this function is called. + +@publishedAll +@released +@param aConeEnvironment A reference to the application's control environment. +@param aFullFileNameOfDll The full file name of the FEP's top-level DLL, i.e. +something like "z:\system\fep\TFEP1.FEP". */ +IMPORT_C void SynchronouslyExecuteSettingsDialogL(CCoeEnv& aConeEnvironment, const TDesC& aFullFileNameOfDll); +IMPORT_C void Reserved_1(); +IMPORT_C void Reserved_2(); +IMPORT_C void Reserved_3(); +IMPORT_C void Reserved_4(); +IMPORT_C void Reserved_5(); +IMPORT_C void Reserved_6(); +IMPORT_C void Reserved_7(); +IMPORT_C void Reserved_8(); + +#endif // __COEFEPFF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coefont.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coefont.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,81 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEFONT_H__ +#define __COEFONT_H__ + +#include +#include + +/** A class to simplify font usage + +@publishedAll +@released +*/ +class TCoeFont + { +public: + enum TFlags + { + ENoFlags = 0x00, + ENonZooming = 0x01 + }; + + enum TLogicalSize + { + EExtraSmall = 0, + ESmall, + EMedium, + ELarge, + EExtraLarge, + EUndefinedSize = -1 + }; + + enum TStyle + { + EPlain = 0x00, + EItalic = 0x01, + EBold = 0x02, + ESuper = 0x04, + ESub = 0x08 + }; + +public: + IMPORT_C TCoeFont(TLogicalSize aSize, TInt aStyle, TInt aFlags = ENoFlags); + IMPORT_C TCoeFont(TInt aHeightInPixels, TInt aStyle, TInt aFlags = ENoFlags); + IMPORT_C TCoeFont(const TCoeFont& aFont); + IMPORT_C TCoeFont(); + IMPORT_C static TCoeFont NormalFont(TInt aFlags = ENoFlags); // Medium, Plain + IMPORT_C static TCoeFont LegendFont(TInt aFlags = ENoFlags); // Medium, Bold + IMPORT_C static TCoeFont AnnotationFont(TInt aFlags = ENoFlags);// Small, Plain + IMPORT_C static TCoeFont TitleFont(TInt aFlags = ENoFlags); // Large, Bold +public: // properties + IMPORT_C TLogicalSize LogicalSize() const; + IMPORT_C TInt HeightInPixels() const; + IMPORT_C TFontStyle Style() const; + IMPORT_C TBool IsNonZooming() const; +public: + static TInt Compare(const TCoeFont& aFirst, const TCoeFont& aSecond); +private: + TLogicalSize iLogicalSize; + TInt8 iHeightInPixels; + TInt8 iStyle; + TInt8 iFlags; + TTypeface iTypeface; // Member unused at the moment but included for possible future extension +private: + TInt iSpare; + }; + +#endif // __COEFONT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coefontprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coefontprovider.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,68 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEFONTPROVIDER_H__ +#define __COEFONTPROVIDER_H__ + +#include +#include +#include +#include +#include +#include + +/** A helper object designed to make obtaining a font easier, taking into account +zoom factors. + +@publishedAll +@released +*/ +class CCoeFontProvider : public CBase + { +public: // life + IMPORT_C static CCoeFontProvider* NewL(); + IMPORT_C static CCoeFontProvider* NewL(const TDesC& aTypefaceName); + ~CCoeFontProvider(); +public: // methods + IMPORT_C const CFont& Font(const TCoeFont& aFont, const TZoomFactor& aZoomFactor) const; +public: // properties + IMPORT_C void SetTypeface(const TTypeface aTypeface); + IMPORT_C void UseSystemTypeface(); + IMPORT_C TTypeface Typeface() const; +public: //but not exported + void RefetchPixelMappingL(); + +private: + CCoeFontProvider(const TDesC& aTypefaceName); + void ConstructL(); + void ReleaseAllFonts(); +private: + class TFont + { + public: + TFont(const TCoeFont& aFontSpec, TInt aZoomFactor, const CFont* aFont = NULL); + static TInt Compare(const TFont& aFirst, const TFont& aSecond); + public: + const TCoeFont iCoeFont; + const TInt iZoomFactor; + const CFont* iFont; + }; +private: + mutable RArray iFonts; + TTypeface iTypeface; + RArray iLogicalToPixelSizes; + }; + +#endif // __COEFONTPROVIDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coehelp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coehelp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEHELP_H__ +#define __COEHELP_H__ + +#include + +/** Holds the name of the help context. + +@publishedAll +@released */ +typedef TBuf<30> TCoeContextName; + + +class TCoeHelpContext +/** Help context. + +This class contains the information required to link the control and the appropriate +context sensitive help topic. This information includes the UID of the help +file and the literal descriptor for the appropriate help topic context. + +@see CCoeControl::GetHelpContext() +@publishedAll +@released */ + { +public: + IMPORT_C TCoeHelpContext(); + IMPORT_C TCoeHelpContext(TUid aMajor,const TDesC& aContext); + IMPORT_C TBool IsNull() const; + IMPORT_C TBool operator==(const TCoeHelpContext& aContext) const; + IMPORT_C TBool operator!=(const TCoeHelpContext& aContext) const; +public: + /** The UID of the context sensitive help file containing the topic information. */ + TUid iMajor; + /** The name of the help context. This is the literal descriptor generated from + a context string by the context sensitive help compiler. */ + TCoeContextName iContext; +private: + TInt iTCoeHelpContext_Reserved1; + }; + +#endif // __COEHELP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coeinput.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coeinput.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,115 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEINPUT_H__ +#define __COEINPUT_H__ + +#include + +// classes defined in FEPBASE, declared here +class MCoeFepAwareTextEditor; +class MCoeCaptionRetrieverForFep; + +class MObjectProvider; + +class TCoeInputCapabilities +/** Describes which forms of text input are consumed by a control or view. + +@publishedAll +@released */ + { +public: + /** Text input capability flags. These are used to define the text input + capabilities of a control or view. */ + enum + { + /** No text input capabilities supported. */ + ENone =0, + /** Supports positive western integers. */ + EWesternNumericIntegerPositive =0x00000001, + /** Supports negative western integers. */ + EWesternNumericIntegerNegative =0x00000002, + /** Supports real numbers. */ + EWesternNumericReal =0x00000004, + /** Supports the western alphabets. */ + EWesternAlphabetic =0x00000008, + /** Supports Hiragana. */ + EJapaneseHiragana =0x00000010, + /** Supports half width Katakana. */ + EJapaneseKatakanaHalfWidth =0x00000020, + /** Supports full width Katakana. */ + EJapaneseKatakanaFullWidth =0x00000040, + /** Supports dialable characters */ + EDialableCharacters =0x00000080, + /** Supports secret text. This is text in which characters appear + as asterisks. */ + ESecretText =0x00000100, + /** Supports auto sentence case. + This is text in which first word in a sentence begins with an uppercase letter, + with all other letters and words in lowercase. */ + EAutoSentenceCase =0x00000200, + /** Supports non-predictive input. */ + ENonPredictive =0x00000400, + /** Supports all types of text. */ + EAllText =0x01000000, + /** Supports navigation keys. These include arrow keys, page-up, + page-down, home, end, tab, etc. */ + ENavigation =0x02000000 + }; + class MCoeFepSpecificExtensions; // to be defined by concrete FEPs, declared here +public: + // all these functions are exported (rather than inline) so that binary compatibility becomes easier to maintain + IMPORT_C TCoeInputCapabilities(); + IMPORT_C TCoeInputCapabilities(TUint aCapabilities); + IMPORT_C TCoeInputCapabilities(TUint aCapabilities, MCoeFepAwareTextEditor* aFepAwareTextEditor, MCoeCaptionRetrieverForFep* aCaptionRetrieverForFep); + IMPORT_C TCoeInputCapabilities(TUint aCapabilities, MCoeFepAwareTextEditor* aFepAwareTextEditor, MCoeCaptionRetrieverForFep* aCaptionRetrieverForFep, TUid aFepUid, MCoeFepSpecificExtensions* aFepSpecificExtensions); + IMPORT_C TCoeInputCapabilities(const TCoeInputCapabilities& aAnother); // defined so that iSpareForFutureUse is not copied + IMPORT_C TCoeInputCapabilities& operator=(const TCoeInputCapabilities& aAnother); // defined so that iSpareForFutureUse is not copied + IMPORT_C TBool operator==(const TCoeInputCapabilities& aAnother) const; // defined so that iSpareForFutureUse is not tested + IMPORT_C TBool operator!=(const TCoeInputCapabilities& aAnother) const; // defined so that iSpareForFutureUse is not tested + IMPORT_C void MergeWith(const TCoeInputCapabilities& aAnother); + IMPORT_C void SetCapabilities(TUint aCapabilities); + IMPORT_C TUint Capabilities() const; + IMPORT_C TBool IsNone() const; + IMPORT_C TBool SupportsWesternNumericIntegerPositive() const; + IMPORT_C TBool SupportsWesternNumericIntegerNegative() const; + IMPORT_C TBool SupportsWesternNumericReal() const; + IMPORT_C TBool SupportsWesternAlphabetic() const; + IMPORT_C TBool SupportsJapaneseHiragana() const; + IMPORT_C TBool SupportsJapaneseKatakanaHalfWidth() const; + IMPORT_C TBool SupportsJapaneseKatakanaFullWidth() const; + IMPORT_C TBool SupportsDialableCharacters() const; + IMPORT_C TBool SupportsSecretText() const; + IMPORT_C TBool SupportsAutoSentenceCase() const; + IMPORT_C TBool SupportsNonPredictive() const; + IMPORT_C TBool SupportsAllText() const; + IMPORT_C TBool SupportsNavigation() const; + IMPORT_C MCoeFepAwareTextEditor* FepAwareTextEditor() const; + IMPORT_C MCoeCaptionRetrieverForFep* CaptionRetrieverForFep() const; + IMPORT_C MCoeFepSpecificExtensions* FepSpecificExtensions(TUid aFepUid) const; + IMPORT_C MObjectProvider* ObjectProvider() const; + IMPORT_C void SetObjectProvider(MObjectProvider* aObjectProvider); + +private: + TUint iCapabilities; + MCoeFepAwareTextEditor* iFepAwareTextEditor; + MCoeCaptionRetrieverForFep* iCaptionRetrieverForFep; + TUint iFepUid; + MCoeFepSpecificExtensions* iFepSpecificExtensions; + MObjectProvider* iObjectProvider; + TAny* iSpareForFutureUse[5]; + }; + +#endif // __COEINPUT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coelayoutman.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coelayoutman.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,171 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CoeLayoutManager.H +// +// + +#ifndef __COELAYOUTMANAGER_H__ +#define __COELAYOUTMANAGER_H__ + +#include + +class CCoeControl; + + +/** +Base class for layout managers. + +A layout manager can be attached to one, or many (depending on the concrete layout +manager), compound controls. The layout manager handles the layout of the components +of the attached compound controls, and calculates the attached compound controls' +minimum size. + +@publishedAll +@released +*/ +class MCoeLayoutManager + { +protected: + IMPORT_C MCoeLayoutManager(); + +public: + + /** Determines if it is possible to attach another control to the layout manager. + @return ETrue if possible, otherwise EFalse + */ + virtual TBool CanAttach() const = 0; + + /** Attaches aCompoundControl to the layout manager. + Is normally not called manually since CCoeControl::SetLayoutManagerL() + calls this function. + Once a compound control is attached to a layout manager, the layout manager owns itself. + @see Detach() + @see CCoeControl::SetLayoutManagerL() + @param aCompoundControl The compound control. + */ + virtual void AttachL(CCoeControl& aCompoundControl) = 0; + + /** Detaches aCompoundControl from the layout manager. + Is normally not called manually since CCoeControl::SetLayoutManagerL() + calls this function when you switch layout managers on a control. It is also called + from CCoeControl::~CCoeControl + When the last attached compound control detaches, the layout manager deletes itself. + @see CCoeControl::SetLayoutManagerL() + @param aCompoundControl The compound control. + */ + virtual void Detach(CCoeControl& aCompoundControl) = 0; + + /** Calculates the minimum size of aCompoundControl + Is normally not called manually since CCoeControl::MinimumSize() + calls this function in the default implementation on controls with layout managers. + + To calculate the minimum size is almost as time consuming as performing an actual layout + and should be used with caution. The minimum size depends on aCompoundControl's + maximum width. + @see CCoeControl::MaximumWidth() + @param aCompoundControl The compound control + @return The minimum size + */ + virtual TSize CalcMinimumSize(const CCoeControl& aCompoundControl) const = 0; + + /** Performs the layout of the attached controls + Is normally not called manually since CCoeControl::SizeChanged() + calls this function in the default implementation on controls with layout managers. + + The layout is generally performed by calling the component controls' + SetMaximumWidth(), followed by MinimumSize(), and then the + layout manager tries to place the component controls according to their minimum + sizes and the settings. + + @see CCoeControl::SetMaximumWidth() + @see CCoeControl::MinimumSize() + */ + virtual void PerformLayout() = 0; + + /** Gets the offset to the first text baseline relative to the top of the control. + + @param aCompoundControl The control + @param aSize The size of the control + @return The baseline + @see CCoeControl::TextBaselineOffset() + */ + virtual TInt CalcTextBaselineOffset(const CCoeControl& aCompoundControl, const TSize& aSize) const = 0; + + /** Sets the spacing between text baselines. + + @param aBaselineSpacing The new value for the baseline + @see CCoeControl::SetTextBaseLineSpacing() + */ + virtual void SetTextBaselineSpacing(TInt aBaselineSpacing) = 0; + + /** Returns the baseline spacing. + @return The baseline value. + */ + virtual TInt TextBaselineSpacing() const = 0; + + /** Handles when a component control is added to an attached compound control + Is normally not called manually since CCoeControlArray::InsertLC() + calls this function for controls with layout managers. + Is used by layout managers to prepare to layout one more component control. + @see CCoeControlArray::InsertLC() + @param aCompoundControl The compound control. + @param aAddedControl The added control + */ + virtual void HandleAddedControlL(const CCoeControl& aCompoundControl, const CCoeControl& aAddedControl) = 0; + + /** Handles when a component control is removed from an attached compound control + Is normally not called manually since CCoeControlArray::Remove() + calls this function for controls with layout managers. + Is used by layout managers to remove all settings and similar that are specific for + aRemovedControl. + @see CCoeControlArray::Remove() + @param aCompoundControl The compound control. + @param aRemovedControl The removed control + */ + virtual void HandleRemovedControl(const CCoeControl& aCompoundControl, const CCoeControl& aRemovedControl) = 0; + + /** Handles when a component control is replaced by another component control + in an attached compound control + + Is not called by CCoeControl. + Is used by layout managers to move settings and similar that are specified for + aOldControl to aNewControl + If this function is called, neither HandleAddedControlL nor + HandleRemovedControl is allowed to be called. + @param aOldControl The old component control + @param aNewControl The new component control + @return KErrNone if no error. KErrNotFound if the + layout manager cannot find aOldControl + */ + virtual TInt HandleControlReplaced(const CCoeControl& aOldControl, const CCoeControl& aNewControl) = 0; + + +private: + IMPORT_C virtual void Reserved_MCoeLayoutManager_1(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_2(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_3(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_4(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_5(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_6(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_7(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_8(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_9(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_10(); + IMPORT_C virtual void Reserved_MCoeLayoutManager_11(); +private: + TInt iMCoeLayoutManager_Reserved1; + }; + + +#endif // __COELAYOUTMANAGER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coemain.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coemain.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,558 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEMAIN_H__ +#define __COEMAIN_H__ + +#include +#include +#include +#include +#include +#include +#include + +#if defined(USE_IH_RAISE_EVENT) +#include +#include +#endif + +class CVwsSessionWrapper; +class MVwsSessionWrapperObserver; +class TCoeInputCapabilities; // forward declaration of class defined in COEINPUT.H +class CCoeAppUi; +class CCoeEnv; +class TResourceReader; +class RGenericPointerArray; +class CCoeFep; // must derive from CBase +class CCoeFontProvider; +class CCoeEnvExtra; +class CCoeStatic; + + +/** UI Control framework active object priorities. +These are in addition to the values contained in the TPriority enum in class CActive. + +@publishedAll +@released */ +enum TActivePriority + { + /** 300 */ + EActivePriorityClockTimer=300, + /** 200 */ + EActivePriorityIpcEventsHigh=200, + /** 150 */ + EActivePriorityFepLoader=150, + /** 100 */ + EActivePriorityWsEvents=100, + /** 50 */ + EActivePriorityRedrawEvents=50, + /** 0 */ + EActivePriorityDefault=0, + /** 10 */ + EActivePriorityLogonA=-10 + }; + + +/** Interface providing notification when there is a change in the currently +loaded FEP. + +This happens either on application start-up, or as a result of a different +front end processor having been installed. + +Anyone requiring this notification should derive from this class and implement +its pure virtual function. Derived classes also need to call CCoeEnv::AddObserverOfLoadedFepL() +during construction, and CCoeEnv::RemoveObserverOfLoadedFep() in their destructor. + +@publishedAll +@released */ +class MCoeObserverOfLoadedFep + { +public: + /** Handles a change in the loaded FEP. + + The function is called if a new FEP is loaded, or if the current one is unloaded. */ + virtual void HandleChangeInLoadedFep()=0; +protected: + IMPORT_C MCoeObserverOfLoadedFep(); + +private: + IMPORT_C virtual void MCoeObserverOfLoadedFep_Reserved_1(); + IMPORT_C virtual void MCoeObserverOfLoadedFep_Reserved_2(); +private: + TInt iMCoeObserverOfLoadedFep_Reserved1; + }; + + +/** Interface providing notification if any control gains or loses focus or is +destroyed. + +The FEP framework uses this class to observe when a target control changes +for reasons unrelated to the FEP. + +Anything that needs such notification should derive from this class and implement +its two pure virtual functions. + +In addition, derived classes need to call CCoeEnv::AddFocusObserverL() during +construction, and CCoeEnv::RemoveFocusObserver() in their destructors. + +@publishedAll +@released +@see CCoeFep */ +class MCoeFocusObserver + { +public: + /** Handles changes in focus. The function is called if any control gains or loses + focus. */ + virtual void HandleChangeInFocus()=0; + /** Handles the destruction of any control. It is called by the framework if any + control is destroyed. */ + virtual void HandleDestructionOfFocusedItem()=0; +protected: + IMPORT_C MCoeFocusObserver(); +private: + IMPORT_C virtual void MCoeFocusObserver_Reserved_1(); + IMPORT_C virtual void MCoeFocusObserver_Reserved_2(); +private: + TInt iMCoeFocusObserver_Reserved1; + }; + +/** An interface which enables message windows to observe resource changes. + +Resource change observers should be added to the control environment using +CCoeEnv::AddResourceChangeObserverL(). + +@publishedAll +@released */ +class MCoeResourceChangeObserver + { +public: + /** Handles a change to the application's resources. */ + virtual void HandleResourceChange()=0; +protected: + IMPORT_C MCoeResourceChangeObserver(); +private: + IMPORT_C virtual void MCoeResourceChangeObserver_Reserved_1(); + IMPORT_C virtual void MCoeResourceChangeObserver_Reserved_2(); +private: + TInt iMCoeResourceChangeObserver_Reserved1; + }; + +/** Interface providing notification of foreground/background changes. + +The FEP framework class, CCoeFep, derives from MCoeForegroundObserver, which +enables FEPs to receive notification when the target application (which receives +the FEP's output) goes into the foreground or background. + +Anything that needs this notification should derive from this class and override +its two pure virtual functions. + +In addition, derived classes also need to call CCoeEnv::AddForegroundObserverL() +during construction, and CCoeEnv::RemoveForegroundObserver() in their destructors. + +@publishedAll +@released +@see CCoeFep */ +class MCoeForegroundObserver + { +public: + /** Handles the application coming to the foreground. */ + virtual void HandleGainingForeground()=0; + /** Handles the application going into the background. */ + virtual void HandleLosingForeground()=0; +protected: + IMPORT_C MCoeForegroundObserver(); +private: + IMPORT_C virtual void MCoeForegroundObserver_Reserved_1(); + IMPORT_C virtual void MCoeForegroundObserver_Reserved_2(); +private: + TInt iMCoeForegroundObserver_Reserved1; + }; + + +/** Interface for handling incoming window server messages. + +This interface is used to enable FEPs to keep their settings synchronised +across all running instances. + +Anything that needs to be notified of messages that get sent by the window server's +message-sending service should derive from this class and override its pure +virtual function. + +In addition, derived classes also need to call CCoeEnv::AddMessageObserverL() +during construction and CCoeEnv::RemoveMessageObserver() in their destructors. + +@publishedAll +@released */ +class MCoeMessageObserver + { +public: + /** Message response flags. */ + enum TMessageResponse + { + /** Message not handled. */ + EMessageNotHandled, + /** Message handled. */ + EMessageHandled + }; +public: + /** Handles window server messages. + + Implementations should return EMessageHandled if they are able to handle the + message, or EMessageNotHandled if the message is not appropriate to this observer. + + @param aClientHandleOfTargetWindowGroup The window group that the message + was sent to. Many implementations will not need this information. + @param aMessageUid The message UID. + @param aMessageParameters The message parameters. + @return Indicates whether the message was handled or not handled + by the function. */ + virtual TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8& aMessageParameters)=0; +protected: + IMPORT_C MCoeMessageObserver(); +private: + IMPORT_C virtual void MCoeMessageObserver_Reserved_1(); + IMPORT_C virtual void MCoeMessageObserver_Reserved_2(); + }; + +/** Mix-in interface for handling window visibility messages. + +@publishedAll +@released */ +class MCoeMessageMonitorObserver + { +public: + /** Received windows messages for monitoring. + @param aEvent The windows server event data.*/ + virtual void MonitorWsMessage(const TWsEvent& aEvent)=0; +private: + IMPORT_C virtual void MCoeMessageMonitorObserver_Reserved_1(); + IMPORT_C virtual void MCoeMessageMonitorObserver_Reserved_2(); + }; + +// classes defined in FEPBASE, declared here +class MCoeFepObserver; + +/** +@publishedAll +@released +*/ +typedef void (*TCoeFepObserverFunction)(MCoeFepObserver& aFepObserver); + +/** +@publishedAll +@released +*/ +class CCoeFepParameters : public CBase + { +public: + static CCoeFepParameters* NewLC(); +private: + inline CCoeFepParameters() {} + }; + + +/** Implements the active scheduler presupposed by the control environment. + +@publishedPartner +@deprecated +*/ +class CCoeScheduler : public CBaActiveScheduler + { +public: + IMPORT_C CCoeScheduler(CCoeEnv* aCoeEnv); + IMPORT_C virtual void WaitForAnyRequest(); + IMPORT_C virtual void DisplayError(TInt aError) const; + /** Gets the control environment. + + @return A pointer to the control environment. */ + inline CCoeEnv* CoeEnv() {return iCoeEnv;} + TBool Flush() const; // not to be called from outside CONE + void SetFlush(TBool aFlush); // not to be called from outside CONE +private: + // from CBaActiveScheduler + IMPORT_C virtual void Reserved_1(); + IMPORT_C virtual void Reserved_2(); +private: + CCoeEnv* iCoeEnv; + TBool iFlush; + }; + + + +/** Control environment. + +CCoeEnv provides an active environment for creating controls. It implements +active objects and an active scheduler, which provide access to the window +server, simplifying the API for application programs. It also provides utility +functions that are useful to many applications. + +When a standard event occurs, the active scheduler calls CCoeEnv::RunL(). +When a redraw event occurs, it calls CCoeRedrawer::RunL(). Priority key events +must be accessed using the Window Server API directly. + +Note: standard events are all events except redraw events and priority key events. + +@publishedAll +@released */ +class CCoeEnv : public CActive, public MObjectProvider + { +public: + // Properties + IMPORT_C static TVersion Version(); + IMPORT_C static CCoeEnv* Static(); + // Construction and destruction + IMPORT_C CCoeEnv(); + IMPORT_C ~CCoeEnv(); + IMPORT_C void ConstructL(); + IMPORT_C void ConstructL(TBool aInitialFocusState); + IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aDefaultScreenNumber); + IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aDefaultScreenNumber, TInt aWindowGroupID); + IMPORT_C CCoeAppUi* SetAppUi(CCoeAppUi* aAppUi); + IMPORT_C void ExecuteD(); + IMPORT_C void Execute(); + IMPORT_C void RunL(); + IMPORT_C void DoCancel(); + IMPORT_C void PrepareToExit(); + IMPORT_C virtual void DestroyEnvironment(); + IMPORT_C void DisableExitChecks(TBool aDisable); + IMPORT_C virtual void HandleError(TInt aError); + // System resources + inline CCoeAppUi* AppUi() const; + inline RFs& FsSession() const; + inline RWsSession& WsSession() const; + inline RWindowGroup& RootWin() const; + inline CWsScreenDevice* ScreenDevice() const; + inline CWindowGc& SystemGc() const; + inline const CFont* NormalFont() const; + inline const TWsEvent& LastEvent() const; + inline TBool IsSchedulerRunning() const; + // Graphics + IMPORT_C CWindowGc* CreateGcL(); + IMPORT_C CWindowGc* SwapSystemGc(CWindowGc* aGc); + IMPORT_C void Flush(TTimeIntervalMicroSeconds32 aDelay=0); + IMPORT_C void SuppressNextFlush(); + IMPORT_C TBool IsWservEventPending() const; + IMPORT_C TBool IsRedrawEventPending() const; + // Fonts (legacy API) + IMPORT_C CFbsFont* CreateDeviceFontL(CGraphicsDevice* aDevice,const TFontSpec& aFontSpec); + IMPORT_C CFbsFont* CreateScreenFontL(const TFontSpec& aFontSpec); + IMPORT_C void ReleaseScreenFont(CFont* aFont) const; + // Font provider + IMPORT_C const CCoeFontProvider& DefaultFontProvider() const; + // Text drawer + IMPORT_C CCoeTextDrawerBase& DefaultTextDrawer() const; + // Zooming + IMPORT_C TZoomFactor ZoomFactor() const; + IMPORT_C void SetZoomFactor(const TZoomFactor& aZoomFactor); + // Resource reading + IMPORT_C TInt AddResourceFileL(const TDesC& aFileName); + IMPORT_C void DeleteResourceFile(TInt aOffset); + IMPORT_C TBool IsResourceAvailableL(TInt aResourceId) const; + IMPORT_C void CreateResourceReaderLC(TResourceReader& aReader,TInt aResourceId) const; + inline void ReadResource(TDes& aDes,TInt aResourceId) const; + inline void ReadResourceL(TDes& aDes,TInt aResourceId) const; + inline HBufC* AllocReadResourceL(TInt aResourceId) const; + inline HBufC* AllocReadResourceLC(TInt aResourceId) const; + inline CDesCArrayFlat* ReadDesCArrayResourceL(TInt aResourceId); + IMPORT_C void ReadResourceAsDes8(TDes8& aDes,TInt aResourceId) const; /** @deprecated 7.0*/ + IMPORT_C void ReadResourceAsDes8L(TDes8& aDes,TInt aResourceId) const; + IMPORT_C HBufC8* AllocReadResourceAsDes8L(TInt aResourceId) const; + IMPORT_C HBufC8* AllocReadResourceAsDes8LC(TInt aResourceId) const; + IMPORT_C CDesC8ArrayFlat* ReadDesC8ArrayResourceL(TInt aResourceId); + IMPORT_C void ReadResourceAsDes16(TDes16& aDes,TInt aResourceId) const; /** @deprecated 7.0*/ + IMPORT_C void ReadResourceAsDes16L(TDes16& aDes,TInt aResourceId) const; + IMPORT_C HBufC16* AllocReadResourceAsDes16L(TInt aResourceId) const; + IMPORT_C HBufC16* AllocReadResourceAsDes16LC(TInt aResourceId) const; + IMPORT_C CDesC16ArrayFlat* ReadDesC16ArrayResourceL(TInt aResourceId); + IMPORT_C void Format128(TDes& aDes,TInt aResourceId,...); + IMPORT_C void Format256(TDes& aDes,TInt aResourceId,...); + // Error handling + IMPORT_C void LeaveWithErrorText(const TDesC& aMsg,const TDesC* aContextText=NULL); + // Key handling + IMPORT_C void SimulateKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType); + // FEP handling + IMPORT_C void AddObserverOfLoadedFepL(MCoeObserverOfLoadedFep& aObserverOfLoadedFep); + IMPORT_C void RemoveObserverOfLoadedFep(MCoeObserverOfLoadedFep& aObserverOfLoadedFep); + IMPORT_C void AddFepObserverL(MCoeFepObserver& aFepObserver); + IMPORT_C void RemoveFepObserver(MCoeFepObserver& aFepObserver); + IMPORT_C void ForEachFepObserverCall(TCoeFepObserverFunction aFepObserverFunction); + void EnsureCorrectFepIsLoadedL(); + void EnsureSpecifiedFepIsLoadedL(TUid aFepUid); + IMPORT_C void InstallFepL(TUid aFepUid); + IMPORT_C void InstallFepL(TUid aFepUid, const TBool aLeave); + IMPORT_C void AvailableFepsL(RArray& aUids, CDesCArray* aDisplayNames); + IMPORT_C void ExecuteFepSettingsDialogL(TUid aFepUid); + IMPORT_C CCoeFep* Fep() const; + IMPORT_C TUid FepUid() const; + IMPORT_C void InputCapabilitiesChanged(); + // Control focus handling + IMPORT_C void AddFocusObserverL(MCoeFocusObserver& aFocusObserver); + IMPORT_C void RemoveFocusObserver(MCoeFocusObserver& aFocusObserver); + IMPORT_C void SyncNotifyFocusObserversOfChangeInFocus(); + void NotifyFocusObserversOfDestructionOfFocusedItem(); + // Application focus (foreground) handling + IMPORT_C void BringOwnerToFront(); + IMPORT_C void AddForegroundObserverL(MCoeForegroundObserver& aForegroundObserver); + IMPORT_C void RemoveForegroundObserver(MCoeForegroundObserver& aForegroundObserver); + void NotifyForegroundObserversOfGainingForeground(); + void NotifyForegroundObserversOfLosingForeground(); + // Resource change handling + IMPORT_C void AddResourceChangeObserverL(MCoeResourceChangeObserver& aResourceChangeObserver); + IMPORT_C void RemoveResourceChangeObserver(MCoeResourceChangeObserver& aResourceChangeObserver); + void NotifyResourceObserversOfChangeInResource(); + // Window server message handling + IMPORT_C void AddMessageObserverL(MCoeMessageObserver& aMessageObserver); + IMPORT_C void RemoveMessageObserver(MCoeMessageObserver& aMessageObserver); + IMPORT_C void AddMessageMonitorObserverL(MCoeMessageMonitorObserver& aMessageMonitorObserver); + IMPORT_C void RemoveMessageMonitorObserver(MCoeMessageMonitorObserver& aMessageMonitorObserver); + void NotifyMessageMonitorObserversOfEvent(const TWsEvent& aEvent); + // Singleton access + IMPORT_C static CCoeStatic* Static(TUid aUid); + IMPORT_C CCoeStatic* FindStatic(TUid aUid); +#if defined(SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS) + //multiple screens + IMPORT_C CWsScreenDevice* ScreenDevice(TInt aScreenNumber) const; + IMPORT_C RWindowGroup* RootWin(TInt aScreenNumber) const; +#endif +public: // *** Do not use! API liable to change *** + TInt AppStartupInstrumentationEventIdBase(); +public: // Internal to Symbian + IMPORT_C void GetMessageNotifyingObserversLC(TUint32 aClientHandleOfTargetWindowGroup, TUid& aMessageUid, TPtr8& aMessageParameters, const TWsEvent& aMessageEvent); + IMPORT_C TBool DisableShutdownChecks() const; +protected: // Internal to Symbian + IMPORT_C void SetAppStartupInstrumentationEventIdBaseL(TInt aAppStartupInstrumentationEventIdBase); + IMPORT_C void DestroyEnvironmentStatic(); + IMPORT_C void DestroyEnvironmentEnd(); + IMPORT_C TInt CoeEnvConstructorError() const; +private: // reserved virtual function space + IMPORT_C virtual void Reserved_1(); + IMPORT_C virtual void Reserved_2(); +private: // from CActive + IMPORT_C TInt RunError(TInt aError); +protected: // from MObjectProvider + IMPORT_C TTypeUid::Ptr MopSupplyObject(TTypeUid aId); +protected: + IMPORT_C virtual void DestroyScreen(); + inline TDes& ErrorText(); + inline TDes& ErrorContextText(); +public: // but not exported + void ReadEvent(); + CVwsSessionWrapper* InitViewServerSessionL(MVwsSessionWrapperObserver& aObserver); + void AddStatic(CCoeStatic* aStatic); + void QueueNotificationToFocusObserversOfChangeInFocus(); + TInt FocusObserverNotificationIdentifier() const; + TBool FocusObserverNotificationIsStillPending(TInt aFocusObserverNotificationIdentifier) const; + void RefetchPixelMappingL(); + TBool ControlStateChange(); +private: + void CreateActiveSchedulerL(); + void ConnectToFileServerL(); + void ConnectToWindowServerL(); + void InitScreenL( TInt aDefaultScreenNumber ); + void InitRootWindowL(TBool aInitialFocusState, TInt aWindowGroupID=0); + void InitSystemGcL(); + IMPORT_C virtual void InitSystemFontsL(); + IMPORT_C virtual TInt ResourceFileVersionNumber() const; + RResourceFile& ResourceFileForId(TInt aResourceId) const; + void DestroyAllResourceFiles(); + void AddObserverL(TAny* aObserver, RGenericPointerArray& aArray); + void RemoveObserver(TAny* aObserver, RGenericPointerArray& aArray); + void UpdateStatic(CCoeAppUi* aNewAppUi); + void SetInitialHandleCount(); + TUint InitialHandleCount() const; + RResourceFile* DoResourceFileForIdL(TInt aResourceId) const; +#if defined(SYMBIAN_WSERV_AND_CONE_MULTIPLE_SCREENS) + void PopulateArrayOfScreenItemsL(); + void DeleteArrayOfScreensItems(); +#endif +protected: + CCoeAppUi* iAppUi; + RFs iFsSession; + RWsSession iWsSession; + RWindowGroup iRootWin; + CWindowGc* iSystemGc; + const CFont* iNormalFont; + CWsScreenDevice* iScreen; + TWsEvent iLastEvent; + CArrayFix* iResourceFileArray; +private: + enum TFlags // used in the bottom 16 bits only of iEnvFlags + { + ENoShutdownChecks =0x0001, + EExtraPointerIsErrorCode =0x0002, + ESchedulerIsRunning =0x0004 + }; +private: + TDes* iErrorText; + TDes* iErrorContextText; + CCoeEnvExtra* iExtra; + CTrapCleanup* iCleanup; + TUint iEnvFlags; + }; + +/** Base class for creating singleton objects that will be stored by CCoeEnv. + +Each object must have a unique TUid. + +Symbian OS does not provide writeable global static data. Singleton objects +provide its equivalent in thread local storage, which is supported. + +This behaviour is useful for objects in which only one copy is ever needed +in the thread or application, e.g. in alert windows. + +@publishedAll +@released */ +class CCoeStatic : public CBase + { +public: + /** Scope of access to the singleton object. */ + enum TScope + { + /** Access from the entire thread. */ + EThread, + /** Access from an appUi in that thread. */ + EApp, + }; + /** The default destruction priority if none is specified in the constructor */ + enum {EDefaultDestructionPriority=100}; +public: + IMPORT_C ~CCoeStatic(); +protected: + IMPORT_C CCoeStatic(); + IMPORT_C CCoeStatic(TUid aUid,TScope=EThread); + IMPORT_C CCoeStatic(TUid aUid,TInt aDestructionPriority,TScope aScope=EThread); +private: + IMPORT_C virtual void CCoeStatic_Reserved1(); + IMPORT_C virtual void CCoeStatic_Reserved2(); +private: + void DoConstruction(const TUid& aUid,TInt aDestructionPriority,TScope aScope); + void SetCsAppUi(CCoeAppUi* aAppUi); + CCoeAppUi* CsAppUi() const; + TScope CsScope() const; + inline TInt DestructionPriority() const {return iCsLink.iPriority;} +private: + TPriQueLink iCsLink; + TUid iCsUid; + TUint iCsAppUiAndScope; + TInt iCCoeStatic_Reserved1; +private: + friend class CCoeEnv; + friend class CCoeEnvExtra; + }; + +#include + +#endif // __COEMAIN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coemain.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coemain.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,186 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + Gets the most recent standard event that was received by the application. + + Note: standard events are all events except redraw events and priority key events. + + @return The last event. +*/ +inline const TWsEvent& CCoeEnv::LastEvent() const + { return(iLastEvent); } + +/** Gets the application UI owned by this application. + +@return Pointer to the app UI owned by the application. */ +inline CCoeAppUi* CCoeEnv::AppUi() const + { return(iAppUi); } + +/** Gets the file server session owned by this CCoeEnv. + +This session is normally only used for accessing the application's resource +file. + +@return The file server session owned by this CCoeEnv. */ +inline RFs& CCoeEnv::FsSession() const + { return((RFs&)iFsSession); } + +/** Gets the window server session owned by the application. + +This provides access to window server functions not directly accessible via +the UI control framework. + +@return The window server session opened by the application. */ +inline RWsSession& CCoeEnv::WsSession() const + { return((RWsSession&)iWsSession); } + +/** Gets the application's window group. + +Note: a window group is an invisible window which acts as the parent window for +all other windows in an application. Typically, each application has one window +group. In the window server, window groups are also the unit of keyboard focus. + +@return The application's window group. */inline RWindowGroup& CCoeEnv::RootWin() const + { return((RWindowGroup&)iRootWin); } + +/** Gets the system graphics context. + +This is the graphics context typically used for drawing controls, but an +alternative graphics context can be created if required using CreateGcL(). + +@return The system graphics context. */ +inline CWindowGc& CCoeEnv::SystemGc() const + { return((CWindowGc&)*iSystemGc); } + +/** Gets the normal environment font. + +This is the font created during construction of the control environment. + +@return Pointer to the normal environment font. +@see InitSystemFontsL() */ +inline const CFont* CCoeEnv::NormalFont() const + { return(iNormalFont); } + +/** Gets the default screen device owned by this CCoeEnv. + +This is typically used as the standard screen device for the CCoeEnv's application. + +@return The default screen device owned by this CCoeEnv. */ +inline CWsScreenDevice* CCoeEnv::ScreenDevice() const + { return(iScreen); } + +/** Gets the current error message text. + +@return The current error message text. */ +inline TDes& CCoeEnv::ErrorText() + { return *iErrorText; } + +/** Gets the current error context text. + +@return The current error context text. */ +inline TDes& CCoeEnv::ErrorContextText() + { return *iErrorContextText; } + +#if defined(_UNICODE) +/** Reads a resource into a descriptor. + +The descriptor must be long enough to contain the entire resource. No memory +is allocated by this function. If the read fails, the function sets an error +condition and performs any cleanup required. The error condition causes the +GUI to launch an alert window. + +Deprecated - Use CCoeEnv::ReadResourceL() instead. + +@deprecated +@param aDes On return, contains the resource data. +@param aResourceId The numeric ID of the resource to be read. +@see RResourceFile::ReadL() +@see KErrCoeFailedToReadFromProgDisk */ +inline void CCoeEnv::ReadResource(TDes& aDes,TInt aResourceId) const + { ReadResourceAsDes16(aDes,aResourceId); } + +/** Reads a resource into a descriptor. + +The descriptor must be long enough to contain the entire resource. +No memory is allocated by this function. + +@param aDes On return, contains the resource data. +@param aResourceId The numeric ID of the resource to be read. +@return Pointer to a heap descriptor containing the resource. */ +inline void CCoeEnv::ReadResourceL(TDes& aDes,TInt aResourceId) const + { ReadResourceAsDes16L(aDes,aResourceId); } + +/** Reads a resource into a heap descriptor, allocating memory for it. + +Note: the calling program must destroy the heap descriptor when it is no longer +needed. + +@param aResourceId The numeric ID of the resource to be read. +@return Pointer to a heap descriptor containing the resource data. +@see RResourceFile::AllocReadL() */ +inline HBufC* CCoeEnv::AllocReadResourceL(TInt aResourceId) const + { return AllocReadResourceAsDes16L(aResourceId); } + +/** Reads a specified resource into a heap descriptor, allocating memory for it, +and pushing the descriptor onto the cleanup stack. + +The calling program should pop and destroy the heap descriptor when it is +no longer needed. + +@param aResourceId The numeric ID of the resource to be read. +@return Pointer to a heap descriptor containing the resource data. +@see RResourceFile::AllocReadLC() */ +inline HBufC* CCoeEnv::AllocReadResourceLC(TInt aResourceId) const + { return AllocReadResourceAsDes16LC(aResourceId); } + +/** Reads a resource into a Unicode descriptor array. + +@param aResourceId The numeric ID of the resource to be read. +@return A pointer to the descriptor array containing the resource data. +@see TResourceReader::ReadDesCArrayL() */ +inline CDesCArrayFlat* CCoeEnv::ReadDesCArrayResourceL(TInt aResourceId) + { return ReadDesC16ArrayResourceL(aResourceId); } +#else // not UNICODE + +/** Deprecated - use CCoeEnv::ReadResourceL() instead. + +@deprecated */ +inline void CCoeEnv::ReadResource(TDes& aDes,TInt aResourceId) const + { ReadResourceAsDes8(aDes,aResourceId); } + +inline void CCoeEnv::ReadResourceL(TDes& aDes,TInt aResourceId) const + { ReadResourceAsDes8L(aDes,aResourceId); } +inline HBufC* CCoeEnv::AllocReadResourceL(TInt aResourceId) const + { return AllocReadResourceAsDes8L(aResourceId); } +inline HBufC* CCoeEnv::AllocReadResourceLC(TInt aResourceId) const + { return AllocReadResourceAsDes8LC(aResourceId); } +inline CDesCArrayFlat* CCoeEnv::ReadDesCArrayResourceL(TInt aResourceId) + { return ReadDesC8ArrayResourceL(aResourceId); } +#endif // UNICODE + +// +// Tests if the Active Scheduler is started in the CCoeEnv::ExecuteD +// +// @return "TBool" +// ETrue if Active Scheduler is started in +// CCoeEnv::ExecuteD() +// EFalse if Active Scheduler is not started in +// CCoeEnv::ExecuteD() +// +inline TBool CCoeEnv::IsSchedulerRunning() const + {return iEnvFlags&ESchedulerIsRunning;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coemop.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coemop.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,180 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEMOP_H__ +#define __COEMOP_H__ + +#include + +/** Declares an object type, ETypeId, for a class, in order to allow the object +provider mechanism to locate and provide objects from the class. + +@publishedAll +@released +@see MObjectProvider */ +#define DECLARE_TYPE_ID(id) enum { ETypeId = id }; + +// +// Used to wrap object type IDs in a standardised manner. Object type IDs must be asserted +// in an ETypeId member data property by any types of object which +// are capable of being retrieved by the MObjectProvider interface +// +class TTypeUid : public TUid +/** Part of the object provider mechanism, this class encapsulates the Uid that +identifies the type of object that an object provider is to get. + +The class is also used to encapsulate a pointer to the object that the object +provider has found. + +An object that is intended to be capable of being retrieved by the object +provider mechanism must include enum {ETypeId = 0xabcdefgh}; in its class +definition, where 0xabcdefgh is the Uid value. The macro DECLARE_TYPE_ID can +be used to do this. + +An instance of this class is passed to the MObjectProvider::MopSupplyObject() +function implemented by an object provider. A TTypeUid::Ptr is also returned +by this function. + +@publishedAll +@released +@see MObjectProvider */ + { +public: + class Ptr + /** Encapsulates a pointer to an object fetched by an object provider. + + The class has no public constructor. TTypeUid::MakePtr() or TTypeUid::Null() + must be used to construct instances of this class. */ + { + friend class TTypeUid; + private: + explicit inline Ptr(TAny* aPtr) + : iPtr(aPtr) + {} + public: + inline TAny* Pointer() const + /** Retrieves the pointer to an object which is encapsulated by the Ptr. + + @return A pointer to an object. */ + {return iPtr;} + private: + TAny* iPtr; + }; +public: + inline TTypeUid(TInt aUid) + /** Constructor that takes a Uid value. + + @param aUid The Uid value that defines the type of object that an object provider + is to get. */ + { iUid = aUid; } + inline static Ptr Null() + /** Constructs a Ptr which encapsulates a NULL pointer. + + @return The constructed Ptr object */ + { return Ptr(NULL); } + template inline Ptr MakePtr(T* aT) const + /** Constructs a Ptr which encapsulates the specified object pointer. + + @param aT A pointer to the object which is to be encapsulated. + @return The constructed Ptr object */ + { __ASSERT_DEBUG(iUid == T::ETypeId,User::Invariant()); return Ptr(aT); } + }; + + +class MObjectProvider +/** An interface that allows an object to be part of a network of object providers. + +The object provider mechanism can be used to find and access objects of a +given type, where the type is defined by a TTypeUid object. Object providers +may be arranged in a hierarchy, i.e. an object provider may have a parent-child +relationship with another object provider. + +An object provider must provide an implementation for the MopSupplyObject() +function and can choose to provide an implementation for the MopNext() function. +Typically, it will also have functionality to define who its parent is. + +CCoeControl is an example of a class that implements this interface. Top level +controls must have the view or app UI set as their object provider. This is +done by calling CCoeControl::SetMopParent() on the view or the app UI. The +view or app UI does this by calling the top level control's CCoeControl::SetMopParent() +function. + +@publishedAll +@released */ + { +public: + template + T* MopGetObject(T*& aPtr) + /** Gets an object of the type defined by the template parameter. + + The object may be supplied directly by this object provider, or by other object + providers higher up the hierarchy. + + @param aPtr A reference to a pointer to an object of a type that is to be + retrieved. + @return A pointer to an object of the type required, or NULL if none can be + found. */ + { return (aPtr=(T*)MopGetById(T::ETypeId)); } + + + template + T* MopGetObjectNoChaining(T*& aPtr) + /** Gets an object of the type defined by the template parameter. + + The object will be supplied directly by this object provider, or NULL + will be returned, this function does not recurse through the object chain. + + @param aPtr A reference to a pointer to an object of a type that is to be + retrieved. + @return A pointer to an object of the type required, or NULL if none can be + found. */ + { return (aPtr=(T*)MopGetByIdNoChaining(T::ETypeId)); } + + /** + @publishedAll + @released */ + MObjectProvider* FindParent(MObjectProvider* aMopToFind); + +private: // must be overridden + /** Gets an object whose type is encapsulated by the specified TTypeUid object. + + @param aId Encapsulates the Uid that identifies the type of object required. + @return Encapsulates the pointer to the object provided. + Note that the encapsulated pointer may be NULL. + + @publishedAll + @released */ + virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId) = 0; + +protected: + IMPORT_C MObjectProvider(); + +private: // may be overridden to continue chain of responsibility + /** + @publishedAll + @released */ + IMPORT_C virtual MObjectProvider* MopNext(); + IMPORT_C virtual void MObjectProvider_Reserved1(); + IMPORT_C virtual void MObjectProvider_Reserved2(); + +private: + IMPORT_C TAny* MopGetById(TTypeUid aId); + IMPORT_C TAny* MopGetByIdNoChaining(TTypeUid aId); + +private: + TInt iMObjectProvider_Reserved1; + }; + +#endif // __COEMOP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coesndpy.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coesndpy.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COESNDPY_H__ +#define __COESNDPY_H__ + +#include + +class TBaSystemSoundType; +class CCoeSoundPlayerManager; + + +/** Utility class for simple sound playing. + +Must be used in the same thread as an active UI Control Framework environment +(CCoeEnv). + +This class plays the sound specified by a TBaSystemSoundType object. The +caller can request the sound to be repeated, and the time between repeats. +If the exact sound cannot be found on a particular device, a match only by +category (first UID) is used. No sound will play if a match is not found. + +@publishedAll +@released */ +class CoeSoundPlayer + { +public: + enum { ENoRepeat=1, ERepeatForever=KMaxTInt}; +public: + inline static void PlaySound(const TBaSystemSoundType& aType); + inline static void PlaySound(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap); + inline static void PlaySoundNow(const TBaSystemSoundType& aType); + inline static void PlaySoundNow(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap); + IMPORT_C static void CancelSound(const TBaSystemSoundType& aType); +private: + IMPORT_C static void PlaySound(const TBaSystemSoundType& aType,TInt aPlayCount, + TTimeIntervalMicroSeconds32 aGap,TBool aInterrupt); + static CCoeSoundPlayerManager* ManagerL(); + }; + + + + + +/** Plays the specified sound. + +This function only interrupts another, currently playing, sound if the new +sound has a higher priority than the currently playing sound. If you wish +to interrupt any currently playing sound and play a new one, use PlaySoundNow() +instead of PlaySound(). + +@param aType The sound to play.*/ +inline void CoeSoundPlayer::PlaySound(const TBaSystemSoundType& aType) + {CoeSoundPlayer::PlaySound(aType,ENoRepeat,TTimeIntervalMicroSeconds32(0),EFalse);} + +/** Plays the specified sound for the specifed number of times with the specified +interval. + +This function only interrupts another, currently playing, sound if the new sound +has a higher priority than the current one. If you wish to interrupt +any currently playing sound and play a new one, use PlaySoundNow() instead of PlaySound(). + +@param aType The sound to play. +@param aPlayCount The number of times the sound is played. +@param aGap The interval in microseconds between each time the sound is played. */ +inline void CoeSoundPlayer::PlaySound(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap) + {CoeSoundPlayer::PlaySound(aType,aPlayCount,aGap,EFalse);} + +/** Plays the specified sound, interrupting any other sound that is currently playing. + +@param aType The sound to play. */ +inline void CoeSoundPlayer::PlaySoundNow(const TBaSystemSoundType& aType) + {CoeSoundPlayer::PlaySound(aType,ENoRepeat,TTimeIntervalMicroSeconds32(0),ETrue);} + +/** Plays the specified sound the specifed number of times with the +specified interval, interrupting any other sound that is currently playing. + +@param aType The sound to play. +@param aPlayCount The number of times the sound is played. +@param aGap The interval in microseconds between each time the sound is played. */ +inline void CoeSoundPlayer::PlaySoundNow(const TBaSystemSoundType& aType,TInt aPlayCount,const TTimeIntervalMicroSeconds32& aGap) + {CoeSoundPlayer::PlaySound(aType,aPlayCount,aGap,ETrue);} + +#endif // __COESNDPY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coetextdrawer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coetextdrawer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,324 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COETEXTDRAWER_H__ +#define __COETEXTDRAWER_H__ + +#include +#include +#include +#include + +// +// TEXT DRAWER CODE +// + +// forward declarations +class CCoeTextDrawerBase; +class TCoeTextTypeAdaptor; + +/** +This class serves as a smart-pointer handle to a CCoeTextDrawerBase-derived object, used for drawing +user interface text. Through the use of the CCoeControl's TextDrawer() and GetTextDrawer() methods, a +container control can control the text style and color used by its child controls. For example, a button +class can override its GetTextDrawer() method to set the text color used by its text label child control +depending on the buttons state (e.g. unpressed, pressed, or dimmed). + +The XCoeTextDrawer object manages the life of the heap allocated CCoeTextDrawerBase (deleting it or +resetting it depending on whether the object is reusable or not). + +XCoeTextDrawer objects shall be allocated on the stack in the control's Draw() method and initialized +with a heap allocated CCoeTextDrawerBase object fetched from the control's skin, or from its parent or +background through the CCoeControl::TextDrawer() method. + +Never create a CCoeTextDrawer-derived object inside your CCoeControl::Draw() method, as this is not +guaranteed to work in low-memory situations. Non-reusable text drawers must only be created in your +control's GetTextDrawer() method, as this provides error handling in case the text drawer could not be +created. + +Hence, typical use from inside a CCoeControl's Draw() method: + +XCoeTextDrawer textDrawer(TextDrawer()); +textDrawer.SetAlignment(EHLeftVCenter); +textDrawer.SetMargins(iTextMargins); +textDrawer.DrawText(SystemGc(), *iText, iTextRect, ScreenFont(TCoeFont::NormalFont())); + + +@publishedAll +@released +*/ +class XCoeTextDrawer + { +public: + IMPORT_C XCoeTextDrawer(CCoeTextDrawerBase& aTextDrawer); + IMPORT_C ~XCoeTextDrawer(); + + IMPORT_C void operator=(CCoeTextDrawerBase& aTextDrawer); + + IMPORT_C void DrawText(CGraphicsContext& aGc, const TBidiText& aText, const TRect& aTextRect, const CFont& aFont) const; + IMPORT_C void DrawDisplayOrderedText(CGraphicsContext& aGc, const TDesC& aText, const TRect& aTextRect, const CFont& aFont) const; + + IMPORT_C void DrawTextVertical(CGraphicsContext& aGc, const TBidiText& aText, const TRect& aTextRect, const CFont& aFont, TBool aUp = ETrue) const; + IMPORT_C void DrawDisplayOrderedTextVertical(CGraphicsContext& aGc, const TDesC& aText, const TRect& aTextRect, const CFont& aFont, TBool aUp = ETrue) const; + + IMPORT_C TRect ClipRect() const; + IMPORT_C void SetClipRect(const TRect& aClipRect); + + inline TRgb TextColor() const; + inline void SetTextColor(TRgb aColor); + + inline TGulAlignment Alignment() const; + inline void SetAlignment(const TGulAlignment& aAlignment); + + inline TMargins8 Margins() const; + inline void SetMargins(const TMargins8& aMargins); + + inline TInt LineGapInPixels() const; + inline void SetLineGapInPixels(TInt aLineGapInPixels); +public: + IMPORT_C CCoeTextDrawerBase *operator ->(); // deprecated +private: + XCoeTextDrawer(const XCoeTextDrawer& aTextDrawer); +private: + CCoeTextDrawerBase* iTextDrawer; + TRect iClipRect; + }; + + +// forward declaration +class CCoeTextDrawerBaseExt; + +/** +This is the base class for all text drawers implementing different text effects (for example +shadow or glowing/outlined text). The object can be created and deleted each time it's used, +or Reset() and reused if it IsReusable(). The latter is recommended. + +Note that the pure virtual DrawText() method is private. This ensures that the object is used +through the XCoeTextDrawer class (which manages its life). + +Note also that the accessor and set methods should be used via the owning XCoeTextDrawer object, +and that the MObjectProvider mechanism can be used to identify the actual text drawer implementation. + +@publishedAll +@released +*/ +class CCoeTextDrawerBase : public CBase, public MObjectProvider + { + friend class XCoeTextDrawer; +public: + IMPORT_C ~CCoeTextDrawerBase(); + IMPORT_C virtual void Reset(); + + /** + This method returns the main color used by the CCoeTextDrawer to draw text. + @return The color used to draw text. + */ + virtual TRgb TextColor() const = 0; + /** + This method sets the main color to use to draw text. + @param aColor The color to use to draw text. + */ + virtual void SetTextColor(TRgb aColor) = 0; + + IMPORT_C TGulAlignment Alignment() const; + IMPORT_C void SetAlignment(const TGulAlignment& aAlignment); + + IMPORT_C TMargins8 Margins() const; + IMPORT_C void SetMargins(const TMargins8& aMargins); + + IMPORT_C TInt LineGapInPixels() const; + IMPORT_C void SetLineGapInPixels(TInt aLineGapInPixels); +public: // public methods only for use by the owner/creator of the CCoeTextDrawerBase-derived object + IMPORT_C TBool IsReusable() const; + IMPORT_C void SetReusable(TBool aIsReusable); + + IMPORT_C void SetAppLanguage(TLanguage aAppLang); +protected: + IMPORT_C CCoeTextDrawerBase(); + IMPORT_C TInt Construct(); + IMPORT_C TGulHAlignment ActualHorizontalAlignment(const TCoeTextTypeAdaptor& aText) const; +private: + /** + Any actual text drawer must implement this method to draw the text passed as argument. + The implementation must draw the text inside the text rectangle, cropped to the clipping + rectangle, and with the given margins and alignment taken into account. + + Note that the actual horizontal alignment shall depend on the script directionality. + Calling ActualHorizontalAlignment() will return the horizontal alignment where left and + right has been swapped for right-to-left scripts. + */ + virtual void DrawText(CGraphicsContext& aGc, const TCoeTextTypeAdaptor& aText, const CFont& aFont, + const TRect& aTextRect, const TRect& aClipRect) const = 0; +public: + IMPORT_C virtual TMargins8 EffectMargins(); +private: + /** + Draws the text vertically inside the text rectangle, cropped to the clipping + rectangle, and with the given margins and alignment taken into account. + If aUp is ETrue, text is rotated 90 degrees anti-clockwise; EFalse, text is rotated 90 degrees clockwise. + + Note that the actual horizontal alignment shall depend on the script directionality. + Calling ActualHorizontalAlignment() will return the horizontal alignment where left and + right has been swapped for right-to-left scripts. + Also note that the margines are relative to the orientation of the text. + */ + IMPORT_C virtual void DrawTextVertical(CGraphicsContext& aGc, const TCoeTextTypeAdaptor& aText, const CFont& aFont, + const TRect& aTextRect, const TRect& aClipRect, TBool aUp) const; + IMPORT_C virtual void CCoeTextDrawerBase_Reserved3(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved4(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved5(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved6(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved7(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved8(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved9(); + IMPORT_C virtual void CCoeTextDrawerBase_Reserved10(); + private: + TBool iIsReusable; + TGulAlignment iAlignment; + TMargins8 iMargins; + TInt iLineGap; + CCoeTextDrawerBaseExt* iExtension; + }; + + +/** +This class allows the XCoeTextDrawer to draw text that is in the form of a TBidiText +object as well as pre-reordered new-line separated plain text descriptors. (The descriptor +text is especially useful when using the XCoeTextDrawer together with the FORM component). + +This removes the need to implement two versions of the DrawText() method. + +@publishedAll +@released +*/ +class TCoeTextTypeAdaptor + { +public: + IMPORT_C TCoeTextTypeAdaptor(const TDesC& aText); // text lines separated with '\n' + IMPORT_C TCoeTextTypeAdaptor(const TBidiText& aText); // TBidiText object + IMPORT_C TInt NumberOfLines() const; + IMPORT_C TPtrC LineOfText(TInt aLineNumber, TInt& aWidthInPixels, const CFont& aFont) const; + IMPORT_C TBool HasRightToLeftDirectionality() const; +private: + enum TTextType + { + ENewlineSeparated, + EBidiText + }; + const TAny* iText; + TTextType iTextType; + }; + + +/** +This is a basic text drawer without any text effects. The default text drawer that can be +used if no other (device specific) text drawers has been added to the system. + +@publishedAll +@released +*/ +class CCoePlainTextDrawer : public CCoeTextDrawerBase + { +public: + DECLARE_TYPE_ID(0x1020831A) +public: + IMPORT_C static CCoePlainTextDrawer* New(TRgb aTextColor); + + IMPORT_C TRgb TextColor() const; + IMPORT_C void SetTextColor(TRgb aTextColor); +protected: // from MObjectProvider + IMPORT_C virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId); +private: + void DrawText(CGraphicsContext& aGc, const TCoeTextTypeAdaptor& aText, const CFont& aFont, + const TRect& aTextRect, const TRect& aClipRect) const; + void Reset(); + CCoePlainTextDrawer(TRgb aTextColor); + TInt Construct(); //lint !e1511 Suppress member hides non-virtual member +private: + TRgb iTextColor; + }; + + + +// Inlines + +/** +This method returns the main color used by by DrawText() and DrawDisplayOrderedText(). +@return The color used to draw text. +*/ +TRgb XCoeTextDrawer::TextColor() const + { return iTextDrawer->TextColor(); } + +/** +This method sets the main color to use by DrawText() and DrawDisplayOrderedText() to draw text. +@param aColor The color to use to draw text. +*/ +void XCoeTextDrawer::SetTextColor(TRgb aColor) + { iTextDrawer->SetTextColor(aColor); } + +/** +Returns the text alignment that will be used by DrawText() and DrawDisplayOrderedText(). +Note that left and right alignment will be swapped for right-to-left scripts, unless +the alignment has been set to be absolute (see TGulAlignment). + +@return TGulAlignment value of iAlignment data member +*/ +TGulAlignment XCoeTextDrawer::Alignment() const + { return iTextDrawer->Alignment(); } + +/** +Set the text alignment that will be used by DrawText() and DrawDisplayOrderedText(). +Note that left and right alignment will be swapped for right-to-left scripts, unless +the alignment has been set to be absolute (see TGulAlignment). + +@param aAlignment TGulAlignment value. +*/ +void XCoeTextDrawer::SetAlignment(const TGulAlignment& aAlignment) + { iTextDrawer->SetAlignment(aAlignment); } + +/** +Returns the text margins that will be used by DrawText() and DrawDisplayOrderedText(). +Note that text effects may intrude on the margin. + +@return The margins between the text rect and the actual text, in pixels. +*/ +TMargins8 XCoeTextDrawer::Margins() const + { return iTextDrawer->Margins(); } + +/** +Set the text margins that will be used by DrawText() and DrawDisplayOrderedText(). +Note that text effects may intrude on the margin, and that margins are always relative to the text orientation. + +@param aMargins The margins between the text rect and the actual text, in pixels. +*/ +void XCoeTextDrawer::SetMargins(const TMargins8& aMargins) + { iTextDrawer->SetMargins(aMargins); } + +/** +Returns the gap (in pixels) between lines of text. Default gap is 1 (one) pixel. +@return The gap between lines of text, in pixels. +*/ +TInt XCoeTextDrawer::LineGapInPixels() const + { return iTextDrawer->LineGapInPixels(); } + +/** +Set the gap (in pixels) between lines of text. Default gap is 1 (one) pixel. +@param aLineGapInPixels The gap between lines of text, in pixels. +*/ +void XCoeTextDrawer::SetLineGapInPixels(TInt aLineGapInPixels) + { iTextDrawer->SetLineGapInPixels(aLineGapInPixels); } + + +#endif // __COETEXTDRAWER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coeutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coeutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,102 @@ +// COEUTILS.H + +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __COEUTILS_H__ +#define __COEUTILS_H__ + +#include +class CCoeEnv; + +/** Provides file and path utility functions. + +@publishedAll +@released */ +class ConeUtils + { +public: + IMPORT_C static TBool FileExists(const TDesC& aFileName); + IMPORT_C static void EnsurePathExistsL(const TPtrC& aFileName); + }; + + +/** +Class encapsulates methods for opening and closing localised resource files +in the CONE environment. The actual reading of resources from an opened +resource file is done using various CCoeEnv provided resource-reading +methods. The Cone Resource Loader API consists of the RCoeResourceLoader class. + +Only one resource at a time may be opened by one RCoeResourceLoader instance. +You can use several RCoeResourceLoader instances for accessing several +resources simultaneously or use one instance and close the previous resource +before opening a new one. + +The implementation uses BaflUtils::NearestLanguageFile to search for +a localised resource in proper search order. + +Usage example: + +@code +#include + +// Get CCoeEnv instance +CEikonEnv* eikEnv = CEikonEnv::Static(); +// Initialize loader +RCoeResourceLoader rLoader(eikEnv); + +// Push resource loader to cleanup stack, so that it will always be properly +// closed when popped. +CleanupClosePushL(rLoader); + +// Open resource file +_LIT( KSampleResourceFileName, "Z:\\System\\Apps\\sample\\sample.rsc" ); +TFileName fileName(KSampleResourceFileName); +rLoader.OpenL(fileName); + +// Read a resource +iSomeArray = eikEnv->ReadDesC16ArrayResourceL(R_SOME_RESOURCE); + +// Pop and destroy rLoader from stack. +// This also calls the rLoader close function after CleanupClosePushL is used. +CleanupStack::PopAndDestroy(); // rLoader +@endcode + +@publishedAll +@released */ +NONSHARABLE_CLASS(RCoeResourceLoader) + { +public: + IMPORT_C RCoeResourceLoader(CCoeEnv& aEnv); + IMPORT_C TInt Open(TFileName& aFileName); + IMPORT_C void OpenL(TFileName& aFileName); + IMPORT_C void Close(); +private: + // Prohibit copy constructor and assigment operator because not deriving from CBase. + RCoeResourceLoader(); + RCoeResourceLoader(const RCoeResourceLoader&); + RCoeResourceLoader& operator= (const RCoeResourceLoader&); +private: + // Needed for closing + CCoeEnv& iEnv; + TInt iResourceFileOffset; + }; + + +#endif // __COEUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/coeview.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/coeview.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,174 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __COEVIEW_H__ +#define __COEVIEW_H__ + +#include +#include // for CCoeStatic + +class CCoeAppUi; + +/** Specifies an interface for views. + +This class should be implemented by all application views. + +@publishedAll +@released */ +class MCoeView + { +public: + /** Returns a TVwsViewId uniquely identifying the view. + + @return Represents a view in the server. */ + virtual TVwsViewId ViewId() const=0; +private: + /** Takes any action required when a view is activated. Reimplemented versions + should read the contents of aCustomMessage for any message type identified + by aCustomMessageId that the view understands. + + The ID of the previously active view aPrevViewId is supplied so that the activated + view can subsequently switch back to the caller if required. + + @param aPrevViewId The UID of the previously active view. + @param aCustomMessageId Message type. + @param aCustomMessage Message contents. + + @publishedAll + @released */ + virtual void ViewActivatedL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage)=0; + /** Takes any action that is required following deactivation of the view. + + This reduces the work required of the window server. + + @publishedAll + @released */ + virtual void ViewDeactivated()=0; + +protected: + IMPORT_C MCoeView(); + IMPORT_C virtual TVwsViewIdAndMessage ViewScreenDeviceChangedL(); +private: + IMPORT_C virtual void ViewConstructL(); +protected: + IMPORT_C virtual TBool ViewScreenModeCompatible(TInt aScreenMode); // was MCoeView_Reserved_1() +private: + friend class CCoeViewManager; + IMPORT_C virtual void PrepareForViewActivation(); + IMPORT_C virtual void MCoeView_Reserved_2(); + IMPORT_C virtual void MCoeView_Reserved_3(); +private: + TInt iMCoeView_Reserved1; + }; + +/** An interface through which view deactivations can be +notified to an observer. + +Dialogs and other floating windows such as virtual keyboards which should be dismissed +when a view is deactivated can implement this interface and take any action required. + +@publishedAll +@released */ +class MCoeViewDeactivationObserver + { +public: + // + // Handles the deactivation of the view identified by aViewIdToBeDeactivated before the newly activated + // view with id aNewlyActivatedViewId is marked as current. + // + virtual void HandleViewDeactivation(const TVwsViewId& aViewIdToBeDeactivated,const TVwsViewId& aNewlyActivatedViewId)=0; +protected: + IMPORT_C MCoeViewDeactivationObserver(); +private: + IMPORT_C virtual void MCoeViewDeactivationObserver_Reserved_1(); + IMPORT_C virtual void MCoeViewDeactivationObserver_Reserved_2(); +private: + TInt iMCoeViewDeactivationObserver_Reserved1; + }; + +/** An interface through which view activations can be notified to an observer. + +@publishedPartner +@released +*/ +class MCoeViewActivationObserver + { +public: + // + // Handles the activation of the view aNewlyActivatedViewId before the old view aViewIdToBeDeactivated is + // to be deactivated. + // + virtual void HandleViewActivation(const TVwsViewId& aNewlyActivatedViewId,const TVwsViewId& aViewIdToBeDeactivated)=0; +protected: + IMPORT_C MCoeViewActivationObserver(); +private: + IMPORT_C virtual void MCoeViewActivationObserver_Reserved_1(); + IMPORT_C virtual void MCoeViewActivationObserver_Reserved_2(); +private: + TInt iMCoeViewActivationObserver_Reserved1; + }; + + +/** An interface through which view events can be notified to an observer. + +@publishedPartner +@released */ +class MCoeViewObserver + { +public: + virtual void HandleViewEventL(const TVwsViewEvent& aEvent)=0; +protected: + IMPORT_C MCoeViewObserver(); +private: + IMPORT_C virtual void MCoeViewObserver_Reserved1(); + IMPORT_C virtual void MCoeViewObserver_Reserved2(); +private: + TInt iMCoeViewObserver_Reserved1; + }; + + +// +// Handles any screen device changes that occur while a view is active +// +/** A default screen device change handler. + +This class is used to activate a default view when a screen "flip" occurs, +if the currently active view does not implement MCoeView::ViewScreenDeviceChangedL(). + +@publishedAll +@released +@see MCoeView::ViewScreenDeviceChangedL() */ +class CCoeScreenDeviceChangeDefaultHandler : public CCoeStatic + { +public: + IMPORT_C ~CCoeScreenDeviceChangeDefaultHandler(); + IMPORT_C static CCoeScreenDeviceChangeDefaultHandler* Self(); +protected: + IMPORT_C CCoeScreenDeviceChangeDefaultHandler(); + IMPORT_C CCoeScreenDeviceChangeDefaultHandler(TInt aDestructionPriority); +private: + IMPORT_C virtual void CCoeStatic_Reserved1(); + IMPORT_C virtual void CCoeStatic_Reserved2(); + IMPORT_C virtual void CCoeScreenDeviceChangeDefaultHandler_Reserved1(); + IMPORT_C virtual void CCoeScreenDeviceChangeDefaultHandler_Reserved2(); +public: + virtual void HandleScreenDeviceChangedL()=0; + virtual TVwsViewIdAndMessage DefaultViewOnScreenDeviceChanged()=0; +private: + TInt iCCoeScreenDeviceChangeDefaultHandler; + }; + + +#endif // __COEVIEW_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/conarc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/conarc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,305 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__CONARC_H__) +#define __CONARC_H__ + +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__APMSTD_H__) +#include +#endif + +// +// base interface for converters +// + +/** +@publishedAll +@released +*/ +const TInt KUidConverterToBase64=0x10000721; +/** +@publishedAll +@released +*/ +const TInt KUidConverterFromBase64=0x100011C5; +/** +@publishedAll +@released +*/ +const TInt KUidPlainTextToQuotedPrintableConverter=0x10001826; +/** +@publishedAll +@released +*/ +const TInt KUidQuotedPrintableToPlainTextConverter=0x10001825; +/** +@publishedAll +@released +*/ +const TInt KUidETextToPlainTextConverter= +#if defined(ETEXT_CONVERTER_UIDS_CORRECTED) + 0x100040c8; +#else + 0x100040c7; +#endif + +/** +@publishedAll +@released +*/ +const TInt KUidPlainTextToETextConverter= +#if defined(ETEXT_CONVERTER_UIDS_CORRECTED) + 0x100040c7; +#else + 0x100040c8; +#endif + +/** +@publishedAll +@released +*/ +#ifdef _UNICODE +#define KUidConverterDll KUidConverterDll16 +#else +#define KUidConverterDll KUidConverterDll8 +#endif + +/** +@internalComponent +@deprecated +*/ +const TInt KUidConverterDllValue8=0x10000C61; + +/** +@internalComponent +@deprecated +*/ +const TUid KUidConverterDll8={KUidConverterDllValue8}; + +/** +@internalComponent +*/ +const TInt KUidConverterInfoFileValue=0x10000C62; + +/** +@publishedAll +@released +*/ +const TUid KUidConverterInfoFile={KUidConverterInfoFileValue}; + +/** +@internalComponent +*/ +const TInt KUidConverterInfoStreamValue=0x10000CD0; + +/** +@internalComponent +*/ +const TUid KUidConverterInfoStream={KUidConverterInfoStreamValue}; + +/** +The UID2 of converter-type DLLs. +@publishedAll +@released +*/ +const TUid KUidConverterDll16={0x10003A30}; + +/** +The extension of converter information files. +@publishedAll +@released +*/ +_LIT(KConverterInfoFileExtension,".CNF"); +/** +The extension of converter DLLs. +@publishedAll +@released +*/ +_LIT(KConverterDllExtension,".CNV"); + + +class MConverterUiObserver +/** +Interface implemented by the client of a conversion operation to observe conversion +progress. + +@see CConverterBase2 +@publishedAll +@released +*/ + { +public: + /** Describes the result of a conversion operation. */ + enum TResult + { + /** Conversion succeeded. */ + ESuccess, + /** Conversion partially succeeded. */ + EPartialSuccess, + /** Conversion failed. */ + EFailure + }; + /** Describes the actions that the converter should take. */ + enum TAction + { + /** Keep already converted data. */ + ERetain, + /** Delete converted data. */ + ERemove, + /** Reconvert data. */ + ERepeat + }; +public: + /** Gets the maximum number of steps that the conversion operation can take. + + The conversion may complete in less than this number of steps (for example + if an error occurs or the action is cancelled). + + Each step is a call to CConverterBase2::DoConvert(), although during synchronous + conversions this is transparent to the client code. + + @param aMax Maximum number of conversion steps. + @param aObject Index that identifies an embedded object when one is being converted. */ + virtual void MaxSteps(TInt aMax, TInt aObject)=0; + /** Alerts the client to an error in conversion. + + @param aResult A TResult value indicating the conversion state. + @param aObject Index that identifies an embedded object when one is being converted. + @return A TAction value that indicates what action the converter should take. */ + virtual TInt Result(TInt aResult, TInt aObject)=0; + /** Queries the client for a password in order to access the data. + + @param aClue Data with a meaning that is specific to each converter: it could for + example indicate where the password is stored. + @return The password entered. */ + virtual HBufC* QueryPasswordL(const TDesC& aClue)=0; + IMPORT_C virtual void Reserved1_Conv_Obs(); + }; + + +class CConverterBase : public CBase +/** For Ecom Style Converters i.e.,for v9.1 and above CConverterBase2 should be used. + +Polymorphic interface for converters from one data format to another. + +Clients use this interface to access data converters. The implementator of +a data converter derives a class from this in which to implement the appropriate +conversion functionality. + +The interface offers conversions between files, and between objects that support +the stream interfaces, e.g. stream stores. + +There are two flavours of conversion methods: + +the synchronous interfaces, ConvertL() and ConvertObjectL(), which perform +the specified conversion and then return + +the asynchronous interfaces, ConvertAL() and ConvertObjectAL(), which initialise +the converter object, and allow the client code to call DoConvertL() a number +of times until the conversion is complete or abandoned. + +@see CConverterBase2 +@publishedAll +@released */ + { +public: + /** Bitmask values that describe the capabilities of the converter. */ + enum TCapability + { + /** The converter can convert files. */ + EConvertsFiles=0x01, + /** The converter can convert stream objects. */ + EConvertsObjects=0x02, + /** The converter can extract embedded objects. */ + EConvertsExtract=0x04 + }; +public: + IMPORT_C virtual void ConvertL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // These default to calling the async versions in a loop + IMPORT_C virtual void ConvertObjectL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); + IMPORT_C virtual void ConvertAL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported + IMPORT_C virtual void ConvertObjectAL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported + IMPORT_C virtual TBool DoConvertL(); // these default to leaving with KErrNotSupported + /** Gets the converter's UID. + + @return Converter's UID */ + virtual TUid Uid() =0; + IMPORT_C virtual TInt Capabilities(); // defaults to "everything" + IMPORT_C virtual void CancelConvert(); // for any cleanup + IMPORT_C virtual CConverterBase* EmbeddedObjectL(TDataType& aType); + IMPORT_C virtual TBool GetEmbeddedFileName(TFileName& aFileName); + IMPORT_C virtual void ExtendedInterfaceL(TUid aInterfaceUid, CBase*& aInterface); + }; + + +class CConverterLibrary : public CBase +/** A converter DLL's factory for individual CConverterBase-derived objects. + +The implementor of a converter DLL should implement this class. + +@publishedAll +@deprecated */ + { +public: + /** Creates and returns an instance of the converter with the specified UID. + + This class should not allocate any resources that are not returned to the + caller. + + @param aUid UID of the converter to create + @return The specified converter. If the converter does not implement a converter + associated with the UID, then it should return NULL. */ + virtual CConverterBase* Converter(TUid aUid)=0; // passes ownership + }; + +class CConverterBase2 : public CConverterBase +/** Base Class for Ecom Style Converters +The methods in CConverterBase2 are inherited from CConverterBase + +There are two flavours of conversion methods: + +the synchronous interfaces, ConvertL() and ConvertObjectL(), which perform +the specified conversion and then return + +the asynchronous interfaces, ConvertAL() and ConvertObjectAL(), which initialise +the converter object, and allow the client code to call DoConvertL() a number +of times until the conversion is complete or abandoned. + +@publishedAll +@released */ + { +public: + static CConverterBase2* CreateConverterL(TUid aImplUid); + IMPORT_C virtual ~CConverterBase2(); + IMPORT_C virtual void ConvertL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // These default to calling the async versions in a loop + IMPORT_C virtual void ConvertObjectL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); + IMPORT_C virtual void ConvertAL(const TFileName& aSourceFile, const TFileName& aTargetFile, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported + IMPORT_C virtual void ConvertObjectAL(RReadStream& aReadStream, RWriteStream& aWriteStream, MConverterUiObserver* aObserver=NULL); // these default to leaving with KErrNotSupported + IMPORT_C virtual TBool DoConvertL(); // these default to leaving with KErrNotSupported + virtual TUid Uid()=0; + IMPORT_C virtual TInt Capabilities(); // defaults to "everything" + IMPORT_C virtual void CancelConvert(); // for any cleanup + IMPORT_C virtual CConverterBase* EmbeddedObjectL(TDataType& aType); + IMPORT_C virtual TBool GetEmbeddedFileName(TFileName& aFileName); + IMPORT_C virtual void ExtendedInterfaceL(TUid aInterfaceUid, CBase*& aInterface); + IMPORT_C virtual void Reserved_1(); + IMPORT_C virtual void Reserved_2(); +private: + TUid iDestructionKey; + TInt iSpare; + }; +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/concnf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/concnf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,180 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__CONCNF_H__) +#define __CONCNF_H__ + +#include +#include +#include +#include +#include +#include + +/** +@publishedAll +@released +*/ +#define KMaxTranslation 50 + +/** Buffer to contain a localised data type name. + +@publishedAll +@released */ +typedef TBuf TTranslation; + + +class TLanguageInfo +/** Holds a localised name for a data type. + +@publishedAll +@released */ + { +public: + TLanguageInfo(); + IMPORT_C TLanguageInfo(TLanguage aLanguage,TTranslation aTranslation); +public: + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TLanguage Language(); + TTranslation Translation(); + void ReadFromResource(TResourceReader& aReader); +public: + TLanguage iLanguage; + TTranslation iTranslation; + }; + +class CMimeInfo : public CBase +/** Holds the localised names for a data type. + +@publishedAll +@released */ + { +public: + IMPORT_C ~CMimeInfo(); + IMPORT_C static CMimeInfo* NewLC(TDataType& aMime); + static CMimeInfo* NewL(); + static CMimeInfo* NewLC(const CMimeInfo* aInfo); +public: + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + TDataType Mime(); + TTranslation Text(); + IMPORT_C void AddLanguageL(TLanguageInfo aLang); + static CMimeInfo* NewLC(TResourceReader& aReader); +private: + void ConstructL(); + void ConstructL(TResourceReader& aReader); + void AddLanguageInfoL(TResourceReader& aReader); +private: + TDataType iMime; + CArrayFixFlat *iLanguageInfo; + }; + +class CCnaConverter : public CBase +/** Holds the inherent properties of a converter. + +These are its UID and the data types it supports. + +Note that the setter functions affect only the current object, not the stored +information for the converter. + +@publishedAll +@released */ + { +public: + static CCnaConverter* NewLC(); + static CCnaConverter* NewL(); + IMPORT_C static CCnaConverter* NewL(TUid aUid); + IMPORT_C static CCnaConverter* NewLC(TUid aUid); + IMPORT_C static CCnaConverter* NewL(const CCnaConverter& aConverter); + IMPORT_C static CCnaConverter* NewLC(const CCnaConverter& aConverter); + IMPORT_C ~CCnaConverter(); + IMPORT_C void SetUid(TUid aUid); + IMPORT_C TBool MimeFrom(const TDataType& aMimeType) const; + IMPORT_C TBool MimeTo(const TDataType& aMimeType) const; + IMPORT_C TTranslation MimeFromText(const TDataType& aMimeType) const; + IMPORT_C TTranslation MimeToText(const TDataType& aMimeType) const; + IMPORT_C TInt CountFrom() const; + IMPORT_C TInt CountTo() const; + IMPORT_C TDataType MimeFrom(TInt aIndex) const; + IMPORT_C TDataType MimeTo(TInt aIndex) const; + IMPORT_C TTranslation MimeFromText(TInt aIndex) const; + IMPORT_C TTranslation MimeToText(TInt aIndex) const; + inline TUid Uid() const; + static CCnaConverter* NewL(TUid aUid,TResourceReader& aReader); +private: + CCnaConverter(); + void ConstructL(); + TBool FindMime(const TDataType& aMimeType, const CArrayPtrFlat* aList) const; + TTranslation FindMimeText(const TDataType& aMimeType, const CArrayPtrFlat* aList) const; + void ConstructL(TUid aUid,TResourceReader& aReader); + void AddMimeDataL(TResourceReader& aReader, CArrayPtrFlat& aMimeInfo); +private: + TUid iUid; + CArrayPtrFlat* iMimeFrom; + CArrayPtrFlat* iMimeTo; + }; + +inline TUid CCnaConverter::Uid() const +/** Gets the converter UID. + +@return Converter UID */ + {return iUid;} + +class CCnaConvInfoFile2 : public CBase +/** +implementation class +@internalComponent +*/ + { +public: + ~CCnaConvInfoFile2(); + // +protected: + void ConstructL(); +protected: + RFs iFs; + RResourceFile iResourceFile; + CArrayPtr* iConverters; + }; + +/** Encapsulates a collection of converter properties (CCnaConverter) read from a converter +information (.rsc) file. + +@publishedAll +@released +*/ +// Each RSC file contains CCnaConverter information for each +// available CConverterBase2 derived class in its associated DLL. + +// In addition there may be INI files for each converter which supply run time extended +// CCnaConverter information such as additional mime types. +class CCnaConvInfoFileReader2 : public CCnaConvInfoFile2 + { +public: + IMPORT_C static CCnaConvInfoFileReader2* NewLC(const TDesC& aFileName); + IMPORT_C static CCnaConvInfoFileReader2* NewL(const TDesC& aFileName); + IMPORT_C TInt Count(); + IMPORT_C CCnaConverter* AtL(TInt anIndex); + // + IMPORT_C void RestoreL(); +private: + CCnaConvInfoFileReader2(); + void RestoreConverterL(TResourceReader& aReader); + void ConstructL(const TDesC& aFileName); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/confndr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/confndr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,16 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// This header is useless but we still export it to maintain SC. Should be removed when possible. +// +// diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/conlist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/conlist.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,116 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__CONLIST_H__) +#define __CONLIST_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__F32FILE_H__) +#include +#endif + +#if !defined(__CONARC_H__) +#include +#endif + +#if !defined(__CONCNF_H__) +#include +#endif + +#if !defined(__IMPLEMENTATION_INFORMATION_H__) +#include +#endif +#if !defined(__ECOM_H__) +#include +#endif + + +/** Creates a converter dll's factory interface object. + +@publishedAll +@deprecated +*/ +typedef CConverterLibrary* (*CreateCConverterLibrary)(); + +struct SConverterInfo +/** Describes a converter, as obtained from a converter list (CCnaConverterList). + +@publishedAll +@released +@see CCnaConverterList */ + { + /** Localised name of the data type. */ + TTranslation iTranslation; + /** Converter UID. */ + TUid iUid; + /** Position of the converter in the list. */ + TInt iIndex; + }; + +class CCnaConverterList : public CBase +/** Provides a list of available converters, allowing clients to search for and +obtain converters for specific source and target data types. + +@publishedAll +@released */ + { +public: + IMPORT_C static CCnaConverterList* NewL(); + IMPORT_C static CCnaConverterList* NewLC(); + IMPORT_C void Release(); + IMPORT_C ~CCnaConverterList(); +// + IMPORT_C TInt CountL(); + inline TInt Count(); + IMPORT_C CConverterBase* NewConverterL(TUid aUid); + IMPORT_C void UpdateL(); + IMPORT_C TUid ConvFromL(const TDataType& aMimeType); // searches for a particular converter + IMPORT_C TUid ConvToL(const TDataType& aMimeType); + IMPORT_C TUid ConverterL(const TDataType& aFrom,const TDataType& aTo); + IMPORT_C void ConvFromListL(const TDataType& aMimeType,CArrayFix* aSConverterInfoArray); + IMPORT_C void ConvToListL(const TDataType& aMimeType,CArrayFix* aSConverterInfoArray); + IMPORT_C TInt MimeTypeFrom(TDataType& aDataType,const SConverterInfo& aConverterInfo) const; + IMPORT_C TInt MimeTypeTo(TDataType& aDataType,const SConverterInfo& aConverterInfo) const; +private: + CCnaConverterList(); + void ConstructL(); + CConverterBase* LoadConverterL(TUid aImplUid); +private: + TBool iDoneScan; + CArrayPtr* iConverters; + RImplInfoPtrArray iImplementationArray; + }; + +class ConverterListUtil +/** @internalComponent */ + { +public: + static CConverterBase* UtilityConverterL(TUid aUid); + static TInt CountUtilityConverters(); + }; + +inline TInt CCnaConverterList::Count() +/** @deprecated + +Deprecated - Use CCnaConverterList::CountL instead. +Rescan of the disk to refresh the list of converters could leave. */ + { + return CountL(); + } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/conplugin.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/conplugin.rh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,95 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// HEADER INFO +// Describes the converter. +// +// + + + +/** + @publishedAll + @released +*/ +STRUCT CONARC_RESOURCE_FILE + { + /** Future use, do not use */ + LLINK extension = 0; + // + LEN WORD STRUCT converter_list[]; // Converter_data + } + +STRUCT CONVERTER_DATA +/** Describes a converter within a converter DLL. + +@publishedAll +@released */ + { + /** Future use, do not use */ + LLINK extension = 0; + /** The UID of the converter. */ + LONG conv_uid; + // + /** Array of MIME resources describing the data types that the converter can convert. + + Target type: MIME */ + LEN WORD STRUCT from_list[]; // Mime Type + /** Array of MIME resources describing the data types to which the converter can convert. + + Target type: MIME */ + LEN WORD STRUCT to_list[]; // Mime Type + // + } + +/** +@publishedAll +@released +*/ +#define KMaxMimeType 256 + +/** +@publishedAll +@released +*/ +#define KMaxTranslation 50 + +STRUCT MIME +/** Describes a data type that a converter can convert to or from. + +@publishedAll +@released */ + { + /** Future use, do not use */ + LLINK extension = 0; + /** The supported MIME type, e.g. text/html. */ + LTEXT8 type(KMaxMimeType); + /** Array of LANG_DATA resources giving localised human-readable names for the MIME type. + + Target type: LANG_DATA */ + LEN WORD STRUCT lang_list[] ; //lang_data + } + +STRUCT LANG_DATA +/** A localised human-readable name for a MIME type. + +@publishedAll +@released */ + { + /** Future use, do not use */ + LLINK extension = 0; + /** The ID of the language being used.Values should be as defined in TLanguage. */ + WORD lang_id; + /** The human-readable name for the MIME type. */ + LTEXT translation(KMaxTranslation); + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/crulemarkedstack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/crulemarkedstack.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,46 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A speciales marked stack specifically for PARSE rules. +// Allows a rule stack to merge rules upto a given mark type. +// +// + +#ifndef __CRULEMARKEDSTACK_H__ +#define __CRULEMARKEDSTACK_H__ + + +// includes +#include +#include +#include + +#pragma warning (disable : 4127) // conditional expression is constant + + +template +class CRuleMarkedStack : public CMarkedStack +/** +@publishedAll +@released +*/ + { +public: + void MergeToMarkL(TInt aMarkType); + }; + +#include + +#pragma warning ( default : 4127 ) // conditional expression is constant + +#endif // __CRULEMARKEDSTACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/csendasaccounts.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/csendasaccounts.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,75 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CSENDASACCOUNTS_H__ +#define __CSENDASACCOUNTS_H__ + +#include +#include +#include + +// Forward declarations +class RReadStream; +class RWriteStream; + +/** +Identifies accounts for use by SendAs. + +@publishedAll +@released +*/ +typedef TMsvId TSendAsAccount; + +/** +Provides human-readable names and IDs for the list of accounts for a given +message type. + +@publishedAll +@released +*/ +class CSendAsAccounts : public CBase + { +public: + IMPORT_C static CSendAsAccounts* NewL(); + IMPORT_C virtual ~CSendAsAccounts(); + + IMPORT_C TUid MessageType() const; + IMPORT_C void SetMessageType(TUid aMessageType); + + IMPORT_C const MDesCArray& AccountNames() const; + IMPORT_C TSendAsAccount Account(TInt aIndex) const; + IMPORT_C TPtrC NameFromAccountL(const TSendAsAccount aAccount) const; + IMPORT_C TSendAsAccount AccountFromNameL(const TDesC& aName) const; + IMPORT_C TInt Count() const; + IMPORT_C void Reset(); + + IMPORT_C void InternalizeL(RReadStream& aReadStream); + IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const; + + IMPORT_C void AppendAccountL(const TDesC& aAccountName, TSendAsAccount aAccount); + IMPORT_C void RemoveAccount(TInt aIndex); + IMPORT_C TInt Size() const; + +private: + CSendAsAccounts(); + void ConstructL(); + +private: + TUid iMessageType; + CDesCArrayFlat* iAccountNames; + RArray iAccounts; + }; + +#endif // __CSENDASACCOUNTS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/csendasmessagetypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/csendasmessagetypes.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,61 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __CSENDASMESSAGETYPES_H__ +#define __CSENDASMESSAGETYPES_H__ + +#include +#include + +// Forward declarations +class RReadStream; +class RWriteStream; + +/** +Provides human-readable names and UIDs for the filtered list of message types. + +@publishedAll +@released +*/ +class CSendAsMessageTypes : public CBase + { +public: + IMPORT_C static CSendAsMessageTypes* NewL(); + IMPORT_C virtual ~CSendAsMessageTypes(); + + IMPORT_C const MDesCArray& AvailableMessageTypes() const; + IMPORT_C TUid MessageTypeUid(TInt aIndex) const; + IMPORT_C TPtrC NameFromUidL(const TUid aUid) const; + IMPORT_C TUid UidFromNameL(const TDesC& aName) const; + IMPORT_C TInt Count() const; + IMPORT_C void Reset(); + + IMPORT_C void InternalizeL(RReadStream& aReadStream); + IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const; + + IMPORT_C void AppendMessageTypeL(const TDesC& aMessageTypeName, TUid aMessageTypeUid); + IMPORT_C void RemoveMessageType(TInt aIndex); + IMPORT_C TInt Size() const; + +private: + CSendAsMessageTypes(); + void ConstructL(); + +private: + CDesCArrayFlat* iMessageTypeNames; + RArray iMessageTypeUids; + }; + +#endif // __CSENDASMESSAGETYPES_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/csmsclass0base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/csmsclass0base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Base class for Class 0 SMS plugin +// +// + + + +/** + @publishedAll + @released +*/ + +#ifndef __CSMSCLASS0BASE_H_ +#define __CSMSCLASS0BASE_H_ + +#include + +class CSmsClass0Base : public CBase + { + +public: + virtual void DisplayMessageHandler(TDesC8& aSmsMessage, TBool aComplete); + ~CSmsClass0Base(); + +protected: + CSmsClass0Base(); + + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/cstack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/cstack.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// A template class to provide a classic stack like interface & functionality +// The entries on the stack are owned (i.e. deleted) by the stack if the +// StackOwnsEntry argument is ETrue +// +// + +#ifndef __CSTACK_H__ +#define __CSTACK_H__ + +#include + +#pragma warning (disable : 4127) // conditional expression is constant + + +/** + @file + @publishedAll + @released +*/ + + +template +class CStack : /*protected CArrayPtrSeg*/ public CArrayPtrSeg + { +public: + inline CStack(); + inline ~CStack(); + + inline void Clear(); + inline TBool IsEmpty() const; + inline void PushL(T* aItem); + inline T* Pop(); + inline T* Head() const; + inline T* Last() const; + }; + +#include + +#pragma warning ( default : 4127 ) // conditional expression is constant + +#endif // __CSTACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/dtdnode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/dtdnode.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// DTD node header +// +// + +#if !defined(__CDTDNODE_H__) +#define __CDTDNODE_H__ + +#include +#include + +class CDTDNode : public CBNFNode +/** +Document Type Definition (DTD) node that forms part of a DTD tree. +@publishedAll +@released +*/ +{ +public: + //##ModelId=3B66675300CE + inline ~CDTDNode(); + + //##ModelId=3B66675300CD + static inline CDTDNode* NewL(); + //##ModelId=3B66675300CC + inline void AddCompletedAttributeL(); + + //##ModelId=3B66675300C4 + const TDesC* CompletedAttrID(); + + enum{ // attribute IDs start at -6000 + KCompletedAttrID = -6000 + }; +private: + //##ModelId=3B66675300C3 + inline CDTDNode(); +}; + + +#include + +#endif // __CDTDNODE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikamnt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikamnt.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,81 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKAMNT_H__ +#define __EIKAMNT_H__ + +#include + +class CGulIcon; +class MEikAutoMenuObserver; + +/** A menu title that will be added to a standard resource-constructed menu bar. + +If added to the CEikAutoMenuTitleArray stored by CEikonEnv during standard +application start up, the menu pane specified will appear in all applications. +The menu observer passed in is notified of any events on such menu panes in +preference to the usual observer (CAppUi). + +@publishedAll +@released */ +NONSHARABLE_CLASS(CEikAutoMenuTitle) : public CBase + { +public: + /** Specifies the position of a menu title in a menu. + + If an array of menu titles holds more than one menu title that is specified + for the start or end of a menu, the menu titles are placed in the same order + as that in which they appear in the array. This means the first menu title + specified with EStart in an array will be the first on a menu bar and the last + EEnd will be the last on a menu bar. */ + enum TTitlePos + { + /** The menu title is placed first in a menu. */ + EStart, + /** The menu title is placed last in a menu. */ + EEnd + }; + enum { ENominalTextLength=40 }; +public: + IMPORT_C static CEikAutoMenuTitle* NewLC(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver, + TInt aMenuPaneResourceId = 0, CGulIcon* aIcon = NULL); + IMPORT_C ~CEikAutoMenuTitle(); +private: + CEikAutoMenuTitle(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver, + TInt aMenuPaneResourceId, CGulIcon* aIcon); +public: + TTitlePos iPos; + TBuf iText; + MEikAutoMenuObserver& iMenuObserver; + TInt iMenuPaneResourceId; + CGulIcon* iIcon; + }; + + +/** Creates a standard array of CEikAutoMenuTitle objects. + +@publishedPartner +@released */ +NONSHARABLE_CLASS(CEikAutoMenuTitleArray) : public CArrayPtrFlat +// If more than one title is specified for the start or end, they will be placed in the same order they appear +// in the array (so the first EStart in the array will be the first on a menu bar also but the last EEnd will +// be the last). + { +public: + CEikAutoMenuTitleArray(); + ~CEikAutoMenuTitleArray(); + }; + +#endif // __EIKAMNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikapp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikapp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,114 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKAPP_H__ +#define __EIKAPP_H__ + +#include // class CApaApplication +#include + +class CCoeEnv; + +/** The base of all Uikon applications. + +CEikApplication builds on CApaApplication, providing a basis for applications +working within the framework provided by Uikon. It also contains an interface +to the resource file and the document object belonging to the application. + +Each Uikon application class is derived from CEikApplication. Application +writers must provide at least an implementation of the pure virtual function +CreateDocumentL(). + +The application's resource file can be changed from the default by overriding +ResourceFileName(). + +@publishedAll +@released +@see CEikDocument */ +class CEikApplication : public CApaApplication + { +public: + IMPORT_C ~CEikApplication(); + inline TInt ResourceFileOffset() const; + inline CApaProcess* Process() const; + inline const TApaAppCaption& AppCaption() const; + IMPORT_C virtual void GetDefaultDocumentFileName(TFileName& aDocumentName) const; + IMPORT_C virtual TFileName BitmapStoreName() const; +public: // from CApaApplication + IMPORT_C CDictionaryStore* OpenIniFileLC(RFs& aFs) const; + IMPORT_C void Capability(TDes8& aInfo) const; + IMPORT_C void SetToIniFileNameL(TParse& aParser) const; +protected: // from CApaApplication + IMPORT_C void PreDocConstructL(); + IMPORT_C CApaDocument* CreateDocumentL(CApaProcess* aProcess); + IMPORT_C void NewAppServerL(CApaAppServer*& aAppServer); +protected: + IMPORT_C CEikApplication(); + IMPORT_C void EnsureCaptionIsLocalisedL(const TDesC& aLocalisableResourceFile); +public: + IMPORT_C virtual TFileName ResourceFileName() const; +private: + IMPORT_C virtual void CEikApplication_Reserved1(); + IMPORT_C virtual void CEikApplication_Reserved2(); +private: + /** + @publishedAll + @released + */ + virtual CApaDocument* CreateDocumentL()=0; +private: // internal use + void InitAppNameParserWithPathAndExt(TParse& aParser, const TDesC& aPath, const TDesC& aExt) const; +protected: + CCoeEnv* iCoeEnv; + TInt iResourceFileOffset; +private: + enum + { + EFlagCaptionCorrectlyLocalised = 0x00000001 + }; +private: + CApaProcess* iProcess; + TApaAppCaption iCaption; + TApaAppCapabilityBuf* iCapabilityBuf; + TUint iAppFlags; + TInt iSpare; + }; + +/** Gets the offset value defined for this application's default resource file. + +As the resource file offset can also be accessed through iResourceFileOffset, +this function should not be needed by any apps. + +@return Offset of a resource file. */ +inline TInt CEikApplication::ResourceFileOffset() const + { return iResourceFileOffset; } + + +/** Gets the managing process. + +@return A pointer to the process object managing this application's documents. */ +inline CApaProcess* CEikApplication::Process() const + { return iProcess; } + + +/** Gets the caption for this application. + +Captions are displayed in the task list. + +@return Application caption. */ +inline const TApaAppCaption& CEikApplication::AppCaption() const + { return iCaption; } + +#endif // __EIKAPP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikappui.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikappui.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,186 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKAPPUI_H__ +#define __EIKAPPUI_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class CEikDocument; +class CEikApplication; +class CEikAppUiExtra; +class MApaEmbeddedDocObserver; +struct SExtendedError; +class CApaCommandLine; + +/** Handles application-wide aspects of the application's user interface such +as the menu bar, toolbar pop-up menus, opening and closing files and exiting the +application cleanly. + +Every GUI application should use its own class derived from CEikAppUi. + +An app UI's main role is to handle commands, in its HandleCommandL() function. +These may be invoked using the menu bar, toolbar, or hotkeys; the commands +that an app UI handles are specified in the application's resource file. + +In addition, the app UI normally needs to respond to other kinds of events, by +providing suitable implementations of the following virtual functions, all +inherited from CCoeAppUi: + +- HandleKeyEventL(): Key events. + +- HandleForegroundEventL(): Application switched to foreground. + +- HandleSwitchOnEventL(): Machine switched on. + +- HandleSystemEventL(): System events. + +- HandleApplicationSpecificEventL(): Application-specific events. + +@publishedAll +@released */ +class CEikAppUi : public CCoeAppUi, public MEikMenuObserver, public MCoeMessageObserver, public MObjectProvider + { +public: + IMPORT_C ~CEikAppUi(); + IMPORT_C CEikAppUi(); +public: // new functions + IMPORT_C virtual void ConstructL(); + IMPORT_C virtual void HandleModelChangeL(); + IMPORT_C TLanguage ApplicationLanguageL() const; + IMPORT_C CEikApplication* Application() const; + IMPORT_C CEikDocument* Document() const; + IMPORT_C void SetDocument(CEikDocument* aDocument); + inline CEikAppUi* ContainerAppUi() const; + IMPORT_C void SetEmbeddedDocInfo(MApaEmbeddedDocObserver* aObserver, TBool aReadOnly); + IMPORT_C virtual TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName, const TDesC8& aTail); + IMPORT_C virtual TBool ProcessCommandParametersL(CApaCommandLine& aCommandLine); + // Application screen extent + IMPORT_C TRect ClientRect() const; + IMPORT_C virtual TRect ApplicationRect() const; + // Menu utilities + IMPORT_C void LaunchPopupMenuL(TInt aResourceId, const TPoint& aTargetPos, TPopupTargetPosType aTargetType, const CEikHotKeyTable* aHotKeyTable = NULL); + IMPORT_C virtual void StopDisplayingMenuBar(); + // Fading effect + IMPORT_C TBool FadeWhenInBackground(); + IMPORT_C virtual void SetFadedL(TBool aFaded); + inline void SetFaded(TBool aFaded); //mm: has no implementation +public: // new function + IMPORT_C virtual void ReportResourceChangedToAppL(TInt aType); + IMPORT_C virtual void HandleCommandL(TInt aCommand); + IMPORT_C virtual void ProcessMessageL(TUid aUid, const TDesC8& aParams); + IMPORT_C virtual void OpenFileL(const TDesC& aFileName); + IMPORT_C virtual void CreateFileL(const TDesC& aFileName); + IMPORT_C virtual TErrorHandlerResponse HandleError(TInt aError, const SExtendedError& aExtErr, TDes& aErrorText, TDes& aContextText); + IMPORT_C virtual void HandleResourceChangeL(TInt aType); +public: // from CCoeAppUi + IMPORT_C void PrepareToExit(); +protected: // new functions + // Construction + IMPORT_C void BaseConstructL(TInt aAppUiFlags = 0); + IMPORT_C void ReadAppInfoResourceL(TInt aResourceFileOffset = 0); + IMPORT_C void CreateHotKeyControlL(TInt aResourceId); + IMPORT_C TBool ProcessCommandParametersL(TApaCommand aCommand, TFileName& aDocumentName); + // User data change management + IMPORT_C void SetDocChanged(); + IMPORT_C void SaveAnyChangesL(); + IMPORT_C void SaveL(); + IMPORT_C virtual void Exit(); + // Utility + IMPORT_C void ClosePopup(); //mm: deprecate? +protected: // from MEikMenuObserver + IMPORT_C void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable); +protected: // from CCoeAppUi + IMPORT_C void HandleApplicationSpecificEventL(TInt aType,const TWsEvent& aEvent); + IMPORT_C void HandleForegroundEventL(TBool aForeground); + IMPORT_C void HandleWsEventL(const TWsEvent& aEvent, CCoeControl* aDestination); + IMPORT_C void HandleSystemEventL(const TWsEvent& aEvent); + IMPORT_C void HandleScreenDeviceChangedL(); +protected: // from MEikCommandObserver + IMPORT_C void ProcessCommandL(TInt aCommand); +private: // from MEikMenuObserver + IMPORT_C void SetEmphasis(CCoeControl* aMenuWindow,TBool aEmphasis); +protected: // from MCoeMessageObserver + IMPORT_C MCoeMessageObserver::TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8& aMessageParameters); +protected: // from MObjectProvider + IMPORT_C virtual TTypeUid::Ptr MopSupplyObject(TTypeUid aId); + IMPORT_C virtual MObjectProvider* MopNext(); +private: + // Validate document file type + IMPORT_C virtual TBool ValidFileType(TUid aFileUid) const; +private: // spare virtuals + IMPORT_C virtual void Reserved_3(); + IMPORT_C virtual void Reserved_4(); +public: + /** Application resource file and screen furniture flags, passed to BaseConstructL(). */ + enum + { + /** Application uses a standard resource file. */ + EStandardApp = 0x00, + /** Application has no resource file. */ + ENoAppResourceFile = 0x01, + /** Application uses a different resource file from the standard. */ + ENonStandardResourceFile= 0x02, + /** Application uses no screen furniture. */ + ENoScreenFurniture = 0x04, + /** Indicates the last value in the enum. */ + ELastReservedEikAppUiFlag = 0x8000 + }; +public: + IMPORT_C void ReportResourceChangedToAppStackL(CEikAppUi* aTopApp, TInt aEventId); + CEikAppUiExtra* AppUiExtra(); +private: + void CreateResourceIndependentFurnitureL(); + TBool ValidFileExistsL(const TDesC& aFileName); +protected: + /** A pointer to the application's document. */ + CEikDocument* iDocument; + /** A pointer to the containing app UI. This is NULL for non-embedded + apps. */ + CEikAppUi* iContainerAppUi; + /** Embedded document observer. */ + MApaEmbeddedDocObserver* iDoorObserver; + /** Indicates whether or not this is the app UI for an embedded, + read-only document. */ + TBool iEmbeddedAndReadOnly; + TInt iFlags; +private: + enum + { + EEmbedded = 0x01 + }; +private: + CEikAppUiExtra* iAppUiExtra; + }; + + + +/** Returns the app UI inside which this app UI is embedded. +Embedded app UIs are used for editing embedded documents. + +@return A pointer to this object's container app UI. NULL if this app +UI is not embedded */ +inline CEikAppUi* CEikAppUi::ContainerAppUi() const + { return iContainerAppUi; } + +#endif // __EIKAPPUI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikaufty.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikaufty.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,143 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Defines mix-in interace to break dependencey of Eikon Application UI +// on controls +// +// + +#ifndef __EIKAUFTY_H__ +#define __EIKAUFTY_H__ + +#include +#include +#include + +#include + +class CEikHotKeyTable; +class CEikMenuBar; +class CEikMenuPane; +class CEikCommandButton; +class CEikToolBar; +class CEikButtonGroupContainer; +class CEikAppUi; +class CEikonEnv; +class CEikStatusPane; + + +/** This class defines a mixin interface to break the dependency of the Uikon Application +User Interface on controls. + +@publishedAll +@released */ +class MEikAppUiFactory : public MObjectProvider + { +public: + virtual void CreateResourceIndependentFurnitureL(CEikAppUi* aAppUi) =0; + virtual TRect ClientRect() = 0; + virtual void ReadAppInfoResourceL(TInt aResourceFileOffset,CEikAppUi* aAppUi) = 0; + virtual void LaunchPopupMenuL( TInt aResourceId, + const TPoint& aTargetPos, + TPopupTargetPosType aTargetType, + const CEikHotKeyTable* aHotKeyTable, + CEikAppUi* aAppUi) = 0; + + virtual void DoLaunchPopupL(TInt aResourceId,const TPoint& aTargetPos, const CEikHotKeyTable* aHotKeyTable, + TPopupTargetPosType aTargetType,CEikAppUi* aAppUi) = 0; + + virtual void ClosePopup(CEikAppUi* aAppUi) = 0; + virtual void StopDisplayingMenuBar() = 0; + virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos, + const CEikHotKeyTable* aHotKeyTable,CEikAppUi* aAppUi) = 0; + virtual void CreateHotKeyControlL(TInt aResourceId, CEikAppUi* aAppUi) = 0; + /** Gets a pointer to the menu bar. + + @return Pointer to the menu bar. */ + virtual CEikMenuBar* MenuBar() const = 0; + /** Replaces or clears a menu bar, returning a pointer to the replaced menu bar. + + @param aMenu The new menu bar. This can be NULL to clear an existing menu bar. + @return Pointer to the replaced menu bar. */ + virtual CEikMenuBar* SwapMenuBar(CEikMenuBar* aMenu) = 0; + virtual CEikMenuPane* Popup() const = 0; + /** Gets a pointer to the tool bar. + + @return Pointer to the tool bar. */ + virtual CEikButtonGroupContainer* ToolBar() const = 0; + /** Replaces or clears a button group, returning a pointer to the replaced button + group. + + @param aNewGroup The new button group. This can be NULL to clear an existing + button group. + @return Pointer to the replaced button group. */ + virtual CEikButtonGroupContainer* SwapButtonGroup(CEikButtonGroupContainer* aNewGroup) = 0; + /** Gets a pointer to the tool band. + + @return Pointer to the tool band. */ + virtual CEikToolBar* ToolBand() const = 0; + /** Gets a pointer to the title band. + + @return Pointer to the title band. */ + virtual CEikToolBar* TitleBand() const = 0; + /** Gets a pointer to the status pane. + + @return Pointer to the status pane */ + virtual CEikStatusPane* StatusPane() const = 0; + /** Gets a pointer to the CBA. + + @return Pointer to the CBA */ + virtual CEikButtonGroupContainer* Cba() const = 0; + inline CEikToolBar* SwapToolBand(CEikToolBar* aToolBand); + inline CEikToolBar* SwapTitleBand(CEikToolBar* aTitleBand); + /** Creates a standard tab button. + + @return Pointer to the created tab button. */ + virtual CEikCommandButton* CreateStandardTabButtonL() const = 0; + virtual void CreateEmbeddedL(CEikonEnv& aEikonEnv) = 0; + virtual void DestroyEmbedded(CEikonEnv& aEikonEnv) = 0; + virtual void HandleResourceChangeL(TInt aType) = 0; +protected: + /** Defines the type of tool bar. */ + enum TToolBarType + { + /** Defines a band tool bar. */ + EBand, + /** Defines a title tool bar. */ + ETitle + }; +private: + virtual CEikToolBar* SwapToolBar(CEikToolBar* aToolBar,TToolBarType aType) = 0; + }; + + + +/** Replaces or clears a tool band, returning a pointer to the replaced tool band. + +@param aToolBand The new tool band. This can be NULL to clear an existing +tool band. +@return Pointer to the replaced tool band. */ +inline CEikToolBar* MEikAppUiFactory::SwapToolBand(CEikToolBar* aToolBand) + {return SwapToolBar(aToolBand,EBand);} + + +/** Replaces or clears a title band, returning a pointer to the replaced title +band. + +@param aTitleBand The new title band. This can be NULL to clear an existing +title band. +@return Pointer to the replaced title band. */ +inline CEikToolBar* MEikAppUiFactory::SwapTitleBand(CEikToolBar* aTitleBand) + {return SwapToolBar(aTitleBand,ETitle);} + +#endif // __EIKAUFTY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikbhelp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikbhelp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,92 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKBHELP_H__ +#define __EIKBHELP_H__ + +#include + +const TUid KEikBubbleHelpUid={0x10008E48}; + +class CCoeControl; + +/** +@publishedPartner +@deprecated +*/ +class MEikTriggeredHelp + { +// The MEikTriggeredHelp class defines an interface for UI classes +// to implement triggered, transient help message display. +public: + virtual void TriggerHelp(const TDesC& aDes,const TRect& aRect,TInt aHandle)=0; + virtual void CancelHelp()=0; + virtual void CancelHelpTrigger()=0; + virtual TBool IsDisplayingHelp(TInt aHandle)=0; + virtual void Release()=0; +protected: + IMPORT_C virtual void MEikTriggeredHelp_Reserved_1(); + IMPORT_C virtual void MEikTriggeredHelp_Reserved_2(); + }; + + +/** Provides the static functions that control bubble help. + +Bubble help is a feature that enables short help messages to be displayed +for controls in transient windows which pop up close to the control bodies. + +@publishedAll +@released */ +class EikBubbleHelp + { +public: + IMPORT_C static void Trigger(const TDesC& aDes,const TRect& aRect,TInt aHandle=-1); + IMPORT_C static void Cancel(); + IMPORT_C static void CancelTrigger(); + IMPORT_C static TBool IsDisplaying(TInt aHandle); + }; + + +/** +@publishedPartner +@deprecated +*/ +class CEikBubbleHelp : public CCoeStatic +// The CEikBubbleHelp class implements global static storage and access to the object providing bubble help +// for the application. + { + ~CEikBubbleHelp(); +public: + IMPORT_C static void SetTriggeredHelpL(MEikTriggeredHelp* aTriggeredHelp); +public: + static void Trigger(const TDesC& aDes,const TRect& aRect,TInt aHandle=-1); + static void Cancel(); + static void CancelTrigger(); + static TBool IsDisplaying(TInt aHandle); +private: + inline CEikBubbleHelp(); + inline static CEikBubbleHelp* Self(); +private: + MEikTriggeredHelp* iHelp; + }; + +inline CEikBubbleHelp::CEikBubbleHelp() + : CCoeStatic(KEikBubbleHelpUid) + {} + +inline CEikBubbleHelp* CEikBubbleHelp::Self() + {return STATIC_CAST(CEikBubbleHelp*,CCoeEnv::Static(KEikBubbleHelpUid));} + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikcmobs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikcmobs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,64 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKCMOBS_H__ +#define __EIKCMOBS_H__ + +#include + +class CCoeControl; + +/** Command observers respond to user commands, and have the secondary function +of creating custom controls on request for classes such as CEikToolbar, or +user-defined classes. + +An implementation of the pure virtual function ProcessCommandL() must be provided +for each concrete class derived from MEikCommandObserver. CreateCustomCommandControlL() +may also be re-implemented. + +@publishedAll +@released */ +class MEikCommandObserver + { +public: + /** Processes user commands. + + Derived classes must provide an implementation of this function which responds + to user commands appropriately based on a user-defined ID for the command. + + @param aCommandId ID of the command to respond to. */ + virtual void ProcessCommandL(TInt aCommandId)=0; + /** Glue for creating custom controls. + + This function can be called to create custom controls on request from their + control ID. Custom controls are user-supplied control classes. + + Given the ID of a custom control, this function should return a pointer to + a newly-instantiated and fully constructed control. If the ID is unrecognised, + NULL should be returned. The control returned will be owned by the caller. + + @param aControlType A custom control ID. + @return By default, NULL. */ + IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); +protected: + IMPORT_C MEikCommandObserver(); +private: + IMPORT_C virtual void MEikCommandObserver_Reserved1(); + IMPORT_C virtual void MEikCommandObserver_Reserved2(); +private: + TInt iMEikCommandObserver_Reserved1; + }; + +#endif // __EIKCMOBS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,321 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKDEF_H__ +#define __EIKDEF_H__ + +#include +#include + +/** This is used in combination with a specified position to place a popout on +the display. + +The TPopupTargetPosType enum identifies which corner of the popout +will be placed in the given target position. The default is the top left corner. + +@publishedAll +@released */ +enum TPopupTargetPosType + { + /** Places the popout with the top left corner in the specified position. */ + EPopupTargetTopLeft, + /** Places the popout with the top right corner in the specified position. */ + EPopupTargetTopRight, + /** Places the popout with the bottom left corner in the specified position. */ + EPopupTargetBottomLeft, + /** Places the popout with the bottom right corner in the specified position. */ + EPopupTargetBottomRight + }; + + +/** Defines the printer port settings. This is used by GUI print dialogs.*/ +enum TEikPortFlag + { + /** Printing is via a serial port.*/ + ESerialPort = 0x01, + /** Printing is via a parallel port.*/ + EParallelPort = 0x02, + /** Printing is via infra red.*/ + EIrdaPort = 0x04, + /** Printing is to a file. */ + EFilePort = 0x08, + /** Printing is via a PC.*/ + EViaPCPort = 0x10 + }; + +/** Macro to allow easy access to the CEikonEnv instance. + +@publishedAll +@released +*/ +#define iEikonEnv (STATIC_CAST(CEikonEnv*,iCoeEnv)) + +/** Defines the border style for an editable control. + +@publishedPartner +@released +*/ +#define KEikEditableControlBorder TGulBorder::EShallowSunken + +/** Name of the default bitmap store. + +@publishedPartner +@released +*/ +_LIT(KEikDefaultAppBitmapStore,"*"); + +/** Uid of the KEikMessageColorSchemeChange message. + +@publishedPartner +@released +*/ +const TInt KUidValueEikColorSchemeChangeEvent =0x10006956; + +/** +@internalComponent +*/ +const TInt KEikCustomColorsArrayValue =0x100057C2; + +/** Indicates that all windows should appear faded. + +@publishedAll +@released +*/ +const TInt KEikMessageFadeAllWindows =0x100056C2; + +/** Indicates that all windows should appear unfaded. + +@publishedAll +@released +*/ +const TInt KEikMessageUnfadeWindows =0x100056C3; + +/** Indicates that the colour scheme has changed. + +@publishedAll +@released +*/ +const TInt KEikMessageColorSchemeChange =KUidValueCoeColorSchemeChangeEvent; + +/** Indicates that the color scheme has changed. + +@publishedAll +@released +*/ +#define KEikColorResourceChange KEikMessageColorSchemeChange // for source compatibility + +/** Indicates that the zoom level has changed. + +@publishedAll +@released +*/ +const TInt KEikMessageZoomChange =KUidValueCoeZoomChangeEvent; + +/** Indicates that a font has changed. Controls should ensure they are using +the right font after receiving this message. + +@publishedAll +@released +*/ +const TInt KEikMessageFontChange = KUidValueCoeFontChangeEvent; + +/** Indicates that the state of the virtual cursor has changed. + +@publishedAll +@released +*/ +const TInt KEikMessageVirtualCursorStateChange =0x10005D0A; + +/** Indicates that caps lock key has been pressed. + +@publishedAll +@released +*/ +const TInt KEikMessageCapsLock =0x100048F9; + +/** Indicates that the application should be ready to save any data that needs saving. + +@publishedAll +@released +*/ +const TInt KEikMessagePrepareForSave =0x100069FD; + +/** Indicates that the level of embedding of the application has changed. + +@publishedAll +@released +*/ +const TInt KEikMessageEmbedLevelChange =0x1000A4AA; + +/** Passed immediately after completion of the call to CCoeEnv::SetAppUi() +when aNewAppUi has become current AppUi. This happens during the destruction of the embedded +AppUi. + +@publishedAll +@released +*/ +const TInt KEikHasBecomeCurrentAppUiWhileEmbeddedAppUiDeletes = 0x10207F75; + +/** Passed immediately before CEikAppUiFactory::CreateEmbeddedL() + +@publishedAll +@released +*/ +const TInt KEikNotifyPreCreateEmbeddedL = 0x10207F67; + +/** Passed immediately after CEikAppUiFactory::CreateEmbeddedL() + +@publishedAll +@released +*/ +const TInt KEikNotifyPostCreateEmbeddedL = 0x10207F65; + +/** Passed immediately after CCoeAppUi::ConstructL() + +@publishedAll +@released +*/ +const TInt KEikPostCoeAppUiConstructL = 0x10207F66; + +/** +@publishedAll +@released +*/ +_LIT8(KDebugStart, "-DebugMemFail:"); + +/** +@publishedPartner +@released +*/ +const TInt KEikDefaultCursorWidth=2; + +/** +@publishedPartner +@released +*/ +const TInt KTimeBetweenClicks=1000000; // in Microseconds + +/** +@publishedPartner +@released +*/ +const TInt KDoubleClickDistance=10; + +/** +@publishedPartner +@released +*/ +const TInt KKeyboardRepeatRate=50000; + +/** +@publishedPartner +@released +*/ +const TInt KKeyboardRepeatInitialDelay=800000; + +/** Resource id of the query dialog. +@publishedPartner +@released +*/ +const TInt KEikResIdQueryDialog =0; + +/** Resource id of the info dialog. +@publishedPartner +@released +*/ +const TInt KEikResIdInfoDialog =1; + +/** +@publishedPartner +@released +*/ +const TInt KEikErrorResolverMaxTextLength = 256; + +/** +@internalTechnology +*/ +#define COMPARE_BOOLS(a,b) (((a) && (b)) || (!(a) && !(b))) + +/** +@internalComponent +*/ +#if defined(_DEBUG) +#define __UHEAP_CHECK_INTEGRITY User::Heap().Check() +#else +#define __UHEAP_CHECK_INTEGRITY +#endif + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_FIRST 32 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_LAST 39 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_SIMPLE 32 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_DIALOG_LOAD 33 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_APP_LAUNCH 34 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_CLOCK 35 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_CALENDER 35 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_LIBS_LOAD 36 + +/** +@internalComponent +*/ +#define PROFILE_POINT_EIKON_ADD_RES 37 + +/** +@internalComponent +*/ +#define KEikEikonBitmapStore KNullDesC + +/** +@internalComponent +*/ +const TUid KSystemIniFileUid = {0x1000010C}; + +/** +@internalComponent +*/ +const TInt KLastSystemWideErrCode = KErrCommsBreak; + + +#endif // __EIKDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikdll.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikdll.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,22 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKDLL_H__ +#define __EIKDLL_H__ + +#include +#include + +#endif // __EIKDLL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikdoc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikdoc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,128 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKDOC_H__ +#define __EIKDOC_H__ + +#include +#include + +class CEikAppUi; +class CEikApplication; +class CApaWindowGroupName; + + +/** The base class for all GUI applications' documents. + +In file-based applications, the document represents the data that relates to a +particular instance of the application, and should handle storing and restoring +it. In all applications, whether file-based or not, the document is used to create +the application UI. + +A class derived from CEikDocument must be defined by each GUI application, and minimally +it must implement CreateAppUiL(). Note that UIs may implement their own document base class, +derived from CEikDocument, which applications may need to derive from instead. + +The document is created by the application's CreateDocumentL() function. + +@publishedAll +@released +@see CEikApplication::CreateDocumentL() +@see CEikAppUi */ +class CEikDocument : public CApaDocument, public MSaveObserver + { +public: // new functions + /** Constructs the application UI. + + This function is called by the UI framework during application start-up. It should + only carry out first phase construction of the app UI, in other words, using new(ELeave). + It should not call the app UI's ConstructL(), because the UI framework is responsible + for this. Note also that the UI framework takes ownership of the app UI, so the + document does not need to destroy it. + + @return A partially-constructed app UI object. */ + virtual CEikAppUi* CreateAppUiL()=0; + IMPORT_C virtual CFileStore* OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs); + IMPORT_C void PrepareToEditL(MApaEmbeddedDocObserver* aObserver,TBool aReadOnly); + IMPORT_C void PrepareToEditL(); + IMPORT_C void SetAppFileMode(TUint aMode); + IMPORT_C TUint AppFileMode() const; + IMPORT_C virtual void UpdateTaskNameL(CApaWindowGroupName* aWgName); + IMPORT_C const TApaAppCaption& AppCaption() const; + IMPORT_C void SetChanged(TBool aHasChanged); + IMPORT_C void SetEditStoreL(CStreamStore* aStore); + void SetEditStoreWithoutAppUiNotificationL(CStreamStore* aStore); + inline CStreamStore* EditStore() const; + IMPORT_C ~CEikDocument(); +public: // from MSaveObserver + IMPORT_C virtual void SaveL(MSaveObserver::TSaveType aSaveType); +public: // from CApaDocument + IMPORT_C void NewDocumentL(); + IMPORT_C CFileStore* CreateFileStoreLC(RFs& aFs,const TDesC& aFileName); + IMPORT_C void EditL(MApaEmbeddedDocObserver* aObserver,TBool aReadOnly=EFalse); + IMPORT_C void PrintL(const CStreamStore& aSourceStore); + IMPORT_C void SaveL(); + IMPORT_C void StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const; + IMPORT_C void RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C TBool IsEmpty() const; + IMPORT_C TBool HasChanged() const; + IMPORT_C virtual void ValidatePasswordL() const; // return EFalse if there *is* a password *and* the user doesn't get it right, ETrue otherwise (ie they get it right or there isn't one). Returns ETrue by default +protected: + IMPORT_C CEikDocument(); + IMPORT_C CEikDocument(CEikApplication& aApp); +public: + IMPORT_C virtual void OpenFileL(CFileStore*& aFileStore, RFile& aFile); +private: + void NullAppUi(); + // reserved functions from CApaDocument + IMPORT_C virtual void Reserved_2(); +protected: + /** A pointer to the app UI which the document is associated with. */ + CEikAppUi* iAppUi; + /** A pointer to the file store object which is used to edit the document. */ + CStreamStore* iEditStore; +private: + TBool iChanged; + TUint iAppFileMode; + friend class CEikAppUi; + }; + +/** A pointer to the application process associated with this document. + +@publishedAll +@released */ +#define iEikProcess ((CEikProcess*)Process()) + +/** A pointer to the application that created this document. + +@publishedAll +@released */ +#define iEikApplication ((CEikApplication*)Application()) + +/** The default size in twips of icons that represent embedded objects. + +@publishedPartner +@released */ +#define KDefaultIconicDoorSize TSize(500,500) + + +/** Gets the file store object which is used to edit the document. + +@return A pointer to the file store object which is used to edit the document. */ +inline CStreamStore* CEikDocument::EditStore() const + { return(iEditStore); } + +#endif // __EIKDOC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikembal.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikembal.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKEMBAL_H__ +#define __EIKEMBAL_H__ + +#include +#include +#include +#include +#include + +class CEikDocument; +class CApaProcess; +class RApaLsSession; + + +/** Provides a list of all embeddable applications on the device. + +Hidden applications are omitted from the list. The list is sorted by UID. + +@see TApaAppCapability::iAppIsHidden +@publishedAll +@released */ +class CEikEmbeddableAppList : public CArrayFixFlat, public MDesCArray + { +public: + IMPORT_C CEikEmbeddableAppList(); + IMPORT_C ~CEikEmbeddableAppList(); + IMPORT_C void ConstructL(); + IMPORT_C void ConstructL(const TApaEmbeddabilityFilter& aFilter); + IMPORT_C CEikDocument* CreateEmbeddedDocumentL(TInt aIndex,CApaProcess* aProcess); +private: // from MDesCArray + IMPORT_C TInt MdcaCount() const; + IMPORT_C TPtrC MdcaPoint(TInt aIndex) const; +private: // Reserved methods + IMPORT_C virtual void CEikEmbeddableAppList_Reserved1(); + IMPORT_C virtual void CEikEmbeddableAppList_Reserved2(); +private: // utility methods + TInt GetAppListL(const TApaEmbeddabilityFilter& aFilter); + TInt DoGetAppListL(RApaLsSession& aLs, const TApaEmbeddabilityFilter& aFilter); + void SortAppListL(); +private: + TInt iCEikEmbeddableAppList_Reserved1; + }; + +#endif // __EIKEMBAL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikenv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikenv.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,493 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKENV_H__ +#define __EIKENV_H__ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +class CEikProcess; +class MEikInfoMsgWin; +class MEikBusyMsgWin; +class CEikAppUi; +class CEikHotKeyTable; +class CCoeControl; +class CParaFormatLayer; +class CCharFormatLayer; +class CCoeBrushAndPenContext; +class CEikCommandButton; +class CPrintSetup; +class CDictionaryStore; +class CApaWindowGroupName; +class CEikErrorIdler; +class CEikApplication; +class MEikInfoDialog; +class MEikAlertWin; +class CEikDialog; +class MEikDebugKeys; +class CEikLibrary; +class MEikAppUiFactory; +class MEikIrFactory; +class CGulIcon; +class CApaMaskedBitmap; +class CEikLogicalBorderProxy; +class CEikLafEnv; +class TLogicalFont; +class CEikPictureFactory; +class CEikEnvExtra; +class TApaApplicationFactory; +class CEikAppServer; +class CLafSystemFont; +class RApaLsSession; + +/** +@publishedAll +@released +*/ +typedef void (*TRequestDialogFunc)(); + +/** +@internalComponent +*/ +const TUid KUikonLibraryUid = {KUidUikonLibraryValue}; + +/** +Creates the CEikLibrary interface object by calling the first ordinal function which is mapped to NewL method. + +The function leaves with KErrBadLibraryEntryPoint if the ordinal 1 function +cannot be found. + +@publishedPartner +@released +*/ +typedef CEikLibrary* (*EikLibraryEntryPoint)(); + + +/** An environment for creating controls and utility functions for manipulating +them. + +Every GUI application is provided with an instance of CEikonEnv +by the framework, which can be accessed through either CEikonEnv::Static() +or the iEikonEnv macro of CEikApplication. + +@publishedAll +@released */ +class CEikonEnv : public CCoeEnv + { +public: + enum TErrorValidity + { EErrorNumValid, EErrorNumInvalid }; +public: + // Properties + IMPORT_C static TVersion Version(); + inline static CEikonEnv* Static(); + // Construction and destruction + IMPORT_C ~CEikonEnv(); + IMPORT_C CEikonEnv(); + IMPORT_C void ConstructL(); + IMPORT_C void ConstructL(TBool aInitialFocusState); + IMPORT_C void ConstructL(TBool aInitialFocusState, TInt aWindowGroupID); + IMPORT_C void ConstructAppFromCommandLineL(const TApaApplicationFactory& aApplicationFactory, const CApaCommandLine& aCommandLine); + IMPORT_C void ControlStackReadyL(); + IMPORT_C void DestroyEnvironment(); + // + inline CEikAppUi* EikAppUi() const; + inline CEikProcess* Process() const; + // Legacy font support (see new TCoeFont and CCoeControl::ScreenFont()) + IMPORT_C const CFont* AnnotationFont() const; + IMPORT_C const CFont* TitleFont() const; + IMPORT_C const CFont* LegendFont() const; + IMPORT_C const CFont* SymbolFont() const; + IMPORT_C const CFont* DenseFont() const; + IMPORT_C const CFont* Font(const TLogicalFont& aLogicalFont) const; + IMPORT_C void UpdateSystemFontsL(); + // System bitmaps + IMPORT_C const CFbsBitmap* TexturedBitmap() const; // deprecated + IMPORT_C const CFbsBitmap* GrayBitmap() const; // deprecated + IMPORT_C const CFbsBitmap* OptionBitmap() const; // deprecated + IMPORT_C const CFbsBitmap* HighlightedOptionBitmap() const; + IMPORT_C const CFbsBitmap* OptionMaskBitmap() const; // deprecated + IMPORT_C const CFbsBitmap* Bitmap(TUid aUidBmp) const; +public: + IMPORT_C TBool ConfirmLossOfAllChangesL() const; + + IMPORT_C MPictureFactory* PictureFactory() const; + IMPORT_C MEikPictureFactory* ExtendedPictureFactory(TUid aPictureType) const; + IMPORT_C void AddPictureFactoryL(MEikPictureFactory& aFactory); + IMPORT_C void RemovePictureFactory(TUid aFactoryId); + // Alert dialogs + IMPORT_C void AlertWin(const TDesC& aMsg); + IMPORT_C void AlertWin(const TDesC& aMsg1, const TDesC& aMsg2); + inline const MEikAlertWin* Alert() const; + IMPORT_C void SetAlertWin(MEikAlertWin* aAlertWin); + // Error handling + IMPORT_C void LeaveWithInfoMsg(TInt aResourceId,...); + IMPORT_C void LeaveWithErrorContext(TInt aError, const TDesC& aContextText); // deprecated + IMPORT_C void GetErrorText(TDes& aDes,TInt aError) const; + IMPORT_C TErrorValidity GetErrorText(TDes& aErrorText, TInt aError, TUid aAppUid) const; + IMPORT_C TErrorValidity GetErrorTextAndTitle(TDes& aErrorText, TInt aError, TDes& aTitleText) const; + IMPORT_C void ResolveError(TInt aError, TUid aAppUid = KNullUid) const; + IMPORT_C void NotifyIdleErrorWhileRedrawing(TInt aError); + IMPORT_C void NotifyIdleError(TInt aError, TInt aContextResourceId); + IMPORT_C void HandleErrorWithContext(TInt aError,TInt aContextResourceId); + // Info prints + IMPORT_C void InfoMsg(const TDesC& aDes); + IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner,const TDesC& aDes); + IMPORT_C void InfoMsg(TInt aResourceId, ...); + IMPORT_C void InfoMsg(TInt aResourceId, VA_LIST aList); + IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, TInt aResourceId,...); + IMPORT_C void InfoMsgWithAlignment(TGulAlignment aCorner, TInt aResourceId, VA_LIST aList); + IMPORT_C void InfoMsgWithDuration(const TDesC& aDes, TTimeIntervalMicroSeconds32 aDuration); + IMPORT_C void InfoMsgWithDuration(TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, ...); + IMPORT_C void InfoMsgWithDuration(TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, VA_LIST aList); + IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, const TDesC& aDes, TTimeIntervalMicroSeconds32 aDuration); + IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, ...); + IMPORT_C void InfoMsgWithAlignmentAndDuration(TGulAlignment aCorner, TInt aResourceId, TTimeIntervalMicroSeconds32 aDuration, VA_LIST aList); + IMPORT_C void InfoMsgCancel(); + IMPORT_C void VerboseInfoMsg(const TDesC& aDes); + IMPORT_C void SetVerboseInfoReporting(TBool aVerbose); // deprecated + // Busy messages + IMPORT_C void BusyMsgL(const TDesC& aDes); + IMPORT_C void BusyMsgL(const TDesC& aDes, TGulAlignment aCorner); + IMPORT_C void BusyMsgL(TInt aResourceId); + IMPORT_C void BusyMsgL(const TDesC& aDes, TTimeIntervalMicroSeconds32 aInitialDelay); + IMPORT_C void BusyMsgL(const TDesC& aDes, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay); + IMPORT_C void BusyMsgL(TInt aResourceId, TTimeIntervalMicroSeconds32 aInitialDelay); + IMPORT_C void BusyMsgCancel(); + // Query dialogs + IMPORT_C static TBool QueryWinL(const TDesC& aFirstLine, const TDesC& aSecondLine); + IMPORT_C TBool QueryWinL(TInt aFirstLineId, TInt aSecondLineId = 0) const; + IMPORT_C void SetQueryDialog(MEikInfoDialog* aQueryDialog); + IMPORT_C void SetRequestQueryDialogFunc(TRequestDialogFunc aQueryDialogFunc); + // Info dialogs + IMPORT_C static void InfoWinL(const TDesC& aFirstLine, const TDesC& aSecondLine); + IMPORT_C void InfoWinL(TInt aFirstLineId, TInt aSecondLineId = 0) const; + IMPORT_C void SetInfoDialog(MEikInfoDialog* aInfoDialog); + IMPORT_C void SetRequestInfoDialogFunc(TRequestDialogFunc aInfoDialogFunc); + IMPORT_C void AllocInfoMsg(); + IMPORT_C void WservAllocInfoMsg(); + IMPORT_C void FservAllocInfoMsg(); + // Sound notificatons + IMPORT_C static void Beep(); // deprecated + // Bitmap utilities + IMPORT_C CWsBitmap* CreateBitmapL(const TDesC& aFileName, TInt aId); + IMPORT_C CWsBitmap* CreateBitmapL(const TDesC& aFileName, TInt aId, TBool aShowDlgIfErr); + IMPORT_C CGulIcon* CreateIconL(const TDesC& aFileName, TInt aBitmapId, TInt aMaskId = KErrNotFound); + IMPORT_C static CGulIcon* CreateIconFromMaskedBitmapL(const CApaMaskedBitmap& aApaMaskedBitmap); + // Debugging + IMPORT_C void SetDebugKeys(MEikDebugKeys* aDebugKeys); + // Menu utilities + IMPORT_C void LaunchPopupMenuL(TInt aResourceId, const TPoint& aTargetPos, TPopupTargetPosType aTargetType = EPopupTargetTopLeft, const CEikHotKeyTable* aHotKeyTable = NULL); + // Graphical effects + IMPORT_C static void AddWindowShadow(CCoeControl* aWinArea); + IMPORT_C RAnimDll& ClockDllL(); + // Text formatting parameters + IMPORT_C CParaFormatLayer* SystemSingleLineParaFormatLayerL(); + IMPORT_C CParaFormatLayer* SystemParaFormatLayerL(); + IMPORT_C CCharFormatLayer* SystemCharFormatLayerL(); + IMPORT_C static CParaFormatLayer* NewDefaultSingleLineParaFormatLayerL(); + IMPORT_C static CParaFormatLayer* NewDefaultParaFormatLayerL(); + IMPORT_C static CCharFormatLayer* NewDefaultCharFormatLayerL(); + // Control stack utilities + IMPORT_C void AddDialogLikeControlToStackL(CCoeControl* aControl); + IMPORT_C void AddAlertDialogLikeControlToStackL(CCoeControl* aControl); + IMPORT_C void RemoveFromStack(CCoeControl* aControl); + IMPORT_C void AddSleepingDialogToStackL(CCoeControl* aControl); + IMPORT_C void AddSleepingAlertDialogToStackL(CCoeControl* aControl); + IMPORT_C void RouseSleepingDialog(CCoeControl* aControl, TBool aRoused); + // Text cursors + IMPORT_C void DrawCursor(const CCoeControl* aControl, const TPoint& aPosition, TInt aWidth); + IMPORT_C void DrawCursor(const CCoeControl* aControl, const TPoint& aPosition, TInt aWidth, TInt aAscent, TInt aHeight); + IMPORT_C void HideCursor(const CCoeControl* aControl); + // Virtual pointer device cursor + IMPORT_C TEikVirtualCursor& VirtualCursor(); + // Control of the application's ordinal position + IMPORT_C void BringForwards(TBool aForwards, TInt aPriority = ECoeWinPriorityAlwaysAtFront); + IMPORT_C void SetAutoForwarding(TBool aAutoBringToForeground); + // + IMPORT_C TPtrC KeyPressLabel(TInt aIndex) const; // deprecated + // Printing + IMPORT_C CPrintSetup* NewDefaultPrintSetupL(); + IMPORT_C static void GetPrinterNamesL(CPrinterModelList* aModelNameList, CDesCArray& aPrinterNameList); + // Application properties + IMPORT_C void UpdateTaskNameL(); + IMPORT_C void SetBusy(TBool aBusy); + IMPORT_C TBool IsBusy() const; + IMPORT_C void SetSystem(TBool aSystem); + IMPORT_C TBool IsSystem() const; + IMPORT_C void SetDocNameIsAFile(TBool aDocNameIsAFile); + IMPORT_C TBool DocNameIsAFile() const; + IMPORT_C void SetRespondsToShutdownEvent(TBool aRespondsToShutdownEvent); + IMPORT_C TBool RespondsToShutdownEvent() const; + IMPORT_C void SetRespondsToSwitchFilesEvent(TBool aRespondsToSwitchFilesEvent); + IMPORT_C TBool RespondsToSwitchFilesEvent() const; + // Task list dialog + IMPORT_C void DisplayTaskList(); + IMPORT_C void DismissTaskList(); +public: // Internal (for Symbian and partners only) + // Dialog factories + inline MEikCDlgDialogFactory* CDlgDialogFactory() const; + inline MEikPrintDialogFactory* PrintDialogFactory() const; + inline MEikFileDialogFactory* FileDialogFactory() const; + inline MEikIrFactory* IrFactory() const; + inline void SetCDlgDialogFactory(MEikCDlgDialogFactory* aDialogFactory); + inline void SetPrintDialogFactory(MEikPrintDialogFactory* aDialogFactory); + inline void SetFileDialogFactory(MEikFileDialogFactory* aDialogFactory); + inline void SetIrFactory(MEikIrFactory* aIrFactory); + CArrayFix* ControlFactoryFuncArray() const; + // Color scheme + inline CColorList& ColorList() const; + inline TRgb Color(TLogicalColor aLogicalColor) const; + inline void SetColor(TLogicalColor aLogicalColor, TRgb aColor); + IMPORT_C TRgb ControlColor(TLogicalColor aLogicalColor,const CCoeControl& aControl) const; + inline CColorArray& CustomColorArray() const; + IMPORT_C CColorList* CreateSystemColorListL(); + IMPORT_C CColorList* CreateSystemColorListL(const CColorList& aColorList); + IMPORT_C void UpdateSystemColorListL(const CColorList& aColorList); + IMPORT_C CColorList* PopulateColorArrayL(); + // Library loading and unloading + IMPORT_C TInt AddLibraryL(TCreateByTypeFunction aControlFactory, TFileName* aResourceFile); + inline TInt AddLibraryL(TCreateByTypeFunction aControlFactory); + inline TInt AddLibraryL(TFileName* aResourceFile); + IMPORT_C void RemoveLibrary(TCreateByTypeFunction aControlFactory, TInt aResourceFileOffset); + inline void RemoveLibrary(TCreateByTypeFunction aControlFactory); + inline void RemoveLibrary(TInt aResourceFileOffset); + // Legacy UI utilities + inline TChar NudgeCharMinus() const; + inline TChar NudgeCharPlus() const; + // Status pane + inline TInt StatusPaneCoreResId() const; + inline void SetStatusPaneCoreResId(TInt aStatusPaneCoreResId); + // Auto menus + IMPORT_C void AddAutoMenuTitleL(CEikAutoMenuTitle* aTitle); + inline CEikAutoMenuTitleArray* AutoMenuTitleArray() const; + // Display mode + IMPORT_C TDisplayMode DefaultDisplayMode() const; +public: // internal + IMPORT_C MLafEnv& LafEnv() const; // deprecated + inline TInt EditableControlStandardHeight() const; + IMPORT_C void SendEventToEikonServer(TInt aEvent,const TAny* aPtr,TInt aLength); + // Object factories + IMPORT_C MEikAppUiFactory* AppUiFactory() const; + IMPORT_C MEikAppUiFactory* AppUiFactory(const CEikAppUi& aAppUi) const; + IMPORT_C void SetAppUiFactoryL(MEikAppUiFactory* aAppUiFactory); + IMPORT_C void AddAppUiFactoryL(MEikAppUiFactory* aAppUiFactory); + IMPORT_C void RemoveAppUiFactory(); +public: // Internal. Do not use! + IMPORT_C void SetExtension(CBase* aExtension); // deprecated + inline CBase* Extension() const; // deprecated + IMPORT_C void HandleError(TInt aError); + IMPORT_C void WriteInternalStateOfStackedControlsL(); + IMPORT_C void DoGetErrorText(TDes& aDes,TInt aError) const; + IMPORT_C TErrorValidity DoGetErrorTextAndTitle(TDes& aErrorText, TInt aError, TInt& aTextId, TUint& aFlags, TDes& aTitleText, TBool aIsMemoryAllocatedByErrResolver = EFalse) const; + void InitSystemBitmapsL(); + void UpdateColorListL(); + void PostAppUiInitializeL(); + TLanguage ApplicationLanguage() const; + void PostAppUiDestroy(); +private: + IMPORT_C virtual void CEikonEnv_Reserved_1(); + IMPORT_C virtual void CEikonEnv_Reserved_2(); + IMPORT_C virtual void CEikonEnv_Reserved_3(); + IMPORT_C virtual void CEikonEnv_Reserved_4(); + IMPORT_C virtual void CEikonEnv_Reserved_5(); +private: // framework functions + IMPORT_C void DestroyScreen(); + IMPORT_C void InitSystemFontsL(); + IMPORT_C TInt ResourceFileVersionNumber() const; +public: + IMPORT_C MEikInfoDialog* QueryDialog() const; + IMPORT_C MEikInfoDialog* InfoDialog() const; +public: + IMPORT_C CEikAppServer* AppServer() const; + IMPORT_C TBool StartedAsServerApp() const; +protected: + friend class CEikServAppUi; +private: // Internal + void InitSystemResourceFileL(); + void InitPrivateResourceFileL(); + void InitInfoMsgL(); + void PrepareBusyMsgL(); + void InitAlertWinL(); + void InitDebugKeysL(); + TErrorHandlerResponse PrepareToHandleError(TInt aError); + void DoHandleError(TErrorHandlerResponse aType); + static TInt IdleErrorCallBack(TAny* aThis); + void InitColorSchemeL(); + void LoadParserListL(); + void LoadLibrariesL(); + void CloseLibraries(); + TRequestDialogFunc RequestQueryDialogFunc(); + TRequestDialogFunc RequestInfoDialogFunc(); + void SetAppReady(); +public: + TBool IsEiksrvThread() const; +private: + TBool InfoWinOrQueryWinL(TInt aFirstLineId,TInt aSecondLineId,TBool aIsQueryWin=EFalse) const; + void SetCommandLineDebugMemFailL(const CApaCommandLine& aCommandLine); + void StoreAppLanguageL(const RApaLsSession& aLsSession); + void ErrorContextL(TInt aError,const TDesC& aContextText); +private: + IMPORT_C virtual void CEikonEnv_Reserved_6(); + IMPORT_C virtual void CEikonEnv_Reserved_7(); + IMPORT_C virtual void CEikonEnv_Reserved_8(); + IMPORT_C virtual void CEikonEnv_Reserved_9(); + IMPORT_C virtual void CEikonEnv_Reserved_10(); +private: + NONSHARABLE_CLASS(TEikAppUiFactory) + { + public: + MEikAppUiFactory* iFactory; + CEikAppUi* iAppUi; + }; +private: + TBitFlags iEikonEnvFlags; + TInt iForwardsCount; + TInt iBusyCount; + CEikProcess* iProcess; + RAnimDll* iClockDll; + CArrayPtr* iFontArray; + MEikInfoMsgWin* iInfoMsgWin; + MEikBusyMsgWin* iBusyMsgWin; + MEikAlertWin* iAlertWin; + TInt iSystemResourceFileOffset; + HBufC8* iKeyPressLabels; + CParaFormatLayer* iSingleLineParaFormatLayer; + CParaFormatLayer* iParaFormatLayer; + CCharFormatLayer* iCharFormatLayer; + const CCoeControl* iCursorWindow; + TInt iEditableControlStandardHeight; + CApaWindowGroupName* iWgName; + CEikErrorIdler* iErrorIdler; + TInt iPrivateResourceFileOffset; + CColorList* iColorList; + CEikPictureFactory* iPictureFactory; + TBuf<2> iNudgeChars; + MEikInfoDialog* iQueryDialog; + MEikInfoDialog* iInfoDialog; + TRequestDialogFunc iQueryDialogFunc; + TRequestDialogFunc iInfoDialogFunc; + CArrayFix* iControlFactoryFuncArray; + CArrayFix* iResourceFileOffsetArray; + TBool iAlertWinInitialized; + MEikDebugKeys* iDebugKeys; + MEikCDlgDialogFactory* iCDlgDialogFactory; + MEikPrintDialogFactory* iPrintDialogFactory; + MEikFileDialogFactory* iFileDialogFactory; + CArrayFix* iAppUiFactoryArray; + MEikIrFactory* iIrFactory; + CArrayPtr* iLibraries; + TInt iEmbeddedAppLevel; + TInt iAutoLoadedResourceFiles; + TInt iAutoLoadedControlFactories; + CBase* iExtension; + TInt iStatusPaneCoreResId; + CEikAutoMenuTitleArray* iAutoMenuTitleArray; + TEikVirtualCursor iVirtualCursor; + CEikLogicalBorderProxy* iLogicalBorderProxy; + CEikLafEnv* iLafEnv; + CArrayPtrFlat* iBitmapArray; + CEikEnvExtra* iEikEnvExtra; // used to be TInt iSpare1; + HBufC* iOOMErrorText; // used to be TInt iSpare2; + TInt iSpare3; + }; + + +/** Interface for launching a dialog with a title and a message, for instance a +query dialog. + +Dialogs implementing this interface can be passed to CEikonEnv::SetQueryDialog() +or CEikonEnv::SetInfoDialog(). + +@publishedAll +@released */ +class MEikInfoDialog + { +public: + /** Initialises and executes the dialog. + + @param aResource The ID of the DIALOG resource that identifies the dialog's + type. For instance, a query dialog (with Yes/No buttons) or an info dialog + (with a Continue button). + @param aTitle The dialog's title. + @param aMsg The message to display in the dialog. + @return True if the Confirm button (or equivalent) was pressed, false if the + dialog was cancelled. */ + virtual TBool RunDlgLD(TInt aResource, const TDesC& aTitle, const TDesC& aMsg) = 0; + }; + + +/** +@publishedPartner +@released +*/ +class MEikAlertWin + { +public: + virtual void ConstructL() = 0; + virtual void RunAlert(const TDesC& aTitle, const TDesC& aMsg) = 0; + virtual void Release() = 0; + virtual CEikDialog* AsEikDialog() = 0; + inline const CEikDialog* AsEikDialog() const; + IMPORT_C virtual CCoeControl* AsCoeControl(); + inline const CCoeControl* AsCoeControl() const; +private: + IMPORT_C virtual void MEikAlertWin_Reserved2(); + IMPORT_C virtual void MEikAlertWin_Reserved3(); + }; + + +/** +@publishedPartner +@released +*/ +class MEikDebugKeys + { +public: + virtual void ConstructL() = 0; + virtual void Release() = 0; +private: + IMPORT_C virtual void MEikDebugKeys_Reserved1(); + IMPORT_C virtual void MEikDebugKeys_Reserved2(); + IMPORT_C virtual void MEikDebugKeys_Reserved3(); + }; + + +IMPORT_C void InternalizeL(TEikPortFlag& aThing,RReadStream& aStream); +inline RWriteStream& operator<<(RWriteStream& aStream,const TEikPortFlag& aThing) + {aStream.WriteUint8L(aThing);return aStream;} +inline RReadStream& operator>>(RReadStream& aStream,TEikPortFlag& aThing) + {InternalizeL(aThing,aStream);return aStream;} + +#include + +#endif // __EIKENV_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikenv.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikenv.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,194 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + Gets the CEikonEnv maintained by the framework for the application. + + This function should never be run in a thread where such a static Uikon environment + does not exist. Code that may run on the server side of an application server + is one such case. + + @return A static CEikonEnv. + @see CCoeEnv::Static() +*/ +inline CEikonEnv* CEikonEnv::Static() + { return((CEikonEnv*)(CCoeEnv::Static())); } + +/** +@publishedPartner +@released +*/ +inline TInt CEikonEnv::EditableControlStandardHeight() const + { return(iEditableControlStandardHeight); } + +/** Gets the Uikon process that manages the files of applications started in this +environment. + +@return The CEikProcess object. */ +inline CEikProcess* CEikonEnv::Process() const + { return(iProcess); } + +/** Gets the application UI of the application using this CEikonEnv. + +@return Pointer to the CEikAppUi. */ +inline CEikAppUi* CEikonEnv::EikAppUi() const + { return((CEikAppUi*)iAppUi); } +inline const MEikAlertWin* CEikonEnv::Alert() const + { return(iAlertWin); } + +/** Gets the minus nudge character, this could be the left arrow for example. + +@return Minus nudge character. */ +inline TChar CEikonEnv::NudgeCharMinus() const + {return(iNudgeChars[0]);} + +/** Gets the plus nudge character, this could be the right arrow for example. + +@return Plus nudge character. */ +inline TChar CEikonEnv::NudgeCharPlus() const + {return(iNudgeChars[1]);} + +/** Gets the physical (TRgb) colour which corresponds to a logical colour. + +@param aLogicalColor A logical colour value. +@return The physical colour which corresponds to aLogicalColor. */ +inline TRgb CEikonEnv::Color(TLogicalColor aLogicalColor) const + {return ColorList().Color(aLogicalColor); } + +/** Gets the custom colour array. + +@return The custom colour array. */ +inline CColorArray& CEikonEnv::CustomColorArray() const + {return *(ColorList().ColorArray(TUid::Uid(KEikCustomColorsArrayValue)));} + +/** Gets the application's colour list. + +The colour list provides member functions to retrieve and modify colours +in the list, and to append new arrays of colours to the colour list. + +@return The application's colour list */ +inline CColorList& CEikonEnv::ColorList() const + {__ASSERT_DEBUG(iColorList,User::Invariant()); return *iColorList; } + +/** Sets a mapping in the application's colour list between the logical and physical +colours specified. + +@param aLogicalColor A logical colour value. +@param aColor A physical colour value. */ +inline void CEikonEnv::SetColor(TLogicalColor aLogicalColor, TRgb aColor) + { ColorList().SetColor(aLogicalColor, aColor); } + +/** +@publishedPartner +@released +*/ +inline void CEikonEnv::SetCDlgDialogFactory(MEikCDlgDialogFactory* aDialogFactory) + {iCDlgDialogFactory=aDialogFactory;} + +/** +@publishedPartner +@released +*/ +inline void CEikonEnv::SetPrintDialogFactory(MEikPrintDialogFactory* aDialogFactory) + {iPrintDialogFactory=aDialogFactory;} + +/** +@publishedPartner +@released +*/ +inline void CEikonEnv::SetFileDialogFactory(MEikFileDialogFactory* aDialogFactory) + {iFileDialogFactory=aDialogFactory;} + +/** +@publishedPartner +@released +*/ +inline void CEikonEnv::SetIrFactory(MEikIrFactory* aIrFactory) + {iIrFactory=aIrFactory;} + +/** +@publishedPartner +@released +*/ +inline MEikCDlgDialogFactory* CEikonEnv::CDlgDialogFactory() const + {return iCDlgDialogFactory;} + +/** +@publishedPartner +@released +*/ +inline MEikPrintDialogFactory* CEikonEnv::PrintDialogFactory() const + {return iPrintDialogFactory;} + +/** +@publishedPartner +@released +*/ +inline MEikFileDialogFactory* CEikonEnv::FileDialogFactory() const + {return iFileDialogFactory;} + +/** +@publishedPartner +@released +*/ +inline MEikIrFactory* CEikonEnv::IrFactory() const + {return iIrFactory;} + + +inline TInt CEikonEnv::AddLibraryL(TCreateByTypeFunction aControlFactory) + {return(AddLibraryL(aControlFactory, NULL));} +inline TInt CEikonEnv::AddLibraryL(TFileName* aResourceFile) + {return(AddLibraryL(NULL, aResourceFile));} +inline void CEikonEnv::RemoveLibrary(TCreateByTypeFunction aControlFactory) + {RemoveLibrary(aControlFactory, NULL);} +inline void CEikonEnv::RemoveLibrary(TInt aResourceFileOffset) + {RemoveLibrary(NULL, aResourceFileOffset);} + + +/** +@publishedPartner +@deprecated +*/ +inline CBase* CEikonEnv::Extension() const + {return iExtension;} + +/** +@publishedPartner +@released +*/ +inline TInt CEikonEnv::StatusPaneCoreResId() const + {return iStatusPaneCoreResId;} + +/** +@publishedPartner +@released +*/ +inline void CEikonEnv::SetStatusPaneCoreResId(TInt aStatusPaneCoreResId) + {iStatusPaneCoreResId=aStatusPaneCoreResId;} + +/** +@publishedPartner +@released +*/ +inline CEikAutoMenuTitleArray* CEikonEnv::AutoMenuTitleArray() const + {return iAutoMenuTitleArray;} + +inline const CEikDialog* MEikAlertWin::AsEikDialog() const + {return (const CEikDialog*)const_cast(this)->AsEikDialog();} + +inline const CCoeControl* MEikAlertWin::AsCoeControl() const + {return (const CCoeControl*)const_cast(this)->AsCoeControl();} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikfctry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikfctry.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKFCTRY_H__ +#define __EIKFCTRY_H__ + +#include + +class CCoeControl; + +/** Flags to determine the control status. + +@publishedPartner +@released +*/ +enum + { + /** Flag to determine whether a control has ears. Ears are triangular buttons + for moving forwards or backwards through the list. */ + EEikControlHasEars=0x01, + /** Flag to determine whether the control is unable to receive keyboard focus. */ + EEikControlIsNonFocusing=0x02, + /** Flag to determine whether the control is higher than a normal control. */ + EEikControlHasExtraAscent=0x04, + /** Flag to determine if a control should be placed directly + in the view/dialog or if it should be placed in a pop-out control. */ + EEikControlIsNonEditInPlace=0x08 + }; + +/** Structure to hold the control specific information. It is used by +EikControlFactory. + +@see EikControlFactory +@publishedAll +@released +*/ +struct SEikControlInfo + { + CCoeControl* iControl; + TInt iTrailerTextId; + TInt iFlags; + }; + + +/** Abstract factory that creates controls by type. + +This class provides a unified way to create controls according to the +specified control integer ID. + +@publishedAll +@released */ +class EikControlFactory + { +public: + IMPORT_C static SEikControlInfo CreateByTypeL(TInt aControlType); + }; + +#endif // __EIKFCTRY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikfutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikfutil.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,315 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKFUTIL_H__ +#define __EIKFUTIL_H__ + +#include +#include +#include +#include +#include + +class CFont; +class CBaflFileSortTable; +class TResourceReader; + + +/** Provides a set of drive, path and file utility functions. + +This class is essentially a thin layer over the BaflUtils class. + +@publishedAll +@released */ +NONSHARABLE_CLASS(EikFileUtils) + { +public: + inline static TBool PathExists(const TDesC& aPath); + inline static TInt IsFolder(const TDesC& aFullName, TBool& aIsFolder); + inline static TBool FolderExists(const TDesC& aFolderName); + inline static TFileName FolderNameFromFullName(const TDesC& aFullName); + inline static TFileName DriveAndPathFromFullName(const TDesC& aFullName); + inline static TFileName RootFolderPath(const TBuf<1> aDriveLetter); + inline static void AbbreviateFileName(const TFileName& aOriginalFileName, TDes& aAbbreviatedFileName); + IMPORT_C static TFileName AbbreviatePath(TDesC& aPathName, const CFont& aFont, TInt aMaxWidthInPixels); + inline static TBool UidTypeMatches(const TUidType& aFileUid, const TUidType& aMatchUid); + inline static TInt Parse(const TDesC& aName); + IMPORT_C static TFileName ValidateFolderNameTypedByUserL(const TDesC& aFolderNameTypedByUser, const TDesC& aCurrentPath); + inline static TInt CopyFile(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch = CFileMan::EOverWrite); + inline static TInt RenameFile(const TDesC& aOldFullName, const TDesC& aNewFullName, TUint aSwitch = CFileMan::EOverWrite); + inline static TInt DeleteFile(const TDesC& aSourceFullName, TUint aSwitch=0); + inline static TInt CheckWhetherFullNameRefersToFolder(const TDesC& aFullName, TBool& aIsFolder); + inline static TInt MostSignificantPartOfFullName(const TDesC& aFullName, TFileName& aMostSignificantPart); + inline static TInt CheckFolder(const TDesC& aFolderName); + inline static TInt DiskIsReadOnly(const TDesC& aFullName, TBool& aIsReadOnly); + inline static void UpdateDiskListL(const RFs& aFs,CDesCArray& aArray,TBool aIncludeRom,TDriveNumber aDriveNumber); + inline static void RemoveSystemDirectory(CDir& aDir); + inline static TBool IsFirstDriveForSocket(TDriveUnit aDriveUnit); + inline static TInt SortByTable(CDir& aDir,CBaflFileSortTable* aTable); +private: + EikFileUtils(); + }; + + +/** Tests whether a path exists. + +@param aPath The path to check. +@return ETrue if the path exists, EFalse otherwise. */ +inline TBool EikFileUtils::PathExists(const TDesC& aPath) + { return BaflUtils::PathExists(CEikonEnv::Static()->FsSession(),aPath); } + +/** Tests whether aFullName is a folder. + +@param aFullName The drive and path to test. +@param aIsFolder On return, indicates whether aFullName is a folder. +@return KErrNone if successful otherwise another of the system-wide error codes. */ +inline TInt EikFileUtils::IsFolder(const TDesC& aFullName, TBool& aIsFolder) + { return BaflUtils::IsFolder(CEikonEnv::Static()->FsSession(), aFullName,aIsFolder); } + +/** Tests whether a specified folder exists. + +This returns a boolean value indicating whether the folder exists: see also +CheckFolder() which returns an error code instead. + +@param aFolderName The folder's path. +@return ETrue if the folder exists, EFalse if not. */ +inline TBool EikFileUtils::FolderExists(const TDesC& aFolderName) + { return BaflUtils::FolderExists(CEikonEnv::Static()->FsSession(), aFolderName); } + +/** Gets a folder name from a path and file name. + +@param aFullName The full path and file name from which the folder will be +obtained. +@return Folder name */ +inline TFileName EikFileUtils::FolderNameFromFullName(const TDesC& aFullName) + { return BaflUtils::FolderNameFromFullName(aFullName); } + +/** Parses the specified full path and file name to obtain the drive and path. + +@param aFullName The full path and file name from which the drive and path +will be obtained. +@return The drive and path. */ +inline TFileName EikFileUtils::DriveAndPathFromFullName(const TDesC& aFullName) + { return BaflUtils::DriveAndPathFromFullName(aFullName); } + +/** Gets the root folder for the specified drive. + +@param aDriveLetter The drive letter, C for example. +@return The root folder for the drive, C:\ for example. */ +inline TFileName EikFileUtils::RootFolderPath(const TBuf<1> aDriveLetter) + { return BaflUtils::RootFolderPath(aDriveLetter); } + +/** Abbreviates a file name. + +If aOriginalFileName is less than the maximum length of aAbbreviatedFileName, +then the name is simply copied to aAbbreviatedFileName. + +If this is not the case, then the left-most characters of aOriginalFileName are +copied to aAbbreviatedFileName, up to aAbbreviatedFileName's maximum length-1 and +aAbbreviatedFileName's first character is set to be an ellipsis. + +For example, if c:\\home\\letters\\abcdef is the original file name and aAbbreviatedFileName +allows only 7 characters, the abbreviated file name will be ...abcdef. +This can be used to display a file or folder name in an error or progress +dialog. + +@param aOriginalFileName Original file name. +@param aAbbreviatedFileName On return, the abbreviated file name. */ +inline void EikFileUtils::AbbreviateFileName(const TFileName& aOriginalFileName, TDes& aAbbreviatedFileName) + { BaflUtils::AbbreviateFileName(aOriginalFileName,aAbbreviatedFileName); } + +/** Tests whether two UID types match. + +A match is made if each UID in aMatchUid is either identical to the corresponding +one in aFileUid, or is KNullUid. + +@param aFileUid The UID type to match. +@param aMatchUid The UID type to match against. +@return ETrue if the UIDs match, EFalse if not. */ +inline TBool EikFileUtils::UidTypeMatches(const TUidType& aFileUid, const TUidType& aMatchUid) + { return BaflUtils::UidTypeMatches(aFileUid,aMatchUid); } + +/** Tests whether a specified file name can be parsed. + +@param aName The file name to parse. +@return KErrNone if the filename can be parsed, otherwise one +of the system-wide error codes. +@see TParse */ +inline TInt EikFileUtils::Parse(const TDesC& aName) + { return BaflUtils::Parse(aName); } + +/** Copies the specified file. + +Notes: + +- files can be copied across drives + +- open files can be copied only if they have been opened using the EFileShareReadersOnly +file share mode + +- the source file's attributes are preserved in the target file + +@param aSourceFullName Path indicating the file(s) to be copied. Any path +components which are not specified here will be taken from the session path. +@param aTargetFullName Path indicating the directory into which the file(s) +are to be copied. +@param aSwitch Optional switch to allow overwriting files with the same name +in the target directory, or recursion. By default, this function operates with +overwriting and non-recursively. Switch options are defined using the enum TSwitch. +If recursive operation is set, any intermediate directories are created. If no overwriting +is set, any files with the same name are not overwritten, and an error is returned +for that file. +@return KErrNone if the copy is successful, otherwise another of the system-wide +error codes. */ +inline TInt EikFileUtils::CopyFile(const TDesC& aSourceFullName, const TDesC& aTargetFullName, TUint aSwitch) + { return BaflUtils::CopyFile(CEikonEnv::Static()->FsSession(),aSourceFullName,aTargetFullName,aSwitch); } + +/** Renames one or more files or directories. + +This can also be used to move files by specifying different destination and +source directories, but note that the destination and source directories must be +on the same drive. + +If moving files, you can set aSwitch so that any files with the same name +that exist in the target directory are overwritten. If aSwitch is set for +no overwriting, any files with the same name are not overwritten, and an error +(KErrAlreadyExists) is returned for that file. + +This function can only operate non-recursively, so that only the matching +files located in the single directory specified by aOldFullName may be renamed. + +Read-only, system and hidden files may be renamed or moved, and the source +file's attributes are preserved in the target file, but attempting to rename +or move an open file will return an error for that file. + +@param aOldFullName Path specifying the file or directory to be renamed. +@param aNewFullName Path specifying the new name for the file or directory. +Any directories specified in this path which do not exist will be created. +@param aSwitch Optional, sets whether files are overwritten on the target. +@return KErrNone if successful otherwise another of the system-wide error codes. */ +inline TInt EikFileUtils::RenameFile(const TDesC& aOldFullName, const TDesC& aNewFullName, TUint aSwitch) + { return BaflUtils::RenameFile(CEikonEnv::Static()->FsSession(),aOldFullName,aNewFullName,aSwitch); } + +/** Deletes one or more files. + +This function may operate recursively or non-recursively. When operating non-recursively, +only the matching files located in the directory specified in aSourceFullName +are affected. When operating recursively, all matching files in the directory +hierarchy below the directory specified in aSourceFullName are deleted. + +Attempting to delete read-only or open files returns an error. + +@param aSourceFullName Path indicating the file(s) to be deleted. This can +either be a full path, or a path relative to the session path. Use wildcards +to specify more than one file. +@param aSwitch Determines whether this function operates recursively. By default, +this function operates non-recursively. +@return KErrNone if aSourceFullName is successfully deleted, otherwise another +of the system-wide error codes. */ +inline TInt EikFileUtils::DeleteFile(const TDesC& aSourceFullName, TUint aSwitch) + { return BaflUtils::DeleteFile(CEikonEnv::Static()->FsSession(), aSourceFullName,aSwitch); } + +/** Tests whether a file specification is a valid folder name. + +@param aFullName The string to check. +@param aIsFolder True if aFullName is a valid folder name, otherwise false. +@return KErrNone if successful, otherwise another of the system-wide error codes +(probably because aFullName cannot be parsed). */ +inline TInt EikFileUtils::CheckWhetherFullNameRefersToFolder(const TDesC& aFullName, TBool& aIsFolder) + { return BaflUtils::CheckWhetherFullNameRefersToFolder(aFullName,aIsFolder); } + +/** Gets the folder name if the specified item is a valid folder name, otherwise gets the file name. + +@param aFullName Item to parse. +@param aMostSignificantPart On return, the folder or file name. +@return KErrNone if successful otherwise another of the system-wide error codes. */ +inline TInt EikFileUtils::MostSignificantPartOfFullName(const TDesC& aFullName, TFileName& aMostSignificantPart) + { return BaflUtils::MostSignificantPartOfFullName(aFullName,aMostSignificantPart); } + +/** Tests whether the specified folder exists and can be opened. + +This returns an error code if the folder does not exist: see also FolderExists() +which returns a boolean value. + +@param aFolderName The folder's name and path. +@return KErrNone if aFolderName exists, otherwise another of the system-wide +error codes. */ +inline TInt EikFileUtils::CheckFolder(const TDesC& aFolderName) + { return BaflUtils::CheckFolder(CEikonEnv::Static()->FsSession(),aFolderName); } + +/** Tests whether the specified drive is read-only. + +@param aFullName File name, including drive. +@param aIsReadOnly On return, true if the drive is read-only, otherwise false. +@return KErrNone if successful otherwise another of the system-wide error codes. */ +inline TInt EikFileUtils::DiskIsReadOnly(const TDesC& aFullName, TBool& aIsReadOnly) + { return BaflUtils::DiskIsReadOnly(CEikonEnv::Static()->FsSession(),aFullName,aIsReadOnly); } + +/** Gets a list of all drives present on the system. + +The file server is interrogated for a list of the drive letters for all available +drives. The drive letter that corresponds to aDriveNumber is added to the list +regardless of whether it is present, or is corrupt. Also, the C: drive and the +primary partitions on removable media slots are forced onto the list, even if +corrupt or not present. + +@param aFs A connected session with the file server. +@param aArray On return, contains the drive letters that correspond to the available +drives. The drive letters are uppercase and are in alphabetical order. +@param aIncludeRom ETrue if the ROM is included as a drive, EFalse otherwise. +@param aDriveNumber The drive to force into the list, e.g. the drive in the default +path. */ +inline void EikFileUtils::UpdateDiskListL(const RFs& aFs,CDesCArray& aArray,TBool aIncludeRom,TDriveNumber aDriveNumber) + { BaflUtils::UpdateDiskListL(aFs,aArray,aIncludeRom,aDriveNumber); } + +/** Removes the System directory from a list of directory entries. + +@param aDir Array of directory entries. */ +inline void EikFileUtils::RemoveSystemDirectory(CDir& aDir) + { BaflUtils::RemoveSystemDirectory(aDir); } + +/** Tests whether the specified drive corresponds to the primary partition +in a removable media slot. + +Note that the function assumes that the D: drive corresponds to the primary +partition on socket 0, and that the E: drive corresponds to the primary +partition on socket 1 (a socket is a slot for removable media). This mapping +may not always be the case because it is set up in the variant layer of Symbian +OS. + +@param aDriveUnit The drive to check. +@return True if the drive is the primary partition in a removable media +slot. True is also returned if the drive is C:. False is returned otherwise. */ +inline TBool EikFileUtils::IsFirstDriveForSocket(TDriveUnit aDriveUnit) + { return BaflUtils::IsFirstDriveForSocket(aDriveUnit); } + +/** Sorts files by UID. + +The caller supplies a table which specifies the order in which files are to be sorted. +The files whose UID3 is the first UID in the table appear first. The files whose UID3 +is the UID specified second appear next, and so on. Files whose UID3 is not specified +in the table, and directories, appear at the end of the list, with directories preceding +the files, and with files sorted in ascending order of UID3. + +This function is used for customising how lists of application files are sorted. + +@param aDir The array of files and directories to sort. +@param aTable A sort order table containing the UIDs to use in the sort. +@return KErrNone if successful otherwise another of the system-wide error codes. */ +inline TInt EikFileUtils::SortByTable(CDir& aDir,CBaflFileSortTable* aTable) + { return BaflUtils::SortByTable(aDir,aTable); } + + +#endif // __EIKFUTIL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikmobs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikmobs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,125 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKMOBS_H__ +#define __EIKMOBS_H__ + +#include +#include +#include + +class CCoeControl; +class CEikMenuPane; +class CEikMenuBar; +class CEikHotKeyTable; +class TPoint; + +/** Menu observer interface. + +Menu observers cooperate with menu bars and menu panes, initialising them +before display and responding to menu events appropriately. CEikAppUi implements +MEikMenuObserver, so these functions may be implemented on an application's +App UI. + +@publishedAll +@released */ +class MEikMenuObserver : public MEikCommandObserver + { +public: + /** Menu types */ + enum TMenuType + { + /** Menu pane. */ + EMenuPane, + /** Menu bar. */ + EMenuBar + }; +public: + IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId); + IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId); + IMPORT_C virtual void RestoreMenuL(CCoeControl* aMenuControl,TInt aResourceId,TMenuType aType); + IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); + IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar); + IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable); + IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent& aKeyEvent,TEventCode aType); + /** Called by the Uikon framework to handle the emphasising or de-emphasising of + a menu window. + + CEikMenuBar objects call this on their observer to emphasise + themselves when they are displayed, and de-emphasise themselves when they + stop displaying. + + @param aMenuControl The menu control. + @param aEmphasis ETrue to emphasize the menu, EFalse otherwise. */ + virtual void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis)=0; +public: + IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); +protected: + IMPORT_C MEikMenuObserver(); +private: + IMPORT_C virtual void Reserved_1_MenuObserver(); + IMPORT_C virtual void Reserved_2_MenuObserver(); +private: // from MEikCommandObserver. do not override! + IMPORT_C void MEikCommandObserver_Reserved1(); + IMPORT_C void MEikCommandObserver_Reserved2(); +private: + TInt iMEikMenuObserver_Spare1; + }; + + +/** Provides additional functionality to an auto menu title, in the form of an +OfferHotKeyL() method, which is not required in the normal MEikMenuObserver. + +Auto menu titles are used to ensure that some menu panes appear in every menu +constructed for an application. + +@publishedAll +@released */ +class MEikAutoMenuObserver : public MEikMenuObserver + { +public: + /** Offers the specified hot key to the auto menu title. + + Implement this function if you expect to handle any events from an auto menu. + + @param aKeyEvent The key event. + @param aType The type of key event. + @return The auto menu title's response. */ + virtual TKeyResponse OfferHotKeyL(const TKeyEvent& aKeyEvent,TEventCode aType)=0; +public: // from MEikMenuObserver + IMPORT_C void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); +public: + IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId); + IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId); + IMPORT_C virtual void RestoreMenuL(CCoeControl* aMenuControl,TInt aResourceId,TMenuType aType); + IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); + IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId,CEikMenuBar* aMenuBar); + IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId,const TPoint& aPos,TInt aModifiers,const CEikHotKeyTable* aTable); + IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent& aKeyEvent,TEventCode aType); + IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); +protected: + IMPORT_C MEikAutoMenuObserver(); +private: + IMPORT_C virtual void Reserved_1_MenuObserver(); + IMPORT_C virtual void Reserved_2_MenuObserver(); +private: // from MEikCommandObserver. do not override! + IMPORT_C void MEikCommandObserver_Reserved1(); + IMPORT_C void MEikCommandObserver_Reserved2(); +private: + TInt iMEikAutoMenuObserver_Spare1; + }; + + +#endif // __EIKMOBS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikmsg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikmsg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,148 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKMSG_H__ +#define __EIKMSG_H__ + +#include +#include + +#include +#include + +class CCoeControl; +class CEikonEnv; +class RWindowGroup; +class CEikResourceChange; + + +/** Base class providing functions to construct and display an information message. + +@publishedAll +@released */ +class CEikMsgWin : public CBase + { +protected: + IMPORT_C CEikMsgWin(CEikonEnv& aEikonEnv); +public: + IMPORT_C void ConstructL(RWindowGroup& aWindowGroup); + IMPORT_C virtual ~CEikMsgWin(); + IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); + IMPORT_C void CancelDisplay(); +private: + IMPORT_C virtual void CEikMsgWin_Reserved1(); + IMPORT_C virtual void CEikMsgWin_Reserved2(); +protected: + TDes& PrepareDisplay(TDes& aText, TGulAlignment aCorner); +private: + virtual void DoStartDisplay(const TDesC& aText)=0; +protected: + /** A CEikonEnv*, which all applications have. This is required for construction + of a CEikMsgWin as it provides access to services which the message window + needs, the window server session for example. */ + CEikonEnv& iEikonEnv_; // the underscore is to prevent a name clash with the iEikonEnv #define + /** An empty control required for construction of a blank window. This defines + a handle back to the client side object, which is only required if you need + to later initiate client side drawing. */ + CCoeControl* iDummy; + /** The window in which the message will be drawn. */ + RBlankWindow* iBlankWindow; + /** An RAnim derived class, which is responsible for interacting with server side + classes to provide the message window's animation on the screen. It is constructed + by passing in the RWindowBase which it will use to draw its contents to, and + also a handle to an animation DLL, which provides the animation functionality. */ + RMessageWindow* iMessageWindow; +private: + CEikResourceChange* iResourceChange; + TInt iCEikMsgWin_Spare1; + }; + +/** +@publishedAll +@released +*/ +const TInt KEikInfoMsgMaxLen=RMessageWindow::EMaxTextLength; + +/** Specifies the maximum length of the message buffer. + +@publishedAll +@released */ +typedef TBuf TEikInfoMsgBuf; + +class CEikInfoMsgWin : public CEikMsgWin, public MEikInfoMsgWin +/** Enables construction of an information message window. + +@publishedAll +@released */ + { +public: + IMPORT_C void ConstructL(RWindowGroup& aWindowGroup, TInt aParam = 0); + IMPORT_C CEikInfoMsgWin(CEikonEnv& aEikonEnv); +public: //from MEikInfoMsgWin + IMPORT_C void StartDisplaySpecifyingDuration(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aDuration); + IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); + IMPORT_C void CancelDisplay(); + IMPORT_C void Release(); +private: + virtual void DoStartDisplay(const TDesC& aText); + IMPORT_C virtual void CEikInfoMsgWin_Reserved1(); + IMPORT_C virtual void CEikInfoMsgWin_Reserved2(); +private: // From CEikMsgWin. do not override! + IMPORT_C void CEikMsgWin_Reserved1(); + IMPORT_C void CEikMsgWin_Reserved2(); +private: + TInt iCEikInfoMsgWin_Spare1; + }; + + +/** +@publishedAll +@released +*/ +const TInt KEikBusyMsgMaxLen=RMessageWindow::EMaxTextLength; + +/** +@publishedAll +@released +*/ +typedef TBuf TEikBusyMsgBuf; + +/** +@publishedAll +@released +*/ +class CEikBusyMsgWin : public CEikMsgWin, public MEikBusyMsgWin + { +public: + IMPORT_C void ConstructL(RWindowGroup& aWindowGroup); + IMPORT_C CEikBusyMsgWin(CEikonEnv& aEikonEnv); +public: //from MEikBusyMsgWin + IMPORT_C void StartDisplaySpecifyingInitialDelay(const TDesC& aText, TGulAlignment aCorner, TTimeIntervalMicroSeconds32 aInitialDelay); + IMPORT_C void StartDisplay(const TDesC& aText, TGulAlignment aCorner); + IMPORT_C void Release(); +private: + IMPORT_C virtual void CEikBusyMsgWin_Reserved1(); + IMPORT_C virtual void CEikBusyMsgWin_Reserved2(); +private: // From CEikMsgWin. do not override! + IMPORT_C void CEikMsgWin_Reserved1(); + IMPORT_C void CEikMsgWin_Reserved2(); +private: + virtual void DoStartDisplay(const TDesC& aText); +private: + TTimeIntervalMicroSeconds32 iInitialDelay; + TInt iCEikBusyMsgWin_Spare1; + }; + +#endif // __EIKMSG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eiknotapi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eiknotapi.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,270 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKNOTAPI_H__ +#define __EIKNOTAPI_H__ + +#include +#include +#include + +/** Defines the second Uid value for plug in notifier DLLs. + +@publishedAll +@released */ +const TUid KUidNotifierPlugIn = {0x10005522}; +const TUid KUidNotifierPlugInV2 = {0x101fdfae}; + +/** +@publishedAll +@released +*/ +enum TEikNotExtStatus + { + EEikNotExtRequestCompleted = 0, + EEikNotExtRequestQueued = 1 + }; + +/** The Uid that identifies a screen change event. + +@see MEikSrvNotifierBase2::HandleSystemEventL() +@internalTechnology */ +const TUid KUidEventScreenModeChanged = {0x101F3648}; + +/** A set of flags that define the capabilities of the notifier. + +Capabilities are returned by calling MEikSrvNotifierBase2::NotifierCapabilites(). + +@publishedAll +@released */ +enum TNotifierCapabilities + { + /** The notifier has no special capabilities. */ + ENoSpecialCapabilities = 0x00000000, + /** The notifier can handle a change to the screen device. */ + EScreenDeviceChangeSupported = 0x00000001, + }; + +/** +Interface to allow notifiers to manage their own startup/shutdown. This class is likely to be of most +interest to notifiers that observe engines using publically available APIs rather than those that are run +via RNotifier. + +@publishedAll +@released +*/ +class MEikSrvNotifierManager + { +public: + virtual void StartNotifierL(TUid aNotifierUid, const TDesC8& aBuffer, TDes8& aResponse) = 0; + virtual void CancelNotifier(TUid aNotifierUid) = 0; + virtual void UpdateNotifierL(TUid aNotifierUid, const TDesC8& aBuffer, TDes8& aResponse) = 0; +protected: + IMPORT_C MEikSrvNotifierManager(); +private: + IMPORT_C virtual void MEikSrvNotifierManager_Reserved1(); + IMPORT_C virtual void MEikSrvNotifierManager_Reserved2(); +private: + TInt iMEikSrvNotifierManager_Spare1; + }; + + +/** Interface to a plug-in server side notifier. + +Any number of MEikSrvNotifierBase2 objects can be included in a single DLL. +All notifiers are loaded during device startup and are not destroyed until +the Uikon server closes down. + +All notifiers run in the uikon server thread so are able to directly access +server side status panes but cannot call any functions on REikAppUiSession. + +@publishedAll +@released */ +class MEikSrvNotifierBase2 + { +public: + /** Defines a set of notifier priorities. The use and application of these values + is implementation-dependent. */ + enum TNotifierPriority + { + /** The highest priority value. */ + ENotifierPriorityAbsolute = 500, + /** The second highest priority value. */ + ENotifierPriorityVHigh = 400, + /** The third highest priority value. */ + ENotifierPriorityHigh = 300, + /** The fourth highest priority value. */ + ENotifierPriorityLow = 200, + /** The fifth highest priority value. */ + ENotifierPriorityVLow = 100, + /** The lowest priority value. */ + ENotifierPriorityLowest = 0 + }; +public: + /** Contains the notifier parameters. + + @see TNotifierPriority */ + class TNotifierInfo + { + public: + /** The Uid that identifies the notifier. */ + TUid iUid; + /** The Uid that identifies the channel to be used by the notifier (e.g. the screen, + an LED etc) */ + TUid iChannel; + /** The notifier priority, typically chosen from the standard set. + + @see TNotifierPriority */ + TInt iPriority; + }; + +public: + IMPORT_C MEikSrvNotifierBase2(); + IMPORT_C virtual ~MEikSrvNotifierBase2(); +public: + /** Frees all resources owned by this notifier. + + This function is called by the notifier framework when all resources allocated + by notifiers should be freed. As a minimum, this function should delete this + object (i.e. delete this;). + + Note that it is important to implement this function correctly to avoid memory + leaks. */ + virtual void Release() = 0; + /** Performs any initialisation that this notifier may require. + + The function is called when the notifier is loaded (when the plug-in DLL is + loaded). It is called only once. + + As a minimum, the function should return a TNotifierInfo instance describing + the notifier parameters. A good implementation would be to set this into a + data member, and then to return it. This is because the same information is + returned by Info(). + + The function is safe to leave from, so it is possible, although rarely necessary, + to allocate objects as you would normally do in a ConstructL() function as + part of two-phase construction. + + @return Describes the parameters of the notifier. */ + virtual TNotifierInfo RegisterL() = 0; + /** Gets the notifier parameters. + + This is usually the same information as returned by RegisterL() but can be + varied at run time. + + @return Describes the parameters of the notifier. */ + virtual TNotifierInfo Info() const = 0; + /** Starts the notifier. + + This is called as a result of a client-side call to RNotifier::StartNotifier(), + which the client uses to start a notifier from which it does not expect a + response. + + The function is synchronous, but it should be implemented so that it completes + as soon as possible, allowing the notifier framework to enforce its priority + mechanism. + + It is not possible to to wait for a notifier to complete before returning + from this function unless the notifier is likely to finish implementing its + functionality immediately. + + @param aBuffer Data that can be passed from the client-side. The format and + meaning of any data is implementation dependent. + @return A pointer descriptor representing data that may be returned. The format + and meaning of any data is implementation dependent. */ + virtual TPtrC8 StartL(const TDesC8& aBuffer) = 0; + /** Starts the notifier. + + This is called as a result of a client-side call to the asynchronous function + RNotifier::StartNotifierAndGetResponse(). This means that the client is waiting, + asynchronously, for the notifier to tell the client that it has finished its + work. + + It is important to return from this function as soon as possible, and derived + classes may find it useful to take a copy of the reply-slot number and + the RMessage object. + + The implementation of a derived class must make sure that Complete() is called + on the RMessage object when the notifier is deactivated. + + This function may be called multiple times if more than one client starts + the notifier. + + @param aBuffer Data that can be passed from the client-side. The format and + meaning of any data is implementation dependent. + @param aReplySlot Identifies which message argument to use for the reply. + This message argument will refer to a modifiable descriptor, a TDes8 type, + into which data can be returned. The format and meaning of any returned data + is implementation dependent. + @param aMessage Encapsulates a client request. */ + virtual void StartL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage) = 0; + + /** Cancels an active notifier. + + This is called as a result of a client-side call to RNotifier::CancelNotifier(). + + An implementation should free any relevant resources and complete any outstanding + messages, if relevant. */ + virtual void Cancel() = 0; + /** Updates a currently active notifier with new data. + + This is called as a result of a client-side call to RNotifier::UpdateNotifier(). + + @param aBuffer Data that can be passed from the client-side. The format and + meaning of any data is implementation dependent. + @return A pointer descriptor representing data that may be returned. The format + and meaning of any data is implementation dependent. */ + virtual TPtrC8 UpdateL(const TDesC8& aBuffer) = 0; + /** Updates a currently active notifier with new data. + + This is called as a result of a client-side call to the asynchronous function + RNotifier::UpdateNotifierAndGetResponse(). This means that the client is waiting, + asynchronously, for the notifier to tell the client that it has finished its + work. + + It is important to return from this function as soon as possible, and derived + classes may find it useful to take a copy of the reply-slot number and + the RMessage object. + + The implementation of a derived class must make sure that Complete() is called + on the RMessage object when the notifier is deactivated. + + This function may be called multiple times if more than one client updates + the notifier. + + @param aBuffer Data that can be passed from the client-side. The format and + meaning of any data is implementation dependent. + @param aReplySlot Identifies which message argument to use for the reply. + This message argument will refer to a modifiable descriptor, a TDes8 type, + into which data can be returned. The format and meaning of any returned data + is implementation dependent. + @param aMessage Encapsulates a client request. */ + IMPORT_C virtual void UpdateL(const TDesC8& aBuffer, TInt aReplySlot, const RMessagePtr2& aMessage); +public: + void SetManager(MEikSrvNotifierManager* aManager); +protected: + MEikSrvNotifierManager* iManager; +private: + IMPORT_C virtual void MEikSrvNotifierBase2_Reserved_2(); +public: // internal + IMPORT_C virtual void HandleSystemEventL(TUid aEvent); + IMPORT_C virtual TInt NotifierCapabilites(); +private: + TInt iNotBSpare; + TInt iMEikSrvNotifierBase2_Spare; + }; + + +#endif // __EIKNOTAPI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikproc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikproc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,73 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKPROC_H__ +#define __EIKPROC_H__ + +#include +#include + +class CFileStore; +class CEikDocument; + +/** The controlling process for an application. + +An instance of this class is created by the Uikon environment. This instance +calls CApaProcess::AddNewDocumentL() to load the application DLL and +construct the new application which runs in this environment. + +It also provides services related to an application's main (non-embedded) document, +including: +- saving the main document to a direct file store +- providing the name of the most recently accessed file +- getting the name of the application DLL associated with a document. + +@publishedAll +@released */ +NONSHARABLE_CLASS(CEikProcess) : public CApaProcess + { +public: + /** Used as a parameter by CEikProcess::SetLastUsedFileL() and LastUsedFileL() + to indicate whether the function relates to the last opened or last created file.*/ + enum TLastUsedFile + { + /** Last opened file.*/ + ELastOpenFile, + /** Last created file. */ + ELastCreatedFile + }; +public: + static CEikProcess* NewL(const RFs& aFs, TProcessId aProcessId=KNullProcessId); + IMPORT_C TPtrC CommandTailEnd() const; + IMPORT_C TFileName MainDocFolder() const; + IMPORT_C void SetLastUsedFileL(TLastUsedFile aType,const TDesC& aFileName) const; + IMPORT_C TFileName LastUsedFileL(TLastUsedFile aType) const; + IMPORT_C void SetMainStore(CFileStore* aMainStore); + IMPORT_C CFileStore* MainStore() const; + IMPORT_C void AppFromDocL(TDes& aLibraryName,const TDesC& aDocumentName) const; + IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName=NULL); + IMPORT_C void SaveToDirectFileStoreL(CEikDocument* aDoc,const TFileName* aNewFileName,TBool aReopen,TFileName* aTempFile=NULL); + IMPORT_C ~CEikProcess(); +private: + CEikProcess(const RFs& aFs); + void GetLibraryNameL(TDes& aLibraryName,const CFileStore& aDocStore, const CStreamDictionary& aStreamDic) const; + void OpenNewFileL(const TFileName* aNewFileName, const TParse& aNewFilePath); + CDictionaryStore* OpenMainAppIniFileLC() const; +private: + TPtrC iCommandTailEnd; + CFileStore* iMainStore; + }; + +#endif // __EIKPROC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikrutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikrutil.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,85 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKRUTIL_H__ +#define __EIKRUTIL_H__ + +#include +#include + +class CFbsFont; +class CEikonEnv; +class CWsScreenDevice; +class TResourceReader; + + +/** Provides utilities for reading standard resources. + +@publishedAll +@released */ +NONSHARABLE_CLASS(EikResourceUtils) + { +public: + inline static CFbsFont* CreateScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); + IMPORT_C static CFbsFont* CreateScreenFontL(TInt aResourceId,CEikonEnv* aEnv=NULL); + inline static TInt8 ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv=NULL); + inline static TInt16 ReadTInt16L(TInt aResourceId,CEikonEnv* aEnv=NULL); + inline static TInt32 ReadTInt32L(TInt aResourceId,CEikonEnv* aEnv=NULL); + IMPORT_C static CColorArray* CreateColorArrayL(TInt aResourceId,CEikonEnv* aEnv=NULL); + IMPORT_C static CColorArray* CreateColorArrayLC(TInt aResourceId,CEikonEnv* aEnv=NULL); +private: + enum TResourceTypeInt { EResourceInt8,EResourceInt16,EResourceInt32 }; +private: + IMPORT_C static TInt32 ReadResourceIntL(TInt aResourceId, CEikonEnv* aEnv, TResourceTypeInt aSize); + EikResourceUtils(); + }; + +/** Create a screen font from resource. + +Creates a font for the specified screen device by reading a font UID and font +flags from the given position in a resource. Returns a pointer to the font +and transfers ownership. + +@param aResourceReader The resource reader to use to read the font. +@param aScreenDevice The screen device for which the font will be created. +@return Screen font object. */ +inline CFbsFont* EikResourceUtils::CreateScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice) + { return(ResourceUtils::CreateScreenFontL(aResourceReader,aScreenDevice)); } + +/** Gets the 8 bit signed integer held in a specified resource location. + +@param aResourceId The location in the resource to be read. +@param aEnv The UI environment. +@return The eight bits that follow the specified location in the resource. */ +inline TInt8 EikResourceUtils::ReadTInt8L(TInt aResourceId,CEikonEnv* aEnv) + { return static_cast(ReadResourceIntL(aResourceId,aEnv,EResourceInt8)); } + +/** Gets the 16 bit signed integer held in a specified resource location. + +@param aResourceId The location in the resource to be read. +@param aEnv The UI environment. +@return The 16 bits that follow the specified location in the resource. */ +inline TInt16 EikResourceUtils::ReadTInt16L(TInt aResourceId,CEikonEnv* aEnv) + { return static_cast(ReadResourceIntL(aResourceId,aEnv,EResourceInt16)); } + +/** Gets the 32 bit signed integer held in a specified resource location. + +@param aResourceId The location in the resource to be read. +@param aEnv The UI environment. +@return The 32 bits that follow the specified location in the resource. */ +inline TInt32 EikResourceUtils::ReadTInt32L(TInt aResourceId,CEikonEnv* aEnv) + { return static_cast(ReadResourceIntL(aResourceId,aEnv,EResourceInt32)); } + +#endif // __EIKRUTIL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikstart.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikstart.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKSTART_H__ +#define __EIKSTART_H__ + +#include +#include + +class CApaCommandLine; + +/** +This is the API to initialise and run the application architecture for applications built as exes. +It is not intended to be used for generally running applications from other code. Use RApaLsSession for that. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(EikStart) + { +public: + IMPORT_C static TInt RunApplication(TApaApplicationFactory aApplicationFactory); +private: + EikStart(); + }; + +#endif // __EIKSTART_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikunder.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikunder.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __EIKUNDER_H__ +#define __EIKUNDER_H__ + +#include // class CActive + +class RThread; + +/** +@publishedAll +@released +*/ +class MEikUndertakerObserver + { +public: + virtual void HandleThreadExitL(RThread& aThread) = 0; + }; + +/** +@publishedAll +@released +*/ +class CEikUndertaker : public CActive + { +public: + IMPORT_C static CEikUndertaker* NewL(MEikUndertakerObserver& aObserver); + IMPORT_C ~CEikUndertaker(); +private: + CEikUndertaker(MEikUndertakerObserver& aObserver); + void ConstructL(); + void Request(); +private: // from CActive + void DoCancel(); + void RunL(); +private: + MEikUndertakerObserver& iObserver; + RUndertaker iUndertaker; + TInt iThreadHandle; + }; + +#endif // __EIKUNDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/eikvcurs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/eikvcurs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// class TEikVirtualCursor +// +// + +#ifndef __EIKVCURS_H__ +#define __EIKVCURS_H__ + +#include +#include + + +/** Provides support for the virtual cursor's state within an application. + +There is one instance of this object per CEikonEnv. + +@publishedAll +@released */ +class TEikVirtualCursor + { +public: + /** Specifies the virtual cursor's state. + + The state may be on, off or suspended. The suspended state is for use by applications + that wish to temporarily disable the cursor, but do not want to switch it + off completely. For example, an editor control which when focused needs to + capture arrow keys would disable the virtual cursor when it gains focus, + and enable it when unfocused. */ + enum TState + { + /** Sets the virtual cursor off. */ + EOff=0, + /** Sets the virtual cursor on. */ + EOn, + /** Sets the virtual cursor as suspended. */ + ESuspended + }; +public: + TEikVirtualCursor(); +private: //prevent passing by value + inline TEikVirtualCursor(const TEikVirtualCursor&); +public: + IMPORT_C void SetCursorStateL(TState aState, CCoeEnv& aEnv); + IMPORT_C TState CursorState(CCoeEnv& aEnv); +public: // but not exported + void HandleAppToForeground(CCoeEnv& aEnv); +private: + void SwitchOffEmulationAndBitmap(CCoeEnv& aEnv); + void SwitchOnEmulationAndBitmap(CCoeEnv& aEnv); +private: + TState iState; + }; + + +// inlines + +/** Constructor. + +Sets the cursor's state to ESuspended so that the call to switch off the virtual +cursor will succeed when the application starts. Required due to the efficient +implementation of SetCursorState(). */ +inline TEikVirtualCursor::TEikVirtualCursor(const TEikVirtualCursor&) + {} + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/estatus.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/estatus.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Created at: 04-Jan-99 10:35:54 AM +// Status enumeration for Data Collectors, Data Providers and Data Handlers. +// +// + + +#if !defined(__ESTATUS_H__) +#define __ESTATUS_H__ + +#ifndef __E32DEF_H__ +#include // for TInt +#endif + +// +// values < 0 are error codes +// 0 - 100 are % processed +// > 100 are the enum values below... +// +enum TPluginStatus { + EPluginComplete=100, + EPluginInitialised, + EPluginWaitingForChild, + EPluginProcessing, + EPluginSuspend, + EPluginCancelled, + EConnectionChanged + }; + +#endif // __ESTATUS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/fepbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/fepbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,634 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __FEPBASE_H__ +#define __FEPBASE_H__ + +#include +#include +#include +#include +#include +#include +#include +#include + +class CCoeControl; + + +/** Specifies the mixin protocol for observing a FEP transaction. + +Applications which need to implement this protocol should derive from this +class. The functions are not pure virtual because most applications will only +need to override one of them. + +@see CCoeFep::MakeDeferredFunctionCall() +@publishedAll +@released */ +class MCoeFepObserver + { +public: + // both of these functions do nothing by default - the reason that they are not pure + // virtual is that most applications will only want to override one of them + IMPORT_C virtual void HandleStartOfTransactionL(); // the responsibility of FEPs to call + IMPORT_C virtual void HandleCompletionOfTransactionL(); // the responsibility of FEPBASE to call - not to be called if the transaction is canceled +private: // reserved. do not override! + IMPORT_C virtual void MCoeFepObserver_Reserved_1(); + IMPORT_C virtual void MCoeFepObserver_Reserved_2(); + }; + +/** Handles the start of a FEP transaction. + +This is a non-member function which just calls aFepObserver.HandleStartOfTransactionL(). + +It is called indirectly by a FEP to notify the application that it is starting a transaction. +This is done by calling CCoeEnv::ForEachFepObserverCall() passing in +FepObserverHandleStartOfTransactionL. Internally, this calls HandleStartOfTransactionL() for +each MCoeFepObserver object that has been registered with the control environment. + +@param aFepObserver The FEP observer. +@see MCoeFepObserver::HandleStartOfTransactionL() +@publishedAll +@released */ +IMPORT_C void FepObserverHandleStartOfTransactionL(MCoeFepObserver& aFepObserver); + + +/** Abstract base class for all FEPs. + +FEP authors must derive a class from CCoeFep. The CCoeFep-derived class should +implement all of its pure virtual functions including the ones which CCoeFep +inherits from its base classes. For information on these functions, see the +documentation of the base classes. The global NewFepL() function is used to +create a fully initialised object of the derived class. + +FEPs that need to intercept key events should own a CCoeControl-derived object. +This object is referred to as the FEP control. The FEP control should +be added to the control stack at a priority of ECoeStackPriorityFep, so that +it receives first refusal of key events from the window server. + +In general, focus is retained by the underlying application. This has the +advantage that the user can see where the output produced by the FEP will +go. When focus is switched between controls, the FEP must be notified in case +the input capability of the focussed control changes. For instance, the FEP +needs to prevent the user composing a large amount of text only for it to +be passed to a newly focussed control that cannot accept text input. CCoeFep +derives from MCoeFocusObserver, which enables FEPs to receive notification +when the focus for the underlying control changes. The implementation of MCoeFocusObserver's +functions can call the enquiry functions of class TCoeInputCapabilities to +find out what input capabilities are supported by the new target control (you +need to get the TCoeInputCapabilities object from the application UI first: +see CCoeAppUi::InputCapabilities()). + +@see NewFepL() +@publishedAll +@released */ +class CCoeFep : public CBase, protected MFepAttributeStorer, public MCoeForegroundObserver, public MCoeFocusObserver, private MCoeMessageObserver + { +public: + /** Response to key or pointer event */ + enum TEventResponse + { + EEventWasNotConsumed, /** < Indicates that the FEP did not process the event. */ + EEventWasConsumed /** < Indicates that the FEP did process the event. */ + }; + + /** Enables FEPs to have some code called but not in the context of the current + call stack, hence the name "deferred". + + For an explanation of the intended use of this class, see + CCoeFep::MakeDeferredFunctionCall(). */ + class MDeferredFunctionCall + { + public: + /** This function is called from within a high-priority active object's RunL() + shortly after the active object has been queued by calling CCoeFep::MakeDeferredFunctionCall(). */ + virtual void ExecuteFunctionL()=0; + private: // reserved. do not override! + IMPORT_C virtual void MDeferredFunctionCall_Reserved_1(); + IMPORT_C virtual void MDeferredFunctionCall_Reserved_2(); + }; + + /** FEPs send character codes to the application underneath them using SimulateKeyEventsL(). + Occasionally a FEP may wish to also specify the modifiers (e.g. Fn, Ctrl, + Shift) to be sent with that character code. In this case, they should use + the overload of CCoeFep::SimulateKeyEventsL() which takes an array of MModifiedCharacters. */ + class MModifiedCharacter + { + public: + /** Returns the character code of the key combination. + + @return The character code of the key combination. */ + virtual TUint CharacterCode() const=0; + /** Returns a TUint which indicates which modifiers to override, rather than using + the current state of the keyboard's modifiers. + + @return The modifiers to override in the key combination. */ + virtual TUint ModifierMask() const=0; + /** Returns a TUint which indicates which of the modifiers specified in the mask + (returned by ModifierMask()) must be on and which must be off. + + @return Indicates which of the modifiers specified in the mask (returned by + ModifierMask()) must be on and which must be off. */ + virtual TUint ModifierValues() const=0; + private: // reserved. do not override! + IMPORT_C virtual void MModifiedCharacter_Reserved_1(); + IMPORT_C virtual void MModifiedCharacter_Reserved_2(); + }; + +public: + IMPORT_C virtual ~CCoeFep(); + IMPORT_C TBool IsSimulatingKeyEvent() const; + IMPORT_C TBool IsTurnedOnByL(const TKeyEvent& aKeyEvent) const; + IMPORT_C TBool IsTurnedOffByL(const TKeyEvent& aKeyEvent) const; +public: // new public virtual functions + /** Cancels the FEP transaction. + + A FEP transaction begins when an event is first intercepted by the FEP and + ends either when the processed text is committed to the application underneath, + or if it is cancelled. */ + virtual void CancelTransaction()=0; +public: + IMPORT_C void OnStartingHandlingKeyEvent_WithDownUpFilterLC(); + IMPORT_C void OnStartingHandlingKeyEvent_NoDownUpFilterLC(); + IMPORT_C TKeyResponse OnFinishingHandlingKeyEvent_WithDownUpFilterL(TEventCode aEventCode, const TKeyEvent& aKeyEvent, TKeyResponse aKeyResponse); + IMPORT_C TKeyResponse OnFinishingHandlingKeyEvent_NoDownUpFilterL(TEventCode aEventCode, const TKeyEvent& aKeyEvent, TKeyResponse aKeyResponse); +protected: + IMPORT_C CCoeFep(CCoeEnv& aConeEnvironment); + IMPORT_C void BaseConstructL(const CCoeFepParameters& aFepParameters); + IMPORT_C void ReadAllAttributesL(); + IMPORT_C void MakeDeferredFunctionCall(MDeferredFunctionCall& aDeferredFunctionCall); + IMPORT_C void SimulateKeyEventsL(const TArray& aArrayOfCharacters); + IMPORT_C void SimulateKeyEventsL(const TArray& aArrayOfModifiedCharacters); + IMPORT_C void WriteAttributeDataAndBroadcastL(TUid aAttributeUid); + IMPORT_C void WriteAttributeDataAndBroadcastL(const TArray& aAttributeUids); + IMPORT_C TBool IsOn() const; +public: // not for external use + void SetOnState(TBool aOnState); +private: + class CHighPriorityActive; + class CLowPriorityActive; + class CCoeFepExtra; +private: + void DoOnStartingHandlingKeyEventLC(TUint aFlagNoDownUpFilter); + TKeyResponse DoOnFinishingHandlingKeyEventL(TEventCode aEventCode, const TKeyEvent& aKeyEvent, TKeyResponse aKeyResponse); + static void TurnOffKeyEventHandlingFlags(TAny* aFlags); + // from MFepAttributeStorer + IMPORT_C virtual void MFepAttributeStorer_Reserved_1(); + IMPORT_C virtual void MFepAttributeStorer_Reserved_2(); + // from MCoeForegroundObserver + IMPORT_C virtual void MCoeForegroundObserver_Reserved_1(); + IMPORT_C virtual void MCoeForegroundObserver_Reserved_2(); + // from MCoeFocusObserver + IMPORT_C virtual void MCoeFocusObserver_Reserved_1(); + IMPORT_C virtual void MCoeFocusObserver_Reserved_2(); + // from MCoeMessageObserver + IMPORT_C virtual TMessageResponse HandleMessageL(TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, const TDesC8& aMessageParameters); + IMPORT_C virtual void MCoeMessageObserver_Reserved_1(); + IMPORT_C virtual void MCoeMessageObserver_Reserved_2(); + // new private virtual functions + /** Called to notify the FEP that it has either just been turned on or just been + turned off (it can find out which by calling CCoeFep::IsOn()). + + If FEPs want to change their appearance when they are off (e.g. make themselves + invisible), then they should implement this function accordingly. + + @publishedAll + @released */ + virtual void IsOnHasChangedState()=0; + + /** + @deprecated */ + virtual void OfferKeyEventL(TEventResponse& /*aEventResponse*/, const TKeyEvent& /*aKeyEvent*/, TEventCode /*aEventCode*/){}; + + /** + @deprecated */ + virtual void OfferPointerEventL(TEventResponse& /*aEventResponse*/, const TPointerEvent& /*aPointerEvent*/, const CCoeControl* /*aWindowOwningControl*/){}; + + /** + @deprecated */ + virtual void OfferPointerBufferReadyEventL(TEventResponse& /*aEventResponse*/, const CCoeControl* /*aWindowOwningControl*/){}; +private: // reserved. do not override! + IMPORT_C virtual void CCoeFep_Reserved_1(); + IMPORT_C virtual void CCoeFep_Reserved_2(); +private: + class SKeyEvent; + CCoeEnv& iConeEnvironment; + TUint iFlags; + CHighPriorityActive* iHighPriorityActive; + CCoeFepExtra* iExtra; + SKeyEvent* iLastKeyEvent; + TUint iSpare[13]; + }; + + +/** Specifies the mixin protocol for handling pointer events in inline text. + +This class should be overridden by front end processors which support inline editing. + +An instance of a class which implements this protocol should be passed to +MCoeFepAwareTextEditor::StartFepInlineEditL(). + +@publishedAll +@released */ +class MFepPointerEventHandlerDuringInlineEdit // to be overridden by inline-editing front-end processors + { +public: + /** This function is called when a pointer event is received within the inline + text. It may need to update the cursor position within the inline text and + do text selection in response to drag events. + + @param aType Pointer event types. + @param aModifiers Modifier keys (SHIFT, CTRL, FN etc.). + @param aPositionInInlineText The position at which the pointer event occurred, + as an offset from the start of the inline text string. */ + virtual void HandlePointerEventInInlineTextL(TPointerEvent::TType aType, TUint aModifiers, TInt aPositionInInlineText)=0; +private: // reserved. do not override! + IMPORT_C virtual void MFepPointerEventHandlerDuringInlineEdit_Reserved_1(); + IMPORT_C virtual void MFepPointerEventHandlerDuringInlineEdit_Reserved_2(); + }; + +class TCharFormat; +class TCursorSelection; +class MFormCustomDraw; +class MFepInlineTextFormatRetriever; +class MCoeFepAwareTextEditor_Extension1; + + +/** Specifies a protocol for FEP-aware text editors. + +TCoeInputCapabilities::FepAwareTextEditor() returns a pointer to an object +of this class. A NULL return value indicates that the interface is not supported +by any of the currently focused controls. + +Inline editing means composing text directly in the target text editor control +rather than in the FEP's edit window first. The target text editor must implement +the MCoeFepAwareTextEditor interface in order to support inline text. The +inline text may be differentiated from the surrounding text by the use of +different formatting. These differences are removed when the inline text transaction +is committed (causing the inline text to become a real part of the document). +Cancelling the inline text transaction deletes the inline text and restores +any previously selected text. A benefit of inline editing is that the user +only has to concentrate on one area of the screen rather than two. + +An inline editing transaction consists of the following sequence of function +calls: + +- a call to StartFepInlineEditL() + +- zero, one or more calls to UpdateFepInlineTextL() + +- a call to either CommitFepInlineEditL() or CancelFepInlineEdit() + +@publishedAll +@released */ +class MCoeFepAwareTextEditor // to be overridden by text-editors + { +public: + /** + Starts a FEP inline editing transaction. + + Inserts a descriptor containing the initial inline text into the text editor. + The inline text should normally replace any selected text. + + The final three parameters are instances of abstract classes, so that the + caller of this function must create and instantiate classes deriving from + them. These instances must remain in existence for the entire duration of + the inline editing transaction. + + Inline editing should not already be taking place when this function is called. + + @param aInitialInlineText The inline text to insert into the text editor. + @param aPositionOfInsertionPointInInlineText An insertion position within the + inline text. This is an offset from the start of the inline text. + @param aCursorVisibility ETrue for visible text cursor, EFalse for invisible + text cursor in the text editor. + @param aCustomDraw Pointer to a custom drawing object. May be used to do advanced + formatting of the inline text. This parameter is optional; a NULL pointer + may be specified. + @param aInlineTextFormatRetriever Defines a single member function, GetFormatOfFepInlineText() + which is used by the text editor to find out the formatting to apply to the + inline text. It is also possible to apply different formatting to different + parts of the inline text. + @param aPointerEventHandlerDuringInlineEdit Defines a single function, HandlePointerEventInInlineTextL() + which is called when a pointer event is received within the inline text. This + function might update the cursor position within the inline text and do text + selection. + */ + virtual void StartFepInlineEditL(const TDesC& aInitialInlineText, TInt aPositionOfInsertionPointInInlineText, + TBool aCursorVisibility, const MFormCustomDraw* aCustomDraw, MFepInlineTextFormatRetriever& aInlineTextFormatRetriever, + MFepPointerEventHandlerDuringInlineEdit& aPointerEventHandlerDuringInlineEdit)=0; + /** Updates the inline text. + + Called when a character is added to or deleted from the inline text. + + The descriptor aNewInlineText contains the entire new inline text string, + not just the new text to be combined with the old inline text. + + @param aNewInlineText Descriptor which holds the entire new inline text string. + @param aPositionOfInsertionPointInInlineText The position of the insertion + point (i.e. the cursor) within the inline text string aNewInlineText. This + is an offset from the start of the string. */ + virtual void UpdateFepInlineTextL(const TDesC& aNewInlineText, TInt aPositionOfInsertionPointInInlineText)=0; + /** Sets the visibility of the text cursor in the text editor. + + The cursor visibility is initialised using StartFepInlineEditL(). SetInlineEditingCursorVisibilityL() + is provided for FEPs which need to change the visibility of the cursor during + the inline editing transaction. + + @param aCursorVisibility ETrue for visible text cursor, EFalse for invisible + text cursor. */ + virtual void SetInlineEditingCursorVisibilityL(TBool aCursorVisibility)=0; + IMPORT_C void CommitFepInlineEditL(CCoeEnv& aConeEnvironment); + /** Cancels the inline editing transaction. + + The edit window should be rolled back to the state it was in before the FEP + transaction started, i.e. any inline text in the document which has not yet + been committed should be removed. If the inline text has replaced existing text, + (e.g. a selection) the replaced text should be reinstated. */ + virtual void CancelFepInlineEdit()=0; + // with regard to the behaviour of the following functions (except GetScreenCoordinatesForFepL), + // note that when inline editing, the contents of the editor will be such that the text constituting + // the selection immediately prior to inline editing will be replaced by the inline text + // (CancelFepInlineEdit reinstates the previous selection) + /** Returns the total number of characters in the text editor. + + @return The total number of characters in the text editor. */ + virtual TInt DocumentLengthForFep() const=0; + /** Returns the upper limit (if any) on the length of text that the text editor + can hold. + + @return The maximum number of characters that the text editor can hold. */ + virtual TInt DocumentMaximumLengthForFep() const=0; + /** Sets the range of characters in the text editor which should be selected. + + @param aCursorSelection Contains the cursor and anchor positions for the selection. */ + virtual void SetCursorSelectionForFepL(const TCursorSelection& aCursorSelection)=0; + /** Gets the range of characters in the text editor which are selected. + + @param aCursorSelection On return, contains the cursor and anchor positions + of the selection. */ + virtual void GetCursorSelectionForFep(TCursorSelection& aCursorSelection) const=0; + /** Copies a portion of the text editor's text content into a descriptor. + + @param aEditorContent A descriptor; on return contains a copy of a portion + of the text. + @param aDocumentPosition The document position in the text editor from which + to copy. + @param aLengthToRetrieve The number of characters to copy. */ + virtual void GetEditorContentForFep(TDes& aEditorContent, TInt aDocumentPosition, TInt aLengthToRetrieve) const=0; + /** Gets the character formatting which applies to the document position specified. + + This function allows FEPs to find out the ambient formatting so that the FEP + can choose a format for the inline text that will clearly differentiate it + from the surrounding text. + + @param aFormat On return, contains the character formatting which applies + to the character at aDocumentPosition. + @param aDocumentPosition The document position of interest. */ + virtual void GetFormatForFep(TCharFormat& aFormat, TInt aDocumentPosition) const=0; + /** Gets the x,y screen coordinates for the left hand side of the baseline of the + character located at a specified document position. + + Also gets the height (ascent + descent) and ascent of the font of the character. + This function could be used to position the FEP window as close as possible to + the insertion point in the text editor. + + @param aLeftSideOfBaseLine On return, contains the x,y coordinates of the + left side of the baseline of the character located at aDocumentPosition. + @param aHeight On return, contains the height (ascent + descent) of the font + of the character at aDocumentPosition. + @param aAscent On return, contains the ascent of the font of the character + at aDocumentPosition. + @param aDocumentPosition The document position of interest. */ + virtual void GetScreenCoordinatesForFepL(TPoint& aLeftSideOfBaseLine, TInt& aHeight, TInt& aAscent, TInt aDocumentPosition) const=0; + + IMPORT_C MCoeFepAwareTextEditor_Extension1* Extension1(); +private: + /** Private function called by CommitFepInlineEditL(). + + Implementations should commit the inline text to the document. This + ends the inline editing transaction and causes the inline text to + become a part of the document. + + @publishedAll + @released */ + virtual void DoCommitFepInlineEditL()=0; + IMPORT_C virtual MCoeFepAwareTextEditor_Extension1* Extension1(TBool& aSetToTrue); +private: // reserved. do not override! + IMPORT_C virtual void MCoeFepAwareTextEditor_Reserved_2(); + }; + + +class MLayDoc; + +/** +MCoeFepLayDocExtension is an interface class which should be derived from by test editors to +provide access to the current MLayDoc object, and to set a new MLayDoc object. +Used directly from the FEP to decorate the inline edit text, without changing +the actual document text. + +@publishedAll +@released +*/ +class MCoeFepLayDocExtension + { +public: + /** + Retrives the current MLayDoc object from the text editor + + @return Pointer to a MLayDoc object. + */ + virtual MLayDoc* GetCurrentMLayDoc() const = 0; + + /** + Sets a new MLayDoc object into the CTextLayout object + + @param aLayDoc The new layout document + */ + virtual void SetMLayDoc(MLayDoc* aLayDoc) = 0; + + /** + Retrives inline edit positioning information from the editor + @param "TInt& aPositionInDocument" Position of the text in the document + @param "TInt& aCursorPositionInDocument" Position of the cursor in the document + @param "TInt& aSelectionLength" The number of characters in the selected text + */ + virtual void GetFepEditorState(TInt& aPositionInDocument, TInt& aCursorPositionInDocument, TInt& aSelectionLength) = 0; + + /** + Used to tell the editor when the size of the inline edit has changed, so + the text layout can update itself. Should be called before and after the inline + edit has been decorated. + @param "TCursorSelection aSelection" Position of the line edit from the beginning of the text + @param "TInt aDeletedChars" Number of character deleted since the last time the text was formatted. + + */ + virtual void HandleInsertDeleteL(TCursorSelection aSelection,TInt aDeletedChars) = 0; +private: // reserved. do not override! + IMPORT_C virtual void MCoeFepLayDocExtension_Reserved_1(); + IMPORT_C virtual void MCoeFepLayDocExtension_Reserved_2(); + }; + + +/** An interface class which may be derived from by text editors to enable FEPs +to store state information inside the editor. +To be overridden by text-editors + +The CState class, defined within the scope of MCoeFepAwareTextEditor_Extension1 +represents the state information. This is information specific to the control +which is only of interest to the FEP. + +A class which implements this interface must implement the pure virtual functions +State() and SetStateTransferingOwnershipL() , to get and set the state. The +class should also implement the MCoeFepAwareTextEditor interface. It must +override the private virtual MCoeFepAwareTextEditor::Extension1() to return +a pointer to itself (the default implementation returns NULL). The private +virtual MCoeFepAwareTextEditor::Extension1() function is called by the public, +non-virtual MCoeFepAwareTextEditor::Extension1() function. + +For example, if a FEP wants to set some state information in a text editor +which is about to lose focus, the FEP should first call the editor's Extension1() +function. If this returns non-NULL, the FEP should call the editor's implementation +of SetStateTransferingOwnershipL() , passing in an object of a class derived +from CState , which holds the state information. It should also pass in a +UID which uniquely identifies the FEP. Later, when focus returns to the editor, +the FEP can call State() to retrieve the state information it previously set. +Note that CState has several reserved functions, to enable it to be extended +in future, while retaining backwards compatibility. + +@publishedAll +@released */ +class MCoeFepAwareTextEditor_Extension1 + { +public: + class CState : public CBase + /** State information for a text editor control. + This is information specific to the control which is only of interest to the + FEP which sets it. */ + { + protected: + IMPORT_C CState(); + IMPORT_C void BaseConstructL(); + public: + IMPORT_C virtual ~CState(); + private: // reserved. do not override! + IMPORT_C virtual void CState_Reserved_1(); + IMPORT_C virtual void CState_Reserved_2(); + IMPORT_C virtual void CState_Reserved_3(); + IMPORT_C virtual void CState_Reserved_4(); + private: + TAny* iSpareForFutureUse; + }; +public: + /** Sets state information in the text editor. + + This function must only transfer ownership of the state object after it has + successfully done everything that can leave. + + @param aState Pointer to the state information object. + @param aTypeSafetyUid A UID which uniquely identifies the FEP which is calling + this function. The text editor should store this value for use by the State() + function. */ + virtual void SetStateTransferingOwnershipL(CState* aState, TUid aTypeSafetyUid)=0; // this function must only transfer ownership after it has successfully done everything that can leave + /** Gets the state information previously set using SetStateTransferingOwnershipL(). + + This function does not transfer ownership. The function should first check + that aTypeSafetyUid matches the UID value previously specified by SetStateTransferingOwnershipL(). + If it doesn't match, the function should return NULL. + + @param aTypeSafetyUid A UID which uniquely identifies the FEP which is calling + this function. The purpose of this is to enable the FEP to safely downcast + the CState pointer returned by this function to a pointer to a derived class + known about by the FEP. + @return Pointer to the state information object. */ + virtual CState* State(TUid aTypeSafetyUid)=0; +public: + /** Updates the inline text. + + Called when a character is added to or deleted from the inline text. + + The descriptor aNewInlineText contains the entire new inline text string, + not just the new text to be combined with the old inline text. + + @param aSetToTrue Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that + this is the implemented version and not the previous reserved funtion. + @param aCursorSelection The position of any hilighted text. + @param aNewInlineText Descriptor which holds the entire new inline text string. + @param aPositionOfInsertionPointInInlineText + The position of the insertion point (i.e. the cursor) within the inline text string aNewInlineText. + This is an offset from the start of the string. + */ + IMPORT_C virtual void StartFepInlineEditL(TBool& aSetToTrue, const TCursorSelection& aCursorSelection, + const TDesC& aInitialInlineText, TInt aPositionOfInsertionPointInInlineText, TBool aCursorVisibility, + const MFormCustomDraw* aCustomDraw, MFepInlineTextFormatRetriever& aInlineTextFormatRetriever, + MFepPointerEventHandlerDuringInlineEdit& aPointerEventHandlerDuringInlineEdit); + + /** Changes the cursor displayed to indicate different modes of operation. For example how text is enterered + @param aSetToTrue Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that + this is the implemented version and not the previously reserved funtion. + @param aTextCursor The new cursor to be displayed. + */ + IMPORT_C virtual void SetCursorType(TBool& aSetToTrue, const TTextCursor& aTextCursor); + + /** + Retrieves the current MCoeFepLayDocExtension object from the text editor + @param aSetToTrue Boolean set to EFalse by the caller and subsequently to ETrue by the function indicating that + this is the implemented version and not the previously reserved funtion. + */ + IMPORT_C virtual MCoeFepLayDocExtension* GetFepLayDocExtension(TBool& aSetToTrue); +private: // reserved. do not override! + IMPORT_C virtual void MCoeFepAwareTextEditor_Extension1_Reserved_4(); + }; + + +/** Retrieves a control's caption for use by a FEP. + +An example of a caption is the non-editable text description displayed +alongside each item in a dialog. + +TCoeInputCapabilities::CaptionRetrieverForFep() returns a pointer to an object +of this class. A NULL return value indicates that the interface is not supported +by any of the currently focused controls. If not NULL, call GetCaptionForFep(), +which fills the supplied buffer with the control's caption, truncating it +if the supplied buffer is too small for the whole caption. + +@publishedAll +@released */ +class MCoeCaptionRetrieverForFep // to be overridden by captioned-controls + { +public: + /** An implementation of this function should fill aCaption with the target control's + caption (or as much of the caption as will fit). + + For example, code similar to the following might be used (assuming that your caption is + stored internally in iCaption): + + @code + const TInt maximumLength=aCaption.MaxLength(); + if (iCaption.Length()>maximumLength) + aCaption=iCaption.Left(maximumLength); + else + aCaption=iCaption; + + @endcode + @param aCaption On return, this should be set to the caption of the target + control. */ + virtual void GetCaptionForFep(TDes& aCaption) const=0; // gets as much as will fit in aCaption +private: // reserved. do not override! + IMPORT_C virtual void MCoeCaptionRetrieverForFep_Reserved_1(); + IMPORT_C virtual void MCoeCaptionRetrieverForFep_Reserved_2(); + }; + +#endif // __FEPBASE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/fepbconfig.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/fepbconfig.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,226 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __FEPBCONFIG_H__ +#define __FEPBCONFIG_H__ + +#include +#include // class CCoeEnv + +class CRepository; + +/** Specifies the maximum size of a FEP attribute in bytes. + +@publishedAll +@released */ +const TInt KCoeFepMaxAttribDataSize = 200; + + +/** On or off key data for FEPs. + +The CCoeFep class uses instances of this class to specify the key combination which +is used to turn the FEP on and off. These values are initialised during construction +of the FEP (see CCoeFep::BaseConstructL()). + +The class consists of three TUints. They represent: + +- the character code of the key combination + +- a modifier mask which indicates which modifiers are relevant to the key combination + +- the modifier values which indicate which of the modifiers specified in the +modifier mask must be on and which must be off + +For example, if the key combination to turn the FEP off is Fn+Enter, where +the Shift modifier must not be down (and the state of all other modifiers +is irrelevant), the TFepOnOrOffKeyData object would be constructed as follows: + +@code +TFepOnOrOffKeyData(EKeyEnter, EModifierFunc|EModifierShift, EModifierFunc) +@endcode + +Note that modifiers should not be set in the values if they are not also set +in the mask. + +@publishedAll +@released */ +class TFepOnOrOffKeyData + { +public: + inline TFepOnOrOffKeyData(TUint aCharacterCodeForFoldedMatch, TUint aModifierMask, TUint aModifierValues) :iCharacterCodeForFoldedMatch(aCharacterCodeForFoldedMatch), iModifierMask(aModifierMask), iModifierValues(aModifierValues) + /** The C++ constructor is used to construct the key data object with the character + code, the modifier mask and the modifier values. + + @param aCharacterCodeForFoldedMatch The character code. + @param aModifierMask The modifier mask. + @param aModifierValues The modifier values. */ + {} + + inline TUint CharacterCodeForFoldedMatch() const + /** Gets the character code. + + @return The character code. */ + {return iCharacterCodeForFoldedMatch;} + inline TUint ModifierMask() const + /** Gets the modifier mask. + + @return The modifier mask. */ + {return iModifierMask;} + inline TUint ModifierValues() const + /** Gets the modifier values. + + @return The modifier values. */ + {return iModifierValues;} + /** + Checks if 2 TFepOnOrOffKeyData objects have the same values. + + returns Etrue if the 2 objects have the same values, EFalse otherwise + */ + IMPORT_C TBool operator==(const TFepOnOrOffKeyData& aAnother) const; + + + /** + Checks if 2 TFepOnOrOffKeyData objects do not have the the same values. + + returns Etrue if the 2 objects have the same values, EFalse otherwise + */ + IMPORT_C TBool operator!=(const TFepOnOrOffKeyData& aAnother) const; +private: + TUint iCharacterCodeForFoldedMatch; + TUint iModifierMask; + TUint iModifierValues; + }; + +class CDictionaryStore; +class RWriteStream; +class RReadStream; + + +/** Reads and writes generic FEP settings. + +Used by the CCoeFep class. The generic FEP settings are whether the FEP is +on or off and what key combinations should turn the FEP on or off. Also used +to synchronise these settings across all running instances of the FEP. These +settings are generic, unlike FEP attributes which are FEP-specific. FEP attributes +are stored, restored and synchronised using class MFepAttributeStorer. Generic +FEP settings are changed locally using the Set...() member functions. Then, +to store these as the system settings and to apply them globally, call StoreChangesAndBroadcastL(). + +Class CCoeFep initialises its generic FEP settings from the global system +settings during construction. Its generic FEP settings are updated when the +settings are changed by a call to StoreChangesAndBroadcastL() by another running +instance of the FEP. + +@publishedAll +@released */ +class CFepGenericGlobalSettings : public CBase + { +public: + IMPORT_C static CFepGenericGlobalSettings* NewL(CCoeEnv& aConeEnvironment, const TFepOnOrOffKeyData& aDefaultOnKeyData, const TFepOnOrOffKeyData& aDefaultOffKeyData, TBool aDefaultIsOn); + IMPORT_C static CFepGenericGlobalSettings* NewLC(CCoeEnv& aConeEnvironment, const TFepOnOrOffKeyData& aDefaultOnKeyData, const TFepOnOrOffKeyData& aDefaultOffKeyData, TBool aDefaultIsOn); + IMPORT_C static CFepGenericGlobalSettings* NewL(); + IMPORT_C static CFepGenericGlobalSettings* NewLC(); + IMPORT_C TFepOnOrOffKeyData OnKeyData() const; + IMPORT_C void SetOnKeyData(const TFepOnOrOffKeyData& aOnKeyData); + IMPORT_C TFepOnOrOffKeyData OffKeyData() const; + IMPORT_C void SetOffKeyData(const TFepOnOrOffKeyData& aOffKeyData); + IMPORT_C TBool IsOn() const; + IMPORT_C void SetIsOn(TBool aIsOn); + IMPORT_C void StoreChangesAndBroadcastL(); + IMPORT_C void RefreshL(); +public: // not for external use + IMPORT_C static void ReadOnState(CRepository& aRepository, TBool& aOnState, TInt* aError=NULL); + IMPORT_C static void ReadOnOrOffKeyData(CRepository& aRepository, TFepOnOrOffKeyData& aOnOrOffKeyData, TUint32 aRepositoryKeyMask_OnOrOff, TInt* aError=NULL); + IMPORT_C static void WriteOnStateAndBroadcastL(CRepository& aRepository, TBool aOnState, TUint32 aRepositoryKeyMask_DefaultOrDynamic); + IMPORT_C static void WriteOnOrOffKeyDataAndBroadcastL(CRepository& aRepository, const TFepOnOrOffKeyData& aOnOrOffKeyData, TUint32 aRepositoryKey); +private: + CFepGenericGlobalSettings(); + void ConstructL(); +private: + enum + { + EFlagIsOn =0x00000001, + // the EFlagStoreXxx flags below indicate whether this object has had any SetXxx functions called on it, which can be used to optimize what work StoreChangesAndBroadcastL has to do + EFlagStoreIsOn =0x00000002, + EFlagStoreOnKeyData =0x00000004, + EFlagStoreOffKeyData =0x00000008 + }; +private: + TUint iFlags; + TFepOnOrOffKeyData iOnKeyData; + TFepOnOrOffKeyData iOffKeyData; + }; + + +/** Protocol for storing, restoring and synchronising FEP attributes. + +An abstract base class for CCoeFep, so FEPs must implement the pure virtual +functions declared in this class. + +Rather than using a single device-wide instance of a FEP, each application +has its own instance of the FEP. MFepAttributeStorer provides a framework +for synchronising FEP attributes across each running instance of the same +FEP. For this to happen, the FEP must implement MFepAttributeStorer::WriteAttributeDataToStreamL() +and MFepAttributeStorer::ReadAttributeDataFromStreamL(). + +Attributes are FEP-specific, and are identified by a UID which can be accessed +using AttributeAtIndex(). An example of a FEP attribute might be whether inline +editing is enabled or disabled. + +@publishedAll +@released */ +class MFepAttributeStorer + { +public: + IMPORT_C void ReadAllAttributesL(CCoeEnv& aConeEnvironment); + IMPORT_C void WriteAttributeDataAndBroadcastL(CCoeEnv& aConeEnvironment, TUid aAttributeUid); + IMPORT_C void WriteAttributeDataAndBroadcastL(CCoeEnv& aConeEnvironment, const TArray& aAttributeUids); + /** Returns the total number of FEP attributes. + + @return The number of FEP attributes. */ + virtual TInt NumberOfAttributes() const=0; + /** Returns the UID of the FEP attribute at the index specified. + + @param aIndex An array index. + @return The UID of the FEP attribute at aIndex. */ + virtual TUid AttributeAtIndex(TInt aIndex) const=0; + /** Writes the value of the attribute specified to the specified write stream. + + Called by MFepAttributeStorer::WriteAttributeDataAndBroadcastL() for each + attribute passed to it. + + @param aAttributeUid UID of the attribute to write to the stream. + @param aStream The stream to which to write the attribute. */ + virtual void WriteAttributeDataToStreamL(TUid aAttributeUid, RWriteStream& aStream) const=0; + /** Reads the value of the attribute identified by the UID specified in aAttributeUid + from the specified read stream. + + You should take appropriate action if the attribute has changed, e.g. + if inline editing has been disabled, you might cancel the current transaction. + + This function is called by MFepAttributeStorer::ReadAllAttributesL() for all + attributes. It is also called when the FEP receives a message that an attribute + has been changed by another running instance of the FEP (using WriteAttributeDataAndBroadcastL()). + + @param aAttributeUid Identifies the attribute whose value should be read. + @param aStream Read stream from which to read the attribute's value. */ + virtual void ReadAttributeDataFromStreamL(TUid aAttributeUid, RReadStream& aStream)=0; +private: + IMPORT_C virtual void MFepAttributeStorer_Reserved_1(); + IMPORT_C virtual void MFepAttributeStorer_Reserved_2(); + TInt NumberOfOccurrencesOfAttributeUid(TUid aAttributeUid) const; + }; + +#endif // __FEPBCONFIG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/fepbutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/fepbutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,137 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __FEPBUTILS_H__ +#define __FEPBUTILS_H__ + + + + +/** Macro to be called by a keyboard-based FEP at the start of its CCoeControl::OfferKeyEventL()-overriding +function. + +It causes key up and key down events to be consumed so that the FEP only receives +standard key events (of type EEventKey, see the TEventCode enumeration). It +also causes key events that turn the FEP on or off to be consumed. If the +FEP is simulating key events, or is off, no key events are consumed (so that +all are passed on to the underlying application) and the macro returns with +EKeyWasNotConsumed. + +This should be the first thing called in the OfferKeyEventL() function. The +FEP_END_KEY_EVENT_HANDLER_L macro should be used to return from the function. + +@param aFep The CCoeFep object, should not be a pointer +@param aKeyEvent The TKeyEvent object from OfferKeyEventL() +@param aEventCode The TEventCode object from OfferKeyEventL() + +@see TEventCode +@publishedAll +@released */ +#define FEP_START_KEY_EVENT_HANDLER_L(aFep, aKeyEvent, aEventCode)\ + {\ + if ((aFep).IsSimulatingKeyEvent())\ + {\ + return EKeyWasNotConsumed;\ + }\ + (aFep).OnStartingHandlingKeyEvent_WithDownUpFilterLC();\ + if (((aEventCode)!=EEventKey))\ + {\ + return (aFep).OnFinishingHandlingKeyEvent_WithDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasConsumed);\ + }\ + if (!(aFep).IsOn())\ + {\ + return (aFep).OnFinishingHandlingKeyEvent_WithDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasNotConsumed);\ + }\ + } + +/** Macro to be called by a keyboard-based FEP to return from its CCoeControl::OfferKeyEventL()-overriding +function. + +It should be used instead of the return statement. It should only be used +if the FEP_START_KEY_EVENT_HANDLER_L macro was used at the start of the function. + +@param aFep The CCoeFep object, should not be a pointer +@param aKeyEvent The TKeyEvent object from OfferKeyEventL() +@param aKeyResponse Defined in EPOC32\INCLUDE\COEDEF.H + If set to EKeyWasNotConsumed, allows the key event to reach the underlying application. + If set to EKeyWasConsumed, prevents the key event reaching the underlying application. + +@publishedAll +@released */ +#define FEP_END_KEY_EVENT_HANDLER_L(aFep, aKeyEvent, aKeyResponse)\ + {\ + return (aFep).OnFinishingHandlingKeyEvent_WithDownUpFilterL(EEventKey, (aKeyEvent), (aKeyResponse));\ + } + +/** Macro to be called by a keyboard-based FEP at the start of its CCoeControl::OfferKeyEventL()-overriding +function. + +It causes events that turn the FEP on or off to be consumed. This variant +of the macro ignores key up and key down events so that it should be used +in preference to FEP_START_KEY_EVENT_HANDLER_L in the rare cases where the +FEP wishes to handle EEventKeyDown or EEventKeyUp events. If the FEP is simulating +key events, or is off, no key events are consumed and OfferKeyEventL() returns +with EKeyWasNotConsumed. + +This should be the first thing called in the OfferKeyEventL() function. The +FEP_END_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L macro should be used to return +from the function. + +@param aFep The CCoeFep object, should not be a pointer +@param aKeyEvent The TKeyEvent object from OfferKeyEventL() +@param aEventCode The TEventCode object from OfferKeyEventL() + +@publishedAll +@released */ +#define FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L(aFep, aKeyEvent, aEventCode)\ + {\ + if ((aFep).IsSimulatingKeyEvent())\ + {\ + return EKeyWasNotConsumed;\ + }\ + (aFep).OnStartingHandlingKeyEvent_NoDownUpFilterLC();\ + if ((aEventCode)==EEventKey)\ + {\ + if (!(aFep).IsOn())\ + {\ + return (aFep).OnFinishingHandlingKeyEvent_NoDownUpFilterL((aEventCode), (aKeyEvent), EKeyWasNotConsumed);\ + }\ + }\ + } + +/** Macro to be called by a keyboard-based FEP to return from its CCoeControl::OfferKeyEventL()-overriding +function. + +It should be used instead of the return statement. This variant of the macro +should only be used if the FEP_START_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L +macro was used at the start of the function. + +@param aFep The CCoeFep object, should not be a pointer +@param aKeyEvent The TKeyEvent object from OfferKeyEventL() +@param aEventCode The TEventCode object from OfferKeyEventL() +@param aKeyResponse Defined in EPOC32\INCLUDE\COEDEF. + If set to EKeyWasNotConsumed, allows the key event to reach the underlying application. + If set to EKeyWasConsumed, prevents the key event reaching the underlying application. + +@publishedAll +@released */ +#define FEP_END_KEY_EVENT_HANDLER_NO_DOWN_UP_FILTER_L(aFep, aKeyEvent, aEventCode, aKeyResponse)\ + {\ + return (aFep).OnFinishingHandlingKeyEvent_NoDownUpFilterL((aEventCode), (aKeyEvent), (aKeyResponse));\ + } + + + +#endif // __FEPBUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/fepplugin.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/fepplugin.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __FEPPLUGIN_H__ +#define __FEPPLUGIN_H__ + +#include + +class CCoeEnv; +class CCoeFep; +class CCoeFepParameters; + +const TUid KUidFepPluginInterface = { 0x1020233F }; + +/** +CCoeFepPlugIn +Abstract base class for FEP plug ins +@publishedAll +@released +*/ +class CCoeFepPlugIn : public CBase + { +public: + inline static CCoeFepPlugIn* NewL(TUid aFepUid); + virtual ~CCoeFepPlugIn(); +public: + /** Creates a fully constructed object of CCoeFEP. + + @param aConeEnvironment A reference to the application's control environment. + @param aFepParameters FEP parameters. + @return A pointer to the newly created object. + */ + virtual CCoeFep* NewFepL(CCoeEnv& aConeEnvironment, const CCoeFepParameters& aFepParameters) = 0; + + /** Runs the FEP settings dialog. + + @param aConeEnvironment A reference to the application's control environment. + */ + virtual void SynchronouslyExecuteSettingsDialogL(CCoeEnv& aConeEnvironment) = 0; + +private: + TUid iDtorTag; + }; + +#include + +#endif // __FEPPLUGIN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/fepplugin.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/fepplugin.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __FEPPLUGIN_INL__ +#define __FEPPLUGIN_INL__ + +#include + +/** +Factory function to create and return a FEP plug-in with the specified UID. + +@return A FEP plug-in object instance corresponding to the UID provided +@param aFepUid The UID of the FEP plug-in implementation to be loaded +*/ +inline CCoeFepPlugIn* CCoeFepPlugIn::NewL(TUid aFepUid) + { // static + TAny* any = REComSession::CreateImplementationL(aFepUid, _FOFF(CCoeFepPlugIn, iDtorTag)); + CCoeFepPlugIn* feppi = reinterpret_cast(any); + return feppi; + } + +/** +Destructor that destroys the FEP plug-in. +*/ +inline CCoeFepPlugIn::~CCoeFepPlugIn() + { + REComSession::DestroyedImplementation(iDtorTag); + } + + +#endif // __FEPPLUGIN_INL__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/grdcells.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/grdcells.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GRDCELLS_H__) +#define __GRDCELLS_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__BACELL_H__) +#include +#endif + + + +class CGridCellRegion : public CBase +/** Defines a selected region. + +A selected region consists of one or more cell ranges, represented by TRangeRef +objects, that exist within a defined boundary. The boundary is itself defined +as a cell range. + +Cell ranges map cell selections, and the class provides the behaviour to manage +these selections. + +@publishedAll +@released */ + { +public: + IMPORT_C static CGridCellRegion* NewL(const TRangeRef& aBounds); + IMPORT_C virtual ~CGridCellRegion(); + IMPORT_C void AddColL(TInt aCol); + IMPORT_C void AddRowL(TInt aRow); + IMPORT_C void AddCellRangeL(const TRangeRef& aCellRange); + IMPORT_C void SetLastCellRange(const TRangeRef& aCellRange); + IMPORT_C void ResizeBounds(const TCellRef& aNewToBounds); + IMPORT_C void Reset(); + IMPORT_C TInt Count() const; + IMPORT_C TBool IsCellSelected(const TCellRef &aCell) const; + IMPORT_C TBool IsCellSelected(const TCellRef &aCell,TInt aIndex) const; + IMPORT_C TBool IsCellSelectedLastIndex(const TCellRef &aCell) const; + IMPORT_C TBool IsRowSelected(TInt aRow) const; + IMPORT_C TBool IsRowSelected(TInt aRow,TInt aIndex) const; + IMPORT_C TBool IsRowSelectedLastIndex(TInt aRow) const; + IMPORT_C TBool IsAnyRowSelected() const; + IMPORT_C TBool IsColSelected(TInt aCol) const; + IMPORT_C TBool IsColSelected(TInt aCol,TInt aIndex) const; + IMPORT_C TBool IsColSelectedLastIndex(TInt aCol) const; + IMPORT_C TBool IsAnyColSelected() const; + IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange) const; + IMPORT_C TBool IsRangeSelected(const TRangeRef &aRange,TInt aIndex) const; + IMPORT_C TBool IsRangeSelectedLastIndex(const TRangeRef &aRange) const; + IMPORT_C TRangeRef operator[](TInt aIndex) const; + IMPORT_C const CArrayFix* RangeList() const; +private: + CGridCellRegion(const TRangeRef& aBounds); + void ConstructL(); +private: + TRangeRef iBounds; + CArrayFix* iRangeList; + }; +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/grddef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/grddef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,62 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Some standard definitions used in GRID +// +// + +#if !defined(__GRDDEF_H__) +#define __GRDDEF_H__ + +/** Defines the direction and the amount by which a +cursor is to move, when performing a scrolling operation. +@publishedAll +@released +@see CGridLay::PageScroll() +@see CGridImg::MoveCursorL() */ +enum TMoveDirectionAndAmount + { + /** Move up by one row. */ + EMoveRowUp, + /** Move down by one row. */ + EMoveRowDown, + /** Move left by one column. */ + EMoveColumnLeft, + /** Move right by one column. */ + EMoveColumnRight, + /** Move up by one page. */ + EMovePageUp, + /** Move down by one page. */ + EMovePageDown, + /** Move left by one page. */ + EMovePageLeft, + /** Move right by one page. */ + EMovePageRight, + /** Move to the start of the row. */ + EMoveRowStart, + /** Move to the end of the row */ + EMoveRowEnd, + /** Move to the home position. */ + EMoveHome, + /** Move to the end position. */ + EMoveEnd, + /** Do not move the cursor. */ + EMoveNone, + /** Move to the start of the column. */ + EMoveColumnStart, + /** Move to the end of the column. */ + EMoveColumnEnd + }; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/grdprint.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/grdprint.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,64 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GRDPRINT_H__) +#define __GRDPRINT_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__GRDSTD_H__) +#include +#endif + + + +class CGridPrinter : public CBase, public MPageRegionPrinter +/** Handles printing and print preview functionality for grid. +@publishedAll +@released */ + { +public: + IMPORT_C static CGridPrinter* NewL(CGridLay* aGridLay,CGridLabelImg* aPrintLabelImg, + CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor); + IMPORT_C virtual ~CGridPrinter(); + inline void SetRealPrintingDeviceMap(const MGraphicsDeviceMap* aGraphicsDeviceMap); + IMPORT_C void SetTopLeftMargin(const TPoint& aTlMarginInTwips); + IMPORT_C void SetPageSizeInTwipsL(const TSize& aSizeInTwips); + IMPORT_C void PaginateL(); + inline CGridLay& GridLay(); +public: // from MPageRegionPrinter + IMPORT_C virtual void PrintBandL(CGraphicsDevice* aDevice,TInt aPageNo,const TBandAttributes& aBandInPixels); +private: + CGridPrinter(CGridLabelImg* aPrintLabelImg,CGridCellImg* aPrintCellImg,TZoomFactor* aZoomFactor); + void ConstructL(CGridLay* aGridLay); + void SetGdMapAndPushLabelImgLC(); +private: + CGridLay* iGridLay; + CGridImg* iGridImg; + CGridLabelImg* iPrintLabelImg; + CGridCellImg* iPrintCellImg; + TZoomFactor* iZoomFactor; + const MGraphicsDeviceMap* iGraphicsDeviceMap; + TPoint iTlMarginInTwips; + TRect iPrintablePage; + TInt iScaleFactor; + }; + +#include +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/grdprint.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/grdprint.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +inline void CGridPrinter::SetRealPrintingDeviceMap(const MGraphicsDeviceMap* aGraphicsDeviceMap) +/** Supplies the object that deals with the mapping between twips and device-specific +units for a specific printer. + +@param aGraphicsDeviceMap The interface object for mapping between twips and +device-specific units. */ + { + iGraphicsDeviceMap=aGraphicsDeviceMap; + } + +inline CGridLay& CGridPrinter::GridLay() +/** Gets the grid layout used by this printing object. + +Note that this is not the same object passed to CGridPrinter::NewL(). Internally, +the class creates its own CGridLay object from the information supplied in the +CGridLay object passed to CGridPrinter::NewL(). + +@return The grid layout object. */ + { + return *iGridLay; + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/grdstd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/grdstd.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,753 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GRDSTD_H__) +#define __GRDSTD_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__GRDCELLS_H__) +#include +#endif +#if !defined(__GRDDEF_H__) +#include +#endif + + + +class MGridTable +/** An interface that can be implemented to provide row and column information. + +Note that for grids that have indefinite row boundaries, an implementation +is mandatory. + +A concrete implementation is passed to a CGridLay object through its CGridLay::ConstructL() +functions or its CGridLay::SetGridTable() function. + +@publishedAll +@released */ + { +public: + enum + { + /** The number of rows returned by the default implementation of RowExtent(). */ + EDefaultRowExtent=20, + /** The number of columns returned by the default implementation of ColumnExtent(). */ + EDefaultColumnExtent=20 + }; +public: + IMPORT_C virtual TBool RequestRow(TInt aRow,TInt& aReturnRow) const;//If used should be derived from + IMPORT_C virtual TInt RowExtent() const; + IMPORT_C virtual TInt ColumnExtent() const; + }; + + +////////////////////////-> + +class TGridColors +/** The grid colour specification. + +An object of this type encapsulates the colours to be used when drawing a +grid cell. + +@publishedAll +@released +@see CGridLabelImg */ + { +public: + IMPORT_C TGridColors(); + IMPORT_C TGridColors(TRgb aForeground, TRgb aBackground, TRgb aLines, TRgb aLabelSeparators); +public: + /** The foreground colour. */ + TRgb iForeground; + /** The background colour. */ + TRgb iBackground; + /** The colour of lines. */ + TRgb iLines; + /** The colour of label separators. */ + TRgb iLabelSeparators; +// TRgb iEdge; + }; +////////////////////////-> + + +class RReadStream; +class RWriteStream; +class CStreamStore; +class CGridImg; +class CSparseMap; + + +class CGridLay : public CBase +/** Handles the layout of a grid, and controls how columns, rows and selections +appear. + +@publishedAll +@released */ + { + friend class CGridImg; +public: + /** Defines the order in which pages are printed. */ + enum TPageOrder + { + /** All pages in a horizontal line are drawn before starting on the next horizontal + line. */ + ERightThenDown, + /** All pages in a vertical line are drawn before starting on the next vertical + line to the right. */ + EDownThenRight + }; + /** Indicates whether the size of the grid should be adjusted when columns and + rows are inserted or deleted. */ + enum TFixGridRange + { + /** The grid range should not be adjusted on insertion or deletion of rows and/or columns. */ + EFixGridRange, + /** The grid range can be adjusted on insertion or deletion of rows and/or columns. */ + EAdjustGridRange + }; +public: + IMPORT_C CGridLay(MGraphicsDeviceMap* aGraphicsDeviceMap); + IMPORT_C void ConstructL(CGridLay* aGridLay,CGridImg* aGridImg);//Constructs Partial Copy + IMPORT_C void ConstructL(const MGridTable *aGridTable,CGridImg *aGridImg,TInt aNoOfRows,TInt aNoOfCols); + IMPORT_C void ConstructL(const MGridTable *aGridTable,CGridImg *aGridImg,TInt aNoOfCols); + IMPORT_C virtual ~CGridLay(); + + IMPORT_C TPoint PageScroll(TMoveDirectionAndAmount aPageScroll); + IMPORT_C TPoint ExposeCell(const TCellRef &aCell); + IMPORT_C TPoint ExposeCellToTopLeft(const TCellRef &aCell); + + IMPORT_C void SetGridImgL(CGridImg* aGridImg); + inline void SetGridTable(const MGridTable* aGridTable); + inline TRangeRef VisibleRange() const; + IMPORT_C void SetVisibleRange(const TCellRef& aTopLeftCell); + inline TRangeRef TitleRange() const; + inline TRangeRef GridRange() const; + IMPORT_C void SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap); + IMPORT_C void SetGridToDefault(); + + IMPORT_C TInt ColumnWidthInTwips(TInt aCol) const; + IMPORT_C void SetColumnWidthInTwipsL(TInt aCol,TInt aWidthInTwips); + IMPORT_C TInt SetColumnWidthInTwipsL(TInt aStartCol,TInt aEndCol,TInt aWidthInTwips); + IMPORT_C TInt DefaultColumnWidthInTwips() const; + IMPORT_C void SetDefaultColumnWidthInTwips(TInt aWidthInTwips); + IMPORT_C void SetColumnWidthsToDefault(); + IMPORT_C TInt MinColumnWidthInPixels() const; + IMPORT_C void SetMinColumnWidthInPixels(TInt aWidthInPixels); + IMPORT_C TInt ColumnWidthOfSelectedInTwips() const; + IMPORT_C void SetColumnWidthOfSelectedInTwipsL(TInt aWidthInTwips); + IMPORT_C TInt RowHeightInTwips(TInt aRow) const; + IMPORT_C void SetRowHeightInTwipsL(TInt aRow,TInt aHeightInTwips); + IMPORT_C TInt SetRowHeightInTwipsL(TInt aStartRow,TInt aEndRow,TInt aHeightInTwips); + IMPORT_C TInt DefaultRowHeightInTwips() const; + IMPORT_C void SetDefaultRowHeightInTwips(TInt aHeightInTwips); + IMPORT_C void SetRowHeightsToDefault(); + IMPORT_C TInt MinRowHeightInPixels() const; + IMPORT_C void SetMinRowHeightInPixels(TInt aHeightInPixels); + IMPORT_C TInt RowHeightOfSelectedInTwips() const; + IMPORT_C void SetRowHeightOfSelectedInTwipsL(TInt aHeightInTwips); + IMPORT_C void RecalcPixelSparseMaps(); + IMPORT_C void InsertDeleteColumns(TInt aStartCol,TInt aNoOfCols, + TFixGridRange aFixGridRange=EFixGridRange); + IMPORT_C void InsertDeleteRows(TInt aStartRow,TInt aNoOfRows, + TFixGridRange aFixGridRange=EFixGridRange); + + inline TBool IsSideLabels() const; + IMPORT_C void SetSideLabels(TBool aState); + inline TBool IsTopLabels() const; + IMPORT_C void SetTopLabels(TBool aState); + inline TBool IsVerticalGridLines() const; + IMPORT_C void SetVerticalGridLines(TBool aState); + inline TBool IsHorizontalGridLines() const; + IMPORT_C void SetHorizontalGridLines(TBool aState); + inline TBool IsGridLabelSeparators() const; + IMPORT_C void SetGridLabelSeparators(TBool aState); + inline TBool IsColumnBursting() const; + IMPORT_C void SetColumnBursting(TBool aState); + inline TBool IsCursorVisible() const; + IMPORT_C void SetCursorVisible(TBool aVisible); + inline TBool IsHighlightVisible() const; + IMPORT_C void SetHighlightVisible(TBool aVisible); + inline TBool IsRowPermanentlySelected() const; + IMPORT_C void SetRowPermanentlySelectedL(TBool aState); + inline TBool IsTitleLines() const; + inline TBool IsHorizontalTitleLine() const; + inline TBool IsVerticalTitleLine() const; + IMPORT_C void SetTitleLinesL(TBool aState); + IMPORT_C void SetTitleLinesL(const TCellRef& aCellRef); + IMPORT_C void ToggleTitleLinesL(); + inline TBool IsIndefiniteRowBoundaries() const; + inline TBool IsUniformRowHeight() const; + IMPORT_C void SetUniformRowHeight(TBool aState); + inline TBool IsUniformColumnWidth() const; + IMPORT_C void SetUniformColumnWidth(TBool aState); + inline TBool IsTopLabelDragDisabled() const; + IMPORT_C void SetTopLabelDragDisabled(TBool aState); + inline TBool IsSideLabelDragDisabled() const; + IMPORT_C void SetSideLabelDragDisabled(TBool aState); + inline TBool IsPrintedLabels() const; + IMPORT_C void SetPrintedLabels(TBool aState); + inline TBool IsPrintedGridLines() const; + IMPORT_C void SetPrintedGridLines(TBool aState); + inline TBool IsEncroachingCellBorders() const; + IMPORT_C void SetEncroachingCellBorders(TBool aState); + inline TBool IsRowSelectionDisabled() const; + IMPORT_C void SetRowSelectionDisabled(TBool aState); + inline TBool IsColumnSelectionDisabled() const; + IMPORT_C void SetColumnSelectionDisabled(TBool aState); + inline TBool IsAutoClearGridCells() const; + IMPORT_C void SetAutoClearGridCells(TBool aState); + inline TBool IsPageBreakLinesHidden() const; + IMPORT_C void SetPageBreakLinesHidden(TBool aState); + inline TBool HasChanged() const; + inline void SetHasChanged(TBool aHasChanged); + inline void SetGridEdgeColor(TRgb aColor); + + IMPORT_C TInt MinVisibleFromRow() const; + IMPORT_C TInt MinVisibleFromColumn() const; + IMPORT_C void ResetVisibleToRow(); + IMPORT_C void ResetVisibleToColumn(); + IMPORT_C void ResetVisibleToCell(); + IMPORT_C TInt RowExtent() const; + IMPORT_C TInt ColumnExtent() const; + + IMPORT_C TInt RowToYVal(TInt aRow) const; + IMPORT_C TInt RowToYVal(TInt aStartRow,TInt aEndRow) const; + IMPORT_C TInt VisibleRowToYVal(TInt aRow) const; + IMPORT_C TInt TitleRowToYVal(TInt aTitleRow) const; + IMPORT_C TInt ColumnToXVal(TInt aCol) const; + IMPORT_C TInt ColumnToXVal(TInt aStartCol,TInt aEndCol) const; + IMPORT_C TInt VisibleColumnToXVal(TInt aCol) const; + IMPORT_C TInt TitleColumnToXVal(TInt aTitleCol) const; + IMPORT_C TInt YValToRow(TInt aYVal) const; + IMPORT_C TInt YValToRow(TInt aStartRow,TInt aDisp) const; + IMPORT_C TInt YValToTitleRow(TInt aYVal) const; + IMPORT_C TInt XValToColumn(TInt aXVal) const; + IMPORT_C TInt XValToColumn(TInt aStartCol,TInt aDisp) const; + IMPORT_C TInt XValToTitleColumn(TInt aXVal) const; + IMPORT_C TCellRef PointToCell(const TPoint &aPoint) const; + IMPORT_C TCellRef PointToCell(const TCellRef &aStartCell,const TPoint &aPointDisp) const; + IMPORT_C TPoint CellToPoint(const TCellRef &aCell) const; + IMPORT_C TPoint CellToPoint(const TCellRef &aStartCell,const TCellRef &aEndCell) const; + IMPORT_C TPoint TitleCellToPoint(const TCellRef& aTitleCell) const; + IMPORT_C TRect CellToRect(const TCellRef& aCell) const; + IMPORT_C TInt YValToNearestRow(TInt aStartRow,TInt aDisp) const; + IMPORT_C TInt XValToNearestColumn(TInt aStartCol,TInt aDisp) const; + IMPORT_C TSize TopLeftTitleRangeSize() const; + + IMPORT_C void PaginateL(); + IMPORT_C void ClearPagination(); + IMPORT_C void NotifyPaginationOutOfDateL(); + inline TBool IsPaginated() const; + IMPORT_C TRangeRef PageToRange(TInt aPageNo,TPageOrder aPageOrder) const; + inline void SetPrintRange(const TRangeRef& aPrintRange); + IMPORT_C TInt NoOfPages() const; + IMPORT_C void SetPageSizeInTwipsL(const TSize& aPageSize); + inline TSize PageSizeInTwips() const; + inline TBool IsAutoPagination() const; + IMPORT_C void SetAutoPagination(TBool aState); + IMPORT_C TBool IsHardRowPageBreak(TInt aRow) const; + IMPORT_C TBool IsHardColumnPageBreak(TInt aCol) const; + IMPORT_C void SetHardRowPageBreakL(TInt aRow); + IMPORT_C void ClearHardRowPageBreakL(TInt aRow); + IMPORT_C void SetHardColumnPageBreakL(TInt aCol); + IMPORT_C void ClearHardColumnPageBreakL(TInt aCol); + IMPORT_C void ClearAllHardPageBreaksL(); + + IMPORT_C void ExternalizeL(RWriteStream &aStream) const; + IMPORT_C void InternalizeL(RReadStream &aStream); + IMPORT_C TStreamId StoreL(CStreamStore& aStore) const; + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aStreamId); +////////////////////////-> +// Setting the grid colors + IMPORT_C void SetGridColors(TGridColors aColors); +// Getting the grid colors + IMPORT_C const TGridColors& GridColors() const; +////////////////////////-> +private: + void SetIndefiniteRowBoundaries(TBool aState); + inline TBool IsVisibleToRowFullyVisible() const; + void SetVisibleToRowFullyVisible(TBool aState); + inline TBool IsVisibleToColumnFullyVisible() const; + void SetVisibleToColumnFullyVisible(TBool aState); + TInt ColumnWidthInPixels(TInt aCol) const; + void SetColumnWidthInPixelsL(TInt aCol,TInt aWidthInPixels); + void PreCheckColumnWidthChange(TInt aCol,TBool aNonZeroWidth); + void PostCheckColumnWidthChange(TInt aCol,TBool aNonZeroWidth); + TInt DefaultColumnWidthInPixels() const; + void SetDefaultColumnWidthInPixels(TInt aWidthInPixels); + TInt RowHeightInPixels(TInt aRow) const; + void SetRowHeightInPixelsL(TInt aRow,TInt aHeightInPixels); + void PreCheckRowHeightChange(TInt aRow,TBool aNonZeroHeight); + void PostCheckRowHeightChange(TInt aRow,TBool aNonZeroHeight); + TInt DefaultRowHeightInPixels() const; + void SetDefaultRowHeightInPixels(TInt aHeightInPixels); + TPoint CalcOffsetBetweenCells(const TCellRef& aCell1,const TCellRef& aCell2) const; + TBool LimitRow(TInt& aRow) const; + TBool LimitColumn(TInt &aColumn) const; + void LimitRow(TInt& aRow,TInt aLowerLimit,TInt aUpperLimit) const; + void LimitColumn(TInt& aCol,TInt aLowerLimit,TInt aUpperLimit) const; + TBool LimitCell(TCellRef& aCell) const; + void LimitRowToVisible(TInt& aRow) const; + void LimitColumnToVisible(TInt& aCol) const; + void LimitCellToVisible(TCellRef& aCell) const; + TBool IsCellOutOfVisibleRange(const TCellRef &aCell) const; + TBool IsCellOutOfGridRange(const TCellRef& aCell) const; + void StepRowForward(TInt& aRow) const; + void StepRowBackward(TInt& aRow) const; + void StepColumnForward(TInt& aCol) const; + void StepColumnBackward(TInt& aCol) const; + void CalcVisibleFromRow(TInt aVisibleToRow,TInt& aNewVisibleFromRow) const; + TBool CalcVisibleToRow(TInt aVisibleFromRow,TInt& aNewVisibleToRow) const; + void CalcVisibleFromColumn(TInt aVisibleToCol,TInt& aNewVisibleFromCol) const; + TBool CalcVisibleToColumn(TInt aVisibleFromCol,TInt& aNewVisibleToCol) const; + TInt CalcVisibleFromRowAfterPageScroll(TMoveDirectionAndAmount aPageScroll) const; + TInt CalcVisibleFromColumnAfterPageScroll(TMoveDirectionAndAmount aPageScroll) const; + TCellRef CalcVisibleFromCellAfterPageScroll(TMoveDirectionAndAmount aPageScroll) const; + TBool FindNextRowPageBreak(TInt aSearchStart,TInt& aFoundRow) const; + TBool FindNextColumnPageBreak(TInt aSearchStart,TInt& aFoundCol) const; + void DoMainPaginationLoopL(TInt aPageSpan,CSparseMap* aCellSpanMap,CSparseMap* aPageMap, + CArrayFix* aHardPageBreaks,TInt aStartId); + TBool RequestRow(TInt aRow,TInt& aReturnRow) const; + + void ConstructL(const MGridTable *aGridTable,CGridImg *aGridImg,const TRangeRef& aGridRange); +//private: +private: + enum + { + EMaxArrayChanges=256, + EInitialDefaultRowHeightInTwips = 300, + EInitialDefaultColumnWidthInTwips = 900 + }; + enum + { + EIsTopLabels = 0x1, + EIsSideLabels = 0x2, + EIsHorizontalGridLines = 0x4, + EIsVerticalGridLines = 0x8, + EIsColumnBursting = 0x10, + EIsCursorVisible = 0x20, + EIsRowPermanentlySelected = 0x40, + EIsHorizontalTitleLine = 0x80, + EIsVerticalTitleLine = 0x100, + EIsIndefiniteRowBoundaries = 0x200, + EIsUniformRowHeight = 0x400, + EIsUniformColumnWidth = 0x800, + EIsTopLabelDragDisabled = 0x1000, + EIsSideLabelDragDisabled = 0x2000, + EIsPaginated = 0x4000, + EIsAutoPagination = 0x8000, + EIsPrintedLabels = 0x10000, + EIsPrintedGridLines = 0x20000, + EIsVisibleToRowFullyVisible = 0x40000, + EIsVisibleToColumnFullyVisible = 0x80000, + EIsEncroachingCellBorders = 0x100000, + EIsColumnSelectionDisabled = 0x200000, + EIsRowSelectionDisabled = 0x400000, + EIsAutoClearGridCells = 0x800000, + EIsGridLabelSeparators = 0x1000000, + EIsHighlightVisible = 0x2000000, + EIsPageBreakLinesHidden = 0x4000000 + }; +private: + const MGridTable* iGridTable; + const MGraphicsDeviceMap* iGraphicsDeviceMap; //* + CGridImg* iGridImg; //* +// persistent + TRangeRef iGridRange; //* + TRangeRef iVisibleRange; + TRangeRef iTitleRange; + CSparseMap* iColumnWidthMap; //* + CSparseMap* iRowHeightMap; //* + CSparseMap* iColumnPageMap; //* + CSparseMap* iRowPageMap; //* + CArrayFix* iHardRowPageBreaks; + CArrayFix* iHardColumnPageBreaks; + TRgb iGridEdgeColor; + TInt iMinRowHeightInPixels; + TInt iMinColumnWidthInPixels; + TSize iPageSizeInTwips; //* + TUint32 iFlags; //* Starred items are used in printing +////////////////////////-> + TGridColors iColors; +////////////////////////-> +// End of persistent data + TBool iHasChanged; + }; + + + + +class CGridLabelImg : public CBase +/** Draws a grid cell's label. + +@publishedAll +@released */ + { + friend class CGridImg; +public: + IMPORT_C virtual ~CGridLabelImg(); + IMPORT_C void ConstructL(); + inline void SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap); + inline TFontSpec FontSpec() const; + IMPORT_C void ReleaseFont(); + IMPORT_C void NotifyGraphicsDeviceMapChangeL(); + inline void SetGridColors(const TGridColors& aGridColors); +protected: + IMPORT_C CGridLabelImg(const TFontSpec& aFontSpec,MGraphicsDeviceMap* aGraphicsDeviceMap); +////////////////////////-> + IMPORT_C void DrawTopLeftLabelL(CGraphicsContext* aGc,const TRect& aRect, TRgb aColor) const; +////////////////////////-> +private: + /** Draws a row label. + + @publishedAll + @released + @param aGc The graphics context to be used. + @param aRow The row for which the label is to be drawn. + @param aRect The rectangle in which the label is to be drawn. */ + virtual void DrawRowLabelL(CGraphicsContext* aGc,TInt aRow,const TRect& aRect) const=0; + /** Draws a column label. + + @publishedAll + @released + @param aGc The graphics context to be used. + @param aCol The column for which the label is to be drawn. + @param aRect The rectangle in which the label is to be drawn. */ + virtual void DrawColLabelL(CGraphicsContext* aGc,TInt aCol,const TRect& aRect) const=0; + IMPORT_C virtual void DrawTopLeftLabelL(CGraphicsContext* aGc,const TRect& aRect) const; + IMPORT_C virtual TInt SideLabelWidthInPixels(TInt aStartRow,TInt aEndRow) const; + IMPORT_C virtual TInt TopLabelHeightInPixels() const; + IMPORT_C virtual void DrawRowCursorL(CGraphicsContext* aGc,const TRect& aRect) const; +protected: + enum + { + /** The default width of side labels, in twips. + + This is used by the default implementation of SideLabelWidthInPixels(). */ + EDefaultSideLabelWidthInTwips=300, + /** The default height of top labels, in twips. + + This is used by the default implementation of TopLabelHeightInPixels(). */ + EDefaultTopLabelHeightInTwips=300 + }; +protected: + /** The nearest font to that specified in the font specification. */ + CFont* iFont; + /** The font specification in device independent terms. */ + TFontSpec iFontSpec; + /** The graphics device map, an interface for mapping between twips and device-specific + units. */ + MGraphicsDeviceMap* iGraphicsDeviceMap; + /** The grid colour specification. */ + TGridColors iGridColors; +private: + TInt iSpare; + }; + + +class CGridCellImg : public CBase +/** Draws a grid cell's contents. + +@publishedAll +@released */ + { + friend class CGridImg; +public: + IMPORT_C virtual ~CGridCellImg(); + inline TInt BurstColOffset() const; + inline TInt BurstLeft() const; + inline TInt BurstRight() const; + inline TBool IsHorizontalGridLines() const; + inline TBool IsVerticalGridLines() const; + inline void SetGridColors(const TGridColors& aGridColors); +protected: + IMPORT_C CGridCellImg(); +private: + /** Draws the contents of the specified cell. + + @publishedAll + @released + @param aGc The graphics context to be used. + @param aCell The cell whose contents are to be drawn. + @param aDrawRect The rectangle in which the cell is to be drawn. + @param aClipRect The rectangle to which drawing is clipped. */ + virtual void DrawL(CGraphicsContext* aGc,const TCellRef& aCell,const TRect& aDrawRect, + const TRect& aClipRect) const=0; + IMPORT_C virtual TInt DataWidthInPixelsL(const TCellRef& aCell) const; + IMPORT_C virtual TBool DoesCellContainDataL(const TCellRef& aCell) const; +// reserved virtual function + IMPORT_C virtual void Reserved_1(); +private: + void SetBurstingData(TInt aBurstColOffset=0,TInt aBurstLeft=0,TInt aBurstRight=0); +private: + enum { EIsHorizontalGridLines = 0x1, EIsVerticalGridLines = 0x2 }; +protected: + /** The grid colour specification. */ + TGridColors iGridColors; +private: + TInt iBurstColOffset; + TInt iBurstLeft; + TInt iBurstRight; + TUint32 iGridLineFlags; + }; + + +class MGridCursorMoveCallBack +/** An interface to a callback function that is intended to be called whenever +there is a change to the cursor position. + +If such a callback is needed, a concrete implementation is defined, instantiated +and passed to CGridImg::SetCursorMoveCallBack(). + +@publishedAll +@released */ + { +public: + /** Deals with the change to the cursor position. + + This function is called immediately before exiting the following functions: + CGridImg::SetCursorPosL(), CGridImg::SetAnchorPosL(), CGridImg::MoveCursorL(),CGridImg::ResetSelectedL(), + CGridImg::AddRangeToSelectedL(), CGridImg::AddRegionToSelectedL(), CGridImg::AddRowToSelectedL(), + CGridImg::AddColToSelectedL(). + + The function is commonly used to do any necessary redrawing. */ + virtual void HandleCursorMoveL()=0; + }; + +class RWindow; +class CWindowGc; + + +class CGridImg : public CBase +/** Draws the contents of the grid. + +@publishedAll +@released +*/ + { + friend class CGridLay; +public: + enum + { + /** Indicates that the selection state is to be maintained. + + If a region of cells is selected, then this selection is to be kept. + + Typically, this is set by a control when a drag operation is in + progress and the shift modifier key is also pressed. */ + EIsWithSelect=0x0001, + /** Indicates that the control modifier key has been pressed. */ + EIsWithControl=0x0002, + /** Indicates that a drag operation is in progress. */ + EIsWithDrag=0x0004, + /** Indicates that the cursor is the edge of the grid. */ + EIsAtBoundary=0x0008, + /** Indicates that a new cell is being selected, without dragging. */ + EIsAbsoluteMove=0x0010, + /** Indicates that a whole row is selected. */ + EIsRowSelected=0x0020, + /** Indicates that a whole column is selected. + + This also means that the label cell for the column is included in the selection. */ + EIsColumnSelected=0x0040 + }; + enum + { + /** Defines a scale value of 100. + + Scale factor values are divided into this value to calculate + drawing points, rectangles etc. */ + EScaleOneToOne=100 + }; + + enum TSelectType + { + /** Indicates that an existing selected region is to be reset (i.e. emptied) before + adding a new region. */ + ESelectOverwrite, + /** Indicates that a new region is to be appended to any existing selected region. */ + ESelectAppend + }; +public: + IMPORT_C virtual ~CGridImg(); + IMPORT_C static CGridImg* NewL(CGraphicsDevice* aGraphicsDevice,CGridCellImg* aGridCellImg,CGridLay* aGridLay); + IMPORT_C static CGridImg* NewL(CGridCellImg* aGridCellImg,CGridLay* aGridLay); //Creates Partial GridImg + inline void SetGridLay(CGridLay* aGridLay); + inline void SetWindow(RWindow* aWin); +////////////////////////-> + IMPORT_C void SetGridLabelImg(CGridLabelImg* aGridLabelImg); +////////////////////////-> + inline void SetCursorMoveCallBack(MGridCursorMoveCallBack* aCursorMoveCallBack); + inline const CGridCellRegion* Selected() const; + inline const CGridLabelImg* GridLabelImg() const; + + IMPORT_C void ScrollL(const TPoint &aOffset); + IMPORT_C void MoveCursorL(TMoveDirectionAndAmount aCursorMove,TUint aSelectState); + IMPORT_C void SetCursorWithPointerL(const TPoint& aPoint,TUint aFlagList); + IMPORT_C void ResetSelectedL(); + IMPORT_C void AddRangeToSelectedL(const TRangeRef& aRange,TSelectType aType=ESelectOverwrite); + IMPORT_C void AddRegionToSelectedL(const CArrayFix* aCellRegion,TSelectType aType=ESelectOverwrite); + IMPORT_C void AddRowToSelectedL(TInt aRow,TSelectType aType=ESelectOverwrite); + IMPORT_C void AddColToSelectedL(TInt aCol,TSelectType aType=ESelectOverwrite); + IMPORT_C void DrawL(CGraphicsContext* aGc) const; + IMPORT_C void DrawL(CGraphicsContext* aGc,const TRect& aRect) const; + IMPORT_C void DrawCellL(const TCellRef& aCell) const; + IMPORT_C void DrawRangeL(const TRangeRef& aRange) const; + IMPORT_C void DrawSelectedL() const; + IMPORT_C void DrawTitleLines() const; + IMPORT_C void ClearTitleLineRegionL(const TPoint& aCrossPoint) const; + IMPORT_C void PrintGridLinesAndCellsInRangeL(CGraphicsContext* aPrinterGc,const TRangeRef& aRange, + TInt aScaleFactor) const; + + inline TCellRef CursorPos() const; + IMPORT_C void SetCursorPosL(const TCellRef& aCursorPos); + inline TCellRef NewCursorPos() const; + inline TCellRef AnchorPos() const; + IMPORT_C void SetAnchorPosL(const TCellRef& aAnchorPos); + inline TRect GridRect() const; + IMPORT_C void SetGridRect(const TRect& aNewRect); + IMPORT_C void SetPrintGridRect(const TRect& aPrintRect); + inline TPoint TitlePoint() const; + inline TPoint MainPoint() const; + inline TRect MainRect() const; + IMPORT_C void ResetReferencePoints(); + IMPORT_C void NotifyGridRangeResize(); + + IMPORT_C void CheckSideLabelWidthAndScrollL(); + IMPORT_C TInt CheckSideLabelWidth(); + IMPORT_C TInt SideLabelWidthInPixels() const; + IMPORT_C TInt MaxSideLabelWidthInPixels() const; + IMPORT_C TInt TopLabelHeightInPixels() const; + IMPORT_C void FinishLabelDragL(); + IMPORT_C TBool StartLabelDrag(const TPoint &aPoint); + IMPORT_C TBool UpdateLabelDrag(const TPoint &aPoint); + IMPORT_C TBool StartLabelResize(TBool aIsColumnLabel, TInt aIndex); + IMPORT_C TBool UpdateLabelResize(TInt aDelta); + IMPORT_C void FinishLabelResizeL(TBool aResize); +private: + enum TDragDim {EXDrag,EYDrag,ENoDrag}; + enum TRefPoint {ETitleRef,EMainRef}; + enum TDragDraw {EDragDrawWithBitmap,EDragDrawWithoutBitmap}; + enum TArrows {EBothArrows,ESecondArrowOnly}; + enum + { + EIsLabelDraggingIgnored = 0x1, + EIsSidewaysScrollIgnored = 0x2 + }; +private: + void DrawResizingDragHiglights(const TRect& aRect); + void DrawAllGridLabelsL() const; + void DrawTopLeftGridLabelL() const; + void DrawTopGridLabelsL(TInt aStartCol,TInt aEndCol,TRefPoint aXRef=EMainRef) const; + void DrawSideGridLabelsL(TInt aStartRow,TInt aEndRow,TRefPoint aYRef=EMainRef) const; + void DrawSideGridLabelIfOnScreenL(TInt aRow) const; + void DrawAllGridLinesAndCellsL() const; + void DrawGridLinesAndCellsInRangeL(const TRangeRef& aRange,const TRect& aClipRect, + TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; + void DrawCellsToGcL(CGraphicsContext* aGc,const TRangeRef& aRange,const TRect& aClipRect, + const TPoint& aStartPoint,TInt aScaleFactor=EScaleOneToOne) const; + void DrawBurstingCellL(CGraphicsContext* aGc,const TCellRef& aCell,const TRect& aRect,const TRect& aClipRect, + TInt aScaleFactor,TInt aBurstLeft,const TCellRef& aBurstCell) const; + TInt CalcBurstLeftL(TCellRef& aBurstCell,TInt aScaleFactor) const; + TInt CalcBurstRightL(const TCellRef& aCell,TInt aExcessRight,TInt aScaleFactor) const; + void DrawVerticalTitleLine() const; + void DrawHorizontalTitleLine() const; + void BeginRedrawAndDrawL() const; + void BeginRedrawAndDrawL(const TRect& aRect) const; + + void AppendTotalHighlightRegionL(TRegion& aRegion) const; + void AppendPartialHighlightRegionL(TRegion& aRegion,const TRect& aClipRect, + TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; + void RemoveRowLabelFromRegionL(TInt aRow,TRegion& aRegion) const; + void HighlightMinRegionL(const TRegion &aOldRegion,const TRegion &aNewRegion); + void HighlightRegion(const TRegion &aRegion) const; + void HighlightNewRegionFromOldL(const TRegion& aOldRegion); + void DrawCursorOrRegionL(TUint aMoveFlags); + void UpdateSelectedRegion(TInt aSelectCount,TUint aMoveFlags); + void AddLabelToRegionL(TUint aMoveFlags); + void StartSelectedRegionL(TUint aMoveFlags); + TBool ScanColumnsForDrag(TInt aFromColumn,TInt aToColumn,TInt aPointerPos,TInt& aPrevious,TInt& aCurrent); + TBool ScanRowsForDrag(TInt aFromRow,TInt aToRow,TInt aPointerPos,TInt& aPrevious,TInt& aCurrent); + void DrawDraggingHighlight(const TRect aLine,TDragDraw aDragDraw); + void DrawArrowsToInMemoryBitmap(TArrows aArrows); + TPoint RelativeCellToPoint(const TCellRef& aCell,TRefPoint aXRef=EMainRef, + TRefPoint aYRef=EMainRef) const; + TCellRef RelativePointToCell(const TPoint& aPoint,TRefPoint aXRef=EMainRef, + TRefPoint aYRef=EMainRef) const; + TRect PartialCellRectL(const TCellRef& aCell,const TRect& aClipRect, + TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; + TRect PartialRangeRect(const TRangeRef& aRange,const TRect& aClipRect, + TRefPoint aXRef=EMainRef,TRefPoint aYRef=EMainRef) const; + void CreateGc(CGraphicsContext* aGc); + void DeleteGc(); + static void CleanupGc(TAny* aObject); + void ResetGcToDefault(CGraphicsContext* aGc) const; + void ScaleDown(TPoint& aPoint,TInt aScaleFactor) const; + void ConstructSelectedL(const TRangeRef& aGridRange); + + CGridImg(CGraphicsDevice* aGraphicsDevice,CGridCellImg* aGridCellImg,CGridLay* aGridLay); + CGridImg(CGridCellImg* aGridCellImg,CGridLay* aGridLay); + void ConstructL(); + +////////////////////////-> + void SetGridColors(const TGridColors& aGridColors); +////////////////////////-> +private: + TRect iGridRect; + TPoint iTitlePoint; + TPoint iMainPoint; + TCellRef iCursorPos; // Persisted + TCellRef iNewCursorPos; + TCellRef iAnchorPos; + + CGraphicsDevice* iGraphicsDevice; + CGraphicsContext* iGcPtr; + CWindowGc* iGc; + RWindow* iWin; + CGridCellImg* iGridCellImg; //* + CGridLabelImg* iGridLabelImg; //* + CGridLay* iGridLay; //* Starred items are used in printing + CGridCellRegion* iSelected; + MGridCursorMoveCallBack* iCursorMoveCallBack; + TBool iDrawResizeLines; + TInt iDragLabel; + TInt iCurrentDragPos; + TInt iDragDiff; + TInt iDragFlags; + TDragDim iDragDim; + CFbsBitmap* iDragBmp; + TRefPoint iXRefPoint; + TRefPoint iYRefPoint; + }; + + +class TGridUtils +/** A collection of Grid utilities. + +@publishedAll +@released */ + { +public: + IMPORT_C static void FillRect(CGraphicsContext* aGc,TRgb aColor,const TRect &aRect); + }; + + +#include +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/grdstd.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/grdstd.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,421 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CGridLay +// +// + +inline void CGridLay::SetGridTable(const MGridTable* aGridTable) +/** Sets the specified grid table object. + +@param aGridTable The grid table object. */ + { iGridTable = aGridTable; } + +inline TRangeRef CGridLay::VisibleRange() const +/** Gets the range of cells that are currently visible. + +@return The visible cell range. Note that the TRangeRef::iFrom member is the +cell that is visible at the top of the window, and the TRangeRef::iTo member +is the cell that is partially visible at the bottom right of the window. */ + { return iVisibleRange; } + +inline TRangeRef CGridLay::TitleRange() const +/** Gets the range of cells that form the grid titles. + +@return The range of cells that form the grid titles. */ + { return iTitleRange; } + +inline TRangeRef CGridLay::GridRange() const +/** Gets the range of cells that defines the grid boundary. + +@return The range of cells that defines the grid boundary. */ + { return iGridRange; } + +inline TBool CGridLay::IsSideLabels() const +/** Tests whether side grid labels are printed. + +@return True, if the side labels are printed; false, otherwise. */ + { return (iFlags&EIsSideLabels); } + +inline TBool CGridLay::IsTopLabels() const +/** Tests whether top labels are printed. + +@return True, if the top labels are printed; false, otherwise. */ + { return (iFlags&EIsTopLabels); } + +inline TBool CGridLay::IsVerticalGridLines() const +/** Tests whether vertical grid lines are to be drawn. + +@return True, if vertical grid lines are to be drawn; false, otherwise. */ + { return (iFlags&EIsVerticalGridLines); } + +inline TBool CGridLay::IsHorizontalGridLines() const +/** Tests whether horizontal grid lines are to be drawn. + +@return True, if horizontal grid lines are to be drawn; false, otherwise. */ + { return (iFlags&EIsHorizontalGridLines); } + +inline TBool CGridLay::IsGridLabelSeparators() const +/** Tests whether label separators are to be drawn. + +@return True, if label separators are to be drawn; false, otherwise. */ + { return (iFlags&EIsGridLabelSeparators); } + +inline TBool CGridLay::IsColumnBursting() const +/** Tests whether column bursting is permitted. + +Column bursting occurs when the contents of a cell are too wide; adjacent +cells are then overwritten, provided they are empty. + +@return True, if column bursting is permitted; false, otherwise. */ + { return (iFlags&EIsColumnBursting); } + +inline TBool CGridLay::IsCursorVisible() const +/** Tests whether the cursor is visible. + +@return True, if the cursor is visible; false, otherwise. */ + { return (iFlags&EIsCursorVisible); } + +inline TBool CGridLay::IsHighlightVisible() const +/** Tests whether selected cells are highlighted. + +@return True, if selected cells are highlighted; false, otherwise. */ + { return (iFlags&EIsHighlightVisible); } + +inline TBool CGridLay::IsRowPermanentlySelected() const +/** Tests whether rows are permanently selected. + +@return True, if rows are permanently selected; false, otherwise. */ + { return (iFlags&EIsRowPermanentlySelected); } + +inline TBool CGridLay::IsTitleLines() const +/** Tests whether the grid has both horizontal and vertical title lines. + +@return True, if the grid has both a horizontal and vertical title line; false, +otherwise. */ + { return (iFlags&(EIsHorizontalTitleLine|EIsVerticalTitleLine)); } + +inline TBool CGridLay::IsHorizontalTitleLine() const +/** Tests whether the grid has a horizontal title line. + +@return True, if the grid is to have a horizontal title line; false otherwise. */ + { return (iFlags&EIsHorizontalTitleLine); } + +inline TBool CGridLay::IsVerticalTitleLine() const +/** Tests whether the grid has a vertical title line. + +@return True, if the grid is to have a vertical title line; false otherwise. */ + { return (iFlags&EIsVerticalTitleLine); } + +inline TBool CGridLay::IsIndefiniteRowBoundaries() const +/** Tests whether the grid has indefinite row boundaries. + +@return True, if the grid has indefinite row boundaries; false, otherwise. */ + { return (iFlags&EIsIndefiniteRowBoundaries); } + +inline TBool CGridLay::IsUniformRowHeight() const +/** Tests whether all the rows have the same height. + +@return True, if all rows have the same height; false, otherwise. */ + { return (iFlags&EIsUniformRowHeight); } + +inline TBool CGridLay::IsUniformColumnWidth() const +/** Tests whether all columns have the same width. + +@return True, if all columns have the same width; false, otherwise. */ + { return (iFlags&EIsUniformColumnWidth); } + +inline TBool CGridLay::IsTopLabelDragDisabled() const +/** Tests whether a drag operation on the boundary between two columns is permitted. + +@return True, if a drag operation on a column boundary is permitted; false otherwise. */ + { return (iFlags&EIsTopLabelDragDisabled); } + +inline TBool CGridLay::IsSideLabelDragDisabled() const +/** Tests whether a drag operation on the boundary between two rows is permitted. + +@return True, if a drag operation on a row boundary is permitted; false otherwise. */ + { return (iFlags&EIsSideLabelDragDisabled); } + +inline TBool CGridLay::IsPrintedLabels() const +/** Tests whether labels are printed. + +@return True, if labels are printed; false, otherwise. */ + { return (iFlags&EIsPrintedLabels); } + +inline TBool CGridLay::IsPrintedGridLines() const +/** Tests whether grid lines are printed. + +@return True, if grid lines are printed; false, otherwise. */ + { return (iFlags&EIsPrintedGridLines); } + +inline TBool CGridLay::IsVisibleToRowFullyVisible() const + { return (iFlags&EIsVisibleToRowFullyVisible); } + +inline TBool CGridLay::IsVisibleToColumnFullyVisible() const + { return (iFlags&EIsVisibleToColumnFullyVisible); } + +inline TBool CGridLay::IsEncroachingCellBorders() const +/** Tests whether encroaching cell borders are permitted. + +Encroaching cell borders are where cell borders wider than one pixel are drawn +inside the cell, as opposed to outside. + +@return True, if encroaching cells borders are permitted; false, otherwise. */ + { return (iFlags&EIsEncroachingCellBorders); } + +inline TBool CGridLay::IsRowSelectionDisabled() const +/** Tests whether row selection is disabled. + +@return True, if row selection is disabled; false, otherwise. */ + { return (iFlags&EIsRowSelectionDisabled); } + +inline TBool CGridLay::IsColumnSelectionDisabled() const +/** Tests whether column selection is disabled. + +@return True, if column selection is disabled; false, otherwise. */ + { return (iFlags&EIsColumnSelectionDisabled); } + +inline TBool CGridLay::IsAutoClearGridCells() const +/** Tests whether automatic clearing of grid cells is done. + +Automatic clearing of grid cells is where all cells are cleared on redraw, +in case drawing the contents doesn't guarantee to write to every pixel (the +usual way of doing flicker-free redraws). + +@return True, if automatic clearing of grid cells is done; false, otherwise. */ + { return (iFlags&EIsAutoClearGridCells); } + +inline TBool CGridLay::IsPageBreakLinesHidden() const +/** Tests whether lines marking page breaks are hidden. + +@return True, if lines marking page breaks are hidden; false, otherwise. */ + { return (iFlags&EIsPageBreakLinesHidden); } + +inline TBool CGridLay::HasChanged() const +/** Tests whether any change has occurred to the grid layout. + +Such changes include alterations to the height of a row or the +width of a column, additions or deletions of rows or columns, +and changes to the visibility of grid lines. +Note that this list is not exhaustive. + +@return True, if the grid layout has changed; false, otherwise. */ + { return iHasChanged; } + +inline void CGridLay::SetHasChanged(TBool aHasChanged) +/** Sets whether any change has occurred to the grid layout. + +@param aHasChanged ETrue, if any change has occurred to the grid layout; EFalse, +otherwise. */ + { iHasChanged=aHasChanged; } + +inline void CGridLay::SetGridEdgeColor(TRgb aColor) +/** Defines the colour that the edges of the grid beyond the grid range are to +have. + +If not changed by this function, the default colour is white. + +@param aColor The colour value. */ + { iGridEdgeColor=aColor; } + +inline TBool CGridLay::IsPaginated() const +/** Tests whether the grid has been paginated. + +@return True, if the grid has been paginated; false, otherwise. */ + { return (iFlags&EIsPaginated); } + +inline void CGridLay::SetPrintRange(const TRangeRef& aPrintRange) +/** Sets the range of cells that are visible for printing. + +@param aPrintRange The cell range. */ + { iVisibleRange=aPrintRange; } + +inline TSize CGridLay::PageSizeInTwips() const +/** Gets the size of a page. + +@return The size of a page, in twips. */ + { return iPageSizeInTwips; } + +inline TBool CGridLay::IsAutoPagination() const +/** Tests whether automatic pagination is in effect. + +@return True, if automatic pagination is in effect, false, otherwise. */ + { return (iFlags&EIsAutoPagination); } + +// CGridLabelImg + +inline void CGridLabelImg::SetGraphicsDeviceMap(MGraphicsDeviceMap* aGraphicsDeviceMap) +/** Supplies a new interface object for mapping between twips and device-specific +units. + +Note that the caller must call ReleaseFont() before calling this function, +and must call NotifyGraphicsDeviceMapChangeL() afterwards. + +@param aGraphicsDeviceMap A new interface object for mapping between twips +and device-specific units. */ + { + iGraphicsDeviceMap=aGraphicsDeviceMap; + } + +inline TFontSpec CGridLabelImg::FontSpec() const +/** Gets the font specification. + +@return The font specification. */ + { + return iFontSpec; + } + +inline void CGridLabelImg::SetGridColors(const TGridColors& aGridColors) +/** Sets the colours to be used when drawing the label. + +@param aGridColors The object containing the grid colours specification. */ + { + iGridColors = aGridColors; + } + +// CGridCellImg + +inline TInt CGridCellImg::BurstColOffset() const +/** Gets the bursting column offset. + +@return The burst column offset */ + { return iBurstColOffset; } + +inline TInt CGridCellImg::BurstLeft() const +/** Gets the left hand bursting value. + +@return The burst value. */ + { return iBurstLeft; } + +inline TInt CGridCellImg::BurstRight() const +/** Gets the right hand bursting value. + +@return The burst value */ + { return iBurstRight; } + +inline TBool CGridCellImg::IsHorizontalGridLines() const +/** Tests whether horizontal grid lines are drawn. + +This function is set by the CGridImg object and allows classes derived from +CGridCellImg to modify or restrict the area into which they draw. + +@return True, if horizontal grid lines are drawn; false, otherwise. */ + { return iGridLineFlags&EIsHorizontalGridLines; } + +inline TBool CGridCellImg::IsVerticalGridLines() const +/** Tests whether vertical grid lines are drawn. + +This function is set by the CGridImg object and allows classes derived from +CGridCellImg to modify or restrict the area into which they draw. + +@return True, if vertical grid lines are drawn; false, otherwise. */ + { return iGridLineFlags&EIsVerticalGridLines; } + +inline void CGridCellImg::SetGridColors(const TGridColors& aGridColors) +/** Sets the colours to be used when drawing. + +@param aGridColors The object containing the grid colours specification. */ + { + iGridColors = aGridColors; + } + +// CGridImg + +inline void CGridImg::SetGridLay(CGridLay* aGridLay) +/** Sets the specified grid layout object. + +@param aGridLay A pointer to the object that controls the layout of rows and +columns. */ + { iGridLay = aGridLay; } + +inline void CGridImg::SetWindow(RWindow *aWin) +/** Sets the specified window. + +@param aWin A pointer to the currently active window. */ + { iWin = aWin; } + +////////////////////////-> +//inline void CGridImg::SetGridLabelImg(CGridLabelImg *aGridLabelImg) +// { iGridLabelImg = aGridLabelImg; } +////////////////////////-> + +inline void CGridImg::SetCursorMoveCallBack(MGridCursorMoveCallBack *aCursorMoveCallBack) +/** Sets the cursor moved call-back object. + +The call-back object encapsulates the implementation of a call-back function +that is called whenever there is a change to the cursor position. + +@param aCursorMoveCallBack A pointer to the callback object. */ + { iCursorMoveCallBack = aCursorMoveCallBack; } + +inline const CGridCellRegion* CGridImg::Selected() const +/** Gets the currently selected region. + +@return A pointer to the selected region object. */ + { return iSelected; } + +inline const CGridLabelImg* CGridImg::GridLabelImg() const +/** Gets the the object that is used to draw a cell label. + +@return A pointer to the object that is used to draw a cell label. */ + { return iGridLabelImg; } + +inline TCellRef CGridImg::CursorPos() const +/** Gets the current position of the cursor. + +@return The cell reference of the current cursor position. */ + { return iCursorPos; } + +inline TCellRef CGridImg::AnchorPos() const +/** Gets the cursor's anchor position. + +This is the cell reference of the position that the cursor must return to +after a series of selected movements have been made. + +@return The cell reference of the cursor's anchor position. */ + { return iAnchorPos; } + +inline TCellRef CGridImg::NewCursorPos() const +/** Gets the new position of the cursor. + +@return The cell reference of the new cursor position. +@see SetCursorPosL() */ + { return iNewCursorPos; } + +inline TRect CGridImg::GridRect() const +/** Gets the rectangle containing the grid. + +@return The rectangle containing the grid. */ + { return iGridRect; } + +inline TPoint CGridImg::TitlePoint() const +/** Gets the position of the title. + +This is the point at the top left of the grid excluding the labels. + +@return The position of the title. */ + { return iTitlePoint; } + +inline TPoint CGridImg::MainPoint() const +// Returns the most commonly used point in the grid (usually same as TitlePoint()). +/** Gets the position at which the visible range starts. + +@return The position at which the visible range starts. */ + { return iMainPoint; } + +inline TRect CGridImg::MainRect() const +/** Gets the rectangle that corresponds to the visible range. + +@return The rectangle that corresponds to the visible range. */ + { return TRect(iMainPoint,iGridRect.iBr); } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/gulalign.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/gulalign.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,153 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __GULALIGN_H__ +#define __GULALIGN_H__ + +#include +#include +#include +#include // enum TBidiText::TDirectionality +#include // enum CParaFormat::TAlignment + +/** Horizontal layout settings for graphic objects. + +@publishedAll +@released */ +enum TGulHAlignment + { + /** Object is left-aligned. */ + EHLeft=CGraphicsContext::ELeft, + /** Object is centred horizontally. */ + EHCenter=CGraphicsContext::ECenter, + /** Object is right-aligned. */ + EHRight=CGraphicsContext::ERight + }; + +/** Vertical layout settings for graphic objects. + +@publishedAll +@released */ +enum TGulVAlignment + { + /** Object is aligned with the top. */ + EVTop=0x00, + /** Object is centred vertically. */ + EVCenter=0x10, + /** Object is aligned with the bottom. */ + EVBottom=0x20 + }; + +/** Alignment settings for the layout of graphic objects. + +@publishedAll +@released */ +enum TGulAlignmentValue + { + /** Object is left and top aligned. */ + EHLeftVTop=EHLeft|EVTop, + /** Object is left aligned and centred vertically. */ + EHLeftVCenter=EHLeft|EVCenter, + /** Object is left aligned and at the bottom. */ + EHLeftVBottom=EHLeft|EVBottom, + /** Object is centre aligned horizontally and at the top. */ + EHCenterVTop=EHCenter|EVTop, + /** Object is centred horizontally and vertically. */ + EHCenterVCenter=EHCenter|EVCenter, + /** Object is centred horizontally and at the bottom. */ + EHCenterVBottom=EHCenter|EVBottom, + /** Object is right and top aligned. */ + EHRightVTop=EHRight|EVTop, + /** Object is right aligned and centred vertically. */ + EHRightVCenter=EHRight|EVCenter, + /** Object is right aligned and at the bottom. */ + EHRightVBottom=EHRight|EVBottom + }; + + +/** Provides a convenient way to describe horizontal and vertical layouts of rectangular +objects and to enquire how they occupy an area given their alignment. + +@publishedAll +@released */ +class TGulAlignment + { +private: + enum {EHMask=0x03, EHAbsoluteFlag=0x04, EVMask=0x30}; +public: + inline TGulAlignment(); + inline TGulAlignment(TGulAlignmentValue aValue); + inline TGulAlignment(CGraphicsContext::TTextAlign aHAlign, TGulVAlignment aVAlign = EVTop); + IMPORT_C operator TGulAlignmentValue() const; + inline TGulVAlignment VAlignment() const; + inline TGulHAlignment HAlignment() const; + IMPORT_C TGulHAlignment HAlignment(TBidiText::TDirectionality aLanguageDirectionality) const; + IMPORT_C TBool HasAbsoluteHAlignment() const; + IMPORT_C void SetAbsoluteHAlignment(TBool aAbsoluteHAlignment); + + // Returns the horizontal text alignment. + inline CGraphicsContext::TTextAlign TextAlign() const; + IMPORT_C CGraphicsContext::TTextAlign TextAlign(TBidiText::TDirectionality aLanguageDirectionality) const; + IMPORT_C CParaFormat::TAlignment ParaAlign() const; + + IMPORT_C void SetVAlignment(TGulVAlignment aVAlign); + IMPORT_C void SetHAlignment(TGulHAlignment aHAlign); + IMPORT_C void SetHAlignment(CGraphicsContext::TTextAlign aHAlign); + IMPORT_C void SetHAlignment(CParaFormat::TAlignment aHAlign); + IMPORT_C TPoint InnerTopLeft(const TRect& aOuter, const TSize& aInnerSize) const; + IMPORT_C TPoint InnerTopLeft(const TRect& aOuter, const TSize& aInnerSize, TBidiText::TDirectionality aLanguageDirectionality) const; + IMPORT_C TRect InnerRect(const TRect& aOuter, const TSize& aInnerSize) const; + IMPORT_C TRect InnerRect(const TRect& aOuter, const TSize& aInnerSize, TBidiText::TDirectionality aLanguageDirectionality) const; +private: + TInt iValue; + }; + +/** Default constructor. */ +inline TGulAlignment::TGulAlignment() + {}; + +/** Constructor initialising the object with an alignment value. +@param aValue The alignment value. */ +inline TGulAlignment::TGulAlignment(TGulAlignmentValue aValue) + {iValue=aValue;} + +/** Constructor initialising the object with an alignment value. +@param aHAlign The horizontal alignment value. +@param aVAlign The vertical alignment value. */ +inline TGulAlignment::TGulAlignment(CGraphicsContext::TTextAlign aHAlign, TGulVAlignment aVAlign) + { iValue = static_cast(((TGulHAlignment)aHAlign) |aVAlign); } + +/** Gets the vertical alignment. +@return Vertical alignment. */ +inline TGulVAlignment TGulAlignment::VAlignment() const + {return((TGulVAlignment)(iValue&EVMask));} + +/** Gets the absolute horizontal alignment. + +Note that this is the alignment in absolute terms. I.e. left and right +alignment will not be swapped depending on language directionality. +@return Horizontal alignment. */ +inline TGulHAlignment TGulAlignment::HAlignment() const + {return((TGulHAlignment)(iValue&EHMask));} + +/** Gets the absolute horizontal text alignment. + +Note that this is the alignment in absolute terms. I.e. left and right +alignment will not be swapped depending on language directionality. +@return The horizontal text alignment. */ +inline CGraphicsContext::TTextAlign TGulAlignment::TextAlign() const + {return((CGraphicsContext::TTextAlign)(HAlignment()));} + +#endif // __GULALIGN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/gulbordr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/gulbordr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,348 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GULBORDR_H__) +#define __GULBORDR_H__ + +#if !defined(__E32DEF_H__) +#include +#endif + +#if !defined(__GULDEF_H__) +#include +#endif + +#if !defined(__GDI_H__) +#include +#endif + + +class TGulBorder +/** Draws a border around a control. + +The rectangular areas enclosed by borders are typically working areas of the +graphics context so the class supplies a number of methods which describe +how it occupies the area. + +A distinction between descriptive and logical borders is made. For descriptive +borders the appearance of the border is known and fixed. The type of border +drawn is determined by flags which describe how it is to be constructed. These +flags can be combined to achieve many different effects, and standard combinations +have been supplied (see the TBorderType enumeration). For logical borders +the use of the border is known and fixed but the appearance is not specified. +The appearance and sizing functions must be supplied in custom written code. +@publishedAll +@released*/ + { +public: + class TColors + /** Represents the colours used within the border and for the optional single pixel + border outlines. + + These colours are stored using TRgb values. + + An object of this type can be populated using ColorUtils::GetRgbDerivedBorderColors(). + + The colours used inside the border are derived from iBack, the border's background + colour, so that border colours can be lighter or darker shades of the colour + used in the main body of the control they enclose. Different combinations + of light and dark shades are used to draw opposite border sides, to achieve + a raised or sunken effect. */ + { + public: + IMPORT_C TColors(); + public: + /** The line colour. + + This is the colour used to draw the outlines on either side of the border. + Not all border types have an outline. By default, KRgbBlack. */ + TRgb iLine; + /** The background colour for the border. + + The other colours used in the border are derived from this. + + By default, KRgbWhite. */ + TRgb iBack; + /** The lightest colour. + + By default, KRgbWhite. */ + TRgb iLight; + /** The mid light colour. + + This colour is midway between iBack and iLight. By default, KRgbWhite. */ + TRgb iMidlight; + /** The mid dark colour. + + This colour is midway between iBack and iDark. By default, KRgbDarkGray. */ + TRgb iMid; + /** The darkest colour. + + By default, KRgbDarkGray. */ + TRgb iDark; + /** Not used. */ + TRgb iInternalBack; + }; + +public: + /** Defines the border outline style. + + Note that not all border types have an outline. */ + enum TOutlineStyle + { + /** The border has a single pixel outline, either solid (by default) or dotted. */ + EWithOutline=0x01, + /** The border outline is drawn using a dotted pen. */ + EDottedOutline=0x02 + }; + + /** Defines whether or not the border has a single pixel interior border. + + By default it does not. */ + enum TInlineStyle + { + /** The border has an interior border. */ + EWithInline=0x04 + }; + + /** Defines the 3D border style. */ + enum T3DStyle + { + /** A flat border. */ + EFlat=0x10, + /** A 3D effect sunken border. */ + ESunken=0x20, + /** A 3D effect raised border. */ + ERaised=0x40 + }; + + /** Defines the border's construction style. */ + enum TConstructionStyle + { + /** One step border construction. + + This type of border is drawn using the mid light and mid dark colours on opposite + sides of the border. */ + EOneStep=0x100, + /** Two step border construction. + + This type of border uses light and dark colours for the main border frame + (or mid light for the flat border), and an additional half frame using mid + light or mid dark colours. */ + ETwoStep=0x200, + /** Three step border construction. + + This type of border is drawn with an outer frame, a repeating one pixel band + in mid tones, and an inner frame. */ + EThreeStep=0x400, + /** Inverted two step border construction. + + This is the same as ETwoStep except that for raised and sunken borders, the + additional half frame is drawn on the opposite side to that used in ETwoStep. */ + EInvertedTwoStep=0x800 + }; + + /** Defines the number of pixels to add to the border thickness. + + The border thickness is the central part of the border, coloured in the mid-tone + highlights and lowlights. + + For two step-constructed borders, the additional pixels are only added to + either the top left or bottom right hand sides. */ + enum TThickness + { + /** The border has one extra pixel. */ + EAddOnePixel=0x1000, + /** The border has two extra pixels. */ + EAddTwoPixels=0x2000, + /** The border has four extra pixels. */ + EAddFourPixels=0x4000 + }; + + /** Defines the number of pixels that are removed to produce rounded corners. */ + enum TRounding + { + /** Border rounded by removing one extra pixel. */ + EAddOneRoundingPixel=0x10000, + /** Border rounded by removing two extra pixels. */ + EAddTwoRoundingPixels=0x20000, + /** Border rounded by by removing four extra pixels. */ + EAddFourRoundingPixels=0x40000 + }; +private: + enum TNull + { + ENoBorder=0x00 + }; + + enum TLegacyStyle + { + EShallow=EAddOnePixel, + EDeep=EAddTwoPixels, + EThick=EAddFourPixels, + EHorizontal=0x100000, + EWithOverlap=0x200000, + EGray=0x400000, + EBlack=0x80000 + }; + + enum TLogicalStyle + { + ELogical=0x800000 + }; +public: + /** For logical borders, defines whether the border encloses a window, a container + control or a control. */ + enum TLogicalFamily + { + /** Logical border around a window. */ + EWindowFamily=ELogical|0x1, + /** Logical border around a container. */ + EContainerFamily=ELogical|0x2, + /** Logical border around a control. */ + EControlFamily=ELogical|0x3 + }; +public: + /** Defines the descriptive border types. */ + enum TBorderType + { + /** No border. */ + ENone=ENoBorder, + /** Border is a 1 pixel wide grey outline. */ + ESingleGray=EWithOutline|EGray, + /** Border is a 1 pixel wide black outline. */ + ESingleBlack=EWithOutline|EBlack, + /** Border is a 1 pixel wide dotted outline. */ + ESingleDotted=EWithOutline|EDottedOutline, + /** A 3D raised border, with 1 pixel thickness. */ + EShallowRaised=ERaised|EOneStep|EAddOnePixel, + /** A 3D sunken border, with 1 pixel thickness. */ + EShallowSunken=ESunken|EOneStep|EAddOnePixel, + /** A 3D raised border, with outline, and 2 pixel thickness. */ + EDeepRaised=EWithOutline|ERaised|EOneStep|EAddTwoPixels, + /** The same as EDeepRaised. */ + EDeepRaisedWithOutline=EWithOutline|ERaised|EOneStep|EAddTwoPixels, + /** A 3D sunken border, with outline, and 2 pixel thickness. */ + EDeepSunken=EWithOutline|ESunken|EOneStep|EAddTwoPixels, + /** The same as EDeepSunken. */ + EDeepSunkenWithOutline=EWithOutline|ESunken|EOneStep|EAddTwoPixels, + /** A 3D raised border, with outline, and 3 pixel thickness. */ + EThickDeepRaisedWithOutline=EWithOutline|ERaised|EOneStep|EAddOnePixel|EAddTwoPixels, + /** A 3D raised border, with 2 pixels thickness and no outline on the left and + right hand sides. */ + EVerticalBar=ERaised|EOneStep|EAddTwoPixels|EWithOverlap, + /** A 3D raised border, with 2 pixels thickness and no outline on the top and bottom. */ + EHorizontalBar=ERaised|EOneStep|EAddTwoPixels|EHorizontal|EWithOverlap + }; + + /** Defines the logical border types. */ + enum TLogicalType + { + // Window family + /** Raised border around a window. */ + EWindow=EWindowFamily|ERaised, + // Container family + /** Flat border around a container. */ + EFlatContainer=EContainerFamily|EFlat, + /** Raised border around a container. */ + ERaisedContainer=EContainerFamily|ERaised, + /** Sunken border around a container. */ + ESunkenContainer=EContainerFamily|ESunken, + // Control Family + /** Flat border around a control. */ + EFlatControl=EControlFamily|EFlat, + /** Raised border around a control. */ + ERaisedControl=EControlFamily|ERaised, + /** Sunken border around a control. */ + ESunkenControl=EControlFamily|ESunken, + /** Raised border around a control with focus. */ + EFocusedRaisedControl=EControlFamily|ERaised|0x100, + /** Sunken border around a control with focus. */ + EFocusedSunkenControl=EControlFamily|ESunken|0x100 + }; + +public: + IMPORT_C TGulBorder(); + IMPORT_C TGulBorder(TBorderType aType); + IMPORT_C TGulBorder(TBorderType aType,TGulAdjacent aAdjacent); + IMPORT_C TGulBorder(TInt aType); + IMPORT_C TGulBorder(TInt aType,TGulAdjacent aAdjacent); + IMPORT_C void Draw(CGraphicsContext& aGc,const TRect& aRect,const TColors& aBorderColors) const; + IMPORT_C void Draw(CGraphicsContext& aGc,const TRect& aRect) const; + IMPORT_C TRect InnerRect(const TRect& aOuterRect) const; + IMPORT_C TRect OuterRect(const TRect& aInnerRect) const; + IMPORT_C void SetType(TInt aType); + IMPORT_C void SetAdjacent(TInt aAdjacent); + IMPORT_C TSize SizeDelta() const; + IMPORT_C TMargins Margins() const; + IMPORT_C TBool HasBorder() const; + IMPORT_C TInt Adjacent() const; + IMPORT_C TInt Type() const; +public: // Internal to Symbian + IMPORT_C TInt Thickness() const; + IMPORT_C TInt Rounding() const; +private: + TBool IsSunken() const; + TInt Depth() const; + void DrawOutline(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor) const; + void DrawRectOutline(CGraphicsContext& aGc,const TRect& aRect) const; + void DrawInline(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor) const; + TMargins OutlineMargins() const; + TMargins BorderMargins() const; + TMargins InlineMargins() const; + TRect OutlineInnerRect(const TRect& aOuterRect) const; + TRect BorderInnerRect(const TRect& aOuterRect) const; + TInt BorderRounding() const; + TInt InlineRounding() const; + void DrawOneStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aMidlight,TRgb aMid) const; + void DrawTwoStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aLight,TRgb aMidlight,TRgb aMid,TRgb aDark) const; + void DrawInvertedTwoStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aLight,TRgb aMidlight,TRgb aMid,TRgb aDark) const; + void DrawThreeStep(CGraphicsContext& aGc,const TRect& aRect,TRgb aBack,TRgb aLight,TRgb aMidlight,TRgb aMid,TRgb aDark) const; + void DrawTopLeft(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor,const TInt aRounding) const; + void DrawRoundedTopLeft(CGraphicsContext& aGc,const TRect& aRect,const TInt aRounding) const; + void DrawBottomRight(CGraphicsContext& aGc,const TRect& aRect,TRgb aColor,const TInt aRounding) const; + void DrawRoundedBottomRight(CGraphicsContext& aGc,const TRect& aRect,const TInt aRounding) const; + void DrawRoundedCorner(CGraphicsContext& aGc,const TPoint& aStart,const TInt aRoundedLength, const TBool aUp, const TBool aRight) const; + TInt RoundingMargin(const TInt aRoundedLength) const; + inline TInt InternalType() const; + void TranslateLegacyTypes(); +private: + TInt iType; + }; + +/** +The MGulLogicalBorder class specifices an interface for logical borders. + +@internalTechnology*/ +class MGulLogicalBorder + { +public: + virtual void Draw(const TGulBorder& aBorder,CGraphicsContext& aGc, const TRect& aRect, const TGulBorder::TColors& aBorderColors) const=0; + virtual TMargins Margins(const TGulBorder& aBorder) const=0; +private: + IMPORT_C virtual void MGulLogicalBorderReserved(); + }; + +/** +The GulTls class sets and gets the thread local storage for EGul. + +@internalTechnology*/ +class GulTls + { +public: + IMPORT_C static void SetLogicalBorder(MGulLogicalBorder* aLogicalBorder); + IMPORT_C static const MGulLogicalBorder* LogicalBorder(); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/gulcolor.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/gulcolor.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,274 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GULCOLOR_H__) +#define __GULCOLOR_H__ + +#if !defined(__W32STD_H__) +#include +#endif + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__GDI_H__) +#include +#endif + +/** Logical colours. + +Logical colours are used to specify the colour scheme for the controls in +an application. + +Many controls have one logical colour for text and another logical colour +for the background. Some logical colours have a dimmed variant for when the +control becomes inactive or disabled. Highlighted and pressed variants exist +for controls that support selection or which can be pressed. + +@publishedAll +@released */ +enum TLogicalColor + { + // Windows + /** The colour of a window's background. */ + EColorWindowBackground, + /** The colour of text in a window. */ + EColorWindowText, + // Controls + /** The colour of the background contents of a control. */ + EColorControlBackground, + /** The colour of the text inside a control. */ + EColorControlText, + /** The background colour of a control's border. */ + EColorControlSurroundBackground, + /** The colour of text in a control's border. */ + EColorControlSurroundText, + /** The colour of a control's background when highlighted for selection. */ + EColorControlHighlightBackground, + /** The colour of the text in a control when highlighted for selection. */ + EColorControlHighlightText, + /** The colour of a control's background when dimmed. */ + EColorControlDimmedBackground, + /** The colour of the text in a control when dimmed. */ + EColorControlDimmedText, + /** The colour of a control's background when dimmed and highlighted for selection. */ + EColorControlDimmedHighlightBackground, + /** The colour of the text in a control when dimmed and highlighted for selection. */ + EColorControlDimmedHighlightText, + // Dialogs + /** The colour of a dialog's background. */ + EColorDialogBackground, + /** The colour of text inside a dialog. */ + EColorDialogText, + /** A dialog title's background colour. */ + EColorDialogTitle, + /** A dialog title's background colour when pressed. */ + EColorDialogTitlePressed, + /** The text colour in a dialog's title. */ + EColorDialogTitleText, + /** The text colour in a dialog's title when pressed. */ + EColorDialogTitleTextPressed, + // Menus + /** The colour of the menubar's background. */ + EColorMenubarBackground, + /** The colour of text in the menubar. */ + EColorMenubarText, + /** The colour of the menubar title's background. */ + EColorMenubarTitleBackground, + /** The colour of text in the menubar title. */ + EColorMenubarTitleText, + /** The colour of the menu pane background. */ + EColorMenuPaneBackground, + /** The colour of text in the menu pane. */ + EColorMenuPaneText, + /** The colour of the menu pane background when highlighted for selection. */ + EColorMenuPaneHighlight, + /** The colour of text in the menu pane when highlighted for selection. */ + EColorMenuPaneTextHighlight, + /** The colour of the menu pane background when dimmed and highlighted. */ + EColorMenuPaneDimmedHighlight, + /** The colour of text in the menu pane when dimmed. */ + EColorMenuPaneDimmedText, + /** The colour of text in the menu pane when dimmed and highlighted for selection. */ + EColorMenuPaneDimmedTextHighlight, + // Command buttons + /** The colour of the button background, when the button is in the unset state. */ + EColorButtonFaceClear, + /** The colour of the button background when the button is in the set state. */ + EColorButtonFaceSet, + /** The colour of the button background when the button is in the set state and + is pressed. */ + EColorButtonFaceSetPressed, + /** The colour of the button background when the button is in the unset state and + is pressed. */ + EColorButtonFaceClearPressed, + /** The colour of the button text. */ + EColorButtonText, + /** The colour of the button text when the button is pressed. */ + EColorButtonTextPressed, + /** The colour of the button text when the button is dimmed. */ + EColorButtonTextDimmed, + // Message windows + /** The colour of the message window foreground. */ + EColorMsgWinForeground, + EColorMsgWinBackground, + // Scrollbars + /** The colour of the scroll bar border. */ + EColorScrollBarBorder, + EColorScrollBarShaft, + /** The colour of the scroll bar shaft background when dimmed. */ + EColorScrollBarShaftDimmed, + /** The colour of the scroll bar shaft background when pressed. */ + EColorScrollBarShaftPressed, + /** The colour of the background for scroll bars with no thumb and no shaft. */ + EColorScrollBarNoShaftOrThumb, + /** The colour of scroll bar buttons. */ + EColorScrollButtonIcon, + /** The colour of scroll bar buttons when pressed. */ + EColorScrollButtonIconPressed, + /** The colour of scroll bar buttons when dimmed. */ + EColorScrollButtonIconDimmed, + /** The colour of a scroll bar thumb's background. */ + EColorScrollButtonThumbBackground, + /** The colour of a scroll bar thumb's background when pressed. */ + EColorScrollButtonThumbBackgroundPressed, + /** The colour of a scroll bar thumb's background when dimmed. */ + EColorScrollThumbDimmed, + /** The colour of a scroll bar thumb's edge. */ + EColorScrollThumbEdge, + // Toolbars + /** The colour of a toolbar's background. */ + EColorToolbarBackground, + /** The colour of the text in a toolbar. */ + EColorToolbarText, + // Status pane + /** The colour of a status pane's background. */ + EColorStatusPaneBackground, + /** The colour of the text in a status pane. */ + EColorStatusPaneText, + // Labels + /** The colour of the text in a label. */ + EColorLabelText, + /** The colour of emphasised text in a label. */ + EColorLabelTextEmphasis, + /** The colour of the text in a label when dimmed. */ + EColorLabelDimmedText, + /** The colour of the label background when highlighted and dimmed. */ + EColorLabelHighlightPartialEmphasis, + /** The colour of the label background when highlighted. */ + EColorLabelHighlightFullEmphasis, + /** The number of logical colours */ + EColorNumberOfLogicalColors + }; + +class RReadStream; +class RWriteStream; +class CColorArray; + +// not available before Release 005 + +class CColorList : public CBase +/** A palette that maps logical colours (TLogicalColor) to physical (TRgb) values. It +also supports independent sections for applications: a section is identified by an +application UID, and the mappings are held as a colour array (CColorArray). + +A colour list also supports mapping for both four-grey and 256-colour schemes; the +256-colour scheme will be used and will look good if the screen mode supports 16 or +more colours. Otherwise, the four-grey scheme will be used. + +@publishedAll +@released */ + { +public: + IMPORT_C static CColorList* NewL(CArrayFix* aColors); + IMPORT_C ~CColorList(); + // Accessors + IMPORT_C TRgb Color(TLogicalColor aColor) const; + IMPORT_C TInt Count() const; + IMPORT_C TRgb Color(TUid aApp,TInt aColor) const; + IMPORT_C CColorArray* ColorArray(TUid aApp) const; + IMPORT_C TBool ContainsColorArray(TUid aApp) const; + // Manipulators + IMPORT_C void SetColor(TLogicalColor aLogicalColor,TRgb aColor); + IMPORT_C void AddColorArrayL(TUid aApp,CColorArray* aArray); // takes ownership + IMPORT_C void DeleteColorArray(TUid aApp); +public: + IMPORT_C static CColorList* NewLC(); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C void MergeL(const CColorList& aList); +private: + CColorList(CArrayFix* aColors); + TInt Find(TUid aApp) const; +private: + class TAppColorList + { + public: + inline TAppColorList(TUid aApp,CColorArray* aColorArray); + public: + TUid iApp; + CColorArray* iColorArray; + }; +private: + CArrayFix* iEikColors; + CArrayFix* iAppColors; + }; + +// not available before Release 005 + +class CColorArray : public CBase +/** A dynamic array of mappings between logical and physical colours (TRgb values). + +@publishedAll +@released */ + { +public: + IMPORT_C static CColorArray* NewL(); + IMPORT_C static CColorArray* NewLC(); + IMPORT_C ~CColorArray(); + IMPORT_C TRgb Color(TInt aLogicalColor) const; + IMPORT_C void SetColor(TInt aLogicalColor,TRgb aColor); + IMPORT_C TBool Contains(TInt aLogicalColor) const; + IMPORT_C TInt Count() const; + IMPORT_C void Reset(); + IMPORT_C void AddL(TInt aLogicalColor,TRgb aColor); + IMPORT_C void Remove(TInt aLogicalColor); +public: + static CColorArray* NewLC(const CColorArray& aArray); +public: + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; +private: + CColorArray(); + void ConstructL(); + TInt Find(TInt aLogicalColor) const; +private: + class TColor + { + public: + inline TColor(); + inline TColor(TRgb aColor,TInt aLogicalColor); + public: + void InternalizeL(RReadStream& aStream); + void ExternalizeL(RWriteStream& aStream) const; + public: + TRgb iColor; + TInt iLogicalColor; + }; + CArrayFixFlat iColors; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/guldef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/guldef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GULDEF_H__) +#define __GULDEF_H__ + +/** The sides on which borders can be adjacent. + +@publishedAll +@released */ +enum TGulAdjacent + { + /** Indicates that rectangle borders are not adjacent. */ + EGulAdjNone =0x00, + /** Adjacent at the top. */ + EGulAdjTop =0x01, + /** Adjacent at the bottom. */ + EGulAdjBottom =0x02, + /** Adjacent at the left. */ + EGulAdjLeft =0x04, + /** Adjacent at the right. */ + EGulAdjRight =0x08 + }; + +/** Symbian light grey. + +@publishedAll +@released */ +#define KRgbDitheredLightGray TRgb(204,204,204) + +/** Symbian dithered grey. + +@publishedAll +@released */ +#define KRgb1in4DitheredGray TRgb(238,238,238) + +/** Symbian green. + +@publishedAll +@released */ +#define KRgbSymbianGreen TRgb(0,153,153) + +/** Symbian light green. + +@publishedAll +@released */ +#define KRgbSymbianGreenLight TRgb(0,183,183) + +/** Symbian blue. + +@publishedAll +@released */ +#define KRgbSymbianBlue TRgb(0,102,153) + +/** Symbian dark blue. + +@publishedAll +@released */ +#define KRgbSymbianBlueDark TRgb(0,72,123) + +/** Symbian orange. + +@publishedAll +@released */ +#define KRgbSymbianOrange TRgb(255,218,155) + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/gulfont.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/gulfont.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,125 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GULFONT_H__) +#define __GULFONT_H__ + +#include +#include + +class TResourceReader; + +class TLogicalFont +/** Packages the attributes of a logical font. + +These attributes include a UID (iFontId) and a category (iCategory), either +of which can be used to identify a required system font. The possible values +for the UID are defined in the UI variant's look and feel layer, so are not +the same as the UID values that may be used to create a physical font. + +An object of this class can be passed by any application to CEikonEnv::Font(), +to return the closest matching system font (a CFont-derived object). + +@publishedAll +@released */ + { +public: + /** Logical font categories. + + The font category specifies the type of font that is required. It can be specified + as an alternative to the logical font UID. The physical fonts associated with + these categories are specified in the LAF layer, so are UI variant-specific. */ + enum TFontCategory + { + /** The normal system font. */ + EView, + /** The font used in buttons. */ + EButton, + /** The font used for annotations. This is smaller than the normal font. + For instance, it is used to draw the page number in some applications. */ + EAnnotation, + /** The font used for titles. */ + ETitle + }; + /** Font styles. */ + enum TFontStyle + { + /** Normal style. */ + ENormal, + /** Bold. */ + EBold, + /** Italics. */ + EItalic, + /** Bold and italics. */ + EBoldItalic, + /** Superscript. */ + ESuperscript, + /** Subscript. */ + ESubscript, + /** Light. This is the opposite of bold, i.e. a smaller than normal pen size is + used to draw it. */ + ELight, + /** Custom font. */ + ECustom + }; +public: + IMPORT_C TLogicalFont(); + IMPORT_C TLogicalFont(TUid aId); + IMPORT_C TLogicalFont(TFontCategory aCategory,TFontStyle aStyle,const TZoomFactor& aZoomFactor); + IMPORT_C TLogicalFont(TUid aId,TFontCategory aCategory,TFontStyle aStyle,const TZoomFactor& aZoomFactor); +public: + /** The logical font ID. */ + TUid iFontId; + /** The logical font category. */ + TFontCategory iCategory; + /** The font style. */ + TFontStyle iStyle; + /** The zoom factor. */ + TZoomFactor iZoomFactor; + }; + + +class CCleanupStackableFont : public CBase +/** Wraps a font (CFbsFont) object that can be pushed onto the cleanup stack. + +By default, the cleanup stack only handles CBase-derived classes, and untyped +(TAny*) objects that can be cleaned up by a simple memory free call. Fonts +must also be released, which this class handles automatically in its destructor. + +The font is initialised from a resource file, and can be identified by name +or UID. + +@publishedAll +@released +@see CFbsFont */ + { +public: + IMPORT_C static CCleanupStackableFont* NewL(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); + IMPORT_C static CCleanupStackableFont* NewLC(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); + IMPORT_C static CCleanupStackableFont* NewByNameL(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); + IMPORT_C static CCleanupStackableFont* NewByNameLC(TResourceReader& aReader,CWsScreenDevice& aScreenDevice); + IMPORT_C virtual ~CCleanupStackableFont(); +public: + IMPORT_C CFbsFont& Font() const; + IMPORT_C CFbsFont* TakeOwnershipOfFont(); +private: + CCleanupStackableFont(CWsScreenDevice& aScreenDevice); + static CCleanupStackableFont* NewLC(TBool aByUid,TResourceReader& aReader, CWsScreenDevice& aScreenDevice); +private: + CWsScreenDevice& iScreenDevice; + CFbsFont* iFont; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/gulicon.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/gulicon.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,53 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined(__GULICON_H__) +#define __GULICON_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +class CFbsBitmap; + +class CGulIcon : public CBase +/** Packages two bitmaps, one each for an icon image and its mask. + +@publishedAll +@released */ + { +public: + IMPORT_C static CGulIcon* NewLC(); + IMPORT_C static CGulIcon* NewL(); + IMPORT_C static CGulIcon* NewL(CFbsBitmap* aBitmap, CFbsBitmap* aMask=NULL); + // + IMPORT_C void SetBitmap(CFbsBitmap* aBitmap); + IMPORT_C void SetMask(CFbsBitmap* aMask); + IMPORT_C CFbsBitmap* Bitmap() const; + IMPORT_C CFbsBitmap* Mask() const; + IMPORT_C void SetBitmapsOwnedExternally(TBool aOwnedExternally); + IMPORT_C TBool BitmapsOwnedExternally() const; + // + IMPORT_C ~CGulIcon(); +private: + CGulIcon(); +private: + CFbsBitmap* iBitmap; + CFbsBitmap* iMask; + TBool iBitmapsOwnedExternally; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/gulutil.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/gulutil.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,370 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__GULUTIL_H__) +#define __GULUTIL_H__ + +#include +#include +#include +#include +#include + +/** +@publishedAll +@released +*/ +const TUint KTextUtilClipEndChar=0x2026; + +/** +@publishedAll +@released +*/ +const TUint KColumnListSeparator='\t'; + +class CFont; +class CFbsFont; +class CWsScreenDevice; +class TResourceReader; +class CColorArray; +class CGraphicsDevice; +class RWsSession; +class CColorList; +template class CArrayFix; + + +class TMargins8 +/** A set of margins stored as 8 bit integer values which can represent +either pixels or twips between -128 and +127. + +@publishedAll +@released */ + { +public : + /** Left margin in twips or pixels. */ + TInt8 iLeft; + /** Right margin in twips or pixels. */ + TInt8 iRight; + /** Top margin in twips or pixels. */ + TInt8 iTop; + /** Bottom margin in twips or pixels. */ + TInt8 iBottom; +public : + IMPORT_C TMargins8(); + IMPORT_C TMargins8(TInt8 aLeft, TInt8 aTop, TInt8 aRight, TInt8 aBottom); + IMPORT_C void SetAllValuesTo(TInt aCommonValue); + IMPORT_C TRect InnerRect(const TRect& aOuterRect) const; + IMPORT_C TRect OuterRect(const TRect& aInnerRect) const; + IMPORT_C TSize SizeDelta() const; + }; + + +class DrawUtils +/** Provides static functions for drawing text in a rectangle. + +@publishedAll +@released */ + { +public: + IMPORT_C static void DrawText(CGraphicsContext& aGc,const TDesC& aString,const TRect& aBox,TInt aBaseLineOffset, + CGraphicsContext::TTextAlign aHoriz,TInt aMargin,const CFont* aFont); + IMPORT_C static void DrawBetweenRects(CGraphicsContext& aGc,const TRect& aOuterRect,const TRect& aInnerRect); + IMPORT_C static void ClearBetweenRects(CGraphicsContext& aGc,const TRect& aOuterRect,const TRect& aInnerRect); + }; + + +class TextUtils +/** Provides static functions for truncating and aligning text strings. + +@publishedAll +@released */ + { +public: + IMPORT_C static void ClipToFit(TDes& aBuffer,const CFont& aFont,TInt aMaxWidthInPixels,TChar aAlternativeEnd=KTextUtilClipEndChar); + IMPORT_C static TInt ColumnText(TPtrC& aColumnText,TInt aColumn,const TDesC* aSourceText,TChar aColumnSeparator=KColumnListSeparator); + IMPORT_C static void TruncateToNumChars(TDes& aBuffer, TInt numChars); + }; + +class FontUtils +/** Provides static functions for getting information about the fonts supported by a graphics +device. + +@publishedAll +@released */ + { +public: + IMPORT_C static void GetAvailableFontsL(const CGraphicsDevice& aDevice,CDesCArray& aFontNameList, + TInt aFonts=EGulNoSymbolFonts); + IMPORT_C static TInt TypefaceAttributes(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName); + IMPORT_C static TInt GetAvailableHeightsInTwipsL(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName, + CArrayFix& aHeightList); + IMPORT_C static TInt GetAvailableHeightsInTwipsAndPointsL(const CGraphicsDevice& aDevice,const TDesC& aTypefaceName, + CArrayFix& aTwipsList,CDesCArray& aPointsList); + IMPORT_C static TInt PointsFromTwips(TInt aTwips); + IMPORT_C static TInt TwipsFromPoints(TInt aPoints); + IMPORT_C static TInt TwipsFromPoints(const TDesC& aPoints); + IMPORT_C static TInt IndexOfNearestHeight(CArrayFix& aTwipsList,TInt aHeight); + }; + + +class ResourceUtils +/** Provides static functions for resource reading. + +All functions use pre-initialised resource reader objects to read information +from resource files. + +@publishedAll +@released +@see CCoeEnv::CreateResourceReaderLC() */ + { +public: + IMPORT_C static CFbsFont* CreateNamedScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); + IMPORT_C static CFbsFont* CreateNamedScreenFontInPixelsL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); + IMPORT_C static CFbsFont* CreateScreenFontL(TResourceReader& aResourceReader,CWsScreenDevice& aScreenDevice); + inline static TInt8 ReadTInt8L(TResourceReader& aReader); + inline static TInt16 ReadTInt16L(TResourceReader& aReader); + inline static TInt32 ReadTInt32L(TResourceReader& aReader); + IMPORT_C static void PopulateColorArrayL(CColorArray& aColors,TResourceReader& aReader); +private: + enum TResourceTypeInt { EResourceInt8,EResourceInt16,EResourceInt32 }; +private: + IMPORT_C static TInt32 ReadResourceIntL(TResourceReader& aReader,TResourceTypeInt aSize); + }; + +class ColorUtils +/** Provides static functions for manipulating colours. + +@publishedAll +@released +@see TDisplayMode */ + { +public: + /** The orientation of a bitmap. */ + enum TBitmapOrientation + { + /** The bitmap is vertical. */ + EBitmapOrientationVertical, + /** The bitmap is horizontal. */ + EBitmapOrientationHorizontal + }; +public: + IMPORT_C static TRgb ColorAdjust(TRgb aColor,TInt aPercentage); + IMPORT_C static void CreateGradientBitmapL(CFbsBitmap& aBitmap, const RWsSession& aWs, TInt aBreadth, + TBitmapOrientation aOrientation, TRgb aStartColor, TRgb aEndColor); + IMPORT_C static CColorList* CreateSystemColorListL(RFs& aFs); + IMPORT_C static CColorList* CreateSystemColorListL(RFs& aFs,const CColorList& aColorList); + IMPORT_C static void UpdateSystemColorListL(RFs& aFs,CColorList& aColorList); + IMPORT_C static void GetRgbDerivedBorderColors(TGulBorder::TColors& aBorderColors,TRgb aBackgroundColor,TDisplayMode aMode); + IMPORT_C static TRgb RgbDarkerColor(TRgb aRgb,TDisplayMode aMode); + IMPORT_C static TRgb RgbMidDarkerColor(TRgb aRgb,TDisplayMode aMode); + IMPORT_C static TRgb RgbLighterColor(TRgb aRgb,TDisplayMode aMode); + }; + + +class TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest item in a range of indexed text items. + +This is the base class for several classes used to get the maximum width for +date and time components. + +Derived classes should override the pure virtual methods to supply an appropriate +range of items. + +@publishedAll +@released */ + { +protected: + /** Default constructor. */ + inline TFindWidthOfWidestTextItem() {} +public: + IMPORT_C TInt MaximumWidthInPixels(const CFont& aFont) const; +private: + /** Gets the first and last index in the range of items. + + @param aFirstIndex On return, the first index. + @param aLastIndex On return, the last index. + @publishedAll + @released */ + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const=0; + /** Gets the text item at the specfied index. + + @param aText On return, the indexed text item. + @param aIndex The index. + @publishedAll + @released */ + virtual void GetTextItem(TDes& aText, TInt aIndex) const=0; + }; + + +class TFindWidthOfWidestDigit : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest digit, when displayed in a specified +font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released */ + { +public: + IMPORT_C TFindWidthOfWidestDigit(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + +class TFindWidthOfWidestDigitType : public TFindWidthOfWidestTextItem +/** +@publishedAll +@released +*/ + { +public: + IMPORT_C TFindWidthOfWidestDigitType(TDigitType aDigitType); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + +private: + TDigitType iDigitType; + }; + +class TFindWidthOfWidestAmPmName : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest Am or Pm text, when displayed in a specified +font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released +@see TAmPmName */ + { +public: + IMPORT_C TFindWidthOfWidestAmPmName(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + +class TFindWidthOfWidestAbbreviatedDayName : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest abbreviated day name (for instance Mon, Tue) +when displayed in a specified font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released +@see TDayNameAbb */ + { +public: + IMPORT_C TFindWidthOfWidestAbbreviatedDayName(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + + +class TFindWidthOfWidestDayName : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest day name, when displayed in a specified +font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released */ + { +public: + IMPORT_C TFindWidthOfWidestDayName(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + + +class TFindWidthOfWidestAbbreviatedMonthName : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest abbreviated month name (for instance Jan, Feb), +when displayed in a specified font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released */ + { +public: + IMPORT_C TFindWidthOfWidestAbbreviatedMonthName(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + +class TFindWidthOfWidestMonthName : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest month name, when displayed in a specified +font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released */ + { +public: + IMPORT_C TFindWidthOfWidestMonthName(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + +class TFindWidthOfWidestDateSuffix : public TFindWidthOfWidestTextItem +/** Finds the width in pixels of the widest date suffix (for instance st, nd), +when displayed in a specified font. + +After construction, call MaximumWidthInPixels(), defined in the base class, +specifying the font. + +@publishedAll +@released */ + { +public: + IMPORT_C TFindWidthOfWidestDateSuffix(); +private: + virtual void GetFirstAndLastIndex(TInt& aFirstIndex, TInt& aLastIndex) const; + virtual void GetTextItem(TDes& aText, TInt aIndex) const; + }; + +// class ResourceUtils +inline TInt8 ResourceUtils::ReadTInt8L(TResourceReader& aReader) +/** Reads an 8 bit signed integer from a resource. + +@param aReader Resource reader to use to read the integer. +@return The 8 bit signed integer. */ + { return((TInt8)ReadResourceIntL(aReader,EResourceInt8)); } +inline TInt16 ResourceUtils::ReadTInt16L(TResourceReader& aReader) +/** Reads a 16 bit signed integer from a resource. + +@param aReader Resource reader to use to read the integer. +@return The 16 bit signed integer. */ + { return((TInt16)ReadResourceIntL(aReader,EResourceInt16)); } +inline TInt32 ResourceUtils::ReadTInt32L(TResourceReader& aReader) +/** Reads a 32 bit signed integer from a resource. + +@param aReader Resource reader to use to read the integer. +@return The 32 bit signed integer. */ + { return((TInt32)ReadResourceIntL(aReader,EResourceInt32)); } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,52 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file http.h + @warning : This file contains Rose Model ID comments - please do not delete + @publishedAll + @released +*/ + +#ifndef __HTTP_H__ +#define __HTTP_H__ + +// System includes +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // __HTTP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/cauthenticationfilterinterface.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/cauthenticationfilterinterface.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,93 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CAuthenticationFilterInterface.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CAUTHENTICATIONFILTERINTERFACE_H__ +#define __CAUTHENTICATIONFILTERINTERFACE_H__ + +// System includes +#include +#include +#include + +// Forward declarations +class MHTTPAuthenticationCallback; + + +class CAuthenticationFilterInterface : public CBase +/** +The ECOM interface definition for an HTTP authentication filter. Implementations +of an authentication filter must inherit this class. +@publishedAll +@released +*/ + { +public: // Methods + /** + @fn InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback) + Intended Usage: This method is used to install the authentication filter to the filter queue. + The returned pointer is not owned as the filters must be self-destroying when + they are unloaded. + @param aSession A handle to the transport session + @param aCallback A pointer to the object implementing the callback function + @return Pointer to the newly installed plugin + @pre The session had already been setup + @post The filter(s) have been installed + */ + inline static void InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback); + + /** + @fn ~CAuthenticationFilterInterface() + Intended Usage: Virtual destructor + @pre The object identified by the destructor key in iEcomDtorID exists + @post The object is destroyed + */ + inline ~CAuthenticationFilterInterface(); + +public: + struct TAuthenticationParams + { + RHTTPSession* iSession; + MHTTPAuthenticationCallback* iCallback; + }; + +private: // Attributes + /// The ECom destructor key identifier + TUid iEcomDtorID; + }; + +//---------------------------------------------------------------------------------------- + +inline void CAuthenticationFilterInterface::InstallFilterL(RHTTPSession& aSession, MHTTPAuthenticationCallback* aCallback) + { + const TUid KUidAuthenticationFilter = {0x101F447C}; + TAuthenticationParams authParams; + authParams.iSession = &aSession; + authParams.iCallback = aCallback; + REComSession::CreateImplementationL(KUidAuthenticationFilter, _FOFF(CAuthenticationFilterInterface,iEcomDtorID), &authParams); + } + +inline CAuthenticationFilterInterface::~CAuthenticationFilterInterface() + { + REComSession::DestroyedImplementation(iEcomDtorID); + } + +#endif // __CAUTHENTICATIONFILTERINTERFACE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/cecomfilter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/cecomfilter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,120 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CEComFilter.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CECOMFILTER_H__ +#define __CECOMFILTER_H__ + +// System includes +#include +#include +#include + +/** +The ECom filter interface UID +@publishedAll +@released +*/ +const TUid KUidFilterPluginInterface = {0x101F446D}; + + +//##ModelId=3C4C0F400280 +class CEComFilter : public CBase +/** +This class serves as the base class for ECom filter plugins. It provides minimal functionality +to simply install and destroy filters specified by their UID or data type. The RHTTPSession +passed in is passed onto the filter as a TAny* pointer and therefore must be casted back to +an RHTTPSession pointer by the filter. +@publishedAll +@released +*/ + { +public: // Methods + /** + @fn InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid) + Intended Usage: This method is used to install filters to the filter queue. The implementation + UID of the filter plugin is passed to identify the plugin that is required. + The returned pointer is not owned as the filters must be self-destroying when + they are unloaded. + @param aSession A handle to the transport session + @param aEComFilterUid The implementation UID of the plugin + @return Pointer to the newly installed plugin + @pre The session had already been setup + @post The filter(s) have been installed + */ + //##ModelId=3C4C0F4002A8 + inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid); + + /** + @fn InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType) + Intended Usage: This method is used to install filters to the filter queue. The implementation + UID of the filter plugin is passed to identify the plugin that is required. + The returned pointer is not owned as the filters must be self-destroying when + they are unloaded. + @param aSession A handle to the transport session + @param aEComFilterDataType A descriptor containing the datatype of the filter to load + @return Pointer to the newly installed plugin + @pre The session had already been setup + @post The filter(s) have been installed + */ + //##ModelId=3C4C0F4002AB + inline static CEComFilter* InstallFilterL(RHTTPSession aSession, const TDesC8& aEComFilterDataType); + + /** + @fn ~CEComFilter() + Intended Usage: Virtual destructor + @pre The object identified by the destructor key in iEcomDtorID exists + @post The object is destroyed + */ + //##ModelId=3C4C0F40029E + inline ~CEComFilter(); + +private: // Attributes + /// The ECom destructor key identifier + //##ModelId=3C4C0F400297 + TUid iEcomDtorID; + }; + +//---------------------------------------------------------------------------------------- + +inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession, const TUid aEComFilterUid) + { + TAny* filterPlugin = REComSession::CreateImplementationL(aEComFilterUid, _FOFF(CEComFilter,iEcomDtorID), &aSession); + return REINTERPRET_CAST(CEComFilter*, filterPlugin); + } + +inline CEComFilter* CEComFilter::InstallFilterL(RHTTPSession aSession,const TDesC8& aEComFilterDataType) + { + TEComResolverParams resolverParams; + resolverParams.SetDataType(aEComFilterDataType); + // This will leave if the plugin is not found + TAny* filterPlugin = REComSession::CreateImplementationL(KUidFilterPluginInterface, + _FOFF(CEComFilter,iEcomDtorID), + &aSession, resolverParams); + return REINTERPRET_CAST(CEComFilter*, filterPlugin); + } + +inline CEComFilter::~CEComFilter() + { + REComSession::DestroyedImplementation(iEcomDtorID); + } + +#endif // __CECOMFILTER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/cheadercodec.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/cheadercodec.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,318 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CHeaderCodec.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CHEADERCODEC_H__ +#define __CHEADERCODEC_H__ + +// System includes +#include +#include + +// Forward declarations +class CHeaderWriter; +class CHeaderReader; + + +//##ModelId=3C4C18850126 +class CHeaderCodec : public CBase +/** +An abstract HTTP header codec. + +Each instance of a concrete subclass of CHeaderCodec is associated with, and owned +by, a specific CProtocolHandler. It provides on-demand encoding/decoding of +HTTP header data, between the generic format used by clients/filters to formulate +requests and interpret responses, and the raw format used by +the transport handlers (and origin servers/gateways/etc.) + +The CHeaderCodec has an associated instance of a sub-class of each of +CHeaderReader and CHeaderWriter. It delegates the actual encoding and +decoding function to these instances. + +Header codecs provide a mechanism for extensibility whereby if one codec can't +decode (or encode) a given header, it locates a codec that can, and then delegates +the task to that codec instead. +@publishedAll +@released +*/ + { +public: // methods + +/** + Intended Usage: Destructor - cleans up and releases resources to the system. +*/ + //##ModelId=3C4C18850194 + IMPORT_C virtual ~CHeaderCodec(); + +/** + Encode the supplied header field. This method uses the associated + concrete CHeaderWriter object to do a conversion of the field into + raw form from the generic internal representation. + + @param aHeader (in) A proxy for the header field to be encoded + @leave KErrNotSupported if a codec that supports encoding this header + cannot be found +*/ + //##ModelId=3C4C1885018C + IMPORT_C void EncodeHeaderL(RHeaderField& aHeader) const; + +/** + Decode the supplied header field. This method uses the associated + concrete CHeaderReader object to do a conversion of the field into + the generic internal representation from the raw form. + + @param aHeader (in) A proxy for the header field to be decoded + + @leave KErrNotSupported if a codec that supports decoding this header + cannot be found + +*/ + //##ModelId=3C4C1885018A + IMPORT_C void DecodeHeaderL(RHeaderField& aHeader) const; + +/** + Intended Usage: Concrete header codec classes must implement this method to + indicate to the framework whether their concrete CHeaderWriter is + capable of encoding the named header field. + @param aHeaderField (in) A proxy for the header field to be encoded + @return A flag indicating ETrue if the field can be encoded. +*/ + //##ModelId=3C4C18850181 + virtual TBool CanEncode(RStringF aHeaderField) const = 0; + +/** + Intended Usage: Concrete header codec classes must implement this method to + indicate to the framework whether their concrete CHeaderReader is + capable of decoding the named header field. + @param aHeaderField (in) A proxy for the header field to be encoded + @return A flag indicating ETrue if the field can be decoded. + */ + //##ModelId=3C4C18850178 + virtual TBool CanDecode(RStringF aHeaderField) const = 0; + +/** + Intended Usage: Concrete header codecs must be implement this method if they wish to + delegate the encoding/decoding of particular header fields to a + different codec. + This would be done if the codec doesn't have the ability itself to + do the encode/decode but can locate an alternative that does. This + function may leave with a Standard Symbian OS error code. eg. KErrNoMemory + + The caller takes ownership of the returned codec. + @param aHeaderField (in) A proxy for the header field to be encoded + @return A pointer to the new CHeaderCodec, or NULL if one couldn't be found. + @leave KErrNoMemory, Not enough memory to create object. +*/ + //##ModelId=3C4C18850176 + virtual CHeaderCodec* FindDelegateCodecL(RStringF aHeaderField) const = 0; + +protected: // methods + +/** + Default constructor. + */ + //##ModelId=3A914DF20273 + IMPORT_C CHeaderCodec(); + +/** + Second phase construction in which any necessary allocation is done + Implementations of this interface may leave with standard erros like KErrNoMemory if there is + insufficient memory for allocation in the second phase. + */ + //##ModelId=3C4C1885016E + IMPORT_C void ConstructL(); + +protected: // attributes + + /** The owned header writer object that does actual encoding of header fields. + */ + //##ModelId=3C4C18850164 + CHeaderWriter* iWriter; + + /** The owned header reader object that does actual decoding of header fields. + */ + //##ModelId=3C4C1885015A + CHeaderReader* iReader; + +private: // methods + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C1885016D + inline virtual void Reserved1(); + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C1885016C + inline virtual void Reserved2(); + +private: // attributes + + /** The most recently-obtained delegate codec + */ + //##ModelId=3C4C18850150 + mutable CHeaderCodec* iDelegateCodec; + }; + + +//##ModelId=3C4C188601D1 +class CHeaderWriter : public CBase +/** +An abstract HTTP header encoder. CHeaderWriter provides an interface used by its +owning codec to do conversion of header data from the generic internal header +representation to the raw representation used for a particular protocol/transport. +Specific sub-classes of CHeaderWriter are associated with specific protocol handlers. +@publishedAll +@released +*/ + { +public: // methods + +/** + Intended Usage: Destructor - cleans up and release resources to the system. +*/ + //##ModelId=3C4C188601FC + IMPORT_C virtual ~CHeaderWriter(); + +/** + Intended Usage: Encodes the supplied header field. This method does a conversion + of the field into raw form from the generic internal representation. + + Implementations of this interface may leave with any of KErrNotSupported, KErrHttpEncodeDoWWWAuthenticate, + KErrHttpEncodeAuthorization, KErrHttpEncodeDoAge, KErrHttpEncodeDoVary, KErrHttpEncodeDoContentLanguage. + + Specific header writer sub-classes must implement this method. + @param aHeader (in) A proxy for the header field to be encoded + */ + //##ModelId=3C4C188601FA + virtual void EncodeHeaderL(RHeaderField& aHeader) = 0; + +protected: // methods + +/** + Default constructor. + */ + IMPORT_C CHeaderWriter(); + +/** + Second phase construction in which any necessary allocation is done + Implementations of this interface may leave with standard errors like KErrNoMemory. + */ + //##ModelId=3C4C188601F9 + IMPORT_C void ConstructL(); + +private: // methods + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C188601F1 + inline virtual void Reserved1(); + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C188601F0 + inline virtual void Reserved2(); + }; + + +//##ModelId=3C4C188602FE +class CHeaderReader : public CBase +/** +An abstract HTTP header decoder. CHeaderReader provides an interface used by its +owning codec to do conversion of header data from the raw representation used for +a particular protocol/transport to the generic internal header representation. +Specific sub-classes of CHeaderWriter are associated with specific protocol +handlers. +@publishedAll +@released +*/ + { +public: // methods + +/** + Intended Usage: Destructor - cleans up and release resources to the system. +*/ + //##ModelId=3C4C1886031E + IMPORT_C virtual ~CHeaderReader(); + +/** + Intended Usage: Decodes the supplied header field. This method does a conversion + of the field from the generic internal representation into raw form. + + Specific header reader sub-classes must implement this method. + + Implementations of this interface may leave with any of KErrHttpDecodeAccept, KErrHttpDecodeAcceptCharset, + KErrHttpDecodeAcceptLanguage, KErrHttpDecodeAcceptEncoding, KErrNotSupported. + + @param aHeader (in) A proxy for the header field to be decoded + +*/ + //##ModelId=3C4C1886031C + virtual void DecodeHeaderL(RHeaderField& aHeader) = 0; + +protected: // methods + +/** + Default constructor. + */ + IMPORT_C CHeaderReader(); + +/** + Second phase construction in which any necessary allocation is done + Implementations of this interface may leave with standard errors like KErrNoMemory. + */ + //##ModelId=3C4C18860315 + IMPORT_C void ConstructL(); + +private: // methods + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C18860314 + inline virtual void Reserved1(); + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C18860313 + inline virtual void Reserved2(); + }; + + +inline void CHeaderCodec::Reserved1() + {} +inline void CHeaderCodec::Reserved2() + {} +inline void CHeaderWriter::Reserved1() + {} +inline void CHeaderWriter::Reserved2() + {} +inline void CHeaderReader::Reserved1() + {} +inline void CHeaderReader::Reserved2() + {} + +#endif /* __CHEADERCODEC_H__ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/cprotocolhandler.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/cprotocolhandler.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,555 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// please do not delete +// +// + + + +/** + @file CProtocolHandler.h + @warning : This file contains Rose Model ID comments +*/ + +#ifndef __CPROTOCOLHANDLER_H__ +#define __CPROTOCOLHANDLER_H__ + +// System includes +#include +#include +#include +#include + +// Forward declarations +class CHeaderCodec; +class CProtTransaction; +class CSecurityPolicy; +class MProtHandlerInterface; + +/** +The ECom protocol handler plugin interface UID. +@publishedAll +@released +*/ +const TUid KUidProtocolHandlerPluginInterface = {0x1000A449}; + +// +/** +Defined active object priorities for the Protocol Handler +@publishedAll +@released +*/ +const TInt KProtocolHandlerActivePriority = CActive::EPriorityStandard; +/** +Defined active object priorities for the Transaction +@publishedAll +@released +*/ +const TInt KTransactionActivePriority = KProtocolHandlerActivePriority+1; + + +//##ModelId=3C4C186A02A3 +class CProtocolHandler : public CActive, public MHTTPFilter +/** +An abstract protocol handler. Protocol handlers are required to +act as the bridge between abstract representations of sessions, transactions and +headers (the client side of the HTTP architecture) and specific comms transports +(the network side of the architecture). + +Each instance of a concrete subclass of CProtocolHandler is associated +with a specific client session, and hence with a particular choice of proxy type, +and by implication, transport type. It is designed to appear like a filter in +order to be placed at the end of a session's filter queue. This allows it to +receive transaction-related events in the same way that any other filter +(or indeed, the client) does. An active object, it may implement a queuing +system for submitted transactions, according to the chosen internal service +model. + +In order to divide the abstract functionality associated with handling the HTTP +protocol handler from the specifics needed for a particular choice of transport, +this class defines a number of pure virtual methods which allow it to defer +transport-specific choices or mechamisms. These are mainly concerned with the +service model (ie. allocation of transactions to objects that can handle them), the +codec model (ie. on-demand encoding/decoding of HTTP header data) and general +housekeeping (eg. instantiation and cleanup of objects at particular points in +a transaction lifecycle). +@publishedAll +@released +*/ + { +public: // Methods + +/** + Standard factory constructor. This is the ECOM interface class from + which concrete protocol handlers are derived. The method queries + ECOM for the protocol handler plugin that matches the protocol + description passed in. + @param aProtocol (in) The name of the protocol required. + @param aSession (in) The HTTP session on which this protocol handler + will be installed. + @leave KErrNoMemory if there was not enough memory to create the object. +*/ + //##ModelId=3C4C186B007E + static CProtocolHandler* NewL(const TDesC8& aProtocol, RHTTPSession aSession); + +/** + Intended Usage: Class destructor. +*/ + //##ModelId=3C4C186B0075 + IMPORT_C virtual ~CProtocolHandler(); + +/** + Obtain the protocol handler's header codec. + @return The header codec owned by this protocol handler, or NULL if one + has not yet been created. + @see CHeaderCodec +*/ + //##ModelId=3C4C186B0074 + IMPORT_C CHeaderCodec* Codec() const; + + +/** + Get the Server Certificate for the current session. + @return The certificate information or NULL if it is not available +*/ + IMPORT_C const CCertificate* SessionServerCert(); + +/** + Get the Server Certificate for the specified transaction. + @param aTransaction The transaction for which the certificate is requested + @return The certificate information or NULL if it is not available +*/ + IMPORT_C const CCertificate* TransactionServerCert( RHTTPTransaction aTransaction); + +public: // Methods to be implemented in specific protocol handlers + +/** + Intended Usage: Get the Server Certificate for the current session. + @param aServerCert A TCertInfo which will be filled with the certificate information + @return An error code. KErrNone if aServerCert has been completed, otherwise one of + the system wide error codes +*/ + virtual TInt SessionServerCert(TCertInfo& aServerCert) = 0; + +/** + Intended Usage: Get the Server Certificate for the specified transaction. + @param aServerCert A TCertInfo which will be filled with the certificate information + @param aTransaction The transaction for which the certificate is requested + @return An error code. KErrNone if aServerCert has been completed, otherwise one of + the system wide error codes +*/ + virtual TInt TransactionServerCert(TCertInfo& aServerCert, RHTTPTransaction aTransaction) = 0; + +public: // Methods from MHTTPFilterBase + +/** + Intended Usage: Called when the filter's registration conditions are satisfied for events that + occur on a transaction. Any Leaves must be handled by the appropriate MHFRunError. + Note that this function is not allowed to leave if called with certain events. + @see THTTPEvent + @param aTransaction The transaction that the event has occurred on. + @param aEvent aEvent The event that has occurred. + @leave Standard Symbian OS error codes. e.g. KErrNoMemory. + @see MHTTPFilterBase +*/ + //##ModelId=3C4C186B0061 + IMPORT_C virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent); + +/** + Intended Usage: Called when the filters registration conditions are satisfied for events that occur + on the session. Any leaves must be handled by the appropriate MHFRunError. + @param aEvent The session event that has occured. + @leave KErrNoMemory if an attempt to allocate memory has failed + @leave KErrHttpCantResetRequestBody if the request body needed to be rewound by the client + but it doesn't support this + @see MHTTPFilterBase +*/ + //##ModelId=3C4C186B0057 + IMPORT_C virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent); + +/** + Intended Usage: Called when RunL leaves from a transaction event. This works in the same + way as CActve::RunError; return KErrNone if you have handled the error. + If you don't completely handle the error, a panic will occur. + @param aError The leave code that RunL left with. + @param aTransaction The transaction that was being processed. + @param aEvent The Event that was being processed. + @return KErrNone if the error has been cancelled or the code + of the continuing error otherwise. + @see MHTTPFilterBase +*/ + //##ModelId=3C4C186B0043 + IMPORT_C virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent); + +/** + Intended Usage: Called when MHFRunL leaves from a session event. This works in the same + way as CActve::RunError. If you don't completely handle the error, a panic will occur. + @param aError The leave code that RunL left with. + @param aEvent The Event that was being processed. + @return KErrNone if the error has been cancelled or the code + of the continuing error otherwise. + @see MHTTPFilterBase +*/ + //##ModelId=3C4C186B0038 + IMPORT_C virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent); + +public: // Methods from MHTTPFilter + +/** + Intended Usage: Called when the filter is being removed from a session's filter queue. + @param aSession The session it's being removed from + @param aHandle The filter handle. Complex filters may need to + refer to this to keep track of which particular registration is + being unloaded. + @see MHTTFilter +*/ + //##ModelId=3C4C186B0025 + IMPORT_C virtual void MHFUnload(RHTTPSession aSession, THTTPFilterHandle aHandle); + +/** + Intended Usage: Called when the filter is being added to the session's filter queue. + @param aSession The session it's being added to. + @param aHandle The filter handle. Complex filters may need to keep + track of this, for instance if generating events in response to + external stimuli + @see MHTTFilter + */ + //##ModelId=3C4C186B001A + IMPORT_C virtual void MHFLoad(RHTTPSession aSession, THTTPFilterHandle aHandle); + +protected: // callbacks/methods for sub-classes + +/** + Callback method for concrete protocol handler sub-classes to + inform the base protocol handler that a transaction has completed. + The concrete protocol handler must call this method in order to + supply a completion event that will be sent to the client. + In addition, the method allows the base protocol handler to do some + queue management. + @param aTrans (in) the completed transaction + @param aEventStatus (in) an event to be sent back to the client along + the filter queue + @leave THTTPPanic::EInvalidFilterHandle if unable to send event. + */ + //##ModelId=3C4C186B0010 + IMPORT_C void TransactionCompletedL(RHTTPTransaction aTrans, THTTPEvent aEventStatus); + +/** + Obtain the number of currently active transactions + @return The number of currently active transactions + */ + //##ModelId=3C4C186B0006 + IMPORT_C TInt NumActiveTransactions() const; + +/** + Callback method for concrete protocol handler sub-classes to + inform the base protocol handler that a transaction has failed + utterly. (i.e. the sub-class used aTrans.Fail().) The base protocol + handler sets the transaction state to be cancelled. + @param aTrans (in) the completed transaction + */ + //##ModelId=3C4C186A03E5 + IMPORT_C void TransactionFailed(RHTTPTransaction aTrans); + +/** + Completes this active object - allows the protocol handler to + reevaluate the queue of pending transactions and service new ones + if possible. + */ + //##ModelId=3C4C186A03E4 + IMPORT_C void CompleteSelf(); + +/** + Searches the array of CProtTransaction objects to if the + aTransaction object is wrapped by one of them. If one is found aProtTransaction is set to it + @param aTransaction The transaction to search for. + @param aProtTransaction Reference to a CProtTransaction which will be set to the + CProtTransaction which wraps the RHTTPTransaction. + @return If a CProtTransaction object is found, a positive value is + returned that is the index to that object in the array. If + no object is found, KErrNotFound is returned. + */ + IMPORT_C TInt FindTransaction(RHTTPTransaction aTransaction, const CProtTransaction*& aProtTransaction) const; + +private: // methods to be implemented in specific protocol handlers + +/** Intended usage: Creates the specific type of codec required for a specific type + of protocol handler. + + This must be implemented by a concrete protocol handler sub-class. + */ + //##ModelId=3C4C186A03DC + virtual void CreateCodecL() = 0; + +/** Intended Usage: Creates a representation of a client transaction to be used in the + protocol handler. Since the protocol handler deals with the low- + level data for a transaction as sent over a particular transport, + an appropriate CProtTransaction-derived class is used that owns a + CRxData and a CTxData to handle the low-level data. + + This must be implemented by a concrete protocol handler sub-class. + @leave KErrNoMemory if there was not enough memory to create the object. + create the object. + @param aTransaction The RHTTPTransaction object associated with + this CProtTransaction object. + @return A pointer to a created CProtTransaction-derived class. + @see CRxData + @see CTxData + */ + //##ModelId=3C4C186A03DA + virtual CProtTransaction* CreateProtTransactionL(RHTTPTransaction aTransaction) = 0; + +/** Intended Usage: Attempt to service the transaction. This implies that the concrete + protocol handler will allocate some transport resources to the + transaction - which could fail if the protocol handler has hit an + internal limit of resources or bandwidth. + Implementations of this interface may leave with any of KErrHttpInvalidUri, + KErrGeneral, KErrNoMemory + + This must be implemented by a concrete protocol handler sub-class. + @param aTrans The pending protocol transaction object which is to be + serviced. + @return A flag that indicates if the transaction can be serviced immediately. + */ + //##ModelId=3C4C186A03D0 + virtual TBool ServiceL(CProtTransaction& aTrans) = 0; + +/** Intended Usage: Called when the RHTTPTransaction object corresponding to aTrans has + been closed by the client. This allows the concrete protocol handler + to do any cleanup required for this particular transaction. + + Ownership of the CProtTransaction object is transferred back to the + concrete protocol handler, which then has deletion responsibility + for it. By the time this function has been called, the base + protocol handler will have dequeued the transaction. + + The client's RHTTPTransaction will be closed when this function + returns, so it is not possible to send events to the client during + the function's execution. + + This must be implemented by a concrete protocol handler sub-class. + @param aTrans (in) A pointer to the transaction about to be closed. + */ + //##ModelId=3C4C186A03C6 + virtual void ClosedTransactionHook(CProtTransaction* aTrans) = 0; + +/** Intended Usage: Called when the RHTTPTransaction object corresponding to aTrans has + been cancelled by the client or an intermediate filter. This allows + the concrete protocol handler to do any cleanup and to perform the + necessary actions for cancellation on its transport layer. + + This must be implemented by a concrete protocol handler sub-class. + @param aTrans (in) A reference to the transaction being cancelled. + */ + //##ModelId=3C4C186A03B3 + virtual void CancelTransactionHook(CProtTransaction& aTransaction) = 0; + +/** Intended Usage: Called to notify the concrete protocol handler that new request + body data is available for transmission. + + This must be implemented by a concrete protocol handler sub-class. + @param aTrans (in) A reference to the transaction whose request body + has new data available. + */ + //##ModelId=3C4C186A03A8 + virtual void NotifyNewRequestBodyPart(CProtTransaction& aTransaction) = 0; + +protected: // Methods inherited from CActive + +/** Intended Usage: Do some processing when a previous asynchronous request made by + this object has completed. + */ + //##ModelId=3C4C186A0377 + IMPORT_C virtual void RunL(); + +/** Intended Usage: Do any cleanup required should RunL leave + @param aError (in) The error code that RunL left with + @return A final error code - KErrNone if the error was handled by this + method. + */ + //##ModelId=3C4C186A036E + IMPORT_C virtual TInt RunError(TInt aError); + +/** Intended Usage: Cancel outstanding asynchronous requests that this object has made + */ + //##ModelId=3C4C186A036D + IMPORT_C virtual void DoCancel(); + +protected: // Methods + +/** + Constructs a protocol handler associated with the supplied HTTP + client session. + @param aSession (in) The session on which the new protocol handler will + be installed. + */ + IMPORT_C CProtocolHandler(RHTTPSession aSession); + +/** + Second phase construction in which any necessary allocation is done + Implementations of this interface may leave with KErrNoMemory + @param aSession The HTTP session on which this protocol handler + will be installed. + */ + //##ModelId=3C4C186A036C + IMPORT_C void ConstructL(RHTTPSession aSession); + +protected: // Attributes + + /** The session to which this protocol handler is dedicated + */ + //##ModelId=3C4C186A033C + RHTTPSession iSession; + + /** The codec used for this protocol handler (to be specialised in subclasses) + */ + //##ModelId=3C4C186A032F + CHeaderCodec* iCodec; + + /** HTTP logger handle (debug only) + */ + __DECLARE_LOG + + /** An interface providing the security policy. This may be NULL if there is no security policy plugin */ + //##ModelId=3C4C186A031D + CSecurityPolicy* iSecurityPolicy; + +private: // Methods + +/** + Called after a client RHTTPTransaction::SubmitL(), this method + enqueues the supplied client transaction. It checks to see if there + already exists a CProtTransaction for this transaction. If there is + and its state is ECancelled, then the associated request data is + reset and the state changed to EPending. A CompleteSelf() is issued. + In the case of an existing CProtTransaction that has not been + cancelled, the submit event is ignored. If no CProtTransaction + object existed, then one is created for the transaction and a + CompleteSelf() is issued. + @leave KErrHttpCantResetRequestBody if the request body data cannot + be reset. KErrNoMemory if a new CProtTransaction cannot be + created or added to the transaction queue. + @param aTransaction The submitted transaction. + @pre None + @post If there is a new pending CProtTransaction object the protocol + handler will have been self-completed (i.e. the RunL will be + called). + */ + //##ModelId=3C4C186A0362 + void SubmitTransactionL(RHTTPTransaction aTransaction); + +/** + Sets the state of the CProtTransaction object for this + transaction to ECancelled, and resets the object. This + object can be reused if the transaction is resubmitted. + @param RHTTPTransaction aTrans + @pre A CProtTransaction object exists for this transaction. + @post The state of the CProtTransaction object is set to ECancelled + and it has been reset. + */ + //##ModelId=3C4C186A0359 + void HandleCancelTransaction(RHTTPTransaction aTrans); + +/** + Removes the CProtTransaction object for the transaction + from the queue of CProtTransaction objects. + @param RHTTPTransaction aTrans + @pre A CProtTransaction object exists for this transaction. + @post The CProtTransaction object has been removed from the queue. + */ + //##ModelId=3C4C186A034F + void HandleClosedTransaction(RHTTPTransaction aTrans); + +/** + Searches the array of CProtTransaction objects to if the + aTransaction object is wrapped by one of them. + @param aTransaction The transaction to search for. + @return If a CProtTransaction object is found, a positive value is + returned that is the index to that object in the array. If + no object is found, KErrNotFound is returned. + */ + //##ModelId=3C4C186A0346 + TInt FindTransaction(RHTTPTransaction aTransaction) const; + +protected: +/** + Intended Usage: This is a mechanism for allowing future change to CProtocolHandler API + without breaking BC. + @param aInterfaceId the UID of the API function being called. + @param aInterfacePtr reference to pointer to actual function implementation (in the derived class) + */ + inline virtual void GetInterfaceL(TUid aInterfaceId, MProtHandlerInterface*& aInterfacePtr); + +public: +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C186A0344 + inline virtual void Reserved2(); + + +private: // Attributes + + /** A list of transactions. Each transaction has a list state, e.g. pending, + active, etc. + */ + //##ModelId=3C4C186A0313 + RPointerArray iTransactions; + + /** The transaction which is currently being serviced - used in RunError so + we know which transaction caused RunL to leave. + */ + //##ModelId=3C4C186A02FF + RHTTPTransaction iCurrentTransaction; + + /** The destructor key UID indentification required by ECom + */ + //##ModelId=3C4C186A02F5 + TUid iDtor_ID_Key; + }; + + + +/** +Interface for adding to ProtocolHandler API +@publishedAll +@released +*/ + +const TInt KProtHandlerSessionServerCertUid = 0x1028180D; +const TInt KProtHandlerTransactionServerCertUid = 0x1028180E; + +class MProtHandlerInterface + { +public: + /** + Intended Usage: Get the Server Certificate for the current session. + @return The certificate information or NULL if it is not available + */ + virtual const CCertificate* SessionServerCert() = 0; + + /** + Intended Usage: Get the Server Certificate for the specified transaction. + @param aTransaction The transaction for which the certificate is requested + @return The certificate information or NULL if it is not available + */ + virtual const CCertificate* TransactionServerCert( RHTTPTransaction aTransaction) = 0; + }; + +inline void CProtocolHandler::GetInterfaceL(TUid, MProtHandlerInterface*&) + {} + +inline void CProtocolHandler::Reserved2() + {} + +#endif // __CPROTOCOLHANDLER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/cprottransaction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/cprottransaction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,210 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CProtTransaction.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CPROTTRANSACTION_H__ +#define __CPROTTRANSACTION_H__ + +// System includes +#include +#include + +// Forward declarations +class CTxData; +class CRxData; +class MRxDataObserver; + + +//##ModelId=3B1E52B30382 +class CProtTransaction : public CBase +/** +A representation of a transaction used by protocol handlers. +This class is lower-level than the RHTTPTransaction class, +since it owns objects that represent the request and response data as +transmitted and received over a transport medium. +@publishedAll +@released +*/ + { +public: // Enums + +/** The TTransactionState type defines the states of a transaction. +*/ + enum TTransactionState + { + /** Specifies that the transaction is pending servicing. + */ + EPending = 0, + /** Specifies that the transaction is being serviced - active. + */ + EActive, + /** Specifies that the transaction has been cancelled. + */ + ECancelled, + /** Specifies that the transaction has completed. + */ + ECompleted + }; + +public: + +/** + Intended Usage: Destructor - cleans up and releases resources to the system +*/ + //##ModelId=3B1E52B40031 + IMPORT_C virtual ~CProtTransaction(); + +public: // accessors + +/** + Provides the state of the transaction, e.g. pending, + active, etc. + @return A enum specifying the state of the transaction. +*/ + //##ModelId=3C4C37E50306 + TTransactionState TransactionState() const; + +/** + Sets the state of the transaction. + @param aState The state that the transaction is in. + @post The state of the transaction has been updated. +*/ + //##ModelId=3C4C37E502D4 + void SetTransactionState(TTransactionState aState); + +/** + Resets the Rx data object. The Rx data object must be + created again to be used. + @post The Rx data objects has been reset. +*/ + //##ModelId=3C4C37E502CA + IMPORT_C void ResetRxData(); + +/** + Resets the Tx data object. The Tx data object must be + created again to be used. + @post The Tx data objects has been reset. +*/ + //##ModelId=3C4C37E502C0 + IMPORT_C void ResetTxData(); + +/** + Obtain the API-level transaction to which this object + corresponds to. + @return The API-level transaction that this object corresponds to. +*/ + //##ModelId=3B1E52B40013 + IMPORT_C RHTTPTransaction Transaction() const; + +/** + Obtain the Transmit Data portion of the transaction. + @return A reference to the Tx data object of the transaction. +*/ + //##ModelId=3B1E52B40012 + IMPORT_C CTxData& TxData() const; + +/** + Obtain the Receive Data portion of the transaction. + @return A reference to the Rx data object of the transaction. +*/ + //##ModelId=3B1E52B40009 + IMPORT_C CRxData& RxData() const; + +public: // Methods to be implemented by derived classes + +/** + Intended Usage: Creates the appropriate CTxData object. + @leave KErrNoMemory if there is not enough memory available to + create the object. +*/ + //##ModelId=3C4C37E502AC + virtual void CreateTxDataL() =0; + +/** + Intended Usage: Creates the appropriate CRxData object. + @leave KErrNoMemory if there is not enough memory available to + create the object. + @param aObserver A reference to the observer for the Rx data object. +*/ + //##ModelId=3C4C37E50284 + virtual void CreateRxDataL(MRxDataObserver& aObserver) =0; + +protected: // Methods + +/** + Default constructor +*/ + //##ModelId=3B1E52B303E6 + CProtTransaction(); + +/** + Normal constructor, of a CProtTransaction that corresponds to the + supplied client transaction handle. + @param aTrans (in) The client transaction handle. +*/ + //##ModelId=3B1E52B303E7 + IMPORT_C CProtTransaction(RHTTPTransaction aTrans); + +protected: // Attributes + + /** The client transaction + */ + //##ModelId=3B1E52B303D4 + RHTTPTransaction iTrans; + + /** The transmission data + */ + //##ModelId=3B1E52B303CA + CTxData* iTxData; + + /** The received data + */ + //##ModelId=3B1E52B303C0 + CRxData* iRxData; + + /** Transaction state indicator. + */ + //##ModelId=3C4C37E50247 + TTransactionState iTransactionState; + +private: // methods + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37E5026F + inline virtual void Reserved1(); + +/** + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37E50251 + inline virtual void Reserved2(); + }; + + +inline void CProtTransaction::Reserved1() + {} +inline void CProtTransaction::Reserved2() + {} + + +#endif // __CPROTTRANSACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/crxdata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/crxdata.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,127 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CRxData.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CRXDATA_H__ +#define __CRXDATA_H__ + +// System includes +#include +#include +#include +#include // this include is needed to ensure that the is compiled by gcc... + +// Forward declarations +class MRxDataObserver; + + +//##ModelId=3B1E52AB0087 +class CRxData : public CBase, public MHTTPDataSupplier +/** +An abstract base class for the decoding of response data received by a +protocol handler. +@publishedAll +@released +*/ + { +public: + +/** Intended Usage: Destructor - cleans up and releases resources to the system +*/ + IMPORT_C + //##ModelId=3B1E52AB00ED + virtual ~CRxData(); + +/** Intended Usage: Obtain the protocol transaction whose request part is represented + as encoded data by this object. + @return The protocol transaction object +*/ + IMPORT_C + //##ModelId=3B1E52AB00EC + CProtTransaction& ProtTrans(); + +public: + +/** Intended Usage: Resets the received data object to its initial state following + construction. This method must be implemented for specific sub- + classes of received data. + @post The object is reset. +*/ + //##ModelId=3BA60048014B + virtual void ResetRxData() = 0; + +protected: + +/** Intended Usage: Default constructor - creates an Rx data object not associated + with any protocol transaction. +*/ + IMPORT_C + //##ModelId=3A914E5F008F + CRxData(); + +/** Intended Usage: Normal constructor, of a CRxData that corresponds to the supplied + protocol transaction, and which sends status updates to the supplied + observer interface, + @param aProtTrans (in) The transaction for which this object + represents the transmitted data. + @param aObserver (in) The object's observer. +*/ + IMPORT_C CRxData(CProtTransaction& aProtTrans, MRxDataObserver& aObserver); + +/** Intended Usage: Second phase construction, default +*/ + IMPORT_C + //##ModelId=3B1E52AB00BA + void ConstructL(); + +protected: + + /** The protocol transaction for which this object represents the encoded received data + */ + //##ModelId=3B1E52AB00B2 + CProtTransaction* iProtTrans; + + /** This object's observer, to whom we forward status information + */ + //##ModelId=3B1E7738028B + MRxDataObserver* iObserver; + +private: // methods + +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37DA0007 + inline virtual void Reserved1(); + +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37D903DB + inline virtual void Reserved2(); + }; + + +inline void CRxData::Reserved1() + {} +inline void CRxData::Reserved2() + {} + + +#endif // __CRXDATA_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/csecuritypolicy.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/csecuritypolicy.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,173 @@ +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file csecuritypolicy.h + @warning : This file may contain Rose Model ID comments - please do not delete +*/ + +#ifndef __CSECURITYPOLICY_H__ +#define __CSECURITYPOLICY_H__ + +// System includes +#include +#include +#include +#include +#include + + +//##ModelId=3C4C37E401CE +class MSecurityPolicy +/** +The Security Policy Interface. This interface class must be the base +class of a security policy plug-in. +@publishedAll +@released +*/ + { +public: + +/** Intended Usage: Ask the client to accept or reject a certificate. Not + applicable to TLS, as the SSL layer does this itself. + The call is asynchronous, returning the result via the TRequestStatus. + @param aServerCert (in) A structure containing the certificate details. + @param aStatus (out) A status flag used to indicate errors. A value of 0 is used to indicate + that the cert is untrusted and 1 that it is trusted +*/ + //##ModelId=3C4C37E4020B + virtual void ValidateUntrustedServerCert(TCertInfo& aServerCert, TRequestStatus& aStatus) const = 0; + +/** Intended Usage: Cancel a previous request to ask the client to accept or reject + an untrusted WTLS server certificate. +*/ + //##ModelId=3C4C37E4020A + virtual void CancelValidateUntrustedServerCert() = 0; + + +/** Intended Usage: Obtain an array of WTLS cipher suites. Not applicable to TLS clients. + @return An array of cipher suites, consisting of paired bulk encryption + algorithms and MAC algorithms. The array must be ordered with + strongest cipher suites at the start. +*/ + //##ModelId=3C4C37E40201 + virtual const RArray& GetWtlsCipherSuites() =0; + +/** Intended Usage: Obtain a list of TLS cipher suites. Not applicable to WTLS + clients. + @return An descriptor containing a list of the TLS cipher suites. Each cipher suite is a 2 byte pair +*/ + //##ModelId=3C4C37E40200 + virtual const TDesC8& GetTlsCipherSuites() = 0; + +/** Intended Usage: Obtain the WTLS key exchange suites. Not applicable + to TLS clients. + @return An array of the WTLS key exchange suites. The array must be ordered + with authenticating key exchange suites at the start followed by + anonymous key exchange suites if desired. Within each group of keys + longer keys should precede shorter ones. +*/ + //##ModelId=3C4C37E401FA + virtual const RArray& GetWtlsKeyExchangeSuites() = 0; + +/** Intended Usage: Obtain arbitrary, named security policy properties, in a generic + 'stringified' form. + @param aPropertyName (in) The policy property name. + @param aPropertyValue (out) The property value. Parsing of the value is + left to the caller. The caller must close the + RString. + @return An error code: KErrNone if the property exists or KErrNotFound if + it doesn't. +*/ + //##ModelId=3C4C37E401F7 + virtual TInt GetNamedPolicyProperty(RStringF aPropertyName, RString& aPropertyValue) = 0; + +protected: +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37E401F6 + virtual void Reserved1() =0; + +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37E401EC + virtual void Reserved2() =0; + }; + +//##ModelId=3C4C37C50300 +class CSecurityPolicy : public CBase, public MSecurityPolicy +/** +The Security Policy Plug-in API. This ECOM interface class must be implemented +by each instance of a security policy plug-in. +@publishedAll +@released +*/ + { +public: // methods + +/** Intended Usage: Factory construction - instantiates the plug-in. + @param aStringPool (in) An open string pool reference that can be used by the plugin. + @return The constructed plug-in. +*/ + //##ModelId=3C4C37C503C8 + inline static CSecurityPolicy* NewL(RStringPool aStringPool); + +/** Intended Usage: Class destructor. +*/ + //##ModelId=3C4C37C503BE + inline virtual ~CSecurityPolicy(); + + +protected: // methods + +/** Intended Usage: Normal constructor. Creates an instance of the plug-in base. + @param aStrPool (in) An open string pool reference that can be used by the plugin. + @return The constructed plug-in base. +*/ + //##ModelId=3C4C37C503B5 + inline CSecurityPolicy(RStringPool aStrPool); + + +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37C503B4 + inline virtual void Reserved1(); + +/** Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37C503AD + inline virtual void Reserved2(); + +protected: // attributes + + /** The stringpool reference + */ + //##ModelId=3C4C37C503AA + RStringPool iStrPool; + +private: // attributes + + /** D'tor Key identification required for ECOM + @internalAll + */ + //##ModelId=3C4C37C50396 + TUid iDtor_ID_Key; + }; + +#include + +#endif // __CSECURITYPOLICY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/csecuritypolicy.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/csecuritypolicy.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,65 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CSecurityPolicy.inl + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CSECURITYPOLICY_INL__ +#define __CSECURITYPOLICY_INL__ + + +inline CSecurityPolicy* CSecurityPolicy::NewL(RStringPool aStringPool) + { + _LIT8(KDataTypeName, "security-policy"); + + // CSecurityPolicy ECOM Interface UID = 101F4485 + const TUid KUidSecPolInterface = {0x101F4485}; + + // Set up the parameters which allow ECOM's resolver to pick the right implementation + TEComResolverParams resParams; + resParams.SetDataType(KDataTypeName()); + + // Get the instantiation. Allow ECOM to use the default resolver. Pass in the init params. + TAny* ptr = REComSession::CreateImplementationL(KUidSecPolInterface, + _FOFF(CSecurityPolicy, iDtor_ID_Key), + &aStringPool, + resParams); + + return REINTERPRET_CAST(CSecurityPolicy*, ptr); + } + +inline CSecurityPolicy::~CSecurityPolicy() + { + REComSession::DestroyedImplementation(iDtor_ID_Key); + } + +inline CSecurityPolicy::CSecurityPolicy(RStringPool aStrPool) + : iStrPool(aStrPool) + { + } + + + +inline void CSecurityPolicy::Reserved1() + {} +inline void CSecurityPolicy::Reserved2() + {} + + +#endif // __CSECURITYPOLICY_INL__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/ctxdata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/ctxdata.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,115 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file CTxData.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __CTXDATA_H__ +#define __CTXDATA_H__ + +// System includes +#include +#include +#include +#include // this include is needed to ensure that the is compiled by gcc... + + +//##ModelId=3B1E52A8001F +class CTxData : public CBase, public MHTTPDataSupplier +/** +An abstract base class for the encoding of request data to be transmitted by a +protocol handler. +@publishedAll +@released +*/ + { +public: // methods + +/** @fn ~CTxData() + Intended Usage: Destructor - cleans up and releases resources to the system +*/ + IMPORT_C + //##ModelId=3B1E52A80051 + virtual ~CTxData(); + +/** @fn CProtTransaction& ProtTrans() + Intended Usage: Obtain the protocol transaction whose request part is represented + as encoded data by this object. + @return The protocol transaction object +*/ + IMPORT_C + //##ModelId=3B1E52A80049 + CProtTransaction& ProtTrans(); + +protected: + +/** @fn CTxData() + Intended Usage: Default constructor - creates a Tx data object not associated + with any protocol transaction. +*/ + IMPORT_C + //##ModelId=3A925A44019E + CTxData(); + +/** @fn CTxData(CProtTransaction& aProtTransaction) + Intended Usage: Normal constructor, of a CTxData that corresponds to the supplied + protocol transaction. + @param aProtTransaction (in) The transaction for which this object + represents the transmitted data. +*/ + IMPORT_C CTxData(CProtTransaction& aProtTransaction); + +/** @fn ConstructL() + Intended Usage: Second phase construction, default +*/ + IMPORT_C + //##ModelId=3B1E52A8003D + void ConstructL(); + +protected: // attributes + + /** The HTTP transaction from whose request this OTA transmission data is built. + Note that the transaction is not owned by this object. + */ + //##ModelId=3B1E52A80035 + CProtTransaction* iProtTrans; + +private: // methods + +/** @fn Reserved1() + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37D6010F + inline virtual void Reserved1(); + +/** @fn Reserved2() + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37D600FB + inline virtual void Reserved2(); + }; + + +inline void CTxData::Reserved1() + {} +inline void CTxData::Reserved2() + {} + + +#endif // __CTXDATA_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/mrxdataobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/mrxdataobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,73 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MRxDataObserver.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MRXDATAOBSERVER_H__ +#define __MRXDATAOBSERVER_H__ + +// System includes +#include + +// Forward declarations +class CRxData; + + +//##ModelId=3A914E570296 +class MRxDataObserver +/** +An interface to be implemented by classes that wish to receive status information +from an implementation of the CRxData class. +@publishedAll +@released +*/ + { +public: +/** @fn void SetStatusL(CRxData& aRxData, TInt aStatus) + Intended Usage: Receive a status message from the object that processes received + data in a protocol handler. + @param aRxData The object which is processing the data. + @param aStatus The status (or error) code. +*/ + //##ModelId=3B1E6B5800E5 + virtual void SetStatusL(CRxData& aRxData, TInt aStatus) =0; + +private: // methods + +/** @fn Reserved1() + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37CE035D + inline virtual void MRDO_Reserved1(); + +/** @fn Reserved2() + Intended Usage: Reserve a slot in the v-table to preserve future BC + */ + //##ModelId=3C4C37CE0349 + inline virtual void MRDO_Reserved2(); + }; + + +inline void MRxDataObserver::MRDO_Reserved1() + {} +inline void MRxDataObserver::MRDO_Reserved2() + {} + +#endif // __MRXDATAOBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/framework/rheaderfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/framework/rheaderfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,110 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHeaderField.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHEADERFIELD_H__ +#define __RHEADERFIELD_H__ + +// System includes +#include +#include +#include +#include + +// Forward declarations +class CHeaderField; +class THeaderFieldPartIter; + + +/** +The default chunk size for Raw data should be set to the average length of a header field when encoded in +plaintext. +@publishedAll +@released +*/ +const TInt KDefaultRawChunkSize= 32; + + +//##ModelId=3B1E52A50396 +class RHeaderField +/** +An proxy object for a single field in an HTTP header. The class is used by +implementations of CHeaderCodec in order to manipulate the header at the part and +parameter level, or to obtain raw data, during a header encode/decode operation. +@publishedAll +@released +*/ + { +public: // methods + + //##ModelId=3BA6004002BC + RHeaderField(CHeaderField& aHeaderField); + + IMPORT_C + //##ModelId=3B1E52A503C0 + RStringF Name() const; + + IMPORT_C + //##ModelId=3B1E52A503BF + THeaderFieldPartIter PartsL(); + + IMPORT_C + //##ModelId=3B1E52A503B9 + void RawDataL(TPtrC8& aRawData); + + IMPORT_C + //##ModelId=3BA6004002B2 + RHTTPHeaders Collection(); + + IMPORT_C + //##ModelId=3B1E52A503B6 + void SetPartL(CHeaderFieldPart* aPart, TInt aIndex); + + IMPORT_C + //##ModelId=3B1E52A503B4 + void BeginRawDataL(TInt aChunkSize = KDefaultRawChunkSize); + + IMPORT_C + //##ModelId=3B1E52A503AB + void WriteRawDataL(const TDesC8& aData); + + IMPORT_C + //##ModelId=3B1E52A503AD + void WriteRawDataL(TChar aData); + + IMPORT_C + //##ModelId=3B1E52A503AA + void CommitRawData(); + +private: // attributes + + /** The internal representation of this header field + */ + //##ModelId=3B1E52A503A2 + CHeaderField& iHeaderField; +}; + +inline RHeaderField::RHeaderField(CHeaderField& aHeaderField) + : iHeaderField(aHeaderField) + { + } + +#endif // __CHEADERFIELD_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttpauthenticationcallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttpauthenticationcallback.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,87 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPAuthenticationCallback.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPAUTHENTICATIONCALLBACK_H__ +#define __MHTTPAUTHENTICATIONCALLBACK_H__ + +// System includes +#include +#include +#include +#include + + +//##ModelId=3B1E52A50151 +class MHTTPAuthenticationCallback +/** +The mixin that needs to be implemented if authentication is to be +supported. This supplies the username and password when they are +needed for authentication. +To use, subclass off this class and implement GetCredentialsL. To install +the class into a session, call InstallAuthenticationL. +@publishedAll +@released +*/ + { + public: + /** Gets some credentials. Note that the first 3 parameters are + informational and many clients may not have a use for + them. Clients may want to display some or all of these + parameters to the user, so that the user knows who they are + giving their credentials to, and how securely they will be + transmitted. + @param aURI The URI being requested + @param aRealm The realm being requested + @param aAuthenticationType The type of authentication (basic or digest) + @param aUsername The username is returned in this parameter. + The caller will close the returned string. + @param aPassword The password is returned in this parameter + The caller will close the returned string. + @return True if credentials have been obtained. + @leave Anything. If this function leaves the transaction will be + failed. + */ + //##ModelId=3B1E52A5015D + virtual TBool GetCredentialsL(const TUriC8& aURI, RString aRealm, + RStringF aAuthenticationType, + RString& aUsername, + RString& aPassword) = 0; + + /** Installs the callback into the session. + Typicaly called from the implementation class's ConstructL(). + @pre The session is opened, but no transactions have been created on it + @post The session supports authentication, and uses this API to + get its credentials. + @param aSession the session to install the filter into. + @leave KErrNoMemory There was not enough memory. + */ + //##ModelId=3B1E52A5015B + inline void InstallAuthenticationL(RHTTPSession aSession); + }; + +inline void MHTTPAuthenticationCallback::InstallAuthenticationL(RHTTPSession aSession) + { + CAuthenticationFilterInterface::InstallFilterL(aSession, this); + } + + +#endif // __MHTTPAUTHENTICATIONCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttpdatasupplier.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttpdatasupplier.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,135 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPDataSupplier.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPDATASUPPLIER_H__ +#define __MHTTPDATASUPPLIER_H__ + +// System includes +#include + + +//##ModelId=3C4C187903E5 +class MHTTPDataSupplier +/** +A data supplier - This class is used to deliver the response data +to the client, and is also used by the client to supply request +body data to HTTP in POST transactions. Data is supplied in a +number of parts. When a part is available it can be retreived +with GetNextDataPart. The returned descriptor will remain valid until +ReleaseData is called. + +To use this class to supply POST data, you have a number of +options. If the post data needs to be URL Form encoded, you should +use CHTTPFormEncoder, which will do the encoding and interface to +the MHTTPDataSupplier for you. If you have all the data available, +return its length in OverallDataSize, and pass back all the data +from GetNextDataPart, returning ETrue to indicate that this is the +last part. + +If you don't want to form all the data at once, but know how much +you'll eventualy have, return the total length from +OverallDataSize. When GetNextDataPart is first called, return the +first part. If GetNextDataPart is called again before ReleaseData, +you should still return the first part. Only when ReleaseData is +called should you move to the second part. If you don't know the +total size of the data, the procedure is the same but you should +return KErrNotFound from OverallDataSize. + +When the next part is available, clients should call +RHTTPTransaction::NotifyNewRequestBodyPartL to inform HTTP that +the new data is available. They can do this from ReleaseData if +more data is instantly available, or in some applications they may +need to call it some time later when the next part has been +assembled. + +Filter writers should note that the MHTTPDataSupplier interface is +designed to be used by 1 client, as 1 component needs to know when +to call ReleaseData(). However, filters can be written to +transform the data in some way. For instance, a filter could be +written to automaticaly handle a particular content encoding. When +this filter first receives a GotResponseBodyData, it should take a +copy of the response's body and replace the body with a +MHTTPDataSupplier supplied by the filter. The filter should then +receive the data from HTTP via the saved data supplier and give it +to the client via its own data supplier. +@publishedAll +@released +*/ + { + public: + /** Obtain a data part from the supplier. The data is guaranteed + to survive until a call is made to ReleaseData(). + @param aDataPart - the data part + @return ETrue if this is the last part. EFalse otherwise */ + //##ModelId=3C4C187A0026 + virtual TBool GetNextDataPart(TPtrC8& aDataPart) = 0; + + /** Release the current data part being held at the data + supplier. This call indicates to the supplier that the part + is no longer needed, and another one can be supplied, if + appropriate. */ + //##ModelId=3C4C187A0025 + virtual void ReleaseData() = 0; + + /** Obtain the overall size of the data being supplied, if known + to the supplier. Where a body of data is supplied in several + parts this size will be the sum of all the part sizes. If + the size is not known, KErrNotFound is returned; in this case + the client must use the return code of GetNextDataPart to find + out when the data is complete. + + @return A size in bytes, or KErrNotFound if the size is not known. */ + //##ModelId=3C4C187A001D + virtual TInt OverallDataSize() = 0; + + /** Reset the data supplier. This indicates to the data supplier that it should + return to the first part of the data. This could be used in a situation where + the data consumer has encountered an error and needs the data to be supplied + afresh. Even if the last part has been supplied (i.e. GetNextDataPart has + returned ETrue), the data supplier should reset to the first part. + + If the supplier cannot reset it should return an error code; otherwise it should + return KErrNone, where the reset will be assumed to have succeeded*/ + //##ModelId=3C4C187A001C + virtual TInt Reset() = 0; + +private: + // Some reserved methods for future expansion (e.g. better support + // for ZCD) + //##ModelId=3C4C187A001B + inline virtual void MHDS_Reserved1(); + //##ModelId=3C4C187A0012 + inline virtual void MHDS_Reserved2(); + //##ModelId=3C4C187A0011 + inline virtual void MHDS_Reserved3(); + }; + +inline void MHTTPDataSupplier::MHDS_Reserved1() + {} + +inline void MHTTPDataSupplier::MHDS_Reserved2() + {} + +inline void MHTTPDataSupplier::MHDS_Reserved3() + {} + +#endif // __MHTTPDATASUPPLIER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttpfilter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttpfilter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,95 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPFilter.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPFILTER_H__ +#define __MHTTPFILTER_H__ + +// System includes +#include +#include +#include +#include + + +//##ModelId=3C4C187D03E1 +class MHTTPFilter : public MHTTPFilterBase +/** +A HTTP filter +@publishedAll +@released +*/ + { + public: + /** Called when the filter is being removed from a session's filter queue. + @param aSession The session it's being removed from + @param aHandle The filter handle. Complex filters may need to + refer to this to keep track of which particular registration is + being unloaded. + */ + //##ModelId=3C4C187E0011 + IMPORT_C virtual void MHFUnload(RHTTPSession aSession, + THTTPFilterHandle aHandle); + + /** Called when the filter is being added to the session's filter queue. + @param aSession The session it's being added to. + @param aHandle The filter handle. Complex filters may need to keep + track of this, for instance if generating events in response to + external stimuli + */ + //##ModelId=3C4C187E000E + IMPORT_C virtual void MHFLoad(RHTTPSession aSession, + THTTPFilterHandle aHandle); + public: + /** + @enum TPositions + Default filter positions + */ + enum TPositions + { + /** The Protocol Handler :- At the base of the filter chain + and nearest to the transport layer */ + EProtocolHandler = 0, + // Filters that should be downstream of any status-code related processing + /** Filters to handle caching behaviours.*/ + ECache = 100, + /** Filters to handle particular status codes. + e.g.Redirection and authentication. */ + EStatusCodeHandler = 200, + /** The UAProf filter. */ + EUAProf = 250, + /** The cookie filter, and other filters that don't need to be + concerned with resubmitting of transactions due to things + like redirection. */ + ECookies = 300, + /** The validation filter and any other final tidy up or + initial preprocessing of transactions*/ + ETidyUp = 400, + /** Client filters that assume all standard behaviour is + already there.*/ + EClientFilters = 500, + /** The client :- At the head of the filter chain : + No position above this must be used. */ + EClient = 1000 + }; + }; + +#endif // __MHTTPFILTER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttpfilterbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttpfilterbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,88 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPFilterBase.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPFILTERBASE_H__ +#define __MHTTPFILTERBASE_H__ + +// System includes +#include + +// Forward declarations +class RHTTPTransaction; +class THTTPEvent; +class THTTPSessionEvent; + + +//##ModelId=3A914DF9034F +class MHTTPFilterBase +/** +A HTTP Filter. This is the base class for normal filters +(MHTTPFilter) which adds an unload function, and +MHTTPTransactionCallback, which doesn't add an unload function. +@publishedAll +@released +*/ + { +public: + /** Called when the filter's registration conditions are satisfied for events that + occur on a transaction. Any Leaves must be handled by the appropriate MHFRunError. + Note that this function is not allowed to leave if called with + certain events. @see THTTPEvent + @param aTransaction The transaction that the event has occurred on. + @param aEvent The event that has occurred. + */ + //##ModelId=3A914DF9035D + IMPORT_C virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent); + + /** Called when the filters registration conditions are satisfied for events that occur + on the session. Any leaves must be handled by the appropriate MHFRunError. + @param aEvent The session event that has occured. + */ + //##ModelId=3C4C37D401C1 + IMPORT_C virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent); + + /** Called when RunL leaves from a transaction event. This works in the same + way as CActve::RunError; return KErrNone if you have handled the error. + If you don't completely handle the error, a panic will occur. + @param aError The leave code that RunL left with. + @param aTransaction The transaction that was being processed. + @param aEvent The Event that was being processed. + @return KErrNone if the error has been cancelled or the code + of the continuing error otherwise. + */ + //##ModelId=3A914DF90359 + IMPORT_C virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent); + + /** Called when MHFRunL leaves from a session event. This works in the same + way as CActve::RunError + If you don't completely handle the error, a panic will occur. + @param aError The leave code that RunL left with. + @param aEvent The Event that was being processed. + @return KErrNone if the error has been cancelled or the code + of the continuing error otherwise. + */ + //##ModelId=3C4C37D302C4 + IMPORT_C virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent); + }; + + +#endif // __MHTTPFILTERBASE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttpfiltercreationcallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttpfiltercreationcallback.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPFilterCreationCallback.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPFILTERCREATIONCALLBACK_H__ +#define __MHTTPFILTERCREATIONCALLBACK_H__ + +// Forward declarations +class TFilterConfigurationIterator; + + +//##ModelId=3C4C0F450132 +class MHTTPFilterCreationCallback +/** +This class serves as a pure virtual interface required as a session callback to the client +when the client requires to configure the filters that are installed. The session calls the +method in the interface when the construction of the session is complete. The callback passes +an object of CFilterConfigurationIterator that allows the client to configure the filters that +are installed. +@publishedAll +@released +*/ + { +public: // Methods + /** + @fn ConfigureSessionFiltersL(TFilterConfigurationIterator* aFilterConfigIter) = 0 + Intended Usage: Pure virtual that is called by the session when the session construction + is complete. This passes a CFilterConfigurationIterator back to the client + which allows the client to install or install selected filters. + @param aFilterConfigIter Pointer to the filter configuration iterator. Ownership of + CFilterConfigurationIterator remains with the session and is not transfered + @pre The session has been constructed + @post The filters that are installed are have been configured by the client + */ + //##ModelId=3C4C0F450150 + virtual void ConfigureSessionFiltersL(TFilterConfigurationIterator* aFilterConfigIter) = 0; + }; + +#endif // __MHTTPFILTERCREATIONCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttpsessioneventcallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttpsessioneventcallback.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,62 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPSessionEventCallback.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPSESSIONEVENTCALLBACK_H__ +#define __MHTTPSESSIONEVENTCALLBACK_H__ + +// System includes +#include +#include +#include + + +//##ModelId=3C4C0F460242 +class MHTTPSessionEventCallback +/** +The per-session callback for receiving session event callbacks. +@publishedAll +@released +*/ + { +public: // Methods + + /** Called when the filters registration conditions are satisfied for events that occur + on the session. Any leaves must be handled by the appropriate MHFRunError. + @param aEvent The session event that has occured. + */ + //##ModelId=3C4C0F460262 + virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent) =0; + + /** Called when MHFRunL leaves from a session event. This works in the same + way as CActve::RunError + If you don't completely handle the error, a panic will occur. + @param aError The leave code that RunL left with. + @param aEvent The Event that was being processed. + @return KErrNone if the error has been cancelled or the code + of the continuing error otherwise. + */ + //##ModelId=3C4C0F460256 + virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent) =0; + }; + + +#endif // __MHTTPSESSIONEVENTCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/mhttptransactioncallback.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/mhttptransactioncallback.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,67 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file MHTTPTransactionCallback.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __MHTTPTRANSACTIONCALLBACK_H__ +#define __MHTTPTRANSACTIONCALLBACK_H__ + +// System includes +#include +#include +#include + + +//##ModelId=3C4C1886022B +class MHTTPTransactionCallback +/** +The per-transaction callback for receiving HTTP events. +@publishedAll +@released +*/ + { +public: // Methods + + /** Called when the filter's registration conditions are satisfied for events that + occur on a transaction. + Note that this function is not allowed to leave if called with + certain events. @see THTTPEvent + @param aTransaction The transaction that the event has occurred on. + @param aEvent The event that has occurred. + @leave Any Leaves must be handled by the appropriate MHFRunError. + */ + //##ModelId=3C4C1886024C + virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent) =0; + + /** Called when RunL leaves from a transaction event. This works in the same + way as CActve::RunError; return KErrNone if you have handled the error. + If you don't completely handle the error, a panic will occur. + @param aError The leave code that RunL left with. + @param aTransaction The transaction that was being processed. + @param aEvent The Event that was being processed. + @return KErrNone if the error has been cancelled or the code + of the continuing error otherwise. + */ + //##ModelId=3C4C1886023F + virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent) =0; + + }; + +#endif // __MHTTPTRANSACTIONCALLBACK_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttpconnectioninfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttpconnectioninfo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPConnectionInfo.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPCONNECTIONINFO_H__ +#define __RHTTPCONNECTIONINFO_H__ + +// System includes +#include +#include +#include + +//##ModelId=3C4C187A01CA +class RHTTPConnectionInfo : public RHTTPPropertySet +/** +The RHTTPConnectionInfo is used for setting/getting +values used for setting up a connection over a protocol. All methods are inherited +directly from RHTTPPropertySet. + +To lookup/change any of the following properties, use +RHTTPPropertySet::Property(...) and RHTTPPropertySet::SetPropertyL(...) + +To remove properties, use RHTTPPropertySet::RemoveProperty(...) for a named property, +or RHTTPPropertySet::RemoveAllProperties() for all. + +The following values are currently defined. Note that new values +could be added by individual filters. In general, properties +should be defined before the first transaction is created; filters +are not obliged to check with the connection info if the values +have changed after this point. + +HTTP::EProxyUsage (default HTTP::EDoNotUseProxy) (HTTP::EDoNotUseProxy | HTTP::EUseProxy) + +HTTP::EProxyAddress (A Uri for the Proxy server. Should include the port number +if it is not the default of 8080) + +HTTP::EMaxNumTransportHandlers (default 4) + +HTTP::EMaxNumTransPerTranspHndlr (default 5) + +HTTP::EHTTPVersion (default HTTP::EHttp11) (HTTP::EHttp11 | HTTP::EHttp10) + +HTTP::EProtocol (default, and currently only defined value is HTTP::EHTTP) + +HTTP::EHttpBatching (default HTTP::EDoNotEnableBatching) (HTTP::EDoNotEnableBatching | HTTP::EEnableBatching) + +HTTP::EBatchingBufferSize (default 1400) + +HTTP Client can create a connection and set its own preferences, instead of using the +default connection preferences specified in COMMS Database. In such cases, the client +is responsible for creating the RSocketServ session and RConnection using +RSocketServ::Connect(..) and RConnection::Open(..). +Client must also start the connection using RConnection::Start(..) and pass the +connection preferences to the function using TConnPref. +The following session properties should then be set by the client. + +HTTP::EHttpSocketServ (Handle to RSocketServ session, which is the value obtained + by calling RSocketServ::Handle()) + +HTTP::EHttpSocketConnection (Reference to the RConnection object, obtained from + reinterpret_cast(TInt, &connection)) + +The HTTP Client can also specify what action should be take if during a secure +handshakes the server cert cannot be trusted. The choice is for the handshake +to automatically cancelled or for a dialog to be raised and the user given the +option of continuing with the handshake or cancelling it. The following session +property should be used to specify the behaviour. + +HTTP::ESecureDialog (default HTTP::EDialogPrompt) (HTTP::EDialogPrompt | EDialogNoPrompt) + +The HTTP Client can specify the socket shutdown mode when the session is closing. At the time +of closing the session, any outstanding transactions on open sockets can specify that the +socket shutdown mode be set to immediate. The following property can be used to enable this +behaviour. + +HTTP::ESocketShutdownMode (default HTTP::ESocketShutdownNormal) (HTTP::ESocketShutdownNormal | HTTP::ESocketShutdownImmediate + +The HTTP Client can limit the number of transactions that it will send down one connection when +using pipelining. The following value should be set to an integer. When set any outstanding transaction +that exceed this number will either be sent separately down a different connection or will +be queued until a space becomes available. + +HTTP::EMaxNumTransactionsToPipeline (default KMaxTInt) (Integer) + +The session ID is an optional non-negative integer which is attached to the session and any sockets +it creates. The session ID will be set on any sockets created by using RSocket::SetOpt() with +the level KSOLHttpSessionInfo and the name KSOHttpSessionId (defined in httpsocketconstants.h). +The session ID can be retrieved in a Flow Hook by implementing MIp6Hook::SetFlowOption() to +look for the aforementioned option level and name. +@see MIp6Hook + +HTTP::ESessionId (no default) (Integer) + + +@publishedAll +@released +*/ + { + }; + +#endif // __RHTTPCONNECTIONINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttpfiltercollection.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttpfiltercollection.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,91 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPFilterCollection.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPFILTERCOLLECTION_H__ +#define __RHTTPFILTERCOLLECTION_H__ + +// System includes +#include +#include +#include + +// Forward declarations +class CHTTPSession; +class RHTTPSession; +class MHTTPFilter; +class THTTPFilterIterator; + + +//##ModelId=3C4C187C02B3 +class RHTTPFilterCollection +/** +A Handle on the filter collection in a session. It provides +facilities for adding and deleting filters and for querying what +filters are installed. +@publishedAll +@released +@see RHTTPSession::FilterCollection +@see MHTTPFilter::TPositions +*/ + { + public: + //##ModelId=3C4C187C02F9 + inline RHTTPFilterCollection(); + + //##ModelId=3C4C187C02E5 + IMPORT_C void AddFilterL(MHTTPFilter& aFilter, THTTPEvent aEvent, + RStringF aHeader, TInt aStatusCode, + TInt aPosition, RStringF aName); + + + //##ModelId=3C4C187C02F1 + IMPORT_C void AddFilterL(MHTTPFilter& aFilter, THTTPEvent aEvent, + TInt aPosition, RStringF aName); + + //##ModelId=3C4C187C02DF + IMPORT_C TBool CanChangeFilters() const; + + //##ModelId=3C4C187C02DD + IMPORT_C void RemoveFilter(RStringF aFilter); + + //##ModelId=3C4C187C02DB + IMPORT_C THTTPFilterIterator Query(RStringF aName = RStringF()); + + //##ModelId=3C4C187C02D1 + inline RHTTPSession Session() const; + + private: + friend class CHTTPSession; + friend class RHTTPSession; + + //##ModelId=3C4C187C02C9 + CHTTPSession* iImplementation; + }; + +/** Constructor + */ +inline RHTTPFilterCollection::RHTTPFilterCollection() + : iImplementation(NULL) + { + } + +#endif // __RHTTPFILTERCOLLECTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttpheaders.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttpheaders.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,214 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPHeaders.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPHEADERS_H__ +#define __RHTTPHEADERS_H__ + +// System includes +#include +#include + + +//##ModelId=3C4C1880001A +class RHTTPHeaders +/** +The collection of headers (or more correctly, header fields) +associated with a message. Header (fields) can be created, read and +modified. They may be composed of several parts (by repeated +invocations of API methods, see below) and may be assigned one or +more parameters. Individual field parts and parameters take +values described using THTTPHdrVal. +@publishedAll +@released +@see RHTTPMessage +@see THTTPHdrVal +*/ + { + public: + /** Default constructor + */ + //##ModelId=3C4C18800088 + inline RHTTPHeaders(); + + /**Getter methods + Methods for reading data. + */ + //@{ + /** Obtain the number of parts in the named header field's value, + Simple headers are created with a single part following one + call to SetFieldL. Subsequent calls to SetFieldL create + additional parts if the field exists already. + @leave KErrNoMemory + @param aFieldName The header name + @return The number of parts, or zero if the field does not exist. */ + //##ModelId=3C4C18800081 + IMPORT_C TInt FieldPartsL(RStringF aFieldName) const; + + /** Obtain the named header field's value. The index + of a part within the field must be specified. Parts are indexed + from 0 and fields with only one part return the entire field for index 0 + @param aFieldName The header name + @param aPartIdx The index of the part + @param aHeaderValue The header field value + @return An error condition. Returns KErrNotFound if there is not a field with the + specifed field name + */ + //##ModelId=3C4C18800079 + IMPORT_C TInt GetField(RStringF aFieldName, + TInt aPartIdx, THTTPHdrVal& aHeaderValue) const; + + /** Obtain an Raw representation of the named header + field's value. Note that general client use of this method is + strongly discouraged since it exposes the Raw representation of particular headers. + However it may be needed for some cases where received headers could not be + decoded by HTTP. It will normally be used internally when + preparing header data to be transmitted with a request. + Note that this API may not return the field values for all the headers. + @param aFieldName The field name, e.g, 'Content-Type' + @param aRawFieldData The field's data content, in an appropriate Raw form + @return An error condition. Returns KErrNotFound if there is not a field with the + specifed field name + */ + //##ModelId=3C4C18800076 + IMPORT_C TInt GetRawField(RStringF aFieldName, + TPtrC8& aRawFieldData) const; + + /** Obtain the value of a named parameter, associated with the + named header field. An optional index to a part within the + header field may be supplied, if not it is assumed that it is + the first part. + @param aFieldName The header name + @param aParamName The parameter name + @param aReturn The returned value. Note that this + must be Copy()d by the caller, if it wants to keep the value. + @param aPartIdx The optional index of the part + @return An error condition. Returns KErrNotFound if there is not a field with the + specifed field name */ + //##ModelId=3C4C1880006C + IMPORT_C TInt GetParam(RStringF aFieldName, + RStringF aParamName, + THTTPHdrVal& aReturn, + TInt aPartIdx = 0) const; + + /** Access the fields within this header collection, via an + iterator. Each application of the iterator returns the name + of the next field type. This may then be accessed via + RHTTPHeaders methods. + @return The iterator. */ + //##ModelId=3C4C1880006B + IMPORT_C THTTPHdrFieldIter Fields() const; + //@} + + /** Setter Methods + Methods for writing data. + */ + //@{ + /** Set a named field in the header. On the first instance that + this API method is used for a given field name, the first will + be created. On subsequent calls, the same field will be + extended to have several parts, with a new part created to + hold the supplied value. + @param aFieldName The field name, e.g, 'Content-Type' + @param aFieldValue The field value, e.g. 'text/html' */ + //##ModelId=3C4C18800060 + IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue); + + /** Set a named field in the header, and associate with it the + supplied parameter. If the field doesn't already exist it will + be created along with a parameter; if it does exist, then a + new part will be created along with the parameter. + @param aFieldName The field name, e.g. 'Accept' + @param aFieldValue The field value. e.g. 'text/plain' + @param aParamName The parameter name, e.g. 'q' + @param aParamValue The parameter value, e.g. '0.3' */ + //##ModelId=3C4C18800063 + IMPORT_C void SetFieldL(RStringF aFieldName, THTTPHdrVal aFieldValue, + RStringF aParamName, THTTPHdrVal aParamValue); + + /** Set a parameter in an existing header. + @param aFieldName The field name, e.g. 'Accept' + @param aPartIdx The part of the header to add the parameter to + @param aParamName The parameter name, e.g. 'q' + @param aParamValue The parameter value, e.g. '0.3' + @leave KErrNotFoud if the field, or the part within the field doesn't exist + */ + //##ModelId=3C4C18800058 + IMPORT_C void SetParamL(RStringF aFieldName, RStringF aParamName, THTTPHdrVal aParamValue, TInt aPartIdx); + + /** Set a named field in the header to contain the supplied Raw header + data. If the header already exists then a LF and the new data will be added to the existing data. This is used to + indicate that there are multiple instances of this header + + + Note that general client use of this method is strongly + discouraged since it exposes the raw representation of particular headers. + However it may be needed for some cases where headers to be transmitted have no encoding known + to HTTP. It will normally be used internally when receiving data from a service provider. + @param aFieldName The field name, e.g, 'Content-Type' + @param aRawFieldData The field's data content, in a raw form + @param aFieldSeparator The header field separator + */ + //##ModelId=3C4C1880004F + IMPORT_C void SetRawFieldL(RStringF aFieldName, + const TDesC8& aRawFieldData, + const TDesC8& aFieldSeparator); + + /** Remove, entirely, the named header field from the header + collection. All its parts and associated parameters (where + they exist) are also removed. + @param aFieldName The field name. + @return KErrNone if the removal is successful; KErrNotFound if + the field didn't exist within the headers. */ + //##ModelId=3C4C1880004D + IMPORT_C TInt RemoveField(RStringF aFieldName); + + /** Remove a single part of a header field. Just the part and any associated paramters are removed. If this + results in no parts being present in the header then it will also be removed + @param aFieldName The header name + @param aIndex The particular part of the field to be removed + @return KErrNone if the removal is sucessful; KErrNotFound if the header didn't exist. No exception is raised if + the particular value is not found as part of that header */ + //##ModelId=3C4C18800043 + IMPORT_C TInt RemoveFieldPart(RStringF aFieldName, TInt aIndex); + + /** Remove all the fields of this header collection + */ + //##ModelId=3C4C18800042 + IMPORT_C void RemoveAllFields(); + + //@} + + +private: + friend class CHeaders; + //##ModelId=3C4C1880003A + CHeaders* iImplementation; + }; + + +inline RHTTPHeaders::RHTTPHeaders() + : iImplementation(NULL) + { + } + + +#endif // __RHTTPHEADERS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttpmessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttpmessage.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,93 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPMessage.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPMESSAGE_H__ +#define __RHTTPMESSAGE_H__ + +// Forward declarations +class RHTTPHeaders; +class MHTTPDataSupplier; +class CMessage; + + +//##ModelId=3A375D1F0377 +class RHTTPMessage +/** +An abstract HTTP message. In RFC2616, an HTTP message is defined as having a +header and an optional body. This class is specialised for HTTP requests and +responses. +@publishedAll +@released +*/ + { + public: + /// Default (uninitialised) constructor. + //##ModelId=3A375DD60140 + inline RHTTPMessage(); + + /** Returns the header collection for the message */ + //##ModelId=3A375DDE0368 + IMPORT_C RHTTPHeaders GetHeaderCollection(); + + /** Sets the messages body, replacing any existing body. The body + is supplied as a MHTTPDataSupplier, which will then return the + data in 1 or more chunks on request. + @param aBody The data supplier that will supply the body. */ + //##ModelId=3A375DE0019E + IMPORT_C void SetBody(MHTTPDataSupplier& aBody); + + /** Removes the body */ + //##ModelId=3B1E66FF004E + IMPORT_C void RemoveBody(); + + /** Determine whether this message has any associated body data. + @return ETrue if there is some body data, EFalse if not. + */ + //##ModelId=3A914DFF01E5 + IMPORT_C TBool HasBody() const; + + /** Gets the body. The body is supplied as a MHTTPDataSupplier, + which can be used to return the current data chunk, and to + acknowledge when that chunk has been consumed by the client. + + Note that the client can assume the body object will remain + unchanged from when it receives the first data until the end + of the transaction. + + @return A data supplier that provides access to a body + data chunk. NULL if the body has not been set, or has been removed */ + //##ModelId=3A375DE40190 + IMPORT_C MHTTPDataSupplier* Body() const; + + protected: + //##ModelId=3A914DFF01C7 + CMessage* iImplementation; +}; + + +inline RHTTPMessage::RHTTPMessage() + : iImplementation(NULL) + { + }; + + +#endif // __RHTTPMESSAGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttppropertyset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttppropertyset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,86 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPPropertySet.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPPROPERTYSET_H__ +#define __RHTTPPROPERTYSET_H__ + +// System includes +#include + +// Forward declarations +class CHeaderFieldPart; + + +//##ModelId=3C4C188201EA +class RHTTPPropertySet +/** +A set of named THTTPHdrVal objects. Used for storing arbitrary +collections of information. +@publishedAll +@released +*/ + { + public: + /** Default (uninitialised) constructor. An object constructed in this way + means 'use text-mode HTTP with default settings' + */ + //##ModelId=3A63217800E0 + IMPORT_C RHTTPPropertySet(); + + /** Returns a property. + @param aPropertyName The name of the property. + @param aVal The returned value of the property (if defined) + @return ETrue if the property exists + */ + //##ModelId=3C4C1882021F + IMPORT_C TBool Property(RStringF aPropertyName, THTTPHdrVal& aVal) const; + + /** Sets or creates a property. + @param aPropertyName The name of the property + @param aValue The new value of the property + @leave KErrNoMemory There was not enough memory. + */ + //##ModelId=3C4C1882021C + IMPORT_C void SetPropertyL(RStringF aPropertyName, THTTPHdrVal aValue); + + /** Removes a named property. + @param aPropertyName The name of the property + */ + //##ModelId=3C4C18820213 + IMPORT_C void RemoveProperty(RStringF aPropertyName); + + /** Removes all properties + */ + //##ModelId=3C4C18820212 + IMPORT_C void RemoveAllProperties(); + + protected: + //##ModelId=3C4C18820208 + CHeaderFieldPart* iImplementation; + + friend class CHeaderFieldPart; + friend class CHTTPSession; + }; + + + +#endif // __RHTTPPROPERTYSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttprequest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttprequest.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPRequest.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPREQUEST_H__ +#define __RHTTPREQUEST_H__ + +// System includes +#include +#include +#include + + +//##ModelId=3C4C186E0191 +class RHTTPRequest : public RHTTPMessage +/** +An HTTP Request. This class extends the abstract HTTP Message to add an HTTP +method to be invoked on the resource at the remote HTTP server, and the URL that +identifies that resource. +@publishedAll +@released +*/ + { + public: + /** Get Methods + Methods for reading information from the response. + */ + //@{ + /// Gets the method name + /// @return The method to be used in the HTTP request. + //##ModelId=3C4C186E01B3 + IMPORT_C RStringF Method() const; + /// Gets the URI + /// @return The URI to be used in the HTTP request. + //##ModelId=3C4C186E01B2 + IMPORT_C const TUriC8& URI() const; + //@} + /**Set Methods + + Methods for setting information. These methods will not be of + use to the client; they are intended for the use of advanced + filters + */ + //@{ + /// Sets the method name + /// @param aMethod The method name to be used in the HTTP request. + //##ModelId=3C4C186E01B0 + IMPORT_C void SetMethod(RStringF aMethod); + /// Sets the URI + /// @param aURI The URI to be used in the HTTP request. + //##ModelId=3C4C186E01A6 + IMPORT_C void SetURIL(const TUriC8& aURI); + //@} + + friend class CRequest; + }; + + +#endif // __RHTTPREQUEST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttpresponse.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttpresponse.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,85 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPResponse.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPRESPONSE_H__ +#define __RHTTPRESPONSE_H__ + +// System includes +#include +#include +#include + + +//##ModelId=3A375D1203B5 +class RHTTPResponse : public RHTTPMessage +/** +An HTTP Response. This class extends the abstract HTTP Message to add an HTTP +version, a status code and status text. +@publishedAll +@released +*/ + { +public: + /**Get Methods + Methods for reading information from the response. + */ + //@{ + /** + Returns the status code + */ + //##ModelId=3A914DF801B3 + IMPORT_C TInt StatusCode() const; + /** Returns the status text, that is the text after the number on + the first line of the response. */ + //##ModelId=3A914DF80195 + IMPORT_C RStringF StatusText() const; + /** + Returns the version of HTTP used by the server + */ + //##ModelId=3A914DF80163 + IMPORT_C TVersion Version() const; + //@} + /** Set Methods + + Methods for setting information. These methods will not be of + use to the client; they are intended for the use of advanced + filters + */ + //@{ + /** Sets the status code. + */ + //##ModelId=3A3765310382 + IMPORT_C void SetStatusCode(TInt aStatus); + /// Sets the status string + //##ModelId=3A914DF8019F + IMPORT_C void SetStatusText(RStringF aStatusString); + /// Sets the HTTP version + //##ModelId=3A914DF8016D + IMPORT_C void SetVersion(TVersion aVersion); + //@} + + friend class CResponse; + }; + + + +#endif // __RHTTPRESPONSE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttpsession.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttpsession.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,300 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPSession.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPSESSION_H__ +#define __RHTTPSESSION_H__ + +// System includes +#include +#include +#include +#include +#include +#include + +// Forward declarations +class MHTTPTransactionCallback; +class CHTTPSession; +class MHTTPSessionEventCallback; +class MHTTPFilterCreationCallback; +class TCertInfo; +class CCertificate; + +/** +Constant to represent any HTTP Status code when registering filters. +@publishedAll +@released +*/ +const TInt KAnyStatusCode = -1; + + +//##ModelId=3C4C187B0280 +class RHTTPSession +/** +A session handle. A session is a set of HTTP transactions using +the same connection settings (e.g. proxy) and the same set of filters. + Multi-homing support provided by HTTP framework enables clients to + specify Connection preferences through the session property + EHttpSocketConnection. + +Note that RHTTPSession (and consequently the whole of HTTP) +depends on the active scheduler; a scheduler must be installed +when the session is opened and it must be running if a transaction +is actually to do anything. +@publishedAll +@released +@see RHTTPTransaction +*/ + { + public: + /** Constructor. + @post The session is closed. (It must be opened with OpenL) + @see OpenL */ + //##ModelId=3C4C187B02EF + inline RHTTPSession(); + + /** Sets the session event callback. + Until it is set all incoming session events are consumed + */ + //##ModelId=3C4C187B02EA + IMPORT_C void SetSessionEventCallback(MHTTPSessionEventCallback* aSessionEventCallback); + + /** Send an session event + @param aEvent. The session event to sent. + */ + //##ModelId=3C4C187B02E6 + IMPORT_C void SendSessionEventL(THTTPSessionEvent aStatus, THTTPSessionEvent::TDirection aDirection, + THTTPFilterHandle aStart = THTTPFilterHandle::EClient); + + /** Fail the session event + */ + IMPORT_C void FailSessionEvent(THTTPFilterHandle aStart = THTTPFilterHandle::EClient); + + //##ModelId=3A49F701013F + /** Opens the session using the default protocol HTTP/TCP. + This function leaves with an apropriate code if the open failed. + @pre The session is closed. An active scheduler is installed. + @post The session is open. + */ + //##ModelId=3C4C187B02DA + IMPORT_C void OpenL(); + + /** Opens the session using the protocol indicated by the parameter passed in. + This function leaves with an apropriate code if the open failed. + @param aProtocol The protocol required + @pre The session is closed. An active scheduler is installed. + @post The session is open. + */ + //##ModelId=3C4C187B02DB + IMPORT_C void OpenL(const TDesC8& aProtocol); + + /** Opens the session using the protocol indicated by the parameter passed in. + This method should be used if configuring the installed filters is required. + Once construction if the session is complete the callback method passed in is + called passing in a TFilterConfigurationIterator to allow the filters that + are installed to be configured. + This function leaves with an apropriate code if the open failed. + @param aProtocol The protocol required + @param aSessionCallback The pointer to the object providing the call back method + @pre The session is closed. An active scheduler is installed. + @post The session is open. + */ + //##ModelId=3C4C187B02DD + IMPORT_C void OpenL(const TDesC8& aProtocol, MHTTPFilterCreationCallback* aSessionCallback); + + /** This is a static methods that lists all the available protocols by adding the + prorocol descriptors to the descriptor array passed in. Any existing data in the + descriptor array passed in is deleted. + This function leaves if the descriptor array can not be updated with the appropriate + array code. + @param aProtocolArray A pointer array to heap based descriptors. The data in this + array will be deleted and filled with descriptors containing the available protocols + @see OpenL + */ + //##ModelId=3C4C187B02D4 + IMPORT_C static void ListAvailableProtocolsL(RPointerArray& aProtocolArray); + + /** Creates a transaction. + @pre The session is open + @param aURI The URI that the request will be sent to. + @param aCallback A callback for all status events relating to + this transaction. + @param aMethod The HTTP method to use (default: GET) + @leave KErrNoMemory There was not enough memory. + */ + //##ModelId=3C4C187B02D0 + IMPORT_C RHTTPTransaction OpenTransactionL(const TUriC8& aURI, + MHTTPTransactionCallback& aCallback, + RStringF aMethod = RStringF()); + + /** Closes the session. All transactions will be stopped and closed + @post The session and all open transactions in it are closed. + */ + //##ModelId=3C4C187B02C8 + IMPORT_C void Close(); + + + //##ModelId=3C4C187B02C7 + IMPORT_C static const TStringTable& GetTable(); + + /** Accessor for the HTTP string pool. + @return A handle for the string pool used in HTTP. + */ + //##ModelId=3C4C187B02C6 + IMPORT_C RStringPool StringPool() const; + + /** Accessor for the connection info for this session, and which + is used for all transactions in the session. Note that by and + large, the connection info should be set up before the first + transaction is created. @return A handle to the connection + inf. */ + //##ModelId=3C4C187B02BE + IMPORT_C RHTTPConnectionInfo ConnectionInfo() const; + + /** Accessor for the filter collection. Note that the filter + collection can't be edited after the first transaction has + been created. */ + //##ModelId=3C4C187B02BD + inline RHTTPFilterCollection FilterCollection() const; + + + /** Accessor for the session headers. These are headers that will get added to each request + They only become part of the transaction headers when a transaction is submitted and they will not + replace headers that already exist in the transaction request + */ + //##ModelId=3C4C187B02BC + IMPORT_C RHTTPHeaders RequestSessionHeadersL(); + + + /** Accessor for the response session headers. These are headers that will get added to each response if the + corresponding header doesn't already exist + */ + //##ModelId=3C4C187B02B6 + IMPORT_C RHTTPHeaders ResponseSessionHeadersL(); + + /** Equality operator. + @param aTrans The session to compare this one to. + */ + //##ModelId=3C4C187B02B4 + TBool operator==(RHTTPSession aTrans) const; + /** Inequality operator + @param aTrans The session to compare this one to. + */ + + //##ModelId=3C4C187B02B2 + TBool operator!=(RHTTPSession aTrans) const; + + /** Obtain the server certificate information for this session. This function + should only be used for WSP, for text-mode use RHttpTransaction::ServerCert. + @see RHttpTransaction::ServerCert + @param aServerCert A client supplied object into which the certificate + information will be placed. + @return KErrNone if certificate has been completed, KErrNotSupported if + this function is called for text-mode. + @deprecated v9.2 onwards - maintained for compatibility with v9.1 and before + TCertInfo has been deprecated since v9.2. CCertificate may be used as an alternative. + */ + //##ModelId=3C4C187B02AA + IMPORT_C TInt ServerCert(TCertInfo& aServerCert); + + + /** Obtain the server certificate information for this session. This function + should only be used for WSP. HTTP should use RHttpTransaction::ServerCert. + @see RHttpSession::ServerCert + @internalAll + @prototype + @return a CCertificate pointer to an CWTLSCertificate object. + Calling code can safely cast to CWTLSCertificate if using "WSP/WSP". + NULL returned if certificate information not found. + */ + IMPORT_C const CCertificate* RHTTPSession::ServerCert(); + + /** Connect this WSP session. This function does nothing when called for text-mode. + */ + //##ModelId=3C4C187B02A9 + IMPORT_C void ConnectL(); + + /** Disconnect this WSP session. This function does nothing when called for text-mode. + */ + //##ModelId=3C4C187B02A8 + IMPORT_C void DisconnectL(); + + /**Set the default Proxy for Http Session. This function reads default proxy information,if available, from CommsDat + and uses it for the current Session. + @internalAll + */ + IMPORT_C void SetupDefaultProxyFromCommsDatL(); + + /**Sets the HTTP data optimiser for the session. + @param aHttpOptimiser An object of the implementation of interface, MHttpDataOptimiser, supplied by the client. + @publishedPartner + */ + IMPORT_C void SetupHttpDataOptimiser (MHttpDataOptimiser& aHttpOptimiser); + + /**Returns the object of the MHttpDataOptimiser implementation class. + @internalTechnology + */ + IMPORT_C MHttpDataOptimiser* HttpDataOptimiser (); + +private: + friend class RHTTPFilterCollection; + friend class CHTTPSession; + + //##ModelId=3C4C187B0296 + CHTTPSession* iImplementation; +}; + +inline RHTTPSession::RHTTPSession() + : iImplementation(0) + { + } + + +inline RHTTPFilterCollection RHTTPSession::FilterCollection() const + { + RHTTPFilterCollection c; + c.iImplementation = iImplementation; + return c; + } + +inline TBool RHTTPSession::operator==(RHTTPSession aTrans) const + { + return (iImplementation == aTrans.iImplementation); + }; +inline TBool RHTTPSession::operator!=(RHTTPSession aTrans) const + { + return !(*this == aTrans); + }; + + + +inline RHTTPSession RHTTPFilterCollection::Session() const + { + RHTTPSession s; + s.iImplementation = iImplementation; + return s; + } + + + + +#endif // __RHTTPSESSION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttptransaction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttptransaction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,225 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPTransaction.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPTRANSACTION_H__ +#define __RHTTPTRANSACTION_H__ + +// System includes +#include +#include +#include +#include +#include +#include + +// Forward declarations +class CHTTPTransaction; +class CTransaction; +class MHTTPTransactionCallback; +class RHTTPSession; +class TCertInfo; +class CCertificate; + + +//##ModelId=3C4C18860091 +class RHTTPTransaction +/** +A HTTP Transaction. This encapsulates 1 HTTP request and +response. A Transaction is associated with a session, and must be +created using the session's CreateTransactionL method. +@publishedAll +@released +@see RHTTPSession +@see RHTTPSession::CreateTransactionL +*/ + { + public: + /** + Default (uninitialised) constructor + */ + //##ModelId=3C4C188600F5 + inline RHTTPTransaction(); + + /** Submits a transaction. Once all the headers and other details + have been set up, this call actualy causes the request to be + made. + @leave KErrNoMemory There was not enough memory. + */ + //##ModelId=3C4C188600ED + IMPORT_C void SubmitL(THTTPFilterHandle aStart = + THTTPFilterHandle::EClient); + + /** Notify HTTP of the availability of more request body data, + when submitting body data in several parts. + + @param aStart The filter supplying the new data. This will almost always be the client (default value) + @leave KErrNoMemory There was not enough memory. + */ + //##ModelId=3C4C188600EB + IMPORT_C void NotifyNewRequestBodyPartL(THTTPFilterHandle aStart = + THTTPFilterHandle::EClient); + + /** Sends a status message to all relevant filters. This function + is predominantly used by filters, rather than by the client. + @param aStatus The status message to send. + @param aDirection The direction down the filter queue that this event + will be propogated. + @leave KErrNoMemory There was not enough memory. + */ + //##ModelId=3C4C188600E2 + IMPORT_C void SendEventL(THTTPEvent aStatus, + THTTPEvent::TDirection aDirection, + THTTPFilterHandle aStart); + + /** Gets the response. Note that the returned response may not be + valid if it hasn't been created yet. + @see RHTTPMessage::IsValid() + */ +//##ModelId=3C4C188600E1 + IMPORT_C RHTTPResponse Response() const; + + /// Gets the request. + //##ModelId=3C4C188600DA + IMPORT_C RHTTPRequest Request() const; + + /// Returns the session associated with the transaction. + //##ModelId=3C4C188600D9 + IMPORT_C RHTTPSession Session() const; + + /** Returns the transaction's property set. This is used by filters + to store transaction-specific information, and by clients to + specify things like reload or no cache behaviour. + */ + //##ModelId=3C4C188600D8 + IMPORT_C RHTTPTransactionPropertySet PropertySet() const; + + /** Cancels the transaction. + + @param aStart The entity that is initiating the cancel (defaults + to the client). See THTTPFilterHandle for the values this can take. + */ + //##ModelId=3C4C188600CF + IMPORT_C void Cancel(THTTPFilterHandle aStart = + THTTPFilterHandle::EClient); + + /** Closes the transaction and frees all owned resources. + Transactions must be opened using RHTTPSession::OpenTransactionL. + It is also closed when you close the session. + */ + //##ModelId=3C4C188600CE + IMPORT_C void Close(); + + /** This function should be called by filters when they have + failed due to running out of memory. It cancels the transaction + and sends the synchronous events EUnrecoverableError and EFailed + to the client to inform it of the failure. For instance in a + filter that attempts to send an event to the client from a + MHFRunError to inform the client of a failure, if the call to + SendEventL leaves, Fail() may be used to 'give up'. */ + //##ModelId=3C4C188600C7 + IMPORT_C void Fail(THTTPFilterHandle aStart = + THTTPFilterHandle::ECurrentFilter); + + /** Equality operator to check if this transaction is the same as that one. + @param aTrans The transaction to compare this one to. + */ + //##ModelId=3C4C188600C5 + TBool operator==(RHTTPTransaction aTrans) const; + /** Inequality operator + @param aTrans The transaction to compare this one to. + */ + //##ModelId=3C4C188600C3 + TBool operator!=(RHTTPTransaction aTrans) const; + /** Obtain this transaction's ID, which is unique within its + session. This is mostly used for producing a + slightly-meaningful way of identifying transactions in logging + code. + @return The transaction ID. + */ + //##ModelId=3C4C188600BB + IMPORT_C TInt Id() const; + + /** Obtain the server certificate information for this transaction. This function + should only be used for text-mode, for WSP use RHttpSession::ServerCert. + @see RHttpSession::ServerCert + @param aServerCert A client supplied object into which the certificate + information will be placed. + @return KErrNone if certificate has been completed, KErrNotSupported if + this function is called for WSP. + @deprecated v9.2 onwards - maintained for compatibility with v9.1 and before + TCertInfo has been deprecated since v9.2. CCertificate may be used as an alternative. + */ + //##ModelId=3C4C188600B9 + IMPORT_C TInt ServerCert(TCertInfo& aServerCert); + + /** Obtain the server certificate information for this transaction. This function + should only be used for HTTP. WSP should use RHttpSession::ServerCert. + @see RHttpSession::ServerCert + @internalAll + @prototype + @return a CCertificate pointer to an CX509Certificate object. + Calling code can safely cast to CX509Certificate if using "HTTP/TCP". + NULL returned if certificate information not found. + */ + IMPORT_C const CCertificate* ServerCert(); + + /** Obtain the cipher suite information for this transaction. + @return RString containing the cipher suite as per RFC2246. + */ + IMPORT_C RString CipherSuite(); + + /**Sets the HTTP data optimiser for the transaction. + @param aHttpOptimiser An object of the implementation of interface, MHttpDataOptimiser, supplied by the client. + @publishedPartner + */ + IMPORT_C void SetupHttpDataOptimiser (MHttpDataOptimiser& aHttpOptimiser); + + /**Returns the object of the MHttpDataOptimiser implementation class. + @internalTechnology + */ + IMPORT_C MHttpDataOptimiser* HttpDataOptimiser (); + +private: + friend class RHTTPSession; + friend class CTransaction; + + private: + //##ModelId=3C4C188600A7 + CTransaction* iImplementation; + }; + +inline TBool RHTTPTransaction::operator==(RHTTPTransaction aTrans) const + { + return (iImplementation == aTrans.iImplementation); + }; +inline TBool RHTTPTransaction::operator!=(RHTTPTransaction aTrans) const + { + return !(*this == aTrans); + }; + +inline RHTTPTransaction::RHTTPTransaction() + : iImplementation(NULL) + { + } + + +#endif // __RHTTPTRANSACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/rhttptransactionpropertyset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/rhttptransactionpropertyset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,61 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file RHTTPTransactionPropertySet.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __RHTTPTRANSACTIONPROPERTYSET_H__ +#define __RHTTPTRANSACTIONPROPERTYSET_H__ + +// System includes +#include + + +//##ModelId=3B1E670402C2 +class RHTTPTransactionPropertySet : public RHTTPPropertySet +/** +The set of properties of a transaction. This is used by filters to +store per-transaction information, and is also used by the client +to specify transaction properties (such as no caching, reload and +so on) + +Transaction properties always take precendence over session properties. + +To lookup/change any of the following properties, use +RHTTPPropertySet::Property(...) and RHTTPPropertySet::SetPropertyL(...) + +To remove properties, use RHTTPPropertySet::RemoveProperty(...) for a named property, +or RHTTPPropertySet::RemoveAllProperties() for all. + + +The following values are currently defined. + +HTTP::EProxyUsage (HTTP::EDoNotUseProxy | HTTP::EUseProxy) + +HTTP::EProxyAddress (A Uri for the Proxy server. Should include the port number +if it is not the default of 8080) + +HTTP::EHttpPipelining (default HTTP::EEnablePipelining) (HTTP::EEnablePipelining | HTTP::EDisablePipelining) +@publishedAll +@released +*/ + { + }; + +#endif // __RHTTPTRANSACTIONPROPERTYSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/tfilterconfigurationiter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/tfilterconfigurationiter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,201 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TFilterConfigurationIter.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __TFILTERCONFIGURATIONITER_H__ +#define __TFILTERCONFIGURATIONITER_H__ + +// System includes +#include + +// User includes +#include + +// Forward declarations +class CHTTPSession; +class TSessionFilterInfo; +class CFilterConfigurationIterator_UnitTestContext; + + +//##ModelId=3C4C0F45009C +class TFilterConfigurationIterator +/** +This class can only be created and destroyed by the session. It is supplied to the +client, if the client wishes to configure the filter that are installed or install +filters that must be installed explicitly. The API of the class allows the client to +navigate, install, uninstall and query the filter list. The filters visible in this +list are only the implicit and explicit filters declared as plugins. This iterator MUST +be initialised using the First() method and the return error code checked before any +other operations are called. +@publishedAll +@released +*/ + { +public: // Methods + /** + @fn First() + Intended Usage: This method sets the current filter to the first filter in the list. + This method must be used initially to set the + current filter and the returned error code must be noted prior to + using any of the methods that query or modify the current filter. + @return KErrNone if the first filter is found, KErrNotFound if the filter + can't be found or no filters exist + @pre Object is constructed + @post Current filter is set to the first filter in the list + */ + //##ModelId=3C4C0F45010C + IMPORT_C TInt First(); + + /** + @fn Next() + Intended Usage: This method sets the current filter to the next filter in the list. + @return KErrNone if the next filter is found, KErrNotFound if the filter + can't be found, or no filters exist, or the current filter is at the + end of the list. + @pre Object is constructed + @post Current filter is set to the next filter in the list + */ + //##ModelId=3C4C0F45010B + IMPORT_C TInt Next(); + + /** + @fn AtStart() + Intended Usage: This method indicates whether the current filter is the first filter in + the list. This method will panic if the iterator has not been initialised + using the First() method. + @return ETrue if the current filter is the first in the list + @pre The iterator has been initialised using the First() method + */ + //##ModelId=3C4C0F45010A + IMPORT_C TBool AtStart(); + + /** + @fn AtEnd() + Intended Usage: This method indicates whether the current filter is the last filter in + the list. This method will panic if the iterator has not been initialised + using the First() method. + @return ETrue if the current filter is the last in the list + @pre The iterator has been initialised using the First() method + */ + //##ModelId=3C4C0F450101 + IMPORT_C TBool AtEnd(); + + /** + @fn FindByDataType(const TDesC8& aDataType) + Intended Usage: This method find the first filter in the list that has a matching data + type that is passed in. The method will set the current filter to the + filter that matches the data type or if not found the current filter + will not change. This method will always begin its search + from the beginning of the list. + @param aDataType An 8-bit descriptor containing the data type to match the + filter plug-in with + @return KErrNone is the filter plug-in is found, KErrNotFound if not found + @pre Object is constructed + @post The current filter is set to the filter that matches the data type + */ + //##ModelId=3C4C0F4500F8 + IMPORT_C TInt FindByDataType(const TDesC8& aDataType); + + /** + @fn CurrentFilterInformation() const + Intended Usage: This method will return the information of the current filter. The + information is provided in a TFilterInformation structure containing the + following information: + 1) Display name + 2) Data type + 3) Version + 4) UID + 5) Category + 6) Install status + This method will panic if the iterator has not been initialised using the + First() method + @return A struct containing the current filter information + @pre The iterator has been initialised using the First() method + @see TFilterInformation + */ + //##ModelId=3C4C0F4500F7 + IMPORT_C const TFilterInformation CurrentFilterInformation() const; + + /** + @fn InstallCurrentFilter() const + Intended Usage: This method will install the current filter. This method will panic if a + current filter is not set. + @return KErrNone if the filter installed, KErrAlreadyExists if the filter has + already been installed, KErrNotFound if the filter cannot be found, + KErrNotConnected if the ECom plug-in architecture is not connected, + KErrNoMemory is the filter is not installed due to low memory, or any + other system-wide error codes. + @pre A current filter has been set and is not already installed + @post The filter is installed + */ + //##ModelId=3C4C0F4500F6 + IMPORT_C TInt InstallCurrentFilter() const; + + /** + @fn UninstallCurrentFilter() const + Intended Usage: This method will uninstall the current filter. This method will panic if + a current filter is not set. + @return KErrNone is the filter uninstalled correctly, KErrNotFound if the filter + has not already been installed + @pre A current filter has been set and has already been installed + @post The filter is uninstalled + */ + //##ModelId=3C4C0F4500EF + IMPORT_C TInt UninstallCurrentFilter() const; + +private: // Methods + // Friend class + friend class CHTTPSession; + + // Friend class for testing purposes + friend class CFilterConfigurationIterator_UnitTestContext; + + // Standard default constructor, this is private as it is designed so that only + // the CHTTPSession object that create it. + //##ModelId=3C4C0F4500ED + TFilterConfigurationIterator(CHTTPSession* aSession); + + // Standard destructor, this is private as it is designed so that only the + // CHTTPSession object can delete it. + //##ModelId=3C4C0F4500EC + ~TFilterConfigurationIterator(); + +private: // Attributes + // Pointer to the session implementation. This is not owned. + //##ModelId=3C4C0F4500DA + CHTTPSession* iSession; + + // Pointer array containing all the information for all the filter plugins + // discovered by ECom. The list is stored and owned by the session. This is + // not owned. + //##ModelId=3C4C0F4500D0 + RPointerArray& iFilterInfoList; + + // Value conatining the index of the current filter in the list + //##ModelId=3C4C0F4500C6 + TInt iCurrentFilterIndex; + + // Value containing the number filters in the list + //##ModelId=3C4C0F4500BC + TInt iFilterCount; + }; + +#endif // __TFILTERCONFIGURATIONITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/tfilterinformation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/tfilterinformation.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,115 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file TFilterInformation.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __TFILTERINFORMATION_H__ +#define __TFILTERINFORMATION_H__ + + +//##ModelId=3C4C37DF0343 +struct TFilterInformation +/** +This structure is used by the TFilterConfigurationIterator to hold the information of the +current filter. This structure simply contains public members containing the following +information, the display name, data type, version, UID, category and install status. +@publishedAll +@released +@see TFilterConfigurationIterator +*/ + { +public: + /** + Public enum defining the filter categories available to the client. + */ + enum TFilterCategory + { + EImplicitFilter, + EExplicitFilter + }; + + /** + Contains a constant reference to the descriptor containing the filter's display name + */ + //##ModelId=3C4C37DF03A7 + const TDesC& iDisplayName; + + /** + Contains a constant reference to the descriptor containing the filter's data type + */ + //##ModelId=3C4C37DF039D + const TDesC8& iDataType; + + /** + The filter's version number + */ + //##ModelId=3C4C37DF038B + TInt iVersion; + + /** + The filter's plugin UID + */ + //##ModelId=3C4C37DF0381 + TUid iFilterUid; + + /** + The filter's category + */ + //##ModelId=3C4C37DF0375 + TFilterCategory iFilterCategory; + + /** + The install status of the filter. Contains ETrue if installed, otherwise EFalse + */ + //##ModelId=3C4C37DF036B + TBool iInstallStatus; + + /** + Default constructor that simply initialises the data members. + @param aDisplayName Reference to descriptor containing the display name + @param aDataType Reference to descriptor containing the data type + @param aVersion Integer of the version number + @param aFilterUid The UID of the filter plugin + @param aFilterCategory The category of the filter + @param aInstallStatus The install status of the filter plugin. Contains ETrue + if installed or EFalse otherwise. + @pre None + @post Object is fully constructed and initialised + */ + //##ModelId=3C4C37DF03B1 + inline TFilterInformation(const TDesC& aDisplayName, const TDesC8& aDataType, + TInt aVersion, TUid aFilterUid, + TFilterCategory aFilterCategory, TBool aInstallStatus); + }; + +// Inline constructor, initialises data members +inline TFilterInformation::TFilterInformation(const TDesC& aDisplayName, const TDesC8& aDataType, + TInt aVersion, TUid aFilterUid, + TFilterCategory aFilterCategory, TBool aInstallStatus) + :iDisplayName(aDisplayName), + iDataType(aDataType), + iVersion(aVersion), + iFilterUid(aFilterUid), + iFilterCategory(aFilterCategory), + iInstallStatus(aInstallStatus) + { + } + +#endif // __TFILTERINFORMATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttpevent.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttpevent.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,485 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file THTTPEvent.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __THTTPEVENT_H__ +#define __THTTPEVENT_H__ + +// System includes +#include + +/** +The HTTP UID. This UID is used for all events defined here. +@publishedAll +@released +*/ +const TUint KHTTPUid = 0x1000A441; + +/** +Wildcard Matching UID. When specified as part of an event then the UID event +part of the match will be ignored. +@publishedAll +@released +*/ +const TUint KHTTPMatchAnyEventUid = 0x1000A44C; + +/** +The base status code for transaction events. Any number above this but below +KSessionEventBaseStatus is a transaction event. +@publishedAll +@released +*/ +const TInt KTransactionEventBaseStatus = 0; + +/** +The base status code for transaction warning events. +@publishedAll +@released +*/ +const TInt KTransactionWarningBaseStatus = 10000; + +/** +The base status code for session events. Any number above this is a session +event. +@publishedAll +@released +*/ +const TInt KSessionEventBaseStatus = 100000; + +/** +The base status code for session warning events. +@publishedAll +@released +*/ +const TInt KSessionWarningBaseStatus = 110000; + + +//##ModelId=3C4C18740294 +class THTTPEvent +/** +A HTTP status message. Status messages consist of a UID and a +status code within that UID. Extension dlls that needs to create +new status messages should use their own UID and create status codes +within that UID. +@publishedAll +@released +*/ + { +public: + + /** The TStandardEvent type is used to specify a family of event types. Any + negative event number is used to convey error codes. All events are + incoming (originate with the origin server) unless otherwise indicated. + Outgoing messages will not be seen by the MHTTPTransactionCallback's + MHFRunL. + */ + enum TStandardEvent + { + /** Used when registering filter to indicate the filter is instrested + in ALL events, both transaction and session events. + */ + EAll = KRequestPending + 1, + /** Used when registering filters to indicate the filter is interested + in any transaction event, from any direction. + */ + EAnyTransactionEvent = KRequestPending, + /** Used when registering filters to indicate the filter is interested + in any session event. + */ + EAnySessionEvent = KSessionEventBaseStatus + }; + + /** The TTransactionEvents type defines the events that correspond to + transactions. Outgoing events originate from the client or from filters. + The clients do not send these explicitly since the API methods of + RHTTPTransaction do it on their behalf. Incoming events originate from + the protocol handler or from filters, and clients should handle these. + The ESucceeded and EFailed events are mutually exclusive, but one will + always be sent to the client as the final event for a transaction. + */ + enum TTransactionEvent + { + /** The transaction is being submitted. An outgoing event. + */ + ESubmit = KTransactionEventBaseStatus, + /** The transaction is being cancelled. An outgoing event. + */ + ECancel = KTransactionEventBaseStatus + 1, + /** A new part of request body data is available for transmission. An + outgoing event + */ + ENotifyNewRequestBodyPart = KTransactionEventBaseStatus + 2, + /** The transaction is being closed. An outgoing event. + */ + EClosed = KTransactionEventBaseStatus + 3, + /** All the response headers have been received. An incoming event. + */ + EGotResponseHeaders = KTransactionEventBaseStatus + 4, + /** Some (more) body data has been received (in the HTTP response). An + incoming event. + */ + EGotResponseBodyData = KTransactionEventBaseStatus + 5, + /** The transaction's response is complete. An incoming event. + */ + EResponseComplete = KTransactionEventBaseStatus + 6, + /** Some trailer headers have been received. An incoming event. + */ + EGotResponseTrailerHeaders = KTransactionEventBaseStatus + 7, + /** The transaction has succeeded. An incoming event. + */ + ESucceeded = KTransactionEventBaseStatus + 8, + /** The transaction has failed. This is a 'catch-all' for communicating + failures, and more details of the failure should have been notified + in previous messages or status codes. If the client could process + these then it is possible that it should not consider the transaction + a failure. For instance a browser that displays the body of 404 + responses to the user would not consider a 404 response to be a + failure, as it would display it just like a 200 response even though + a 404 will be flagged as a 'failure'. An incoming event. + */ + EFailed = KTransactionEventBaseStatus + 9, + /** Generated from RHTTPTransaction::Fail(). A filter has failed in a + way that prevents it from using the normal event mechanism to inform + the client of the error. This probably means it's run out of memory. + An incoming event. + */ + EUnrecoverableError = KTransactionEventBaseStatus + 10, + /** An event that indicates that there is too much request data to be + sent. The transaction will subsequently be cancelled. An incoming + event. + */ + ETooMuchRequestData = KTransactionEventBaseStatus + 11, + + + /** If the returned status code for a transaciton is either 301, 302 or 307 + and the requested method is NOT a GET or HEAD, then the filter sends the + client an event ERedirectRequiresConfirmation as stated in RFC2616. + + On receiving this event, the transaction is already setup with the redirected URI + and the client is required to make the decision to whether to submit the + transaction or close the transaction. + + If the requested method is GET or HEAD the transaction is automatically + redirected and this event is not used. + */ + ERedirectRequiresConfirmation = KTransactionEventBaseStatus + 12, + + /** A transaction has been specified to use a proxy and the request + requires a tunnel to be establised to the origin server. + */ + ENeedTunnel = KTransactionEventBaseStatus + 13, + + /** The client wishes to view the current cipher suite. + */ + EGetCipherSuite = KTransactionEventBaseStatus + 14, + + /** The transaction's request is complete. An incoming event. + */ + ERequestComplete = KTransactionEventBaseStatus + 15, + + /**An event to signal that 100 Continue response has been received. + */ + EReceived100Continue = KTransactionEventBaseStatus + 16, + + /**An event to cancel the wait for a 100-Continue event. + */ + ECancelWaitFor100Continue = KTransactionEventBaseStatus + 17, + + /**An event of Send Timeout for a Request. + */ + ESendTimeOut = KTransactionEventBaseStatus + 18, + + /**An event of Receive Timeout for a Response. + */ + EReceiveTimeOut = KTransactionEventBaseStatus + 19 + + }; + + /** The TDirection type defines the direction of an event. An outgoing event + originates from the client or from filters. The clients do not send these + explicitly since the API methods of RHTTPTransaction or RHTTPSession do + it on their behalf. Incoming events originate from the protocol handler + or from filters, and clients should handle these. + */ + enum TDirection + { + /** An event originating with the client (e.g. start transaction). + */ + EOutgoing, + /** An event originating with the server (e.g. something received). + */ + EIncoming + }; + + /** The TTransactionWarning type indicates that something in a transaction + may be incorrect but the transaction may continue. It may also indicate + that something (e.g. a filter) may have performed an action that has + changed the transaction and that the client should be informed of this. + */ + enum TTransactionWarning + { + /** An event indicating that the transaction has been redirected and the + original origin server indicated that it was a permanent redirection. + The URI for the transaction is now the redirected location. A + permanent redirection may require further client behavior if the + request came from a stored URI. This is to avoid further redirections + on subsequent requests for this resource. + */ + ERedirectedPermanently = KTransactionWarningBaseStatus, + /** An event indicating that the transaction has been redirected and the + original server indicated that it was a temporary redirection. + */ + ERedirectedTemporarily = KTransactionWarningBaseStatus + 1, + /** An event generated by the Protocol Handler when it receives a Content- + Length value that does not match the actual length of the body data. + */ + EMoreDataReceivedThanExpected = KTransactionWarningBaseStatus + 2 + }; + +public: // Methods + + /** Constructor + @param aStatus The status value. + @param aUID The UID. + */ + //##ModelId=3C4C187402FB + inline THTTPEvent(TInt aStatus, TUint aUID = KHTTPUid); + + /** Constructor (using a standard event and the HTTP UID) + @param aStatus The standard event to use. + */ + //##ModelId=3C4C18740304 + inline THTTPEvent(TStandardEvent aStatus = EAnyTransactionEvent); + + /** Constructor (using a transaction event and the HTTP UID) + @param aStatus The transaction event to use. + */ + //##ModelId=3C4C1874030C + inline THTTPEvent(TTransactionEvent aStatus); + + /** Assigns a standard event code to an event object + @param aStatus The standard event. + @return The HTTP event object. + */ + //##ModelId=3C4C187402EF + inline THTTPEvent& operator=(TStandardEvent aStatus); + + /** Assigns a transaction event code to an event object + @param aStatus The transaction event. + @return The HTTP event object. + */ + //##ModelId=3C4C187402F1 + inline THTTPEvent& operator=(TTransactionEvent aStatus); + + /** Equality operator + @param The HTTP event object to compare. + @return ETrue if the HTTP event objects are equal. + */ + //##ModelId=3C4C187402DA + inline TBool operator==(THTTPEvent aThat) const; + + /** Inequality operator + @param The HTTP event object to compare. + @return ETrue if the HTTP event objects are not equal. + */ + //##ModelId=3C4C187402BD + inline TBool operator!=(THTTPEvent aThat) const; + + /** Equality operator (compares with a standard event) + @param The standard event object to compare. + @return ETrue if the standard event objects are equal. + */ + //##ModelId=3C4C187402DC + inline TBool operator==(TStandardEvent aStatus) const; + + /** Inequality operator (compares with a standard event) + @param The standard event object to compare. + @return ETrue if the standard event objects are not equal. + */ + //##ModelId=3C4C187402C7 + inline TBool operator!=(TStandardEvent aStatus) const; + + /** Equality operator (compares with a transaction event) + @param The transaction event object to compare. + @return ETrue if the transaction event objects are equal. + */ + //##ModelId=3C4C187402E4 + inline TBool operator==(TTransactionEvent aStatus) const; + + /** Inequality operator (compares with a transaction event) + @param The transaction event object to compare. + @return ETrue if the transaction event objects are not equal. + */ + //##ModelId=3C4C187402D0 + inline TBool operator!=(TTransactionEvent aStatus) const; + + /** @return ETrue if the event is a session event + */ + //##ModelId=3C4C187402BC + inline TBool IsSessionEvent() const; + +public: // Attributes + + /** The status value. + */ + //##ModelId=3C4C187402B4 + TInt iStatus; + + /** The UID. + */ + //##ModelId=3C4C187402AA + TUint iUID; + +protected: // Attributes + /** Flag to indicate whether the event is a session event + */ + TBool iIsSessionEventFlag; + + }; + + +class THTTPSessionEvent : public THTTPEvent +/** +A HTTP session status message. Status messages consist of a UID and a +status code within that UID. Extension dlls that needs to create +new status messages should use their own UID and create status codes +within that UID. +@publishedAll +@released +*/ + { +public: // Enumerations + /** The TSessionEvents type defines the evenst that correspond to the + of a session entity. Outgoing events originate from the client or from + filters. Incoming events originate from the protocol handler or from + filters, and clients should handle these. + */ + enum TSessionEvent + { + /** A session connection should be initiated. An outgoing event. + */ + EConnect = KSessionEventBaseStatus, + /** The session should be disconnected. An outgoing event. + */ + EDisconnect = KSessionEventBaseStatus + 1, + /** The session has been successfully connected. None of the client + requested capabilities were denied or reduced by the proxy. An + incoming event. + */ + EConnectedOK = KSessionEventBaseStatus + 2, + /** The session has been connected, but with one or more of the client + requested capabilities denied or reduced by the proxy. An incoming + event. + */ + EConnectedWithReducedCapabilities = KSessionEventBaseStatus + 3, + /** The session has been disconnected. This either confirms an earlier + EDisconnect event or indicates a forced disconnection by the proxy. + An incoming event. + */ + EDisconnected = KSessionEventBaseStatus + 4, + /** The authentication handshake succeeded with the automatic validation + of the (proxy) server certificate. + */ + EAuthenticatedOK = KSessionEventBaseStatus + 5, + /** The authentication handshake failed. + */ + EAuthenticationFailure = KSessionEventBaseStatus + 6, + /** The connection attempt to the proxy timed out. + */ + EConnectionTimedOut = KSessionEventBaseStatus + 7 + }; + + /** + HTTP session warning events. + */ + enum TSessionWarning + { + /** The client has requested a transaction event that requires a session + to be connected or the connection to be initiated, but neither is + currently true. The transaction event will be left pending until the + session is connected. An incoming event. + */ + ENotConnected = KSessionWarningBaseStatus, + /** The proxy has sent some information that is not related to a + transaction and has no effect on the state of the session. The + information from the proxy is in the EProxyExceptionInfo property. + */ + EExceptionInfo = KSessionWarningBaseStatus + 1, + /** The client connection request was (permanently) redirected to a new + WAP proxy address. The client should check the EWspProxyAddress + property for the new address. The client's access-point database can + then be updated with this address. No notification is given of a + temporary redirection. + */ + ERedirected = KSessionWarningBaseStatus + 2, + /** The client has requested a session event that is not valid whilst + the WSP session is trying to establish a connection. + */ + EAlreadyConnecting = KSessionWarningBaseStatus + 3, + /** The client has requested a session event that is not valid whilst + the WSP session is in the Connected state. + */ + EAlreadyConnected = KSessionWarningBaseStatus + 4, + /** The client has requested a session event that is not valid whilst + the WSP session is trying to close the connection. + */ + EAlreadyDisconnecting = KSessionWarningBaseStatus + 5, + /** The client has requested a session event that is not valid whilst + the WSP session is in the Null (or disconnected) state. + */ + EAlreadyDisconnected = KSessionWarningBaseStatus + 6 + }; + +public: + /** Constructor + @param aStatus The status value. + @param aUID The UID. + */ + inline THTTPSessionEvent(TInt aStatus, TUint aUID = KHTTPUid); + + /** Constructor (using a standard event and the HTTP UID) + @param aStatus The standard event to use. + */ + inline THTTPSessionEvent(TStandardEvent aStatus = EAnySessionEvent); + + /** Constructor (using a session event and the HTTP UID) + @param aStatus The session event to use. + */ + inline THTTPSessionEvent(TSessionEvent aStatus); + + /** Assigns a session event code to an event object + @param aStatus The session event. + */ + //##ModelId=3C4C187402F9 + inline THTTPSessionEvent& operator=(TSessionEvent aStatus); + + /// Equality operator (compares with a session event) + //##ModelId=3C4C187402E6 + inline TBool operator==(TSessionEvent aStatus) const; + + /// Inequality operator (compares with a session event) + //##ModelId=3C4C187402D2 + inline TBool operator!=(TSessionEvent aStatus) const; + }; + +#include + +#endif // __THTTPEVENT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttpevent.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttpevent.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,114 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +inline THTTPEvent::THTTPEvent(TInt aStatus, TUint aUID) +: iStatus(aStatus), iUID(aUID), iIsSessionEventFlag(EFalse) + { + } + +inline THTTPEvent::THTTPEvent(TStandardEvent aStatus) +: iStatus(aStatus), iUID(KHTTPUid), iIsSessionEventFlag(EFalse) + { + } + +inline THTTPEvent::THTTPEvent(TTransactionEvent aStatus) +: iStatus(aStatus), iUID(KHTTPUid), iIsSessionEventFlag(EFalse) + { + } + +inline THTTPEvent& THTTPEvent::operator=(TStandardEvent aStatus) + { + iUID = KHTTPUid; + iStatus = aStatus; + return *this; + } + +inline THTTPEvent& THTTPEvent::operator=(TTransactionEvent aStatus) + { + iUID = KHTTPUid; + iStatus = aStatus; + return *this; + } + +inline TBool THTTPEvent::operator==(THTTPEvent aThat) const + { + return (iStatus == aThat.iStatus && iUID == aThat.iUID); + } + +inline TBool THTTPEvent::operator!=(THTTPEvent aThat) const + { + return !(*this == aThat); + } + +inline TBool THTTPEvent::operator==(TStandardEvent aStatus) const + { + return (iStatus == aStatus && iUID == KHTTPUid); + } + +inline TBool THTTPEvent::operator!=(TStandardEvent aStatus) const + { + return !(*this == aStatus); + } + +inline TBool THTTPEvent::operator==(TTransactionEvent aStatus) const + { + return (iStatus == aStatus && iUID == KHTTPUid); + } + +inline TBool THTTPEvent::operator!=(TTransactionEvent aStatus) const + { + return !(*this == aStatus); + } + +inline TBool THTTPEvent::IsSessionEvent() const + { + return iIsSessionEventFlag; + } + +inline THTTPSessionEvent::THTTPSessionEvent(TInt aStatus, TUint aUID) +: THTTPEvent(aStatus, aUID) + { + iIsSessionEventFlag = ETrue; + } + +inline THTTPSessionEvent::THTTPSessionEvent(TStandardEvent aStatus) +: THTTPEvent(aStatus) + { + iIsSessionEventFlag = ETrue; + } + +inline THTTPSessionEvent::THTTPSessionEvent(TSessionEvent aStatus) +: THTTPEvent(aStatus) + { + iIsSessionEventFlag = ETrue; + } + +inline THTTPSessionEvent& THTTPSessionEvent::operator=(TSessionEvent aStatus) + { + iUID = KHTTPUid; + iStatus = aStatus; + return *this; + } + +inline TBool THTTPSessionEvent::operator==(TSessionEvent aStatus) const + { + return (iStatus == aStatus && iUID == KHTTPUid); + } + +inline TBool THTTPSessionEvent::operator!=(TSessionEvent aStatus) const + { + return !(*this == aStatus); + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttpfilterhandle.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttpfilterhandle.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,88 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file THTTPFilterHandle.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __THTTPFILTERHANDLE_H__ +#define __THTTPFILTERHANDLE_H__ + +// System includes +#include + + +//##ModelId=3A914DF50317 +class THTTPFilterHandle +/** +A Filter registration handle. This identifies a particular filter +registration, and is passed to the filter in MHFLoad. It is used +to identify filters for deletion and for locating the start point +for sending events. It is an opaque class; all you need to be able +to do with it is to compare them for equality. +@publishedAll +@released +*/ + { + public: + /* Note. These are negative as values for particular filters use + positive values.*/ + /** Alisases for the client, and the filters you're most likely to want + to refer to. + */ + enum TStandardValues + { + EUndefined = 0, ///< Undefined default value. + EClient = -1, ///< Placeholder for the client. + EProtocolHandler = -2, ///< Constant value for the protocol handler. + /// When sending an event from a MHFRunL, indicates the current filter. + ECurrentFilter = -3 + }; + public: + //##ModelId=3A914DF50336 + inline THTTPFilterHandle(TStandardValues aVal = EUndefined); + //##ModelId=3A914DF5032D + inline TBool operator==(THTTPFilterHandle aThat) const; + //##ModelId=3A914DF5032B + inline TBool operator!=(THTTPFilterHandle aThat) const; + private: + //##ModelId=3A914DF50323 + TInt iValue; + friend class RHTTPSession; + friend class RHTTPFilterCollection; + friend class CHTTPSession; + friend class CTransaction; + }; + +inline THTTPFilterHandle::THTTPFilterHandle(TStandardValues aVal) + : iValue(aVal) + { + } + +inline TBool THTTPFilterHandle::operator==(THTTPFilterHandle aThat) const + { + return iValue == aThat.iValue; + } + +inline TBool THTTPFilterHandle::operator!=(THTTPFilterHandle aThat) const + { + return !(*this == aThat); + } + + +#endif // __THTTPFILTERHANDLE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttpfilteriterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttpfilteriterator.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,115 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file THTTPFilterIterator.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __THTTPFILTERITERATOR_H__ +#define __THTTPFILTERITERATOR_H__ + +// System includes +#include +#include +#include + +// Forward declarations +class CHTTPSession; + + +//##ModelId=3C4C187A0152 +class THTTPFilterIterator +/** +An iterator for RHTTPFilterCollection. The iterator can iterate +over a subset of the filters in the collection, depending on how it +was created. See RHTTPFilterCollection::Query for more details. In +the documentation here, 'the collection' always refers to the +filters that this iterator can see. +@publishedAll +@released +*/ + { + public: + /** Non-initialised constructor. Note, to get an initialised one + that actualy points to a filter collection, use + RHTTPFilterCollection::Query */ + //##ModelId=3C4C187A01A2 + inline THTTPFilterIterator(); + + /** Moves the iterator to the first member of the collection */ + //##ModelId=3C4C187A019A + inline void First(); + + /** Returns ETrue if the iterator is at the end of the collection */ + //##ModelId=3C4C187A0199 + IMPORT_C TBool AtEnd() const; + + /** Moves on to the next item in the collection */ + //##ModelId=3C4C187A0198 + IMPORT_C THTTPFilterIterator& operator++(); + + /** Returns the filter that the iterator is pointing at */ + //##ModelId=3C4C187A0190 + IMPORT_C const THTTPFilterRegistration& operator()() const; + + /** Returns the filter that the iterator is pointing at */ + //##ModelId=3C4C187A018F + inline const THTTPFilterRegistration& operator*() const; + + /** Returns the filter that the iterator is pointing at */ + //##ModelId=3C4C187A018E + inline const THTTPFilterRegistration& operator->() const; + + private: + friend class RHTTPFilterCollection; + + //##ModelId=3C4C187A017C + CHTTPSession* iImplementation; + + //##ModelId=3C4C187A0172 + TInt iPos; + + //##ModelId=3C4C187A0168 + RStringTokenF iName; + }; + + +inline THTTPFilterIterator::THTTPFilterIterator() + : iImplementation(NULL), iPos(0) + { + } + +inline void THTTPFilterIterator::First() + { + iPos = -1; + operator++(); + } + +inline const THTTPFilterRegistration& THTTPFilterIterator::operator*() const + { + return operator()(); + } + +inline const THTTPFilterRegistration& THTTPFilterIterator::operator->() const + { + return operator()(); + } + + + +#endif // __THTTPFILTERITERATOR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttpfilterregistration.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttpfilterregistration.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,102 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file THTTPFilterRegistration.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __THTTPFILTERREGISTRATION_H__ +#define __THTTPFILTERREGISTRATION_H__ + +// System includes +#include +#include +#include + +// Forward declarations +class MHTTPFilter; + + +//##ModelId=3C4C187D0188 +class THTTPFilterRegistration +/** +A registration of a filter in the filter queue +@publishedAll +@released +*/ + { + public: + /// Default constructor + //##ModelId=3C4C187D020B + THTTPFilterRegistration(); + /// Constructor + //##ModelId=3C4C187D0214 + THTTPFilterRegistration(MHTTPFilter& aFilter, THTTPEvent aEvent, + RStringTokenF aHeader, TInt aStatusCode, + TInt aPosition, RStringTokenF aName, TInt aHandle); + /// Equality operator + //##ModelId=3C4C187D0201 + TBool operator==(THTTPFilterRegistration& aThat); + /// Inequality operator + //##ModelId=3C4C187D01F9 + TBool operator!=(THTTPFilterRegistration& aThat); + + public: + /// The position + //##ModelId=3C4C187D01F6 + TInt iPosition; // This MUST be first! + /// The filter + //##ModelId=3C4C187D01E4 + MHTTPFilter* iFilter; + /// The event it's interested in (or any) + //##ModelId=3C4C187D01D8 + THTTPEvent iEvent; + /// The header it's interested in (or any) + //##ModelId=3C4C187D01C6 + RStringTokenF iHeader; + /// The status it's interested in (or any) + //##ModelId=3C4C187D01BC + TInt iStatus; + /// The name of the filter + //##ModelId=3C4C187D01B2 + RStringTokenF iName; + /// The handle of the filter + //##ModelId=3C4C187D01A8 + TInt iHandle; + }; + +inline THTTPFilterRegistration::THTTPFilterRegistration() + : iEvent(THTTPEvent::EAll) + { + } + +inline THTTPFilterRegistration::THTTPFilterRegistration(MHTTPFilter& aFilter, + THTTPEvent aEvent, + RStringTokenF aHeader, + TInt aStatusCode, + TInt aPosition, + RStringTokenF aName, + TInt aHandle) + :iPosition(aPosition), iFilter(&aFilter), iEvent(aEvent), + iHeader(aHeader), iStatus(aStatusCode) , iName(aName), iHandle(aHandle) + { + } + + + +#endif // __THTTPFILTERREGISTRATION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttphdrfielditer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttphdrfielditer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,106 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file THTTPHdrFieldIter.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __THTTPHDRFIELDITER_H__ +#define __THTTPHDRFIELDITER_H__ + +// System includes +#include +#include + +// Forward declarations +class CHeaders; + + +//##ModelId=3A914DFD005C +class THTTPHdrFieldIter +/** +Iterator class to iterate the fields within a RHTTPHeaders. +@publishedAll +@released +*/ + { +public: + /** Construct an iterator for the fields of the supplied header collection. + @param aHeaders The header collection whose fields we want to iterate + */ + //##ModelId=3A914DFD0087 + THTTPHdrFieldIter(const CHeaders* aHeaders); + /** Class destructor + */ + //##ModelId=3A914DFD0086 + IMPORT_C ~THTTPHdrFieldIter(); + + /** Reset iterator to point at the first field in the header collection + */ + //##ModelId=3A914DFD0085 + IMPORT_C void First(); + + /** Check if the iterator is at the end of the collection. If so, + further calls to operator() will return NULL. + @return True if the iterator has reached the end of the header + fields + */ + //##ModelId=3A914DFD0084 + IMPORT_C TBool AtEnd() const; + + /** Advance the iterator to the next field. + @return True if the iterator still points at a valid part + after advancing. + */ + //##ModelId=3A914DFD007E + IMPORT_C void operator++(); + + /** Obtain the name of the header field currently pointed at by + the iterator. + @return The field name; or if the iterator has + gone off the end of the header collection + */ + //##ModelId=3A914DFD007D + IMPORT_C RStringTokenF operator()(); + +private: + + /** Check the iterator state for invalidity following deletions in the collection + */ + //##ModelId=3BA613240002 + void CheckInvalidation(); + + /** The headers whose fields we are iterating. + */ + //##ModelId=3A914DFD007A + const CHeaders* iHeaders; + /** The index of the field in the header that is currently pointed + at by the iterator + */ + //##ModelId=3A914DFD0072 + TInt iPosIdx; + }; + +inline THTTPHdrFieldIter::THTTPHdrFieldIter(const CHeaders* aHeaders) + : iHeaders(aHeaders) + { + First(); + } + + +#endif // __THTTPHDRFIELDITER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/http/thttphdrval.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/http/thttphdrval.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,280 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file THTTPHdrVal.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __THTTPHDRVAL_H__ +#define __THTTPHDRVAL_H__ + +// System includes +#include +#include + + +//##ModelId=3C4C187E027A +class THTTPHdrVal +/** +A representation of a value found in an HTTP header field. Three +fundamental types are used in HTTP - integers, strings (which may +be free text, 'enumeration values', URIs, etc. or date/times. + +The class allows any of the three values to be held and the current +value (as well as its type) to be determined. + +THTTPHdrVal instances are used to assign values to header fields, their +parts and their associated parameters. +@publishedAll +@released +@see RHTTPHeaders +*/ + { +public: + /** + @enum THTTPValType + */ + typedef enum { + KTIntVal = 0x00, /**< the value is an integer*/ + KStrVal = 0x01, /**< the value is a case-sensitive string*/ + KDateVal = 0x02, /**< the value is a date/time*/ + KStrFVal = 0x03, /**< the value is a case-insensitive string*/ + KNoType = 0x04 /**< no value has yet been set*/ + } THTTPValType; + +public: // classes + + // A converter for 'q' parameter values; apparently real numbers in the HTTP RFC but here passed as fixed point +//##ModelId=3B1E66F2024E + class TQConv + { + public: + /// Construct from a real number representation of 'q' + //##ModelId=3B1E66F20282 + TQConv(TReal aQ); + + /// Construct from a fixed-point representation of 'q' + //##ModelId=3B1E66F2028C + TQConv(TInt aQ); + + /// Integer cast operator to get the fixed-point representation + //##ModelId=3B1E66F20281 + operator TInt() const; + + /// TReal cast operator to get the real number representation + //##ModelId=3B1E66F20280 + operator TReal() const; + private: + /// The real number q-value + //##ModelId=3B1E66F2027A + TReal iQ; + /// The integer fixed-point q-value representation + //##ModelId=3B1E66F2026E + TInt iFQ; + }; + +public: + /** Default constructor + Used when constructing an empty header value that is to be filled in by + a call to a function. e.g. RHTTPHeaders::GetField + */ + IMPORT_C THTTPHdrVal(); + + /** Constructor for an integer field value + @param aIntVal The integer value + */ + IMPORT_C THTTPHdrVal(TInt aIntVal); + + /** Constructor for an string value + @param aStrVal The string value + */ + IMPORT_C THTTPHdrVal(RStringF aStrVal); + /** Constructor for an string value + @param aStrVal The string value + */ + IMPORT_C THTTPHdrVal(RString aStrVal); + + /** Constructor for an date/time value + @param aDateVal The date/time value + */ + IMPORT_C THTTPHdrVal(TDateTime aDateVal); + + /** Obtain a copy of this header value. This is critical when the header contains a string, since + a new string reference must be created + @return The copied header value + */ + //##ModelId=3C4C187E02F3 + IMPORT_C THTTPHdrVal Copy() const; + + /** Determine the type of this header field value + @return A THTTPValType enumeration describing the value's type + */ + //##ModelId=3C4C187E02F2 + IMPORT_C THTTPValType Type() const; + + /** Obtain the (integer) value held within + Panics if the value is of the wring type + @pre Requires that the object was previously set to hold a TInt + @return An integer value + */ + //##ModelId=3C4C187E02EA + IMPORT_C TInt Int() const; + + /** Cast operator to obtain the HTTP value as an integer. + Note this doesn't convert from a different form to integer! + Panics if the value is of the wrong type + @pre Requires that the object was previously set to hold a TInt + */ + //##ModelId=3C4C187E02E9 + inline operator TInt() const; + + /** Obtain the (string) value held within + Panics if the value is of the wring type + @pre Requires that the object was previously set to hold a string + @return A string + */ + //##ModelId=3C4C187E02E8 + IMPORT_C RStringF StrF() const; + //##ModelId=3C4C187E02E0 + IMPORT_C RString Str() const; + + /** Cast operator to obtain the HTTP value as a string. + Note this doesn't convert from a different form to string! + Panics if the value is of the wring type + @pre Requires that the object was previously set to hold a string + */ + //##ModelId=3C4C187E02DF + inline operator RStringF() const; + /** Cast operator to obtain the HTTP value as a string. + Note this doesn't convert from a different form to string! + Panics if the value is of the wring type + @pre Requires that the object was previously set to hold a string + */ + //##ModelId=3C4C187E02DE + inline operator RString() const; + + /** Obtain the (date/time) value held within. + Panics if the value is of the wrong type + @pre Requires that the object was previously set to hold a TDateTime + @return An date/time value + */ + //##ModelId=3C4C187E02D6 + IMPORT_C TDateTime DateTime() const; + + /** Cast operator to obtain the HTTP value as an date/time. + Note this doesn't convert from a different form to date! + Panics if the value is of the wring type + @pre Requires that the object was previously set to hold a TDateTime + */ + //##ModelId=3C4C187E02D5 + inline operator TDateTime() const; + + /** Set the header value to be the supplied integer. + @warning Any previous value, or its type, are lost. + @param aIntVal The integer value + */ + //##ModelId=3C4C187E02CC + IMPORT_C void SetInt(TInt aIntVal); + + /** Set the header value to be the supplied string. + @warning Any previous value, or its type, are lost. + @param aStrVal The string value + */ + //##ModelId=3C4C187E02CA + IMPORT_C void SetStrF(RStringF aStrVal); + /** Set the header value to be the supplied string. Any previous + value, or its type, are lost. + @param aStrVal The string value */ + //##ModelId=3C4C187E02C2 + IMPORT_C void SetStr(RString aStrVal); + + /** Set the header value to be the supplied date/time. Any previous value, or its type, are lost. + @param aDateVal The date/time value + */ + //##ModelId=3C4C187E02C0 + IMPORT_C void SetDateTime(TDateTime aDateVal); + + /** Comparison operator. Does a comparison based on the current type. + @param aVal The header value to compare. */ + //##ModelId=3C4C187E02B8 + IMPORT_C TBool operator==(THTTPHdrVal aVal) const; + + /** Comparison operator. Does a comparison based on the current type. + @param aVal The string to compare. */ + //##ModelId=3C4C187E02B6 + IMPORT_C TBool operator!=(THTTPHdrVal aVal) const; + +private: + /** + The current type + */ + //##ModelId=3C4C187E02AC + THTTPValType iType; + + /** + The value + */ + //##ModelId=3C4C187E02A4 + TInt iVal; + //##ModelId=3C4C187E029A + TInt iMoreSpace; + }; + +inline THTTPHdrVal::TQConv::TQConv(TReal aQ) + : iQ(aQ), iFQ((TInt)(iQ*1000)) + { + } + +inline THTTPHdrVal::TQConv::TQConv(TInt aFQ) + : iQ((TReal)(aFQ/1000.)), iFQ(aFQ) + { + } + +inline THTTPHdrVal::TQConv::operator TInt() const + { + return iFQ; + } + +inline THTTPHdrVal::TQConv::operator TReal() const + { + return iQ; + } + +inline THTTPHdrVal::operator TInt() const + { + return Int(); + } + +inline THTTPHdrVal::operator RStringF() const + { + return StrF(); + } + +inline THTTPHdrVal::operator RString() const + { + return Str(); + } + +inline THTTPHdrVal::operator TDateTime() const + { + return DateTime(); + } + + + +#endif // __THTTPHDRVAL_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/httperr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/httperr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,882 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file httperr.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __HTTPERR_H__ +#define __HTTPERR_H__ + +// System includes +#include + +//##ModelId=3C4C18750141 +class HTTPStatus +/** +The complete set of HTTP Status codes, as defined in RFC2616. +@publishedAll +@released +*/ + { +public: + enum + { + /** 'Informational' range of codes 1xx + */ + /** Continue. + */ + EContinue = 100, + /** Switching Protocols. + */ + ESwitchingProtocols = 101, + /** 'Successful' range of codes 2xx + */ + /** Ok. + */ + EOk = 200, + /** Created. + */ + ECreated = 201, + /** The entry has been accepted. + */ + EAccepted = 202, + /** Non-Authoritative Information. + */ + ENonAuthoritativeInfo = 203, + /** No Content. + */ + ENoContent = 204, + /** Reset Content. + */ + EResetContent = 205, + /** Partial Content. + */ + EPartialContent = 206, + /** 'Redirection' range of codes 3xx + */ + /** Multiple Choices. + */ + EMultipleChoices = 300, + /** Moved Permanently. + */ + EMovedPermanently = 301, + /** Found. + Note, this is deprecated in HTTP/1.1 - 307 will be used instead + */ + EFound = 302, + /** See Other. + */ + ESeeOther = 303, + /** Not Modified. + */ + ENotModified = 304, + /** Use Proxy. + */ + EUseProxy = 305, + /** Unused. + */ + EUnused = 306, + /** Temporary Redirect. + */ + ETemporaryRedirect = 307, + /** 'Client Error' range of codes 4xx + */ + /** Bad Request. + */ + EBadRequest = 400, + /** Unauthorized. + */ + EUnauthorized = 401, + /** Payment Required. Note, this is reserved in HTTP/1.1 + */ + EPaymentRequired = 402, + /** Forbidden. + */ + EForbidden = 403, + /** Not Found. + */ + ENotFound = 404, + /** Method Not Allowed. + */ + EMethodNotAllowed = 405, + /** Not Acceptable. + */ + ENotAcceptable = 406, + /** Proxy Authentication Required. + */ + EProxyAuthenticationRequired = 407, + /** Request Timeout. + */ + ERequestTimeout = 408, + /** Conflict. + */ + EConflict = 409, + /** Gone. + */ + EGone = 410, + /** Length Required. + */ + ELengthRequired = 411, + /** Precondition Failed. + */ + EPreconditionFailed = 412, + /** Request Entity Too Large. + */ + ERequestEntityTooLarge = 413, + /** Request-URI Too Long. + */ + ERequestURITooLong = 414, + /** Unsupported Media Type. + */ + EUnsupportedMediaType = 415, + /** Requested Range Not Satisfiable. + */ + ERequestedRangeNotSatisfiable = 416, + /** Expectation Failed. + */ + EExpectationFailed = 417, + /** 'Server Error' range of codes 5xx + */ + /** Internal Server Error. + */ + EInternalServerError = 500, + /** Not Implemented. + */ + ENotImplemented = 501, + /** Bad Gateway. + */ + EBadGateway = 502, + /** Service Unavailable. + */ + EServiceUnavailable = 503, + /** Gateway Timeout. + */ + EGatewayTimeout = 504, + /** HTTP Version Not Supported. + */ + EHTTPVersionNotSupported = 505 + }; + + /** Is the supplied status code in the 1xx Informational range? + @param aStatus Is the supplied status code in the 1xx Informational range? + @return ETrue if the specified status code is in the 1xx Informational range. + ##ModelId=3C4C18750162 + */ + inline static TBool IsInformational(TInt aStatus); + + + /** Is the supplied status code in the 2xx Successful range? + @param aStatus Is the supplied status code in the 2xx Successful range? + @return ETrue if the specified status code is in the 2xx Successful range + ##ModelId=3C4C18750160 + */ + inline static TBool IsSuccessful(TInt aStatus); + + /** Is the supplied status code in the 3xx Redirection range? + @param aStatus Is the supplied status code in the 3xx Redirection range? + @return ETrue if the specified status code is in the 3xx Redirection range. + ##ModelId=3C4C18750159 + */ + inline static TBool IsRedirection(TInt aStatus); + + /** Is the supplied status code in the 4xx Client Error range? + @param aStatus Is the supplied status code in the 4xx Client Error range? + @return ETrue if the specified status code is in the 4xx Client Error range. + ##ModelId=3C4C18750157 + */ + inline static TBool IsClientError(TInt aStatus); + + /** Is the supplied status code in the 5xx Server Error range? + @param aStatus Is the supplied status code in the 5xx Server Error range? + @return ETrue if the specified status code is in the 5xx Server Error range. + ##ModelId=3C4C18750155 + */ + inline static TBool IsServerError(TInt aStatus); + }; + +// +// HTTP Panic codes +// + +#include + +// HTTPPanic::Panic(HTTPPanic:: ) + +//##ModelId=3C4C18740352 +class HTTPPanic +/** +HTTP panic codes +@publishedAll +@released +*/ + { +public: + enum THTTPPanic + { + /** RHTTPSession session is already open. ( Panic HTTP-CORE 0 ) + */ + ESessionAlreadyOpen, + /** Specified field is missing. ( Panic HTTP-CORE 1 ) + */ + EHeaderFieldMissing, + /** Unused. ( Panic HTTP-CORE 2 ) + */ + EHeaderParamMissing, + /** Unused. ( Panic HTTP-CORE 2 ) + */ + EHeaderInvalidPart, + /** Mismatch between header's type and its attempted use. ( Panic HTTP-CORE 4 ) + */ + EHeaderInvalidType, + /** Unused. ( Panic HTTP-CORE 5 ) + */ + ETransactionEventOutstanding, + /** A transaction error occurred, and the MHFRunError() in use didn't handle it. ( Panic HTTP-CORE 6 ) + */ + ETransactionUnhandledError, + /** Attempted to add a filter while there is a transaction outstanding. ( Panic HTTP-CORE 6 ) + */ + EAddingFilterWithOutstandingTransactions, + /** Attempted to add a filter at a position not between the protocol handler and the client. ( Panic HTTP-CORE 8 ) + */ + EFilterInvalidPosition, + /** CHTTPEncoder object destroyed without its data being released. ( Panic HTTP-CORE 9 ) + */ + EHTTPFormDataUnreleased, + /** CHTTPEncoder object at the wrong state for adding data. ( Panic HTTP-CORE 10 ) + */ + EHTTPFormSupplyingData, + /** Unused. ( Panic HTTP-CORE 11 ) + */ + EValidationFilterFailure, + /** Invalid request data. ( Panic HTTP-CORE 12 ) + */ + EInvalidTxData, + /** Invalid response data. ( Panic HTTP-CORE 13 ) + */ + EInvalidRxData, + /** Unused. ( Panic HTTP-CORE 14 ) + */ + ENoTransportHandlerSet, + /** Unused. ( Panic HTTP-CORE 15 ) + */ + EAuthenticationFilterBadState, + /** An invalid filter handle was specified. ( Panic HTTP-CORE 16 ) + */ + EInvalidFilterHandle + }; + + //##ModelId=3C4C18740366 + static void Panic(THTTPPanic aPanic); + }; + +// HTTP external errors/leave codes. Add new sub-ranges at the end; do not insert between the sub-ranges that +// are already here. This is to allow a client to reasonably check for errors between two adjacent range +// base values rather than check for individual codes. + +/** +Base value for the HTTP error code range (-7200 to -7399) +@publishedAll +@released +*/ +const TInt KHttpErrorBase = -7200; + +// +// Text mode HTTP protocol handler +// + +/** +Codec encoding errors for HTTP headers +@publishedAll +@released +*/ +const TInt KHttpHeaderEncodeErrorBase = KHttpErrorBase; + +/** +Error making a default encoding of unrecognised headers +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDefault = KHttpHeaderEncodeErrorBase; +/** +Error encoding the Accept field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeAccept = KHttpHeaderEncodeErrorBase - 1; +/** +Error encoding the Accept-Charset field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeAcceptCharset = KHttpHeaderEncodeErrorBase - 2; +/** +Error encoding a q-value parameter +@publishedAll +@released +*/ +const TInt KErrHttpEncodeQValue = KHttpHeaderEncodeErrorBase - 3; +/** +Error encoding the Authorization field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeAuthorization = KHttpHeaderEncodeErrorBase - 4; +/** +Error encoding Basic credentials +@publishedAll +@released +*/ +const TInt KErrHttpEncodeBasicAuth = KHttpHeaderEncodeErrorBase - 5; +/** +Error encoding Digest credentials +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDigestAuth = KHttpHeaderEncodeErrorBase - 6; +/** +Error encoding the Connection field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeConnection = KHttpHeaderEncodeErrorBase - 7; +/** +Error encoding the Content-Length field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeContentLength = KHttpHeaderEncodeErrorBase - 8; +/** +Error encoding the Content-Type field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeContentType = KHttpHeaderEncodeErrorBase - 9; +/** +Error encoding the Host field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeHost = KHttpHeaderEncodeErrorBase - 10; +/** +Error encoding the Host field's port parameter +@publishedAll +@released +*/ +const TInt KErrHttpEncodeHostPort = KHttpHeaderEncodeErrorBase - 11; +/** +Error encoding the Transfer-Encoding field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeTransferEncoding = KHttpHeaderEncodeErrorBase - 12; +/** +Error encoding the User-Agent field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeUserAgent = KHttpHeaderEncodeErrorBase - 13; +/** +Error encoding the Date field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDate = KHttpHeaderEncodeErrorBase - 14; +/** +Error encoding the Cookie field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeCookie = KHttpHeaderEncodeErrorBase - 15; +/** +Error encoding the Cache-Control field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeCacheControl = KHttpHeaderEncodeErrorBase - 16; +/** +Error encoding the Pragma field +@publishedAll +@released +*/ +const TInt KErrHttpEncodePragma = KHttpHeaderEncodeErrorBase - 17; +/** +Error encoding the if match field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeIfMatch = KHttpHeaderEncodeErrorBase - 18; +/** +Error encoding the if none match field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeIfNoneMatch = KHttpHeaderEncodeErrorBase - 19; +/** +Error encoding the if modified since field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeIfModifiedSince = KHttpHeaderEncodeErrorBase - 20; +/** +Error encoding the if unmodified since field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeIfUnmodifiedSince = KHttpHeaderEncodeErrorBase - 21; +/** +Error encoding the Cookie2 field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeCookie2 = KHttpHeaderEncodeErrorBase - 22; +/** +Error encoding the Content-Language field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeContentLanguage = KHttpHeaderEncodeErrorBase - 23; +/** +Error encoding the WWWAuthenticate field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDoWWWAuthenticate = KHttpHeaderEncodeErrorBase - 24; +/** +Error encoding the Age field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDoAge = KHttpHeaderEncodeErrorBase - 25; +/** +Error encoding the Vary field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDoVary = KHttpHeaderEncodeErrorBase - 26; +/** +Error encoding the Content-Language field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeDoContentLanguage = KHttpHeaderEncodeErrorBase - 27; +/** +Error encoding the Content-Encoding field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeContentEncoding = KHttpHeaderEncodeErrorBase - 28; +/** +Error encoding the Content-Location field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeContentLocation = KHttpHeaderEncodeErrorBase - 29; +/** +Error encoding the Content-MD5 field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeContentMD5 = KHttpHeaderEncodeErrorBase - 30; +/** +Error encoding the Accept-Encoding field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeAcceptLanguage = KHttpHeaderEncodeErrorBase - 31; +/** +Error encoding the Accept-Language field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeAcceptEncoding = KHttpHeaderEncodeErrorBase - 32; +/** +Error encoding the TE field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeTE = KHttpHeaderEncodeErrorBase - 33; +/** +Error encoding the Upgrade field +@publishedAll +@released +*/ +const TInt KErrHttpEncodeUpgrade = KHttpHeaderEncodeErrorBase - 34; + +/** +Codec decoding errors for values found in HTTP headers +@publishedAll +@released +*/ +const TInt KHttpValueDecodeErrorBase = KHttpErrorBase - 60; + +/** +General formatting error for date values +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedDate = KHttpValueDecodeErrorBase; +/** +Malformed year +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedYear = KHttpValueDecodeErrorBase - 1; +/** +Malformed short month name +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedMonth = KHttpValueDecodeErrorBase - 2; +/** +Malformed number of day in month +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedDay = KHttpValueDecodeErrorBase - 3; +/** +Malformed short day name +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedWkDay = KHttpValueDecodeErrorBase - 4; +/** +Malformed long day name +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedWeekDay = KHttpValueDecodeErrorBase - 5; +/** +Malformed integer value +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedInteger = KHttpValueDecodeErrorBase - 6; +/** +Malformed quoted string +@publishedAll +@released +*/ +const TInt KErrHttpDecodeMalformedQuotedStr = KHttpValueDecodeErrorBase - 7; + +/** +Codec decoding errors for HTTP headers +@publishedAll +@released +*/ +const TInt KHttpHeaderDecodeErrorBase = KHttpErrorBase - 70; + +/** +Error decoding the Accept field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeAccept = KHttpHeaderDecodeErrorBase; +/** +Error decoding the Connection field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeConnection = KHttpHeaderDecodeErrorBase - 1; +/** +Error decoding the Content-Length field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeContentLength = KHttpHeaderDecodeErrorBase - 2; +/** +Error decoding the Content-Type field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeContentType = KHttpHeaderDecodeErrorBase - 3; +/** +Error decoding the Transfer-Encoding field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeTransferEncoding = KHttpHeaderDecodeErrorBase - 4; +/** +Error decoding the WWWAuthenticate field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeWWWAuthenticate = KHttpHeaderDecodeErrorBase - 5; +/** +The WWWAuthenticate field contained an unrecognised authentication scheme +@publishedAll +@released +*/ +const TInt KErrHttpDecodeUnknownAuthScheme = KHttpHeaderDecodeErrorBase - 6; +/** +Error decoding a Basic WWWAuthenticate challenge +@publishedAll +@released +*/ +const TInt KErrHttpDecodeBasicAuth = KHttpHeaderDecodeErrorBase - 7; +/** +Error decoding a Digest WWWAuthenticate challenge +@publishedAll +@released +*/ +const TInt KErrHttpDecodeDigestAuth = KHttpHeaderDecodeErrorBase - 8; +/** +Error decoding a Set-Cookie field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeCookie = KHttpHeaderDecodeErrorBase - 9; +/** +Error decoding the Authorization field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeAuthorization = KHttpHeaderDecodeErrorBase - 10; +/** +Error decoding the Accept-Charset field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeAcceptCharset = KHttpHeaderDecodeErrorBase - 11; +/** +Error decoding the Accept-Language field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeAcceptLanguage = KHttpHeaderDecodeErrorBase - 12; +/** +Error decoding the Accept-Encoding field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeAcceptEncoding = KHttpHeaderDecodeErrorBase - 13; +/** +Error decoding the TE field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeTE = KHttpHeaderEncodeErrorBase - 14; +/** +Error decoding the Expect field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeExpect = KHttpHeaderEncodeErrorBase - 15; +/** +Error decoding the Content-Disposition field +@publishedAll +@released +*/ +const TInt KErrHttpDecodeContentDisposition = KHttpHeaderDecodeErrorBase - 14; +/** +Response errors. These represent specific failure cases +@publishedAll +@released +*/ +const TInt KErrHttpResponseFailureBase = KHttpErrorBase - 100; + +/** +A uri redirected too many times, possibly indicating a circular redirection +@publishedAll +@released +*/ +const TInt KErrHttpRedirectExceededLimit = KErrHttpResponseFailureBase; +/** +A server responded that the uri must be fetched via a proxy +@publishedAll +@released +*/ +const TInt KErrHttpRedirectUseProxy = KErrHttpResponseFailureBase - 1; +/** +A server sent a redirection response that did not include a Location header +@publishedAll +@released +*/ +const TInt KErrHttpRedirectNoLocationField = KErrHttpResponseFailureBase - 2; +/** +An error occured in parsing which left the parser in a unknown state +@publishedAll +@released +*/ +const TInt KErrHttpUnknownParseState = KErrHttpResponseFailureBase - 3; + +/** +Request building errors: cause the Validation Filter to make a transaction fail and terminate +@publishedAll +@released +*/ +const TInt KErrHttpReqBuildErrorBase = KHttpErrorBase - 130; + +/** +A body is provided with a method that doesn't allow bodys to be transmitted +@publishedAll +@released +*/ +const TInt KErrHttpRequestHasBody = KErrHttpReqBuildErrorBase; +/** +A body is missing from a method that requires it +@publishedAll +@released +*/ +const TInt KErrHttpRequestBodyMissing = KErrHttpReqBuildErrorBase - 1; +/** +Should contain The Max-Forward header +@publishedAll +@released +*/ +const TInt KErrHttpTraceReqWithoutMaxForwardHeader = KErrHttpReqBuildErrorBase - 2; +/** +Body must NOT be sent chunked if using HTTP/1.0 +@publishedAll +@released +*/ +const TInt KErrHttpPostReqBodyWithoutSizeOnHTTP10 = KErrHttpReqBuildErrorBase - 3; +/** +Request contained a response header or a entity header but no body +@publishedAll +@released +*/ +const TInt KErrHttpInvalidHeaderInRequest = KErrHttpReqBuildErrorBase - 4; +/** +Missing but required header errors +@publishedAll +@released +*/ + +const TInt KErrHttpMissingHeaderBase = KHttpErrorBase - 160; +/** +A body was provided in the request but no Content-Type header was set +@publishedAll +@released +*/ + +const TInt KErrHttpEntityHeaderMissingContentType = KErrHttpMissingHeaderBase; +/** +The request URI was relative, but no Host header was set to indicate a server to connect to +@publishedAll +@released +*/ +const TInt KErrHttpGeneralHeaderMissingHost = KErrHttpMissingHeaderBase - 1; +/** +Protocol handler errors +@publishedAll +@released +*/ +const TInt KErrHttpProtocolHandlerBase = KHttpErrorBase - 170; +/** +The request body needed to be rewound but the client but it doesn't support +@publishedAll +@released +*/ +const TInt KErrHttpCantResetRequestBody = KErrHttpProtocolHandlerBase; +/** +The Protocol handler is not initialised +@publishedAll +@released +*/ +const TInt KErrHttpProtTransactionNotInitialised = KErrHttpProtocolHandlerBase -1; +/** +Unable to establish a tunnel. +@publishedAll +@released +*/ +const TInt KErrHttpCannotEstablishTunnel = KErrHttpProtocolHandlerBase -2; +/** +Invalid URI +@publishedAll +@released +*/ +const TInt KErrHttpInvalidUri = KErrHttpProtocolHandlerBase -3; +/** +Protocol handler experienced a non-pipelining error +@publishedAll +@released +*/ +const TInt KErrHttpNonPipeliningError = KErrHttpProtocolHandlerBase -4; +/** +Protocol handler experienced a pipelining error +@publishedAll +@released +*/ +const TInt KErrHttpPipeliningError = KErrHttpProtocolHandlerBase -5; + +/** +The request has been not sent for the transaction and connection has been disconnected. +This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property +is set with a value HTTP::EEnableDisconnectNotification + +@publishedAll +@released +*/ +const TInt KErrHttpRequestNotSent = KErrHttpProtocolHandlerBase -6; + +/** +The response has been not received for the transaction and connection has been disconnected. +This error will be propagated to the client only, if the HTTP:ENotifyOnDisconnect property is +set with a value HTTP::EEnableDisconnectNotification + +@publishedAll +@released +*/ +const TInt KErrHttpResponseNotReceived = KErrHttpProtocolHandlerBase -7; + +/** +Partial response has been received and connection has been disconnected. This error will be +propagated to the client only, if the HTTP:ENotifyOnDisconnect property is set with a value +HTTP::EEnableDisconnectNotification + +@publishedAll +@released +*/ +const TInt KErrHttpPartialResponseReceived = KErrHttpProtocolHandlerBase -8; + +/** +ClientApplication wants to fail the transaction that was in process by the HTTPMessageParser +@publishedAll +@released +*/ +const TInt KErrHttpOptimiserFailsTrans = KErrHttpProtocolHandlerBase -9; + +// end of error codes - maximum error value is -7399 - must not be exceeded! +// Inline methods from HTTPStatus + +inline TBool HTTPStatus::IsInformational(TInt aStatus) + { + return ((aStatus >= HTTPStatus::EContinue) && (aStatus < HTTPStatus::EOk)); + } +inline TBool HTTPStatus::IsSuccessful(TInt aStatus) + { + return ((aStatus >= HTTPStatus::EOk) && (aStatus < HTTPStatus::EMultipleChoices)); + } +inline TBool HTTPStatus::IsRedirection(TInt aStatus) + { + return ((aStatus >= HTTPStatus::EMultipleChoices) && (aStatus < HTTPStatus::EBadRequest)); + } +inline TBool HTTPStatus::IsClientError(TInt aStatus) + { + return ((aStatus >= HTTPStatus::EBadRequest) && (aStatus < HTTPStatus::EInternalServerError)); + } +inline TBool HTTPStatus::IsServerError(TInt aStatus) + { + return (aStatus >= HTTPStatus::EInternalServerError); + } + + + +#endif // __HTTPERR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/httpstd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/httpstd.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Purpose: This file sets the values for HTTP's return/error codes and +// panic codes. +// +// + +#if !defined(__HTTPSTD_H__) +#define __HTTPSTD_H__ + +// System includes +// +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__WAPENGSTD_H__) +#include +#endif + +enum +/** +Base values of code ranges +@publishedAll +@deprecated +*/{ + EHttpRetCodeBase = -20000, + EHttpPanicCodeBase = EHttpRetCodeBase - 200 + }; + +typedef enum +/** +Return/leave codes for HTTPUTIL and HTTP plugins +@publishedAll +@deprecated +*/ + { + // Informational (+ve) status codes + EHttp_401_Unauthorized = KHttpPluginStatusBase + 401,// occurs when HTTP authentication is used, username/password dialogs raised as a response. Need to consider how UI deals with authentication failures here. + EHttpAuthenticationAborted = KHttpPluginStatusBase + 11,// The user cancelled the password box + EHttpAuthenticationFailed = KHttpPluginStatusBase + 10,// The user's password was rejected by the origin server + EHttpNoError = KErrNone, // No error + // Error (-ve) status codes + EHttpGeneralError = EHttpRetCodeBase, // Unspecified error condition + EHttpCannotFindServer = EHttpRetCodeBase - 1, // URL specified a non-existent or inaccessible domain + EHttpCannotFindPlugin = EHttpRetCodeBase - 2, // Plug-in server failed to create an HTTP plugin + EHttpUnsupportedMethod = EHttpRetCodeBase - 3, // An HTTP method was specified that is not supported + EHttpWapAPReadFailure = EHttpRetCodeBase - 4, // An error occurred when reading the WAP AP from CommsDB + EHttpNetDialSetupFailed = EHttpRetCodeBase - 5, // Failed to configure Net Dial + EHttpWtlsConfigFailed = EHttpRetCodeBase - 6, // Failed to configure the WTLS layer of the WAP Stack + EHttpWtlsBadServerCert = EHttpRetCodeBase - 7, // WTLS rejected the certificate obtained from the WAP GW + EHttpWtlsServerCertRejected = EHttpRetCodeBase - 8, // The user rejected the certificate from the WAP GW + EHttpWtlsCipherRejected = EHttpRetCodeBase - 9, // The user rejected the cipher strength negotiated in WTLS + EHttpGatewayCannotBeReached = EHttpRetCodeBase - 10,// A session could not be established with the WAP Gateway + EHttpGatewayTransactionAbort = EHttpRetCodeBase - 11,// A transaction was aborted by the gateway or the stack + EHttpGatewaySessionDisconnect = EHttpRetCodeBase - 12,// The session was disconnected by the WAP Gateway + EHttpCancellationAbort = EHttpRetCodeBase - 13,// Error code for leave when cancellation has occured during RunL() + EHttpReceivingErrorDeck = EHttpRetCodeBase - 14 // Could not find document, so receiving an error deck + } THttpReturnCode; + +// Note that HTTP Status codes series 40x and 50x are error conditions. They +// will be added to the EHttpRetCodeBase to send to the HTTP Data Provider +// observer. e.g. HTTP/404 will become EHttpRetCodeBase-404 = -20404. The +// exception to this rule is HTTP/401, which gets fully handled in HTTP and +// so is treated above as an informational status message. + +typedef enum +/** +Panic codes for HTTPUTIL and HTTP plugins +@publishedAll +@deprecated +*/ + { + EHttpGeneralPanic = EHttpPanicCodeBase, // Unspecified panic condition + EHttpDialInNotSupported = EHttpPanicCodeBase - 1, // The WAP Access Point specified a dial-in ISP! + EHttpWapAccessPointInfoChanged = EHttpPanicCodeBase - 2, // The WAP AP info changed between initial read and + // the subsequent NetDial override (debug only) + EHttpCommDBContainsBadData = EHttpPanicCodeBase - 3, // Comms DB contains garbled/inconsistent WAP AP data + EHttpConnectionLessNotSupported = EHttpPanicCodeBase - 4, // Comms DB specified a CL mode, which isn't available (yet) + EHttpNoHandlerAvailable = EHttpPanicCodeBase - 5, // Very bad situation for HTTP Methods + EHttpResourceFileLoadFailed = EHttpPanicCodeBase - 6, // Resource file missing or corrupt + EHttpReservedForFutureExpansion = EHttpPanicCodeBase - 7 // Feature not available - reserved for BC only + } THttpPanicCode; + + +#endif // __HTTPSTD_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/iclanimationdataprovider.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/iclanimationdataprovider.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,69 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __ICLANIMATIONDATAPROVIDER_H__ +#define __ICLANIMATIONDATAPROVIDER_H__ + +#include + +#include +#include +#include + +_LIT8(KBitmapAnimationDataType, "bitmap"); + +class CICLAnimationDataLoader; + +/** +Data provider for frame based animations. + +This data provider expects to be provided with a file which can be interpreted +as an animation using the Image Conversion Library (ICL). An example would be +an animated GIF. The default data type for this provider is "bitmap". + +@see CBitmapAnimator +@publishedAll +@released +*/ +class CICLAnimationDataProvider : public CAnimationDataProvider, public MICLAnimationDataLoaderObserver + { +public: + IMPORT_C CICLAnimationDataProvider(); + IMPORT_C ~CICLAnimationDataProvider(); + IMPORT_C void SetFileL(RFs & aFs, const TFileName& aFileName); + IMPORT_C TPtrC8 DataType(); + virtual void StartL(); +protected: + IMPORT_C virtual void CICLAnimationDataProvider_Reserved1(); + IMPORT_C virtual void CICLAnimationDataProvider_Reserved2(); + // From CAnimationDataProvider + IMPORT_C virtual void CAnimationDataProvider_Reserved1(); + IMPORT_C virtual void CAnimationDataProvider_Reserved2(); +private: + TInt iCICLAnimationDataProvider_Reserved; +private: + CAnimationFrame::THandles CurrentFrame() const; + void DecodeImageL(); + void DataDeliveryL(); + void Reset(); + // From MICLAnimationDataLoaderObserver + virtual void DataLoaderEventL(TDataLoaderEvent aEvent, TInt aError); +private: + CICLAnimationDataLoader* iDataLoader; + CAnimationFrame* iCurrentFrame; + TInt iFlags; + }; + +#endif //__ICLANIMATIONDATAPROVIDER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/ineturi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/ineturi.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Class for storing URI and its properties. +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __INETURI_H__ +#define __INETURI_H__ + + +class CInetUriImpl; +class CInetUriProperties; +class CUri8; + +using namespace InetUriList; + +/** +RInetUri represents a handle to the URI and its associated URI properties. A URI must always be associated with +a service type and a list type. Service type defines the purpose for which the URI is added (for example, +Browser, WAP Push, Push EMail, and so on), and the list type defines the permission associated with the URI +(for example, whitelist or blacklist). + +@publishedAll +@released +*/ +class RInetUri + { +public: + friend class CInetUriListImpl; + + IMPORT_C RInetUri (); + + IMPORT_C void CreateL ( const TDesC8& aUri, TServiceType aServiceType, TListType aListType ); + IMPORT_C void Close (); + + IMPORT_C TServiceType ServiceType () const; + IMPORT_C TPermission Permission () const; + IMPORT_C TListType ListType () const; + IMPORT_C const TDesC8& FavouriteName () const; + IMPORT_C const CUri8& Uri () const; + + IMPORT_C void SetListType ( TListType aListType ); + IMPORT_C void SetFavouriteNameL ( const TDesC8& aFavouriteName ); + +private: + // Used internally. Not intended for external use + CInetUriImpl& Impl () const; + void Attach ( CInetUriImpl& aInetUri ); +private: + CInetUriImpl* iInetUriImpl; // // The internal URI object that this handle is connected to + }; + +#endif //__INETURI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/ineturilist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/ineturilist.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,113 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Class for opening and manipulating the internet uri list. +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __INETURILIST_H__ +#define __INETURILIST_H__ + +#include +#include +#include +#include + +class CInetUriListImpl; + + + + +/** +This class defines the interface that can be implemented by an application to receive the +query results. + +@publishedAll +@released +*/ +class MQueryResultsCallback + { + public: + /** + The callback function that will be called when there is at least one query result. + + @param aUri The Inet URI object. Ownership will be passed. The application should close the + object handle. + @return ETrue - More query results, if any, should follow. + EFalse - No more query result is required and querying will be stopped. + */ + virtual TBool OnQueryResultsL ( RInetUri aUri ) =0; + }; + + +/** +This class defines the interface that can be implemented by an application that wishes to do +protocol and scheme-based normalisation of the URI before query operation. + +@publishedAll +@released +*/ +class MUriCustomiser + { + public: + /** + The callback function that will be called to perform scheme and protocol-based normalisation. + The URI will be syntax normalised before calling this function. + + @param aUri The syntax normalised URI. + @return Final normalised URI, which is syntax and protocol/scheme based. + */ + virtual CUri8* OnUriCustomisationL ( const TUriC8& aUri ) =0; + }; + + + +/** +RInetUriList represents a handle to the list as a whole. Opening the handle will initiate a connection the +URI List server. This class is responsible for adding, removing, updating, or retrieving the URI and +its associated properties. + +@publishedAll +@released +*/ +class RInetUriList + { +public: + IMPORT_C RInetUriList (); + + IMPORT_C void OpenL (); + IMPORT_C void Close (); + + IMPORT_C void AddL ( const RInetUri& aInetUri ); + IMPORT_C void RemoveL ( const RInetUri& aInetUri ); + IMPORT_C void UpdateL ( const RInetUri& aInetUri ); + + IMPORT_C RInetUri OpenInetUriL ( const TDesC8& aUri, InetUriList::TServiceType aServiceType ); + IMPORT_C TInt Count ( InetUriList::TServiceType aServiceType, InetUriList::TListType aListType ); + + IMPORT_C TInt GetListType ( const TDesC8& aUri, InetUriList::TServiceType aServiceType, InetUriList::TListType& aListType ); + + IMPORT_C void QueryUriL ( const TQueryArgs& aArgs, MQueryResultsCallback* aQueryCallback, MUriCustomiser* aUriOptimiser =NULL ); +private: + CInetUriListImpl* iInetUriListImpl; // // The internal list object that this handle is connected to + }; + +#endif //__INETURILIST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/ineturilistdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/ineturilistdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,333 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Place holder for common constants, type definitions and enums. +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __INETURILISTDEF_H__ +#define __INETURILISTDEF_H__ + +#include + +/** +@publishedAll +@released +*/ +namespace InetUriList + { + /** + Types of supported service type. + + @publishedAll + @released + */ + enum TServiceType + { + /** Browser */ + EBrowser =0x01, + /** WapPush */ + EWapPush =0x02, + /** PushEMail */ + EPushEMail =0x03, + /** DevProv */ + EDevProv =0x04, + /** VOIP */ + EVoip =0x05 + }; + + /** + Types of supported list type. + + @publishedAll + @released + */ + enum TListType + { + /** BlackList **/ + EBlackList =0x01, + /** WhiteList **/ + EWhiteList =0x02 + }; + + /** + Types of permission. + + @publishedAll + @released + */ + enum TPermission + { + /** ReadOnly **/ + EReadOnly =0x01, + /** ReadWrite **/ + EReadWrite =0x02 + }; + + /** + Types of matches. + + @publishedAll + @released + */ + enum TURIMatch + { + /** Exact match **/ + EExact =0x01, + /** Domain match **/ + EDomain =0x02, + /** Exact path match **/ + EExactPath =0x03, + /** partial prefix path match **/ + EPartialPrefixPath =0x04, + /** Partial suffix path match **/ + EPartialSuffixPath =0x05 + }; + + /** + Error codes error numbers -7650 to -7699 have been reserved for InetUriList. + */ + static const TInt KErrorBase = -7650; + /** + URI already exists in database. + */ + static const TInt KErrUriAlreadyExists = KErrorBase; + /** + URI not found in database. + */ + static const TInt KErrUriNotFound = KErrorBase - 1; + /** + Addition of URI failed. + */ + static const TInt KErrUriAddFailed = KErrorBase - 2; + /** + Removal of URI failed. + */ + static const TInt KErrUriRemoveFailed = KErrorBase - 3; + /** + Updation of URI properties failed. + */ + static const TInt KErrUriUpdateFailed = KErrorBase - 4; + /** + URI is read only. + */ + static const TInt KErrUriReadOnly = KErrorBase - 5; + /** + Service type of URI is missing. + */ + static const TInt KErrServiceTypeNotPresent = KErrorBase - 6; + /** + Handle is not open. + */ + static const TInt KErrNotOpen = KErrorBase - 7; + /** + Invalid stream handle + */ + static const TInt KErrInvalidStreamHandle = KErrorBase - 8; + + /** + Panic text if handle is not open. + */ + _LIT(KInetUriListErrHandleNotOpen, "Handle not open"); + + } + +/** +This class defines the argument parameters for the query operation. It is possible to +set the arguments in various combinations. The argument types can be ServiceType, +ListType, URI in TDesC8 form, and URIMatch. + +@publishedAll +@released +*/ +class TQueryArgs + { + public: + /** + The argument types. + + @internalComponent + */ + enum TArgType + { + EUri = 1, + EServiceType, + EListType, + EURIMatch + }; + /** + Bit width of the type. + + @internalComponent + */ + enum + { + KBitsPerType = 3 + }; + + /** + Default constructor + */ + inline TQueryArgs () + :iFlags ( 0 ) + {} + + + /** + A templated constructor that constructs the query argument. + It takes one argument. + */ + template < class T0 > + explicit inline TQueryArgs ( T0 a0 ) + { + Assign ( a0 ); + iFlags=(Type(a0)<<(( Type(a0))*KBitsPerType)); + } + + /** + A templated constructor that constructs the query argument. + It takes two arguments. + */ + template < class T0, class T1 > + inline TQueryArgs ( T0 a0, T1 a1 ) + { + Assign ( a0 ); + Assign ( a1 ); + iFlags=(Type(a0)<<(( Type(a0))*KBitsPerType)) | + (Type(a1)<<(( Type(a1))*KBitsPerType)); + } + + /** + A templated constructor that constructs the query argument. + It takes three arguments. + */ + template < class T0, class T1, class T2 > + inline TQueryArgs ( T0 a0, T1 a1, T2 a2 ) + { + Assign ( a0 ); + Assign ( a1 ); + Assign ( a2 ); + iFlags=(Type(a0)<<(Type(a0)*KBitsPerType)) | + (Type(a1)<<(Type(a1)*KBitsPerType)) | + (Type(a2)<<(Type(a2)*KBitsPerType)); + } + + /** + A templated constructor that constructs the query argument. + It takes four arguments. + */ + template < class T0, class T1, class T2, class T3 > + inline TQueryArgs ( T0 a0, T1 a1, T2 a2, T3 a3 ) + { + Assign ( a0 ); + Assign ( a1 ); + Assign ( a2 ); + Assign ( a3 ); + iFlags=(Type(a0)<<(Type(a0)*KBitsPerType)) | + (Type(a1)<<(Type(a1)*KBitsPerType)) | + (Type(a2)<<(Type(a2)*KBitsPerType)) | + (Type(a3)<<(Type(a3)*KBitsPerType)); + } + + + /** + Checks whether the flag is set for the given argument type. + + @internalComponent + */ + TBool IsSet ( TArgType aType ) const + { + TInt val = iFlags & ( aType << ( aType * KBitsPerType ) ); + return iFlags & ( aType << ( aType * KBitsPerType ) ); + } + + /** + Returns the argument if set, otherwise returns KErrNotFound. + + @internalComponent + */ + TInt Get ( TArgType aType ) const + { + if ( IsSet ( aType ) ) + return iArgs[aType - 1]; + return KErrNotFound; + } + + /** + Maximum number of arguments. Currently set as 4. + + @internalComponent + */ + enum + { + KMaxArguments = 4 + }; + + private: + + /** + @internalComponent + */ + TArgType Type ( const TDesC8* ) + { + return EUri; + } + + TArgType Type ( InetUriList::TServiceType ) + { + return EServiceType; + } + + TArgType Type ( InetUriList::TListType ) + { + return EListType; + } + + TArgType Type ( InetUriList::TURIMatch ) + { + return EURIMatch; + } + + void Assign ( const TDesC8* aValue ) + { + iArgs[Type(aValue)-1] = (TInt)aValue; + } + + void Assign ( InetUriList::TServiceType aValue ) + { + iArgs[Type(aValue)-1] = aValue; + } + + void Assign ( InetUriList::TListType aValue ) + { + iArgs[Type(aValue)-1] = aValue; + } + + void Assign ( InetUriList::TURIMatch aValue ) + { + iArgs[Type(aValue)-1] = aValue; + } + + private: + TInt iArgs [KMaxArguments]; + TInt iFlags; + }; + +#endif // __INETURILISTDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/ipaddr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/ipaddr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,63 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef CIPADDRESS___ +#define CIPADDRESS___ + +#include + +/** Size of CIpAddress buffer. */ +const TInt KIpAddressSize = 39; // large enough for full IPv6 address = 39 (8 * 4 + 7) + +class CIpAddress : public CBase +/** Utility class to hold an IP address as a string on the heap. + +This can be useful for parsers that have IP address fields. +@publishedAll +@released +*/ + { + public: + IMPORT_C static CIpAddress* NewL(const TDesC& aAddr); + IMPORT_C static CIpAddress* NewLC(const TDesC& aAddr); + inline static CIpAddress* NewL(); + inline static CIpAddress* NewLC(); + IMPORT_C ~CIpAddress(); + IMPORT_C void SetAddrL(const TDesC& aAddr); + IMPORT_C const TDesC& Addr() const; + private: + CIpAddress(); + private: + HBufC* iAddr; + }; + +inline CIpAddress* CIpAddress::NewL() +/** Allocates and constructs a new empty IP address object. + +@return New IP address object */ + { + return NewL(KNullDesC); + } + +inline CIpAddress* CIpAddress::NewLC() +/** Allocates and constructs a new empty IP address object, leaving the object +on the cleanup stack. + +@return New IP address object */ + { + return NewLC(KNullDesC); + } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/logdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/logdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,135 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Define Logging Service Constants, Macros and Definitions +// intended for inclusion into any source file +// which define classes wishing to use log server services. +// +// + +#if !defined(__LOGDEF_H__) +#define __LOGDEF_H__ + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__ANSICOMP_H__) +#include // Enforce ANSI compliance upon Microsoft Compilers +#endif + +// This define removed for sanity and performance sake. To enable logging in +// your component, redefine the __LOGGING macro in your own .cpp files, prior to +// the #include of this file. +// #define __LOGGING 1 + +/** +Define a constant to control the maximum length of a log message +@publishedAll +@deprecated +*/ +const TInt KMaxLogEntrySize = KMaxFileName; + +// Logging definitions +#if defined (__LOGGING) && defined (_DEBUG) + +// Logging activity is enabled +#if !defined(__CLOG_H__) +#include "clog.h" +#endif + + // Define an error message for failed open calls + _LIT(KLogOpenFailed,"No log available"); + + // Define a set of macros to control logging activity + // The log server client pointer + #define __DECLARE_LOG CLogClient* iLogPtr; + + // Open a connection to the log server for appended log messages + #define __OPEN_LOG(aLogName) {iLogPtr = NULL; TRAPD(logError,(iLogPtr = CLogClient::NewL(aLogName,EFalse))); if(logError !=KErrNone) __QINFO(KLogOpenFailed);} + // Open a connection to the log server for log messages to go to a clean log + #define __OPEN_CLEANLOG(aLogName) {iLogPtr = NULL; TRAPD(logError,(iLogPtr = CLogClient::NewL(aLogName,ETrue))); if(logError !=KErrNone) __QINFO(KLogOpenFailed);} + // Close the connection to the log server + #define __CLOSE_LOG {delete iLogPtr; iLogPtr = NULL;} + // Push and pop the log onto the cleanup stack + #define __PUSHLOGL {CleanupStack::PushL(iLogPtr);} + #define __POPLOG {CleanupStack::Pop();} + + // Log a simple message + #define __LOG(aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,CLogClient::ELogLight);} + // Log a message with single parameter formatting. + #define __LOG1(aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(CLogClient::ELogLight,aText,aV1);} + + #if defined (__PROFILING__) + // Define additional macros for logging profiling information + #define __PROFILELOG(aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,CLogClient::ELogProfile);} + #define __PROFILELOG1(aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(CLogClient::ELogProfile,aText,aV1);} + #else + // Empty macros for non-profiling builds + #define __PROFILELOG(aText); + #define __PROFILELOG1(aText,aV1); + #endif + + // A log method entry macro + #define __LOG_ENTER(aText) {if(iLogPtr != NULL) iLogPtr->LogEnter(aText,CLogClient::ELogProfile); } + // A log method exit macro + #define __LOG_RETURN {if(iLogPtr != NULL) iLogPtr->LogReturn(); } + // Log a simple message at a particular level of detail + #define __LOGX(aLevel,aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,aLevel);} + // Log a simple message at a particular level of detail with single parameter formatting. + #define __LOGX1(aLevel,aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(aLevel,aText,aV1);} + // Log a simple message at trace level of detail + #define __TRACELOG(aText) {if(iLogPtr != NULL) iLogPtr->Log(aText,CLogClient::ELogTrace); } + // Log a simple message at trace level of detail with single parameter formatting. + #define __TRACELOG1(aText,aV1) {if(iLogPtr != NULL) iLogPtr->Log(CLogClient::ELogTrace,aText,aV1);} + // Show a simple message within the info window. + #define __QINFO(aText) {User::InfoPrint(aText);} + // Configuration of logging server behaviour + // Turn on the RDebug::Print() when logging (Default setting) + #define __ENABLE_LOGRDEBUG() {if(iLogPtr != NULL) iLogPtr->RDebugConfig(ETrue);} + // Turn off the RDebug::Print() when logging + #define __DISABLE_LOGRDEBUG() {if(iLogPtr != NULL) iLogPtr->RDebugConfig(EFalse);} + +#else + #if !defined (_DEBUG) + // In Release builds we want no macro definition whatsoever + #define __DECLARE_LOG + + #else // In debug builds... + // Empty macros for non-logging builds, except for __DECLARE_LOG - we want to ensure the + // object sizes of classes are identical when headers are included in classes with a mixture + // of __LOGGING turned on and off, to avoid nasty run-time linking errors. + #define __DECLARE_LOG void* iLogPtrNotInUse; + #endif + #define __OPEN_LOG(aLogName) + #define __OPEN_CLEANLOG(aLogName) + #define __CLOSE_LOG + #define __PUSHLOGL + #define __POPLOG + #define __LOG_ENTER(aText) + #define __LOG_RETURN + #define __LOG(aText) + #define __LOG1(aText,aV1) + #define __LOGX(aLevel,aText) + #define __LOGX1(aLevel,aText,aV1) + #define __PROFILELOG(aText) + #define __PROFILELOG1(aText,aV1) + #define __TRACELOG(aText) + #define __TRACELOG1(aText,aV1) + #define __QINFO(aText) + #define __ENABLE_LOGRDEBUG() + #define __DISABLE_LOGRDEBUG() + +#endif // __LOGGING + +#endif // __LOGDEF_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mdataproviderobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mdataproviderobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,117 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Definition of the data provider observer abstract class +// It is anticipated that this class will be used as a mixin for +// those objects which wish to provide services for an MDataProvider +// plugin. +// +// + + +#ifndef __MDATAPROVIDEROBSERVER_H__ +#define __MDATAPROVIDEROBSERVER_H__ + +// System includes +// +#include + +//##ModelId=3B712B2B01C2 +class MDataProviderObserver +/** +MDataProviderObserver provides a virtual interface for any class to observe +any MDataProvider, and provide data receiving services. +@publishedAll +@deprecated +*/ + { +public: // Methods + +/** + Intended Usage : Called by the data provider to request processing of + the data within the buffer. + @since 6.0 + @param aBuffer A reference to the buffer with the data to process + */ + //##ModelId=3B712B2B0209 + virtual void ProcessDataL(HBufC8& aBuffer) = 0; + +/** + Intended Usage : Called by the data provider to report its status to + its observer. A status code which is either a standard error condition, + (i.e. < 0), a percentage complete value, ( 0 > aStatus < 100), OR a + TPluginStatus value. + @since 6.0 + @param aStatusCode The status of the data provider + */ + //##ModelId=3B712B2B0203 + virtual void SetStatus(TInt aStatusCode = KErrNone) = 0; + +/** + Intended Usage : The request to construct a CDataHandler to process data + of aDataType, where aDataType is a string to match against some plugins + declared data handling ability. + @since 6.0 + @param aDataType A reference to a descriptor with the data type + */ + //##ModelId=3B712B2B01FE + virtual void SetDocumentTypeL(const TDesC& aDataType) = 0; + +/** + Intended Usage : The request to construct a CDataHandler for aDataType with + non default document encoding where aDataType is a string to match against + some plugins declared data handling ability. + @since 6.0 + @param aDataType A reference to a descriptor with the data type + @param aContentType A reference to a descriptor with the content type + */ + //##ModelId=3B712B2B0200 + virtual void SetDocumentTypeL(const TDesC& aDataType, const TDesC& aContentType) = 0; + +/** + Intended Usage : The report of how many bytes of data is expected to be + passed to ProcessDataL, enabling %age reporting capabilities. + @since 6.0 + @param aAmountExpected An integer value of the expected amount + */ + //##ModelId=3B712B2B01EC + virtual void SetDataExpected(TInt aAmountExpected) = 0; + +/** + Intended Usage : Set the URI that the DataProvider considers the base + URI for the current data. + @since 6.0 + @param aBaseUri A const pointer to the uri + */ + //##ModelId=3B712B2B01EA + virtual void SetBaseUriL(const TDesC* aBaseUri) = 0; + +private: + +/** + Intended Usage : Reserved for future expansion. + @since 6.0 + */ + //##ModelId=3B712B2B01E1 + virtual void MDataProviderObserverReserved1() =0; + +/** + Intended Usage : Reserved for future expansion. + @since 6.0 + */ + //##ModelId=3B712B2B01E0 + virtual void MDataProviderObserverReserved2() =0; + + }; // MDataProviderObserver + +#endif // __MDATAPROVIDEROBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mdptx.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mdptx.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Data generator for data transmission, used by URL Handler when transmitting data +// +// + +#if !defined(__MDPTX_H__) +#define __MDPTX_H__ + +#include + +/** + @publishedAll + @released +*/ +class MDataProviderTransmissionData + { +public: + // This should return the data that the url handler should transmit. + // This call will be repeated until datasize amounts of data has been + // transmitted + virtual const TDesC8& DataL()=0; + + // Returns the size of the amount of data that needs to be transmitted. + virtual TInt DataSize()=0; + + // This returns the name of the data, this will depend on the type of + // data transmission, + virtual const TDesC& DataNameL()=0; + + // This should return the refering url or NULL; + virtual const TDesC& RefererUrlL()=0; + + // This returns the accepted charset. + virtual const TDesC& AcceptedCharsetL()=0; + + // This returns the accepted mimetype + virtual const TDesC& AcceptedMimetypes()=0; + +private: + // Reserved for future expansion + IMPORT_C virtual void MDataProviderTransmissionData_Reserved1()=0; + }; + +#endif // __MDPTX_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mframeworksp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mframeworksp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,94 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// MMFrameworkSP.h +// +// + +#ifndef __MFRAMEWORKSP_H__ +#define __MFRAMEWORKSP_H__ + +// System includes +// +#include + +// Forward class declarations +// +class MWAPEngineObserver; +class CXmlTaskCoordinator; +class CLocalContext; +class CWapGCtxClient; +class CAttributeLookupTable; +class MWtaiPublicObserver; + +//##ModelId=3B666FA40394 +class MFrameworkSP +/** +@publishedAll +@deprecated +*/ + { +public: + +/** + Intended Usage : Return a pointer to the engine observer (pointer + because it could be NULL). + @since 6.0 + @return A pointer to the MWAPEngineObsever object. + */ + //##ModelId=3B666FA403C7 + virtual MWAPEngineObserver* Observer() =0; + +/** + Intended Usage : Gets the Task Coordinator. + @since 6.0 + @return A reference to the Task Coordinater. + */ + //##ModelId=3B666FA403C6 + virtual CXmlTaskCoordinator& TaskCoordinator() =0; + +/** + Intended Usage : Gets WAP Local Context. + @since 6.0 + @return A reference to the WAP Local Context. + */ + //##ModelId=3B666FA403BE + virtual CLocalContext& LocalContext() =0; + +/** + Intended Usage : Gets WAP Global Context. + @since 6.0 + @return A reference to the WAP Global Context. + */ + //##ModelId=3B666FA403BD + virtual CWapGCtxClient& GlobalContext() =0; + +/** + Intended Usage : Gets the Attribute Look Up Table. + @since 6.0 + @return A reference to the Attribute Look Up Table. + */ + //##ModelId=3B666FA403BC + virtual CAttributeLookupTable& AttributeLookup() =0; + +/** + Intended Usage : + @since 6.0 + @return A reference to the WtaiPublic observer + */ + //##ModelId=3B666FA403B2 + virtual MWtaiPublicObserver& WtaiPublicObserver() =0; + + }; + +#endif // __MFRAMEWORKSP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mmsvattachmentmanager.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mmsvattachmentmanager.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,300 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MMSVATTACHMENTMANAGER_H__ +#define __MMSVATTACHMENTMANAGER_H__ + +#include +#include +#include + +class MMsvAttachmentManager +/** +Defines the attachment management interface. + +This class is a pure virtual interface class that defines the APIs to be used for +attachment management in the Messaging Framework. It is expected that the clients of +this interface will be MTMs implementations that require attachment management. + +The API allows is based around the use of the CMsvAttachment object that represents +any type of attachment that is supported by the Messaging Framework. The CMsvAttachment +object provides users with various attributes about the attachment without having to +actually load or retrieve the attachment. + +This attachment manager API supports the following different types of attachments: +1 - File attachments, file based attachments that are copied or created in the message + store. +2 - Linked file attachments, file based attachments that are not copied and are simply + linked to the file location on disk. +3 - Message entry attachments, existing message entries that can be registered as + attachments of another message entry. + +For file based attachments, this API also supports the retrieval of the files as +open read-only file handles. + +All functionality that requires the attachment manager to be in edit mode have been +defined as asynchronous. The attachment manager does not allow multiple asynchronous +requests to be made at the same time. + +@see CMsvAttachment +@publishedAll +@released +*/ + { +public: + /** + Adds an attachment to the message store by file path. + + The attachment file must be located in a public area. The file path must also be a + full path specification. The file is copied into the message store. + + @param aFilePath The absolute file path of the attachment file. + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @param aStatus The client's request status to complete when the operation has completed. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void AddAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; + + /** + Adds an attachment to the message store by file handle. + + This is used to add an attachment from an open file handle such as when adding a file + from the caller's private area. The file is copied into the message store. The message + server is responsible for closing the file handle once copied. + + @param aFileHandle An open file handle for the attachment file. Ownership is transferred. The caller must close the file handle. + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @param aStatus The client's request status to complete. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void AddAttachmentL(RFile& aFileHandle, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; + + /** + Adds an attachment as a linked file attachment. + + The attachment is added as a link by its file path. The attachment is not copied to the + message store. The attachment is linked and therefore must be in a public location. + + It is possible to change a linked attachment file after it has been attached to a message + entry. No integrity checking is carried out. This is left to individual MTMs or implementors + of this interface to decide if any checking is required such as checking if the size has changed. + + @param aFilePath The absolute file path of the linked attachment file. + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @param aStatus The client's request status to complete. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void AddLinkedAttachmentL(const TDesC& aFilePath, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; + + /** + Adds a message entry as an attachment. + + The message entry is registered as an attachment of the current message entry. The attachment + message entry is not copied. + + @param aEntryId The message Id of the entry to register as an attachment. + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @param aStatus The client's request status to complete. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void AddEntryAsAttachmentL(TMsvId aEntryId, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; + + /** + Creates a new empty attachment file. + + The caller is returned an open writable file handle to an empty attachment file in the message + store. The caller must pass in an uninitialised file handle. The file handle cannot be used + until the asynchronous request completes successfully. If the request is sucessful the file handle + is open and must close by the caller once the data has been written to it. + + @param aFileName The filename to assign to the newly create attachment file. + @param aAttachmentFile An uninitialised file handle. This is opened and can be written to if the + request is successful. Ownership is transferred . The caller must close the file handle. + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; + + + /** + Renames the physical filename of an attachment. + + @param aIndex The array index position of the attachment to be renamed. + @param aNewName The new name of the attachment. + @param aStatus The client's request status to complete. + @leave KErrAccessDenied If attachment manager is in read-only mode. + @leave KErrAlreadyExists If the supplied attachment filename already exists. + */ + virtual void RenameAttachmentL(TInt aIndex, const TDesC& aNewName, TRequestStatus& aStatus) = 0; + + + /** + Counts the number of attachments. + + Returns the number of attachments associated with the message entry. This includes all the + attachments that have not been commited yet. + @return The number of attachments. + */ + virtual TInt AttachmentCount() const = 0; + + /** + Returns an attachment info object. + + This object contains attributes and information about the attachment without having actually + retrieving the actual attachment. The caller assumes ownership of the returned object. + + @param aIndex The array index position of the attachment. + @return The attachment info for the attachment. Ownership is passed to caller, + */ + virtual CMsvAttachment* GetAttachmentInfoL(TInt aIndex) = 0; + + /** + Returns an attachment info object. + + This object contains attributes and information about the attachment without having actually + retrieving the actual attachment. The caller assumes ownership of the returned object. + + @param aId The attachment Id of the attachment. + @return The attachment info for the attachment. Ownership is passed to caller, + @leave KErrNotFound If an attachment with the specified attachment Id is not found. + */ + virtual CMsvAttachment* GetAttachmentInfoL(TMsvAttachmentId aId) = 0; + + /** + Modifies the attachment info for a particular attachment. + + This allows callers to modify an existing attachment info object for a particular attachment. + The attachment info object passed in replaces the existing attachment info object and takes + ownership for the object passed in. It is expected that callers will use GetAttachmentInfoL + to get the object, make some changes and pass it back into this method. + + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @param aStatus The client's request status to complete. + @leave KErrNotFound If the attachment that is trying to be modified cannot be found. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void ModifyAttachmentInfoL(CMsvAttachment* aAttachmentInfo, TRequestStatus& aStatus) = 0; + + /** + Returns an open file handle for the attachment file. + + Returns a read-only open file handle for the attachment file. This only applies to file based + attachments ie. file attachment and linked file attachments. The caller is responsible for + closing the returned file handle. + + @param aIndex The array index position of the attachment. + @return A read-only open file handle for the attachment file. Caller must close the handle. + @leave KErrNotSupported If the attachment is not a file attachment in the message store. + */ + virtual RFile GetAttachmentFileL(TInt aIndex) = 0; + + /** + Returns an open file handle for the attachment file. + + Returns a read-only open file handle for the attachment file. This only applies to file based + attachments ie. file attachment and linked file attachments. The caller is responsible for + closing the returned file handle. + + @param aIndex The array index position of the attachment. + @return A read-only open file handle for the attachment file. Caller must close the handle. + @leave KErrNotSupported If the attachment is not a file attachment in the message store. + @leave KErrNotFound If an attachment with the specified attachment Id is not found. + */ + virtual RFile GetAttachmentFileL(TMsvAttachmentId aId) = 0; + + /** + Returns an open writable file handle for the attachment file. + + Returns a writable open file handle for the attachment file. This only applies to file based + attachments ie. file attachment and linked file attachments. The caller is responsible for + closing the returned file handle. + + @param aIndex The array index position of the attachment. + @return A writable open file handle for the attachment file. Caller must close the handle. + @leave KErrNotSupported If the attachment is not a file attachment in the message store. + @leave KErrAccessDenied If attachment manager is in read-only mode. + @internalComponent + */ + virtual RFile GetAttachmentFileForWriteL(TInt aIndex) = 0; + + /** + Returns an open writable file handle for the attachment file. + + Returns a writable open file handle for the attachment file. This only applies to file based + attachments ie. file attachment and linked file attachments. The caller is responsible for + closing the returned file handle. + + @param aIndex The array index position of the attachment. + @return A writable open file handle for the attachment file. Caller must close the handle. + @leave KErrNotSupported If the attachment is not a file attachment in the message store. + @leave KErrNotFound If an attachment with the specified attachment Id is not found. + @leave KErrAccessDenied If attachment manager is in read-only mode. + @internalComponent + */ + virtual RFile GetAttachmentFileForWriteL(TMsvAttachmentId aId) = 0; + + /** + Removes the attachment from the message entry. + + This changes the array index values of all the attachments after the removed one. + Attachment files stored in the message store are deleted. Linked files and message entry + attachments are not deleted, this is left to the caller to do if required. + + @param aParam The array index position of the attachment to be removed. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void RemoveAttachmentL(TInt aIndex, TRequestStatus& aStatus) = 0; + + /** + Removes the attachment from the message entry. + + This changes the array index values of all the attachments after the removed one. + Attachment files stored in the message store are deleted. Linked files and message entry + attachments are not deleted, this is left to the caller to do if required. + + @param aParam The array index position of the attachment to be removed. + @leave KErrAccessDenied If attachment manager is in read-only mode. + @leave KErrNotFound If an attachment with the specified attachment Id is not found. + */ + virtual void RemoveAttachmentL(TMsvAttachmentId aId, TRequestStatus& aStatus) = 0; + + /** + Cancels the last asynchronous operation that was requested. + + Allows callers to cancel the last asynchronous operation. This will have no effect + if an asynchronous is not waiting to complete. + */ + virtual void CancelRequest() = 0; + }; + +#endif // __MMSVATTACHMENTMANAGER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mmsvattachmentmanagersync.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mmsvattachmentmanagersync.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,94 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MMSVATTACHMENTMANAGERSYNC_H__ +#define __MMSVATTACHMENTMANAGERSYNC_H__ + +#include +#include +#include + +class MMsvAttachmentManagerSync +/** +Defines the attachment management extensions interface. + +This class is a pure virtual interface class that defines the APIs to be used for +by MTMs and implementors of MMsvAttachmentManager. + +This API extends the MMsvAttachmentManager with synchronous calls for deleting +and creating attachments. + +@see CMsvAttachment +@publishedAll +@released +*/ + { +public: + /** + Creates a new empty attachment file. + + The caller is returned an open writable file handle to an empty attachment file in the message + store. The caller must pass in an uninitialised file handle. If the request is sucessful the file handle + is open and must close by the caller once the data has been written to it. + + @param aFileName The filename to assign to the newly create attachment file. + @param aAttachmentFile An uninitialised file handle. This is opened and can be written to if the + request is successful. The ownership is transferred . The caller must close the file handle. + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo) = 0; + + + + /** + Renames the physical filename of an attachment. + + @param aIndex The array index position of the attachment to be renamed. + @param aNewName The new name of the attachment. + @leave KErrAccessDenied If attachment manager is in read-only mode. + @leave KErrAlreadyExists If the supplied attachment filename already exists. + */ + virtual void RenameAttachmentL(TInt aIndex, const TDesC& aNewName) = 0; + + + /** + Removes the attachment from the message entry. + + This changes the array index values of all the attachments after the removed one. + Attachment files stored in the message store are deleted. Linked files and message entry + attachments are not deleted, this is left to the caller to do if required. + + @param aParam The array index position of the attachment to be removed. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void RemoveAttachmentL(TInt aIndex) = 0; + + /** + Modify existing attachment + @param aAttachmentInfo The attachment info associated with the file. + If the routine does not leave, then ownership will be transferred to the + attachment manager. If the routine does leave then ownership will not have + been transfered and the caller is responsible for cleanup. + @leave KErrAccessDenied If attachment manager is in read-only mode. + */ + virtual void ModifyAttachmentInfoL(CMsvAttachment* aAttachmentInfo) = 0; + + }; + +#endif // __MMSVATTACHMENTMANAGERSYNC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mobexnotify.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mobexnotify.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MOBEXNOTIFY_H__ +#define __MOBEXNOTIFY_H__ + +#include + +class CObexPacket; + +/** +@internalComponent + +Provides the call back interface for anything owned by CObex. +Note: This is an internal class which is not intended for use outside of +the Transport<->Obex interface. Even where access rules allow it, external +users should not call these functions as their implementation may change. +*/ +NONSHARABLE_CLASS(MObexNotify) + + { + public: + virtual void Process(CObexPacket &aPacket) =0; + virtual void Error(TInt aError) =0; + virtual void TransportUp() =0; // Call back to start the obex session + virtual void TransportDown(TBool aForceTransportDeletion) =0; + }; + +#endif // __MOBEXNOTIFY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvapi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvapi.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1002 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifdef _DEBUG +#undef _NO_SESSION_LOGGING_ +#endif + +#ifndef __MSVAPI_H__ +#define __MSVAPI_H__ + +#include +#include + +#ifdef _MSVAPI_DONT_INCLUDE_FLOGGER_ + #ifndef _NO_SESSION_LOGGING_ + #define _NO_SESSION_LOGGING_ + #endif +#else + #include +#endif + +#include +#include +#include +#include +#include + +// Forward declarations +class CMsvSession; +class CMsvEntry; +class CBaseMtm; +class CMsvClientEntry; +class CMsvEntryArray; +class CMsvServer; +class CMsvServerEntry; + +// Remove these to remove client logging +//#define _NO_SESSION_LOGGING_ +#define _NO_SESSION_LOGGING_SERIAL_ + +// Single export used to start the message server +IMPORT_C TInt StartMessageServer(TAny*); + +// Create Message Server and return a server entry owned by caller +// This is all that is required to test server Mtm's +IMPORT_C CServer2* CreateMessageServerL(CMsvServerEntry*& aServerEntry); + +//********************************** +// CMsvOperation +//********************************** +// +// Abstract base class for operations controlling asynchronous functions +// + +class CMsvOperation : public CActive +/** Defines an interface for use by objects which control asynchronous commands +in the messaging system. + +Such objects are returned by CMsvEntry and User Interface MTM functions that +complete asynchronously. The interface allows clients to: + +1. get progress information about the operation + +2. cancel the operation + +3. be signalled asynchronously when the operation completes; a client passes +in a TRequestStatus of a suitable active object for this purpose + +The client only needs to understand the CMsvOperation interface, not the concrete +implementation used. + +Writing derived classes: + +As the base class interface for User Interface MTMs, CBaseUiMtm, defines functions +that return CMsvOperation objects for control of asynchronous operations, +implementers of these MTM components are required to provide suitable derived +classes. For example, if CBaseUiMtm::EditL() is implemented to provide message +editing, a CMsvOperation -derived class would be provided that completes when +the editing operation is complete. + +Concrete derived classes must provide implementations of the pure virtual +DoCancel() and RunL() functions defined by CActive. DoCancel() should be provided +in the normal way to cancel the operation. RunL() should, in addition to any +other required functionality, always end by signalling the client that the +operation is complete with a suitable completion code. + +@publishedAll +@released +*/ + { +public: + IMPORT_C CMsvOperation(CMsvSession& aMsvSession, TInt aPriority, TRequestStatus& aObserverRequestStatus); + IMPORT_C ~CMsvOperation(); + /** Gets information on the progress of the operation. + + All operations on local entries share the same progress information format, + which defined by TMsvLocalOperationProgress. + + For MTM-specific operations, progress information can be extracted by calling + CBaseUiMtm::GetProgress() or displayed by CBaseUiMtm::DisplayProgressSummary() + on the appropriate User Interface MTM. + + Requirements: + + Derived classes should implement this function so that the client can check + on the progress of the operation. The function should share an understanding + of the format of the buffer with the implementations of CBaseUiMtm::GetProgress() + and CBaseUiMtm::DisplayProgressSummary() in the User Interface MTM. The arguments + of CBaseUiMtm::GetProgress() show some information that should be included + where appropriate. + + @leave KErrNotReady The operation has not yet been started: it has been queued + for execution in the Message Server + @return Descriptor holding progress information. The maximum buffer size should + be KMsvProgressBufferLength (defined in msvipc.h). */ + virtual const TDesC8& ProgressL()=0; + IMPORT_C virtual const TDesC8& FinalProgress(); + IMPORT_C TInt SystemProgress(TMsvSystemProgress& aOutSysProg); + IMPORT_C virtual TUid Mtm() const; + // + inline TMsvOp Id() const; + inline TMsvId Service() const; + // +protected: + IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1); + +protected: + /** The ID of the service that is associated with this operation. + + Usually, the derived class constructor will contain a suitable argument to + allow the caller to set this. + + @see Service() */ + TMsvId iService; + /** The UID of the MTM associated with the operation. + + The appropriate value should be set by the derived class constructor. + + @see Mtm() */ + TUid iMtm; + /** Request status of the operation observer. + + This is the aObserverRequestStatus passed in the constructor. */ + TRequestStatus& iObserverRequestStatus; + /** Message Server session used by object. This is set by the constructor. */ + CMsvSession& iMsvSession; + +private: + TMsvOp iId; + }; + + +//********************************** +// CMsvOperationWait +//********************************** +// +// Allows a synchronous wait on a operation +// + +class CMsvOperationWait: public CActive +/** Utility class used to wait until an asynchronous messaging operation +has completed. + +Note that CMsvOperationActiveSchedulerWait is simpler to use, and should be used in +preference to this class. + +To use the class: + +1. Create a new CMsvOperationWait object + +2. Call the messaging function that returns the asynchronous operation. +The operation observer parameter should be the iStatus word of the CMsvOperationWait +object. This means that the CMsvOperationWait object will be signalled when +the operation completes. + +3. Call the CMsvOperationWait object's Start() function. This sets the object +to be active. + +4. Call CActiveScheduler::Start(). This starts a nested active scheduler. The +program will then wait until this active scheduler is stopped. The CMsvOperationWait +object stops the scheduler when the operation completes, allowing the program to +continue. + +These steps cause the program to wait until the operation completes. + +@code + CMsvOperationWait* waiter=CMsvOperationWait::NewLC(); + CMsvOperation* op = function_returning_opLC(waiter->iStatus); + waiter->Start(); + CActiveScheduler::Start(); + CleanupStack::PopAndDestroy(2); // op, waiter +@endcode + +@see CActiveScheduler +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvOperationWait* NewLC(TInt aPriority=EPriorityStandard); + IMPORT_C ~CMsvOperationWait(); + IMPORT_C void Start(); +protected: + CMsvOperationWait(TInt aPriority); + void RunL(); + void DoCancel(); + }; + + +//********************************** +// CMsvOperationActiveSchedulerWait +//********************************** +// +// Allows a synchronous wait on a operation using CActiveSchedulerWait class +// This class should be used in preference to CMsvOperationWait +// DOES NOT require an explicit call to CActiveScheduler::Start()--CMsvOperationActiveSchedulerWait::Start() +// effectively encapsulates this functionality +// + +class CMsvOperationActiveSchedulerWait: public CActive +/** Utility class used to wait until an asynchronous messaging operation +has completed. + +To use the class: + +1. Create a new CMsvOperationActiveSchedulerWait object + +2. Call the messaging function that returns the asynchronous operation. +The operation observer parameter should be the iStatus word of the CMsvOperationActiveSchedulerWait +object. This means that the CMsvOperationActiveSchedulerWait object will be signalled when +the operation completes. + +3. Call the CMsvOperationActiveSchedulerWait object's Start() function. This sets the object +to be active. + +These steps cause the program to wait until the operation completes. + +@code + CMsvOperationActiveSchedulerWait* waiter=CMsvOperationActiveSchedulerWait::NewLC(); + CMsvOperation* op = function_returning_opLC(waiter->iStatus); + waiter->Start(); + + CleanupStack::PopAndDestroy(2); // op, waiter +@endcode + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvOperationActiveSchedulerWait* NewLC(TInt aPriority=EPriorityStandard); + IMPORT_C ~CMsvOperationActiveSchedulerWait(); + IMPORT_C void Start(); +private: + CMsvOperationActiveSchedulerWait(TInt aPriority); + void RunL(); + void DoCancel(); +private: + CActiveSchedulerWait iActiveSchedulerWait; + }; + +//********************************** +// CMsvCompletedOperation +//********************************** +// +// An operation which is already completed on construction +// + +class CMsvCompletedOperation : public CMsvOperation +/** Utility to create a messaging operation object for an operation that has already +completed. + +This utility is useful, for example, for writers of MTMs, where the API requires that an +asynchronous operation is returned, but where in reality, the operation has performed +synchronously. It allows the program to construct an operation object for which +the operation is already completed, with the progress information and error code set. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvCompletedOperation* NewL(CMsvSession& aMsvSession, TUid aMtm, const TDesC8& aProgress, TMsvId aService, TRequestStatus& aObserverRequestStatus, TInt aErr=KErrNone); + IMPORT_C ~CMsvCompletedOperation(); + // + const TDesC8& ProgressL(); + const TDesC8& FinalProgress(); +private: + CMsvCompletedOperation(CMsvSession& aSession, TRequestStatus& aObserverRequestStatus); + void ConstructL(TUid aMtm, TInt aError, const TDesC8& aProgress, TMsvId aService); + // from CActive + void DoCancel(); + void RunL(); + // +private: + HBufC8* iProgress; + }; + +//********************************** +// CMsvSendOperation +//********************************** +// +// A send operation which returns a standard progress (used by SendAs2) +// + +/** Utility to create an operation containing a sending operation which may be used +to retrieve a standard progress structure. + +This class is intended to be derived from. The derived class must define the TranslateProgress() +member function. This function is responsible for translating the native progress of the given +mtm into the standard progress structure, CMsvSendOperation::TSendOperationProgress. + +@publishedAll +@released +*/ +class CMsvSendOperation : public CMsvOperation + { +public: + /** Send progress state. + + @see TSendOperationProgress + */ + enum TSendOperationState + { + ESendStateInPreparation, + ESendStateWaitingToSend, + ESendStateConnecting, + ESendStateSending, + ESendStateDone, + ESendStateFailed + }; + /** Send progress. + + Structure holding send progress. For mtms unable to provide detailed progress + information, iProgressMax and iProgress must be zeroed. This will then allow + the client to check for this case and display a busy status dialog as opposed to + a progress dialog. If the mtm is capable of detailed progress, iProgressMax + should be set to the total number of units to be sent and iProgress the number + of units sent. + + @see TSendOperationState + */ + class TSendOperationProgress + { + public: + TSendOperationState iState; + TInt iError; + TInt iProgressMax; + TInt iProgress; + }; + +public: + IMPORT_C virtual ~CMsvSendOperation(); + // methods from CMsvOperation + IMPORT_C virtual const TDesC8& ProgressL(); + IMPORT_C virtual const TDesC8& FinalProgress(); + IMPORT_C void Start(CMsvOperation* aOperation); +protected: + IMPORT_C CMsvSendOperation(CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); +private: // methods from CActive + IMPORT_C virtual void DoCancel(); + IMPORT_C virtual void RunL(); +private: + /** Translates the progress from sending operation's progress into TSendOperationProgress. + + This member function must be defined by derived classes. Must not leave. + @see TSendOperationProgress + @return Descriptor holding progress information. + */ + virtual const TDesC8& TranslateProgress(const TDesC8& aProgress)=0; + void Complete(TInt anError); +protected: + /** The progress that is associated with this operation. + + The TranslateProgress defined by derived classes must populate and return + this progress structure. + @see TranslateProgress() + @see TSendOperationProgress */ + TPckgBuf iProgress; + /** The sending operation. + + Assigned when ConstructL is called + */ + CMsvOperation* iOperation; + }; + +/** Package buffer for a TSendOperationProgress +*/ +typedef TPckgBuf TMsvSendOperationProgress; + + +//********************************** +// MMsvSessionObserver +//********************************** +// +// +// + +class MMsvSessionObserver +/** Provides the interface for notification of events from a Message Server session. + + +The types of event are given in the enumeration TMsvSessionEvent. Clients +must provide an object that implements the interface, and set it to be notified +through CMsvSession::OpenSyncL() or CMsvSession::OpenASyncL(). Additional +observers can also be added and removed through CMsvSession. + +@see CMsvSession::AddObserverL() +@see CMsvSession::RemoveObserver() +@publishedAll +@released +*/ + { +public: + /** Session event type. + + @see EMsvMediaUnavailable + @see TDriveNumber + */ + enum TMsvSessionEvent + { + /** One or more entries have been created. + + aArg1 is a CMsvEntrySelection of the new entries. aArg2 is the TMsvId of the + parent entry. */ + EMsvEntriesCreated, + /** One or more index entries have been changed. + + aArg1 is a CMsvEntrySelection of the index entries. aArg2 is the TMsvId of + the parent entry. */ + EMsvEntriesChanged, + /** One or more entries have been deleted. + + aArg1 is a CMsvEntrySelection containing the IDs of the deleted entries. aArg2 + is the TMsvId of the parent entry. */ + EMsvEntriesDeleted, + /** One or more entries have been moved. + + aArg1 is a CMsvEntrySelection containing the IDs of the moved entries. aArg2 + is the TMsvId of the new parent. aArg3 is the TMsvId of the old parent entry. */ + EMsvEntriesMoved, + /** A new MTM has been installed. + + aArg2 points to a TUid for the new MTM. */ + EMsvMtmGroupInstalled, + /** A MTM has been uninstalled. + + aArg2 points to a TUid of the removed MTM. */ + EMsvMtmGroupDeInstalled, + /** Something has happening in the server, but this client was unable to retrieve + the information. + + aArg1 points to the error code. */ + EMsvGeneralError, + /** The client should immediately close the session with the Message Server. */ + EMsvCloseSession, + /** Received after a client has used CMsvSession::OpenAsyncL() to create a session. + + + The session can now be used. */ + EMsvServerReady, + /** Received after a client has used CMsvSession::OpenAsyncL() to create a session. + + + The server could not be started, and aArg1 points to the error code. */ + EMsvServerFailedToStart, + /** The Message Server index had been corrupted and had to be rebuilt. + + All local entries are recovered, but all remote entries have been lost. */ + EMsvCorruptedIndexRebuilt, + /** The Message Server has been terminated. + + All clients must close their sessions immediately. */ + EMsvServerTerminated, + /** The Message Server has automatically changed the index location to use the + internal disk. + + aArg1 is a TDriveNumber value that identifies the drive used by the Message + Server to hold the index prior to the change. + + aArg2 is also a TDriveNumber value; it identifies the new drive that the Message + Server is using. + + CMsvEntry contexts either refresh themselves or mark themselves invalid. + + @see EMsvMediaUnavailable + @see TDriveNumber */ + EMsvMediaChanged, // I assume the following four are in sequential order + /** The media (disk) containing the Message Server index has been removed. + + aArg1 is a TDriveNumber value that identifies the drive that is no longer + available. + + Future requests may fail with KMsvMediaUnavailable. A EMsvMediaChanged event + may be received in the future, as the Message Server switches back to the + internal drive. */ + EMsvMediaUnavailable, + /** The disk containing the Message Store is available again. + + aArg1 is a TDriveNumber value that identifies the drive that is being used. + + The Message Server can now operate as normal. No client action is necessary. */ + EMsvMediaAvailable, + /** An incorrect disk is inserted. + + aArg1 is a TDriveNumber value that identifies the drive in which the incorrect + disk has been inserted. + + Some requests may fail with KMsvMediaIncorrect. Clients may get an EMsvMediaChanged + event in the future telling them that the Message Server has switched back + to the internal drive. */ + EMsvMediaIncorrect, + /** The Message Server has started to rebuild its index after it has been corrupted. + + @see EMsvCorruptedIndexRebuilt */ + EMsvCorruptedIndexRebuilding + }; +public: + /** Indicates an event has occurred. + + The type of event is indicated by the value of aEvent. The interpretation + of the TAny arguments depends on this type. + + For most event types, the action that is taken, for example, updating the + display, is client-specific. All clients though should respond to EMsvCloseSession + and EMsvServerTerminated events. + + @param aEvent Indicates the event type. + @param aArg1 Event type-specific argument value + @param aArg2 Event type-specific argument value + @param aArg3 Event type-specific argument value */ + virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)=0; + }; + +//********************************** +// CMsvSession +//********************************** +// +// +// + +class TCapabilitySet; + +const TInt KMsvSessionObserverGranularity=4; //??? + +class CMsvSession: public CActive +/** Represents a channel of communication between a client thread (Client-side +MTM, User Interface MTM, or message client application) and the Message Server +thread. + +The class provides the means by which clients are notified when important +Message Server events occur. + +Note the following significant groups of functions: + +Creation functions: a message client application must use OpenSyncL() or OpenASyncL() +to create a session object, before it can instantiate any MTM or CMsvEntry +object. Only a single session should be created within a thread. As Client-side +MTM, User Interface MTM, and CMsvEntry objects are created in the client thread, +these use the client session, and do not create their own. Note that to close +a session, delete all objects relying on that session, and then the session +object itself. + +Cleanup functions: CMsvSession provides the ability to handle the cleanup +of entries in the event of a leave occurring, in a very similar manner to +the standard cleanup stack. The difference is that, on a leave, any entries +that are on the entry cleanup stack are removed from the Message Server. The +implementation uses the standard cleanup stack, so entry push and pop functions +should be used in the same order as all other types of push and pop. The functions +can be used both by MTM implementations and message client applications. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver); + IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver); + IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver); + + IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver, RFs& aFs); + IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver, RFs& aFs); + IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver, RFs& aFs); + + IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver, TInt aPriority); + IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver, TInt aPriority); + IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver, TInt aPriority); + + IMPORT_C static CMsvSession* OpenSyncL(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); + IMPORT_C static CMsvSession* OpenAsyncL(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); + IMPORT_C static CMsvSession* OpenAsObserverL(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); + + ~CMsvSession(); + // --- Observer functions --- + IMPORT_C void AddObserverL(MMsvSessionObserver& aObserver); + IMPORT_C void RemoveObserver(MMsvSessionObserver& aObserver); + IMPORT_C TInt SetReceiveEntryEvents(TBool aReceive); + // --- Utility functions --- + IMPORT_C CMsvEntry* GetEntryL(TMsvId aEntId); + IMPORT_C TInt GetEntry(TMsvId aId, TMsvId& aService, TMsvEntry& aEntry); + + IMPORT_C CMsvOperation* TransferCommandL(const CMsvEntrySelection& aSelection, TInt aCommandId, const TDesC8& aParameter, TRequestStatus& aStatus); + IMPORT_C void TransferCommandL(const CMsvEntrySelection& aSelection, TInt aCommandId, const TDesC8& aParameter, TDes8& aProgress); + IMPORT_C void IncPcSyncCountL(const CMsvEntrySelection& aSelection); + IMPORT_C void DecPcSyncCountL(const CMsvEntrySelection& aSelection); + IMPORT_C void GetChildIdsL(TMsvId aId, const CMsvEntryFilter& aFilter, CMsvEntrySelection& aSelection); + IMPORT_C void ChangeAttributesL(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes); + IMPORT_C CMsvOperation* ChangeDriveL(TInt aDrive, TRequestStatus& aStatus); + IMPORT_C TInt OutstandingOperationsL(); + IMPORT_C CMsvOperation* CopyStoreL(const TDriveUnit& aDrive, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* DeleteStoreL(const TDriveUnit& aDrive, TRequestStatus& aStatus); + // --- cleanup functions + IMPORT_C static void CleanupEntry(TAny* aPtr); + IMPORT_C void CleanupEntryPushL(TMsvId aId); + IMPORT_C void CleanupEntryPop(TInt aCount=1); + + IMPORT_C void RemoveEntry(TMsvId aId); + /// MTM functions + IMPORT_C TInt InstallMtmGroup(const TDesC& aFullName); + IMPORT_C TInt DeInstallMtmGroup(const TDesC& aFullName); + + IMPORT_C TInt StopService(TMsvId aServiceId); + IMPORT_C TBool ServiceActive(TMsvId aServiceId); + IMPORT_C TInt ServiceProgress(TMsvId aServiceId, TDes8& aProgress); + + IMPORT_C void CloseMessageServer(); + IMPORT_C RFs& FileSession(); + + IMPORT_C void GetMtmRequiredCapabilitiesL(TUid aMtmTypeUid, TCapabilitySet& aCapSet) const; + MMsvStoreManager& StoreManager(); + + IMPORT_C TBool GetAndClearIndexCorruptFlagL(); + IMPORT_C TDriveUnit CurrentDriveL(); + IMPORT_C TBool DriveContainsStoreL(TDriveUnit aDrive); + IMPORT_C TBool MessageStoreDrivePresentL(); + + IMPORT_C TInt ServiceAccessPointId(TMsvId aServiceId, TUint32& aAccessPointId); + +protected: + CMsvSession(MMsvSessionObserver& aObserver); + CMsvSession(MMsvSessionObserver& aObserver, RFs& aFs); + CMsvSession(MMsvSessionObserver& aObserver, TInt aPriority); + CMsvSession(MMsvSessionObserver& aObserver, RFs& aFs, TInt aPriority); + + void ConstructL(TBool aSyncOpening); + void ConstructAsObserverL(); + // + IMPORT_C TInt OperationId(); + IMPORT_C RMsvServerSession& Session(); + + void CheckDrive(); + // + // from CActive + void RunL(); + void DoCancel(); + TInt RunError(TInt aError); + // +private: + void NotifyAllObserversL(MMsvSessionObserver::TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + void CleanupEntryDelete(); + void DoRunL(TMsvNotifBuffer& aBuffer); + void HandleNotifyL(); + void DoHandleNotifyL(TMsvNotifBuffer& aBuffer); + void GetMessageFolderL(); + // +private: + TInt iOperationId; + RFs iFs; + RMsvServerSession iSession; + TMsvNotifBuffer iChange; + MMsvSessionObserver& iMainObserver; + CArrayPtrFlat* iObservers; + CMsvEntrySelection* iCleanupList; + TInt iSyncStart; + HBufC* iMessageFolder; + TDriveNumber iDrive; + CMsvEntrySelection* iNotifSelection; + TPckgBuf iSequenceBuf; + TUint32 iNotifySequence; + TBool iReceiveEntryEvents; + /** Specifies whether to use the shared file server session */ + TBool iUseSharedFs; + // +#ifndef _NO_SESSION_LOGGING_ + void CreateSessionLogL(); + void Log(TRefByValue aFmt, ...); + + // must be the last data member in the class to preserve BC. + mutable RFileLogger iLog; +#endif + // +friend class CSendAs; +friend class CMsvEntry; +friend class CMsvOperation; +friend class CMsvEntryOperation; +friend class CObserverRegistry; + // + }; + + + + +//********************************** +// MMsvEntryObserver +//********************************** +// +// +// + +class MMsvEntryObserver +/** Provides the interface for notification of events associated with an entry. + +The types of event are given in the enumeration TMsvEntryEvent. Clients can +provide an object that implements the interface, and set it to be notified +through CMsvEntry::AddObserverL(). +@publishedAll +@released +*/ + { +public: + /** Defines entry event types. +@publishedAll +@released +*/ + enum TMsvEntryEvent + { + /** The entry has been changed, either as a result of a CMsvEntry::ChangeL() or + by another client. */ + EMsvEntryChanged, + /** New children have been created. aArg1 points to a CMsvEntrySelection contain + the ID of the new children. */ + EMsvNewChildren, + /** Children have been deleted. aArg1 points to a CMsvEntrySelection contain the + ID of the deleted children. */ + EMsvDeletedChildren, + /** One or more of the children have been changed. aArg1 points to a CMsvEntrySelection + containing the IDs of the changed children. */ + EMsvChildrenChanged, + /** The entry has been deleted by another client. The context is now invalid. */ + EMsvEntryDeleted, + /** The context has become invalid. The entry has been changed, but the CMsvEntry + was unable to update the context. The context will only become valid by a + successful CMsvEntry::SetEntryL() call. aArg1 points to a TInt containing + the error code for the invalid context. */ + EMsvContextInvalid, + /** Some new children have been created, but CMsvEntry was unable to retrieve the + data from the Message Server. The children will be correct only after a successful + call to CMsvEntry::SetEntryL(). */ + EMsvChildrenMissing, + /** An error has occurred such that the status of the children is unknown and probably + invalid. aArg1 points to a TInt containing the error code for the invalid + context */ + EMsvChildrenInvalid, + /** The current entry has been moved by another client. The CMsvEntry has already + been updated to reflect the new parent. */ + EMsvEntryMoved}; +public: + /** Indicates when called by a CMsvEntry object that an event has occurred. + + The type of event is indicated by the value of aEvent. The interpretation of the aArg1-3 values depends on this type. + For most event types, the action that is taken, for example, updating the display, is client-specific. Most clients will + need to handle events that make the current context invalid: EMsvContextInvalid and EMsvEntryDeleted. + + An implementation can leave if an error occurs. The leave is not trapped by the framework, so + the error code may be displayed to the user. + + @param aEvent Indicates the event type. + @param aArg1 Event-specific argument value + @param aArg2 Event-specific argument value + @param aArg3 Event-specific argument value + */ + virtual void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3)=0; + }; + + + +//********************************** +// CMsvEntry +//********************************** +// +// +// + +class CMsvEntry: public CBase, public MMsvSessionObserver, public MMsvStoreObserver +/** Accesses and acts upon a particular Message Server entry. The current entry +that a CMsvEntry object relates is referred to as its context. + +It may be helpful to consider CMsvEntry functions in two broad groups. The +first provides means to access the various types of storage associated with +an entry. The second provides a means to discover and access other entries +that the entry owns (its children). + +Message client applications, Client-side MTMs, and User Interface MTMs all +commonly use CMsvEntry objects. CMsvEntry objects though represent a lower +level of access to an entry than that provided by a Client-side MTM or User +Interface MTM. In particular, any MTM-specific functionality, such as address +lists or subject fields, must be accessed by a message client application +through an MTM inteface. + +A CMsvEntry object is relatively expensive in RAM usage, as it caches its +children, updating them as necessary when notified of changes. They should +therefore be created sparingly. + +Note that Server-side MTMs do not use this class, but a similar one, CMsvServerEntry. + +@publishedAll +@released +*/ + { +public: // Public member functions + IMPORT_C static CMsvEntry* NewL(CMsvSession& aMsvSession, TMsvId aMsvId, const TMsvSelectionOrdering& aOrdering); + IMPORT_C ~CMsvEntry(); + // + // --- Observer functions --- + IMPORT_C void AddObserverL(MMsvEntryObserver& aObserver); + IMPORT_C void RemoveObserver(MMsvEntryObserver& aObserver); + // + // --- Accessor for associated session --- + inline CMsvSession& Session(); + // + // --- Accessors the associated message store --- + IMPORT_C CMsvStore* ReadStoreL(); + IMPORT_C CMsvStore* EditStoreL(); + // + // --- Synchronous Current Entry functions --- + inline TMsvId EntryId() const; + inline const TMsvEntry& Entry() const; + inline const TMsvSelectionOrdering& SortType() const; + inline TMsvId OwningService() const; + IMPORT_C void SetSortTypeL(const TMsvSelectionOrdering& aOrdering); + IMPORT_C void SetMtmListL(const CArrayFix& aMtmList); + IMPORT_C void SetEntryL(TMsvId aId); + IMPORT_C void ChangeL(const TMsvEntry& aEntry); + IMPORT_C void ChangeL(const TMsvEntry& aEntry, TSecureId aOwnerId); + + + // + // --- Asynchronous Current Entry functions --- + IMPORT_C CMsvOperation* ChangeL(const TMsvEntry& aEntry, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* ChangeL(const TMsvEntry& aEntry, TSecureId aOwnerId, TRequestStatus& aStatus); + // + // --- Asynchronous Child Entry functions --- + IMPORT_C CMsvOperation* CreateL(const TMsvEntry& aEntry, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* CreateL(const TMsvEntry& aEntry, TSecureId aOwnerId, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* DeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* DeleteL(TMsvId aMsvId, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* CopyL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* CopyL(TMsvId aMsvId, TMsvId aTargetId, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* MoveL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus); + IMPORT_C CMsvOperation* MoveL(TMsvId aMsvId, TMsvId aTargetId, TRequestStatus& aStatus); + // + // --- Synchronous Child Entry functions --- + IMPORT_C CMsvEntrySelection* ChildrenL() const; + IMPORT_C CMsvEntrySelection* ChildrenWithServiceL(TMsvId aServiceId) const; + IMPORT_C CMsvEntrySelection* ChildrenWithMtmL(TUid aMtm) const; + IMPORT_C CMsvEntrySelection* ChildrenWithTypeL(TUid aType) const; + inline TInt Count() const; + IMPORT_C const TMsvEntry& ChildDataL(TMsvId aId) const; + IMPORT_C const TMsvEntry& operator[](TInt aIndex) const; + IMPORT_C CMsvEntry* ChildEntryL(TMsvId aId) const; + IMPORT_C void MoveL(TMsvId aMsvId, TMsvId aTargetId); + IMPORT_C void MoveL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TMsvLocalOperationProgress& aProgress); + IMPORT_C void CopyL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TMsvLocalOperationProgress& aProgress); + IMPORT_C void CopyL(TMsvId aMsvId, TMsvId aTargetId); + + + IMPORT_C void CreateL(TMsvEntry& aEntry); + IMPORT_C void CreateL(TMsvEntry& aEntry, TSecureId aOwnerId); + IMPORT_C void DeleteL(TMsvId aId); + IMPORT_C void DeleteL(const CMsvEntrySelection& aSelection, TMsvLocalOperationProgress& aProgress); + IMPORT_C void ChangeAttributesL(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes); + // + // from MMsvSessionObserver + void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + // From MMsvStoreObserver + void HandleStoreEvent(TMsvStoreEvent aEvent, TMsvId aId); + + + IMPORT_C TBool HasStoreL() const; + // + /** @internalTechnology */ + IMPORT_C void SetEntryNoCheckL(TMsvId aId); + // +private: // Private members + CMsvEntry(CMsvSession& aMsvSession, const TMsvSelectionOrdering& aOrdering); + void ConstructL(TMsvId aMsvId); + // + void NotifyAllObserversL(MMsvEntryObserver::TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + void ContextChangedL(MMsvEntryObserver::TMsvEntryEvent aEvent); + void NewChildrenL(const CMsvEntrySelection& aSelection); + CMsvEntrySelection* DoGetNewChildrenL(const CMsvEntrySelection& aSelection); + void DeletedChildrenL(const CMsvEntrySelection& aSelection); + void ChildrenChangedL(const CMsvEntrySelection& aSelection); + void CheckNewGrandchildrenL(TMsvId aId); + void CheckDeletedGrandchildrenL(TMsvId aId); + void NotifyChildChangedL(TMsvId aId); + CMsvEntrySelection* DoMakeSelectionL(TMsvId aId); + void CheckIfContextMovedL(const CMsvEntrySelection& aSelection); + // + TBool IsAChild(TMsvId aId) const; + TBool AreChildren(const CMsvEntrySelection& aSelection) const; + // + CMsvOperation* DoDeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); + CMsvClientEntry* DoGetEntryLC(TMsvId aId, TMsvId& aOwningService); + void DoGetChildrenL(); + CMsvEntryArray* GetNewSortedListL(const TMsvSelectionOrdering& aOrdering, const CArrayFix& aMtmList); + void DoSortTypeL(CMsvClientEntry* aContext); + void ReplaceChildL(TInt pos, const TMsvEntry& aEntry); + void DeleteChild(TInt aPosition); + void HandleMediaChangeL(); + + TInt MoveOneL(TMsvId aMsvId, TMsvId aTargetId); + TInt CopyOneL(TMsvId aMsvId, TMsvId aTargetId); + TInt DeleteOneL(TMsvId aMsvId); + // +private: + enum TEntryState { EValid, + EInvalidChangingContext, + EInvalidDeletedContext, + EInvalidOldContext, + EInvalidMissingChildren}; + // +#ifndef _NO_SESSION_LOGGING_ + void Log(TRefByValue aFmt, ...); +#endif + // +private: + TBool iOberserverAdded; + TEntryState iState; + CMsvSession& iMsvSession; + TMsvSelectionOrdering iOrdering; + const TMsvEntry* iEntryPtr; + CArrayPtrFlat* iObservers; + CArrayPtrFlat* iEntries; + CMsvEntryArray* iSortedChildren; + CMsvStore* iStore; + CArrayFixFlat* iMtmList; + TMsvId iOwningService; + TUint32 iNotifySequence; + }; + +//********************************** +// MessageServer +//********************************** +// +// +// + +class MessageServer +/** Provides various static information functions relating to the Message Server. + +@see TDriveNumber +@publishedAll +@released +*/ + { +public: + IMPORT_C static TVersion Version(); + IMPORT_C static TMsvId NullUidValue(); + // + IMPORT_C static TBool DriveContainsStore(RFs& aFs, TInt aDrive); + IMPORT_C static TInt CurrentDriveL(RFs& aFs); + IMPORT_C static TBool IsMessageStoreDrivePresentL(RFs& aFs); + }; + +//********************************** +// MtmClientUtils +//********************************** +// +// +// + +class McliUtils +/** Utility class to simplify getting progress information from a messaging operation object. + +The functions get and unpack the progress information buffers from an operation object. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static TMsvLocalOperationProgress GetLocalProgressL(CMsvOperation& aOperation); + IMPORT_C static TMsvLocalOperationProgress GetFinalLocalProgress(CMsvOperation& aOperation); + IMPORT_C static TInt GetProgressErrorL(CMsvOperation& aOperation); + IMPORT_C static TMsvId GetProgressIdL(CMsvOperation& aOperation); + }; + +#include + +#endif // __MSVAPI_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msventry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msventry.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,182 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVENTRY_H__ +#define __MSVENTRY_H__ + + + +#if !defined(__E32BASE_H__) +#include +#endif + +#if !defined(__MSVSTORE_H__) +#include +#endif + +////////////////////////////////////// +// Forward declarations +class CMsvStore; +class CMsvCopyMoveEntriesBase; +class CMsvServer; + +//********************************** +// CMsvServerEntry +//********************************** +// +// +// + +class CMsvServerEntry : public CActive, public MMsvStoreObserver +/** Accesses and acts upon a particular Message Server entry. + +It provides similar +functionality to that which CMsvEntry gives to client-side programs. The current +entry that a CMsvServerEntry object relates is similarly referred to as its +context. + +A difference to note is that CMsvEntry functions, when used on a remote context, +can result in requests to Server-side MTMs to change data on a remote server, +as well as the local Message Server index. Naturally, as CMsvServerEntry is +designed to be used by Server-side MTMs themselves, its comparable functions +only alter the Message Server index. + +A CBaseServerMTM-derived object gets an initial CMsvServerEntry on construction. +It can get further CMsvServerEntry objects by calling NewEntryL(). The context +can be changed by SetEntry(). + +The context is locked, preventing it being accessed by other MTMs. The lock +is released when the object is deleted, or the context changes. + +As with CMsvEntry, CBaseServerMTM functions can be divided into two broad +groups. The first provides means to access the various types of storage associated +with an entry. The second provides a means to discover and access other entries +that the entry owns (its children). +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvServerEntry* NewL(CMsvServer& aServer, TMsvId aId); + ~CMsvServerEntry(); + // + // Set and get the current context + IMPORT_C TInt SetEntry(TMsvId aId); + inline const TMsvEntry& Entry() const; + IMPORT_C TMsvId OwningService() const; + // + // current entry only functions + IMPORT_C TInt ChangeEntry(const TMsvEntry& aEntry, TSecureId aOwnerId); + IMPORT_C TInt ChangeEntry(const TMsvEntry& aEntry); + + + // + // child entry only functions + IMPORT_C TInt CreateEntry(TMsvEntry& aEntry); + IMPORT_C TInt CreateEntry(TMsvEntry& aEntry, TSecureId aOwnerId); + IMPORT_C TInt CreateEntry(TMsvEntry& aEntry, TSecureId aOwnerId, TBool aBulk); + IMPORT_C TInt DeleteEntry(TMsvId aId); + IMPORT_C TInt DeleteEntries(CMsvEntrySelection& aSelection); + IMPORT_C TInt MoveEntryWithinService(TMsvId aId, TMsvId aDestination); + IMPORT_C TInt MoveEntriesWithinService(CMsvEntrySelection& aSelection, TMsvId aDestination); + IMPORT_C TInt ChangeAttributes(const CMsvEntrySelection& aSelection, TUint aSetAttributes, TUint aClearAttributes); + IMPORT_C void MoveEntryL(TMsvId aId, TMsvId aDestination, TRequestStatus& aObserverStatus); + IMPORT_C void MoveEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, TRequestStatus& aObserverStatus); + IMPORT_C void CopyEntryL(TMsvId aId, TMsvId aDestination, TRequestStatus& aObserverStatus); + IMPORT_C void CopyEntryL(TMsvId aId, TMsvId aDestination, TMsvId& aCompletedEntry, TRequestStatus& aObserverStatus); + IMPORT_C void CopyEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, TRequestStatus& aObserverStatus); + IMPORT_C void CopyEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, CMsvEntrySelection& aCompletedSelection, TRequestStatus& aObserverStatus); + IMPORT_C TInt GetEntryFromId(TMsvId aId,TMsvEntry*& aEntry); + // + // read and write the store associated with the context + IMPORT_C CMsvStore* ReadStoreL(); + IMPORT_C CMsvStore* EditStoreL(); + // + // List the children of the context + inline const TMsvSelectionOrdering& Sort(); + inline void SetSort(TMsvSelectionOrdering& aOrdering); + inline void SetMtm(TUid aMtm); + IMPORT_C TInt GetChildren(CMsvEntrySelection& aSelection); + // + IMPORT_C TInt GetChildrenWithService(TMsvId aServiceId, CMsvEntrySelection& aSelection); + IMPORT_C TInt GetChildrenWithMtm(TUid aMtm, CMsvEntrySelection& aSelection); + IMPORT_C TInt GetChildrenWithType(TUid aType, CMsvEntrySelection& aSelection); + // + // Spawns a new CMsvServerEntry object + IMPORT_C CMsvServerEntry* NewEntryL(TMsvId aId); + // + // from MMsvStoreObserver + void HandleStoreEvent(MMsvStoreObserver::TMsvStoreEvent aEvent, TMsvId aId); + // + // + + IMPORT_C TBool HasStoreL() const; + // + IMPORT_C RFs& FileSession(); + // + // Methods for creating and changing entries in bulk + // (e.g. during email header downloading) + IMPORT_C TInt CreateEntryBulk(TMsvEntry& aEntry, TSecureId aOwnerId); + + IMPORT_C TInt CreateEntryBulk(TMsvEntry& aEntry); + + IMPORT_C TInt ChangeEntryBulk(const TMsvEntry& aEntry, TSecureId aOwnerId); + IMPORT_C TInt ChangeEntryBulk(const TMsvEntry& aEntry); + + IMPORT_C void CompleteBulk(); + +protected: + CMsvServerEntry(CMsvServer& aIndex); + void ConstructL(TMsvId aId); + // + void RunL(); + void DoCancel(); + // +private: + TInt IncreaseBufferSizes(TInt aNewDescriptionSize, TInt aNewDetailsSize); + TBool AreChildren(const CMsvEntrySelection& aSelection) const; + TBool IsAChild(TMsvId aId) const; + void DoMoveEntryL(TMsvId aId, TMsvId aDestination); + void DoDeleteEntryL(TMsvId aId, CMsvEntrySelection*& aDeleted, CMsvEntrySelection*& aMoved); + void DoDeleteEntriesL(CMsvEntrySelection& aSelection, CMsvEntrySelection*& aDeleted, CMsvEntrySelection*& aMoved); + void DoMoveEntriesL(CMsvEntrySelection& aSelection, TMsvId aDestination, CMsvEntrySelection*& aMoved); + TInt DoGetChildren(TMsvId aServiceId, TUid aMtm, TUid aType, CMsvEntrySelection& aSelection); + void DoGetChildrenL(TMsvId aServiceId, TUid aMtm, TUid aType, CMsvEntrySelection& aSelection); + void DoCopyEntriesL(const CMsvEntrySelection& aSelection, TMsvId aDestination, TRequestStatus& aObserverStatus); + TInt DoChangeEntry(const TMsvEntry& aEntry, TSecureId aOwnerId, TBool aForcedUpdate, TBool aBulk); + + // +private: + TBool iLockedStore; + TMsvSelectionOrdering iOrdering; + TMsvEntry iEntry; + HBufC* iDescription; + HBufC* iDetails; + CMsvServer& iServer; + CMsvStore* iStore; + TUid iMtm; + CMsvCopyMoveEntriesBase* iCopyMove; + TMsvId iSource; + enum { EMsvIdle, EMsvMoving, EMsvCopying } iEntryState; + TRequestStatus* iObserverStatus; + CMsvEntrySelection* iCompletedSelection; + TMsvId* iCompletedEntryId; + TSecureId iContextOwnerId; + }; + + +#include + +#endif // __MSVENTRY_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msventryscheduledata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msventryscheduledata.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,101 @@ +/// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +/// All rights reserved. +/// This component and the accompanying materials are made available +/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +/// which accompanies this distribution, and is available +/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +/// +/// Initial Contributors: +/// Nokia Corporation - initial contribution. +/// +/// Contributors: +/// +/// Description: +/// All rights reserved. +/// This component and the accompanying materials are made available +/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +/// which accompanies this distribution, and is available +/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +/// Initial Contributors: +/// Nokia Corporation - initial contribution. +/// Contributors: +/// + +#ifndef MSV_ENTRY_SCHEDULE_DATA_H_ +#define MSV_ENTRY_SCHEDULE_DATA_H_ + +///////////////////////////////////////////////////////////////////////////// +// +// Includes +// +///////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// +// Constants +// +///////////////////////////////////////////////////////////////////////////// + +const TUid KUidMsvFileScheduleData = {0x100056A2}; //Used by TMsvEntryScheduleData +const TInt16 KMsvEntryScheduleDataVersion = 1; + +///////////////////////////////////////////////////////////////////////////// +// +// TMsvEntryScheduleData Declaration +// +///////////////////////////////////////////////////////////////////////////// + +/** +Stores message-specific data related to scheduling. + +The data is not required by the Client/UI side. This data is stored in a +stream associated with the TMsvEntry. + +@publishedAll +@released +*/ + +class TMsvEntryScheduleData + { +public: + IMPORT_C TMsvEntryScheduleData(); + + IMPORT_C void RestoreL(CMsvStore& aStore); + IMPORT_C void StoreL(CMsvStore& aStore) const; + IMPORT_C void RemoveL(CMsvStore& aStore) const; + + IMPORT_C void Reset(); + IMPORT_C TBool IsReset() const; + + IMPORT_C TInt Retries() const; + IMPORT_C void IncreaseRetries(); + IMPORT_C void ResetRetries(); + + /** + The Task ID returned by the Task Scheduler when the message is + scheduled. + */ + TInt iTaskId; + + /** + The TSchedulerItemRef returned by the Task Scheduler when the schedule + on which the message is scheduled is created. + */ + TSchedulerItemRef iRef; + +protected: + /** The number of retries that have been made to send this message. */ + TInt iRetryCount; + /** Structure version. */ + TInt16 iVersion; + + void ExternalizeL(RWriteStream& aWriteStream) const; + void InternalizeL(RReadStream& aReadStream); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvfind.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvfind.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,192 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__MSVFIND_H__) +#define __MSVFIND_H__ + +#if !defined(__MSVAPI_H__) +#include +#endif + +#if !defined __MTCLBASE_H__ +#include +#endif + +#if !defined(__MTMDEF_H__) +#include +#endif + +//********************************** +// TMsvFindResult +//********************************** +// +// Contains the result of a find operation for a particular entry +// + +class TMsvFindResult +/** A single result from a text search operation. The class encapsulates information +which: + +1. identifies the message in which the search text is found + +2. identifies the parts of the message that contain the search text. +@publishedAll +@released +*/ + { +public: + IMPORT_C TMsvFindResult(); + IMPORT_C TMsvFindResult(TMsvPartList aPartList, TMsvId aId); + // +public: + /** The parts of the message that contain the search text. */ + TMsvPartList iPartList; + /** The entry Id of the message that contains the search text. */ + TMsvId iId; + }; + +//********************************** +// CMsvFindResultSelection +//********************************** +// +// A list of find operation results with an accessor to find +// the position for a particular entry +// + +class CMsvFindResultSelection : public CArrayFixFlat +/** Collection of results from a text search operation. The collection is organized +as an array. +@publishedAll +@released +*/ + { +public: + IMPORT_C CMsvFindResultSelection(); + // +public: + IMPORT_C CMsvFindResultSelection* CopyL() const; + IMPORT_C CMsvFindResultSelection* CopyLC() const; + IMPORT_C TInt Find(TMsvId aId) const; + }; + +//********************************** +// TMsvFindOperationProgress +//********************************** +// +// Find operation progress +// + +class TMsvFindOperationProgress +/** Encapsulates progress information for a text search operation. The class has +public data members. +@publishedAll +@released +*/ + { +public: + IMPORT_C TMsvFindOperationProgress(); + // +public: + /** KErrNone if the search operation completed successfully otherwise one of the + system-wide error codes. + + This has no meaning while the search operation is in progress. */ + TInt iError; + /** The number of messages already searched. */ + TInt iCompleted; + /** The number of messages remaining to be searched. + + If the search operation is for text within a specified root, folder or service, + then this value is zero until the total number of messages has been determined. */ + TInt iRemaining; + /** The entry Id identifying the message currently being searched */ + TMsvId iCurrentId; + }; + +class CClientMtmRegistry; +class CMsvChildMessages; + +//********************************** +// CMsvFindOperation +//********************************** +// +// The find operation. Created by calling the relevant static function +// The results for all of these are added to the CMsvFindResultSelection which +// can be accessed via the accessor function GetFindResult +// + +class CMsvFindOperation : public CMsvOperation +/** Encapsulates a text search operation. + +The class offers an interface for locating messages which contain specified +text. Messages may contain data created for, or received from, any of the +transport protocols that are supported by the Messaging Architecture (e.g. +Email, FAX and SMS). + +Clients create a new instance for each search operation to be performed. They +are also responsible for destroying the instance once a search operation is +complete. + +Clients can derive from this class, typically to implement their own version +of the function IsValid(). +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvFindOperation* FindInChildrenL(CMsvSession& aSession, const TDesC& aTextToFind, TMsvId aParentId, TMsvPartList aPartList, TRequestStatus& aObserverRequestStatus); + IMPORT_C static CMsvFindOperation* FindInSelectionL(CMsvSession& aSession, const TDesC& aTextToFind, const CMsvEntrySelection& aSelection, TMsvPartList aPartList, TRequestStatus& aObserverRequestStatus); + IMPORT_C ~CMsvFindOperation(); + // + IMPORT_C const TDesC8& ProgressL(); + IMPORT_C const TDesC8& FinalProgress(); + // + inline const CMsvFindResultSelection& GetFindResult() const; + // +protected: + IMPORT_C CMsvFindOperation(CMsvSession& aSession, const TDesC& aTextToFind, TMsvPartList aPartList, TRequestStatus& aObserverRequestStatus); + IMPORT_C void ConstructFindInChildrenL(TMsvId aId); + IMPORT_C void ConstructFindInSelectionL(const CMsvEntrySelection& aSelection); + // +private: + void ConstructL(); + // + IMPORT_C void DoCancel(); + IMPORT_C void RunL(); + // + void DoRunL(); + void FindL(); + void Complete(TInt aStatus); + void StartL(); + // + virtual TBool IsValid(const TMsvEntry& aEntry) const; + // +private: + enum { EMsvFindingText, EMsvExpandingFolders } iState; + TBuf iTextToFind; + TMsvPartList iPartList; + CMsvFindResultSelection* iFindResultSel; + TPckgBuf iProgress; + CMsvEntrySelection* iSelection; + CClientMtmRegistry* iClientRegistry; + CArrayPtrFlat* iMtmArray; + CMsvChildMessages* iChildMessages; + TMsvId iCurrentId; + TMsvEntry iEntry; + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvftext.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvftext.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,79 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVFTEXT_H__ +#define __MSVFTEXT_H__ + +#include + +#include +#include +#include + +class CRichText; + +class CMsvFindText : public CMsgActive +/** A utility class which searches through given plain text or rich text for a +specified text string. + +The class is an active object and searching can be done synchronously or asynchronously. +An instance of this class can be re-used to perform multiple searches for +text. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMsvFindText* NewLC(TInt aPriority = EPriorityStandard); + IMPORT_C static CMsvFindText* NewL(TInt aPriority = EPriorityStandard); + IMPORT_C ~CMsvFindText(); + // + IMPORT_C void FindTextL(const TDesC& aFind, const TDesC& aSource, TMsvPartList aFlags, TRequestStatus& aStatus); + IMPORT_C void FindRichTextL(const TDesC& aFind, const CRichText& aSource, TMsvPartList aFlags, TRequestStatus& aStatus); + // + IMPORT_C TBool FindTextL(const TDesC& aFind, const TDesC& aSource, TMsvPartList aFlags); + IMPORT_C TBool FindRichTextL(const TDesC& aFind, const CRichText& aSource, TMsvPartList aFlags); + // + inline TBool FoundText() const; + // +private: + CMsvFindText(TInt aPriority); + // + void InitialiseL(const TDesC& aFind, const TDesC* aPlainSource, const CRichText* aRichSource, TMsvPartList aFlags); + void DoFindAsyncL(TRequestStatus& aStatus); + void DoComplete(TInt&); + TBool DoFindSyncL(); + TBool DoFindStepL(); + TBool DoFindTextL(); + void DoRunL(); + void Check(); + // +private: + HBufC* iBuf; + HBufC* iFind; + TInt iSourcePos; + TInt iMaxRead; + TInt iSourceLen; + const CRichText* iRichText; + const TDesC* iPlainText; + TMsvPartList iFlags; + TChar iPreChar; + TChar iPostChar; + TBool iFoundText; + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvids.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,170 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#if !defined(__MSVIDS_H__) +#define __MSVIDS_H__ +#if !defined(__MSVSTD_HRH__) +#include +#endif +#if !defined(__MSVSTD_H__) +#include +#endif + +// Predefined entry ids - values #defined in MSVSTD.HRH + +/** +A NULL ID. +This is typically used to indicate that the ID has not yet been set. It can +also be used to "park" a CMsvServerEntry so that it doesn't lock an index +entry. +@publishedAll +@released +@see TMsvId +@see KMsvNullIndexEntryIdValue +*/ +const TMsvId KMsvNullIndexEntryId=KMsvNullIndexEntryIdValue;//0 + +/** +Temporary ID used for testing purpose +@internalAll +@released +@see TMsvId +@see KMsvTempIndexEntryIdValue +*/ +const TMsvId KMsvTempIndexEntryId=KMsvTempIndexEntryIdValue;//1 + +/** +ID of root entry of entire index +@publishedAll +@released +@see TMsvId +@see KMsvRootIndexEntryIdValue +*/ +const TMsvId KMsvRootIndexEntryId=KMsvRootIndexEntryIdValue;//0x1000 + +/** +ID of local service (containing the standard folders) +@publishedAll +@released +@see TMsvId +@see KMsvLocalServiceIndexEntryIdValue +*/ +const TMsvId KMsvLocalServiceIndexEntryId=KMsvLocalServiceIndexEntryIdValue;//0x1001 + +/** +ID of Inbox folder +@publishedAll +@released +@see TMsvId +@see KMsvGlobalInBoxIndexEntryIdValue +*/ +const TMsvId KMsvGlobalInBoxIndexEntryId=KMsvGlobalInBoxIndexEntryIdValue;//0x1002 + +/** +ID of Outbox folder +@publishedAll +@released +@see TMsvId +@see KMsvGlobalOutBoxIndexEntryIdValue +*/ +const TMsvId KMsvGlobalOutBoxIndexEntryId=KMsvGlobalOutBoxIndexEntryIdValue;//0x1003 + +/** +ID of Draft folder +@publishedAll +@released +@see TMsvId +@see KMsvDraftEntryIdValue +*/ +const TMsvId KMsvDraftEntryId=KMsvDraftEntryIdValue; //0x1004 + +/** +ID of Sent folder +@publishedAll +@released +@see TMsvId +@see KMsvSentEntryIdValue +*/ +const TMsvId KMsvSentEntryId=KMsvSentEntryIdValue; //0x1005 + +/** +ID of Deleted folder - Invisible folder +@publishedAll +@released +@see TMsvId +@see KMsvDeletedEntryFolderEntryIdValue +*/ +const TMsvId KMsvDeletedEntryFolderEntryId=KMsvDeletedEntryFolderEntryIdValue;//0x1006 + +/** +ID used to indicate Unknown/Invalid Service entry folder +@publishedAll +@released +@see TMsvId +@see KMsvUnkownServiceIndexEntryIdValue +*/ +const TMsvId KMsvUnknownServiceIndexEntryId=KMsvUnkownServiceIndexEntryIdValue; //0x1007 + +/** +@internalAll +@released +@see TMsvId +*/ +const TMsvId KFirstFreeEntryId=0x100000; + +/** +Uid for POPService +@publishedAll +@released +*/ +const TUid KUidPOPService = {0x2000BB68}; + +/** +Uid for IMAPService +@publishedAll +@released +*/ +const TUid KUidIMAPService = {0x2000BB69}; + +/** +Uid for SMTPService +@publishedAll +@released +*/ +const TUid KUidSMTPService = {0x2000BB6A}; + +/** +Uid for SendAs2Service +@publishedAll +@released +*/ +const TUid KUidSendAs2Service = {0x2000BB6B}; + +/** +Uid for SMSService +@publishedAll +@released +*/ +const TUid KUidSMSService = {0x2000BB6C}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvoffpeaktime.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvoffpeaktime.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,103 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVOFFPEAKTIME_H__ +#define __MSVOFFPEAKTIME_H__ + + + + +///////////////////////////////////////////////////////////////////////////// +// +// Constants +// +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// +// TMsvOffPeakTime Declaration +// +///////////////////////////////////////////////////////////////////////////// + +/** +Defines an off-peak period for message sending. + +An off-peak period is specified as a start time and a duration. + +@publishedAll +@released +*/ + +class TMsvOffPeakTime + { +public: + IMPORT_C TMsvOffPeakTime(); + IMPORT_C TMsvOffPeakTime(const TDay aDay, const TInt aHour, const TInt aMinute, const TTimeIntervalMinutes aValidityPeriod); + + + IMPORT_C void Reset(); + + IMPORT_C TDay Day() const; + IMPORT_C void SetDay(const TDay aDay); + + IMPORT_C TInt Hour() const; + IMPORT_C void SetHour(const TInt aHour); + + IMPORT_C TInt Minute() const; + IMPORT_C void SetMinute(const TInt aMinute); + + IMPORT_C const TTimeIntervalMinutes ValidityPeriod() const; + IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes aValidityPeriod); + + IMPORT_C const TTime NextTimeInclusive(const TTime& aFromTime) const; + +private: + TDay iDay; + TInt8 iHour; //Start hour + TInt8 iMinute; //Start minute + TTimeIntervalMinutes iValidityPeriod; //Validity period. Must be less than 24 hours + }; + +///////////////////////////////////////////////////////////////////////////// +// +// CMsvOffPeakTimes Declaration +// +///////////////////////////////////////////////////////////////////////////// + +/** +Array of off-peak time data. + +This represents all the off-peak time periods in each week. + +@publishedAll +@released +*/ + +class CMsvOffPeakTimes : public CArrayFixFlat + { +public: + IMPORT_C CMsvOffPeakTimes(); + + + IMPORT_C TInt GetNextOffPeakTime(const TTime& aFromTime, TMsvOffPeakTime& aNext, TTime& aNextTime) const; + +protected: + + +private: + }; + +#endif // __MSVOFFPEAKTIME_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvrcpt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvrcpt.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,69 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__MSVRCPT_H__) +#define __MSVRCPT_H__ + +class RWriteStream; + +//********************************** +// CMsvRecipient +//********************************** +// +// Base class for multiple recipients +// + +class CMsvRecipient : public CBase +/** Base class for information relating to a message recipient. +@publishedAll +@released +*/ + { +public: + /** Message sending status for a recipient. +@publishedAll +@released +*/ + enum TRecipientStatus + { + /** Message is not sent. */ + ENotYetSent=0, + /** Message has been sent. */ + ESentSuccessfully=1, + /** Message sending failed. */ + EFailedToSend=2}; + IMPORT_C virtual void InternalizeL(RReadStream& aStream); + IMPORT_C virtual void ExternalizeL(RWriteStream& aStream) const; + inline TRecipientStatus Status() const; + inline void SetStatus(TRecipientStatus aStatus); + inline TInt Error() const; + inline void SetError(TInt aError); + inline const TTime& Time() const; + inline TTime& Time(); + inline TInt Retries() const; + inline void IncreaseRetries(); + inline void ResetRetries(); +protected: + IMPORT_C CMsvRecipient(); +private: + TRecipientStatus iStatus; + TInt iError; + TInt iRetries; + TTime iTime; + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvreg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvreg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,275 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__MSVREG_H__) +#define __MSVREG_H__ +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__F32FILE_H__) +#include +#endif + + + +/** +@internalComponent +@released +*/ +enum TMtsrDllIndex // Used in CMtmGroupData + { + EMtsrServerComponentIndex, + EMtsrClientComponentIndex, + EMtsrUiComponentIndex, + EMtsrUiDataComponentIndex + }; + +const TInt KHumanReadableNameLength=50; +typedef TBuf THumanReadableName; // could be used client side + +#define KMsvDefaultTimeoutMicroSeconds32 30000000 + +// forward declarations +class RWriteStream; +class RReadStream; +class RFs; + + +class CMtmDllInfo : public CBase +/** Encapsulates the registration data for a single concrete MTM component. + +It is used in the creation of registration data for an MTM group. Typically, +an application gathers a number of CMtmDllInfo objects into an CMtmDllInfoArray. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMtmDllInfo* NewL(const TDesC& aHumanReadableName,const TUidType& aUidType,const TDesC& aFilename,TInt aEntryPointOrdinalNumber,const TVersion aVersion); + IMPORT_C static CMtmDllInfo* NewL(const CMtmDllInfo& aMtmDllInfo); + IMPORT_C static CMtmDllInfo* NewL(RReadStream& aStream); + IMPORT_C ~CMtmDllInfo(); + IMPORT_C void SetHumanReadableNameL(const TDesC& aHumanReadableName); + inline TPtrC HumanReadableName() const; + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept + IMPORT_C TBool operator==(const CMtmDllInfo& aMtmDllInfo) const; + void SetMessagingCapability(TBool aCapability); + void SetSendBodyCapability(TBool aCapability); + void SetCapabilitiesAvailable(TBool aBool); + IMPORT_C TBool MessagingCapability() const; + IMPORT_C TBool SendBodyCapability() const; + IMPORT_C TBool CapabilitiesAvailable() const; + TPtrC FileName() const; +private: + CMtmDllInfo(); + CMtmDllInfo(const TUidType& aUidType,TInt aEntryPointOrdinalNumber,const TVersion aVersion); + CMtmDllInfo(const CMtmDllInfo& aMtmDllInfo); + void ConstructL(const TDesC& aHumanReadableName, const TDesC& aFilename); +private: + HBufC* iHumanReadableName; // Should be less than KHumanReadableNameLength +public: + /** Group of UIDs for the MTM. See NewL() for details. */ + TUidType iUidType; // Three uids + /** Ordinal of factory function for the MTM component */ + TInt iEntryPointOrdinalNumber; + /** Version information for the MTM component */ + TVersion iVersion; + + /** Flag that indicates if the MTM can send messages */ + TBool iMessagingCapability; + /** Flag that indicates if the MTM can handle body text */ + TBool iSendBodyCapability; + /** Flag that indicates if settings have been made for the + MessagingCapability() and SendBodyCapability() flags */ + TBool iCapabilitiesAvailable; +private: + HBufC* iFilename; + }; + + +class CMtmDllInfoArray : public CArrayPtrFlat +/** Collects the registration data for concrete MTM components, as encapsulated +in CMtmDllInfo objects, into an array. + +Basic array functionality is provided by the base class CArrayPtrFlat. + +It is used in the creation of registration data for an MTM group: see CMtmGroupData. + +@publishedAll +@released +*/ + { +public: + IMPORT_C CMtmDllInfoArray(); + IMPORT_C ~CMtmDllInfoArray(); + IMPORT_C void AddMtmDllInfoL(CMtmDllInfo* aMtmDllInfo); + }; + +class TCapabilitySet; + +class CMtmGroupData : public CBase +/** Encapsulates the registration data for an MTM group. + +It is used to access and write the registration data file for an MTM group. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMtmGroupData* NewL(TUid aMtmTypeUid, TUid aTechnologyTypeUid,CMtmDllInfoArray* aMtmDllInfoArray, const TCapabilitySet& aMtmRequiredCaps); + IMPORT_C static CMtmGroupData* NewL(const CMtmGroupData& aMtmGroupData); + IMPORT_C static CMtmGroupData* NewL(RReadStream& aStream); + IMPORT_C ~CMtmGroupData(); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; // not used but as it is exported it has been kept + inline TUid MtmTypeUid() const; + inline TUid TechnologyTypeUid() const; + IMPORT_C const CMtmDllInfoArray& MtmDllInfoArray() const; + IMPORT_C const TCapabilitySet& GetMtmRequiredCapabilities() const; + IMPORT_C TBool operator==(const CMtmGroupData& aMtmGroupData) const; +private: + CMtmGroupData(TUid aMtmTypeUid, TUid aTechnologyTypeUid, CMtmDllInfoArray* aMtmDllInfoArray, const TCapabilitySet& aMtmRequiredCaps); + void ConstructL(const CMtmGroupData& aMtmGroupData); + void ConstructL(); + void AppendMtmDllInfoArrayL(const CMtmDllInfoArray& aMtmDllInfoArray); + CMtmDllInfoArray& MtmDllInfoArrayPrivate(); + CMtmGroupData(TUid aMtmTypeUid=KNullUid,TUid aTechnologyTypeUid=KNullUid); + void AppendMtmDllInfoL(CMtmDllInfo* aMtmDllInfo); // Leaves if second uid wrong +private: + TUid iMtmTypeUid; + TUid iTechnologyTypeUid; + CMtmDllInfoArray* iMtmDllInfoArray; + TCapabilitySet iMtmRequiredCaps; + }; + + +class MRegisteredMtmDllObserver +/** +@internalComponent +@released +*/ + { +public: + virtual TInt UseMtmGroup(TUid aMtmTypeUid)=0; + virtual TInt ReleaseMtmGroup(TUid aMtmTypeUid)=0; + }; + + +// Real non-derivable class + +class CRegisteredMtmDll : public CTimer +/** Allows an MTM object to access registry information about itself. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CRegisteredMtmDll* NewL(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,const TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); + IMPORT_C ~CRegisteredMtmDll(); + + inline TUid MtmTypeUid() const; + inline TUid TechnologyTypeUid() const; + inline const CMtmDllInfo& MtmDllInfo() const; + + inline TInt MtmDllRefCount() const; + + IMPORT_C TInt GetLibrary(RFs& aFs,RLibrary& aMtmDllLibrary); // Increments reference count if successful or returns error + IMPORT_C void ReleaseLibrary(); // Decrements access count + // Should be called from destructor of any objects created from the library +private: + CRegisteredMtmDll(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); + void ConstructL(const CMtmDllInfo& aMtmDllInfo); + void LoadLibraryL(RFs& aFs); + + void RunL(); + +private: + TUid iMtmTypeUid; + TUid iTechnologyTypeUid; + CMtmDllInfo* iMtmDllInfo; + RLibrary iMtmDllLibrary; + TInt iMtmDllRefCount; + TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; + MRegisteredMtmDllObserver& iRegisteredMtmDllObserver; + }; + + + +class CRegisteredMtmDllArray : public CArrayPtrFlat +/** +@internalComponent +@released +*/ + { +public: + IMPORT_C CRegisteredMtmDllArray(); + IMPORT_C ~CRegisteredMtmDllArray(); + IMPORT_C void AddRegisteredMtmDllL(CRegisteredMtmDll* aRegisteredMtmDll); + }; + +// Base class + +class CMtmDllRegistry : public CBase +/** Accesses the various MTM component registries. + +The derived classes used by +clients are CClientMtmRegistry, CMtmUiDataRegistry, and CMtmUiRegistry. It +provides functions to discover the MTMs registered in such a registry. The +registered MTMs can be regarded as existing in a list: you can use NumRegisteredMtmDlls() +to get the number in the list, and MtmTypeUid() to index into it. + +@internalComponent +@released +*/ + { +public: + IMPORT_C ~CMtmDllRegistry(); + + inline TInt NumRegisteredMtmDlls() const; + IMPORT_C TUid MtmTypeUid(TInt anIndex) const; + + inline TBool IsPresent(TUid aMtmTypeUid) const; + IMPORT_C TUid TechnologyTypeUid(TUid aMtmTypeUid) const; + IMPORT_C const CMtmDllInfo& RegisteredMtmDllInfo(TUid aMtmTypeUid) const; + IMPORT_C TBool IsInUse(TUid aMtmTypeUid) const; // returns true if specified DLL in use + IMPORT_C TBool IsInUse() const; // returns true if any DLL in use + +protected: + IMPORT_C CMtmDllRegistry(RFs& aFs,TUid aMtmDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=KMsvDefaultTimeoutMicroSeconds32); + + IMPORT_C TInt MtmTypeUidToIndex(TUid anMtmTypeUid) const; + + IMPORT_C TInt AddRegisteredMtmDll(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); // returns error + IMPORT_C void RemoveRegisteredMtmDll(TUid aMtmTypeUid); + IMPORT_C void RemoveAllRegisteredMtmDlls(); + +private: + void DoAddRegisteredMtmDllL(TUid aMtmTypeUid,TUid aTechnologyTypeUid,const CMtmDllInfo& aMtmDllInfo,MRegisteredMtmDllObserver& aRegisteredMtmDllObserver); // returns error + +protected: + RFs& iFs; + TUid iMtmDllTypeUid; // Second Uid in all Dlls + CRegisteredMtmDllArray iRegisteredMtmDllArray; // Inline CArray, OK because no NewL(); + TTimeIntervalMicroSeconds32 iTimeoutMicroSeconds32; + }; + + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvruids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvruids.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,99 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ +#if !defined(__MSVREGUD_H__) +#define __MSVREGUD_H__ + +#include +#include + +/** +* @internalAll +* @released +*/ +const TInt KMsvNumMtmDllTypes=4; +/** +* @internalAll +* @released +*/ +const TUid KUidMsvDataComponent ={0x10003C69}; +// Server-side MTM +/** +* @publishedAll +* @released +*/ +const TUid KUidMtmServerComponent ={KUidMtmServerComponentVal}; +// Client-side MTM +/** +* @publishedAll +* @released +*/ +const TUid KUidMtmClientComponent ={KUidMtmClientComponentVal}; +// User Interface MTM +/** +* @internalAll +* @released +*/ +const TUid KUidMtmUiComponent ={KUidMtmUiComponentVal}; +// UI Data MTM +/** +* @internalAll +* @released +*/ +const TUid KUidMtmUiDataComponent ={KUidMtmUiDataComponentVal}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType1Uid={0x10003C62}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType2Uid={0x10003C63}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType3Uid={0x10003C64}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType4Uid={0x10003C65}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType5Uid={0x10003C66}; +/** +* @internalTechnology +* @released +*/ +const TUid KMsvDllType6Uid={0x10003C67}; +/** +* @internalComponent +* @released +*/ +const TUid KUidMtmMultipleComponent ={0x10004845}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvscheduledentry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvscheduledentry.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,158 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVSCHEDULEDENTRY_H__ +#define __MSVSCHEDULEDENTRY_H__ + +#include +#include + +/** +Abstract base class which stores the schedule data and recipients of a message. + +CMsvScheduledEntry does not force the Server MTM to store the message +recipients in a certain way. However, it is recommended that the Server MTM +derive its recipients class from CMsvRecipient, because the class already has +support for the number of retries to send a message to a recipient. + +CMsvScheduledEntry stores the TMsvEntry to which it relates to provide quick +access to the scheduling-related index data without needing calls to +CMsvServerEntry::SetEntry(). +However, CMsvScheduledEntry does not provide access to all the members of +the TMsvEntry. This is to stop the user of the CMsvScheduledEntry from +accessing the descriptor members of the TMsvEntry while the server entry is +not set to the TMsvEntry. + +@publishedAll +@released +*/ + +class CMsvScheduledEntry : public CBase + { +public: + /** + Tests if any of the recipients of this message can still be sent to. + + @param aErrorActions + Error-actions + + @param aAction + Default error-action + + @return True if at least one of the recipients has not been sent + the message. + */ + virtual TBool CanSendToAnyRecipients(const CMsvSendErrorActions& aErrorActions, TMsvSendErrorAction& aAction) = 0; + + /** + Tests if any of the recipients of this message can still be sent to. + + @param aAction + Default error-action + + @return True if at least one of the recipients has not been sent + the message. + */ + virtual TBool CanSendToAnyRecipients(const TMsvSendErrorAction& aAction) = 0; + + /** + Sets all the recipients' retries to zero. + */ + virtual void RecipientsResetRetries() = 0; + + /** + Increases all the recipients' retries by one. + */ + virtual void RecipientsIncreaseRetries() = 0; + + /** + Sets all the recipients' flags to sending failed. + */ + virtual void RecipientsSetFailed() = 0; + + /** + Tests if all recipients of the message have been sent successfully. + + @return True if all recipients have been sent successfully. + */ + virtual TBool RecipientsAllSent() const = 0; + + IMPORT_C virtual void StoreL(CMsvStore& aStore) const; + IMPORT_C virtual void RestoreL(CMsvStore& aStore); + + /** + Stores the recipients. + + @param aStore + Store to write to. + */ + virtual void RecipientsStoreL(CMsvStore& aStore) const = 0; + + /** + Restores the recipients. + + @param aStore + Store to read from. + */ + virtual void RecipientsRestoreL(CMsvStore& aStore) = 0; + + inline const TTime& ScheduleDate() const; + inline void SetScheduleDate(const TTime& aDate); + + inline const TBool Scheduled() const; + inline void SetScheduled(const TBool aScheduled); + + inline const TInt SendingState() const; + inline void SetSendingState(TInt aState); + + inline const TInt Error() const; + inline const TMsvId Id() const; + inline const TBool OffPeak() const; + + inline void SetFailed(const TBool aFail); + inline const TBool Failed() const; + + IMPORT_C TBool PendingConditions() const; + IMPORT_C void SetPendingConditions(TBool aPendingConditions); + + inline const TUid Mtm() const; + + IMPORT_C void Entry(TMsvEntry& aEntry) const; + +protected: + + IMPORT_C CMsvScheduledEntry(const TMsvEntry& aEntry); + +public: + + /** Message schedule data. */ + TMsvEntryScheduleData iData; + +private: + + TMsvEntry iEntry; + }; + +/** +Dynamic array of CMsvScheduledEntry objects. + +@publishedAll +@released +*/ +typedef CArrayPtrFlat CMsvScheduledEntries; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvschedulepackage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvschedulepackage.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,83 @@ +/// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +/// All rights reserved. +/// This component and the accompanying materials are made available +/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +/// which accompanies this distribution, and is available +/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +/// +/// Initial Contributors: +/// Nokia Corporation - initial contribution. +/// +/// Contributors: +/// +/// Description: +/// All rights reserved. +/// This component and the accompanying materials are made available +/// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +/// which accompanies this distribution, and is available +/// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +/// Initial Contributors: +/// Nokia Corporation - initial contribution. +/// Contributors: +/// + +#ifndef MSV_SCHEDULE_PACKAGE_H_ +#define MSV_SCHEDULE_PACKAGE_H_ + +///////////////////////////////////////////////////////////////////////////// +// +// TMsvSchedulePackage Declaration +// +///////////////////////////////////////////////////////////////////////////// + +const TInt KMaxParameterLength = 256; + +class TTaskInfo; + + +/** +Packaged message scheduling information. + +@publishedAll +@released +*/ + +class TMsvSchedulePackage + { +public: + IMPORT_C TMsvSchedulePackage(); + + IMPORT_C void PackLC(TTaskInfo& aTask, HBufC*& aDes) const; + IMPORT_C void UnpackL(const TTaskInfo& aTask, const TDesC& aDes); + +private: + + HBufC* PackLC() const; + void UnpackL(const TDesC& aDes); + + void ExternalizeL(RWriteStream&) const; + void InternalizeL(RReadStream&); + + TPtrC Convert(const TDesC8& aDes) const; + TPtrC8 Convert(const TDesC16& aDes) const; + +public: + + /** Message ID. */ + TMsvId iId; + + /** Command ID to be passed to CMsvSession::TransferCommandL() when it is + time to send the messages. */ + TInt iCommandId; + + /** Intervals at which the scheduler should check the sending operation's + progress. */ + TTimeIntervalMicroSeconds32 iPollProgress; + + /** Server MTM specific binary data to be passed to + CMsvSession::TransferCommandL() when it is time to send the messages. */ + TBuf8 iParameter; + + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvschedulesend.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvschedulesend.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,192 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVSCHEDULESEND_H__ +#define __MSVSCHEDULESEND_H__ + +#ifdef _DEBUG +#undef _MSG_NO_LOGGING +#endif + + + + +#include +#include +#include +#include +#include + +class CMsvEntrySelection; +class TMsvSchedulePackage; +class TMsvSendErrorAction; +class CMsvStore; +class TMsvEntry; +class CMsvOffPeakTimes; +class CMsvScheduleSettings; +class CMsvSendErrorActions; +class CMsvSysAgentActions; +class TMsvSchedulePackage; +class TMsvEntryScheduleData; +class CMsvServerEntry; +class CRepository; + +const TUid KUidMsvScheduledSendingDLL = {0x100056A0}; +const TInt KMsvSchsendArrayGrowth = 10; + +#ifdef _MSG_NO_LOGGING +#define SCHSENDLOG(a) +#else +_LIT(KSchSendLogDir, "schsend"); +_LIT(KSchSendLogFile,"SchSend.txt"); +#define SCHSENDLOG(a) a +#endif + +/** +Provides a Server MTM's interface to the Task Scheduler for messaging +scheduling. + +Server MTM's must provide a derived class that implements GetMessageL() to +provide a factory for MTM-specific scheduling CMsvScheduledEntry-based objects. + +@publishedAll +@released +*/ +class CMsvScheduleSend : public CBase + { +public: + IMPORT_C ~CMsvScheduleSend(); + + IMPORT_C void ScheduleL(const CMsvEntrySelection& aSelection, const TMsvSchedulePackage& aPackage); + + IMPORT_C void ReScheduleL(const CMsvEntrySelection& aSelection, const TMsvSchedulePackage& aPackage, const TMsvSendErrorAction* aErrorAction = NULL); + + IMPORT_C void CheckScheduleL(const CMsvEntrySelection& aSelection); + IMPORT_C void DeleteScheduleL(const CMsvEntrySelection& aSelection); + + IMPORT_C void SendingCompleteL(TMsvEntry& aEntry, const TBool aChangeEntry = EFalse); + IMPORT_C void SendingCompleteL(const CMsvEntrySelection& aSelection); + + + inline CMsvOffPeakTimes& OffPeakTimes() const; + inline CMsvScheduleSettings& ScheduleSettings() const; + inline CMsvSendErrorActions& SendErrorActions() const; + inline CMsvSysAgentActions& AgentActions() const; + + IMPORT_C static void CreateScheduleL(RScheduler& aScheduler, const CMsvScheduleSettings& aSettings, const TTime& aStartTime, const TTimeIntervalMinutes& aValidityPeriod, TSchedulerItemRef& aRef); + IMPORT_C static void CreateScheduleL(RScheduler& aScheduler, const CArrayFixFlat& aConditions, const TTime& aTimeout, TSchedulerItemRef& aRef); + IMPORT_C static void FindScheduleL(RScheduler& aScheduler, const TTime& aStartTime, TSchedulerItemRef& aRef); + IMPORT_C static void FindScheduleL(RScheduler& aScheduler, const CArrayFixFlat& aConditions, const TTime& aTimeout, TSchedulerItemRef& aRef); + IMPORT_C static void RoundUpToMinute(TTime& aTime); + IMPORT_C static void ScheduleEntryL(RScheduler& aScheduler, const TSchedulerItemRef& aRef, const TMsvSchedulePackage& aPackage, TTaskInfo& aInfo); + IMPORT_C static void UpdateEntryAfterSchedule(const TSchedulerItemRef& aRef, const TTaskInfo& aInfo, const TTime& aTime, TInt aFinalState, TMsvEntry& aEntry, TMsvEntryScheduleData& aData); + IMPORT_C static void ConnectAndRegisterL(RScheduler& aScheduler, const CMsvScheduleSettings& aSettings); + + IMPORT_C void LoadScheduleSettingsL(CRepository& aRepository); + +protected: + + IMPORT_C CMsvScheduleSend(CMsvServerEntry& aServerEntry); + IMPORT_C virtual void ConstructL(); + +/** +Gets the schedule data and recipients of a message. + +Recipient information is MTM-specific, so the server MTM must provide a +derived class that implements CMsvScheduledEntry, and return objects of +that type from this function. + +@param aId +The message ID. + +@return +The message's schedule data. +*/ + virtual CMsvScheduledEntry* GetMessageL(const TMsvId aId) const = 0; + +private: + + enum + { + EDefaultTaskPriority = 1, //used when scheduling a task in the task scheduler + EDefaultTaskRepeat = 0 //used when scheduling a task in the task scheduler + }; + + void SendingCompleteL(CMsvScheduledEntry& aScheduledEntry, const TBool aChangeEntry); + + TBool GetNextRetry(CMsvScheduledEntry& aMessage, const TMsvSendErrorAction& aErrorAction, TTimeIntervalSeconds& aInterval) const; + + void DoScheduleL(CMsvScheduledEntries& aSchEntries, const TInt aFinalState, const TTime& aTime, TBool aPendingConditions); + void DoReScheduleL(CMsvScheduledEntries& aSchEntries); + + void GetMessagesL(const CMsvEntrySelection& aSelection); + + void ConnectAndRegisterL(); + + void ScheduleEntryL(CMsvScheduledEntry& aMessage, const TInt aFinalState, const TTime& aStartTime, const TSchedulerItemRef& aRef, TBool aPendingConditions); + + void GetOffPeakL(TTime aFromTime, TTime& aStartTime, TTimeIntervalMinutes& aValidityPeriod) const; + + void DeleteScheduleForEntryL(CMsvScheduledEntry& aMessage); + void ResetScheduleInfoForEntryL(CMsvScheduledEntry& aMessage, const TBool aChangeEntry); + void SortByDateAndPendingConditionsL(CMsvScheduledEntries& aScheduledEntries); + void CreateScheduleL(const TTime& aStartTime, const TTimeIntervalMinutes& aValidityPeriod, const CArrayFixFlat& aSchConditions, TBool aPendingConditions, TSchedulerItemRef& aRef); + void FindScheduleL(const TTime& aTime, const CArrayFixFlat& aSchConditions, TBool aPendingConditions, TSchedulerItemRef& aRef); + + void PopulateScheduleConditionsL(CArrayFixFlat& aSchConditions); + TBool SetMessageStartTime(CMsvScheduledEntry& aMessage, const TTime& aFromTime, const TMsvSendErrorAction* aErrorAction = NULL); + + TBool TaskAndMessageMatchL(const CMsvScheduledEntry& aMessage); + TMsvId GetMessageIdForTaskL(TInt aTaskId); +#ifndef _MSG_NO_LOGGING + void FLog(TRefByValue aFormat, ...); + void FLog(TRefByValue aFormat, ...); +#endif + +protected: + + /** The Server MTM specific scheduled message sending settings. */ + CMsvScheduleSettings* iSettings; + /** The Server MTM specific off peak time periods. */ + CMsvOffPeakTimes* iOffPeakTimes; + /** The Server MTM specific actions to take when particular errors occur during + message sending. */ + CMsvSendErrorActions* iErrorActions; + /** The System Agent conditions that must be satisfied before a sending attempt. */ + CMsvSysAgentActions* iAgentActions; + + /** Indicates if this has been registered with the Task Scheduler. + + Initially set to EFalse. */ + TBool iRegistered; + /** Provides an interface to the Task Scheduler. */ + RScheduler iScheduler; + /** The CMsvServerEntry of the server MTM. */ + CMsvServerEntry& iServerEntry; + /** Scheduling options. */ + TMsvSchedulePackage iPackage; + + /** Array of message schedule data. */ + CMsvScheduledEntries* iSchEntries; + + /** Array of schedule entry data. */ + CArrayFixFlat* iSchEntryInfo; + /** Array of schedule task data. */ + CArrayFixFlat* iSchTaskInfo; + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvschedulesettings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvschedulesettings.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,118 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVSCHEDULESETTINGS_H__ +#define __MSVSCHEDULESETTINGS_H__ + + + + +#include +#include +#include + + + + + +/** +Stores the MTM-specific (general) settings for scheduling messages on the +Task Scheduler. + +These settings include the latency (minimum amount of time between now and when +the message is scheduled for), the intervals (short, long or variable) to wait +for before attempting to re-send the message and the timout value for messages +pending conditions to be met. + +The other MTM scheduling releated settings are stored in CMsvOffPeakTimes +and CMsvSendErrorActions. + +@publishedAll +@released +*/ + +class CMsvScheduleSettings : public CBase + { +public: + + IMPORT_C static CMsvScheduleSettings* NewL(); + IMPORT_C static CMsvScheduleSettings* NewLC(); + IMPORT_C ~CMsvScheduleSettings(); + + + IMPORT_C void Reset(); + + + IMPORT_C void SetPriority(const TInt aPriority); + IMPORT_C TInt Priority() const; + + IMPORT_C void SetValidityPeriod(const TTimeIntervalMinutes& aValidityPeriod); + IMPORT_C const TTimeIntervalMinutes& ValidityPeriod() const; + + IMPORT_C void SetIntervalType(const TIntervalType aIntervalType); + IMPORT_C TIntervalType IntervalType() const; + + IMPORT_C void SetLongInterval(const TTimeIntervalSeconds& aInterval); + IMPORT_C const TTimeIntervalSeconds& LongInterval() const; + + IMPORT_C void SetShortInterval(const TTimeIntervalSeconds& aInterval); + IMPORT_C const TTimeIntervalSeconds& ShortInterval() const; + + IMPORT_C const CArrayFixFlat& VariableIntervals() const; + IMPORT_C void SetVariableIntervalsL(const CArrayFixFlat& aIntervals); + + IMPORT_C const TTimeIntervalMicroSeconds32& Latency() const; + IMPORT_C void SetLatency(const TTimeIntervalMicroSeconds32& aLatency); + + IMPORT_C void SetPendingConditionsTimeout(const TTimeIntervalMinutes& aTimeout); + IMPORT_C const TTimeIntervalMinutes& PendingConditionsTimeout() const; + + /** Default scheduler settings values. */ + enum + { + /** Default priority. */ + EDefaultPriority = 27, + /** Default validity period: 10080 Minutes in 1 week. */ + EDefaultValidityPeriod = 10080, + /** Default interval type: EYearly */ + EDefaultIntervalType = 3, + /** Default short retry interval. */ + EDefaultShortInterval = 5, + /** Default long retry interval. */ + EDefaultLongInterval = 120, + /** Default latency. */ + EDefaultLatency = 1500000, + /** Default timeout. Zero minutes - no timeout. */ + EDefaultPendingConditionsTimeout = 0 + }; + +private: + CMsvScheduleSettings(); + + void ConstructL(); + + + TInt iPriority; //Priority of the schedules on the task scheduler + TTimeIntervalMinutes iValidityPeriod;//Validity period of message on the task scheduler + TIntervalType iIntervalType; //See TIntervalType declaration and Task Scheduler user documentation + TTimeIntervalMicroSeconds32 iLatency; //Minimum amount of time between now and when the message is scheduled for. Cannot be negative. + TTimeIntervalMinutes iPendingConditionsTimeout; + + TTimeIntervalSeconds iLongInterval; + TTimeIntervalSeconds iShortInterval; + CArrayFixFlat* iVariableIntervals; + }; + +#endif // __MSVSCHEDULESETTINGS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvsenderroraction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvsenderroraction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,146 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVSENDERRORACTION_H__ +#define __MSVSENDERRORACTION_H__ + + + + +///////////////////////////////////////////////////////////////////////////// +// +// Includes +// +///////////////////////////////////////////////////////////////////////////// + +#include +#include +#include + +///////////////////////////////////////////////////////////////////////////// +// +// Constants +// +///////////////////////////////////////////////////////////////////////////// + + +///////////////////////////////////////////////////////////////////////////// +// +// TMsvSendErrorAction Declaration +// +///////////////////////////////////////////////////////////////////////////// + +/** +Encapsulates the action to take for a particular error. + +An error may occur when the Server MTM is attempting to send a message or +messages. If the Server MTM supports scheduling, then, depending on the error +or conditions, the Server MTM may want to re-schedule the message on the Task +Scheduler to send at a later time. CMsvScheduleSend::ReScheduleL() +(in combination with CMsvSendErrorActions) uses the TMsvSendErrorAction +to determine whether to re-schedule the message. + +@publishedAll +@released +*/ + +class TMsvSendErrorAction + { +public: + IMPORT_C TMsvSendErrorAction(); + + IMPORT_C void Reset(); + + IMPORT_C void SetMaxRetries(const TInt16 aMaxRetries); + IMPORT_C TInt16 MaxRetries() const; + + /** The error. */ + TInt iError; + + /** The action to take if this error occurs. */ + TMsvSendAction iAction; + + /** The number of attempts to make at sending a message if this error occurs. + + If iRetries equals ESendRetriesInfinite, then sending will be attempted until + successful (or the user intervenes). This member is ignored if iAction equals + ESendActionFail. */ + TMsvSendRetries iRetries; + + /** Retry behaviour. + + This member is used by CMsvSendErrorActions to determine when to resend the + message. This member is ignored if iAction equals ESendActionFail. */ + TMsvSendRetrySpacing iRetrySpacing; + +private: + TInt16 iMaxRetries; + }; + + +///////////////////////////////////////////////////////////////////////////// +// +// CMsvSendErrorActions +// +///////////////////////////////////////////////////////////////////////////// + +/** +This class determines what action to take if an error occurs while the Server +MTM is sending a message (or messages). + +It encapsulates an array of TMsvSendErrorAction objects, which it uses to +determine the action to take for a particular error. If the error is not +found in the array, then CMsvSendErrorActions uses its default +TMsvSendErrorAction object. + +@publishedAll +@released +*/ + +class CMsvSendErrorActions : public CBase + { +public: + IMPORT_C static CMsvSendErrorActions* NewL(); + IMPORT_C static CMsvSendErrorActions* NewLC(); + IMPORT_C ~CMsvSendErrorActions(); + + IMPORT_C void AddSendErrorActionL(const TMsvSendErrorAction& aErrorAction); + IMPORT_C TInt RemoveSendErrorAction(const TInt aError); + IMPORT_C TInt GetSendErrorAction(const TInt aError, TMsvSendErrorAction& aErrorAction) const; + + IMPORT_C void Reset(); + + IMPORT_C void RestoreFromResourceL(TResourceReader& aReader); + + IMPORT_C void SetErrorsL(const CArrayFixFlat& aErrors); + IMPORT_C const CArrayFixFlat& Errors() const; + + IMPORT_C const TMsvSendErrorAction& Default() const; + IMPORT_C void SetDefault(const TMsvSendErrorAction& aAction); + +private: + CMsvSendErrorActions(); + void ConstructL(); + void RestoreErrorActionL(TResourceReader& aReader, TInt aActionCount, const TBool aDefault); + + + TInt Find(const TInt aError, TInt& aIndex) const; + + + CArrayFixFlat* iErrors; + TMsvSendErrorAction iDefault; + }; + +#endif // __MSVSENDERRORACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvstd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvstd.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,616 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MSVSTD_H__ +#define __MSVSTD_H__ + + + + +#include +#include + +/** +Specifies an entry in the Message Server index. +@publishedAll +@released +@see #KMsvNullIndexEntryId +@see #KMsvTempIndexEntryId +@see #KMsvRootIndexEntryId +@see #KMsvLocalServiceIndexEntryId +@see #KMsvGlobalInBoxIndexEntryId +@see #KMsvGlobalOutBoxIndexEntryId +@see #KMsvDraftEntryId +@see #KMsvSentEntryId +@see #KMsvDeletedEntryFolderEntryId +@see #KMsvUnknownServiceIndexEntryId +*/ +typedef TInt32 TMsvId; + +/** Identifies an asynchronous messaging operation. + +This ID is unique within a +Message Server session. The ID of an operation can be obtained from CMsvOperation::Id(). */ +typedef TInt32 TMsvOp; + +/** Supplies the standard values for the message priority index entry field. +@publishedAll +@released +*/ +enum TMsvPriority { + /** High message priority */ + EMsvHighPriority, + /** Medium message priority */ + EMsvMediumPriority, + /** Low message priority */ + EMsvLowPriority}; + +class CRichText; +class CMsvStore; +class CMsvEntry; +class CMsvMove; +class CMsvServer; +class CMsvServerEntry; + +_LIT(KMsvDefaultFolder, "\\Private\\1000484b\\Mail\\"); +_LIT(KMsvDefaultIndexFile, "\\Private\\1000484b\\Mail\\Index"); +_LIT(KMsvDefaultFolder2, "\\Private\\1000484b\\Mail2\\"); +_LIT(KMsvDefaultIndexFile2, "\\Private\\1000484b\\Mail2\\Index"); +_LIT(KMsvDirectoryExt, "_S\\"); +_LIT(KMsvBinaryFolderExt, "_F\\"); + +const TInt KFileNameFixedWidth=8; +const TInt KMaxSubjectSkipStringLength=8; // For subject based email thread sorting +_LIT(KSendAsRenderedImage, "Image"); + +// Server name and moving semaphore +_LIT(KMsvServerName, "!MsvServer"); +_LIT(KMsvMovingSemaphore, "MsvMovingSemaphore"); + +_LIT_SECURE_ID(KMsvServerId, 0x1000484B); + + +/** Represents an entry in the Message Server index. + +MTM implementations and message client applications use it to access and manipulate +index entry values. Note that a TMsvEntry is effectively a local cache of +the index entry, and changes to it are not automatically written into the +index. To commit changes to the Message Server, you need to call CMsvEntry::ChangeL() +(or CMsvServerEntry::ChangeEntry()). + +To avoid repetition, the functions and data members are simply listed here, +without detailed explanation of the fields. The public data members can be +used to get and set the values of some index entry fields. +@publishedAll +@released +*/ +class TMsvEntry + { +public: + IMPORT_C TMsvEntry(); + IMPORT_C TMsvEntry(const TMsvEntry& aEntry); + IMPORT_C TMsvEntry& operator=(const TMsvEntry& aEntry); + IMPORT_C TBool operator==(const TMsvEntry& aEntry) const; + IMPORT_C TBool PermanentDataUnchanged(const TMsvEntry& aEntry) const; + // + IMPORT_C TMsvPriority Priority() const; + IMPORT_C void SetPriority(TMsvPriority aPriority); + // + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + // Read only for clients + inline TMsvId Id() const; + inline TMsvId Parent() const; + inline TBool Owner() const; + inline TBool Deleted() const; + // Read & write for clients + inline TBool Complete() const; + inline void SetComplete(TBool aComplete); + inline TBool New() const; + inline void SetNew(TBool aNew); + inline TBool Unread() const; + inline void SetUnread(TBool aUnread); + inline TBool Failed() const; + inline void SetFailed(TBool aFailed); + inline TBool Operation() const; + inline void SetOperation(TBool aOperation); + inline TBool Visible() const; + inline void SetVisible(TBool aVisble); + inline TBool MultipleRecipients() const; + inline void SetMultipleRecipients(TBool aMultipleRecipient); + inline TBool ReadOnly() const; + inline void SetReadOnly(TBool aReadOnly); + inline TBool StandardFolder() const; + inline void SetStandardFolder(TBool aStanardFolder); + inline TBool Attachment() const; + inline void SetAttachment(TBool aAttachmentFlag); + inline TBool Connected() const; + inline void SetConnected(TBool aConnected); + inline TBool InPreparation() const; + inline void SetInPreparation(TBool aInPreparation); + // + inline TInt PcSyncCount() const; + inline void DecPcSyncCount(); + inline void IncPcSyncCount(); + // + inline TBool OffPeak() const; + inline void SetOffPeak(TBool aOffPeak); + inline TBool Scheduled() const; + inline void SetScheduled(TBool aScheduled); + inline TUint SendingState() const; + inline void SetSendingState(TUint aSendingState); + inline TBool PendingDelete() const; + inline void SetPendingDelete(TBool aPendingDelete); + + /** This method sets bit 24 of iMtmData1, if you are using this bit elsewhere don't call this method.*/ + inline void SetDeleteProtected(TBool aDeleteProtected); + inline TBool DeleteProtected() const; + /** This method sets bit 31 of iMtmData1, if you are using this bit elsewhere don't call this method.*/ + inline void SetForwarded(TBool aForwarded); + inline TBool Forwarded() const; + /** This method sets bit 32 of iMtmData1, if you are using this bit elsewhere don't call this method.*/ + inline void SetLocallyDeleted(TBool aLocallyDeleted); + inline TBool LocallyDeleted() const; + + IMPORT_C TBool PendingConditions() const; + IMPORT_C void SetPendingConditions(TBool aPendingConditions); + // + IMPORT_C TInt32 MtmData1() const; + IMPORT_C TInt32 MtmData2() const; + IMPORT_C TInt32 MtmData3() const; + + /** + @internalTechnology + */ + IMPORT_C void SetMtmData1(TInt32 aMtmData); + /** + @internalTechnology + */ + IMPORT_C void SetMtmData2(TInt32 aMtmData); + /** + @internalTechnology + */ + IMPORT_C void SetMtmData3(TInt32 aMtmData); + // +protected: + // only the server will be able to set the following + inline void SetId(TMsvId aId); + inline void SetParent(TMsvId aId); + inline void SetOwner(TBool aAttachment); + inline void SetDeleted(TBool aDeletedFlag); + // + inline TUint PersistedFlags() const; + inline TUint TemporaryFlags() const; + // +private: + void Copy(const TMsvEntry& aEntry); + // +private: + TMsvId iId; + TMsvId iParentId; + TInt32 iData; + TInt32 iPcSyncCount; + TInt32 iReserved; // reserved for future proofing +public: + /** Service ID. */ + TMsvId iServiceId; + /** Related folder ID. */ + TMsvId iRelatedId; + /** Entry type */ + TUid iType; + /** MTM */ + TUid iMtm; + /** Time */ + TTime iDate; + /** Size */ + TInt32 iSize; + /** Error */ + TInt32 iError; + /** BIO message type */ + TInt32 iBioType; + // following three can be used by MTM + /** MTM data 1: this can be used for any purpose by an MTM. This member must + only be accessed through the predefined set and get functions. If you must + write data to a bit that has no meaning in the predefined derived classes + then you must derive your own class from TMsvEntry. + */ + TInt32 iMtmData1; + /** MTM data 2: this can be used for any purpose by an MTM. This member must + only be accessed through the predefined set and get functions. If you must + write data to a bit that has no meaning in the predefined derived classes + then you must derive your own class from TMsvEntry. + */ + TInt32 iMtmData2; + /** MTM data 3: this can be used for any purpose by an MTM. This member must + only be accessed through the predefined set and get functions. If you must + write data to a bit that has no meaning in the predefined derived classes + then you must derive your own class from TMsvEntry. + */ + TInt32 iMtmData3; +public: + // The TPtrC must be kept at end of class to simplify comparisons and initialisation + /** Description */ + TPtrC iDescription; + /** Details */ + TPtrC iDetails; + // + // +private: + // +friend class CMsvEntry; +friend class CMsvServer; +friend class CMsvServerEntry; +friend class CMsvClientEntry; +friend class CMsvServerSession; +friend class TMsvServerEntry; +friend class CMsvServerIndex; +friend class RMsvServerSession; +friend class CMsvLocalCopyOperation; +friend class CMsvMove; +friend class CMsvIndexRebuild; +friend class CMsvCopyEntry; +friend class CMsvDelete; +friend class CMsvIndexContext; +friend class CMsvEntryArray; + // +private: + // +enum { KMsvEntryPriorityMask= 0x00000003, + KMsvEntryHighPriority= 0x00000002, + KMsvEntryMediumPriority= 0x00000001, + KMsvEntryLowPriority= 0x00000000, + KMsvEntryClearFlag= 0x00000000, + KMsvOffPeakFlag= 0x00000004, + KMsvEntryNotCompleteFlag= 0x00000008, + KMsvEntryNewFlag= 0x00000010, + KMsvEntryUnreadFlag= 0x00000020, + KMsvEntryFailedFlag= 0x00000040, + KMsvEntryOperationFlag= 0x00000080, + KMsvEntryOwnerFlag= 0x00000100, + KMsvEntryInvisibleFlag= 0x00000200, + KMsvEntryMultipleRecipientFlag= 0x00000400, + KMsvScheduledFlag= 0x00000800, + KMsvEntryReadOnlyFlag= 0x00001000, + KMsvEntryDeletedFlag= 0x00002000, + KMsvEntryStandardFolderFlag= 0x00004000, + KMsvEntryAttachmentFlag= 0x00008000, + KMsvEntryInPreparationFlag= 0x00010000, + KMsvSendingStateFlags= 0x001E0000, // Note: Sending state is shifted KMsvSendingStateShift places left + KMsvEntryPersistedFlags= 0x00FFFFFF, + KMsvEntryPendingConditionsFlag= 0x00800000, + KMsvEntryTemporaryFlags= 0xFF000000, + KMsvEntryConnectedFlag= 0x01000000, + KMsvEntryPendingDeleteFlag= 0x02000000}; + }; +enum + { + KMsvEntryDeleteProtected= 0x800000, + KMsvEntryForwarded= 0x40000000, + KMsvEntryLocallyDeleted= 0x80000000 + }; + +const TUint KMsvSendingStateShift=0x11; // Places to shift sending state + +/** Defines sending state flags. +@publishedAll +@released +*/ +enum TMsvSendState + { + /** State unknown. */ + KMsvSendStateUnknown = 0x0, + /** Message will be sent on request. */ + KMsvSendStateUponRequest = 0x1, + /** Waiting to be sent. + + Messages in the outbox with this state can be sent automatically by the relevant + MTM once an appropriate connection is established. */ + KMsvSendStateWaiting = 0x2, + /** Sending in progress. */ + KMsvSendStateSending = 0x3, + /** Sending scheduled. */ + KMsvSendStateScheduled = 0x4, + /** Resending. */ + KMsvSendStateResend = 0x5, + /** Sending suspended. */ + KMsvSendStateSuspended = 0x6, + /** Sending failed. */ + KMsvSendStateFailed = 0x7, + /** Sending complete. */ + KMsvSendStateSent = 0x8, + /** Not applicable. */ + KMsvSendStateNotApplicable = 0x9 + }; + +const TUint KMsvSendStateLast = KMsvSendStateNotApplicable; +const TUint KMsvSendStateMax = 0x0F; + +/** Supplies values for bitmasks that allows the rapid setting or clearing of a +number of TMsvEntry fields. + +The fields that can be manipulated are: + +1. PC synchronisation + +2. Visibility flag + +3. Read flag + +4. In-preparation flag + +5. Connected flag + +6. Pending deletion flag. + +7. New flag + +@see TMsvEntry +@see CMsvSession::ChangeAttributesL() +@see CMsvServerEntry::ChangeAttributes() +@publishedAll +@released +*/ +enum TMsvAttribute { + /** PC synchronisation field. */ + KMsvPcSyncCountAttribute =0x00000001, + /** Visibility flag field. */ + KMsvVisibilityAttribute =0x00000200, + /** Read flag field. */ + KMsvUnreadAttribute =0x00000020, + /** In-preparation field. */ + KMsvInPreparationAttribute =0x00010000, + /** Connected flag field. */ + KMsvConnectedAttribute =0x01000000, + /** Pending deletion flag. */ + KMsvPendingDeleteAttribute =0x02000000, + /** New flag field. */ + KMsvNewAttribute =0x00000010}; + +/** Defines the sort order options for a TMsvSelectionOrdering object. Options +are set through TMsvSelectionOrdering::SetSorting(). + +@see TMsvSelectionOrdering +@publishedAll +@released +*/ +enum TMsvSorting + { + /** Don't sort */ + EMsvSortByNone=0, // Don't sort + /** Date (earliest-latest) */ + EMsvSortByDate, // Date (earliest-latest) + /** Date (latest-earliest) */ + EMsvSortByDateReverse, // Date (latest-earliest) + /** Size (smallest-largest) */ + EMsvSortBySize, // Size (smallest-largest) + /** Size (largest-smallest) */ + EMsvSortBySizeReverse, // Size (largest-smallest) + /** To/From (A-Z folded) */ + EMsvSortByDetails, // ToFrom (A-Z collated) + /** To/From (Z-A folded) */ + EMsvSortByDetailsReverse, // ToFrom (Z-A collated) + /** Description (A-Z folded) */ + EMsvSortByDescription, // Description (A-Z collated) + /** Description (Z-A folded) */ + EMsvSortByDescriptionReverse, // Description (Z-A collated) + /** Sort by message ID. */ + EMsvSortById, // Id (lowest-highest) + /** Sort in reverse order by message ID. */ + EMsvSortByIdReverse // Id (highest-lowest) + }; + +/** Defines grouping order options for a TMsvEntrySelection object. Grouping options +can be combined in a bitmask and set through the TMsvEntrySelection constructor +@publishedAll +@released +*/ +enum TMsvGrouping + { + /** No grouping */ + KMsvNoGrouping=0, // No grouping + /** Group by entry type, in order, services, folders, messages, attachments */ + KMsvGroupByType=0x2, // Folder, Message, Attachment + /** Place standard folders first, in the order they were created */ + KMsvGroupByStandardFolders=0x6, // Standrad folders first (must have sorting by type set aswell) + /** Group by message priority, in order, high, medium, then low */ + KMsvGroupByPriority=0x8, // High, Mediem, Low + /** Group by MTM, either in the order set by CMsvEntry::SetMtmListL() or by MTM + Uid value */ + KMsvGroupByMtm=0x10, // By increasing uid value + }; + +/** Defines the sorting and grouping rules used to prepare a selection of entries. + +It is used in the interfaces of CMsvEntry and CMsvServerEntry to set the ordering +of an entry's children. + +Firstly, the entries will be grouped, if the appropriate grouping option is +set, by: + +1. Standard folders: any entries marked as standard folders are placed first, +in the order they were created. + +2. Entry type: in the order services, folders, messages, attachments, unknown + +3. Priority: in the order high, medium, then low + +4. MTM: either in the MTM order set by CMsvEntry::SetMtmListL() or just in MTM +Uid value + +Grouping options are simply Boolean flags that can be set on or off by functions +of this class. + +Secondly, the order of entries within these groups is defined by a sorting +order option. + +@see CMsvEntry +@see CMsvServerEntry +@publishedAll +@released +*/ +class TMsvSelectionOrdering + { +public: + IMPORT_C TMsvSelectionOrdering(); + IMPORT_C TMsvSelectionOrdering(TInt aGroupingKey, TMsvSorting aSorting, TBool aShowInvisible=EFalse); + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C TBool operator==(const TMsvSelectionOrdering& aOrdering) const; + IMPORT_C void SetSubjectSkipString(const TDesC& aSubjectSkipString); + IMPORT_C const TDesC& SubjectSkipString() const; + + // + inline TMsvSorting Sorting() const; + inline TBool GroupByType() const; + inline TBool GroupStandardFolders() const; + inline TBool GroupByPriority() const; + inline TBool GroupByMtm() const; + inline TBool ShowInvisibleEntries() const; + inline TBool GroupingOn() const; + // + inline void SetGroupByType(TBool aFlag); + inline void SetGroupStandardFolders(TBool aFlag); + inline void SetGroupByPriority(TBool aFlag); + inline void SetGroupByMtm(TBool aFlag); + inline void SetShowInvisibleEntries(TBool aFlag); + inline void SetSorting(TMsvSorting aSortType); + + // + // +private: + + enum TMsvGroupingPrivate + { + KMsvInvisibleFlag=0x1, + KMsvStandardFolders=0x4, + KMsvAllGroupingFlags=0x1e + }; + TInt iGrouping; + TMsvSorting iSortType; + TBuf iSubjectSkipString; + }; + +const TInt KMsvInvisibleFlag=1; + +/** Encapsulates an array of entry IDs. + +An object of this type is commonly passed to a function to indicate the set +of entries on which the function should operate. The array base class (CArrayFixFlat) +provide methods to access, sort, and manipulate members of the array. + +@publishedAll +@released +*/ +class CMsvEntrySelection : public CArrayFixFlat + { +public: + IMPORT_C CMsvEntrySelection(); + IMPORT_C CMsvEntrySelection* CopyL() const; + IMPORT_C CMsvEntrySelection* CopyLC() const; + IMPORT_C TInt Find(TMsvId aId) const; + }; + +/** Specifies a default service for a MTM. + +@publishedAll +@released +*/ +class TMsvDefaultService + { +public: + /** MTM for which the default service is specified. */ + TUid iMtm; + /** ID of the default service. */ + TMsvId iService; + }; + + + +/** Used to query the Message Server for entries that match the specification defined +in the filter. + +It allows a query to be performed on service, MTM, type and last change date. +The filter also enables the specification of the order in which the entries +are returned. + +@see CMsvSession::GetChildIdsL() +@publishedAll +@released +*/ +class CMsvEntryFilter : public CBase + { +public: + IMPORT_C static CMsvEntryFilter* NewLC(); + IMPORT_C static CMsvEntryFilter* NewL(); + // +public: + inline TMsvId Service() const; + inline void SetService(TMsvId aServiceId); + // + inline TUid Mtm() const; + inline void SetMtm(TUid aMtm); + // + inline TUid Type() const; + inline void SetType(TUid aType); + // + inline const TTime& LastChangeDate() const; + inline void SetLastChangeDate(const TTime& aLastChange); + // + inline const TMsvSelectionOrdering& Order() const; + inline void SetOrder(const TMsvSelectionOrdering& aOrder); + // + inline TUid SortMtm() const; + inline void SetSortMtm(TUid aSortMtm); + // +private: + CMsvEntryFilter(); + // +private: + TMsvId iServiceId; + TUid iMtm; + TUid iType; + TTime iLastChange; + TMsvSelectionOrdering iOrdering; + TUid iSortMtm; + }; + +// Error resolver leave codes -7000 to -7127 +/** Defines error codes that relate to the Message Server. + +@see MMsvEntryObserver::EMsvContextInvalid +@publishedAll +@released +*/ +enum TMsvResolverLeave + { + /** There is no disk in the drive containing the Message Server index. */ + KMsvMediaUnavailable = -7000, + /** There is a disk in the drive containing the Message Server index, but it is + the wrong one. */ + KMsvMediaIncorrect = -7001, + /** A CMsvEntry context is no longer valid because the location of the Message Server's + index has changed. + + Such contexts will need refreshing by the client. + + @see MMsvEntryObserver::EMsvContextInvalid */ + KMsvMediaChanged = -7002, + KMsvIndexBackup = -7003, + KMsvIndexRestore = -7004 + }; + +#include + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvstore.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvstore.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,246 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__MSVSTORE_H__) +#define __MSVSTORE_H__ + +#include +#include +#include + +class CMsvCachedStore; +class CMsvBodyText; +class CMsvAttachment; + +//********************************** +// MMsvStoreObserver +//********************************** +// +// +// + +class MMsvStoreObserver +/** Observer interface to get events relating to a message store. + +This is used in the derivation of CMsvServerEntry and CMsvEntry. + +@publishedAll +@released +*/ + { +public: +/** +Defines message store event types. + +@publishedAll +@released +*/ + enum TMsvStoreEvent { /** A read-only message store was closed. */ + EMsvReadStoreClosed, // read only CMsvStore closed + /** An editable message store was closed. */ + EMsvEditStoreClosed // edit only CMsvStore closed + }; +public: + /** Receives a message store event. + + @param aEvent Event type + @param aId ID of the message to which the event relates + */ + virtual void HandleStoreEvent(TMsvStoreEvent aEvent, TMsvId aId)=0; + }; + + +//********************************** +// CMsvStore +//********************************** +// +// The entry structure that the client uses +// + +/* +Uid which are not needed to be known outside CMsvStore +@internalComponent +@deprecated +*/ +const TUid KMsvEntryRichTextBody={0x10000F70}; + + +/** +UId for the 16-bit chunk storage mechanism. +@internalTechnology +@prototype +*/ +const TUid KMsvPlainBodyText16={0x10000F90}; + +/** +UId for the 8-bit chunk storage mechanism. +@internalTechnology +@prototype +*/ +const TUid KMsvPlainBodyText8={0x10000F80}; + +class MMsvAttachmentManager; +class MMsvAttachmentManagerSync; +class CMsvAttachmentManager; +class MMsvStoreManager; +class CMsvPlainBodyText; +class CMsvStore : public CBase +/** Provides an interface over the message store that is associated with a message +entry. It is similar to the dictionary store in supporting the concept of +streams referenced by UID. + +This class is intended for use by MTM implementations. Message client applications +access the store through the higher-level functions provided by Client-side +and User Interface MTMs. + +A CMsvStore object is created by a CMsvEntry object and passed to a client +process. The client process then becomes responsible for deleting the CMsvStore +object. The store can be opened in two modes, read or edit, and only one CMsvStore +object can have edit access to a store. + +CMsvStore provides functions for general manipulation of the store, and for +accessing the standard body text stream. RMsvReadStream and RMsvWriteStream +must be used to access other streams. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CMsvStore(); + // + IMPORT_C void StoreBodyTextL(const CRichText& aRichTextBody); + + IMPORT_C void RestoreBodyTextL(CRichText& aRichTextBody); + IMPORT_C void RestoreBodyTextL(CRichText& aRichTextBody, TUint aCharsetOverride); + + IMPORT_C void DeleteBodyTextL(); + IMPORT_C TBool HasBodyTextL() const; + // + IMPORT_C void DeleteL(); // deletes the message store + IMPORT_C TInt SizeL(); // the size of the store + // + // The following give the Dictionary store interface + IMPORT_C TBool IsNullL() const; + IMPORT_C TBool IsPresentL(TUid aUid) const; + IMPORT_C void Remove(TUid aUid); + IMPORT_C void RemoveL(TUid aUid); + IMPORT_C void Revert(); + IMPORT_C void RevertL(); + IMPORT_C TInt Commit(); + IMPORT_C void CommitL(); + + // Attachment Management + IMPORT_C MMsvAttachmentManager& AttachmentManagerL(); + IMPORT_C MMsvAttachmentManagerSync& AttachmentManagerExtensionsL(); + + // APIs to get the CMsvPlainBodyText interface. + IMPORT_C CMsvPlainBodyText* InitialisePlainBodyTextForWriteL(TBool aIs8Bit, TUint aCharsetId, TUint aDefaultCharsetId); + IMPORT_C CMsvPlainBodyText* InitialisePlainBodyTextForReadL(TInt aChunkLength); + + /** + @internalTechnology + @released + */ + IMPORT_C void CreateShareProtectedAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, CMsvAttachment* aAttachmentInfo); + void Restore8BitBodyTextL(RFileReadStream& aInputStream); + +protected: + + IMPORT_C CMsvStore(MMsvStoreObserver& aObserver, RFs& aFs, TMsvId aId, MMsvStoreManager& aStoreManager); + IMPORT_C static CMsvStore* OpenForReadL(MMsvStoreObserver& aObserver, RFs& aFs, MMsvStoreManager& aStoreManager, TMsvId aId); + IMPORT_C static CMsvStore* OpenForWriteL(MMsvStoreObserver& aObserver, RFs& aFs, MMsvStoreManager& aStoreManager, TMsvId aId); + +private: + + + void ConstructL(TBool aReadOnly); + + //Methods to handle plain bodytext. + void RestorePlainBodyTextL(CRichText& aRichText, TUint aCharsetOverride); + void GetRichTextFrom8BitL(RFile& aBodyTextFile, CRichText& aRichText, TUint aCharSet, TUint aDefaultCharSet); + void GetRichTextFrom16BitL(RFile& aBodyTextFile, CRichText& aRichText); + void Convert8BitToRichTextL(RFile& aBodyTextFile, CRichText& aRichText, TUint aCharSet, TUint aDefaultCharSet); + + void Lock(); + inline const CMsvCachedStore& Store() const; + inline CMsvCachedStore& Store(); +private: + enum {EMsvStoreUnlocked, EMsvStoreLocked} iLockStatus; + + RFs& iFs; + MMsvStoreObserver& iObserver; + + + const TMsvId iId; + CMsvCachedStore* iStore; + TBool iConstructed; + CMsvBodyText* iBodyText; + + MMsvStoreManager& iStoreManager; + CMsvAttachmentManager* iAttachmentManager; + +friend class CMsvEntry; +friend class CMsvServerEntry; +friend class RMsvReadStream; +friend class RMsvWriteStream; + }; + + +class RMsvReadStream : public RReadStream +/** Accesses the streams in a message store with read access. + +Before it is used, +a CMsvStore must have been opened on the message store with read or read/write +access. + +This class is intended for use by MTM implementations to store MTM-specific +information. Message client applications access the store through the higher-level +functions provided by Client-side and User Interface MTMs. + +Most of its functionality is provided by the base class RReadStream. +@publishedAll +@released +*/ + { +public: + IMPORT_C void OpenL(const CMsvStore& aMsvStore, TUid aUid); + IMPORT_C void OpenLC(const CMsvStore& aMsvStore,TUid aUid); + void OpenLC(CMsvCachedStore& aStore,TUid aUid); + }; + + +class RMsvWriteStream : public RWriteStream +/** Accesses the streams in a message store with write access, or creates new streams. +Before it is used, a CMsvStore must have been opened on the message store +with write access. + +This class is intended for use by MTM implementations to store MTM-specific +information. Message client applications access the store through the higher-level +functions provided by Client-side and User Interface MTMs. + +Most of its functionality is provided by the base class RWriteStream. +@publishedAll +@released +*/ + { +public: + IMPORT_C void AssignLC(CMsvStore &aMsvStore, TUid aUid); + IMPORT_C void AssignL(CMsvStore &aMsvStore, TUid aUid); + void AssignLC(CMsvCachedStore &aStore, TUid aUid); + }; + + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvsysagentaction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvsysagentaction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,128 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// MsvSysAgentCondAction.H +// +// + +#ifndef __MSVSYSAGENTCONDACTION_H__ +#define __MSVSYSAGENTCONDACTION_H__ + + + + +#include + +///////////////////////////////////////////////////////////////////////////// +// +// System Agent-related Class Declarations +// +///////////////////////////////////////////////////////////////////////////// + + + +/** +Defines a condition which a Publish and Subscribe Uid must satisfy. + +@see RProperty + +@publishedAll +@released +*/ +class TMsvCondition + { +public: +/** +An enumeration defining the type of test to be made against a Publish +and Subscribe property. +*/ + enum TMsvSchSendConditionType + { + /** Tests that a value is equal to a state variable value. */ + EMsvSchSendEquals, + /** Tests that a value is unequal to a state variable value. */ + EMsvSchSendNotEquals, + /** Tests that a value is greater than a state variable value. */ + EMsvSchSendGreaterThan, + /** Tests that a value is less than a state variable value. */ + EMsvSchSendLessThan + }; + +public: + /** second UID of the process which set the condition*/ + TUid iVariable; + /** Integer state of corresponding P&S variable to be tested against*/ + TInt iState; + /** type of test to be performed */ + TMsvSchSendConditionType iType; + }; + + +/** +Schedule Send condition must be satisfied before a message sending attempt. + +@publishedAll +@released +*/ + +class TMsvSysAgentConditionAction + { +public: + IMPORT_C TMsvSysAgentConditionAction(); + + + /** Condition to meet. */ + TMsvCondition iCondition; + + /** Error action to use. */ + TMsvSendErrorAction iErrorAction; + + /** Default error action. */ + TBool iUseDefaultSysAgentAction; + +private: + }; + + + +/** +Defines an array of schedule send conditions that must be satisfied before a message sending attempt. + +@see TMsvSysAgentConditionAction + +@publishedAll +@released +*/ + +class CMsvSysAgentActions : public CArrayFixFlat + { +public: + IMPORT_C CMsvSysAgentActions(); + IMPORT_C ~CMsvSysAgentActions(); + + + IMPORT_C TBool ConditionsMetL(TMsvSendErrorAction& aErrorAction); + + /** Default send error action. */ + TMsvSendErrorAction iDefault; + +private: + + + void GetConditionVariablesL(CArrayFix& aUids) const; + TBool CheckStates(const CArrayFix& aStates, TMsvSendErrorAction& aErrorAction) const; + TBool ConditionOK(const TMsvSysAgentConditionAction& aCondAction, const TInt aState) const; + + }; + +#endif // __MSVSYSAGENTCONDACTION_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/msvuids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/msvuids.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,90 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ +#if !defined(__MSVUIDS_H__) +#define __MSVUIDS_H__ +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__MSVSTD_HRH__) +#include +#endif + + +/** +* Entry type Uids +* @publishedAll +* @released +*/ +const TUid KUidMsvNullEntry={0}; +/** +* Root entry of entire index +* @publishedAll +* @released +*/ +const TUid KUidMsvRootEntry={KUidMsvRootEntryValue}; +// Service +/** +* @publishedAll +* @released +*/ +const TUid KUidMsvServiceEntry={KUidMsvServiceEntryValue}; +// Folder +/** +* @publishedAll +* @released +*/ +const TUid KUidMsvFolderEntry={KUidMsvFolderEntryValue}; +// Message +/** +* @publishedAll +* @released +*/ +const TUid KUidMsvMessageEntry={KUidMsvMessageEntryValue}; +// Entry +/** +* @publishedAll +* @released +*/ +const TUid KUidMsvAttachmentEntry={KUidMsvAttachmentEntryValue}; + +// Local Service Uid +// An operation that affects only local entries. +/** +* @publishedAll +* @released +*/ +const TUid KUidMsvLocalServiceMtm={KUidMsvLocalServiceMtmValue}; +//An operation performed by the Message Server. +/** +* @publishedAll +* @released +*/ +const TUid KUidMsvServerMtm={KUidMsvServerMtmValue}; +// Key for Publish & Subscribe Disk Space Monitor +/** +* @publishedAll +* @released +*/ +const TInt KUidPSDiskSpaceMonitorKeyType={0x2001FC30}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtclbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtclbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,550 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#ifndef __MTCLBASE_H__ +#define __MTCLBASE_H__ + +#include +#include +#include + +#include +#include +#include + +/** +UId for 8-bit/16-bit Character set mechanism. +@internalTechnology +@prototype +*/ +const TInt KUIDCharacterSet = 999; + +class CMsvAttachmentWaiter; + + +/** Specifies one or more parts of a message in message-forwarding, message-reply, +and message-validation functions. + +Standard message parts are defined by the constants that can be added (or +bitwise-or'ed) together to specify multiple parts. Some message parts may +not be meaningful for some MTMs. + +Specifies find attributes which modify the behaviour of the search text utility +provided by the Global Find API. This does not apply to v5.1 nor to v5. */ +typedef TUint TMsvPartList; + +class CParaFormatLayer; +class CCharFormatLayer; + + +/** Specifies function IDs for standard MTM functions. + +The function IDs are specified such that they do not coincide +with the free area defined for MTM commands. + +If MTMs also offer their own equivalents of these functions, +they may implement these function IDs by considering the +two IDs to be the same in their client MTM. + +MTMs that support SendAs must support SendMessage. +*/ +enum TMtmStandardAsyncCommands + { + KMTMStandardFunctionsSendMessage = KMtmFirstFreeStandardMtmFunctionId + }; + + +//////////////////////////////////////////////////////// +// Prototype of expected factory function + +typedef CBaseMtm* MtmFactoryFunctionL(CRegisteredMtmDll&, CMsvSession&); + + +/*********************************************** +***********************************************/ +class CBaseMtm : public CBase, public MMsvEntryObserver +/** Provides a high-level interface for accessing and manipulating a Message Server +entry. + +Message client applications use the class to access such functionality polymorphically. +MTM implementers implement a derived class to provide such functionality for +their message protocol. + +The following are some significant groups of functions: + +Context functions: the SetCurrentEntryL() and SwitchCurrentEntryL() functions +change the context - the entry on which later actions are performed. After +creating a new Client-side MTM object, a message client application should +set an initial context before using other functions. Note that: any changes +made to an existing context are not automatically saved: the message client +application should ensure this itself by calling SaveMessageL(); no message +data for the new context is retrieved from the Message Server, to retrieve +entry data, call LoadMessageL() after setting the context; calling Body() +immediately after setting the context returns an empty CRichText object: this +is because the private cache of context body text that the base class maintains +is re-initialised to an empty value. MTM implementers should note that the +virtual ContextEntrySwitched() is called from these functions to allow derived +classes to also clear any caches of MTM-specific entry data. + +Store and restore entry data functions: the changes that a message client +application makes to a message context through Client-side MTM functions, +such as altering the body text obtained through Body(), are, for efficiency, +cached in memory by a Client-side MTM. The message store and restore functions +are concerned with transferring data between that cache and committed storage. +Note that, unlike message contexts, message client applications are not expected +to manipulate directly service contexts. Instead, the corresponding User Interface +MTM will provide dialogs to allow the user to alter service settings, and +call Client-side MTM functions to handle their retrieval and storage. Symbian +OS v5 expects the base class functions to handle storage and retrieval for +both message and service contexts, and their implementations must detect what +the context is, and act accordingly. Post-v5, the API is clarified by restricting +the base class functions to handle message contexts only. To handle service +contexts, a Client-side MTM must define its own functions for the User Interface +MTM to call. + +Store and restore body text functions: the base class maintains a private +CRichText object cache to store the body text for the current context. This +can be accessed for reading and writing by message client applications through +Body(). StoreBodyL() and RestoreBodyL() encapsulate for implementers of derived +classes the retrieval and storage of this CRichText object to a CMsvStore. + +Address list functions: the format and storage of message addresses is MTM-specific. +AddresseeList(), AddAddresseeL(), and RemoveAddressee() are designed to allow +clients with no MTM-specific knowledge to access address information in a +generic way. The base class has a protected data member iAddresseeList, an +array of descriptors, which these functions manipulate. Implementations should +save the address information to the appropriate place in the message store +when the message is stored. + +MTM-specific functionality: MTM components can offer protocol-specific functionality +not provided by base class interface functions. MTM components define IDs +that correspond to each protocol-specific operation offered, and implement +the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients +to access these operations by passing in the appropriate ID. Two functions +are provided to allow the MTM component to offer both synchronous and asynchronous +functionality. Message client applications can dynamically add user-interface +features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). +MTM developers should document the IDs if they wish to make the operations +available to clients. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CBaseMtm(); + IMPORT_C TUid Type() const; + // + // context related + IMPORT_C void SetCurrentEntryL(CMsvEntry* aEntry); + IMPORT_C void SwitchCurrentEntryL(TMsvId aId); + IMPORT_C CMsvEntry& Entry() const; + IMPORT_C TBool HasContext() const; + // + // + /** Commits cached changes to the storage controlled by the Message Server. + + It can only be called on message contexts. It should be called in the following circumstances: + + 1. to preserve changes when the context is changed, or when the Client-side MTM + object is deleted + + 2. to enable other parts of the Messaging to access the updated entry, as required, + for example, before sending a message + + Requirements: + + An implementation must update the store and index entry relating to the message + context. Typically, the message store should be opened for editing with CMsvEntry::EditStoreL(). + It should be updated as follows: + + 1. body text: call StoreBodyL() to update the store's body text stream + + 2. address list: update the appropriate MTM-specific area of the store from the + data in iAddresseeList + + 3. subject: if supported, update the appropriate MTM-specific area of the store + from the private cache set by SetSubjectL() + + Changes can then be committed to the store with CMsvStore::CommitL(). + + The index entry should also be updated to reflect changes. Possible fields + that may need updating include: Description (for subject changes); Details + and Multiple Recipients (for recipient changes); and Size. Index entry changes + are committed using CMsvEntry::ChangeL(). + + The function should panic for non-message contexts. */ + virtual void SaveMessageL()=0; + /** Loads the cache with the message data for the current context. + + It can only be called on message contexts. + + It is typically used after the context has been set with SetCurrentEntryL() + or SwitchCurrentEntryL(). CBaseMtm functions to manipulate the entry can only + be called after this function has been called. + + Requirements: + + An implementation must restore the store and index entry relating to the message + context. Typically, the message store should be opened for reading with CMsvEntry::ReadStoreL(). + It should be then be read to set the following: + + 1. body text: call RestoreBodyL() to update the cached body text + + 2. address list: read the appropriate MTM-specific area of the store to update + iAddresseeList + + 3. subject: if supported, read the appropriate MTM-specific area of the store + and update the cache with SetSubjectL() + + The function should panic for non-message contexts. */ + virtual void LoadMessageL()=0; + /** Validates the current message context. + + The precise validation performed is specific to the MTM, but, typically, checks + that the specified message parts are well-formed. + + Requirements: + + Implementation of this function is highly protocol-specific. A minimum step + is to check that the current context is a message. + + @param aPartList Indicates the message parts for which validation is requested + + @return If valid, KErrNone If invalid, identifies the invalid part(s). The + error value is the bitmask of the TMsvPartList IDs for each invalid part */ + virtual TMsvPartList ValidateMessage(TMsvPartList aPartList)=0; + /** Searches the specified message part(s) for the plain-text version of the text + to be found. + + If the specified part list indicates a part that is not supported, or is not + present in the current message, the function behaves as if the specified part + exists but does not contain the required text. + + Requirements: + + The parts of the entry for which searching is allowed is implementation specific. + If no searching is supported, always return 0. + + @param aTextToFind The plain-text version of the text to be found. + @param aPartList Indicates the message parts which should be searched. + @return If the text was not found, or searching is unsupported, 0. If the text + was found, a bitmask of the TMsvPartList IDs for each part in which the text + was present. */ + virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList)=0; + // + // + /** Creates a reply message to the current message context. + + Some MTMs may support inclusion of elements, specified by aPartlist, from + the original message in the reply. The parent for the new entry is specified + in aDestination. + + The returned CMsvOperation object completes when creating the reply is complete. + On completion, the context is set to the reply message. + + Requirements: + + A typical implementation for this function would include the following steps: + + 1. create a new message in the specified destination by calling CMsvEntry::CreateL() + + 2. set the entry index values as appropriate + + 3. set the properties of the message as required. The normal minimum is to set + the address to the sender of the original message. An implementation may also + follow the options specified in aPartlist to set other properties, for example, + to include the original message text. + + 4. set the context to the reply + + 5. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + If message replies are not supported, implementations should leave with KErrNotSupported. + + The implementation of this function may be similar to that of ForwardL(), + allowing opportunities for code sharing. + + @param aDestination The entry to which to assign the reply + @param aPartlist Defines the parts that are to be copied from the original + message into the reply + @param aCompletionStatus The request status to be completed when the operation + has finished + @leave KErrNotSupported The Client-side MTM does not support reply operations + @leave Other leave codes Dependent on implementation + @return If successful, this is an asynchronously completing reply operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus)=0; + /** Creates a forwarded message from the current message context. + + Some MTMs may + support inclusion of elements, specified by aPartlist, from the original message + in the forwarded message. The parent for the new entry is specified in aDestination. + The returned CMsvOperation object completes when editing the forwarded message + is complete. On completion, the context is set to the forwarded message. + + Requirements: + + A typical implementation for this function would include the following steps: + + 1. create a new message in the specified destination by calling CMsvEntry::CreateL() + + 2. set the entry index values as appropriate + + 3. set message content as required. The normal minimum is to include the text + of the original message. An implementation may also follow the options specified + in aPartlist to include other properties of the original message. + + 4. set the context to the reply + + 5. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + If forwarded messages are not supported, implementations should leave with + KErrNotSupported. + + The implementation of this function may be similar to that of ReplyL(), allowing + opportunities for code sharing. + + @param aDestination The entry to which to assign the forwarded message + @param aPartList Defines the parts that are to be copied from the original + message into the forwarded message + @param aCompletionStatus The request status to be completed when the operation + has finished + @leave KErrNotSupported The Client-side MTM does not support creation of forwarded + messages + @leave Other leave codes Dependent on implementation + @return If successful, this is an asynchronously completing forward message + operation. If failed, this is a completed operation, with status set to the + relevant error code. */ + virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus)=0; + // + // addresssee list (used by objects with no MTM knowledge) + IMPORT_C const CMsvRecipientList& AddresseeList() const; + + /** Adds an addressee for the current context. + + Addresses are not validated by checking their format by this function. Usually + that is performed by calling ValidateMessage(). + + Requirements: + + Implementations should append the address to the object's address cache + in the protected iAddresseeList data member. Some implementations may also + wish to store addresses in an internal data structure appropriate for the + protocol, for example, a class holding message header information. + + @param aRealAddress String representing an address to be added to the list + for the current message + @leave KErrNotSupported The message already has the maximum number of addressees + + @leave Other leave codes Dependent on implementation */ + virtual void AddAddresseeL(const TDesC& aRealAddress)=0; + /** Adds an addressee for the current context, and enables the client to specify + an alias, which may be useful for some protocols. For example, for fax, if + the address is the fax number, the alias could supply the recipient's name. + + Addresses are not validated by checking their format by this function. Usually + that is performed by calling ValidateMessage(). + + Requirements: + + Implementations should append the address to the object's address cache + in the protected iAddresseeList data member. Some implementations may also + wish to store addresses in an internal data structure appropriate for the + protocol, for example, a class holding message header information. + + @param aRealAddress String representing an address to be added to the list + for the current message + @param aAlias Alias information + @leave KErrNotSupported The message already has the maximum number of addressees + + @leave Other leave codes Dependent on implementation */ + virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias)=0; + + IMPORT_C virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress); + IMPORT_C virtual void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress, const TDesC& aAlias); + + /** Removes an address from the current address list. The address is specified + by a zero-based index into the address list. If the index is not known, applications + can use AddresseeList() to retrieve the entire list to find the item. + + Requirements: + + Implementations should call iAddresseeList->Delete(aIndex) to remove the address + from in the address list protected data member. + + @param aIndex Index of address to be removed */ + virtual void RemoveAddressee(TInt aIndex)=0; + // + // standard data accessor/mutators + IMPORT_C CRichText& Body(); + IMPORT_C const CRichText& Body() const; + IMPORT_C virtual void SetSubjectL(const TDesC& aSubject); // default leaves with KErrNotSupported + IMPORT_C virtual const TPtrC SubjectL() const; // default leaves with KErrNotSupported + // + // RTTI functions + IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); // default returns KErrNotSupported + /** Invokes synchronous protocol-specific operations. For asynchronous operations, + a similar function, InvokeAsyncFunctionL(), is available. + + aSelection and aParameter allow data to be passed to the operation. + + Requirements: + + For functionality that requires message transport access, such as making a + connection, the implementation should pass the request onto the corresponding + Server-side MTM. This is done through calling CMsvSession::TransferCommandL(). + Implementations may also provide protocol-specific functions themselves if + this is useful. + + @param aFunctionId ID of the requested operation + @param aSelection Selection of message entries. This is used if the operation + requires message entries to work on. + @param aParameter Buffer containing input and output parameters. The format + of this is specific to the operation. + @leave KErrNotSupported aFunctionId is not a recognised operation ID + @leave Other leave codes Dependent on implementation */ + virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter)=0; + /** Invokes asynchronous protocol-specific operations. For synchronous operations, + a similar function, InvokeSyncFunctionL(), is available. + + aSelection and aParameter allow data to be passed to the operation. The TRequestStatus + and CMsvOperation objects are used as normal to control and monitor the operation. + + Requirements: + + For functionality that requires message transport access, such as making a + connection, the implementation should pass the request onto the corresponding + Server-side MTM. This is done through calling CMsvSession::TransferCommandL(). + Implementations may also provide protocol-specific functions themselves if + this is useful. + + InvokeAsyncFunctionL() should return a CMsvOperation-derived object to provide + asynchronous control and monitoring of the operation. If CMsvSession::TransferCommandL() + is called, this should be the CMsvOperation object returned by that function. + + @param aFunctionId ID of the requested operation + @param aSelection Selection of message entries. This is used if the operation + requires message entries to work on. + @param aParameter Buffer containing input and output parameters. The format + of this is specific to the operation. + @param aCompletionStatus The request status to be completed when the operation + has finished + @leave KErrNotSupported aFunctionId is not a recognised operation ID + @leave Other leave codes Dependent on implementation + @return If successful, this is an asynchronously completing operation. If failed, + this is a completed operation, with status set to the relevant error code. */ + virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus)=0; + // + IMPORT_C CMsvSession& Session(); + + // Attachment functions to support the SendAs API + virtual inline void Filler1() {}; + virtual inline void Filler2() {}; + IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); + IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C virtual void CancelAttachmentOperation(); + + IMPORT_C virtual void CreateMessageL(TMsvId aServiceId); + + // BIO functions to support the SendAs API + // Entry().Entry().iBioType will be set by SendAs if this function does not leave. + // The default implementation in CBaseMtm is to do nothing. + IMPORT_C virtual void BioTypeChangedL(TUid aBioTypeUid); + + IMPORT_C virtual TMsvId DefaultServiceL() const; + IMPORT_C virtual void RemoveDefaultServiceL(); + IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); + + //For setting the character encoding value, options are 7-bit, 8-bit and 16-bit Unicode. + IMPORT_C TInt SetMessageCharacterSet(TUint aCharSet); + +protected: + IMPORT_C CBaseMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aSession); + // + IMPORT_C void StoreBodyL(CMsvStore& aStore); + IMPORT_C void RestoreBodyL(CMsvStore& aStore); + // + /** Called by the base class functions SwitchCurrentEntryL() and SetCurrentEntryL() + when the context is changed to another entry. + + Client applications do not use this function. It is relevant only to implementers + of derived classes. + + Requirements: + + An implementation should clear: + + 1. address data stored in iAddresseeList + + 2. any caches of MTM-specific entry data relating to a previous context. For + example, if the implementation has a private buffer storing a message subject, + for access through Subject(), this buffer should be cleared. */ + virtual void ContextEntrySwitched()=0; // called after the context of this instance has been changed to another entry + // + IMPORT_C void HandleEntryEventL(TMsvEntryEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + + // Method used for extension: called by non virtual methods that need + // to have a polymorphic behaviour. + IMPORT_C virtual TAny* GetInterface(TUid aUid); + + // From CBase + IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); + + +private: + void DeleteEntry(); + + void AddFilePathAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, CMsvAttachment::TMsvAttachmentType aType, TRequestStatus& aStatus); + +protected: + /** The current context. */ + CMsvEntry* iMsvEntry; + /** The address list for the current context. */ + CMsvRecipientList* iAddresseeList; + + /** Paragraph formatting applied to the CRichText object for the body text, as + returned by Body(). This is set to an empty CParaFormatLayer instance whenever + the context is set. + + Implementations can modify this if they wish to apply particular formatting + to body text. */ + CParaFormatLayer* iParaFormatLayer; + /** Character formatting applied to the CRichText object for the body text, as + returned by Body(). + + Implementations can modify this if they wish to apply particular formatting + to body text. */ + CCharFormatLayer* iCharFormatLayer; + +private: + TMsvId iEntryId; + CRichText* iRichTextBody; + CRegisteredMtmDll& iRegisteredMtmDll; + CMsvSession& iSession; + CMsvAttachmentWaiter* iAttachmentWaiter; + + // Extra data member to allow for future extensions + TAny* iExtensionData; + }; + + +#endif // __MTCLBASE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtclreg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtclreg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#if !defined __MTCLREG_H__ +#define __MTCLREG_H__ + +#include // CActive, TFileName etc. +#include +#include // MMsvSessionObserver + +// CObserverRegistry mixes in session notification API +// this allows run-time update of the registries on the client-side. +// the server registry should inherit from CMtmDllRegistry +class CObserverRegistry : public CMtmDllRegistry, public MMsvSessionObserver +/** Base class for client, UI and UI data MTM registries. + +It implements the session observer interface to update the registry information +when MTM groups are installed or uninstalled. +@publishedAll +@released +*/ + { +public: + IMPORT_C virtual void HandleSessionEventL(TMsvSessionEvent aEvent, TAny* aArg1, TAny* aArg2, TAny* aArg3); + IMPORT_C ~CObserverRegistry(); + +protected: + IMPORT_C CObserverRegistry(CMsvSession& aMsvSession,TUid aDllTypeUid,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); + IMPORT_C void ConstructL(); + +protected: + CMsvSession& iMsvSession; + TBool iIsAdded; + }; + +// Client side MTM registry +class CClientMtmRegistry : public CObserverRegistry +/** Accesses the Client-side MTM registry. + +This registry holds details of the all the Client-side MTMs currently available +on the system. Message client applications use this class to get a CBaseMtm-derived +object by which to access Client-side MTM functionality. + +Note that the base class CMtmDllRegistry provides functions for discovering +what MTMs are present in the registry. + +@publishedAll +@released +*/ + { +public: + IMPORT_C static CClientMtmRegistry* NewL(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)); + IMPORT_C ~CClientMtmRegistry(); + IMPORT_C CBaseMtm* NewMtmL(TUid aMtmTypeUid); + // +protected: + CClientMtmRegistry(CMsvSession& aMsvSession,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); + void ConstructL(); + // +private: + CBaseMtm* DoNewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const; + }; + +#endif // __MTCLREG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtmdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtmdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,69 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#if !defined(__MTMDEF_H__) +#define __MTMDEF_H__ +#if !defined(__MTCLBASE_H__) +#include +#endif +#if !defined(__MTMDEF_HRH__) +#include +#endif + +// no matching message parts + +const TMsvPartList KMsvMessagePartNone = 0x00000000; +// message parts + +// Message body +const TMsvPartList KMsvMessagePartBody = 0x00000001; + +// Message recipients + +const TMsvPartList KMsvMessagePartRecipient = 0x00000002; + +// Message originator + +const TMsvPartList KMsvMessagePartOriginator = 0x00000004; +// Message description +const TMsvPartList KMsvMessagePartDescription = 0x00000008; +// Message date + +const TMsvPartList KMsvMessagePartDate = 0x00000010; +// Message attachments + +const TMsvPartList KMsvMessagePartAttachments = 0x00000020; + +// find attributes +//Flag to specify case-sensitive search. + +const TMsvPartList KMsvFindCaseSensitive = 0x80000000; +// Flag to specify search for whole words. + +const TMsvPartList KMsvFindWholeWord = 0x40000000; + +// Maximum length (in characters) of find text. + +const TInt KMsvMaxFindTextLength = 500; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtmuibas.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtmuibas.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,527 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__MTMUIBAS_H__) +#define __MTMUIBAS_H__ + +#if !defined(__MSVSTD_H__) +#include +#endif +#if !defined(__MTCLBASE_H__) +#include +#endif + +// Forward references +class CMsvSession; +class CMsvOperation; +class CCoeEnv; + +/////////////////////////////////// +// CBaseMtmUi - MTMUi base API // +/////////////////////////////////// +class CBaseMtmUi : public CBase +/** Provides MTM-specific user interaction, such as editing, viewing, deleting, +and copying of message entries. + +Message client applications use the class to access such functionality polymorphically. +MTM implementers implement a derived class to provide such functionality for +their message protocol. + +The base class is largely an interface definition: it implements little important +functionality itself. For implementers, this documentation defines conditions +that any implementation must fulfil, plus suggested semantics for behaviour. +This still leaves many decisions in the hands of the implementer. A key design +time activity is to define how the particular characteristics of the implemented +protocol are best mapped to the interface. As this class is concerned with +user interfaces, implementers should be sensitive to the look and feel of +the target phone. + +Many functions are required to return an instance of a CMsvOperation-derived +class to provide asynchronous control and monitoring to the caller of the +operation being performed. + +The following are some significant groups of functions: + +Entry manipulation functions: OpenL(), CloseL(), EditL(), and ViewL() are +all available in two overloaded versions. The first version operates on the +current context. The second version operates upon groups of entries specified +by a CMsvEntrySelection argument. All entries must be in same folder and all +of the correct MTM type. The context may change after calling these functions. +Concrete User Interface MTMs can legally ignore any of the entries within +the selection - many may, for example, simply open the first entry. + +Copying and moving functions: the CopyToL(), CopyFromL(), MoveToL(), and MoveFromL() +functions are concerned with copying and moving entries to and from remote +servers. MTMs can implement these functions to provide any user interaction +needed before copying or moving can proceed, such as dialogs to confirm settings; +and, any protocol-specific setup steps that can be done at this stage: for +example, a fax MTM could render messages into the required image format. + +Progress information functions: DisplayProgressSummary() and GetProgress() +convert MTM-specific progress information about some asynchronous operation, +such as message sending, to a human-readable form. The progress information +to pass into these functions is, in general, obtained from an on-going CMsvOperation +by calling CMsvOperation::Progress(). The nature of any information provided +is MTM-specific. + +MTM-specific UI functions: MTM components can offer protocol-specific functionality +not provided by base class interface functions. MTM components define IDs +that correspond to each protocol-specific operation offered, and implement +the InvokeSyncFunctionL() and InvokeAsyncFunctionL() functions to allow clients +to access these operations by passing in the appropriate ID. Two functions +are provided to allow the MTM component to offer both synchronous and asynchronous +functionality. Message client applications can dynamically add user-interface +features for these operations using CBaseMtmUiData::MtmSpecificFunctions(). +MTM developers should document the IDs if they wish to make the operations +available to clients. +@publishedAll +@released +*/ + { +public: + // --- enums --- + /** Progress information buffer length. */ + enum { + /** Defines the maximum buffer length used in GetProgress() to hold progress information. */ + EProgressStringMaxLen=255}; + // + // --- Set up functionality --- + IMPORT_C void SetPreferences(TUint aFlags); + IMPORT_C TUint Preferences() const; + // + // --- Destruction --- + IMPORT_C virtual ~CBaseMtmUi(); + // + // --- Accessor functions --- + IMPORT_C TUid Type() const; + IMPORT_C CBaseMtm& BaseMtm() const; + // + // --- Functions NOT dependent on the current context --- + IMPORT_C virtual CMsvOperation* CreateL(const TMsvEntry& aEntry, CMsvEntry& aParent, TRequestStatus& aStatus); + // + // --- Functions dependent on the current context --- + /** Opens an entry. + + The behaviour that this implies is dependent on the current context: + + 1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only + messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific. + + 2. for service contexts, the function may initiate a connection to obtain the + service contents from the server, completing asynchronously + + 3. for remote folder contexts, dependent on implementation, the function may + initiate a connection to obtain the folder contents from the server, completing + asynchronously + + The returned CMsvOperation object completes when opening is complete. + + Requirements: + + If opening entries is not supported, implementations should leave with KErrNotSupported. + Otherwise, implementations should: + + 1. check aEntry.iType.iUid to ensure that they can open the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + 3. for remote messages, typically, copy the messages to the Inbox + + @param aStatus The request status to be completed when the operation has finished + + @leave KErrNotSupported The User Interface MTM does not support open operations, + or opening is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing open operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* OpenL(TRequestStatus& aStatus) = 0; + /** Closes an entry. The behaviour that this implies is dependent on the current + context: + + 1. for message contexts, this usually closes any launched editors or viewers + + 2. for folder contexts, leaves with KErrNotSupported + + 3. for service contexts, causes closure of a connection to a server + + The returned CMsvOperation object completes when closing is complete. + + Requirements: + + Implementations should: + + 1. check aEntry.iType.iUid to ensure that they can close the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + @param aStatus The request status to be completed when the operation has finished + + @leave KErrNotSupported The User Interface MTM does not support close operations, + or closing is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing close operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* CloseL(TRequestStatus& aStatus) = 0; + /** Edits an entry. + + The behaviour that this implies is dependent on the current + context: + + 1. for message contexts, this usually launches the appropriate message editor, + or returns status KErrReadOnly if the message is not editable + + 2. for remote folder contexts, launches a settings dialog, for example to rename + the folder, completing asynchronously + + 3. for service contexts, launches a service settings dialog, completing asynchronously + + The returned CMsvOperation object completes when editing is complete. + + Requirements: + + Implementations should: + + 1. check aEntry.iType.iUid to ensure that they can edit the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + 3. for remote messages, typically, copy the messages to the Inbox + + 4. follow the leave protocols described in Leave considerations below + + @param aStatus The request status to be completed when the operation has finished + @leave KErrNotSupported The User Interface MTM does not support edit operations, + or editing is inappropriate to the current context + @leave KErrReadOnly Context is read-only + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing edit operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* EditL(TRequestStatus& aStatus) = 0;// Launches editor/settings dialog as appropriate + /** Views an entry. + + For message contexts, this usually launches the appropriate + message viewer. Other context types leave with KErrNotSupported. The returned + CMsvOperation object completes when viewing is complete. + + Requirements: + + Implementations should: + + 1. check aEntry.iType.iUid to ensure that they can view the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + @param aStatus The request status to be completed when the operation has finished + @leave KErrNotSupported The User Interface MTM does not support view operations, + or viewing is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing view operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* ViewL(TRequestStatus& aStatus) = 0;// Launches viewer/settings dialog as appropriate + // + // --- Actions upon message selections --- + // --- Selections must be in same folder and all of the correct MTM type --- + // --- Context may change after calling these functions --- + /** Opens a selection of entries. + + The behaviour that this implies is dependent on the current context: + + 1. for message contexts, OpenL() is the equivalent of EditL(), or for read-only + messages, ViewL(). Whether opening of remote messages is allowed is MTM-specific. + + 2. for service contexts, the function may initiate a connection to obtain the + service contents from the server, completing asynchronously + + 3. for remote folder contexts, dependent on implementation, the function may + initiate a connection to obtain the folder contents from the server, completing + asynchronously + + The returned CMsvOperation object completes when opening is complete. + + Requirements: + + If opening entries is not supported, implementations should leave with KErrNotSupported. + Otherwise, implementations should: + + 1. check aEntry.iType.iUid to ensure that they can open the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + 3. for remote messages, typically, copy the messages to the Inbox + + @param aStatus The request status to be completed when the operation has finished + @param aSelection Selection of message entries + @leave KErrNotSupported The User Interface MTM does not support open operations, + or opening is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing open operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* OpenL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; + /** Closes a selection of entries. + + The behaviour that this implies is dependent on the current context: + + 1. for message contexts, this usually closes any launched editors or viewers + + 2. for folder contexts, leaves with KErrNotSupported + + 3. for service contexts, causes closure of a connection to a server + + The returned CMsvOperation object completes when closing is complete. + + Requirements: + + Implementations should: + + 1. check aEntry.iType.iUid to ensure that they can close the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + @param aStatus The request status to be completed when the operation has finished + @param aSelection Selection of message entries + @leave KErrNotSupported The User Interface MTM does not support close operations, + or closing is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing close operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* CloseL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; + /** Edits a selection of entries. + + The behaviour that this implies is dependent on the current context: + + 1. for message contexts, this usually launches the appropriate message editor, + or returns status KErrReadOnly if the message is not editable + + 2. for remote folder contexts, launches a settings dialog, for example to rename + the folder, completing asynchronously + + 3. for service contexts, launches a service settings dialog, completing asynchronously + + The returned CMsvOperation object completes when editing is complete. + + Requirements: + + Implementations should: + + 1. check aEntry.iType.iUid to ensure that they can edit the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + 3. for remote messages, typically, copy the messages to the Inbox + + 4. follow the leave protocols described in Leave considerations below + + @param aStatus The request status to be completed when the operation has finished + @param aSelection Selection of message entries + @leave KErrNotSupported The User Interface MTM does not support edit operations, + or editing is inappropriate to the current context + @leave KErrReadOnly Context is read-only + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing edit operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* EditL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches editor/settings dialog as appropriate + /** Views a selection of entries. + + For message contexts, this usually launches the appropriate + message viewer. Other context types leave with KErrNotSupported. The returned + CMsvOperation object completes when viewing is complete. + + Requirements: + + Implementations should: + + 1. check aEntry.iType.iUid to ensure that they can view the requested type of + entry and leave with code KErrNotSupported if they cannot + + 2. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + @param aStatus The request status to be completed when the operation has finished + @param aSelection Selection of message entries + @leave KErrNotSupported The User Interface MTM does not support view operations, + or viewing is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing view operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* ViewL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0;// Launches viewer/settings dialog as appropriate + /** Cancels the sending of specified messages. + + @param aStatus The request status to be completed when the operation has finished + @param aSelection Selection of message entries + @leave KErrNotSupported The User Interface MTM does not support cancel operations, + or cancelling is inappropriate to the current context + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing cancel operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* CancelL(TRequestStatus& aStatus, const CMsvEntrySelection& aSelection) = 0; + // + // --- Deletion --- + // --- Deletes entries from the current context, which must be a folder or service of the relevant MTM --- + IMPORT_C virtual CMsvOperation* DeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Deletes selection from current context + // --- Un-deletes entries from the current context, which must be a folder or service of the relevant MTM --- + IMPORT_C virtual CMsvOperation* UnDeleteFromL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);//Un-deletes selection from current context + // --- Deletes service, which need not be the current context --- + IMPORT_C virtual CMsvOperation* DeleteServiceL(const TMsvEntry& aService, TRequestStatus& aStatus); // default implementation simply delegates to the server + // + // --- Message responding --- + /** Creates a reply message to the current message context, and allows the user + to edit it through a message-type specific editor. + + Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the reply. + The parent for the new entry is specified in aDestination. The returned CMsvOperation + object completes when editing the reply is complete. On completion, the context + is set to the reply message. + + Requirements: + + A typical implementation for this function would include the following steps: + + 1. create a new reply entry by calling CBaseMtm::ReplyL() + + 2. call EditL() allow the user to edit the reply + + 3. return a CMsvOperation-derived object to provide asynchronous control and + monitoring of the operation + + If message replies are not supported, implementations should leave with KErrNotSupported. + + @param aDestination The entry to which to assign the reply + @param aPartlist Defines the parts which are to be copied from the original + message into the reply. See CBaseMtm::ReplyL() for details. + @param aCompletionStatus The request status to be completed when the operation + has finished + @leave KErrNotSupported The User Interface MTM does not support reply operations + @leave Other Dependent on implementation + @return If successful, this is an asynchronously completing reply operation. + If failed, this is a completed operation, with status set to the relevant + error code. */ + virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus) = 0; + /** + Creates a forwarded message from the current message context, and allows the user to edit it through a message-type + specific editor. + + Some MTMs may support inclusion of elements, specified by aPartlist, from the original message in the + forwarded message. The parent for the new entry is specified in aDestination. The returned CMsvOperation + object completes when editing the forwarded message is complete. On completion, the context is set to the forwarded message. + + Requirements: + + A typical implementation for this function would include the following steps: + + 1. create a new forwarded message entry by calling CBaseMtm::ForwardL() + + 2. call EditL() allow the user to edit the forwarded message + + 3. return a CMsvOperation-derived object to provide asynchronous control and monitoring of the operation + + If forwarded messages are not supported, implementations should leave with KErrNotSupported. + + @return If successful, this is an asynchronously completing forward message operation. If failed, + this is a completed operation, with status set to the relevant error code. + @param aDestination The entry to which to assign the forwarded message + @param aPartList Defines the parts which are to be copied from the original message into the forwarded message + @param aCompletionStatus The request status to be completed when the operation has finished + @leave KErrNotSupported The User Interface MTM does not support message forwarding operations + @leave Other Dependent on implementation + */ + virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus) = 0; + + // + // --- Copy and move functions --- + // --- Context should be set to folder or entry of this MTM --- + // --- Default implementations imply call the relevant CMsvEntry functions --- + IMPORT_C virtual CMsvOperation* CopyToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to copy to + IMPORT_C virtual CMsvOperation* MoveToL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus);// Context should be MTM folder/service to move to + IMPORT_C virtual CMsvOperation* CopyFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to copy from + IMPORT_C virtual CMsvOperation* MoveFromL(const CMsvEntrySelection& aSelection, TMsvId aTargetId, TRequestStatus& aStatus);// Context should be MTM folder/service to move from + // + // --- Interpret transfer progress --- + IMPORT_C virtual TInt DisplayProgressSummary(const TDesC8& aProgress) const;// Used for display operation summary (usually completed operations). Default implementation returns KErrNotSupported. + IMPORT_C virtual TInt GetProgress(const TDesC8& aProgress, TBuf& aReturnString, TInt& aTotalEntryCount, TInt& aEntriesDone, + TInt& aCurrentEntrySize, TInt& aCurrentBytesTrans) const;// Default implementation returns KErrNotSupported + // + // --- RTTI functions --- + IMPORT_C virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); + IMPORT_C virtual void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); + IMPORT_C virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TRequestStatus& aCompletionStatus, + TDes8& aParameter); + +protected: + // --- Construction --- + IMPORT_C CBaseMtmUi(CBaseMtm& aBaseMtm, CRegisteredMtmDll& aRegisteredMtmDll); + IMPORT_C virtual void ConstructL(); + /** Sets the full path and name of the resource file associated with the User Interface MTM. + + Client applications do not use this function. It is relevant only to implementers of derived classes. + + Requirements: + + The function is called by CBaseMtmUi::ConstructL(), which then loads the resource + file. + + @param aFileName Filename buffer to be filled with the resource file path + and name */ + virtual void GetResourceFileName(TFileName& aFileName) const = 0; + // + // --- Utility functions --- + IMPORT_C CMsvSession& Session() const; + + // Method used for extension: called by non virtual methods that need + // to have a polymorphic behaviour. + IMPORT_C virtual TAny* GetInterface(TUid aUid); + +protected: + // --- Data --- + /** The CBaseMtm-derived object (Client-side MTM) that requested the User Interface + MTM. It is set by the constructor. */ + CBaseMtm& iBaseMtm; + /** Control environment object. It is set by the constructor. */ + CCoeEnv* iCoeEnv; + /** This flag records the preferences as set by SetPreferences(). */ + TUint iFlags; + +private: + // --- Data --- + CRegisteredMtmDll& iRegisteredMtmDll; + TInt iResourceFileOffset; + // Extra data member to allow for future extensions + TAny* iExtensionData; + }; + + +#endif // __MTMUIBAS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtmuids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtmuids.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,155 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ +#if !defined(__MTMUIDS_H__) +#define __MTMUIDS_H__ +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__MTMDEF_HRH__) +#include +#endif + +// capabilities (TUid) +/** +* Maximum message body size. +* @Return type: TInt. +* @publishedAll +* @released +*/ +const TUid KUidMtmQueryMaxBodySize={KUidMtmQueryMaxBodySizeValue}; +/** +* Maximum total size of message. +* @publishedAll +* @released +* @Return type: TInt. +*/ +const TUid KUidMtmQueryMaxTotalMsgSize={KUidMtmQueryMaxTotalMsgSizeValue}; +/** Character widths supported by message type (returned TInt is the sum of the +appropriate values KMtm7BitBody, KMtm8BitBody, KMtm16BitBody, and KMtmBinaryBody). */ + +/** +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySupportedBody={KUidMtmQuerySupportedBodyValue}; +/** +* Are attachments supported. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySupportAttachments={KUidMtmQuerySupportAttachmentsValue}; +/** +* Does the MTM message type have a subject field. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySupportSubject={KUidMtmQuerySupportSubjectValue}; +/** +* Does the MTM support folders. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySupportsFolder={KUidMtmQuerySupportsFolderValue}; +/** +* Off-line operation allowed. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQueryOffLineAllowed={KUidMtmQueryOffLineAllowedValue}; +/** +* Send message. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQueryCanSendMsg={KUidMtmQueryCanSendMsgValue}; +/** +* Receive message. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQueryCanReceiveMsg={KUidMtmQueryCanReceiveMsgValue}; +/** +* Maximum number of recipients (-1 indicates unlimited numbers). +* @Return type: TInt +* @publishedAll +* @released +*/ +const TUid KUidMtmQueryMaxRecipientCount={KUidMtmQueryMaxRecipientCountValue}; +/** +* When using the MTM in Send-As, does a rendered image have to be prepared (i.e.fax). +* @Return type: TBool. +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySendAsRequiresRenderedImage={KUidMtmQuerySendAsRequiresRenderedImageValue}; +/** +* Printer driver UID for rendering the fax image. +* @Return type: TUid +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySendAsRenderingUid={KUidMtmQuerySendAsRenderingUidValue}; +/** +* UID of default message editor. +* @Return type: TUid. +* @publishedAll +* @released +*/ +const TUid KUidMsvMtmQueryEditorUid={KUidMsvMtmQueryEditorUidValue}; +/** +* Does the MTM support BIO messages. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMsvQuerySupportsBioMsg={KUidMtmQuerySupportsBioMsgValue}; +/** +* Does the MTM support scheduled sending. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMsvQuerySupportsScheduling={KUidMtmQuerySupportsSchedulingValue}; +/** +* Does the MTM support the use of recipient type. +* @No return value. +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySupportsRecipientType={KUidMtmQuerySupportsRecipientTypeValue}; +/** +* Support for Sending messages using SendAs. +* If this is supported, then the MTM supports sending messages created through the SendAs API. +* @Return type: TBool. +* @publishedAll +* @released +*/ +const TUid KUidMtmQuerySendAsMessageSendSupport={KUidMtmQuerySendAsMessageSendSupportValue}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtsr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtsr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,504 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MTSR_H__ +#define __MTSR_H__ + +#include +#include +#include +#include +#include + +// forward declarations +class RWriteStream; +class RReadStream; +class RFs; +class CDictionaryFileStore; +class CInstalledMtmGroup; +class CMsvServerEntry; +class TMsvSystemProgress; + +class CBaseServerMtm : public CActive +/** Base class for Server-side MTM components. Server-side MTMs provide all message +transport functionality for a particular messaging protocol. + +MTM implementers implement a derived class to provide such functionality for +their message protocol. Writers of message client applications are never concerned +with this class and its sub-classes, as these are only accessed by the Message +Server. + +Each MTM interprets the generic commands in different ways. For example, a +Fax MTM would transmit a fax when asked to copy a fax from a local folder +to a fax service. For the same function, an IMAP MTM would create a copy of +the message on the remote server and update the message index to show the +copy of the message on the remote server. An important initial design task +is to the map the functions to the functionality provided by the protocol. + +Server-side MTM functions are called by the Message Server as a result of +a client request that requires some remote operation with the MTM's protocol. +The following steps give a simplified view of the usual sequence of events: + +1. the Message Server instantiates a Server-side MTM object through the factory +function + +2. the Message Server calls the appropriate asynchronous function on the Server-side +MTM interface, passing a TRequestStatus argument + +3. the Server-side MTM function typically starts whatever asynchronous communications +it requires and returns + +4. the Server-side MTM is signalled when the asynchronous communications complete, +and handles the result + +5. the Server-side MTM signals the Message Server, through the TRequestStatus +passed earlier + +6. the Message Server deletes the Server-side MTM object + +To qualify this somewhat: + +1. it is up to the Server-side MTM implementation to decide how to translate +data back and forth between the formats used by Message Server (index entry, +message store, binary files), and that required by the protocol; this is another +important design task + +2. depending on the protocol being used, the communications sequence can be of +considerable complexity; typically it requires division into a number of asynchronous +steps + +3. for greater efficiency where further commands are shortly expected, deletion +of the Server-side MTM object can be prevented + +For asynchronous requests, a Server-side MTM should always complete the TRequestStatus +with KErrNone. Any errors should be returned in the progress information. + +Note the following significant groups of functions: + +1. Copy and move from remote functions: CopyToLocalL() and MoveToLocalL() are +called by the Message Server to get a selection of entries from a remote location. +For many protocols, this should be interpreted as message retrieval. For protocols +where messages exist on a remote server, this function is typically used to +download specific messages, after an initial connection has downloaded message +headers. + +2. Copy and move to remote functions: CopyFromLocalL() and MoveFromLocalL() are +called by the Message Server to copy/move a selection of entries to a remote +location. For many protocols, this should be interpreted as message sending. + +3. Copy and move within remote functions: CopyWithinServiceL() and MoveWithinServiceL() +are called by the Message Server to copy a selection of entries within a remote +service. An example of their use might be for a user rearranging messages +within remote folders. +@publishedAll +@released +*/ + { +public: + IMPORT_C ~CBaseServerMtm(); + // + /** Copies a selection of entries from a remote location to a local location. This + will only be meaningful for some protocols. + + Requirements: + + Implementations should provide this function if the messaging protocol supports + retrieval of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + Implementations of this function have three fundamental steps: + + 1. doing the transfer operation using the appropriate communications protocols + + 2. converting protocol-specific data into the three-part storage format (index + entry, message store, binary files) required by the Message Server + + 3. updating entries in the Message Server + + @param aSelection The collection of message index entries for which the copy/moving + is required. + @param aDestination The entry ID to which the selection is to be copied + @param aStatus Asynchronous completion word for the operation + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; + /** Copies a selection of entries from a local location to a remote location. + + Requirements: + + Implementations should provide this function if the messaging protocol supports + retrieval of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + Implementations of this function have three fundamental steps: + + 1. reading entry data + + 2. converting entry data from the Message Server format into that required by + the protocol + + 3. doing the transfer operation using the appropriate communications protocols + + @param aSelection The collection of message index entries for which the copy + is required + @param aDestination The entry ID of the service by which the entries should + be transferred + @param aStatus Asynchronous completion word for the operation + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; + /** Copies a selection of entries within a remote location. + + Requirements: + + Implementations should provide this function if the messaging protocol supports + the ability to copy entries within a remote service. If this is not supported, + implementations should leave with KErrNotSupported. + + @param aSelection The collection of message index entries for which the copy + is required + @param aDestination The server entry ID to which the selection is to be copied + @param aStatus Asynchronous completion word for the operation + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; + /** Deletes each entry in the supplied selection when called by the message Server. + If any of the entries in the selection is a parent entry, then all its children + should also be deleted, recursively to the bottom of the ownership tree. + + Implementations should provide this function if the messaging protocol supports + deletion of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + @param aSelection The collection of entries that are to be deleted. + @param aStatus Asynchronous completion object. + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus)=0; + /** Creates a new remote entry with relevant data when called by the Message Server. + + Implementations should provide this function if the messaging protocol supports + creation of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + As with ChangeL(), the Server-side MTM implementation must decide what information + in the TMsvEntry is relevant to the remote entry, and translate it appropriately + for the specific protocol. Most of the data contained in the TMsvEntry is + specific to the Message Server, and would probably have no direct correlation + with the protocol's own storage format. For example, for a folder, probably + only the name and parent are needed, so if the protocol supports creation + of remote folders, the implementation could: + + 1. check for a folder type entry + + 2. get the folder name and parent details from aNewEntry + + 3. initiate a protocol-specific action to create the remote folder + + @param aNewEntry Data by which to create entry + @param aStatus Asynchronous completion word for the operation. + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus)=0; + /** Updates a remote entry with relevant data when called by the Message Server. + + Implementations should provide this function if the messaging protocol supports + updating of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + The Server-side MTM implementation must decide what information in the TMsvEntry + is relevant to the remote entry, and translate it appropriately for the specific + protocol. Most of the data contained in the TMsvEntry is specific to the Symbian + OS Message Server, and would probably have no direct correlation with the + protocol's own storage format. Some entry data may however be useful. For + example, if the protocol supports remote renaming of folders, the implementation + could: + + 1. check for a folder type entry + + 2. extract the folder name from aNewEntry.iDetails + + 3. check if the folder name has changed by comparing the new name with iDetails + in the index entry currently; if not, complete with KErrNone + + 4. initiate a protocol-specific action to rename the remote folder + + The implementation should also always update the local Message Server index + through CMsvServerEntry::ChangeL(). + + @param aNewEntry Data by which to update entry + @param aStatus Asynchronous completion word for the operation. + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus)=0; + // + /** Executes an MTM-specific operation on a selection of entries when called by + the Message Server. + + The call is made as a response to a client program invoking an MTM-specific + operation through CBaseMtm::InvokeSyncFunctionL()/InvokeAsyncFunctionL(). + The aSelection, aCommand, and aParameter arguments pass the values of the + original aSelection, aFunctionId, and aParameter respectively arguments from + such a call. The use (if any) of the aSelection and aParameter arguments by + the function depends on the command. + + @param aSelection A selection of message entries on which the command is to + be executed + @param aCommand The MTM-specific command to be carried out + @param aParameter Command-specific parameters + @param aStatus Asynchronous completion word for the operation */ + virtual void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus)=0; + // + /** Tests if the Server-side MTM object should be deleted when called by the Message + Server + + It is useful to stop the MTM being deleted when more commands are expected + shortly. This would be the case, for example, after receiving a command to + go online. + + If there are no more commands expected by the Server-side MTM object, then + the function should return EFalse, and the Message Server will delete it. + + @return ETrue: the MTM object should not be deleted EFalse: the MTM object + can be deleted */ + virtual TBool CommandExpected()=0; + // + /** This function is called by the Message Server to get progress information for + the current asynchronous operation. + + The call is made as a response to a client program requesting progress information + through CMsvOperation::ProgressL(). The packing format used in the TDesC8 + is MTM-specific. Only the implementation of the User Interface MTM progress + information functions need to understand the format. + + The progress buffer should have a maximum size of 256 bytes. + + @return Progress information on current asynchronous operation + @see CBaseMtmUi::DisplayProgressSummary() + @see CBaseMtmUi::GetProgress() */ + virtual const TDesC8& Progress()=0; + // + /** Moves a selection of entries from a remote location to a local location. + + Requirements: + + Implementations should provide this function if the messaging protocol supports + retrieval of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + Implementations of this function have three fundamental steps: + + 1. doing the transfer operation using the appropriate communications protocols + + 2. converting protocol-specific data into the three-part storage format (index + entry, message store, binary files) required by the Message Server + + 3. updating entries in the Message Server + + MoveToLocalL() should differ from CopyToLocalL() in additionally deleting + the original remote data. + + @param aSelection The collection of message index entries for which the moving + is required. + @param aDestination The entry ID to which the selection is to be copied/moved + @param aStatus Asynchronous completion word for the operation + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; + /** Moves a selection of entries from a local location to a remote location. + + Requirements: + + Implementations should provide this function if the messaging protocol supports + retrieval of remote entries. If this is not supported, implementations should + leave with KErrNotSupported. + + Implementations of this function have three fundamental steps: + + 1. reading entry data + + 2. converting entry data from the Message Server format into that required by + the protocol + + 3. doing the transfer operation using the appropriate communications protocols + + The implementation of MoveFromLocalL() should differ from CopyFromLocalL() + in additionally deleting the original local data. + + @param aSelection The collection of message index entries for which the move + is required + @param aDestination The entry ID of the service by which the entries should + be transferred + @param aStatus Asynchronous completion word for the operation + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; + /** Moves a selection of entries within a remote location. + + Requirements: + + Implementations should provide this function if the messaging protocol supports + the ability to move entries within a remote service. If this is not supported, + implementations should leave with KErrNotSupported. + + The implementation of MoveWithinServiceL() should differ from CopyWithinServiceL() + in additionally deleting the original data. + + @param aSelection The collection of message index entries for which the move + is required + @param aDestination The server entry ID to which the selection is to be moved + @param aStatus Asynchronous completion word for the operation + @leave KErrNotSupported The Server-side MTM does not support this operation + @leave Other leave codes Dependent on implementation */ + virtual void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus)=0; + + IMPORT_C TInt SystemProgress(TMsvSystemProgress& aOutSysProg); + TInt GetNonOperationMtmData(TNonOperationMtmDataType& aMtmDataType, TPtrC8& aResultBuffer); + +protected: + IMPORT_C CBaseServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry); + /** Handles the completion of any asynchronous requests that it makes. It is called + from the base class RunL() . + + Note that any leaves made by this function result in DoComplete() being called + with the leave code. */ + virtual void DoRunL()=0; + /** Called by the base class RunL() if DoRunL() leaves. + + It should be implemented to handle this error. For example, progress information + could be updated to reflect the problem. + + @param aError The leave code given by DoRunL(). */ + virtual void DoComplete(TInt aError)=0; + // + IMPORT_C TInt Extension_(TUint aExtensionId, TAny *&a0, TAny *a1); + // +private: + // from CActive + IMPORT_C void RunL(); + IMPORT_C TInt RunError(TInt aError); + // +protected: + /** The entry on which to operate. It is set in the constructor. + + The destructor deletes this member. */ + CMsvServerEntry* iServerEntry; + + // Method used for extension: called by non virtual methods that need + // to have a polymorphic behaviour. + IMPORT_C virtual TAny* GetInterface(TUid aUid); + // +private: + CRegisteredMtmDll& iRegisteredMtmDll; + +private: + // Extra data member to allow for future extensions + TAny* iExtensionData; + }; + + +class CServerMtmDllRegistry : public CMtmDllRegistry +/** +@publishedAll +@released +*/ + { +friend class CMtmRegistryControl; +public: + IMPORT_C static CServerMtmDllRegistry* NewL(RFs& aFs,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=KMsvDefaultTimeoutMicroSeconds32); + IMPORT_C ~CServerMtmDllRegistry(); + IMPORT_C CBaseServerMtm* NewServerMtmL(TUid aMtmTypeUid, CMsvServerEntry* aInitialEntry); + // +protected: + CServerMtmDllRegistry(RFs& aFs,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); + // +private: + CBaseServerMtm* NewMtmL(const RLibrary& aLib, CMsvServerEntry* aServerEntry, CRegisteredMtmDll& aReg) const; + }; + + +class CInstalledMtmGroupArray : public CArrayPtrFlat +/** +@internalComponent +@released +*/ + { +public: + CInstalledMtmGroupArray(); + ~CInstalledMtmGroupArray(); + void AddInstalledMtmGroupL(CInstalledMtmGroup* aInstalledMtmGroup); + }; + +//********************************** +// CMsvMtmCache +//********************************** + + +//********************************** +// CMtmRegistryControl +//********************************** + +class CMtmRegistryControl : public CBase, public MRegisteredMtmDllObserver +/** +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMtmRegistryControl* NewL(RFs& anFs,CServerMtmDllRegistry& aServerMtmDllRegistry); + IMPORT_C ~CMtmRegistryControl(); + + IMPORT_C TInt InstallMtmGroup(const TDesC& aFullName,TUid& aMtmTypeUid); + IMPORT_C TInt FullNameToMtmTypeUid(const TDesC& aFullName,TUid& aMtmTypeUid) const; + IMPORT_C TInt DeInstallMtmGroup(TUid aMtmTypeUid); // returns error on storing registry + + IMPORT_C TInt UseMtmGroup(TUid aMtmTypeUid); + IMPORT_C TInt ReleaseMtmGroup(TUid aMtmTypeUid); + IMPORT_C TBool IsInUse(TUid aMtmTypeUid) const; + + IMPORT_C TInt FillRegisteredMtmDllArray(TUid aMtmDllTypeUid,CRegisteredMtmDllArray& aRegisteredMtmDllArray,TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=0); // Fill array with Dlls whose second uid is aMtmDllTypeUid + IMPORT_C CMtmGroupData* GetMtmGroupDataL(TUid aMtmTypeUid) const; + const CMtmGroupData& GetMtmGroupDataReferenceL(TUid aMtmTypeUid) const; + + IMPORT_C void StoreRegistryL() const; + IMPORT_C void RestoreRegistryL(); + + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + +private: + CMtmRegistryControl(RFs& anFs,CServerMtmDllRegistry& aServerMtmDllRegistry); + void ConstructL(); + TInt MtmTypeUidToIndex(TUid aMtmTypeUid) const; + TInt UidTypeToIndex(TUidType aUidType) const; + void DoInstallMtmGroupL(const TDesC& aFullName,TUid& aMtmTypeUid); + CMtmGroupData* ReadDataFileStoreL(const TDesC& aFullName) const; + void DoDeInstallMtmGroupL(TUid aMtmTypeUid); + void DoInternalizeL(RReadStream& aStream); + void AddInstalledMtmGroupL(CInstalledMtmGroup* aInstalledMtmGroup); + void RemoveInstalledMtmGroup(TUid aMtmTypeUid); + TBool IsResFileL(const TDesC& aFullName) const; + TUid DoFindMtmTypeUidL(const TDesC& aFullName) const; + + CMtmGroupData *LoadMTMFileL(const TDesC& aFullName, TUid &aUid); + CMtmGroupData *LoadDatFileL(const TDesC& aFullName, TUid &aUid); + CMtmGroupData *LoadResFileL(const TDesC& aFullName, TUid &aUid); +private: + RFs& iFs; + CInstalledMtmGroupArray iInstalledMtmGroupArray; + CServerMtmDllRegistry& iServerMtmDllRegistry; + }; + +#endif // __MTSR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtud.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtud.rh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,31 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +STRUCT MTUD_FUNCTION + { + LTEXT functiontext="";// Cannot be longer that 40 characters + LONG command=0; + LONG key; + BYTE keymodifiers=EMtudCtrl; + LONG flags=0; + BYTE type=0; + } + +STRUCT MTUD_FUNCTION_ARRAY + { + STRUCT functions[]; + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtudcbas.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtudcbas.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,362 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__MTUDBAS_H__) +#define __MTUDBAS_H__ + +#if !defined(__MSVSTD_H__) +#include +#endif + +#if !defined(__MSVREG_H__) +#include +#endif + +#if !defined(__MTCLREG_H__) +#include +#endif + +#if !defined(__BARSREAD_H__) +#include +#endif + +// Forward references +class CFbsBitmap; +class CCoeEnv; + +/////////////////////////////////////////////////// +// CBaseMtmUiData - MTM Ui data layer base API // +/////////////////////////////////////////////////// +class CBaseMtmUiData : public CBase +/** Base class for UI Data MTM components. + +CBaseMtmUiData-derived classes allow message client applications to customise +dynamically their user interfaces for a particular message type. For example, +if a message client application currently had a fax entry selected, then it +could use the fax MTM's concrete class to get information on the menus and +icons that it should display. + +Specifically, functionality falls into the following three areas: + +1. supplying MTM-specific icons for Message Server entries + +2. supplying user interface text, e.g. for menus, for MTM-specific operations + +3. providing checks that MTM functions are suitable for use on an entry. It is +intended that client applications will use these functions to select dynamically +the user interface features available dependent on the entry currently selected +within the application. For example, menu items that do not apply to particular +entries could be greyed out. Note that OperationSupportedL() performs a similar +function for MTM-specific functions. Implementations should determine if the +operation is supported by checking the properties of the entry, such as its +type. If the operation is not appropriate on the entry, then the aReasonResourceId +argument is set to the ID of a string in the UI Data MTM's resource file +that explains why not. Otherwise, aReasonResourceId is 0. + +Message client applications use the class to access such functionality polymorphically. +MTM implementers implement this class to provide such functionality for their +message protocol. +@publishedAll +@released +*/ + { +public: + // --- Types --- + /** Defines an array of icon bitmaps for the UI Data MTM. + + It is used in the definition of CBaseMtmUiData::iIconArrays. */ + typedef CArrayPtr CBitmapArray; + // + // --- Inline class --- + class TMtmUiFunction + /** Provides the interface for clients to access MTM-specific functions, and present + these functions to the user. A message client application can use this information to customise the UI. + + The class encapsulates information relating to an MTM-specific operation: + + 1. human-readable name: for display on the UI + + 2. ID: used to invoke the operation through the CBaseMtmUi::InvokeSyncFunctionL()/InvokeAsyncFunctionL() functions on the associated User Interface MTM + + 3. a suggested hot-key that the UI should support for the operation + + 4. flags that describe further operation characteristics. +@publishedAll +@released +*/ + { + friend class CBaseMtmUiData;// For access to constructor + public: + // --- Constants --- + /** Enum to define UI Data base class constants. */ + enum + { + /** Maximum length for operation caption. Used in defining iCaption. */ + ECaptionMaxLen=40 + }; + + public: + // --- Construction --- + IMPORT_C TMtmUiFunction(TResourceReader& aResourceReader); + IMPORT_C TMtmUiFunction(const TMtmUiFunction& aFunc); + + private: + // --- Private functions --- + void SetModifiersFromResourceDefinition(TInt aResourceFileModifiers); + + public: + // --- Data --- + /** String, suitable for a menu, describing the operation. */ + TBuf iCaption; + /** Character code for a suggested hotkey for the operation. */ + TInt iPreferredHotKeyKeyCode; + /** Suggested key modifiers for the hotkey. */ + TInt iPreferredHotKeyModifiers; + /** The ID that can be used to invoke the operation. */ + TInt iFunctionId; + /** Flags setting location characteristics of the operation. */ + TUint8 iFunctionType; // see MTUD.HRH + /** Flags setting characteristics of the operation. */ + TInt iFlags; // see MTUD.HRH + }; + // + // --- Destruction --- + IMPORT_C virtual ~CBaseMtmUiData(); + // + // --- Accessor functions --- + IMPORT_C TUid Type() const; + // + // --- Context icons --- + /** Gets an array of bitmaps relevant to the passed context entry. + + The bitmaps within the array should be representations of the same bitmap at various sizes. + + The aStateFlags argument indicates the user interface state, for example, + "open", of the entry. + + Requirements: + + Implementations should check the type of the context, using TMsvEntry::iType::iUid, + and the passed state, and return an appropriate bitmap array. + + @param aContext Context entry to return the icons for. + @param aStateFlags Flasgs indicating the user interface state of the entry. + @return Bitmap array for the given context.. */ + virtual const CBitmapArray& ContextIcon(const TMsvEntry& aContext, TInt aStateFlags) const = 0; + // + // --- MTM-Specific function information (e.g. for dynamically-added menu items) --- + IMPORT_C const CArrayFix& MtmSpecificFunctions() const; + IMPORT_C TBool FunctionRecognised(TInt aFunctionId) const; + // + // --- Provide context-specific function information --- + /** Tests if an entry can be created as a child. + + @param aParent The entry under which aNewEntry should be created. + @param aNewEntry The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanCreateEntryL(const TMsvEntry& aParent, TMsvEntry& aNewEntry, TInt& aReasonResourceId) const = 0; + /** Tests if a delete operation is supported. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanDeleteFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if the entry can be undeleted. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + IMPORT_C virtual TBool CanUnDeleteFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const; + /** Tests if the service entry can be deleted. + + @param aService The service entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanDeleteServiceL(const TMsvEntry& aService, TInt& aReasonResourceId) const = 0; + /** Tests if an entry can be replied to. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanReplyToEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if an entry can be forwarded. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanForwardEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if the entry can be edited. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanEditEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if an entry can be viewed. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanViewEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if an entry can be opened. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanOpenEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if a close operation is supported. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID, or 0 if operation + is supported. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanCloseEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if a copy from or move to operation is supported. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanCopyMoveToEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests whether a copy from or move from operation is supported. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID or 0. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanCopyMoveFromEntryL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + /** Tests if the current operation on the entry can be cancelled. + + @param aContext The entry to which the operation applies. + @param aReasonResourceId On return, a resource string ID, or 0 if operation + is supported. + @return ETrue, if the operation is appropriate on the entry; + EFalse, if the operation is NOT appropriate on the entry. */ + virtual TBool CanCancelL(const TMsvEntry& aContext, TInt& aReasonResourceId) const = 0; + // + // --- RTTI --- + /** Tests if an MTM-specific operation is appropriate to the specified entry. The + operation specified must have been obtained from a call to MtmSpecificFunctions(). + + It is intended that client applications will use this function to select dynamically + the MTM-specific user interface features available dependent on the entry + currently selected within the application. + + Requirements: + + Implementations should check the type of the context, using TMsvEntry::iType::iUid, + and use any other information required available from the context, to determine + if the operation is supported. + + @param aOperationId ID of operation to query. + @param aContext The entry to which the operation applies. + @return KErrNone: operation is appropriate to User Interface MTM and entry. + Other: if the operation is not appropriate on the entry, then this is the + ID of a string in the UI Data MTM's resource file that explains why not. */ + virtual TInt OperationSupportedL(TInt aOperationId, const TMsvEntry& aContext) const = 0; // returns 0 if operation *IS* supported, otherwise a resource ID for the reason text + /** Queries if the MTM supports a particular capability, specified by a UID. + + Requirements: + + Implementations should check aCapability for the standard capability values + and return a suitable response in aResponse. If aFunctionId is unknown, return + KErrNotSupported. + + @param aFunctionId UID of capability to be queried + @param aResponse Response value. The format of the response varies according + to the capability. + @return KErrNone: aFunctionId is a recognised value and a response is returned + KErrNotSupported: aFunctionId is not a recognised value */ + virtual TInt QueryCapability(TUid aFunctionId, TInt& aResponse) const = 0; + /** Provides status text for the sending state of the entry. + + @param aContext Entry to query + @return Descriptor containing status text. */ + virtual HBufC* StatusTextL(const TMsvEntry& aContext) const = 0; + +protected: + // --- Construction --- + IMPORT_C CBaseMtmUiData(CRegisteredMtmDll& aRegisteredMtmDll); + IMPORT_C void ConstructL(); + /** Initialises bitmaps and function information. + + Client applications do not use this function. It is relevant only to implementers of derived classes. + + Requirements: + + This function is called by the base class ConstructL() function. Implementations + should provide this function to: + + 1. insert MTM-specific icon bitmap arrays into the iIconArrays array data member + + 2. insert MTM-specific operation information into the iMtmSpecificFunctions array + data member */ + virtual void PopulateArraysL() = 0; // Should populate iCapabilities, iMtmSpecificFunctions and iIconArrays + /** Gets the resource file name. + + Client applications do not use this function. It is relevant only to implementers of derived classes. + + Requirements: + + Each UI Data MTM can have a resource file associated with it. Implementations + should set aFilename to the full path and name of this resource file. The + function is called by CBaseMtmUiData::ConstructL(), which then loads the resource + file. + + @param aFileName Filename buffer to be filled with the resource file path + and name */ + virtual void GetResourceFileName(TFileName& aFileName) const = 0; + // + // --- Utility --- + IMPORT_C void ReadFunctionsFromResourceFileL(TInt aResourceId);// Up to clients to call this if necessary + IMPORT_C void CreateBitmapsL(TInt aNumZoomStates, const TDesC& aBitmapFile, TInt aStartBitmap, TInt aEndBitmap); + CFbsBitmap* CreateBitmapL(const TDesC& aFileName, TInt aId) const; + + // Method used for extension: called by non virtual methods that need + // to have a polymorphic behaviour. + IMPORT_C virtual TAny* GetInterface(TUid aUid); + +protected: + // --- Data --- + /** Control environment object. It is set by the constructor. */ + CCoeEnv* iCoeEnv; + /** The array that stores the arrays of icon bitmaps for the UI Data MTM. Items + are added to the array by PopulateArraysL(). */ + CArrayPtr* iIconArrays; + /** The array that stores MTM-specific function information for the UI Data MTM. + Items are added to the array by ReadFunctionsFromResourceFileL(). */ + CArrayFix* iMtmSpecificFunctions; + +private: + // --- Data --- + TInt iResourceFileOffset; + CRegisteredMtmDll& iRegisteredMtmDll; // Required in order to call ReleaseLibrary() + + // Extra data member to allow for future extensions + TAny* iExtensionData; + }; + + +#endif // __MTUDBAS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtudreg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtudreg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,87 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined __MTUDREG_H__ +#define __MTUDREG_H__ + +#if !defined (__MTCLREG_H__) +#include +#endif + +class CBaseMtmUiData; + +/** UI Data MTM factory function. + +A concrete UI Data MTM must implement an exported factory function of this +type. It should return an instance of the CBaseMtmUiData-derived class that +provides the implementation. The factory function is called by the UI Data +MTM registry when a client requests this UI Data MTM. + +A CBaseMtmUiData-derived class typically provides a NewL() function, which +the factory function calls. + +The factory function is called by ordinal. The ordinal of the function must +match that recorded in the MTM's registry information. + +The CRegisteredMtmDll& argument passes the registration data for the MTM DLL. + +The return value is a newly-created instance of the CBaseMtmUi-derived class +for the User Interface MTM. + +The factory function should leave if it cannot create the object. + +For example, a UI Data MTM whose concrete class was CEgMtmUiData could define +a suitable factory function as: + +@code +EXPORT_C CBaseMtmUiData* NewEgMtmL(CRegisteredMtmDll& aRegisteredMtmDll) + { + return CEgMtmUiData::NewL(aRegisteredMtmDll); + } +@endcode */ +typedef CBaseMtmUiData* MtmUiDataFactoryFunctionL(CRegisteredMtmDll&); + +// Client side MTM UI data registry + +class CMtmUiDataRegistry : public CObserverRegistry +/** Accesses the UI Data MTM registry. + +This registry holds details of the all the +UI Data MTMs currently available on the system. Message client applications +use this class to get a CBaseMtmUiData-derived object by which to access UI +Data MTM functionality. + +Note that the base class CMtmDllRegistry provides functions for discovering +what MTMs are present in the registry. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMtmUiDataRegistry* NewL(CMsvSession& aMsvSession, + TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)); + virtual ~CMtmUiDataRegistry(); + IMPORT_C CBaseMtmUiData* NewMtmUiDataLayerL(const TUid& aMtmTypeUid); + // +protected: + CMtmUiDataRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); + // +private: + CBaseMtmUiData* NewMtmL(const RLibrary& aLib, CRegisteredMtmDll& aReg) const; + }; + + + +#endif // __MTUDREG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mtuireg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mtuireg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,92 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// MTM client-side MTMUI registry class +// +// + +#if !defined __MTUIREG_H__ +#define __MTUIREG_H__ + + +#if !defined (__E32BASE_H__) +#include // CActive, TFileName etc. +#endif + +#if !defined (__MTCLREG_H__) +#include +#endif + +class CBaseMtmUi; + +/** UI MTM factory function. + +A concrete User Interface MTM must implement an exported factory function of +this type. It should return an instance of the CBaseMtmUi-derived class that +provides the implementation. The factory function is called by the User Interface +MTM registry when a client requests this User Interface MTM. + +A CBaseMtmUi-derived class typically provides a NewL() function, which the +factory function calls. + +The factory function is called by ordinal. The ordinal of the function must +match that recorded in the MTM's registry information. + +For example, a User Interface MTM whose concrete class was CEgMtmUi could +define a suitable factory function as: + +@code +EXPORT_C CBaseMtmUi* NewEgMtmUiL(CBaseMtm& aMtm, CRegisteredMtmDll& aRegisteredDll) + { + return CEgMtmUi::NewL(aMtm, aRegisteredDll); + }@endcode + +@param aBaseMtm The CBaseMtm requesting the object. +@param aRegisteredMtmDll Registration data for the MTM DLL. +@return A newly-created instance of the CBaseMtmUi-derived class +for the User Interface MTM. +@leave Any The factory function should leave if it cannot create the object. */ +typedef CBaseMtmUi* MtmUiFactoryFunctionL(CBaseMtm&, CRegisteredMtmDll&); + +// Client side MTM registry + +class CMtmUiRegistry : public CObserverRegistry +/** Accesses the User Interface MTM registry. + +This registry holds details of the +all the User Interface MTMs currently available on the system. Message client +applications use this class to get a CBaseMtmUi-derived object by which to +access User Interface MTM functionality. + +Note that the base class CMtmDllRegistry provides functions for discovering +what MTMs are present in the registry. +@publishedAll +@released +*/ + { +public: + IMPORT_C static CMtmUiRegistry* NewL(CMsvSession& aMsvSession, + TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32=TTimeIntervalMicroSeconds32(30000000)); + virtual ~CMtmUiRegistry(); + IMPORT_C CBaseMtmUi* NewMtmUiL(CBaseMtm& aMtm); + // +protected: + CMtmUiRegistry(CMsvSession& aMsvSession, TTimeIntervalMicroSeconds32 aTimeoutMicroSeconds32); + // +private: + CBaseMtmUi* NewMtmL(const RLibrary& aLib, CBaseMtm& aMtm, CRegisteredMtmDll& aReg) const; + }; + + + +#endif // __MTUIREG_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mturutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mturutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MTURUTILS_H__ +#define __MTURUTILS_H__ + +#include + +class MturUtils +/** Utility class that is used to start an application to +edit a specified message. + +@publishedAll +@released +*/ +{ +public: + IMPORT_C static void LaunchEditorL(TMsvId aId); + IMPORT_C static void LaunchEditorAndWaitL(TMsvId aId); + IMPORT_C static void LaunchEditorL(TMsvId aId, RThread& aThread, TRequestStatus& aStatus); +}; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mwappluginsp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mwappluginsp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,112 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MWAPPLUGINSP_H__ +#define __MWAPPLUGINSP_H__ + +// System includes +// +#include + +// Forward class declarations +// +class CDocumentNode; +class CNode; +class CDTDNode; +class CXmlElement; +class CAttributeLookupTable; + + +typedef TAny CWmlLibrary; + + +//##ModelId=3B666FA402F4 +class MWapPluginSP +/** +@publishedAll +@deprecated +*/ + { +public: + +/** + Intended Usage : Resets the content data pointers in the given document + node and any dependents. This could also reset the data pointer in an + associated data dictionary node and its client document nodes. + @since 6.0 + @param aDocumentNode The pointer to the document root node + @param aDataPtr The pointer to the new data content + @pre None + @post The data pointers in the specified document node and + dependents have been set to the new data + */ + //##ModelId=3B666FA40331 + virtual void ResetDocumentNodeData(CDocumentNode* aDocumentNode, TAny* aDataPtr) const =0; + +/** + Intended Usage : Gets hold of the actual node that holds the data for the + specified document node. The document data may actually be shared amongst + several document nodes and actually held in the data dictionary. + @since 6.0 + @param aDocumentNode The pointer to a document node + @return A pointer to node that actual holds the data. + */ + //##ModelId=3B666FA4032C + virtual CNode& DataStorageNode(const CDocumentNode* aDocumentNode) const =0; + +/** + Intended Usage : Preload the specified DTD for validating recieved WML + and WMLC decks. The document data handler needs to call this as soon as it + knows what type of DTD the document is using. When the document completes, + this DTD will be used to validate it before the 100% complete message is + passed up to the engine observer. + @since 6.0 + @param aDocType The specified DTD type + @param aDTDURL The URL of the DTD to be fetched + @param aDocRootNode The root node of the document to be validated + @return A pointer to the DTD if the specified DTD is available, + otherwise NULL. + @todo Add the pre and post conditions. + @pre None + @post Unspecified + */ + //##ModelId=3B666FA40328 + virtual const CDTDNode* PrepareDTDL(const TDesC& aDocType, + const TDesC& aDTDURL, + const CDocumentNode* aDocRootNode) =0; + +/** + Intended Usage : Provide a CWmlLibrary object. This object is ready to + process data and build a document tree to the given root node. + @since 6.0 + @warning The CWmlLibrary object is owned by the WAP Engine. + @param aDocRootNode A pointer to the root node where the document + tree is to be built. + @return A pointer the CWmlLibrary object. + */ + //##ModelId=3B666FA40326 + virtual CWmlLibrary* WmlLibL(CXmlElement* aDocRootNode) =0; + +/** + Intended Usage : Gets the Attribute Look Up Table. + @since 6.0 + @return A reference to the Attribute Look Up Table. + */ + //##ModelId=3B666FA4031C + virtual CAttributeLookupTable& AttributeLUT() =0; + + }; + +#endif // __MWAPPLUGINSP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/mwbxmlconverterobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/mwbxmlconverterobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __MWBXMLCONVERTEROBSERVER_H__ +#define __MWBXMLCONVERTEROBSERVER_H__ + +// System includes +// +#include + +//##ModelId=3B6678E0000E +class MWbxmlConverterObserver +/** +@publishedAll +@deprecated +*/ + { +public: // Methods + + //##ModelId=3B6678E00024 + virtual TInt HandleWbxmlOutputL(const HBufC8& aBuffer) = 0; + + //##ModelId=3B6678E00026 + virtual TInt HandleWbxmlOutputL(HBufC8& aBuffer) = 0; + + //##ModelId=3B6678E0002D + virtual TInt HandleWbxmlOutputL(HBufC8* aBuffer) = 0; + + //##ModelId=3B6678E0002F + virtual TInt HandleWbxmlOutputL(TUint32 aSource) = 0; + + //##ModelId=3B6678E00022 + virtual void HandleWbxmlEncodingUpdateL(HBufC8* aCharacterEncoding) = 0; + +private: // Methods + + //##ModelId=3B6678E00018 + IMPORT_C virtual void MWbxmlConverterObserver_Reserved1(); + + }; + +#endif // #define __MWBXMLCONVERTEROBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obex.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obex.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef OBEX_H +#define OBEX_H + +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // OBEX_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,243 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXBASE_H +#define __OBEXBASE_H + +#include +#include + +class CObexTransportControllerBase; +class TObexTransportInfo; +class CObexPacket; +class CObexNotifyHandlerBase; + +/** +@publishedAll +@released + +This class is the common base class for any object which wishes +to use the Obex Server or Client. +The class which owns a CObexClient or CObexServer must be provide an object +derived from this class to handle the call from the Server/Client for a request +for a Password. +@see CObex::SetCallBack +*/ +class MObexAuthChallengeHandler + { +public: + /** + Indicates that the server/client has received an Authentication challenge. The challenge + can only be responded to once a password has been retrieved by some means and passed + back to the calling class. The password is passed back via CObex::UserPasswordL + @param aRealm This will contain the Realm specified by the unit forcing the + Authentication, if no UserID was supplied then this parameter will be of zero length. + */ + virtual void GetUserPasswordL(const TDesC& aRealm) = 0; + + /** + Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. + @param aInterface UID of the interface to return + @param aObject the container for another interface as specified by aInterface + */ + IMPORT_C virtual void MOACH_ExtensionInterfaceL(TUid aInterface, void*& aObject); + }; + +/** +This class is the common base class for CObexClient and CObexServer. It is +an abstract class and cannot be instantiated in itself. However, it does +contain user functionality common to both client and server connections. + +Provides the basic OBEX transport functionality (sending and receiving +files) +Client and server provide the more specialied APIs for +- initiation or response to puts & gets +- (possible) handling of more generalised 'objects' (prob. with data buffered through a file). + +This class is not designed for user derivation + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObex) : public CBase, protected MObexNotify + { +public: + /** + Describes the information set or received in a SETPATH command. + + The first bit of iFlags, 0, can be set to indicate to the receiver of SETPATH to backup a level before applying the path name. + The second bit of iFlags, 1, can be set to indicate to the receiver of SETPATH to NOT create the directory if it doesn't exist. + The iConstants variable is always set to zero as it is reserved. + The iName variable indicates the directory to create or go to, and does not include the root directory of the receiver (i.e. + if the directory to be set is C:\notes then iName is set to "notes"). + If a name is not set then set CObex::TSetPathInfo::iNamePresent to false. + */ + NONSHARABLE_CLASS(TSetPathInfo) + { + public: + IMPORT_C TSetPathInfo(); + TSetPathInfo(const TObexSetPathData& aData); + IMPORT_C TBool Parent() const; + TUint8 iFlags; + TUint8 iConstants; + TBuf iName; + /** Whether iName is present in this SETPATH info */ + TBool iNamePresent; + private: + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + + /** + Current obex connection state + In general, the further through the enum the values are, + the further through the connection process the state machine + will be. + */ + enum TConnectState + { + EConnIdle, /** Nothing is happening */ + EConnTransport, /** Transport Link connected not yet established true Link */ + EConnObex, /** full connection established */ + ESimpleConnRequest, /** Connect without Auth has been sent by ClientReceived by Server */ + EConnChallRxed, /** Server has issued a challenge, to a Client cionnect */ + ESimpleConnChallIssued, /** Server, received Simple Connect but Server Challenge issued */ + EChallConnRequested, /** Connect with Auth has been sent by Client/Received by Server */ + EChallConnChallIssued, /** Server has sent a Challenge & Resp to a Client EChallConnRequest */ + EWaitForFinalResponse, /** Client, waiting for final success/fail not chall-response expected + Server, Waiting for final Resp fromm Client to Challenge */ + EFinalResponseReceived, /** Server, the final response has been received */ + EFinalChallRxed, /** Server, Client connect with challenge, Server responds with challenge, Client re-issued original/new challenge */ + EWaitForUserInput, /** waiting for the user */ + EDropLink /** drop the link */ + }; + + /** + The Obex operation currently being performed. + */ + enum TOperation + { + EOpConnect = 0x00, /** Connect */ + EOpDisconnect = 0x01, /** Disconnect */ + EOpPut = 0x02, /** Put */ + EOpGet = 0x03, /** Get */ + EOpSetPath = 0x05, /** SetPath */ + EOpAbort = 0xFF, /** Abort - must fit in one pkt so final bit is always set */ + EOpAbortNoFBit = 0x7F, /** Abort (internal, never transmitted) */ + EOpGetResponse = 0xFD, /** Internal - not actually an obex operation. */ + EOpIdle = 0xFE, /** Internal - not actually an obex operation. */ + }; + + /** + Flags to suppress the authentication elements of the authentication challenge header. + */ + enum TObexSuppressedAuthElements + { + EObexNoSuppressedAuthElements = 0x00, + EObexSuppressChallengeOptionsAuthElement = 0x01, + EObexSuppressRealmAuthElement = 0x02, + EObexSuppressAllAuthElements = EObexSuppressChallengeOptionsAuthElement | EObexSuppressRealmAuthElement // Must be last + }; + + virtual ~CObex(); + IMPORT_C void SetCallBack(MObexAuthChallengeHandler& aCallBack); + IMPORT_C TBool IsConnected() const; + IMPORT_C TBool IsStrictPeer() const; + IMPORT_C const TObexConnectInfo& LocalInfo() const; + IMPORT_C TInt SetLocalWho(const TDesC8& aInfo); + IMPORT_C const TObexConnectInfo& RemoteInfo() const; + IMPORT_C void SuppressAuthenticationHeaderElements(TObexSuppressedAuthElements aSuppressedObexAuthElements); + + // Implementation of MObexNotify Interface + /** + @internalTechnology + */ + virtual void Process(CObexPacket& aPacket); + /** + @internalTechnology + */ + virtual void Error(TInt aError) ; + /** Call back to start the obex session + @internalTechnology + */ + virtual void TransportUp(); + /** + @internalTechnology + */ + virtual void TransportDown(TBool aForceTransportDeletion); + + virtual void UserPasswordL( const TDesC& aPassword) = 0; + IMPORT_C void RemoteAddr(TSockAddr& anAddr); + + TConnectState GetConnectState() const; + + IMPORT_C TBool IsAuthenticating() const; + +protected: + CObex(); + virtual void ConstructL(TObexTransportInfo& aObexTransportInfo); + virtual TInt ParseConnectPacket(CObexPacket& aPacket) = 0; + void SetConnectState(TConnectState aNewState); + IMPORT_C TConnectState ConnectState() const; // same as GetConnectState - has to be maintained here for BC + virtual void OnPacketReceive(CObexPacket& aPacket) =0; + virtual void OnError(TInt aError) =0; + virtual void OnTransportUp() =0; + virtual void OnTransportDown() =0; + void ProcessChallengeL(const TObexInternalHeader& hdr); //process the received challenge + void ProcessChallResponseL(const TObexInternalHeader& hdr); //process the response to challenge + TInt GenerateChallenge(CObexPacket& aPacket); //generate a challenge + void PrepareChallResponseL(const TDesC& aPassword); //generate a response a respose to challenge + //after user Password input + void ForcedTransportDown(); + void ControlledTransportDown(); + void RemoteInfoCleanup(); + void CObex::CancelObexConnection(); +protected: + TConnectState iConnectState; + CObexTransportControllerBase* iTransportController; + TObexConnectInfo iLocalInfo; + TObexConnectInfo iRemoteInfo; + MObexAuthChallengeHandler* iCallBack; + TNonce iOutgoingNonce; //nonce used when challenging + TNonce iIncomingNonce; //nonce used when receiving a challenge + HBufC8* iChallPassword; //password used when challenging + HBufC8* iRespPassword; //password used when responding to a challenge + HBufC8* iRxChallenge; + TBuf8 iOutgoingChallResp;//response to the previously issued challenge + //16 nonce, 16 digest resp, 20 UserID, 3*(tag+size) + TBuf8 iIncomingChallResp;//response received from previous challenge + TBuf8 iIncomingRequestDigest; + HBufC* iRemoteUID; //UID of remote device + HBufC* iRemoteRealm;//Realm of remote device + CObexAuthenticator* iAuthEngine; + TBool iChallenge; //to challenge or not to challenge? + TBool iUserIDRequested; //does the challenge insist that a UserID is returned + TBool iReserved; //released boolean now available for future use + TOperation iCurrentOperation; + CObexNotifyHandlerBase* iNotifyHandler; + TUint iSuppressedObexAuthElements; + }; + +#endif // __OBEXBASE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexbaseobject.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexbaseobject.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,147 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXBASEOBJECT_H +#define __OBEXBASEOBJECT_H + +#include +#include + +const TUint32 KConnIDInvalid = 0xffffffff; + +/** +Objects of this class are used to describe the objects to be transferred and +those received via Obex. +Consists of a number of attributes describing the object, along with +methods to set them. CObexBaseObject is an abstract base class, which defines +attribute setting and transferring functionality, but does not specify the +storage mechanism for the data part (called the object body) of the object. +This body part is defined in derived classes. + +Object description attributes are tracked for validity automatically, so +that only valid attributes are sent to the remote machine. Also has the +concept of "header masks". This selects which of the various attributes +will actually be sent out/read in when the object is used in an operation +with the remote machine. Objects default to transferring all valid +attributes, use the header mask if restriction is required on the headers +exchanged. + +See the various derived classes for description of object body +representation. + +The common attributes are defined to be as close to the underlying OBEX +headers as usefully possible, hence any OBEX header specified as a Unicode +string (e.g. Name) translate to TDes (variant) EPOC descriptors, "byte +sequences" (e.g. Type) are TDes8 (or ASCII invariant), and byte and 32 bit +integers (e.g. Length) are TUint32s. + +This class is not designed for user derivation (ie. outside of this dll). + +@see CObexHeader +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexBaseObject) : public CBase + { +// required for access to iValidHeaders in CObexServer::CheckForConnectionID +friend class CObexServer; + +public: + virtual ~CObexBaseObject(); + IMPORT_C void SetHeaderMask(const TObexHeaderMask aHeaderMask); + IMPORT_C void SetNameL(const TDesC& aDesc); + IMPORT_C void SetTypeL(const TDesC8& aDesc); + IMPORT_C void SetLengthL(const TUint32 aLength); + IMPORT_C void SetTimeL(const TTime aLocalTime); + IMPORT_C void SetDescriptionL(const TDesC& aDesc); + IMPORT_C void SetTargetL(const TDesC8& aDesc); + IMPORT_C void AddHttpL(const TDesC8& aDesc); + IMPORT_C void SetAppParamL(const TDesC8& aDesc); + + IMPORT_C void AddHeaderL(CObexHeader& aHeader); + IMPORT_C TInt BytesSent(); + IMPORT_C TInt BytesReceived(); + IMPORT_C TObexHeaderMask HeaderMask(); + IMPORT_C TObexHeaderMask ValidHeaders(); + IMPORT_C const TDesC& Name(); + IMPORT_C const TDesC8& Type(); + IMPORT_C TUint32 Length(); + IMPORT_C const TTime Time(); + IMPORT_C const TDesC& Description(); + IMPORT_C const TDesC8& Target(); + IMPORT_C const RPointerArray* Http() const; + IMPORT_C const TDesC8& AppParam() const; + IMPORT_C void Reset(); + IMPORT_C const CObexHeaderSet& HeaderSet() const; + IMPORT_C CObexHeaderSet& HeaderSet(); + + // Public unexported functions used by CObexServer, CObexClient, etc + enum TProgress { EContinue,EComplete,EError,ELastPacket }; + TInt InitSend(TObexOpcode aOpcode); + TProgress PrepareNextSendPacket(CObexPacket& aPacket); + TInt InitReceive(); + TProgress ParseNextReceivePacket(CObexPacket& aPacket); + void PrepareConnectionHeader( CObexPacket& aPacket ); + void SetConnectionIdL(TUint32 aFourByte); + TUint32 ConnectionID(); + TObexResponse GetLastError() const; + +protected: + CObexBaseObject(); + void GuessTypeFromExtL(const TDesC& aExt); + void ResetHeaders(); + // Pure virtuals that all derived objects must implement + virtual void GetData(TInt aPos, TDes8& aDes) =0; + virtual void NewData(TInt aPos, TDes8& aDes) =0; + virtual TInt DataSize() =0; + virtual void ResetData() =0; + void CreateHeaderStorageDataL(); + void SetTimeHeaderL(const TDesC8& aTimeDes); + void SetUtcTimeL(const TTime aUtcTime); + +// Data +private: + TObexHeaderMask iHeaderMask; + TObexHeaderMask iValidHeaders; + + mutable RPointerArray* iHttp; + + CObexHeaderSet* iHeaderSet; + + TProgress iSendProgress; + TProgress iRecvProgress; + TObexOpcode iSendOpcode; + + // This data item is used to store a CObexHeader which is used as a temporary + // store when finding headers + CObexHeader* iObexHeader; + + TObexHeaderMask iSendHeaders; + TInt iSendBytes; + TInt iRecvBytes; + + TObexResponse iLastError; + + }; + +#endif // __OBEXBASEOBJECT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexbttransportinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexbttransportinfo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,36 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __OBEXBTTRANSPORTINFO_H__ +#define __OBEXBTTRANSPORTINFO_H__ + +#include +#include + +/** +Concrete transport info type for use when using RFCOMM transport controller. +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexBtTransportInfo) : public TObexTransportInfo + { +public: + /** + The BT device address of the remote party. + */ + TBTSockAddr iAddr; + }; + +#endif // __OBEXBTTRANSPORTINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexclient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexclient.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,112 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXCLIENT_H +#define __OBEXCLIENT_H + +#include +#include +#include + +class CObexPacket; +class MObexFinalPacketObserver; +class CObexPacketSignaller; +class CObexPacketTimer; +class CObexErrorEngine; + +/** +Client side functionality. Connection based. +Supports ... +- Opening IrDA TTP sockets for the OBEX session. +- Opening an OBEX session over a connected socket +- Standard OBEX (spec. version 1.2) operations. + +This class is not designed for user derivation. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexClient) : public CObex + { +public: + IMPORT_C ~CObexClient(); + IMPORT_C static CObexClient* NewL(TObexProtocolInfo& aObexProtocolInfoPtr); + IMPORT_C static CObexClient* NewL(TObexProtocolInfo& aObexProtocolInfoPtr, TObexProtocolPolicy& aObexProtocolPolicy); + IMPORT_C static CObexClient* NewL(TObexTransportInfo& aObexTransportInfo); + IMPORT_C void Connect(TRequestStatus& aStatus); + IMPORT_C void Connect(CObexBaseObject& aObject, TRequestStatus& aStatus); + IMPORT_C void ConnectL(CObexBaseObject& aObject, const TDesC& aPassword, + TRequestStatus& aStatus); + IMPORT_C void ConnectL(const TDesC& aPassword, TRequestStatus& aStatus); + IMPORT_C void Disconnect(TRequestStatus& aStatus); + IMPORT_C void Put(CObexBaseObject& aObject, TRequestStatus& aStatus); + IMPORT_C void Get(CObexBaseObject& aObject, TRequestStatus& aStatus); + IMPORT_C void SetPath(TSetPathInfo& aPathInfo, TRequestStatus& aStatus); + IMPORT_C void Abort(); + IMPORT_C void UserPasswordL( const TDesC& aPassword); + IMPORT_C const CObexHeaderSet& GetPutFinalResponseHeaders(); + IMPORT_C void SetFinalPacketObserver(MObexFinalPacketObserver* aObserver); + IMPORT_C TObexResponse LastServerResponseCode() const; + IMPORT_C void SetCommandTimeOut(TTimeIntervalMicroSeconds32 aTimeOut); + IMPORT_C TAny* ExtensionInterface(TUid aUid); + +public: // Called from CObexNotifyExtendClient + void SignalPacketProcessEvent(TObexPacketProcessEvent aEvent); + void TimeOutCompletion(); + +private: + CObexClient(); + void ConstructL(TObexTransportInfo& aObexTransportInfo); + TBool AlreadyActive(TRequestStatus& aStatus); + void ClientCommandL(TOperation aOp, TAny* aParam, TRequestStatus& aStatus); + // Implementation of CObex Events + virtual void OnPacketReceive(CObexPacket& aPacket); + virtual void OnError(TInt aError); + virtual void OnTransportUp(); + virtual void OnTransportDown(); + void SetRequest(TRequestStatus& aStatus, TOperation aOperation); + void CompleteRequest(const TInt aCompletion); + TInt PrepareConnectPacket(CObexPacket& aPacket); // Should be members of TConnectInfo + TInt ParseConnectPacket(CObexPacket& aPacket); + void ResetConnectionID(); + void SetConnectionID(TUint32 aConnectionID); + void EmptyHeaderSet(); + void SendRequestPacket(); + void SendRequestPacket(TObexOpcode aObexOpcode); + +private: + TRequestStatus* iPendingRequest; + CObexBaseObject* iCurrentObject; + TUint32 iConnectionID; + TBool iConnectionIdSet; + CObexHeaderSet* iHeaderSet; + CObexHeader* iHeader; + CObexPacketSignaller* iPacketProcessSignaller; + TObexResponse iLastReceivedResponseOpcode; + CObexErrorEngine* iErrorEngine; + TBool iIsLastErrorSet; + TTimeIntervalMicroSeconds32 iCmdTimeOutDuration; + CObexPacketTimer* iPacketTimer; + }; + +#endif // __OBEXCLIENT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexconstants.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexconstants.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,689 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXCONSTANTS_H +#define __OBEXCONSTANTS_H + +#include +#include +#include +#include +#include + +//common to request & resp digests + +/** @internalComponent */ +const TInt KChallResponseSize = 58; +/** @internalComponent */ +const TInt KMinChallResponseSize = 18; //Nonce(16) + tag(1) + size(1) +/** @internalComponent */ +const TInt KObexNonceSize = 16; +/** @internalComponent */ +const TUint8 KObexRequireUID = 0x01; + +//request or chall +/** @internalComponent */ +const TUint KObexChallNonceTag = 0; +/** @internalComponent */ +const TUint8 KObexChallOptionsTag = 0x01; +/** @internalComponent */ +const TUint8 KObexChallRealmTag = 0x02; +/** @internalComponent */ +const TInt KObexChallOptionSize = 1; //this can't be changed from one without making +/** @internalComponent */ +const TUint KObexChallHeaderSize = 23; //assuming no Realm data + +//response +/** @internalComponent */ +const TUint KObexRespTag = 0; +/** @internalComponent */ +const TInt KObexRespSize = 16; +/** @internalComponent */ +const TUint8 KObexRespUserIDTag = 0x01; +/** @internalComponent */ +const TUint8 KObexRespNonceTag = 0x02; + +/** @internalComponent */ +const TUint8 KObexHeaderTypeMask = 0xc0; +/** @internalComponent */ +const TUint8 KObexHeaderTypeOffset = 6; + +#ifdef _UNICODE +/** @internalComponent */ +const TInt KUidOBEXTransportModule = 0x10003d56; +#else +/** @internalComponent */ +const TInt KUidOBEXTransportModule = 0x1000169c; +#endif + +/** @internalComponent */ +const TInt KUsbIntStringDescLength = 30; + +/** @internalComponent */ +const TUint8 KFourByteTimeHeaderAddress = 0xc4; + +// Header mask definitions. +// Old style accessor for which headers are present or +// should be sent by an object. Now deprecated, use the +// header iterator instead. +/** @internalComponent */ +const TUint16 KObexHdrName = 0x0001; +/** @internalComponent */ +const TUint16 KObexHdrType = 0x0002; +/** @internalComponent */ +const TUint16 KObexHdrLength = 0x0004; +/** @internalComponent */ +const TUint16 KObexHdrTime = 0x0008; +/** @internalComponent */ +const TUint16 KObexHdrDescription = 0x0010; +/** @internalComponent */ +const TUint16 KObexHdrTarget = 0x0020; +/** @internalComponent */ +const TUint16 KObexHdrConnectionID = 0x0040; +/** @internalComponent */ +const TUint16 KObexHdrBody = 0x0080; +/** @internalComponent */ +const TUint16 KObexHdrEndOfBody = 0x0100; +/** @internalComponent */ +const TUint16 KObexHdrHttp = 0x0200; +/** @internalComponent */ +const TUint16 KObexHdrAppParam = 0x0400; +/** @internalComponent */ +const TUint16 KObexHdrUserDefined = 0x0800; +/** @internalComponent */ +const TUint16 KObexHdrCount = 0x1000; +/** @internalComponent */ +const TUint16 KObexHdrCreatorID = 0x2000; +/** @internalComponent */ +const TUint16 KObexHdrWanUUID = 0x4000; +/** @internalComponent */ +const TUint16 KObexHdrObjectClass = 0x8000; + +/** @internalComponent */ +const TUint8 KObexUserDefinedHdrAddrMin = 0x30; //start of user defined header address range +/** @internalComponent */ +const TUint8 KObexUserDefinedHdrAddrMax = 0x3F; //end of user defined header address range + +/** @internalComponent */ +const TUint8 KObexVersion = 0x10; ///< Version 1.0 (still correct for Obex spec v 1.2) + +/** @internalComponent */ +const TUint8 KObexObjectFieldSize = 127; +/** @internalComponent */ +const TUint8 KObexObjectDescriptionSize = 255; + +// Extended errors for IrObex + +/** Must not use as not in the allocated range */ +const TInt KErrIrObexRespBase = - 5500; + +/** Extended error for IrObex - No other infrared device found */ +const TInt KErrIrObexClientNoDevicesFound = -5501; + +/** Extended error for IrObex - Other IR device cannot handle IrObex */ +const TInt KErrIrObexClientPeerDoesNotHaveObex = -5502; + +/** Extended error for IrObex - Other IR device aborted the transfer */ +const TInt KErrIrObexClientPutPeerAborted = -5503; + +/** Extended error for IrObex - Peer device aborted data transmission/obex sending */ +const TInt KErrIrObexServerPutPeerAborted = -5507; + +/** Extended error for IrObex - Cannot authorise the challenge so link dropped */ +const TInt KErrIrObexConnectChallRejected = -5512; + +// Other Obex errors defined in the system but no longer used +// Do not reuse the number! +// KErrIrObexClientPutPeerCannotHandleObject -5504 +// KErrIrObexServerPutFileWriteError -5509 +// KErrIrObexClientFirstPutFailed -5510 +// KErrIrObexClientSubsequentPutFailed -5511 + +/** Unexpected event for the given state */ +const TInt KErrIrObexBadEvent = -5513; + +/** Event occurred while Server is stopped */ +const TInt KErrIrObexServerStopped = -5514; + +/** Packet received while state machine is in a wait state */ +const TInt KErrIrObexPacketDuringWait = -5515; + +// There are other error codes defined at the end of this file, +// which are a direct mapping of specific Obex error codes and +// are returned by the client. + + +// Flags used by Connect +// ...None in OBEX 1.0 + +// Flags used by SetPath +/** @internalComponent */ +const TUint8 KObexSetPathParent = 0x01; + +/** +Version number for TObexTransportInfo and derived classes. +When iVersion is set to this value the following fields of TObexTransportInfo +must be set: +iTransportName, +iReceiveMtu +iTransmitMtu +The iVersion member variable must be set to this value. If in future any of the +iFuture variables are used a new version constant will be created. + +@see TObexTransportInfo +@publishedAll +@released +*/ +const TInt KObexTransportInfoVersion0 = 0; + +/** +Default for the receive and transmit MTU sizes +Use this default value for setting the iReceiveMtu or iTransmitMtu in TObexTransportInfo +objects or derived classes. + +@see TObexTransportInfo +@publishedAll +@released +*/ +const TInt KObexDefaultMtuSize = 4000; + +/** +Default value for the number of discovery slots to use. Use this value as a default +for iDiscoverySlots in TObexIrdaV2TransportInfo. + +@see TObexIrdaV2TransportInfo +@publishedAll +@released +*/ +const TUint KObexIrdaDefaultDiscoverySlotsToUse = 1; + +/** +Default value for the number of discovery attempts made. Use this value as a default for iDiscoveryAttempts +in TObexIrdaV2TransportInfo. +@see TObexIrdaV2TransportInfo +@publishedAll +@released +*/ +const TUint KObexIrdaDefaultDiscoveryAttempts = 4; + +// Constants used to define which transport Obex will run over. +// Used in TObexTransportInfo and TObexProtocolInfo's iTransport member. + +/** +Protocol string when running over IrDA +@see TObexIrProtocolInfo +@see TObexTransportInfo +@publishedAll +@released +*/ +_LIT(KObexIrTTPProtocol, "IrTinyTP"); + +/** +Protocol string when running over IrDA +Using this version indicates that the configuration object contains discovery parameters. +@see TObexIrProtocolInfo +@publishedAll +@released +*/ +_LIT(KObexIrTTPProtocolV2, "IrTinyTP-V2"); + +/** +Protocol string when running over IrDA +Using this version indicates that the configuration object contains the device nickname. +@see TObexIrProtocolInfo +@publishedAll + +@capability WriteDeviceData If the TObexIrV3TransportInfo is passed as the argument + to CObexServer::NewL or CObexClient::NewL and the associated + name is valid. +@released +*/ +_LIT(KObexIrTTPProtocolV3, "IrTinyTP-V3"); + +/** +Protocol string when running over Bluetooth +@see TObexBluetoothProtocolInfo +@see TObexTransportInfo +@publishedAll +@released +*/ +_LIT(KObexRfcommProtocol, "RFCOMM"); + +/** +Protocol string when running over USB +@see TObexUsbProtocolInfo +@see TObexTransportInfo +@publishedAll +@released +*/ +_LIT(KObexUsbProtocol, "USB"); + +/** +Place holder for... +protocol string that should be used +if a Win32 emulator USB transport were +to be created for testing. +@see TObexUsbProtocolInfo +@see TObexTransportInfo +@publishedAll +@released +*/ +_LIT(KObexWin32UsbProtocol, "Win32Usb"); + +/** +Protocol string when running over USB using client driver extensions +@see TObexUsbProtocolInfoV2 +@see TObexTransportInfo +@publishedAll +@released +*/ +_LIT(KObexUsbProtocolV2, "USB-V2"); + +/** +This class is derived for each underlying transport protocol OBEX +runs over. + +The iTransport member holds the unique name for the transport. For example for +infra-red (TinyTP) this is "IrTinyTP" or KObexIrTTPProtocol. + +@see TObexIrProtocolInfo for running over TinyTP +@see TObexBluetoothProtocolInfo for running over Rfcomm +@see TObexUsbProtocolInfo for running over USB +@see TObexUsbProtocolInfoV2 for running over USB using client driver extensions + +@see KObexIrTTPProtocol +@see KObexIrTTPProtocolV2 +@see KObexRfcommProtocol +@see KObexUsbProtocol +@see KObexUsbProtocolV2 + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexProtocolInfo) + { +public: + /** Holds the unique name for the transport. */ + TBuf<60> iTransport; +private: + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + +/** +Used to describe IrDA specific protocol information + +To access the default OBEX server, the IAS class value should be "OBEX" +and the IAS attribute name "IrDA:TinyTP:LsapSel". + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexIrProtocolInfo) : public TObexProtocolInfo + { +public: + /** IrDA address information for this connection, as used in the IrDA sockets interface. + Refer to the SDK for more information about this. + Its main use is for setting the port that the local machine will listen on. */ + TIrdaSockAddr iAddr; + /** The IAS class value that the OBEX session will register its listener port, + or request remote port with. */ + TBuf8 iClassName; + /** The IAS attribute value that the OBEX session will register its listener port, + or request remote port with. */ + TBuf8 iAttributeName; + /** The number of discovery slots to use. */ + TUint8 iDiscoverySlots; + /** The number of discovery attempts to make. */ + TUint8 iDiscoveryAttempts; + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // None of these padding variables have been zero'd because they are currently not used + TUint16 iPadding1; + TUint32 iPadding2; + TUint32 iPadding3; + TUint32 iPadding4; + }; + +/** +Used to describe Bluetooth specific protocol information + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexBluetoothProtocolInfo) : public TObexProtocolInfo + { +public: + /** + For OBEX servers: + This defines the server channel on which the OBEX server listens + for connections. The server channel is set using SetPort on the + TRfcommSockAddr. + Note: + 1) Unless the channel is defined as KRfcommPassiveAutoBind + it may be in use when the obex server attempts to 'bind' to it + 2) If the channel is defined as KRfcommPassiveAutoBind + then when the server is FIRST started it will attempt + to find a free RFComm channel. If this is successful + that free channel will be used as the server channel + for the life time of the obex server including + when it is 'stopped' and re-'started'. + 3) When the obex server is stopped, and very + briefly when a bluetooth connection comes down, the + obex server releases its server channel. It is possible + therefore that during this time another application might bind + to it. This will cause an error when the obex server tries + to re-bind. + + Also note that a Bluetooth OBEX server will itself set the Object Transfer + bit in the Service Class as required by the Generic Object Exchange + Profile so the user need not do this. + @see CObexServer + + For OBEX clients: + This defines the server channel and the + device address to connect to. The server channel + and device address are set respectively using SetPort + and SetBTAddr on the TRfcommSockAddr. + */ + TRfcommSockAddr iAddr; + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + +/** +Used to describe USB specific protocol information + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexUsbProtocolInfo) : public TObexProtocolInfo + { +public: + /** Provides a string to be attached to the Obex function's Communication Class interface, + which may be used to identify the Obex service. */ + TBuf16 iInterfaceStringDescriptor; + }; + +/** +Used to set options used by the extended USB client driver for improved performance + +@see TObexUsbProtocolInfo +@see RDevUsbcClient +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexUsbProtocolInfoV2) : public TObexUsbProtocolInfo + { +public: + /** Bitmap containing the bandwidth priorities to use on IN and OUT endpoints + @see TUsbcBandwidthPriority + */ + TInt iBandwidthPriority; + /** Specifies whether to use DMA on the bulk OUT endpoint */ + TBool iDmaOnOutEndpoint; + /** Specifies whether to use DMA on the bulk IN endpoint */ + TBool iDmaOnInEndpoint; + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // None of these padding variables have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + TUint32 iPadding3; + TUint32 iPadding4; + }; + +/** +Contains information about OBEX packet sizing policy, defining the +maximum buffer size for receive and transmit packets +*/ +NONSHARABLE_CLASS(TObexProtocolPolicy) + { +public: + IMPORT_C TObexProtocolPolicy (); // Sets version and default values + + IMPORT_C TInt SetReceiveMtu ( TUint16 aReceiveMtu ); + IMPORT_C TInt SetTransmitMtu ( TUint16 aTransmitMtu ); + IMPORT_C TUint16 Version () const; + IMPORT_C TUint16 ReceiveMtu () const; + IMPORT_C TUint16 TransmitMtu () const; + +private: + TUint16 iVersion; + TUint16 iReceiveMtu; + TUint16 iTransmitMtu; + + // This data padding has been added to help prevent future binary compatibility breaks + // None of these padding variables have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + TUint32 iPadding3; + TUint32 iPadding4; + }; + +struct TObexConnectionInfo; + +/** +TObexConnectInfo +This structure contains information used during OBEX connection. iVersion +holds the encoded OBEX version of the machine, use @c VersionMajor() and +@c VersionMinor() to extract the parts of the version number (each having a +value from 0 to 15). @c iFlags holds OBEX connection flags. @c iWho holds +the Who attribute from the connect packet, if any was specified, or +otherwise has a length of 0. +It is recommended that this class is only ever allocated on the heap as it is quite big. +*/ +NONSHARABLE_CLASS(TObexConnectInfo) + { +public: + IMPORT_C TObexConnectInfo(); + IMPORT_C TUint8 VersionMajor() const; + IMPORT_C TUint8 VersionMinor() const; +public: + TUint8 iVersion; /** Encoded OBEX version of the machine*/ + TUint8 iFlags; /** iFlags holds OBEX connection flags*/ + TBuf8 iWho; /** the Who attribute from the connect packet, if any was specified */ + TBuf8 iTargetHeader; /** the Target header from the connect packet, if any was specified */ + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + + + +//if these codes are extended due to a IRObex spec update ensure +//that the TInt immediately below are updated +//and the default in the method IrOBEXUtil::ObexResponse is also updated +enum TObexResponse + { +/** Response is "Continue" */ + ERespContinue = 0x10, + +/** Response is "Success" */ + ERespSuccess = 0x20, + +/** Response is "Created" */ + ERespCreated = 0x21, + +/** Response is "Accepted" */ + ERespAccepted = 0x22, + +/** Response is "Non-Authenticated Information" */ + ERespNonAuthInfo = 0x23, + +/** Response is "No Content" */ + ERespNoContent = 0x24, + +/** Response is "Reset Content" */ + ERespResetContent = 0x25, + +/** Response is "Partial Content" */ + ERespPartialContent = 0x26, + +/** Response is "Multiple Choices" */ + ERespMultipleChoices = 0x30, + +/** Response is "Moved Permanently" */ + ERespMovedPerm = 0x31, + +/** Response is "Moved Temporarily" */ + ERespMovedTemp = 0x32, + +/** Response is "See Other" */ + ERespSeeOther = 0x33, + +/** Response is "Not Modified" */ + ERespNotModified = 0x34, + +/** Response is "Use Proxy" */ + ERespUseProxy = 0x35, + +/** Response is "Bad Request" */ + ERespBadRequest = 0x40, + +/** Response is "Unauthorized" */ + ERespUnauthorized = 0x41, + +/** Response is "Payment Required" */ + ERespPaymentRequired = 0x42, + +/** Response is "Forbidden" */ + ERespForbidden = 0x43, + +/** Response is "Not Found" */ + ERespNotFound = 0x44, + +/** Response is "Method Not Allowed" */ + ERespMethodNotAllowed = 0x45, + +/** Response is "Not Acceptable" */ + ERespNotAcceptable = 0x46, + +/** Response is "Proxy Authentication is Required" */ + ERespProxyAuthenReqd = 0x47, + +/** Response is "Timed Out" */ + ERespTimedOut = 0x48, + +/** Response is "Conflict" */ + ERespConflict = 0x49, + +/** Response is "Gone" */ + ERespGone = 0x4A, + +/** Response is "Length Required" */ + ERespLengthReqd = 0x4B, + +/** Response is "Precondition Failed" */ + ERespPreCondFailed = 0x4C, + +/** Response is "Required Entity is Too Large" */ + ERespReqEntityTooLarge = 0x4D, + +/** Response is "Required URL is Too Large" */ + ERespReqURLTooLarge = 0x4E, + +/** Response is "Unsupported Media Type" */ + ERespUnsupMediaType = 0x4F, + +/** Response is "Internal Error" */ + ERespInternalError = 0x50, + +/** Response is "Not Implemented" */ + ERespNotImplemented = 0x51, + +/** Response is "Bad Gateway" */ + ERespBadGateway = 0x52, + +/** Response is "Service Unavailable" */ + ERespServiceUnavail = 0x53, + +/** Response is "Gateway Timeout" */ + ERespGatewayTimeout = 0x54, + +/** Response is "HTTP Version is Not Supported" */ + ERespHTTPVerNotSupp = 0x55, + +/** Response is "Database is Full" */ + ERespDatabaseFull = 0x60, + +/** Response is "Database is Locked" */ + ERespDatabaseLocked = 0x61, + +/** Response is "Service is Unavailable" */ + ERespServiceUnavailable = 0xD3, + }; + + +//some error codes to be used specifically by the client +//these shall, be mapped directly to OBEX defined error codes. +const TInt KErrIrObexRespSuccess = KErrIrObexRespBase - ERespSuccess; //-5532 returns 0x20 (0xA0) +const TInt KErrIrObexRespCreated = KErrIrObexRespBase - ERespCreated; //-5533 returns 0x21 (0xA1) +const TInt KErrIrObexRespAccepted = KErrIrObexRespBase - ERespAccepted; //-5534 returns 0x22 (0xA2) +const TInt KErrIrObexRespNonAuthInfo = KErrIrObexRespBase - ERespNonAuthInfo; //-5535 returns 0x23 (0xA3) +const TInt KErrIrObexRespNoContent = KErrIrObexRespBase - ERespNoContent; //-5536 returns 0x24 (0xA4) +const TInt KErrIrObexRespResetContent = KErrIrObexRespBase - ERespResetContent; //-5537 returns 0x25 (0xA5) +const TInt KErrIrObexRespPartialContent = KErrIrObexRespBase - ERespPartialContent; //-5538 returns 0x26 (0xA6) +const TInt KErrIrObexRespMultipleChoices = KErrIrObexRespBase - ERespMultipleChoices; //-5548 returns 0x30 (0xB0) +const TInt KErrIrObexRespMovedPerm = KErrIrObexRespBase - ERespMovedPerm; //-5549 returns 0x31 (0xB1) +const TInt KErrIrObexRespMovedTemp = KErrIrObexRespBase - ERespMovedTemp; //-5550 returns 0x32 (0xB2) +const TInt KErrIrObexRespSeeOther = KErrIrObexRespBase - ERespSeeOther; //-5551 returns 0x33 (0xB3) +const TInt KErrIrObexRespNotModified = KErrIrObexRespBase - ERespNotModified; //-5552 returns 0x34 (0xB4) +const TInt KErrIrObexRespUseProxy = KErrIrObexRespBase - ERespUseProxy; //-5553 returns 0x35 (0xB5) +const TInt KErrIrObexRespBadRequest = KErrIrObexRespBase - ERespBadRequest; //-5564 returns 0x40 (0xC0) +const TInt KErrIrObexRespUnauthorized = KErrIrObexRespBase - ERespUnauthorized; //-5565 returns 0x41 (0xC1) +const TInt KErrIrObexRespPaymentRequired = KErrIrObexRespBase - ERespPaymentRequired; //-5566 returns 0x42 (0xC2) +const TInt KErrIrObexRespForbidden = KErrIrObexRespBase - ERespForbidden; //-5567 returns 0x43 (0xC3) +const TInt KErrIrObexRespNotFound = KErrIrObexRespBase - ERespNotFound; //-5568 returns 0x44 (0xC4) +const TInt KErrIrObexRespMethodNotAllowed = KErrIrObexRespBase - ERespMethodNotAllowed; //-5569 returns 0x45 (0xC5) +const TInt KErrIrObexRespNotAcceptable = KErrIrObexRespBase - ERespNotAcceptable; //-5570 returns 0x46 (0xC6) +const TInt KErrIrObexRespProxyAuthenReqd = KErrIrObexRespBase - ERespProxyAuthenReqd; //-5571 returns 0x47 (0xC7) +const TInt KErrIrObexRespTimedOut = KErrIrObexRespBase - ERespTimedOut; //-5572 returns 0x48 (0xC8) +const TInt KErrIrObexRespConflict = KErrIrObexRespBase - ERespConflict; //-5573 returns 0x49 (0xC9) +const TInt KErrIrObexRespGone = KErrIrObexRespBase - ERespGone; //-5574 returns 0x4A (0xCA) +const TInt KErrIrObexRespLengthReqd = KErrIrObexRespBase - ERespLengthReqd; //-5575 returns 0x4B (0xCB) +const TInt KErrIrObexRespPreCondFailed = KErrIrObexRespBase - ERespPreCondFailed; //-5576 returns 0x4C (0xCC) +const TInt KErrIrObexRespReqEntityTooLarge = KErrIrObexRespBase - ERespReqEntityTooLarge;//-5577 returns 0x4D (0xCD) +const TInt KErrIrObexRespReqURLTooLarge = KErrIrObexRespBase - ERespReqURLTooLarge; //-5578 returns 0x4E (0xCE) +const TInt KErrIrObexRespUnsupMediaType = KErrIrObexRespBase - ERespUnsupMediaType; //-5579 returns 0x4F (0xCF) +const TInt KErrIrObexRespInternalError = KErrIrObexRespBase - ERespInternalError; //-5580 returns 0x50 (0xD0) +const TInt KErrIrObexRespNotImplemented = KErrIrObexRespBase - ERespNotImplemented; //-5581 returns 0x51 (0xD1) +const TInt KErrIrObexRespBadGateway = KErrIrObexRespBase - ERespBadGateway; //-5582 returns 0x52 (0xD2) +const TInt KErrIrObexRespServiceUnavail = KErrIrObexRespBase - ERespServiceUnavail; //-5583 returns 0x53 (0xD3) +const TInt KErrIrObexRespGatewayTimeout = KErrIrObexRespBase - ERespGatewayTimeout; //-5584 returns 0x54 (0xD4) +const TInt KErrIrObexRespHTTPVerNotSupp = KErrIrObexRespBase - ERespHTTPVerNotSupp; //-5585 returns 0x55 (0xD5) +const TInt KErrIrObexRespDatabaseFull = KErrIrObexRespBase - ERespDatabaseFull; //-5596 returns 0x60 (0xE0) +const TInt KErrIrObexRespDatabaseLocked = KErrIrObexRespBase - ERespDatabaseLocked; //-5597 returns 0x61 (0xE1) + +#endif // __OBEXCONSTANTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexfinalpacketobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexfinalpacketobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,45 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef OBEXFINALPACKETOBSERVER_H +#define OBEXFINALPACKETOBSERVER_H + +#include + +/** +This mixin class must be inherited by any class interested in final packet notifications. + +@publishedAll +@released +*/ + +class MObexFinalPacketObserver + { +public: + + /** Indicates start of final packet. + @publishedAll + @released + */ + virtual void MofpoFinalPacketStarted() {}; + + /** Indicates end of final packet. + @publishedAll + @released + */ + virtual void MofpoFinalPacketFinished() {}; + }; + +#endif // OBEXFINALPACKETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexheaders.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexheaders.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,241 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXHEADERS_H +#define __OBEXHEADERS_H + +#include + +/** +Encapsulates an Obex header. + +This class provides the ability to hold a header of any of the Obex +supported types as a native Symbian OS type. + +A header may also have one or more attributes set. These are used by +the object which owns the header collection so that it can keep track +of which headers should be sent (!(ESuppressed || EDeleted)), which have +been sent (ESent), and whether the header should be deleted (EDeleted). +Deletion is a special case---any operation on the Object which causes +a scan of the headers will trigger deletion of any marked headers. +This is required as they are owned by the Object, but can be accessed +seperately (including through the creator keeping a pointer to the +header). + +@see CObexBaseObject +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexHeader) : public CBase + { +public: + // Requires friendship with CObexBaseObject to support some aspects of the + // legacy API (specifically the HTTP accessor method). + friend class CObexBaseObject; + + enum THeaderType + { + EUnicode = 0x00, + EByteSeq = 0x01, + EByte = 0x02, + EFourByte = 0x03 + }; + + enum THeaderAttr + { + ESuppressed = 0x01, + ESent = 0x02, + EDeleted = 0x04, + }; + + IMPORT_C static CObexHeader* NewL(); + virtual ~CObexHeader(); + IMPORT_C CObexHeader* CopyL() const; + + //Sets this object to use the same underlying header as the parameter. + IMPORT_C void Set(CObexHeader* aHeader); + //Resets the contents of this header, discarding the underlying data. + IMPORT_C void Reset(); + + //Resets and destroys all header attributes. + IMPORT_C void ResetContents(); + + IMPORT_C void SetAttributes(TUint16 aAttr); + IMPORT_C TUint16 Attributes() const; + + IMPORT_C THeaderType Type() const; + + IMPORT_C TUint8 HI() const; + IMPORT_C TUint8 AsByte() const; + IMPORT_C TUint32 AsFourByte() const; + IMPORT_C const TDesC8& AsByteSeq() const; + IMPORT_C const TDesC16& AsUnicode() const; + + IMPORT_C void SetByte(const TUint8 aHI, const TUint8 aByte); + IMPORT_C void SetFourByte(const TUint8 aHI, const TUint32 aFourByte); + IMPORT_C void SetByteSeqL(const TUint8 aHI, const TDesC8& aByteSeq); + IMPORT_C void SetUnicodeL(const TUint8 aHI, const TDesC16& aUnicode); + + IMPORT_C TInt EncodedSize() const; + +private: + CObexHeader(); + CObexHeader(CObexUnderlyingHeader* aHeader); + void ConstructL(); + +private: + CObexUnderlyingHeader* iHeader; + }; + +/** +Used to allow the iterator to decide whether to present a header to +the user, by passing in a possible header HI value. Headers present +in the object will be presented to the Interested() function in the +object in which they are held (if received from a remote device +this will be the order in which they were received, otherwise this will +be the order in which they were set). +The function can implement any desired behaviour, including relying on +the order in which the headers are presented. + +In case any state is held, the object also provides a Reset() function. +Reset() provides a default empty implementation. + +Note: there is no destructor. + +@publishedAll +@released +*/ +class MObexHeaderCheck + { +public: + /** + Called to discover is the user is interested in the contents of + this header. + + @param aHI The identifier of the header, including type bits. + @return ETrue if the user is interested in the contents of this + header. + @publishedAll + @released + */ + IMPORT_C virtual TBool Interested(TUint8 aHI) =0; + + /** + Called in response to First() being called on the iterator object. + The default implementation does nothing---some implementations may + wish to reset state variables. + + @publishedAll + @released + */ + IMPORT_C virtual void Reset(); + + /** + Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. + @param aInterface UID of the interface to return + @param aObject the container for another interface as specified by aInterface + @internalComponent + */ + IMPORT_C virtual void MOHC_ExtensionInterfaceL(TUid aInterface, void*& aObject); + }; + +/** +A collection of headers. Includes code to filter based on the header HI +value, iterate through the set of interesting headers, and extract headers +with specific HI values. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexHeaderSet) : public CBase + { +public: + IMPORT_C static CObexHeaderSet* NewL(); + IMPORT_C CObexHeaderSet* CopyL(); + IMPORT_C CObexHeaderSet* CopyL(MObexHeaderCheck& aHeaderCheck); + ~CObexHeaderSet(); + + IMPORT_C TInt AddHeader(CObexHeader* aHeader); + IMPORT_C void DeleteCurrentHeader(); + + IMPORT_C void SetMask(MObexHeaderCheck* aMask); + IMPORT_C void DeleteMasked(); + + IMPORT_C void First() const; + IMPORT_C TInt This(CObexHeader* aHeader) const; + IMPORT_C TInt Next() const; + IMPORT_C TInt Next(TInt aSkip) const; + IMPORT_C TInt Count() const; + + IMPORT_C TInt Find(TUint8 aHI, CObexHeader& aHeader) const; + +private: + CObexHeaderSet(); + +private: + RPointerArray iHeaders; + mutable MObexHeaderCheck* iMask; + mutable TInt iPos; + }; + +/** +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexMatchHeader) : public MObexHeaderCheck + { +public: + virtual EXPORT_C TBool Interested(TUint8 aHI); + IMPORT_C void SetHeader(TUint8 aHI); + +private: + TUint8 iHI; + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + +/** +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexMatchHeaderType) : public MObexHeaderCheck +{ +public: + virtual EXPORT_C TBool Interested(TUint8 aHI); + IMPORT_C void SetType(CObexHeader::THeaderType aType); + +private: + TInt iType; + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + +#endif // __OBEXHEADERS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexirtransportinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexirtransportinfo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __OBEXIRTRANSPORTINFO_H__ +#define __OBEXIRTRANSPORTINFO_H__ + +#include +#include + +/** +Concrete transport info type for use when using Irda ttp transport controller. +@see KObexIrTTPProtocol +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexIrTransportInfo) : public TObexTransportInfo + + { +//From TObexIrProtocolInfo +public: + /** IrDA address information for this connection, as used in the IrDA sockets interface. + Refer to the SDK for more information about this. + Its main use is for setting the port that the local machine will listen on. */ + TIrdaSockAddr iAddr; + /** The IAS class value that the OBEX session will register its listener port, + or request remote port with. */ + TBuf8 iClassName; + /** The IAS attribute value that the OBEX session will register its listener port, + or request remote port with. */ + TBuf8 iAttributeName; + }; + +/** +Concrete transport info type for use when using Irda ttp transport controller, with discovery extensions. +@see KObexIrTTPProtocolV2 +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexIrV2TransportInfo) : public TObexIrTransportInfo + + { +//From TObexIrProtocolInfo +public: + /** The number of discovery slots to use. */ + TUint8 iDiscoverySlots; + /** The number of discovery attempts to make. */ + TUint8 iDiscoveryAttempts; + +private: + // This data padding has been added to help prevent future binary compatibility breaks + // None of these padding variables have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + TUint32 iPadding3; + TUint32 iPadding4; + }; + + +/** +Concrete transport info type for use when using Irda ttp transport controller, with nickname extension. +@see KObexIrTTPProtocolV3 +@publishedAll + +@capability WriteDeviceData If the TObexIrV3TransportInfo is passed as the argument + to CObexServer::NewL or CObexClient::NewL and the associated + name is valid. + +@released +*/ +NONSHARABLE_CLASS(TObexIrV3TransportInfo) : public TObexIrV2TransportInfo + { +public: + /** The device nickname. The maximum length in the IrDA specification + is defined as 23 - (number of hint octets [2] + 1) = 20 + */ + TBuf<20> iLocalDeviceNickname; + + /** A flag indicating if the device nickname field is valid. This + allows Symbian to make further derivations of this interface without making + the device nickname mandatory */ + TBool iLocalDeviceNicknameValid; + }; + +#endif // __OBEXIRTRANSPORTINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexobjects.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexobjects.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,342 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXOBJECTS_H +#define __OBEXOBJECTS_H + +#include +#include +#include + +class MObexFileWriter; +class TObexBufferingDetails; + +/** +This class is a concrete derivation of the CObexBaseObject class. Use it to +store and transfer OBEX objects with the body part stored in an EPOC file. +Hence this class is particularly suited to OBEX "file" beaming applications +(c.f. arbitrary object beaming), although there is in reality no +restriction in what it is used to transfer. Access to the body is acheived +through an additional attribute to the object; the data file. This is the +file-system name of the file used to store the body of the object. Note +that there is no explicit relation between this and the Name of the object, +although it is expected that most applications would attempt to relate the +two. + +When ever a valid data file is set (i.e. DataFile().Length > 0), this file +is effectively open, hence stopping any other application from opening it +with exclusive rights. Therefore, it is recommended that Reset () be called +on the object as soon as it is no longer required, and definitely before +(conceptually) passing ownership of the data file to any other object or +user. + +CObexFileObject is also suited to situations where an object is expected to +be received, but no information about the purpose of this object is known. +This is due to CObexFileObject’s ability to create temporary files "on the +fly" to store received data into, when a specific file is not provided by +the application. + +This class is not designed for user derivation. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexFileObject) : public CObexBaseObject + { +public: + static IMPORT_C CObexFileObject* NewL(); + static IMPORT_C CObexFileObject* NewL(const TDesC &aDataFile); + virtual IMPORT_C ~CObexFileObject(); + IMPORT_C void InitFromFileL(const TDesC& aFile); + +private: + void ConstructL(const TDesC &aDataFile); + void SetDataFileL(const TDesC& aDesc); + const TDesC& DataFile(); + TBool RenameFile(const TDesC& aDesC); + void SetTempFilePath(const TDesC& aPath); + void QueryTempFilePath(TDes& aPath); + // From CObexBaseObject + virtual void GetData(TInt aPos, TDes8& aDes); + virtual void NewData(TInt aPos, TDes8& aDes); + virtual TInt DataSize(); + virtual void ResetData(); +// Data +private: + RFs iFs; + TParse iDataFile; + RFile iFile; + TBuf iTempFilePath; + }; + + + +/** +Use this class to hold objects where the body part is stored in a CBufFlat +object. Please note that although parameters are supplied as CBufBase objects, +non-CBufFlat parameters are not supported and will have unpredictable results. +At no point does the CObexBufObject create, or take ownership of any CBaseBuf +object it uses - it is always the responsibility of the creator/owner of the +CBaseBuf to free it when no longer required. + +As this class does not take ownership of the buffers it uses, it equally can +not create its own buffers ad-hoc for storing new data into. Hence at no +time is it valid for a CObexBufObject to exist with out it having a valid +data buffer set. If such a situation arises, where it is required that +received information should be discarded, consider using a CObexNullObject. + +It is also posible to supply a file instead of a memory buffer, or to supply +both. This functionality is due to the MObexServerNotify class expecting to +work only on CObexBufObjects, so CObexFileObjects cannot be returned from the +upcalls. +To use a file for body storage, call NewL() passing in a NULL pointer, then +call SetDataBufL() manually afterwards. There are three overloads---to allow +purely memory based objects, purely file based, or a hybrid. The hybrid object +buffers into a memory buffer (which is not allowed to grow), then writes data +to the file when the buffer is full. The buffering behaviour can therefore be +tuned to the application by setting the size of the buffer prior to use. + +This class is not designed for user derivation. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexBufObject) : public CObexBaseObject + { +public: + /** + Obex file buffering method. + + @publishedAll + @released + */ + enum TFileBuffering + { + /** Only the supplied buffer will be used to buffer file writes. */ + ESingleBuffering, + /** The object will create a second buffer and perform double buffering. */ + EDoubleBuffering + }; + +public: + static IMPORT_C CObexBufObject* NewL(CBufBase* aDataBuf); + virtual IMPORT_C ~CObexBufObject(); + IMPORT_C TInt WriteToFile(const TPtrC& aFileName); + + IMPORT_C void SetDataBufL(TObexBufferingDetails& aDetails); + IMPORT_C void SetDataBufL(CBufBase* aDataBuf); + IMPORT_C void SetDataBufL(const TPtrC& aFilename); + IMPORT_C void SetDataBufL(const TPtrC& aFilename, CBufBase* aDataBuf); + IMPORT_C void SetDataBufL(const TPtrC& aFilename, CBufBase& aDataBuf, const TFileBuffering aBufferingStrategy); + IMPORT_C CBufBase* DataBuf(); + HBufC* FileName(); + +private: + CObexBufObject(); + void ConstructL(CBufBase* aDataBuf); + + void PrepareToSetBufferL(); + + void CopyFileL(const TDesC& aFilename); + TInt NewFileData(TInt aPos, TDes8& aDes); + void GetFileData(TInt aPos, TDes8& aDes); + + // From CObexBaseObject + virtual void GetData(TInt aPos, TDes8& aDes); + virtual void NewData(TInt aPos, TDes8& aDes); + virtual TInt DataSize(); + virtual void ResetData(); + + void CloseDataFile(); + TInt OpenDataFile(const TDesC& aFilename); + void CloseFileServer(); + TInt OpenFileServer(); + TInt WriteBufferToFile(TBool aFinal); + +// Data +private: + CBufBase* iBuf; + HBufC* iFilename; + RFs* iFileServ; + RFile* iFile; + TInt iBufOffset; + TInt iBuffered; + TInt iBufSegSize; + +// Added for double-buffering +private: + // Owned + MObexFileWriter* iWriter; + CBufBase* iDoubleBuf; + }; + + + +/** +Wraps parameters which can affect the buffering method used by the +CObexBufObject. +This version provides a single memory buffer which holds the entire object. +Subclasses will always use a memory buffer, but can override the way that +Obex uses it. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexBufferingDetails) + { +public: + /** + Versions (subclasses) of the buffering style object. + @internalComponent + */ + enum TVersion + { + EBasicBuffer, + EPureFile, + EFilenameBackedBuffer, + ERFileBackedBuffer, + ELastVersion + }; + + IMPORT_C TObexBufferingDetails(CBufBase& aBuffer); + + TVersion Version(); // Return the version of this object + CBufBase* Buffer(); + +protected: + TObexBufferingDetails(TVersion aVersion, CBufBase* aBuffer); + +private: + TVersion iVersion; + CBufBase* iBuffer; + + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + + +/** +Provides alternate behaviour for a CObexBufObject, allowing use of a file +to hold the object in its entirety. No memory buffer is used. This is a +special case option provided to cater for the MObexServerNotify interface +which requires the use of CObexBufObject objects. It is generally better to +use a buffered variant. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexPureFileBuffer) : public TObexBufferingDetails + { +public: + IMPORT_C TObexPureFileBuffer(const TPtrC& aFilename); + const TPtrC& Filename(); + +private: + const TPtrC& iFilename; + + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + +/** +Provides alternate behaviour for a CObexBufObject, allowing use of a file +to hold the object in its entirety. Writes to this object are buffered through +the supplied CBufBase derived object, which is never enlarged. Once +it is full, the data is flushed to the file. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexFilenameBackedBuffer) : public TObexBufferingDetails + { +public: + IMPORT_C TObexFilenameBackedBuffer(CBufBase& aBuffer, const TPtrC& aFilename, CObexBufObject::TFileBuffering aBufferingStrategy); + const TPtrC& Filename(); + CObexBufObject::TFileBuffering Strategy(); + +private: + const TPtrC& iFilename; + CObexBufObject::TFileBuffering iBufferingStrategy; + + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + + + +/** +Provides alternate behaviour for a CObexBufObject, allowing use of a file +to hold the object in its entirety. Writes to this object are buffered through +the supplied CBufBase derived object, which is never enlarged. Once +it is full, the data is flushed to the file. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexRFileBackedBuffer) : public TObexBufferingDetails + { +public: + IMPORT_C TObexRFileBackedBuffer(CBufBase& aBuffer, RFile aFile, CObexBufObject::TFileBuffering aBufferingStrategy); + RFile File(); + CObexBufObject::TFileBuffering Strategy(); + +private: + RFile iFile; + CObexBufObject::TFileBuffering iBufferingStrategy; + + // This data padding has been added to help prevent future binary compatibility breaks + // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used + TUint32 iPadding1; + TUint32 iPadding2; + }; + + + +/** +Concrete OBEX object with NULL data representation. Use when only the +headers of an object are required, and the data (if any) can safely be +discarded. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexNullObject) : public CObexBaseObject + { +public: + IMPORT_C static CObexNullObject* NewL (); +private: + // From CObexBaseObject + void ConstructL(); + virtual void GetData (TInt aPos, TDes8& aDes); + virtual void NewData (TInt aPos, TDes8& aDes); + virtual TInt DataSize (); + virtual void ResetData (); + }; + +#endif // __OBEXOBJECTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexpanics.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexpanics.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,157 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef OBEX_PANICS_H +#define OBEX_PANICS_H + +/** +@file +@publishedAll +@released + +This file contains details of all OBEX and OBEX Transport panics which may be raised +as a result programming error by the users of OBEX (e.g. Client or Server Application +or a proprietry transport controller). + +Internal panic codes should not be raised due to user errors but would reflect +internal Obex programming errors - see inc/obexfaults.h +*/ + + +/** +Category for Obex panics +@see TObexPanicCode +*/ +_LIT(KObexPanicCategory, "Obex"); + +/** +@publishedAll +@released + +All Obex panics which may be raised as a result of a client (i.e. external) programming error. +Internal Obex panics are errors listed in TObexFaultCode +@see TObexFaultCode +*/ +enum TObexPanicCode + { + /** A NULL value was supplied for the data buffer. Note that this + pointer can refer to either a memory buffer or a pointer to a RFile object. + @see CObexBufObject + */ + ENullPointer = 0, + + + /** The supplied buffer is of zero length. + @see CObexBufObject + */ + EEmptyBuffer = 1, + + + /** The header is not of the requested type. + @see CObexHeader + */ + EHeaderAsBadType = 2, + + + /** An unknown TFileBuffering value was supplied. + @see CObexBufObject + */ + EInvalidBufferStrategy = 3, + + + /** The RFile object does not point to a valid (open) file. + @see CObexBufObject + */ + ENullFileHandle = 4, + + + /** An unknown TObexBufferingDetails object was supplied to a buffer object. + @see CObexBufObject + */ + EInvalidBufferDetails = 5, + + + /** A call has been made to CObexServer::RequestIndicationCallback when no + asynchronous request is outstanding. + @see MObexNotifyAsync + @see CObexServer + */ + ENoNotificationToComplete = 6, + + + /** A call has been made to CObexServer::Start when an asynchronous request + is outstanding. + @see MObexNotifyAsync + @see CObexServer + */ + EChangeInterfaceDuringWait = 7, + + + + /** An invalid packet process event has been signalled. + */ + EBadPacketProcessEvent = 8, + + + /** An event is available for signalling, but there is no observer set. + */ + ENoPacketProcessObserverSet = 9, + + /** In CObexServer, a call has been made to RequestCompleteIndicationCallback(TObexResponse) + or RequestIndicationCallback(TObexResponse) with invalid response code or + RequestCompleteIndicationCallback(TInt) with invalid Symbian error code + */ + EInvalidResponseCodeFromServerApp = 10, + + /** In CObexServer, RequestCompleteIndicationCallback has been called in response to Put/GetRequestIndication + or ReuqestIndicationCallback has been called in response to Put/GetComplete or SetPath Indication + */ + EInvalidResponseCallback = 11, + + /** The last server response code has been requested prior to a response from the server. + */ + ENoResponseCodeToReturn = 12, + + /** Adding End of Body header when there is data in the object. + */ + EAddingInvalidEoBHeader = 13, + + /** A user has requested to override the handling of a request + packet at an invalid time. + */ + EOverrideRequestHandlingInBadState = 14, + }; + + + +/** +The category for obex transport panics +*/ +_LIT(KObexTransportPanicCat, "ObexTransPanics"); + +/** +Obex transport panics raised as a result of client programming error +*/ +enum TObexTransportPanicCode + { + /** + The number of transport implementations for a given transport name is more than what is allowed. + Check that there is not more than the allowed number of plugin resource files containing the same default + data and inteface uid. + */ + EInvalidNumberOfTransportImplementations = 0, + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,693 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXSERVER_H +#define __OBEXSERVER_H + +#include +#include +#include + +class TObexTransportInfo; +class CObexServerRequestPacketEngine; +class CObexPacketSignaller; +class MObexReadActivityObserver; + +/** OBEX server. + +CObexServer provides a framework for servicing OBEX requests from remote clients. +It is designed to be able to act as either a "default" application (in IrDA +terms, registering on the IrDA:OBEX IAS class), or as a application specific +server (registering itself on a private IAS class). + +You implement service-specific behaviour by providing a MObexServerNotify +interface implementation to the server object. The server calls the interface's +functions to provide notification of server events, which specific implementations +can process (or ignore) as appropriate. + +This class is not designed for user derivation. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CObexServer) : public CObex + { + // CObexServer is friends with the core Server State Machine class so + // that it can access the CObex::ControlledTransportDown() method + friend class CObexServerStateMachine; + + // CObexServer is friends with the TObexServerStateObexConnecting class so + // that it can access the CObex::SetConnectState(TConnectState aNewState) method + friend class TObexServerStateObexConnecting; + + // CObexServer is friends with the Server Request Packet Engine so that + // it can NULL the iServerRequestPacketEngine pointer ready for another + // extension interface + friend class CObexServerRequestPacketEngine; + +public: + /** + @publishedAll + @released + + The target header checking to apply to incoming connection requests. Defaults to + EIfPresent. + @see CObexServer::SetTargetChecking + */ + enum TTargetChecking + { + ENoChecking, /** Allow all target headers to connect. */ + EIfPresent, /** Only check target header in response to receiving one. Allows all clients + specifying an Inbox service to connect. */ + EAlways, /** Strict checking. Only allow connections if target header matches or no header + received and none expected. */ + }; + + IMPORT_C static CObexServer* NewL(TObexProtocolInfo& aObexProtocolInfoPtr); + IMPORT_C static CObexServer* NewL(TObexProtocolInfo& aObexProtocolInfoPtr, TObexProtocolPolicy& aObexProtocolPolicy); + IMPORT_C static CObexServer* NewL(TObexTransportInfo& aObexTransportInfo); + IMPORT_C ~CObexServer(); + IMPORT_C TInt Start(MObexServerNotify* aOwner); + IMPORT_C TInt Start(MObexServerNotifyAsync* aOwner); + IMPORT_C void Stop(); + IMPORT_C TBool IsStarted(); + IMPORT_C TOperation CurrentOperation() const; + void SetCurrentOperation(const TOperation aOperation); // used internally by state machine + IMPORT_C void SetChallengeL(const TDesC& aPassword); + IMPORT_C void ResetChallenge(); + IMPORT_C void UserPasswordL( const TDesC& aPassword); + IMPORT_C void SetTargetChecking(TTargetChecking aChecking); + IMPORT_C TInt SetPutFinalResponseHeaders(CObexHeaderSet* aHeaderSet); + IMPORT_C TInt RequestIndicationCallback(CObexBaseObject* aObject); + IMPORT_C TInt RequestIndicationCallbackWithError(TObexResponse aResponseCode); + IMPORT_C TInt RequestIndicationCallbackWithError(TInt aErrorCode); + IMPORT_C TInt RequestCompleteIndicationCallback(TObexResponse aResponseCode); + IMPORT_C TInt RequestCompleteIndicationCallback(TInt aErrorCode); + // @publishedPartner + IMPORT_C TInt PacketHeaders(CObexHeaderSet*& aHeaderSet); + IMPORT_C TInt PacketHeaders(CObexHeaderSet*& aHeaderSet, MObexHeaderCheck& aHeaderCheck); + IMPORT_C void SetReadActivityObserver(MObexReadActivityObserver* aObserver); + // @internalTechnology + IMPORT_C TAny* ExtensionInterfaceL(TUid aUid); + IMPORT_C const TObexTransportInfo* TransportInfo() const; + +public: + // Called from CObexNotifyExtendServer + void SignalPacketProcessEvent(TObexPacketProcessEvent aEvent); + + // Unexported functions used by the Server state machine + TBool CheckObjectForConnectionId(CObexBaseObject& aObject); + TBool CheckPacketForConnectionId(CObexPacket& aObject); + +private: + CObexServer(); + void ConstructL(TObexTransportInfo& aObexTransportInfo); + TInt AcceptConnection(); + // Implementation of CObex Events + virtual void OnPacketReceive(CObexPacket& aPacket); + virtual void OnError(TInt aError); + virtual void OnTransportUp(); + virtual void OnTransportDown(); + +public: + // These three functions need to be public so the Server state machine can use them + // However ParseConnectPacket cannot be moved as it is a virtual function (from CObex) + TInt PrepareConnectPacket(CObexPacket& aPacket); + TInt PrepareErroredConnectPacket(CObexPacket& aPacket); + void SignalReadActivity(); + TInt ParseConnectPacket(CObexPacket& aPacket); + +private: + TInt AddConnectionIDHeader(CObexPacket& aPacket); + TInt PrepareFinalChallResponse(CObexPacket& aPacket, TConnectState& aNextState); + void CheckTarget(TConnectState& aNextState, TInt& aRetVal); + void ResetConnectionID(); + void SetConnectionID(TUint32 aConnectionID); + TUint32 ConnectionID(); + void CheckServerAppResponseCode(TObexOpcode aOpcode, TObexResponse aResponse); + TInt DoPacketHeaders(CObexHeaderSet*& aHeaderSet, MObexHeaderCheck* aHeaderCheck); + +private: + MObexServerNotifyAsync* iOwner; + TBool iEnabled; + TBool iSpecDone; + TBool iTargetReceived; + TTargetChecking iTargetChecking; + TUint32 iConnectionID; + TBool iConnectionIdSet; + CObexHeader* iHeader; + CObexServerStateMachine* iStateMachine; + CObexServerNotifySyncWrapper* iSyncWrapper; + CObexServerRequestPacketEngine* iServerRequestPacketEngine; + CObexPacketSignaller* iPacketProcessSignaller; + }; + + +/** OBEX synchronous server notification interface. + +Any service that provides OBEX server functionality must implement one of the two +server observer classes -- this one or MObexServerNotifyAsync. + +The CObexServer object handles the protocol side of an OBEX server session, +while this class provides the server policy for a particular session. + +PUT and GET requests are handled synchronously, with the implementer returning a +CObexBufObject which will be processed immediately. + +@publishedAll +@released +@see MObexServerNotifyAsync +@see CObexServer +*/ +class MObexServerNotify + { +public: + /** + Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. + @param aInterface UID of the interface to return + @param aObject the container for another interface as specified by aInterface + */ + IMPORT_C virtual void MOSN_ExtensionInterfaceL(TUid aInterface, void*& aObject); + + /** Called if an OBEX protocol error occurs. + + It is only called for fatal errors that cause the OBEX connection to terminate. + An error that does not terminate the connection, for example the server issuing + a semantically valid, but unrecognised command, will not be indicated. + + @param aError Error code that describes the OBEX error. OBEX specific error + codes are listed from KErrIrObexClientNoDevicesFound. + + @publishedAll + @released + */ + virtual void ErrorIndication(TInt aError) =0; + + + + /** Called when the underlying transport connection is made from a remote + client to the server. + + Note that this does not, however, indicate an OBEX connection has been successfully + established. + + You can define any low-level connection policy here. It is also a good place + to set up the local connection information (CObex::LocalInfo()), if any non-defaults + are required. + + @publishedAll + @released + */ + virtual void TransportUpIndication() =0; + + + + /** Called when the transport connection is dropped (by either party). + + It is called whether the OBEX connection was gracefully disconnected or not. + The function is the definitive place for disconnection processing. + + @publishedAll + @released + */ + virtual void TransportDownIndication() =0; + + + + /** Called when an OBEX connection is made from a remote client. + + Override this function to provide any extra OBEX connection processing. + Despite this method returning a value, implementers cannot use this to + refuse the connection attempt. + + @param aRemoteInfo Connection information supplied by that remote machine + @param aInfo Further information about the requested connection (reserved) + @return Ignored + + @publishedAll + @released + */ + virtual TInt ObexConnectIndication(const TObexConnectInfo& aRemoteInfo, const TDesC8& aInfo) =0; + + + + /** Called on a (graceful) OBEX disconnection by the client. + + Override this to provide any extra processing OBEX disconnection processing. + + Note that this indication will not be raised if the remote machine simply + drops the transport connection. However, ErrorIndication() will be called + if the disconnection is unexpected/ invalid (i.e. another operation was in + progress at the time). In all cases, TransportDownIndication() will be called. + + @param aInfo Contains information about the disconnection (reserved) + + @publishedAll + @released + */ + virtual void ObexDisconnectIndication(const TDesC8& aInfo) =0; + + + + /** Called on receipt of the first packet of a (valid) put request. + + It is called before any parsing of the packet is performed, simply to establish + whether this server is interested in receiving objects at all. + + Note if the returned object cannot be initialised for receiving, ERespInternalError + is returned to the client. + + @return CObexBaseObject-derived object, which the object being put will be + parsed into. If this is NULL, ERespForbidden is returned to the client. + + @publishedAll + @released + */ + virtual CObexBufObject* PutRequestIndication() =0; + + + + /** Called on receipt of every packet of an OBEX PUT operation. + + It will always be preceded by a PutRequestIndication(). The object returned + by the request indication will be updated to reflect all the information received + concerning the object which the client is sending, from packets up to and + including the current one. + + You can use this function to provide periodic user notification on the progress + of the transfer (noting that the Length attribute may take an arbitrary number + of packets to become non-zero, and the constraints on its accuracy). Due to + the nature of OBEX operations, where any header attribute can be sent at any + point in the transfer, this is also a good place to marshal the details of + a received object, and possibly prompt for action on the received object (e.g. + renaming on filename clashes). + + Note that this function could be hit quite heavily, in proportion to the size + of the object transferred. Therefore more consideration should be given to + the speed of execution of this function than that of the other indications. + + @return KErrNone instructs the server to allow the client to continue the put + operation. Any other value cancels the operation with an appropriate OBEX + server response code. + + @publishedAll + @released + */ + virtual TInt PutPacketIndication() =0; + + + + /** Called after the final put packet has been successfully received and parsed. + + Note that there will not necessarily be a call to this function corresponding + to each PutRequestIndication() as, if an error occurs while the put is being + carried out, ErrorIndication() will be called instead. + + Before version 6.1, the return type was void. + + @return KErrNoneinstructs the remote client that the put completed successfully. + Any other value cancels the operation with an appropriate OBEX server response + code. + + @publishedAll + @released + */ + virtual TInt PutCompleteIndication() =0; + + + + /** Called when a full get request has been received from the client. + + aRequestedObject holds all the details about the object the remote client + has requested. Use this function to analyse the client's request, and return + a pointer to the object to be returned to the client, or NULL to return no + object. + + If NULL is returned, the server will send ERespForbidden to the client; if + an error occurs in returning the object, ERespInternalError is returned, otherwise + the returned object is sent back to the client. + + @param aRequiredObject Details about the object the remote client has requested + @return Object to return to the client + + @publishedAll + @released + */ + virtual CObexBufObject* GetRequestIndication(CObexBaseObject *aRequiredObject) =0; + + + + /** Called for every packet of get reply sent by the server back to the client. + + The function is only called while an object is being sent to the client, not + while the client is providing its initial specification for the object it + requires. + + You can use this function to provide user notification on the object being + sent, and its progress. As with PutPacketIndication(), you should consider + that this function might get called often, especially for large objects and + small OBEX packet sizes, so the speed of execution here is important. + + @return KErrNone to continue sending the object, or any other error code to + cancel the operation + + @publishedAll + @released + */ + virtual TInt GetPacketIndication() =0; + + + + /** Called when the final packet of the object has been returned to the client. + + Note like PutCompleteIndication(), this function might not be called for each + GetRequestIndication(), if the operation is interrupted by an error. + + Before version 6.1, the return type was void. + + @return KErrNoneinstructs the remote client that the get completed successfully. + Any other value cancels the operation with an appropriate OBEX server response + code. + + @publishedAll + @released + */ + virtual TInt GetCompleteIndication() =0; + + + + /** Called when an OBEX SETPATH command is received by the server. + + @param aPathInfo SETPATH command parameters + @param aInfo Not currently used + @return System wide error code indicating the success of the setpath command + + @publishedAll + @released + */ + virtual TInt SetPathIndication(const CObex::TSetPathInfo& aPathInfo, const TDesC8& aInfo) =0; + + + + /** Called when an abort packet is received from the client. + + An OBEX abort command simply cancels the current operation, and does not necessarily + have to cause the connection to be dropped. On return, a ERespSuccess packet + is sent to the client. + + @publishedAll + @released + */ + virtual void AbortIndication() =0; + }; + + + +/** OBEX asynchronous server notification interface. + +Any service that provides OBEX server functionality must implement one of the two +server observer classes -- this one or MObexServerNotify. + +The CObexServer object handles the protocol side of an OBEX server session, +while this class provides the server policy for a particular session. + +PUT and GET requests are handled asynchronously, with the upcall from the server +being followed at some stage in the future by a call to CObexServer::RequestIndicationComplete +to trigger processing. + +@publishedAll +@released +@see MObexServerNotify +@see CObexServer +*/ +class MObexServerNotifyAsync + { +public: + + /** + Returns a null aObject if the extension is not implemented, or a pointer to another + interface if it is. + @param aInterface UID of the interface to return + @param aObject the container for another interface as specified by aInterface + */ + IMPORT_C virtual void MOSNA_ExtensionInterfaceL(TUid aInterface, void*& aObject); + + + + /** Called if an OBEX protocol error occurs. + + It is only called for fatal errors that cause the OBEX connection to terminate. + An error that does not terminate the connection, for example the server issuing + a semantically valid, but unrecognised command, will not be indicated. + + @param aError Error code that describes the OBEX error. OBEX specific error + codes are listed from KErrIrObexClientNoDevicesFound. + + @publishedAll + @released + */ + virtual void ErrorIndication(TInt aError) =0; + + + + /** Called when the underlying transport connection is made from a remote + client to the server. + + Note that this does not, however, indicate an OBEX connection has been successfully + established. + + You can define any low-level connection policy here. It is also a good place + to set up the local connection information (CObex::LocalInfo()), if any non-defaults + are required. + + @publishedAll + @released + */ + virtual void TransportUpIndication() =0; + + + + /** Called when the transport connection is dropped (by either party). + + It is called whether the OBEX connection was gracefully disconnected or not. + The function is the definitive place for disconnection processing. + + @publishedAll + @released + */ + virtual void TransportDownIndication() =0; + + + + /** Called when an OBEX connection is made from a remote client. + + Override this function to provide any extra OBEX connection processing. + + @param aRemoteInfo Connection information supplied by that remote machine + @param aInfo Further information about the requested connection (reserved) + + @publishedAll + @released + */ + virtual void ObexConnectIndication(const TObexConnectInfo& aRemoteInfo, const TDesC8& aInfo) =0; + + + + /** Called on a (graceful) OBEX disconnection by the client. + + Override this to provide any extra processing OBEX disconnection processing. + + Note that this indication will not be raised if the remote machine simply + drops the transport connection. However, ErrorIndication() will be called + if the disconnection is unexpected/ invalid (i.e. another operation was in + progress at the time). In all cases, TransportDownIndication() will be called. + + @param aInfo Contains information about the disconnection (reserved) + + @publishedAll + @released + */ + virtual void ObexDisconnectIndication(const TDesC8& aInfo) =0; + + + + /** Called on receipt of the first packet of a (valid) put request. + + It is called before any parsing of the packet is performed, simply to establish + whether this server is interested in receiving objects at all. + + Following this notification, the server will wait for a call to + CObexServer::RequestIndicationCallback supplying a CObexBaseObject derived + object to receive into or a response code specifying the error. + + @publishedAll + @released + */ + virtual void PutRequestIndication() =0; + + + + /** Called on receipt of every packet of an OBEX PUT operation. + + It will always be preceded by a PutRequestIndication(). The object returned + by the request indication will be updated to reflect all the information received + concerning the object which the client is sending, from packets up to and + including the current one. + + You can use this function to provide periodic user notification on the progress + of the transfer (noting that the Length attribute may take an arbitrary number + of packets to become non-zero, and the constraints on its accuracy). Due to + the nature of OBEX operations, where any header attribute can be sent at any + point in the transfer, this is also a good place to marshal the details of + a received object, and possibly prompt for action on the received object (e.g. + renaming on filename clashes). + + Note that this function could be hit quite heavily, in proportion to the size + of the object transferred. Therefore more consideration should be given to + the speed of execution of this function than that of the other indications. + + @return KErrNone instructs the server to allow the client to continue the put + operation. Any other value cancels the operation with an appropriate OBEX + server response code. + + @publishedAll + @released + */ + virtual TInt PutPacketIndication() =0; + + + + /** Called after the final put packet has been successfully received and parsed. + + Note that there will not necessarily be a call to this function corresponding + to each PutRequestIndication() as, if an error occurs while the put is being + carried out, ErrorIndication() will be called instead. + + Following this notification, the server will wait for a call to + CObexServer::RequestCompleteIndicationCallback supplying a Obex response code. + + @publishedAll + @released + */ + virtual void PutCompleteIndication() =0; + + + + /** Called when a full get request has been received from the client. + + aRequestedObject holds all the details about the object the remote client + has requested. Use this function to analyse the client's request, and return + a pointer to the object to be returned to the client, or NULL to return no + object. + + Following this notification, the server will wait for a call to + CObexServer::RequestIndicationCallback supplying a CObexBaseObject derived + object to send to the client or a response code specifying the error. + + @param aRequiredObject Details about the object the remote client has requested + + @publishedAll + @released + */ + virtual void GetRequestIndication(CObexBaseObject* aRequiredObject) =0; + + + + /** Called for every packet of get reply sent by the server back to the client. + + The function is only called while an object is being sent to the client, not + while the client is providing its initial specification for the object it + requires. + + You can use this function to provide user notification on the object being + sent, and its progress. As with PutPacketIndication(), you should consider + that this function might get called often, especially for large objects and + small OBEX packet sizes, so the speed of execution here is important. + + @return KErrNone to continue sending the object, or any other error code to + cancel the operation + + @publishedAll + @released + */ + virtual TInt GetPacketIndication() =0; + + + + /** Called when the final packet of the object has been returned to the client. + + Note like PutCompleteIndication(), this function might not be called for each + GetRequestIndication(), if the operation is interrupted by an error. + + Following this notification, the server will wait for a call to + CObexServer::RequestCompleteIndicationCallback supplying a Obex response code. + + @publishedAll + @released + */ + virtual void GetCompleteIndication() =0; + + + + /** Called when an OBEX SETPATH command is received by the server. + + Following this notification, the server will wait for a call to + CObexServer::RequestCompleteIndicationCallback supplying a Obex response code. + + @param aPathInfo SETPATH command parameters + @param aInfo Not currently used + + @publishedAll + @released + */ + virtual void SetPathIndication(const CObex::TSetPathInfo& aPathInfo, const TDesC8& aInfo) =0; + + + + /** Called when an abort packet is received from the client. + + An OBEX abort command simply cancels the current operation, and does not necessarily + have to cause the connection to be dropped. On return, a ERespSuccess packet + is sent to the client. + + @publishedAll + @released + */ + virtual void AbortIndication() =0; + + + + /** Cancel an asynchronous callback request (ie. PutRequest/GetRequest/PutComplete/GetComplete/SetPath + notification). + + Note that ignoring this call will lead to a panic when the indication callback function + is called. + + @publishedAll + @released + */ + virtual void CancelIndicationCallback() =0; + }; + + +#endif // __OBEXSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obextransportinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obextransportinfo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,82 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __OBEXTRANSPORTINFO_H__ +#define __OBEXTRANSPORTINFO_H__ + +#include + +/** +This class is a combination of the TObexProtocolInfo and TObexProtocolPolicy +classes. +This class is designed for licensee derivation, to support novel transport +controllers. Existing superclasses include @c TObexUsbTransportInfo, @c +TObexUsbV2TransportInfo, @c TObexBtTransportInfo and @c TObexIrTransportInfo. +It is also designed for 3rd party instantiation, for use when creation a +CObexServer or a CObexClient. + +Note that, being a T-type, this type and all derived types must hold data by +value, to support bitwise copying. + +@publishedAll +@released +*/ +class TObexTransportInfo + { +public: + /** + The type of the transport over which obex will run. + The size of the buffer is chosen for historical reasons. This is the size + originally used by TObexProtocolInfo. + @publishedAll + @released + */ + TBuf<60> iTransportName; + + /** + The version of the protocol policy format that this class supports + @publishedAll + @released + */ + TUint16 iVersion; + + /** + The maximum size of the receive packet buffer for the policy + @publishedAll + @released + */ + TUint16 iReceiveMtu; + + /** + The maximum size of the transmit packet buffer for the policy + @publishedAll + @released + */ + TUint16 iTransmitMtu; + + /** */ + TUint16 iFuture1; + + /** */ + TUint32 iFuture2; + + /** */ + TInt iFuture3; + + /** */ + TInt iFuture4; + }; + +#endif // __OBEXTRANSPORTINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obextypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obextypes.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,69 @@ +// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __OBEXTYPES_H +#define __OBEXTYPES_H + +#include +#include +#include +#include // Required for source compatability +#include +#include + +class TObexProtocolInfo; +class TObexIrProtocolInfo; +class TObexBluetoothProtocolInfo; +class TObexUsbProtocolInfo; +class TObexUsbProtocolInfoV2; +class TObexProcotolPolicy; +struct TObexConnectionInfo; +class TObexConnectInfo; + +class CObexPacket; +class CObexHeader; +class CObexUnderlyingHeader; +class MObexHeaderCheck; +class CObexHeaderSet; +class CObexBaseObject; +class CObexFileObject; +class CObexBufObject; +class CObexNullObject; +class MObexNotify; +class MObexAuthChallengeHandler; +class CObexTransport; +class CObexConnector; +class TObexInternalHeader; +class CObexAuthenticator; +class CObex; +class TObexSetPathData; +class CObexClient; +class MObexServerNotify; +class CObexServer; +class CObexServerStateMachine; +class MObexServerNotify; +class MObexServerNotifyAsync; +class CObexServerNotifySyncWrapper; + + +#endif // __OBEXTYPES_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/obexusbtransportinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/obexusbtransportinfo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __OBEXUSBTRANSPORTINFO_H__ +#define __OBEXUSBTRANSPORTINFO_H__ + +#include "obextransportinfo.h" +#include + +/** +Concrete transport info type for use when using the usb transport controller. +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexUsbTransportInfo) : public TObexTransportInfo + { +//Data from TObexUsbProtocolInfo class, declared in obex\public\obexconstants.h +public: + /** Provides a string to be attached to the Obex function's Communication Class interface, + which may be used to identify the Obex service. */ + TBuf16 iInterfaceStringDescriptor; + }; + +/** +Concrete transport info type when using the USB transport controller with client driver extensions. +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TObexUsbV2TransportInfo) : public TObexUsbTransportInfo + { + + //Data from TObexUsbProtocolInfoV2 class, declared in obex\public\obexconstants.h +public: + /** Bitmap containing the bandwidth priorities to use on IN and OUT endpoints + @see TUsbcBandwidthPriority + */ + TInt iBandwidthPriority; + /** Specifies whether to use DMA on the bulk OUT endpoint */ + TBool iDmaOnOutEndpoint; + /** Specifies whether to use DMA on the bulk IN endpoint */ + TBool iDmaOnInEndpoint; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/playerinformationtarget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/playerinformationtarget.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,171 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONPLAYERINFORMATIONTARGET_H +#define REMCONPLAYERINFORMATIONTARGET_H + +#include +#include +#include + +#include +#include +#include +#include + +class CRemConInterfaceSelector; +class CPlayerApplicationSettings; + +// This is the maximum length of the player application setting attribute and value strings +const TInt KMaxPlayerApplicationSettingsValue = 255 ; +// This is the minimum length of the player application setting attribute and value strings +const TInt KMinPlayerApplicationSettingsValue = 1 ; + +/** +Client-instantiable class supporting player information responses. +This is the container class for the three interface parts +*/ +NONSHARABLE_CLASS(CPlayerInfoTarget) : public CRemConInterfaceBase, + public MRemConInterfaceIf2, + private MPlayerCapabilitiesObserver, + private MPlayerApplicationSettingsObserver, + private MPlayerEventsObserver + + { +public: + /** + Factory function. + @param aInterfaceSelector The interface selector. The client must have + created one of these first. + @param aPlayerCapabilitiesObserver Returns a pointer to a MPlayerCapabilitiesObserver for this interface, owned by the CPlayerInfoTarget. + @param aPlayerApplicationSettingsObserver Returns a pointer to a MPlayerApplicationSettingsObserver for this interface, owned by the CPlayerInfoTarget + @param aPlayerEventsObserver Returns a pointer to a MPlayerEventsObserver for this interface, owned by the CPlayerInfoTarget + @return A new CPlayerInfoTarget, owned by the interface selector. + */ + IMPORT_C static CPlayerInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, + MPlayerCapabilitiesObserver*& aPlayerCapabilitiesObserver, + MPlayerApplicationSettingsObserver*& aPlayerApplicationSettingsObserver, + MPlayerEventsObserver*& aPlayerEventsObserver, + MPlayerApplicationSettingsNotify& aApplicationSettingNotifier ); + + /** Destructor */ + IMPORT_C ~CPlayerInfoTarget(); + + + +private: + /** + Constructor. + @param aInterfaceSelector The interface selector. + */ + CPlayerInfoTarget(CRemConInterfaceSelector& aInterfaceSelector, MPlayerApplicationSettingsNotify& aApplicationSettingNotifier ); + + void ConstructL(MPlayerCapabilitiesObserver*& aPlayerCapabilitiesObserver, + MPlayerApplicationSettingsObserver*& aPlayerApplicationSettingsObserver, + MPlayerEventsObserver*& aPlayerEventsObserver ); + +private: // from CRemConInterfaceBase + TAny* GetInterfaceIf(TUid aUid); + +private: // from MRemConInterfaceIf + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData, TRemConMessageSubType aMsgSubType); + +private: + // Bearer attributes (settings) processing + void ProcessListPlayerApplicationAttributes( TInt aOperationId ); + void ProcessGetPlayerApplicationAttributeText( const TDesC8& aData, TInt aOperationId ); + void ProcessListPlayerApplicationValues( const TDesC8& aData, TInt aOperationId ); + void ProcessGetPlayerApplicationValueText( const TDesC8& aData, TInt aOperationId ); + void ProcessGetCurrentPlayerApplicationValue( const TDesC8& aData, TInt aOperationId ); + void ProcessSetPlayerApplicationValue( const TDesC8& aData, TInt aOperationId ); + + // Bearer attributes (settings) API implementation from MPlayerApplicationSettingsObserver + void DoDefineAttributeL(TUint aAttributeID, TDesC8& aAttributeText, RArray &aValues, RArray &aValueTexts, TUint aInitialValue); + void DoSetAttributeL(TUint aAttributeID, TUint aValue); + + // Notifier Events API implementation from MPlayerEventsObserver + void DoPlaybackStatusChanged(TPlaybackStatus aStatus); + void DoTrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds); + void DoTrackReachedEnd(); + void DoTrackReachedStart(); + void DoSetPlaybackPosition(TUint32 aMilliseconds); + void DoSetBatteryStatus(TTargetBatteryStatus aBatteryStatus); + + // Notifier Events bearer processing + void ProcessGetPlayStatus(); + void ProcessGetStatusAndBeginObserving(TUint aOperationId, TRegisterNotificationEvent aEventId, const TDesC8& aData); + void ProcessGetStatus(TUint aOperationId, TRegisterNotificationEvent aEventId); + void SendNotificationResponse(TRegisterNotificationEvent aEventId, TRemConMessageSubType aMsgSubType); + + // Capabilities API implementation from MPlayerCapabilitiesObserver + void DoClearEvents(); + TInt DoAddEvent(TRegisterNotificationEvent aEvent); + TInt DoRemoveEvent(TRegisterNotificationEvent aEvent); + void DoClearCompanyIds(); + TInt DoAddCompanyId(TInt aID); + TInt DoRemoveCompanyID(TInt aID); + + // Capabilities bearer processing + void ProcessGetCapabilities( const TDesC8& aData ); + + // Miscellaneous + TBool AttributeSettingExists(TUint anAttribute); + TBool IsValidAttributeValue(TUint anAttributeId, TUint aAttributeValue); + TBool AttributeValueCanBeSet(TUint anAttributeId, TUint aAttributeValue); + void SendError(TInt, TInt); + void SendError(TInt, TInt, TRemConMessageSubType aSubType); + CPlayerApplicationSettings* GetSetting(TUint anAttribute); + +private: // owned + RBuf8 iOutBuf; + + MPlayerApplicationSettingsNotify& iApplicationSettingNotifier; + + // data for MPlayerEventsObserver + TPlaybackStatus iPlayBackStatus; + TUint64 iTrackId; + TUint32 iLengthInMilliseconds; + TPlayPosition iTrackPosition; + + // The time interval (received as part if the RegisterNotification) + // in which the change in playback position will be notified + TUint32 iPlayBackIntervalInMilliseconds; + + TTargetBatteryStatus iBatteryStatus; + TUint32 iPlaybackPositionInMilliseconds; + TUint32 iLastNotifiedPlaybackPositionInMilliseconds; + + // data for MPlayerCapabilitiesObserver + RArray iSupportedNotificationEventList; + RArray iCompanyIdList; + + // list of events for which notifications have been request + RArray iPendingNotificationEventList; + + // Attribute (settings) data MPlayerApplicationSettingsObserver + RHashMap iPlayerApplicationSettings; + + }; + + +#endif // REMCONPLAYERINFORMATIONTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/playerinformationtargetobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/playerinformationtargetobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,300 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONPLAYERINFORMATIONTARGETOBSERVER_H +#define REMCONPLAYERINFORMATIONTARGETOBSERVER_H + +#include +#include +#include + + +/** +This class is used to define the capabilities of the current application, +and the implementation will generate AVRCP responses to the controller. +For the event part of the API, it is recommended to add all events which make +sense for the media player. In general, this will be everything except +ESystemStatusChanged. The company ID part of the API is only needed if +the media player needs to support vendor extensions other than bluetooth SIG. +The bluetooth SIG company ID is always included in responses to a COMPANY_ID request. +*/ +class MPlayerCapabilitiesObserver + { + public: + /** + Remove all notification events from the supported list + */ + IMPORT_C void ClearEvents(); + /** + Add a notification event to the supported list of events + The AVRCP 1.3 specification mandates that PlaybackStatusChanged + and TrackChanged events must be supported; KErrAlreadyExists will + be returned if AddEvent() is called with either of these events. + @param aEvent the event to add + @return KErrAlreadyExists if the event is already present. + KErrNotSupported if the event isn't supported by the implementation, e.g.. ESystemStatusChanged + */ + IMPORT_C TInt AddEvent(TRegisterNotificationEvent aEvent); + /** + Remove a notification event from the supported list of events + The AVRCP 1.3 specification mandates that PlaybackStatusChanged + and TrackChanged events must be supported; KErrNotSupported will + be returned if RemoveEvent() is called with either of these events. + @param aEvent the event to remove + @return KErrNone if this completes successfully, KErrNotFound if aID + was not in the list, or any other system wide error code. + */ + IMPORT_C TInt RemoveEvent(TRegisterNotificationEvent aEvent); + + const static TInt KMaxCompanyID = 0xFFFFFF; + const static TInt KMaxNrOfCompanyIDs = 255; + + /** + Remove all additional company IDs from the supported list + */ + IMPORT_C void ClearCompanyIds(); + /** + Add a company id to the supported list of company ids. + The AVRCP 1.3 specification mandates that the Bluetooth SIG vendor id + must be supported; KErrAlreadyExists will be returned if AddCompanyId() + is called with this company id. + @param aID the id to add + @return KErrNone if this completes successfully, + KErrAlreadyExists if aID is already present, + KErrOverflow if the maximum number of company ids are already listed, + or any other system wide error code. + */ + IMPORT_C TInt AddCompanyId(TInt aID); + /** + Remove a company id from the list of supported vendor extensions. + The Bluetooth SIG id can't be removed, as this must always be supported + @param aID the id to remove + @return KErrNone if this completes successfully, KErrNotFound if aID + was not in the list, or any other system wide error code. + */ + IMPORT_C TInt RemoveCompanyID(TInt aID); + + private: + virtual void DoClearEvents() = 0; + virtual TInt DoAddEvent(TRegisterNotificationEvent aEvent) = 0; + virtual TInt DoRemoveEvent(TRegisterNotificationEvent aEvent) = 0; + virtual void DoClearCompanyIds() = 0; + virtual TInt DoAddCompanyId(TInt aID) = 0; + virtual TInt DoRemoveCompanyID(TInt aID) = 0; + }; + +/** +This class is for supporting the player application settings PDUs in AVRCP1.3 +specification section 5.2. The RegisterNotification PDU for +EVENT_PLAYER_APPLICATION_SETTING_CHANGED is also supported through this API. + +The media player should first define all the attributes it supports, using +DefineAttributeL. When an attribute's value is changed by the media player, +it should call SetAttributeL to inform the controller. When the controller +changes a setting, the media player application receives a callback via the +MPlayerApplicationSettingsNotify interface +*/ +class MPlayerApplicationSettingsObserver + { + public: + /** + Define an attribute supported by this player. + It will be included in future responses to the following PDUs: + ListPlayerApplicationSettingAttributes, + ListPlayerApplicationSettingValues, + GetCurrentPlayerApplicationSettingValue, + GetPlayerApplicationSettingAttributeText, + GetPlayerApplicationSettingValueText, + @param aAttributeID The specification or player defined attribute + @param aAttributeText The UTF8 text name of the attribute(allowed text length is 1-255) - the API will take a copy + @param aValues The list of defined values + @param aValueTexts The UTF8 text for each defined value(allowed text length is 1-255) - The API will make copies. + @param aInitialValue The initial value for this attribute + @leave KErrNoMemory if memory could not be allocated to store the copies of aAttributeID and relative settings + @leave KErrNotSupported if attribute or value is out of specification defined range, + or aValueTexts is not equal length to aValues + */ + IMPORT_C void DefineAttributeL(TUint aAttributeID, + TDesC8& aAttributeText, + RArray &aValues, + RArray &aValueTexts, + TUint aInitialValue); + + /** + Set the current value of a previously defined attribute + This updates the cache and will cause completion of a + pending EVENT_PLAYER_APPLICATION_SETTING_CHANGED notification PDU + @param aAttributeID The specification or player defined attribute + @param aValue The current value + @leave KErrNotFound if the attribute is not defined, + KErrArgument if the value is not valid according to the definition + */ + IMPORT_C void SetAttributeL(TUint aAttributeID, TUint aValue); + + private: + virtual void DoDefineAttributeL(TUint aAttributeID, + TDesC8& aAttributeText, + RArray &aValues, + RArray &aValueTexts, + TUint aInitialValue) = 0; + virtual void DoSetAttributeL(TUint aAttributeID, TUint aValue) = 0; + + }; + +/** +This is a helper API allowing CPlayerApplicationSettings to be initialised +via a resource file. Using a resource file may help to provide localised text +for the attributes and values, according to current language setting of the phone. +*/ +class PlayerApplicationSettingsResourceInit + { + public: + /** + Defines multiple attributes supported by this player, which are listed in a resource file. + @param aSettings The CPlayerApplicationSettings object on which the attributes should be defined + @param aResource A fully constructed CResourceFile + @leave KErrNoMemory, or leave from CResourceFile functions + */ + IMPORT_C static void DefineAttributesL(MPlayerApplicationSettingsObserver& aSettings, CResourceFile &aResource); + }; + +/** +This class supports the notification PDUs in AVRCP1.3 specification section 5.4, +with the following exceptions: + EVENT_SYSTEM_STATUS_CHANGED is not supported, it is only for adaptors that plug into a media player + EVENT_PLAYER_APPLICATION_SETTING_CHANGED is supported through the CPlayerApplicationSettings API + +Events are pushed by the media player calling functions in this API, where they are +cached until the controller pulls them via a GetPlayStatus or RegisterNotification PDU +@see CPlayerApplicationSettings +*/ +class MPlayerEventsObserver + { + public: + enum TTargetBatteryStatus + { + ENormal = 0, + EWarning = 1, + ECritical = 2, + EExternal = 3, + EFullCharge = 4, + EUnknown = 5 + }; + + enum TPlaybackStatus + { + EStopped = 0, + EPlaying = 1, + EPaused = 2, + EFwdSeek = 3, + ERevSeek = 4, + EError = 0xFF + }; + + enum TPlayPosition + { + EStart = 0, + EMiddle = 1, + EEnd= 2, + }; + + static const TUint64 KNoTrackSelected = KMaxTUint64; + + static const TUint32 KPlaybackPositionUnknown = 0xFFFFFFFF; + + /** + Call this function whenever the playback status changes. + It will be used to complete pending EVENT_PLAYBACK_STATUS_CHANGED + and EVENT_PLAYBACK_POS_CHANGED notifications. + The value is used to generate the response to a GetPlayStatus PDU. + @param aStatus The specification defined playback status + */ + IMPORT_C void PlaybackStatusChanged(TPlaybackStatus aStatus); + /** + Call this function whenever the current media track is changed. + use KNoTrackSelected to indicate that there is no media selected. + This is the default value on construction. It will be used to + complete pending EVENT_TRACK_CHANGED and EVENT_PLAYBACK_POS_CHANGED notifications. + The values are used to generate the response to a GetPlayStatus PDU. + @param aTrackId A handle to the current track. + @param aLengthInMilliseconds The length of the current track. + */ + IMPORT_C void TrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds); + /** + Call this function whenever the current track reaches the end position, + e.g. due to playback or forward seek. It will be used to complete + pending EVENT_TRACK_REACHED_END and EVENT_PLAYBACK_POS_CHANGED notifications. + */ + IMPORT_C void TrackReachedEnd(); + /** + Call this function whenever the current track reaches the start position, + e.g. due to reverse seek (rewind). It will be used to complete pending + EVENT_TRACK_REACHED_START and EVENT_PLAYBACK_POS_CHANGED notifications. + */ + IMPORT_C void TrackReachedStart(); + /** + Call this function during playback or seek operations, to indicate the + current position within the track. It will be used to complete a pending + EVENT_PLAYBACK_POS_CHANGED notification. The value is used to generate the + response to a GetPlayStatus PDU. + @param aMilliseconds The current playback position. It is recommended to call + with a resolution <=1000ms to satisfy the 1s resolution of the notification + playback interval. + */ + IMPORT_C void SetPlaybackPosition(TUint32 aMilliseconds); + + /** + Call this function to report the current battery status + @param aBatteryStatus The current battery status. + */ + IMPORT_C void SetBatteryStatus(TTargetBatteryStatus aBatteryStatus); + + private: + virtual void DoPlaybackStatusChanged(TPlaybackStatus aStatus) = 0; + virtual void DoTrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds) = 0; + virtual void DoTrackReachedEnd() = 0; + virtual void DoTrackReachedStart() = 0; + virtual void DoSetPlaybackPosition(TUint32 aMilliseconds) = 0; + virtual void DoSetBatteryStatus(TTargetBatteryStatus aBatteryStatus) = 0; + + + }; + +/** +Clients must implement this interface if they require callbacks +when the controller has changed the settings via a SetPASValue message +*/ +class MPlayerApplicationSettingsNotify + { + public: + /** + This is called when the controller has changed a setting + @param aAttributeID A list of attribute IDs whose value has changed. + @param aAttributeValue A list of new values for the attributes listed in aAttributeID. + */ + virtual void MpasnSetPlayerApplicationValueL(const RArray& aAttributeID, + const RArray& aAttributeValue)=0; + }; + + +#endif // REMCONPLAYERINFORMATIONTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/pragmamessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/pragmamessage.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,32 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Created at: 20-Dec-99 10:38:03 AM +// Defines a macro for the file line pragma message +// +// + + +#if !defined __PRAGMAMESSAGE_H__ +#define __PRAGMAMESSAGE_H__ + +#define _QUOTE(x) # x +#define QUOTE(x) _QUOTE(x) + +// Use __FILE__LINE__ as a string containing "File.x(line#)" for example: +// #pragma message( __FILE__LINE__ "Remove this line after testing.") +// The above example will display the file name and line number in the build window +// in such a way as to allow you to double click on it to go to the line. +#define __FILE__LINE__ __FILE__ "(" QUOTE(__LINE__) ") : " + +#endif // __PRAGMAMESSAGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/prninf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/prninf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,254 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __PRNINF_H__ +#define __PRNINF_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__GDI_H__) +#include +#endif +#if !defined(__FLDBASE_H__) +#include +#endif + +// Classes defined +//class TPageNumbers; +class CHeaderFooter; +class TPrintParameters; +class TPageMargins; +class MPrintProcessObserver; + +// classes referenced +class RReadStream; +class RWriteStream; +class CRichText; +class CParaFormatLayer; +class CCharFormatLayer; +class MFieldFileNameInfo; +class MFieldPageNumInfo; +class MFieldNumPagesInfo; +////////////////// + + +class TPrintParameters +/** Print parameters. + +This data is associated with a particular print request, not with the document +to be printed, so is separate from the print setup information. + +An object of this class is passed to CPrintSetup::StartPrintL() and to CPrintSetup::StartPreviewPrintL(). + +@see CPrintSetup +@publishedAll +@released */ + { +public: + IMPORT_C TPrintParameters(); // sets to 1,0,0 +public: + /** The number of copies to print. */ + TInt iNumCopies; + /** The first page to be printed. + + This value should be less than or equal to iLastPage. Zero indicates the first page + in the document. */ + TInt iFirstPage; + /** The last page to be printed. + + This value should be greater than or equal to iFirstPage. Zero indicates the first + page in the document. */ + TInt iLastPage; + }; + +class TPageMargins +/** Page margins. + +Page margins are accessed via the public iPageMarginsInTwips member of class +CPrintSetup. A single margin settings object applies throughout a document, +so that gutter margins are not supported. + +If the document contains headers and footers, they are located within the +top and bottom margins respectively. + +@publishedAll +@released */ + { +public: + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C void ExternalizeL(RWriteStream& aStream)const; +public: + /** The distance between the top of the header and the top of the page in twips + or pixels. + + This must be less than the height of the top margin to ensure that the header + is visible. */ + TInt iHeaderOffset; + /** The distance between the top of the footer and the top of the bottom margin + in twips or pixels. + + This must be less than the height of the bottom margin to ensure that the + footer is visible. */ + TInt iFooterOffset; + /** The widths of each of the four margins in twips or pixels. + + @see TMargins */ + TMargins iMargins; + }; + +class CHeaderFooter : public CBase, private MTextFieldFactory +/** A document header or footer. + +The header is located in the top page margin and the footer in the +bottom page margin. No more than one header or footer can exist in a document. + +CHeaderFooter derives from MTextFieldFactory. This allows the insertion of +various fields, including page number, current date or time and filename. + +Rich text manipulation and formatting functions can be accessed through +the rich text object which is owned by the header/footer. + +The header and footer are retrieved using the CPrintSetup::Header() and Footer() +functions and they are stored and restored together with the rest of the print +setup information. + +@publishedAll +@released */ + { +public: + IMPORT_C static CHeaderFooter* NewL(); + IMPORT_C virtual ~CHeaderFooter(); + // + IMPORT_C void CreateTextL(); + IMPORT_C void SetFirstPageToPrintTo(TInt aPageNum); // allows the first few pages of a doc not to have a header on them + inline TInt FirstPageToPrintTo()const; // relative to the first page being numbered 0 + // + // persistence + IMPORT_C TStreamId StoreL(CStreamStore& aStore)const; + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aStreamId,MPictureFactory* aFactory); + IMPORT_C void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)const; + IMPORT_C void RestoreComponentsL(const CStreamStore& aStore,MPictureFactory* aFactory); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C void InternalizeL(RReadStream& aStream); + // + // text bits + IMPORT_C CRichText* Text()const; + IMPORT_C CParaFormatLayer* ParaFormat()const; + IMPORT_C CCharFormatLayer* CharFormat()const; + IMPORT_C void SetText(CRichText* aText); // takes ownership + IMPORT_C void SetParaFormat(CParaFormatLayer* aParaFormat); // takes ownership + IMPORT_C void SetCharFormat(CCharFormatLayer* aCharFormat); // takes ownership + // + // field bits + IMPORT_C void SetFileNameInfo(const MFieldFileNameInfo& aFileNameInfo); // call if you want headers/footers to support filename fields + IMPORT_C void SetNumPagesInfo(const MFieldNumPagesInfo& aNumPagesInfo); // call if you want headers/footers to support "total number of pages" fields + inline MFieldFileNameInfo* FileNameFieldInfo()const; + inline MFieldNumPagesInfo* NumPagesFieldInfo()const; + // + void SetPageNumInfo(const MFieldPageNumInfo& aPageNumInfo); // called by CPrintSetup +private: + CHeaderFooter(); + void CreateFormatLayersL(); + // from MTextFieldFactory + CTextField* NewFieldL(TUid aFieldType); +private: + TInt iFirstPageToPrintTo; // relative to the first page being numbered 0 + MFieldFileNameInfo* iFileNameInfo; + MFieldPageNumInfo* iPageNumInfo; + MFieldNumPagesInfo* iNumPagesInfo; + CRichText* iText; // RichText Doc Handle + CParaFormatLayer* iParaLayer; + CCharFormatLayer* iCharLayer; +private: + enum { ETextExists = 0x0001 }; + }; + +class MPrintProcessObserver +/** Print progress and status notification interface class. + +The notification functions are called before, during and after a print or +print preview operation, to give notification of its progress. + +The print process observer will often be the GUI's standard print progress +or print preview dialog. + +An object of a class which implements this interface may be passed as a parameter +to CPrintSetup::StartPrintL(), or to CPrintSetup::StartPreviewPrintL(). + +@publishedAll +@released */ + { +public: + /** Notifies that a print or print preview operation is about to begin. + + It may be used to display information about the document to be printed. It + is called once, immediately before printing or print previewing begins. + + When subclassing, add variables to store initialisation information as required. + + @param aPrintParams The parameters for the print job. */ + virtual void NotifyPrintStarted(TPrintParameters aPrintParams)=0; + /** Notifies that a band is about to be printed. + + It may be used to display print progress information, including the current + page number. It is called immediately before each band is printed. + + @param aPercentageOfPagePrinted The percentage of the page that has been printed. + @param aCurrentPageNum The number of the page currently being printed. + @param aCurrentCopyNum The number of the copy currently being printed (if multiple + copies are being printed). */ + virtual void NotifyBandPrinted(TInt aPercentageOfPagePrinted, TInt aCurrentPageNum, TInt aCurrentCopyNum)=0; + /** Notifies that the print or print preview operation has completed. + + It may be used to display information about how the operation completed, for + example any errors that occurred. It is called once, immediately after the + print job terminates. + + @param anErrorCode KErrNone if the print job completed successfully, otherwise + another of the system-wide error codes. */ + virtual void NotifyPrintEnded(TInt anErrorCode)=0; + // + }; + + +// +// inlines +// + +inline TInt CHeaderFooter::FirstPageToPrintTo()const +/** Gets the first page on which the header or footer is to be printed. + +Page numbering begins at zero. + +@return The number of the first page on which the header or footer is to be +printed. */ + { return iFirstPageToPrintTo; } + +inline MFieldFileNameInfo* CHeaderFooter::FileNameFieldInfo()const +/** Gets the object which implements the MFieldFileNameInfo interface, as set by +SetFileNameInfo(). + +@return The object which implements the MFieldFileNameInfo interface. */ + { return iFileNameInfo; } + +inline MFieldNumPagesInfo* CHeaderFooter::NumPagesFieldInfo()const +/** Gets the object which implements the MFieldNumPagesInfo interface, as set by +SetNumPagesInfo(). + +@return The object which implements the MFieldNumPagesInfo interface. */ + { return iNumPagesInfo; } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/prnprev.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/prnprev.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,200 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined (__PRNPREV_H__) +#define __PRNPREV_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__PRNSETUP_H__) +#include +#endif + +// classes defined: +class TPrintPreviewFormat; +class TPreviewPanel; +class CPrintPreviewImage; +// + +// forward references: +class RWsSession; +class RWindow; +class CPrintPreviewDevice; +// + + +class TPrintPreviewFormat +/** Print preview format information. + +The print preview format information is accessed via its public data members. +Typically there is a system wide TPrintPreviewFormat supplied by the GUI framework. + +Preview information includes: + +- panel settings: multiple pages can be previewed at once; the display area +for each page is termed a panel. + +- label settings: each panel can have an associated label, which specifies the +corresponding document page number + +@publishedAll +@released */ + { +public: + /** The minimum panel gutter size, in pixels. */ + TSize iMinPanelGutterInPixels; + /** The width of the panel shadow, in pixels. */ + TInt iPanelShadowWidthInPixels; + /** The colour of the panel shadow. */ + TRgb iPanelShadowColor; + /** The panel margin colour. */ + TRgb iPanelMarginColor; + /** The color of both the paper and the window background. */ + TRgb iPreviewBackgroundColor; + /** X pixel offset of the label text from the panel edge. */ + TInt iLabelOffsetInPixels; + /** Font specification for the label text. */ + TFontSpec iLabelFontSpecInPixels; + }; + + +class CPrintPreviewImage : public CBase, private MPrintProcessObserver, private MPageRegionPrinter +/** Print preview image. + +This class provides a standard print preview image. An object of this type +should be owned by a control, which is in turn owned by the print preview +dialog. The control's window provides the region into which this object draws +the preview image. + +The class provides a callback to the application code that draws the preview +pages. + +@publishedAll +@released */ + { +public: + /** Margin display state flags. */ + enum TMarginState { + /** Show margins in print preview image. */ + EShowMargins, + /** Hide margins in print preview image. */ + EHideMargins + }; +public: + IMPORT_C static CPrintPreviewImage* NewL(CPrintSetup& aPrintSetup,MPageRegionPrinter& aBodyPrinter, + RWsSession& aWsSession,RWindow& aWindow,const TSize& aMaxWindowSize, + const TPrintPreviewFormat& aStaticFormat); + IMPORT_C virtual ~CPrintPreviewImage(); + IMPORT_C void SetMargins(TMarginState aState); // whether or not to show margins + IMPORT_C void SetObserver(MPrintProcessObserver& aObserver); + IMPORT_C void SetNumBands(TInt aNum); + IMPORT_C void FormatL(TInt aNumPagesInDoc,TInt aFirstPageToDisplay,TInt aNumPagesToView); // call when scrolling or changing num pages to view + IMPORT_C void DrawL(const TPoint& aOrigin,const TRect& aInvalidRegion); // aOrigin is the point in the window I will treat as the origin (ie offset) + // +private: + class TPreviewPanel; + class TRange + { + public: + TInt iFrom; + TInt iTo; + }; +private: + CPrintPreviewImage(CPrintSetup& aPrintSetup,MPageRegionPrinter& aBodyPrinter,RWsSession& aWsSession, + RWindow& aWindow,const TSize& aMaxWindowSize,const TPrintPreviewFormat& aStaticFormat); + void ConstructL(); + void CalculateHeaderFooterRects(TRect& aHeaderRectInPixels,TRect& aFooterRectInPixels); + TInt SetPanelArrayL(const TInt aFirstPage,const TInt aNumPagesToView); + void SetLabelWidth(); + void ScrollPanels(); + void DrawBorder(CGraphicsContext* aGc); // and shadow + void DrawMargins(CGraphicsContext* aGc); // including header/footer lines + void DrawLabel(CGraphicsContext* aGc,TInt aPageNo); + void DrawToGutter(CGraphicsContext* aGc,TInt aPageNo); // blanks all the gutter areas associated to a particular panel + void DrawExtremities(CGraphicsContext* aGc); // blanks very left and right of the window + inline TBool IsFirstPanel(TInt aPageNum); + inline TBool IsLastPanel(TInt aPageNum); + // from MPrintProcessObserver + virtual void NotifyPrintStarted(TPrintParameters aPrintParams); + virtual void NotifyBandPrinted(TInt aPercentageOfPagePrinted, TInt aCurrentPageNum, TInt aCurrentCopyNum); + virtual void NotifyPrintEnded(TInt anErrorCode); + // from MPageRegionPrinter + virtual void PrintBandL(CGraphicsDevice* aDevice,TInt aPageNo,const TBandAttributes& aBand); +private: + CPrintPreviewDevice* iDevice; + CPrintSetup* iPrintSetup; + MPageRegionPrinter* iAppBodyPrinter; + MPrintProcessObserver* iObserver; // may be null + RWsSession* iWsSession; + RWindow* iWindow; + CFont* iLabelFont; + CArrayFix* iPanelArray; + // + TPrintPreviewFormat iFormat; + TPrintParameters iPrintParams; // current preview range + TMarginState iMarginState; // whether the margins are on or not + TSize iPanelSizeInPixels; + TSize iWinSize; // size of the window (for layout purposes) + TPoint iOrigin; // origin in the window to use for drawing + TSize iLabelSize; + TSize iActualGutter; // gap from the edge of the panel to either screen edge or adjacent panel + TInt iNumPagesInDoc; + TInt iNumBands; + TSize iRndError; // rounding error from calculation of iActualGutter + TRange iDrawRange; // the pages that actually require drawing - ie have not been scrolled + }; + + +/** Internalises the margin state from a read stream. + +@param aThing The margin state to be internalised - on or off. +@param aStream The read stream from which the margin state is to be internalised. + +@publishedAll +@released */ +IMPORT_C void InternalizeL(CPrintPreviewImage::TMarginState& aThing,RReadStream& aStream); + +inline RWriteStream& operator<<(RWriteStream& aStream,const CPrintPreviewImage::TMarginState& aThing) +/** +@publishedAll +@released +*/ + {aStream.WriteUint8L(aThing);return aStream;} + +inline RReadStream& operator>>(RReadStream& aStream,CPrintPreviewImage::TMarginState& aThing) +/** +@publishedAll +@released +*/ + {InternalizeL(aThing,aStream);return aStream;} + +// +// inlines +// + +// move to private source... + +inline TBool CPrintPreviewImage::IsFirstPanel(TInt aPageNum) + { return aPageNum==iPrintParams.iFirstPage; } + +inline TBool CPrintPreviewImage::IsLastPanel(TInt aPageNum) + { return aPageNum==iPrintParams.iLastPage; } + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/prnsetup.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/prnsetup.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,168 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __PRNSETUP_H__ +#define __PRNSETUP_H__ + +#if !defined(__E32STD_H__) +#include +#endif +#if !defined(__E32BASE_H__) +#include +#endif +#if !defined(__FLDBLTIN_H__) +#include +#endif +#if !defined(__PRNINF_H__) +#include +#endif + +/** @publishedPartner */ +const TInt KErrMorePages=4747; // Leave with this error code to print extra pages in PrintBandL + +/** @internalTechnology */ +_LIT( KDefaultPrinterDriverPath, "\\resource\\printers\\" ); + +// Classes defined // +class CPrintSetup; +// + +// Forward Reference +class CPreviewProcess; +class CPrintProcess; +class CPdrModelList; +class CPdrDevice; +class CHeaderFooter; +class TPageSpec; +class RReadStream; +class RWriteStream; +class MPageRegionPrinter; +class RFs; +class CPrinterDriver; +class CPrinterDriverUI; +// + +class CPrintSetup : public CBase, private MFieldPageNumInfo +/** Print setup information. + +This class stores the information needed to set up, start and stop a print +job. This includes the target printer device, the page margins and +the header and footer. The page specification, (page orientation and page +dimensions) can be set via the printer device. + +Print setup information is associated with a document and is stored as part +of the persistent form of the document. Print parameters on the other hand, +(class TPrintParameters) are associated with a particular print request, +not with the document itself, so are not part of the print setup information. + +@publishedAll +@released */ + { +public: + IMPORT_C static CPrintSetup* NewL(); + IMPORT_C virtual ~CPrintSetup(); + // + // printer model selection/control functions + IMPORT_C void AddPrinterDriverDirL(const TDesC& aDriverDir); + IMPORT_C CPrinterModelList* ModelNameListL(RFs& aFs); + IMPORT_C void FreeModelList(); + IMPORT_C void CreatePrinterDeviceL(TInt aModelIndex); // requires ModelList to exist + IMPORT_C void CreatePrinterDeviceL(TUid aModelUid,RFs& aFs); + IMPORT_C CPrinterDevice* PrinterDevice()const; + IMPORT_C CPrinterDriverUI* CreatePrinterDriverUIL(); // ownership is transfered to the caller + // + // print functions + IMPORT_C void EndPrint(); + IMPORT_C TInt StartPrintL(const TPrintParameters& aPrintParams,MPageRegionPrinter& aBodyPrinter, + CPrinterPort* aPort,MPrintProcessObserver* anObserver); + IMPORT_C TInt StartPreviewPrintL(const TPrintParameters& aPrintParams,MPageRegionPrinter& aBodyPrinter, + MPrintProcessObserver* anObserver,CGraphicsDevice& aPreviewDev,const TRect& aHeaderRectInPixels, + const TRect& aFooterRectInPixels,TInt aNumBands); + // + // accessors + inline CHeaderFooter* Header()const; + inline CHeaderFooter* Footer()const; + // + // persistence + IMPORT_C TStreamId StoreL(CStreamStore& aStore)const; + IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aStreamId,const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,MPictureFactory* aFactory=NULL); + IMPORT_C void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)const; + IMPORT_C void RestoreComponentsL(const CStreamStore& aStore,const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,MPictureFactory* aFactory=NULL); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C void InternalizeL(RReadStream& aStream); + // +private: + CPrintSetup(); + void ConstructL(); + void DoStartPrintL(const TPrintParameters& aPrintParams,MPageRegionPrinter& aBodyPrinter,MPrintProcessObserver* aObserver,CPrinterPort* aPort); + void InitializePrintingL(CGraphicsDevice* aPrinterDev,const TPrintParameters& aPrintParams,MPrintProcessObserver* aObserver); + void InitializePrintingL(const TPrintParameters& aPrintParams,MPrintProcessObserver* aObserver, + const TRect& aHeaderRectInPixels,const TRect& aFooterRectInPixels); + // from MFieldPageNumInfo + TInt UpdateFieldPageNum()const; +public: + // Info regarding print setup etc. + /** The header and footer offset and the width of the four margins. + + All measurements are in twips. + + @see TPageMargins */ + TPageMargins iPageMarginsInTwips; + /** The number of the first page in the document. + + This value is used for printing or displaying page numbering. Note that all + other page numbering is zero indexed, to preserve independence from user-defined + page numbering. */ + TInt iNumOfFirstPage; // value to start page numbering at +private: + enum { + ENumberFirstPage = 0x0001, + }; +private: + CHeaderFooter* iHeader; + CHeaderFooter* iFooter; + CPrinterDriver* iPrinterDriver; // the target printer driver + CPreviewProcess* iPrintProcess; + CPdrModelList* iModelList; + MPrintProcessObserver* iPrintObserver; + TPrintParameters iPrintParams; // not persisted + CArrayFixSeg* iDriverDirList; + }; + + +// +// inlines +// + +inline CHeaderFooter* CPrintSetup::Header()const +/** Gets the header. + +The CPrintSetup object owns the header and footer. CPrintSetup implements +the MFieldPageNumInfo interface, which allows page numbering to be easily +added to fields. + +@return The header. */ + { return iHeader; } + +inline CHeaderFooter* CPrintSetup::Footer()const +/** Gets the footer. + +@return The footer. */ + { return iFooter; } + + + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/prnuids.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/prnuids.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,32 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __PRNUIDS_H__ +#define __PRNUIDS_H__ + +#if !defined(__E32STD_H__) +#include +#endif + + +/** +@publishedAll +@released +*/ +// Uid of the stream in which CPrintSetup data should be stored +const TUid KUidPrintSetupStream={268435717}; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remconbatterytarget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remconbatterytarget.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,83 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONBATTERYTARGET_H +#define REMCONBATTERYTARGET_H + +#include +#include +#include + +class MRemConBatteryTargetObserver; +class MRemConCoreApiTargetObserver; +class CRemConInterfaceSelector; + +/** +Client-instantiable type supporting sending Battery Status responses. +*/ +NONSHARABLE_CLASS(CRemConBatteryApiTarget) : public CRemConInterfaceBase, + public MRemConInterfaceIf + { +public: + /** + Factory function. + @see CRemConInterfaceSelector + @see MRemConBatteryTargetObserver + @param aInterfaceSelector The interface selector. The client must have + created one of these first. + @param aObserver The observer of this interface. + @return A new CRemConBatteryApiTarget, owned by the interface selector. + */ + IMPORT_C static CRemConBatteryApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, + MRemConBatteryTargetObserver& aObserver); + + /** Destructor */ + IMPORT_C ~CRemConBatteryApiTarget(); + +private: + /** + Constructor. + @param aInterfaceSelector The interface selector. + @param aObserver The observer of this interface. + */ + CRemConBatteryApiTarget(CRemConInterfaceSelector& aInterfaceSelector, + MRemConBatteryTargetObserver& aObserver); + + void ConstructL(); + +private: // from CRemConInterfaceBase + TAny* GetInterfaceIf(TUid aUid); + +private: // from MRemConInterfaceIf + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); + +private: // unowned + MRemConBatteryTargetObserver& iObserver; + +private: // owned + CBufFlat* iOutData; + + + }; + +#endif // REMCONBATTERYTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remconbatterytargetobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remconbatterytargetobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,46 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONBATTERYTARGETOBSERVER_H +#define REMCONBATTERYTARGETOBSERVER_H + +#include +#include + +/** +Clients must implement this interface in order to instantiate objects of type +CRemConBatteryTarget. This interface passes incoming commands from RemCon to +the client. +*/ +class MRemConBatteryTargetObserver + { +public: + /** + A 'InformBatteryStatusOfCT' has been received. + @param aBatteryStatus The current battery status. + */ + virtual void MrcbstoBatteryStatus(TControllerBatteryStatus& aBatteryStatus) = 0; + + }; + +#endif // REMCONBATTERYSTATUSTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remcongroupnavigationtarget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remcongroupnavigationtarget.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,106 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONGROUPNAVIGATIONTARGET_H +#define REMCONGROUPNAVIGATIONTARGET_H + +#include +#include +#include +#include + +#include +#include +#include + +class MRemConGroupNavigationTargetObserver; +class CRemConInterfaceSelector; + +/** +Client-instantiable type supporting sending Battery Status responses. +*/ +NONSHARABLE_CLASS(CRemConGroupNavigationApiTarget) : public CRemConInterfaceBase, + public MRemConInterfaceIf + { +public: + /** + Factory function. + @see CRemConInterfaceSelector + @param aInterfaceSelector The interface selector. The client must have + created one of these first. + @param aObserver The observer of this interface. + @return A new CRemConGroupNavigationApiTarget, owned by the interface selector. + */ + IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, + MRemConGroupNavigationTargetObserver& aObserver); + + /** Destructor */ + IMPORT_C ~CRemConGroupNavigationApiTarget(); + +public: + /** Send a 'next group' response. + Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoNextGroup(). + @param aStatus Used by RemCon to indicate completion of the send request. + aStatus may be NULL if no completion indication required. + @param aError The response error. + */ + IMPORT_C void NextGroupResponse(TRequestStatus*& aStatus, TInt aError); + + /** Send a 'previous group' response. + Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoPreviousGroup(). + @param aStatus Used by RemCon to indicate completion of the send request. + aStatus may be NULL if no completion indication required. + @param aError The response error. + */ + IMPORT_C void PreviousGroupResponse(TRequestStatus*& aStatus, TInt aError); + +private: + /** + Constructor. + @param aInterfaceSelector The interface selector. + @param aObserver The observer of this interface. + */ + CRemConGroupNavigationApiTarget(CRemConInterfaceSelector& aInterfaceSelector, + MRemConGroupNavigationTargetObserver& aObserver); + + void SendGroupResponse(TGroupNavigationPassthroughOperationIds aId, TRequestStatus*& aStatus, TInt aError); + + void ConstructL(); + +private: // from CRemConInterfaceBase + TAny* GetInterfaceIf(TUid aUid); + +private: // from MRemConInterfaceIf + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); + +private: // unowned + MRemConGroupNavigationTargetObserver& iObserver; + +private: // owned + CBufFlat* iOutData; + TPtr8 iPtr; + RBufWriteStream iStream; + + }; + +#endif // REMCONGROUPNAVIGATIONTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remcongroupnavigationtargetobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remcongroupnavigationtargetobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONGROUPNAVIGATIONTARGETOBSERVER_H +#define REMCONGROUPNAVIGATIONTARGETOBSERVER_H + +#include +#include + +/** +Clients must implement this interface in order to instantiate objects of type +CRemConGroupNavigation. This interface passes incoming commands from RemCon to +the client. +*/ +class MRemConGroupNavigationTargetObserver + { +public: + /** + A 'Next Group' has been received. + @see TRemConCoreApiButtonAction + @param aButtonAct The button action associated with the command. + */ + virtual void MrcgntoNextGroup(TRemConCoreApiButtonAction aButtonAct) = 0; + + /** + A 'Previous Group' has been received. + @see TRemConCoreApiButtonAction + @param aButtonAct The button action associated with the command. + */ + virtual void MrcgntoPreviousGroup(TRemConCoreApiButtonAction aButtonAct) =0; + + }; + +#endif // REMCONGROUPNAVIGATIONTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remconmediainformationtarget.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remconmediainformationtarget.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,128 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONMEDIAINFORMATIONTARGET_H +#define REMCONMEDIAINFORMATIONTARGET_H + +#include +#include +#include +#include +#include + +class CRemConInterfaceSelector; + +NONSHARABLE_CLASS(CRemConMediaInformationQueuedMessage): public CBase + { +public: + static CRemConMediaInformationQueuedMessage* NewL(const TDesC8& aData); + ~CRemConMediaInformationQueuedMessage(); + + const TDesC8& Data(); +private: + CRemConMediaInformationQueuedMessage(); + void ConstructL(const TDesC8& aData); +public: + TSglQueLink iLink; +private: + RBuf8 iData; + }; + +/** +Client-instantiable type supporting sending media information. +*/ +NONSHARABLE_CLASS(CRemConMediaInformationTarget) : public CRemConInterfaceBase, + public MRemConInterfaceIf + { +public: + + /** + Factory function. + @param aInterfaceSelector The interface selector. The client must have + created one of these first. + @param aObserver The observer of this interface. + @return A new CRemConMediaInformationTarget, owned by the interface selector. + */ + IMPORT_C static CRemConMediaInformationTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, + MRemConMediaInformationTargetObserver& aObserver); + + /** Destructor */ + IMPORT_C ~CRemConMediaInformationTarget(); + +public: + /** Called by the client in response to a MrcmitoGetCurrentlyPlayingMetadata() call. + Each call provides one of the attribute values requested. + This is repeatedly called until all attributes requested have been supplied and then followed by Completed(). + @param aAttribute The ID of the attribute supplied. + @param aValue A reference to a descriptor containing the attribute data. + This must be valid until Completed() has been called. + @see MRemConMediaInformationTargetObserver::MrcmitoGetCurrentlyPlayingMetadata() + @see CRemConMediaInformationTarget::Completed() + */ + IMPORT_C TInt AttributeValue( TMediaAttributeId aAttributeId, TDesC8& aAttributeData); + + /** Signal that all attributes requested by MrcmitoGetCurrentlyPlayingMetadata() have been supplied + using the AttributeValue() method. + @see MRemConMediaInformationTargetObserver::MrcmitoGetCurrentlyPlayingMetadata() + @see CRemConMediaInformationTarget::AttributeValue() + */ + IMPORT_C void Completed(); + +private: + /** + Constructor. + @param aInterfaceSelector The interface selector. + @param aObserver The observer of this interface. + */ + CRemConMediaInformationTarget(CRemConInterfaceSelector& aInterfaceSelector, + MRemConMediaInformationTargetObserver& aObserver); + + void ConstructL(); + +private: // from CRemConInterfaceBase + TAny* GetInterfaceIf(TUid aUid); + +private: // from MRemConInterfaceIf + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); + +private: // utility + void SendError(TInt aError); + void ProcessMessage(const TDesC8& aData); + + static int NextMessageCb(TAny* aThis); + void DoNextMessage(); +private: // unowned + MRemConMediaInformationTargetObserver& iObserver; + +private: // owned + RRemConGetElementAttributesResponse iResponse; + + RArray iMediaAttributeIDs; + TMediaAttributeIter iAttributeIterator; + TBool iInProgress; + TSglQue iMsgQueue; + + CAsyncCallBack* iNextMessageCallBack; + }; + +#endif // REMCONMEDIAINFORMATIONTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remconmediainformationtargetobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remconmediainformationtargetobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,77 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONMEDIAINFORMATIONTARGETOBSERVER_H +#define REMCONMEDIAINFORMATIONTARGETOBSERVER_H + +#include + +enum TMediaAttributeId + { + ETitleOfMedia =0x1, + ENameOfArtist =0x2, + ENameOfAlbum =0x3, + ETrackNumber =0x4, /* for example the CD track number */ + ENumberOfTracks =0x5, /* for example the total track number of the CD */ + EGenre =0x6, + EPlayingTime =0x7 + }; + +/** + * Provide an iterator wrapper class + */ +class TMediaAttributeIter + { +public: + TMediaAttributeIter(RArray& aMediaAttributeIDs); + IMPORT_C void Start(); + IMPORT_C TBool Next(TMediaAttributeId& aId); + +private: + RArray& iMediaAttributeIDs; + TInt iterator; + }; + + +/** +Clients must implement this interface in order to instantiate objects of type +CRemConMediaInformationTarget. This interface passes incoming commands from RemCon to +the client. +*/ +NONSHARABLE_CLASS(MRemConMediaInformationTargetObserver) + { +public: + + /** + For each element in aAttributeList for which the requested Metadata is available, + the client shall respond by calling CRemConMediaInformationTarget::AttributeValue(). + After all attributes have been supplied the client shall call CRemConMediaInformationTarget::Completed(). + @param aAttributeList A CMediaAttributeIDs containing a list of TMediaAttributeIds requested by the controller + @see CRemConMediaInformationTarget::AttributeValue() + @see CRemConMediaInformationTarget::Completed() + */ + virtual void MrcmitoGetCurrentlyPlayingMetadata( TMediaAttributeIter& aAttributeIter ) = 0; + + }; + +#endif // REMCONMEDIAINFORMATIONTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remconstatusapicontroller.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remconstatusapicontroller.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,92 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONSTATUSAPICONTROLLER_H +#define REMCONSTATUSAPICONTROLLER_H + +#include +#include +#include +#include + +_LIT(KStatusApiPanicName, "Status Api Panic"); + +class MRemConStatusApiControllerObserver; +class CRemConInterfaceSelector; + +/** +A controller which sends Status API commands. +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CRemConStatusApiController) : public CRemConInterfaceBase, + public MRemConInterfaceIf + { +private: + enum TStatusApiPanic + { + EStatusApiCommandDataSectionTooLong, + }; + +public: + IMPORT_C static CRemConStatusApiController* NewL(CRemConInterfaceSelector& aInterfaceSelector, + MRemConStatusApiControllerObserver& aObserver); + IMPORT_C ~CRemConStatusApiController(); + + // Commands + IMPORT_C void UnitInfo(TRequestStatus& aStatus, TUint& aNumRemotes); + IMPORT_C void SubunitInfo(TRequestStatus& aStatus, TUint& aNumRemotes); + +private: + CRemConStatusApiController(CRemConInterfaceSelector& aInterfaceSelector, + MRemConStatusApiControllerObserver& aObserver); + + // from CRemConInterfaceBase + void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); + TAny* GetInterfaceIf(TUid aUid); + + // Utility functions + void SetUnitInfoResponseData(const TDesC8& aCommandData, + TInt& aVendorId, + TInt& aUnit, + TInt& aUnitType, + TInt& aExtendedUnitType); + + void SetSubunitInfoResponseData(const TDesC8& aCommandData, + TInt& aPage, + TInt& aExtension, + TPtrC8& aPageData); + + void ReadCommandDataToInt(const TDesC8& aCommandData, + TInt aOffset, + TInt aLength, + TInt& aValue); + + static void Panic(TStatusApiPanic aPanic); + +private: + MRemConStatusApiControllerObserver& iObserver; + TBuf8 iOutData; + }; + +#endif // REMCONSTATUSAPICONTROLLER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/remconstatusapicontrollerobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/remconstatusapicontrollerobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,83 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef REMCONSTATUSAPICONTROLLEROBSERVER_H +#define REMCONSTATUSAPICONTROLLEROBSERVER_H + +#include + +/** +Interface to observe responses from a Status API controller. +@publishedAll +@released +*/ +class MRemConStatusApiControllerObserver + { +public: + /** A UnitInfo response has been received. + + For details on the meanings on the fields please refer to the + AV/C Digital Interface Command Set General Specification, + section 11.2.1. + + If all values are zero there was an error with the command. + @param aVendorId The VendorId + @param aUnit Unit + @param aUnitType UnitType + @param aExtendedUnitType Extended Unit type. This data is only + valid if Unit type is 0x1e. The second byte is only valid + if the first byte is 0xff. + */ + virtual void MrcsacoUnitInfoResponse(TInt aVendorId, + TInt aUnit, + TInt aUnitType, + TInt aExtendedUnitType) = 0; + + /** A SubunitInfo response has been received. + + For details on the meanings on the fields please + refer to the AV/C Digital Interface Command Set + General Specification, section 11.2.2. + + If all values are zero there was an error with the command. + @param aPage Page + @param aExtension Extension. + @param aPageData Page Data. This data remains valid only for + the duration of this call. If the client wishes to store + the data it must be copied. + */ + virtual void MrcsacoSubunitInfoResponse(TInt aPage, + TInt aExtension, + TDesC8& aPageData) = 0; + + /** + Returns a null aObject if the extension is not implemented, or + a pointer to another interface if it is. + + @param aInterface UID of the interface to return + @param aObject the container for another interface as specified by aInterface + */ + IMPORT_C virtual void Mrcsaco_ExtensionInterfaceL(TUid aInterface, void*& aObject); + }; + +#endif // REMCONSTATUSAPICONTROLLEROBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/rsendas.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/rsendas.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,117 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __RSENDAS_H__ +#define __RSENDAS_H__ + +#include + +class CSendAsMessageTypes; +class CSendAsAccounts; + +/** +The default number of message slots available to a session. This determines the +number of outstanding requests the client may have with the server at any one +time. +*/ +const TInt KSendAsDefaultMessageSlots = 4; + +/** +Encapsulates a session with the SendAs Server. + +This class allows a user to determine the message types available to the SendAs +server and also provides functionality for clients to filter this list to find +the UIDs required to create messages. + +@publishedAll +@released +*/ +class RSendAs : public RSessionBase + { +public: + +/** +Defines the condition-checking of message capabilities. These are progressively +added to refine the list of available MTMs. +*/ + enum TSendAsConditionType + { + /** + No MTMs are removed as a result of applying this condition to the + filtering. + */ + ESendAsNoCondition, + /** + Only MTMs whose capabilities match the given value will remain as a + result of applying this condition to the filtering. + */ + ESendAsEquals, + /** + Only MTMs whose capabilities do not match the given value will remain + as a result of applying this condition to the filtering. + */ + ESendAsNotEquals, + /** + Only MTMs whose capabilities greater than the given value will remain + as a result of applying this condition to the filtering. + */ + ESendAsGreaterThan, + /** + Only MTMs whose capabilities less than the given value will remain as a + result of applying this condition to the filtering. + */ + ESendAsLessThan, + /** + Only MTMs whose capabilities result non-zero value when bitwise ANDed + with the given value will remain as a result of applying this condition + to the filtering. + */ + ESendAsBitwiseAnd, + /** + Only MTMs whose capabilities result non-zero value when bitwise ORed + with the given value will remain as a result of applying this condition + to the filtering. + */ + ESendAsBitwiseOr, + /** + Only MTMs whose capabilities result non-zero value when bitwise NANDed + with the given value will remain as a result of applying this condition + to the filtering. + */ + ESendAsBitwiseNand, + /** + Only MTMs whose capabilities result non-zero value when bitwise NORed + with the given value will remain as a result of applying this condition + to the filtering. + */ + ESendAsBitwiseNor + }; + +public: + IMPORT_C TInt Connect(); + IMPORT_C TInt Connect(TInt aMessageSlots); + + IMPORT_C void FilteredMessageTypesL(CSendAsMessageTypes& aMessageTypeInfo); + IMPORT_C TInt FilterAgainstCapability(TUid aMessageCapability); + IMPORT_C TInt FilterAgainstCapability(TUid aMessageCapability, TInt aValue, TSendAsConditionType aConditionType); + IMPORT_C TInt ResetMessageFilter(); + + IMPORT_C void AvailableAccountsL(TUid aMessageType, CSendAsAccounts& aAccounts); + +private: + TAny* iAny; // Future proofing. + }; + +#endif // __RSENDAS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/rsendasmessage.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/rsendasmessage.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,150 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __RSENDASMESSAGE_H__ +#define __RSENDASMESSAGE_H__ + +#include +#include +#include + +class RSendAs; +class CRichText; +class RFile; + +/** +Send as progress + +@publishedAll +@released +*/ +typedef CMsvSendOperation::TSendOperationProgress TSendAsProgress; + +/** +Encapsulates creating and sending a message. This class requires +a connected RSendAs session. + +A client application can have several RSendAsMessage objects created simultaneously. +Each RSendAsMessage object corresponds to a single message. + +With the RSendAsMessage class, a client application can perform the following +operations: + +-Creating and managing a message + +-Modifying a message created using SendAs + +-Sending a message + +-Launching a message editor + +Client applications do not require any capabilities in order to use the RSendAs +and RSendAsMessage APIs. However, if an application does not have the necessary security +capabilities to send a message, the SendAs server ensures that a message is only sent +after the user's authorization. + +A message created using RSendAsMessage can be saved, sent, or passed to the appropriate +message editor. There are two types of send operation: + +-A confirmed send is forwarded to the UI MTM for the message type. Typically this +results in the user being asked to confirm that the message should be sent. + +-An unconfirmed send fails if the client application does not have the +required capabilities to use the server MTM for the message type. + +There are asynchronous and synchronous forms of these sending methods. Progress information for +sending is available when the asynchronous forms are used. The synchronous forms, and the +methods for saving the message and for launching it in a message editor, all close the handle to the +RSendAsMessage, so the message cannot be further accessed through the API. + +@publishedAll +@released +*/ +class RSendAsMessage : public RSubSessionBase + { +public: +/** +Defines the recipient types available when adding a recipient to a message +*/ + enum TSendAsRecipientType + { + /** + Designates a 'To' recipient. + */ + ESendAsRecipientTo = EMsvRecipientTo, + + /** + Designates a 'Cc' recipient. + */ + ESendAsRecipientCc, + + /** + Designates a 'Bcc' recipient. + */ + ESendAsRecipientBcc + }; +public: + IMPORT_C void CreateL(RSendAs& aSendAs, TSendAsAccount aAccount); + IMPORT_C void CreateL(RSendAs& aSendAs, TUid aMessageType); + // + IMPORT_C void SendMessage(TRequestStatus& aStatus); + IMPORT_C void SendMessageAndCloseL(); // Sends in background + IMPORT_C void SendMessageConfirmed(TRequestStatus& aStatus); + IMPORT_C void SendMessageConfirmedAndCloseL(); // Sends in background + IMPORT_C void LaunchEditorAndCloseL(); + IMPORT_C void SaveMessageAndCloseL(); + // + IMPORT_C void ProgressL(TSendAsProgress& aProgress); + + IMPORT_C void SetBodyTextL(const CRichText& aBody); + IMPORT_C void SetBodyTextL(const TDesC& aBody); + IMPORT_C void SetSubjectL(const TDesC& aSubject); + IMPORT_C void SetBioTypeL(TUid aBioType); + // + IMPORT_C void AddRecipientL(const TDesC& aAddress, TSendAsRecipientType aRecipientType); + IMPORT_C void AddRecipientL(const TDesC& aAddress, const TDesC& aAlias, TSendAsRecipientType aRecipientType); + // + IMPORT_C void AddAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C void AddAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus); + IMPORT_C void AddAttachment(const TDesC& aFilePath, TRequestStatus& aStatus); + + IMPORT_C void AddAttachment(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C void AddAttachment(RFile& aFile, const TDesC8& aMimeType, TRequestStatus& aStatus); + IMPORT_C void AddAttachment(RFile& aFile, TRequestStatus& aStatus); + + IMPORT_C void AddLinkedAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); + IMPORT_C void AddLinkedAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus); + IMPORT_C void AddLinkedAttachment(const TDesC& aFilePath, TRequestStatus& aStatus); + + IMPORT_C void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile); + IMPORT_C void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType); + IMPORT_C void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset); + + // + IMPORT_C void Cancel(); + IMPORT_C void Close(); + + /** + Sets the character encoding value. The character encoding value options are 7-bit, + 8-bit and 16-Bit Unicode. By default the character set encoding is 7 bit encoding. + */ + IMPORT_C void SetCharacterSetL(const TUint aCharset); + + +private: + TAny* iAny; // Future proofing. + }; + +#endif // __RSENDASMESSAGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/rtcp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/rtcp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,248 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef RTCP_H +#define RTCP_H + +#include + +/** @file + +RTCP is a protocol that only makes sense in the context of RTP, so +the RTCP implementation is an extension of the RTP code, and most +of the relevant classes are defined in rtp.h +*/ + +class TRtcpRRItem; +class TRtcpRRPart; +class TRtcpSRPart; + +/** +@publishedPartner +@released + +A handle to an RR (Receiver Report) RTP packet. + +An instance of this class represents the reception report of one host +about another host; it may have come from either a SR (Sender Report) or +a RR (Receiver Report) packet, which may contain +other RRs (Receiver Reports) as well. + +An object of this type is returned from a call to the RRtcpRRPart +indexing operator and specifying the index of the required RR. + +Note that resources accessed thorugh this handle are owned by other objects +and therefore has no Close() member function. + +@see RRtcpRRPart +*/ +class RRtcpRRItem + { +public: + /** + Default constructor. + */ + IMPORT_C RRtcpRRItem(); + + /** + Gets the sender's SSRC, i.e. the sender's 32-bit numeric + synchronisation source identifier. + + @return The sender's SSRC. + */ + IMPORT_C TUint SenderSSRC() const; + + + /** + Gets the number of packets lost. + + @return The number of packets lost. + */ + IMPORT_C TUint PacketsLost() const; + + + /** + Gets the SSRC related to this packet. + + @return The sender's SSRC. + */ + IMPORT_C TUint AboutSSRC() const; + + + /** + Gets the number of packets lost, in 256ths of the total number. + + @return The number of last packets, in 256ths of the total number. + */ + IMPORT_C TUint FractionLost() const; + + + /** + Gets the extended highest sequence number recieved. + + @return The extended highest sequence number. + */ + IMPORT_C TUint ExtendedHighestSequenceNumber() const; + + + /** + Gets the interarrival jitter value. + + @return The interarrival jitter value. + + */ + IMPORT_C TUint InterarrivalJitter() const; + + + /** + Gets the time of the last received SR (Sender Report) + + @return The time of the last received SR. + */ + IMPORT_C TUint LastSRTimestamp() const; + + + /** + Gets the time between the receipt of the last SR (Sender Report) and + the time when this packet was sent. + + @return The tme difference in 65,536ths of a second. + */ + IMPORT_C TUint DelaySinceLastSR() const; + +private: + friend class RRtcpRRPart; + TRtcpRRItem* iPtr; + }; + +/** +@publishedPartner +@released + +An array containing the most recent RRs (Receiver Reports) from +all hosts who are reporting on our send stream. + +An object of this type is returned by calling RRs() on a handle to +an RTP session (an RRtpSession object). + +@see RRtpSession::RRs() +*/ +class RRtcpRRPart + { +public: + IMPORT_C RRtcpRRPart(TRtcpRRPart& aRR); + /** + Gets the number of Receiver Reports. + + @return The number fo receiver reports. + */ + IMPORT_C TInt Count() const; + + IMPORT_C TUint SenderSSRC() const; + + /** + Gets a specific RR (Receiver Report) as identified by + the specified index value. + + @param aIndex An index value identifying the specific RR. + The index is relative to zero, i.e. zero implies + the first RR report. + The value must not be negative and must be less than + the the value returned by Count(). + + @return A handle to the RR (Receiver Report). + */ + IMPORT_C RRtcpRRItem operator [](TInt aIndex) const; +private: + TRtcpRRPart& iRRPart; + }; + +/** +@publishedPartner +@released + +A handle to a SR (Sender Report) packet. + +RRs (Receiver Reports) received as part of a SR (Sender Report) are classified +with the RRs. The resources accessed through this handle are owned by +the receive stream object, a RRtpReceiveStream instance, and therefore has no +Close() member function. +*/ +class RRtcpSRPart + { + public: + /** + Default constructor. + */ + IMPORT_C RRtcpSRPart(TRtcpSRPart& aSr); + + + /** + Gets the absolute time when this SR was sent, in TTime format. + + @return The time in NTP format. + */ + IMPORT_C void NTPTimestamp(TTime& aTime) const; + + + /** + Gets the RTP time when this packet was sent. + + Note that RTP time is profile dependant and may have an arbitrary start + time, but this is useful for tying the SR with the timestamps in the + data stream + + @return The time when the packet was sent. + */ + IMPORT_C TUint RTPTimestamp() const; + + + /** + Gets the number of packets that have been sent. + + @return The number of packets. + */ + IMPORT_C TUint PacketCount() const; + + + /** + Gets the number of bytes that have been sent. + + @return The number of bytes sent. + */ + IMPORT_C TUint ByteCount() const; + + + /** + Gets the profile-specific extension. + + @return An un-modifiable descriptor reference to the extension data. + */ + IMPORT_C const TDesC8& Extension(); + + /** + // added as Fix to Defect PDEF101761 + Gets the timestamp when this SR was sent, in seconds and fraction + + @ return The time in Seconds and Fraction + */ + IMPORT_C void NTPTimestamp(TUint32& aSec,TUint32& aFrac) const; + + +private: + TRtcpSRPart& iSrPtr; + }; + +#endif // RTCP_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/rtp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/rtp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1352 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef RTP_H +#define RTP_H + +#include + +class TRtpEvent; +class RRtpSession; +class RRtpSendPacket; +class RRtpReceivePacket; +class RRtpReceiveSource; +class RRtpSendSource; +class RRtpHeaderExtension; +class RRtpCSRCs; +class CRtpSession; +class CRtpReceiveSource; +class CRtpSendSource; +class TRtpPacket; + +class RRtcpRRPart; +class RRtcpSRPart; + +/** +@publishedAll +@released + +A set of values that defines the event types that may be handled. + +See all variants of the RegisterEventCallbackL() function. + +@see TRtpEvent +*/ +enum TRtpEventType + { + /** + A special event type that is interpreted by all of + the RegisterEventCallbackL() set of functions to mean that the registered + callback function is to be called for any event except failure events. + */ + ERtpAnyEvent = 0, + + + /** + Defines a base value for session events. + + All session event types have values that are greater than this. + */ + ERtpSessionEventBase = 0x100, + + + /** + An event type that indicates that a session-level error has occurred. + + The event status is a standard Symbian OS error code. + The callback parameter is used to register interest in only one + type of error. + */ + ERtpSessionFail = 0x101, + + + /** + An event type that indicates that a new stream has been received. + + The event status is the SSRC of the stream. + */ + ERtpNewSource = 0x102, + + + /** + An event type that indicates that an RTCP RR (Receiver Report) has been + received. + + The event status is the SSRC of the sender. + + Note - This event type has not been implemented yet. + */ + ERtpNewRR = 0x103, + + + /** + An event type that indicates that a packet bigger than the expected maximum + has been received. + + When this event occurs, the packet is deleted. + */ + ERtpBufferOverflow = 0x104, + + + /** + An event type that indicates that a packet has been recived that + is smaller than its header. + + When this event occurs, the packet is deleted. + */ + ERtpUndersizedPacket = 0x105, + + + /** + Not an event type, but defines the upper limit for session event + type values. + */ + ERtpSessionEventEnd = 0x1ff, + + + /** + Not an event type but defines a base value for send stream events. + + All send stream event types have values that are greater than this. + */ + ERtpSendEventBase = 0x200, + + + /** + An event type that indicates that an error has occurred while sending + a packet. + + The event status is a standard Symbian OS error code. The callback parameter + is used only to register interest in one type of error. + */ + ERtpSendFail = 0x201, + + + /** + An event type that indicates that a send packet operation has succeeded. + */ + ERtpSendSucceeded = 0x202, + + + /** + Not an event type, but defines the upper limit for send stream event + type values. + */ + ERtpSendEventEnd = 0x2ff, + + + /** + Not an event type but defines a base value for receive stream events. + + All receive stream event types have values that are greater than this. + */ + ERtpSourceEventBase = 0x300, + + + /** + An event type that indicates that an error has occurred. + + The event status is a standard Symbian OS error code. The callback parameter + is used only to register interest in one type of error. + */ + ERtpSourceFail = 0x301, + + + /** + An event type that indicates that an in-sequence packet has been received. + */ + ERtpPacketReceived = 0x302, + + + /** + An event type that indicates that the codec has changed. + + The event status is the new payload type. + */ + ERtpCodecChange = 0x303, + + + /** + An event type that indicates that a marker packet has arrived. + */ + ERtpMarker = 0x304, + + + /** + An event type that indicates that a misordered packet has arrived. + */ + ERtpMisorder = 0x305, + + + /** + An event type that indicates that a dropout has been detected. + */ + ERtpDropout = 0x306, + + + /** + An event type that indicates that a SDES (Source Description) RTCP packet + has been received. + + For SDES events, the callback parameter is used to specify the type of + SDES. Use a value from TRtpSendPacketType + + The event status is the SSRC of the sender. + + @see RRtpSession::TRtpSendPacketType + */ + ERtpSDES = 0x307, + + + /** + An event type that indicates that a APP (Application Defined) RTCP packet + has been received. + + The event status is the SSRC of the sender. + + */ + ERtpAPP = 0x308, + + + /** + An event type that indicates that a SR (Sender Report) RTCP packet + has been received. + + The event status is the SSRC of the sender. + + */ + ERtpSR = 0x309, + + + /** + An event type that indicates that a RR (Receiver Report) RTCP packet + has been received. + + The event status is the SSRC of the sender. + */ + ERtpRR = 0x30a, + + + /** + An event type that indicates that a BYE (Goodbye) RTCP packet + has been received. + + The event status is the SSRC of the sender. + */ + ERtpBYE = 0x30b, + + + /** + Not an event type, but defines the upper limit for receive stream event + type values. + */ + ERtpSourceEventEnd = 0x3ff + }; + + +/** +@publishedAll +@released + +Indicates whether a callback function can be called once, or more than once. + +The appropriate enum value is passed as an argument to the +RegisterEventCallbackL() functions of RRtpSession, RRtpSendSource, +and RRtpReceiveSource, or to the equivalent static functions. + +@see RRtpSession +@see RRtpSendSource +@see RRtpReceiveSource +*/ +enum TRtpOneShotness + { + /** + Indicates that the call back function can be called more than once. + */ + ERtpNotOneShot = 0, + + + /** + Indicates that the call back function is only called once. + */ + ERtpOneShot = 0x40000000 + }; + + + + +/** +@publishedAll +*/ +typedef void (*TRtpCallbackFunction)(TAny* aPtr, const TRtpEvent& aEvent); + + + +/** +@internalComponent +*/ +const TInt KRtpNoParameter = KRequestPending; + + +//Needed for recv-only option for RTP or RTCP +//This must map to TRtpType +enum TPacketType + { + EPacketRtp, + EPacketRtcp + }; + + + + +/** +@publishedAll +@released + +A value that can be passed as the second parameter in a call to either +RRtpSendSource::NewSendPacketL() or RRtpSendSource::NewSendPacketLC() +to indicate that no exension is required for the RTP send packet. +*/ +const TInt KRtpNoExtension = -1; + + + +/** +@publishedAll +@released + +A handle to an RTP session. + +This is the interface to the socket-level RTP service, and provides additional +facilities such as header parsing, re-ordering out-of-order packets, +demultiplexing multiple sources etc. + +The class abstracts all RTP information going to/from a RTP socket, and its +corresponding RTCP data. + +Each RTP endpoint on a device needs its own RTP session. + +Multiple hosts streaming to a port on this device correspond +to different RRtpReceiveSource objects associated with the session. + +The class behaviour assumes that an active scheduler has already been created +and started; the class does not function correctly if not. +*/ +class RRtpSession + { + public: + /** + A set of bit values passed as a parameter to RRtpSession::SendRTCPPacketL() + to specify the SDES (Source Description) items that are to be sent with + the packet. One or more of these may be set. + + @see RRtpSession::SendRTCPPacketL() + */ + enum TRtpSendPacketType + { + /** + Canonical End-Point Identifier SDES Item. + */ + ERtcpPacketCNAME = 1, + + /** + User Name SDES Item. + */ + ERtcpPacketNAME = 2, + + /** + Electronic Mail Address SDES Item. + */ + ERtcpPacketEMAIL = 4, + + /** + Phone Number SDES Item. + */ + ERtcpPacketPHONE = 8, + + /** + Geographic User Location SDES Item. + */ + ERtcpPacketLOC = 16, + + /** + Application or Tool Name SDES Item + */ + ERtcpPacketTOOL = 32, + + /** + Notice/Status SDES Item + */ + ERtcpPacketNOTE = 64, + + /** + Private Extensions SDES Item + */ + ERtcpPacketPRIV = 128 + }; + + inline RRtpSession(); + inline TBool IsOpen() const; + + IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr, + TSockAddr& aRemoteAddr, + TInt aMaxRXSize, RConnection& aConnection, TInt aPriority = EPriorityNormal, + const TDesC8& aCNAME = KNullDesC8); + + + IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr, + TSockAddr& aRemoteAddr, + TInt aMaxRXSize, TInt aPriority = EPriorityNormal, + const TDesC8& aCNAME = KNullDesC8); + + /** + @publishedPartner + @released + + Opens the session and initialises it. + + No events will be generated until after control returns to the + active scheduler. The client has this time to initialise the + object by adding event callbacks. + + @param aSocket The connected socket. + @param aMaxRXSize The maximum size of a received packet. + @param aRtcpSocket The RTCP socket. + @param aPriority The priority to be used for internal active objects + @param aCNAME The CNAME. A sensible default is supplied if none is + provided. + */ + IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize, + RSocket& aRtcpSocket, + TInt aPriority = EPriorityNormal, + const TDesC8& aCNAME = KNullDesC8); + + IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize, + TInt aPriority = EPriorityNormal); + + IMPORT_C void Close(); + + IMPORT_C void SetMaxRXSize(TInt aMaxRXSize); + + IMPORT_C TInt MaxRXSize(); + + + /** + @publishedPartner + @released + + Sets the estimated bandwidth used by the session. + + This is used to decide when to send RTCP status packets. + The default value is read from a resource file and should be a reasonably + sensible default based on the maximum bandwidth of the handset. + + @param aBandwidth The bandwidth in bps. + */ + IMPORT_C void SetBandwidth(TUint aBandwidth); + + + /** + @publishedPartner + @released + + Supplies information about the profile-specific RTP + timestamps. + + This is used to generate the RTP timestamps in RTCP packets. + It is not used to generate timestamps in RTP packets as they must + accurately relate to the time of the sample. + + @param aNow The time now in RTP format + @param aConversion The number of nanoseconds per RTP timer tick. + */ + IMPORT_C void SetRTPTimeConversion(TUint aNow, TUint aConversion); + IMPORT_C RRtpReceiveSource NewReceiveSourceL(); + IMPORT_C RRtpReceiveSource NewReceiveSourceLC(); + + /** + Registers a callback for the specified event. + + Some compilers may not support templated member functions. A static version + of this function is available that offers the same behaviour: + RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness,TInt) + + @param aType The type of event. + @param aCallback The callback function. The function is templated, and is + prototyped to take a pointer to an object of the template + type and a const reference to a TRtpEvent. The function + returns void. + @param aPtr A pointer that is passed to the callback function when + that function is called. + @param aOneShot Indicates whether the callback function is only + called once, or can be called more than once. + @param aParameter A parameter to be passed to the registration function. + The meaning of this depends entirely on the event type. + The parameter is optional - the other overload of this + function is available for registrations that don't need + to pass a parameter. + */ + template inline void + RegisterEventCallbackL(TRtpEventType aType, + void (*aCallback)(T*, const TRtpEvent&), + T* aPtr, + TRtpOneShotness aOneShot, + TInt aParameter) + { + PrivRegisterEventCallbackL( + aType|aOneShot, + reinterpret_cast(aCallback), + static_cast(aPtr), aParameter); + } + + /** + Registers a callback for the specified event. + + Some compilers may not support templated member functions. A static version + of this function is available that offers the same behaviour: + RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness) + + @param aType The type of event. + @param aCallback The callback function. The function is templated, and is + prototyped to take a pointer to an object of the template + type and a const reference to a TRtpEvent. The function + returns void. + @param aPtr A pointer that is passed to the callback function when + that function is called. + @param aOneShot Indicates whether the callback function is only + called once, or can be called more than once. If not + specified, the default is to allow the callback function + to be called more than once. + */ + template inline void + RegisterEventCallbackL(TRtpEventType aType, + void (*aCallback)(T*, const TRtpEvent&), + T* aPtr, + TRtpOneShotness aOneShot = ERtpNotOneShot) + { + PrivRegisterEventCallbackL( + aType|aOneShot, + reinterpret_cast(aCallback), + static_cast(aPtr)); + } + + + /** + @publishedPartner + @released + + Gets an array contining the most recent RR (Receiver Report) from + all hosts who are reporting on our send stream. + + @return The array of RRs. + */ + IMPORT_C RRtcpRRPart GetRRs(); + + + /** + @publishedPartner + @released + + Gets the data associated with the specified RTCP SDES (Source Description) + item. + + Note a that the PRIV (Private Extensions) SDES item is not supported + by this mechanism. + + @param aType The value identifying the RTCP SDES item. + + @param aValue A descriptor reference to the SDES item data. + + @return KErrNotFound if the item type was not found in the most recent RTCP packet + KErrNone if the operation is successful + */ + IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue); + + + /** + @publishedPartner + @released + + Sets the data associated with the specified RTCP SDES (Source Description) + item for sending in the next SDES packet only. + + The function Leaves if duplicate values are set for the same CNAME. + + Note a that the PRIV (Private Extensions) SDES item is not supported + by this mechanism. + + NOTE - This call cannot be used to set a different CNAME for this session. + The default CNAME is send with every SDES packets. + + @param aType The value identfying the RTCP SDES item. + @param aValue The SDES item data. + + @return KErrTooBig if the length of the aValue is more than KMaxSdesItemLength(=255) + KErrNone if the operation is successful + */ + IMPORT_C TInt SetSDESL(TInt aType, const TDesC8& aValue); + + /** + @publishedPartner + @released + + Sets the data associated with the PRIV (Private Extensions) SDES item. + + @param aPrefix The value identfying the RTCP SDES item. + @param aValue The SDES item data. + + @return KErrTooBig if the length of the aValue and aPrefix combined is more + than KMaxSdesItemLength(=255) + KErrNone if the operation is successful + */ + IMPORT_C TInt SetPRIVL(const TDesC8& aPrefix, const TDesC8& aValue); + + + /** + @publishedPartner + @released + Sends an APP (Application Defined) RTCP Packet. + + The packet is sent immediately. + + If used with RTCP auto-send, the function disrupts the auto-send + intervals. Note however that Symbian reserves the right to fix this. + + @param aApp A handle to a RTCP APP (Application Defined) packet, + for experimental extensions to RTCP. + */ + IMPORT_C void SendAPPL(const TDesC8& aName, const TDesC8& aAppData = KNullDesC8, TUint8 aSubType = 0); + + + /** + @publishedPartner + @released + + Enables or disables the automatic sending of RTCP SR (Sender Report), + RR (Receiver Report), and SDES (Source Description) packets. + + Note that if automatic sending is not enabled and RTCP sending is required, + then explicit calls to SendRTCPPacketL() will be required. + + @param aAutoSend ETrue, if RTCP packets need to be send automatically + EFalse otherwise. + + @see RRtpSession::SendRTCPPacketL() + */ + IMPORT_C void SetRTCPAutoSend(TBool aAutoSend); + + + /** + @publishedPartner + @released + + Gets the RTCP Auto Send status. + + @return True, if RTCP SR, RR and SDES packets are automatically sent, + false otherwise + + @see RRtpSession::SetRTCPAutoSend() + */ + IMPORT_C TBool RTCPAutoSend() const; + + /** + @publishedPartner + @released + + Sets the RTCP Auto Send interval. + This disables the RFC based calculation of RTCP intervals. + To re-enable auto calculation, set the interval to zero. + + @param aInterval Time interval after which an RTCP auto-send will take place + */ + IMPORT_C void SetRtcpInterval(TTimeIntervalMicroSeconds32& aInterval); + + /** + @publishedPartner + @released + Enables Receive only option for rtp or rtcp + + @param aRtpOrRtcp Takes the values from the enum TPacketType + + @see RRtpSession::DontReceive() + */ + IMPORT_C void DontReceive(TInt aRtpOrRtcp); + + /** + @publishedPartner + @released + Sends an RTCP packet now. + + Calling this function doesn't make much sense if auto-send is + on, as it will result in packets being sent at rather + incoherent intervals. + + @param aPacketType Zero or more of the bit values defined by + the TRtpSendPacketType enum. The packet sent will + contain a SR (Sender Report) or RR (Receiver Report), + depending on whether any packets have actually been + sent, together with all SDES (Source Description) items + specified by this parameter. + + @see TRtpSendPacketType + */ + IMPORT_C void SendRTCPPacketL(TDesC8& aPacket); + + + /** + @publishedPartner + @released + Creates a new send stream, and returns the send stream handle. + + Only one send stream per session is permitted, which means that you must not + call this function if the send stream has already been created. + + As the send stream is an active object, it cannot handle request + completion events until control returns to the active scheduler. + Typically, clients will want to add event registrations before that. + + The Code panics if the SendSource has alredy been opened. + + @return The send stream handle. + + This function may leave if memory is not enough. + */ + IMPORT_C RRtpSendSource NewSendSourceL(); + + + /** + @publishedPartner + @released + + Gets the handle to the send stream object associated with this session. + + The send stream object is the one created in a previous call + to NewSendSourceL(). If the send stream object has not been created, then + the returned handle will refer to a closed send stream. + + @return The handle to the send stream object. + + @see RRtpSendSource NewSendSourceL() + */ + IMPORT_C RRtpSendSource SendSource(); + + + /** + @publishedPartner + @released + + Sets the number of sequential packets that must be received + before a stream is considered good. + + Sets the maximum number of dropped packets to be considered a + dropout, as opposed to an ended and restarted stream. + + Sets the maximum number of packets by which a packet can be delayed + before it is considered dropped. + + @param aMaxMisorder The maximum number of packets. + + @param aMaxDropout The number of sequential packets. + + @param aMinSequential The number of sequential packets. + @post The session will be 'restarted', + i.e. it resets the sequence number sequence and resets all RTCP statistics. + */ + IMPORT_C void SetRtpStreamParameters(TInt aMinSequential, TInt aMaxMisorder, TInt aMaxDropout); + + inline TBool operator == (RRtpSession aThat) const; + inline TBool operator != (RRtpSession aThat) const; + + /** + @publishedPartner + @released + + The event manager contains a number of callback registrations, each of which + binds a function and pointer (normally an object) to a particular kind of + event. Registrations can be bound to all events on a stream. + + If a function is registered for a particular event, it will be called when + that event occurs. One callback function can be associated with more than 1 + callback registration. Callback functions take a pointer argument + which was supplied as part of the registration + + @param aType Event type + + @param aCallback Callback object + + @param aPtr Pointer to data that needs to be passed to the callback function + + @param aParameter Parameter to be passed to internal callback subsystem + */ + IMPORT_C void PrivRegisterEventCallbackL(TUint aType, + TRtpCallbackFunction aCallback, + TAny* aPtr, + TInt aParameter); + + /** + @publishedPartner + @released + + The event manager contains a number of callback registrations, each of which + binds a function and pointer (normally an object) to a particular kind of + event. Registrations can be bound to all events on a stream. + + If a function is registered for a particular event, it will be called when + that event occurs. One callback function can be associated with more than 1 + callback registration. Callback functions take a pointer argument + which was supplied as part of the registration + + @param aType Event type + + @param aCallback Callback object + + @param aPtr Pointer to data that needs to be passed to the callback function + */ + IMPORT_C void PrivRegisterEventCallbackL(TUint aType, + TRtpCallbackFunction aCallback, + TAny* aPtr); + + private: + friend class TRtpEvent; + CRtpSession* iPtr; + // Note: Comments that start with //\ are pseudo-variables used to get + // Doxygen collaboration diagrams to look right. Ignore them. + //\ RRtpSendSource sndSource_1_01; + //\ RRtpReceiveSource rcvSource_1_n; + //\ TRtpCallback callbacks_1_n; + //\ TRtpEvent events_1_n; + }; + + + + +/** +@publishedAll +@released + +A handle to a send stream. + +Use this class to manage the creation and sending of packets. +A session can have only one send stream. + +Only one packet can be sent at any one time. +Once a packet has been sent, the packet cannot be closed and no further packets +can be sent until an event signalling the completion of the send operation has +occurred. This will be one of the events defined by the enum values: +ERtpSendSucceeded and ERtpSendFail. + +A client must monitor these events so that it can schedule the sending of +subsequent packets. +It does this by implementing and registering callback functions that +handle these events. + +@see TRtpEventType +*/ +class RRtpSendSource + { + public: + inline RRtpSendSource(); + inline TBool IsOpen() const; + IMPORT_C void Close(); + + IMPORT_C void Cancel(); + + template inline void + RegisterEventCallbackL(TRtpEventType aType, + void (*aCallback)(T*, const TRtpEvent&), + T* aPtr, + TRtpOneShotness aOneShot, + TInt aParameter) + { + PrivRegisterEventCallbackL(aType|aOneShot, + reinterpret_cast(aCallback), + static_cast(aPtr), aParameter); + } + + + template inline void + RegisterEventCallbackL(TRtpEventType aType, + void (*aCallback)(T*, const TRtpEvent&), + T* aPtr, + TRtpOneShotness aOneShot = ERtpNotOneShot) + { + PrivRegisterEventCallbackL(aType|aOneShot, + reinterpret_cast(aCallback), + static_cast(aPtr)); + } + + + + IMPORT_C RRtpSendPacket NewSendPacketL(TInt aPayloadSize = 0, + TInt aHeaderExtensionSize = + KRtpNoExtension); + + IMPORT_C RRtpSendPacket NewSendPacketLC(TInt aPayloadSize = 0, + TInt aHeaderExtensionSize = + KRtpNoExtension); + + IMPORT_C TBool IsSending(); + IMPORT_C void SetPayloadType(TUint aPayloadType); + IMPORT_C void SetDefaultPayloadSize(TInt aPayloadSize); + /** + @publishedPartner + @released + + Sends a Bye RTCP packet. + + @param aReason The reason for sending the Bye RTCP packet. + */ + IMPORT_C void ByeL(TDesC8& aReason); + IMPORT_C TUint32 GetLocalSSRC(); + + IMPORT_C void SetAlignment(TInt aAlignment); + IMPORT_C TInt Alignment() const; + + inline TBool operator == (RRtpSendSource aThat) const; + inline TBool operator != (RRtpSendSource aThat) const; + + /** + @publishedPartner + @released + + The event manager contains a number of callback registrations, each of which + binds a function and pointer (normally an object) to a particular kind of + event. Registrations can be bound to all events on a stream. + + If a function is registered for a particular event, it will be called when + that event occurs. One callback function can be associated with more than 1 + callback registration. Callback functions take a pointer argument + which was supplied as part of the registration + + @param aType Event type + + @param aCallback Callback object + + @param aPtr Pointer to data that needs to be passed to the callback function + + @param aParameter Parameter to be passed to internal callback subsystem + */ + IMPORT_C void PrivRegisterEventCallbackL(TUint aType, + TRtpCallbackFunction aCallback, + TAny* aPtr, + TInt aParameter); + + /** + @publishedPartner + @released + + The event manager contains a number of callback registrations, each of which + binds a function and pointer (normally an object) to a particular kind of + event. Registrations can be bound to all events on a stream. + + If a function is registered for a particular event, it will be called when + that event occurs. One callback function can be associated with more than 1 + callback registration. Callback functions take a pointer argument + which was supplied as part of the registration + + @param aType Event type + + @param aCallback Callback object + + @param aPtr Pointer to data that needs to be passed to the callback function + */ + IMPORT_C void PrivRegisterEventCallbackL(TUint aType, + TRtpCallbackFunction aCallback, + TAny* aPtr); + private: + friend class RRtpSession; + friend class TRtpEvent; + CRtpSendSource* iPtr; + // Note: Comments that start with //\ are pseudo-variables used to get + // Doxygen collaboration diagrams to look right. Ignore them. + //\ TRtpCallback callbacks_1_n; + //\ TRtpEvent events_1_n; + //\ TRtpSendPacket packets_1_n; + }; + + + + +/** +@publishedAll +@released + +A handle to a receive stream. + +An object of this type represents the stream of data on a single SSRC and +delivers the RTP packets and RTCP information in the order they +arrive. + +Note that RTP does not guarantee the order of delivery, which means that the +client may want to buffer the data. +*/ +class RRtpReceiveSource + { + public: + RRtpReceiveSource(); + inline TBool IsOpen() const; + + IMPORT_C void Close(); + + + template inline void + RegisterEventCallbackL(TRtpEventType aType, + void (*aCallback)(T*, const TRtpEvent&), + T* aPtr, + TRtpOneShotness aOneShot, + TInt aParameter) + { + PrivRegisterEventCallbackL(aType|aOneShot, + reinterpret_cast(aCallback), + static_cast(aPtr), aParameter); + } + + + template inline void + RegisterEventCallbackL(TRtpEventType aType, + void (*aCallback)(T*, const TRtpEvent&), + T* aPtr, + TRtpOneShotness aOneShot = ERtpNotOneShot) + { + PrivRegisterEventCallbackL(aType|aOneShot, + reinterpret_cast(aCallback), + static_cast(aPtr)); + } + + /** + @publishedPartner + @released + + Gets the data associated with the specified RTCP SDES (Source Description) + item. + + Note a that the PRIV (Private Extensions) SDES item is not supported + by this mechanism. + + @param aType The value identifying the RTCP SDES item. + + @return A descriptor reference to the SDES item data. + */ + IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue); + + + /** + @publishedPartner + @released + + Gets the most recent SR ((Sender Report) from this SSRC. + + @return A handle to the SR. + */ + IMPORT_C RRtcpSRPart GetSR(); + + + /** + @publishedPartner + @released + + Gets the reason for a BYE packet. + + @return A descriptor contaning the BYE message. This is + KNullDesC if the source has not sent a BYE packet. + */ + IMPORT_C TDesC8& GetByeReason(); + + + /** + @publishedPartner + @released + + Parameters from the last APP (Application Defined) packet. + + @param aName Four-bytes application name + @param aAppData Applciation specific data + @param aSubType Application defined sub-type of the APP packet + */ + IMPORT_C void GetLastApp(TPtrC8& aName, TPtrC8& aAppData, TUint& aSubType); + + IMPORT_C RRtpReceivePacket Packet(); + + /** + @publishedPartner + @released + + Gets the SSRC of the remote end + + @return The SSRC of the remote end + */ + IMPORT_C TUint SSRC() const; + + inline TBool operator == (RRtpReceiveSource aThat) const; + inline TBool operator != (RRtpReceiveSource aThat) const; + + /** + @publishedPartner + @released + + The event manager contains a number of callback registrations, each of which + binds a function and pointer (normally an object) to a particular kind of + event. Registrations can be bound to all events on a stream. + + If a function is registered for a particular event, it will be called when + that event occurs. One callback function can be associated with more than 1 + callback registration. Callback functions take a pointer argument + which was supplied as part of the registration + + @param aType Event type + + @param aCallback Callback object + + @param aPtr Pointer to data that needs to be passed to the callback function + + @param aParameter Parameter to be passed to internal callback subsystem + */ + IMPORT_C void PrivRegisterEventCallbackL(TUint aType, + TRtpCallbackFunction aCallback, + TAny* aPtr, TInt aParameter); + + /** + @publishedPartner + @released + + The event manager contains a number of callback registrations, each of which + binds a function and pointer (normally an object) to a particular kind of + event. Registrations can be bound to all events on a stream. + + If a function is registered for a particular event, it will be called when + that event occurs. One callback function can be associated with more than 1 + callback registration. Callback functions take a pointer argument + which was supplied as part of the registration + + @param aType Event type + + @param aCallback Callback object + + @param aPtr Pointer to data that needs to be passed to the callback function + */ + + IMPORT_C void PrivRegisterEventCallbackL(TUint aType, + TRtpCallbackFunction aCallback, + TAny* aPtr); + private: + friend class RRtpSession; + friend class TRtpEvent; + CRtpReceiveSource* iPtr; + // Note: Comments that start with //\ are pseudo-variables used to get + // Doxygen collaboration diagrams to look right. Ignore them. + //\ TRtpCallback callbacks_1_n; + //\ TRtpEvent events_1_n; + //\ TRtpReceivePacket packets_1_n; + }; + + + + +/** +@publishedAll +@released + +A handle to an RTP packet. + +The packet is accessed through the interface provided by this handle. +*/ +class RRtpPacket + { + public: + inline RRtpPacket(); + inline TBool IsOpen() const; + + IMPORT_C void Close(); + IMPORT_C TPtrC8 Payload() const; + IMPORT_C TUint SequenceNumber() const; + IMPORT_C TUint Timestamp() const; + IMPORT_C TUint SSRC() const; + IMPORT_C RRtpCSRCs CSRCs() const; + IMPORT_C TBool ExtensionPresent() const; + IMPORT_C RRtpHeaderExtension Extension() const; + IMPORT_C TBool Marker() const; + IMPORT_C TUint PayloadType() const; + IMPORT_C TUint Flags() const; + + inline TBool operator == (RRtpPacket aThat) const; + inline TBool operator != (RRtpPacket aThat) const; + + protected: + TRtpPacket* iPtr; + // Note: Comments that start with //\ are pseudo-variables used to get + // Doxygen collaboration diagrams to look right. Ignore them. + //\ RRtpHeaderExtension extension_1_01; + //\ RRtpCSRCs csrcs_1_01; + }; + + + + +/** +@publishedAll +@released + +A handle to an RTP packet to be sent (an RTP send packet). + +@see RRtpSendSource +*/ +class RRtpSendPacket : public RRtpPacket + { + public: + IMPORT_C void Send(); + IMPORT_C TDes8& WritePayload(); + IMPORT_C void SetTimestamp(TUint aTimestamp); + IMPORT_C void SetMarker(TBool aMark); + IMPORT_C void SetPayloadType(TUint aPayloadType); + IMPORT_C void SetFlags(TUint aFlags); + + friend class RRtpSendSource; + }; + + + + +/** +@publishedAll +@released + +A handle to an RTP packet received from another source. +*/ +class RRtpReceivePacket : public RRtpPacket + { + friend class RRtpReceiveSource; + friend class TRtpReceivePacket; + }; + + + + +/** +@publishedAll +@released + +An RTP event. + +An event is generated when anything happens that a client might want +to know about. The class encapulates two pieces of information: +1. An event type as defined by a TRtpEventType value. +2. Additional information whose meaning is dependent on the event type. + +Additional information may be implicitly associated with the event, but still +needs to be fetched from another object, for example, when processing +an ERtpPacketReceived event, the packet (represented by a RRtpReceivePacket +handle) must be obtained from the receive stream (represented by a +RRtpReceiveStream handle). + +Events are always associated with either an RTP session, a send stream or +a receive stream, and this class has functions for getting the corresponding +handle. + +@see RRtpSession +@see RRtpSendSource +@see RRtpReceiveSource +*/ +class TRtpEvent + { + public: + IMPORT_C TRtpEvent(TRtpEventType aType, TInt aStatus, TAny* aData); + IMPORT_C RRtpSession Session() const; + IMPORT_C RRtpSendSource SendSource() const; + IMPORT_C RRtpReceiveSource ReceiveSource() const; + IMPORT_C TBool IsSessionEvent() const; + IMPORT_C TBool IsSendSourceEvent() const; + IMPORT_C TBool IsReceiveSourceEvent() const; + + inline TRtpEventType Type() const; + inline TInt Status() const; + private: + TRtpEventType iType; + TInt iStatus; + TAny* iData; + }; + + + + +/** +@publishedAll +@released + +Reresents an RTP packet's header extension. + +The format of a header extension is profile-defined. +*/ +class RRtpHeaderExtension + { + public: + IMPORT_C TUint16 Type() const; + IMPORT_C void SetType(TUint16 aType); + IMPORT_C TPtrC8 Data(); + private: + friend class RRtpPacket; + TRtpPacket* iPtr; + }; + + + + +/** +@publishedAll +@released + +A handle representing the list of CSRCs in an RTP packet. +*/ +class RRtpCSRCs + { + public: + IMPORT_C TInt Count() const; + IMPORT_C TUint operator [](TUint aIndex) const; + private: + friend class RRtpPacket; + + TRtpPacket* iPtr; + }; + + +/** +@publishedPartner + +A set of panic codes. + +in release mode, different panic codes, such as +KERN-EXEC 3 may be generated instead. +*/ +enum TRtpPanicCode + { + ERtpPacketIsClosed = 1, + ERtpPayloadTypeOutOfRange = 2, + ERtpSessionIsClosed = 3, + ERtpSourceIsClosed = 4, + ERtpNoExtension = 5, + ERtpLeaveInResponseToError = 6, + ERtpCantSend2PacketsAtOnce = 7, + ERtpWrongEventType = 8, + ERtpWrongParameter = 9, + ERtpSendSourceAlreadyOpen = 10, + ERtpSessionAlreadyOpen = 11, + // + ERtpCoreController = 100, + }; + +GLREF_C void Panic(TRtpPanicCode aPanicCode); + +#include "rtp.inl" + +#endif // RTP_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/schedulebaseservermtm.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/schedulebaseservermtm.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,117 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + +#ifndef SCHEDULE_BASE_SERVER_MTM_H_ +#define SCHEDULE_BASE_SERVER_MTM_H_ + +///////////////////////////////////////////////////////////////////////////// +// +// CScheduleBaseServerMtm Declaration +// +///////////////////////////////////////////////////////////////////////////// + + + +#include +#include + + +class CMsvScheduleSend; +class CMsvSysAgentActions; +class TMsvSendErrorAction; +class TMsvSchedulePackage; +class CRepository; + +class CScheduleBaseServerMtm : public CBaseServerMtm +/** +Base class for Server MTMs that support scheduling. + +It contains pure virtual functions which must be implemented by the Server +MTM. These functions are not required for interoperability with any other +classes, however they are essential functionality that must be implemented +by a Server MTM that support scheduling. + +CScheduleBaseServerMtm uses a class derived from CMsvScheduleSend to +interface with the task scheduler. + +@see CMsvScheduleSend +@publishedAll +@released +*/ + { +protected: + +// --- Construction --- + + IMPORT_C CScheduleBaseServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry); + +// --- Send the Scheduled Messages --- + + IMPORT_C virtual void SendScheduledL(CMsvEntrySelection& aSelection, const TBool aMove, const TDesC8& aParameter, TRequestStatus& aStatus); + IMPORT_C virtual void ScheduleL(CMsvEntrySelection& aSelection, const TBool aMove, const TDesC8& aParameter, TRequestStatus& aStatus); + IMPORT_C virtual void ConstructL(); + IMPORT_C void LoadResourceFileL(const TDesC& aResFileName); + +// Other Schedule Commands + + IMPORT_C virtual void CheckScheduleL(const CMsvEntrySelection& aSelection, const TDesC8& aParameter, TRequestStatus& aStatus); + IMPORT_C virtual void DeleteScheduleL(const CMsvEntrySelection& aSelection, const TDesC8& aParameter, TRequestStatus& aStatus); + +// --- Pure virtual functions that must be implemented in a derived class --- + + /** + Populates a TMsvSchedulePackage object with scheduling information. + + @param aParameter Parameter information for the package + @param aMove Flag that signals whether a move or copy is required + @param aPackage On return, a populated object + */ + virtual void PopulateSchedulePackage(const TDesC8& aParameter, const TBool aMove, TMsvSchedulePackage& aPackage) const = 0; + + /** + Loads the resource file (if any) for the MTM. + */ + virtual void LoadResourceFileL() = 0; + + + IMPORT_C void Queue(TRequestStatus& aStatus); + + IMPORT_C void LoadScheduleSettingsL(CRepository& aRepository, TBool aRestoreErrorsFromResource = EFalse, TInt aErrorsResourceId = 0); + +protected: + + IMPORT_C ~CScheduleBaseServerMtm(); + +private: + + void RequestComplete(TRequestStatus* aStatus, TInt aError); + +protected: + +// --- Data Member --- + + /** Message scheduler. */ + CMsvScheduleSend* iScheduleSend; //Should be constructed and deleted by the derived class + + /** MTM resource file. */ + RResourceFile iResourceFile; + /** File server handle. */ + RFs iFs; + /** Asynchronous status word. */ + TRequestStatus* iReport; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/schsend.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/schsend.rh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +#if !defined(__SCHSEND_RH__) +#define __SCHSEND_RH__ + +STRUCT SEND_ERROR + { + LONG error; + } + +STRUCT SEND_ERROR_ACTION + { + BYTE flags; + WORD max_retries = 0; + STRUCT errors[]; + } + +STRUCT SEND_ERROR_ACTIONS + { + STRUCT default; + STRUCT actions[]; + } + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpattributefield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpattributefield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,391 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpAttributeField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPATTRIBUTEFIELD_H +#define CSDPATTRIBUTEFIELD_H + +// INCLUDES +#include +#include +#include "sdpcodecstringconstants.h" +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; +class CSdpFmtAttributeField; +class CSdpAttributeFieldPtrs; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the attribute field of Session Description Protocol + * for media and session level attributes. Media format/payload type level + * attributes are supported by the CSdpFmtAttributeField class. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpAttributeField : public CBase + { + public: // Constructors and destructor + + /** + * Constructs a new attribute field. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpAttributeField* DecodeL( const TDesC8& aText ); + + /** + * Constructs a new attribute field and adds the pointer to the + * cleanup stack. + * + * @param aTest A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpAttributeField* DecodeLC( const TDesC8& aText ); + + /** + * Constructs a new attribute field. + * + * @param aAttribute The attribute name. It can be a pre- + * defined name in the SDP string pool or defined by the + * client. + * @param aValue A valid attribute value or an empty + * descriptor to omit the value part. + * @return a new instance. + */ + IMPORT_C static CSdpAttributeField* NewL( + RStringF aAttribute, const TDesC8& aValue ); + + /** + * Constructs a new attribute field and adds the pointer to the + * cleanup stack. + * + * @param aAttribute The attribute name. It can be a pre-defined + * name in the SDP string pool or defined by the client. + * @param aValue A valid attribute value or an empty + * descriptor to omit the value part. + * @return a new instance. + */ + IMPORT_C static CSdpAttributeField* NewLC( + RStringF aAttribute, const TDesC8& aValue ); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpAttributeField(); + + public: // New functions + + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream Stream used for output. On return the + * stream includes correctly formatted attribute field. + */ + IMPORT_C void EncodeL( RWriteStream& aStream ) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpAttributeField* CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param aObj: The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == ( const CSdpAttributeField& aObj ) const; + + /** + * Gets the attribute name. + * + * @return The attribute name. The name can be pre-defined + * name in the SDP string table or defined by the client. + */ + IMPORT_C RStringF Attribute() const; + + /** + * Gets the attribute. + * + * @return The value or an empty descriptor if there is no value part. + */ + IMPORT_C const TDesC8& Value() const; + + /** + * Sets the attribute and attribute value. + * + * @param aAttribute A valid attribute name. It can be a + * pre-defined name in the SDP string pool or + * defined by the client. + * @param aValue A valid attribute value or an empty + * descriptor to omit the value part. + * @leave KErrSdpCodecAttributeField if the attribute part is not + * pre-defined EAttributeFmtp or EAttributeRtpmap. + */ + IMPORT_C void SetL( RStringF aAttribute, const TDesC8& aValue ); + + /** + * Assigns attribute to the format level attribute. + * In the final output the attribute will placed after format level + * attribute. + * + * @param aFmtAttribute A format level + * attribute this attribute is assigned to. + */ + IMPORT_C void AssignTo(const CSdpFmtAttributeField& aFmtAttribute); + + /** + * Test if the attribute belongs to the given format level attribute. + * Note, that the check can be true for the media level paremeter if + * it appears after the last format level attribute. + * + * @param aFmtAttribute: A format level + * attribute this attribute belongs to. + * @return ETrue if attribute belongs to the format level attribute, + * EFalse otherwise. + */ + IMPORT_C TBool BelongsTo(const CSdpFmtAttributeField& aFmtAttribute) const; + + public: // Internal to codec + + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL( RWriteStream& aStream ) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpAttributeField* InternalizeL( RReadStream& aStream ); + + /** + * Informs if the attribute belongs to any format level attribute. + * + * @return ETrue if attribute belongs to any format level + * attribute, EFalse otherwise. + */ + TBool IsFmtAttribute(); + + private: // Constructors + + /** + * Constructor + */ + CSdpAttributeField(); + + /** + * Second phase constructor + * + * @param aText Text string ending to LF character + */ + void ConstructL( const TDesC8& aText ); + + /** + * Second phase constructor + * + * @param aAttribute Attribute identifier + * @param aValue Value of the attribute of KNullDesC8 + */ + void ConstructL( RStringF aAttribute, const TDesC8& aValue ); + + private: // Internal + + /** + * Verifies that attribute is valid property attribute and initializes + * the member variables of class accordingly + * + * @param aAttribute Attribute in descriptor + */ + void FormatProperyAttributeL( const TDesC8& aAttribute ); + + /** + * Verifies that attribute is valid value attribute and initializes + * the member variables of class accordingly + * + * @param aArray Array of the attributes + */ + void FormatValueAttributeL( const TDesC8& aAttribute, + const TDesC8& aValue ); + + /** + * Verifies that the value is valid for the attribute + * + * @param aAttribute The attribute + * @param aArray Array containing the values (and attribute) + */ + void VerifyValueAttributeL( SdpCodecStringConstants::TStrings aString, + const TDesC8& aValue ); + + /** + * Forms attribute and value strings out of the token array + * and pushes both (aAttribute & aValue) into cleanup stack + * + * @param aArray Token array + * @param aAttribute Attribute string (in cleanup stack) + * @param aValue Value string (in cleanup stack) + */ + void CreateAttributeAndValueStringsLC( RArray& aArray, + HBufC8*& aAttribute, + HBufC8*& aValue ); + + /** + * Checks if the value is among the valid orient attributes + * + * @param aValue Value string + */ + void CheckValidOrientL( const TDesC8& aValue ); + + /** + * Checks if the value is valid language attribute as + * specified in RFC 3066 + * + * @param aValue Value string + */ + void CheckValidLangStrL( const TDesC8& aValue ); + + /** + * Checks if the value is valid framerate attribute + * + * @param aValue Value string + */ + void CheckValidFrameRateL( const TDesC8& aValue ); + + /** + * Checks if the value is among valid uri value for control attribute + * + * @param aValue Value string + */ + void CheckValidControlL( const TDesC8& aValue ); + + /** + * Checks if the value is valid value for group attribute as + * specified in RFC 3388 + * + * @param aValue Value string + */ + void CheckValidGroupL( const TDesC8& aValue ); + + /** + * Checks if the value is valid value for des attribute as + * specified in RFC 3312 + * + * @param aValue Value string + */ + void CheckValidDesL( const TDesC8& aValue ); + + /** + * Checks if the value is valid value for curr and conf attribute as + * specified in RFC 3312 + * + * @param aValue Value string + */ + void CheckValidCurrAndConfL( const TDesC8& aValue ); + + /** + * Checks if value is included in the list of predefined values + * + * @param aItemsCount Predefined values count + * @param aValuesList List of predefined values + * @param aValue Value string + */ + void ValidValueInListL( TInt aItemsCount, + const TText8* const aValuesList[], + const TDesC8& aValue ); + + /** + * Checks if the value is valid value for range attribute as + * specified in RFC 2326 + * + * @param aValue Value string + */ + void CheckValidRangeL( const TDesC8& aValue ); + + + /** + * Checks if the value is valid rtpmap string + * + * @param aValue Value string + */ + void CheckValidRtpmapL( const TDesC8& aValue ); + + /** + * Checks if the value is valid fmtp string + * + * @param aValue Value string + */ + void CheckValidFmtpL( const TDesC8& aValue ); + + /** + * Set attribute and values. Attribute is not one of predefined ones. + * + * @param aAttribute Attribute string (in cleanup stack) + * @param aValue Value string + */ + void SetNotPredefinedAttributeL( const TDesC8& aAttribute, + const TDesC8& aValue ); + + void CreateAttributeFieldPtrsL(); + + inline CSdpAttributeFieldPtrs& AttributeFieldPtrs(); + + inline const CSdpAttributeFieldPtrs& AttributeFieldPtrs() const; + + __DECLARE_TEST; + + private: // Data + + // String pool + RStringPool iPool; + + // Attribute name + RStringF iAttribute; + + // Flag indicating if the attribute is a property attribute + TBool iPropertyAttribute; + + // Value field + HBufC8* iValue; + }; + +#endif // CSDPATTRIBUTEFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpbandwidthfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpbandwidthfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,190 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpBandwidthField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPBANDWIDTHFIELD_H +#define CSDPBANDWIDTHFIELD_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the bandwidth field of + * the Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpBandwidthField : public CBase + { + public:// Constructors and destructor + /** + * Constructs a new bandwidth field. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpBandwidthField* DecodeL(const TDesC8& aText); + + /** + * Constructs a new bandwidth field and adds the pointer to the + * cleanup stack. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpBandwidthField* DecodeLC(const TDesC8& aText); + + /** + * Constructs a new bandwidth field. + * + * @param aModifier Bandwidth modifier. + * @param aValue Bandwidth value. + * @return a new instance. + */ + IMPORT_C static CSdpBandwidthField* NewL(RStringF aModifier, + TUint32 aValue); + + /** + * Constructs a new bandwidth field and adds the pointer to the + * cleanup stack. + * + * @param aModifier Bandwidth modifier. + * @param aValue Bandwidth value. + * @return a new instance. + */ + IMPORT_C static CSdpBandwidthField* NewLC(RStringF aModifier, + TUint32 aValue); + + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpBandwidthField(); + + public: // New functions + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream Stream used for output. On return + * the stream includes correctly formatted bandwidth field. + */ + IMPORT_C void EncodeL(RWriteStream& aStream) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpBandwidthField * CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == (const CSdpBandwidthField& aObj) const; + + /** + * Gets the bandwidth modifier. + * + * @return The modifier that can be pre-defined in the + * SDP string table or defined by the user. + */ + IMPORT_C RStringF Modifier() const; + + /** + * Sets the bandwidth modifier. + * + * @param aModifier A valid bandwidth modifier name. + */ + IMPORT_C void SetModifier(RStringF aModifier); + + /** + * Gets the bandwidth value. + * + * @return The value. + */ + IMPORT_C TUint32 Value() const; + + /** + * Sets the bandwidth value. + * + * @param aValue The Value. + */ + IMPORT_C void SetValue(TUint32 aValue); + + public: + /** + * Externalize the instance in a memory optimized format. + * + * @param aStream The stream used for externalization. + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Create a new instance from value created with ExternalizeL(). + * + * @param aStream The stream used for internalization. + * @return The new instance. + */ + static CSdpBandwidthField* InternalizeL(RReadStream& aStream); + + private: + CSdpBandwidthField(); + void ConstructL(const TDesC8& aText); + void ConstructL(RStringF aModifier, TUint32 aValue); + void ConstructL(const TDesC8& aModifier, TUint32 aValue); + + /** + * Copies given modifier to iModifier. If aModifier is none of + * predefined ones, new modifier is added to stringPool. + * + * @param aModifier Given modifier + */ + void CopyModifierL(const TDesC8& aModifier); + + private: // Data + RStringF iModifier; + TUint32 iValue; + RStringPool iStringPool; + }; + +#endif // CSDPBANDWIDTHFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpcodecconstants.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpcodecconstants.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpCodecConstants.h +* Part of : SDPCodec +* Constants defination file +* Version : 1.0 +* +*/ + + + + +#ifndef __SDPCODECCONSTANTS_H__ +#define __SDPCODECCONSTANTS_H__ + +/** +* @file +* @publishedAll +* @released +*/ + + +// Delimiter constants +const TText8 KDotChar = '.'; +const TText8 KColonChar = ':'; +const TText8 KSPChar = ' '; +const TText8 KEqualChar = '='; +const TText8 KSlashChar = '/'; +const TText8 KHyphenChar = '-'; +const TText8 KLFChar = '\n'; +const TText8 KCRChar = '\r'; +const TText8 KEofChar = '\0'; + +_LIT8(KDotStr, "."); +_LIT8(KColonStr, ":"); +_LIT8(KSPStr, " "); +_LIT8(KEqualStr, "="); +_LIT8(KSlashStr, "/"); +_LIT8(KHyphenStr, "-"); +_LIT8(KCRLFStr, "\r\n"); +_LIT8(KLFStr, "\n"); +_LIT8(KCRStr, "\r"); +_LIT8(KEofStr, "\0"); +_LIT8(KValidFQDNChars, + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-"); + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpcodecerr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpcodecerr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,65 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpCodecErr.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef SDPCODECERR_H +#define SDPCODECERR_H + +/** +* @file +* @publishedAll +* @released +*/ + +/** + * Base value for the SdpCode error code range + */ +const TInt KSdpCodecErrorBase = -17875; +/** + * Codec encoding errors for SDP fields + */ +const TInt KErrSdpCodecVersionField = KSdpCodecErrorBase; +const TInt KErrSdpCodecOriginField = KSdpCodecErrorBase - 1; +const TInt KErrSdpCodecSessionField = KSdpCodecErrorBase - 2; +const TInt KErrSdpCodecInfoField = KSdpCodecErrorBase - 3; +const TInt KErrSdpCodecUriField = KSdpCodecErrorBase - 4; +const TInt KErrSdpCodecEmailField = KSdpCodecErrorBase - 5; +const TInt KErrSdpCodecPhoneField = KSdpCodecErrorBase - 6; +const TInt KErrSdpCodecConnectionField = KSdpCodecErrorBase - 7; +const TInt KErrSdpCodecBandwidthField = KSdpCodecErrorBase - 8; +const TInt KErrSdpCodecTimeField = KSdpCodecErrorBase - 9; +const TInt KErrSdpCodecRepeatField = KSdpCodecErrorBase - 10; +const TInt KErrSdpCodecZoneField = KSdpCodecErrorBase - 11; +const TInt KErrSdpCodecKeyField = KSdpCodecErrorBase - 12; +const TInt KErrSdpCodecAttributeField = KSdpCodecErrorBase - 13; +const TInt KErrSdpCodecMediaField = KSdpCodecErrorBase - 14; +const TInt KErrSdpCodecMediaInfoField = KSdpCodecErrorBase - 15; +const TInt KErrSdpCodecMediaConnectionField = KSdpCodecErrorBase - 16; +const TInt KErrSdpCodecMediaBandwidthField = KSdpCodecErrorBase - 17; +const TInt KErrSdpCodecMediaKeyField = KSdpCodecErrorBase - 18; +const TInt KErrSdpCodecMediaAttributeField = KSdpCodecErrorBase - 19; +const TInt KErrSdpCodecTypedTime = KSdpCodecErrorBase - 20; + +const TInt KErrSdpCodecStringPool = KSdpCodecErrorBase - 21; +const TInt KErrSdpCodecDecode = KSdpCodecErrorBase - 22; + +#endif //SDPCODECERR_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpcodecstringpool.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpcodecstringpool.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,88 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpCodecStringPool.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef SDPCODECSTRINGPOOL_H +#define SDPCODECSTRINGPOOL_H + +// INCLUDES +#include +#include "_sdpdefs.h" +#include + +class CSdpCodecStringPool; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* This class defines string pool for SDP Codec. +* The client of SDP Codec must call OpenL() before +* invoking any function of SDP Codec classes. +* The client must close the string pool when finished using +* SDP Codec classes. +* +* Note: the client must not close the string pool while +* using SDP Codec classes. +* +* @lib sdpcodec.lib +*/ +class SdpCodecStringPool + { +public: // Constructors and destructor + + /** + * Opens SDP Codec string pool. + * + * @leave KErrAlreadyExists if pool already exists in TLS. + */ + IMPORT_C static void OpenL(); + + /** + * Closes SDP Codec string pool. + * + */ + IMPORT_C static void Close(); + +public: + + /** + * Gets the string pool used by SDP Codec. + * + * @return RStringPool: A handle to a string pool + * @leave KErrSdpCodecStringPool if the pool is not opened. + * + */ + IMPORT_C static RStringPool StringPoolL(); + + /** + * Gets the string table used by SDP Codec. + * + * @return TStringTable&: The string pool table + * @leave KErrSdpCodecStringPool if the pool is not opened. + * + */ + IMPORT_C static const TStringTable& StringTableL(); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpconnectionfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpconnectionfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,443 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpConnectionField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPCONNECTIONFIELD_H +#define CSDPCONNECTIONFIELD_H + +// INCLUDES +#include +#include +#include +#include "_sdpdefs.h" + +// CONSTANTS +const TUint KDefaultNumOfAddress = 1; + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the connection information field of + * the Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpConnectionField : public CBase + { + public: // Constructors and destructor + + /** + * Constructs a new connection field. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpConnectionField* DecodeL( const TDesC8& aText ); + + /** + * Constructs a new connection field and adds the pointer to the + * cleanup stack. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpConnectionField* DecodeLC( const TDesC8& aText ); + + /** + * Constructs a new connection field. + * Also sets the network type to "IN" and address type to "IP4" or + * "IP6" depending on the address family of aAddress. + * + * @param aAddress IP address from either KAfInet + * or KAfInet6 family + * @param aTTL Time-To-Live for IP4 multicasts, set it as + * KErrNotFound if IPv6 multicast or IPv4 unicast + * @param aNumOfAddress Number of addresses in multicast, + * if unicast, must be 1 + * @return a new instance. + */ + IMPORT_C static CSdpConnectionField* NewL( + const TInetAddr& aAddress, + TInt aTTL = KErrNotFound, + TUint aNumOfAddress = KDefaultNumOfAddress ); + + /** + * Constructs a new connection field. + * + * @param aNetType A valid network type name from the pre- + * defined SDP string table or defined by the user. + * @paramaAddressType A valid address type name from the + * pre-defined SDP string table or defined by the user. + * @param const TDesC8& aAddress: A valid address of the address type. + * Can contain TTL & number of addresses parameter as well. + * @return a new instance. + */ + IMPORT_C static CSdpConnectionField* NewL( + RStringF aNetType, + RStringF aAddressType, + const TDesC8& aAddress ); + + /** + * Constructs a new connection field and adds the pointer to the + * cleanup stack. Also sets the network type to "IN" and address type + * to "IP4" or "IP6" depending on the address family of aAddress. + * + * @param aAddress IP address from either KAfInet + * or KAfInet6 family + * @param aTTL Time-To-Live for IP4 multicasts, set it as + * KErrNotFound if IPv6 multicast or IPv4 unicast + * @param aNumOfAddress Number of addresses in multicast, + * if unicast, must be 1 + * @return a new instance. + */ + IMPORT_C static CSdpConnectionField* NewLC( + const TInetAddr& aAddress, + TInt aTTL = KErrNotFound, + TUint aNumOfAddress = KDefaultNumOfAddress ); + + /** + * Construct a new connection field and adds the pointer to the + * cleanup stack. + * + * @param aNetType A valid network type name from the pre- + * defined SDP string table or defined by the user + * @paramaAddressType A valid address type name from the + * pre-defined SDP string table or defined by the user + * @param const TDesC8& aAddress: A valid address of the address type. + * Can contain TTL & number of addresses parameter as well. + * @return a new instance. + */ + IMPORT_C static CSdpConnectionField* NewLC( + RStringF aNetType, RStringF aAddressType, const TDesC8& aAddress ); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpConnectionField(); + + public: // New functions + + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream: Stream used for output. On return the + * stream includes correctly formatted connection field. + */ + IMPORT_C void EncodeL( RWriteStream& aStream ) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpConnectionField* CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param const CSdpConnectionField& aObj: The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator== ( const CSdpConnectionField& aObj ) const; + + /** + * Gets the network type that is from the pre-defined SDP string table + * or given by the user. + * + * @return The network type. + */ + IMPORT_C RStringF NetType() const; + + /** + * Gets the address type that is from the pre-defined SDP string table + * or given by the user. + * + * @return The address type. + */ + IMPORT_C RStringF AddressType() const; + + /** + * Gets the address. + * + * @return Address as an IP address or null if it is + * not an IP address. This may be e.g. when the address + * has been specified as a FQDN. In this case, the address + * can be accessed using the other getters. + */ + IMPORT_C const TInetAddr* InetAddress() const; + + /** + * Gets the address. + * + * @return Address as a string. + */ + IMPORT_C const TDesC8& Address() const; + + /** + * Sets the address, network and address type. Also sets the network + * type to "IN" and address type to "IP4" or "IP6" depending on the + * address family of aAddress. + * + * @param aValue The new address. + * @param aTTL Time-To-Live for IP4 multicasts, set it as + * KErrNotFound if IPv6 multicast or IPv4 unicast + * @param aNumOfAddress Number of addresses in multicast, + * if unicast, must be 1. + * @leave KErrSdpCodecConnectionField ifaddress to be set is wrongly + * formatted. + */ + IMPORT_C void SetInetAddressL( const TInetAddr& aValue, + TInt aTTL = KErrNotFound, + TUint aNumOfAddress = KDefaultNumOfAddress); + + /** + * Sets the address, network and address type. + * + * @param aNetType A valid network type name from the pre- + * defined SDP string table or defined by the user + * @param aAddressType A valid address type name from the + * pre-defined SDP string table or defined by the user + * @param aAddress A valid address of the address type. + */ + IMPORT_C void SetAddressL( RStringF aNetType, + RStringF aAddressType, + const TDesC8& aAddress ); + + /** + * Gets TTL attribute. + * + * @return TTL or KErrNotFound, if one is not available for the address + */ + IMPORT_C TInt TTLValue() const; + + /** + * Sets TTL attribute (only valid for IP4 multicasts). + * Leaves if trying to set TTL to address that doesn't support it. + * + * @param aTTL Time-To-Live for IP4 multicasts + * @leave KErrSdpCodecConnectionField if aTTL is invalid. + */ + IMPORT_C void SetTTLL( TInt aTTL ); + + /** + * Gets the number of addresses (can be more than 1 for multicasts). + * Multicast addresses are contiguously allocated above the base + * address. + * + * @return Number of addresses + */ + IMPORT_C TInt NumOfAddress() const; + + /** + * Sets the number of addreses allocated for multicast. + * + * @param aNumOfAddress Number of addresses in multicast + * @leave KErrSdpCodecConnectionField if the address is unicast. + */ + IMPORT_C void SetNumOfAddressL( TUint aNumOfAddress ); + + public: // Internal to codec + + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL( RWriteStream& aStream ) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpConnectionField* InternalizeL( RReadStream& aStream ); + + private: // Internal + + /** + * Constructor + */ + CSdpConnectionField(); + + /** + * 2nd phase constructor + * + * @param aText A string containing a correctly formatted field value + * terminated by a CRLF. + */ + void ConstructL( const TDesC8& aText ); + + /** + * 2nd phase constructor + * + * @param aAddress IP address from either KAfInet or KAfInet6 family + * @param aTTL Time-To-Live for IP4 multicasts + * @param aNumOfAddress Nubmer of addresses in multicast + */ + void ConstructL( const TInetAddr& aAddress, + TInt aTTL, TUint aNumOfAddress ); + + /** + * 2nd phase constructor + * + * @param aNetType A valid network type name from the pre-defined + * SDP string table or defined by the user + * @param aAddressType A valid address type name from the pre-defined + * SDP string table or defined by the user + * @param aAddress A valid address of the address type + */ + void ConstructL( RStringF aNetType, RStringF aAddressType, + const TDesC8& aAddress ); + + /** + * Checks if the address is valid against given arguments + * + * @param aAddressTypeIP4 The given type of address (EFalse = IP6) + * @param aAddress Address with possibly TTL & number of addresses + * @return error code (KErrNone if valid) + */ + TInt IsValidAddress( TBool aAddressTypeIP4, + const TDesC8& aAddress ) const; + + /** + * Checks if the address is valid against given arguments + * + * @param aAddress Address in TInetAddr format + * @param aTTL TTL attribute + * @param aNumOfAddress Number off addresses + * @return error code (KErrNone if valid) + */ + TInt IsValidAddress( const TInetAddr& aAddress, + TInt aTTL, TUint aNumOfAddress ) const; + + /** + * Parses address field + * + * @param aAddressTypeIP4 The given type of address (EFalse = IP6) + * @param aAddress Address with possibly TTL & number of addresses + * @param aTTL TTL value is stored here (or KErrNotFound) + * @param aNumberOfAddresses Range of addreses + * @return The address + */ + HBufC8* ParseAddressFieldL( TBool aAddressTypeIP4, + const TDesC8& aAddress, + TInt& aTTL, + TUint& aNumberOfAddresses ) const; + + /** + * Parses IP4 address + * + * @param aPos Position of the (first) separation mark + * @param aTTL TTL value is stored here (or KErrNotFound) + * @param aAddr Addres in TInetAddr format + * @param aAddress The whole address field + * @param aNumberOfAddresses Range of addreses + * @return The address + */ + HBufC8* ParseIP4AddressL( TInt aPos, + TInetAddr& aAddr, + const TDesC8& aAddress, + TInt& aTTL, + TUint& aNumberOfAddresses ) const; + + /** + * Parses IP6 address + * + * @param aPos Position of the (first) separation mark + * @param aTTL TTL value is stored here (or KErrNotFound) + * @param aAddr Addres in TInetAddr format + * @param aAddress The whole address field + * @param aNumberOfAddresses Range of addreses + * @return The address + */ + HBufC8* ParseIP6AddressL( TInt aPos, + TInetAddr& aAddr, + const TDesC8& aAddress, + TInt& aTTL, + TUint& aNumberOfAddresses ) const; + + /** + * Copies given network type to iNetType and verifies aNetType to + * be valid + * + * @param aNetType Given network type + */ + void CopyNetTypeL( const TDesC8& aNetType ); + + /** + * Copies given address type to iAddressType and verifies aAddrType + * to be valid + * + * @param aAddrType Given address type + */ + void CopyAddressTypeL( const TDesC8& aAddrType ); + + /** + * Copies address to iAddress, and initalizes TTL & number of addresses, + * leaves on error + * + * @param aAddress Address string, which can also contain TTL + * and number of addresses attributes + */ + void CopyAddressL( const TDesC8& aAddress, RStringPool aPool ); + + private: // Data + + // + RStringF iNetType; + + //
+ RStringF iAddressType; + + // mutable TInetAddr for InetAddress() + mutable TInetAddr iInetAddress; + + // Address in text format + HBufC8* iAddress; + + // TTL for IP4 multicast addresses + TInt iTTL; + // Number of addresses + TUint iNumOfAddress; + + // String pool + RStringPool iPool; + + __DECLARE_TEST; + }; + +#endif // CSDPCONNECTIONFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpdocument.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpdocument.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,446 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpDocument.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPDOCUMENT_H +#define CSDPDOCUMENT_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" +#include + +// FORWARD DECLARATIONS +class SdpUtil; +class RReadStream; +class RWriteStream; +class CUri8; +class CDesC8Array; +class CSdpOriginField; +class CSdpEmailField; +class CSdpPhoneField; +class CSdpConnectionField; +class CSdpBandwidthField; +class CSdpTimeField; +class CSdpAttributeField; +class CSdpMediaField; +class CSdpKeyField; +class CSdpCodecParseUtil; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the Session Description Protocol (SDP) document. + * The SDP document is a collection of SDP fields and related values + * describing a session. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpDocument : public CBase + { + public: // Constructors and destructor + /** + * Constructs a new SDP document. + * + * @param aText A string containing a correctly formatted SDP document. + * @return a new instance. + */ + IMPORT_C static CSdpDocument* DecodeL(const TDesC8& aText); + + /** + * Constructs a new SDP document and adds the pointer to the cleanup stack. + * + * @param aText A string containing a correctly formatted SDP document. + * @return a new instance. + */ + IMPORT_C static CSdpDocument* DecodeLC(const TDesC8& aText); + + /** + * Constructs a new, empty SDP document. + * The instance will have the following initial values: + * v=0 + * s=- + * t=0 0 + * + * @return a new instance. + */ + IMPORT_C static CSdpDocument* NewL(); + + /** + * Constructs a new, empty SDP document document and adds the pointer to + * the cleanup stack. + * The instance will have the following initial values: + * v=0 + * s=- + * t=0 0 + * + * @return a new instance. + */ + IMPORT_C static CSdpDocument* NewLC(); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpDocument(); + + public: + /** + * Externalizes the object state in an internal, memory optimized format. + * + * @param aStream The output stream. + */ + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + + /** + * Internalizes the object state from an internal, memory optimized format. + * + * @param aStream The input stream. + * @return A new SDP document internalized from the input stream. + */ + IMPORT_C static CSdpDocument* InternalizeL(RReadStream& aStream); + + /** + * Outputs the SDP document formatted according to SDP syntax. + * It is possible to output the document even though it is + * incomplete in the sense that all mandatory SDP fields are + * not present.When creating an SDP document to be used e.g. + * as part of SIP signalling, caller should first ensure the + * validity of the document using the IsValid() function. + * + * @param aStream Stream used for output. On return the + * stream includes correctly formatted SDP description. + */ + IMPORT_C void EncodeL(RWriteStream& aStream) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpDocument* CloneL() const; + + /** + * Checks if the instance represents a valid SDP document. + * + * @return ETrue if SDP document is valid and EFalse if not. + */ + IMPORT_C TBool IsValid() const; + + /** + * Gets the SDP version used in the version field. + * Note, that the current implementation supports only version number 0. + * + * @return The SDP version number. + */ + IMPORT_C TUint SdpVersion() const; + + /** + * Gets a reference to the session origin field. + * Note, that the ownership is not transferred and + * the instance must not be deleted by the caller. + * + * @return The origin field or zero if not present. + */ + IMPORT_C CSdpOriginField* OriginField(); + + /** + * Gets a reference to the session origin field. + * + * @return The origin field or zero if not present. + */ + IMPORT_C const CSdpOriginField* OriginField() const; + + /** + * Sets or removes the session origin field. + * Note, that the ownership of the argument is + * transferred to the SDP document object. + * + * @param aObj New origin field or null to remove the field. + */ + IMPORT_C void SetOriginField(CSdpOriginField* aObj); + + /** + * Gets the session name field value. + * + * @return The session name or empty descriptor if not present. + */ + IMPORT_C const TDesC8& SessionName() const; + + /** + * Sets the session name field value. + * + * @param aValue Valid session name value. + * Note that an empty value is not accepted. + * @leave KErrSdpCodecSessionField if + * aValue is not empty or aValue includes invalid byte strings + * (´\0´, ´\n´, ´\r´). + */ + IMPORT_C void SetSessionNameL(const TDesC8& aValue); + + /** + * Gets the session information field value. + * + * @return Info field value or an empty descriptor if not present. + */ + IMPORT_C const TDesC8& Info() const; + + /** + * Sets or removes the session information field value. + * + * @param New field value or an empty descriptor to remove the field. + * @leave KErrSdpCodecInfoField if aValue is not empty or aValue includes + * invalid byte strings (´\0´, ´\n´, ´\r´). + */ + IMPORT_C void SetInfoL(const TDesC8& aValue); + + /** + * Gets the session URI field value. + * Note, that the ownership is not transferred and + * the instance must not be deleted by the caller. + * + * @return CUri8*: Session URI or zero if the field is not present. + */ + IMPORT_C CUri8* Uri(); + + /** + * Gets the session URI field value. + * + * @return Session URI or zero if the field is not present. + */ + IMPORT_C const CUri8* Uri() const; + + /** + * Sets or removes the session level URI field. + * Note, that the ownership of the argument is + * transferred to the SDP document object. + * + * @param New value of the field or zero to remove the field. + */ + IMPORT_C void SetUri(CUri8* aValue); + + /** + * Gets the set of session level email field values. This array is used to + * add and remove fields into the document. + * Note, that only correctly formatted email field values should be placed + * into the array. Empty values in the array will be ignored. + * + * @return Email fields in array or empty array if no email fields. + */ + IMPORT_C CDesC8Array& EmailFields(); + + /** + * Gets the set of session level phone field values. This array is used to + * add and remove fields into the document. + * Note, that only correctly formatted phone field values should be placed + * into the array. Empty values in the array will be ignored. + * + * @return Phone fields in array or empty array if no phone fields. + */ + IMPORT_C CDesC8Array& PhoneFields(); + + /** + * Gets the session level connection field. + * Note, that the ownership is not transferred and the instance must not be + * deleted by the caller. + * + * @return Connection field or zero if not present. + */ + IMPORT_C CSdpConnectionField* ConnectionField(); + + /** + * Gets the session level connection field. + * + * @return Connection field or zero if not present. + */ + IMPORT_C const CSdpConnectionField* ConnectionField() const; + + /** + * Sets or removes the session level connection field. + * Note, that the ownership of the argument is + * transferred to the SDP document object. + * + * @param New connection field or zero to remove the field. + */ + IMPORT_C void SetConnectionField(CSdpConnectionField* aObj); + + /** + * Gets the possibly empty set of session level bandwidth fields. + * This array is used directly for element insertion and removal. + * The array may contain zero references and these are ignored. + * + * The objects referenced from the array are owned by the document + * instance and must not be deleted. An object can be removed from + * the document by setting the corresponding element to zero. By + * doing so, the calling party receives ownership of the removed object. + * + * @return Set of bandwidth fields. + */ + IMPORT_C RPointerArray& BandwidthFields(); + + /** + * Gets the set of session level time description fields. + * This array is used directly for element insertion and removal. + * There must be at least one time description field in a valid SDP + * document.The array may contain zero references and these are ignored. + * + * The objects referenced from the array are owned by the document + * instance and must not be deleted. An object can be removed from the + * document by setting the corresponding element to zero. By doing so, + * the calling party receives ownership of the removed object. + * + * @return Set of time fields. + */ + IMPORT_C RPointerArray& TimeFields(); + + /** + * Gets the zone adjustments field value. + * + * @return The field value or an empty descriptor if the + * field is not present. + */ + IMPORT_C const TDesC8& ZoneAdjustments() const; + + /** + * Sets the zone adjustments field value. + * + * @param aValue A valid field value or an empty descriptor + * if field is not present. + */ + IMPORT_C void SetZoneAdjustmentsL(const TDesC8& aValue); + + /** + * Gets the session level encryption key field. + * Note, that the ownership is not transferred and + * the instance must not be deleted by the caller. + * + * @return The encryption key or zero if not present. + */ + IMPORT_C CSdpKeyField* Key(); + + /** + * Gets the session level encryption key field. + * + * @return The encryption key or zero if not present. + */ + IMPORT_C const CSdpKeyField* Key() const; + + /** + * Sets or removes the encryption key field. + * Note, that the ownership of the argument is + * transferred to the SDP document object. + * + * @param aObj New value of the field or zero to remove the field. + */ + IMPORT_C void SetKey(CSdpKeyField* aObj); + + /** + * Gets the possibly empty set of session level attribute fields. + * This array is used directly for element insertion and removal. + * The array may contain zero references and these are ignored. + * + * The objects referenced from the array are owned by the document + * instance and must not be deleted. An object can be removed from the + * document by setting the corresponding element to zero. By doing so, + * the calling party receives ownership of the removed object. + * + * @return Set of session level attributes. + */ + IMPORT_C RPointerArray& AttributeFields(); + + /** + * Gets the possibly empty set of media description fields. + * This array is used directly for element insertion and removal. + * Note, that media level attributes and fields are managed + * through the corresponding media field instance and not through + * the document instance. + * The array may contain zero references and these are ignored. + * + * The objects referenced from the array are owned by the document + * instance and must not be deleted. An object can be removed from the + * document by setting the corresponding element to zero. By doing so, + * the calling party receives ownership of the removed object. + * + * @return Set of media description fields. + */ + IMPORT_C RPointerArray& MediaFields(); + + private: + CSdpDocument(); + void ConstructL(); + void ConstructL(const CSdpDocument& aSdpDocument); + void DoInternalizeL(RReadStream& aStream); + + void ParseL (const TDesC8& aText); + void ParseSessionVersionL(); + void ParseSessionOwnerL(); + void ParseSessionNameL(); + void ParseSessionInformationL(); + void ParseUriL(); + void ParseEmailL(); + void ParsePhoneL(); + void ParseConnectionL(); + void ParseBandwidthL(); + void ParseTimeFieldL(); + void ParseZoneAdjustmentL(); + void ParseEncryptionKeyL(); + void ParseAttributeFieldL(); + void ParseMediaLevelL (); + void ExternalizeDesCArrayL(CDesC8ArraySeg& aArray, + RWriteStream& aStream) const; + void EncodeDesCArrayL(CDesC8ArraySeg& aArray,TInt aIndex, + RWriteStream& aStream) const; + + TDesC8& GetTokenFromStreamL(RReadStream& aStream); + + CSdpDocument(const CSdpDocument&); // Hidden. + CSdpDocument& operator = (const CSdpDocument&); // Hidden + + private: // Data + + HBufC8* iInfo; + HBufC8* iSessionName; + HBufC8* iZoneAdjustments; + CSdpKeyField* iSdpKeyField; + CSdpOriginField* iSdpOriginField; + CSdpConnectionField* iSdpConnectionField; + TUint iSdpVersion; + RPointerArray* iTimeFields; + RPointerArray* iBandwidthFields; + RPointerArray* iAttributeFields; + RPointerArray* iMediaFields; + CUri8* iUri; + CDesC8ArraySeg* iEmailFields; + CDesC8ArraySeg* iPhoneFields; + RStringPool iPool; + HBufC8* iToken; + CSdpCodecParseUtil* iSdpCodecParseUtil; + }; + +#endif // CSDPDOCUMENT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpfmtattributefield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpfmtattributefield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,263 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpFmtAttributeField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPFMTATTRIBUTEFIELD_H +#define CSDPFMTATTRIBUTEFIELD_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; +class CSdpAttributeField; +class TSdpRtpmapValue; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the attribute field of the Session Description + * Protocol for media format/payload type level attributes. Media and session + * level attributes are supported by the CSdpAttributeField class. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpFmtAttributeField : public CBase + { + public: // Constructors and destructor + /** + * Constructs a new media format level attribute field. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpFmtAttributeField* DecodeL( const TDesC8& aText ); + + /** + * Constructs a new media format level attribute field and adds the + * pointer to the cleanup stack. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpFmtAttributeField* DecodeLC( const TDesC8& aText); + + /** + * Constructs a new media level format attribute field. + * + * @param aAttribute The attribute name. It can be a pre-defined + * name in the SDP string pool or defined by the client. + * @param aFormat A valid format/payload identifier + * used in the format list of the media description. + * @param aValue A valid attribute value or an empty + * descriptor to omit the value part. + * @return a new instance. + */ + IMPORT_C static CSdpFmtAttributeField* NewL( + RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); + + /** + * Constructs a new media format level attribute field and adds the + * pointer to the cleanup stack. + * + * @param aAttribute The attribute name. It can be a pre-defined + * name in the SDP string pool or defined by the client. + * @param aFormat A valid format/payload identifier + * used in the format list of the media description. + * @param aValue A valid attribute value or an empty + * descriptor to omit the value part. + * @return a new instance. + */ + IMPORT_C static CSdpFmtAttributeField* NewLC( + RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpFmtAttributeField(); + + public: // New functions + + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream Stream used for output. On return + * the stream includes correctly formatted attribute field. + */ + IMPORT_C void EncodeL( RWriteStream& aStream ) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpFmtAttributeField * CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator== ( const CSdpFmtAttributeField& aObj ) const; + + /** + * Gets the attribute. + * + * @return The attribute name. The name can be pre-defined + * name in the SDP string table or defined by the client. + */ + IMPORT_C RStringF Attribute() const; + + /** + * Gets the format. + * + * @return The format. + */ + IMPORT_C const TDesC8& Format() const; + + /** + * Gets the attribute value. + * + * @return The value or an empty descriptor if there is no value part. + */ + IMPORT_C const TDesC8& Value() const; + + /** + * Sets the attribute, format/payload type and attribute value. + * + * @param aAttribute A valid attribute name. It can be a + * pre-defined name in the SDP string pool or defined by + * the client. + * @param aFormat A valid format/payload identifier + * used in the formatlist of the media description. + * @param aValue A valid attribute value or an empty + * descriptor to omit the value part. + * @leave KErrSdpCodecMediaAttributeField if aAttribute is not rtpmap + * or fmtp attribute. + */ + IMPORT_C void SetL( + RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); + + public: // Internal to codec + + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL( RWriteStream& aStream ) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpFmtAttributeField* InternalizeL( RReadStream& aStream ); + + /** + * Returns attribute field + * + * @return Attribute field + */ + const CSdpAttributeField* AttributeField() const; + + private: // New methods + + /** + * Creates object from the stream data. + * Does the "2nd phase construction" of internalization. + * + * @param aStream Stream where the object's state will be read + */ + void DoInternalizeL( RReadStream& aStream ); + + /** + * Formats value parameters + * + * @param aField Attribute field object + */ + void FormatValueParamsL( CSdpAttributeField* aField ); + + private: // Construction and destruction + + /** + * Constructor + */ + CSdpFmtAttributeField(); + + /** + * Second phase construction + * + * @param aText A string containing a correctly formatted field value + * terminated by a CRLF. + */ + void ConstructL( const TDesC8& aText ); + + /** + * Second phase construction + * + * @param aAttribute The attribute from the pre-defined SDP string + * table or defined by the user + * @param aFormat A valid format/payload identifier used in the format + * list of the media description. + * @param aValue A valid attribute value or an empty descriptor + * to omit the value part. + */ + void ConstructL( + RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); + + + /** + * Decode format parameter from string + * + * @param aText A text includeing format parameter. + */ + void DecodeFormatL(const TDesC8& aText); + + __DECLARE_TEST; + + private: + + RStringPool iPool; + CSdpAttributeField* iAttributeField; + /** Pointer to the format part*/ + TPtrC8 iFormat; + /** Pointer to the format parameters*/ + TPtrC8 iValuePart; + }; + +#endif // CSDPFMTATTRIBUTEFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpkeyfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpkeyfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,193 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpKeyField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPKEYFIELD_H +#define CSDPKEYFIELD_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the encryption key field of + * the Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpKeyField : public CBase + { + public: // Constructors and destructor + /** + * Constructs a new encryption key field. + * + * @param aFieldValue A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpKeyField* DecodeL(const TDesC8& aFieldValue); + + /** + * Constructs a new encryption key field and adds the pointer to + * the cleanup stack. + * + * @param aFieldValue A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + * @leave In error case function leaves. + */ + IMPORT_C static CSdpKeyField* DecodeLC(const TDesC8& aFieldValue); + + /** + * Constructs a new encryption key field. + * + * @param aMethod Encryption method from the pre-defined + * SDP string table. User defined values are not accepted. + * @param aEncryptionKey A valid encryption key value + * or an empty descriptor to omit the key part. + * @return a new instance. + */ + IMPORT_C static CSdpKeyField* NewL(RStringF aMethod, + const TDesC8& aEncryptionKey); + + /** + * Constructs a new encryption key field and adds the pointer to + * the cleanup stack. + * + * @param aMethod Encryption method from the pre-defined + * SDP string table. User defined values are not accepted. + * @param aEncryptionKey A valid encryption key value + * or an empty descriptor to omit the key part. + * @return a new instance. + */ + IMPORT_C static CSdpKeyField* NewLC(RStringF aMethod, + const TDesC8& aEncryptionKey); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpKeyField(); + + public: // New functions + /** + * Writes the instance as a complete SDP field encoded as UTF-8 + * and formatted as defined in draft-ietf-mmusic-sdp-new-14. + * + * @param aStream Stream used for output. On return + * the stream includes correctly formatted key field. + */ + IMPORT_C void EncodeL(RWriteStream& aStream) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpKeyField * CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == (const CSdpKeyField& aObj) const; + + /** + * Gets the encryption method. + * + * @return The method. + */ + IMPORT_C RStringF Method() const; + + /** + * Gets the encryption key. + * + * @return The key or an empty descriptor if there is no key part. + */ + IMPORT_C const TDesC8& EncryptionKey() const; + + /** + * Sets the encryption method and key. + * + * @param aMethod Encryption method from the pre-defined + * SDP string table. User defined values are not accepted. + * @param aEncryptionKey A valid encryption key value + * or an empty descriptor to omit the key part. + */ + IMPORT_C void SetL(RStringF aMethod, + const TDesC8& aEncryptionKey); + + public: + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpKeyField* InternalizeL(RReadStream& aStream); + + private: + CSdpKeyField(); + void ConstructL(const TDesC8& aText); + void ConstructL(RStringF aMethod, const TDesC8& aEncryptionKey); + void DoInternalizeL(RReadStream& aStream); + void SetMethodAndKeyL(RStringF aMethod, + const TDesC8& aEncryptionKey, + TBool aAllowEmptyKeyValue); + void SetMethodClearAndKeyL(RStringF aMethod, const TDesC8& aEncryptionKey); + void SetMethodBase64AndKeyL(RStringF aMethod, const TDesC8& aText); + void SetMethodUriAndKeyL(RStringF aMethod, const TDesC8& aText); + void SetMethodPromptL(RStringF aMethod, const TDesC8& aText); + RArray GetElementsFromLineL( TLex8& aLexer); + + private: // Data + RStringF iMethod; + TBool iMethodOpen; + HBufC8* iEncryptionKey; + RStringPool iStringPool; + + __DECLARE_TEST; + }; + +#endif // CSDPKEYFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdpmediafield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdpmediafield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,445 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpMediaField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPMEDIAFIELD_H +#define CSDPMEDIAFIELD_H + +// INCLUDES +#include +#include "_sdpdefs.h" +#include + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; +class CSdpConnectionField; +class CSdpBandwidthField; +class CSdpAttributeField; +class CSdpKeyField; +class CSdpFmtAttributeField; +class CSdpCodecParseUtil; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the media description field and related media + * specific subfields of the Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpMediaField : public CBase + { + + public: + + + public: // Constructors and destructor + /** + * Constructs a new media description field. + * + * @param aText A correctly formatted media field + * terminated by a CRLF followed by zero or more media + * attribute fields separated by a CRLF. + * @param aRecurse If ETrue, attempts to construct also media + * attributes following the CRLF terminating the media field. + * @return a new instance. + */ + IMPORT_C static CSdpMediaField* DecodeL(const TDesC8& aText, + TBool aRecurse = ETrue); + + /** + * Constructs a new media description field and adds the pointer to + * the cleanup stack. + * + * @param aText A correctly formatted media field + * terminated by a CRLF followed by zero or more media + * attribute fields separated by a CRLF. + * @param aRecurse If ETrue, attempts to construct also media + * attributes following the CRLF terminating the media field. + * @return a new instance. + */ + IMPORT_C static CSdpMediaField* DecodeLC(const TDesC8& aText, + TBool aRecurse = ETrue); + + /** + * Constructs a new media description field. + * The optional portcount component of the field is initialized to 1. + * + * @param aMedia A valid media type name. + * @param aPort Port number. + * @param aProtocol A valid media protocol name. + * @param aFormatList A valid format list. + * @return a new instance. + */ + IMPORT_C static CSdpMediaField* NewL(RStringF aMedia, + TUint aPort, + RStringF aProtocol, + const TDesC8& aFormatList); + + /** + * Constructs a new media description field and adds the pointer to + * the cleanup stack. + * The optional portcount component of the field is initialized to 1. + * + * @param aMedia A valid media type name. + * @param aPort Port number. + * @param aProtocol A valid media protocol name. + * @param aFormatList A valid format list. + * @return a new instance. + */ + IMPORT_C static CSdpMediaField* NewLC(RStringF aMedia, + TUint aPort, + RStringF aProtocol, + const TDesC8& aFormatList); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpMediaField(); + + public: // New functions + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. Optionally output also the related media + * level fields. + * + * @param aStream Stream used for output. On return the + * stream includes correctly formatted media field with + * media part fields if aRecurse is defined to ETrue. + * @param aRecurse Flag to specify whether to output media + * attributes also (ETrue) or only the media field (EFalse). + */ + IMPORT_C void + EncodeL(RWriteStream& aStream, TBool aRecurse = ETrue) const; + + /** + * Creates a new instance that is equal to the target. + * Optionally also related subfields are cloned. + * + * @param aRecurse Flag to specify whether to clone subfields + * also (ETrue) or only the media field (EFalse). + * @return a new instance. + */ + IMPORT_C CSdpMediaField * CloneL(TBool aRecurse = ETrue) const; + + /** + * Compares this instance to another for equality. Subfields are + * included in the comparison if present. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == (const CSdpMediaField& aObj) const; + + /** + * Checks the consistency between the media field and it's subfields. + * In particular, this function checks that each format specific + * attribute is related to a format in the format list of the + * media field. + * + * @return ETrue if media description is consistent and EFalse if not. + */ + IMPORT_C TBool IsValid() const; + + /** + * Gets the media type. + * + * @return The media type. + */ + IMPORT_C RStringF Media() const; + + /** + * Sets the media type. + * + * @param aMedia The media type. + * @leave KErrSdpCodecMediaField if aMedia is not valid character + */ + IMPORT_C void SetMediaL(RStringF aMedia); + + /** + * Gets the media protocol. + * + * @return The media protocol. + */ + IMPORT_C RStringF Protocol() const; + + /** + * Sets the media protocol. + * + * @param aProtocol The media protocol. + * @leave KErrSdpCodecMediaField if + * aProtocol containing two elements divided by slash are not + * valid tokens. + */ + IMPORT_C void SetProtocolL(RStringF aProtocol); + + /** + * Gets the port number. + * + * @return The port number. + */ + IMPORT_C TUint Port() const; + + /** + * Sets the port number. + * + * @param aPort The port number. + * @leave KErrSdpCodecMediaField if port is not valid number as + * defined in draft-ietf-mmusic-sdp-new-14 + */ + IMPORT_C void SetPortL(TUint aPort); + + /** + * Gets the port count. + * + * @return The port count. + */ + IMPORT_C TUint PortCount() const; + + /** + * Sets the port count. + * + * @param aCount The port count that must be greater than zero. + * @leave KErrSdpCodecMediaField if aCount equals to zero. + */ + IMPORT_C void SetPortCountL(TUint aCount); + + /** + * Gets the format list. + * + * @return The format list. + */ + IMPORT_C const TDesC8& FormatList() const; + + /** + * Sets the format list. + * The format list should contain one or more format tokens separated + * by a single whitespace character. + * + * @param aValue A valid format list. + * @leave KErrSdpCodecMediaField if aValue contains invalid tokens + */ + IMPORT_C void SetFormatListL(const TDesC8& aValue); + + /** + * Return the media level info field value. + * + * @return The value or an empty descriptor if not present. + */ + IMPORT_C const TDesC8& Info() const; + + /** + * Sets the media level info field value. + * + * @param aValue A valid info field value. + * @leave KErrSdpCodecMediaInfoField if aValue is not KNullDesC8 or + * aValue includes invalid byte strings (´\0´, ´\n´, ´\r´). + */ + IMPORT_C void SetInfoL(const TDesC8& aValue); + + /** + * Gets the media level encryption key field. + * Note, that the ownership is not transferred and + * the instance must not be deleted by the caller. + * + * @return Encryption key field or null if not present. + */ + IMPORT_C CSdpKeyField* Key(); + + /** + * Gets the media level encryption key field. + * + * @return Encryption key field or null if not present. + */ + IMPORT_C const CSdpKeyField* Key() const; + + /** + * Sets or removes the media level encryption key field. + * + * @param aObj The new key field or null if field is + * to be removed. Ownership of the referenced object + * is transferred to the media field instance. + */ + IMPORT_C void SetKey(CSdpKeyField* aObj); + + /** + * Gets the set of media format level attributes. + * This array is used directly for element insertion and removal. + * + * The objects referenced from the array are owned by the media + * field instance and must not be deleted. An object can be + * removed from the media description by setting the corresponding + * element to zero. By doing so, the calling party receives ownership + * of the removed object. + * + * @return The set of media format level attributes. + */ + IMPORT_C RPointerArray& FormatAttributeFields(); + + /** + * Gets the set of media level, format independent attributes. + * This array is used directly for element insertion and removal. + * + * The objects referenced from the array are owned by the media + * field instance and must not be deleted. An object can be + * removed from the media description by setting the corresponding + * element to zero. By doing so, the calling party receives ownership + * of the removed object. + * + * @return The set of media level attributes. + */ + IMPORT_C RPointerArray& AttributeFields(); + + /** + * Gets the set of media level bandwidth fields. + * This array is used directly for element insertion and removal. + * + * The objects referenced from the array are owned by the media + * field instance and must not be deleted. An object can be + * removed from the media description by setting the corresponding + * element to zero. By doing so, the calling party receives ownership + * of the removed object. + * + * @return The set of media level bandwidth fields. + */ + IMPORT_C RPointerArray& BandwidthFields(); + + /** + * Gets the set of media level connection fields. + * This array is used directly for element insertion and removal. + * + * The objects referenced from the array are owned by the media + * field instance and must not be deleted. An object can be + * removed from the media description by setting the corresponding + * element to zero. By doing so, the calling party receives ownership + * of the removed object. + * + * @return The set of media level connection fields. + */ + IMPORT_C RPointerArray& ConnectionFields(); + + /** + * Removes a specific format from the media description. + * The function will remove the named format from the format list if + * found and then delete all format level attributes of type + * CSdpFmtAttributeField related to the removed format. + * + * @param aFormat The name of the format to remove. + */ + IMPORT_C void RemoveFormatL(const TDesC8& aFormat); + + /** + * Removes all formats except one from the media description. + * The function will set the format list to only contain the one + * format to keep and then delete all format level attributes that + * are related to the removed formats. If the format is not found + * from the format list, it is added there. If there are no format + * level attributes for the specified format, the format level + * attribute set will be empty. + * + * @param aFormat The name of the format to keep after + * removing all others. + */ + IMPORT_C void KeepFormatL(const TDesC8& aFormat); + + /** + * Sets this media description into rejected state. + * The rejected state is defined by the offer/answer model in + * RFC3264. The function sets the port number to 0 and removes + * all formats except one. The remaining format is determined + * by the implementation. + */ + IMPORT_C void RejectMedia(); + + public: + /** + * Shows if contact is present + * + * @return ETrue if contact present, otherwise EFalse + */ + TBool IsContactPresent() const; + + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpMediaField* InternalizeL(RReadStream& aStream); + + private: + CSdpMediaField(); + void ConstructL(); + void ConstructL(TBool aRecurse); + void ConstructL(RStringF aMedia, TUint aPort, RStringF aProtocol, + const TDesC8& aFormatList); + + void ConstructL(const CSdpMediaField& aSdpMediaField); + void DoInternalizeL(RReadStream& aStream); + void ParseL (const TDesC8& aText); + void ParseMediaL(); + void ParseInformationL(); + void ParseConnectionL(); + void ParseBandwithL(); + void ParseEncryptionKeyL(); + void ParseAttributeFieldsL(); + TDesC8& GetTokenFromStreamL(RReadStream& aStream); + + + CSdpMediaField(const CSdpMediaField&); // Hidden. + CSdpMediaField& operator = (const CSdpMediaField&); // Hidden + + private: // Data + HBufC8* iInfo; + CSdpKeyField* iSdpKeyField; + RArray iElementArray; + RStringPool iPool; + TBool iRecurse; + RStringF iMedia; + RStringF iProtocol; + TUint iPort; + TUint iPortCount; + HBufC8* iFormatList; + RPointerArray* iBandwidthFields; + RPointerArray* iAttributeFields; + RPointerArray* iConnectionFields; + RPointerArray* iFmtAttrFields; + HBufC8* iToken; + CSdpCodecParseUtil* iSdpCodecParseUtil; + }; + +#endif // CSDPMEDIAFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdporiginfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdporiginfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,460 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpOriginField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPORIGINFIELD_H +#define CSDPORIGINFIELD_H + +// INCLUDES +#include +#include +#include +#include "_sdpdefs.h" + +// CONSTANTS +const TInt KMaxAddressLength = 256; + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; +class CSdpOriginFieldPtrs; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the origin field of + * the Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpOriginField : public CBase + { + public: // Constructors and destructor + + /** + * Constructs a new origin field. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpOriginField* DecodeL( const TDesC8& aText ); + + /** + * Constructs a new origin field and adds the pointer to the cleanup + * stack. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpOriginField* DecodeLC( const TDesC8& aText ); + + /** + * Constructs a new origin field. + * + * @param aUserName A valid user name value. + * @param aSessionId A valid session id value. + * @param aSessionVersion A valid announcement version value. + * @param aAddress A unicast IP address from either + * KAfInet or KAfInet6 family. + * @return a new instance. + */ + IMPORT_C static CSdpOriginField* NewL( const TDesC8& aUserName, + TInt64 aSessionId, + TInt64 aSessionVersion, + TInetAddr& aAddress ); + + /** + * Constructs a new origin field and adds the pointer to the cleanup + * stack. + * + * @param aUserName A valid user name value. + * @param aSessionId A valid session id value. + * @param aSessionVersion A valid announcement version value. + * @param aAddress A unicast IP address from either + * KAfInet or KAfInet6 family. + * @return a new instance. + */ + IMPORT_C static CSdpOriginField* NewLC( const TDesC8& aUserName, + TInt64 aSessionId, + TInt64 aSessionVersion, + TInetAddr& aAddress ); + + /** + * Constructs a new origin field. + * + * @param aUserName A valid user name value. + * @param aSessionId A valid session id value. + * @param aSessionVersion A valid announcement version value. + * @param aNetType A valid network type value (typically "IN"). + * @param aAddressType A valid address type value + * (typically "IP4" or "IP6"). + * @param aAddress A unicast IP Address, Fully + * Qualified Domain Name (FQDN), or an other type of + * address allowed for the address type. + * @return a new instance. + */ + IMPORT_C static CSdpOriginField* NewL( const TDesC8& aUserName, + TInt64 aSessionId, + TInt64 aSessionVersion, + RStringF aNetType, + RStringF aAddressType, + const TDesC8& aAddress ); + + /** + * Constructs a new origin field and adds the pointer to the cleanup + * stack. + * + * @param aUserName A valid user name value. + * @param aSessionId A valid session id value. + * @param aSessionVersion A valid announcement version value. + * @param aNetType A valid network type value (typically "IN"). + * @param aAddressType A valid address type value + * (typically "IP4" or "IP6"). + * @param aAddress A unicast IP Address, Fully Qualified Domain + * Name (FQDN), or an other type of address allowed + * for the address type. + * @return a new instance. + */ + IMPORT_C static CSdpOriginField* NewLC( const TDesC8& aUserName, + TInt64 aSessionId, + TInt64 aSessionVersion, + RStringF aNetType, + RStringF aAddressType, + const TDesC8& aAddress ); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpOriginField(); + + public: // New functions + + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream Stream used for output. On return + * the stream includes correctly formatted origin field. + */ + IMPORT_C void EncodeL( RWriteStream& aStream ) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpOriginField* CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == ( const CSdpOriginField& aObj ) const; + + /** + * Gets the user name. + * + * @return User name. + */ + IMPORT_C const TDesC8& UserName() const; + + /** + * Sets the user name. + * + * @param aValue A valid user name value. + * @leave KErrSdpCodecOriginField if aValue is not a valid user name. + */ + IMPORT_C void SetUserNameL( const TDesC8& aValue ); + + /** + * Gets the session id of the origin field. + * + * @return Session id. + */ + IMPORT_C TInt64 SessionId() const; + + /** + * Sets the session id. + * + * @param aValue A valid session id value. + */ + IMPORT_C void SetSessionId( TInt64 aValue ); + + /** + * Gets the announcement version. + * + * @return Version. + */ + IMPORT_C TInt64 Version() const; + + /** + * Sets the announcement version.. + * + * @param aValue A valid version value. + */ + IMPORT_C void SetVersion( TInt64 aValue ); + + /** + * Gets the network type. + * + * @return The network type from pre-defined SDP string + * table or given by the user. + */ + IMPORT_C RStringF NetType() const; + + /** + * Gets the address type. + * + * @return The address type from pre-defined SDP string + * table or given by the user. + */ + IMPORT_C RStringF AddressType() const; + + /** + * Gets the address. + * + * @return Address as an IP address or null if it is + * not an IP address. This may be e.g. when the address has + * been specified as a FQDN. In this case, the address can be + * accessed using the other getters. + */ + IMPORT_C const TInetAddr* InetAddress() const; + + /** + * Gets the address. + * + * @return Address as a string. + */ + IMPORT_C const TDesC8& Address() const; + + /** + * Sets the address, network and address type. + * Also sets the network type to "IN" and address type to "IP4" or + * "IP6" depending on the address family of aValue. + * + * @param aValue A unicast IP address from either KAfInet + * or KAfInet6 family. + */ + IMPORT_C void SetInetAddress( const TInetAddr& aValue ); + + /** + * Sets the address, network and address type. + * + * @param aAddress A unicast IP Address, Fully Qualified Domain + * Name (FQDN), or an other type of address allowed for the + * address type. + * @param aNetType A valid network type value (typically "IN"). + * @param aAddressType A valid address type value + * (typically "IP4" or "IP6"). + * @leave KErrSdpCodecOriginField if aNetType or aAddressType are not + * valid tokens, or aAddress is invalid, or aAddress type + * is not aligned with the address format + */ + IMPORT_C void SetAddressL( const TDesC8& aAddress, + RStringF aNetType, + RStringF aAddressType ); + + public: // Internal to codec + + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL( RWriteStream& aStream ) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpOriginField* InternalizeL( RReadStream& aStream ); + + private: // Constructors + + /** + * Constructor + */ + CSdpOriginField(); + + /** + * Second phase constructor. Parses the text string and initializes + * the member variables + * + * @param aText Line of text that will be parsed (ends on the newline) + */ + void ConstructL( const TDesC8& aText ); + + /** + * Second phase constructor. Constructs the object. + * + * @param aUserName A valid user name value. + * @param aSessionId A valid session id value. + * @param aSessionVersion A valid announcement version value. + * @param aAddress A unicast IP address from either + * KAfInet or KAfInet6 family. + */ + void ConstructL( const TDesC8& aUserName, + TInt64 aSessionId, + TInt64 aSessionVersion, + TInetAddr& aUnicastAddress ); + + /** + * Second phase constructor. Constructs the object. + * + * @param aUserName A valid user name value. + * @param aSessionId A valid session id value. + * @param aSessionVersion A valid announcement version value. + * @param aNetType A valid network type value (typically "IN"). + * @param aAddressType A valid address type value + * (typically "IP4" or "IP6"). + * @param aAddress A unicast IP Address, Fully Qualified Domain + * Name (FQDN), or an other type of address allowed + * for the address type. + */ + void ConstructL( const TDesC8& aUserName, + TInt64 aSessionId, + TInt64 aSessionVersion, + RStringF aNetType, + RStringF aAddressType, + const TDesC8& aAddress ); + + // These are unnecessary? Derived from CBase, prevents the use + CSdpOriginField( const CSdpOriginField& ); // Hidden. + CSdpOriginField& operator = ( const CSdpOriginField& ); // Hidden + + private: // New methods + + /** + * Checks if the given address is valid + * + * @param aAddress Address to be checked + * @return Valid address or not + */ + TBool IsValidAddress( const TDesC8& aAddress ) const; + + /** + * Checks if the given address is valid + * + * @param aAddr Address to be checked + * @return Valid address or not + */ + TBool IsValidAddress( const TInetAddr& addr ) const; + + /** + * Checks that address type matches with address format + * + * @param aAddress Address + * @param aType Address type + * @param aPool String pool + * @return Type Matches with format or not + */ + TBool TypeMatchesWithFormat( + const TDesC8& aAddress, const TDesC8& aType, + RStringPool aPool ) const; + + /** + * Checks if the given username is valid + * + * @param aUserName Username + * @return Validity of the given username + */ + TBool IsValidUserName( const TDesC8& aUserName ) const; + + /** + * Parses username, initializes iUserName + * + * @param aArray Array containing all the elements + */ + void ParseUserNameL( RArray& aArray ); + + /** + * Parses session ID and version, initializes iSessionId + * and iSessionVersion + * + * @param aArray Array containing all the elements + */ + void ParseSessionIDAndVersionL( RArray& aArray ); + + /** + * Parses network type and address type, initializes + * iNetType and iAddressType + * + * @param aArray Array containing all the elements + */ + void ParseNetTypeAndAddressTypeL( RArray& aArray ); + + /** + * Parses address, checks address against address type, + * initializes iAddress + * + * @param aArray Array containing all the elements + */ + void ParseAddressL( RArray& aArray ); + + inline CSdpOriginFieldPtrs& OriginFieldPtrs(); + + inline const CSdpOriginFieldPtrs& OriginFieldPtrs() const; + + TInt64 Get63Msbs( const TDesC8& aDecimalValue ) const; + void SetIPAddressType( const TInetAddr& aAddr ); + + private: // Data + + RStringPool iPool; + + // + HBufC8* iUserName; + // + TInt64 iSessionId; + // + TInt64 iSessionVersion; + // + RStringF iNetType; + //
+ RStringF iAddressType; + //
+ // Either one is used (this or iAddressType/iAddress combo) + // Can be defined as mutable because this variable does not affect + // to the state of the object, but it is needed as const pointer + // is returned on InetAddr() method + mutable TInetAddr iUnicastAddress; + TBuf8 iAddress; + // For configuring the address into TInetAddr + TBuf iAddress16; + + __DECLARE_TEST; + }; + +#endif // CSDPORIGINFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdprepeatfield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdprepeatfield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,211 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpRepeatField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPREPEATFIELD_H +#define CSDPREPEATFIELD_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" +#include + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the repeat times field of the + * Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpRepeatField : public CBase + { + public: // Constructors and destructor + /** + * Constructs a new repeat times field. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpRepeatField* DecodeL(const TDesC8& aText); + + /** + * Constructs a new repeat times field and adds the pointer to the + * cleanup stack. + * + * @param aText A string containing a correctly + * formatted field value terminated by a CRLF. + * @return a new instance. + */ + IMPORT_C static CSdpRepeatField* DecodeLC(const TDesC8& aText); + + /** + * Constructs a new repeat times field. + * + * @param aRepeatInterval Repeat interval value + * greater than zero. + * @param aActiveDuration Active duration. + * @param aOffsets At least one time offset. + * @return a new instance. + */ + IMPORT_C static CSdpRepeatField* NewL( + const TSdpTypedTime aRepeatInterval, + const TSdpTypedTime aActiveDuration, + const RArray& aOffsets); + + /** + * Constructs a new repeat times field and adds the pointer to the + * cleanup stack. + * + * @param aRepeatInterval Repeat interval value + * greater than zero. + * @param aActiveDuration Active duration. + * @param aOffsets At least one time offset. + * @return a new instance. + */ + IMPORT_C static CSdpRepeatField* NewLC( + const TSdpTypedTime aRepeatInterval, + const TSdpTypedTime aActiveDuration, + const RArray& aOffsets); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpRepeatField(); + + public: // New functions + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream Stream used for output. On return + * the stream includes correctly formatted repeat field. + */ + IMPORT_C void EncodeL(RWriteStream& aStream) const; + + /** + * Creates a new instance that is equal to the target. + * + * @return a new instance. + */ + IMPORT_C CSdpRepeatField * CloneL() const; + + /** + * Compares this instance to another for equality. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == (const CSdpRepeatField & aObj) const; + + /** + * Gets the repeat interval. + * + * @return The repeat interval. + */ + IMPORT_C const TSdpTypedTime RepeatInterval() const; + + /** + * Sets the repeat interval. + * + * @param aValue Repeat interval value greater than zero. + * @leave KErrSdpCodecRepeatField if aValue is not positive integer + * value. + */ + IMPORT_C void SetRepeatIntervalL(const TSdpTypedTime aValue); + + /** + * Gets the active duration.. + * + * @return The active duration. + */ + IMPORT_C const TSdpTypedTime ActiveDuration() const; + + /** + * Sets the active duration. + * + * @param Active duration. + */ + IMPORT_C void SetActiveDuration(const TSdpTypedTime aValue); + + /** + * Gets the array of time offsets. + * This array is used directly for element insertion and removal. + * + * @return The offsets. + */ + IMPORT_C const RArray& TimeOffsets() const; + + /** + * Sets the time offsets. + * + * @param aOffsets At least one time offset. + */ + IMPORT_C void SetTimeOffsetsL(const RArray& aValue); + + public: + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpRepeatField* InternalizeL(RReadStream& aStream); + + private: + CSdpRepeatField(const TSdpTypedTime aRepeatInterval, + const TSdpTypedTime aActiveDuration); + CSdpRepeatField(); + void ConstructL(const TDesC8& aText); + void ConstructL(const RArray& aOffsets); + + + private: // Data + RStringPool iPool; + TSdpTypedTime iRepeatInterval; + TSdpTypedTime iActiveDuration; + RArray iTimeOffsets; + + __DECLARE_TEST; + }; + +#endif // CSDPREPEATFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdprtpmapvalue.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdprtpmapvalue.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,117 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpRtpmapValue.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef TSDPRTPMAPVALUE_H +#define TSDPRTPMAPVALUE_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RWriteStream; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * Utility class for manipulating the value of an rtpmap-attribute. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class TSdpRtpmapValue + { + public: // Constructors and destructor + + /** + * Initializes the instance to refer to the given rtpmap components. + * The parameters must stay in scope as long as this instance exists. + * Otherwise, the member variables of this class will point to + * a released memory. + * + * @param aEncodingName Valid rtpmap encoding name value. + * @param aClockrate Valid rtpmap clockrate value. + * @param aEncodingParameters Valid rtpmap encoding + * parameter list. + */ + IMPORT_C TSdpRtpmapValue( + const TPtrC8& aEncodingName, + const TPtrC8& aClockrate, + const TPtrC8& aEncodingParameters ); + + public: // New functions + + /** + * Tries to parse a string as an rtpmap attribute value up to the end + * of the string or CRLF, whichever comes first, and set pointers to + * the components found. The parameter must stay in scope as long as + * this instance exists. Otherwise, the member variables of this class + * will point to a released memory. + * + * @param aText String containing the value of an rtpmap attribute. + * @return a new instance + * @leave KErrArgument if parsing fails. + */ + IMPORT_C static TSdpRtpmapValue DecodeL( const TDesC8& aText ); + + /** + * Outputs the attribute value formatted according to SDP syntax. + * The field terminating CRLF is not included in the output. + * When constructing CSdpFmtAttributeField, return value of this + * function can be used as aValue in CSdpFmtAttributeField::NewL + * (RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue) + * function. + * + * @return Encoded value. Ovnership of buffer is changed to caller. + */ + IMPORT_C HBufC8* EncodeL() const; + + public: // Data + + /** + * Encoding name part of an rtpmap value + * @internalComponent + */ + TPtrC8 iEncName; + + /** + * Clockrate part of an rtpmap value. + * @internalComponent + */ + TPtrC8 iClockrate; + + /** + * Encoding parameters part of an rtpmap value. + * @internalComponent + */ + TPtrC8 iEncParams; + }; + +#endif // TSDPRTPMAPVALUE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdptimefield.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdptimefield.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,230 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpTimeField.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef CSDPTIMESFIELD_H +#define CSDPTIMESFIELD_H + +// INCLUDES +#include +#include +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; +class CSdpRepeatField; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class encapsulates the time field and the related zero or + * more repeat times fields and an optional time zone adjustment + * field of the Session Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class CSdpTimeField : public CBase + { + public: // Constructors and destructor + /** + * Constructs a time field. + * + * @param aText A correctly formatted time field value + * terminated by a CRLF followed by zero or more repeat + * times and zero or one time zone adjustment fields + * separeted by a CRLF. + * @param aRecurse Flag to specify whether to decode subfields + * also (ETrue) or only the time field (EFalse). + * @return a new instance. + */ + IMPORT_C static CSdpTimeField * DecodeL(const TDesC8& aText, + TBool aRecurse = ETrue); + + /** + * Constructs a time field and adds the pointer to the cleanup stack. + * + * @param aText A correctly formatted time field value + * terminated by a CRLF followed by zero or more repeat + * times and zero or one time zone adjustment fields + * separeted by a CRLF. + * @param aRecurse Flag to specify whether to decode subfields + * also (ETrue) or only the time field (EFalse). + * @return a new instance. + */ + IMPORT_C static CSdpTimeField * DecodeLC(const TDesC8& aText, + TBool aRecurse = ETrue); + + /** + * Constructs a time field. + * + * @param aStartTime Session start time. + * @param aStopTime Session end time that must be + * greater than or equal to the start time. + * @return a new instance. + */ + IMPORT_C static CSdpTimeField * NewL(const TDesC8& aStartTime, + const TDesC8& aStopTime); + + /** + * Constructs a time field and adds the pointer to the cleanup stack. + * + * @param aStartTime Session start time. + * @param aStopTime Session end time that must be + * greater than or equal to the start time. + * @return a new instance. + */ + IMPORT_C static CSdpTimeField * NewLC(const TDesC8& aStartTime, + const TDesC8& aStopTime); + + /** + * Deletes the resources held by the instance. + */ + IMPORT_C ~CSdpTimeField(); + + public: // New functions + /** + * Outputs the field formatted according to SDP syntax and including + * the terminating CRLF. Optionally output also the related repeat + * times. + * + * @param aStream Stream used for output. On return + * the stream includes correctly formatted time field with + * repeat fields if aRecurse is ETrue. + * @param aRecurse Flag to specify whether to output subfields + * also (ETrue) or only the time field (EFalse). + */ + IMPORT_C void EncodeL(RWriteStream& aStream, TBool aRecurse = ETrue) const; + + /** + * Creates a new instance that is equal to the target. + * Optionally also related repeat times are cloned. + * + * @param aRecurse Flag to specify whether to clone subfields + * also (ETrue) or only the time field (EFalse). + * @return a new instance. + */ + IMPORT_C CSdpTimeField * CloneL(TBool aRecurse = ETrue) const; + + /** + * Compares this instance to another for equality. Subfields are + * included in comparison if present. + * + * @param aObj The instance to compare to. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == (const CSdpTimeField & aObj) const; + + /** + * Checks the consistency of the time description and it's subfields. + *. + * @return ETrue if time description is valid and EFalse if not. + */ + IMPORT_C TBool IsValid() const; + + /** + * Gets the session start time. + * + * @return The session start time. + */ + IMPORT_C const TDesC8& StartTime() const; + + /** + * Gets the session stop time. + * + * @return The session stop time. + */ + IMPORT_C const TDesC8& StopTime() const; + + /** + * Sets the session start and stop times. + * + * @param aStartTime Session start time.. + * @param aStopTime Session end time that must be + * greater than or equal to the start time. + * @leave KErrSdpCodecTimeField if start time and stop time are not + * correct as defined draft-ietf-mmusic-sdp-new-14. + */ + IMPORT_C void SetTimesL(const TDesC8& aStartTime, const TDesC8& aStopTime); + + /** + * Gets the set of repeat times fields related to this time field. + * This array is used directly for element insertion and removal. + * + * The objects referenced from the array are owned by the media field + * instance and must not be deleted. An object can be removed from the + * media description by setting the corresponding element to zero. By + * doing so, the calling party receives ownership of the removed object. + * + * @return The set of repeat fields. + */ + IMPORT_C RPointerArray& RepeatFields(); + + public: + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static CSdpTimeField* InternalizeL(RReadStream& aStream); + + /** + * Creates object from the stream data. + * Does the "2nd phase construction" of internalization. + * + * @param aStream Stream where the object's state will be read + */ + void DoInternalizeL(RReadStream& aStream); + + private: + CSdpTimeField(); + + void ConstructL(const TDesC8& aText, TBool aRecurse=ETrue); + void ConstructL(const TDesC8& aStartTime, const TDesC8& aStopTime); + + TBool RepeatFieldsCompare(const CSdpTimeField& aObj) const; + + private: // Data + HBufC8* iStartTime; + HBufC8* iStopTime; + RPointerArray iRFields; + RStringPool iStringPool; + + __DECLARE_TEST; + }; + +#endif // CSDPTIMESFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sdptypedtime.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sdptypedtime.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,143 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SdpTypedTime.h +* Part of : SDP Codec +* Interface : SDK API, SDP Codec API +* Version : 1.0 +* +*/ + + + +#ifndef TSDPTYPEDTIME_H +#define TSDPTYPEDTIME_H + +// INCLUDES +#include +#include "_sdpdefs.h" + +// FORWARD DECLARATIONS +class RReadStream; +class RWriteStream; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class implements the typed time element of the Session + * Description Protocol. + * + * The normative reference for correct formatting and values is + * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in + * member documentation. The implementation supports this normative + * reference, but does not enforce it fully. + * + * @lib sdpcodec.lib + */ +class TSdpTypedTime + { + public: // enums + + /** Time units. */ + enum TUnit + { + ETimeUnitDays, /** d */ + ETimeUnitHours, /** h */ + ETimeUnitMinutes, /** m */ + ETimeUnitSeconds, /** s */ + ETimeUnitNone, + }; + + public: // Constructors and destructor + /** + * Constructs a typed time equal to zero and with no time unit set. + */ + IMPORT_C TSdpTypedTime(); + + /** + * Constructs a typed time equal to specified value and time unit. + * + * @param aValue Time value. + * @param aUnit Time unit. + */ + IMPORT_C TSdpTypedTime(TInt64 aValue, TUnit aUnit); + + public: // New functions + /** + * Compares this instance to another for equality. + * + * @param aObj Another instance to compare with. + * @return ETrue if equal, EFalse if not. + */ + IMPORT_C TBool operator == (const TSdpTypedTime& aObj) const; + + /** + * Sets the typed time value. + * + * @param aValue Time value. + * @param aUnit Time unit. + */ + IMPORT_C void SetValue(TInt64 aValue, TUnit aUnit); + + public: + + /** + * Externalizes the object to stream + * + * @param aStream Stream where the object's state will be stored + */ + void ExternalizeL(RWriteStream& aStream) const; + + /** + * Creates object from the stream data + * + * @param aStream Stream where the object's state will be read + * @return Initialized object + */ + static TSdpTypedTime InternalizeL(RReadStream& aStream); + + /** + * Output the field formatted according to SDP syntax and including + * the terminating CRLF. + * + * @param aStream Stream used for output. + */ + void EncodeL(RWriteStream& aStream) const; + + /** + * Construct a new origin field. + * + * @param aText A string containing a correctly formatted field value + * terminated by a CRLF. + * @return The new instance. + */ + static TSdpTypedTime DecodeL(const TDesC8& aText); + + public: // Data + + /** + * @internalComponent + */ + TInt64 iValue; + + /** + * @internalComponent + */ + TInt iUnit; + + }; + +#endif // TSDPTYPEDTIME_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sendas2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sendas2.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ +#ifndef __SENDAS2_H__ +#define __SENDAS2_H__ + +#include +#include +#include + +#endif //__SENDAS2_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sendasserver.rh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sendasserver.rh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @publishedAll + @released +*/ + + +#ifndef __SENDASSERVER_RH__ +#define __SENDASSERVER_RH__ + +STRUCT SENDAS_RES + { + LONG version; + LONG editUtilsUid; + LONG notifierUid; + } + +#endif // __SENDASSERVER_RH__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sip.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sip.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,162 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sip.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 2.0 +* +*/ + + + +#ifndef CSIP_H +#define CSIP_H + +// INCLUDES +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CDesC8Array; +class MSIPObserver; +class CSIPConnection; +class CSIPImplementation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for connecting to SIP server. +* +* This class provides the connection to the SIP server and +* provides functions for quering supported SIP security mechanisms and +* the support of signalling compression (SigComp). +* +* Note that the implementation uses strings defined in the SIP Codec +* string pool. During instantiation the class will open SIP codec string pool +* for getting static strings and getting and setting dynamic strings. +* +* The user can create only one instance of this class. (a singleton class). +* +* @lib sipclient.lib +*/ +class CSIP : public CBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aUid an unique id that identifies client + * @param aObserver a observer for asynchronous event + * @return New object, ownership is transferred + * @capability WriteDeviceData + */ + IMPORT_C static CSIP* NewL(const TUid& aUid, + MSIPObserver& aObserver); + + /** + * Two-phased constructor. + * Constructs an object and adds the pointer to the cleanup stack. + * @param aUid an unique id that identifies client + * @param aObserver a observer for asynchronous event + * @return New object, ownership is transferred + * @capability WriteDeviceData + */ + IMPORT_C static CSIP* NewLC(const TUid& aUid, + MSIPObserver& aObserver); + + /** + * Destructor. + */ + IMPORT_C ~CSIP(); + + public: // New functions + + /** + * Gets all supported security mechanisms + * @return supported SIP security mechanisms names (e.g. digest); + * the ownership is transferred + */ + IMPORT_C CDesC8Array* SupportedSecurityMechanismsL() const; + + /** + * Checks if the signalling compression (SigComp) is supported. + * Leaves on failure with a system wide error code. + * @return ETrue if supported, EFalse otherwise + */ + IMPORT_C TBool IsSigCompSupportedL() const; + + /** + * Gets negotiated security mechanism with the next hop + * on the signaling path. + * @param aHop the next hop's FQDN or numeric IP address + * @return negotiated security mechanism or zero-pointer in case no + * security mechanism was negotiated with the next hop; + * the ownership is transferred + */ + IMPORT_C HBufC8* NegotiatedSecurityMechanismL(const TDesC8& aHop); + + /** + * Checks if the user has a connection created for given IAP-id + * @param aIapId IAP-id + * @return sip connection or 0-pointer if connection does not exist. + * Ownership is not transferred. + */ + IMPORT_C CSIPConnection* Connection(TUint32 aIapId) const; + + /* + * By default the SIP built-in security mechanisms are enabled. + * @param aEnabled if set to EFalse the build-in SIP security handling + * mechanism is disabled. + */ + IMPORT_C void SetSecurityHandlingL(TBool aEnabled); + + /* + * Tests if SIP security handling mechanism is enabled/disabled + * @return ETrue if built-in mechanisms are enabled, EFalse otherwise. + */ + IMPORT_C TBool IsSecurityHandlingEnabled() const; + + public: // New functions, for internal use + + /** + * Returns the CSIPImplementation. + * + * @return CSIPImplementation + */ + CSIPImplementation& Implementation(); + + private: // Constructors + CSIP(); + + void ConstructL(const TUid& aUid, MSIPObserver& aObserver); + + private: // Data + CSIPImplementation* iImplementation; + + private: // For testing purposes + + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPRegistrationBinding_Test) + UNIT_TEST(CSIPInviteDialogAssoc_Test) + UNIT_TEST(CSIPSubscribeDialogAssoc_Test) + UNIT_TEST(CSIPReferDialogAssoc_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sip_subconevents.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sip_subconevents.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,141 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIPSCPR_subconevents.h +// SIP extension events definition +// +// + + + +/** + @file + @publishedAll + @released since v9.2 +*/ + +#ifndef SIPSCPR_SUBCONEVENTS_H +#define SIPSCPR_SUBCONEVENTS_H + +#include +#include + +/** The numeric value of ECOM plugin identifier for this SubConnection SIP event parameter.See the assisting *.rss file. */ +const TInt KSubConSIPEventsUid = 0x10274CAE; + +/** The numeric value of Response event type identifier for SIP extension parameter set */ +const TInt KSubConSIPResponseEventType = 1; + +/** The numeric value of AuthenticationRequired event type identifier for SIP extension parameter set */ +const TInt KSubConSIPAuthenticationRequiredEventType = 2; + +/** The numeric value of Notification event type identifier for SIP extension parameter set */ +const TInt KSubConSIPNotificationEventType = 3; + + +class CSubConSIPResponseEvent : public CSubConNotificationEvent +/** CSubConSIPResponseEvent is used to get and set the response elements of the most recent response + +@publishedAll +@released since v9.2 */ + { +public: + /** + Identifies the predefined type of Response . + */ + enum PredefinedResponses + { + /** The numeric value of Invalid Response */ + EInvalidResponse = 0 + }; + + inline static CSubConSIPResponseEvent* NewL(); + /** Constructor. */ + inline CSubConSIPResponseEvent(); + /** Destructor. */ + virtual ~CSubConSIPResponseEvent(); + /** Sets Response Code of the SIP Response. **/ + inline void SetResponse(TInt aResponse); + /** Gets Response Code of the SIP Response. **/ + inline TInt GetResponse() const; + +protected: + /** The Response Code of the SIP reasponse. */ + TInt iResponse; + DATA_VTABLE + }; + + +class CSubConSIPAuthenticationRequiredEvent : public CSubConNotificationEvent +/** CSubConSIPAuthenticationRequiredEvent is used when SIP authentication is required + +@publishedAll +@released since v9.2 */ + { +public: + + inline static CSubConSIPAuthenticationRequiredEvent* NewL(); + /** Constructor. */ + inline CSubConSIPAuthenticationRequiredEvent(); + /** Destructor. */ + virtual ~CSubConSIPAuthenticationRequiredEvent(); + /** Sets Realm field of the SIP header. **/ + inline void SetRealmL(const TPtrC8& aRealm); + /** Gets Realm field of the SIP header. **/ + inline const TPtrC8& GetRealm() const; + +protected: + /** The Realm entry of Authenticate field in a SIP header. */ + RBuf8 iRealm; + DATA_VTABLE + }; + + +class CSubConSIPNotificationEvent : public CSubConNotificationEvent +/** CSubConSIPNotificationEvent is used for receiving SIP event notifications + +@publishedAll +@released since v9.2 */ + { +public: + inline static CSubConSIPNotificationEvent* NewL(); + /** Constructor. */ + inline CSubConSIPNotificationEvent(); + /** Destructor. */ + virtual ~CSubConSIPNotificationEvent(); + /** Sets Notification for an event. **/ + inline void SetNotificationL(const TPtrC8 & aNotification); + /** Gets Notification for an event. **/ + inline const TPtrC8& GetNotification() const; + +protected: + /** The Notification entry. */ + RBuf8 iNotification; + DATA_VTABLE + }; + + +class CSIPSubConnExtensionEventsFactory : public CBase +/** Factory used to create instances of the SIP SubConnection Extension Events + +@publishedAll +@released since v9.2 +*/ + { +public: + static CSubConNotificationEvent* NewL(TAny* aConstructionParameters); + }; + +#include + +#endif // SIPSCPR_SUBCONEVENTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sip_subconevents.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sip_subconevents.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,91 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIPSCPR_subconevents.inl +// SIP extension events definition +// +// + + + +/** + @file + @publishedAll +*/ + + +inline CSubConSIPResponseEvent::CSubConSIPResponseEvent() +:iResponse(EInvalidResponse) + { + } + + +inline void CSubConSIPResponseEvent::SetResponse(TInt aResponse) + { + iResponse = aResponse; + } + +inline TInt CSubConSIPResponseEvent::GetResponse() const + { + return iResponse; + } + +inline CSubConSIPResponseEvent* CSubConSIPResponseEvent::NewL() + { + STypeId typeId(KSubConSIPEventsUid, KSubConSIPResponseEventType); + return static_cast(CSubConNotificationEvent::NewL(typeId)); + } + + +inline CSubConSIPAuthenticationRequiredEvent* CSubConSIPAuthenticationRequiredEvent::NewL() + { + STypeId typeId(KSubConSIPEventsUid, KSubConSIPAuthenticationRequiredEventType); + return static_cast(CSubConNotificationEvent::NewL(typeId)); + } + +inline CSubConSIPAuthenticationRequiredEvent::CSubConSIPAuthenticationRequiredEvent() + { + } + +inline void CSubConSIPAuthenticationRequiredEvent::SetRealmL(const TPtrC8& aRealm) + { + iRealm.Close(); + iRealm.CreateL(aRealm); + } + +inline const TPtrC8& CSubConSIPAuthenticationRequiredEvent::GetRealm() const + { + return iRealm.LeftTPtr(iRealm.Length()); + } + + +inline CSubConSIPNotificationEvent::CSubConSIPNotificationEvent() + { + } + +inline void CSubConSIPNotificationEvent::SetNotificationL(const TPtrC8 & aNotification) + { + iNotification.Close(); + iNotification.CreateL(aNotification); + } + +inline const TPtrC8& CSubConSIPNotificationEvent::GetNotification() const + { + return iNotification.LeftTPtr(iNotification.Length()); + } + +inline CSubConSIPNotificationEvent* CSubConSIPNotificationEvent::NewL() + { + STypeId typeId(KSubConSIPEventsUid, KSubConSIPNotificationEventType); + return static_cast(CSubConNotificationEvent::NewL(typeId)); + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sip_subconparams.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sip_subconparams.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,278 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIPSCPR_subconparams.h +// SIP extension parameters definition +// +// + + + +/** + @file + @publishedAll + @released since v9.2 +*/ + +#ifndef SIP_SUBCONPARAMS_H +#define SIP_SUBCONPARAMS_H + +#include +#include + +/** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */ +const TInt KSubConSIPParametersUid = 0x10274C18; + +/** The numeric value of Invite identifier for SIP extension parameter set */ +const TInt KSubConSIPInviteParamsType = 1; + +/** The numeric value of Subscribe identifier for SIP extension parameter set */ +const TInt KSubConSIPSubscribeParamsType = 2; + +/** The numeric value of Authentication of SIP extension parameter set */ +const TInt KSubConSIPAuthenticateParamsType = 3; + +class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet +/** +This contains the SIP Invite parameters that will be passed via subconnection +to the SIP stack +@publishedAll +@released since v9.2 +*/ +{ +public: + /** + Creates a new SubConSIPInvite parameter set object. + @param aFamily ,contains family related info + @param aType contains parameter Type such as (Requested, Acceptable and Granted) + @return A pointer to the newly allocated object. + @leave KErrArgument if the data is not of type TParameterSetType. + */ + inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); + inline static CSubConSIPInviteParamSet* NewL(); + + /** Constructor. */ + inline CSubConSIPInviteParamSet(); + /** Destructor. */ + virtual ~CSubConSIPInviteParamSet(); + + /** Getters for SIP header. */ + /** Gets Request URI field of the SIP header. **/ + inline const TPtrC8 GetRequestUri() const; + /** Gets From field of the SIP header. **/ + inline const TPtrC8 GetFrom() const; + /** Gets To field of the SIP header. **/ + inline const TPtrC8 GetTo() const; + /** Gets Contact field of the SIP header. **/ + inline const TPtrC8 GetContact() const; + /** Gets ContentType field of the SIP header. **/ + inline const TPtrC8 GetContentType() const; + /** Gets ContentSubType field of the SIP header. **/ + inline const TPtrC8 GetContentSubType() const; + /** Gets Content field of the SIP header. **/ + inline const TPtrC8 GetContent() const; + + /** Setters for SIP header. + /** Sets Request URI field of the SIP header. **/ + inline void SetRequestUriL(const TPtrC8 & aReqUri); + /** Sets From field of the SIP header. **/ + inline void SetFromL(const TPtrC8 & aFrom); + /** Sets To field of the SIP header. **/ + inline void SetToL(const TPtrC8 & aTo); + /** Sets Contact field of the SIP header. **/ + inline void SetContactL(const TPtrC8 & aContact); + /** Sets Content Type field of the SIP header. **/ + inline void SetContentTypeL(const TPtrC8 & aContentType); + /** Sets Content Sub Type field of the SIP header. **/ + inline void SetContentSubTypeL(const TPtrC8 & aContentSubType); + /** Sets Content field of the SIP header. **/ + inline void SetContentL(const TPtrC8 & aContent); + + DATA_VTABLE +protected: + + /** The Request URI field of the SIP header. */ + RBuf8 iReqUri; + /** The From field of the SIP header. */ + RBuf8 iFrom; + /** The To field of the SIP header. */ + RBuf8 iTo; + /** The Contact field of the SIP header. */ + RBuf8 iContact; + /** The Content Type field of the SIP header. */ + RBuf8 iContentType; + /** The Content Sub Type field of the SIP header. */ + RBuf8 iContentSubType; + /** The Content field of the SIP header. */ + RBuf8 iContent; + }; + + + +class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet +/** +This contains the SIP Subscribe parameters that will be passed via subconnection +to the SIP stack +@publishedAll +@released since v9.2 +*/ +{ +public: + /** + Creates a new SubConSIPSubscribe parameter set object. + @param aFamily ,contains family related info + @param aType contains parameter Type such as (Requested, Acceptable and Granted) + @return A pointer to the newly allocated object. + @leave KErrArgument if the data is not of type TParameterSetType. + */ + inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); + inline static CSubConSIPSubscribeParamSet* NewL(); + + /** Constructor. */ + inline CSubConSIPSubscribeParamSet(); + + /** Destructor. */ + virtual ~CSubConSIPSubscribeParamSet(); + + /** Getters for SIP header. */ + /** Gets Request URI field of the SIP header. **/ + inline const TPtrC8 GetRequestUri() const; + /** Gets From field of the SIP header. **/ + inline const TPtrC8 GetFrom() const; + /** Gets To field of the SIP header. **/ + inline const TPtrC8 GetTo() const; + /** Gets Contact field of the SIP header. **/ + inline const TPtrC8 GetContact() const; + /** Gets Event Type field of the SIP header. **/ + inline const TPtrC8 GetEventType() const; + /** Gets Accept Type field of the SIP header. **/ + inline const TPtrC8 GetAcceptType() const; + /** Gets Accept Sub Type field of the SIP header. **/ + inline const TPtrC8 GetAcceptSubType() const; + /** Gets Expires field of the SIP header. **/ + inline const TInt GetExpires() const; + /** Gets Auto Refresh field of the SIP header. **/ + inline const TBool GetAutoRefresh() const; + + /** Setters for SIP header. */ + /** Sets Request URI field of the SIP header. **/ + inline void SetRequestUriL(const TPtrC8 & aReqUri); + /** Sets From field of the SIP header. **/ + inline void SetFromL(const TPtrC8 & aFrom); + /** Sets To field of the SIP header. **/ + inline void SetToL(const TPtrC8 & aTo); + /** Sets Contact field of the SIP header. **/ + inline void SetContactL(const TPtrC8 & aContact); + /** Sets Event Type field of the SIP header. **/ + inline void SetEventTypeL(const TPtrC8 & aEventType); + /** Sets Accept Type field of the SIP header. **/ + inline void SetAcceptTypeL(const TPtrC8 & aAcceptType); + /** Sets Accept Sub Type field of the SIP header. **/ + inline void SetAcceptSubTypeL(const TPtrC8 & aAcceptSubType); + /** Sets Expires Sub Type field of the SIP header. **/ + inline void SetExpires(TInt aExpires); + /** Sets AutoRfresh field of the SIP header. **/ + inline void SetAutoRefresh(TBool aAutoRefresh); + + + DATA_VTABLE +protected: + + /** The Request URI field of the SIP header. */ + RBuf8 iReqUri; + /** The From field of the SIP header. */ + RBuf8 iFrom; + /** The To field of the SIP header. */ + RBuf8 iTo; + /** The Contact field of the SIP header. */ + RBuf8 iContact; + /** The Event Type field of the SIP header. */ + RBuf8 iEventType; + /** The Accept Type field of the SIP header. */ + RBuf8 iAcceptType; + /** The Accept Sub Type field of the SIP header. */ + RBuf8 iAcceptSubType; + /** The Expires field of the SIP header. */ + TInt iExpires; + /** The AutoRefresh field of the SIP header. */ + TBool iAutoRefresh; +}; + +class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet +/** +This contains the SIP Authenticate parameters that will be passed via subconnection +to the SIP stack +@publishedAll +@released since v9.2 +*/ +{ +public: + /** + Creates a new SubConSIPAuthenticate parameter set object. + @param aFamily ,contains family related info + @param aType contains parameter Type such as (Requested, Acceptable and Granted) + @return A pointer to the newly allocated object. + @leave KErrArgument if the data is not of type TParameterSetType. + */ + inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); + inline static CSubConSIPAuthenticateParamSet* NewL(); + + /** Constructor. */ + inline CSubConSIPAuthenticateParamSet(); + + /** Destructor. */ + virtual ~CSubConSIPAuthenticateParamSet(); + + /** Getters for SIP header. */ + /** Gets Username field of the SIP header. **/ + inline const TPtrC8 GetUserName() const; + /** Gets Password field of the SIP header. **/ + inline const TPtrC8 GetPassword() const; + /** Gets Realm field of the SIP header. **/ + inline const TPtrC8 GetRealm() const; + + /** Setters for SIP header. */ + /** Sets Username field of the SIP header. **/ + inline void SetUserNameL(const TPtrC8 & aUserName); + /** Sets Password field of the SIP header. **/ + inline void SetPasswordL(const TPtrC8 & aPassword); + /** Sets Realm field of the SIP header. **/ + inline void SetRealmL(const TPtrC8 & aRealm); + + DATA_VTABLE +protected: + + /** The Username entry of Authenticate field in a SIP header. */ + RBuf8 iUserName; + /** The Password entry of Authenticate field in a SIP header. */ + RBuf8 iPassword; + /** The Realm entry of Authenticate field in a SIP header. */ + RBuf8 iRealm; +}; + + + +class CSIPSubConnExtensionParamsFactory : public CBase +/** Factory used to create instances of the SIP SubConnection Parameter Extension Sets. + +@publishedAll +@released since v9.2 +*/ + { +public: + static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); + }; + +#include + +#endif // SIP_SUBCONPARAMS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sip_subconparams.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sip_subconparams.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,321 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIPSCPR_subconparams.inl +// SIP extension parameters inline implementation +// / CSubConSIPInviteParamSet +// +// + + + + +/** + @file + @publishedAll +*/ + +inline CSubConSIPInviteParamSet* CSubConSIPInviteParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) + { + CSubConSIPInviteParamSet* obj = NewL(); + CleanupStack::PushL(obj); + aFamily.AddExtensionSetL(*obj, aType); + CleanupStack::Pop(obj); + return obj; + } + +inline CSubConSIPInviteParamSet* CSubConSIPInviteParamSet::NewL() + { + STypeId typeId(KSubConSIPParametersUid, KSubConSIPInviteParamsType); + return static_cast(CSubConParameterSet::NewL(typeId)); + } + +inline CSubConSIPInviteParamSet::CSubConSIPInviteParamSet() +:CSubConExtensionParameterSet() + { + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetRequestUri() const + { + return iReqUri.LeftTPtr(iReqUri.Length()); + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetFrom() const + { + return iFrom.LeftTPtr(iFrom.Length()); + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetTo() const + { + return iTo.LeftTPtr(iTo.Length()); + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetContact() const + { + return iContact.LeftTPtr(iContact.Length()); + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetContentType() const + { + return iContentType.LeftTPtr(iContentType.Length()); + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetContentSubType() const + { + return iContentSubType.LeftTPtr(iContentSubType.Length()); + } + +inline const TPtrC8 CSubConSIPInviteParamSet::GetContent() const + { + return iContent.LeftTPtr(iContent.Length()); + } + +// Setters +inline void CSubConSIPInviteParamSet::SetRequestUriL(const TPtrC8& aReqUri) + { + iReqUri.Close(); + iReqUri.CreateL(aReqUri); + } + +inline void CSubConSIPInviteParamSet::SetFromL(const TPtrC8& aFrom) + { + iFrom.Close(); + iFrom.CreateL(aFrom); + } + +inline void CSubConSIPInviteParamSet::SetToL(const TPtrC8& aTo) + { + iTo.Close(); + iTo.CreateL(aTo); + } + +inline void CSubConSIPInviteParamSet::SetContactL(const TPtrC8& aContact) + { + iContact.Close(); + iContact.CreateL(aContact); + } + +inline void CSubConSIPInviteParamSet::SetContentTypeL(const TPtrC8& aContentType) + { + iContentType.Close(); + iContentType.CreateL(aContentType); + } + +inline void CSubConSIPInviteParamSet::SetContentSubTypeL(const TPtrC8& aContentSubType) + { + iContentSubType.Close(); + iContentSubType.CreateL(aContentSubType); + } + +inline void CSubConSIPInviteParamSet::SetContentL(const TPtrC8& aContent) + { + iContent.Close(); + iContent.CreateL(aContent); + } + + + + + + + +/*-=========================================================== +/ +/ CSubConSIPSubscribeParamSet +/ +/*-=========================================================*/ +inline CSubConSIPSubscribeParamSet* CSubConSIPSubscribeParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) + { + CSubConSIPSubscribeParamSet* obj = NewL(); + CleanupStack::PushL(obj); + aFamily.AddExtensionSetL(*obj, aType); + CleanupStack::Pop(obj); + return obj; + } + +inline CSubConSIPSubscribeParamSet* CSubConSIPSubscribeParamSet::NewL() + { + STypeId typeId(KSubConSIPParametersUid, KSubConSIPSubscribeParamsType); + return static_cast(CSubConParameterSet::NewL(typeId)); + } + +// Constructor +inline CSubConSIPSubscribeParamSet::CSubConSIPSubscribeParamSet() +:CSubConExtensionParameterSet() + { + } + +// Getters +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetRequestUri() const + { + return iReqUri.LeftTPtr(iReqUri.Length()); + } + +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetFrom() const + { + return iFrom.LeftTPtr(iFrom.Length()); + } + +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetTo() const + { + return iTo.LeftTPtr(iTo.Length()); + } + +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetContact() const + { + return iContact.LeftTPtr(iContact.Length()); + } + +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetEventType() const + { + return iEventType.LeftTPtr(iEventType.Length()); + } + +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetAcceptType() const + { + return iAcceptType.LeftTPtr(iAcceptType.Length()); + } + +inline const TPtrC8 CSubConSIPSubscribeParamSet::GetAcceptSubType() const + { + return iAcceptSubType.LeftTPtr(iAcceptSubType.Length()); + } + +inline const TInt CSubConSIPSubscribeParamSet::GetExpires() const + { + return iExpires; + } + +inline const TBool CSubConSIPSubscribeParamSet::GetAutoRefresh() const + { + return iAutoRefresh; + } + + +// Setters +inline void CSubConSIPSubscribeParamSet::SetRequestUriL(const TPtrC8& aReqUri) + { + iReqUri.Close(); + iReqUri.CreateL(aReqUri); + } + +inline void CSubConSIPSubscribeParamSet::SetFromL(const TPtrC8& aFrom) + { + iFrom.Close(); + iFrom.CreateL(aFrom); + } + +inline void CSubConSIPSubscribeParamSet::SetToL(const TPtrC8& aTo) + { + iTo.Close(); + iTo.CreateL(aTo); + } + +inline void CSubConSIPSubscribeParamSet::SetContactL(const TPtrC8& aContact) + { + iContact.Close(); + iContact.CreateL(aContact); + } + +inline void CSubConSIPSubscribeParamSet::SetEventTypeL(const TPtrC8& aEventType) + { + iEventType.Close(); + iEventType.CreateL(aEventType); + } + +inline void CSubConSIPSubscribeParamSet::SetAcceptTypeL(const TPtrC8& aAcceptType) + { + iAcceptType.Close(); + iAcceptType.CreateL(aAcceptType); + } + +inline void CSubConSIPSubscribeParamSet::SetAcceptSubTypeL(const TPtrC8& aAcceptSubType) + { + iAcceptSubType.Close(); + iAcceptSubType.CreateL(aAcceptSubType); + } + +inline void CSubConSIPSubscribeParamSet::SetExpires(TInt aExpires) + { + iExpires = aExpires; + } + +inline void CSubConSIPSubscribeParamSet::SetAutoRefresh(TBool aAutoRefresh) + { + iAutoRefresh = aAutoRefresh; + } + + + + + +/*-=========================================================== +/ +/ CSubConSIPAuthenticateParamSet +/ +/*-=========================================================*/ +inline CSubConSIPAuthenticateParamSet* CSubConSIPAuthenticateParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) + { + CSubConSIPAuthenticateParamSet* obj = NewL(); + CleanupStack::PushL(obj); + aFamily.AddExtensionSetL(*obj, aType); + CleanupStack::Pop(obj); + return obj; + } + +inline CSubConSIPAuthenticateParamSet* CSubConSIPAuthenticateParamSet::NewL() + { + STypeId typeId(KSubConSIPParametersUid, KSubConSIPAuthenticateParamsType); + return static_cast(CSubConParameterSet::NewL(typeId)); + } + +// Constructor +inline CSubConSIPAuthenticateParamSet::CSubConSIPAuthenticateParamSet() +:CSubConExtensionParameterSet() + { + } + +// Getters +inline const TPtrC8 CSubConSIPAuthenticateParamSet::GetUserName() const + { + return iUserName.LeftTPtr(iUserName.Length()); + } + +inline const TPtrC8 CSubConSIPAuthenticateParamSet::GetPassword() const + { + return iPassword.LeftTPtr(iPassword.Length()); + } + +inline const TPtrC8 CSubConSIPAuthenticateParamSet::GetRealm() const + { + return iRealm.LeftTPtr(iRealm.Length()); + } + +// Setters +inline void CSubConSIPAuthenticateParamSet::SetUserNameL(const TPtrC8 & aUserName) + { + iUserName.Close(); + iUserName.CreateL(aUserName); + } + +inline void CSubConSIPAuthenticateParamSet::SetPasswordL(const TPtrC8 & aPassword) + { + iPassword.Close(); + iPassword.CreateL(aPassword); + } + +inline void CSubConSIPAuthenticateParamSet::SetRealmL(const TPtrC8 & aRealm) + { + iRealm.Close(); + iRealm.CreateL(aRealm); + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipacceptcontactheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipacceptcontactheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,172 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipacceptcontactheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPACCEPTCONTACTHEADER_H +#define CSIPACCEPTCONTACTHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAcceptContactHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP +* "Accept-Contact" header. +* +* @lib sipcodec.lib +*/ +class CSIPAcceptContactHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAcceptContactHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Accept-Contact"-header + * (e.g. "*;param=value") + * @return an array containing one to many instances + * of CSIPAcceptContactHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAcceptContactHeader + * @return a new instance of CSIPAcceptContactHeader + */ + IMPORT_C static CSIPAcceptContactHeader* NewL(); + + /** + * Creates a new instance of CSIPAcceptContactHeader + * On return the new instance has left to the CleanupStack. + * @return a new instance of CSIPAcceptContactHeader + */ + IMPORT_C static CSIPAcceptContactHeader* NewLC(); + + /** + * Destructor, deletes the resources of CSIPAcceptContactHeader. + */ + IMPORT_C virtual ~CSIPAcceptContactHeader(); + + + public: // New functions + + /** + * Compares this instance to another "Accept-Contact" header object. + * Two Accept-Contact-headers are equal, + * if both contain exactly the same parameters. + * The order of the parameters is not sufficient. + * @param aHeader a header to compare to + * @return ETrue, if the objects are equal otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPAcceptContactHeader& aHeader) const; + + /** + * Constructs an instance of a CSIPAcceptContactHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPAcceptContactHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPAcceptContactHeader(); + void ConstructL(); + void ConstructL(const CSIPAcceptContactHeader& aAcceptContactHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + CSIPAcceptContactHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPAcceptContactHeaderTest) + }; + +#endif // CSIPACCEPTCONTACTHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipacceptencodingheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipacceptencodingheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipacceptencodingheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPACCEPTENCODINGHEADER_H +#define CSIPACCEPTENCODINGHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAcceptHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting media types and +* parameters in SIP "Accept-Encoding" header. +* +* @lib sipcodec.lib +*/ +class CSIPAcceptEncodingHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAcceptEncodingHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Accept-Encoding"-header + * @return An array containing one to many CSIPAcceptEncodingHeader + * instances + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAcceptEncodingHeader + * @param aCodings a codings to set. + * @return a new instance of CSIPAcceptEncodingHeader + */ + IMPORT_C static CSIPAcceptEncodingHeader* NewL(const TDesC8& aCodings); + + /** + * Creates a new instance of CSIPAcceptEncodingHeader + * and puts it onto the cleanup stack + * @param aCodings a codings to set. + * @return a new instance of CSIPAcceptEncodingHeader + */ + IMPORT_C static CSIPAcceptEncodingHeader* NewLC(const TDesC8& aCodings); + + /** + * Destructor, deletes the resources of CSIPAcceptEncodingHeader. + */ + IMPORT_C ~CSIPAcceptEncodingHeader(); + + + public: // New functions + + /** + * Gets the codings from the "Accept-Encoding" header + * @return codings + */ + IMPORT_C const TDesC8& Codings() const; + + /** + * Sets the codings in the "Accept-Encoding" header + * @param aCodings the codings + */ + IMPORT_C void SetCodingsL(const TDesC8& aCodings); + + /** + * Gets the value of "q"-parameter + * @return the "q"-parameter value + */ + IMPORT_C TReal QParameter() const; + + /** + * Sets the "q"-parameter value + * @param aQValue a "q"-parameter value to set´ + */ + IMPORT_C void SetQParameterL(TReal aQValue); + + /** + * Constructs an instance of a CSIPAcceptEncodingHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return An instance of a CSIPAcceptEncodingHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPAcceptEncodingHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aCodings); + void ConstructL(const CSIPAcceptEncodingHeader& aAcceptEncodingHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + HBufC8* iCodings; + CSIPAcceptHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPAcceptEncodingHeaderTest) + }; + +#endif // CSIPACCEPTENCODINGHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipacceptheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipacceptheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,207 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipacceptheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPACCEPTHEADER_H +#define CSIPACCEPTHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAcceptHeaderParams; + + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting media types and +* parameters in SIP "Accept" header. +* +* @lib sipcodec.lib +*/ +class CSIPAcceptHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAcceptHeader from textual representation + * of the header's value part. + * An empty Accept-header can be created using this function + * by passing a KNullDesC8 as a parameter. + * @param aValue a value part of a "Accept"-header + * @return an array containing one to many instances of CSIPAcceptHeader. + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAcceptHeader + * @param aMediaType a media type to set. For example "application" + * @param aMediaSubtype a media subtype to set. For example "sdp" + * @return a new instance of CSIPAcceptHeader + */ + IMPORT_C static CSIPAcceptHeader* NewL(const TDesC8& aMediaType, + const TDesC8& aMediaSubtype); + + /** + * Creates a new instance of CSIPAcceptHeader and puts it into + * the cleanup stack + * @param aMediaType a media type to set. For example "application" + * @param aMediaSubtype a media subtype to set. For example "sdp" + * @return a new instance of CSIPAcceptHeader + */ + IMPORT_C static CSIPAcceptHeader* NewLC(const TDesC8& aMediaType, + const TDesC8& aMediaSubtype); + + /** + * Destructor, deletes the resources of CSIPAcceptHeader. + */ + IMPORT_C ~CSIPAcceptHeader(); + + + public: // New functions + + /** + * Check if the header is empty. If so, + * the other getters will not return a meaningful value. + * @return ETrue if empty, EFalse otherwise. + */ + IMPORT_C TBool IsEmpty() const; + + /** + * Gets the media type from the "Accept" header + * @return a media type + */ + IMPORT_C const TDesC8& MediaType() const; + + /** + * Sets the media type in the "Accept" header + * @pre IsEmpty() == EFalse + * @param aMediaType a media type + */ + IMPORT_C void SetMediaTypeL(const TDesC8& aMediaType); + + /** + * Gets the media subtype from the "Accept" header + * @return a media subtype + */ + IMPORT_C const TDesC8& MediaSubtype() const; + /** + * Sets the media subtype in the "Accept" header + * @pre IsEmpty() == EFalse + * @param aMediaSubtype a media subtype + */ + IMPORT_C void SetMediaSubtypeL(const TDesC8& aMediaSubtype); + + /** + * Gets the value of "q"-parameter + * @return the "q"-parameter value + */ + IMPORT_C TReal QParameter() const; + + /** + * Sets the "q"-parameter value + * @param aQValue a "q"-parameter value to set + */ + IMPORT_C void SetQParameterL(TReal aQValue); + + /** + * Constructs an instance of a CSIPAcceptHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return An instance of a CSIPAcceptHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPAcceptHeader(TBool aEmpty=EFalse); + void ConstructL(); + void ConstructL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); + void ConstructL(const CSIPAcceptHeader& aAcceptHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + TBool iEmpty; + HBufC8* iMediaType; + HBufC8* iMediaSubtype; + CSIPAcceptHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPAcceptHeaderTest) + }; + +#endif // CSIPACCEPTHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipacceptlanguageheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipacceptlanguageheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,178 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipacceptlanguageheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPACCEPTLANGUAGEHEADER_H +#define CSIPACCEPTLANGUAGEHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAcceptHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting media types and +* parameters in SIP "Accept-Language" header. +* +* @lib sipcodec.lib +*/ +class CSIPAcceptLanguageHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAcceptLanguageHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Accept-Language"-header + * @return an array containing one to many instances of + * CSIPAcceptLanguageHeader. + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAcceptLanguageHeader + * @param aLanguageRange a language-range to set + * @return a new instance of CSIPAcceptLanguageHeader + */ + IMPORT_C static CSIPAcceptLanguageHeader* + NewL(const TDesC8& aLanguageRange); + + /** + * Creates a new instance of CSIPAcceptLanguageHeader and puts it onto + * the cleanup stack + * @param aLanguageRange a language-range to set + * @return a new instance of CSIPAcceptLanguageHeader + */ + IMPORT_C static CSIPAcceptLanguageHeader* + NewLC(const TDesC8& aLanguageRange); + + /** + * Destructor, deletes the resources of CSIPAcceptLanguageHeader. + */ + IMPORT_C ~CSIPAcceptLanguageHeader(); + + + public: // New functions + + /** + * Gets the language-range from the "Accept-Language" header + * @return a language-range + */ + IMPORT_C const TDesC8& LanguageRange() const; + + /** + * Sets the language-range in the "Accept-Language" header + * @param aLanguageRange a language-range + */ + IMPORT_C void SetLanguageRangeL(const TDesC8& aLanguageRange); + + /** + * Gets the value of "q"-parameter + * @return the "q"-parameter value + */ + IMPORT_C TReal QParameter() const; + + /** + * Sets the "q"-parameter value + * @param aQValue a "q"-parameter value to set + */ + IMPORT_C void SetQParameterL(TReal aQValue); + + /** + * Constructs an instance of a CSIPAcceptLanguageHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return an instance of a CSIPAcceptLanguageHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // New functions + + CSIPAcceptLanguageHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aLanguageRange); + void ConstructL(const CSIPAcceptLanguageHeader& aAcceptLanguageHeader); + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + HBufC8* iLanguageRange; + CSIPAcceptHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPAcceptLanguageHeaderTest) + }; + +#endif // CSIPACCEPTLANGUAGEHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipaddress.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipaddress.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,209 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipaddress.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPADDRESS_H +#define CSIPADDRESS_H + +// INCLUDES +#include +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CURIContainer; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP +* name-addr structure +* +* @lib sipcodec.lib +*/ +class CSIPAddress : public CBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAddress from textual representation + * @param aValue SIP name-addr as text + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAddress + * @pre aUri != 0 + * @param aUri the ownership is transferred. + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* NewL(CUri8* aUri8); + + /** + * Creates a new instance of CSIPAddress and puts it to CleanupStack + * @pre aUri != 0 + * @param aUri the ownership is transferred. + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* NewLC(CUri8* aUri8); + + /** + * Creates a new instance of CSIPAddress + * @pre aUri != 0 + * @param aDisplayName a SIP token or a SIP quoted-string + * @param aUri the ownership is transferred. + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* NewL(const TDesC8& aDisplayName, + CUri8* aUri8); + + /** + * Creates a new instance of CSIPAddress and puts it to CleanupStack + * @pre aUri != 0 + * @param aDisplayName a SIP token or a SIP quoted-string + * @param aUri the ownership is transferred. + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* NewLC(const TDesC8& aDisplayName, + CUri8* aUri8); + + /** + * Creates a deep-copy of a CSIPAddress + * @param aSIPAddress the address to be copied + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* NewL(const CSIPAddress& aSIPAddress); + + /** + * Creates a deep-copy of a CSIPAddress and puts it to CleanupStack + * @param aSIPAddress the address to be copied + * @return a new instance of CSIPAddress + */ + IMPORT_C static CSIPAddress* NewLC(const CSIPAddress& aSIPAddress); + + /** + * Destructor, deletes the resources of CSIPAddress. + */ + IMPORT_C ~CSIPAddress(); + + + public: // New functions + + /** + * Compares this object to another instance of CSIPAddress + * @param aSIPAddress a CSIPAddress to compare to + * @return ETrue if the objects are equal otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPAddress& aSIPAddress) const; + + /** + * Gets the display name + * @return the display name if present, + * otherwise a zero-length descriptor + */ + IMPORT_C const TDesC8& DisplayName() const; + + /** + * Sets the display name + * @param aDisplayName a SIP token or a SIP quoted-string + */ + IMPORT_C void SetDisplayNameL(const TDesC8& aDisplayName); + + /** + * Gets the URI part of the address as const + * @return a reference to the URI object + */ + IMPORT_C const CUri8& Uri8() const; + + /** + * Sets the URI part of the address + * @pre aUri!= 0 + * @param aUri a pointer to the URI object, the ownership is transferred + */ + IMPORT_C void SetUri8L(CUri8* aUri8); + + /** + * Creates a textual representation and pushes it to CleanupStack + * @param aUseAngleBrackets if ETrue, sets the anglebrackets + * @return a textual representation of the object, + * the ownership is transferred + */ + IMPORT_C HBufC8* ToTextLC(TBool aUseAngleBrackets=EFalse) const; + + /** + * Constructs an instance of a CSIPAddress from a RReadStream + * @param aReadStream a stream containing the externalized object + * @return an instance of a CSIPAddress + */ + IMPORT_C static CSIPAddress* InternalizeL(RReadStream& aReadStream); + + /** + * Writes the object to a RWriteStream + * @param aWriteStream a stream where the object is to be externalized + */ + IMPORT_C void ExternalizeL(RWriteStream& aWriteStream); + + + public: // For internal use: + + IMPORT_C CURIContainer& URI(); + IMPORT_C const CURIContainer& URI() const; + static CSIPAddress* NewLC(CURIContainer* aURI); + + + private: // Constructors + + CSIPAddress(); + void ConstructL(); + void ConstructL(CUri8* aUri); + void ConstructL(const TDesC8& aDisplayName, CUri8* aUri); + void ConstructL(const CSIPAddress& aSIPAddress); + void ConstructL(CURIContainer* aURI); + + private: // New functions + + void DoInternalizeL(RReadStream& aReadStream); + TInt QuotedStringLength(const TDesC8& aValue); + TBool CheckDisplayName(const TDesC8& aValue); + void ParseURIInAngleBracketsL(const TDesC8& aValue); + void ParseURIL(const TDesC8& aValue); + TBool ContainsSeparators(const TDesC8& aValue) const; + TBool HasDisplayName() const; + + private: // Data + + HBufC8* iDisplayName; + CURIContainer* iURI; + + private: // For testing purposes + + UNIT_TEST(CSIPAddressTest) + }; + +#endif // end of __SIP_ADDRESS_H__ + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipaddressheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipaddressheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,118 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipaddressheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPADDRESSHEADERBASE_H +#define CSIPADDRESSHEADERBASE_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPHeaderGenericParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP headers having syntax +* ( name-addr/ addr-spec ) *(generic-param) +* +* @lib sipcodec.lib +*/ +class CSIPAddressHeaderBase : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPAddressHeaderBase. + */ + IMPORT_C virtual ~CSIPAddressHeaderBase(); + + + public: // New functions + + /** + * Sets the name-address + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address to set, the ownership is transferred + */ + IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); + + /** + * Gets the name-address as const + * @return name-address object + */ + IMPORT_C const CSIPAddress& SIPAddress() const; + + /** + * Gets the name-address + * @return name-address object + */ + IMPORT_C CSIPAddress& SIPAddress(); + + + protected: // Constructors + + CSIPAddressHeaderBase(); + void ConstructL(); + void ConstructL(CSIPAddress* aSIPAddress); + void ConstructL(const CSIPAddressHeaderBase& aHeader); + + protected: // Data + + /** + * @internalComponent + */ + CSIPAddress* iSIPAddress; + + /** + * @internalComponent + */ + CSIPHeaderGenericParams* iParams; + + protected: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + protected: // From CSIPHeaderBase + + /** + * @internalComponent + */ + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + }; + +#endif // end of CSIPADDRESSHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipalloweventsheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipalloweventsheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,190 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipalloweventsheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPALLOWEVENTSHEADER_H +#define CSIPALLOWEVENTSHEADER_H + +// INCLUDES +#include +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in +* SIP "Allow-Events" header. +* +* @lib sipcodec.lib +*/ +class CSIPAllowEventsHeader : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAllowEventsHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Allow-Events"-header + * @return An array containing one to many instances of + * CSIPAllowEventsHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAllowEventsHeader + * @param aEventPackage a Event-Package value + * @return a new instance of CSIPAllowEventsHeader + */ + IMPORT_C static CSIPAllowEventsHeader* + NewL(const TDesC8& aEventPackage); + + /** + * Creates a new instance of CSIPAllowEventsHeader and + * puts it to CleanupStack + * @param aEventPackage a Event-Package value + * @return a new instance of CSIPAllowEventsHeader + */ + IMPORT_C static CSIPAllowEventsHeader* NewLC(const TDesC8& aEventPackage); + + /** + * Destructor. deletes the resources of CSIPAllowEventsHeader. + */ + IMPORT_C ~CSIPAllowEventsHeader(); + + public: // New functions + + /** + * Gets the Event-Package parameter from the "Allow-Events" header + * @return the Event-Package parameter + */ + IMPORT_C const TDesC8& EventPackage() const; + + /** + * Sets the Event-Package parameter in the "Allow-Events" header; + * @param aEventPackage a Event-Package parameter to set + */ + IMPORT_C void SetEventPackageL(const TDesC8& aEventPackage); + + /** + * Sets the event templates overwriting all the existing ones. + * @param aEventTemplates + */ + IMPORT_C void SetEventTemplatesL(const MDesC8Array& aEventTemplates); + + /** + * Gets the event templates. + * @return a reference to the currently set event templates. + */ + + IMPORT_C const MDesC8Array& EventTemplates() const; + + /** + * Constructs an instance of a CSIPAllowEventsHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + */ + + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // Contructors + + CSIPAllowEventsHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aEventPackage); + void ConstructL (const CSIPAllowEventsHeader& aSIPAllowEventsHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + void ParseL(const TDesC8& aValue); + void CheckTemplateL(const TDesC8& aParam) const; + // Needed for cleanup of a RPointerArray: + static void ResetAndDestroy(TAny* anArray); + + private: // Data + + HBufC8* iEventPackage; + CDesC8ArraySeg* iEventTemplates; + + private: // For testing purposes + + UNIT_TEST(CSIPAllowEventsHeaderTest) + }; + +#endif // CSIPALLOWEVENTSHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipallowheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipallowheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipallowheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPALLOWHEADER_H +#define CSIPALLOWHEADER_H + +// INCLUDES +#include "siptokenheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters +* in SIP "Allow" header. +* +* @lib sipcodec.lib +*/ +class CSIPAllowHeader : public CSIPTokenHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAllowHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Allow"-header + * @return an array containing one to many instances of CSIPAllowHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAllowHeader + * @param aValue a value + * @return a new instance of CSIPAllowHeader + */ + IMPORT_C static CSIPAllowHeader* NewL(RStringF aValue); + + /** + * Creates a new instance of CSIPAllowHeader and puts it to CleanupStack + * @param aValue a value + * @return a new instance of CSIPAllowHeader + */ + IMPORT_C static CSIPAllowHeader* NewLC(RStringF aValue); + + /** + * Destructor, deletes the resources of CSIPAllowHeader. + */ + IMPORT_C ~CSIPAllowHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPAllowHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPAllowHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPAllowHeader(); + CSIPAllowHeader(const CSIPAllowHeader& aHeader); + }; + +#endif // CSIPALLOWHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipauthenticateheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipauthenticateheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipauthenticateheaderbase.h +* Part of : SIP Codec +* Version : SIP/5.0 +* +*/ + + + +#ifndef CSIPAUTHENTICATEHEADERBASE_H +#define CSIPAUTHENTICATEHEADERBASE_H + +// INCLUDES +#include "sipauthheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAuthenticateHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP Proxy-Authenticate- and WWW-Authenticate-headers +* +* @lib sipcodec.lib +*/ +class CSIPAuthenticateHeaderBase : public CSIPAuthHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor. + */ + IMPORT_C virtual ~CSIPAuthenticateHeaderBase(); + + + public: // New functions + + /** + * Check whether a qop-value in qop-options is present. + * @param aQopValue the qop-value + * @return ETrue if present, otherwise EFalse. + */ + IMPORT_C TBool HasQopValueL(const TDesC8& aQopValue) const; + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ExternalizeSupported + */ + IMPORT_C virtual TBool ExternalizeSupported() const; + + protected: // Constructors + + CSIPAuthenticateHeaderBase(); + void ConstructL(); + void ConstructL(const CSIPAuthenticateHeaderBase& aHeader); + + protected: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + protected: // From CSIPAuthBase + + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + protected: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + protected: // Data + + CSIPAuthenticateHeaderParams* iParams; + }; + +#endif // CSIPAUTHENTICATEHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipauthheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipauthheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,165 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipauthheaderbase.h +* Part of : SIP Codec +* Version : SIP/5.0 +* +*/ + + + +#ifndef CSIPAUTHHEADERBASE_H +#define CSIPAUTHHEADERBASE_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPParamContainerBase; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP Authorization-, Proxy-Authenticate-, +* Proxy-Authorization- and WWW-Authenticate-headers +* +* @lib sipcodec.lib +*/ +class CSIPAuthHeaderBase : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor. + */ + IMPORT_C virtual ~CSIPAuthHeaderBase(); + + + public: // New functions + + /** + * @return the value of the auth-scheme + */ + IMPORT_C RStringF AuthScheme() const; + + /** + * Checks if a parameter is present + * @param aName the name of the parameter + * @return ETrue if present, otherwise EFalse + */ + IMPORT_C TBool HasParam(RStringF aName) const; + + /** + * Gets a parameter value + * @pre HasParam(aName) == ETrue + * @param aName the name of the parameter + * @return the parameter value if present, + * otherwise a zero-length length value. + */ + IMPORT_C RStringF ParamValue(RStringF aName) const; + + /** + * Gets a parameter value stored as a descriptor + * @pre HasParam(aName) == ETrue + * @param aName the name of the parameter + * @return the parameter value if present, + * otherwise a zero-length length value. + */ + IMPORT_C const TDesC8& DesParamValue(RStringF aName) const; + + /** + * Sets a parameter with a value. + * Takes copies of the name and value, + * so if the RStringFs have been dynamically allocated, + * they can be closed if necessary after the function returns. + * @pre HasParam(aName) == EFalse + * @param aName the name of the parameter + * @param aValue the parameter value to set + */ + IMPORT_C void SetParamL(RStringF aName, RStringF aValue); + + /** + * Sets a parameter with a value. + * Takes copies of the name + * so if the RStringF have been dynamically allocated, + * they can be closed if necessary after the function returns. + * Stores the parameter value as a descriptor, so that the + * case-sensitivity is not lost in RStringF-descriptor conversions. + * @pre HasParam(aName) == EFalse + * @param aName the name of the parameter + * @param aValue the parameter value to set + */ + IMPORT_C void SetDesParamL(RStringF aName, const TDesC8& aValue); + + /** + * Sets a parameter with a value and adds double quotes + * as the first and the last character in the value. + * Takes copy of the name, + * so if the RStringF has been dynamically allocated, + * it can be closed if necessary after the function returns. + * @pre HasParam(aName) == EFalse + * @param aName the name of the parameter + * @param aValue the parameter value + * to which the double quotes will be added + */ + IMPORT_C void SetParamAndAddQuotesL(RStringF aName, + const TDesC8& aValue); + + /** + * Deletes a parameter + * @param aName the parameter name to delete + */ + IMPORT_C void DeleteParam(RStringF aName); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ExternalizeSupported + */ + IMPORT_C virtual TBool ExternalizeSupported() const; + + + public: // From CSIPHeaderBase, for internal use + + TBool EncodeMultipleToOneLine() const; + TBool MoreThanOneAllowed() const; + TPreferredPlace PreferredPlaceInMessage() const; + virtual HBufC8* ToTextValueL() const; + + protected: // Constructors + + CSIPAuthHeaderBase(); + void ConstructL(RStringF aAuthScheme); + + protected: // New functions + + void SetAuthSchemeL(const TDesC8& aAuthScheme); + void ParseL(const TDesC8& aValue); + virtual const CSIPParamContainerBase& Params() const = 0; + virtual CSIPParamContainerBase& Params() = 0; + + private: // Data + + RStringF iAuthScheme; + TChar iSeparator; + }; + +#endif // CSIPAUTHHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipauthorizationheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipauthorizationheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipauthorizationheader.h +* Part of : SIP Codec +* Version : SIP/6.0 +* +*/ + + + +#ifndef CSIPAUTHORIZATIONHEADER_H +#define CSIPAUTHORIZATIONHEADER_H + +// INCLUDES +#include "sipauthorizationheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for SIP Authorization-header manipulation. +* @lib sipcodec.lib +*/ +class CSIPAuthorizationHeader : public CSIPAuthorizationHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPAuthorizationHeader + * from textual representation of the header's value part. + * @param aValue a value part of a "Proxy-Authenticate"-header + * @return a new instance of CSIPAuthorizationHeader + */ + IMPORT_C static CSIPAuthorizationHeader* + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPAuthorizationHeader + * @return a new instance of CSIPAuthorizationHeader + */ + IMPORT_C static CSIPAuthorizationHeader* + NewL(RStringF aAuthScheme); + + /** + * Creates a new instance of CSIPAuthorizationHeader + * @return a new instance of CSIPAuthorizationHeader + */ + IMPORT_C static CSIPAuthorizationHeader* + NewLC(RStringF aAuthScheme); + + /** + * Creates a deep-copy of a CSIPAuthorizationHeaderBase + * @param aAuthenticateHeaderBase to be copied + * @return a new instance of CSIPAuthorizationHeader + */ + IMPORT_C static CSIPAuthorizationHeader* + NewL(const CSIPAuthorizationHeaderBase& aHeader); + + /** + * Creates a deep-copy of a CSIPAuthorizationHeaderBase + * @param aAuthenticateHeaderBase to be copied + * @return a new instance of CSIPAuthorizationHeader + */ + IMPORT_C static CSIPAuthorizationHeader* + NewLC(const CSIPAuthorizationHeaderBase& aHeader); + + /** + * Destructor + */ + IMPORT_C ~CSIPAuthorizationHeader(); + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ExternalizeSupported + */ + IMPORT_C TBool ExternalizeSupported() const; + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // New functions, for internal use + + /** + * @internalComponent + */ + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + /** + * @internalComponent + */ + static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + private: // Constructors + + CSIPAuthorizationHeader(); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // For testing purposes + + UNIT_TEST(CSIPAuthorizationHeaderTest) + }; + +#endif // CSIPAUTHORIZATIONHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipauthorizationheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipauthorizationheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipauthorizationheaderbase.h +* Part of : SIP Codec +* Version : SIP/6.0 +* +*/ + + + +#ifndef CSIPAUTHORIZATIONHEADERBASE_H +#define CSIPAUTHORIZATIONHEADERBASE_H + +// INCLUDES +#include "sipauthheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAuthorizationHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP Authorization- and Proxy-Authorization-headers +* @lib sipcodec.lib +*/ +class CSIPAuthorizationHeaderBase : public CSIPAuthHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor. + */ + IMPORT_C virtual ~CSIPAuthorizationHeaderBase(); + + protected: // Constructors + + CSIPAuthorizationHeaderBase(); + void ConstructL(); + void ConstructL(const CSIPAuthorizationHeaderBase& aHeader); + + protected: // From CSIPAuthHeaderBase + + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + protected: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + protected: // Data + + CSIPAuthorizationHeaderParams* iParams; + }; + +#endif // CSIPAUTHORIZATIONHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcallidheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcallidheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,140 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcallidheader.h +* Part of : SIP Codec +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPCALLIDHEADER_H +#define CSIPCALLIDHEADER_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for a SIP Call-ID header. +* +* @lib sipcodec.lib +*/ +class CSIPCallIDHeader : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPCallIDHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Call-ID"-header (e.g. "ab2x@zb7y") + * @returns a new instance of CSIPCallIDHeader + */ + IMPORT_C static CSIPCallIDHeader* DecodeL(const TDesC8& aValue); + + /** + * Destructor + */ + IMPORT_C ~CSIPCallIDHeader (); + + + public: // New functions + + /** + * Compares this instance to another "Call-ID" header object + * @param aCallIDHeader a header to compare to + * @returns ETrue if "Call-ID" headers are similar + */ + IMPORT_C TBool operator==(const CSIPCallIDHeader& aCallIDHeader); + + /** + * Constructs an instance of a CSIPCallIDHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPCallIDHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL (RWriteStream& aWriteStream) const; + + private: // Constructors + + CSIPCallIDHeader(); + + private: // New functions + + void ParseL(const TDesC8& aValue); + + private: // Data + + HBufC8* iCallID; + + private: // For testing purposes + + UNIT_TEST(CSIPCallIDHeaderTest) + }; + + +#endif // end of CSIPCALLIDHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipclientresolverconfigcrkeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipclientresolverconfigcrkeys.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipclientresolverconfigcrkeys.h +* Part of : SIP / SIP Client Resolver +* Interface : SIP Client Resolver API +* Version : 1.0 +* +*/ + + + +#ifndef SIPCLIENTRESOLVERCONFIGCRKEYS_H +#define SIPCLIENTRESOLVERCONFIGCRKEYS_H + +// INCLUDES +#include + +/** +* @file +* @publishedAll +* @released +*/ + +/// Defines configuration parameters used by SIP Client Resolver +const TUid KCRUidSIPClientResolverConfig = { 0x10282EE7 }; + +/// Mask for the less significant bits in setting keys. +/// These bits are reserved for field type information. +const TUint32 KSIPClientResolverFieldTypeMask = 0xf0000000; + +/// Mask for the most significant bits in setting keys. +/// These bits are reserved for the actual key part. +const TUint32 KSIPClientResolverKeyMask = 0x0fffffff; + +/** +* Mask for username field. +* Field type is TDesC8. +*/ +const TUint32 KSIPClientResolverUserNameMask = 0x10000000; + +/** +* Mask for plug-in implementation UID field. +* Field type is TInt32. +*/ +const TUint32 KSIPClientResolverPluginUIDMask = 0x20000000; + +/** +* Mask for client UID field. +* Field type is TInt32. +*/ +const TUint32 KSIPClientResolverClientUIDMask = 0x30000000; + +#endif // SIPCLIENTRESOLVERCONFIGCRKEYS_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipclienttransaction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipclienttransaction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,173 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipclienttransaction.h +* Part of : SIP Client +* Interface : +* Version : 1.0 +* +*/ + + + + +#ifndef CSIPCLIENTTRANSACTION_H +#define CSIPCLIENTTRANSACTION_H + +// INCLUDES +#include "siptransactionbase.h" + +// FORWARD DECLARATIONS +class CSIPRefresh; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP client transactions. +* It provides services for ending and getting the SIP client transaction +* parameters. Some client transactions can also be canceled. +* +* The user of the class cannot instante this class. +* @lib sipclient +*/ +class CSIPClientTransaction: public CSIPTransactionBase + { + public: // Destructor + + /** + * Destructor + */ + IMPORT_C ~CSIPClientTransaction(); + + public: // New functions + + /** + * Gets response elements of the most recent response. + * @return Response elements. Ownership isn't transferred. + */ + IMPORT_C const CSIPResponseElements* ResponseElements() const; + + /** + * Cancels client transaction i.e. creates a CANCEL request and sends it + * to the remote UA. + * @pre State()==EProceeding + * @pre CancelAllowed()==ETrue + * @pre Connection().State()==EActive + * @return SIP CANCEL transaction, ownership is transferred. + * @leave KErrSIPInvalidTransactionState if canceling is not possible + * at all, or because the transaction is not in a proper state or the + * transaction is not related to a dialog. + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* CancelL(); + + /** + * Gets the associated refresh with the transaction. + * If the refresh is associated with the transaction, + * transaction will be refreshed at defined interval. + * @return associated refresh or 0-pointer if there's no + * associated refresh. Ownership isn't transferred. + */ + IMPORT_C const CSIPRefresh* Refresh() const; + + /** + * Checks if the client transaction is such that it can be cancelled. + * This does no check whether the transaction is currently in such a + * state that the canceling can be done now. + * + * @return ETrue if client transaction can be cancelled; + * EFalse otherwise + */ + IMPORT_C virtual TBool CancelAllowed() const; + + public: // Constructors, for internal use + + /** + * Instantiates a CSIPClientTransaction object, leaves on failure. + * + * @param aType Identifies the transaction type + * @param aAssociation Object to which the transaction is associated + * with. + * @param aRefresh If transaction is refreshed, this points to a + * CSIPRefresh, otherwise this is NULL. Ownership is not transferred. + * @return SIP client transaction, ownership is transferred. + */ + static CSIPClientTransaction* + NewL(RStringF aType, + MTransactionAssociation& aAssociation, + CSIPRefresh* aRefresh=0); + + /** + * Instantiates a CSIPClientTransaction object and pushes it into + * CleanupStack, leaves on failure. + * + * @param aType Identifies the transaction type + * @param aAssociation Object to which the transaction is associated + * with. + * @param aRefresh If transaction is refreshed, this points to a + * CSIPRefresh, otherwise this is NULL. Ownership is not transferred. + * @return SIP client transaction, ownership is transferred. + */ + static CSIPClientTransaction* + NewLC(RStringF aType, + MTransactionAssociation& aAssociation, + CSIPRefresh* aRefresh=0); + + public: // New functions, for internal use + + /** + * Sets the RequestId. + * + * @pre iRequestId == 0 + * @pre aRequestId != 0 + * @param aRequestId RequestId obtained from SIP client + */ + void SetRequestId(TUint32 aRequestId); + + /** + * Gets the associated refresh with the transaction and allows + * modification fo the refresh. This method is for internal use only. + * + * @return associated refresh or 0-pointer if there's no + * associated refresh. Ownership isn't transferred. + */ + CSIPRefresh* Refresh(); + + /** + * Clears the association from ClientTransaction to CSIPRefresh + */ + void RemoveRefresh(); + + protected: // Constructor + + CSIPClientTransaction(MTransactionAssociation& aAssociation, + CSIPRefresh* aRefresh); + + private: // Data + + //Points to the refresh object if this transaction is refreshed. + //NULL if not refreshed. Not owned. + CSIPRefresh* iRefresh; + + private: // For testing purposes + + UNIT_TEST(CSIP_Test) + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcodecerr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcodecerr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,116 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcodecerr.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/6.0 +* +*/ + + + +#ifndef SIPCODECERR_H +#define SIPCODECERR_H + +/** +* @file +* @publishedAll +* @released +*/ + +/** SIP parsing (decoding) errors */ +// General errors +const TInt KErrSipCodecPreParser=-17750; +const TInt KErrSipCodecTokenizer=-17751; +const TInt KErrSipCodecNotAllowed=-17752; +const TInt KErrSipCodecHeaderName=-17753; +const TInt KErrSipCodecHeaderValue=-17754; +const TInt KErrSipCodecRequestLine=-17755; +const TInt KErrSipCodecResponseLine=-17756; +const TInt KErrSipCodecResponseCode=-17757; +const TInt KErrSipCodecSIPVersion=-17758; +const TInt KErrSipCodecSIPMethod=-17759; +const TInt KErrSipCodecReasonPhrase=-17760; +const TInt KErrSipCodecAnyParam=-17761; +const TInt KErrSipCodecAnyParamName=-17762; +const TInt KErrSipCodecAnyParamValue=-17763; +const TInt KErrSipCodecDuplicateParam=-17764; +const TInt KErrSipCodecHostPort=-17765; +const TInt KErrSipCodecHost=-17766; +const TInt KErrSipCodecPort=-17767; +// sip-address +const TInt KErrSipCodecSIPAddress=-17768; +const TInt KErrSipCodecDisplayName=-17769; +// URI +const TInt KErrSipCodecURI=-17770; +const TInt KErrSipCodecURIScheme=-17771; +const TInt KErrSipCodecURIParams=-17772; +const TInt KErrSipCodecURIHeaders=-17773; +// From and To +const TInt KErrSipCodecFromOrToAddress=-17774; +const TInt KErrSipCodecFromOrToParams=-17775; +// Contact +const TInt KErrSipCodecContactHeader=-17776; +const TInt KErrSipCodecContactSetToStar=-17777; +const TInt KErrSipCodecContactAddress=-17778; +const TInt KErrSipCodecContactParams=-17779; +// Other SIP headers +const TInt KErrSipCodecViaHeader=-17780; +const TInt KErrSipCodecCallIdHeader=-17781; +const TInt KErrSipCodecCSeqHeader=-17782; +const TInt KErrSipCodecContentLengthHeader=-17783; +const TInt KErrSipCodecExpiresHeader=-17784; +const TInt KErrSipCodecMaxForwardsHeader=-17785; +const TInt KErrSipCodecContentTypeHeader=-17786; +const TInt KErrSipCodecRouteHeader=-17787; +const TInt KErrSipCodecMinExpiresHeader=-17788; +const TInt KErrSipCodecTokenBaseHeader=-17789; +const TInt KErrSipCodecRequireHeader=-17790; +const TInt KErrSipCodecContentEncodingHeader=-17791; +const TInt KErrSipCodecProxyRequireHeader=-17792; +const TInt KErrSipCodecSupportedHeader=-17793; +const TInt KErrSipCodecUnsupportedHeader=-17794; +const TInt KErrSipCodecAllowHeader=-17795; +const TInt KErrSipCodecSecurityHeader=-17796; +const TInt KErrSipCodecContentDispositionHeader=-17797; +const TInt KErrSipCodecSubscriptionStateHeader=-17798; +const TInt KErrSipCodecAcceptHeader=-17799; +const TInt KErrSipCodecAcceptEncodingHeader=-17800; +const TInt KErrSipCodecAcceptLanguageHeader= -17801; +const TInt KErrSipCodecAcceptParams=-17802; +const TInt KErrSipCodecEventHeader=-17803; +const TInt KErrSipCodecAllowEventsHeader=-17804; +const TInt KErrSipCodecAuthenticationInfoHeader=-17805; +const TInt KErrSipCodecReferToHeader=-17806; +const TInt KErrSipCodecAuthenticationHeader=-17807; +const TInt KErrSipCodecAuthScheme=-17808; +const TInt KErrSipCodecAuthorizationHeader=-17809; +const TInt KErrSipCodecURIContainer=-17810; +const TInt KErrSipCodecRAckHeader=-17811; +const TInt KErrSipCodecRSeqHeader=-17812; +const TInt KErrSipCodecReplyToHeader=-17813; +const TInt KErrSipCodecTimestampHeader=-17814; +const TInt KErrSipCodecRetryAfterHeader=-17815; +const TInt KErrSipCodecRetryAfterParams=-17816; +const TInt KErrSipCodecAcceptContactHeader=-17817; +const TInt KErrSipCodecPAssociatedURIHeader=-17818; +const TInt KErrSipCodecPAccessNetworkInfoHeader=-17819; + +// Last error code allocated to SIP Codec is -17874. +// This value must not be exceeded. + +#endif // SIPCODECERR_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipconcreteprofileobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipconcreteprofileobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipconcreteprofileobserver.h +* Part of : SIP Profile Client +* Interface : private +* The observer class that must be implemented by users of +* CSIPConcreteProfile +* Version : 1.0 +* +*/ + + + +#ifndef MSIPCONCRETEPROFILEOBSERVER_H +#define MSIPCONCRETEPROFILEOBSERVER_H + +// INCLUDES + +#include + +// FORWARD DECLARATIONS + + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Observer class to be implemented by users of CSIPConcreteProfile +* It provides event notifications related to profiles. +*/ +class MSIPConcreteProfileObserver + { + public: + + /** + * SIP profile registration status changed event + * Event is send to those observers, who have the + * corresponding profile instantiated. + * @param aProfileId id of profile which registration + * status has been changed. + * @param aStatus new status of the profile + * @param aStatusId id related to registration + */ + virtual void RegistrationStatusChangedL( + TUint32 aProfileId, + TInt aStatus, + TUint32 aStatusId) = 0; + + /** + * SIP profile creation event. + * Event is send to all observers. + * @param aProfileId id of new SIP Profile + */ + virtual void AddedL(TUint32 aProfileId) = 0; + + /** + * SIP profile destruction event. + * Event is send to those observers, who have the + * corresponding profile instantiated. + * @param aProfileId id of profile which was destroyed + */ + virtual void RemovedL(TUint32 aProfileId) = 0; + + /** + * SIP profile information update event + * Event is send to those observers, who have the + * corresponding profile instantiated. + * @param aProfileId id of updated SIP Profile + * @param aSize size of updated SIP Profile + */ + virtual void UpdatedL(TUint32 aProfileId, TUint aSize) = 0; + + /** + * An asynchronous error has occurred related to SIP profile + * Event is send to those observers, who have the + * corresponding profile instantiated. + * @param aProfileId the id of failed profile + * @param aStatus status indicating if error occurred + * during registering (ERegistrationInProgress) + * or deregistering (EUnregistrationInProgress) + * @param aError a error code + */ + virtual void ErrorOccurredL( + TUint32 aProfileId, + TInt aStatus, + TInt aError) = 0; + }; + +#endif // MSIPCONCRETEPROFILEOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipconnection.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipconnection.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,344 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipconnection.h +* Part of : SIP Client +* Interface : SDK API, SIP API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPCONNECTION_H +#define CSIPCONNECTION_H + +// INCLUDES +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIP; +class MSIPConnectionObserver; +class CSIPClientTransaction; +class MSIPRegistrationContext; +class CSIPRefresh; +class CSIPRequestElements; +class CSIPConnectionImplementation; + +// CONSTANTS + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for monitoring connection's state and sending SIP requests outside +* the dialog associations. Class must not be used +* - for sending requests to which received non-failure response creates a dialog +* - for sending requests that must be sent within SIP dialog +* +* Note that the user can have only one instance of the class per same IAP-id. +*/ +class CSIPConnection : public CBase + { + public: + /** Connection states */ + enum TState + { + /** Connection initializing */ + EInit=1, + /** Connection active */ + EActive, + /** Connection suspended */ + ESuspended, + /** Connection is inactive */ + EInactive, + /** Connection is permanently unavailable */ + EUnavailable + }; + + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aSip a handle to the SIP server + * @param aIapId IAP-id + * @param aObserver a observer for receiving asynchonous events on this + * connection + * @return New object, ownership is transferred + * @capability NetworkServices + */ + IMPORT_C static CSIPConnection* + NewL(CSIP& aSIP, + TUint32 aIapId, + MSIPConnectionObserver& aObserver); + + /** + * Two-phased constructor. + * Constructs an object and adds the pointer to the cleanup stack; + * @param aSip a handle to the SIP server + * @param aIapId IAP-id + * @param aObserver a observer for receiving asynchonous events on this + * connection + * @return New object, ownership is transferred + * @capability NetworkServices + */ + IMPORT_C static CSIPConnection* + NewLC(CSIP& aSIP, + TUint32 aIapId, + MSIPConnectionObserver& aObserver); + + /** + * Destructor + * @capability NetworkServices + */ + IMPORT_C ~CSIPConnection(); + + public: // New functions + + /** + * Gets current state of the connection + * @return current state of the connection + */ + IMPORT_C TState State() const; + + /** + * Creates SIP request and sends it to the given destination. + * The function must not be used with SIP requests that creates + * SIP dialog associations or must be sent within SIP dialog + * association. + * This provokes the Non-invite state machine. + * This function must be used if the user has created the + * registration binding. + * @pre State() == EActive. + * @pre aContext.IsContextActive() == ETrue + * @param aElements contains local and remote addresses, + * optional SIP message headers and body. + * The ownership is transferred. + * @param aContext defines outbound proxy to be used. If the user + * does not provide from-address it will be constucted using + * user's AOR used during the registration. + * @return SIP client transaction, ownership is transferred + * @leave KErrArgument if aElements == 0 + * @leave KErrSIPInvalidRegistrationState if aContext.IsContextActive() + * == EFalse + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendRequestL(CSIPRequestElements* aElements, + const MSIPRegistrationContext& aContext); + + /** + * Creates SIP request and sends it to the given destination. + * The function must not be used with SIP requests that creates + * SIP dialog associations or must be sent within SIP dialog + * association. + * This provokes the Non-invite state machine. + * This function must be used if the user has created the + * registration binding. + * @pre State() == EActive. + * @pre aContext.IsContextActive() == ETrue + * @param aElements contains local and remote addresses, + * optional SIP message headers and body. + * The ownership is transferred. + * @param aContext defines outbound proxy to be used. If the user + * does not provide from-address it will + * be constucted using user's AOR used during the registration. + * @param aRefresh defines the refresh interval for this transaction. + * @return SIP client transaction, ownership is transferred + * @leave KErrArgument if aElements == 0 + * @leave KErrSIPInvalidRegistrationState if aContext.IsContextActive() + * == EFalse + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendRequestL(CSIPRequestElements* aElements, + const MSIPRegistrationContext& aContext, + CSIPRefresh& aRefresh); + + /** + * Creates SIP request and sends it to the given destination. + * The function must not be used with SIP requests that creates SIP + * dialog associations or must be sent within SIP dialog association. + * This invokes the Non-invite state machine. + * @pre State() == EActive. + * @pre aElements.FromHeader() != 0 + * @param aElements contains local and remote addresses, + * optional SIP message headers and body. + * The ownership is transferred. + * @return SIP client transaction, ownership is transferred + * @leave KErrArgument if aElements == 0 or if From-header is not + * present in aElements + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendRequestL(CSIPRequestElements* aElements); + + /** + * Creates SIP request and sends it to the given destination. + * The function must not be used with SIP requests that creates SIP + * dialog associations or must be sent within SIP dialog association. + * This invokes the Non-invite state machine. + * @pre State() == EActive. + * @pre aElements.FromHeader() != 0 + * @param aElements contains local and remote addresses, + * optional SIP message headers and body. + * The ownership is transferred. + * @param aRefresh indicates that transaction will be refreshed + * @return SIP client transaction, ownership is transferred + * @leave KErrArgument if aElements == 0 or if From-header is not + * present in aElements + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendRequestL(CSIPRequestElements* aElements, + CSIPRefresh& aRefresh); + + /** + * Creates SIP REGISTER request and sends it to the given destination. + * User must no define any Contact or Expires-headers + * in the provided elements. + * @pre State() == EActive + * @pre aElements != 0 + * @pre aElements->Method().DesC().Length()==0 + * @param aElements contains local and remote addresses, optional SIP + * message headers and body. User must not set any expires values + * to aElements. The ownership is transferred. + * @return SIP REGISTER client transaction, ownership is transferred + * @leave KErrArgument if aElements == 0 or if the request method has + * been defined in aElements + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + FetchRegistrationsL(CSIPRequestElements* aElements); + + /** + * Gets Iap-id used for this connection + * @return Iap-id + */ + IMPORT_C TUint32 IapId() const; + + /** + * Gets SIP server handle + * @return handle to SIP server, or 0-pointer if SIP server does not + * exist any more + */ + IMPORT_C CSIP* SIP(); + + /** + * Gets SIP server handle + * @return handle to SIP server, or 0-pointer if SIP server does not + * exist any more + */ + IMPORT_C const CSIP* SIP() const; + + /** + * Sets a RSocket option used for all the sockets used for sending + * SIP requests and responses in this CSIPConnection. + * @pre State() == EActive + * @param aOptionName An integer constant which identifies an option. + * @param aOptionLevel An integer constant which identifies + * level of an option. + * @param aOption Option value packaged in a descriptor. + * @leave A system-wide error code + * @capability NetworkControl + * @capability NetworkServices + * @capability Location + * @capability ReadDeviceData + * @capability WriteDeviceData + */ + IMPORT_C void SetOptL(TUint aOptionName, + TUint aOptionLevel, + const TDesC8& aOption=KNullDesC8); + + /** + * Sets a RSocket option used for all the sockets used for sending + * SIP requests and responses in this CSIPConnection. + * @pre State() == EActive + * @param aOptionName An integer constant which identifies an option. + * @param aOptionLevel An integer constant which identifies + * level of an option. + * @param aOption Option value as an integer. + * @leave A system-wide error codes + * @capability NetworkControl + * @capability NetworkServices + * @capability Location + * @capability ReadDeviceData + * @capability WriteDeviceData + */ + IMPORT_C void SetOptL(TUint aOptionName, + TUint aOptionLevel, + TInt aOption); + + /** + * Gets the local IP address of this CSIPConnection + * that is used by the SIP implementation. + * The user should re-new the call whenever the connection state changes + * to the CSIPConnection::EActive in order to verify the correctness of + * the previously retrieved local IP address. The local IP address might + * be different as a result of the connection state change. + * @pre State() == CSIPConnection::EActive + * @param aAddr on return filled with local IP address + * @leave a system-wide error code + */ + IMPORT_C void GetLocalAddrL(TInetAddr& aAddr) const; + + /** + * Refreshes the connection. + * This will retrieve the Bearer Monitor Instance if any, is available for this CSIPConnection and issue a Connection Refresh Request to it. + * The state of the Connection can be retrieved from State() to check if there is any change after Refreshing the connection. + * @capability NetworkServices. + */ + + IMPORT_C void RefreshConnection() const; + + public: // New functions, for internal use + + /** + * Returns the implementation instance. + * + * @return CSIPConnectionImplementation + */ + CSIPConnectionImplementation& Implementation(); + + private: // Constructors + + CSIPConnection(); + + void ConstructL(CSIP& aSIP, + TUint32 aIapId, + MSIPConnectionObserver& aObserver); + + private: // Data + + CSIPConnectionImplementation* iImplementation; + + private: // For testing purposes + + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPConnection_Test) + UNIT_TEST(CSIPSubscribeDialogAssoc_Test) + UNIT_TEST(CSIPInviteDialogAssoc_Test) + UNIT_TEST(CSIPReferDialogAssoc_Test) + UNIT_TEST(CSIPNotifyDialogAssoc_Test) + UNIT_TEST(CSIPDialogTrying_Test) + UNIT_TEST(CSIPRegistrationBinding_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipconnectionobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipconnectionobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,231 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipconnectionobserver.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef MSIPCONNECTIONOBSERVER_H +#define MSIPCONNECTIONOBSERVER_H + +// INCLUDES +#include "sipconnection.h" + +// FORWARD DECLARATIONS +class CSIPDialogAssocBase; +class CSIPInviteDialogAssoc; +class CSIPRegistrationBinding; +class CSIPDialog; +class CSIPTransactionBase; +class CSIPServerTransaction; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* An interface to be implemented by users of CSIPConnection. +* Interface allows to be able to receive requests, responses, connection state +* notifications and error notifications from sip stack. +* +* Note: The client must not delete related CSIPConnection object +* during the execution of the interface function. +* +* @lib n/a +*/ + +class MSIPConnectionObserver + { + public: + /** + * A SIP request outside a dialog has been received from the network. + * + * @pre aTransaction != 0 + * @param aTransaction SIP server transaction. The ownership is + * transferred. + */ + virtual void IncomingRequest (CSIPServerTransaction* + aTransaction) = 0; + + /** + * A SIP request within a dialog has been received from the network. + * The client must resolve the actual dialog association to which + * this request belongs. + * + * @pre aTransaction != 0 + * @param aTransaction SIP server transaction. The ownership is + * transferred. + * @param aDialog the dialog that this transaction belongs to. + */ + virtual void IncomingRequest (CSIPServerTransaction* aTransaction, + CSIPDialog& aDialog) = 0; + + /** + * A SIP response received from the network. + * + * @param aTransaction contains response elements. + */ + virtual void IncomingResponse (CSIPClientTransaction& + aTransaction) = 0; + + /** + * A SIP response received from the network that is within a dialog + * association or creates a dialog association. + * + * @param aTransaction contains response elements. + * @param aDialogAssoc a dialog association. + */ + virtual void IncomingResponse ( + CSIPClientTransaction& aTransaction, + CSIPDialogAssocBase& aDialogAssoc) = 0; + + /** + * Multiple SIP responses have been received to the single INVITE due + * to the forking proxy. Note that each response creates a separate + * INVITE dialog association. + * Multiple responses can arrive until SIP stack completes UAC core + * INVITE transaction. + * If clients deletes INVITE transaction after first SIP response + * other possible responses will be consumed by the implementation. + * + * @param aTransaction contains response elements + * @param aDialogAssoc INVITE dialog association; the ownership is + * transferred + */ + virtual void IncomingResponse ( + CSIPClientTransaction& aTransaction, + CSIPInviteDialogAssoc* aDialogAssoc) = 0; + + /** + * A SIP response related a registration binding or an error response + * that is related to registration binding has been received + * from the network. + * + * @param aTransaction contains response elements + * @param aRegistration registration binding this transaction belongs to + */ + virtual void + IncomingResponse (CSIPClientTransaction& aTransaction, + CSIPRegistrationBinding& aRegistration) = 0; + + /** + * An asynchronous error has occurred in the stack related to the + * request indicated by the given transaction. + * + * @param aError system wide or SIP error code + * @param aTransaction failed transaction + * @param aSIPConnection a SIP connection + */ + virtual void ErrorOccured (TInt aError, + CSIPTransactionBase& aTransaction) = 0; + + /** + * An asynchronous error has occurred in the stack related + * to the request indicated by the given transaction. + * + * @param aError system wide or SIP error code + * @param aTransaction the failed transaction + * @param aRegistration the failed registration binding + */ + virtual void ErrorOccured (TInt aError, + CSIPClientTransaction& aTransaction, + CSIPRegistrationBinding& aRegistration) = 0; + + /** + * An asynchronous error has occured related to a request within + * an existing dialog. + * + * @param aError system wide or SIP error code + * @param aTransaction the failed transaction. + * @param aDialogAssoc the failed dialog associoation. + */ + virtual void ErrorOccured ( + TInt aError, + CSIPTransactionBase& aTransaction, + CSIPDialogAssocBase& aDialogAssoc) = 0; + + /** + * An asynchronous error has occured related to a refresh + * + * @param aError system wide or SIP error code + * @param aSIPRefresh original refresh object. + */ + virtual void ErrorOccured (TInt aError, CSIPRefresh& aSIPRefresh) = 0; + + /** + * An asynchronous error has occured related to a periodical refresh + * that relates to a registration. + * + * @param aError system wide or SIP error code; + * KErrCouldNotConnect if the refresh has failed + * due to the suspended connection. + * @param aRegistration associated registration binding + */ + virtual void ErrorOccured (TInt aError, + CSIPRegistrationBinding& aRegistration) = 0; + + /** + * An asynchronous error has occured related to a periodical refresh + * that belongs to SIP dialog association. + * + * @param aError system wide or SIP error code; + * KErrCouldNotConnect if the refresh has failed + * due to the suspended connection. + * @param aDialogAssoc SIP dialog association. + */ + virtual void ErrorOccured (TInt aError, + CSIPDialogAssocBase& aDialogAssoc) = 0; + + /** + * SIP stack has completed UAC core INVITE transaction 64*T1 seconds + * after the reception of the first 2xx response. No more 2xx responses + * can be received to the issued single INVITE. + * + * If the INVITE transaction does not create a dialog, or the INVITE + * transaction encounters an error, this event will not be sent. + * + * @param aTransaction a complete UAC core INVITE transaction + */ + virtual void InviteCompleted (CSIPClientTransaction& aTransaction) = 0; + + /** + * Invite was canceled with the CANCEL + * @param aTransaction a canceled INVITE UAS transaction + */ + virtual void InviteCanceled (CSIPServerTransaction& aTransaction) = 0; + + /** + * Connection state has changed. + * If connection state has changed to EInactive or EUnavailable, + * SIP stack has removed all stand-alone SIP refreshes, registrations + * and dialog associations that client requested to refresh. Client may + * re-issue refresh requests (stand-alone, registration or dialog + * association related) when connection becomes EActive again. + * SIP stack also terminates all pending SIP client transactions and no + * errors are reported back to the client about the terminated + * transactions nor about removed refreshes in order to avoid event + * flood. + * + * @param aState indicates the current connection state + */ + virtual void ConnectionStateChanged (CSIPConnection::TState aState) = 0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipconnpref.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipconnpref.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,73 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIP extension events definition +// +// + + + +/** + @file + @publishedAll + @released since v9.2 +*/ + + +#ifndef SIPCONNPREFS_H +#define SIPCONNPREFS_H + +#include +#include + +/** The numeric value of SIP protocol family ID .*/ +const TUint KAFSip = 0x10000; + + +struct SSipConnPref +/** +This contains the information about the Id of the profile +@publishedAll +@released since v9.2 +*/ + { + /** The numeric value of SIP Profile ID **/ + TUint32 iProfileId; + }; + + +class TSipConnPref : public TConnPref +/** +This contains the information about the type of the connection preferences used by the SIP in the form of the profiles +@publishedAll +@released since v9.2 +*/ + { +public: + /** Constructor. */ + TSipConnPref(); + /** Sets the profile ID same as the prameter **/ + inline void SetProfileId(TUint32 aProfileId); + /** Gets the default profile ID **/ + inline TUint32 GetProfileId() const; + /** cast to appropriate SIP connection provider type **/ + inline static TSipConnPref& TSipConnPref::Cast(const TConnPref& aPref); + +protected: + inline SSipConnPref* PrefPtr() const; + + }; + +#include + +#endif // sipconnpref.h diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipconnpref.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipconnpref.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,51 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIP extension events definition +// +// + + + +/** + @file + @publishedAll +*/ + + +inline TSipConnPref::TSipConnPref() + : TConnPref(TConnPref::EConnPrefSip) + { + SetProfileId(0); + } + +inline void TSipConnPref::SetProfileId(TUint32 aProfileId) + { + PrefPtr()->iProfileId = aProfileId; + } + +inline TUint32 TSipConnPref::GetProfileId() const + { + return PrefPtr()->iProfileId; + } + +inline TSipConnPref& TSipConnPref::Cast(const TConnPref& aPref) + { + return (TSipConnPref&)aPref; + } + +inline SSipConnPref* TSipConnPref::PrefPtr() const + { + return (SSipConnPref*)UserPtr(); + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcontactheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcontactheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,233 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcontactheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPCONTACTHEADER_H +#define CSIPCONTACTHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPContactHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "Contact" +* header fields. +* +* @lib sipcodec.lib +*/ +class CSIPContactHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPContactHeader from textual representation + * of the header's value part. + * Note that "Contact: *" can be only created using this function. + * @param aValue a value part of a "Contact"-header + * @return an array containing 1..n instances of CSIPContactHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPContactHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred + * @return a new instance of CSIPContactHeader + */ + IMPORT_C static CSIPContactHeader* NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPContactHeader and puts it to CleanupStack + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred + * @return a new instance of CSIPContactHeader + */ + IMPORT_C static CSIPContactHeader* NewLC(CSIPAddress* aSIPAddress); + + /** + * Destructor, deletes the resources of CSIPContactHeader. + */ + IMPORT_C ~CSIPContactHeader(); + + + public: // New functions + + /** + * Compares this object to another instance of CSIPContactHeader + * @param aHeader a CSIPContactHeader header to compare to + * @return ETrue if the objects are equal otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPContactHeader& aHeader) const; + + /** + * Checks if the address is set to a STAR ("*") + * @return ETrue, if the address is a "*" otherwise EFalse + */ + IMPORT_C TBool Star() const; + + /** + * Gets the value of the "expires"-parameter + * @return the "expires"-parameter, or + * KErrNotFound if the parameter is not present. + */ + IMPORT_C TInt ExpiresParameter() const; + + /** + * Sets the "expires"-parameter + * @pre aExpiresParam >= 0 + * @param aExpiresParam a "expires"-parameter value to set + */ + IMPORT_C void SetExpiresParameterL(TInt aExpiresParam); + + /** + * Gets the value of "q"-parameter + * @pre Star() == EFalse + * @return the "q"-parameter value, + * or zero if the parameter is not present. + */ + IMPORT_C TReal QParameter() const; + + /** + * Sets the "q"-parameter value in the "Contact" header + * @pre Star() == EFalse + * @param aQValue a "q"-parameter value to set + */ + IMPORT_C void SetQParameterL(TReal aQValue); + + /** + * Gets the name-address as const + * @return name-address or 0 if not present + * The ownership is NOT transferred. + */ + IMPORT_C const CSIPAddress* SIPAddress() const; + + /** + * Gets the name-address + * @return name-address or 0 if not present + * The ownership is NOT transferred. + */ + IMPORT_C CSIPAddress* SIPAddress(); + + /** + * Sets the name-address + * @pre Star() == EFalse + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address to set, the ownership is transferred + */ + IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); + + /** + * Constructs an instance of a CSIPContactHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPContactHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + TBool ParamInsertionAllowed() const; + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPContactHeader(TBool aIsStar=EFalse); + void ConstructL(); + void ConstructL(CSIPAddress* aSIPAddress); + void ConstructL(const CSIPContactHeader& aContactHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + CSIPAddress* iSIPAddress; + CSIPContactHeaderParams* iParams; + TBool iIsStar; + + private: // For testing purposes + + UNIT_TEST(CSIPContactHeaderTest) + }; + +#endif // CSIPCONTACTHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcontentdispositionheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcontentdispositionheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,165 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcontentdispositionheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPCONTENTDISPOSITIONHEADER_H +#define CSIPCONTENTDISPOSITIONHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPHeaderGenericParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in +* SIP "Content-Disposition" header. +* +* @lib sipcodec.lib +*/ +class CSIPContentDispositionHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPContentDispositionHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Content-Disposition"-header + * @return a new instance of CSIPContentDispositionHeader + */ + IMPORT_C static CSIPContentDispositionHeader* + DecodeL (const TDesC8& aValue); + + /** + * Creates a new instance of CSIPContentDispositionHeader + * @param aDispType a Disp-Type value + * @return a new instance of CSIPContentDispositionHeader + */ + IMPORT_C static CSIPContentDispositionHeader* + NewL(const TDesC8& aDispType); + + /** + * Creates a new instance of CSIPContentDispositionHeader + * and puts it to CleanupStack + * @param aDispType a Disp-Type value + * @return a new instance of CSIPContentDispositionHeader + */ + IMPORT_C static CSIPContentDispositionHeader* + NewLC(const TDesC8& aDispType); + + /** + * Destructor. deletes the resources of CSIPContentDispositionHeader. + */ + IMPORT_C ~CSIPContentDispositionHeader(); + + + public: // New functions + + /** + * Gets the disp-type parameter from the "Content-Disposition" header + * @return the disp-type parameter + */ + IMPORT_C const TDesC8& DispType() const; + + /** + * Sets the disp-type parameter in the "Content-Disposition" header; + * @param aTag a disp-type parameter to set + */ + IMPORT_C void SetDispTypeL(const TDesC8& aDispType); + + /** + * Constructs an instance of a CSIPContentDispositionHeader + * from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPContentDispositionHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPContentDispositionHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aDispType); + void ConstructL(const TDesC8& aDispType, const TDesC8& aHandlingParam); + void ConstructL(const CSIPContentDispositionHeader& aHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + HBufC8* iDispType; + CSIPHeaderGenericParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPContentDispositionHeaderTest) + }; + +#endif // CSIPCONTENTDISPOSITIONHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcontentencodingheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcontentencodingheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcontentencodingheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPCONTENTENCODINGHEADER_H +#define CSIPCONTENTENCODINGHEADER_H + +// INCLUDES +#include "siptokenheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters +* in SIP "Content-Encoding" header. +* +* @lib sipcodec.lib +*/ +class CSIPContentEncodingHeader : public CSIPTokenHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPContentEncodingHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Content-Encoding"-header + * @return an array containing 1..n instances of + * CSIPContentEncodingHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPContentEncodingHeader + * @param aValue a content-coding value + * @return a new instance of CSIPContentEncodingHeader + */ + IMPORT_C static CSIPContentEncodingHeader* NewL(RStringF aValue); + + /** + * Creates a new instance of CSIPContentEncodingHeader + * and puts it to CleanupStack + * @param aValue a content-coding value + * @return a new instance of CSIPContentEncodingHeader + */ + IMPORT_C static CSIPContentEncodingHeader* NewLC(RStringF aValue); + + /** + * Destructor, deletes the resources of CSIPContentEncodingHeader. + */ + IMPORT_C ~CSIPContentEncodingHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPContentEncodingHeader + * from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPContentEncodingHeader + */ + + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPContentEncodingHeader(); + CSIPContentEncodingHeader(const CSIPContentEncodingHeader& aHeader); + }; + +#endif // CSIPCONTENTENCODINGHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcontenttypeheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcontenttypeheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,187 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcontenttypeheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPCONTENTTYPEHEADER_H +#define CSIPCONTENTTYPEHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPContentTypeHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting media types and +* parameters in SIP "Content-Type" header. +* +* @lib sipcodec.lib +*/ +class CSIPContentTypeHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPContentTypeHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Content-Type"-header + * @return a new instance of CSIPContentTypeHeader + */ + IMPORT_C static CSIPContentTypeHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPContentTypeHeader + * @param aMediaType a media type to set. For example "application" + * @param aMediaSubtype a media subtype to set. For example "sdp" + * @return a new instance of CSIPContentTypeHeader + */ + IMPORT_C static CSIPContentTypeHeader* + NewL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); + + /** + * Creates a new instance of CSIPContentTypeHeader + * and puts it onto the cleanup stack + * @param aMediaType a media type to set. For example "application" + * @param aMediaSubtype a media subtype to set. For example "sdp" + * @return a new instance of CSIPContentTypeHeader + */ + IMPORT_C static CSIPContentTypeHeader* + NewLC(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); + + /** + * Destructor, deletes the resources of CSIPContentTypeHeader. + */ + IMPORT_C ~CSIPContentTypeHeader(); + + public: // New functions + + /** + * Gets the media type from the "Content-Type" header + * @return a media type + */ + IMPORT_C const TDesC8& MediaType() const; + + /** + * Sets the media type in the "Content-Type" header + * @param aMediaType a media type + */ + IMPORT_C void SetMediaTypeL(const TDesC8& aMediaType); + + /** + * Gets the media subtype from the "Content-Type" header + * @return a media subtype + */ + IMPORT_C const TDesC8& MediaSubtype() const; + + /** + * Sets the media subtype in the "Content-Type" header + * @param aMediaSubtype a media subtype + */ + IMPORT_C void SetMediaSubtypeL(const TDesC8& aMediaSubtype); + + /** + * Constructs an instance of a CSIPContentTypeHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return an instance of a CSIPContentTypeHeader + */ + + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPContentTypeHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); + void ConstructL(const CSIPContentTypeHeader& aContentTypeHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + HBufC8* iMediaType; + HBufC8* iMediaSubtype; + CSIPContentTypeHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPContentTypeHeaderTest) + }; + +#endif // CSIPCONTENTTYPEHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipcseqheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipcseqheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,168 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcseqheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPCSEQHEADER_H +#define CSIPCSEQHEADER_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting sequence number and +* method in SIP "CSeq" header. +* +* @lib sipcodec.lib +*/ +class CSIPCSeqHeader : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPCSeqHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "CSeq"-header (e.g. "1 REGISTER") + * @return a new instance of CSIPCSeqHeader. + */ + IMPORT_C static CSIPCSeqHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPCSeqHeader + * @param aSeq a sequence number to set. + * @param aMethod a method to set. For example "REGISTER" + * @return a new instance of CSIPCSeqHeader + */ + IMPORT_C static CSIPCSeqHeader* NewL(TUint aSeq, RStringF aMethod); + + /** + * Creates a new instance of CSIPCSeqHeader and puts it to CleanupStack + * @param aSeq a sequence number to set. + * @param aMethod a method to set. For example "REGISTER" + * @return a new instance of CSIPCSeqHeader + */ + IMPORT_C static CSIPCSeqHeader* NewLC(TUint aSeq, RStringF aMethod); + + /** + * Destructor, deletes the resources of CSIPCSeqHeader. + */ + IMPORT_C ~CSIPCSeqHeader(); + + + public: // New functions + + /** + * Gets the sequence number from the "CSeq" header + * @return the current sequence number + */ + IMPORT_C TUint Seq() const; + + /** + * Sets the sequence number in the "CSeq" header + * @param aSeq a sequence number to set + */ + IMPORT_C void SetSeq(TUint aSeq); + + /** + * Gets the method from the "CSeq" header + * @return the method + */ + IMPORT_C RStringF Method() const; + + /** + * Sets the method in the "CSeq" header + * @param aMethod a method to set + */ + IMPORT_C void SetMethodL(RStringF aMethod); + + /** + * Constructs an instance of a CSIPCSeqHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPCSeqHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage () const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL (RWriteStream& aWriteStream) const; + + private: // Constructors + + CSIPCSeqHeader(); + void ConstructL(TUint aCSeq, RStringF aMethod); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + void ParseL(const TDesC8& aValue); + void SetMethodL(const TDesC8& aMethod); + + private: // Data + + TUint iSeq; + RStringF iMethod; + + private: // For testing purposes + + UNIT_TEST(CSIPCSeqHeaderTest) + }; + +#endif // CSIPCSEQHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipdefs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipdefs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipdefs.h +* Part of : SIP Client API +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef SIPDEFS_H +#define SIPDEFS_H + +// INCLUDES +#include + +/** +* @file +* @publishedAll +* @released +*/ + +// CONSTANTS +/** SIP minimum value for the expiration in seconds*/ +const TUint KSIPMinExpirationValue=60; + +#endif // SIPDEFS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipdialog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipdialog.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,252 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipdialog.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + + +#ifndef CSIPDIALOG_H +#define CSIPDIALOG_H + +// INCLUDES +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPConnection; +class CSIPConnectionImplementation; +class MSIPRegistrationContext; +class CSIPDialogAssocBase; +class CSIPFromHeader; +class CSIPToHeader; +class CSIPCallIDHeader; +class CUri8; +class CSIPDialogImplementation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP dialogs. +* It provides services querying dialog state, obtaining the dialog related +* SIP headers and getting all dialog associations. +* +* The user of the class cannot instantiate this class. +* @lib sipclient +*/ + +class CSIPDialog: public CBase + { + public: + /** Dialog states */ + enum TState + { + /** Initiliazed state */ + EInit, + /** Early state */ + EEarly, + /** Confirmed state */ + EConfirmed, + /** Terminated state */ + ETerminated + }; + + public: //New functions + /** + * Gets dialog state + * @return dialog state + */ + IMPORT_C CSIPDialog::TState State() const; + + /** + * Gets all dialog associations. + * @return All dialog associations. Ownership of the array or the items + * inside it, is not transferred. + */ + IMPORT_C const RPointerArray& + SIPDialogAssociations() const; + + /** + * Gets used registration context for this dialog + * @return associated registration or 0-pointer otherwise. + * Ownership is not transferred. + */ + IMPORT_C const MSIPRegistrationContext* RegistrationContext() const; + + /** + * Checks if the dialog association belongs to this dialog + * @param aDialogAssoc a dialog association + * @return ETrue if belongs, EFalse otherwise + */ + IMPORT_C TBool + IsAssociated(const CSIPDialogAssocBase& aDialogAssoc) const; + + /** + * Gets the SIP connection used for this dialog + * @return SIP connection used for the dialog, or 0-pointer if the + * connection has been deleted. Ownership isn't transferred. + */ + IMPORT_C CSIPConnection* Connection(); + + /** + * Gets the SIP connection used for this dialog. + * @return SIP connection used for the dialog, or 0-pointer if the + * connection has been deleted. Ownership isn't transferred. + */ + IMPORT_C const CSIPConnection* Connection() const; + + /** + * Gets originator's address + * @return originator's address (From-header) + */ + IMPORT_C const CSIPFromHeader& FromHeader() const; + + /** + * Gets recipient's address + * @return recipient's address (To-header) + */ + IMPORT_C const CSIPToHeader& ToHeader() const; + + /** + * Gets remote-uri used during dialog creation + * @return Remote target uri + */ + IMPORT_C const CUri8& RemoteURI() const; + + /** + * Gets Call-ID of SIP dialog + * @pre State()==CSIPDialog::EEarly || State()==CSIPDialog::EConfirmed + * @return Call-ID of SIP dialog + * @leave KErrSIPInvalidDialogState if dialog doesn't yet have a Call-ID + */ + IMPORT_C const CSIPCallIDHeader& CallIdL() const; + + /** + * Compares this object to another object + * @param aDialog CSIPDialog object to compare + * @returns ETrue if the objects are equal, otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPDialog& aDialog) const; + + /** + * Sets the dialog to state to CSIPDialog::EInit. + * The local dialog identifier data + * (Call-ID, CSeq and From-header's tag) will be reused. + * After calling this function, the dialog that was already terminated + * can be used for sending the dialog initiating request such as + * INVITE or SUBSCRIBE reusing the stored Call-ID and From-header's tag + * and the stored CSeq incremented by one. + * @pre State()==CSIPDialog::ETerminated + * @returns KErrNone if succesful and KErrNoMemory if the memory is low. + */ + IMPORT_C TInt ReuseInitialRequestData(); + + public: //Constructors and destructor, for internal use + /** + * Two-phased constructor. + * This constructor should be used if the user has received + * SIP request that creates a SIP dialog association. + * + * @param aConnImplementation Implementation of the used SIP connection + * @return New object, ownership is transferred. + */ + static CSIPDialog* + NewL(CSIPConnectionImplementation& aConnImplementation); + + /** + * Two-phased constructor + * This constructor should be used if the user has received + * SIP request that creates a SIP dialog association. + * + * @param aConnImplementation Implementation of the used SIP connection + * @return New object, ownership is transferred. + */ + static CSIPDialog* + NewLC(CSIPConnectionImplementation& aConnImplementation); + + /** + * Two-phased constructor + * This constructor should be used if the user has received + * SIP request that creates a SIP dialog association. + * + * @param aConnImplementation Implementation of the used SIP connection + * @param aContext Registration context whose outbound proxy and other + * parameters are to be used. + * @return New object, ownership is transferred. + */ + static CSIPDialog* + NewL(CSIPConnectionImplementation& aConnImplementation, + const MSIPRegistrationContext& aContext); + + /** + * Two-phased constructor + * This constructor should be used if the user has received + * SIP request that creates a SIP dialog association. + * + * @param aConnImplementation Implementation of the used SIP connection + * @param aContext Registration context whose outbound proxy and other + * parameters are to be used. + * @return New object, ownership is transferred. + */ + static CSIPDialog* + NewLC(CSIPConnectionImplementation& aConnImplementation, + const MSIPRegistrationContext& aContext); + + /** + * Destructor + */ + ~CSIPDialog(); + + public: // New functions, for internal use + + /** + * Returns the CSIPDialogImplementation. + * @return CSIPDialogImplementation + */ + CSIPDialogImplementation& Implementation(); + + private: // Constructors + + CSIPDialog(); + + void ConstructL(CSIPConnectionImplementation& aConnImplementation); + + void ConstructL(CSIPConnectionImplementation& aConnImplementation, + const MSIPRegistrationContext& aContext); + +private: // Data + + //Implementation instance, CSIPDialog doesn't own it + CSIPDialogImplementation* iImplementation; + +private: // For testing purposes + + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPInviteDialogAssoc_Test) + UNIT_TEST(CSIPSubscribeDialogAssoc_Test) + UNIT_TEST(CSIPReferDialogAssoc_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipdialogassocbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipdialogassocbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,164 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipdialogassocbase.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPDIALOGASSOCBASE_H +#define CSIPDIALOGASSOCBASE_H + +// INCLUDES +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPMessageElements; +class CSIPClientTransaction; +class CSIPDialog; +class CSIPRefresh; +class CSIPServerTransaction; +class CSIPDialogAssocImplementation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Base class for SIP dialog associations. It provides services for getting +* associated SIP dialog, actual dialog association type and for sending non +* target refresh requests within the dialog association. +* @lib sipclient +*/ +class CSIPDialogAssocBase : public CBase + { + public: // Destructor + + /** + * Destructor + * @internalComponent + */ + virtual ~CSIPDialogAssocBase(); + + public: // New functions + + /** + * Gets the dialog this dialog association belongs to + * @return associated dialog + */ + IMPORT_C const CSIPDialog& Dialog() const; + + /** + * Gets dialog this dialog association belongs to + * @return associated dialog + */ + IMPORT_C CSIPDialog& Dialog(); + + /** + * Creates SIP request and sends it to the remote target. + * This function should be used for sending SIP extension + * requests within dialog assocation that do not cause + * sip dialog associations to be created. In SIP terms + * this request is non target refresh request. + * @pre SIPDialog().State() != CSIPDialog::EInit && + * SIPDialog().State() != CSIPDialog::ETerminated + * @pre Dialog().Connection().State() == EActive + * @pre aMethod != "REGISTER" |"INVITE" | "BYE" | "CANCEL" | "ACK" | + * "SUBSCRIBE" | "NOTIFY" | "UPDATE" | "PRACK" | "REFER" + * @param aElements contains optional SIP message headers and body. + * Ownership is transferred. + * @return SIP extension client transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState If dialog's state is not correct + * @leave KErrArgument if invalid value has been set to aMethod + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C virtual CSIPClientTransaction* + SendNonTargetRefreshRequestL(RStringF aMethod, + CSIPMessageElements* aElements); + + /** + * Gets dialog association type. + * + * @return dialog association type e.g. "INVITE", "SUBSCRIBE" etc... + */ + IMPORT_C RStringF Type() const; + + /** + * Tests if the request is a non target refresh request + * @param aMethod a method to test + * @return ETrue if is non target refresh request; EFalse otherwise + */ + IMPORT_C TBool IsNonTargetRefreshRequest(RStringF aMethod) const; + + public: // New functions, for internal use + + /** + * Returns the implementation instance. + * @return CSIPDialogAssocImplementation + */ + CSIPDialogAssocImplementation& Implementation(); + + /** + * Searches for a refresh with the matching id. Default implementation + * returns NULL. Those classes derived from CSIPDialogAssocBase, which + * can contain refreshes must implement this function for searching the + * correct refresh. + * + * @return CSIPRefresh if found, NULL otherwise. + * The ownership is not transferred. + * @internalComponent + */ + virtual CSIPRefresh* FindRefresh(TUint32 aRefreshId); + + /** + * @internalComponent + */ + virtual void DeletingRefresh(CSIPRefresh& aRefresh, TUint32 aRefreshId); + + protected: // Constructors, for internal use + + /* + * Constructor + */ + CSIPDialogAssocBase(); + + void ConstructL(RStringF aType, CSIPDialog& aDialog); + void ConstructL(RStringF aType, + CSIPDialog& aDialog, + CSIPServerTransaction& aTransaction); + + protected: // Data + + /** + * Implementation instance, CSIPDialogAssocBase owns it + * @internalComponent + */ + CSIPDialogAssocImplementation* iImplementation; + + private: // For testing purposes + + UNIT_TEST(CSIPInviteDialogAssoc_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siperr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siperr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siperr.h +* Part of : SIP Client API +* Interface : SDK, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef SIPERR_H +#define SIPERR_H + +#include + +/** @file +* @publishedAll +* @released +*/ + +/** SIP message was malformed */ +const TInt KErrSIPMalformedMessage = -17700; + +/** Invalid SIP response received from registrar*/ +const TInt KErrSIPInvalidRegistrarResponse = -17701; + +/** SIP Request pending */ +const TInt KErrSIPRequestPending = -17702; + +/** The action cannot be performed in the current transaction state */ +const TInt KErrSIPInvalidTransactionState = -17703; + +/** Not allowed in dialogs current state */ +const TInt KErrSIPInvalidDialogState = -17704; + +/** Invalid request in SIP dialog */ +const TInt KErrSIPInvalidDialogRequest = -17705; + +/** Invalid response in SIP dialog */ +const TInt KErrSIPInvalidDialogResponse = -17706; + +/** Sending a SIP message failed. For example ICMP error occured */ +const TInt KErrSIPTransportFailure = -17707; + +/** No ACK was received after sending a 2xx response */ +const TInt KErrSIPNoAckReceived = -17708; + +/** Not allowed in registration's current state */ +const TInt KErrSIPInvalidRegistrationState = -17709; + +/** The contact given did not contain user part */ +const TInt KErrSIPInvalidContact = -17710; + +/** Object can't access a resource, since that has been deleted by user. +The user is expected to delete this object as it can no longer be used. */ +const TInt KErrSIPResourceNotAvailable = -17711; + +/** DNS query for the remote address failed */ +const TInt KErrSIPResolvingFailure = -17712; + +/** Authentication with a server failed */ +const TInt KErrSIPForbidden = -17713; + +/** Maximum number of allowed SigComp compartments exceeded */ +const TInt KErrSIPMaxCompartmentsInUse = -17714; + +/** Refresh initiated client transaction was terminated with +a 3xx, 4xx, 5xx or 6xx response.*/ +const TInt KErrSIPTerminatedWithResponse = -17715; + +/** Provided SIP outbound proxy is not responding*/ +const TInt KErrSIPOutboundProxyNotResponding = -17716; + +/** The URI type is not allowed in some field of the particular SIP message. +Note that this does not mean that the URI type is forbidden in general. +For example Contact-header of an INVITE must always contain a SIP-URI. +Any other types are rejected with this error code. */ +const TInt KErrSIPInvalidURIType = -17717; + +/** ICMP error has occured */ +const TInt KErrSIPICMPFailure = -17718; + +#endif //SIPERR_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipeventheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipeventheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,195 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipeventheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPEVENTHEADER_H +#define CSIPEVENTHEADER_H + +// INCLUDES +#include +#include +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPEventHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in +* SIP "Event" header. +* +* @lib sipcodec.lib +*/ +class CSIPEventHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPEventHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Event"-header + * @return a new instance of CSIPEventHeader + */ + IMPORT_C static CSIPEventHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPEventHeader + * @param aEventPackage a Event-Package value + * @return a new instance of CSIPEventHeader + */ + IMPORT_C static CSIPEventHeader* NewL(const TDesC8& aEventPackage); + + /** + * Creates a new instance of CSIPEventHeader and puts it to CleanupStack + * @param aEventPackage a Event-Package value + * @return a new instance of CSIPEventHeader + */ + + IMPORT_C static CSIPEventHeader* NewLC(const TDesC8& aEventPackage); + + /** + * Destructor, deletes the resources of CSIPEventHeader. + */ + IMPORT_C ~CSIPEventHeader(); + + + public: // New functions + + /** + * Compares this instance to another CSIPEventHeader instance + * @param aHeader a header to compare to + * @return ETrue if the objects are equal otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPEventHeader& aHeader) const; + + /** + * Gets the Event-Package parameter from the "Event" header + * @return the Event-Package parameter + */ + IMPORT_C const TDesC8& EventPackage() const; + + /** + * Sets the Event-Package parameter in the "Event" header; + * @param aEventPackage a Event-Package parameter to set + */ + IMPORT_C void SetEventPackageL(const TDesC8& aEventPackage); + + /** + * Sets the event templates overwriting all the existing ones. + * @param aEventTemplates an array of event templates + */ + IMPORT_C void SetEventTemplatesL(const MDesC8Array& aEventTemplates); + + /** + * Gets the event templates. + * @return a reference to the currently set event templates. + */ + IMPORT_C const MDesC8Array& EventTemplates() const; + + /** + * Constructs an instance of a CSIPEventHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPEventHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPEventHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aEventPackage); + void ConstructL(const CSIPEventHeader& aSIPEventHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + void CheckTemplateL(const TDesC8& aParam) const; + // Needed for cleanup of a RPointerArray: + static void ResetAndDestroy(TAny* anArray); + + private: // Data + + HBufC8* iEventPackage; + CSIPEventHeaderParams* iParams; + CDesC8ArraySeg* iEventTemplates; + + private: // For testing purposes + + UNIT_TEST(CSIPEventHeaderTest) + }; + +#endif // CSIPEVENTHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipexpiresheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipexpiresheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipexpiresheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPEXPIRESHEADER_H +#define CSIPEXPIRESHEADER_H + +// INCLUDES +#include "sipunsignedintheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class encapsulates a "Expires" header value. +* +* @lib sipcodec.lib +*/ +class CSIPExpiresHeader : public CSIPUnsignedIntHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPExpiresHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Expires"-header (e.g. "3600") + * @return a new instance of CSIPExpiresHeader + */ + IMPORT_C static CSIPExpiresHeader* DecodeL(const TDesC8& aValue); + + /** + * Constructor + * @param aValue the value to set + */ + IMPORT_C CSIPExpiresHeader(TUint aValue); + + /** + * Destructor, deletes the resources of CSIPExpiresHeader. + */ + IMPORT_C ~CSIPExpiresHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPExpiresHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return an instance of a CSIPExpiresHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // For testing purposes + + UNIT_TEST(CSIPExpiresHeaderTest) + }; + +#endif // CSIPEXPIRESHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipextensionheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipextensionheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,186 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipextensionheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPEXTENSIONHEADER_H +#define CSIPEXTENSIONHEADER_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* The class stores unknown and extension headers that are either not +* supported by the current SIP codec implementation or not specified in +* current SIP RFC or both. +* +* @lib sipcodec.lib +*/ +class CSIPExtensionHeader : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Creates a new instance of CSIPExtensionHeader + * @param aName the full or compact name of the header + * @param aValue the value of the header + * @return a new instance of CSIPExtensionHeader + */ + IMPORT_C static CSIPExtensionHeader* + NewL(const TDesC8& aName, const TDesC8& aValue); + + /** + * Creates a new instance of CSIPExtensionHeader + * and puts it to CleanupStack + * @param aName the full or compact name of the header + * @param aValue the value of the header + * @return a new instance of CSIPExtensionHeader + */ + IMPORT_C static CSIPExtensionHeader* + NewLC(const TDesC8& aName, const TDesC8& aValue); + + /** + * Destructor, deletes the resources of CSIPExtensionHeader. + */ + IMPORT_C ~CSIPExtensionHeader(); + + + public: // New functions + + /** + * Sets the header value + * @param aValue the header value to be set + */ + IMPORT_C void SetValueL(const TDesC8& aValue); + + /** + * Gets the header value + * @return the header value + */ + IMPORT_C const TDesC8& Value() const; + + /** + * Constructs an instance of a CSIPExtensionHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return an instance of a CSIPExtensionHeader + */ + + IMPORT_C static CSIPExtensionHeader* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + /** + * From CSIPHeaderBase ExternalizeSupported + */ + IMPORT_C TBool ExternalizeSupported() const; + + + public: // New functions, for internal use + + void SetNameL(const TDesC8& aName); + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool IsExtensionHeader() const; + + /** + * @internalComponent + */ + TBool EncodeMultipleToOneLine() const; + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // Constructors + + CSIPExtensionHeader(); + void ConstructL(const TDesC8& aName, const TDesC8& aValue); + void ConstructL(const CSIPExtensionHeader& aExtensionHeader); + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // New functions + + TBool CheckValue (const TDesC8& aValue); + + private: // Data + + // data + RStringF iName; + HBufC8* iValue; + + private: // For testing purposes + + UNIT_TEST(CSIPExtensionHeaderTest) + UNIT_TEST(CSIPHeaderLookupTest) + }; + +#endif // CSIPEXTENSIONHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipfromheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipfromheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,139 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipfromheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPFROMHEADER_H +#define CSIPFROMHEADER_H + +// INCLUDES +#include "sipfromtoheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "From" header. +* +* @lib sipcodec.lib +*/ +class CSIPFromHeader : public CSIPFromToHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPFromHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "From"-header (e.g. "...") + * @return a new instance of CSIPFromHeader + */ + IMPORT_C static CSIPFromHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPFromHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred. + * @return a new instance of CSIPFromHeader + */ + IMPORT_C static CSIPFromHeader* NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPFromHeader and puts it to CleanupStack + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred, + * @return a new instance of CSIPFromHeader + */ + IMPORT_C static CSIPFromHeader* NewLC(CSIPAddress* aSIPAddress); + + /** + * Creates a deep-copy of a CSIPFromToHeaderBase + * Note that this function can be used for creating a From-header + * using an existing To-header. + * @param aHeader CSIPFromToHeaderBase to be copied + * @return a new instance of CSIPFromHeader + */ + IMPORT_C static CSIPFromHeader* + NewL(const CSIPFromToHeaderBase& aHeader); + + /** + * Creates a deep-copy of a CSIPFromToHeaderBase and + * puts it to CleanupStack + * Note that this function can be used for creating a From-header + * using an existing To-header. + * @param aHeader CSIPFromToHeaderBase to be copied + * @return a new instance of CSIPFromHeader + */ + IMPORT_C static CSIPFromHeader* + NewLC(const CSIPFromToHeaderBase& aHeader); + + /** + * Destructor, deletes the resources of CSIPFromHeader. + */ + IMPORT_C ~CSIPFromHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPFromHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPFromHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + RStringF CompactName() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPFromHeader(); + }; + +#endif // CSIPFROMHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipfromtoheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipfromtoheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,135 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipfromtoheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPFROMTOHEADERBASE_H +#define CSIPFROMTOHEADERBASE_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPFromToHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP "From" +* and "To" header. +* +* This is an abstract class and cannot be instantiated. +* +* @lib sipcodec.lib +*/ +class CSIPFromToHeaderBase : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPFromToHeaderBase. + */ + IMPORT_C virtual ~CSIPFromToHeaderBase(); + + + public: // New functions + + /** + * Compares this instance to another "From" or "To" header object + * @param aHeader a header to compare to + * @return ETrue, if the objects are equal otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPFromToHeaderBase& aHeader) const; + + /** + * Sets the name-address + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address to set, the ownership is transferred + */ + IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); + + /** + * Gets the name-address as const + * @return name-address object + */ + IMPORT_C const CSIPAddress& SIPAddress() const; + + /** + * Gets the name-address + * @return name-address object + */ + IMPORT_C CSIPAddress& SIPAddress(); + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + protected: // Constructors + + CSIPFromToHeaderBase(); + void ConstructL(); + void ConstructL(CSIPAddress* aSIPAddress); + void ConstructL(CSIPAddress* aSIPAddress, const TDesC8& aTag); + void ConstructL(const CSIPFromToHeaderBase& aSIPFromToHeaderBase); + + protected: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Data + + CSIPAddress* iSIPAddress; + CSIPFromToHeaderParams* iParams; + +private: // For testing purposes + + UNIT_TEST(CSIPFromToHeaderTest) + }; + + +#endif // CSIPFROMTOHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,193 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPHEADERBASE_H +#define CSIPHEADERBASE_H + +// INCLUDES +#include +#include +#include +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides a generic interface for all the SIP headers. +* +* @lib sipcodec.lib +*/ +class CSIPHeaderBase : public CBase + { + public: // Constructors and destructors + + /** + * Destructor, deletes the resources of CSIPHeaderBase. + */ + IMPORT_C virtual ~CSIPHeaderBase(); + + + public: // New functions + + /** + * Creates a deep-copy of this CSIPHeaderBase object. + * The function has to be implemented in each of the sub-classes. + * @return the deep-copied object, the ownership is transferred. + */ + IMPORT_C virtual CSIPHeaderBase* CloneL() const = 0; + + /** + * Gets the full name of the header + * The function is implemented in each of the sub-classes. + * @return the full name of the header for example "From" + */ + IMPORT_C virtual RStringF Name() const = 0; + + /** + * Encodes the header (name and value) into its textual representation. + * @return a textual representation of the complete header, + * the ownership is transferred + */ + IMPORT_C HBufC8* ToTextL() const; + + /** + * Encodes the header (name and value) into its textual representation + * and pushes it to the CleanupStack. + * @return a textual representation of the complete header, + * the ownership is transferred + */ + IMPORT_C HBufC8* ToTextLC() const; + + /** + * Encodes the header's value into its textual representation. + * @return a textual representation of the header's value, + * the ownership is transferred + */ + IMPORT_C virtual HBufC8* ToTextValueL() const = 0; + + /** + * Encodes the header's value into its textual representation + * and pushes it to the CleanupStack. + * @return a textual representation of the header's value, + * the ownership is transferred + */ + IMPORT_C HBufC8* ToTextValueLC() const; + + /** + * Writes the object to a RWriteStream + * @param aWriteStream a stream where the object is to be externalized + * @param aAddName if ETrue the name of the header is + * also written to the stream + */ + IMPORT_C void ExternalizeL(RWriteStream& aWriteStream, + TBool aAddName=ETrue) const; + + /** + * Checks, if the header supports serialization. + * In practice all the headers part of the API support it. + * @return ETrue, if the header supports serialization, + * otherwise EFalse + */ + IMPORT_C virtual TBool ExternalizeSupported() const; + + /** + * Can be used when a RPointerArray needs to be pushed + * to the CleanupStack for ResetAndDestroy. + * @param aArray an array of CSIPHeaderBase pointers, + * the ownership of the array is transferred + */ + IMPORT_C static void PushLC(RPointerArray* aArray); + + + public: // For internal use + + /** + * @internalComponent + */ + enum TPreferredPlace + { + ETop, + EMiddleTop, + EMiddle, + EMiddleBottom, + EBottom + }; + + /** + * @internalComponent + */ + TSglQueLink iLink; + + /** + * @internalComponent + */ + virtual TBool EncodeMultipleToOneLine() const; + + /** + * @internalComponent + */ + virtual TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + virtual TBool IsExtensionHeader() const; + + /** + * @internalComponent + */ + virtual TBool HasCompactName() const; + + /** + * @internalComponent + */ + virtual RStringF CompactName() const; + + /** + * @internalComponent + */ + virtual TPreferredPlace PreferredPlaceInMessage() const = 0; + + protected: // Constructors + + CSIPHeaderBase(); + + protected: // New functions + + void ExternalizeNameL(RWriteStream& aWriteStream) const; + + /** + * @internalComponent + */ + virtual void ExternalizeValueL(RWriteStream& aWriteStream) const; + + // Needed for cleanup of a RPointerArray: + static void ResetAndDestroy(TAny* anArray); + }; + +#endif // CSIPHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siphlerr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siphlerr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,33 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// SIP High Level Error Definition file +// +// + + + +/** + @file + @publishedAll + @released +*/ + + +#ifndef SIPHLERR_H +#define SIPHLERR_H + +/** Returned on sip error messages i.e, for all the responses between 3XX to 6XX which are not specifically handled by SIP Stack.*/ +const TInt KErrSIPErrorResponse = -18101; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siphttpdigest.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siphttpdigest.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,312 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siphttpdigest.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 2.0 +* +*/ + + + +#ifndef CSIPHTTPDIGEST_H +#define CSIPHTTPDIGEST_H + +// INCLUDES +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIP; +class MSIPHttpDigestChallengeObserver; +class MSIPHttpDigestChallengeObserver2; +class CSIPClientTransaction; +class CSIPRefresh; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP HTTP Digest security settings. +* Class provides functions for setting/removing +* HTTP Digest security mechanism related parameters. +* If the user does not use the class for the providing credentials for the +* received challenges, an error will be returned to the original request in +* case it was challenged. +* +* Note that the user will be asked to provide credentials one realm +* at the time. +* +* @lib sipclient.lib +*/ +class CSIPHttpDigest : public CBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aSIP a handle to SIP server + * @param aObserver an observer for the received challenges + * @return New object, ownership is transferred. + */ + IMPORT_C static CSIPHttpDigest* + NewL(CSIP& aSIP, + MSIPHttpDigestChallengeObserver& aObserver); + + /** + * Two-phased constructor. + * @param aSIP a handle to SIP server + * @param aObserver an observer for the received challenges + * @return New object, ownership is transferred. + */ + IMPORT_C static CSIPHttpDigest* + NewLC(CSIP& aSIP, + MSIPHttpDigestChallengeObserver& aObserver); + + /** + * Two-phased constructor. + * @param aSIP a handle to SIP server + * @param aObserver2 an observer for the received challenges + * @return New object, ownership is transferred. + */ + IMPORT_C static CSIPHttpDigest* + NewL(CSIP& aSIP, + MSIPHttpDigestChallengeObserver2& aObserver2); + + /** + * Two-phased constructor. + * @param aSIP a handle to SIP server + * @param aObserver2 an observer for the received challenges + * @return New object, ownership is transferred. + */ + IMPORT_C static CSIPHttpDigest* + NewLC(CSIP& aSIP, + MSIPHttpDigestChallengeObserver2& aObserver2); + + IMPORT_C ~CSIPHttpDigest(); + + public: // New functions + + /** + * Sets credentials for the realm of the outbound proxy. + * Must be used in case the realm is the realm of the outbound proxy and + * the request for credentials was received from callback + * MSIPHttpDigestChallengeObserver::ChallengeReceived. + * The user can set credentials only upon request from the + * SIP implementation. + * @pre aOutboundProxy, aRealm, aUsername and aPasswd must not be empty + * descriptors. + * @param aOutboundProxy an outbound proxy (FQDN or IP address) + * @param aRealm servers's realm + * @param aUsername user's name + * @param aPasswd user's password for the given server's realm + * @leave KErrNoMemory if out of memory + * @leave KErrArgument if some of the parameters is an empty descriptor + * @leave KErrSIPResourceNotAvailable if a required object has been + * deleted + */ + IMPORT_C void SetCredentialsL(const TDesC8& aOutboundProxy, + const TDesC8& aRealm, + const TDesC8& aUsername, + const TDesC8& aPasswd); + /** + * Sets parameters for the realm. + * Should be used in case the realm is not a realm of an outbound proxy + * and the request for credentials was received from callback + * MSIPHttpDigestChallengeObserver::ChallengeReceived. + * The user can set credentials only upon request from the + * SIP implementation. + * @pre aRealm, aUsername and aPasswd must not be empty descriptors. + * @param aRealm servers's realm + * @param aUsername user's name + * @param aPasswd user's password for the given server's realm + * @leave KErrNoMemory if out of memory + * @leave KErrArgument if some of the parameters is an empty descriptor + * @leave KErrSIPResourceNotAvailable if a required object has been + * deleted + */ + IMPORT_C void SetCredentialsL(const TDesC8& aRealm, + const TDesC8& aUsername, + const TDesC8& aPasswd); + + /** + * Sets credentials for the realm for the specific transaction. + * Must be used when the request for credentials was received + * from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with + * CSIPClientTransaction as the parameter. + * @pre aRealm, aUsername and aPasswd must not be empty descriptors. + * @param aTransaction the transaction that was passed as a parameter + * to MSIPHttpDigestChallengeObserver2::ChallengeReceived + * @param aOutboundProxy an outbound proxy (FQDN or IP address) if + * the challenge received had Proxy-Authenticate-header(s). + * Otherwise KNullDesC8 should passed. + * @param aRealm servers's realm + * @param aUsername user's name + * @param aPasswd user's password for the given server's realm + * @leave KErrNoMemory if out of memory + * @leave KErrArgument if some of the parameters is an empty descriptor + * @leave KErrSIPResourceNotAvailable if a required object has been + * deleted + */ + IMPORT_C void SetCredentialsL(const CSIPClientTransaction& aTransaction, + const TDesC8& aOutboundProxy, + const TDesC8& aRealm, + const TDesC8& aUsername, + const TDesC8& aPasswd); + + /** + * Sets credentials for the realm for the specific refresh. + * Must be used when the request for credentials was received + * from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with + * CSIPRefresh as the parameter. + * @pre aRealm, aUsername and aPasswd must not be empty descriptors. + * @param aRefresh the refresh that was passed as a parameter + * to MSIPHttpDigestChallengeObserver2::ChallengeReceived + * @param aOutboundProxy an outbound proxy (FQDN or IP address) if + * the challenge received had Proxy-Authenticate-header(s). + * Otherwise KNullDesC8 should passed. + * @param aRealm servers's realm + * @param aUsername user's name + * @param aPasswd user's password for the given server's realm + * @leave KErrNoMemory if out of memory + * @leave KErrArgument if some of the parameters is an empty descriptor + * @leave KErrSIPResourceNotAvailable if a required object has been + * deleted + */ + IMPORT_C void SetCredentialsL(const CSIPRefresh& aRefresh, + const TDesC8& aOutboundProxy, + const TDesC8& aRealm, + const TDesC8& aUsername, + const TDesC8& aPasswd); + + /** + * Removes all set credentials for the realm. + * Must not be used if the user implements + * MSIPHttpDigestChallengeObserver2. + * @pre aRealm must not be an empty descriptor + * @param aRealm servers's realm + * @return KErrNone if no error + * KErrArgument if aRealm is an empty descriptor + * KErrNoMemory if out of memory + * KErrNotFound if the given realm was not found + */ + IMPORT_C TInt RemoveCredentials(const TDesC8& aRealm); + + /** + * Removes all set credentials by the user. + * Must not be used if the user implements + * MSIPHttpDigestChallengeObserver2. + * @return KErrNone if succesful; KErrNoMemory if out of memory + */ + IMPORT_C TInt RemoveCredentials(); + + /** + * Sets the observer to listen for the possible received challenges. + * Replaces the existing MSIPHttpDigestChallengeObserver or + * MSIPHttpDigestChallengeObserver2. + * @param aObserver an observer for the received challenges. + */ + IMPORT_C void SetObserver(MSIPHttpDigestChallengeObserver& aObserver); + + /** + * Sets the observer to listen for the possible received challenges. + * Replaces the existing MSIPHttpDigestChallengeObserver or + * MSIPHttpDigestChallengeObserver2. + * @param aObserver an observer for the received challenges. + */ + IMPORT_C void SetObserver(MSIPHttpDigestChallengeObserver2& aObserver); + + /** + * Ignores the challenge for the realm. As a result the error will be + * generated to the original SIP request. + * @pre aRealm must not be an empty descriptor + * @param aRealm a realm for which the challenge was ignored + * @return KErrNone if no error + * KErrNotFound if the given realm was not found + * KErrArgument if aRealm is an empty descriptor + */ + IMPORT_C TInt IgnoreChallenge(const TDesC8& aRealm); + + /** + * Ignores the challenge for the realm for the specific transaction. + * As a result KErrForbidden will be generated + * to the original SIP request. + * @pre aRealm must not be an empty descriptor + * @param aTransaction the transaction that was passed as a parameter + * to MSIPHttpDigestChallengeObserver2::ChallengeReceived + * @param aRealm a realm for which the challenge was ignored + * @return KErrNone if no error + * KErrNotFound if the given realm was not found + * KErrArgument if aRealm is an empty descriptor + */ + IMPORT_C TInt IgnoreChallenge(const CSIPClientTransaction& aTransaction, + const TDesC8& aRealm); + + /** + * Ignores the challenge for the realm for the specific refresh. + * As a result the error will be generated + * to the original SIP request. + * @pre aRealm must not be an empty descriptor + * @param aRefresh the refresh that was passed as a parameter + * to MSIPHttpDigestChallengeObserver2::ChallengeReceived + * @param aRealm a realm for which the challenge was ignored + * @return KErrNone if no error + * KErrNotFound if the given realm was not found + * KErrArgument if aRealm is an empty descriptor + */ + IMPORT_C TInt IgnoreChallenge(const CSIPRefresh& aRefresh, + const TDesC8& aRealm); + + public: // New functions, for internal use + + void CSIPDeleted(); + + private: // Constructors + + CSIPHttpDigest(CSIP& aSIP); + CSIPHttpDigest(const CSIPHttpDigest& aHttpDigest); + CSIPHttpDigest& operator=(const CSIPHttpDigest& aHttpDigest); + + void ConstructL(MSIPHttpDigestChallengeObserver& aObserver); + + void ConstructL(MSIPHttpDigestChallengeObserver2& aObserver2); + + private: // New functions + + TInt RemoveCredentialParams(const TDesC8& aRealm) const; + + void SetCredentialParamsL(TUint32 aRequestId, + TUint32 aRefreshId, + const TDesC8& aOutboundProxy, + const TDesC8& aRealm, + const TDesC8& aUsername, + const TDesC8& aPasswd) const; + + TInt IgnoreChallenge(TUint32 aRequestId, + TUint32 aRefreshId, + const TDesC8& aRealm); + + private: // Data + + CSIP* iSIP; + + private: // For testing purposes + + UNIT_TEST(CSIP_Test) + }; + +#endif // CSIPHTTPDIGEST_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siphttpdigestchallengeobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siphttpdigestchallengeobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siphttpdigestchallengeobserver.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef MSIPHTTPDIGESTCHALLENGEOBSERVER_H +#define MSIPHTTPDIGESTCHALLENGEOBSERVER_H + +// FORWARD DECLARATIONS + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* The user must implement this interface if it intends to +* provide HTTP Digest credentials upon received challenges +* from the SIP servers on the signaling path. +* The user should provide credentials or ignore the challenge +* using functions defined in TSIPHttpDigest class. +* +* @lib n/a +*/ +class MSIPHttpDigestChallengeObserver + { + public: // New functions + /** + * SIP request resulted in 401/407 response that contains + * a challenge. + * + * @param aRealm a realm for which the challenge was received + */ + virtual void ChallengeReceived(const TDesC8& aRealm) = 0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siphttpdigestchallengeobserver2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siphttpdigestchallengeobserver2.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,81 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siphttpdigestchallengeobserver2.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef MSIPHTTPDIGESTCHALLENGEOBSERVER2_H +#define MSIPHTTPDIGESTCHALLENGEOBSERVER2_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CSIPClientTransaction; +class CSIPRefresh; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* The user should implement this interface if it intends to +* provide HTTP Digest credentials upon received challenges +* from the SIP servers on the signaling path. +* The user should provide credentials or ignore the challenge +* using functions defined in CSIPHttpDigest class. +* +* @lib n/a +*/ +class MSIPHttpDigestChallengeObserver2 + { + public: // New functions + /** + * A SIP request resulted in 401/407 response that contains + * 1..n challenges. + * The challenges can be obtained from Proxy-Authenticate- and/or + * WWW-Authenticate-headers in the CSIPResponseElements + * attached to the CSIPClientTransaction. + * The user must call CSIPHttpDigest::SetCredentialsL or + * CSIPHttpDigest::IgnoreChallenge for each challenge. + * + * @param aTransaction transaction which was completed with + * a response containing HTTP Digest challenge. + */ + virtual void ChallengeReceived( + const CSIPClientTransaction& aTransaction) = 0; + + /** + * A refreshed SIP request resulted in 401/407 response that contains + * 1..n challenges. + * The challenges can be obtained from Proxy-Authenticate- and/or + * WWW-Authenticate-headers in the CSIPResponseElements + * attached to the CSIPClientTransaction attached to the CSIPRefresh. + * The user must call CSIPHttpDigest::SetCredentialsL or + * CSIPHttpDigest::IgnoreChallenge for each challenge. + * + * @param aRefresh the refresh for which a transaction completed with + * a response containing HTTP Digest challenge. + */ + virtual void ChallengeReceived( + const CSIPRefresh& aRefresh) = 0; + }; + +#endif // MSIPHTTPDIGESTCHALLENGEOBSERVER2_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipinvitedialogassoc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipinvitedialogassoc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,423 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipinvitedialogassoc.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + + +#ifndef CSIPINVITEDIALOGASSOC_H +#define CSIPINVITEDIALOGASSOC_H + +// INCLUDES +#include "sipdialogassocbase.h" + +// CONSTANTS + +// FORWARD DECLARATIONS +class CUri8; +class CSIPConnection; +class CSIPServerTransaction; +class CSIPFromHeader; +class CSIPToHeader; +class CSIPContactHeader; +class MSIPRegistrationContext; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP dialog association created with INVITE. +* It provides services for creating, using and +* terminating SIP INVITE dialog association. +* +* The user can have only one INVITE dialog association per dialog. +* +* @lib sipclient.lib +*/ +class CSIPInviteDialogAssoc : public CSIPDialogAssocBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aDialog a dialog to be associated with + * @return New object, ownership is transferred. + */ + IMPORT_C static CSIPInviteDialogAssoc* NewL(CSIPDialog& aDialog); + + /** + * Two-phased constructor. + * @param aDialog a dialog to be associated with + * @return New object, ownership is transferred. + */ + IMPORT_C static CSIPInviteDialogAssoc* NewLC(CSIPDialog& aDialog); + + /** + * Two-phased constructor. + * Should be used if response to the received SIP request will create + * a SIP dialog association. + * The server transaction must be a INVITE transaction. + * If SIP server transaction was received within an existing SIP dialog + * the created SIP dialog association will be correlated to that SIP + * dialog. Otherwise a new SIP dialog is created. + * @pre aTransaction.State() == CSIPTransactionBase::EProceeding + * @pre aTransaction.Type() == SipStrConsts::EInvite + * @param aTransaction a SIP server transaction + * @return New object, ownership is transferred. + * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite + * @leave KErrSIPInvalidTransactionState if aTransaction.State() != + * CSIPTransactionBase::EProceeding + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewL(CSIPServerTransaction& aTransaction); + + /** + * Two-phased constructor. + * Should be used if response to the received SIP request will create a + * SIP dialog association. + * The server transaction must be a INVITE transaction. + * If SIP server transaction was received within the existing SIP dialog + * the created SIP dialog association will be correlated to that + * SIP dialog. Otherwise a new SIP dialog is created. + * @pre aTransaction.State() == CSIPTransactionBase::EProceeding + * @pre aTransaction.Type() == SipStrConsts::EInvite + * @param aTransaction a SIP server transaction + * @return New object, ownership is transferred. + * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite + * @leave KErrSIPInvalidTransactionState if aTransaction.State() != + * CSIPTransactionBase::EProceeding + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewLC(CSIPServerTransaction& aTransaction); + + /** + * Two-phased constructor. + * Should be used if response to the received SIP request will create + * a SIP dialog association. + * The server transaction must be a INVITE transaction. + * If SIP server transaction was received within an existing SIP dialog + * the created SIP dialog association will be correlated to that SIP + * dialog. Otherwise a new SIP dialog is created. + * @pre aTransaction.State() == CSIPTransactionBase::EProceeding + * @pre aTransaction.Type() == SipStrConsts::EInvite + * @pre aContext.IsContextActive() == ETrue + * @param aTransaction a SIP server transaction + * @param aContext that will be used for populating + * the Contact-header of the response to aTransaction + * @return New object, ownership is transferred. + * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite + * @leave KErrSIPInvalidTransactionState if aTransaction.State() != + * CSIPTransactionBase::EProceeding + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewL(CSIPServerTransaction& aTransaction, + const MSIPRegistrationContext& aContext); + + /** + * Two-phased constructor. + * Should be used if response to the received SIP request will create a + * SIP dialog association. + * The server transaction must be a INVITE transaction. + * If SIP server transaction was received within the existing SIP dialog + * the created SIP dialog association will be correlated to that + * SIP dialog. Otherwise a new SIP dialog is created. + * @pre aTransaction.State() == CSIPTransactionBase::EProceeding + * @pre aTransaction.Type() == SipStrConsts::EInvite + * @pre aContext.IsContextActive() == ETrue + * @param aTransaction a SIP server transaction + * @param aContext that will be used for populating + * the Contact-header of the response to aTransaction + * @return New object, ownership is transferred. + * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite + * @leave KErrSIPInvalidTransactionState if aTransaction.State() != + * CSIPTransactionBase::EProceeding + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewLC(CSIPServerTransaction& aTransaction, + const MSIPRegistrationContext& aContext); + + /** + * Two-phased constructor + * @pre aFrom != 0 + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @param aConnection a SIP connection to be used with + * dialog association + * @param aFrom originator's address; the ownership is transfered + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is addressed to. The ownership is transferred. + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object, ownership is transferred. + * @leave KErrArgument if aFrom == 0 or aRemoteUri == 0 + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewL(CSIPConnection& aConnection, + CSIPFromHeader* aFrom, + CUri8* aRemoteUri, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aFrom != 0 + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @param aSIPConnection a SIP connection to be used with + * dialog association + * @param aFrom originator's address; the ownership is transfered + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is addressed to. The ownership is transferred. + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object, ownership is transferred. + * @leave KErrArgument if aFrom == 0 or aRemoteUri == 0 + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewLC(CSIPConnection& aConnection, + CSIPFromHeader* aFrom, + CUri8* aRemoteUri, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @pre aContext.IsContextActive() == ETrue + * @param aConnection a SIP connection to be used with + * dialog association + * @param aRemoteUri a remote target URI that identifies a resource + * that the request is targeted to. The ownership is transferred. + * @param aContext used for selecting outbound + * proxy and originator's address (AOR) and contact + * @param aFrom originator's address. If not defined it will + * constructed using registration context (User's AOR); + * the ownership is transfered + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object, ownership is transferred. + * @leave KErrArgument if aRemoteUri == 0 + * @leave KErrSIPInvalidRegistrationState + * if aContext.IsContextActive() == EFalse + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewL(CSIPConnection& aConnection, + CUri8* aRemoteUri, + const MSIPRegistrationContext& aContext, + CSIPFromHeader* aFrom=0, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @pre aContext.IsContextActive() == ETrue + * @param aConnection a SIP connection to be used with + * dialog association + * @param aRemoteUri a remote target URI that identifies a resource + * that the request is targeted to. The ownership is transferred. + * @param aContext used for selecting outbound + * proxy and originator's address (AOR) and contact + * @param aFrom originator's address. If not defined it will + * constructed using registration context (User's AOR); + * the ownership is transfered + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object, ownership is transferred. + * @leave KErrArgument if aRemoteUri == 0 + * @leave KErrSIPInvalidRegistrationState + * if aContext.IsContextActive() == EFalse + */ + IMPORT_C static CSIPInviteDialogAssoc* + NewLC(CSIPConnection& aConnection, + CUri8* aRemoteUri, + const MSIPRegistrationContext& aContext, + CSIPFromHeader* aFrom=0, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Destructor + */ + IMPORT_C ~CSIPInviteDialogAssoc(); + + public: // New functions + + /** + * Creates INVITE and sends it to the remote target. + * 101-199 or 2xx response will create INVITE dialog association in case + * of first INVITE within this dialog association. Subsequent INVITE + * requests are re-INVITEs. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EInit || + * Dialog().State()==CSIPDialog::EConfirmed + * @param aElements contains user SIP headers and content. Ownership is + * transferred. + * @return INVITE SIP transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if dialog is not in a correct state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendInviteL(CSIPMessageElements* aElements=0); + + /** + * Creates PRACK and sends it to the remote target. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EEarly || + * Dialog().State()==CSIPDialog::EConfirmed + * @pre aElements must not contain Contact headers + * @param aElements contains user SIP headers and content. Ownership is + * transferred. + * @return PRACK SIP transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if dialog is not in a correct state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendPrackL(CSIPMessageElements* aElements=0); + + /** + * Creates UPDATE and sends it to the remote target. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EEarly || + * Dialog().State()==CSIPDialog::EConfirmed + * @param aElements contains user SIP headers and content. Ownership is + * transferred. + * @return UPDATE SIP transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if dialog is not in a correct state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendUpdateL(CSIPMessageElements* aElements=0); + + /** + * Creates SIP ACK request and sends it to the remote target. + * The client transaction must be an INVITE transaction. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EConfirmed + * @param aTransaction a SIP INVITE client transaction to acknowledge + * @param aElements optional SIP message headers and body. Ownership is + * transferred. + * @leave KErrArgument if aTransaction is not an INVITE transaction. + * @leave KErrSIPInvalidDialogState if ACK can't be sent in the current + * dialog state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C void SendAckL(const CSIPClientTransaction& aTransaction, + CSIPMessageElements* aElements=0); + + /** + * Creates SIP BYE request and sends it to the remote target. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EEarly || + * Dialog().State()==CSIPDialog::EConfirmed + * @param aElements contains user SIP headers and content. Ownership is + * transferred. + * @return SIP BYE transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if BYE can't be sent in the current + * dialog state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendByeL(CSIPMessageElements* aElements=0); + + public: // New functions, for internal use + + /** + * Sends initial INVITE creating a dialog and creates a transaction for + * it. + * @param aElements contains user SIP headers and content. Ownership is + * transferred. + * @return INVITE SIP transaction. Ownership is transferred. + */ + CSIPClientTransaction* DoSendInviteL(CSIPMessageElements* aElements); + + /** + * Sends ACK + * @param aTransaction a SIP INVITE client transaction to acknowledge + * @param aElements optional SIP message headers and body. Ownership is + * transferred. + */ + void DoSendAckL(const CSIPClientTransaction& aTransaction, + CSIPMessageElements* aElements); + + CSIPClientTransaction* + DoSendRequestWithinDialogL(RStringF aMethod, + CSIPMessageElements* aElements); + + CSIPClientTransaction* DoSendCancelL(TUint32 aRequestId); + + private: // Constructors + + static CSIPInviteDialogAssoc* NewLC(CSIPConnection& aConnection, + CUri8* aRemoteUri, + CSIPFromHeader* aFrom, + CSIPToHeader* aTo, + CSIPContactHeader* aContact, + const MSIPRegistrationContext* aContext); + + CSIPInviteDialogAssoc(); + + void ConstructL(CSIPServerTransaction& aTransaction, + const MSIPRegistrationContext* aContext); + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipmanagedprofile.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipmanagedprofile.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,226 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipmanagedprofile.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The class providing profile management of SIP service provider +* Version : 1.0 +* +*/ + + + +#ifndef CSIPMANAGEDPROFILE_H +#define CSIPMANAGEDPROFILE_H + +// INCLUDES + +#include +#include +#include + +#include "sipprofile.h" + +//CONSTANTS + +/** SIP Provider Name which value is type of TDesC8. +* Note that this parameter can only be retrieved +* if it has been explicitly configured */ +const TUint32 KSIPPrivateIdentity = 500; + +/** SIP HTTP Digest password which value is type of TDesC8. +* Note that this parameter cannot be retrieved */ +const TUint32 KSIPDigestPassword = 501; + +/** +* SIP headers to be added to outgoing SIP requests generated +* by SIP Profile Agent. The value is of type MDesC8Array. +* Each array element represents a complete SIP header (name and value). */ +const TUint32 KSIPHeaders = 502; + +/** +* Setting for enabling/disabling IMS registration with certain types of +* smart card applications. The value is of type TUint32. +* If no value for this setting is configured, registration is allowed +* with all types of smart card applications (SIM/USIM/ISIM). +* If the value is configured, the following values are possible: +* 1: Registration is allowed only when USIM or ISIM is present. +* 2: Registration is allowed only when ISIM present */ +const TUint32 KSIPAllowIMSRegistration = 503; + +/** +* Setting for enabling/disabling editing the profile after its creation. +* Serves as an indication for the clients that the profile +* update and deletion operations are restricted. +* The SIP Profile Agent implementation does not understand +* the semantics of the parameter. +* The value is of type TBool. */ +const TUint32 KSIPProfileLocked = 504; + +/** +* Defines how autoregistration profile behaves on home network/roaming +* situations. If value is ETrue, automatic registration is not allowed +* while roaming. +* The value is of type TBool. */ +const TUint32 KSIPAllowAutoRegistrationOnlyOnHomeNetwork = 505; + +// FORWARD DECLARATIONS + +class CSIPManagedProfileRegistry; + + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class contains profile information of particular SIP service +* provider. Class provides functions for setting and +* getting profile parameters. +* +* @lib sipprofilecli.lib +*/ +class CSIPManagedProfile: public CSIPProfile + { + public: // Constructors and destructor + /** + * Destructor. + */ + IMPORT_C ~CSIPManagedProfile(); + + public: // New functions + /** + * Sets profile type information; + * @param aSIPProfileTypeInfo profile type information + */ + IMPORT_C void SetType(const TSIPProfileTypeInfo& aSIPProfileTypeInfo); + + /** + * Sets profile parameter + * @param aParam a parameter to set; zero-length descriptor resets the value + * @param aVal a value to set + * @return KErrNotFound if parameter was not found, + * KErrNoMemory if out of memory; + * KErrNone otherwise + */ + IMPORT_C TInt SetParameter(TUint32 aParam, const TDesC8& aVal); + + /** + * Sets profile parameter + * @param aParam a parameter to set + * @param aVal a value to set + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt SetParameter(TUint32 aParam, TUint32 aVal); + + /** + * Sets profile parameter + * @param aParam a parameter to set + * @param aVal a value to set + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt SetParameter(TUint32 aParam, TBool aVal); + + /** + * Sets profile parameter + * @param aParam a parameter to set + * @param aVal values to set; an empty array resets the value + * @return KErrNotFound if parameter was not found, + * KErrNoMemory if out of memory + * KErrNone otherwise + */ + IMPORT_C TInt SetParameter(TUint32 aParam, const MDesC8Array& aVal); + + /** + * Sets profile parameter that is defined for a particular SIP server + * @param aServerType a SIP server type + * @param aParam a parameter to set + * @param aVal a value to set; zero-length descriptor resets the value + * @return KErrNotFound if parameter was not found, + * KErrNoMemory if out of memory; + * KErrNone otherwise + */ + IMPORT_C TInt SetParameter(TUint32 aServerType, TUint32 aParam, const TDesC8& aVal); + + /** + * Creates deep copy of the object + * @return deep copied instance + * @leave KErrNoMemory if out of memory + */ + IMPORT_C CSIPManagedProfile* CloneL() const; + + public: + /** + * Two-phased constructor. + * @param aSIPRegistry a SIP profile client providing connection to SIP + * profile server. + */ + static CSIPManagedProfile* NewL(CSIPManagedProfileRegistry* aSIPRegistry); + + /** + * Two-phased constructor. + * @param aSIPRegistry a SIP profile client providing connection to SIP + * profile server. + * Constructs an object and adds the pointer to the cleanup stack; + */ + static CSIPManagedProfile* NewLC(CSIPManagedProfileRegistry* aSIPRegistry); + + private: + + /** + * Constructor. + */ + CSIPManagedProfile(CSIPManagedProfileRegistry* aSIPRegistry); + + /** + * Sets profile parameter + * @param aParam a parameter to set; zero-length descriptor resets the value + * @param aVal a value to set + */ + void SetParameterL(TUint32 aParam, const TDesC8& aVal); + + /** + * Sets profile parameter + * @param aParam a parameter to set + * @param aVal a value to set + */ + void SetParameterL(TUint32 aParam, TUint32 aVal); + + /** + * Sets profile parameter + * @param aParam a parameter to set + * @param aVal a value to set + */ + void SetParameterL(TUint32 aParam, TBool aVal); + + /** + * Sets profile parameter that is defined for a particular SIP server + * @param aServerType a SIP server type + * @param aParam a parameter to set + * @param aVal a value to set; zero-length descriptor resets the value + */ + void SetParameterL(TUint32 aServerType, + TUint32 aParam, const TDesC8& aVal); + + /** + * Sets profile parameter + * @param aParam a parameter to set + * @param aVal values to set; an empty array resets the value + */ + IMPORT_C void SetParameterL(TUint32 aParam, const MDesC8Array& aVal); + }; + +#endif // CSIPMANAGEDPROFILE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipmanagedprofileregistry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipmanagedprofileregistry.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipmanagedprofileregistry.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The class for managing SIP profiles +* Version : 1.0 +* +*/ + + + +#ifndef CSIPMANAGEDPROFILEREGISTRY_H +#define CSIPMANAGEDPROFILEREGISTRY_H + +// INCLUDES +#include +#include +#include "sipprofileregistrybase.h" + +// FORWARD DECLARATIONS +class CSIPProfile; +class CSIPManagedProfile; +class MSIPProfileRegistryObserver; + + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* The class for managing SIP profiles. +* This class provides the functions for +* adding/updating/removing profiles. +* +* @lib sipprofilecli.lib +*/ +class CSIPManagedProfileRegistry: public CSIPProfileRegistryBase + { + public: // Constructors and destructor + /** + * Two-phased constructor. + * @param aObserver a observer for SIP profile change events. + */ + IMPORT_C static CSIPManagedProfileRegistry* NewL( + MSIPProfileRegistryObserver& aObserver); + + /** + * Two-phased constructor. + * Constructs an object and adds the pointer to the cleanup stack; + * @param aObserver a observer for SIP profile change events. + */ + IMPORT_C static CSIPManagedProfileRegistry* NewLC( + MSIPProfileRegistryObserver& aObserver); + + /** + * Destructor + */ + IMPORT_C ~CSIPManagedProfileRegistry(); + public: //new functions + + /** + * Instantiates new profile with default values + * for given type. + * @param aType a SIP profile type to be created + * @return pre-filled instance of given type profile type; + * the ownership is transferred + */ + IMPORT_C CSIPManagedProfile* CreateL(const TSIPProfileTypeInfo& aType); + + /** + * Checks if profile is not used by other applications. + * If no other application is using the profile, profile + * can be updated. + * @param aSIPProfile a SIP profile + * @return ETrue if available for update, EFalse otherwise + * @capability ReadUserData + */ + IMPORT_C TBool IsInUseL(const CSIPProfile& aSIPProfile) const; + + /** + * Saves new profile or changes to a profile to the persistent storage. + * This function must be called after desired values are set or updated + * in the SIP profile. + * If the profile is marked for auto-registration and the profile is + * updated the profile will be re-registered. + * Function leaves on failure. + * @pre IsInUse(aSIPProfile)==EFalse + * @param aSIPProfile a sip profile to save + * @capability WriteDeviceData + * @capability NetworkServices + */ + IMPORT_C void SaveL(CSIPProfile& aSIPProfile); + + /** + * Removes and deletes SIP profile from the persistent storage. + * Function leaves on failure. + * If the profile is registered it will be de-registered before the + * removal from the persistent storage. + * @param aSIPProfile a sip profile to delete + * @capability WriteDeviceData + * @capability NetworkServices + */ + IMPORT_C void DestroyL(CSIPProfile& aSIPProfile); + + private: + + CSIPManagedProfileRegistry(MSIPProfileRegistryObserver& aObserver); + + void ConstructL(); + + /** + * Creates a new instance of type CSIPManagedProfile + * @return new instance + */ + CSIPProfile* NewInstanceL(); + }; + +#endif // CSIPMANAGEDPROFILEREGISTRY_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipmessageelements.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipmessageelements.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,174 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipmessageelements.h +* Part of : SIP Client +* Interface : SDK API, SIP API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPMESSAGEELEMENTS_H +#define CSIPMESSAGEELEMENTS_H + +// INCLUDES +#include +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPHeaderBase; +class CSIPContentTypeHeader; +class CSIPFromHeader; +class CSIPToHeader; +class CSIPCSeqHeader; +class CSIPExtensionHeader; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for creation and manipulation optional elements in a SIP message. +* +* Class provides functions for setting and getting optional elements in a +* SIP message. Optional elements include user SIP message headers, +* content and content type. +* Following headers are not considered to be user SIP message headers and +* cannot be set or retrieved using functions of this class: +* "Authentication-Info", "Call-Id", "CSeq", "From" +* "Max-Forwards", "Min-Expires", "Record-Route", +* "Security-Verify", "Service-Route", "To", "Via", "Security-Server" and +* "Proxy-Authorization". +* +* @lib sipclient.lib +*/ +class CSIPMessageElements : public CBase + { + public: // Constructors and destructor + /** + * Two-phased constructor. + */ + IMPORT_C static CSIPMessageElements* NewL(); + + /** + * Two-phased constructor. + */ + IMPORT_C static CSIPMessageElements* NewLC(); + + /** + * Destructor. + */ + IMPORT_C ~CSIPMessageElements(); + + public: //new functions + /** + * Sets an array of user headers i.e. headers that user is allowed + * manipulate to a SIP message. An empty array resets the user headers. + * Note that the Content-Type header must be set using SetContentL. + * + * @param aHeaders an array of SIP headers. + * The ownership of objects in the array is transferred. + */ + IMPORT_C void SetUserHeadersL(RPointerArray& aHeaders); + + /** + * Gets all user SIP headers this class contains + * @return SIP headers. Ownership is not transferred. + */ + IMPORT_C const RPointerArray& UserHeaders() const; + + /** + * Sets the SIP message content and its type. + * A zero length content can be set by providing a pointer + * to a zero length HBufC8 instance (the ownership is transferred). + * @pre aContent != 0 && aContentType != 0 + * @param aContent the content of a SIP message, + * the ownership is transferred + * @param aContentType the SIP message content type, + * the ownership is transferred + * @leave KErrArgument if aContent == 0 or + * aContentType == 0 + */ + IMPORT_C void SetContentL(HBufC8* aContent, + CSIPContentTypeHeader* aContentType); + + /** + * Gets the SIP message content + * @return SIP message content. If content does not exist, an empty + * descriptor is returned. + */ + IMPORT_C const TDesC8& Content() const; + + /** + * Gets the content type + * @return Content-Type-header or a 0-pointer if not present; the ownership + * is not transferred. + */ + IMPORT_C const CSIPContentTypeHeader* ContentType() const; + + /* + * Removes the SIP message content and destroys + * Content-Type header as well. + * @return SIP message content; the ownership is transferred. + */ + IMPORT_C HBufC8* ExtractContent(); + + public: // New functions, for internal use + + static CSIPMessageElements* InternalizeL(RReadStream& aReadStream); + void ExternalizeL(RWriteStream& aWriteStream) const; + TInt UserHeaderCount(RStringF aName) const; + const RPointerArray UserHeadersL(RStringF aName) const; + TInt RemoveHeaders(RStringF aName); + void DetachUserHeader(CSIPHeaderBase* aHeader); + void AddHeaderL(CSIPHeaderBase* aHeader); + void SetToL(CSIPToHeader* aTo); + const CSIPToHeader* To() const; + void SetFromL (CSIPFromHeader* aFrom); + const CSIPFromHeader* From() const; + const CSIPCSeqHeader* CSeq() const; + void SetContent(HBufC8* aContent); + void DetachContent(); + + private: + + CSIPMessageElements(); + void ConstructL(); + void DoInternalizeL(RReadStream& aReadStream); + void CheckUserHeaderL(const CSIPHeaderBase* aHeader) const; + void ExternalizeUserHeadersL(RWriteStream& aWriteStream) const; + void ExternalizeL(const CSIPExtensionHeader* aHeader, + RWriteStream& aWriteStream) const; + + private: // Data + + RPointerArray iUserHeaders; + HBufC8* iContent; + CSIPFromHeader* iFromHeader; + CSIPToHeader* iToHeader; + CSIPCSeqHeader* iCSeqHeader; + CSIPContentTypeHeader* iContentTypeHeader; + TBool iHeaderLookupOpen; + + private: // For testing purposes + + UNIT_TEST(CSIPMessageElementsTest) + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipnotifydialogassoc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipnotifydialogassoc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,232 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipnotifydialogassoc.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + + +#ifndef CSIPNOTIFYDIALOGASSOC_H +#define CSIPNOTIFYDIALOGASSOC_H + +// INCLUDES +#include +#include "sipdialogassocbase.h" + +// CONSTANTS + +// FORWARD DECLARATIONS +class CSIPEventHeader; +class CSIPSubscriptionStateHeader; +class MSIPRegistrationContext; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP NOTIFY dialog associations. +* It provides services for creating, using and +* terminating SIP NOTIFY dialog associations. The user can have multiple +* NOTIFY dialog associations per same SIP dialog. +* Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, +* local and remote tags; user is responsible for "Event" and +* "Subscription-State" header semantics. +* @lib sipclient.lib +*/ +class CSIPNotifyDialogAssoc: public CSIPDialogAssocBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * The response to the received SIP request will create a SIP NOTIFY + * dialog association that will be correlated with the SIP dialog in + * which SIP server transaction was received. If the server transaction + * was not received within a SIP dialog, a new SIP dialog is created. + * The server transaction must be either SUBSCRIBE or REFER transaction. + * @pre aTransaction.State()==ETrying || EProceeding + * @pre aTransaction.Type() == + * SipStrConsts::ESubscribe || SipStrConsts::ERefer + * @pre aEvent != 0 && aState != 0 + * @param aTransaction a SIP server transaction + * @param aEvent an event to send a notification about; the ownership + * is transferred. + * @param aState a subscription state; the ownership is transferred. + * @return New object; the ownership is transferred + * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER + * transaction, or aEvent == 0 or aState == 0. + * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong + * state + */ + IMPORT_C static CSIPNotifyDialogAssoc* + NewL(CSIPServerTransaction& aTransaction, + CSIPEventHeader* aEvent, + CSIPSubscriptionStateHeader* aState); + + /** + * Two-phased constructor. + * The response to the received SIP request will create a SIP NOTIFY + * dialog association that will be correlated with the SIP dialog in + * which SIP server transaction was received. If the server transaction + * was not received within a SIP dialog, a new SIP dialog is created. + * The server transaction must be either SUBSCRIBE or REFER transaction. + * @pre aTransaction.State()==ETrying || EProceeding + * @pre aTransaction.Type() == + * SipStrConsts::ESubscribe || SipStrConsts::ERefer + * @pre aEvent != 0 && aState != 0 + * @param aTransaction a SIP server transaction + * @param aEvent an event to send a notification about; the ownership + * is transferred. + * @param aState a subscription state; the ownership is transferred. + * @return New object; the ownership is transferred + * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER + * transaction, or aEvent == 0 or aState == 0. + * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong + * state + */ + IMPORT_C static CSIPNotifyDialogAssoc* + NewLC(CSIPServerTransaction& aTransaction, + CSIPEventHeader* aEvent, + CSIPSubscriptionStateHeader* aState); + + /** + * Two-phased constructor. + * The response to the received SIP request will create a SIP NOTIFY + * dialog association that will be correlated with the SIP dialog in + * which SIP server transaction was received. If the server transaction + * was not received within a SIP dialog, a new SIP dialog is created. + * The server transaction must be either SUBSCRIBE or REFER transaction. + * @pre aTransaction.State()==ETrying || EProceeding + * @pre aTransaction.Type() == + * SipStrConsts::ESubscribe || SipStrConsts::ERefer + * @pre aContext.IsContextActive() == ETrue + * @pre aEvent != 0 && aState != 0 + * @param aTransaction a SIP server transaction + * @param aContext that will be used for populating + * the Contact-header of the response to aTransaction + * @param aEvent an event to send a notification about; the ownership + * is transferred. + * @param aState a subscription state; the ownership is transferred. + * @return New object; the ownership is transferred + * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER + * transaction, or aEvent == 0 or aState == 0. + * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong + * state + */ + IMPORT_C static CSIPNotifyDialogAssoc* + NewL(CSIPServerTransaction& aTransaction, + const MSIPRegistrationContext& aContext, + CSIPEventHeader* aEvent, + CSIPSubscriptionStateHeader* aState); + + /** + * Two-phased constructor. + * The response to the received SIP request will create a SIP NOTIFY + * dialog association that will be correlated with the SIP dialog in + * which SIP server transaction was received. If the server transaction + * was not received within a SIP dialog, a new SIP dialog is created. + * The server transaction must be either SUBSCRIBE or REFER transaction. + * @pre aTransaction.State()==ETrying || EProceeding + * @pre aTransaction.Type() == + * SipStrConsts::ESubscribe || SipStrConsts::ERefer + * @pre aContext.IsContextActive() == ETrue + * @pre aEvent != 0 && aState != 0 + * @param aTransaction a SIP server transaction + * @param aContext that will be used for populating + * the Contact-header of the response to aTransaction + * @param aEvent an event to send a notification about; the ownership + * is transferred. + * @param aState a subscription state; the ownership is transferred. + * @return New object; the ownership is transferred + * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER + * transaction, or aEvent == 0 or aState == 0. + * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong + * state + */ + IMPORT_C static CSIPNotifyDialogAssoc* + NewLC(CSIPServerTransaction& aTransaction, + const MSIPRegistrationContext& aContext, + CSIPEventHeader* aEvent, + CSIPSubscriptionStateHeader* aState); + + /** + * Destructor + */ + IMPORT_C ~CSIPNotifyDialogAssoc(); + + public: // New functions + + /** + * Creates NOTIFY and sends it to the remote target. + * If client provides optional SIP headers they must + * not contain Event and Subscription-State headers. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::TState::EConfirmed + * @param aElements optional SIP message headers and body. + * Ownership is transferred. + * @return NOTIFY SIP UAC transaction + * @leave KErrSIPInvalidDialogState if dialog's state is incorrect + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted. + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendNotifyL(CSIPMessageElements* aElements=0); + + /** + * Gets an event about which the notification is done + * @return an event + */ + IMPORT_C const CSIPEventHeader& Event() const; + + /** + * Gets subscription state + * @return subscription state + */ + IMPORT_C CSIPSubscriptionStateHeader& SubscriptionState(); + + /** + * Gets subscription state + * @return subscription state + */ + IMPORT_C const CSIPSubscriptionStateHeader& SubscriptionState() const; + + public: // New functions, for internal use + + CSIPClientTransaction* + DoSendNotifyWithinDialogL(CSIPMessageElements* aElements); + + private: // Constructors + + CSIPNotifyDialogAssoc(); + + void ConstructL(CSIPServerTransaction& aTransaction, + const MSIPRegistrationContext* aContext, + CSIPEventHeader* aEvent, + CSIPSubscriptionStateHeader* aState); + + private: // Data + + CSIPEventHeader* iEvent; + CSIPSubscriptionStateHeader* iSubscriptionState; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipobserver.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef MSIPOBSERVER_H +#define MSIPOBSERVER_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CSIPServerTransaction; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* An interface to be implemented by user of CSIP. +* Interface allows to be able to receive SIP request from the SIP connection +* that has not been initialized by the user. +* +* @lib n/a +*/ +class MSIPObserver + { + public: // New functions + /** + * A SIP request has been received from the network. + * This function is called when the SIP request was received using such + * an IAP, for which the application has not created a CSIPConnection + * object. + * @pre aTransaction != 0 + * @param aIapId The IapId from which the SIP request was received. + * @param aTransaction contains local address, remote address of a SIP + * message, as well as optional SIP message method, headers and + * body. The ownership is transferred. + */ + virtual void IncomingRequest(TUint32 aIapId, + CSIPServerTransaction* aTransaction) = 0; + + /** + * The received SIP request time-outed and it is invalid i.e. cannot be used + * anymore. + * This will be called if the user fails to create a SIP connection and + * does not send an appropriate SIP response. + * @param aTransaction The time-outed transaction. + */ + virtual void TimedOut(CSIPServerTransaction& aTransaction) = 0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipparameterheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipparameterheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,181 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipparameterheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPPARAMETERHEADERBASE_H +#define CSIPPARAMETERHEADERBASE_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPParamContainerBase; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP headers that have structure +* "mandatory part"delimiter"parameters" +* +* This is an abstract class and cannot be instantiated. +* +* @lib sipcodec.lib +*/ +class CSIPParameterHeaderBase : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPParameterHeaderBase. + */ + IMPORT_C virtual ~CSIPParameterHeaderBase(); + + + public: // New functions + + /** + * Checks if a parameter is present + * @param aName the name of the parameter + * @return ETrue if present, otherwise EFalse + */ + IMPORT_C TBool HasParam(RStringF aName) const; + + /** + * Gets a parameter value + * @pre HasParam(aName) == ETrue + * @param aName the name of the parameter + * @return the parameter value if present, + * otherwise a zero-length length value. + */ + IMPORT_C RStringF ParamValue(RStringF aName) const; + + /** + * Sets a parameter with a value. + * Takes copies of the name and value, + * so if the RStringFs have been dynamically allocated, + * they can be closed if necessary after the function returns. + * @pre HasParam(aName) == EFalse + * @param aName the name of the parameter + * @param aValue the parameter value to set + */ + IMPORT_C void SetParamL(RStringF aName, RStringF aValue); + + /** + * Sets a parameter without a value + * Takes copy of the name, + * so if the RStringF has been dynamically allocated, + * it can be closed if necessary after the function returns. + * @pre HasParam(aName) == EFalse + * @param aName the parameter name to set + */ + IMPORT_C void SetParamL(RStringF aName); + + /** + * Deletes a parameter + * @param aName the parameter name to delete + */ + IMPORT_C void DeleteParam(RStringF aName); + + /** + * Gets the count of header parameters + * @return count of header parameters + */ + IMPORT_C TInt ParamCount() const; + + /** + * Gets a header parameter name by index. + * This function can be used when looping through + * all the header parameters. + * @param aIndex the index of the parameter + * @param aName copy of the parameter name that must be + * closed by the caller. + * @return KErrNotFound if aIndex is invalid. Otherwise EFalse. + */ + IMPORT_C TInt Param(TInt aIndex, RStringF& aName) const; + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + protected: // Contructors + + CSIPParameterHeaderBase(const TChar& aSeparator); + + protected: // New functions + + void ParseL(const TDesC8& aValue, + TBool aIgnoreParenthesis=ETrue, + TBool aSkipSeparatorsBeforeAt=EFalse); + + protected: // Virtual functions + + /** + * @internalComponent + */ + virtual TBool ParamInsertionAllowed() const; + + protected: // Pure virtual functions + + /** + * @internalComponent + */ + virtual HBufC8* ToTextMandatoryPartLC() const = 0; + + /** + * @internalComponent + */ + virtual void ParseMandatoryPartL(const TDesC8& aMandatoryPart) = 0; + + /** + * @internalComponent + */ + virtual const CSIPParamContainerBase& Params() const = 0; + + /** + * @internalComponent + */ + virtual CSIPParamContainerBase& Params() = 0; + + private: // Contructors + + CSIPParameterHeaderBase(); + + private: // Data + + TChar iSeparator; + + private: // For testing purposes + + UNIT_TEST(CSIPParameterHeaderBaseTest) + }; + +#endif // CSIPPARAMETERHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sippassociateduriheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sippassociateduriheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sippassociateduriheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPPASSOCIATEDURIHEADER_H +#define CSIPPASSOCIATEDURIHEADER_H + +// INCLUDES +#include "sipaddressheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPHeaderGenericParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP +* "P-Associated-URI" header. +* +* @lib sipcodec.lib +*/ +class CSIPPAssociatedURIHeader : public CSIPAddressHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPPAssociatedURIHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "P-Associated-URI"-header + * (e.g. "User ;param=value") + * @return an array containing one to many instances + * of CSIPPAssociatedURIHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPPAssociatedURIHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred. + * @return a new instance of CSIPPAssociatedURIHeader + */ + IMPORT_C static CSIPPAssociatedURIHeader* + NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPPAssociatedURIHeader and + * puts it to CleanupStack + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred, + * @return a new instance of CSIPPAssociatedURIHeader + */ + IMPORT_C static CSIPPAssociatedURIHeader* + NewLC(CSIPAddress* aSIPAddress); + + /** + * Destructor, deletes the resources of CSIPPAssociatedURIHeader. + */ + IMPORT_C virtual ~CSIPPAssociatedURIHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPPAssociatedURIHeader from + * a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPPAssociatedURIHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPPAssociatedURIHeader(); + + private: // For testing purposes + + UNIT_TEST(CSIPPAssociatedURIHeaderTest) + }; + +#endif // end of CSIPPASSOCIATEDURIHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofile.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofile.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,374 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofile.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The class providing profile data of SIP service provider +* Version : 1.0 +* +*/ + + + +#ifndef CSIPPROFILE_H +#define CSIPPROFILE_H + +// INCLUDES +#include +#include +#include +#include "sipregistrationcontext.h" +#include "sipprofiletypeinfo.h" + +// FORWARD DECLARATIONS +class CSIPConcreteProfile; +class CSIPProfileRegistry; +class CSIPProfileRegistryBase; + +/** +* SIP Profile ID which value is type of TUint32 +*/ +const TUint32 KSIPProfileId = 1; + +/** +* SIP Provider Name which value is type of TDesC8 +*/ +const TUint32 KSIPProviderName = 2; + +/** +* Access Point ID which value is type of TUint32 +*/ +const TUint32 KSIPAccessPointId = 3; + +/** +* Signaling compression (SigComp) which value is type of TBool. +* ETrue indicates that SigComp is enabled +*/ +const TUint32 KSIPSigComp = 4; + +/** +* Security Negotiation which value is type of TBool. ETrue indicates that +* Security Negotiation is enabled +*/ +const TUint32 KSIPSecurityNegotiation = 5; + +/** +* Auto Registration which value is type of TBool. ETrue indicates that +* profile is enabled for auto registration +*/ +const TUint32 KSIPAutoRegistration = 6; + +/** +* Defined user's address-of-record which value is type of TDesC8 +*/ +const TUint32 KSIPUserAor = 7; + +/** +* Registration which value is type of TBool. ETrue indicates that +* profile is registered +*/ +const TUint32 KSIPProfileRegistered = 8; + +/** +* Users's registered address-of-records which value is of type MDesC8Array. +* Note that array will contain AORs only in case the profile is registered. +*/ +const TUint32 KSIPRegisteredAors = 9; + +/** +* Negotiated security mechanism during registration procedure which value +* is of type TDesC8. +* Note that descriptor will contain value only in case the profile is +* registered. +*/ +const TUint32 KSIPNegotiatedSecurityMechanism = 10; + +/** +* Default profile which value is type of TBool. +* ETrue indicates that profile is default +*/ +const TUint32 KSIPDefaultProfile = 11; + +/** +* "Contact" header parameters used during registration which value +* is of type MDesC8Array. Each array element contains one "Contact"-header +* parameter. +*/ +const TUint32 KSIPContactHeaderParams = 12; + +/** +* The user's registered "Contact"-header including the whole value of the header +* except for the header's name ("Contact:"). +* The value is of type TDesC8. +* Note that the value is available only in case the profile is registered. +*/ +const TUint32 KSIPRegisteredContact = 13; + +/** +* SNAP (Service Network Access Point) ID which value is type of TUint32. +* This is an optional parameter. When this parameter is configured, +* KSIPAccessPointId has a meaningful value only when the profile is registered. +* The value of KSIPSnapId must be greater than zero. +*/ +const TUint32 KSIPSnapId = 14; + +/** +* A unique Contact-header's user-part +* generated automatically by the SIP implementation. +* The value is of type TDesC8. +* This parameter is read-only and +* trying to set it will fail with KErrAccessDenied. +*/ +const TUint32 KSIPContactHeaderUser = 15; + +/** +* Sets the KSoIpTOS socket option (see in_sock.h) for +* all SIP signalling related to this profile. +* The value is of type TUint32. +*/ +const TUint32 KSIPSoIpTOS = 16; + +/** +* Sets the Access Point Name. +* This is an Optional Parameter. +* Access Point Name which value is type of TDesC8, +*/ +const TUint32 KSIPAccessPointName = 17; + +/** + * Sets the SNAP Name. + * This is an Optional Parameter. + * SNAP Name which value is type of TDesC8, +*/ +const TUint32 KSIPSnapName = 18; + +/** +* SIP Registrar +*/ +const TUint32 KSIPRegistrar = 130; + +/** +* SIP Outbound Proxy +*/ +const TUint32 KSIPOutboundProxy = 131; + +/** +* HTTP Digest user name which value is type of TDesC8 +*/ +const TUint32 KSIPDigestUserName = 150; + +/** +* HTTP Digest realm which value is type of TDesC8 +*/ +const TUint32 KSIPDigestRealm = 151; + +/** +* SIP server's address which value is of type TDesC8 +*/ +const TUint32 KSIPServerAddress = 152; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class contains profile information of particular SIP service +* provider. Class provides functions for quering profile parameter +* values. +* @lib sipprofilecli.lib +*/ +class CSIPProfile: public CBase, public MSIPRegistrationContext + { + public: // Constructors and destructor + /** + * Destructor. + * @capability NetworkServices + */ + IMPORT_C ~CSIPProfile(); + + public: // New functions + /** + * Gets profile type information + * @return profile type information + */ + IMPORT_C const TSIPProfileTypeInfo& Type() const; + + /** + * Gets profile parameter + * @param aParam a parameter to get + * @param aVal on return will contain parameter value + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt GetParameter(TUint32 aParam, TDesC8 const *& aVal) const; + + /** + * Gets profile parameter + * @param aParam a parameter to get + * @param aVal on return will contain parameter value + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt GetParameter(TUint32 aParam, TUint32& aVal) const; + + /** + * Gets profile parameter + * @param aParam a parameter to get + * @param aVal on return will contain parameter value + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt GetParameter(TUint32 aParam, TBool& aVal) const; + + /** + * Gets profile parameter + * @param aParam a parameter to get + * @param aVal on return will contain parameter value + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt GetParameter(TUint32 aParam, MDesC8Array const *& aVal) const; + + /** + * Gets profile parameter that is defined for a particular SIP server + * @param aServer a SIP server type + * @param aParam a parameter to get + * @param aVal on return will contain parameter value + * @return KErrNotFound if parameter was not found, KErrNone otherwise + */ + IMPORT_C TInt GetParameter(TUint32 aServerType, TUint32 aParam, TDesC8 const *& aVal) const; + + public: //Functions from base class + /** + * Tests if the registration context can be + * used for creating SIP messages/dialogs + * Profile can be used, when CSIPProfileRegistry::IsEnabled() == ETrue + * and Status() == ERegistered. + * @return ETrue if can be used, EFalse otherwise + * @internalComponent + */ + TBool IsContextActive() const; + + /** + * + * For internal use only + * @return context id + * @internalComponent + */ + TUint32 ContextId() const; + + + public: //New functions + + /** + * Two-phased constructor. + * @param aSIPRegistry a SIP profile client providing connection to SIP + * profile server. + */ + + static CSIPProfile* NewL(CSIPProfileRegistry* aSIPRegistry); + + /** + * Two-phased constructor. + * @param aSIPRegistry a SIP profile client providing connection to SIP + * profile server. + * Constructs an object and adds the pointer to the cleanup stack; + */ + + static CSIPProfile* NewLC(CSIPProfileRegistry* aSIPRegistry); + + /** + * Sets profiles enabled state + * @param aEnabled ETrue if enabled + */ + + void SetEnabled(TBool aEnabled); + + /** + * Sets concrete profile that holds actual data + * @param aProfile profile instance containing data + */ + + void SetConcreteProfile(CSIPConcreteProfile* aProfile); + + /** + * Clears concrete profile that holds actual data + */ + + void ClearConcreteProfile(); + + /** + * Gets concrete profile that holds actual data + * @return concrete profile holding data + */ + + CSIPConcreteProfile& ConcreteProfile(); + + /** + * Gets concrete profile that holds actual data + * @return concrete profile holding data + */ + + const CSIPConcreteProfile& ConcreteProfile() const; + + /** + * Checks if the profile is enabled + * @return ETrue if enabled, EFalse otherwise + */ + + TBool IsEnabled() const; + + /** + * Gets last occurred error during registration + * @return last occurred error code, KErrNone if no error + */ + TInt LastRegistrationError() const; + + /** + * sets pointer to registry for profile + */ + void SetRegistry(CSIPProfileRegistryBase* aRegistry); + + /** + * Clears pointer to registry from profile + */ + void ClearRegistry(); + + protected: + + /** + * Constructor. + */ + CSIPProfile(CSIPProfileRegistryBase* aRegistry); + + /** + * 2nd phase constructor. + */ + void ConstructL(); + + protected: + + /** + * @internalComponent + */ + CSIPConcreteProfile* iSIPProfile; + + /** + * @internalComponent + */ + CSIPProfileRegistryBase* iSIPProfileRegistry; + + private: + + TBool iEnabled; + }; + +#endif // CSIPPROFILE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofilealrcontroller.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofilealrcontroller.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,132 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofilealrcontroller.h +* Part of : SIP / SIP Profile Agent +* Version : SIP/6.0 +* +*/ + + + +#ifndef CSIPPROFILEALRCONTROLLER_H +#define CSIPPROFILEALRCONTROLLER_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS +class CSIPProfileRegistryBase; +class MSipProfileAlrObserver; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* This class provides functions to control +* ALR (Application Level Roaming) for SIP profiles that have +* a SNAP (Service Network Access Point) ID configured. +* By default the clients allow automatic roaming between +* IAPs (Internet Access Point) for a SIP profile. +* The clients wanting to control the roaming must instantiate this class. +* After that all the IAP availability events received through +* MSipProfileAlrObserver::AlrEvent must be allowed or disallowed. +* +* @lib sipprofilecli.lib +*/ +class CSipProfileAlrController : public CBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @param aRegistry a SIP profile registry instance. + * @param aObserver a observer for IAP migration events. + */ + IMPORT_C static CSipProfileAlrController* NewL( + CSIPProfileRegistryBase& aRegistry, + MSipProfileAlrObserver& aObserver ); + + /** + * Two-phased constructor. + * Constructs an object and adds the pointer to the cleanup stack. + * @param aRegistry a SIP profile registry instance. + * @param aObserver a observer for IAP migration events. + */ + IMPORT_C static CSipProfileAlrController* NewLC( + CSIPProfileRegistryBase& aRegistry, + MSipProfileAlrObserver& aObserver ); + + /** + * Destructor. + */ + ~CSipProfileAlrController(); + + public: // New functions + + /** + * Allows SIP Profile Agent to start the migration + * to a new IAP for the profile. + * If also all the other clients allow the migration, + * migration will be started and all the clients are informed + * with MSipProfileAlrObserver::AlrEvent(EMigrationStarted,...). + * When MSipProfileAlrObserver::AlrEvent(EMigrationCompleted,...) + * gets called the migration has been completed and + * the related SIP profile has been registered via the new IAP. + * @param aProfileId the SIP profile id + * @param aIapId the new IAP id. + */ + IMPORT_C void AllowMigrationL( TUint32 aProfileId, + TUint32 aIapId ); + + /** + * Disallows SIP Profile Agent to migrate + * to a new IAP for the profile. + * After the client calls this function all the clients are informed + * with MSipProfileAlrObserver::AlrError(...). + * @param aProfileId the SIP profile id + * @param aIapId the new IAP id. + */ + IMPORT_C void DisallowMigrationL( TUint32 aProfileId, + TUint32 aIapId ); + + /** + * Refreshes the list of available IAPs for + * the SNAP configured for the profile. + * If a new better IAP is available, it is offered via + * MSipProfileAlrObserver::AlrEvent(EIapAvailable,...). + * This function should be called if migration + * to a IAP has been previously disallowed and the client wants to + * check whether the better IAP is still available. + * @param aProfileId the SIP profile id + */ + IMPORT_C void RefreshIapAvailabilityL( TUint32 aProfileId ); + + + private: // Constructors: + + CSipProfileAlrController( CSIPProfileRegistryBase& aRegistry ); + void ConstructL( MSipProfileAlrObserver& aObserver ); + + private: // Data + + CSIPProfileRegistryBase& iRegistry; + + private: // For testing purposes + + friend class CSIPProfileAlrControllerTest; + }; + +#endif // CSIPPROFILEALRCONTROLLER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofilealrobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofilealrobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofilealrobserver.h +* Part of : SIP / SIP Profile Agent +* Version : SIP/6.0 +* +*/ + + + +#ifndef MSIPPROFILEALROBSERVER_H +#define MSIPPROFILEALROBSERVER_H + +// INCLUDES +#include + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Callback to receive notifications about ALR (Application Level Roaming) +* related events and errors. +*/ +class MSipProfileAlrObserver + { + public: + + /** SIP Profile ALR events */ + enum TEvent + { + /** + * A new IAP became available. + * When receiving this event the client must call + * CSipProfileAlrController::AllowMigrationL or DisallowMigrationL. + */ + EIapAvailable = 0, + /** + * All the clients have allowed the migration to the new IAP and + * the migration to the new IAP for the SIP profile has started. + */ + EMigrationStarted, + /** + * Migration to a new IAP for a SIP profile has been completed and + * the related SIP profile has been registered via the new IAP. + */ + EMigrationCompleted + }; + + /** + * ALR related event occurred. + * @param aEvent the event that occurred + * @param aProfileId identifies the SIP profile related to the event + * @param aSnapId the SNAP related to the event + * @param aIapId the IAP related to the event + */ + virtual void AlrEvent( TEvent aEvent, + TUint32 aProfileId, + TUint32 aSnapId, + TUint32 aIapId ) = 0; + + /** + * ALR related error occurred. + * @param aError the error that occurred + * @param aProfileId identifies the SIP profile related to the error + * @param aSnapId the SNAP related to the error + * @param aIapId the IAP related to the error + */ + virtual void AlrError( TInt aError, + TUint32 aProfileId, + TUint32 aSnapId, + TUint32 aIapId ) = 0; + }; + +#endif // MSIPPROFILEALROBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofileregistry.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofileregistry.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,180 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofileregistry.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The class for using SIP profiles +* Version : 1.0 +* +*/ + + + +#ifndef CSIPPROFILEREGISTRY_H +#define CSIPPROFILEREGISTRY_H + +// INCLUDES +#include +#include +#include +#include "sipprofileregistrybase.h" + +// FORWARD DECLARATIONS +class CSIP; +class CSIPConnection; +class CSIPProfile; +class MSIPProfileRegistryObserver; +class MSIPConnectionObserver; + + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* The class for retrieving SIP profiles from permanent storage. +* This class provides services for retreiving SIP profiles +* and enabling/disabling them for the usage. +* +* The user can create only one instance of this class (a singleton class). +* +* @lib sipprofilecli.lib +*/ +class CSIPProfileRegistry: public CSIPProfileRegistryBase + { + public: // Constructors and destructor + /** + * Two-phased constructor. + * This constructor should be used if the client intends + * to use SIP services with profiles. + * @param aSip a SIP client providing connection to SIP stack. + * @param aObserver a observer for SIP profile change events. + */ + IMPORT_C static CSIPProfileRegistry* NewL( + CSIP& aSip, + MSIPProfileRegistryObserver& aObserver); + + /** + * Two-phased constructor. + * This constructor should be used if the client intends + * to use SIP services with profiles. + * Constructs an object and adds the pointer to the cleanup stack; + * @param aSip a SIP client providing connection to SIP stack. + * @param aObserver a observer for SIP profile change events. + */ + IMPORT_C static CSIPProfileRegistry* NewLC( + CSIP& aSip, + MSIPProfileRegistryObserver& aObserver); + + /** + * Destructor + */ + IMPORT_C ~CSIPProfileRegistry(); + + public: // New functions + /** + * Gets handle to the SIP server + * @return handle to the SIP server + */ + IMPORT_C CSIP& SIP() const; + + /** + * Gets the SIP connection to be used with this SIP profile. + * @pre IsEnabled() == ETrue + * @param aProfile a sip profile + * @return a SIP connection to be used; the owneship is transfered + * @leave KErrNoMemory if out of memory + * @capability NetworkServices + */ + IMPORT_C CSIPConnection* ConnectionL( + CSIPProfile& aProfile); + + /** + * Enables the SIP profile for use. + * Enabling the SIP profile will cause the SIP profile to + * be registered if its status was unregistered. + * The user must check the profile status after calling this + * function. In case the profile is not registered the user must + * wait until the it is notified about profile registration + * on MSIPProfileRegistryObserver-callback interface. + * @param aProfile a sip profile to enable + * @param aObserver a observer for SIP connection events + * @leave KErrNotFound if non-existing profile is provided + * @capability NetworkServices + */ + IMPORT_C void EnableL( + CSIPProfile& aProfile, + MSIPConnectionObserver &aObserver); + + /** + * Disables the usage of SIP profile + * @param aProfile a sip profile to disable + * @return KErrNone if SIP profile was successfully disabled; + * system wide error otherwise + * @capability NetworkServices + */ + IMPORT_C TInt Disable(CSIPProfile& aProfile); + + /** + * Tests is the SIP profile enabled for the use + * @param aProfile a SIP profile to be checked + * @return ETrue if SIP profile is enabled; EFalse otherwise + */ + IMPORT_C TBool IsEnabled(const CSIPProfile& aProfile) const; + + /** + * Force disables the usage of SIP profile + * All Profile related activities will be stopped ungracefully + * @param aProfile a sip profile to disable + * @return KErrNone if SIP profile was successfully disabled; + * system wide error otherwise + * @capability NetworkControl + */ + IMPORT_C TInt ForceDisable(CSIPProfile& aProfile); + + /** + * Refreshes the Enabled SIP profile for use. + * Refreshing the Enabled Profile will cause the SIP Profile to + * get Registered if its status was not registered. + * This function has to be used when the profile is in Enabled state and + * might be unregistered due to a connection loss. + * @param aProfile a sip profile to enable + * @leave KErrNotFound if non-existing profile is provided + * @leave KErrArgument if the profile is not previously Enabled and in Unregistered state. + * @capability NetworkServices + */ + + IMPORT_C void RefreshEnableL(CSIPProfile& aProfile); + + public: + + /** + * @internalComponent + */ + CSIPProfile* NewInstanceL(); + + private: + + CSIPProfileRegistry(); + CSIPProfileRegistry(CSIP& aSip, MSIPProfileRegistryObserver& aObserver); + void ConstructL(); + + private: + + CSIP& iSip; + MSIPConnectionObserver* iConnectionObserver; + }; + +#endif // CSIPPROFILEREGISTRY_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofileregistrybase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofileregistrybase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,422 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofileregistrybase.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The class for retrieving SIP profiles from permanent storage. +* Version : 1.0 +* +*/ + + + +#ifndef CSIPPROFILEREGISTRYBASE_H +#define CSIPPROFILEREGISTRYBASE_H + +// INCLUDES +#include +#include +#include "sipconcreteprofileobserver.h" + +// FORWARD DECLARATIONS +class CSIPProfile; +class CSIPConcreteProfile; +class TSIPProfileTypeInfo; +class CSIPProfileCleanupItem; +class CSIPProfileItem; +class CSIPProfileITCReceiver; +class CSIPProfileITC; +class CSIPProfilePlugins; +class MSIPProfileRegistryObserver; +class RSIPProfile; +class CSIPConcreteProfileHolder; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* The class functions for retrieving SIP profiles from permanent storage. +* It enables retrieval of single or more profiles from permanent +* storage located in profile server. +* +* The class enables also the query of supported profile types. +* +* This class is an abstract class and cannot be instantiated. +* +* @lib sipprofilecli.lib +*/ +class CSIPProfileRegistryBase: public CBase, public MSIPConcreteProfileObserver + { + public: // Constructors and destructor + + IMPORT_C ~CSIPProfileRegistryBase(); + + public: //new functions + /** + * Gets all SIP profiles + * @pre aProfiles.Count() == 0 + * @param aProfiles a reference to a client-owned array, which + * on return is filled with all existing SIP profiles + * @leave KErrNoMemory if out of memory + * @capability ReadUserData + */ + IMPORT_C void ProfilesL(RPointerArray& aProfiles); + + /** + * Gets all SIP profiles of particular type + * The owneship of profiles are transferred. + * @pre aProfiles.Count() == 0 + * @param aType a SIP profile type that is used for a query + * @param aProfiles a reference to a client-owned array, which + * on return is filled with profiles of the given type. + * @leave KErrNoMemory if out of memory + * @capability ReadUserData + */ + IMPORT_C void ProfilesL( + const TSIPProfileTypeInfo& aType, + RPointerArray& aProfiles); + + /** + * Gets SIP profile for a particular SIP AOR + * The owneship of profiles are transferred. + * @pre aProfiles.Count() == 0 + * @param aAOR a SIP AOR e.g. user@domain.com + * @param aProfiles a reference to a client-owned array, which + * on return is filled with profiles of the given type. + * @leave KErrNoMemory if out memory + * @capability ReadUserData + */ + IMPORT_C void ProfilesL( + const TDesC8& aAOR, + RPointerArray& aProfiles); + + /** + * Gets SIP profile identified by the Id + * The owneship of profile is transferred. + * @param aId a SIP profile Id + * @return SIP profile + * @leave KErrNotFound if profile is not found + * @capability ReadUserData + */ + IMPORT_C CSIPProfile* ProfileL(TUint32 aId); + + /** + * Gets the default profile + * @return default profile; the owneship is transfered + * @leave KErrNotFound if profile not found + * @leave KErrNoMemory if out of memory + * @capability ReadUserData + */ + IMPORT_C CSIPProfile* DefaultProfileL(); + + /** + * Gets supported profile types + * The owneship of returned objects are transferred. + * @pre aSupportedProfileTypes.Count() == 0 + * @param aSupportedProfileTypes a reference to client-owned array, + * which on return is filled with supported profile types. + * Any existing data in the array is destroyed. + * @leave KErrNoMemory if out of memory + */ + IMPORT_C void SupportedProfileTypesL( + RArray& aSupportedProfileTypes); + + /** + * Gets the last occurred error during registration + * @param aProfile + * @return last occurred registration error, KErrNone if no error + */ + IMPORT_C TInt LastRegistrationError(const CSIPProfile& aProfile) const; + + public: + + /** + * Enable profile + * @param aProfile to be enabled + * @internalComponent + */ + void EnableProfileL(CSIPProfile& aProfile); + + /** + * Gets count of clients that have a profile enabled + * @param aProfile profile to be checked + * @return number of clients that have the profile enabled + * @internalComponent + */ + TInt UsageL(const CSIPProfile& aProfile) const; + + /** + * Disable profile + * @param aProfile to be disabled + * @internalComponent + */ + void DisableProfileL(CSIPProfile& aProfile); + + /** + * Force disable profile + * All Profile related activities will be stopped ungracefully + * @param aProfile to be disabled + * @internalComponent + */ + void ForceDisableProfileL(CSIPProfile& aProfile); + + /** + * Add profile + * @param aProfile to be added + * @internalComponent + */ + void AddProfileL(CSIPProfile& aProfile); + + /** + * Update profile + * @param aProfile to be updated + * @internalComponent + */ + void UpdateProfileL(CSIPProfile& aProfile); + + /** + * Remove profile + * @pre UsageL(aProfile) == 0 + * @param aProfile to be removed + * @internalComponent + */ + void RemoveProfileL(CSIPProfile& aProfile); + + /** + * Informs destruction of local profile object instance + * @param aProfile instance of deleted profile + * @internalComponent + */ + void ProfileDeleted(CSIPProfile& aProfile); + + /** + * Checks whether profile is default or not + * @param aProfile checked profile + * @return ETrue if is default, otherwise EFalse + * @internalComponent + */ + TBool IsDefaultProfileL(const CSIPProfile& aProfile); + + /** + * Updates SIP profile value for negotiated security mechanism; leaves on failure + * @param aProfile a SIP profile + * @internalComponent + */ + void NegotiatedSecurityMechanismL(CSIPConcreteProfile& aProfile); + + /** + * Updates SIP profile value for registered AORs; leaves on failure + * @param aProfile a SIP profile + * @internalComponent + */ + void RegisteredAORsL(CSIPConcreteProfile& aProfile); + + /** + * Gets new instance of either type CSIPProfile or CSIPManagedProfile + * @return new instance + * @internalComponent + */ + virtual CSIPProfile* NewInstanceL() = 0; + + /** + * Roll back in case of failure + * @param aItem object to be cleaned + * @internalComponent + */ + static void CrashRevert (TAny* aItem); + + /** + * Roll back in case of failure + * @param aItem object to be cleaned + * @internalComponent + */ + static void LocalCrashRevert (TAny* aItem); + + /** + * Gets the ITC member variable. + * The owneship of ITC is not transferred. + * @return Reference to ITC member variable. + * @internalComponent + */ + CSIPProfileITC& Itc(); + + /** + * Gets the ITC receiver member variable. + * The owneship of ITC receiver is not transferred. + * @return Reference to ITC receiver member variable. + * @internalComponent + */ + CSIPProfileITCReceiver& ItcReceiver(); + + + public: // From MSIPConcreteProfileObserver + + /** + * SIP profile registration status changed event + * @param aProfileId id of profile which registration + * status has been changed. + * @param aStatus new status of the profile + * @param aStatusId id related to registration + * @internalComponent + */ + void RegistrationStatusChangedL(TUint32 aProfileId, + TInt aStatus, + TUint32 aStatusId); + + /** + * SIP profile creation event. + * @param aProfileId id of new SIP Profile + * @internalComponent + */ + void AddedL(TUint32 aProfileId); + + /** + * SIP profile destruction event. + * @param aProfileId id of profile which was destroyed + * @internalComponent + */ + void RemovedL(TUint32 aProfileId); + + /** + * SIP profile information update event + * @param aProfileId id of updated SIP Profile + * @param aSize size of updated SIP Profile + * @internalComponent + */ + void UpdatedL(TUint32 aProfileId, TUint aSize); + + /** + * An asynchronous error has occurred related to SIP profile + * @param aProfileId the id of failed profile + * @param aStatus + * @param aError a error code + * @internalComponent + */ + void ErrorOccurredL(TUint32 aProfileId, + TInt aStatus, + TInt aError); + + protected: + + /** + * Constructor + * @param aObserver observer to send events to + * @internalComponent + */ + CSIPProfileRegistryBase(MSIPProfileRegistryObserver& aObserver); + + /** + * Symbian 2nd phase base class constructor + * @internalComponent + */ + void BaseConstructL(); + + /** + * Store profile into client cache + * @param aItem a cleanup item for roll back in case of failure + * @internalComponent + */ + void StoreProfileL(CSIPProfileCleanupItem* aItem); + + /** + * Store array of profiles into client cache + * @param aProfiles a array containing the profiles + * @param aRetProfiles returned array containing profiles + * @internalComponent + */ + void StoreArrayL( + RPointerArray& aProfiles, + RPointerArray& aRetProfiles); + + /** + * Gets profile cache item + * @param aProfileId a profile id to be found + * @return local cache item of the profile + * @internalComponent + */ + CSIPProfileItem* ProfileItemL(TUint aProfileId); + + /** + * Gets profile cache item index + * @param aProfileId a profile id to be found + * @return local cache item index of the profile + * @internalComponent + */ + TInt ProfileIndex (TUint aProfileId); + + /** + * Gets profile cache item by index + * @param aIndex a index of the profile to be found + * @return local cache item of the profile + * @internalComponent + */ + CSIPProfileItem* ProfileItemByIndex(TUint aIndex); + + /** + * Gets SIP profile identified by the Id; leaves on failure + * The owneship of profile is transferred. + * @param aId a SIP profile Id + * @param aSize of profile if known + * @return SIP profile or 0 pointer if there's no such SIP profile + * @internalComponent + */ + CSIPProfile* SIPProfileL(TUint32 aId, TInt aSize = 0); + + protected: // Data + + /** + * @internalComponent + */ + RSIPProfile* iSipClient; + + /** + * @internalComponent + */ + CSIPProfileITCReceiver* iITCReceiver; + + /** + * @internalComponent + */ + CSIPProfileITC* iITC; + + /** + * @internalComponent + */ + MSIPProfileRegistryObserver& iObserver; + + /** + * @internalComponent + */ + RPointerArray iProfiles; + + /** + * @internalComponent + */ + CSIPProfilePlugins* iProfilePlugins; + + /** + * @internalComponent + */ + CSIPProfileItem* iFindEntry; + + private: + + void ProfilesCommonL(RPointerArray& aProfiles, + CSIPConcreteProfileHolder* aHolder); + + }; + +#endif // CSIPPROFILEREGISTRYBASE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofileregistryobserver.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofileregistryobserver.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,120 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofileregistryobserver.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The observer class for monitoring SIP profiles. +* Version : 1.0 +* +*/ + + + +#ifndef MSIPPROFILEOREGISTRYBSERVER_H +#define MSIPPROFILEOREGISTRYBSERVER_H + +// INCLUDES +#include +#include + +// FORWARD DECLARATIONS + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* The observer class for monitoring SIP profiles. +* Class must be implemented by the user in order to +* observe changes in the SIP profiles. +*/ +class MSIPProfileRegistryObserver + { + public: + /** Profile Registry events */ + enum TEvent + { + /** + * Signals the creation of a SIP profile, indicating that a new + * profile is added into permanent store. This event is sent to + * all observers. + */ + EProfileCreated = 0, + /** + * Signals the updating of a SIP profile, indicating that the data of + * an existing profile is updated into permanent store. This event is + * sent to those observers who have the corresponding profile + * instantiated. + * Newly updated values of the profile are available for clients after + * they receive this signal.If profile was registered while updated, + * reregistration of the profile may occur. Updated values of the + * profile are uploaded into network when SIP registration process + * is completed.It is possible (but not recommended) that profile is + * updated even when it is being enabled by the client. If client + * receives this event for enabled profile, client should react as if + * error was occurred in the exception that profile is disabled + * or deleted first. + */ + EProfileUpdated, + /** + * Signals the changing of the registration status of a SIP profile + * to registered. + * This event is sent to those observers who have the corresponding + * profile instantiated. + */ + EProfileRegistered, + /** + * Signals the changing of the registration status of a SIP profile + * to deregistered. + * This event is sent to those observers who have the corresponding + * profile instantiated. + */ + EProfileDeregistered, + /** + * Signals the destruction of a SIP profile, indicating that the + * profile has been removed from the permanent store and cannot + * be used anymore.This event is sent to those observers who have + * the corresponding profile instantiated. + */ + EProfileDestroyed, + /** + * Signals the force disabling of a SIP profile, indicating that + * all the users attached to the profile are detached. This event + * is sent to all the observers but ForceDisable API can be invoked + * only by application with Network Control capability. + */ + EProfileForciblyDisabled + }; + + /** + * An event related to SIP Profile has accorred + * @param aProfileId a profile Id + * @param aEvent an occurred event + **/ + virtual void ProfileRegistryEventOccurred(TUint32 aProfileId, + TEvent aEvent)=0; + + /** + * An asynchronous error has occurred related to SIP profile + * Event is send to those observers, who have the + * corresponding profile instantiated. + * @param aProfileId the id of failed profile + * @param aError an occurred error + */ + virtual void ProfileRegistryErrorOccurred(TUint32 aProfileId, + TInt aError)=0; + }; + +#endif // MSIPPROFILEOREGISTRYBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofileservercrkeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofileservercrkeys.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,50 @@ +/* +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofileservercrkeys.h +* Part of : SIP ProfileAgent API +* +*/ + + + +#ifndef PROFILESERVERCRKEYS_H_ +#define PROFILESERVERCRKEYS_H_ + +// INCLUDES +#include + +/** +* @file +* @publishedAll +* @released +*/ + +/** +* Key space configuration used by the SIP ProfileAgent. +*/ +const TUid KCRUidProfileSrv = { 0x2001F889 }; + +#define KSIPProfileTableMask 0xFF000000 +#define KSIPProfileTableShift 24 + +#define KSIPProfileTypeMask 0x00FF0000 +#define KSIPProfileTypeShift 16 + +#define KSIPProfilePropertyMask 0x0000FFFF +#define KSIPProfilePropertyShift 0 + +#define KSIPProfilePropertiesTable 0x01000000 + +#endif /*PROFILESERVERCRKEYS_H_*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipprofiletypeinfo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipprofiletypeinfo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipprofiletypeinfo.h +* Part of : SIP Profile Client +* Interface : SDK API, SIP Profile API +* The class provides a container for the profile type information +* Version : 1.0 +* +*/ + + + +#ifndef TSIPPROFILETYPEINFO_H +#define TSIPPROFILETYPEINFO_H + +// INCLUDES +#include + +// FORWARD DECLARATIONS + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Container for the profile type information. +* +* @lib sipprofilecli.lib +*/ +class TSIPProfileTypeInfo + { + public: + + /** Profile type name */ + typedef TBuf8<25> TSIPProfileName; + + /** Profile classes */ + enum TSIPProfileClass + { + /** Network compliant with IETF standards */ + EInternet, + /** Network compliant with 3GPP standards */ + EIms, + /** Other */ + EOther, + EMaxSIPProfileClass + }; + + public: // data members + + /** Profile class */ + TSIPProfileClass iSIPProfileClass; + + /** Profile type name */ + TSIPProfileName iSIPProfileName; + }; + +#endif // TSIPPROFILETYPEINFO_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipproxyauthenticateheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipproxyauthenticateheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,100 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipproxyauthenticateheader.h +* Part of : SIP Codec +* Version : SIP/5.0 +* +*/ + + + +#ifndef CSIPPROXYAUTHENTICATEHEADER_H +#define CSIPPROXYAUTHENTICATEHEADER_H + +// INCLUDES +#include "sipauthenticateheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for SIP Proxy-Authenticate-header manipulation. +* +* @lib sipcodec.lib +*/ +class CSIPProxyAuthenticateHeader : public CSIPAuthenticateHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPProxyAuthenticateHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Proxy-Authenticate"-header + * @return a new instance of CSIPProxyAuthenticateHeader + */ + IMPORT_C static CSIPProxyAuthenticateHeader* + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPProxyAuthenticateHeader + * @return a new instance of CSIPProxyAuthenticateHeader + */ + IMPORT_C static CSIPProxyAuthenticateHeader* + NewL(RStringF aAuthScheme); + + /** + * Creates a new instance of CSIPProxyAuthenticateHeader + * @return a new instance of CSIPProxyAuthenticateHeader + */ + IMPORT_C static CSIPProxyAuthenticateHeader* + NewLC(RStringF aAuthScheme); + + /** + * Destructor + */ + IMPORT_C ~CSIPProxyAuthenticateHeader(); + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + private: // Constructors + + CSIPProxyAuthenticateHeader(); + + private: // For testing purposes + + UNIT_TEST(CSIPProxyAuthenticateHeaderTest) + }; + +#endif // CSIPPROXYAUTHENTICATEHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipproxyauthorizationheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipproxyauthorizationheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipproxyauthorizationheader.h +* Part of : SIP Codec +* Version : SIP/6.0 +* +*/ + + + +#ifndef CSIPPROXYAUTHORIZATIONHEADER_H +#define CSIPPROXYAUTHORIZATIONHEADER_H + +// INCLUDES +#include "sipauthorizationheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for SIP Proxy-Authorization-header manipulation. +* +* @lib sipcodec.lib +*/ +class CSIPProxyAuthorizationHeader : public CSIPAuthorizationHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPProxyAuthorizationHeader + * from textual representation of the header's value part. + * @param aValue a value part of a "Proxy-Authenticate"-header + * @return a new instance of CSIPProxyAuthorizationHeader + */ + IMPORT_C static CSIPProxyAuthorizationHeader* + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPProxyAuthorizationHeader + * @return a new instance of CSIPProxyAuthorizationHeader + */ + IMPORT_C static CSIPProxyAuthorizationHeader* + NewL(RStringF aAuthScheme); + + /** + * Creates a new instance of CSIPProxyAuthorizationHeader + * @return a new instance of CSIPProxyAuthorizationHeader + */ + IMPORT_C static CSIPProxyAuthorizationHeader* + NewLC(RStringF aAuthScheme); + + /** + * Creates a deep-copy of a CSIPAuthorizationHeaderBase + * @param aAuthenticateHeaderBase to be copied + * @return a new instance of CSIPProxyAuthorizationHeader + */ + IMPORT_C static CSIPProxyAuthorizationHeader* + NewL(const CSIPAuthorizationHeaderBase& aHeader); + + /** + * Creates a deep-copy of a CSIPAuthorizationHeaderBase + * @param aAuthenticateHeaderBase to be copied + * @return a new instance of CSIPProxyAuthorizationHeader + */ + IMPORT_C static CSIPProxyAuthorizationHeader* + NewLC(const CSIPAuthorizationHeaderBase& aHeader); + + /** + * Destructor + */ + IMPORT_C ~CSIPProxyAuthorizationHeader(); + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ExternalizeSupported + */ + IMPORT_C TBool ExternalizeSupported() const; + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + public: // New functions, for internal use + + /** + * @internalComponent + */ + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + /** + * @internalComponent + */ + static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + private: // Constructors + + CSIPProxyAuthorizationHeader(); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // For testing purposes + + UNIT_TEST(CSIPProxyAuthorizationHeaderTest) + }; + +#endif // CSIPPROXYAUTHORIZATIONHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipproxyrequireheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipproxyrequireheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipproxyrequireheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPPROXYREQUIREHEADER_H +#define CSIPPROXYREQUIREHEADER_H + +// INCLUDES +#include "siptokenheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in +* SIP "Proxy-Require" header. +* +* @lib sipcodec.lib +*/ +class CSIPProxyRequireHeader : public CSIPTokenHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPProxyRequireHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Proxy-Require"-header + * @return an array containing 1..n instances of CSIPProxyRequireHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPProxyRequireHeader + * @param aValue a tag value + * @return a new instance of CSIPProxyRequireHeader + */ + IMPORT_C static CSIPProxyRequireHeader* NewL(RStringF aValue); + + /** + * Creates a new instance of CSIPProxyRequireHeader + * and puts it to CleanupStack + * @param aValue a tag value + * @return a new instance of CSIPProxyRequireHeader + */ + IMPORT_C static CSIPProxyRequireHeader* NewLC(RStringF aValue); + + /** + * Destructor, deletes the resources of CSIPProxyRequireHeader. + */ + IMPORT_C ~CSIPProxyRequireHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPProxyRequireHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPProxyRequireHeader + */ + IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, For internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPProxyRequireHeader(); + CSIPProxyRequireHeader(const CSIPProxyRequireHeader& aHeader); + }; + +#endif // end of CSIPPROXYREQUIREHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprackheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprackheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,190 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprackheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPRACKHEADER_H +#define CSIPRACKHEADER_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting sequence number and +* method in SIP "RAck"-header. +* +* @lib sipcodec.lib +*/ +class CSIPRAckHeader : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPRAckHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "RAck"-header (e.g. "1 2 INVITE") + * @return a new instance of CSIPRAckHeader. + */ + IMPORT_C static CSIPRAckHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPRAckHeader + * @param aSeq a sequence number to set + * @param aCSeqNum a sequence number from CSeq-header + * @param aMethod a method to set. For example "REGISTER" + * @return a new instance of CSIPRAckHeader + */ + IMPORT_C static CSIPRAckHeader* NewL(TUint aSeq, + TUint aCSeqNum, + RStringF aMethod); + + + /** + * Creates a new instance of CSIPRAckHeader and puts it to CleanupStack + * @param aSeq a sequence number to set + * @param aCSeqNum a sequence number from CSeq-header + * @param aMethod a method to set. For example "REGISTER" + * @return a new instance of CSIPRAckHeader + */ + IMPORT_C static CSIPRAckHeader* NewLC(TUint aSeq, + TUint aCSeqNum, + RStringF aMethod); + + /** + * Destructor, deletes the resources of CSIPRAckHeader. + */ + IMPORT_C ~CSIPRAckHeader(); + + + public: // New functions + + /** + * Gets the sequence number from the "RAck" header + * @return the current sequence number + */ + IMPORT_C TUint Seq() const; + + /** + * Sets the sequence number in the "RAck" header + * @param aSeq a sequence number to set + */ + IMPORT_C void SetSeq(TUint aSeq); + + /** + * Gets the sequence number from the "RAck" header + * @return the current sequence number + */ + IMPORT_C TUint CSeqNum() const; + + /** + * Sets the sequence number in the "RAck" header + * @param aCSeqNum a sequence number to set + */ + IMPORT_C void SetCSeqNum(TUint aCSeqNum); + + /** + * Gets the method from the "RAck" header + * @return the method + */ + IMPORT_C RStringF Method() const; + + /** + * Sets the method in the "RAck" header + * @param aMethod a method to set + */ + IMPORT_C void SetMethodL(RStringF aMethod); + + /** + * Constructs an instance of a CSIPRAckHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPRAckHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL (RWriteStream& aWriteStream) const; + + private: // Constructors + + CSIPRAckHeader(); + CSIPRAckHeader(TUint aSeq, TUint aCSeqNum); + void ConstructL(RStringF aMethod); + void ConstructL(const CSIPRAckHeader& aRAckHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + void ParseL(const TDesC8& aValue); + void SetMethodL(const TDesC8& aMethod); + + private: // Data + + TUint iSeq; + TUint iCSeqNum; + RStringF iMethod; + + private: // For testing purposes + + UNIT_TEST(CSIPRAckHeaderTest) + }; + +#endif // CSIPRACKHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipreferdialogassoc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipreferdialogassoc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,287 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipreferdialogassoc.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPREFERDIALOGASSOC_H +#define CSIPREFERDIALOGASSOC_H + +// INCLUDES +#include "sipdialogassocbase.h" + +// CONSTANTS + +// FORWARD DECLARATIONS +class CUri8; +class CSIPToHeader; +class CSIPFromHeader; +class CSIPContactHeader; +class CSIPReferToHeader; +class MSIPRegistrationContext; +class CSIPConnection; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP REFER dialog associations. +* It provides services for creating, using and terminating SIP REFER +* dialog associations. User can have multiple REFER dialog associations +* per same SIP dialog. +* Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, +* local and remote tags; +* User is responsible for "Refer-to" header semantics. +* @lib sipclient.lib +*/ +class CSIPReferDialogAssoc: public CSIPDialogAssocBase + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * Should be used if response to the SIP request to be sent + * will create a SIP dialog association. + * @pre aReferTo != 0 + * @param aDialog a dialog to be associated with + * @param aReferTo referred-to resource + * @return New object; the ownership is transferred + * @leave KErrArgument if aReferTo == 0 + */ + IMPORT_C static CSIPReferDialogAssoc* + NewL(CSIPDialog& aDialog, + CSIPReferToHeader* aReferTo); + + /** + * Two-phased constructor. + * Must be used if response to the SIP request to be sent + * will create a SIP dialog association. + * @pre aReferTo != 0 + * @param aDialog a dialog to be associated with + * @param aReferTo referred-to resource + * @return New object; the ownership is transferred + * @leave KErrArgument if aReferTo == 0 + */ + IMPORT_C static CSIPReferDialogAssoc* + NewLC(CSIPDialog& aDialog, + CSIPReferToHeader* aReferTo); + + /** + * Two-phased constructor + * @pre aFrom != 0 + * @pre aReferTo != 0 + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @param aConnection a SIP connection to be used with + * dialog association + * @param aFrom originator's address; the ownership is transfered + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is addressed to. + * @param aReferTo referred-to resource + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aFrom == 0 or aRemoteuri == 0 or aReferTo == 0 + */ + IMPORT_C static CSIPReferDialogAssoc* + NewL(CSIPConnection& aConnection, + CSIPFromHeader* aFrom, + CUri8* aRemoteUri, + CSIPReferToHeader* aReferTo, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aFrom != 0 + * @pre aReferTo != 0 + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @param aConnection a SIP connection to be used with + * dialog association + * @param aFrom originator's address; the ownership is transfered + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is addressed to. + * @param aReferTo referred-to resource + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aFrom == 0 or aRemoteuri == 0 or aReferTo == 0 + */ + IMPORT_C static CSIPReferDialogAssoc* + NewLC(CSIPConnection& aConnection, + CSIPFromHeader* aFrom, + CUri8* aRemoteUri, + CSIPReferToHeader* aReferTo, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aReferTo != 0 + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @pre aContext.IsContextActive() == ETrue + * @param aConnection a SIP connection to be used with + * dialog association + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is targeted to. + * @param aContext used for selecting outbound + * proxy and originator's address (AOR) and contact + * @param aReferTo referred-to resource + * @param aFrom originator's address. If not defined it will + * constructed using registration context (User's AOR); + * the ownership is transfered + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object: the ownership is transferred. + * @leave KErrArgument if aRemoteuri == 0 or aReferTo == 0 + * @leave KErrSIPInvalidRegistrationState + * if aContext.IsContextActive() == EFalse + */ + IMPORT_C static CSIPReferDialogAssoc* + NewL(CSIPConnection& aConnection, + CUri8* aRemoteUri, + const MSIPRegistrationContext& aContext, + CSIPReferToHeader* aReferTo, + CSIPFromHeader* aFrom=0, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aReferTo != 0 + * @pre aRemoteUri != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @pre aContext.IsContextActive()==ETrue + * @param aConnection a SIP connection to be used with + * dialog association + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is targeted to. + * @param aContext used for selecting outbound + * proxy and originator's address (AOR) and contact + * @param aReferTo referred-to resource + * @param aFrom originator's address. If not defined it will + * constructed using registration context (User's AOR); + * the ownership is transfered + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aRemoteuri == 0 or aReferTo == 0 + * @leave KErrSIPInvalidRegistrationState + * if aContext.IsContextActive() == EFalse + */ + IMPORT_C static CSIPReferDialogAssoc* + NewLC(CSIPConnection& aConnection, + CUri8* aRemoteUri, + const MSIPRegistrationContext& aContext, + CSIPReferToHeader* aReferTo, + CSIPFromHeader* aFrom=0, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Destructor + */ + IMPORT_C ~CSIPReferDialogAssoc(); + + public: //New functions + + /** + * Creates REFER and sends it to the remote target. + * leaves on failure. + * 101-199 or 2xx response will create REFER dialog + * association in case of first REFER request within + * this dialog association. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EInit || + * Dialog().State()==CSIPDialog::EConfirmed + * @param aElements optional SIP message headers and body. Ownership is + * transferred. + * @return REFER SIP transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if dialog is in wrong state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted. + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendReferL(CSIPMessageElements* aElements=0); + + /** + * Gets referred-to resouce + * @return referred-to resource + */ + IMPORT_C const CSIPReferToHeader& ReferTo() const; + + public: // New functions, for internal use + + /** + * Sends a REFER request. + * + * @pre Dialog().Connection().State()==EActive + * @param aElements optional SIP message headers and body. + * Ownership is transferred. + * @param aWithinDialog ETrue if REFER is sent within dialog, + * EFalse if REFER creates the dialog. + * @return REFER SIP transaction. Ownership is transferred. + */ + CSIPClientTransaction* DoSendReferL(CSIPMessageElements* aElements, + TBool aWithinDialog); + + private: // Constructors + + CSIPReferDialogAssoc(); + + static CSIPReferDialogAssoc* NewLC(CSIPConnection& aConnection, + CUri8* aRemoteUri, + CSIPReferToHeader* aReferTo, + CSIPFromHeader* aFrom, + CSIPToHeader* aTo, + CSIPContactHeader* aContact, + const MSIPRegistrationContext* aContext); + + private: // Data + + CSIPReferToHeader* iReferTo; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprefertoheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprefertoheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,137 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprefertoheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPREFERTOHEADER_H +#define CSIPREFERTOHEADER_H + +// INCLUDES +#include "sipaddressheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPHeaderGenericParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP +* "Refer-To" header. +* +* @lib sipcodec.lib +*/ +class CSIPReferToHeader : public CSIPAddressHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPReferToHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Refer-To"-header + * (e.g. "User ") + * @return a new instance of CSIPReferToHeader + */ + IMPORT_C static CSIPReferToHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPReferToHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred. + * @return a new instance of CSIPReferToHeader + */ + IMPORT_C static CSIPReferToHeader* NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPReferToHeader and puts it to CleanupStack + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred, + * @return a new instance of CSIPReferToHeader + */ + IMPORT_C static CSIPReferToHeader* NewLC(CSIPAddress* aSIPAddress); + + /** + * Destructor, deletes the resources of CSIPReferToHeader. + */ + IMPORT_C virtual ~CSIPReferToHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPReferToHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPReferToHeader + */ + IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPReferToHeader(); + + private: // For testing purposes + + UNIT_TEST(CSIPReferToHeaderTest) + }; + +#endif // end of CSIPREFERTOHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprefresh.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprefresh.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,250 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprefresh.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + + +#ifndef CSIPREFRESH_H +#define CSIPREFRESH_H + +// INCLUDES +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPClientTransaction; +class CSIPMessageElements; +class MSIPRefreshAssociation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP refresh. +* It provides functions for getting associated sip transaction +* and state. Class also provides functions for updating and terminating +* stand-alone refreshes. +* +* Note that only stand-alone refreshes (i.e. refreshes that are not associated +* with registration binding or dialog associations) can be terminated or +* updated using functions defined in this class. +* +* @lib sipclient.lib +*/ +class CSIPRefresh: public CBase + { + public: + + /** SIP refresh states */ + enum TState + { + /** SIP refresh is inactive */ + EInactive, + /** SIP refresh active */ + EActive, + /** SIP refresh is terminated */ + ETerminated, + /** Object is being constructed and is not yet ready for use */ + EConstructing + }; + + public: // Constructors and destructor + + /** + * Two-phased constructor + * @return New object. Ownership is transferred. + */ + IMPORT_C static CSIPRefresh* NewL(); + + /** + * Two-phased constructor + * @return New object. Ownership is transferred. + */ + IMPORT_C static CSIPRefresh* NewLC(); + + /** + * Destructor + */ + IMPORT_C ~CSIPRefresh(); + + public: // New functions + + /** + * Gets the state of the refresh + * @return refresh state + */ + IMPORT_C CSIPRefresh::TState State() const; + + /** + * Tests if the refresh is a stand-alone refresh + * @return ETrue if refresh is a stand-alone; EFalse otherwise + */ + IMPORT_C TBool IsStandAlone() const; + + /** + * Gets the associated SIP transaction with this refresh. + * + * @return Associated SIP transaction or 0-pointer. Ownership is not + * transferred. + */ + IMPORT_C const CSIPClientTransaction* SIPTransaction() const; + + /** + * Terminates the refresh by sending SIP request to the remote + * destination. The new client transactation will be of the same type + * as the first transaction associated with this request. + * @pre State()==EActive + * @pre IsStandAlone()==ETrue + * @param aElements contains optional SIP message headers and body. + * Ownership is transferred. + * @return SIP client transaction. Ownership is transferred. + * @leave KErrSIPInvalidTransactionState if State() is not EActive + * KErrNotFound if the CSIPRefresh is no longer associated to + * anything + * KSIPErrInvalidRegistrationState if trying to terminate a + * REGISTER refresh. + * KErrSIPInvalidDialogState if trying to terminate a dialog + * association being refreshed. + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + TerminateL(CSIPMessageElements* aElements=0); + + /** + * Updates the refresh by sending SIP request to the remote destination. + * The new client transactation will be of the same type as the first + * transaction associated with this request. + * @pre State()==EActive + * @pre IsStandAlone()==ETrue + * @param aElements contains optional SIP message headers and body. + * Ownership is transferred. + * @return SIP client transaction. Ownership is transferred. + * @leave KErrSIPInvalidTransactionState if State() is not EActive + * KErrNotFound if the CSIPRefresh is no longer associated to + * anything + * KErrSIPInvalidRegistrationState if trying to update a + * REGISTER refresh. + * KSIPErrInvalidDialogState if trying to update a + * dialog association being refreshed. + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + UpdateL(CSIPMessageElements* aElements=0); + + /** + * Compares this object to another object + * @param aRefresh a CSIPRefresh type object to compare + * @return ETrue if the objects are equal otherwise EFalse + */ + IMPORT_C TBool operator==(const CSIPRefresh& aRefresh) const; + + /** + * Gets current refresh interval + * @pre State()==CSIPRefresh::EActive + * @return current refresh interval in seconds + * @leave KErrSIPInvalidTransactionState if State() is not EActive + * @leave KErrSIPResourceNotAvailable if SIP server can't be contacted + * because a required resource has been deleted. + */ + IMPORT_C TUint IntervalL() const; + + /** + * Sets refresh interval. + * Note that SIP server choses the refresh interval. This function should + * be used only if SIP server has indicated new refresh interval using + * SIP messages that are not associated to the refresh needing the update. + * @pre State()==CSIPRefresh::EActive + * @pre aInterval > 0 + * @param aInterval a new interval in seconds + * @leave KErrArgument if aInterval == 0 + * @leave KErrSIPInvalidTransactionState if State() is not EActive + * @leave KErrSIPResourceNotAvailable if SIP server can't be contacted + * because a required resource has been deleted. + */ + IMPORT_C void SetIntervalL(TUint aInterval); + + public: // New functions, for internal use + + TBool DoesMatch(TUint32 aRefreshId) const; + + /** + * Associate the CSIPRefresh with another object. + * @param aAssoc Object associated with the CSIPRefresh + * @return ETrue if the objects are equal otherwise EFalse + */ + void SetRefreshOwner(MSIPRefreshAssociation& aAssoc); + + void RemoveRefreshOwner(const MSIPRefreshAssociation& aAssoc); + + void ChangeState(CSIPRefresh::TState aNextState); + + void UpdateRefreshState(TUint aStatusCode); + + TUint32 RefreshId() const; + + void SetRefreshIdIfEmpty(TUint32 aRefreshId); + + RStringF RequestType() const; + + void SetRequestType(RStringF aType); + + void AddTransaction(CSIPClientTransaction& aTransaction); + + void RemoveTransaction(); + + CSIPClientTransaction* Transaction(); + + private: // Constructors + + CSIPRefresh(); + + void ConstructL(); + + private: + + void CheckStateL() const; + + private: // Data + + MSIPRefreshAssociation* iOwner; + + //Client transaction which is refreshed, not owned by CSIPRefresh. + CSIPClientTransaction* iClientTransaction; + + //Current state of the refresh + TState iState; + + //RefreshId received from SIP client + TUint32 iRefreshId; + + //Identifies the request method which is being refreshed + RStringF iRequestType; + + private: // For testing purposes + + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPConnection_Test) + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipregistrationbinding.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipregistrationbinding.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,336 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipregistrationbinding.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPREGISTRATIONBINDING_H +#define CSIPREGISTRATIONBINDING_H + +// INCLUDES +#include "sipregistrationcontext.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CUri8; +class CSIPToHeader; +class CSIPFromHeader; +class CSIPContactHeader; +class CSIPRouteHeader; +class CSIPMessageElements; +class CSIPConnection; +class CSIPRefresh; +class CSIPClientTransaction; +class CRegBindingImplementation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP registration binding. +* Class provides functions for creating and updating SIP registration bindings. +* +* @lib sipclient.lib +*/ +class CSIPRegistrationBinding : + public CBase, + public MSIPRegistrationContext + { + public: // Constructors and destructor + + /** + * Two-phased constructor. + * @pre aAor != 0 && + * aContact != 0 + * @pre "Expires" parameter in aContact must be >= KSIPMinExpirationValue + * @param aConnection a SIP connection to be used + * @param aAor contains user's address-of-record to register; + * the ownership is transfered + * @param aContact contact(s) to be registered. The "expires" parameter + * indicates how long the client would like the binding to be + * valid. + * "expires" parameter value must be >= KSIPMinExpirationValue; + * the ownership is transfered + * @param aRefresh if set, created binding will be refreshed; + * the ownership is transfered + * @param aOutboundProxy an outbound proxy address; + * the ownership is transfered + * @param aRemoteUri if set, will be used in request-uri construction; + * the ownership is transfered + * @param aFrom From header, the ownership is transferred + * @return New object, ownership is transferred. + * @leave KErrArgument if aAor == 0, aContact == 0 or if "Expires" + * parameter in aContact is less than KSIPMinExpirationValue + */ + IMPORT_C static CSIPRegistrationBinding* + NewL(CSIPConnection& aConnection, + CSIPToHeader* aAor, + CSIPContactHeader* aContact, + CSIPRefresh* aRefresh=0, + CSIPRouteHeader* aOutboundProxy=0, + CUri8* aRemoteUri=0, + CSIPFromHeader* aFrom=0); + + /** + * Two-phased constructor. + * @pre aAor != 0 && + * aContact != 0 + * @pre "Expires" parameter in aContact must be >= KSIPMinExpirationValue + * @param aConnection a SIP connection to be used + * @param aAor contains user's address-of-record to register; + * the ownership is transfered + * @param aContact contact to be registered; The "expires" parameter + * indicates how long the client would like the binding to be + * valid. + * "expires" parameter value must be >= KSIPMinExpirationValue; + * the ownership is transfered + * @param aRefresh if set, created binding will be refreshed; + * the ownership is transfered + * @param aOutboundProxy an outbound proxy address; + * the ownership is transfered + * @param aRemoteUri if set, will be used in request-uri construction; + * the ownership is transfered + * @param aFrom From header, the ownership is transferred + * @return New object, ownership is transferred. + * @leave KErrArgument if aAor == 0, aContact == 0 or if "Expires" + * parameter in aContact is less than KSIPMinExpirationValue + */ + IMPORT_C static CSIPRegistrationBinding* + NewLC(CSIPConnection& aConnection, + CSIPToHeader* aAor, + CSIPContactHeader* aContact, + CSIPRefresh* aRefresh=0, + CSIPRouteHeader* aOutboundProxy=0, + CUri8* aRemoteUri=0, + CSIPFromHeader* aFrom=0); + + /** + * Destructor + */ + IMPORT_C ~CSIPRegistrationBinding(); + + public: //From MSIPRegistrationContext: + + /** + * Checks if the registration context can be + * used for creating SIP messages/dialogs + * @return ETrue if the registration binding exists; EFalse + * otherwise + */ + IMPORT_C TBool IsContextActive() const; + + /** + * Gets the context id + * @return context id + * For internal use only + */ + IMPORT_C TUint32 ContextId() const; + + public: // New functions + /** + * Creates SIP REGISTER request, sends it to the given destination. + * Received 2xx response will create at least one registration + * binding. + * @pre Connection().State()==EActive + * @param aElements contains user SIP headers and content; the ownership + * is taken + * @return SIP REGISTER transaction; the ownership is transfered + * @leave KErrSIPMalformedMessage if aElements contains contact or + * expires headers + * @leave KErrSIPInvalidRegistrationState if already registered or + * registering is in progress or deregistering is in progress. + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + RegisterL(CSIPMessageElements* aElements=0); + + /** + * Creates SIP (de)REGISTER request, sends it to the given destination. + * This function will remove registration binding. + * Any SIP response (2xx - 6xx) to this request removes the binding. + * Note that deregistration can be done then the 2xx is received to the + * initial REGISTER transaction and there is no on-going registration + * updates. + * @pre Connection().State()==EActive + * @pre IsContextActive()==ETrue + * @param aElements contains user SIP headers and content; the ownership + * is transfered. If set, user SIP headers must not contain any + * Contact-header nor Expires-header + * @return SIP REGISTER transaction; the ownership is transfered + * @leave KErrSIPInvalidRegistrationState if IsContextActive()==EFalse + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + DeregisterL(CSIPMessageElements* aElements=0); + + /** + * Updates the registration binding. Note that update can be done + * then the 2xx is received to the REGISTER transaction that relates + * to the initial registration or to update. + * @pre aElements!=0 + * @pre Connection().State()==EActive + * @pre IsContextActive()==ETrue + * @param aElements contains user SIP header and content, must not + * contain any Contact-header nor Expires-header; + * the ownership is transferred. + * @return SIP REGISTER transaction; the ownership is transfered + * @leave KErrArgument if aElements == NULL + * @leave KErrSIPInvalidRegistrationState if IsContextActive()==EFalse + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* UpdateL(CSIPMessageElements* aElements); + + /** + * Updates the regisration binding. Note that update can be done + * then the 2xx is received to the REGISTER transaction that relates + * to the initial registration or to update. + * @pre aExpirationValue >= KSIPMinExpirationValue + * @pre Connection().State()==EActive + * @pre IsContextActive()==ETrue + * @param aExpirationValue a new expiration value in seconds + * @param aElements contains user SIP headers and content; must not + * contain any Contact-header nor Expires-header; + * the ownership is transferred. + * @return SIP REGISTER transaction; the ownership is transfered + * @leave KErrSIPInvalidRegistrationState if IsContextActive()==EFalse + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + UpdateL(TUint aExpirationValue, CSIPMessageElements* aElements=0); + + /** + * Gets the SIP connection used for the registration. + * @return SIP connection used for the registration, or 0-pointer if the + * connection has been deleted. Ownership is not transferred. + */ + IMPORT_C CSIPConnection* Connection(); + + /** + * Gets the SIP connection used for the registration. + * @return SIP connection used for the registration, or 0-pointer if the + * connection has been deleted. Ownership is not transferred. + */ + IMPORT_C const CSIPConnection* Connection() const; + + /** + * Sets/resets outbound proxy. + * If a 0-pointer is given the outbound proxy will be reset. + * @param aOutboundProxy an outbound proxy. Ownership is transferred. + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C void SetOutboundProxyL(CSIPRouteHeader* aOutboundProxy); + + /** + * Gets the address-of-record (AOR) used for creating binding + * @return address-of-record (AOR) + */ + IMPORT_C const CSIPToHeader& Aor() const; + + /** + * Gets Contact header associated with the registration binding + * @return Contact header + */ + IMPORT_C const CSIPContactHeader& ContactHeader() const; + + /** + * Gets Contact header associated with the registration binding + * @return Contact header + */ + IMPORT_C CSIPContactHeader& ContactHeader(); + + /** + * Gets used outbound proxy + * @return outbound proxy or a 0-pointer if not set. Ownership is not + * transferred. + */ + IMPORT_C const CSIPRouteHeader* OutboundProxy() const; + + /** + * Gets associated refresh in case the user has requested the refresh of + * the registration. Note that client cannot use update or terminate + * functions defined in the CSIPRefresh class. + * @return Associated refresh or a 0-pointer if the user has not + * requested a refresh of registration binding. Ownership is not + * transferred. + */ + IMPORT_C const CSIPRefresh* SIPRefresh() const; + + /** + * Gets associated refresh in case the user has requested the refresh of + * the registration. Note that client cannot use update or terminate + * functions defined in the CSIPRefresh class. + * @return Associated refresh or a 0-pointer if the user has not + * requested a refresh of registration binding. Ownership is not + * transferred. + */ + IMPORT_C CSIPRefresh* SIPRefresh(); + + /** + * Compares this object to another object + * @param aRegistration CSIPRegistrationBinding object to compare + * @return ETrue if the objects are equal, otherwise EFalse + */ + IMPORT_C TBool + operator==(const CSIPRegistrationBinding& aRegistration) const; + + /** + * Gets the registered Contact-header received in the 200 OK response. + * @return Contact header, or NULL if IsContextActive() is EFalse. + * Ownership is not transferred. + */ + IMPORT_C const CSIPContactHeader* RegisteredContact() const; + + public: // New functions, for internal use + /** + * Returns the implementation instance. + * + * @return CRegBindingImplementation + */ + CRegBindingImplementation& Implementation(); + + private: // Constructors + CSIPRegistrationBinding(); + + void ConstructL(CSIPConnection& aConnection, + CSIPToHeader* aAor, + CSIPContactHeader* aContacts, + CSIPRefresh* aRefresh, + CSIPRouteHeader* aOutboundProxy, + CUri8* aRemoteUri, + CSIPFromHeader* aFrom); + + private: // Data + CRegBindingImplementation* iImplementation; + + private: // For testing purposes + + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPRegistrationBinding_Test) + UNIT_TEST(CSIPInviteDialogAssoc_Test) + UNIT_TEST(CSIPSubscribeDialogAssoc_Test) + UNIT_TEST(CSIPReferDialogAssoc_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipregistrationcontext.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipregistrationcontext.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,68 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipregistrationcontext.h +* Part of : SIP Client +* Interface : SDK API, SIP API +* Version : 1.0 +* +*/ + + + + +#ifndef MSIPREGISTRATIONCONTEXT_H +#define MSIPREGISTRATIONCONTEXT_H + +// INCLUDES +#include + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* The interface for providing +* information for the SIP request and +* dialog creation. +* +* @lib n/a +*/ +class MSIPRegistrationContext + { + public: // New functions + /** + * Destructor + */ + virtual ~MSIPRegistrationContext() {} + + /** + * Checks if the registration context can be + * used for creating SIP messages/dialogs + * + * @return ETrue if can be used, EFalse otherwise + */ + virtual TBool IsContextActive() const = 0; + + /** + * Gets the context id. + * + * @return Context id + * For internal use only + */ + virtual TUint32 ContextId() const = 0; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipreplytoheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipreplytoheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,128 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipreplytoheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPREPLYTOHEADER_H +#define CSIPREPLYTOHEADER_H + +// INCLUDES +#include "sipaddressheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPHeaderGenericParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP +* "Reply-To" header. +* +* @lib sipcodec.lib +*/ +class CSIPReplyToHeader : public CSIPAddressHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPReplyToHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Refer-To"-header + * (e.g. "User ") + * @return a new instance of CSIPReplyToHeader + */ + IMPORT_C static CSIPReplyToHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPReplyToHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred. + * @return a new instance of CSIPReplyToHeader + */ + IMPORT_C static CSIPReplyToHeader* NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPReplyToHeader and puts it to CleanupStack + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred, + * @return a new instance of CSIPReplyToHeader + */ + IMPORT_C static CSIPReplyToHeader* NewLC(CSIPAddress* aSIPAddress); + + /** + * Destructor, deletes the resources of CSIPReplyToHeader. + */ + IMPORT_C virtual ~CSIPReplyToHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPReplyToHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPReplyToHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPReplyToHeader(); + + private: // For testing purposes + + UNIT_TEST(CSIPReplyToHeaderTest) + }; + +#endif // end of CSIPREPLYTOHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprequestelements.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprequestelements.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprequestelements.h +* Part of : SIP Client +* Interface : SDK API, SIP API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPREQUESTELEMENTS_H +#define CSIPREQUESTELEMENTS_H + +// INCLUDES +#include +#include +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPMessageElements; +class CSIPFromHeader; +class CSIPToHeader; +class CSIPCSeqHeader; +class CURIContainer; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class provides functions for creation and manipulation of originator's and +* recipient's addresses in a SIP request. It also provide functions for +* manipulation of SIP method for unknown SIP requests. +* @lib sipclient.lib +*/ +class CSIPRequestElements : public CBase + { + public: // Constructors and destructor + /** + * Two-phased constructor. + * If the URI is SIP URI, no SIP URI headers are allowed. + * @pre aRemoteURi != 0 + * @param aRemoteUri Remote target URI that identifies a resource that + * the request is addressed to. The ownership is transferred. + */ + IMPORT_C static CSIPRequestElements* NewL(CUri8* aRemoteUri); + + /** + * Two-phased constructor. + * If the URI is SIP URI, no SIP URI headers are allowed. + * @pre aRemoteURi != 0 + * @param aRemoteUri Remote target URI that identifies a resource that + * the request is addressed to. The ownership is transferred. + */ + IMPORT_C static CSIPRequestElements* NewLC(CUri8* aRemoteUri); + + /** + * Destructor. + */ + IMPORT_C ~CSIPRequestElements(); + + public: // New functions + /** + * Sets/resets the recipient's To-header + * To-header must not contain tag-parameter. + * @pre aTo != 0 + * @param aTo a To-header to be set, the ownership is transferred. + */ + IMPORT_C void SetToHeaderL(CSIPToHeader* aTo); + + /** + * Gets the recipient's To-header + * @return To-header or a 0-pointer if not present. Ownership is not + * transferred. + */ + IMPORT_C const CSIPToHeader* ToHeader() const; + + /** + * Sets/resets the originator's From-header. + * From-header must not contain tag-parameter. + * @pre aFrom != 0 + * @param aFrom a From-header to be set, the ownership is transferred. + * @leave KErrArgument if aFrom == 0 + */ + IMPORT_C void SetFromHeaderL(CSIPFromHeader* aFrom); + + /** + * Gets the originator's From-header + * @return From-header or a 0-pointer if not present. Ownership is not + * transferred. + */ + IMPORT_C const CSIPFromHeader* FromHeader() const; + + /** + * Gets CSeq-header. Available for only incoming requests. + * @return a CSeq-header or a 0-pointer if not present. + * Ownership is not transferred. + */ + IMPORT_C const CSIPCSeqHeader* CSeqHeader() const; + + /** + * Sets the remote URI. + * If the URI is a SIP URI, no SIP URI headers are allowed. + * @pre aRemoteUri != 0 + * @param aRemoteUri + * @leave KErrArgument if aRemoteUri==0 + */ + IMPORT_C void SetRemoteUriL(CUri8* aRemoteUri); + + /** + * Gets the remote target URI + * @return remote target URI + */ + IMPORT_C const CUri8& RemoteUri() const; + + /** + * Sets the SIP request method + * @param aMethod a SIP method name. + * @leave KErrArgument if method name given is syntactically + * incorrect + */ + IMPORT_C void SetMethodL(RStringF aMethod); + + /** + * Gets the SIP Method for a request + * @return a SIP method name or a an empty string if the method + * is not defined + */ + IMPORT_C RStringF Method() const; + + /** + * Gets message elements (contains all SIP user headers and content) + * @return message elements + */ + IMPORT_C const CSIPMessageElements& MessageElements() const; + + /** + * Gets message elements (contains all SIP user headers and content) + * The response elements can be populated with SIP user headers + * and content using returned reference to the message elements. + * @return message elements + */ + IMPORT_C CSIPMessageElements& MessageElements(); + + public: // New functions, for internal use + static CSIPRequestElements* InternalizeL (RReadStream& aReadStream); + void ExternalizeL (RWriteStream& aWriteStream) const; + + private: + CSIPRequestElements(); + void ConstructL(CUri8* aRemoteUri); + void DoInternalizeL(RReadStream& aReadStream); + + private: // Data + RStringF iMethod; + CURIContainer* iRemoteURI; + CSIPMessageElements* iMessageElements; + + private: // For testing purposes + UNIT_TEST(CSIPRequestElementsTest) + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprequireheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprequireheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprequireheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPREQUIREHEADER_H +#define CSIPREQUIREHEADER_H + +// INCLUDES +#include "siptokenheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in +* SIP "Require" header. +* +* @lib sipcodec.lib +*/ +class CSIPRequireHeader : public CSIPTokenHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPRequireHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Require"-header + * @return an array containing 1..n instances of CSIPRequireHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPRequireHeader + * @param aValue a tag value + * @return a new instance of CSIPRequireHeader + */ + IMPORT_C static CSIPRequireHeader* NewL(RStringF aValue); + + /** + * Creates a new instance of CSIPRequireHeader + * and puts it to CleanupStack + * @param aValue a tag value + * @return a new instance of CSIPRequireHeader + */ + IMPORT_C static CSIPRequireHeader* NewLC(RStringF aValue); + + /** + * Destructor, deletes the resources of CSIPRequireHeader. + */ + IMPORT_C ~CSIPRequireHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPRequireHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPRequireHeader + */ + IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, For internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPRequireHeader(); + CSIPRequireHeader(const CSIPRequireHeader& aHeader); + }; + +#endif // end of CSIPREQUIREHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipresolvedclient.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipresolvedclient.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,109 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : SipResolvedClient.h +* Part of : SDK API, SIP Client Resolver API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPRESOLVEDCLIENT_H +#define CSIPRESOLVEDCLIENT_H + +// INCLUDES +#include +#include + +//FORWARD DECLARATIONS +class CSIPHeaderBase; +class CSIPContentTypeHeader; + +// CONSTANTS +/** Interface UID of this ECOM interface*/ +const TUid KSIPResolvedClientIFUid = { 0x102010dd }; + +// CLASS DEFINITION +/** +* @publishedAll +* @released +* +* Interface that clients must realize +* in order to enable client resolution mechanism upon the reception +* of SIP request outside the SIP dialog. Data provided in +* the ECOM resource file or optionally requested from the interface implementation +* will be used for target client determination by the SIP implementation. +* Note that channel UIDs must be unique accross all SIP clients e.g. clients may +* use UIDs assigned for binaries. +*/ +class CSIPResolvedClient : public CBase + { + public: // Destructor + + /** + * Destructor + */ + virtual inline ~CSIPResolvedClient(); + + public: // Abstract methods + + /** + * Returns the SIP client's channel UID that indicates client's + * channel UID for connection with SIP e.g. CSIP::NewL() + * @param aMethod the method of the SIP request + * @param aRequestUri the request-URI of the SIP request + * @param aHeaders all the headers in the SIP request + * @param aContent SIP request body; zero-length descriptor if not present + * @param aContentType the content-type of the SIP request. + * Zero-pointer if body is not present. + * @return SIP client's communication channel's UID + */ + virtual TUid ChannelL(RStringF aMethod, + const TDesC8& aRequestUri, + const RPointerArray& aHeaders, + const TDesC8& aContent, + const CSIPContentTypeHeader* aContentType=0) = 0; + + /** + * Requests the client to connect to SIP with resolved + * UID in case there's no connection with resolved channel UID. + * @param aUid previously resolved channel UID + * @leave KErrNoMemory if out of memory + * @leave KErrNotFound in case non-existing channel UID was provided + */ + virtual void ConnectL(TUid aUid) = 0; + + /** + * Requests the implementation to provide capabilities in XML format + * in case they were not defined in the ECOM resource file. The cabablities + * to be returned must be defined according to the same DTD. + * This function will be invoked only if the capabilities are not + * defined in the ECOM resource file. + */ + virtual const TDesC8& Capabilities(); + + public: // Data + + /// Unique key for implementations of this interface. + TUid iInstanceKey; + + protected: // Constructors: + + inline CSIPResolvedClient(); + }; + +#include + +#endif // CSIPRESOLVEDCLIENT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipresolvedclient2.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipresolvedclient2.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,230 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipresolvedclient2.h +* Part of : SIP Client Resolver API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPRESOLVEDCLIENT2_H +#define CSIPRESOLVEDCLIENT2_H + +// INCLUDES +#include +#include +#include +#include +#include +#include +#include + +// FORWARD DECLARATIONS +class CSdpMediaField; + +// CONSTANTS +/** Interface UID of this ECOM interface*/ +const TUid KSIPResolvedClient2IFUid = { 0x10282EE5 }; + +// CLASS DEFINITION +/** +* @publishedAll +* @released +* +* Interface that SIP stack's clients must realize +* in order to be able to receive incoming SIP requests outside SIP dialogs. +* Note that channel UIDs must be unique accross all SIP clients +* e.g. clients may use UIDs assigned for binaries. +* +* SIP stack utilizes the plug-ins that implement +* this interface in the following manner: +* +* 1) If the SIP request does not contain Accept-Contact-header(s), go to step 2. +* SIP stack calls CSIPResolvedClient2::MatchAcceptContactsL +* for all the plug-ins and applies the following logic: +* a) None of the clients match -> go to step 2 +* b) One client matches -> the SIP request is routed to the matching client +* c) Several clients match -> go to step 2 +* +* 2) If the SIP request does not contain Event-header, go to step 3. +* SIP stack calls CSIPResolvedClient2::MatchEventL +* for all the plug-ins and applies the following logic: +* a) None of the clients match -> go to step 3 +* b) One client matches -> the SIP request is routed to the matching client +* c) Several clients match -> go to step 3 +* +* 3) SIP stack calls CSIPResolvedClient2::MatchRequestL for all the plug-ins. +* a) None of the clients match -> SIP generates an error response +* b) One client matches -> the SIP request is routed to the matching client +* c) Several clients match -> +* SIP picks one of these clients randomly and routes the request to it. +* The ROM-based clients are preferred. +*/ +class CSIPResolvedClient2 : public CBase + { + public: // Destructor + + /** + * Destructor + */ + inline ~CSIPResolvedClient2(); + + public: // Abstract methods + + /** + * Matches the Accept-Contact-headers + * to the client(s) represented by this plug-in. + * This function is called for an incoming SIP request + * if it contains Accept-Contact-header(s). + * @param aMethod the method of the SIP request + * @param aRequestUri the request-URI of the SIP request + * @param aHeaders all the headers in the SIP request + * @param aContent SIP request body; + * zero-length descriptor if not present + * @param aContentType the content-type of the SIP request. + * Zero-pointer if body is not present. + * @param aClientUid indicates client's UID for + * SIP e.g. the one passed as a parameter to CSIP::NewL(). + * @return ETrue, if the Accept-Contact-headers match to the client + * represented by this plug-in, otherwise EFalse. + */ + virtual TBool MatchAcceptContactsL( + RStringF aMethod, + const CUri8& aRequestUri, + const RPointerArray& aHeaders, + const TDesC8& aContent, + const CSIPContentTypeHeader* aContentType, + TUid& aClientUid) = 0; + + /** + * Matches the Event-header to the client(s) represented by this plug-in. + * This function is called for an incoming SIP request, + * if it contains an Event-header and + * MatchAcceptContactsL returned EFalse. + * @param aMethod the method of the SIP request + * @param aRequestUri the request-URI of the SIP request + * @param aHeaders all the headers in the SIP request + * @param aContent SIP request body; + * zero-length descriptor if not present + * @param aContentType the content-type of the SIP request. + * Zero-pointer if body is not present. + * @param aClientUid indicates client's UID for + * SIP e.g. the one passed as a parameter to CSIP::NewL(). + * @return ETrue, if the Event-header matches to the client + * represented by this plug-in, otherwise EFalse. + */ + virtual TBool MatchEventL( + RStringF aMethod, + const CUri8& aRequestUri, + const RPointerArray& aHeaders, + const TDesC8& aContent, + const CSIPContentTypeHeader* aContentType, + TUid& aClientUid) = 0; + + /** + * Matches the whole SIP request to the client(s) + * represented by this plug-in. + * This function is called if the SIP request does not contain + * Accept- or Event-headers or + * MatchAcceptContactsL and MatchEventL returned EFalse. + * @param aMethod the method of the SIP request + * @param aRequestUri the request-URI of the SIP request + * @param aHeaders all the headers in the SIP request + * @param aContent SIP request body; + * zero-length descriptor if not present + * @param aContentType the content-type of the SIP request. + * Zero-pointer if body is not present. + * @param aClientUid indicates client's UID for + * SIP e.g. the one passed as a parameter to CSIP::NewL(). + * @return ETrue, if the request can be handled by the client + * represented by this plug-in, otherwise EFalse. + */ + virtual TBool MatchRequestL( + RStringF aMethod, + const CUri8& aRequestUri, + const RPointerArray& aHeaders, + const TDesC8& aContent, + const CSIPContentTypeHeader* aContentType, + TUid& aClientUid) = 0; + + /** + * Indicates whether the plug-in implements CSIPResolvedClient2::ConnectL + * and by calling CSIPResolvedClient2::ConnectL + * SIP stack is able to force the client to connect to SIP stack. + * @return ETrue, if the plug-in supports + * CSIPResolvedClient2::ConnectL, otherwise EFalse. + */ + virtual TBool ConnectSupported() = 0; + + /** + * Requests the client to connect to SIP with + * the resolved UID in case there's no client connection with the UID. + * @param aClientUid previously resolved client UID + */ + virtual void ConnectL(const TUid& aClientUid) = 0; + + /** + * Cancels a ConnectL request for a client. + * Is called when for example a CANCEL for an INVITE is received + * before the client connects to SIP stack. + * @param aClientUid a UID for which ConnectL was previously called + */ + virtual void CancelConnect(const TUid& aClientUid) = 0; + + /** + * Gets all the SIP message content types supported by the client. + * @return 0..n SIP Content-Type-headers. + * The ownership of the headers is transferred. + */ + virtual RPointerArray + SupportedContentTypesL() = 0; + + /** + * Gets all the SDP media-fields supported by the client. + * @return 0..n SDP media-fields describing the client's media support. + * The ownership of the media-fields is transferred. + */ + virtual RPointerArray + SupportedSdpMediasL() = 0; + + + /** + * Adds client specific SIP-headers for the 200 OK for OPTIONS. + * Each plug-in must check that the header to be added + * is not yet in the array. For example when adding header + * "Allow: INVITE" the client must check that + * the header is not already present in the array. + * @param aHeaders headers to be added to 200 OK for OPTIONS. + * The ownership of the added headers is transferred to the caller. + */ + virtual void AddClientSpecificHeadersForOptionsResponseL( + RPointerArray& aHeaders) = 0; + + public: // Data + + /// Unique key for implementations of this interface. + TUid iInstanceKey; + + TUid iImplementationUid; + + protected: // Constructors: + + inline CSIPResolvedClient2(); + }; + +#include "sipresolvedclient2.inl" + +#endif // CSIPRESOLVEDCLIENT2_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipresponseelements.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipresponseelements.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,158 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipresponseelements.h +* Part of : SIP Client +* Interface : SDK API, SIP API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPRESPONSEELEMENTS_H +#define CSIPRESPONSEELEMENTS_H + +// INCLUDES +#include +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPMessageElements; +class CSIPFromHeader; +class CSIPToHeader; +class CSIPCSeqHeader; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class provides services for creating and manipulating SIP responses +* This class is used for creating and manipulating SIP responses including +* status code, reason phrase and optional elements such user headers, +* content and its type. +* +* @lib sipclient.lib +*/ +class CSIPResponseElements : public CBase + { + public: // Constructors and destructor + /** + * Two-phased constructor. + * @pre aStatusCode > 100 && aStatusCode < 700 + * @param aStatusCode a known SIP response status code. Cannot be 100. + * @param aReasonPhrase a SIP response reason phrase. + */ + IMPORT_C static CSIPResponseElements* NewL(TUint aStatusCode, + RStringF aReasonPhrase); + + /** + * Two-phased constructor. + * @pre aStatusCode > 100 && aStatusCode < 700 + * @param aStatusCode a known SIP response status code. Cannot be 100. + * @param aReasonPhrase a SIP response reason phrase. + */ + IMPORT_C static CSIPResponseElements* NewLC(TUint aStatusCode, + RStringF aReasonPhrase); + + /** + * Destructor. + */ + IMPORT_C ~CSIPResponseElements(); + + public: // New functions + /** + * Sets a SIP Response extension status code. It is not possible to set + * value 100. + * @pre aStatusCode > 100 && aStatusCode < 700 + * @param aStatusCode extension status code + * @leave KErrArgument if aStatusCode < 100 or aStatusCode >= 700 + */ + IMPORT_C void SetStatusCodeL(TUint aStatusCode); + + /** + * Gets the SIP Response status code + * @return SIP Response status code + */ + IMPORT_C TUint StatusCode() const; + + /** + * Sets a SIP Response Reason Phrase. + * @param aReasonPhrase a SIP response reason phrase. + */ + IMPORT_C void SetReasonPhraseL(RStringF aReasonPhrase); + + /** + * Gets a SIP Response Reason Phrase. + * @return a SIP response reason phrase or an empty string if + * the reason phrase is not defined. + */ + IMPORT_C RStringF ReasonPhrase() const; + + /** + * Gets the originator's From-header + * @return a From-header or a 0-pointer if not present. Ownership is + * not transferred. + */ + IMPORT_C const CSIPFromHeader* FromHeader() const; + + /** + * Gets the recipient's To-header + * @return a To-header or a 0-pointer if not present. Ownership is + * not transferred. + */ + IMPORT_C const CSIPToHeader* ToHeader() const; + + /** + * Gets CSeq-header + * @return a CSeq-header or a 0-pointer if not present. Ownership is + * not transferred. + */ + IMPORT_C const CSIPCSeqHeader* CSeqHeader() const; + + /** + * Gets message elements (contains all SIP user headers and content) + * @return message elements + */ + IMPORT_C const CSIPMessageElements& MessageElements() const; + + /** + * Gets message elements (contains all SIP user headers and content) + * The response elements can be populated with SIP user headers + * and content using returned reference to the message elements. + * @return message elements + */ + IMPORT_C CSIPMessageElements& MessageElements(); + + public: // New functions, for internal use + static CSIPResponseElements* InternalizeL (RReadStream& aReadStream); + static CSIPResponseElements* InternalizeLC (RReadStream& aReadStream); + void ExternalizeL (RWriteStream& aWriteStream) const; + + private: + CSIPResponseElements(); + void ConstructL(TUint aStatusCode, RStringF aReasonPhrase); + void DoInternalizeL (RReadStream& aReadStream); + + private: // Data + TUint iStatusCode; + RStringF iReasonPhrase; + CSIPMessageElements* iMessageElements; + }; + +#endif // end of CSIPRESPONSEELEMENTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipretryafterheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipretryafterheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipretryafterheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPRETRYAFTERHEADER_H +#define CSIPRETRYAFTERHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPRetryAfterHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting parameters in SIP +* "Retry-After" header. +* +* @lib sipcodec.lib +*/ +class CSIPRetryAfterHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPRetryAfterHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Retry-After"-header + * (e.g. "18000;duration=3600") + * @return a new instance of CSIPRetryAfterHeader + */ + IMPORT_C static CSIPRetryAfterHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPRetryAfterHeader + * @param aRetryAfter a retry after value. + * @return a new instance of CSIPRetryAfterHeader + */ + IMPORT_C static CSIPRetryAfterHeader* NewL(TUint aRetryAfter); + + /** + * Creates a new instance of CSIPRetryAfterHeader + * On return the new instance has left to the CleanupStack. + * @param aRetryAfter a retry after value. + * @return a new instance of CSIPRetryAfterHeader + */ + IMPORT_C static CSIPRetryAfterHeader* NewLC(TUint aRetryAfter); + + /** + * Destructor, deletes the resources of CSIPRetryAfterHeader. + */ + IMPORT_C virtual ~CSIPRetryAfterHeader(); + + + public: // New functions + + /** + * Sets the retry after value + * @param aValue a new retry after value to set. + */ + IMPORT_C void SetRetryAfter(TUint aValue); + + /** + * Gets the retry after value + * @return a retry after value + */ + IMPORT_C TUint RetryAfter() const; + + /** + * Gets the comment value + * @return a comment value or KNullDesC8 + */ + IMPORT_C const TDesC8& Comment() const; + + /** + * Gets the value of the "duration"-parameter + * @return the "duration"-parameter, or + * KErrNotFound if the parameter is not present. + */ + IMPORT_C TInt DurationParam() const; + + /** + * Sets the "duration"-parameter + * @pre aDurationParam >= 0 + * @param aDurationParam a "duration"-parameter value to set + */ + IMPORT_C void SetDurationParamL(TInt aDurationParam); + + /** + * Constructs an instance of a CSIPRetryAfterHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPRetryAfterHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPRetryAfterHeader(); + CSIPRetryAfterHeader(TUint aRetryAfter); + void ConstructL(); + void ConstructL(const CSIPRetryAfterHeader& aRetryAfterHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + TUint iRetryAfter; + HBufC8* iComment; + CSIPRetryAfterHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPRetryAfterHeaderTest) + }; + +#endif // end of CSIPRETRYAFTERHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprouteheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprouteheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,122 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprouteheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPROUTEHEADER_H +#define CSIPROUTEHEADER_H + +// INCLUDES +#include "siprouteheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for SIP "Route"-header manipulation. +* +* @lib sipcodec.lib +*/ +class CSIPRouteHeader : public CSIPRouteHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPRouteHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Route"-header + * @return an array containing one to many instances of CSIPRouteHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPRouteHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred + * @return a new instance of CSIPRouteHeader + */ + IMPORT_C static CSIPRouteHeader* NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPRouteHeader and puts it to CleanupStack + * @pre aSIPAddress != 0 + * @pre aSIPAddress->Address().HostPort().HasHost() == ETrue + * @param aSIPAddress a name-address, the ownership is transferred + * @return a new instance of CSIPRouteHeader + */ + IMPORT_C static CSIPRouteHeader* NewLC(CSIPAddress* aSIPAddress); + + /** + * Destructor, deletes the resources of CSIPRouteHeader. + */ + IMPORT_C ~CSIPRouteHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CCSIPRouteHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPRouteHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + static CSIPRouteHeader* NewL(const CSIPRouteHeaderBase& aHeader); + + private: // From CSIPHeaderbase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // Constructors + + CSIPRouteHeader(); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + }; + +#endif // CSIPROUTEHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprouteheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprouteheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,122 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprouteheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPROUTEHEADERBASE_H +#define CSIPROUTEHEADERBASE_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPAddress; +class CSIPHeaderGenericParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for "Route"-, "Record-Route"- and "Service-Route"-headers. +* +* @lib sipcodec.lib +*/ +class CSIPRouteHeaderBase : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPRouteHeaderBase. + */ + IMPORT_C virtual ~CSIPRouteHeaderBase(); + + + public: // New functions + + /** + * Sets the name-address + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred + */ + IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); + + /** + * Gets the name-address as const + * @return name-address + */ + IMPORT_C const CSIPAddress& SIPAddress() const; + + /** + * Gets the name-address + * @return name-address + */ + IMPORT_C CSIPAddress& SIPAddress(); + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + protected: // Contructors + + CSIPRouteHeaderBase(); + void ConstructL(); + void ConstructL(CSIPAddress* aSIPAddress); + void ConstructL(const CSIPRouteHeaderBase& aRouteHeaderBase); + + protected: // Data + + /** + * @internalComponent + */ + CSIPAddress* iSIPAddress; + + /** + * @internalComponent + */ + CSIPHeaderGenericParams* iParams; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // For testing purposes + + UNIT_TEST(CSIPRouteHeaderBaseTest) + }; + +#endif // CSIPROUTEHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siprseqheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siprseqheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,108 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siprseqheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPRSEQHEADER_H +#define CSIPRSEQHEADER_H + +// INCLUDES +#include "sipunsignedintheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class encapsulates a "RSeq"-header value. +* +* @lib sipcodec.lib +*/ +class CSIPRSeqHeader : public CSIPUnsignedIntHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPRSeqHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "RSeq"-header (e.g. "123") + * @return a new instance of CSIPRSeqHeader + */ + IMPORT_C static CSIPRSeqHeader* DecodeL(const TDesC8& aValue); + + /** + * Constructor + * @param aValue the value to set + */ + IMPORT_C CSIPRSeqHeader(TUint aValue); + + /** + * Destructor, deletes the resources of CSIPRSeqHeader. + */ + IMPORT_C ~CSIPRSeqHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPRSeqHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized header object (header name not included). + * @return an instance of a CSIPRSeqHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // For testing purposes + + UNIT_TEST(CSIPRSeqHeaderTest) + }; + +#endif // CSIPRSEQHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipsdkcrkeys.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipsdkcrkeys.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +/* +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipcrkeys.h +* Part of : SIP API +* Version : SIP/6.0 +* +*/ + + + +#ifndef SIPCRKEYS_H +#define SIPCRKEYS_H + +// INCLUDES +#include + +/** +* @file +* @publishedAll +* @released +*/ + +/** +* Defines configuration parameters used by the SIP stack. +*/ +const TUid KCRUidSIP = { 0x101FED88 }; + +/** +* Defines SIP transaction timer T1 in milliseconds as per RFC3261. +*/ +const TUint32 KSIPTransactionTimerT1 = 0x01; + +/** +* Defines SIP transaction timer T2 in milliseconds as per RFC3261. +*/ +const TUint32 KSIPTransactionTimerT2 = 0x02; + +/** +* Defines SIP transaction timer T4 in milliseconds as per RFC3261. +*/ +const TUint32 KSIPTransactionTimerT4 = 0x03; + +/** +* Defines SIP transaction timer T1 for LAN Bearer in milliseconds as per RFC3261. +*/ +const TUint32 KSIPTransactionTimerLANT1 = 0x0b; + +/** +* Defines SIP transaction timer T2 for LAN Bearer in milliseconds as per RFC3261. +*/ +const TUint32 KSIPTransactionTimerLANT2 = 0x0c; + +/** +* Defines SIP transaction timer T4 for LAN Bearer in milliseconds as per RFC3261. +*/ +const TUint32 KSIPTransactionTimerLANT4 = 0x0d; + +#endif // SIPCRKEYS_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipsecurityclientheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipsecurityclientheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,122 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipsecurityclientheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPSECURITYCLIENTHEADER_H +#define CSIPSECURITYCLIENTHEADER_H + +// INCLUDES +#include "sipsecurityheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "Security-Client" +* header fields. +* +* @lib sipcodec.lib +*/ +class CSIPSecurityClientHeader : public CSIPSecurityHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPSecurityClientHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Security-Client"-header + * @return an array containing 1..n instances of CSIPSecurityClientHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPSecurityClientHeader + * @param aMechanism a Mechanism-Name parameter + * in the "Security-Client" header + * @return a new instance of CSIPSecurityClientHeader + */ + IMPORT_C static CSIPSecurityClientHeader* + NewL(const TDesC8& aMechanism); + + /** + * Creates a new instance of CSIPSecurityClientHeader + * and puts it to CleanupStack + * @param aMechanism a Mechanism-Name parameter + * in the "Security-Client" header + * @return a new instance of CSIPSecurityClientHeader + */ + IMPORT_C static CSIPSecurityClientHeader* + NewLC(const TDesC8& aMechanism); + + /** + * Destructor, deletes the resources of CSIPSecurityClientHeader. + */ + IMPORT_C ~CSIPSecurityClientHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPSecurityClientHeader + * from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPSecurityClientHeader + */ + + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // New functions + + CSIPSecurityClientHeader() ; + + private: // For testing purposes + + UNIT_TEST(CSIPSecurityHeaderBaseTest) + }; + +#endif // CSIPSECURITYCLIENTHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipsecurityheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipsecurityheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,125 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipsecurityheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPSECURITYHEADERBASE_H +#define CSIPSECURITYHEADERBASE_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPSecurityHeaderBaseParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for Security-Client, Security-Server and Security-Verify. +* +* @lib sipcodec.lib +*/ +class CSIPSecurityHeaderBase : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPSecurityHeaderBase. + */ + IMPORT_C virtual ~CSIPSecurityHeaderBase(); + + public: // New functions + + /** + * Gets the value of "q"-parameter + * @return the "q"-parameter value, zero if not present + */ + IMPORT_C TReal PreferenceParam() const; + + /** + * Sets the "q"-parameter value + * @param aPreferenceValue a "q"-parameter value to set + */ + IMPORT_C void SetPreferenceParamL(TReal aPreferenceValue); + + /** + * Gets the Mechanism-Name from the Security header + * @return a Mechanism-Name + */ + IMPORT_C const TDesC8& MechanismName() const; + + /** + * Sets the Mechanism-Name in the Security header + * @param aMechanismName a Mechanism-Name + */ + IMPORT_C void SetMechanismNameL(const TDesC8& aMechanismName); + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool MoreThanOneAllowed() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + protected: // Constructors + + CSIPSecurityHeaderBase(); + void ConstructL(); + void ConstructL(const TDesC8& aMechanismName); + void ConstructL(const CSIPSecurityHeaderBase& aSecurityHeaderBase); + + protected: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Data + + HBufC8* iMechanismName; + CSIPSecurityHeaderBaseParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPSecurityHeaderBaseTest) + }; + +#endif // CSIPSECURITYHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipservertransaction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipservertransaction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,190 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipservertransaction.h +* Part of : SIP Client +* Interface : SDK API, SIP API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPSERVERTRANSACTION_H +#define CSIPSERVERTRANSACTION_H + +// INCLUDES +#include "siptransactionbase.h" + +// FORWARD DECLARATIONS +class CSIPRequestElements; +class MSIPResponseSender; +class CSIPConnection; +class CSIPDialogImplementation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP server transactions. +* It provides services for creating, ending +* and getting SIP transaction parameters. +* Client cannot instantiate this class. +* +* @lib sipclient +*/ +class CSIPServerTransaction: public CSIPTransactionBase + { + public: // Destructor + + /** + * Destructor + */ + IMPORT_C ~CSIPServerTransaction(); + + public: // New functions + + /** + * Sends response and ends the transaction; + * The user must not send 100 Trying response. Leaves on failure. + * @pre aElements!=0 + * @pre State()==ETrying || State()==EProceeding + * @pre CSIPConnection::State()==EActive + * @pre ResponseAllowed()==ETrue + * @param aElements contains Status Code, optional Reason Phrase and + * optional SIP message headers and body. Ownership is transferred. + * @leave KErrArgument if aElements == NULL + * @leave KErrGeneral if ResponseAllowed() == EFalse + * @leave KErrSIPInvalidTransactionState if State()!=ETrying and + * State()!=EProceeding + * @leave KErrSIPInvalidDialogState if sending response to a request + * within dialog, and the dialog is in terminated state. + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + * @capability NetworkServices + */ + IMPORT_C void SendResponseL(CSIPResponseElements *aElements); + + /** + * Gets the request elements + * @return Request elements. Ownership is not transferred. + */ + IMPORT_C const CSIPRequestElements* RequestElements() const; + + /** + * Checks if the response sending is allowed for this server + * transaction. For instance response is not allowed in ACK transaction. + * @return ETrue if response sending is allowed, EFalse otherwise + */ + IMPORT_C TBool ResponseAllowed() const; + + public: // New functions, for internal use + + /** + * Sets a new respose sender, replacing the current sender. + * + * @param aSender Response sender to be used from now on. Ownership is + * transferred. + */ + void SetResponseSender(MSIPResponseSender* aSender); + + /** + * If the request was received inside a dialog, returns the dialog. + * + * @return CSIPDialogImplementation* The dialog inside which the request + * was received, or NULL. Ownership is not transferred. + */ + CSIPDialogImplementation* Dialog() const; + + /** + * Obtains the associated CSIPConnection instance. If connection can't + * be accessed anymore, this function leaves. + * + * @return CSIPConnection + */ + CSIPConnection& SIPConnectionL(); + + /** + * Update the MTransactionAssociation to point to aAssociation. + * + * @param aAssociation Associated object + */ + void ReAssociateL(MTransactionAssociation& aAssociation); + + /** + * Removes, but does not delete, request elements from + * aServerTransaction. + * + * @param aServerTransaction Server transaction from which response + * elements are removed. Ownership is not transferred. + */ + static void DetachRequestElements(TAny* aServerTransaction); + + public: // Constructors, for internal use + /** + * Creates a server transaction. + * + * @param aRequestId RequestId for the transaction to use + * @param aAssociation Object with which the transaction is associated + * @param aElements Request elements. Ownership is transferred. + * @return New object. Ownership is transferred. + */ + static CSIPServerTransaction* + NewL(TUint32 aRequestId, + MTransactionAssociation& aAssociation, + CSIPRequestElements* aElements); + + /** + * Creates a server transaction and pushes it to cleanup stack. + * + * @param aRequestId RequestId for the transaction to use + * @param aAssociation Object with which the transaction is associated + * @param aElements Request elements. Ownership is transferred. + * @return New object. Ownership is transferred. + */ + static CSIPServerTransaction* + NewLC(TUint32 aRequestId, + MTransactionAssociation& aAssociation, + CSIPRequestElements* aElements); + + private: // Constructors + CSIPServerTransaction(TUint32 aRequestId, + MTransactionAssociation& aAssociation); + + /** + * Second phase constructor. + * + * @pre aElements!=0 + * @param aElements Request elements. Ownership is transferred. + */ + void ConstructL(CSIPRequestElements* aElements); + + private: // Data + CSIPRequestElements* iRequestElements; + + //This interface is used for sending the response. + //CSIPServerTransaction owns iResponseSender. + MSIPResponseSender* iResponseSender; + + private: // For testing purposes + + UNIT_TEST(CSIPServerTransaction_Test) + UNIT_TEST(CSIP_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipstrings.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipstrings.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipstrings.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + +#ifndef SIPSTRINGS_H +#define SIPSTRINGS_H + +// INCLUDES +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPStrings; + +// CLASS DECLARATION +/** + * @publishedAll + * @released + * + * This class defines string pool for SIP Codec. + * The client of SIP Codec must call OpenL() before + * invoking any function of SIP Codec classes. + * The client must close the string pool when finished using + * SIP Codec classes. + * + * @lib sipcodec.lib + */ +class SIPStrings + { + public: // Constructors and destructor + + /** + * Opens SIP Codec string pool. + * Implemented with a reference count. + */ + IMPORT_C static void OpenL(); + + /** + * Closes SIP Codec string pool. + * In other words decrements reference count and if it reaches + * zero, closes the string pool. + * The user must not call Close() if it has not called OpenL(). + */ + IMPORT_C static void Close(); + + + public: // New functions + + /** + * Gets a case-insensitive string specified + * in the original string table. + * + * @param aIndex The string table enumeration value + * @return Initialised RStringF object + */ + IMPORT_C static RStringF StringF(TInt aIndex); + + /** + * Gets the string pool used by SIP Codec. + * + * @return RStringPool: A handle to a string pool + */ + IMPORT_C static RStringPool Pool(); + + /** + * Gets the string table used by SIP Codec. + * + * @return TStringTable&: The string pool table + */ + IMPORT_C static const TStringTable& Table(); + + private: + + static CSIPStrings* Strings(); + }; + +#endif // SIPSTRINGS_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipsubscribedialogassoc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipsubscribedialogassoc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,354 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipsubscribedialogassoc.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPSUBSCRIBEDIALOGASSOC_H +#define CSIPSUBSCRIBEDIALOGASSOC_H + +// INCLUDES +#include "sipdialogassocbase.h" + +// CONSTANTS + +// FORWARD DECLARATIONS +class CUri8; +class CSIPToHeader; +class CSIPFromHeader; +class CSIPContactHeader; +class CSIPEventHeader; +class CSIPMessageElements; +class MSIPRegistrationContext; +class CSIPConnection; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Class for managing SIP SUBSCRIBE dialog associations. +* It provides services for creating, using and terminating SIP SUBSCRIBE +* dialog associations. The client can have multiple SUBSRIBE dialog +* associations per same SIP dialog. +* Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, +* local and remote tags; "Event" header semantics are client's responsibility +* +* @lib sipclient.lib +*/ +class CSIPSubscribeDialogAssoc : public CSIPDialogAssocBase + { + public: // Constructors and destructor + /** + * Two-phased constructor. + * Should be used if response to the SIP request to be sent + * will create a SIP dialog association. + * @pre aEvent != 0 + * @param aDialog a dialog to be associated with + * @param aEvent an event to subscribe to; the ownership is transferred + * @return New object; the ownership is transferred + * @leave KErrArgument if aEvent == 0 + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPSubscribeDialogAssoc* + NewL(CSIPDialog& aDialog, + CSIPEventHeader* aEvent); + + /** + * Two-phased constructor. + * Must be used if response to the SIP request to be sent + * will create a SIP dialog association. + * @param aDialog a dialog to be associated with + * @param aEvent an event to subscribe to; the ownership is transferred + * @return New object, ownership is transferred + * @leave KErrArgument if aEvent == 0 + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPSubscribeDialogAssoc* + NewLC(CSIPDialog& aDialog, + CSIPEventHeader* aEvent); + + /** + * Two-phased constructor + * @pre aFrom != 0 + * @pre aRemoteUri != 0 + * @pre aEvent != 0 + * The user of the class must not define tags in From-header and + * To-header. + * @param aConnection a SIP connection to be used with + * dialog association + * @param aFrom originator's address; the ownership is transfered + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is addressed to. + * @param aEvent an event to subscribe to; the ownership is transferred + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0 + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPSubscribeDialogAssoc* + NewL(CSIPConnection& aConnection, + CSIPFromHeader* aFrom, + CUri8* aRemoteUri, + CSIPEventHeader* aEvent, + CSIPToHeader* aTo=0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aFrom != 0 + * @pre aRemoteUri != 0 + * @pre aEvent != 0 + * The user of the class must not define tags in From-header and + * To-header. + * @param aConnection a SIP connection to be used with + * dialog association + * @param aFrom originator's address; the ownership is transfered + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is addressed to. + * @param aEvent an event to subscribe to; the ownership is transferred + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0 + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPSubscribeDialogAssoc* + NewLC(CSIPConnection& aConnection, + CSIPFromHeader* aFrom, + CUri8* aRemoteUri, + CSIPEventHeader* aEvent, + CSIPToHeader* aTo =0, + CSIPContactHeader* aContact=0); + + /** + * Two-phased constructor + * @pre aRemoteUri != 0 + * @pre aEvent != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @pre aContext.IsContextActive()==ETrue + * @param aConnection a SIP connection to be used with + * dialog association + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is targeted to. + * @param aContext used for selecting outbound + * proxy and originator's address (AOR) and contact + * @param aEvent an event to subscribe to; the ownership is transferred + * @param aFrom originator's address. If not defined it will be + * constructed using registration context (User's AOR); + * the ownership is transfered + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aRemoteUri == 0 or aEvent == 0 + * @leave KErrSIPInvalidRegistrationState + * if aContext.IsContextActive()==EFalse + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPSubscribeDialogAssoc* + NewL(CSIPConnection& aConnection, + CUri8* aRemoteUri, + const MSIPRegistrationContext& aContext, + CSIPEventHeader* aEvent, + CSIPFromHeader* aFrom = 0, + CSIPToHeader* aTo = 0, + CSIPContactHeader* aContact = 0); + + /** + * Two-phased constructor + * @pre aRemoteUri != 0 + * @pre aEvent != 0 + * The user of the class must not define tags in From-header + * and To-header. + * @pre aContext.IsContextActive()==ETrue + * @param aConnection a SIP connection to be used with + * dialog association + * @param aRemoteUri a remote target URI that identifies a resource that + * the request is targeted to. + * @param aContext used for selecting outbound + * proxy and originator's address (AOR) and contact + * @param aEvent an event to subscribe to; the ownership is transferred + * @param aFrom originator's address. If not defined it will be + * constructed using registration context (User's AOR); + * the ownership is transfered + * @param aTo logical recipient's address; if not defined + * the remote target uri will be used for To-header + * construction; the ownership is transfered + * @param aContact a contact to be used in dialog creation. Must be + * given only if user intends to re-direct future requests; + * the ownership is transfered + * @return New object; the ownership is transferred. + * @leave KErrArgument if aRemoteUri == 0 or aEvent == 0 + * @leave KErrSIPInvalidRegistrationState + * if aContext.IsContextActive()==EFalse + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C static CSIPSubscribeDialogAssoc* + NewLC(CSIPConnection& aConnection, + CUri8* aRemoteUri, + const MSIPRegistrationContext& aContext, + CSIPEventHeader* aEvent, + CSIPFromHeader* aFrom = 0, + CSIPToHeader* aTo = 0, + CSIPContactHeader* aContact = 0); + + /** + * Destructor + */ + IMPORT_C ~CSIPSubscribeDialogAssoc(); + + public: //New functions + /** + * Creates SUBSCRIBE and sends it to the remote target. + * 101-199 or 2xx response to SUBSCRIBE will create a dialog association + * in case of the first SUBSCRIBE request within this dialog. + * Client must not provide Event-header in the optional message headers. + * + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EInit || + * Dialog().State()==CSIPDialog::EConfirmed + * @param aElements optional SIP message headers and body. Ownership is + * transferred. + * @param aRefresh if set the transaction will be refreshed at given + * interval. Interval must be defined by including + * Expires-header. Ownership is transferred. + * @return SUBSCRIBE SIP transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if Dialog().State() is incorrect + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendSubscribeL(CSIPMessageElements* aElements=0, + CSIPRefresh* aRefresh=0); + + /** + * Updates the subscription. Note that update can be done when 2xx + * response is received to the initial SUBSCRIBE or to update. + * Client must not provide Event-header in the optional message headers. + * @pre aElements != 0 + * @pre Dialog().Connection().State()==EActive + * Dialog().State()==CSIPDialog::EConfirmed + * @param aElements contains user SIP headers and content; the ownership + * is transferred + * @return SUBSCRIBE SIP client transaction; the ownership is transferred + * @leave KErrArgument if aElements == 0 or aElements contain + * Event-header + * @leave KErrSIPInvalidDialogState if Dialog().State() is incorrect + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* UpdateL(CSIPMessageElements* aElements); + + /** + * Creates (un)SUBSCRIBE and sends it to the remote target. + * Possible associated refresh will be terminated as well. + * Client must not provide Event-header in the optional message headers. + * @pre Dialog().Connection().State()==EActive + * @pre Dialog().State()==CSIPDialog::EConfirmed + * @param aElements optional SIP message headers and body. Ownership is + * transferred. + * @return SUBSCRIBE SIP transaction. Ownership is transferred. + * @leave KErrSIPInvalidDialogState if Dialog().State() is incorrect + * @capability NetworkServices + */ + IMPORT_C CSIPClientTransaction* + SendUnsubscribeL(CSIPMessageElements* aElements=0); + + /** + * Gets associated refresh in case the user has requested + * the refresh of the SIP subscription. + * Note that refreshed SUBSCRIBE dialog association cannot be + * terminated nor updated using the returned object. + * @return Associated refresh or 0 pointer if the user has not requested + * a refresh. Ownership is not transferred. + */ + IMPORT_C const CSIPRefresh* SIPRefresh() const; + + /** + * Gets an event to which the subscription is done + * @return an event + */ + IMPORT_C const CSIPEventHeader& Event() const; + + public: // New functions, for internal use + + /** + * @internalComponent + */ + CSIPRefresh* FindRefresh(TUint32 aRefreshId); + + static CSIPSubscribeDialogAssoc* NewLC(CSIPConnection& aConnection, + CUri8* aRemoteUri, + CSIPEventHeader* aEvent, + CSIPFromHeader* aFrom, + CSIPToHeader* aTo, + CSIPContactHeader* aContact, + const MSIPRegistrationContext* aContext); + + void ConnectionLost(); + + CSIPClientTransaction* + DoSendSubscribeL(CSIPMessageElements* aElements, + CSIPRefresh* aRefresh, + TBool aWithinDialog); + + CSIPClientTransaction* + DoSendUnsubscribeL(CSIPMessageElements* aElements); + + /** + * @internalComponent + */ + void DeletingRefresh(CSIPRefresh& aRefresh, TUint32 aRefreshId); + + private: // Constructors + CSIPSubscribeDialogAssoc(); + + private: // Data + //If the subscription is refreshed, this is the used CSIPRefresh + //instance, otherwise this is NULL. CSIPSubscribeDialogAssoc owns this. + CSIPRefresh* iRefresh; + + CSIPEventHeader* iEvent; + + private: // For testing purposes + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPSubscribeDialogAssoc_Test) + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipsubscriptionstateheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipsubscriptionstateheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,191 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipsubscriptionstateheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPSUBSCRIPTIONSTATEHEADER_H +#define CSIPSUBSCRIPTIONSTATEHEADER_H + +// INCLUDES +#include "sipparameterheaderbase.h" +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPSubscriptionStateHeaderParams; + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "Subscription-State" +* header fields. +* +* @lib sipcodec.lib +*/ +class CSIPSubscriptionStateHeader : public CSIPParameterHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPSubscriptionStateHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Subscription-State"-header + * @return a new instance of CSIPSubscriptionStateHeader + */ + IMPORT_C static CSIPSubscriptionStateHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPSubscriptionStateHeader + * @param aSubStateValue a substate-value value + * @return a new instance of CSIPSubscriptionStateHeader + */ + IMPORT_C static CSIPSubscriptionStateHeader* + NewL(const TDesC8& aSubStateValue); + + /** + * Creates a new instance of CSIPSubscriptionStateHeader + * and puts it to CleanupStack + * @param aSubStateValue a substate-value value + * @return a new instance of CSIPSubscriptionStateHeader + */ + IMPORT_C static CSIPSubscriptionStateHeader* + NewLC(const TDesC8& aSubStateValue); + + /** + * Destructor, deletes the resources of CSIPSubscriptionStateHeader. + */ + IMPORT_C ~CSIPSubscriptionStateHeader(); + + + public: // New functions + + /** + * Gets the substate-value parameter from the "Subscription-State" header + * @return the substate-value parameter + */ + IMPORT_C const TDesC8& SubStateValue() const; + + /** + * Sets the substate-value parameter in the "Subscription-State" header; + * @param aSubStateValue a substate-value parameter to set + */ + IMPORT_C void SetSubStateValueL(const TDesC8& aSubStateValue); + + /** + * Gets the value of the "expires"-parameter + * @return "expires"-parameter or KErrNotFound if not present + */ + IMPORT_C TInt ExpiresParameter() const; + + /** + * Sets the "expires"-parameter + * @pre aExpiresParam >= 0 + * @param aExpiresParam a "expires"-parameter value to set + */ + IMPORT_C void SetExpiresParameterL(TInt aExpiresParam); + + /** + * Gets the value of the "retry-after"-parameter + * @return "retry-after"-parameter or KErrNotFound if not present + */ + IMPORT_C TInt RetryAfterParameter() const; + + /** + * Sets the "retry-after"-parameter + * @pre aRetryAfterParam >= 0 + * @param aRetryAfterParam a "retry-after"-parameter value to set + */ + IMPORT_C void SetRetryAfterParameterL(TInt aRetryAfterParam); + + /** + * Constructs an instance of a CSIPSubscriptionStateHeader + * from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPSubscriptionStateHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // From CSIPParameterHeaderBase + + HBufC8* ToTextMandatoryPartLC() const; + void ParseMandatoryPartL(const TDesC8& aMandatoryPart); + const CSIPParamContainerBase& Params() const; + CSIPParamContainerBase& Params(); + + private: // Constructors + + CSIPSubscriptionStateHeader(); + void ConstructL(); + void ConstructL(const TDesC8& aSubStateValue); + void ConstructL (const CSIPSubscriptionStateHeader& + aSubscriptionStateHeader); + + private: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + HBufC8* iSubStateValue; + CSIPSubscriptionStateHeaderParams* iParams; + + private: // For testing purposes + + UNIT_TEST(CSIPSubscriptionStateHeaderTest) + }; + + +#endif // CSIPSUBSCRIPTIONSTATEHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipsupportedheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipsupportedheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,133 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipsupportedheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPSUPPORTEDHEADER_H +#define CSIPSUPPORTEDHEADER_H + +// INCLUDES +#include "siptokenheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "Supported" header. +* +* @lib sipcodec.lib +*/ +class CSIPSupportedHeader : public CSIPTokenHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPSupportedHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Supported"-header + * @return an array containing 1..n instances of CSIPSupportedHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPSupportedHeader + * @param aValue a tag value + * @return a new instance of CSIPSupportedHeader + */ + IMPORT_C static CSIPSupportedHeader* NewL(RStringF aValue); + + /** + * Creates a new instance of CSIPSupportedHeader + * and puts it to CleanupStack + * @param aValue a tag value + * @return a new instance of CSIPSupportedHeader + */ + IMPORT_C static CSIPSupportedHeader* NewLC(RStringF aValue); + + /** + * Destructor, deletes the resources of CSIPSupportedHeader. + */ + IMPORT_C ~CSIPSupportedHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPSupportedHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPSupportedHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TBool HasCompactName() const; + + /** + * @internalComponent + */ + RStringF CompactName() const; + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // New functions + + CSIPSupportedHeader(); + CSIPSupportedHeader(const CSIPSupportedHeader& aHeader); + + private: // For testing purposes + + UNIT_TEST(CSIPSupportedHeaderTest) + }; + +#endif // CSIPSUPPORTEDHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siptimestampheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siptimestampheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,159 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siptimestampheader.h +* Part of : SIP Codec +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPTIMESTAMPHEADER_H +#define CSIPTIMESTAMPHEADER_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for a SIP Timestamp header. +* +* @lib sipcodec.lib +*/ +class CSIPTimestampHeader : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPTimestampHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Timestamp"-header (e.g. "12 3.4") + * @returns a new instance of CSIPTimestampHeader + */ + IMPORT_C static CSIPTimestampHeader* DecodeL(const TDesC8& aValue); + + /** + * Constructor + * @param aTimestamp a timestamp value to set. + * @param aDealy a delay value to set. + */ + IMPORT_C CSIPTimestampHeader(TReal aTimestamp); + + /** + * Destructor + */ + IMPORT_C ~CSIPTimestampHeader (); + + + public: // New functions + + /** + * Set the timestamp from the "Timestamp" header. + * @param aTimestamp a timestamp to set. + */ + IMPORT_C void SetTimestamp(TReal aTimestamp); + + /** + * Gets the timestamp from the "Timestamp" header. + * @return a timestamp value. + */ + IMPORT_C TReal Timestamp() const; + + /** + * Check if the delay-part is present + * @return a delay value. + */ + IMPORT_C TBool HasDelay() const; + + /** + * Set the delay-part of the "Timestamp" header. + * @param aDelay a delay to set. + */ + IMPORT_C void SetDelay(TReal aDelay); + + /** + * Gets the delay-part of the "Timestamp" header, + * if delay-part is present + * @return a delay value or zero if HasDelay() == EFalse + */ + IMPORT_C TReal Delay() const; + + /** + * Constructs an instance of a CSIPTimestampHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPTimestampHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // From CSIPHeaderBase + + void ExternalizeValueL (RWriteStream& aWriteStream) const; + + private: // New functions + + void ParseL(const TDesC8& aValue); + void DoInternalizeValueL(RReadStream& aReadStream); + + private: // Data + + TReal iTimestamp; + TBool iHasDelay; + TReal iDelay; + + private: // For testing purposes + + UNIT_TEST(CSIPTimestampHeaderTest) + }; + + +#endif // end of CSIPTIMESTAMPHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siptoheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siptoheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,140 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siptoheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPTOHEADER_H +#define CSIPTOHEADER_H + +// INCLUDES +#include "sipfromtoheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "To" header fields. +* +* @lib sipcodec.lib +*/ +class CSIPToHeader : public CSIPFromToHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPToHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "To"-header (e.g. "User ") + * @return a new instance of CSIPToHeader + */ + IMPORT_C static CSIPToHeader* DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPToHeader + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred, + * @return a new instance of CSIPToHeader + */ + IMPORT_C static CSIPToHeader* NewL(CSIPAddress* aSIPAddress); + + /** + * Creates a new instance of CSIPToHeader and puts it to CleanupStack + * @pre aSIPAddress != 0 + * @param aSIPAddress a name-address, the ownership is transferred, + * @return a new instance of CSIPToHeader + */ + IMPORT_C static CSIPToHeader* NewLC(CSIPAddress* aSIPAddress); + + /** + * Creates a deep-copy of a CSIPFromToHeaderBase + * Note that this function can be used for creating a To-header + * using an existing From-header. + * @param aHeader CSIPFromToHeaderBase to be copied + * @return a new instance of CSIPToHeader + */ + + IMPORT_C static CSIPToHeader* + NewL(const CSIPFromToHeaderBase& aHeader); + + /** + * Creates a deep-copy of a CSIPFromToHeaderBase and + * puts it to CleanupStack + * Note that this function can be used for creating a To-header + * using an existing From-header. + * @param aHeader CSIPFromToHeaderBaseto to be copied + * @return a new instance of CSIPToHeader + */ + IMPORT_C static CSIPToHeader* + NewLC(const CSIPFromToHeaderBase& aHeader); + + /** + * Destructor, deletes the resources of CSIPToHeader. + */ + IMPORT_C ~CSIPToHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPToHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPToHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + RStringF CompactName() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPToHeader(); + }; + +#endif // CSIPTOHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siptokenheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siptokenheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,114 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siptokenheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPTOKENHEADERBASE_H +#define CSIPTOKENHEADERBASE_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP headers having form "Name: token *(COMMA token)" +* +* @lib sipcodec.lib +*/ +class CSIPTokenHeaderBase : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPTokenHeaderBase. + */ + IMPORT_C virtual ~CSIPTokenHeaderBase(); + + + public: // New functions + + /** + * Sets the header value as a token + * @param aValue a value to set + */ + IMPORT_C void SetValueL(RStringF aValue); + + /** + * Gets the header value as a token + * @return the header value + */ + IMPORT_C RStringF Value() const; + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + virtual TBool MoreThanOneAllowed() const; + + protected: // Constructors + + CSIPTokenHeaderBase(); + CSIPTokenHeaderBase(const CSIPTokenHeaderBase& aHeader); + void ConstructL(const TDesC8& aValue, TBool aEmptyValueAllowed=EFalse); + void ConstructL(RStringF aValue, TBool aEmptyValueAllowed=EFalse); + + protected: // New functions + + void DoInternalizeValueL(RReadStream& aReadStream); + + protected: // Data + + /** + * @internalComponent + */ + RStringF iValue; + + private: // From CSIPHeaderBase + + void ExternalizeValueL(RWriteStream& aWriteStream) const; + + private: // New functions + + void SetValueL(const TDesC8& aValue); + + private: // For testing purposes + + UNIT_TEST(CSIPTokenHeaderBaseTest) + }; + +#endif // CSIPTOKENHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/siptransactionbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/siptransactionbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,230 @@ +/* +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : siptransactionbase.h +* Part of : SIP Client +* Interface : SDK API, SIP Client API +* Version : 1.0 +* +*/ + + + +#ifndef CSIPTRANSACTIONBASE_H +#define CSIPTRANSACTIONBASE_H + +// INCLUDES +#include +#include +#include "_sipcodecdefs.h" + +// FORWARD DECLARATIONS +class CSIPResponseElements; +class MTransactionAssociation; + +// CLASS DECLARATION + +/** +* @publishedAll +* @released +* +* Base class for managing SIP transactions. +* It provides services for querying transaction type and its state. +* +* This class is an abstract class and cannot be instantiated. +* @lib sipclient +*/ +class CSIPTransactionBase: public CBase + { + public: + /** SIP transaction state */ + enum TState + { + /** Trying state */ + ETrying, + /** Calling state */ + ECalling, + /** Proceeding state */ + EProceeding, + /** Completed state */ + ECompleted, + /** Confirmed state */ + EConfirmed, + /** Terminated state */ + ETerminated, + /** Object is being constructed and is not yet ready for use */ + EConstructing + }; + + public: // Destructor + /** + * Destructor + * @internalComponent + */ + virtual ~CSIPTransactionBase(); + + public: // New functions + /** + * Gets the SIP transaction type + * @return SIP transaction type + */ + IMPORT_C RStringF Type() const; + + /** + * Gets SIP transaction state + * @return SIP transaction state + * @leave KErrSIPResourceNotAvailable if a required SIP Client API + * object has been deleted + */ + IMPORT_C CSIPTransactionBase::TState StateL(); + + /** + * Checks the if the actual object + * is of type CSIPClientTransaction. + * @return ETrue if object is of type CSIPClientTransaction and + * EFalse otherwise + */ + IMPORT_C TBool IsSIPClientTransaction() const; + + /** + * Compares this object to another object also having + * CSIPTransactionBase base class + * The function has to be implemented in each of the sub-classes. + * @param aTransaction a CSIPTransactionBase object to compare + * @return ETrue if the objects are equal otherwise EFalse + */ + IMPORT_C TBool + operator==(const CSIPTransactionBase& aTransaction) const; + + public: // New functions, for internal use + /** + * Obtains the RequestId of the transaction. + * + * @return RequestId + */ + TUint32 RequestId() const; + + /** + * Clears the MTransactionAssociation. After this the object can't be + * used anymore and it is expected that user will delete it soon. + * + * @param aAssociation Object requesting the detach + * @internalComponent + */ + virtual void Detach(const MTransactionAssociation& aAssociation); + + /** + * Changes the transaction state. + * + * @param aNextState State into which transaction moves + */ + void ChangeState(CSIPTransactionBase::TState aNextState); + + /** + * Determines whether this transaction has an effect on the associated + * dialog's state. + * + * @return ETrue if transaction has an effect on the dialog's state, + * EFalse otherwise. + */ + TBool AffectsDialogState() const; + + /** + * Sets this transaction to affect the dialog state. + */ + void SetAffectsDialogState(); + + /** + * Determines whether the transaction type is a target refresh request. + * + * @param aType Type of transaction + * @return ETrue If the transaction is a target refresh request, EFalse + * otherwise. + */ + static TBool IsTargetRefresh(RStringF aType); + + /** + * Stores response elements. Depending on the status code, transaction + * may enter another state. + * + * @param aElements Response elements, ownership is transferred. + */ + void SetResponseElements(CSIPResponseElements* aElements); + + protected: // Constructors + CSIPTransactionBase(TBool aIsClientTransaction, + TUint32 aRequestId, + MTransactionAssociation& aAssociation); + + void ConstructL(RStringF aType); + + protected: // New functions, for internal use + /** + * Checks that iAssociation is available (not NULL). If iAssociation is + * NULL, it means user has deleted a resource needed by + * CSIPTransactionBase, and this function leaves. + */ + void CheckAssociationL() const; + + /** + * Gets response elements. + * + * @return Response elements. Ownership isn't transferred. + */ + const CSIPResponseElements* ResponseElements() const; + + protected: // Data + + /** + * RequestId received from SIP client + * @internalComponent + */ + TUint32 iRequestId; + + /** + * Every transaction is associated to exactly one other object: + * CSIP, CSIPConnection, CSIPRegistrationBinding or CSIPDialogAssocBase + * @internalComponent + */ + MTransactionAssociation* iAssociation; + + private: // Data + RStringF iType; + + //ETrue is the transaction is a client transaction, EFalse otherwise + TBool iIsClientTransaction; + + //Current transaction state + CSIPTransactionBase::TState iState; + + //ETrue if the transaction has an effect on the dialog state in case + //the transaction is associated with a dialog. + //EFalse otherwise. + TBool iAffectsDialogState; + + //SIP response elements + CSIPResponseElements* iResponseElements; + + private: // For testing purposes + UNIT_TEST(CSIP_Test) + UNIT_TEST(CSIPServerTransaction_Test) + UNIT_TEST(CSIPSubscribeDialogAssoc_Test) + UNIT_TEST(CSIPInviteDialogAssoc_Test) + UNIT_TEST(CSIPNotifyDialogAssoc_Test) + UNIT_TEST(CSIPConnection_Test) + + __DECLARE_TEST; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipunsignedintheaderbase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipunsignedintheaderbase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipunsignedintheaderbase.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPUNSIGNEDINTHEADERBASE_H +#define CSIPUNSIGNEDINTHEADERBASE_H + +// INCLUDES +#include "sipheaderbase.h" +#include "_sipcodecdefs.h" + + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* A base class for SIP headers having form: "Name: 1*DIGIT" +* +* @lib sipcodec.lib +*/ +class CSIPUnsignedIntHeaderBase : public CSIPHeaderBase + { + public: // Constructors and destructor + + /** + * Destructor, deletes the resources of CSIPUnsignedIntHeaderBase. + */ + IMPORT_C virtual ~CSIPUnsignedIntHeaderBase(); + + + public: // New functions + + /** + * Sets the header value as an unsigned integer + * @param aValue a value to set + */ + IMPORT_C void SetValue(TUint aValue); + + /** + * Gets the header value as an unsigned integer + * @return the header value + */ + IMPORT_C TUint Value() const; + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase ToTextValueL + */ + IMPORT_C HBufC8* ToTextValueL() const; + + + protected: // Constructors + + CSIPUnsignedIntHeaderBase(); + CSIPUnsignedIntHeaderBase(TUint aValue); + + protected: // New functions + + void ParseL(const TDesC8& aValue, TInt aErrorIfParsingFails); + void DoInternalizeValueL(RReadStream& aReadStream); + + protected: // From CSIPHeaderBase + + /** + * @internalComponent + */ + void ExternalizeValueL (RWriteStream& aWriteStream) const; + + protected: // Data + + /** + * @internalComponent + */ + TUint iValue; + }; + +#endif // CSIPUNSIGNEDINTHEADERBASE_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipunsupportedheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipunsupportedheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +/* +* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipunsupportedheader.h +* Part of : SIP Codec +* Interface : SDK API, SIP Codec API +* Version : SIP/4.0 +* +*/ + + + + +#ifndef CSIPUNSUPPORTEDHEADER_H +#define CSIPUNSUPPORTEDHEADER_H + +// INCLUDES +#include "siptokenheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class provides functions for setting and getting SIP "Unsupported" header. +* +* @lib sipcodec.lib +*/ +class CSIPUnsupportedHeader : public CSIPTokenHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPUnsupportedHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "Unsupported"-header + * @return an array containing 1..n instances of CSIPUnsupportedHeader + */ + IMPORT_C static RPointerArray + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPUnsupportedHeader + * @param aValue a tag value + * @return a new instance of CSIPUnsupportedHeader + */ + IMPORT_C static CSIPUnsupportedHeader* NewL (RStringF aValue); + + /** + * Creates a new instance of CSIPUnsupportedHeader + * and puts it to CleanupStack + * @param aValue a tag value + * @return a new instance of CSIPUnsupportedHeader + */ + IMPORT_C static CSIPUnsupportedHeader* NewLC(RStringF aValue); + + /** + * Destructor, deletes the resources of CSIPUnsupportedHeader. + */ + IMPORT_C ~CSIPUnsupportedHeader(); + + + public: // New functions + + /** + * Constructs an instance of a CSIPUnsupportedHeader from a RReadStream + * @param aReadStream a stream containing the value of the + * externalized object (header name not included). + * @return an instance of a CSIPUnsupportedHeader + */ + IMPORT_C static CSIPHeaderBase* + InternalizeValueL(RReadStream& aReadStream); + + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + + public: // From CSIPHeaderBase, for internal use + + /** + * @internalComponent + */ + TPreferredPlace PreferredPlaceInMessage() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + + private: // Constructors + + CSIPUnsupportedHeader(); + CSIPUnsupportedHeader(const CSIPUnsupportedHeader& aHeader); + }; + +#endif // CSIPUNSUPPORTEDHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/sipwwwauthenticateheader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/sipwwwauthenticateheader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,99 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Name : sipwwwauthenticateheader.h +* Part of : SIP Codec +* Version : SIP/5.0 +* +*/ + + + +#ifndef CSIPWWWAUTHENTICATEHEADER_H +#define CSIPWWWAUTHENTICATEHEADER_H + +// INCLUDES +#include "sipauthenticateheaderbase.h" +#include "_sipcodecdefs.h" + +// CLASS DECLARATION +/** +* @publishedAll +* @released +* +* Class for SIP WWW-Authenticate-header manipulation. +* +* @lib sipcodec.lib +*/ +class CSIPWWWAuthenticateHeader : public CSIPAuthenticateHeaderBase + { + public: // Constructors and destructor + + /** + * Constructs a CSIPWWWAuthenticateHeader from textual representation + * of the header's value part. + * @param aValue a value part of a "WWW-Authenticate"-header + * @return a new instance of CSIPWWWAuthenticateHeader + */ + IMPORT_C static CSIPWWWAuthenticateHeader* + DecodeL(const TDesC8& aValue); + + /** + * Creates a new instance of CSIPWWWAuthenticateHeader + * @return a new instance of CSIPWWWAuthenticateHeader + */ + IMPORT_C static CSIPWWWAuthenticateHeader* + NewL(RStringF aAuthScheme); + + /** + * Creates a new instance of CSIPWWWAuthenticateHeader + * @return a new instance of CSIPWWWAuthenticateHeader + */ + IMPORT_C static CSIPWWWAuthenticateHeader* + NewLC(RStringF aAuthScheme); + + /** + * Destructor + */ + IMPORT_C ~CSIPWWWAuthenticateHeader(); + + public: // From CSIPHeaderBase + + /** + * From CSIPHeaderBase CloneL + */ + IMPORT_C CSIPHeaderBase* CloneL() const; + + /** + * From CSIPHeaderBase Name + */ + IMPORT_C RStringF Name() const; + + public: // New functions, for internal use + + static RPointerArray BaseDecodeL(const TDesC8& aValue); + static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); + + private: // Constructors + + CSIPWWWAuthenticateHeader(); + + private: // For testing purposes + + UNIT_TEST(CSIPWWWAuthenticateHeaderTest) + }; + +#endif // CSIPWWWAUTHENTICATEHEADER_H + +// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/spriteanimation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/spriteanimation.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,109 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __SPRITEANIMATION_H__ +#define __SPRITEANIMATION_H__ + +#include + +#include +#include + +#include +#include + +class CAnimationDataProvider; +class CCoeControl; +class CSpriteAnimationExt; + +/** +Implementation of CAnimation for sprite based animations. + +A sprite animation displays the image using a sprite, which is a server side +graphic object. This is likely to be more efficient than a basic animation, +and requires slightly less work in the client application. However, it also +provides less control over the actual rendering of the image. + +A sprite animation must be associated with an RWindow. However, no redraw +events will be generated for it by the animation, and the client application +does not need to take any action once the animation has started. Holding the +animation when the sprite is not visible is handled automatically on the server +side. + +@see CAnimationDataProvider +@publishedAll +@released +*/ +class CSpriteAnimation : public CAnimation, public MAnimationDataProviderObserver + { +public: + IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWsSession, RWindow& aWindow, MAnimationObserver* aObserver = 0); + IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWsSession, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver = 0); + IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver = NULL, const CCoeControl* aHost = NULL); + IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, const TDesC8& aDataType, MAnimationObserver* aObserver = NULL, const CCoeControl* aHost = NULL); + IMPORT_C ~CSpriteAnimation(); + IMPORT_C TSize Size() const; + + /** Provides an CSpriteAnimation DataProvider interface to the client application. + @return iDataProvider A CAnimationDataProvider */ + inline CAnimationDataProvider* DataProvider() { return iDataProvider; } + // From CAnimationBase: + virtual void Start(const TAnimationConfig& aConfig); + virtual void Stop(); + virtual void Pause(); + virtual void Resume(); + virtual void Hold(); + virtual void Unhold(); + virtual void SetPosition(const TPoint& aPoint); + virtual void Freeze(); + virtual void Unfreeze(); +public: + IMPORT_C virtual void SetHostL(const CCoeControl* aHost); + +protected: + CSpriteAnimation(); + CSpriteAnimation(CAnimationDataProvider* aDataProvider, RWsSession& aWsSession); + CSpriteAnimation(CAnimationDataProvider* aDataProvider, MAnimationObserver* aObserver, const CCoeControl* aHost); + void ConstructL(const TPoint& aPoint, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver); + virtual void CSpriteAnimation_Reserved2(); + void ConstructL(const TPoint& aPoint, const TDesC8& aDataType); + void ConstructL(); +private: + CSpriteAnimation(const CSpriteAnimation&); // no implementation + CSpriteAnimation& operator=(const CSpriteAnimation&); // no implementation + void InitializeL(); + void Reset(); + // from MAnimationDataProviderObserver + virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize); + +private: + enum TFlags + { + EAnimationInitialized = 0x1 // Is the animation initialized? + }; +private: + CSpriteAnimationExt* iSpriteAnimationExt; + MAnimationObserver* iObserver; +//note the following data member is accessed via an inline function! + CAnimationDataProvider* iDataProvider; + RWsSession* iWsSession; + RWsSprite* iWsSprite; + RAnimDll iAnimDll; + RSpriteAnimationClient* iClient; + const CCoeControl* iHost; + TInt iFlags; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/swi/pkgremover.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/swi/pkgremover.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,200 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Interface class for listing/removing uninstalled packages from a removable drive +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __PKGREMOVER_H__ +#define __PKGREMOVER_H__ + +#include +#include +#include + +namespace Swi +{ + +class CUninstalledPackageEntry; + + +/** + * This class provides static methods for managing uninstalled native packages + * (SIS files) that are taking up space on removable drives. + * + * @publishedAll + * @released + */ + +NONSHARABLE_CLASS(UninstalledSisPackages) +{ +public: + + /** + * Get the list of uninstalled packages on a specified removable drive. In + * this context uninstalled means 'not known by this phone'. This will list + * uninstalled PA & PP files found in the SWI Daemon's private directory, and + * will also search the sis registry files on the drive for uninstalled + * applications. + * + * @param aDrive Removable drive number (@see TDriveNumber) + * @param aPackageList Array of pointers to the uninstalled packages + * found on the specified drive (@see + * CUninstalledPackageEntry). This array is assumed to be empty. + * The caller takes ownership of the elements added to the array. + * @leave One of the system-wide error codes. + * @leave KErrNotRemovable If the drive is not removable or is substed + * @leave KErrPackageFileCorrupt If an error occurs during the processing of files + * @capability ReadDeviceData Required to access protected directories during listing operation + * @capability ProtServ Required to access services of software installer + * @capability TrustedUI Required to access services of software installer + */ + IMPORT_C static void ListL(TDriveNumber aDrive, RPointerArray& aPackageList); + + /** + * Remove the specified uninstalled package. The following restrictions apply to the files that will be removed: + *
    + *
  • For security reasons only files on the same drive as the package controller will be removed. Files on other drives will be orphaned. + *
  • Files belonging to other packages will not be removed. + *
+ * + * @param aPackage The uninstalled package to remove (@see CUninstalledPackageEntry) + * @leave One of the system-wide error codes. + * @leave KErrNotRemovable If the drive is not removable or is substed + * @leave KErrPackageIsInstalled If the specified package is installed on the device + * @leave KErrPackageFileCorrupt If an error occurs during the processing of files + * @capability WriteDeviceData Required to write to protected directories during remove operation + * @capability ProtServ Required to access services of software installer + * @capability TrustedUI Required to access services of software installer + */ + IMPORT_C static void RemoveL(const CUninstalledPackageEntry& aPackage); +}; + + +/** + * Uninstalled application entry class. + * + * This class is not externally instantiable. It is returned as a result of + * querying for a list of uninstalled packages present on a removable drive. + * Each object of this type represents one uninstalled package. Methods can + * be called on this object to retrieve the package details such as + * Package UID, Name, Vendor, Version and Type. + * + * @publishedAll + * @released + */ + +NONSHARABLE_CLASS(CUninstalledPackageEntry) : public CBase +{ +public: + enum TPackageType + { + ESaPackage, ///< Standard Application + ESpPackage, ///< Standard Patch (augmentation) + EPuPackage, ///< Partial Upgrade + EPaPackage, ///< Preinstalled Application + EPpPackage ///< Preinstalled Patch + }; + + /** + * Get the package Uid + * + * @return The Uid of this package + */ + IMPORT_C const TUid& Uid() const; + + /** + * Get the package name + * + * @return The name of this package as reference to TDesC + */ + IMPORT_C const TDesC& Name() const; + + /** + * Get the package unique vendor name + * + * @return The unique vendor name of this package as reference to TDesC + */ + IMPORT_C const TDesC& Vendor() const; + + /** + * Get the package version + * + * @return The version number of this package + */ + IMPORT_C const TVersion& Version() const; + + /** + * Get the package type + * + * @return The package type of this package + */ + IMPORT_C const TPackageType& PackageType() const; + + /** + * Destructor + */ + virtual ~CUninstalledPackageEntry(); + +private: + static CUninstalledPackageEntry* NewLC(const TUid& aUid, const TDesC& aPackageName, + const TDesC& aVendorName, const TVersion& aVersion, const TPackageType aPackageType, + const TDesC& aPackageFile, const TDesC& aAssocStubSisFile); + +private: + CUninstalledPackageEntry(); + +private: + void ConstructL(const TUid& aUid, const TDesC& aPackageName, const TDesC& aVendorName, + const TVersion& aVersion, const TPackageType aPackageType, const TDesC& aPackageFile, + const TDesC& aAssocStubSisFile); + + const TDesC& PackageFile() const; + const TDesC& AssociatedStubSisFile() const; + +private: + /// The package Uid + TUid iUid; + + /// The package name + HBufC* iPackageName; + + /// The package unique vendor name + HBufC* iVendorName; + + /// The package version + TVersion iVersion; + + /// The package type + TPackageType iType; + + // The sis/controller file name with full path + HBufC* iPackageFile; + + // The stub sis file name with full path (if the package file is a controller file) + HBufC* iAssocStubSisFile; +private: + friend class UninstalledSisPackages; +}; + +} // namespace Swi + +#endif // __PKGREMOVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/swi/pkgremovererrors.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/swi/pkgremovererrors.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Definition of the package list/remove error codes +// +// + + + +/** + @file + @publishedAll + @released +*/ + +#ifndef __PKGREMOVERERRORS_H__ +#define __PKGREMOVERERRORS_H__ + +#include + +/** +* +* A non-removable drive was passed. +* +*/ +const TInt KErrNotRemovable = -10280; +/** +* +* No uninstalled packages were found. +* +*/ +const TInt KErrNoUninstalledPackages = -10281; +/** +* +* The package being attempted to remove is installed on the device. +* +*/ +const TInt KErrPackageIsInstalled = -10282; +/** +* +* The package being attempted to list/remove is corrupted. +* +*/ +const TInt KErrPackageFileCorrupt = -10283; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/telsess.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/telsess.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,314 @@ +/** +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* Telnet Session API +* +* +*/ + + + + + +/** + @file TELSESS.H +*/ + +#ifndef _TELSESS_H_ +#define _TELSESS_H_ + +#include +#include +#include +#include + +#define __TELNETSESSDEBUG__ // Put in Debug mode + +class CTelnetControl; + +// Used by client to retrieve RFC option state +// Flags for Telnet negotiated options +// 1 = Enabled 0 = Disabled + +/** +Defines the supported, RFC-defined, option status. + +@publishedAll +@released +*/ +typedef struct + { + /** If ETrue, the server is sending in binary (RFC 856). */ + TBool iServerBinary; ///< RFC 856 (Server Sending in Binary) + /** If ETrue, the client is sending in binary (RFC 856). */ + TBool iClientBinary; ///< RFC 856 (Client Sending in Binary) + /** If ETrue, the server is echoing data back to the client (RFC 857). */ + TBool iEcho; ///< RFC 857 (Server Echoing Data from Client) + /** If ETrue, the client will negotiate about window size (RFC 1073). */ + TBool iNAWS; ///< RFC 1073 (Client Providing Window Size Information) + /** If ETrue, the terminal speed option is enabled (RFC 1079). */ + TBool iTerminalSpeed;///< RFC 1079 (Client Providing Terminal Speed Information) + /** If ETrue, the client is providing terminal type information (RFC 1091). */ + TBool iTerminalType; ///< RFC 1091 (Client Providing Terminal Type Information) + /** If ETrue, if the server is providing status information (RFC 859). */ + TBool iServerStatus; ///< RFC 859 (Server Providing Status Information) + /** If ETrue, if the client is providing status information (RFC 859). */ + TBool iClientStatus; ///< RFC 859 (Client Providing Status Information) + }TOptionStatus; + +// Used by client to configure the Symbian Telnet +class TTelnetConfig +/** +* Specifies telnet session configuration information. +* +* The client must provide a reference to an instance of this class as a parameter +* to the CTelnetSession::NewL() function. +* +* Configuration options can be modified, when the session is in progress, using +* the CTelnetSession::DoModifyConfig() function. +* +* Configuration option state can be obtained using the CTelnetSession::OptionStatus() +* function. +* @publishedAll +* @released +*/ + { + public: + + /** Constructor. */ + TTelnetConfig() { + iAllowLogout = TRUE; // RFC 727 - Default TRUE = Server Can Logout Client + iWindowSize.x = (TInt16)80; // RFC 1073 - Default 80 x 24 + iWindowSize.y = (TInt16)24; + iTermSpeed = _L8("38400"); // RFC 1079 - Default to 38400 Baud Terminal + iTermType = _L8("dumb"); // RFC 1091 - Default to base NVT Terminal + } + /** Destructor. */ + ~TTelnetConfig(){} + + typedef struct + /** + * Specifies the client's window size. + * + * The default is 80 columns by 24 rows which constructs to x=80, y=24. + */ + { + /** The client window's width (number of columns). */ + TInt16 x; + /** The client window's height (number of rows). */ + TInt16 y; + }TWindowSize; + + /** + * Specifies the client's window size. + * + * The default is 80 columns by 24 rows. + * + * (RFC 1073 -- Set to Configure Window Size) + */ + TWindowSize iWindowSize; + + /** + * Specifies the speed of the telnet connection. + * + * The default is "38400" (in ASCII characters). Must be set to a server-supported rate. + * + * (RFC 1079 -- Set to Configure Terminal Speed) + */ + TBuf8<20> iTermSpeed; + + /** + * Specifies the terminal type. + * + * The default is "dumb" (in ASCII characters). + * + * (RFC 1091 -- Set to Configure Terminal Type) + */ + TBuf8<20> iTermType; + + /** + * Specifies whether the telnet server can logout the client. + * + * The default, ETrue, enables the server to logout the client. If EFalse any + * logout request from the telnet server is rejected by the client. + * + * (RFC 727 -- Set/Clear to Enable/Disable Server Logout) + */ + TBool iAllowLogout; + + /** + * Enables or disables telnet server echo to client. + * + * The default, ETrue, enables server echo. Note that although this is normal + * telnet server behaviour, it is not a formal telnet requirement. It is therefore + * recommended that the client implement an optional local echo. + * + * (RFC 857 -- Set/Clear to Enable/Disable Server Echo to client) + */ + TBool iServerEcho; + }; + +// Client can pass these in overloaded CTelnetSession::Write(TTelnetUserControl& aControlCode); + +/** +* Specifies the telnet control code to send to the server. +* +* This is done using the overloaded CTelnetSession::Write() function. +* @publishedAll +* @released +*/ +enum TTelnetUserControl + { + /** Control code not supported. */ + ENotSupported = 0, + + /** + * Break (the NVT 129th ASCII break code). + * The default is 243. This is not a valid control in Binary mode. + */ + EBrk = 243, + + /** + * Interupt Process. + * The default is 244. + */ + EIp = 244, + + /** + * Abort Output. + * The default is 245. + */ + EAo = 245, + + /** + Are you there? + * The default is 246. + */ + EAyt = 246, + + /** + * Erase Character. + * The default is 247. This is not a valid control in Binary mode. + */ + EEc = 247, + + /** + * Erase Line. + * The default is 248. This is not a valid control in Binary mode. + */ + EEl = 248, + }; + +// Client MUST override this class +// Client MUST provide a pointer to an instance of this class as a parameter to CTelnetSession::NewL() +class MTelnetNotification +/** +* Symbian telnet notification interface. +* +* Informs the client when an error occurs, when reads and writes have completed, +* when a connection is made or closed and when configuration options change. +* @publishedAll +* @released +*/ + { + public: + /** + * Reports errors on the Telnet connection. + * + * The error code is supplied by the server. If this function is called, it is + * likely that the connection has failed. Therefore it is recommended that the + * client disconnects and resets its state. + * + * @param aError Error code from server. + */ + virtual void Error(TInt aError) = 0; ///< Miscellaneous Error callback + + /** + * Passes the data that was received from the server to the client. + * + * It is recommended that the client copies the data from this buffer, as it + * is owned by the Symbian telnet. + * + * @param aBuffer Data received from server. + */ + virtual void ReadComplete(const TDesC8& aBuffer) = 0; ///< Last Read to Server completion callback + + /** Notifies the client that a write to the server from the client has completed. */ + virtual void WriteComplete() = 0; ///< Last Write to Server completion callback + + /** Notifies the client that the connection to the server has been closed. */ + virtual void ConnectionClosed() = 0; ///< Telnet Connection Closed callback + + /** Notifies the client that a connection to the server has been made. */ + virtual void Connected() = 0; ///< Telnet Connected callback + + /** Notifies the client that telnet configuration options have changed. */ + virtual void OptionsChanged() = 0; ///< Telnet RFC Options Changed callback + }; + +class CTelnetControl; + +class CTelnetSession : public CBase +/** +* The main Symbian telnet class. +* +* Consists of a connection interface and a protocol interface. The connection +* interface comprises member functions that: connect to, read from, write to +* and disconnect from a telnet server. +* +* The protocol interface includes member functions that get and set telnet configuration. +* +* @publishedAll +* @released +*/ + { + //public: + // Data Structures + public: + ~CTelnetSession(); + // Construction + // Need to add max buffer size to constructor [check] + IMPORT_C static CTelnetSession* NewL(const TTelnetConfig& aConfig,const MTelnetNotification* aNotifier); + protected: + IMPORT_C void ConstructL(const TTelnetConfig& aConfig,const MTelnetNotification* aNotifier); + // + // Connection Interface + // + public: + IMPORT_C TInt Connect(const TInetAddr& aNetAddr); ///< Connects to aNetAddr on the standard telnet port (port 23) + IMPORT_C TInt Connect(const TInetAddr& aNetAddr, TUint aPort); ///< Connects to aNetAddr on user specified port + IMPORT_C TInt Connect(const TDesC& aServerName); ///< Connects to aSeverName on the standard telnet port (port 23) + IMPORT_C TInt Connect(const TDesC& aServerName, TUint aPort); ///< Connects to aServerName on user specified port + IMPORT_C TInt Disconnect(); ///< Disconnects current connection + IMPORT_C TInt Write(const TDesC8& aBuffer); ///< Writes a byte stream over the open telnet connection. + IMPORT_C TInt Write(TTelnetUserControl& aControlCode); ///< Writes NVT code to stream. Prepends \ code (255) + IMPORT_C TInt Read(); ///< Read data received over telnet buffer. + + // + // Protocol Interface + // + IMPORT_C TInt DoForceLogout(); + IMPORT_C TInt DoModifyConfig(TTelnetConfig& aConfig); + IMPORT_C TInt OptionStatus(TOptionStatus& aStatus); + private: + CTelnetSession(); + + private: + MTelnetNotification* iNotifier; + CTelnetControl* iTelnetProtocol; + + }; + + +#endif // _TELNETPROTOCOLAPI_H_ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/thttpfields.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/thttpfields.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,544 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Purpose: This file contains definitions of types THttpStatusCode, +// THttpParameter, THttpHeaderField, KHttpContentTypes, +// KHttpCharacterSetNames and KHttpCharacterSetCodes +// This header is a direct transcoding of [WSP] Appendix A - Assigned +// Numbers, which contains the following assignment tables: +// Table 34 : PDU Type Assignments +// 35 : Abort Reason Code Assignments +// 36 : Status Code Assignments +// 37 : Capability Assignments +// 38 : Well-Known Parameter Assignments +// 39 : Header Field Name Assignments +// 40 : Content-Type Assignments +// 41 : ISO-639 Language Assignments +// 42 : Character Set Assignments +// +// + +#if !defined(__THTTPFIELDS_H__) +#define __THTTPFIELDS_H__ + +// +// Table 34 not implemented +// + + +// +// Table 35 not implemented +// + + +/** +HTTP/1.1 Status Codes: WSP Code Assignments + +(see [WSP] Appdx A Table 36) +Codes from RFC-2616 added where necessary for HTTP Caching +@publishedAll +@deprecated +*/ +enum THttpStatusCode + { + EHttpUnknown = 0, + EHttpContinue = 100, + EHttpSwitchingProtocols, + EHttpWarnStaleContent = 110, // From RFC-2616 + EHttpWarnRevalidationFailed, // " + EHttpWarnDisconnectedOperation, // " + EHttpWarnHeuristicExpiration, // " + EHttpWarnMiscellaneous, // " + EHttpOK = 200, + EHttpCreated, + EHttpAccepted, + EHttpNonAuthorativeInformation, + EHttpNoContent, + EHttpResetContent, + EHttpPartialContent, + EHttpWarnTransformationApplied, // From RFC-2616 + EHttpWarnPersistentMiscellanous, // " + EHttpMultipleChoices = 300, + EHttpMovedPermanently, + EHttpMovedTemporarily, + EHttpSeeOther, + EHttpNotModified, + EHttpUseProxy, + EHttpTemporaryRedirect = 307, // From RFC-2616 + EHttpBadRequest = 400, + EHttpUnauthorized, + EHttpPaymentRequired, + EHttpForbidden, + EHttpNotFound, + EHttpMethodNotAllowed, + EHttpNotAcceptable, + EHttpProxyAuthenticationRequired, + EHttpRequestTimeout, + EHttpConflict, + EHttpGone, + EHttpLengthRequired, + EHttpPreconditionFailed, + EHttpRequestEntityTooLarge, + EHttpRequestURITooLong, + EHttpUnsupportedMediaType, + EHttpRequestRangeNotSatisfiable, // From RFC-2616 + EHttpExpectationFailed, // From RFC-2616 + EHttpInternalServerError = 500, + EHttpNotImplemented, + EHttpBadGateway, + EHttpServiceUnavailable, + EHttpGatewayTimeout, + EHttpHTTPVersionNotSupported + // All other codes are extension codes + }; + + +// +// Table 37 not implemented +// + + +/** +HTTP/1.1 Parameters: WSP Well-known Parameter Assignments + +(see [WSP] Appdx A Table 38) +@publishedAll +@deprecated +*/ +enum THttpParameter + { + EHttpQ = 0x00, + EHttpCharset = 0x01, + EHttpLevel = 0x02, + EHttpType = 0x03, + EHttpName = 0x04, + EHttpFilename = 0x05, + EHttpDifferences = 0x06, + EHttpPadding = 0x07 + }; + + +/** +HTTP/1.1 Headers: WSP Field Name Assignments + +(see [WSP] Appdx A Table 39) +@publishedAll +@deprecated +*/ +enum THttpHeaderField + { + EHttpAccept = 0x00, + EHttpAcceptCharset, + EHttpAcceptEncoding, + EHttpAcceptLanguage, + EHttpAcceptRanges, + EHttpAge, + EHttpAllow, + EHttpAuthorization, + EHttpCacheControl = 0x08, + EHttpConnection, + EHttpContentBase, + EHttpContentEncoding, + EHttpContentLanguage, + EHttpContentLength, + EHttpContentLocation, + EHttpContentMD5, + EHttpContentRange = 0x10, + EHttpContentType, + EHttpDate, + EHttpETag, + EHttpExpires, + EHttpFrom, + EHttpHost, + EHttpIfModifiedSince, + EHttpIfMatch = 0x18, + EHttpIfNoneMatch, + EHttpIfRange, + EHttpIfUnmodifiedSince, + EHttpLocation, + EHttpLastModified, + EHttpMaxForwards, + EHttpPragma, + EHttpProxyAuthenticate = 0x20, + EHttpProxyAuthorization, + EHttpPublic, + EHttpRange, + EHttpReferer, + EHttpRetryAfter, + EHttpServer, + EHttpTransferEncoding, + EHttpUpgrade = 0x28, + EHttpUserAgent, + EHttpVary, + EHttpVia, + EHttpWarning, + EHttpWWWAuthenticate, + EHttpContentDisposition, + EHttpXWapApplicationID = 0x2F, // Additional Enums required for WAP1.2 Push + EHttpXWapContentURI, + EHttpXWapInitiatorURI, + EHttpAcceptApplication, + EHttpBearerIndication, + EHttpPushFlag, + EHttpProfile, + EHttpProfileDiff, + EHttpProfileWarning + }; + + +// +// WSP Content-Type Assignments +// +// (see [WSP] Appdx A Table 40) +// +/** +@publishedAll +@deprecated +*/ +const TInt KHttpNumContentTypes = 77; + +/** +@publishedAll +@deprecated +*/ +const TInt KHttpMaxLenghtOfContentType = 42; + +/** +@publishedAll +@deprecated +*/ +static const TText8* const KHttpContentTypes[] = + { + _S8("*/*"), //0x00 + _S8("text/*"), + _S8("text/html"), + _S8("text/plain"), + _S8("text/x-hdml"), + _S8("text/x-ttml"), + _S8("text/x-vCalendar"), + _S8("text/x-vCard"), + _S8("text/vnd.wap.wml"), // 0x08 + _S8("text/vnd.wap.wmlscript"), + _S8("application/vnd.wap.catc"), + _S8("Multipart/*"), + _S8("Multipart/mixed"), + _S8("Multipart/form-data"), + _S8("Multipart/byteranges"), + _S8("multipart/alternative"), + _S8("application/*"), // 0x10 + _S8("application/java-vm"), + _S8("application/x-www-form-urlencoded"), + _S8("application/x-hdmlc"), + _S8("application/vnd.wap.wmlc"), + _S8("application/vnd.wap.wmlscriptc"), + _S8("application/vnd.wap.wsic"), + _S8("application/vnd.wap.uaprof"), + _S8("application/vnd.wap.wtls-ca-certificate"), // 0x18 + _S8("application/vnd.wap.wtls-user-certificate"), + _S8("application/x-x509-ca-cert"), + _S8("application/x-x509-user-cert"), + _S8("image/*"), + _S8("image/gif"), + _S8("image/jpeg"), + _S8("image/tiff"), + _S8("image/png"), // 0x20 + _S8("image/vnd.wap.wbmp"), + _S8("application/vnd.wap.multipart.*"), + _S8("application/vnd.wap.multipart.mixed"), + _S8("application/vnd.wap.multipart.form-data"), + _S8("application/vnd.wap.multipart.byteranges"), + _S8("application/vnd.wap.multipart.alternative"), + _S8("application/xml"), + _S8("text/xml"), // 0x28 + _S8("application/vnd.wap.wbxml"), + _S8("application/x-x968-cross-cert"), //Additional C-Types in WAP 1.2 + _S8("application/x-x968-ca-cert"), + _S8("application/x-x968-user-cert"), + _S8("text/vnd.wap.si"), + _S8("application/vnd.wap.sic"), + _S8("text/vnd.wap.sl"), + _S8("application/vnd.wap.slc"), //0x30 + _S8("text/vnd.wap.co"), + _S8("application/vnd.wap.coc"), + _S8("application/vnd.wap.multipart.related"), + _S8("application/vnd.wap.sia"), //0x34 or 52 in decimal + _S8("text/vnd.wap.connectivity-xml"), + _S8("application/vnd.wap.connectivity-wbxml"), + _S8("application/pkcs7-mime"), + _S8("application/vnd.wap.hashed-certificate"), + _S8("application/vnd.wap.signed-certificate"), + _S8("application/vnd.wap.cert-response"), + _S8("application/xhtml+xml"), + _S8("application/wml+xml"), + _S8("text/css"), + _S8("application/vnd.wap.mms-message"), + _S8("application/vnd.wap.rollover-certificate"), + _S8("application/vnd.wap.locc+wbxml"), + _S8("application/vnd.wap.loc+xml"), + _S8("application/vnd.syncml.dm+wbxml"), + _S8("application/vnd.syncml.dm+xml"), + _S8("application/vnd.syncml.notification"), + _S8("application/vnd.wap.xhtml+xml"), + _S8("application/vnd.wv.csp.cir"), + _S8("application/vnd.oma.dd+xml"), + _S8("application/vnd.oma.drm.message"), + _S8("application/vnd.oma.drm.content"), + _S8("application/vnd.oma.drm.rights+xml"), + _S8("application/vnd.oma.drm.rights+wbxml"), + _S8("application/vnd.oma.drm.roap-trigger+xml"), + _S8("application/vnd.oma.drm.roap-trigger+wbxml"),//0x4D + }; + + +// +// Table 41. Languages +// +/** +@publishedAll +@deprecated +*/ +const TInt KHttpNumLanguages = 0x8D; + +/** +@publishedAll +@deprecated +*/ +static const TText8* const KHttpLanguages[] = + { + _S8("AFAR AA"), + _S8("ABKHAZIAN AB"), + _S8("AFRIKAANS AF"), + _S8("AMHARIC AM"), + _S8("ARABIC AR"), + _S8("ASSAMESE AS"), + _S8("AYMARA AY"), + _S8("AZERBAIJANI AZ"), + _S8("BASHKIR BA"), + _S8("BYELORUSSIAN BE"), + _S8("BULGARIAN BG"), + _S8("BIHARI BH"), + _S8("BISLAMA BI"), + _S8("BENGALI BANGLA BN"), + _S8("TIBETAN BO"), + _S8("BRETON BR"), + _S8("CATALAN CA"), + _S8("CORSICAN CO"), + _S8("CZECH CS"), + _S8("WELSH CY"), + _S8("DANISH DA"), + _S8("GERMAN DE"), + _S8("BHUTANI DZ"), + _S8("GREEK EL"), + _S8("ENGLISH EN"), + _S8("ESPERANTO EO"), + _S8("SPANISH ES"), + _S8("ESTONIAN ET"), + _S8("BASQUE EU"), + _S8("PERSIAN farsi FA"), + _S8("FINNISH FI"), + _S8("FIJI FJ"), + _S8("URDU UR"), + _S8("FRENCH FR"), + _S8("UZBEK UZ"), + _S8("IRISH GA"), + _S8("SCOTS-GAELIC GD"), + _S8("GALICIAN GL"), + _S8("GUARANI GN"), + _S8("GUJARATI GU"), + _S8("HAUSA HA"), + _S8("HEBREW HE"), + _S8("HINDI HI"), + _S8("CROATIAN HR"), + _S8("HUNGARIAN HU"), + _S8("ARMENIAN HY"), + _S8("VIETNAMESE VI"), + _S8("INDONESIAN ID"), + _S8("WOLOF WO"), + _S8("XHOSA XH"), + _S8("ICELANDIC IS"), + _S8("ITALIAN IT"), + _S8("YORUBA YO"), + _S8("JAPANESE JA"), + _S8("JAVANESE JV"), + _S8("GEORGIAN KA"), + _S8("KAZAKH KK"), + _S8("ZHUANG ZA"), + _S8("CAMBODIAN KM"), + _S8("KANNADA KN"), + _S8("KOREAN KO"), + _S8("KASHMIRI KS"), + _S8("KURDISH KU"), + _S8("KIRGHIZ KY"), + _S8("CHINESE ZH"), + _S8("LINGALA LN"), + _S8("LAOTHIAN LO"), + _S8("LITHUANIAN LT"), + _S8("LATVIAN LETTISH LV"), + _S8("MALAGASY MG"), + _S8("MAORI MI"), + _S8("MACEDONIAN MK"), + _S8("MALAYALAM ML"), + _S8("MONGOLIAN MN"), + _S8("MOLDAVIAN MO"), + _S8("MARATHI MR"), + _S8("MALAY MS"), + _S8("MALTESE MT"), + _S8("BURMESE MY"), + _S8("UKRAINIAN UK"), + _S8("NEPALI NE"), + _S8("DUTCH NL"), + _S8("NORWEGIAN NO"), + _S8("OCCITAN OC"), + _S8("AFAN OROMO OM"), + _S8("ORIYA OR"), + _S8("PUNJABI PA"), + _S8("POLISH PL"), + _S8("PASHTO PUSHTO PS"), + _S8("PORTUGUESE PT"), + _S8("QUECHUA QU"), + _S8("ZULU ZU"), + _S8("KURUNDI RN"), + _S8("ROMANIAN RO"), + _S8("RUSSIAN RU"), + _S8("KINYARWANDA RW"), + _S8("SANSKRIT SA"), + _S8("SINDHI SD"), + _S8("SANGHO SG"), + _S8("SERBO-CROATIAN SH"), + _S8("SINGHALESE SI"), + _S8("SLOVAK SK"), + _S8("SLOVENIAN SL"), + _S8("SAMOAN SM"), + _S8("SHONA SN"), + _S8("SOMALI SO"), + _S8("ALBANIAN SQ"), + _S8("SERBIAN SR"), + _S8("SISWATI SS"), + _S8("SESOTHO ST"), + _S8("SUNDANESE SU"), + _S8("SWEDISH SV"), + _S8("SWAHILI SW"), + _S8("TAMIL TA"), + _S8("TELUGU TE"), + _S8("TAJIK TG"), + _S8("THAI TH"), + _S8("TIGRINYA TI"), + _S8("TURKMEN TK"), + _S8("TAGALOG TL"), + _S8("SETSWANA TN"), + _S8("TONGA TO"), + _S8("TURKISH TR"), + _S8("TSONGA TS"), + _S8("TATAR TT"), + _S8("TWI TW"), + _S8("UIGUR UG"), + _S8(""), + _S8("NAURU NA"), + _S8("FAROESE FO"), + _S8("FRISIAN FY"), + _S8("INTERLINGUA IA"), + _S8("VOLAPUK VO"), + _S8("INTERLINGUE IE"), + _S8("INUPIAK IK"), + _S8("YIDDISH YI"), + _S8("INUKTITUT IU"), + _S8("GREENLANDIC KL"), + _S8("LATIN LA"), + _S8("RHAETO-ROMANCE RM") + }; + +// +// WSP Character Set Assignments +// +// (see [WSP] Appdx A Table 42) +// +// The following two arrays form a paired look-up table +// +/** +@publishedAll +@deprecated +*/ +const TInt KHttpNumCharacterSets = 15; + +/** +@publishedAll +@deprecated +*/ +static const TText8* const KHttpCharacterSetNames[] = + { + _S8("big5"), + _S8("iso-10646-ucs-2"), + _S8("iso-8859-1"), + _S8("iso-8859-2"), + _S8("iso-8859-3"), + _S8("iso-8859-4"), + _S8("iso-8859-5"), + _S8("iso-8859-6"), + _S8("iso-8859-7"), + _S8("iso-8859-8"), + _S8("iso-8859-9"), + _S8("shift_JIS"), + _S8("us-ascii"), + _S8("utf-8"), + _S8("gsm-default-alphabet") // (not yet assigned) + }; + +/** +@publishedAll +@deprecated +*/ +static const TInt KHttpCharacterSetCodes[] = + { + 0x07ea, // big5 + 0x03e8, // iso-10646-ucs-2 + 0x04, // iso-8859-1 + 0x05, // iso-8859-2 + 0x06, // iso-8859-3 + 0x07, // iso-8859-4 + 0x08, // iso-8859-5 + 0x09, // iso-8859-6 + 0x0a, // iso-8859-7 + 0x0b, // iso-8859-8 + 0x0c, // iso-8859-9 + 0x11, // shift_JIS + 0x03, // us-ascii + 0x6a, // utf-8 + 0xffff // gsm-default-alphabet (not yet assigned) + }; + + +/** +Additional enumeration implementations for well known field values +that may be found in the Cache-Control header +As described in section 14.9 of RFC-2616 +Assigned WSP encodings +@publishedAll +@deprecated +*/ +enum TCacheControlFieldValue + { + ECacheControlNoCache = 0x80,// "no-cache" + ECacheCtrlNoStore, // "no-store" + ECacheCtrlMaxAge, // "max-age" + ECacheCtrlMaxStale, // "max-stale" + ECacheCtrlMinFresh, // "min-fresh" + ECacheCtrlOnlyIfCached, // "only-if-cached" + ECacheCtrlPublic, // "public" + ECacheCtrlPrivate, // "private" + ECacheCtrlNoTransform, // "no-transform" + ECacheCtrlMustRevalidate, // "must-revalidate" + ECacheCtrlProxyRevalidate, // "proxy-revalidate" + ECacheCtrlCacheExtension // "cache-extension" + }; + +#endif // __THTTPFIELDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tmsvsystemprogress.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tmsvsystemprogress.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,47 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// TMSVSYSTEMPROGRES.H +// +// + +#ifndef __TMSVSYSTEMPROGRESS_H__ +#define __TMSVSYSTEMPROGRESS_H__ + +#include + +const TUint KUIDMsgMsvSystemProgress = 0x1028308F; + +/** +Progress information that is defined by and understood by the system as well as client MTM's + +@publishedAll +@released +*/ +class TMsvSystemProgress + { +public: + IMPORT_C TMsvSystemProgress(); + IMPORT_C TMsvSystemProgress(const TMsvSystemProgress& aSysProg); + IMPORT_C TMsvSystemProgress& operator=(const TMsvSystemProgress& aSysProg); + +public: + /** the version number of class */ + const TInt iVersion; + /** Operation error code.*/ + TInt iErrorCode; + /** the id of an entry in an operation*/ + TMsvId iId; + }; + +#endif // #define __TMSVSYSTEMPROGRESS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tsendasclientpanic.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tsendasclientpanic.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,69 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TSENDASCLIENTPANIC_H__ +#define __TSENDASCLIENTPANIC_H__ + +/** +Defines the SendAs client panic codes. + +@publishedAll +@released +*/ +enum TSendAsClientPanic + { + /** + Indicates an invalid request was made. + */ + ESendAsClientPanicBadRequest = 0, + + /** + Indicates a request was made on a session with an invalid handle. + */ + ESendAsClientPanicBadSubSessionHandle = 1, + + /** + Indicates a request was made with invalid an argument. + */ + ESendAsClientPanicBadRequestArgument = 2, + + /** + Indicates a request while the session is already in use. + */ + ESendAsClientPanicSubsessionInUse = 3, + + /** + Indicates a request relating to a message was made where no message exists. + */ + ESendAsClientPanicNoCurrentMessage = 4, + + /** + Indicates a request deleting a non-existent message was made. + */ + ESendAsClientPanicMessageAlreadyDeleted = 5, + + /** + Indicates a request to send a message encountered a problem. + */ + ESendAsClientPanicSendingMessage = 6, + + /** + Indicates a request to add or create an attachment encountered a problem. + */ + ESendAsClientPanicAddingCreatingAttachment = 7 + + }; + +#endif // __TSENDASCLIENTPANIC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tsendasmessagetypefilter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tsendasmessagetypefilter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TSENDASMESSAGETYPEFILTER_H__ +#define __TSENDASMESSAGETYPEFILTER_H__ + + +#include + +/** +This class encapsulates filter information for available message type modules +(MTMs) held by the SendAs session. + +@publishedAll +@released +*/ +class TSendAsMessageTypeFilter + { +public: + IMPORT_C TSendAsMessageTypeFilter(); + IMPORT_C TSendAsMessageTypeFilter(TUid aMsgCap); + IMPORT_C TSendAsMessageTypeFilter(TUid aMsgCap, TInt aVal, RSendAs::TSendAsConditionType aCond); + IMPORT_C void Reset(); +public: + TUid iMessageCapability; + TInt iValue; + RSendAs::TSendAsConditionType iCondition; + }; + + +#endif // __TSENDASMESSAGETYPEFILTER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tuladdressstringtokenizer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tuladdressstringtokenizer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,165 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __TULADDRESSSTRINGTOKENIZER_H__ +#define __TULADDRESSSTRINGTOKENIZER_H__ + +#include + +/** +Address String Tokenizer API offers methods for parsing phone numbers and e-mail, +URL and URI addresses from the given text. The API consists of the +CTulAddressStringTokenizer class. + +Usage: + +@code + #include + + // SFoundItem instance + CTulAddressStringTokenizer::SFoundItem item; + + // Some text + TBufC<256> strSomeText(_L("Mail to me@someplace.com or call 040 1234567. + You can also tune in to audio feed at rtsp://someplace.com/somefeed.ra.")); + + // First the user has to create an instance of CTulAddressStringTokenizer by using the + // factory method NewL(). The method takes two parameters. The first + // parameter defines the text to be searched from and the second parameter + // tells what exactly is being looked for. + CTulAddressStringTokenizer singleSearch = CTulAddressStringTokenizer::NewL(strSomeText, + CTulAddressStringTokenizer::EFindItemSearchMailAddressBin); + + // The passed text is parsed in construction, and found items can be fetched + // by using the ItemArray() method. It returns a constant array containing + // all the found items. The interface also offers helper functions for + // handling the item array by itself. + + // Get count of found items. + TInt count(singleSearch->ItemCount()); + + // Get currently selected item (me@someplace.com) to the result1 variable. + singleSearch->Item(item); + TPtrC16 result1(strSomeText.Mid(item.iStartPos, item.iLength)); + + // Deallocate memory + delete singleSearch; + + // Create an instance of CTulAddressStringTokenizer and look for all possible + // things (cases work as binary mask). + CTulAddressStringTokenizer* multiSearch = CTulAddressStringTokenizer::NewL(strSomeText, + (CTulAddressStringTokenizer::EFindItemSearchPhoneNumberBin | + CTulAddressStringTokenizer::EFindItemSearchURLBin | + CTulAddressStringTokenizer::EFindItemSearchMailAddressBin | + CTulAddressStringTokenizer::EFindItemSearchScheme)); + + // Get count of found items. + TInt count2(multiSearch->ItemCount()); + + // Get currently selected item to the result2 variable. + multiSearch->Item(item); + + // Debug print all items and their type. + for( TInt i=0; iNextItem(item); + } + + // Deallocate memory + delete multiSearch; +@endcode + +@publishedAll +@released +*/ + +class CTulAddressStringTokenizer : public CBase + { +public: +#define TFindItemSearchCase TTokenizerSearchCase // For source compatibility with S60 only + /** + Enumeration to define the search case. + Multiple enumerations can be used as binary mask. + */ + enum TTokenizerSearchCase + { + // Searches phone numbers. + EFindItemSearchPhoneNumberBin = 4, + // Searches mail addresses. + EFindItemSearchMailAddressBin = 8, + // Searches fixed start URLs ("http://", "https://", "rtsp://"), "www.", "wap." and IPv4 addresses. + EFindItemSearchURLBin = 16, + // Searches for all URIs containing a scheme. + EFindItemSearchScheme = 32 + }; + + // Struct to contain a found item. + struct SFoundItem + { + TInt iStartPos; // Start position of the found item. + TInt iLength; // Length of the found item (characters). + TTokenizerSearchCase iItemType; // Search case of the found item + }; + +public: // Constructors and destructor + IMPORT_C static CTulAddressStringTokenizer* NewL( const TDesC& aText, TInt aSearchCases ); + IMPORT_C static CTulAddressStringTokenizer* NewL( const TDesC& aText, TInt aSearchCases, TInt aMinNumbers ); + IMPORT_C ~CTulAddressStringTokenizer(); +public: + IMPORT_C TInt ItemCount() const; + IMPORT_C TBool Item( SFoundItem& aItem ) const; + IMPORT_C TBool NextItem( SFoundItem& aItem ); + IMPORT_C TBool PrevItem( SFoundItem& aItem ); + IMPORT_C const CArrayFixFlat* ItemArray() const; + IMPORT_C TInt Position() const; + IMPORT_C void ResetPosition(); + IMPORT_C TInt DoNewSearchL( const TDesC& aText, TInt aSearchCases); + IMPORT_C TInt DoNewSearchL( const TDesC& aText, TInt aSearchCases, TInt aMinNumbers ); +private: + CTulAddressStringTokenizer(); + void AddItemL( TInt aStartPos, TInt aLength, TTokenizerSearchCase aType ); + + TBool SearchPhoneNumberL( const TDesC& aText ); + TBool SearchMailAddressL( const TDesC& aText ); + TBool SearchGenericUriL( const TDesC& aText ); + TBool SearchUrlL( const TDesC& aText, TBool aFindFixedSchemas ); + TBool ParseUrlL( const TDesC& aType, const TPtrC& aTokenPtr, TInt aTextOffset ); + + static TBool IsValidEmailChar(const TChar& charac); // Login part of the e-mail address + static TBool IsValidEmailHostChar(const TChar& charac); // Host part of the e-mail address + static TBool IsValidPhoneNumberChar(const TChar& charac); // Phone number + static TBool IsValidUrlChar( const TChar& charac); // URL + + void ConstructL( const TDesC& aText, TInt aSearchCases, TInt aMinNumbers ); + void PerformSearchL( const TDesC& aText, TInt aSearchCases ); + + CTulAddressStringTokenizer( const CTulAddressStringTokenizer& ); // Prohibit copy constructor + CTulAddressStringTokenizer& operator= ( const CTulAddressStringTokenizer& ); // Prohibit assigment operator +private: + CArrayFixFlat* iFoundItems; // Array of all found items. + TInt iPosition; // Engine's position in the iFoundItems. + TInt iMinNumbers; // Minimum count of numbers in a phone number + }; + + +#endif // __TULADDRESSSTRINGTOKENIZER_H__ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tulpanics.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tulpanics.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __TULPANICS_H__ +#define __TULPANICS_H__ + +// ========== DATA TYPES =================================== + +enum TTulPanic + { + ETulPanicDescriptorLength = 0x100, + ETulPanicInvalidTokenizerSearchCase + }; + + +//Error codes +enum TStringLoaderPanic + { + ETooFewArguments = 0, // Unsolved parameters in resource string. + ETooManyArguments = 1, // Already solved all parameters in resource string. + EKeyStringNotFound = 2, // The key string wasn't found in formating. + EInvalidIndex = 3, // Invalid index in Format-method + EDescriptorTooSmall = 4, // Too small destination descriptor. + ECCoeEnvNotInitialized = 5, // CCoeEnv is not initialized + EInvalidSubstitute = 6 // Substituted string contains KSubStringSeparator + }; + + +// ========== FUNCTION PROTOTYPES ========================== + +// --------------------------------------------------------- +// Panic +// +// --------------------------------------------------------- +// +GLREF_C void Panic (TTulPanic); + +#endif // __TULPANICS_H__ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tulphonenumberutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tulphonenumberutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,115 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __TULPHONENUMBERUTILS_H__ +#define __TULPHONENUMBERUTILS_H__ + +#include + + +/** +Class offers static methods for parsing and validating phone numbers. +Phone Parser API provides methods which are used to parse and validate +phone numbers. The API consists of the TulPhoneNumberUtils class. + +Examples of valid phone numbers: +1. +358501234567 +2. +358 (50) 123 4567 + +Even though both of the above examples are valid phone numbers, only 1) is +accepted as a phone number by many systems. To convert 2) to 1), use the +parsing method of the API. + +Usage: + +@code + #include + + // Example shows how to use the parsing method of the API. + + // A number to be parsed. + TBuf<50> number1 = _L("+358 (40) 123 132"); + + // Type of the phone number to be parsed is a regular phone number. + TBool validNumber1 = + TulPhoneNumberUtils::NormalizePhoneNumber( number1, + TulPhoneNumberUtils::EPlainPhoneNumber ); + + // The phone number number1 is a valid regular phone number. + // After parsing validNumber1 is ETrue and + // number1 is "+35840123132". + // Do something like SendSMS( number1 ) etc. + + // A number to be parsed. + TBuf<50> number2 = _L("+358 (40) 123p132"); // note 'p' + + // Type of the phone number to be parsed is a regular phone number. + TBool validNumber2 = + TulPhoneNumberUtils::NormalizePhoneNumber( number2, + TulPhoneNumberUtils::EPlainPhoneNumber ); + + // The phone number number2 is not a valid regular phone number. + // After parsing validNumber2 is EFalse and + // number2 is "+358 (40) 123p132" (unchanged). +@endcode + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TulPhoneNumberUtils) + { +public: + /** + * Enumeration for phone number types. + * Used to specify the type of phone numbers in methods of + * TulPhoneNumberUtils class. + */ + enum TPhoneNumberType + { + /** The supplied phone number is a regular phone number. */ + EPlainPhoneNumber, + /** The supplied phone number is a contact card number. */ + EContactCardNumber, + /** The supplied phone number is is a phone client number. */ + EPhoneClientNumber, + /** The supplied phone number is an SMS number. */ + ESMSNumber + }; + + IMPORT_C static TBool Normalize( TDes& aNumber, TPhoneNumberType aType = EPlainPhoneNumber); + IMPORT_C static TBool IsValid( const TDesC& aNumber, TPhoneNumberType aType = EPlainPhoneNumber ); +public: // deprecated + inline static TBool ParsePhoneNumber( TDes& aNumber, TInt aType ); + inline static TBool IsValidPhoneNumber( const TDesC& aNumber, TInt aType ); +private: + static TBool IsValidPhoneNumber( const TDesC& aNumber, const TDesC& aValidChars); + static void ParseInvalidChars( TDes& aNumber, const TDesC& aInvalidChars); + }; + +// For source compatibility with S60 + +/** @deprecated */ +inline TBool TulPhoneNumberUtils::ParsePhoneNumber( TDes& aNumber, TInt aType ) + { return TulPhoneNumberUtils::Normalize(aNumber, static_cast(aType)); } +/** @deprecated */ +inline TBool TulPhoneNumberUtils::IsValidPhoneNumber( const TDesC& aNumber, TInt aType ) + { return TulPhoneNumberUtils::IsValid(aNumber, static_cast(aType)); } + +#endif // __TULPHONENUMBERUTILS_H__ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tulstringresourcereader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tulstringresourcereader.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,76 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef TULSTRINGRESOURCEREADER_H +#define TULSTRINGRESOURCEREADER_H + +#include // RResourceReader + +/** +CTulStringResourceReader reads strings from resource without CCoeEnv. +If resource file given to the constructor is not found, the constructor leaves. +This module is mainly for server usage, where there is the need to read resources, +but no CCoeEnv instance is present. + +Usage: + +@code +#include +#include // Resource to be read header + +TFileName myFileName( _L("z:\\resource\\errorres.rsc") ); +CTulStringResourceReader* test = CTulStringResourceReader::NewL( myFileName ); + +TPtrC buf; +buf.Set(test-> ReadResourceString(R_ERROR_RES_GENERAL)); + +// Note that buf will only be valid as long as CTulStringResourceReader +// instance is alive and no new string is read by the same instance. +// If you need to read multiple strings, make copies. + +delete test; +@endcode + +@publishedAll +@released +*/ +class CTulStringResourceReader : public CBase + { +public: // Constructors and destructor + IMPORT_C static CTulStringResourceReader* NewL(TFileName& aResFile); + IMPORT_C static CTulStringResourceReader* NewLC(TFileName& aResFile); + IMPORT_C static CTulStringResourceReader* NewL(TFileName& aResFile, RFs& aFs); + IMPORT_C static CTulStringResourceReader* NewLC(TFileName& aResFile, RFs& aFs); + ~CTulStringResourceReader(); +public: + IMPORT_C const TDesC& ReadResourceString( TInt aResourceId ); +private: + CTulStringResourceReader(); + void ConstructL(TFileName& aResFile); + void ConstructL(TFileName& aResFile, RFs& aFs); +private: + RResourceFile iResourceFile; + HBufC* iResourceBuffer; + RFs iFsSession; + TPtrC iTruncatedTextPointer; + TBool iFsConnected; // ETrue if connected to the file server, else EFalse + }; + +#endif // TULSTRINGRESOURCEREADER_H + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tultextresourceutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tultextresourceutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,250 @@ +/* +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + + +#ifndef __TULTEXTRESOURCEUTILS_H__ +#define __TULTEXTRESOURCEUTILS_H__ + +#include +#include // class CArrayFix +#include // class MDesCArray +#include // class TBidiText +class CCoeEnv; + + +/** +Utility that provides methods to load and format resource strings. +String Loader API provides an interface to load and format resource strings +that may contain parameter(s) (\%U for (unicode) text or or \%N for numerical). +Resource strings are usually defined in an RSS file. + +The API consists of the TulTextResourceUtils class. All methods are static, so there is +no need to explicitly allocate memory for the interface class. +The implementation needs a CCoeEnv instance to access for example the +resource files. + + +Usage: + +Applications load and format resource strings from normal resources with +static methods of the TulTextResourceUtils class. The loading is done with the LoadL +and LoadLC methods and with the Load method in situations where memory +allocation from the heap is not possible. Formatting is done automatically +after loading in the LoadL and LoadLC methods, but it can also be done +separately with the Format method in situations where memory allocation from +the heap is not possible. For reading the resource strings with the Load, +LoadL and LoadLC methods, the user should provide a pointer to CCoeEnv for +efficiency reasons. If the pointer is not provided, the implementation uses +the CCoeEnv::Static method internally to get it. + +Different size displays can handle different length strings. To take full +advantage of this fact, TulTextResourceUtils supports resource strings with multiple +options for strings, separated by the character 0x0001. Each such string can +contain the same or different sub string keys (\%U and \%N). TulTextResourceUtils returns +all strings, it is the responsibility of the caller to parse the result and +choose the proper string to display. + +Setting the maximum sub string length may be done in the text resources. Sub +string maximum lengths can be localized separately for every language. +The maximum sub string length is of the format: \%U[NN] +where NN is a number [01..99]. Please note that NN must always consist of two +characters, i.e. if the sub string maximum length is eight characters, the +value to be used is 08, not plain 8. If the number of characters exceeds the +maximum length, the sub string is cut to fit and the last character is +replaced with an ellipsis character. + +The following examples describe the usage of the String Loader API. + +Usage when one TInt is added: + +@code + // In .loc -file + // #define text_example "You have %N undone tasks." + + // In .rss -file + // RESOURCE TBUF r_text_example { buf = text_example; } + + // (In the .cpp -file) + #include + + // Get CCoeEnv instance + CEikonEnv* iEikonEnv = CEikonEnv::Static(); + + TInt number(324); + + // Method reads a resource string with memory allocation + // and replaces the first %N-string in it with replacement TInt. + // The heap descriptor must be destroyed when it is no longer needed. + // iEikonEnv is needed for loading the resource string. + HBufC* stringholder = TulTextResourceUtils::LoadL(R_TEXT_EXAMPLE, number, iEikonEnv); + + // The 'number' is added to the resource string. The result is + // that stringholder points to a heap descriptor containing string: + // "You have 324 undone tasks." + + // Delete the heap descriptor + delete stringholder; +@endcode + + +Usage when several strings are added: + +An index can be included to parameters. Several parameters can have same index +if the same replacement is needed multiple times. + +@code + // In .loc -file + // #define text_example "I'm %2U%1U %3U%0U fine." + + // In .rss -file + // RESOURCE TBUF r_text_example { buf = text_example; } + + // In the .cpp -file + #include + + // Get CCoeEnv instance + CEikonEnv* iEikonEnv = CEikonEnv::Static(); + + CDesCArrayFlat* strings = new CDesCArrayFlat(4); + CleanupStack::PushL(strings); + + strings->AppendL(_L("orking")); //First string + + strings->AppendL(_L("ll")); //Second string + + strings->AppendL(_L("sti")); //Third string + + strings->AppendL(_L("w")); //Fourth string + + // Method reads a resource string with memory allocation and replaces + // the %(index)U strings in it with replacement strings from an array. + // The heap descriptor must be destroyed when it is no longer needed. + // iEikonEnv is needed for loading the resource string. + HBufC* stringholder = TulTextResourceUtils::LoadL(R_TEXT_EXAMPLE, *strings, iEikonEnv); + + // Four strings are added to the resource string. The result is + // that stringholder points to a heap descriptor containing string: + // "I'm still working fine." + + // Pop and delete strings array + CleanupStack::PopAndDestroy(); + + // Delete the heap descriptor + delete stringholder; +@endcode + + +Usage with scalable UI support: + +@code + // In .loc -file + // #define TEXT_EXAMPLE "You have missed %N messages from %U."<0x0001>"Missed %N msgs from %U."<0x0001>"Missed %N msgs." + + // In .rss -file + // RESOURCE TBUF R_TEXT_EXAMPLE { buf = TEXT_EXAMPLE; } + + // In the .cpp -file + #include + + // Get CCoeEnv instance + CEikonEnv* iEikonEnv = CEikonEnv::Static(); + + TInt number(12); + _LIT(name, "John Doe"); + + // Method reads a resource string with memory allocation, + // replaces all %N strings in it with a replacement TInt and + // all %U strings in it with a replacement string. + // The heap descriptor must be destroyed when it is no longer needed. + // iEikonEnv is needed for loading the resource string. + HBufC stringholder = TulTextResourceUtils::LoadL(R_TEXT_EXAMPLE, name, number, iEikonEnv); + + // The number and name are added to the resource string. The result is + // that stringholder points to a heap descriptor containing string: + // "You have missed 12 messages from John Doe.\001Missed 12 msgs from John + // Doe.\001Missed 12 msgs." + + // Delete the heap descriptor + delete stringholder; +@endcode + + +Error handling: + +The leave mechanism of the Symbian OS environment is used to handle memory +exhaustion. The panic mechanism is used to handle programming errors while +debugging. TulTextResourceUtils panics for seven different reasons. The panic +category is named TulTextResourceUtils. The panic codes are: + +- ETooFewArguments = 0 (Unsolved parameters in resource string.) +- ETooManyArguments = 1 (Already solved all parameters in resource string.) +- EKeyStringNotFound = 2 (The key string wasn't found in formatting.) +- EInvalidIndex = 3 (Invalid index in Format-method) +- EDescriptorTooSmall = 4 (Too small destination descriptor.) +- ECCoeEnvNotInitialized = 5 (CCoeEnv is not initialized) +- EInvalidSubstitute = 6 (Substituted string contains KSubStringSeparator) + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(TulTextResourceUtils) + { +public: + IMPORT_C static void Load(TDes& aDest, TInt aResourceId, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static void Format(TDes& aDest, const TDesC& aSource, TInt aPosition, TInt aSubs); + IMPORT_C static void Format(TDes& aDest, const TDesC& aSource, TInt aPosition, const TDesC& aSubs); + IMPORT_C static HBufC* LoadL(TInt aResourceId, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadL(TInt aResourceId, TInt aInt, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadL(TInt aResourceId, const TDesC& aString, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadL(TInt aResourceId, const TDesC& aString, TInt aInt, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadL(TInt aResourceId, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadL(TInt aResourceId, const MDesCArray& aStrings, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadL(TInt aResourceId, const MDesCArray& aStrings, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, TInt aInt, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, const TDesC& aString, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, const TDesC& aString, TInt aInt, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, const MDesCArray& aStrings, CCoeEnv* aLoaderEnv = NULL); + IMPORT_C static HBufC* LoadLC(TInt aResourceId, const MDesCArray& aStrings, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); +private: + TulTextResourceUtils(); + TulTextResourceUtils(const TulTextResourceUtils&); // Prohibit copy constructor + TulTextResourceUtils& operator= (const TulTextResourceUtils&); // Prohibit assigment operator + static HBufC* FormatStringL(const TDesC& aSource, const TDesC& aKey, const TDesC& aSubs, TBidiText::TDirectionality aDir); + static HBufC* FormatStringL(const TDesC& aSource, const TDesC& aKey, const TDesC& aSubs, + TBidiText::TDirectionality aDirectionality, TInt& aParamCount, TInt aSubCount); + static HBufC* FormatStringL(TDesC& aSource, const CArrayFix& aInts, TInt aMax, TBidiText::TDirectionality aDir); + static HBufC* FormatStringL(TDesC& aSource, const MDesCArray& aStrings, TInt aMax, TBidiText::TDirectionality aDir); + static TInt Formater(TDes& aDest, const TDesC& aSource, const TDesC& aKey, + const TDesC& aSubs, TBidiText::TDirectionality aDirectionality); + + static void KeyStringFormater(TDes& aDest, const TText& aKey, TInt aPosition, const TDesC& aKeyString); + static TBidiText::TDirectionality ResolveDirectionality(TDes& aText, TBool* aFound); + static TInt GetParamCount(const TDesC& aText, TInt aIndex = -1); + static TInt GetSubStringCount(const TDesC& aText); + + static TBidiText::TDirectionality DirectionalityL(const TDesC& aText, TBool* aFound); + static HBufC* ResolveSubStringDirsL(TDes& aText, TInt aCount, TBool* aMarker); + static HBufC* ResolveSubStringL(TDes& aText, TBool* aMarker); + static void RemoveNoDirMarkers(TDes& aText); + static void FormatL(TDes& aDest, const TDesC& aSource, const TDesC& aKeybuf, const TDesC& aSubs); + }; + + +#endif // __TULTEXTRESOURCEUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tz.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tz.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,347 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TIMEZONE_H__ +#define __TIMEZONE_H__ + +#include +#include +#include +#include + +class CTzChangeNotifier; +class CTzRules; +class CTzRuleHolder; + +//------------------------------------------------------------------------- +/** +Encapsulates a time zone identifier. + +The identifier may be either a name or a number. +@publishedAll +@released +@since 9.1 +*/ +class CTzId : public CBase + { +public: + + IMPORT_C ~CTzId(); + + /** + @internalComponent + */ + IMPORT_C CTzId* CloneL() const; + + IMPORT_C static CTzId* NewL(TUint aNumericId); + + IMPORT_C static CTzId* NewL(const TDesC8& aNameIdentity); + + /** + @internalComponent + */ + IMPORT_C static CTzId* NewL(RReadStream& aStream); + + /** + @internalComponent + */ + IMPORT_C void SetId(TUint aNumericId); + + /** + @internalComponent + */ + IMPORT_C void SetIdL(const TDesC8& aNameIdentity); + + /** + @internalComponent + */ + IMPORT_C void InternalizeL(RReadStream& aStream); + + /** + @internalComponent + */ + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + + IMPORT_C const TDesC8& TimeZoneNameID() const; + + IMPORT_C TUint TimeZoneNumericID() const; + + IMPORT_C TBool operator==(const CTzId& aTZId) const; + + inline TBool operator!=(const CTzId& aTZId) const; + +public: + static CTzId* NewL(TUint aReferenceId, const TDesC8& aZoneIdentity); + void SetIdL(TUint aNumRefId, const TDesC8& aZoneIdentity); + +private: + void ConstructL(const TDesC8& aZoneIdentity); + CTzId(); + CTzId(TUint aNumericId); + +private: + HBufC8* iZoneId; + TUint32 iReferenceId; + }; + + +/** +The client interface to the time zone server. + +This class performs two basic functions: +1. Converts between UTC time and local time. +2. Sets the current local time zone. + +NOTE: The presence of a time zone server will alter the behaviour of the +time zone related function calls User::SetUTCOffset() and +User::SetUTCTimeAndOffset(). The time zone server is shutdown when the +last session (RTz) is closed. Therefore, to maintain consistent time related behaviour, +licensees may want to keep a system level time zone server session open at all times. + +@see User + +Exceptional cases occur when a user requests conversion +for a non-existent local time or a double local time. + +Non-existent local times occur when the local time +changes from winter to summer for DST. + +For example, 01:59 local time is non-existent on the day of a change to BST +in Europe/London since the time changes directly from 12:59:59 to 2:00. + +A double local time occurs when the local time changes from +summer to winter. + +For example, if the time changes at 02:00 AM BST to 01:00 AM GMT +then local times between 01:00 and 01:59 occur twice. + +The conversion applies the DST offset if the local time value is double and applies +the standard UTC offset if the local time does not exists. + +This decision makes the conversion process asymmetrical around +the discontinuity in the local time when there is a DST change. + +An example conversion from a double local time to UTC and +from UTC to a double local time is: + + 01:59 AM BST => 00:59 AM UTC + 01:59 AM UTC => 01:59 AM GMT + +An example conversion from a non-existent local time to UTC +and from UTC to local time is: + + 01:59 AM GMT => 01:59 AM UTC + 01:59 AM UTC => 02:59 AM BST + + +@publishedAll +@released +@since 9.1 +*/ +class RTz : public RSessionBase + { +public: + /** + These enumerators are to describe different modes of the automatic + DST event handling. + + These are used both as arguments for the API SetAutoUpdateBehaviorL, + and as notifications for the publish and subscribe. + */ + enum TTzAutoDSTUpdateModes + { + /** No auto update notification when a DST event occurs. */ + ETZAutoDSTUpdateOff = 0, + + /** Automatic time update will occur and the client app will be notified. */ + ETZAutoDSTUpdateOn, + + /** Client app needs to confirm that the time should be updated whenever a DST event occurs. */ + ETZAutoDSTNotificationOnly, + }; + + enum TTzChanges + { + /** Used for notifying that the timezone database has changed.*/ + ETZDatabaseChanged = 1, + /** Used for notifying that the system timezone database has changed.*/ + ETZSystemTimeZoneChanged, + /** Used for notifying that the DST rule has changed. */ + ETZDSTRuleChanged, + /** Used for notifying that an automatic time update has taken place. */ + ETZAutomaticTimeUpdate + }; + + enum TPanic + { + /** This panic indicates that the time zone server has not been found.*/ + EPanicServerNotFound = 1, + /** This panic indicates that the server has died.*/ + EPanicServerDead, + /** This panic indicates that the time zone ID is not set.*/ + EPanicTimeZoneNameIdNotSet, + /** This panic indicates that an out of range index was accessed.*/ + EPanicRulesIndexOutofRange, + /** This panic indicates that there are no rules present for this time zone.*/ + EPanicTimeNotCoveredByRules, + /** This panic indicates that the time zone rules are unusable.*/ + EPanicBadTimeZoneRules, + /** This panic indicates that an unsupported time reference has been accessed.*/ + EPanicUnsupportedTimeReference, + /** This panic indicates that the time zone ID is not supported.*/ + EPanicUnsupportedTimeZoneNoId, + /** This panic indicates that a request for notification is already pending from the client.*/ + EPanicNotificationRequestPending, + /** This panic indicates that an incorrect data has been sent to the server.*/ + EPanicInvalidArgument + }; + + /** + @internalComponent + */ + IMPORT_C static void Panic(TPanic aPanic); + + /** + @internalTechnology + */ + IMPORT_C CTzId* GetTimeZoneIdL() const; + + /** + @internalTechnology + */ + IMPORT_C void SetTimeZoneL(CTzId& aZone) const; + + IMPORT_C void Close(); + + IMPORT_C TInt Connect(); + + IMPORT_C ~RTz(); + + IMPORT_C RTz(); + + IMPORT_C TInt ConvertToLocalTime(TTime& aTime) const; + + IMPORT_C TInt ConvertToLocalTime(TTime& aTime, const CTzId& aZone) const; + + IMPORT_C TInt ConvertToUniversalTime(TTime& aTime) const; + + IMPORT_C TInt ConvertToUniversalTime(TTime& aTime, const CTzId& aZone) const; + + IMPORT_C void GetOffsetsForTimeZoneIdsL(const RArray& aTzNumericIds, RArray& aOffsets) const; + + IMPORT_C TInt AutoUpdateSettingL(); + + IMPORT_C void SetAutoUpdateBehaviorL(TTzAutoDSTUpdateModes aUpdateEnabled); + + // Methods for setting the system time. + IMPORT_C TInt SetHomeTime(const TTime& aLocalTime) const; + + IMPORT_C TBool IsDaylightSavingOnL(CTzId& aZone) const; + + IMPORT_C TBool IsDaylightSavingOnL(CTzId& aZone, const TTime& aUTCTime) const; + + // Get Encoded Rules for Current Local Time Zone + IMPORT_C CTzRules* GetTimeZoneRulesL(const TTime& aStartTime, const TTime& aEndTime, TTzTimeReference aTimeRef) const; + + IMPORT_C CTzRules* GetTimeZoneRulesL(const CTzId& aZone, const TTime& aStartTime, const TTime& aEndTime, TTzTimeReference aTimeRef) const; + + void RegisterTzChangeNotifier(TRequestStatus& aStatus) const; + TInt CancelRequestForNotice() const; + TVersion Version() const; + + IMPORT_C void NotifyHomeTimeZoneChangedL(const NTzUpdate::TTimeZoneChange& aChange) const; + + IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime, const TInt aUTCOffset); + + IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime, const TInt aUTCOffset, TBool aPersistInCenRep); + + IMPORT_C void __dbgClearCacheL(TBool aRestartCaching); + + TBool StartCachingL(); + TUint16 CurrentCachedTzId(); + +private: + static TInt StartServer(); + TInt DoConnect(); + void doConvertL(const CTzId& aZone, TTime& aTime, + TTzTimeReference aTimerRef) const; + void doConvertL(TTime& aTime, + TTzTimeReference aTimerRef) const; +private: + CTzRuleHolder* iRulesHolder; + }; + +/** +Encapsulates a TTime and a TTzTimeReference. +Use, for example, for iCalendar's DTSTART. + +@publishedAll +@released +*/ +class TTimeWithReference + { +public: + static inline TTimeWithReference Max(); + inline TTimeWithReference(); + inline TTimeWithReference(TTime aTime, TTzTimeReference aTimeReference=ETzUtcTimeReference); + inline TTimeWithReference(TDateTime aTime, TTzTimeReference aTimeReference=ETzUtcTimeReference); + inline bool operator==(const TTimeWithReference& aTime) const; + inline bool operator!=(const TTimeWithReference& aTime) const; + + TTime iTime; + TTzTimeReference iTimeReference; + }; + +/** Inequality operator. + +@param aTZId The time zone ID to compare with this one. +@return True if the two IDs are different. False if they are the same. +*/ +inline TBool CTzId::operator!=(const CTzId& aTZId) const + { + return (!operator==(aTZId)); + } + +////////////////////////////////// +// TTimeWithReference +////////////////////////////////// +inline TTimeWithReference TTimeWithReference::Max() + { + return TTimeWithReference( + TDateTime(9999,EDecember,30,23,59,59,0), + ETzUtcTimeReference); + } + +inline TTimeWithReference::TTimeWithReference() + : iTime(0), iTimeReference(ETzUtcTimeReference) + { + } +inline TTimeWithReference::TTimeWithReference(TTime aTime, TTzTimeReference aTimeReference) + : iTime(aTime), iTimeReference(aTimeReference) + { + } +inline TTimeWithReference::TTimeWithReference(TDateTime aTime, TTzTimeReference aTimeReference) + : iTime(aTime), iTimeReference(aTimeReference) + { + } +inline bool TTimeWithReference::operator==(const TTimeWithReference& aTime) const + { + return(aTime.iTime == iTime && aTime.iTimeReference == iTimeReference); + } +inline bool TTimeWithReference::operator!=(const TTimeWithReference& aTime) const + { + return(!(*this == aTime)); + } +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tzconverter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tzconverter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,62 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TZ_CONVERTER_H__ +#define __TZ_CONVERTER_H__ + +#include +#include +#include + +class CTzChangeNotifier; +class CVTzActualisedRules; +class CTzRuleHolder; + +/** +Converts between time expressed in UTC and local time. + +@publishedAll +@released + +@see RTz +@since 9.1 +*/ +class CTzConverter : public CBase + { +public: + + IMPORT_C static CTzConverter* NewL(RTz& aTzServer); + IMPORT_C ~CTzConverter(); + IMPORT_C TInt ConvertToLocalTime(TTime& aTime); + IMPORT_C TInt ConvertToLocalTime(TTime& aTime, const CTzId& aZone); + IMPORT_C TInt ConvertToUniversalTime(TTime& aTime); + IMPORT_C TInt ConvertToUniversalTime(TTime& aTime, const CTzId& aZone); + IMPORT_C TUint16 CurrentTzId(); + + void NotifyTimeZoneChangeL(RTz::TTzChanges aChange); + const RTz& Server() const; +private: + CTzConverter(RTz& aTzServer); + void ConstructL(); + + +private: + RTz& iTzServer; + + TAny* iReserved; + TAny* iReserved2; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tzdefines.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tzdefines.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TZDEFINES_H__ +#define __TZDEFINES_H__ + +/** Time Zone Rule Day Rules. +@publishedAll +@released +*/ +enum TTzRuleDay + { + ETzFixedDate = 0, // e.g. 11th October + ETzDayAfterDate, // e.g. first Sunday after 8th October + ETzDayBeforeDate, // e.g. Sunday before 7th October + ETzDayInLastWeekOfMonth // e.g. last Sunday in October + }; + +/** +this const must match the last TTzRuleDay enumeration; +'int' is deliberately used because this file is shared with non Symbian C++ environments +@internalComponent +*/ +const int KValidatedLastDayRule = ETzDayInLastWeekOfMonth; + +/** Time reference. +@publishedAll +@released +*/ +enum TTzTimeReference + { + ETzUtcTimeReference = 0, + ETzStdTimeReference, + ETzWallTimeReference // Local time + }; + +/** +this const must match the last TTzTimeReference enumeration +'int' is deliberately used because this file is shared with non Symbian C++ environments +@internalComponent +*/ +const int KValidatedLastTimeReference = ETzWallTimeReference; +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tzlocalizationdatatypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tzlocalizationdatatypes.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,295 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TZLOCAL_DATATYPES_H__ +#define __TZLOCAL_DATATYPES_H__ + +#include //CBase + +/** +Encapsulates the correspondence between a time zone ID and a resource ID and +facilitates fast finding of resources in the resource file. For internal use only. + +@internalTechnology +*/ +class TTzLocalizedId + { + public: + // Represents an invalid UTC offset of 25 hours and 1 minutes, in minutes + enum TTzUTCOffset + { + ETzInvalidUTCOffset = 1501 + }; + + public: + TTzLocalizedId(const TUint16 aTzId, const TUint aResourceId =0); + + //Accessor methods + inline TUint16 TimeZoneId() const; + inline TUint ResourceId() const; + inline TInt UTCOffset() const; + inline void SetUTCOffset(TInt aOffsetInMinutes); + + private: + TUint16 iTzId; + TUint iResourceId; + TInt iUTCOffset; //UTC offset stored in minutes + }; + +/** +Encapsulates a localized (exemplar) city. + +@publishedAll +@released +*/ +class CTzLocalizedCity : public CBase + { + public: + static CTzLocalizedCity* NewL( + const TDesC& aName, + const TTzLocalizedId& aTzLocalizedId, + const TUint8 aGroupId =0); + static CTzLocalizedCity* NewLC( + const TDesC& aName, + const TTzLocalizedId& aTzLocalizedId, + const TUint8 aGroupId =0); + ~CTzLocalizedCity(); + + //Accessor methods + IMPORT_C TPtrC Name() const; + IMPORT_C TUint16 TimeZoneId() const; + IMPORT_C TUint8 GroupId() const; + TTzLocalizedId TzLocalizedId() const; + TInt UTCOffset() const; + void SetUTCOffset(TInt aUTCoffset); + void SetCityIndex(TInt aIndex); + TInt CityIndex() const; + + private: + void ConstructL(const TDesC& aName); + CTzLocalizedCity(const TUint8 aGroupId, const TTzLocalizedId& aTzLocalizedId); + + private: + //Member data + HBufC* iName; + TUint8 iGroupId; + TTzLocalizedId iTzLocalizedId; + TInt iCityIndex; + }; + +/** +Encapsulates a localized group of (exemplar) cities. + +@publishedAll +@released +*/ +class CTzLocalizedCityGroup : public CBase + { + public: + static CTzLocalizedCityGroup* NewL(const TDesC& aName, const TUint8 aGroupId); + static CTzLocalizedCityGroup* NewLC(const TDesC& aName, const TUint8 aGroupId); + ~CTzLocalizedCityGroup(); + + //Accessor methods + IMPORT_C TPtrC Name() const; + IMPORT_C TUint8 Id() const; + + private: + void ConstructL(const TDesC& aName); + CTzLocalizedCityGroup(const TUint8 aGroupId); + + private: + //Member data + HBufC* iName; + TUint8 iGroupId; + }; + +/** +Encapsulates a group of LDML localized timezone names. +LDML stands for Locale Data Markup Language. For details, see +http://www.openi18n.org/specs/ldml/1.0/ldml-spec.htm. + +@publishedAll +@released +*/ +class CTzLocalizedTimeZone : public CBase + { + public: //enums + /** + Flags to identify a cached zone. + @publishedAll + @released + */ + enum TTzFrequentlyUsedZone + { + /** The current zone. */ + ECurrentZone, + /** The home zone. */ + EHomeZone, + /** The zone of interest. */ + EInterestZone, + /** The first recently-used zone. */ + ERecentZone1, + /** The second recently-used zone. */ + ERecentZone2, + /** Specifies the number of cached zones. Not to be used as an API argument. */ + ECachedTimeZones // If new items are added to this enum, this must + // left as last item, because it is used to keep + // count of the number of cached zones + }; + + public: + static CTzLocalizedTimeZone* NewL( + const TTzLocalizedId& aTzLocalizedId, + const TDesC& aStandardName, + const TDesC& aDaylightName, + const TDesC& aShortStandardName, + const TDesC& aShortDaylightName); + + static CTzLocalizedTimeZone* NewLC( + const TTzLocalizedId& aTzLocalizedId, + const TDesC& aStandardName, + const TDesC& aDaylightName, + const TDesC& aShortStandardName, + const TDesC& aShortDaylightName); + + ~CTzLocalizedTimeZone(); + + //Accessor methods + IMPORT_C TUint16 TimeZoneId() const; + IMPORT_C TPtrC StandardName() const; + IMPORT_C TPtrC DaylightName() const; + IMPORT_C TPtrC ShortStandardName() const; + IMPORT_C TPtrC ShortDaylightName() const; + TTzLocalizedId TzLocalizedId() const; + TInt UTCOffset() const; + void SetUTCOffset(TInt aUTCoffset); + + private: + void ConstructL( + const TDesC& aStandardName, + const TDesC& aDaylightName, + const TDesC& aShortStandardName, + const TDesC& aShortDaylightName); + CTzLocalizedTimeZone(const TTzLocalizedId& aTzLocalizedId); + + private: + //Member data + TTzLocalizedId iTzLocalizedId; + HBufC* iStandardName; + HBufC* iDaylightName; + HBufC* iShortStandardName; + HBufC* iShortDaylightName; + }; + +/** +Template for arrays of localized objects. Implemented using a thin template. +All functions are inline. + +@publishedAll +@released +*/ +template +class CTzLocalizedArray : public CBase + { + protected: + inline ~CTzLocalizedArray(); + + inline T& At(TInt aIndex) const; + inline TInt Count() const; + inline void AppendL(T* aElement); + inline void Remove(TInt aIndex); + inline void Sort(TLinearOrder aOrder); + inline TInt Find(T* aEntry,TIdentityRelation aIdentityRelation); + + inline CTzLocalizedArray(); + + private: + //Member data + RPointerArray iArray; + }; + +// Assign concrete classes for each of the arrays that will be used +// This guards against future BC problems + +/** +An array of cities. This just passes function calls on to its templated base +class, CTzLocalizedArray. + +@publishedAll +@released +*/ +class CTzLocalizedCityArray : public CTzLocalizedArray + { + public: + IMPORT_C static CTzLocalizedCityArray* NewL(); + IMPORT_C static CTzLocalizedCityArray* NewLC(); + + IMPORT_C CTzLocalizedCity& At(TInt aIndex) const; + IMPORT_C TInt Count() const; + IMPORT_C void AppendL(CTzLocalizedCity* aCity); + IMPORT_C void Remove(TInt aIndex); + IMPORT_C void Sort(TLinearOrder anOrder); + IMPORT_C TInt Find(CTzLocalizedCity* anEntry,TIdentityRelation aIdentityRelation); + }; + +/** +An array of city groups. This just passes function calls on to its templated base +class, CTzLocalizedArray. + +@publishedAll +@released +*/ +class CTzLocalizedCityGroupArray : public CTzLocalizedArray + { + public: + IMPORT_C static CTzLocalizedCityGroupArray* NewL(); + IMPORT_C static CTzLocalizedCityGroupArray* NewLC(); + + IMPORT_C CTzLocalizedCityGroup& At(TInt aIndex) const; + IMPORT_C TInt Count() const; + IMPORT_C void AppendL(CTzLocalizedCityGroup* aGroup); + IMPORT_C void Remove(TInt aIndex); + IMPORT_C void Sort(TLinearOrder anOrder); + IMPORT_C TInt Find(CTzLocalizedCityGroup* anEntry,TIdentityRelation aIdentityRelation); + }; + +/** +An array of time zones. This just passes function calls on to its templated base +class, CTzLocalizedArray. + +@publishedAll +@released +*/ +class CTzLocalizedTimeZoneArray : public CTzLocalizedArray + { + public: + IMPORT_C static CTzLocalizedTimeZoneArray* NewL(); + IMPORT_C static CTzLocalizedTimeZoneArray* NewLC(); + + IMPORT_C CTzLocalizedTimeZone& At(TInt aIndex) const; + IMPORT_C TInt Count() const; + IMPORT_C void AppendL(CTzLocalizedTimeZone* aElement); + IMPORT_C void Remove(TInt aIndex); + IMPORT_C void Sort(TLinearOrder anOrder); + IMPORT_C TInt Find(CTzLocalizedTimeZone* anEntry,TIdentityRelation aIdentityRelation); + }; + +#include + +#endif //__TZLOCAL_DATATYPES_H__ +//================================================================== +// End of file +//================================================================== diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tzlocalizationdatatypes.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tzlocalizationdatatypes.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,152 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TZLOCAL_DATATYPES_INL__ +#define __TZLOCAL_DATATYPES_INL__ + +//================================================================== +// TTzLocalizedId inline Functions +//================================================================== +/** +Returns the time zone ID. +@return The time zone ID. +*/ +inline TUint16 TTzLocalizedId::TimeZoneId() const + { + return iTzId; + } + +/** +Returns the resource ID. +@return The resource ID. +*/ +inline TUint TTzLocalizedId::ResourceId() const + { + return iResourceId; + } + +/** +Returns the UTC offset in minutes. +This value should only be used for array sorting. +@return The UTC offset in minutes. +*/ +inline TInt TTzLocalizedId::UTCOffset() const + { + return iUTCOffset; + } + +/** +Sets the UTC offset in minutes. +This value should only be used for internal array sorting. +@param aOffsetInMinutes The new UTC offset in minutes. +*/ +inline void TTzLocalizedId::SetUTCOffset(TInt aOffsetInMinutes) + { + iUTCOffset = aOffsetInMinutes; + } + +//================================================================== +// CTzLocalizedArray's inline functions +//================================================================== +/** +Destructor +@internalTechnology +*/ +template +inline CTzLocalizedArray::~CTzLocalizedArray() + { + iArray.ResetAndDestroy(); + } + +/** +Default constructor +@internalTechnology +*/ +template +inline CTzLocalizedArray::CTzLocalizedArray() + { + } +/** +Returns the element at the specified index. +@param aIndex Index of the element to get. +@return The element at aIndex. +@internalTechnology +*/ +template +inline T& CTzLocalizedArray::At(TInt aIndex) const + { + return *(iArray[aIndex]); + } + +/** +Returns the number of elements in the array. +@return The number of elements in the array. +@internalTechnology +*/ +template +inline TInt CTzLocalizedArray::Count() const + { + return iArray.Count(); + } + +/** +Appends aElement to this array. +@param aElement The element to add. +@internalTechnology +*/ +template +inline void CTzLocalizedArray::AppendL(T* aElement) + { + iArray.AppendL(aElement); + } + +/** +Removes the element at the specified index. +@param aIndex The index of the element to remove. +@internalTechnology +*/ +template +inline void CTzLocalizedArray::Remove(TInt aIndex) + { + iArray.Remove(aIndex); + } + +/** +Sorts this array. +@param aOrder The sorting function to use. +@internalTechnology +*/ +template +inline void CTzLocalizedArray::Sort(TLinearOrder aOrder) + { + iArray.Sort(aOrder); + } + +/** +Finds an element in this array. +@param aIdentityRelation finding function to use. +@internalTechnology +*/ +template +inline TInt CTzLocalizedArray::Find(T* aEntry,TIdentityRelation aIdentityRelation) + { + return iArray.Find(aEntry,aIdentityRelation); + } + +#endif //__TZLOCAL_DATATYPES_INL__ + +//================================================================== +// End of file +//================================================================== diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tzlocalizer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tzlocalizer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,175 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TzLocalizer_H__ +#define __TzLocalizer_H__ + +#include //CBase + +#include //CTzLocalizedCity, CTzLocalizedCityGroup etc + +// Forward Declarations +class MTzLocalizationReader; +class MTzLocalizationWriter; + +/** +Retrieves localized time zone information based on a time zone ID. + +Time zone information is available in the following forms: +- Standard Name, for instance Greenwich Mean Time, +- Short Standard Name, for instance GMT, +- Daylight Savings Name, for instance British Summer Time, +- Short Daylight Savings Name, for instance BST. + +This information is encapsulated in a CTzLocalizedTimeZone object. + +A collection of localizable cities for a specific time zone can also be returned. +New cities can be added to a time zone. Cities may also be added to groups, but +a city may only be a member of one group. + +@publishedAll +@released +*/ +class CTzLocalizer : public CBase + { + public: + /** Panic reasons for the time zone localization component. */ + enum TTzLocalizerPanics + { + /** The time zone server was not found. */ + ETzLocalizerPanicTimeZoneServerNotFound, + /** A resource file was not found. */ + ETzLocalizerPanicResourceFileNotFound + }; + + /** Used to specify the sort order of localized time zone information. */ + enum TTzSortOrder + { + /** Unsorted. This is the fastest way to get localized data. */ + ETzUnsorted, + /** Sort by UTC offset starting with the lowest. */ + ETzUTCAscending, + /** Sort by UTC offset starting with the highest. */ + ETzUTCDescending, + /** Sort by name (city name/group name/standard time zone name), from A-Z. */ + ETzAlphaNameAscending, + /** Sort by name (city name/group name/standard time zone name), from Z-A. */ + ETzAlphaNameDescending, + /** Sort by standard name from A-Z. */ + ETzAlphaStandardNameAscending, + /** Sort by daylight savings name from A-Z. */ + ETzAlphaDaylightNameAscending, + /** Sort by short standard name from A-Z. */ + ETzAlphaShortStandardNameAscending, + /** Sort by short daylight savings name from A-Z. */ + ETzAlphaShortDaylightNameAscending, + /** Sort by standard name from Z-A. */ + ETzAlphaStandardNameDescending, + /** Sort by daylight savings name from Z-A. */ + ETzAlphaDaylightNameDescending, + /** Sort by short standard name from Z-A. */ + ETzAlphaShortStandardNameDescending, + /** Sort by short daylight savings name from Z-A. */ + ETzAlphaShortDaylightNameDescending + }; + + public: + //Construction / Destruction + IMPORT_C static CTzLocalizer* NewL(); + IMPORT_C static CTzLocalizer* NewLC(); + IMPORT_C ~CTzLocalizer(); + + //Time zones + IMPORT_C CTzLocalizedTimeZone* GetLocalizedTimeZoneL(TInt aTimeZoneId) const; + IMPORT_C CTzLocalizedTimeZone* GetLocalizedTimeZoneL(const CTzLocalizedCity& aCity) const; + IMPORT_C CTzLocalizedTimeZoneArray* GetAllTimeZonesL(const TTzSortOrder aSortOrder = ETzUnsorted); + + IMPORT_C void SetTimeZoneL(TInt aTimeZoneId); + + //City Management + IMPORT_C CTzLocalizedCity* GetDefaultCityL(TInt aTimeZoneId) const; + IMPORT_C CTzLocalizedCity* GetDefaultCityL(const CTzLocalizedCity& aCity) const; + IMPORT_C CTzLocalizedCity* GetDefaultCityL(const CTzLocalizedTimeZone& aTimeZone) const; + + IMPORT_C CTzLocalizedCityArray* GetCitiesL(const TTzSortOrder aSortOrder = ETzUnsorted); + IMPORT_C CTzLocalizedCityArray* GetCitiesL(TInt aTimeZoneId,const TTzSortOrder aSortOrder = ETzUnsorted); + IMPORT_C CTzLocalizedCityArray* GetCitiesL(const CTzLocalizedTimeZone& aTimeZone,const TTzSortOrder aSortOrder = ETzUnsorted); + IMPORT_C CTzLocalizedCityArray* GetCitiesL(const CTzLocalizedCity& aCity,const TTzSortOrder aSortOrder = ETzUnsorted); + + IMPORT_C CTzLocalizedCity* AddCityL(TInt aTimeZoneId,const TDesC& aCityName, TInt aGroupId = 0); + IMPORT_C void RemoveCityL(CTzLocalizedCity* aCity); + + //City Groups + IMPORT_C CTzLocalizedCityGroupArray* GetAllCityGroupsL(const TTzSortOrder aSortOrder = ETzUnsorted) const; + IMPORT_C CTzLocalizedCityGroup* GetCityGroupL(TInt aGroupId) const; + IMPORT_C CTzLocalizedCityGroup* GetCityGroupL(const CTzLocalizedCity& aCity) const ; + + IMPORT_C CTzLocalizedCityArray* GetCitiesInGroupL(TInt aGroupId,const TTzSortOrder aSortOrder = ETzUnsorted); + IMPORT_C CTzLocalizedCityArray* GetCitiesInGroupL(const CTzLocalizedCity& aCity,const TTzSortOrder aSortOrder = ETzUnsorted); + IMPORT_C CTzLocalizedCityArray* GetCitiesInGroupL(const CTzLocalizedCityGroup& aCityGroup,const TTzSortOrder aSortOrder = ETzUnsorted); + + //Frequently Used Zones + IMPORT_C CTzLocalizedTimeZone* GetFrequentlyUsedZoneL(const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); + IMPORT_C CTzLocalizedCity* GetFrequentlyUsedZoneCityL(const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); + IMPORT_C void SetFrequentlyUsedZoneL(TInt aTimeZoneId,const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); + IMPORT_C void SetFrequentlyUsedZoneL(const CTzLocalizedTimeZone& aTimeZone,const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); + IMPORT_C void SetFrequentlyUsedZoneL(const CTzLocalizedCity& aCity,const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); + + //Find functions + IMPORT_C CTzLocalizedCity* FindCityByNameL(const TDesC& aCityName, const TInt aTimeZoneId = 0); + IMPORT_C CTzLocalizedTimeZone* FindTimeZoneByNameL(const TDesC& aTimeZoneName); + IMPORT_C CTzLocalizedCityGroup* FindCityGroupByNameL(const TDesC& aCityGroupName); + + IMPORT_C TBool CheckLanguage(); + + //Cities and Time Zones with a specified UTC offset + IMPORT_C CTzLocalizedCityArray* GetCitiesWithUTCOffsetL(TInt aUTCOffsetInMinutes, const TTzSortOrder aSortOrder = ETzUnsorted); + IMPORT_C CTzLocalizedTimeZoneArray* GetTimeZonesWithUTCOffsetL(TInt aUTCOffsetInMinutes, const TTzSortOrder aSortOrder = ETzUnsorted); + + private: + void ConstructL(); + CTzLocalizer(); + + TBool PrepareFrequentlyUsedZonesL(); + void UpdateFrequentlyUsedZonesL(); + CTzLocalizedTimeZone* GetFrequentlyUsedDefaultZoneL(CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFreqUsedZone); + TUint32 GetFrequentlyUsedDefaultZoneCenRepKeyL(CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFreqUsedZone); + + void GetCitiesL(CTzLocalizedCityArray& aCities, const TTzLocalizedId& aLocalizedId, const TTzSortOrder aSortOrder = ETzUnsorted); + + TLinearOrder CitySortOrderL(const TTzSortOrder aSortOrder); + TLinearOrder TimeZoneSortOrderL(const TTzSortOrder aSortOrder); + template void PrepareForUTCSortL(T& aArray); + + TInt GetTimeZoneIdFromTzServerL(); + void DoSetTimeZoneL(TInt aTimeZoneId); + void ChangeHomeTimeZoneL(TInt aNewId); + + void ValidateDbL(); + void RecreateDbL(); + TBool DbNeedsUpdatingL() const; + TBool DbIsInvalidL() const; + void UpgradeDbVersionL(); + void FetchCityToUpgradeL(CTzLocalizedTimeZoneArray& aTimeZoneArray, CTzLocalizedCityArray& aCityArray, CTzLocalizedTimeZone::TTzFrequentlyUsedZone aCachedZone); + + private: + //Member data + MTzLocalizationReader* iStaticDataReader; + MTzLocalizationReader* iPersistedDataReader; + MTzLocalizationWriter* iPersistedDataWriter; + TLanguage iLanguage; + }; + +#endif//__TzLocalizer_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/tzupdate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/tzupdate.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,78 @@ +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __TZUPDATE_H__ +#define __TZUPDATE_H__ + +#include // TUid. + +/** UTC Offset update notification constants. When the UTC offset is automatically +adjusted for Daylight Saving then it is possible to receive +notification using the Publish and Subscribe API with the +values defined here. Note that this property is updated by the Time Zone Server +as this is the only component that can modify the UTC Offset. + +@see RProperty in e32property.h +@publishedAll +@released +@since 9.1 +*/ +namespace NTzUpdate + { + const TUid KPropertyCategory = { 0x1020383E }; + + enum TPropertyKeys + { + EUtcOffsetChangeNotification, + ECurrentTimeZoneId, + EHomeTimeZoneId, + ENextDSTChange + }; + + struct TTimeZoneChange + { + TInt iNewTimeZoneId; + TInt iOldTimeZoneId; + }; + + /** This struct is used to publish DST Change info in an RProperty. + Subscribers to the property will define a copy of this struct + so that they are not dependant on the tz component. + If this struct changes then the copies must also be changed. + @internalTechnology + */ + struct TDSTChangeInfo + { + /** The version of the struct. Currently always 1 */ + TUint8 iVersion; + + /** The time of the next offset change in UTC */ + TTime iNextDSTChangeUTC; + /** The offset from UTC (in minutes) after the next DST change will take place.*/ + TInt iNextUTCOffset; + + /** The time of the previous offset change in UTC. This member is only valid if the version is 2 or above. */ + TTime iPreviousDSTChangeUTC; + + /** The offset from UTC (in minutes) before the previous DST change took place. This member is only valid + if the version is 2 or above.*/ + TInt iPreviousUTCOffset; + + /** Reserved for future use. */ + TInt iReserved[12]; + }; + } + +#endif // __TZUPDATE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/uikon/eikalsrv.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/uikon/eikalsrv.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,133 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file + @internalComponent +*/ + +#ifndef __EIKALSRV_H__ +#define __EIKALSRV_H__ + +#include +#include +#include + +class MEikServAlarmFactory; +class MEikServAlarm; +class CEikServAlarmAlertSession; + +/** +@internalComponent +*/ +NONSHARABLE_CLASS(CEikServAlarmAlertServer) : public CPolicyServer + { +public: + IMPORT_C static CEikServAlarmAlertServer* NewL(MEikServAlarmFactory* aAlarmControlFactory); + IMPORT_C static CEikServAlarmAlertServer* NewL(MEikServAlarmFactory* aAlarmControlFactory, TInt aMaxAlarms); + ~CEikServAlarmAlertServer(); + IMPORT_C void HandleSwitchOnEvent(); + IMPORT_C void TaskKeyPressedL(); + inline TBool AlarmAlertIsVisible() const; + inline void SessionDied(); + IMPORT_C void SetQuietPeriodL(TTime aQuietPeriodEndTime); + IMPORT_C void ClearAllAlarmsL(); +public: // from CPolicyServer + CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; +private: + CEikServAlarmAlertServer(TInt aPriority, MEikServAlarmFactory& aAlarmControlFactory, TInt aMaxAlarms); +private: + CEikServAlarmAlertSession* iSession; // iSession does not *own* what it points to + MEikServAlarmFactory& iAlarmControlFactory; + TInt iMaxAlarms; + }; + + +class CEikAlmControlSupervisor; + +/** +Helper class for CEikServAlarmAlertSession. Holds response data for queuing +@internalComponent +*/ +NONSHARABLE_CLASS(TAlarmResponse) + { +public: + TAlarmResponse (TASAltAlertServerResponse aCode, TAlarmId aId, TTime aTime); + TASAltAlertServerResponse ResponseCode () const; + TAlarmId AlarmId () const; + TTime TimeToSnooze() const; +private: + TASAltAlertServerResponse iCode; + TAlarmId iId; + TTime iTime; + }; + +// supposed to be maximum one response in a queue, because client should resubmit request +// for response as soon as it receive previous +const TInt KAlertResponseQueueSize = 20; + +/** +Represents a session for a client thread on the server-side. +@internalComponent +*/ +NONSHARABLE_CLASS(CEikServAlarmAlertSession) : public CSession2 + { +public: + static CEikServAlarmAlertSession* NewL(MEikServAlarmFactory& aAlarmControlFactory, TInt aMaxAlarms); + ~CEikServAlarmAlertSession(); + void TaskKeyPressedL(); + void HandleSwitchOnEvent(); + inline TBool AlarmAlertIsVisible() const; + + void SetQuietPeriodL(TTime aQuietPeriodEndTime); + inline TTime QuietPeriodEndTime() const; + void RespondEventL(TASAltAlertServerResponse aCode); + void RespondEventL(TASAltAlertServerResponse aCode, TAlarmId aId, TTime aTimeToSnooze = 0); + void ClearAllAlarmsL(); +private: + CEikServAlarmAlertServer* AlarmAlertServer() const; + void ConstructL(); + virtual void ServiceL(const RMessage2 &aMessage); + + CEikServAlarmAlertSession(MEikServAlarmFactory& aAlarmControl, TInt aMaxAlarms); + void QueueEventL (TASAltAlertServerResponse& aCode,TAlarmId& aId, TTime& aTimeToSnooze); + TInt FindAlarm(TAlarmId aAlarmId) const; + void DeleteAlarmL(const RMessage2& aMessage); + void UpdateVisibility(); +private: + TBool iVisible; + MEikServAlarmFactory& iAlarmControlFactory; + TTime iQuietPeriodEndTime; + TInt iMaxAlarms; + RPointerArray iAlarmSupervisors; + RArray iResponseQueue; + RMessage2 iMessage; + }; + +inline TBool CEikServAlarmAlertServer::AlarmAlertIsVisible() const + { return iSession->AlarmAlertIsVisible(); } + +inline TBool CEikServAlarmAlertSession::AlarmAlertIsVisible() const + { return iVisible; } + +inline void CEikServAlarmAlertServer::SessionDied() + { iSession = NULL; } + +inline TTime CEikServAlarmAlertSession::QuietPeriodEndTime() const + { return iQuietPeriodEndTime; } + +#endif //__EIKALSRV_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/viewcli.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/viewcli.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,166 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VIEWCLI_H__ +#define __VIEWCLI_H__ + +#include +#include +#include + +// +// Forward declarations. +// + +class RVwsSession; +class CVwsSessionEventHandler; +class MVwsAppStarter; + +class MVwsSessionWrapperObserver +/** +The MVwsSessionObserver specifies an interface through which server events to be handled by the owner of +a client session are notified + +@publishedAll +@deprecated +*/ +//@internalTechnology @released + + { +public: + + /** + * Handles the view event aEvent for a view added through the client session being observed. + * Handles events for all the views added by the client. + */ + virtual void HandleViewEventL(const TVwsViewEvent& aEvent)=0; + }; + + +class CVwsSessionWrapper : public CBase +/** +The CVwsSessionWrapper class mediates access to the view server client session which it creates, and wraps in +support for notification of server events. A session observer will be called back with server events if +it maintains an outstanding request for asynchronous event notification. + +@publishedPartner +@released +*/ +//@internalTechnology @released + + { +public: + IMPORT_C static CVwsSessionWrapper* NewL(); + IMPORT_C static CVwsSessionWrapper* NewLC(); + IMPORT_C static CVwsSessionWrapper* NewL(MVwsSessionWrapperObserver& aObserver); + IMPORT_C static CVwsSessionWrapper* NewLC(MVwsSessionWrapperObserver& aObserver); + IMPORT_C ~CVwsSessionWrapper(); + IMPORT_C static TInt StartViewServer(MVwsAppStarter& aAppStarter); + IMPORT_C TInt ShutdownViewServer(); + IMPORT_C TInt AddView(const TVwsViewId& aViewId); + IMPORT_C TInt RemoveView(const TVwsViewId& aViewId) const; + IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId,TInt aMode); + IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId); + IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); + IMPORT_C TInt ActivateViewViaViewEvent(const TVwsViewIdAndMessage& aViewIdAndMessage); + IMPORT_C TInt RequestCustomMessage(TDes8& aMessageBufPtr) const; + IMPORT_C void QueueAsyncRequest(); + IMPORT_C TInt StartApp(TUid aAppToStart); + IMPORT_C TInt DeactivateActiveView(); + IMPORT_C TInt DeactivateActiveViewIfOwnerMatch(); + IMPORT_C TInt NotifyNextDeactivation(const TVwsViewId& aViewId); + IMPORT_C TInt NotifyNextDeactivation(); + IMPORT_C TInt NotifyNextActivation(const TVwsViewId& aViewId); + IMPORT_C TInt NotifyNextActivation(); + IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId,TInt aMode) const; + IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId) const; + IMPORT_C TInt GetSystemDefaultView(TVwsViewId& aViewId); + IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); + IMPORT_C TInt SetClientRequestTimeOut(TTimeIntervalMicroSeconds32 aDuration); + IMPORT_C TInt SetServerEventTimeOut(TTimeIntervalMicroSeconds32 aDuration); + IMPORT_C TInt EnableServerEventTimeOut(TBool aEnable); + IMPORT_C TInt CheckSourceOfViewSwitch(TBool& aResult,const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic); + IMPORT_C TInt EnableServerBlankScreen(TBool aEnable); + IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable); + IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus); + IMPORT_C TInt SetCrossCheckUid(const TUid& aCrossCheckUid); + IMPORT_C TInt SetWindowBackgroundColor(const TRgb& aBgColor); +public: + /** + @internalComponent + @released + */ + IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl); + /** + @internalComponent + @released + */ + IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus, TInt aCustomControl); + /** + @internalComponent + @released + */IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl); + /** + @internalComponent + @released + */ + IMPORT_C TInt GetCurrentActiveViewInSystem(TVwsViewId& aActiveViewId); +private: + CVwsSessionWrapper(); + CVwsSessionWrapper(MVwsSessionWrapperObserver& aObserver); + void ConstructL(); + TInt CheckCreateViewServerSession(); + TBool IsSchedulerRunning(); +private: + RVwsSession* iVwsSession; + CVwsSessionEventHandler* iViewEventHandler; + MVwsSessionWrapperObserver* iObserver; + }; + + +// +// Panic. +// +/** +@internalComponent +*/ +enum TVwsPanic + { + EVwsCreateScheduler=1, + EVwsThreadRename + }; + +/** +@internalComponent +*/ +GLREF_C void Panic(TVwsPanic aPanic); + +/** +Server thread start. + +@internalComponent +*/ +GLDEF_C TInt ViewServerThreadStart(TAny* aPtr); + +/** +@internalComponent +*/ +struct SVwsCommandLine + { + MVwsAppStarter* iAppStarter; + }; + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/vtzrules.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/vtzrules.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,187 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VTZRULES_H__ +#define __VTZRULES_H__ + +#include +#include +#include +#include + +class CVTzActualisedRules; +class TVTzActualisedRule; + +const TInt KVTzRulesGranularity = 4; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Time zone rules + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** +Encapsulates one time zone rule. + +@publishedAll +@released +*/ +class TTzRule + { +public: + IMPORT_C TTzRule(TInt16 aFromYear, TInt16 aToYear, TInt16 aOldOffset, TInt16 aNewOffset, TMonth aMonth, TTzRuleDay aDayRule, + TUint8 aDayOfMonth, TUint8 aDayOfWeek, TTzTimeReference aTimeReference, TUint16 aTimeOfChange); + IMPORT_C TTzRule(); + IMPORT_C TTzRule(const TTzRule& aRule); + IMPORT_C TTzRule(TTimeWithReference aFromYear, TTimeWithReference aToYear, TInt16 aOldOffset, TInt16 aNewOffset, TMonth aMonth, TTzRuleDay aDayRule, + TUint8 aDayOfMonth, TUint8 aDayOfWeek, TTzTimeReference aTimeReference, TUint16 aTimeOfChange); + + + void ExternalizeL(RWriteStream& aStream) const; + void InternalizeL(RReadStream& aStream); + TBool RuleApplies(const TTime& aStart, const TTime& aEnd) const; + + IMPORT_C TVTzActualisedRule Actualise(TInt aYear) const; // deprecated, replace by the L version + IMPORT_C TVTzActualisedRule ActualiseL(TInt aYear) const; + +public: + TTimeWithReference iFrom; // first date the rule applies + TTimeWithReference iTo; // last date the rule applies + TInt16 iOldLocalTimeOffset; // local time offset (in minutes) BEFORE the change (local time = UTC + DST) + TInt16 iNewLocalTimeOffset; // local time offset (in minutes) AFTER the change + TMonth iMonth; + TTzRuleDay iDayRule; // format in which the rule is expressed + TUint8 iDayOfMonth; + TUint8 iDayOfWeek; + TTzTimeReference iTimeReference; + TUint16 iTimeOfChange; // number of minutes since midnight + TUint32 iReserved; + }; + + + +/** +Encapsulates a collection of time zone rules, and includes the period covered by the rules +and the standard time offset at the start of that period. + +@publishedAll +@released +*/ +class CTzRules : public CBase + { +public: + IMPORT_C static CTzRules* NewL(); + IMPORT_C static CTzRules* NewL(TInt aStartYear, TInt aEndYear); + IMPORT_C static CTzRules* NewL(RReadStream& aStream); + IMPORT_C ~CTzRules(); + IMPORT_C TBool RulesApply(const TTime& aTime) const; + IMPORT_C void AddRuleL(TTzRule aRule); + IMPORT_C void RemoveRule(TInt aIndex); + IMPORT_C TTzRule& operator[](TInt aIndex); + IMPORT_C TInt Count() const; + IMPORT_C TInt StartYear() const; + IMPORT_C TInt EndYear() const; + IMPORT_C void SetStartYear(TInt aYear); + IMPORT_C void SetEndYear(TInt aYear); + IMPORT_C void ExternalizeL(RWriteStream& aStream) const; + IMPORT_C void InternalizeL(RReadStream& aStream); + IMPORT_C TInt InitialStdTimeOffset() const; + IMPORT_C void SetInitialStdTimeOffset(TInt aOffset); + IMPORT_C void ConvertToUtcL(TTime& aLocalTime) const; + IMPORT_C void ConvertToLocalL(TTime& aUtcTime) const; + IMPORT_C CTzRules* CloneL() const; + IMPORT_C TBool IsEqualTo(const CTzRules& aRules) const; + + IMPORT_C void GetActualisedRulesL(CVTzActualisedRules& aActRules) const; + IMPORT_C TInt ConvertTime(CVTzActualisedRules& aRules, TTime& aTime, TTzTimeReference aTimerRef) const; + +private: + CTzRules(); + CTzRules(TInt aStartYear, TInt aEndYear); + void GetActualisedRulesL(CVTzActualisedRules& aActRules, TInt aYear) const; + TInt GetOffsetL(const TTime& aTime, TTzTimeReference aTimeRef) const; + TInt AddActualisedRulesL(CVTzActualisedRules& aActRules, TInt aYear) const; + TInt CompareTimesWithRef(TTime aTimeA, TTzTimeReference aTimeARef, + TTime aTimeB, TTzTimeReference aTimeBRef, TInt aStdOffset, TInt aWallOffset, + TTimeIntervalMinutes* aMinutesDifference) const; + +private: + TInt16 iStartYear; + TInt16 iEndYear; + RArray iRules; + TInt iInitialStdTimeOffset; + }; + + + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * Actualised time zone rules + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +/** +Encapsulates a local time change. + +@publishedAll +@released +*/ +class TVTzActualisedRule + { +public: + IMPORT_C TVTzActualisedRule(TTime aTimeOfChange, TInt aNewOffset, TTzTimeReference aTimeReference); + IMPORT_C TVTzActualisedRule(); + + IMPORT_C void operator=(TVTzActualisedRule aRule); + static TInt Order(const TVTzActualisedRule& aLeft, const TVTzActualisedRule& aRight); + +public: + TTime iTimeOfChange; + TInt32 iNewOffset; + TTzTimeReference iTimeReference; + }; + + +/** +Encapsulates a collection of the local time changes occurring during a range of years. + +@publishedAll +@released +*/ +NONSHARABLE_CLASS(CVTzActualisedRules) : public CBase + { +public: + IMPORT_C static CVTzActualisedRules* NewL(TInt aStartYear, TInt aEndYear); + IMPORT_C ~CVTzActualisedRules(); + IMPORT_C void AddRuleL(const TVTzActualisedRule& aRule); + IMPORT_C TInt Count() const; + IMPORT_C TVTzActualisedRule& operator[](TInt aIndex) const; + + IMPORT_C TInt StartYear() const; + IMPORT_C TInt EndYear() const; + + IMPORT_C TBool IsDaylightSavingOn(TTime& aTime) const; + IMPORT_C TInt GetOffsetFromRuleL(const TTime& aTime, TTzTimeReference aTimeRef) const; + +private: + CVTzActualisedRules(TInt aStartYear, TInt aEndYear); + CVTzActualisedRules(); + TInt CompareTimesWithRef(TTime aRolloverTime, TTzTimeReference aTimeRefRollover, + TTime aUserTime, TTzTimeReference aTimeRefUser, + TInt aOldWallOffset, TTimeIntervalMinutes& aDiffMinutes) const; + +private: + TInt32 iStartYear; // years covered by + TInt32 iEndYear; // the actualised rules + RArray iRules; + }; + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/vwsdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/vwsdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,277 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __VWSDEF_H__ +#define __VWSDEF_H__ + +#include + +/** +@publishedPartner +*/ +#define KUidCustomCrossCheckValue 0x80282748 + +/** +@publishedPartner +*/ +const TUid KUidCustomCrossCheck={KUidCustomCrossCheckValue}; + +class TVwsViewId +/** Identifies an application view using two unique identifiers (UIDs): a view +UID and an application UID. + +The application UID is required so that the application associated with the view +can be started if it is not already running. + +@publishedAll +@released */ + { +public: + inline TVwsViewId(); + inline TVwsViewId(const TVwsViewId& aUid); + inline TVwsViewId(TUid aAppUid,TUid aViewUid); + inline TBool operator==(const TVwsViewId& aUid) const; + inline TBool operator!=(const TVwsViewId& aUid) const; +public: + /** A unique application ID (or application UID). + + Uniquely identifies the application associated with the view. */ + TUid iAppUid; + /** A unique view ID (or view UID). + + Uniquely identifies the view. */ + TUid iViewUid; + }; + +/** @internalTechnology */ +#define KNullViewId TVwsViewId(KNullUid,KNullUid) + +/** @internalTechnology */ +const TInt KErrViewWrongMode=1; // !!! Wrong error code - should be -ve & unique + + +class TVwsViewIdAndMessage +/** +The TVwsViewIdAndMessage class identifies a view and encapsulates a message to +be read by the view when it is activated. + +@publishedAll +@released +*/ + { +public: + inline TVwsViewIdAndMessage(); + inline TVwsViewIdAndMessage(const TVwsViewId& aId); + inline TVwsViewIdAndMessage(const TVwsViewId& aId,TUid aCustomMessageId,const TDesC8& aCustomMessage); + inline TVwsViewIdAndMessage& operator=(const TVwsViewIdAndMessage& aVwsViewIdAndMessage); +public: + TVwsViewId iViewId; + TUid iCustomMessageId; + TInt iCustomMessageLength; + TPtrC8 iCustomMessage; + }; + + + +class TVwsViewEvent +/** +The TVwsViewEvent class encapsulates the attributes of a view server event. +These are: +- The event type +- The view ids of the two views associated with the event +- The attributes of any message which can go with the event. + +@publishedPartner +@released +*/ + { +public: + enum TVwsViewEventType + { + EVwsActivateView, + EVwsDeactivateView, + EVwsScreenDeviceChanged, + EVwsDeactivationNotification, + EVwsActivationNotification, + EVwsDeactivateViewDifferentInstance + }; +public: + inline TVwsViewEvent(); + inline TVwsViewEvent(TVwsViewEventType aEventType); + inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId); + inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId); + inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId,TUid aCustomMessageId,TInt aCustomMessageLength); +public: + /** + The event type. + */ + TVwsViewEventType iEventType; + /** + The first view id associated with the event. This has a different meaning for each of the event types: + - For ActivateView events, it is the view to activate + - For DeactivateView events, it is the view to deactivate + - For ScreenDeviceChange events, it is the id of the currently active view + - For ActivationNotification events, it is the id of the activated view + - For DeactivationNotification events, it is the id of the deactivated view + */ + TVwsViewId iViewOneId; + /** + The second view id associated with the event. This has a different meaning for each of the event types: + - For ActivateView events, it is the view that will be deactivated + - For DeactivateView events, it is the view that has been activated + - For ScreenDeviceChange events, it is unused + - For ActivationNotification events, it is the view that will be deactivated + - For DeactivationNotification events, it is the id of the view that has been activated + */ + TVwsViewId iViewTwoId; + /** + The type of message being passed in the custom message buffer + */ + TUid iCustomMessageId; + /** + The length of the custom message being held by the server. + To retrieve the message itself from the server, a buffer of this length must be allocated + */ + TInt iCustomMessageLength; + }; + + +// +// Typedefs. +// +/** @internalComponent */ +typedef TPckgBuf TVwsViewIdAndMessageBuf; + +/** @internalComponent */ +typedef TPckgBuf TVwsViewEventBuf; + + +// +// Inlines +// + +inline TVwsViewId::TVwsViewId() +/** Constructs a TVwsViewId object, and initialises both the application UID and +the view UID to NULL. */ + : iAppUid(KNullUid), iViewUid(KNullUid) {} + +inline TVwsViewId::TVwsViewId(const TVwsViewId& aUid) +/** Constructs a new TVwsViewId object from an existing one. This simply performs +a member-wise copy, each member variable of the passed in object is individually +copied to the corresponding member variable of the new object. + +@param aUid A reference to the TVwsViewId object to be copied. */ + : iAppUid(aUid.iAppUid), iViewUid(aUid.iViewUid) {} + +inline TVwsViewId::TVwsViewId(TUid aAppUid,TUid aViewUid) +/** Constructs a TVwsViewId object with the specified application UID and view UID. + +@param aAppUid The application UID. +@param aViewUid The view UID. */ + : iAppUid(aAppUid), iViewUid(aViewUid) {} + +inline TBool TVwsViewId::operator==(const TVwsViewId& aUid) const +/** Checks whether the TVwsViewId object being operated upon and the TVwsViewId +object specified are the same. + +Returns true if both application UIDs and both view UIDs are the same, otherwise +returns false. + +@param aUid A reference to a TVwsViewId object. +@return ETrue if objects are the same, EFalse otherwise. */ + { + return (aUid.iAppUid==iAppUid && aUid.iViewUid==iViewUid); + } + +inline TBool TVwsViewId::operator!=(const TVwsViewId& aUid) const +/** Checks whether the TVwsViewId object being operated upon and the TVwsViewId +object specified are different. + +Returns true if either the application UIDs or view UIDs are different, otherwise +returns false. + +@param aUid A reference to a TVwsViewId object. +@return ETrue if objects are different, EFalse otherwise. */ + { + return (aUid.iAppUid!=iAppUid || aUid.iViewUid!=iViewUid); + } + + +/** Constructs a TVwsViewIdAndMessage object, and initialises it to contain a +NULL view UID and an empty message */ +inline TVwsViewIdAndMessage::TVwsViewIdAndMessage() + : iViewId(TVwsViewId()), iCustomMessageLength(0) + { + iCustomMessageId.iUid=0; + iCustomMessage.Set(KNullDesC8); + } + +/** Constructs a TVwsViewIdAndMessage object, and initialises it to contain the +specified view UID and an empty message + +@param aId A reference to the TVwsViewId to be used +*/ +inline TVwsViewIdAndMessage::TVwsViewIdAndMessage(const TVwsViewId& aId) + : iViewId(aId), iCustomMessageLength(0) + { + iCustomMessageId.iUid=0; + iCustomMessage.Set(KNullDesC8); + } + +/** Constructs a TVwsViewIdAndMessage object, and initialises it to contain the +specified view UID and the specified message + +@param aId A reference to the TVwsViewId to be used +@param aCustomMessageId The message Id to use +@param aCustomMessage A narrow descriptor containing the message +*/ +inline TVwsViewIdAndMessage::TVwsViewIdAndMessage(const TVwsViewId& aId,TUid aCustomMessageId,const TDesC8& aCustomMessage) + : iViewId(aId), iCustomMessageId(aCustomMessageId) + { + iCustomMessageLength=aCustomMessage.Length(); + iCustomMessage.Set(aCustomMessage); + } + +/** Copies the contents of another TVwsViewIdAndMessage into this one + +@param aVwsViewIdAndMessage A reference to the TVwsViewIdAndMessage to be copied + +@return A reference to the object being copied into +*/ +inline TVwsViewIdAndMessage& TVwsViewIdAndMessage::operator=(const TVwsViewIdAndMessage& aVwsViewIdAndMessage) + { + iViewId=aVwsViewIdAndMessage.iViewId; + iCustomMessageId=aVwsViewIdAndMessage.iCustomMessageId; + iCustomMessageLength=aVwsViewIdAndMessage.iCustomMessage.Length(); + iCustomMessage.Set(aVwsViewIdAndMessage.iCustomMessage); + return(*this); + } + +inline TVwsViewEvent::TVwsViewEvent() {} + +inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType) + : iEventType(aEventType),iViewOneId(),iViewTwoId(),iCustomMessageId(KNullUid),iCustomMessageLength(0) {} + +inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId) + : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(),iCustomMessageId(KNullUid),iCustomMessageLength(0) {} + +inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId) + : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(aViewTwoId),iCustomMessageId(KNullUid),iCustomMessageLength(0) {} + +inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId,TUid aCustomMessageId,TInt aCustomMessageLength) + : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(aViewTwoId),iCustomMessageId(aCustomMessageId),iCustomMessageLength(aCustomMessageLength) {} + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/wapattrdf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/wapattrdf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,49 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// WAP Attribute Std +// Standard attribute keys +// +// + +#ifndef __WAPATTRIBUTESTD_H +#define __WAPATTRIBUTESTD_H + +// Document node +// +_LIT(KWAPNodeMimeTypeAttributeName,"KWapAttrNodeMimeType"); // node mime type +_LIT(KWAPNodeContentEncodingTypeAttributeName,"KWapAttrNodeContentEncodingType"); // node content encoding type +_LIT(KWAPDocumentNodeURLAttributeName,"KWapAttrNodeURL"); // URL of node + + +// Data Storage node +// +_LIT(KWAPNodeErrorCodeAttributeName,"KWapAttrNodeErrorCode"); // node error code + +// Image nodes +// +_LIT(KWAPBitmapHandleAttributeName,"KWapAttrImgBmpHnd"); // standard bitmap handle +_LIT(KWAPZoomedBitmapHandleAttributeName,"KWapAttrImgZoomBmpHnd"); // zoomed bitmap handle +_LIT(KWAPZoomedBitmapZoomFactorAttributeName,"KWapAttrImgZoomFactor"); // zoomed bitmap zoom factor + +// Document root node +// +_LIT(KWAPDocumentValidStatusAttributeName,"KWapAttrDocValid"); // set if the doucment has been validated +_LIT(KWAPDocumentCompletedAttributeName,"KWapAttrDocCompleted"); // set if the doucment is complete +_LIT(KWAPDocumentWmlVersion,"KWapAAttrWmlVersion"); //1.1 or 1.2 + +// Script Node +_LIT(KWAPScriptReferingCardUrl, "KWapAttrReferingUrl"); // URL to the card that refered to this script + + +#endif // __WAPATTRIBUTESTD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/wapengstd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/wapengstd.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,278 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// WAP Engine Standard +// Standard status codes used by data handlers and the WAP engine. Note that some are exact duplicates of error +// codes from sub-components (e.g. HTTP) or from components outside of the WAP Browser (e.g. NetDial, ETEL) +// +// + +#ifndef __WAPENGINESTANDARD_H__ +#define __WAPENGINESTANDARD_H__ + +// System includes +// +#include + +// +// Status code offset for HTTP status values and stack connection progress +// e.g. HTTP/200 becomes KHttpPluginStatusBase + 200 +// +const TInt KHttpPluginStatusBase = 1000; +const TInt KWapDocumentLoadStatusBase = 2000; + +typedef enum TWapEngineStatus +{ + // DRAFT + // Some of these errors MAY be handled in the control level. + + // + // HTTP/1.1 Status/Error codes from 40x and 50x series + // + EWapErrHttp_505_HTTPVersionNotSupported = -20505, // has to be 1.1 at the client end; talking to a 1.0 origin server might cause this? Or the client erroneously claiming to do HTTP/3 or something. + EWapErrHttp_504_GatewayTimeout = -20504, // not sure if this refers to Gateway in the WAP sense + EWapErrHttp_503_ServiceUnavailable = -20503, // ? + EWapErrHttp_502_BadGateway = -20502, // could occur with a badly configured WAP GW = e.g. the gateway uses a proxy which cannot be reached = there should probably be some indication to the user. + EWapErrHttp_501_NotImplemented = -20501, // duh. Bad server. + EWapErrHttp_500_InternalServerError = -20500, // bad news again; this one can either come from the origin server _or_ from the WAP GW, which may convert a different server code into 500 if the WML is bad. Report. + + EWapErrHttp_415_UnsupportedMediaType = -20415, // see RFC2068 + EWapErrHttp_414_RequestUriTooLong = -20414, // report to user + EWapErrHttp_413_RequestEntityTooLarge = -20413, // see RFC2068 + EWapErrHttp_412_PreconditionFailed = -20412, // see RFC2068 + EWapErrHttp_411_LengthRequired = -20411, // error in our use of HTTP if this occurs. + EWapErrHttp_410_Gone = -20410, // like 404, except more definite! report to user. + EWapErrHttp_409_Conflict = -20409, // see RFC2068 + EWapErrHttp_408_RequestTimeout = -20408, // dealt with in HTTP, shouldn't have to be presented to the user + EWapErrHttp_407_ProxyAuthenticationRequired = -20407,// - not sure, we don't correctly deal with this at the moment. Is it needed? + EWapErrHttp_406_NotAcceptable = -20406, // this is returned if the resource requested is not acceptable to the client according to its own accept- strings in the HTTP request header. e.g. accept-charset, accept (content types). accept-language. This shows that we're getting our headers wrong, so should be considered a software error and not be reported. I think. + EWapErrHttp_405_MethodNotAllowed = -20405, // e.g. attempt to POST to a URL that is not appropriate for POSTing. Probably a result of poor site design? + EWapErrHttp_404_NotFound = -20404, // document missing on origin server. This one would be a good one to report to the user since it happens frequently with badly maintained sites! + EWapErrHttp_403_Forbidden = -20403, // the server HTTPD does refuses to return the requested document, for internal reasons not necessarily disclosed to the client + EWapErrHttp_402_PaymentRequired = -20402, // I don't think this is used in our world of e-commerce. RFC2068 says it is reserved for future use. +// +// // NOTE THAT HTTP/401 IS NOT TREATED AS AN ERROR, BECAUSE IT IS +// // FULLY HANDLED IN HTTP - see HTTP status codes below +// + EWapErrHttp_400_BadRequest = -20400, // client sent a request with a malformed syntax (in HTTP request headers) = I assume this indicates a programming error on our part ,and should not happen, or be reported? + + // + // HTTP Data Provider plug-in 'inherited' error codes + // + EWapErrHttpReceivingErrorDeck = -20014, // Could not find document, so receiving an error deck + EWapErrHttpCancellationAbort = -20013, // Error code for leave when cancellation has occured during RunL() + EWapErrHttpGatewaySessionDisconnect = -20012, // The session was disconnected by the WAP Gateway + EWapErrHttpGatewayTransactionAbort = -20011, // A transaction was aborted by the gateway or the stack + EWapErrHttpGatewayCannotBeReached = -20010, // A session could not be established with the WAP Gateway + // Note that EWapErrHttpAuthenticationFailed and EWapErrHttpAuthenticationCancelled are now information status codes - see below. + EWapErrHttpWtlsCipherRejected = -20009, // The user rejected the cipher strength negotiated in WTLS + EWapErrHttpWtlsServerCertRejected = -20008, // The user rejected the certificate from the WAP GW + EWapErrHttpWtlsBadServerCert = -20007, // WTLS rejected the certificate obtained from the WAP GW + EWapErrHttpWtlsConfigFailed = -20006, // Failed to configure the WTLS layer of the WAP Stack + EWapErrHttpNetDialSetupFailed = -20005, // Failed to configure Net Dial + EWapErrHttpWapAPReadFailure = -20004, // An error occurred when reading the WAP AP from CommsDB + EWapErrHttpUnsupportedMethod = -20003, // An HTTP method was specified that is not supported + EWapErrHttpCannotFindPlugin = -20002, // Plug-in server failed to create an HTTP plugin + EWapErrHttpCannotFindServer = -20001, // URL specified a non-existent or inaccessible domain + EWapErrHttpGeneralError = -20000, // Unspecified error condition + + // + // XMLLIB ERROR CODES + // + + // XmlLib +#define XmlLibErrorBase -13200 + EWapErrXmlLibInvalidDocument = XmlLibErrorBase, + EWapErrXmlLibDocumentBuffered = XmlLibErrorBase - 1, + EWapErrXmlLibDocumentAlreadyValid = XmlLibErrorBase - 2, + EWapErrXmlLibInvalidDTD = XmlLibErrorBase - 3, + + // Validator +#define XmlValidatorErrorBase -13100 + EWapErrXmlLibIllegalTagName = XmlValidatorErrorBase, + EWapErrXmlLibIllegalFixedAttributeValue = XmlValidatorErrorBase - 1, + EWapErrXmlLibMissingRequiredAttribute = XmlValidatorErrorBase - 2, + EWapErrXmlLibMissingDocument = XmlValidatorErrorBase - 4, + EWapErrXmlLibInvalidDocumentStructure = XmlValidatorErrorBase - 6, + EWapErrXmlLibIllegalAttributeValue = XmlValidatorErrorBase - 7, + + // Parser +#define XmlParserErrorBase -13000 + EWapErrXmlLibMissingCDATASectionEndTag = XmlParserErrorBase, + EWapErrXmlLibInvalidAttributeDeclaration = XmlParserErrorBase - 1, + EWapErrXmlLibEndTagMismatch = XmlParserErrorBase - 2, + EWapErrXmlLibInvalidCharacterReference = XmlParserErrorBase - 3, + EWapErrXmlLibUnknownEntityReference = XmlParserErrorBase - 4, + EWapErrXmlLibNoDTD = XmlParserErrorBase - 5, + EWapErrXmlLibMissingDocumentRootNode = XmlParserErrorBase - 6, + EWapErrXmlLibInvalidXmlVersionDefinition = XmlParserErrorBase - 7, + EWapErrXmlLibRootElementNameMismatch = XmlParserErrorBase - 8, + + + // + // WMLLIB ERROR CODES + // + + // WmlLib + // No WmlLib (interface module) specific errors defined + + // Validator +#define WmlValidatorErrorBase -12100 + EWapErrWmlLibAccessViolation = WmlValidatorErrorBase - 1, + EWapErrWmlLibInvalidVariableReference = WmlValidatorErrorBase - 2, + EWapErrWmlLibInvalidConversionMethod = WmlValidatorErrorBase - 3, + EWapErrWmlLibIllegalVariableName = WmlValidatorErrorBase - 4, + EWapErrWmlLibIllegalTaskCountOnAnchor = WmlValidatorErrorBase - 5, + EWapErrWmlLibNULLVariableName = WmlValidatorErrorBase - 6, + EWapErrWmlLibNestedTables = WmlValidatorErrorBase - 7, + EWapErrWmlLibDuplicateDoNodeName = WmlValidatorErrorBase - 8, + EWapErrWmlLibUsageOfReservedWord = WmlValidatorErrorBase - 9, + EWapErrWmlLibZeroTableColumns = WmlValidatorErrorBase - 10, + EWapErrWmlLibNonWmlDocument = WmlValidatorErrorBase - 11, + EWapErrWmlLibMultipleMetaPropertyName = WmlValidatorErrorBase - 12, + EWapErrWmlLibEventBindingConflict = WmlValidatorErrorBase - 14, + EWapErrWmlLibMultipleAccessElements = WmlValidatorErrorBase - 15, + EWapErrWmlLibNonUniqueIds = WmlValidatorErrorBase - 16, + EWapErrWmlLibVariableInInvalidLocation = WmlValidatorErrorBase - 17, + + // Parser +#define WmlParserErrorBase -12000 + EWapErrWmlLibNullNode = WmlParserErrorBase, + EWapErrWmlLibCDATANodeWithoutParent = WmlParserErrorBase - 1, + + + // + // WAP Engine 'native' error codes + // + EWapErrSubDocumentNotFound = -10027, + EWapErrCannotCreateDeck = -10026, // Failed to create a deck + EWapErrMimeTypeMissing = -10025, // Engine tried to access the mime-type attribute in a + // tree node but it was missing + EWapErrUnknownDocument = -10024, + EWapErrInvalidDTD = -10023, + EWapErrDTDUnavailable = -10022, // Document cannot be validated as DTD is not available + + EWapErrUnknownScheme = -10021, // unknown scheme + EWapErrCorruptScheme = -10020, // scheme contains invalid characters + EWapErrCorruptUrl = -10019, // part of url contains invalid characters + + EWapErrPluginNotFound = -10018, // couldn't find the requested plugin + + EWapErrImageConversionFailed = -10017, // image data handler got error from media server + + EWapErrAccessPointNotSetUpForCSD = -10016, // Access point lacked info for Data call + EWapErrAccessPointNotSetUpForSMS = -10015, + EWapErrAccessPointNotSetUpForUSSD = -10014, + EWapErrAccessPointNotSetUpGeneric = -10013, + EWapErrProtocolNotSupported = -10012, // Current network does not support the requested service + + EWapErrAuthorizationFailed = -10011, + + EWapErrScriptObscureLibraryCall = -10010, // The script function was unavailable + EWapErrScriptIllegalAction = -10009, // The script attempted an illegal action and was terminated + EWapErrScriptCorrupt = -10008, // Script had errors + EWapErrScriptError = -10007, // Script returned a fatal error + EWapErrScriptNotFound = -10006, // Requested script was not found + + EWapErrDataCallUnavailable = -10005, // The data call is being used by another application + EWapErrDataCallDropped = -10004, // CSD connection was closed + + EWapErrAccessViolation = -10003, // Access to the document was denied + EWapErrDocumentCorrupted = -10002, + EWapErrDocumentNotFound = -10001, + EWapErrGeneral = -10000, + + // + // PPP connection 'inherited' error codes + // + EWapErrPppIfLRDBadLine = -3059, // ?? + EWapErrPppIfDNSNotFound = -3058, // ?? + EWapErrPppIfCallbackNotAcceptable = -3057, // NTRAS: client requested server Callback but was refused + EWapErrPppIfChangingPassword = -3056, // NTRAS: User's password is currently being changed + EWapErrPppIfNoDialInPermission = -3055, // NTRAS: User has not got dial-in permission on the server + EWapErrPppIfPasswdExpired = -3054, // NTRAS: User's password has expired + EWapErrPppIfRestrictedLogonHours = -3053, // NTRAS: User is attempting to log-in outside their hours + EWapErrPppIfAccountDisabled = -3052, // NTRAS: User's account has been disabled + EWapErrPppIfAuthNotSecure = -3051, // ?? + EWapErrPppIfAuthenticationFailure = -3050, // The supplied password was wrong?? + + // + // NetDial 'inherited' error codes + // + EWapErrNetDialScriptError = -3005, // NetDial Exit Condition - Script Error + EWapErrNetDialScriptTimeOut = -3004, // NetDial Exit Condition - Script Timed Out + EWapErrNetDialLoginFail = -3003, // NetDial Exit Condition - Login Failure + EWapErrNetDialModemError = -3002, // NetDial Exit Condition - Modem error + EWapErrNetDialNoModem = -3001, // NetDial Exit Condition - No Modem Response + + // + // ETEL 'inherited' error codes + // + EWapErrEtelModemSettingsCorrupt = -2018, + EWapErrEtelModemNotDetected = -2017, + EWapErrEtelAnswerAlreadyOutstanding = -2016, + EWapErrEtelUnknownModemCapability = -2015, + EWapErrEtelWrongModemType = -2014, + EWapErrEtelPortNotLoanedToClient = -2013, + EWapErrEtelNotFaxOwner = -2012, + EWapErrEtelFaxChunkNotCreated = -2011, + EWapErrEtelConfigPortFailure = -2010, + EWapErrEtelNoDialTone = -2009, + EWapErrEtelNoAnswer = -2008, + EWapErrEtelCallNotActive = -2007, + EWapErrEtelInitialisationFailure = -2006, + EWapErrEtelNoClientInterestedInThisCall= -2005, + EWapErrEtelBusyDetected = -2004, + EWapErrEtelNoCarrier = -2003, + EWapErrEtelAlreadyCallOwner = -2002, + EWapErrEtelDuplicatePhoneName = -2001, + EWapErrEtelNotCallOwner = -2000, + + // + // General EPOC 'inherited' error codes + // + EWapErrEpocTimedOut = -33, + EWapErrEpocNotFound = -1, + EWapErrEpocAccessDenied = -21, + + // + // + // Wap engine status messages + // + EWapStatusDownloadProgress = 1, // Amount complete in aValue (0...100) + EWapStatusDownloadComplete, // Document fetch is complete + EWapStatusSubDocumentChanged, // XML subdocument (card in WML) has changed + EWapStatusRefreshRequest, // Observer is requested to refresh display + EWapStatusError, // Error + EWapStatusInformational, // Information other than download progress + EWapStatusInitialisingConnection = KHttpPluginStatusBase, + EWapStatusConnecting = KHttpPluginStatusBase + 1, + EWapStatusAuthenticating = KHttpPluginStatusBase + 2, + EWapStatusConnected = KHttpPluginStatusBase + 3, + EWapStatusDisconnecting = KHttpPluginStatusBase + 4, + EWapStatusHttpAuthenticationFailed = KHttpPluginStatusBase + 10, // The user's password was rejected by the origin server + EWapStatusHttpAuthenticationAborted = KHttpPluginStatusBase + 11, // The user cancelled the password box + EWapStatusHttp_401_Unauthorized = KHttpPluginStatusBase + 401, // occurs when HTTP authentication is used, username/password dialogs raised as a response. Need to consider how UI deals with authentication failures here. + EWapStatusValidating = KWapDocumentLoadStatusBase, // Validating document + EWapStatusReceivingErrorDeck = KWapDocumentLoadStatusBase + 1 // Receiving error deck + +} TWapEngineStatus; + +enum TWmlFetchFlag + { + EWmlFetchNoFlag = 0x00, + EWmlFetchReload = 0x01, + EWmlFetchTimerFetch = 0x02 + }; + +#endif // __WAPENGINESTANDARD_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/waplog.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/waplog.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,37 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// WAP Logging public header, defines the name of the +// file to use for WAP activity logging messages +// +// + +#if !defined(__WAPLOG_H__) +#define __WAPLOG_H__ + +#if !defined(__E32STD_H__) +#include +#endif + +#ifdef _DEBUG +/** +@publishedAll +@deprecated +*/ +_LIT(KWapLogFileName,"WAPLog.html"); +#define __LOG_WAP_FILE_NAME KWapLogFileName +#else +#define __LOG_WAP_FILE_NAME +#endif + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/wappdef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/wappdef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,223 @@ +// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// Definitions of WBXML message tokens for use in the Wap Parser, WAPP +// +// + +#if !defined (__WAPPDEF_H__) +#define __WAPPDEF_H__ + +// ********* GENERAL WBXML TOKENS *************** +// WBXML global tokens - applicable to all messages +// See WAP Binary XML Content Format, 16-Jun-99, p16. +// These and our message specific tokens define our DTD + +// As our DTD is hard coded into the app, we don't use the following - +// SWITCH_PAGE - not defined as we only have 1 page +// EXT_I_0, EXT_I_1, EXT_I_2 +// PI - don't define processing inline - all hard coded +// LITERAL,LITERAL_C,LITERAL_A,LITERAL_AC - not using literals, don't define elements inline +// EXT_T_0,EXT_T_1,EXT_T_2, EXT_0, EXT_1, EXT_2 - not using document extensions +// OPAQUE - not using opaque data + +#define KWAPP_STR_TERM 0x00 // Basically the NULL terminator character for a string +#define KWAPP_END_TAG 0x01 // Code for the end of an element +#define KWAPP_ENTITY 0x02 // indicates the start of a character entity number +#define KWAPP_STR_I 0x03 // indicates the start of an inline string, + // terminated by '\0', OR STR_TERMINATOR +#define KWAPP_STR_T 0X83 // a reference to the string table follows. Token is followed + // by multi byte Int32 referencing an offset in the string table + +#define KWAPP_TAG_CONTENT 0x40 // Bit 6 of the Wap Tag is set when a element has content +#define KWAPP_TAG_ATTRIBUTES 0x80 // Bit 7 of Tag is set when the element has attributes +#define KWAPP_TAG_ATTRIBUTES_CONTENT 0XC0 // Bits 6 & 7 are set - attributes and content +#define KWAPP_MB_INT32_CONTINUATION 0x80 // Continuation Bit of an octet of a Multibyte 32 bit int is set. +// Binary encoding for remote configuration of WAP browser settings +// same as for the Nokia 7110 + +// ********** APPLICATION SPECIFIC CODE LEVEL TAG TOKENS ************* +#define KWAPP_CHAR_LIST 0x05 // Code level tag (CLT), indicates start + // of a characteristic list element +#define KWAPP_CHARACTERISTIC 0x06 // code level tag (CLT), indicates start + // of a characteristic element +#define KWAPP_PARM 0x07 // CLT indicating start of a + // attribute element of a characteristic + +// *************** ATTRIBUTE TOKENS ***************************** +#define KWAPP_TYPE 0x05 // Undocumented token which indicates the + // start of a TYPE attribute i.e. "TYPE=" +#define KWAPP_ADDR_TYPE 0x06 // Characteristic type = ADDRESS +#define KWAPP_URL_TYPE 0x07 // Characteristic type = URL +#define KWAPP_NAME_TYPE 0x08 // Characteristic Type = NAME +#define KWAPP_ID 0x7D // Characteristic Type = ID +#define KWAPP_BOOKMARK 0x7F // Characteristic Type = BOOKMARK + +#define KWAPP_NAME_ATTRIB 0x10 // A NAME attribute follows, i.e "NAME=" +#define KWAPP_VALUE_ATTRIB 0x11 // A VALUE attribute follows, i.e "VALUE" + +// *************** PARM TYPES and VALUES *************************** +#define KWAPP_BEARER 0x12 // This is a BEARER element +#define KWAPP_PROXY 0x13 // This is a PROXY +#define KWAPP_PORT 0x14 // PORT element +#define KWAPP_NAME 0x15 // This is a NAME element + +// IMPORTANT tag 0x16 had different meanings for different versions of the OTA settings +// Not in Ver 4.0, = ICON token in Version 4.3 but 4.3 NOT SUPPORTED!! + +#define KWAPP_PROXYTYPE 0x16 // PROXY_TYPE in Settings specification version 5.0! + +#define KWAPP_URL 0x17 // Not defined for Version 4.0 + // Start of a URL, i.e. "TYPE=URL" for Version 5.0 +#define KWAPP_PROXY_AUTHNAME 0x18 // Not defined for Ver. 4.0 - website uses Proxy token and inline string "AUTHNAME" + // Version 5.0 - proxy name follows +#define KWAPP_PROXY_AUTHSECRET 0x19 // Not defined for Version 4.0 - use Proxy token and inline string + // Versions 5.0 - the password for the proxy follows +#define KWAPP_SMS_SMSC_ADDR 0x1A // Service centre address for SMS service +#define KWAPP_USSD_SERV_CODE 0x1B // Service centre address for USSD service +#define KWAPP_ACCESS_POINT_NAME 0x1C // GPRS access point +#define KWAPP_PPP_LOGIN_TYPE 0x1D +#define KWAPP_PROXY_LOGIN_TYPE 0x1E +#define KWAPP_CSD_DIALSTRING 0x21 // Dialing sting for CSD gateway +#define KWAPP_PPP_AUTHTYPE 0x22 // type of authentification +#define KWAPP_PPP_AUTHNAME 0x23 // authentification name +#define KWAPP_PPP_AUTHSECRET 0x24 // authentification password +#define KWAPP_PPP_LOGINTYPE 0x25 // authentification password +#define KWAPP_CSD_CALLTYPE 0x28 // CSD calltype +#define KWAPP_CSD_CALLSPEED 0x29 // CSD callspeed + +#define KWAPP_GSM_SMS_OLD 0x41 // Defined as GSM\SMS in Nokia Spec version 4.0,but not 5.0 + // Distinguish it's Ver 4.0 by WAP Version ( = 1.0 ) + // For versions 5.0 the WAP XML version = 1.1, & token = 0x46 + +#define KWAPP_GSM_CSD 0x45 // GSM CSD service + +// IMPORTANT tag 0x46 has multiple meaning across different versions of the Over the Air settings +#define KWAPP_GSM_SMS_NEW 0x46 // Not defined for Version 4.0 + // GSM SMS Nokia spec version 5.0 + +#define KWAPP_GSM_USSD 0x47 // Unstructured Short Service Data service + // Not defined for version 4.0 + +//IMPORTANT tag 0x48 has different meanings in different versions of the Over the Air Settings specs +#define KWAPP_IS136 0x48 // Not defined for Version 4.0 + // IS-136/CSD service in Nokia spec version 5.0 + +#define KWAPP_GPRS 0x49 // GSM/GPRS service - added in OTA v6.0 + + +#define KWAPP_PORT_9200 0x60 // Port 9200 - non continuous and not secure +#define KWAPP_PORT_9201 0x61 // Port 9201 - continuous but not secure +#define KWAPP_PORT_9202 0x62 // Indicates port 9202 - secure but non continuous conection +#define KWAPP_PORT_9203 0x63 // Indicates port 9203 - secure and continuous +#define KWAPP_AUTOMATIC 0x64 +#define KWAPP_MANUAL 0x65 +#define KWAPP_SPEED_AUTO 0x6A // Use auto selection of speed +#define KWAPP_SPEED_9600 0x6B // Indicates comm speed is 9600 +#define KWAPP_SPEED_14400 0x6C // Indicates comm speed is 14400 +#define KWAPP_SPEED_19200 0x6D // Comm speed is 19200 +#define KWAPP_SPEED_28800 0x6E // Comms speed is 28800 +#define KWAPP_SPEED_38400 0x6F // Comms speed is 38400 +#define KWAPP_PAP 0x70 // Interface protocol = PAP +#define KWAPP_CHAP 0x71 // Interface protocol = CHAP +#define KWAPP_ANALOGUE 0x72 // Analogue connection +#define KWAPP_ISDN 0x73 // Digital ISDN connection +#define KWAPP_SPEED_43200 0x74 // Communication speed of 42K +#define KWAPP_SPEED_56700 0x75 // Comm speed of 56k +#define KWAPP_MSISDN_NO 0x76 // Proxy type is MSISDN number (relevant for USSD) +#define KWAPP_IPV4 0x77 // Proxy type is an IP address (relevant for USSD) +#define KWAPP_MSCHAP 0x78 // Interface protocol = CHAP +#define KWAPP_NAME_ISP 0X7E // Start of Internet Service Provider follows +#define KWAPP_MMS_URL 0x7C // Address of Multi Media Service Centre -added in OTA v7.0 + + +// Labels for use in array of ParsedFields - application specific not Nokia + +// CHARACTERISTIC DELIMITORS +_LIT(KWappCharAddress, "CHAR-ADDRESS"); // Start of an Address Characteristic +_LIT(KWappCharName, "CHAR-NAME"); // Start of a Name Characteristic +_LIT(KWappCharURL, "CHAR-URL"); // Start of a URL Characteristic +_LIT(KWappCharMMSURL, "CHAR-MMSURL"); // Start of a URL Characteristic +_LIT(KWappCharBookmark, "CHAR-BOOKMARK");// Start of a Bookmark Characteristic +_LIT(KWappCharID, "CHAR-ID"); // Start of an ID characteristic + +_LIT(KWappXMLversion,"VERSIONx10"); +_LIT(KWappPublicID, "PUBLICID"); +_LIT(KWappCharacterSet, "CHARSET"); + +//XML Document Characteristic Tags +_LIT(KWappAddr, "ADDRESS"); +_LIT(KWappURL, "URL"); +_LIT(KWappMMSURL, "MMSURL"); // Added in v6.6 of Nokia OTA Spec +_LIT(KWappName, "NAME"); +_LIT(KWappBookmark, "BOOKMARK"); +_LIT(KWappID, "ID"); + + +// General tags +_LIT(KWappBearer, "BEARER"); +_LIT(KWappProxy, "PROXY"); +_LIT(KWappPort, "PORT"); +_LIT(KWappProxyType, "PROXY_TYPE"); + +_LIT(KWappProxyAuthName, "PROXY_AUTHNAME"); +_LIT(KWappProxyAuthSecret, "PROXY_AUTHSECRET"); +_LIT(KWappProxyLoginType, "PROXY_LOGINTYPE"); +_LIT(KWappSMSCAddress, "SMS_SMSC_ADDRESS"); +_LIT(KWappUSSDCode, "USSD_SERVICE_CODE"); +_LIT(KWappISP, "ISP_NAME"); +_LIT(KWappAccessPointName, "ACCESS_POINT_NAME"); + +_LIT(KWappCsdDial, "CSD_DIALSTRING"); +_LIT(KWappPPPAuthType, "PPP_AUTHTYPE"); +_LIT(KWappPPPAuthName, "PPP_AUTHNAME"); +_LIT(KWappPPPAuthSecret, "PPP_AUTHSECRET"); +_LIT(KWappPPPLoginType, "PPP_LOGINTYPE"); +_LIT(KWappCsdCallType, "CSD_CALLTYPE"); +_LIT(KWappCsdCallSpeed, "CSD_CALLSPEED"); + +_LIT(KWappGsmCsd, "GSM/CSD"); +_LIT(KWappGsmSms, "GSM/SMS"); +_LIT(KWappGsmUssd, "GSM/USSD"); +_LIT(KWappIS136Csd, "IS136/CSD"); +_LIT(KWappGprs, "GPRS"); // Added in OTA v6.0 + +_LIT(KWappPort9200, "9200"); +_LIT(KWappPort9201, "9201"); +_LIT(KWappPort9202, "9202"); +_LIT(KWappPort9203, "9203"); + +_LIT(KWappSpeedAuto, "AUTO"); +_LIT(KWappSpeed9600, "9600"); +_LIT(KWappSpeed14400, "14400"); +// Additional speeds added in Version 5.0 +_LIT(KWappSpeed19200, "19200"); +_LIT(KWappSpeed28800, "28800"); +_LIT(KWappSpeed38400, "38400"); +_LIT(KWappSpeed43200, "43200"); +_LIT(KWappSpeed56700, "57600"); + +_LIT(KWappPAP, "PAP"); +_LIT(KWappCHAP, "CHAP"); +_LIT(KWappMSCHAP, "MSCHAP"); +_LIT(KWappAnalogue, "ANALOGUE"); +_LIT(KWappISDN, "ISDN"); + +_LIT(KWappAuthAutomatic, "AUTOMATIC"); +_LIT(KWappAuthManual, "MANUAL"); + +_LIT(KWappMsisdnNo, "MSISDN_NO"); +_LIT(KWappIpv4, "IPV4"); + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/waptestutils.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/waptestutils.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,146 @@ +// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#if !defined(__WAPTESTUTILS_H__) +#define __WAPTESTUTILS_H__ + +#include +#include +#include +#include + +#if !defined(__LOGGING) + #define __LOGGING +#endif + +#include "waplog.h" +#include "logdef.h" + +// Constants +const TUid KUidWapTestUtils = {0x10005188}; +const TInt KMaxUserEntrySize = 50; + +//Test Harness Logging + +#define KLogsDir _L("c:\\logs\\") +#define KWapLogsDirName _L("WapTest") + +#define KTestHeader _L("Test Results") +#define KTestStarting _L("Test %d Starting") +#define KTestStartingWithDesc _L("Test %d Starting (%S)") +#define KNextTestStepWithDesc _L("Test %d Step %d (%S)") +#define KTestPassed _L("Test %d OK") +#define KTestFailed _L("Test %d FAILED (error = %d)") +#define KTestHarnessCompleted _L("Tests Completed Ok") +#define KTestHarnessFailed _L("Test FAILED (%d failed test(s))") +#define KTestFailInfo _L("Test %d : %S failed with Error %d") +#define KTestCommentPrepend _L("\t") + + +class CWapTestHarness : public CBase +/** + Test harness providing logging features + @publishedAll + @released +*/ + + { +public: + IMPORT_C static CWapTestHarness* NewLC(const TDesC& aTitle); + IMPORT_C static CWapTestHarness* NewL(const TDesC& aTitle); + ~CWapTestHarness(); + + IMPORT_C void StartTestL(const TDesC& aName); + IMPORT_C void NextStep(const TDesC& aStepName); + IMPORT_C void EndTest(TInt aErrorCode); + IMPORT_C void LogIt(TRefByValue aFmt, ...); + IMPORT_C void operator()(TInt aResult,TInt aLineNum); + IMPORT_C void operator()(TInt aResult); + IMPORT_C void PressAnyKey(); + IMPORT_C void DumpData(HBufC8& aData, TBool logIt = EFalse); + IMPORT_C void GetAnEntry(const TDesC & ourPrompt, TDes & currentstring); + IMPORT_C TInt GetSelection(const TDesC& ourPrompt, const TDesC& validChoices); + IMPORT_C void SetScript(RFile& scriptFile); + inline void DoResourceLeakTest(TBool aValue); + inline RTest& Test(); + + inline static void DefaultLogFileName(TDes& aFileName); +private: + CWapTestHarness(const TDesC& aTitle); + void ConstructL(const TDesC& aTitle); + void Panic(TInt aPanic); + void TestHarnessFailed(); + void TestHarnessComplete(); + void ResourceLeakTest(); + inline void CreateFlogger(const TDesC& aFileName, TInt aShowDate=ETrue, TInt aShowTime=ETrue); + inline void WriteComment(const TDesC& aComment); + TInt ReadLineFromScript(TDes& aBuffer); + +private: + // Helper class to store failed tests + class CTestInfo; + enum TPanicCode + { + EBadStartTest, + EBadEndTest, + EBadCLogPtr + }; +private: + RTest iTest; + RFileLogger iFlogger; + RFile* iScriptFile; + __DECLARE_LOG; // Does CLogClient* iLogPtr; + TInt iTestCount; + CArrayPtrFlat* iFailedTests; + TTime iStartTime; + TBool iCanStartTest; + TInt iStepNumber; + TInt iStartHandleCount; + TBool iDoResourceLeakTest; + TBool iScriptRunning; + }; + +class CWapTestHarness::CTestInfo : public CBase + +/** + Holds test number and name + @publishedAll + @released +*/ + { +public: + static CTestInfo* NewLC(const TDesC& aName, TInt aNumber, TInt aErrorCode); + static CTestInfo* NewL(const TDesC& aName, TInt aNumber, TInt aErrorCode); + ~CTestInfo(); + + void SetNameL(const TDesC& aName); + void SetNumber(TInt aNumber); + void SetErrorCode(TInt aErrorCode); + + inline TPtr Name() const; + inline TInt Number() const; + inline TInt ErrorCode() const; +private: + CTestInfo(); + void ConstructL(const TDesC& aName, TInt aNumber, TInt aErrorCode); +private: + HBufC* iName; + TInt iNumber; + TInt iErrorCode; + }; + +#include + +#endif // __WAPTESTUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/wbconverter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/wbconverter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,471 @@ +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#ifndef __WBCONVERTER_H +#define __WBCONVERTER_H + +#include +#include +#include + +// forward declarations +// +class CWbxmlToken; +class MWbxmlConverterObserver; +class CByteList; +class CCnvCharacterSetConverter; + +// consts, defines, enums +// +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbXmlVersion10,""); + +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbPublicIdStartWml,""); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbPublicIdEnd12,"\" \"http://www.wapforum.org/DTD/wml_1.2.xml\">"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbPublicIdEndSI10,"\" \"http://www.wapforum.org/DTD/si.dtd\">"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbPublicIdEndSL10,"\" \"http://www.wapforum.org/DTD/sl.dtd\">"); + +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbTagStart,"<"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbTagStartClose,""); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbTagEndWithoutContent,"/>"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbVariableStart,"$("); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbVariableEscaped,":E)"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbVariableUnescaped,":U)"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbVariableNoescape,":N)"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbVariableNormal,")"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbQuote,"\""); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbSpace," "); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbTab,"\t"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KWbLineBreak,"\n"); + +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdIndex = 0; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdUnknown = 1; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdWml10 = 2; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdWta10 = 3; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdWml11 = 4; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdSI = 5; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdSL = 6; +/** +@publishedAll +@deprecated +*/ +const TInt8 KWbxmlIdWml12 = 9; + +// Entity translation literals +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityDollar,"$$"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityAmp,"&"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityLt,"<"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityGt,">"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityQuot,"""); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityApos,"'"); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityNbsp," "); +/** +@publishedAll +@deprecated +*/ +_LIT8(KEntityShy,"­"); + +/** +@publishedAll +@deprecated +*/ +const TUint16 KWbxmlSkipLiteralEndTagMagicToken = 0xac1d; + + +/////////////////////////////////////////////////////////////////// +// CWbxmlConverter +/////////////////////////////////////////////////////////////////// +class RFileReadStream; +//##ModelId=3B6678E20007 +class CWbxmlConverter : public CBase +/** +@publishedAll +@deprecated +*/ +{ +public: // Methods + //##ModelId=3B6678E30199 + ~CWbxmlConverter(); + + // NOTE: input data really is 8bit bytecode + //##ModelId=3B6678E300F9 + IMPORT_C static CWbxmlConverter* CWbxmlConverter::NewL(RFs& aFs, MWbxmlConverterObserver* aObserver); + //##ModelId=3B6678E300BD + IMPORT_C static CWbxmlConverter* CWbxmlConverter::NewLC(RFs& aFs, MWbxmlConverterObserver* aObserver); + //##ModelId=3B6678E30135 + IMPORT_C static CWbxmlConverter* CWbxmlConverter::NewL(RFs& aFs, MWbxmlConverterObserver* aObserver, const TDesC* aCharacterEncoding); + //##ModelId=3B6678E3009F + IMPORT_C void ProcessDataL(HBufC8& aBuffer); + //##ModelId=3B6678E3009E + IMPORT_C void CommitL(); + +private: // Emumerations + + enum TGotoState + { + EGotoStreaming = 1, + EGotoString, + EGotoOpaque + }; + enum TConvertState + { + EConvertError = 1, + EConvertVersion, + EConvertPublicIdValue, + EConvertCharset, + EConvertStringTable, + EConvertPublicIdName, + EConvertData, + EConvertFinished + }; + +private: // Methods + + //##ModelId=3B6678E30080 + CWbxmlConverter(RFs& aFs); + //##ModelId=3B6678E30045 + void ConstructL(MWbxmlConverterObserver* aObserver, const TDesC* aCharacterEncoding); + + //##ModelId=3B6678E30044 + void HandleDataL(); + //##ModelId=3B6678E30009 + void SetNextStateL(const TInt aResult, const TConvertState aState); + //##ModelId=3B6678E30008 + TInt ConvertWbxmlVersionL(); + //##ModelId=3B6678E203E8 + TInt ConvertPublicIdValueL(); // Extract PublicId + //##ModelId=3B6678E203E7 + TInt ConvertPublicIdNameL(); // Report PublicId + //##ModelId=3B6678E203E6 + TInt ConvertCharsetL(); + //##ModelId=3B6678E203DE + TInt ConvertStringTableL(); + //##ModelId=3B6678E203DD + TInt ConvertDataL(); + //##ModelId=3B6678E203DC + TInt ConvertDataStreamingL(); + //##ModelId=3B6678E203D3 + TInt ConvertDataStringL(); + //##ModelId=3B6678E203D2 + TInt ConvertOpaqueDataL(); + //##ModelId=3B6678E203B4 + HBufC16* FormatDateStringL(TDesC8& aData); + + //##ModelId=3B6678E20396 + TInt OpenTokenFileL(HBufC& aFileName); + //##ModelId=3B6678E2035A + void ReadTokenFileL(RFileReadStream& aStream, HBufC8& aBuffer); + //##ModelId=3B6678E2033C + TInt LoadTokensL(HBufC* aBuffer); + + //##ModelId=3B6678E2030A + TInt ExtractMultiByte(TUint32* aMultiByte, TInt aSkipHeader); + //##ModelId=3B6678E202E3 + void Indent(const TInt aCount) const; + //##ModelId=3B6678E202E2 + void FinishStringL(); + //##ModelId=3B6678E202C4 + HBufC16* CharsetConvertDataL(TDesC8& aData); + + // Gets the full path to wmlc token table. Input aTokenFilePath is the path, without the drive. + // + // In: + // aTokenFilePath - the path to the token table file. + // + // Rtn: the full path to the token table file. Ownership is transfered to caller. + // + //##ModelId=3B6678E202A6 + HBufC* FindTokenFileL(const TDesC& aTokenFilePath) const; + + // Replaces characters originating from chracter entity references with the reference string + // For example chracter '&' will be "decoded" back to "&" + // + // In: + // aString - The original string containing the undedcoded characters. + // This string can get ReAllocated during the process - DO NOT USE THIS POINTER + // AFTER THE CALL to this method. (use the returned one instead...) + // Return: + // HBufC* - Pointer to the string with replaced stuff + // + //##ModelId=3B6678E20288 + HBufC* ReplaceCharacterEntitiesL(HBufC* aString); + + // MWbxmlConverterObserver interface overloads + //##ModelId=3B6678E2024C + void OutputL(const TUint32 aSource) const; + + //##ModelId=3B6678E2022E + TBool OutputCheckQuoteL(HBufC8& aSource) const; + + // Helper method to optimise the OutputL oveloads + //##ModelId=3B6678E20211 + void BufferAndOutputL(const TDesC8& aSource) const; + + // Must exist for Binary Compatibility + //##ModelId=3B6678E20210 + IMPORT_C virtual void CWbxmlConverter_Reserved1(); + +private: // Attributes + + // For binary compatibility + //##ModelId=3B6678E20206 + TAny* CWbxmlConverter_Reserved; + + // Attributes + // Note: conversion table from disk ie. you can change it at runtime + //##ModelId=3B6678E201F2 + CArrayPtrFlat* iTagArray; + //##ModelId=3B6678E201D3 + CArrayPtrFlat* iAttArray; + + //##ModelId=3B6678E2018D + MWbxmlConverterObserver* iObserver; + + //##ModelId=3B6678E20179 + TUint8 iWbxmlVersion; + //##ModelId=3B6678E20165 + TUint32 iWbxmlCharset; + //##ModelId=3B6678E20151 + TUint32 iPublicId; + //##ModelId=3B6678E2013D + TUint32 iPublicIdIndex; + + // Note: must handle source as 8bit data even in Unicode compile! + //##ModelId=3B6678E2012B + CByteList* iByteList; + //##ModelId=3B6678E2011F + HBufC8* iStringTable; + //##ModelId=3B6678E2010D + HBufC8* iPublicIdStr; + //##ModelId=3B6678E20101 + RFs& iFs; + + //##ModelId=3B6678E200ED + TInt iState; + //##ModelId=3B6678E200E3 + TUint32 iContinue; + + //##ModelId=3B6678E200D1 + TUint8 iVariable; + //##ModelId=3B6678E200C5 + TUint8 hasAttrs; + //##ModelId=3B6678E200B3 + TUint8 hasContent; + + + //##ModelId=3B6678E200A7 + TInt iTagIndex; + //##ModelId=3B6678E20095 + CArrayFixFlat* iTagStack; + //##ModelId=3B6678E2006B + TBool iRestrictedOutput; + + enum TParsing + { + EParseNot = 0, + EParseTag, + EParseAttrs + }; + //##ModelId=3B6678E20059 + TParsing iParsing; + //##ModelId=3B6678E2004F + TBool iOpenQuote; + + //##ModelId=3B6678E20045 + mutable HBufC8* iOutputBuffer; // Buffered output buffer : Optimisation + + //##ModelId=3B6678E2003B + CCnvCharacterSetConverter* iCharsetConverter; + +#ifdef __OUTPUT_WMLC + //##ModelId=3B6678E20031 + RFile iWmlcFile; // Debug stuff + //##ModelId=3B6678E20025 + RFs iWmlcFs; // Debug stuff +#endif + +}; + +#endif // __WBCONVERTER_H + +/////////////////////////////////////////////////////////////////// +// End of file +/////////////////////////////////////////////////////////////////// diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/wsp/wsptypes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/wsp/wsptypes.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,535 @@ +// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + + + +/** + @file WspTypes.h + @warning : This file contains Rose Model ID comments - please do not delete +*/ + +#ifndef __WSPTYPES_H__ +#define __WSPTYPES_H__ + +// System includes +#include +#include + +//TODO - These will move to a common WAPMSG/WSPTransport file at a later stage, +//in the wap-stack subsystem, to be shared with the WAP Messaging API. + +namespace Wap +/** +All type definitions and enumerations used in WSP are in placed in a wider WAP +namespace, to avoid name conflicts with other components. +@publishedAll +@released +*/ +{ + +/** The TWspPrimitive type represents the WSP primitives defined in the WSP + Specification, July 2001. +*/ +enum TWspPrimitive + { + /** + */ + ESConnect = 0, + /** + */ + ESDisconnect, + /** + */ + ESSuspend, + /** + */ + ESResume, + /** + */ + ESException, + /** + */ + ESMethodInvoke, + /** + */ + ESMethodInvokeData, + /** + */ + ESMethodResult, + /** + */ + ESMethodResultData, + /** + */ + ESMethodAbort, + /** + */ + ESPush, + /** + */ + ESConfirmedPush, + /** + */ + ESPushAbort + }; + +/** The TWspProtocolOptions type represents the optional protocol functions + defined in the WSP Specification, July 2001. When the client sends the + Protocol Capability to the server, it indicates which functions it will + accept from the server. The server returns from the set of functions sent + by the client those that it will perform. +*/ +enum TWspProtocolOptions + { + /** The Large Data Transfer feature includes support for multiple SDU's and + support for the Data Fragment PDU. Setting this falg indicates support + for sending and receiving large data. If a client only wishes to receive + large data, then it should set the Client and Server Message size fields + appropriately. + */ + ELargeDataTransfer = 0x08, + /** The acknowledgement headers flag specifies that the client wishes to send + acknowledgement headers. If the server cannot process them (indicated by + negotiating down the flag) the client should not send the headers as they + will be ignored. + */ + EAcknowledgementHeaders = 0x10, + /** The client enables the Suspend Resume facility when it wishes to suspend + and resume the session. If the server does not support suspend and resume + then this flag must be cleared in the negotiated capabilities. + */ + ESessionResumeFacility = 0x20, + /** The client uses this flag to indicate that it is able and willing to + receive push information. If the server cannot send pushes then this flag + must be cleared in the negotiated capabilities. + */ + EPushFacility = 0x40, + /** The client uses this flag to indicate that it is able and willing to + receive confirmed push information. If the server cannot send pushes + then this flag must be cleared in the negotiated capabilities. + */ + EConfirmedPushFacility = 0x80 + }; + +/** The TWspSessionState type represents the states of a WSP session, as defined + by the WSP Specification, July 2001. +*/ +enum TWspSessionState + { + /** + */ + ENull = 0, + /** + */ + EConnecting, + /** + */ + EConnected, + /** + */ + ESuspending, + /** + */ + ESuspended, + /** + */ + EClosing, + /** + */ + EResuming + }; + +/** The TWspMethodState type represents the states of a WSP method transaction, + as defined by the WSP Specification, July 2001. +*/ +enum TWspMethodState + { + /** + */ + ENullMethod =0, + /** + */ + ERequesting, + /** + */ + EWaiting, + /** + */ + EWaiting2, + /** + */ + ECompleting, + /** + */ + EAborting + }; + +/** The TWspBearer type defines the set of supported bearers. +*/ +enum TWspBearer + { + /** Specifier for any bearer. + */ + EAny = 0, + /** IP bearer. + */ + EIP, + /** A 7-bit SMS bearer. + */ + ESMS7, + /** An 8-bit SMS bearer. + */ + ESMS, + /** A 7-bit WAP SMS bearer. + */ + EWAPSMS7, + /** An 8-bit WAP SMS bearer. + */ + EWAPSMS + }; + +/** The TWspSession type defines the 2 types of WSP Session Service; Connection + Oriented and Connectionless. +*/ +enum TWspSession + { + /** Specifier for Connection Oriented Session Service. + */ + EWspConnectionOriented = 0, + /** Specifier for Connectionless Session Service. + */ + EWspConnectionLess + }; + +/** The TWspReason type is used by to report the cause of a particular indication + primitive. The WSP Specification, July 2001, specifies a given set that MUST + be recognised (6.2.5). Further values may be added. +*/ +enum TWspReason + { + /** The rules of the protocol were broken and in its current state, the peer + could not perform the specified operation. E.g. the PDU was not allowed. + */ + EProtoErr = 0xE0, + /** The session was disconnected while the operation was still in progress. + */ + EDisconnect = 0xE1, + /** The session was suspended while the operation was still in progress. + */ + ESuspend = 0xE2, + /** The session was resumed while the operation was still in progress. + */ + EResume = 0xE3, + /** The request could not be processed due to a lack of resources. + */ + ECongestion = 0xE4, + /** The connection was prevented due to an error. + */ + EConnectErr = 0xE5, + /** The SDU size in a request exceeded the maximum negotiated SDU size. + */ + EMRUExceeded = 0xE6, + /** The negotiated value of the maximum outstanding transactions (either for + push or method transactions) has been exceeded. + */ + EMORExceeded = 0xE7, + /** The operation was aborted by the Provider. + */ + EPeerReq = 0xE8, + /** An underlying network error prevented the completion of a request. + */ + ENetErr = 0xE9, + /** The cause of the indication was an action by the Client. + */ + EUserReq = 0xEA, + /** The client has refesed the Push message, no specific reason, no retries. + */ + EUserRfs = 0xEB, + /** The Push message cannot be delivered to the intended destination. + */ + EUserPnd = 0xEC, + /** The Push message was discarded due to resource shortage. + */ + EUserDcr = 0xED, + /** The content-type of the Push message cannot be processed. + */ + EUserDcu = 0xEE, + /** The session connect request has been redirected to a new proxy. This is + a temporary redirection and the original proxy should be used in the + future when trying to access this service. This is not defined by the + WSP Specification. + */ + ETemporaryRedirectedProxy =0, + /** The session connect request has been redirected to a new proxy. This is + a permanent redirection and the new proxy should be used in the future + when trying to access this service. The client will be notified of this + event and the HTTP session property EWspProxyAddressnew will contain the + new proxy's address. The client should update its access point database. + This is not defined by the WSP Specification. + */ + EPermanentRedirectedProxy, + /** The client had disconnected the session, but as Suspend Resume facility + was being used, the session was suspended. The client then changed the + proxy and did a connect. The suspended session cannot be resumed, so the + the current session must be disconnected (with this reason) and a + session connect initiated with the new proxy. This is not defined by the + WSP Specification. + */ + EChangedProxyInSuspendedSession, + /** The client's WSP session was disconnected in the Connecting state because + configuration of the underlying WTLS layer failed prior to the phase 1 + WTLS handshake. + */ + EWtlsConfigurationFailed, + /** The client's WSP session was disconnected in the Connecting state because + phase 1 of the WTLS handshake failed. + */ + EWtlsPhase1HandshakeFailed, + /** The client's WSP session was disconnected in the Connecting state because + phase 2 of the WTLS handshake failed. + */ + EWtlsPhase2HandshakeFailed, + /** The client's WSP session was disconnected in the Connecting state because + the proxy's WTLS certificate was invalid - e.g. badly formed, or out of date. + */ + EWtlsInvalidServerCert, + /** The client's WSP session was disconnected in the Connecting state because + the proxy's WTLS certificate could not be trusted. This means it was not signed + by any root certificate on the device, and the security policy criteria could not + determine further whether it could be trusted or not. + */ + EWtlsUntrustedServerCert, + /** The client's WSP session was disconnected in the Connecting state because + the negotiated WTLS configuration at completion of the secure handshake was + rejected by criteria in the security policy. + */ + EWtlsNegotiatedConfigRejected, + /** The client's transaction or session has failed due to an out-of-memory situation. + */ + EOutOfMemory, + /** The client's session has entered an inconsistent state, probably due to a failure caused + by an out-of-memory situation. + */ + ESessionStateFailure + }; + +/** The enum TWspCapabilty is used to select a capability to reset (if required) + before setting the value of the capability. +*/ +enum TWspCapability + { + /** Specifies the Alias Addresses capability. + */ + EAliasAddresses = 0, + /** Specifies the Extended Methods capability. + */ + EExtendedMethods, + /** Specifies the Header Code Pages capability. + */ + EHeaderCodePages, + /** Specifies the Method Maximum Outstanding Requests capability. Default value is 1. + */ + EMethodMOR, + /** Specifies the Push Maximum Outstanding Requests capability. Default value is 1. + */ + EPushMOR, + /** Specifies the Protocol Options capability. Default value is 0x00. + */ + EProtocolOptions, + /** Specifies the Client SDU size capability. Default value is 1400 octets. + */ + EClientSDUSize, + /** Specifies the Server SDU size capability. Default value is 1400 octets. + */ + EServerSDUSize, + /** Specifies the Client Message size capability. Default value is 1400 octets. + */ + EClientMessageSize, + /** Specifies the Server Message size capability. Default value is 1400 octets. + */ + EServerMessageSize, + /** Specifies the Unknown capabilities. + */ + EUnknownCapabilities, + /** Specifies all the capabilities. + */ + EAllCapabilities + }; + +} // end of namespace Wap + + +/** +Maximum Proxy address length, this is large enough for a full IPv6 address. +@publishedAll +@released +*/ +const TInt KMaxProxyAddrLen = 40; + +//##ModelId=3C4C41B20079 +class TWspRedirectedAddress +/** +The TWspRedirectedAddress type represents an alternate address to which +Clients must use to establish a session with the same service that was +initially contacted. If the bearer or port fields have been excluded, then +the orginal bearer and port should be used to contact the new server. The +WSP Specification, July 2001, defines an Address Type (8.2.2.3) upon which +this class is based. +@publishedAll +@released +*/ + { +public: // Attributes + + /** A flag to indicate that the port field is set. + */ + //##ModelId=3C4C41B200DD + TBool iHasPort; + + /** A flag to indicate that the bearer field is set. + */ + //##ModelId=3C4C41B200CB + TBool iHasBearer; + + /** The proxy address. + */ + //##ModelId=3C4C41B200C1 + TBuf8 iProxyAddress; + + /** The port number. + */ + //##ModelId=3C4C41B200B5 + TUint16 iPort; + + /** The bearer type. + */ + //##ModelId=3C4C41B200A3 + Wap::TWspBearer iBearer; + }; + +/** +Maximum length of a key ID for WTLS +@publishedAll +@released +*/ +const TInt KWtlsMaxKeyIdLength = 512; + +class TWtlsKeyExchangeSuite +/** +The class TWtlsKeyExchangeSuite contain the definitions of WTLS +Key Exchange Suites as defined in the WAP WTLS Specification, July 2001 +@publishedAll +@released +*/ + { +public: + enum TKeyExchangeSuite + { + ENULL =0, + ESHARED_SECRET =1, + EDH_anon =2, + EDH_anon_512 =3, + EDH_anon_768 =4, + ERSA_anon =5, + ERSA_anon_512 =6, + ERSA_anon_768 =7, + ERSA =8, + ERSA_512 =9, + ERSA_768 =10, + EECDH_anon =11, + EECDH_anon_113 =12, + EECDH_anon_131 =13, + EECDH_ECDSA =14, + EECDH_anon_uncomp =15, + EECDH_anon_uncomp_113 =16, + EECDH_anon_uncomp_131 =17, + EECDH_ECDSA_uncomp =18 + }; + enum TKeyIdType + { + EIdNull = 0, + EText = 1, + EBinary = 2, + EKeyHashSha = 254, + EX509Name = 255 + }; + +public: + TWtlsKeyExchangeSuite(TKeyExchangeSuite aKeyExchangeSuite, TKeyIdType aKeyIdType, const TBuf8& aKeyId); + +public: + TKeyExchangeSuite iKeyExchangeSuite; + TKeyIdType iKeyIdType; + TBuf8 iKeyId; + }; + +class TWtlsCipherSuite +/** +The class TWtlsCipherSuite encapsulates a WTLS cipher suite as defined in +the WAP WTLS Specification, July 2001 +This is a pair made up of a Bulk Encryption Algorithm and a Mac Algorithm +@publishedAll +@released +*/ + { +public: + + enum TBulkEncryptionAlgorithm + { + ENULL =0, + ERC5_CBC_40 =1, + ERC5_CBC_56 =2, + ERC5_CBC =3, + EDES_CBC_40 =4, + EDES_CBC =5, + E3DES_CBC_EDE =6, + EIDEA_CBC_40 =7, + EIDEA_CBC_56 =8, + EIDEA_CBC =9, + ERC5_CBC_64 =10, + EIDEA_CBC_64 =11 + }; + + enum TMacAlgorithm + { + ESHA_0 =0, + ESHA_40 =1, + ESHA_80 =2, + ESHA =3, +// N/A (removed) =4, + EMD5_40 =5, + EMD5_80 =6, + EMD5 =7, + }; + + TWtlsCipherSuite(TBulkEncryptionAlgorithm aBulkEncryptionAlgorithm, TMacAlgorithm aMacAlgorithm); + +public: + TBulkEncryptionAlgorithm iBulkEncryptionAlgorithm; + TMacAlgorithm iMacAlgorithm; + }; + +inline TWtlsCipherSuite::TWtlsCipherSuite(TBulkEncryptionAlgorithm aBulkEncryptionAlgorithm, TMacAlgorithm aMacAlgorithm) + : iBulkEncryptionAlgorithm(aBulkEncryptionAlgorithm), iMacAlgorithm(aMacAlgorithm) + { + } + +inline TWtlsKeyExchangeSuite::TWtlsKeyExchangeSuite(TKeyExchangeSuite aKeyExchangeSuite, TKeyIdType aKeyIdType, const TBuf8& aKeyId) + : iKeyExchangeSuite(aKeyExchangeSuite), iKeyIdType(aKeyIdType), iKeyId(aKeyId) + { + } + + +#endif // __WSPTYPES_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/xmlelemt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/xmlelemt.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,192 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// XmlElement.h +// XML Element class +// Derived from CTypedNode. Adds functionality +// to make the use of the node simpler +// +// + +#ifndef __XMLELEMT_H +#define __XMLELEMT_H + +// +// INCLUDES +// +#include +#include + +// +// CONSTANTS +// +/** +@publishedAll +@deprecated +*/ +_LIT(KXmlElementDataItemAttributeName, "__XML_DI"); + +// +// DATA TYPES +// +enum TXmlElementPanic +/** +@publishedAll +@deprecated +*/ +{ + EXmlElPanicInvalidDataItem = 1 +}; + +// Type of an attribute in a node +typedef const TDesC* TXmlAttributeType; +// Type of an element (type of node) +typedef const TDesC* TXmlElementType; + +// +// FUNCTION PROTOTYPES +// +/** +@publishedAll +@deprecated +*/ +GLREF_C void Panic(TXmlElementPanic aPanic); + +// +// FORWARD DECLARATIONS +// +class RFile; +class CAttributeLookupTable; + +// +// CLASS DEFINITIONS +// +//##ModelId=3B66798702FF +class CXmlElement : public CTypedNode +/** +@publishedAll +@deprecated +*/ +{ +public: + // Construction + //##ModelId=3B6679870364 + static inline CXmlElement* NewL(TXmlElementType aType,CNode* aParent); + + // Attributes + // Return the value of a particular attribute + //##ModelId=3B667987035D + IMPORT_C const TDesC* Attribute(const TDesC& aAttributeName) const; + // Return the value of an aIndexth attribute + //##ModelId=3B6679870362 + inline const TDesC* Attribute(TInt aIndex) const; + + // Set attribute value + //##ModelId=3B6679870359 + IMPORT_C void SetAttributeL(const TDesC& aAttributeName, const TDesC& aAttributeValue, CAttributeLookupTable& aAttributeLUT); + + // Store a unicode descriptor as data value. + //##ModelId=3B6679870357 + IMPORT_C void SetTextL(const TDesC& aData); + // Get data value + //##ModelId=3B6679870352 + inline const TDesC* Text() const; + + // Children + //##ModelId=3B6679870350 + inline void AppendChildL(CXmlElement* aElement); + + //##ModelId=3B667987034D + IMPORT_C void InsertChildL(TInt aIndexToInsertBefore, CXmlElement* aElement); + + //##ModelId=3B6679870347 + inline TInt Count() const; + + //##ModelId=3B6679870345 + inline CXmlElement* Child(TInt aIndex) const; + + // Find out the index of this child + // INPUT: + // aChild - Pointer to the child node + // RETURN: + // TInt - index to the child, -1 if no child found + //##ModelId=3B6679870343 + IMPORT_C TInt ChildIndex(CXmlElement* aChild) const; + + // Data item + //##ModelId=3B667987033C + IMPORT_C void SetDataItemL(CBase* aDataItem, CAttributeLookupTable& aAttributeLUT); // takes ownership of aDataItem + //##ModelId=3B667987033B + IMPORT_C CBase* DataItem() const; + //##ModelId=3B6679870339 + IMPORT_C void DeleteDataItem(CAttributeLookupTable& aAttributeLUT); + +private: + // Data Item handling + class CDataItemAttribute : public CBase + { + public: + ~CDataItemAttribute() { delete iDataItem; }; + CBase* iDataItem; + }; + + //##ModelId=3B6679870335 + CXmlElement() : CTypedNode(NULL, NULL) {}; + +// Debug stuff +//#ifdef _DEBUG +public: + //##ModelId=3B6679870334 + IMPORT_C void WriteIntoFileL(); + //##ModelId=3B6679870331 + void StartWriteL(RFile& aFile, TInt aIndentation); +private: + //##ModelId=3B6679870327 + void WriteNameL(RFile& aFile, TInt aIndentation); +//#endif +}; + +// +// INLINE METHODS +// +inline CXmlElement* CXmlElement::NewL(TXmlElementType aType,CNode* aParent) +{ + return (CXmlElement*)CTypedNode::NewL(aType, aParent); +} + +inline const TDesC* CXmlElement::Attribute(TInt aIndex) const +{ + return (TDesC*)((CDataDelete*)AttributeByIndex(aIndex))->Data(); +} + +inline const TDesC* CXmlElement::Text() const +{ + return (const TDesC*)CTypedNode::Data(); +} + +inline void CXmlElement::AppendChildL(CXmlElement* aElement) +{ + CTypedNode::AppendNodeToThisNodeL(aElement); +} + +inline TInt CXmlElement::Count() const +{ + return NumberImmediateChildren(); +} + +inline CXmlElement* CXmlElement::Child(TInt aIndex) const +{ + return (CXmlElement*)CTypedNode::Child(aIndex); +} + +#endif //__XMLELEMT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mw/xmllib.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/mw/xmllib.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,234 @@ +// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +// which accompanies this distribution, and is available +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// CXmlLibrary is an interface class for a client to access the Xml parsing and validation +// services provided by the library. In general, CXmlLibrary should be concidered as a base +// class for a library which implements the language specific bits of an Xml-language parser. +// USAGE: +// - Construction of the class using NewL or NewL +// - Pass data to parsing by calling ProcessDataL. +// - When all data has been parsed, call CommitL +// +// + +#ifndef __XMLLIB_H__ +#define __XMLLIB_H__ + +// System includes +// +#include +#include + +// CONSTANT DEFINITIONS +// + +/** +ID for the root node attribute that contains the buffered document in case no DTD was available +@publishedAll +@deprecated +*/ +_LIT(KXmlLibBufferedDocumentAttribute, "XmlLibBufferedDocument"); + +/** +The Xml version that XML currently parser supports +@publishedAll +@deprecated +*/ +_LIT(KSupportedXmlVersion, "1.0"); + +/** +ID for node containing text data defined in a CDATA section (i.e. within ) +@publishedAll +@deprecated +*/ +_LIT(KCDataID, "CDATA"); + +/** +ID for "normal" text nodes +@publishedAll +@deprecated +*/ +_LIT(KPCDataID, "#PCDATA"); + + +// Forward class declarations +// +class CXmlElement; +class CXmlParser; +class CBNFNode; +class CAttributeLookupTable; +class MWapPluginSP; + +// CXmlLibrary +// +//##ModelId=3B6679A401C8 +class CXmlLibrary : public CBase +/** +@publishedAll +@deprecated +*/ + { +public: // Methods + // Default constuctor + // Sets default values values iMIMEType, iDefaultDoctype and iDefaultDTDUrl + // An inheriting class should override this constructor and set the variables + // with their correct values. + //##ModelId=3B6679A402CD + IMPORT_C virtual ~CXmlLibrary(); + //##ModelId=3B6679A402BA + IMPORT_C static CXmlLibrary* NewL(MWapPluginSP& aPluginSP, CXmlElement* aRootNode); + //##ModelId=3B6679A402AF + IMPORT_C static CXmlLibrary* NewLC(MWapPluginSP& aPluginSP, CXmlElement* aRootNode); + + //##ModelId=3B6679A40287 + IMPORT_C virtual TInt ProcessDataL(TDesC8& aData); + + // Xml Parse given data and generate document tree to the given root node. + // INPUT: + // aData - document text, or a piece of it + // RETURN: + // TInt - an error code defined above, KErrNone if no errors. + //##ModelId=3B6679A40291 + IMPORT_C virtual TInt ProcessDataL(HBufC8& aData); + + // Signal parser that incoming data stream has finished + // RETURN: + // TInt - an error code defined above, KErrNone if no error occured. + // NOTE: In case no DTD was available, the document got buffered and was attached + // to an attribute in the root node and CommitL returns KErrDocumentBuffered. + // The buffered document will be re-parsed when engine receives the requested + // DTD and calls a data handler (defined by iMIMEType) for validation. + //##ModelId=3B6679A4027E + IMPORT_C virtual TInt CommitL(); + + // Validate the document according to the given DTD. + // INPUT: + // aDTDRootNode - Root node to the DTD tree which defines the structure of the document. + // This referenced node is the DTD root node created by the engine. + // The actual DTD tree, if any, is attached as a child to this node. + // NO INHERITING CLASS SHOULD OVERRIDE THIS! Override the protected + // ValidateL instead. + // RETURN: + // TInt - an error code defining the reason for validation failure. KErrNone if no errors. + //##ModelId=3B6679A40274 + IMPORT_C virtual TInt ValidateL(CBNFNode& aDTDRootNode); + + // Set parser and library to its initial state to start parsing of a new document + // INPUT: + // aRootNode - root node for the new document tree + //##ModelId=3B6679A4026B + IMPORT_C virtual void ResetL(CXmlElement* aRootNode); + + // ----------------------------------------------------------------------- + // (WAP Push Addition) + // Wap Push specific method to switch off use of XML validator which doesn't work + // with push messages. + // iIgnoreValidator will be set on class construction to False with complies with + // current code usage; for push messages ONLY set iIgnoreValidator to True + // ----------------------------------------------------------------------- +// inline void OmitValidator(TBool aIgnoreValidator) { iIgnoreValidator = aIgnoreValidator; } ; + // + // ----------------------------------------------------------------------- + +protected: + // A simple, internal utility function to setup the Xml parser + //##ModelId=3B6679A4026A + IMPORT_C void PrepareParserL(); + + //##ModelId=3B6679A40269 + IMPORT_C void ConstructL(); + + // Default constructor + // SEE NOTES ON iMimeType, iDefaultDocType and iDefaultDTDUrl for inheriting class's constuctor + IMPORT_C CXmlLibrary(MWapPluginSP& aPluginSP, CXmlElement* aRootNode); + + // Data parsing method for internal usage. Takes ownership of the given data + // INPUT: + // aData - Pointer to the UNICODE text data. Parser shall take ownership of this data! + // RETURN: + // TInt - Error code, KErrNone if no errors. + //##ModelId=3B6679A402A5 + TInt ProcessDataL(HBufC16* aData); + + // Internal utility function for finishing with the parser + // RETURN: + // TInt - Error code. KErrNone if no errors. + //##ModelId=3B6679A40260 + TInt CommitParserL(); + + // Internal utility function for handling return values from parsing and initiating DTD fetch + // RETURN: + // TInt - Error code. KErrNone if no errors. + //##ModelId=3B6679A4025F + TInt ExecuteDataProcessingL(); + + //##ModelId=3B6679A40255 + CBNFNode* ExtractDTDTree(CBNFNode* aDTDRoot); + + // Internal validation function that actually performs the validation. + // INPUT: + // aDTDRootNode - Pointer to the _actual_ dtd tree root node, NOT the root given by angine + // OUTPUT: + // TInt - Error code, KErrNone if no errors + //##ModelId=3B6679A4024B + IMPORT_C virtual TInt ExecuteValidateL(CBNFNode* aDTDRootNode); + +protected: // Attributes + + /** Plugin Service Provider + */ + //##ModelId=3B6679A40239 + MWapPluginSP& iPluginSP; + + /** Document Root Node + */ + //##ModelId=3B6679A40225 + CXmlElement* iRootNode; + + // The default DTD doctype and Url in case no DTD was defined + // NOTE: Inheriting class should set these values in its constructor!! + //##ModelId=3B6679A4021B + const TDesC* iDefaultDoctype; + + //##ModelId=3B6679A40211 + const TDesC* iDefaultDTDUrl; + + /** The actual DTD tree - not owned + */ + //##ModelId=3B6679A401FC + CBNFNode* iDTD; + +private: // Attributes + + /** The XML parser + */ + //##ModelId=3B6679A401F2 + CXmlParser* iParser; + +private: // BC-proofing + +/** + Intended Usage : Reserved for future use + @since 6.0 + */ + //##ModelId=3B6679A40241 + IMPORT_C virtual void CXmlLibrary_Reserved1(); + + /** Reserved for future use + */ + //##ModelId=3B6679A401E8 + TAny* iCXmlLibrary_Reserved; + + }; + +#endif // __XMLLIB_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mwappluginsp.h --- a/epoc32/include/mwappluginsp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MWAPPLUGINSP_H__ -#define __MWAPPLUGINSP_H__ - -// System includes -// -#include - -// Forward class declarations -// -class CDocumentNode; -class CNode; -class CDTDNode; -class CXmlElement; -class CAttributeLookupTable; - - -typedef TAny CWmlLibrary; - - -//##ModelId=3B666FA402F4 -class MWapPluginSP -/** -@publishedAll -@deprecated -*/ - { -public: - -/** - Intended Usage : Resets the content data pointers in the given document - node and any dependents. This could also reset the data pointer in an - associated data dictionary node and its client document nodes. - @since 6.0 - @param aDocumentNode The pointer to the document root node - @param aDataPtr The pointer to the new data content - @pre None - @post The data pointers in the specified document node and - dependents have been set to the new data - */ - //##ModelId=3B666FA40331 - virtual void ResetDocumentNodeData(CDocumentNode* aDocumentNode, TAny* aDataPtr) const =0; - -/** - Intended Usage : Gets hold of the actual node that holds the data for the - specified document node. The document data may actually be shared amongst - several document nodes and actually held in the data dictionary. - @since 6.0 - @param aDocumentNode The pointer to a document node - @return A pointer to node that actual holds the data. - */ - //##ModelId=3B666FA4032C - virtual CNode& DataStorageNode(const CDocumentNode* aDocumentNode) const =0; - -/** - Intended Usage : Preload the specified DTD for validating recieved WML - and WMLC decks. The document data handler needs to call this as soon as it - knows what type of DTD the document is using. When the document completes, - this DTD will be used to validate it before the 100% complete message is - passed up to the engine observer. - @since 6.0 - @param aDocType The specified DTD type - @param aDTDURL The URL of the DTD to be fetched - @param aDocRootNode The root node of the document to be validated - @return A pointer to the DTD if the specified DTD is available, - otherwise NULL. - @todo Add the pre and post conditions. - @pre None - @post Unspecified - */ - //##ModelId=3B666FA40328 - virtual const CDTDNode* PrepareDTDL(const TDesC& aDocType, - const TDesC& aDTDURL, - const CDocumentNode* aDocRootNode) =0; - -/** - Intended Usage : Provide a CWmlLibrary object. This object is ready to - process data and build a document tree to the given root node. - @since 6.0 - @warning The CWmlLibrary object is owned by the WAP Engine. - @param aDocRootNode A pointer to the root node where the document - tree is to be built. - @return A pointer the CWmlLibrary object. - */ - //##ModelId=3B666FA40326 - virtual CWmlLibrary* WmlLibL(CXmlElement* aDocRootNode) =0; - -/** - Intended Usage : Gets the Attribute Look Up Table. - @since 6.0 - @return A reference to the Attribute Look Up Table. - */ - //##ModelId=3B666FA4031C - virtual CAttributeLookupTable& AttributeLUT() =0; - - }; - -#endif // __MWAPPLUGINSP_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/mwbxmlconverterobserver.h --- a/epoc32/include/mwbxmlconverterobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __MWBXMLCONVERTEROBSERVER_H__ -#define __MWBXMLCONVERTEROBSERVER_H__ - -// System includes -// -#include - -//##ModelId=3B6678E0000E -class MWbxmlConverterObserver -/** -@publishedAll -@deprecated -*/ - { -public: // Methods - - //##ModelId=3B6678E00024 - virtual TInt HandleWbxmlOutputL(const HBufC8& aBuffer) = 0; - - //##ModelId=3B6678E00026 - virtual TInt HandleWbxmlOutputL(HBufC8& aBuffer) = 0; - - //##ModelId=3B6678E0002D - virtual TInt HandleWbxmlOutputL(HBufC8* aBuffer) = 0; - - //##ModelId=3B6678E0002F - virtual TInt HandleWbxmlOutputL(TUint32 aSource) = 0; - - //##ModelId=3B6678E00022 - virtual void HandleWbxmlEncodingUpdateL(HBufC8* aCharacterEncoding) = 0; - -private: // Methods - - //##ModelId=3B6678E00018 - IMPORT_C virtual void MWbxmlConverterObserver_Reserved1(); - - }; - -#endif // #define __MWBXMLCONVERTEROBSERVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obex.h --- a/epoc32/include/obex.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef OBEX_H -#define OBEX_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // OBEX_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexbase.h --- a/epoc32/include/obexbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,243 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXBASE_H -#define __OBEXBASE_H - -#include -#include - -class CObexTransportControllerBase; -class TObexTransportInfo; -class CObexPacket; -class CObexNotifyHandlerBase; - -/** -@publishedAll -@released - -This class is the common base class for any object which wishes -to use the Obex Server or Client. -The class which owns a CObexClient or CObexServer must be provide an object -derived from this class to handle the call from the Server/Client for a request -for a Password. -@see CObex::SetCallBack -*/ -class MObexAuthChallengeHandler - { -public: - /** - Indicates that the server/client has received an Authentication challenge. The challenge - can only be responded to once a password has been retrieved by some means and passed - back to the calling class. The password is passed back via CObex::UserPasswordL - @param aRealm This will contain the Realm specified by the unit forcing the - Authentication, if no UserID was supplied then this parameter will be of zero length. - */ - virtual void GetUserPasswordL(const TDesC& aRealm) = 0; - - /** - Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. - @param aInterface UID of the interface to return - @param aObject the container for another interface as specified by aInterface - */ - IMPORT_C virtual void MOACH_ExtensionInterfaceL(TUid aInterface, void*& aObject); - }; - -/** -This class is the common base class for CObexClient and CObexServer. It is -an abstract class and cannot be instantiated in itself. However, it does -contain user functionality common to both client and server connections. - -Provides the basic OBEX transport functionality (sending and receiving -files) -Client and server provide the more specialied APIs for -- initiation or response to puts & gets -- (possible) handling of more generalised 'objects' (prob. with data buffered through a file). - -This class is not designed for user derivation - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObex) : public CBase, protected MObexNotify - { -public: - /** - Describes the information set or received in a SETPATH command. - - The first bit of iFlags, 0, can be set to indicate to the receiver of SETPATH to backup a level before applying the path name. - The second bit of iFlags, 1, can be set to indicate to the receiver of SETPATH to NOT create the directory if it doesn't exist. - The iConstants variable is always set to zero as it is reserved. - The iName variable indicates the directory to create or go to, and does not include the root directory of the receiver (i.e. - if the directory to be set is C:\notes then iName is set to "notes"). - If a name is not set then set CObex::TSetPathInfo::iNamePresent to false. - */ - NONSHARABLE_CLASS(TSetPathInfo) - { - public: - IMPORT_C TSetPathInfo(); - TSetPathInfo(const TObexSetPathData& aData); - IMPORT_C TBool Parent() const; - TUint8 iFlags; - TUint8 iConstants; - TBuf iName; - /** Whether iName is present in this SETPATH info */ - TBool iNamePresent; - private: - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - - /** - Current obex connection state - In general, the further through the enum the values are, - the further through the connection process the state machine - will be. - */ - enum TConnectState - { - EConnIdle, /** Nothing is happening */ - EConnTransport, /** Transport Link connected not yet established true Link */ - EConnObex, /** full connection established */ - ESimpleConnRequest, /** Connect without Auth has been sent by ClientReceived by Server */ - EConnChallRxed, /** Server has issued a challenge, to a Client cionnect */ - ESimpleConnChallIssued, /** Server, received Simple Connect but Server Challenge issued */ - EChallConnRequested, /** Connect with Auth has been sent by Client/Received by Server */ - EChallConnChallIssued, /** Server has sent a Challenge & Resp to a Client EChallConnRequest */ - EWaitForFinalResponse, /** Client, waiting for final success/fail not chall-response expected - Server, Waiting for final Resp fromm Client to Challenge */ - EFinalResponseReceived, /** Server, the final response has been received */ - EFinalChallRxed, /** Server, Client connect with challenge, Server responds with challenge, Client re-issued original/new challenge */ - EWaitForUserInput, /** waiting for the user */ - EDropLink /** drop the link */ - }; - - /** - The Obex operation currently being performed. - */ - enum TOperation - { - EOpConnect = 0x00, /** Connect */ - EOpDisconnect = 0x01, /** Disconnect */ - EOpPut = 0x02, /** Put */ - EOpGet = 0x03, /** Get */ - EOpSetPath = 0x05, /** SetPath */ - EOpAbort = 0xFF, /** Abort - must fit in one pkt so final bit is always set */ - EOpAbortNoFBit = 0x7F, /** Abort (internal, never transmitted) */ - EOpGetResponse = 0xFD, /** Internal - not actually an obex operation. */ - EOpIdle = 0xFE, /** Internal - not actually an obex operation. */ - }; - - /** - Flags to suppress the authentication elements of the authentication challenge header. - */ - enum TObexSuppressedAuthElements - { - EObexNoSuppressedAuthElements = 0x00, - EObexSuppressChallengeOptionsAuthElement = 0x01, - EObexSuppressRealmAuthElement = 0x02, - EObexSuppressAllAuthElements = EObexSuppressChallengeOptionsAuthElement | EObexSuppressRealmAuthElement // Must be last - }; - - virtual ~CObex(); - IMPORT_C void SetCallBack(MObexAuthChallengeHandler& aCallBack); - IMPORT_C TBool IsConnected() const; - IMPORT_C TBool IsStrictPeer() const; - IMPORT_C const TObexConnectInfo& LocalInfo() const; - IMPORT_C TInt SetLocalWho(const TDesC8& aInfo); - IMPORT_C const TObexConnectInfo& RemoteInfo() const; - IMPORT_C void SuppressAuthenticationHeaderElements(TObexSuppressedAuthElements aSuppressedObexAuthElements); - - // Implementation of MObexNotify Interface - /** - @internalTechnology - */ - virtual void Process(CObexPacket& aPacket); - /** - @internalTechnology - */ - virtual void Error(TInt aError) ; - /** Call back to start the obex session - @internalTechnology - */ - virtual void TransportUp(); - /** - @internalTechnology - */ - virtual void TransportDown(TBool aForceTransportDeletion); - - virtual void UserPasswordL( const TDesC& aPassword) = 0; - IMPORT_C void RemoteAddr(TSockAddr& anAddr); - - TConnectState GetConnectState() const; - - IMPORT_C TBool IsAuthenticating() const; - -protected: - CObex(); - virtual void ConstructL(TObexTransportInfo& aObexTransportInfo); - virtual TInt ParseConnectPacket(CObexPacket& aPacket) = 0; - void SetConnectState(TConnectState aNewState); - IMPORT_C TConnectState ConnectState() const; // same as GetConnectState - has to be maintained here for BC - virtual void OnPacketReceive(CObexPacket& aPacket) =0; - virtual void OnError(TInt aError) =0; - virtual void OnTransportUp() =0; - virtual void OnTransportDown() =0; - void ProcessChallengeL(const TObexInternalHeader& hdr); //process the received challenge - void ProcessChallResponseL(const TObexInternalHeader& hdr); //process the response to challenge - TInt GenerateChallenge(CObexPacket& aPacket); //generate a challenge - void PrepareChallResponseL(const TDesC& aPassword); //generate a response a respose to challenge - //after user Password input - void ForcedTransportDown(); - void ControlledTransportDown(); - void RemoteInfoCleanup(); - void CObex::CancelObexConnection(); -protected: - TConnectState iConnectState; - CObexTransportControllerBase* iTransportController; - TObexConnectInfo iLocalInfo; - TObexConnectInfo iRemoteInfo; - MObexAuthChallengeHandler* iCallBack; - TNonce iOutgoingNonce; //nonce used when challenging - TNonce iIncomingNonce; //nonce used when receiving a challenge - HBufC8* iChallPassword; //password used when challenging - HBufC8* iRespPassword; //password used when responding to a challenge - HBufC8* iRxChallenge; - TBuf8 iOutgoingChallResp;//response to the previously issued challenge - //16 nonce, 16 digest resp, 20 UserID, 3*(tag+size) - TBuf8 iIncomingChallResp;//response received from previous challenge - TBuf8 iIncomingRequestDigest; - HBufC* iRemoteUID; //UID of remote device - HBufC* iRemoteRealm;//Realm of remote device - CObexAuthenticator* iAuthEngine; - TBool iChallenge; //to challenge or not to challenge? - TBool iUserIDRequested; //does the challenge insist that a UserID is returned - TBool iReserved; //released boolean now available for future use - TOperation iCurrentOperation; - CObexNotifyHandlerBase* iNotifyHandler; - TUint iSuppressedObexAuthElements; - }; - -#endif // __OBEXBASE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexbaseobject.h --- a/epoc32/include/obexbaseobject.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXBASEOBJECT_H -#define __OBEXBASEOBJECT_H - -#include -#include - -const TUint32 KConnIDInvalid = 0xffffffff; - -/** -Objects of this class are used to describe the objects to be transferred and -those received via Obex. -Consists of a number of attributes describing the object, along with -methods to set them. CObexBaseObject is an abstract base class, which defines -attribute setting and transferring functionality, but does not specify the -storage mechanism for the data part (called the object body) of the object. -This body part is defined in derived classes. - -Object description attributes are tracked for validity automatically, so -that only valid attributes are sent to the remote machine. Also has the -concept of "header masks". This selects which of the various attributes -will actually be sent out/read in when the object is used in an operation -with the remote machine. Objects default to transferring all valid -attributes, use the header mask if restriction is required on the headers -exchanged. - -See the various derived classes for description of object body -representation. - -The common attributes are defined to be as close to the underlying OBEX -headers as usefully possible, hence any OBEX header specified as a Unicode -string (e.g. Name) translate to TDes (variant) EPOC descriptors, "byte -sequences" (e.g. Type) are TDes8 (or ASCII invariant), and byte and 32 bit -integers (e.g. Length) are TUint32s. - -This class is not designed for user derivation (ie. outside of this dll). - -@see CObexHeader -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexBaseObject) : public CBase - { -// required for access to iValidHeaders in CObexServer::CheckForConnectionID -friend class CObexServer; - -public: - virtual ~CObexBaseObject(); - IMPORT_C void SetHeaderMask(const TObexHeaderMask aHeaderMask); - IMPORT_C void SetNameL(const TDesC& aDesc); - IMPORT_C void SetTypeL(const TDesC8& aDesc); - IMPORT_C void SetLengthL(const TUint32 aLength); - IMPORT_C void SetTimeL(const TTime aLocalTime); - IMPORT_C void SetDescriptionL(const TDesC& aDesc); - IMPORT_C void SetTargetL(const TDesC8& aDesc); - IMPORT_C void AddHttpL(const TDesC8& aDesc); - IMPORT_C void SetAppParamL(const TDesC8& aDesc); - - IMPORT_C void AddHeaderL(CObexHeader& aHeader); - IMPORT_C TInt BytesSent(); - IMPORT_C TInt BytesReceived(); - IMPORT_C TObexHeaderMask HeaderMask(); - IMPORT_C TObexHeaderMask ValidHeaders(); - IMPORT_C const TDesC& Name(); - IMPORT_C const TDesC8& Type(); - IMPORT_C TUint32 Length(); - IMPORT_C const TTime Time(); - IMPORT_C const TDesC& Description(); - IMPORT_C const TDesC8& Target(); - IMPORT_C const RPointerArray* Http() const; - IMPORT_C const TDesC8& AppParam() const; - IMPORT_C void Reset(); - IMPORT_C const CObexHeaderSet& HeaderSet() const; - IMPORT_C CObexHeaderSet& HeaderSet(); - - // Public unexported functions used by CObexServer, CObexClient, etc - enum TProgress { EContinue,EComplete,EError,ELastPacket }; - TInt InitSend(TObexOpcode aOpcode); - TProgress PrepareNextSendPacket(CObexPacket& aPacket); - TInt InitReceive(); - TProgress ParseNextReceivePacket(CObexPacket& aPacket); - void PrepareConnectionHeader( CObexPacket& aPacket ); - void SetConnectionIdL(TUint32 aFourByte); - TUint32 ConnectionID(); - TObexResponse GetLastError() const; - -protected: - CObexBaseObject(); - void GuessTypeFromExtL(const TDesC& aExt); - void ResetHeaders(); - // Pure virtuals that all derived objects must implement - virtual void GetData(TInt aPos, TDes8& aDes) =0; - virtual void NewData(TInt aPos, TDes8& aDes) =0; - virtual TInt DataSize() =0; - virtual void ResetData() =0; - void CreateHeaderStorageDataL(); - void SetTimeHeaderL(const TDesC8& aTimeDes); - void SetUtcTimeL(const TTime aUtcTime); - -// Data -private: - TObexHeaderMask iHeaderMask; - TObexHeaderMask iValidHeaders; - - mutable RPointerArray* iHttp; - - CObexHeaderSet* iHeaderSet; - - TProgress iSendProgress; - TProgress iRecvProgress; - TObexOpcode iSendOpcode; - - // This data item is used to store a CObexHeader which is used as a temporary - // store when finding headers - CObexHeader* iObexHeader; - - TObexHeaderMask iSendHeaders; - TInt iSendBytes; - TInt iRecvBytes; - - TObexResponse iLastError; - - }; - -#endif // __OBEXBASEOBJECT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexbttransportinfo.h --- a/epoc32/include/obexbttransportinfo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __OBEXBTTRANSPORTINFO_H__ -#define __OBEXBTTRANSPORTINFO_H__ - -#include -#include - -/** -Concrete transport info type for use when using RFCOMM transport controller. -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexBtTransportInfo) : public TObexTransportInfo - { -public: - /** - The BT device address of the remote party. - */ - TBTSockAddr iAddr; - }; - -#endif // __OBEXBTTRANSPORTINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexclient.h --- a/epoc32/include/obexclient.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXCLIENT_H -#define __OBEXCLIENT_H - -#include -#include -#include - -class CObexPacket; -class MObexFinalPacketObserver; -class CObexPacketSignaller; -class CObexPacketTimer; -class CObexErrorEngine; - -/** -Client side functionality. Connection based. -Supports ... -- Opening IrDA TTP sockets for the OBEX session. -- Opening an OBEX session over a connected socket -- Standard OBEX (spec. version 1.2) operations. - -This class is not designed for user derivation. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexClient) : public CObex - { -public: - IMPORT_C ~CObexClient(); - IMPORT_C static CObexClient* NewL(TObexProtocolInfo& aObexProtocolInfoPtr); - IMPORT_C static CObexClient* NewL(TObexProtocolInfo& aObexProtocolInfoPtr, TObexProtocolPolicy& aObexProtocolPolicy); - IMPORT_C static CObexClient* NewL(TObexTransportInfo& aObexTransportInfo); - IMPORT_C void Connect(TRequestStatus& aStatus); - IMPORT_C void Connect(CObexBaseObject& aObject, TRequestStatus& aStatus); - IMPORT_C void ConnectL(CObexBaseObject& aObject, const TDesC& aPassword, - TRequestStatus& aStatus); - IMPORT_C void ConnectL(const TDesC& aPassword, TRequestStatus& aStatus); - IMPORT_C void Disconnect(TRequestStatus& aStatus); - IMPORT_C void Put(CObexBaseObject& aObject, TRequestStatus& aStatus); - IMPORT_C void Get(CObexBaseObject& aObject, TRequestStatus& aStatus); - IMPORT_C void SetPath(TSetPathInfo& aPathInfo, TRequestStatus& aStatus); - IMPORT_C void Abort(); - IMPORT_C void UserPasswordL( const TDesC& aPassword); - IMPORT_C const CObexHeaderSet& GetPutFinalResponseHeaders(); - IMPORT_C void SetFinalPacketObserver(MObexFinalPacketObserver* aObserver); - IMPORT_C TObexResponse LastServerResponseCode() const; - IMPORT_C void SetCommandTimeOut(TTimeIntervalMicroSeconds32 aTimeOut); - IMPORT_C TAny* ExtensionInterface(TUid aUid); - -public: // Called from CObexNotifyExtendClient - void SignalPacketProcessEvent(TObexPacketProcessEvent aEvent); - void TimeOutCompletion(); - -private: - CObexClient(); - void ConstructL(TObexTransportInfo& aObexTransportInfo); - TBool AlreadyActive(TRequestStatus& aStatus); - void ClientCommandL(TOperation aOp, TAny* aParam, TRequestStatus& aStatus); - // Implementation of CObex Events - virtual void OnPacketReceive(CObexPacket& aPacket); - virtual void OnError(TInt aError); - virtual void OnTransportUp(); - virtual void OnTransportDown(); - void SetRequest(TRequestStatus& aStatus, TOperation aOperation); - void CompleteRequest(const TInt aCompletion); - TInt PrepareConnectPacket(CObexPacket& aPacket); // Should be members of TConnectInfo - TInt ParseConnectPacket(CObexPacket& aPacket); - void ResetConnectionID(); - void SetConnectionID(TUint32 aConnectionID); - void EmptyHeaderSet(); - void SendRequestPacket(); - void SendRequestPacket(TObexOpcode aObexOpcode); - -private: - TRequestStatus* iPendingRequest; - CObexBaseObject* iCurrentObject; - TUint32 iConnectionID; - TBool iConnectionIdSet; - CObexHeaderSet* iHeaderSet; - CObexHeader* iHeader; - CObexPacketSignaller* iPacketProcessSignaller; - TObexResponse iLastReceivedResponseOpcode; - CObexErrorEngine* iErrorEngine; - TBool iIsLastErrorSet; - TTimeIntervalMicroSeconds32 iCmdTimeOutDuration; - CObexPacketTimer* iPacketTimer; - }; - -#endif // __OBEXCLIENT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexconstants.h --- a/epoc32/include/obexconstants.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,689 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXCONSTANTS_H -#define __OBEXCONSTANTS_H - -#include -#include -#include -#include -#include - -//common to request & resp digests - -/** @internalComponent */ -const TInt KChallResponseSize = 58; -/** @internalComponent */ -const TInt KMinChallResponseSize = 18; //Nonce(16) + tag(1) + size(1) -/** @internalComponent */ -const TInt KObexNonceSize = 16; -/** @internalComponent */ -const TUint8 KObexRequireUID = 0x01; - -//request or chall -/** @internalComponent */ -const TUint KObexChallNonceTag = 0; -/** @internalComponent */ -const TUint8 KObexChallOptionsTag = 0x01; -/** @internalComponent */ -const TUint8 KObexChallRealmTag = 0x02; -/** @internalComponent */ -const TInt KObexChallOptionSize = 1; //this can't be changed from one without making -/** @internalComponent */ -const TUint KObexChallHeaderSize = 23; //assuming no Realm data - -//response -/** @internalComponent */ -const TUint KObexRespTag = 0; -/** @internalComponent */ -const TInt KObexRespSize = 16; -/** @internalComponent */ -const TUint8 KObexRespUserIDTag = 0x01; -/** @internalComponent */ -const TUint8 KObexRespNonceTag = 0x02; - -/** @internalComponent */ -const TUint8 KObexHeaderTypeMask = 0xc0; -/** @internalComponent */ -const TUint8 KObexHeaderTypeOffset = 6; - -#ifdef _UNICODE -/** @internalComponent */ -const TInt KUidOBEXTransportModule = 0x10003d56; -#else -/** @internalComponent */ -const TInt KUidOBEXTransportModule = 0x1000169c; -#endif - -/** @internalComponent */ -const TInt KUsbIntStringDescLength = 30; - -/** @internalComponent */ -const TUint8 KFourByteTimeHeaderAddress = 0xc4; - -// Header mask definitions. -// Old style accessor for which headers are present or -// should be sent by an object. Now deprecated, use the -// header iterator instead. -/** @internalComponent */ -const TUint16 KObexHdrName = 0x0001; -/** @internalComponent */ -const TUint16 KObexHdrType = 0x0002; -/** @internalComponent */ -const TUint16 KObexHdrLength = 0x0004; -/** @internalComponent */ -const TUint16 KObexHdrTime = 0x0008; -/** @internalComponent */ -const TUint16 KObexHdrDescription = 0x0010; -/** @internalComponent */ -const TUint16 KObexHdrTarget = 0x0020; -/** @internalComponent */ -const TUint16 KObexHdrConnectionID = 0x0040; -/** @internalComponent */ -const TUint16 KObexHdrBody = 0x0080; -/** @internalComponent */ -const TUint16 KObexHdrEndOfBody = 0x0100; -/** @internalComponent */ -const TUint16 KObexHdrHttp = 0x0200; -/** @internalComponent */ -const TUint16 KObexHdrAppParam = 0x0400; -/** @internalComponent */ -const TUint16 KObexHdrUserDefined = 0x0800; -/** @internalComponent */ -const TUint16 KObexHdrCount = 0x1000; -/** @internalComponent */ -const TUint16 KObexHdrCreatorID = 0x2000; -/** @internalComponent */ -const TUint16 KObexHdrWanUUID = 0x4000; -/** @internalComponent */ -const TUint16 KObexHdrObjectClass = 0x8000; - -/** @internalComponent */ -const TUint8 KObexUserDefinedHdrAddrMin = 0x30; //start of user defined header address range -/** @internalComponent */ -const TUint8 KObexUserDefinedHdrAddrMax = 0x3F; //end of user defined header address range - -/** @internalComponent */ -const TUint8 KObexVersion = 0x10; ///< Version 1.0 (still correct for Obex spec v 1.2) - -/** @internalComponent */ -const TUint8 KObexObjectFieldSize = 127; -/** @internalComponent */ -const TUint8 KObexObjectDescriptionSize = 255; - -// Extended errors for IrObex - -/** Must not use as not in the allocated range */ -const TInt KErrIrObexRespBase = - 5500; - -/** Extended error for IrObex - No other infrared device found */ -const TInt KErrIrObexClientNoDevicesFound = -5501; - -/** Extended error for IrObex - Other IR device cannot handle IrObex */ -const TInt KErrIrObexClientPeerDoesNotHaveObex = -5502; - -/** Extended error for IrObex - Other IR device aborted the transfer */ -const TInt KErrIrObexClientPutPeerAborted = -5503; - -/** Extended error for IrObex - Peer device aborted data transmission/obex sending */ -const TInt KErrIrObexServerPutPeerAborted = -5507; - -/** Extended error for IrObex - Cannot authorise the challenge so link dropped */ -const TInt KErrIrObexConnectChallRejected = -5512; - -// Other Obex errors defined in the system but no longer used -// Do not reuse the number! -// KErrIrObexClientPutPeerCannotHandleObject -5504 -// KErrIrObexServerPutFileWriteError -5509 -// KErrIrObexClientFirstPutFailed -5510 -// KErrIrObexClientSubsequentPutFailed -5511 - -/** Unexpected event for the given state */ -const TInt KErrIrObexBadEvent = -5513; - -/** Event occurred while Server is stopped */ -const TInt KErrIrObexServerStopped = -5514; - -/** Packet received while state machine is in a wait state */ -const TInt KErrIrObexPacketDuringWait = -5515; - -// There are other error codes defined at the end of this file, -// which are a direct mapping of specific Obex error codes and -// are returned by the client. - - -// Flags used by Connect -// ...None in OBEX 1.0 - -// Flags used by SetPath -/** @internalComponent */ -const TUint8 KObexSetPathParent = 0x01; - -/** -Version number for TObexTransportInfo and derived classes. -When iVersion is set to this value the following fields of TObexTransportInfo -must be set: -iTransportName, -iReceiveMtu -iTransmitMtu -The iVersion member variable must be set to this value. If in future any of the -iFuture variables are used a new version constant will be created. - -@see TObexTransportInfo -@publishedAll -@released -*/ -const TInt KObexTransportInfoVersion0 = 0; - -/** -Default for the receive and transmit MTU sizes -Use this default value for setting the iReceiveMtu or iTransmitMtu in TObexTransportInfo -objects or derived classes. - -@see TObexTransportInfo -@publishedAll -@released -*/ -const TInt KObexDefaultMtuSize = 4000; - -/** -Default value for the number of discovery slots to use. Use this value as a default -for iDiscoverySlots in TObexIrdaV2TransportInfo. - -@see TObexIrdaV2TransportInfo -@publishedAll -@released -*/ -const TUint KObexIrdaDefaultDiscoverySlotsToUse = 1; - -/** -Default value for the number of discovery attempts made. Use this value as a default for iDiscoveryAttempts -in TObexIrdaV2TransportInfo. -@see TObexIrdaV2TransportInfo -@publishedAll -@released -*/ -const TUint KObexIrdaDefaultDiscoveryAttempts = 4; - -// Constants used to define which transport Obex will run over. -// Used in TObexTransportInfo and TObexProtocolInfo's iTransport member. - -/** -Protocol string when running over IrDA -@see TObexIrProtocolInfo -@see TObexTransportInfo -@publishedAll -@released -*/ -_LIT(KObexIrTTPProtocol, "IrTinyTP"); - -/** -Protocol string when running over IrDA -Using this version indicates that the configuration object contains discovery parameters. -@see TObexIrProtocolInfo -@publishedAll -@released -*/ -_LIT(KObexIrTTPProtocolV2, "IrTinyTP-V2"); - -/** -Protocol string when running over IrDA -Using this version indicates that the configuration object contains the device nickname. -@see TObexIrProtocolInfo -@publishedAll - -@capability WriteDeviceData If the TObexIrV3TransportInfo is passed as the argument - to CObexServer::NewL or CObexClient::NewL and the associated - name is valid. -@released -*/ -_LIT(KObexIrTTPProtocolV3, "IrTinyTP-V3"); - -/** -Protocol string when running over Bluetooth -@see TObexBluetoothProtocolInfo -@see TObexTransportInfo -@publishedAll -@released -*/ -_LIT(KObexRfcommProtocol, "RFCOMM"); - -/** -Protocol string when running over USB -@see TObexUsbProtocolInfo -@see TObexTransportInfo -@publishedAll -@released -*/ -_LIT(KObexUsbProtocol, "USB"); - -/** -Place holder for... -protocol string that should be used -if a Win32 emulator USB transport were -to be created for testing. -@see TObexUsbProtocolInfo -@see TObexTransportInfo -@publishedAll -@released -*/ -_LIT(KObexWin32UsbProtocol, "Win32Usb"); - -/** -Protocol string when running over USB using client driver extensions -@see TObexUsbProtocolInfoV2 -@see TObexTransportInfo -@publishedAll -@released -*/ -_LIT(KObexUsbProtocolV2, "USB-V2"); - -/** -This class is derived for each underlying transport protocol OBEX -runs over. - -The iTransport member holds the unique name for the transport. For example for -infra-red (TinyTP) this is "IrTinyTP" or KObexIrTTPProtocol. - -@see TObexIrProtocolInfo for running over TinyTP -@see TObexBluetoothProtocolInfo for running over Rfcomm -@see TObexUsbProtocolInfo for running over USB -@see TObexUsbProtocolInfoV2 for running over USB using client driver extensions - -@see KObexIrTTPProtocol -@see KObexIrTTPProtocolV2 -@see KObexRfcommProtocol -@see KObexUsbProtocol -@see KObexUsbProtocolV2 - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexProtocolInfo) - { -public: - /** Holds the unique name for the transport. */ - TBuf<60> iTransport; -private: - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - -/** -Used to describe IrDA specific protocol information - -To access the default OBEX server, the IAS class value should be "OBEX" -and the IAS attribute name "IrDA:TinyTP:LsapSel". - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexIrProtocolInfo) : public TObexProtocolInfo - { -public: - /** IrDA address information for this connection, as used in the IrDA sockets interface. - Refer to the SDK for more information about this. - Its main use is for setting the port that the local machine will listen on. */ - TIrdaSockAddr iAddr; - /** The IAS class value that the OBEX session will register its listener port, - or request remote port with. */ - TBuf8 iClassName; - /** The IAS attribute value that the OBEX session will register its listener port, - or request remote port with. */ - TBuf8 iAttributeName; - /** The number of discovery slots to use. */ - TUint8 iDiscoverySlots; - /** The number of discovery attempts to make. */ - TUint8 iDiscoveryAttempts; - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // None of these padding variables have been zero'd because they are currently not used - TUint16 iPadding1; - TUint32 iPadding2; - TUint32 iPadding3; - TUint32 iPadding4; - }; - -/** -Used to describe Bluetooth specific protocol information - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexBluetoothProtocolInfo) : public TObexProtocolInfo - { -public: - /** - For OBEX servers: - This defines the server channel on which the OBEX server listens - for connections. The server channel is set using SetPort on the - TRfcommSockAddr. - Note: - 1) Unless the channel is defined as KRfcommPassiveAutoBind - it may be in use when the obex server attempts to 'bind' to it - 2) If the channel is defined as KRfcommPassiveAutoBind - then when the server is FIRST started it will attempt - to find a free RFComm channel. If this is successful - that free channel will be used as the server channel - for the life time of the obex server including - when it is 'stopped' and re-'started'. - 3) When the obex server is stopped, and very - briefly when a bluetooth connection comes down, the - obex server releases its server channel. It is possible - therefore that during this time another application might bind - to it. This will cause an error when the obex server tries - to re-bind. - - Also note that a Bluetooth OBEX server will itself set the Object Transfer - bit in the Service Class as required by the Generic Object Exchange - Profile so the user need not do this. - @see CObexServer - - For OBEX clients: - This defines the server channel and the - device address to connect to. The server channel - and device address are set respectively using SetPort - and SetBTAddr on the TRfcommSockAddr. - */ - TRfcommSockAddr iAddr; - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - -/** -Used to describe USB specific protocol information - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexUsbProtocolInfo) : public TObexProtocolInfo - { -public: - /** Provides a string to be attached to the Obex function's Communication Class interface, - which may be used to identify the Obex service. */ - TBuf16 iInterfaceStringDescriptor; - }; - -/** -Used to set options used by the extended USB client driver for improved performance - -@see TObexUsbProtocolInfo -@see RDevUsbcClient -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexUsbProtocolInfoV2) : public TObexUsbProtocolInfo - { -public: - /** Bitmap containing the bandwidth priorities to use on IN and OUT endpoints - @see TUsbcBandwidthPriority - */ - TInt iBandwidthPriority; - /** Specifies whether to use DMA on the bulk OUT endpoint */ - TBool iDmaOnOutEndpoint; - /** Specifies whether to use DMA on the bulk IN endpoint */ - TBool iDmaOnInEndpoint; - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // None of these padding variables have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - TUint32 iPadding3; - TUint32 iPadding4; - }; - -/** -Contains information about OBEX packet sizing policy, defining the -maximum buffer size for receive and transmit packets -*/ -NONSHARABLE_CLASS(TObexProtocolPolicy) - { -public: - IMPORT_C TObexProtocolPolicy (); // Sets version and default values - - IMPORT_C TInt SetReceiveMtu ( TUint16 aReceiveMtu ); - IMPORT_C TInt SetTransmitMtu ( TUint16 aTransmitMtu ); - IMPORT_C TUint16 Version () const; - IMPORT_C TUint16 ReceiveMtu () const; - IMPORT_C TUint16 TransmitMtu () const; - -private: - TUint16 iVersion; - TUint16 iReceiveMtu; - TUint16 iTransmitMtu; - - // This data padding has been added to help prevent future binary compatibility breaks - // None of these padding variables have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - TUint32 iPadding3; - TUint32 iPadding4; - }; - -struct TObexConnectionInfo; - -/** -TObexConnectInfo -This structure contains information used during OBEX connection. iVersion -holds the encoded OBEX version of the machine, use @c VersionMajor() and -@c VersionMinor() to extract the parts of the version number (each having a -value from 0 to 15). @c iFlags holds OBEX connection flags. @c iWho holds -the Who attribute from the connect packet, if any was specified, or -otherwise has a length of 0. -It is recommended that this class is only ever allocated on the heap as it is quite big. -*/ -NONSHARABLE_CLASS(TObexConnectInfo) - { -public: - IMPORT_C TObexConnectInfo(); - IMPORT_C TUint8 VersionMajor() const; - IMPORT_C TUint8 VersionMinor() const; -public: - TUint8 iVersion; /** Encoded OBEX version of the machine*/ - TUint8 iFlags; /** iFlags holds OBEX connection flags*/ - TBuf8 iWho; /** the Who attribute from the connect packet, if any was specified */ - TBuf8 iTargetHeader; /** the Target header from the connect packet, if any was specified */ - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - - - -//if these codes are extended due to a IRObex spec update ensure -//that the TInt immediately below are updated -//and the default in the method IrOBEXUtil::ObexResponse is also updated -enum TObexResponse - { -/** Response is "Continue" */ - ERespContinue = 0x10, - -/** Response is "Success" */ - ERespSuccess = 0x20, - -/** Response is "Created" */ - ERespCreated = 0x21, - -/** Response is "Accepted" */ - ERespAccepted = 0x22, - -/** Response is "Non-Authenticated Information" */ - ERespNonAuthInfo = 0x23, - -/** Response is "No Content" */ - ERespNoContent = 0x24, - -/** Response is "Reset Content" */ - ERespResetContent = 0x25, - -/** Response is "Partial Content" */ - ERespPartialContent = 0x26, - -/** Response is "Multiple Choices" */ - ERespMultipleChoices = 0x30, - -/** Response is "Moved Permanently" */ - ERespMovedPerm = 0x31, - -/** Response is "Moved Temporarily" */ - ERespMovedTemp = 0x32, - -/** Response is "See Other" */ - ERespSeeOther = 0x33, - -/** Response is "Not Modified" */ - ERespNotModified = 0x34, - -/** Response is "Use Proxy" */ - ERespUseProxy = 0x35, - -/** Response is "Bad Request" */ - ERespBadRequest = 0x40, - -/** Response is "Unauthorized" */ - ERespUnauthorized = 0x41, - -/** Response is "Payment Required" */ - ERespPaymentRequired = 0x42, - -/** Response is "Forbidden" */ - ERespForbidden = 0x43, - -/** Response is "Not Found" */ - ERespNotFound = 0x44, - -/** Response is "Method Not Allowed" */ - ERespMethodNotAllowed = 0x45, - -/** Response is "Not Acceptable" */ - ERespNotAcceptable = 0x46, - -/** Response is "Proxy Authentication is Required" */ - ERespProxyAuthenReqd = 0x47, - -/** Response is "Timed Out" */ - ERespTimedOut = 0x48, - -/** Response is "Conflict" */ - ERespConflict = 0x49, - -/** Response is "Gone" */ - ERespGone = 0x4A, - -/** Response is "Length Required" */ - ERespLengthReqd = 0x4B, - -/** Response is "Precondition Failed" */ - ERespPreCondFailed = 0x4C, - -/** Response is "Required Entity is Too Large" */ - ERespReqEntityTooLarge = 0x4D, - -/** Response is "Required URL is Too Large" */ - ERespReqURLTooLarge = 0x4E, - -/** Response is "Unsupported Media Type" */ - ERespUnsupMediaType = 0x4F, - -/** Response is "Internal Error" */ - ERespInternalError = 0x50, - -/** Response is "Not Implemented" */ - ERespNotImplemented = 0x51, - -/** Response is "Bad Gateway" */ - ERespBadGateway = 0x52, - -/** Response is "Service Unavailable" */ - ERespServiceUnavail = 0x53, - -/** Response is "Gateway Timeout" */ - ERespGatewayTimeout = 0x54, - -/** Response is "HTTP Version is Not Supported" */ - ERespHTTPVerNotSupp = 0x55, - -/** Response is "Database is Full" */ - ERespDatabaseFull = 0x60, - -/** Response is "Database is Locked" */ - ERespDatabaseLocked = 0x61, - -/** Response is "Service is Unavailable" */ - ERespServiceUnavailable = 0xD3, - }; - - -//some error codes to be used specifically by the client -//these shall, be mapped directly to OBEX defined error codes. -const TInt KErrIrObexRespSuccess = KErrIrObexRespBase - ERespSuccess; //-5532 returns 0x20 (0xA0) -const TInt KErrIrObexRespCreated = KErrIrObexRespBase - ERespCreated; //-5533 returns 0x21 (0xA1) -const TInt KErrIrObexRespAccepted = KErrIrObexRespBase - ERespAccepted; //-5534 returns 0x22 (0xA2) -const TInt KErrIrObexRespNonAuthInfo = KErrIrObexRespBase - ERespNonAuthInfo; //-5535 returns 0x23 (0xA3) -const TInt KErrIrObexRespNoContent = KErrIrObexRespBase - ERespNoContent; //-5536 returns 0x24 (0xA4) -const TInt KErrIrObexRespResetContent = KErrIrObexRespBase - ERespResetContent; //-5537 returns 0x25 (0xA5) -const TInt KErrIrObexRespPartialContent = KErrIrObexRespBase - ERespPartialContent; //-5538 returns 0x26 (0xA6) -const TInt KErrIrObexRespMultipleChoices = KErrIrObexRespBase - ERespMultipleChoices; //-5548 returns 0x30 (0xB0) -const TInt KErrIrObexRespMovedPerm = KErrIrObexRespBase - ERespMovedPerm; //-5549 returns 0x31 (0xB1) -const TInt KErrIrObexRespMovedTemp = KErrIrObexRespBase - ERespMovedTemp; //-5550 returns 0x32 (0xB2) -const TInt KErrIrObexRespSeeOther = KErrIrObexRespBase - ERespSeeOther; //-5551 returns 0x33 (0xB3) -const TInt KErrIrObexRespNotModified = KErrIrObexRespBase - ERespNotModified; //-5552 returns 0x34 (0xB4) -const TInt KErrIrObexRespUseProxy = KErrIrObexRespBase - ERespUseProxy; //-5553 returns 0x35 (0xB5) -const TInt KErrIrObexRespBadRequest = KErrIrObexRespBase - ERespBadRequest; //-5564 returns 0x40 (0xC0) -const TInt KErrIrObexRespUnauthorized = KErrIrObexRespBase - ERespUnauthorized; //-5565 returns 0x41 (0xC1) -const TInt KErrIrObexRespPaymentRequired = KErrIrObexRespBase - ERespPaymentRequired; //-5566 returns 0x42 (0xC2) -const TInt KErrIrObexRespForbidden = KErrIrObexRespBase - ERespForbidden; //-5567 returns 0x43 (0xC3) -const TInt KErrIrObexRespNotFound = KErrIrObexRespBase - ERespNotFound; //-5568 returns 0x44 (0xC4) -const TInt KErrIrObexRespMethodNotAllowed = KErrIrObexRespBase - ERespMethodNotAllowed; //-5569 returns 0x45 (0xC5) -const TInt KErrIrObexRespNotAcceptable = KErrIrObexRespBase - ERespNotAcceptable; //-5570 returns 0x46 (0xC6) -const TInt KErrIrObexRespProxyAuthenReqd = KErrIrObexRespBase - ERespProxyAuthenReqd; //-5571 returns 0x47 (0xC7) -const TInt KErrIrObexRespTimedOut = KErrIrObexRespBase - ERespTimedOut; //-5572 returns 0x48 (0xC8) -const TInt KErrIrObexRespConflict = KErrIrObexRespBase - ERespConflict; //-5573 returns 0x49 (0xC9) -const TInt KErrIrObexRespGone = KErrIrObexRespBase - ERespGone; //-5574 returns 0x4A (0xCA) -const TInt KErrIrObexRespLengthReqd = KErrIrObexRespBase - ERespLengthReqd; //-5575 returns 0x4B (0xCB) -const TInt KErrIrObexRespPreCondFailed = KErrIrObexRespBase - ERespPreCondFailed; //-5576 returns 0x4C (0xCC) -const TInt KErrIrObexRespReqEntityTooLarge = KErrIrObexRespBase - ERespReqEntityTooLarge;//-5577 returns 0x4D (0xCD) -const TInt KErrIrObexRespReqURLTooLarge = KErrIrObexRespBase - ERespReqURLTooLarge; //-5578 returns 0x4E (0xCE) -const TInt KErrIrObexRespUnsupMediaType = KErrIrObexRespBase - ERespUnsupMediaType; //-5579 returns 0x4F (0xCF) -const TInt KErrIrObexRespInternalError = KErrIrObexRespBase - ERespInternalError; //-5580 returns 0x50 (0xD0) -const TInt KErrIrObexRespNotImplemented = KErrIrObexRespBase - ERespNotImplemented; //-5581 returns 0x51 (0xD1) -const TInt KErrIrObexRespBadGateway = KErrIrObexRespBase - ERespBadGateway; //-5582 returns 0x52 (0xD2) -const TInt KErrIrObexRespServiceUnavail = KErrIrObexRespBase - ERespServiceUnavail; //-5583 returns 0x53 (0xD3) -const TInt KErrIrObexRespGatewayTimeout = KErrIrObexRespBase - ERespGatewayTimeout; //-5584 returns 0x54 (0xD4) -const TInt KErrIrObexRespHTTPVerNotSupp = KErrIrObexRespBase - ERespHTTPVerNotSupp; //-5585 returns 0x55 (0xD5) -const TInt KErrIrObexRespDatabaseFull = KErrIrObexRespBase - ERespDatabaseFull; //-5596 returns 0x60 (0xE0) -const TInt KErrIrObexRespDatabaseLocked = KErrIrObexRespBase - ERespDatabaseLocked; //-5597 returns 0x61 (0xE1) - -#endif // __OBEXCONSTANTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexfinalpacketobserver.h --- a/epoc32/include/obexfinalpacketobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef OBEXFINALPACKETOBSERVER_H -#define OBEXFINALPACKETOBSERVER_H - -#include - -/** -This mixin class must be inherited by any class interested in final packet notifications. - -@publishedAll -@released -*/ - -class MObexFinalPacketObserver - { -public: - - /** Indicates start of final packet. - @publishedAll - @released - */ - virtual void MofpoFinalPacketStarted() {}; - - /** Indicates end of final packet. - @publishedAll - @released - */ - virtual void MofpoFinalPacketFinished() {}; - }; - -#endif // OBEXFINALPACKETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexheaderlist.h --- a/epoc32/include/obexheaderlist.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,155 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __OBEXHEADERLIST_H__ -#define __OBEXHEADERLIST_H__ - - - -#include -#include //CBase - -//forward declaration -class RReadStream; -class RWriteStream; -class CObexHeader; -class CObexBaseObject; -class CObexServerSendOperation; - - -class CMsvAttachment; - -const TUid KUidObexHeaders = {0x10204282}; - -class CObexHeaderList : public CBase -/** -Encapsulates and owns a list of CObexHeader objects. -Public users of this class can add CObexHeader objects - -@publishedAll -@released -*/ - { -public: - - /* - It provides functionalities for its friend classes to internalize and - externalize itself from a CMsvStore stream, and add all its contained - CObexHeader objects to a CObexBaseObject, as well as two general list - functions to return the number of objects it contained and a contained - object at a specified index into the list. - */ - friend class CObexServerSendOperation; // requires the use of 'AddHeadersToBaseObjectL' - - /** - * Factory function to return a new CObexHeaderList. - @return New CObexHeaderList object - */ - IMPORT_C static CObexHeaderList* NewL(); - - - /** - * Factory function to return a new CObexHeaderList and leave it on the - * cleanup stack. - @return New CObexHeaderList object - */ - IMPORT_C static CObexHeaderList* NewLC(); - - - /** - * Destructor which frees all allocated memory with the list. - */ - IMPORT_C ~CObexHeaderList(); - - /** - * Add a CObexHeader object to the list. The CObexHeader object added - * should have its attribute, header ID and header value set before - * it is added to the list. CObexHeaderlist will not change these - * values of its contained CObexHeader objects - * @param aHeader Pointer to a constant CObexHeader object - * - * @return KErrNone, if the operation is successful, otherwise - * one of the system wide error codes - */ - IMPORT_C TInt AddHeader(const CObexHeader* aHeader); - - IMPORT_C void ExportToAttachmentL(CMsvAttachment& aAttachment) const; - - IMPORT_C void ImportFromAttachmentL(CMsvAttachment& aAttachment); - - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream) const; - - IMPORT_C void InternalizeL(RReadStream& aReadStream); - -protected: - - - - /** - * Add all the CObexHeader objects contained in a list to a - * CObexBaseObject. - * - * - * @param aObexBaseObj CObexBaseObject to add the objects to - * - * @leave Error System wide error code - * - */ - IMPORT_C void AddHeadersToBaseObjectL(CObexBaseObject& aObexBaseObj); - - - //General list processing functions - - /** - * Return the number of CObexHeader object pointers contained in the list. - * - * - * @return The number of CObexHeader object pointers in the list - */ - IMPORT_C TInt Count() const; - - /** - * Get a non constant reference to the CObexHeader object pointer at - * position aPos into the list. - * - * - * @param aPos A list index specifying the CObexHeader object pointer to - * be returned - * - * @leave KErrArgument aPos is out of range - * @leave KErrNotFound The list is empty - * - * @return A non constant reference to the CObexHeader object - * pointer - */ - IMPORT_C CObexHeader*& ObexHeaderL(TInt aPos); - -private: - /** - * Leaving constructor function used in 2 phase construction in NewLC() - */ - void ConstructL(); - - /** - * Constructor function used in 2 phase construction in NewLC() - */ - CObexHeaderList(); - -private: - ///* iObexHeaders; - }; - -#endif // __OBEXHEADERLIST_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexheaders.h --- a/epoc32/include/obexheaders.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,241 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXHEADERS_H -#define __OBEXHEADERS_H - -#include - -/** -Encapsulates an Obex header. - -This class provides the ability to hold a header of any of the Obex -supported types as a native Symbian OS type. - -A header may also have one or more attributes set. These are used by -the object which owns the header collection so that it can keep track -of which headers should be sent (!(ESuppressed || EDeleted)), which have -been sent (ESent), and whether the header should be deleted (EDeleted). -Deletion is a special case---any operation on the Object which causes -a scan of the headers will trigger deletion of any marked headers. -This is required as they are owned by the Object, but can be accessed -seperately (including through the creator keeping a pointer to the -header). - -@see CObexBaseObject -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexHeader) : public CBase - { -public: - // Requires friendship with CObexBaseObject to support some aspects of the - // legacy API (specifically the HTTP accessor method). - friend class CObexBaseObject; - - enum THeaderType - { - EUnicode = 0x00, - EByteSeq = 0x01, - EByte = 0x02, - EFourByte = 0x03 - }; - - enum THeaderAttr - { - ESuppressed = 0x01, - ESent = 0x02, - EDeleted = 0x04, - }; - - IMPORT_C static CObexHeader* NewL(); - virtual ~CObexHeader(); - IMPORT_C CObexHeader* CopyL() const; - - //Sets this object to use the same underlying header as the parameter. - IMPORT_C void Set(CObexHeader* aHeader); - //Resets the contents of this header, discarding the underlying data. - IMPORT_C void Reset(); - - //Resets and destroys all header attributes. - IMPORT_C void ResetContents(); - - IMPORT_C void SetAttributes(TUint16 aAttr); - IMPORT_C TUint16 Attributes() const; - - IMPORT_C THeaderType Type() const; - - IMPORT_C TUint8 HI() const; - IMPORT_C TUint8 AsByte() const; - IMPORT_C TUint32 AsFourByte() const; - IMPORT_C const TDesC8& AsByteSeq() const; - IMPORT_C const TDesC16& AsUnicode() const; - - IMPORT_C void SetByte(const TUint8 aHI, const TUint8 aByte); - IMPORT_C void SetFourByte(const TUint8 aHI, const TUint32 aFourByte); - IMPORT_C void SetByteSeqL(const TUint8 aHI, const TDesC8& aByteSeq); - IMPORT_C void SetUnicodeL(const TUint8 aHI, const TDesC16& aUnicode); - - IMPORT_C TInt EncodedSize() const; - -private: - CObexHeader(); - CObexHeader(CObexUnderlyingHeader* aHeader); - void ConstructL(); - -private: - CObexUnderlyingHeader* iHeader; - }; - -/** -Used to allow the iterator to decide whether to present a header to -the user, by passing in a possible header HI value. Headers present -in the object will be presented to the Interested() function in the -object in which they are held (if received from a remote device -this will be the order in which they were received, otherwise this will -be the order in which they were set). -The function can implement any desired behaviour, including relying on -the order in which the headers are presented. - -In case any state is held, the object also provides a Reset() function. -Reset() provides a default empty implementation. - -Note: there is no destructor. - -@publishedAll -@released -*/ -class MObexHeaderCheck - { -public: - /** - Called to discover is the user is interested in the contents of - this header. - - @param aHI The identifier of the header, including type bits. - @return ETrue if the user is interested in the contents of this - header. - @publishedAll - @released - */ - IMPORT_C virtual TBool Interested(TUint8 aHI) =0; - - /** - Called in response to First() being called on the iterator object. - The default implementation does nothing---some implementations may - wish to reset state variables. - - @publishedAll - @released - */ - IMPORT_C virtual void Reset(); - - /** - Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. - @param aInterface UID of the interface to return - @param aObject the container for another interface as specified by aInterface - @internalComponent - */ - IMPORT_C virtual void MOHC_ExtensionInterfaceL(TUid aInterface, void*& aObject); - }; - -/** -A collection of headers. Includes code to filter based on the header HI -value, iterate through the set of interesting headers, and extract headers -with specific HI values. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexHeaderSet) : public CBase - { -public: - IMPORT_C static CObexHeaderSet* NewL(); - IMPORT_C CObexHeaderSet* CopyL(); - IMPORT_C CObexHeaderSet* CopyL(MObexHeaderCheck& aHeaderCheck); - ~CObexHeaderSet(); - - IMPORT_C TInt AddHeader(CObexHeader* aHeader); - IMPORT_C void DeleteCurrentHeader(); - - IMPORT_C void SetMask(MObexHeaderCheck* aMask); - IMPORT_C void DeleteMasked(); - - IMPORT_C void First() const; - IMPORT_C TInt This(CObexHeader* aHeader) const; - IMPORT_C TInt Next() const; - IMPORT_C TInt Next(TInt aSkip) const; - IMPORT_C TInt Count() const; - - IMPORT_C TInt Find(TUint8 aHI, CObexHeader& aHeader) const; - -private: - CObexHeaderSet(); - -private: - RPointerArray iHeaders; - mutable MObexHeaderCheck* iMask; - mutable TInt iPos; - }; - -/** -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexMatchHeader) : public MObexHeaderCheck - { -public: - virtual EXPORT_C TBool Interested(TUint8 aHI); - IMPORT_C void SetHeader(TUint8 aHI); - -private: - TUint8 iHI; - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - -/** -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexMatchHeaderType) : public MObexHeaderCheck -{ -public: - virtual EXPORT_C TBool Interested(TUint8 aHI); - IMPORT_C void SetType(CObexHeader::THeaderType aType); - -private: - TInt iType; - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - -#endif // __OBEXHEADERS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexirtransportinfo.h --- a/epoc32/include/obexirtransportinfo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __OBEXIRTRANSPORTINFO_H__ -#define __OBEXIRTRANSPORTINFO_H__ - -#include -#include - -/** -Concrete transport info type for use when using Irda ttp transport controller. -@see KObexIrTTPProtocol -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexIrTransportInfo) : public TObexTransportInfo - - { -//From TObexIrProtocolInfo -public: - /** IrDA address information for this connection, as used in the IrDA sockets interface. - Refer to the SDK for more information about this. - Its main use is for setting the port that the local machine will listen on. */ - TIrdaSockAddr iAddr; - /** The IAS class value that the OBEX session will register its listener port, - or request remote port with. */ - TBuf8 iClassName; - /** The IAS attribute value that the OBEX session will register its listener port, - or request remote port with. */ - TBuf8 iAttributeName; - }; - -/** -Concrete transport info type for use when using Irda ttp transport controller, with discovery extensions. -@see KObexIrTTPProtocolV2 -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexIrV2TransportInfo) : public TObexIrTransportInfo - - { -//From TObexIrProtocolInfo -public: - /** The number of discovery slots to use. */ - TUint8 iDiscoverySlots; - /** The number of discovery attempts to make. */ - TUint8 iDiscoveryAttempts; - -private: - // This data padding has been added to help prevent future binary compatibility breaks - // None of these padding variables have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - TUint32 iPadding3; - TUint32 iPadding4; - }; - - -/** -Concrete transport info type for use when using Irda ttp transport controller, with nickname extension. -@see KObexIrTTPProtocolV3 -@publishedAll - -@capability WriteDeviceData If the TObexIrV3TransportInfo is passed as the argument - to CObexServer::NewL or CObexClient::NewL and the associated - name is valid. - -@released -*/ -NONSHARABLE_CLASS(TObexIrV3TransportInfo) : public TObexIrV2TransportInfo - { -public: - /** The device nickname. The maximum length in the IrDA specification - is defined as 23 - (number of hint octets [2] + 1) = 20 - */ - TBuf<20> iLocalDeviceNickname; - - /** A flag indicating if the device nickname field is valid. This - allows Symbian to make further derivations of this interface without making - the device nickname mandatory */ - TBool iLocalDeviceNicknameValid; - }; - -#endif // __OBEXIRTRANSPORTINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexobjects.h --- a/epoc32/include/obexobjects.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,342 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXOBJECTS_H -#define __OBEXOBJECTS_H - -#include -#include -#include - -class MObexFileWriter; -class TObexBufferingDetails; - -/** -This class is a concrete derivation of the CObexBaseObject class. Use it to -store and transfer OBEX objects with the body part stored in an EPOC file. -Hence this class is particularly suited to OBEX "file" beaming applications -(c.f. arbitrary object beaming), although there is in reality no -restriction in what it is used to transfer. Access to the body is acheived -through an additional attribute to the object; the data file. This is the -file-system name of the file used to store the body of the object. Note -that there is no explicit relation between this and the Name of the object, -although it is expected that most applications would attempt to relate the -two. - -When ever a valid data file is set (i.e. DataFile().Length > 0), this file -is effectively open, hence stopping any other application from opening it -with exclusive rights. Therefore, it is recommended that Reset () be called -on the object as soon as it is no longer required, and definitely before -(conceptually) passing ownership of the data file to any other object or -user. - -CObexFileObject is also suited to situations where an object is expected to -be received, but no information about the purpose of this object is known. -This is due to CObexFileObject’s ability to create temporary files "on the -fly" to store received data into, when a specific file is not provided by -the application. - -This class is not designed for user derivation. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexFileObject) : public CObexBaseObject - { -public: - static IMPORT_C CObexFileObject* NewL(); - static IMPORT_C CObexFileObject* NewL(const TDesC &aDataFile); - virtual IMPORT_C ~CObexFileObject(); - IMPORT_C void InitFromFileL(const TDesC& aFile); - -private: - void ConstructL(const TDesC &aDataFile); - void SetDataFileL(const TDesC& aDesc); - const TDesC& DataFile(); - TBool RenameFile(const TDesC& aDesC); - void SetTempFilePath(const TDesC& aPath); - void QueryTempFilePath(TDes& aPath); - // From CObexBaseObject - virtual void GetData(TInt aPos, TDes8& aDes); - virtual void NewData(TInt aPos, TDes8& aDes); - virtual TInt DataSize(); - virtual void ResetData(); -// Data -private: - RFs iFs; - TParse iDataFile; - RFile iFile; - TBuf iTempFilePath; - }; - - - -/** -Use this class to hold objects where the body part is stored in a CBufFlat -object. Please note that although parameters are supplied as CBufBase objects, -non-CBufFlat parameters are not supported and will have unpredictable results. -At no point does the CObexBufObject create, or take ownership of any CBaseBuf -object it uses - it is always the responsibility of the creator/owner of the -CBaseBuf to free it when no longer required. - -As this class does not take ownership of the buffers it uses, it equally can -not create its own buffers ad-hoc for storing new data into. Hence at no -time is it valid for a CObexBufObject to exist with out it having a valid -data buffer set. If such a situation arises, where it is required that -received information should be discarded, consider using a CObexNullObject. - -It is also posible to supply a file instead of a memory buffer, or to supply -both. This functionality is due to the MObexServerNotify class expecting to -work only on CObexBufObjects, so CObexFileObjects cannot be returned from the -upcalls. -To use a file for body storage, call NewL() passing in a NULL pointer, then -call SetDataBufL() manually afterwards. There are three overloads---to allow -purely memory based objects, purely file based, or a hybrid. The hybrid object -buffers into a memory buffer (which is not allowed to grow), then writes data -to the file when the buffer is full. The buffering behaviour can therefore be -tuned to the application by setting the size of the buffer prior to use. - -This class is not designed for user derivation. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexBufObject) : public CObexBaseObject - { -public: - /** - Obex file buffering method. - - @publishedAll - @released - */ - enum TFileBuffering - { - /** Only the supplied buffer will be used to buffer file writes. */ - ESingleBuffering, - /** The object will create a second buffer and perform double buffering. */ - EDoubleBuffering - }; - -public: - static IMPORT_C CObexBufObject* NewL(CBufBase* aDataBuf); - virtual IMPORT_C ~CObexBufObject(); - IMPORT_C TInt WriteToFile(const TPtrC& aFileName); - - IMPORT_C void SetDataBufL(TObexBufferingDetails& aDetails); - IMPORT_C void SetDataBufL(CBufBase* aDataBuf); - IMPORT_C void SetDataBufL(const TPtrC& aFilename); - IMPORT_C void SetDataBufL(const TPtrC& aFilename, CBufBase* aDataBuf); - IMPORT_C void SetDataBufL(const TPtrC& aFilename, CBufBase& aDataBuf, const TFileBuffering aBufferingStrategy); - IMPORT_C CBufBase* DataBuf(); - HBufC* FileName(); - -private: - CObexBufObject(); - void ConstructL(CBufBase* aDataBuf); - - void PrepareToSetBufferL(); - - void CopyFileL(const TDesC& aFilename); - TInt NewFileData(TInt aPos, TDes8& aDes); - void GetFileData(TInt aPos, TDes8& aDes); - - // From CObexBaseObject - virtual void GetData(TInt aPos, TDes8& aDes); - virtual void NewData(TInt aPos, TDes8& aDes); - virtual TInt DataSize(); - virtual void ResetData(); - - void CloseDataFile(); - TInt OpenDataFile(const TDesC& aFilename); - void CloseFileServer(); - TInt OpenFileServer(); - TInt WriteBufferToFile(TBool aFinal); - -// Data -private: - CBufBase* iBuf; - HBufC* iFilename; - RFs* iFileServ; - RFile* iFile; - TInt iBufOffset; - TInt iBuffered; - TInt iBufSegSize; - -// Added for double-buffering -private: - // Owned - MObexFileWriter* iWriter; - CBufBase* iDoubleBuf; - }; - - - -/** -Wraps parameters which can affect the buffering method used by the -CObexBufObject. -This version provides a single memory buffer which holds the entire object. -Subclasses will always use a memory buffer, but can override the way that -Obex uses it. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexBufferingDetails) - { -public: - /** - Versions (subclasses) of the buffering style object. - @internalComponent - */ - enum TVersion - { - EBasicBuffer, - EPureFile, - EFilenameBackedBuffer, - ERFileBackedBuffer, - ELastVersion - }; - - IMPORT_C TObexBufferingDetails(CBufBase& aBuffer); - - TVersion Version(); // Return the version of this object - CBufBase* Buffer(); - -protected: - TObexBufferingDetails(TVersion aVersion, CBufBase* aBuffer); - -private: - TVersion iVersion; - CBufBase* iBuffer; - - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - - -/** -Provides alternate behaviour for a CObexBufObject, allowing use of a file -to hold the object in its entirety. No memory buffer is used. This is a -special case option provided to cater for the MObexServerNotify interface -which requires the use of CObexBufObject objects. It is generally better to -use a buffered variant. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexPureFileBuffer) : public TObexBufferingDetails - { -public: - IMPORT_C TObexPureFileBuffer(const TPtrC& aFilename); - const TPtrC& Filename(); - -private: - const TPtrC& iFilename; - - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - -/** -Provides alternate behaviour for a CObexBufObject, allowing use of a file -to hold the object in its entirety. Writes to this object are buffered through -the supplied CBufBase derived object, which is never enlarged. Once -it is full, the data is flushed to the file. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexFilenameBackedBuffer) : public TObexBufferingDetails - { -public: - IMPORT_C TObexFilenameBackedBuffer(CBufBase& aBuffer, const TPtrC& aFilename, CObexBufObject::TFileBuffering aBufferingStrategy); - const TPtrC& Filename(); - CObexBufObject::TFileBuffering Strategy(); - -private: - const TPtrC& iFilename; - CObexBufObject::TFileBuffering iBufferingStrategy; - - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - - - -/** -Provides alternate behaviour for a CObexBufObject, allowing use of a file -to hold the object in its entirety. Writes to this object are buffered through -the supplied CBufBase derived object, which is never enlarged. Once -it is full, the data is flushed to the file. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexRFileBackedBuffer) : public TObexBufferingDetails - { -public: - IMPORT_C TObexRFileBackedBuffer(CBufBase& aBuffer, RFile aFile, CObexBufObject::TFileBuffering aBufferingStrategy); - RFile File(); - CObexBufObject::TFileBuffering Strategy(); - -private: - RFile iFile; - CObexBufObject::TFileBuffering iBufferingStrategy; - - // This data padding has been added to help prevent future binary compatibility breaks - // Neither iPadding1 nor iPadding2 have been zero'd because they are currently not used - TUint32 iPadding1; - TUint32 iPadding2; - }; - - - -/** -Concrete OBEX object with NULL data representation. Use when only the -headers of an object are required, and the data (if any) can safely be -discarded. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexNullObject) : public CObexBaseObject - { -public: - IMPORT_C static CObexNullObject* NewL (); -private: - // From CObexBaseObject - void ConstructL(); - virtual void GetData (TInt aPos, TDes8& aDes); - virtual void NewData (TInt aPos, TDes8& aDes); - virtual TInt DataSize (); - virtual void ResetData (); - }; - -#endif // __OBEXOBJECTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexpanics.h --- a/epoc32/include/obexpanics.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,157 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef OBEX_PANICS_H -#define OBEX_PANICS_H - -/** -@file -@publishedAll -@released - -This file contains details of all OBEX and OBEX Transport panics which may be raised -as a result programming error by the users of OBEX (e.g. Client or Server Application -or a proprietry transport controller). - -Internal panic codes should not be raised due to user errors but would reflect -internal Obex programming errors - see inc/obexfaults.h -*/ - - -/** -Category for Obex panics -@see TObexPanicCode -*/ -_LIT(KObexPanicCategory, "Obex"); - -/** -@publishedAll -@released - -All Obex panics which may be raised as a result of a client (i.e. external) programming error. -Internal Obex panics are errors listed in TObexFaultCode -@see TObexFaultCode -*/ -enum TObexPanicCode - { - /** A NULL value was supplied for the data buffer. Note that this - pointer can refer to either a memory buffer or a pointer to a RFile object. - @see CObexBufObject - */ - ENullPointer = 0, - - - /** The supplied buffer is of zero length. - @see CObexBufObject - */ - EEmptyBuffer = 1, - - - /** The header is not of the requested type. - @see CObexHeader - */ - EHeaderAsBadType = 2, - - - /** An unknown TFileBuffering value was supplied. - @see CObexBufObject - */ - EInvalidBufferStrategy = 3, - - - /** The RFile object does not point to a valid (open) file. - @see CObexBufObject - */ - ENullFileHandle = 4, - - - /** An unknown TObexBufferingDetails object was supplied to a buffer object. - @see CObexBufObject - */ - EInvalidBufferDetails = 5, - - - /** A call has been made to CObexServer::RequestIndicationCallback when no - asynchronous request is outstanding. - @see MObexNotifyAsync - @see CObexServer - */ - ENoNotificationToComplete = 6, - - - /** A call has been made to CObexServer::Start when an asynchronous request - is outstanding. - @see MObexNotifyAsync - @see CObexServer - */ - EChangeInterfaceDuringWait = 7, - - - - /** An invalid packet process event has been signalled. - */ - EBadPacketProcessEvent = 8, - - - /** An event is available for signalling, but there is no observer set. - */ - ENoPacketProcessObserverSet = 9, - - /** In CObexServer, a call has been made to RequestCompleteIndicationCallback(TObexResponse) - or RequestIndicationCallback(TObexResponse) with invalid response code or - RequestCompleteIndicationCallback(TInt) with invalid Symbian error code - */ - EInvalidResponseCodeFromServerApp = 10, - - /** In CObexServer, RequestCompleteIndicationCallback has been called in response to Put/GetRequestIndication - or ReuqestIndicationCallback has been called in response to Put/GetComplete or SetPath Indication - */ - EInvalidResponseCallback = 11, - - /** The last server response code has been requested prior to a response from the server. - */ - ENoResponseCodeToReturn = 12, - - /** Adding End of Body header when there is data in the object. - */ - EAddingInvalidEoBHeader = 13, - - /** A user has requested to override the handling of a request - packet at an invalid time. - */ - EOverrideRequestHandlingInBadState = 14, - }; - - - -/** -The category for obex transport panics -*/ -_LIT(KObexTransportPanicCat, "ObexTransPanics"); - -/** -Obex transport panics raised as a result of client programming error -*/ -enum TObexTransportPanicCode - { - /** - The number of transport implementations for a given transport name is more than what is allowed. - Check that there is not more than the allowed number of plugin resource files containing the same default - data and inteface uid. - */ - EInvalidNumberOfTransportImplementations = 0, - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexserver.h --- a/epoc32/include/obexserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,693 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXSERVER_H -#define __OBEXSERVER_H - -#include -#include -#include - -class TObexTransportInfo; -class CObexServerRequestPacketEngine; -class CObexPacketSignaller; -class MObexReadActivityObserver; - -/** OBEX server. - -CObexServer provides a framework for servicing OBEX requests from remote clients. -It is designed to be able to act as either a "default" application (in IrDA -terms, registering on the IrDA:OBEX IAS class), or as a application specific -server (registering itself on a private IAS class). - -You implement service-specific behaviour by providing a MObexServerNotify -interface implementation to the server object. The server calls the interface's -functions to provide notification of server events, which specific implementations -can process (or ignore) as appropriate. - -This class is not designed for user derivation. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CObexServer) : public CObex - { - // CObexServer is friends with the core Server State Machine class so - // that it can access the CObex::ControlledTransportDown() method - friend class CObexServerStateMachine; - - // CObexServer is friends with the TObexServerStateObexConnecting class so - // that it can access the CObex::SetConnectState(TConnectState aNewState) method - friend class TObexServerStateObexConnecting; - - // CObexServer is friends with the Server Request Packet Engine so that - // it can NULL the iServerRequestPacketEngine pointer ready for another - // extension interface - friend class CObexServerRequestPacketEngine; - -public: - /** - @publishedAll - @released - - The target header checking to apply to incoming connection requests. Defaults to - EIfPresent. - @see CObexServer::SetTargetChecking - */ - enum TTargetChecking - { - ENoChecking, /** Allow all target headers to connect. */ - EIfPresent, /** Only check target header in response to receiving one. Allows all clients - specifying an Inbox service to connect. */ - EAlways, /** Strict checking. Only allow connections if target header matches or no header - received and none expected. */ - }; - - IMPORT_C static CObexServer* NewL(TObexProtocolInfo& aObexProtocolInfoPtr); - IMPORT_C static CObexServer* NewL(TObexProtocolInfo& aObexProtocolInfoPtr, TObexProtocolPolicy& aObexProtocolPolicy); - IMPORT_C static CObexServer* NewL(TObexTransportInfo& aObexTransportInfo); - IMPORT_C ~CObexServer(); - IMPORT_C TInt Start(MObexServerNotify* aOwner); - IMPORT_C TInt Start(MObexServerNotifyAsync* aOwner); - IMPORT_C void Stop(); - IMPORT_C TBool IsStarted(); - IMPORT_C TOperation CurrentOperation() const; - void SetCurrentOperation(const TOperation aOperation); // used internally by state machine - IMPORT_C void SetChallengeL(const TDesC& aPassword); - IMPORT_C void ResetChallenge(); - IMPORT_C void UserPasswordL( const TDesC& aPassword); - IMPORT_C void SetTargetChecking(TTargetChecking aChecking); - IMPORT_C TInt SetPutFinalResponseHeaders(CObexHeaderSet* aHeaderSet); - IMPORT_C TInt RequestIndicationCallback(CObexBaseObject* aObject); - IMPORT_C TInt RequestIndicationCallbackWithError(TObexResponse aResponseCode); - IMPORT_C TInt RequestIndicationCallbackWithError(TInt aErrorCode); - IMPORT_C TInt RequestCompleteIndicationCallback(TObexResponse aResponseCode); - IMPORT_C TInt RequestCompleteIndicationCallback(TInt aErrorCode); - // @publishedPartner - IMPORT_C TInt PacketHeaders(CObexHeaderSet*& aHeaderSet); - IMPORT_C TInt PacketHeaders(CObexHeaderSet*& aHeaderSet, MObexHeaderCheck& aHeaderCheck); - IMPORT_C void SetReadActivityObserver(MObexReadActivityObserver* aObserver); - // @internalTechnology - IMPORT_C TAny* ExtensionInterfaceL(TUid aUid); - IMPORT_C const TObexTransportInfo* TransportInfo() const; - -public: - // Called from CObexNotifyExtendServer - void SignalPacketProcessEvent(TObexPacketProcessEvent aEvent); - - // Unexported functions used by the Server state machine - TBool CheckObjectForConnectionId(CObexBaseObject& aObject); - TBool CheckPacketForConnectionId(CObexPacket& aObject); - -private: - CObexServer(); - void ConstructL(TObexTransportInfo& aObexTransportInfo); - TInt AcceptConnection(); - // Implementation of CObex Events - virtual void OnPacketReceive(CObexPacket& aPacket); - virtual void OnError(TInt aError); - virtual void OnTransportUp(); - virtual void OnTransportDown(); - -public: - // These three functions need to be public so the Server state machine can use them - // However ParseConnectPacket cannot be moved as it is a virtual function (from CObex) - TInt PrepareConnectPacket(CObexPacket& aPacket); - TInt PrepareErroredConnectPacket(CObexPacket& aPacket); - void SignalReadActivity(); - TInt ParseConnectPacket(CObexPacket& aPacket); - -private: - TInt AddConnectionIDHeader(CObexPacket& aPacket); - TInt PrepareFinalChallResponse(CObexPacket& aPacket, TConnectState& aNextState); - void CheckTarget(TConnectState& aNextState, TInt& aRetVal); - void ResetConnectionID(); - void SetConnectionID(TUint32 aConnectionID); - TUint32 ConnectionID(); - void CheckServerAppResponseCode(TObexOpcode aOpcode, TObexResponse aResponse); - TInt DoPacketHeaders(CObexHeaderSet*& aHeaderSet, MObexHeaderCheck* aHeaderCheck); - -private: - MObexServerNotifyAsync* iOwner; - TBool iEnabled; - TBool iSpecDone; - TBool iTargetReceived; - TTargetChecking iTargetChecking; - TUint32 iConnectionID; - TBool iConnectionIdSet; - CObexHeader* iHeader; - CObexServerStateMachine* iStateMachine; - CObexServerNotifySyncWrapper* iSyncWrapper; - CObexServerRequestPacketEngine* iServerRequestPacketEngine; - CObexPacketSignaller* iPacketProcessSignaller; - }; - - -/** OBEX synchronous server notification interface. - -Any service that provides OBEX server functionality must implement one of the two -server observer classes -- this one or MObexServerNotifyAsync. - -The CObexServer object handles the protocol side of an OBEX server session, -while this class provides the server policy for a particular session. - -PUT and GET requests are handled synchronously, with the implementer returning a -CObexBufObject which will be processed immediately. - -@publishedAll -@released -@see MObexServerNotifyAsync -@see CObexServer -*/ -class MObexServerNotify - { -public: - /** - Returns a null aObject if the extension is not implemented, or a pointer to another interface if it is. - @param aInterface UID of the interface to return - @param aObject the container for another interface as specified by aInterface - */ - IMPORT_C virtual void MOSN_ExtensionInterfaceL(TUid aInterface, void*& aObject); - - /** Called if an OBEX protocol error occurs. - - It is only called for fatal errors that cause the OBEX connection to terminate. - An error that does not terminate the connection, for example the server issuing - a semantically valid, but unrecognised command, will not be indicated. - - @param aError Error code that describes the OBEX error. OBEX specific error - codes are listed from KErrIrObexClientNoDevicesFound. - - @publishedAll - @released - */ - virtual void ErrorIndication(TInt aError) =0; - - - - /** Called when the underlying transport connection is made from a remote - client to the server. - - Note that this does not, however, indicate an OBEX connection has been successfully - established. - - You can define any low-level connection policy here. It is also a good place - to set up the local connection information (CObex::LocalInfo()), if any non-defaults - are required. - - @publishedAll - @released - */ - virtual void TransportUpIndication() =0; - - - - /** Called when the transport connection is dropped (by either party). - - It is called whether the OBEX connection was gracefully disconnected or not. - The function is the definitive place for disconnection processing. - - @publishedAll - @released - */ - virtual void TransportDownIndication() =0; - - - - /** Called when an OBEX connection is made from a remote client. - - Override this function to provide any extra OBEX connection processing. - Despite this method returning a value, implementers cannot use this to - refuse the connection attempt. - - @param aRemoteInfo Connection information supplied by that remote machine - @param aInfo Further information about the requested connection (reserved) - @return Ignored - - @publishedAll - @released - */ - virtual TInt ObexConnectIndication(const TObexConnectInfo& aRemoteInfo, const TDesC8& aInfo) =0; - - - - /** Called on a (graceful) OBEX disconnection by the client. - - Override this to provide any extra processing OBEX disconnection processing. - - Note that this indication will not be raised if the remote machine simply - drops the transport connection. However, ErrorIndication() will be called - if the disconnection is unexpected/ invalid (i.e. another operation was in - progress at the time). In all cases, TransportDownIndication() will be called. - - @param aInfo Contains information about the disconnection (reserved) - - @publishedAll - @released - */ - virtual void ObexDisconnectIndication(const TDesC8& aInfo) =0; - - - - /** Called on receipt of the first packet of a (valid) put request. - - It is called before any parsing of the packet is performed, simply to establish - whether this server is interested in receiving objects at all. - - Note if the returned object cannot be initialised for receiving, ERespInternalError - is returned to the client. - - @return CObexBaseObject-derived object, which the object being put will be - parsed into. If this is NULL, ERespForbidden is returned to the client. - - @publishedAll - @released - */ - virtual CObexBufObject* PutRequestIndication() =0; - - - - /** Called on receipt of every packet of an OBEX PUT operation. - - It will always be preceded by a PutRequestIndication(). The object returned - by the request indication will be updated to reflect all the information received - concerning the object which the client is sending, from packets up to and - including the current one. - - You can use this function to provide periodic user notification on the progress - of the transfer (noting that the Length attribute may take an arbitrary number - of packets to become non-zero, and the constraints on its accuracy). Due to - the nature of OBEX operations, where any header attribute can be sent at any - point in the transfer, this is also a good place to marshal the details of - a received object, and possibly prompt for action on the received object (e.g. - renaming on filename clashes). - - Note that this function could be hit quite heavily, in proportion to the size - of the object transferred. Therefore more consideration should be given to - the speed of execution of this function than that of the other indications. - - @return KErrNone instructs the server to allow the client to continue the put - operation. Any other value cancels the operation with an appropriate OBEX - server response code. - - @publishedAll - @released - */ - virtual TInt PutPacketIndication() =0; - - - - /** Called after the final put packet has been successfully received and parsed. - - Note that there will not necessarily be a call to this function corresponding - to each PutRequestIndication() as, if an error occurs while the put is being - carried out, ErrorIndication() will be called instead. - - Before version 6.1, the return type was void. - - @return KErrNoneinstructs the remote client that the put completed successfully. - Any other value cancels the operation with an appropriate OBEX server response - code. - - @publishedAll - @released - */ - virtual TInt PutCompleteIndication() =0; - - - - /** Called when a full get request has been received from the client. - - aRequestedObject holds all the details about the object the remote client - has requested. Use this function to analyse the client's request, and return - a pointer to the object to be returned to the client, or NULL to return no - object. - - If NULL is returned, the server will send ERespForbidden to the client; if - an error occurs in returning the object, ERespInternalError is returned, otherwise - the returned object is sent back to the client. - - @param aRequiredObject Details about the object the remote client has requested - @return Object to return to the client - - @publishedAll - @released - */ - virtual CObexBufObject* GetRequestIndication(CObexBaseObject *aRequiredObject) =0; - - - - /** Called for every packet of get reply sent by the server back to the client. - - The function is only called while an object is being sent to the client, not - while the client is providing its initial specification for the object it - requires. - - You can use this function to provide user notification on the object being - sent, and its progress. As with PutPacketIndication(), you should consider - that this function might get called often, especially for large objects and - small OBEX packet sizes, so the speed of execution here is important. - - @return KErrNone to continue sending the object, or any other error code to - cancel the operation - - @publishedAll - @released - */ - virtual TInt GetPacketIndication() =0; - - - - /** Called when the final packet of the object has been returned to the client. - - Note like PutCompleteIndication(), this function might not be called for each - GetRequestIndication(), if the operation is interrupted by an error. - - Before version 6.1, the return type was void. - - @return KErrNoneinstructs the remote client that the get completed successfully. - Any other value cancels the operation with an appropriate OBEX server response - code. - - @publishedAll - @released - */ - virtual TInt GetCompleteIndication() =0; - - - - /** Called when an OBEX SETPATH command is received by the server. - - @param aPathInfo SETPATH command parameters - @param aInfo Not currently used - @return System wide error code indicating the success of the setpath command - - @publishedAll - @released - */ - virtual TInt SetPathIndication(const CObex::TSetPathInfo& aPathInfo, const TDesC8& aInfo) =0; - - - - /** Called when an abort packet is received from the client. - - An OBEX abort command simply cancels the current operation, and does not necessarily - have to cause the connection to be dropped. On return, a ERespSuccess packet - is sent to the client. - - @publishedAll - @released - */ - virtual void AbortIndication() =0; - }; - - - -/** OBEX asynchronous server notification interface. - -Any service that provides OBEX server functionality must implement one of the two -server observer classes -- this one or MObexServerNotify. - -The CObexServer object handles the protocol side of an OBEX server session, -while this class provides the server policy for a particular session. - -PUT and GET requests are handled asynchronously, with the upcall from the server -being followed at some stage in the future by a call to CObexServer::RequestIndicationComplete -to trigger processing. - -@publishedAll -@released -@see MObexServerNotify -@see CObexServer -*/ -class MObexServerNotifyAsync - { -public: - - /** - Returns a null aObject if the extension is not implemented, or a pointer to another - interface if it is. - @param aInterface UID of the interface to return - @param aObject the container for another interface as specified by aInterface - */ - IMPORT_C virtual void MOSNA_ExtensionInterfaceL(TUid aInterface, void*& aObject); - - - - /** Called if an OBEX protocol error occurs. - - It is only called for fatal errors that cause the OBEX connection to terminate. - An error that does not terminate the connection, for example the server issuing - a semantically valid, but unrecognised command, will not be indicated. - - @param aError Error code that describes the OBEX error. OBEX specific error - codes are listed from KErrIrObexClientNoDevicesFound. - - @publishedAll - @released - */ - virtual void ErrorIndication(TInt aError) =0; - - - - /** Called when the underlying transport connection is made from a remote - client to the server. - - Note that this does not, however, indicate an OBEX connection has been successfully - established. - - You can define any low-level connection policy here. It is also a good place - to set up the local connection information (CObex::LocalInfo()), if any non-defaults - are required. - - @publishedAll - @released - */ - virtual void TransportUpIndication() =0; - - - - /** Called when the transport connection is dropped (by either party). - - It is called whether the OBEX connection was gracefully disconnected or not. - The function is the definitive place for disconnection processing. - - @publishedAll - @released - */ - virtual void TransportDownIndication() =0; - - - - /** Called when an OBEX connection is made from a remote client. - - Override this function to provide any extra OBEX connection processing. - - @param aRemoteInfo Connection information supplied by that remote machine - @param aInfo Further information about the requested connection (reserved) - - @publishedAll - @released - */ - virtual void ObexConnectIndication(const TObexConnectInfo& aRemoteInfo, const TDesC8& aInfo) =0; - - - - /** Called on a (graceful) OBEX disconnection by the client. - - Override this to provide any extra processing OBEX disconnection processing. - - Note that this indication will not be raised if the remote machine simply - drops the transport connection. However, ErrorIndication() will be called - if the disconnection is unexpected/ invalid (i.e. another operation was in - progress at the time). In all cases, TransportDownIndication() will be called. - - @param aInfo Contains information about the disconnection (reserved) - - @publishedAll - @released - */ - virtual void ObexDisconnectIndication(const TDesC8& aInfo) =0; - - - - /** Called on receipt of the first packet of a (valid) put request. - - It is called before any parsing of the packet is performed, simply to establish - whether this server is interested in receiving objects at all. - - Following this notification, the server will wait for a call to - CObexServer::RequestIndicationCallback supplying a CObexBaseObject derived - object to receive into or a response code specifying the error. - - @publishedAll - @released - */ - virtual void PutRequestIndication() =0; - - - - /** Called on receipt of every packet of an OBEX PUT operation. - - It will always be preceded by a PutRequestIndication(). The object returned - by the request indication will be updated to reflect all the information received - concerning the object which the client is sending, from packets up to and - including the current one. - - You can use this function to provide periodic user notification on the progress - of the transfer (noting that the Length attribute may take an arbitrary number - of packets to become non-zero, and the constraints on its accuracy). Due to - the nature of OBEX operations, where any header attribute can be sent at any - point in the transfer, this is also a good place to marshal the details of - a received object, and possibly prompt for action on the received object (e.g. - renaming on filename clashes). - - Note that this function could be hit quite heavily, in proportion to the size - of the object transferred. Therefore more consideration should be given to - the speed of execution of this function than that of the other indications. - - @return KErrNone instructs the server to allow the client to continue the put - operation. Any other value cancels the operation with an appropriate OBEX - server response code. - - @publishedAll - @released - */ - virtual TInt PutPacketIndication() =0; - - - - /** Called after the final put packet has been successfully received and parsed. - - Note that there will not necessarily be a call to this function corresponding - to each PutRequestIndication() as, if an error occurs while the put is being - carried out, ErrorIndication() will be called instead. - - Following this notification, the server will wait for a call to - CObexServer::RequestCompleteIndicationCallback supplying a Obex response code. - - @publishedAll - @released - */ - virtual void PutCompleteIndication() =0; - - - - /** Called when a full get request has been received from the client. - - aRequestedObject holds all the details about the object the remote client - has requested. Use this function to analyse the client's request, and return - a pointer to the object to be returned to the client, or NULL to return no - object. - - Following this notification, the server will wait for a call to - CObexServer::RequestIndicationCallback supplying a CObexBaseObject derived - object to send to the client or a response code specifying the error. - - @param aRequiredObject Details about the object the remote client has requested - - @publishedAll - @released - */ - virtual void GetRequestIndication(CObexBaseObject* aRequiredObject) =0; - - - - /** Called for every packet of get reply sent by the server back to the client. - - The function is only called while an object is being sent to the client, not - while the client is providing its initial specification for the object it - requires. - - You can use this function to provide user notification on the object being - sent, and its progress. As with PutPacketIndication(), you should consider - that this function might get called often, especially for large objects and - small OBEX packet sizes, so the speed of execution here is important. - - @return KErrNone to continue sending the object, or any other error code to - cancel the operation - - @publishedAll - @released - */ - virtual TInt GetPacketIndication() =0; - - - - /** Called when the final packet of the object has been returned to the client. - - Note like PutCompleteIndication(), this function might not be called for each - GetRequestIndication(), if the operation is interrupted by an error. - - Following this notification, the server will wait for a call to - CObexServer::RequestCompleteIndicationCallback supplying a Obex response code. - - @publishedAll - @released - */ - virtual void GetCompleteIndication() =0; - - - - /** Called when an OBEX SETPATH command is received by the server. - - Following this notification, the server will wait for a call to - CObexServer::RequestCompleteIndicationCallback supplying a Obex response code. - - @param aPathInfo SETPATH command parameters - @param aInfo Not currently used - - @publishedAll - @released - */ - virtual void SetPathIndication(const CObex::TSetPathInfo& aPathInfo, const TDesC8& aInfo) =0; - - - - /** Called when an abort packet is received from the client. - - An OBEX abort command simply cancels the current operation, and does not necessarily - have to cause the connection to be dropped. On return, a ERespSuccess packet - is sent to the client. - - @publishedAll - @released - */ - virtual void AbortIndication() =0; - - - - /** Cancel an asynchronous callback request (ie. PutRequest/GetRequest/PutComplete/GetComplete/SetPath - notification). - - Note that ignoring this call will lead to a panic when the indication callback function - is called. - - @publishedAll - @released - */ - virtual void CancelIndicationCallback() =0; - }; - - -#endif // __OBEXSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obextransportinfo.h --- a/epoc32/include/obextransportinfo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __OBEXTRANSPORTINFO_H__ -#define __OBEXTRANSPORTINFO_H__ - -#include - -/** -This class is a combination of the TObexProtocolInfo and TObexProtocolPolicy -classes. -This class is designed for licensee derivation, to support novel transport -controllers. Existing superclasses include @c TObexUsbTransportInfo, @c -TObexUsbV2TransportInfo, @c TObexBtTransportInfo and @c TObexIrTransportInfo. -It is also designed for 3rd party instantiation, for use when creation a -CObexServer or a CObexClient. - -Note that, being a T-type, this type and all derived types must hold data by -value, to support bitwise copying. - -@publishedAll -@released -*/ -class TObexTransportInfo - { -public: - /** - The type of the transport over which obex will run. - The size of the buffer is chosen for historical reasons. This is the size - originally used by TObexProtocolInfo. - @publishedAll - @released - */ - TBuf<60> iTransportName; - - /** - The version of the protocol policy format that this class supports - @publishedAll - @released - */ - TUint16 iVersion; - - /** - The maximum size of the receive packet buffer for the policy - @publishedAll - @released - */ - TUint16 iReceiveMtu; - - /** - The maximum size of the transmit packet buffer for the policy - @publishedAll - @released - */ - TUint16 iTransmitMtu; - - /** */ - TUint16 iFuture1; - - /** */ - TUint32 iFuture2; - - /** */ - TInt iFuture3; - - /** */ - TInt iFuture4; - }; - -#endif // __OBEXTRANSPORTINFO_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obextypes.h --- a/epoc32/include/obextypes.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __OBEXTYPES_H -#define __OBEXTYPES_H - -#include -#include -#include -#include // Required for source compatability -#include -#include - -class TObexProtocolInfo; -class TObexIrProtocolInfo; -class TObexBluetoothProtocolInfo; -class TObexUsbProtocolInfo; -class TObexUsbProtocolInfoV2; -class TObexProcotolPolicy; -struct TObexConnectionInfo; -class TObexConnectInfo; - -class CObexPacket; -class CObexHeader; -class CObexUnderlyingHeader; -class MObexHeaderCheck; -class CObexHeaderSet; -class CObexBaseObject; -class CObexFileObject; -class CObexBufObject; -class CObexNullObject; -class MObexNotify; -class MObexAuthChallengeHandler; -class CObexTransport; -class CObexConnector; -class TObexInternalHeader; -class CObexAuthenticator; -class CObex; -class TObexSetPathData; -class CObexClient; -class MObexServerNotify; -class CObexServer; -class CObexServerStateMachine; -class MObexServerNotify; -class MObexServerNotifyAsync; -class CObexServerNotifySyncWrapper; - - -#endif // __OBEXTYPES_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/obexusbtransportinfo.h --- a/epoc32/include/obexusbtransportinfo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __OBEXUSBTRANSPORTINFO_H__ -#define __OBEXUSBTRANSPORTINFO_H__ - -#include "obextransportinfo.h" -#include - -/** -Concrete transport info type for use when using the usb transport controller. -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexUsbTransportInfo) : public TObexTransportInfo - { -//Data from TObexUsbProtocolInfo class, declared in obex\public\obexconstants.h -public: - /** Provides a string to be attached to the Obex function's Communication Class interface, - which may be used to identify the Obex service. */ - TBuf16 iInterfaceStringDescriptor; - }; - -/** -Concrete transport info type when using the USB transport controller with client driver extensions. -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TObexUsbV2TransportInfo) : public TObexUsbTransportInfo - { - - //Data from TObexUsbProtocolInfoV2 class, declared in obex\public\obexconstants.h -public: - /** Bitmap containing the bandwidth priorities to use on IN and OUT endpoints - @see TUsbcBandwidthPriority - */ - TInt iBandwidthPriority; - /** Specifies whether to use DMA on the bulk OUT endpoint */ - TBool iDmaOnOutEndpoint; - /** Specifies whether to use DMA on the bulk IN endpoint */ - TBool iDmaOnInEndpoint; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/phbksync.h --- a/epoc32/include/phbksync.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,358 +0,0 @@ -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Phonebook Synchroniser API header file. -// Describes the Phonebook Synchroniser API for use by clients of the -// Phonebook Synchroniser Server. -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __PHBKSYNC_H__ -#define __PHBKSYNC_H__ - -#include -#include -#include -#include -#include - -/** - * Index not supplied. - */ -const TInt KSyncIndexNotSupplied=-1; - - -// -// TUid Phonebook Types used by Contacts Model -// -#define KUidIccPhonebookNotSpecifiedValue 0x101F7874 -#define KUidIccGlobalAdnPhonebookValue 0x101F7875 -#define KUidIccGlobalSdnPhonebookValue 0x101F7876 -#define KUidIccGlobalLndPhonebookValue 0x101F7877 -#define KUidUsimAppAdnPhonebookValue 0x101F7878 -#define KUidIccGlobalFdnPhonebookValue 0x101FB2AF - -const TUid KUidIccPhonebookNotSpecified = {KUidIccPhonebookNotSpecifiedValue}; -const TUid KUidIccGlobalAdnPhonebook = {KUidIccGlobalAdnPhonebookValue}; -const TUid KUidIccGlobalSdnPhonebook = {KUidIccGlobalSdnPhonebookValue}; -const TUid KUidIccGlobalLndPhonebook = {KUidIccGlobalLndPhonebookValue}; -const TUid KUidUsimAppAdnPhonebook = {KUidUsimAppAdnPhonebookValue}; -const TUid KUidIccGlobalFdnPhonebook = {KUidIccGlobalFdnPhonebookValue}; - - -/** - * Types of cancel requests for the asynchronous server requests. - * - * @see RPhoneBookSession::CancelRequest - */ -enum TPhonebookSyncRequestCancel - { - /** Cancel the asynchronous RPhoneBookSession::DoSynchronisation() request */ - EDoSynchronisationCancelClient, - - /** Cancel the asynchronous RPhoneBookSession::DeleteContact() request */ - ESyncDeleteCntFromICCCancelClient, - - /** Cancel the asynchronous RPhoneBookSession::WriteContact() request */ - ESyncWriteCntToICCCancelClient, - - /** Cancel the asynchronous RPhoneBookSession::NotifyPhBkCacheStateChange() request */ - ESyncNotifyCacheStateChangeCancelClient - }; - - -/** - * Class to hold the contact field formats. - * - * @publishedAll - * @released - */ -class TContactFieldFormat - { -public: - TContactFieldFormat(TInt aLength, TInt aCount, TBool aDisplayed); - -public: - /** The maximum length (i.e. number of characters) of the field. If the field is - not a string type this attribute should be ignored. */ - TInt iLength; - - /** The maximum number of instances of this field within an item. This is set to - -1 if this is unlimited. */ - TInt iCount; - - /** Indicates whether this is displayed or hidden. */ - TBool iDisplayed; - }; - - -// -// Forward declare the internal data storage class. -// -class CSyncClientData; - -/** - * Provides the CPhoneBookSyncPlugin client access to a session with the - * Phonebook Synchronizer Server. - * - * A handle to an RPhoneBookSession enables the plug-in class to perform - * IPC communications with the server. - * - * @publishedAll - * @released - */ -class RPhoneBookSession : public RSessionBase - { -public: - /** - * Structure holding the template ID and buffer size. The client has - * no need to use this structure. - * - * @deprecated - */ - struct TTemplateAndBufferSize - { - TContactItemId templateId; - TInt bufferSize; - }; - - /** - * The synchronisation mode for phonebooks when the server starts. - */ - enum TPhonebookSyncMode - { - /** Automatic synchronisation will be performed. */ - EAutoCurrentIcc, - - /** Automatic synchronisation will only be performed if the current ICC is - the same as the last ICC to be synchonised. */ - EAutoSameIcc, - - /** Manual synchronisation will be performed when requested. */ - EManual - }; - - /** - * The phonebook cache state. - */ - enum TSyncState - { - /** The server has not yet populated the Contacts Database. */ - EUnsynchronised, - - /** The server has finished populating the Contacts Database. */ - ECacheValid, - - /** The server encountered an error populating the Contacts Database. */ - EErrorDuringSync - }; - - /** - * Specifies format of phonebook fields within an ICC phonebook entry. - * - * @publishedAll - * @released - */ - class TContactFieldsV1 - { - public: - /** - * Enumeration to describe the version ID of the Phonebook Synchronizer. - */ - enum TContactFieldsExtensionId - { - /** Phonebook Synchronizer version 1 */ - KPhBkSyncTContactFieldsV1, - - /** Phonebook Synchronizer version 2 */ - KPhBkSyncTContactFieldsV2, - - /** Phonebook Synchronizer version 3 */ - KPhBkSyncTContactFieldsV3 - }; - - /** - * Returns the Phonebook Synchronizer API extension number of the class. - * - * @return The version ID from TContactFieldsExtensionId. - */ - IMPORT_C TInt ExtensionId() const; - - /** - * Standard constructor. - */ - IMPORT_C TContactFieldsV1(); - - public: - /** The format of the name field within an ICC phonebook entry. */ - TContactFieldFormat iNameField; - - /** The format of the number field within an ICC phonebook entry. */ - TContactFieldFormat iNumberField; - - /** The format of the ICC slot number field within an ICC phonebook entry. */ - TContactFieldFormat iIccSlotField; - - protected: - TInt iExtensionId; - }; - - /** - * A packaged instance of TContactFieldsV1. - */ - typedef TPckg TContactFieldsV1Pckg; - - /** - * Specifies format of phonebook fields within an UICC phonebook entry - * - * @publishedAll - * @released - */ - class TContactFieldsV2 : public TContactFieldsV1 - { - public: - IMPORT_C TContactFieldsV2(); - - public: - /** The format of any additional number fields within an ICC phonebook entry. */ - TContactFieldFormat iAdditionalNumString; - - /** The format of group field within an ICC phonebook entry. */ - TContactFieldFormat iGroupField; - - /** The format of email field within an ICC phonebook entry. */ - TContactFieldFormat iEmailField; - - /** The UID of the phonebook. */ - TUid iPhonebook; - }; - - /** - * A packaged instance of TContactFieldsV2. - */ - typedef TPckg TContactFieldsV2Pckg; - - - /** - * Specifies additional format information for phonebook fields within a - * UICC phonebook entry. - * - * @publishedAll - * @released - */ - class TContactFieldsV3 : public TContactFieldsV2 - { - public: - IMPORT_C TContactFieldsV3(); - - public: - /** The format of an addition number's text field within an ICC phonebook entry. */ - TContactFieldFormat iAdditionalNumAlphaString; - - /** The format of the second name field within an ICC phonebook entry. */ - TContactFieldFormat iSecondNameField; - }; - - /** - * A packaged instance of TContactFieldsV3. - */ - typedef TPckg TContactFieldsV3Pckg; - - - /** - * The phonebook ID type requested from a phonebook. There are two types of IDs - * (group IDs and template IDs). - * - * @see RPhoneBookSession::GetPhoneBookId() - */ - enum TSyncIdType - { - /** Used to allocate a new entry to the right group in the Contacts Database. */ - ESyncGroupId, - - /** Used to define new ICC entries in the Contacts Database. */ - ESyncTemplateId - }; - -public: - IMPORT_C RPhoneBookSession(); - IMPORT_C TInt Connect(); - IMPORT_C void Close(); - IMPORT_C TVersion Version() const; - IMPORT_C TInt ShutdownServer (TBool aUnconditionally); - - // - // Single (ADN) phonebook support and functions not requiring a phonebook UID. - // - IMPORT_C void DoSynchronisation(TRequestStatus& aReqStatus); - IMPORT_C TInt ValidateContact(MContactSynchroniser::TValidateOperation aOperation, TContactItemId aId); - IMPORT_C void WriteContact(TRequestStatus& aReqStatus, CContactICCEntry& aContactItem, - TInt& aSlotNumber); - IMPORT_C void DeleteContact(TRequestStatus& aReqStatus, TContactItemId aId); - IMPORT_C TInt GetPhoneBookId(TContactItemId& aId, TSyncIdType aIdType); - IMPORT_C TInt UpdateLookuptable(TContactItemId aNewUid, TInt aIccSlot); - IMPORT_C TInt GetContactFormat(TDes8& aContactFields); - IMPORT_C TInt GetSyncMode(TPhonebookSyncMode& aSyncMode); - IMPORT_C TInt SetSyncMode(TPhonebookSyncMode aSyncMode); - IMPORT_C TInt GetPhoneBookCacheState(TSyncState& aState); - IMPORT_C void CancelRequest(TPhonebookSyncRequestCancel aReqToCancel); - IMPORT_C TInt GetLastSyncError(TInt& aError); - IMPORT_C void NotifyPhBkCacheStateChange(TRequestStatus& aStatus); - IMPORT_C TInt GetNumSlots(TInt& aNumSlots) const; - IMPORT_C void GetFreeSlotsL(RArray& aFreeSlots) const; - IMPORT_C TInt GetSlotId(TInt aSlot, TContactItemId& aId) const; - - // - // Multiple phonebooks support. These should be used in preference to the above - // ADN specific versions. - // - IMPORT_C void DoSynchronisation(TRequestStatus& aReqStatus, TUid aPhonebookUid); - IMPORT_C void WriteContact(TRequestStatus& aReqStatus, CContactICCEntry& aContactItem, - TInt& aSlotNumber, TUid& aPhonebookUid); - IMPORT_C TInt GetPhoneBookId(TContactItemId& aId, TSyncIdType aIdType, TUid aPhonebookUid); - IMPORT_C TInt UpdateLookuptable(TContactItemId aNewUid, TInt aIccSlot, TUid aPhonebookUid); - IMPORT_C TInt GetSyncMode(TPhonebookSyncMode& aSyncMode, TUid aPhonebookId); - IMPORT_C TInt SetSyncMode(TPhonebookSyncMode aSyncMode, TUid aPhonebookId); - IMPORT_C TInt GetPhoneBookCacheState(TSyncState& aState, TUid aPhonebookId); - IMPORT_C void CancelRequest(TPhonebookSyncRequestCancel aReqToCancel, TUid aPhonebookId); - IMPORT_C TInt GetLastSyncError(TInt& aError, TUid aPhonebookId); - IMPORT_C void NotifyPhBkCacheStateChange(TRequestStatus& aStatus, TUid aPhonebookId); - IMPORT_C TInt GetNumSlots(TInt& aNumSlots, TUid aPhonebookId) const; - IMPORT_C void GetFreeSlotsL(RArray& aFreeSlots, TUid aPhonebookId) const; - IMPORT_C TInt GetSlotId(TInt aSlot, TContactItemId& aId, TUid aPhonebookId) const; - - // - // Memory checking functionality for Debug builds only. - // - IMPORT_C TInt __DbgMarkHeap(); - IMPORT_C TInt __DbgCheckHeap(TInt aCount); - IMPORT_C TInt __DbgMarkEnd(TInt aCount); - IMPORT_C TInt __DbgFailNext(TInt aCount); - -private: - RPhoneBookSession(const RPhoneBookSession& aSession); - -private: - /* Temporary data used by the session. */ - CSyncClientData* iData; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/platform_paths.hrh --- a/epoc32/include/platform_paths.hrh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,585 +0,0 @@ -/* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Predefined include paths to be used in the mmp-files for the -* components in the layered model. There is one definition for -* each layer. The mmp-file should use the statement that is -* intended for the same layer as where the mmp-file resides. -* -* There is also macros to be used in the bld.inf-files to -* export of Public and Platform headers into -* correct locations. -* -* Usage examples: -* --------------------------------------------- -* How to include this file in bld.inf and mmp-files. -* Reasoning: The build system is such that at the time the -* bld.inf and mmp-files are "compiled" the available -* include paths are limited. Only the /epoc32/include -* can be guaranteed. Thus to get this file available -* you need to make include relative to the mentioned -* directory. -* --------------------------------------------- -* -* #include -* -* ************************************************************* -* * MMP file related macro usages to add the system include paths -* * -* * The include paths has to be related to the layer in which your SW -* * resides. Thus as an example: a component residing in middleware -* * layer should use the MW specific macro. -* * Keep this as a separate line in the mmp-files. If you need to -* * add your own SYSTEMINCLUDE paths, please defined them as -* * separate statement. -* ************************************************************* -* APP_LAYER_SYSTEMINCLUDE -* MW_LAYER_SYSTEMINCLUDE -* OS_LAYER_SYSTEMINCLUDE -** -* ************************************************************* -* * Macros related to using various parts of stdapis -* ************************************************************* -* To use STLLIB you need to have this in your mmp-file -* STLLIB_USAGE_DEFINITIONS -* -* Depending on what module you are using from stdapis you need to have -* one or more of the following macros in your mmp-file (every one in -* separate line !) -* -* OS_LAYER_LIBC_SYSTEMINCLUDE -* OS_LAYER_GLIB_SYSTEMINCLUDE -* OS_LAYER_SSL_SYSTEMINCLUDE -* OS_LAYER_STDCPP_SYSTEMINCLUDE -* OS_LAYER_BOOST_SYSTEMINCLUDE -* OS_LAYER_DBUS_SYSTEMINCLUDE -* OS_LAYER_LIBUTILITY_SYSTEMINCLUDE -* -* ************************************************************* -* * Macros related to exporting Public and Platform APIs into -* * correct place in the new system. -* * -* * The macro that you should use depends on 2 things: -* * - in which layer your package, which exports the APIs resides -* * - what is the visibility of the API (public or platform) -* ************************************************************* -* // the exporting of public APIs should use one of below macros -* // depending on which layer the API belogs to -* APP_LAYER_PUBLIC_EXPORT_PATH -* MW_LAYER_PUBLIC_EXPORT_PATH -* OS_LAYER_PUBLIC_EXPORT_PATH -* -* // the exporting of platform APIs should use one of below macros -* // depending on which layer the API belogs to -* APP_LAYER_PLATFORM_EXPORT_PATH -* MW_LAYER_PLATFORM_EXPORT_PATH -* OS_LAYER_PLATFORM_EXPORT_PATH -* -* The hierarchy how APIs should reside in foundation has been specified -* in developer documentation. See further details from documentation. -* Below is example case relying on the structure -* my_own_api/group/bld.inf -* my_own_api/inc/header1.h -* my_own_api/inc/subdir/header2.h -* -* Assuming that the API is in middleware layer and a public API. -* Then the bld.inf should have the following -* ../inc/header1.h APP_LAYER_PUBLIC_EXPORT_PATH(header1.h) -* ../inc/subdir/header2.h APP_LAYER_PUBLIC_EXPORT_PATH(subdir/header2.h) -* -* In the above case the locations are as follow (with current MACRO settings): -* header1.h in /epoc32/include/app -* header2.h in /epoc32/include/app/subdir -* -* -* ************************************************************* -* * Macros related to IBY file exporting -* ************************************************************* -* -* Component bld.inf files need to include platform_paths.hrh, see -* beginning of this file on how to do this correctly. Component bld.inf -* files need to use these macros in PRJ_EXPORTS to get their IBY files -* to ROM image. -* -* --------------------------------------------- -* Usage for Core image (ROM+ROFS1): -* --------------------------------------------- -* // Layer specific specific macros. Use the macro, which is specified -* // for the layer, in which your component resides -* / CORE_APP_LAYER_IBY_EXPORT_PATH() -* / CORE_MW_LAYER_IBY_EXPORT_PATH() -* / CORE_OS_LAYER_IBY_EXPORT_PATH() -* -* //stub iby files -* / CORE_IBY_EXPORT_PATH(stubs,) -* //tool iby files -* / CORE_IBY_EXPORT_PATH(tools,) -* -* --------------------------------------------- -* Usage for Variant image, Language part (ROFS2): -* --------------------------------------------- -* // Layer specific specific macros. Use the macro, which is specified -* // for the layer, in which your component resides -* / LANGUAGE_APP_LAYER_IBY_EXPORT_PATH() -* / LANGUAGE_MW_LAYER_IBY_EXPORT_PATH() -* / LANGUAGE_OS_LAYER_IBY_EXPORT_PATH() -* -* --------------------------------------------- -* Usage for Variant image, Language part (ROFS2): -* --------------------------------------------- -* // Layer specific specific macros. Use the macro, which is specified -* // for the layer, in which your component resides -* / CUSTOMER_APP_LAYER_IBY_EXPORT_PATH() -* / CUSTOMER_MW_LAYER_IBY_EXPORT_PATH() -* / CUSTOMER_OS_LAYER_IBY_EXPORT_PATH() -* -* --------------------------------------------- -* Usage for Customer Variant image, (ROFS3): -* --------------------------------------------- -* // Layer specific specific macros. Use the macro, which is specified -* // for the layer, in which your component resides -* / CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH() -* / CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH() -* / CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH() -* -* -* ************************************************************* -* * Macro related to Exporting localization .loc files into -* * correct place in the system. -* ************************************************************* -* -* --------------------------------------------- -* Usage for components: -* --------------------------------------------- -* Component bld.inf files need to include platform_paths.hrh, see -* beginning of this file on how to do this correctly. Component bld.inf -* files need to use these macros in PRJ_EXPORTS to get their loc files -* for localization. -* loc files that should be localized by localisation team should be in -* loc-folder in the source tree (see developer guidelines) -* -* // Layer specific specific macros. Use the macro, which is specified -* // for the layer, in which your component resides -* /loc/.loc APP_LAYER_LOC_EXPORT_PATH(.loc) -* /loc/.loc MW_LAYER_LOC_EXPORT_PATH(.loc) -* /loc/.loc OS_LAYER_LOC_EXPORT_PATH(.loc) -* -* -* -* -*/ - - -#ifndef PLATFORM_PATHS_HRH -#define PLATFORM_PATHS_HRH - -/** -************************************************************************** -* General comments about the exporting of headers macros -* 1) The definitions point currently to the old locations. (which makes some -* macros to have same values. The idea is that you can already start using -* them now and those will be later on changed => change affects everybody. -*************************************************************************** -*/ - -/** -* --------------------------------------- -* Location, where the applications layer specific public headers should be exported -* See usage on top of this hrh-file. -* --------------------------------------- -*/ - -#if __GNUC__ >= 3 -#define APP_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error -#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/app/exported -#else -#define APP_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error -#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/app/##exported -#endif - -/** -* --------------------------------------- -* Location, where the applications layer specific platform headers should be exported -* See usage on top of this hrh-file. -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error -#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/app/exported -#else -#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error -#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/app/##exported -#endif - -/** -* --------------------------------------- -* Location, where the middleware layer specific public headers should be exported -* See usage on top of this hrh-file. -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define MW_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error -#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/mw/exported -#else -#define MW_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error -#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/mw/##exported -#endif - -/** -* --------------------------------------- -* Location, where the middleware layer specific platform headers should be exported -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error -#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/mw/exported -#else -#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error -#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/mw/##exported -#endif - -/** -* --------------------------------------- -* Location, where the os layer specific public headers should be exported -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define OSEXT_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error -#define OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/exported -#else -#define OSEXT_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error -#define OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported -#endif - -/** -* --------------------------------------- -* Location, where the os specific platform headers should be exported -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error -#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/exported -#else -#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error -#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/##exported -#endif - -/** -* --------------------------------------- -* Location, where the cenrep excel sheets should be exported -* Deprecated: should no longer be used. Kept for compability. -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/exported -#else -#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/##exported -#endif - -/** -************************************************************************** -* General comments about the 3 define statements related to include paths: -* 1) the /epoc32/include/oem is now defined there for backward compability. -* Once the directory is empty, the directory will be removed. However this -* enables us to ensure that if you use these define statements => you do -* not have to remove the statements later on, when the directory no longer -* exists. -* 2) These statements should be enough in normal cases. For certain specific -* cases you migth need to add some specific directory from /epoc32/include -* (for instance /epoc32/include/ecom). -* In normal cases the include staments in code should be relative to one of -* the system include paths, but in certain cases, the included files requires -* that the subdirectory is also part of the system include paths. -**************************************************************************** -*/ - -/** -* This define statements defines the SYSTEMINCLUDE-line, which is intended to be -* used in the mmp-files that are part of the applications-layer. It includes all -* the needed directories from the /epoc32/include, that are valid ones for the -* application-layer components. -* -* Applications layer is the last one in the list, since most likely the most of -* the headers come from middleware or os-layer => thus they are first. -*/ -#define APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ - /epoc32/include \ - /epoc32/include/mw \ - /epoc32/include/platform/mw \ - /epoc32/include/platform \ - /epoc32/include/app \ - /epoc32/include/platform/app \ - /epoc32/include/platform/loc \ - /epoc32/include/platform/mw/loc \ - /epoc32/include/platform/app/loc \ - /epoc32/include/platform/loc/sc \ - /epoc32/include/platform/mw/loc/sc \ - /epoc32/include/platform/app/loc/sc - -/** -* This define statements defines the SYSTEMINCLUDE-line, which is intended to be -* used in the mmp-files that are part of the middleware-layer. It includes all -* the needed directories from the /epoc32/include, that are valid ones for the -* middleware-layer components. -*/ -#define MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ - /epoc32/include \ - /epoc32/include/mw \ - /epoc32/include/platform/mw \ - /epoc32/include/platform \ - /epoc32/include/platform/loc \ - /epoc32/include/platform/mw/loc \ - /epoc32/include/platform/loc/sc \ - /epoc32/include/platform/mw/loc/sc - -/** -* This define statements defines the SYSTEMINCLUDE-line, which is intended to be -* used in the mmp-files that are part of the osextensions-layer. It includes all -* the needed directories from the /epoc32/include, that are valid ones for the -* os-layer components. -*/ -#define OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ - /epoc32/include \ - /epoc32/include/platform \ - /epoc32/include/platform/loc \ - /epoc32/include/platform/loc/sc - -// Below statement is Deprecated and the OS_LAYER_SYSTEMINCLUDE-macro has to be -// used. -// Removed, use teh OS_LAYER_SYSTEMINCLUDE instead. -// #define OSEXT_LAYER_SYSTEMINCLUDE OS_LAYER_SYSTEMINCLUDE - -/** -* This define statements defines the SYSTEMINCLUDE-line, which is intended to be -* used in the mmp-files that are part of the os-layer. This is intended -* to be only used by those components which need to use in their mmp-file either -* kern_ext.mmh or nkern_ext.mmh. Reason is that those -* 2 files already contain the /epoc32/include as system include path. -* -*/ -#define OS_LAYER_KERNEL_SYSTEMINCLUDE SYSTEMINCLUDE \ - /epoc32/include/platform - -// Below statement is Deprecated and the OS_LAYER_KERNEL_SYSTEMINCLUDE-macro -// has to be used. -// Removed, use the OS_LAYER_KERNER_SYSTEMINCLUDE instead. -// #define OSEXT_LAYER_KERNEL_SYSTEMINCLUDE OS_LAYER_KERNEL_SYSTEMINCLUDE - -/** -**************************************************************************** -* Definitions that also define the systeminclude paths for various -* part of stdapis. Each statement has to be in its own line in the using -* mmp-file. There are be more than 1 statement in single mmp-file. -**************************************************************************** -*/ -#define OS_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) - -#define OS_LAYER_GLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \ - OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \ - OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) - - -#define OS_LAYER_SSL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) - -#define OS_LAYER_STDCPP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) - -#define OS_LAYER_BOOST_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) - -#define OS_LAYER_DBUS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \ - OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) -#define OS_LAYER_LIBUTILITY_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) - -#define OS_LAYER_LIBOIL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/liboil) - -#define MW_LAYER_GSTREAMER_SYSTEMINCLUDE SYSTEMINCLUDE \ - /epoc32/include/platform/mw/gstreamer/10_18 \ - /epoc32/include/platform/mw/gstreamer/10_18/gst \ - /epoc32/include/platform/mw/gstreamer/10_18/gst/gstcontroller \ - /epoc32/include/stdapis/machine - -// You need to add STLLIB_USAGE_DEFINITIONS as a separate line into your mmp-file, if you are using -// the stllib. -#define STLLIB_USAGE_DEFINITIONS OPTION CW -wchar_t on\ - MACRO _WCHAR_T_DECLARED - - -/** -**************************************************************************** -* Definitions that also define the paths to the layer specific source directories. -**************************************************************************** -*/ -/** -* The below 3 macros define the paths to the layer-specific source dirs. -* See usage on top of this hrh-file, these are used the same way as -* for instance the OS_LAYER_DOMAIN_EXPORT_PATH -* Deprecated: is not allowed to be using in Symbian Foundation -*/ -#if __GNUC__ >= 3 -#define APP_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export -#define MW_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export -#define OSEXT_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export -#else -#define APP_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export -#define MW_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export -#define OSEXT_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export -#endif - -/** -**************************************************************************** -* Definitions to export IBY files to different folders where they will be taken -* to ROM image -**************************************************************************** -*/ - -// Following three definitions are used for exporting IBY files to -// Core image (ROM+ROFS1). IBY files are exported according to their layer. -#if __GNUC__ >= 3 -#define CORE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/app/exported -#define CORE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/mw/exported -#define CORE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define CORE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/os/exported -#define CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/exported -#else -#define CORE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/app/##exported -#define CORE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/mw/##exported -#define CORE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define CORE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/os/##exported -#define CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/##exported -#endif - -// Following three definitions are used for exporting IBY files to Variant image, -// Language part (ROFS2). IBY files are exported according to their layer. -#if __GNUC__ >= 3 -#define LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/app/exported -#define LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/mw/exported -#define LANGUAGE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/os/exported -#else -#define LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/app/##exported -#define LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/mw/##exported -#define LANGUAGE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/os/##exported -#endif - -// Following three definitions are used for exporting IBY files to Variant image, (ROFS2). -// BY files are exported according to their layer. -#if __GNUC__ >= 3 -#define CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/app/exported -#define CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/mw/exported -#define CUSTOMER_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/os/exported -#else -#define CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/app/##exported -#define CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/mw/##exported -#define CUSTOMER_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/os/##exported -#endif - -// Following three definitions are used for exporting IBY files to -// Variant Customer part, (ROFS3). IBY files are exported according to -// their layer. -#if __GNUC__ >= 3 -#define CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/app/exported -#define CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/mw/exported -#define CUSTOMER_VARIANT_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/os/exported -#else -#define CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/app/##exported -#define CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/mw/##exported -#define CUSTOMER_VARIANT_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error -#define CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/os/##exported -#endif - - -// Following definition is used for exporting tools and stubs IBY files to -// Core image. -#if __GNUC__ >= 3 -#define CORE_IBY_EXPORT_PATH(path,exported) /epoc32/rom/include/core/path/exported -#else -#define CORE_IBY_EXPORT_PATH(path,exported) /epoc32/rom/include/core/##path##/##exported -#endif - -/** -* --------------------------------------- -* Location, where the localization .loc file should be exported -* --------------------------------------- -*/ -// Location, where the os layer localization .loc file should be -// exported -#if __GNUC__ >= 3 -// Deprecated: use the OS_LAYER_LOC_EXPORT_PATH instead -#define OSEXT_LAYER_LOC_EXPORT_PATH(exported) do not use intentionally generates error -#define OS_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/loc/sc/exported - -// Location, where the middleware layer localization .loc file should be -// exported -#define MW_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/mw/loc/sc/exported - -// Location, where the application layer localization .loc file should be -// exported -#define APP_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/app/loc/sc/exported - -#else - -// Deprecated: use the OS_LAYER_LOC_EXPORT_PATH instead -#define OSEXT_LAYER_LOC_EXPORT_PATH(exported) do not use intentionally generates error -#define OS_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/loc/sc/##exported - -// Location, where the middleware layer localization .loc file should be exported -#define MW_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/mw/loc/sc/##exported - -// Location, where the application layer localization .loc file should be exported -#define APP_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/app/loc/sc/##exported -#endif - -/** -* --------------------------------------- -* Macros for Configuration tool migration. -* The below macros define the location under epoc32, where the confml -* (Configuration Markup Language) and crml (Central Repository Markup Language) -* files should be exported. -* --------------------------------------- -*/ -#if __GNUC__ >= 3 -#define CONFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/file -#define CRML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/file -#define GCFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/file -#define CONFML_CONFIG_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/config/file -#else -#define CONFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/##file -#define CRML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/##file -#define GCFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/##file -#define CONFML_CONFIG_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/config/##file -#endif - -#define APP_LAYER_CONFML(exported) CONFML_EXPORT_PATH(exported,s60) -#define APP_LAYER_CRML(exported) CRML_EXPORT_PATH(exported,s60) -#define APP_LAYER_GCFML(exported) GCFML_EXPORT_PATH(exported,s60) -#define APP_LAYER_CONFML_CONFIG(exported) CONFML_CONFIG_EXPORT_PATH(exported,s60) - -#define MW_LAYER_CONFML(exported) CONFML_EXPORT_PATH(exported,s60) -#define MW_LAYER_CRML(exported) CRML_EXPORT_PATH(exported,s60) -#define MW_LAYER_GCFML(exported) GCFML_EXPORT_PATH(exported,s60) -#define MW_LAYER_CONFML_CONFIG(exported) CONFML_CONFIG_EXPORT_PATH(exported,s60) - -// Deprecate: Use the OS_LAYER_* macros instead of OSEXT_LAYER_* -#define OSEXT_LAYER_CONFML(exported) do not use intentionally generates error -#define OSEXT_LAYER_CRML(exported) do not use intentionally generates error -#define OSEXT_LAYER_GCFML(exported) do not use intentionally generates error -#define OSEXT_LAYER_CONFML_CONFIG(exported) do not use intentionally generates error -#define OS_LAYER_CONFML(exported) CONFML_EXPORT_PATH(exported,s60) -#define OS_LAYER_CRML(exported) CRML_EXPORT_PATH(exported,s60) -#define OS_LAYER_GCFML(exported) GCFML_EXPORT_PATH(exported,s60) -#define OS_LAYER_CONFML_CONFIG(exported) CONFML_CONFIG_EXPORT_PATH(exported,s60) - -#endif // end of PLATFORM_PATHS_HRH diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/playerinformationtarget.h --- a/epoc32/include/playerinformationtarget.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,171 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONPLAYERINFORMATIONTARGET_H -#define REMCONPLAYERINFORMATIONTARGET_H - -#include -#include -#include - -#include -#include -#include -#include - -class CRemConInterfaceSelector; -class CPlayerApplicationSettings; - -// This is the maximum length of the player application setting attribute and value strings -const TInt KMaxPlayerApplicationSettingsValue = 255 ; -// This is the minimum length of the player application setting attribute and value strings -const TInt KMinPlayerApplicationSettingsValue = 1 ; - -/** -Client-instantiable class supporting player information responses. -This is the container class for the three interface parts -*/ -NONSHARABLE_CLASS(CPlayerInfoTarget) : public CRemConInterfaceBase, - public MRemConInterfaceIf2, - private MPlayerCapabilitiesObserver, - private MPlayerApplicationSettingsObserver, - private MPlayerEventsObserver - - { -public: - /** - Factory function. - @param aInterfaceSelector The interface selector. The client must have - created one of these first. - @param aPlayerCapabilitiesObserver Returns a pointer to a MPlayerCapabilitiesObserver for this interface, owned by the CPlayerInfoTarget. - @param aPlayerApplicationSettingsObserver Returns a pointer to a MPlayerApplicationSettingsObserver for this interface, owned by the CPlayerInfoTarget - @param aPlayerEventsObserver Returns a pointer to a MPlayerEventsObserver for this interface, owned by the CPlayerInfoTarget - @return A new CPlayerInfoTarget, owned by the interface selector. - */ - IMPORT_C static CPlayerInfoTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, - MPlayerCapabilitiesObserver*& aPlayerCapabilitiesObserver, - MPlayerApplicationSettingsObserver*& aPlayerApplicationSettingsObserver, - MPlayerEventsObserver*& aPlayerEventsObserver, - MPlayerApplicationSettingsNotify& aApplicationSettingNotifier ); - - /** Destructor */ - IMPORT_C ~CPlayerInfoTarget(); - - - -private: - /** - Constructor. - @param aInterfaceSelector The interface selector. - */ - CPlayerInfoTarget(CRemConInterfaceSelector& aInterfaceSelector, MPlayerApplicationSettingsNotify& aApplicationSettingNotifier ); - - void ConstructL(MPlayerCapabilitiesObserver*& aPlayerCapabilitiesObserver, - MPlayerApplicationSettingsObserver*& aPlayerApplicationSettingsObserver, - MPlayerEventsObserver*& aPlayerEventsObserver ); - -private: // from CRemConInterfaceBase - TAny* GetInterfaceIf(TUid aUid); - -private: // from MRemConInterfaceIf - void MrcibNewMessage(TUint aOperationId, const TDesC8& aData, TRemConMessageSubType aMsgSubType); - -private: - // Bearer attributes (settings) processing - void ProcessListPlayerApplicationAttributes( TInt aOperationId ); - void ProcessGetPlayerApplicationAttributeText( const TDesC8& aData, TInt aOperationId ); - void ProcessListPlayerApplicationValues( const TDesC8& aData, TInt aOperationId ); - void ProcessGetPlayerApplicationValueText( const TDesC8& aData, TInt aOperationId ); - void ProcessGetCurrentPlayerApplicationValue( const TDesC8& aData, TInt aOperationId ); - void ProcessSetPlayerApplicationValue( const TDesC8& aData, TInt aOperationId ); - - // Bearer attributes (settings) API implementation from MPlayerApplicationSettingsObserver - void DoDefineAttributeL(TUint aAttributeID, TDesC8& aAttributeText, RArray &aValues, RArray &aValueTexts, TUint aInitialValue); - void DoSetAttributeL(TUint aAttributeID, TUint aValue); - - // Notifier Events API implementation from MPlayerEventsObserver - void DoPlaybackStatusChanged(TPlaybackStatus aStatus); - void DoTrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds); - void DoTrackReachedEnd(); - void DoTrackReachedStart(); - void DoSetPlaybackPosition(TUint32 aMilliseconds); - void DoSetBatteryStatus(TTargetBatteryStatus aBatteryStatus); - - // Notifier Events bearer processing - void ProcessGetPlayStatus(); - void ProcessGetStatusAndBeginObserving(TUint aOperationId, TRegisterNotificationEvent aEventId, const TDesC8& aData); - void ProcessGetStatus(TUint aOperationId, TRegisterNotificationEvent aEventId); - void SendNotificationResponse(TRegisterNotificationEvent aEventId, TRemConMessageSubType aMsgSubType); - - // Capabilities API implementation from MPlayerCapabilitiesObserver - void DoClearEvents(); - TInt DoAddEvent(TRegisterNotificationEvent aEvent); - TInt DoRemoveEvent(TRegisterNotificationEvent aEvent); - void DoClearCompanyIds(); - TInt DoAddCompanyId(TInt aID); - TInt DoRemoveCompanyID(TInt aID); - - // Capabilities bearer processing - void ProcessGetCapabilities( const TDesC8& aData ); - - // Miscellaneous - TBool AttributeSettingExists(TUint anAttribute); - TBool IsValidAttributeValue(TUint anAttributeId, TUint aAttributeValue); - TBool AttributeValueCanBeSet(TUint anAttributeId, TUint aAttributeValue); - void SendError(TInt, TInt); - void SendError(TInt, TInt, TRemConMessageSubType aSubType); - CPlayerApplicationSettings* GetSetting(TUint anAttribute); - -private: // owned - RBuf8 iOutBuf; - - MPlayerApplicationSettingsNotify& iApplicationSettingNotifier; - - // data for MPlayerEventsObserver - TPlaybackStatus iPlayBackStatus; - TUint64 iTrackId; - TUint32 iLengthInMilliseconds; - TPlayPosition iTrackPosition; - - // The time interval (received as part if the RegisterNotification) - // in which the change in playback position will be notified - TUint32 iPlayBackIntervalInMilliseconds; - - TTargetBatteryStatus iBatteryStatus; - TUint32 iPlaybackPositionInMilliseconds; - TUint32 iLastNotifiedPlaybackPositionInMilliseconds; - - // data for MPlayerCapabilitiesObserver - RArray iSupportedNotificationEventList; - RArray iCompanyIdList; - - // list of events for which notifications have been request - RArray iPendingNotificationEventList; - - // Attribute (settings) data MPlayerApplicationSettingsObserver - RHashMap iPlayerApplicationSettings; - - }; - - -#endif // REMCONPLAYERINFORMATIONTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/playerinformationtargetobserver.h --- a/epoc32/include/playerinformationtargetobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONPLAYERINFORMATIONTARGETOBSERVER_H -#define REMCONPLAYERINFORMATIONTARGETOBSERVER_H - -#include -#include -#include - - -/** -This class is used to define the capabilities of the current application, -and the implementation will generate AVRCP responses to the controller. -For the event part of the API, it is recommended to add all events which make -sense for the media player. In general, this will be everything except -ESystemStatusChanged. The company ID part of the API is only needed if -the media player needs to support vendor extensions other than bluetooth SIG. -The bluetooth SIG company ID is always included in responses to a COMPANY_ID request. -*/ -class MPlayerCapabilitiesObserver - { - public: - /** - Remove all notification events from the supported list - */ - IMPORT_C void ClearEvents(); - /** - Add a notification event to the supported list of events - The AVRCP 1.3 specification mandates that PlaybackStatusChanged - and TrackChanged events must be supported; KErrAlreadyExists will - be returned if AddEvent() is called with either of these events. - @param aEvent the event to add - @return KErrAlreadyExists if the event is already present. - KErrNotSupported if the event isn't supported by the implementation, e.g.. ESystemStatusChanged - */ - IMPORT_C TInt AddEvent(TRegisterNotificationEvent aEvent); - /** - Remove a notification event from the supported list of events - The AVRCP 1.3 specification mandates that PlaybackStatusChanged - and TrackChanged events must be supported; KErrNotSupported will - be returned if RemoveEvent() is called with either of these events. - @param aEvent the event to remove - @return KErrNone if this completes successfully, KErrNotFound if aID - was not in the list, or any other system wide error code. - */ - IMPORT_C TInt RemoveEvent(TRegisterNotificationEvent aEvent); - - const static TInt KMaxCompanyID = 0xFFFFFF; - const static TInt KMaxNrOfCompanyIDs = 255; - - /** - Remove all additional company IDs from the supported list - */ - IMPORT_C void ClearCompanyIds(); - /** - Add a company id to the supported list of company ids. - The AVRCP 1.3 specification mandates that the Bluetooth SIG vendor id - must be supported; KErrAlreadyExists will be returned if AddCompanyId() - is called with this company id. - @param aID the id to add - @return KErrNone if this completes successfully, - KErrAlreadyExists if aID is already present, - KErrOverflow if the maximum number of company ids are already listed, - or any other system wide error code. - */ - IMPORT_C TInt AddCompanyId(TInt aID); - /** - Remove a company id from the list of supported vendor extensions. - The Bluetooth SIG id can't be removed, as this must always be supported - @param aID the id to remove - @return KErrNone if this completes successfully, KErrNotFound if aID - was not in the list, or any other system wide error code. - */ - IMPORT_C TInt RemoveCompanyID(TInt aID); - - private: - virtual void DoClearEvents() = 0; - virtual TInt DoAddEvent(TRegisterNotificationEvent aEvent) = 0; - virtual TInt DoRemoveEvent(TRegisterNotificationEvent aEvent) = 0; - virtual void DoClearCompanyIds() = 0; - virtual TInt DoAddCompanyId(TInt aID) = 0; - virtual TInt DoRemoveCompanyID(TInt aID) = 0; - }; - -/** -This class is for supporting the player application settings PDUs in AVRCP1.3 -specification section 5.2. The RegisterNotification PDU for -EVENT_PLAYER_APPLICATION_SETTING_CHANGED is also supported through this API. - -The media player should first define all the attributes it supports, using -DefineAttributeL. When an attribute's value is changed by the media player, -it should call SetAttributeL to inform the controller. When the controller -changes a setting, the media player application receives a callback via the -MPlayerApplicationSettingsNotify interface -*/ -class MPlayerApplicationSettingsObserver - { - public: - /** - Define an attribute supported by this player. - It will be included in future responses to the following PDUs: - ListPlayerApplicationSettingAttributes, - ListPlayerApplicationSettingValues, - GetCurrentPlayerApplicationSettingValue, - GetPlayerApplicationSettingAttributeText, - GetPlayerApplicationSettingValueText, - @param aAttributeID The specification or player defined attribute - @param aAttributeText The UTF8 text name of the attribute(allowed text length is 1-255) - the API will take a copy - @param aValues The list of defined values - @param aValueTexts The UTF8 text for each defined value(allowed text length is 1-255) - The API will make copies. - @param aInitialValue The initial value for this attribute - @leave KErrNoMemory if memory could not be allocated to store the copies of aAttributeID and relative settings - @leave KErrNotSupported if attribute or value is out of specification defined range, - or aValueTexts is not equal length to aValues - */ - IMPORT_C void DefineAttributeL(TUint aAttributeID, - TDesC8& aAttributeText, - RArray &aValues, - RArray &aValueTexts, - TUint aInitialValue); - - /** - Set the current value of a previously defined attribute - This updates the cache and will cause completion of a - pending EVENT_PLAYER_APPLICATION_SETTING_CHANGED notification PDU - @param aAttributeID The specification or player defined attribute - @param aValue The current value - @leave KErrNotFound if the attribute is not defined, - KErrArgument if the value is not valid according to the definition - */ - IMPORT_C void SetAttributeL(TUint aAttributeID, TUint aValue); - - private: - virtual void DoDefineAttributeL(TUint aAttributeID, - TDesC8& aAttributeText, - RArray &aValues, - RArray &aValueTexts, - TUint aInitialValue) = 0; - virtual void DoSetAttributeL(TUint aAttributeID, TUint aValue) = 0; - - }; - -/** -This is a helper API allowing CPlayerApplicationSettings to be initialised -via a resource file. Using a resource file may help to provide localised text -for the attributes and values, according to current language setting of the phone. -*/ -class PlayerApplicationSettingsResourceInit - { - public: - /** - Defines multiple attributes supported by this player, which are listed in a resource file. - @param aSettings The CPlayerApplicationSettings object on which the attributes should be defined - @param aResource A fully constructed CResourceFile - @leave KErrNoMemory, or leave from CResourceFile functions - */ - IMPORT_C static void DefineAttributesL(MPlayerApplicationSettingsObserver& aSettings, CResourceFile &aResource); - }; - -/** -This class supports the notification PDUs in AVRCP1.3 specification section 5.4, -with the following exceptions: - EVENT_SYSTEM_STATUS_CHANGED is not supported, it is only for adaptors that plug into a media player - EVENT_PLAYER_APPLICATION_SETTING_CHANGED is supported through the CPlayerApplicationSettings API - -Events are pushed by the media player calling functions in this API, where they are -cached until the controller pulls them via a GetPlayStatus or RegisterNotification PDU -@see CPlayerApplicationSettings -*/ -class MPlayerEventsObserver - { - public: - enum TTargetBatteryStatus - { - ENormal = 0, - EWarning = 1, - ECritical = 2, - EExternal = 3, - EFullCharge = 4, - EUnknown = 5 - }; - - enum TPlaybackStatus - { - EStopped = 0, - EPlaying = 1, - EPaused = 2, - EFwdSeek = 3, - ERevSeek = 4, - EError = 0xFF - }; - - enum TPlayPosition - { - EStart = 0, - EMiddle = 1, - EEnd= 2, - }; - - static const TUint64 KNoTrackSelected = KMaxTUint64; - - static const TUint32 KPlaybackPositionUnknown = 0xFFFFFFFF; - - /** - Call this function whenever the playback status changes. - It will be used to complete pending EVENT_PLAYBACK_STATUS_CHANGED - and EVENT_PLAYBACK_POS_CHANGED notifications. - The value is used to generate the response to a GetPlayStatus PDU. - @param aStatus The specification defined playback status - */ - IMPORT_C void PlaybackStatusChanged(TPlaybackStatus aStatus); - /** - Call this function whenever the current media track is changed. - use KNoTrackSelected to indicate that there is no media selected. - This is the default value on construction. It will be used to - complete pending EVENT_TRACK_CHANGED and EVENT_PLAYBACK_POS_CHANGED notifications. - The values are used to generate the response to a GetPlayStatus PDU. - @param aTrackId A handle to the current track. - @param aLengthInMilliseconds The length of the current track. - */ - IMPORT_C void TrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds); - /** - Call this function whenever the current track reaches the end position, - e.g. due to playback or forward seek. It will be used to complete - pending EVENT_TRACK_REACHED_END and EVENT_PLAYBACK_POS_CHANGED notifications. - */ - IMPORT_C void TrackReachedEnd(); - /** - Call this function whenever the current track reaches the start position, - e.g. due to reverse seek (rewind). It will be used to complete pending - EVENT_TRACK_REACHED_START and EVENT_PLAYBACK_POS_CHANGED notifications. - */ - IMPORT_C void TrackReachedStart(); - /** - Call this function during playback or seek operations, to indicate the - current position within the track. It will be used to complete a pending - EVENT_PLAYBACK_POS_CHANGED notification. The value is used to generate the - response to a GetPlayStatus PDU. - @param aMilliseconds The current playback position. It is recommended to call - with a resolution <=1000ms to satisfy the 1s resolution of the notification - playback interval. - */ - IMPORT_C void SetPlaybackPosition(TUint32 aMilliseconds); - - /** - Call this function to report the current battery status - @param aBatteryStatus The current battery status. - */ - IMPORT_C void SetBatteryStatus(TTargetBatteryStatus aBatteryStatus); - - private: - virtual void DoPlaybackStatusChanged(TPlaybackStatus aStatus) = 0; - virtual void DoTrackChanged(TUint64 aTrackId, TUint32 aLengthInMilliseconds) = 0; - virtual void DoTrackReachedEnd() = 0; - virtual void DoTrackReachedStart() = 0; - virtual void DoSetPlaybackPosition(TUint32 aMilliseconds) = 0; - virtual void DoSetBatteryStatus(TTargetBatteryStatus aBatteryStatus) = 0; - - - }; - -/** -Clients must implement this interface if they require callbacks -when the controller has changed the settings via a SetPASValue message -*/ -class MPlayerApplicationSettingsNotify - { - public: - /** - This is called when the controller has changed a setting - @param aAttributeID A list of attribute IDs whose value has changed. - @param aAttributeValue A list of new values for the attributes listed in aAttributeID. - */ - virtual void MpasnSetPlayerApplicationValueL(const RArray& aAttributeID, - const RArray& aAttributeValue)=0; - }; - - -#endif // REMCONPLAYERINFORMATIONTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/pop3cmds.h --- a/epoc32/include/pop3cmds.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__POP3CMDS_H__) -#define __POP3CMDS_H__ - -#if !defined (__MSVSTD_HRH__) -#include -#endif - -/** POP3-specific commands that can be issued through CPop3ClientMtm::InvokeAsyncFunctionL(). -@publishedAll -@released -*/ -enum TPop3Cmds - { - /** Unsupported. */ - KPOP3MTMIsConnected = KMtmFirstFreeMtmFunctionId, - /** Attempt to connect to the current service. */ - KPOP3MTMConnect, - /** Disconnect from the current service. */ - KPOP3MTMDisconnect, - /** Unused. */ - KPOP3MTMCreateReceipt, - - // need to pass in destination in aParameter - /** Copy any new messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMCopyNewMailWhenAlreadyConnected, - /** Copy any new messages from the current service, and do not disconnect afterwards. */ - KPOP3MTMConnectAndCopyNewMailAndStayOnline, - /** Copy any new messages from the current service, and disconnect afterwards. */ - KPOP3MTMConnectAndCopyNewMailAndDisconnect, - /** Move any new messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMMoveNewMailWhenAlreadyConnected, - /** Move any new messages from the current service, and do not disconnect afterwards. */ - KPOP3MTMConnectAndMoveNewMailAndStayOnline, - /** Connect to current service, move any new messages, and disconnect afterwards. */ - KPOP3MTMConnectAndMoveNewMailAndDisconnect, - - // need to pass in destination in aParameter - /** Copy the specified messages from the current service, assuming a new connection - does not need to be made. */ - KPOP3MTMCopyMailSelectionWhenAlreadyConnected, - /** Connect to current service, copy the specified messages, and do not disconnect - afterwards. */ - KPOP3MTMConnectAndCopyMailSelectionAndStayOnline, - /** Connect to current service, copy the specified messages, and disconnect afterwards. */ - KPOP3MTMConnectAndCopyMailSelectionAndDisconnect, - /** Move the specified messages from the current service, assuming a new connection - does not need to be made. */ - KPOP3MTMMoveMailSelectionWhenAlreadyConnected, - /** Connect to current service, move the specified messages, and do not disconnect - afterwards. */ - KPOP3MTMConnectAndMoveMailSelectionAndStayOnline, - /** Connect to current service, move the specified messages, and disconnect afterwards. */ - KPOP3MTMConnectAndMoveMailSelectionAndDisconnect, - - // need to pass in destination in aParameter - /** Copy all messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMCopyAllMailWhenAlreadyConnected, - /** Connect to current service, copy all messages, and do not disconnect afterwards. */ - KPOP3MTMConnectAndCopyAllMailAndStayOnline, - /** Connect to current service, copy all messages, and disconnect afterwards. */ - KPOP3MTMConnectAndCopyAllMailAndDisconnect, - /** Move all messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMMoveAllMailWhenAlreadyConnected, - /** Connect to current service, move all messages, and do not disconnect afterwards. */ - KPOP3MTMConnectAndMoveAllMailAndStayOnline, - /** Connect to current service, move all messages, and disconnect afterwards. */ - KPOP3MTMConnectAndMoveAllMailAndDisconnect, - - /** Cancel all offline operations. */ - KPOP3MTMCancelOfflineOperations, - /** Unused. */ - KPOP3MTMCancelSendOnNextConnection, - /** Creates a new message. */ - KPOP3MTMCreateNewEmailMessage, - /** Creates a new reply message. */ - KPOP3MTMCreateReplyEmailMessage, - /** Creates a new forwarded message. */ - KPOP3MTMCreateForwardEmailMessage, - /** Creates a new forwarded message as an attachment. */ - KPOP3MTMCreateForwardAsAttachmentEmailMessage, - /** Creates a new message-receipt message. */ - KPOP3MTMCreateReceiptEmailMessage, - /** Populates the selection of messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMPopulate, - /** Populates any new messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMPopulateNew, - /** Populates all messages from the current service, assuming a new connection does - not need to be made. */ - KPOP3MTMPopulateAll - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/pop3set.h --- a/epoc32/include/pop3set.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,293 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__POP3SET_H__) -#define __POP3SET_H__ - - - - -#include -#include -#include - - - -/** Default POP3 server port number. */ -const TUint32 KPOP3DefaultPortNumber = 110; - -/** @deprecated */ -const TInt32 KImPop3SynchroniseAll = -1; - -/** @deprecated */ -const TInt32 KImPop3SynchroniseNone = 0; - -/** -Specifies which parts of a POP3 message to download. Used when configuring the -POP3 service settings. - -@see -CImPop3Settings - -@publishedAll -@released -*/ -enum TPop3GetMailOptions - { - /** Message headers only. */ - EGetPop3EmailHeaders, - /** Complete message. */ - EGetPop3EmailMessages - }; - - -class TPop3Progress -/** -Progress information for a POP3 operation. - -@publishedAll -@released -*/ - { -public: - IMPORT_C TInt ConnectionState() const; - IMPORT_C TInt ConnectionIAP() const; - -public: - /** Defines types of POP3 operations. */ - enum TPop3ProgressType - { - /** Refreshing view of remote mail box. */ - EPopRefreshing, - /** Copying messages. */ - EPopCopying, - /** Deleting messages. */ - EPopDeleting, - /** Connecting to remote mail box. */ - EPopConnecting, - /** Internal reorganisation. */ - EPopTidying, - /** Connected to remote mail box and no current operations. */ - EPopConnectedAndIdle, - /** Disconnecting from remote mail box. */ - EPopDisconnecting, - /** Disconnected from remote mail box. */ - EPopDisconnected, - /** Moving messages. */ - EPopMoving, - /** Copying new messages. */ - EPopCopyNewMail, - /** Moving new messages. */ - EPopMoveNewMail, - /** Copying a selection of messages. */ - EPopCopyMailSelection, - /** Moving a selection of messages. */ - EPopMoveMailSelection, - /** Copying all messages. */ - EPopCopyAllMail, - /** Moving all messages. */ - EPopMoveAllMail, - /** Populating view of remote mail box. */ - EPopPopulating, - /** Cancelling all off-line operations. */ - EPopCancellingOfflineOps, - /** Populating mailbox with top command */ - EPopTopPopulating, - /** Defines the maximum value for this enumeration. */ - EPopMaxProgressValue=EPopTopPopulating - }; - - /** Type of operation for which progress is being reported. */ - TPop3ProgressType iPop3Progress; // holds the progress for a 'super operation' - /** When in the EPopConnecting state, this member holds the connection - stage. Otherwise it holds the total number of messages for the operation. */ - TInt iTotalMsgs; - /** Remaining number of messages to process. */ - TInt iMsgsToProcess; - /** Number of bytes processed by the operation. */ - TInt iBytesDone; - /** When in the EPopConnecting state, this member holds the connection - iap value. Otherwise it holds the total number of bytes to progress for the - operation. */ - TInt iTotalBytes; - /** Operation error code. */ - TInt iErrorCode; // client side needs to be informed of an error - /** Type of the sub-operation, where a nested operations is occurring. */ - TPop3ProgressType iPop3SubStateProgress; // holds the progress for the substate of the 'super operation' - /** Service performing the operation. */ - TMsvId iServiceId; - /** The total size of messages to be downloaded. */ - TInt iTotalSize; // The total size of messages to be downloaded. - }; - - -class TImPop3GetMailInfo -/** -Use to specify the maximum message size and the destination folder ID for -certain POP3 operations. - -@see -CPop3ClientMtm - -@publishedAll -@released -*/ - { -public: - /** Maximum message size for the operation. */ - TInt32 iMaxEmailSize; - /** ID of the destination folder for the operation. */ - TMsvId iDestinationFolder; - }; - -class TImPop3PopulateOptions -/** -Use to specify the population limit for the POP3 top command - -@see -CPop3ClientMtm - -@publishedAll -@released -*/ - { -private: - /** Version of this GetMailInfo class, breaks coding standard by putting a private member at - the beginning to enable unpacking code to check the version before unpacking the rest of the class */ - TInt32 iVersion; - -public: - IMPORT_C TImPop3PopulateOptions(); - IMPORT_C static void UnpackL(const TDesC8& aDesc, TImPop3PopulateOptions &aUnpackTo); - - IMPORT_C TInt MaxEmailSize(); - IMPORT_C void SetMaxEmailSize(TInt aMaxEmailSize); - IMPORT_C TInt PopulationLimit(); - IMPORT_C void SetPopulationLimit(TInt aPopulationLimit); - -private: - /** Maximum message size for the operation. */ - TInt32 iMaxEmailSize; - /** Population limit for Populate operation, set to -1 for total populate */ - TInt32 iPopulationLimit; - /** Construction utility function */ - }; - - -class CImPop3Settings : public CImBaseEmailSettings -/** -Run-time configuration settings for POP3. - -Messaging clients should use an instance of this class to specify -and retrieve configuration settings that are used by the POP3 service when -executing email operations. - -Service settings such as the user name and password, whether to authenticate -using APOP or plain text, the maximum size of an email to download, and the -maximum number of messages to synchronise can be specified using this class. -Storing and restoring from the message store is also supported. - -To use this class to change a setting: -1) Set the current context to the POP3 service entry using CMsvStore. -2) Create an instance of CImPop3Settings and put it on the cleanup stack. -3) Retrieve the existing settings by calling CImPop3Settings::RestoreL(). -4) Change the inbox synchronisation limit setting by calling CImPop3Settings::SetInboxSynchronisationLimit(). -5) Save the new settings by calling CImPop3Settings::StoreL(). -6) Pop and destroy the CImPop3Settings instance. - -@see CMsvStore -@publishedAll -@released -*/ - { -public: - IMPORT_C CImPop3Settings(); - IMPORT_C virtual ~CImPop3Settings(); - IMPORT_C void Reset(); - IMPORT_C const TPtrC8 LoginName() const; - IMPORT_C void SetLoginNameL(const TDesC8&); - IMPORT_C const TPtrC8 Password() const; - IMPORT_C void SetPasswordL(const TDesC8&); - IMPORT_C TBool AutoSendOnConnect() const; - IMPORT_C void SetAutoSendOnConnect(TBool aFlag); - IMPORT_C TBool Apop() const; - IMPORT_C void SetApop(TBool aFlag); - IMPORT_C TBool DisconnectedUserMode() const; - IMPORT_C void SetDisconnectedUserMode(TBool aFlag); - IMPORT_C TBool DeleteEmailsWhenDisconnecting() const; - IMPORT_C void SetDeleteEmailsWhenDisconnecting(TBool aFlag); - IMPORT_C TBool AcknowledgeReceipts() const; - IMPORT_C void SetAcknowledgeReceipts(TBool aFlag); - IMPORT_C TInt MaxEmailSize() const; - IMPORT_C void SetMaxEmailSize(const TInt aMaxEmailSize); - IMPORT_C TPop3GetMailOptions GetMailOptions() const; - IMPORT_C void SetGetMailOptions(TPop3GetMailOptions aGetMailOptions); - IMPORT_C CImPop3Settings& CopyL(const CImPop3Settings& aCImPop3Settings); - IMPORT_C TBool operator==(const CImPop3Settings& aCImPop3Settings) const; - IMPORT_C TInt32 InboxSynchronisationLimit() const; - IMPORT_C void SetInboxSynchronisationLimit(const TInt32 aInboxSyncLimit); - IMPORT_C TInt32 PopulationLimit() const; - IMPORT_C void SetPopulationLimitL(const TInt32 aPopulationLimit); - IMPORT_C void SetTlsSslDomainL(const TDesC8& aDomainName); - IMPORT_C TPtrC8 TlsSslDomain() const; - -private: - class TImPop3SettingsExtension - { - public: - inline TImPop3SettingsExtension(); - public: - HBufC8* iLoginName; - HBufC8* iPassword; - HBufC8* iTlsSslDomain; - TInt32 iPopulationLimit; - }; - inline TImPop3SettingsExtension* Extension() const; - inline void CheckExtensionExistsL(); - - enum TImPop3EmailSettings - { - KPop3SettingsClearFlag = 0x00000000, - KPop3BaseEmailSettingsLastUsedFlag = CImBaseEmailSettings::EBaseEmailSettingsLastUsedFlag, //0x00000002 - KPop3ApopFlag = KPop3BaseEmailSettingsLastUsedFlag << 1, //0x00000004 - KPop3AutoSendFlag = KPop3ApopFlag << 1, //0x00000008 - KPop3DisconnectedModeFlag = KPop3AutoSendFlag << 1, //0x00000010 - KPop3DeleteEmailsWhenDisconnectingFlag = KPop3DisconnectedModeFlag << 1, //0x00000020 - KPop3AcknowledgeReceipts = KPop3DeleteEmailsWhenDisconnectingFlag << 1, //0x00000040 - KPop3EmailSettingsLastUsedFlag = KPop3AcknowledgeReceipts //0x00000040 - }; - - TImPop3SettingsExtension* iExtension; // renamed iReceiptAddress - TInt32 iInboxSyncLimit; - TInt32 iMaxEmailSize; - TPop3GetMailOptions iGetMailOptions; - }; - -inline CImPop3Settings::TImPop3SettingsExtension* CImPop3Settings::Extension() const - { - return iExtension; - } - -inline void CImPop3Settings::CheckExtensionExistsL() - { - if (!iExtension) - iExtension=new (ELeave) CImPop3Settings::TImPop3SettingsExtension; - } - -inline CImPop3Settings::TImPop3SettingsExtension::TImPop3SettingsExtension() : iLoginName(NULL) , iPassword(NULL), iTlsSslDomain(NULL) - { - } - -#endif // #define __POP3SET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/popcmtm.h --- a/epoc32/include/popcmtm.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Client MTM for the POP3 protocol -// -// - - -#if !defined (__POPCMTM_H__) -#define __POPCMTM_H__ - -#if !defined (__MIUTMSG_H__) -#include -#endif -#if !defined (__MIUTPARS_H__) -#include //TImMessageField -#endif -#if !defined (__POP3CMDS_H__) -#include // KPOP3MTMConnect etc -#endif -#if !defined (__POP3SET_H__) -#include // KPOP3MTMConnect etc -#endif - -class CImPOP3GetMail; -class CImEmailAutoSend; - -/////// Pop3 Client MTM ///////////////////////////////////////////////////////////////////////////// -class CPop3ClientMtm : public CBaseMtm -/** POP3 client MTM interface. - -Most of the functions in this class are implementations of the virtual functions -defined by the base class CBaseMtm. -@publishedAll -@released -*/ - { -/** -@deprecated -*/ - -public: - enum TImPopcNewEmailHeaderType - { - EForwardedEmail, - EReplyToEmail, - EReceiptToEmail - }; - -public: - IMPORT_C static CPop3ClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); - ~CPop3ClientMtm(); - - void SaveMessageL(); - void LoadMessageL(); - - IMPORT_C void StoreSettingsL(); - IMPORT_C void RestoreSettingsL(); - - CMsvOperation* ReplyL (TMsvId aId, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus); - CMsvOperation* ForwardL(TMsvId aId, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); - - TUint ValidateMessage(TMsvPartList aPartList); - TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); - - void AddAddresseeL(const TDesC& aRealAddress); - void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); - void RemoveAddressee(TInt aIndex); - - IMPORT_C void SetSettingsL(const CImPop3Settings& aSettings); - IMPORT_C const CImPop3Settings& Settings() const; - - // --- RTTI functions --- - TInt QueryCapability(TUid aCapability, TInt& aResponse); - void InvokeSyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter); - CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId, const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); - - // Attachment functions to support the SendAs API - IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); - EXPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void CreateMessageL(TMsvId aServiceId); - - IMPORT_C virtual TMsvId DefaultServiceL() const; - IMPORT_C virtual void RemoveDefaultServiceL(); - IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); - -protected: - CPop3ClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); - void ConstructL(); - void ContextEntrySwitched(); - -private: - TBool ValidateAddress(const TPtrC& anAddress); - void SendOnNextConnectionL(); - TMsvPartList DoFindL(const TDesC& aTextToFind, TMsvPartList aPartList); - CMsvEntrySelection* FilteredChildrenLC(TBool aNewOnly, TInt aMaxEmailSize); - CMsvEntrySelection* FilteredSelectionLC(TInt aMaxEmailSize, const CMsvEntrySelection& aSelection); - - - -private: - CImPop3Settings* iImPop3Settings; - TImMessageField iTImMessageField; - CImHeader* iHeader; - - HBufC* iEmailAddressFormatString; // defines format of email address used by "Send as" API eg _LIT("/"%S/" <%S>") - CImEmailOperation* iImEmailOperation; - CImPOP3GetMail* iImPOP3GetMail; - }; - - -class CImPOP3GetMail : public CMsvOperation -/** Encapsulates an operation to copy/move POP3 emails from the remote inbox to -any local folder. - -Functionality is provided to: - -1. copy/move any new emails - -2. copy/move a selection of emails - -3. copy/move all emails - -4. in the Remote Inbox to a local folder. - -There are three cases for copying/moving the emails from the Remote Inbox: - -1. the user is connected to the account so just copy/move the emails - -2. the user is not connected to the account so connect, copy/move the emails, -and then disconnect - -3. the user is not connected to the account so connect, copy/move the emails, -and then stay online - -Objects of this type are returned from CPop3ClientMtm::InvokeAsyncFunctionL() -when a suitable get command is requested. -@publishedAll -@released -*/ - { -public: - /** Defines types of get mail operation. */ - enum TImPOP3GetMailType - { - /** Connect and copy new mail and stay online. */ - EConnectAndCopyNewMailAndStayOnline, - /** Connect and copy new mail and disconnect. */ - EConnectAndCopyNewMailAndDisconnect, - /** Connect and move new mail and stay online. */ - EConnectAndMoveNewMailAndStayOnline, - /** Connect and move new mail and disconnect. */ - EConnectAndMoveNewMailAndDisconnect, - /** Connect and copy mail selection and stay online. */ - EConnectAndCopyMailSelectionAndStayOnline, - /** Connect and copy mail selection and disconnect. */ - EConnectAndCopyMailSelectionAndDisconnect, - /** Connect and move mail selection and stay online. */ - EConnectAndMoveMailSelectionAndStayOnline, - /** Connect and move mail selection and disconnect. */ - EConnectAndMoveMailSelectionAndDisconnect, - /** Connect and copy all mail and stay online. */ - EConnectAndCopyAllMailAndStayOnline, - /** Connect and copy all mail and disconnect. */ - EConnectAndCopyAllMailAndDisconnect, - /** Connect and move all mail and stay online. */ - EConnectAndMoveAllMailAndStayOnline, - /** Connect and move all mail and disconnect. */ - EConnectAndMoveAllMailAndDisconnect - }; - -public: - IMPORT_C CMsvOperation* GetMailL(CPop3ClientMtm& aPop3ClientMtm, TRequestStatus& aObserverRequestStatus, const CMsvEntrySelection& aMsvEntrySelection, TDes8& aPop3GetMailInfo, TImPOP3GetMailType aPOP3GetMailType); - IMPORT_C const TDesC8& FinalProgress(); - IMPORT_C ~CImPOP3GetMail(); - void DoCancel(); - void RunL(); - const TDesC8& ProgressL(); -private: - CImPOP3GetMail(CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus, CPop3ClientMtm& aPop3ClientMtm, TImPOP3GetMailType aPOP3GetMailType); - void ConstructL(const CMsvEntrySelection& aMsvEntrySelection, TDes8& aPop3GetMailInfo); - void SelectNextStateL(); // selects next state to go to - void ChangeStateL(); // initiates the next state operation - void SelectAndChangeToNextStateL(); - void RequestComplete(TInt aError); - void Complete(); - void ConnectToMailboxL(); - void CopyMoveNewMessagesL(TBool aCopy); - void CopyMoveMessageSelectionL(TBool aCopy); - void CopyMoveAllMessagesL(TBool aCopy); - void DisconnectFromMailboxL(); - void ResetProgress(); - void StoreProgressL(); -private: - enum TImPOP3GetMailState - { - EConnectToMailbox, - ECopyNewMessages, - EMoveNewMessages, - ECopyMessageSelection, - EMoveMessageSelection, - ECopyAllMessages, - EMoveAllMessages, - EDisconnectFromMailbox, - EFinished - }; - - CPop3ClientMtm& iPop3ClientMtm; - CMsvEntrySelection* iMsvEntrySelection; - CMsvOperation* iMsvOperation; - - TPop3Progress iProgress; - TPop3Progress iErrorProgress; - TImPOP3GetMailState iState; - TImPOP3GetMailType iPOP3GetMailType; - TPckgBuf iProgressBuf; - TPckgBuf iPop3GetMailInfo; - }; - -#endif // __POPCMTM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/pragmamessage.h --- a/epoc32/include/pragmamessage.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Created at: 20-Dec-99 10:38:03 AM -// Defines a macro for the file line pragma message -// -// - - -#if !defined __PRAGMAMESSAGE_H__ -#define __PRAGMAMESSAGE_H__ - -#define _QUOTE(x) # x -#define QUOTE(x) _QUOTE(x) - -// Use __FILE__LINE__ as a string containing "File.x(line#)" for example: -// #pragma message( __FILE__LINE__ "Remove this line after testing.") -// The above example will display the file name and line number in the build window -// in such a way as to allow you to double click on it to go to the line. -#define __FILE__LINE__ __FILE__ "(" QUOTE(__LINE__) ") : " - -#endif // __PRAGMAMESSAGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/prninf.h --- a/epoc32/include/prninf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,254 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __PRNINF_H__ -#define __PRNINF_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__GDI_H__) -#include -#endif -#if !defined(__FLDBASE_H__) -#include -#endif - -// Classes defined -//class TPageNumbers; -class CHeaderFooter; -class TPrintParameters; -class TPageMargins; -class MPrintProcessObserver; - -// classes referenced -class RReadStream; -class RWriteStream; -class CRichText; -class CParaFormatLayer; -class CCharFormatLayer; -class MFieldFileNameInfo; -class MFieldPageNumInfo; -class MFieldNumPagesInfo; -////////////////// - - -class TPrintParameters -/** Print parameters. - -This data is associated with a particular print request, not with the document -to be printed, so is separate from the print setup information. - -An object of this class is passed to CPrintSetup::StartPrintL() and to CPrintSetup::StartPreviewPrintL(). - -@see CPrintSetup -@publishedAll -@released */ - { -public: - IMPORT_C TPrintParameters(); // sets to 1,0,0 -public: - /** The number of copies to print. */ - TInt iNumCopies; - /** The first page to be printed. - - This value should be less than or equal to iLastPage. Zero indicates the first page - in the document. */ - TInt iFirstPage; - /** The last page to be printed. - - This value should be greater than or equal to iFirstPage. Zero indicates the first - page in the document. */ - TInt iLastPage; - }; - -class TPageMargins -/** Page margins. - -Page margins are accessed via the public iPageMarginsInTwips member of class -CPrintSetup. A single margin settings object applies throughout a document, -so that gutter margins are not supported. - -If the document contains headers and footers, they are located within the -top and bottom margins respectively. - -@publishedAll -@released */ - { -public: - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream)const; -public: - /** The distance between the top of the header and the top of the page in twips - or pixels. - - This must be less than the height of the top margin to ensure that the header - is visible. */ - TInt iHeaderOffset; - /** The distance between the top of the footer and the top of the bottom margin - in twips or pixels. - - This must be less than the height of the bottom margin to ensure that the - footer is visible. */ - TInt iFooterOffset; - /** The widths of each of the four margins in twips or pixels. - - @see TMargins */ - TMargins iMargins; - }; - -class CHeaderFooter : public CBase, private MTextFieldFactory -/** A document header or footer. - -The header is located in the top page margin and the footer in the -bottom page margin. No more than one header or footer can exist in a document. - -CHeaderFooter derives from MTextFieldFactory. This allows the insertion of -various fields, including page number, current date or time and filename. - -Rich text manipulation and formatting functions can be accessed through -the rich text object which is owned by the header/footer. - -The header and footer are retrieved using the CPrintSetup::Header() and Footer() -functions and they are stored and restored together with the rest of the print -setup information. - -@publishedAll -@released */ - { -public: - IMPORT_C static CHeaderFooter* NewL(); - IMPORT_C virtual ~CHeaderFooter(); - // - IMPORT_C void CreateTextL(); - IMPORT_C void SetFirstPageToPrintTo(TInt aPageNum); // allows the first few pages of a doc not to have a header on them - inline TInt FirstPageToPrintTo()const; // relative to the first page being numbered 0 - // - // persistence - IMPORT_C TStreamId StoreL(CStreamStore& aStore)const; - IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aStreamId,MPictureFactory* aFactory); - IMPORT_C void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)const; - IMPORT_C void RestoreComponentsL(const CStreamStore& aStore,MPictureFactory* aFactory); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C void InternalizeL(RReadStream& aStream); - // - // text bits - IMPORT_C CRichText* Text()const; - IMPORT_C CParaFormatLayer* ParaFormat()const; - IMPORT_C CCharFormatLayer* CharFormat()const; - IMPORT_C void SetText(CRichText* aText); // takes ownership - IMPORT_C void SetParaFormat(CParaFormatLayer* aParaFormat); // takes ownership - IMPORT_C void SetCharFormat(CCharFormatLayer* aCharFormat); // takes ownership - // - // field bits - IMPORT_C void SetFileNameInfo(const MFieldFileNameInfo& aFileNameInfo); // call if you want headers/footers to support filename fields - IMPORT_C void SetNumPagesInfo(const MFieldNumPagesInfo& aNumPagesInfo); // call if you want headers/footers to support "total number of pages" fields - inline MFieldFileNameInfo* FileNameFieldInfo()const; - inline MFieldNumPagesInfo* NumPagesFieldInfo()const; - // - void SetPageNumInfo(const MFieldPageNumInfo& aPageNumInfo); // called by CPrintSetup -private: - CHeaderFooter(); - void CreateFormatLayersL(); - // from MTextFieldFactory - CTextField* NewFieldL(TUid aFieldType); -private: - TInt iFirstPageToPrintTo; // relative to the first page being numbered 0 - MFieldFileNameInfo* iFileNameInfo; - MFieldPageNumInfo* iPageNumInfo; - MFieldNumPagesInfo* iNumPagesInfo; - CRichText* iText; // RichText Doc Handle - CParaFormatLayer* iParaLayer; - CCharFormatLayer* iCharLayer; -private: - enum { ETextExists = 0x0001 }; - }; - -class MPrintProcessObserver -/** Print progress and status notification interface class. - -The notification functions are called before, during and after a print or -print preview operation, to give notification of its progress. - -The print process observer will often be the GUI's standard print progress -or print preview dialog. - -An object of a class which implements this interface may be passed as a parameter -to CPrintSetup::StartPrintL(), or to CPrintSetup::StartPreviewPrintL(). - -@publishedAll -@released */ - { -public: - /** Notifies that a print or print preview operation is about to begin. - - It may be used to display information about the document to be printed. It - is called once, immediately before printing or print previewing begins. - - When subclassing, add variables to store initialisation information as required. - - @param aPrintParams The parameters for the print job. */ - virtual void NotifyPrintStarted(TPrintParameters aPrintParams)=0; - /** Notifies that a band is about to be printed. - - It may be used to display print progress information, including the current - page number. It is called immediately before each band is printed. - - @param aPercentageOfPagePrinted The percentage of the page that has been printed. - @param aCurrentPageNum The number of the page currently being printed. - @param aCurrentCopyNum The number of the copy currently being printed (if multiple - copies are being printed). */ - virtual void NotifyBandPrinted(TInt aPercentageOfPagePrinted, TInt aCurrentPageNum, TInt aCurrentCopyNum)=0; - /** Notifies that the print or print preview operation has completed. - - It may be used to display information about how the operation completed, for - example any errors that occurred. It is called once, immediately after the - print job terminates. - - @param anErrorCode KErrNone if the print job completed successfully, otherwise - another of the system-wide error codes. */ - virtual void NotifyPrintEnded(TInt anErrorCode)=0; - // - }; - - -// -// inlines -// - -inline TInt CHeaderFooter::FirstPageToPrintTo()const -/** Gets the first page on which the header or footer is to be printed. - -Page numbering begins at zero. - -@return The number of the first page on which the header or footer is to be -printed. */ - { return iFirstPageToPrintTo; } - -inline MFieldFileNameInfo* CHeaderFooter::FileNameFieldInfo()const -/** Gets the object which implements the MFieldFileNameInfo interface, as set by -SetFileNameInfo(). - -@return The object which implements the MFieldFileNameInfo interface. */ - { return iFileNameInfo; } - -inline MFieldNumPagesInfo* CHeaderFooter::NumPagesFieldInfo()const -/** Gets the object which implements the MFieldNumPagesInfo interface, as set by -SetNumPagesInfo(). - -@return The object which implements the MFieldNumPagesInfo interface. */ - { return iNumPagesInfo; } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/prnprev.h --- a/epoc32/include/prnprev.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__PRNPREV_H__) -#define __PRNPREV_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__PRNSETUP_H__) -#include -#endif - -// classes defined: -class TPrintPreviewFormat; -class TPreviewPanel; -class CPrintPreviewImage; -// - -// forward references: -class RWsSession; -class RWindow; -class CPrintPreviewDevice; -// - - -class TPrintPreviewFormat -/** Print preview format information. - -The print preview format information is accessed via its public data members. -Typically there is a system wide TPrintPreviewFormat supplied by the GUI framework. - -Preview information includes: - -- panel settings: multiple pages can be previewed at once; the display area -for each page is termed a panel. - -- label settings: each panel can have an associated label, which specifies the -corresponding document page number - -@publishedAll -@released */ - { -public: - /** The minimum panel gutter size, in pixels. */ - TSize iMinPanelGutterInPixels; - /** The width of the panel shadow, in pixels. */ - TInt iPanelShadowWidthInPixels; - /** The colour of the panel shadow. */ - TRgb iPanelShadowColor; - /** The panel margin colour. */ - TRgb iPanelMarginColor; - /** The color of both the paper and the window background. */ - TRgb iPreviewBackgroundColor; - /** X pixel offset of the label text from the panel edge. */ - TInt iLabelOffsetInPixels; - /** Font specification for the label text. */ - TFontSpec iLabelFontSpecInPixels; - }; - - -class CPrintPreviewImage : public CBase, private MPrintProcessObserver, private MPageRegionPrinter -/** Print preview image. - -This class provides a standard print preview image. An object of this type -should be owned by a control, which is in turn owned by the print preview -dialog. The control's window provides the region into which this object draws -the preview image. - -The class provides a callback to the application code that draws the preview -pages. - -@publishedAll -@released */ - { -public: - /** Margin display state flags. */ - enum TMarginState { - /** Show margins in print preview image. */ - EShowMargins, - /** Hide margins in print preview image. */ - EHideMargins - }; -public: - IMPORT_C static CPrintPreviewImage* NewL(CPrintSetup& aPrintSetup,MPageRegionPrinter& aBodyPrinter, - RWsSession& aWsSession,RWindow& aWindow,const TSize& aMaxWindowSize, - const TPrintPreviewFormat& aStaticFormat); - IMPORT_C virtual ~CPrintPreviewImage(); - IMPORT_C void SetMargins(TMarginState aState); // whether or not to show margins - IMPORT_C void SetObserver(MPrintProcessObserver& aObserver); - IMPORT_C void SetNumBands(TInt aNum); - IMPORT_C void FormatL(TInt aNumPagesInDoc,TInt aFirstPageToDisplay,TInt aNumPagesToView); // call when scrolling or changing num pages to view - IMPORT_C void DrawL(const TPoint& aOrigin,const TRect& aInvalidRegion); // aOrigin is the point in the window I will treat as the origin (ie offset) - // -private: - class TPreviewPanel; - class TRange - { - public: - TInt iFrom; - TInt iTo; - }; -private: - CPrintPreviewImage(CPrintSetup& aPrintSetup,MPageRegionPrinter& aBodyPrinter,RWsSession& aWsSession, - RWindow& aWindow,const TSize& aMaxWindowSize,const TPrintPreviewFormat& aStaticFormat); - void ConstructL(); - void CalculateHeaderFooterRects(TRect& aHeaderRectInPixels,TRect& aFooterRectInPixels); - TInt SetPanelArrayL(const TInt aFirstPage,const TInt aNumPagesToView); - void SetLabelWidth(); - void ScrollPanels(); - void DrawBorder(CGraphicsContext* aGc); // and shadow - void DrawMargins(CGraphicsContext* aGc); // including header/footer lines - void DrawLabel(CGraphicsContext* aGc,TInt aPageNo); - void DrawToGutter(CGraphicsContext* aGc,TInt aPageNo); // blanks all the gutter areas associated to a particular panel - void DrawExtremities(CGraphicsContext* aGc); // blanks very left and right of the window - inline TBool IsFirstPanel(TInt aPageNum); - inline TBool IsLastPanel(TInt aPageNum); - // from MPrintProcessObserver - virtual void NotifyPrintStarted(TPrintParameters aPrintParams); - virtual void NotifyBandPrinted(TInt aPercentageOfPagePrinted, TInt aCurrentPageNum, TInt aCurrentCopyNum); - virtual void NotifyPrintEnded(TInt anErrorCode); - // from MPageRegionPrinter - virtual void PrintBandL(CGraphicsDevice* aDevice,TInt aPageNo,const TBandAttributes& aBand); -private: - CPrintPreviewDevice* iDevice; - CPrintSetup* iPrintSetup; - MPageRegionPrinter* iAppBodyPrinter; - MPrintProcessObserver* iObserver; // may be null - RWsSession* iWsSession; - RWindow* iWindow; - CFont* iLabelFont; - CArrayFix* iPanelArray; - // - TPrintPreviewFormat iFormat; - TPrintParameters iPrintParams; // current preview range - TMarginState iMarginState; // whether the margins are on or not - TSize iPanelSizeInPixels; - TSize iWinSize; // size of the window (for layout purposes) - TPoint iOrigin; // origin in the window to use for drawing - TSize iLabelSize; - TSize iActualGutter; // gap from the edge of the panel to either screen edge or adjacent panel - TInt iNumPagesInDoc; - TInt iNumBands; - TSize iRndError; // rounding error from calculation of iActualGutter - TRange iDrawRange; // the pages that actually require drawing - ie have not been scrolled - }; - - -/** Internalises the margin state from a read stream. - -@param aThing The margin state to be internalised - on or off. -@param aStream The read stream from which the margin state is to be internalised. - -@publishedAll -@released */ -IMPORT_C void InternalizeL(CPrintPreviewImage::TMarginState& aThing,RReadStream& aStream); - -inline RWriteStream& operator<<(RWriteStream& aStream,const CPrintPreviewImage::TMarginState& aThing) -/** -@publishedAll -@released -*/ - {aStream.WriteUint8L(aThing);return aStream;} - -inline RReadStream& operator>>(RReadStream& aStream,CPrintPreviewImage::TMarginState& aThing) -/** -@publishedAll -@released -*/ - {InternalizeL(aThing,aStream);return aStream;} - -// -// inlines -// - -// move to private source... - -inline TBool CPrintPreviewImage::IsFirstPanel(TInt aPageNum) - { return aPageNum==iPrintParams.iFirstPage; } - -inline TBool CPrintPreviewImage::IsLastPanel(TInt aPageNum) - { return aPageNum==iPrintParams.iLastPage; } - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/prnsetup.h --- a/epoc32/include/prnsetup.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,168 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __PRNSETUP_H__ -#define __PRNSETUP_H__ - -#if !defined(__E32STD_H__) -#include -#endif -#if !defined(__E32BASE_H__) -#include -#endif -#if !defined(__FLDBLTIN_H__) -#include -#endif -#if !defined(__PRNINF_H__) -#include -#endif - -/** @publishedPartner */ -const TInt KErrMorePages=4747; // Leave with this error code to print extra pages in PrintBandL - -/** @internalTechnology */ -_LIT( KDefaultPrinterDriverPath, "\\resource\\printers\\" ); - -// Classes defined // -class CPrintSetup; -// - -// Forward Reference -class CPreviewProcess; -class CPrintProcess; -class CPdrModelList; -class CPdrDevice; -class CHeaderFooter; -class TPageSpec; -class RReadStream; -class RWriteStream; -class MPageRegionPrinter; -class RFs; -class CPrinterDriver; -class CPrinterDriverUI; -// - -class CPrintSetup : public CBase, private MFieldPageNumInfo -/** Print setup information. - -This class stores the information needed to set up, start and stop a print -job. This includes the target printer device, the page margins and -the header and footer. The page specification, (page orientation and page -dimensions) can be set via the printer device. - -Print setup information is associated with a document and is stored as part -of the persistent form of the document. Print parameters on the other hand, -(class TPrintParameters) are associated with a particular print request, -not with the document itself, so are not part of the print setup information. - -@publishedAll -@released */ - { -public: - IMPORT_C static CPrintSetup* NewL(); - IMPORT_C virtual ~CPrintSetup(); - // - // printer model selection/control functions - IMPORT_C void AddPrinterDriverDirL(const TDesC& aDriverDir); - IMPORT_C CPrinterModelList* ModelNameListL(RFs& aFs); - IMPORT_C void FreeModelList(); - IMPORT_C void CreatePrinterDeviceL(TInt aModelIndex); // requires ModelList to exist - IMPORT_C void CreatePrinterDeviceL(TUid aModelUid,RFs& aFs); - IMPORT_C CPrinterDevice* PrinterDevice()const; - IMPORT_C CPrinterDriverUI* CreatePrinterDriverUIL(); // ownership is transfered to the caller - // - // print functions - IMPORT_C void EndPrint(); - IMPORT_C TInt StartPrintL(const TPrintParameters& aPrintParams,MPageRegionPrinter& aBodyPrinter, - CPrinterPort* aPort,MPrintProcessObserver* anObserver); - IMPORT_C TInt StartPreviewPrintL(const TPrintParameters& aPrintParams,MPageRegionPrinter& aBodyPrinter, - MPrintProcessObserver* anObserver,CGraphicsDevice& aPreviewDev,const TRect& aHeaderRectInPixels, - const TRect& aFooterRectInPixels,TInt aNumBands); - // - // accessors - inline CHeaderFooter* Header()const; - inline CHeaderFooter* Footer()const; - // - // persistence - IMPORT_C TStreamId StoreL(CStreamStore& aStore)const; - IMPORT_C void RestoreL(const CStreamStore& aStore,TStreamId aStreamId,const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,MPictureFactory* aFactory=NULL); - IMPORT_C void StoreComponentsL(CStreamStore& aStore,CStoreMap& aMap)const; - IMPORT_C void RestoreComponentsL(const CStreamStore& aStore,const MFieldFileNameInfo* aFileNameInfo=NULL,const MFieldNumPagesInfo* aNumPagesInfo=NULL,MPictureFactory* aFactory=NULL); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C void InternalizeL(RReadStream& aStream); - // -private: - CPrintSetup(); - void ConstructL(); - void DoStartPrintL(const TPrintParameters& aPrintParams,MPageRegionPrinter& aBodyPrinter,MPrintProcessObserver* aObserver,CPrinterPort* aPort); - void InitializePrintingL(CGraphicsDevice* aPrinterDev,const TPrintParameters& aPrintParams,MPrintProcessObserver* aObserver); - void InitializePrintingL(const TPrintParameters& aPrintParams,MPrintProcessObserver* aObserver, - const TRect& aHeaderRectInPixels,const TRect& aFooterRectInPixels); - // from MFieldPageNumInfo - TInt UpdateFieldPageNum()const; -public: - // Info regarding print setup etc. - /** The header and footer offset and the width of the four margins. - - All measurements are in twips. - - @see TPageMargins */ - TPageMargins iPageMarginsInTwips; - /** The number of the first page in the document. - - This value is used for printing or displaying page numbering. Note that all - other page numbering is zero indexed, to preserve independence from user-defined - page numbering. */ - TInt iNumOfFirstPage; // value to start page numbering at -private: - enum { - ENumberFirstPage = 0x0001, - }; -private: - CHeaderFooter* iHeader; - CHeaderFooter* iFooter; - CPrinterDriver* iPrinterDriver; // the target printer driver - CPreviewProcess* iPrintProcess; - CPdrModelList* iModelList; - MPrintProcessObserver* iPrintObserver; - TPrintParameters iPrintParams; // not persisted - CArrayFixSeg* iDriverDirList; - }; - - -// -// inlines -// - -inline CHeaderFooter* CPrintSetup::Header()const -/** Gets the header. - -The CPrintSetup object owns the header and footer. CPrintSetup implements -the MFieldPageNumInfo interface, which allows page numbering to be easily -added to fields. - -@return The header. */ - { return iHeader; } - -inline CHeaderFooter* CPrintSetup::Footer()const -/** Gets the footer. - -@return The footer. */ - { return iFooter; } - - - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/prnuids.h --- a/epoc32/include/prnuids.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __PRNUIDS_H__ -#define __PRNUIDS_H__ - -#if !defined(__E32STD_H__) -#include -#endif - - -/** -@publishedAll -@released -*/ -// Uid of the stream in which CPrintSetup data should be stored -const TUid KUidPrintSetupStream={268435717}; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remconbatterytarget.h --- a/epoc32/include/remconbatterytarget.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONBATTERYTARGET_H -#define REMCONBATTERYTARGET_H - -#include -#include -#include - -class MRemConBatteryTargetObserver; -class MRemConCoreApiTargetObserver; -class CRemConInterfaceSelector; - -/** -Client-instantiable type supporting sending Battery Status responses. -*/ -NONSHARABLE_CLASS(CRemConBatteryApiTarget) : public CRemConInterfaceBase, - public MRemConInterfaceIf - { -public: - /** - Factory function. - @see CRemConInterfaceSelector - @see MRemConBatteryTargetObserver - @param aInterfaceSelector The interface selector. The client must have - created one of these first. - @param aObserver The observer of this interface. - @return A new CRemConBatteryApiTarget, owned by the interface selector. - */ - IMPORT_C static CRemConBatteryApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, - MRemConBatteryTargetObserver& aObserver); - - /** Destructor */ - IMPORT_C ~CRemConBatteryApiTarget(); - -private: - /** - Constructor. - @param aInterfaceSelector The interface selector. - @param aObserver The observer of this interface. - */ - CRemConBatteryApiTarget(CRemConInterfaceSelector& aInterfaceSelector, - MRemConBatteryTargetObserver& aObserver); - - void ConstructL(); - -private: // from CRemConInterfaceBase - TAny* GetInterfaceIf(TUid aUid); - -private: // from MRemConInterfaceIf - void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); - -private: // unowned - MRemConBatteryTargetObserver& iObserver; - -private: // owned - CBufFlat* iOutData; - - - }; - -#endif // REMCONBATTERYTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remconbatterytargetobserver.h --- a/epoc32/include/remconbatterytargetobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONBATTERYTARGETOBSERVER_H -#define REMCONBATTERYTARGETOBSERVER_H - -#include -#include - -/** -Clients must implement this interface in order to instantiate objects of type -CRemConBatteryTarget. This interface passes incoming commands from RemCon to -the client. -*/ -class MRemConBatteryTargetObserver - { -public: - /** - A 'InformBatteryStatusOfCT' has been received. - @param aBatteryStatus The current battery status. - */ - virtual void MrcbstoBatteryStatus(TControllerBatteryStatus& aBatteryStatus) = 0; - - }; - -#endif // REMCONBATTERYSTATUSTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remcongroupnavigationtarget.h --- a/epoc32/include/remcongroupnavigationtarget.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,106 +0,0 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONGROUPNAVIGATIONTARGET_H -#define REMCONGROUPNAVIGATIONTARGET_H - -#include -#include -#include -#include - -#include -#include -#include - -class MRemConGroupNavigationTargetObserver; -class CRemConInterfaceSelector; - -/** -Client-instantiable type supporting sending Battery Status responses. -*/ -NONSHARABLE_CLASS(CRemConGroupNavigationApiTarget) : public CRemConInterfaceBase, - public MRemConInterfaceIf - { -public: - /** - Factory function. - @see CRemConInterfaceSelector - @param aInterfaceSelector The interface selector. The client must have - created one of these first. - @param aObserver The observer of this interface. - @return A new CRemConGroupNavigationApiTarget, owned by the interface selector. - */ - IMPORT_C static CRemConGroupNavigationApiTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, - MRemConGroupNavigationTargetObserver& aObserver); - - /** Destructor */ - IMPORT_C ~CRemConGroupNavigationApiTarget(); - -public: - /** Send a 'next group' response. - Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoNextGroup(). - @param aStatus Used by RemCon to indicate completion of the send request. - aStatus may be NULL if no completion indication required. - @param aError The response error. - */ - IMPORT_C void NextGroupResponse(TRequestStatus*& aStatus, TInt aError); - - /** Send a 'previous group' response. - Called by the client after receiving a MRemConGroupNavigationTargetObserver::MrcgntoPreviousGroup(). - @param aStatus Used by RemCon to indicate completion of the send request. - aStatus may be NULL if no completion indication required. - @param aError The response error. - */ - IMPORT_C void PreviousGroupResponse(TRequestStatus*& aStatus, TInt aError); - -private: - /** - Constructor. - @param aInterfaceSelector The interface selector. - @param aObserver The observer of this interface. - */ - CRemConGroupNavigationApiTarget(CRemConInterfaceSelector& aInterfaceSelector, - MRemConGroupNavigationTargetObserver& aObserver); - - void SendGroupResponse(TGroupNavigationPassthroughOperationIds aId, TRequestStatus*& aStatus, TInt aError); - - void ConstructL(); - -private: // from CRemConInterfaceBase - TAny* GetInterfaceIf(TUid aUid); - -private: // from MRemConInterfaceIf - void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); - -private: // unowned - MRemConGroupNavigationTargetObserver& iObserver; - -private: // owned - CBufFlat* iOutData; - TPtr8 iPtr; - RBufWriteStream iStream; - - }; - -#endif // REMCONGROUPNAVIGATIONTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remcongroupnavigationtargetobserver.h --- a/epoc32/include/remcongroupnavigationtargetobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -// Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONGROUPNAVIGATIONTARGETOBSERVER_H -#define REMCONGROUPNAVIGATIONTARGETOBSERVER_H - -#include -#include - -/** -Clients must implement this interface in order to instantiate objects of type -CRemConGroupNavigation. This interface passes incoming commands from RemCon to -the client. -*/ -class MRemConGroupNavigationTargetObserver - { -public: - /** - A 'Next Group' has been received. - @see TRemConCoreApiButtonAction - @param aButtonAct The button action associated with the command. - */ - virtual void MrcgntoNextGroup(TRemConCoreApiButtonAction aButtonAct) = 0; - - /** - A 'Previous Group' has been received. - @see TRemConCoreApiButtonAction - @param aButtonAct The button action associated with the command. - */ - virtual void MrcgntoPreviousGroup(TRemConCoreApiButtonAction aButtonAct) =0; - - }; - -#endif // REMCONGROUPNAVIGATIONTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remconmediainformationtarget.h --- a/epoc32/include/remconmediainformationtarget.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONMEDIAINFORMATIONTARGET_H -#define REMCONMEDIAINFORMATIONTARGET_H - -#include -#include -#include -#include -#include - -class CRemConInterfaceSelector; - -NONSHARABLE_CLASS(CRemConMediaInformationQueuedMessage): public CBase - { -public: - static CRemConMediaInformationQueuedMessage* NewL(const TDesC8& aData); - ~CRemConMediaInformationQueuedMessage(); - - const TDesC8& Data(); -private: - CRemConMediaInformationQueuedMessage(); - void ConstructL(const TDesC8& aData); -public: - TSglQueLink iLink; -private: - RBuf8 iData; - }; - -/** -Client-instantiable type supporting sending media information. -*/ -NONSHARABLE_CLASS(CRemConMediaInformationTarget) : public CRemConInterfaceBase, - public MRemConInterfaceIf - { -public: - - /** - Factory function. - @param aInterfaceSelector The interface selector. The client must have - created one of these first. - @param aObserver The observer of this interface. - @return A new CRemConMediaInformationTarget, owned by the interface selector. - */ - IMPORT_C static CRemConMediaInformationTarget* NewL(CRemConInterfaceSelector& aInterfaceSelector, - MRemConMediaInformationTargetObserver& aObserver); - - /** Destructor */ - IMPORT_C ~CRemConMediaInformationTarget(); - -public: - /** Called by the client in response to a MrcmitoGetCurrentlyPlayingMetadata() call. - Each call provides one of the attribute values requested. - This is repeatedly called until all attributes requested have been supplied and then followed by Completed(). - @param aAttribute The ID of the attribute supplied. - @param aValue A reference to a descriptor containing the attribute data. - This must be valid until Completed() has been called. - @see MRemConMediaInformationTargetObserver::MrcmitoGetCurrentlyPlayingMetadata() - @see CRemConMediaInformationTarget::Completed() - */ - IMPORT_C TInt AttributeValue( TMediaAttributeId aAttributeId, TDesC8& aAttributeData); - - /** Signal that all attributes requested by MrcmitoGetCurrentlyPlayingMetadata() have been supplied - using the AttributeValue() method. - @see MRemConMediaInformationTargetObserver::MrcmitoGetCurrentlyPlayingMetadata() - @see CRemConMediaInformationTarget::AttributeValue() - */ - IMPORT_C void Completed(); - -private: - /** - Constructor. - @param aInterfaceSelector The interface selector. - @param aObserver The observer of this interface. - */ - CRemConMediaInformationTarget(CRemConInterfaceSelector& aInterfaceSelector, - MRemConMediaInformationTargetObserver& aObserver); - - void ConstructL(); - -private: // from CRemConInterfaceBase - TAny* GetInterfaceIf(TUid aUid); - -private: // from MRemConInterfaceIf - void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); - -private: // utility - void SendError(TInt aError); - void ProcessMessage(const TDesC8& aData); - - static int NextMessageCb(TAny* aThis); - void DoNextMessage(); -private: // unowned - MRemConMediaInformationTargetObserver& iObserver; - -private: // owned - RRemConGetElementAttributesResponse iResponse; - - RArray iMediaAttributeIDs; - TMediaAttributeIter iAttributeIterator; - TBool iInProgress; - TSglQue iMsgQueue; - - CAsyncCallBack* iNextMessageCallBack; - }; - -#endif // REMCONMEDIAINFORMATIONTARGET_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remconmediainformationtargetobserver.h --- a/epoc32/include/remconmediainformationtargetobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,77 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONMEDIAINFORMATIONTARGETOBSERVER_H -#define REMCONMEDIAINFORMATIONTARGETOBSERVER_H - -#include - -enum TMediaAttributeId - { - ETitleOfMedia =0x1, - ENameOfArtist =0x2, - ENameOfAlbum =0x3, - ETrackNumber =0x4, /* for example the CD track number */ - ENumberOfTracks =0x5, /* for example the total track number of the CD */ - EGenre =0x6, - EPlayingTime =0x7 - }; - -/** - * Provide an iterator wrapper class - */ -class TMediaAttributeIter - { -public: - TMediaAttributeIter(RArray& aMediaAttributeIDs); - IMPORT_C void Start(); - IMPORT_C TBool Next(TMediaAttributeId& aId); - -private: - RArray& iMediaAttributeIDs; - TInt iterator; - }; - - -/** -Clients must implement this interface in order to instantiate objects of type -CRemConMediaInformationTarget. This interface passes incoming commands from RemCon to -the client. -*/ -NONSHARABLE_CLASS(MRemConMediaInformationTargetObserver) - { -public: - - /** - For each element in aAttributeList for which the requested Metadata is available, - the client shall respond by calling CRemConMediaInformationTarget::AttributeValue(). - After all attributes have been supplied the client shall call CRemConMediaInformationTarget::Completed(). - @param aAttributeList A CMediaAttributeIDs containing a list of TMediaAttributeIds requested by the controller - @see CRemConMediaInformationTarget::AttributeValue() - @see CRemConMediaInformationTarget::Completed() - */ - virtual void MrcmitoGetCurrentlyPlayingMetadata( TMediaAttributeIter& aAttributeIter ) = 0; - - }; - -#endif // REMCONMEDIAINFORMATIONTARGETOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remconstatusapicontroller.h --- a/epoc32/include/remconstatusapicontroller.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONSTATUSAPICONTROLLER_H -#define REMCONSTATUSAPICONTROLLER_H - -#include -#include -#include -#include - -_LIT(KStatusApiPanicName, "Status Api Panic"); - -class MRemConStatusApiControllerObserver; -class CRemConInterfaceSelector; - -/** -A controller which sends Status API commands. -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CRemConStatusApiController) : public CRemConInterfaceBase, - public MRemConInterfaceIf - { -private: - enum TStatusApiPanic - { - EStatusApiCommandDataSectionTooLong, - }; - -public: - IMPORT_C static CRemConStatusApiController* NewL(CRemConInterfaceSelector& aInterfaceSelector, - MRemConStatusApiControllerObserver& aObserver); - IMPORT_C ~CRemConStatusApiController(); - - // Commands - IMPORT_C void UnitInfo(TRequestStatus& aStatus, TUint& aNumRemotes); - IMPORT_C void SubunitInfo(TRequestStatus& aStatus, TUint& aNumRemotes); - -private: - CRemConStatusApiController(CRemConInterfaceSelector& aInterfaceSelector, - MRemConStatusApiControllerObserver& aObserver); - - // from CRemConInterfaceBase - void MrcibNewMessage(TUint aOperationId, const TDesC8& aData); - TAny* GetInterfaceIf(TUid aUid); - - // Utility functions - void SetUnitInfoResponseData(const TDesC8& aCommandData, - TInt& aVendorId, - TInt& aUnit, - TInt& aUnitType, - TInt& aExtendedUnitType); - - void SetSubunitInfoResponseData(const TDesC8& aCommandData, - TInt& aPage, - TInt& aExtension, - TPtrC8& aPageData); - - void ReadCommandDataToInt(const TDesC8& aCommandData, - TInt aOffset, - TInt aLength, - TInt& aValue); - - static void Panic(TStatusApiPanic aPanic); - -private: - MRemConStatusApiControllerObserver& iObserver; - TBuf8 iOutData; - }; - -#endif // REMCONSTATUSAPICONTROLLER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/remconstatusapicontrollerobserver.h --- a/epoc32/include/remconstatusapicontrollerobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,83 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef REMCONSTATUSAPICONTROLLEROBSERVER_H -#define REMCONSTATUSAPICONTROLLEROBSERVER_H - -#include - -/** -Interface to observe responses from a Status API controller. -@publishedAll -@released -*/ -class MRemConStatusApiControllerObserver - { -public: - /** A UnitInfo response has been received. - - For details on the meanings on the fields please refer to the - AV/C Digital Interface Command Set General Specification, - section 11.2.1. - - If all values are zero there was an error with the command. - @param aVendorId The VendorId - @param aUnit Unit - @param aUnitType UnitType - @param aExtendedUnitType Extended Unit type. This data is only - valid if Unit type is 0x1e. The second byte is only valid - if the first byte is 0xff. - */ - virtual void MrcsacoUnitInfoResponse(TInt aVendorId, - TInt aUnit, - TInt aUnitType, - TInt aExtendedUnitType) = 0; - - /** A SubunitInfo response has been received. - - For details on the meanings on the fields please - refer to the AV/C Digital Interface Command Set - General Specification, section 11.2.2. - - If all values are zero there was an error with the command. - @param aPage Page - @param aExtension Extension. - @param aPageData Page Data. This data remains valid only for - the duration of this call. If the client wishes to store - the data it must be copied. - */ - virtual void MrcsacoSubunitInfoResponse(TInt aPage, - TInt aExtension, - TDesC8& aPageData) = 0; - - /** - Returns a null aObject if the extension is not implemented, or - a pointer to another interface if it is. - - @param aInterface UID of the interface to return - @param aObject the container for another interface as specified by aInterface - */ - IMPORT_C virtual void Mrcsaco_ExtensionInterfaceL(TUid aInterface, void*& aObject); - }; - -#endif // REMCONSTATUSAPICONTROLLEROBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/rsendas.h --- a/epoc32/include/rsendas.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __RSENDAS_H__ -#define __RSENDAS_H__ - -#include - -class CSendAsMessageTypes; -class CSendAsAccounts; - -/** -The default number of message slots available to a session. This determines the -number of outstanding requests the client may have with the server at any one -time. -*/ -const TInt KSendAsDefaultMessageSlots = 4; - -/** -Encapsulates a session with the SendAs Server. - -This class allows a user to determine the message types available to the SendAs -server and also provides functionality for clients to filter this list to find -the UIDs required to create messages. - -@publishedAll -@released -*/ -class RSendAs : public RSessionBase - { -public: - -/** -Defines the condition-checking of message capabilities. These are progressively -added to refine the list of available MTMs. -*/ - enum TSendAsConditionType - { - /** - No MTMs are removed as a result of applying this condition to the - filtering. - */ - ESendAsNoCondition, - /** - Only MTMs whose capabilities match the given value will remain as a - result of applying this condition to the filtering. - */ - ESendAsEquals, - /** - Only MTMs whose capabilities do not match the given value will remain - as a result of applying this condition to the filtering. - */ - ESendAsNotEquals, - /** - Only MTMs whose capabilities greater than the given value will remain - as a result of applying this condition to the filtering. - */ - ESendAsGreaterThan, - /** - Only MTMs whose capabilities less than the given value will remain as a - result of applying this condition to the filtering. - */ - ESendAsLessThan, - /** - Only MTMs whose capabilities result non-zero value when bitwise ANDed - with the given value will remain as a result of applying this condition - to the filtering. - */ - ESendAsBitwiseAnd, - /** - Only MTMs whose capabilities result non-zero value when bitwise ORed - with the given value will remain as a result of applying this condition - to the filtering. - */ - ESendAsBitwiseOr, - /** - Only MTMs whose capabilities result non-zero value when bitwise NANDed - with the given value will remain as a result of applying this condition - to the filtering. - */ - ESendAsBitwiseNand, - /** - Only MTMs whose capabilities result non-zero value when bitwise NORed - with the given value will remain as a result of applying this condition - to the filtering. - */ - ESendAsBitwiseNor - }; - -public: - IMPORT_C TInt Connect(); - IMPORT_C TInt Connect(TInt aMessageSlots); - - IMPORT_C void FilteredMessageTypesL(CSendAsMessageTypes& aMessageTypeInfo); - IMPORT_C TInt FilterAgainstCapability(TUid aMessageCapability); - IMPORT_C TInt FilterAgainstCapability(TUid aMessageCapability, TInt aValue, TSendAsConditionType aConditionType); - IMPORT_C TInt ResetMessageFilter(); - - IMPORT_C void AvailableAccountsL(TUid aMessageType, CSendAsAccounts& aAccounts); - -private: - TAny* iAny; // Future proofing. - }; - -#endif // __RSENDAS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/rsendasmessage.h --- a/epoc32/include/rsendasmessage.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __RSENDASMESSAGE_H__ -#define __RSENDASMESSAGE_H__ - -#include -#include -#include - -class RSendAs; -class CRichText; -class RFile; - -/** -Send as progress - -@publishedAll -@released -*/ -typedef CMsvSendOperation::TSendOperationProgress TSendAsProgress; - -/** -Encapsulates creating and sending a message. This class requires -a connected RSendAs session. - -A client application can have several RSendAsMessage objects created simultaneously. -Each RSendAsMessage object corresponds to a single message. - -With the RSendAsMessage class, a client application can perform the following -operations: - --Creating and managing a message - --Modifying a message created using SendAs - --Sending a message - --Launching a message editor - -Client applications do not require any capabilities in order to use the RSendAs -and RSendAsMessage APIs. However, if an application does not have the necessary security -capabilities to send a message, the SendAs server ensures that a message is only sent -after the user's authorization. - -A message created using RSendAsMessage can be saved, sent, or passed to the appropriate -message editor. There are two types of send operation: - --A confirmed send is forwarded to the UI MTM for the message type. Typically this -results in the user being asked to confirm that the message should be sent. - --An unconfirmed send fails if the client application does not have the -required capabilities to use the server MTM for the message type. - -There are asynchronous and synchronous forms of these sending methods. Progress information for -sending is available when the asynchronous forms are used. The synchronous forms, and the -methods for saving the message and for launching it in a message editor, all close the handle to the -RSendAsMessage, so the message cannot be further accessed through the API. - -@publishedAll -@released -*/ -class RSendAsMessage : public RSubSessionBase - { -public: -/** -Defines the recipient types available when adding a recipient to a message -*/ - enum TSendAsRecipientType - { - /** - Designates a 'To' recipient. - */ - ESendAsRecipientTo = EMsvRecipientTo, - - /** - Designates a 'Cc' recipient. - */ - ESendAsRecipientCc, - - /** - Designates a 'Bcc' recipient. - */ - ESendAsRecipientBcc - }; -public: - IMPORT_C void CreateL(RSendAs& aSendAs, TSendAsAccount aAccount); - IMPORT_C void CreateL(RSendAs& aSendAs, TUid aMessageType); - // - IMPORT_C void SendMessage(TRequestStatus& aStatus); - IMPORT_C void SendMessageAndCloseL(); // Sends in background - IMPORT_C void SendMessageConfirmed(TRequestStatus& aStatus); - IMPORT_C void SendMessageConfirmedAndCloseL(); // Sends in background - IMPORT_C void LaunchEditorAndCloseL(); - IMPORT_C void SaveMessageAndCloseL(); - // - IMPORT_C void ProgressL(TSendAsProgress& aProgress); - - IMPORT_C void SetBodyTextL(const CRichText& aBody); - IMPORT_C void SetBodyTextL(const TDesC& aBody); - IMPORT_C void SetSubjectL(const TDesC& aSubject); - IMPORT_C void SetBioTypeL(TUid aBioType); - // - IMPORT_C void AddRecipientL(const TDesC& aAddress, TSendAsRecipientType aRecipientType); - IMPORT_C void AddRecipientL(const TDesC& aAddress, const TDesC& aAlias, TSendAsRecipientType aRecipientType); - // - IMPORT_C void AddAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C void AddAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus); - IMPORT_C void AddAttachment(const TDesC& aFilePath, TRequestStatus& aStatus); - - IMPORT_C void AddAttachment(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C void AddAttachment(RFile& aFile, const TDesC8& aMimeType, TRequestStatus& aStatus); - IMPORT_C void AddAttachment(RFile& aFile, TRequestStatus& aStatus); - - IMPORT_C void AddLinkedAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C void AddLinkedAttachment(const TDesC& aFilePath, const TDesC8& aMimeType, TRequestStatus& aStatus); - IMPORT_C void AddLinkedAttachment(const TDesC& aFilePath, TRequestStatus& aStatus); - - IMPORT_C void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile); - IMPORT_C void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType); - IMPORT_C void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset); - - // - IMPORT_C void Cancel(); - IMPORT_C void Close(); - - /** - Sets the character encoding value. The character encoding value options are 7-bit, - 8-bit and 16-Bit Unicode. By default the character set encoding is 7 bit encoding. - */ - IMPORT_C void SetCharacterSetL(const TUint aCharset); - - -private: - TAny* iAny; // Future proofing. - }; - -#endif // __RSENDASMESSAGE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/rtcp.h --- a/epoc32/include/rtcp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,248 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef RTCP_H -#define RTCP_H - -#include - -/** @file - -RTCP is a protocol that only makes sense in the context of RTP, so -the RTCP implementation is an extension of the RTP code, and most -of the relevant classes are defined in rtp.h -*/ - -class TRtcpRRItem; -class TRtcpRRPart; -class TRtcpSRPart; - -/** -@publishedPartner -@released - -A handle to an RR (Receiver Report) RTP packet. - -An instance of this class represents the reception report of one host -about another host; it may have come from either a SR (Sender Report) or -a RR (Receiver Report) packet, which may contain -other RRs (Receiver Reports) as well. - -An object of this type is returned from a call to the RRtcpRRPart -indexing operator and specifying the index of the required RR. - -Note that resources accessed thorugh this handle are owned by other objects -and therefore has no Close() member function. - -@see RRtcpRRPart -*/ -class RRtcpRRItem - { -public: - /** - Default constructor. - */ - IMPORT_C RRtcpRRItem(); - - /** - Gets the sender's SSRC, i.e. the sender's 32-bit numeric - synchronisation source identifier. - - @return The sender's SSRC. - */ - IMPORT_C TUint SenderSSRC() const; - - - /** - Gets the number of packets lost. - - @return The number of packets lost. - */ - IMPORT_C TUint PacketsLost() const; - - - /** - Gets the SSRC related to this packet. - - @return The sender's SSRC. - */ - IMPORT_C TUint AboutSSRC() const; - - - /** - Gets the number of packets lost, in 256ths of the total number. - - @return The number of last packets, in 256ths of the total number. - */ - IMPORT_C TUint FractionLost() const; - - - /** - Gets the extended highest sequence number recieved. - - @return The extended highest sequence number. - */ - IMPORT_C TUint ExtendedHighestSequenceNumber() const; - - - /** - Gets the interarrival jitter value. - - @return The interarrival jitter value. - - */ - IMPORT_C TUint InterarrivalJitter() const; - - - /** - Gets the time of the last received SR (Sender Report) - - @return The time of the last received SR. - */ - IMPORT_C TUint LastSRTimestamp() const; - - - /** - Gets the time between the receipt of the last SR (Sender Report) and - the time when this packet was sent. - - @return The tme difference in 65,536ths of a second. - */ - IMPORT_C TUint DelaySinceLastSR() const; - -private: - friend class RRtcpRRPart; - TRtcpRRItem* iPtr; - }; - -/** -@publishedPartner -@released - -An array containing the most recent RRs (Receiver Reports) from -all hosts who are reporting on our send stream. - -An object of this type is returned by calling RRs() on a handle to -an RTP session (an RRtpSession object). - -@see RRtpSession::RRs() -*/ -class RRtcpRRPart - { -public: - IMPORT_C RRtcpRRPart(TRtcpRRPart& aRR); - /** - Gets the number of Receiver Reports. - - @return The number fo receiver reports. - */ - IMPORT_C TInt Count() const; - - IMPORT_C TUint SenderSSRC() const; - - /** - Gets a specific RR (Receiver Report) as identified by - the specified index value. - - @param aIndex An index value identifying the specific RR. - The index is relative to zero, i.e. zero implies - the first RR report. - The value must not be negative and must be less than - the the value returned by Count(). - - @return A handle to the RR (Receiver Report). - */ - IMPORT_C RRtcpRRItem operator [](TInt aIndex) const; -private: - TRtcpRRPart& iRRPart; - }; - -/** -@publishedPartner -@released - -A handle to a SR (Sender Report) packet. - -RRs (Receiver Reports) received as part of a SR (Sender Report) are classified -with the RRs. The resources accessed through this handle are owned by -the receive stream object, a RRtpReceiveStream instance, and therefore has no -Close() member function. -*/ -class RRtcpSRPart - { - public: - /** - Default constructor. - */ - IMPORT_C RRtcpSRPart(TRtcpSRPart& aSr); - - - /** - Gets the absolute time when this SR was sent, in TTime format. - - @return The time in NTP format. - */ - IMPORT_C void NTPTimestamp(TTime& aTime) const; - - - /** - Gets the RTP time when this packet was sent. - - Note that RTP time is profile dependant and may have an arbitrary start - time, but this is useful for tying the SR with the timestamps in the - data stream - - @return The time when the packet was sent. - */ - IMPORT_C TUint RTPTimestamp() const; - - - /** - Gets the number of packets that have been sent. - - @return The number of packets. - */ - IMPORT_C TUint PacketCount() const; - - - /** - Gets the number of bytes that have been sent. - - @return The number of bytes sent. - */ - IMPORT_C TUint ByteCount() const; - - - /** - Gets the profile-specific extension. - - @return An un-modifiable descriptor reference to the extension data. - */ - IMPORT_C const TDesC8& Extension(); - - /** - // added as Fix to Defect PDEF101761 - Gets the timestamp when this SR was sent, in seconds and fraction - - @ return The time in Seconds and Fraction - */ - IMPORT_C void NTPTimestamp(TUint32& aSec,TUint32& aFrac) const; - - -private: - TRtcpSRPart& iSrPtr; - }; - -#endif // RTCP_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/rtp.h --- a/epoc32/include/rtp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1352 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef RTP_H -#define RTP_H - -#include - -class TRtpEvent; -class RRtpSession; -class RRtpSendPacket; -class RRtpReceivePacket; -class RRtpReceiveSource; -class RRtpSendSource; -class RRtpHeaderExtension; -class RRtpCSRCs; -class CRtpSession; -class CRtpReceiveSource; -class CRtpSendSource; -class TRtpPacket; - -class RRtcpRRPart; -class RRtcpSRPart; - -/** -@publishedAll -@released - -A set of values that defines the event types that may be handled. - -See all variants of the RegisterEventCallbackL() function. - -@see TRtpEvent -*/ -enum TRtpEventType - { - /** - A special event type that is interpreted by all of - the RegisterEventCallbackL() set of functions to mean that the registered - callback function is to be called for any event except failure events. - */ - ERtpAnyEvent = 0, - - - /** - Defines a base value for session events. - - All session event types have values that are greater than this. - */ - ERtpSessionEventBase = 0x100, - - - /** - An event type that indicates that a session-level error has occurred. - - The event status is a standard Symbian OS error code. - The callback parameter is used to register interest in only one - type of error. - */ - ERtpSessionFail = 0x101, - - - /** - An event type that indicates that a new stream has been received. - - The event status is the SSRC of the stream. - */ - ERtpNewSource = 0x102, - - - /** - An event type that indicates that an RTCP RR (Receiver Report) has been - received. - - The event status is the SSRC of the sender. - - Note - This event type has not been implemented yet. - */ - ERtpNewRR = 0x103, - - - /** - An event type that indicates that a packet bigger than the expected maximum - has been received. - - When this event occurs, the packet is deleted. - */ - ERtpBufferOverflow = 0x104, - - - /** - An event type that indicates that a packet has been recived that - is smaller than its header. - - When this event occurs, the packet is deleted. - */ - ERtpUndersizedPacket = 0x105, - - - /** - Not an event type, but defines the upper limit for session event - type values. - */ - ERtpSessionEventEnd = 0x1ff, - - - /** - Not an event type but defines a base value for send stream events. - - All send stream event types have values that are greater than this. - */ - ERtpSendEventBase = 0x200, - - - /** - An event type that indicates that an error has occurred while sending - a packet. - - The event status is a standard Symbian OS error code. The callback parameter - is used only to register interest in one type of error. - */ - ERtpSendFail = 0x201, - - - /** - An event type that indicates that a send packet operation has succeeded. - */ - ERtpSendSucceeded = 0x202, - - - /** - Not an event type, but defines the upper limit for send stream event - type values. - */ - ERtpSendEventEnd = 0x2ff, - - - /** - Not an event type but defines a base value for receive stream events. - - All receive stream event types have values that are greater than this. - */ - ERtpSourceEventBase = 0x300, - - - /** - An event type that indicates that an error has occurred. - - The event status is a standard Symbian OS error code. The callback parameter - is used only to register interest in one type of error. - */ - ERtpSourceFail = 0x301, - - - /** - An event type that indicates that an in-sequence packet has been received. - */ - ERtpPacketReceived = 0x302, - - - /** - An event type that indicates that the codec has changed. - - The event status is the new payload type. - */ - ERtpCodecChange = 0x303, - - - /** - An event type that indicates that a marker packet has arrived. - */ - ERtpMarker = 0x304, - - - /** - An event type that indicates that a misordered packet has arrived. - */ - ERtpMisorder = 0x305, - - - /** - An event type that indicates that a dropout has been detected. - */ - ERtpDropout = 0x306, - - - /** - An event type that indicates that a SDES (Source Description) RTCP packet - has been received. - - For SDES events, the callback parameter is used to specify the type of - SDES. Use a value from TRtpSendPacketType - - The event status is the SSRC of the sender. - - @see RRtpSession::TRtpSendPacketType - */ - ERtpSDES = 0x307, - - - /** - An event type that indicates that a APP (Application Defined) RTCP packet - has been received. - - The event status is the SSRC of the sender. - - */ - ERtpAPP = 0x308, - - - /** - An event type that indicates that a SR (Sender Report) RTCP packet - has been received. - - The event status is the SSRC of the sender. - - */ - ERtpSR = 0x309, - - - /** - An event type that indicates that a RR (Receiver Report) RTCP packet - has been received. - - The event status is the SSRC of the sender. - */ - ERtpRR = 0x30a, - - - /** - An event type that indicates that a BYE (Goodbye) RTCP packet - has been received. - - The event status is the SSRC of the sender. - */ - ERtpBYE = 0x30b, - - - /** - Not an event type, but defines the upper limit for receive stream event - type values. - */ - ERtpSourceEventEnd = 0x3ff - }; - - -/** -@publishedAll -@released - -Indicates whether a callback function can be called once, or more than once. - -The appropriate enum value is passed as an argument to the -RegisterEventCallbackL() functions of RRtpSession, RRtpSendSource, -and RRtpReceiveSource, or to the equivalent static functions. - -@see RRtpSession -@see RRtpSendSource -@see RRtpReceiveSource -*/ -enum TRtpOneShotness - { - /** - Indicates that the call back function can be called more than once. - */ - ERtpNotOneShot = 0, - - - /** - Indicates that the call back function is only called once. - */ - ERtpOneShot = 0x40000000 - }; - - - - -/** -@publishedAll -*/ -typedef void (*TRtpCallbackFunction)(TAny* aPtr, const TRtpEvent& aEvent); - - - -/** -@internalComponent -*/ -const TInt KRtpNoParameter = KRequestPending; - - -//Needed for recv-only option for RTP or RTCP -//This must map to TRtpType -enum TPacketType - { - EPacketRtp, - EPacketRtcp - }; - - - - -/** -@publishedAll -@released - -A value that can be passed as the second parameter in a call to either -RRtpSendSource::NewSendPacketL() or RRtpSendSource::NewSendPacketLC() -to indicate that no exension is required for the RTP send packet. -*/ -const TInt KRtpNoExtension = -1; - - - -/** -@publishedAll -@released - -A handle to an RTP session. - -This is the interface to the socket-level RTP service, and provides additional -facilities such as header parsing, re-ordering out-of-order packets, -demultiplexing multiple sources etc. - -The class abstracts all RTP information going to/from a RTP socket, and its -corresponding RTCP data. - -Each RTP endpoint on a device needs its own RTP session. - -Multiple hosts streaming to a port on this device correspond -to different RRtpReceiveSource objects associated with the session. - -The class behaviour assumes that an active scheduler has already been created -and started; the class does not function correctly if not. -*/ -class RRtpSession - { - public: - /** - A set of bit values passed as a parameter to RRtpSession::SendRTCPPacketL() - to specify the SDES (Source Description) items that are to be sent with - the packet. One or more of these may be set. - - @see RRtpSession::SendRTCPPacketL() - */ - enum TRtpSendPacketType - { - /** - Canonical End-Point Identifier SDES Item. - */ - ERtcpPacketCNAME = 1, - - /** - User Name SDES Item. - */ - ERtcpPacketNAME = 2, - - /** - Electronic Mail Address SDES Item. - */ - ERtcpPacketEMAIL = 4, - - /** - Phone Number SDES Item. - */ - ERtcpPacketPHONE = 8, - - /** - Geographic User Location SDES Item. - */ - ERtcpPacketLOC = 16, - - /** - Application or Tool Name SDES Item - */ - ERtcpPacketTOOL = 32, - - /** - Notice/Status SDES Item - */ - ERtcpPacketNOTE = 64, - - /** - Private Extensions SDES Item - */ - ERtcpPacketPRIV = 128 - }; - - inline RRtpSession(); - inline TBool IsOpen() const; - - IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr, - TSockAddr& aRemoteAddr, - TInt aMaxRXSize, RConnection& aConnection, TInt aPriority = EPriorityNormal, - const TDesC8& aCNAME = KNullDesC8); - - - IMPORT_C void OpenL(RSocketServ& aServer, TSockAddr& aLocalAddr, - TSockAddr& aRemoteAddr, - TInt aMaxRXSize, TInt aPriority = EPriorityNormal, - const TDesC8& aCNAME = KNullDesC8); - - /** - @publishedPartner - @released - - Opens the session and initialises it. - - No events will be generated until after control returns to the - active scheduler. The client has this time to initialise the - object by adding event callbacks. - - @param aSocket The connected socket. - @param aMaxRXSize The maximum size of a received packet. - @param aRtcpSocket The RTCP socket. - @param aPriority The priority to be used for internal active objects - @param aCNAME The CNAME. A sensible default is supplied if none is - provided. - */ - IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize, - RSocket& aRtcpSocket, - TInt aPriority = EPriorityNormal, - const TDesC8& aCNAME = KNullDesC8); - - IMPORT_C void OpenL(RSocket& aSocket, TInt aMaxRXSize, - TInt aPriority = EPriorityNormal); - - IMPORT_C void Close(); - - IMPORT_C void SetMaxRXSize(TInt aMaxRXSize); - - IMPORT_C TInt MaxRXSize(); - - - /** - @publishedPartner - @released - - Sets the estimated bandwidth used by the session. - - This is used to decide when to send RTCP status packets. - The default value is read from a resource file and should be a reasonably - sensible default based on the maximum bandwidth of the handset. - - @param aBandwidth The bandwidth in bps. - */ - IMPORT_C void SetBandwidth(TUint aBandwidth); - - - /** - @publishedPartner - @released - - Supplies information about the profile-specific RTP - timestamps. - - This is used to generate the RTP timestamps in RTCP packets. - It is not used to generate timestamps in RTP packets as they must - accurately relate to the time of the sample. - - @param aNow The time now in RTP format - @param aConversion The number of nanoseconds per RTP timer tick. - */ - IMPORT_C void SetRTPTimeConversion(TUint aNow, TUint aConversion); - IMPORT_C RRtpReceiveSource NewReceiveSourceL(); - IMPORT_C RRtpReceiveSource NewReceiveSourceLC(); - - /** - Registers a callback for the specified event. - - Some compilers may not support templated member functions. A static version - of this function is available that offers the same behaviour: - RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness,TInt) - - @param aType The type of event. - @param aCallback The callback function. The function is templated, and is - prototyped to take a pointer to an object of the template - type and a const reference to a TRtpEvent. The function - returns void. - @param aPtr A pointer that is passed to the callback function when - that function is called. - @param aOneShot Indicates whether the callback function is only - called once, or can be called more than once. - @param aParameter A parameter to be passed to the registration function. - The meaning of this depends entirely on the event type. - The parameter is optional - the other overload of this - function is available for registrations that don't need - to pass a parameter. - */ - template inline void - RegisterEventCallbackL(TRtpEventType aType, - void (*aCallback)(T*, const TRtpEvent&), - T* aPtr, - TRtpOneShotness aOneShot, - TInt aParameter) - { - PrivRegisterEventCallbackL( - aType|aOneShot, - reinterpret_cast(aCallback), - static_cast(aPtr), aParameter); - } - - /** - Registers a callback for the specified event. - - Some compilers may not support templated member functions. A static version - of this function is available that offers the same behaviour: - RegisterEventCallbackL(RRtpSession,TRtpEventType,void (*aCallback)(T*, const TRtpEvent&),T*,TRtpOneShotness) - - @param aType The type of event. - @param aCallback The callback function. The function is templated, and is - prototyped to take a pointer to an object of the template - type and a const reference to a TRtpEvent. The function - returns void. - @param aPtr A pointer that is passed to the callback function when - that function is called. - @param aOneShot Indicates whether the callback function is only - called once, or can be called more than once. If not - specified, the default is to allow the callback function - to be called more than once. - */ - template inline void - RegisterEventCallbackL(TRtpEventType aType, - void (*aCallback)(T*, const TRtpEvent&), - T* aPtr, - TRtpOneShotness aOneShot = ERtpNotOneShot) - { - PrivRegisterEventCallbackL( - aType|aOneShot, - reinterpret_cast(aCallback), - static_cast(aPtr)); - } - - - /** - @publishedPartner - @released - - Gets an array contining the most recent RR (Receiver Report) from - all hosts who are reporting on our send stream. - - @return The array of RRs. - */ - IMPORT_C RRtcpRRPart GetRRs(); - - - /** - @publishedPartner - @released - - Gets the data associated with the specified RTCP SDES (Source Description) - item. - - Note a that the PRIV (Private Extensions) SDES item is not supported - by this mechanism. - - @param aType The value identifying the RTCP SDES item. - - @param aValue A descriptor reference to the SDES item data. - - @return KErrNotFound if the item type was not found in the most recent RTCP packet - KErrNone if the operation is successful - */ - IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue); - - - /** - @publishedPartner - @released - - Sets the data associated with the specified RTCP SDES (Source Description) - item for sending in the next SDES packet only. - - The function Leaves if duplicate values are set for the same CNAME. - - Note a that the PRIV (Private Extensions) SDES item is not supported - by this mechanism. - - NOTE - This call cannot be used to set a different CNAME for this session. - The default CNAME is send with every SDES packets. - - @param aType The value identfying the RTCP SDES item. - @param aValue The SDES item data. - - @return KErrTooBig if the length of the aValue is more than KMaxSdesItemLength(=255) - KErrNone if the operation is successful - */ - IMPORT_C TInt SetSDESL(TInt aType, const TDesC8& aValue); - - /** - @publishedPartner - @released - - Sets the data associated with the PRIV (Private Extensions) SDES item. - - @param aPrefix The value identfying the RTCP SDES item. - @param aValue The SDES item data. - - @return KErrTooBig if the length of the aValue and aPrefix combined is more - than KMaxSdesItemLength(=255) - KErrNone if the operation is successful - */ - IMPORT_C TInt SetPRIVL(const TDesC8& aPrefix, const TDesC8& aValue); - - - /** - @publishedPartner - @released - Sends an APP (Application Defined) RTCP Packet. - - The packet is sent immediately. - - If used with RTCP auto-send, the function disrupts the auto-send - intervals. Note however that Symbian reserves the right to fix this. - - @param aApp A handle to a RTCP APP (Application Defined) packet, - for experimental extensions to RTCP. - */ - IMPORT_C void SendAPPL(const TDesC8& aName, const TDesC8& aAppData = KNullDesC8, TUint8 aSubType = 0); - - - /** - @publishedPartner - @released - - Enables or disables the automatic sending of RTCP SR (Sender Report), - RR (Receiver Report), and SDES (Source Description) packets. - - Note that if automatic sending is not enabled and RTCP sending is required, - then explicit calls to SendRTCPPacketL() will be required. - - @param aAutoSend ETrue, if RTCP packets need to be send automatically - EFalse otherwise. - - @see RRtpSession::SendRTCPPacketL() - */ - IMPORT_C void SetRTCPAutoSend(TBool aAutoSend); - - - /** - @publishedPartner - @released - - Gets the RTCP Auto Send status. - - @return True, if RTCP SR, RR and SDES packets are automatically sent, - false otherwise - - @see RRtpSession::SetRTCPAutoSend() - */ - IMPORT_C TBool RTCPAutoSend() const; - - /** - @publishedPartner - @released - - Sets the RTCP Auto Send interval. - This disables the RFC based calculation of RTCP intervals. - To re-enable auto calculation, set the interval to zero. - - @param aInterval Time interval after which an RTCP auto-send will take place - */ - IMPORT_C void SetRtcpInterval(TTimeIntervalMicroSeconds32& aInterval); - - /** - @publishedPartner - @released - Enables Receive only option for rtp or rtcp - - @param aRtpOrRtcp Takes the values from the enum TPacketType - - @see RRtpSession::DontReceive() - */ - IMPORT_C void DontReceive(TInt aRtpOrRtcp); - - /** - @publishedPartner - @released - Sends an RTCP packet now. - - Calling this function doesn't make much sense if auto-send is - on, as it will result in packets being sent at rather - incoherent intervals. - - @param aPacketType Zero or more of the bit values defined by - the TRtpSendPacketType enum. The packet sent will - contain a SR (Sender Report) or RR (Receiver Report), - depending on whether any packets have actually been - sent, together with all SDES (Source Description) items - specified by this parameter. - - @see TRtpSendPacketType - */ - IMPORT_C void SendRTCPPacketL(TDesC8& aPacket); - - - /** - @publishedPartner - @released - Creates a new send stream, and returns the send stream handle. - - Only one send stream per session is permitted, which means that you must not - call this function if the send stream has already been created. - - As the send stream is an active object, it cannot handle request - completion events until control returns to the active scheduler. - Typically, clients will want to add event registrations before that. - - The Code panics if the SendSource has alredy been opened. - - @return The send stream handle. - - This function may leave if memory is not enough. - */ - IMPORT_C RRtpSendSource NewSendSourceL(); - - - /** - @publishedPartner - @released - - Gets the handle to the send stream object associated with this session. - - The send stream object is the one created in a previous call - to NewSendSourceL(). If the send stream object has not been created, then - the returned handle will refer to a closed send stream. - - @return The handle to the send stream object. - - @see RRtpSendSource NewSendSourceL() - */ - IMPORT_C RRtpSendSource SendSource(); - - - /** - @publishedPartner - @released - - Sets the number of sequential packets that must be received - before a stream is considered good. - - Sets the maximum number of dropped packets to be considered a - dropout, as opposed to an ended and restarted stream. - - Sets the maximum number of packets by which a packet can be delayed - before it is considered dropped. - - @param aMaxMisorder The maximum number of packets. - - @param aMaxDropout The number of sequential packets. - - @param aMinSequential The number of sequential packets. - @post The session will be 'restarted', - i.e. it resets the sequence number sequence and resets all RTCP statistics. - */ - IMPORT_C void SetRtpStreamParameters(TInt aMinSequential, TInt aMaxMisorder, TInt aMaxDropout); - - inline TBool operator == (RRtpSession aThat) const; - inline TBool operator != (RRtpSession aThat) const; - - /** - @publishedPartner - @released - - The event manager contains a number of callback registrations, each of which - binds a function and pointer (normally an object) to a particular kind of - event. Registrations can be bound to all events on a stream. - - If a function is registered for a particular event, it will be called when - that event occurs. One callback function can be associated with more than 1 - callback registration. Callback functions take a pointer argument - which was supplied as part of the registration - - @param aType Event type - - @param aCallback Callback object - - @param aPtr Pointer to data that needs to be passed to the callback function - - @param aParameter Parameter to be passed to internal callback subsystem - */ - IMPORT_C void PrivRegisterEventCallbackL(TUint aType, - TRtpCallbackFunction aCallback, - TAny* aPtr, - TInt aParameter); - - /** - @publishedPartner - @released - - The event manager contains a number of callback registrations, each of which - binds a function and pointer (normally an object) to a particular kind of - event. Registrations can be bound to all events on a stream. - - If a function is registered for a particular event, it will be called when - that event occurs. One callback function can be associated with more than 1 - callback registration. Callback functions take a pointer argument - which was supplied as part of the registration - - @param aType Event type - - @param aCallback Callback object - - @param aPtr Pointer to data that needs to be passed to the callback function - */ - IMPORT_C void PrivRegisterEventCallbackL(TUint aType, - TRtpCallbackFunction aCallback, - TAny* aPtr); - - private: - friend class TRtpEvent; - CRtpSession* iPtr; - // Note: Comments that start with //\ are pseudo-variables used to get - // Doxygen collaboration diagrams to look right. Ignore them. - //\ RRtpSendSource sndSource_1_01; - //\ RRtpReceiveSource rcvSource_1_n; - //\ TRtpCallback callbacks_1_n; - //\ TRtpEvent events_1_n; - }; - - - - -/** -@publishedAll -@released - -A handle to a send stream. - -Use this class to manage the creation and sending of packets. -A session can have only one send stream. - -Only one packet can be sent at any one time. -Once a packet has been sent, the packet cannot be closed and no further packets -can be sent until an event signalling the completion of the send operation has -occurred. This will be one of the events defined by the enum values: -ERtpSendSucceeded and ERtpSendFail. - -A client must monitor these events so that it can schedule the sending of -subsequent packets. -It does this by implementing and registering callback functions that -handle these events. - -@see TRtpEventType -*/ -class RRtpSendSource - { - public: - inline RRtpSendSource(); - inline TBool IsOpen() const; - IMPORT_C void Close(); - - IMPORT_C void Cancel(); - - template inline void - RegisterEventCallbackL(TRtpEventType aType, - void (*aCallback)(T*, const TRtpEvent&), - T* aPtr, - TRtpOneShotness aOneShot, - TInt aParameter) - { - PrivRegisterEventCallbackL(aType|aOneShot, - reinterpret_cast(aCallback), - static_cast(aPtr), aParameter); - } - - - template inline void - RegisterEventCallbackL(TRtpEventType aType, - void (*aCallback)(T*, const TRtpEvent&), - T* aPtr, - TRtpOneShotness aOneShot = ERtpNotOneShot) - { - PrivRegisterEventCallbackL(aType|aOneShot, - reinterpret_cast(aCallback), - static_cast(aPtr)); - } - - - - IMPORT_C RRtpSendPacket NewSendPacketL(TInt aPayloadSize = 0, - TInt aHeaderExtensionSize = - KRtpNoExtension); - - IMPORT_C RRtpSendPacket NewSendPacketLC(TInt aPayloadSize = 0, - TInt aHeaderExtensionSize = - KRtpNoExtension); - - IMPORT_C TBool IsSending(); - IMPORT_C void SetPayloadType(TUint aPayloadType); - IMPORT_C void SetDefaultPayloadSize(TInt aPayloadSize); - /** - @publishedPartner - @released - - Sends a Bye RTCP packet. - - @param aReason The reason for sending the Bye RTCP packet. - */ - IMPORT_C void ByeL(TDesC8& aReason); - IMPORT_C TUint32 GetLocalSSRC(); - - IMPORT_C void SetAlignment(TInt aAlignment); - IMPORT_C TInt Alignment() const; - - inline TBool operator == (RRtpSendSource aThat) const; - inline TBool operator != (RRtpSendSource aThat) const; - - /** - @publishedPartner - @released - - The event manager contains a number of callback registrations, each of which - binds a function and pointer (normally an object) to a particular kind of - event. Registrations can be bound to all events on a stream. - - If a function is registered for a particular event, it will be called when - that event occurs. One callback function can be associated with more than 1 - callback registration. Callback functions take a pointer argument - which was supplied as part of the registration - - @param aType Event type - - @param aCallback Callback object - - @param aPtr Pointer to data that needs to be passed to the callback function - - @param aParameter Parameter to be passed to internal callback subsystem - */ - IMPORT_C void PrivRegisterEventCallbackL(TUint aType, - TRtpCallbackFunction aCallback, - TAny* aPtr, - TInt aParameter); - - /** - @publishedPartner - @released - - The event manager contains a number of callback registrations, each of which - binds a function and pointer (normally an object) to a particular kind of - event. Registrations can be bound to all events on a stream. - - If a function is registered for a particular event, it will be called when - that event occurs. One callback function can be associated with more than 1 - callback registration. Callback functions take a pointer argument - which was supplied as part of the registration - - @param aType Event type - - @param aCallback Callback object - - @param aPtr Pointer to data that needs to be passed to the callback function - */ - IMPORT_C void PrivRegisterEventCallbackL(TUint aType, - TRtpCallbackFunction aCallback, - TAny* aPtr); - private: - friend class RRtpSession; - friend class TRtpEvent; - CRtpSendSource* iPtr; - // Note: Comments that start with //\ are pseudo-variables used to get - // Doxygen collaboration diagrams to look right. Ignore them. - //\ TRtpCallback callbacks_1_n; - //\ TRtpEvent events_1_n; - //\ TRtpSendPacket packets_1_n; - }; - - - - -/** -@publishedAll -@released - -A handle to a receive stream. - -An object of this type represents the stream of data on a single SSRC and -delivers the RTP packets and RTCP information in the order they -arrive. - -Note that RTP does not guarantee the order of delivery, which means that the -client may want to buffer the data. -*/ -class RRtpReceiveSource - { - public: - RRtpReceiveSource(); - inline TBool IsOpen() const; - - IMPORT_C void Close(); - - - template inline void - RegisterEventCallbackL(TRtpEventType aType, - void (*aCallback)(T*, const TRtpEvent&), - T* aPtr, - TRtpOneShotness aOneShot, - TInt aParameter) - { - PrivRegisterEventCallbackL(aType|aOneShot, - reinterpret_cast(aCallback), - static_cast(aPtr), aParameter); - } - - - template inline void - RegisterEventCallbackL(TRtpEventType aType, - void (*aCallback)(T*, const TRtpEvent&), - T* aPtr, - TRtpOneShotness aOneShot = ERtpNotOneShot) - { - PrivRegisterEventCallbackL(aType|aOneShot, - reinterpret_cast(aCallback), - static_cast(aPtr)); - } - - /** - @publishedPartner - @released - - Gets the data associated with the specified RTCP SDES (Source Description) - item. - - Note a that the PRIV (Private Extensions) SDES item is not supported - by this mechanism. - - @param aType The value identifying the RTCP SDES item. - - @return A descriptor reference to the SDES item data. - */ - IMPORT_C TInt GetSDES(const TInt aType, TDes8& aValue); - - - /** - @publishedPartner - @released - - Gets the most recent SR ((Sender Report) from this SSRC. - - @return A handle to the SR. - */ - IMPORT_C RRtcpSRPart GetSR(); - - - /** - @publishedPartner - @released - - Gets the reason for a BYE packet. - - @return A descriptor contaning the BYE message. This is - KNullDesC if the source has not sent a BYE packet. - */ - IMPORT_C TDesC8& GetByeReason(); - - - /** - @publishedPartner - @released - - Parameters from the last APP (Application Defined) packet. - - @param aName Four-bytes application name - @param aAppData Applciation specific data - @param aSubType Application defined sub-type of the APP packet - */ - IMPORT_C void GetLastApp(TPtrC8& aName, TPtrC8& aAppData, TUint& aSubType); - - IMPORT_C RRtpReceivePacket Packet(); - - /** - @publishedPartner - @released - - Gets the SSRC of the remote end - - @return The SSRC of the remote end - */ - IMPORT_C TUint SSRC() const; - - inline TBool operator == (RRtpReceiveSource aThat) const; - inline TBool operator != (RRtpReceiveSource aThat) const; - - /** - @publishedPartner - @released - - The event manager contains a number of callback registrations, each of which - binds a function and pointer (normally an object) to a particular kind of - event. Registrations can be bound to all events on a stream. - - If a function is registered for a particular event, it will be called when - that event occurs. One callback function can be associated with more than 1 - callback registration. Callback functions take a pointer argument - which was supplied as part of the registration - - @param aType Event type - - @param aCallback Callback object - - @param aPtr Pointer to data that needs to be passed to the callback function - - @param aParameter Parameter to be passed to internal callback subsystem - */ - IMPORT_C void PrivRegisterEventCallbackL(TUint aType, - TRtpCallbackFunction aCallback, - TAny* aPtr, TInt aParameter); - - /** - @publishedPartner - @released - - The event manager contains a number of callback registrations, each of which - binds a function and pointer (normally an object) to a particular kind of - event. Registrations can be bound to all events on a stream. - - If a function is registered for a particular event, it will be called when - that event occurs. One callback function can be associated with more than 1 - callback registration. Callback functions take a pointer argument - which was supplied as part of the registration - - @param aType Event type - - @param aCallback Callback object - - @param aPtr Pointer to data that needs to be passed to the callback function - */ - - IMPORT_C void PrivRegisterEventCallbackL(TUint aType, - TRtpCallbackFunction aCallback, - TAny* aPtr); - private: - friend class RRtpSession; - friend class TRtpEvent; - CRtpReceiveSource* iPtr; - // Note: Comments that start with //\ are pseudo-variables used to get - // Doxygen collaboration diagrams to look right. Ignore them. - //\ TRtpCallback callbacks_1_n; - //\ TRtpEvent events_1_n; - //\ TRtpReceivePacket packets_1_n; - }; - - - - -/** -@publishedAll -@released - -A handle to an RTP packet. - -The packet is accessed through the interface provided by this handle. -*/ -class RRtpPacket - { - public: - inline RRtpPacket(); - inline TBool IsOpen() const; - - IMPORT_C void Close(); - IMPORT_C TPtrC8 Payload() const; - IMPORT_C TUint SequenceNumber() const; - IMPORT_C TUint Timestamp() const; - IMPORT_C TUint SSRC() const; - IMPORT_C RRtpCSRCs CSRCs() const; - IMPORT_C TBool ExtensionPresent() const; - IMPORT_C RRtpHeaderExtension Extension() const; - IMPORT_C TBool Marker() const; - IMPORT_C TUint PayloadType() const; - IMPORT_C TUint Flags() const; - - inline TBool operator == (RRtpPacket aThat) const; - inline TBool operator != (RRtpPacket aThat) const; - - protected: - TRtpPacket* iPtr; - // Note: Comments that start with //\ are pseudo-variables used to get - // Doxygen collaboration diagrams to look right. Ignore them. - //\ RRtpHeaderExtension extension_1_01; - //\ RRtpCSRCs csrcs_1_01; - }; - - - - -/** -@publishedAll -@released - -A handle to an RTP packet to be sent (an RTP send packet). - -@see RRtpSendSource -*/ -class RRtpSendPacket : public RRtpPacket - { - public: - IMPORT_C void Send(); - IMPORT_C TDes8& WritePayload(); - IMPORT_C void SetTimestamp(TUint aTimestamp); - IMPORT_C void SetMarker(TBool aMark); - IMPORT_C void SetPayloadType(TUint aPayloadType); - IMPORT_C void SetFlags(TUint aFlags); - - friend class RRtpSendSource; - }; - - - - -/** -@publishedAll -@released - -A handle to an RTP packet received from another source. -*/ -class RRtpReceivePacket : public RRtpPacket - { - friend class RRtpReceiveSource; - friend class TRtpReceivePacket; - }; - - - - -/** -@publishedAll -@released - -An RTP event. - -An event is generated when anything happens that a client might want -to know about. The class encapulates two pieces of information: -1. An event type as defined by a TRtpEventType value. -2. Additional information whose meaning is dependent on the event type. - -Additional information may be implicitly associated with the event, but still -needs to be fetched from another object, for example, when processing -an ERtpPacketReceived event, the packet (represented by a RRtpReceivePacket -handle) must be obtained from the receive stream (represented by a -RRtpReceiveStream handle). - -Events are always associated with either an RTP session, a send stream or -a receive stream, and this class has functions for getting the corresponding -handle. - -@see RRtpSession -@see RRtpSendSource -@see RRtpReceiveSource -*/ -class TRtpEvent - { - public: - IMPORT_C TRtpEvent(TRtpEventType aType, TInt aStatus, TAny* aData); - IMPORT_C RRtpSession Session() const; - IMPORT_C RRtpSendSource SendSource() const; - IMPORT_C RRtpReceiveSource ReceiveSource() const; - IMPORT_C TBool IsSessionEvent() const; - IMPORT_C TBool IsSendSourceEvent() const; - IMPORT_C TBool IsReceiveSourceEvent() const; - - inline TRtpEventType Type() const; - inline TInt Status() const; - private: - TRtpEventType iType; - TInt iStatus; - TAny* iData; - }; - - - - -/** -@publishedAll -@released - -Reresents an RTP packet's header extension. - -The format of a header extension is profile-defined. -*/ -class RRtpHeaderExtension - { - public: - IMPORT_C TUint16 Type() const; - IMPORT_C void SetType(TUint16 aType); - IMPORT_C TPtrC8 Data(); - private: - friend class RRtpPacket; - TRtpPacket* iPtr; - }; - - - - -/** -@publishedAll -@released - -A handle representing the list of CSRCs in an RTP packet. -*/ -class RRtpCSRCs - { - public: - IMPORT_C TInt Count() const; - IMPORT_C TUint operator [](TUint aIndex) const; - private: - friend class RRtpPacket; - - TRtpPacket* iPtr; - }; - - -/** -@publishedPartner - -A set of panic codes. - -in release mode, different panic codes, such as -KERN-EXEC 3 may be generated instead. -*/ -enum TRtpPanicCode - { - ERtpPacketIsClosed = 1, - ERtpPayloadTypeOutOfRange = 2, - ERtpSessionIsClosed = 3, - ERtpSourceIsClosed = 4, - ERtpNoExtension = 5, - ERtpLeaveInResponseToError = 6, - ERtpCantSend2PacketsAtOnce = 7, - ERtpWrongEventType = 8, - ERtpWrongParameter = 9, - ERtpSendSourceAlreadyOpen = 10, - ERtpSessionAlreadyOpen = 11, - // - ERtpCoreController = 100, - }; - -GLREF_C void Panic(TRtpPanicCode aPanicCode); - -#include "rtp.inl" - -#endif // RTP_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/schedulebaseservermtm.h --- a/epoc32/include/schedulebaseservermtm.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - -#ifndef SCHEDULE_BASE_SERVER_MTM_H_ -#define SCHEDULE_BASE_SERVER_MTM_H_ - -///////////////////////////////////////////////////////////////////////////// -// -// CScheduleBaseServerMtm Declaration -// -///////////////////////////////////////////////////////////////////////////// - - - -#include -#include - - -class CMsvScheduleSend; -class CMsvSysAgentActions; -class TMsvSendErrorAction; -class TMsvSchedulePackage; -class CRepository; - -class CScheduleBaseServerMtm : public CBaseServerMtm -/** -Base class for Server MTMs that support scheduling. - -It contains pure virtual functions which must be implemented by the Server -MTM. These functions are not required for interoperability with any other -classes, however they are essential functionality that must be implemented -by a Server MTM that support scheduling. - -CScheduleBaseServerMtm uses a class derived from CMsvScheduleSend to -interface with the task scheduler. - -@see CMsvScheduleSend -@publishedAll -@released -*/ - { -protected: - -// --- Construction --- - - IMPORT_C CScheduleBaseServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry); - -// --- Send the Scheduled Messages --- - - IMPORT_C virtual void SendScheduledL(CMsvEntrySelection& aSelection, const TBool aMove, const TDesC8& aParameter, TRequestStatus& aStatus); - IMPORT_C virtual void ScheduleL(CMsvEntrySelection& aSelection, const TBool aMove, const TDesC8& aParameter, TRequestStatus& aStatus); - IMPORT_C virtual void ConstructL(); - IMPORT_C void LoadResourceFileL(const TDesC& aResFileName); - -// Other Schedule Commands - - IMPORT_C virtual void CheckScheduleL(const CMsvEntrySelection& aSelection, const TDesC8& aParameter, TRequestStatus& aStatus); - IMPORT_C virtual void DeleteScheduleL(const CMsvEntrySelection& aSelection, const TDesC8& aParameter, TRequestStatus& aStatus); - -// --- Pure virtual functions that must be implemented in a derived class --- - - /** - Populates a TMsvSchedulePackage object with scheduling information. - - @param aParameter Parameter information for the package - @param aMove Flag that signals whether a move or copy is required - @param aPackage On return, a populated object - */ - virtual void PopulateSchedulePackage(const TDesC8& aParameter, const TBool aMove, TMsvSchedulePackage& aPackage) const = 0; - - /** - Loads the resource file (if any) for the MTM. - */ - virtual void LoadResourceFileL() = 0; - - - IMPORT_C void Queue(TRequestStatus& aStatus); - - IMPORT_C void LoadScheduleSettingsL(CRepository& aRepository, TBool aRestoreErrorsFromResource = EFalse, TInt aErrorsResourceId = 0); - -protected: - - IMPORT_C ~CScheduleBaseServerMtm(); - -private: - - void RequestComplete(TRequestStatus* aStatus, TInt aError); - -protected: - -// --- Data Member --- - - /** Message scheduler. */ - CMsvScheduleSend* iScheduleSend; //Should be constructed and deleted by the derived class - - /** MTM resource file. */ - RResourceFile iResourceFile; - /** File server handle. */ - RFs iFs; - /** Asynchronous status word. */ - TRequestStatus* iReport; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/schsend.rh --- a/epoc32/include/schsend.rh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#include - -#if !defined(__SCHSEND_RH__) -#define __SCHSEND_RH__ - -STRUCT SEND_ERROR - { - LONG error; - } - -STRUCT SEND_ERROR_ACTION - { - BYTE flags; - WORD max_retries = 0; - STRUCT errors[]; - } - -STRUCT SEND_ERROR_ACTIONS - { - STRUCT default; - STRUCT actions[]; - } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpattributefield.h --- a/epoc32/include/sdpattributefield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,391 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpAttributeField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPATTRIBUTEFIELD_H -#define CSDPATTRIBUTEFIELD_H - -// INCLUDES -#include -#include -#include "sdpcodecstringconstants.h" -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; -class CSdpFmtAttributeField; -class CSdpAttributeFieldPtrs; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the attribute field of Session Description Protocol - * for media and session level attributes. Media format/payload type level - * attributes are supported by the CSdpFmtAttributeField class. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpAttributeField : public CBase - { - public: // Constructors and destructor - - /** - * Constructs a new attribute field. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpAttributeField* DecodeL( const TDesC8& aText ); - - /** - * Constructs a new attribute field and adds the pointer to the - * cleanup stack. - * - * @param aTest A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpAttributeField* DecodeLC( const TDesC8& aText ); - - /** - * Constructs a new attribute field. - * - * @param aAttribute The attribute name. It can be a pre- - * defined name in the SDP string pool or defined by the - * client. - * @param aValue A valid attribute value or an empty - * descriptor to omit the value part. - * @return a new instance. - */ - IMPORT_C static CSdpAttributeField* NewL( - RStringF aAttribute, const TDesC8& aValue ); - - /** - * Constructs a new attribute field and adds the pointer to the - * cleanup stack. - * - * @param aAttribute The attribute name. It can be a pre-defined - * name in the SDP string pool or defined by the client. - * @param aValue A valid attribute value or an empty - * descriptor to omit the value part. - * @return a new instance. - */ - IMPORT_C static CSdpAttributeField* NewLC( - RStringF aAttribute, const TDesC8& aValue ); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpAttributeField(); - - public: // New functions - - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream Stream used for output. On return the - * stream includes correctly formatted attribute field. - */ - IMPORT_C void EncodeL( RWriteStream& aStream ) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpAttributeField* CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param aObj: The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == ( const CSdpAttributeField& aObj ) const; - - /** - * Gets the attribute name. - * - * @return The attribute name. The name can be pre-defined - * name in the SDP string table or defined by the client. - */ - IMPORT_C RStringF Attribute() const; - - /** - * Gets the attribute. - * - * @return The value or an empty descriptor if there is no value part. - */ - IMPORT_C const TDesC8& Value() const; - - /** - * Sets the attribute and attribute value. - * - * @param aAttribute A valid attribute name. It can be a - * pre-defined name in the SDP string pool or - * defined by the client. - * @param aValue A valid attribute value or an empty - * descriptor to omit the value part. - * @leave KErrSdpCodecAttributeField if the attribute part is not - * pre-defined EAttributeFmtp or EAttributeRtpmap. - */ - IMPORT_C void SetL( RStringF aAttribute, const TDesC8& aValue ); - - /** - * Assigns attribute to the format level attribute. - * In the final output the attribute will placed after format level - * attribute. - * - * @param aFmtAttribute A format level - * attribute this attribute is assigned to. - */ - IMPORT_C void AssignTo(const CSdpFmtAttributeField& aFmtAttribute); - - /** - * Test if the attribute belongs to the given format level attribute. - * Note, that the check can be true for the media level paremeter if - * it appears after the last format level attribute. - * - * @param aFmtAttribute: A format level - * attribute this attribute belongs to. - * @return ETrue if attribute belongs to the format level attribute, - * EFalse otherwise. - */ - IMPORT_C TBool BelongsTo(const CSdpFmtAttributeField& aFmtAttribute) const; - - public: // Internal to codec - - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL( RWriteStream& aStream ) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpAttributeField* InternalizeL( RReadStream& aStream ); - - /** - * Informs if the attribute belongs to any format level attribute. - * - * @return ETrue if attribute belongs to any format level - * attribute, EFalse otherwise. - */ - TBool IsFmtAttribute(); - - private: // Constructors - - /** - * Constructor - */ - CSdpAttributeField(); - - /** - * Second phase constructor - * - * @param aText Text string ending to LF character - */ - void ConstructL( const TDesC8& aText ); - - /** - * Second phase constructor - * - * @param aAttribute Attribute identifier - * @param aValue Value of the attribute of KNullDesC8 - */ - void ConstructL( RStringF aAttribute, const TDesC8& aValue ); - - private: // Internal - - /** - * Verifies that attribute is valid property attribute and initializes - * the member variables of class accordingly - * - * @param aAttribute Attribute in descriptor - */ - void FormatProperyAttributeL( const TDesC8& aAttribute ); - - /** - * Verifies that attribute is valid value attribute and initializes - * the member variables of class accordingly - * - * @param aArray Array of the attributes - */ - void FormatValueAttributeL( const TDesC8& aAttribute, - const TDesC8& aValue ); - - /** - * Verifies that the value is valid for the attribute - * - * @param aAttribute The attribute - * @param aArray Array containing the values (and attribute) - */ - void VerifyValueAttributeL( SdpCodecStringConstants::TStrings aString, - const TDesC8& aValue ); - - /** - * Forms attribute and value strings out of the token array - * and pushes both (aAttribute & aValue) into cleanup stack - * - * @param aArray Token array - * @param aAttribute Attribute string (in cleanup stack) - * @param aValue Value string (in cleanup stack) - */ - void CreateAttributeAndValueStringsLC( RArray& aArray, - HBufC8*& aAttribute, - HBufC8*& aValue ); - - /** - * Checks if the value is among the valid orient attributes - * - * @param aValue Value string - */ - void CheckValidOrientL( const TDesC8& aValue ); - - /** - * Checks if the value is valid language attribute as - * specified in RFC 3066 - * - * @param aValue Value string - */ - void CheckValidLangStrL( const TDesC8& aValue ); - - /** - * Checks if the value is valid framerate attribute - * - * @param aValue Value string - */ - void CheckValidFrameRateL( const TDesC8& aValue ); - - /** - * Checks if the value is among valid uri value for control attribute - * - * @param aValue Value string - */ - void CheckValidControlL( const TDesC8& aValue ); - - /** - * Checks if the value is valid value for group attribute as - * specified in RFC 3388 - * - * @param aValue Value string - */ - void CheckValidGroupL( const TDesC8& aValue ); - - /** - * Checks if the value is valid value for des attribute as - * specified in RFC 3312 - * - * @param aValue Value string - */ - void CheckValidDesL( const TDesC8& aValue ); - - /** - * Checks if the value is valid value for curr and conf attribute as - * specified in RFC 3312 - * - * @param aValue Value string - */ - void CheckValidCurrAndConfL( const TDesC8& aValue ); - - /** - * Checks if value is included in the list of predefined values - * - * @param aItemsCount Predefined values count - * @param aValuesList List of predefined values - * @param aValue Value string - */ - void ValidValueInListL( TInt aItemsCount, - const TText8* const aValuesList[], - const TDesC8& aValue ); - - /** - * Checks if the value is valid value for range attribute as - * specified in RFC 2326 - * - * @param aValue Value string - */ - void CheckValidRangeL( const TDesC8& aValue ); - - - /** - * Checks if the value is valid rtpmap string - * - * @param aValue Value string - */ - void CheckValidRtpmapL( const TDesC8& aValue ); - - /** - * Checks if the value is valid fmtp string - * - * @param aValue Value string - */ - void CheckValidFmtpL( const TDesC8& aValue ); - - /** - * Set attribute and values. Attribute is not one of predefined ones. - * - * @param aAttribute Attribute string (in cleanup stack) - * @param aValue Value string - */ - void SetNotPredefinedAttributeL( const TDesC8& aAttribute, - const TDesC8& aValue ); - - void CreateAttributeFieldPtrsL(); - - inline CSdpAttributeFieldPtrs& AttributeFieldPtrs(); - - inline const CSdpAttributeFieldPtrs& AttributeFieldPtrs() const; - - __DECLARE_TEST; - - private: // Data - - // String pool - RStringPool iPool; - - // Attribute name - RStringF iAttribute; - - // Flag indicating if the attribute is a property attribute - TBool iPropertyAttribute; - - // Value field - HBufC8* iValue; - }; - -#endif // CSDPATTRIBUTEFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpbandwidthfield.h --- a/epoc32/include/sdpbandwidthfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpBandwidthField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPBANDWIDTHFIELD_H -#define CSDPBANDWIDTHFIELD_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the bandwidth field of - * the Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpBandwidthField : public CBase - { - public:// Constructors and destructor - /** - * Constructs a new bandwidth field. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpBandwidthField* DecodeL(const TDesC8& aText); - - /** - * Constructs a new bandwidth field and adds the pointer to the - * cleanup stack. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpBandwidthField* DecodeLC(const TDesC8& aText); - - /** - * Constructs a new bandwidth field. - * - * @param aModifier Bandwidth modifier. - * @param aValue Bandwidth value. - * @return a new instance. - */ - IMPORT_C static CSdpBandwidthField* NewL(RStringF aModifier, - TUint32 aValue); - - /** - * Constructs a new bandwidth field and adds the pointer to the - * cleanup stack. - * - * @param aModifier Bandwidth modifier. - * @param aValue Bandwidth value. - * @return a new instance. - */ - IMPORT_C static CSdpBandwidthField* NewLC(RStringF aModifier, - TUint32 aValue); - - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpBandwidthField(); - - public: // New functions - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream Stream used for output. On return - * the stream includes correctly formatted bandwidth field. - */ - IMPORT_C void EncodeL(RWriteStream& aStream) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpBandwidthField * CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == (const CSdpBandwidthField& aObj) const; - - /** - * Gets the bandwidth modifier. - * - * @return The modifier that can be pre-defined in the - * SDP string table or defined by the user. - */ - IMPORT_C RStringF Modifier() const; - - /** - * Sets the bandwidth modifier. - * - * @param aModifier A valid bandwidth modifier name. - */ - IMPORT_C void SetModifier(RStringF aModifier); - - /** - * Gets the bandwidth value. - * - * @return The value. - */ - IMPORT_C TUint32 Value() const; - - /** - * Sets the bandwidth value. - * - * @param aValue The Value. - */ - IMPORT_C void SetValue(TUint32 aValue); - - public: - /** - * Externalize the instance in a memory optimized format. - * - * @param aStream The stream used for externalization. - */ - void ExternalizeL(RWriteStream& aStream) const; - - /** - * Create a new instance from value created with ExternalizeL(). - * - * @param aStream The stream used for internalization. - * @return The new instance. - */ - static CSdpBandwidthField* InternalizeL(RReadStream& aStream); - - private: - CSdpBandwidthField(); - void ConstructL(const TDesC8& aText); - void ConstructL(RStringF aModifier, TUint32 aValue); - void ConstructL(const TDesC8& aModifier, TUint32 aValue); - - /** - * Copies given modifier to iModifier. If aModifier is none of - * predefined ones, new modifier is added to stringPool. - * - * @param aModifier Given modifier - */ - void CopyModifierL(const TDesC8& aModifier); - - private: // Data - RStringF iModifier; - TUint32 iValue; - RStringPool iStringPool; - }; - -#endif // CSDPBANDWIDTHFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpcodecconstants.h --- a/epoc32/include/sdpcodecconstants.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpCodecConstants.h -* Part of : SDPCodec -* Constants defination file -* Version : 1.0 -* -*/ - - - - -#ifndef __SDPCODECCONSTANTS_H__ -#define __SDPCODECCONSTANTS_H__ - -/** -* @file -* @publishedAll -* @released -*/ - - -// Delimiter constants -const TText8 KDotChar = '.'; -const TText8 KColonChar = ':'; -const TText8 KSPChar = ' '; -const TText8 KEqualChar = '='; -const TText8 KSlashChar = '/'; -const TText8 KHyphenChar = '-'; -const TText8 KLFChar = '\n'; -const TText8 KCRChar = '\r'; -const TText8 KEofChar = '\0'; - -_LIT8(KDotStr, "."); -_LIT8(KColonStr, ":"); -_LIT8(KSPStr, " "); -_LIT8(KEqualStr, "="); -_LIT8(KSlashStr, "/"); -_LIT8(KHyphenStr, "-"); -_LIT8(KCRLFStr, "\r\n"); -_LIT8(KLFStr, "\n"); -_LIT8(KCRStr, "\r"); -_LIT8(KEofStr, "\0"); -_LIT8(KValidFQDNChars, - "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-"); - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpcodecerr.h --- a/epoc32/include/sdpcodecerr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpCodecErr.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef SDPCODECERR_H -#define SDPCODECERR_H - -/** -* @file -* @publishedAll -* @released -*/ - -/** - * Base value for the SdpCode error code range - */ -const TInt KSdpCodecErrorBase = -17875; -/** - * Codec encoding errors for SDP fields - */ -const TInt KErrSdpCodecVersionField = KSdpCodecErrorBase; -const TInt KErrSdpCodecOriginField = KSdpCodecErrorBase - 1; -const TInt KErrSdpCodecSessionField = KSdpCodecErrorBase - 2; -const TInt KErrSdpCodecInfoField = KSdpCodecErrorBase - 3; -const TInt KErrSdpCodecUriField = KSdpCodecErrorBase - 4; -const TInt KErrSdpCodecEmailField = KSdpCodecErrorBase - 5; -const TInt KErrSdpCodecPhoneField = KSdpCodecErrorBase - 6; -const TInt KErrSdpCodecConnectionField = KSdpCodecErrorBase - 7; -const TInt KErrSdpCodecBandwidthField = KSdpCodecErrorBase - 8; -const TInt KErrSdpCodecTimeField = KSdpCodecErrorBase - 9; -const TInt KErrSdpCodecRepeatField = KSdpCodecErrorBase - 10; -const TInt KErrSdpCodecZoneField = KSdpCodecErrorBase - 11; -const TInt KErrSdpCodecKeyField = KSdpCodecErrorBase - 12; -const TInt KErrSdpCodecAttributeField = KSdpCodecErrorBase - 13; -const TInt KErrSdpCodecMediaField = KSdpCodecErrorBase - 14; -const TInt KErrSdpCodecMediaInfoField = KSdpCodecErrorBase - 15; -const TInt KErrSdpCodecMediaConnectionField = KSdpCodecErrorBase - 16; -const TInt KErrSdpCodecMediaBandwidthField = KSdpCodecErrorBase - 17; -const TInt KErrSdpCodecMediaKeyField = KSdpCodecErrorBase - 18; -const TInt KErrSdpCodecMediaAttributeField = KSdpCodecErrorBase - 19; -const TInt KErrSdpCodecTypedTime = KSdpCodecErrorBase - 20; - -const TInt KErrSdpCodecStringPool = KSdpCodecErrorBase - 21; -const TInt KErrSdpCodecDecode = KSdpCodecErrorBase - 22; - -#endif //SDPCODECERR_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpcodecstringpool.h --- a/epoc32/include/sdpcodecstringpool.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpCodecStringPool.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef SDPCODECSTRINGPOOL_H -#define SDPCODECSTRINGPOOL_H - -// INCLUDES -#include -#include "_sdpdefs.h" -#include - -class CSdpCodecStringPool; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* This class defines string pool for SDP Codec. -* The client of SDP Codec must call OpenL() before -* invoking any function of SDP Codec classes. -* The client must close the string pool when finished using -* SDP Codec classes. -* -* Note: the client must not close the string pool while -* using SDP Codec classes. -* -* @lib sdpcodec.lib -*/ -class SdpCodecStringPool - { -public: // Constructors and destructor - - /** - * Opens SDP Codec string pool. - * - * @leave KErrAlreadyExists if pool already exists in TLS. - */ - IMPORT_C static void OpenL(); - - /** - * Closes SDP Codec string pool. - * - */ - IMPORT_C static void Close(); - -public: - - /** - * Gets the string pool used by SDP Codec. - * - * @return RStringPool: A handle to a string pool - * @leave KErrSdpCodecStringPool if the pool is not opened. - * - */ - IMPORT_C static RStringPool StringPoolL(); - - /** - * Gets the string table used by SDP Codec. - * - * @return TStringTable&: The string pool table - * @leave KErrSdpCodecStringPool if the pool is not opened. - * - */ - IMPORT_C static const TStringTable& StringTableL(); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpconnectionfield.h --- a/epoc32/include/sdpconnectionfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,443 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpConnectionField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPCONNECTIONFIELD_H -#define CSDPCONNECTIONFIELD_H - -// INCLUDES -#include -#include -#include -#include "_sdpdefs.h" - -// CONSTANTS -const TUint KDefaultNumOfAddress = 1; - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the connection information field of - * the Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpConnectionField : public CBase - { - public: // Constructors and destructor - - /** - * Constructs a new connection field. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpConnectionField* DecodeL( const TDesC8& aText ); - - /** - * Constructs a new connection field and adds the pointer to the - * cleanup stack. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpConnectionField* DecodeLC( const TDesC8& aText ); - - /** - * Constructs a new connection field. - * Also sets the network type to "IN" and address type to "IP4" or - * "IP6" depending on the address family of aAddress. - * - * @param aAddress IP address from either KAfInet - * or KAfInet6 family - * @param aTTL Time-To-Live for IP4 multicasts, set it as - * KErrNotFound if IPv6 multicast or IPv4 unicast - * @param aNumOfAddress Number of addresses in multicast, - * if unicast, must be 1 - * @return a new instance. - */ - IMPORT_C static CSdpConnectionField* NewL( - const TInetAddr& aAddress, - TInt aTTL = KErrNotFound, - TUint aNumOfAddress = KDefaultNumOfAddress ); - - /** - * Constructs a new connection field. - * - * @param aNetType A valid network type name from the pre- - * defined SDP string table or defined by the user. - * @paramaAddressType A valid address type name from the - * pre-defined SDP string table or defined by the user. - * @param const TDesC8& aAddress: A valid address of the address type. - * Can contain TTL & number of addresses parameter as well. - * @return a new instance. - */ - IMPORT_C static CSdpConnectionField* NewL( - RStringF aNetType, - RStringF aAddressType, - const TDesC8& aAddress ); - - /** - * Constructs a new connection field and adds the pointer to the - * cleanup stack. Also sets the network type to "IN" and address type - * to "IP4" or "IP6" depending on the address family of aAddress. - * - * @param aAddress IP address from either KAfInet - * or KAfInet6 family - * @param aTTL Time-To-Live for IP4 multicasts, set it as - * KErrNotFound if IPv6 multicast or IPv4 unicast - * @param aNumOfAddress Number of addresses in multicast, - * if unicast, must be 1 - * @return a new instance. - */ - IMPORT_C static CSdpConnectionField* NewLC( - const TInetAddr& aAddress, - TInt aTTL = KErrNotFound, - TUint aNumOfAddress = KDefaultNumOfAddress ); - - /** - * Construct a new connection field and adds the pointer to the - * cleanup stack. - * - * @param aNetType A valid network type name from the pre- - * defined SDP string table or defined by the user - * @paramaAddressType A valid address type name from the - * pre-defined SDP string table or defined by the user - * @param const TDesC8& aAddress: A valid address of the address type. - * Can contain TTL & number of addresses parameter as well. - * @return a new instance. - */ - IMPORT_C static CSdpConnectionField* NewLC( - RStringF aNetType, RStringF aAddressType, const TDesC8& aAddress ); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpConnectionField(); - - public: // New functions - - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream: Stream used for output. On return the - * stream includes correctly formatted connection field. - */ - IMPORT_C void EncodeL( RWriteStream& aStream ) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpConnectionField* CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param const CSdpConnectionField& aObj: The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator== ( const CSdpConnectionField& aObj ) const; - - /** - * Gets the network type that is from the pre-defined SDP string table - * or given by the user. - * - * @return The network type. - */ - IMPORT_C RStringF NetType() const; - - /** - * Gets the address type that is from the pre-defined SDP string table - * or given by the user. - * - * @return The address type. - */ - IMPORT_C RStringF AddressType() const; - - /** - * Gets the address. - * - * @return Address as an IP address or null if it is - * not an IP address. This may be e.g. when the address - * has been specified as a FQDN. In this case, the address - * can be accessed using the other getters. - */ - IMPORT_C const TInetAddr* InetAddress() const; - - /** - * Gets the address. - * - * @return Address as a string. - */ - IMPORT_C const TDesC8& Address() const; - - /** - * Sets the address, network and address type. Also sets the network - * type to "IN" and address type to "IP4" or "IP6" depending on the - * address family of aAddress. - * - * @param aValue The new address. - * @param aTTL Time-To-Live for IP4 multicasts, set it as - * KErrNotFound if IPv6 multicast or IPv4 unicast - * @param aNumOfAddress Number of addresses in multicast, - * if unicast, must be 1. - * @leave KErrSdpCodecConnectionField ifaddress to be set is wrongly - * formatted. - */ - IMPORT_C void SetInetAddressL( const TInetAddr& aValue, - TInt aTTL = KErrNotFound, - TUint aNumOfAddress = KDefaultNumOfAddress); - - /** - * Sets the address, network and address type. - * - * @param aNetType A valid network type name from the pre- - * defined SDP string table or defined by the user - * @param aAddressType A valid address type name from the - * pre-defined SDP string table or defined by the user - * @param aAddress A valid address of the address type. - */ - IMPORT_C void SetAddressL( RStringF aNetType, - RStringF aAddressType, - const TDesC8& aAddress ); - - /** - * Gets TTL attribute. - * - * @return TTL or KErrNotFound, if one is not available for the address - */ - IMPORT_C TInt TTLValue() const; - - /** - * Sets TTL attribute (only valid for IP4 multicasts). - * Leaves if trying to set TTL to address that doesn't support it. - * - * @param aTTL Time-To-Live for IP4 multicasts - * @leave KErrSdpCodecConnectionField if aTTL is invalid. - */ - IMPORT_C void SetTTLL( TInt aTTL ); - - /** - * Gets the number of addresses (can be more than 1 for multicasts). - * Multicast addresses are contiguously allocated above the base - * address. - * - * @return Number of addresses - */ - IMPORT_C TInt NumOfAddress() const; - - /** - * Sets the number of addreses allocated for multicast. - * - * @param aNumOfAddress Number of addresses in multicast - * @leave KErrSdpCodecConnectionField if the address is unicast. - */ - IMPORT_C void SetNumOfAddressL( TUint aNumOfAddress ); - - public: // Internal to codec - - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL( RWriteStream& aStream ) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpConnectionField* InternalizeL( RReadStream& aStream ); - - private: // Internal - - /** - * Constructor - */ - CSdpConnectionField(); - - /** - * 2nd phase constructor - * - * @param aText A string containing a correctly formatted field value - * terminated by a CRLF. - */ - void ConstructL( const TDesC8& aText ); - - /** - * 2nd phase constructor - * - * @param aAddress IP address from either KAfInet or KAfInet6 family - * @param aTTL Time-To-Live for IP4 multicasts - * @param aNumOfAddress Nubmer of addresses in multicast - */ - void ConstructL( const TInetAddr& aAddress, - TInt aTTL, TUint aNumOfAddress ); - - /** - * 2nd phase constructor - * - * @param aNetType A valid network type name from the pre-defined - * SDP string table or defined by the user - * @param aAddressType A valid address type name from the pre-defined - * SDP string table or defined by the user - * @param aAddress A valid address of the address type - */ - void ConstructL( RStringF aNetType, RStringF aAddressType, - const TDesC8& aAddress ); - - /** - * Checks if the address is valid against given arguments - * - * @param aAddressTypeIP4 The given type of address (EFalse = IP6) - * @param aAddress Address with possibly TTL & number of addresses - * @return error code (KErrNone if valid) - */ - TInt IsValidAddress( TBool aAddressTypeIP4, - const TDesC8& aAddress ) const; - - /** - * Checks if the address is valid against given arguments - * - * @param aAddress Address in TInetAddr format - * @param aTTL TTL attribute - * @param aNumOfAddress Number off addresses - * @return error code (KErrNone if valid) - */ - TInt IsValidAddress( const TInetAddr& aAddress, - TInt aTTL, TUint aNumOfAddress ) const; - - /** - * Parses address field - * - * @param aAddressTypeIP4 The given type of address (EFalse = IP6) - * @param aAddress Address with possibly TTL & number of addresses - * @param aTTL TTL value is stored here (or KErrNotFound) - * @param aNumberOfAddresses Range of addreses - * @return The address - */ - HBufC8* ParseAddressFieldL( TBool aAddressTypeIP4, - const TDesC8& aAddress, - TInt& aTTL, - TUint& aNumberOfAddresses ) const; - - /** - * Parses IP4 address - * - * @param aPos Position of the (first) separation mark - * @param aTTL TTL value is stored here (or KErrNotFound) - * @param aAddr Addres in TInetAddr format - * @param aAddress The whole address field - * @param aNumberOfAddresses Range of addreses - * @return The address - */ - HBufC8* ParseIP4AddressL( TInt aPos, - TInetAddr& aAddr, - const TDesC8& aAddress, - TInt& aTTL, - TUint& aNumberOfAddresses ) const; - - /** - * Parses IP6 address - * - * @param aPos Position of the (first) separation mark - * @param aTTL TTL value is stored here (or KErrNotFound) - * @param aAddr Addres in TInetAddr format - * @param aAddress The whole address field - * @param aNumberOfAddresses Range of addreses - * @return The address - */ - HBufC8* ParseIP6AddressL( TInt aPos, - TInetAddr& aAddr, - const TDesC8& aAddress, - TInt& aTTL, - TUint& aNumberOfAddresses ) const; - - /** - * Copies given network type to iNetType and verifies aNetType to - * be valid - * - * @param aNetType Given network type - */ - void CopyNetTypeL( const TDesC8& aNetType ); - - /** - * Copies given address type to iAddressType and verifies aAddrType - * to be valid - * - * @param aAddrType Given address type - */ - void CopyAddressTypeL( const TDesC8& aAddrType ); - - /** - * Copies address to iAddress, and initalizes TTL & number of addresses, - * leaves on error - * - * @param aAddress Address string, which can also contain TTL - * and number of addresses attributes - */ - void CopyAddressL( const TDesC8& aAddress, RStringPool aPool ); - - private: // Data - - // - RStringF iNetType; - - //
- RStringF iAddressType; - - // mutable TInetAddr for InetAddress() - mutable TInetAddr iInetAddress; - - // Address in text format - HBufC8* iAddress; - - // TTL for IP4 multicast addresses - TInt iTTL; - // Number of addresses - TUint iNumOfAddress; - - // String pool - RStringPool iPool; - - __DECLARE_TEST; - }; - -#endif // CSDPCONNECTIONFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpdocument.h --- a/epoc32/include/sdpdocument.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,446 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpDocument.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPDOCUMENT_H -#define CSDPDOCUMENT_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" -#include - -// FORWARD DECLARATIONS -class SdpUtil; -class RReadStream; -class RWriteStream; -class CUri8; -class CDesC8Array; -class CSdpOriginField; -class CSdpEmailField; -class CSdpPhoneField; -class CSdpConnectionField; -class CSdpBandwidthField; -class CSdpTimeField; -class CSdpAttributeField; -class CSdpMediaField; -class CSdpKeyField; -class CSdpCodecParseUtil; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the Session Description Protocol (SDP) document. - * The SDP document is a collection of SDP fields and related values - * describing a session. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpDocument : public CBase - { - public: // Constructors and destructor - /** - * Constructs a new SDP document. - * - * @param aText A string containing a correctly formatted SDP document. - * @return a new instance. - */ - IMPORT_C static CSdpDocument* DecodeL(const TDesC8& aText); - - /** - * Constructs a new SDP document and adds the pointer to the cleanup stack. - * - * @param aText A string containing a correctly formatted SDP document. - * @return a new instance. - */ - IMPORT_C static CSdpDocument* DecodeLC(const TDesC8& aText); - - /** - * Constructs a new, empty SDP document. - * The instance will have the following initial values: - * v=0 - * s=- - * t=0 0 - * - * @return a new instance. - */ - IMPORT_C static CSdpDocument* NewL(); - - /** - * Constructs a new, empty SDP document document and adds the pointer to - * the cleanup stack. - * The instance will have the following initial values: - * v=0 - * s=- - * t=0 0 - * - * @return a new instance. - */ - IMPORT_C static CSdpDocument* NewLC(); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpDocument(); - - public: - /** - * Externalizes the object state in an internal, memory optimized format. - * - * @param aStream The output stream. - */ - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - - /** - * Internalizes the object state from an internal, memory optimized format. - * - * @param aStream The input stream. - * @return A new SDP document internalized from the input stream. - */ - IMPORT_C static CSdpDocument* InternalizeL(RReadStream& aStream); - - /** - * Outputs the SDP document formatted according to SDP syntax. - * It is possible to output the document even though it is - * incomplete in the sense that all mandatory SDP fields are - * not present.When creating an SDP document to be used e.g. - * as part of SIP signalling, caller should first ensure the - * validity of the document using the IsValid() function. - * - * @param aStream Stream used for output. On return the - * stream includes correctly formatted SDP description. - */ - IMPORT_C void EncodeL(RWriteStream& aStream) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpDocument* CloneL() const; - - /** - * Checks if the instance represents a valid SDP document. - * - * @return ETrue if SDP document is valid and EFalse if not. - */ - IMPORT_C TBool IsValid() const; - - /** - * Gets the SDP version used in the version field. - * Note, that the current implementation supports only version number 0. - * - * @return The SDP version number. - */ - IMPORT_C TUint SdpVersion() const; - - /** - * Gets a reference to the session origin field. - * Note, that the ownership is not transferred and - * the instance must not be deleted by the caller. - * - * @return The origin field or zero if not present. - */ - IMPORT_C CSdpOriginField* OriginField(); - - /** - * Gets a reference to the session origin field. - * - * @return The origin field or zero if not present. - */ - IMPORT_C const CSdpOriginField* OriginField() const; - - /** - * Sets or removes the session origin field. - * Note, that the ownership of the argument is - * transferred to the SDP document object. - * - * @param aObj New origin field or null to remove the field. - */ - IMPORT_C void SetOriginField(CSdpOriginField* aObj); - - /** - * Gets the session name field value. - * - * @return The session name or empty descriptor if not present. - */ - IMPORT_C const TDesC8& SessionName() const; - - /** - * Sets the session name field value. - * - * @param aValue Valid session name value. - * Note that an empty value is not accepted. - * @leave KErrSdpCodecSessionField if - * aValue is not empty or aValue includes invalid byte strings - * (´\0´, ´\n´, ´\r´). - */ - IMPORT_C void SetSessionNameL(const TDesC8& aValue); - - /** - * Gets the session information field value. - * - * @return Info field value or an empty descriptor if not present. - */ - IMPORT_C const TDesC8& Info() const; - - /** - * Sets or removes the session information field value. - * - * @param New field value or an empty descriptor to remove the field. - * @leave KErrSdpCodecInfoField if aValue is not empty or aValue includes - * invalid byte strings (´\0´, ´\n´, ´\r´). - */ - IMPORT_C void SetInfoL(const TDesC8& aValue); - - /** - * Gets the session URI field value. - * Note, that the ownership is not transferred and - * the instance must not be deleted by the caller. - * - * @return CUri8*: Session URI or zero if the field is not present. - */ - IMPORT_C CUri8* Uri(); - - /** - * Gets the session URI field value. - * - * @return Session URI or zero if the field is not present. - */ - IMPORT_C const CUri8* Uri() const; - - /** - * Sets or removes the session level URI field. - * Note, that the ownership of the argument is - * transferred to the SDP document object. - * - * @param New value of the field or zero to remove the field. - */ - IMPORT_C void SetUri(CUri8* aValue); - - /** - * Gets the set of session level email field values. This array is used to - * add and remove fields into the document. - * Note, that only correctly formatted email field values should be placed - * into the array. Empty values in the array will be ignored. - * - * @return Email fields in array or empty array if no email fields. - */ - IMPORT_C CDesC8Array& EmailFields(); - - /** - * Gets the set of session level phone field values. This array is used to - * add and remove fields into the document. - * Note, that only correctly formatted phone field values should be placed - * into the array. Empty values in the array will be ignored. - * - * @return Phone fields in array or empty array if no phone fields. - */ - IMPORT_C CDesC8Array& PhoneFields(); - - /** - * Gets the session level connection field. - * Note, that the ownership is not transferred and the instance must not be - * deleted by the caller. - * - * @return Connection field or zero if not present. - */ - IMPORT_C CSdpConnectionField* ConnectionField(); - - /** - * Gets the session level connection field. - * - * @return Connection field or zero if not present. - */ - IMPORT_C const CSdpConnectionField* ConnectionField() const; - - /** - * Sets or removes the session level connection field. - * Note, that the ownership of the argument is - * transferred to the SDP document object. - * - * @param New connection field or zero to remove the field. - */ - IMPORT_C void SetConnectionField(CSdpConnectionField* aObj); - - /** - * Gets the possibly empty set of session level bandwidth fields. - * This array is used directly for element insertion and removal. - * The array may contain zero references and these are ignored. - * - * The objects referenced from the array are owned by the document - * instance and must not be deleted. An object can be removed from - * the document by setting the corresponding element to zero. By - * doing so, the calling party receives ownership of the removed object. - * - * @return Set of bandwidth fields. - */ - IMPORT_C RPointerArray& BandwidthFields(); - - /** - * Gets the set of session level time description fields. - * This array is used directly for element insertion and removal. - * There must be at least one time description field in a valid SDP - * document.The array may contain zero references and these are ignored. - * - * The objects referenced from the array are owned by the document - * instance and must not be deleted. An object can be removed from the - * document by setting the corresponding element to zero. By doing so, - * the calling party receives ownership of the removed object. - * - * @return Set of time fields. - */ - IMPORT_C RPointerArray& TimeFields(); - - /** - * Gets the zone adjustments field value. - * - * @return The field value or an empty descriptor if the - * field is not present. - */ - IMPORT_C const TDesC8& ZoneAdjustments() const; - - /** - * Sets the zone adjustments field value. - * - * @param aValue A valid field value or an empty descriptor - * if field is not present. - */ - IMPORT_C void SetZoneAdjustmentsL(const TDesC8& aValue); - - /** - * Gets the session level encryption key field. - * Note, that the ownership is not transferred and - * the instance must not be deleted by the caller. - * - * @return The encryption key or zero if not present. - */ - IMPORT_C CSdpKeyField* Key(); - - /** - * Gets the session level encryption key field. - * - * @return The encryption key or zero if not present. - */ - IMPORT_C const CSdpKeyField* Key() const; - - /** - * Sets or removes the encryption key field. - * Note, that the ownership of the argument is - * transferred to the SDP document object. - * - * @param aObj New value of the field or zero to remove the field. - */ - IMPORT_C void SetKey(CSdpKeyField* aObj); - - /** - * Gets the possibly empty set of session level attribute fields. - * This array is used directly for element insertion and removal. - * The array may contain zero references and these are ignored. - * - * The objects referenced from the array are owned by the document - * instance and must not be deleted. An object can be removed from the - * document by setting the corresponding element to zero. By doing so, - * the calling party receives ownership of the removed object. - * - * @return Set of session level attributes. - */ - IMPORT_C RPointerArray& AttributeFields(); - - /** - * Gets the possibly empty set of media description fields. - * This array is used directly for element insertion and removal. - * Note, that media level attributes and fields are managed - * through the corresponding media field instance and not through - * the document instance. - * The array may contain zero references and these are ignored. - * - * The objects referenced from the array are owned by the document - * instance and must not be deleted. An object can be removed from the - * document by setting the corresponding element to zero. By doing so, - * the calling party receives ownership of the removed object. - * - * @return Set of media description fields. - */ - IMPORT_C RPointerArray& MediaFields(); - - private: - CSdpDocument(); - void ConstructL(); - void ConstructL(const CSdpDocument& aSdpDocument); - void DoInternalizeL(RReadStream& aStream); - - void ParseL (const TDesC8& aText); - void ParseSessionVersionL(); - void ParseSessionOwnerL(); - void ParseSessionNameL(); - void ParseSessionInformationL(); - void ParseUriL(); - void ParseEmailL(); - void ParsePhoneL(); - void ParseConnectionL(); - void ParseBandwidthL(); - void ParseTimeFieldL(); - void ParseZoneAdjustmentL(); - void ParseEncryptionKeyL(); - void ParseAttributeFieldL(); - void ParseMediaLevelL (); - void ExternalizeDesCArrayL(CDesC8ArraySeg& aArray, - RWriteStream& aStream) const; - void EncodeDesCArrayL(CDesC8ArraySeg& aArray,TInt aIndex, - RWriteStream& aStream) const; - - TDesC8& GetTokenFromStreamL(RReadStream& aStream); - - CSdpDocument(const CSdpDocument&); // Hidden. - CSdpDocument& operator = (const CSdpDocument&); // Hidden - - private: // Data - - HBufC8* iInfo; - HBufC8* iSessionName; - HBufC8* iZoneAdjustments; - CSdpKeyField* iSdpKeyField; - CSdpOriginField* iSdpOriginField; - CSdpConnectionField* iSdpConnectionField; - TUint iSdpVersion; - RPointerArray* iTimeFields; - RPointerArray* iBandwidthFields; - RPointerArray* iAttributeFields; - RPointerArray* iMediaFields; - CUri8* iUri; - CDesC8ArraySeg* iEmailFields; - CDesC8ArraySeg* iPhoneFields; - RStringPool iPool; - HBufC8* iToken; - CSdpCodecParseUtil* iSdpCodecParseUtil; - }; - -#endif // CSDPDOCUMENT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpfmtattributefield.h --- a/epoc32/include/sdpfmtattributefield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,263 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpFmtAttributeField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPFMTATTRIBUTEFIELD_H -#define CSDPFMTATTRIBUTEFIELD_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; -class CSdpAttributeField; -class TSdpRtpmapValue; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the attribute field of the Session Description - * Protocol for media format/payload type level attributes. Media and session - * level attributes are supported by the CSdpAttributeField class. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpFmtAttributeField : public CBase - { - public: // Constructors and destructor - /** - * Constructs a new media format level attribute field. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpFmtAttributeField* DecodeL( const TDesC8& aText ); - - /** - * Constructs a new media format level attribute field and adds the - * pointer to the cleanup stack. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpFmtAttributeField* DecodeLC( const TDesC8& aText); - - /** - * Constructs a new media level format attribute field. - * - * @param aAttribute The attribute name. It can be a pre-defined - * name in the SDP string pool or defined by the client. - * @param aFormat A valid format/payload identifier - * used in the format list of the media description. - * @param aValue A valid attribute value or an empty - * descriptor to omit the value part. - * @return a new instance. - */ - IMPORT_C static CSdpFmtAttributeField* NewL( - RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); - - /** - * Constructs a new media format level attribute field and adds the - * pointer to the cleanup stack. - * - * @param aAttribute The attribute name. It can be a pre-defined - * name in the SDP string pool or defined by the client. - * @param aFormat A valid format/payload identifier - * used in the format list of the media description. - * @param aValue A valid attribute value or an empty - * descriptor to omit the value part. - * @return a new instance. - */ - IMPORT_C static CSdpFmtAttributeField* NewLC( - RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpFmtAttributeField(); - - public: // New functions - - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream Stream used for output. On return - * the stream includes correctly formatted attribute field. - */ - IMPORT_C void EncodeL( RWriteStream& aStream ) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpFmtAttributeField * CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator== ( const CSdpFmtAttributeField& aObj ) const; - - /** - * Gets the attribute. - * - * @return The attribute name. The name can be pre-defined - * name in the SDP string table or defined by the client. - */ - IMPORT_C RStringF Attribute() const; - - /** - * Gets the format. - * - * @return The format. - */ - IMPORT_C const TDesC8& Format() const; - - /** - * Gets the attribute value. - * - * @return The value or an empty descriptor if there is no value part. - */ - IMPORT_C const TDesC8& Value() const; - - /** - * Sets the attribute, format/payload type and attribute value. - * - * @param aAttribute A valid attribute name. It can be a - * pre-defined name in the SDP string pool or defined by - * the client. - * @param aFormat A valid format/payload identifier - * used in the formatlist of the media description. - * @param aValue A valid attribute value or an empty - * descriptor to omit the value part. - * @leave KErrSdpCodecMediaAttributeField if aAttribute is not rtpmap - * or fmtp attribute. - */ - IMPORT_C void SetL( - RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); - - public: // Internal to codec - - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL( RWriteStream& aStream ) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpFmtAttributeField* InternalizeL( RReadStream& aStream ); - - /** - * Returns attribute field - * - * @return Attribute field - */ - const CSdpAttributeField* AttributeField() const; - - private: // New methods - - /** - * Creates object from the stream data. - * Does the "2nd phase construction" of internalization. - * - * @param aStream Stream where the object's state will be read - */ - void DoInternalizeL( RReadStream& aStream ); - - /** - * Formats value parameters - * - * @param aField Attribute field object - */ - void FormatValueParamsL( CSdpAttributeField* aField ); - - private: // Construction and destruction - - /** - * Constructor - */ - CSdpFmtAttributeField(); - - /** - * Second phase construction - * - * @param aText A string containing a correctly formatted field value - * terminated by a CRLF. - */ - void ConstructL( const TDesC8& aText ); - - /** - * Second phase construction - * - * @param aAttribute The attribute from the pre-defined SDP string - * table or defined by the user - * @param aFormat A valid format/payload identifier used in the format - * list of the media description. - * @param aValue A valid attribute value or an empty descriptor - * to omit the value part. - */ - void ConstructL( - RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue ); - - - /** - * Decode format parameter from string - * - * @param aText A text includeing format parameter. - */ - void DecodeFormatL(const TDesC8& aText); - - __DECLARE_TEST; - - private: - - RStringPool iPool; - CSdpAttributeField* iAttributeField; - /** Pointer to the format part*/ - TPtrC8 iFormat; - /** Pointer to the format parameters*/ - TPtrC8 iValuePart; - }; - -#endif // CSDPFMTATTRIBUTEFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpkeyfield.h --- a/epoc32/include/sdpkeyfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpKeyField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPKEYFIELD_H -#define CSDPKEYFIELD_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the encryption key field of - * the Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpKeyField : public CBase - { - public: // Constructors and destructor - /** - * Constructs a new encryption key field. - * - * @param aFieldValue A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpKeyField* DecodeL(const TDesC8& aFieldValue); - - /** - * Constructs a new encryption key field and adds the pointer to - * the cleanup stack. - * - * @param aFieldValue A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - * @leave In error case function leaves. - */ - IMPORT_C static CSdpKeyField* DecodeLC(const TDesC8& aFieldValue); - - /** - * Constructs a new encryption key field. - * - * @param aMethod Encryption method from the pre-defined - * SDP string table. User defined values are not accepted. - * @param aEncryptionKey A valid encryption key value - * or an empty descriptor to omit the key part. - * @return a new instance. - */ - IMPORT_C static CSdpKeyField* NewL(RStringF aMethod, - const TDesC8& aEncryptionKey); - - /** - * Constructs a new encryption key field and adds the pointer to - * the cleanup stack. - * - * @param aMethod Encryption method from the pre-defined - * SDP string table. User defined values are not accepted. - * @param aEncryptionKey A valid encryption key value - * or an empty descriptor to omit the key part. - * @return a new instance. - */ - IMPORT_C static CSdpKeyField* NewLC(RStringF aMethod, - const TDesC8& aEncryptionKey); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpKeyField(); - - public: // New functions - /** - * Writes the instance as a complete SDP field encoded as UTF-8 - * and formatted as defined in draft-ietf-mmusic-sdp-new-14. - * - * @param aStream Stream used for output. On return - * the stream includes correctly formatted key field. - */ - IMPORT_C void EncodeL(RWriteStream& aStream) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpKeyField * CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == (const CSdpKeyField& aObj) const; - - /** - * Gets the encryption method. - * - * @return The method. - */ - IMPORT_C RStringF Method() const; - - /** - * Gets the encryption key. - * - * @return The key or an empty descriptor if there is no key part. - */ - IMPORT_C const TDesC8& EncryptionKey() const; - - /** - * Sets the encryption method and key. - * - * @param aMethod Encryption method from the pre-defined - * SDP string table. User defined values are not accepted. - * @param aEncryptionKey A valid encryption key value - * or an empty descriptor to omit the key part. - */ - IMPORT_C void SetL(RStringF aMethod, - const TDesC8& aEncryptionKey); - - public: - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL(RWriteStream& aStream) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpKeyField* InternalizeL(RReadStream& aStream); - - private: - CSdpKeyField(); - void ConstructL(const TDesC8& aText); - void ConstructL(RStringF aMethod, const TDesC8& aEncryptionKey); - void DoInternalizeL(RReadStream& aStream); - void SetMethodAndKeyL(RStringF aMethod, - const TDesC8& aEncryptionKey, - TBool aAllowEmptyKeyValue); - void SetMethodClearAndKeyL(RStringF aMethod, const TDesC8& aEncryptionKey); - void SetMethodBase64AndKeyL(RStringF aMethod, const TDesC8& aText); - void SetMethodUriAndKeyL(RStringF aMethod, const TDesC8& aText); - void SetMethodPromptL(RStringF aMethod, const TDesC8& aText); - RArray GetElementsFromLineL( TLex8& aLexer); - - private: // Data - RStringF iMethod; - TBool iMethodOpen; - HBufC8* iEncryptionKey; - RStringPool iStringPool; - - __DECLARE_TEST; - }; - -#endif // CSDPKEYFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdpmediafield.h --- a/epoc32/include/sdpmediafield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,445 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpMediaField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPMEDIAFIELD_H -#define CSDPMEDIAFIELD_H - -// INCLUDES -#include -#include "_sdpdefs.h" -#include - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; -class CSdpConnectionField; -class CSdpBandwidthField; -class CSdpAttributeField; -class CSdpKeyField; -class CSdpFmtAttributeField; -class CSdpCodecParseUtil; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the media description field and related media - * specific subfields of the Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpMediaField : public CBase - { - - public: - - - public: // Constructors and destructor - /** - * Constructs a new media description field. - * - * @param aText A correctly formatted media field - * terminated by a CRLF followed by zero or more media - * attribute fields separated by a CRLF. - * @param aRecurse If ETrue, attempts to construct also media - * attributes following the CRLF terminating the media field. - * @return a new instance. - */ - IMPORT_C static CSdpMediaField* DecodeL(const TDesC8& aText, - TBool aRecurse = ETrue); - - /** - * Constructs a new media description field and adds the pointer to - * the cleanup stack. - * - * @param aText A correctly formatted media field - * terminated by a CRLF followed by zero or more media - * attribute fields separated by a CRLF. - * @param aRecurse If ETrue, attempts to construct also media - * attributes following the CRLF terminating the media field. - * @return a new instance. - */ - IMPORT_C static CSdpMediaField* DecodeLC(const TDesC8& aText, - TBool aRecurse = ETrue); - - /** - * Constructs a new media description field. - * The optional portcount component of the field is initialized to 1. - * - * @param aMedia A valid media type name. - * @param aPort Port number. - * @param aProtocol A valid media protocol name. - * @param aFormatList A valid format list. - * @return a new instance. - */ - IMPORT_C static CSdpMediaField* NewL(RStringF aMedia, - TUint aPort, - RStringF aProtocol, - const TDesC8& aFormatList); - - /** - * Constructs a new media description field and adds the pointer to - * the cleanup stack. - * The optional portcount component of the field is initialized to 1. - * - * @param aMedia A valid media type name. - * @param aPort Port number. - * @param aProtocol A valid media protocol name. - * @param aFormatList A valid format list. - * @return a new instance. - */ - IMPORT_C static CSdpMediaField* NewLC(RStringF aMedia, - TUint aPort, - RStringF aProtocol, - const TDesC8& aFormatList); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpMediaField(); - - public: // New functions - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. Optionally output also the related media - * level fields. - * - * @param aStream Stream used for output. On return the - * stream includes correctly formatted media field with - * media part fields if aRecurse is defined to ETrue. - * @param aRecurse Flag to specify whether to output media - * attributes also (ETrue) or only the media field (EFalse). - */ - IMPORT_C void - EncodeL(RWriteStream& aStream, TBool aRecurse = ETrue) const; - - /** - * Creates a new instance that is equal to the target. - * Optionally also related subfields are cloned. - * - * @param aRecurse Flag to specify whether to clone subfields - * also (ETrue) or only the media field (EFalse). - * @return a new instance. - */ - IMPORT_C CSdpMediaField * CloneL(TBool aRecurse = ETrue) const; - - /** - * Compares this instance to another for equality. Subfields are - * included in the comparison if present. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == (const CSdpMediaField& aObj) const; - - /** - * Checks the consistency between the media field and it's subfields. - * In particular, this function checks that each format specific - * attribute is related to a format in the format list of the - * media field. - * - * @return ETrue if media description is consistent and EFalse if not. - */ - IMPORT_C TBool IsValid() const; - - /** - * Gets the media type. - * - * @return The media type. - */ - IMPORT_C RStringF Media() const; - - /** - * Sets the media type. - * - * @param aMedia The media type. - * @leave KErrSdpCodecMediaField if aMedia is not valid character - */ - IMPORT_C void SetMediaL(RStringF aMedia); - - /** - * Gets the media protocol. - * - * @return The media protocol. - */ - IMPORT_C RStringF Protocol() const; - - /** - * Sets the media protocol. - * - * @param aProtocol The media protocol. - * @leave KErrSdpCodecMediaField if - * aProtocol containing two elements divided by slash are not - * valid tokens. - */ - IMPORT_C void SetProtocolL(RStringF aProtocol); - - /** - * Gets the port number. - * - * @return The port number. - */ - IMPORT_C TUint Port() const; - - /** - * Sets the port number. - * - * @param aPort The port number. - * @leave KErrSdpCodecMediaField if port is not valid number as - * defined in draft-ietf-mmusic-sdp-new-14 - */ - IMPORT_C void SetPortL(TUint aPort); - - /** - * Gets the port count. - * - * @return The port count. - */ - IMPORT_C TUint PortCount() const; - - /** - * Sets the port count. - * - * @param aCount The port count that must be greater than zero. - * @leave KErrSdpCodecMediaField if aCount equals to zero. - */ - IMPORT_C void SetPortCountL(TUint aCount); - - /** - * Gets the format list. - * - * @return The format list. - */ - IMPORT_C const TDesC8& FormatList() const; - - /** - * Sets the format list. - * The format list should contain one or more format tokens separated - * by a single whitespace character. - * - * @param aValue A valid format list. - * @leave KErrSdpCodecMediaField if aValue contains invalid tokens - */ - IMPORT_C void SetFormatListL(const TDesC8& aValue); - - /** - * Return the media level info field value. - * - * @return The value or an empty descriptor if not present. - */ - IMPORT_C const TDesC8& Info() const; - - /** - * Sets the media level info field value. - * - * @param aValue A valid info field value. - * @leave KErrSdpCodecMediaInfoField if aValue is not KNullDesC8 or - * aValue includes invalid byte strings (´\0´, ´\n´, ´\r´). - */ - IMPORT_C void SetInfoL(const TDesC8& aValue); - - /** - * Gets the media level encryption key field. - * Note, that the ownership is not transferred and - * the instance must not be deleted by the caller. - * - * @return Encryption key field or null if not present. - */ - IMPORT_C CSdpKeyField* Key(); - - /** - * Gets the media level encryption key field. - * - * @return Encryption key field or null if not present. - */ - IMPORT_C const CSdpKeyField* Key() const; - - /** - * Sets or removes the media level encryption key field. - * - * @param aObj The new key field or null if field is - * to be removed. Ownership of the referenced object - * is transferred to the media field instance. - */ - IMPORT_C void SetKey(CSdpKeyField* aObj); - - /** - * Gets the set of media format level attributes. - * This array is used directly for element insertion and removal. - * - * The objects referenced from the array are owned by the media - * field instance and must not be deleted. An object can be - * removed from the media description by setting the corresponding - * element to zero. By doing so, the calling party receives ownership - * of the removed object. - * - * @return The set of media format level attributes. - */ - IMPORT_C RPointerArray& FormatAttributeFields(); - - /** - * Gets the set of media level, format independent attributes. - * This array is used directly for element insertion and removal. - * - * The objects referenced from the array are owned by the media - * field instance and must not be deleted. An object can be - * removed from the media description by setting the corresponding - * element to zero. By doing so, the calling party receives ownership - * of the removed object. - * - * @return The set of media level attributes. - */ - IMPORT_C RPointerArray& AttributeFields(); - - /** - * Gets the set of media level bandwidth fields. - * This array is used directly for element insertion and removal. - * - * The objects referenced from the array are owned by the media - * field instance and must not be deleted. An object can be - * removed from the media description by setting the corresponding - * element to zero. By doing so, the calling party receives ownership - * of the removed object. - * - * @return The set of media level bandwidth fields. - */ - IMPORT_C RPointerArray& BandwidthFields(); - - /** - * Gets the set of media level connection fields. - * This array is used directly for element insertion and removal. - * - * The objects referenced from the array are owned by the media - * field instance and must not be deleted. An object can be - * removed from the media description by setting the corresponding - * element to zero. By doing so, the calling party receives ownership - * of the removed object. - * - * @return The set of media level connection fields. - */ - IMPORT_C RPointerArray& ConnectionFields(); - - /** - * Removes a specific format from the media description. - * The function will remove the named format from the format list if - * found and then delete all format level attributes of type - * CSdpFmtAttributeField related to the removed format. - * - * @param aFormat The name of the format to remove. - */ - IMPORT_C void RemoveFormatL(const TDesC8& aFormat); - - /** - * Removes all formats except one from the media description. - * The function will set the format list to only contain the one - * format to keep and then delete all format level attributes that - * are related to the removed formats. If the format is not found - * from the format list, it is added there. If there are no format - * level attributes for the specified format, the format level - * attribute set will be empty. - * - * @param aFormat The name of the format to keep after - * removing all others. - */ - IMPORT_C void KeepFormatL(const TDesC8& aFormat); - - /** - * Sets this media description into rejected state. - * The rejected state is defined by the offer/answer model in - * RFC3264. The function sets the port number to 0 and removes - * all formats except one. The remaining format is determined - * by the implementation. - */ - IMPORT_C void RejectMedia(); - - public: - /** - * Shows if contact is present - * - * @return ETrue if contact present, otherwise EFalse - */ - TBool IsContactPresent() const; - - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL(RWriteStream& aStream) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpMediaField* InternalizeL(RReadStream& aStream); - - private: - CSdpMediaField(); - void ConstructL(); - void ConstructL(TBool aRecurse); - void ConstructL(RStringF aMedia, TUint aPort, RStringF aProtocol, - const TDesC8& aFormatList); - - void ConstructL(const CSdpMediaField& aSdpMediaField); - void DoInternalizeL(RReadStream& aStream); - void ParseL (const TDesC8& aText); - void ParseMediaL(); - void ParseInformationL(); - void ParseConnectionL(); - void ParseBandwithL(); - void ParseEncryptionKeyL(); - void ParseAttributeFieldsL(); - TDesC8& GetTokenFromStreamL(RReadStream& aStream); - - - CSdpMediaField(const CSdpMediaField&); // Hidden. - CSdpMediaField& operator = (const CSdpMediaField&); // Hidden - - private: // Data - HBufC8* iInfo; - CSdpKeyField* iSdpKeyField; - RArray iElementArray; - RStringPool iPool; - TBool iRecurse; - RStringF iMedia; - RStringF iProtocol; - TUint iPort; - TUint iPortCount; - HBufC8* iFormatList; - RPointerArray* iBandwidthFields; - RPointerArray* iAttributeFields; - RPointerArray* iConnectionFields; - RPointerArray* iFmtAttrFields; - HBufC8* iToken; - CSdpCodecParseUtil* iSdpCodecParseUtil; - }; - -#endif // CSDPMEDIAFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdporiginfield.h --- a/epoc32/include/sdporiginfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,460 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpOriginField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPORIGINFIELD_H -#define CSDPORIGINFIELD_H - -// INCLUDES -#include -#include -#include -#include "_sdpdefs.h" - -// CONSTANTS -const TInt KMaxAddressLength = 256; - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; -class CSdpOriginFieldPtrs; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the origin field of - * the Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpOriginField : public CBase - { - public: // Constructors and destructor - - /** - * Constructs a new origin field. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpOriginField* DecodeL( const TDesC8& aText ); - - /** - * Constructs a new origin field and adds the pointer to the cleanup - * stack. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpOriginField* DecodeLC( const TDesC8& aText ); - - /** - * Constructs a new origin field. - * - * @param aUserName A valid user name value. - * @param aSessionId A valid session id value. - * @param aSessionVersion A valid announcement version value. - * @param aAddress A unicast IP address from either - * KAfInet or KAfInet6 family. - * @return a new instance. - */ - IMPORT_C static CSdpOriginField* NewL( const TDesC8& aUserName, - TInt64 aSessionId, - TInt64 aSessionVersion, - TInetAddr& aAddress ); - - /** - * Constructs a new origin field and adds the pointer to the cleanup - * stack. - * - * @param aUserName A valid user name value. - * @param aSessionId A valid session id value. - * @param aSessionVersion A valid announcement version value. - * @param aAddress A unicast IP address from either - * KAfInet or KAfInet6 family. - * @return a new instance. - */ - IMPORT_C static CSdpOriginField* NewLC( const TDesC8& aUserName, - TInt64 aSessionId, - TInt64 aSessionVersion, - TInetAddr& aAddress ); - - /** - * Constructs a new origin field. - * - * @param aUserName A valid user name value. - * @param aSessionId A valid session id value. - * @param aSessionVersion A valid announcement version value. - * @param aNetType A valid network type value (typically "IN"). - * @param aAddressType A valid address type value - * (typically "IP4" or "IP6"). - * @param aAddress A unicast IP Address, Fully - * Qualified Domain Name (FQDN), or an other type of - * address allowed for the address type. - * @return a new instance. - */ - IMPORT_C static CSdpOriginField* NewL( const TDesC8& aUserName, - TInt64 aSessionId, - TInt64 aSessionVersion, - RStringF aNetType, - RStringF aAddressType, - const TDesC8& aAddress ); - - /** - * Constructs a new origin field and adds the pointer to the cleanup - * stack. - * - * @param aUserName A valid user name value. - * @param aSessionId A valid session id value. - * @param aSessionVersion A valid announcement version value. - * @param aNetType A valid network type value (typically "IN"). - * @param aAddressType A valid address type value - * (typically "IP4" or "IP6"). - * @param aAddress A unicast IP Address, Fully Qualified Domain - * Name (FQDN), or an other type of address allowed - * for the address type. - * @return a new instance. - */ - IMPORT_C static CSdpOriginField* NewLC( const TDesC8& aUserName, - TInt64 aSessionId, - TInt64 aSessionVersion, - RStringF aNetType, - RStringF aAddressType, - const TDesC8& aAddress ); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpOriginField(); - - public: // New functions - - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream Stream used for output. On return - * the stream includes correctly formatted origin field. - */ - IMPORT_C void EncodeL( RWriteStream& aStream ) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpOriginField* CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == ( const CSdpOriginField& aObj ) const; - - /** - * Gets the user name. - * - * @return User name. - */ - IMPORT_C const TDesC8& UserName() const; - - /** - * Sets the user name. - * - * @param aValue A valid user name value. - * @leave KErrSdpCodecOriginField if aValue is not a valid user name. - */ - IMPORT_C void SetUserNameL( const TDesC8& aValue ); - - /** - * Gets the session id of the origin field. - * - * @return Session id. - */ - IMPORT_C TInt64 SessionId() const; - - /** - * Sets the session id. - * - * @param aValue A valid session id value. - */ - IMPORT_C void SetSessionId( TInt64 aValue ); - - /** - * Gets the announcement version. - * - * @return Version. - */ - IMPORT_C TInt64 Version() const; - - /** - * Sets the announcement version.. - * - * @param aValue A valid version value. - */ - IMPORT_C void SetVersion( TInt64 aValue ); - - /** - * Gets the network type. - * - * @return The network type from pre-defined SDP string - * table or given by the user. - */ - IMPORT_C RStringF NetType() const; - - /** - * Gets the address type. - * - * @return The address type from pre-defined SDP string - * table or given by the user. - */ - IMPORT_C RStringF AddressType() const; - - /** - * Gets the address. - * - * @return Address as an IP address or null if it is - * not an IP address. This may be e.g. when the address has - * been specified as a FQDN. In this case, the address can be - * accessed using the other getters. - */ - IMPORT_C const TInetAddr* InetAddress() const; - - /** - * Gets the address. - * - * @return Address as a string. - */ - IMPORT_C const TDesC8& Address() const; - - /** - * Sets the address, network and address type. - * Also sets the network type to "IN" and address type to "IP4" or - * "IP6" depending on the address family of aValue. - * - * @param aValue A unicast IP address from either KAfInet - * or KAfInet6 family. - */ - IMPORT_C void SetInetAddress( const TInetAddr& aValue ); - - /** - * Sets the address, network and address type. - * - * @param aAddress A unicast IP Address, Fully Qualified Domain - * Name (FQDN), or an other type of address allowed for the - * address type. - * @param aNetType A valid network type value (typically "IN"). - * @param aAddressType A valid address type value - * (typically "IP4" or "IP6"). - * @leave KErrSdpCodecOriginField if aNetType or aAddressType are not - * valid tokens, or aAddress is invalid, or aAddress type - * is not aligned with the address format - */ - IMPORT_C void SetAddressL( const TDesC8& aAddress, - RStringF aNetType, - RStringF aAddressType ); - - public: // Internal to codec - - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL( RWriteStream& aStream ) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpOriginField* InternalizeL( RReadStream& aStream ); - - private: // Constructors - - /** - * Constructor - */ - CSdpOriginField(); - - /** - * Second phase constructor. Parses the text string and initializes - * the member variables - * - * @param aText Line of text that will be parsed (ends on the newline) - */ - void ConstructL( const TDesC8& aText ); - - /** - * Second phase constructor. Constructs the object. - * - * @param aUserName A valid user name value. - * @param aSessionId A valid session id value. - * @param aSessionVersion A valid announcement version value. - * @param aAddress A unicast IP address from either - * KAfInet or KAfInet6 family. - */ - void ConstructL( const TDesC8& aUserName, - TInt64 aSessionId, - TInt64 aSessionVersion, - TInetAddr& aUnicastAddress ); - - /** - * Second phase constructor. Constructs the object. - * - * @param aUserName A valid user name value. - * @param aSessionId A valid session id value. - * @param aSessionVersion A valid announcement version value. - * @param aNetType A valid network type value (typically "IN"). - * @param aAddressType A valid address type value - * (typically "IP4" or "IP6"). - * @param aAddress A unicast IP Address, Fully Qualified Domain - * Name (FQDN), or an other type of address allowed - * for the address type. - */ - void ConstructL( const TDesC8& aUserName, - TInt64 aSessionId, - TInt64 aSessionVersion, - RStringF aNetType, - RStringF aAddressType, - const TDesC8& aAddress ); - - // These are unnecessary? Derived from CBase, prevents the use - CSdpOriginField( const CSdpOriginField& ); // Hidden. - CSdpOriginField& operator = ( const CSdpOriginField& ); // Hidden - - private: // New methods - - /** - * Checks if the given address is valid - * - * @param aAddress Address to be checked - * @return Valid address or not - */ - TBool IsValidAddress( const TDesC8& aAddress ) const; - - /** - * Checks if the given address is valid - * - * @param aAddr Address to be checked - * @return Valid address or not - */ - TBool IsValidAddress( const TInetAddr& addr ) const; - - /** - * Checks that address type matches with address format - * - * @param aAddress Address - * @param aType Address type - * @param aPool String pool - * @return Type Matches with format or not - */ - TBool TypeMatchesWithFormat( - const TDesC8& aAddress, const TDesC8& aType, - RStringPool aPool ) const; - - /** - * Checks if the given username is valid - * - * @param aUserName Username - * @return Validity of the given username - */ - TBool IsValidUserName( const TDesC8& aUserName ) const; - - /** - * Parses username, initializes iUserName - * - * @param aArray Array containing all the elements - */ - void ParseUserNameL( RArray& aArray ); - - /** - * Parses session ID and version, initializes iSessionId - * and iSessionVersion - * - * @param aArray Array containing all the elements - */ - void ParseSessionIDAndVersionL( RArray& aArray ); - - /** - * Parses network type and address type, initializes - * iNetType and iAddressType - * - * @param aArray Array containing all the elements - */ - void ParseNetTypeAndAddressTypeL( RArray& aArray ); - - /** - * Parses address, checks address against address type, - * initializes iAddress - * - * @param aArray Array containing all the elements - */ - void ParseAddressL( RArray& aArray ); - - inline CSdpOriginFieldPtrs& OriginFieldPtrs(); - - inline const CSdpOriginFieldPtrs& OriginFieldPtrs() const; - - TInt64 Get63Msbs( const TDesC8& aDecimalValue ) const; - void SetIPAddressType( const TInetAddr& aAddr ); - - private: // Data - - RStringPool iPool; - - // - HBufC8* iUserName; - // - TInt64 iSessionId; - // - TInt64 iSessionVersion; - // - RStringF iNetType; - //
- RStringF iAddressType; - //
- // Either one is used (this or iAddressType/iAddress combo) - // Can be defined as mutable because this variable does not affect - // to the state of the object, but it is needed as const pointer - // is returned on InetAddr() method - mutable TInetAddr iUnicastAddress; - TBuf8 iAddress; - // For configuring the address into TInetAddr - TBuf iAddress16; - - __DECLARE_TEST; - }; - -#endif // CSDPORIGINFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdprepeatfield.h --- a/epoc32/include/sdprepeatfield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,211 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpRepeatField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPREPEATFIELD_H -#define CSDPREPEATFIELD_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" -#include - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the repeat times field of the - * Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpRepeatField : public CBase - { - public: // Constructors and destructor - /** - * Constructs a new repeat times field. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpRepeatField* DecodeL(const TDesC8& aText); - - /** - * Constructs a new repeat times field and adds the pointer to the - * cleanup stack. - * - * @param aText A string containing a correctly - * formatted field value terminated by a CRLF. - * @return a new instance. - */ - IMPORT_C static CSdpRepeatField* DecodeLC(const TDesC8& aText); - - /** - * Constructs a new repeat times field. - * - * @param aRepeatInterval Repeat interval value - * greater than zero. - * @param aActiveDuration Active duration. - * @param aOffsets At least one time offset. - * @return a new instance. - */ - IMPORT_C static CSdpRepeatField* NewL( - const TSdpTypedTime aRepeatInterval, - const TSdpTypedTime aActiveDuration, - const RArray& aOffsets); - - /** - * Constructs a new repeat times field and adds the pointer to the - * cleanup stack. - * - * @param aRepeatInterval Repeat interval value - * greater than zero. - * @param aActiveDuration Active duration. - * @param aOffsets At least one time offset. - * @return a new instance. - */ - IMPORT_C static CSdpRepeatField* NewLC( - const TSdpTypedTime aRepeatInterval, - const TSdpTypedTime aActiveDuration, - const RArray& aOffsets); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpRepeatField(); - - public: // New functions - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream Stream used for output. On return - * the stream includes correctly formatted repeat field. - */ - IMPORT_C void EncodeL(RWriteStream& aStream) const; - - /** - * Creates a new instance that is equal to the target. - * - * @return a new instance. - */ - IMPORT_C CSdpRepeatField * CloneL() const; - - /** - * Compares this instance to another for equality. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == (const CSdpRepeatField & aObj) const; - - /** - * Gets the repeat interval. - * - * @return The repeat interval. - */ - IMPORT_C const TSdpTypedTime RepeatInterval() const; - - /** - * Sets the repeat interval. - * - * @param aValue Repeat interval value greater than zero. - * @leave KErrSdpCodecRepeatField if aValue is not positive integer - * value. - */ - IMPORT_C void SetRepeatIntervalL(const TSdpTypedTime aValue); - - /** - * Gets the active duration.. - * - * @return The active duration. - */ - IMPORT_C const TSdpTypedTime ActiveDuration() const; - - /** - * Sets the active duration. - * - * @param Active duration. - */ - IMPORT_C void SetActiveDuration(const TSdpTypedTime aValue); - - /** - * Gets the array of time offsets. - * This array is used directly for element insertion and removal. - * - * @return The offsets. - */ - IMPORT_C const RArray& TimeOffsets() const; - - /** - * Sets the time offsets. - * - * @param aOffsets At least one time offset. - */ - IMPORT_C void SetTimeOffsetsL(const RArray& aValue); - - public: - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL(RWriteStream& aStream) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpRepeatField* InternalizeL(RReadStream& aStream); - - private: - CSdpRepeatField(const TSdpTypedTime aRepeatInterval, - const TSdpTypedTime aActiveDuration); - CSdpRepeatField(); - void ConstructL(const TDesC8& aText); - void ConstructL(const RArray& aOffsets); - - - private: // Data - RStringPool iPool; - TSdpTypedTime iRepeatInterval; - TSdpTypedTime iActiveDuration; - RArray iTimeOffsets; - - __DECLARE_TEST; - }; - -#endif // CSDPREPEATFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdprtpmapvalue.h --- a/epoc32/include/sdprtpmapvalue.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpRtpmapValue.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef TSDPRTPMAPVALUE_H -#define TSDPRTPMAPVALUE_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RWriteStream; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * Utility class for manipulating the value of an rtpmap-attribute. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class TSdpRtpmapValue - { - public: // Constructors and destructor - - /** - * Initializes the instance to refer to the given rtpmap components. - * The parameters must stay in scope as long as this instance exists. - * Otherwise, the member variables of this class will point to - * a released memory. - * - * @param aEncodingName Valid rtpmap encoding name value. - * @param aClockrate Valid rtpmap clockrate value. - * @param aEncodingParameters Valid rtpmap encoding - * parameter list. - */ - IMPORT_C TSdpRtpmapValue( - const TPtrC8& aEncodingName, - const TPtrC8& aClockrate, - const TPtrC8& aEncodingParameters ); - - public: // New functions - - /** - * Tries to parse a string as an rtpmap attribute value up to the end - * of the string or CRLF, whichever comes first, and set pointers to - * the components found. The parameter must stay in scope as long as - * this instance exists. Otherwise, the member variables of this class - * will point to a released memory. - * - * @param aText String containing the value of an rtpmap attribute. - * @return a new instance - * @leave KErrArgument if parsing fails. - */ - IMPORT_C static TSdpRtpmapValue DecodeL( const TDesC8& aText ); - - /** - * Outputs the attribute value formatted according to SDP syntax. - * The field terminating CRLF is not included in the output. - * When constructing CSdpFmtAttributeField, return value of this - * function can be used as aValue in CSdpFmtAttributeField::NewL - * (RStringF aAttribute, const TDesC8& aFormat, const TDesC8& aValue) - * function. - * - * @return Encoded value. Ovnership of buffer is changed to caller. - */ - IMPORT_C HBufC8* EncodeL() const; - - public: // Data - - /** - * Encoding name part of an rtpmap value - * @internalComponent - */ - TPtrC8 iEncName; - - /** - * Clockrate part of an rtpmap value. - * @internalComponent - */ - TPtrC8 iClockrate; - - /** - * Encoding parameters part of an rtpmap value. - * @internalComponent - */ - TPtrC8 iEncParams; - }; - -#endif // TSDPRTPMAPVALUE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdptimefield.h --- a/epoc32/include/sdptimefield.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpTimeField.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef CSDPTIMESFIELD_H -#define CSDPTIMESFIELD_H - -// INCLUDES -#include -#include -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; -class CSdpRepeatField; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class encapsulates the time field and the related zero or - * more repeat times fields and an optional time zone adjustment - * field of the Session Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class CSdpTimeField : public CBase - { - public: // Constructors and destructor - /** - * Constructs a time field. - * - * @param aText A correctly formatted time field value - * terminated by a CRLF followed by zero or more repeat - * times and zero or one time zone adjustment fields - * separeted by a CRLF. - * @param aRecurse Flag to specify whether to decode subfields - * also (ETrue) or only the time field (EFalse). - * @return a new instance. - */ - IMPORT_C static CSdpTimeField * DecodeL(const TDesC8& aText, - TBool aRecurse = ETrue); - - /** - * Constructs a time field and adds the pointer to the cleanup stack. - * - * @param aText A correctly formatted time field value - * terminated by a CRLF followed by zero or more repeat - * times and zero or one time zone adjustment fields - * separeted by a CRLF. - * @param aRecurse Flag to specify whether to decode subfields - * also (ETrue) or only the time field (EFalse). - * @return a new instance. - */ - IMPORT_C static CSdpTimeField * DecodeLC(const TDesC8& aText, - TBool aRecurse = ETrue); - - /** - * Constructs a time field. - * - * @param aStartTime Session start time. - * @param aStopTime Session end time that must be - * greater than or equal to the start time. - * @return a new instance. - */ - IMPORT_C static CSdpTimeField * NewL(const TDesC8& aStartTime, - const TDesC8& aStopTime); - - /** - * Constructs a time field and adds the pointer to the cleanup stack. - * - * @param aStartTime Session start time. - * @param aStopTime Session end time that must be - * greater than or equal to the start time. - * @return a new instance. - */ - IMPORT_C static CSdpTimeField * NewLC(const TDesC8& aStartTime, - const TDesC8& aStopTime); - - /** - * Deletes the resources held by the instance. - */ - IMPORT_C ~CSdpTimeField(); - - public: // New functions - /** - * Outputs the field formatted according to SDP syntax and including - * the terminating CRLF. Optionally output also the related repeat - * times. - * - * @param aStream Stream used for output. On return - * the stream includes correctly formatted time field with - * repeat fields if aRecurse is ETrue. - * @param aRecurse Flag to specify whether to output subfields - * also (ETrue) or only the time field (EFalse). - */ - IMPORT_C void EncodeL(RWriteStream& aStream, TBool aRecurse = ETrue) const; - - /** - * Creates a new instance that is equal to the target. - * Optionally also related repeat times are cloned. - * - * @param aRecurse Flag to specify whether to clone subfields - * also (ETrue) or only the time field (EFalse). - * @return a new instance. - */ - IMPORT_C CSdpTimeField * CloneL(TBool aRecurse = ETrue) const; - - /** - * Compares this instance to another for equality. Subfields are - * included in comparison if present. - * - * @param aObj The instance to compare to. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == (const CSdpTimeField & aObj) const; - - /** - * Checks the consistency of the time description and it's subfields. - *. - * @return ETrue if time description is valid and EFalse if not. - */ - IMPORT_C TBool IsValid() const; - - /** - * Gets the session start time. - * - * @return The session start time. - */ - IMPORT_C const TDesC8& StartTime() const; - - /** - * Gets the session stop time. - * - * @return The session stop time. - */ - IMPORT_C const TDesC8& StopTime() const; - - /** - * Sets the session start and stop times. - * - * @param aStartTime Session start time.. - * @param aStopTime Session end time that must be - * greater than or equal to the start time. - * @leave KErrSdpCodecTimeField if start time and stop time are not - * correct as defined draft-ietf-mmusic-sdp-new-14. - */ - IMPORT_C void SetTimesL(const TDesC8& aStartTime, const TDesC8& aStopTime); - - /** - * Gets the set of repeat times fields related to this time field. - * This array is used directly for element insertion and removal. - * - * The objects referenced from the array are owned by the media field - * instance and must not be deleted. An object can be removed from the - * media description by setting the corresponding element to zero. By - * doing so, the calling party receives ownership of the removed object. - * - * @return The set of repeat fields. - */ - IMPORT_C RPointerArray& RepeatFields(); - - public: - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL(RWriteStream& aStream) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static CSdpTimeField* InternalizeL(RReadStream& aStream); - - /** - * Creates object from the stream data. - * Does the "2nd phase construction" of internalization. - * - * @param aStream Stream where the object's state will be read - */ - void DoInternalizeL(RReadStream& aStream); - - private: - CSdpTimeField(); - - void ConstructL(const TDesC8& aText, TBool aRecurse=ETrue); - void ConstructL(const TDesC8& aStartTime, const TDesC8& aStopTime); - - TBool RepeatFieldsCompare(const CSdpTimeField& aObj) const; - - private: // Data - HBufC8* iStartTime; - HBufC8* iStopTime; - RPointerArray iRFields; - RStringPool iStringPool; - - __DECLARE_TEST; - }; - -#endif // CSDPTIMESFIELD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sdptypedtime.h --- a/epoc32/include/sdptypedtime.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,143 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SdpTypedTime.h -* Part of : SDP Codec -* Interface : SDK API, SDP Codec API -* Version : 1.0 -* -*/ - - - -#ifndef TSDPTYPEDTIME_H -#define TSDPTYPEDTIME_H - -// INCLUDES -#include -#include "_sdpdefs.h" - -// FORWARD DECLARATIONS -class RReadStream; -class RWriteStream; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class implements the typed time element of the Session - * Description Protocol. - * - * The normative reference for correct formatting and values is - * draft-ietf-mmusic-sdp-new-14 unless specified otherwise in - * member documentation. The implementation supports this normative - * reference, but does not enforce it fully. - * - * @lib sdpcodec.lib - */ -class TSdpTypedTime - { - public: // enums - - /** Time units. */ - enum TUnit - { - ETimeUnitDays, /** d */ - ETimeUnitHours, /** h */ - ETimeUnitMinutes, /** m */ - ETimeUnitSeconds, /** s */ - ETimeUnitNone, - }; - - public: // Constructors and destructor - /** - * Constructs a typed time equal to zero and with no time unit set. - */ - IMPORT_C TSdpTypedTime(); - - /** - * Constructs a typed time equal to specified value and time unit. - * - * @param aValue Time value. - * @param aUnit Time unit. - */ - IMPORT_C TSdpTypedTime(TInt64 aValue, TUnit aUnit); - - public: // New functions - /** - * Compares this instance to another for equality. - * - * @param aObj Another instance to compare with. - * @return ETrue if equal, EFalse if not. - */ - IMPORT_C TBool operator == (const TSdpTypedTime& aObj) const; - - /** - * Sets the typed time value. - * - * @param aValue Time value. - * @param aUnit Time unit. - */ - IMPORT_C void SetValue(TInt64 aValue, TUnit aUnit); - - public: - - /** - * Externalizes the object to stream - * - * @param aStream Stream where the object's state will be stored - */ - void ExternalizeL(RWriteStream& aStream) const; - - /** - * Creates object from the stream data - * - * @param aStream Stream where the object's state will be read - * @return Initialized object - */ - static TSdpTypedTime InternalizeL(RReadStream& aStream); - - /** - * Output the field formatted according to SDP syntax and including - * the terminating CRLF. - * - * @param aStream Stream used for output. - */ - void EncodeL(RWriteStream& aStream) const; - - /** - * Construct a new origin field. - * - * @param aText A string containing a correctly formatted field value - * terminated by a CRLF. - * @return The new instance. - */ - static TSdpTypedTime DecodeL(const TDesC8& aText); - - public: // Data - - /** - * @internalComponent - */ - TInt64 iValue; - - /** - * @internalComponent - */ - TInt iUnit; - - }; - -#endif // TSDPTYPEDTIME_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sendas2.h --- a/epoc32/include/sendas2.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ -#ifndef __SENDAS2_H__ -#define __SENDAS2_H__ - -#include -#include -#include - -#endif //__SENDAS2_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sendasserver.rh --- a/epoc32/include/sendasserver.rh Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - - -#ifndef __SENDASSERVER_RH__ -#define __SENDASSERVER_RH__ - -STRUCT SENDAS_RES - { - LONG version; - LONG editUtilsUid; - LONG notifierUid; - } - -#endif // __SENDASSERVER_RH__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sip.h --- a/epoc32/include/sip.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sip.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 2.0 -* -*/ - - - -#ifndef CSIP_H -#define CSIP_H - -// INCLUDES -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CDesC8Array; -class MSIPObserver; -class CSIPConnection; -class CSIPImplementation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for connecting to SIP server. -* -* This class provides the connection to the SIP server and -* provides functions for quering supported SIP security mechanisms and -* the support of signalling compression (SigComp). -* -* Note that the implementation uses strings defined in the SIP Codec -* string pool. During instantiation the class will open SIP codec string pool -* for getting static strings and getting and setting dynamic strings. -* -* The user can create only one instance of this class. (a singleton class). -* -* @lib sipclient.lib -*/ -class CSIP : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aUid an unique id that identifies client - * @param aObserver a observer for asynchronous event - * @return New object, ownership is transferred - * @capability WriteDeviceData - */ - IMPORT_C static CSIP* NewL(const TUid& aUid, - MSIPObserver& aObserver); - - /** - * Two-phased constructor. - * Constructs an object and adds the pointer to the cleanup stack. - * @param aUid an unique id that identifies client - * @param aObserver a observer for asynchronous event - * @return New object, ownership is transferred - * @capability WriteDeviceData - */ - IMPORT_C static CSIP* NewLC(const TUid& aUid, - MSIPObserver& aObserver); - - /** - * Destructor. - */ - IMPORT_C ~CSIP(); - - public: // New functions - - /** - * Gets all supported security mechanisms - * @return supported SIP security mechanisms names (e.g. digest); - * the ownership is transferred - */ - IMPORT_C CDesC8Array* SupportedSecurityMechanismsL() const; - - /** - * Checks if the signalling compression (SigComp) is supported. - * Leaves on failure with a system wide error code. - * @return ETrue if supported, EFalse otherwise - */ - IMPORT_C TBool IsSigCompSupportedL() const; - - /** - * Gets negotiated security mechanism with the next hop - * on the signaling path. - * @param aHop the next hop's FQDN or numeric IP address - * @return negotiated security mechanism or zero-pointer in case no - * security mechanism was negotiated with the next hop; - * the ownership is transferred - */ - IMPORT_C HBufC8* NegotiatedSecurityMechanismL(const TDesC8& aHop); - - /** - * Checks if the user has a connection created for given IAP-id - * @param aIapId IAP-id - * @return sip connection or 0-pointer if connection does not exist. - * Ownership is not transferred. - */ - IMPORT_C CSIPConnection* Connection(TUint32 aIapId) const; - - /* - * By default the SIP built-in security mechanisms are enabled. - * @param aEnabled if set to EFalse the build-in SIP security handling - * mechanism is disabled. - */ - IMPORT_C void SetSecurityHandlingL(TBool aEnabled); - - /* - * Tests if SIP security handling mechanism is enabled/disabled - * @return ETrue if built-in mechanisms are enabled, EFalse otherwise. - */ - IMPORT_C TBool IsSecurityHandlingEnabled() const; - - public: // New functions, for internal use - - /** - * Returns the CSIPImplementation. - * - * @return CSIPImplementation - */ - CSIPImplementation& Implementation(); - - private: // Constructors - CSIP(); - - void ConstructL(const TUid& aUid, MSIPObserver& aObserver); - - private: // Data - CSIPImplementation* iImplementation; - - private: // For testing purposes - - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPRegistrationBinding_Test) - UNIT_TEST(CSIPInviteDialogAssoc_Test) - UNIT_TEST(CSIPSubscribeDialogAssoc_Test) - UNIT_TEST(CSIPReferDialogAssoc_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sip_subconevents.h --- a/epoc32/include/sip_subconevents.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,141 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIPSCPR_subconevents.h -// SIP extension events definition -// -// - - - -/** - @file - @publishedAll - @released since v9.2 -*/ - -#ifndef SIPSCPR_SUBCONEVENTS_H -#define SIPSCPR_SUBCONEVENTS_H - -#include -#include - -/** The numeric value of ECOM plugin identifier for this SubConnection SIP event parameter.See the assisting *.rss file. */ -const TInt KSubConSIPEventsUid = 0x10274CAE; - -/** The numeric value of Response event type identifier for SIP extension parameter set */ -const TInt KSubConSIPResponseEventType = 1; - -/** The numeric value of AuthenticationRequired event type identifier for SIP extension parameter set */ -const TInt KSubConSIPAuthenticationRequiredEventType = 2; - -/** The numeric value of Notification event type identifier for SIP extension parameter set */ -const TInt KSubConSIPNotificationEventType = 3; - - -class CSubConSIPResponseEvent : public CSubConNotificationEvent -/** CSubConSIPResponseEvent is used to get and set the response elements of the most recent response - -@publishedAll -@released since v9.2 */ - { -public: - /** - Identifies the predefined type of Response . - */ - enum PredefinedResponses - { - /** The numeric value of Invalid Response */ - EInvalidResponse = 0 - }; - - inline static CSubConSIPResponseEvent* NewL(); - /** Constructor. */ - inline CSubConSIPResponseEvent(); - /** Destructor. */ - virtual ~CSubConSIPResponseEvent(); - /** Sets Response Code of the SIP Response. **/ - inline void SetResponse(TInt aResponse); - /** Gets Response Code of the SIP Response. **/ - inline TInt GetResponse() const; - -protected: - /** The Response Code of the SIP reasponse. */ - TInt iResponse; - DATA_VTABLE - }; - - -class CSubConSIPAuthenticationRequiredEvent : public CSubConNotificationEvent -/** CSubConSIPAuthenticationRequiredEvent is used when SIP authentication is required - -@publishedAll -@released since v9.2 */ - { -public: - - inline static CSubConSIPAuthenticationRequiredEvent* NewL(); - /** Constructor. */ - inline CSubConSIPAuthenticationRequiredEvent(); - /** Destructor. */ - virtual ~CSubConSIPAuthenticationRequiredEvent(); - /** Sets Realm field of the SIP header. **/ - inline void SetRealmL(const TPtrC8& aRealm); - /** Gets Realm field of the SIP header. **/ - inline const TPtrC8& GetRealm() const; - -protected: - /** The Realm entry of Authenticate field in a SIP header. */ - RBuf8 iRealm; - DATA_VTABLE - }; - - -class CSubConSIPNotificationEvent : public CSubConNotificationEvent -/** CSubConSIPNotificationEvent is used for receiving SIP event notifications - -@publishedAll -@released since v9.2 */ - { -public: - inline static CSubConSIPNotificationEvent* NewL(); - /** Constructor. */ - inline CSubConSIPNotificationEvent(); - /** Destructor. */ - virtual ~CSubConSIPNotificationEvent(); - /** Sets Notification for an event. **/ - inline void SetNotificationL(const TPtrC8 & aNotification); - /** Gets Notification for an event. **/ - inline const TPtrC8& GetNotification() const; - -protected: - /** The Notification entry. */ - RBuf8 iNotification; - DATA_VTABLE - }; - - -class CSIPSubConnExtensionEventsFactory : public CBase -/** Factory used to create instances of the SIP SubConnection Extension Events - -@publishedAll -@released since v9.2 -*/ - { -public: - static CSubConNotificationEvent* NewL(TAny* aConstructionParameters); - }; - -#include - -#endif // SIPSCPR_SUBCONEVENTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sip_subconevents.inl --- a/epoc32/include/sip_subconevents.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIPSCPR_subconevents.inl -// SIP extension events definition -// -// - - - -/** - @file - @publishedAll -*/ - - -inline CSubConSIPResponseEvent::CSubConSIPResponseEvent() -:iResponse(EInvalidResponse) - { - } - - -inline void CSubConSIPResponseEvent::SetResponse(TInt aResponse) - { - iResponse = aResponse; - } - -inline TInt CSubConSIPResponseEvent::GetResponse() const - { - return iResponse; - } - -inline CSubConSIPResponseEvent* CSubConSIPResponseEvent::NewL() - { - STypeId typeId(KSubConSIPEventsUid, KSubConSIPResponseEventType); - return static_cast(CSubConNotificationEvent::NewL(typeId)); - } - - -inline CSubConSIPAuthenticationRequiredEvent* CSubConSIPAuthenticationRequiredEvent::NewL() - { - STypeId typeId(KSubConSIPEventsUid, KSubConSIPAuthenticationRequiredEventType); - return static_cast(CSubConNotificationEvent::NewL(typeId)); - } - -inline CSubConSIPAuthenticationRequiredEvent::CSubConSIPAuthenticationRequiredEvent() - { - } - -inline void CSubConSIPAuthenticationRequiredEvent::SetRealmL(const TPtrC8& aRealm) - { - iRealm.Close(); - iRealm.CreateL(aRealm); - } - -inline const TPtrC8& CSubConSIPAuthenticationRequiredEvent::GetRealm() const - { - return iRealm.LeftTPtr(iRealm.Length()); - } - - -inline CSubConSIPNotificationEvent::CSubConSIPNotificationEvent() - { - } - -inline void CSubConSIPNotificationEvent::SetNotificationL(const TPtrC8 & aNotification) - { - iNotification.Close(); - iNotification.CreateL(aNotification); - } - -inline const TPtrC8& CSubConSIPNotificationEvent::GetNotification() const - { - return iNotification.LeftTPtr(iNotification.Length()); - } - -inline CSubConSIPNotificationEvent* CSubConSIPNotificationEvent::NewL() - { - STypeId typeId(KSubConSIPEventsUid, KSubConSIPNotificationEventType); - return static_cast(CSubConNotificationEvent::NewL(typeId)); - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sip_subconparams.h --- a/epoc32/include/sip_subconparams.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIPSCPR_subconparams.h -// SIP extension parameters definition -// -// - - - -/** - @file - @publishedAll - @released since v9.2 -*/ - -#ifndef SIP_SUBCONPARAMS_H -#define SIP_SUBCONPARAMS_H - -#include -#include - -/** The numeric value of ECOM plugin identifier for this SubConnection parameter extension.See the assisting *.rss file. */ -const TInt KSubConSIPParametersUid = 0x10274C18; - -/** The numeric value of Invite identifier for SIP extension parameter set */ -const TInt KSubConSIPInviteParamsType = 1; - -/** The numeric value of Subscribe identifier for SIP extension parameter set */ -const TInt KSubConSIPSubscribeParamsType = 2; - -/** The numeric value of Authentication of SIP extension parameter set */ -const TInt KSubConSIPAuthenticateParamsType = 3; - -class CSubConSIPInviteParamSet : public CSubConExtensionParameterSet -/** -This contains the SIP Invite parameters that will be passed via subconnection -to the SIP stack -@publishedAll -@released since v9.2 -*/ -{ -public: - /** - Creates a new SubConSIPInvite parameter set object. - @param aFamily ,contains family related info - @param aType contains parameter Type such as (Requested, Acceptable and Granted) - @return A pointer to the newly allocated object. - @leave KErrArgument if the data is not of type TParameterSetType. - */ - inline static CSubConSIPInviteParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); - inline static CSubConSIPInviteParamSet* NewL(); - - /** Constructor. */ - inline CSubConSIPInviteParamSet(); - /** Destructor. */ - virtual ~CSubConSIPInviteParamSet(); - - /** Getters for SIP header. */ - /** Gets Request URI field of the SIP header. **/ - inline const TPtrC8 GetRequestUri() const; - /** Gets From field of the SIP header. **/ - inline const TPtrC8 GetFrom() const; - /** Gets To field of the SIP header. **/ - inline const TPtrC8 GetTo() const; - /** Gets Contact field of the SIP header. **/ - inline const TPtrC8 GetContact() const; - /** Gets ContentType field of the SIP header. **/ - inline const TPtrC8 GetContentType() const; - /** Gets ContentSubType field of the SIP header. **/ - inline const TPtrC8 GetContentSubType() const; - /** Gets Content field of the SIP header. **/ - inline const TPtrC8 GetContent() const; - - /** Setters for SIP header. - /** Sets Request URI field of the SIP header. **/ - inline void SetRequestUriL(const TPtrC8 & aReqUri); - /** Sets From field of the SIP header. **/ - inline void SetFromL(const TPtrC8 & aFrom); - /** Sets To field of the SIP header. **/ - inline void SetToL(const TPtrC8 & aTo); - /** Sets Contact field of the SIP header. **/ - inline void SetContactL(const TPtrC8 & aContact); - /** Sets Content Type field of the SIP header. **/ - inline void SetContentTypeL(const TPtrC8 & aContentType); - /** Sets Content Sub Type field of the SIP header. **/ - inline void SetContentSubTypeL(const TPtrC8 & aContentSubType); - /** Sets Content field of the SIP header. **/ - inline void SetContentL(const TPtrC8 & aContent); - - DATA_VTABLE -protected: - - /** The Request URI field of the SIP header. */ - RBuf8 iReqUri; - /** The From field of the SIP header. */ - RBuf8 iFrom; - /** The To field of the SIP header. */ - RBuf8 iTo; - /** The Contact field of the SIP header. */ - RBuf8 iContact; - /** The Content Type field of the SIP header. */ - RBuf8 iContentType; - /** The Content Sub Type field of the SIP header. */ - RBuf8 iContentSubType; - /** The Content field of the SIP header. */ - RBuf8 iContent; - }; - - - -class CSubConSIPSubscribeParamSet : public CSubConExtensionParameterSet -/** -This contains the SIP Subscribe parameters that will be passed via subconnection -to the SIP stack -@publishedAll -@released since v9.2 -*/ -{ -public: - /** - Creates a new SubConSIPSubscribe parameter set object. - @param aFamily ,contains family related info - @param aType contains parameter Type such as (Requested, Acceptable and Granted) - @return A pointer to the newly allocated object. - @leave KErrArgument if the data is not of type TParameterSetType. - */ - inline static CSubConSIPSubscribeParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); - inline static CSubConSIPSubscribeParamSet* NewL(); - - /** Constructor. */ - inline CSubConSIPSubscribeParamSet(); - - /** Destructor. */ - virtual ~CSubConSIPSubscribeParamSet(); - - /** Getters for SIP header. */ - /** Gets Request URI field of the SIP header. **/ - inline const TPtrC8 GetRequestUri() const; - /** Gets From field of the SIP header. **/ - inline const TPtrC8 GetFrom() const; - /** Gets To field of the SIP header. **/ - inline const TPtrC8 GetTo() const; - /** Gets Contact field of the SIP header. **/ - inline const TPtrC8 GetContact() const; - /** Gets Event Type field of the SIP header. **/ - inline const TPtrC8 GetEventType() const; - /** Gets Accept Type field of the SIP header. **/ - inline const TPtrC8 GetAcceptType() const; - /** Gets Accept Sub Type field of the SIP header. **/ - inline const TPtrC8 GetAcceptSubType() const; - /** Gets Expires field of the SIP header. **/ - inline const TInt GetExpires() const; - /** Gets Auto Refresh field of the SIP header. **/ - inline const TBool GetAutoRefresh() const; - - /** Setters for SIP header. */ - /** Sets Request URI field of the SIP header. **/ - inline void SetRequestUriL(const TPtrC8 & aReqUri); - /** Sets From field of the SIP header. **/ - inline void SetFromL(const TPtrC8 & aFrom); - /** Sets To field of the SIP header. **/ - inline void SetToL(const TPtrC8 & aTo); - /** Sets Contact field of the SIP header. **/ - inline void SetContactL(const TPtrC8 & aContact); - /** Sets Event Type field of the SIP header. **/ - inline void SetEventTypeL(const TPtrC8 & aEventType); - /** Sets Accept Type field of the SIP header. **/ - inline void SetAcceptTypeL(const TPtrC8 & aAcceptType); - /** Sets Accept Sub Type field of the SIP header. **/ - inline void SetAcceptSubTypeL(const TPtrC8 & aAcceptSubType); - /** Sets Expires Sub Type field of the SIP header. **/ - inline void SetExpires(TInt aExpires); - /** Sets AutoRfresh field of the SIP header. **/ - inline void SetAutoRefresh(TBool aAutoRefresh); - - - DATA_VTABLE -protected: - - /** The Request URI field of the SIP header. */ - RBuf8 iReqUri; - /** The From field of the SIP header. */ - RBuf8 iFrom; - /** The To field of the SIP header. */ - RBuf8 iTo; - /** The Contact field of the SIP header. */ - RBuf8 iContact; - /** The Event Type field of the SIP header. */ - RBuf8 iEventType; - /** The Accept Type field of the SIP header. */ - RBuf8 iAcceptType; - /** The Accept Sub Type field of the SIP header. */ - RBuf8 iAcceptSubType; - /** The Expires field of the SIP header. */ - TInt iExpires; - /** The AutoRefresh field of the SIP header. */ - TBool iAutoRefresh; -}; - -class CSubConSIPAuthenticateParamSet : public CSubConExtensionParameterSet -/** -This contains the SIP Authenticate parameters that will be passed via subconnection -to the SIP stack -@publishedAll -@released since v9.2 -*/ -{ -public: - /** - Creates a new SubConSIPAuthenticate parameter set object. - @param aFamily ,contains family related info - @param aType contains parameter Type such as (Requested, Acceptable and Granted) - @return A pointer to the newly allocated object. - @leave KErrArgument if the data is not of type TParameterSetType. - */ - inline static CSubConSIPAuthenticateParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); - inline static CSubConSIPAuthenticateParamSet* NewL(); - - /** Constructor. */ - inline CSubConSIPAuthenticateParamSet(); - - /** Destructor. */ - virtual ~CSubConSIPAuthenticateParamSet(); - - /** Getters for SIP header. */ - /** Gets Username field of the SIP header. **/ - inline const TPtrC8 GetUserName() const; - /** Gets Password field of the SIP header. **/ - inline const TPtrC8 GetPassword() const; - /** Gets Realm field of the SIP header. **/ - inline const TPtrC8 GetRealm() const; - - /** Setters for SIP header. */ - /** Sets Username field of the SIP header. **/ - inline void SetUserNameL(const TPtrC8 & aUserName); - /** Sets Password field of the SIP header. **/ - inline void SetPasswordL(const TPtrC8 & aPassword); - /** Sets Realm field of the SIP header. **/ - inline void SetRealmL(const TPtrC8 & aRealm); - - DATA_VTABLE -protected: - - /** The Username entry of Authenticate field in a SIP header. */ - RBuf8 iUserName; - /** The Password entry of Authenticate field in a SIP header. */ - RBuf8 iPassword; - /** The Realm entry of Authenticate field in a SIP header. */ - RBuf8 iRealm; -}; - - - -class CSIPSubConnExtensionParamsFactory : public CBase -/** Factory used to create instances of the SIP SubConnection Parameter Extension Sets. - -@publishedAll -@released since v9.2 -*/ - { -public: - static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); - }; - -#include - -#endif // SIP_SUBCONPARAMS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sip_subconparams.inl --- a/epoc32/include/sip_subconparams.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,321 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIPSCPR_subconparams.inl -// SIP extension parameters inline implementation -// / CSubConSIPInviteParamSet -// -// - - - - -/** - @file - @publishedAll -*/ - -inline CSubConSIPInviteParamSet* CSubConSIPInviteParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) - { - CSubConSIPInviteParamSet* obj = NewL(); - CleanupStack::PushL(obj); - aFamily.AddExtensionSetL(*obj, aType); - CleanupStack::Pop(obj); - return obj; - } - -inline CSubConSIPInviteParamSet* CSubConSIPInviteParamSet::NewL() - { - STypeId typeId(KSubConSIPParametersUid, KSubConSIPInviteParamsType); - return static_cast(CSubConParameterSet::NewL(typeId)); - } - -inline CSubConSIPInviteParamSet::CSubConSIPInviteParamSet() -:CSubConExtensionParameterSet() - { - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetRequestUri() const - { - return iReqUri.LeftTPtr(iReqUri.Length()); - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetFrom() const - { - return iFrom.LeftTPtr(iFrom.Length()); - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetTo() const - { - return iTo.LeftTPtr(iTo.Length()); - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetContact() const - { - return iContact.LeftTPtr(iContact.Length()); - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetContentType() const - { - return iContentType.LeftTPtr(iContentType.Length()); - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetContentSubType() const - { - return iContentSubType.LeftTPtr(iContentSubType.Length()); - } - -inline const TPtrC8 CSubConSIPInviteParamSet::GetContent() const - { - return iContent.LeftTPtr(iContent.Length()); - } - -// Setters -inline void CSubConSIPInviteParamSet::SetRequestUriL(const TPtrC8& aReqUri) - { - iReqUri.Close(); - iReqUri.CreateL(aReqUri); - } - -inline void CSubConSIPInviteParamSet::SetFromL(const TPtrC8& aFrom) - { - iFrom.Close(); - iFrom.CreateL(aFrom); - } - -inline void CSubConSIPInviteParamSet::SetToL(const TPtrC8& aTo) - { - iTo.Close(); - iTo.CreateL(aTo); - } - -inline void CSubConSIPInviteParamSet::SetContactL(const TPtrC8& aContact) - { - iContact.Close(); - iContact.CreateL(aContact); - } - -inline void CSubConSIPInviteParamSet::SetContentTypeL(const TPtrC8& aContentType) - { - iContentType.Close(); - iContentType.CreateL(aContentType); - } - -inline void CSubConSIPInviteParamSet::SetContentSubTypeL(const TPtrC8& aContentSubType) - { - iContentSubType.Close(); - iContentSubType.CreateL(aContentSubType); - } - -inline void CSubConSIPInviteParamSet::SetContentL(const TPtrC8& aContent) - { - iContent.Close(); - iContent.CreateL(aContent); - } - - - - - - - -/*-=========================================================== -/ -/ CSubConSIPSubscribeParamSet -/ -/*-=========================================================*/ -inline CSubConSIPSubscribeParamSet* CSubConSIPSubscribeParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) - { - CSubConSIPSubscribeParamSet* obj = NewL(); - CleanupStack::PushL(obj); - aFamily.AddExtensionSetL(*obj, aType); - CleanupStack::Pop(obj); - return obj; - } - -inline CSubConSIPSubscribeParamSet* CSubConSIPSubscribeParamSet::NewL() - { - STypeId typeId(KSubConSIPParametersUid, KSubConSIPSubscribeParamsType); - return static_cast(CSubConParameterSet::NewL(typeId)); - } - -// Constructor -inline CSubConSIPSubscribeParamSet::CSubConSIPSubscribeParamSet() -:CSubConExtensionParameterSet() - { - } - -// Getters -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetRequestUri() const - { - return iReqUri.LeftTPtr(iReqUri.Length()); - } - -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetFrom() const - { - return iFrom.LeftTPtr(iFrom.Length()); - } - -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetTo() const - { - return iTo.LeftTPtr(iTo.Length()); - } - -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetContact() const - { - return iContact.LeftTPtr(iContact.Length()); - } - -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetEventType() const - { - return iEventType.LeftTPtr(iEventType.Length()); - } - -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetAcceptType() const - { - return iAcceptType.LeftTPtr(iAcceptType.Length()); - } - -inline const TPtrC8 CSubConSIPSubscribeParamSet::GetAcceptSubType() const - { - return iAcceptSubType.LeftTPtr(iAcceptSubType.Length()); - } - -inline const TInt CSubConSIPSubscribeParamSet::GetExpires() const - { - return iExpires; - } - -inline const TBool CSubConSIPSubscribeParamSet::GetAutoRefresh() const - { - return iAutoRefresh; - } - - -// Setters -inline void CSubConSIPSubscribeParamSet::SetRequestUriL(const TPtrC8& aReqUri) - { - iReqUri.Close(); - iReqUri.CreateL(aReqUri); - } - -inline void CSubConSIPSubscribeParamSet::SetFromL(const TPtrC8& aFrom) - { - iFrom.Close(); - iFrom.CreateL(aFrom); - } - -inline void CSubConSIPSubscribeParamSet::SetToL(const TPtrC8& aTo) - { - iTo.Close(); - iTo.CreateL(aTo); - } - -inline void CSubConSIPSubscribeParamSet::SetContactL(const TPtrC8& aContact) - { - iContact.Close(); - iContact.CreateL(aContact); - } - -inline void CSubConSIPSubscribeParamSet::SetEventTypeL(const TPtrC8& aEventType) - { - iEventType.Close(); - iEventType.CreateL(aEventType); - } - -inline void CSubConSIPSubscribeParamSet::SetAcceptTypeL(const TPtrC8& aAcceptType) - { - iAcceptType.Close(); - iAcceptType.CreateL(aAcceptType); - } - -inline void CSubConSIPSubscribeParamSet::SetAcceptSubTypeL(const TPtrC8& aAcceptSubType) - { - iAcceptSubType.Close(); - iAcceptSubType.CreateL(aAcceptSubType); - } - -inline void CSubConSIPSubscribeParamSet::SetExpires(TInt aExpires) - { - iExpires = aExpires; - } - -inline void CSubConSIPSubscribeParamSet::SetAutoRefresh(TBool aAutoRefresh) - { - iAutoRefresh = aAutoRefresh; - } - - - - - -/*-=========================================================== -/ -/ CSubConSIPAuthenticateParamSet -/ -/*-=========================================================*/ -inline CSubConSIPAuthenticateParamSet* CSubConSIPAuthenticateParamSet::NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType) - { - CSubConSIPAuthenticateParamSet* obj = NewL(); - CleanupStack::PushL(obj); - aFamily.AddExtensionSetL(*obj, aType); - CleanupStack::Pop(obj); - return obj; - } - -inline CSubConSIPAuthenticateParamSet* CSubConSIPAuthenticateParamSet::NewL() - { - STypeId typeId(KSubConSIPParametersUid, KSubConSIPAuthenticateParamsType); - return static_cast(CSubConParameterSet::NewL(typeId)); - } - -// Constructor -inline CSubConSIPAuthenticateParamSet::CSubConSIPAuthenticateParamSet() -:CSubConExtensionParameterSet() - { - } - -// Getters -inline const TPtrC8 CSubConSIPAuthenticateParamSet::GetUserName() const - { - return iUserName.LeftTPtr(iUserName.Length()); - } - -inline const TPtrC8 CSubConSIPAuthenticateParamSet::GetPassword() const - { - return iPassword.LeftTPtr(iPassword.Length()); - } - -inline const TPtrC8 CSubConSIPAuthenticateParamSet::GetRealm() const - { - return iRealm.LeftTPtr(iRealm.Length()); - } - -// Setters -inline void CSubConSIPAuthenticateParamSet::SetUserNameL(const TPtrC8 & aUserName) - { - iUserName.Close(); - iUserName.CreateL(aUserName); - } - -inline void CSubConSIPAuthenticateParamSet::SetPasswordL(const TPtrC8 & aPassword) - { - iPassword.Close(); - iPassword.CreateL(aPassword); - } - -inline void CSubConSIPAuthenticateParamSet::SetRealmL(const TPtrC8 & aRealm) - { - iRealm.Close(); - iRealm.CreateL(aRealm); - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipacceptcontactheader.h --- a/epoc32/include/sipacceptcontactheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipacceptcontactheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPACCEPTCONTACTHEADER_H -#define CSIPACCEPTCONTACTHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAcceptContactHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP -* "Accept-Contact" header. -* -* @lib sipcodec.lib -*/ -class CSIPAcceptContactHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAcceptContactHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Accept-Contact"-header - * (e.g. "*;param=value") - * @return an array containing one to many instances - * of CSIPAcceptContactHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAcceptContactHeader - * @return a new instance of CSIPAcceptContactHeader - */ - IMPORT_C static CSIPAcceptContactHeader* NewL(); - - /** - * Creates a new instance of CSIPAcceptContactHeader - * On return the new instance has left to the CleanupStack. - * @return a new instance of CSIPAcceptContactHeader - */ - IMPORT_C static CSIPAcceptContactHeader* NewLC(); - - /** - * Destructor, deletes the resources of CSIPAcceptContactHeader. - */ - IMPORT_C virtual ~CSIPAcceptContactHeader(); - - - public: // New functions - - /** - * Compares this instance to another "Accept-Contact" header object. - * Two Accept-Contact-headers are equal, - * if both contain exactly the same parameters. - * The order of the parameters is not sufficient. - * @param aHeader a header to compare to - * @return ETrue, if the objects are equal otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPAcceptContactHeader& aHeader) const; - - /** - * Constructs an instance of a CSIPAcceptContactHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPAcceptContactHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPAcceptContactHeader(); - void ConstructL(); - void ConstructL(const CSIPAcceptContactHeader& aAcceptContactHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - CSIPAcceptContactHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPAcceptContactHeaderTest) - }; - -#endif // CSIPACCEPTCONTACTHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipacceptencodingheader.h --- a/epoc32/include/sipacceptencodingheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipacceptencodingheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPACCEPTENCODINGHEADER_H -#define CSIPACCEPTENCODINGHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAcceptHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting media types and -* parameters in SIP "Accept-Encoding" header. -* -* @lib sipcodec.lib -*/ -class CSIPAcceptEncodingHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAcceptEncodingHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Accept-Encoding"-header - * @return An array containing one to many CSIPAcceptEncodingHeader - * instances - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAcceptEncodingHeader - * @param aCodings a codings to set. - * @return a new instance of CSIPAcceptEncodingHeader - */ - IMPORT_C static CSIPAcceptEncodingHeader* NewL(const TDesC8& aCodings); - - /** - * Creates a new instance of CSIPAcceptEncodingHeader - * and puts it onto the cleanup stack - * @param aCodings a codings to set. - * @return a new instance of CSIPAcceptEncodingHeader - */ - IMPORT_C static CSIPAcceptEncodingHeader* NewLC(const TDesC8& aCodings); - - /** - * Destructor, deletes the resources of CSIPAcceptEncodingHeader. - */ - IMPORT_C ~CSIPAcceptEncodingHeader(); - - - public: // New functions - - /** - * Gets the codings from the "Accept-Encoding" header - * @return codings - */ - IMPORT_C const TDesC8& Codings() const; - - /** - * Sets the codings in the "Accept-Encoding" header - * @param aCodings the codings - */ - IMPORT_C void SetCodingsL(const TDesC8& aCodings); - - /** - * Gets the value of "q"-parameter - * @return the "q"-parameter value - */ - IMPORT_C TReal QParameter() const; - - /** - * Sets the "q"-parameter value - * @param aQValue a "q"-parameter value to set´ - */ - IMPORT_C void SetQParameterL(TReal aQValue); - - /** - * Constructs an instance of a CSIPAcceptEncodingHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return An instance of a CSIPAcceptEncodingHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPAcceptEncodingHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aCodings); - void ConstructL(const CSIPAcceptEncodingHeader& aAcceptEncodingHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - HBufC8* iCodings; - CSIPAcceptHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPAcceptEncodingHeaderTest) - }; - -#endif // CSIPACCEPTENCODINGHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipacceptheader.h --- a/epoc32/include/sipacceptheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,207 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipacceptheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPACCEPTHEADER_H -#define CSIPACCEPTHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAcceptHeaderParams; - - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting media types and -* parameters in SIP "Accept" header. -* -* @lib sipcodec.lib -*/ -class CSIPAcceptHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAcceptHeader from textual representation - * of the header's value part. - * An empty Accept-header can be created using this function - * by passing a KNullDesC8 as a parameter. - * @param aValue a value part of a "Accept"-header - * @return an array containing one to many instances of CSIPAcceptHeader. - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAcceptHeader - * @param aMediaType a media type to set. For example "application" - * @param aMediaSubtype a media subtype to set. For example "sdp" - * @return a new instance of CSIPAcceptHeader - */ - IMPORT_C static CSIPAcceptHeader* NewL(const TDesC8& aMediaType, - const TDesC8& aMediaSubtype); - - /** - * Creates a new instance of CSIPAcceptHeader and puts it into - * the cleanup stack - * @param aMediaType a media type to set. For example "application" - * @param aMediaSubtype a media subtype to set. For example "sdp" - * @return a new instance of CSIPAcceptHeader - */ - IMPORT_C static CSIPAcceptHeader* NewLC(const TDesC8& aMediaType, - const TDesC8& aMediaSubtype); - - /** - * Destructor, deletes the resources of CSIPAcceptHeader. - */ - IMPORT_C ~CSIPAcceptHeader(); - - - public: // New functions - - /** - * Check if the header is empty. If so, - * the other getters will not return a meaningful value. - * @return ETrue if empty, EFalse otherwise. - */ - IMPORT_C TBool IsEmpty() const; - - /** - * Gets the media type from the "Accept" header - * @return a media type - */ - IMPORT_C const TDesC8& MediaType() const; - - /** - * Sets the media type in the "Accept" header - * @pre IsEmpty() == EFalse - * @param aMediaType a media type - */ - IMPORT_C void SetMediaTypeL(const TDesC8& aMediaType); - - /** - * Gets the media subtype from the "Accept" header - * @return a media subtype - */ - IMPORT_C const TDesC8& MediaSubtype() const; - /** - * Sets the media subtype in the "Accept" header - * @pre IsEmpty() == EFalse - * @param aMediaSubtype a media subtype - */ - IMPORT_C void SetMediaSubtypeL(const TDesC8& aMediaSubtype); - - /** - * Gets the value of "q"-parameter - * @return the "q"-parameter value - */ - IMPORT_C TReal QParameter() const; - - /** - * Sets the "q"-parameter value - * @param aQValue a "q"-parameter value to set - */ - IMPORT_C void SetQParameterL(TReal aQValue); - - /** - * Constructs an instance of a CSIPAcceptHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return An instance of a CSIPAcceptHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPAcceptHeader(TBool aEmpty=EFalse); - void ConstructL(); - void ConstructL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); - void ConstructL(const CSIPAcceptHeader& aAcceptHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - TBool iEmpty; - HBufC8* iMediaType; - HBufC8* iMediaSubtype; - CSIPAcceptHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPAcceptHeaderTest) - }; - -#endif // CSIPACCEPTHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipacceptlanguageheader.h --- a/epoc32/include/sipacceptlanguageheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,178 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipacceptlanguageheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPACCEPTLANGUAGEHEADER_H -#define CSIPACCEPTLANGUAGEHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAcceptHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting media types and -* parameters in SIP "Accept-Language" header. -* -* @lib sipcodec.lib -*/ -class CSIPAcceptLanguageHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAcceptLanguageHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Accept-Language"-header - * @return an array containing one to many instances of - * CSIPAcceptLanguageHeader. - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAcceptLanguageHeader - * @param aLanguageRange a language-range to set - * @return a new instance of CSIPAcceptLanguageHeader - */ - IMPORT_C static CSIPAcceptLanguageHeader* - NewL(const TDesC8& aLanguageRange); - - /** - * Creates a new instance of CSIPAcceptLanguageHeader and puts it onto - * the cleanup stack - * @param aLanguageRange a language-range to set - * @return a new instance of CSIPAcceptLanguageHeader - */ - IMPORT_C static CSIPAcceptLanguageHeader* - NewLC(const TDesC8& aLanguageRange); - - /** - * Destructor, deletes the resources of CSIPAcceptLanguageHeader. - */ - IMPORT_C ~CSIPAcceptLanguageHeader(); - - - public: // New functions - - /** - * Gets the language-range from the "Accept-Language" header - * @return a language-range - */ - IMPORT_C const TDesC8& LanguageRange() const; - - /** - * Sets the language-range in the "Accept-Language" header - * @param aLanguageRange a language-range - */ - IMPORT_C void SetLanguageRangeL(const TDesC8& aLanguageRange); - - /** - * Gets the value of "q"-parameter - * @return the "q"-parameter value - */ - IMPORT_C TReal QParameter() const; - - /** - * Sets the "q"-parameter value - * @param aQValue a "q"-parameter value to set - */ - IMPORT_C void SetQParameterL(TReal aQValue); - - /** - * Constructs an instance of a CSIPAcceptLanguageHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return an instance of a CSIPAcceptLanguageHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // New functions - - CSIPAcceptLanguageHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aLanguageRange); - void ConstructL(const CSIPAcceptLanguageHeader& aAcceptLanguageHeader); - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - HBufC8* iLanguageRange; - CSIPAcceptHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPAcceptLanguageHeaderTest) - }; - -#endif // CSIPACCEPTLANGUAGEHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipaddress.h --- a/epoc32/include/sipaddress.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipaddress.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPADDRESS_H -#define CSIPADDRESS_H - -// INCLUDES -#include -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CURIContainer; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP -* name-addr structure -* -* @lib sipcodec.lib -*/ -class CSIPAddress : public CBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAddress from textual representation - * @param aValue SIP name-addr as text - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAddress - * @pre aUri != 0 - * @param aUri the ownership is transferred. - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* NewL(CUri8* aUri8); - - /** - * Creates a new instance of CSIPAddress and puts it to CleanupStack - * @pre aUri != 0 - * @param aUri the ownership is transferred. - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* NewLC(CUri8* aUri8); - - /** - * Creates a new instance of CSIPAddress - * @pre aUri != 0 - * @param aDisplayName a SIP token or a SIP quoted-string - * @param aUri the ownership is transferred. - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* NewL(const TDesC8& aDisplayName, - CUri8* aUri8); - - /** - * Creates a new instance of CSIPAddress and puts it to CleanupStack - * @pre aUri != 0 - * @param aDisplayName a SIP token or a SIP quoted-string - * @param aUri the ownership is transferred. - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* NewLC(const TDesC8& aDisplayName, - CUri8* aUri8); - - /** - * Creates a deep-copy of a CSIPAddress - * @param aSIPAddress the address to be copied - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* NewL(const CSIPAddress& aSIPAddress); - - /** - * Creates a deep-copy of a CSIPAddress and puts it to CleanupStack - * @param aSIPAddress the address to be copied - * @return a new instance of CSIPAddress - */ - IMPORT_C static CSIPAddress* NewLC(const CSIPAddress& aSIPAddress); - - /** - * Destructor, deletes the resources of CSIPAddress. - */ - IMPORT_C ~CSIPAddress(); - - - public: // New functions - - /** - * Compares this object to another instance of CSIPAddress - * @param aSIPAddress a CSIPAddress to compare to - * @return ETrue if the objects are equal otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPAddress& aSIPAddress) const; - - /** - * Gets the display name - * @return the display name if present, - * otherwise a zero-length descriptor - */ - IMPORT_C const TDesC8& DisplayName() const; - - /** - * Sets the display name - * @param aDisplayName a SIP token or a SIP quoted-string - */ - IMPORT_C void SetDisplayNameL(const TDesC8& aDisplayName); - - /** - * Gets the URI part of the address as const - * @return a reference to the URI object - */ - IMPORT_C const CUri8& Uri8() const; - - /** - * Sets the URI part of the address - * @pre aUri!= 0 - * @param aUri a pointer to the URI object, the ownership is transferred - */ - IMPORT_C void SetUri8L(CUri8* aUri8); - - /** - * Creates a textual representation and pushes it to CleanupStack - * @param aUseAngleBrackets if ETrue, sets the anglebrackets - * @return a textual representation of the object, - * the ownership is transferred - */ - IMPORT_C HBufC8* ToTextLC(TBool aUseAngleBrackets=EFalse) const; - - /** - * Constructs an instance of a CSIPAddress from a RReadStream - * @param aReadStream a stream containing the externalized object - * @return an instance of a CSIPAddress - */ - IMPORT_C static CSIPAddress* InternalizeL(RReadStream& aReadStream); - - /** - * Writes the object to a RWriteStream - * @param aWriteStream a stream where the object is to be externalized - */ - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream); - - - public: // For internal use: - - IMPORT_C CURIContainer& URI(); - IMPORT_C const CURIContainer& URI() const; - static CSIPAddress* NewLC(CURIContainer* aURI); - - - private: // Constructors - - CSIPAddress(); - void ConstructL(); - void ConstructL(CUri8* aUri); - void ConstructL(const TDesC8& aDisplayName, CUri8* aUri); - void ConstructL(const CSIPAddress& aSIPAddress); - void ConstructL(CURIContainer* aURI); - - private: // New functions - - void DoInternalizeL(RReadStream& aReadStream); - TInt QuotedStringLength(const TDesC8& aValue); - TBool CheckDisplayName(const TDesC8& aValue); - void ParseURIInAngleBracketsL(const TDesC8& aValue); - void ParseURIL(const TDesC8& aValue); - TBool ContainsSeparators(const TDesC8& aValue) const; - TBool HasDisplayName() const; - - private: // Data - - HBufC8* iDisplayName; - CURIContainer* iURI; - - private: // For testing purposes - - UNIT_TEST(CSIPAddressTest) - }; - -#endif // end of __SIP_ADDRESS_H__ - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipaddressheaderbase.h --- a/epoc32/include/sipaddressheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,118 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipaddressheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPADDRESSHEADERBASE_H -#define CSIPADDRESSHEADERBASE_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPHeaderGenericParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP headers having syntax -* ( name-addr/ addr-spec ) *(generic-param) -* -* @lib sipcodec.lib -*/ -class CSIPAddressHeaderBase : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPAddressHeaderBase. - */ - IMPORT_C virtual ~CSIPAddressHeaderBase(); - - - public: // New functions - - /** - * Sets the name-address - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address to set, the ownership is transferred - */ - IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); - - /** - * Gets the name-address as const - * @return name-address object - */ - IMPORT_C const CSIPAddress& SIPAddress() const; - - /** - * Gets the name-address - * @return name-address object - */ - IMPORT_C CSIPAddress& SIPAddress(); - - - protected: // Constructors - - CSIPAddressHeaderBase(); - void ConstructL(); - void ConstructL(CSIPAddress* aSIPAddress); - void ConstructL(const CSIPAddressHeaderBase& aHeader); - - protected: // Data - - /** - * @internalComponent - */ - CSIPAddress* iSIPAddress; - - /** - * @internalComponent - */ - CSIPHeaderGenericParams* iParams; - - protected: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - protected: // From CSIPHeaderBase - - /** - * @internalComponent - */ - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - }; - -#endif // end of CSIPADDRESSHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipalloweventsheader.h --- a/epoc32/include/sipalloweventsheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipalloweventsheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPALLOWEVENTSHEADER_H -#define CSIPALLOWEVENTSHEADER_H - -// INCLUDES -#include -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in -* SIP "Allow-Events" header. -* -* @lib sipcodec.lib -*/ -class CSIPAllowEventsHeader : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAllowEventsHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Allow-Events"-header - * @return An array containing one to many instances of - * CSIPAllowEventsHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAllowEventsHeader - * @param aEventPackage a Event-Package value - * @return a new instance of CSIPAllowEventsHeader - */ - IMPORT_C static CSIPAllowEventsHeader* - NewL(const TDesC8& aEventPackage); - - /** - * Creates a new instance of CSIPAllowEventsHeader and - * puts it to CleanupStack - * @param aEventPackage a Event-Package value - * @return a new instance of CSIPAllowEventsHeader - */ - IMPORT_C static CSIPAllowEventsHeader* NewLC(const TDesC8& aEventPackage); - - /** - * Destructor. deletes the resources of CSIPAllowEventsHeader. - */ - IMPORT_C ~CSIPAllowEventsHeader(); - - public: // New functions - - /** - * Gets the Event-Package parameter from the "Allow-Events" header - * @return the Event-Package parameter - */ - IMPORT_C const TDesC8& EventPackage() const; - - /** - * Sets the Event-Package parameter in the "Allow-Events" header; - * @param aEventPackage a Event-Package parameter to set - */ - IMPORT_C void SetEventPackageL(const TDesC8& aEventPackage); - - /** - * Sets the event templates overwriting all the existing ones. - * @param aEventTemplates - */ - IMPORT_C void SetEventTemplatesL(const MDesC8Array& aEventTemplates); - - /** - * Gets the event templates. - * @return a reference to the currently set event templates. - */ - - IMPORT_C const MDesC8Array& EventTemplates() const; - - /** - * Constructs an instance of a CSIPAllowEventsHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - */ - - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // Contructors - - CSIPAllowEventsHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aEventPackage); - void ConstructL (const CSIPAllowEventsHeader& aSIPAllowEventsHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - void ParseL(const TDesC8& aValue); - void CheckTemplateL(const TDesC8& aParam) const; - // Needed for cleanup of a RPointerArray: - static void ResetAndDestroy(TAny* anArray); - - private: // Data - - HBufC8* iEventPackage; - CDesC8ArraySeg* iEventTemplates; - - private: // For testing purposes - - UNIT_TEST(CSIPAllowEventsHeaderTest) - }; - -#endif // CSIPALLOWEVENTSHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipallowheader.h --- a/epoc32/include/sipallowheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipallowheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPALLOWHEADER_H -#define CSIPALLOWHEADER_H - -// INCLUDES -#include "siptokenheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters -* in SIP "Allow" header. -* -* @lib sipcodec.lib -*/ -class CSIPAllowHeader : public CSIPTokenHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAllowHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Allow"-header - * @return an array containing one to many instances of CSIPAllowHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAllowHeader - * @param aValue a value - * @return a new instance of CSIPAllowHeader - */ - IMPORT_C static CSIPAllowHeader* NewL(RStringF aValue); - - /** - * Creates a new instance of CSIPAllowHeader and puts it to CleanupStack - * @param aValue a value - * @return a new instance of CSIPAllowHeader - */ - IMPORT_C static CSIPAllowHeader* NewLC(RStringF aValue); - - /** - * Destructor, deletes the resources of CSIPAllowHeader. - */ - IMPORT_C ~CSIPAllowHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPAllowHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPAllowHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPAllowHeader(); - CSIPAllowHeader(const CSIPAllowHeader& aHeader); - }; - -#endif // CSIPALLOWHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipauthenticateheaderbase.h --- a/epoc32/include/sipauthenticateheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipauthenticateheaderbase.h -* Part of : SIP Codec -* Version : SIP/5.0 -* -*/ - - - -#ifndef CSIPAUTHENTICATEHEADERBASE_H -#define CSIPAUTHENTICATEHEADERBASE_H - -// INCLUDES -#include "sipauthheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAuthenticateHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP Proxy-Authenticate- and WWW-Authenticate-headers -* -* @lib sipcodec.lib -*/ -class CSIPAuthenticateHeaderBase : public CSIPAuthHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPAuthenticateHeaderBase(); - - - public: // New functions - - /** - * Check whether a qop-value in qop-options is present. - * @param aQopValue the qop-value - * @return ETrue if present, otherwise EFalse. - */ - IMPORT_C TBool HasQopValueL(const TDesC8& aQopValue) const; - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ExternalizeSupported - */ - IMPORT_C virtual TBool ExternalizeSupported() const; - - protected: // Constructors - - CSIPAuthenticateHeaderBase(); - void ConstructL(); - void ConstructL(const CSIPAuthenticateHeaderBase& aHeader); - - protected: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - protected: // From CSIPAuthBase - - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - protected: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - protected: // Data - - CSIPAuthenticateHeaderParams* iParams; - }; - -#endif // CSIPAUTHENTICATEHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipauthheaderbase.h --- a/epoc32/include/sipauthheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipauthheaderbase.h -* Part of : SIP Codec -* Version : SIP/5.0 -* -*/ - - - -#ifndef CSIPAUTHHEADERBASE_H -#define CSIPAUTHHEADERBASE_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPParamContainerBase; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP Authorization-, Proxy-Authenticate-, -* Proxy-Authorization- and WWW-Authenticate-headers -* -* @lib sipcodec.lib -*/ -class CSIPAuthHeaderBase : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPAuthHeaderBase(); - - - public: // New functions - - /** - * @return the value of the auth-scheme - */ - IMPORT_C RStringF AuthScheme() const; - - /** - * Checks if a parameter is present - * @param aName the name of the parameter - * @return ETrue if present, otherwise EFalse - */ - IMPORT_C TBool HasParam(RStringF aName) const; - - /** - * Gets a parameter value - * @pre HasParam(aName) == ETrue - * @param aName the name of the parameter - * @return the parameter value if present, - * otherwise a zero-length length value. - */ - IMPORT_C RStringF ParamValue(RStringF aName) const; - - /** - * Gets a parameter value stored as a descriptor - * @pre HasParam(aName) == ETrue - * @param aName the name of the parameter - * @return the parameter value if present, - * otherwise a zero-length length value. - */ - IMPORT_C const TDesC8& DesParamValue(RStringF aName) const; - - /** - * Sets a parameter with a value. - * Takes copies of the name and value, - * so if the RStringFs have been dynamically allocated, - * they can be closed if necessary after the function returns. - * @pre HasParam(aName) == EFalse - * @param aName the name of the parameter - * @param aValue the parameter value to set - */ - IMPORT_C void SetParamL(RStringF aName, RStringF aValue); - - /** - * Sets a parameter with a value. - * Takes copies of the name - * so if the RStringF have been dynamically allocated, - * they can be closed if necessary after the function returns. - * Stores the parameter value as a descriptor, so that the - * case-sensitivity is not lost in RStringF-descriptor conversions. - * @pre HasParam(aName) == EFalse - * @param aName the name of the parameter - * @param aValue the parameter value to set - */ - IMPORT_C void SetDesParamL(RStringF aName, const TDesC8& aValue); - - /** - * Sets a parameter with a value and adds double quotes - * as the first and the last character in the value. - * Takes copy of the name, - * so if the RStringF has been dynamically allocated, - * it can be closed if necessary after the function returns. - * @pre HasParam(aName) == EFalse - * @param aName the name of the parameter - * @param aValue the parameter value - * to which the double quotes will be added - */ - IMPORT_C void SetParamAndAddQuotesL(RStringF aName, - const TDesC8& aValue); - - /** - * Deletes a parameter - * @param aName the parameter name to delete - */ - IMPORT_C void DeleteParam(RStringF aName); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ExternalizeSupported - */ - IMPORT_C virtual TBool ExternalizeSupported() const; - - - public: // From CSIPHeaderBase, for internal use - - TBool EncodeMultipleToOneLine() const; - TBool MoreThanOneAllowed() const; - TPreferredPlace PreferredPlaceInMessage() const; - virtual HBufC8* ToTextValueL() const; - - protected: // Constructors - - CSIPAuthHeaderBase(); - void ConstructL(RStringF aAuthScheme); - - protected: // New functions - - void SetAuthSchemeL(const TDesC8& aAuthScheme); - void ParseL(const TDesC8& aValue); - virtual const CSIPParamContainerBase& Params() const = 0; - virtual CSIPParamContainerBase& Params() = 0; - - private: // Data - - RStringF iAuthScheme; - TChar iSeparator; - }; - -#endif // CSIPAUTHHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipauthorizationheader.h --- a/epoc32/include/sipauthorizationheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipauthorizationheader.h -* Part of : SIP Codec -* Version : SIP/6.0 -* -*/ - - - -#ifndef CSIPAUTHORIZATIONHEADER_H -#define CSIPAUTHORIZATIONHEADER_H - -// INCLUDES -#include "sipauthorizationheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for SIP Authorization-header manipulation. -* @lib sipcodec.lib -*/ -class CSIPAuthorizationHeader : public CSIPAuthorizationHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPAuthorizationHeader - * from textual representation of the header's value part. - * @param aValue a value part of a "Proxy-Authenticate"-header - * @return a new instance of CSIPAuthorizationHeader - */ - IMPORT_C static CSIPAuthorizationHeader* - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPAuthorizationHeader - * @return a new instance of CSIPAuthorizationHeader - */ - IMPORT_C static CSIPAuthorizationHeader* - NewL(RStringF aAuthScheme); - - /** - * Creates a new instance of CSIPAuthorizationHeader - * @return a new instance of CSIPAuthorizationHeader - */ - IMPORT_C static CSIPAuthorizationHeader* - NewLC(RStringF aAuthScheme); - - /** - * Creates a deep-copy of a CSIPAuthorizationHeaderBase - * @param aAuthenticateHeaderBase to be copied - * @return a new instance of CSIPAuthorizationHeader - */ - IMPORT_C static CSIPAuthorizationHeader* - NewL(const CSIPAuthorizationHeaderBase& aHeader); - - /** - * Creates a deep-copy of a CSIPAuthorizationHeaderBase - * @param aAuthenticateHeaderBase to be copied - * @return a new instance of CSIPAuthorizationHeader - */ - IMPORT_C static CSIPAuthorizationHeader* - NewLC(const CSIPAuthorizationHeaderBase& aHeader); - - /** - * Destructor - */ - IMPORT_C ~CSIPAuthorizationHeader(); - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ExternalizeSupported - */ - IMPORT_C TBool ExternalizeSupported() const; - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // New functions, for internal use - - /** - * @internalComponent - */ - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - /** - * @internalComponent - */ - static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - private: // Constructors - - CSIPAuthorizationHeader(); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // For testing purposes - - UNIT_TEST(CSIPAuthorizationHeaderTest) - }; - -#endif // CSIPAUTHORIZATIONHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipauthorizationheaderbase.h --- a/epoc32/include/sipauthorizationheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipauthorizationheaderbase.h -* Part of : SIP Codec -* Version : SIP/6.0 -* -*/ - - - -#ifndef CSIPAUTHORIZATIONHEADERBASE_H -#define CSIPAUTHORIZATIONHEADERBASE_H - -// INCLUDES -#include "sipauthheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAuthorizationHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP Authorization- and Proxy-Authorization-headers -* @lib sipcodec.lib -*/ -class CSIPAuthorizationHeaderBase : public CSIPAuthHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor. - */ - IMPORT_C virtual ~CSIPAuthorizationHeaderBase(); - - protected: // Constructors - - CSIPAuthorizationHeaderBase(); - void ConstructL(); - void ConstructL(const CSIPAuthorizationHeaderBase& aHeader); - - protected: // From CSIPAuthHeaderBase - - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - protected: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - protected: // Data - - CSIPAuthorizationHeaderParams* iParams; - }; - -#endif // CSIPAUTHORIZATIONHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcallidheader.h --- a/epoc32/include/sipcallidheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcallidheader.h -* Part of : SIP Codec -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPCALLIDHEADER_H -#define CSIPCALLIDHEADER_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for a SIP Call-ID header. -* -* @lib sipcodec.lib -*/ -class CSIPCallIDHeader : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPCallIDHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Call-ID"-header (e.g. "ab2x@zb7y") - * @returns a new instance of CSIPCallIDHeader - */ - IMPORT_C static CSIPCallIDHeader* DecodeL(const TDesC8& aValue); - - /** - * Destructor - */ - IMPORT_C ~CSIPCallIDHeader (); - - - public: // New functions - - /** - * Compares this instance to another "Call-ID" header object - * @param aCallIDHeader a header to compare to - * @returns ETrue if "Call-ID" headers are similar - */ - IMPORT_C TBool operator==(const CSIPCallIDHeader& aCallIDHeader); - - /** - * Constructs an instance of a CSIPCallIDHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPCallIDHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL (RWriteStream& aWriteStream) const; - - private: // Constructors - - CSIPCallIDHeader(); - - private: // New functions - - void ParseL(const TDesC8& aValue); - - private: // Data - - HBufC8* iCallID; - - private: // For testing purposes - - UNIT_TEST(CSIPCallIDHeaderTest) - }; - - -#endif // end of CSIPCALLIDHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipclientresolverconfigcrkeys.h --- a/epoc32/include/sipclientresolverconfigcrkeys.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipclientresolverconfigcrkeys.h -* Part of : SIP / SIP Client Resolver -* Interface : SIP Client Resolver API -* Version : 1.0 -* -*/ - - - -#ifndef SIPCLIENTRESOLVERCONFIGCRKEYS_H -#define SIPCLIENTRESOLVERCONFIGCRKEYS_H - -// INCLUDES -#include - -/** -* @file -* @publishedAll -* @released -*/ - -/// Defines configuration parameters used by SIP Client Resolver -const TUid KCRUidSIPClientResolverConfig = { 0x10282EE7 }; - -/// Mask for the less significant bits in setting keys. -/// These bits are reserved for field type information. -const TUint32 KSIPClientResolverFieldTypeMask = 0xf0000000; - -/// Mask for the most significant bits in setting keys. -/// These bits are reserved for the actual key part. -const TUint32 KSIPClientResolverKeyMask = 0x0fffffff; - -/** -* Mask for username field. -* Field type is TDesC8. -*/ -const TUint32 KSIPClientResolverUserNameMask = 0x10000000; - -/** -* Mask for plug-in implementation UID field. -* Field type is TInt32. -*/ -const TUint32 KSIPClientResolverPluginUIDMask = 0x20000000; - -/** -* Mask for client UID field. -* Field type is TInt32. -*/ -const TUint32 KSIPClientResolverClientUIDMask = 0x30000000; - -#endif // SIPCLIENTRESOLVERCONFIGCRKEYS_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipclienttransaction.h --- a/epoc32/include/sipclienttransaction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,173 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipclienttransaction.h -* Part of : SIP Client -* Interface : -* Version : 1.0 -* -*/ - - - - -#ifndef CSIPCLIENTTRANSACTION_H -#define CSIPCLIENTTRANSACTION_H - -// INCLUDES -#include "siptransactionbase.h" - -// FORWARD DECLARATIONS -class CSIPRefresh; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP client transactions. -* It provides services for ending and getting the SIP client transaction -* parameters. Some client transactions can also be canceled. -* -* The user of the class cannot instante this class. -* @lib sipclient -*/ -class CSIPClientTransaction: public CSIPTransactionBase - { - public: // Destructor - - /** - * Destructor - */ - IMPORT_C ~CSIPClientTransaction(); - - public: // New functions - - /** - * Gets response elements of the most recent response. - * @return Response elements. Ownership isn't transferred. - */ - IMPORT_C const CSIPResponseElements* ResponseElements() const; - - /** - * Cancels client transaction i.e. creates a CANCEL request and sends it - * to the remote UA. - * @pre State()==EProceeding - * @pre CancelAllowed()==ETrue - * @pre Connection().State()==EActive - * @return SIP CANCEL transaction, ownership is transferred. - * @leave KErrSIPInvalidTransactionState if canceling is not possible - * at all, or because the transaction is not in a proper state or the - * transaction is not related to a dialog. - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* CancelL(); - - /** - * Gets the associated refresh with the transaction. - * If the refresh is associated with the transaction, - * transaction will be refreshed at defined interval. - * @return associated refresh or 0-pointer if there's no - * associated refresh. Ownership isn't transferred. - */ - IMPORT_C const CSIPRefresh* Refresh() const; - - /** - * Checks if the client transaction is such that it can be cancelled. - * This does no check whether the transaction is currently in such a - * state that the canceling can be done now. - * - * @return ETrue if client transaction can be cancelled; - * EFalse otherwise - */ - IMPORT_C virtual TBool CancelAllowed() const; - - public: // Constructors, for internal use - - /** - * Instantiates a CSIPClientTransaction object, leaves on failure. - * - * @param aType Identifies the transaction type - * @param aAssociation Object to which the transaction is associated - * with. - * @param aRefresh If transaction is refreshed, this points to a - * CSIPRefresh, otherwise this is NULL. Ownership is not transferred. - * @return SIP client transaction, ownership is transferred. - */ - static CSIPClientTransaction* - NewL(RStringF aType, - MTransactionAssociation& aAssociation, - CSIPRefresh* aRefresh=0); - - /** - * Instantiates a CSIPClientTransaction object and pushes it into - * CleanupStack, leaves on failure. - * - * @param aType Identifies the transaction type - * @param aAssociation Object to which the transaction is associated - * with. - * @param aRefresh If transaction is refreshed, this points to a - * CSIPRefresh, otherwise this is NULL. Ownership is not transferred. - * @return SIP client transaction, ownership is transferred. - */ - static CSIPClientTransaction* - NewLC(RStringF aType, - MTransactionAssociation& aAssociation, - CSIPRefresh* aRefresh=0); - - public: // New functions, for internal use - - /** - * Sets the RequestId. - * - * @pre iRequestId == 0 - * @pre aRequestId != 0 - * @param aRequestId RequestId obtained from SIP client - */ - void SetRequestId(TUint32 aRequestId); - - /** - * Gets the associated refresh with the transaction and allows - * modification fo the refresh. This method is for internal use only. - * - * @return associated refresh or 0-pointer if there's no - * associated refresh. Ownership isn't transferred. - */ - CSIPRefresh* Refresh(); - - /** - * Clears the association from ClientTransaction to CSIPRefresh - */ - void RemoveRefresh(); - - protected: // Constructor - - CSIPClientTransaction(MTransactionAssociation& aAssociation, - CSIPRefresh* aRefresh); - - private: // Data - - //Points to the refresh object if this transaction is refreshed. - //NULL if not refreshed. Not owned. - CSIPRefresh* iRefresh; - - private: // For testing purposes - - UNIT_TEST(CSIP_Test) - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcodecerr.h --- a/epoc32/include/sipcodecerr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcodecerr.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/6.0 -* -*/ - - - -#ifndef SIPCODECERR_H -#define SIPCODECERR_H - -/** -* @file -* @publishedAll -* @released -*/ - -/** SIP parsing (decoding) errors */ -// General errors -const TInt KErrSipCodecPreParser=-17750; -const TInt KErrSipCodecTokenizer=-17751; -const TInt KErrSipCodecNotAllowed=-17752; -const TInt KErrSipCodecHeaderName=-17753; -const TInt KErrSipCodecHeaderValue=-17754; -const TInt KErrSipCodecRequestLine=-17755; -const TInt KErrSipCodecResponseLine=-17756; -const TInt KErrSipCodecResponseCode=-17757; -const TInt KErrSipCodecSIPVersion=-17758; -const TInt KErrSipCodecSIPMethod=-17759; -const TInt KErrSipCodecReasonPhrase=-17760; -const TInt KErrSipCodecAnyParam=-17761; -const TInt KErrSipCodecAnyParamName=-17762; -const TInt KErrSipCodecAnyParamValue=-17763; -const TInt KErrSipCodecDuplicateParam=-17764; -const TInt KErrSipCodecHostPort=-17765; -const TInt KErrSipCodecHost=-17766; -const TInt KErrSipCodecPort=-17767; -// sip-address -const TInt KErrSipCodecSIPAddress=-17768; -const TInt KErrSipCodecDisplayName=-17769; -// URI -const TInt KErrSipCodecURI=-17770; -const TInt KErrSipCodecURIScheme=-17771; -const TInt KErrSipCodecURIParams=-17772; -const TInt KErrSipCodecURIHeaders=-17773; -// From and To -const TInt KErrSipCodecFromOrToAddress=-17774; -const TInt KErrSipCodecFromOrToParams=-17775; -// Contact -const TInt KErrSipCodecContactHeader=-17776; -const TInt KErrSipCodecContactSetToStar=-17777; -const TInt KErrSipCodecContactAddress=-17778; -const TInt KErrSipCodecContactParams=-17779; -// Other SIP headers -const TInt KErrSipCodecViaHeader=-17780; -const TInt KErrSipCodecCallIdHeader=-17781; -const TInt KErrSipCodecCSeqHeader=-17782; -const TInt KErrSipCodecContentLengthHeader=-17783; -const TInt KErrSipCodecExpiresHeader=-17784; -const TInt KErrSipCodecMaxForwardsHeader=-17785; -const TInt KErrSipCodecContentTypeHeader=-17786; -const TInt KErrSipCodecRouteHeader=-17787; -const TInt KErrSipCodecMinExpiresHeader=-17788; -const TInt KErrSipCodecTokenBaseHeader=-17789; -const TInt KErrSipCodecRequireHeader=-17790; -const TInt KErrSipCodecContentEncodingHeader=-17791; -const TInt KErrSipCodecProxyRequireHeader=-17792; -const TInt KErrSipCodecSupportedHeader=-17793; -const TInt KErrSipCodecUnsupportedHeader=-17794; -const TInt KErrSipCodecAllowHeader=-17795; -const TInt KErrSipCodecSecurityHeader=-17796; -const TInt KErrSipCodecContentDispositionHeader=-17797; -const TInt KErrSipCodecSubscriptionStateHeader=-17798; -const TInt KErrSipCodecAcceptHeader=-17799; -const TInt KErrSipCodecAcceptEncodingHeader=-17800; -const TInt KErrSipCodecAcceptLanguageHeader= -17801; -const TInt KErrSipCodecAcceptParams=-17802; -const TInt KErrSipCodecEventHeader=-17803; -const TInt KErrSipCodecAllowEventsHeader=-17804; -const TInt KErrSipCodecAuthenticationInfoHeader=-17805; -const TInt KErrSipCodecReferToHeader=-17806; -const TInt KErrSipCodecAuthenticationHeader=-17807; -const TInt KErrSipCodecAuthScheme=-17808; -const TInt KErrSipCodecAuthorizationHeader=-17809; -const TInt KErrSipCodecURIContainer=-17810; -const TInt KErrSipCodecRAckHeader=-17811; -const TInt KErrSipCodecRSeqHeader=-17812; -const TInt KErrSipCodecReplyToHeader=-17813; -const TInt KErrSipCodecTimestampHeader=-17814; -const TInt KErrSipCodecRetryAfterHeader=-17815; -const TInt KErrSipCodecRetryAfterParams=-17816; -const TInt KErrSipCodecAcceptContactHeader=-17817; -const TInt KErrSipCodecPAssociatedURIHeader=-17818; -const TInt KErrSipCodecPAccessNetworkInfoHeader=-17819; - -// Last error code allocated to SIP Codec is -17874. -// This value must not be exceeded. - -#endif // SIPCODECERR_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipconcreteprofileobserver.h --- a/epoc32/include/sipconcreteprofileobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipconcreteprofileobserver.h -* Part of : SIP Profile Client -* Interface : private -* The observer class that must be implemented by users of -* CSIPConcreteProfile -* Version : 1.0 -* -*/ - - - -#ifndef MSIPCONCRETEPROFILEOBSERVER_H -#define MSIPCONCRETEPROFILEOBSERVER_H - -// INCLUDES - -#include - -// FORWARD DECLARATIONS - - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Observer class to be implemented by users of CSIPConcreteProfile -* It provides event notifications related to profiles. -*/ -class MSIPConcreteProfileObserver - { - public: - - /** - * SIP profile registration status changed event - * Event is send to those observers, who have the - * corresponding profile instantiated. - * @param aProfileId id of profile which registration - * status has been changed. - * @param aStatus new status of the profile - * @param aStatusId id related to registration - */ - virtual void RegistrationStatusChangedL( - TUint32 aProfileId, - TInt aStatus, - TUint32 aStatusId) = 0; - - /** - * SIP profile creation event. - * Event is send to all observers. - * @param aProfileId id of new SIP Profile - */ - virtual void AddedL(TUint32 aProfileId) = 0; - - /** - * SIP profile destruction event. - * Event is send to those observers, who have the - * corresponding profile instantiated. - * @param aProfileId id of profile which was destroyed - */ - virtual void RemovedL(TUint32 aProfileId) = 0; - - /** - * SIP profile information update event - * Event is send to those observers, who have the - * corresponding profile instantiated. - * @param aProfileId id of updated SIP Profile - * @param aSize size of updated SIP Profile - */ - virtual void UpdatedL(TUint32 aProfileId, TUint aSize) = 0; - - /** - * An asynchronous error has occurred related to SIP profile - * Event is send to those observers, who have the - * corresponding profile instantiated. - * @param aProfileId the id of failed profile - * @param aStatus status indicating if error occurred - * during registering (ERegistrationInProgress) - * or deregistering (EUnregistrationInProgress) - * @param aError a error code - */ - virtual void ErrorOccurredL( - TUint32 aProfileId, - TInt aStatus, - TInt aError) = 0; - }; - -#endif // MSIPCONCRETEPROFILEOBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipconnection.h --- a/epoc32/include/sipconnection.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,344 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipconnection.h -* Part of : SIP Client -* Interface : SDK API, SIP API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPCONNECTION_H -#define CSIPCONNECTION_H - -// INCLUDES -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIP; -class MSIPConnectionObserver; -class CSIPClientTransaction; -class MSIPRegistrationContext; -class CSIPRefresh; -class CSIPRequestElements; -class CSIPConnectionImplementation; - -// CONSTANTS - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for monitoring connection's state and sending SIP requests outside -* the dialog associations. Class must not be used -* - for sending requests to which received non-failure response creates a dialog -* - for sending requests that must be sent within SIP dialog -* -* Note that the user can have only one instance of the class per same IAP-id. -*/ -class CSIPConnection : public CBase - { - public: - /** Connection states */ - enum TState - { - /** Connection initializing */ - EInit=1, - /** Connection active */ - EActive, - /** Connection suspended */ - ESuspended, - /** Connection is inactive */ - EInactive, - /** Connection is permanently unavailable */ - EUnavailable - }; - - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aSip a handle to the SIP server - * @param aIapId IAP-id - * @param aObserver a observer for receiving asynchonous events on this - * connection - * @return New object, ownership is transferred - * @capability NetworkServices - */ - IMPORT_C static CSIPConnection* - NewL(CSIP& aSIP, - TUint32 aIapId, - MSIPConnectionObserver& aObserver); - - /** - * Two-phased constructor. - * Constructs an object and adds the pointer to the cleanup stack; - * @param aSip a handle to the SIP server - * @param aIapId IAP-id - * @param aObserver a observer for receiving asynchonous events on this - * connection - * @return New object, ownership is transferred - * @capability NetworkServices - */ - IMPORT_C static CSIPConnection* - NewLC(CSIP& aSIP, - TUint32 aIapId, - MSIPConnectionObserver& aObserver); - - /** - * Destructor - * @capability NetworkServices - */ - IMPORT_C ~CSIPConnection(); - - public: // New functions - - /** - * Gets current state of the connection - * @return current state of the connection - */ - IMPORT_C TState State() const; - - /** - * Creates SIP request and sends it to the given destination. - * The function must not be used with SIP requests that creates - * SIP dialog associations or must be sent within SIP dialog - * association. - * This provokes the Non-invite state machine. - * This function must be used if the user has created the - * registration binding. - * @pre State() == EActive. - * @pre aContext.IsContextActive() == ETrue - * @param aElements contains local and remote addresses, - * optional SIP message headers and body. - * The ownership is transferred. - * @param aContext defines outbound proxy to be used. If the user - * does not provide from-address it will be constucted using - * user's AOR used during the registration. - * @return SIP client transaction, ownership is transferred - * @leave KErrArgument if aElements == 0 - * @leave KErrSIPInvalidRegistrationState if aContext.IsContextActive() - * == EFalse - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendRequestL(CSIPRequestElements* aElements, - const MSIPRegistrationContext& aContext); - - /** - * Creates SIP request and sends it to the given destination. - * The function must not be used with SIP requests that creates - * SIP dialog associations or must be sent within SIP dialog - * association. - * This provokes the Non-invite state machine. - * This function must be used if the user has created the - * registration binding. - * @pre State() == EActive. - * @pre aContext.IsContextActive() == ETrue - * @param aElements contains local and remote addresses, - * optional SIP message headers and body. - * The ownership is transferred. - * @param aContext defines outbound proxy to be used. If the user - * does not provide from-address it will - * be constucted using user's AOR used during the registration. - * @param aRefresh defines the refresh interval for this transaction. - * @return SIP client transaction, ownership is transferred - * @leave KErrArgument if aElements == 0 - * @leave KErrSIPInvalidRegistrationState if aContext.IsContextActive() - * == EFalse - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendRequestL(CSIPRequestElements* aElements, - const MSIPRegistrationContext& aContext, - CSIPRefresh& aRefresh); - - /** - * Creates SIP request and sends it to the given destination. - * The function must not be used with SIP requests that creates SIP - * dialog associations or must be sent within SIP dialog association. - * This invokes the Non-invite state machine. - * @pre State() == EActive. - * @pre aElements.FromHeader() != 0 - * @param aElements contains local and remote addresses, - * optional SIP message headers and body. - * The ownership is transferred. - * @return SIP client transaction, ownership is transferred - * @leave KErrArgument if aElements == 0 or if From-header is not - * present in aElements - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendRequestL(CSIPRequestElements* aElements); - - /** - * Creates SIP request and sends it to the given destination. - * The function must not be used with SIP requests that creates SIP - * dialog associations or must be sent within SIP dialog association. - * This invokes the Non-invite state machine. - * @pre State() == EActive. - * @pre aElements.FromHeader() != 0 - * @param aElements contains local and remote addresses, - * optional SIP message headers and body. - * The ownership is transferred. - * @param aRefresh indicates that transaction will be refreshed - * @return SIP client transaction, ownership is transferred - * @leave KErrArgument if aElements == 0 or if From-header is not - * present in aElements - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendRequestL(CSIPRequestElements* aElements, - CSIPRefresh& aRefresh); - - /** - * Creates SIP REGISTER request and sends it to the given destination. - * User must no define any Contact or Expires-headers - * in the provided elements. - * @pre State() == EActive - * @pre aElements != 0 - * @pre aElements->Method().DesC().Length()==0 - * @param aElements contains local and remote addresses, optional SIP - * message headers and body. User must not set any expires values - * to aElements. The ownership is transferred. - * @return SIP REGISTER client transaction, ownership is transferred - * @leave KErrArgument if aElements == 0 or if the request method has - * been defined in aElements - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - FetchRegistrationsL(CSIPRequestElements* aElements); - - /** - * Gets Iap-id used for this connection - * @return Iap-id - */ - IMPORT_C TUint32 IapId() const; - - /** - * Gets SIP server handle - * @return handle to SIP server, or 0-pointer if SIP server does not - * exist any more - */ - IMPORT_C CSIP* SIP(); - - /** - * Gets SIP server handle - * @return handle to SIP server, or 0-pointer if SIP server does not - * exist any more - */ - IMPORT_C const CSIP* SIP() const; - - /** - * Sets a RSocket option used for all the sockets used for sending - * SIP requests and responses in this CSIPConnection. - * @pre State() == EActive - * @param aOptionName An integer constant which identifies an option. - * @param aOptionLevel An integer constant which identifies - * level of an option. - * @param aOption Option value packaged in a descriptor. - * @leave A system-wide error code - * @capability NetworkControl - * @capability NetworkServices - * @capability Location - * @capability ReadDeviceData - * @capability WriteDeviceData - */ - IMPORT_C void SetOptL(TUint aOptionName, - TUint aOptionLevel, - const TDesC8& aOption=KNullDesC8); - - /** - * Sets a RSocket option used for all the sockets used for sending - * SIP requests and responses in this CSIPConnection. - * @pre State() == EActive - * @param aOptionName An integer constant which identifies an option. - * @param aOptionLevel An integer constant which identifies - * level of an option. - * @param aOption Option value as an integer. - * @leave A system-wide error codes - * @capability NetworkControl - * @capability NetworkServices - * @capability Location - * @capability ReadDeviceData - * @capability WriteDeviceData - */ - IMPORT_C void SetOptL(TUint aOptionName, - TUint aOptionLevel, - TInt aOption); - - /** - * Gets the local IP address of this CSIPConnection - * that is used by the SIP implementation. - * The user should re-new the call whenever the connection state changes - * to the CSIPConnection::EActive in order to verify the correctness of - * the previously retrieved local IP address. The local IP address might - * be different as a result of the connection state change. - * @pre State() == CSIPConnection::EActive - * @param aAddr on return filled with local IP address - * @leave a system-wide error code - */ - IMPORT_C void GetLocalAddrL(TInetAddr& aAddr) const; - - /** - * Refreshes the connection. - * This will retrieve the Bearer Monitor Instance if any, is available for this CSIPConnection and issue a Connection Refresh Request to it. - * The state of the Connection can be retrieved from State() to check if there is any change after Refreshing the connection. - * @capability NetworkServices. - */ - - IMPORT_C void RefreshConnection() const; - - public: // New functions, for internal use - - /** - * Returns the implementation instance. - * - * @return CSIPConnectionImplementation - */ - CSIPConnectionImplementation& Implementation(); - - private: // Constructors - - CSIPConnection(); - - void ConstructL(CSIP& aSIP, - TUint32 aIapId, - MSIPConnectionObserver& aObserver); - - private: // Data - - CSIPConnectionImplementation* iImplementation; - - private: // For testing purposes - - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPConnection_Test) - UNIT_TEST(CSIPSubscribeDialogAssoc_Test) - UNIT_TEST(CSIPInviteDialogAssoc_Test) - UNIT_TEST(CSIPReferDialogAssoc_Test) - UNIT_TEST(CSIPNotifyDialogAssoc_Test) - UNIT_TEST(CSIPDialogTrying_Test) - UNIT_TEST(CSIPRegistrationBinding_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipconnectionobserver.h --- a/epoc32/include/sipconnectionobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,231 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipconnectionobserver.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef MSIPCONNECTIONOBSERVER_H -#define MSIPCONNECTIONOBSERVER_H - -// INCLUDES -#include "sipconnection.h" - -// FORWARD DECLARATIONS -class CSIPDialogAssocBase; -class CSIPInviteDialogAssoc; -class CSIPRegistrationBinding; -class CSIPDialog; -class CSIPTransactionBase; -class CSIPServerTransaction; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* An interface to be implemented by users of CSIPConnection. -* Interface allows to be able to receive requests, responses, connection state -* notifications and error notifications from sip stack. -* -* Note: The client must not delete related CSIPConnection object -* during the execution of the interface function. -* -* @lib n/a -*/ - -class MSIPConnectionObserver - { - public: - /** - * A SIP request outside a dialog has been received from the network. - * - * @pre aTransaction != 0 - * @param aTransaction SIP server transaction. The ownership is - * transferred. - */ - virtual void IncomingRequest (CSIPServerTransaction* - aTransaction) = 0; - - /** - * A SIP request within a dialog has been received from the network. - * The client must resolve the actual dialog association to which - * this request belongs. - * - * @pre aTransaction != 0 - * @param aTransaction SIP server transaction. The ownership is - * transferred. - * @param aDialog the dialog that this transaction belongs to. - */ - virtual void IncomingRequest (CSIPServerTransaction* aTransaction, - CSIPDialog& aDialog) = 0; - - /** - * A SIP response received from the network. - * - * @param aTransaction contains response elements. - */ - virtual void IncomingResponse (CSIPClientTransaction& - aTransaction) = 0; - - /** - * A SIP response received from the network that is within a dialog - * association or creates a dialog association. - * - * @param aTransaction contains response elements. - * @param aDialogAssoc a dialog association. - */ - virtual void IncomingResponse ( - CSIPClientTransaction& aTransaction, - CSIPDialogAssocBase& aDialogAssoc) = 0; - - /** - * Multiple SIP responses have been received to the single INVITE due - * to the forking proxy. Note that each response creates a separate - * INVITE dialog association. - * Multiple responses can arrive until SIP stack completes UAC core - * INVITE transaction. - * If clients deletes INVITE transaction after first SIP response - * other possible responses will be consumed by the implementation. - * - * @param aTransaction contains response elements - * @param aDialogAssoc INVITE dialog association; the ownership is - * transferred - */ - virtual void IncomingResponse ( - CSIPClientTransaction& aTransaction, - CSIPInviteDialogAssoc* aDialogAssoc) = 0; - - /** - * A SIP response related a registration binding or an error response - * that is related to registration binding has been received - * from the network. - * - * @param aTransaction contains response elements - * @param aRegistration registration binding this transaction belongs to - */ - virtual void - IncomingResponse (CSIPClientTransaction& aTransaction, - CSIPRegistrationBinding& aRegistration) = 0; - - /** - * An asynchronous error has occurred in the stack related to the - * request indicated by the given transaction. - * - * @param aError system wide or SIP error code - * @param aTransaction failed transaction - * @param aSIPConnection a SIP connection - */ - virtual void ErrorOccured (TInt aError, - CSIPTransactionBase& aTransaction) = 0; - - /** - * An asynchronous error has occurred in the stack related - * to the request indicated by the given transaction. - * - * @param aError system wide or SIP error code - * @param aTransaction the failed transaction - * @param aRegistration the failed registration binding - */ - virtual void ErrorOccured (TInt aError, - CSIPClientTransaction& aTransaction, - CSIPRegistrationBinding& aRegistration) = 0; - - /** - * An asynchronous error has occured related to a request within - * an existing dialog. - * - * @param aError system wide or SIP error code - * @param aTransaction the failed transaction. - * @param aDialogAssoc the failed dialog associoation. - */ - virtual void ErrorOccured ( - TInt aError, - CSIPTransactionBase& aTransaction, - CSIPDialogAssocBase& aDialogAssoc) = 0; - - /** - * An asynchronous error has occured related to a refresh - * - * @param aError system wide or SIP error code - * @param aSIPRefresh original refresh object. - */ - virtual void ErrorOccured (TInt aError, CSIPRefresh& aSIPRefresh) = 0; - - /** - * An asynchronous error has occured related to a periodical refresh - * that relates to a registration. - * - * @param aError system wide or SIP error code; - * KErrCouldNotConnect if the refresh has failed - * due to the suspended connection. - * @param aRegistration associated registration binding - */ - virtual void ErrorOccured (TInt aError, - CSIPRegistrationBinding& aRegistration) = 0; - - /** - * An asynchronous error has occured related to a periodical refresh - * that belongs to SIP dialog association. - * - * @param aError system wide or SIP error code; - * KErrCouldNotConnect if the refresh has failed - * due to the suspended connection. - * @param aDialogAssoc SIP dialog association. - */ - virtual void ErrorOccured (TInt aError, - CSIPDialogAssocBase& aDialogAssoc) = 0; - - /** - * SIP stack has completed UAC core INVITE transaction 64*T1 seconds - * after the reception of the first 2xx response. No more 2xx responses - * can be received to the issued single INVITE. - * - * If the INVITE transaction does not create a dialog, or the INVITE - * transaction encounters an error, this event will not be sent. - * - * @param aTransaction a complete UAC core INVITE transaction - */ - virtual void InviteCompleted (CSIPClientTransaction& aTransaction) = 0; - - /** - * Invite was canceled with the CANCEL - * @param aTransaction a canceled INVITE UAS transaction - */ - virtual void InviteCanceled (CSIPServerTransaction& aTransaction) = 0; - - /** - * Connection state has changed. - * If connection state has changed to EInactive or EUnavailable, - * SIP stack has removed all stand-alone SIP refreshes, registrations - * and dialog associations that client requested to refresh. Client may - * re-issue refresh requests (stand-alone, registration or dialog - * association related) when connection becomes EActive again. - * SIP stack also terminates all pending SIP client transactions and no - * errors are reported back to the client about the terminated - * transactions nor about removed refreshes in order to avoid event - * flood. - * - * @param aState indicates the current connection state - */ - virtual void ConnectionStateChanged (CSIPConnection::TState aState) = 0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipconnpref.h --- a/epoc32/include/sipconnpref.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,73 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIP extension events definition -// -// - - - -/** - @file - @publishedAll - @released since v9.2 -*/ - - -#ifndef SIPCONNPREFS_H -#define SIPCONNPREFS_H - -#include -#include - -/** The numeric value of SIP protocol family ID .*/ -const TUint KAFSip = 0x10000; - - -struct SSipConnPref -/** -This contains the information about the Id of the profile -@publishedAll -@released since v9.2 -*/ - { - /** The numeric value of SIP Profile ID **/ - TUint32 iProfileId; - }; - - -class TSipConnPref : public TConnPref -/** -This contains the information about the type of the connection preferences used by the SIP in the form of the profiles -@publishedAll -@released since v9.2 -*/ - { -public: - /** Constructor. */ - TSipConnPref(); - /** Sets the profile ID same as the prameter **/ - inline void SetProfileId(TUint32 aProfileId); - /** Gets the default profile ID **/ - inline TUint32 GetProfileId() const; - /** cast to appropriate SIP connection provider type **/ - inline static TSipConnPref& TSipConnPref::Cast(const TConnPref& aPref); - -protected: - inline SSipConnPref* PrefPtr() const; - - }; - -#include - -#endif // sipconnpref.h diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipconnpref.inl --- a/epoc32/include/sipconnpref.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIP extension events definition -// -// - - - -/** - @file - @publishedAll -*/ - - -inline TSipConnPref::TSipConnPref() - : TConnPref(TConnPref::EConnPrefSip) - { - SetProfileId(0); - } - -inline void TSipConnPref::SetProfileId(TUint32 aProfileId) - { - PrefPtr()->iProfileId = aProfileId; - } - -inline TUint32 TSipConnPref::GetProfileId() const - { - return PrefPtr()->iProfileId; - } - -inline TSipConnPref& TSipConnPref::Cast(const TConnPref& aPref) - { - return (TSipConnPref&)aPref; - } - -inline SSipConnPref* TSipConnPref::PrefPtr() const - { - return (SSipConnPref*)UserPtr(); - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcontactheader.h --- a/epoc32/include/sipcontactheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,233 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcontactheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPCONTACTHEADER_H -#define CSIPCONTACTHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPContactHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "Contact" -* header fields. -* -* @lib sipcodec.lib -*/ -class CSIPContactHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPContactHeader from textual representation - * of the header's value part. - * Note that "Contact: *" can be only created using this function. - * @param aValue a value part of a "Contact"-header - * @return an array containing 1..n instances of CSIPContactHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPContactHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred - * @return a new instance of CSIPContactHeader - */ - IMPORT_C static CSIPContactHeader* NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPContactHeader and puts it to CleanupStack - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred - * @return a new instance of CSIPContactHeader - */ - IMPORT_C static CSIPContactHeader* NewLC(CSIPAddress* aSIPAddress); - - /** - * Destructor, deletes the resources of CSIPContactHeader. - */ - IMPORT_C ~CSIPContactHeader(); - - - public: // New functions - - /** - * Compares this object to another instance of CSIPContactHeader - * @param aHeader a CSIPContactHeader header to compare to - * @return ETrue if the objects are equal otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPContactHeader& aHeader) const; - - /** - * Checks if the address is set to a STAR ("*") - * @return ETrue, if the address is a "*" otherwise EFalse - */ - IMPORT_C TBool Star() const; - - /** - * Gets the value of the "expires"-parameter - * @return the "expires"-parameter, or - * KErrNotFound if the parameter is not present. - */ - IMPORT_C TInt ExpiresParameter() const; - - /** - * Sets the "expires"-parameter - * @pre aExpiresParam >= 0 - * @param aExpiresParam a "expires"-parameter value to set - */ - IMPORT_C void SetExpiresParameterL(TInt aExpiresParam); - - /** - * Gets the value of "q"-parameter - * @pre Star() == EFalse - * @return the "q"-parameter value, - * or zero if the parameter is not present. - */ - IMPORT_C TReal QParameter() const; - - /** - * Sets the "q"-parameter value in the "Contact" header - * @pre Star() == EFalse - * @param aQValue a "q"-parameter value to set - */ - IMPORT_C void SetQParameterL(TReal aQValue); - - /** - * Gets the name-address as const - * @return name-address or 0 if not present - * The ownership is NOT transferred. - */ - IMPORT_C const CSIPAddress* SIPAddress() const; - - /** - * Gets the name-address - * @return name-address or 0 if not present - * The ownership is NOT transferred. - */ - IMPORT_C CSIPAddress* SIPAddress(); - - /** - * Sets the name-address - * @pre Star() == EFalse - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address to set, the ownership is transferred - */ - IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); - - /** - * Constructs an instance of a CSIPContactHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPContactHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - TBool ParamInsertionAllowed() const; - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPContactHeader(TBool aIsStar=EFalse); - void ConstructL(); - void ConstructL(CSIPAddress* aSIPAddress); - void ConstructL(const CSIPContactHeader& aContactHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - CSIPAddress* iSIPAddress; - CSIPContactHeaderParams* iParams; - TBool iIsStar; - - private: // For testing purposes - - UNIT_TEST(CSIPContactHeaderTest) - }; - -#endif // CSIPCONTACTHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcontentdispositionheader.h --- a/epoc32/include/sipcontentdispositionheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcontentdispositionheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPCONTENTDISPOSITIONHEADER_H -#define CSIPCONTENTDISPOSITIONHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPHeaderGenericParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in -* SIP "Content-Disposition" header. -* -* @lib sipcodec.lib -*/ -class CSIPContentDispositionHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPContentDispositionHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Content-Disposition"-header - * @return a new instance of CSIPContentDispositionHeader - */ - IMPORT_C static CSIPContentDispositionHeader* - DecodeL (const TDesC8& aValue); - - /** - * Creates a new instance of CSIPContentDispositionHeader - * @param aDispType a Disp-Type value - * @return a new instance of CSIPContentDispositionHeader - */ - IMPORT_C static CSIPContentDispositionHeader* - NewL(const TDesC8& aDispType); - - /** - * Creates a new instance of CSIPContentDispositionHeader - * and puts it to CleanupStack - * @param aDispType a Disp-Type value - * @return a new instance of CSIPContentDispositionHeader - */ - IMPORT_C static CSIPContentDispositionHeader* - NewLC(const TDesC8& aDispType); - - /** - * Destructor. deletes the resources of CSIPContentDispositionHeader. - */ - IMPORT_C ~CSIPContentDispositionHeader(); - - - public: // New functions - - /** - * Gets the disp-type parameter from the "Content-Disposition" header - * @return the disp-type parameter - */ - IMPORT_C const TDesC8& DispType() const; - - /** - * Sets the disp-type parameter in the "Content-Disposition" header; - * @param aTag a disp-type parameter to set - */ - IMPORT_C void SetDispTypeL(const TDesC8& aDispType); - - /** - * Constructs an instance of a CSIPContentDispositionHeader - * from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPContentDispositionHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPContentDispositionHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aDispType); - void ConstructL(const TDesC8& aDispType, const TDesC8& aHandlingParam); - void ConstructL(const CSIPContentDispositionHeader& aHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - HBufC8* iDispType; - CSIPHeaderGenericParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPContentDispositionHeaderTest) - }; - -#endif // CSIPCONTENTDISPOSITIONHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcontentencodingheader.h --- a/epoc32/include/sipcontentencodingheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcontentencodingheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPCONTENTENCODINGHEADER_H -#define CSIPCONTENTENCODINGHEADER_H - -// INCLUDES -#include "siptokenheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters -* in SIP "Content-Encoding" header. -* -* @lib sipcodec.lib -*/ -class CSIPContentEncodingHeader : public CSIPTokenHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPContentEncodingHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Content-Encoding"-header - * @return an array containing 1..n instances of - * CSIPContentEncodingHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPContentEncodingHeader - * @param aValue a content-coding value - * @return a new instance of CSIPContentEncodingHeader - */ - IMPORT_C static CSIPContentEncodingHeader* NewL(RStringF aValue); - - /** - * Creates a new instance of CSIPContentEncodingHeader - * and puts it to CleanupStack - * @param aValue a content-coding value - * @return a new instance of CSIPContentEncodingHeader - */ - IMPORT_C static CSIPContentEncodingHeader* NewLC(RStringF aValue); - - /** - * Destructor, deletes the resources of CSIPContentEncodingHeader. - */ - IMPORT_C ~CSIPContentEncodingHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPContentEncodingHeader - * from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPContentEncodingHeader - */ - - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPContentEncodingHeader(); - CSIPContentEncodingHeader(const CSIPContentEncodingHeader& aHeader); - }; - -#endif // CSIPCONTENTENCODINGHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcontenttypeheader.h --- a/epoc32/include/sipcontenttypeheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcontenttypeheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPCONTENTTYPEHEADER_H -#define CSIPCONTENTTYPEHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPContentTypeHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting media types and -* parameters in SIP "Content-Type" header. -* -* @lib sipcodec.lib -*/ -class CSIPContentTypeHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPContentTypeHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Content-Type"-header - * @return a new instance of CSIPContentTypeHeader - */ - IMPORT_C static CSIPContentTypeHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPContentTypeHeader - * @param aMediaType a media type to set. For example "application" - * @param aMediaSubtype a media subtype to set. For example "sdp" - * @return a new instance of CSIPContentTypeHeader - */ - IMPORT_C static CSIPContentTypeHeader* - NewL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); - - /** - * Creates a new instance of CSIPContentTypeHeader - * and puts it onto the cleanup stack - * @param aMediaType a media type to set. For example "application" - * @param aMediaSubtype a media subtype to set. For example "sdp" - * @return a new instance of CSIPContentTypeHeader - */ - IMPORT_C static CSIPContentTypeHeader* - NewLC(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); - - /** - * Destructor, deletes the resources of CSIPContentTypeHeader. - */ - IMPORT_C ~CSIPContentTypeHeader(); - - public: // New functions - - /** - * Gets the media type from the "Content-Type" header - * @return a media type - */ - IMPORT_C const TDesC8& MediaType() const; - - /** - * Sets the media type in the "Content-Type" header - * @param aMediaType a media type - */ - IMPORT_C void SetMediaTypeL(const TDesC8& aMediaType); - - /** - * Gets the media subtype from the "Content-Type" header - * @return a media subtype - */ - IMPORT_C const TDesC8& MediaSubtype() const; - - /** - * Sets the media subtype in the "Content-Type" header - * @param aMediaSubtype a media subtype - */ - IMPORT_C void SetMediaSubtypeL(const TDesC8& aMediaSubtype); - - /** - * Constructs an instance of a CSIPContentTypeHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return an instance of a CSIPContentTypeHeader - */ - - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPContentTypeHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aMediaType, const TDesC8& aMediaSubtype); - void ConstructL(const CSIPContentTypeHeader& aContentTypeHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - HBufC8* iMediaType; - HBufC8* iMediaSubtype; - CSIPContentTypeHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPContentTypeHeaderTest) - }; - -#endif // CSIPCONTENTTYPEHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipcseqheader.h --- a/epoc32/include/sipcseqheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,168 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcseqheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPCSEQHEADER_H -#define CSIPCSEQHEADER_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting sequence number and -* method in SIP "CSeq" header. -* -* @lib sipcodec.lib -*/ -class CSIPCSeqHeader : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPCSeqHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "CSeq"-header (e.g. "1 REGISTER") - * @return a new instance of CSIPCSeqHeader. - */ - IMPORT_C static CSIPCSeqHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPCSeqHeader - * @param aSeq a sequence number to set. - * @param aMethod a method to set. For example "REGISTER" - * @return a new instance of CSIPCSeqHeader - */ - IMPORT_C static CSIPCSeqHeader* NewL(TUint aSeq, RStringF aMethod); - - /** - * Creates a new instance of CSIPCSeqHeader and puts it to CleanupStack - * @param aSeq a sequence number to set. - * @param aMethod a method to set. For example "REGISTER" - * @return a new instance of CSIPCSeqHeader - */ - IMPORT_C static CSIPCSeqHeader* NewLC(TUint aSeq, RStringF aMethod); - - /** - * Destructor, deletes the resources of CSIPCSeqHeader. - */ - IMPORT_C ~CSIPCSeqHeader(); - - - public: // New functions - - /** - * Gets the sequence number from the "CSeq" header - * @return the current sequence number - */ - IMPORT_C TUint Seq() const; - - /** - * Sets the sequence number in the "CSeq" header - * @param aSeq a sequence number to set - */ - IMPORT_C void SetSeq(TUint aSeq); - - /** - * Gets the method from the "CSeq" header - * @return the method - */ - IMPORT_C RStringF Method() const; - - /** - * Sets the method in the "CSeq" header - * @param aMethod a method to set - */ - IMPORT_C void SetMethodL(RStringF aMethod); - - /** - * Constructs an instance of a CSIPCSeqHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPCSeqHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage () const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL (RWriteStream& aWriteStream) const; - - private: // Constructors - - CSIPCSeqHeader(); - void ConstructL(TUint aCSeq, RStringF aMethod); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - void ParseL(const TDesC8& aValue); - void SetMethodL(const TDesC8& aMethod); - - private: // Data - - TUint iSeq; - RStringF iMethod; - - private: // For testing purposes - - UNIT_TEST(CSIPCSeqHeaderTest) - }; - -#endif // CSIPCSEQHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipdefs.h --- a/epoc32/include/sipdefs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipdefs.h -* Part of : SIP Client API -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef SIPDEFS_H -#define SIPDEFS_H - -// INCLUDES -#include - -/** -* @file -* @publishedAll -* @released -*/ - -// CONSTANTS -/** SIP minimum value for the expiration in seconds*/ -const TUint KSIPMinExpirationValue=60; - -#endif // SIPDEFS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipdialog.h --- a/epoc32/include/sipdialog.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipdialog.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - - -#ifndef CSIPDIALOG_H -#define CSIPDIALOG_H - -// INCLUDES -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPConnection; -class CSIPConnectionImplementation; -class MSIPRegistrationContext; -class CSIPDialogAssocBase; -class CSIPFromHeader; -class CSIPToHeader; -class CSIPCallIDHeader; -class CUri8; -class CSIPDialogImplementation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP dialogs. -* It provides services querying dialog state, obtaining the dialog related -* SIP headers and getting all dialog associations. -* -* The user of the class cannot instantiate this class. -* @lib sipclient -*/ - -class CSIPDialog: public CBase - { - public: - /** Dialog states */ - enum TState - { - /** Initiliazed state */ - EInit, - /** Early state */ - EEarly, - /** Confirmed state */ - EConfirmed, - /** Terminated state */ - ETerminated - }; - - public: //New functions - /** - * Gets dialog state - * @return dialog state - */ - IMPORT_C CSIPDialog::TState State() const; - - /** - * Gets all dialog associations. - * @return All dialog associations. Ownership of the array or the items - * inside it, is not transferred. - */ - IMPORT_C const RPointerArray& - SIPDialogAssociations() const; - - /** - * Gets used registration context for this dialog - * @return associated registration or 0-pointer otherwise. - * Ownership is not transferred. - */ - IMPORT_C const MSIPRegistrationContext* RegistrationContext() const; - - /** - * Checks if the dialog association belongs to this dialog - * @param aDialogAssoc a dialog association - * @return ETrue if belongs, EFalse otherwise - */ - IMPORT_C TBool - IsAssociated(const CSIPDialogAssocBase& aDialogAssoc) const; - - /** - * Gets the SIP connection used for this dialog - * @return SIP connection used for the dialog, or 0-pointer if the - * connection has been deleted. Ownership isn't transferred. - */ - IMPORT_C CSIPConnection* Connection(); - - /** - * Gets the SIP connection used for this dialog. - * @return SIP connection used for the dialog, or 0-pointer if the - * connection has been deleted. Ownership isn't transferred. - */ - IMPORT_C const CSIPConnection* Connection() const; - - /** - * Gets originator's address - * @return originator's address (From-header) - */ - IMPORT_C const CSIPFromHeader& FromHeader() const; - - /** - * Gets recipient's address - * @return recipient's address (To-header) - */ - IMPORT_C const CSIPToHeader& ToHeader() const; - - /** - * Gets remote-uri used during dialog creation - * @return Remote target uri - */ - IMPORT_C const CUri8& RemoteURI() const; - - /** - * Gets Call-ID of SIP dialog - * @pre State()==CSIPDialog::EEarly || State()==CSIPDialog::EConfirmed - * @return Call-ID of SIP dialog - * @leave KErrSIPInvalidDialogState if dialog doesn't yet have a Call-ID - */ - IMPORT_C const CSIPCallIDHeader& CallIdL() const; - - /** - * Compares this object to another object - * @param aDialog CSIPDialog object to compare - * @returns ETrue if the objects are equal, otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPDialog& aDialog) const; - - /** - * Sets the dialog to state to CSIPDialog::EInit. - * The local dialog identifier data - * (Call-ID, CSeq and From-header's tag) will be reused. - * After calling this function, the dialog that was already terminated - * can be used for sending the dialog initiating request such as - * INVITE or SUBSCRIBE reusing the stored Call-ID and From-header's tag - * and the stored CSeq incremented by one. - * @pre State()==CSIPDialog::ETerminated - * @returns KErrNone if succesful and KErrNoMemory if the memory is low. - */ - IMPORT_C TInt ReuseInitialRequestData(); - - public: //Constructors and destructor, for internal use - /** - * Two-phased constructor. - * This constructor should be used if the user has received - * SIP request that creates a SIP dialog association. - * - * @param aConnImplementation Implementation of the used SIP connection - * @return New object, ownership is transferred. - */ - static CSIPDialog* - NewL(CSIPConnectionImplementation& aConnImplementation); - - /** - * Two-phased constructor - * This constructor should be used if the user has received - * SIP request that creates a SIP dialog association. - * - * @param aConnImplementation Implementation of the used SIP connection - * @return New object, ownership is transferred. - */ - static CSIPDialog* - NewLC(CSIPConnectionImplementation& aConnImplementation); - - /** - * Two-phased constructor - * This constructor should be used if the user has received - * SIP request that creates a SIP dialog association. - * - * @param aConnImplementation Implementation of the used SIP connection - * @param aContext Registration context whose outbound proxy and other - * parameters are to be used. - * @return New object, ownership is transferred. - */ - static CSIPDialog* - NewL(CSIPConnectionImplementation& aConnImplementation, - const MSIPRegistrationContext& aContext); - - /** - * Two-phased constructor - * This constructor should be used if the user has received - * SIP request that creates a SIP dialog association. - * - * @param aConnImplementation Implementation of the used SIP connection - * @param aContext Registration context whose outbound proxy and other - * parameters are to be used. - * @return New object, ownership is transferred. - */ - static CSIPDialog* - NewLC(CSIPConnectionImplementation& aConnImplementation, - const MSIPRegistrationContext& aContext); - - /** - * Destructor - */ - ~CSIPDialog(); - - public: // New functions, for internal use - - /** - * Returns the CSIPDialogImplementation. - * @return CSIPDialogImplementation - */ - CSIPDialogImplementation& Implementation(); - - private: // Constructors - - CSIPDialog(); - - void ConstructL(CSIPConnectionImplementation& aConnImplementation); - - void ConstructL(CSIPConnectionImplementation& aConnImplementation, - const MSIPRegistrationContext& aContext); - -private: // Data - - //Implementation instance, CSIPDialog doesn't own it - CSIPDialogImplementation* iImplementation; - -private: // For testing purposes - - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPInviteDialogAssoc_Test) - UNIT_TEST(CSIPSubscribeDialogAssoc_Test) - UNIT_TEST(CSIPReferDialogAssoc_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipdialogassocbase.h --- a/epoc32/include/sipdialogassocbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipdialogassocbase.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPDIALOGASSOCBASE_H -#define CSIPDIALOGASSOCBASE_H - -// INCLUDES -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPMessageElements; -class CSIPClientTransaction; -class CSIPDialog; -class CSIPRefresh; -class CSIPServerTransaction; -class CSIPDialogAssocImplementation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Base class for SIP dialog associations. It provides services for getting -* associated SIP dialog, actual dialog association type and for sending non -* target refresh requests within the dialog association. -* @lib sipclient -*/ -class CSIPDialogAssocBase : public CBase - { - public: // Destructor - - /** - * Destructor - * @internalComponent - */ - virtual ~CSIPDialogAssocBase(); - - public: // New functions - - /** - * Gets the dialog this dialog association belongs to - * @return associated dialog - */ - IMPORT_C const CSIPDialog& Dialog() const; - - /** - * Gets dialog this dialog association belongs to - * @return associated dialog - */ - IMPORT_C CSIPDialog& Dialog(); - - /** - * Creates SIP request and sends it to the remote target. - * This function should be used for sending SIP extension - * requests within dialog assocation that do not cause - * sip dialog associations to be created. In SIP terms - * this request is non target refresh request. - * @pre SIPDialog().State() != CSIPDialog::EInit && - * SIPDialog().State() != CSIPDialog::ETerminated - * @pre Dialog().Connection().State() == EActive - * @pre aMethod != "REGISTER" |"INVITE" | "BYE" | "CANCEL" | "ACK" | - * "SUBSCRIBE" | "NOTIFY" | "UPDATE" | "PRACK" | "REFER" - * @param aElements contains optional SIP message headers and body. - * Ownership is transferred. - * @return SIP extension client transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState If dialog's state is not correct - * @leave KErrArgument if invalid value has been set to aMethod - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C virtual CSIPClientTransaction* - SendNonTargetRefreshRequestL(RStringF aMethod, - CSIPMessageElements* aElements); - - /** - * Gets dialog association type. - * - * @return dialog association type e.g. "INVITE", "SUBSCRIBE" etc... - */ - IMPORT_C RStringF Type() const; - - /** - * Tests if the request is a non target refresh request - * @param aMethod a method to test - * @return ETrue if is non target refresh request; EFalse otherwise - */ - IMPORT_C TBool IsNonTargetRefreshRequest(RStringF aMethod) const; - - public: // New functions, for internal use - - /** - * Returns the implementation instance. - * @return CSIPDialogAssocImplementation - */ - CSIPDialogAssocImplementation& Implementation(); - - /** - * Searches for a refresh with the matching id. Default implementation - * returns NULL. Those classes derived from CSIPDialogAssocBase, which - * can contain refreshes must implement this function for searching the - * correct refresh. - * - * @return CSIPRefresh if found, NULL otherwise. - * The ownership is not transferred. - * @internalComponent - */ - virtual CSIPRefresh* FindRefresh(TUint32 aRefreshId); - - /** - * @internalComponent - */ - virtual void DeletingRefresh(CSIPRefresh& aRefresh, TUint32 aRefreshId); - - protected: // Constructors, for internal use - - /* - * Constructor - */ - CSIPDialogAssocBase(); - - void ConstructL(RStringF aType, CSIPDialog& aDialog); - void ConstructL(RStringF aType, - CSIPDialog& aDialog, - CSIPServerTransaction& aTransaction); - - protected: // Data - - /** - * Implementation instance, CSIPDialogAssocBase owns it - * @internalComponent - */ - CSIPDialogAssocImplementation* iImplementation; - - private: // For testing purposes - - UNIT_TEST(CSIPInviteDialogAssoc_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siperr.h --- a/epoc32/include/siperr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siperr.h -* Part of : SIP Client API -* Interface : SDK, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef SIPERR_H -#define SIPERR_H - -#include - -/** @file -* @publishedAll -* @released -*/ - -/** SIP message was malformed */ -const TInt KErrSIPMalformedMessage = -17700; - -/** Invalid SIP response received from registrar*/ -const TInt KErrSIPInvalidRegistrarResponse = -17701; - -/** SIP Request pending */ -const TInt KErrSIPRequestPending = -17702; - -/** The action cannot be performed in the current transaction state */ -const TInt KErrSIPInvalidTransactionState = -17703; - -/** Not allowed in dialogs current state */ -const TInt KErrSIPInvalidDialogState = -17704; - -/** Invalid request in SIP dialog */ -const TInt KErrSIPInvalidDialogRequest = -17705; - -/** Invalid response in SIP dialog */ -const TInt KErrSIPInvalidDialogResponse = -17706; - -/** Sending a SIP message failed. For example ICMP error occured */ -const TInt KErrSIPTransportFailure = -17707; - -/** No ACK was received after sending a 2xx response */ -const TInt KErrSIPNoAckReceived = -17708; - -/** Not allowed in registration's current state */ -const TInt KErrSIPInvalidRegistrationState = -17709; - -/** The contact given did not contain user part */ -const TInt KErrSIPInvalidContact = -17710; - -/** Object can't access a resource, since that has been deleted by user. -The user is expected to delete this object as it can no longer be used. */ -const TInt KErrSIPResourceNotAvailable = -17711; - -/** DNS query for the remote address failed */ -const TInt KErrSIPResolvingFailure = -17712; - -/** Authentication with a server failed */ -const TInt KErrSIPForbidden = -17713; - -/** Maximum number of allowed SigComp compartments exceeded */ -const TInt KErrSIPMaxCompartmentsInUse = -17714; - -/** Refresh initiated client transaction was terminated with -a 3xx, 4xx, 5xx or 6xx response.*/ -const TInt KErrSIPTerminatedWithResponse = -17715; - -/** Provided SIP outbound proxy is not responding*/ -const TInt KErrSIPOutboundProxyNotResponding = -17716; - -/** The URI type is not allowed in some field of the particular SIP message. -Note that this does not mean that the URI type is forbidden in general. -For example Contact-header of an INVITE must always contain a SIP-URI. -Any other types are rejected with this error code. */ -const TInt KErrSIPInvalidURIType = -17717; - -/** ICMP error has occured */ -const TInt KErrSIPICMPFailure = -17718; - -#endif //SIPERR_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipeventheader.h --- a/epoc32/include/sipeventheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,195 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipeventheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPEVENTHEADER_H -#define CSIPEVENTHEADER_H - -// INCLUDES -#include -#include -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPEventHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in -* SIP "Event" header. -* -* @lib sipcodec.lib -*/ -class CSIPEventHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPEventHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Event"-header - * @return a new instance of CSIPEventHeader - */ - IMPORT_C static CSIPEventHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPEventHeader - * @param aEventPackage a Event-Package value - * @return a new instance of CSIPEventHeader - */ - IMPORT_C static CSIPEventHeader* NewL(const TDesC8& aEventPackage); - - /** - * Creates a new instance of CSIPEventHeader and puts it to CleanupStack - * @param aEventPackage a Event-Package value - * @return a new instance of CSIPEventHeader - */ - - IMPORT_C static CSIPEventHeader* NewLC(const TDesC8& aEventPackage); - - /** - * Destructor, deletes the resources of CSIPEventHeader. - */ - IMPORT_C ~CSIPEventHeader(); - - - public: // New functions - - /** - * Compares this instance to another CSIPEventHeader instance - * @param aHeader a header to compare to - * @return ETrue if the objects are equal otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPEventHeader& aHeader) const; - - /** - * Gets the Event-Package parameter from the "Event" header - * @return the Event-Package parameter - */ - IMPORT_C const TDesC8& EventPackage() const; - - /** - * Sets the Event-Package parameter in the "Event" header; - * @param aEventPackage a Event-Package parameter to set - */ - IMPORT_C void SetEventPackageL(const TDesC8& aEventPackage); - - /** - * Sets the event templates overwriting all the existing ones. - * @param aEventTemplates an array of event templates - */ - IMPORT_C void SetEventTemplatesL(const MDesC8Array& aEventTemplates); - - /** - * Gets the event templates. - * @return a reference to the currently set event templates. - */ - IMPORT_C const MDesC8Array& EventTemplates() const; - - /** - * Constructs an instance of a CSIPEventHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPEventHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPEventHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aEventPackage); - void ConstructL(const CSIPEventHeader& aSIPEventHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - void CheckTemplateL(const TDesC8& aParam) const; - // Needed for cleanup of a RPointerArray: - static void ResetAndDestroy(TAny* anArray); - - private: // Data - - HBufC8* iEventPackage; - CSIPEventHeaderParams* iParams; - CDesC8ArraySeg* iEventTemplates; - - private: // For testing purposes - - UNIT_TEST(CSIPEventHeaderTest) - }; - -#endif // CSIPEVENTHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipexpiresheader.h --- a/epoc32/include/sipexpiresheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipexpiresheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPEXPIRESHEADER_H -#define CSIPEXPIRESHEADER_H - -// INCLUDES -#include "sipunsignedintheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class encapsulates a "Expires" header value. -* -* @lib sipcodec.lib -*/ -class CSIPExpiresHeader : public CSIPUnsignedIntHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPExpiresHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Expires"-header (e.g. "3600") - * @return a new instance of CSIPExpiresHeader - */ - IMPORT_C static CSIPExpiresHeader* DecodeL(const TDesC8& aValue); - - /** - * Constructor - * @param aValue the value to set - */ - IMPORT_C CSIPExpiresHeader(TUint aValue); - - /** - * Destructor, deletes the resources of CSIPExpiresHeader. - */ - IMPORT_C ~CSIPExpiresHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPExpiresHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return an instance of a CSIPExpiresHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // For testing purposes - - UNIT_TEST(CSIPExpiresHeaderTest) - }; - -#endif // CSIPEXPIRESHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipextensionheader.h --- a/epoc32/include/sipextensionheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipextensionheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPEXTENSIONHEADER_H -#define CSIPEXTENSIONHEADER_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* The class stores unknown and extension headers that are either not -* supported by the current SIP codec implementation or not specified in -* current SIP RFC or both. -* -* @lib sipcodec.lib -*/ -class CSIPExtensionHeader : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Creates a new instance of CSIPExtensionHeader - * @param aName the full or compact name of the header - * @param aValue the value of the header - * @return a new instance of CSIPExtensionHeader - */ - IMPORT_C static CSIPExtensionHeader* - NewL(const TDesC8& aName, const TDesC8& aValue); - - /** - * Creates a new instance of CSIPExtensionHeader - * and puts it to CleanupStack - * @param aName the full or compact name of the header - * @param aValue the value of the header - * @return a new instance of CSIPExtensionHeader - */ - IMPORT_C static CSIPExtensionHeader* - NewLC(const TDesC8& aName, const TDesC8& aValue); - - /** - * Destructor, deletes the resources of CSIPExtensionHeader. - */ - IMPORT_C ~CSIPExtensionHeader(); - - - public: // New functions - - /** - * Sets the header value - * @param aValue the header value to be set - */ - IMPORT_C void SetValueL(const TDesC8& aValue); - - /** - * Gets the header value - * @return the header value - */ - IMPORT_C const TDesC8& Value() const; - - /** - * Constructs an instance of a CSIPExtensionHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return an instance of a CSIPExtensionHeader - */ - - IMPORT_C static CSIPExtensionHeader* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - /** - * From CSIPHeaderBase ExternalizeSupported - */ - IMPORT_C TBool ExternalizeSupported() const; - - - public: // New functions, for internal use - - void SetNameL(const TDesC8& aName); - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool IsExtensionHeader() const; - - /** - * @internalComponent - */ - TBool EncodeMultipleToOneLine() const; - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // Constructors - - CSIPExtensionHeader(); - void ConstructL(const TDesC8& aName, const TDesC8& aValue); - void ConstructL(const CSIPExtensionHeader& aExtensionHeader); - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // New functions - - TBool CheckValue (const TDesC8& aValue); - - private: // Data - - // data - RStringF iName; - HBufC8* iValue; - - private: // For testing purposes - - UNIT_TEST(CSIPExtensionHeaderTest) - UNIT_TEST(CSIPHeaderLookupTest) - }; - -#endif // CSIPEXTENSIONHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipfromheader.h --- a/epoc32/include/sipfromheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,139 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipfromheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPFROMHEADER_H -#define CSIPFROMHEADER_H - -// INCLUDES -#include "sipfromtoheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "From" header. -* -* @lib sipcodec.lib -*/ -class CSIPFromHeader : public CSIPFromToHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPFromHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "From"-header (e.g. "...") - * @return a new instance of CSIPFromHeader - */ - IMPORT_C static CSIPFromHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPFromHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred. - * @return a new instance of CSIPFromHeader - */ - IMPORT_C static CSIPFromHeader* NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPFromHeader and puts it to CleanupStack - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred, - * @return a new instance of CSIPFromHeader - */ - IMPORT_C static CSIPFromHeader* NewLC(CSIPAddress* aSIPAddress); - - /** - * Creates a deep-copy of a CSIPFromToHeaderBase - * Note that this function can be used for creating a From-header - * using an existing To-header. - * @param aHeader CSIPFromToHeaderBase to be copied - * @return a new instance of CSIPFromHeader - */ - IMPORT_C static CSIPFromHeader* - NewL(const CSIPFromToHeaderBase& aHeader); - - /** - * Creates a deep-copy of a CSIPFromToHeaderBase and - * puts it to CleanupStack - * Note that this function can be used for creating a From-header - * using an existing To-header. - * @param aHeader CSIPFromToHeaderBase to be copied - * @return a new instance of CSIPFromHeader - */ - IMPORT_C static CSIPFromHeader* - NewLC(const CSIPFromToHeaderBase& aHeader); - - /** - * Destructor, deletes the resources of CSIPFromHeader. - */ - IMPORT_C ~CSIPFromHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPFromHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPFromHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - RStringF CompactName() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPFromHeader(); - }; - -#endif // CSIPFROMHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipfromtoheaderbase.h --- a/epoc32/include/sipfromtoheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,135 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipfromtoheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPFROMTOHEADERBASE_H -#define CSIPFROMTOHEADERBASE_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPFromToHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP "From" -* and "To" header. -* -* This is an abstract class and cannot be instantiated. -* -* @lib sipcodec.lib -*/ -class CSIPFromToHeaderBase : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPFromToHeaderBase. - */ - IMPORT_C virtual ~CSIPFromToHeaderBase(); - - - public: // New functions - - /** - * Compares this instance to another "From" or "To" header object - * @param aHeader a header to compare to - * @return ETrue, if the objects are equal otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPFromToHeaderBase& aHeader) const; - - /** - * Sets the name-address - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address to set, the ownership is transferred - */ - IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); - - /** - * Gets the name-address as const - * @return name-address object - */ - IMPORT_C const CSIPAddress& SIPAddress() const; - - /** - * Gets the name-address - * @return name-address object - */ - IMPORT_C CSIPAddress& SIPAddress(); - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - protected: // Constructors - - CSIPFromToHeaderBase(); - void ConstructL(); - void ConstructL(CSIPAddress* aSIPAddress); - void ConstructL(CSIPAddress* aSIPAddress, const TDesC8& aTag); - void ConstructL(const CSIPFromToHeaderBase& aSIPFromToHeaderBase); - - protected: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Data - - CSIPAddress* iSIPAddress; - CSIPFromToHeaderParams* iParams; - -private: // For testing purposes - - UNIT_TEST(CSIPFromToHeaderTest) - }; - - -#endif // CSIPFROMTOHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipheaderbase.h --- a/epoc32/include/sipheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,193 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPHEADERBASE_H -#define CSIPHEADERBASE_H - -// INCLUDES -#include -#include -#include -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides a generic interface for all the SIP headers. -* -* @lib sipcodec.lib -*/ -class CSIPHeaderBase : public CBase - { - public: // Constructors and destructors - - /** - * Destructor, deletes the resources of CSIPHeaderBase. - */ - IMPORT_C virtual ~CSIPHeaderBase(); - - - public: // New functions - - /** - * Creates a deep-copy of this CSIPHeaderBase object. - * The function has to be implemented in each of the sub-classes. - * @return the deep-copied object, the ownership is transferred. - */ - IMPORT_C virtual CSIPHeaderBase* CloneL() const = 0; - - /** - * Gets the full name of the header - * The function is implemented in each of the sub-classes. - * @return the full name of the header for example "From" - */ - IMPORT_C virtual RStringF Name() const = 0; - - /** - * Encodes the header (name and value) into its textual representation. - * @return a textual representation of the complete header, - * the ownership is transferred - */ - IMPORT_C HBufC8* ToTextL() const; - - /** - * Encodes the header (name and value) into its textual representation - * and pushes it to the CleanupStack. - * @return a textual representation of the complete header, - * the ownership is transferred - */ - IMPORT_C HBufC8* ToTextLC() const; - - /** - * Encodes the header's value into its textual representation. - * @return a textual representation of the header's value, - * the ownership is transferred - */ - IMPORT_C virtual HBufC8* ToTextValueL() const = 0; - - /** - * Encodes the header's value into its textual representation - * and pushes it to the CleanupStack. - * @return a textual representation of the header's value, - * the ownership is transferred - */ - IMPORT_C HBufC8* ToTextValueLC() const; - - /** - * Writes the object to a RWriteStream - * @param aWriteStream a stream where the object is to be externalized - * @param aAddName if ETrue the name of the header is - * also written to the stream - */ - IMPORT_C void ExternalizeL(RWriteStream& aWriteStream, - TBool aAddName=ETrue) const; - - /** - * Checks, if the header supports serialization. - * In practice all the headers part of the API support it. - * @return ETrue, if the header supports serialization, - * otherwise EFalse - */ - IMPORT_C virtual TBool ExternalizeSupported() const; - - /** - * Can be used when a RPointerArray needs to be pushed - * to the CleanupStack for ResetAndDestroy. - * @param aArray an array of CSIPHeaderBase pointers, - * the ownership of the array is transferred - */ - IMPORT_C static void PushLC(RPointerArray* aArray); - - - public: // For internal use - - /** - * @internalComponent - */ - enum TPreferredPlace - { - ETop, - EMiddleTop, - EMiddle, - EMiddleBottom, - EBottom - }; - - /** - * @internalComponent - */ - TSglQueLink iLink; - - /** - * @internalComponent - */ - virtual TBool EncodeMultipleToOneLine() const; - - /** - * @internalComponent - */ - virtual TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - virtual TBool IsExtensionHeader() const; - - /** - * @internalComponent - */ - virtual TBool HasCompactName() const; - - /** - * @internalComponent - */ - virtual RStringF CompactName() const; - - /** - * @internalComponent - */ - virtual TPreferredPlace PreferredPlaceInMessage() const = 0; - - protected: // Constructors - - CSIPHeaderBase(); - - protected: // New functions - - void ExternalizeNameL(RWriteStream& aWriteStream) const; - - /** - * @internalComponent - */ - virtual void ExternalizeValueL(RWriteStream& aWriteStream) const; - - // Needed for cleanup of a RPointerArray: - static void ResetAndDestroy(TAny* anArray); - }; - -#endif // CSIPHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siphlerr.h --- a/epoc32/include/siphlerr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SIP High Level Error Definition file -// -// - - - -/** - @file - @publishedAll - @released -*/ - - -#ifndef SIPHLERR_H -#define SIPHLERR_H - -/** Returned on sip error messages i.e, for all the responses between 3XX to 6XX which are not specifically handled by SIP Stack.*/ -const TInt KErrSIPErrorResponse = -18101; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siphttpdigest.h --- a/epoc32/include/siphttpdigest.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,312 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siphttpdigest.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 2.0 -* -*/ - - - -#ifndef CSIPHTTPDIGEST_H -#define CSIPHTTPDIGEST_H - -// INCLUDES -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIP; -class MSIPHttpDigestChallengeObserver; -class MSIPHttpDigestChallengeObserver2; -class CSIPClientTransaction; -class CSIPRefresh; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP HTTP Digest security settings. -* Class provides functions for setting/removing -* HTTP Digest security mechanism related parameters. -* If the user does not use the class for the providing credentials for the -* received challenges, an error will be returned to the original request in -* case it was challenged. -* -* Note that the user will be asked to provide credentials one realm -* at the time. -* -* @lib sipclient.lib -*/ -class CSIPHttpDigest : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aSIP a handle to SIP server - * @param aObserver an observer for the received challenges - * @return New object, ownership is transferred. - */ - IMPORT_C static CSIPHttpDigest* - NewL(CSIP& aSIP, - MSIPHttpDigestChallengeObserver& aObserver); - - /** - * Two-phased constructor. - * @param aSIP a handle to SIP server - * @param aObserver an observer for the received challenges - * @return New object, ownership is transferred. - */ - IMPORT_C static CSIPHttpDigest* - NewLC(CSIP& aSIP, - MSIPHttpDigestChallengeObserver& aObserver); - - /** - * Two-phased constructor. - * @param aSIP a handle to SIP server - * @param aObserver2 an observer for the received challenges - * @return New object, ownership is transferred. - */ - IMPORT_C static CSIPHttpDigest* - NewL(CSIP& aSIP, - MSIPHttpDigestChallengeObserver2& aObserver2); - - /** - * Two-phased constructor. - * @param aSIP a handle to SIP server - * @param aObserver2 an observer for the received challenges - * @return New object, ownership is transferred. - */ - IMPORT_C static CSIPHttpDigest* - NewLC(CSIP& aSIP, - MSIPHttpDigestChallengeObserver2& aObserver2); - - IMPORT_C ~CSIPHttpDigest(); - - public: // New functions - - /** - * Sets credentials for the realm of the outbound proxy. - * Must be used in case the realm is the realm of the outbound proxy and - * the request for credentials was received from callback - * MSIPHttpDigestChallengeObserver::ChallengeReceived. - * The user can set credentials only upon request from the - * SIP implementation. - * @pre aOutboundProxy, aRealm, aUsername and aPasswd must not be empty - * descriptors. - * @param aOutboundProxy an outbound proxy (FQDN or IP address) - * @param aRealm servers's realm - * @param aUsername user's name - * @param aPasswd user's password for the given server's realm - * @leave KErrNoMemory if out of memory - * @leave KErrArgument if some of the parameters is an empty descriptor - * @leave KErrSIPResourceNotAvailable if a required object has been - * deleted - */ - IMPORT_C void SetCredentialsL(const TDesC8& aOutboundProxy, - const TDesC8& aRealm, - const TDesC8& aUsername, - const TDesC8& aPasswd); - /** - * Sets parameters for the realm. - * Should be used in case the realm is not a realm of an outbound proxy - * and the request for credentials was received from callback - * MSIPHttpDigestChallengeObserver::ChallengeReceived. - * The user can set credentials only upon request from the - * SIP implementation. - * @pre aRealm, aUsername and aPasswd must not be empty descriptors. - * @param aRealm servers's realm - * @param aUsername user's name - * @param aPasswd user's password for the given server's realm - * @leave KErrNoMemory if out of memory - * @leave KErrArgument if some of the parameters is an empty descriptor - * @leave KErrSIPResourceNotAvailable if a required object has been - * deleted - */ - IMPORT_C void SetCredentialsL(const TDesC8& aRealm, - const TDesC8& aUsername, - const TDesC8& aPasswd); - - /** - * Sets credentials for the realm for the specific transaction. - * Must be used when the request for credentials was received - * from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with - * CSIPClientTransaction as the parameter. - * @pre aRealm, aUsername and aPasswd must not be empty descriptors. - * @param aTransaction the transaction that was passed as a parameter - * to MSIPHttpDigestChallengeObserver2::ChallengeReceived - * @param aOutboundProxy an outbound proxy (FQDN or IP address) if - * the challenge received had Proxy-Authenticate-header(s). - * Otherwise KNullDesC8 should passed. - * @param aRealm servers's realm - * @param aUsername user's name - * @param aPasswd user's password for the given server's realm - * @leave KErrNoMemory if out of memory - * @leave KErrArgument if some of the parameters is an empty descriptor - * @leave KErrSIPResourceNotAvailable if a required object has been - * deleted - */ - IMPORT_C void SetCredentialsL(const CSIPClientTransaction& aTransaction, - const TDesC8& aOutboundProxy, - const TDesC8& aRealm, - const TDesC8& aUsername, - const TDesC8& aPasswd); - - /** - * Sets credentials for the realm for the specific refresh. - * Must be used when the request for credentials was received - * from callback MSIPHttpDigestChallengeObserver2::ChallengeReceived with - * CSIPRefresh as the parameter. - * @pre aRealm, aUsername and aPasswd must not be empty descriptors. - * @param aRefresh the refresh that was passed as a parameter - * to MSIPHttpDigestChallengeObserver2::ChallengeReceived - * @param aOutboundProxy an outbound proxy (FQDN or IP address) if - * the challenge received had Proxy-Authenticate-header(s). - * Otherwise KNullDesC8 should passed. - * @param aRealm servers's realm - * @param aUsername user's name - * @param aPasswd user's password for the given server's realm - * @leave KErrNoMemory if out of memory - * @leave KErrArgument if some of the parameters is an empty descriptor - * @leave KErrSIPResourceNotAvailable if a required object has been - * deleted - */ - IMPORT_C void SetCredentialsL(const CSIPRefresh& aRefresh, - const TDesC8& aOutboundProxy, - const TDesC8& aRealm, - const TDesC8& aUsername, - const TDesC8& aPasswd); - - /** - * Removes all set credentials for the realm. - * Must not be used if the user implements - * MSIPHttpDigestChallengeObserver2. - * @pre aRealm must not be an empty descriptor - * @param aRealm servers's realm - * @return KErrNone if no error - * KErrArgument if aRealm is an empty descriptor - * KErrNoMemory if out of memory - * KErrNotFound if the given realm was not found - */ - IMPORT_C TInt RemoveCredentials(const TDesC8& aRealm); - - /** - * Removes all set credentials by the user. - * Must not be used if the user implements - * MSIPHttpDigestChallengeObserver2. - * @return KErrNone if succesful; KErrNoMemory if out of memory - */ - IMPORT_C TInt RemoveCredentials(); - - /** - * Sets the observer to listen for the possible received challenges. - * Replaces the existing MSIPHttpDigestChallengeObserver or - * MSIPHttpDigestChallengeObserver2. - * @param aObserver an observer for the received challenges. - */ - IMPORT_C void SetObserver(MSIPHttpDigestChallengeObserver& aObserver); - - /** - * Sets the observer to listen for the possible received challenges. - * Replaces the existing MSIPHttpDigestChallengeObserver or - * MSIPHttpDigestChallengeObserver2. - * @param aObserver an observer for the received challenges. - */ - IMPORT_C void SetObserver(MSIPHttpDigestChallengeObserver2& aObserver); - - /** - * Ignores the challenge for the realm. As a result the error will be - * generated to the original SIP request. - * @pre aRealm must not be an empty descriptor - * @param aRealm a realm for which the challenge was ignored - * @return KErrNone if no error - * KErrNotFound if the given realm was not found - * KErrArgument if aRealm is an empty descriptor - */ - IMPORT_C TInt IgnoreChallenge(const TDesC8& aRealm); - - /** - * Ignores the challenge for the realm for the specific transaction. - * As a result KErrForbidden will be generated - * to the original SIP request. - * @pre aRealm must not be an empty descriptor - * @param aTransaction the transaction that was passed as a parameter - * to MSIPHttpDigestChallengeObserver2::ChallengeReceived - * @param aRealm a realm for which the challenge was ignored - * @return KErrNone if no error - * KErrNotFound if the given realm was not found - * KErrArgument if aRealm is an empty descriptor - */ - IMPORT_C TInt IgnoreChallenge(const CSIPClientTransaction& aTransaction, - const TDesC8& aRealm); - - /** - * Ignores the challenge for the realm for the specific refresh. - * As a result the error will be generated - * to the original SIP request. - * @pre aRealm must not be an empty descriptor - * @param aRefresh the refresh that was passed as a parameter - * to MSIPHttpDigestChallengeObserver2::ChallengeReceived - * @param aRealm a realm for which the challenge was ignored - * @return KErrNone if no error - * KErrNotFound if the given realm was not found - * KErrArgument if aRealm is an empty descriptor - */ - IMPORT_C TInt IgnoreChallenge(const CSIPRefresh& aRefresh, - const TDesC8& aRealm); - - public: // New functions, for internal use - - void CSIPDeleted(); - - private: // Constructors - - CSIPHttpDigest(CSIP& aSIP); - CSIPHttpDigest(const CSIPHttpDigest& aHttpDigest); - CSIPHttpDigest& operator=(const CSIPHttpDigest& aHttpDigest); - - void ConstructL(MSIPHttpDigestChallengeObserver& aObserver); - - void ConstructL(MSIPHttpDigestChallengeObserver2& aObserver2); - - private: // New functions - - TInt RemoveCredentialParams(const TDesC8& aRealm) const; - - void SetCredentialParamsL(TUint32 aRequestId, - TUint32 aRefreshId, - const TDesC8& aOutboundProxy, - const TDesC8& aRealm, - const TDesC8& aUsername, - const TDesC8& aPasswd) const; - - TInt IgnoreChallenge(TUint32 aRequestId, - TUint32 aRefreshId, - const TDesC8& aRealm); - - private: // Data - - CSIP* iSIP; - - private: // For testing purposes - - UNIT_TEST(CSIP_Test) - }; - -#endif // CSIPHTTPDIGEST_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siphttpdigestchallengeobserver.h --- a/epoc32/include/siphttpdigestchallengeobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siphttpdigestchallengeobserver.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef MSIPHTTPDIGESTCHALLENGEOBSERVER_H -#define MSIPHTTPDIGESTCHALLENGEOBSERVER_H - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* The user must implement this interface if it intends to -* provide HTTP Digest credentials upon received challenges -* from the SIP servers on the signaling path. -* The user should provide credentials or ignore the challenge -* using functions defined in TSIPHttpDigest class. -* -* @lib n/a -*/ -class MSIPHttpDigestChallengeObserver - { - public: // New functions - /** - * SIP request resulted in 401/407 response that contains - * a challenge. - * - * @param aRealm a realm for which the challenge was received - */ - virtual void ChallengeReceived(const TDesC8& aRealm) = 0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siphttpdigestchallengeobserver2.h --- a/epoc32/include/siphttpdigestchallengeobserver2.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,81 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siphttpdigestchallengeobserver2.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef MSIPHTTPDIGESTCHALLENGEOBSERVER2_H -#define MSIPHTTPDIGESTCHALLENGEOBSERVER2_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CSIPClientTransaction; -class CSIPRefresh; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* The user should implement this interface if it intends to -* provide HTTP Digest credentials upon received challenges -* from the SIP servers on the signaling path. -* The user should provide credentials or ignore the challenge -* using functions defined in CSIPHttpDigest class. -* -* @lib n/a -*/ -class MSIPHttpDigestChallengeObserver2 - { - public: // New functions - /** - * A SIP request resulted in 401/407 response that contains - * 1..n challenges. - * The challenges can be obtained from Proxy-Authenticate- and/or - * WWW-Authenticate-headers in the CSIPResponseElements - * attached to the CSIPClientTransaction. - * The user must call CSIPHttpDigest::SetCredentialsL or - * CSIPHttpDigest::IgnoreChallenge for each challenge. - * - * @param aTransaction transaction which was completed with - * a response containing HTTP Digest challenge. - */ - virtual void ChallengeReceived( - const CSIPClientTransaction& aTransaction) = 0; - - /** - * A refreshed SIP request resulted in 401/407 response that contains - * 1..n challenges. - * The challenges can be obtained from Proxy-Authenticate- and/or - * WWW-Authenticate-headers in the CSIPResponseElements - * attached to the CSIPClientTransaction attached to the CSIPRefresh. - * The user must call CSIPHttpDigest::SetCredentialsL or - * CSIPHttpDigest::IgnoreChallenge for each challenge. - * - * @param aRefresh the refresh for which a transaction completed with - * a response containing HTTP Digest challenge. - */ - virtual void ChallengeReceived( - const CSIPRefresh& aRefresh) = 0; - }; - -#endif // MSIPHTTPDIGESTCHALLENGEOBSERVER2_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipinvitedialogassoc.h --- a/epoc32/include/sipinvitedialogassoc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,423 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipinvitedialogassoc.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - - -#ifndef CSIPINVITEDIALOGASSOC_H -#define CSIPINVITEDIALOGASSOC_H - -// INCLUDES -#include "sipdialogassocbase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class CUri8; -class CSIPConnection; -class CSIPServerTransaction; -class CSIPFromHeader; -class CSIPToHeader; -class CSIPContactHeader; -class MSIPRegistrationContext; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP dialog association created with INVITE. -* It provides services for creating, using and -* terminating SIP INVITE dialog association. -* -* The user can have only one INVITE dialog association per dialog. -* -* @lib sipclient.lib -*/ -class CSIPInviteDialogAssoc : public CSIPDialogAssocBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aDialog a dialog to be associated with - * @return New object, ownership is transferred. - */ - IMPORT_C static CSIPInviteDialogAssoc* NewL(CSIPDialog& aDialog); - - /** - * Two-phased constructor. - * @param aDialog a dialog to be associated with - * @return New object, ownership is transferred. - */ - IMPORT_C static CSIPInviteDialogAssoc* NewLC(CSIPDialog& aDialog); - - /** - * Two-phased constructor. - * Should be used if response to the received SIP request will create - * a SIP dialog association. - * The server transaction must be a INVITE transaction. - * If SIP server transaction was received within an existing SIP dialog - * the created SIP dialog association will be correlated to that SIP - * dialog. Otherwise a new SIP dialog is created. - * @pre aTransaction.State() == CSIPTransactionBase::EProceeding - * @pre aTransaction.Type() == SipStrConsts::EInvite - * @param aTransaction a SIP server transaction - * @return New object, ownership is transferred. - * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite - * @leave KErrSIPInvalidTransactionState if aTransaction.State() != - * CSIPTransactionBase::EProceeding - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewL(CSIPServerTransaction& aTransaction); - - /** - * Two-phased constructor. - * Should be used if response to the received SIP request will create a - * SIP dialog association. - * The server transaction must be a INVITE transaction. - * If SIP server transaction was received within the existing SIP dialog - * the created SIP dialog association will be correlated to that - * SIP dialog. Otherwise a new SIP dialog is created. - * @pre aTransaction.State() == CSIPTransactionBase::EProceeding - * @pre aTransaction.Type() == SipStrConsts::EInvite - * @param aTransaction a SIP server transaction - * @return New object, ownership is transferred. - * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite - * @leave KErrSIPInvalidTransactionState if aTransaction.State() != - * CSIPTransactionBase::EProceeding - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewLC(CSIPServerTransaction& aTransaction); - - /** - * Two-phased constructor. - * Should be used if response to the received SIP request will create - * a SIP dialog association. - * The server transaction must be a INVITE transaction. - * If SIP server transaction was received within an existing SIP dialog - * the created SIP dialog association will be correlated to that SIP - * dialog. Otherwise a new SIP dialog is created. - * @pre aTransaction.State() == CSIPTransactionBase::EProceeding - * @pre aTransaction.Type() == SipStrConsts::EInvite - * @pre aContext.IsContextActive() == ETrue - * @param aTransaction a SIP server transaction - * @param aContext that will be used for populating - * the Contact-header of the response to aTransaction - * @return New object, ownership is transferred. - * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite - * @leave KErrSIPInvalidTransactionState if aTransaction.State() != - * CSIPTransactionBase::EProceeding - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewL(CSIPServerTransaction& aTransaction, - const MSIPRegistrationContext& aContext); - - /** - * Two-phased constructor. - * Should be used if response to the received SIP request will create a - * SIP dialog association. - * The server transaction must be a INVITE transaction. - * If SIP server transaction was received within the existing SIP dialog - * the created SIP dialog association will be correlated to that - * SIP dialog. Otherwise a new SIP dialog is created. - * @pre aTransaction.State() == CSIPTransactionBase::EProceeding - * @pre aTransaction.Type() == SipStrConsts::EInvite - * @pre aContext.IsContextActive() == ETrue - * @param aTransaction a SIP server transaction - * @param aContext that will be used for populating - * the Contact-header of the response to aTransaction - * @return New object, ownership is transferred. - * @leave KErrArgument if aTransaction.Type() != SipStrConsts::EInvite - * @leave KErrSIPInvalidTransactionState if aTransaction.State() != - * CSIPTransactionBase::EProceeding - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewLC(CSIPServerTransaction& aTransaction, - const MSIPRegistrationContext& aContext); - - /** - * Two-phased constructor - * @pre aFrom != 0 - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @param aConnection a SIP connection to be used with - * dialog association - * @param aFrom originator's address; the ownership is transfered - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is addressed to. The ownership is transferred. - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object, ownership is transferred. - * @leave KErrArgument if aFrom == 0 or aRemoteUri == 0 - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewL(CSIPConnection& aConnection, - CSIPFromHeader* aFrom, - CUri8* aRemoteUri, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aFrom != 0 - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @param aSIPConnection a SIP connection to be used with - * dialog association - * @param aFrom originator's address; the ownership is transfered - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is addressed to. The ownership is transferred. - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object, ownership is transferred. - * @leave KErrArgument if aFrom == 0 or aRemoteUri == 0 - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewLC(CSIPConnection& aConnection, - CSIPFromHeader* aFrom, - CUri8* aRemoteUri, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @pre aContext.IsContextActive() == ETrue - * @param aConnection a SIP connection to be used with - * dialog association - * @param aRemoteUri a remote target URI that identifies a resource - * that the request is targeted to. The ownership is transferred. - * @param aContext used for selecting outbound - * proxy and originator's address (AOR) and contact - * @param aFrom originator's address. If not defined it will - * constructed using registration context (User's AOR); - * the ownership is transfered - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object, ownership is transferred. - * @leave KErrArgument if aRemoteUri == 0 - * @leave KErrSIPInvalidRegistrationState - * if aContext.IsContextActive() == EFalse - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewL(CSIPConnection& aConnection, - CUri8* aRemoteUri, - const MSIPRegistrationContext& aContext, - CSIPFromHeader* aFrom=0, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @pre aContext.IsContextActive() == ETrue - * @param aConnection a SIP connection to be used with - * dialog association - * @param aRemoteUri a remote target URI that identifies a resource - * that the request is targeted to. The ownership is transferred. - * @param aContext used for selecting outbound - * proxy and originator's address (AOR) and contact - * @param aFrom originator's address. If not defined it will - * constructed using registration context (User's AOR); - * the ownership is transfered - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object, ownership is transferred. - * @leave KErrArgument if aRemoteUri == 0 - * @leave KErrSIPInvalidRegistrationState - * if aContext.IsContextActive() == EFalse - */ - IMPORT_C static CSIPInviteDialogAssoc* - NewLC(CSIPConnection& aConnection, - CUri8* aRemoteUri, - const MSIPRegistrationContext& aContext, - CSIPFromHeader* aFrom=0, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Destructor - */ - IMPORT_C ~CSIPInviteDialogAssoc(); - - public: // New functions - - /** - * Creates INVITE and sends it to the remote target. - * 101-199 or 2xx response will create INVITE dialog association in case - * of first INVITE within this dialog association. Subsequent INVITE - * requests are re-INVITEs. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EInit || - * Dialog().State()==CSIPDialog::EConfirmed - * @param aElements contains user SIP headers and content. Ownership is - * transferred. - * @return INVITE SIP transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if dialog is not in a correct state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendInviteL(CSIPMessageElements* aElements=0); - - /** - * Creates PRACK and sends it to the remote target. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EEarly || - * Dialog().State()==CSIPDialog::EConfirmed - * @pre aElements must not contain Contact headers - * @param aElements contains user SIP headers and content. Ownership is - * transferred. - * @return PRACK SIP transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if dialog is not in a correct state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendPrackL(CSIPMessageElements* aElements=0); - - /** - * Creates UPDATE and sends it to the remote target. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EEarly || - * Dialog().State()==CSIPDialog::EConfirmed - * @param aElements contains user SIP headers and content. Ownership is - * transferred. - * @return UPDATE SIP transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if dialog is not in a correct state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendUpdateL(CSIPMessageElements* aElements=0); - - /** - * Creates SIP ACK request and sends it to the remote target. - * The client transaction must be an INVITE transaction. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EConfirmed - * @param aTransaction a SIP INVITE client transaction to acknowledge - * @param aElements optional SIP message headers and body. Ownership is - * transferred. - * @leave KErrArgument if aTransaction is not an INVITE transaction. - * @leave KErrSIPInvalidDialogState if ACK can't be sent in the current - * dialog state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C void SendAckL(const CSIPClientTransaction& aTransaction, - CSIPMessageElements* aElements=0); - - /** - * Creates SIP BYE request and sends it to the remote target. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EEarly || - * Dialog().State()==CSIPDialog::EConfirmed - * @param aElements contains user SIP headers and content. Ownership is - * transferred. - * @return SIP BYE transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if BYE can't be sent in the current - * dialog state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendByeL(CSIPMessageElements* aElements=0); - - public: // New functions, for internal use - - /** - * Sends initial INVITE creating a dialog and creates a transaction for - * it. - * @param aElements contains user SIP headers and content. Ownership is - * transferred. - * @return INVITE SIP transaction. Ownership is transferred. - */ - CSIPClientTransaction* DoSendInviteL(CSIPMessageElements* aElements); - - /** - * Sends ACK - * @param aTransaction a SIP INVITE client transaction to acknowledge - * @param aElements optional SIP message headers and body. Ownership is - * transferred. - */ - void DoSendAckL(const CSIPClientTransaction& aTransaction, - CSIPMessageElements* aElements); - - CSIPClientTransaction* - DoSendRequestWithinDialogL(RStringF aMethod, - CSIPMessageElements* aElements); - - CSIPClientTransaction* DoSendCancelL(TUint32 aRequestId); - - private: // Constructors - - static CSIPInviteDialogAssoc* NewLC(CSIPConnection& aConnection, - CUri8* aRemoteUri, - CSIPFromHeader* aFrom, - CSIPToHeader* aTo, - CSIPContactHeader* aContact, - const MSIPRegistrationContext* aContext); - - CSIPInviteDialogAssoc(); - - void ConstructL(CSIPServerTransaction& aTransaction, - const MSIPRegistrationContext* aContext); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipmanagedprofile.h --- a/epoc32/include/sipmanagedprofile.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,226 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipmanagedprofile.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The class providing profile management of SIP service provider -* Version : 1.0 -* -*/ - - - -#ifndef CSIPMANAGEDPROFILE_H -#define CSIPMANAGEDPROFILE_H - -// INCLUDES - -#include -#include -#include - -#include "sipprofile.h" - -//CONSTANTS - -/** SIP Provider Name which value is type of TDesC8. -* Note that this parameter can only be retrieved -* if it has been explicitly configured */ -const TUint32 KSIPPrivateIdentity = 500; - -/** SIP HTTP Digest password which value is type of TDesC8. -* Note that this parameter cannot be retrieved */ -const TUint32 KSIPDigestPassword = 501; - -/** -* SIP headers to be added to outgoing SIP requests generated -* by SIP Profile Agent. The value is of type MDesC8Array. -* Each array element represents a complete SIP header (name and value). */ -const TUint32 KSIPHeaders = 502; - -/** -* Setting for enabling/disabling IMS registration with certain types of -* smart card applications. The value is of type TUint32. -* If no value for this setting is configured, registration is allowed -* with all types of smart card applications (SIM/USIM/ISIM). -* If the value is configured, the following values are possible: -* 1: Registration is allowed only when USIM or ISIM is present. -* 2: Registration is allowed only when ISIM present */ -const TUint32 KSIPAllowIMSRegistration = 503; - -/** -* Setting for enabling/disabling editing the profile after its creation. -* Serves as an indication for the clients that the profile -* update and deletion operations are restricted. -* The SIP Profile Agent implementation does not understand -* the semantics of the parameter. -* The value is of type TBool. */ -const TUint32 KSIPProfileLocked = 504; - -/** -* Defines how autoregistration profile behaves on home network/roaming -* situations. If value is ETrue, automatic registration is not allowed -* while roaming. -* The value is of type TBool. */ -const TUint32 KSIPAllowAutoRegistrationOnlyOnHomeNetwork = 505; - -// FORWARD DECLARATIONS - -class CSIPManagedProfileRegistry; - - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class contains profile information of particular SIP service -* provider. Class provides functions for setting and -* getting profile parameters. -* -* @lib sipprofilecli.lib -*/ -class CSIPManagedProfile: public CSIPProfile - { - public: // Constructors and destructor - /** - * Destructor. - */ - IMPORT_C ~CSIPManagedProfile(); - - public: // New functions - /** - * Sets profile type information; - * @param aSIPProfileTypeInfo profile type information - */ - IMPORT_C void SetType(const TSIPProfileTypeInfo& aSIPProfileTypeInfo); - - /** - * Sets profile parameter - * @param aParam a parameter to set; zero-length descriptor resets the value - * @param aVal a value to set - * @return KErrNotFound if parameter was not found, - * KErrNoMemory if out of memory; - * KErrNone otherwise - */ - IMPORT_C TInt SetParameter(TUint32 aParam, const TDesC8& aVal); - - /** - * Sets profile parameter - * @param aParam a parameter to set - * @param aVal a value to set - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt SetParameter(TUint32 aParam, TUint32 aVal); - - /** - * Sets profile parameter - * @param aParam a parameter to set - * @param aVal a value to set - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt SetParameter(TUint32 aParam, TBool aVal); - - /** - * Sets profile parameter - * @param aParam a parameter to set - * @param aVal values to set; an empty array resets the value - * @return KErrNotFound if parameter was not found, - * KErrNoMemory if out of memory - * KErrNone otherwise - */ - IMPORT_C TInt SetParameter(TUint32 aParam, const MDesC8Array& aVal); - - /** - * Sets profile parameter that is defined for a particular SIP server - * @param aServerType a SIP server type - * @param aParam a parameter to set - * @param aVal a value to set; zero-length descriptor resets the value - * @return KErrNotFound if parameter was not found, - * KErrNoMemory if out of memory; - * KErrNone otherwise - */ - IMPORT_C TInt SetParameter(TUint32 aServerType, TUint32 aParam, const TDesC8& aVal); - - /** - * Creates deep copy of the object - * @return deep copied instance - * @leave KErrNoMemory if out of memory - */ - IMPORT_C CSIPManagedProfile* CloneL() const; - - public: - /** - * Two-phased constructor. - * @param aSIPRegistry a SIP profile client providing connection to SIP - * profile server. - */ - static CSIPManagedProfile* NewL(CSIPManagedProfileRegistry* aSIPRegistry); - - /** - * Two-phased constructor. - * @param aSIPRegistry a SIP profile client providing connection to SIP - * profile server. - * Constructs an object and adds the pointer to the cleanup stack; - */ - static CSIPManagedProfile* NewLC(CSIPManagedProfileRegistry* aSIPRegistry); - - private: - - /** - * Constructor. - */ - CSIPManagedProfile(CSIPManagedProfileRegistry* aSIPRegistry); - - /** - * Sets profile parameter - * @param aParam a parameter to set; zero-length descriptor resets the value - * @param aVal a value to set - */ - void SetParameterL(TUint32 aParam, const TDesC8& aVal); - - /** - * Sets profile parameter - * @param aParam a parameter to set - * @param aVal a value to set - */ - void SetParameterL(TUint32 aParam, TUint32 aVal); - - /** - * Sets profile parameter - * @param aParam a parameter to set - * @param aVal a value to set - */ - void SetParameterL(TUint32 aParam, TBool aVal); - - /** - * Sets profile parameter that is defined for a particular SIP server - * @param aServerType a SIP server type - * @param aParam a parameter to set - * @param aVal a value to set; zero-length descriptor resets the value - */ - void SetParameterL(TUint32 aServerType, - TUint32 aParam, const TDesC8& aVal); - - /** - * Sets profile parameter - * @param aParam a parameter to set - * @param aVal values to set; an empty array resets the value - */ - IMPORT_C void SetParameterL(TUint32 aParam, const MDesC8Array& aVal); - }; - -#endif // CSIPMANAGEDPROFILE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipmanagedprofileregistry.h --- a/epoc32/include/sipmanagedprofileregistry.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipmanagedprofileregistry.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The class for managing SIP profiles -* Version : 1.0 -* -*/ - - - -#ifndef CSIPMANAGEDPROFILEREGISTRY_H -#define CSIPMANAGEDPROFILEREGISTRY_H - -// INCLUDES -#include -#include -#include "sipprofileregistrybase.h" - -// FORWARD DECLARATIONS -class CSIPProfile; -class CSIPManagedProfile; -class MSIPProfileRegistryObserver; - - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* The class for managing SIP profiles. -* This class provides the functions for -* adding/updating/removing profiles. -* -* @lib sipprofilecli.lib -*/ -class CSIPManagedProfileRegistry: public CSIPProfileRegistryBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * @param aObserver a observer for SIP profile change events. - */ - IMPORT_C static CSIPManagedProfileRegistry* NewL( - MSIPProfileRegistryObserver& aObserver); - - /** - * Two-phased constructor. - * Constructs an object and adds the pointer to the cleanup stack; - * @param aObserver a observer for SIP profile change events. - */ - IMPORT_C static CSIPManagedProfileRegistry* NewLC( - MSIPProfileRegistryObserver& aObserver); - - /** - * Destructor - */ - IMPORT_C ~CSIPManagedProfileRegistry(); - public: //new functions - - /** - * Instantiates new profile with default values - * for given type. - * @param aType a SIP profile type to be created - * @return pre-filled instance of given type profile type; - * the ownership is transferred - */ - IMPORT_C CSIPManagedProfile* CreateL(const TSIPProfileTypeInfo& aType); - - /** - * Checks if profile is not used by other applications. - * If no other application is using the profile, profile - * can be updated. - * @param aSIPProfile a SIP profile - * @return ETrue if available for update, EFalse otherwise - * @capability ReadUserData - */ - IMPORT_C TBool IsInUseL(const CSIPProfile& aSIPProfile) const; - - /** - * Saves new profile or changes to a profile to the persistent storage. - * This function must be called after desired values are set or updated - * in the SIP profile. - * If the profile is marked for auto-registration and the profile is - * updated the profile will be re-registered. - * Function leaves on failure. - * @pre IsInUse(aSIPProfile)==EFalse - * @param aSIPProfile a sip profile to save - * @capability WriteDeviceData - * @capability NetworkServices - */ - IMPORT_C void SaveL(CSIPProfile& aSIPProfile); - - /** - * Removes and deletes SIP profile from the persistent storage. - * Function leaves on failure. - * If the profile is registered it will be de-registered before the - * removal from the persistent storage. - * @param aSIPProfile a sip profile to delete - * @capability WriteDeviceData - * @capability NetworkServices - */ - IMPORT_C void DestroyL(CSIPProfile& aSIPProfile); - - private: - - CSIPManagedProfileRegistry(MSIPProfileRegistryObserver& aObserver); - - void ConstructL(); - - /** - * Creates a new instance of type CSIPManagedProfile - * @return new instance - */ - CSIPProfile* NewInstanceL(); - }; - -#endif // CSIPMANAGEDPROFILEREGISTRY_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipmessageelements.h --- a/epoc32/include/sipmessageelements.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,174 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipmessageelements.h -* Part of : SIP Client -* Interface : SDK API, SIP API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPMESSAGEELEMENTS_H -#define CSIPMESSAGEELEMENTS_H - -// INCLUDES -#include -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPHeaderBase; -class CSIPContentTypeHeader; -class CSIPFromHeader; -class CSIPToHeader; -class CSIPCSeqHeader; -class CSIPExtensionHeader; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for creation and manipulation optional elements in a SIP message. -* -* Class provides functions for setting and getting optional elements in a -* SIP message. Optional elements include user SIP message headers, -* content and content type. -* Following headers are not considered to be user SIP message headers and -* cannot be set or retrieved using functions of this class: -* "Authentication-Info", "Call-Id", "CSeq", "From" -* "Max-Forwards", "Min-Expires", "Record-Route", -* "Security-Verify", "Service-Route", "To", "Via", "Security-Server" and -* "Proxy-Authorization". -* -* @lib sipclient.lib -*/ -class CSIPMessageElements : public CBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - */ - IMPORT_C static CSIPMessageElements* NewL(); - - /** - * Two-phased constructor. - */ - IMPORT_C static CSIPMessageElements* NewLC(); - - /** - * Destructor. - */ - IMPORT_C ~CSIPMessageElements(); - - public: //new functions - /** - * Sets an array of user headers i.e. headers that user is allowed - * manipulate to a SIP message. An empty array resets the user headers. - * Note that the Content-Type header must be set using SetContentL. - * - * @param aHeaders an array of SIP headers. - * The ownership of objects in the array is transferred. - */ - IMPORT_C void SetUserHeadersL(RPointerArray& aHeaders); - - /** - * Gets all user SIP headers this class contains - * @return SIP headers. Ownership is not transferred. - */ - IMPORT_C const RPointerArray& UserHeaders() const; - - /** - * Sets the SIP message content and its type. - * A zero length content can be set by providing a pointer - * to a zero length HBufC8 instance (the ownership is transferred). - * @pre aContent != 0 && aContentType != 0 - * @param aContent the content of a SIP message, - * the ownership is transferred - * @param aContentType the SIP message content type, - * the ownership is transferred - * @leave KErrArgument if aContent == 0 or - * aContentType == 0 - */ - IMPORT_C void SetContentL(HBufC8* aContent, - CSIPContentTypeHeader* aContentType); - - /** - * Gets the SIP message content - * @return SIP message content. If content does not exist, an empty - * descriptor is returned. - */ - IMPORT_C const TDesC8& Content() const; - - /** - * Gets the content type - * @return Content-Type-header or a 0-pointer if not present; the ownership - * is not transferred. - */ - IMPORT_C const CSIPContentTypeHeader* ContentType() const; - - /* - * Removes the SIP message content and destroys - * Content-Type header as well. - * @return SIP message content; the ownership is transferred. - */ - IMPORT_C HBufC8* ExtractContent(); - - public: // New functions, for internal use - - static CSIPMessageElements* InternalizeL(RReadStream& aReadStream); - void ExternalizeL(RWriteStream& aWriteStream) const; - TInt UserHeaderCount(RStringF aName) const; - const RPointerArray UserHeadersL(RStringF aName) const; - TInt RemoveHeaders(RStringF aName); - void DetachUserHeader(CSIPHeaderBase* aHeader); - void AddHeaderL(CSIPHeaderBase* aHeader); - void SetToL(CSIPToHeader* aTo); - const CSIPToHeader* To() const; - void SetFromL (CSIPFromHeader* aFrom); - const CSIPFromHeader* From() const; - const CSIPCSeqHeader* CSeq() const; - void SetContent(HBufC8* aContent); - void DetachContent(); - - private: - - CSIPMessageElements(); - void ConstructL(); - void DoInternalizeL(RReadStream& aReadStream); - void CheckUserHeaderL(const CSIPHeaderBase* aHeader) const; - void ExternalizeUserHeadersL(RWriteStream& aWriteStream) const; - void ExternalizeL(const CSIPExtensionHeader* aHeader, - RWriteStream& aWriteStream) const; - - private: // Data - - RPointerArray iUserHeaders; - HBufC8* iContent; - CSIPFromHeader* iFromHeader; - CSIPToHeader* iToHeader; - CSIPCSeqHeader* iCSeqHeader; - CSIPContentTypeHeader* iContentTypeHeader; - TBool iHeaderLookupOpen; - - private: // For testing purposes - - UNIT_TEST(CSIPMessageElementsTest) - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipnotifydialogassoc.h --- a/epoc32/include/sipnotifydialogassoc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,232 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipnotifydialogassoc.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - - -#ifndef CSIPNOTIFYDIALOGASSOC_H -#define CSIPNOTIFYDIALOGASSOC_H - -// INCLUDES -#include -#include "sipdialogassocbase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class CSIPEventHeader; -class CSIPSubscriptionStateHeader; -class MSIPRegistrationContext; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP NOTIFY dialog associations. -* It provides services for creating, using and -* terminating SIP NOTIFY dialog associations. The user can have multiple -* NOTIFY dialog associations per same SIP dialog. -* Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, -* local and remote tags; user is responsible for "Event" and -* "Subscription-State" header semantics. -* @lib sipclient.lib -*/ -class CSIPNotifyDialogAssoc: public CSIPDialogAssocBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * The response to the received SIP request will create a SIP NOTIFY - * dialog association that will be correlated with the SIP dialog in - * which SIP server transaction was received. If the server transaction - * was not received within a SIP dialog, a new SIP dialog is created. - * The server transaction must be either SUBSCRIBE or REFER transaction. - * @pre aTransaction.State()==ETrying || EProceeding - * @pre aTransaction.Type() == - * SipStrConsts::ESubscribe || SipStrConsts::ERefer - * @pre aEvent != 0 && aState != 0 - * @param aTransaction a SIP server transaction - * @param aEvent an event to send a notification about; the ownership - * is transferred. - * @param aState a subscription state; the ownership is transferred. - * @return New object; the ownership is transferred - * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER - * transaction, or aEvent == 0 or aState == 0. - * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong - * state - */ - IMPORT_C static CSIPNotifyDialogAssoc* - NewL(CSIPServerTransaction& aTransaction, - CSIPEventHeader* aEvent, - CSIPSubscriptionStateHeader* aState); - - /** - * Two-phased constructor. - * The response to the received SIP request will create a SIP NOTIFY - * dialog association that will be correlated with the SIP dialog in - * which SIP server transaction was received. If the server transaction - * was not received within a SIP dialog, a new SIP dialog is created. - * The server transaction must be either SUBSCRIBE or REFER transaction. - * @pre aTransaction.State()==ETrying || EProceeding - * @pre aTransaction.Type() == - * SipStrConsts::ESubscribe || SipStrConsts::ERefer - * @pre aEvent != 0 && aState != 0 - * @param aTransaction a SIP server transaction - * @param aEvent an event to send a notification about; the ownership - * is transferred. - * @param aState a subscription state; the ownership is transferred. - * @return New object; the ownership is transferred - * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER - * transaction, or aEvent == 0 or aState == 0. - * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong - * state - */ - IMPORT_C static CSIPNotifyDialogAssoc* - NewLC(CSIPServerTransaction& aTransaction, - CSIPEventHeader* aEvent, - CSIPSubscriptionStateHeader* aState); - - /** - * Two-phased constructor. - * The response to the received SIP request will create a SIP NOTIFY - * dialog association that will be correlated with the SIP dialog in - * which SIP server transaction was received. If the server transaction - * was not received within a SIP dialog, a new SIP dialog is created. - * The server transaction must be either SUBSCRIBE or REFER transaction. - * @pre aTransaction.State()==ETrying || EProceeding - * @pre aTransaction.Type() == - * SipStrConsts::ESubscribe || SipStrConsts::ERefer - * @pre aContext.IsContextActive() == ETrue - * @pre aEvent != 0 && aState != 0 - * @param aTransaction a SIP server transaction - * @param aContext that will be used for populating - * the Contact-header of the response to aTransaction - * @param aEvent an event to send a notification about; the ownership - * is transferred. - * @param aState a subscription state; the ownership is transferred. - * @return New object; the ownership is transferred - * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER - * transaction, or aEvent == 0 or aState == 0. - * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong - * state - */ - IMPORT_C static CSIPNotifyDialogAssoc* - NewL(CSIPServerTransaction& aTransaction, - const MSIPRegistrationContext& aContext, - CSIPEventHeader* aEvent, - CSIPSubscriptionStateHeader* aState); - - /** - * Two-phased constructor. - * The response to the received SIP request will create a SIP NOTIFY - * dialog association that will be correlated with the SIP dialog in - * which SIP server transaction was received. If the server transaction - * was not received within a SIP dialog, a new SIP dialog is created. - * The server transaction must be either SUBSCRIBE or REFER transaction. - * @pre aTransaction.State()==ETrying || EProceeding - * @pre aTransaction.Type() == - * SipStrConsts::ESubscribe || SipStrConsts::ERefer - * @pre aContext.IsContextActive() == ETrue - * @pre aEvent != 0 && aState != 0 - * @param aTransaction a SIP server transaction - * @param aContext that will be used for populating - * the Contact-header of the response to aTransaction - * @param aEvent an event to send a notification about; the ownership - * is transferred. - * @param aState a subscription state; the ownership is transferred. - * @return New object; the ownership is transferred - * @leave KErrArgument if aTransaction is not a SUBSCRIBE or REFER - * transaction, or aEvent == 0 or aState == 0. - * @leave KErrSIPInvalidTransactionState if aTransaction is in a wrong - * state - */ - IMPORT_C static CSIPNotifyDialogAssoc* - NewLC(CSIPServerTransaction& aTransaction, - const MSIPRegistrationContext& aContext, - CSIPEventHeader* aEvent, - CSIPSubscriptionStateHeader* aState); - - /** - * Destructor - */ - IMPORT_C ~CSIPNotifyDialogAssoc(); - - public: // New functions - - /** - * Creates NOTIFY and sends it to the remote target. - * If client provides optional SIP headers they must - * not contain Event and Subscription-State headers. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::TState::EConfirmed - * @param aElements optional SIP message headers and body. - * Ownership is transferred. - * @return NOTIFY SIP UAC transaction - * @leave KErrSIPInvalidDialogState if dialog's state is incorrect - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted. - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendNotifyL(CSIPMessageElements* aElements=0); - - /** - * Gets an event about which the notification is done - * @return an event - */ - IMPORT_C const CSIPEventHeader& Event() const; - - /** - * Gets subscription state - * @return subscription state - */ - IMPORT_C CSIPSubscriptionStateHeader& SubscriptionState(); - - /** - * Gets subscription state - * @return subscription state - */ - IMPORT_C const CSIPSubscriptionStateHeader& SubscriptionState() const; - - public: // New functions, for internal use - - CSIPClientTransaction* - DoSendNotifyWithinDialogL(CSIPMessageElements* aElements); - - private: // Constructors - - CSIPNotifyDialogAssoc(); - - void ConstructL(CSIPServerTransaction& aTransaction, - const MSIPRegistrationContext* aContext, - CSIPEventHeader* aEvent, - CSIPSubscriptionStateHeader* aState); - - private: // Data - - CSIPEventHeader* iEvent; - CSIPSubscriptionStateHeader* iSubscriptionState; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipobserver.h --- a/epoc32/include/sipobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipobserver.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef MSIPOBSERVER_H -#define MSIPOBSERVER_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CSIPServerTransaction; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* An interface to be implemented by user of CSIP. -* Interface allows to be able to receive SIP request from the SIP connection -* that has not been initialized by the user. -* -* @lib n/a -*/ -class MSIPObserver - { - public: // New functions - /** - * A SIP request has been received from the network. - * This function is called when the SIP request was received using such - * an IAP, for which the application has not created a CSIPConnection - * object. - * @pre aTransaction != 0 - * @param aIapId The IapId from which the SIP request was received. - * @param aTransaction contains local address, remote address of a SIP - * message, as well as optional SIP message method, headers and - * body. The ownership is transferred. - */ - virtual void IncomingRequest(TUint32 aIapId, - CSIPServerTransaction* aTransaction) = 0; - - /** - * The received SIP request time-outed and it is invalid i.e. cannot be used - * anymore. - * This will be called if the user fails to create a SIP connection and - * does not send an appropriate SIP response. - * @param aTransaction The time-outed transaction. - */ - virtual void TimedOut(CSIPServerTransaction& aTransaction) = 0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipparameterheaderbase.h --- a/epoc32/include/sipparameterheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipparameterheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPPARAMETERHEADERBASE_H -#define CSIPPARAMETERHEADERBASE_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPParamContainerBase; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP headers that have structure -* "mandatory part"delimiter"parameters" -* -* This is an abstract class and cannot be instantiated. -* -* @lib sipcodec.lib -*/ -class CSIPParameterHeaderBase : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPParameterHeaderBase. - */ - IMPORT_C virtual ~CSIPParameterHeaderBase(); - - - public: // New functions - - /** - * Checks if a parameter is present - * @param aName the name of the parameter - * @return ETrue if present, otherwise EFalse - */ - IMPORT_C TBool HasParam(RStringF aName) const; - - /** - * Gets a parameter value - * @pre HasParam(aName) == ETrue - * @param aName the name of the parameter - * @return the parameter value if present, - * otherwise a zero-length length value. - */ - IMPORT_C RStringF ParamValue(RStringF aName) const; - - /** - * Sets a parameter with a value. - * Takes copies of the name and value, - * so if the RStringFs have been dynamically allocated, - * they can be closed if necessary after the function returns. - * @pre HasParam(aName) == EFalse - * @param aName the name of the parameter - * @param aValue the parameter value to set - */ - IMPORT_C void SetParamL(RStringF aName, RStringF aValue); - - /** - * Sets a parameter without a value - * Takes copy of the name, - * so if the RStringF has been dynamically allocated, - * it can be closed if necessary after the function returns. - * @pre HasParam(aName) == EFalse - * @param aName the parameter name to set - */ - IMPORT_C void SetParamL(RStringF aName); - - /** - * Deletes a parameter - * @param aName the parameter name to delete - */ - IMPORT_C void DeleteParam(RStringF aName); - - /** - * Gets the count of header parameters - * @return count of header parameters - */ - IMPORT_C TInt ParamCount() const; - - /** - * Gets a header parameter name by index. - * This function can be used when looping through - * all the header parameters. - * @param aIndex the index of the parameter - * @param aName copy of the parameter name that must be - * closed by the caller. - * @return KErrNotFound if aIndex is invalid. Otherwise EFalse. - */ - IMPORT_C TInt Param(TInt aIndex, RStringF& aName) const; - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - protected: // Contructors - - CSIPParameterHeaderBase(const TChar& aSeparator); - - protected: // New functions - - void ParseL(const TDesC8& aValue, - TBool aIgnoreParenthesis=ETrue, - TBool aSkipSeparatorsBeforeAt=EFalse); - - protected: // Virtual functions - - /** - * @internalComponent - */ - virtual TBool ParamInsertionAllowed() const; - - protected: // Pure virtual functions - - /** - * @internalComponent - */ - virtual HBufC8* ToTextMandatoryPartLC() const = 0; - - /** - * @internalComponent - */ - virtual void ParseMandatoryPartL(const TDesC8& aMandatoryPart) = 0; - - /** - * @internalComponent - */ - virtual const CSIPParamContainerBase& Params() const = 0; - - /** - * @internalComponent - */ - virtual CSIPParamContainerBase& Params() = 0; - - private: // Contructors - - CSIPParameterHeaderBase(); - - private: // Data - - TChar iSeparator; - - private: // For testing purposes - - UNIT_TEST(CSIPParameterHeaderBaseTest) - }; - -#endif // CSIPPARAMETERHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sippassociateduriheader.h --- a/epoc32/include/sippassociateduriheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sippassociateduriheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPPASSOCIATEDURIHEADER_H -#define CSIPPASSOCIATEDURIHEADER_H - -// INCLUDES -#include "sipaddressheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPHeaderGenericParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP -* "P-Associated-URI" header. -* -* @lib sipcodec.lib -*/ -class CSIPPAssociatedURIHeader : public CSIPAddressHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPPAssociatedURIHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "P-Associated-URI"-header - * (e.g. "User ;param=value") - * @return an array containing one to many instances - * of CSIPPAssociatedURIHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPPAssociatedURIHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred. - * @return a new instance of CSIPPAssociatedURIHeader - */ - IMPORT_C static CSIPPAssociatedURIHeader* - NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPPAssociatedURIHeader and - * puts it to CleanupStack - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred, - * @return a new instance of CSIPPAssociatedURIHeader - */ - IMPORT_C static CSIPPAssociatedURIHeader* - NewLC(CSIPAddress* aSIPAddress); - - /** - * Destructor, deletes the resources of CSIPPAssociatedURIHeader. - */ - IMPORT_C virtual ~CSIPPAssociatedURIHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPPAssociatedURIHeader from - * a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPPAssociatedURIHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPPAssociatedURIHeader(); - - private: // For testing purposes - - UNIT_TEST(CSIPPAssociatedURIHeaderTest) - }; - -#endif // end of CSIPPASSOCIATEDURIHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofile.h --- a/epoc32/include/sipprofile.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,374 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofile.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The class providing profile data of SIP service provider -* Version : 1.0 -* -*/ - - - -#ifndef CSIPPROFILE_H -#define CSIPPROFILE_H - -// INCLUDES -#include -#include -#include -#include "sipregistrationcontext.h" -#include "sipprofiletypeinfo.h" - -// FORWARD DECLARATIONS -class CSIPConcreteProfile; -class CSIPProfileRegistry; -class CSIPProfileRegistryBase; - -/** -* SIP Profile ID which value is type of TUint32 -*/ -const TUint32 KSIPProfileId = 1; - -/** -* SIP Provider Name which value is type of TDesC8 -*/ -const TUint32 KSIPProviderName = 2; - -/** -* Access Point ID which value is type of TUint32 -*/ -const TUint32 KSIPAccessPointId = 3; - -/** -* Signaling compression (SigComp) which value is type of TBool. -* ETrue indicates that SigComp is enabled -*/ -const TUint32 KSIPSigComp = 4; - -/** -* Security Negotiation which value is type of TBool. ETrue indicates that -* Security Negotiation is enabled -*/ -const TUint32 KSIPSecurityNegotiation = 5; - -/** -* Auto Registration which value is type of TBool. ETrue indicates that -* profile is enabled for auto registration -*/ -const TUint32 KSIPAutoRegistration = 6; - -/** -* Defined user's address-of-record which value is type of TDesC8 -*/ -const TUint32 KSIPUserAor = 7; - -/** -* Registration which value is type of TBool. ETrue indicates that -* profile is registered -*/ -const TUint32 KSIPProfileRegistered = 8; - -/** -* Users's registered address-of-records which value is of type MDesC8Array. -* Note that array will contain AORs only in case the profile is registered. -*/ -const TUint32 KSIPRegisteredAors = 9; - -/** -* Negotiated security mechanism during registration procedure which value -* is of type TDesC8. -* Note that descriptor will contain value only in case the profile is -* registered. -*/ -const TUint32 KSIPNegotiatedSecurityMechanism = 10; - -/** -* Default profile which value is type of TBool. -* ETrue indicates that profile is default -*/ -const TUint32 KSIPDefaultProfile = 11; - -/** -* "Contact" header parameters used during registration which value -* is of type MDesC8Array. Each array element contains one "Contact"-header -* parameter. -*/ -const TUint32 KSIPContactHeaderParams = 12; - -/** -* The user's registered "Contact"-header including the whole value of the header -* except for the header's name ("Contact:"). -* The value is of type TDesC8. -* Note that the value is available only in case the profile is registered. -*/ -const TUint32 KSIPRegisteredContact = 13; - -/** -* SNAP (Service Network Access Point) ID which value is type of TUint32. -* This is an optional parameter. When this parameter is configured, -* KSIPAccessPointId has a meaningful value only when the profile is registered. -* The value of KSIPSnapId must be greater than zero. -*/ -const TUint32 KSIPSnapId = 14; - -/** -* A unique Contact-header's user-part -* generated automatically by the SIP implementation. -* The value is of type TDesC8. -* This parameter is read-only and -* trying to set it will fail with KErrAccessDenied. -*/ -const TUint32 KSIPContactHeaderUser = 15; - -/** -* Sets the KSoIpTOS socket option (see in_sock.h) for -* all SIP signalling related to this profile. -* The value is of type TUint32. -*/ -const TUint32 KSIPSoIpTOS = 16; - -/** -* Sets the Access Point Name. -* This is an Optional Parameter. -* Access Point Name which value is type of TDesC8, -*/ -const TUint32 KSIPAccessPointName = 17; - -/** - * Sets the SNAP Name. - * This is an Optional Parameter. - * SNAP Name which value is type of TDesC8, -*/ -const TUint32 KSIPSnapName = 18; - -/** -* SIP Registrar -*/ -const TUint32 KSIPRegistrar = 130; - -/** -* SIP Outbound Proxy -*/ -const TUint32 KSIPOutboundProxy = 131; - -/** -* HTTP Digest user name which value is type of TDesC8 -*/ -const TUint32 KSIPDigestUserName = 150; - -/** -* HTTP Digest realm which value is type of TDesC8 -*/ -const TUint32 KSIPDigestRealm = 151; - -/** -* SIP server's address which value is of type TDesC8 -*/ -const TUint32 KSIPServerAddress = 152; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class contains profile information of particular SIP service -* provider. Class provides functions for quering profile parameter -* values. -* @lib sipprofilecli.lib -*/ -class CSIPProfile: public CBase, public MSIPRegistrationContext - { - public: // Constructors and destructor - /** - * Destructor. - * @capability NetworkServices - */ - IMPORT_C ~CSIPProfile(); - - public: // New functions - /** - * Gets profile type information - * @return profile type information - */ - IMPORT_C const TSIPProfileTypeInfo& Type() const; - - /** - * Gets profile parameter - * @param aParam a parameter to get - * @param aVal on return will contain parameter value - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt GetParameter(TUint32 aParam, TDesC8 const *& aVal) const; - - /** - * Gets profile parameter - * @param aParam a parameter to get - * @param aVal on return will contain parameter value - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt GetParameter(TUint32 aParam, TUint32& aVal) const; - - /** - * Gets profile parameter - * @param aParam a parameter to get - * @param aVal on return will contain parameter value - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt GetParameter(TUint32 aParam, TBool& aVal) const; - - /** - * Gets profile parameter - * @param aParam a parameter to get - * @param aVal on return will contain parameter value - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt GetParameter(TUint32 aParam, MDesC8Array const *& aVal) const; - - /** - * Gets profile parameter that is defined for a particular SIP server - * @param aServer a SIP server type - * @param aParam a parameter to get - * @param aVal on return will contain parameter value - * @return KErrNotFound if parameter was not found, KErrNone otherwise - */ - IMPORT_C TInt GetParameter(TUint32 aServerType, TUint32 aParam, TDesC8 const *& aVal) const; - - public: //Functions from base class - /** - * Tests if the registration context can be - * used for creating SIP messages/dialogs - * Profile can be used, when CSIPProfileRegistry::IsEnabled() == ETrue - * and Status() == ERegistered. - * @return ETrue if can be used, EFalse otherwise - * @internalComponent - */ - TBool IsContextActive() const; - - /** - * - * For internal use only - * @return context id - * @internalComponent - */ - TUint32 ContextId() const; - - - public: //New functions - - /** - * Two-phased constructor. - * @param aSIPRegistry a SIP profile client providing connection to SIP - * profile server. - */ - - static CSIPProfile* NewL(CSIPProfileRegistry* aSIPRegistry); - - /** - * Two-phased constructor. - * @param aSIPRegistry a SIP profile client providing connection to SIP - * profile server. - * Constructs an object and adds the pointer to the cleanup stack; - */ - - static CSIPProfile* NewLC(CSIPProfileRegistry* aSIPRegistry); - - /** - * Sets profiles enabled state - * @param aEnabled ETrue if enabled - */ - - void SetEnabled(TBool aEnabled); - - /** - * Sets concrete profile that holds actual data - * @param aProfile profile instance containing data - */ - - void SetConcreteProfile(CSIPConcreteProfile* aProfile); - - /** - * Clears concrete profile that holds actual data - */ - - void ClearConcreteProfile(); - - /** - * Gets concrete profile that holds actual data - * @return concrete profile holding data - */ - - CSIPConcreteProfile& ConcreteProfile(); - - /** - * Gets concrete profile that holds actual data - * @return concrete profile holding data - */ - - const CSIPConcreteProfile& ConcreteProfile() const; - - /** - * Checks if the profile is enabled - * @return ETrue if enabled, EFalse otherwise - */ - - TBool IsEnabled() const; - - /** - * Gets last occurred error during registration - * @return last occurred error code, KErrNone if no error - */ - TInt LastRegistrationError() const; - - /** - * sets pointer to registry for profile - */ - void SetRegistry(CSIPProfileRegistryBase* aRegistry); - - /** - * Clears pointer to registry from profile - */ - void ClearRegistry(); - - protected: - - /** - * Constructor. - */ - CSIPProfile(CSIPProfileRegistryBase* aRegistry); - - /** - * 2nd phase constructor. - */ - void ConstructL(); - - protected: - - /** - * @internalComponent - */ - CSIPConcreteProfile* iSIPProfile; - - /** - * @internalComponent - */ - CSIPProfileRegistryBase* iSIPProfileRegistry; - - private: - - TBool iEnabled; - }; - -#endif // CSIPPROFILE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofilealrcontroller.h --- a/epoc32/include/sipprofilealrcontroller.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofilealrcontroller.h -* Part of : SIP / SIP Profile Agent -* Version : SIP/6.0 -* -*/ - - - -#ifndef CSIPPROFILEALRCONTROLLER_H -#define CSIPPROFILEALRCONTROLLER_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS -class CSIPProfileRegistryBase; -class MSipProfileAlrObserver; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* This class provides functions to control -* ALR (Application Level Roaming) for SIP profiles that have -* a SNAP (Service Network Access Point) ID configured. -* By default the clients allow automatic roaming between -* IAPs (Internet Access Point) for a SIP profile. -* The clients wanting to control the roaming must instantiate this class. -* After that all the IAP availability events received through -* MSipProfileAlrObserver::AlrEvent must be allowed or disallowed. -* -* @lib sipprofilecli.lib -*/ -class CSipProfileAlrController : public CBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @param aRegistry a SIP profile registry instance. - * @param aObserver a observer for IAP migration events. - */ - IMPORT_C static CSipProfileAlrController* NewL( - CSIPProfileRegistryBase& aRegistry, - MSipProfileAlrObserver& aObserver ); - - /** - * Two-phased constructor. - * Constructs an object and adds the pointer to the cleanup stack. - * @param aRegistry a SIP profile registry instance. - * @param aObserver a observer for IAP migration events. - */ - IMPORT_C static CSipProfileAlrController* NewLC( - CSIPProfileRegistryBase& aRegistry, - MSipProfileAlrObserver& aObserver ); - - /** - * Destructor. - */ - ~CSipProfileAlrController(); - - public: // New functions - - /** - * Allows SIP Profile Agent to start the migration - * to a new IAP for the profile. - * If also all the other clients allow the migration, - * migration will be started and all the clients are informed - * with MSipProfileAlrObserver::AlrEvent(EMigrationStarted,...). - * When MSipProfileAlrObserver::AlrEvent(EMigrationCompleted,...) - * gets called the migration has been completed and - * the related SIP profile has been registered via the new IAP. - * @param aProfileId the SIP profile id - * @param aIapId the new IAP id. - */ - IMPORT_C void AllowMigrationL( TUint32 aProfileId, - TUint32 aIapId ); - - /** - * Disallows SIP Profile Agent to migrate - * to a new IAP for the profile. - * After the client calls this function all the clients are informed - * with MSipProfileAlrObserver::AlrError(...). - * @param aProfileId the SIP profile id - * @param aIapId the new IAP id. - */ - IMPORT_C void DisallowMigrationL( TUint32 aProfileId, - TUint32 aIapId ); - - /** - * Refreshes the list of available IAPs for - * the SNAP configured for the profile. - * If a new better IAP is available, it is offered via - * MSipProfileAlrObserver::AlrEvent(EIapAvailable,...). - * This function should be called if migration - * to a IAP has been previously disallowed and the client wants to - * check whether the better IAP is still available. - * @param aProfileId the SIP profile id - */ - IMPORT_C void RefreshIapAvailabilityL( TUint32 aProfileId ); - - - private: // Constructors: - - CSipProfileAlrController( CSIPProfileRegistryBase& aRegistry ); - void ConstructL( MSipProfileAlrObserver& aObserver ); - - private: // Data - - CSIPProfileRegistryBase& iRegistry; - - private: // For testing purposes - - friend class CSIPProfileAlrControllerTest; - }; - -#endif // CSIPPROFILEALRCONTROLLER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofilealrobserver.h --- a/epoc32/include/sipprofilealrobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofilealrobserver.h -* Part of : SIP / SIP Profile Agent -* Version : SIP/6.0 -* -*/ - - - -#ifndef MSIPPROFILEALROBSERVER_H -#define MSIPPROFILEALROBSERVER_H - -// INCLUDES -#include - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Callback to receive notifications about ALR (Application Level Roaming) -* related events and errors. -*/ -class MSipProfileAlrObserver - { - public: - - /** SIP Profile ALR events */ - enum TEvent - { - /** - * A new IAP became available. - * When receiving this event the client must call - * CSipProfileAlrController::AllowMigrationL or DisallowMigrationL. - */ - EIapAvailable = 0, - /** - * All the clients have allowed the migration to the new IAP and - * the migration to the new IAP for the SIP profile has started. - */ - EMigrationStarted, - /** - * Migration to a new IAP for a SIP profile has been completed and - * the related SIP profile has been registered via the new IAP. - */ - EMigrationCompleted - }; - - /** - * ALR related event occurred. - * @param aEvent the event that occurred - * @param aProfileId identifies the SIP profile related to the event - * @param aSnapId the SNAP related to the event - * @param aIapId the IAP related to the event - */ - virtual void AlrEvent( TEvent aEvent, - TUint32 aProfileId, - TUint32 aSnapId, - TUint32 aIapId ) = 0; - - /** - * ALR related error occurred. - * @param aError the error that occurred - * @param aProfileId identifies the SIP profile related to the error - * @param aSnapId the SNAP related to the error - * @param aIapId the IAP related to the error - */ - virtual void AlrError( TInt aError, - TUint32 aProfileId, - TUint32 aSnapId, - TUint32 aIapId ) = 0; - }; - -#endif // MSIPPROFILEALROBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofileregistry.h --- a/epoc32/include/sipprofileregistry.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofileregistry.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The class for using SIP profiles -* Version : 1.0 -* -*/ - - - -#ifndef CSIPPROFILEREGISTRY_H -#define CSIPPROFILEREGISTRY_H - -// INCLUDES -#include -#include -#include -#include "sipprofileregistrybase.h" - -// FORWARD DECLARATIONS -class CSIP; -class CSIPConnection; -class CSIPProfile; -class MSIPProfileRegistryObserver; -class MSIPConnectionObserver; - - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* The class for retrieving SIP profiles from permanent storage. -* This class provides services for retreiving SIP profiles -* and enabling/disabling them for the usage. -* -* The user can create only one instance of this class (a singleton class). -* -* @lib sipprofilecli.lib -*/ -class CSIPProfileRegistry: public CSIPProfileRegistryBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * This constructor should be used if the client intends - * to use SIP services with profiles. - * @param aSip a SIP client providing connection to SIP stack. - * @param aObserver a observer for SIP profile change events. - */ - IMPORT_C static CSIPProfileRegistry* NewL( - CSIP& aSip, - MSIPProfileRegistryObserver& aObserver); - - /** - * Two-phased constructor. - * This constructor should be used if the client intends - * to use SIP services with profiles. - * Constructs an object and adds the pointer to the cleanup stack; - * @param aSip a SIP client providing connection to SIP stack. - * @param aObserver a observer for SIP profile change events. - */ - IMPORT_C static CSIPProfileRegistry* NewLC( - CSIP& aSip, - MSIPProfileRegistryObserver& aObserver); - - /** - * Destructor - */ - IMPORT_C ~CSIPProfileRegistry(); - - public: // New functions - /** - * Gets handle to the SIP server - * @return handle to the SIP server - */ - IMPORT_C CSIP& SIP() const; - - /** - * Gets the SIP connection to be used with this SIP profile. - * @pre IsEnabled() == ETrue - * @param aProfile a sip profile - * @return a SIP connection to be used; the owneship is transfered - * @leave KErrNoMemory if out of memory - * @capability NetworkServices - */ - IMPORT_C CSIPConnection* ConnectionL( - CSIPProfile& aProfile); - - /** - * Enables the SIP profile for use. - * Enabling the SIP profile will cause the SIP profile to - * be registered if its status was unregistered. - * The user must check the profile status after calling this - * function. In case the profile is not registered the user must - * wait until the it is notified about profile registration - * on MSIPProfileRegistryObserver-callback interface. - * @param aProfile a sip profile to enable - * @param aObserver a observer for SIP connection events - * @leave KErrNotFound if non-existing profile is provided - * @capability NetworkServices - */ - IMPORT_C void EnableL( - CSIPProfile& aProfile, - MSIPConnectionObserver &aObserver); - - /** - * Disables the usage of SIP profile - * @param aProfile a sip profile to disable - * @return KErrNone if SIP profile was successfully disabled; - * system wide error otherwise - * @capability NetworkServices - */ - IMPORT_C TInt Disable(CSIPProfile& aProfile); - - /** - * Tests is the SIP profile enabled for the use - * @param aProfile a SIP profile to be checked - * @return ETrue if SIP profile is enabled; EFalse otherwise - */ - IMPORT_C TBool IsEnabled(const CSIPProfile& aProfile) const; - - /** - * Force disables the usage of SIP profile - * All Profile related activities will be stopped ungracefully - * @param aProfile a sip profile to disable - * @return KErrNone if SIP profile was successfully disabled; - * system wide error otherwise - * @capability NetworkControl - */ - IMPORT_C TInt ForceDisable(CSIPProfile& aProfile); - - /** - * Refreshes the Enabled SIP profile for use. - * Refreshing the Enabled Profile will cause the SIP Profile to - * get Registered if its status was not registered. - * This function has to be used when the profile is in Enabled state and - * might be unregistered due to a connection loss. - * @param aProfile a sip profile to enable - * @leave KErrNotFound if non-existing profile is provided - * @leave KErrArgument if the profile is not previously Enabled and in Unregistered state. - * @capability NetworkServices - */ - - IMPORT_C void RefreshEnableL(CSIPProfile& aProfile); - - public: - - /** - * @internalComponent - */ - CSIPProfile* NewInstanceL(); - - private: - - CSIPProfileRegistry(); - CSIPProfileRegistry(CSIP& aSip, MSIPProfileRegistryObserver& aObserver); - void ConstructL(); - - private: - - CSIP& iSip; - MSIPConnectionObserver* iConnectionObserver; - }; - -#endif // CSIPPROFILEREGISTRY_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofileregistrybase.h --- a/epoc32/include/sipprofileregistrybase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,422 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofileregistrybase.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The class for retrieving SIP profiles from permanent storage. -* Version : 1.0 -* -*/ - - - -#ifndef CSIPPROFILEREGISTRYBASE_H -#define CSIPPROFILEREGISTRYBASE_H - -// INCLUDES -#include -#include -#include "sipconcreteprofileobserver.h" - -// FORWARD DECLARATIONS -class CSIPProfile; -class CSIPConcreteProfile; -class TSIPProfileTypeInfo; -class CSIPProfileCleanupItem; -class CSIPProfileItem; -class CSIPProfileITCReceiver; -class CSIPProfileITC; -class CSIPProfilePlugins; -class MSIPProfileRegistryObserver; -class RSIPProfile; -class CSIPConcreteProfileHolder; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* The class functions for retrieving SIP profiles from permanent storage. -* It enables retrieval of single or more profiles from permanent -* storage located in profile server. -* -* The class enables also the query of supported profile types. -* -* This class is an abstract class and cannot be instantiated. -* -* @lib sipprofilecli.lib -*/ -class CSIPProfileRegistryBase: public CBase, public MSIPConcreteProfileObserver - { - public: // Constructors and destructor - - IMPORT_C ~CSIPProfileRegistryBase(); - - public: //new functions - /** - * Gets all SIP profiles - * @pre aProfiles.Count() == 0 - * @param aProfiles a reference to a client-owned array, which - * on return is filled with all existing SIP profiles - * @leave KErrNoMemory if out of memory - * @capability ReadUserData - */ - IMPORT_C void ProfilesL(RPointerArray& aProfiles); - - /** - * Gets all SIP profiles of particular type - * The owneship of profiles are transferred. - * @pre aProfiles.Count() == 0 - * @param aType a SIP profile type that is used for a query - * @param aProfiles a reference to a client-owned array, which - * on return is filled with profiles of the given type. - * @leave KErrNoMemory if out of memory - * @capability ReadUserData - */ - IMPORT_C void ProfilesL( - const TSIPProfileTypeInfo& aType, - RPointerArray& aProfiles); - - /** - * Gets SIP profile for a particular SIP AOR - * The owneship of profiles are transferred. - * @pre aProfiles.Count() == 0 - * @param aAOR a SIP AOR e.g. user@domain.com - * @param aProfiles a reference to a client-owned array, which - * on return is filled with profiles of the given type. - * @leave KErrNoMemory if out memory - * @capability ReadUserData - */ - IMPORT_C void ProfilesL( - const TDesC8& aAOR, - RPointerArray& aProfiles); - - /** - * Gets SIP profile identified by the Id - * The owneship of profile is transferred. - * @param aId a SIP profile Id - * @return SIP profile - * @leave KErrNotFound if profile is not found - * @capability ReadUserData - */ - IMPORT_C CSIPProfile* ProfileL(TUint32 aId); - - /** - * Gets the default profile - * @return default profile; the owneship is transfered - * @leave KErrNotFound if profile not found - * @leave KErrNoMemory if out of memory - * @capability ReadUserData - */ - IMPORT_C CSIPProfile* DefaultProfileL(); - - /** - * Gets supported profile types - * The owneship of returned objects are transferred. - * @pre aSupportedProfileTypes.Count() == 0 - * @param aSupportedProfileTypes a reference to client-owned array, - * which on return is filled with supported profile types. - * Any existing data in the array is destroyed. - * @leave KErrNoMemory if out of memory - */ - IMPORT_C void SupportedProfileTypesL( - RArray& aSupportedProfileTypes); - - /** - * Gets the last occurred error during registration - * @param aProfile - * @return last occurred registration error, KErrNone if no error - */ - IMPORT_C TInt LastRegistrationError(const CSIPProfile& aProfile) const; - - public: - - /** - * Enable profile - * @param aProfile to be enabled - * @internalComponent - */ - void EnableProfileL(CSIPProfile& aProfile); - - /** - * Gets count of clients that have a profile enabled - * @param aProfile profile to be checked - * @return number of clients that have the profile enabled - * @internalComponent - */ - TInt UsageL(const CSIPProfile& aProfile) const; - - /** - * Disable profile - * @param aProfile to be disabled - * @internalComponent - */ - void DisableProfileL(CSIPProfile& aProfile); - - /** - * Force disable profile - * All Profile related activities will be stopped ungracefully - * @param aProfile to be disabled - * @internalComponent - */ - void ForceDisableProfileL(CSIPProfile& aProfile); - - /** - * Add profile - * @param aProfile to be added - * @internalComponent - */ - void AddProfileL(CSIPProfile& aProfile); - - /** - * Update profile - * @param aProfile to be updated - * @internalComponent - */ - void UpdateProfileL(CSIPProfile& aProfile); - - /** - * Remove profile - * @pre UsageL(aProfile) == 0 - * @param aProfile to be removed - * @internalComponent - */ - void RemoveProfileL(CSIPProfile& aProfile); - - /** - * Informs destruction of local profile object instance - * @param aProfile instance of deleted profile - * @internalComponent - */ - void ProfileDeleted(CSIPProfile& aProfile); - - /** - * Checks whether profile is default or not - * @param aProfile checked profile - * @return ETrue if is default, otherwise EFalse - * @internalComponent - */ - TBool IsDefaultProfileL(const CSIPProfile& aProfile); - - /** - * Updates SIP profile value for negotiated security mechanism; leaves on failure - * @param aProfile a SIP profile - * @internalComponent - */ - void NegotiatedSecurityMechanismL(CSIPConcreteProfile& aProfile); - - /** - * Updates SIP profile value for registered AORs; leaves on failure - * @param aProfile a SIP profile - * @internalComponent - */ - void RegisteredAORsL(CSIPConcreteProfile& aProfile); - - /** - * Gets new instance of either type CSIPProfile or CSIPManagedProfile - * @return new instance - * @internalComponent - */ - virtual CSIPProfile* NewInstanceL() = 0; - - /** - * Roll back in case of failure - * @param aItem object to be cleaned - * @internalComponent - */ - static void CrashRevert (TAny* aItem); - - /** - * Roll back in case of failure - * @param aItem object to be cleaned - * @internalComponent - */ - static void LocalCrashRevert (TAny* aItem); - - /** - * Gets the ITC member variable. - * The owneship of ITC is not transferred. - * @return Reference to ITC member variable. - * @internalComponent - */ - CSIPProfileITC& Itc(); - - /** - * Gets the ITC receiver member variable. - * The owneship of ITC receiver is not transferred. - * @return Reference to ITC receiver member variable. - * @internalComponent - */ - CSIPProfileITCReceiver& ItcReceiver(); - - - public: // From MSIPConcreteProfileObserver - - /** - * SIP profile registration status changed event - * @param aProfileId id of profile which registration - * status has been changed. - * @param aStatus new status of the profile - * @param aStatusId id related to registration - * @internalComponent - */ - void RegistrationStatusChangedL(TUint32 aProfileId, - TInt aStatus, - TUint32 aStatusId); - - /** - * SIP profile creation event. - * @param aProfileId id of new SIP Profile - * @internalComponent - */ - void AddedL(TUint32 aProfileId); - - /** - * SIP profile destruction event. - * @param aProfileId id of profile which was destroyed - * @internalComponent - */ - void RemovedL(TUint32 aProfileId); - - /** - * SIP profile information update event - * @param aProfileId id of updated SIP Profile - * @param aSize size of updated SIP Profile - * @internalComponent - */ - void UpdatedL(TUint32 aProfileId, TUint aSize); - - /** - * An asynchronous error has occurred related to SIP profile - * @param aProfileId the id of failed profile - * @param aStatus - * @param aError a error code - * @internalComponent - */ - void ErrorOccurredL(TUint32 aProfileId, - TInt aStatus, - TInt aError); - - protected: - - /** - * Constructor - * @param aObserver observer to send events to - * @internalComponent - */ - CSIPProfileRegistryBase(MSIPProfileRegistryObserver& aObserver); - - /** - * Symbian 2nd phase base class constructor - * @internalComponent - */ - void BaseConstructL(); - - /** - * Store profile into client cache - * @param aItem a cleanup item for roll back in case of failure - * @internalComponent - */ - void StoreProfileL(CSIPProfileCleanupItem* aItem); - - /** - * Store array of profiles into client cache - * @param aProfiles a array containing the profiles - * @param aRetProfiles returned array containing profiles - * @internalComponent - */ - void StoreArrayL( - RPointerArray& aProfiles, - RPointerArray& aRetProfiles); - - /** - * Gets profile cache item - * @param aProfileId a profile id to be found - * @return local cache item of the profile - * @internalComponent - */ - CSIPProfileItem* ProfileItemL(TUint aProfileId); - - /** - * Gets profile cache item index - * @param aProfileId a profile id to be found - * @return local cache item index of the profile - * @internalComponent - */ - TInt ProfileIndex (TUint aProfileId); - - /** - * Gets profile cache item by index - * @param aIndex a index of the profile to be found - * @return local cache item of the profile - * @internalComponent - */ - CSIPProfileItem* ProfileItemByIndex(TUint aIndex); - - /** - * Gets SIP profile identified by the Id; leaves on failure - * The owneship of profile is transferred. - * @param aId a SIP profile Id - * @param aSize of profile if known - * @return SIP profile or 0 pointer if there's no such SIP profile - * @internalComponent - */ - CSIPProfile* SIPProfileL(TUint32 aId, TInt aSize = 0); - - protected: // Data - - /** - * @internalComponent - */ - RSIPProfile* iSipClient; - - /** - * @internalComponent - */ - CSIPProfileITCReceiver* iITCReceiver; - - /** - * @internalComponent - */ - CSIPProfileITC* iITC; - - /** - * @internalComponent - */ - MSIPProfileRegistryObserver& iObserver; - - /** - * @internalComponent - */ - RPointerArray iProfiles; - - /** - * @internalComponent - */ - CSIPProfilePlugins* iProfilePlugins; - - /** - * @internalComponent - */ - CSIPProfileItem* iFindEntry; - - private: - - void ProfilesCommonL(RPointerArray& aProfiles, - CSIPConcreteProfileHolder* aHolder); - - }; - -#endif // CSIPPROFILEREGISTRYBASE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofileregistryobserver.h --- a/epoc32/include/sipprofileregistryobserver.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofileregistryobserver.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The observer class for monitoring SIP profiles. -* Version : 1.0 -* -*/ - - - -#ifndef MSIPPROFILEOREGISTRYBSERVER_H -#define MSIPPROFILEOREGISTRYBSERVER_H - -// INCLUDES -#include -#include - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* The observer class for monitoring SIP profiles. -* Class must be implemented by the user in order to -* observe changes in the SIP profiles. -*/ -class MSIPProfileRegistryObserver - { - public: - /** Profile Registry events */ - enum TEvent - { - /** - * Signals the creation of a SIP profile, indicating that a new - * profile is added into permanent store. This event is sent to - * all observers. - */ - EProfileCreated = 0, - /** - * Signals the updating of a SIP profile, indicating that the data of - * an existing profile is updated into permanent store. This event is - * sent to those observers who have the corresponding profile - * instantiated. - * Newly updated values of the profile are available for clients after - * they receive this signal.If profile was registered while updated, - * reregistration of the profile may occur. Updated values of the - * profile are uploaded into network when SIP registration process - * is completed.It is possible (but not recommended) that profile is - * updated even when it is being enabled by the client. If client - * receives this event for enabled profile, client should react as if - * error was occurred in the exception that profile is disabled - * or deleted first. - */ - EProfileUpdated, - /** - * Signals the changing of the registration status of a SIP profile - * to registered. - * This event is sent to those observers who have the corresponding - * profile instantiated. - */ - EProfileRegistered, - /** - * Signals the changing of the registration status of a SIP profile - * to deregistered. - * This event is sent to those observers who have the corresponding - * profile instantiated. - */ - EProfileDeregistered, - /** - * Signals the destruction of a SIP profile, indicating that the - * profile has been removed from the permanent store and cannot - * be used anymore.This event is sent to those observers who have - * the corresponding profile instantiated. - */ - EProfileDestroyed, - /** - * Signals the force disabling of a SIP profile, indicating that - * all the users attached to the profile are detached. This event - * is sent to all the observers but ForceDisable API can be invoked - * only by application with Network Control capability. - */ - EProfileForciblyDisabled - }; - - /** - * An event related to SIP Profile has accorred - * @param aProfileId a profile Id - * @param aEvent an occurred event - **/ - virtual void ProfileRegistryEventOccurred(TUint32 aProfileId, - TEvent aEvent)=0; - - /** - * An asynchronous error has occurred related to SIP profile - * Event is send to those observers, who have the - * corresponding profile instantiated. - * @param aProfileId the id of failed profile - * @param aError an occurred error - */ - virtual void ProfileRegistryErrorOccurred(TUint32 aProfileId, - TInt aError)=0; - }; - -#endif // MSIPPROFILEOREGISTRYBSERVER_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofileservercrkeys.h --- a/epoc32/include/sipprofileservercrkeys.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofileservercrkeys.h -* Part of : SIP ProfileAgent API -* -*/ - - - -#ifndef PROFILESERVERCRKEYS_H_ -#define PROFILESERVERCRKEYS_H_ - -// INCLUDES -#include - -/** -* @file -* @publishedAll -* @released -*/ - -/** -* Key space configuration used by the SIP ProfileAgent. -*/ -const TUid KCRUidProfileSrv = { 0x2001F889 }; - -#define KSIPProfileTableMask 0xFF000000 -#define KSIPProfileTableShift 24 - -#define KSIPProfileTypeMask 0x00FF0000 -#define KSIPProfileTypeShift 16 - -#define KSIPProfilePropertyMask 0x0000FFFF -#define KSIPProfilePropertyShift 0 - -#define KSIPProfilePropertiesTable 0x01000000 - -#endif /*PROFILESERVERCRKEYS_H_*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipprofiletypeinfo.h --- a/epoc32/include/sipprofiletypeinfo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipprofiletypeinfo.h -* Part of : SIP Profile Client -* Interface : SDK API, SIP Profile API -* The class provides a container for the profile type information -* Version : 1.0 -* -*/ - - - -#ifndef TSIPPROFILETYPEINFO_H -#define TSIPPROFILETYPEINFO_H - -// INCLUDES -#include - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Container for the profile type information. -* -* @lib sipprofilecli.lib -*/ -class TSIPProfileTypeInfo - { - public: - - /** Profile type name */ - typedef TBuf8<25> TSIPProfileName; - - /** Profile classes */ - enum TSIPProfileClass - { - /** Network compliant with IETF standards */ - EInternet, - /** Network compliant with 3GPP standards */ - EIms, - /** Other */ - EOther, - EMaxSIPProfileClass - }; - - public: // data members - - /** Profile class */ - TSIPProfileClass iSIPProfileClass; - - /** Profile type name */ - TSIPProfileName iSIPProfileName; - }; - -#endif // TSIPPROFILETYPEINFO_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipproxyauthenticateheader.h --- a/epoc32/include/sipproxyauthenticateheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipproxyauthenticateheader.h -* Part of : SIP Codec -* Version : SIP/5.0 -* -*/ - - - -#ifndef CSIPPROXYAUTHENTICATEHEADER_H -#define CSIPPROXYAUTHENTICATEHEADER_H - -// INCLUDES -#include "sipauthenticateheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for SIP Proxy-Authenticate-header manipulation. -* -* @lib sipcodec.lib -*/ -class CSIPProxyAuthenticateHeader : public CSIPAuthenticateHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPProxyAuthenticateHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Proxy-Authenticate"-header - * @return a new instance of CSIPProxyAuthenticateHeader - */ - IMPORT_C static CSIPProxyAuthenticateHeader* - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPProxyAuthenticateHeader - * @return a new instance of CSIPProxyAuthenticateHeader - */ - IMPORT_C static CSIPProxyAuthenticateHeader* - NewL(RStringF aAuthScheme); - - /** - * Creates a new instance of CSIPProxyAuthenticateHeader - * @return a new instance of CSIPProxyAuthenticateHeader - */ - IMPORT_C static CSIPProxyAuthenticateHeader* - NewLC(RStringF aAuthScheme); - - /** - * Destructor - */ - IMPORT_C ~CSIPProxyAuthenticateHeader(); - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - private: // Constructors - - CSIPProxyAuthenticateHeader(); - - private: // For testing purposes - - UNIT_TEST(CSIPProxyAuthenticateHeaderTest) - }; - -#endif // CSIPPROXYAUTHENTICATEHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipproxyauthorizationheader.h --- a/epoc32/include/sipproxyauthorizationheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipproxyauthorizationheader.h -* Part of : SIP Codec -* Version : SIP/6.0 -* -*/ - - - -#ifndef CSIPPROXYAUTHORIZATIONHEADER_H -#define CSIPPROXYAUTHORIZATIONHEADER_H - -// INCLUDES -#include "sipauthorizationheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for SIP Proxy-Authorization-header manipulation. -* -* @lib sipcodec.lib -*/ -class CSIPProxyAuthorizationHeader : public CSIPAuthorizationHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPProxyAuthorizationHeader - * from textual representation of the header's value part. - * @param aValue a value part of a "Proxy-Authenticate"-header - * @return a new instance of CSIPProxyAuthorizationHeader - */ - IMPORT_C static CSIPProxyAuthorizationHeader* - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPProxyAuthorizationHeader - * @return a new instance of CSIPProxyAuthorizationHeader - */ - IMPORT_C static CSIPProxyAuthorizationHeader* - NewL(RStringF aAuthScheme); - - /** - * Creates a new instance of CSIPProxyAuthorizationHeader - * @return a new instance of CSIPProxyAuthorizationHeader - */ - IMPORT_C static CSIPProxyAuthorizationHeader* - NewLC(RStringF aAuthScheme); - - /** - * Creates a deep-copy of a CSIPAuthorizationHeaderBase - * @param aAuthenticateHeaderBase to be copied - * @return a new instance of CSIPProxyAuthorizationHeader - */ - IMPORT_C static CSIPProxyAuthorizationHeader* - NewL(const CSIPAuthorizationHeaderBase& aHeader); - - /** - * Creates a deep-copy of a CSIPAuthorizationHeaderBase - * @param aAuthenticateHeaderBase to be copied - * @return a new instance of CSIPProxyAuthorizationHeader - */ - IMPORT_C static CSIPProxyAuthorizationHeader* - NewLC(const CSIPAuthorizationHeaderBase& aHeader); - - /** - * Destructor - */ - IMPORT_C ~CSIPProxyAuthorizationHeader(); - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ExternalizeSupported - */ - IMPORT_C TBool ExternalizeSupported() const; - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - public: // New functions, for internal use - - /** - * @internalComponent - */ - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - /** - * @internalComponent - */ - static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - private: // Constructors - - CSIPProxyAuthorizationHeader(); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // For testing purposes - - UNIT_TEST(CSIPProxyAuthorizationHeaderTest) - }; - -#endif // CSIPPROXYAUTHORIZATIONHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipproxyrequireheader.h --- a/epoc32/include/sipproxyrequireheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipproxyrequireheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPPROXYREQUIREHEADER_H -#define CSIPPROXYREQUIREHEADER_H - -// INCLUDES -#include "siptokenheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in -* SIP "Proxy-Require" header. -* -* @lib sipcodec.lib -*/ -class CSIPProxyRequireHeader : public CSIPTokenHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPProxyRequireHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Proxy-Require"-header - * @return an array containing 1..n instances of CSIPProxyRequireHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPProxyRequireHeader - * @param aValue a tag value - * @return a new instance of CSIPProxyRequireHeader - */ - IMPORT_C static CSIPProxyRequireHeader* NewL(RStringF aValue); - - /** - * Creates a new instance of CSIPProxyRequireHeader - * and puts it to CleanupStack - * @param aValue a tag value - * @return a new instance of CSIPProxyRequireHeader - */ - IMPORT_C static CSIPProxyRequireHeader* NewLC(RStringF aValue); - - /** - * Destructor, deletes the resources of CSIPProxyRequireHeader. - */ - IMPORT_C ~CSIPProxyRequireHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPProxyRequireHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPProxyRequireHeader - */ - IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, For internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPProxyRequireHeader(); - CSIPProxyRequireHeader(const CSIPProxyRequireHeader& aHeader); - }; - -#endif // end of CSIPPROXYREQUIREHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprackheader.h --- a/epoc32/include/siprackheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprackheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPRACKHEADER_H -#define CSIPRACKHEADER_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting sequence number and -* method in SIP "RAck"-header. -* -* @lib sipcodec.lib -*/ -class CSIPRAckHeader : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPRAckHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "RAck"-header (e.g. "1 2 INVITE") - * @return a new instance of CSIPRAckHeader. - */ - IMPORT_C static CSIPRAckHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPRAckHeader - * @param aSeq a sequence number to set - * @param aCSeqNum a sequence number from CSeq-header - * @param aMethod a method to set. For example "REGISTER" - * @return a new instance of CSIPRAckHeader - */ - IMPORT_C static CSIPRAckHeader* NewL(TUint aSeq, - TUint aCSeqNum, - RStringF aMethod); - - - /** - * Creates a new instance of CSIPRAckHeader and puts it to CleanupStack - * @param aSeq a sequence number to set - * @param aCSeqNum a sequence number from CSeq-header - * @param aMethod a method to set. For example "REGISTER" - * @return a new instance of CSIPRAckHeader - */ - IMPORT_C static CSIPRAckHeader* NewLC(TUint aSeq, - TUint aCSeqNum, - RStringF aMethod); - - /** - * Destructor, deletes the resources of CSIPRAckHeader. - */ - IMPORT_C ~CSIPRAckHeader(); - - - public: // New functions - - /** - * Gets the sequence number from the "RAck" header - * @return the current sequence number - */ - IMPORT_C TUint Seq() const; - - /** - * Sets the sequence number in the "RAck" header - * @param aSeq a sequence number to set - */ - IMPORT_C void SetSeq(TUint aSeq); - - /** - * Gets the sequence number from the "RAck" header - * @return the current sequence number - */ - IMPORT_C TUint CSeqNum() const; - - /** - * Sets the sequence number in the "RAck" header - * @param aCSeqNum a sequence number to set - */ - IMPORT_C void SetCSeqNum(TUint aCSeqNum); - - /** - * Gets the method from the "RAck" header - * @return the method - */ - IMPORT_C RStringF Method() const; - - /** - * Sets the method in the "RAck" header - * @param aMethod a method to set - */ - IMPORT_C void SetMethodL(RStringF aMethod); - - /** - * Constructs an instance of a CSIPRAckHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPRAckHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL (RWriteStream& aWriteStream) const; - - private: // Constructors - - CSIPRAckHeader(); - CSIPRAckHeader(TUint aSeq, TUint aCSeqNum); - void ConstructL(RStringF aMethod); - void ConstructL(const CSIPRAckHeader& aRAckHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - void ParseL(const TDesC8& aValue); - void SetMethodL(const TDesC8& aMethod); - - private: // Data - - TUint iSeq; - TUint iCSeqNum; - RStringF iMethod; - - private: // For testing purposes - - UNIT_TEST(CSIPRAckHeaderTest) - }; - -#endif // CSIPRACKHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipreferdialogassoc.h --- a/epoc32/include/sipreferdialogassoc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,287 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipreferdialogassoc.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPREFERDIALOGASSOC_H -#define CSIPREFERDIALOGASSOC_H - -// INCLUDES -#include "sipdialogassocbase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class CUri8; -class CSIPToHeader; -class CSIPFromHeader; -class CSIPContactHeader; -class CSIPReferToHeader; -class MSIPRegistrationContext; -class CSIPConnection; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP REFER dialog associations. -* It provides services for creating, using and terminating SIP REFER -* dialog associations. User can have multiple REFER dialog associations -* per same SIP dialog. -* Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, -* local and remote tags; -* User is responsible for "Refer-to" header semantics. -* @lib sipclient.lib -*/ -class CSIPReferDialogAssoc: public CSIPDialogAssocBase - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * Should be used if response to the SIP request to be sent - * will create a SIP dialog association. - * @pre aReferTo != 0 - * @param aDialog a dialog to be associated with - * @param aReferTo referred-to resource - * @return New object; the ownership is transferred - * @leave KErrArgument if aReferTo == 0 - */ - IMPORT_C static CSIPReferDialogAssoc* - NewL(CSIPDialog& aDialog, - CSIPReferToHeader* aReferTo); - - /** - * Two-phased constructor. - * Must be used if response to the SIP request to be sent - * will create a SIP dialog association. - * @pre aReferTo != 0 - * @param aDialog a dialog to be associated with - * @param aReferTo referred-to resource - * @return New object; the ownership is transferred - * @leave KErrArgument if aReferTo == 0 - */ - IMPORT_C static CSIPReferDialogAssoc* - NewLC(CSIPDialog& aDialog, - CSIPReferToHeader* aReferTo); - - /** - * Two-phased constructor - * @pre aFrom != 0 - * @pre aReferTo != 0 - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @param aConnection a SIP connection to be used with - * dialog association - * @param aFrom originator's address; the ownership is transfered - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is addressed to. - * @param aReferTo referred-to resource - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aFrom == 0 or aRemoteuri == 0 or aReferTo == 0 - */ - IMPORT_C static CSIPReferDialogAssoc* - NewL(CSIPConnection& aConnection, - CSIPFromHeader* aFrom, - CUri8* aRemoteUri, - CSIPReferToHeader* aReferTo, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aFrom != 0 - * @pre aReferTo != 0 - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @param aConnection a SIP connection to be used with - * dialog association - * @param aFrom originator's address; the ownership is transfered - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is addressed to. - * @param aReferTo referred-to resource - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aFrom == 0 or aRemoteuri == 0 or aReferTo == 0 - */ - IMPORT_C static CSIPReferDialogAssoc* - NewLC(CSIPConnection& aConnection, - CSIPFromHeader* aFrom, - CUri8* aRemoteUri, - CSIPReferToHeader* aReferTo, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aReferTo != 0 - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @pre aContext.IsContextActive() == ETrue - * @param aConnection a SIP connection to be used with - * dialog association - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is targeted to. - * @param aContext used for selecting outbound - * proxy and originator's address (AOR) and contact - * @param aReferTo referred-to resource - * @param aFrom originator's address. If not defined it will - * constructed using registration context (User's AOR); - * the ownership is transfered - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object: the ownership is transferred. - * @leave KErrArgument if aRemoteuri == 0 or aReferTo == 0 - * @leave KErrSIPInvalidRegistrationState - * if aContext.IsContextActive() == EFalse - */ - IMPORT_C static CSIPReferDialogAssoc* - NewL(CSIPConnection& aConnection, - CUri8* aRemoteUri, - const MSIPRegistrationContext& aContext, - CSIPReferToHeader* aReferTo, - CSIPFromHeader* aFrom=0, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aReferTo != 0 - * @pre aRemoteUri != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @pre aContext.IsContextActive()==ETrue - * @param aConnection a SIP connection to be used with - * dialog association - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is targeted to. - * @param aContext used for selecting outbound - * proxy and originator's address (AOR) and contact - * @param aReferTo referred-to resource - * @param aFrom originator's address. If not defined it will - * constructed using registration context (User's AOR); - * the ownership is transfered - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aRemoteuri == 0 or aReferTo == 0 - * @leave KErrSIPInvalidRegistrationState - * if aContext.IsContextActive() == EFalse - */ - IMPORT_C static CSIPReferDialogAssoc* - NewLC(CSIPConnection& aConnection, - CUri8* aRemoteUri, - const MSIPRegistrationContext& aContext, - CSIPReferToHeader* aReferTo, - CSIPFromHeader* aFrom=0, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Destructor - */ - IMPORT_C ~CSIPReferDialogAssoc(); - - public: //New functions - - /** - * Creates REFER and sends it to the remote target. - * leaves on failure. - * 101-199 or 2xx response will create REFER dialog - * association in case of first REFER request within - * this dialog association. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EInit || - * Dialog().State()==CSIPDialog::EConfirmed - * @param aElements optional SIP message headers and body. Ownership is - * transferred. - * @return REFER SIP transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if dialog is in wrong state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted. - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendReferL(CSIPMessageElements* aElements=0); - - /** - * Gets referred-to resouce - * @return referred-to resource - */ - IMPORT_C const CSIPReferToHeader& ReferTo() const; - - public: // New functions, for internal use - - /** - * Sends a REFER request. - * - * @pre Dialog().Connection().State()==EActive - * @param aElements optional SIP message headers and body. - * Ownership is transferred. - * @param aWithinDialog ETrue if REFER is sent within dialog, - * EFalse if REFER creates the dialog. - * @return REFER SIP transaction. Ownership is transferred. - */ - CSIPClientTransaction* DoSendReferL(CSIPMessageElements* aElements, - TBool aWithinDialog); - - private: // Constructors - - CSIPReferDialogAssoc(); - - static CSIPReferDialogAssoc* NewLC(CSIPConnection& aConnection, - CUri8* aRemoteUri, - CSIPReferToHeader* aReferTo, - CSIPFromHeader* aFrom, - CSIPToHeader* aTo, - CSIPContactHeader* aContact, - const MSIPRegistrationContext* aContext); - - private: // Data - - CSIPReferToHeader* iReferTo; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprefertoheader.h --- a/epoc32/include/siprefertoheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprefertoheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPREFERTOHEADER_H -#define CSIPREFERTOHEADER_H - -// INCLUDES -#include "sipaddressheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPHeaderGenericParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP -* "Refer-To" header. -* -* @lib sipcodec.lib -*/ -class CSIPReferToHeader : public CSIPAddressHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPReferToHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Refer-To"-header - * (e.g. "User ") - * @return a new instance of CSIPReferToHeader - */ - IMPORT_C static CSIPReferToHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPReferToHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred. - * @return a new instance of CSIPReferToHeader - */ - IMPORT_C static CSIPReferToHeader* NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPReferToHeader and puts it to CleanupStack - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred, - * @return a new instance of CSIPReferToHeader - */ - IMPORT_C static CSIPReferToHeader* NewLC(CSIPAddress* aSIPAddress); - - /** - * Destructor, deletes the resources of CSIPReferToHeader. - */ - IMPORT_C virtual ~CSIPReferToHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPReferToHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPReferToHeader - */ - IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPReferToHeader(); - - private: // For testing purposes - - UNIT_TEST(CSIPReferToHeaderTest) - }; - -#endif // end of CSIPREFERTOHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprefresh.h --- a/epoc32/include/siprefresh.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprefresh.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - - -#ifndef CSIPREFRESH_H -#define CSIPREFRESH_H - -// INCLUDES -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPClientTransaction; -class CSIPMessageElements; -class MSIPRefreshAssociation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP refresh. -* It provides functions for getting associated sip transaction -* and state. Class also provides functions for updating and terminating -* stand-alone refreshes. -* -* Note that only stand-alone refreshes (i.e. refreshes that are not associated -* with registration binding or dialog associations) can be terminated or -* updated using functions defined in this class. -* -* @lib sipclient.lib -*/ -class CSIPRefresh: public CBase - { - public: - - /** SIP refresh states */ - enum TState - { - /** SIP refresh is inactive */ - EInactive, - /** SIP refresh active */ - EActive, - /** SIP refresh is terminated */ - ETerminated, - /** Object is being constructed and is not yet ready for use */ - EConstructing - }; - - public: // Constructors and destructor - - /** - * Two-phased constructor - * @return New object. Ownership is transferred. - */ - IMPORT_C static CSIPRefresh* NewL(); - - /** - * Two-phased constructor - * @return New object. Ownership is transferred. - */ - IMPORT_C static CSIPRefresh* NewLC(); - - /** - * Destructor - */ - IMPORT_C ~CSIPRefresh(); - - public: // New functions - - /** - * Gets the state of the refresh - * @return refresh state - */ - IMPORT_C CSIPRefresh::TState State() const; - - /** - * Tests if the refresh is a stand-alone refresh - * @return ETrue if refresh is a stand-alone; EFalse otherwise - */ - IMPORT_C TBool IsStandAlone() const; - - /** - * Gets the associated SIP transaction with this refresh. - * - * @return Associated SIP transaction or 0-pointer. Ownership is not - * transferred. - */ - IMPORT_C const CSIPClientTransaction* SIPTransaction() const; - - /** - * Terminates the refresh by sending SIP request to the remote - * destination. The new client transactation will be of the same type - * as the first transaction associated with this request. - * @pre State()==EActive - * @pre IsStandAlone()==ETrue - * @param aElements contains optional SIP message headers and body. - * Ownership is transferred. - * @return SIP client transaction. Ownership is transferred. - * @leave KErrSIPInvalidTransactionState if State() is not EActive - * KErrNotFound if the CSIPRefresh is no longer associated to - * anything - * KSIPErrInvalidRegistrationState if trying to terminate a - * REGISTER refresh. - * KErrSIPInvalidDialogState if trying to terminate a dialog - * association being refreshed. - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - TerminateL(CSIPMessageElements* aElements=0); - - /** - * Updates the refresh by sending SIP request to the remote destination. - * The new client transactation will be of the same type as the first - * transaction associated with this request. - * @pre State()==EActive - * @pre IsStandAlone()==ETrue - * @param aElements contains optional SIP message headers and body. - * Ownership is transferred. - * @return SIP client transaction. Ownership is transferred. - * @leave KErrSIPInvalidTransactionState if State() is not EActive - * KErrNotFound if the CSIPRefresh is no longer associated to - * anything - * KErrSIPInvalidRegistrationState if trying to update a - * REGISTER refresh. - * KSIPErrInvalidDialogState if trying to update a - * dialog association being refreshed. - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - UpdateL(CSIPMessageElements* aElements=0); - - /** - * Compares this object to another object - * @param aRefresh a CSIPRefresh type object to compare - * @return ETrue if the objects are equal otherwise EFalse - */ - IMPORT_C TBool operator==(const CSIPRefresh& aRefresh) const; - - /** - * Gets current refresh interval - * @pre State()==CSIPRefresh::EActive - * @return current refresh interval in seconds - * @leave KErrSIPInvalidTransactionState if State() is not EActive - * @leave KErrSIPResourceNotAvailable if SIP server can't be contacted - * because a required resource has been deleted. - */ - IMPORT_C TUint IntervalL() const; - - /** - * Sets refresh interval. - * Note that SIP server choses the refresh interval. This function should - * be used only if SIP server has indicated new refresh interval using - * SIP messages that are not associated to the refresh needing the update. - * @pre State()==CSIPRefresh::EActive - * @pre aInterval > 0 - * @param aInterval a new interval in seconds - * @leave KErrArgument if aInterval == 0 - * @leave KErrSIPInvalidTransactionState if State() is not EActive - * @leave KErrSIPResourceNotAvailable if SIP server can't be contacted - * because a required resource has been deleted. - */ - IMPORT_C void SetIntervalL(TUint aInterval); - - public: // New functions, for internal use - - TBool DoesMatch(TUint32 aRefreshId) const; - - /** - * Associate the CSIPRefresh with another object. - * @param aAssoc Object associated with the CSIPRefresh - * @return ETrue if the objects are equal otherwise EFalse - */ - void SetRefreshOwner(MSIPRefreshAssociation& aAssoc); - - void RemoveRefreshOwner(const MSIPRefreshAssociation& aAssoc); - - void ChangeState(CSIPRefresh::TState aNextState); - - void UpdateRefreshState(TUint aStatusCode); - - TUint32 RefreshId() const; - - void SetRefreshIdIfEmpty(TUint32 aRefreshId); - - RStringF RequestType() const; - - void SetRequestType(RStringF aType); - - void AddTransaction(CSIPClientTransaction& aTransaction); - - void RemoveTransaction(); - - CSIPClientTransaction* Transaction(); - - private: // Constructors - - CSIPRefresh(); - - void ConstructL(); - - private: - - void CheckStateL() const; - - private: // Data - - MSIPRefreshAssociation* iOwner; - - //Client transaction which is refreshed, not owned by CSIPRefresh. - CSIPClientTransaction* iClientTransaction; - - //Current state of the refresh - TState iState; - - //RefreshId received from SIP client - TUint32 iRefreshId; - - //Identifies the request method which is being refreshed - RStringF iRequestType; - - private: // For testing purposes - - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPConnection_Test) - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipregistrationbinding.h --- a/epoc32/include/sipregistrationbinding.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,336 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipregistrationbinding.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPREGISTRATIONBINDING_H -#define CSIPREGISTRATIONBINDING_H - -// INCLUDES -#include "sipregistrationcontext.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CUri8; -class CSIPToHeader; -class CSIPFromHeader; -class CSIPContactHeader; -class CSIPRouteHeader; -class CSIPMessageElements; -class CSIPConnection; -class CSIPRefresh; -class CSIPClientTransaction; -class CRegBindingImplementation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP registration binding. -* Class provides functions for creating and updating SIP registration bindings. -* -* @lib sipclient.lib -*/ -class CSIPRegistrationBinding : - public CBase, - public MSIPRegistrationContext - { - public: // Constructors and destructor - - /** - * Two-phased constructor. - * @pre aAor != 0 && - * aContact != 0 - * @pre "Expires" parameter in aContact must be >= KSIPMinExpirationValue - * @param aConnection a SIP connection to be used - * @param aAor contains user's address-of-record to register; - * the ownership is transfered - * @param aContact contact(s) to be registered. The "expires" parameter - * indicates how long the client would like the binding to be - * valid. - * "expires" parameter value must be >= KSIPMinExpirationValue; - * the ownership is transfered - * @param aRefresh if set, created binding will be refreshed; - * the ownership is transfered - * @param aOutboundProxy an outbound proxy address; - * the ownership is transfered - * @param aRemoteUri if set, will be used in request-uri construction; - * the ownership is transfered - * @param aFrom From header, the ownership is transferred - * @return New object, ownership is transferred. - * @leave KErrArgument if aAor == 0, aContact == 0 or if "Expires" - * parameter in aContact is less than KSIPMinExpirationValue - */ - IMPORT_C static CSIPRegistrationBinding* - NewL(CSIPConnection& aConnection, - CSIPToHeader* aAor, - CSIPContactHeader* aContact, - CSIPRefresh* aRefresh=0, - CSIPRouteHeader* aOutboundProxy=0, - CUri8* aRemoteUri=0, - CSIPFromHeader* aFrom=0); - - /** - * Two-phased constructor. - * @pre aAor != 0 && - * aContact != 0 - * @pre "Expires" parameter in aContact must be >= KSIPMinExpirationValue - * @param aConnection a SIP connection to be used - * @param aAor contains user's address-of-record to register; - * the ownership is transfered - * @param aContact contact to be registered; The "expires" parameter - * indicates how long the client would like the binding to be - * valid. - * "expires" parameter value must be >= KSIPMinExpirationValue; - * the ownership is transfered - * @param aRefresh if set, created binding will be refreshed; - * the ownership is transfered - * @param aOutboundProxy an outbound proxy address; - * the ownership is transfered - * @param aRemoteUri if set, will be used in request-uri construction; - * the ownership is transfered - * @param aFrom From header, the ownership is transferred - * @return New object, ownership is transferred. - * @leave KErrArgument if aAor == 0, aContact == 0 or if "Expires" - * parameter in aContact is less than KSIPMinExpirationValue - */ - IMPORT_C static CSIPRegistrationBinding* - NewLC(CSIPConnection& aConnection, - CSIPToHeader* aAor, - CSIPContactHeader* aContact, - CSIPRefresh* aRefresh=0, - CSIPRouteHeader* aOutboundProxy=0, - CUri8* aRemoteUri=0, - CSIPFromHeader* aFrom=0); - - /** - * Destructor - */ - IMPORT_C ~CSIPRegistrationBinding(); - - public: //From MSIPRegistrationContext: - - /** - * Checks if the registration context can be - * used for creating SIP messages/dialogs - * @return ETrue if the registration binding exists; EFalse - * otherwise - */ - IMPORT_C TBool IsContextActive() const; - - /** - * Gets the context id - * @return context id - * For internal use only - */ - IMPORT_C TUint32 ContextId() const; - - public: // New functions - /** - * Creates SIP REGISTER request, sends it to the given destination. - * Received 2xx response will create at least one registration - * binding. - * @pre Connection().State()==EActive - * @param aElements contains user SIP headers and content; the ownership - * is taken - * @return SIP REGISTER transaction; the ownership is transfered - * @leave KErrSIPMalformedMessage if aElements contains contact or - * expires headers - * @leave KErrSIPInvalidRegistrationState if already registered or - * registering is in progress or deregistering is in progress. - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - RegisterL(CSIPMessageElements* aElements=0); - - /** - * Creates SIP (de)REGISTER request, sends it to the given destination. - * This function will remove registration binding. - * Any SIP response (2xx - 6xx) to this request removes the binding. - * Note that deregistration can be done then the 2xx is received to the - * initial REGISTER transaction and there is no on-going registration - * updates. - * @pre Connection().State()==EActive - * @pre IsContextActive()==ETrue - * @param aElements contains user SIP headers and content; the ownership - * is transfered. If set, user SIP headers must not contain any - * Contact-header nor Expires-header - * @return SIP REGISTER transaction; the ownership is transfered - * @leave KErrSIPInvalidRegistrationState if IsContextActive()==EFalse - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - DeregisterL(CSIPMessageElements* aElements=0); - - /** - * Updates the registration binding. Note that update can be done - * then the 2xx is received to the REGISTER transaction that relates - * to the initial registration or to update. - * @pre aElements!=0 - * @pre Connection().State()==EActive - * @pre IsContextActive()==ETrue - * @param aElements contains user SIP header and content, must not - * contain any Contact-header nor Expires-header; - * the ownership is transferred. - * @return SIP REGISTER transaction; the ownership is transfered - * @leave KErrArgument if aElements == NULL - * @leave KErrSIPInvalidRegistrationState if IsContextActive()==EFalse - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* UpdateL(CSIPMessageElements* aElements); - - /** - * Updates the regisration binding. Note that update can be done - * then the 2xx is received to the REGISTER transaction that relates - * to the initial registration or to update. - * @pre aExpirationValue >= KSIPMinExpirationValue - * @pre Connection().State()==EActive - * @pre IsContextActive()==ETrue - * @param aExpirationValue a new expiration value in seconds - * @param aElements contains user SIP headers and content; must not - * contain any Contact-header nor Expires-header; - * the ownership is transferred. - * @return SIP REGISTER transaction; the ownership is transfered - * @leave KErrSIPInvalidRegistrationState if IsContextActive()==EFalse - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - UpdateL(TUint aExpirationValue, CSIPMessageElements* aElements=0); - - /** - * Gets the SIP connection used for the registration. - * @return SIP connection used for the registration, or 0-pointer if the - * connection has been deleted. Ownership is not transferred. - */ - IMPORT_C CSIPConnection* Connection(); - - /** - * Gets the SIP connection used for the registration. - * @return SIP connection used for the registration, or 0-pointer if the - * connection has been deleted. Ownership is not transferred. - */ - IMPORT_C const CSIPConnection* Connection() const; - - /** - * Sets/resets outbound proxy. - * If a 0-pointer is given the outbound proxy will be reset. - * @param aOutboundProxy an outbound proxy. Ownership is transferred. - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C void SetOutboundProxyL(CSIPRouteHeader* aOutboundProxy); - - /** - * Gets the address-of-record (AOR) used for creating binding - * @return address-of-record (AOR) - */ - IMPORT_C const CSIPToHeader& Aor() const; - - /** - * Gets Contact header associated with the registration binding - * @return Contact header - */ - IMPORT_C const CSIPContactHeader& ContactHeader() const; - - /** - * Gets Contact header associated with the registration binding - * @return Contact header - */ - IMPORT_C CSIPContactHeader& ContactHeader(); - - /** - * Gets used outbound proxy - * @return outbound proxy or a 0-pointer if not set. Ownership is not - * transferred. - */ - IMPORT_C const CSIPRouteHeader* OutboundProxy() const; - - /** - * Gets associated refresh in case the user has requested the refresh of - * the registration. Note that client cannot use update or terminate - * functions defined in the CSIPRefresh class. - * @return Associated refresh or a 0-pointer if the user has not - * requested a refresh of registration binding. Ownership is not - * transferred. - */ - IMPORT_C const CSIPRefresh* SIPRefresh() const; - - /** - * Gets associated refresh in case the user has requested the refresh of - * the registration. Note that client cannot use update or terminate - * functions defined in the CSIPRefresh class. - * @return Associated refresh or a 0-pointer if the user has not - * requested a refresh of registration binding. Ownership is not - * transferred. - */ - IMPORT_C CSIPRefresh* SIPRefresh(); - - /** - * Compares this object to another object - * @param aRegistration CSIPRegistrationBinding object to compare - * @return ETrue if the objects are equal, otherwise EFalse - */ - IMPORT_C TBool - operator==(const CSIPRegistrationBinding& aRegistration) const; - - /** - * Gets the registered Contact-header received in the 200 OK response. - * @return Contact header, or NULL if IsContextActive() is EFalse. - * Ownership is not transferred. - */ - IMPORT_C const CSIPContactHeader* RegisteredContact() const; - - public: // New functions, for internal use - /** - * Returns the implementation instance. - * - * @return CRegBindingImplementation - */ - CRegBindingImplementation& Implementation(); - - private: // Constructors - CSIPRegistrationBinding(); - - void ConstructL(CSIPConnection& aConnection, - CSIPToHeader* aAor, - CSIPContactHeader* aContacts, - CSIPRefresh* aRefresh, - CSIPRouteHeader* aOutboundProxy, - CUri8* aRemoteUri, - CSIPFromHeader* aFrom); - - private: // Data - CRegBindingImplementation* iImplementation; - - private: // For testing purposes - - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPRegistrationBinding_Test) - UNIT_TEST(CSIPInviteDialogAssoc_Test) - UNIT_TEST(CSIPSubscribeDialogAssoc_Test) - UNIT_TEST(CSIPReferDialogAssoc_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipregistrationcontext.h --- a/epoc32/include/sipregistrationcontext.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipregistrationcontext.h -* Part of : SIP Client -* Interface : SDK API, SIP API -* Version : 1.0 -* -*/ - - - - -#ifndef MSIPREGISTRATIONCONTEXT_H -#define MSIPREGISTRATIONCONTEXT_H - -// INCLUDES -#include - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* The interface for providing -* information for the SIP request and -* dialog creation. -* -* @lib n/a -*/ -class MSIPRegistrationContext - { - public: // New functions - /** - * Destructor - */ - virtual ~MSIPRegistrationContext() {} - - /** - * Checks if the registration context can be - * used for creating SIP messages/dialogs - * - * @return ETrue if can be used, EFalse otherwise - */ - virtual TBool IsContextActive() const = 0; - - /** - * Gets the context id. - * - * @return Context id - * For internal use only - */ - virtual TUint32 ContextId() const = 0; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipreplytoheader.h --- a/epoc32/include/sipreplytoheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipreplytoheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPREPLYTOHEADER_H -#define CSIPREPLYTOHEADER_H - -// INCLUDES -#include "sipaddressheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPHeaderGenericParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP -* "Reply-To" header. -* -* @lib sipcodec.lib -*/ -class CSIPReplyToHeader : public CSIPAddressHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPReplyToHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Refer-To"-header - * (e.g. "User ") - * @return a new instance of CSIPReplyToHeader - */ - IMPORT_C static CSIPReplyToHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPReplyToHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred. - * @return a new instance of CSIPReplyToHeader - */ - IMPORT_C static CSIPReplyToHeader* NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPReplyToHeader and puts it to CleanupStack - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred, - * @return a new instance of CSIPReplyToHeader - */ - IMPORT_C static CSIPReplyToHeader* NewLC(CSIPAddress* aSIPAddress); - - /** - * Destructor, deletes the resources of CSIPReplyToHeader. - */ - IMPORT_C virtual ~CSIPReplyToHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPReplyToHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPReplyToHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPReplyToHeader(); - - private: // For testing purposes - - UNIT_TEST(CSIPReplyToHeaderTest) - }; - -#endif // end of CSIPREPLYTOHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprequestelements.h --- a/epoc32/include/siprequestelements.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprequestelements.h -* Part of : SIP Client -* Interface : SDK API, SIP API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPREQUESTELEMENTS_H -#define CSIPREQUESTELEMENTS_H - -// INCLUDES -#include -#include -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPMessageElements; -class CSIPFromHeader; -class CSIPToHeader; -class CSIPCSeqHeader; -class CURIContainer; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class provides functions for creation and manipulation of originator's and -* recipient's addresses in a SIP request. It also provide functions for -* manipulation of SIP method for unknown SIP requests. -* @lib sipclient.lib -*/ -class CSIPRequestElements : public CBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * If the URI is SIP URI, no SIP URI headers are allowed. - * @pre aRemoteURi != 0 - * @param aRemoteUri Remote target URI that identifies a resource that - * the request is addressed to. The ownership is transferred. - */ - IMPORT_C static CSIPRequestElements* NewL(CUri8* aRemoteUri); - - /** - * Two-phased constructor. - * If the URI is SIP URI, no SIP URI headers are allowed. - * @pre aRemoteURi != 0 - * @param aRemoteUri Remote target URI that identifies a resource that - * the request is addressed to. The ownership is transferred. - */ - IMPORT_C static CSIPRequestElements* NewLC(CUri8* aRemoteUri); - - /** - * Destructor. - */ - IMPORT_C ~CSIPRequestElements(); - - public: // New functions - /** - * Sets/resets the recipient's To-header - * To-header must not contain tag-parameter. - * @pre aTo != 0 - * @param aTo a To-header to be set, the ownership is transferred. - */ - IMPORT_C void SetToHeaderL(CSIPToHeader* aTo); - - /** - * Gets the recipient's To-header - * @return To-header or a 0-pointer if not present. Ownership is not - * transferred. - */ - IMPORT_C const CSIPToHeader* ToHeader() const; - - /** - * Sets/resets the originator's From-header. - * From-header must not contain tag-parameter. - * @pre aFrom != 0 - * @param aFrom a From-header to be set, the ownership is transferred. - * @leave KErrArgument if aFrom == 0 - */ - IMPORT_C void SetFromHeaderL(CSIPFromHeader* aFrom); - - /** - * Gets the originator's From-header - * @return From-header or a 0-pointer if not present. Ownership is not - * transferred. - */ - IMPORT_C const CSIPFromHeader* FromHeader() const; - - /** - * Gets CSeq-header. Available for only incoming requests. - * @return a CSeq-header or a 0-pointer if not present. - * Ownership is not transferred. - */ - IMPORT_C const CSIPCSeqHeader* CSeqHeader() const; - - /** - * Sets the remote URI. - * If the URI is a SIP URI, no SIP URI headers are allowed. - * @pre aRemoteUri != 0 - * @param aRemoteUri - * @leave KErrArgument if aRemoteUri==0 - */ - IMPORT_C void SetRemoteUriL(CUri8* aRemoteUri); - - /** - * Gets the remote target URI - * @return remote target URI - */ - IMPORT_C const CUri8& RemoteUri() const; - - /** - * Sets the SIP request method - * @param aMethod a SIP method name. - * @leave KErrArgument if method name given is syntactically - * incorrect - */ - IMPORT_C void SetMethodL(RStringF aMethod); - - /** - * Gets the SIP Method for a request - * @return a SIP method name or a an empty string if the method - * is not defined - */ - IMPORT_C RStringF Method() const; - - /** - * Gets message elements (contains all SIP user headers and content) - * @return message elements - */ - IMPORT_C const CSIPMessageElements& MessageElements() const; - - /** - * Gets message elements (contains all SIP user headers and content) - * The response elements can be populated with SIP user headers - * and content using returned reference to the message elements. - * @return message elements - */ - IMPORT_C CSIPMessageElements& MessageElements(); - - public: // New functions, for internal use - static CSIPRequestElements* InternalizeL (RReadStream& aReadStream); - void ExternalizeL (RWriteStream& aWriteStream) const; - - private: - CSIPRequestElements(); - void ConstructL(CUri8* aRemoteUri); - void DoInternalizeL(RReadStream& aReadStream); - - private: // Data - RStringF iMethod; - CURIContainer* iRemoteURI; - CSIPMessageElements* iMessageElements; - - private: // For testing purposes - UNIT_TEST(CSIPRequestElementsTest) - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprequireheader.h --- a/epoc32/include/siprequireheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprequireheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPREQUIREHEADER_H -#define CSIPREQUIREHEADER_H - -// INCLUDES -#include "siptokenheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in -* SIP "Require" header. -* -* @lib sipcodec.lib -*/ -class CSIPRequireHeader : public CSIPTokenHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPRequireHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Require"-header - * @return an array containing 1..n instances of CSIPRequireHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPRequireHeader - * @param aValue a tag value - * @return a new instance of CSIPRequireHeader - */ - IMPORT_C static CSIPRequireHeader* NewL(RStringF aValue); - - /** - * Creates a new instance of CSIPRequireHeader - * and puts it to CleanupStack - * @param aValue a tag value - * @return a new instance of CSIPRequireHeader - */ - IMPORT_C static CSIPRequireHeader* NewLC(RStringF aValue); - - /** - * Destructor, deletes the resources of CSIPRequireHeader. - */ - IMPORT_C ~CSIPRequireHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPRequireHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPRequireHeader - */ - IMPORT_C static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, For internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPRequireHeader(); - CSIPRequireHeader(const CSIPRequireHeader& aHeader); - }; - -#endif // end of CSIPREQUIREHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipresolvedclient.h --- a/epoc32/include/sipresolvedclient.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : SipResolvedClient.h -* Part of : SDK API, SIP Client Resolver API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPRESOLVEDCLIENT_H -#define CSIPRESOLVEDCLIENT_H - -// INCLUDES -#include -#include - -//FORWARD DECLARATIONS -class CSIPHeaderBase; -class CSIPContentTypeHeader; - -// CONSTANTS -/** Interface UID of this ECOM interface*/ -const TUid KSIPResolvedClientIFUid = { 0x102010dd }; - -// CLASS DEFINITION -/** -* @publishedAll -* @released -* -* Interface that clients must realize -* in order to enable client resolution mechanism upon the reception -* of SIP request outside the SIP dialog. Data provided in -* the ECOM resource file or optionally requested from the interface implementation -* will be used for target client determination by the SIP implementation. -* Note that channel UIDs must be unique accross all SIP clients e.g. clients may -* use UIDs assigned for binaries. -*/ -class CSIPResolvedClient : public CBase - { - public: // Destructor - - /** - * Destructor - */ - virtual inline ~CSIPResolvedClient(); - - public: // Abstract methods - - /** - * Returns the SIP client's channel UID that indicates client's - * channel UID for connection with SIP e.g. CSIP::NewL() - * @param aMethod the method of the SIP request - * @param aRequestUri the request-URI of the SIP request - * @param aHeaders all the headers in the SIP request - * @param aContent SIP request body; zero-length descriptor if not present - * @param aContentType the content-type of the SIP request. - * Zero-pointer if body is not present. - * @return SIP client's communication channel's UID - */ - virtual TUid ChannelL(RStringF aMethod, - const TDesC8& aRequestUri, - const RPointerArray& aHeaders, - const TDesC8& aContent, - const CSIPContentTypeHeader* aContentType=0) = 0; - - /** - * Requests the client to connect to SIP with resolved - * UID in case there's no connection with resolved channel UID. - * @param aUid previously resolved channel UID - * @leave KErrNoMemory if out of memory - * @leave KErrNotFound in case non-existing channel UID was provided - */ - virtual void ConnectL(TUid aUid) = 0; - - /** - * Requests the implementation to provide capabilities in XML format - * in case they were not defined in the ECOM resource file. The cabablities - * to be returned must be defined according to the same DTD. - * This function will be invoked only if the capabilities are not - * defined in the ECOM resource file. - */ - virtual const TDesC8& Capabilities(); - - public: // Data - - /// Unique key for implementations of this interface. - TUid iInstanceKey; - - protected: // Constructors: - - inline CSIPResolvedClient(); - }; - -#include - -#endif // CSIPRESOLVEDCLIENT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipresolvedclient2.h --- a/epoc32/include/sipresolvedclient2.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipresolvedclient2.h -* Part of : SIP Client Resolver API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPRESOLVEDCLIENT2_H -#define CSIPRESOLVEDCLIENT2_H - -// INCLUDES -#include -#include -#include -#include -#include -#include -#include - -// FORWARD DECLARATIONS -class CSdpMediaField; - -// CONSTANTS -/** Interface UID of this ECOM interface*/ -const TUid KSIPResolvedClient2IFUid = { 0x10282EE5 }; - -// CLASS DEFINITION -/** -* @publishedAll -* @released -* -* Interface that SIP stack's clients must realize -* in order to be able to receive incoming SIP requests outside SIP dialogs. -* Note that channel UIDs must be unique accross all SIP clients -* e.g. clients may use UIDs assigned for binaries. -* -* SIP stack utilizes the plug-ins that implement -* this interface in the following manner: -* -* 1) If the SIP request does not contain Accept-Contact-header(s), go to step 2. -* SIP stack calls CSIPResolvedClient2::MatchAcceptContactsL -* for all the plug-ins and applies the following logic: -* a) None of the clients match -> go to step 2 -* b) One client matches -> the SIP request is routed to the matching client -* c) Several clients match -> go to step 2 -* -* 2) If the SIP request does not contain Event-header, go to step 3. -* SIP stack calls CSIPResolvedClient2::MatchEventL -* for all the plug-ins and applies the following logic: -* a) None of the clients match -> go to step 3 -* b) One client matches -> the SIP request is routed to the matching client -* c) Several clients match -> go to step 3 -* -* 3) SIP stack calls CSIPResolvedClient2::MatchRequestL for all the plug-ins. -* a) None of the clients match -> SIP generates an error response -* b) One client matches -> the SIP request is routed to the matching client -* c) Several clients match -> -* SIP picks one of these clients randomly and routes the request to it. -* The ROM-based clients are preferred. -*/ -class CSIPResolvedClient2 : public CBase - { - public: // Destructor - - /** - * Destructor - */ - inline ~CSIPResolvedClient2(); - - public: // Abstract methods - - /** - * Matches the Accept-Contact-headers - * to the client(s) represented by this plug-in. - * This function is called for an incoming SIP request - * if it contains Accept-Contact-header(s). - * @param aMethod the method of the SIP request - * @param aRequestUri the request-URI of the SIP request - * @param aHeaders all the headers in the SIP request - * @param aContent SIP request body; - * zero-length descriptor if not present - * @param aContentType the content-type of the SIP request. - * Zero-pointer if body is not present. - * @param aClientUid indicates client's UID for - * SIP e.g. the one passed as a parameter to CSIP::NewL(). - * @return ETrue, if the Accept-Contact-headers match to the client - * represented by this plug-in, otherwise EFalse. - */ - virtual TBool MatchAcceptContactsL( - RStringF aMethod, - const CUri8& aRequestUri, - const RPointerArray& aHeaders, - const TDesC8& aContent, - const CSIPContentTypeHeader* aContentType, - TUid& aClientUid) = 0; - - /** - * Matches the Event-header to the client(s) represented by this plug-in. - * This function is called for an incoming SIP request, - * if it contains an Event-header and - * MatchAcceptContactsL returned EFalse. - * @param aMethod the method of the SIP request - * @param aRequestUri the request-URI of the SIP request - * @param aHeaders all the headers in the SIP request - * @param aContent SIP request body; - * zero-length descriptor if not present - * @param aContentType the content-type of the SIP request. - * Zero-pointer if body is not present. - * @param aClientUid indicates client's UID for - * SIP e.g. the one passed as a parameter to CSIP::NewL(). - * @return ETrue, if the Event-header matches to the client - * represented by this plug-in, otherwise EFalse. - */ - virtual TBool MatchEventL( - RStringF aMethod, - const CUri8& aRequestUri, - const RPointerArray& aHeaders, - const TDesC8& aContent, - const CSIPContentTypeHeader* aContentType, - TUid& aClientUid) = 0; - - /** - * Matches the whole SIP request to the client(s) - * represented by this plug-in. - * This function is called if the SIP request does not contain - * Accept- or Event-headers or - * MatchAcceptContactsL and MatchEventL returned EFalse. - * @param aMethod the method of the SIP request - * @param aRequestUri the request-URI of the SIP request - * @param aHeaders all the headers in the SIP request - * @param aContent SIP request body; - * zero-length descriptor if not present - * @param aContentType the content-type of the SIP request. - * Zero-pointer if body is not present. - * @param aClientUid indicates client's UID for - * SIP e.g. the one passed as a parameter to CSIP::NewL(). - * @return ETrue, if the request can be handled by the client - * represented by this plug-in, otherwise EFalse. - */ - virtual TBool MatchRequestL( - RStringF aMethod, - const CUri8& aRequestUri, - const RPointerArray& aHeaders, - const TDesC8& aContent, - const CSIPContentTypeHeader* aContentType, - TUid& aClientUid) = 0; - - /** - * Indicates whether the plug-in implements CSIPResolvedClient2::ConnectL - * and by calling CSIPResolvedClient2::ConnectL - * SIP stack is able to force the client to connect to SIP stack. - * @return ETrue, if the plug-in supports - * CSIPResolvedClient2::ConnectL, otherwise EFalse. - */ - virtual TBool ConnectSupported() = 0; - - /** - * Requests the client to connect to SIP with - * the resolved UID in case there's no client connection with the UID. - * @param aClientUid previously resolved client UID - */ - virtual void ConnectL(const TUid& aClientUid) = 0; - - /** - * Cancels a ConnectL request for a client. - * Is called when for example a CANCEL for an INVITE is received - * before the client connects to SIP stack. - * @param aClientUid a UID for which ConnectL was previously called - */ - virtual void CancelConnect(const TUid& aClientUid) = 0; - - /** - * Gets all the SIP message content types supported by the client. - * @return 0..n SIP Content-Type-headers. - * The ownership of the headers is transferred. - */ - virtual RPointerArray - SupportedContentTypesL() = 0; - - /** - * Gets all the SDP media-fields supported by the client. - * @return 0..n SDP media-fields describing the client's media support. - * The ownership of the media-fields is transferred. - */ - virtual RPointerArray - SupportedSdpMediasL() = 0; - - - /** - * Adds client specific SIP-headers for the 200 OK for OPTIONS. - * Each plug-in must check that the header to be added - * is not yet in the array. For example when adding header - * "Allow: INVITE" the client must check that - * the header is not already present in the array. - * @param aHeaders headers to be added to 200 OK for OPTIONS. - * The ownership of the added headers is transferred to the caller. - */ - virtual void AddClientSpecificHeadersForOptionsResponseL( - RPointerArray& aHeaders) = 0; - - public: // Data - - /// Unique key for implementations of this interface. - TUid iInstanceKey; - - TUid iImplementationUid; - - protected: // Constructors: - - inline CSIPResolvedClient2(); - }; - -#include "sipresolvedclient2.inl" - -#endif // CSIPRESOLVEDCLIENT2_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipresponseelements.h --- a/epoc32/include/sipresponseelements.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,158 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipresponseelements.h -* Part of : SIP Client -* Interface : SDK API, SIP API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPRESPONSEELEMENTS_H -#define CSIPRESPONSEELEMENTS_H - -// INCLUDES -#include -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPMessageElements; -class CSIPFromHeader; -class CSIPToHeader; -class CSIPCSeqHeader; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class provides services for creating and manipulating SIP responses -* This class is used for creating and manipulating SIP responses including -* status code, reason phrase and optional elements such user headers, -* content and its type. -* -* @lib sipclient.lib -*/ -class CSIPResponseElements : public CBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * @pre aStatusCode > 100 && aStatusCode < 700 - * @param aStatusCode a known SIP response status code. Cannot be 100. - * @param aReasonPhrase a SIP response reason phrase. - */ - IMPORT_C static CSIPResponseElements* NewL(TUint aStatusCode, - RStringF aReasonPhrase); - - /** - * Two-phased constructor. - * @pre aStatusCode > 100 && aStatusCode < 700 - * @param aStatusCode a known SIP response status code. Cannot be 100. - * @param aReasonPhrase a SIP response reason phrase. - */ - IMPORT_C static CSIPResponseElements* NewLC(TUint aStatusCode, - RStringF aReasonPhrase); - - /** - * Destructor. - */ - IMPORT_C ~CSIPResponseElements(); - - public: // New functions - /** - * Sets a SIP Response extension status code. It is not possible to set - * value 100. - * @pre aStatusCode > 100 && aStatusCode < 700 - * @param aStatusCode extension status code - * @leave KErrArgument if aStatusCode < 100 or aStatusCode >= 700 - */ - IMPORT_C void SetStatusCodeL(TUint aStatusCode); - - /** - * Gets the SIP Response status code - * @return SIP Response status code - */ - IMPORT_C TUint StatusCode() const; - - /** - * Sets a SIP Response Reason Phrase. - * @param aReasonPhrase a SIP response reason phrase. - */ - IMPORT_C void SetReasonPhraseL(RStringF aReasonPhrase); - - /** - * Gets a SIP Response Reason Phrase. - * @return a SIP response reason phrase or an empty string if - * the reason phrase is not defined. - */ - IMPORT_C RStringF ReasonPhrase() const; - - /** - * Gets the originator's From-header - * @return a From-header or a 0-pointer if not present. Ownership is - * not transferred. - */ - IMPORT_C const CSIPFromHeader* FromHeader() const; - - /** - * Gets the recipient's To-header - * @return a To-header or a 0-pointer if not present. Ownership is - * not transferred. - */ - IMPORT_C const CSIPToHeader* ToHeader() const; - - /** - * Gets CSeq-header - * @return a CSeq-header or a 0-pointer if not present. Ownership is - * not transferred. - */ - IMPORT_C const CSIPCSeqHeader* CSeqHeader() const; - - /** - * Gets message elements (contains all SIP user headers and content) - * @return message elements - */ - IMPORT_C const CSIPMessageElements& MessageElements() const; - - /** - * Gets message elements (contains all SIP user headers and content) - * The response elements can be populated with SIP user headers - * and content using returned reference to the message elements. - * @return message elements - */ - IMPORT_C CSIPMessageElements& MessageElements(); - - public: // New functions, for internal use - static CSIPResponseElements* InternalizeL (RReadStream& aReadStream); - static CSIPResponseElements* InternalizeLC (RReadStream& aReadStream); - void ExternalizeL (RWriteStream& aWriteStream) const; - - private: - CSIPResponseElements(); - void ConstructL(TUint aStatusCode, RStringF aReasonPhrase); - void DoInternalizeL (RReadStream& aReadStream); - - private: // Data - TUint iStatusCode; - RStringF iReasonPhrase; - CSIPMessageElements* iMessageElements; - }; - -#endif // end of CSIPRESPONSEELEMENTS_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipretryafterheader.h --- a/epoc32/include/sipretryafterheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipretryafterheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPRETRYAFTERHEADER_H -#define CSIPRETRYAFTERHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPRetryAfterHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting parameters in SIP -* "Retry-After" header. -* -* @lib sipcodec.lib -*/ -class CSIPRetryAfterHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPRetryAfterHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Retry-After"-header - * (e.g. "18000;duration=3600") - * @return a new instance of CSIPRetryAfterHeader - */ - IMPORT_C static CSIPRetryAfterHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPRetryAfterHeader - * @param aRetryAfter a retry after value. - * @return a new instance of CSIPRetryAfterHeader - */ - IMPORT_C static CSIPRetryAfterHeader* NewL(TUint aRetryAfter); - - /** - * Creates a new instance of CSIPRetryAfterHeader - * On return the new instance has left to the CleanupStack. - * @param aRetryAfter a retry after value. - * @return a new instance of CSIPRetryAfterHeader - */ - IMPORT_C static CSIPRetryAfterHeader* NewLC(TUint aRetryAfter); - - /** - * Destructor, deletes the resources of CSIPRetryAfterHeader. - */ - IMPORT_C virtual ~CSIPRetryAfterHeader(); - - - public: // New functions - - /** - * Sets the retry after value - * @param aValue a new retry after value to set. - */ - IMPORT_C void SetRetryAfter(TUint aValue); - - /** - * Gets the retry after value - * @return a retry after value - */ - IMPORT_C TUint RetryAfter() const; - - /** - * Gets the comment value - * @return a comment value or KNullDesC8 - */ - IMPORT_C const TDesC8& Comment() const; - - /** - * Gets the value of the "duration"-parameter - * @return the "duration"-parameter, or - * KErrNotFound if the parameter is not present. - */ - IMPORT_C TInt DurationParam() const; - - /** - * Sets the "duration"-parameter - * @pre aDurationParam >= 0 - * @param aDurationParam a "duration"-parameter value to set - */ - IMPORT_C void SetDurationParamL(TInt aDurationParam); - - /** - * Constructs an instance of a CSIPRetryAfterHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPRetryAfterHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPRetryAfterHeader(); - CSIPRetryAfterHeader(TUint aRetryAfter); - void ConstructL(); - void ConstructL(const CSIPRetryAfterHeader& aRetryAfterHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - TUint iRetryAfter; - HBufC8* iComment; - CSIPRetryAfterHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPRetryAfterHeaderTest) - }; - -#endif // end of CSIPRETRYAFTERHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprouteheader.h --- a/epoc32/include/siprouteheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprouteheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPROUTEHEADER_H -#define CSIPROUTEHEADER_H - -// INCLUDES -#include "siprouteheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for SIP "Route"-header manipulation. -* -* @lib sipcodec.lib -*/ -class CSIPRouteHeader : public CSIPRouteHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPRouteHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Route"-header - * @return an array containing one to many instances of CSIPRouteHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPRouteHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred - * @return a new instance of CSIPRouteHeader - */ - IMPORT_C static CSIPRouteHeader* NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPRouteHeader and puts it to CleanupStack - * @pre aSIPAddress != 0 - * @pre aSIPAddress->Address().HostPort().HasHost() == ETrue - * @param aSIPAddress a name-address, the ownership is transferred - * @return a new instance of CSIPRouteHeader - */ - IMPORT_C static CSIPRouteHeader* NewLC(CSIPAddress* aSIPAddress); - - /** - * Destructor, deletes the resources of CSIPRouteHeader. - */ - IMPORT_C ~CSIPRouteHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CCSIPRouteHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPRouteHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - static CSIPRouteHeader* NewL(const CSIPRouteHeaderBase& aHeader); - - private: // From CSIPHeaderbase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // Constructors - - CSIPRouteHeader(); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - }; - -#endif // CSIPROUTEHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprouteheaderbase.h --- a/epoc32/include/siprouteheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprouteheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPROUTEHEADERBASE_H -#define CSIPROUTEHEADERBASE_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPAddress; -class CSIPHeaderGenericParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for "Route"-, "Record-Route"- and "Service-Route"-headers. -* -* @lib sipcodec.lib -*/ -class CSIPRouteHeaderBase : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPRouteHeaderBase. - */ - IMPORT_C virtual ~CSIPRouteHeaderBase(); - - - public: // New functions - - /** - * Sets the name-address - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred - */ - IMPORT_C void SetSIPAddressL(CSIPAddress* aSIPAddress); - - /** - * Gets the name-address as const - * @return name-address - */ - IMPORT_C const CSIPAddress& SIPAddress() const; - - /** - * Gets the name-address - * @return name-address - */ - IMPORT_C CSIPAddress& SIPAddress(); - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - protected: // Contructors - - CSIPRouteHeaderBase(); - void ConstructL(); - void ConstructL(CSIPAddress* aSIPAddress); - void ConstructL(const CSIPRouteHeaderBase& aRouteHeaderBase); - - protected: // Data - - /** - * @internalComponent - */ - CSIPAddress* iSIPAddress; - - /** - * @internalComponent - */ - CSIPHeaderGenericParams* iParams; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // For testing purposes - - UNIT_TEST(CSIPRouteHeaderBaseTest) - }; - -#endif // CSIPROUTEHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siprseqheader.h --- a/epoc32/include/siprseqheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,108 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siprseqheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPRSEQHEADER_H -#define CSIPRSEQHEADER_H - -// INCLUDES -#include "sipunsignedintheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class encapsulates a "RSeq"-header value. -* -* @lib sipcodec.lib -*/ -class CSIPRSeqHeader : public CSIPUnsignedIntHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPRSeqHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "RSeq"-header (e.g. "123") - * @return a new instance of CSIPRSeqHeader - */ - IMPORT_C static CSIPRSeqHeader* DecodeL(const TDesC8& aValue); - - /** - * Constructor - * @param aValue the value to set - */ - IMPORT_C CSIPRSeqHeader(TUint aValue); - - /** - * Destructor, deletes the resources of CSIPRSeqHeader. - */ - IMPORT_C ~CSIPRSeqHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPRSeqHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized header object (header name not included). - * @return an instance of a CSIPRSeqHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // For testing purposes - - UNIT_TEST(CSIPRSeqHeaderTest) - }; - -#endif // CSIPRSEQHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipsdkcrkeys.h --- a/epoc32/include/sipsdkcrkeys.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipcrkeys.h -* Part of : SIP API -* Version : SIP/6.0 -* -*/ - - - -#ifndef SIPCRKEYS_H -#define SIPCRKEYS_H - -// INCLUDES -#include - -/** -* @file -* @publishedAll -* @released -*/ - -/** -* Defines configuration parameters used by the SIP stack. -*/ -const TUid KCRUidSIP = { 0x101FED88 }; - -/** -* Defines SIP transaction timer T1 in milliseconds as per RFC3261. -*/ -const TUint32 KSIPTransactionTimerT1 = 0x01; - -/** -* Defines SIP transaction timer T2 in milliseconds as per RFC3261. -*/ -const TUint32 KSIPTransactionTimerT2 = 0x02; - -/** -* Defines SIP transaction timer T4 in milliseconds as per RFC3261. -*/ -const TUint32 KSIPTransactionTimerT4 = 0x03; - -/** -* Defines SIP transaction timer T1 for LAN Bearer in milliseconds as per RFC3261. -*/ -const TUint32 KSIPTransactionTimerLANT1 = 0x0b; - -/** -* Defines SIP transaction timer T2 for LAN Bearer in milliseconds as per RFC3261. -*/ -const TUint32 KSIPTransactionTimerLANT2 = 0x0c; - -/** -* Defines SIP transaction timer T4 for LAN Bearer in milliseconds as per RFC3261. -*/ -const TUint32 KSIPTransactionTimerLANT4 = 0x0d; - -#endif // SIPCRKEYS_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipsecurityclientheader.h --- a/epoc32/include/sipsecurityclientheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipsecurityclientheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPSECURITYCLIENTHEADER_H -#define CSIPSECURITYCLIENTHEADER_H - -// INCLUDES -#include "sipsecurityheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "Security-Client" -* header fields. -* -* @lib sipcodec.lib -*/ -class CSIPSecurityClientHeader : public CSIPSecurityHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPSecurityClientHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Security-Client"-header - * @return an array containing 1..n instances of CSIPSecurityClientHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPSecurityClientHeader - * @param aMechanism a Mechanism-Name parameter - * in the "Security-Client" header - * @return a new instance of CSIPSecurityClientHeader - */ - IMPORT_C static CSIPSecurityClientHeader* - NewL(const TDesC8& aMechanism); - - /** - * Creates a new instance of CSIPSecurityClientHeader - * and puts it to CleanupStack - * @param aMechanism a Mechanism-Name parameter - * in the "Security-Client" header - * @return a new instance of CSIPSecurityClientHeader - */ - IMPORT_C static CSIPSecurityClientHeader* - NewLC(const TDesC8& aMechanism); - - /** - * Destructor, deletes the resources of CSIPSecurityClientHeader. - */ - IMPORT_C ~CSIPSecurityClientHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPSecurityClientHeader - * from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPSecurityClientHeader - */ - - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // New functions - - CSIPSecurityClientHeader() ; - - private: // For testing purposes - - UNIT_TEST(CSIPSecurityHeaderBaseTest) - }; - -#endif // CSIPSECURITYCLIENTHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipsecurityheaderbase.h --- a/epoc32/include/sipsecurityheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipsecurityheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPSECURITYHEADERBASE_H -#define CSIPSECURITYHEADERBASE_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPSecurityHeaderBaseParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for Security-Client, Security-Server and Security-Verify. -* -* @lib sipcodec.lib -*/ -class CSIPSecurityHeaderBase : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPSecurityHeaderBase. - */ - IMPORT_C virtual ~CSIPSecurityHeaderBase(); - - public: // New functions - - /** - * Gets the value of "q"-parameter - * @return the "q"-parameter value, zero if not present - */ - IMPORT_C TReal PreferenceParam() const; - - /** - * Sets the "q"-parameter value - * @param aPreferenceValue a "q"-parameter value to set - */ - IMPORT_C void SetPreferenceParamL(TReal aPreferenceValue); - - /** - * Gets the Mechanism-Name from the Security header - * @return a Mechanism-Name - */ - IMPORT_C const TDesC8& MechanismName() const; - - /** - * Sets the Mechanism-Name in the Security header - * @param aMechanismName a Mechanism-Name - */ - IMPORT_C void SetMechanismNameL(const TDesC8& aMechanismName); - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool MoreThanOneAllowed() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - protected: // Constructors - - CSIPSecurityHeaderBase(); - void ConstructL(); - void ConstructL(const TDesC8& aMechanismName); - void ConstructL(const CSIPSecurityHeaderBase& aSecurityHeaderBase); - - protected: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Data - - HBufC8* iMechanismName; - CSIPSecurityHeaderBaseParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPSecurityHeaderBaseTest) - }; - -#endif // CSIPSECURITYHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipservertransaction.h --- a/epoc32/include/sipservertransaction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipservertransaction.h -* Part of : SIP Client -* Interface : SDK API, SIP API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPSERVERTRANSACTION_H -#define CSIPSERVERTRANSACTION_H - -// INCLUDES -#include "siptransactionbase.h" - -// FORWARD DECLARATIONS -class CSIPRequestElements; -class MSIPResponseSender; -class CSIPConnection; -class CSIPDialogImplementation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP server transactions. -* It provides services for creating, ending -* and getting SIP transaction parameters. -* Client cannot instantiate this class. -* -* @lib sipclient -*/ -class CSIPServerTransaction: public CSIPTransactionBase - { - public: // Destructor - - /** - * Destructor - */ - IMPORT_C ~CSIPServerTransaction(); - - public: // New functions - - /** - * Sends response and ends the transaction; - * The user must not send 100 Trying response. Leaves on failure. - * @pre aElements!=0 - * @pre State()==ETrying || State()==EProceeding - * @pre CSIPConnection::State()==EActive - * @pre ResponseAllowed()==ETrue - * @param aElements contains Status Code, optional Reason Phrase and - * optional SIP message headers and body. Ownership is transferred. - * @leave KErrArgument if aElements == NULL - * @leave KErrGeneral if ResponseAllowed() == EFalse - * @leave KErrSIPInvalidTransactionState if State()!=ETrying and - * State()!=EProceeding - * @leave KErrSIPInvalidDialogState if sending response to a request - * within dialog, and the dialog is in terminated state. - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - * @capability NetworkServices - */ - IMPORT_C void SendResponseL(CSIPResponseElements *aElements); - - /** - * Gets the request elements - * @return Request elements. Ownership is not transferred. - */ - IMPORT_C const CSIPRequestElements* RequestElements() const; - - /** - * Checks if the response sending is allowed for this server - * transaction. For instance response is not allowed in ACK transaction. - * @return ETrue if response sending is allowed, EFalse otherwise - */ - IMPORT_C TBool ResponseAllowed() const; - - public: // New functions, for internal use - - /** - * Sets a new respose sender, replacing the current sender. - * - * @param aSender Response sender to be used from now on. Ownership is - * transferred. - */ - void SetResponseSender(MSIPResponseSender* aSender); - - /** - * If the request was received inside a dialog, returns the dialog. - * - * @return CSIPDialogImplementation* The dialog inside which the request - * was received, or NULL. Ownership is not transferred. - */ - CSIPDialogImplementation* Dialog() const; - - /** - * Obtains the associated CSIPConnection instance. If connection can't - * be accessed anymore, this function leaves. - * - * @return CSIPConnection - */ - CSIPConnection& SIPConnectionL(); - - /** - * Update the MTransactionAssociation to point to aAssociation. - * - * @param aAssociation Associated object - */ - void ReAssociateL(MTransactionAssociation& aAssociation); - - /** - * Removes, but does not delete, request elements from - * aServerTransaction. - * - * @param aServerTransaction Server transaction from which response - * elements are removed. Ownership is not transferred. - */ - static void DetachRequestElements(TAny* aServerTransaction); - - public: // Constructors, for internal use - /** - * Creates a server transaction. - * - * @param aRequestId RequestId for the transaction to use - * @param aAssociation Object with which the transaction is associated - * @param aElements Request elements. Ownership is transferred. - * @return New object. Ownership is transferred. - */ - static CSIPServerTransaction* - NewL(TUint32 aRequestId, - MTransactionAssociation& aAssociation, - CSIPRequestElements* aElements); - - /** - * Creates a server transaction and pushes it to cleanup stack. - * - * @param aRequestId RequestId for the transaction to use - * @param aAssociation Object with which the transaction is associated - * @param aElements Request elements. Ownership is transferred. - * @return New object. Ownership is transferred. - */ - static CSIPServerTransaction* - NewLC(TUint32 aRequestId, - MTransactionAssociation& aAssociation, - CSIPRequestElements* aElements); - - private: // Constructors - CSIPServerTransaction(TUint32 aRequestId, - MTransactionAssociation& aAssociation); - - /** - * Second phase constructor. - * - * @pre aElements!=0 - * @param aElements Request elements. Ownership is transferred. - */ - void ConstructL(CSIPRequestElements* aElements); - - private: // Data - CSIPRequestElements* iRequestElements; - - //This interface is used for sending the response. - //CSIPServerTransaction owns iResponseSender. - MSIPResponseSender* iResponseSender; - - private: // For testing purposes - - UNIT_TEST(CSIPServerTransaction_Test) - UNIT_TEST(CSIP_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipstrings.h --- a/epoc32/include/sipstrings.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipstrings.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - -#ifndef SIPSTRINGS_H -#define SIPSTRINGS_H - -// INCLUDES -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPStrings; - -// CLASS DECLARATION -/** - * @publishedAll - * @released - * - * This class defines string pool for SIP Codec. - * The client of SIP Codec must call OpenL() before - * invoking any function of SIP Codec classes. - * The client must close the string pool when finished using - * SIP Codec classes. - * - * @lib sipcodec.lib - */ -class SIPStrings - { - public: // Constructors and destructor - - /** - * Opens SIP Codec string pool. - * Implemented with a reference count. - */ - IMPORT_C static void OpenL(); - - /** - * Closes SIP Codec string pool. - * In other words decrements reference count and if it reaches - * zero, closes the string pool. - * The user must not call Close() if it has not called OpenL(). - */ - IMPORT_C static void Close(); - - - public: // New functions - - /** - * Gets a case-insensitive string specified - * in the original string table. - * - * @param aIndex The string table enumeration value - * @return Initialised RStringF object - */ - IMPORT_C static RStringF StringF(TInt aIndex); - - /** - * Gets the string pool used by SIP Codec. - * - * @return RStringPool: A handle to a string pool - */ - IMPORT_C static RStringPool Pool(); - - /** - * Gets the string table used by SIP Codec. - * - * @return TStringTable&: The string pool table - */ - IMPORT_C static const TStringTable& Table(); - - private: - - static CSIPStrings* Strings(); - }; - -#endif // SIPSTRINGS_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipsubscribedialogassoc.h --- a/epoc32/include/sipsubscribedialogassoc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,354 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipsubscribedialogassoc.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPSUBSCRIBEDIALOGASSOC_H -#define CSIPSUBSCRIBEDIALOGASSOC_H - -// INCLUDES -#include "sipdialogassocbase.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class CUri8; -class CSIPToHeader; -class CSIPFromHeader; -class CSIPContactHeader; -class CSIPEventHeader; -class CSIPMessageElements; -class MSIPRegistrationContext; -class CSIPConnection; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Class for managing SIP SUBSCRIBE dialog associations. -* It provides services for creating, using and terminating SIP SUBSCRIBE -* dialog associations. The client can have multiple SUBSRIBE dialog -* associations per same SIP dialog. -* Implementation handles SUBSCRIBE on the dialog level defined by Call-Id, -* local and remote tags; "Event" header semantics are client's responsibility -* -* @lib sipclient.lib -*/ -class CSIPSubscribeDialogAssoc : public CSIPDialogAssocBase - { - public: // Constructors and destructor - /** - * Two-phased constructor. - * Should be used if response to the SIP request to be sent - * will create a SIP dialog association. - * @pre aEvent != 0 - * @param aDialog a dialog to be associated with - * @param aEvent an event to subscribe to; the ownership is transferred - * @return New object; the ownership is transferred - * @leave KErrArgument if aEvent == 0 - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPSubscribeDialogAssoc* - NewL(CSIPDialog& aDialog, - CSIPEventHeader* aEvent); - - /** - * Two-phased constructor. - * Must be used if response to the SIP request to be sent - * will create a SIP dialog association. - * @param aDialog a dialog to be associated with - * @param aEvent an event to subscribe to; the ownership is transferred - * @return New object, ownership is transferred - * @leave KErrArgument if aEvent == 0 - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPSubscribeDialogAssoc* - NewLC(CSIPDialog& aDialog, - CSIPEventHeader* aEvent); - - /** - * Two-phased constructor - * @pre aFrom != 0 - * @pre aRemoteUri != 0 - * @pre aEvent != 0 - * The user of the class must not define tags in From-header and - * To-header. - * @param aConnection a SIP connection to be used with - * dialog association - * @param aFrom originator's address; the ownership is transfered - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is addressed to. - * @param aEvent an event to subscribe to; the ownership is transferred - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0 - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPSubscribeDialogAssoc* - NewL(CSIPConnection& aConnection, - CSIPFromHeader* aFrom, - CUri8* aRemoteUri, - CSIPEventHeader* aEvent, - CSIPToHeader* aTo=0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aFrom != 0 - * @pre aRemoteUri != 0 - * @pre aEvent != 0 - * The user of the class must not define tags in From-header and - * To-header. - * @param aConnection a SIP connection to be used with - * dialog association - * @param aFrom originator's address; the ownership is transfered - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is addressed to. - * @param aEvent an event to subscribe to; the ownership is transferred - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aFrom == 0, aRemoteUri == 0 or aEvent == 0 - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPSubscribeDialogAssoc* - NewLC(CSIPConnection& aConnection, - CSIPFromHeader* aFrom, - CUri8* aRemoteUri, - CSIPEventHeader* aEvent, - CSIPToHeader* aTo =0, - CSIPContactHeader* aContact=0); - - /** - * Two-phased constructor - * @pre aRemoteUri != 0 - * @pre aEvent != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @pre aContext.IsContextActive()==ETrue - * @param aConnection a SIP connection to be used with - * dialog association - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is targeted to. - * @param aContext used for selecting outbound - * proxy and originator's address (AOR) and contact - * @param aEvent an event to subscribe to; the ownership is transferred - * @param aFrom originator's address. If not defined it will be - * constructed using registration context (User's AOR); - * the ownership is transfered - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aRemoteUri == 0 or aEvent == 0 - * @leave KErrSIPInvalidRegistrationState - * if aContext.IsContextActive()==EFalse - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPSubscribeDialogAssoc* - NewL(CSIPConnection& aConnection, - CUri8* aRemoteUri, - const MSIPRegistrationContext& aContext, - CSIPEventHeader* aEvent, - CSIPFromHeader* aFrom = 0, - CSIPToHeader* aTo = 0, - CSIPContactHeader* aContact = 0); - - /** - * Two-phased constructor - * @pre aRemoteUri != 0 - * @pre aEvent != 0 - * The user of the class must not define tags in From-header - * and To-header. - * @pre aContext.IsContextActive()==ETrue - * @param aConnection a SIP connection to be used with - * dialog association - * @param aRemoteUri a remote target URI that identifies a resource that - * the request is targeted to. - * @param aContext used for selecting outbound - * proxy and originator's address (AOR) and contact - * @param aEvent an event to subscribe to; the ownership is transferred - * @param aFrom originator's address. If not defined it will be - * constructed using registration context (User's AOR); - * the ownership is transfered - * @param aTo logical recipient's address; if not defined - * the remote target uri will be used for To-header - * construction; the ownership is transfered - * @param aContact a contact to be used in dialog creation. Must be - * given only if user intends to re-direct future requests; - * the ownership is transfered - * @return New object; the ownership is transferred. - * @leave KErrArgument if aRemoteUri == 0 or aEvent == 0 - * @leave KErrSIPInvalidRegistrationState - * if aContext.IsContextActive()==EFalse - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C static CSIPSubscribeDialogAssoc* - NewLC(CSIPConnection& aConnection, - CUri8* aRemoteUri, - const MSIPRegistrationContext& aContext, - CSIPEventHeader* aEvent, - CSIPFromHeader* aFrom = 0, - CSIPToHeader* aTo = 0, - CSIPContactHeader* aContact = 0); - - /** - * Destructor - */ - IMPORT_C ~CSIPSubscribeDialogAssoc(); - - public: //New functions - /** - * Creates SUBSCRIBE and sends it to the remote target. - * 101-199 or 2xx response to SUBSCRIBE will create a dialog association - * in case of the first SUBSCRIBE request within this dialog. - * Client must not provide Event-header in the optional message headers. - * - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EInit || - * Dialog().State()==CSIPDialog::EConfirmed - * @param aElements optional SIP message headers and body. Ownership is - * transferred. - * @param aRefresh if set the transaction will be refreshed at given - * interval. Interval must be defined by including - * Expires-header. Ownership is transferred. - * @return SUBSCRIBE SIP transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if Dialog().State() is incorrect - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendSubscribeL(CSIPMessageElements* aElements=0, - CSIPRefresh* aRefresh=0); - - /** - * Updates the subscription. Note that update can be done when 2xx - * response is received to the initial SUBSCRIBE or to update. - * Client must not provide Event-header in the optional message headers. - * @pre aElements != 0 - * @pre Dialog().Connection().State()==EActive - * Dialog().State()==CSIPDialog::EConfirmed - * @param aElements contains user SIP headers and content; the ownership - * is transferred - * @return SUBSCRIBE SIP client transaction; the ownership is transferred - * @leave KErrArgument if aElements == 0 or aElements contain - * Event-header - * @leave KErrSIPInvalidDialogState if Dialog().State() is incorrect - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* UpdateL(CSIPMessageElements* aElements); - - /** - * Creates (un)SUBSCRIBE and sends it to the remote target. - * Possible associated refresh will be terminated as well. - * Client must not provide Event-header in the optional message headers. - * @pre Dialog().Connection().State()==EActive - * @pre Dialog().State()==CSIPDialog::EConfirmed - * @param aElements optional SIP message headers and body. Ownership is - * transferred. - * @return SUBSCRIBE SIP transaction. Ownership is transferred. - * @leave KErrSIPInvalidDialogState if Dialog().State() is incorrect - * @capability NetworkServices - */ - IMPORT_C CSIPClientTransaction* - SendUnsubscribeL(CSIPMessageElements* aElements=0); - - /** - * Gets associated refresh in case the user has requested - * the refresh of the SIP subscription. - * Note that refreshed SUBSCRIBE dialog association cannot be - * terminated nor updated using the returned object. - * @return Associated refresh or 0 pointer if the user has not requested - * a refresh. Ownership is not transferred. - */ - IMPORT_C const CSIPRefresh* SIPRefresh() const; - - /** - * Gets an event to which the subscription is done - * @return an event - */ - IMPORT_C const CSIPEventHeader& Event() const; - - public: // New functions, for internal use - - /** - * @internalComponent - */ - CSIPRefresh* FindRefresh(TUint32 aRefreshId); - - static CSIPSubscribeDialogAssoc* NewLC(CSIPConnection& aConnection, - CUri8* aRemoteUri, - CSIPEventHeader* aEvent, - CSIPFromHeader* aFrom, - CSIPToHeader* aTo, - CSIPContactHeader* aContact, - const MSIPRegistrationContext* aContext); - - void ConnectionLost(); - - CSIPClientTransaction* - DoSendSubscribeL(CSIPMessageElements* aElements, - CSIPRefresh* aRefresh, - TBool aWithinDialog); - - CSIPClientTransaction* - DoSendUnsubscribeL(CSIPMessageElements* aElements); - - /** - * @internalComponent - */ - void DeletingRefresh(CSIPRefresh& aRefresh, TUint32 aRefreshId); - - private: // Constructors - CSIPSubscribeDialogAssoc(); - - private: // Data - //If the subscription is refreshed, this is the used CSIPRefresh - //instance, otherwise this is NULL. CSIPSubscribeDialogAssoc owns this. - CSIPRefresh* iRefresh; - - CSIPEventHeader* iEvent; - - private: // For testing purposes - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPSubscribeDialogAssoc_Test) - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipsubscriptionstateheader.h --- a/epoc32/include/sipsubscriptionstateheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipsubscriptionstateheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPSUBSCRIPTIONSTATEHEADER_H -#define CSIPSUBSCRIPTIONSTATEHEADER_H - -// INCLUDES -#include "sipparameterheaderbase.h" -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPSubscriptionStateHeaderParams; - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "Subscription-State" -* header fields. -* -* @lib sipcodec.lib -*/ -class CSIPSubscriptionStateHeader : public CSIPParameterHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPSubscriptionStateHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Subscription-State"-header - * @return a new instance of CSIPSubscriptionStateHeader - */ - IMPORT_C static CSIPSubscriptionStateHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPSubscriptionStateHeader - * @param aSubStateValue a substate-value value - * @return a new instance of CSIPSubscriptionStateHeader - */ - IMPORT_C static CSIPSubscriptionStateHeader* - NewL(const TDesC8& aSubStateValue); - - /** - * Creates a new instance of CSIPSubscriptionStateHeader - * and puts it to CleanupStack - * @param aSubStateValue a substate-value value - * @return a new instance of CSIPSubscriptionStateHeader - */ - IMPORT_C static CSIPSubscriptionStateHeader* - NewLC(const TDesC8& aSubStateValue); - - /** - * Destructor, deletes the resources of CSIPSubscriptionStateHeader. - */ - IMPORT_C ~CSIPSubscriptionStateHeader(); - - - public: // New functions - - /** - * Gets the substate-value parameter from the "Subscription-State" header - * @return the substate-value parameter - */ - IMPORT_C const TDesC8& SubStateValue() const; - - /** - * Sets the substate-value parameter in the "Subscription-State" header; - * @param aSubStateValue a substate-value parameter to set - */ - IMPORT_C void SetSubStateValueL(const TDesC8& aSubStateValue); - - /** - * Gets the value of the "expires"-parameter - * @return "expires"-parameter or KErrNotFound if not present - */ - IMPORT_C TInt ExpiresParameter() const; - - /** - * Sets the "expires"-parameter - * @pre aExpiresParam >= 0 - * @param aExpiresParam a "expires"-parameter value to set - */ - IMPORT_C void SetExpiresParameterL(TInt aExpiresParam); - - /** - * Gets the value of the "retry-after"-parameter - * @return "retry-after"-parameter or KErrNotFound if not present - */ - IMPORT_C TInt RetryAfterParameter() const; - - /** - * Sets the "retry-after"-parameter - * @pre aRetryAfterParam >= 0 - * @param aRetryAfterParam a "retry-after"-parameter value to set - */ - IMPORT_C void SetRetryAfterParameterL(TInt aRetryAfterParam); - - /** - * Constructs an instance of a CSIPSubscriptionStateHeader - * from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPSubscriptionStateHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // From CSIPParameterHeaderBase - - HBufC8* ToTextMandatoryPartLC() const; - void ParseMandatoryPartL(const TDesC8& aMandatoryPart); - const CSIPParamContainerBase& Params() const; - CSIPParamContainerBase& Params(); - - private: // Constructors - - CSIPSubscriptionStateHeader(); - void ConstructL(); - void ConstructL(const TDesC8& aSubStateValue); - void ConstructL (const CSIPSubscriptionStateHeader& - aSubscriptionStateHeader); - - private: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - HBufC8* iSubStateValue; - CSIPSubscriptionStateHeaderParams* iParams; - - private: // For testing purposes - - UNIT_TEST(CSIPSubscriptionStateHeaderTest) - }; - - -#endif // CSIPSUBSCRIPTIONSTATEHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipsupportedheader.h --- a/epoc32/include/sipsupportedheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipsupportedheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPSUPPORTEDHEADER_H -#define CSIPSUPPORTEDHEADER_H - -// INCLUDES -#include "siptokenheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "Supported" header. -* -* @lib sipcodec.lib -*/ -class CSIPSupportedHeader : public CSIPTokenHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPSupportedHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Supported"-header - * @return an array containing 1..n instances of CSIPSupportedHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPSupportedHeader - * @param aValue a tag value - * @return a new instance of CSIPSupportedHeader - */ - IMPORT_C static CSIPSupportedHeader* NewL(RStringF aValue); - - /** - * Creates a new instance of CSIPSupportedHeader - * and puts it to CleanupStack - * @param aValue a tag value - * @return a new instance of CSIPSupportedHeader - */ - IMPORT_C static CSIPSupportedHeader* NewLC(RStringF aValue); - - /** - * Destructor, deletes the resources of CSIPSupportedHeader. - */ - IMPORT_C ~CSIPSupportedHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPSupportedHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPSupportedHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TBool HasCompactName() const; - - /** - * @internalComponent - */ - RStringF CompactName() const; - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // New functions - - CSIPSupportedHeader(); - CSIPSupportedHeader(const CSIPSupportedHeader& aHeader); - - private: // For testing purposes - - UNIT_TEST(CSIPSupportedHeaderTest) - }; - -#endif // CSIPSUPPORTEDHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siptimestampheader.h --- a/epoc32/include/siptimestampheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siptimestampheader.h -* Part of : SIP Codec -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPTIMESTAMPHEADER_H -#define CSIPTIMESTAMPHEADER_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for a SIP Timestamp header. -* -* @lib sipcodec.lib -*/ -class CSIPTimestampHeader : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPTimestampHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Timestamp"-header (e.g. "12 3.4") - * @returns a new instance of CSIPTimestampHeader - */ - IMPORT_C static CSIPTimestampHeader* DecodeL(const TDesC8& aValue); - - /** - * Constructor - * @param aTimestamp a timestamp value to set. - * @param aDealy a delay value to set. - */ - IMPORT_C CSIPTimestampHeader(TReal aTimestamp); - - /** - * Destructor - */ - IMPORT_C ~CSIPTimestampHeader (); - - - public: // New functions - - /** - * Set the timestamp from the "Timestamp" header. - * @param aTimestamp a timestamp to set. - */ - IMPORT_C void SetTimestamp(TReal aTimestamp); - - /** - * Gets the timestamp from the "Timestamp" header. - * @return a timestamp value. - */ - IMPORT_C TReal Timestamp() const; - - /** - * Check if the delay-part is present - * @return a delay value. - */ - IMPORT_C TBool HasDelay() const; - - /** - * Set the delay-part of the "Timestamp" header. - * @param aDelay a delay to set. - */ - IMPORT_C void SetDelay(TReal aDelay); - - /** - * Gets the delay-part of the "Timestamp" header, - * if delay-part is present - * @return a delay value or zero if HasDelay() == EFalse - */ - IMPORT_C TReal Delay() const; - - /** - * Constructs an instance of a CSIPTimestampHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPTimestampHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // From CSIPHeaderBase - - void ExternalizeValueL (RWriteStream& aWriteStream) const; - - private: // New functions - - void ParseL(const TDesC8& aValue); - void DoInternalizeValueL(RReadStream& aReadStream); - - private: // Data - - TReal iTimestamp; - TBool iHasDelay; - TReal iDelay; - - private: // For testing purposes - - UNIT_TEST(CSIPTimestampHeaderTest) - }; - - -#endif // end of CSIPTIMESTAMPHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siptoheader.h --- a/epoc32/include/siptoheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siptoheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPTOHEADER_H -#define CSIPTOHEADER_H - -// INCLUDES -#include "sipfromtoheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "To" header fields. -* -* @lib sipcodec.lib -*/ -class CSIPToHeader : public CSIPFromToHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPToHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "To"-header (e.g. "User ") - * @return a new instance of CSIPToHeader - */ - IMPORT_C static CSIPToHeader* DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPToHeader - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred, - * @return a new instance of CSIPToHeader - */ - IMPORT_C static CSIPToHeader* NewL(CSIPAddress* aSIPAddress); - - /** - * Creates a new instance of CSIPToHeader and puts it to CleanupStack - * @pre aSIPAddress != 0 - * @param aSIPAddress a name-address, the ownership is transferred, - * @return a new instance of CSIPToHeader - */ - IMPORT_C static CSIPToHeader* NewLC(CSIPAddress* aSIPAddress); - - /** - * Creates a deep-copy of a CSIPFromToHeaderBase - * Note that this function can be used for creating a To-header - * using an existing From-header. - * @param aHeader CSIPFromToHeaderBase to be copied - * @return a new instance of CSIPToHeader - */ - - IMPORT_C static CSIPToHeader* - NewL(const CSIPFromToHeaderBase& aHeader); - - /** - * Creates a deep-copy of a CSIPFromToHeaderBase and - * puts it to CleanupStack - * Note that this function can be used for creating a To-header - * using an existing From-header. - * @param aHeader CSIPFromToHeaderBaseto to be copied - * @return a new instance of CSIPToHeader - */ - IMPORT_C static CSIPToHeader* - NewLC(const CSIPFromToHeaderBase& aHeader); - - /** - * Destructor, deletes the resources of CSIPToHeader. - */ - IMPORT_C ~CSIPToHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPToHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPToHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - RStringF CompactName() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPToHeader(); - }; - -#endif // CSIPTOHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siptokenheaderbase.h --- a/epoc32/include/siptokenheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siptokenheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPTOKENHEADERBASE_H -#define CSIPTOKENHEADERBASE_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP headers having form "Name: token *(COMMA token)" -* -* @lib sipcodec.lib -*/ -class CSIPTokenHeaderBase : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPTokenHeaderBase. - */ - IMPORT_C virtual ~CSIPTokenHeaderBase(); - - - public: // New functions - - /** - * Sets the header value as a token - * @param aValue a value to set - */ - IMPORT_C void SetValueL(RStringF aValue); - - /** - * Gets the header value as a token - * @return the header value - */ - IMPORT_C RStringF Value() const; - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - virtual TBool MoreThanOneAllowed() const; - - protected: // Constructors - - CSIPTokenHeaderBase(); - CSIPTokenHeaderBase(const CSIPTokenHeaderBase& aHeader); - void ConstructL(const TDesC8& aValue, TBool aEmptyValueAllowed=EFalse); - void ConstructL(RStringF aValue, TBool aEmptyValueAllowed=EFalse); - - protected: // New functions - - void DoInternalizeValueL(RReadStream& aReadStream); - - protected: // Data - - /** - * @internalComponent - */ - RStringF iValue; - - private: // From CSIPHeaderBase - - void ExternalizeValueL(RWriteStream& aWriteStream) const; - - private: // New functions - - void SetValueL(const TDesC8& aValue); - - private: // For testing purposes - - UNIT_TEST(CSIPTokenHeaderBaseTest) - }; - -#endif // CSIPTOKENHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/siptransactionbase.h --- a/epoc32/include/siptransactionbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,230 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : siptransactionbase.h -* Part of : SIP Client -* Interface : SDK API, SIP Client API -* Version : 1.0 -* -*/ - - - -#ifndef CSIPTRANSACTIONBASE_H -#define CSIPTRANSACTIONBASE_H - -// INCLUDES -#include -#include -#include "_sipcodecdefs.h" - -// FORWARD DECLARATIONS -class CSIPResponseElements; -class MTransactionAssociation; - -// CLASS DECLARATION - -/** -* @publishedAll -* @released -* -* Base class for managing SIP transactions. -* It provides services for querying transaction type and its state. -* -* This class is an abstract class and cannot be instantiated. -* @lib sipclient -*/ -class CSIPTransactionBase: public CBase - { - public: - /** SIP transaction state */ - enum TState - { - /** Trying state */ - ETrying, - /** Calling state */ - ECalling, - /** Proceeding state */ - EProceeding, - /** Completed state */ - ECompleted, - /** Confirmed state */ - EConfirmed, - /** Terminated state */ - ETerminated, - /** Object is being constructed and is not yet ready for use */ - EConstructing - }; - - public: // Destructor - /** - * Destructor - * @internalComponent - */ - virtual ~CSIPTransactionBase(); - - public: // New functions - /** - * Gets the SIP transaction type - * @return SIP transaction type - */ - IMPORT_C RStringF Type() const; - - /** - * Gets SIP transaction state - * @return SIP transaction state - * @leave KErrSIPResourceNotAvailable if a required SIP Client API - * object has been deleted - */ - IMPORT_C CSIPTransactionBase::TState StateL(); - - /** - * Checks the if the actual object - * is of type CSIPClientTransaction. - * @return ETrue if object is of type CSIPClientTransaction and - * EFalse otherwise - */ - IMPORT_C TBool IsSIPClientTransaction() const; - - /** - * Compares this object to another object also having - * CSIPTransactionBase base class - * The function has to be implemented in each of the sub-classes. - * @param aTransaction a CSIPTransactionBase object to compare - * @return ETrue if the objects are equal otherwise EFalse - */ - IMPORT_C TBool - operator==(const CSIPTransactionBase& aTransaction) const; - - public: // New functions, for internal use - /** - * Obtains the RequestId of the transaction. - * - * @return RequestId - */ - TUint32 RequestId() const; - - /** - * Clears the MTransactionAssociation. After this the object can't be - * used anymore and it is expected that user will delete it soon. - * - * @param aAssociation Object requesting the detach - * @internalComponent - */ - virtual void Detach(const MTransactionAssociation& aAssociation); - - /** - * Changes the transaction state. - * - * @param aNextState State into which transaction moves - */ - void ChangeState(CSIPTransactionBase::TState aNextState); - - /** - * Determines whether this transaction has an effect on the associated - * dialog's state. - * - * @return ETrue if transaction has an effect on the dialog's state, - * EFalse otherwise. - */ - TBool AffectsDialogState() const; - - /** - * Sets this transaction to affect the dialog state. - */ - void SetAffectsDialogState(); - - /** - * Determines whether the transaction type is a target refresh request. - * - * @param aType Type of transaction - * @return ETrue If the transaction is a target refresh request, EFalse - * otherwise. - */ - static TBool IsTargetRefresh(RStringF aType); - - /** - * Stores response elements. Depending on the status code, transaction - * may enter another state. - * - * @param aElements Response elements, ownership is transferred. - */ - void SetResponseElements(CSIPResponseElements* aElements); - - protected: // Constructors - CSIPTransactionBase(TBool aIsClientTransaction, - TUint32 aRequestId, - MTransactionAssociation& aAssociation); - - void ConstructL(RStringF aType); - - protected: // New functions, for internal use - /** - * Checks that iAssociation is available (not NULL). If iAssociation is - * NULL, it means user has deleted a resource needed by - * CSIPTransactionBase, and this function leaves. - */ - void CheckAssociationL() const; - - /** - * Gets response elements. - * - * @return Response elements. Ownership isn't transferred. - */ - const CSIPResponseElements* ResponseElements() const; - - protected: // Data - - /** - * RequestId received from SIP client - * @internalComponent - */ - TUint32 iRequestId; - - /** - * Every transaction is associated to exactly one other object: - * CSIP, CSIPConnection, CSIPRegistrationBinding or CSIPDialogAssocBase - * @internalComponent - */ - MTransactionAssociation* iAssociation; - - private: // Data - RStringF iType; - - //ETrue is the transaction is a client transaction, EFalse otherwise - TBool iIsClientTransaction; - - //Current transaction state - CSIPTransactionBase::TState iState; - - //ETrue if the transaction has an effect on the dialog state in case - //the transaction is associated with a dialog. - //EFalse otherwise. - TBool iAffectsDialogState; - - //SIP response elements - CSIPResponseElements* iResponseElements; - - private: // For testing purposes - UNIT_TEST(CSIP_Test) - UNIT_TEST(CSIPServerTransaction_Test) - UNIT_TEST(CSIPSubscribeDialogAssoc_Test) - UNIT_TEST(CSIPInviteDialogAssoc_Test) - UNIT_TEST(CSIPNotifyDialogAssoc_Test) - UNIT_TEST(CSIPConnection_Test) - - __DECLARE_TEST; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipunsignedintheaderbase.h --- a/epoc32/include/sipunsignedintheaderbase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipunsignedintheaderbase.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPUNSIGNEDINTHEADERBASE_H -#define CSIPUNSIGNEDINTHEADERBASE_H - -// INCLUDES -#include "sipheaderbase.h" -#include "_sipcodecdefs.h" - - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* A base class for SIP headers having form: "Name: 1*DIGIT" -* -* @lib sipcodec.lib -*/ -class CSIPUnsignedIntHeaderBase : public CSIPHeaderBase - { - public: // Constructors and destructor - - /** - * Destructor, deletes the resources of CSIPUnsignedIntHeaderBase. - */ - IMPORT_C virtual ~CSIPUnsignedIntHeaderBase(); - - - public: // New functions - - /** - * Sets the header value as an unsigned integer - * @param aValue a value to set - */ - IMPORT_C void SetValue(TUint aValue); - - /** - * Gets the header value as an unsigned integer - * @return the header value - */ - IMPORT_C TUint Value() const; - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase ToTextValueL - */ - IMPORT_C HBufC8* ToTextValueL() const; - - - protected: // Constructors - - CSIPUnsignedIntHeaderBase(); - CSIPUnsignedIntHeaderBase(TUint aValue); - - protected: // New functions - - void ParseL(const TDesC8& aValue, TInt aErrorIfParsingFails); - void DoInternalizeValueL(RReadStream& aReadStream); - - protected: // From CSIPHeaderBase - - /** - * @internalComponent - */ - void ExternalizeValueL (RWriteStream& aWriteStream) const; - - protected: // Data - - /** - * @internalComponent - */ - TUint iValue; - }; - -#endif // CSIPUNSIGNEDINTHEADERBASE_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipunsupportedheader.h --- a/epoc32/include/sipunsupportedheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipunsupportedheader.h -* Part of : SIP Codec -* Interface : SDK API, SIP Codec API -* Version : SIP/4.0 -* -*/ - - - - -#ifndef CSIPUNSUPPORTEDHEADER_H -#define CSIPUNSUPPORTEDHEADER_H - -// INCLUDES -#include "siptokenheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class provides functions for setting and getting SIP "Unsupported" header. -* -* @lib sipcodec.lib -*/ -class CSIPUnsupportedHeader : public CSIPTokenHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPUnsupportedHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "Unsupported"-header - * @return an array containing 1..n instances of CSIPUnsupportedHeader - */ - IMPORT_C static RPointerArray - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPUnsupportedHeader - * @param aValue a tag value - * @return a new instance of CSIPUnsupportedHeader - */ - IMPORT_C static CSIPUnsupportedHeader* NewL (RStringF aValue); - - /** - * Creates a new instance of CSIPUnsupportedHeader - * and puts it to CleanupStack - * @param aValue a tag value - * @return a new instance of CSIPUnsupportedHeader - */ - IMPORT_C static CSIPUnsupportedHeader* NewLC(RStringF aValue); - - /** - * Destructor, deletes the resources of CSIPUnsupportedHeader. - */ - IMPORT_C ~CSIPUnsupportedHeader(); - - - public: // New functions - - /** - * Constructs an instance of a CSIPUnsupportedHeader from a RReadStream - * @param aReadStream a stream containing the value of the - * externalized object (header name not included). - * @return an instance of a CSIPUnsupportedHeader - */ - IMPORT_C static CSIPHeaderBase* - InternalizeValueL(RReadStream& aReadStream); - - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - - public: // From CSIPHeaderBase, for internal use - - /** - * @internalComponent - */ - TPreferredPlace PreferredPlaceInMessage() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - - private: // Constructors - - CSIPUnsupportedHeader(); - CSIPUnsupportedHeader(const CSIPUnsupportedHeader& aHeader); - }; - -#endif // CSIPUNSUPPORTEDHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sipwwwauthenticateheader.h --- a/epoc32/include/sipwwwauthenticateheader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Name : sipwwwauthenticateheader.h -* Part of : SIP Codec -* Version : SIP/5.0 -* -*/ - - - -#ifndef CSIPWWWAUTHENTICATEHEADER_H -#define CSIPWWWAUTHENTICATEHEADER_H - -// INCLUDES -#include "sipauthenticateheaderbase.h" -#include "_sipcodecdefs.h" - -// CLASS DECLARATION -/** -* @publishedAll -* @released -* -* Class for SIP WWW-Authenticate-header manipulation. -* -* @lib sipcodec.lib -*/ -class CSIPWWWAuthenticateHeader : public CSIPAuthenticateHeaderBase - { - public: // Constructors and destructor - - /** - * Constructs a CSIPWWWAuthenticateHeader from textual representation - * of the header's value part. - * @param aValue a value part of a "WWW-Authenticate"-header - * @return a new instance of CSIPWWWAuthenticateHeader - */ - IMPORT_C static CSIPWWWAuthenticateHeader* - DecodeL(const TDesC8& aValue); - - /** - * Creates a new instance of CSIPWWWAuthenticateHeader - * @return a new instance of CSIPWWWAuthenticateHeader - */ - IMPORT_C static CSIPWWWAuthenticateHeader* - NewL(RStringF aAuthScheme); - - /** - * Creates a new instance of CSIPWWWAuthenticateHeader - * @return a new instance of CSIPWWWAuthenticateHeader - */ - IMPORT_C static CSIPWWWAuthenticateHeader* - NewLC(RStringF aAuthScheme); - - /** - * Destructor - */ - IMPORT_C ~CSIPWWWAuthenticateHeader(); - - public: // From CSIPHeaderBase - - /** - * From CSIPHeaderBase CloneL - */ - IMPORT_C CSIPHeaderBase* CloneL() const; - - /** - * From CSIPHeaderBase Name - */ - IMPORT_C RStringF Name() const; - - public: // New functions, for internal use - - static RPointerArray BaseDecodeL(const TDesC8& aValue); - static CSIPHeaderBase* InternalizeValueL(RReadStream& aReadStream); - - private: // Constructors - - CSIPWWWAuthenticateHeader(); - - private: // For testing purposes - - UNIT_TEST(CSIPWWWAuthenticateHeaderTest) - }; - -#endif // CSIPWWWAUTHENTICATEHEADER_H - -// End of File diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smcmmain.h --- a/epoc32/include/smcmmain.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,91 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMUTMAIN_H__ -#define __SMUTMAIN_H__ - -#include - -/** -@deprecated -@internalComponent -*/ -const TInt KSmscSessionPriority = CActive::EPriorityStandard; - -/** -@deprecated -@internalComponent -*/ -_LIT(KSmcmDllName,"SMCM"); - -/** -The panic codes used by the SMS client MTM. - -@internalComponent -@released -*/ -enum TSmcmPanic - { - ESmutPanicUnsupportedMsgType = 0, - ESmscEntryNotSet = 1, - ESmscWrongContextType = 2, - ESmscPanicUnexpectedCommand = 3, - ESmscUnrecognizedEntryType = 4, - ESmscAddresseeIndexOutOfRange = 5, - ESmscRecpAddresseeMiscount = 6, - ESmscDefaultSCOutOfRange = 7, - ESmscVPOutOfRange = 8, -/** -@deprecated Currently not used. -*/ - ESmscRetryLimitOutOfRange = 9, - ESmscBioMsgIdTypeError = 10, - ESmscSettingsNotSet = 11, - ESmscServiceIdNotSet = 12, -/** -@deprecated Currently not used. -*/ - ESmscSimParamWrongType = 13, -/** -@deprecated Currently not used. -*/ - ESmscSimParamExistingOperation = 14, -/** -@deprecated Currently not used. -*/ - ESmscSimParamInvalidProgressCount = 15, -/** -@deprecated Currently not used. -*/ - ESmscWrongCommDbAction = 16, - - ESmscFunctionNotSupported = 17 - }; - -/** -Panic function. - -@param aPanic The panic code. - -@internalComponent -@released -*/ -inline void Panic(TSmcmPanic aPanic) - { - _LIT(KSmcmPanic, "SMCM"); - User::Panic(KSmcmPanic, aPanic); - } - -#endif // __SMUTMAIN_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smsclnt.h --- a/epoc32/include/smsclnt.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMSCLNT_H__ -#define __SMSCLNT_H__ - -#include -#include - - -/** -The UID that indentifies the SMS message editor application. - -This is the response to the query for the KUidMsvMtmQueryEditorUidValue -capability. - -@see CSmsClientMtm::QueryCapability - -@publishedPartner -@released -*/ -const TInt KUidMsgSmsEditorAppVal=0x1000163f; - -/** -The maximum number of SMS PDUs allowed in a concatenated SMS message. - -Together with KSmcmMaxCharsInMessageConcatenated7Bit, this is the response to -the query for the KUidMtmQueryMaxTotalMsgSizeValue capability. - -@see CSmsClientMtm::QueryCapability -@see KSmcmMaxCharsInMessageConcatenated7Bit - -@internalComponent -@released -*/ -const TInt KSmcmMaxMessageNumber=0x32; - -/** -The maximum number of characters in a concatenated SMS PDU. - -Together with KSmcmMaxMessageNumber, this is the response to the query for the -KUidMtmQueryMaxTotalMsgSizeValue capability. - -@see CSmsClientMtm::QueryCapability -@see KSmcmMaxCharsInMessageConcatenated7Bit - -@internalComponent -@released -*/ -const TInt KSmcmMaxCharsInMessageConcatenated7Bit=0x99; - -/** -The maximum number of characters in a non-concatenated SMS PDU. - -This is the response to the query for the KUidMtmQueryMaxBodySizeValue -capability. - -@see CSmsClientMtm::QueryCapability - -@internalComponent -@released -*/ -const TInt KSmcmMaxTotalMsgSize=160; - -/** -The granularity of the in-memory buffer for CRichText objects. - -@see CRichText::NewL - -@internalComponent -@released -*/ -const TInt KSmcmRichTextConstant=256; - -class CSmsHeader; -class CSmsMessage; -class CSmsSettings; -class TSmsUtilities; -class CSmsSimParamOperation; -class CMobilePhoneSmspList; -class RResourceFile; - -/** -The SMS client MTM interface. - -Most of the functions in this class are implementations of the virtual functions -defined by the base class CBaseMtm. - -An object of this class can be obtained from the Client MTM registry. The message -server provides the necessary information required by the registry to provide -the SMS client MTM. - -All client MTM objects have a current context. This is an entry in the message -store that will be manipulated by certain APIs supplied by the MTM. If the -current context is not set then certain APIs will panic. - -The CBaseMtm::HasContext API can be used to check that the current context has -been set. It can be set using either the CBaseMtm::SwitchCurrenEntryL API or the -CBaseMtm::SetCurrentEntryL API. - -@see CClientMtmRegistry -@see CBaseMtm::HasContext -@see CBaseMtm::SetCurrentEntryL -@see CBaseMtm::SwitchCurrenEntryL - -@publishedAll -@released -*/ -class CSmsClientMtm : public CBaseMtm - { -public: - - IMPORT_C static CSmsClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aSession); - virtual ~CSmsClientMtm(); - - void HandleEntryEvent(enum MMsvEntryObserver::TMsvEntryEvent,TAny*,TAny*,TAny*); - - inline CSmsHeader& SmsHeader(); - inline const CSmsHeader& SmsHeader() const; - inline CSmsSettings& ServiceSettings(); - inline const CSmsSettings& ServiceSettings() const; - inline TInt ServiceId() const; - - IMPORT_C void RestoreServiceAndSettingsL(); - IMPORT_C CSmsSimParamOperation* ReadSimParamsL(TRequestStatus& aObserverRequestStatus); - IMPORT_C CSmsSimParamOperation* WriteSimParamsL(const CMobilePhoneSmspList& aList, TRequestStatus& aObserverRequestStatus); - - /** - Sets the character encoding value. The character encoding value options are 7-bit, - 8-bit and 16-Bit Unicode. By default the character set encoding is 7 bit encoding. - */ - void SetMessageCharacterSetL(TSmsDataCodingScheme::TSmsAlphabet aTsmsAlphabet); - -public: // methods from CBaseMtm - - virtual void SaveMessageL(); - virtual void LoadMessageL(); - virtual TMsvPartList ValidateMessage(TMsvPartList aPartList); - virtual TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); - virtual CMsvOperation* ReplyL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); - virtual CMsvOperation* ForwardL(TMsvId aDestination, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); - virtual void AddAddresseeL(const TDesC& aRealAddress); - virtual void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); - virtual void RemoveAddressee(TInt aIndex); - virtual TInt QueryCapability(TUid aCapability, TInt& aResponse); - virtual void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter); - virtual CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); - - IMPORT_C void CreateMessageL(TMsvId aServiceId); - IMPORT_C void BioTypeChangedL(TUid aBioTypeUid); - -protected: - /** - Methods from CBaseMtm, The implementation of this function assumes that - the new service for setting the charset encoding value for a SMS message is supported. - */ - IMPORT_C virtual TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); - -private: - - CSmsClientMtm(CRegisteredMtmDll& aRegisteredMtmDll,CMsvSession& aSession); - void ConstructL(); - - void BasicReplyForwardEntry(TMsvEntry& aNewEntry) const; - CMsvOperation* CreateNewEntryL(TMsvEntry& aNewEntry, TMsvId aDestination,CSmsHeader& aSmsHeader,const CRichText& aBody, TRequestStatus& aCompletionStatus); - TBool ValidRecipients() const; - TBool ValidNumber(const TDesC& aNumber) const; - -private: // methods from CBaseMtm - - virtual void ContextEntrySwitched(); - -private: - - void DoAddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); - void AddRecipientL(const TDesC& aRealAddress, const TDesC& aAlias); - void DoAddRecipientL(CSmsHeader* aSmsHeader, const TDesC& aRealAddress, const TDesC& aAlias); - void ResetHeader(); - TMsvPartList DoFindL(const TDesC& aTextToFind,TMsvPartList aPartList); - void FindL(const TDesC& aTextToFind, const TMsvPartList aPartList,TMsvPartList& aFoundList); - void FindInBodyL(const TDesC& aTextToFind, const TMsvPartList& aFoundList, TMsvPartList& aResult); - HBufC* ReadEmailSubjectFormatL(RResourceFile& aResourceFile, TInt aResourceId, const TDesC& aDefaultFormat); - -private: - - CSmsSettings* iServiceSettings; - TMsvId iServiceId; - CSmsHeader* iSmsHeader; - TChar iRealAddressOpen; - TChar iRealAddressClose; - HBufC* iEmailForwardSubjectFormat; - HBufC* iEmailReplySubjectFormat; - }; - -#include - -#endif // __SMSCLNT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smscmds.h --- a/epoc32/include/smscmds.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,329 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMSCMDS_H__ -#define __SMSCMDS_H__ - -#include - -/** -Numeric value of the first SMS-specific command. - -This is only used by TSmsMtmCommand. - -@see TSmsMtmCommand - -@internalComponent -@released -*/ -const TInt KMinCommandExpected = 10000; - -/** -The SMS-specific commands that can be issued through CSmsClientMtm::InvokeAsyncFunctionL. - -SMS messages can be stored in a medium other than the message store itself. For -instance, SMS messages can be stored on the SIM card. This alternative storage -is referred to as the phone store. - -Some of the commands defined allow the contents of the phone store to accessed -and manipulated. - -@see CSmsClientMtm::InvokeAsyncFunctionL -@see CSmsClientMtm::ReadSimParamsL -@see CSmsClientMtm::WriteSimParamsL -@see TSmsProgress - -@publishedAll -@released -*/ -enum TSmsMtmCommand - { -/** -Gets the service centre address (i.e. telephone number) from the GSM handset. - -The result may be retrieved from the iServiceCenterAddress member variable -in the TSmsProgress progress object for this operation. - -The aSelection and aParameter arguments are not used by this command, except -that aSelection must contain at least one member, preferably the SMS Service -ID. - -If the telephone handset is unable to supply the service centre address, then -the progress object for this operation will contain the error. - -NOTE - ESmsMtmCommandReadServiceCenter should only be used if the telephone -handset or TSY module does not support reading the SMS parameters on the SIM. -ESmsMtmCommandReadServiceCenter should only be used if the operation -returned by CSmsClientMtm::ReadSimParamsL completes with KErrNotSupported. - -@removed -This command is not supported from v7.0. The function CSmsClientMtm::ReadSimParamsL -should be used instead to obtain Service Centre number from the phone store. - -@see CSmsClientMtm::ReadSimParamsL -@see TSmsProgress -*/ - ESmsMtmCommandReadServiceCenter = KMinCommandExpected, - -/** -Sets a new service centre address (i.e. telephone number) on the GSM handset. - -The new telephone number is passed in aParameter as an 8-bit descriptor containing -a packaged TSmsServiceCenterAddress. - -The aSelection parameter argument is not used by this command, except that -aSelection must contain at least one member, preferably the SMS Service ID. - -@removed -This command is not supported from v7.0. The function CSmsClientMtm::WriteSimParamsL -should be used instead to write the Service Centre number to the phone store. - -@see CSmsClientMtm::WriteSimParamsL -@see TSmsServiceCenterAddress -*/ - ESmsMtmCommandWriteServiceCenter, - -/** -Schedules the selected SMS messages to be sent. - -The aSelection argument contains the TMsvId of the SMS messages to be sent. An -empty selection will cause a panic in debug mode. In release mode nothing will -happen. - -The time that each message is scheduled to be sent is set by the date field in -the TMsvEntry for that message. Each message in the selection must have the same -scheduled time as the first message in the selection. A send task is scheduled -to occur at this time. - -In debug mode a panic will occur if all the messages in the selection do not -have the safe scheduled time. In release mode, the scheduled time sending all -the messages in the selection will be that of the last message in the selection. - -When the scheduled task occurs not only will the selected messages be sent but -also any waiting SMS messages in the Outbox. - -If the messages are successfully sent by the scheduled task, then all the sent -messages are moved to the Sent folder. - -If any message fails to be sent then the message is marked as failed. Also it -may be re-scheduled to be sent at a later time if that particular error has been -specified as a re-schedulable error. The message remains in its current folder. - -The aParameter agrument is not used. - -@see CMsvSession::TransferCommandL - -@see CBaseMtm::InvokeAsyncCommandL - -*/ - ESmsMtmCommandScheduleCopy, - -/** -Not supported by the SMS MTM. - -@internalComponent -*/ - ESmsMtmCommandScheduleMove, - -/** -Removes all messages specified in aSelection from the task scheduler list. - -If successful, the messages will have their SendingState() set to KMsvSendStateSuspended -on completion of this operation. - -The aParameter argument is not used by this function. - -@see TMsvEntry::SendingState() -*/ - ESmsMtmCommandDeleteSchedule, - -/** -Checks the current scheduled status of the messages specified by aSelection. - -If successful, the Scheduled() and iDate members of each TMsvEntry identified -in the selection will be changed to represent that messages's current status. - -The aParameter argument is not used by this function. - -@see TMsvEntry -*/ - ESmsMtmCommandCheckSchedule, - -/** -Starts sending the specified selection of SMS messages. - -When a selection of SMS messages are scheduled to be sent using the ESmsMtmCommandScheduleCopy -command this is the actual command that is executed the scheduled time occurs. - -The SMS server MTM creates a package contain this command. The package is passed -to the task scheduler who then passes it to the schedule send exe. The exe then -uses the package to ask the SMS server MTM to send the messages. As such this -command should not be used be external clients. - -When the scheduled task occurs not only will the selected messages be sent but -also any waiting SMS messages in the Outbox. - -If the messages are successfully sent by the scheduled task, then all the sent -messages are moved to the Sent folder. - -If any message fails to be sent then the message is marked as failed. Also it -may be re-scheduled to be sent at a later time if that particular error has been -specified as a re-schedulable error. The message remains in its current folder. - -@internalComponent -*/ - ESmsMtmCommandSendScheduledCopy, - -/** -Not supported by the SMS MTM. - -@internalComponent -*/ - ESmsMtmCommandSendScheduledMove, - -/** -Reads the SMS messages on the phone store and creates a copy of those messages -in an invisible folder under the SMS service in the message store. - -If successful, the iEnumerateFolder member of the operation's progress will -identify the invisible folder which contains the messages read from the phone -store. - -The aSelection argument must contain at least the SMS servive ID. The aParameter -argument can optionally be a TPckgC containing the ID of an existing folder to -use for the enumeration. The contents of this folder will be replaced with the -current messages in the phone store. - -The operation will fail with KErrArgument if the ID in aParameter is one of the -following - KMsvRootIndexEntryId, KMsvLocalServiceIndexEntryId, KMsvGlobalInBoxIndexEntryId, -KMsvGlobalOutBoxIndexEntryId, KMsvDraftEntryId or KMsvSentEntryId. - -This command must be called before using ESmsMtmCommandCopyFromPhoneStore, -ESmsMtmCommandMoveFromPhoneStore or ESmsMtmCommandDeleteFromPhoneStore. - -Pre v7.0, this was named ESmsMtmCommandEnumerateSim. - -@see TSmsProgress -*/ - ESmsMtmCommandEnumeratePhoneStores, - -/** -Moves the messages identified in aSelection to the folder identified in aParameter -(e.g. the inbox). - -The associated SMS messages are not deleted from the phone store. - -The first entry ID in aSelection must be the SMS service ID. All following -entry IDs in the selection must then represent each message to be transferred. -aParameter should contain a packaged TMsvId, which identifies the folder to -which the messages in aSelection will be moved. - -The command ESmsMtmCommandEnumeratePhoneStores must be called before using -this command. - -Pre v7.0, this was named ESmsMtmCommandCopyFromSim. - -@see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores -*/ - ESmsMtmCommandCopyFromPhoneStore, - -/** -Moves the messages identified in aSelection to the folder identified in aParameter -(e.g. the inbox), and then deletes the messages from the phone store. - -The first entry ID in aSelection must be the SMS service ID. All following -entry IDs in the selection must then represent each message to be transferred. -aParameter should contain a packaged TMsvId, which identifies the folder to -which the messages in aSelection will be moved. - -The command ESmsMtmCommandEnumeratePhoneStores must be called before using -this command. - -Pre v7.0, this was named ESmsMtmCommandMoveFromSim. - -@see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores -*/ - ESmsMtmCommandMoveFromPhoneStore, - -/** -Deletes the specified messages from the phone store. - -The first entry ID in aSelection must be the SMS service ID. All following -entry IDs in the selection must then represent each message to be deleted. -aParameter is not used. - -The command ESmsMtmCommandEnumeratePhoneStores must be called before using -this command. - -Pre v7.0, this was named ESmsMtmCommandDeleteFromSim. - -@see TSmsMtmCommand::ESmsMtmCommandEnumeratePhoneStores -*/ - ESmsMtmCommandDeleteFromPhoneStore, - -/** -Reads the SIM parameters. - -This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The -CSmsClientMtm::ReadSimParamsL function should be used to read the SIM parameters. - -@see CSmsClientMtm::ReadSimParamsL - -@internalComponent -*/ - ESmsMtmCommandReadSimParams, - -/** -Writes the specified SIM parameters. - -This should not be used in the CSmsClientMtm::InvokeAsyncFunctionL function. The -CSmsClientMtm::WriteSimParamsL function should be used to write the SIM parameters. - -@see CSmsClientMtm::WriteSimParamsL - -@internalComponent -*/ - ESmsMtmCommandWriteSimParams, - -/** -Copies the SMS messages identified in aSelection to the phone store. - -The first entry ID in aSelection must be the SMS service ID. All following -entry IDs in the selection must then represent each message to be copied. -Single message with multiple recipients is copied onto SIM as multiple messages, -one message for each recipient.Copy/Move from SIM will result in multiple messages, -single message will not be reformed out of the mutiple messages on SIM. - - -Pre v7.0, this was named ESmsMtmCommandCopyToSim. -*/ - ESmsMtmCommandCopyToPhoneStore, - -/** -Moves the SMS messages identified in aSelection to the phone store. - -The first entry ID in aSelection must be the SMS service ID. All following -entry IDs in the selection must then represent each message to be moved. -SSingle message with multiple recipients is moved onto SIM as multiple messages, -one message for each recipient.Copy/Move from SIM will result in multiple messages, -single message will not be reformed out of the mutiple messages on SIM. - - -Pre v7.0, this was named ESmsMtmCommandMoveToSim. -*/ - ESmsMtmCommandMoveToPhoneStore - }; - -#endif // __SMSCMDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smtcmtm.h --- a/epoc32/include/smtcmtm.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// SMTCPMTM.H -// Client MTM for the SMTP protocol -// -// - -#if !defined (__SMTCMTM_H__) -#define __SMTCMTM_H__ - -#if !defined (__E32BASE_H__) -#include // CActive, TFileName) -#endif - -#if !defined(__BADESCA_H__) -#include -#endif - -#if !defined (__MSVAPI_H__) -#include -#endif - -#if !defined (__MTCLBASE_H__) -#include -#endif - -#if !defined (__MIUTHDR_H__) -#include -#endif - -#if !defined (__MIUTPARS_H__) -#include //TImMessageField -#endif - -#if !defined (__MIUTMSG_H__) -#include //CImEmailMessage -#endif - -#if !defined (__SMTPSET_H__) -#include -#endif - -#if !defined (__SMTPCMDS_H__) -#include -#endif - -class CMsvEntry; -class CMtmDllRegistry; -class CRichText; -class TMsvEntry; -class CRegisteredMtmDll; -class CImSmtpSettings; -class CMsvSession; -class CImAttachmentWaiter; - -/////// Smtp Client MTM ///////////////////////////////////////////////////////////////////////////// -class CSmtpClientMtm : public CBaseMtm -/** SMTP client MTM interface. - -Most of the functions in this class are implementations of the virtual functions -defined by the base class CBaseMtm. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CSmtpClientMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); - ~CSmtpClientMtm(); - - void SaveMessageL(); - void LoadMessageL(); - - IMPORT_C void StoreSettingsL(); - IMPORT_C void RestoreSettingsL(); - - CMsvOperation* ReplyL (TMsvId aReplyEntryId, TMsvPartList aPartlist, TRequestStatus& aCompletionStatus); - CMsvOperation* ForwardL(TMsvId aForwardEntryId, TMsvPartList aPartList, TRequestStatus& aCompletionStatus); - - TMsvPartList ValidateMessage(TMsvPartList aPartList); - TMsvPartList Find(const TDesC& aTextToFind, TMsvPartList aPartList); - - // addresssee list (used by objects with no MTM knowledge) - void AddAddresseeL(const TDesC& aRealAddress); - void AddAddresseeL(const TDesC& aRealAddress, const TDesC& aAlias); - void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress); - void AddAddresseeL(TMsvRecipientType aType, const TDesC& aRealAddress, const TDesC& aAlias); - void RemoveAddressee(TInt aIndex); - - IMPORT_C void SetSettingsL(const CImSmtpSettings& aSettings); - IMPORT_C const CImSmtpSettings& Settings() const; - IMPORT_C void SetSubjectL(const TDesC& aSubject); - IMPORT_C const TPtrC SubjectL() const; - - // --- RTTI functions --- - TInt QueryCapability(TUid aCapability, TInt& aResponse); - void InvokeSyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter); - CMsvOperation* InvokeAsyncFunctionL(TInt aFunctionId,const CMsvEntrySelection& aSelection, TDes8& aParameter, TRequestStatus& aCompletionStatus); - - // Attachment functions to support the SendAs API - IMPORT_C virtual void AddAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddAttachmentL(RFile& aFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddLinkedAttachmentL(const TDesC& aFilePath, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void AddEntryAsAttachmentL(TMsvId aAttachmentId, TRequestStatus& aStatus); - IMPORT_C virtual void CreateAttachmentL(const TDesC& aFileName, RFile& aAttachmentFile, const TDesC8& aMimeType, TUint aCharset, TRequestStatus& aStatus); - IMPORT_C virtual void CreateMessageL(TMsvId aServiceId); - - IMPORT_C virtual TMsvId DefaultServiceL() const; - IMPORT_C virtual void RemoveDefaultServiceL(); - IMPORT_C virtual void ChangeDefaultServiceL(const TMsvId& aService); - IMPORT_C void CancelAttachmentOperation(); - -protected: - CSmtpClientMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvSession& aMsvSession); - void ConstructL(); - - void ContextEntrySwitched(); // called after the context of this instance has been changed to another entry -private: - TBool ValidateAddress(const TPtrC& anAddress); - void ResetData(); - - void RestoreEmailMessageL(); - void StoreEmailMessageL(); - void SetAddresseeListL(); - void GetBodyTextL(CImEmailMessage& aMessage, TMsvId aMsvId); - TInt32 GetAttachmentSizeL(CImEmailMessage& aMessage, TMsvId aMsvId); - TMsvPartList DoFindL(const TDesC& aTextToFind, TMsvPartList aPartList); - -private: - CMsvOperationActiveSchedulerWait* iWait; - CImSmtpSettings* iImSmtpSettings; - CImHeader* iHeader; - HBufC* iSubject; - - TImMessageField iTImMessageField; - HBufC* iEmailAddressFormatString; // defines format of email address used by "Send as" API eg _LIT("/"%S/" <%S>") - CMsvEntrySelection* iEntrySelection; - CImEmailOperation* iImEmailOperation; - CImAttachmentWaiter* iAttachmentWaiter; - CImEmailMessage* iEmailMessage; - }; - - -#endif // __SMTCMTM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smtpcmds.h --- a/epoc32/include/smtpcmds.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__SMTPCMDS_H__) -#define __SMTPCMDS_H__ - -#if !defined (__MSVSTD_HRH__) -#include -#endif - -/** SMTP-specific commands that can be issued through CSmtpClientMtm::InvokeAsyncFunctionL(). -@publishedAll -@released -*/ -enum TSmtpCmds - { - /** Not supported. */ - KSMTPMTMIsConnected = KMtmFirstFreeMtmFunctionId, - /** Send messages on next connection. - - The first entry in aSelection specifies the SMTP service entry that is to - be used to send the email messages. aSelection may contain only one entry - ID. The SMTP MTM will append the Ids of all "ready" email messages which exist - in the outbox that match the IAP of the specified SMTP service. Whether an - email message is "ready" is determined from its TMsvEntry::SendingState() - flag. - - If an Internet connection has already been established by another client, - then this function may fail with KSmtpNoMsgsToSendWithActiveSettings if none - of the messages specified in aSelection match the IAP currently in use. */ - KSMTPMTMSendOnNextConnection, - /** Creates a new message. */ - KSMTPMTMCreateNewEmailMessage, - /** Creates a new reply message. */ - KSMTPMTMCreateReplyEmailMessage, - /** Creates a new forwarded message. */ - KSMTPMTMCreateForwardEmailMessage, - /** Creates a new forwarded message as an attachment. */ - KSMTPMTMCreateForwardAsAttachmentEmailMessage, - /** Creates a new message-receipt message. */ - KSMTPMTMCreateReceiptEmailMessage - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smtpset.h --- a/epoc32/include/smtpset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,325 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined (__SMTPSET_H__) -#define __SMTPSET_H__ - - -#include -#include - -/** Default SMTP server port number.*/ -const TUint32 KSMTPDefaultPortNumber = 25; - -/** Default/maximum addresses to include in body header of reply/forward messages */ -const TInt KSmtpToCcIncludeLimitDefault = 0; -const TInt KSmtpToCcIncludeLimitMax = KMaxTInt; - - -/** -Defines options that allows the user to automatically email themselves a copy -of all emails that are sent from the phone. - -@see CImSmtpSettings::SendCopyToSelf() - -@publishedAll -@released -*/ -enum TImSMTPSendCopyToSelf - { - /** Do not send a copy. */ - ESendNoCopy, - /** Send a copy, with the user's address added to the To address list. */ - ESendCopyAsToRecipient, - /** Send a copy, with the user's address added to the Cc: address list. */ - ESendCopyAsCcRecipient, - /** Send a copy, with the user's address added to the Bcc: address list. */ - ESendCopyAsBccRecipient - }; -/** -Defines sending options for new email messages. - -The option has no direct effect on the SMTP MTM, although messages in the -outbox which are marked as ESendMessageOnNextConnection or ESendMessageImmediately -will be appended automatically to the list of messages supplied by the client -when either CBaseServerMtm::CopyFromLocal() or CBaseServerMtm::MoveFromLocal() -are called. - -@publishedAll -@released -*/ -enum TImSMTPSendMessageOption - { - /** Send message immediately. */ - ESendMessageImmediately, - /** Send message when the next connection occurs. */ - ESendMessageOnNextConnection, - /** Send message only when the user requests this. */ - ESendMessageOnRequest - }; - -/** -Defines status values for the SMTP MTM. - -@publishedAll -@released -*/ -enum TMsgImOutboxSendState - { - /** Idle. */ - EMsgOutboxProgressWaiting, - /** Connecting to server. */ - EMsgOutboxProgressConnecting, - /** Sending messages. */ - EMsgOutboxProgressSending, - /** Sending complete. */ - EMsgOutboxProgressDone - }; - -/** Sending state for SMTP. - -@publishedAll -@released -*/ -enum TSmtpSessionState - { - /** Dialling, looking up DNS, or connecting to SMTP server. */ - EConnectingToSmtp, - /** Waiting for the SMTP server to send welcome message. */ - EWaitingForReply, - /** Sending HELO/EHLO command to the server. */ - EAuthorisingSmtp, - /** Sending the STARTTLS command, if a secure connection was requested. */ - ESendingStarttls, - /** Exchanging certificates with server, if a secure connection was requested. */ - ESettingSecurity, - /** Sending a message to the server. */ - ESendingImail, - /** Logging result. */ - ELogDataEvent, - /** Disconnecting from the SMTP server. */ - EClosingSmtp, - /** AUTH in progress. */ - EAuthInProgress, - /** RSET in progress. */ - EResetSmtp - }; - -class TImImailFileProgress -/** -Status information about the SMTP message which is being sent. - -@publishedAll -@released -*/ - { -public: - /** - Amount of data from the message already sent to the server in bytes. - - Note that the SMTP MTM encodes the text and binary data inside an email message - while it is sending the data. As a result, iBytesToSend is likely to increase - (by as much as one third) while a message is being sent. The size increase - represents all additional bytes which have been added to the RFC 822 message - to encode the data. - */ - TInt iBytesSent; - /** Amount of data from the message still to be sent to the server in bytes. */ - TInt iBytesToSend; - /** Sending state. */ - TSmtpSessionState iSessionState; - }; - -class TImSmtpProgress -/** -Progress information for SMTP operations on the Internet Mail MTM. - -The information is obtained through calling CMsvOperation::Progress() -on the operation. It is packaged into an 8-bit descriptor. - -Messaging clients use the getter functions to get various types -of information about an operation's progress. The setter functions -are for use by the MTM. - -@publishedAll -@released -*/ - { - -public: - IMPORT_C TMsgImOutboxSendState Status() const; // Progress: current progress status of mail session - IMPORT_C TInt MsgNo() const; // Progress: No. of message currently being sent; zero=1st message - IMPORT_C TInt Error() const; // Summary: completion code from end of last session - IMPORT_C TInt Sent() const; // Summary: No. messages sent successfully - IMPORT_C TInt NotSent() const; // Summary: No. messages I didn't attempt to send - IMPORT_C TInt FailedToSend() const; // Summary: No. messages attempted to send but failed - IMPORT_C TInt SendTotal() const; // Sent() + NotSent() + FailedToSend() = SendTotal() - IMPORT_C void SetError(TInt anError); - IMPORT_C void SetStatus(TMsgImOutboxSendState aStatus); - IMPORT_C void SetMsgNo(TInt aMsgNo); - IMPORT_C void InitialiseTotal(const TInt& aTotal); - IMPORT_C void UpdateSent(); - IMPORT_C void UpdateFailedToSend(); - IMPORT_C void DecrementSendTotal(); - IMPORT_C TMsvId ServiceId() const; - IMPORT_C void SetServiceId(TMsvId aServiceId); - IMPORT_C TInt ConnectionState() const; - IMPORT_C TInt ConnectionIAP() const; - IMPORT_C void SetConnectionIAP(TInt aConnectionIAP); - -public: - /** Status information about the message that is currently being sent (if - sending is in progress). */ - TImImailFileProgress iSendFileProgress; - -private: - TMsgImOutboxSendState iStatus; - TInt iError; - TInt iMsgNo; - TInt iSent; - TInt iNotSent; - TInt iFailedToSend; - TInt iSendTotal; - TMsvId iServiceId; - }; - -class CImSmtpSettings : public CImBaseEmailSettings -/** -Run-time configuration settings for an SMTP account. - -Messaging clients should use an instance of this class to specify -and retrieve configuration settings that are used by the SMTP service when -executing email operations. - -Service settings such as the email body encoding, reply address, character set, -and whether to attach a signature or vCard can be specified using this class. -Storing and restoring from the message store is also supported. - -To use this class to change a setting: - -1) Set the current context to the SMTP service entry using CMsvStore. - -2) Create an instance of CImSmtpSettings and put it on the cleanup stack. - -3) Retrieve the existing settings by calling CImSmtpSettings::RestoreL(). - -4) Specify whether to add a vCard to outbound email by calling CImSmtpSettings::SetAddVCardToEmail(). - -5) Save the new settings by calling CImSmtpSettings::StoreL(). - -6) Pop and destroy the CImSmtpSettings instance. - -@see CMsvStore - -@publishedAll -@released -*/ - { -public: - IMPORT_C CImSmtpSettings(); - IMPORT_C virtual ~CImSmtpSettings(); - IMPORT_C void Reset(); - IMPORT_C const TPtrC EmailAlias() const; - IMPORT_C void SetEmailAliasL(const TDesC& aEmailAlias); - IMPORT_C const TPtrC EmailAddress() const; - IMPORT_C void SetEmailAddressL(const TDesC& aEmailAddress); - IMPORT_C const TPtrC ReplyToAddress() const; - IMPORT_C void SetReplyToAddressL(const TDesC& aReplyToAddress); - IMPORT_C const TPtrC ReceiptAddress() const; - IMPORT_C void SetReceiptAddressL(const TDesC& aReceiptAddress); - IMPORT_C TMsgOutboxBodyEncoding BodyEncoding() const; - IMPORT_C void SetBodyEncoding(TMsgOutboxBodyEncoding aBodyEncoding); - IMPORT_C const TUid DefaultMsgCharSet() const; - IMPORT_C void SetDefaultMsgCharSet(TUid aDefaultMsgCharSet); - IMPORT_C TBool AddVCardToEmail() const; - IMPORT_C void SetAddVCardToEmail(TBool aFlag); - IMPORT_C TBool AddSignatureToEmail() const; - IMPORT_C void SetAddSignatureToEmail(TBool aFlag); - IMPORT_C TBool RequestReceipts() const; - IMPORT_C void SetRequestReceipts(TBool aFlag); - IMPORT_C TImSMTPSendCopyToSelf SendCopyToSelf() const; - IMPORT_C void SetSendCopyToSelf(TImSMTPSendCopyToSelf aSendCopyToSelf); - IMPORT_C TImSMTPSendMessageOption SendMessageOption() const; - IMPORT_C void SetSendMessageOption(TImSMTPSendMessageOption aSendMessageOption); - IMPORT_C CImSmtpSettings& CopyL(const CImSmtpSettings& aCImSmtpSettings); - IMPORT_C TBool operator==(const CImSmtpSettings& aCImSmtpSettings) const; - IMPORT_C const TPtrC8 LoginName() const; - IMPORT_C void SetLoginNameL(const TDesC8&); - IMPORT_C const TPtrC8 Password() const; - IMPORT_C void SetPasswordL(const TDesC8&); - IMPORT_C TBool SMTPAuth() const; - IMPORT_C void SetSMTPAuth(TBool aFlag); - IMPORT_C TBool InboxLoginDetails() const; - IMPORT_C void SetInboxLoginDetails(TBool aFlag); - IMPORT_C TInt ToCcIncludeLimit() const; - IMPORT_C void SetToCcIncludeLimitL(TInt aLimit); - IMPORT_C void SetTlsSslDomainL(const TDesC8& aDomainName); - IMPORT_C TPtrC8 TlsSslDomain() const; - -private: - class TImSmtpSettingsExtension - { - public: - inline TImSmtpSettingsExtension(); - public: - HBufC* iReceiptAddress; - HBufC8* iLoginName; - HBufC8* iPassword; - HBufC8* iTlsSslDomain; - TInt iToCcIncludeLimit; - }; - - inline TImSmtpSettingsExtension* Extension() const; - inline void CheckExtensionExistsL(); - -private: - enum TImSMTPEmailSettings - { - KSmtpSettingsClearFlag = 0x00000000, - KSmtpBaseEmailSettingsLastUsedFlag = CImBaseEmailSettings::EBaseEmailSettingsLastUsedFlag, //0x00000002 - KSmtpAddVCardToEmailFlag = KSmtpBaseEmailSettingsLastUsedFlag << 1, //0x00000004 - KSmtpAddSignatureToEmailFlag = KSmtpAddVCardToEmailFlag << 1, //0x00000008 - KSmtpRequestReceipts = KSmtpAddSignatureToEmailFlag << 1, //0x00000010 - KSmtpSmtpAuthFlag = KSmtpRequestReceipts << 1, //0x00000020 - KSmtpInboxLoginDetails = KSmtpSmtpAuthFlag << 1, //0x00000040 - KSmtpEmailSettingsLastUsedFlag = KSmtpInboxLoginDetails //0x00000040 - }; - - HBufC* iEmailAlias; - HBufC* iEmailAddress; - HBufC* iReplyToAddress; - TImSmtpSettingsExtension* iExtension; // renamed iReceiptAddress - TMsgOutboxBodyEncoding iBodyEncoding; - TUid iDefaultMsgCharSet; - TImSMTPSendCopyToSelf iSendCopyToSelf; - TImSMTPSendMessageOption iSendMessageOption; - }; - -inline CImSmtpSettings::TImSmtpSettingsExtension* CImSmtpSettings::Extension() const - { - return iExtension; - } - -inline void CImSmtpSettings::CheckExtensionExistsL() - { - if (!iExtension) - iExtension=new (ELeave) CImSmtpSettings::TImSmtpSettingsExtension; - } - -inline CImSmtpSettings::TImSmtpSettingsExtension::TImSmtpSettingsExtension() : iReceiptAddress(NULL),iLoginName(NULL),iPassword(NULL),iTlsSslDomain(NULL),iToCcIncludeLimit(KSmtpToCcIncludeLimitDefault) - { - } - -#endif // #define __SMTPSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smut.h --- a/epoc32/include/smut.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,154 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMUT_H__ -#define __SMUT_H__ - -#include -#include -#include - -class CSmsMessage; -class CContactItemField; -class TResourceReader; -class CMsvSession; -class CMsvServerEntry; -class CMsvEntry; -class CSmsSettings; - -/** -The SMS MTM UID. - -Used to identify the MTMs used for handling SMS messages. - -@publishedAll -@released -*/ -const TUid KUidMsgTypeSMS = {0x1000102C}; - -/** -The default maximum length used when extracting a description for an SMS message. - -Used as default value of aMaxLength in TSmsUtilities::GetDescription. This -function is used to extract a string to used as a suitable description field in -the message index for a particular SMS message. - -The CSmsSettings provides accessors to get and set the preferred maximum -description length. - -@deprecated -This should not really be used outside of the SMS client MTM. The value provided -by the CSmsSettings class should be used. - -@see CSmsSettings::GetDescriptionLength -*/ -const TInt KSmsDescriptionLength = 32; - -/** -The default maximum length used when extracting the sender/recipiant details for -an SMS message. - -Used as default value of aMaxLength in TSmsUtilities::GetDetails. This function -is used to extract a string to used as the details field in the message index -for a particular SMS message. - -@deprecated -This should really be used at all. -*/ -const TInt KSmsDetailsLength = 32; - -_LIT(KSmsResourceFile, "\\resource\\messaging\\SMSS.RSC"); - -/** -SMS Messaging utility functions. - -@publishedAll -@released -*/ -class TSmsUtilities - { -public: - -/** -Special SMS Message Indication Type. - -A special SMS message indication is used to notify of waiting services, for -instance a voicemail message. - -The TSmsUtilitiesSpecialMessageType enum represents the flags for the known -indication types. -*/ - enum TSmsUtilitiesSpecialMessageType - { -/** -Voice message waiting. -*/ - EVoiceMessageWaiting = 0, -/** -Fax message waiting. -*/ - EFaxMessageWaiting, -/** -E-mail message waiting. -*/ - EEmailMessageWaiting, -/** -Other message-type waiting (see 3GPP TS 23.038 [9] for definition of "other"). -*/ - EOtherMessageWaiting, -/** -Mask used to obtain the mesasge indication type from the SMS data. -*/ - ESpecialMessageTypeMask = 0x7F - }; - - /** - @internalComponent - @removed - */ - IMPORT_C void Dummy_Export_1(); - /** - @internalComponent - @removed - */ - IMPORT_C void Dummy_Export_2(); - - IMPORT_C static void ServiceIdL(CMsvServerEntry& aEntry, TMsvId& aFirstId, TUid aMtm = KUidMsgTypeSMS, CMsvEntrySelection* aServiceIds = NULL); - IMPORT_C static void ServiceIdL(CMsvEntry& aEntry, TMsvId& aFirstId, TUid aMtm = KUidMsgTypeSMS, CMsvEntrySelection* aServiceIds = NULL); - IMPORT_C static void ServiceIdL(CMsvSession& aSession, TMsvId& aFirstId, TUid aMtm = KUidMsgTypeSMS, CMsvEntrySelection* aServiceIds = NULL); //more efficient version of the previous one - - IMPORT_C static void PopulateMsgEntry(TMsvEntry& aEntry, const CSmsMessage& aMessage, TMsvId aServiceId, TUid aMtm = KUidMsgTypeSMS); - IMPORT_C static void PopulateMsgEntry(TMsvEntry& aEntry, const CSmsMessage& aMessage, TMsvId aServiceId, const CSmsSettings& aSettings, TUid aMtm = KUidMsgTypeSMS); - - IMPORT_C static TInt GetDetails(RFs& aFs, const CSmsMessage& aMessage, TDes& aDetails, TInt aMaxLength = KSmsDetailsLength); - IMPORT_C static TInt GetDetails(RFs& aFs, const TDesC& aFromAddress, TDes& aDetails, TInt aMaxLength = KSmsDetailsLength); - IMPORT_C static TInt GetDescription(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength = KSmsDescriptionLength); - - IMPORT_C static RResourceFile OpenResourceFileL(RFs& aFs); - IMPORT_C static void ReadResourceStringL(RResourceFile aResourceFile, TInt aResourceId, TDes& aString); - -private: - static void CompareEntryL(const TMsvEntry& aEntry, TUid aMtm, TMsvId& aFirstId, CMsvEntrySelection* aServiceIds); - static void GetName(CContactItemField& aField, TUid aFieldType, TDes& aName); - static void DoGetDetailsL(RFs& aFs, const TDesC& aFromAddress, TDes& aDetails, TInt aMaxLength); - static void Replace(const TDesC& aOld, const TDesC& aNew, TDes& aString); - - static TBool DoGetDescriptionL(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); - static void ExtractDescriptionFromMessage(const CSmsMessage& aMessage, TDes& aDescription, TInt aMaxLength); - - static TBool ValidGsmNumber(const TDesC& aTelephone); - }; - -#endif // __SMUT_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smuthdr.h --- a/epoc32/include/smuthdr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMUTHDR_H__ -#define __SMUTHDR_H__ - -#include -#include -#include -#include -#include -#include - -class RMsvReadStream; -class RMsvWriteStream; -class CMsvStore; -class CSmsEmailFields; - -/** -The SMS MTM encapsulation of an SMS message. - -This class allows a messaging client to access the lower-level message encapsulation -used by the SMS stack. - -It also provides functionality to restore and store an SMS message from/to the -message store. - -An SMS message is encapsulated in a Protocol Data Unit (PDU). In GSM there are -six types of SMS message PDU. In the descriptions below, SC means Service Center -and MS means Mobile Station (the phone). - -1. SMS-DELIVER - sent from SC to MS - -2. SMS-DELIVER-REPORT - sent from MS to SC - -3. SMS-SUBMIT - sent from MS to SC - -4. SMS-SUBMIT-REPORT - sent from SC to MS - -5. SMS-STATUS-REPORT - sent from SC to MS - -6. SMS-COMMAND - sent from MS to SC - -@publishedAll -@released -*/ -class CSmsHeader : public CBase - { -public: - - IMPORT_C static CSmsHeader* NewL(CSmsPDU::TSmsPDUType aType,CEditableText& aText); - IMPORT_C static CSmsHeader* NewL(CSmsPDU::TSmsPDUType aType,CEditableText& aText,RFs& aFs); - IMPORT_C static CSmsHeader* NewL(CSmsMessage* aMessage); - IMPORT_C ~CSmsHeader(); - - inline CSmsPDU::TSmsPDUType Type() const; - - inline CSmsSubmit& Submit(); - inline const CSmsSubmit& Submit() const; - inline CSmsDeliver& Deliver(); - inline const CSmsDeliver& Deliver() const; - inline CSmsCommand& Command(); - inline const CSmsCommand& Command() const; - inline CSmsStatusReport& StatusReport(); - inline const CSmsStatusReport& StatusReport() const; - - inline CSmsMessage& Message(); - inline const CSmsMessage& Message() const; - - inline TBool ReplyPathProvided() const; - inline void SetReplyPathProvided(TBool aReplyPathProvided); - - inline TBioMsgIdType BioMsgIdType() const; - inline void SetBioMsgIdType(TBioMsgIdType aBioMsgIdType = EBioMsgIdNbs); - - inline TPtrC ServiceCenterAddress() const; - inline void SetServiceCenterAddressL(const TDesC& aAddress); - - IMPORT_C void SetSmsSettingsL(const CSmsMessageSettings& aSmsSettings); - IMPORT_C void GetSmsSettingsL(CSmsMessageSettings& aSmsSettings) const; - - inline const CArrayPtrFlat& Recipients() const; - inline CArrayPtrFlat& Recipients(); - - inline void SetFromAddressL(const TDesC& aAddress); - inline TPtrC FromAddress() const; - - TPtrC ReplyAddressL() const; - - IMPORT_C void SetEmailFieldsL(const CSmsEmailFields& aEmailFields); - void SetReplyEmailFieldsL(const CSmsEmailFields& aEmailFields, const TDesC& aReplySubjectFormat); - void SetForwardEmailFieldsL(const CSmsEmailFields& aEmailFields, const TDesC& aForwardSubjectFormat); - IMPORT_C const CSmsEmailFields& EmailFields() const; - - IMPORT_C void InternalizeL( RMsvReadStream& aStream); - IMPORT_C void ExternalizeL( RMsvWriteStream& aStream) const; - - IMPORT_C void RestoreL(CMsvStore& aStore); - IMPORT_C void StoreL(CMsvStore& aStore) const; - - IMPORT_C TBool ContainsSmsHeaderL(const CMsvStore& aStore); - -private: - CSmsHeader(CSmsMessage* aSmsMessage = NULL); - void ConstructL(CSmsPDU::TSmsPDUType aType, CEditableText& aText); - void ConstructL(CSmsPDU::TSmsPDUType aType, CEditableText& aText, RFs& aFs); - void ConstructL(); - - enum TSmsHeaderFlags - { - ESmsHeaderNoFlags = 0x00, - ESmsHeaderReplyPathProvided = 0x01, - ESmsHeaderCanConcatenate = 0x02 - }; - - TBool CanConcatenate() const; - void SetCanConcatenate(TBool aCanConcatenate); - - void SetEmailReplyForwardSubjectL(CSmsEmailFields* aEmailFields, const TDesC& aSubject, const TDesC& aSubjectFormat); - -private: - CArrayPtrFlat iRecipients; - CSmsMessage* iMessage; - TUint32 iFlags; - RFs iFs; - - // iBioMsgIdType is only used during sending and will be ignored if the - // TMsvEntry.iBioType == 0. The default is EBioMsgIdNbs. - TBioMsgIdType iBioMsgIdType; - CSmsEmailFields* iEmailFields; - TBool iCloseFs; - }; - -/** -A specialisation of the message server index class for SMS message entries. - -It provides accessers for SMS message specific data, for instance the class type -of the SMS message. - -@publishedPartner -@released -*/ -class TMsvSmsEntry : public TMsvEntry - { -public: - -/** -Defines a set flags used to access message entry data specific to an SMS message. - -@internalTechnology -@released - -*/ - enum TMsvSmsEntryFlags - { -/** -Clears the entire set of SMS flags. -*/ - EMsvSmsEntryClearFlag = 0x00000000, -/** -Mask for the protocol identifier data. -*/ - EMsvSmsEntryProtocolIdentifier = 0x000000FF, -/** -Mask for the User Prompt Indicator flag. -*/ - EMsvSmsEntryUserPromptIndicator = 0x00000100, -/** -Mask for the SMS class data. -*/ - EMsvSmsEntryClass = 0x00000E00, -/** -Mask for the flag indicating whether the class data has been defined. -*/ - EMsvSmsEntryClassDefined = 0x00001000, -/** -Mask for the flag indicating whether the message ID is valid. -*/ - EMsvSmsMessageValid = 0x00002000, -/** -Mask for the delivery acknowledgement information. -*/ - EMsvSmsEntryDeliveryAckSummary = 0x0001C000, -/** -Parameter defining the number of bits to be shifted in order for the SMS class -data to be at the LSB of the data block. -*/ - EMsvSmsEntryClassShift = 9, -/** -Parameter defining the number of bits to be shifted in order for the delivery -acknowlwdgement information to be at the LSB of the data block. -*/ - EMsvSmsEntryDeliveryAckSummaryShift = 14 - }; - -/** -Defines the summary acknowledgement information. - -This information indicates whether the SMS message is not supplying a summary -for an acknowledgement, is still expecting acknowledgments or it has received -all expected acknowledgements. - -If all acknowledgements have been received the summary indicates whether all -the recipients have successfully acknowledged the message, all failed or there -was a mixture of successful and failed acknowledgements from the recipients. -*/ - enum TMsvSmsEntryAckSummary - { -/** -No summary information is being formed. -*/ - ENoAckSummary = 0, -/** -The message is waiting for acknowledgements to be received for all recipients -of this message. Some recipients may have received their acknowledgements but -there are still some recipients that have not. -*/ - EPendingAcks, -/** -The summary indicates that the message was successfully acknowledged by all recipients. -*/ - EAllSuccessful, -/** -The summary indicates that the message failed to be acknowledged by all recipients. -*/ - EAllFailed, -/** -The summary indicates a mixture of successful and failed acknowledgements from -the recipients of the message. All recipients of this message have received -their acknowledgements. -*/ - EMixed - }; - -public: - inline TMsvSmsEntry(); - inline TMsvSmsEntry(const TMsvEntry& aEntry); - - inline void SetUserPromptIndicator(TBool aUPI); - inline TBool UserPromptIndicator() const; - - inline TUint8 ProtocolIdentifier() const; - inline void SetProtocolIdentifier(TSmsProtocolIdentifier aPID); - inline void SetProtocolIdentifier(TUint8 aPID); - - inline TBool Class(TSmsDataCodingScheme::TSmsClass& aClass) const; - inline void SetClass(TBool aClassDefined,TSmsDataCodingScheme::TSmsClass aClass = TSmsDataCodingScheme::ESmsClass0); - - IMPORT_C TMsvSmsEntryAckSummary AckSummary(TSmsAckType aAckType) const; - IMPORT_C void SetAckSummary(TSmsAckType aAckType, TMsvSmsEntryAckSummary aAckSummary); - - IMPORT_C TBool MessageId(TInt32& aMessageId) const; - IMPORT_C void SetMessageId(TInt32 aMessageId, TBool aIsValid); - }; - -#include - -#endif // __SMUTHDR_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smutset.h --- a/epoc32/include/smutset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,752 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMUTSET_H__ -#define __SMUTSET_H__ - - - - -#include -#include -#include -#include - -class CSmsServiceCenter; -class CSmsEmailFields; - -// Both the recipient's number and SC number (TP-Destination-Address and RP-Destination-Address) -// can be 12 octets which means that there can be 21 characters (including + sign) in the number string. - -/** -The maximum length of recipient's number. - -The number returned by CSmsNumber::Address() and CSmsServiceCenter::Address() is limited this maximum length. - -@see CSmsNumber::Address -@see CSmsServiceCenter::Address - -@publishedAll -@released -*/ -const TInt KSmcmSmsNumberMaxNumberLength = 21; - -/** -The maximum length of recipient's name. - -The number returned by CSmsNumber::Name() and CSmsServiceCenter::Name() is limited this maximum length. - -@see CSmsNumber::Name -@see CSmsServiceCenter::Name - -@publishedAll -@released -*/ -const TInt KSmcmSmsNumberMaxNameLength = 256; - -/** -Defines the possible forms in which an SMS message should be delivered to the -recipient by the service centre. - -The specified format may or may not actually be supported by the service centre. -Note that the format of the recipient address(es) may need to be different -to a normal telephone number if the conversion is set to any other value than -ESmsConvPIDNone, ESmsConvFax, ESmsConvPaging or ESmsConvErmes. - -@publishedAll -@released -*/ -enum TSmsPIDConversion - { -/** -No conversion (i.e. use SMS itself). -*/ - ESmsConvPIDNone = TSmsProtocolIdentifier::ESmsNoTelematicDevice, -/** -Convert to fax. -*/ - ESmsConvFax = TSmsProtocolIdentifier::ESmsGroup3TeleFax, -/** -Convert to X.400. -*/ - ESmsConvX400 = TSmsProtocolIdentifier::ESmsX400MessageHandlingSystem, -/** -Convert to pager message. -*/ - ESmsConvPaging = TSmsProtocolIdentifier::ESmsNationalPagingSystem, -/** -Convert to Internet email. -*/ - ESmsConvMail = TSmsProtocolIdentifier::ESmsInternetElectronicMail, -/** -Convert to ERMES paging. -*/ - ESmsConvErmes = TSmsProtocolIdentifier::ESmsERMES, -/** -Convert to sppech. -*/ - ESmsConvSpeech = TSmsProtocolIdentifier::ESmsVoiceTelephone - }; - -/** -Defines the set of possible validity periods for mobile originated messages. - -Mobile originated messages have a PDU type of SMS-SUBMIT. - -@publishedAll -@released -*/ -enum TSmcmValidityPeriod - { -/** -Validity period of an hour. -*/ - ESmsVPHour = TSmsValidityPeriod::EHalfHourUnitInMinutes*2, -/** -Validity period of six hours. -*/ - ESmsVPSixHours = TSmsValidityPeriod::EHalfHourUnitInMinutes*12, -/** -Validity period of 24 hours. -*/ - ESmsVP24Hours = TSmsValidityPeriod::EOneDayUnitInMinutes, -/** -Validity period of a week. -*/ - ESmsVPWeek = TSmsValidityPeriod::EOneWeekUnitInMinutes, -/** -The maximum validity period - currently set as 63 weeks. -*/ - ESmsVPMaximum = TSmsValidityPeriod::EOneWeekUnitInMinutes*63, -/** -An enum that specifies that a validity period is not supported. -*/ - ESmsVPNotSupported = KErrNotSupported, -/** -The default validy period - currently set to a week. -*/ - ESmsVPDefault = ESmsVPWeek - }; - -/** -Defines options for the preferred default sending schedule type of a new message -created using the SMS client MTM. - -The option has no direct effect on the SMS MTM. When it is sending an SMS -message it automatically appends other SMS messages in the outbox whose send -states are marked as KMsvSendStatewaiting or KMsvSendSateUnknown. - -Therefore it is the responsibility of the messaging client to set the correct -send state of new SMS messages correctly given the preferred sending schedule. - -@publishedAll -@released -*/ -enum TSmsDelivery - { -/** -Send message immediately. The message send state should be set to KMsvSendStateWaiting. -*/ - ESmsDeliveryImmediately, -/** -Send message when client requests. The message send state should be set to KMsvSendStateUponRequest. -*/ - ESmsDeliveryUponRequest, -/** -Send message at scheduled time. The message send state should be set to KMsvSendStateScheduled. -*/ - ESmsDeliveryScheduled - }; - -/** -Defines the flags and masks for some of the message settings. - -The settings classes CSmsMessageSettings and CSmsSettings use these flags to -store the specified information. - -@internalComponent -@released -*/ -enum TSmsSettingsFlags - { -/** -Mask that resets the flags. -*/ - ESmsSettingsNoFlags =0, -/** -Flag that indicates if messages can be concatenated. - -If true, the UI should pass a long message in one piece to the MTM. If false, -it should split the message manually into 140 byte parts. The value of this -flag does not affect the behaviour of the SMS MTM. -*/ - ESmsSettingsCanConcatenate =0x00000001, -/** -Flag that indicates whether the original message should be included in relpy -messages. - -If true, the received message should be quoted at the beginning of the reply -message. If false, reply messages should be initially empty. -*/ - ESmsSettingsReplyQuoted =0x00000002, -/** -Flag that indicates whether duplicate messages should be rejected. -*/ - ESmsSettingsRejectDuplicate =0x00000004, -/** -Flag that indicates if a status report (TP-SRR in GSM spec 03.40) should be -requested from the Service Centre. -*/ - ESmsSettingsDeliveryReport =0x00000008, -/** -Flag that indicates if the reply path (Service Centre address) should be included -in the delivered message (TP-RP in GSM spec 03.40). -*/ - ESmsSettingsReplyPathRequested =0x00000010, -/** -Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment -should be requested from the Service Centre. -*/ - ESmsSettingsLastSegmentDeliveryReport =0x00000020 , - -/** -Flag that indicates if a status report (TP-SRR in GSM spec 03.40) for the last segment -is not requested from the Service Centre. -*/ - ENoSmsSettingsLastSegmentDeliveryReport =0x00000040, -/** -Flag that indicates that the service center time stamp should be used for the date -field in any TMsvEntry that corresponds to a SMS message. -*/ - ESmsSettingsUseServiceCenterTimeStamp =0x00000080, -/** -Mask for the set of flags defined. -*/ - ESmsSettingsMask =0x000000FF, - }; - - -/** -Defines the types of acknowledgements that can be received from recipients. -*/ -enum TSmsAckType - { -/** -Acknowlwdgement of delivery to a recipient. -*/ - ESmsAckTypeDelivery =0 - }; - -/** -Progress information for SMS MTM operations. - -This information is returned by CMsvOperation::ProgressL() in a TSmsProgressBuf -package. - -@see CMsvOperation::ProgressL - -@publishedAll -@released -*/ -class TSmsProgress - { -public: -/** -Defines type of operation for which progress information is being given. - -These types correspond to the commands defined in TSmsMtmCommand. - -@see TSmsMtmCommand -*/ - enum TSmsProgressType - { -/** -The default operation type - no operation. -*/ - ESmsProgressTypeDefault, -/** -Reading SIM parameters. - -Pre v7.0, this was named ESmsProgressTypeReadingServiceCenterAddress. -*/ - ESmsProgressTypeReadSimParams, -/** -Writing SIM parameters. - -Pre v7.0 this was named ESmsProgressTypeWritingServiceCenterAddress. -*/ - ESmsProgressTypeWriteSimParams, -/** -Sending messages. -*/ - ESmsProgressTypeSending, -/** -Scheduling sending messages. -*/ - ESmsProgressTypeScheduling, -/** -Enumerating phone stores. - -Pre v7.0, this was named ESmsProgressTypeEnumeratingSim. -*/ - ESmsProgressTypeEnumeratingPhoneStores, -/** -Copying messages from phone stores. - -Pre v7.0, this was named ESmsProgressTypeCopyFromSim. -*/ - ESmsProgressTypeCopyFromPhoneStore, -/** -Moving messages from phone stores. - -Pre v7.0, this was named ESmsProgressTypeMoveFromSim. -*/ - ESmsProgressTypeMoveFromPhoneStore, -/** -Deleting messages from phone stores. - -Pre v7.0, this was named ESmsProgressTypeDeleteFromSim. -*/ - ESmsProgressTypeDeleteFromPhoneStore, -/** -Removing all messages from the task scheduler list. -*/ - ESmsProgressTypeDeleteSchedule, -/** -Checking the current scheduled status of the messages. -*/ - ESmsProgressTypeCheckSchedule, -/** -Recursively deleting messages. -*/ - ESmsProgressTypeDeleteAll, -/** -Copying messages to a phone store. - -Pre v7.0, this was named ESmsProgressTypeCopyToSim. -*/ - ESmsProgressTypeCopyToPhoneStore, -/** -Moving messages to a phone store. - -Pre v7.0, this was named ESmsProgressTypeMoveToSim. -*/ - ESmsProgressTypeMoveToPhoneStore, -/** -Moving message entries. - -This is the second part of ESmsProgressTypeMoveFromPhoneStore. The first part -deletes the messages from the phone storageSIM. This second part moves the -messages from the folder that represents the phone storage to the specified -destination. -*/ - ESmsProgressTypeMovingEntries - }; - - inline TSmsProgress(TSmsProgressType aType = ESmsProgressTypeDefault); - -public: - -/** -The error code. -*/ - TInt iError; -/** -The type of operation. - -@see TSmsProgress::TSmsProgressType -*/ - TSmsProgressType iType; -/** -The state of the operation. -*/ - TInt iState; -/** -The number of recipients processed so far for the current message. -*/ - TInt iRcpDone; -/** -The total number of recipients in the current message. -*/ - TInt iRcpCount; -/** -The nmber of messages processed so far for the current operation. -*/ - TInt iMsgDone; -/** -The total number of messages for the current operation. -*/ - TInt iMsgCount; -/** -The Service Centre address. - -This is set by the command ESmsMtmCommandReadServiceCenter. - -@removed -This is no longer used since v7.0. -*/ - TBuf<14> iServiceCenterAddress; -/** -The invisible folder that contains the messages read from the SIM by the command -ESmsMtmCommandEnumeratePhoneStores. -*/ - TMsvId iEnumerateFolder; - }; - -/** -Package buffer for TSmsProgress. - -@see TSmsProgress - -@publishedAll -@released -*/ -typedef TPckgBuf TSmsProgressBuf; - - -/** -The SMS settings that are relevant on a per message basis. - -Each SMS message has its own settings. Initially they have a default set of -values derived from the SMS service settings. They can be changed on an -individual message basis. For instance, a messaging application may allow a -user to specify/not specify status reports individually for each message. - -These settings are only relevant to mobile originated messages - those of -SMS-SUBMIT type. - -@publishedAll -@released -*/ -class CSmsMessageSettings : public CBase - { -public: - IMPORT_C virtual void InternalizeL(RReadStream& aReadStream); - IMPORT_C virtual void ExternalizeL(RWriteStream& aWriteStream) const; - - inline const TTimeIntervalMinutes& ValidityPeriod() const; - inline void SetValidityPeriod(TTimeIntervalMinutes); - - inline void SetValidityPeriodFormat(TSmsFirstOctet::TSmsValidityPeriodFormat aValidityPeriodFormat); - inline const TSmsFirstOctet::TSmsValidityPeriodFormat ValidityPeriodFormat() const; - - inline TBool RejectDuplicate() const; - inline void SetRejectDuplicate(TBool); - - inline TBool DeliveryReport() const; - inline void SetDeliveryReport(TBool); - - inline TBool ReplyPath() const; - inline void SetReplyPath(TBool); - - inline TSmsPIDConversion MessageConversion() const; - inline void SetMessageConversion(TSmsPIDConversion); - - inline TBool CanConcatenate() const; - inline void SetCanConcatenate(TBool); - - inline enum TSmsDataCodingScheme::TSmsAlphabet CharacterSet() const; - inline void SetCharacterSet(TSmsDataCodingScheme::TSmsAlphabet); - - IMPORT_C virtual void CopyL(const CSmsMessageSettings& aSettings); - - TUint32 MessageFlags() const; - void SetMessageFlags(TUint32 aMsgFlags); - inline TBool LastSegmentDeliveryReport() const; - inline void SetLastSegmentDeliveryReport(TBool); - - inline void SetUseServiceCenterTimeStampForDate(TBool aUseServiceCenterTimestamp); - inline TBool UseServiceCenterTimeStampForDate() const; - -protected: - - CSmsMessageSettings(); - -private: - - TUint32 iMsgFlags; - TSmsPIDConversion iMessageConversion; - TSmsDataCodingScheme::TSmsAlphabet iAlphabet; - TTimeIntervalMinutes iValidityPeriod; - TSmsFirstOctet::TSmsValidityPeriodFormat iValidityPeriodFormat; - }; - -/** -The SMS Service settings. - -An SMS service entry stores an object of this type in its message store. These -settings define the default settings for mobile originated messages (SMS-SUBMIT -type messages). They also provide some global settings that are applied to all -messages, both outward going and received messages. - -The SMS service also uses this class to store the set of avilable Servive Centre -numbers. The default Service Centre is defined from this set. - -@publishedAll -@released -*/ -class CSmsSettings : public CSmsMessageSettings - { -public: - -/** -Defines the ways in which status reports that are received by the watcher may -be handled. - -This can be applied to both SMS-STATUS-REPORT type messages and Special Messages -(e.g. Voice Mail Indication messages). -*/ - enum TSmsReportHandling - { -/** -The reports are put in the inbox and made invisible. -*/ - EMoveReportToInboxInvisible, -/** -The reports are put in the inbox and made visible. -*/ - EMoveReportToInboxVisible, -/** -The reports are deleted. -*/ - EDiscardReport, -/** -Not supported. -*/ - EDoNotWatchForReport, -/** -Reports are put in the inbox and made invisible. The status report -is matched against the sent mesasge and its summary info updated. -*/ - EMoveReportToInboxInvisibleAndMatch, -/** -Reports are put in the inbox and made visible. The status report -is matched against the sent mesasge and its summary info updated. -*/ - EMoveReportToInboxVisibleAndMatch, -/** -Reports are deleted. The status report is matched against the sent -mesasge and its summary info updated. -*/ - EDiscardReportAndMatch - }; - -/** -Sets whether the service settings should be used to update the communications -database. - -If the update is specified, it is done when the Service settings are stored into -the message store. -*/ - enum TSmsSettingsCommDbAction - { -/** -The comms database should not be updated. -*/ - ENone, -/** -Use the Service settings to update the comms datebase. -*/ - EStoreToCommDb - }; - -/** Defines the SMS bearer. -Modes: GSM */ -enum TMobileSmsBearer - { - /** SMS messages will only be sent over a packet-switched (GPRS) network. */ - ESmsBearerPacketOnly, - /** SMS messages will only be sent over a circuit-switched (GSM) network. */ - ESmsBearerCircuitOnly, - /** SMS messages will be sent over the packet-switched (GPRS) network if possible, - otherwise over circuit-switched (GSM) network. */ - ESmsBearerPacketPreferred, - /** SMS messages will be sent over the circuit-switched (GSM) network if possible, - otherwise over packet-switched (GPRS) network. */ - ESmsBearerCircuitPreferred - }; - -public: - - IMPORT_C static CSmsSettings* NewL(); - IMPORT_C static CSmsSettings* NewLC(); - IMPORT_C virtual ~CSmsSettings(); - - IMPORT_C TInt ServiceCenterCount() const; - IMPORT_C CSmsServiceCenter& GetServiceCenter(TInt aIndex) const; - IMPORT_C void AddServiceCenterL(const TDesC& aName,const TDesC& aNumber); - IMPORT_C void RemoveServiceCenter(TInt aIndex); - IMPORT_C TInt DefaultServiceCenter() const; - IMPORT_C void SetDefaultServiceCenter(TInt aDefaultSC); - inline TSmsDelivery Delivery() const; - inline void SetDelivery(TSmsDelivery); - - inline TBool ReplyQuoted() const; - inline void SetReplyQuoted(TBool); - - IMPORT_C void CopyL(const CSmsSettings& aSmsSettings); - - inline TSmsReportHandling StatusReportHandling() const; - inline void SetStatusReportHandling(TSmsReportHandling aStatusReportHandling); - inline TSmsReportHandling SpecialMessageHandling() const; - inline void SetSpecialMessageHandling(TSmsReportHandling aSpecialMessageHandling); - - inline void SetCommDbAction(TSmsSettingsCommDbAction aCommDbAction); - inline TSmsSettingsCommDbAction CommDbAction() const; - - inline void SetSmsBearerAction(TSmsSettingsCommDbAction aSmsBearerAction); - inline TSmsSettingsCommDbAction SmsBearerAction() const; - - inline void SetSmsBearer(TMobileSmsBearer aSmsBearer); - inline TMobileSmsBearer SmsBearer() const; - - inline void SetClass2Folder(TMsvId aId); - inline TMsvId Class2Folder() const; - - inline void SetDescriptionLength(TInt aLength); - inline TInt DescriptionLength() const; - - TUint32 SettingsFlags() const; - void SetSettingsFlags(TUint32 aSetFlags); - - void RemoveSCAddresses(); - void StoreToCommDbL() const; - -private: - - CSmsSettings(); - void ConstructL(); - -private: - - TUint32 iSetFlags; - CArrayPtrFlat *iServiceCenters; - TSmsDelivery iDelivery; - TInt iDefaultSC; - TSmsReportHandling iStatusReportHandling; - TSmsReportHandling iSpecialMessageHandling; - TSmsSettingsCommDbAction iCommDbAction; - TSmsSettingsCommDbAction iSmsBearerAction; - TMobileSmsBearer iSmsBearer; - TMsvId iClass2Folder; - TInt iDescriptionLength; - }; - -/** -Recipient information for an SMS message. - -A SMS-SUBMIT message may have several recipients - -@publishedAll -@released -*/ -class CSmsNumber : public CMsvRecipient - { -public: - -/** -Defines the status of an acknowledgement for a recipient. -*/ - enum TSmsAckStatus - { -/** -An acknowledgement for this recipient has not been requested. -*/ - ENoAckRequested = 0, -/** -The delivery status for this recipient has been requested, but the status report -has not yet been received. -*/ - EPendingAck, -/** -A successful acknowledgement for this recipient has been received. -*/ - EAckSuccessful, -/** -A failed acknowledgement for this recipient has been received. -*/ - EAckError - }; - -public: - - IMPORT_C static CSmsNumber* NewL(); - IMPORT_C static CSmsNumber* NewL(const CSmsNumber& aSmsNumber); - IMPORT_C virtual ~CSmsNumber(); - - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - - IMPORT_C TPtrC Address() const; - IMPORT_C void SetAddressL(const TDesC& aAddress); - void SetEmailAddressL(const TDesC& aAddress, CSmsEmailFields* aEmailFields, const TDesC& aAlias); - - IMPORT_C TPtrC Name() const; - IMPORT_C void SetNameL(const TDesC& aName); - - inline TLogId LogId() const; - inline void SetLogId(TLogId aLogId); - - IMPORT_C CSmsNumber& CopyL(const CSmsNumber& aSmsNumber); - - IMPORT_C TSmsAckStatus AckStatus(TSmsAckType aAckType) const; - IMPORT_C void SetAckStatus(TSmsAckType aAckType, TSmsAckStatus aAckStatus); - -private: - - CSmsNumber(); - TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const; - -private: - - HBufC* iNumber; - HBufC* iName; - TLogId iLogId; - TSmsAckStatus iDeliveryStatus; - }; - -/** -Used to store Service Centre numbers and their associated name. - -@publishedAll -@released -*/ -class CSmsServiceCenter : public CBase - { -public: - IMPORT_C static CSmsServiceCenter* NewL(); - IMPORT_C static CSmsServiceCenter* NewL(const CSmsServiceCenter& aSmsSC); - IMPORT_C ~CSmsServiceCenter(); - - IMPORT_C TPtrC Address() const; - IMPORT_C void SetAddressL(const TDesC& aAddress); - - IMPORT_C TPtrC Name() const; - IMPORT_C void SetNameL(const TDesC& aName); - - IMPORT_C CSmsServiceCenter& CopyL(const CSmsServiceCenter& aSmsSc); - -private: - CSmsServiceCenter(); - TPtrC LimitStringSize(const TPtrC& aString, TInt aMaxLength) const; - -private: - HBufC* iNumber; - HBufC* iName; - }; - -#include - -#endif // __SMUTSET_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/smutsimparam.h --- a/epoc32/include/smutsimparam.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,147 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SMUTSIMPARAM_H__ -#define __SMUTSIMPARAM_H__ - -#include -#include - -/** -The UID for the stream into which the SIM parameters are stored. - -@internalComponent -@deprecated -Should be moved to the cpp file for this class. -*/ -const TUid KUidMsvSimSmsParams = {0x100081BC}; - -class CMobilePhoneSmspList; -class TSmsProgress; - -/** -A packaged TInt value. - -This is used by CSmsSimParamOperation. - -@see CSmsSimParamOperation::ProgressL() - -@internalComponent -@released -*/ -typedef TPckgBuf TIntBuf; - -/** -Encapsulates an operation to read/write an array of SMS parameters from a SIM. - -An operation of this type if returned by the SMS client MTM for the read and -write SIM paramter operations. - -These operations are generated from calling the SMS client MTM APIs -CSmsClientMtm::ReadSimParamsL and CSmsClientMtm::WriteSimParamsL. The -CSmsClientMtm::InvokeAsyncFunctionL API should not be used for these operations. - -@see CSmsClientMtm::ReadSimParamsL -@see CSmsClientMtm::WriteSimParamsL - -@publishedAll -@released -*/ -class CSmsSimParamOperation : public CMsvOperation - { -public: - - static CSmsSimParamOperation* ReadSimParamsL(TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); - static CSmsSimParamOperation* WriteSimParamsL(const CMobilePhoneSmspList& aList, TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); - virtual ~CSmsSimParamOperation(); - - inline const CMobilePhoneSmspList& SmspList() const; - - IMPORT_C CMobilePhoneSmspList* ServiceCentersLC() const; - IMPORT_C const TDesC8& ProgressL(); - - IMPORT_C static void RestoreSimParamsL(CMsvStore& aStore, CMobilePhoneSmspList& aList); - IMPORT_C static void StoreSimParamsL(CMsvStore& aStore, const CMobilePhoneSmspList& aList); - -private: // methods from CActive - - virtual void RunL(); - virtual void DoCancel(); - virtual TInt RunError(TInt aError); - -private: - - CSmsSimParamOperation(TUid aMtm, TMsvId aService, CMsvSession& aMsvSession, TRequestStatus& aObserverRequestStatus); - - void DoReadSimParamsL(); - void DoRunReadSimParamsL(/*TSmsProgress aProgress*/); - void DoWriteSimParamsL(const CMobilePhoneSmspList& aList); - - void TransferCommandL(TInt aCommandId); - void Complete(); - -private: - -/** -This defines the state machine. -*/ - enum TReadSimParamsState - { -/** -Specifies waiting state -*/ - EStateWaiting, -/** -Specifies reading state -*/ - EStateReadingSimParams, -/** -Specifies writing state -*/ - EStateWritingSimParams - } iState; - -/** -A list containing the SMS parameters -*/ - CMobilePhoneSmspList* iSimParams; - TInt iError; - TIntBuf iProgressBuf; - CMsvOperation* iOperation; - }; - -/** -Gets the list of SMS parameters on the SIM, after a successfully completed -read operation. - -If the operation has not successfully completed, this function returns an -empty list. - -This function should ot be used with a write SIM parameters operation. - -@return -The list of SMS parameters read from the SIM. - -@panic SMCM 3 -This operation was not reading the SIM parameters. The operation was not returned -from CSmsClientMtm::ReadSimParamsL (debug only). -*/ -inline const CMobilePhoneSmspList& CSmsSimParamOperation::SmspList() const - { - __ASSERT_DEBUG(iState == EStateReadingSimParams, Panic(ESmscPanicUnexpectedCommand)); - return *iSimParams; - } - -#endif // __SMUTSIMPARAM_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/spriteanimation.h --- a/epoc32/include/spriteanimation.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __SPRITEANIMATION_H__ -#define __SPRITEANIMATION_H__ - -#include - -#include -#include - -#include -#include - -class CAnimationDataProvider; -class CCoeControl; -class CSpriteAnimationExt; - -/** -Implementation of CAnimation for sprite based animations. - -A sprite animation displays the image using a sprite, which is a server side -graphic object. This is likely to be more efficient than a basic animation, -and requires slightly less work in the client application. However, it also -provides less control over the actual rendering of the image. - -A sprite animation must be associated with an RWindow. However, no redraw -events will be generated for it by the animation, and the client application -does not need to take any action once the animation has started. Holding the -animation when the sprite is not visible is handled automatically on the server -side. - -@see CAnimationDataProvider -@publishedAll -@released -*/ -class CSpriteAnimation : public CAnimation, public MAnimationDataProviderObserver - { -public: - IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWsSession, RWindow& aWindow, MAnimationObserver* aObserver = 0); - IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, RWsSession& aWsSession, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver = 0); - IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, MAnimationObserver* aObserver = NULL, const CCoeControl* aHost = NULL); - IMPORT_C static CSpriteAnimation* NewL(CAnimationDataProvider* aDataProvider, const TPoint& aPoint, const TDesC8& aDataType, MAnimationObserver* aObserver = NULL, const CCoeControl* aHost = NULL); - IMPORT_C ~CSpriteAnimation(); - IMPORT_C TSize Size() const; - - /** Provides an CSpriteAnimation DataProvider interface to the client application. - @return iDataProvider A CAnimationDataProvider */ - inline CAnimationDataProvider* DataProvider() { return iDataProvider; } - // From CAnimationBase: - virtual void Start(const TAnimationConfig& aConfig); - virtual void Stop(); - virtual void Pause(); - virtual void Resume(); - virtual void Hold(); - virtual void Unhold(); - virtual void SetPosition(const TPoint& aPoint); - virtual void Freeze(); - virtual void Unfreeze(); -public: - IMPORT_C virtual void SetHostL(const CCoeControl* aHost); - -protected: - CSpriteAnimation(); - CSpriteAnimation(CAnimationDataProvider* aDataProvider, RWsSession& aWsSession); - CSpriteAnimation(CAnimationDataProvider* aDataProvider, MAnimationObserver* aObserver, const CCoeControl* aHost); - void ConstructL(const TPoint& aPoint, RWindow& aWindow, const TDesC8& aDataType, MAnimationObserver* aObserver); - virtual void CSpriteAnimation_Reserved2(); - void ConstructL(const TPoint& aPoint, const TDesC8& aDataType); - void ConstructL(); -private: - CSpriteAnimation(const CSpriteAnimation&); // no implementation - CSpriteAnimation& operator=(const CSpriteAnimation&); // no implementation - void InitializeL(); - void Reset(); - // from MAnimationDataProviderObserver - virtual void DataProviderEventL(TInt aEvent, TAny* aData, TInt aDataSize); - -private: - enum TFlags - { - EAnimationInitialized = 0x1 // Is the animation initialized? - }; -private: - CSpriteAnimationExt* iSpriteAnimationExt; - MAnimationObserver* iObserver; -//note the following data member is accessed via an inline function! - CAnimationDataProvider* iDataProvider; - RWsSession* iWsSession; - RWsSprite* iWsSprite; - RAnimDll iAnimDll; - RSpriteAnimationClient* iClient; - const CCoeControl* iHost; - TInt iFlags; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/aligned_storage.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/aligned_storage.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,13 @@ + +// Copyright (C) John Maddock 2005. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED +# define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED +# include +#endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/archive/detail/abi_prefix.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/archive/detail/abi_prefix.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,20 @@ +// abi_prefix header -------------------------------------------------------// + +// © Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# define BOOST_CONFIG_ABI_PREFIX_HPP +#else +# error double inclusion of header boost/config/abi_prefix.hpp is an error +#endif + +#include + +// this must occur after all other includes and before any code appears: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_PREFIX +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/archive/detail/abi_suffix.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/archive/detail/abi_suffix.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,23 @@ +// abi_sufffix header -------------------------------------------------------// + +// © Copyright John Maddock 2003 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). + +// This header should be #included AFTER code that was preceded by a #include +// . + +#ifndef BOOST_CONFIG_ABI_PREFIX_HPP +# error Header boost/config/abi_prefix.hpp must only be used after boost/config/abi_prefix.hpp +#else +# undef BOOST_CONFIG_ABI_PREFIX_HPP +#endif + +// the suffix header occurs after all of our code: +#ifdef BOOST_HAS_ABI_HEADERS +# include BOOST_ABI_SUFFIX +#endif + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/array.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/array.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,27 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ARRAY_HPP +# define BOOST_PREPROCESSOR_ARRAY_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/assert.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/assert.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,44 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP +# define BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ASSERT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ASSERT BOOST_PP_ASSERT_D +# else +# define BOOST_PP_ASSERT(cond) BOOST_PP_ASSERT_D(cond) +# endif +# +# define BOOST_PP_ASSERT_D(cond) BOOST_PP_IIF(BOOST_PP_NOT(cond), BOOST_PP_ASSERT_ERROR, BOOST_PP_TUPLE_EAT_1)(...) +# define BOOST_PP_ASSERT_ERROR(x, y, z) +# +# /* BOOST_PP_ASSERT_MSG */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ASSERT_MSG BOOST_PP_ASSERT_MSG_D +# else +# define BOOST_PP_ASSERT_MSG(cond, msg) BOOST_PP_ASSERT_MSG_D(cond, msg) +# endif +# +# define BOOST_PP_ASSERT_MSG_D(cond, msg) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(cond), msg) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/bind.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/bind.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,547 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_HPP_INCLUDED +#define BOOST_MPL_BIND_HPP_INCLUDED + +// Copyright Peter Dimov 2001 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/bind.hpp,v $ +// $Date: 2004/10/26 14:51:04 $ +// $Revision: 1.13 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include +# endif +#endif + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +# define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp +# else +# define BOOST_MPL_PREPROCESSED_HEADER bind.hpp +# endif +# include + +#else + +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# include +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header +# define AUX778076_APPLY \ + BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ + /**/ + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_PARAMS(param) \ + BOOST_MPL_PP_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + ) \ + /**/ + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + /**/ + +# define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + /**/ +#else +# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ + AUX778076_BIND_PARAMS(param) \ + /**/ +#endif + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename T, AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg +{ + typedef T type; +}; + +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< + typename T + , typename Arg + > +struct replace_unnamed_arg +{ + typedef Arg next; + typedef T type; +}; + +template< + typename Arg + > +struct replace_unnamed_arg< arg<-1>,Arg > +{ + typedef typename Arg::next next; + typedef Arg type; +}; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +template< + BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< arg,AUX778076_BIND_PARAMS(U) > +{ + typedef typename AUX778076_APPLY, AUX778076_BIND_PARAMS(U)>::type type; +}; + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< bind,AUX778076_BIND_PARAMS(U) > +{ + typedef bind f_; + typedef typename AUX778076_APPLY::type type; +}; +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +// agurt, 15/jan/02: it's not a intended to be used as a function class, and +// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't +// work), so I went with the 'result_' here, and in all other similar cases +template< bool > +struct resolve_arg_impl +{ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ + { + typedef T type; + }; +}; + +template<> +struct resolve_arg_impl +{ + template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ + { + typedef typename AUX778076_APPLY< + T + , AUX778076_BIND_PARAMS(U) + >::type type; + }; +}; + +// for 'resolve_bind_arg' +template< typename T > struct is_bind_template; + +template< + typename T, AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg + : resolve_arg_impl< is_bind_template::value > + ::template result_< T,AUX778076_BIND_PARAMS(U) > +{ +}; + +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + +template< typename T > +struct replace_unnamed_arg_impl +{ + template< typename Arg > struct result_ + { + typedef Arg next; + typedef T type; + }; +}; + +template<> +struct replace_unnamed_arg_impl< arg<-1> > +{ + template< typename Arg > struct result_ + { + typedef typename next::type next; + typedef Arg type; + }; +}; + +template< typename T, typename Arg > +struct replace_unnamed_arg + : replace_unnamed_arg_impl::template result_ +{ +}; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +// agurt, 10/mar/02: the forward declaration has to appear before any of +// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; + +aux::no_tag is_bind_helper(...); +template< typename T > aux::no_tag is_bind_helper(protect*); + +// overload for "main" form +// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload +// in case if we use 'aux::type_wrapper< bind<...> >' here, and all +// 'bind' instantiations form a complete type anyway +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_PARAMS(typename T) + > +aux::yes_tag is_bind_helper(bind*); +#endif + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > +aux::yes_tag is_bind_helper(arg*); + +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = false); + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) + ); + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +/// if_/eval_if specializations +# define AUX778076_SPEC_NAME if_ +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) +# include BOOST_PP_ITERATE() + +#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_SPEC_NAME eval_if +# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) +# include BOOST_PP_ITERATE() +#endif +#endif + +// real C++ version is already taken care of +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) + +namespace aux { +// apply_count_args +#define AUX778076_COUNT_ARGS_PREFIX bind +#define AUX778076_COUNT_ARGS_DEFAULT na +#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY +#include +} + +// bind +template< + typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() + > +struct bind + : aux::bind_chooser< + aux::bind_count_args::value + >::template result_< F,AUX778076_BIND_PARAMS(T) >::type +{ +}; + +BOOST_MPL_AUX_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( + BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + , bind + ) + + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# undef AUX778076_BIND_NESTED_DEFAULT_PARAMS +# undef AUX778076_BIND_N_SPEC_PARAMS +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_BIND_PARAMS +# undef AUX778076_DMC_PARAM +# undef AUX778076_APPLY + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_HPP_INCLUDED + +///// iteration, depth == 1 + +#elif BOOST_PP_ITERATION_DEPTH() == 1 + +# define i_ BOOST_PP_FRAME_ITERATION(1) + +#if defined(AUX778076_SPEC_NAME) + +// lazy metafunction specialization +template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > +struct BOOST_PP_CAT(quote,i_); + +template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; + +template< + typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_)< + BOOST_PP_CAT(quote,i_) + AUX778076_BIND_N_PARAMS(i_,T) + > +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: + typedef mpl::arg<1> n1; +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) +# include BOOST_PP_ITERATE() + + typedef typename AUX778076_SPEC_NAME< + typename t1::type + , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) + >::type f_; + + public: + typedef typename f_::type type; + }; +}; + +#undef AUX778076_SPEC_NAME + +#else // AUX778076_SPEC_NAME + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct BOOST_PP_CAT(bind,i_) +{ + template< + AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) + > + struct apply + { + private: +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + + typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef typename r0::type a0; + typedef typename r0::next n1; + typedef typename aux::resolve_bind_arg::type f_; + /// +# else + typedef typename aux::resolve_bind_arg::type f_; + +# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT + +# if i_ > 0 +# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) +# include BOOST_PP_ITERATE() +# endif + + public: + +# define AUX778076_ARG(unused, i_, t) \ + BOOST_PP_COMMA_IF(i_) \ + typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ +/**/ + + typedef typename BOOST_PP_CAT(apply_wrap,i_)< + f_ + BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) + >::type type; + +# undef AUX778076_ARG + }; +}; + +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) + > +struct resolve_bind_arg< + BOOST_PP_CAT(bind,i_),AUX778076_BIND_PARAMS(U) + > +{ + typedef BOOST_PP_CAT(bind,i_) f_; + typedef typename AUX778076_APPLY::type type; +}; + +#else + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +aux::yes_tag +is_bind_helper(BOOST_PP_CAT(bind,i_)*); + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) +BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) + +# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY +/// primary template (not a specialization!) +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct bind + : BOOST_PP_CAT(bind,i_) +{ +}; +#else +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() + > +struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > + : BOOST_PP_CAT(bind,i_) +{ +}; +#endif + +# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace aux { + +template<> +struct bind_chooser +{ + template< + typename F, AUX778076_BIND_PARAMS(typename T) + > + struct result_ + { + typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; + }; +}; + +} // namespace aux + +# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE + +#endif // AUX778076_SPEC_NAME + +# undef i_ + +///// iteration, depth == 2 + +#elif BOOST_PP_ITERATION_DEPTH() == 2 + +# define j_ BOOST_PP_FRAME_ITERATION(2) +# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) + + typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); + typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); + typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); + typedef aux::resolve_bind_arg BOOST_PP_CAT(t,j_); + /// +# else + typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); + +# endif +# undef j_ + +#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/bind/arg.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/bind/arg.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,123 @@ + +// Copyright Peter Dimov 2001-2002 +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/arg.hpp" header +// -- DO NOT modify by hand! + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +template<> struct arg< -1 > +{ + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<1> +{ + BOOST_STATIC_CONSTANT(int, value = 1); + typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U1 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<2> +{ + BOOST_STATIC_CONSTANT(int, value = 2); + typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U2 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<3> +{ + BOOST_STATIC_CONSTANT(int, value = 3); + typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U3 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<4> +{ + BOOST_STATIC_CONSTANT(int, value = 4); + typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U4 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +template<> struct arg<5> +{ + BOOST_STATIC_CONSTANT(int, value = 5); + typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) + BOOST_MPL_AUX_ARG_TYPEDEF(na, type) + + template< + typename U1 = na, typename U2 = na, typename U3 = na + , typename U4 = na, typename U5 = na + > + struct apply + { + typedef U5 type; + BOOST_MPL_AUX_ASSERT_NOT_NA(type); + }; +}; + +BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/bind/placeholders.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/bind/placeholders.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,100 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED +#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright Peter Dimov 2001-2003 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/placeholders.hpp,v $ +// $Date: 2004/09/16 14:08:46 $ +// $Revision: 1.4 $ + + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include + +# if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) +# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ + using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ + /**/ +# else +# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ +# endif + +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp +# include + +#else + +# include +# include +# include +# include + +// watch out for GNU gettext users, who #define _(x) +#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN +typedef arg<-1> _; +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; +} + +}} +#endif + +/// agurt, 17/mar/02: one more placeholder for the last 'apply#' +/// specialization +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, )) +#include BOOST_PP_ITERATE() + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN + +typedef arg BOOST_PP_CAT(_,i_); + +BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE + +namespace boost { namespace mpl { + +BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) + +namespace placeholders { +using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); +} + +}} + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/call_traits.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/call_traits.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,164 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// call_traits: defines typedefs for function usage +// (see libs/utility/call_traits.htm) + +/* Release notes: + 23rd July 2000: + Fixed array specialization. (JM) + Added Borland specific fixes for reference types + (issue raised by Steve Cleary). +*/ + +#ifndef BOOST_DETAIL_CALL_TRAITS_HPP +#define BOOST_DETAIL_CALL_TRAITS_HPP + +#ifndef BOOST_CONFIG_HPP +#include +#endif +#include + +#include +#include +#include + +namespace boost{ + +namespace detail{ + +template +struct ct_imp2 +{ + typedef const T& param_type; +}; + +template +struct ct_imp2 +{ + typedef const T param_type; +}; + +template +struct ct_imp +{ + typedef const T& param_type; +}; + +template +struct ct_imp +{ + typedef typename ct_imp2::param_type param_type; +}; + +template +struct ct_imp +{ + typedef const T param_type; +}; + +} + +template +struct call_traits +{ +public: + typedef T value_type; + typedef T& reference; + typedef const T& const_reference; + // + // C++ Builder workaround: we should be able to define a compile time + // constant and pass that as a single template parameter to ct_imp, + // however compiler bugs prevent this - instead pass three bool's to + // ct_imp and add an extra partial specialisation + // of ct_imp to handle the logic. (JM) + typedef typename boost::detail::ct_imp< + T, + ::boost::is_pointer::value, + ::boost::is_arithmetic::value + >::param_type param_type; +}; + +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; + +#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x581 ) ) +// these are illegal specialisations; cv-qualifies applied to +// references have no effect according to [8.3.2p1], +// C++ Builder requires them though as it treats cv-qualified +// references as distinct types... +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; +template +struct call_traits +{ + typedef T& value_type; + typedef T& reference; + typedef const T& const_reference; + typedef T& param_type; // hh removed const +}; + +template +struct call_traits< T * > +{ + typedef T * value_type; + typedef T * & reference; + typedef T * const & const_reference; + typedef T * const param_type; // hh removed const +}; +#endif +#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) +template +struct call_traits +{ +private: + typedef T array_type[N]; +public: + // degrades array to pointer: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; + +template +struct call_traits +{ +private: + typedef const T array_type[N]; +public: + // degrades array to pointer: + typedef const T* value_type; + typedef array_type& reference; + typedef const array_type& const_reference; + typedef const T* const param_type; +}; +#endif + +} + +#endif // BOOST_DETAIL_CALL_TRAITS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/cast.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/cast.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,51 @@ +// © Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +// +// Revision History +// +// 19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola) +// 08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola) +// 04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola) +// 30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola) +// 25 Oct 2001 Initial boostification (Fernando Cacciola) +// 23 Jan 2004 Inital add to cvs (post review)s +// +#ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP +#define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP + +#include + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + +# include + +#else + +#include +#include + +namespace boost +{ + template + inline + Target numeric_cast ( Source arg ) + { + typedef boost::numeric::converter Converter ; + return Converter::convert(arg); + } + + using numeric::bad_numeric_cast; + +} // namespace boost + +#endif + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/compressed_pair.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/compressed_pair.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,443 @@ +// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/utility for most recent version including documentation. + +// compressed_pair: pair that "compresses" empty members +// (see libs/utility/compressed_pair.htm) +// +// JM changes 25 Jan 2004: +// For the case where T1 == T2 and both are empty, then first() and second() +// should return different objects. +// JM changes 25 Jan 2000: +// Removed default arguments from compressed_pair_switch to get +// C++ Builder 4 to accept them +// rewriten swap to get gcc and C++ builder to compile. +// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs. + +#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP +#define BOOST_DETAIL_COMPRESSED_PAIR_HPP + +#include + +#include +#include +#include +#include + +#ifdef BOOST_MSVC +# pragma warning(push) +# pragma warning(disable:4512) +#endif +namespace boost +{ + +template +class compressed_pair; + + +// compressed_pair + +namespace details +{ + // JM altered 26 Jan 2000: + template + struct compressed_pair_switch; + + template + struct compressed_pair_switch + {static const int value = 0;}; + + template + struct compressed_pair_switch + {static const int value = 3;}; + + template + struct compressed_pair_switch + {static const int value = 1;}; + + template + struct compressed_pair_switch + {static const int value = 2;}; + + template + struct compressed_pair_switch + {static const int value = 4;}; + + template + struct compressed_pair_switch + {static const int value = 5;}; + + template class compressed_pair_imp; + +#ifdef __GNUC__ + // workaround for GCC (JM): + using std::swap; +#endif + // + // can't call unqualified swap from within classname::swap + // as Koenig lookup rules will find only the classname::swap + // member function not the global declaration, so use cp_swap + // as a forwarding function (JM): + template + inline void cp_swap(T& t1, T& t2) + { +#ifndef __GNUC__ + using std::swap; +#endif + swap(t1, t2); + } + + // 0 derive from neither + + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_(x) {} + + compressed_pair_imp(second_param_type y) + : second_(y) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + + // 1 derive from T1 + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x) {} + + compressed_pair_imp(second_param_type y) + : second_(y) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + // no need to swap empty base class: + cp_swap(second_, y.second()); + } + private: + second_type second_; + }; + + // 2 derive from T2 + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : second_type(y), first_(x) {} + + compressed_pair_imp(first_param_type x) + : first_(x) {} + + compressed_pair_imp(second_param_type y) + : second_type(y) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + + void swap(::boost::compressed_pair& y) + { + // no need to swap empty base class: + cp_swap(first_, y.first()); + } + + private: + first_type first_; + }; + + // 3 derive from T1 and T2 + + template + class compressed_pair_imp + : protected ::boost::remove_cv::type, + protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), second_type(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x) {} + + compressed_pair_imp(second_param_type y) + : second_type(y) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return *this;} + second_const_reference second() const {return *this;} + // + // no need to swap empty bases: + void swap(::boost::compressed_pair&) {} + }; + + // JM + // 4 T1 == T2, T1 and T2 both empty + // Originally this did not store an instance of T2 at all + // but that led to problems beause it meant &x.first() == &x.second() + // which is not true for any other kind of pair, so now we store an instance + // of T2 just in case the user is relying on first() and second() returning + // different objects (albeit both empty). + template + class compressed_pair_imp + : protected ::boost::remove_cv::type + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_type(x), m_second(y) {} + + compressed_pair_imp(first_param_type x) + : first_type(x), m_second(x) {} + + first_reference first() {return *this;} + first_const_reference first() const {return *this;} + + second_reference second() {return m_second;} + second_const_reference second() const {return m_second;} + + void swap(::boost::compressed_pair&) {} + private: + T2 m_second; + }; + + // 5 T1 == T2 and are not empty: //JM + + template + class compressed_pair_imp + { + public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair_imp() {} + + compressed_pair_imp(first_param_type x, second_param_type y) + : first_(x), second_(y) {} + + compressed_pair_imp(first_param_type x) + : first_(x), second_(x) {} + + first_reference first() {return first_;} + first_const_reference first() const {return first_;} + + second_reference second() {return second_;} + second_const_reference second() const {return second_;} + + void swap(::boost::compressed_pair& y) + { + cp_swap(first_, y.first()); + cp_swap(second_, y.second()); + } + private: + first_type first_; + second_type second_; + }; + +} // details + +template +class compressed_pair + : private ::boost::details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T1 first_type; + typedef T2 second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} + explicit compressed_pair(first_param_type x) : base(x) {} + explicit compressed_pair(second_param_type y) : base(y) {} + + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + + void swap(compressed_pair& y) { base::swap(y); } +}; + +// JM +// Partial specialisation for case where T1 == T2: +// +template +class compressed_pair + : private details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> +{ +private: + typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, + ::boost::is_empty::value, + ::boost::is_empty::value>::value> base; +public: + typedef T first_type; + typedef T second_type; + typedef typename call_traits::param_type first_param_type; + typedef typename call_traits::param_type second_param_type; + typedef typename call_traits::reference first_reference; + typedef typename call_traits::reference second_reference; + typedef typename call_traits::const_reference first_const_reference; + typedef typename call_traits::const_reference second_const_reference; + + compressed_pair() : base() {} + compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} +#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) + explicit +#endif + compressed_pair(first_param_type x) : base(x) {} + + first_reference first() {return base::first();} + first_const_reference first() const {return base::first();} + + second_reference second() {return base::second();} + second_const_reference second() const {return base::second();} + + void swap(::boost::compressed_pair& y) { base::swap(y); } +}; + +template +inline +void +swap(compressed_pair& x, compressed_pair& y) +{ + x.swap(y); +} + +} // boost + +#ifdef BOOST_MSVC +# pragma warning(pop) +#endif + +#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/config.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/config.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,38 @@ +//----------------------------------------------------------------------------- +// boost variant/detail/config.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_VARIANT_DETAIL_CONFIG_HPP +#define BOOST_VARIANT_DETAIL_CONFIG_HPP + +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" + +/////////////////////////////////////////////////////////////////////////////// +// macro BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING +// +#if BOOST_WORKAROUND(__MWERKS__, <= 0x3201) \ + || BOOST_WORKAROUND(BOOST_INTEL, <= 700) \ + || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ + && !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) +# define BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING +#endif + +/////////////////////////////////////////////////////////////////////////////// +// macro BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND +// +#if !defined(BOOST_NO_SFINAE) \ + && !BOOST_WORKAROUND(BOOST_INTEL, <= 700) \ + && !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) +# define BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND +#endif + +#endif // BOOST_VARIANT_DETAIL_CONFIG_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/config/abi_prefix.hpp --- a/epoc32/include/stdapis/boost/config/abi_prefix.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -// abi_prefix header -------------------------------------------------------// - -// © Copyright John Maddock 2003 - -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). - -#ifndef BOOST_CONFIG_ABI_PREFIX_HPP -# define BOOST_CONFIG_ABI_PREFIX_HPP -#else -# error double inclusion of header boost/config/abi_prefix.hpp is an error -#endif - -#include - -// this must occur after all other includes and before any code appears: -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_PREFIX -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/config/abi_suffix.hpp --- a/epoc32/include/stdapis/boost/config/abi_suffix.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -// abi_sufffix header -------------------------------------------------------// - -// © Copyright John Maddock 2003 - -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). - -// This header should be #included AFTER code that was preceded by a #include -// . - -#ifndef BOOST_CONFIG_ABI_PREFIX_HPP -# error Header boost/config/abi_prefix.hpp must only be used after boost/config/abi_prefix.hpp -#else -# undef BOOST_CONFIG_ABI_PREFIX_HPP -#endif - -// the suffix header occurs after all of our code: -#ifdef BOOST_HAS_ABI_HEADERS -# include BOOST_ABI_SUFFIX -#endif - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/config/no_tr1/complex.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/config/no_tr1/complex.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,32 @@ +// (C) Copyright John Maddock 2005. +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_MATH_COMPLEX_INCLUDED +#define BOOST_MATH_COMPLEX_INCLUDED + +#ifndef BOOST_MATH_COMPLEX_ASIN_INCLUDED +# include +#endif +#ifndef BOOST_MATH_COMPLEX_ASINH_INCLUDED +# include +#endif +#ifndef BOOST_MATH_COMPLEX_ACOS_INCLUDED +# include +#endif +#ifndef BOOST_MATH_COMPLEX_ACOSH_INCLUDED +# include +#endif +#ifndef BOOST_MATH_COMPLEX_ATAN_INCLUDED +# include +#endif +#ifndef BOOST_MATH_COMPLEX_ATANH_INCLUDED +# include +#endif +#ifndef BOOST_MATH_COMPLEX_FABS_INCLUDED +# include +#endif + + +#endif // BOOST_MATH_COMPLEX_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/config/no_tr1/utility.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/config/no_tr1/utility.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,19 @@ +// Boost utility.hpp header file -------------------------------------------// + +// Copyright 1999-2003 Aleksey Gurtovoy. Use, modification, and distribution are +// subject to the Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or a copy at .) + +// See for the library's home page. + +#ifndef BOOST_UTILITY_HPP +#define BOOST_UTILITY_HPP + +#include +#include +#include +#include +#include +#include + +#endif // BOOST_UTILITY_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/detail/algorithm.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/detail/algorithm.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,103 @@ +#ifndef BOOST_ALGORITHM_RG071801_HPP +#define BOOST_ALGORITHM_RG071801_HPP + +// +// +// Copyright (c) 1994 +// Hewlett-Packard Company +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Hewlett-Packard Company makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// +// +// Copyright (c) 1996-1998 +// Silicon Graphics Computer Systems, Inc. +// +// Permission to use, copy, modify, distribute and sell this software +// and its documentation for any purpose is hereby granted without fee, +// provided that the above copyright notice appear in all copies and +// that both that copyright notice and this permission notice appear +// in supporting documentation. Silicon Graphics makes no +// representations about the suitability of this software for any +// purpose. It is provided "as is" without express or implied warranty. +// + +// Copyright 2002 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Boost.MultiArray Library +// Authors: Ronald Garcia +// Jeremy Siek +// Andrew Lumsdaine +// See http://www.boost.org/libs/multi_array for documentation. + + +#include "boost/iterator.hpp" + +namespace boost { +namespace detail { +namespace multi_array { +//-------------------------------------------------- +// copy_n (not part of the C++ standard) +#if 1 + +template +OutputIter copy_n(InputIter first, Size count, + OutputIter result) { + for ( ; count > 0; --count) { + *result = *first; + ++first; + ++result; + } + return result; +} +#else // !1 + +template +OutputIter copy_n__(InputIter first, Size count, + OutputIter result, + std::input_iterator_tag) { + for ( ; count > 0; --count) { + *result = *first; + ++first; + ++result; + } + return result; +} + +template +inline OutputIter +copy_n__(RAIter first, Size count, + OutputIter result, + std::random_access_iterator_tag) { + RAIter last = first + count; + return std::copy(first, last, result); +} + +template +inline OutputIter +copy_n__(InputIter first, Size count, OutputIter result) { + typedef typename std::iterator_traits::iterator_category cat; + return copy_n__(first, count, result, cat()); +} + +template +inline OutputIter +copy_n(InputIter first, Size count, OutputIter result) { + return copy_n__(first, count, result); +} + +#endif // 1 +} // namespace multi_array +} // namespace detail +} // namespace boost + +#endif // BOOST_ALGORITHM_RG071801_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/detail/call_traits.hpp --- a/epoc32/include/stdapis/boost/detail/call_traits.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,164 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/utility for most recent version including documentation. - -// call_traits: defines typedefs for function usage -// (see libs/utility/call_traits.htm) - -/* Release notes: - 23rd July 2000: - Fixed array specialization. (JM) - Added Borland specific fixes for reference types - (issue raised by Steve Cleary). -*/ - -#ifndef BOOST_DETAIL_CALL_TRAITS_HPP -#define BOOST_DETAIL_CALL_TRAITS_HPP - -#ifndef BOOST_CONFIG_HPP -#include -#endif -#include - -#include -#include -#include - -namespace boost{ - -namespace detail{ - -template -struct ct_imp2 -{ - typedef const T& param_type; -}; - -template -struct ct_imp2 -{ - typedef const T param_type; -}; - -template -struct ct_imp -{ - typedef const T& param_type; -}; - -template -struct ct_imp -{ - typedef typename ct_imp2::param_type param_type; -}; - -template -struct ct_imp -{ - typedef const T param_type; -}; - -} - -template -struct call_traits -{ -public: - typedef T value_type; - typedef T& reference; - typedef const T& const_reference; - // - // C++ Builder workaround: we should be able to define a compile time - // constant and pass that as a single template parameter to ct_imp, - // however compiler bugs prevent this - instead pass three bool's to - // ct_imp and add an extra partial specialisation - // of ct_imp to handle the logic. (JM) - typedef typename boost::detail::ct_imp< - T, - ::boost::is_pointer::value, - ::boost::is_arithmetic::value - >::param_type param_type; -}; - -template -struct call_traits -{ - typedef T& value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T& param_type; // hh removed const -}; - -#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x581 ) ) -// these are illegal specialisations; cv-qualifies applied to -// references have no effect according to [8.3.2p1], -// C++ Builder requires them though as it treats cv-qualified -// references as distinct types... -template -struct call_traits -{ - typedef T& value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T& param_type; // hh removed const -}; -template -struct call_traits -{ - typedef T& value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T& param_type; // hh removed const -}; -template -struct call_traits -{ - typedef T& value_type; - typedef T& reference; - typedef const T& const_reference; - typedef T& param_type; // hh removed const -}; - -template -struct call_traits< T * > -{ - typedef T * value_type; - typedef T * & reference; - typedef T * const & const_reference; - typedef T * const param_type; // hh removed const -}; -#endif -#if !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS) -template -struct call_traits -{ -private: - typedef T array_type[N]; -public: - // degrades array to pointer: - typedef const T* value_type; - typedef array_type& reference; - typedef const array_type& const_reference; - typedef const T* const param_type; -}; - -template -struct call_traits -{ -private: - typedef const T array_type[N]; -public: - // degrades array to pointer: - typedef const T* value_type; - typedef array_type& reference; - typedef const array_type& const_reference; - typedef const T* const param_type; -}; -#endif - -} - -#endif // BOOST_DETAIL_CALL_TRAITS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/detail/compressed_pair.hpp --- a/epoc32/include/stdapis/boost/detail/compressed_pair.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,443 +0,0 @@ -// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000. -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/utility for most recent version including documentation. - -// compressed_pair: pair that "compresses" empty members -// (see libs/utility/compressed_pair.htm) -// -// JM changes 25 Jan 2004: -// For the case where T1 == T2 and both are empty, then first() and second() -// should return different objects. -// JM changes 25 Jan 2000: -// Removed default arguments from compressed_pair_switch to get -// C++ Builder 4 to accept them -// rewriten swap to get gcc and C++ builder to compile. -// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs. - -#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP -#define BOOST_DETAIL_COMPRESSED_PAIR_HPP - -#include - -#include -#include -#include -#include - -#ifdef BOOST_MSVC -# pragma warning(push) -# pragma warning(disable:4512) -#endif -namespace boost -{ - -template -class compressed_pair; - - -// compressed_pair - -namespace details -{ - // JM altered 26 Jan 2000: - template - struct compressed_pair_switch; - - template - struct compressed_pair_switch - {static const int value = 0;}; - - template - struct compressed_pair_switch - {static const int value = 3;}; - - template - struct compressed_pair_switch - {static const int value = 1;}; - - template - struct compressed_pair_switch - {static const int value = 2;}; - - template - struct compressed_pair_switch - {static const int value = 4;}; - - template - struct compressed_pair_switch - {static const int value = 5;}; - - template class compressed_pair_imp; - -#ifdef __GNUC__ - // workaround for GCC (JM): - using std::swap; -#endif - // - // can't call unqualified swap from within classname::swap - // as Koenig lookup rules will find only the classname::swap - // member function not the global declaration, so use cp_swap - // as a forwarding function (JM): - template - inline void cp_swap(T& t1, T& t2) - { -#ifndef __GNUC__ - using std::swap; -#endif - swap(t1, t2); - } - - // 0 derive from neither - - template - class compressed_pair_imp - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_imp() {} - - compressed_pair_imp(first_param_type x, second_param_type y) - : first_(x), second_(y) {} - - compressed_pair_imp(first_param_type x) - : first_(x) {} - - compressed_pair_imp(second_param_type y) - : second_(y) {} - - first_reference first() {return first_;} - first_const_reference first() const {return first_;} - - second_reference second() {return second_;} - second_const_reference second() const {return second_;} - - void swap(::boost::compressed_pair& y) - { - cp_swap(first_, y.first()); - cp_swap(second_, y.second()); - } - private: - first_type first_; - second_type second_; - }; - - // 1 derive from T1 - - template - class compressed_pair_imp - : protected ::boost::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_imp() {} - - compressed_pair_imp(first_param_type x, second_param_type y) - : first_type(x), second_(y) {} - - compressed_pair_imp(first_param_type x) - : first_type(x) {} - - compressed_pair_imp(second_param_type y) - : second_(y) {} - - first_reference first() {return *this;} - first_const_reference first() const {return *this;} - - second_reference second() {return second_;} - second_const_reference second() const {return second_;} - - void swap(::boost::compressed_pair& y) - { - // no need to swap empty base class: - cp_swap(second_, y.second()); - } - private: - second_type second_; - }; - - // 2 derive from T2 - - template - class compressed_pair_imp - : protected ::boost::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_imp() {} - - compressed_pair_imp(first_param_type x, second_param_type y) - : second_type(y), first_(x) {} - - compressed_pair_imp(first_param_type x) - : first_(x) {} - - compressed_pair_imp(second_param_type y) - : second_type(y) {} - - first_reference first() {return first_;} - first_const_reference first() const {return first_;} - - second_reference second() {return *this;} - second_const_reference second() const {return *this;} - - void swap(::boost::compressed_pair& y) - { - // no need to swap empty base class: - cp_swap(first_, y.first()); - } - - private: - first_type first_; - }; - - // 3 derive from T1 and T2 - - template - class compressed_pair_imp - : protected ::boost::remove_cv::type, - protected ::boost::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_imp() {} - - compressed_pair_imp(first_param_type x, second_param_type y) - : first_type(x), second_type(y) {} - - compressed_pair_imp(first_param_type x) - : first_type(x) {} - - compressed_pair_imp(second_param_type y) - : second_type(y) {} - - first_reference first() {return *this;} - first_const_reference first() const {return *this;} - - second_reference second() {return *this;} - second_const_reference second() const {return *this;} - // - // no need to swap empty bases: - void swap(::boost::compressed_pair&) {} - }; - - // JM - // 4 T1 == T2, T1 and T2 both empty - // Originally this did not store an instance of T2 at all - // but that led to problems beause it meant &x.first() == &x.second() - // which is not true for any other kind of pair, so now we store an instance - // of T2 just in case the user is relying on first() and second() returning - // different objects (albeit both empty). - template - class compressed_pair_imp - : protected ::boost::remove_cv::type - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_imp() {} - - compressed_pair_imp(first_param_type x, second_param_type y) - : first_type(x), m_second(y) {} - - compressed_pair_imp(first_param_type x) - : first_type(x), m_second(x) {} - - first_reference first() {return *this;} - first_const_reference first() const {return *this;} - - second_reference second() {return m_second;} - second_const_reference second() const {return m_second;} - - void swap(::boost::compressed_pair&) {} - private: - T2 m_second; - }; - - // 5 T1 == T2 and are not empty: //JM - - template - class compressed_pair_imp - { - public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair_imp() {} - - compressed_pair_imp(first_param_type x, second_param_type y) - : first_(x), second_(y) {} - - compressed_pair_imp(first_param_type x) - : first_(x), second_(x) {} - - first_reference first() {return first_;} - first_const_reference first() const {return first_;} - - second_reference second() {return second_;} - second_const_reference second() const {return second_;} - - void swap(::boost::compressed_pair& y) - { - cp_swap(first_, y.first()); - cp_swap(second_, y.second()); - } - private: - first_type first_; - second_type second_; - }; - -} // details - -template -class compressed_pair - : private ::boost::details::compressed_pair_imp::type, typename remove_cv::type>::value, - ::boost::is_empty::value, - ::boost::is_empty::value>::value> -{ -private: - typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, - ::boost::is_empty::value, - ::boost::is_empty::value>::value> base; -public: - typedef T1 first_type; - typedef T2 second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair() : base() {} - compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} - explicit compressed_pair(first_param_type x) : base(x) {} - explicit compressed_pair(second_param_type y) : base(y) {} - - first_reference first() {return base::first();} - first_const_reference first() const {return base::first();} - - second_reference second() {return base::second();} - second_const_reference second() const {return base::second();} - - void swap(compressed_pair& y) { base::swap(y); } -}; - -// JM -// Partial specialisation for case where T1 == T2: -// -template -class compressed_pair - : private details::compressed_pair_imp::type, typename remove_cv::type>::value, - ::boost::is_empty::value, - ::boost::is_empty::value>::value> -{ -private: - typedef details::compressed_pair_imp::type, typename remove_cv::type>::value, - ::boost::is_empty::value, - ::boost::is_empty::value>::value> base; -public: - typedef T first_type; - typedef T second_type; - typedef typename call_traits::param_type first_param_type; - typedef typename call_traits::param_type second_param_type; - typedef typename call_traits::reference first_reference; - typedef typename call_traits::reference second_reference; - typedef typename call_traits::const_reference first_const_reference; - typedef typename call_traits::const_reference second_const_reference; - - compressed_pair() : base() {} - compressed_pair(first_param_type x, second_param_type y) : base(x, y) {} -#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) - explicit -#endif - compressed_pair(first_param_type x) : base(x) {} - - first_reference first() {return base::first();} - first_const_reference first() const {return base::first();} - - second_reference second() {return base::second();} - second_const_reference second() const {return base::second();} - - void swap(::boost::compressed_pair& y) { base::swap(y); } -}; - -template -inline -void -swap(compressed_pair& x, compressed_pair& y) -{ - x.swap(y); -} - -} // boost - -#ifdef BOOST_MSVC -# pragma warning(pop) -#endif - -#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/detail/dynamic_bitset.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/detail/dynamic_bitset.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1800 @@ +// -------------------------------------------------- +// +// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002. +// (C) Copyright Gennaro Prota 2003 - 2004. +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// ----------------------------------------------------------- + +// See http://www.boost.org/libs/dynamic_bitset for documentation. + + + +#ifndef BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP +#define BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP + +#include +#include +#include // for std::overflow_error +#include // for std::swap, std::min, std::copy, std::fill +#include +#include // for CHAR_BIT + +#include "boost/dynamic_bitset/config.hpp" + +#ifndef BOOST_NO_STD_LOCALE +# include // G.P.S +#endif + +#if defined(BOOST_OLD_IOSTREAMS) +# include +# include // for isspace +#else +# include +# include +#endif + +#include "boost/dynamic_bitset_fwd.hpp" +#include "boost/detail/dynamic_bitset.hpp" +#include "boost/detail/iterator.hpp" // used to implement append(Iter, Iter) +#include "boost/static_assert.hpp" +#include "boost/limits.hpp" +#include "boost/pending/lowest_bit.hpp" // used by find_first/next + + +namespace boost { + +template + +#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // 1300 == VC++ 7.0 + // VC++ (up to 7.0) wants the default arguments again + > +# else + +# endif + +class dynamic_bitset +{ + // Portability note: member function templates are defined inside + // this class definition to avoid problems with VC++. Similarly, + // with the member functions of nested classes. + + BOOST_STATIC_ASSERT(detail::dynamic_bitset_allowed_block_type::value); + +public: + typedef Block block_type; + typedef Allocator allocator_type; + typedef std::size_t size_type; + typedef int block_width_type; // gps + + BOOST_STATIC_CONSTANT(block_width_type, bits_per_block = (std::numeric_limits::digits)); + BOOST_STATIC_CONSTANT(size_type, npos = static_cast(-1)); + + +public: + + // A proxy class to simulate lvalues of bit type. + // Shouldn't it be private? [gps] + // + class reference + { + friend class dynamic_bitset; + + + // the one and only non-copy ctor + reference(block_type & b, int pos) + :m_block(b), m_mask(block_type(1) << pos) + {} + + void operator&(); // left undefined + + public: + + // copy constructor: compiler generated + + operator bool() const { return (m_block & m_mask) != 0; } + bool operator~() const { return (m_block & m_mask) == 0; } + + reference& flip() { do_flip(); return *this; } + + reference& operator=(bool x) { do_assign(x); return *this; } // for b[i] = x + reference& operator=(const reference& rhs) { do_assign(rhs); return *this; } // for b[i] = b[j] + + reference& operator|=(bool x) { if (x) do_set(); return *this; } + reference& operator&=(bool x) { if (!x) do_reset(); return *this; } + reference& operator^=(bool x) { if (x) do_flip(); return *this; } + reference& operator-=(bool x) { if (x) do_reset(); return *this; } + + private: + block_type & m_block; + const block_type m_mask; + + void do_set() { m_block |= m_mask; } + void do_reset() { m_block &= ~m_mask; } + void do_flip() { m_block ^= m_mask; } + void do_assign(bool x) { x? do_set() : do_reset(); } + }; + + typedef bool const_reference; + + // constructors, etc. + explicit + dynamic_bitset(const Allocator& alloc = Allocator()); + + explicit + dynamic_bitset(size_type num_bits, unsigned long value = 0, + const Allocator& alloc = Allocator()); + + + // The presence of this constructor is a concession to ease of + // use, especially for the novice user. A conversion from string + // is, in most cases, formatting, and should be done by the standard + // formatting convention: operator>>. + // + // NOTE: + // Leave the parentheses around std::basic_string::npos. + // g++ 3.2 requires them and probably the standard will - see core issue 325 + // NOTE 2: + // split into two constructors because of bugs in MSVC 6.0sp5 with STLport + + template + dynamic_bitset(const std::basic_string& s, + typename std::basic_string::size_type pos, + typename std::basic_string::size_type n, + size_type num_bits = npos, + const Allocator& alloc = Allocator()) + + :m_bits(alloc), + m_num_bits(0) + { + init_from_string(s, pos, n, num_bits, alloc); + } + + template + explicit + dynamic_bitset(const std::basic_string& s, + typename std::basic_string::size_type pos = 0) + + :m_bits(Allocator()), + m_num_bits(0) + { + init_from_string(s, pos, (std::basic_string::npos), + npos, Allocator()); + } + + // The first bit in *first is the least significant bit, and the + // last bit in the block just before *last is the most significant bit. + template + dynamic_bitset(BlockInputIterator first, BlockInputIterator last, + const Allocator& alloc = Allocator()) + + :m_bits(first, last, alloc), + m_num_bits(m_bits.size() * bits_per_block) + {} + + + // copy constructor + dynamic_bitset(const dynamic_bitset& b); + + ~dynamic_bitset(); + + void swap(dynamic_bitset& b); + dynamic_bitset& operator=(const dynamic_bitset& b); + + allocator_type get_allocator() const; + + // size changing operations + void resize(size_type num_bits, bool value = false); + void clear(); + void push_back(bool bit); + void append(Block block); + + template + void m_append(BlockInputIterator first, BlockInputIterator last, std::input_iterator_tag) + { + std::vector v(first, last); + m_append(v.begin(), v.end(), std::random_access_iterator_tag()); + } + template + void m_append(BlockInputIterator first, BlockInputIterator last, std::forward_iterator_tag) + { + assert(first != last); + block_width_type r = count_extra_bits(); + std::size_t d = boost::detail::distance(first, last); + m_bits.reserve(num_blocks() + d); + if (r == 0) { + for( ; first != last; ++first) + m_bits.push_back(*first); // could use vector<>::insert() + } + else { + m_highest_block() |= (*first << r); + do { + Block b = *first >> (bits_per_block - r); + ++first; + m_bits.push_back(b | (first==last? 0 : *first << r)); + } while (first != last); + } + m_num_bits += bits_per_block * d; + } + template + void append(BlockInputIterator first, BlockInputIterator last) // strong guarantee + { + if (first != last) { + typename detail::iterator_traits::iterator_category cat; + m_append(first, last, cat); + } + } + + + // bitset operations + dynamic_bitset& operator&=(const dynamic_bitset& b); + dynamic_bitset& operator|=(const dynamic_bitset& b); + dynamic_bitset& operator^=(const dynamic_bitset& b); + dynamic_bitset& operator-=(const dynamic_bitset& b); + dynamic_bitset& operator<<=(size_type n); + dynamic_bitset& operator>>=(size_type n); + dynamic_bitset operator<<(size_type n) const; + dynamic_bitset operator>>(size_type n) const; + + // basic bit operations + dynamic_bitset& set(size_type n, bool val = true); + dynamic_bitset& set(); + dynamic_bitset& reset(size_type n); + dynamic_bitset& reset(); + dynamic_bitset& flip(size_type n); + dynamic_bitset& flip(); + bool test(size_type n) const; + bool any() const; + bool none() const; + dynamic_bitset operator~() const; + size_type count() const; + + // subscript + reference operator[](size_type pos) { + return reference(m_bits[block_index(pos)], bit_index(pos)); + } + bool operator[](size_type pos) const { return test(pos); } + + unsigned long to_ulong() const; + + size_type size() const; + size_type num_blocks() const; + size_type max_size() const; + bool empty() const; +#if 0 // gps + void reserve(size_type n); + size_type capacity() const; +#endif + + bool is_subset_of(const dynamic_bitset& a) const; + bool is_proper_subset_of(const dynamic_bitset& a) const; + bool intersects(const dynamic_bitset & a) const; + + // lookup + size_type find_first() const; + size_type find_next(size_type pos) const; + + +#if !defined BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS + // lexicographical comparison + template + friend bool operator==(const dynamic_bitset& a, + const dynamic_bitset& b); + + template + friend bool operator<(const dynamic_bitset& a, + const dynamic_bitset& b); + + + template + friend void to_block_range(const dynamic_bitset& b, + BlockOutputIterator result); + + template + friend void from_block_range(BlockIterator first, BlockIterator last, + dynamic_bitset& result); + + + template + friend std::basic_istream& operator>>(std::basic_istream& is, + dynamic_bitset& b); + + template + friend void to_string_helper(const dynamic_bitset & b, stringT & s, bool dump_all); + + +#endif + + +private: + BOOST_STATIC_CONSTANT(block_width_type, ulong_width = std::numeric_limits::digits); + typedef std::vector buffer_type; + + void m_zero_unused_bits(); + bool m_check_invariants() const; + + size_type m_do_find_from(size_type first_block) const; + + block_width_type count_extra_bits() const { return bit_index(size()); } + static size_type block_index(size_type pos) { return pos / bits_per_block; } + static block_width_type bit_index(size_type pos) { return static_cast(pos % bits_per_block); } + static Block bit_mask(size_type pos) { return Block(1) << bit_index(pos); } + + template + void init_from_string(const std::basic_string& s, + typename std::basic_string::size_type pos, + typename std::basic_string::size_type n, + size_type num_bits, + const Allocator& alloc) + { + assert(pos <= s.size()); + + typedef typename std::basic_string StrT; + typedef typename StrT::traits_type Tr; + + const typename StrT::size_type rlen = (std::min)(n, s.size() - pos); // gps + const size_type sz = ( num_bits != npos? num_bits : rlen); + m_bits.resize(calc_num_blocks(sz)); + m_num_bits = sz; + + + BOOST_DYNAMIC_BITSET_CTYPE_FACET(CharT, fac, std::locale()); + const CharT one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + const size_type m = num_bits < rlen ? num_bits : rlen; // [gps] + typename StrT::size_type i = 0; + for( ; i < m; ++i) { + + const CharT c = s[(pos + m - 1) - i]; + + assert( Tr::eq(c, one) + || Tr::eq(c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0')) ); + + if (Tr::eq(c, one)) + set(i); + + } + + } + +BOOST_DYNAMIC_BITSET_PRIVATE: + + bool m_unchecked_test(size_type pos) const; + static size_type calc_num_blocks(size_type num_bits); + + Block& m_highest_block(); + const Block& m_highest_block() const; + + buffer_type m_bits; // [gps] to be renamed + size_type m_num_bits; + + + class bit_appender; + friend class bit_appender; + class bit_appender { + // helper for stream >> + // Supplies to the lack of an efficient append at the less + // significant end: bits are actually appended "at left" but + // rearranged in the destructor. Everything works just as if + // dynamic_bitset<> had an append_at_right() function (which + // threw, in case, the same exceptions as push_back) except + // that the function is actually called bit_appender::do_append(). + // + dynamic_bitset & bs; + size_type n; + Block mask; + Block * current; + public: + bit_appender(dynamic_bitset & r) : bs(r), n(0), mask(0), current(0) {} + ~bit_appender() { + // reverse the order of blocks, shift + // if needed, and then resize + // + std::reverse(bs.m_bits.begin(), bs.m_bits.end()); + const block_width_type offs = bit_index(n); + if (offs) + bs >>= (bits_per_block - offs); + bs.resize(n); // doesn't enlarge, so can't throw + assert(bs.m_check_invariants()); + } + inline void do_append(bool value) { + + if (mask == 0) { + bs.append(Block(0)); + current = &bs.m_highest_block(); + mask = Block(1) << (bits_per_block - 1); + } + + if(value) + *current |= mask; + + mask /= 2; + ++n; + } + size_type get_count() const { return n; } + }; + +}; + +#if BOOST_WORKAROUND( __IBMCPP__, <=600 ) + +// Workaround for IBM's AIX platform. +// See http://comments.gmane.org/gmane.comp.lib.boost.user/15331 + +template +dynamic_bitset::block_width_type const +dynamic_bitset::bits_per_block; + +template +dynamic_bitset::block_width_type const +dynamic_bitset::ulong_width; + +#endif + +// Global Functions: + +// comparison +template +bool operator!=(const dynamic_bitset& a, + const dynamic_bitset& b); + +template +bool operator<=(const dynamic_bitset& a, + const dynamic_bitset& b); + +template +bool operator>(const dynamic_bitset& a, + const dynamic_bitset& b); + +template +bool operator>=(const dynamic_bitset& a, + const dynamic_bitset& b); + +// stream operators +#ifdef BOOST_OLD_IOSTREAMS +template +std::ostream& operator<<(std::ostream& os, + const dynamic_bitset& b); + +template +std::istream& operator>>(std::istream& is, dynamic_bitset& b); +#else +// NOTE: Digital Mars wants the same template parameter names +// here and in the definition! [last tested: 8.48.10] +// +template +std::basic_ostream& +operator<<(std::basic_ostream& os, + const dynamic_bitset& b); + +template +std::basic_istream& +operator>>(std::basic_istream& is, + dynamic_bitset& b); +#endif + +// bitset operations +template +dynamic_bitset +operator&(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +template +dynamic_bitset +operator|(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +template +dynamic_bitset +operator^(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +template +dynamic_bitset +operator-(const dynamic_bitset& b1, + const dynamic_bitset& b2); + +// namespace scope swap +template +void swap(dynamic_bitset& b1, + dynamic_bitset& b2); + + +template +void +to_string(const dynamic_bitset& b, stringT & s); // gps + +template +void +to_block_range(const dynamic_bitset& b, + BlockOutputIterator result); + + +// gps - check docs with Jeremy +// +template +inline void +from_block_range(BlockIterator first, BlockIterator last, + dynamic_bitset& result) +{ + // PRE: distance(first, last) <= numblocks() + std::copy (first, last, result.m_bits.begin()); //[gps] +} + +//============================================================================= +// dynamic_bitset implementation + + +//----------------------------------------------------------------------------- +// constructors, etc. + +template +dynamic_bitset::dynamic_bitset(const Allocator& alloc) + : m_bits(alloc), m_num_bits(0) +{ + +} + +template +dynamic_bitset:: +dynamic_bitset(size_type num_bits, unsigned long value, const Allocator& alloc) + : m_bits(calc_num_blocks(num_bits), Block(0), alloc), + m_num_bits(num_bits) +{ + + if (num_bits == 0) + return; + + typedef unsigned long num_type; + + // cut off all bits in value that have pos >= num_bits, if any + if (num_bits < static_cast(ulong_width)) { + const num_type mask = (num_type(1) << num_bits) - 1; + value &= mask; + } + + if (bits_per_block >= ulong_width) { + m_bits[0] = static_cast(value); + } + else { + for(size_type i = 0; value != 0; ++i) { + + m_bits[i] = static_cast(value); + value >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(bits_per_block); + } + } + +} + +// copy constructor +template +inline dynamic_bitset:: +dynamic_bitset(const dynamic_bitset& b) + : m_bits(b.m_bits), m_num_bits(b.m_num_bits) // [gps] +{ + +} + +template +inline dynamic_bitset:: +~dynamic_bitset() +{ + assert(m_check_invariants()); +} + +template +inline void dynamic_bitset:: +swap(dynamic_bitset& b) // no throw +{ + std::swap(m_bits, b.m_bits); + std::swap(m_num_bits, b.m_num_bits); +} + +template +dynamic_bitset& dynamic_bitset:: +operator=(const dynamic_bitset& b) +{ +#if 0 // gps + dynamic_bitset tmp(b); + this->swap(tmp); + return *this; +#else + m_bits = b.m_bits; + m_num_bits = b.m_num_bits; + return *this; +#endif +} + +template +inline typename dynamic_bitset::allocator_type +dynamic_bitset::get_allocator() const +{ + return m_bits.get_allocator(); +} + +//----------------------------------------------------------------------------- +// size changing operations + +template +void dynamic_bitset:: +resize(size_type num_bits, bool value) // strong guarantee +{ + + const size_type old_num_blocks = num_blocks(); + const size_type required_blocks = calc_num_blocks(num_bits); + + const block_type v = value? ~Block(0) : Block(0); + + if (required_blocks != old_num_blocks) { + m_bits.resize(required_blocks, v); // s.g. (copy) [gps] + } + + + // At this point: + // + // - if the buffer was shrunk, there's nothing to do, except + // a call to m_zero_unused_bits() + // + // - if it it is enlarged, all the (used) bits in the new blocks have + // the correct value, but we should also take care of the bits, + // if any, that were 'unused bits' before enlarging: if value == true, + // they must be set. + + if (value && (num_bits > m_num_bits)) { + + const size_type extra_bits = count_extra_bits(); // gps + if (extra_bits) { + assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size()); + + // Set them. + m_bits[old_num_blocks - 1] |= (v << extra_bits); // gps + } + + } + + + + m_num_bits = num_bits; + m_zero_unused_bits(); + +} + +template +void dynamic_bitset:: +clear() // no throw +{ + m_bits.clear(); + m_num_bits = 0; +} + + +template +void dynamic_bitset:: +push_back(bool bit) +{ + resize(size() + 1); + set(size() - 1, bit); +} + +template +void dynamic_bitset:: +append(Block value) // strong guarantee +{ + // G.P.S. to be reviewed... + + const block_width_type r = count_extra_bits(); + + if (r == 0) { + // the buffer is empty, or all blocks are filled + m_bits.push_back(value); + } + else { + m_bits.push_back(value >> (bits_per_block - r)); + m_bits[m_bits.size() - 2] |= (value << r); // m_bits.size() >= 2 + } + + m_num_bits += bits_per_block; + assert(m_check_invariants()); + +} + + +//----------------------------------------------------------------------------- +// bitset operations +template +dynamic_bitset& +dynamic_bitset::operator&=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] &= rhs.m_bits[i]; + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::operator|=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] |= rhs.m_bits[i]; + //m_zero_unused_bits(); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::operator^=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < this->num_blocks(); ++i) + m_bits[i] ^= rhs.m_bits[i]; + //m_zero_unused_bits(); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::operator-=(const dynamic_bitset& rhs) +{ + assert(size() == rhs.size()); + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] &= ~rhs.m_bits[i]; + //m_zero_unused_bits(); + return *this; +} + +// +// NOTE: +// Note that the 'if (r != 0)' is crucial to avoid undefined +// behavior when the left hand operand of >> isn't promoted to a +// wider type (because rs would be too large). +// +template +dynamic_bitset& +dynamic_bitset::operator<<=(size_type n) +{ + if (n >= m_num_bits) + return reset(); + //else + if (n > 0) { + + size_type const last = num_blocks() - 1; // num_blocks() is >= 1 + size_type const div = n / bits_per_block; // div is <= last + block_width_type const r = bit_index(n); + block_type * const b = &m_bits[0]; + + if (r != 0) { + + block_width_type const rs = bits_per_block - r; + + for (size_type i = last-div; i>0; --i) { + b[i+div] = (b[i] << r) | (b[i-1] >> rs); + } + b[div] = b[0] << r; + + } + else { + for (size_type i = last-div; i>0; --i) { + b[i+div] = b[i]; + } + b[div] = b[0]; + } + + + // zero out div blocks at the less significant end + std::fill_n(b, div, static_cast(0)); + + // zero out any 1 bit that flowed into the unused part + m_zero_unused_bits(); // thanks to Lester Gong + + + } + + return *this; + + +} + + +// +// NOTE: +// see the comments to operator <<= +// +template +dynamic_bitset & dynamic_bitset::operator>>=(size_type n) { + if (n >= m_num_bits) { + return reset(); + } + //else + if (n>0) { + + size_type const last = num_blocks() - 1; // num_blocks() is >= 1 + size_type const div = n / bits_per_block; // div is <= last + block_width_type const r = bit_index(n); + block_type * const b = &m_bits[0]; + + + if (r != 0) { + + block_width_type const ls = bits_per_block - r; + + for (size_type i = div; i < last; ++i) { + b[i-div] = (b[i] >> r) | (b[i+1] << ls); + } + // r bits go to zero + b[last-div] = b[last] >> r; + } + + else { + for (size_type i = div; i <= last; ++i) { + b[i-div] = b[i]; + } + // note the '<=': the last iteration 'absorbs' + // b[last-div] = b[last] >> 0; + } + + + + // div blocks are zero filled at the most significant end + std::fill_n(b + (num_blocks()-div), div, static_cast(0)); + } + + return *this; +} + + +template +dynamic_bitset +dynamic_bitset::operator<<(size_type n) const +{ + dynamic_bitset r(*this); + return r <<= n; +} + +template +dynamic_bitset +dynamic_bitset::operator>>(size_type n) const +{ + dynamic_bitset r(*this); + return r >>= n; +} + + +//----------------------------------------------------------------------------- +// basic bit operations + +template +dynamic_bitset& +dynamic_bitset::set(size_type pos, bool val) +{ + // [gps] + // + // Below we have no set(size_type) function to call when + // value == true; instead of using a helper, I think + // overloading set (rather than giving it a default bool + // argument) would be more elegant. + + assert(pos < m_num_bits); + + if (val) + m_bits[block_index(pos)] |= bit_mask(pos); + else + reset(pos); + + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::set() +{ + std::fill(m_bits.begin(), m_bits.end(), ~Block(0)); + m_zero_unused_bits(); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::reset(size_type pos) +{ + assert(pos < m_num_bits); + #if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x + // CodeWarrior 8 generates incorrect code when the &=~ is compiled, + // use the |^ variation instead.. + m_bits[block_index(pos)] |= bit_mask(pos); + m_bits[block_index(pos)] ^= bit_mask(pos); + #else + m_bits[block_index(pos)] &= ~bit_mask(pos); + #endif + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::reset() +{ + std::fill(m_bits.begin(), m_bits.end(), Block(0)); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::flip(size_type pos) +{ + assert(pos < m_num_bits); + m_bits[block_index(pos)] ^= bit_mask(pos); + return *this; +} + +template +dynamic_bitset& +dynamic_bitset::flip() +{ + for (size_type i = 0; i < num_blocks(); ++i) + m_bits[i] = ~m_bits[i]; + m_zero_unused_bits(); + return *this; +} + +template +bool dynamic_bitset::m_unchecked_test(size_type pos) const +{ + return (m_bits[block_index(pos)] & bit_mask(pos)) != 0; +} + +template +bool dynamic_bitset::test(size_type pos) const +{ + assert(pos < m_num_bits); + return m_unchecked_test(pos); +} + +template +bool dynamic_bitset::any() const +{ + for (size_type i = 0; i < num_blocks(); ++i) + if (m_bits[i]) + return true; + return false; +} + +template +inline bool dynamic_bitset::none() const +{ + return !any(); +} + +template +dynamic_bitset +dynamic_bitset::operator~() const +{ + dynamic_bitset b(*this); + b.flip(); + return b; +} + + +/* + +The following is the straightforward implementation of count(), which +we leave here in a comment for documentation purposes. + +template +typename dynamic_bitset::size_type +dynamic_bitset::count() const +{ + size_type sum = 0; + for (size_type i = 0; i != this->m_num_bits; ++i) + if (test(i)) + ++sum; + return sum; +} + +The actual algorithm uses a lookup table. + + + The basic idea of the method is to pick up X bits at a time + from the internal array of blocks and consider those bits as + the binary representation of a number N. Then, to use a table + of 1<= CHAR_BIT and Block has no padding bits (that would be counted + together with the "real ones" if we saw the array as array of bytes). + Otherwise we simply 'extract' X bits at a time from each Block. + +*/ + + +template +typename dynamic_bitset::size_type +dynamic_bitset::count() const +{ + using namespace detail::dynamic_bitset_count_impl; + + const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block); + const bool enough_table_width = table_width >= CHAR_BIT; + + typedef mode_to_type< (no_padding && enough_table_width ? + access_by_bytes : access_by_blocks) > m; + + return do_count(m_bits.begin(), num_blocks(), Block(0), static_cast(0)); + +} + + +//----------------------------------------------------------------------------- +// conversions + + +template +void to_string_helper(const dynamic_bitset & b, stringT & s, + bool dump_all) +{ + typedef typename stringT::traits_type Tr; + typedef typename stringT::value_type Ch; + + BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, std::locale()); + const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); + const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + // Note that this function may access (when + // dump_all == true) bits beyond position size() - 1 + + typedef typename dynamic_bitset::size_type size_type; + + const size_type len = dump_all? + dynamic_bitset::bits_per_block * b.num_blocks(): + b.size(); + s.assign (len, zero); + + for (size_type i = 0; i < len; ++i) { + if (b.m_unchecked_test(i)) + Tr::assign(s[len - 1 - i], one); + + } + +} + + +// A comment similar to the one about the constructor from +// basic_string can be done here. Thanks to James Kanze for +// making me (Gennaro) realize this important separation of +// concerns issue, as well as many things about i18n. +// +template // G.P.S. +inline void +to_string(const dynamic_bitset& b, stringT& s) +{ + to_string_helper(b, s, false); +} + + +// Differently from to_string this function dumps out +// every bit of the internal representation (may be +// useful for debugging purposes) +// +template +inline void +dump_to_string(const dynamic_bitset& b, stringT& s) // G.P.S. +{ + to_string_helper(b, s, true /* =dump_all*/); +} + +template +inline void +to_block_range(const dynamic_bitset& b, + BlockOutputIterator result) +{ + // note how this copies *all* bits, including the + // unused ones in the last block (which are zero) + std::copy(b.m_bits.begin(), b.m_bits.end(), result); // [gps] +} + +template +unsigned long dynamic_bitset:: +to_ulong() const +{ + + if (m_num_bits == 0) + return 0; // convention + + // Check for overflows. This may be a performance burden on very + // large bitsets but is required by the specification, sorry + if (find_next(ulong_width - 1) != npos) + throw std::overflow_error("boost::dynamic_bitset::to_ulong overflow"); + + + // Ok, from now on we can be sure there's no "on" bit beyond + // the allowed positions + + if (bits_per_block >= ulong_width) + return m_bits[0]; + + + size_type last_block = block_index((std::min)(m_num_bits-1, // gps + (size_type)(ulong_width-1))); + unsigned long result = 0; + for (size_type i = 0; i <= last_block; ++i) { + + assert((size_type)bits_per_block * i < (size_type)ulong_width); // gps + + unsigned long piece = m_bits[i]; + result |= (piece << (bits_per_block * i)); + } + + return result; + +} + + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::size() const +{ + return m_num_bits; +} + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::num_blocks() const +{ + return m_bits.size(); +} + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::max_size() const +{ + // Semantics of vector<>::max_size() aren't very clear + // (see lib issue 197) and many library implementations + // simply return dummy values, _unrelated_ to the underlying + // allocator. + // + // Given these problems, I was tempted to not provide this + // function at all but the user could need it if he provides + // his own allocator. + // + + const size_type m = detail::vector_max_size_workaround(m_bits); + + return m <= (size_type(-1)/bits_per_block) ? + m * bits_per_block : + size_type(-1); +} + +template +inline bool dynamic_bitset::empty() const +{ + return size() == 0; +} + +#if 0 // gps +template +inline void dynamic_bitset::reserve(size_type n) +{ + assert(n <= max_size()); // PRE - G.P.S. + m_bits.reserve(calc_num_blocks(n)); +} + +template +typename dynamic_bitset::size_type +dynamic_bitset::capacity() const +{ + // capacity is m_bits.capacity() * bits_per_block + // unless that one overflows + const size_type m = static_cast(-1); + const size_type q = m / bits_per_block; + + const size_type c = m_bits.capacity(); + + return c <= q ? + c * bits_per_block : + m; +} +#endif + +template +bool dynamic_bitset:: +is_subset_of(const dynamic_bitset& a) const +{ + assert(size() == a.size()); + for (size_type i = 0; i < num_blocks(); ++i) + if (m_bits[i] & ~a.m_bits[i]) + return false; + return true; +} + +template +bool dynamic_bitset:: +is_proper_subset_of(const dynamic_bitset& a) const +{ + assert(size() == a.size()); + bool proper = false; + for (size_type i = 0; i < num_blocks(); ++i) { + Block bt = m_bits[i], ba = a.m_bits[i]; + if (ba & ~bt) + proper = true; + if (bt & ~ba) + return false; + } + return proper; +} + +template +bool dynamic_bitset::intersects(const dynamic_bitset & b) const +{ + size_type common_blocks = num_blocks() < b.num_blocks() + ? num_blocks() : b.num_blocks(); + + for(size_type i = 0; i < common_blocks; ++i) { + if(m_bits[i] & b.m_bits[i]) + return true; + } + return false; +} + +// -------------------------------- +// lookup + + +// look for the first bit "on", starting +// from the block with index first_block +// +template +typename dynamic_bitset::size_type +dynamic_bitset::m_do_find_from(size_type first_block) const +{ + size_type i = first_block; + + // skip null blocks + while (i < num_blocks() && m_bits[i] == 0) + ++i; + + if (i >= num_blocks()) + return npos; // not found + + return i * bits_per_block + boost::lowest_bit(m_bits[i]); + +} + + +template +typename dynamic_bitset::size_type +dynamic_bitset::find_first() const +{ + return m_do_find_from(0); +} + + +template +typename dynamic_bitset::size_type +dynamic_bitset::find_next(size_type pos) const +{ + + const size_type sz = size(); + if (pos >= (sz-1) || sz == 0) + return npos; + + ++pos; + + const size_type blk = block_index(pos); + const block_width_type ind = bit_index(pos); + + // mask out bits before pos + const Block fore = m_bits[blk] & ( ~Block(0) << ind ); + + return fore? + blk * bits_per_block + lowest_bit(fore) + : + m_do_find_from(blk + 1); + +} + + + +//----------------------------------------------------------------------------- +// comparison + +template +bool operator==(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return (a.m_num_bits == b.m_num_bits) + && (a.m_bits == b.m_bits); // [gps] +} + +template +inline bool operator!=(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return !(a == b); +} + +template +bool operator<(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + assert(a.size() == b.size()); + typedef typename dynamic_bitset::size_type size_type; + + if (a.size() == 0) + return false; + + // Since we are storing the most significant bit + // at pos == size() - 1, we need to do the comparisons in reverse. + + // Compare a block at a time + for (size_type i = a.num_blocks() - 1; i > 0; --i) + if (a.m_bits[i] < b.m_bits[i]) + return true; + else if (a.m_bits[i] > b.m_bits[i]) + return false; + + if (a.m_bits[0] < b.m_bits[0]) + return true; + else + return false; +} + +template +inline bool operator<=(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return !(a > b); +} + +template +inline bool operator>(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return b < a; +} + +template +inline bool operator>=(const dynamic_bitset& a, + const dynamic_bitset& b) +{ + return !(a < b); +} + +//----------------------------------------------------------------------------- +// stream operations + +#ifdef BOOST_OLD_IOSTREAMS +template < typename Block, typename Alloc> +std::ostream& +operator<<(std::ostream& os, const dynamic_bitset& b) +{ + // NOTE: since this is aimed at "classic" iostreams, exception + // masks on the stream are not supported. The library that + // ships with gcc 2.95 has an exceptions() member function but + // nothing is actually implemented; not even the class ios::failure. + + using namespace std; + + const ios::iostate ok = ios::goodbit; + ios::iostate err = ok; + + if (os.opfx()) { // gps + + //try + typedef typename dynamic_bitset::size_type bitsetsize_type; + + const bitsetsize_type sz = b.size(); + std::streambuf * buf = os.rdbuf(); + size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0) + || (bitsetsize_type) os.width() <= sz? 0 : os.width() - sz; //- gps + + const char fill_char = os.fill(); + const ios::fmtflags adjustfield = os.flags() & ios::adjustfield; + + // if needed fill at left; pad is decresed along the way + if (adjustfield != ios::left) { + for (; 0 < npad; --npad) + if (fill_char != buf->sputc(fill_char)) { + err |= ios::failbit; // gps + break; + } + } + + if (err == ok) { + // output the bitset + for (bitsetsize_type i = b.size(); 0 < i; --i) {// G.P.S. + const char dig = b.test(i-1)? '1' : '0'; + if (EOF == buf->sputc(dig)) { // ok?? gps + err |= ios::failbit; + break; + } + } + } + + if (err == ok) { + // if needed fill at right + for (; 0 < npad; --npad) { + if (fill_char != buf->sputc(fill_char)) { + err |= ios::failbit; + break; + } + } + } + + os.osfx(); + os.width(0); + + } // if opfx + + if(err != ok) + os.setstate(err); // assume this does NOT throw - gps + return os; + +} +#else + +template +std::basic_ostream& +operator<<(std::basic_ostream& os, + const dynamic_bitset& b) +{ + + using namespace std; + + const ios_base::iostate ok = ios_base::goodbit; + ios_base::iostate err = ok; + + typename basic_ostream::sentry cerberos(os); + if (cerberos) { + + BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, os.getloc()); + const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); + const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + try { + + typedef typename dynamic_bitset::size_type bitsetsize_type; + typedef basic_streambuf buffer_type; // G.P.S. + + buffer_type * buf = os.rdbuf(); + size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0) + || (bitsetsize_type) os.width() <= b.size()? 0 : os.width() - b.size(); //- G.P.S. + + const Ch fill_char = os.fill(); + const ios_base::fmtflags adjustfield = os.flags() & ios_base::adjustfield; + + // if needed fill at left; pad is decresed along the way + if (adjustfield != ios_base::left) { + for (; 0 < npad; --npad) + if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) { + err |= ios_base::failbit; // G.P.S. + break; + } + } + + if (err == ok) { + // output the bitset + for (bitsetsize_type i = b.size(); 0 < i; --i) {// G.P.S. + typename buffer_type::int_type + ret = buf->sputc(b.test(i-1)? one : zero); + if (Tr::eq_int_type(Tr::eof(), ret)) { + err |= ios_base::failbit; + break; + } + } + } + + if (err == ok) { + // if needed fill at right + for (; 0 < npad; --npad) { + if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) { + err |= ios_base::failbit; + break; + } + } + } + + + os.width(0); + + } catch (...) { // see std 27.6.1.1/4 + bool rethrow = false; + try { os.setstate(ios_base::failbit); } catch (...) { rethrow = true; } + + if (rethrow) + throw; + } + } + + if(err != ok) + os.setstate(err); // may throw exception + return os; + +} +#endif + + +#ifdef BOOST_OLD_IOSTREAMS + + // gps - A sentry-like class that calls isfx in its + // destructor. Necessary because bit_appender::do_append may throw. + class pseudo_sentry { + std::istream & m_r; + const bool m_ok; + public: + explicit pseudo_sentry(std::istream & r) : m_r(r), m_ok(r.ipfx(0)) { } + ~pseudo_sentry() { m_r.isfx(); } + operator bool() const { return m_ok; } + }; + +template +std::istream& +operator>>(std::istream& is, dynamic_bitset& b) +{ + +// Extractor for classic IO streams (libstdc++ < 3.0) +// ----------------------------------------------------// +// It's assumed that the stream buffer functions, and +// the stream's setstate() _cannot_ throw. + + + typedef dynamic_bitset bitset_type; + typedef typename bitset_type::size_type size_type; + + std::ios::iostate err = std::ios::goodbit; // gps + pseudo_sentry cerberos(is); // skips whitespaces + if(cerberos) { + + b.clear(); + + const std::streamsize w = is.width(); + const size_type limit = w > 0 && static_cast(w) < b.max_size()// gps + ? w : b.max_size(); + typename bitset_type::bit_appender appender(b); + std::streambuf * buf = is.rdbuf(); + for(int c = buf->sgetc(); appender.get_count() < limit; c = buf->snextc() ) { + + if (c == EOF) { + err |= std::ios::eofbit; // G.P.S. + break; + } + else if (char(c) != '0' && char(c) != '1') + break; // non digit character + + else { + try { + //throw std::bad_alloc(); // gps + appender.do_append(char(c) == '1'); + } + catch(...) { + is.setstate(std::ios::failbit); // assume this can't throw + throw; + } + } + + } // for + } + + is.width(0); // gps + if (b.size() == 0) + err |= std::ios::failbit; + if (err != std::ios::goodbit) // gps + is.setstate (err); // may throw + + return is; +} + +#else // BOOST_OLD_IOSTREAMS + +template +std::basic_istream& +operator>>(std::basic_istream& is, dynamic_bitset& b) +{ + + using namespace std; + + typedef dynamic_bitset bitset_type; + typedef typename bitset_type::size_type size_type; + + const streamsize w = is.width(); + const size_type limit = 0 < w && static_cast(w) < b.max_size()? // gps + w : b.max_size(); + + ios_base::iostate err = ios_base::goodbit; // gps + typename basic_istream::sentry cerberos(is); // skips whitespaces + if(cerberos) { + + // in accordance with prop. resol. of lib DR 303 [last checked 4 Feb 2004] + BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, is.getloc()); + const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); + const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); + + b.clear(); + try { + typename bitset_type::bit_appender appender(b); + basic_streambuf * buf = is.rdbuf(); + typename Tr::int_type c = buf->sgetc(); // G.P.S. + for( ; appender.get_count() < limit; c = buf->snextc() ) { + + if (Tr::eq_int_type(Tr::eof(), c)) { + err |= ios_base::eofbit; // G.P.S. + break; + } + else { + const Ch to_c = Tr::to_char_type(c); + const bool is_one = Tr::eq(to_c, one); + + if (!is_one && !Tr::eq(to_c, zero)) + break; // non digit character + + appender.do_append(is_one); + + } + + } // for + } + catch (...) { + // catches from stream buf, or from vector: + // + // bits_stored bits have been extracted and stored, and + // either no further character is extractable or we can't + // append to the underlying vector (out of memory) gps + + bool rethrow = false; // see std 27.6.1.1/4 + try { is.setstate(ios_base::badbit); } + catch(...) { rethrow = true; } + + if (rethrow) + throw; + + } + } + + is.width(0); // gps + if (b.size() == 0 /*|| !cerberos*/) + err |= ios_base::failbit; + if (err != ios_base::goodbit) // gps + is.setstate (err); // may throw + + return is; + +} + + +#endif + + +//----------------------------------------------------------------------------- +// bitset operations + +template +dynamic_bitset +operator&(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b &= y; +} + +template +dynamic_bitset +operator|(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b |= y; +} + +template +dynamic_bitset +operator^(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b ^= y; +} + +template +dynamic_bitset +operator-(const dynamic_bitset& x, + const dynamic_bitset& y) +{ + dynamic_bitset b(x); + return b -= y; +} + +//----------------------------------------------------------------------------- +// namespace scope swap + +template +inline void +swap(dynamic_bitset& left, + dynamic_bitset& right) // no throw +{ + left.swap(right); // gps +} + + +//----------------------------------------------------------------------------- +// private (on conforming compilers) member functions + + +template +inline typename dynamic_bitset::size_type +dynamic_bitset::calc_num_blocks(size_type num_bits) +{ + return num_bits / bits_per_block + + static_cast( num_bits % bits_per_block != 0 ); +} + +// gives a reference to the highest block +// +template +inline Block& dynamic_bitset::m_highest_block() +{ + return const_cast + (static_cast(this)->m_highest_block()); +} + +// gives a const-reference to the highest block +// +template +inline const Block& dynamic_bitset::m_highest_block() const +{ + assert(size() > 0 && num_blocks() > 0); + return m_bits.back(); +} + + +// If size() is not a multiple of bits_per_block +// then not all the bits in the last block are used. +// This function resets the unused bits (convenient +// for the implementation of many member functions) +// +template +inline void dynamic_bitset::m_zero_unused_bits() +{ + assert (num_blocks() == calc_num_blocks(m_num_bits)); + + // if != 0 this is the number of bits used in the last block + const block_width_type extra_bits = count_extra_bits(); + + if (extra_bits != 0) + m_highest_block() &= ~(~static_cast(0) << extra_bits); + +} + +// check class invariants +template +bool dynamic_bitset::m_check_invariants() const +{ + const block_width_type extra_bits = count_extra_bits(); + if (extra_bits > 0) { + block_type const mask = (~static_cast(0) << extra_bits); + if ((m_highest_block() & mask) != 0) + return false; + } + if (m_bits.size() > m_bits.capacity() || num_blocks() != calc_num_blocks(size())) + return false; + + return true; + +} + + +} // namespace boost + + +#undef BOOST_BITSET_CHAR + +#endif // include guard + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/detail/iterator.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/detail/iterator.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,128 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_ITERATOR_HPP +#define BOOST_RANGE_ITERATOR_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +#include + +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#include +#else + +#include +#include +#include + +namespace boost +{ + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + template< typename C > + struct range_iterator + { + typedef BOOST_DEDUCED_TYPENAME C::iterator type; + }; + + ////////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + struct range_iterator< std::pair > + { + typedef Iterator type; + }; + + template< typename Iterator > + struct range_iterator< const std::pair > + { + typedef Iterator type; + }; + + ////////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////////// + + template< typename T, std::size_t sz > + struct range_iterator< T[sz] > + { + typedef T* type; + }; + + template< typename T, std::size_t sz > + struct range_iterator< const T[sz] > + { + typedef const T* type; + }; + + ////////////////////////////////////////////////////////////////////////// + // string + ////////////////////////////////////////////////////////////////////////// + + template<> + struct range_iterator< char* > + { + typedef char* type; + }; + + template<> + struct range_iterator< wchar_t* > + { + typedef wchar_t* type; + }; + + template<> + struct range_iterator< const char* > + { + typedef const char* type; + }; + + template<> + struct range_iterator< const wchar_t* > + { + typedef const wchar_t* type; + }; + + template<> + struct range_iterator< char* const > + { + typedef char* type; + }; + + template<> + struct range_iterator< wchar_t* const > + { + typedef wchar_t* type; + }; + + template<> + struct range_iterator< const char* const > + { + typedef const char* type; + }; + + template<> + struct range_iterator< const wchar_t* const > + { + typedef const wchar_t* type; + }; + +} // namespace boost + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/detail/workaround.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/detail/workaround.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,19 @@ + +#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED +#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2002-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/config/workaround.hpp,v $ +// $Date: 2004/09/02 15:40:45 $ +// $Revision: 1.3 $ + +#include + +#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/dynamic_bitset/dynamic_bitset.hpp --- a/epoc32/include/stdapis/boost/dynamic_bitset/dynamic_bitset.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1800 +0,0 @@ -// -------------------------------------------------- -// -// (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002. -// (C) Copyright Gennaro Prota 2003 - 2004. -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// ----------------------------------------------------------- - -// See http://www.boost.org/libs/dynamic_bitset for documentation. - - - -#ifndef BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP -#define BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP - -#include -#include -#include // for std::overflow_error -#include // for std::swap, std::min, std::copy, std::fill -#include -#include // for CHAR_BIT - -#include "boost/dynamic_bitset/config.hpp" - -#ifndef BOOST_NO_STD_LOCALE -# include // G.P.S -#endif - -#if defined(BOOST_OLD_IOSTREAMS) -# include -# include // for isspace -#else -# include -# include -#endif - -#include "boost/dynamic_bitset_fwd.hpp" -#include "boost/detail/dynamic_bitset.hpp" -#include "boost/detail/iterator.hpp" // used to implement append(Iter, Iter) -#include "boost/static_assert.hpp" -#include "boost/limits.hpp" -#include "boost/pending/lowest_bit.hpp" // used by find_first/next - - -namespace boost { - -template - -#if defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1300) // 1300 == VC++ 7.0 - // VC++ (up to 7.0) wants the default arguments again - > -# else - -# endif - -class dynamic_bitset -{ - // Portability note: member function templates are defined inside - // this class definition to avoid problems with VC++. Similarly, - // with the member functions of nested classes. - - BOOST_STATIC_ASSERT(detail::dynamic_bitset_allowed_block_type::value); - -public: - typedef Block block_type; - typedef Allocator allocator_type; - typedef std::size_t size_type; - typedef int block_width_type; // gps - - BOOST_STATIC_CONSTANT(block_width_type, bits_per_block = (std::numeric_limits::digits)); - BOOST_STATIC_CONSTANT(size_type, npos = static_cast(-1)); - - -public: - - // A proxy class to simulate lvalues of bit type. - // Shouldn't it be private? [gps] - // - class reference - { - friend class dynamic_bitset; - - - // the one and only non-copy ctor - reference(block_type & b, int pos) - :m_block(b), m_mask(block_type(1) << pos) - {} - - void operator&(); // left undefined - - public: - - // copy constructor: compiler generated - - operator bool() const { return (m_block & m_mask) != 0; } - bool operator~() const { return (m_block & m_mask) == 0; } - - reference& flip() { do_flip(); return *this; } - - reference& operator=(bool x) { do_assign(x); return *this; } // for b[i] = x - reference& operator=(const reference& rhs) { do_assign(rhs); return *this; } // for b[i] = b[j] - - reference& operator|=(bool x) { if (x) do_set(); return *this; } - reference& operator&=(bool x) { if (!x) do_reset(); return *this; } - reference& operator^=(bool x) { if (x) do_flip(); return *this; } - reference& operator-=(bool x) { if (x) do_reset(); return *this; } - - private: - block_type & m_block; - const block_type m_mask; - - void do_set() { m_block |= m_mask; } - void do_reset() { m_block &= ~m_mask; } - void do_flip() { m_block ^= m_mask; } - void do_assign(bool x) { x? do_set() : do_reset(); } - }; - - typedef bool const_reference; - - // constructors, etc. - explicit - dynamic_bitset(const Allocator& alloc = Allocator()); - - explicit - dynamic_bitset(size_type num_bits, unsigned long value = 0, - const Allocator& alloc = Allocator()); - - - // The presence of this constructor is a concession to ease of - // use, especially for the novice user. A conversion from string - // is, in most cases, formatting, and should be done by the standard - // formatting convention: operator>>. - // - // NOTE: - // Leave the parentheses around std::basic_string::npos. - // g++ 3.2 requires them and probably the standard will - see core issue 325 - // NOTE 2: - // split into two constructors because of bugs in MSVC 6.0sp5 with STLport - - template - dynamic_bitset(const std::basic_string& s, - typename std::basic_string::size_type pos, - typename std::basic_string::size_type n, - size_type num_bits = npos, - const Allocator& alloc = Allocator()) - - :m_bits(alloc), - m_num_bits(0) - { - init_from_string(s, pos, n, num_bits, alloc); - } - - template - explicit - dynamic_bitset(const std::basic_string& s, - typename std::basic_string::size_type pos = 0) - - :m_bits(Allocator()), - m_num_bits(0) - { - init_from_string(s, pos, (std::basic_string::npos), - npos, Allocator()); - } - - // The first bit in *first is the least significant bit, and the - // last bit in the block just before *last is the most significant bit. - template - dynamic_bitset(BlockInputIterator first, BlockInputIterator last, - const Allocator& alloc = Allocator()) - - :m_bits(first, last, alloc), - m_num_bits(m_bits.size() * bits_per_block) - {} - - - // copy constructor - dynamic_bitset(const dynamic_bitset& b); - - ~dynamic_bitset(); - - void swap(dynamic_bitset& b); - dynamic_bitset& operator=(const dynamic_bitset& b); - - allocator_type get_allocator() const; - - // size changing operations - void resize(size_type num_bits, bool value = false); - void clear(); - void push_back(bool bit); - void append(Block block); - - template - void m_append(BlockInputIterator first, BlockInputIterator last, std::input_iterator_tag) - { - std::vector v(first, last); - m_append(v.begin(), v.end(), std::random_access_iterator_tag()); - } - template - void m_append(BlockInputIterator first, BlockInputIterator last, std::forward_iterator_tag) - { - assert(first != last); - block_width_type r = count_extra_bits(); - std::size_t d = boost::detail::distance(first, last); - m_bits.reserve(num_blocks() + d); - if (r == 0) { - for( ; first != last; ++first) - m_bits.push_back(*first); // could use vector<>::insert() - } - else { - m_highest_block() |= (*first << r); - do { - Block b = *first >> (bits_per_block - r); - ++first; - m_bits.push_back(b | (first==last? 0 : *first << r)); - } while (first != last); - } - m_num_bits += bits_per_block * d; - } - template - void append(BlockInputIterator first, BlockInputIterator last) // strong guarantee - { - if (first != last) { - typename detail::iterator_traits::iterator_category cat; - m_append(first, last, cat); - } - } - - - // bitset operations - dynamic_bitset& operator&=(const dynamic_bitset& b); - dynamic_bitset& operator|=(const dynamic_bitset& b); - dynamic_bitset& operator^=(const dynamic_bitset& b); - dynamic_bitset& operator-=(const dynamic_bitset& b); - dynamic_bitset& operator<<=(size_type n); - dynamic_bitset& operator>>=(size_type n); - dynamic_bitset operator<<(size_type n) const; - dynamic_bitset operator>>(size_type n) const; - - // basic bit operations - dynamic_bitset& set(size_type n, bool val = true); - dynamic_bitset& set(); - dynamic_bitset& reset(size_type n); - dynamic_bitset& reset(); - dynamic_bitset& flip(size_type n); - dynamic_bitset& flip(); - bool test(size_type n) const; - bool any() const; - bool none() const; - dynamic_bitset operator~() const; - size_type count() const; - - // subscript - reference operator[](size_type pos) { - return reference(m_bits[block_index(pos)], bit_index(pos)); - } - bool operator[](size_type pos) const { return test(pos); } - - unsigned long to_ulong() const; - - size_type size() const; - size_type num_blocks() const; - size_type max_size() const; - bool empty() const; -#if 0 // gps - void reserve(size_type n); - size_type capacity() const; -#endif - - bool is_subset_of(const dynamic_bitset& a) const; - bool is_proper_subset_of(const dynamic_bitset& a) const; - bool intersects(const dynamic_bitset & a) const; - - // lookup - size_type find_first() const; - size_type find_next(size_type pos) const; - - -#if !defined BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS - // lexicographical comparison - template - friend bool operator==(const dynamic_bitset& a, - const dynamic_bitset& b); - - template - friend bool operator<(const dynamic_bitset& a, - const dynamic_bitset& b); - - - template - friend void to_block_range(const dynamic_bitset& b, - BlockOutputIterator result); - - template - friend void from_block_range(BlockIterator first, BlockIterator last, - dynamic_bitset& result); - - - template - friend std::basic_istream& operator>>(std::basic_istream& is, - dynamic_bitset& b); - - template - friend void to_string_helper(const dynamic_bitset & b, stringT & s, bool dump_all); - - -#endif - - -private: - BOOST_STATIC_CONSTANT(block_width_type, ulong_width = std::numeric_limits::digits); - typedef std::vector buffer_type; - - void m_zero_unused_bits(); - bool m_check_invariants() const; - - size_type m_do_find_from(size_type first_block) const; - - block_width_type count_extra_bits() const { return bit_index(size()); } - static size_type block_index(size_type pos) { return pos / bits_per_block; } - static block_width_type bit_index(size_type pos) { return static_cast(pos % bits_per_block); } - static Block bit_mask(size_type pos) { return Block(1) << bit_index(pos); } - - template - void init_from_string(const std::basic_string& s, - typename std::basic_string::size_type pos, - typename std::basic_string::size_type n, - size_type num_bits, - const Allocator& alloc) - { - assert(pos <= s.size()); - - typedef typename std::basic_string StrT; - typedef typename StrT::traits_type Tr; - - const typename StrT::size_type rlen = (std::min)(n, s.size() - pos); // gps - const size_type sz = ( num_bits != npos? num_bits : rlen); - m_bits.resize(calc_num_blocks(sz)); - m_num_bits = sz; - - - BOOST_DYNAMIC_BITSET_CTYPE_FACET(CharT, fac, std::locale()); - const CharT one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); - - const size_type m = num_bits < rlen ? num_bits : rlen; // [gps] - typename StrT::size_type i = 0; - for( ; i < m; ++i) { - - const CharT c = s[(pos + m - 1) - i]; - - assert( Tr::eq(c, one) - || Tr::eq(c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0')) ); - - if (Tr::eq(c, one)) - set(i); - - } - - } - -BOOST_DYNAMIC_BITSET_PRIVATE: - - bool m_unchecked_test(size_type pos) const; - static size_type calc_num_blocks(size_type num_bits); - - Block& m_highest_block(); - const Block& m_highest_block() const; - - buffer_type m_bits; // [gps] to be renamed - size_type m_num_bits; - - - class bit_appender; - friend class bit_appender; - class bit_appender { - // helper for stream >> - // Supplies to the lack of an efficient append at the less - // significant end: bits are actually appended "at left" but - // rearranged in the destructor. Everything works just as if - // dynamic_bitset<> had an append_at_right() function (which - // threw, in case, the same exceptions as push_back) except - // that the function is actually called bit_appender::do_append(). - // - dynamic_bitset & bs; - size_type n; - Block mask; - Block * current; - public: - bit_appender(dynamic_bitset & r) : bs(r), n(0), mask(0), current(0) {} - ~bit_appender() { - // reverse the order of blocks, shift - // if needed, and then resize - // - std::reverse(bs.m_bits.begin(), bs.m_bits.end()); - const block_width_type offs = bit_index(n); - if (offs) - bs >>= (bits_per_block - offs); - bs.resize(n); // doesn't enlarge, so can't throw - assert(bs.m_check_invariants()); - } - inline void do_append(bool value) { - - if (mask == 0) { - bs.append(Block(0)); - current = &bs.m_highest_block(); - mask = Block(1) << (bits_per_block - 1); - } - - if(value) - *current |= mask; - - mask /= 2; - ++n; - } - size_type get_count() const { return n; } - }; - -}; - -#if BOOST_WORKAROUND( __IBMCPP__, <=600 ) - -// Workaround for IBM's AIX platform. -// See http://comments.gmane.org/gmane.comp.lib.boost.user/15331 - -template -dynamic_bitset::block_width_type const -dynamic_bitset::bits_per_block; - -template -dynamic_bitset::block_width_type const -dynamic_bitset::ulong_width; - -#endif - -// Global Functions: - -// comparison -template -bool operator!=(const dynamic_bitset& a, - const dynamic_bitset& b); - -template -bool operator<=(const dynamic_bitset& a, - const dynamic_bitset& b); - -template -bool operator>(const dynamic_bitset& a, - const dynamic_bitset& b); - -template -bool operator>=(const dynamic_bitset& a, - const dynamic_bitset& b); - -// stream operators -#ifdef BOOST_OLD_IOSTREAMS -template -std::ostream& operator<<(std::ostream& os, - const dynamic_bitset& b); - -template -std::istream& operator>>(std::istream& is, dynamic_bitset& b); -#else -// NOTE: Digital Mars wants the same template parameter names -// here and in the definition! [last tested: 8.48.10] -// -template -std::basic_ostream& -operator<<(std::basic_ostream& os, - const dynamic_bitset& b); - -template -std::basic_istream& -operator>>(std::basic_istream& is, - dynamic_bitset& b); -#endif - -// bitset operations -template -dynamic_bitset -operator&(const dynamic_bitset& b1, - const dynamic_bitset& b2); - -template -dynamic_bitset -operator|(const dynamic_bitset& b1, - const dynamic_bitset& b2); - -template -dynamic_bitset -operator^(const dynamic_bitset& b1, - const dynamic_bitset& b2); - -template -dynamic_bitset -operator-(const dynamic_bitset& b1, - const dynamic_bitset& b2); - -// namespace scope swap -template -void swap(dynamic_bitset& b1, - dynamic_bitset& b2); - - -template -void -to_string(const dynamic_bitset& b, stringT & s); // gps - -template -void -to_block_range(const dynamic_bitset& b, - BlockOutputIterator result); - - -// gps - check docs with Jeremy -// -template -inline void -from_block_range(BlockIterator first, BlockIterator last, - dynamic_bitset& result) -{ - // PRE: distance(first, last) <= numblocks() - std::copy (first, last, result.m_bits.begin()); //[gps] -} - -//============================================================================= -// dynamic_bitset implementation - - -//----------------------------------------------------------------------------- -// constructors, etc. - -template -dynamic_bitset::dynamic_bitset(const Allocator& alloc) - : m_bits(alloc), m_num_bits(0) -{ - -} - -template -dynamic_bitset:: -dynamic_bitset(size_type num_bits, unsigned long value, const Allocator& alloc) - : m_bits(calc_num_blocks(num_bits), Block(0), alloc), - m_num_bits(num_bits) -{ - - if (num_bits == 0) - return; - - typedef unsigned long num_type; - - // cut off all bits in value that have pos >= num_bits, if any - if (num_bits < static_cast(ulong_width)) { - const num_type mask = (num_type(1) << num_bits) - 1; - value &= mask; - } - - if (bits_per_block >= ulong_width) { - m_bits[0] = static_cast(value); - } - else { - for(size_type i = 0; value != 0; ++i) { - - m_bits[i] = static_cast(value); - value >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(bits_per_block); - } - } - -} - -// copy constructor -template -inline dynamic_bitset:: -dynamic_bitset(const dynamic_bitset& b) - : m_bits(b.m_bits), m_num_bits(b.m_num_bits) // [gps] -{ - -} - -template -inline dynamic_bitset:: -~dynamic_bitset() -{ - assert(m_check_invariants()); -} - -template -inline void dynamic_bitset:: -swap(dynamic_bitset& b) // no throw -{ - std::swap(m_bits, b.m_bits); - std::swap(m_num_bits, b.m_num_bits); -} - -template -dynamic_bitset& dynamic_bitset:: -operator=(const dynamic_bitset& b) -{ -#if 0 // gps - dynamic_bitset tmp(b); - this->swap(tmp); - return *this; -#else - m_bits = b.m_bits; - m_num_bits = b.m_num_bits; - return *this; -#endif -} - -template -inline typename dynamic_bitset::allocator_type -dynamic_bitset::get_allocator() const -{ - return m_bits.get_allocator(); -} - -//----------------------------------------------------------------------------- -// size changing operations - -template -void dynamic_bitset:: -resize(size_type num_bits, bool value) // strong guarantee -{ - - const size_type old_num_blocks = num_blocks(); - const size_type required_blocks = calc_num_blocks(num_bits); - - const block_type v = value? ~Block(0) : Block(0); - - if (required_blocks != old_num_blocks) { - m_bits.resize(required_blocks, v); // s.g. (copy) [gps] - } - - - // At this point: - // - // - if the buffer was shrunk, there's nothing to do, except - // a call to m_zero_unused_bits() - // - // - if it it is enlarged, all the (used) bits in the new blocks have - // the correct value, but we should also take care of the bits, - // if any, that were 'unused bits' before enlarging: if value == true, - // they must be set. - - if (value && (num_bits > m_num_bits)) { - - const size_type extra_bits = count_extra_bits(); // gps - if (extra_bits) { - assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size()); - - // Set them. - m_bits[old_num_blocks - 1] |= (v << extra_bits); // gps - } - - } - - - - m_num_bits = num_bits; - m_zero_unused_bits(); - -} - -template -void dynamic_bitset:: -clear() // no throw -{ - m_bits.clear(); - m_num_bits = 0; -} - - -template -void dynamic_bitset:: -push_back(bool bit) -{ - resize(size() + 1); - set(size() - 1, bit); -} - -template -void dynamic_bitset:: -append(Block value) // strong guarantee -{ - // G.P.S. to be reviewed... - - const block_width_type r = count_extra_bits(); - - if (r == 0) { - // the buffer is empty, or all blocks are filled - m_bits.push_back(value); - } - else { - m_bits.push_back(value >> (bits_per_block - r)); - m_bits[m_bits.size() - 2] |= (value << r); // m_bits.size() >= 2 - } - - m_num_bits += bits_per_block; - assert(m_check_invariants()); - -} - - -//----------------------------------------------------------------------------- -// bitset operations -template -dynamic_bitset& -dynamic_bitset::operator&=(const dynamic_bitset& rhs) -{ - assert(size() == rhs.size()); - for (size_type i = 0; i < num_blocks(); ++i) - m_bits[i] &= rhs.m_bits[i]; - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::operator|=(const dynamic_bitset& rhs) -{ - assert(size() == rhs.size()); - for (size_type i = 0; i < num_blocks(); ++i) - m_bits[i] |= rhs.m_bits[i]; - //m_zero_unused_bits(); - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::operator^=(const dynamic_bitset& rhs) -{ - assert(size() == rhs.size()); - for (size_type i = 0; i < this->num_blocks(); ++i) - m_bits[i] ^= rhs.m_bits[i]; - //m_zero_unused_bits(); - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::operator-=(const dynamic_bitset& rhs) -{ - assert(size() == rhs.size()); - for (size_type i = 0; i < num_blocks(); ++i) - m_bits[i] &= ~rhs.m_bits[i]; - //m_zero_unused_bits(); - return *this; -} - -// -// NOTE: -// Note that the 'if (r != 0)' is crucial to avoid undefined -// behavior when the left hand operand of >> isn't promoted to a -// wider type (because rs would be too large). -// -template -dynamic_bitset& -dynamic_bitset::operator<<=(size_type n) -{ - if (n >= m_num_bits) - return reset(); - //else - if (n > 0) { - - size_type const last = num_blocks() - 1; // num_blocks() is >= 1 - size_type const div = n / bits_per_block; // div is <= last - block_width_type const r = bit_index(n); - block_type * const b = &m_bits[0]; - - if (r != 0) { - - block_width_type const rs = bits_per_block - r; - - for (size_type i = last-div; i>0; --i) { - b[i+div] = (b[i] << r) | (b[i-1] >> rs); - } - b[div] = b[0] << r; - - } - else { - for (size_type i = last-div; i>0; --i) { - b[i+div] = b[i]; - } - b[div] = b[0]; - } - - - // zero out div blocks at the less significant end - std::fill_n(b, div, static_cast(0)); - - // zero out any 1 bit that flowed into the unused part - m_zero_unused_bits(); // thanks to Lester Gong - - - } - - return *this; - - -} - - -// -// NOTE: -// see the comments to operator <<= -// -template -dynamic_bitset & dynamic_bitset::operator>>=(size_type n) { - if (n >= m_num_bits) { - return reset(); - } - //else - if (n>0) { - - size_type const last = num_blocks() - 1; // num_blocks() is >= 1 - size_type const div = n / bits_per_block; // div is <= last - block_width_type const r = bit_index(n); - block_type * const b = &m_bits[0]; - - - if (r != 0) { - - block_width_type const ls = bits_per_block - r; - - for (size_type i = div; i < last; ++i) { - b[i-div] = (b[i] >> r) | (b[i+1] << ls); - } - // r bits go to zero - b[last-div] = b[last] >> r; - } - - else { - for (size_type i = div; i <= last; ++i) { - b[i-div] = b[i]; - } - // note the '<=': the last iteration 'absorbs' - // b[last-div] = b[last] >> 0; - } - - - - // div blocks are zero filled at the most significant end - std::fill_n(b + (num_blocks()-div), div, static_cast(0)); - } - - return *this; -} - - -template -dynamic_bitset -dynamic_bitset::operator<<(size_type n) const -{ - dynamic_bitset r(*this); - return r <<= n; -} - -template -dynamic_bitset -dynamic_bitset::operator>>(size_type n) const -{ - dynamic_bitset r(*this); - return r >>= n; -} - - -//----------------------------------------------------------------------------- -// basic bit operations - -template -dynamic_bitset& -dynamic_bitset::set(size_type pos, bool val) -{ - // [gps] - // - // Below we have no set(size_type) function to call when - // value == true; instead of using a helper, I think - // overloading set (rather than giving it a default bool - // argument) would be more elegant. - - assert(pos < m_num_bits); - - if (val) - m_bits[block_index(pos)] |= bit_mask(pos); - else - reset(pos); - - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::set() -{ - std::fill(m_bits.begin(), m_bits.end(), ~Block(0)); - m_zero_unused_bits(); - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::reset(size_type pos) -{ - assert(pos < m_num_bits); - #if BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x - // CodeWarrior 8 generates incorrect code when the &=~ is compiled, - // use the |^ variation instead.. - m_bits[block_index(pos)] |= bit_mask(pos); - m_bits[block_index(pos)] ^= bit_mask(pos); - #else - m_bits[block_index(pos)] &= ~bit_mask(pos); - #endif - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::reset() -{ - std::fill(m_bits.begin(), m_bits.end(), Block(0)); - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::flip(size_type pos) -{ - assert(pos < m_num_bits); - m_bits[block_index(pos)] ^= bit_mask(pos); - return *this; -} - -template -dynamic_bitset& -dynamic_bitset::flip() -{ - for (size_type i = 0; i < num_blocks(); ++i) - m_bits[i] = ~m_bits[i]; - m_zero_unused_bits(); - return *this; -} - -template -bool dynamic_bitset::m_unchecked_test(size_type pos) const -{ - return (m_bits[block_index(pos)] & bit_mask(pos)) != 0; -} - -template -bool dynamic_bitset::test(size_type pos) const -{ - assert(pos < m_num_bits); - return m_unchecked_test(pos); -} - -template -bool dynamic_bitset::any() const -{ - for (size_type i = 0; i < num_blocks(); ++i) - if (m_bits[i]) - return true; - return false; -} - -template -inline bool dynamic_bitset::none() const -{ - return !any(); -} - -template -dynamic_bitset -dynamic_bitset::operator~() const -{ - dynamic_bitset b(*this); - b.flip(); - return b; -} - - -/* - -The following is the straightforward implementation of count(), which -we leave here in a comment for documentation purposes. - -template -typename dynamic_bitset::size_type -dynamic_bitset::count() const -{ - size_type sum = 0; - for (size_type i = 0; i != this->m_num_bits; ++i) - if (test(i)) - ++sum; - return sum; -} - -The actual algorithm uses a lookup table. - - - The basic idea of the method is to pick up X bits at a time - from the internal array of blocks and consider those bits as - the binary representation of a number N. Then, to use a table - of 1<= CHAR_BIT and Block has no padding bits (that would be counted - together with the "real ones" if we saw the array as array of bytes). - Otherwise we simply 'extract' X bits at a time from each Block. - -*/ - - -template -typename dynamic_bitset::size_type -dynamic_bitset::count() const -{ - using namespace detail::dynamic_bitset_count_impl; - - const bool no_padding = bits_per_block == CHAR_BIT * sizeof(Block); - const bool enough_table_width = table_width >= CHAR_BIT; - - typedef mode_to_type< (no_padding && enough_table_width ? - access_by_bytes : access_by_blocks) > m; - - return do_count(m_bits.begin(), num_blocks(), Block(0), static_cast(0)); - -} - - -//----------------------------------------------------------------------------- -// conversions - - -template -void to_string_helper(const dynamic_bitset & b, stringT & s, - bool dump_all) -{ - typedef typename stringT::traits_type Tr; - typedef typename stringT::value_type Ch; - - BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, std::locale()); - const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); - const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); - - // Note that this function may access (when - // dump_all == true) bits beyond position size() - 1 - - typedef typename dynamic_bitset::size_type size_type; - - const size_type len = dump_all? - dynamic_bitset::bits_per_block * b.num_blocks(): - b.size(); - s.assign (len, zero); - - for (size_type i = 0; i < len; ++i) { - if (b.m_unchecked_test(i)) - Tr::assign(s[len - 1 - i], one); - - } - -} - - -// A comment similar to the one about the constructor from -// basic_string can be done here. Thanks to James Kanze for -// making me (Gennaro) realize this important separation of -// concerns issue, as well as many things about i18n. -// -template // G.P.S. -inline void -to_string(const dynamic_bitset& b, stringT& s) -{ - to_string_helper(b, s, false); -} - - -// Differently from to_string this function dumps out -// every bit of the internal representation (may be -// useful for debugging purposes) -// -template -inline void -dump_to_string(const dynamic_bitset& b, stringT& s) // G.P.S. -{ - to_string_helper(b, s, true /* =dump_all*/); -} - -template -inline void -to_block_range(const dynamic_bitset& b, - BlockOutputIterator result) -{ - // note how this copies *all* bits, including the - // unused ones in the last block (which are zero) - std::copy(b.m_bits.begin(), b.m_bits.end(), result); // [gps] -} - -template -unsigned long dynamic_bitset:: -to_ulong() const -{ - - if (m_num_bits == 0) - return 0; // convention - - // Check for overflows. This may be a performance burden on very - // large bitsets but is required by the specification, sorry - if (find_next(ulong_width - 1) != npos) - throw std::overflow_error("boost::dynamic_bitset::to_ulong overflow"); - - - // Ok, from now on we can be sure there's no "on" bit beyond - // the allowed positions - - if (bits_per_block >= ulong_width) - return m_bits[0]; - - - size_type last_block = block_index((std::min)(m_num_bits-1, // gps - (size_type)(ulong_width-1))); - unsigned long result = 0; - for (size_type i = 0; i <= last_block; ++i) { - - assert((size_type)bits_per_block * i < (size_type)ulong_width); // gps - - unsigned long piece = m_bits[i]; - result |= (piece << (bits_per_block * i)); - } - - return result; - -} - - -template -inline typename dynamic_bitset::size_type -dynamic_bitset::size() const -{ - return m_num_bits; -} - -template -inline typename dynamic_bitset::size_type -dynamic_bitset::num_blocks() const -{ - return m_bits.size(); -} - -template -inline typename dynamic_bitset::size_type -dynamic_bitset::max_size() const -{ - // Semantics of vector<>::max_size() aren't very clear - // (see lib issue 197) and many library implementations - // simply return dummy values, _unrelated_ to the underlying - // allocator. - // - // Given these problems, I was tempted to not provide this - // function at all but the user could need it if he provides - // his own allocator. - // - - const size_type m = detail::vector_max_size_workaround(m_bits); - - return m <= (size_type(-1)/bits_per_block) ? - m * bits_per_block : - size_type(-1); -} - -template -inline bool dynamic_bitset::empty() const -{ - return size() == 0; -} - -#if 0 // gps -template -inline void dynamic_bitset::reserve(size_type n) -{ - assert(n <= max_size()); // PRE - G.P.S. - m_bits.reserve(calc_num_blocks(n)); -} - -template -typename dynamic_bitset::size_type -dynamic_bitset::capacity() const -{ - // capacity is m_bits.capacity() * bits_per_block - // unless that one overflows - const size_type m = static_cast(-1); - const size_type q = m / bits_per_block; - - const size_type c = m_bits.capacity(); - - return c <= q ? - c * bits_per_block : - m; -} -#endif - -template -bool dynamic_bitset:: -is_subset_of(const dynamic_bitset& a) const -{ - assert(size() == a.size()); - for (size_type i = 0; i < num_blocks(); ++i) - if (m_bits[i] & ~a.m_bits[i]) - return false; - return true; -} - -template -bool dynamic_bitset:: -is_proper_subset_of(const dynamic_bitset& a) const -{ - assert(size() == a.size()); - bool proper = false; - for (size_type i = 0; i < num_blocks(); ++i) { - Block bt = m_bits[i], ba = a.m_bits[i]; - if (ba & ~bt) - proper = true; - if (bt & ~ba) - return false; - } - return proper; -} - -template -bool dynamic_bitset::intersects(const dynamic_bitset & b) const -{ - size_type common_blocks = num_blocks() < b.num_blocks() - ? num_blocks() : b.num_blocks(); - - for(size_type i = 0; i < common_blocks; ++i) { - if(m_bits[i] & b.m_bits[i]) - return true; - } - return false; -} - -// -------------------------------- -// lookup - - -// look for the first bit "on", starting -// from the block with index first_block -// -template -typename dynamic_bitset::size_type -dynamic_bitset::m_do_find_from(size_type first_block) const -{ - size_type i = first_block; - - // skip null blocks - while (i < num_blocks() && m_bits[i] == 0) - ++i; - - if (i >= num_blocks()) - return npos; // not found - - return i * bits_per_block + boost::lowest_bit(m_bits[i]); - -} - - -template -typename dynamic_bitset::size_type -dynamic_bitset::find_first() const -{ - return m_do_find_from(0); -} - - -template -typename dynamic_bitset::size_type -dynamic_bitset::find_next(size_type pos) const -{ - - const size_type sz = size(); - if (pos >= (sz-1) || sz == 0) - return npos; - - ++pos; - - const size_type blk = block_index(pos); - const block_width_type ind = bit_index(pos); - - // mask out bits before pos - const Block fore = m_bits[blk] & ( ~Block(0) << ind ); - - return fore? - blk * bits_per_block + lowest_bit(fore) - : - m_do_find_from(blk + 1); - -} - - - -//----------------------------------------------------------------------------- -// comparison - -template -bool operator==(const dynamic_bitset& a, - const dynamic_bitset& b) -{ - return (a.m_num_bits == b.m_num_bits) - && (a.m_bits == b.m_bits); // [gps] -} - -template -inline bool operator!=(const dynamic_bitset& a, - const dynamic_bitset& b) -{ - return !(a == b); -} - -template -bool operator<(const dynamic_bitset& a, - const dynamic_bitset& b) -{ - assert(a.size() == b.size()); - typedef typename dynamic_bitset::size_type size_type; - - if (a.size() == 0) - return false; - - // Since we are storing the most significant bit - // at pos == size() - 1, we need to do the comparisons in reverse. - - // Compare a block at a time - for (size_type i = a.num_blocks() - 1; i > 0; --i) - if (a.m_bits[i] < b.m_bits[i]) - return true; - else if (a.m_bits[i] > b.m_bits[i]) - return false; - - if (a.m_bits[0] < b.m_bits[0]) - return true; - else - return false; -} - -template -inline bool operator<=(const dynamic_bitset& a, - const dynamic_bitset& b) -{ - return !(a > b); -} - -template -inline bool operator>(const dynamic_bitset& a, - const dynamic_bitset& b) -{ - return b < a; -} - -template -inline bool operator>=(const dynamic_bitset& a, - const dynamic_bitset& b) -{ - return !(a < b); -} - -//----------------------------------------------------------------------------- -// stream operations - -#ifdef BOOST_OLD_IOSTREAMS -template < typename Block, typename Alloc> -std::ostream& -operator<<(std::ostream& os, const dynamic_bitset& b) -{ - // NOTE: since this is aimed at "classic" iostreams, exception - // masks on the stream are not supported. The library that - // ships with gcc 2.95 has an exceptions() member function but - // nothing is actually implemented; not even the class ios::failure. - - using namespace std; - - const ios::iostate ok = ios::goodbit; - ios::iostate err = ok; - - if (os.opfx()) { // gps - - //try - typedef typename dynamic_bitset::size_type bitsetsize_type; - - const bitsetsize_type sz = b.size(); - std::streambuf * buf = os.rdbuf(); - size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0) - || (bitsetsize_type) os.width() <= sz? 0 : os.width() - sz; //- gps - - const char fill_char = os.fill(); - const ios::fmtflags adjustfield = os.flags() & ios::adjustfield; - - // if needed fill at left; pad is decresed along the way - if (adjustfield != ios::left) { - for (; 0 < npad; --npad) - if (fill_char != buf->sputc(fill_char)) { - err |= ios::failbit; // gps - break; - } - } - - if (err == ok) { - // output the bitset - for (bitsetsize_type i = b.size(); 0 < i; --i) {// G.P.S. - const char dig = b.test(i-1)? '1' : '0'; - if (EOF == buf->sputc(dig)) { // ok?? gps - err |= ios::failbit; - break; - } - } - } - - if (err == ok) { - // if needed fill at right - for (; 0 < npad; --npad) { - if (fill_char != buf->sputc(fill_char)) { - err |= ios::failbit; - break; - } - } - } - - os.osfx(); - os.width(0); - - } // if opfx - - if(err != ok) - os.setstate(err); // assume this does NOT throw - gps - return os; - -} -#else - -template -std::basic_ostream& -operator<<(std::basic_ostream& os, - const dynamic_bitset& b) -{ - - using namespace std; - - const ios_base::iostate ok = ios_base::goodbit; - ios_base::iostate err = ok; - - typename basic_ostream::sentry cerberos(os); - if (cerberos) { - - BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, os.getloc()); - const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); - const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); - - try { - - typedef typename dynamic_bitset::size_type bitsetsize_type; - typedef basic_streambuf buffer_type; // G.P.S. - - buffer_type * buf = os.rdbuf(); - size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0) - || (bitsetsize_type) os.width() <= b.size()? 0 : os.width() - b.size(); //- G.P.S. - - const Ch fill_char = os.fill(); - const ios_base::fmtflags adjustfield = os.flags() & ios_base::adjustfield; - - // if needed fill at left; pad is decresed along the way - if (adjustfield != ios_base::left) { - for (; 0 < npad; --npad) - if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) { - err |= ios_base::failbit; // G.P.S. - break; - } - } - - if (err == ok) { - // output the bitset - for (bitsetsize_type i = b.size(); 0 < i; --i) {// G.P.S. - typename buffer_type::int_type - ret = buf->sputc(b.test(i-1)? one : zero); - if (Tr::eq_int_type(Tr::eof(), ret)) { - err |= ios_base::failbit; - break; - } - } - } - - if (err == ok) { - // if needed fill at right - for (; 0 < npad; --npad) { - if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) { - err |= ios_base::failbit; - break; - } - } - } - - - os.width(0); - - } catch (...) { // see std 27.6.1.1/4 - bool rethrow = false; - try { os.setstate(ios_base::failbit); } catch (...) { rethrow = true; } - - if (rethrow) - throw; - } - } - - if(err != ok) - os.setstate(err); // may throw exception - return os; - -} -#endif - - -#ifdef BOOST_OLD_IOSTREAMS - - // gps - A sentry-like class that calls isfx in its - // destructor. Necessary because bit_appender::do_append may throw. - class pseudo_sentry { - std::istream & m_r; - const bool m_ok; - public: - explicit pseudo_sentry(std::istream & r) : m_r(r), m_ok(r.ipfx(0)) { } - ~pseudo_sentry() { m_r.isfx(); } - operator bool() const { return m_ok; } - }; - -template -std::istream& -operator>>(std::istream& is, dynamic_bitset& b) -{ - -// Extractor for classic IO streams (libstdc++ < 3.0) -// ----------------------------------------------------// -// It's assumed that the stream buffer functions, and -// the stream's setstate() _cannot_ throw. - - - typedef dynamic_bitset bitset_type; - typedef typename bitset_type::size_type size_type; - - std::ios::iostate err = std::ios::goodbit; // gps - pseudo_sentry cerberos(is); // skips whitespaces - if(cerberos) { - - b.clear(); - - const std::streamsize w = is.width(); - const size_type limit = w > 0 && static_cast(w) < b.max_size()// gps - ? w : b.max_size(); - typename bitset_type::bit_appender appender(b); - std::streambuf * buf = is.rdbuf(); - for(int c = buf->sgetc(); appender.get_count() < limit; c = buf->snextc() ) { - - if (c == EOF) { - err |= std::ios::eofbit; // G.P.S. - break; - } - else if (char(c) != '0' && char(c) != '1') - break; // non digit character - - else { - try { - //throw std::bad_alloc(); // gps - appender.do_append(char(c) == '1'); - } - catch(...) { - is.setstate(std::ios::failbit); // assume this can't throw - throw; - } - } - - } // for - } - - is.width(0); // gps - if (b.size() == 0) - err |= std::ios::failbit; - if (err != std::ios::goodbit) // gps - is.setstate (err); // may throw - - return is; -} - -#else // BOOST_OLD_IOSTREAMS - -template -std::basic_istream& -operator>>(std::basic_istream& is, dynamic_bitset& b) -{ - - using namespace std; - - typedef dynamic_bitset bitset_type; - typedef typename bitset_type::size_type size_type; - - const streamsize w = is.width(); - const size_type limit = 0 < w && static_cast(w) < b.max_size()? // gps - w : b.max_size(); - - ios_base::iostate err = ios_base::goodbit; // gps - typename basic_istream::sentry cerberos(is); // skips whitespaces - if(cerberos) { - - // in accordance with prop. resol. of lib DR 303 [last checked 4 Feb 2004] - BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, is.getloc()); - const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0'); - const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1'); - - b.clear(); - try { - typename bitset_type::bit_appender appender(b); - basic_streambuf * buf = is.rdbuf(); - typename Tr::int_type c = buf->sgetc(); // G.P.S. - for( ; appender.get_count() < limit; c = buf->snextc() ) { - - if (Tr::eq_int_type(Tr::eof(), c)) { - err |= ios_base::eofbit; // G.P.S. - break; - } - else { - const Ch to_c = Tr::to_char_type(c); - const bool is_one = Tr::eq(to_c, one); - - if (!is_one && !Tr::eq(to_c, zero)) - break; // non digit character - - appender.do_append(is_one); - - } - - } // for - } - catch (...) { - // catches from stream buf, or from vector: - // - // bits_stored bits have been extracted and stored, and - // either no further character is extractable or we can't - // append to the underlying vector (out of memory) gps - - bool rethrow = false; // see std 27.6.1.1/4 - try { is.setstate(ios_base::badbit); } - catch(...) { rethrow = true; } - - if (rethrow) - throw; - - } - } - - is.width(0); // gps - if (b.size() == 0 /*|| !cerberos*/) - err |= ios_base::failbit; - if (err != ios_base::goodbit) // gps - is.setstate (err); // may throw - - return is; - -} - - -#endif - - -//----------------------------------------------------------------------------- -// bitset operations - -template -dynamic_bitset -operator&(const dynamic_bitset& x, - const dynamic_bitset& y) -{ - dynamic_bitset b(x); - return b &= y; -} - -template -dynamic_bitset -operator|(const dynamic_bitset& x, - const dynamic_bitset& y) -{ - dynamic_bitset b(x); - return b |= y; -} - -template -dynamic_bitset -operator^(const dynamic_bitset& x, - const dynamic_bitset& y) -{ - dynamic_bitset b(x); - return b ^= y; -} - -template -dynamic_bitset -operator-(const dynamic_bitset& x, - const dynamic_bitset& y) -{ - dynamic_bitset b(x); - return b -= y; -} - -//----------------------------------------------------------------------------- -// namespace scope swap - -template -inline void -swap(dynamic_bitset& left, - dynamic_bitset& right) // no throw -{ - left.swap(right); // gps -} - - -//----------------------------------------------------------------------------- -// private (on conforming compilers) member functions - - -template -inline typename dynamic_bitset::size_type -dynamic_bitset::calc_num_blocks(size_type num_bits) -{ - return num_bits / bits_per_block - + static_cast( num_bits % bits_per_block != 0 ); -} - -// gives a reference to the highest block -// -template -inline Block& dynamic_bitset::m_highest_block() -{ - return const_cast - (static_cast(this)->m_highest_block()); -} - -// gives a const-reference to the highest block -// -template -inline const Block& dynamic_bitset::m_highest_block() const -{ - assert(size() > 0 && num_blocks() > 0); - return m_bits.back(); -} - - -// If size() is not a multiple of bits_per_block -// then not all the bits in the last block are used. -// This function resets the unused bits (convenient -// for the implementation of many member functions) -// -template -inline void dynamic_bitset::m_zero_unused_bits() -{ - assert (num_blocks() == calc_num_blocks(m_num_bits)); - - // if != 0 this is the number of bits used in the last block - const block_width_type extra_bits = count_extra_bits(); - - if (extra_bits != 0) - m_highest_block() &= ~(~static_cast(0) << extra_bits); - -} - -// check class invariants -template -bool dynamic_bitset::m_check_invariants() const -{ - const block_width_type extra_bits = count_extra_bits(); - if (extra_bits > 0) { - block_type const mask = (~static_cast(0) << extra_bits); - if ((m_highest_block() & mask) != 0) - return false; - } - if (m_bits.size() > m_bits.capacity() || num_blocks() != calc_num_blocks(size())) - return false; - - return true; - -} - - -} // namespace boost - - -#undef BOOST_BITSET_CHAR - -#endif // include guard - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/adjacency_list.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/graph/adjacency_list.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,2832 @@ +// -*- c++ -*- +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= + +#ifndef BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP +#define BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP + +#include // for vertex_map in copy_impl +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +// Symbol truncation problems with MSVC, trying to shorten names. +#define stored_edge se_ +#define stored_edge_property sep_ +#define stored_edge_iter sei_ + +/* + Outline for this file: + + out_edge_iterator and in_edge_iterator implementation + edge_iterator for undirected graph + stored edge types (these object live in the out-edge/in-edge lists) + directed edges helper class + directed graph helper class + undirected graph helper class + bidirectional graph helper class + bidirectional graph helper class (without edge properties) + bidirectional graph helper class (with edge properties) + adjacency_list helper class + adj_list_impl class + vec_adj_list_impl class + adj_list_gen class + vertex property map + edge property map + + + Note: it would be nice to merge some of the undirected and + bidirectional code... it is awful similar. + */ + + +namespace boost { + + namespace detail { + + template + struct directed_category_traits { + typedef directed_tag directed_category; + }; + + template <> + struct directed_category_traits { + typedef directed_tag directed_category; + }; + template <> + struct directed_category_traits { + typedef undirected_tag directed_category; + }; + template <> + struct directed_category_traits { + typedef bidirectional_tag directed_category; + }; + + template + struct target_is { + target_is(const Vertex& v) : m_target(v) { } + template + bool operator()(const StoredEdge& e) const { + return e.get_target() == m_target; + } + Vertex m_target; + }; + + // O(E/V) + template + void erase_from_incidence_list(EdgeList& el, vertex_descriptor v, + allow_parallel_edge_tag) + { + boost::graph_detail::erase_if(el, detail::target_is(v)); + } + // O(log(E/V)) + template + void erase_from_incidence_list(EdgeList& el, vertex_descriptor v, + disallow_parallel_edge_tag) + { + typedef typename EdgeList::value_type StoredEdge; + el.erase(StoredEdge(v)); + } + + //========================================================================= + // Out-Edge and In-Edge Iterator Implementation + + template + struct out_edge_iter + : iterator_adaptor< + out_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > + { + typedef iterator_adaptor< + out_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > super_t; + + inline out_edge_iter() { } + inline out_edge_iter(const BaseIter& i, const VertexDescriptor& src) + : super_t(i), m_src(src) { } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor(m_src, (*this->base()).get_target(), + &(*this->base()).get_property()); + } + VertexDescriptor m_src; + }; + + template + struct in_edge_iter + : iterator_adaptor< + in_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > + { + typedef iterator_adaptor< + in_edge_iter + , BaseIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > super_t; + + inline in_edge_iter() { } + inline in_edge_iter(const BaseIter& i, const VertexDescriptor& src) + : super_t(i), m_src(src) { } + + inline EdgeDescriptor + dereference() const + { + return EdgeDescriptor((*this->base()).get_target(), m_src, + &this->base()->get_property()); + } + VertexDescriptor m_src; + }; + + //========================================================================= + // Undirected Edge Iterator Implementation + + template + struct undirected_edge_iter + : iterator_adaptor< + undirected_edge_iter + , EdgeIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > + { + typedef iterator_adaptor< + undirected_edge_iter + , EdgeIter + , EdgeDescriptor + , use_default + , EdgeDescriptor + , Difference + > super_t; + + undirected_edge_iter() {} + + explicit undirected_edge_iter(EdgeIter i) + : super_t(i) {} + + inline EdgeDescriptor + dereference() const { + return EdgeDescriptor( + (*this->base()).m_source + , (*this->base()).m_target + , &this->base()->get_property()); + } + }; + + //========================================================================= + // Edge Storage Types (stored in the out-edge/in-edge lists) + + template + class stored_edge + : public boost::equality_comparable1< stored_edge, + boost::less_than_comparable1< stored_edge > > + { + public: + typedef no_property property_type; + inline stored_edge() { } + inline stored_edge(Vertex target, const no_property& = no_property()) + : m_target(target) { } + // Need to write this explicitly so stored_edge_property can + // invoke Base::operator= (at least, for SGI MIPSPro compiler) + inline stored_edge& operator=(const stored_edge& x) { + m_target = x.m_target; + return *this; + } + inline Vertex& get_target() const { return m_target; } + inline const no_property& get_property() const { return s_prop; } + inline bool operator==(const stored_edge& x) const + { return m_target == x.get_target(); } + inline bool operator<(const stored_edge& x) const + { return m_target < x.get_target(); } + //protected: need to add hash<> as a friend + static no_property s_prop; + // Sometimes target not used as key in the set, and in that case + // it is ok to change the target. + mutable Vertex m_target; + }; + template + no_property stored_edge::s_prop; + + template + class stored_edge_property : public stored_edge { + typedef stored_edge_property self; + typedef stored_edge Base; + public: + typedef Property property_type; + inline stored_edge_property() { } + inline stored_edge_property(Vertex target, + const Property& p = Property()) + : stored_edge(target), m_property(new Property(p)) { } + stored_edge_property(const self& x) + : Base(x), m_property(const_cast(x).m_property) { } + self& operator=(const self& x) { + Base::operator=(x); + m_property = const_cast(x).m_property; + return *this; + } + inline Property& get_property() { return *m_property; } + inline const Property& get_property() const { return *m_property; } + protected: + // Holding the property by-value causes edge-descriptor + // invalidation for add_edge() with EdgeList=vecS. Instead we + // hold a pointer to the property. std::auto_ptr is not + // a perfect fit for the job, but it is darn close. + std::auto_ptr m_property; + }; + + + template + class stored_edge_iter + : public stored_edge + { + public: + typedef Property property_type; + inline stored_edge_iter() { } + inline stored_edge_iter(Vertex v) + : stored_edge(v) { } + inline stored_edge_iter(Vertex v, Iter i, void* = 0) + : stored_edge(v), m_iter(i) { } + inline Property& get_property() { return m_iter->get_property(); } + inline const Property& get_property() const { + return m_iter->get_property(); + } + inline Iter get_iter() const { return m_iter; } + protected: + Iter m_iter; + }; + + // For when the EdgeList is a std::vector. + // Want to make the iterator stable, so use an offset + // instead of an iterator into a std::vector + template + class stored_ra_edge_iter + : public stored_edge + { + typedef typename EdgeVec::iterator Iter; + public: + typedef Property property_type; + inline stored_ra_edge_iter() { } + inline stored_ra_edge_iter(Vertex v, Iter i = Iter(), + EdgeVec* edge_vec = 0) + : stored_edge(v), m_i(i - edge_vec->begin()), m_vec(edge_vec){ } + inline Property& get_property() { return (*m_vec)[m_i].get_property(); } + inline const Property& get_property() const { + return (*m_vec)[m_i].get_property(); + } + inline Iter get_iter() const { return m_vec->begin() + m_i; } + protected: + std::size_t m_i; + EdgeVec* m_vec; + }; + + } // namespace detail + + template + const typename property_value::type& + get(Tag property_tag, + const detail::stored_edge_property& e) + { + return get_property_value(e.get_property(), property_tag); + } + + template + const typename property_value::type& + get(Tag property_tag, + const detail::stored_edge_iter& e) + { + return get_property_value(e.get_property(), property_tag); + } + + template + const typename property_value::type& + get(Tag property_tag, + const detail::stored_ra_edge_iter& e) + { + return get_property_value(e.get_property(), property_tag); + } + + //========================================================================= + // Directed Edges Helper Class + + namespace detail { + + // O(E/V) + template + inline void + remove_directed_edge_dispatch(edge_descriptor, EdgeList& el, + StoredProperty& p) + { + for (typename EdgeList::iterator i = el.begin(); + i != el.end(); ++i) + if (&(*i).get_property() == &p) { + el.erase(i); + return; + } + } + + template + inline void + remove_directed_edge_if_dispatch(incidence_iterator first, + incidence_iterator last, + EdgeList& el, Predicate pred, + boost::allow_parallel_edge_tag) + { + // remove_if + while (first != last && !pred(*first)) + ++first; + incidence_iterator i = first; + if (first != last) + for (; i != last; ++i) + if (!pred(*i)) { + *first.base() = *i.base(); + ++first; + } + el.erase(first.base(), el.end()); + } + template + inline void + remove_directed_edge_if_dispatch(incidence_iterator first, + incidence_iterator last, + EdgeList& el, + Predicate pred, + boost::disallow_parallel_edge_tag) + { + for (incidence_iterator next = first; + first != last; first = next) { + ++next; + if (pred(*first)) + el.erase( first.base() ); + } + } + + template + inline void + undirected_remove_out_edge_if_dispatch(Graph& g, + incidence_iterator first, + incidence_iterator last, + EdgeList& el, Predicate pred, + boost::allow_parallel_edge_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + // remove_if + while (first != last && !pred(*first)) + ++first; + incidence_iterator i = first; + bool self_loop_removed = false; + if (first != last) + for (; i != last; ++i) { + if (self_loop_removed) { + /* With self loops, the descriptor will show up + * twice. The first time it will be removed, and now it + * will be skipped. + */ + self_loop_removed = false; + } + else if (!pred(*i)) { + *first.base() = *i.base(); + ++first; + } else { + if (source(*i, g) == target(*i, g)) self_loop_removed = true; + else { + // Remove the edge from the target + detail::remove_directed_edge_dispatch + (*i, + g.out_edge_list(target(*i, g)), + *(PropT*)(*i).get_property()); + } + + // Erase the edge property + g.m_edges.erase( (*i.base()).get_iter() ); + } + } + el.erase(first.base(), el.end()); + } + template + inline void + undirected_remove_out_edge_if_dispatch(Graph& g, + incidence_iterator first, + incidence_iterator last, + EdgeList& el, + Predicate pred, + boost::disallow_parallel_edge_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + for (incidence_iterator next = first; + first != last; first = next) { + ++next; + if (pred(*first)) { + if (source(*first, g) != target(*first, g)) { + // Remove the edge from the target + detail::remove_directed_edge_dispatch + (*first, + g.out_edge_list(target(*first, g)), + *(PropT*)(*first).get_property()); + } + + // Erase the edge property + g.m_edges.erase( (*first.base()).get_iter() ); + + // Erase the edge in the source + el.erase( first.base() ); + } + } + } + + // O(E/V) + template + inline void + remove_directed_edge_dispatch(edge_descriptor e, EdgeList& el, + no_property&) + { + for (typename EdgeList::iterator i = el.begin(); + i != el.end(); ++i) + if ((*i).get_target() == e.m_target) { + el.erase(i); + return; + } + } + + } // namespace detail + + template + struct directed_edges_helper { + + // Placement of these overloaded remove_edge() functions + // inside the class avoids a VC++ bug. + + // O(E/V) + inline void + remove_edge(typename Config::edge_descriptor e) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(*this); + typename Config::OutEdgeList& el = g.out_edge_list(source(e, g)); + typedef typename Config::OutEdgeList::value_type::property_type PType; + detail::remove_directed_edge_dispatch(e, el, + *(PType*)e.get_property()); + } + + // O(1) + inline void + remove_edge(typename Config::out_edge_iterator iter) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(*this); + typename Config::edge_descriptor e = *iter; + typename Config::OutEdgeList& el = g.out_edge_list(source(e, g)); + el.erase(iter.base()); + } + + }; + + // O(1) + template + inline std::pair + edges(const directed_edges_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_iterator edge_iterator; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + return std::make_pair( edge_iterator(g.vertex_set().begin(), + g.vertex_set().begin(), + g.vertex_set().end(), g), + edge_iterator(g.vertex_set().begin(), + g.vertex_set().end(), + g.vertex_set().end(), g) ); + } + + //========================================================================= + // Directed Graph Helper Class + + struct adj_list_dir_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag { }; + + template + struct directed_graph_helper + : public directed_edges_helper { + typedef typename Config::edge_descriptor edge_descriptor; + typedef adj_list_dir_traversal_tag traversal_category; + }; + + // O(E/V) + template + inline void + remove_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + detail::erase_from_incidence_list(g.out_edge_list(u), v, Cat()); + } + + template + inline void + remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typename Config::out_edge_iterator first, last; + tie(first, last) = out_edges(u, g); + typedef typename Config::edge_parallel_category edge_parallel_category; + detail::remove_directed_edge_if_dispatch + (first, last, g.out_edge_list(u), pred, edge_parallel_category()); + } + + template + inline void + remove_edge_if(Predicate pred, directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + + typename Config::vertex_iterator vi, vi_end; + for (tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + remove_out_edge_if(*vi, pred, g); + } + + template + inline void + remove_edge(EdgeOrIter e_or_iter, directed_graph_helper& g_) + { + g_.remove_edge(e_or_iter); + } + + // O(V + E) for allow_parallel_edges + // O(V * log(E/V)) for disallow_parallel_edges + template + inline void + clear_vertex(typename Config::vertex_descriptor u, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::vertex_iterator vi, viend; + for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) + detail::erase_from_incidence_list(g.out_edge_list(*vi), u, Cat()); + g.out_edge_list(u).clear(); + // clear() should be a req of Sequence and AssociativeContainer, + // or maybe just Container + } + + template + inline void + clear_out_edges(typename Config::vertex_descriptor u, + directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + g.out_edge_list(u).clear(); + // clear() should be a req of Sequence and AssociativeContainer, + // or maybe just Container + } + + // O(V), could do better... + template + inline typename Config::edges_size_type + num_edges(const directed_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + typename Config::edges_size_type num_e = 0; + typename Config::vertex_iterator vi, vi_end; + for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) + num_e += out_degree(*vi, g); + return num_e; + } + // O(1) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline std::pair::edge_descriptor, bool> + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + directed_graph_helper& g_) + { + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::graph_type graph_type; + typedef typename Config::StoredEdge StoredEdge; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList::iterator i; + bool inserted; + boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), + StoredEdge(v, p)); + return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), + inserted); + } + // Did not use default argument here because that + // causes Visual C++ to get confused. + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + directed_graph_helper& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + //========================================================================= + // Undirected Graph Helper Class + + template + struct undirected_graph_helper; + + struct undir_adj_list_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag, + public virtual bidirectional_graph_tag { }; + + namespace detail { + + // using class with specialization for dispatch is a VC++ workaround. + template + struct remove_undirected_edge_dispatch { + + // O(E/V) + template + static void + apply(edge_descriptor e, + undirected_graph_helper& g_, + StoredProperty& p) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + + typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g)); + typename Config::OutEdgeList::iterator out_i = out_el.begin(); + for (; out_i != out_el.end(); ++out_i) + if (&(*out_i).get_property() == &p) { + out_el.erase(out_i); + break; + } + typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g)); + typename Config::OutEdgeList::iterator in_i = in_el.begin(); + for (; in_i != in_el.end(); ++in_i) + if (&(*in_i).get_property() == &p) { + g.m_edges.erase((*in_i).get_iter()); + in_el.erase(in_i); + return; + } + } + }; + + template <> + struct remove_undirected_edge_dispatch { + // O(E/V) + template + static void + apply(edge_descriptor e, + undirected_graph_helper& g_, + no_property&) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + no_property* p = (no_property*)e.get_property(); + typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g)); + typename Config::OutEdgeList::iterator out_i = out_el.begin(); + for (; out_i != out_el.end(); ++out_i) + if (&(*out_i).get_property() == p) { + out_el.erase(out_i); + break; + } + typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g)); + typename Config::OutEdgeList::iterator in_i = in_el.begin(); + for (; in_i != in_el.end(); ++in_i) + if (&(*in_i).get_property() == p) { + g.m_edges.erase((*in_i).get_iter()); + in_el.erase(in_i); + return; + } + } + }; + + // O(E/V) + template + inline void + remove_edge_and_property(Graph& g, EdgeList& el, Vertex v, + boost::allow_parallel_edge_tag cat) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename EdgeList::value_type StoredEdge; + typename EdgeList::iterator i = el.begin(), end = el.end(); + for (; i != end; ++i) + if ((*i).get_target() == v) + g.m_edges.erase((*i).get_iter()); + detail::erase_from_incidence_list(el, v, cat); + } + // O(log(E/V)) + template + inline void + remove_edge_and_property(Graph& g, EdgeList& el, Vertex v, + boost::disallow_parallel_edge_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename EdgeList::value_type StoredEdge; + typename EdgeList::iterator i = el.find(StoredEdge(v)), end = el.end(); + if (i != end) { + g.m_edges.erase((*i).get_iter()); + el.erase(i); + } + } + + } // namespace detail + + template + struct list_edge // short name due to VC++ truncation and linker problems + : public boost::detail::edge_base + { + typedef EdgeProperty property_type; + typedef boost::detail::edge_base Base; + list_edge(Vertex u, Vertex v, const EdgeProperty& p = EdgeProperty()) + : Base(u, v), m_property(p) { } + EdgeProperty& get_property() { return m_property; } + const EdgeProperty& get_property() const { return m_property; } + // the following methods should never be used, but are needed + // to make SGI MIPSpro C++ happy + list_edge() { } + bool operator==(const list_edge&) const { return false; } + bool operator<(const list_edge&) const { return false; } + EdgeProperty m_property; + }; + + template + struct undirected_graph_helper { + + typedef undir_adj_list_traversal_tag traversal_category; + + // Placement of these overloaded remove_edge() functions + // inside the class avoids a VC++ bug. + + // O(E/V) + inline void + remove_edge(typename Config::edge_descriptor e) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::OutEdgeList::value_type::property_type PType; + detail::remove_undirected_edge_dispatch::apply + (e, *this, *(PType*)e.get_property()); + } + // O(E/V) + inline void + remove_edge(typename Config::out_edge_iterator iter) + { + this->remove_edge(*iter); + } + }; + + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(undirected_graph_helper&, + typename C::vertex_descriptor v) + { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_out_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const undirected_graph_helper&, + typename C::vertex_descriptor v) { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_out_edges; + } + + // O(E/V) + template + inline void + remove_edge(EdgeOrIter e, undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + g_.remove_edge(e); + } + + // O(E/V) or O(log(E/V)) + template + void + remove_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typedef typename Config::edge_parallel_category Cat; + detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat()); + detail::erase_from_incidence_list(g.out_edge_list(v), u, Cat()); + } + + template + void + remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::OutEdgeList::value_type::property_type PropT; + graph_type& g = static_cast(g_); + typename Config::out_edge_iterator first, last; + tie(first, last) = out_edges(u, g); + typedef typename Config::edge_parallel_category Cat; + detail::undirected_remove_out_edge_if_dispatch + (g, first, last, g.out_edge_list(u), pred, Cat()); + } + template + void + remove_in_edge_if(typename Config::vertex_descriptor u, Predicate pred, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + remove_out_edge_if(u, pred, g_); + } + + // O(E/V * E) or O(log(E/V) * E) + template + void + remove_edge_if(Predicate pred, undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typename Config::edge_iterator ei, ei_end, next; + tie(ei, ei_end) = edges(g); + for (next = ei; ei != ei_end; ei = next) { + ++next; + if (pred(*ei)) + remove_edge(*ei, g); + } + } + + // O(1) + template + inline std::pair + edges(const undirected_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_iterator edge_iterator; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + return std::make_pair( edge_iterator(g.m_edges.begin()), + edge_iterator(g.m_edges.end()) ); + } + // O(1) + template + inline typename Config::edges_size_type + num_edges(const undirected_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + return g.m_edges.size(); + } + // O(E/V * E/V) + template + inline void + clear_vertex(typename Config::vertex_descriptor u, + undirected_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator + ei = el.begin(), ei_end = el.end(); + for (; ei != ei_end; ++ei) { + detail::erase_from_incidence_list + (g.out_edge_list((*ei).get_target()), u, Cat()); + g.m_edges.erase((*ei).get_iter()); + } + g.out_edge_list(u).clear(); + } + // O(1) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + undirected_graph_helper& g_) + { + typedef typename Config::StoredEdge StoredEdge; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + + bool inserted; + typename Config::EdgeContainer::value_type e(u, v, p); + typename Config::EdgeContainer::iterator p_iter + = graph_detail::push(g.m_edges, e).first; + + typename Config::OutEdgeList::iterator i; + boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), + StoredEdge(v, p_iter, &g.m_edges)); + if (inserted) { + boost::graph_detail::push(g.out_edge_list(v), StoredEdge(u, p_iter, &g.m_edges)); + return std::make_pair(edge_descriptor(u, v, &p_iter->get_property()), + true); + } else { + g.m_edges.erase(p_iter); + return std::make_pair + (edge_descriptor(u, v, &i->get_iter()->get_property()), false); + } + } + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + undirected_graph_helper& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + + // O(1) + template + inline typename Config::degree_size_type + degree(typename Config::vertex_descriptor u, + const undirected_graph_helper& g_) + { + typedef typename Config::graph_type Graph; + const Graph& g = static_cast(g_); + return out_degree(u, g); + } + + template + inline std::pair + in_edges(typename Config::vertex_descriptor u, + const undirected_graph_helper& g_) + { + typedef typename Config::graph_type Graph; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + typedef typename Config::in_edge_iterator in_edge_iterator; + return + std::make_pair(in_edge_iterator(g.out_edge_list(u).begin(), u), + in_edge_iterator(g.out_edge_list(u).end(), u)); + } + + template + inline typename Config::degree_size_type + in_degree(typename Config::vertex_descriptor u, + const undirected_graph_helper& g_) + { return degree(u, g_); } + + //========================================================================= + // Bidirectional Graph Helper Class + + struct bidir_adj_list_traversal_tag : + public virtual vertex_list_graph_tag, + public virtual incidence_graph_tag, + public virtual adjacency_graph_tag, + public virtual edge_list_graph_tag, + public virtual bidirectional_graph_tag { }; + + template + struct bidirectional_graph_helper + : public directed_edges_helper { + typedef bidir_adj_list_traversal_tag traversal_category; + }; + + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(bidirectional_graph_helper&, + typename C::vertex_descriptor v) + { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_in_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const bidirectional_graph_helper&, + typename C::vertex_descriptor v) { + typename C::stored_vertex* sv = (typename C::stored_vertex*)v; + return sv->m_in_edges; + } + + template + inline void + remove_edge_if(Predicate pred, bidirectional_graph_helper& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typename Config::edge_iterator ei, ei_end, next; + tie(ei, ei_end) = edges(g); + for (next = ei; ei != ei_end; ei = next) { + ++next; + if (pred(*ei)) + remove_edge(*ei, g); + } + } + + template + inline std::pair + in_edges(typename Config::vertex_descriptor u, + const bidirectional_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + typedef typename Config::in_edge_iterator in_edge_iterator; + return + std::make_pair(in_edge_iterator(in_edge_list(g, u).begin(), u), + in_edge_iterator(in_edge_list(g, u).end(), u)); + } + + // O(1) + template + inline std::pair + edges(const bidirectional_graph_helper& g_) + { + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_iterator edge_iterator; + const graph_type& cg = static_cast(g_); + graph_type& g = const_cast(cg); + return std::make_pair( edge_iterator(g.m_edges.begin()), + edge_iterator(g.m_edges.end()) ); + } + + //========================================================================= + // Bidirectional Graph Helper Class (with edge properties) + + + template + struct bidirectional_graph_helper_with_property + : public bidirectional_graph_helper + { + typedef typename Config::graph_type graph_type; + typedef typename Config::out_edge_iterator out_edge_iterator; + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + void*) + { return out_edges(source(e, g), g); } + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + setS*) + { return edge_range(source(e, g), target(e, g), g); } + + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + multisetS*) + { return edge_range(source(e, g), target(e, g), g); } + +#if !defined BOOST_NO_HASH + std::pair + get_parallel_edge_sublist(typename Config::edge_descriptor e, + const graph_type& g, + hash_setS*) + { return edge_range(source(e, g), target(e, g), g); } +#endif + + // Placement of these overloaded remove_edge() functions + // inside the class avoids a VC++ bug. + + // O(E/V) or O(log(E/V)) + void + remove_edge(typename Config::edge_descriptor e) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + graph_type& g = static_cast(*this); + + typedef typename Config::edgelist_selector OutEdgeListS; + + std::pair rng = + get_parallel_edge_sublist(e, g, (OutEdgeListS*)(0)); + rng.first = std::find(rng.first, rng.second, e); + assert(rng.first != rng.second); + remove_edge(rng.first); + } + + inline void + remove_edge(typename Config::out_edge_iterator iter) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(*this); + typename Config::edge_descriptor e = *iter; + typename Config::OutEdgeList& oel = g.out_edge_list(source(e, g)); + typename Config::InEdgeList& iel = in_edge_list(g, target(e, g)); + typedef typename Config::OutEdgeList::value_type::property_type PType; + PType& p = *(PType*)e.get_property(); + detail::remove_directed_edge_dispatch(*iter, iel, p); + g.m_edges.erase(iter.base()->get_iter()); + oel.erase(iter.base()); + } + }; + + // O(E/V) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline void + remove_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typedef typename Config::edge_parallel_category Cat; + detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat()); + detail::erase_from_incidence_list(in_edge_list(g, v), u, Cat()); + } + + // O(E/V) or O(log(E/V)) + template + inline void + remove_edge(EdgeOrIter e, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + g_.remove_edge(e); + } + + template + inline void + remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::OutEdgeList::value_type::property_type PropT; + graph_type& g = static_cast(g_); + + typedef typename Config::EdgeIter EdgeIter; + typedef std::vector Garbage; + Garbage garbage; + + // First remove the edges from the targets' in-edge lists and + // from the graph's edge set list. + typename Config::out_edge_iterator out_i, out_end; + for (tie(out_i, out_end) = out_edges(u, g); out_i != out_end; ++out_i) + if (pred(*out_i)) { + detail::remove_directed_edge_dispatch + (*out_i, in_edge_list(g, target(*out_i, g)), + *(PropT*)(*out_i).get_property()); + // Put in garbage to delete later. Will need the properties + // for the remove_if of the out-edges. + garbage.push_back((*out_i.base()).get_iter()); + } + + // Now remove the edges from this out-edge list. + typename Config::out_edge_iterator first, last; + tie(first, last) = out_edges(u, g); + typedef typename Config::edge_parallel_category Cat; + detail::remove_directed_edge_if_dispatch + (first, last, g.out_edge_list(u), pred, Cat()); + + // Now delete the edge properties from the g.m_edges list + for (typename Garbage::iterator i = garbage.begin(); + i != garbage.end(); ++i) + g.m_edges.erase(*i); + } + template + inline void + remove_in_edge_if(typename Config::vertex_descriptor v, Predicate pred, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::OutEdgeList::value_type::property_type PropT; + graph_type& g = static_cast(g_); + + typedef typename Config::EdgeIter EdgeIter; + typedef std::vector Garbage; + Garbage garbage; + + // First remove the edges from the sources' out-edge lists and + // from the graph's edge set list. + typename Config::in_edge_iterator in_i, in_end; + for (tie(in_i, in_end) = in_edges(v, g); in_i != in_end; ++in_i) + if (pred(*in_i)) { + typename Config::vertex_descriptor u = source(*in_i, g); + detail::remove_directed_edge_dispatch + (*in_i, g.out_edge_list(u), *(PropT*)(*in_i).get_property()); + // Put in garbage to delete later. Will need the properties + // for the remove_if of the out-edges. + garbage.push_back((*in_i.base()).get_iter()); + } + // Now remove the edges from this in-edge list. + typename Config::in_edge_iterator first, last; + tie(first, last) = in_edges(v, g); + typedef typename Config::edge_parallel_category Cat; + detail::remove_directed_edge_if_dispatch + (first, last, in_edge_list(g, v), pred, Cat()); + + // Now delete the edge properties from the g.m_edges list + for (typename Garbage::iterator i = garbage.begin(); + i != garbage.end(); ++i) + g.m_edges.erase(*i); + } + + // O(1) + template + inline typename Config::edges_size_type + num_edges(const bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + return g.m_edges.size(); + } + // O(E/V * E/V) for allow_parallel_edge_tag + // O(E/V * log(E/V)) for disallow_parallel_edge_tag + template + inline void + clear_vertex(typename Config::vertex_descriptor u, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator + ei = el.begin(), ei_end = el.end(); + for (; ei != ei_end; ++ei) { + detail::erase_from_incidence_list + (in_edge_list(g, (*ei).get_target()), u, Cat()); + g.m_edges.erase((*ei).get_iter()); + } + typename Config::InEdgeList& in_el = in_edge_list(g, u); + typename Config::InEdgeList::iterator + in_ei = in_el.begin(), in_ei_end = in_el.end(); + for (; in_ei != in_ei_end; ++in_ei) { + detail::erase_from_incidence_list + (g.out_edge_list((*in_ei).get_target()), u, Cat()); + g.m_edges.erase((*in_ei).get_iter()); + } + g.out_edge_list(u).clear(); + in_edge_list(g, u).clear(); + } + + template + inline void + clear_out_edges(typename Config::vertex_descriptor u, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator + ei = el.begin(), ei_end = el.end(); + for (; ei != ei_end; ++ei) { + detail::erase_from_incidence_list + (in_edge_list(g, (*ei).get_target()), u, Cat()); + g.m_edges.erase((*ei).get_iter()); + } + g.out_edge_list(u).clear(); + } + + template + inline void + clear_in_edges(typename Config::vertex_descriptor u, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Config::graph_type graph_type; + typedef typename Config::edge_parallel_category Cat; + graph_type& g = static_cast(g_); + typename Config::InEdgeList& in_el = in_edge_list(g, u); + typename Config::InEdgeList::iterator + in_ei = in_el.begin(), in_ei_end = in_el.end(); + for (; in_ei != in_ei_end; ++in_ei) { + detail::erase_from_incidence_list + (g.out_edge_list((*in_ei).get_target()), u, Cat()); + g.m_edges.erase((*in_ei).get_iter()); + } + in_edge_list(g, u).clear(); + } + + // O(1) for allow_parallel_edge_tag + // O(log(E/V)) for disallow_parallel_edge_tag + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::graph_type graph_type; + graph_type& g = static_cast(g_); + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::StoredEdge StoredEdge; + bool inserted; + typename Config::EdgeContainer::value_type e(u, v, p); + typename Config::EdgeContainer::iterator p_iter + = graph_detail::push(g.m_edges, e).first; + typename Config::OutEdgeList::iterator i; + boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), + StoredEdge(v, p_iter, &g.m_edges)); + if (inserted) { + boost::graph_detail::push(in_edge_list(g, v), StoredEdge(u, p_iter, &g.m_edges)); + return std::make_pair(edge_descriptor(u, v, &p_iter->m_property), + true); + } else { + g.m_edges.erase(p_iter); + return std::make_pair(edge_descriptor(u, v, + &i->get_iter()->get_property()), + false); + } + } + + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + bidirectional_graph_helper_with_property& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + // O(1) + template + inline typename Config::degree_size_type + degree(typename Config::vertex_descriptor u, + const bidirectional_graph_helper_with_property& g_) + { + typedef typename Config::graph_type graph_type; + const graph_type& g = static_cast(g_); + return in_degree(u, g) + out_degree(u, g); + } + + //========================================================================= + // Adjacency List Helper Class + + template + struct adj_list_helper : public Base + { + typedef typename Config::graph_type AdjList; + typedef typename Config::vertex_descriptor vertex_descriptor; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::out_edge_iterator out_edge_iterator; + typedef typename Config::in_edge_iterator in_edge_iterator; + typedef typename Config::adjacency_iterator adjacency_iterator; + typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator; + typedef typename Config::vertex_iterator vertex_iterator; + typedef typename Config::edge_iterator edge_iterator; + typedef typename Config::directed_category directed_category; + typedef typename Config::edge_parallel_category edge_parallel_category; + typedef typename Config::vertices_size_type vertices_size_type; + typedef typename Config::edges_size_type edges_size_type; + typedef typename Config::degree_size_type degree_size_type; + typedef typename Config::StoredEdge StoredEdge; + typedef typename Config::edge_property_type edge_property_type; + + typedef typename Config::global_edgelist_selector + global_edgelist_selector; + + // protected: + + // The edge_dispatch() functions should be static, but + // Borland gets confused about constness. + + // O(E/V) + inline std::pair + edge_dispatch(const AdjList& g, + vertex_descriptor u, vertex_descriptor v, + boost::allow_parallel_edge_tag) const + { + bool found; + const typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::const_iterator + i = std::find_if(el.begin(), el.end(), + detail::target_is(v)); + found = (i != g.out_edge_list(u).end()); + if (found) + return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), + true); + else + return std::make_pair(edge_descriptor(u, v, 0), false); + } + // O(log(E/V)) + inline std::pair + edge_dispatch(const AdjList& g, + vertex_descriptor u, vertex_descriptor v, + boost::disallow_parallel_edge_tag) const + { + bool found; + /* According to the standard, this should be iterator, not const_iterator, + but the VC++ std::set::find() const returns const_iterator. + And since iterator should be convertible to const_iterator, the + following should work everywhere. -Jeremy */ + typename Config::OutEdgeList::const_iterator + i = g.out_edge_list(u).find(StoredEdge(v)), + end = g.out_edge_list(u).end(); + found = (i != end); + if (found) + return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), + true); + else + return std::make_pair(edge_descriptor(u, v, 0), false); + } + }; + + template + inline std::pair + adjacent_vertices(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + typedef typename Config::adjacency_iterator adjacency_iterator; + typename Config::out_edge_iterator first, last; + boost::tie(first, last) = out_edges(u, g); + return std::make_pair(adjacency_iterator(first, &g), + adjacency_iterator(last, &g)); + } + template + inline std::pair + inv_adjacent_vertices(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator; + typename Config::in_edge_iterator first, last; + boost::tie(first, last) = in_edges(u, g); + return std::make_pair(inv_adjacency_iterator(first, &g), + inv_adjacency_iterator(last, &g)); + } + template + inline std::pair + out_edges(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + typedef typename Config::out_edge_iterator out_edge_iterator; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + return + std::make_pair(out_edge_iterator(g.out_edge_list(u).begin(), u), + out_edge_iterator(g.out_edge_list(u).end(), u)); + } + template + inline std::pair + vertices(const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& cg = static_cast(g_); + AdjList& g = const_cast(cg); + return std::make_pair( g.vertex_set().begin(), g.vertex_set().end() ); + } + template + inline typename Config::vertices_size_type + num_vertices(const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& g = static_cast(g_); + return g.vertex_set().size(); + } + template + inline typename Config::degree_size_type + out_degree(typename Config::vertex_descriptor u, + const adj_list_helper& g_) + { + typedef typename Config::graph_type AdjList; + const AdjList& g = static_cast(g_); + return g.out_edge_list(u).size(); + } + template + inline std::pair + edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const adj_list_helper& g_) + { + typedef typename Config::graph_type Graph; + typedef typename Config::edge_parallel_category Cat; + const Graph& g = static_cast(g_); + return g_.edge_dispatch(g, u, v, Cat()); + } + template + inline std::pair + edge_range(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const adj_list_helper& g_) + { + typedef typename Config::graph_type Graph; + typedef typename Config::StoredEdge StoredEdge; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + typedef typename Config::out_edge_iterator out_edge_iterator; + typename Config::OutEdgeList& el = g.out_edge_list(u); + typename Config::OutEdgeList::iterator first, last; + typename Config::EdgeContainer fake_edge_container; + tie(first, last) = + std::equal_range(el.begin(), el.end(), + StoredEdge(v, fake_edge_container.end(), + &fake_edge_container)); + return std::make_pair(out_edge_iterator(first, u), + out_edge_iterator(last, u)); + } + + template + inline typename Config::degree_size_type + in_degree(typename Config::vertex_descriptor u, + const directed_edges_helper& g_) + { + typedef typename Config::graph_type Graph; + const Graph& cg = static_cast(g_); + Graph& g = const_cast(cg); + return in_edge_list(g, u).size(); + } + + namespace detail { + template + inline + typename boost::property_map::type + get_dispatch(adj_list_helper&, Property, + boost::edge_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::type PA; + return PA(); + } + template + inline + typename boost::property_map::const_type + get_dispatch(const adj_list_helper&, Property, + boost::edge_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::const_type PA; + return PA(); + } + + template + inline + typename boost::property_map::type + get_dispatch(adj_list_helper& g, Property, + boost::vertex_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::type PA; + return PA(&static_cast(g)); + } + template + inline + typename boost::property_map::const_type + get_dispatch(const adj_list_helper& g, Property, + boost::vertex_property_tag) { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::const_type PA; + const Graph& cg = static_cast(g); + return PA(&cg); + } + + } // namespace detail + + // Implementation of the PropertyGraph interface + template + inline + typename boost::property_map::type + get(Property p, adj_list_helper& g) { + typedef typename property_kind::type Kind; + return detail::get_dispatch(g, p, Kind()); + } + template + inline + typename boost::property_map::const_type + get(Property p, const adj_list_helper& g) { + typedef typename property_kind::type Kind; + return detail::get_dispatch(g, p, Kind()); + } + + template + inline + typename boost::property_traits< + typename boost::property_map::type + >::reference + get(Property p, adj_list_helper& g, const Key& key) { + return get(get(p, g), key); + } + + template + inline + typename boost::property_traits< + typename boost::property_map::const_type + >::reference + get(Property p, const adj_list_helper& g, const Key& key) { + return get(get(p, g), key); + } + + template + inline void + put(Property p, adj_list_helper& g, + const Key& key, const Value& value) + { + typedef typename Config::graph_type Graph; + typedef typename boost::property_map::type Map; + Map pmap = get(p, static_cast(g)); + put(pmap, key, value); + } + + + //========================================================================= + // Generalize Adjacency List Implementation + + struct adj_list_tag { }; + + template + class adj_list_impl + : public adj_list_helper + { + typedef typename Config::OutEdgeList OutEdgeList; + typedef typename Config::InEdgeList InEdgeList; + typedef typename Config::StoredVertexList StoredVertexList; + public: + typedef typename Config::stored_vertex stored_vertex; + typedef typename Config::EdgeContainer EdgeContainer; + typedef typename Config::vertex_descriptor vertex_descriptor; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::vertex_iterator vertex_iterator; + typedef typename Config::edge_iterator edge_iterator; + typedef typename Config::edge_parallel_category edge_parallel_category; + typedef typename Config::vertices_size_type vertices_size_type; + typedef typename Config::edges_size_type edges_size_type; + typedef typename Config::degree_size_type degree_size_type; + typedef typename Config::edge_property_type edge_property_type; + typedef adj_list_tag graph_tag; + + static vertex_descriptor null_vertex() + { + return 0; + } + + inline adj_list_impl() { } + + inline adj_list_impl(const adj_list_impl& x) { + copy_impl(x); + } + inline adj_list_impl& operator=(const adj_list_impl& x) { + this->clear(); + copy_impl(x); + return *this; + } + inline void clear() { + for (typename StoredVertexList::iterator i = m_vertices.begin(); + i != m_vertices.end(); ++i) + delete (stored_vertex*)*i; + m_vertices.clear(); + m_edges.clear(); + } + inline adj_list_impl(vertices_size_type num_vertices) { + for (vertices_size_type i = 0; i < num_vertices; ++i) + add_vertex(static_cast(*this)); + } + template + inline adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last) + { + vertex_descriptor* v = new vertex_descriptor[num_vertices]; + for (vertices_size_type i = 0; i < num_vertices; ++i) + v[i] = add_vertex(static_cast(*this)); + + while (first != last) { + add_edge(v[(*first).first], v[(*first).second], *this); + ++first; + } + delete [] v; + } + template + inline adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter) + { + vertex_descriptor* v = new vertex_descriptor[num_vertices]; + for (vertices_size_type i = 0; i < num_vertices; ++i) + v[i] = add_vertex(static_cast(*this)); + + while (first != last) { + add_edge(v[(*first).first], v[(*first).second], *ep_iter, *this); + ++first; + ++ep_iter; + } + delete [] v; + } + ~adj_list_impl() { + for (typename StoredVertexList::iterator i = m_vertices.begin(); + i != m_vertices.end(); ++i) + delete (stored_vertex*)*i; + } + // protected: + inline OutEdgeList& out_edge_list(vertex_descriptor v) { + stored_vertex* sv = (stored_vertex*)v; + return sv->m_out_edges; + } + inline const OutEdgeList& out_edge_list(vertex_descriptor v) const { + stored_vertex* sv = (stored_vertex*)v; + return sv->m_out_edges; + } + inline StoredVertexList& vertex_set() { return m_vertices; } + inline const StoredVertexList& vertex_set() const { return m_vertices; } + + inline void copy_impl(const adj_list_impl& x_) + { + const Derived& x = static_cast(x_); + + // Would be better to have a constant time way to get from + // vertices in x to the corresponding vertices in *this. + std::map vertex_map; + + // Copy the stored vertex objects by adding each vertex + // and copying its property object. + vertex_iterator vi, vi_end; + for (tie(vi, vi_end) = vertices(x); vi != vi_end; ++vi) { + stored_vertex* v = (stored_vertex*)add_vertex(*this); + v->m_property = ((stored_vertex*)*vi)->m_property; + vertex_map[(stored_vertex*)*vi] = v; + } + // Copy the edges by adding each edge and copying its + // property object. + edge_iterator ei, ei_end; + for (tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) { + edge_descriptor e; + bool inserted; + vertex_descriptor s = source(*ei,x), t = target(*ei,x); + tie(e, inserted) = add_edge(vertex_map[(stored_vertex*)s], + vertex_map[(stored_vertex*)t], *this); + *((edge_property_type*)e.m_eproperty) + = *((edge_property_type*)(*ei).m_eproperty); + } + } + + + typename Config::EdgeContainer m_edges; + StoredVertexList m_vertices; + }; + + // O(1) + template + inline typename Config::vertex_descriptor + add_vertex(adj_list_impl& g_) + { + Derived& g = static_cast(g_); + typedef typename Config::stored_vertex stored_vertex; + stored_vertex* v = new stored_vertex; + typename Config::StoredVertexList::iterator pos; + bool inserted; + boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v); + v->m_position = pos; + return v; + } + // O(1) + template + inline typename Config::vertex_descriptor + add_vertex(const typename Config::vertex_property_type& p, + adj_list_impl& g_) + { + Derived& g = static_cast(g_); + typedef typename Config::stored_vertex stored_vertex; + stored_vertex* v = new stored_vertex(p); + typename Config::StoredVertexList::iterator pos; + bool inserted; + boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v); + v->m_position = pos; + return v; + } + // O(1) + template + inline void remove_vertex(typename Config::vertex_descriptor u, + adj_list_impl& g_) + { + typedef typename Config::stored_vertex stored_vertex; + Derived& g = static_cast(g_); + stored_vertex* su = (stored_vertex*)u; + g.m_vertices.erase(su->m_position); + delete su; + } + // O(V) + template + inline typename Config::vertex_descriptor + vertex(typename Config::vertices_size_type n, + const adj_list_impl& g_) + { + const Derived& g = static_cast(g_); + typename Config::vertex_iterator i = vertices(g).first; + while (n--) ++i; // std::advance(i, n); (not VC++ portable) + return *i; + } + + //========================================================================= + // Vector-Backbone Adjacency List Implementation + + namespace detail { + + template + inline void + remove_vertex_dispatch(Graph& g, vertex_descriptor u, + boost::directed_tag) + { + typedef typename Graph::edge_parallel_category edge_parallel_category; + g.m_vertices.erase(g.m_vertices.begin() + u); + vertex_descriptor V = num_vertices(g); + if (u != V) { + for (vertex_descriptor v = 0; v < V; ++v) + reindex_edge_list(g.out_edge_list(v), u, edge_parallel_category()); + } + } + + template + inline void + remove_vertex_dispatch(Graph& g, vertex_descriptor u, + boost::undirected_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Graph::edge_parallel_category edge_parallel_category; + g.m_vertices.erase(g.m_vertices.begin() + u); + vertex_descriptor V = num_vertices(g); + for (vertex_descriptor v = 0; v < V; ++v) + reindex_edge_list(g.out_edge_list(v), u, + edge_parallel_category()); + typedef typename Graph::EdgeContainer Container; + typedef typename Container::iterator Iter; + Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end(); + for (; ei != ei_end; ++ei) { + if (ei->m_source > u) + --ei->m_source; + if (ei->m_target > u) + --ei->m_target; + } + } + template + inline void + remove_vertex_dispatch(Graph& g, vertex_descriptor u, + boost::bidirectional_tag) + { + typedef typename Graph::global_edgelist_selector EdgeListS; + BOOST_STATIC_ASSERT((!is_same::value)); + + typedef typename Graph::edge_parallel_category edge_parallel_category; + g.m_vertices.erase(g.m_vertices.begin() + u); + vertex_descriptor V = num_vertices(g); + vertex_descriptor v; + if (u != V) { + for (v = 0; v < V; ++v) + reindex_edge_list(g.out_edge_list(v), u, + edge_parallel_category()); + for (v = 0; v < V; ++v) + reindex_edge_list(in_edge_list(g, v), u, + edge_parallel_category()); + + typedef typename Graph::EdgeContainer Container; + typedef typename Container::iterator Iter; + Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end(); + for (; ei != ei_end; ++ei) { + if (ei->m_source > u) + --ei->m_source; + if (ei->m_target > u) + --ei->m_target; + } + } + } + + template + inline void + reindex_edge_list(EdgeList& el, vertex_descriptor u, + boost::allow_parallel_edge_tag) + { + typename EdgeList::iterator ei = el.begin(), e_end = el.end(); + for (; ei != e_end; ++ei) + if ((*ei).get_target() > u) + --(*ei).get_target(); + } + template + inline void + reindex_edge_list(EdgeList& el, vertex_descriptor u, + boost::disallow_parallel_edge_tag) + { + typename EdgeList::iterator ei = el.begin(), e_end = el.end(); + while (ei != e_end) { + typename EdgeList::value_type ce = *ei; + ++ei; + if (ce.get_target() > u) { + el.erase(ce); + --ce.get_target(); + el.insert(ce); + } + } + } + } // namespace detail + + struct vec_adj_list_tag { }; + + template + class vec_adj_list_impl + : public adj_list_helper + { + typedef typename Config::OutEdgeList OutEdgeList; + typedef typename Config::InEdgeList InEdgeList; + typedef typename Config::StoredVertexList StoredVertexList; + public: + typedef typename Config::vertex_descriptor vertex_descriptor; + typedef typename Config::edge_descriptor edge_descriptor; + typedef typename Config::out_edge_iterator out_edge_iterator; + typedef typename Config::edge_iterator edge_iterator; + typedef typename Config::directed_category directed_category; + typedef typename Config::vertices_size_type vertices_size_type; + typedef typename Config::edges_size_type edges_size_type; + typedef typename Config::degree_size_type degree_size_type; + typedef typename Config::StoredEdge StoredEdge; + typedef typename Config::stored_vertex stored_vertex; + typedef typename Config::EdgeContainer EdgeContainer; + typedef typename Config::edge_property_type edge_property_type; + typedef vec_adj_list_tag graph_tag; + + static vertex_descriptor null_vertex() + { + return (std::numeric_limits::max)(); + } + + inline vec_adj_list_impl() { } + + inline vec_adj_list_impl(const vec_adj_list_impl& x) { + copy_impl(x); + } + inline vec_adj_list_impl& operator=(const vec_adj_list_impl& x) { + this->clear(); + copy_impl(x); + return *this; + } + inline void clear() { + m_vertices.clear(); + m_edges.clear(); + } + + inline vec_adj_list_impl(vertices_size_type _num_vertices) + : m_vertices(_num_vertices) { } + + template + inline vec_adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last) + : m_vertices(num_vertices) + { + while (first != last) { + add_edge((*first).first, (*first).second, + static_cast(*this)); + ++first; + } + } + template + inline vec_adj_list_impl(vertices_size_type num_vertices, + EdgeIterator first, EdgeIterator last, + EdgePropertyIterator ep_iter) + : m_vertices(num_vertices) + { + while (first != last) { + add_edge((*first).first, (*first).second, *ep_iter, + static_cast(*this)); + ++first; + ++ep_iter; + } + } + + // protected: + inline boost::integer_range vertex_set() const { + return boost::integer_range(0, m_vertices.size()); + } + inline OutEdgeList& out_edge_list(vertex_descriptor v) { + return m_vertices[v].m_out_edges; + } + inline const OutEdgeList& out_edge_list(vertex_descriptor v) const { + return m_vertices[v].m_out_edges; + } + inline void copy_impl(const vec_adj_list_impl& x_) + { + const Graph& x = static_cast(x_); + // Copy the stored vertex objects by adding each vertex + // and copying its property object. + for (vertices_size_type i = 0; i < num_vertices(x); ++i) { + vertex_descriptor v = add_vertex(*this); + m_vertices[v].m_property = x.m_vertices[i].m_property; + } + // Copy the edges by adding each edge and copying its + // property object. + edge_iterator ei, ei_end; + for (tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) { + edge_descriptor e; + bool inserted; + tie(e, inserted) = add_edge(source(*ei,x), target(*ei,x) , *this); + *((edge_property_type*)e.m_eproperty) + = *((edge_property_type*)(*ei).m_eproperty); + } + } + typename Config::EdgeContainer m_edges; + StoredVertexList m_vertices; + }; + // Had to make these non-members to avoid accidental instantiation + // on SGI MIPSpro C++ + template + inline typename C::InEdgeList& + in_edge_list(vec_adj_list_impl& g, + typename C::vertex_descriptor v) { + return g.m_vertices[v].m_in_edges; + } + template + inline const typename C::InEdgeList& + in_edge_list(const vec_adj_list_impl& g, + typename C::vertex_descriptor v) { + return g.m_vertices[v].m_in_edges; + } + + // O(1) + template + inline typename Config::vertex_descriptor + add_vertex(vec_adj_list_impl& g_) { + Graph& g = static_cast(g_); + g.m_vertices.resize(g.m_vertices.size() + 1); + return g.m_vertices.size() - 1; + } + + template + inline typename Config::vertex_descriptor + add_vertex(const typename Config::vertex_property_type& p, + vec_adj_list_impl& g_) { + Graph& g = static_cast(g_); + typedef typename Config::stored_vertex stored_vertex; + g.m_vertices.push_back(stored_vertex(p)); + return g.m_vertices.size() - 1; + } + + // Here we override the directed_graph_helper add_edge() function + // so that the number of vertices is automatically changed if + // either u or v is greater than the number of vertices. + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + const typename Config::edge_property_type& p, + vec_adj_list_impl& g_) + { + BOOST_USING_STD_MAX(); + typename Config::vertex_descriptor x = max BOOST_PREVENT_MACRO_SUBSTITUTION(u, v); + if (x >= num_vertices(g_)) + g_.m_vertices.resize(x + 1); + adj_list_helper& g = g_; + return add_edge(u, v, p, g); + } + template + inline std::pair + add_edge(typename Config::vertex_descriptor u, + typename Config::vertex_descriptor v, + vec_adj_list_impl& g_) + { + typename Config::edge_property_type p; + return add_edge(u, v, p, g_); + } + + + // O(V + E) + template + inline void remove_vertex(typename Config::vertex_descriptor v, + vec_adj_list_impl& g_) + { + typedef typename Config::directed_category Cat; + Graph& g = static_cast(g_); + detail::remove_vertex_dispatch(g, v, Cat()); + } + // O(1) + template + inline typename Config::vertex_descriptor + vertex(typename Config::vertices_size_type n, + const vec_adj_list_impl&) + { + return n; + } + + + namespace detail { + + //========================================================================= + // Adjacency List Generator + + template + struct adj_list_gen + { + typedef typename detail::is_random_access::type + is_rand_access; + typedef typename has_property::type has_edge_property; + typedef typename DirectedS::is_directed_t DirectedT; + typedef typename DirectedS::is_bidir_t BidirectionalT; + + struct config + { + typedef OutEdgeListS edgelist_selector; + typedef EdgeListS global_edgelist_selector; + + typedef Graph graph_type; + typedef EdgeProperty edge_property_type; + typedef VertexProperty vertex_property_type; + typedef GraphProperty graph_property_type; + typedef std::size_t vertices_size_type; + + typedef adjacency_list_traits + Traits; + + typedef typename Traits::directed_category directed_category; + typedef typename Traits::edge_parallel_category edge_parallel_category; + typedef typename Traits::vertex_descriptor vertex_descriptor; + typedef typename Traits::edge_descriptor edge_descriptor; + + typedef void* vertex_ptr; + + // need to reorganize this to avoid instantiating stuff + // that doesn't get used -JGS + + // VertexList and vertex_iterator + typedef typename container_gen::type SeqVertexList; + typedef boost::integer_range RandVertexList; + typedef typename boost::ct_if_t::type VertexList; + + typedef typename VertexList::iterator vertex_iterator; + + // EdgeContainer and StoredEdge + + typedef typename container_gen >::type EdgeContainer; + + typedef typename ct_and::type >::type on_edge_storage; + + typedef typename boost::ct_if_t::type edges_size_type; + + typedef typename EdgeContainer::iterator EdgeIter; + + typedef typename detail::is_random_access::type is_edge_ra; + + typedef typename boost::ct_if_t, + typename boost::ct_if_t, + stored_edge_iter + >::type + >::type StoredEdge; + + // Adjacency Types + + typedef typename container_gen::type + OutEdgeList; + typedef typename OutEdgeList::size_type degree_size_type; + typedef typename OutEdgeList::iterator OutEdgeIter; + + typedef boost::detail::iterator_traits OutEdgeIterTraits; + typedef typename OutEdgeIterTraits::iterator_category OutEdgeIterCat; + typedef typename OutEdgeIterTraits::difference_type OutEdgeIterDiff; + + typedef out_edge_iter< + OutEdgeIter, vertex_descriptor, edge_descriptor, OutEdgeIterDiff + > out_edge_iterator; + + typedef typename adjacency_iterator_generator::type adjacency_iterator; + + typedef OutEdgeList InEdgeList; + typedef OutEdgeIter InEdgeIter; + typedef OutEdgeIterCat InEdgeIterCat; + typedef OutEdgeIterDiff InEdgeIterDiff; + + typedef in_edge_iter< + InEdgeIter, vertex_descriptor, edge_descriptor, InEdgeIterDiff + > in_edge_iterator; + + typedef typename inv_adjacency_iterator_generator::type inv_adjacency_iterator; + + // Edge Iterator + + typedef boost::detail::iterator_traits EdgeIterTraits; + typedef typename EdgeIterTraits::iterator_category EdgeIterCat; + typedef typename EdgeIterTraits::difference_type EdgeIterDiff; + + typedef undirected_edge_iter< + EdgeIter + , edge_descriptor + , EdgeIterDiff + > UndirectedEdgeIter; // also used for bidirectional + + typedef adj_list_edge_iterator DirectedEdgeIter; + + typedef typename boost::ct_if_t::type edge_iterator; + + // stored_vertex and StoredVertexList + typedef typename container_gen::type + SeqStoredVertexList; + struct seq_stored_vertex { + seq_stored_vertex() { } + seq_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + VertexProperty m_property; + typename SeqStoredVertexList::iterator m_position; + }; + struct bidir_seq_stored_vertex { + bidir_seq_stored_vertex() { } + bidir_seq_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + InEdgeList m_in_edges; + VertexProperty m_property; + typename SeqStoredVertexList::iterator m_position; + }; + struct rand_stored_vertex { + rand_stored_vertex() { } + rand_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + VertexProperty m_property; + }; + struct bidir_rand_stored_vertex { + bidir_rand_stored_vertex() { } + bidir_rand_stored_vertex(const VertexProperty& p) : m_property(p) { } + OutEdgeList m_out_edges; + InEdgeList m_in_edges; + VertexProperty m_property; + }; + typedef typename boost::ct_if_t::type, + typename boost::ct_if_t::type + >::type StoredVertex; + struct stored_vertex : public StoredVertex { + stored_vertex() { } + stored_vertex(const VertexProperty& p) : StoredVertex(p) { } + }; + + typedef typename container_gen::type + RandStoredVertexList; + typedef typename boost::ct_if_t< is_rand_access, + RandStoredVertexList, SeqStoredVertexList>::type StoredVertexList; + }; // end of config + + + typedef typename boost::ct_if_t, + typename boost::ct_if_t, + undirected_graph_helper + >::type + >::type DirectedHelper; + + typedef typename boost::ct_if_t, + adj_list_impl + >::type type; + + }; + + } // namespace detail + + //========================================================================= + // Vertex Property Maps + + template + struct adj_list_vertex_property_map + : public boost::put_get_helper< + Reference, + adj_list_vertex_property_map + > + { + typedef typename Graph::stored_vertex StoredVertex; + typedef ValueType value_type; + typedef Reference reference; + typedef typename Graph::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + inline adj_list_vertex_property_map() { } + inline adj_list_vertex_property_map(const Graph*) { } + inline Reference operator[](key_type v) const { + StoredVertex* sv = (StoredVertex*)v; + return get_property_value(sv->m_property, Tag()); + } + inline Reference operator()(key_type v) const { + return this->operator[](v); + } + }; + + template + struct adj_list_vertex_all_properties_map + : public boost::put_get_helper + > + { + typedef typename Graph::stored_vertex StoredVertex; + typedef Property value_type; + typedef PropRef reference; + typedef typename Graph::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + inline adj_list_vertex_all_properties_map() { } + inline adj_list_vertex_all_properties_map(const Graph*) { } + inline PropRef operator[](key_type v) const { + StoredVertex* sv = (StoredVertex*)v; + return sv->m_property; + } + inline PropRef operator()(key_type v) const { + return this->operator[](v); + } + }; + + template + struct vec_adj_list_vertex_property_map + : public boost::put_get_helper< + Reference, + vec_adj_list_vertex_property_map + > + { + typedef ValueType value_type; + typedef Reference reference; + typedef typename boost::graph_traits::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + vec_adj_list_vertex_property_map() { } + vec_adj_list_vertex_property_map(GraphPtr g) : m_g(g) { } + inline Reference operator[](key_type v) const { + return get_property_value(m_g->m_vertices[v].m_property, Tag()); + } + inline Reference operator()(key_type v) const { + return this->operator[](v); + } + GraphPtr m_g; + }; + + template + struct vec_adj_list_vertex_all_properties_map + : public boost::put_get_helper + > + { + typedef Property value_type; + typedef PropertyRef reference; + typedef typename boost::graph_traits::vertex_descriptor key_type; + typedef boost::lvalue_property_map_tag category; + vec_adj_list_vertex_all_properties_map() { } + vec_adj_list_vertex_all_properties_map(GraphPtr g) : m_g(g) { } + inline PropertyRef operator[](key_type v) const { + return m_g->m_vertices[v].m_property; + } + inline PropertyRef operator()(key_type v) const { + return this->operator[](v); + } + GraphPtr m_g; + }; + + struct adj_list_any_vertex_pa { + template + struct bind_ { + typedef typename property_value::type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef adj_list_vertex_property_map + type; + typedef adj_list_vertex_property_map + const_type; + }; + }; + struct adj_list_all_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef adj_list_vertex_all_properties_map type; + typedef adj_list_vertex_all_properties_map const_type; + }; + }; + + template + struct vec_adj_list_vertex_id_map + : public boost::put_get_helper< + Vertex, vec_adj_list_vertex_id_map + > + { + typedef Vertex value_type; + typedef Vertex key_type; + typedef Vertex reference; + typedef boost::readable_property_map_tag category; + inline vec_adj_list_vertex_id_map() { } + template + inline vec_adj_list_vertex_id_map(const Graph&) { } + inline value_type operator[](key_type v) const { return v; } + inline value_type operator()(key_type v) const { return v; } + }; + + struct vec_adj_list_any_vertex_pa { + template + struct bind_ { + typedef typename property_value::type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef vec_adj_list_vertex_property_map + type; + typedef vec_adj_list_vertex_property_map + const_type; + }; + }; + struct vec_adj_list_id_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef vec_adj_list_vertex_id_map type; + typedef vec_adj_list_vertex_id_map const_type; + }; + }; + struct vec_adj_list_all_vertex_pa { + template + struct bind_ { + typedef typename Graph::vertex_descriptor Vertex; + typedef vec_adj_list_vertex_all_properties_map + type; + typedef vec_adj_list_vertex_all_properties_map + const_type; + }; + }; + namespace detail { + template + struct adj_list_choose_vertex_pa_helper { + typedef adj_list_any_vertex_pa type; + }; + template <> + struct adj_list_choose_vertex_pa_helper { + typedef adj_list_all_vertex_pa type; + }; + template + struct adj_list_choose_vertex_pa { + typedef typename adj_list_choose_vertex_pa_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + + + template + struct vec_adj_list_choose_vertex_pa_helper { + typedef vec_adj_list_any_vertex_pa type; + }; + template <> + struct vec_adj_list_choose_vertex_pa_helper { + typedef vec_adj_list_id_vertex_pa type; + }; + template <> + struct vec_adj_list_choose_vertex_pa_helper { + typedef vec_adj_list_all_vertex_pa type; + }; + template + struct vec_adj_list_choose_vertex_pa { + typedef typename vec_adj_list_choose_vertex_pa_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + } // namespace detail + + //========================================================================= + // Edge Property Map + + template + struct adj_list_edge_property_map + : public put_get_helper< + Ref, + adj_list_edge_property_map + > + { + typedef Value value_type; + typedef Ref reference; + typedef detail::edge_desc_impl key_type; + typedef boost::lvalue_property_map_tag category; + inline Ref operator[](key_type e) const { + Property& p = *(Property*)e.get_property(); + return get_property_value(p, Tag()); + } + inline Ref operator()(key_type e) const { + return this->operator[](e); + } + }; + + template + struct adj_list_edge_all_properties_map + : public put_get_helper + > + { + typedef Property value_type; + typedef PropRef reference; + typedef detail::edge_desc_impl key_type; + typedef boost::lvalue_property_map_tag category; + inline PropRef operator[](key_type e) const { + return *(PropPtr)e.get_property(); + } + inline PropRef operator()(key_type e) const { + return this->operator[](e); + } + }; + + // Edge Property Maps + + namespace detail { + struct adj_list_any_edge_pmap { + template + struct bind_ { + typedef typename property_value::type value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + typedef adj_list_edge_property_map + type; + typedef adj_list_edge_property_map + const_type; + }; + }; + struct adj_list_all_edge_pmap { + template + struct bind_ { + typedef adj_list_edge_all_properties_map + type; + typedef adj_list_edge_all_properties_map + const_type; + }; + }; + + template + struct adj_list_choose_edge_pmap_helper { + typedef adj_list_any_edge_pmap type; + }; + template <> + struct adj_list_choose_edge_pmap_helper { + typedef adj_list_all_edge_pmap type; + }; + template + struct adj_list_choose_edge_pmap { + typedef typename adj_list_choose_edge_pmap_helper::type Helper; + typedef typename Helper::template bind_ Bind; + typedef typename Bind::type type; + typedef typename Bind::const_type const_type; + }; + struct adj_list_edge_property_selector { + template + struct bind_ { + typedef adj_list_choose_edge_pmap Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + } // namespace detail + + template <> + struct edge_property_selector { + typedef detail::adj_list_edge_property_selector type; + }; + template <> + struct edge_property_selector { + typedef detail::adj_list_edge_property_selector type; + }; + + // Vertex Property Maps + + struct adj_list_vertex_property_selector { + template + struct bind_ { + typedef detail::adj_list_choose_vertex_pa Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + template <> + struct vertex_property_selector { + typedef adj_list_vertex_property_selector type; + }; + + struct vec_adj_list_vertex_property_selector { + template + struct bind_ { + typedef detail::vec_adj_list_choose_vertex_pa Choice; + typedef typename Choice::type type; + typedef typename Choice::const_type const_type; + }; + }; + template <> + struct vertex_property_selector { + typedef vec_adj_list_vertex_property_selector type; + }; + +} // namespace boost + +#if !defined(BOOST_NO_HASH) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +namespace BOOST_STD_EXTENSION_NAMESPACE { + + #if BOOST_WORKAROUND( _STLPORT_VERSION, >= 0x500 ) + // STLport 5 already defines a hash specialization. + #else + template <> + struct hash< void* > // Need this when vertex_descriptor=void* + { + std::size_t + operator()(void* v) const { return (std::size_t)v; } + }; + #endif + + template + struct hash< boost::detail::stored_edge > + { + std::size_t + operator()(const boost::detail::stored_edge& e) const + { + return hash()(e.m_target); + } + }; + + template + struct hash< boost::detail::stored_edge_property > + { + std::size_t + operator()(const boost::detail::stored_edge_property& e) const + { + return hash()(e.m_target); + } + }; + + template + struct hash< boost::detail::stored_edge_iter > + { + std::size_t + operator()(const boost::detail::stored_edge_iter& e) const + { + return hash()(e.m_target); + } + }; + +} +#endif + + +#undef stored_edge +#undef stored_edge_property +#undef stored_edge_iter + +#endif // BOOST_GRAPH_DETAIL_DETAIL_ADJACENCY_LIST_CCT + +/* + Implementation Notes: + + Many of the public interface functions in this file would have been + more conveniently implemented as inline friend functions. + However there are a few compiler bugs that make that approach + non-portable. + + 1. g++ inline friend in namespace bug + 2. g++ using clause doesn't work with inline friends + 3. VC++ doesn't have Koenig lookup + + For these reasons, the functions were all written as non-inline free + functions, and static cast was used to convert from the helper + class to the adjacency_list derived class. + + Looking back, it might have been better to write out all functions + in terms of the adjacency_list, and then use a tag to dispatch + to the various helpers instead of using inheritance. + + */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/detail/adjacency_list.hpp --- a/epoc32/include/stdapis/boost/graph/detail/adjacency_list.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2832 +0,0 @@ -// -*- c++ -*- -//======================================================================= -// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. -// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -//======================================================================= - -#ifndef BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP -#define BOOST_GRAPH_DETAIL_ADJACENCY_LIST_HPP - -#include // for vertex_map in copy_impl -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -// Symbol truncation problems with MSVC, trying to shorten names. -#define stored_edge se_ -#define stored_edge_property sep_ -#define stored_edge_iter sei_ - -/* - Outline for this file: - - out_edge_iterator and in_edge_iterator implementation - edge_iterator for undirected graph - stored edge types (these object live in the out-edge/in-edge lists) - directed edges helper class - directed graph helper class - undirected graph helper class - bidirectional graph helper class - bidirectional graph helper class (without edge properties) - bidirectional graph helper class (with edge properties) - adjacency_list helper class - adj_list_impl class - vec_adj_list_impl class - adj_list_gen class - vertex property map - edge property map - - - Note: it would be nice to merge some of the undirected and - bidirectional code... it is awful similar. - */ - - -namespace boost { - - namespace detail { - - template - struct directed_category_traits { - typedef directed_tag directed_category; - }; - - template <> - struct directed_category_traits { - typedef directed_tag directed_category; - }; - template <> - struct directed_category_traits { - typedef undirected_tag directed_category; - }; - template <> - struct directed_category_traits { - typedef bidirectional_tag directed_category; - }; - - template - struct target_is { - target_is(const Vertex& v) : m_target(v) { } - template - bool operator()(const StoredEdge& e) const { - return e.get_target() == m_target; - } - Vertex m_target; - }; - - // O(E/V) - template - void erase_from_incidence_list(EdgeList& el, vertex_descriptor v, - allow_parallel_edge_tag) - { - boost::graph_detail::erase_if(el, detail::target_is(v)); - } - // O(log(E/V)) - template - void erase_from_incidence_list(EdgeList& el, vertex_descriptor v, - disallow_parallel_edge_tag) - { - typedef typename EdgeList::value_type StoredEdge; - el.erase(StoredEdge(v)); - } - - //========================================================================= - // Out-Edge and In-Edge Iterator Implementation - - template - struct out_edge_iter - : iterator_adaptor< - out_edge_iter - , BaseIter - , EdgeDescriptor - , use_default - , EdgeDescriptor - , Difference - > - { - typedef iterator_adaptor< - out_edge_iter - , BaseIter - , EdgeDescriptor - , use_default - , EdgeDescriptor - , Difference - > super_t; - - inline out_edge_iter() { } - inline out_edge_iter(const BaseIter& i, const VertexDescriptor& src) - : super_t(i), m_src(src) { } - - inline EdgeDescriptor - dereference() const - { - return EdgeDescriptor(m_src, (*this->base()).get_target(), - &(*this->base()).get_property()); - } - VertexDescriptor m_src; - }; - - template - struct in_edge_iter - : iterator_adaptor< - in_edge_iter - , BaseIter - , EdgeDescriptor - , use_default - , EdgeDescriptor - , Difference - > - { - typedef iterator_adaptor< - in_edge_iter - , BaseIter - , EdgeDescriptor - , use_default - , EdgeDescriptor - , Difference - > super_t; - - inline in_edge_iter() { } - inline in_edge_iter(const BaseIter& i, const VertexDescriptor& src) - : super_t(i), m_src(src) { } - - inline EdgeDescriptor - dereference() const - { - return EdgeDescriptor((*this->base()).get_target(), m_src, - &this->base()->get_property()); - } - VertexDescriptor m_src; - }; - - //========================================================================= - // Undirected Edge Iterator Implementation - - template - struct undirected_edge_iter - : iterator_adaptor< - undirected_edge_iter - , EdgeIter - , EdgeDescriptor - , use_default - , EdgeDescriptor - , Difference - > - { - typedef iterator_adaptor< - undirected_edge_iter - , EdgeIter - , EdgeDescriptor - , use_default - , EdgeDescriptor - , Difference - > super_t; - - undirected_edge_iter() {} - - explicit undirected_edge_iter(EdgeIter i) - : super_t(i) {} - - inline EdgeDescriptor - dereference() const { - return EdgeDescriptor( - (*this->base()).m_source - , (*this->base()).m_target - , &this->base()->get_property()); - } - }; - - //========================================================================= - // Edge Storage Types (stored in the out-edge/in-edge lists) - - template - class stored_edge - : public boost::equality_comparable1< stored_edge, - boost::less_than_comparable1< stored_edge > > - { - public: - typedef no_property property_type; - inline stored_edge() { } - inline stored_edge(Vertex target, const no_property& = no_property()) - : m_target(target) { } - // Need to write this explicitly so stored_edge_property can - // invoke Base::operator= (at least, for SGI MIPSPro compiler) - inline stored_edge& operator=(const stored_edge& x) { - m_target = x.m_target; - return *this; - } - inline Vertex& get_target() const { return m_target; } - inline const no_property& get_property() const { return s_prop; } - inline bool operator==(const stored_edge& x) const - { return m_target == x.get_target(); } - inline bool operator<(const stored_edge& x) const - { return m_target < x.get_target(); } - //protected: need to add hash<> as a friend - static no_property s_prop; - // Sometimes target not used as key in the set, and in that case - // it is ok to change the target. - mutable Vertex m_target; - }; - template - no_property stored_edge::s_prop; - - template - class stored_edge_property : public stored_edge { - typedef stored_edge_property self; - typedef stored_edge Base; - public: - typedef Property property_type; - inline stored_edge_property() { } - inline stored_edge_property(Vertex target, - const Property& p = Property()) - : stored_edge(target), m_property(new Property(p)) { } - stored_edge_property(const self& x) - : Base(x), m_property(const_cast(x).m_property) { } - self& operator=(const self& x) { - Base::operator=(x); - m_property = const_cast(x).m_property; - return *this; - } - inline Property& get_property() { return *m_property; } - inline const Property& get_property() const { return *m_property; } - protected: - // Holding the property by-value causes edge-descriptor - // invalidation for add_edge() with EdgeList=vecS. Instead we - // hold a pointer to the property. std::auto_ptr is not - // a perfect fit for the job, but it is darn close. - std::auto_ptr m_property; - }; - - - template - class stored_edge_iter - : public stored_edge - { - public: - typedef Property property_type; - inline stored_edge_iter() { } - inline stored_edge_iter(Vertex v) - : stored_edge(v) { } - inline stored_edge_iter(Vertex v, Iter i, void* = 0) - : stored_edge(v), m_iter(i) { } - inline Property& get_property() { return m_iter->get_property(); } - inline const Property& get_property() const { - return m_iter->get_property(); - } - inline Iter get_iter() const { return m_iter; } - protected: - Iter m_iter; - }; - - // For when the EdgeList is a std::vector. - // Want to make the iterator stable, so use an offset - // instead of an iterator into a std::vector - template - class stored_ra_edge_iter - : public stored_edge - { - typedef typename EdgeVec::iterator Iter; - public: - typedef Property property_type; - inline stored_ra_edge_iter() { } - inline stored_ra_edge_iter(Vertex v, Iter i = Iter(), - EdgeVec* edge_vec = 0) - : stored_edge(v), m_i(i - edge_vec->begin()), m_vec(edge_vec){ } - inline Property& get_property() { return (*m_vec)[m_i].get_property(); } - inline const Property& get_property() const { - return (*m_vec)[m_i].get_property(); - } - inline Iter get_iter() const { return m_vec->begin() + m_i; } - protected: - std::size_t m_i; - EdgeVec* m_vec; - }; - - } // namespace detail - - template - const typename property_value::type& - get(Tag property_tag, - const detail::stored_edge_property& e) - { - return get_property_value(e.get_property(), property_tag); - } - - template - const typename property_value::type& - get(Tag property_tag, - const detail::stored_edge_iter& e) - { - return get_property_value(e.get_property(), property_tag); - } - - template - const typename property_value::type& - get(Tag property_tag, - const detail::stored_ra_edge_iter& e) - { - return get_property_value(e.get_property(), property_tag); - } - - //========================================================================= - // Directed Edges Helper Class - - namespace detail { - - // O(E/V) - template - inline void - remove_directed_edge_dispatch(edge_descriptor, EdgeList& el, - StoredProperty& p) - { - for (typename EdgeList::iterator i = el.begin(); - i != el.end(); ++i) - if (&(*i).get_property() == &p) { - el.erase(i); - return; - } - } - - template - inline void - remove_directed_edge_if_dispatch(incidence_iterator first, - incidence_iterator last, - EdgeList& el, Predicate pred, - boost::allow_parallel_edge_tag) - { - // remove_if - while (first != last && !pred(*first)) - ++first; - incidence_iterator i = first; - if (first != last) - for (; i != last; ++i) - if (!pred(*i)) { - *first.base() = *i.base(); - ++first; - } - el.erase(first.base(), el.end()); - } - template - inline void - remove_directed_edge_if_dispatch(incidence_iterator first, - incidence_iterator last, - EdgeList& el, - Predicate pred, - boost::disallow_parallel_edge_tag) - { - for (incidence_iterator next = first; - first != last; first = next) { - ++next; - if (pred(*first)) - el.erase( first.base() ); - } - } - - template - inline void - undirected_remove_out_edge_if_dispatch(Graph& g, - incidence_iterator first, - incidence_iterator last, - EdgeList& el, Predicate pred, - boost::allow_parallel_edge_tag) - { - typedef typename Graph::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - // remove_if - while (first != last && !pred(*first)) - ++first; - incidence_iterator i = first; - bool self_loop_removed = false; - if (first != last) - for (; i != last; ++i) { - if (self_loop_removed) { - /* With self loops, the descriptor will show up - * twice. The first time it will be removed, and now it - * will be skipped. - */ - self_loop_removed = false; - } - else if (!pred(*i)) { - *first.base() = *i.base(); - ++first; - } else { - if (source(*i, g) == target(*i, g)) self_loop_removed = true; - else { - // Remove the edge from the target - detail::remove_directed_edge_dispatch - (*i, - g.out_edge_list(target(*i, g)), - *(PropT*)(*i).get_property()); - } - - // Erase the edge property - g.m_edges.erase( (*i.base()).get_iter() ); - } - } - el.erase(first.base(), el.end()); - } - template - inline void - undirected_remove_out_edge_if_dispatch(Graph& g, - incidence_iterator first, - incidence_iterator last, - EdgeList& el, - Predicate pred, - boost::disallow_parallel_edge_tag) - { - typedef typename Graph::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - for (incidence_iterator next = first; - first != last; first = next) { - ++next; - if (pred(*first)) { - if (source(*first, g) != target(*first, g)) { - // Remove the edge from the target - detail::remove_directed_edge_dispatch - (*first, - g.out_edge_list(target(*first, g)), - *(PropT*)(*first).get_property()); - } - - // Erase the edge property - g.m_edges.erase( (*first.base()).get_iter() ); - - // Erase the edge in the source - el.erase( first.base() ); - } - } - } - - // O(E/V) - template - inline void - remove_directed_edge_dispatch(edge_descriptor e, EdgeList& el, - no_property&) - { - for (typename EdgeList::iterator i = el.begin(); - i != el.end(); ++i) - if ((*i).get_target() == e.m_target) { - el.erase(i); - return; - } - } - - } // namespace detail - - template - struct directed_edges_helper { - - // Placement of these overloaded remove_edge() functions - // inside the class avoids a VC++ bug. - - // O(E/V) - inline void - remove_edge(typename Config::edge_descriptor e) - { - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(*this); - typename Config::OutEdgeList& el = g.out_edge_list(source(e, g)); - typedef typename Config::OutEdgeList::value_type::property_type PType; - detail::remove_directed_edge_dispatch(e, el, - *(PType*)e.get_property()); - } - - // O(1) - inline void - remove_edge(typename Config::out_edge_iterator iter) - { - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(*this); - typename Config::edge_descriptor e = *iter; - typename Config::OutEdgeList& el = g.out_edge_list(source(e, g)); - el.erase(iter.base()); - } - - }; - - // O(1) - template - inline std::pair - edges(const directed_edges_helper& g_) - { - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_iterator edge_iterator; - const graph_type& cg = static_cast(g_); - graph_type& g = const_cast(cg); - return std::make_pair( edge_iterator(g.vertex_set().begin(), - g.vertex_set().begin(), - g.vertex_set().end(), g), - edge_iterator(g.vertex_set().begin(), - g.vertex_set().end(), - g.vertex_set().end(), g) ); - } - - //========================================================================= - // Directed Graph Helper Class - - struct adj_list_dir_traversal_tag : - public virtual vertex_list_graph_tag, - public virtual incidence_graph_tag, - public virtual adjacency_graph_tag, - public virtual edge_list_graph_tag { }; - - template - struct directed_graph_helper - : public directed_edges_helper { - typedef typename Config::edge_descriptor edge_descriptor; - typedef adj_list_dir_traversal_tag traversal_category; - }; - - // O(E/V) - template - inline void - remove_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - directed_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - detail::erase_from_incidence_list(g.out_edge_list(u), v, Cat()); - } - - template - inline void - remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, - directed_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - typename Config::out_edge_iterator first, last; - tie(first, last) = out_edges(u, g); - typedef typename Config::edge_parallel_category edge_parallel_category; - detail::remove_directed_edge_if_dispatch - (first, last, g.out_edge_list(u), pred, edge_parallel_category()); - } - - template - inline void - remove_edge_if(Predicate pred, directed_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - - typename Config::vertex_iterator vi, vi_end; - for (tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) - remove_out_edge_if(*vi, pred, g); - } - - template - inline void - remove_edge(EdgeOrIter e_or_iter, directed_graph_helper& g_) - { - g_.remove_edge(e_or_iter); - } - - // O(V + E) for allow_parallel_edges - // O(V * log(E/V)) for disallow_parallel_edges - template - inline void - clear_vertex(typename Config::vertex_descriptor u, - directed_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - typename Config::vertex_iterator vi, viend; - for (boost::tie(vi, viend) = vertices(g); vi != viend; ++vi) - detail::erase_from_incidence_list(g.out_edge_list(*vi), u, Cat()); - g.out_edge_list(u).clear(); - // clear() should be a req of Sequence and AssociativeContainer, - // or maybe just Container - } - - template - inline void - clear_out_edges(typename Config::vertex_descriptor u, - directed_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - g.out_edge_list(u).clear(); - // clear() should be a req of Sequence and AssociativeContainer, - // or maybe just Container - } - - // O(V), could do better... - template - inline typename Config::edges_size_type - num_edges(const directed_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - const graph_type& g = static_cast(g_); - typename Config::edges_size_type num_e = 0; - typename Config::vertex_iterator vi, vi_end; - for (boost::tie(vi, vi_end) = vertices(g); vi != vi_end; ++vi) - num_e += out_degree(*vi, g); - return num_e; - } - // O(1) for allow_parallel_edge_tag - // O(log(E/V)) for disallow_parallel_edge_tag - template - inline std::pair::edge_descriptor, bool> - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - const typename Config::edge_property_type& p, - directed_graph_helper& g_) - { - typedef typename Config::edge_descriptor edge_descriptor; - typedef typename Config::graph_type graph_type; - typedef typename Config::StoredEdge StoredEdge; - graph_type& g = static_cast(g_); - typename Config::OutEdgeList::iterator i; - bool inserted; - boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), - StoredEdge(v, p)); - return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), - inserted); - } - // Did not use default argument here because that - // causes Visual C++ to get confused. - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - directed_graph_helper& g_) - { - typename Config::edge_property_type p; - return add_edge(u, v, p, g_); - } - //========================================================================= - // Undirected Graph Helper Class - - template - struct undirected_graph_helper; - - struct undir_adj_list_traversal_tag : - public virtual vertex_list_graph_tag, - public virtual incidence_graph_tag, - public virtual adjacency_graph_tag, - public virtual edge_list_graph_tag, - public virtual bidirectional_graph_tag { }; - - namespace detail { - - // using class with specialization for dispatch is a VC++ workaround. - template - struct remove_undirected_edge_dispatch { - - // O(E/V) - template - static void - apply(edge_descriptor e, - undirected_graph_helper& g_, - StoredProperty& p) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - - typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g)); - typename Config::OutEdgeList::iterator out_i = out_el.begin(); - for (; out_i != out_el.end(); ++out_i) - if (&(*out_i).get_property() == &p) { - out_el.erase(out_i); - break; - } - typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g)); - typename Config::OutEdgeList::iterator in_i = in_el.begin(); - for (; in_i != in_el.end(); ++in_i) - if (&(*in_i).get_property() == &p) { - g.m_edges.erase((*in_i).get_iter()); - in_el.erase(in_i); - return; - } - } - }; - - template <> - struct remove_undirected_edge_dispatch { - // O(E/V) - template - static void - apply(edge_descriptor e, - undirected_graph_helper& g_, - no_property&) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - no_property* p = (no_property*)e.get_property(); - typename Config::OutEdgeList& out_el = g.out_edge_list(source(e, g)); - typename Config::OutEdgeList::iterator out_i = out_el.begin(); - for (; out_i != out_el.end(); ++out_i) - if (&(*out_i).get_property() == p) { - out_el.erase(out_i); - break; - } - typename Config::OutEdgeList& in_el = g.out_edge_list(target(e, g)); - typename Config::OutEdgeList::iterator in_i = in_el.begin(); - for (; in_i != in_el.end(); ++in_i) - if (&(*in_i).get_property() == p) { - g.m_edges.erase((*in_i).get_iter()); - in_el.erase(in_i); - return; - } - } - }; - - // O(E/V) - template - inline void - remove_edge_and_property(Graph& g, EdgeList& el, Vertex v, - boost::allow_parallel_edge_tag cat) - { - typedef typename Graph::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename EdgeList::value_type StoredEdge; - typename EdgeList::iterator i = el.begin(), end = el.end(); - for (; i != end; ++i) - if ((*i).get_target() == v) - g.m_edges.erase((*i).get_iter()); - detail::erase_from_incidence_list(el, v, cat); - } - // O(log(E/V)) - template - inline void - remove_edge_and_property(Graph& g, EdgeList& el, Vertex v, - boost::disallow_parallel_edge_tag) - { - typedef typename Graph::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename EdgeList::value_type StoredEdge; - typename EdgeList::iterator i = el.find(StoredEdge(v)), end = el.end(); - if (i != end) { - g.m_edges.erase((*i).get_iter()); - el.erase(i); - } - } - - } // namespace detail - - template - struct list_edge // short name due to VC++ truncation and linker problems - : public boost::detail::edge_base - { - typedef EdgeProperty property_type; - typedef boost::detail::edge_base Base; - list_edge(Vertex u, Vertex v, const EdgeProperty& p = EdgeProperty()) - : Base(u, v), m_property(p) { } - EdgeProperty& get_property() { return m_property; } - const EdgeProperty& get_property() const { return m_property; } - // the following methods should never be used, but are needed - // to make SGI MIPSpro C++ happy - list_edge() { } - bool operator==(const list_edge&) const { return false; } - bool operator<(const list_edge&) const { return false; } - EdgeProperty m_property; - }; - - template - struct undirected_graph_helper { - - typedef undir_adj_list_traversal_tag traversal_category; - - // Placement of these overloaded remove_edge() functions - // inside the class avoids a VC++ bug. - - // O(E/V) - inline void - remove_edge(typename Config::edge_descriptor e) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::OutEdgeList::value_type::property_type PType; - detail::remove_undirected_edge_dispatch::apply - (e, *this, *(PType*)e.get_property()); - } - // O(E/V) - inline void - remove_edge(typename Config::out_edge_iterator iter) - { - this->remove_edge(*iter); - } - }; - - // Had to make these non-members to avoid accidental instantiation - // on SGI MIPSpro C++ - template - inline typename C::InEdgeList& - in_edge_list(undirected_graph_helper&, - typename C::vertex_descriptor v) - { - typename C::stored_vertex* sv = (typename C::stored_vertex*)v; - return sv->m_out_edges; - } - template - inline const typename C::InEdgeList& - in_edge_list(const undirected_graph_helper&, - typename C::vertex_descriptor v) { - typename C::stored_vertex* sv = (typename C::stored_vertex*)v; - return sv->m_out_edges; - } - - // O(E/V) - template - inline void - remove_edge(EdgeOrIter e, undirected_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - g_.remove_edge(e); - } - - // O(E/V) or O(log(E/V)) - template - void - remove_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - undirected_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - typedef typename Config::edge_parallel_category Cat; - detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat()); - detail::erase_from_incidence_list(g.out_edge_list(v), u, Cat()); - } - - template - void - remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, - undirected_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::OutEdgeList::value_type::property_type PropT; - graph_type& g = static_cast(g_); - typename Config::out_edge_iterator first, last; - tie(first, last) = out_edges(u, g); - typedef typename Config::edge_parallel_category Cat; - detail::undirected_remove_out_edge_if_dispatch - (g, first, last, g.out_edge_list(u), pred, Cat()); - } - template - void - remove_in_edge_if(typename Config::vertex_descriptor u, Predicate pred, - undirected_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - remove_out_edge_if(u, pred, g_); - } - - // O(E/V * E) or O(log(E/V) * E) - template - void - remove_edge_if(Predicate pred, undirected_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - typename Config::edge_iterator ei, ei_end, next; - tie(ei, ei_end) = edges(g); - for (next = ei; ei != ei_end; ei = next) { - ++next; - if (pred(*ei)) - remove_edge(*ei, g); - } - } - - // O(1) - template - inline std::pair - edges(const undirected_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_iterator edge_iterator; - const graph_type& cg = static_cast(g_); - graph_type& g = const_cast(cg); - return std::make_pair( edge_iterator(g.m_edges.begin()), - edge_iterator(g.m_edges.end()) ); - } - // O(1) - template - inline typename Config::edges_size_type - num_edges(const undirected_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - const graph_type& g = static_cast(g_); - return g.m_edges.size(); - } - // O(E/V * E/V) - template - inline void - clear_vertex(typename Config::vertex_descriptor u, - undirected_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - typename Config::OutEdgeList& el = g.out_edge_list(u); - typename Config::OutEdgeList::iterator - ei = el.begin(), ei_end = el.end(); - for (; ei != ei_end; ++ei) { - detail::erase_from_incidence_list - (g.out_edge_list((*ei).get_target()), u, Cat()); - g.m_edges.erase((*ei).get_iter()); - } - g.out_edge_list(u).clear(); - } - // O(1) for allow_parallel_edge_tag - // O(log(E/V)) for disallow_parallel_edge_tag - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - const typename Config::edge_property_type& p, - undirected_graph_helper& g_) - { - typedef typename Config::StoredEdge StoredEdge; - typedef typename Config::edge_descriptor edge_descriptor; - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - - bool inserted; - typename Config::EdgeContainer::value_type e(u, v, p); - typename Config::EdgeContainer::iterator p_iter - = graph_detail::push(g.m_edges, e).first; - - typename Config::OutEdgeList::iterator i; - boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), - StoredEdge(v, p_iter, &g.m_edges)); - if (inserted) { - boost::graph_detail::push(g.out_edge_list(v), StoredEdge(u, p_iter, &g.m_edges)); - return std::make_pair(edge_descriptor(u, v, &p_iter->get_property()), - true); - } else { - g.m_edges.erase(p_iter); - return std::make_pair - (edge_descriptor(u, v, &i->get_iter()->get_property()), false); - } - } - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - undirected_graph_helper& g_) - { - typename Config::edge_property_type p; - return add_edge(u, v, p, g_); - } - - // O(1) - template - inline typename Config::degree_size_type - degree(typename Config::vertex_descriptor u, - const undirected_graph_helper& g_) - { - typedef typename Config::graph_type Graph; - const Graph& g = static_cast(g_); - return out_degree(u, g); - } - - template - inline std::pair - in_edges(typename Config::vertex_descriptor u, - const undirected_graph_helper& g_) - { - typedef typename Config::graph_type Graph; - const Graph& cg = static_cast(g_); - Graph& g = const_cast(cg); - typedef typename Config::in_edge_iterator in_edge_iterator; - return - std::make_pair(in_edge_iterator(g.out_edge_list(u).begin(), u), - in_edge_iterator(g.out_edge_list(u).end(), u)); - } - - template - inline typename Config::degree_size_type - in_degree(typename Config::vertex_descriptor u, - const undirected_graph_helper& g_) - { return degree(u, g_); } - - //========================================================================= - // Bidirectional Graph Helper Class - - struct bidir_adj_list_traversal_tag : - public virtual vertex_list_graph_tag, - public virtual incidence_graph_tag, - public virtual adjacency_graph_tag, - public virtual edge_list_graph_tag, - public virtual bidirectional_graph_tag { }; - - template - struct bidirectional_graph_helper - : public directed_edges_helper { - typedef bidir_adj_list_traversal_tag traversal_category; - }; - - // Had to make these non-members to avoid accidental instantiation - // on SGI MIPSpro C++ - template - inline typename C::InEdgeList& - in_edge_list(bidirectional_graph_helper&, - typename C::vertex_descriptor v) - { - typename C::stored_vertex* sv = (typename C::stored_vertex*)v; - return sv->m_in_edges; - } - template - inline const typename C::InEdgeList& - in_edge_list(const bidirectional_graph_helper&, - typename C::vertex_descriptor v) { - typename C::stored_vertex* sv = (typename C::stored_vertex*)v; - return sv->m_in_edges; - } - - template - inline void - remove_edge_if(Predicate pred, bidirectional_graph_helper& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - typename Config::edge_iterator ei, ei_end, next; - tie(ei, ei_end) = edges(g); - for (next = ei; ei != ei_end; ei = next) { - ++next; - if (pred(*ei)) - remove_edge(*ei, g); - } - } - - template - inline std::pair - in_edges(typename Config::vertex_descriptor u, - const bidirectional_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - const graph_type& cg = static_cast(g_); - graph_type& g = const_cast(cg); - typedef typename Config::in_edge_iterator in_edge_iterator; - return - std::make_pair(in_edge_iterator(in_edge_list(g, u).begin(), u), - in_edge_iterator(in_edge_list(g, u).end(), u)); - } - - // O(1) - template - inline std::pair - edges(const bidirectional_graph_helper& g_) - { - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_iterator edge_iterator; - const graph_type& cg = static_cast(g_); - graph_type& g = const_cast(cg); - return std::make_pair( edge_iterator(g.m_edges.begin()), - edge_iterator(g.m_edges.end()) ); - } - - //========================================================================= - // Bidirectional Graph Helper Class (with edge properties) - - - template - struct bidirectional_graph_helper_with_property - : public bidirectional_graph_helper - { - typedef typename Config::graph_type graph_type; - typedef typename Config::out_edge_iterator out_edge_iterator; - - std::pair - get_parallel_edge_sublist(typename Config::edge_descriptor e, - const graph_type& g, - void*) - { return out_edges(source(e, g), g); } - - std::pair - get_parallel_edge_sublist(typename Config::edge_descriptor e, - const graph_type& g, - setS*) - { return edge_range(source(e, g), target(e, g), g); } - - std::pair - get_parallel_edge_sublist(typename Config::edge_descriptor e, - const graph_type& g, - multisetS*) - { return edge_range(source(e, g), target(e, g), g); } - -#if !defined BOOST_NO_HASH - std::pair - get_parallel_edge_sublist(typename Config::edge_descriptor e, - const graph_type& g, - hash_setS*) - { return edge_range(source(e, g), target(e, g), g); } -#endif - - // Placement of these overloaded remove_edge() functions - // inside the class avoids a VC++ bug. - - // O(E/V) or O(log(E/V)) - void - remove_edge(typename Config::edge_descriptor e) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - graph_type& g = static_cast(*this); - - typedef typename Config::edgelist_selector OutEdgeListS; - - std::pair rng = - get_parallel_edge_sublist(e, g, (OutEdgeListS*)(0)); - rng.first = std::find(rng.first, rng.second, e); - assert(rng.first != rng.second); - remove_edge(rng.first); - } - - inline void - remove_edge(typename Config::out_edge_iterator iter) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(*this); - typename Config::edge_descriptor e = *iter; - typename Config::OutEdgeList& oel = g.out_edge_list(source(e, g)); - typename Config::InEdgeList& iel = in_edge_list(g, target(e, g)); - typedef typename Config::OutEdgeList::value_type::property_type PType; - PType& p = *(PType*)e.get_property(); - detail::remove_directed_edge_dispatch(*iter, iel, p); - g.m_edges.erase(iter.base()->get_iter()); - oel.erase(iter.base()); - } - }; - - // O(E/V) for allow_parallel_edge_tag - // O(log(E/V)) for disallow_parallel_edge_tag - template - inline void - remove_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - typedef typename Config::edge_parallel_category Cat; - detail::remove_edge_and_property(g, g.out_edge_list(u), v, Cat()); - detail::erase_from_incidence_list(in_edge_list(g, v), u, Cat()); - } - - // O(E/V) or O(log(E/V)) - template - inline void - remove_edge(EdgeOrIter e, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - g_.remove_edge(e); - } - - template - inline void - remove_out_edge_if(typename Config::vertex_descriptor u, Predicate pred, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::OutEdgeList::value_type::property_type PropT; - graph_type& g = static_cast(g_); - - typedef typename Config::EdgeIter EdgeIter; - typedef std::vector Garbage; - Garbage garbage; - - // First remove the edges from the targets' in-edge lists and - // from the graph's edge set list. - typename Config::out_edge_iterator out_i, out_end; - for (tie(out_i, out_end) = out_edges(u, g); out_i != out_end; ++out_i) - if (pred(*out_i)) { - detail::remove_directed_edge_dispatch - (*out_i, in_edge_list(g, target(*out_i, g)), - *(PropT*)(*out_i).get_property()); - // Put in garbage to delete later. Will need the properties - // for the remove_if of the out-edges. - garbage.push_back((*out_i.base()).get_iter()); - } - - // Now remove the edges from this out-edge list. - typename Config::out_edge_iterator first, last; - tie(first, last) = out_edges(u, g); - typedef typename Config::edge_parallel_category Cat; - detail::remove_directed_edge_if_dispatch - (first, last, g.out_edge_list(u), pred, Cat()); - - // Now delete the edge properties from the g.m_edges list - for (typename Garbage::iterator i = garbage.begin(); - i != garbage.end(); ++i) - g.m_edges.erase(*i); - } - template - inline void - remove_in_edge_if(typename Config::vertex_descriptor v, Predicate pred, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::OutEdgeList::value_type::property_type PropT; - graph_type& g = static_cast(g_); - - typedef typename Config::EdgeIter EdgeIter; - typedef std::vector Garbage; - Garbage garbage; - - // First remove the edges from the sources' out-edge lists and - // from the graph's edge set list. - typename Config::in_edge_iterator in_i, in_end; - for (tie(in_i, in_end) = in_edges(v, g); in_i != in_end; ++in_i) - if (pred(*in_i)) { - typename Config::vertex_descriptor u = source(*in_i, g); - detail::remove_directed_edge_dispatch - (*in_i, g.out_edge_list(u), *(PropT*)(*in_i).get_property()); - // Put in garbage to delete later. Will need the properties - // for the remove_if of the out-edges. - garbage.push_back((*in_i.base()).get_iter()); - } - // Now remove the edges from this in-edge list. - typename Config::in_edge_iterator first, last; - tie(first, last) = in_edges(v, g); - typedef typename Config::edge_parallel_category Cat; - detail::remove_directed_edge_if_dispatch - (first, last, in_edge_list(g, v), pred, Cat()); - - // Now delete the edge properties from the g.m_edges list - for (typename Garbage::iterator i = garbage.begin(); - i != garbage.end(); ++i) - g.m_edges.erase(*i); - } - - // O(1) - template - inline typename Config::edges_size_type - num_edges(const bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::graph_type graph_type; - const graph_type& g = static_cast(g_); - return g.m_edges.size(); - } - // O(E/V * E/V) for allow_parallel_edge_tag - // O(E/V * log(E/V)) for disallow_parallel_edge_tag - template - inline void - clear_vertex(typename Config::vertex_descriptor u, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - typename Config::OutEdgeList& el = g.out_edge_list(u); - typename Config::OutEdgeList::iterator - ei = el.begin(), ei_end = el.end(); - for (; ei != ei_end; ++ei) { - detail::erase_from_incidence_list - (in_edge_list(g, (*ei).get_target()), u, Cat()); - g.m_edges.erase((*ei).get_iter()); - } - typename Config::InEdgeList& in_el = in_edge_list(g, u); - typename Config::InEdgeList::iterator - in_ei = in_el.begin(), in_ei_end = in_el.end(); - for (; in_ei != in_ei_end; ++in_ei) { - detail::erase_from_incidence_list - (g.out_edge_list((*in_ei).get_target()), u, Cat()); - g.m_edges.erase((*in_ei).get_iter()); - } - g.out_edge_list(u).clear(); - in_edge_list(g, u).clear(); - } - - template - inline void - clear_out_edges(typename Config::vertex_descriptor u, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - typename Config::OutEdgeList& el = g.out_edge_list(u); - typename Config::OutEdgeList::iterator - ei = el.begin(), ei_end = el.end(); - for (; ei != ei_end; ++ei) { - detail::erase_from_incidence_list - (in_edge_list(g, (*ei).get_target()), u, Cat()); - g.m_edges.erase((*ei).get_iter()); - } - g.out_edge_list(u).clear(); - } - - template - inline void - clear_in_edges(typename Config::vertex_descriptor u, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Config::graph_type graph_type; - typedef typename Config::edge_parallel_category Cat; - graph_type& g = static_cast(g_); - typename Config::InEdgeList& in_el = in_edge_list(g, u); - typename Config::InEdgeList::iterator - in_ei = in_el.begin(), in_ei_end = in_el.end(); - for (; in_ei != in_ei_end; ++in_ei) { - detail::erase_from_incidence_list - (g.out_edge_list((*in_ei).get_target()), u, Cat()); - g.m_edges.erase((*in_ei).get_iter()); - } - in_edge_list(g, u).clear(); - } - - // O(1) for allow_parallel_edge_tag - // O(log(E/V)) for disallow_parallel_edge_tag - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - const typename Config::edge_property_type& p, - bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::graph_type graph_type; - graph_type& g = static_cast(g_); - typedef typename Config::edge_descriptor edge_descriptor; - typedef typename Config::StoredEdge StoredEdge; - bool inserted; - typename Config::EdgeContainer::value_type e(u, v, p); - typename Config::EdgeContainer::iterator p_iter - = graph_detail::push(g.m_edges, e).first; - typename Config::OutEdgeList::iterator i; - boost::tie(i, inserted) = boost::graph_detail::push(g.out_edge_list(u), - StoredEdge(v, p_iter, &g.m_edges)); - if (inserted) { - boost::graph_detail::push(in_edge_list(g, v), StoredEdge(u, p_iter, &g.m_edges)); - return std::make_pair(edge_descriptor(u, v, &p_iter->m_property), - true); - } else { - g.m_edges.erase(p_iter); - return std::make_pair(edge_descriptor(u, v, - &i->get_iter()->get_property()), - false); - } - } - - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - bidirectional_graph_helper_with_property& g_) - { - typename Config::edge_property_type p; - return add_edge(u, v, p, g_); - } - // O(1) - template - inline typename Config::degree_size_type - degree(typename Config::vertex_descriptor u, - const bidirectional_graph_helper_with_property& g_) - { - typedef typename Config::graph_type graph_type; - const graph_type& g = static_cast(g_); - return in_degree(u, g) + out_degree(u, g); - } - - //========================================================================= - // Adjacency List Helper Class - - template - struct adj_list_helper : public Base - { - typedef typename Config::graph_type AdjList; - typedef typename Config::vertex_descriptor vertex_descriptor; - typedef typename Config::edge_descriptor edge_descriptor; - typedef typename Config::out_edge_iterator out_edge_iterator; - typedef typename Config::in_edge_iterator in_edge_iterator; - typedef typename Config::adjacency_iterator adjacency_iterator; - typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator; - typedef typename Config::vertex_iterator vertex_iterator; - typedef typename Config::edge_iterator edge_iterator; - typedef typename Config::directed_category directed_category; - typedef typename Config::edge_parallel_category edge_parallel_category; - typedef typename Config::vertices_size_type vertices_size_type; - typedef typename Config::edges_size_type edges_size_type; - typedef typename Config::degree_size_type degree_size_type; - typedef typename Config::StoredEdge StoredEdge; - typedef typename Config::edge_property_type edge_property_type; - - typedef typename Config::global_edgelist_selector - global_edgelist_selector; - - // protected: - - // The edge_dispatch() functions should be static, but - // Borland gets confused about constness. - - // O(E/V) - inline std::pair - edge_dispatch(const AdjList& g, - vertex_descriptor u, vertex_descriptor v, - boost::allow_parallel_edge_tag) const - { - bool found; - const typename Config::OutEdgeList& el = g.out_edge_list(u); - typename Config::OutEdgeList::const_iterator - i = std::find_if(el.begin(), el.end(), - detail::target_is(v)); - found = (i != g.out_edge_list(u).end()); - if (found) - return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), - true); - else - return std::make_pair(edge_descriptor(u, v, 0), false); - } - // O(log(E/V)) - inline std::pair - edge_dispatch(const AdjList& g, - vertex_descriptor u, vertex_descriptor v, - boost::disallow_parallel_edge_tag) const - { - bool found; - /* According to the standard, this should be iterator, not const_iterator, - but the VC++ std::set::find() const returns const_iterator. - And since iterator should be convertible to const_iterator, the - following should work everywhere. -Jeremy */ - typename Config::OutEdgeList::const_iterator - i = g.out_edge_list(u).find(StoredEdge(v)), - end = g.out_edge_list(u).end(); - found = (i != end); - if (found) - return std::make_pair(edge_descriptor(u, v, &(*i).get_property()), - true); - else - return std::make_pair(edge_descriptor(u, v, 0), false); - } - }; - - template - inline std::pair - adjacent_vertices(typename Config::vertex_descriptor u, - const adj_list_helper& g_) - { - typedef typename Config::graph_type AdjList; - const AdjList& cg = static_cast(g_); - AdjList& g = const_cast(cg); - typedef typename Config::adjacency_iterator adjacency_iterator; - typename Config::out_edge_iterator first, last; - boost::tie(first, last) = out_edges(u, g); - return std::make_pair(adjacency_iterator(first, &g), - adjacency_iterator(last, &g)); - } - template - inline std::pair - inv_adjacent_vertices(typename Config::vertex_descriptor u, - const adj_list_helper& g_) - { - typedef typename Config::graph_type AdjList; - const AdjList& cg = static_cast(g_); - AdjList& g = const_cast(cg); - typedef typename Config::inv_adjacency_iterator inv_adjacency_iterator; - typename Config::in_edge_iterator first, last; - boost::tie(first, last) = in_edges(u, g); - return std::make_pair(inv_adjacency_iterator(first, &g), - inv_adjacency_iterator(last, &g)); - } - template - inline std::pair - out_edges(typename Config::vertex_descriptor u, - const adj_list_helper& g_) - { - typedef typename Config::graph_type AdjList; - typedef typename Config::out_edge_iterator out_edge_iterator; - const AdjList& cg = static_cast(g_); - AdjList& g = const_cast(cg); - return - std::make_pair(out_edge_iterator(g.out_edge_list(u).begin(), u), - out_edge_iterator(g.out_edge_list(u).end(), u)); - } - template - inline std::pair - vertices(const adj_list_helper& g_) - { - typedef typename Config::graph_type AdjList; - const AdjList& cg = static_cast(g_); - AdjList& g = const_cast(cg); - return std::make_pair( g.vertex_set().begin(), g.vertex_set().end() ); - } - template - inline typename Config::vertices_size_type - num_vertices(const adj_list_helper& g_) - { - typedef typename Config::graph_type AdjList; - const AdjList& g = static_cast(g_); - return g.vertex_set().size(); - } - template - inline typename Config::degree_size_type - out_degree(typename Config::vertex_descriptor u, - const adj_list_helper& g_) - { - typedef typename Config::graph_type AdjList; - const AdjList& g = static_cast(g_); - return g.out_edge_list(u).size(); - } - template - inline std::pair - edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - const adj_list_helper& g_) - { - typedef typename Config::graph_type Graph; - typedef typename Config::edge_parallel_category Cat; - const Graph& g = static_cast(g_); - return g_.edge_dispatch(g, u, v, Cat()); - } - template - inline std::pair - edge_range(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - const adj_list_helper& g_) - { - typedef typename Config::graph_type Graph; - typedef typename Config::StoredEdge StoredEdge; - const Graph& cg = static_cast(g_); - Graph& g = const_cast(cg); - typedef typename Config::out_edge_iterator out_edge_iterator; - typename Config::OutEdgeList& el = g.out_edge_list(u); - typename Config::OutEdgeList::iterator first, last; - typename Config::EdgeContainer fake_edge_container; - tie(first, last) = - std::equal_range(el.begin(), el.end(), - StoredEdge(v, fake_edge_container.end(), - &fake_edge_container)); - return std::make_pair(out_edge_iterator(first, u), - out_edge_iterator(last, u)); - } - - template - inline typename Config::degree_size_type - in_degree(typename Config::vertex_descriptor u, - const directed_edges_helper& g_) - { - typedef typename Config::graph_type Graph; - const Graph& cg = static_cast(g_); - Graph& g = const_cast(cg); - return in_edge_list(g, u).size(); - } - - namespace detail { - template - inline - typename boost::property_map::type - get_dispatch(adj_list_helper&, Property, - boost::edge_property_tag) { - typedef typename Config::graph_type Graph; - typedef typename boost::property_map::type PA; - return PA(); - } - template - inline - typename boost::property_map::const_type - get_dispatch(const adj_list_helper&, Property, - boost::edge_property_tag) { - typedef typename Config::graph_type Graph; - typedef typename boost::property_map::const_type PA; - return PA(); - } - - template - inline - typename boost::property_map::type - get_dispatch(adj_list_helper& g, Property, - boost::vertex_property_tag) { - typedef typename Config::graph_type Graph; - typedef typename boost::property_map::type PA; - return PA(&static_cast(g)); - } - template - inline - typename boost::property_map::const_type - get_dispatch(const adj_list_helper& g, Property, - boost::vertex_property_tag) { - typedef typename Config::graph_type Graph; - typedef typename boost::property_map::const_type PA; - const Graph& cg = static_cast(g); - return PA(&cg); - } - - } // namespace detail - - // Implementation of the PropertyGraph interface - template - inline - typename boost::property_map::type - get(Property p, adj_list_helper& g) { - typedef typename property_kind::type Kind; - return detail::get_dispatch(g, p, Kind()); - } - template - inline - typename boost::property_map::const_type - get(Property p, const adj_list_helper& g) { - typedef typename property_kind::type Kind; - return detail::get_dispatch(g, p, Kind()); - } - - template - inline - typename boost::property_traits< - typename boost::property_map::type - >::reference - get(Property p, adj_list_helper& g, const Key& key) { - return get(get(p, g), key); - } - - template - inline - typename boost::property_traits< - typename boost::property_map::const_type - >::reference - get(Property p, const adj_list_helper& g, const Key& key) { - return get(get(p, g), key); - } - - template - inline void - put(Property p, adj_list_helper& g, - const Key& key, const Value& value) - { - typedef typename Config::graph_type Graph; - typedef typename boost::property_map::type Map; - Map pmap = get(p, static_cast(g)); - put(pmap, key, value); - } - - - //========================================================================= - // Generalize Adjacency List Implementation - - struct adj_list_tag { }; - - template - class adj_list_impl - : public adj_list_helper - { - typedef typename Config::OutEdgeList OutEdgeList; - typedef typename Config::InEdgeList InEdgeList; - typedef typename Config::StoredVertexList StoredVertexList; - public: - typedef typename Config::stored_vertex stored_vertex; - typedef typename Config::EdgeContainer EdgeContainer; - typedef typename Config::vertex_descriptor vertex_descriptor; - typedef typename Config::edge_descriptor edge_descriptor; - typedef typename Config::vertex_iterator vertex_iterator; - typedef typename Config::edge_iterator edge_iterator; - typedef typename Config::edge_parallel_category edge_parallel_category; - typedef typename Config::vertices_size_type vertices_size_type; - typedef typename Config::edges_size_type edges_size_type; - typedef typename Config::degree_size_type degree_size_type; - typedef typename Config::edge_property_type edge_property_type; - typedef adj_list_tag graph_tag; - - static vertex_descriptor null_vertex() - { - return 0; - } - - inline adj_list_impl() { } - - inline adj_list_impl(const adj_list_impl& x) { - copy_impl(x); - } - inline adj_list_impl& operator=(const adj_list_impl& x) { - this->clear(); - copy_impl(x); - return *this; - } - inline void clear() { - for (typename StoredVertexList::iterator i = m_vertices.begin(); - i != m_vertices.end(); ++i) - delete (stored_vertex*)*i; - m_vertices.clear(); - m_edges.clear(); - } - inline adj_list_impl(vertices_size_type num_vertices) { - for (vertices_size_type i = 0; i < num_vertices; ++i) - add_vertex(static_cast(*this)); - } - template - inline adj_list_impl(vertices_size_type num_vertices, - EdgeIterator first, EdgeIterator last) - { - vertex_descriptor* v = new vertex_descriptor[num_vertices]; - for (vertices_size_type i = 0; i < num_vertices; ++i) - v[i] = add_vertex(static_cast(*this)); - - while (first != last) { - add_edge(v[(*first).first], v[(*first).second], *this); - ++first; - } - delete [] v; - } - template - inline adj_list_impl(vertices_size_type num_vertices, - EdgeIterator first, EdgeIterator last, - EdgePropertyIterator ep_iter) - { - vertex_descriptor* v = new vertex_descriptor[num_vertices]; - for (vertices_size_type i = 0; i < num_vertices; ++i) - v[i] = add_vertex(static_cast(*this)); - - while (first != last) { - add_edge(v[(*first).first], v[(*first).second], *ep_iter, *this); - ++first; - ++ep_iter; - } - delete [] v; - } - ~adj_list_impl() { - for (typename StoredVertexList::iterator i = m_vertices.begin(); - i != m_vertices.end(); ++i) - delete (stored_vertex*)*i; - } - // protected: - inline OutEdgeList& out_edge_list(vertex_descriptor v) { - stored_vertex* sv = (stored_vertex*)v; - return sv->m_out_edges; - } - inline const OutEdgeList& out_edge_list(vertex_descriptor v) const { - stored_vertex* sv = (stored_vertex*)v; - return sv->m_out_edges; - } - inline StoredVertexList& vertex_set() { return m_vertices; } - inline const StoredVertexList& vertex_set() const { return m_vertices; } - - inline void copy_impl(const adj_list_impl& x_) - { - const Derived& x = static_cast(x_); - - // Would be better to have a constant time way to get from - // vertices in x to the corresponding vertices in *this. - std::map vertex_map; - - // Copy the stored vertex objects by adding each vertex - // and copying its property object. - vertex_iterator vi, vi_end; - for (tie(vi, vi_end) = vertices(x); vi != vi_end; ++vi) { - stored_vertex* v = (stored_vertex*)add_vertex(*this); - v->m_property = ((stored_vertex*)*vi)->m_property; - vertex_map[(stored_vertex*)*vi] = v; - } - // Copy the edges by adding each edge and copying its - // property object. - edge_iterator ei, ei_end; - for (tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) { - edge_descriptor e; - bool inserted; - vertex_descriptor s = source(*ei,x), t = target(*ei,x); - tie(e, inserted) = add_edge(vertex_map[(stored_vertex*)s], - vertex_map[(stored_vertex*)t], *this); - *((edge_property_type*)e.m_eproperty) - = *((edge_property_type*)(*ei).m_eproperty); - } - } - - - typename Config::EdgeContainer m_edges; - StoredVertexList m_vertices; - }; - - // O(1) - template - inline typename Config::vertex_descriptor - add_vertex(adj_list_impl& g_) - { - Derived& g = static_cast(g_); - typedef typename Config::stored_vertex stored_vertex; - stored_vertex* v = new stored_vertex; - typename Config::StoredVertexList::iterator pos; - bool inserted; - boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v); - v->m_position = pos; - return v; - } - // O(1) - template - inline typename Config::vertex_descriptor - add_vertex(const typename Config::vertex_property_type& p, - adj_list_impl& g_) - { - Derived& g = static_cast(g_); - typedef typename Config::stored_vertex stored_vertex; - stored_vertex* v = new stored_vertex(p); - typename Config::StoredVertexList::iterator pos; - bool inserted; - boost::tie(pos,inserted) = boost::graph_detail::push(g.m_vertices, v); - v->m_position = pos; - return v; - } - // O(1) - template - inline void remove_vertex(typename Config::vertex_descriptor u, - adj_list_impl& g_) - { - typedef typename Config::stored_vertex stored_vertex; - Derived& g = static_cast(g_); - stored_vertex* su = (stored_vertex*)u; - g.m_vertices.erase(su->m_position); - delete su; - } - // O(V) - template - inline typename Config::vertex_descriptor - vertex(typename Config::vertices_size_type n, - const adj_list_impl& g_) - { - const Derived& g = static_cast(g_); - typename Config::vertex_iterator i = vertices(g).first; - while (n--) ++i; // std::advance(i, n); (not VC++ portable) - return *i; - } - - //========================================================================= - // Vector-Backbone Adjacency List Implementation - - namespace detail { - - template - inline void - remove_vertex_dispatch(Graph& g, vertex_descriptor u, - boost::directed_tag) - { - typedef typename Graph::edge_parallel_category edge_parallel_category; - g.m_vertices.erase(g.m_vertices.begin() + u); - vertex_descriptor V = num_vertices(g); - if (u != V) { - for (vertex_descriptor v = 0; v < V; ++v) - reindex_edge_list(g.out_edge_list(v), u, edge_parallel_category()); - } - } - - template - inline void - remove_vertex_dispatch(Graph& g, vertex_descriptor u, - boost::undirected_tag) - { - typedef typename Graph::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Graph::edge_parallel_category edge_parallel_category; - g.m_vertices.erase(g.m_vertices.begin() + u); - vertex_descriptor V = num_vertices(g); - for (vertex_descriptor v = 0; v < V; ++v) - reindex_edge_list(g.out_edge_list(v), u, - edge_parallel_category()); - typedef typename Graph::EdgeContainer Container; - typedef typename Container::iterator Iter; - Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end(); - for (; ei != ei_end; ++ei) { - if (ei->m_source > u) - --ei->m_source; - if (ei->m_target > u) - --ei->m_target; - } - } - template - inline void - remove_vertex_dispatch(Graph& g, vertex_descriptor u, - boost::bidirectional_tag) - { - typedef typename Graph::global_edgelist_selector EdgeListS; - BOOST_STATIC_ASSERT((!is_same::value)); - - typedef typename Graph::edge_parallel_category edge_parallel_category; - g.m_vertices.erase(g.m_vertices.begin() + u); - vertex_descriptor V = num_vertices(g); - vertex_descriptor v; - if (u != V) { - for (v = 0; v < V; ++v) - reindex_edge_list(g.out_edge_list(v), u, - edge_parallel_category()); - for (v = 0; v < V; ++v) - reindex_edge_list(in_edge_list(g, v), u, - edge_parallel_category()); - - typedef typename Graph::EdgeContainer Container; - typedef typename Container::iterator Iter; - Iter ei = g.m_edges.begin(), ei_end = g.m_edges.end(); - for (; ei != ei_end; ++ei) { - if (ei->m_source > u) - --ei->m_source; - if (ei->m_target > u) - --ei->m_target; - } - } - } - - template - inline void - reindex_edge_list(EdgeList& el, vertex_descriptor u, - boost::allow_parallel_edge_tag) - { - typename EdgeList::iterator ei = el.begin(), e_end = el.end(); - for (; ei != e_end; ++ei) - if ((*ei).get_target() > u) - --(*ei).get_target(); - } - template - inline void - reindex_edge_list(EdgeList& el, vertex_descriptor u, - boost::disallow_parallel_edge_tag) - { - typename EdgeList::iterator ei = el.begin(), e_end = el.end(); - while (ei != e_end) { - typename EdgeList::value_type ce = *ei; - ++ei; - if (ce.get_target() > u) { - el.erase(ce); - --ce.get_target(); - el.insert(ce); - } - } - } - } // namespace detail - - struct vec_adj_list_tag { }; - - template - class vec_adj_list_impl - : public adj_list_helper - { - typedef typename Config::OutEdgeList OutEdgeList; - typedef typename Config::InEdgeList InEdgeList; - typedef typename Config::StoredVertexList StoredVertexList; - public: - typedef typename Config::vertex_descriptor vertex_descriptor; - typedef typename Config::edge_descriptor edge_descriptor; - typedef typename Config::out_edge_iterator out_edge_iterator; - typedef typename Config::edge_iterator edge_iterator; - typedef typename Config::directed_category directed_category; - typedef typename Config::vertices_size_type vertices_size_type; - typedef typename Config::edges_size_type edges_size_type; - typedef typename Config::degree_size_type degree_size_type; - typedef typename Config::StoredEdge StoredEdge; - typedef typename Config::stored_vertex stored_vertex; - typedef typename Config::EdgeContainer EdgeContainer; - typedef typename Config::edge_property_type edge_property_type; - typedef vec_adj_list_tag graph_tag; - - static vertex_descriptor null_vertex() - { - return (std::numeric_limits::max)(); - } - - inline vec_adj_list_impl() { } - - inline vec_adj_list_impl(const vec_adj_list_impl& x) { - copy_impl(x); - } - inline vec_adj_list_impl& operator=(const vec_adj_list_impl& x) { - this->clear(); - copy_impl(x); - return *this; - } - inline void clear() { - m_vertices.clear(); - m_edges.clear(); - } - - inline vec_adj_list_impl(vertices_size_type _num_vertices) - : m_vertices(_num_vertices) { } - - template - inline vec_adj_list_impl(vertices_size_type num_vertices, - EdgeIterator first, EdgeIterator last) - : m_vertices(num_vertices) - { - while (first != last) { - add_edge((*first).first, (*first).second, - static_cast(*this)); - ++first; - } - } - template - inline vec_adj_list_impl(vertices_size_type num_vertices, - EdgeIterator first, EdgeIterator last, - EdgePropertyIterator ep_iter) - : m_vertices(num_vertices) - { - while (first != last) { - add_edge((*first).first, (*first).second, *ep_iter, - static_cast(*this)); - ++first; - ++ep_iter; - } - } - - // protected: - inline boost::integer_range vertex_set() const { - return boost::integer_range(0, m_vertices.size()); - } - inline OutEdgeList& out_edge_list(vertex_descriptor v) { - return m_vertices[v].m_out_edges; - } - inline const OutEdgeList& out_edge_list(vertex_descriptor v) const { - return m_vertices[v].m_out_edges; - } - inline void copy_impl(const vec_adj_list_impl& x_) - { - const Graph& x = static_cast(x_); - // Copy the stored vertex objects by adding each vertex - // and copying its property object. - for (vertices_size_type i = 0; i < num_vertices(x); ++i) { - vertex_descriptor v = add_vertex(*this); - m_vertices[v].m_property = x.m_vertices[i].m_property; - } - // Copy the edges by adding each edge and copying its - // property object. - edge_iterator ei, ei_end; - for (tie(ei, ei_end) = edges(x); ei != ei_end; ++ei) { - edge_descriptor e; - bool inserted; - tie(e, inserted) = add_edge(source(*ei,x), target(*ei,x) , *this); - *((edge_property_type*)e.m_eproperty) - = *((edge_property_type*)(*ei).m_eproperty); - } - } - typename Config::EdgeContainer m_edges; - StoredVertexList m_vertices; - }; - // Had to make these non-members to avoid accidental instantiation - // on SGI MIPSpro C++ - template - inline typename C::InEdgeList& - in_edge_list(vec_adj_list_impl& g, - typename C::vertex_descriptor v) { - return g.m_vertices[v].m_in_edges; - } - template - inline const typename C::InEdgeList& - in_edge_list(const vec_adj_list_impl& g, - typename C::vertex_descriptor v) { - return g.m_vertices[v].m_in_edges; - } - - // O(1) - template - inline typename Config::vertex_descriptor - add_vertex(vec_adj_list_impl& g_) { - Graph& g = static_cast(g_); - g.m_vertices.resize(g.m_vertices.size() + 1); - return g.m_vertices.size() - 1; - } - - template - inline typename Config::vertex_descriptor - add_vertex(const typename Config::vertex_property_type& p, - vec_adj_list_impl& g_) { - Graph& g = static_cast(g_); - typedef typename Config::stored_vertex stored_vertex; - g.m_vertices.push_back(stored_vertex(p)); - return g.m_vertices.size() - 1; - } - - // Here we override the directed_graph_helper add_edge() function - // so that the number of vertices is automatically changed if - // either u or v is greater than the number of vertices. - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - const typename Config::edge_property_type& p, - vec_adj_list_impl& g_) - { - BOOST_USING_STD_MAX(); - typename Config::vertex_descriptor x = max BOOST_PREVENT_MACRO_SUBSTITUTION(u, v); - if (x >= num_vertices(g_)) - g_.m_vertices.resize(x + 1); - adj_list_helper& g = g_; - return add_edge(u, v, p, g); - } - template - inline std::pair - add_edge(typename Config::vertex_descriptor u, - typename Config::vertex_descriptor v, - vec_adj_list_impl& g_) - { - typename Config::edge_property_type p; - return add_edge(u, v, p, g_); - } - - - // O(V + E) - template - inline void remove_vertex(typename Config::vertex_descriptor v, - vec_adj_list_impl& g_) - { - typedef typename Config::directed_category Cat; - Graph& g = static_cast(g_); - detail::remove_vertex_dispatch(g, v, Cat()); - } - // O(1) - template - inline typename Config::vertex_descriptor - vertex(typename Config::vertices_size_type n, - const vec_adj_list_impl&) - { - return n; - } - - - namespace detail { - - //========================================================================= - // Adjacency List Generator - - template - struct adj_list_gen - { - typedef typename detail::is_random_access::type - is_rand_access; - typedef typename has_property::type has_edge_property; - typedef typename DirectedS::is_directed_t DirectedT; - typedef typename DirectedS::is_bidir_t BidirectionalT; - - struct config - { - typedef OutEdgeListS edgelist_selector; - typedef EdgeListS global_edgelist_selector; - - typedef Graph graph_type; - typedef EdgeProperty edge_property_type; - typedef VertexProperty vertex_property_type; - typedef GraphProperty graph_property_type; - typedef std::size_t vertices_size_type; - - typedef adjacency_list_traits - Traits; - - typedef typename Traits::directed_category directed_category; - typedef typename Traits::edge_parallel_category edge_parallel_category; - typedef typename Traits::vertex_descriptor vertex_descriptor; - typedef typename Traits::edge_descriptor edge_descriptor; - - typedef void* vertex_ptr; - - // need to reorganize this to avoid instantiating stuff - // that doesn't get used -JGS - - // VertexList and vertex_iterator - typedef typename container_gen::type SeqVertexList; - typedef boost::integer_range RandVertexList; - typedef typename boost::ct_if_t::type VertexList; - - typedef typename VertexList::iterator vertex_iterator; - - // EdgeContainer and StoredEdge - - typedef typename container_gen >::type EdgeContainer; - - typedef typename ct_and::type >::type on_edge_storage; - - typedef typename boost::ct_if_t::type edges_size_type; - - typedef typename EdgeContainer::iterator EdgeIter; - - typedef typename detail::is_random_access::type is_edge_ra; - - typedef typename boost::ct_if_t, - typename boost::ct_if_t, - stored_edge_iter - >::type - >::type StoredEdge; - - // Adjacency Types - - typedef typename container_gen::type - OutEdgeList; - typedef typename OutEdgeList::size_type degree_size_type; - typedef typename OutEdgeList::iterator OutEdgeIter; - - typedef boost::detail::iterator_traits OutEdgeIterTraits; - typedef typename OutEdgeIterTraits::iterator_category OutEdgeIterCat; - typedef typename OutEdgeIterTraits::difference_type OutEdgeIterDiff; - - typedef out_edge_iter< - OutEdgeIter, vertex_descriptor, edge_descriptor, OutEdgeIterDiff - > out_edge_iterator; - - typedef typename adjacency_iterator_generator::type adjacency_iterator; - - typedef OutEdgeList InEdgeList; - typedef OutEdgeIter InEdgeIter; - typedef OutEdgeIterCat InEdgeIterCat; - typedef OutEdgeIterDiff InEdgeIterDiff; - - typedef in_edge_iter< - InEdgeIter, vertex_descriptor, edge_descriptor, InEdgeIterDiff - > in_edge_iterator; - - typedef typename inv_adjacency_iterator_generator::type inv_adjacency_iterator; - - // Edge Iterator - - typedef boost::detail::iterator_traits EdgeIterTraits; - typedef typename EdgeIterTraits::iterator_category EdgeIterCat; - typedef typename EdgeIterTraits::difference_type EdgeIterDiff; - - typedef undirected_edge_iter< - EdgeIter - , edge_descriptor - , EdgeIterDiff - > UndirectedEdgeIter; // also used for bidirectional - - typedef adj_list_edge_iterator DirectedEdgeIter; - - typedef typename boost::ct_if_t::type edge_iterator; - - // stored_vertex and StoredVertexList - typedef typename container_gen::type - SeqStoredVertexList; - struct seq_stored_vertex { - seq_stored_vertex() { } - seq_stored_vertex(const VertexProperty& p) : m_property(p) { } - OutEdgeList m_out_edges; - VertexProperty m_property; - typename SeqStoredVertexList::iterator m_position; - }; - struct bidir_seq_stored_vertex { - bidir_seq_stored_vertex() { } - bidir_seq_stored_vertex(const VertexProperty& p) : m_property(p) { } - OutEdgeList m_out_edges; - InEdgeList m_in_edges; - VertexProperty m_property; - typename SeqStoredVertexList::iterator m_position; - }; - struct rand_stored_vertex { - rand_stored_vertex() { } - rand_stored_vertex(const VertexProperty& p) : m_property(p) { } - OutEdgeList m_out_edges; - VertexProperty m_property; - }; - struct bidir_rand_stored_vertex { - bidir_rand_stored_vertex() { } - bidir_rand_stored_vertex(const VertexProperty& p) : m_property(p) { } - OutEdgeList m_out_edges; - InEdgeList m_in_edges; - VertexProperty m_property; - }; - typedef typename boost::ct_if_t::type, - typename boost::ct_if_t::type - >::type StoredVertex; - struct stored_vertex : public StoredVertex { - stored_vertex() { } - stored_vertex(const VertexProperty& p) : StoredVertex(p) { } - }; - - typedef typename container_gen::type - RandStoredVertexList; - typedef typename boost::ct_if_t< is_rand_access, - RandStoredVertexList, SeqStoredVertexList>::type StoredVertexList; - }; // end of config - - - typedef typename boost::ct_if_t, - typename boost::ct_if_t, - undirected_graph_helper - >::type - >::type DirectedHelper; - - typedef typename boost::ct_if_t, - adj_list_impl - >::type type; - - }; - - } // namespace detail - - //========================================================================= - // Vertex Property Maps - - template - struct adj_list_vertex_property_map - : public boost::put_get_helper< - Reference, - adj_list_vertex_property_map - > - { - typedef typename Graph::stored_vertex StoredVertex; - typedef ValueType value_type; - typedef Reference reference; - typedef typename Graph::vertex_descriptor key_type; - typedef boost::lvalue_property_map_tag category; - inline adj_list_vertex_property_map() { } - inline adj_list_vertex_property_map(const Graph*) { } - inline Reference operator[](key_type v) const { - StoredVertex* sv = (StoredVertex*)v; - return get_property_value(sv->m_property, Tag()); - } - inline Reference operator()(key_type v) const { - return this->operator[](v); - } - }; - - template - struct adj_list_vertex_all_properties_map - : public boost::put_get_helper - > - { - typedef typename Graph::stored_vertex StoredVertex; - typedef Property value_type; - typedef PropRef reference; - typedef typename Graph::vertex_descriptor key_type; - typedef boost::lvalue_property_map_tag category; - inline adj_list_vertex_all_properties_map() { } - inline adj_list_vertex_all_properties_map(const Graph*) { } - inline PropRef operator[](key_type v) const { - StoredVertex* sv = (StoredVertex*)v; - return sv->m_property; - } - inline PropRef operator()(key_type v) const { - return this->operator[](v); - } - }; - - template - struct vec_adj_list_vertex_property_map - : public boost::put_get_helper< - Reference, - vec_adj_list_vertex_property_map - > - { - typedef ValueType value_type; - typedef Reference reference; - typedef typename boost::graph_traits::vertex_descriptor key_type; - typedef boost::lvalue_property_map_tag category; - vec_adj_list_vertex_property_map() { } - vec_adj_list_vertex_property_map(GraphPtr g) : m_g(g) { } - inline Reference operator[](key_type v) const { - return get_property_value(m_g->m_vertices[v].m_property, Tag()); - } - inline Reference operator()(key_type v) const { - return this->operator[](v); - } - GraphPtr m_g; - }; - - template - struct vec_adj_list_vertex_all_properties_map - : public boost::put_get_helper - > - { - typedef Property value_type; - typedef PropertyRef reference; - typedef typename boost::graph_traits::vertex_descriptor key_type; - typedef boost::lvalue_property_map_tag category; - vec_adj_list_vertex_all_properties_map() { } - vec_adj_list_vertex_all_properties_map(GraphPtr g) : m_g(g) { } - inline PropertyRef operator[](key_type v) const { - return m_g->m_vertices[v].m_property; - } - inline PropertyRef operator()(key_type v) const { - return this->operator[](v); - } - GraphPtr m_g; - }; - - struct adj_list_any_vertex_pa { - template - struct bind_ { - typedef typename property_value::type value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - - typedef adj_list_vertex_property_map - type; - typedef adj_list_vertex_property_map - const_type; - }; - }; - struct adj_list_all_vertex_pa { - template - struct bind_ { - typedef typename Graph::vertex_descriptor Vertex; - typedef adj_list_vertex_all_properties_map type; - typedef adj_list_vertex_all_properties_map const_type; - }; - }; - - template - struct vec_adj_list_vertex_id_map - : public boost::put_get_helper< - Vertex, vec_adj_list_vertex_id_map - > - { - typedef Vertex value_type; - typedef Vertex key_type; - typedef Vertex reference; - typedef boost::readable_property_map_tag category; - inline vec_adj_list_vertex_id_map() { } - template - inline vec_adj_list_vertex_id_map(const Graph&) { } - inline value_type operator[](key_type v) const { return v; } - inline value_type operator()(key_type v) const { return v; } - }; - - struct vec_adj_list_any_vertex_pa { - template - struct bind_ { - typedef typename property_value::type value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - - typedef vec_adj_list_vertex_property_map - type; - typedef vec_adj_list_vertex_property_map - const_type; - }; - }; - struct vec_adj_list_id_vertex_pa { - template - struct bind_ { - typedef typename Graph::vertex_descriptor Vertex; - typedef vec_adj_list_vertex_id_map type; - typedef vec_adj_list_vertex_id_map const_type; - }; - }; - struct vec_adj_list_all_vertex_pa { - template - struct bind_ { - typedef typename Graph::vertex_descriptor Vertex; - typedef vec_adj_list_vertex_all_properties_map - type; - typedef vec_adj_list_vertex_all_properties_map - const_type; - }; - }; - namespace detail { - template - struct adj_list_choose_vertex_pa_helper { - typedef adj_list_any_vertex_pa type; - }; - template <> - struct adj_list_choose_vertex_pa_helper { - typedef adj_list_all_vertex_pa type; - }; - template - struct adj_list_choose_vertex_pa { - typedef typename adj_list_choose_vertex_pa_helper::type Helper; - typedef typename Helper::template bind_ Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; - - - template - struct vec_adj_list_choose_vertex_pa_helper { - typedef vec_adj_list_any_vertex_pa type; - }; - template <> - struct vec_adj_list_choose_vertex_pa_helper { - typedef vec_adj_list_id_vertex_pa type; - }; - template <> - struct vec_adj_list_choose_vertex_pa_helper { - typedef vec_adj_list_all_vertex_pa type; - }; - template - struct vec_adj_list_choose_vertex_pa { - typedef typename vec_adj_list_choose_vertex_pa_helper::type Helper; - typedef typename Helper::template bind_ Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; - } // namespace detail - - //========================================================================= - // Edge Property Map - - template - struct adj_list_edge_property_map - : public put_get_helper< - Ref, - adj_list_edge_property_map - > - { - typedef Value value_type; - typedef Ref reference; - typedef detail::edge_desc_impl key_type; - typedef boost::lvalue_property_map_tag category; - inline Ref operator[](key_type e) const { - Property& p = *(Property*)e.get_property(); - return get_property_value(p, Tag()); - } - inline Ref operator()(key_type e) const { - return this->operator[](e); - } - }; - - template - struct adj_list_edge_all_properties_map - : public put_get_helper - > - { - typedef Property value_type; - typedef PropRef reference; - typedef detail::edge_desc_impl key_type; - typedef boost::lvalue_property_map_tag category; - inline PropRef operator[](key_type e) const { - return *(PropPtr)e.get_property(); - } - inline PropRef operator()(key_type e) const { - return this->operator[](e); - } - }; - - // Edge Property Maps - - namespace detail { - struct adj_list_any_edge_pmap { - template - struct bind_ { - typedef typename property_value::type value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - - typedef adj_list_edge_property_map - type; - typedef adj_list_edge_property_map - const_type; - }; - }; - struct adj_list_all_edge_pmap { - template - struct bind_ { - typedef adj_list_edge_all_properties_map - type; - typedef adj_list_edge_all_properties_map - const_type; - }; - }; - - template - struct adj_list_choose_edge_pmap_helper { - typedef adj_list_any_edge_pmap type; - }; - template <> - struct adj_list_choose_edge_pmap_helper { - typedef adj_list_all_edge_pmap type; - }; - template - struct adj_list_choose_edge_pmap { - typedef typename adj_list_choose_edge_pmap_helper::type Helper; - typedef typename Helper::template bind_ Bind; - typedef typename Bind::type type; - typedef typename Bind::const_type const_type; - }; - struct adj_list_edge_property_selector { - template - struct bind_ { - typedef adj_list_choose_edge_pmap Choice; - typedef typename Choice::type type; - typedef typename Choice::const_type const_type; - }; - }; - } // namespace detail - - template <> - struct edge_property_selector { - typedef detail::adj_list_edge_property_selector type; - }; - template <> - struct edge_property_selector { - typedef detail::adj_list_edge_property_selector type; - }; - - // Vertex Property Maps - - struct adj_list_vertex_property_selector { - template - struct bind_ { - typedef detail::adj_list_choose_vertex_pa Choice; - typedef typename Choice::type type; - typedef typename Choice::const_type const_type; - }; - }; - template <> - struct vertex_property_selector { - typedef adj_list_vertex_property_selector type; - }; - - struct vec_adj_list_vertex_property_selector { - template - struct bind_ { - typedef detail::vec_adj_list_choose_vertex_pa Choice; - typedef typename Choice::type type; - typedef typename Choice::const_type const_type; - }; - }; - template <> - struct vertex_property_selector { - typedef vec_adj_list_vertex_property_selector type; - }; - -} // namespace boost - -#if !defined(BOOST_NO_HASH) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -namespace BOOST_STD_EXTENSION_NAMESPACE { - - #if BOOST_WORKAROUND( _STLPORT_VERSION, >= 0x500 ) - // STLport 5 already defines a hash specialization. - #else - template <> - struct hash< void* > // Need this when vertex_descriptor=void* - { - std::size_t - operator()(void* v) const { return (std::size_t)v; } - }; - #endif - - template - struct hash< boost::detail::stored_edge > - { - std::size_t - operator()(const boost::detail::stored_edge& e) const - { - return hash()(e.m_target); - } - }; - - template - struct hash< boost::detail::stored_edge_property > - { - std::size_t - operator()(const boost::detail::stored_edge_property& e) const - { - return hash()(e.m_target); - } - }; - - template - struct hash< boost::detail::stored_edge_iter > - { - std::size_t - operator()(const boost::detail::stored_edge_iter& e) const - { - return hash()(e.m_target); - } - }; - -} -#endif - - -#undef stored_edge -#undef stored_edge_property -#undef stored_edge_iter - -#endif // BOOST_GRAPH_DETAIL_DETAIL_ADJACENCY_LIST_CCT - -/* - Implementation Notes: - - Many of the public interface functions in this file would have been - more conveniently implemented as inline friend functions. - However there are a few compiler bugs that make that approach - non-portable. - - 1. g++ inline friend in namespace bug - 2. g++ using clause doesn't work with inline friends - 3. VC++ doesn't have Koenig lookup - - For these reasons, the functions were all written as non-inline free - functions, and static cast was used to convert from the helper - class to the adjacency_list derived class. - - Looking back, it might have been better to write out all functions - in terms of the adjacency_list, and then use a tag to dispatch - to the various helpers instead of using inheritance. - - */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/detail/incremental_components.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/graph/detail/incremental_components.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,170 @@ +// +//======================================================================= +// Copyright 1997-2001 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// + +#ifndef BOOST_INCREMENTAL_COMPONENTS_HPP +#define BOOST_INCREMENTAL_COMPONENTS_HPP + +#include +#include + +namespace boost { + + // A connected component algorithm for the case when dynamically + // adding (but not removing) edges is common. The + // incremental_components() function is a preparing operation. Call + // same_component to check whether two vertices are in the same + // component, or use disjoint_set::find_set to determine the + // representative for a vertex. + + // This version of connected components does not require a full + // Graph. Instead, it just needs an edge list, where the vertices of + // each edge need to be of integer type. The edges are assumed to + // be undirected. The other difference is that the result is stored in + // a container, instead of just a decorator. The container should be + // empty before the algorithm is called. It will grow during the + // course of the algorithm. The container must be a model of + // BackInsertionSequence and RandomAccessContainer + // (std::vector is a good choice). After running the algorithm the + // index container will map each vertex to the representative + // vertex of the component to which it belongs. + // + // Adapted from an implementation by Alex Stepanov. The disjoint + // sets data structure is from Tarjan's "Data Structures and Network + // Algorithms", and the application to connected components is + // similar to the algorithm described in Ch. 22 of "Intro to + // Algorithms" by Cormen, et. all. + // + // RankContainer is a random accessable container (operator[] is + // defined) with a value type that can represent an integer part of + // a binary log of the value type of the corresponding + // ParentContainer (char is always enough) its size_type is no less + // than the size_type of the corresponding ParentContainer + + // An implementation of disjoint sets can be found in + // boost/pending/disjoint_sets.hpp + + template + void incremental_components(EdgeListGraph& g, DisjointSets& ds) + { + typename graph_traits::edge_iterator e, end; + for (tie(e,end) = edges(g); e != end; ++e) + ds.union_set(source(*e,g),target(*e,g)); + } + + template + void compress_components(ParentIterator first, ParentIterator last) + { + for (ParentIterator current = first; current != last; ++current) + detail::find_representative_with_full_compression(first, current-first); + } + + template + typename boost::detail::iterator_traits::difference_type + component_count(ParentIterator first, ParentIterator last) + { + std::ptrdiff_t count = 0; + for (ParentIterator current = first; current != last; ++current) + if (*current == current - first) ++count; + return count; + } + + // This algorithm can be applied to the result container of the + // connected_components algorithm to normalize + // the components. + template + void normalize_components(ParentIterator first, ParentIterator last) + { + for (ParentIterator current = first; current != last; ++current) + detail::normalize_node(first, current - first); + } + + template + void initialize_incremental_components(VertexListGraph& G, DisjointSets& ds) + { + typename graph_traits + ::vertex_iterator v, vend; + for (tie(v, vend) = vertices(G); v != vend; ++v) + ds.make_set(*v); + } + + template + inline bool same_component(Vertex u, Vertex v, DisjointSet& ds) + { + return ds.find_set(u) == ds.find_set(v); + } + + // considering changing the so that it initializes with a pair of + // vertex iterators and a parent PA. + + template + class component_index + { + public://protected: (avoid friends for now) + typedef std::vector MyIndexContainer; + MyIndexContainer header; + MyIndexContainer index; + typedef typename MyIndexContainer::size_type SizeT; + typedef typename MyIndexContainer::const_iterator IndexIter; + public: + typedef detail::component_iterator + component_iterator; + class component { + friend class component_index; + protected: + IndexT number; + const component_index* comp_ind_ptr; + component(IndexT i, const component_index* p) + : number(i), comp_ind_ptr(p) {} + public: + typedef component_iterator iterator; + typedef component_iterator const_iterator; + typedef IndexT value_type; + iterator begin() const { + return iterator( comp_ind_ptr->index.begin(), + (comp_ind_ptr->header)[number] ); + } + iterator end() const { + return iterator( comp_ind_ptr->index.begin(), + comp_ind_ptr->index.size() ); + } + }; + typedef SizeT size_type; + typedef component value_type; + +#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) + template + component_index(Iterator first, Iterator last) + : index(std::distance(first, last)) + { + std::copy(first, last, index.begin()); + detail::construct_component_index(index, header); + } +#else + template + component_index(Iterator first, Iterator last) + : index(first, last) + { + detail::construct_component_index(index, header); + } +#endif + + component operator[](IndexT i) const { + return component(i, this); + } + SizeT size() const { + return header.size(); + } + + }; + +} // namespace boost + +#endif // BOOST_INCREMENTAL_COMPONENTS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/detail/is_same.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/graph/detail/is_same.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,103 @@ + +// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, +// Howard Hinnant and John Maddock 2000. +// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 + +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, +// is_member_pointer based on the Simulated Partial Specialization work +// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or +// http://groups.yahoo.com/group/boost/message/5441 +// Some workarounds in here use ideas suggested from "Generic: +// Mappings between Types and Values" +// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). + + +#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED +#define BOOST_TT_IS_SAME_HPP_INCLUDED + +#include +#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#include +#include +#include +#endif +// should be the last #include +#include + +namespace boost { + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false) +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true) +#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) +// without this, Borland's compiler gives the wrong answer for +// references to arrays: +BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T&,T&,true) +#endif + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace detail { + +#ifdef BOOST_MSVC +// the following VC6 specific implementation is *NOT* legal +// C++, but has the advantage that it works for incomplete +// types. + +template< typename T1 > +struct is_same_part_1 +{ + template struct part_2 { enum { value = false }; }; + template<> struct part_2 { enum { value = true }; }; +}; + +template< typename T1, typename T2 > +struct is_same_impl +{ + enum { value = detail::is_same_part_1::template part_2::value }; +}; + +#else // generic "no-partial-specialization" version + +template +::boost::type_traits::yes_type +BOOST_TT_DECL is_same_tester(T*, T*); + +::boost::type_traits::no_type +BOOST_TT_DECL is_same_tester(...); + +template +struct is_same_impl +{ + static T t; + static U u; + + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + (sizeof(type_traits::yes_type) == sizeof(detail::is_same_tester(&t,&u))), + (::boost::is_reference::value == ::boost::is_reference::value), + (sizeof(T) == sizeof(U)) + >::value)); +}; + +#endif // BOOST_MSVC + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,(::boost::detail::is_same_impl::value)) + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_SAME_HPP_INCLUDED + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/exception.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/graph/exception.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,58 @@ +// +// Boost.Pointer Container +// +// Copyright Thorsten Ottosen 2003-2005. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/ptr_container/ +// + +#ifndef BOOST_PTR_CONTAINER_EXCEPTION_HPP +#define BOOST_PTR_CONTAINER_EXCEPTION_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +#include + +namespace boost +{ + class bad_ptr_container_operation : public std::exception + { + const char* what_; + public: + bad_ptr_container_operation( const char* what ) : what_( what ) + { } + + virtual const char* what() const throw() + { + return what_; + } + }; + + + + class bad_index : public bad_ptr_container_operation + { + public: + bad_index( const char* what ) : bad_ptr_container_operation( what ) + { } + }; + + + + class bad_pointer : public bad_ptr_container_operation + { + public: + bad_pointer() : bad_ptr_container_operation( "Null pointer not allowed in a pointer container!" ) + { } + + bad_pointer( const char* text ) : bad_ptr_container_operation( text ) + { } + }; +} + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/incremental_components.hpp --- a/epoc32/include/stdapis/boost/graph/incremental_components.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -// -//======================================================================= -// Copyright 1997-2001 University of Notre Dame. -// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -//======================================================================= -// - -#ifndef BOOST_INCREMENTAL_COMPONENTS_HPP -#define BOOST_INCREMENTAL_COMPONENTS_HPP - -#include -#include - -namespace boost { - - // A connected component algorithm for the case when dynamically - // adding (but not removing) edges is common. The - // incremental_components() function is a preparing operation. Call - // same_component to check whether two vertices are in the same - // component, or use disjoint_set::find_set to determine the - // representative for a vertex. - - // This version of connected components does not require a full - // Graph. Instead, it just needs an edge list, where the vertices of - // each edge need to be of integer type. The edges are assumed to - // be undirected. The other difference is that the result is stored in - // a container, instead of just a decorator. The container should be - // empty before the algorithm is called. It will grow during the - // course of the algorithm. The container must be a model of - // BackInsertionSequence and RandomAccessContainer - // (std::vector is a good choice). After running the algorithm the - // index container will map each vertex to the representative - // vertex of the component to which it belongs. - // - // Adapted from an implementation by Alex Stepanov. The disjoint - // sets data structure is from Tarjan's "Data Structures and Network - // Algorithms", and the application to connected components is - // similar to the algorithm described in Ch. 22 of "Intro to - // Algorithms" by Cormen, et. all. - // - // RankContainer is a random accessable container (operator[] is - // defined) with a value type that can represent an integer part of - // a binary log of the value type of the corresponding - // ParentContainer (char is always enough) its size_type is no less - // than the size_type of the corresponding ParentContainer - - // An implementation of disjoint sets can be found in - // boost/pending/disjoint_sets.hpp - - template - void incremental_components(EdgeListGraph& g, DisjointSets& ds) - { - typename graph_traits::edge_iterator e, end; - for (tie(e,end) = edges(g); e != end; ++e) - ds.union_set(source(*e,g),target(*e,g)); - } - - template - void compress_components(ParentIterator first, ParentIterator last) - { - for (ParentIterator current = first; current != last; ++current) - detail::find_representative_with_full_compression(first, current-first); - } - - template - typename boost::detail::iterator_traits::difference_type - component_count(ParentIterator first, ParentIterator last) - { - std::ptrdiff_t count = 0; - for (ParentIterator current = first; current != last; ++current) - if (*current == current - first) ++count; - return count; - } - - // This algorithm can be applied to the result container of the - // connected_components algorithm to normalize - // the components. - template - void normalize_components(ParentIterator first, ParentIterator last) - { - for (ParentIterator current = first; current != last; ++current) - detail::normalize_node(first, current - first); - } - - template - void initialize_incremental_components(VertexListGraph& G, DisjointSets& ds) - { - typename graph_traits - ::vertex_iterator v, vend; - for (tie(v, vend) = vertices(G); v != vend; ++v) - ds.make_set(*v); - } - - template - inline bool same_component(Vertex u, Vertex v, DisjointSet& ds) - { - return ds.find_set(u) == ds.find_set(v); - } - - // considering changing the so that it initializes with a pair of - // vertex iterators and a parent PA. - - template - class component_index - { - public://protected: (avoid friends for now) - typedef std::vector MyIndexContainer; - MyIndexContainer header; - MyIndexContainer index; - typedef typename MyIndexContainer::size_type SizeT; - typedef typename MyIndexContainer::const_iterator IndexIter; - public: - typedef detail::component_iterator - component_iterator; - class component { - friend class component_index; - protected: - IndexT number; - const component_index* comp_ind_ptr; - component(IndexT i, const component_index* p) - : number(i), comp_ind_ptr(p) {} - public: - typedef component_iterator iterator; - typedef component_iterator const_iterator; - typedef IndexT value_type; - iterator begin() const { - return iterator( comp_ind_ptr->index.begin(), - (comp_ind_ptr->header)[number] ); - } - iterator end() const { - return iterator( comp_ind_ptr->index.begin(), - comp_ind_ptr->index.size() ); - } - }; - typedef SizeT size_type; - typedef component value_type; - -#if defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS) - template - component_index(Iterator first, Iterator last) - : index(std::distance(first, last)) - { - std::copy(first, last, index.begin()); - detail::construct_component_index(index, header); - } -#else - template - component_index(Iterator first, Iterator last) - : index(first, last) - { - detail::construct_component_index(index, header); - } -#endif - - component operator[](IndexT i) const { - return component(i, this); - } - SizeT size() const { - return header.size(); - } - - }; - -} // namespace boost - -#endif // BOOST_INCREMENTAL_COMPONENTS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/graph/random.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/graph/random.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +/* boost random.hpp header file + * + * Copyright Jens Maurer 2000-2001 + * Distributed under the Boost Software License, Version 1.0. (See + * accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/random for documentation. + * + * $Id: random.hpp,v 1.18 2004/07/27 03:43:27 dgregor Exp $ + * + * Revision history + * 2000-02-18 portability fixes (thanks to Beman Dawes) + * 2000-02-21 shuffle_output, inversive_congruential_schrage, + * generator_iterator, uniform_smallint + * 2000-02-23 generic modulus arithmetic helper, removed *_schrage classes, + * implemented Streamable and EqualityComparable concepts for + * generators, added Bernoulli distribution and Box-Muller + * transform + * 2000-03-01 cauchy, lognormal, triangle distributions; fixed + * uniform_smallint; renamed gaussian to normal distribution + * 2000-03-05 implemented iterator syntax for distribution functions + * 2000-04-21 removed some optimizations for better BCC/MSVC compatibility + * 2000-05-10 adapted to BCC and MSVC + * 2000-06-13 incorporated review results + * 2000-07-06 moved basic templates from namespace detail to random + * 2000-09-23 warning removals and int64 fixes (Ed Brey) + * 2000-09-24 added lagged_fibonacci generator (Matthias Troyer) + * 2001-02-18 moved to individual header files + */ + +#ifndef BOOST_RANDOM_HPP +#define BOOST_RANDOM_HPP + +// generators +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { + typedef random::xor_combine, 0, + random::linear_feedback_shift, 0, 0>, 0, + random::linear_feedback_shift, 0, 0> taus88; +} // namespace boost + +// misc +#include + +// distributions +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_RANDOM_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/iterator/detail/enable_if.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/iterator/detail/enable_if.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +// Boost enable_if library + +// Copyright 2003 © The Trustees of Indiana University. + +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Authors: Jaakko Järvi (jajarvi at osl.iu.edu) +// Jeremiah Willcock (jewillco at osl.iu.edu) +// Andrew Lumsdaine (lums at osl.iu.edu) + + +#ifndef BOOST_UTILITY_ENABLE_IF_HPP +#define BOOST_UTILITY_ENABLE_IF_HPP + +#include "boost/config.hpp" + +// Even the definition of enable_if causes problems on some compilers, +// so it's macroed out for all compilers that do not support SFINAE + +#ifndef BOOST_NO_SFINAE + +namespace boost +{ + + template + struct enable_if_c { + typedef T type; + }; + + template + struct enable_if_c {}; + + template + struct enable_if : public enable_if_c {}; + + template + struct lazy_enable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_enable_if_c {}; + + template + struct lazy_enable_if : public lazy_enable_if_c {}; + + + template + struct disable_if_c { + typedef T type; + }; + + template + struct disable_if_c {}; + + template + struct disable_if : public disable_if_c {}; + + template + struct lazy_disable_if_c { + typedef typename T::type type; + }; + + template + struct lazy_disable_if_c {}; + + template + struct lazy_disable_if : public lazy_disable_if_c {}; + +} // namespace boost + +#else + +namespace boost { + + namespace detail { typedef void enable_if_default_T; } + + template + struct enable_if_does_not_work_on_this_compiler; + + template + struct enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler + { }; + + template + struct enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct disable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_enable_if : enable_if_does_not_work_on_this_compiler + { }; + + template + struct lazy_disable_if : enable_if_does_not_work_on_this_compiler + { }; + +} // namespace boost + +#endif // BOOST_NO_SFINAE + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/iterator/reverse_iterator.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/iterator/reverse_iterator.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP +#define BOOST_RANGE_REVERSE_ITERATOR_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +#include +#include +#include + + +namespace boost +{ + ////////////////////////////////////////////////////////////////////////// + // default + ////////////////////////////////////////////////////////////////////////// + + template< typename C > + struct range_reverse_iterator + { + typedef reverse_iterator< + BOOST_DEDUCED_TYPENAME range_iterator::type > type; + }; + + +} // namespace boost + + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/lambda/detail/lambda_fwd.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/lambda/detail/lambda_fwd.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/lambda_fwd.hpp,v $ +// $Date: 2004/09/02 15:40:41 $ +// $Revision: 1.7 $ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) + +# include +# include +# include + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( + typename Arity = int_< aux::template_arity::value > + ) + > +struct lambda; + +}} + +#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include + +namespace boost { namespace mpl { + +template< + typename T = na + , typename Tag = void_ + , typename Protect = true_ + > +struct lambda; + +}} + +#endif + +#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/lambda/detail/operators.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/lambda/detail/operators.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,941 @@ +// Boost operators.hpp header file ----------------------------------------// + +// (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility/operators.htm for documentation. + +// Revision History +// 21 Oct 02 Modified implementation of operators to allow compilers with a +// correct named return value optimization (NRVO) to produce optimal +// code. (Daniel Frey) +// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) +// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) +// 27 Aug 01 'left' form for non commutative operators added; +// additional classes for groups of related operators added; +// workaround for empty base class optimization +// bug of GCC 3.0 (Helmut Zeisel) +// 25 Jun 01 output_iterator_helper changes: removed default template +// parameters, added support for self-proxying, additional +// documentation and tests (Aleksey Gurtovoy) +// 29 May 01 Added operator classes for << and >>. Added input and output +// iterator helper classes. Added classes to connect equality and +// relational operators. Added classes for groups of related +// operators. Reimplemented example operator and iterator helper +// classes in terms of the new groups. (Daryle Walker, with help +// from Alexy Gurtovoy) +// 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly +// supplied arguments from actually being used (Dave Abrahams) +// 04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and +// refactoring of compiler workarounds, additional documentation +// (Alexy Gurtovoy and Mark Rodgers with some help and prompting from +// Dave Abrahams) +// 28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and +// Jeremy Siek (Dave Abrahams) +// 20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5 +// (Mark Rodgers) +// 20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy) +// 10 Jun 00 Support for the base class chaining technique was added +// (Aleksey Gurtovoy). See documentation and the comments below +// for the details. +// 12 Dec 99 Initial version with iterator operators (Jeremy Siek) +// 18 Nov 99 Change name "divideable" to "dividable", remove unnecessary +// specializations of dividable, subtractable, modable (Ed Brey) +// 17 Nov 99 Add comments (Beman Dawes) +// Remove unnecessary specialization of operators<> (Ed Brey) +// 15 Nov 99 Fix less_than_comparable second operand type for first two +// operators.(Beman Dawes) +// 12 Nov 99 Add operators templates (Ed Brey) +// 11 Nov 99 Add single template parameter version for compilers without +// partial specialization (Beman Dawes) +// 10 Nov 99 Initial version + +// 10 Jun 00: +// An additional optional template parameter was added to most of +// operator templates to support the base class chaining technique (see +// documentation for the details). Unfortunately, a straightforward +// implementation of this change would have broken compatibility with the +// previous version of the library by making it impossible to use the same +// template name (e.g. 'addable') for both the 1- and 2-argument versions of +// an operator template. This implementation solves the backward-compatibility +// issue at the cost of some simplicity. +// +// One of the complications is an existence of special auxiliary class template +// 'is_chained_base<>' (see 'detail' namespace below), which is used +// to determine whether its template parameter is a library's operator template +// or not. You have to specialize 'is_chained_base<>' for each new +// operator template you add to the library. +// +// However, most of the non-trivial implementation details are hidden behind +// several local macros defined below, and as soon as you understand them, +// you understand the whole library implementation. + +#ifndef BOOST_OPERATORS_HPP +#define BOOST_OPERATORS_HPP + +#include +#include +#include + +#if defined(__sgi) && !defined(__GNUC__) +# pragma set woff 1234 +#endif + +#if defined(BOOST_MSVC) +# pragma warning( disable : 4284 ) // complaint about return type of +#endif // operator-> not begin a UDT + +namespace boost { +namespace detail { + +// Helmut Zeisel, empty base class optimization bug with GCC 3.0.0 +#if defined(__GNUC__) && __GNUC__==3 && __GNUC_MINOR__==0 && __GNU_PATCHLEVEL__==0 +class empty_base { + bool dummy; +}; +#else +class empty_base {}; +#endif + +} // namespace detail +} // namespace boost + +// In this section we supply the xxxx1 and xxxx2 forms of the operator +// templates, which are explicitly targeted at the 1-type-argument and +// 2-type-argument operator forms, respectively. Some compilers get confused +// when inline friend functions are overloaded in namespaces other than the +// global namespace. When BOOST_NO_OPERATORS_IN_NAMESPACE is defined, all of +// these templates must go in the global namespace. + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE +namespace boost +{ +#endif + +// Basic operator classes (contributed by Dave Abrahams) ------------------// + +// Note that friend functions defined in a class are implicitly inline. +// See the C++ std, 11.4 [class.friend] paragraph 5 + +template +struct less_than_comparable2 : B +{ + friend bool operator<=(const T& x, const U& y) { return !(x > y); } + friend bool operator>=(const T& x, const U& y) { return !(x < y); } + friend bool operator>(const U& x, const T& y) { return y < x; } + friend bool operator<(const U& x, const T& y) { return y > x; } + friend bool operator<=(const U& x, const T& y) { return !(y < x); } + friend bool operator>=(const U& x, const T& y) { return !(y > x); } +}; + +template +struct less_than_comparable1 : B +{ + friend bool operator>(const T& x, const T& y) { return y < x; } + friend bool operator<=(const T& x, const T& y) { return !(y < x); } + friend bool operator>=(const T& x, const T& y) { return !(x < y); } +}; + +template +struct equality_comparable2 : B +{ + friend bool operator==(const U& y, const T& x) { return x == y; } + friend bool operator!=(const U& y, const T& x) { return !(x == y); } + friend bool operator!=(const T& y, const U& x) { return !(y == x); } +}; + +template +struct equality_comparable1 : B +{ + friend bool operator!=(const T& x, const T& y) { return !(x == y); } +}; + +// A macro which produces "name_2left" from "name". +#define BOOST_OPERATOR2_LEFT(name) name##2##_##left + +// NRVO-friendly implementation (contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// This is the optimal implementation for ISO/ANSI C++, +// but it requires the compiler to implement the NRVO. +// If the compiler has no NRVO, this is the best symmetric +// implementation available. + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( rhs ); nrv OP##= lhs; return nrv; } \ +}; \ + \ +template \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +// For compilers without NRVO the following code is optimal, but not +// symmetric! Note that the implementation of +// BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide +// optimization opportunities to the compiler :) + +#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ +template \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ + friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \ +}; \ + \ +template \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ +template \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template \ +struct BOOST_OPERATOR2_LEFT(NAME) : B \ +{ \ + friend T operator OP( const U& lhs, const T& rhs ) \ + { return T( lhs ) OP##= rhs; } \ +}; \ + \ +template \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / ) +BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & ) +BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | ) + +#undef BOOST_BINARY_OPERATOR_COMMUTATIVE +#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE +#undef BOOST_OPERATOR2_LEFT + +// incrementable and decrementable contributed by Jeremy Siek + +template +struct incrementable : B +{ + friend T operator++(T& x, int) + { + incrementable_type nrv(x); + ++x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T incrementable_type; +}; + +template +struct decrementable : B +{ + friend T operator--(T& x, int) + { + decrementable_type nrv(x); + --x; + return nrv; + } +private: // The use of this typedef works around a Borland bug + typedef T decrementable_type; +}; + +// Iterator operator classes (contributed by Jeremy Siek) ------------------// + +template +struct dereferenceable : B +{ + P operator->() const + { + return &*static_cast(*this); + } +}; + +template +struct indexable : B +{ + R operator[](I n) const + { + return *(static_cast(*this) + n); + } +}; + +// More operator classes (contributed by Daryle Walker) --------------------// +// (NRVO-friendly implementation contributed by Daniel Frey) ---------------// + +#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template \ +struct NAME##2 : B \ +{ \ + friend T operator OP( const T& lhs, const U& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; \ + \ +template \ +struct NAME##1 : B \ +{ \ + friend T operator OP( const T& lhs, const T& rhs ) \ + { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ +}; + +#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +#define BOOST_BINARY_OPERATOR( NAME, OP ) \ +template \ +struct NAME##2 : B \ +{ \ + friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ +}; \ + \ +template \ +struct NAME##1 : B \ +{ \ + friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ +}; + +#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) + +BOOST_BINARY_OPERATOR( left_shiftable, << ) +BOOST_BINARY_OPERATOR( right_shiftable, >> ) + +#undef BOOST_BINARY_OPERATOR + +template +struct equivalent2 : B +{ + friend bool operator==(const T& x, const U& y) + { + return !(x < y) && !(x > y); + } +}; + +template +struct equivalent1 : B +{ + friend bool operator==(const T&x, const T&y) + { + return !(x < y) && !(y < x); + } +}; + +template +struct partially_ordered2 : B +{ + friend bool operator<=(const T& x, const U& y) + { return (x < y) || (x == y); } + friend bool operator>=(const T& x, const U& y) + { return (x > y) || (x == y); } + friend bool operator>(const U& x, const T& y) + { return y < x; } + friend bool operator<(const U& x, const T& y) + { return y > x; } + friend bool operator<=(const U& x, const T& y) + { return (y > x) || (y == x); } + friend bool operator>=(const U& x, const T& y) + { return (y < x) || (y == x); } +}; + +template +struct partially_ordered1 : B +{ + friend bool operator>(const T& x, const T& y) + { return y < x; } + friend bool operator<=(const T& x, const T& y) + { return (x < y) || (x == y); } + friend bool operator>=(const T& x, const T& y) + { return (y < x) || (x == y); } +}; + +// Combined operator classes (contributed by Daryle Walker) ----------------// + +template +struct totally_ordered2 + : less_than_comparable2 > {}; + +template +struct totally_ordered1 + : less_than_comparable1 > {}; + +template +struct additive2 + : addable2 > {}; + +template +struct additive1 + : addable1 > {}; + +template +struct multiplicative2 + : multipliable2 > {}; + +template +struct multiplicative1 + : multipliable1 > {}; + +template +struct integer_multiplicative2 + : multiplicative2 > {}; + +template +struct integer_multiplicative1 + : multiplicative1 > {}; + +template +struct arithmetic2 + : additive2 > {}; + +template +struct arithmetic1 + : additive1 > {}; + +template +struct integer_arithmetic2 + : additive2 > {}; + +template +struct integer_arithmetic1 + : additive1 > {}; + +template +struct bitwise2 + : xorable2 > > {}; + +template +struct bitwise1 + : xorable1 > > {}; + +template +struct unit_steppable + : incrementable > {}; + +template +struct shiftable2 + : left_shiftable2 > {}; + +template +struct shiftable1 + : left_shiftable1 > {}; + +template +struct ring_operators2 + : additive2 > > {}; + +template +struct ring_operators1 + : additive1 > {}; + +template +struct ordered_ring_operators2 + : ring_operators2 > {}; + +template +struct ordered_ring_operators1 + : ring_operators1 > {}; + +template +struct field_operators2 + : ring_operators2 > > {}; + +template +struct field_operators1 + : ring_operators1 > {}; + +template +struct ordered_field_operators2 + : field_operators2 > {}; + +template +struct ordered_field_operators1 + : field_operators1 > {}; + +template +struct euclidian_ring_operators2 + : ring_operators2 > > > > {}; + +template +struct euclidian_ring_operators1 + : ring_operators1 > > {}; + +template +struct ordered_euclidian_ring_operators2 + : totally_ordered2 > {}; + +template +struct ordered_euclidian_ring_operators1 + : totally_ordered1 > {}; + +template +struct input_iteratable + : equality_comparable1 > > {}; + +template +struct output_iteratable + : incrementable {}; + +template +struct forward_iteratable + : input_iteratable {}; + +template +struct bidirectional_iteratable + : forward_iteratable > {}; + +// To avoid repeated derivation from equality_comparable, +// which is an indirect base class of bidirectional_iterable, +// random_access_iteratable must not be derived from totally_ordered1 +// but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001) +template +struct random_access_iteratable + : bidirectional_iteratable > > > {}; + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE +} // namespace boost +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE + + +// BOOST_IMPORT_TEMPLATE1 .. BOOST_IMPORT_TEMPLATE4 - +// +// When BOOST_NO_OPERATORS_IN_NAMESPACE is defined we need a way to import an +// operator template into the boost namespace. BOOST_IMPORT_TEMPLATE1 is used +// for one-argument forms of operator templates; BOOST_IMPORT_TEMPLATE2 for +// two-argument forms. Note that these macros expect to be invoked from within +// boost. + +#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE + + // The template is already in boost so we have nothing to do. +# define BOOST_IMPORT_TEMPLATE4(template_name) +# define BOOST_IMPORT_TEMPLATE3(template_name) +# define BOOST_IMPORT_TEMPLATE2(template_name) +# define BOOST_IMPORT_TEMPLATE1(template_name) + +#else // BOOST_NO_OPERATORS_IN_NAMESPACE + +# ifndef BOOST_NO_USING_TEMPLATE + + // Bring the names in with a using-declaration + // to avoid stressing the compiler. +# define BOOST_IMPORT_TEMPLATE4(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE3(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE2(template_name) using ::template_name; +# define BOOST_IMPORT_TEMPLATE1(template_name) using ::template_name; + +# else + + // Otherwise, because a Borland C++ 5.5 bug prevents a using declaration + // from working, we are forced to use inheritance for that compiler. +# define BOOST_IMPORT_TEMPLATE4(template_name) \ + template \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE3(template_name) \ + template \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE2(template_name) \ + template \ + struct template_name : ::template_name {}; + +# define BOOST_IMPORT_TEMPLATE1(template_name) \ + template \ + struct template_name : ::template_name {}; + +# endif // BOOST_NO_USING_TEMPLATE + +#endif // BOOST_NO_OPERATORS_IN_NAMESPACE + +// +// Here's where we put it all together, defining the xxxx forms of the templates +// in namespace boost. We also define specializations of is_chained_base<> for +// the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as +// necessary. +// +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +// is_chained_base<> - a traits class used to distinguish whether an operator +// template argument is being used for base class chaining, or is specifying a +// 2nd argument type. + +namespace boost { +// A type parameter is used instead of a plain bool because Borland's compiler +// didn't cope well with the more obvious non-type template parameter. +namespace detail { + struct true_t {}; + struct false_t {}; +} // namespace detail + +// Unspecialized version assumes that most types are not being used for base +// class chaining. We specialize for the operator templates defined in this +// library. +template struct is_chained_base { + typedef ::boost::detail::false_t value; +}; + +} // namespace boost + +// Import a 4-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ + BOOST_IMPORT_TEMPLATE4(template_name4) \ + template \ + struct is_chained_base< ::boost::template_name4 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 3-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ + BOOST_IMPORT_TEMPLATE3(template_name3) \ + template \ + struct is_chained_base< ::boost::template_name3 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 2-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ + BOOST_IMPORT_TEMPLATE2(template_name2) \ + template \ + struct is_chained_base< ::boost::template_name2 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// Import a 1-type-argument operator template into boost (if necessary) and +// provide a specialization of 'is_chained_base<>' for it. +# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ + BOOST_IMPORT_TEMPLATE1(template_name1) \ + template \ + struct is_chained_base< ::boost::template_name1 > { \ + typedef ::boost::detail::true_t value; \ + }; + +// BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it +// can be used for specifying both 1-argument and 2-argument forms. Requires the +// existence of two previously defined class templates named '1' +// and '2' which must implement the corresponding 1- and 2- +// argument forms. +// +// The template type parameter O == is_chained_base::value is used to +// distinguish whether the 2nd argument to is being used for +// base class chaining from another boost operator template or is describing a +// 2nd operand type. O == true_t only when U is actually an another operator +// template from the library. Partial specialization is used to select an +// implementation in terms of either '1' or '2'. +// + +# define BOOST_OPERATOR_TEMPLATE(template_name) \ +template ::value \ + > \ +struct template_name : template_name##2 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct template_name \ + : template_name##1 {}; \ + \ +template \ +struct is_chained_base< ::boost::template_name > { \ + typedef ::boost::detail::true_t value; \ +}; \ + \ +BOOST_OPERATOR_TEMPLATE2(template_name##2) \ +BOOST_OPERATOR_TEMPLATE1(template_name##1) + + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ + BOOST_IMPORT_TEMPLATE4(template_name4) +# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ + BOOST_IMPORT_TEMPLATE3(template_name3) +# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ + BOOST_IMPORT_TEMPLATE2(template_name2) +# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ + BOOST_IMPORT_TEMPLATE1(template_name1) + + // In this case we can only assume that template_name<> is equivalent to the + // more commonly needed template_name1<> form. +# define BOOST_OPERATOR_TEMPLATE(template_name) \ + template \ + struct template_name : template_name##1 {}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace boost { + +BOOST_OPERATOR_TEMPLATE(less_than_comparable) +BOOST_OPERATOR_TEMPLATE(equality_comparable) +BOOST_OPERATOR_TEMPLATE(multipliable) +BOOST_OPERATOR_TEMPLATE(addable) +BOOST_OPERATOR_TEMPLATE(subtractable) +BOOST_OPERATOR_TEMPLATE2(subtractable2_left) +BOOST_OPERATOR_TEMPLATE(dividable) +BOOST_OPERATOR_TEMPLATE2(dividable2_left) +BOOST_OPERATOR_TEMPLATE(modable) +BOOST_OPERATOR_TEMPLATE2(modable2_left) +BOOST_OPERATOR_TEMPLATE(xorable) +BOOST_OPERATOR_TEMPLATE(andable) +BOOST_OPERATOR_TEMPLATE(orable) + +BOOST_OPERATOR_TEMPLATE1(incrementable) +BOOST_OPERATOR_TEMPLATE1(decrementable) + +BOOST_OPERATOR_TEMPLATE2(dereferenceable) +BOOST_OPERATOR_TEMPLATE3(indexable) + +BOOST_OPERATOR_TEMPLATE(left_shiftable) +BOOST_OPERATOR_TEMPLATE(right_shiftable) +BOOST_OPERATOR_TEMPLATE(equivalent) +BOOST_OPERATOR_TEMPLATE(partially_ordered) + +BOOST_OPERATOR_TEMPLATE(totally_ordered) +BOOST_OPERATOR_TEMPLATE(additive) +BOOST_OPERATOR_TEMPLATE(multiplicative) +BOOST_OPERATOR_TEMPLATE(integer_multiplicative) +BOOST_OPERATOR_TEMPLATE(arithmetic) +BOOST_OPERATOR_TEMPLATE(integer_arithmetic) +BOOST_OPERATOR_TEMPLATE(bitwise) +BOOST_OPERATOR_TEMPLATE1(unit_steppable) +BOOST_OPERATOR_TEMPLATE(shiftable) +BOOST_OPERATOR_TEMPLATE(ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_ring_operators) +BOOST_OPERATOR_TEMPLATE(field_operators) +BOOST_OPERATOR_TEMPLATE(ordered_field_operators) +BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators) +BOOST_OPERATOR_TEMPLATE2(input_iteratable) +BOOST_OPERATOR_TEMPLATE1(output_iteratable) +BOOST_OPERATOR_TEMPLATE2(forward_iteratable) +BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable) +BOOST_OPERATOR_TEMPLATE4(random_access_iteratable) + +#undef BOOST_OPERATOR_TEMPLATE +#undef BOOST_OPERATOR_TEMPLATE4 +#undef BOOST_OPERATOR_TEMPLATE3 +#undef BOOST_OPERATOR_TEMPLATE2 +#undef BOOST_OPERATOR_TEMPLATE1 +#undef BOOST_IMPORT_TEMPLATE1 +#undef BOOST_IMPORT_TEMPLATE2 +#undef BOOST_IMPORT_TEMPLATE3 +#undef BOOST_IMPORT_TEMPLATE4 + +// The following 'operators' classes can only be used portably if the derived class +// declares ALL of the required member operators. +template +struct operators2 + : totally_ordered2 > > {}; + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +template +struct operators : operators2 {}; + +template struct operators +#else +template struct operators +#endif + : totally_ordered > > > {}; + +// Iterator helper classes (contributed by Jeremy Siek) -------------------// +// (Input and output iterator helpers contributed by Daryle Walker) -------// +// (Changed to use combined operator classes by Daryle Walker) ------------// +template +struct input_iterator_helper + : input_iteratable > {}; + +template +struct output_iterator_helper + : output_iteratable > +{ + T& operator*() { return static_cast(*this); } + T& operator++() { return static_cast(*this); } +}; + +template +struct forward_iterator_helper + : forward_iteratable > {}; + +template +struct bidirectional_iterator_helper + : bidirectional_iteratable > {}; + +template +struct random_access_iterator_helper + : random_access_iteratable > +{ + friend D requires_difference_operator(const T& x, const T& y) { + return x - y; + } +}; // random_access_iterator_helper + +} // namespace boost + +#if defined(__sgi) && !defined(__GNUC__) +#pragma reset woff 1234 +#endif + +#endif // BOOST_OPERATORS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/lambda/lambda.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/lambda/lambda.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ + +#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED +#define BOOST_MPL_LAMBDA_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/lambda.hpp,v $ +// $Date: 2004/09/02 15:40:41 $ +// $Revision: 1.5 $ + +#include +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# include +#else +# include +# include +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#endif // BOOST_MPL_LAMBDA_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/limits.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/limits.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP +# define BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP +# +# define BOOST_PP_LIMIT_MAG 256 +# define BOOST_PP_LIMIT_TUPLE 25 +# define BOOST_PP_LIMIT_DIM 3 +# define BOOST_PP_LIMIT_REPEAT 256 +# define BOOST_PP_LIMIT_WHILE 256 +# define BOOST_PP_LIMIT_FOR 256 +# define BOOST_PP_LIMIT_ITERATION 256 +# define BOOST_PP_LIMIT_ITERATION_DIM 3 +# define BOOST_PP_LIMIT_SEQ 256 +# define BOOST_PP_LIMIT_SLOT_SIG 10 +# define BOOST_PP_LIMIT_SLOT_COUNT 5 +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/complex.hpp --- a/epoc32/include/stdapis/boost/math/complex.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -// (C) Copyright John Maddock 2005. -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_MATH_COMPLEX_INCLUDED -#define BOOST_MATH_COMPLEX_INCLUDED - -#ifndef BOOST_MATH_COMPLEX_ASIN_INCLUDED -# include -#endif -#ifndef BOOST_MATH_COMPLEX_ASINH_INCLUDED -# include -#endif -#ifndef BOOST_MATH_COMPLEX_ACOS_INCLUDED -# include -#endif -#ifndef BOOST_MATH_COMPLEX_ACOSH_INCLUDED -# include -#endif -#ifndef BOOST_MATH_COMPLEX_ATAN_INCLUDED -# include -#endif -#ifndef BOOST_MATH_COMPLEX_ATANH_INCLUDED -# include -#endif -#ifndef BOOST_MATH_COMPLEX_FABS_INCLUDED -# include -#endif - - -#endif // BOOST_MATH_COMPLEX_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/complex/acosh.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/math/complex/acosh.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,198 @@ +// boost asinh.hpp header file + +// (C) Copyright Eric Ford 2001 & Hubert Holin. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_ACOSH_HPP +#define BOOST_ACOSH_HPP + + +#include +#include +#include +#include + + +#include + + +// This is the inverse of the hyperbolic cosine function. + +namespace boost +{ + namespace math + { +#if defined(__GNUC__) && (__GNUC__ < 3) + // gcc 2.x ignores function scope using declarations, + // put them in the scope of the enclosing namespace instead: + + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; +#endif + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + // This is the main fare + + template + inline T acosh(const T x) + { + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; + + + T const one = static_cast(1); + T const two = static_cast(2); + + static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); + static T const taylor_n_bound = sqrt(taylor_2_bound); + static T const upper_taylor_2_bound = one/taylor_2_bound; + + if (x < one) + { + if (numeric_limits::has_quiet_NaN) + { + return(numeric_limits::quiet_NaN()); + } + else + { + ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); + ::std::domain_error bad_argument(error_reporting); + + throw(bad_argument); + } + } + else if (x >= taylor_n_bound) + { + if (x > upper_taylor_2_bound) + { + // approximation by laurent series in 1/x at 0+ order from -1 to 0 + return( log( x*two) ); + } + else + { + return( log( x + sqrt(x*x-one) ) ); + } + } + else + { + T y = sqrt(x-one); + + // approximation by taylor series in y at 0 up to order 2 + T result = y; + + if (y >= taylor_2_bound) + { + T y3 = y*y*y; + + // approximation by taylor series in y at 0 up to order 4 + result -= y3/static_cast(12); + } + + return(sqrt(static_cast(2))*result); + } + } +#else + // These are implementation details (for main fare see below) + + namespace detail + { + template < + typename T, + bool QuietNanSupported + > + struct acosh_helper2_t + { + static T get_NaN() + { + return(::std::numeric_limits::quiet_NaN()); + } + }; // boost::detail::acosh_helper2_t + + + template + struct acosh_helper2_t + { + static T get_NaN() + { + ::std::string error_reporting("Argument to acosh is greater than or equal to +1!"); + ::std::domain_error bad_argument(error_reporting); + + throw(bad_argument); + } + }; // boost::detail::acosh_helper2_t + + } // boost::detail + + + // This is the main fare + + template + inline T acosh(const T x) + { + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; + + typedef detail::acosh_helper2_t::has_quiet_NaN> helper2_type; + + + T const one = static_cast(1); + T const two = static_cast(2); + + static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); + static T const taylor_n_bound = sqrt(taylor_2_bound); + static T const upper_taylor_2_bound = one/taylor_2_bound; + + if (x < one) + { + return(helper2_type::get_NaN()); + } + else if (x >= taylor_n_bound) + { + if (x > upper_taylor_2_bound) + { + // approximation by laurent series in 1/x at 0+ order from -1 to 0 + return( log( x*two) ); + } + else + { + return( log( x + sqrt(x*x-one) ) ); + } + } + else + { + T y = sqrt(x-one); + + // approximation by taylor series in y at 0 up to order 2 + T result = y; + + if (y >= taylor_2_bound) + { + T y3 = y*y*y; + + // approximation by taylor series in y at 0 up to order 4 + result -= y3/static_cast(12); + } + + return(sqrt(static_cast(2))*result); + } + } +#endif /* defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) */ + } +} + +#endif /* BOOST_ACOSH_HPP */ + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/complex/asinh.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/math/complex/asinh.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,101 @@ +// boost asinh.hpp header file + +// (C) Copyright Eric Ford & Hubert Holin 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_ASINH_HPP +#define BOOST_ASINH_HPP + + +#include +#include +#include +#include + + +#include + + +// This is the inverse of the hyperbolic sine function. + +namespace boost +{ + namespace math + { +#if defined(__GNUC__) && (__GNUC__ < 3) + // gcc 2.x ignores function scope using declarations, + // put them in the scope of the enclosing namespace instead: + + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; +#endif + + template + inline T asinh(const T x) + { + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; + + + T const one = static_cast(1); + T const two = static_cast(2); + + static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); + static T const taylor_n_bound = sqrt(taylor_2_bound); + static T const upper_taylor_2_bound = one/taylor_2_bound; + static T const upper_taylor_n_bound = one/taylor_n_bound; + + if (x >= +taylor_n_bound) + { + if (x > upper_taylor_n_bound) + { + if (x > upper_taylor_2_bound) + { + // approximation by laurent series in 1/x at 0+ order from -1 to 0 + return( log( x * two) ); + } + else + { + // approximation by laurent series in 1/x at 0+ order from -1 to 1 + return( log( x*two + (one/(x*two)) ) ); + } + } + else + { + return( log( x + sqrt(x*x+one) ) ); + } + } + else if (x <= -taylor_n_bound) + { + return(-asinh(-x)); + } + else + { + // approximation by taylor series in x at 0 up to order 2 + T result = x; + + if (abs(x) >= taylor_2_bound) + { + T x3 = x*x*x; + + // approximation by taylor series in x at 0 up to order 4 + result -= x3/static_cast(6); + } + + return(result); + } + } + } +} + +#endif /* BOOST_ASINH_HPP */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/complex/atanh.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/math/complex/atanh.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,267 @@ +// boost atanh.hpp header file + +// (C) Copyright Hubert Holin 2001. +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org for updates, documentation, and revision history. + +#ifndef BOOST_ATANH_HPP +#define BOOST_ATANH_HPP + + +#include +#include +#include +#include + + +#include + + +// This is the inverse of the hyperbolic tangent function. + +namespace boost +{ + namespace math + { +#if defined(__GNUC__) && (__GNUC__ < 3) + // gcc 2.x ignores function scope using declarations, + // put them in the scope of the enclosing namespace instead: + + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; +#endif + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + // This is the main fare + + template + inline T atanh(const T x) + { + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; + + T const one = static_cast(1); + T const two = static_cast(2); + + static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); + static T const taylor_n_bound = sqrt(taylor_2_bound); + + if (x < -one) + { + if (numeric_limits::has_quiet_NaN) + { + return(numeric_limits::quiet_NaN()); + } + else + { + ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); + ::std::domain_error bad_argument(error_reporting); + + throw(bad_argument); + } + } + else if (x < -one+numeric_limits::epsilon()) + { + if (numeric_limits::has_infinity) + { + return(-numeric_limits::infinity()); + } + else + { + ::std::string error_reporting("Argument to atanh is -1 (result: -Infinity)!"); + ::std::out_of_range bad_argument(error_reporting); + + throw(bad_argument); + } + } + else if (x > +one-numeric_limits::epsilon()) + { + if (numeric_limits::has_infinity) + { + return(+numeric_limits::infinity()); + } + else + { + ::std::string error_reporting("Argument to atanh is +1 (result: +Infinity)!"); + ::std::out_of_range bad_argument(error_reporting); + + throw(bad_argument); + } + } + else if (x > +one) + { + if (numeric_limits::has_quiet_NaN) + { + return(numeric_limits::quiet_NaN()); + } + else + { + ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); + ::std::domain_error bad_argument(error_reporting); + + throw(bad_argument); + } + } + else if (abs(x) >= taylor_n_bound) + { + return(log( (one + x) / (one - x) ) / two); + } + else + { + // approximation by taylor series in x at 0 up to order 2 + T result = x; + + if (abs(x) >= taylor_2_bound) + { + T x3 = x*x*x; + + // approximation by taylor series in x at 0 up to order 4 + result += x3/static_cast(3); + } + + return(result); + } + } +#else + // These are implementation details (for main fare see below) + + namespace detail + { + template < + typename T, + bool InfinitySupported + > + struct atanh_helper1_t + { + static T get_pos_infinity() + { + return(+::std::numeric_limits::infinity()); + } + + static T get_neg_infinity() + { + return(-::std::numeric_limits::infinity()); + } + }; // boost::math::detail::atanh_helper1_t + + + template + struct atanh_helper1_t + { + static T get_pos_infinity() + { + ::std::string error_reporting("Argument to atanh is +1 (result: +Infinity)!"); + ::std::out_of_range bad_argument(error_reporting); + + throw(bad_argument); + } + + static T get_neg_infinity() + { + ::std::string error_reporting("Argument to atanh is -1 (result: -Infinity)!"); + ::std::out_of_range bad_argument(error_reporting); + + throw(bad_argument); + } + }; // boost::math::detail::atanh_helper1_t + + + template < + typename T, + bool QuietNanSupported + > + struct atanh_helper2_t + { + static T get_NaN() + { + return(::std::numeric_limits::quiet_NaN()); + } + }; // boost::detail::atanh_helper2_t + + + template + struct atanh_helper2_t + { + static T get_NaN() + { + ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); + ::std::domain_error bad_argument(error_reporting); + + throw(bad_argument); + } + }; // boost::detail::atanh_helper2_t + } // boost::detail + + + // This is the main fare + + template + inline T atanh(const T x) + { + using ::std::abs; + using ::std::sqrt; + using ::std::log; + + using ::std::numeric_limits; + + typedef detail::atanh_helper1_t::has_infinity> helper1_type; + typedef detail::atanh_helper2_t::has_quiet_NaN> helper2_type; + + + T const one = static_cast(1); + T const two = static_cast(2); + + static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); + static T const taylor_n_bound = sqrt(taylor_2_bound); + + if (x < -one) + { + return(helper2_type::get_NaN()); + } + else if (x < -one+numeric_limits::epsilon()) + { + return(helper1_type::get_neg_infinity()); + } + else if (x > +one-numeric_limits::epsilon()) + { + return(helper1_type::get_pos_infinity()); + } + else if (x > +one) + { + return(helper2_type::get_NaN()); + } + else if (abs(x) >= taylor_n_bound) + { + return(log( (one + x) / (one - x) ) / two); + } + else + { + // approximation by taylor series in x at 0 up to order 2 + T result = x; + + if (abs(x) >= taylor_2_bound) + { + T x3 = x*x*x; + + // approximation by taylor series in x at 0 up to order 4 + result += x3/static_cast(3); + } + + return(result); + } + } +#endif /* defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) */ + } +} + +#endif /* BOOST_ATANH_HPP */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/special_functions/acosh.hpp --- a/epoc32/include/stdapis/boost/math/special_functions/acosh.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,198 +0,0 @@ -// boost asinh.hpp header file - -// (C) Copyright Eric Ford 2001 & Hubert Holin. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#ifndef BOOST_ACOSH_HPP -#define BOOST_ACOSH_HPP - - -#include -#include -#include -#include - - -#include - - -// This is the inverse of the hyperbolic cosine function. - -namespace boost -{ - namespace math - { -#if defined(__GNUC__) && (__GNUC__ < 3) - // gcc 2.x ignores function scope using declarations, - // put them in the scope of the enclosing namespace instead: - - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; -#endif - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - // This is the main fare - - template - inline T acosh(const T x) - { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - - if (x < one) - { - if (numeric_limits::has_quiet_NaN) - { - return(numeric_limits::quiet_NaN()); - } - else - { - ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); - ::std::domain_error bad_argument(error_reporting); - - throw(bad_argument); - } - } - else if (x >= taylor_n_bound) - { - if (x > upper_taylor_2_bound) - { - // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x*two) ); - } - else - { - return( log( x + sqrt(x*x-one) ) ); - } - } - else - { - T y = sqrt(x-one); - - // approximation by taylor series in y at 0 up to order 2 - T result = y; - - if (y >= taylor_2_bound) - { - T y3 = y*y*y; - - // approximation by taylor series in y at 0 up to order 4 - result -= y3/static_cast(12); - } - - return(sqrt(static_cast(2))*result); - } - } -#else - // These are implementation details (for main fare see below) - - namespace detail - { - template < - typename T, - bool QuietNanSupported - > - struct acosh_helper2_t - { - static T get_NaN() - { - return(::std::numeric_limits::quiet_NaN()); - } - }; // boost::detail::acosh_helper2_t - - - template - struct acosh_helper2_t - { - static T get_NaN() - { - ::std::string error_reporting("Argument to acosh is greater than or equal to +1!"); - ::std::domain_error bad_argument(error_reporting); - - throw(bad_argument); - } - }; // boost::detail::acosh_helper2_t - - } // boost::detail - - - // This is the main fare - - template - inline T acosh(const T x) - { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - typedef detail::acosh_helper2_t::has_quiet_NaN> helper2_type; - - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - - if (x < one) - { - return(helper2_type::get_NaN()); - } - else if (x >= taylor_n_bound) - { - if (x > upper_taylor_2_bound) - { - // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x*two) ); - } - else - { - return( log( x + sqrt(x*x-one) ) ); - } - } - else - { - T y = sqrt(x-one); - - // approximation by taylor series in y at 0 up to order 2 - T result = y; - - if (y >= taylor_2_bound) - { - T y3 = y*y*y; - - // approximation by taylor series in y at 0 up to order 4 - result -= y3/static_cast(12); - } - - return(sqrt(static_cast(2))*result); - } - } -#endif /* defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) */ - } -} - -#endif /* BOOST_ACOSH_HPP */ - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/special_functions/asinh.hpp --- a/epoc32/include/stdapis/boost/math/special_functions/asinh.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,101 +0,0 @@ -// boost asinh.hpp header file - -// (C) Copyright Eric Ford & Hubert Holin 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#ifndef BOOST_ASINH_HPP -#define BOOST_ASINH_HPP - - -#include -#include -#include -#include - - -#include - - -// This is the inverse of the hyperbolic sine function. - -namespace boost -{ - namespace math - { -#if defined(__GNUC__) && (__GNUC__ < 3) - // gcc 2.x ignores function scope using declarations, - // put them in the scope of the enclosing namespace instead: - - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; -#endif - - template - inline T asinh(const T x) - { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - static T const upper_taylor_2_bound = one/taylor_2_bound; - static T const upper_taylor_n_bound = one/taylor_n_bound; - - if (x >= +taylor_n_bound) - { - if (x > upper_taylor_n_bound) - { - if (x > upper_taylor_2_bound) - { - // approximation by laurent series in 1/x at 0+ order from -1 to 0 - return( log( x * two) ); - } - else - { - // approximation by laurent series in 1/x at 0+ order from -1 to 1 - return( log( x*two + (one/(x*two)) ) ); - } - } - else - { - return( log( x + sqrt(x*x+one) ) ); - } - } - else if (x <= -taylor_n_bound) - { - return(-asinh(-x)); - } - else - { - // approximation by taylor series in x at 0 up to order 2 - T result = x; - - if (abs(x) >= taylor_2_bound) - { - T x3 = x*x*x; - - // approximation by taylor series in x at 0 up to order 4 - result -= x3/static_cast(6); - } - - return(result); - } - } - } -} - -#endif /* BOOST_ASINH_HPP */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/math/special_functions/atanh.hpp --- a/epoc32/include/stdapis/boost/math/special_functions/atanh.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,267 +0,0 @@ -// boost atanh.hpp header file - -// (C) Copyright Hubert Holin 2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org for updates, documentation, and revision history. - -#ifndef BOOST_ATANH_HPP -#define BOOST_ATANH_HPP - - -#include -#include -#include -#include - - -#include - - -// This is the inverse of the hyperbolic tangent function. - -namespace boost -{ - namespace math - { -#if defined(__GNUC__) && (__GNUC__ < 3) - // gcc 2.x ignores function scope using declarations, - // put them in the scope of the enclosing namespace instead: - - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; -#endif - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - // This is the main fare - - template - inline T atanh(const T x) - { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - - if (x < -one) - { - if (numeric_limits::has_quiet_NaN) - { - return(numeric_limits::quiet_NaN()); - } - else - { - ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); - ::std::domain_error bad_argument(error_reporting); - - throw(bad_argument); - } - } - else if (x < -one+numeric_limits::epsilon()) - { - if (numeric_limits::has_infinity) - { - return(-numeric_limits::infinity()); - } - else - { - ::std::string error_reporting("Argument to atanh is -1 (result: -Infinity)!"); - ::std::out_of_range bad_argument(error_reporting); - - throw(bad_argument); - } - } - else if (x > +one-numeric_limits::epsilon()) - { - if (numeric_limits::has_infinity) - { - return(+numeric_limits::infinity()); - } - else - { - ::std::string error_reporting("Argument to atanh is +1 (result: +Infinity)!"); - ::std::out_of_range bad_argument(error_reporting); - - throw(bad_argument); - } - } - else if (x > +one) - { - if (numeric_limits::has_quiet_NaN) - { - return(numeric_limits::quiet_NaN()); - } - else - { - ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); - ::std::domain_error bad_argument(error_reporting); - - throw(bad_argument); - } - } - else if (abs(x) >= taylor_n_bound) - { - return(log( (one + x) / (one - x) ) / two); - } - else - { - // approximation by taylor series in x at 0 up to order 2 - T result = x; - - if (abs(x) >= taylor_2_bound) - { - T x3 = x*x*x; - - // approximation by taylor series in x at 0 up to order 4 - result += x3/static_cast(3); - } - - return(result); - } - } -#else - // These are implementation details (for main fare see below) - - namespace detail - { - template < - typename T, - bool InfinitySupported - > - struct atanh_helper1_t - { - static T get_pos_infinity() - { - return(+::std::numeric_limits::infinity()); - } - - static T get_neg_infinity() - { - return(-::std::numeric_limits::infinity()); - } - }; // boost::math::detail::atanh_helper1_t - - - template - struct atanh_helper1_t - { - static T get_pos_infinity() - { - ::std::string error_reporting("Argument to atanh is +1 (result: +Infinity)!"); - ::std::out_of_range bad_argument(error_reporting); - - throw(bad_argument); - } - - static T get_neg_infinity() - { - ::std::string error_reporting("Argument to atanh is -1 (result: -Infinity)!"); - ::std::out_of_range bad_argument(error_reporting); - - throw(bad_argument); - } - }; // boost::math::detail::atanh_helper1_t - - - template < - typename T, - bool QuietNanSupported - > - struct atanh_helper2_t - { - static T get_NaN() - { - return(::std::numeric_limits::quiet_NaN()); - } - }; // boost::detail::atanh_helper2_t - - - template - struct atanh_helper2_t - { - static T get_NaN() - { - ::std::string error_reporting("Argument to atanh is strictly greater than +1 or strictly smaller than -1!"); - ::std::domain_error bad_argument(error_reporting); - - throw(bad_argument); - } - }; // boost::detail::atanh_helper2_t - } // boost::detail - - - // This is the main fare - - template - inline T atanh(const T x) - { - using ::std::abs; - using ::std::sqrt; - using ::std::log; - - using ::std::numeric_limits; - - typedef detail::atanh_helper1_t::has_infinity> helper1_type; - typedef detail::atanh_helper2_t::has_quiet_NaN> helper2_type; - - - T const one = static_cast(1); - T const two = static_cast(2); - - static T const taylor_2_bound = sqrt(numeric_limits::epsilon()); - static T const taylor_n_bound = sqrt(taylor_2_bound); - - if (x < -one) - { - return(helper2_type::get_NaN()); - } - else if (x < -one+numeric_limits::epsilon()) - { - return(helper1_type::get_neg_infinity()); - } - else if (x > +one-numeric_limits::epsilon()) - { - return(helper1_type::get_pos_infinity()); - } - else if (x > +one) - { - return(helper2_type::get_NaN()); - } - else if (abs(x) >= taylor_n_bound) - { - return(log( (one + x) / (one - x) ) / two); - } - else - { - // approximation by taylor series in x at 0 up to order 2 - T result = x; - - if (abs(x) >= taylor_2_bound) - { - T x3 = x*x*x; - - // approximation by taylor series in x at 0 up to order 4 - result += x3/static_cast(3); - } - - return(result); - } - } -#endif /* defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) */ - } -} - -#endif /* BOOST_ATANH_HPP */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/and.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/and.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP +# define BOOST_PREPROCESSOR_LOGICAL_AND_HPP +# +# include +# include +# include +# +# /* BOOST_PP_AND */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# else +# define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) +# define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/apply.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/apply.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,34 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_FACILITIES_APPLY_HPP +# define BOOST_PREPROCESSOR_FACILITIES_APPLY_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_APPLY */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_APPLY(x) BOOST_PP_APPLY_I(x) +# define BOOST_PP_APPLY_I(x) BOOST_PP_EXPR_IIF(BOOST_PP_IS_UNARY(x), BOOST_PP_TUPLE_REM_1 x) +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() +# define BOOST_PP_APPLY(x) BOOST_PP_APPLY_I(x) +# define BOOST_PP_APPLY_I(x) BOOST_PP_APPLY_ ## x +# define BOOST_PP_APPLY_(x) x +# define BOOST_PP_APPLY_BOOST_PP_NIL +# else +# define BOOST_PP_APPLY(x) BOOST_PP_EXPR_IIF(BOOST_PP_IS_UNARY(x), BOOST_PP_TUPLE_REM_1 x) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/apply_fwd.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/apply_fwd.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,52 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_fwd.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F, typename T1 = na, typename T2 = na, typename T3 = na + , typename T4 = na, typename T5 = na + > +struct apply; + +template< + typename F + > +struct apply0; + +template< + typename F, typename T1 + > +struct apply1; + +template< + typename F, typename T1, typename T2 + > +struct apply2; + +template< + typename F, typename T1, typename T2, typename T3 + > +struct apply3; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + > +struct apply4; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + > +struct apply5; + +}} + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/apply_wrap.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/apply_wrap.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,84 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/apply_wrap.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +template< + typename F + + , typename has_apply_ = typename aux::has_apply::type + + > +struct apply_wrap0 + + : F::template apply< > +{ +}; + +template< typename F > +struct apply_wrap0< F,true_ > + : F::apply +{ +}; + +template< + typename F, typename T1 + + > +struct apply_wrap1 + + : F::template apply +{ +}; + +template< + typename F, typename T1, typename T2 + + > +struct apply_wrap2 + + : F::template apply< T1,T2 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3 + + > +struct apply_wrap3 + + : F::template apply< T1,T2,T3 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + + > +struct apply_wrap4 + + : F::template apply< T1,T2,T3,T4 > +{ +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + + > +struct apply_wrap5 + + : F::template apply< T1,T2,T3,T4,T5 > +{ +}; + +}} + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/at.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/at.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_AT_HPP +# define BOOST_PREPROCESSOR_LIST_AT_HPP +# +# include +# include +# include +# +# /* BOOST_PP_LIST_AT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) +# else +# define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_AT_I(list, index) +# define BOOST_PP_LIST_AT_I(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) +# endif +# +# /* BOOST_PP_LIST_AT_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) +# else +# define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_AT_D_I(d, list, index) +# define BOOST_PP_LIST_AT_D_I(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/advance_backward.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/advance_backward.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_backward; +template<> +struct advance_backward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_backward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_backward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_backward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_backward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename prior::type iter1; + typedef typename prior::type iter2; + typedef typename prior::type iter3; + typedef typename prior::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_backward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_backward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_backward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/advance_forward.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/advance_forward.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,97 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< long N > struct advance_forward; +template<> +struct advance_forward<0> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef iter0 type; + }; +}; + +template<> +struct advance_forward<1> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef iter1 type; + }; +}; + +template<> +struct advance_forward<2> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef iter2 type; + }; +}; + +template<> +struct advance_forward<3> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef iter3 type; + }; +}; + +template<> +struct advance_forward<4> +{ + template< typename Iterator > struct apply + { + typedef Iterator iter0; + typedef typename next::type iter1; + typedef typename next::type iter2; + typedef typename next::type iter3; + typedef typename next::type iter4; + typedef iter4 type; + }; +}; + +template< long N > +struct advance_forward +{ + template< typename Iterator > struct apply + { + typedef typename apply_wrap1< + advance_forward<4> + , Iterator + >::type chunk_result_; + + typedef typename apply_wrap1< + advance_forward<( + (N - 4) < 0 + ? 0 + : N - 4 + )> + , chunk_result_ + >::type type; + }; +}; + +}}} + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/arity.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/arity.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED +#define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/limits/arity.hpp,v $ +// $Date: 2004/09/02 15:40:57 $ +// $Revision: 1.4 $ + +#if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) +# define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 +#endif + +#endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/at_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/at_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ + +#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/at_impl.hpp,v $ +// $Date: 2004/09/02 15:41:02 $ +// $Revision: 1.2 $ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct at_impl< aux::set_tag > +{ + template< typename Set, typename T > struct apply + { + typedef typename if_< + has_key_impl::apply + , T + , void_ + >::type type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/begin_end_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/begin_end_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/begin_end_impl.hpp,v $ +// $Date: 2004/09/02 15:41:02 $ +// $Revision: 1.3 $ + +#include +#include + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::set_tag > +{ + template< typename Set > struct apply + { + typedef s_iter type; + }; +}; + +template<> +struct end_impl< aux::set_tag > +{ + template< typename Set > struct apply + { + typedef s_iter< Set,set0<> > type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/clear_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/clear_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/clear_impl.hpp,v $ +// $Date: 2004/09/02 15:41:02 $ +// $Revision: 1.2 $ + +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct clear_impl< aux::set_tag > +{ + template< typename Set > struct apply + { + typedef set0<> type; + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/config/has_apply.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/config/has_apply.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED +#define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/has_apply.hpp,v $ +// $Date: 2004/09/03 15:56:55 $ +// $Revision: 1.1 $ + +#include +#include + +namespace boost { namespace mpl { namespace aux { +#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) +BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) +#else +template< typename T, typename fallback_ = false_ > +struct has_apply + : fallback_ +{ +}; +#endif +}}} + +#endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/config/preprocessor.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/config/preprocessor.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,19 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org/libs/preprocessor for documentation. */ +# +# ifndef BOOST_PREPROCESSOR_HPP +# define BOOST_PREPROCESSOR_HPP +# +# include +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/config/workaround.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/config/workaround.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - -#ifndef BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED -#define BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2002-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/aux_/config/workaround.hpp,v $ -// $Date: 2004/09/02 15:40:45 $ -// $Revision: 1.3 $ - -#include - -#endif // BOOST_MPL_AUX_CONFIG_WORKAROUND_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/empty_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/empty_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/empty_impl.hpp,v $ +// $Date: 2004/09/02 15:41:02 $ +// $Revision: 1.2 $ + +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct empty_impl< aux::set_tag > +{ + template< typename Set > struct apply + : not_< typename Set::size > + { + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/fold_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/fold_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl +{ + typedef fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,First,Last,State,ForwardOp > + : fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2::type>::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/full_lambda.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/full_lambda.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,554 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { + +namespace aux { + +template< + bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false + , bool C5 = false + > +struct lambda_or + : true_ +{ +}; + +template<> +struct lambda_or< false,false,false,false,false > + : false_ +{ +}; + +} // namespace aux + +template< + typename T + , typename Tag + + > +struct lambda +{ + typedef false_ is_le; + typedef T result_; + typedef T type; +}; + +template< + typename T + > +struct is_lambda_expression + : lambda::is_le +{ +}; + +template< int N, typename Tag > +struct lambda< arg, Tag > +{ + typedef true_ is_le; + typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 + typedef mpl::protect type; +}; + +template< + typename F + , typename Tag + > +struct lambda< + bind0 + , Tag + + > +{ + typedef false_ is_le; + typedef bind0< + F + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1 +{ + typedef F< + typename L1::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1 > class F + , typename L1 + > +struct le_result1< true_,Tag,F,L1 > +{ + typedef bind1< + quote1< F,Tag > + , typename L1::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1 > class F + , typename T1 + , typename Tag + > +struct lambda< + F + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef typename l1::is_le is_le1; + typedef typename aux::lambda_or< + is_le1::value + >::type is_le; + + typedef aux::le_result1< + is_le, Tag, F, l1 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1 + , typename Tag + > +struct lambda< + bind1< F,T1 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind1< + F + , T1 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2 +{ + typedef F< + typename L1::type, typename L2::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2 > class F + , typename L1, typename L2 + > +struct le_result2< true_,Tag,F,L1,L2 > +{ + typedef bind2< + quote2< F,Tag > + , typename L1::result_, typename L2::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2 > class F + , typename T1, typename T2 + , typename Tag + > +struct lambda< + F< T1,T2 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value + >::type is_le; + + typedef aux::le_result2< + is_le, Tag, F, l1, l2 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2 + , typename Tag + > +struct lambda< + bind2< F,T1,T2 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind2< + F + , T1, T2 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3 > class F + , typename L1, typename L2, typename L3 + > +struct le_result3< true_,Tag,F,L1,L2,L3 > +{ + typedef bind3< + quote3< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3 > class F + , typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + F< T1,T2,T3 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value + >::type is_le; + + typedef aux::le_result3< + is_le, Tag, F, l1, l2, l3 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3 + , typename Tag + > +struct lambda< + bind3< F,T1,T2,T3 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind3< + F + , T1, T2, T3 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4 > class F + , typename L1, typename L2, typename L3, typename L4 + > +struct le_result4< true_,Tag,F,L1,L2,L3,L4 > +{ + typedef bind4< + quote4< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< typename P1, typename P2, typename P3, typename P4 > class F + , typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + >::type is_le; + + typedef aux::le_result4< + is_le, Tag, F, l1, l2, l3, l4 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename Tag + > +struct lambda< + bind4< F,T1,T2,T3,T4 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind4< + F + , T1, T2, T3, T4 + > result_; + + typedef result_ type; +}; + +namespace aux { + +template< + typename IsLE, typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5 +{ + typedef F< + typename L1::type, typename L2::type, typename L3::type + , typename L4::type, typename L5::type + > result_; + + typedef result_ type; +}; + +template< + typename Tag + , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F + , typename L1, typename L2, typename L3, typename L4, typename L5 + > +struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > +{ + typedef bind5< + quote5< F,Tag > + , typename L1::result_, typename L2::result_, typename L3::result_ + , typename L4::result_, typename L5::result_ + > result_; + + typedef mpl::protect type; +}; + +} // namespace aux + +template< + template< + typename P1, typename P2, typename P3, typename P4 + , typename P5 + > + class F + , typename T1, typename T2, typename T3, typename T4, typename T5 + , typename Tag + > +struct lambda< + F< T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef lambda< T1,Tag > l1; + typedef lambda< T2,Tag > l2; + typedef lambda< T3,Tag > l3; + typedef lambda< T4,Tag > l4; + typedef lambda< T5,Tag > l5; + + typedef typename l1::is_le is_le1; + typedef typename l2::is_le is_le2; + typedef typename l3::is_le is_le3; + typedef typename l4::is_le is_le4; + typedef typename l5::is_le is_le5; + + + typedef typename aux::lambda_or< + is_le1::value, is_le2::value, is_le3::value, is_le4::value + , is_le5::value + >::type is_le; + + typedef aux::le_result5< + is_le, Tag, F, l1, l2, l3, l4, l5 + > le_result_; + + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind5< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind5< + F + , T1, T2, T3, T4, T5 + > result_; + + typedef result_ type; +}; + +/// special case for 'protect' +template< typename T, typename Tag > +struct lambda< mpl::protect, Tag > +{ + typedef false_ is_le; + typedef mpl::protect result_; + typedef result_ type; +}; + +/// specializations for the main 'bind' form + +template< + typename F, typename T1, typename T2, typename T3, typename T4 + , typename T5 + , typename Tag + > +struct lambda< + bind< F,T1,T2,T3,T4,T5 > + , Tag + + > +{ + typedef false_ is_le; + typedef bind< F,T1,T2,T3,T4,T5 > result_; + typedef result_ type; +}; + +/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars + +template< + typename F, typename Tag1, typename Tag2 + > +struct lambda< + lambda< F,Tag1 > + , Tag2 + > +{ + typedef lambda< F,Tag2 > l1; + typedef lambda< Tag1,Tag2 > l2; + typedef typename l1::is_le is_le; + typedef aux::le_result2 le_result_; + typedef typename le_result_::result_ result_; + typedef typename le_result_::type type; +}; + +BOOST_MPL_AUX_NA_SPEC(2, lambda) + +}} + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/has_apply.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/has_apply.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ - -#ifndef BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED -#define BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/aux_/has_apply.hpp,v $ -// $Date: 2004/09/03 15:56:55 $ -// $Revision: 1.1 $ - -#include -#include - -namespace boost { namespace mpl { namespace aux { -#if !defined(BOOST_MPL_CFG_NO_HAS_APPLY) -BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false) -#else -template< typename T, typename fallback_ = false_ > -struct has_apply - : fallback_ -{ -}; -#endif -}}} - -#endif // BOOST_MPL_AUX_HAS_APPLY_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/has_key_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/has_key_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,60 @@ + +#ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/has_key_impl.hpp,v $ +// $Date: 2004/10/13 18:23:37 $ +// $Revision: 1.7 $ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +template<> +struct has_key_impl< aux::set_tag > +{ + template< typename Set, typename T > struct apply +#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ + || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) + { + BOOST_STATIC_CONSTANT(bool, value = + ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( + Set + , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) + ) ) == sizeof(aux::no_tag) ) + ); + + typedef bool_ type; + +#else // ISO98 C++ + : bool_< + ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( + Set + , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) + ) ) == sizeof(aux::no_tag) ) + > + { +#endif + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/has_tag.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/has_tag.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +/* Copyright 2003-2005 Joaquín M López Muñoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/multi_index for library home page. + */ + +#ifndef BOOST_MULTI_INDEX_DETAIL_HAS_TAG_HPP +#define BOOST_MULTI_INDEX_DETAIL_HAS_TAG_HPP + +#if defined(_MSC_VER)&&(_MSC_VER>=1200) +#pragma once +#endif + +#include /* keep it first to prevent nasty warns in MSVC */ +#include + +namespace boost{ + +namespace multi_index{ + +namespace detail{ + +/* determines whether an index type has a given tag in its tag list */ + +template +struct has_tag +{ + template + struct apply:mpl::contains + { + }; +}; + +} /* namespace multi_index::detail */ + +} /* namespace multi_index */ + +} /* namespace boost */ + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/include_preprocessed.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/include_preprocessed.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ + +// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION + +// Copyright Aleksey Gurtovoy 2000-2006 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/include_preprocessed.hpp,v $ +// $Date: 2006/11/09 01:21:03 $ +// $Revision: 1.4.8.1 $ + +#include +#include +#include +#include + +#include +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) +# define AUX778076_INCLUDE_DIR typeof_based +#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# define AUX778076_INCLUDE_DIR no_ctps +#else +# define AUX778076_INCLUDE_DIR plain +#endif + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_HEADER \ + AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#else +# define AUX778076_HEADER \ + BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ +/**/ +#endif + + +#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) +# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) +# include AUX778076_INCLUDE_STRING +# undef AUX778076_INCLUDE_STRING +#else +# include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) +#endif + +# undef AUX778076_HEADER +# undef AUX778076_INCLUDE_DIR + +#undef BOOST_MPL_PREPROCESSED_HEADER diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/iter_fold_if_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/iter_fold_if_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,133 @@ + +// Copyright Aleksey Gurtovoy 2001-2004 +// Copyright David Abrahams 2001-2002 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +template< typename Iterator, typename State > +struct iter_fold_if_null_step +{ + typedef State state; + typedef Iterator iterator; +}; + +template< bool > +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef typename apply2< StateOp,State,Iterator >::type state; + typedef typename IteratorOp::type iterator; + }; +}; + +template<> +struct iter_fold_if_step_impl +{ + template< + typename Iterator + , typename State + , typename StateOp + , typename IteratorOp + > + struct result_ + { + typedef State state; + typedef Iterator iterator; + }; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename Predicate + > +struct iter_fold_if_forward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename BackwardOp + , typename Predicate + > +struct iter_fold_if_backward_step +{ + typedef typename apply2< Predicate,State,Iterator >::type not_last; + typedef typename iter_fold_if_step_impl< + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value + >::template result_< Iterator,State,BackwardOp, identity > impl_; + + typedef typename impl_::state state; + typedef typename impl_::iterator iterator; +}; + +template< + typename Iterator + , typename State + , typename ForwardOp + , typename ForwardPredicate + , typename BackwardOp + , typename BackwardPredicate + > +struct iter_fold_if_impl +{ + private: + typedef iter_fold_if_null_step< Iterator,State > forward_step0; + typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; + typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; + typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; + typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; + + + typedef typename if_< + typename forward_step4::not_last + , iter_fold_if_impl< + typename forward_step4::iterator + , typename forward_step4::state + , ForwardOp + , ForwardPredicate + , BackwardOp + , BackwardPredicate + > + , iter_fold_if_null_step< + typename forward_step4::iterator + , typename forward_step4::state + > + >::type backward_step4; + + typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; + typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; + typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; + typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; + + + public: + typedef typename backward_step0::state state; + typedef typename backward_step4::iterator iterator; +}; + +}}} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/iter_fold_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/iter_fold_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,180 @@ + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// + +// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header +// -- DO NOT modify by hand! + +namespace boost { namespace mpl { namespace aux { + +/// forward declaration + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 0,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef state0 state; + typedef iter0 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 1,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + + + typedef state1 state; + typedef iter1 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 2,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + + + typedef state2 state; + typedef iter2 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 3,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + + + typedef state3 state; + typedef iter3 iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< 4,First,Last,State,ForwardOp > +{ + typedef First iter0; + typedef State state0; + typedef typename apply2< ForwardOp,state0,iter0 >::type state1; + typedef typename mpl::next::type iter1; + typedef typename apply2< ForwardOp,state1,iter1 >::type state2; + typedef typename mpl::next::type iter2; + typedef typename apply2< ForwardOp,state2,iter2 >::type state3; + typedef typename mpl::next::type iter3; + typedef typename apply2< ForwardOp,state3,iter3 >::type state4; + typedef typename mpl::next::type iter4; + + + typedef state4 state; + typedef iter4 iterator; +}; + +template< + int N + , typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl +{ + typedef iter_fold_impl< + 4 + , First + , Last + , State + , ForwardOp + > chunk_; + + typedef iter_fold_impl< + ( (N - 4) < 0 ? 0 : N - 4 ) + , typename chunk_::iterator + , Last + , typename chunk_::state + , ForwardOp + > res_; + + typedef typename res_::state state; + typedef typename res_::iterator iterator; +}; + +template< + typename First + , typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,First,Last,State,ForwardOp > + : iter_fold_impl< + -1 + , typename mpl::next::type + , Last + , typename apply2< ForwardOp,State,First >::type + , ForwardOp + > +{ +}; + +template< + typename Last + , typename State + , typename ForwardOp + > +struct iter_fold_impl< -1,Last,Last,State,ForwardOp > +{ + typedef State state; + typedef Last iterator; +}; + +}}} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/aux_/advance_backward.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { namespace aux { - -template< long N > struct advance_backward; -template<> -struct advance_backward<0> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef iter0 type; - }; -}; - -template<> -struct advance_backward<1> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior::type iter1; - typedef iter1 type; - }; -}; - -template<> -struct advance_backward<2> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior::type iter1; - typedef typename prior::type iter2; - typedef iter2 type; - }; -}; - -template<> -struct advance_backward<3> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior::type iter1; - typedef typename prior::type iter2; - typedef typename prior::type iter3; - typedef iter3 type; - }; -}; - -template<> -struct advance_backward<4> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename prior::type iter1; - typedef typename prior::type iter2; - typedef typename prior::type iter3; - typedef typename prior::type iter4; - typedef iter4 type; - }; -}; - -template< long N > -struct advance_backward -{ - template< typename Iterator > struct apply - { - typedef typename apply_wrap1< - advance_backward<4> - , Iterator - >::type chunk_result_; - - typedef typename apply_wrap1< - advance_backward<( - (N - 4) < 0 - ? 0 - : N - 4 - )> - , chunk_result_ - >::type type; - }; -}; - -}}} - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/aux_/advance_forward.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { namespace aux { - -template< long N > struct advance_forward; -template<> -struct advance_forward<0> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef iter0 type; - }; -}; - -template<> -struct advance_forward<1> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef iter1 type; - }; -}; - -template<> -struct advance_forward<2> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef typename next::type iter2; - typedef iter2 type; - }; -}; - -template<> -struct advance_forward<3> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef typename next::type iter2; - typedef typename next::type iter3; - typedef iter3 type; - }; -}; - -template<> -struct advance_forward<4> -{ - template< typename Iterator > struct apply - { - typedef Iterator iter0; - typedef typename next::type iter1; - typedef typename next::type iter2; - typedef typename next::type iter3; - typedef typename next::type iter4; - typedef iter4 type; - }; -}; - -template< long N > -struct advance_forward -{ - template< typename Iterator > struct apply - { - typedef typename apply_wrap1< - advance_forward<4> - , Iterator - >::type chunk_result_; - - typedef typename apply_wrap1< - advance_forward<( - (N - 4) < 0 - ? 0 - : N - 4 - )> - , chunk_result_ - >::type type; - }; -}; - -}}} - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/apply_fwd.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { - -template< - typename F, typename T1 = na, typename T2 = na, typename T3 = na - , typename T4 = na, typename T5 = na - > -struct apply; - -template< - typename F - > -struct apply0; - -template< - typename F, typename T1 - > -struct apply1; - -template< - typename F, typename T1, typename T2 - > -struct apply2; - -template< - typename F, typename T1, typename T2, typename T3 - > -struct apply3; - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - > -struct apply4; - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - > -struct apply5; - -}} - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/apply_wrap.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { - -template< - typename F - - , typename has_apply_ = typename aux::has_apply::type - - > -struct apply_wrap0 - - : F::template apply< > -{ -}; - -template< typename F > -struct apply_wrap0< F,true_ > - : F::apply -{ -}; - -template< - typename F, typename T1 - - > -struct apply_wrap1 - - : F::template apply -{ -}; - -template< - typename F, typename T1, typename T2 - - > -struct apply_wrap2 - - : F::template apply< T1,T2 > -{ -}; - -template< - typename F, typename T1, typename T2, typename T3 - - > -struct apply_wrap3 - - : F::template apply< T1,T2,T3 > -{ -}; - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - - > -struct apply_wrap4 - - : F::template apply< T1,T2,T3,T4 > -{ -}; - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - - > -struct apply_wrap5 - - : F::template apply< T1,T2,T3,T4,T5 > -{ -}; - -}} - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/arg.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/arg.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ - -// Copyright Peter Dimov 2001-2002 -// Copyright Aleksey Gurtovoy 2001-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/arg.hpp" header -// -- DO NOT modify by hand! - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN -template<> struct arg< -1 > -{ - BOOST_STATIC_CONSTANT(int, value = -1); - BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) - BOOST_MPL_AUX_ARG_TYPEDEF(na, type) - - template< - typename U1 = na, typename U2 = na, typename U3 = na - , typename U4 = na, typename U5 = na - > - struct apply - { - typedef U1 type; - BOOST_MPL_AUX_ASSERT_NOT_NA(type); - }; -}; - -template<> struct arg<1> -{ - BOOST_STATIC_CONSTANT(int, value = 1); - typedef arg<2> next; - BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) - BOOST_MPL_AUX_ARG_TYPEDEF(na, type) - - template< - typename U1 = na, typename U2 = na, typename U3 = na - , typename U4 = na, typename U5 = na - > - struct apply - { - typedef U1 type; - BOOST_MPL_AUX_ASSERT_NOT_NA(type); - }; -}; - -template<> struct arg<2> -{ - BOOST_STATIC_CONSTANT(int, value = 2); - typedef arg<3> next; - BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) - BOOST_MPL_AUX_ARG_TYPEDEF(na, type) - - template< - typename U1 = na, typename U2 = na, typename U3 = na - , typename U4 = na, typename U5 = na - > - struct apply - { - typedef U2 type; - BOOST_MPL_AUX_ASSERT_NOT_NA(type); - }; -}; - -template<> struct arg<3> -{ - BOOST_STATIC_CONSTANT(int, value = 3); - typedef arg<4> next; - BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) - BOOST_MPL_AUX_ARG_TYPEDEF(na, type) - - template< - typename U1 = na, typename U2 = na, typename U3 = na - , typename U4 = na, typename U5 = na - > - struct apply - { - typedef U3 type; - BOOST_MPL_AUX_ASSERT_NOT_NA(type); - }; -}; - -template<> struct arg<4> -{ - BOOST_STATIC_CONSTANT(int, value = 4); - typedef arg<5> next; - BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) - BOOST_MPL_AUX_ARG_TYPEDEF(na, type) - - template< - typename U1 = na, typename U2 = na, typename U3 = na - , typename U4 = na, typename U5 = na - > - struct apply - { - typedef U4 type; - BOOST_MPL_AUX_ASSERT_NOT_NA(type); - }; -}; - -template<> struct arg<5> -{ - BOOST_STATIC_CONSTANT(int, value = 5); - typedef arg<6> next; - BOOST_MPL_AUX_ARG_TYPEDEF(na, tag) - BOOST_MPL_AUX_ARG_TYPEDEF(na, type) - - template< - typename U1 = na, typename U2 = na, typename U3 = na - , typename U4 = na, typename U5 = na - > - struct apply - { - typedef U5 type; - BOOST_MPL_AUX_ASSERT_NOT_NA(type); - }; -}; - -BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(1,int, arg) - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,99 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED +#define BOOST_MPL_BIND_FWD_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/bind_fwd.hpp,v $ +// $Date: 2004/09/02 15:40:41 $ +// $Revision: 1.2 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp +# include + +#else + +# include +# include +# include +# include + +# include +# include +# include + +namespace boost { namespace mpl { + +// local macros, #undef-ined at the end of the header + +# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) +# define AUX778076_DMC_PARAM() , int dummy_ = 0 +# else +# define AUX778076_DMC_PARAM() +# endif + +# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ + BOOST_MPL_PP_DEFAULT_PARAMS( \ + BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ + , param \ + , value \ + ) \ + AUX778076_DMC_PARAM() \ + /**/ + +# define AUX778076_BIND_N_PARAMS(n, param) \ + BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ + AUX778076_DMC_PARAM() \ + /**/ + +#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) +template< + typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) + > +struct bind; +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +# undef AUX778076_BIND_N_PARAMS +# undef AUX778076_BIND_DEFAULT_PARAMS +# undef AUX778076_DMC_PARAM +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + typename F AUX778076_BIND_N_PARAMS(i_, typename T) + > +struct BOOST_PP_CAT(bind,i_); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/equal_to.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/equal_to.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED +#define BOOST_MPL_EQUAL_TO_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/equal_to.hpp,v $ +// $Date: 2004/09/02 15:40:41 $ +// $Revision: 1.3 $ + +#define AUX778076_OP_NAME equal_to +#define AUX778076_OP_TOKEN == +#include + +#endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/aux_/fold_impl.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { namespace aux { - -/// forward declaration - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 0,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 1,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; - typedef typename mpl::next::type iter1; - - - typedef state1 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 2,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; - typedef typename mpl::next::type iter1; - typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; - typedef typename mpl::next::type iter2; - - - typedef state2 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 3,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; - typedef typename mpl::next::type iter1; - typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; - typedef typename mpl::next::type iter2; - typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; - typedef typename mpl::next::type iter3; - - - typedef state3 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< 4,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp, state0, typename deref::type >::type state1; - typedef typename mpl::next::type iter1; - typedef typename apply2< ForwardOp, state1, typename deref::type >::type state2; - typedef typename mpl::next::type iter2; - typedef typename apply2< ForwardOp, state2, typename deref::type >::type state3; - typedef typename mpl::next::type iter3; - typedef typename apply2< ForwardOp, state3, typename deref::type >::type state4; - typedef typename mpl::next::type iter4; - - - typedef state4 state; - typedef iter4 iterator; -}; - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl -{ - typedef fold_impl< - 4 - , First - , Last - , State - , ForwardOp - > chunk_; - - typedef fold_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , typename chunk_::iterator - , Last - , typename chunk_::state - , ForwardOp - > res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< -1,First,Last,State,ForwardOp > - : fold_impl< - -1 - , typename mpl::next::type - , Last - , typename apply2::type>::type - , ForwardOp - > -{ -}; - -template< - typename Last - , typename State - , typename ForwardOp - > -struct fold_impl< -1,Last,Last,State,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -}}} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,554 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2001-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/aux_/full_lambda.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { - -namespace aux { - -template< - bool C1 = false, bool C2 = false, bool C3 = false, bool C4 = false - , bool C5 = false - > -struct lambda_or - : true_ -{ -}; - -template<> -struct lambda_or< false,false,false,false,false > - : false_ -{ -}; - -} // namespace aux - -template< - typename T - , typename Tag - - > -struct lambda -{ - typedef false_ is_le; - typedef T result_; - typedef T type; -}; - -template< - typename T - > -struct is_lambda_expression - : lambda::is_le -{ -}; - -template< int N, typename Tag > -struct lambda< arg, Tag > -{ - typedef true_ is_le; - typedef mpl::arg result_; // qualified for the sake of MIPSpro 7.41 - typedef mpl::protect type; -}; - -template< - typename F - , typename Tag - > -struct lambda< - bind0 - , Tag - - > -{ - typedef false_ is_le; - typedef bind0< - F - > result_; - - typedef result_ type; -}; - -namespace aux { - -template< - typename IsLE, typename Tag - , template< typename P1 > class F - , typename L1 - > -struct le_result1 -{ - typedef F< - typename L1::type - > result_; - - typedef result_ type; -}; - -template< - typename Tag - , template< typename P1 > class F - , typename L1 - > -struct le_result1< true_,Tag,F,L1 > -{ - typedef bind1< - quote1< F,Tag > - , typename L1::result_ - > result_; - - typedef mpl::protect type; -}; - -} // namespace aux - -template< - template< typename P1 > class F - , typename T1 - , typename Tag - > -struct lambda< - F - , Tag - - > -{ - typedef lambda< T1,Tag > l1; - typedef typename l1::is_le is_le1; - typedef typename aux::lambda_or< - is_le1::value - >::type is_le; - - typedef aux::le_result1< - is_le, Tag, F, l1 - > le_result_; - - typedef typename le_result_::result_ result_; - typedef typename le_result_::type type; -}; - -template< - typename F, typename T1 - , typename Tag - > -struct lambda< - bind1< F,T1 > - , Tag - - > -{ - typedef false_ is_le; - typedef bind1< - F - , T1 - > result_; - - typedef result_ type; -}; - -namespace aux { - -template< - typename IsLE, typename Tag - , template< typename P1, typename P2 > class F - , typename L1, typename L2 - > -struct le_result2 -{ - typedef F< - typename L1::type, typename L2::type - > result_; - - typedef result_ type; -}; - -template< - typename Tag - , template< typename P1, typename P2 > class F - , typename L1, typename L2 - > -struct le_result2< true_,Tag,F,L1,L2 > -{ - typedef bind2< - quote2< F,Tag > - , typename L1::result_, typename L2::result_ - > result_; - - typedef mpl::protect type; -}; - -} // namespace aux - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , typename Tag - > -struct lambda< - F< T1,T2 > - , Tag - - > -{ - typedef lambda< T1,Tag > l1; - typedef lambda< T2,Tag > l2; - - typedef typename l1::is_le is_le1; - typedef typename l2::is_le is_le2; - - - typedef typename aux::lambda_or< - is_le1::value, is_le2::value - >::type is_le; - - typedef aux::le_result2< - is_le, Tag, F, l1, l2 - > le_result_; - - typedef typename le_result_::result_ result_; - typedef typename le_result_::type type; -}; - -template< - typename F, typename T1, typename T2 - , typename Tag - > -struct lambda< - bind2< F,T1,T2 > - , Tag - - > -{ - typedef false_ is_le; - typedef bind2< - F - , T1, T2 - > result_; - - typedef result_ type; -}; - -namespace aux { - -template< - typename IsLE, typename Tag - , template< typename P1, typename P2, typename P3 > class F - , typename L1, typename L2, typename L3 - > -struct le_result3 -{ - typedef F< - typename L1::type, typename L2::type, typename L3::type - > result_; - - typedef result_ type; -}; - -template< - typename Tag - , template< typename P1, typename P2, typename P3 > class F - , typename L1, typename L2, typename L3 - > -struct le_result3< true_,Tag,F,L1,L2,L3 > -{ - typedef bind3< - quote3< F,Tag > - , typename L1::result_, typename L2::result_, typename L3::result_ - > result_; - - typedef mpl::protect type; -}; - -} // namespace aux - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< - F< T1,T2,T3 > - , Tag - - > -{ - typedef lambda< T1,Tag > l1; - typedef lambda< T2,Tag > l2; - typedef lambda< T3,Tag > l3; - - typedef typename l1::is_le is_le1; - typedef typename l2::is_le is_le2; - typedef typename l3::is_le is_le3; - - - typedef typename aux::lambda_or< - is_le1::value, is_le2::value, is_le3::value - >::type is_le; - - typedef aux::le_result3< - is_le, Tag, F, l1, l2, l3 - > le_result_; - - typedef typename le_result_::result_ result_; - typedef typename le_result_::type type; -}; - -template< - typename F, typename T1, typename T2, typename T3 - , typename Tag - > -struct lambda< - bind3< F,T1,T2,T3 > - , Tag - - > -{ - typedef false_ is_le; - typedef bind3< - F - , T1, T2, T3 - > result_; - - typedef result_ type; -}; - -namespace aux { - -template< - typename IsLE, typename Tag - , template< typename P1, typename P2, typename P3, typename P4 > class F - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4 -{ - typedef F< - typename L1::type, typename L2::type, typename L3::type - , typename L4::type - > result_; - - typedef result_ type; -}; - -template< - typename Tag - , template< typename P1, typename P2, typename P3, typename P4 > class F - , typename L1, typename L2, typename L3, typename L4 - > -struct le_result4< true_,Tag,F,L1,L2,L3,L4 > -{ - typedef bind4< - quote4< F,Tag > - , typename L1::result_, typename L2::result_, typename L3::result_ - , typename L4::result_ - > result_; - - typedef mpl::protect type; -}; - -} // namespace aux - -template< - template< typename P1, typename P2, typename P3, typename P4 > class F - , typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< - F< T1,T2,T3,T4 > - , Tag - - > -{ - typedef lambda< T1,Tag > l1; - typedef lambda< T2,Tag > l2; - typedef lambda< T3,Tag > l3; - typedef lambda< T4,Tag > l4; - - typedef typename l1::is_le is_le1; - typedef typename l2::is_le is_le2; - typedef typename l3::is_le is_le3; - typedef typename l4::is_le is_le4; - - - typedef typename aux::lambda_or< - is_le1::value, is_le2::value, is_le3::value, is_le4::value - >::type is_le; - - typedef aux::le_result4< - is_le, Tag, F, l1, l2, l3, l4 - > le_result_; - - typedef typename le_result_::result_ result_; - typedef typename le_result_::type type; -}; - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename Tag - > -struct lambda< - bind4< F,T1,T2,T3,T4 > - , Tag - - > -{ - typedef false_ is_le; - typedef bind4< - F - , T1, T2, T3, T4 - > result_; - - typedef result_ type; -}; - -namespace aux { - -template< - typename IsLE, typename Tag - , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5 -{ - typedef F< - typename L1::type, typename L2::type, typename L3::type - , typename L4::type, typename L5::type - > result_; - - typedef result_ type; -}; - -template< - typename Tag - , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F - , typename L1, typename L2, typename L3, typename L4, typename L5 - > -struct le_result5< true_,Tag,F,L1,L2,L3,L4,L5 > -{ - typedef bind5< - quote5< F,Tag > - , typename L1::result_, typename L2::result_, typename L3::result_ - , typename L4::result_, typename L5::result_ - > result_; - - typedef mpl::protect type; -}; - -} // namespace aux - -template< - template< - typename P1, typename P2, typename P3, typename P4 - , typename P5 - > - class F - , typename T1, typename T2, typename T3, typename T4, typename T5 - , typename Tag - > -struct lambda< - F< T1,T2,T3,T4,T5 > - , Tag - - > -{ - typedef lambda< T1,Tag > l1; - typedef lambda< T2,Tag > l2; - typedef lambda< T3,Tag > l3; - typedef lambda< T4,Tag > l4; - typedef lambda< T5,Tag > l5; - - typedef typename l1::is_le is_le1; - typedef typename l2::is_le is_le2; - typedef typename l3::is_le is_le3; - typedef typename l4::is_le is_le4; - typedef typename l5::is_le is_le5; - - - typedef typename aux::lambda_or< - is_le1::value, is_le2::value, is_le3::value, is_le4::value - , is_le5::value - >::type is_le; - - typedef aux::le_result5< - is_le, Tag, F, l1, l2, l3, l4, l5 - > le_result_; - - typedef typename le_result_::result_ result_; - typedef typename le_result_::type type; -}; - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - , typename Tag - > -struct lambda< - bind5< F,T1,T2,T3,T4,T5 > - , Tag - - > -{ - typedef false_ is_le; - typedef bind5< - F - , T1, T2, T3, T4, T5 - > result_; - - typedef result_ type; -}; - -/// special case for 'protect' -template< typename T, typename Tag > -struct lambda< mpl::protect, Tag > -{ - typedef false_ is_le; - typedef mpl::protect result_; - typedef result_ type; -}; - -/// specializations for the main 'bind' form - -template< - typename F, typename T1, typename T2, typename T3, typename T4 - , typename T5 - , typename Tag - > -struct lambda< - bind< F,T1,T2,T3,T4,T5 > - , Tag - - > -{ - typedef false_ is_le; - typedef bind< F,T1,T2,T3,T4,T5 > result_; - typedef result_ type; -}; - -/// workaround for MWCW 8.3+/EDG < 303, leads to ambiguity on Digital Mars - -template< - typename F, typename Tag1, typename Tag2 - > -struct lambda< - lambda< F,Tag1 > - , Tag2 - > -{ - typedef lambda< F,Tag2 > l1; - typedef lambda< Tag1,Tag2 > l2; - typedef typename l1::is_le is_le; - typedef aux::le_result2 le_result_; - typedef typename le_result_::result_ result_; - typedef typename le_result_::type type; -}; - -BOOST_MPL_AUX_NA_SPEC(2, lambda) - -}} - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/greater.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/greater.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,38 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP +# define BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP +# +# include +# include +# +# /* BOOST_PP_GREATER */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_GREATER(x, y) BOOST_PP_LESS(y, x) +# else +# define BOOST_PP_GREATER(x, y) BOOST_PP_GREATER_I(x, y) +# define BOOST_PP_GREATER_I(x, y) BOOST_PP_LESS(y, x) +# endif +# +# /* BOOST_PP_GREATER_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_LESS_D(d, y, x) +# else +# define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_GREATER_D_I(d, x, y) +# define BOOST_PP_GREATER_D_I(d, x, y) BOOST_PP_LESS_D(d, y, x) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,38 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP +# define BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP +# +# include +# include +# +# /* BOOST_PP_GREATER_EQUAL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_LESS_EQUAL(y, x) +# else +# define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_GREATER_EQUAL_I(x, y) +# define BOOST_PP_GREATER_EQUAL_I(x, y) BOOST_PP_LESS_EQUAL(y, x) +# endif +# +# /* BOOST_PP_GREATER_EQUAL_D */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) +# else +# define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_GREATER_EQUAL_D_I(d, x, y) +# define BOOST_PP_GREATER_EQUAL_D_I(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2001-2004 -// Copyright David Abrahams 2001-2002 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/aux_/iter_fold_if_impl.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { namespace aux { - -template< typename Iterator, typename State > -struct iter_fold_if_null_step -{ - typedef State state; - typedef Iterator iterator; -}; - -template< bool > -struct iter_fold_if_step_impl -{ - template< - typename Iterator - , typename State - , typename StateOp - , typename IteratorOp - > - struct result_ - { - typedef typename apply2< StateOp,State,Iterator >::type state; - typedef typename IteratorOp::type iterator; - }; -}; - -template<> -struct iter_fold_if_step_impl -{ - template< - typename Iterator - , typename State - , typename StateOp - , typename IteratorOp - > - struct result_ - { - typedef State state; - typedef Iterator iterator; - }; -}; - -template< - typename Iterator - , typename State - , typename ForwardOp - , typename Predicate - > -struct iter_fold_if_forward_step -{ - typedef typename apply2< Predicate,State,Iterator >::type not_last; - typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp, mpl::next > impl_; - - typedef typename impl_::state state; - typedef typename impl_::iterator iterator; -}; - -template< - typename Iterator - , typename State - , typename BackwardOp - , typename Predicate - > -struct iter_fold_if_backward_step -{ - typedef typename apply2< Predicate,State,Iterator >::type not_last; - typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,BackwardOp, identity > impl_; - - typedef typename impl_::state state; - typedef typename impl_::iterator iterator; -}; - -template< - typename Iterator - , typename State - , typename ForwardOp - , typename ForwardPredicate - , typename BackwardOp - , typename BackwardPredicate - > -struct iter_fold_if_impl -{ - private: - typedef iter_fold_if_null_step< Iterator,State > forward_step0; - typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1; - typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2; - typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; - typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - - - typedef typename if_< - typename forward_step4::not_last - , iter_fold_if_impl< - typename forward_step4::iterator - , typename forward_step4::state - , ForwardOp - , ForwardPredicate - , BackwardOp - , BackwardPredicate - > - , iter_fold_if_null_step< - typename forward_step4::iterator - , typename forward_step4::state - > - >::type backward_step4; - - typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3; - typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2; - typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1; - typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0; - - - public: - typedef typename backward_step0::state state; - typedef typename backward_step4::iterator iterator; -}; - -}}} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,180 +0,0 @@ - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// - -// Preprocessed version of "boost/mpl/aux_/iter_fold_impl.hpp" header -// -- DO NOT modify by hand! - -namespace boost { namespace mpl { namespace aux { - -/// forward declaration - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 0,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef state0 state; - typedef iter0 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 1,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next::type iter1; - - - typedef state1 state; - typedef iter1 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 2,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next::type iter1; - typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename mpl::next::type iter2; - - - typedef state2 state; - typedef iter2 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 3,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next::type iter1; - typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename mpl::next::type iter2; - typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename mpl::next::type iter3; - - - typedef state3 state; - typedef iter3 iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< 4,First,Last,State,ForwardOp > -{ - typedef First iter0; - typedef State state0; - typedef typename apply2< ForwardOp,state0,iter0 >::type state1; - typedef typename mpl::next::type iter1; - typedef typename apply2< ForwardOp,state1,iter1 >::type state2; - typedef typename mpl::next::type iter2; - typedef typename apply2< ForwardOp,state2,iter2 >::type state3; - typedef typename mpl::next::type iter3; - typedef typename apply2< ForwardOp,state3,iter3 >::type state4; - typedef typename mpl::next::type iter4; - - - typedef state4 state; - typedef iter4 iterator; -}; - -template< - int N - , typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl -{ - typedef iter_fold_impl< - 4 - , First - , Last - , State - , ForwardOp - > chunk_; - - typedef iter_fold_impl< - ( (N - 4) < 0 ? 0 : N - 4 ) - , typename chunk_::iterator - , Last - , typename chunk_::state - , ForwardOp - > res_; - - typedef typename res_::state state; - typedef typename res_::iterator iterator; -}; - -template< - typename First - , typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< -1,First,Last,State,ForwardOp > - : iter_fold_impl< - -1 - , typename mpl::next::type - , Last - , typename apply2< ForwardOp,State,First >::type - , ForwardOp - > -{ -}; - -template< - typename Last - , typename State - , typename ForwardOp - > -struct iter_fold_impl< -1,Last,Last,State,ForwardOp > -{ - typedef State state; - typedef Last iterator; -}; - -}}} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/less.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/less.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,46 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_HPP +# define BOOST_PREPROCESSOR_COMPARISON_LESS_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_LESS */ +# +# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC()) +# define BOOST_PP_LESS(x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL(x, y)) +# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LESS(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y) +# else +# define BOOST_PP_LESS(x, y) BOOST_PP_LESS_I(x, y) +# define BOOST_PP_LESS_I(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y) +# endif +# +# /* BOOST_PP_LESS_D */ +# +# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC()) +# define BOOST_PP_LESS_D(d, x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D(d, x, y)) +# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_LESS_D(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y) +# else +# define BOOST_PP_LESS_D(d, x, y) BOOST_PP_LESS_D_I(d, x, y) +# define BOOST_PP_LESS_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/list.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/list.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LIST_HPP +# define BOOST_PREPROCESSOR_LIST_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/minus.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/minus.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_MINUS_HPP_INCLUDED +#define BOOST_MPL_MINUS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/minus.hpp,v $ +// $Date: 2004/09/02 15:40:41 $ +// $Revision: 1.3 $ + +#define AUX778076_OP_NAME minus +#define AUX778076_OP_TOKEN - +#include + +#endif // BOOST_MPL_MINUS_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/or.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/or.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_OR_HPP +# define BOOST_PREPROCESSOR_LOGICAL_OR_HPP +# +# include +# include +# include +# +# /* BOOST_PP_OR */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_OR(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# else +# define BOOST_PP_OR(p, q) BOOST_PP_OR_I(p, q) +# define BOOST_PP_OR_I(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/plus.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/plus.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_PLUS_HPP_INCLUDED +#define BOOST_MPL_PLUS_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/plus.hpp,v $ +// $Date: 2004/09/02 15:40:42 $ +// $Revision: 1.4 $ + +#define AUX778076_OP_NAME plus +#define AUX778076_OP_TOKEN + +#include + +#endif // BOOST_MPL_PLUS_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/quote.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/quote.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,140 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED +#define BOOST_MPL_QUOTE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/quote.hpp,v $ +// $Date: 2006/05/03 03:27:58 $ +// $Revision: 1.5.14.2 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +#endif + +#include + +#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) +# define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE +#endif + +#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ + && defined(BOOST_MPL_CFG_NO_HAS_XXX) +# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp +# include + +#else + +# include +# include +# include +# include + +# include +# include + +#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) + +namespace boost { namespace mpl { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< typename T, bool has_type_ > +struct quote_impl +// GCC has a problem with metafunction forwarding when T is a +// specialization of a template called 'type'. +# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ + && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ + && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) +{ + typedef typename T::type type; +}; +# else + : T +{ +}; +# endif + +template< typename T > +struct quote_impl +{ + typedef T type; +}; + +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +template< bool > struct quote_impl +{ + template< typename T > struct result_ + : T + { + }; +}; + +template<> struct quote_impl +{ + template< typename T > struct result_ + { + typedef T type; + }; +}; + +#endif + +#define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) +#include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_QUOTE_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , typename Tag = void_ + > +struct BOOST_PP_CAT(quote,i_) +{ + template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + : quote_impl< + F< BOOST_MPL_PP_PARAMS(i_, U) > + , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value + > +#else + : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > + ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > +#endif + { + }; +}; + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,44 @@ + +#ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/reverse_fold_impl.hpp,v $ +// $Date: 2004/10/01 16:29:34 $ +// $Revision: 1.3 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# include +# include +# endif +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER reverse_fold_impl.hpp +# include + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) typename deref::type +# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED +#define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/reverse_iter_fold_impl.hpp,v $ +// $Date: 2004/09/02 15:40:44 $ +// $Revision: 1.2 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include +# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ + || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) +# include +# include +# endif +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER reverse_iter_fold_impl.hpp +# include + +#else + +# define AUX778076_FOLD_IMPL_OP(iter) iter +# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_iter_fold +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/template_arity.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/template_arity.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,189 @@ + +#if !defined(BOOST_PP_IS_ITERATING) + +///// header body + +#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED +#define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2001-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/aux_/template_arity.hpp,v $ +// $Date: 2004/09/07 12:24:48 $ +// $Revision: 1.11 $ + +#include +#include + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) +# include +# endif +# else +# include +# endif +#endif + +#include +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp +# include + +#else + +# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) +# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +# include +# include +# include +# include +# include + +# include +# include +# include +# include +# include + +# define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) + +namespace boost { namespace mpl { namespace aux { + +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag +{ + typedef char (&type)[N + 1]; +}; + +# define AUX778076_MAX_ARITY_OP(unused, state, i_) \ + ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ +/**/ + +template< + BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) + > +struct max_arity +{ + BOOST_STATIC_CONSTANT(int, value = + BOOST_PP_SEQ_FOLD_LEFT( + AUX778076_MAX_ARITY_OP + , -1 + , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) + ) + ); +}; + +# undef AUX778076_MAX_ARITY_OP + +arity_tag<0>::type arity_helper(...); + +# define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) +# define BOOST_PP_FILENAME_1 +# include BOOST_PP_ITERATE() + +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > +struct template_arity_impl +{ + BOOST_STATIC_CONSTANT(int, value = + sizeof(arity_helper(type_wrapper(),arity_tag())) - 1 + ); +}; + +# define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ + BOOST_PP_COMMA_IF(i_) template_arity_impl::value \ +/**/ + +template< typename F > +struct template_arity +{ + BOOST_STATIC_CONSTANT(int, value = ( + max_arity< BOOST_MPL_PP_REPEAT( + AUX778076_ARITY + , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + , F + ) >::value + )); + + typedef mpl::int_ type; +}; + +# undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION + +# undef AUX778076_ARITY + +}}} + +# endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING +# else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +# include + +namespace boost { namespace mpl { namespace aux { + +template< bool > +struct template_arity_impl +{ + template< typename F > struct result_ + : mpl::int_<-1> + { + }; +}; + +template<> +struct template_arity_impl +{ + template< typename F > struct result_ + : F::arity + { + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) +template<> +struct template_arity + : mpl::int_<-1> +{ +}; +#endif + +}}} + +# endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED + +///// iteration + +#else +#define i_ BOOST_PP_FRAME_ITERATION(1) + +template< + template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F + , BOOST_MPL_PP_PARAMS(i_, typename T) + > +typename arity_tag::type +arity_helper(type_wrapper< F >, arity_tag); + +#undef i_ +#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/times.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/times.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,21 @@ + +#ifndef BOOST_MPL_TIMES_HPP_INCLUDED +#define BOOST_MPL_TIMES_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/times.hpp,v $ +// $Date: 2004/09/02 15:40:42 $ +// $Revision: 1.2 $ + +#define AUX778076_OP_NAME times +#define AUX778076_OP_TOKEN * +#include + +#endif // BOOST_MPL_TIMES_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/vector.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessed/plain/vector.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ + +#ifndef BOOST_MPL_VECTOR_HPP_INCLUDED +#define BOOST_MPL_VECTOR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector.hpp,v $ +// $Date: 2004/11/28 01:58:27 $ +// $Revision: 1.8 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +# include +# include + +# include +# include +# include + +#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) +# define AUX778076_VECTOR_HEADER \ + BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \ + /**/ +#else +# define AUX778076_VECTOR_HEADER \ + BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \ + /**/ +#endif + +# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER) +# undef AUX778076_VECTOR_HEADER +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector.hpp +# include + +#else + +# include + +# define AUX778076_SEQUENCE_NAME vector +# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE +# include + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#endif // BOOST_MPL_VECTOR_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessor/enum.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessor/enum.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,288 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_ENUM_HPP +# define BOOST_PREPROCESSOR_SEQ_ENUM_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_ENUM */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(seq) +# define BOOST_PP_SEQ_ENUM_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) +# define BOOST_PP_SEQ_ENUM_I(size, seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq +# else +# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq +# endif +# +# define BOOST_PP_SEQ_ENUM_1(x) x +# define BOOST_PP_SEQ_ENUM_2(x) x, BOOST_PP_SEQ_ENUM_1 +# define BOOST_PP_SEQ_ENUM_3(x) x, BOOST_PP_SEQ_ENUM_2 +# define BOOST_PP_SEQ_ENUM_4(x) x, BOOST_PP_SEQ_ENUM_3 +# define BOOST_PP_SEQ_ENUM_5(x) x, BOOST_PP_SEQ_ENUM_4 +# define BOOST_PP_SEQ_ENUM_6(x) x, BOOST_PP_SEQ_ENUM_5 +# define BOOST_PP_SEQ_ENUM_7(x) x, BOOST_PP_SEQ_ENUM_6 +# define BOOST_PP_SEQ_ENUM_8(x) x, BOOST_PP_SEQ_ENUM_7 +# define BOOST_PP_SEQ_ENUM_9(x) x, BOOST_PP_SEQ_ENUM_8 +# define BOOST_PP_SEQ_ENUM_10(x) x, BOOST_PP_SEQ_ENUM_9 +# define BOOST_PP_SEQ_ENUM_11(x) x, BOOST_PP_SEQ_ENUM_10 +# define BOOST_PP_SEQ_ENUM_12(x) x, BOOST_PP_SEQ_ENUM_11 +# define BOOST_PP_SEQ_ENUM_13(x) x, BOOST_PP_SEQ_ENUM_12 +# define BOOST_PP_SEQ_ENUM_14(x) x, BOOST_PP_SEQ_ENUM_13 +# define BOOST_PP_SEQ_ENUM_15(x) x, BOOST_PP_SEQ_ENUM_14 +# define BOOST_PP_SEQ_ENUM_16(x) x, BOOST_PP_SEQ_ENUM_15 +# define BOOST_PP_SEQ_ENUM_17(x) x, BOOST_PP_SEQ_ENUM_16 +# define BOOST_PP_SEQ_ENUM_18(x) x, BOOST_PP_SEQ_ENUM_17 +# define BOOST_PP_SEQ_ENUM_19(x) x, BOOST_PP_SEQ_ENUM_18 +# define BOOST_PP_SEQ_ENUM_20(x) x, BOOST_PP_SEQ_ENUM_19 +# define BOOST_PP_SEQ_ENUM_21(x) x, BOOST_PP_SEQ_ENUM_20 +# define BOOST_PP_SEQ_ENUM_22(x) x, BOOST_PP_SEQ_ENUM_21 +# define BOOST_PP_SEQ_ENUM_23(x) x, BOOST_PP_SEQ_ENUM_22 +# define BOOST_PP_SEQ_ENUM_24(x) x, BOOST_PP_SEQ_ENUM_23 +# define BOOST_PP_SEQ_ENUM_25(x) x, BOOST_PP_SEQ_ENUM_24 +# define BOOST_PP_SEQ_ENUM_26(x) x, BOOST_PP_SEQ_ENUM_25 +# define BOOST_PP_SEQ_ENUM_27(x) x, BOOST_PP_SEQ_ENUM_26 +# define BOOST_PP_SEQ_ENUM_28(x) x, BOOST_PP_SEQ_ENUM_27 +# define BOOST_PP_SEQ_ENUM_29(x) x, BOOST_PP_SEQ_ENUM_28 +# define BOOST_PP_SEQ_ENUM_30(x) x, BOOST_PP_SEQ_ENUM_29 +# define BOOST_PP_SEQ_ENUM_31(x) x, BOOST_PP_SEQ_ENUM_30 +# define BOOST_PP_SEQ_ENUM_32(x) x, BOOST_PP_SEQ_ENUM_31 +# define BOOST_PP_SEQ_ENUM_33(x) x, BOOST_PP_SEQ_ENUM_32 +# define BOOST_PP_SEQ_ENUM_34(x) x, BOOST_PP_SEQ_ENUM_33 +# define BOOST_PP_SEQ_ENUM_35(x) x, BOOST_PP_SEQ_ENUM_34 +# define BOOST_PP_SEQ_ENUM_36(x) x, BOOST_PP_SEQ_ENUM_35 +# define BOOST_PP_SEQ_ENUM_37(x) x, BOOST_PP_SEQ_ENUM_36 +# define BOOST_PP_SEQ_ENUM_38(x) x, BOOST_PP_SEQ_ENUM_37 +# define BOOST_PP_SEQ_ENUM_39(x) x, BOOST_PP_SEQ_ENUM_38 +# define BOOST_PP_SEQ_ENUM_40(x) x, BOOST_PP_SEQ_ENUM_39 +# define BOOST_PP_SEQ_ENUM_41(x) x, BOOST_PP_SEQ_ENUM_40 +# define BOOST_PP_SEQ_ENUM_42(x) x, BOOST_PP_SEQ_ENUM_41 +# define BOOST_PP_SEQ_ENUM_43(x) x, BOOST_PP_SEQ_ENUM_42 +# define BOOST_PP_SEQ_ENUM_44(x) x, BOOST_PP_SEQ_ENUM_43 +# define BOOST_PP_SEQ_ENUM_45(x) x, BOOST_PP_SEQ_ENUM_44 +# define BOOST_PP_SEQ_ENUM_46(x) x, BOOST_PP_SEQ_ENUM_45 +# define BOOST_PP_SEQ_ENUM_47(x) x, BOOST_PP_SEQ_ENUM_46 +# define BOOST_PP_SEQ_ENUM_48(x) x, BOOST_PP_SEQ_ENUM_47 +# define BOOST_PP_SEQ_ENUM_49(x) x, BOOST_PP_SEQ_ENUM_48 +# define BOOST_PP_SEQ_ENUM_50(x) x, BOOST_PP_SEQ_ENUM_49 +# define BOOST_PP_SEQ_ENUM_51(x) x, BOOST_PP_SEQ_ENUM_50 +# define BOOST_PP_SEQ_ENUM_52(x) x, BOOST_PP_SEQ_ENUM_51 +# define BOOST_PP_SEQ_ENUM_53(x) x, BOOST_PP_SEQ_ENUM_52 +# define BOOST_PP_SEQ_ENUM_54(x) x, BOOST_PP_SEQ_ENUM_53 +# define BOOST_PP_SEQ_ENUM_55(x) x, BOOST_PP_SEQ_ENUM_54 +# define BOOST_PP_SEQ_ENUM_56(x) x, BOOST_PP_SEQ_ENUM_55 +# define BOOST_PP_SEQ_ENUM_57(x) x, BOOST_PP_SEQ_ENUM_56 +# define BOOST_PP_SEQ_ENUM_58(x) x, BOOST_PP_SEQ_ENUM_57 +# define BOOST_PP_SEQ_ENUM_59(x) x, BOOST_PP_SEQ_ENUM_58 +# define BOOST_PP_SEQ_ENUM_60(x) x, BOOST_PP_SEQ_ENUM_59 +# define BOOST_PP_SEQ_ENUM_61(x) x, BOOST_PP_SEQ_ENUM_60 +# define BOOST_PP_SEQ_ENUM_62(x) x, BOOST_PP_SEQ_ENUM_61 +# define BOOST_PP_SEQ_ENUM_63(x) x, BOOST_PP_SEQ_ENUM_62 +# define BOOST_PP_SEQ_ENUM_64(x) x, BOOST_PP_SEQ_ENUM_63 +# define BOOST_PP_SEQ_ENUM_65(x) x, BOOST_PP_SEQ_ENUM_64 +# define BOOST_PP_SEQ_ENUM_66(x) x, BOOST_PP_SEQ_ENUM_65 +# define BOOST_PP_SEQ_ENUM_67(x) x, BOOST_PP_SEQ_ENUM_66 +# define BOOST_PP_SEQ_ENUM_68(x) x, BOOST_PP_SEQ_ENUM_67 +# define BOOST_PP_SEQ_ENUM_69(x) x, BOOST_PP_SEQ_ENUM_68 +# define BOOST_PP_SEQ_ENUM_70(x) x, BOOST_PP_SEQ_ENUM_69 +# define BOOST_PP_SEQ_ENUM_71(x) x, BOOST_PP_SEQ_ENUM_70 +# define BOOST_PP_SEQ_ENUM_72(x) x, BOOST_PP_SEQ_ENUM_71 +# define BOOST_PP_SEQ_ENUM_73(x) x, BOOST_PP_SEQ_ENUM_72 +# define BOOST_PP_SEQ_ENUM_74(x) x, BOOST_PP_SEQ_ENUM_73 +# define BOOST_PP_SEQ_ENUM_75(x) x, BOOST_PP_SEQ_ENUM_74 +# define BOOST_PP_SEQ_ENUM_76(x) x, BOOST_PP_SEQ_ENUM_75 +# define BOOST_PP_SEQ_ENUM_77(x) x, BOOST_PP_SEQ_ENUM_76 +# define BOOST_PP_SEQ_ENUM_78(x) x, BOOST_PP_SEQ_ENUM_77 +# define BOOST_PP_SEQ_ENUM_79(x) x, BOOST_PP_SEQ_ENUM_78 +# define BOOST_PP_SEQ_ENUM_80(x) x, BOOST_PP_SEQ_ENUM_79 +# define BOOST_PP_SEQ_ENUM_81(x) x, BOOST_PP_SEQ_ENUM_80 +# define BOOST_PP_SEQ_ENUM_82(x) x, BOOST_PP_SEQ_ENUM_81 +# define BOOST_PP_SEQ_ENUM_83(x) x, BOOST_PP_SEQ_ENUM_82 +# define BOOST_PP_SEQ_ENUM_84(x) x, BOOST_PP_SEQ_ENUM_83 +# define BOOST_PP_SEQ_ENUM_85(x) x, BOOST_PP_SEQ_ENUM_84 +# define BOOST_PP_SEQ_ENUM_86(x) x, BOOST_PP_SEQ_ENUM_85 +# define BOOST_PP_SEQ_ENUM_87(x) x, BOOST_PP_SEQ_ENUM_86 +# define BOOST_PP_SEQ_ENUM_88(x) x, BOOST_PP_SEQ_ENUM_87 +# define BOOST_PP_SEQ_ENUM_89(x) x, BOOST_PP_SEQ_ENUM_88 +# define BOOST_PP_SEQ_ENUM_90(x) x, BOOST_PP_SEQ_ENUM_89 +# define BOOST_PP_SEQ_ENUM_91(x) x, BOOST_PP_SEQ_ENUM_90 +# define BOOST_PP_SEQ_ENUM_92(x) x, BOOST_PP_SEQ_ENUM_91 +# define BOOST_PP_SEQ_ENUM_93(x) x, BOOST_PP_SEQ_ENUM_92 +# define BOOST_PP_SEQ_ENUM_94(x) x, BOOST_PP_SEQ_ENUM_93 +# define BOOST_PP_SEQ_ENUM_95(x) x, BOOST_PP_SEQ_ENUM_94 +# define BOOST_PP_SEQ_ENUM_96(x) x, BOOST_PP_SEQ_ENUM_95 +# define BOOST_PP_SEQ_ENUM_97(x) x, BOOST_PP_SEQ_ENUM_96 +# define BOOST_PP_SEQ_ENUM_98(x) x, BOOST_PP_SEQ_ENUM_97 +# define BOOST_PP_SEQ_ENUM_99(x) x, BOOST_PP_SEQ_ENUM_98 +# define BOOST_PP_SEQ_ENUM_100(x) x, BOOST_PP_SEQ_ENUM_99 +# define BOOST_PP_SEQ_ENUM_101(x) x, BOOST_PP_SEQ_ENUM_100 +# define BOOST_PP_SEQ_ENUM_102(x) x, BOOST_PP_SEQ_ENUM_101 +# define BOOST_PP_SEQ_ENUM_103(x) x, BOOST_PP_SEQ_ENUM_102 +# define BOOST_PP_SEQ_ENUM_104(x) x, BOOST_PP_SEQ_ENUM_103 +# define BOOST_PP_SEQ_ENUM_105(x) x, BOOST_PP_SEQ_ENUM_104 +# define BOOST_PP_SEQ_ENUM_106(x) x, BOOST_PP_SEQ_ENUM_105 +# define BOOST_PP_SEQ_ENUM_107(x) x, BOOST_PP_SEQ_ENUM_106 +# define BOOST_PP_SEQ_ENUM_108(x) x, BOOST_PP_SEQ_ENUM_107 +# define BOOST_PP_SEQ_ENUM_109(x) x, BOOST_PP_SEQ_ENUM_108 +# define BOOST_PP_SEQ_ENUM_110(x) x, BOOST_PP_SEQ_ENUM_109 +# define BOOST_PP_SEQ_ENUM_111(x) x, BOOST_PP_SEQ_ENUM_110 +# define BOOST_PP_SEQ_ENUM_112(x) x, BOOST_PP_SEQ_ENUM_111 +# define BOOST_PP_SEQ_ENUM_113(x) x, BOOST_PP_SEQ_ENUM_112 +# define BOOST_PP_SEQ_ENUM_114(x) x, BOOST_PP_SEQ_ENUM_113 +# define BOOST_PP_SEQ_ENUM_115(x) x, BOOST_PP_SEQ_ENUM_114 +# define BOOST_PP_SEQ_ENUM_116(x) x, BOOST_PP_SEQ_ENUM_115 +# define BOOST_PP_SEQ_ENUM_117(x) x, BOOST_PP_SEQ_ENUM_116 +# define BOOST_PP_SEQ_ENUM_118(x) x, BOOST_PP_SEQ_ENUM_117 +# define BOOST_PP_SEQ_ENUM_119(x) x, BOOST_PP_SEQ_ENUM_118 +# define BOOST_PP_SEQ_ENUM_120(x) x, BOOST_PP_SEQ_ENUM_119 +# define BOOST_PP_SEQ_ENUM_121(x) x, BOOST_PP_SEQ_ENUM_120 +# define BOOST_PP_SEQ_ENUM_122(x) x, BOOST_PP_SEQ_ENUM_121 +# define BOOST_PP_SEQ_ENUM_123(x) x, BOOST_PP_SEQ_ENUM_122 +# define BOOST_PP_SEQ_ENUM_124(x) x, BOOST_PP_SEQ_ENUM_123 +# define BOOST_PP_SEQ_ENUM_125(x) x, BOOST_PP_SEQ_ENUM_124 +# define BOOST_PP_SEQ_ENUM_126(x) x, BOOST_PP_SEQ_ENUM_125 +# define BOOST_PP_SEQ_ENUM_127(x) x, BOOST_PP_SEQ_ENUM_126 +# define BOOST_PP_SEQ_ENUM_128(x) x, BOOST_PP_SEQ_ENUM_127 +# define BOOST_PP_SEQ_ENUM_129(x) x, BOOST_PP_SEQ_ENUM_128 +# define BOOST_PP_SEQ_ENUM_130(x) x, BOOST_PP_SEQ_ENUM_129 +# define BOOST_PP_SEQ_ENUM_131(x) x, BOOST_PP_SEQ_ENUM_130 +# define BOOST_PP_SEQ_ENUM_132(x) x, BOOST_PP_SEQ_ENUM_131 +# define BOOST_PP_SEQ_ENUM_133(x) x, BOOST_PP_SEQ_ENUM_132 +# define BOOST_PP_SEQ_ENUM_134(x) x, BOOST_PP_SEQ_ENUM_133 +# define BOOST_PP_SEQ_ENUM_135(x) x, BOOST_PP_SEQ_ENUM_134 +# define BOOST_PP_SEQ_ENUM_136(x) x, BOOST_PP_SEQ_ENUM_135 +# define BOOST_PP_SEQ_ENUM_137(x) x, BOOST_PP_SEQ_ENUM_136 +# define BOOST_PP_SEQ_ENUM_138(x) x, BOOST_PP_SEQ_ENUM_137 +# define BOOST_PP_SEQ_ENUM_139(x) x, BOOST_PP_SEQ_ENUM_138 +# define BOOST_PP_SEQ_ENUM_140(x) x, BOOST_PP_SEQ_ENUM_139 +# define BOOST_PP_SEQ_ENUM_141(x) x, BOOST_PP_SEQ_ENUM_140 +# define BOOST_PP_SEQ_ENUM_142(x) x, BOOST_PP_SEQ_ENUM_141 +# define BOOST_PP_SEQ_ENUM_143(x) x, BOOST_PP_SEQ_ENUM_142 +# define BOOST_PP_SEQ_ENUM_144(x) x, BOOST_PP_SEQ_ENUM_143 +# define BOOST_PP_SEQ_ENUM_145(x) x, BOOST_PP_SEQ_ENUM_144 +# define BOOST_PP_SEQ_ENUM_146(x) x, BOOST_PP_SEQ_ENUM_145 +# define BOOST_PP_SEQ_ENUM_147(x) x, BOOST_PP_SEQ_ENUM_146 +# define BOOST_PP_SEQ_ENUM_148(x) x, BOOST_PP_SEQ_ENUM_147 +# define BOOST_PP_SEQ_ENUM_149(x) x, BOOST_PP_SEQ_ENUM_148 +# define BOOST_PP_SEQ_ENUM_150(x) x, BOOST_PP_SEQ_ENUM_149 +# define BOOST_PP_SEQ_ENUM_151(x) x, BOOST_PP_SEQ_ENUM_150 +# define BOOST_PP_SEQ_ENUM_152(x) x, BOOST_PP_SEQ_ENUM_151 +# define BOOST_PP_SEQ_ENUM_153(x) x, BOOST_PP_SEQ_ENUM_152 +# define BOOST_PP_SEQ_ENUM_154(x) x, BOOST_PP_SEQ_ENUM_153 +# define BOOST_PP_SEQ_ENUM_155(x) x, BOOST_PP_SEQ_ENUM_154 +# define BOOST_PP_SEQ_ENUM_156(x) x, BOOST_PP_SEQ_ENUM_155 +# define BOOST_PP_SEQ_ENUM_157(x) x, BOOST_PP_SEQ_ENUM_156 +# define BOOST_PP_SEQ_ENUM_158(x) x, BOOST_PP_SEQ_ENUM_157 +# define BOOST_PP_SEQ_ENUM_159(x) x, BOOST_PP_SEQ_ENUM_158 +# define BOOST_PP_SEQ_ENUM_160(x) x, BOOST_PP_SEQ_ENUM_159 +# define BOOST_PP_SEQ_ENUM_161(x) x, BOOST_PP_SEQ_ENUM_160 +# define BOOST_PP_SEQ_ENUM_162(x) x, BOOST_PP_SEQ_ENUM_161 +# define BOOST_PP_SEQ_ENUM_163(x) x, BOOST_PP_SEQ_ENUM_162 +# define BOOST_PP_SEQ_ENUM_164(x) x, BOOST_PP_SEQ_ENUM_163 +# define BOOST_PP_SEQ_ENUM_165(x) x, BOOST_PP_SEQ_ENUM_164 +# define BOOST_PP_SEQ_ENUM_166(x) x, BOOST_PP_SEQ_ENUM_165 +# define BOOST_PP_SEQ_ENUM_167(x) x, BOOST_PP_SEQ_ENUM_166 +# define BOOST_PP_SEQ_ENUM_168(x) x, BOOST_PP_SEQ_ENUM_167 +# define BOOST_PP_SEQ_ENUM_169(x) x, BOOST_PP_SEQ_ENUM_168 +# define BOOST_PP_SEQ_ENUM_170(x) x, BOOST_PP_SEQ_ENUM_169 +# define BOOST_PP_SEQ_ENUM_171(x) x, BOOST_PP_SEQ_ENUM_170 +# define BOOST_PP_SEQ_ENUM_172(x) x, BOOST_PP_SEQ_ENUM_171 +# define BOOST_PP_SEQ_ENUM_173(x) x, BOOST_PP_SEQ_ENUM_172 +# define BOOST_PP_SEQ_ENUM_174(x) x, BOOST_PP_SEQ_ENUM_173 +# define BOOST_PP_SEQ_ENUM_175(x) x, BOOST_PP_SEQ_ENUM_174 +# define BOOST_PP_SEQ_ENUM_176(x) x, BOOST_PP_SEQ_ENUM_175 +# define BOOST_PP_SEQ_ENUM_177(x) x, BOOST_PP_SEQ_ENUM_176 +# define BOOST_PP_SEQ_ENUM_178(x) x, BOOST_PP_SEQ_ENUM_177 +# define BOOST_PP_SEQ_ENUM_179(x) x, BOOST_PP_SEQ_ENUM_178 +# define BOOST_PP_SEQ_ENUM_180(x) x, BOOST_PP_SEQ_ENUM_179 +# define BOOST_PP_SEQ_ENUM_181(x) x, BOOST_PP_SEQ_ENUM_180 +# define BOOST_PP_SEQ_ENUM_182(x) x, BOOST_PP_SEQ_ENUM_181 +# define BOOST_PP_SEQ_ENUM_183(x) x, BOOST_PP_SEQ_ENUM_182 +# define BOOST_PP_SEQ_ENUM_184(x) x, BOOST_PP_SEQ_ENUM_183 +# define BOOST_PP_SEQ_ENUM_185(x) x, BOOST_PP_SEQ_ENUM_184 +# define BOOST_PP_SEQ_ENUM_186(x) x, BOOST_PP_SEQ_ENUM_185 +# define BOOST_PP_SEQ_ENUM_187(x) x, BOOST_PP_SEQ_ENUM_186 +# define BOOST_PP_SEQ_ENUM_188(x) x, BOOST_PP_SEQ_ENUM_187 +# define BOOST_PP_SEQ_ENUM_189(x) x, BOOST_PP_SEQ_ENUM_188 +# define BOOST_PP_SEQ_ENUM_190(x) x, BOOST_PP_SEQ_ENUM_189 +# define BOOST_PP_SEQ_ENUM_191(x) x, BOOST_PP_SEQ_ENUM_190 +# define BOOST_PP_SEQ_ENUM_192(x) x, BOOST_PP_SEQ_ENUM_191 +# define BOOST_PP_SEQ_ENUM_193(x) x, BOOST_PP_SEQ_ENUM_192 +# define BOOST_PP_SEQ_ENUM_194(x) x, BOOST_PP_SEQ_ENUM_193 +# define BOOST_PP_SEQ_ENUM_195(x) x, BOOST_PP_SEQ_ENUM_194 +# define BOOST_PP_SEQ_ENUM_196(x) x, BOOST_PP_SEQ_ENUM_195 +# define BOOST_PP_SEQ_ENUM_197(x) x, BOOST_PP_SEQ_ENUM_196 +# define BOOST_PP_SEQ_ENUM_198(x) x, BOOST_PP_SEQ_ENUM_197 +# define BOOST_PP_SEQ_ENUM_199(x) x, BOOST_PP_SEQ_ENUM_198 +# define BOOST_PP_SEQ_ENUM_200(x) x, BOOST_PP_SEQ_ENUM_199 +# define BOOST_PP_SEQ_ENUM_201(x) x, BOOST_PP_SEQ_ENUM_200 +# define BOOST_PP_SEQ_ENUM_202(x) x, BOOST_PP_SEQ_ENUM_201 +# define BOOST_PP_SEQ_ENUM_203(x) x, BOOST_PP_SEQ_ENUM_202 +# define BOOST_PP_SEQ_ENUM_204(x) x, BOOST_PP_SEQ_ENUM_203 +# define BOOST_PP_SEQ_ENUM_205(x) x, BOOST_PP_SEQ_ENUM_204 +# define BOOST_PP_SEQ_ENUM_206(x) x, BOOST_PP_SEQ_ENUM_205 +# define BOOST_PP_SEQ_ENUM_207(x) x, BOOST_PP_SEQ_ENUM_206 +# define BOOST_PP_SEQ_ENUM_208(x) x, BOOST_PP_SEQ_ENUM_207 +# define BOOST_PP_SEQ_ENUM_209(x) x, BOOST_PP_SEQ_ENUM_208 +# define BOOST_PP_SEQ_ENUM_210(x) x, BOOST_PP_SEQ_ENUM_209 +# define BOOST_PP_SEQ_ENUM_211(x) x, BOOST_PP_SEQ_ENUM_210 +# define BOOST_PP_SEQ_ENUM_212(x) x, BOOST_PP_SEQ_ENUM_211 +# define BOOST_PP_SEQ_ENUM_213(x) x, BOOST_PP_SEQ_ENUM_212 +# define BOOST_PP_SEQ_ENUM_214(x) x, BOOST_PP_SEQ_ENUM_213 +# define BOOST_PP_SEQ_ENUM_215(x) x, BOOST_PP_SEQ_ENUM_214 +# define BOOST_PP_SEQ_ENUM_216(x) x, BOOST_PP_SEQ_ENUM_215 +# define BOOST_PP_SEQ_ENUM_217(x) x, BOOST_PP_SEQ_ENUM_216 +# define BOOST_PP_SEQ_ENUM_218(x) x, BOOST_PP_SEQ_ENUM_217 +# define BOOST_PP_SEQ_ENUM_219(x) x, BOOST_PP_SEQ_ENUM_218 +# define BOOST_PP_SEQ_ENUM_220(x) x, BOOST_PP_SEQ_ENUM_219 +# define BOOST_PP_SEQ_ENUM_221(x) x, BOOST_PP_SEQ_ENUM_220 +# define BOOST_PP_SEQ_ENUM_222(x) x, BOOST_PP_SEQ_ENUM_221 +# define BOOST_PP_SEQ_ENUM_223(x) x, BOOST_PP_SEQ_ENUM_222 +# define BOOST_PP_SEQ_ENUM_224(x) x, BOOST_PP_SEQ_ENUM_223 +# define BOOST_PP_SEQ_ENUM_225(x) x, BOOST_PP_SEQ_ENUM_224 +# define BOOST_PP_SEQ_ENUM_226(x) x, BOOST_PP_SEQ_ENUM_225 +# define BOOST_PP_SEQ_ENUM_227(x) x, BOOST_PP_SEQ_ENUM_226 +# define BOOST_PP_SEQ_ENUM_228(x) x, BOOST_PP_SEQ_ENUM_227 +# define BOOST_PP_SEQ_ENUM_229(x) x, BOOST_PP_SEQ_ENUM_228 +# define BOOST_PP_SEQ_ENUM_230(x) x, BOOST_PP_SEQ_ENUM_229 +# define BOOST_PP_SEQ_ENUM_231(x) x, BOOST_PP_SEQ_ENUM_230 +# define BOOST_PP_SEQ_ENUM_232(x) x, BOOST_PP_SEQ_ENUM_231 +# define BOOST_PP_SEQ_ENUM_233(x) x, BOOST_PP_SEQ_ENUM_232 +# define BOOST_PP_SEQ_ENUM_234(x) x, BOOST_PP_SEQ_ENUM_233 +# define BOOST_PP_SEQ_ENUM_235(x) x, BOOST_PP_SEQ_ENUM_234 +# define BOOST_PP_SEQ_ENUM_236(x) x, BOOST_PP_SEQ_ENUM_235 +# define BOOST_PP_SEQ_ENUM_237(x) x, BOOST_PP_SEQ_ENUM_236 +# define BOOST_PP_SEQ_ENUM_238(x) x, BOOST_PP_SEQ_ENUM_237 +# define BOOST_PP_SEQ_ENUM_239(x) x, BOOST_PP_SEQ_ENUM_238 +# define BOOST_PP_SEQ_ENUM_240(x) x, BOOST_PP_SEQ_ENUM_239 +# define BOOST_PP_SEQ_ENUM_241(x) x, BOOST_PP_SEQ_ENUM_240 +# define BOOST_PP_SEQ_ENUM_242(x) x, BOOST_PP_SEQ_ENUM_241 +# define BOOST_PP_SEQ_ENUM_243(x) x, BOOST_PP_SEQ_ENUM_242 +# define BOOST_PP_SEQ_ENUM_244(x) x, BOOST_PP_SEQ_ENUM_243 +# define BOOST_PP_SEQ_ENUM_245(x) x, BOOST_PP_SEQ_ENUM_244 +# define BOOST_PP_SEQ_ENUM_246(x) x, BOOST_PP_SEQ_ENUM_245 +# define BOOST_PP_SEQ_ENUM_247(x) x, BOOST_PP_SEQ_ENUM_246 +# define BOOST_PP_SEQ_ENUM_248(x) x, BOOST_PP_SEQ_ENUM_247 +# define BOOST_PP_SEQ_ENUM_249(x) x, BOOST_PP_SEQ_ENUM_248 +# define BOOST_PP_SEQ_ENUM_250(x) x, BOOST_PP_SEQ_ENUM_249 +# define BOOST_PP_SEQ_ENUM_251(x) x, BOOST_PP_SEQ_ENUM_250 +# define BOOST_PP_SEQ_ENUM_252(x) x, BOOST_PP_SEQ_ENUM_251 +# define BOOST_PP_SEQ_ENUM_253(x) x, BOOST_PP_SEQ_ENUM_252 +# define BOOST_PP_SEQ_ENUM_254(x) x, BOOST_PP_SEQ_ENUM_253 +# define BOOST_PP_SEQ_ENUM_255(x) x, BOOST_PP_SEQ_ENUM_254 +# define BOOST_PP_SEQ_ENUM_256(x) x, BOOST_PP_SEQ_ENUM_255 +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/preprocessor/repeat.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/preprocessor/repeat.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,825 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP +# define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_REPEAT */ +# +# if 0 +# define BOOST_PP_REPEAT(count, macro, data) +# endif +# +# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) +# +# define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL)) +# +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0 +# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0 +# +# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) +# define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d) +# define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d) +# define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003) +# +# define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d) +# define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d) +# define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d) +# +# define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1 +# define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2 +# define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3 +# +# define BOOST_PP_REPEAT_1_0(m, d) +# define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d) +# define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d) +# define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d) +# define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d) +# define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d) +# define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d) +# define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d) +# define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d) +# define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d) +# define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d) +# define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d) +# define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d) +# define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d) +# define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d) +# define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d) +# define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d) +# define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d) +# define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d) +# define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d) +# define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d) +# define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d) +# define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d) +# define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d) +# define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d) +# define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d) +# define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d) +# define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d) +# define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d) +# define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d) +# define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d) +# define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d) +# define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d) +# define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d) +# define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d) +# define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d) +# define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d) +# define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d) +# define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d) +# define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d) +# define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d) +# define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d) +# define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d) +# define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d) +# define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d) +# define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d) +# define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d) +# define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d) +# define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d) +# define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d) +# define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d) +# define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d) +# define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d) +# define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d) +# define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d) +# define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d) +# define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d) +# define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d) +# define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d) +# define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d) +# define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d) +# define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d) +# define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d) +# define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d) +# define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d) +# define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d) +# define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d) +# define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d) +# define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d) +# define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d) +# define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d) +# define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d) +# define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d) +# define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d) +# define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d) +# define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d) +# define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d) +# define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d) +# define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d) +# define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d) +# define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d) +# define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d) +# define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d) +# define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d) +# define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d) +# define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d) +# define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d) +# define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d) +# define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d) +# define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d) +# define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d) +# define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d) +# define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d) +# define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d) +# define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d) +# define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d) +# define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d) +# define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d) +# define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d) +# define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d) +# define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d) +# define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d) +# define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d) +# define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d) +# define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d) +# define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d) +# define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d) +# define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d) +# define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d) +# define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d) +# define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d) +# define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d) +# define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d) +# define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d) +# define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d) +# define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d) +# define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d) +# define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d) +# define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d) +# define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d) +# define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d) +# define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d) +# define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d) +# define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d) +# define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d) +# define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d) +# define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d) +# define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d) +# define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d) +# define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d) +# define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d) +# define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d) +# define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d) +# define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d) +# define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d) +# define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d) +# define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d) +# define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d) +# define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d) +# define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d) +# define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d) +# define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d) +# define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d) +# define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d) +# define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d) +# define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d) +# define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d) +# define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d) +# define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d) +# define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d) +# define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d) +# define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d) +# define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d) +# define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d) +# define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d) +# define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d) +# define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d) +# define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d) +# define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d) +# define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d) +# define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d) +# define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d) +# define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d) +# define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d) +# define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d) +# define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d) +# define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d) +# define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d) +# define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d) +# define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d) +# define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d) +# define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d) +# define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d) +# define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d) +# define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d) +# define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d) +# define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d) +# define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d) +# define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d) +# define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d) +# define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d) +# define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d) +# define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d) +# define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d) +# define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d) +# define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d) +# define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d) +# define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d) +# define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d) +# define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d) +# define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d) +# define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d) +# define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d) +# define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d) +# define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d) +# define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d) +# define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d) +# define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d) +# define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d) +# define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d) +# define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d) +# define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d) +# define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d) +# define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d) +# define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d) +# define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d) +# define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d) +# define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d) +# define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d) +# define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d) +# define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d) +# define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d) +# define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d) +# define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d) +# define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d) +# define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d) +# define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d) +# define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d) +# define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d) +# define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d) +# define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d) +# define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d) +# define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d) +# define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d) +# define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d) +# define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d) +# define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d) +# define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d) +# define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d) +# define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d) +# define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d) +# define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d) +# define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d) +# define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d) +# define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d) +# define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d) +# define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d) +# define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d) +# define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d) +# define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d) +# define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d) +# define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d) +# define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d) +# define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d) +# define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d) +# define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d) +# define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d) +# define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d) +# define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d) +# define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d) +# define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d) +# define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d) +# define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d) +# define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d) +# define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d) +# define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d) +# define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d) +# +# define BOOST_PP_REPEAT_2_0(m, d) +# define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d) +# define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d) +# define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d) +# define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d) +# define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d) +# define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d) +# define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d) +# define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d) +# define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d) +# define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d) +# define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d) +# define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d) +# define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d) +# define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d) +# define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d) +# define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d) +# define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d) +# define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d) +# define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d) +# define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d) +# define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d) +# define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d) +# define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d) +# define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d) +# define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d) +# define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d) +# define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d) +# define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d) +# define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d) +# define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d) +# define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d) +# define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d) +# define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d) +# define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d) +# define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d) +# define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d) +# define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d) +# define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d) +# define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d) +# define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d) +# define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d) +# define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d) +# define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d) +# define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d) +# define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d) +# define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d) +# define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d) +# define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d) +# define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d) +# define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d) +# define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d) +# define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d) +# define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d) +# define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d) +# define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d) +# define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d) +# define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d) +# define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d) +# define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d) +# define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d) +# define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d) +# define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d) +# define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d) +# define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d) +# define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d) +# define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d) +# define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d) +# define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d) +# define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d) +# define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d) +# define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d) +# define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d) +# define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d) +# define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d) +# define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d) +# define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d) +# define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d) +# define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d) +# define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d) +# define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d) +# define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d) +# define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d) +# define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d) +# define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d) +# define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d) +# define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d) +# define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d) +# define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d) +# define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d) +# define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d) +# define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d) +# define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d) +# define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d) +# define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d) +# define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d) +# define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d) +# define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d) +# define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d) +# define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d) +# define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d) +# define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d) +# define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d) +# define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d) +# define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d) +# define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d) +# define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d) +# define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d) +# define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d) +# define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d) +# define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d) +# define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d) +# define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d) +# define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d) +# define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d) +# define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d) +# define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d) +# define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d) +# define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d) +# define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d) +# define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d) +# define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d) +# define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d) +# define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d) +# define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d) +# define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d) +# define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d) +# define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d) +# define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d) +# define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d) +# define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d) +# define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d) +# define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d) +# define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d) +# define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d) +# define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d) +# define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d) +# define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d) +# define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d) +# define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d) +# define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d) +# define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d) +# define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d) +# define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d) +# define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d) +# define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d) +# define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d) +# define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d) +# define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d) +# define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d) +# define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d) +# define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d) +# define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d) +# define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d) +# define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d) +# define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d) +# define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d) +# define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d) +# define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d) +# define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d) +# define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d) +# define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d) +# define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d) +# define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d) +# define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d) +# define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d) +# define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d) +# define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d) +# define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d) +# define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d) +# define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d) +# define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d) +# define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d) +# define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d) +# define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d) +# define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d) +# define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d) +# define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d) +# define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d) +# define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d) +# define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d) +# define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d) +# define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d) +# define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d) +# define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d) +# define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d) +# define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d) +# define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d) +# define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d) +# define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d) +# define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d) +# define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d) +# define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d) +# define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d) +# define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d) +# define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d) +# define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d) +# define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d) +# define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d) +# define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d) +# define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d) +# define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d) +# define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d) +# define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d) +# define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d) +# define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d) +# define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d) +# define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d) +# define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d) +# define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d) +# define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d) +# define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d) +# define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d) +# define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d) +# define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d) +# define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d) +# define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d) +# define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d) +# define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d) +# define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d) +# define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d) +# define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d) +# define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d) +# define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d) +# define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d) +# define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d) +# define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d) +# define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d) +# define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d) +# define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d) +# define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d) +# define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d) +# define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d) +# define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d) +# define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d) +# define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d) +# define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d) +# define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d) +# define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d) +# define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d) +# define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d) +# define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d) +# define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d) +# define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d) +# define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d) +# define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d) +# define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d) +# define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d) +# define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d) +# define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d) +# define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d) +# define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d) +# define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d) +# define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d) +# define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d) +# define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d) +# define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d) +# +# define BOOST_PP_REPEAT_3_0(m, d) +# define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d) +# define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d) +# define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d) +# define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d) +# define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d) +# define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d) +# define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d) +# define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d) +# define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d) +# define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d) +# define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d) +# define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d) +# define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d) +# define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d) +# define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d) +# define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d) +# define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d) +# define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d) +# define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d) +# define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d) +# define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d) +# define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d) +# define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d) +# define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d) +# define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d) +# define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d) +# define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d) +# define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d) +# define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d) +# define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d) +# define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d) +# define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d) +# define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d) +# define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d) +# define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d) +# define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d) +# define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d) +# define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d) +# define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d) +# define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d) +# define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d) +# define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d) +# define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d) +# define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d) +# define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d) +# define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d) +# define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d) +# define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d) +# define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d) +# define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d) +# define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d) +# define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d) +# define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d) +# define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d) +# define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d) +# define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d) +# define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d) +# define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d) +# define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d) +# define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d) +# define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d) +# define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d) +# define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d) +# define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d) +# define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d) +# define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d) +# define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d) +# define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d) +# define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d) +# define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d) +# define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d) +# define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d) +# define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d) +# define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d) +# define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d) +# define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d) +# define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d) +# define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d) +# define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d) +# define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d) +# define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d) +# define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d) +# define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d) +# define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d) +# define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d) +# define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d) +# define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d) +# define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d) +# define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d) +# define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d) +# define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d) +# define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d) +# define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d) +# define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d) +# define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d) +# define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d) +# define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d) +# define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d) +# define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d) +# define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d) +# define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d) +# define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d) +# define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d) +# define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d) +# define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d) +# define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d) +# define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d) +# define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d) +# define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d) +# define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d) +# define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d) +# define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d) +# define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d) +# define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d) +# define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d) +# define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d) +# define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d) +# define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d) +# define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d) +# define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d) +# define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d) +# define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d) +# define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d) +# define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d) +# define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d) +# define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d) +# define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d) +# define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d) +# define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d) +# define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d) +# define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d) +# define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d) +# define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d) +# define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d) +# define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d) +# define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d) +# define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d) +# define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d) +# define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d) +# define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d) +# define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d) +# define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d) +# define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d) +# define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d) +# define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d) +# define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d) +# define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d) +# define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d) +# define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d) +# define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d) +# define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d) +# define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d) +# define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d) +# define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d) +# define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d) +# define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d) +# define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d) +# define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d) +# define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d) +# define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d) +# define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d) +# define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d) +# define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d) +# define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d) +# define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d) +# define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d) +# define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d) +# define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d) +# define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d) +# define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d) +# define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d) +# define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d) +# define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d) +# define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d) +# define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d) +# define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d) +# define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d) +# define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d) +# define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d) +# define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d) +# define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d) +# define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d) +# define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d) +# define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d) +# define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d) +# define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d) +# define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d) +# define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d) +# define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d) +# define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d) +# define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d) +# define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d) +# define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d) +# define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d) +# define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d) +# define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d) +# define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d) +# define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d) +# define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d) +# define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d) +# define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d) +# define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d) +# define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d) +# define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d) +# define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d) +# define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d) +# define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d) +# define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d) +# define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d) +# define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d) +# define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d) +# define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d) +# define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d) +# define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d) +# define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d) +# define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d) +# define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d) +# define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d) +# define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d) +# define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d) +# define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d) +# define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d) +# define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d) +# define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d) +# define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d) +# define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d) +# define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d) +# define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d) +# define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d) +# define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d) +# define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d) +# define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d) +# define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d) +# define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d) +# define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d) +# define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d) +# define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d) +# define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d) +# define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d) +# define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d) +# define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d) +# define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d) +# define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d) +# define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d) +# define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d) +# define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d) +# define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d) +# define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d) +# define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d) +# define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d) +# define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d) +# define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d) +# define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d) +# define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d) +# define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d) +# define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/reverse_fold_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/reverse_fold_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ - -#ifndef BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED -#define BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/aux_/reverse_fold_impl.hpp,v $ -// $Date: 2004/10/01 16:29:34 $ -// $Revision: 1.3 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include -# include -# include -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) -# include -# include -# endif -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER reverse_fold_impl.hpp -# include - -#else - -# define AUX778076_FOLD_IMPL_OP(iter) typename deref::type -# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_fold -# include - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_AUX_REVERSE_FOLD_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/reverse_iter_fold_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/reverse_iter_fold_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - -#ifndef BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED -#define BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/aux_/reverse_iter_fold_impl.hpp,v $ -// $Date: 2004/09/02 15:40:44 $ -// $Revision: 1.2 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include -# include -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) -# include -# include -# endif -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER reverse_iter_fold_impl.hpp -# include - -#else - -# define AUX778076_FOLD_IMPL_OP(iter) iter -# define AUX778076_FOLD_IMPL_NAME_PREFIX reverse_iter_fold -# include - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_AUX_ITER_FOLD_BACKWARD_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/size_impl.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/aux_/size_impl.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,33 @@ + +#ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED +#define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/size_impl.hpp,v $ +// $Date: 2004/09/02 15:41:02 $ +// $Revision: 1.2 $ + +#include +#include + +namespace boost { namespace mpl { + +template<> +struct size_impl< aux::set_tag > +{ + template< typename Set > struct apply + : Set::size + { + }; +}; + +}} + +#endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/aux_/template_arity.hpp --- a/epoc32/include/stdapis/boost/mpl/aux_/template_arity.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED -#define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2001-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/aux_/template_arity.hpp,v $ -// $Date: 2004/09/07 12:24:48 $ -// $Revision: 1.11 $ - -#include -#include - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include -# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) -# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) -# include -# endif -# else -# include -# endif -#endif - -#include -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp -# include - -#else - -# if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) -# if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) - -# include -# include -# include -# include -# include - -# include -# include -# include -# include -# include - -# define AUX778076_ARITY BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) - -namespace boost { namespace mpl { namespace aux { - -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag -{ - typedef char (&type)[N + 1]; -}; - -# define AUX778076_MAX_ARITY_OP(unused, state, i_) \ - ( BOOST_PP_CAT(C,i_) > 0 ? BOOST_PP_CAT(C,i_) : state ) \ -/**/ - -template< - BOOST_MPL_PP_PARAMS(AUX778076_ARITY, BOOST_MPL_AUX_NTTP_DECL(int, C)) - > -struct max_arity -{ - BOOST_STATIC_CONSTANT(int, value = - BOOST_PP_SEQ_FOLD_LEFT( - AUX778076_MAX_ARITY_OP - , -1 - , BOOST_MPL_PP_RANGE(1, AUX778076_ARITY) - ) - ); -}; - -# undef AUX778076_MAX_ARITY_OP - -arity_tag<0>::type arity_helper(...); - -# define BOOST_PP_ITERATION_LIMITS (1, AUX778076_ARITY) -# define BOOST_PP_FILENAME_1 -# include BOOST_PP_ITERATE() - -template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > -struct template_arity_impl -{ - BOOST_STATIC_CONSTANT(int, value = - sizeof(arity_helper(type_wrapper(),arity_tag())) - 1 - ); -}; - -# define AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i_, F) \ - BOOST_PP_COMMA_IF(i_) template_arity_impl::value \ -/**/ - -template< typename F > -struct template_arity -{ - BOOST_STATIC_CONSTANT(int, value = ( - max_arity< BOOST_MPL_PP_REPEAT( - AUX778076_ARITY - , AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION - , F - ) >::value - )); - - typedef mpl::int_ type; -}; - -# undef AUX778076_TEMPLATE_ARITY_IMPL_INVOCATION - -# undef AUX778076_ARITY - -}}} - -# endif // BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING -# else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT - -# include - -namespace boost { namespace mpl { namespace aux { - -template< bool > -struct template_arity_impl -{ - template< typename F > struct result_ - : mpl::int_<-1> - { - }; -}; - -template<> -struct template_arity_impl -{ - template< typename F > struct result_ - : F::arity - { - }; -}; - -template< typename F > -struct template_arity - : template_arity_impl< ::boost::mpl::aux::has_rebind::value > - ::template result_ -{ -}; - -#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG) -template<> -struct template_arity - : mpl::int_<-1> -{ -}; -#endif - -}}} - -# endif // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED - -///// iteration - -#else -#define i_ BOOST_PP_FRAME_ITERATION(1) - -template< - template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F - , BOOST_MPL_PP_PARAMS(i_, typename T) - > -typename arity_tag::type -arity_helper(type_wrapper< F >, arity_tag); - -#undef i_ -#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/base.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/base.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,479 @@ +// Copyright 2002 The Trustees of Indiana University. + +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Boost.MultiArray Library +// Authors: Ronald Garcia +// Jeremy Siek +// Andrew Lumsdaine +// See http://www.boost.org/libs/multi_array for documentation. + +#ifndef BASE_RG071801_HPP +#define BASE_RG071801_HPP + +// +// base.hpp - some implementation base classes for from which +// functionality is acquired +// + +#include "boost/multi_array/extent_range.hpp" +#include "boost/multi_array/extent_gen.hpp" +#include "boost/multi_array/index_range.hpp" +#include "boost/multi_array/index_gen.hpp" +#include "boost/multi_array/storage_order.hpp" +#include "boost/multi_array/types.hpp" +#include "boost/config.hpp" +#include "boost/multi_array/concept_checks.hpp" //for ignore_unused_... +#include "boost/mpl/eval_if.hpp" +#include "boost/mpl/if.hpp" +#include "boost/mpl/size_t.hpp" +#include "boost/mpl/aux_/msvc_eti_base.hpp" +#include "boost/iterator/reverse_iterator.hpp" +#include "boost/static_assert.hpp" +#include "boost/type.hpp" +#include "boost/assert.hpp" +#include +#include + +namespace boost { + +///////////////////////////////////////////////////////////////////////// +// class declarations +///////////////////////////////////////////////////////////////////////// + +template > +class multi_array; + +// This is a public interface for use by end users! +namespace multi_array_types { + typedef boost::detail::multi_array::size_type size_type; + typedef std::ptrdiff_t difference_type; + typedef boost::detail::multi_array::index index; + typedef detail::multi_array::index_range index_range; + typedef detail::multi_array::extent_range extent_range; + typedef detail::multi_array::index_gen<0,0> index_gen; + typedef detail::multi_array::extent_gen<0> extent_gen; +} + + +// boost::extents and boost::indices are now a part of the public +// interface. That way users don't necessarily have to create their +// own objects. On the other hand, one may not want the overhead of +// object creation in small-memory environments. Thus, the objects +// can be left undefined by defining BOOST_MULTI_ARRAY_NO_GENERATORS +// before loading multi_array.hpp. +#if !BOOST_MULTI_ARRAY_NO_GENERATORS +namespace { + multi_array_types::extent_gen extents; + multi_array_types::index_gen indices; +} +#endif // BOOST_MULTI_ARRAY_NO_GENERATORS + +namespace detail { +namespace multi_array { + +template +class sub_array; + +template +class const_sub_array; + +template +class array_iterator; + +template +class const_multi_array_view; + +template +class multi_array_view; + +///////////////////////////////////////////////////////////////////////// +// class interfaces +///////////////////////////////////////////////////////////////////////// + +class multi_array_base { +public: + typedef multi_array_types::size_type size_type; + typedef multi_array_types::difference_type difference_type; + typedef multi_array_types::index index; + typedef multi_array_types::index_range index_range; + typedef multi_array_types::extent_range extent_range; + typedef multi_array_types::index_gen index_gen; + typedef multi_array_types::extent_gen extent_gen; +}; + +// +// value_accessor_n +// contains the routines for accessing elements from +// N-dimensional views. +// +template +class value_accessor_n : public multi_array_base { + typedef multi_array_base super_type; +public: + typedef typename super_type::index index; + + // + // public typedefs used by classes that inherit from this base + // + typedef T element; + typedef boost::multi_array value_type; + typedef sub_array reference; + typedef const_sub_array const_reference; + +protected: + // used by array operator[] and iterators to get reference types. + template + Reference access(boost::type,index idx,TPtr base, + const size_type* extents, + const index* strides, + const index* index_bases) const { + + BOOST_ASSERT(idx - index_bases[0] >= 0); + BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]); + // return a sub_array proxy object + TPtr newbase = base + idx * strides[0]; + return Reference(newbase,extents+1,strides+1,index_bases+1); + + } + + value_accessor_n() { } + ~value_accessor_n() { } +}; + + + +// +// value_accessor_one +// contains the routines for accessing reference elements from +// 1-dimensional views. +// +template +class value_accessor_one : public multi_array_base { + typedef multi_array_base super_type; +public: + typedef typename super_type::index index; + // + // public typedefs for use by classes that inherit it. + // + typedef T element; + typedef T value_type; + typedef T& reference; + typedef T const& const_reference; + +protected: + // used by array operator[] and iterators to get reference types. + template + Reference access(boost::type,index idx,TPtr base, + const size_type* extents, + const index* strides, + const index* index_bases) const { + + ignore_unused_variable_warning(index_bases); + ignore_unused_variable_warning(extents); + BOOST_ASSERT(idx - index_bases[0] >= 0); + BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]); + return *(base + idx * strides[0]); + } + + value_accessor_one() { } + ~value_accessor_one() { } +}; + + +///////////////////////////////////////////////////////////////////////// +// choose value accessor begins +// + +template +struct choose_value_accessor_n { + typedef value_accessor_n type; +}; + +template +struct choose_value_accessor_one { + typedef value_accessor_one type; +}; + +template +struct value_accessor_generator { + BOOST_STATIC_CONSTANT(std::size_t, dimensionality = NumDims::value); + + typedef typename + mpl::eval_if_c<(dimensionality == 1), + choose_value_accessor_one, + choose_value_accessor_n + >::type type; +}; + +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +struct eti_value_accessor +{ + typedef int index; + typedef int size_type; + typedef int element; + typedef int index_range; + typedef int value_type; + typedef int reference; + typedef int const_reference; +}; + +template <> +struct value_accessor_generator +{ + typedef eti_value_accessor type; +}; + +template +struct associated_types + : mpl::aux::msvc_eti_base< + typename value_accessor_generator::type + >::type +{}; + +template <> +struct associated_types : eti_value_accessor {}; + +#else + +template +struct associated_types + : value_accessor_generator::type +{}; + +#endif + +// +// choose value accessor ends +///////////////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////////////// +// multi_array_base +//////////////////////////////////////////////////////////////////////// +template +class multi_array_impl_base + : +#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) + public mpl::aux::msvc_eti_base< + typename value_accessor_generator >::type + >::type +#else + public value_accessor_generator >::type +#endif +{ + typedef associated_types > types; +public: + typedef typename types::index index; + typedef typename types::size_type size_type; + typedef typename types::element element; + typedef typename types::index_range index_range; + typedef typename types::value_type value_type; + typedef typename types::reference reference; + typedef typename types::const_reference const_reference; + + template + struct subarray { + typedef boost::detail::multi_array::sub_array type; + }; + + template + struct const_subarray { + typedef boost::detail::multi_array::const_sub_array type; + }; + + template + struct array_view { + typedef boost::detail::multi_array::multi_array_view type; + }; + + template + struct const_array_view { + public: + typedef boost::detail::multi_array::const_multi_array_view type; + }; + + // + // iterator support + // + typedef array_iterator,reference> iterator; + typedef array_iterator,const_reference> const_iterator; + + typedef ::boost::reverse_iterator reverse_iterator; + typedef ::boost::reverse_iterator const_reverse_iterator; + + BOOST_STATIC_CONSTANT(std::size_t, dimensionality = NumDims); +protected: + + multi_array_impl_base() { } + ~multi_array_impl_base() { } + + // Used by operator() in our array classes + template + Reference access_element(boost::type, + const IndexList& indices, + TPtr base, + const size_type* extents, + const index* strides, + const index* index_bases) const { + + ignore_unused_variable_warning(index_bases); + ignore_unused_variable_warning(extents); +#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS) + for (size_type i = 0; i != NumDims; ++i) { + BOOST_ASSERT(indices[i] - index_bases[i] >= 0); + BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < extents[i]); + } +#endif + + index offset = 0; + for (size_type n = 0; n != NumDims; ++n) + offset += indices[n] * strides[n]; + + return base[offset]; + } + + template + void compute_strides(StrideList& stride_list, ExtentList& extent_list, + const general_storage_order& storage) + { + // invariant: stride = the stride for dimension n + index stride = 1; + for (size_type n = 0; n != NumDims; ++n) { + index stride_sign = +1; + + if (!storage.ascending(storage.ordering(n))) + stride_sign = -1; + + // The stride for this dimension is the product of the + // lengths of the ranks minor to it. + stride_list[storage.ordering(n)] = stride * stride_sign; + + stride *= extent_list[storage.ordering(n)]; + } + } + + // This calculates the offset to the array base pointer due to: + // 1. dimensions stored in descending order + // 2. non-zero dimension index bases + template + index + calculate_origin_offset(const StrideList& stride_list, + const ExtentList& extent_list, + const general_storage_order& storage, + const BaseList& index_base_list) + { + return + calculate_descending_dimension_offset(stride_list,extent_list, + storage) + + calculate_indexing_offset(stride_list,index_base_list); + } + + // This calculates the offset added to the base pointer that are + // caused by descending dimensions + template + index + calculate_descending_dimension_offset(const StrideList& stride_list, + const ExtentList& extent_list, + const general_storage_order& storage) + { + index offset = 0; + if (!storage.all_dims_ascending()) + for (size_type n = 0; n != NumDims; ++n) + if (!storage.ascending(n)) + offset -= (extent_list[n] - 1) * stride_list[n]; + + return offset; + } + + // This is used to reindex array_views, which are no longer + // concerned about storage order (specifically, whether dimensions + // are ascending or descending) since the viewed array handled it. + + template + index + calculate_indexing_offset(const StrideList& stride_list, + const BaseList& index_base_list) + { + index offset = 0; + for (size_type n = 0; n != NumDims; ++n) + offset -= stride_list[n] * index_base_list[n]; + return offset; + } + + // Slicing using an index_gen. + // Note that populating an index_gen creates a type that encodes + // both the number of dimensions in the current Array (NumDims), and + // the Number of dimensions for the resulting view. This allows the + // compiler to fail if the dimensions aren't completely accounted + // for. For reasons unbeknownst to me, a BOOST_STATIC_ASSERT + // within the member function template does not work. I should add a + // note to the documentation specifying that you get a damn ugly + // error message if you screw up in your slicing code. + template + ArrayRef + generate_array_view(boost::type, + const boost::detail::multi_array:: + index_gen& indices, + const size_type* extents, + const index* strides, + const index* index_bases, + TPtr base) const { + + boost::array new_strides; + boost::array new_extents; + + index offset = 0; + size_type dim = 0; + for (size_type n = 0; n != NumDims; ++n) { + const index default_start = index_bases[n]; + const index default_finish = default_start+extents[n]; + const index_range& current_range = indices.ranges_[n]; + index start = current_range.get_start(default_start); + index finish = current_range.get_finish(default_finish); + index index_factor = current_range.stride(); + index len = (finish - start + (index_factor - 1)) / index_factor; + + BOOST_ASSERT(index_bases[n] <= start && + start <= index_bases[n]+index(extents[n])); + BOOST_ASSERT(index_bases[n] <= finish && + finish <= index_bases[n]+index(extents[n])); + BOOST_ASSERT(index_factor > 0); + + // the array data pointer is modified to account for non-zero + // bases during slicing (see [Garcia] for the math involved) + offset += start * strides[n]; + + if (!current_range.is_degenerate()) { + + // The index_factor for each dimension is included into the + // strides for the array_view (see [Garcia] for the math involved). + new_strides[dim] = index_factor * strides[n]; + + // calculate new extents + new_extents[dim] = len; + ++dim; + } + } + BOOST_ASSERT(dim == NDims); + + return + ArrayRef(base+offset, + new_extents, + new_strides); + } + + +}; + +} // namespace multi_array +} // namespace detail + +} // namespace boost + +#endif // BASE_RG071801_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/begin_end.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/begin_end.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,49 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/begin_end.hpp,v $ +// $Date: 2004/09/02 15:41:19 $ +// $Revision: 1.4 $ + +#include + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +# include +# include +# include + +namespace boost { namespace mpl { + +template<> +struct begin_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +template<> +struct end_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef v_iter type; + }; +}; + +}} + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +#endif // BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/bind.hpp --- a/epoc32/include/stdapis/boost/mpl/bind.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,547 +0,0 @@ - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_MPL_BIND_HPP_INCLUDED -#define BOOST_MPL_BIND_HPP_INCLUDED - -// Copyright Peter Dimov 2001 -// Copyright Aleksey Gurtovoy 2001-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/bind.hpp,v $ -// $Date: 2004/10/26 14:51:04 $ -// $Revision: 1.13 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -# include -# endif -#endif - -#include -#include -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# if defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) -# define BOOST_MPL_PREPROCESSED_HEADER basic_bind.hpp -# else -# define BOOST_MPL_PREPROCESSED_HEADER bind.hpp -# endif -# include - -#else - -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include - -# include -# include -# include -# include - -namespace boost { namespace mpl { - -// local macros, #undef-ined at the end of the header -# define AUX778076_APPLY \ - BOOST_PP_CAT(apply_wrap,BOOST_MPL_LIMIT_METAFUNCTION_ARITY) \ - /**/ - -# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) -# define AUX778076_DMC_PARAM() , int dummy_ -# else -# define AUX778076_DMC_PARAM() -# endif - -# define AUX778076_BIND_PARAMS(param) \ - BOOST_MPL_PP_PARAMS( \ - BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ - , param \ - ) \ - /**/ - -# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ - BOOST_MPL_PP_DEFAULT_PARAMS( \ - BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ - , param \ - , value \ - ) \ - /**/ - -# define AUX778076_BIND_N_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ - /**/ - -# define AUX778076_BIND_N_SPEC_PARAMS(n, param, def) \ - BOOST_PP_COMMA_IF(n) \ - BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ - /**/ - -#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES) -# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ - AUX778076_BIND_DEFAULT_PARAMS(param, value) \ - /**/ -#else -# define AUX778076_BIND_NESTED_DEFAULT_PARAMS(param, value) \ - AUX778076_BIND_PARAMS(param) \ - /**/ -#endif - -namespace aux { - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< - typename T, AUX778076_BIND_PARAMS(typename U) - > -struct resolve_bind_arg -{ - typedef T type; -}; - -# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) - -template< - typename T - , typename Arg - > -struct replace_unnamed_arg -{ - typedef Arg next; - typedef T type; -}; - -template< - typename Arg - > -struct replace_unnamed_arg< arg<-1>,Arg > -{ - typedef typename Arg::next next; - typedef Arg type; -}; - -# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT - -template< - BOOST_MPL_AUX_NTTP_DECL(int, N), AUX778076_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< arg,AUX778076_BIND_PARAMS(U) > -{ - typedef typename AUX778076_APPLY, AUX778076_BIND_PARAMS(U)>::type type; -}; - -#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) -template< - typename F, AUX778076_BIND_PARAMS(typename T), AUX778076_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< bind,AUX778076_BIND_PARAMS(U) > -{ - typedef bind f_; - typedef typename AUX778076_APPLY::type type; -}; -#endif - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -// agurt, 15/jan/02: it's not a intended to be used as a function class, and -// MSVC6.5 has problems with 'apply' name here (the code compiles, but doesn't -// work), so I went with the 'result_' here, and in all other similar cases -template< bool > -struct resolve_arg_impl -{ - template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ - { - typedef T type; - }; -}; - -template<> -struct resolve_arg_impl -{ - template< typename T, AUX778076_BIND_PARAMS(typename U) > struct result_ - { - typedef typename AUX778076_APPLY< - T - , AUX778076_BIND_PARAMS(U) - >::type type; - }; -}; - -// for 'resolve_bind_arg' -template< typename T > struct is_bind_template; - -template< - typename T, AUX778076_BIND_PARAMS(typename U) - > -struct resolve_bind_arg - : resolve_arg_impl< is_bind_template::value > - ::template result_< T,AUX778076_BIND_PARAMS(U) > -{ -}; - -# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) - -template< typename T > -struct replace_unnamed_arg_impl -{ - template< typename Arg > struct result_ - { - typedef Arg next; - typedef T type; - }; -}; - -template<> -struct replace_unnamed_arg_impl< arg<-1> > -{ - template< typename Arg > struct result_ - { - typedef typename next::type next; - typedef Arg type; - }; -}; - -template< typename T, typename Arg > -struct replace_unnamed_arg - : replace_unnamed_arg_impl::template result_ -{ -}; - -# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT - -// agurt, 10/mar/02: the forward declaration has to appear before any of -// 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it -template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_chooser; - -aux::no_tag is_bind_helper(...); -template< typename T > aux::no_tag is_bind_helper(protect*); - -// overload for "main" form -// agurt, 15/mar/02: MSVC 6.5 fails to properly resolve the overload -// in case if we use 'aux::type_wrapper< bind<...> >' here, and all -// 'bind' instantiations form a complete type anyway -#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) -template< - typename F, AUX778076_BIND_PARAMS(typename T) - > -aux::yes_tag is_bind_helper(bind*); -#endif - -template< BOOST_MPL_AUX_NTTP_DECL(int, N) > -aux::yes_tag is_bind_helper(arg*); - -template< bool is_ref_ = true > -struct is_bind_template_impl -{ - template< typename T > struct result_ - { - BOOST_STATIC_CONSTANT(bool, value = false); - }; -}; - -template<> -struct is_bind_template_impl -{ - template< typename T > struct result_ - { - BOOST_STATIC_CONSTANT(bool, value = - sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); - }; -}; - -template< typename T > struct is_bind_template - : is_bind_template_impl< ::boost::detail::is_reference_impl::value > - ::template result_ -{ -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace aux - - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) -#include BOOST_PP_ITERATE() - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) -/// if_/eval_if specializations -# define AUX778076_SPEC_NAME if_ -# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) -# include BOOST_PP_ITERATE() - -#if !defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) -# define AUX778076_SPEC_NAME eval_if -# define BOOST_PP_ITERATION_PARAMS_1 (3,(3, 3, )) -# include BOOST_PP_ITERATE() -#endif -#endif - -// real C++ version is already taken care of -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - && !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) - -namespace aux { -// apply_count_args -#define AUX778076_COUNT_ARGS_PREFIX bind -#define AUX778076_COUNT_ARGS_DEFAULT na -#define AUX778076_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_METAFUNCTION_ARITY -#include -} - -// bind -template< - typename F, AUX778076_BIND_PARAMS(typename T) AUX778076_DMC_PARAM() - > -struct bind - : aux::bind_chooser< - aux::bind_count_args::value - >::template result_< F,AUX778076_BIND_PARAMS(T) >::type -{ -}; - -BOOST_MPL_AUX_ARITY_SPEC( - BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) - , bind - ) - -BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC( - BOOST_PP_INC(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) - , bind - ) - - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# undef AUX778076_BIND_NESTED_DEFAULT_PARAMS -# undef AUX778076_BIND_N_SPEC_PARAMS -# undef AUX778076_BIND_N_PARAMS -# undef AUX778076_BIND_DEFAULT_PARAMS -# undef AUX778076_BIND_PARAMS -# undef AUX778076_DMC_PARAM -# undef AUX778076_APPLY - -}} - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_BIND_HPP_INCLUDED - -///// iteration, depth == 1 - -#elif BOOST_PP_ITERATION_DEPTH() == 1 - -# define i_ BOOST_PP_FRAME_ITERATION(1) - -#if defined(AUX778076_SPEC_NAME) - -// lazy metafunction specialization -template< template< BOOST_MPL_PP_PARAMS(i_, typename T) > class F, typename Tag > -struct BOOST_PP_CAT(quote,i_); - -template< BOOST_MPL_PP_PARAMS(i_, typename T) > struct AUX778076_SPEC_NAME; - -template< - typename Tag AUX778076_BIND_N_PARAMS(i_, typename T) - > -struct BOOST_PP_CAT(bind,i_)< - BOOST_PP_CAT(quote,i_) - AUX778076_BIND_N_PARAMS(i_,T) - > -{ - template< - AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) - > - struct apply - { - private: - typedef mpl::arg<1> n1; -# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) -# include BOOST_PP_ITERATE() - - typedef typename AUX778076_SPEC_NAME< - typename t1::type - , BOOST_MPL_PP_EXT_PARAMS(2, BOOST_PP_INC(i_), t) - >::type f_; - - public: - typedef typename f_::type type; - }; -}; - -#undef AUX778076_SPEC_NAME - -#else // AUX778076_SPEC_NAME - -template< - typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() - > -struct BOOST_PP_CAT(bind,i_) -{ - template< - AUX778076_BIND_NESTED_DEFAULT_PARAMS(typename U, na) - > - struct apply - { - private: -# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) - - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; - typedef typename r0::type a0; - typedef typename r0::next n1; - typedef typename aux::resolve_bind_arg::type f_; - /// -# else - typedef typename aux::resolve_bind_arg::type f_; - -# endif // BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT - -# if i_ > 0 -# define BOOST_PP_ITERATION_PARAMS_2 (3,(1, i_, )) -# include BOOST_PP_ITERATE() -# endif - - public: - -# define AUX778076_ARG(unused, i_, t) \ - BOOST_PP_COMMA_IF(i_) \ - typename BOOST_PP_CAT(t,BOOST_PP_INC(i_))::type \ -/**/ - - typedef typename BOOST_PP_CAT(apply_wrap,i_)< - f_ - BOOST_PP_COMMA_IF(i_) BOOST_MPL_PP_REPEAT(i_, AUX778076_ARG, t) - >::type type; - -# undef AUX778076_ARG - }; -}; - -namespace aux { - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< - typename F AUX778076_BIND_N_PARAMS(i_, typename T), AUX778076_BIND_PARAMS(typename U) - > -struct resolve_bind_arg< - BOOST_PP_CAT(bind,i_),AUX778076_BIND_PARAMS(U) - > -{ - typedef BOOST_PP_CAT(bind,i_) f_; - typedef typename AUX778076_APPLY::type type; -}; - -#else - -template< - typename F AUX778076_BIND_N_PARAMS(i_, typename T) - > -aux::yes_tag -is_bind_helper(BOOST_PP_CAT(bind,i_)*); - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace aux - -BOOST_MPL_AUX_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) -BOOST_MPL_AUX_TEMPLATE_ARITY_SPEC(BOOST_PP_INC(i_), BOOST_PP_CAT(bind,i_)) - -# if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) -# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -#if i_ == BOOST_MPL_LIMIT_METAFUNCTION_ARITY -/// primary template (not a specialization!) -template< - typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() - > -struct bind - : BOOST_PP_CAT(bind,i_) -{ -}; -#else -template< - typename F AUX778076_BIND_N_PARAMS(i_, typename T) AUX778076_DMC_PARAM() - > -struct bind< F AUX778076_BIND_N_SPEC_PARAMS(i_, T, na) > - : BOOST_PP_CAT(bind,i_) -{ -}; -#endif - -# else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace aux { - -template<> -struct bind_chooser -{ - template< - typename F, AUX778076_BIND_PARAMS(typename T) - > - struct result_ - { - typedef BOOST_PP_CAT(bind,i_)< F AUX778076_BIND_N_PARAMS(i_,T) > type; - }; -}; - -} // namespace aux - -# endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# endif // BOOST_MPL_CFG_NO_BIND_TEMPLATE - -#endif // AUX778076_SPEC_NAME - -# undef i_ - -///// iteration, depth == 2 - -#elif BOOST_PP_ITERATION_DEPTH() == 2 - -# define j_ BOOST_PP_FRAME_ITERATION(2) -# if !defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) - - typedef aux::replace_unnamed_arg< BOOST_PP_CAT(T,j_),BOOST_PP_CAT(n,j_) > BOOST_PP_CAT(r,j_); - typedef typename BOOST_PP_CAT(r,j_)::type BOOST_PP_CAT(a,j_); - typedef typename BOOST_PP_CAT(r,j_)::next BOOST_PP_CAT(n,BOOST_PP_INC(j_)); - typedef aux::resolve_bind_arg BOOST_PP_CAT(t,j_); - /// -# else - typedef aux::resolve_bind_arg< BOOST_PP_CAT(T,j_),AUX778076_BIND_PARAMS(U)> BOOST_PP_CAT(t,j_); - -# endif -# undef j_ - -#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/bind_fwd.hpp --- a/epoc32/include/stdapis/boost/mpl/bind_fwd.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,99 +0,0 @@ - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_MPL_BIND_FWD_HPP_INCLUDED -#define BOOST_MPL_BIND_FWD_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/bind_fwd.hpp,v $ -// $Date: 2004/09/02 15:40:41 $ -// $Revision: 1.2 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -#endif - -#include -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER bind_fwd.hpp -# include - -#else - -# include -# include -# include -# include - -# include -# include -# include - -namespace boost { namespace mpl { - -// local macros, #undef-ined at the end of the header - -# if defined(BOOST_MPL_CFG_DMC_AMBIGUOUS_CTPS) -# define AUX778076_DMC_PARAM() , int dummy_ = 0 -# else -# define AUX778076_DMC_PARAM() -# endif - -# define AUX778076_BIND_DEFAULT_PARAMS(param, value) \ - BOOST_MPL_PP_DEFAULT_PARAMS( \ - BOOST_MPL_LIMIT_METAFUNCTION_ARITY \ - , param \ - , value \ - ) \ - AUX778076_DMC_PARAM() \ - /**/ - -# define AUX778076_BIND_N_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ - AUX778076_DMC_PARAM() \ - /**/ - -#if !defined(BOOST_MPL_CFG_NO_BIND_TEMPLATE) -template< - typename F, AUX778076_BIND_DEFAULT_PARAMS(typename T, na) - > -struct bind; -#endif - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) -#include BOOST_PP_ITERATE() - -# undef AUX778076_BIND_N_PARAMS -# undef AUX778076_BIND_DEFAULT_PARAMS -# undef AUX778076_DMC_PARAM -}} - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_BIND_FWD_HPP_INCLUDED - -///// iteration - -#else -#define i_ BOOST_PP_FRAME_ITERATION(1) - -template< - typename F AUX778076_BIND_N_PARAMS(i_, typename T) - > -struct BOOST_PP_CAT(bind,i_); - -#undef i_ -#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/bool.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/bool.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,288 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP +# define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP +# +# include +# +# /* BOOST_PP_BOOL */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x) +# else +# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x)) +# define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par +# endif +# +# define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x +# +# define BOOST_PP_BOOL_0 0 +# define BOOST_PP_BOOL_1 1 +# define BOOST_PP_BOOL_2 1 +# define BOOST_PP_BOOL_3 1 +# define BOOST_PP_BOOL_4 1 +# define BOOST_PP_BOOL_5 1 +# define BOOST_PP_BOOL_6 1 +# define BOOST_PP_BOOL_7 1 +# define BOOST_PP_BOOL_8 1 +# define BOOST_PP_BOOL_9 1 +# define BOOST_PP_BOOL_10 1 +# define BOOST_PP_BOOL_11 1 +# define BOOST_PP_BOOL_12 1 +# define BOOST_PP_BOOL_13 1 +# define BOOST_PP_BOOL_14 1 +# define BOOST_PP_BOOL_15 1 +# define BOOST_PP_BOOL_16 1 +# define BOOST_PP_BOOL_17 1 +# define BOOST_PP_BOOL_18 1 +# define BOOST_PP_BOOL_19 1 +# define BOOST_PP_BOOL_20 1 +# define BOOST_PP_BOOL_21 1 +# define BOOST_PP_BOOL_22 1 +# define BOOST_PP_BOOL_23 1 +# define BOOST_PP_BOOL_24 1 +# define BOOST_PP_BOOL_25 1 +# define BOOST_PP_BOOL_26 1 +# define BOOST_PP_BOOL_27 1 +# define BOOST_PP_BOOL_28 1 +# define BOOST_PP_BOOL_29 1 +# define BOOST_PP_BOOL_30 1 +# define BOOST_PP_BOOL_31 1 +# define BOOST_PP_BOOL_32 1 +# define BOOST_PP_BOOL_33 1 +# define BOOST_PP_BOOL_34 1 +# define BOOST_PP_BOOL_35 1 +# define BOOST_PP_BOOL_36 1 +# define BOOST_PP_BOOL_37 1 +# define BOOST_PP_BOOL_38 1 +# define BOOST_PP_BOOL_39 1 +# define BOOST_PP_BOOL_40 1 +# define BOOST_PP_BOOL_41 1 +# define BOOST_PP_BOOL_42 1 +# define BOOST_PP_BOOL_43 1 +# define BOOST_PP_BOOL_44 1 +# define BOOST_PP_BOOL_45 1 +# define BOOST_PP_BOOL_46 1 +# define BOOST_PP_BOOL_47 1 +# define BOOST_PP_BOOL_48 1 +# define BOOST_PP_BOOL_49 1 +# define BOOST_PP_BOOL_50 1 +# define BOOST_PP_BOOL_51 1 +# define BOOST_PP_BOOL_52 1 +# define BOOST_PP_BOOL_53 1 +# define BOOST_PP_BOOL_54 1 +# define BOOST_PP_BOOL_55 1 +# define BOOST_PP_BOOL_56 1 +# define BOOST_PP_BOOL_57 1 +# define BOOST_PP_BOOL_58 1 +# define BOOST_PP_BOOL_59 1 +# define BOOST_PP_BOOL_60 1 +# define BOOST_PP_BOOL_61 1 +# define BOOST_PP_BOOL_62 1 +# define BOOST_PP_BOOL_63 1 +# define BOOST_PP_BOOL_64 1 +# define BOOST_PP_BOOL_65 1 +# define BOOST_PP_BOOL_66 1 +# define BOOST_PP_BOOL_67 1 +# define BOOST_PP_BOOL_68 1 +# define BOOST_PP_BOOL_69 1 +# define BOOST_PP_BOOL_70 1 +# define BOOST_PP_BOOL_71 1 +# define BOOST_PP_BOOL_72 1 +# define BOOST_PP_BOOL_73 1 +# define BOOST_PP_BOOL_74 1 +# define BOOST_PP_BOOL_75 1 +# define BOOST_PP_BOOL_76 1 +# define BOOST_PP_BOOL_77 1 +# define BOOST_PP_BOOL_78 1 +# define BOOST_PP_BOOL_79 1 +# define BOOST_PP_BOOL_80 1 +# define BOOST_PP_BOOL_81 1 +# define BOOST_PP_BOOL_82 1 +# define BOOST_PP_BOOL_83 1 +# define BOOST_PP_BOOL_84 1 +# define BOOST_PP_BOOL_85 1 +# define BOOST_PP_BOOL_86 1 +# define BOOST_PP_BOOL_87 1 +# define BOOST_PP_BOOL_88 1 +# define BOOST_PP_BOOL_89 1 +# define BOOST_PP_BOOL_90 1 +# define BOOST_PP_BOOL_91 1 +# define BOOST_PP_BOOL_92 1 +# define BOOST_PP_BOOL_93 1 +# define BOOST_PP_BOOL_94 1 +# define BOOST_PP_BOOL_95 1 +# define BOOST_PP_BOOL_96 1 +# define BOOST_PP_BOOL_97 1 +# define BOOST_PP_BOOL_98 1 +# define BOOST_PP_BOOL_99 1 +# define BOOST_PP_BOOL_100 1 +# define BOOST_PP_BOOL_101 1 +# define BOOST_PP_BOOL_102 1 +# define BOOST_PP_BOOL_103 1 +# define BOOST_PP_BOOL_104 1 +# define BOOST_PP_BOOL_105 1 +# define BOOST_PP_BOOL_106 1 +# define BOOST_PP_BOOL_107 1 +# define BOOST_PP_BOOL_108 1 +# define BOOST_PP_BOOL_109 1 +# define BOOST_PP_BOOL_110 1 +# define BOOST_PP_BOOL_111 1 +# define BOOST_PP_BOOL_112 1 +# define BOOST_PP_BOOL_113 1 +# define BOOST_PP_BOOL_114 1 +# define BOOST_PP_BOOL_115 1 +# define BOOST_PP_BOOL_116 1 +# define BOOST_PP_BOOL_117 1 +# define BOOST_PP_BOOL_118 1 +# define BOOST_PP_BOOL_119 1 +# define BOOST_PP_BOOL_120 1 +# define BOOST_PP_BOOL_121 1 +# define BOOST_PP_BOOL_122 1 +# define BOOST_PP_BOOL_123 1 +# define BOOST_PP_BOOL_124 1 +# define BOOST_PP_BOOL_125 1 +# define BOOST_PP_BOOL_126 1 +# define BOOST_PP_BOOL_127 1 +# define BOOST_PP_BOOL_128 1 +# define BOOST_PP_BOOL_129 1 +# define BOOST_PP_BOOL_130 1 +# define BOOST_PP_BOOL_131 1 +# define BOOST_PP_BOOL_132 1 +# define BOOST_PP_BOOL_133 1 +# define BOOST_PP_BOOL_134 1 +# define BOOST_PP_BOOL_135 1 +# define BOOST_PP_BOOL_136 1 +# define BOOST_PP_BOOL_137 1 +# define BOOST_PP_BOOL_138 1 +# define BOOST_PP_BOOL_139 1 +# define BOOST_PP_BOOL_140 1 +# define BOOST_PP_BOOL_141 1 +# define BOOST_PP_BOOL_142 1 +# define BOOST_PP_BOOL_143 1 +# define BOOST_PP_BOOL_144 1 +# define BOOST_PP_BOOL_145 1 +# define BOOST_PP_BOOL_146 1 +# define BOOST_PP_BOOL_147 1 +# define BOOST_PP_BOOL_148 1 +# define BOOST_PP_BOOL_149 1 +# define BOOST_PP_BOOL_150 1 +# define BOOST_PP_BOOL_151 1 +# define BOOST_PP_BOOL_152 1 +# define BOOST_PP_BOOL_153 1 +# define BOOST_PP_BOOL_154 1 +# define BOOST_PP_BOOL_155 1 +# define BOOST_PP_BOOL_156 1 +# define BOOST_PP_BOOL_157 1 +# define BOOST_PP_BOOL_158 1 +# define BOOST_PP_BOOL_159 1 +# define BOOST_PP_BOOL_160 1 +# define BOOST_PP_BOOL_161 1 +# define BOOST_PP_BOOL_162 1 +# define BOOST_PP_BOOL_163 1 +# define BOOST_PP_BOOL_164 1 +# define BOOST_PP_BOOL_165 1 +# define BOOST_PP_BOOL_166 1 +# define BOOST_PP_BOOL_167 1 +# define BOOST_PP_BOOL_168 1 +# define BOOST_PP_BOOL_169 1 +# define BOOST_PP_BOOL_170 1 +# define BOOST_PP_BOOL_171 1 +# define BOOST_PP_BOOL_172 1 +# define BOOST_PP_BOOL_173 1 +# define BOOST_PP_BOOL_174 1 +# define BOOST_PP_BOOL_175 1 +# define BOOST_PP_BOOL_176 1 +# define BOOST_PP_BOOL_177 1 +# define BOOST_PP_BOOL_178 1 +# define BOOST_PP_BOOL_179 1 +# define BOOST_PP_BOOL_180 1 +# define BOOST_PP_BOOL_181 1 +# define BOOST_PP_BOOL_182 1 +# define BOOST_PP_BOOL_183 1 +# define BOOST_PP_BOOL_184 1 +# define BOOST_PP_BOOL_185 1 +# define BOOST_PP_BOOL_186 1 +# define BOOST_PP_BOOL_187 1 +# define BOOST_PP_BOOL_188 1 +# define BOOST_PP_BOOL_189 1 +# define BOOST_PP_BOOL_190 1 +# define BOOST_PP_BOOL_191 1 +# define BOOST_PP_BOOL_192 1 +# define BOOST_PP_BOOL_193 1 +# define BOOST_PP_BOOL_194 1 +# define BOOST_PP_BOOL_195 1 +# define BOOST_PP_BOOL_196 1 +# define BOOST_PP_BOOL_197 1 +# define BOOST_PP_BOOL_198 1 +# define BOOST_PP_BOOL_199 1 +# define BOOST_PP_BOOL_200 1 +# define BOOST_PP_BOOL_201 1 +# define BOOST_PP_BOOL_202 1 +# define BOOST_PP_BOOL_203 1 +# define BOOST_PP_BOOL_204 1 +# define BOOST_PP_BOOL_205 1 +# define BOOST_PP_BOOL_206 1 +# define BOOST_PP_BOOL_207 1 +# define BOOST_PP_BOOL_208 1 +# define BOOST_PP_BOOL_209 1 +# define BOOST_PP_BOOL_210 1 +# define BOOST_PP_BOOL_211 1 +# define BOOST_PP_BOOL_212 1 +# define BOOST_PP_BOOL_213 1 +# define BOOST_PP_BOOL_214 1 +# define BOOST_PP_BOOL_215 1 +# define BOOST_PP_BOOL_216 1 +# define BOOST_PP_BOOL_217 1 +# define BOOST_PP_BOOL_218 1 +# define BOOST_PP_BOOL_219 1 +# define BOOST_PP_BOOL_220 1 +# define BOOST_PP_BOOL_221 1 +# define BOOST_PP_BOOL_222 1 +# define BOOST_PP_BOOL_223 1 +# define BOOST_PP_BOOL_224 1 +# define BOOST_PP_BOOL_225 1 +# define BOOST_PP_BOOL_226 1 +# define BOOST_PP_BOOL_227 1 +# define BOOST_PP_BOOL_228 1 +# define BOOST_PP_BOOL_229 1 +# define BOOST_PP_BOOL_230 1 +# define BOOST_PP_BOOL_231 1 +# define BOOST_PP_BOOL_232 1 +# define BOOST_PP_BOOL_233 1 +# define BOOST_PP_BOOL_234 1 +# define BOOST_PP_BOOL_235 1 +# define BOOST_PP_BOOL_236 1 +# define BOOST_PP_BOOL_237 1 +# define BOOST_PP_BOOL_238 1 +# define BOOST_PP_BOOL_239 1 +# define BOOST_PP_BOOL_240 1 +# define BOOST_PP_BOOL_241 1 +# define BOOST_PP_BOOL_242 1 +# define BOOST_PP_BOOL_243 1 +# define BOOST_PP_BOOL_244 1 +# define BOOST_PP_BOOL_245 1 +# define BOOST_PP_BOOL_246 1 +# define BOOST_PP_BOOL_247 1 +# define BOOST_PP_BOOL_248 1 +# define BOOST_PP_BOOL_249 1 +# define BOOST_PP_BOOL_250 1 +# define BOOST_PP_BOOL_251 1 +# define BOOST_PP_BOOL_252 1 +# define BOOST_PP_BOOL_253 1 +# define BOOST_PP_BOOL_254 1 +# define BOOST_PP_BOOL_255 1 +# define BOOST_PP_BOOL_256 1 +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/clear.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/clear.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/clear.hpp,v $ +// $Date: 2004/09/02 15:41:19 $ +// $Revision: 1.4 $ + +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long N > +struct clear_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef vector0<> type; + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/empty.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/empty.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,67 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_EMPTY_HPP +#define BOOST_RANGE_EMPTY_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +#include +//#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +//#include +//#else + +#include +#include + +namespace boost +{ +namespace range_detail +{ + + ////////////////////////////////////////////////////////////////////// + // primary template + ////////////////////////////////////////////////////////////////////// + + template< typename C > + inline bool empty( const C& c ) + { + return boost::begin( c ) == boost::end( c ); + } + + ////////////////////////////////////////////////////////////////////// + // string + ////////////////////////////////////////////////////////////////////// + + inline bool empty( const char* const& s ) + { + return s == 0 || s[0] == 0; + } + + inline bool empty( const wchar_t* const& s ) + { + return s == 0 || s[0] == 0; + } + +} // namespace 'range_detail' + +template< class T > +inline bool empty( const T& r ) +{ + return range_detail::empty( r ); +} + +} // namepace 'boost' + +//#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/equal_to.hpp --- a/epoc32/include/stdapis/boost/mpl/equal_to.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - -#ifndef BOOST_MPL_EQUAL_TO_HPP_INCLUDED -#define BOOST_MPL_EQUAL_TO_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/equal_to.hpp,v $ -// $Date: 2004/09/02 15:40:41 $ -// $Revision: 1.3 $ - -#define AUX778076_OP_NAME equal_to -#define AUX778076_OP_TOKEN == -#include - -#endif // BOOST_MPL_EQUAL_TO_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/for_each.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/for_each.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,60 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP +# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOR_EACH */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) +# else +# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(3, 2, x))) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x +# else +# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq) (macro, data, BOOST_PP_SEQ_TAIL(seq)) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_3 x) +# define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im) +# else +# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq) macro(r, data, BOOST_PP_SEQ_HEAD(seq)) +# +# /* BOOST_PP_SEQ_FOR_EACH_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) +# else +# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/front.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/front.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ + +#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED +#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/front.hpp,v $ +// $Date: 2004/09/02 15:41:19 $ +// $Revision: 1.4 $ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : v_at + { + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > +struct front_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + { + typedef typename Vector::item0 type; + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/identity.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/identity.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_IDENTITY_HPP +# define BOOST_PREPROCESSOR_IDENTITY_HPP +# +# include +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/if.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/if.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP +# define BOOST_PREPROCESSOR_CONTROL_IF_HPP +# +# include +# include +# include +# +# /* BOOST_PP_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) +# else +# define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) +# define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/iterator_range.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/iterator_range.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,608 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen & Pavol Droba 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP +#define BOOST_RANGE_ITERATOR_RANGE_HPP + +// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. +#include // Define __STL_CONFIG_H, if appropriate. +#ifndef BOOST_OLD_IOSTREAMS +# if defined(__STL_CONFIG_H) && \ + !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ + /**/ +# define BOOST_OLD_IOSTREAMS +# endif +#endif // #ifndef BOOST_OLD_IOSTREAMS + +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_OLD_IOSTREAMS +# include +#else +# include +#endif +#include + + +/*! \file + Defines the \c iterator_class and related functions. + \c iterator_range is a simple wrapper of iterator pair idiom. It provides + a rich subset of Container interface. +*/ + + +namespace boost +{ + namespace iterator_range_detail + { + // + // The functions adl_begin and adl_end are implemented in a separate + // class for gcc-2.9x + // + template + struct iterator_range_impl { + template< class ForwardRange > + static IteratorT adl_begin( ForwardRange& r ) + { + return IteratorT( boost::begin( r ) ); + } + + template< class ForwardRange > + static IteratorT adl_end( ForwardRange& r ) + { + return IteratorT( boost::end( r ) ); + } + }; + + template< class Left, class Right > + inline bool equal( const Left& l, const Right& r ) + { + typedef BOOST_DEDUCED_TYPENAME boost::range_size::type sz_type; + + sz_type l_size = boost::size( l ), + r_size = boost::size( r ); + + if( l_size != r_size ) + return false; + + return std::equal( boost::begin(l), boost::end(l), + boost::begin(r) ); + } + + template< class Left, class Right > + inline bool less_than( const Left& l, const Right& r ) + { + return std::lexicographical_compare( boost::begin(l), + boost::end(l), + boost::begin(r), + boost::end(r) ); + } + + struct range_tag { }; + struct const_range_tag { }; + + } + +// iterator range template class -----------------------------------------// + + //! iterator_range class + /*! + An \c iterator_range delimits a range in a sequence by beginning and ending iterators. + An iterator_range can be passed to an algorithm which requires a sequence as an input. + For example, the \c toupper() function may be used most frequently on strings, + but can also be used on iterator_ranges: + + \code + boost::tolower( find( s, "UPPERCASE STRING" ) ); + \endcode + + Many algorithms working with sequences take a pair of iterators, + delimiting a working range, as an arguments. The \c iterator_range class is an + encapsulation of a range identified by a pair of iterators. + It provides a collection interface, + so it is possible to pass an instance to an algorithm requiring a collection as an input. + */ + template + class iterator_range + { + protected: // Used by sub_range + //! implementation class + typedef iterator_range_detail::iterator_range_impl impl; + public: + + //! this type + typedef iterator_range type; + //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); + + //! Encapsulated value type + typedef BOOST_DEDUCED_TYPENAME + iterator_value::type value_type; + + //! Difference type + typedef BOOST_DEDUCED_TYPENAME + iterator_difference::type difference_type; + + //! Size type + typedef std::size_t size_type; // note: must be unsigned + + //! This type + typedef iterator_range this_type; + + //! Refence type + // + // Needed because value-type is the same for + // const and non-const iterators + // + typedef BOOST_DEDUCED_TYPENAME + iterator_reference::type reference; + + //! const_iterator type + /*! + There is no distinction between const_iterator and iterator. + These typedefs are provides to fulfill container interface + */ + typedef IteratorT const_iterator; + //! iterator type + typedef IteratorT iterator; + + iterator_range() : m_Begin( iterator() ), m_End( iterator() ), + singular( true ) + { } +/* +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + iterator_range( this_type r ) : + : m_Begin(r.begin()), m_End(r.end()) + { } + + this_type& operator=( this_type r ) + { + m_Begin = r.begin(); + m_End = r.end(); + return *this; + } +#endif +*/ + //! Constructor from a pair of iterators + template< class Iterator > + iterator_range( Iterator Begin, Iterator End ) : + m_Begin(Begin), m_End(End), singular(false) {} + + //! Constructor from a Range + template< class Range > + iterator_range( const Range& r ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), + singular(false) {} + + //! Constructor from a Range + template< class Range > + iterator_range( Range& r ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), + singular(false) {} + + //! Constructor from a Range + template< class Range > + iterator_range( const Range& r, iterator_range_detail::const_range_tag ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), + singular(false) {} + + //! Constructor from a Range + template< class Range > + iterator_range( Range& r, iterator_range_detail::range_tag ) : + m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), + singular(false) {} + + #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + this_type& operator=( const this_type& r ) + { + m_Begin = r.begin(); + m_End = r.end(); + // + // remark: this need not necessarily be true, but it does no harm + // + singular = r.singular; + return *this; + } + #endif + + template< class Iterator > + iterator_range& operator=( const iterator_range& r ) + { + m_Begin = r.begin(); + m_End = r.end(); + // + // remark: this need not necessarily be true, but it does no harm + // + singular = r.empty(); + return *this; + } + + template< class ForwardRange > + iterator_range& operator=( ForwardRange& r ) + { + m_Begin = impl::adl_begin( r ); + m_End = impl::adl_end( r ); + singular = false; + return *this; + } + + template< class ForwardRange > + iterator_range& operator=( const ForwardRange& r ) + { + m_Begin = impl::adl_begin( r ); + m_End = impl::adl_end( r ); + singular = false; + return *this; + } + + IteratorT begin() const + { + return m_Begin; + } + + IteratorT end() const + { + return m_End; + } + + size_type size() const + { + if( singular ) + return 0; + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) + return std::distance( m_Begin, m_End ); +#else + return std::distance( m_Begin, m_End ); +#endif + } + + bool empty() const + { + if( singular ) + return true; + + return m_Begin == m_End; + } + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + operator bool() const + { + return !empty(); + } +#else + typedef iterator (iterator_range::*unspecified_bool_type) () const; + operator unspecified_bool_type() const + { + return empty() ? 0: &iterator_range::end; + } +#endif + + bool equal( const iterator_range& r ) const + { + return singular == r.singular && m_Begin == r.m_Begin && m_End == r.m_End; + } + + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + bool operator==( const iterator_range& r ) const + { + return iterator_range_detail::equal( *this, r ); + } + + bool operator!=( const iterator_range& r ) const + { + return !operator==(r); + } + + bool operator<( const iterator_range& r ) const + { + return iterator_range_detail::less_than( *this, r ); + } + +#endif + + public: // convenience + reference front() const + { + BOOST_ASSERT( !empty() ); + return *m_Begin; + } + + reference back() const + { + BOOST_ASSERT( !empty() ); + IteratorT last( m_End ); + return *--last; + } + + reference operator[]( size_type sz ) const + { + //BOOST_STATIC_ASSERT( is_random_access ); + BOOST_ASSERT( sz < size() ); + return m_Begin[sz]; + } + + iterator_range& advance_begin( difference_type n ) + { + std::advance( m_Begin, n ); + return *this; + } + + iterator_range& advance_end( difference_type n ) + { + std::advance( m_End, n ); + return *this; + } + + private: + // begin and end iterators + IteratorT m_Begin; + IteratorT m_End; + bool singular; + }; + +// iterator range free-standing operators ---------------------------// + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#else + template< class Iterator > + inline bool empty( const iterator_range& r ) + { + // + // this will preserve the well-defined empty() even + // though 'r' is singular. + // + return r.empty(); + } +#endif + +#ifndef BOOST_OLD_IOSTREAMS + + //! iterator_range output operator + /*! + Output the range to an ostream. Elements are outputed + in a sequence without separators. + */ + template< typename IteratorT, typename Elem, typename Traits > + inline std::basic_ostream& operator<<( + std::basic_ostream& Os, + const iterator_range& r ) + { + std::copy( r.begin(), r.end(), + std::ostream_iterator< BOOST_DEDUCED_TYPENAME + iterator_value::type, + Elem, Traits>(Os) ); + return Os; + } + +#else + + //! iterator_range output operator + /*! + Output the range to an ostream. Elements are outputed + in a sequence without separators. + */ + template< typename IteratorT > + inline std::ostream& operator<<( + std::ostream& Os, + const iterator_range& r ) + { + std::copy( r.begin(), r.end(), std::ostream_iterator(Os)); + return Os; + } + +#endif + + ///////////////////////////////////////////////////////////////////// + // comparison operators + ///////////////////////////////////////////////////////////////////// + + template< class IteratorT, class ForwardRange > + inline bool operator==( const ForwardRange& l, + const iterator_range& r ) + { + return iterator_range_detail::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator!=( const ForwardRange& l, + const iterator_range& r ) + { + return !iterator_range_detail::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<( const ForwardRange& l, + const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#else + template< class Iterator1T, class Iterator2T > + inline bool operator==( const iterator_range& l, + const iterator_range& r ) + { + return iterator_range_detail::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator==( const iterator_range& l, + const ForwardRange& r ) + { + return iterator_range_detail::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool operator!=( const iterator_range& l, + const iterator_range& r ) + { + return !iterator_range_detail::equal( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator!=( const iterator_range& l, + const ForwardRange& r ) + { + return !iterator_range_detail::equal( l, r ); + } + + + template< class Iterator1T, class Iterator2T > + inline bool operator<( const iterator_range& l, + const iterator_range& r ) + { + return iterator_range_detail::less_than( l, r ); + } + + template< class IteratorT, class ForwardRange > + inline bool operator<( const iterator_range& l, + const ForwardRange& r ) + { + return iterator_range_detail::less_than( l, r ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +// iterator range utilities -----------------------------------------// + + //! iterator_range construct helper + /*! + Construct an \c iterator_range from a pair of iterators + + \param Begin A begin iterator + \param End An end iterator + \return iterator_range object + */ + template< typename IteratorT > + inline iterator_range< IteratorT > + make_iterator_range( IteratorT Begin, IteratorT End ) + { + return iterator_range( Begin, End ); + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + template< typename Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > + make_iterator_range( Range& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > + ( boost::begin( r ), boost::end( r ) ); + } + +#else + //! iterator_range construct helper + /*! + Construct an \c iterator_range from a \c Range containing the begin + and end iterators. + */ + template< class ForwardRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( ForwardRange& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + ( r, iterator_range_detail::range_tag() ); + } + + template< class ForwardRange > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > + make_iterator_range( const ForwardRange& r ) + { + return iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > + ( r, iterator_range_detail::const_range_tag() ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + namespace iterator_range_detail + { + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > + make_range_impl( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + if( advance_begin == 0 && advance_end == 0 ) + return make_iterator_range( r ); + + BOOST_DEDUCED_TYPENAME range_result_iterator::type + new_begin = boost::begin( r ), + new_end = boost::end( r ); + std::advance( new_begin, advance_begin ); + std::advance( new_end, advance_end ); + return make_iterator_range( new_begin, new_end ); + } + } + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > + make_iterator_range( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + +#else + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > + make_iterator_range( Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + + template< class Range > + inline iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > + make_iterator_range( const Range& r, + BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, + BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) + { + //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); + return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); + } + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + + //! copy a range into a sequence + /*! + Construct a new sequence of the specified type from the elements + in the given range + + \param Range An input range + \return New sequence + */ + template< typename SeqT, typename Range > + inline SeqT copy_range( const Range& r ) + { + return SeqT( boost::begin( r ), boost::end( r ) ); + } + +} // namespace 'boost' + +#undef BOOST_OLD_IOSTREAMS + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/lambda.hpp --- a/epoc32/include/stdapis/boost/mpl/lambda.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ - -#ifndef BOOST_MPL_LAMBDA_HPP_INCLUDED -#define BOOST_MPL_LAMBDA_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2001-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/lambda.hpp,v $ -// $Date: 2004/09/02 15:40:41 $ -// $Revision: 1.5 $ - -#include -#include -#include - -#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) -# include -#else -# include -# include -# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS -#endif - -#endif // BOOST_MPL_LAMBDA_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/lambda_fwd.hpp --- a/epoc32/include/stdapis/boost/mpl/lambda_fwd.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ - -#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED -#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2001-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/lambda_fwd.hpp,v $ -// $Date: 2004/09/02 15:40:41 $ -// $Revision: 1.7 $ - -#include -#include -#include - -#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) - -# include -# include -# include - -namespace boost { namespace mpl { - -template< - typename T = na - , typename Tag = void_ - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM( - typename Arity = int_< aux::template_arity::value > - ) - > -struct lambda; - -}} - -#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT - -# include - -namespace boost { namespace mpl { - -template< - typename T = na - , typename Tag = void_ - , typename Protect = true_ - > -struct lambda; - -}} - -#endif - -#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/limits/arity.hpp --- a/epoc32/include/stdapis/boost/mpl/limits/arity.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - -#ifndef BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED -#define BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/limits/arity.hpp,v $ -// $Date: 2004/09/02 15:40:57 $ -// $Revision: 1.4 $ - -#if !defined(BOOST_MPL_LIMIT_METAFUNCTION_ARITY) -# define BOOST_MPL_LIMIT_METAFUNCTION_ARITY 5 -#endif - -#endif // BOOST_MPL_LIMITS_ARITY_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/O1_size.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/O1_size.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/O1_size.hpp,v $ +// $Date: 2004/09/04 01:33:47 $ +// $Revision: 1.5 $ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template<> +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : Vector::size + { + }; +}; + +#else + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< long N > +struct O1_size_impl< aux::vector_tag > +{ + template< typename Vector > struct apply + : mpl::long_ + { + }; +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/item.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/item.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,103 @@ + +#ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED +#define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/item.hpp,v $ +// $Date: 2005/05/15 00:39:04 $ +// $Revision: 1.8 $ + +#include +#include +#include +#include +#include +#include + +namespace boost { namespace mpl { + +#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) + +template< + typename T + , typename Base + , int at_front = 0 + > +struct v_item + : Base +{ + typedef typename Base::upper_bound_ index_; + typedef typename next::type upper_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler + // breaks if using declaration comes _before_ the new overload + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename T + , typename Base + > +struct v_item + : Base +{ + typedef typename prior::type index_; + typedef index_ lower_bound_; + typedef typename next::type size; + typedef Base base; + typedef v_item type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +// "erasure" item +template< + typename Base + , int at_front + > +struct v_mask + : Base +{ + typedef typename prior::type index_; + typedef index_ upper_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +template< + typename Base + > +struct v_mask + : Base +{ + typedef typename Base::lower_bound_ index_; + typedef typename next::type lower_bound_; + typedef typename prior::type size; + typedef Base base; + typedef v_mask type; + + static aux::type_wrapper item_(index_); + using Base::item_; +}; + +#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES + +}} + +#endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/pop_front.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/pop_front.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,27 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP +# define BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP +# +# include +# include +# +# /* BOOST_PP_SEQ_POP_FRONT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_TAIL(seq) +# else +# define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_POP_FRONT_I(seq) +# define BOOST_PP_SEQ_POP_FRONT_I(seq) BOOST_PP_SEQ_TAIL(seq) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/preprocessed/plain/list10.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/preprocessed/plain/list10.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/list/list10.hpp,v $ +// $Date: 2004/09/02 15:40:58 $ +// $Revision: 1.6 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list10.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(1, 10, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/preprocessed/plain/list20.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/preprocessed/plain/list20.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ + +#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED +#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/list/list20.hpp,v $ +// $Date: 2004/09/02 15:40:58 $ +// $Revision: 1.6 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER list20.hpp +# include + +#else + +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(11, 20, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/push_back.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/push_back.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,19 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP +# define BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP +# +# /* BOOST_PP_SEQ_PUSH_BACK */ +# +# define BOOST_PP_SEQ_PUSH_BACK(seq, elem) seq(elem) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/push_front.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/push_front.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,19 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP +# define BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP +# +# /* BOOST_PP_SEQ_PUSH_FRONT */ +# +# define BOOST_PP_SEQ_PUSH_FRONT(seq, elem) (elem)seq +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/size.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/size.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,123 @@ +// Boost.Range library +// +// Copyright Thorsten Ottosen 2003-2004. Use, modification and +// distribution is subject to the Boost Software License, Version +// 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// For more information, see http://www.boost.org/libs/range/ +// + +#ifndef BOOST_RANGE_SIZE_HPP +#define BOOST_RANGE_SIZE_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1200) +# pragma once +#endif + +#include + +#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING +#include +#else + +#include +#include +#include +#include +#include + +namespace boost +{ + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +namespace range_detail +{ +#endif + ////////////////////////////////////////////////////////////////////// + // primary template + ////////////////////////////////////////////////////////////////////// + + template< typename C > + inline BOOST_DEDUCED_TYPENAME C::size_type + boost_range_size( const C& c ) + { + return c.size(); + } + + ////////////////////////////////////////////////////////////////////// + // pair + ////////////////////////////////////////////////////////////////////// + + template< typename Iterator > + inline std::size_t boost_range_size( const std::pair& p ) + { + return std::distance( p.first, p.second ); + } + + ////////////////////////////////////////////////////////////////////// + // array + ////////////////////////////////////////////////////////////////////// + + template< typename T, std::size_t sz > + inline std::size_t boost_range_size( const T (&array)[sz] ) + { + return range_detail::array_size( array ); + } + + template< typename T, std::size_t sz > + inline std::size_t boost_range_size( T (&array)[sz] ) + { + return boost::range_detail::array_size( array ); + } + + ////////////////////////////////////////////////////////////////////// + // string + ////////////////////////////////////////////////////////////////////// + + inline std::size_t boost_range_size( const char* const& s ) + { + return boost::range_detail::str_size( s ); + } + + inline std::size_t boost_range_size( const wchar_t* const& s ) + { + return boost::range_detail::str_size( s ); + } + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +} // namespace 'range_detail' +#endif + +template< class T > +inline BOOST_DEDUCED_TYPENAME range_size::type size( const T& r ) +{ +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + using namespace range_detail; +#endif + return boost_range_size( r ); +} + + +#if BOOST_WORKAROUND(__MWERKS__, <= 0x3003 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) +// BCB and CW are not able to overload pointer when class overloads are also available. +inline range_size::type size( const char* r ) { + return range_detail::str_size( r ); +} +inline range_size::type size( char* r ) { + return range_detail::str_size( r ); +} +inline range_size::type size( const wchar_t* r ) { + return range_detail::str_size( r ); +} +inline range_size::type size( wchar_t* r ) { + return range_detail::str_size( r ); +} +#endif + + +} // namespace 'boost' + +#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/aux_/tag.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/list/aux_/tag.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,92 @@ +/* Copyright 2003-2005 Joaquín M López Muñoz. + * Distributed under the Boost Software License, Version 1.0. + * (See accompanying file LICENSE_1_0.txt or copy at + * http://www.boost.org/LICENSE_1_0.txt) + * + * See http://www.boost.org/libs/multi_index for library home page. + */ + +#ifndef BOOST_MULTI_INDEX_TAG_HPP +#define BOOST_MULTI_INDEX_TAG_HPP + +#if defined(_MSC_VER)&&(_MSC_VER>=1200) +#pragma once +#endif + +#include /* keep it first to prevent nasty warns in MSVC */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* A wrapper of mpl::vector used to hide MPL from the user. + * tag contains types used as tag names for indices in get() functions. + */ + +/* This user_definable macro limits the number of elements of a tag; + * useful for shortening resulting symbol names (MSVC++ 6.0, for instance, + * has problems coping with very long symbol names.) + */ + +#if !defined(BOOST_MULTI_INDEX_LIMIT_TAG_SIZE) +#if defined(BOOST_MSVC)&&(BOOST_MSVC<1300) +#define BOOST_MULTI_INDEX_LIMIT_TAG_SIZE 3 +#else +#define BOOST_MULTI_INDEX_LIMIT_TAG_SIZE BOOST_MPL_LIMIT_VECTOR_SIZE +#endif +#endif + +#if BOOST_MULTI_INDEX_LIMIT_TAG_SIZE +struct is_tag +{ + BOOST_STATIC_CONSTANT(bool,value=(is_base_and_derived::value)); +}; + +} /* namespace multi_index::detail */ + +template< + BOOST_PP_ENUM_BINARY_PARAMS( + BOOST_MULTI_INDEX_TAG_SIZE, + typename T, + =mpl::na BOOST_PP_INTERCEPT) +> +struct tag:private detail::tag_marker +{ + /* The mpl::transform pass produces shorter symbols (without + * trailing mpl::na's.) + */ + + typedef typename mpl::transform< + mpl::vector, + mpl::identity + >::type type; + + BOOST_STATIC_ASSERT(detail::no_duplicate_tags::value); +}; + +} /* namespace multi_index */ + +} /* namespace boost */ + +#undef BOOST_MULTI_INDEX_TAG_SIZE + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/list10.hpp --- a/epoc32/include/stdapis/boost/mpl/list/list10.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - -#ifndef BOOST_MPL_LIST_LIST10_HPP_INCLUDED -#define BOOST_MPL_LIST_LIST10_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/list/list10.hpp,v $ -// $Date: 2004/09/02 15:40:58 $ -// $Revision: 1.6 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER list10.hpp -# include - -#else - -# include - -namespace boost { namespace mpl { - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, 10, )) -# include BOOST_PP_ITERATE() - -}} - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS - -#endif // BOOST_MPL_LIST_LIST10_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/list/list20.hpp --- a/epoc32/include/stdapis/boost/mpl/list/list20.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - -#ifndef BOOST_MPL_LIST_LIST20_HPP_INCLUDED -#define BOOST_MPL_LIST_LIST20_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/list/list20.hpp,v $ -// $Date: 2004/09/02 15:40:58 $ -// $Revision: 1.6 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER list20.hpp -# include - -#else - -# include - -namespace boost { namespace mpl { - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(11, 20, )) -# include BOOST_PP_ITERATE() - -}} - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS - -#endif // BOOST_MPL_LIST_LIST20_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/logical.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/logical.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_HPP +# define BOOST_PREPROCESSOR_LOGICAL_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/minus.hpp --- a/epoc32/include/stdapis/boost/mpl/minus.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - -#ifndef BOOST_MPL_MINUS_HPP_INCLUDED -#define BOOST_MPL_MINUS_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/minus.hpp,v $ -// $Date: 2004/09/02 15:40:41 $ -// $Revision: 1.3 $ - -#define AUX778076_OP_NAME minus -#define AUX778076_OP_TOKEN - -#include - -#endif // BOOST_MPL_MINUS_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/next_prior.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/next_prior.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,51 @@ +// Boost next_prior.hpp header file ---------------------------------------// + +// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/utility for documentation. + +// Revision History +// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) + +#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED +#define BOOST_NEXT_PRIOR_HPP_INCLUDED + +#include + +namespace boost { + +// Helper functions for classes like bidirectional iterators not supporting +// operator+ and operator- +// +// Usage: +// const std::list::iterator p = get_some_iterator(); +// const std::list::iterator prev = boost::prior(p); +// const std::list::iterator next = boost::next(prev, 2); + +// Contributed by Dave Abrahams + +template +inline T next(T x) { return ++x; } + +template +inline T next(T x, Distance n) +{ + std::advance(x, n); + return x; +} + +template +inline T prior(T x) { return --x; } + +template +inline T prior(T x, Distance n) +{ + std::advance(x, -n); + return x; +} + +} // namespace boost + +#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/not.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/not.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP +# define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP +# +# include +# include +# include +# +# /* BOOST_PP_NOT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) +# else +# define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) +# define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/placeholders.hpp --- a/epoc32/include/stdapis/boost/mpl/placeholders.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,100 +0,0 @@ - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED -#define BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2001-2004 -// Copyright Peter Dimov 2001-2003 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/placeholders.hpp,v $ -// $Date: 2004/09/16 14:08:46 $ -// $Revision: 1.4 $ - - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include - -# if !defined(BOOST_MPL_CFG_NO_ADL_BARRIER_NAMESPACE) -# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) \ - using ::BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::type; \ - /**/ -# else -# define BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(type) /**/ -# endif - -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER placeholders.hpp -# include - -#else - -# include -# include -# include -# include - -// watch out for GNU gettext users, who #define _(x) -#if !defined(_) || defined(BOOST_MPL_CFG_NO_UNNAMED_PLACEHOLDER_SUPPORT) -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN -typedef arg<-1> _; -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE - -namespace boost { namespace mpl { - -BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(_) - -namespace placeholders { -using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::_; -} - -}} -#endif - -/// agurt, 17/mar/02: one more placeholder for the last 'apply#' -/// specialization -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY + 1, )) -#include BOOST_PP_ITERATE() - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_PLACEHOLDERS_HPP_INCLUDED - -///// iteration - -#else -#define i_ BOOST_PP_FRAME_ITERATION(1) - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN - -typedef arg BOOST_PP_CAT(_,i_); - -BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE - -namespace boost { namespace mpl { - -BOOST_MPL_AUX_ARG_ADL_BARRIER_DECL(BOOST_PP_CAT(_,i_)) - -namespace placeholders { -using BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE::BOOST_PP_CAT(_,i_); -} - -}} - -#undef i_ -#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/plus.hpp --- a/epoc32/include/stdapis/boost/mpl/plus.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - -#ifndef BOOST_MPL_PLUS_HPP_INCLUDED -#define BOOST_MPL_PLUS_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/plus.hpp,v $ -// $Date: 2004/09/02 15:40:42 $ -// $Revision: 1.4 $ - -#define AUX778076_OP_NAME plus -#define AUX778076_OP_TOKEN + -#include - -#endif // BOOST_MPL_PLUS_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/quote.hpp --- a/epoc32/include/stdapis/boost/mpl/quote.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ - -#if !defined(BOOST_PP_IS_ITERATING) - -///// header body - -#ifndef BOOST_MPL_QUOTE_HPP_INCLUDED -#define BOOST_MPL_QUOTE_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/quote.hpp,v $ -// $Date: 2006/05/03 03:27:58 $ -// $Revision: 1.5.14.2 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include -#endif - -#include - -#if defined(BOOST_MPL_CFG_NO_TEMPLATE_TEMPLATE_PARAMETERS) -# define BOOST_MPL_CFG_NO_QUOTE_TEMPLATE -#endif - -#if !defined(BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS) \ - && defined(BOOST_MPL_CFG_NO_HAS_XXX) -# define BOOST_MPL_CFG_NO_IMPLICIT_METAFUNCTIONS -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp -# include - -#else - -# include -# include -# include -# include - -# include -# include - -#if !defined(BOOST_MPL_CFG_NO_QUOTE_TEMPLATE) - -namespace boost { namespace mpl { - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< typename T, bool has_type_ > -struct quote_impl -// GCC has a problem with metafunction forwarding when T is a -// specialization of a template called 'type'. -# if BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4)) \ - && BOOST_WORKAROUND(__GNUC_MINOR__, BOOST_TESTED_AT(0)) \ - && BOOST_WORKAROUND(__GNUC_PATCHLEVEL__, BOOST_TESTED_AT(2)) -{ - typedef typename T::type type; -}; -# else - : T -{ -}; -# endif - -template< typename T > -struct quote_impl -{ - typedef T type; -}; - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -template< bool > struct quote_impl -{ - template< typename T > struct result_ - : T - { - }; -}; - -template<> struct quote_impl -{ - template< typename T > struct result_ - { - typedef T type; - }; -}; - -#endif - -#define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(1, BOOST_MPL_LIMIT_METAFUNCTION_ARITY, )) -#include BOOST_PP_ITERATE() - -}} - -#endif // BOOST_MPL_CFG_NO_QUOTE_TEMPLATE - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_QUOTE_HPP_INCLUDED - -///// iteration - -#else -#define i_ BOOST_PP_FRAME_ITERATION(1) - -template< - template< BOOST_MPL_PP_PARAMS(i_, typename P) > class F - , typename Tag = void_ - > -struct BOOST_PP_CAT(quote,i_) -{ - template< BOOST_MPL_PP_PARAMS(i_, typename U) > struct apply -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - : quote_impl< - F< BOOST_MPL_PP_PARAMS(i_, U) > - , aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value - > -#else - : quote_impl< aux::has_type< F< BOOST_MPL_PP_PARAMS(i_, U) > >::value > - ::template result_< F< BOOST_MPL_PP_PARAMS(i_, U) > > -#endif - { - }; -}; - -#undef i_ -#endif // BOOST_PP_IS_ITERATING diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/at_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/set/aux_/at_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/at_impl.hpp,v $ -// $Date: 2004/09/02 15:41:02 $ -// $Revision: 1.2 $ - -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -template<> -struct at_impl< aux::set_tag > -{ - template< typename Set, typename T > struct apply - { - typedef typename if_< - has_key_impl::apply - , T - , void_ - >::type type; - }; -}; - -}} - -#endif // BOOST_MPL_SET_AUX_AT_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/begin_end_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/set/aux_/begin_end_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// Copyright David Abrahams 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/begin_end_impl.hpp,v $ -// $Date: 2004/09/02 15:41:02 $ -// $Revision: 1.3 $ - -#include -#include - -namespace boost { namespace mpl { - -template<> -struct begin_impl< aux::set_tag > -{ - template< typename Set > struct apply - { - typedef s_iter type; - }; -}; - -template<> -struct end_impl< aux::set_tag > -{ - template< typename Set > struct apply - { - typedef s_iter< Set,set0<> > type; - }; -}; - -}} - -#endif // BOOST_MPL_SET_AUX_BEGIN_END_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/clear_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/set/aux_/clear_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// Copyright David Abrahams 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/clear_impl.hpp,v $ -// $Date: 2004/09/02 15:41:02 $ -// $Revision: 1.2 $ - -#include -#include -#include - -namespace boost { namespace mpl { - -template<> -struct clear_impl< aux::set_tag > -{ - template< typename Set > struct apply - { - typedef set0<> type; - }; -}; - -}} - -#endif // BOOST_MPL_SET_AUX_CLEAR_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/empty_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/set/aux_/empty_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/empty_impl.hpp,v $ -// $Date: 2004/09/02 15:41:02 $ -// $Revision: 1.2 $ - -#include -#include -#include - -namespace boost { namespace mpl { - -template<> -struct empty_impl< aux::set_tag > -{ - template< typename Set > struct apply - : not_< typename Set::size > - { - }; -}; - -}} - -#endif // BOOST_MPL_SET_AUX_EMPTY_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/has_key_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/set/aux_/has_key_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// Copyright David Abrahams 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/has_key_impl.hpp,v $ -// $Date: 2004/10/13 18:23:37 $ -// $Revision: 1.7 $ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -template<> -struct has_key_impl< aux::set_tag > -{ - template< typename Set, typename T > struct apply -#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \ - || BOOST_WORKAROUND(__EDG_VERSION__, <= 245) - { - BOOST_STATIC_CONSTANT(bool, value = - ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( - Set - , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) - ) ) == sizeof(aux::no_tag) ) - ); - - typedef bool_ type; - -#else // ISO98 C++ - : bool_< - ( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED( - Set - , BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper*, 0) - ) ) == sizeof(aux::no_tag) ) - > - { -#endif - }; -}; - -}} - -#endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/set0.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/set/aux_/set0.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ + +#ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED +#define BOOST_MPL_SET_SET0_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2003-2004 +// Copyright David Abrahams 2003-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/set/set0.hpp,v $ +// $Date: 2004/09/02 15:41:02 $ +// $Revision: 1.5 $ + +#include +#include +//#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_MPL_SET_SET0_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/aux_/size_impl.hpp --- a/epoc32/include/stdapis/boost/mpl/set/aux_/size_impl.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - -#ifndef BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED -#define BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/aux_/size_impl.hpp,v $ -// $Date: 2004/09/02 15:41:02 $ -// $Revision: 1.2 $ - -#include -#include - -namespace boost { namespace mpl { - -template<> -struct size_impl< aux::set_tag > -{ - template< typename Set > struct apply - : Set::size - { - }; -}; - -}} - -#endif // BOOST_MPL_SET_AUX_SIZE_IMPL_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/set/set0.hpp --- a/epoc32/include/stdapis/boost/mpl/set/set0.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - -#ifndef BOOST_MPL_SET_SET0_HPP_INCLUDED -#define BOOST_MPL_SET_SET0_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2003-2004 -// Copyright David Abrahams 2003-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/set/set0.hpp,v $ -// $Date: 2004/09/02 15:41:02 $ -// $Revision: 1.5 $ - -#include -#include -//#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // BOOST_MPL_SET_SET0_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/times.hpp --- a/epoc32/include/stdapis/boost/mpl/times.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ - -#ifndef BOOST_MPL_TIMES_HPP_INCLUDED -#define BOOST_MPL_TIMES_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/times.hpp,v $ -// $Date: 2004/09/02 15:40:42 $ -// $Revision: 1.2 $ - -#define AUX778076_OP_NAME times -#define AUX778076_OP_TOKEN * -#include - -#endif // BOOST_MPL_TIMES_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/transform.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/transform.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP +# define BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_TRANSFORM */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) +# define BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_IM(s, BOOST_PP_TUPLE_REM_3 state, elem) +# define BOOST_PP_SEQ_TRANSFORM_O_IM(s, im, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, im, elem) +# else +# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, state), BOOST_PP_TUPLE_ELEM(3, 1, state), BOOST_PP_TUPLE_ELEM(3, 2, state), elem) +# endif +# +# define BOOST_PP_SEQ_TRANSFORM_O_I(s, op, data, res, elem) (op, data, res (op(s, data, elem))) +# +# /* BOOST_PP_SEQ_TRANSFORM_S */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) +# define BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector.hpp --- a/epoc32/include/stdapis/boost/mpl/vector.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_HPP_INCLUDED -#define BOOST_MPL_VECTOR_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector.hpp,v $ -// $Date: 2004/11/28 01:58:27 $ -// $Revision: 1.8 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -# include -# include - -# include -# include -# include - -#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) -# define AUX778076_VECTOR_HEADER \ - BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE).hpp \ - /**/ -#else -# define AUX778076_VECTOR_HEADER \ - BOOST_PP_CAT(vector, BOOST_MPL_LIMIT_VECTOR_SIZE)##.hpp \ - /**/ -#endif - -# include BOOST_PP_STRINGIZE(boost/mpl/vector/AUX778076_VECTOR_HEADER) -# undef AUX778076_VECTOR_HEADER -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER vector.hpp -# include - -#else - -# include - -# define AUX778076_SEQUENCE_NAME vector -# define AUX778076_SEQUENCE_LIMIT BOOST_MPL_LIMIT_VECTOR_SIZE -# include - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS -#endif // BOOST_MPL_VECTOR_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/O1_size.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/aux_/O1_size.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED -#define BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/O1_size.hpp,v $ -// $Date: 2004/09/04 01:33:47 $ -// $Revision: 1.5 $ - -#include -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) - -template<> -struct O1_size_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : Vector::size - { - }; -}; - -#else - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< long N > -struct O1_size_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : mpl::long_ - { - }; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES - -}} - -#endif // BOOST_MPL_VECTOR_AUX_O1_SIZE_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/begin_end.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/aux_/begin_end.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED -#define BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/begin_end.hpp,v $ -// $Date: 2004/09/02 15:41:19 $ -// $Revision: 1.4 $ - -#include - -#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) - -# include -# include -# include - -namespace boost { namespace mpl { - -template<> -struct begin_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef v_iter type; - }; -}; - -template<> -struct end_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef v_iter type; - }; -}; - -}} - -#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES - -#endif // BOOST_MPL_VECTOR_AUX_BEGIN_END_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/clear.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/aux_/clear.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED -#define BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/clear.hpp,v $ -// $Date: 2004/09/02 15:41:19 $ -// $Revision: 1.4 $ - -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) - -template<> -struct clear_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef vector0<> type; - }; -}; - -#else - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< long N > -struct clear_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef vector0<> type; - }; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES - -}} - -#endif // BOOST_MPL_VECTOR_AUX_CLEAR_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/front.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/aux_/front.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ - -#ifndef BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED -#define BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/front.hpp,v $ -// $Date: 2004/09/02 15:41:19 $ -// $Revision: 1.4 $ - -#include -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) - -template<> -struct front_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - : v_at - { - }; -}; - -#else - -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - -template< BOOST_MPL_AUX_NTTP_DECL(long, n_) > -struct front_impl< aux::vector_tag > -{ - template< typename Vector > struct apply - { - typedef typename Vector::item0 type; - }; -}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES - -}} - -#endif // BOOST_MPL_LIST_AUX_FRONT_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/include_preprocessed.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/aux_/include_preprocessed.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ - -// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION - -// Copyright Aleksey Gurtovoy 2000-2006 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/include_preprocessed.hpp,v $ -// $Date: 2006/11/09 01:21:03 $ -// $Revision: 1.4.8.1 $ - -#include -#include -#include -#include - -#include -#include - -#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) -# define AUX778076_INCLUDE_DIR typeof_based -#elif defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \ - || defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC) -# define AUX778076_INCLUDE_DIR no_ctps -#else -# define AUX778076_INCLUDE_DIR plain -#endif - -#if !defined(BOOST_NEEDS_TOKEN_PASTING_OP_FOR_TOKENS_JUXTAPOSING) -# define AUX778076_HEADER \ - AUX778076_INCLUDE_DIR/BOOST_MPL_PREPROCESSED_HEADER \ -/**/ -#else -# define AUX778076_HEADER \ - BOOST_PP_CAT(AUX778076_INCLUDE_DIR,/)##BOOST_MPL_PREPROCESSED_HEADER \ -/**/ -#endif - - -#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(700)) -# define AUX778076_INCLUDE_STRING BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) -# include AUX778076_INCLUDE_STRING -# undef AUX778076_INCLUDE_STRING -#else -# include BOOST_PP_STRINGIZE(boost/mpl/vector/aux_/preprocessed/AUX778076_HEADER) -#endif - -# undef AUX778076_HEADER -# undef AUX778076_INCLUDE_DIR - -#undef BOOST_MPL_PREPROCESSED_HEADER diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/item.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/aux_/item.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED -#define BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/aux_/item.hpp,v $ -// $Date: 2005/05/15 00:39:04 $ -// $Revision: 1.8 $ - -#include -#include -#include -#include -#include -#include - -namespace boost { namespace mpl { - -#if defined(BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES) - -template< - typename T - , typename Base - , int at_front = 0 - > -struct v_item - : Base -{ - typedef typename Base::upper_bound_ index_; - typedef typename next::type upper_bound_; - typedef typename next::type size; - typedef Base base; - typedef v_item type; - - // agurt 10/sep/04: MWCW <= 9.3 workaround here and below; the compiler - // breaks if using declaration comes _before_ the new overload - static aux::type_wrapper item_(index_); - using Base::item_; -}; - -template< - typename T - , typename Base - > -struct v_item - : Base -{ - typedef typename prior::type index_; - typedef index_ lower_bound_; - typedef typename next::type size; - typedef Base base; - typedef v_item type; - - static aux::type_wrapper item_(index_); - using Base::item_; -}; - -// "erasure" item -template< - typename Base - , int at_front - > -struct v_mask - : Base -{ - typedef typename prior::type index_; - typedef index_ upper_bound_; - typedef typename prior::type size; - typedef Base base; - typedef v_mask type; - - static aux::type_wrapper item_(index_); - using Base::item_; -}; - -template< - typename Base - > -struct v_mask - : Base -{ - typedef typename Base::lower_bound_ index_; - typedef typename next::type lower_bound_; - typedef typename prior::type size; - typedef Base base; - typedef v_mask type; - - static aux::type_wrapper item_(index_); - using Base::item_; -}; - -#endif // BOOST_MPL_CFG_TYPEOF_BASED_SEQUENCES - -}} - -#endif // BOOST_MPL_VECTOR_AUX_ITEM_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/pop_back.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/vector/aux_/pop_back.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP +# define BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_POP_BACK */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) +# else +# define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_POP_BACK_I(seq) +# define BOOST_PP_SEQ_POP_BACK_I(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/vector10.hpp,v $ +// $Date: 2004/09/02 15:41:19 $ +// $Revision: 1.6 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(0, 10, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,45 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/vector20.hpp,v $ +// $Date: 2004/09/02 15:41:19 $ +// $Revision: 1.6 $ + +#if !defined(BOOST_MPL_PREPROCESSING_MODE) +# include +#endif + +#include + +#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + +# define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp +# include + +#else + +# include +# include +# include + +namespace boost { namespace mpl { + +# define BOOST_PP_ITERATION_PARAMS_1 \ + (3,(11, 20, )) +# include BOOST_PP_ITERATE() + +}} + +#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS + +#endif // BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/aux_/vector0.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/mpl/vector/aux_/vector0.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,34 @@ + +#ifndef BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED +#define BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED + +// Copyright Aleksey Gurtovoy 2000-2004 +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/libs/mpl for documentation. + +// $Source: /cvsroot/boost/boost/boost/mpl/vector/vector0.hpp,v $ +// $Date: 2004/09/02 15:41:19 $ +// $Revision: 1.4 $ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/vector0.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/vector0.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED -#define BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/vector0.hpp,v $ -// $Date: 2004/09/02 15:41:19 $ -// $Revision: 1.4 $ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // BOOST_MPL_VECTOR_VECTOR0_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/vector10.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/vector10.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED -#define BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/vector10.hpp,v $ -// $Date: 2004/09/02 15:41:19 $ -// $Revision: 1.6 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp -# include - -#else - -# include -# include -# include - -namespace boost { namespace mpl { - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(0, 10, )) -# include BOOST_PP_ITERATE() - -}} - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS - -#endif // BOOST_MPL_VECTOR_VECTOR10_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/mpl/vector/vector20.hpp --- a/epoc32/include/stdapis/boost/mpl/vector/vector20.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ - -#ifndef BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED -#define BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED - -// Copyright Aleksey Gurtovoy 2000-2004 -// -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/libs/mpl for documentation. - -// $Source: /cvsroot/boost/boost/boost/mpl/vector/vector20.hpp,v $ -// $Date: 2004/09/02 15:41:19 $ -// $Revision: 1.6 $ - -#if !defined(BOOST_MPL_PREPROCESSING_MODE) -# include -#endif - -#include - -#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \ - && !defined(BOOST_MPL_PREPROCESSING_MODE) - -# define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp -# include - -#else - -# include -# include -# include - -namespace boost { namespace mpl { - -# define BOOST_PP_ITERATION_PARAMS_1 \ - (3,(11, 20, )) -# include BOOST_PP_ITERATE() - -}} - -#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS - -#endif // BOOST_MPL_VECTOR_VECTOR20_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/multi_array/algorithm.hpp --- a/epoc32/include/stdapis/boost/multi_array/algorithm.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -#ifndef BOOST_ALGORITHM_RG071801_HPP -#define BOOST_ALGORITHM_RG071801_HPP - -// -// -// Copyright (c) 1994 -// Hewlett-Packard Company -// -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. Hewlett-Packard Company makes no -// representations about the suitability of this software for any -// purpose. It is provided "as is" without express or implied warranty. -// -// -// Copyright (c) 1996-1998 -// Silicon Graphics Computer Systems, Inc. -// -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appear in all copies and -// that both that copyright notice and this permission notice appear -// in supporting documentation. Silicon Graphics makes no -// representations about the suitability of this software for any -// purpose. It is provided "as is" without express or implied warranty. -// - -// Copyright 2002 The Trustees of Indiana University. - -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Boost.MultiArray Library -// Authors: Ronald Garcia -// Jeremy Siek -// Andrew Lumsdaine -// See http://www.boost.org/libs/multi_array for documentation. - - -#include "boost/iterator.hpp" - -namespace boost { -namespace detail { -namespace multi_array { -//-------------------------------------------------- -// copy_n (not part of the C++ standard) -#if 1 - -template -OutputIter copy_n(InputIter first, Size count, - OutputIter result) { - for ( ; count > 0; --count) { - *result = *first; - ++first; - ++result; - } - return result; -} -#else // !1 - -template -OutputIter copy_n__(InputIter first, Size count, - OutputIter result, - std::input_iterator_tag) { - for ( ; count > 0; --count) { - *result = *first; - ++first; - ++result; - } - return result; -} - -template -inline OutputIter -copy_n__(RAIter first, Size count, - OutputIter result, - std::random_access_iterator_tag) { - RAIter last = first + count; - return std::copy(first, last, result); -} - -template -inline OutputIter -copy_n__(InputIter first, Size count, OutputIter result) { - typedef typename std::iterator_traits::iterator_category cat; - return copy_n__(first, count, result, cat()); -} - -template -inline OutputIter -copy_n(InputIter first, Size count, OutputIter result) { - return copy_n__(first, count, result); -} - -#endif // 1 -} // namespace multi_array -} // namespace detail -} // namespace boost - -#endif // BOOST_ALGORITHM_RG071801_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/multi_array/base.hpp --- a/epoc32/include/stdapis/boost/multi_array/base.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,479 +0,0 @@ -// Copyright 2002 The Trustees of Indiana University. - -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Boost.MultiArray Library -// Authors: Ronald Garcia -// Jeremy Siek -// Andrew Lumsdaine -// See http://www.boost.org/libs/multi_array for documentation. - -#ifndef BASE_RG071801_HPP -#define BASE_RG071801_HPP - -// -// base.hpp - some implementation base classes for from which -// functionality is acquired -// - -#include "boost/multi_array/extent_range.hpp" -#include "boost/multi_array/extent_gen.hpp" -#include "boost/multi_array/index_range.hpp" -#include "boost/multi_array/index_gen.hpp" -#include "boost/multi_array/storage_order.hpp" -#include "boost/multi_array/types.hpp" -#include "boost/config.hpp" -#include "boost/multi_array/concept_checks.hpp" //for ignore_unused_... -#include "boost/mpl/eval_if.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/size_t.hpp" -#include "boost/mpl/aux_/msvc_eti_base.hpp" -#include "boost/iterator/reverse_iterator.hpp" -#include "boost/static_assert.hpp" -#include "boost/type.hpp" -#include "boost/assert.hpp" -#include -#include - -namespace boost { - -///////////////////////////////////////////////////////////////////////// -// class declarations -///////////////////////////////////////////////////////////////////////// - -template > -class multi_array; - -// This is a public interface for use by end users! -namespace multi_array_types { - typedef boost::detail::multi_array::size_type size_type; - typedef std::ptrdiff_t difference_type; - typedef boost::detail::multi_array::index index; - typedef detail::multi_array::index_range index_range; - typedef detail::multi_array::extent_range extent_range; - typedef detail::multi_array::index_gen<0,0> index_gen; - typedef detail::multi_array::extent_gen<0> extent_gen; -} - - -// boost::extents and boost::indices are now a part of the public -// interface. That way users don't necessarily have to create their -// own objects. On the other hand, one may not want the overhead of -// object creation in small-memory environments. Thus, the objects -// can be left undefined by defining BOOST_MULTI_ARRAY_NO_GENERATORS -// before loading multi_array.hpp. -#if !BOOST_MULTI_ARRAY_NO_GENERATORS -namespace { - multi_array_types::extent_gen extents; - multi_array_types::index_gen indices; -} -#endif // BOOST_MULTI_ARRAY_NO_GENERATORS - -namespace detail { -namespace multi_array { - -template -class sub_array; - -template -class const_sub_array; - -template -class array_iterator; - -template -class const_multi_array_view; - -template -class multi_array_view; - -///////////////////////////////////////////////////////////////////////// -// class interfaces -///////////////////////////////////////////////////////////////////////// - -class multi_array_base { -public: - typedef multi_array_types::size_type size_type; - typedef multi_array_types::difference_type difference_type; - typedef multi_array_types::index index; - typedef multi_array_types::index_range index_range; - typedef multi_array_types::extent_range extent_range; - typedef multi_array_types::index_gen index_gen; - typedef multi_array_types::extent_gen extent_gen; -}; - -// -// value_accessor_n -// contains the routines for accessing elements from -// N-dimensional views. -// -template -class value_accessor_n : public multi_array_base { - typedef multi_array_base super_type; -public: - typedef typename super_type::index index; - - // - // public typedefs used by classes that inherit from this base - // - typedef T element; - typedef boost::multi_array value_type; - typedef sub_array reference; - typedef const_sub_array const_reference; - -protected: - // used by array operator[] and iterators to get reference types. - template - Reference access(boost::type,index idx,TPtr base, - const size_type* extents, - const index* strides, - const index* index_bases) const { - - BOOST_ASSERT(idx - index_bases[0] >= 0); - BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]); - // return a sub_array proxy object - TPtr newbase = base + idx * strides[0]; - return Reference(newbase,extents+1,strides+1,index_bases+1); - - } - - value_accessor_n() { } - ~value_accessor_n() { } -}; - - - -// -// value_accessor_one -// contains the routines for accessing reference elements from -// 1-dimensional views. -// -template -class value_accessor_one : public multi_array_base { - typedef multi_array_base super_type; -public: - typedef typename super_type::index index; - // - // public typedefs for use by classes that inherit it. - // - typedef T element; - typedef T value_type; - typedef T& reference; - typedef T const& const_reference; - -protected: - // used by array operator[] and iterators to get reference types. - template - Reference access(boost::type,index idx,TPtr base, - const size_type* extents, - const index* strides, - const index* index_bases) const { - - ignore_unused_variable_warning(index_bases); - ignore_unused_variable_warning(extents); - BOOST_ASSERT(idx - index_bases[0] >= 0); - BOOST_ASSERT(size_type(idx - index_bases[0]) < extents[0]); - return *(base + idx * strides[0]); - } - - value_accessor_one() { } - ~value_accessor_one() { } -}; - - -///////////////////////////////////////////////////////////////////////// -// choose value accessor begins -// - -template -struct choose_value_accessor_n { - typedef value_accessor_n type; -}; - -template -struct choose_value_accessor_one { - typedef value_accessor_one type; -}; - -template -struct value_accessor_generator { - BOOST_STATIC_CONSTANT(std::size_t, dimensionality = NumDims::value); - - typedef typename - mpl::eval_if_c<(dimensionality == 1), - choose_value_accessor_one, - choose_value_accessor_n - >::type type; -}; - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - -struct eti_value_accessor -{ - typedef int index; - typedef int size_type; - typedef int element; - typedef int index_range; - typedef int value_type; - typedef int reference; - typedef int const_reference; -}; - -template <> -struct value_accessor_generator -{ - typedef eti_value_accessor type; -}; - -template -struct associated_types - : mpl::aux::msvc_eti_base< - typename value_accessor_generator::type - >::type -{}; - -template <> -struct associated_types : eti_value_accessor {}; - -#else - -template -struct associated_types - : value_accessor_generator::type -{}; - -#endif - -// -// choose value accessor ends -///////////////////////////////////////////////////////////////////////// - - - -//////////////////////////////////////////////////////////////////////// -// multi_array_base -//////////////////////////////////////////////////////////////////////// -template -class multi_array_impl_base - : -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) - public mpl::aux::msvc_eti_base< - typename value_accessor_generator >::type - >::type -#else - public value_accessor_generator >::type -#endif -{ - typedef associated_types > types; -public: - typedef typename types::index index; - typedef typename types::size_type size_type; - typedef typename types::element element; - typedef typename types::index_range index_range; - typedef typename types::value_type value_type; - typedef typename types::reference reference; - typedef typename types::const_reference const_reference; - - template - struct subarray { - typedef boost::detail::multi_array::sub_array type; - }; - - template - struct const_subarray { - typedef boost::detail::multi_array::const_sub_array type; - }; - - template - struct array_view { - typedef boost::detail::multi_array::multi_array_view type; - }; - - template - struct const_array_view { - public: - typedef boost::detail::multi_array::const_multi_array_view type; - }; - - // - // iterator support - // - typedef array_iterator,reference> iterator; - typedef array_iterator,const_reference> const_iterator; - - typedef ::boost::reverse_iterator reverse_iterator; - typedef ::boost::reverse_iterator const_reverse_iterator; - - BOOST_STATIC_CONSTANT(std::size_t, dimensionality = NumDims); -protected: - - multi_array_impl_base() { } - ~multi_array_impl_base() { } - - // Used by operator() in our array classes - template - Reference access_element(boost::type, - const IndexList& indices, - TPtr base, - const size_type* extents, - const index* strides, - const index* index_bases) const { - - ignore_unused_variable_warning(index_bases); - ignore_unused_variable_warning(extents); -#if !defined(NDEBUG) && !defined(BOOST_DISABLE_ASSERTS) - for (size_type i = 0; i != NumDims; ++i) { - BOOST_ASSERT(indices[i] - index_bases[i] >= 0); - BOOST_ASSERT(size_type(indices[i] - index_bases[i]) < extents[i]); - } -#endif - - index offset = 0; - for (size_type n = 0; n != NumDims; ++n) - offset += indices[n] * strides[n]; - - return base[offset]; - } - - template - void compute_strides(StrideList& stride_list, ExtentList& extent_list, - const general_storage_order& storage) - { - // invariant: stride = the stride for dimension n - index stride = 1; - for (size_type n = 0; n != NumDims; ++n) { - index stride_sign = +1; - - if (!storage.ascending(storage.ordering(n))) - stride_sign = -1; - - // The stride for this dimension is the product of the - // lengths of the ranks minor to it. - stride_list[storage.ordering(n)] = stride * stride_sign; - - stride *= extent_list[storage.ordering(n)]; - } - } - - // This calculates the offset to the array base pointer due to: - // 1. dimensions stored in descending order - // 2. non-zero dimension index bases - template - index - calculate_origin_offset(const StrideList& stride_list, - const ExtentList& extent_list, - const general_storage_order& storage, - const BaseList& index_base_list) - { - return - calculate_descending_dimension_offset(stride_list,extent_list, - storage) + - calculate_indexing_offset(stride_list,index_base_list); - } - - // This calculates the offset added to the base pointer that are - // caused by descending dimensions - template - index - calculate_descending_dimension_offset(const StrideList& stride_list, - const ExtentList& extent_list, - const general_storage_order& storage) - { - index offset = 0; - if (!storage.all_dims_ascending()) - for (size_type n = 0; n != NumDims; ++n) - if (!storage.ascending(n)) - offset -= (extent_list[n] - 1) * stride_list[n]; - - return offset; - } - - // This is used to reindex array_views, which are no longer - // concerned about storage order (specifically, whether dimensions - // are ascending or descending) since the viewed array handled it. - - template - index - calculate_indexing_offset(const StrideList& stride_list, - const BaseList& index_base_list) - { - index offset = 0; - for (size_type n = 0; n != NumDims; ++n) - offset -= stride_list[n] * index_base_list[n]; - return offset; - } - - // Slicing using an index_gen. - // Note that populating an index_gen creates a type that encodes - // both the number of dimensions in the current Array (NumDims), and - // the Number of dimensions for the resulting view. This allows the - // compiler to fail if the dimensions aren't completely accounted - // for. For reasons unbeknownst to me, a BOOST_STATIC_ASSERT - // within the member function template does not work. I should add a - // note to the documentation specifying that you get a damn ugly - // error message if you screw up in your slicing code. - template - ArrayRef - generate_array_view(boost::type, - const boost::detail::multi_array:: - index_gen& indices, - const size_type* extents, - const index* strides, - const index* index_bases, - TPtr base) const { - - boost::array new_strides; - boost::array new_extents; - - index offset = 0; - size_type dim = 0; - for (size_type n = 0; n != NumDims; ++n) { - const index default_start = index_bases[n]; - const index default_finish = default_start+extents[n]; - const index_range& current_range = indices.ranges_[n]; - index start = current_range.get_start(default_start); - index finish = current_range.get_finish(default_finish); - index index_factor = current_range.stride(); - index len = (finish - start + (index_factor - 1)) / index_factor; - - BOOST_ASSERT(index_bases[n] <= start && - start <= index_bases[n]+index(extents[n])); - BOOST_ASSERT(index_bases[n] <= finish && - finish <= index_bases[n]+index(extents[n])); - BOOST_ASSERT(index_factor > 0); - - // the array data pointer is modified to account for non-zero - // bases during slicing (see [Garcia] for the math involved) - offset += start * strides[n]; - - if (!current_range.is_degenerate()) { - - // The index_factor for each dimension is included into the - // strides for the array_view (see [Garcia] for the math involved). - new_strides[dim] = index_factor * strides[n]; - - // calculate new extents - new_extents[dim] = len; - ++dim; - } - } - BOOST_ASSERT(dim == NDims); - - return - ArrayRef(base+offset, - new_extents, - new_strides); - } - - -}; - -} // namespace multi_array -} // namespace detail - -} // namespace boost - -#endif // BASE_RG071801_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/multi_index/detail/converter.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/multi_index/detail/converter.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,602 @@ +// © Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP + +#include + +#include "boost/numeric/conversion/detail/meta.hpp" +#include "boost/numeric/conversion/detail/conversion_traits.hpp" +#include "boost/numeric/conversion/bounds.hpp" + +#include "boost/type_traits/is_same.hpp" + +#include "boost/mpl/integral_c.hpp" + +namespace boost { namespace numeric { namespace convdetail +{ + // Integral Constants representing rounding modes + typedef mpl::integral_c round2zero_c ; + typedef mpl::integral_c round2nearest_c ; + typedef mpl::integral_c round2inf_c ; + typedef mpl::integral_c round2neg_inf_c ; + + // Metafunction: + // + // for_round_style::type + // + // {RoundStyle} Integral Constant specifying a round style as declared above. + // {RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf} arbitrary types. + // + // Selects one of the 4 types according to the value of RoundStyle. + // + template + struct for_round_style + { + typedef ct_switch4 selector ; + + typedef typename selector::type type ; + } ; + + + + + + + + + + + + + + + + + + +//-------------------------------------------------------------------------- +// Range Checking Logic. +// +// The range checking logic is built up by combining 1 or 2 predicates. +// Each predicate is encapsulated in a template class and exposes +// the static member function 'apply'. +// +//-------------------------------------------------------------------------- + + + // Because a particular logic can combine either 1 or two predicates, the following + // tags are used to allow the predicate applier to receive 2 preds, but optimize away + // one of them if it is 'non-applicable' + struct non_applicable { typedef mpl::false_ do_apply ; } ; + struct applicable { typedef mpl::true_ do_apply ; } ; + + + //-------------------------------------------------------------------------- + // + // Range Checking Logic implementations. + // + // The following classes, collectivelly named 'Predicates', are instantiated within + // the corresponding range checkers. + // Their static member function 'apply' is called to perform the actual range checking logic. + //-------------------------------------------------------------------------- + + // s < Lowest(T) ? cNegOverflow : cInRange + // + template + struct LT_LoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; + } + } ; + + // s < 0 ? cNegOverflow : cInRange + // + template + struct LT_Zero : applicable + { + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(0) ? cNegOverflow : cInRange ; + } + } ; + + // s <= Lowest(T)-1 ? cNegOverflow : cInRange + // + template + struct LE_PrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s <= static_cast(bounds::lowest()) - static_cast(1.0) + ? cNegOverflow : cInRange ; + } + } ; + + // s < Lowest(T)-0.5 ? cNegOverflow : cInRange + // + template + struct LT_HalfPrevLoT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s < static_cast(bounds::lowest()) - static_cast(0.5) + ? cNegOverflow : cInRange ; + } + } ; + + // s > Highest(T) ? cPosOverflow : cInRange + // + template + struct GT_HiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s > static_cast(bounds::highest()) + ? cPosOverflow : cInRange ; + } + } ; + + // s >= Lowest(T) + 1 ? cPosOverflow : cInRange + // + template + struct GE_SuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(1.0) + ? cPosOverflow : cInRange ; + } + } ; + + // s >= Lowest(T) + 0.5 ? cPosgOverflow : cInRange + // + template + struct GT_HalfSuccHiT : applicable + { + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + typedef typename Traits::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + return s >= static_cast(bounds::highest()) + static_cast(0.5) + ? cPosOverflow : cInRange ; + } + } ; + + + //-------------------------------------------------------------------------- + // + // Predicate Combiner. + // + // This helper classes are used to possibly combine the range checking logic + // individually performed by the predicates + // + //-------------------------------------------------------------------------- + + + // Applies both predicates: first 'PredA', and if it equals 'cInRange', 'PredB' + template + struct applyBoth + { + typedef typename PredA::argument_type argument_type ; + + static range_check_result apply ( argument_type s ) + { + range_check_result r = PredA::apply(s) ; + if ( r == cInRange ) + r = PredB::apply(s); + return r ; + } + } ; + + template + struct combine + { + typedef applyBoth Both ; + typedef void NNone ; // 'None' is defined as a macro in (/usr/X11R6/include/X11/X.h) + + typedef typename PredA::do_apply do_applyA ; + typedef typename PredB::do_apply do_applyB ; + + typedef typename for_both::type type ; + } ; + + + + + + + + + + + + +//-------------------------------------------------------------------------- +// Range Checker classes. +// +// The following classes are VISIBLE base classes of the user-level converter<> class. +// They supply the optimized 'out_of_range()' and 'validate_range()' static member functions +// visible in the user interface. +// +//-------------------------------------------------------------------------- + + // Dummy range checker. + template + struct dummy_range_checker + { + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type ) { return cInRange ; } + static void validate_range ( argument_type ) {} + } ; + + // Generic range checker. + // + // All the range checking logic for all possible combinations of source and target + // can be arranged in terms of one or two predicates, which test overflow on both neg/pos 'sides' + // of the ranges. + // + // These predicates are given here as IsNegOverflow and IsPosOverflow. + // + template + struct generic_range_checker + { + typedef OverflowHandler overflow_handler ; + + typedef typename Traits::argument_type argument_type ; + + static range_check_result out_of_range ( argument_type s ) + { + typedef typename combine::type Predicate ; + + return Predicate::apply(s); + } + + static void validate_range ( argument_type s ) + { OverflowHandler()( out_of_range(s) ) ; } + } ; + + + +//-------------------------------------------------------------------------- +// +// Selectors for the optimized Range Checker class. +// +//-------------------------------------------------------------------------- + + template + struct GetRC_Sig2Sig_or_Unsig2Unsig + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Sig2Unsig + { + typedef LT_Zero Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker ChoiceA ; + + typedef generic_range_checker ChoiceB ; + + typedef typename Traits::target_type T ; + typedef typename Traits::source_type S ; + + typedef typename subranged_Unsig2Sig::type oposite_subranged ; + + typedef typename mpl::not_::type positively_subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_Unsig2Sig + { + typedef GT_HiT Pred1 ; + + typedef generic_range_checker type ; + } ; + + template + struct GetRC_Int2Int + { + typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; + typedef GetRC_Sig2Unsig Sig2UnsigQ ; + typedef GetRC_Unsig2Sig Unsig2SigQ ; + typedef Sig2SigQ Unsig2UnsigQ ; + + typedef typename Traits::sign_mixture sign_mixture ; + + typedef typename + for_sign_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC_Int2Float + { + typedef dummy_range_checker type ; + } ; + + template + struct GetRC_Float2Int + { + typedef LE_PrevLoT Pred1 ; + typedef GE_SuccHiT Pred2 ; + typedef LT_HalfPrevLoT Pred3 ; + typedef GT_HalfSuccHiT Pred4 ; + typedef GT_HiT Pred5 ; + typedef LT_LoT Pred6 ; + + typedef generic_range_checker ToZero ; + typedef generic_range_checker ToNearest ; + typedef generic_range_checker ToInf ; + typedef generic_range_checker ToNegInf ; + + typedef typename Float2IntRounder::round_style round_style ; + + typedef typename for_round_style::type type ; + } ; + + template + struct GetRC_Float2Float + { + typedef dummy_range_checker Dummy ; + + typedef LT_LoT Pred1 ; + typedef GT_HiT Pred2 ; + + typedef generic_range_checker Normal ; + + typedef typename Traits::subranged subranged ; + + typedef typename mpl::if_::type type ; + } ; + + template + struct GetRC_BuiltIn2BuiltIn + { + typedef GetRC_Int2Int Int2IntQ ; + typedef GetRC_Int2Float Int2FloatQ ; + typedef GetRC_Float2Int Float2IntQ ; + typedef GetRC_Float2Float Float2FloatQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename for_int_float_mixture::type selector ; + + typedef typename selector::type type ; + } ; + + template + struct GetRC + { + typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; + + typedef dummy_range_checker Dummy ; + + typedef mpl::identity DummyQ ; + + typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; + + typedef typename for_udt_builtin_mixture::type selector ; + + typedef typename selector::type type ; + } ; + + + + +//-------------------------------------------------------------------------- +// Converter classes. +// +// The following classes are VISIBLE base classes of the user-level converter<> class. +// They supply the optimized 'nearbyint()' and 'convert()' static member functions +// visible in the user interface. +// +//-------------------------------------------------------------------------- + + // + // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S + // + template + struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type + ,BOOST_DEDUCED_TYPENAME Traits::result_type + > + ,public dummy_range_checker + { + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type low_level_convert ( argument_type s ) { return s ; } + static source_type nearbyint ( argument_type s ) { return s ; } + static result_type convert ( argument_type s ) { return s ; } + } ; + + + // + // Rounding Converter : used for float to integral conversions. + // + template + struct rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type + ,BOOST_DEDUCED_TYPENAME Traits::result_type + > + ,public RangeChecker + ,public Float2IntRounder + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef Float2IntRounder Float2IntRounderBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + source_type s1 = Float2IntRounderBase::nearbyint(s); + return RawConverterBase::low_level_convert(s1); + } + } ; + + + // + // Non-Rounding Converter : used for all other conversions. + // + template + struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type + ,BOOST_DEDUCED_TYPENAME Traits::result_type + > + ,public RangeChecker + ,public RawConverter + { + typedef RangeChecker RangeCheckerBase ; + typedef RawConverter RawConverterBase ; + + typedef Traits traits ; + + typedef typename Traits::source_type source_type ; + typedef typename Traits::argument_type argument_type ; + typedef typename Traits::result_type result_type ; + + static source_type nearbyint ( argument_type s ) { return s ; } + + static result_type convert ( argument_type s ) + { + RangeCheckerBase::validate_range(s); + return RawConverterBase::low_level_convert(s); + } + } ; + + + + +//-------------------------------------------------------------------------- +// +// Selectors for the optimized Converter class. +// +//-------------------------------------------------------------------------- + + template + struct get_non_trivial_converter + { + typedef GetRC InternalRangeCheckerQ ; + + typedef is_same use_internal_RC ; + + typedef mpl::identity UserRangeCheckerQ ; + + typedef typename + mpl::eval_if::type + RangeChecker ; + + typedef non_rounding_converter NonRounding ; + typedef rounding_converter Rounding ; + + typedef mpl::identity NonRoundingQ ; + typedef mpl::identity RoundingQ ; + + typedef typename Traits::int_float_mixture int_float_mixture ; + + typedef typename + for_int_float_mixture::type + selector ; + + typedef typename selector::type type ; + } ; + + template< class Traits + ,class OverflowHandler + ,class Float2IntRounder + ,class RawConverter + ,class UserRangeChecker + > + struct get_converter_impl + { +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x0561 ) ) + // bcc55 prefers sometimes template parameters to be explicit local types. + // (notice that is is illegal to reuse the names like this) + typedef Traits Traits ; + typedef OverflowHandler OverflowHandler ; + typedef Float2IntRounder Float2IntRounder ; + typedef RawConverter RawConverter ; + typedef UserRangeChecker UserRangeChecker ; +#endif + + typedef trivial_converter_impl Trivial ; + typedef mpl::identity TrivialQ ; + + typedef get_non_trivial_converter< Traits + ,OverflowHandler + ,Float2IntRounder + ,RawConverter + ,UserRangeChecker + > NonTrivialQ ; + + typedef typename Traits::trivial trivial ; + + typedef typename mpl::eval_if::type type ; + } ; + +} } } // namespace boost::numeric::convdetail + +#endif + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/multi_index/detail/has_tag.hpp --- a/epoc32/include/stdapis/boost/multi_index/detail/has_tag.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* Copyright 2003-2005 Joaquín M López Muñoz. - * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or copy at - * http://www.boost.org/LICENSE_1_0.txt) - * - * See http://www.boost.org/libs/multi_index for library home page. - */ - -#ifndef BOOST_MULTI_INDEX_DETAIL_HAS_TAG_HPP -#define BOOST_MULTI_INDEX_DETAIL_HAS_TAG_HPP - -#if defined(_MSC_VER)&&(_MSC_VER>=1200) -#pragma once -#endif - -#include /* keep it first to prevent nasty warns in MSVC */ -#include - -namespace boost{ - -namespace multi_index{ - -namespace detail{ - -/* determines whether an index type has a given tag in its tag list */ - -template -struct has_tag -{ - template - struct apply:mpl::contains - { - }; -}; - -} /* namespace multi_index::detail */ - -} /* namespace multi_index */ - -} /* namespace boost */ - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/multi_index/tag.hpp --- a/epoc32/include/stdapis/boost/multi_index/tag.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,92 +0,0 @@ -/* Copyright 2003-2005 Joaquín M López Muñoz. - * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE_1_0.txt or copy at - * http://www.boost.org/LICENSE_1_0.txt) - * - * See http://www.boost.org/libs/multi_index for library home page. - */ - -#ifndef BOOST_MULTI_INDEX_TAG_HPP -#define BOOST_MULTI_INDEX_TAG_HPP - -#if defined(_MSC_VER)&&(_MSC_VER>=1200) -#pragma once -#endif - -#include /* keep it first to prevent nasty warns in MSVC */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* A wrapper of mpl::vector used to hide MPL from the user. - * tag contains types used as tag names for indices in get() functions. - */ - -/* This user_definable macro limits the number of elements of a tag; - * useful for shortening resulting symbol names (MSVC++ 6.0, for instance, - * has problems coping with very long symbol names.) - */ - -#if !defined(BOOST_MULTI_INDEX_LIMIT_TAG_SIZE) -#if defined(BOOST_MSVC)&&(BOOST_MSVC<1300) -#define BOOST_MULTI_INDEX_LIMIT_TAG_SIZE 3 -#else -#define BOOST_MULTI_INDEX_LIMIT_TAG_SIZE BOOST_MPL_LIMIT_VECTOR_SIZE -#endif -#endif - -#if BOOST_MULTI_INDEX_LIMIT_TAG_SIZE -struct is_tag -{ - BOOST_STATIC_CONSTANT(bool,value=(is_base_and_derived::value)); -}; - -} /* namespace multi_index::detail */ - -template< - BOOST_PP_ENUM_BINARY_PARAMS( - BOOST_MULTI_INDEX_TAG_SIZE, - typename T, - =mpl::na BOOST_PP_INTERCEPT) -> -struct tag:private detail::tag_marker -{ - /* The mpl::transform pass produces shorter symbols (without - * trailing mpl::na's.) - */ - - typedef typename mpl::transform< - mpl::vector, - mpl::identity - >::type type; - - BOOST_STATIC_ASSERT(detail::no_duplicate_tags::value); -}; - -} /* namespace multi_index */ - -} /* namespace boost */ - -#undef BOOST_MULTI_INDEX_TAG_SIZE - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/next_prior.hpp --- a/epoc32/include/stdapis/boost/next_prior.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -// Boost next_prior.hpp header file ---------------------------------------// - -// (C) Copyright Dave Abrahams and Daniel Walker 1999-2003. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/utility for documentation. - -// Revision History -// 13 Dec 2003 Added next(x, n) and prior(x, n) (Daniel Walker) - -#ifndef BOOST_NEXT_PRIOR_HPP_INCLUDED -#define BOOST_NEXT_PRIOR_HPP_INCLUDED - -#include - -namespace boost { - -// Helper functions for classes like bidirectional iterators not supporting -// operator+ and operator- -// -// Usage: -// const std::list::iterator p = get_some_iterator(); -// const std::list::iterator prev = boost::prior(p); -// const std::list::iterator next = boost::next(prev, 2); - -// Contributed by Dave Abrahams - -template -inline T next(T x) { return ++x; } - -template -inline T next(T x, Distance n) -{ - std::advance(x, n); - return x; -} - -template -inline T prior(T x) { return --x; } - -template -inline T prior(T x, Distance n) -{ - std::advance(x, -n); - return x; -} - -} // namespace boost - -#endif // BOOST_NEXT_PRIOR_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/numeric/conversion/bounds.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/numeric/conversion/bounds.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,58 @@ +// © Copyright Fernando Luis Cacciola Carballal 2000-2004 +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// See library home page at http://www.boost.org/libs/numeric/conversion +// +// Contact the author at: fernando_cacciola@hotmail.com +// +#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP +#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP + +#include "boost/limits.hpp" +#include "boost/config.hpp" +#include "boost/mpl/if.hpp" + +namespace boost { namespace numeric { namespace boundsdetail +{ + template + class Integral + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } + static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } + static N smallest() { return static_cast(1); } + } ; + + template + class Float + { + typedef std::numeric_limits limits ; + + public : + + static N lowest () { return static_cast(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; } + static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } + static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } + } ; + + template + struct get_impl + { + typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; + + typedef Integral impl_int ; + typedef Float impl_float ; + + typedef typename mpl::if_::type type ; + } ; + +} } } // namespace boost::numeric::boundsdetail. + +#endif +// +/////////////////////////////////////////////////////////////////////////////////////////////// diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/numeric/conversion/cast.hpp --- a/epoc32/include/stdapis/boost/numeric/conversion/cast.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -// © Copyright Fernando Luis Cacciola Carballal 2000-2004 -// Use, modification, and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See library home page at http://www.boost.org/libs/numeric/conversion -// -// Contact the author at: fernando_cacciola@hotmail.com -// -// -// Revision History -// -// 19 Nov 2001 Syntatic changes as suggested by Darin Adler (Fernando Cacciola) -// 08 Nov 2001 Fixes to accommodate MSVC (Fernando Cacciola) -// 04 Nov 2001 Fixes to accommodate gcc2.92 (Fernando Cacciola) -// 30 Oct 2001 Some fixes suggested by Daryle Walker (Fernando Cacciola) -// 25 Oct 2001 Initial boostification (Fernando Cacciola) -// 23 Jan 2004 Inital add to cvs (post review)s -// -#ifndef BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP -#define BOOST_NUMERIC_CONVERSION_CAST_25OCT2001_HPP - -#include - -#if BOOST_WORKAROUND(BOOST_MSVC, < 1300) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) - -# include - -#else - -#include -#include - -namespace boost -{ - template - inline - Target numeric_cast ( Source arg ) - { - typedef boost::numeric::converter Converter ; - return Converter::convert(arg); - } - - using numeric::bad_numeric_cast; - -} // namespace boost - -#endif - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/numeric/conversion/conversion_traits.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/numeric/conversion/conversion_traits.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,17 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko J„rvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED +#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED + +#include + +#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/numeric/conversion/detail/bounds.hpp --- a/epoc32/include/stdapis/boost/numeric/conversion/detail/bounds.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -// © Copyright Fernando Luis Cacciola Carballal 2000-2004 -// Use, modification, and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See library home page at http://www.boost.org/libs/numeric/conversion -// -// Contact the author at: fernando_cacciola@hotmail.com -// -#ifndef BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP -#define BOOST_NUMERIC_CONVERSION_BOUNDS_DETAIL_FLC_12NOV2002_HPP - -#include "boost/limits.hpp" -#include "boost/config.hpp" -#include "boost/mpl/if.hpp" - -namespace boost { namespace numeric { namespace boundsdetail -{ - template - class Integral - { - typedef std::numeric_limits limits ; - - public : - - static N lowest () { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } - static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } - static N smallest() { return static_cast(1); } - } ; - - template - class Float - { - typedef std::numeric_limits limits ; - - public : - - static N lowest () { return static_cast(-limits::max BOOST_PREVENT_MACRO_SUBSTITUTION ()) ; } - static N highest () { return limits::max BOOST_PREVENT_MACRO_SUBSTITUTION (); } - static N smallest() { return limits::min BOOST_PREVENT_MACRO_SUBSTITUTION (); } - } ; - - template - struct get_impl - { - typedef mpl::bool_< ::std::numeric_limits::is_integer > is_int ; - - typedef Integral impl_int ; - typedef Float impl_float ; - - typedef typename mpl::if_::type type ; - } ; - -} } } // namespace boost::numeric::boundsdetail. - -#endif -// -/////////////////////////////////////////////////////////////////////////////////////////////// diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/numeric/conversion/detail/converter.hpp --- a/epoc32/include/stdapis/boost/numeric/conversion/detail/converter.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,602 +0,0 @@ -// © Copyright Fernando Luis Cacciola Carballal 2000-2004 -// Use, modification, and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See library home page at http://www.boost.org/libs/numeric/conversion -// -// Contact the author at: fernando_cacciola@hotmail.com -// -#ifndef BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP -#define BOOST_NUMERIC_CONVERSION_DETAIL_CONVERTER_FLC_12NOV2002_HPP - -#include - -#include "boost/numeric/conversion/detail/meta.hpp" -#include "boost/numeric/conversion/detail/conversion_traits.hpp" -#include "boost/numeric/conversion/bounds.hpp" - -#include "boost/type_traits/is_same.hpp" - -#include "boost/mpl/integral_c.hpp" - -namespace boost { namespace numeric { namespace convdetail -{ - // Integral Constants representing rounding modes - typedef mpl::integral_c round2zero_c ; - typedef mpl::integral_c round2nearest_c ; - typedef mpl::integral_c round2inf_c ; - typedef mpl::integral_c round2neg_inf_c ; - - // Metafunction: - // - // for_round_style::type - // - // {RoundStyle} Integral Constant specifying a round style as declared above. - // {RoundToZero,RoundToNearest,RoundToInf,RoundToNegInf} arbitrary types. - // - // Selects one of the 4 types according to the value of RoundStyle. - // - template - struct for_round_style - { - typedef ct_switch4 selector ; - - typedef typename selector::type type ; - } ; - - - - - - - - - - - - - - - - - - -//-------------------------------------------------------------------------- -// Range Checking Logic. -// -// The range checking logic is built up by combining 1 or 2 predicates. -// Each predicate is encapsulated in a template class and exposes -// the static member function 'apply'. -// -//-------------------------------------------------------------------------- - - - // Because a particular logic can combine either 1 or two predicates, the following - // tags are used to allow the predicate applier to receive 2 preds, but optimize away - // one of them if it is 'non-applicable' - struct non_applicable { typedef mpl::false_ do_apply ; } ; - struct applicable { typedef mpl::true_ do_apply ; } ; - - - //-------------------------------------------------------------------------- - // - // Range Checking Logic implementations. - // - // The following classes, collectivelly named 'Predicates', are instantiated within - // the corresponding range checkers. - // Their static member function 'apply' is called to perform the actual range checking logic. - //-------------------------------------------------------------------------- - - // s < Lowest(T) ? cNegOverflow : cInRange - // - template - struct LT_LoT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s < static_cast(bounds::lowest()) ? cNegOverflow : cInRange ; - } - } ; - - // s < 0 ? cNegOverflow : cInRange - // - template - struct LT_Zero : applicable - { - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s < static_cast(0) ? cNegOverflow : cInRange ; - } - } ; - - // s <= Lowest(T)-1 ? cNegOverflow : cInRange - // - template - struct LE_PrevLoT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s <= static_cast(bounds::lowest()) - static_cast(1.0) - ? cNegOverflow : cInRange ; - } - } ; - - // s < Lowest(T)-0.5 ? cNegOverflow : cInRange - // - template - struct LT_HalfPrevLoT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s < static_cast(bounds::lowest()) - static_cast(0.5) - ? cNegOverflow : cInRange ; - } - } ; - - // s > Highest(T) ? cPosOverflow : cInRange - // - template - struct GT_HiT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s > static_cast(bounds::highest()) - ? cPosOverflow : cInRange ; - } - } ; - - // s >= Lowest(T) + 1 ? cPosOverflow : cInRange - // - template - struct GE_SuccHiT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s >= static_cast(bounds::highest()) + static_cast(1.0) - ? cPosOverflow : cInRange ; - } - } ; - - // s >= Lowest(T) + 0.5 ? cPosgOverflow : cInRange - // - template - struct GT_HalfSuccHiT : applicable - { - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - typedef typename Traits::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - return s >= static_cast(bounds::highest()) + static_cast(0.5) - ? cPosOverflow : cInRange ; - } - } ; - - - //-------------------------------------------------------------------------- - // - // Predicate Combiner. - // - // This helper classes are used to possibly combine the range checking logic - // individually performed by the predicates - // - //-------------------------------------------------------------------------- - - - // Applies both predicates: first 'PredA', and if it equals 'cInRange', 'PredB' - template - struct applyBoth - { - typedef typename PredA::argument_type argument_type ; - - static range_check_result apply ( argument_type s ) - { - range_check_result r = PredA::apply(s) ; - if ( r == cInRange ) - r = PredB::apply(s); - return r ; - } - } ; - - template - struct combine - { - typedef applyBoth Both ; - typedef void NNone ; // 'None' is defined as a macro in (/usr/X11R6/include/X11/X.h) - - typedef typename PredA::do_apply do_applyA ; - typedef typename PredB::do_apply do_applyB ; - - typedef typename for_both::type type ; - } ; - - - - - - - - - - - - -//-------------------------------------------------------------------------- -// Range Checker classes. -// -// The following classes are VISIBLE base classes of the user-level converter<> class. -// They supply the optimized 'out_of_range()' and 'validate_range()' static member functions -// visible in the user interface. -// -//-------------------------------------------------------------------------- - - // Dummy range checker. - template - struct dummy_range_checker - { - typedef typename Traits::argument_type argument_type ; - - static range_check_result out_of_range ( argument_type ) { return cInRange ; } - static void validate_range ( argument_type ) {} - } ; - - // Generic range checker. - // - // All the range checking logic for all possible combinations of source and target - // can be arranged in terms of one or two predicates, which test overflow on both neg/pos 'sides' - // of the ranges. - // - // These predicates are given here as IsNegOverflow and IsPosOverflow. - // - template - struct generic_range_checker - { - typedef OverflowHandler overflow_handler ; - - typedef typename Traits::argument_type argument_type ; - - static range_check_result out_of_range ( argument_type s ) - { - typedef typename combine::type Predicate ; - - return Predicate::apply(s); - } - - static void validate_range ( argument_type s ) - { OverflowHandler()( out_of_range(s) ) ; } - } ; - - - -//-------------------------------------------------------------------------- -// -// Selectors for the optimized Range Checker class. -// -//-------------------------------------------------------------------------- - - template - struct GetRC_Sig2Sig_or_Unsig2Unsig - { - typedef dummy_range_checker Dummy ; - - typedef LT_LoT Pred1 ; - typedef GT_HiT Pred2 ; - - typedef generic_range_checker Normal ; - - typedef typename Traits::subranged subranged ; - - typedef typename mpl::if_::type type ; - } ; - - template - struct GetRC_Sig2Unsig - { - typedef LT_Zero Pred1 ; - typedef GT_HiT Pred2 ; - - typedef generic_range_checker ChoiceA ; - - typedef generic_range_checker ChoiceB ; - - typedef typename Traits::target_type T ; - typedef typename Traits::source_type S ; - - typedef typename subranged_Unsig2Sig::type oposite_subranged ; - - typedef typename mpl::not_::type positively_subranged ; - - typedef typename mpl::if_::type type ; - } ; - - template - struct GetRC_Unsig2Sig - { - typedef GT_HiT Pred1 ; - - typedef generic_range_checker type ; - } ; - - template - struct GetRC_Int2Int - { - typedef GetRC_Sig2Sig_or_Unsig2Unsig Sig2SigQ ; - typedef GetRC_Sig2Unsig Sig2UnsigQ ; - typedef GetRC_Unsig2Sig Unsig2SigQ ; - typedef Sig2SigQ Unsig2UnsigQ ; - - typedef typename Traits::sign_mixture sign_mixture ; - - typedef typename - for_sign_mixture::type - selector ; - - typedef typename selector::type type ; - } ; - - template - struct GetRC_Int2Float - { - typedef dummy_range_checker type ; - } ; - - template - struct GetRC_Float2Int - { - typedef LE_PrevLoT Pred1 ; - typedef GE_SuccHiT Pred2 ; - typedef LT_HalfPrevLoT Pred3 ; - typedef GT_HalfSuccHiT Pred4 ; - typedef GT_HiT Pred5 ; - typedef LT_LoT Pred6 ; - - typedef generic_range_checker ToZero ; - typedef generic_range_checker ToNearest ; - typedef generic_range_checker ToInf ; - typedef generic_range_checker ToNegInf ; - - typedef typename Float2IntRounder::round_style round_style ; - - typedef typename for_round_style::type type ; - } ; - - template - struct GetRC_Float2Float - { - typedef dummy_range_checker Dummy ; - - typedef LT_LoT Pred1 ; - typedef GT_HiT Pred2 ; - - typedef generic_range_checker Normal ; - - typedef typename Traits::subranged subranged ; - - typedef typename mpl::if_::type type ; - } ; - - template - struct GetRC_BuiltIn2BuiltIn - { - typedef GetRC_Int2Int Int2IntQ ; - typedef GetRC_Int2Float Int2FloatQ ; - typedef GetRC_Float2Int Float2IntQ ; - typedef GetRC_Float2Float Float2FloatQ ; - - typedef typename Traits::int_float_mixture int_float_mixture ; - - typedef typename for_int_float_mixture::type selector ; - - typedef typename selector::type type ; - } ; - - template - struct GetRC - { - typedef GetRC_BuiltIn2BuiltIn BuiltIn2BuiltInQ ; - - typedef dummy_range_checker Dummy ; - - typedef mpl::identity DummyQ ; - - typedef typename Traits::udt_builtin_mixture udt_builtin_mixture ; - - typedef typename for_udt_builtin_mixture::type selector ; - - typedef typename selector::type type ; - } ; - - - - -//-------------------------------------------------------------------------- -// Converter classes. -// -// The following classes are VISIBLE base classes of the user-level converter<> class. -// They supply the optimized 'nearbyint()' and 'convert()' static member functions -// visible in the user interface. -// -//-------------------------------------------------------------------------- - - // - // Trivial Converter : used when (cv-unqualified) T == (cv-unqualified) S - // - template - struct trivial_converter_impl : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type - ,BOOST_DEDUCED_TYPENAME Traits::result_type - > - ,public dummy_range_checker - { - typedef Traits traits ; - - typedef typename Traits::source_type source_type ; - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - static result_type low_level_convert ( argument_type s ) { return s ; } - static source_type nearbyint ( argument_type s ) { return s ; } - static result_type convert ( argument_type s ) { return s ; } - } ; - - - // - // Rounding Converter : used for float to integral conversions. - // - template - struct rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type - ,BOOST_DEDUCED_TYPENAME Traits::result_type - > - ,public RangeChecker - ,public Float2IntRounder - ,public RawConverter - { - typedef RangeChecker RangeCheckerBase ; - typedef Float2IntRounder Float2IntRounderBase ; - typedef RawConverter RawConverterBase ; - - typedef Traits traits ; - - typedef typename Traits::source_type source_type ; - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - static result_type convert ( argument_type s ) - { - RangeCheckerBase::validate_range(s); - source_type s1 = Float2IntRounderBase::nearbyint(s); - return RawConverterBase::low_level_convert(s1); - } - } ; - - - // - // Non-Rounding Converter : used for all other conversions. - // - template - struct non_rounding_converter : public std::unary_function< BOOST_DEDUCED_TYPENAME Traits::argument_type - ,BOOST_DEDUCED_TYPENAME Traits::result_type - > - ,public RangeChecker - ,public RawConverter - { - typedef RangeChecker RangeCheckerBase ; - typedef RawConverter RawConverterBase ; - - typedef Traits traits ; - - typedef typename Traits::source_type source_type ; - typedef typename Traits::argument_type argument_type ; - typedef typename Traits::result_type result_type ; - - static source_type nearbyint ( argument_type s ) { return s ; } - - static result_type convert ( argument_type s ) - { - RangeCheckerBase::validate_range(s); - return RawConverterBase::low_level_convert(s); - } - } ; - - - - -//-------------------------------------------------------------------------- -// -// Selectors for the optimized Converter class. -// -//-------------------------------------------------------------------------- - - template - struct get_non_trivial_converter - { - typedef GetRC InternalRangeCheckerQ ; - - typedef is_same use_internal_RC ; - - typedef mpl::identity UserRangeCheckerQ ; - - typedef typename - mpl::eval_if::type - RangeChecker ; - - typedef non_rounding_converter NonRounding ; - typedef rounding_converter Rounding ; - - typedef mpl::identity NonRoundingQ ; - typedef mpl::identity RoundingQ ; - - typedef typename Traits::int_float_mixture int_float_mixture ; - - typedef typename - for_int_float_mixture::type - selector ; - - typedef typename selector::type type ; - } ; - - template< class Traits - ,class OverflowHandler - ,class Float2IntRounder - ,class RawConverter - ,class UserRangeChecker - > - struct get_converter_impl - { -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT( 0x0561 ) ) - // bcc55 prefers sometimes template parameters to be explicit local types. - // (notice that is is illegal to reuse the names like this) - typedef Traits Traits ; - typedef OverflowHandler OverflowHandler ; - typedef Float2IntRounder Float2IntRounder ; - typedef RawConverter RawConverter ; - typedef UserRangeChecker UserRangeChecker ; -#endif - - typedef trivial_converter_impl Trivial ; - typedef mpl::identity TrivialQ ; - - typedef get_non_trivial_converter< Traits - ,OverflowHandler - ,Float2IntRounder - ,RawConverter - ,UserRangeChecker - > NonTrivialQ ; - - typedef typename Traits::trivial trivial ; - - typedef typename mpl::eval_if::type type ; - } ; - -} } } // namespace boost::numeric::convdetail - -#endif - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/operators.hpp --- a/epoc32/include/stdapis/boost/operators.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,941 +0,0 @@ -// Boost operators.hpp header file ----------------------------------------// - -// (C) Copyright David Abrahams, Jeremy Siek, Daryle Walker 1999-2001. -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/utility/operators.htm for documentation. - -// Revision History -// 21 Oct 02 Modified implementation of operators to allow compilers with a -// correct named return value optimization (NRVO) to produce optimal -// code. (Daniel Frey) -// 02 Dec 01 Bug fixed in random_access_iteratable. (Helmut Zeisel) -// 28 Sep 01 Factored out iterator operator groups. (Daryle Walker) -// 27 Aug 01 'left' form for non commutative operators added; -// additional classes for groups of related operators added; -// workaround for empty base class optimization -// bug of GCC 3.0 (Helmut Zeisel) -// 25 Jun 01 output_iterator_helper changes: removed default template -// parameters, added support for self-proxying, additional -// documentation and tests (Aleksey Gurtovoy) -// 29 May 01 Added operator classes for << and >>. Added input and output -// iterator helper classes. Added classes to connect equality and -// relational operators. Added classes for groups of related -// operators. Reimplemented example operator and iterator helper -// classes in terms of the new groups. (Daryle Walker, with help -// from Alexy Gurtovoy) -// 11 Feb 01 Fixed bugs in the iterator helpers which prevented explicitly -// supplied arguments from actually being used (Dave Abrahams) -// 04 Jul 00 Fixed NO_OPERATORS_IN_NAMESPACE bugs, major cleanup and -// refactoring of compiler workarounds, additional documentation -// (Alexy Gurtovoy and Mark Rodgers with some help and prompting from -// Dave Abrahams) -// 28 Jun 00 General cleanup and integration of bugfixes from Mark Rodgers and -// Jeremy Siek (Dave Abrahams) -// 20 Jun 00 Changes to accommodate Borland C++Builder 4 and Borland C++ 5.5 -// (Mark Rodgers) -// 20 Jun 00 Minor fixes to the prior revision (Aleksey Gurtovoy) -// 10 Jun 00 Support for the base class chaining technique was added -// (Aleksey Gurtovoy). See documentation and the comments below -// for the details. -// 12 Dec 99 Initial version with iterator operators (Jeremy Siek) -// 18 Nov 99 Change name "divideable" to "dividable", remove unnecessary -// specializations of dividable, subtractable, modable (Ed Brey) -// 17 Nov 99 Add comments (Beman Dawes) -// Remove unnecessary specialization of operators<> (Ed Brey) -// 15 Nov 99 Fix less_than_comparable second operand type for first two -// operators.(Beman Dawes) -// 12 Nov 99 Add operators templates (Ed Brey) -// 11 Nov 99 Add single template parameter version for compilers without -// partial specialization (Beman Dawes) -// 10 Nov 99 Initial version - -// 10 Jun 00: -// An additional optional template parameter was added to most of -// operator templates to support the base class chaining technique (see -// documentation for the details). Unfortunately, a straightforward -// implementation of this change would have broken compatibility with the -// previous version of the library by making it impossible to use the same -// template name (e.g. 'addable') for both the 1- and 2-argument versions of -// an operator template. This implementation solves the backward-compatibility -// issue at the cost of some simplicity. -// -// One of the complications is an existence of special auxiliary class template -// 'is_chained_base<>' (see 'detail' namespace below), which is used -// to determine whether its template parameter is a library's operator template -// or not. You have to specialize 'is_chained_base<>' for each new -// operator template you add to the library. -// -// However, most of the non-trivial implementation details are hidden behind -// several local macros defined below, and as soon as you understand them, -// you understand the whole library implementation. - -#ifndef BOOST_OPERATORS_HPP -#define BOOST_OPERATORS_HPP - -#include -#include -#include - -#if defined(__sgi) && !defined(__GNUC__) -# pragma set woff 1234 -#endif - -#if defined(BOOST_MSVC) -# pragma warning( disable : 4284 ) // complaint about return type of -#endif // operator-> not begin a UDT - -namespace boost { -namespace detail { - -// Helmut Zeisel, empty base class optimization bug with GCC 3.0.0 -#if defined(__GNUC__) && __GNUC__==3 && __GNUC_MINOR__==0 && __GNU_PATCHLEVEL__==0 -class empty_base { - bool dummy; -}; -#else -class empty_base {}; -#endif - -} // namespace detail -} // namespace boost - -// In this section we supply the xxxx1 and xxxx2 forms of the operator -// templates, which are explicitly targeted at the 1-type-argument and -// 2-type-argument operator forms, respectively. Some compilers get confused -// when inline friend functions are overloaded in namespaces other than the -// global namespace. When BOOST_NO_OPERATORS_IN_NAMESPACE is defined, all of -// these templates must go in the global namespace. - -#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE -namespace boost -{ -#endif - -// Basic operator classes (contributed by Dave Abrahams) ------------------// - -// Note that friend functions defined in a class are implicitly inline. -// See the C++ std, 11.4 [class.friend] paragraph 5 - -template -struct less_than_comparable2 : B -{ - friend bool operator<=(const T& x, const U& y) { return !(x > y); } - friend bool operator>=(const T& x, const U& y) { return !(x < y); } - friend bool operator>(const U& x, const T& y) { return y < x; } - friend bool operator<(const U& x, const T& y) { return y > x; } - friend bool operator<=(const U& x, const T& y) { return !(y < x); } - friend bool operator>=(const U& x, const T& y) { return !(y > x); } -}; - -template -struct less_than_comparable1 : B -{ - friend bool operator>(const T& x, const T& y) { return y < x; } - friend bool operator<=(const T& x, const T& y) { return !(y < x); } - friend bool operator>=(const T& x, const T& y) { return !(x < y); } -}; - -template -struct equality_comparable2 : B -{ - friend bool operator==(const U& y, const T& x) { return x == y; } - friend bool operator!=(const U& y, const T& x) { return !(x == y); } - friend bool operator!=(const T& y, const U& x) { return !(y == x); } -}; - -template -struct equality_comparable1 : B -{ - friend bool operator!=(const T& x, const T& y) { return !(x == y); } -}; - -// A macro which produces "name_2left" from "name". -#define BOOST_OPERATOR2_LEFT(name) name##2##_##left - -// NRVO-friendly implementation (contributed by Daniel Frey) ---------------// - -#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) - -// This is the optimal implementation for ISO/ANSI C++, -// but it requires the compiler to implement the NRVO. -// If the compiler has no NRVO, this is the best symmetric -// implementation available. - -#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ -template \ -struct NAME##2 : B \ -{ \ - friend T operator OP( const T& lhs, const U& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ - friend T operator OP( const U& lhs, const T& rhs ) \ - { T nrv( rhs ); nrv OP##= lhs; return nrv; } \ -}; \ - \ -template \ -struct NAME##1 : B \ -{ \ - friend T operator OP( const T& lhs, const T& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ -}; - -#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ -template \ -struct NAME##2 : B \ -{ \ - friend T operator OP( const T& lhs, const U& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ -}; \ - \ -template \ -struct BOOST_OPERATOR2_LEFT(NAME) : B \ -{ \ - friend T operator OP( const U& lhs, const T& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ -}; \ - \ -template \ -struct NAME##1 : B \ -{ \ - friend T operator OP( const T& lhs, const T& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ -}; - -#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) - -// For compilers without NRVO the following code is optimal, but not -// symmetric! Note that the implementation of -// BOOST_OPERATOR2_LEFT(NAME) only looks cool, but doesn't provide -// optimization opportunities to the compiler :) - -#define BOOST_BINARY_OPERATOR_COMMUTATIVE( NAME, OP ) \ -template \ -struct NAME##2 : B \ -{ \ - friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ - friend T operator OP( const U& lhs, T rhs ) { return rhs OP##= lhs; } \ -}; \ - \ -template \ -struct NAME##1 : B \ -{ \ - friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ -}; - -#define BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( NAME, OP ) \ -template \ -struct NAME##2 : B \ -{ \ - friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ -}; \ - \ -template \ -struct BOOST_OPERATOR2_LEFT(NAME) : B \ -{ \ - friend T operator OP( const U& lhs, const T& rhs ) \ - { return T( lhs ) OP##= rhs; } \ -}; \ - \ -template \ -struct NAME##1 : B \ -{ \ - friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ -}; - -#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) - -BOOST_BINARY_OPERATOR_COMMUTATIVE( multipliable, * ) -BOOST_BINARY_OPERATOR_COMMUTATIVE( addable, + ) -BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( subtractable, - ) -BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( dividable, / ) -BOOST_BINARY_OPERATOR_NON_COMMUTATIVE( modable, % ) -BOOST_BINARY_OPERATOR_COMMUTATIVE( xorable, ^ ) -BOOST_BINARY_OPERATOR_COMMUTATIVE( andable, & ) -BOOST_BINARY_OPERATOR_COMMUTATIVE( orable, | ) - -#undef BOOST_BINARY_OPERATOR_COMMUTATIVE -#undef BOOST_BINARY_OPERATOR_NON_COMMUTATIVE -#undef BOOST_OPERATOR2_LEFT - -// incrementable and decrementable contributed by Jeremy Siek - -template -struct incrementable : B -{ - friend T operator++(T& x, int) - { - incrementable_type nrv(x); - ++x; - return nrv; - } -private: // The use of this typedef works around a Borland bug - typedef T incrementable_type; -}; - -template -struct decrementable : B -{ - friend T operator--(T& x, int) - { - decrementable_type nrv(x); - --x; - return nrv; - } -private: // The use of this typedef works around a Borland bug - typedef T decrementable_type; -}; - -// Iterator operator classes (contributed by Jeremy Siek) ------------------// - -template -struct dereferenceable : B -{ - P operator->() const - { - return &*static_cast(*this); - } -}; - -template -struct indexable : B -{ - R operator[](I n) const - { - return *(static_cast(*this) + n); - } -}; - -// More operator classes (contributed by Daryle Walker) --------------------// -// (NRVO-friendly implementation contributed by Daniel Frey) ---------------// - -#if defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) - -#define BOOST_BINARY_OPERATOR( NAME, OP ) \ -template \ -struct NAME##2 : B \ -{ \ - friend T operator OP( const T& lhs, const U& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ -}; \ - \ -template \ -struct NAME##1 : B \ -{ \ - friend T operator OP( const T& lhs, const T& rhs ) \ - { T nrv( lhs ); nrv OP##= rhs; return nrv; } \ -}; - -#else // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) - -#define BOOST_BINARY_OPERATOR( NAME, OP ) \ -template \ -struct NAME##2 : B \ -{ \ - friend T operator OP( T lhs, const U& rhs ) { return lhs OP##= rhs; } \ -}; \ - \ -template \ -struct NAME##1 : B \ -{ \ - friend T operator OP( T lhs, const T& rhs ) { return lhs OP##= rhs; } \ -}; - -#endif // defined(BOOST_HAS_NRVO) || defined(BOOST_FORCE_SYMMETRIC_OPERATORS) - -BOOST_BINARY_OPERATOR( left_shiftable, << ) -BOOST_BINARY_OPERATOR( right_shiftable, >> ) - -#undef BOOST_BINARY_OPERATOR - -template -struct equivalent2 : B -{ - friend bool operator==(const T& x, const U& y) - { - return !(x < y) && !(x > y); - } -}; - -template -struct equivalent1 : B -{ - friend bool operator==(const T&x, const T&y) - { - return !(x < y) && !(y < x); - } -}; - -template -struct partially_ordered2 : B -{ - friend bool operator<=(const T& x, const U& y) - { return (x < y) || (x == y); } - friend bool operator>=(const T& x, const U& y) - { return (x > y) || (x == y); } - friend bool operator>(const U& x, const T& y) - { return y < x; } - friend bool operator<(const U& x, const T& y) - { return y > x; } - friend bool operator<=(const U& x, const T& y) - { return (y > x) || (y == x); } - friend bool operator>=(const U& x, const T& y) - { return (y < x) || (y == x); } -}; - -template -struct partially_ordered1 : B -{ - friend bool operator>(const T& x, const T& y) - { return y < x; } - friend bool operator<=(const T& x, const T& y) - { return (x < y) || (x == y); } - friend bool operator>=(const T& x, const T& y) - { return (y < x) || (x == y); } -}; - -// Combined operator classes (contributed by Daryle Walker) ----------------// - -template -struct totally_ordered2 - : less_than_comparable2 > {}; - -template -struct totally_ordered1 - : less_than_comparable1 > {}; - -template -struct additive2 - : addable2 > {}; - -template -struct additive1 - : addable1 > {}; - -template -struct multiplicative2 - : multipliable2 > {}; - -template -struct multiplicative1 - : multipliable1 > {}; - -template -struct integer_multiplicative2 - : multiplicative2 > {}; - -template -struct integer_multiplicative1 - : multiplicative1 > {}; - -template -struct arithmetic2 - : additive2 > {}; - -template -struct arithmetic1 - : additive1 > {}; - -template -struct integer_arithmetic2 - : additive2 > {}; - -template -struct integer_arithmetic1 - : additive1 > {}; - -template -struct bitwise2 - : xorable2 > > {}; - -template -struct bitwise1 - : xorable1 > > {}; - -template -struct unit_steppable - : incrementable > {}; - -template -struct shiftable2 - : left_shiftable2 > {}; - -template -struct shiftable1 - : left_shiftable1 > {}; - -template -struct ring_operators2 - : additive2 > > {}; - -template -struct ring_operators1 - : additive1 > {}; - -template -struct ordered_ring_operators2 - : ring_operators2 > {}; - -template -struct ordered_ring_operators1 - : ring_operators1 > {}; - -template -struct field_operators2 - : ring_operators2 > > {}; - -template -struct field_operators1 - : ring_operators1 > {}; - -template -struct ordered_field_operators2 - : field_operators2 > {}; - -template -struct ordered_field_operators1 - : field_operators1 > {}; - -template -struct euclidian_ring_operators2 - : ring_operators2 > > > > {}; - -template -struct euclidian_ring_operators1 - : ring_operators1 > > {}; - -template -struct ordered_euclidian_ring_operators2 - : totally_ordered2 > {}; - -template -struct ordered_euclidian_ring_operators1 - : totally_ordered1 > {}; - -template -struct input_iteratable - : equality_comparable1 > > {}; - -template -struct output_iteratable - : incrementable {}; - -template -struct forward_iteratable - : input_iteratable {}; - -template -struct bidirectional_iteratable - : forward_iteratable > {}; - -// To avoid repeated derivation from equality_comparable, -// which is an indirect base class of bidirectional_iterable, -// random_access_iteratable must not be derived from totally_ordered1 -// but from less_than_comparable1 only. (Helmut Zeisel, 02-Dec-2001) -template -struct random_access_iteratable - : bidirectional_iteratable > > > {}; - -#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE -} // namespace boost -#endif // BOOST_NO_OPERATORS_IN_NAMESPACE - - -// BOOST_IMPORT_TEMPLATE1 .. BOOST_IMPORT_TEMPLATE4 - -// -// When BOOST_NO_OPERATORS_IN_NAMESPACE is defined we need a way to import an -// operator template into the boost namespace. BOOST_IMPORT_TEMPLATE1 is used -// for one-argument forms of operator templates; BOOST_IMPORT_TEMPLATE2 for -// two-argument forms. Note that these macros expect to be invoked from within -// boost. - -#ifndef BOOST_NO_OPERATORS_IN_NAMESPACE - - // The template is already in boost so we have nothing to do. -# define BOOST_IMPORT_TEMPLATE4(template_name) -# define BOOST_IMPORT_TEMPLATE3(template_name) -# define BOOST_IMPORT_TEMPLATE2(template_name) -# define BOOST_IMPORT_TEMPLATE1(template_name) - -#else // BOOST_NO_OPERATORS_IN_NAMESPACE - -# ifndef BOOST_NO_USING_TEMPLATE - - // Bring the names in with a using-declaration - // to avoid stressing the compiler. -# define BOOST_IMPORT_TEMPLATE4(template_name) using ::template_name; -# define BOOST_IMPORT_TEMPLATE3(template_name) using ::template_name; -# define BOOST_IMPORT_TEMPLATE2(template_name) using ::template_name; -# define BOOST_IMPORT_TEMPLATE1(template_name) using ::template_name; - -# else - - // Otherwise, because a Borland C++ 5.5 bug prevents a using declaration - // from working, we are forced to use inheritance for that compiler. -# define BOOST_IMPORT_TEMPLATE4(template_name) \ - template \ - struct template_name : ::template_name {}; - -# define BOOST_IMPORT_TEMPLATE3(template_name) \ - template \ - struct template_name : ::template_name {}; - -# define BOOST_IMPORT_TEMPLATE2(template_name) \ - template \ - struct template_name : ::template_name {}; - -# define BOOST_IMPORT_TEMPLATE1(template_name) \ - template \ - struct template_name : ::template_name {}; - -# endif // BOOST_NO_USING_TEMPLATE - -#endif // BOOST_NO_OPERATORS_IN_NAMESPACE - -// -// Here's where we put it all together, defining the xxxx forms of the templates -// in namespace boost. We also define specializations of is_chained_base<> for -// the xxxx, xxxx1, and xxxx2 templates, importing them into boost:: as -// necessary. -// -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -// is_chained_base<> - a traits class used to distinguish whether an operator -// template argument is being used for base class chaining, or is specifying a -// 2nd argument type. - -namespace boost { -// A type parameter is used instead of a plain bool because Borland's compiler -// didn't cope well with the more obvious non-type template parameter. -namespace detail { - struct true_t {}; - struct false_t {}; -} // namespace detail - -// Unspecialized version assumes that most types are not being used for base -// class chaining. We specialize for the operator templates defined in this -// library. -template struct is_chained_base { - typedef ::boost::detail::false_t value; -}; - -} // namespace boost - -// Import a 4-type-argument operator template into boost (if necessary) and -// provide a specialization of 'is_chained_base<>' for it. -# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ - BOOST_IMPORT_TEMPLATE4(template_name4) \ - template \ - struct is_chained_base< ::boost::template_name4 > { \ - typedef ::boost::detail::true_t value; \ - }; - -// Import a 3-type-argument operator template into boost (if necessary) and -// provide a specialization of 'is_chained_base<>' for it. -# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ - BOOST_IMPORT_TEMPLATE3(template_name3) \ - template \ - struct is_chained_base< ::boost::template_name3 > { \ - typedef ::boost::detail::true_t value; \ - }; - -// Import a 2-type-argument operator template into boost (if necessary) and -// provide a specialization of 'is_chained_base<>' for it. -# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ - BOOST_IMPORT_TEMPLATE2(template_name2) \ - template \ - struct is_chained_base< ::boost::template_name2 > { \ - typedef ::boost::detail::true_t value; \ - }; - -// Import a 1-type-argument operator template into boost (if necessary) and -// provide a specialization of 'is_chained_base<>' for it. -# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ - BOOST_IMPORT_TEMPLATE1(template_name1) \ - template \ - struct is_chained_base< ::boost::template_name1 > { \ - typedef ::boost::detail::true_t value; \ - }; - -// BOOST_OPERATOR_TEMPLATE(template_name) defines template_name<> such that it -// can be used for specifying both 1-argument and 2-argument forms. Requires the -// existence of two previously defined class templates named '1' -// and '2' which must implement the corresponding 1- and 2- -// argument forms. -// -// The template type parameter O == is_chained_base::value is used to -// distinguish whether the 2nd argument to is being used for -// base class chaining from another boost operator template or is describing a -// 2nd operand type. O == true_t only when U is actually an another operator -// template from the library. Partial specialization is used to select an -// implementation in terms of either '1' or '2'. -// - -# define BOOST_OPERATOR_TEMPLATE(template_name) \ -template ::value \ - > \ -struct template_name : template_name##2 {}; \ - \ -template \ -struct template_name \ - : template_name##1 {}; \ - \ -template \ -struct template_name \ - : template_name##1 {}; \ - \ -template \ -struct is_chained_base< ::boost::template_name > { \ - typedef ::boost::detail::true_t value; \ -}; \ - \ -BOOST_OPERATOR_TEMPLATE2(template_name##2) \ -BOOST_OPERATOR_TEMPLATE1(template_name##1) - - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -# define BOOST_OPERATOR_TEMPLATE4(template_name4) \ - BOOST_IMPORT_TEMPLATE4(template_name4) -# define BOOST_OPERATOR_TEMPLATE3(template_name3) \ - BOOST_IMPORT_TEMPLATE3(template_name3) -# define BOOST_OPERATOR_TEMPLATE2(template_name2) \ - BOOST_IMPORT_TEMPLATE2(template_name2) -# define BOOST_OPERATOR_TEMPLATE1(template_name1) \ - BOOST_IMPORT_TEMPLATE1(template_name1) - - // In this case we can only assume that template_name<> is equivalent to the - // more commonly needed template_name1<> form. -# define BOOST_OPERATOR_TEMPLATE(template_name) \ - template \ - struct template_name : template_name##1 {}; - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace boost { - -BOOST_OPERATOR_TEMPLATE(less_than_comparable) -BOOST_OPERATOR_TEMPLATE(equality_comparable) -BOOST_OPERATOR_TEMPLATE(multipliable) -BOOST_OPERATOR_TEMPLATE(addable) -BOOST_OPERATOR_TEMPLATE(subtractable) -BOOST_OPERATOR_TEMPLATE2(subtractable2_left) -BOOST_OPERATOR_TEMPLATE(dividable) -BOOST_OPERATOR_TEMPLATE2(dividable2_left) -BOOST_OPERATOR_TEMPLATE(modable) -BOOST_OPERATOR_TEMPLATE2(modable2_left) -BOOST_OPERATOR_TEMPLATE(xorable) -BOOST_OPERATOR_TEMPLATE(andable) -BOOST_OPERATOR_TEMPLATE(orable) - -BOOST_OPERATOR_TEMPLATE1(incrementable) -BOOST_OPERATOR_TEMPLATE1(decrementable) - -BOOST_OPERATOR_TEMPLATE2(dereferenceable) -BOOST_OPERATOR_TEMPLATE3(indexable) - -BOOST_OPERATOR_TEMPLATE(left_shiftable) -BOOST_OPERATOR_TEMPLATE(right_shiftable) -BOOST_OPERATOR_TEMPLATE(equivalent) -BOOST_OPERATOR_TEMPLATE(partially_ordered) - -BOOST_OPERATOR_TEMPLATE(totally_ordered) -BOOST_OPERATOR_TEMPLATE(additive) -BOOST_OPERATOR_TEMPLATE(multiplicative) -BOOST_OPERATOR_TEMPLATE(integer_multiplicative) -BOOST_OPERATOR_TEMPLATE(arithmetic) -BOOST_OPERATOR_TEMPLATE(integer_arithmetic) -BOOST_OPERATOR_TEMPLATE(bitwise) -BOOST_OPERATOR_TEMPLATE1(unit_steppable) -BOOST_OPERATOR_TEMPLATE(shiftable) -BOOST_OPERATOR_TEMPLATE(ring_operators) -BOOST_OPERATOR_TEMPLATE(ordered_ring_operators) -BOOST_OPERATOR_TEMPLATE(field_operators) -BOOST_OPERATOR_TEMPLATE(ordered_field_operators) -BOOST_OPERATOR_TEMPLATE(euclidian_ring_operators) -BOOST_OPERATOR_TEMPLATE(ordered_euclidian_ring_operators) -BOOST_OPERATOR_TEMPLATE2(input_iteratable) -BOOST_OPERATOR_TEMPLATE1(output_iteratable) -BOOST_OPERATOR_TEMPLATE2(forward_iteratable) -BOOST_OPERATOR_TEMPLATE2(bidirectional_iteratable) -BOOST_OPERATOR_TEMPLATE4(random_access_iteratable) - -#undef BOOST_OPERATOR_TEMPLATE -#undef BOOST_OPERATOR_TEMPLATE4 -#undef BOOST_OPERATOR_TEMPLATE3 -#undef BOOST_OPERATOR_TEMPLATE2 -#undef BOOST_OPERATOR_TEMPLATE1 -#undef BOOST_IMPORT_TEMPLATE1 -#undef BOOST_IMPORT_TEMPLATE2 -#undef BOOST_IMPORT_TEMPLATE3 -#undef BOOST_IMPORT_TEMPLATE4 - -// The following 'operators' classes can only be used portably if the derived class -// declares ALL of the required member operators. -template -struct operators2 - : totally_ordered2 > > {}; - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template -struct operators : operators2 {}; - -template struct operators -#else -template struct operators -#endif - : totally_ordered > > > {}; - -// Iterator helper classes (contributed by Jeremy Siek) -------------------// -// (Input and output iterator helpers contributed by Daryle Walker) -------// -// (Changed to use combined operator classes by Daryle Walker) ------------// -template -struct input_iterator_helper - : input_iteratable > {}; - -template -struct output_iterator_helper - : output_iteratable > -{ - T& operator*() { return static_cast(*this); } - T& operator++() { return static_cast(*this); } -}; - -template -struct forward_iterator_helper - : forward_iteratable > {}; - -template -struct bidirectional_iterator_helper - : bidirectional_iteratable > {}; - -template -struct random_access_iterator_helper - : random_access_iteratable > -{ - friend D requires_difference_operator(const T& x, const T& y) { - return x - y; - } -}; // random_access_iterator_helper - -} // namespace boost - -#if defined(__sgi) && !defined(__GNUC__) -#pragma reset woff 1234 -#endif - -#endif // BOOST_OPERATORS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/optional.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/optional.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,922 @@ +// Copyright (C) 2003, Fernando Luis Cacciola Carballal. +// +// Use, modification, and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org/lib/optional for documentation. +// +// You are welcome to contact the author at: +// fernando_cacciola@hotmail.com +// +#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP +#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP + +#include +#include + +#include "boost/config.hpp" +#include "boost/assert.hpp" +#include "boost/type.hpp" +#include "boost/type_traits/alignment_of.hpp" +#include "boost/type_traits/type_with_alignment.hpp" +#include "boost/type_traits/remove_reference.hpp" +#include "boost/type_traits/is_reference.hpp" +#include "boost/mpl/if.hpp" +#include "boost/mpl/bool.hpp" +#include "boost/mpl/not.hpp" +#include "boost/detail/reference_content.hpp" +#include "boost/none.hpp" +#include "boost/utility/compare_pointees.hpp" + +#include "boost/optional/optional_fwd.hpp" + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) +// VC6.0 has the following bug: +// When a templated assignment operator exist, an implicit conversion +// constructing an optional is used when assigment of the form: +// optional opt ; opt = T(...); +// is compiled. +// However, optional's ctor is _explicit_ and the assignemt shouldn't compile. +// Therefore, for VC6.0 templated assignment is disabled. +// +#define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) +// VC7.0 has the following bug: +// When both a non-template and a template copy-ctor exist +// and the templated version is made 'explicit', the explicit is also +// given to the non-templated version, making the class non-implicitely-copyable. +// +#define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR +#endif + +#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) +// AFAICT only VC7.1 correctly resolves the overload set +// that includes the in-place factory taking functions, +// so for the other VC versions, in-place factory support +// is disabled +#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT +#endif + +#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551) +// BCB (5.5.1) cannot parse the nested template struct in an inplace factory. +#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT +#endif + +#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \ + && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581) ) +// BCB (up to 5.64) has the following bug: +// If there is a member function/operator template of the form +// template mfunc( Expr expr ) ; +// some calls are resolved to this even if there are other better matches. +// The effect of this bug is that calls to converting ctors and assignments +// are incrorrectly sink to this general catch-all member function template as shown above. +#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION +#endif + +// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<> +// member template of a factory as used in the optional<> implementation. +// He proposed this simple fix which is to move the call to apply<> outside +// namespace boost. +namespace boost_optional_detail +{ + template + void construct(Factory const& factory, void* address) + { + factory.BOOST_NESTED_TEMPLATE apply(address); + } +} + + +namespace boost { + +class in_place_factory_base ; +class typed_in_place_factory_base ; + +namespace optional_detail { + +// This local class is used instead of that in "aligned_storage.hpp" +// because I've found the 'official' class to ICE BCB5.5 +// when some types are used with optional<> +// (due to sizeof() passed down as a non-type template parameter) +template +class aligned_storage +{ + // Borland ICEs if unnamed unions are used for this! + union dummy_u + { + char data[ sizeof(T) ]; + BOOST_DEDUCED_TYPENAME type_with_alignment< + ::boost::alignment_of::value >::type aligner_; + } dummy_ ; + + public: + + void const* address() const { return &dummy_.data[0]; } + void * address() { return &dummy_.data[0]; } +} ; + +template +struct types_when_isnt_ref +{ + typedef T const& reference_const_type ; + typedef T & reference_type ; + typedef T const* pointer_const_type ; + typedef T * pointer_type ; + typedef T const& argument_type ; +} ; +template +struct types_when_is_ref +{ + typedef BOOST_DEDUCED_TYPENAME remove_reference::type raw_type ; + + typedef raw_type& reference_const_type ; + typedef raw_type& reference_type ; + typedef raw_type* pointer_const_type ; + typedef raw_type* pointer_type ; + typedef raw_type& argument_type ; +} ; + +struct optional_tag {} ; + +template +class optional_base : public optional_tag +{ + private : + + typedef +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) + BOOST_DEDUCED_TYPENAME +#endif + ::boost::detail::make_reference_content::type internal_type ; + + typedef aligned_storage storage_type ; + + typedef types_when_isnt_ref types_when_not_ref ; + typedef types_when_is_ref types_when_ref ; + + typedef optional_base this_type ; + + protected : + + typedef T value_type ; + + typedef mpl::true_ is_reference_tag ; + typedef mpl::false_ is_not_reference_tag ; + + typedef BOOST_DEDUCED_TYPENAME is_reference::type is_reference_predicate ; + + typedef BOOST_DEDUCED_TYPENAME mpl::if_::type types ; + + typedef bool (this_type::*unspecified_bool_type)() const; + + typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ; + typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ; + typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ; + typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ; + typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ; + + // Creates an optional uninitialized. + // No-throw + optional_base() + : + m_initialized(false) {} + + // Creates an optional uninitialized. + // No-throw + optional_base ( none_t ) + : + m_initialized(false) {} + + // Creates an optional initialized with 'val'. + // Can throw if T::T(T const&) does + optional_base ( argument_type val ) + : + m_initialized(false) + { + construct(val); + } + + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional. + // Can throw if T::T(T const&) does + optional_base ( bool cond, argument_type val ) + : + m_initialized(false) + { + if ( cond ) + construct(val); + } + + // Creates a deep copy of another optional + // Can throw if T::T(T const&) does + optional_base ( optional_base const& rhs ) + : + m_initialized(false) + { + if ( rhs.is_initialized() ) + construct(rhs.get_impl()); + } + + + // This is used for both converting and in-place constructions. + // Derived classes use the 'tag' to select the appropriate + // implementation (the correct 'construct()' overload) + template + explicit optional_base ( Expr const& expr, Expr const* tag ) + : + m_initialized(false) + { + construct(expr,tag); + } + + + + // No-throw (assuming T::~T() doesn't) + ~optional_base() { destroy() ; } + + // Assigns from another optional (deep-copies the rhs value) + void assign ( optional_base const& rhs ) + { + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(rhs.get_impl(), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(rhs.get_impl()); + } + } + + // Assigns from another _convertible_ optional (deep-copies the rhs value) + template + void assign ( optional const& rhs ) + { + if (is_initialized()) + { + if ( rhs.is_initialized() ) + assign_value(static_cast(rhs.get()), is_reference_predicate() ); + else destroy(); + } + else + { + if ( rhs.is_initialized() ) + construct(static_cast(rhs.get())); + } + } + + // Assigns from a T (deep-copies the rhs value) + void assign ( argument_type val ) + { + if (is_initialized()) + assign_value(val, is_reference_predicate() ); + else construct(val); + } + + // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED + // No-throw (assuming T::~T() doesn't) + void assign ( none_t ) { destroy(); } + +#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + template + void assign_expr ( Expr const& expr, Expr const* tag ) + { + if (is_initialized()) + assign_expr_to_initialized(expr,tag); + else construct(expr,tag); + } +#endif + + public : + + // Destroys the current value, if any, leaving this UNINITIALIZED + // No-throw (assuming T::~T() doesn't) + void reset() { destroy(); } + + // Replaces the current value -if any- with 'val' + void reset ( argument_type val ) { assign(val); } + + // Returns a pointer to the value if this is initialized, otherwise, + // returns NULL. + // No-throw + pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } + pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } + + bool is_initialized() const { return m_initialized ; } + + protected : + + void construct ( argument_type val ) + { + new (m_storage.address()) internal_type(val) ; + m_initialized = true ; + } + +#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + // Constructs in-place using the given factory + template + void construct ( Expr const& factory, in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + boost_optional_detail::construct(factory, m_storage.address()); + m_initialized = true ; + } + + // Constructs in-place using the given typed factory + template + void construct ( Expr const& factory, typed_in_place_factory_base const* ) + { + BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; + factory.apply(m_storage.address()) ; + m_initialized = true ; + } + + template + void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } + + // Constructs in-place using the given typed factory + template + void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag ) + { + destroy(); + construct(factory,tag); + } +#endif + + // Constructs using any expression implicitely convertible to the single argument + // of a one-argument T constructor. + // Converting constructions of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting constructor of T from U. + template + void construct ( Expr const& expr, void const* ) + { + new (m_storage.address()) internal_type(expr) ; + m_initialized = true ; + } + + // Assigns using a form any expression implicitely convertible to the single argument + // of a T's assignment operator. + // Converting assignments of optional from optional uses this function with + // 'Expr' being of type 'U' and relying on a converting assignment of T from U. + template + void assign_expr_to_initialized ( Expr const& expr, void const* ) + { + assign_value(expr, is_reference_predicate()); + } + +#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION + // BCB5.64 (and probably lower versions) workaround. + // The in-place factories are supported by means of catch-all constructors + // and assignment operators (the functions are parameterized in terms of + // an arbitrary 'Expr' type) + // This compiler incorrectly resolves the overload set and sinks optional and optional + // to the 'Expr'-taking functions even though explicit overloads are present for them. + // Thus, the following overload is needed to properly handle the case when the 'lhs' + // is another optional. + // + // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error + // instead of choosing the wrong overload + // + // Notice that 'Expr' will be optional or optional (but not optional_base<..>) + template + void construct ( Expr const& expr, optional_tag const* ) + { + if ( expr.is_initialized() ) + { + // An exception can be thrown here. + // It it happens, THIS will be left uninitialized. + new (m_storage.address()) internal_type(expr.get()) ; + m_initialized = true ; + } + } +#endif + + void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } + void assign_value ( argument_type val, is_reference_tag ) { construct(val); } + + void destroy() + { + if ( m_initialized ) + destroy_impl(is_reference_predicate()) ; + } + + unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; } + + reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } + reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } + + pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; } + pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; } + + private : + + // internal_type can be either T or reference_content + internal_type const* get_object() const { return static_cast(m_storage.address()); } + internal_type * get_object() { return static_cast (m_storage.address()); } + + // reference_content lacks an implicit conversion to T&, so the following is needed to obtain a proper reference. + reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } + reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; } + reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } + reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) + void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; } +#else + void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } +#endif + + void destroy_impl ( is_reference_tag ) { m_initialized = false ; } + + // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error. + // Decent compilers should disallow conversions from reference_content* to T*, but just in case, + // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference. + pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } + pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } + pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; } + pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; } + + bool m_initialized ; + storage_type m_storage ; +} ; + +} // namespace optional_detail + +template +class optional : public optional_detail::optional_base +{ + typedef optional_detail::optional_base base ; + + typedef BOOST_DEDUCED_TYPENAME base::unspecified_bool_type unspecified_bool_type ; + + public : + + typedef optional this_type ; + + typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ; + typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ; + typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ; + typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ; + typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ; + typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ; + + // Creates an optional uninitialized. + // No-throw + optional() : base() {} + + // Creates an optional uninitialized. + // No-throw + optional( none_t none_ ) : base(none_) {} + + // Creates an optional initialized with 'val'. + // Can throw if T::T(T const&) does + optional ( argument_type val ) : base(val) {} + + // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional. + // Can throw if T::T(T const&) does + optional ( bool cond, argument_type val ) : base(cond,val) {} + +#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR + // NOTE: MSVC needs templated versions first + + // Creates a deep copy of another convertible optional + // Requires a valid conversion from U to T. + // Can throw if T::T(U const&) does + template + explicit optional ( optional const& rhs ) + : + base() + { + if ( rhs.is_initialized() ) + this->construct(rhs.get()); + } +#endif + +#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT + // Creates an optional with an expression which can be either + // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n); + // (b) An instance of TypedInPlaceFactory ( i.e. in_place(a,b,...,n); + // (c) Any expression implicitely convertible to the single type + // of a one-argument T's constructor. + // (d*) Weak compilers (BCB) might also resolved Expr as optional and optional + // even though explicit overloads are present for these. + // Depending on the above some T ctor is called. + // Can throw is the resolved T ctor throws. + template + explicit optional ( Expr const& expr ) : base(expr,&expr) {} +#endif + + // Creates a deep copy of another optional + // Can throw if T::T(T const&) does + optional ( optional const& rhs ) : base(rhs) {} + + // No-throw (assuming T::~T() doesn't) + ~optional() {} + +#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) + // Assigns from an expression. See corresponding constructor. + // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED + template + optional& operator= ( Expr expr ) + { + this->assign_expr(expr,&expr); + return *this ; + } +#endif + + +#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT + // Assigns from another convertible optional (converts && deep-copies the rhs value) + // Requires a valid conversion from U to T. + // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED + template + optional& operator= ( optional const& rhs ) + { + this->assign(rhs); + return *this ; + } +#endif + + // Assigns from another optional (deep-copies the rhs value) + // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED + // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw) + optional& operator= ( optional const& rhs ) + { + this->assign( rhs ) ; + return *this ; + } + + // Assigns from a T (deep-copies the rhs value) + // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED + optional& operator= ( argument_type val ) + { + this->assign( val ) ; + return *this ; + } + + // Assigns from a "none" + // Which destroys the current value, if any, leaving this UNINITIALIZED + // No-throw (assuming T::~T() doesn't) + optional& operator= ( none_t none_ ) + { + this->assign( none_ ) ; + return *this ; + } + + // Returns a reference to the value if this is initialized, otherwise, + // the behaviour is UNDEFINED + // No-throw + reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } + reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } + + // Returns a copy of the value if this is initialized, 'v' otherwise + reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } + reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } + + // Returns a pointer to the value if this is initialized, otherwise, + // the behaviour is UNDEFINED + // No-throw + pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } + pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } + + // Returns a reference to the value if this is initialized, otherwise, + // the behaviour is UNDEFINED + // No-throw + reference_const_type operator *() const { return this->get() ; } + reference_type operator *() { return this->get() ; } + + // implicit conversion to "bool" + // No-throw + operator unspecified_bool_type() const { return this->safe_bool() ; } + + // This is provided for those compilers which don't like the conversion to bool + // on some contexts. + bool operator!() const { return !this->is_initialized() ; } +} ; + +// Returns optional(v) +template +inline +optional make_optional ( T const& v ) +{ + return optional(v); +} + +// Returns optional(cond,v) +template +inline +optional make_optional ( bool cond, T const& v ) +{ + return optional(cond,v); +} + +// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_const_type +get ( optional const& opt ) +{ + return opt.get() ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_type +get ( optional& opt ) +{ + return opt.get() ; +} + +// Returns a pointer to the value if this is initialized, otherwise, returns NULL. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_const_type +get ( optional const* opt ) +{ + return opt->get_ptr() ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_type +get ( optional* opt ) +{ + return opt->get_ptr() ; +} + +// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_const_type +get_optional_value_or ( optional const& opt, BOOST_DEDUCED_TYPENAME optional::reference_const_type v ) +{ + return opt.get_value_or(v) ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::reference_type +get_optional_value_or ( optional& opt, BOOST_DEDUCED_TYPENAME optional::reference_type v ) +{ + return opt.get_value_or(v) ; +} + +// Returns a pointer to the value if this is initialized, otherwise, returns NULL. +// No-throw +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_const_type +get_pointer ( optional const& opt ) +{ + return opt.get_ptr() ; +} + +template +inline +BOOST_DEDUCED_TYPENAME optional::pointer_type +get_pointer ( optional& opt ) +{ + return opt.get_ptr() ; +} + +// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). +// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead. + + +// +// optional vs optional cases +// + +template +inline +bool operator == ( optional const& x, optional const& y ) +{ return equal_pointees(x,y); } + +template +inline +bool operator < ( optional const& x, optional const& y ) +{ return less_pointees(x,y); } + +template +inline +bool operator != ( optional const& x, optional const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( optional const& x, optional const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( optional const& x, optional const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( optional const& x, optional const& y ) +{ return !( x < y ) ; } + + +// +// optional vs T cases +// +template +inline +bool operator == ( optional const& x, T const& y ) +{ return equal_pointees(x, optional(y)); } + +template +inline +bool operator < ( optional const& x, T const& y ) +{ return less_pointees(x, optional(y)); } + +template +inline +bool operator != ( optional const& x, T const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( optional const& x, T const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( optional const& x, T const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( optional const& x, T const& y ) +{ return !( x < y ) ; } + +// +// T vs optional cases +// + +template +inline +bool operator == ( T const& x, optional const& y ) +{ return equal_pointees( optional(x), y ); } + +template +inline +bool operator < ( T const& x, optional const& y ) +{ return less_pointees( optional(x), y ); } + +template +inline +bool operator != ( T const& x, optional const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( T const& x, optional const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( T const& x, optional const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( T const& x, optional const& y ) +{ return !( x < y ) ; } + + +// +// optional vs none cases +// + +template +inline +bool operator == ( optional const& x, none_t ) +{ return equal_pointees(x, optional() ); } + +template +inline +bool operator < ( optional const& x, none_t ) +{ return less_pointees(x,optional() ); } + +template +inline +bool operator != ( optional const& x, none_t y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( optional const& x, none_t y ) +{ return y < x ; } + +template +inline +bool operator <= ( optional const& x, none_t y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( optional const& x, none_t y ) +{ return !( x < y ) ; } + +// +// none vs optional cases +// + +template +inline +bool operator == ( none_t x, optional const& y ) +{ return equal_pointees(optional() ,y); } + +template +inline +bool operator < ( none_t x, optional const& y ) +{ return less_pointees(optional() ,y); } + +template +inline +bool operator != ( none_t x, optional const& y ) +{ return !( x == y ) ; } + +template +inline +bool operator > ( none_t x, optional const& y ) +{ return y < x ; } + +template +inline +bool operator <= ( none_t x, optional const& y ) +{ return !( y < x ) ; } + +template +inline +bool operator >= ( none_t x, optional const& y ) +{ return !( x < y ) ; } + +// +// The following swap implementation follows the GCC workaround as found in +// "boost/detail/compressed_pair.hpp" +// +namespace optional_detail { + +// GCC < 3.2 gets the using declaration at namespace scope (FLC, DWA) +#if BOOST_WORKAROUND(__GNUC__, < 3) \ + || BOOST_WORKAROUND(__GNUC__, == 3) && __GNUC_MINOR__ <= 2 + using std::swap; +#define BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE +#endif + +// optional's swap: +// If both are initialized, calls swap(T&, T&). If this swap throws, both will remain initialized but their values are now unspecified. +// If only one is initialized, calls U.reset(*I), THEN I.reset(). +// If U.reset(*I) throws, both are left UNCHANGED (U is kept uinitialized and I is never reset) +// If both are uninitialized, do nothing (no-throw) +template +inline +void optional_swap ( optional& x, optional& y ) +{ + if ( !x && !!y ) + { + x.reset(*y); + y.reset(); + } + else if ( !!x && !y ) + { + y.reset(*x); + x.reset(); + } + else if ( !!x && !!y ) + { +// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC) +#ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE + // allow for Koenig lookup + using std::swap ; +#endif + swap(*x,*y); + } +} + +} // namespace optional_detail + +template inline void swap ( optional& x, optional& y ) +{ + optional_detail::optional_swap(x,y); +} + + +} // namespace boost + +#endif + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/optional/optional.hpp --- a/epoc32/include/stdapis/boost/optional/optional.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,922 +0,0 @@ -// Copyright (C) 2003, Fernando Luis Cacciola Carballal. -// -// Use, modification, and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org/lib/optional for documentation. -// -// You are welcome to contact the author at: -// fernando_cacciola@hotmail.com -// -#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP -#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP - -#include -#include - -#include "boost/config.hpp" -#include "boost/assert.hpp" -#include "boost/type.hpp" -#include "boost/type_traits/alignment_of.hpp" -#include "boost/type_traits/type_with_alignment.hpp" -#include "boost/type_traits/remove_reference.hpp" -#include "boost/type_traits/is_reference.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/not.hpp" -#include "boost/detail/reference_content.hpp" -#include "boost/none.hpp" -#include "boost/utility/compare_pointees.hpp" - -#include "boost/optional/optional_fwd.hpp" - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1200) -// VC6.0 has the following bug: -// When a templated assignment operator exist, an implicit conversion -// constructing an optional is used when assigment of the form: -// optional opt ; opt = T(...); -// is compiled. -// However, optional's ctor is _explicit_ and the assignemt shouldn't compile. -// Therefore, for VC6.0 templated assignment is disabled. -// -#define BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT -#endif - -#if BOOST_WORKAROUND(BOOST_MSVC, == 1300) -// VC7.0 has the following bug: -// When both a non-template and a template copy-ctor exist -// and the templated version is made 'explicit', the explicit is also -// given to the non-templated version, making the class non-implicitely-copyable. -// -#define BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR -#endif - -#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || BOOST_WORKAROUND(BOOST_INTEL_CXX_VERSION,<=700) -// AFAICT only VC7.1 correctly resolves the overload set -// that includes the in-place factory taking functions, -// so for the other VC versions, in-place factory support -// is disabled -#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT -#endif - -#if BOOST_WORKAROUND(__BORLANDC__, <= 0x551) -// BCB (5.5.1) cannot parse the nested template struct in an inplace factory. -#define BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT -#endif - -#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) \ - && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581) ) -// BCB (up to 5.64) has the following bug: -// If there is a member function/operator template of the form -// template mfunc( Expr expr ) ; -// some calls are resolved to this even if there are other better matches. -// The effect of this bug is that calls to converting ctors and assignments -// are incrorrectly sink to this general catch-all member function template as shown above. -#define BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION -#endif - -// Daniel Wallin discovered that bind/apply.hpp badly interacts with the apply<> -// member template of a factory as used in the optional<> implementation. -// He proposed this simple fix which is to move the call to apply<> outside -// namespace boost. -namespace boost_optional_detail -{ - template - void construct(Factory const& factory, void* address) - { - factory.BOOST_NESTED_TEMPLATE apply(address); - } -} - - -namespace boost { - -class in_place_factory_base ; -class typed_in_place_factory_base ; - -namespace optional_detail { - -// This local class is used instead of that in "aligned_storage.hpp" -// because I've found the 'official' class to ICE BCB5.5 -// when some types are used with optional<> -// (due to sizeof() passed down as a non-type template parameter) -template -class aligned_storage -{ - // Borland ICEs if unnamed unions are used for this! - union dummy_u - { - char data[ sizeof(T) ]; - BOOST_DEDUCED_TYPENAME type_with_alignment< - ::boost::alignment_of::value >::type aligner_; - } dummy_ ; - - public: - - void const* address() const { return &dummy_.data[0]; } - void * address() { return &dummy_.data[0]; } -} ; - -template -struct types_when_isnt_ref -{ - typedef T const& reference_const_type ; - typedef T & reference_type ; - typedef T const* pointer_const_type ; - typedef T * pointer_type ; - typedef T const& argument_type ; -} ; -template -struct types_when_is_ref -{ - typedef BOOST_DEDUCED_TYPENAME remove_reference::type raw_type ; - - typedef raw_type& reference_const_type ; - typedef raw_type& reference_type ; - typedef raw_type* pointer_const_type ; - typedef raw_type* pointer_type ; - typedef raw_type& argument_type ; -} ; - -struct optional_tag {} ; - -template -class optional_base : public optional_tag -{ - private : - - typedef -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - BOOST_DEDUCED_TYPENAME -#endif - ::boost::detail::make_reference_content::type internal_type ; - - typedef aligned_storage storage_type ; - - typedef types_when_isnt_ref types_when_not_ref ; - typedef types_when_is_ref types_when_ref ; - - typedef optional_base this_type ; - - protected : - - typedef T value_type ; - - typedef mpl::true_ is_reference_tag ; - typedef mpl::false_ is_not_reference_tag ; - - typedef BOOST_DEDUCED_TYPENAME is_reference::type is_reference_predicate ; - - typedef BOOST_DEDUCED_TYPENAME mpl::if_::type types ; - - typedef bool (this_type::*unspecified_bool_type)() const; - - typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ; - typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ; - typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ; - typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ; - typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ; - - // Creates an optional uninitialized. - // No-throw - optional_base() - : - m_initialized(false) {} - - // Creates an optional uninitialized. - // No-throw - optional_base ( none_t ) - : - m_initialized(false) {} - - // Creates an optional initialized with 'val'. - // Can throw if T::T(T const&) does - optional_base ( argument_type val ) - : - m_initialized(false) - { - construct(val); - } - - // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialzed optional. - // Can throw if T::T(T const&) does - optional_base ( bool cond, argument_type val ) - : - m_initialized(false) - { - if ( cond ) - construct(val); - } - - // Creates a deep copy of another optional - // Can throw if T::T(T const&) does - optional_base ( optional_base const& rhs ) - : - m_initialized(false) - { - if ( rhs.is_initialized() ) - construct(rhs.get_impl()); - } - - - // This is used for both converting and in-place constructions. - // Derived classes use the 'tag' to select the appropriate - // implementation (the correct 'construct()' overload) - template - explicit optional_base ( Expr const& expr, Expr const* tag ) - : - m_initialized(false) - { - construct(expr,tag); - } - - - - // No-throw (assuming T::~T() doesn't) - ~optional_base() { destroy() ; } - - // Assigns from another optional (deep-copies the rhs value) - void assign ( optional_base const& rhs ) - { - if (is_initialized()) - { - if ( rhs.is_initialized() ) - assign_value(rhs.get_impl(), is_reference_predicate() ); - else destroy(); - } - else - { - if ( rhs.is_initialized() ) - construct(rhs.get_impl()); - } - } - - // Assigns from another _convertible_ optional (deep-copies the rhs value) - template - void assign ( optional const& rhs ) - { - if (is_initialized()) - { - if ( rhs.is_initialized() ) - assign_value(static_cast(rhs.get()), is_reference_predicate() ); - else destroy(); - } - else - { - if ( rhs.is_initialized() ) - construct(static_cast(rhs.get())); - } - } - - // Assigns from a T (deep-copies the rhs value) - void assign ( argument_type val ) - { - if (is_initialized()) - assign_value(val, is_reference_predicate() ); - else construct(val); - } - - // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED - // No-throw (assuming T::~T() doesn't) - void assign ( none_t ) { destroy(); } - -#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT - template - void assign_expr ( Expr const& expr, Expr const* tag ) - { - if (is_initialized()) - assign_expr_to_initialized(expr,tag); - else construct(expr,tag); - } -#endif - - public : - - // Destroys the current value, if any, leaving this UNINITIALIZED - // No-throw (assuming T::~T() doesn't) - void reset() { destroy(); } - - // Replaces the current value -if any- with 'val' - void reset ( argument_type val ) { assign(val); } - - // Returns a pointer to the value if this is initialized, otherwise, - // returns NULL. - // No-throw - pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; } - pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; } - - bool is_initialized() const { return m_initialized ; } - - protected : - - void construct ( argument_type val ) - { - new (m_storage.address()) internal_type(val) ; - m_initialized = true ; - } - -#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT - // Constructs in-place using the given factory - template - void construct ( Expr const& factory, in_place_factory_base const* ) - { - BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; - boost_optional_detail::construct(factory, m_storage.address()); - m_initialized = true ; - } - - // Constructs in-place using the given typed factory - template - void construct ( Expr const& factory, typed_in_place_factory_base const* ) - { - BOOST_STATIC_ASSERT ( ::boost::mpl::not_::value ) ; - factory.apply(m_storage.address()) ; - m_initialized = true ; - } - - template - void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag ) - { - destroy(); - construct(factory,tag); - } - - // Constructs in-place using the given typed factory - template - void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag ) - { - destroy(); - construct(factory,tag); - } -#endif - - // Constructs using any expression implicitely convertible to the single argument - // of a one-argument T constructor. - // Converting constructions of optional from optional uses this function with - // 'Expr' being of type 'U' and relying on a converting constructor of T from U. - template - void construct ( Expr const& expr, void const* ) - { - new (m_storage.address()) internal_type(expr) ; - m_initialized = true ; - } - - // Assigns using a form any expression implicitely convertible to the single argument - // of a T's assignment operator. - // Converting assignments of optional from optional uses this function with - // 'Expr' being of type 'U' and relying on a converting assignment of T from U. - template - void assign_expr_to_initialized ( Expr const& expr, void const* ) - { - assign_value(expr, is_reference_predicate()); - } - -#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION - // BCB5.64 (and probably lower versions) workaround. - // The in-place factories are supported by means of catch-all constructors - // and assignment operators (the functions are parameterized in terms of - // an arbitrary 'Expr' type) - // This compiler incorrectly resolves the overload set and sinks optional and optional - // to the 'Expr'-taking functions even though explicit overloads are present for them. - // Thus, the following overload is needed to properly handle the case when the 'lhs' - // is another optional. - // - // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error - // instead of choosing the wrong overload - // - // Notice that 'Expr' will be optional or optional (but not optional_base<..>) - template - void construct ( Expr const& expr, optional_tag const* ) - { - if ( expr.is_initialized() ) - { - // An exception can be thrown here. - // It it happens, THIS will be left uninitialized. - new (m_storage.address()) internal_type(expr.get()) ; - m_initialized = true ; - } - } -#endif - - void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; } - void assign_value ( argument_type val, is_reference_tag ) { construct(val); } - - void destroy() - { - if ( m_initialized ) - destroy_impl(is_reference_predicate()) ; - } - - unspecified_bool_type safe_bool() const { return m_initialized ? &this_type::is_initialized : 0 ; } - - reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; } - reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; } - - pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; } - pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; } - - private : - - // internal_type can be either T or reference_content - internal_type const* get_object() const { return static_cast(m_storage.address()); } - internal_type * get_object() { return static_cast (m_storage.address()); } - - // reference_content lacks an implicit conversion to T&, so the following is needed to obtain a proper reference. - reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; } - reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; } - reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; } - reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; } - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581)) - void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; } -#else - void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->T::~T() ; m_initialized = false ; } -#endif - - void destroy_impl ( is_reference_tag ) { m_initialized = false ; } - - // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error. - // Decent compilers should disallow conversions from reference_content* to T*, but just in case, - // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference. - pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; } - pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; } - pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; } - pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; } - - bool m_initialized ; - storage_type m_storage ; -} ; - -} // namespace optional_detail - -template -class optional : public optional_detail::optional_base -{ - typedef optional_detail::optional_base base ; - - typedef BOOST_DEDUCED_TYPENAME base::unspecified_bool_type unspecified_bool_type ; - - public : - - typedef optional this_type ; - - typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ; - typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ; - typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ; - typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ; - typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ; - typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ; - - // Creates an optional uninitialized. - // No-throw - optional() : base() {} - - // Creates an optional uninitialized. - // No-throw - optional( none_t none_ ) : base(none_) {} - - // Creates an optional initialized with 'val'. - // Can throw if T::T(T const&) does - optional ( argument_type val ) : base(val) {} - - // Creates an optional initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional. - // Can throw if T::T(T const&) does - optional ( bool cond, argument_type val ) : base(cond,val) {} - -#ifndef BOOST_OPTIONAL_NO_CONVERTING_COPY_CTOR - // NOTE: MSVC needs templated versions first - - // Creates a deep copy of another convertible optional - // Requires a valid conversion from U to T. - // Can throw if T::T(U const&) does - template - explicit optional ( optional const& rhs ) - : - base() - { - if ( rhs.is_initialized() ) - this->construct(rhs.get()); - } -#endif - -#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT - // Creates an optional with an expression which can be either - // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n); - // (b) An instance of TypedInPlaceFactory ( i.e. in_place(a,b,...,n); - // (c) Any expression implicitely convertible to the single type - // of a one-argument T's constructor. - // (d*) Weak compilers (BCB) might also resolved Expr as optional and optional - // even though explicit overloads are present for these. - // Depending on the above some T ctor is called. - // Can throw is the resolved T ctor throws. - template - explicit optional ( Expr const& expr ) : base(expr,&expr) {} -#endif - - // Creates a deep copy of another optional - // Can throw if T::T(T const&) does - optional ( optional const& rhs ) : base(rhs) {} - - // No-throw (assuming T::~T() doesn't) - ~optional() {} - -#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION) - // Assigns from an expression. See corresponding constructor. - // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED - template - optional& operator= ( Expr expr ) - { - this->assign_expr(expr,&expr); - return *this ; - } -#endif - - -#ifndef BOOST_OPTIONAL_NO_CONVERTING_ASSIGNMENT - // Assigns from another convertible optional (converts && deep-copies the rhs value) - // Requires a valid conversion from U to T. - // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED - template - optional& operator= ( optional const& rhs ) - { - this->assign(rhs); - return *this ; - } -#endif - - // Assigns from another optional (deep-copies the rhs value) - // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED - // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw) - optional& operator= ( optional const& rhs ) - { - this->assign( rhs ) ; - return *this ; - } - - // Assigns from a T (deep-copies the rhs value) - // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED - optional& operator= ( argument_type val ) - { - this->assign( val ) ; - return *this ; - } - - // Assigns from a "none" - // Which destroys the current value, if any, leaving this UNINITIALIZED - // No-throw (assuming T::~T() doesn't) - optional& operator= ( none_t none_ ) - { - this->assign( none_ ) ; - return *this ; - } - - // Returns a reference to the value if this is initialized, otherwise, - // the behaviour is UNDEFINED - // No-throw - reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } - reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); } - - // Returns a copy of the value if this is initialized, 'v' otherwise - reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; } - reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; } - - // Returns a pointer to the value if this is initialized, otherwise, - // the behaviour is UNDEFINED - // No-throw - pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } - pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; } - - // Returns a reference to the value if this is initialized, otherwise, - // the behaviour is UNDEFINED - // No-throw - reference_const_type operator *() const { return this->get() ; } - reference_type operator *() { return this->get() ; } - - // implicit conversion to "bool" - // No-throw - operator unspecified_bool_type() const { return this->safe_bool() ; } - - // This is provided for those compilers which don't like the conversion to bool - // on some contexts. - bool operator!() const { return !this->is_initialized() ; } -} ; - -// Returns optional(v) -template -inline -optional make_optional ( T const& v ) -{ - return optional(v); -} - -// Returns optional(cond,v) -template -inline -optional make_optional ( bool cond, T const& v ) -{ - return optional(cond,v); -} - -// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. -// No-throw -template -inline -BOOST_DEDUCED_TYPENAME optional::reference_const_type -get ( optional const& opt ) -{ - return opt.get() ; -} - -template -inline -BOOST_DEDUCED_TYPENAME optional::reference_type -get ( optional& opt ) -{ - return opt.get() ; -} - -// Returns a pointer to the value if this is initialized, otherwise, returns NULL. -// No-throw -template -inline -BOOST_DEDUCED_TYPENAME optional::pointer_const_type -get ( optional const* opt ) -{ - return opt->get_ptr() ; -} - -template -inline -BOOST_DEDUCED_TYPENAME optional::pointer_type -get ( optional* opt ) -{ - return opt->get_ptr() ; -} - -// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED. -// No-throw -template -inline -BOOST_DEDUCED_TYPENAME optional::reference_const_type -get_optional_value_or ( optional const& opt, BOOST_DEDUCED_TYPENAME optional::reference_const_type v ) -{ - return opt.get_value_or(v) ; -} - -template -inline -BOOST_DEDUCED_TYPENAME optional::reference_type -get_optional_value_or ( optional& opt, BOOST_DEDUCED_TYPENAME optional::reference_type v ) -{ - return opt.get_value_or(v) ; -} - -// Returns a pointer to the value if this is initialized, otherwise, returns NULL. -// No-throw -template -inline -BOOST_DEDUCED_TYPENAME optional::pointer_const_type -get_pointer ( optional const& opt ) -{ - return opt.get_ptr() ; -} - -template -inline -BOOST_DEDUCED_TYPENAME optional::pointer_type -get_pointer ( optional& opt ) -{ - return opt.get_ptr() ; -} - -// optional's relational operators ( ==, !=, <, >, <=, >= ) have deep-semantics (compare values). -// WARNING: This is UNLIKE pointers. Use equal_pointees()/less_pointess() in generic code instead. - - -// -// optional vs optional cases -// - -template -inline -bool operator == ( optional const& x, optional const& y ) -{ return equal_pointees(x,y); } - -template -inline -bool operator < ( optional const& x, optional const& y ) -{ return less_pointees(x,y); } - -template -inline -bool operator != ( optional const& x, optional const& y ) -{ return !( x == y ) ; } - -template -inline -bool operator > ( optional const& x, optional const& y ) -{ return y < x ; } - -template -inline -bool operator <= ( optional const& x, optional const& y ) -{ return !( y < x ) ; } - -template -inline -bool operator >= ( optional const& x, optional const& y ) -{ return !( x < y ) ; } - - -// -// optional vs T cases -// -template -inline -bool operator == ( optional const& x, T const& y ) -{ return equal_pointees(x, optional(y)); } - -template -inline -bool operator < ( optional const& x, T const& y ) -{ return less_pointees(x, optional(y)); } - -template -inline -bool operator != ( optional const& x, T const& y ) -{ return !( x == y ) ; } - -template -inline -bool operator > ( optional const& x, T const& y ) -{ return y < x ; } - -template -inline -bool operator <= ( optional const& x, T const& y ) -{ return !( y < x ) ; } - -template -inline -bool operator >= ( optional const& x, T const& y ) -{ return !( x < y ) ; } - -// -// T vs optional cases -// - -template -inline -bool operator == ( T const& x, optional const& y ) -{ return equal_pointees( optional(x), y ); } - -template -inline -bool operator < ( T const& x, optional const& y ) -{ return less_pointees( optional(x), y ); } - -template -inline -bool operator != ( T const& x, optional const& y ) -{ return !( x == y ) ; } - -template -inline -bool operator > ( T const& x, optional const& y ) -{ return y < x ; } - -template -inline -bool operator <= ( T const& x, optional const& y ) -{ return !( y < x ) ; } - -template -inline -bool operator >= ( T const& x, optional const& y ) -{ return !( x < y ) ; } - - -// -// optional vs none cases -// - -template -inline -bool operator == ( optional const& x, none_t ) -{ return equal_pointees(x, optional() ); } - -template -inline -bool operator < ( optional const& x, none_t ) -{ return less_pointees(x,optional() ); } - -template -inline -bool operator != ( optional const& x, none_t y ) -{ return !( x == y ) ; } - -template -inline -bool operator > ( optional const& x, none_t y ) -{ return y < x ; } - -template -inline -bool operator <= ( optional const& x, none_t y ) -{ return !( y < x ) ; } - -template -inline -bool operator >= ( optional const& x, none_t y ) -{ return !( x < y ) ; } - -// -// none vs optional cases -// - -template -inline -bool operator == ( none_t x, optional const& y ) -{ return equal_pointees(optional() ,y); } - -template -inline -bool operator < ( none_t x, optional const& y ) -{ return less_pointees(optional() ,y); } - -template -inline -bool operator != ( none_t x, optional const& y ) -{ return !( x == y ) ; } - -template -inline -bool operator > ( none_t x, optional const& y ) -{ return y < x ; } - -template -inline -bool operator <= ( none_t x, optional const& y ) -{ return !( y < x ) ; } - -template -inline -bool operator >= ( none_t x, optional const& y ) -{ return !( x < y ) ; } - -// -// The following swap implementation follows the GCC workaround as found in -// "boost/detail/compressed_pair.hpp" -// -namespace optional_detail { - -// GCC < 3.2 gets the using declaration at namespace scope (FLC, DWA) -#if BOOST_WORKAROUND(__GNUC__, < 3) \ - || BOOST_WORKAROUND(__GNUC__, == 3) && __GNUC_MINOR__ <= 2 - using std::swap; -#define BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE -#endif - -// optional's swap: -// If both are initialized, calls swap(T&, T&). If this swap throws, both will remain initialized but their values are now unspecified. -// If only one is initialized, calls U.reset(*I), THEN I.reset(). -// If U.reset(*I) throws, both are left UNCHANGED (U is kept uinitialized and I is never reset) -// If both are uninitialized, do nothing (no-throw) -template -inline -void optional_swap ( optional& x, optional& y ) -{ - if ( !x && !!y ) - { - x.reset(*y); - y.reset(); - } - else if ( !!x && !y ) - { - y.reset(*x); - x.reset(); - } - else if ( !!x && !!y ) - { -// GCC > 3.2 and all other compilers have the using declaration at function scope (FLC) -#ifndef BOOST_OPTIONAL_STD_SWAP_INTRODUCED_AT_NS_SCOPE - // allow for Koenig lookup - using std::swap ; -#endif - swap(*x,*y); - } -} - -} // namespace optional_detail - -template inline void swap ( optional& x, optional& y ) -{ - optional_detail::optional_swap(x,y); -} - - -} // namespace boost - -#endif - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/pending/detail/disjoint_sets.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/pending/detail/disjoint_sets.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,220 @@ +// +//======================================================================= +// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. +// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +//======================================================================= +// +#ifndef BOOST_DISJOINT_SETS_HPP +#define BOOST_DISJOINT_SETS_HPP + +#include +#include +#include + +namespace boost { + + struct find_with_path_halving { + template + Vertex operator()(ParentPA p, Vertex v) { + return detail::find_representative_with_path_halving(p, v); + } + }; + + struct find_with_full_path_compression { + template + Vertex operator()(ParentPA p, Vertex v){ + return detail::find_representative_with_full_compression(p, v); + } + }; + + // This is a generalized functor to provide disjoint sets operations + // with "union by rank" and "path compression". A disjoint-set data + // structure maintains a collection S={S1, S2, ..., Sk} of disjoint + // sets. Each set is identified by a representative, which is some + // member of of the set. Sets are represented by rooted trees. Two + // heuristics: "union by rank" and "path compression" are used to + // speed up the operations. + + // Disjoint Set requires two vertex properties for internal use. A + // RankPA and a ParentPA. The RankPA must map Vertex to some Integral type + // (preferably the size_type associated with Vertex). The ParentPA + // must map Vertex to Vertex. + template + class disjoint_sets { + typedef disjoint_sets self; + + inline disjoint_sets() {} + public: + inline disjoint_sets(RankPA r, ParentPA p) + : rank(r), parent(p) {} + + inline disjoint_sets(const self& c) + : rank(c.rank), parent(c.parent) {} + + // Make Set -- Create a singleton set containing vertex x + template + inline void make_set(Element x) + { + put(parent, x, x); + typedef typename property_traits::value_type R; + put(rank, x, R()); + } + + // Link - union the two sets represented by vertex x and y + template + inline void link(Element x, Element y) + { + detail::link_sets(parent, rank, x, y, rep); + } + + // Union-Set - union the two sets containing vertex x and y + template + inline void union_set(Element x, Element y) + { + link(find_set(x), find_set(y)); + } + + // Find-Set - returns the Element representative of the set + // containing Element x and applies path compression. + template + inline Element find_set(Element x) + { + return rep(parent, x); + } + + template + inline std::size_t count_sets(ElementIterator first, ElementIterator last) + { + std::size_t count = 0; + for ( ; first != last; ++first) + if (get(parent, *first) == *first) + ++count; + return count; + } + + template + inline void normalize_sets(ElementIterator first, ElementIterator last) + { + for (; first != last; ++first) + detail::normalize_node(parent, *first); + } + + template + inline void compress_sets(ElementIterator first, ElementIterator last) + { + for (; first != last; ++first) + detail::find_representative_with_full_compression(parent, *first); + } + protected: + RankPA rank; + ParentPA parent; + FindCompress rep; + }; + + + + + template + class disjoint_sets_with_storage + { + typedef typename property_traits::value_type Index; + typedef std::vector ParentContainer; + typedef std::vector RankContainer; + public: + typedef typename ParentContainer::size_type size_type; + + disjoint_sets_with_storage(size_type n = 0, + ID id_ = ID(), + InverseID inv = InverseID()) + : id(id_), id_to_vertex(inv), rank(n, 0), parent(n) + { + for (Index i = 0; i < n; ++i) + parent[i] = i; + } + // note this is not normally needed + template + inline void + make_set(Element x) { + parent[x] = x; + rank[x] = 0; + } + template + inline void + link(Element x, Element y) + { + extend_sets(x,y); + detail::link_sets(&parent[0], &rank[0], + get(id,x), get(id,y), rep); + } + template + inline void + union_set(Element x, Element y) { + Element rx = find_set(x); + Element ry = find_set(y); + link(rx, ry); + } + template + inline Element find_set(Element x) { + return id_to_vertex[rep(&parent[0], get(id,x))]; + } + + template + inline std::size_t count_sets(ElementIterator first, ElementIterator last) + { + std::size_t count = 0; + for ( ; first != last; ++first) + if (parent[*first] == *first) + ++count; + return count; + } + + template + inline void normalize_sets(ElementIterator first, ElementIterator last) + { + for (; first != last; ++first) + detail::normalize_node(&parent[0], *first); + } + + template + inline void compress_sets(ElementIterator first, ElementIterator last) + { + for (; first != last; ++first) + detail::find_representative_with_full_compression(&parent[0], + *first); + } + + const ParentContainer& parents() { return parent; } + + protected: + + template + inline void + extend_sets(Element x, Element y) + { + Index needed = get(id,x) > get(id,y) ? get(id,x) + 1 : get(id,y) + 1; + if (needed > parent.size()) { + rank.insert(rank.end(), needed - rank.size(), 0); + for (Index k = parent.size(); k < needed; ++k) + parent.push_back(k); + } + } + + ID id; + InverseID id_to_vertex; + RankContainer rank; + ParentContainer parent; + FindCompress rep; + }; + +} // namespace boost + +#endif // BOOST_DISJOINT_SETS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/pending/detail/property.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/pending/detail/property.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,132 @@ +// (C) Copyright Jeremy Siek 2004 +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +#ifndef BOOST_PROPERTY_HPP +#define BOOST_PROPERTY_HPP + +#include + +namespace boost { + + struct no_property { + typedef no_property tag_type; + typedef no_property next_type; + typedef no_property value_type; + enum { num = 0 }; + typedef void kind; + }; + + template + struct property : public Base { + typedef Base next_type; + typedef Tag tag_type; + typedef T value_type; +#if BOOST_WORKAROUND (__GNUC__, < 3) + property() { } +#else + property() : m_value() { } +#endif + property(const T& v) : m_value(v) { } + property(const T& v, const Base& b) : Base(b), m_value(v) { } + // copy constructor and assignment operator will be generated by compiler + + T m_value; + }; + + // The BGL properties specialize property_kind and + // property_num, and use enum's for the Property type (see + // graph/properties.hpp), but the user may want to use a class + // instead with a nested kind type and num. Also, we may want to + // switch BGL back to using class types for properties at some point. + + template + struct property_kind { + typedef typename PropertyTag::kind type; + }; + + template + struct has_property { + BOOST_STATIC_CONSTANT(bool, value = true); + typedef true_type type; + }; + template <> + struct has_property { + BOOST_STATIC_CONSTANT(bool, value = false); + typedef false_type type; + }; + +} // namespace boost + +#include + +namespace boost { + + template + struct property_value { +#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + typedef typename detail::build_property_tag_value_alist::type AList; + typedef typename detail::extract_value::type type; +#else + typedef typename detail::build_property_tag_value_alist::type AList; + typedef typename detail::ev_selector::type Extractor; + typedef typename Extractor::template bind_::type type; +#endif + }; + + template + inline typename property_value, Tag2>::type& + get_property_value(property& p, Tag2 tag2) { + BOOST_STATIC_CONSTANT(bool, + match = (detail::same_property::value)); + typedef property Prop; + typedef typename property_value::type T2; + T2* t2 = 0; + typedef detail::property_value_dispatch Dispatcher; + return Dispatcher::get_value(p, t2, tag2); + } + template + inline + const typename property_value, Tag2>::type& + get_property_value(const property& p, Tag2 tag2) { + BOOST_STATIC_CONSTANT(bool, + match = (detail::same_property::value)); + typedef property Prop; + typedef typename property_value::type T2; + T2* t2 = 0; + typedef detail::property_value_dispatch Dispatcher; + return Dispatcher::const_get_value(p, t2, tag2); + } + + namespace detail { +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + template + struct retag_property_list + { + typedef property type; + typedef FinalType retagged; + }; + + template + struct retag_property_list > + { + private: + typedef retag_property_list next; + + public: + typedef property type; + typedef typename next::retagged retagged; + }; + + template + struct retag_property_list + { + typedef no_property type; + typedef no_property retagged; + }; +#endif + } +} // namesapce boost + +#endif /* BOOST_PROPERTY_HPP */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/pending/disjoint_sets.hpp --- a/epoc32/include/stdapis/boost/pending/disjoint_sets.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,220 +0,0 @@ -// -//======================================================================= -// Copyright 1997, 1998, 1999, 2000 University of Notre Dame. -// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -//======================================================================= -// -#ifndef BOOST_DISJOINT_SETS_HPP -#define BOOST_DISJOINT_SETS_HPP - -#include -#include -#include - -namespace boost { - - struct find_with_path_halving { - template - Vertex operator()(ParentPA p, Vertex v) { - return detail::find_representative_with_path_halving(p, v); - } - }; - - struct find_with_full_path_compression { - template - Vertex operator()(ParentPA p, Vertex v){ - return detail::find_representative_with_full_compression(p, v); - } - }; - - // This is a generalized functor to provide disjoint sets operations - // with "union by rank" and "path compression". A disjoint-set data - // structure maintains a collection S={S1, S2, ..., Sk} of disjoint - // sets. Each set is identified by a representative, which is some - // member of of the set. Sets are represented by rooted trees. Two - // heuristics: "union by rank" and "path compression" are used to - // speed up the operations. - - // Disjoint Set requires two vertex properties for internal use. A - // RankPA and a ParentPA. The RankPA must map Vertex to some Integral type - // (preferably the size_type associated with Vertex). The ParentPA - // must map Vertex to Vertex. - template - class disjoint_sets { - typedef disjoint_sets self; - - inline disjoint_sets() {} - public: - inline disjoint_sets(RankPA r, ParentPA p) - : rank(r), parent(p) {} - - inline disjoint_sets(const self& c) - : rank(c.rank), parent(c.parent) {} - - // Make Set -- Create a singleton set containing vertex x - template - inline void make_set(Element x) - { - put(parent, x, x); - typedef typename property_traits::value_type R; - put(rank, x, R()); - } - - // Link - union the two sets represented by vertex x and y - template - inline void link(Element x, Element y) - { - detail::link_sets(parent, rank, x, y, rep); - } - - // Union-Set - union the two sets containing vertex x and y - template - inline void union_set(Element x, Element y) - { - link(find_set(x), find_set(y)); - } - - // Find-Set - returns the Element representative of the set - // containing Element x and applies path compression. - template - inline Element find_set(Element x) - { - return rep(parent, x); - } - - template - inline std::size_t count_sets(ElementIterator first, ElementIterator last) - { - std::size_t count = 0; - for ( ; first != last; ++first) - if (get(parent, *first) == *first) - ++count; - return count; - } - - template - inline void normalize_sets(ElementIterator first, ElementIterator last) - { - for (; first != last; ++first) - detail::normalize_node(parent, *first); - } - - template - inline void compress_sets(ElementIterator first, ElementIterator last) - { - for (; first != last; ++first) - detail::find_representative_with_full_compression(parent, *first); - } - protected: - RankPA rank; - ParentPA parent; - FindCompress rep; - }; - - - - - template - class disjoint_sets_with_storage - { - typedef typename property_traits::value_type Index; - typedef std::vector ParentContainer; - typedef std::vector RankContainer; - public: - typedef typename ParentContainer::size_type size_type; - - disjoint_sets_with_storage(size_type n = 0, - ID id_ = ID(), - InverseID inv = InverseID()) - : id(id_), id_to_vertex(inv), rank(n, 0), parent(n) - { - for (Index i = 0; i < n; ++i) - parent[i] = i; - } - // note this is not normally needed - template - inline void - make_set(Element x) { - parent[x] = x; - rank[x] = 0; - } - template - inline void - link(Element x, Element y) - { - extend_sets(x,y); - detail::link_sets(&parent[0], &rank[0], - get(id,x), get(id,y), rep); - } - template - inline void - union_set(Element x, Element y) { - Element rx = find_set(x); - Element ry = find_set(y); - link(rx, ry); - } - template - inline Element find_set(Element x) { - return id_to_vertex[rep(&parent[0], get(id,x))]; - } - - template - inline std::size_t count_sets(ElementIterator first, ElementIterator last) - { - std::size_t count = 0; - for ( ; first != last; ++first) - if (parent[*first] == *first) - ++count; - return count; - } - - template - inline void normalize_sets(ElementIterator first, ElementIterator last) - { - for (; first != last; ++first) - detail::normalize_node(&parent[0], *first); - } - - template - inline void compress_sets(ElementIterator first, ElementIterator last) - { - for (; first != last; ++first) - detail::find_representative_with_full_compression(&parent[0], - *first); - } - - const ParentContainer& parents() { return parent; } - - protected: - - template - inline void - extend_sets(Element x, Element y) - { - Index needed = get(id,x) > get(id,y) ? get(id,x) + 1 : get(id,y) + 1; - if (needed > parent.size()) { - rank.insert(rank.end(), needed - rank.size(), 0); - for (Index k = parent.size(); k < needed; ++k) - parent.push_back(k); - } - } - - ID id; - InverseID id_to_vertex; - RankContainer rank; - ParentContainer parent; - FindCompress rep; - }; - -} // namespace boost - -#endif // BOOST_DISJOINT_SETS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/pending/property.hpp --- a/epoc32/include/stdapis/boost/pending/property.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -// (C) Copyright Jeremy Siek 2004 -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_PROPERTY_HPP -#define BOOST_PROPERTY_HPP - -#include - -namespace boost { - - struct no_property { - typedef no_property tag_type; - typedef no_property next_type; - typedef no_property value_type; - enum { num = 0 }; - typedef void kind; - }; - - template - struct property : public Base { - typedef Base next_type; - typedef Tag tag_type; - typedef T value_type; -#if BOOST_WORKAROUND (__GNUC__, < 3) - property() { } -#else - property() : m_value() { } -#endif - property(const T& v) : m_value(v) { } - property(const T& v, const Base& b) : Base(b), m_value(v) { } - // copy constructor and assignment operator will be generated by compiler - - T m_value; - }; - - // The BGL properties specialize property_kind and - // property_num, and use enum's for the Property type (see - // graph/properties.hpp), but the user may want to use a class - // instead with a nested kind type and num. Also, we may want to - // switch BGL back to using class types for properties at some point. - - template - struct property_kind { - typedef typename PropertyTag::kind type; - }; - - template - struct has_property { - BOOST_STATIC_CONSTANT(bool, value = true); - typedef true_type type; - }; - template <> - struct has_property { - BOOST_STATIC_CONSTANT(bool, value = false); - typedef false_type type; - }; - -} // namespace boost - -#include - -namespace boost { - - template - struct property_value { -#if !defined BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - typedef typename detail::build_property_tag_value_alist::type AList; - typedef typename detail::extract_value::type type; -#else - typedef typename detail::build_property_tag_value_alist::type AList; - typedef typename detail::ev_selector::type Extractor; - typedef typename Extractor::template bind_::type type; -#endif - }; - - template - inline typename property_value, Tag2>::type& - get_property_value(property& p, Tag2 tag2) { - BOOST_STATIC_CONSTANT(bool, - match = (detail::same_property::value)); - typedef property Prop; - typedef typename property_value::type T2; - T2* t2 = 0; - typedef detail::property_value_dispatch Dispatcher; - return Dispatcher::get_value(p, t2, tag2); - } - template - inline - const typename property_value, Tag2>::type& - get_property_value(const property& p, Tag2 tag2) { - BOOST_STATIC_CONSTANT(bool, - match = (detail::same_property::value)); - typedef property Prop; - typedef typename property_value::type T2; - T2* t2 = 0; - typedef detail::property_value_dispatch Dispatcher; - return Dispatcher::const_get_value(p, t2, tag2); - } - - namespace detail { -#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) - template - struct retag_property_list - { - typedef property type; - typedef FinalType retagged; - }; - - template - struct retag_property_list > - { - private: - typedef retag_property_list next; - - public: - typedef property type; - typedef typename next::retagged retagged; - }; - - template - struct retag_property_list - { - typedef no_property type; - typedef no_property retagged; - }; -#endif - } -} // namesapce boost - -#endif /* BOOST_PROPERTY_HPP */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor.hpp --- a/epoc32/include/stdapis/boost/preprocessor.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org/libs/preprocessor for documentation. */ -# -# ifndef BOOST_PREPROCESSOR_HPP -# define BOOST_PREPROCESSOR_HPP -# -# include -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/arithmetic/inc.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/arithmetic/inc.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,17 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_INC_HPP +# define BOOST_PREPROCESSOR_INC_HPP +# +# include +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/array.hpp --- a/epoc32/include/stdapis/boost/preprocessor/array.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_ARRAY_HPP -# define BOOST_PREPROCESSOR_ARRAY_HPP -# -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/array/elem.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/array/elem.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,385 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP +# define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP +# +# include +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_I(size, index, tuple) +# else +# define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_OO((size, index, tuple)) +# define BOOST_PP_TUPLE_ELEM_OO(par) BOOST_PP_TUPLE_ELEM_I ## par +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i ## t +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_II(BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i t) +# define BOOST_PP_TUPLE_ELEM_II(res) res +# else +# define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i t +# endif +# +# define BOOST_PP_TUPLE_ELEM_1_0(a) a +# +# define BOOST_PP_TUPLE_ELEM_2_0(a, b) a +# define BOOST_PP_TUPLE_ELEM_2_1(a, b) b +# +# define BOOST_PP_TUPLE_ELEM_3_0(a, b, c) a +# define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b +# define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c +# +# define BOOST_PP_TUPLE_ELEM_4_0(a, b, c, d) a +# define BOOST_PP_TUPLE_ELEM_4_1(a, b, c, d) b +# define BOOST_PP_TUPLE_ELEM_4_2(a, b, c, d) c +# define BOOST_PP_TUPLE_ELEM_4_3(a, b, c, d) d +# +# define BOOST_PP_TUPLE_ELEM_5_0(a, b, c, d, e) a +# define BOOST_PP_TUPLE_ELEM_5_1(a, b, c, d, e) b +# define BOOST_PP_TUPLE_ELEM_5_2(a, b, c, d, e) c +# define BOOST_PP_TUPLE_ELEM_5_3(a, b, c, d, e) d +# define BOOST_PP_TUPLE_ELEM_5_4(a, b, c, d, e) e +# +# define BOOST_PP_TUPLE_ELEM_6_0(a, b, c, d, e, f) a +# define BOOST_PP_TUPLE_ELEM_6_1(a, b, c, d, e, f) b +# define BOOST_PP_TUPLE_ELEM_6_2(a, b, c, d, e, f) c +# define BOOST_PP_TUPLE_ELEM_6_3(a, b, c, d, e, f) d +# define BOOST_PP_TUPLE_ELEM_6_4(a, b, c, d, e, f) e +# define BOOST_PP_TUPLE_ELEM_6_5(a, b, c, d, e, f) f +# +# define BOOST_PP_TUPLE_ELEM_7_0(a, b, c, d, e, f, g) a +# define BOOST_PP_TUPLE_ELEM_7_1(a, b, c, d, e, f, g) b +# define BOOST_PP_TUPLE_ELEM_7_2(a, b, c, d, e, f, g) c +# define BOOST_PP_TUPLE_ELEM_7_3(a, b, c, d, e, f, g) d +# define BOOST_PP_TUPLE_ELEM_7_4(a, b, c, d, e, f, g) e +# define BOOST_PP_TUPLE_ELEM_7_5(a, b, c, d, e, f, g) f +# define BOOST_PP_TUPLE_ELEM_7_6(a, b, c, d, e, f, g) g +# +# define BOOST_PP_TUPLE_ELEM_8_0(a, b, c, d, e, f, g, h) a +# define BOOST_PP_TUPLE_ELEM_8_1(a, b, c, d, e, f, g, h) b +# define BOOST_PP_TUPLE_ELEM_8_2(a, b, c, d, e, f, g, h) c +# define BOOST_PP_TUPLE_ELEM_8_3(a, b, c, d, e, f, g, h) d +# define BOOST_PP_TUPLE_ELEM_8_4(a, b, c, d, e, f, g, h) e +# define BOOST_PP_TUPLE_ELEM_8_5(a, b, c, d, e, f, g, h) f +# define BOOST_PP_TUPLE_ELEM_8_6(a, b, c, d, e, f, g, h) g +# define BOOST_PP_TUPLE_ELEM_8_7(a, b, c, d, e, f, g, h) h +# +# define BOOST_PP_TUPLE_ELEM_9_0(a, b, c, d, e, f, g, h, i) a +# define BOOST_PP_TUPLE_ELEM_9_1(a, b, c, d, e, f, g, h, i) b +# define BOOST_PP_TUPLE_ELEM_9_2(a, b, c, d, e, f, g, h, i) c +# define BOOST_PP_TUPLE_ELEM_9_3(a, b, c, d, e, f, g, h, i) d +# define BOOST_PP_TUPLE_ELEM_9_4(a, b, c, d, e, f, g, h, i) e +# define BOOST_PP_TUPLE_ELEM_9_5(a, b, c, d, e, f, g, h, i) f +# define BOOST_PP_TUPLE_ELEM_9_6(a, b, c, d, e, f, g, h, i) g +# define BOOST_PP_TUPLE_ELEM_9_7(a, b, c, d, e, f, g, h, i) h +# define BOOST_PP_TUPLE_ELEM_9_8(a, b, c, d, e, f, g, h, i) i +# +# define BOOST_PP_TUPLE_ELEM_10_0(a, b, c, d, e, f, g, h, i, j) a +# define BOOST_PP_TUPLE_ELEM_10_1(a, b, c, d, e, f, g, h, i, j) b +# define BOOST_PP_TUPLE_ELEM_10_2(a, b, c, d, e, f, g, h, i, j) c +# define BOOST_PP_TUPLE_ELEM_10_3(a, b, c, d, e, f, g, h, i, j) d +# define BOOST_PP_TUPLE_ELEM_10_4(a, b, c, d, e, f, g, h, i, j) e +# define BOOST_PP_TUPLE_ELEM_10_5(a, b, c, d, e, f, g, h, i, j) f +# define BOOST_PP_TUPLE_ELEM_10_6(a, b, c, d, e, f, g, h, i, j) g +# define BOOST_PP_TUPLE_ELEM_10_7(a, b, c, d, e, f, g, h, i, j) h +# define BOOST_PP_TUPLE_ELEM_10_8(a, b, c, d, e, f, g, h, i, j) i +# define BOOST_PP_TUPLE_ELEM_10_9(a, b, c, d, e, f, g, h, i, j) j +# +# define BOOST_PP_TUPLE_ELEM_11_0(a, b, c, d, e, f, g, h, i, j, k) a +# define BOOST_PP_TUPLE_ELEM_11_1(a, b, c, d, e, f, g, h, i, j, k) b +# define BOOST_PP_TUPLE_ELEM_11_2(a, b, c, d, e, f, g, h, i, j, k) c +# define BOOST_PP_TUPLE_ELEM_11_3(a, b, c, d, e, f, g, h, i, j, k) d +# define BOOST_PP_TUPLE_ELEM_11_4(a, b, c, d, e, f, g, h, i, j, k) e +# define BOOST_PP_TUPLE_ELEM_11_5(a, b, c, d, e, f, g, h, i, j, k) f +# define BOOST_PP_TUPLE_ELEM_11_6(a, b, c, d, e, f, g, h, i, j, k) g +# define BOOST_PP_TUPLE_ELEM_11_7(a, b, c, d, e, f, g, h, i, j, k) h +# define BOOST_PP_TUPLE_ELEM_11_8(a, b, c, d, e, f, g, h, i, j, k) i +# define BOOST_PP_TUPLE_ELEM_11_9(a, b, c, d, e, f, g, h, i, j, k) j +# define BOOST_PP_TUPLE_ELEM_11_10(a, b, c, d, e, f, g, h, i, j, k) k +# +# define BOOST_PP_TUPLE_ELEM_12_0(a, b, c, d, e, f, g, h, i, j, k, l) a +# define BOOST_PP_TUPLE_ELEM_12_1(a, b, c, d, e, f, g, h, i, j, k, l) b +# define BOOST_PP_TUPLE_ELEM_12_2(a, b, c, d, e, f, g, h, i, j, k, l) c +# define BOOST_PP_TUPLE_ELEM_12_3(a, b, c, d, e, f, g, h, i, j, k, l) d +# define BOOST_PP_TUPLE_ELEM_12_4(a, b, c, d, e, f, g, h, i, j, k, l) e +# define BOOST_PP_TUPLE_ELEM_12_5(a, b, c, d, e, f, g, h, i, j, k, l) f +# define BOOST_PP_TUPLE_ELEM_12_6(a, b, c, d, e, f, g, h, i, j, k, l) g +# define BOOST_PP_TUPLE_ELEM_12_7(a, b, c, d, e, f, g, h, i, j, k, l) h +# define BOOST_PP_TUPLE_ELEM_12_8(a, b, c, d, e, f, g, h, i, j, k, l) i +# define BOOST_PP_TUPLE_ELEM_12_9(a, b, c, d, e, f, g, h, i, j, k, l) j +# define BOOST_PP_TUPLE_ELEM_12_10(a, b, c, d, e, f, g, h, i, j, k, l) k +# define BOOST_PP_TUPLE_ELEM_12_11(a, b, c, d, e, f, g, h, i, j, k, l) l +# +# define BOOST_PP_TUPLE_ELEM_13_0(a, b, c, d, e, f, g, h, i, j, k, l, m) a +# define BOOST_PP_TUPLE_ELEM_13_1(a, b, c, d, e, f, g, h, i, j, k, l, m) b +# define BOOST_PP_TUPLE_ELEM_13_2(a, b, c, d, e, f, g, h, i, j, k, l, m) c +# define BOOST_PP_TUPLE_ELEM_13_3(a, b, c, d, e, f, g, h, i, j, k, l, m) d +# define BOOST_PP_TUPLE_ELEM_13_4(a, b, c, d, e, f, g, h, i, j, k, l, m) e +# define BOOST_PP_TUPLE_ELEM_13_5(a, b, c, d, e, f, g, h, i, j, k, l, m) f +# define BOOST_PP_TUPLE_ELEM_13_6(a, b, c, d, e, f, g, h, i, j, k, l, m) g +# define BOOST_PP_TUPLE_ELEM_13_7(a, b, c, d, e, f, g, h, i, j, k, l, m) h +# define BOOST_PP_TUPLE_ELEM_13_8(a, b, c, d, e, f, g, h, i, j, k, l, m) i +# define BOOST_PP_TUPLE_ELEM_13_9(a, b, c, d, e, f, g, h, i, j, k, l, m) j +# define BOOST_PP_TUPLE_ELEM_13_10(a, b, c, d, e, f, g, h, i, j, k, l, m) k +# define BOOST_PP_TUPLE_ELEM_13_11(a, b, c, d, e, f, g, h, i, j, k, l, m) l +# define BOOST_PP_TUPLE_ELEM_13_12(a, b, c, d, e, f, g, h, i, j, k, l, m) m +# +# define BOOST_PP_TUPLE_ELEM_14_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n) a +# define BOOST_PP_TUPLE_ELEM_14_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n) b +# define BOOST_PP_TUPLE_ELEM_14_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n) c +# define BOOST_PP_TUPLE_ELEM_14_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n) d +# define BOOST_PP_TUPLE_ELEM_14_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n) e +# define BOOST_PP_TUPLE_ELEM_14_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n) f +# define BOOST_PP_TUPLE_ELEM_14_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n) g +# define BOOST_PP_TUPLE_ELEM_14_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n) h +# define BOOST_PP_TUPLE_ELEM_14_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n) i +# define BOOST_PP_TUPLE_ELEM_14_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n) j +# define BOOST_PP_TUPLE_ELEM_14_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n) k +# define BOOST_PP_TUPLE_ELEM_14_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n) l +# define BOOST_PP_TUPLE_ELEM_14_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n) m +# define BOOST_PP_TUPLE_ELEM_14_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n) n +# +# define BOOST_PP_TUPLE_ELEM_15_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) a +# define BOOST_PP_TUPLE_ELEM_15_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) b +# define BOOST_PP_TUPLE_ELEM_15_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) c +# define BOOST_PP_TUPLE_ELEM_15_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) d +# define BOOST_PP_TUPLE_ELEM_15_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) e +# define BOOST_PP_TUPLE_ELEM_15_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) f +# define BOOST_PP_TUPLE_ELEM_15_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) g +# define BOOST_PP_TUPLE_ELEM_15_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) h +# define BOOST_PP_TUPLE_ELEM_15_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) i +# define BOOST_PP_TUPLE_ELEM_15_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) j +# define BOOST_PP_TUPLE_ELEM_15_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) k +# define BOOST_PP_TUPLE_ELEM_15_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) l +# define BOOST_PP_TUPLE_ELEM_15_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) m +# define BOOST_PP_TUPLE_ELEM_15_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) n +# define BOOST_PP_TUPLE_ELEM_15_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) o +# +# define BOOST_PP_TUPLE_ELEM_16_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) a +# define BOOST_PP_TUPLE_ELEM_16_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) b +# define BOOST_PP_TUPLE_ELEM_16_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) c +# define BOOST_PP_TUPLE_ELEM_16_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) d +# define BOOST_PP_TUPLE_ELEM_16_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) e +# define BOOST_PP_TUPLE_ELEM_16_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) f +# define BOOST_PP_TUPLE_ELEM_16_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) g +# define BOOST_PP_TUPLE_ELEM_16_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) h +# define BOOST_PP_TUPLE_ELEM_16_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) i +# define BOOST_PP_TUPLE_ELEM_16_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) j +# define BOOST_PP_TUPLE_ELEM_16_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) k +# define BOOST_PP_TUPLE_ELEM_16_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) l +# define BOOST_PP_TUPLE_ELEM_16_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) m +# define BOOST_PP_TUPLE_ELEM_16_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) n +# define BOOST_PP_TUPLE_ELEM_16_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) o +# define BOOST_PP_TUPLE_ELEM_16_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) p +# +# define BOOST_PP_TUPLE_ELEM_17_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) a +# define BOOST_PP_TUPLE_ELEM_17_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) b +# define BOOST_PP_TUPLE_ELEM_17_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) c +# define BOOST_PP_TUPLE_ELEM_17_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) d +# define BOOST_PP_TUPLE_ELEM_17_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) e +# define BOOST_PP_TUPLE_ELEM_17_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) f +# define BOOST_PP_TUPLE_ELEM_17_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) g +# define BOOST_PP_TUPLE_ELEM_17_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) h +# define BOOST_PP_TUPLE_ELEM_17_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) i +# define BOOST_PP_TUPLE_ELEM_17_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) j +# define BOOST_PP_TUPLE_ELEM_17_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) k +# define BOOST_PP_TUPLE_ELEM_17_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) l +# define BOOST_PP_TUPLE_ELEM_17_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) m +# define BOOST_PP_TUPLE_ELEM_17_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) n +# define BOOST_PP_TUPLE_ELEM_17_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) o +# define BOOST_PP_TUPLE_ELEM_17_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) p +# define BOOST_PP_TUPLE_ELEM_17_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) q +# +# define BOOST_PP_TUPLE_ELEM_18_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) a +# define BOOST_PP_TUPLE_ELEM_18_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) b +# define BOOST_PP_TUPLE_ELEM_18_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) c +# define BOOST_PP_TUPLE_ELEM_18_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) d +# define BOOST_PP_TUPLE_ELEM_18_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) e +# define BOOST_PP_TUPLE_ELEM_18_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) f +# define BOOST_PP_TUPLE_ELEM_18_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) g +# define BOOST_PP_TUPLE_ELEM_18_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) h +# define BOOST_PP_TUPLE_ELEM_18_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) i +# define BOOST_PP_TUPLE_ELEM_18_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) j +# define BOOST_PP_TUPLE_ELEM_18_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) k +# define BOOST_PP_TUPLE_ELEM_18_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) l +# define BOOST_PP_TUPLE_ELEM_18_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) m +# define BOOST_PP_TUPLE_ELEM_18_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) n +# define BOOST_PP_TUPLE_ELEM_18_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) o +# define BOOST_PP_TUPLE_ELEM_18_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) p +# define BOOST_PP_TUPLE_ELEM_18_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) q +# define BOOST_PP_TUPLE_ELEM_18_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) r +# +# define BOOST_PP_TUPLE_ELEM_19_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) a +# define BOOST_PP_TUPLE_ELEM_19_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) b +# define BOOST_PP_TUPLE_ELEM_19_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) c +# define BOOST_PP_TUPLE_ELEM_19_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) d +# define BOOST_PP_TUPLE_ELEM_19_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) e +# define BOOST_PP_TUPLE_ELEM_19_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) f +# define BOOST_PP_TUPLE_ELEM_19_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) g +# define BOOST_PP_TUPLE_ELEM_19_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) h +# define BOOST_PP_TUPLE_ELEM_19_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) i +# define BOOST_PP_TUPLE_ELEM_19_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) j +# define BOOST_PP_TUPLE_ELEM_19_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) k +# define BOOST_PP_TUPLE_ELEM_19_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) l +# define BOOST_PP_TUPLE_ELEM_19_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) m +# define BOOST_PP_TUPLE_ELEM_19_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) n +# define BOOST_PP_TUPLE_ELEM_19_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) o +# define BOOST_PP_TUPLE_ELEM_19_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) p +# define BOOST_PP_TUPLE_ELEM_19_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) q +# define BOOST_PP_TUPLE_ELEM_19_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) r +# define BOOST_PP_TUPLE_ELEM_19_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) s +# +# define BOOST_PP_TUPLE_ELEM_20_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) a +# define BOOST_PP_TUPLE_ELEM_20_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) b +# define BOOST_PP_TUPLE_ELEM_20_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) c +# define BOOST_PP_TUPLE_ELEM_20_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) d +# define BOOST_PP_TUPLE_ELEM_20_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) e +# define BOOST_PP_TUPLE_ELEM_20_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) f +# define BOOST_PP_TUPLE_ELEM_20_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) g +# define BOOST_PP_TUPLE_ELEM_20_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) h +# define BOOST_PP_TUPLE_ELEM_20_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) i +# define BOOST_PP_TUPLE_ELEM_20_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) j +# define BOOST_PP_TUPLE_ELEM_20_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) k +# define BOOST_PP_TUPLE_ELEM_20_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) l +# define BOOST_PP_TUPLE_ELEM_20_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) m +# define BOOST_PP_TUPLE_ELEM_20_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) n +# define BOOST_PP_TUPLE_ELEM_20_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) o +# define BOOST_PP_TUPLE_ELEM_20_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) p +# define BOOST_PP_TUPLE_ELEM_20_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) q +# define BOOST_PP_TUPLE_ELEM_20_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) r +# define BOOST_PP_TUPLE_ELEM_20_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) s +# define BOOST_PP_TUPLE_ELEM_20_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) t +# +# define BOOST_PP_TUPLE_ELEM_21_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) a +# define BOOST_PP_TUPLE_ELEM_21_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) b +# define BOOST_PP_TUPLE_ELEM_21_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) c +# define BOOST_PP_TUPLE_ELEM_21_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) d +# define BOOST_PP_TUPLE_ELEM_21_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) e +# define BOOST_PP_TUPLE_ELEM_21_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) f +# define BOOST_PP_TUPLE_ELEM_21_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) g +# define BOOST_PP_TUPLE_ELEM_21_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) h +# define BOOST_PP_TUPLE_ELEM_21_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) i +# define BOOST_PP_TUPLE_ELEM_21_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) j +# define BOOST_PP_TUPLE_ELEM_21_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) k +# define BOOST_PP_TUPLE_ELEM_21_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) l +# define BOOST_PP_TUPLE_ELEM_21_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) m +# define BOOST_PP_TUPLE_ELEM_21_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) n +# define BOOST_PP_TUPLE_ELEM_21_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) o +# define BOOST_PP_TUPLE_ELEM_21_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) p +# define BOOST_PP_TUPLE_ELEM_21_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) q +# define BOOST_PP_TUPLE_ELEM_21_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) r +# define BOOST_PP_TUPLE_ELEM_21_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) s +# define BOOST_PP_TUPLE_ELEM_21_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) t +# define BOOST_PP_TUPLE_ELEM_21_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) u +# +# define BOOST_PP_TUPLE_ELEM_22_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) a +# define BOOST_PP_TUPLE_ELEM_22_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) b +# define BOOST_PP_TUPLE_ELEM_22_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) c +# define BOOST_PP_TUPLE_ELEM_22_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) d +# define BOOST_PP_TUPLE_ELEM_22_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) e +# define BOOST_PP_TUPLE_ELEM_22_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) f +# define BOOST_PP_TUPLE_ELEM_22_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) g +# define BOOST_PP_TUPLE_ELEM_22_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) h +# define BOOST_PP_TUPLE_ELEM_22_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) i +# define BOOST_PP_TUPLE_ELEM_22_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) j +# define BOOST_PP_TUPLE_ELEM_22_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) k +# define BOOST_PP_TUPLE_ELEM_22_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) l +# define BOOST_PP_TUPLE_ELEM_22_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) m +# define BOOST_PP_TUPLE_ELEM_22_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) n +# define BOOST_PP_TUPLE_ELEM_22_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) o +# define BOOST_PP_TUPLE_ELEM_22_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) p +# define BOOST_PP_TUPLE_ELEM_22_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) q +# define BOOST_PP_TUPLE_ELEM_22_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) r +# define BOOST_PP_TUPLE_ELEM_22_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) s +# define BOOST_PP_TUPLE_ELEM_22_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) t +# define BOOST_PP_TUPLE_ELEM_22_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) u +# define BOOST_PP_TUPLE_ELEM_22_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) v +# +# define BOOST_PP_TUPLE_ELEM_23_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) a +# define BOOST_PP_TUPLE_ELEM_23_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) b +# define BOOST_PP_TUPLE_ELEM_23_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) c +# define BOOST_PP_TUPLE_ELEM_23_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) d +# define BOOST_PP_TUPLE_ELEM_23_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) e +# define BOOST_PP_TUPLE_ELEM_23_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) f +# define BOOST_PP_TUPLE_ELEM_23_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) g +# define BOOST_PP_TUPLE_ELEM_23_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) h +# define BOOST_PP_TUPLE_ELEM_23_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) i +# define BOOST_PP_TUPLE_ELEM_23_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) j +# define BOOST_PP_TUPLE_ELEM_23_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) k +# define BOOST_PP_TUPLE_ELEM_23_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) l +# define BOOST_PP_TUPLE_ELEM_23_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) m +# define BOOST_PP_TUPLE_ELEM_23_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) n +# define BOOST_PP_TUPLE_ELEM_23_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) o +# define BOOST_PP_TUPLE_ELEM_23_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) p +# define BOOST_PP_TUPLE_ELEM_23_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) q +# define BOOST_PP_TUPLE_ELEM_23_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) r +# define BOOST_PP_TUPLE_ELEM_23_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) s +# define BOOST_PP_TUPLE_ELEM_23_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) t +# define BOOST_PP_TUPLE_ELEM_23_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) u +# define BOOST_PP_TUPLE_ELEM_23_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) v +# define BOOST_PP_TUPLE_ELEM_23_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) w +# +# define BOOST_PP_TUPLE_ELEM_24_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) a +# define BOOST_PP_TUPLE_ELEM_24_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) b +# define BOOST_PP_TUPLE_ELEM_24_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) c +# define BOOST_PP_TUPLE_ELEM_24_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) d +# define BOOST_PP_TUPLE_ELEM_24_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) e +# define BOOST_PP_TUPLE_ELEM_24_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) f +# define BOOST_PP_TUPLE_ELEM_24_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) g +# define BOOST_PP_TUPLE_ELEM_24_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) h +# define BOOST_PP_TUPLE_ELEM_24_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) i +# define BOOST_PP_TUPLE_ELEM_24_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) j +# define BOOST_PP_TUPLE_ELEM_24_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) k +# define BOOST_PP_TUPLE_ELEM_24_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) l +# define BOOST_PP_TUPLE_ELEM_24_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) m +# define BOOST_PP_TUPLE_ELEM_24_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) n +# define BOOST_PP_TUPLE_ELEM_24_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) o +# define BOOST_PP_TUPLE_ELEM_24_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) p +# define BOOST_PP_TUPLE_ELEM_24_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) q +# define BOOST_PP_TUPLE_ELEM_24_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) r +# define BOOST_PP_TUPLE_ELEM_24_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) s +# define BOOST_PP_TUPLE_ELEM_24_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) t +# define BOOST_PP_TUPLE_ELEM_24_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) u +# define BOOST_PP_TUPLE_ELEM_24_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) v +# define BOOST_PP_TUPLE_ELEM_24_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) w +# define BOOST_PP_TUPLE_ELEM_24_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) x +# +# define BOOST_PP_TUPLE_ELEM_25_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) a +# define BOOST_PP_TUPLE_ELEM_25_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) b +# define BOOST_PP_TUPLE_ELEM_25_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) c +# define BOOST_PP_TUPLE_ELEM_25_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) d +# define BOOST_PP_TUPLE_ELEM_25_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) e +# define BOOST_PP_TUPLE_ELEM_25_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) f +# define BOOST_PP_TUPLE_ELEM_25_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) g +# define BOOST_PP_TUPLE_ELEM_25_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) h +# define BOOST_PP_TUPLE_ELEM_25_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) i +# define BOOST_PP_TUPLE_ELEM_25_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) j +# define BOOST_PP_TUPLE_ELEM_25_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) k +# define BOOST_PP_TUPLE_ELEM_25_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) l +# define BOOST_PP_TUPLE_ELEM_25_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) m +# define BOOST_PP_TUPLE_ELEM_25_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) n +# define BOOST_PP_TUPLE_ELEM_25_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) o +# define BOOST_PP_TUPLE_ELEM_25_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) p +# define BOOST_PP_TUPLE_ELEM_25_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) q +# define BOOST_PP_TUPLE_ELEM_25_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) r +# define BOOST_PP_TUPLE_ELEM_25_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) s +# define BOOST_PP_TUPLE_ELEM_25_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) t +# define BOOST_PP_TUPLE_ELEM_25_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) u +# define BOOST_PP_TUPLE_ELEM_25_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) v +# define BOOST_PP_TUPLE_ELEM_25_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) w +# define BOOST_PP_TUPLE_ELEM_25_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) x +# define BOOST_PP_TUPLE_ELEM_25_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) y +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/array/insert.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/array/insert.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,28 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_INSERT_HPP +# define BOOST_PREPROCESSOR_SEQ_INSERT_HPP +# +# include +# include +# include +# +# /* BOOST_PP_SEQ_INSERT */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) +# else +# define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_INSERT_I(seq, i, elem) +# define BOOST_PP_SEQ_INSERT_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/array/remove.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/array/remove.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_REMOVE_HPP +# define BOOST_PREPROCESSOR_SEQ_REMOVE_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_REMOVE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) +# else +# define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_REMOVE_I(seq, i) +# define BOOST_PP_SEQ_REMOVE_I(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/array/replace.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/array/replace.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,29 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_REPLACE_HPP +# define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_REPLACE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) +# else +# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem) +# define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/array/reverse.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/array/reverse.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,62 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_TUPLE_REVERSE_HPP +# define BOOST_PREPROCESSOR_TUPLE_REVERSE_HPP +# +# include +# +# /* BOOST_PP_TUPLE_REVERSE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_TUPLE_REVERSE(size, tuple) BOOST_PP_TUPLE_REVERSE_I(size, tuple) +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_TUPLE_REVERSE_I(s, t) BOOST_PP_TUPLE_REVERSE_ ## s t +# else +# define BOOST_PP_TUPLE_REVERSE_I(s, t) BOOST_PP_TUPLE_REVERSE_II(BOOST_PP_TUPLE_REVERSE_ ## s t) +# define BOOST_PP_TUPLE_REVERSE_II(res) res +# endif +# else +# define BOOST_PP_TUPLE_REVERSE(size, tuple) BOOST_PP_TUPLE_REVERSE_OO((size, tuple)) +# define BOOST_PP_TUPLE_REVERSE_OO(par) BOOST_PP_TUPLE_REVERSE_I ## par +# define BOOST_PP_TUPLE_REVERSE_I(s, t) BOOST_PP_TUPLE_REVERSE_ ## s ## t +# endif +# +# define BOOST_PP_TUPLE_REVERSE_0() () +# define BOOST_PP_TUPLE_REVERSE_1(a) (a) +# define BOOST_PP_TUPLE_REVERSE_2(a, b) (b, a) +# define BOOST_PP_TUPLE_REVERSE_3(a, b, c) (c, b, a) +# define BOOST_PP_TUPLE_REVERSE_4(a, b, c, d) (d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_5(a, b, c, d, e) (e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_6(a, b, c, d, e, f) (f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_7(a, b, c, d, e, f, g) (g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_8(a, b, c, d, e, f, g, h) (h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_9(a, b, c, d, e, f, g, h, i) (i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_10(a, b, c, d, e, f, g, h, i, j) (j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_11(a, b, c, d, e, f, g, h, i, j, k) (k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_12(a, b, c, d, e, f, g, h, i, j, k, l) (l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_13(a, b, c, d, e, f, g, h, i, j, k, l, m) (m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) (n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) (o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) (p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) (q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) (r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) (s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) (t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) (u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) (v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) (w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) (x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# define BOOST_PP_TUPLE_REVERSE_25(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) (y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/cat.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/cat.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,48 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP +# define BOOST_PREPROCESSOR_SEQ_CAT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_CAT */ +# +# define BOOST_PP_SEQ_CAT(seq) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ + BOOST_PP_SEQ_CAT_I, \ + BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_1 \ + )(seq) \ + /**/ +# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) +# +# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem) +# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b +# +# /* BOOST_PP_SEQ_CAT_S */ +# +# define BOOST_PP_SEQ_CAT_S(s, seq) \ + BOOST_PP_IF( \ + BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ + BOOST_PP_SEQ_CAT_S_I, \ + BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_2 \ + )(s, seq) \ + /**/ +# define BOOST_PP_SEQ_CAT_S_I(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/comma_if.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/comma_if.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,31 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP +# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP +# +# include +# include +# include +# include +# +# /* BOOST_PP_COMMA_IF */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() +# else +# define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) +# define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/comparison/greater.hpp --- a/epoc32/include/stdapis/boost/preprocessor/comparison/greater.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP -# define BOOST_PREPROCESSOR_COMPARISON_GREATER_HPP -# -# include -# include -# -# /* BOOST_PP_GREATER */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_GREATER(x, y) BOOST_PP_LESS(y, x) -# else -# define BOOST_PP_GREATER(x, y) BOOST_PP_GREATER_I(x, y) -# define BOOST_PP_GREATER_I(x, y) BOOST_PP_LESS(y, x) -# endif -# -# /* BOOST_PP_GREATER_D */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_LESS_D(d, y, x) -# else -# define BOOST_PP_GREATER_D(d, x, y) BOOST_PP_GREATER_D_I(d, x, y) -# define BOOST_PP_GREATER_D_I(d, x, y) BOOST_PP_LESS_D(d, y, x) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/comparison/greater_equal.hpp --- a/epoc32/include/stdapis/boost/preprocessor/comparison/greater_equal.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP -# define BOOST_PREPROCESSOR_COMPARISON_GREATER_EQUAL_HPP -# -# include -# include -# -# /* BOOST_PP_GREATER_EQUAL */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_LESS_EQUAL(y, x) -# else -# define BOOST_PP_GREATER_EQUAL(x, y) BOOST_PP_GREATER_EQUAL_I(x, y) -# define BOOST_PP_GREATER_EQUAL_I(x, y) BOOST_PP_LESS_EQUAL(y, x) -# endif -# -# /* BOOST_PP_GREATER_EQUAL_D */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) -# else -# define BOOST_PP_GREATER_EQUAL_D(d, x, y) BOOST_PP_GREATER_EQUAL_D_I(d, x, y) -# define BOOST_PP_GREATER_EQUAL_D_I(d, x, y) BOOST_PP_LESS_EQUAL_D(d, y, x) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/comparison/less.hpp --- a/epoc32/include/stdapis/boost/preprocessor/comparison/less.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_COMPARISON_LESS_HPP -# define BOOST_PREPROCESSOR_COMPARISON_LESS_HPP -# -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_LESS */ -# -# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC()) -# define BOOST_PP_LESS(x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL(x, y)) -# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_LESS(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y) -# else -# define BOOST_PP_LESS(x, y) BOOST_PP_LESS_I(x, y) -# define BOOST_PP_LESS_I(x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL, 0 BOOST_PP_TUPLE_EAT_2)(x, y) -# endif -# -# /* BOOST_PP_LESS_D */ -# -# if BOOST_PP_CONFIG_FLAGS() & (BOOST_PP_CONFIG_MWCC() | BOOST_PP_CONFIG_DMC()) -# define BOOST_PP_LESS_D(d, x, y) BOOST_PP_BITAND(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D(d, x, y)) -# elif ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_LESS_D(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y) -# else -# define BOOST_PP_LESS_D(d, x, y) BOOST_PP_LESS_D_I(d, x, y) -# define BOOST_PP_LESS_D_I(d, x, y) BOOST_PP_IIF(BOOST_PP_NOT_EQUAL(x, y), BOOST_PP_LESS_EQUAL_D, 0 BOOST_PP_TUPLE_EAT_3)(d, x, y) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/config/limits.hpp --- a/epoc32/include/stdapis/boost/preprocessor/config/limits.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP -# define BOOST_PREPROCESSOR_CONFIG_LIMITS_HPP -# -# define BOOST_PP_LIMIT_MAG 256 -# define BOOST_PP_LIMIT_TUPLE 25 -# define BOOST_PP_LIMIT_DIM 3 -# define BOOST_PP_LIMIT_REPEAT 256 -# define BOOST_PP_LIMIT_WHILE 256 -# define BOOST_PP_LIMIT_FOR 256 -# define BOOST_PP_LIMIT_ITERATION 256 -# define BOOST_PP_LIMIT_ITERATION_DIM 3 -# define BOOST_PP_LIMIT_SEQ 256 -# define BOOST_PP_LIMIT_SLOT_SIG 10 -# define BOOST_PP_LIMIT_SLOT_COUNT 5 -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/control/detail/edg/while.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/control/detail/edg/while.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,312 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP +# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_WHILE */ +# +# if 0 +# define BOOST_PP_WHILE(pred, op, state) +# endif +# +# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))) +# else +# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))) +# endif +# +# define BOOST_PP_WHILE_F(d, _) 0 +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001) +# +# define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_4(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_5(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_6(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_7(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_8(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_9(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_10(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_11(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_12(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_13(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_14(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_15(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_16(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_17(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_18(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_19(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_20(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_21(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_22(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_23(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_24(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_25(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_26(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_27(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_28(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_29(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_30(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_31(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_32(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_33(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_34(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_35(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_36(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_37(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_38(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_39(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_40(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_41(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_42(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_43(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_44(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_45(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_46(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_47(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_48(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_49(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_50(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_51(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_52(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_53(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_54(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_55(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_56(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_57(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_58(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_59(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_60(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_61(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_62(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_63(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_64(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_65(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_66(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_67(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_68(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_69(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_70(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_71(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_72(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_73(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_74(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_75(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_76(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_77(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_78(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_79(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_80(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_81(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_82(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_83(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_84(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_85(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_86(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_87(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_88(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_89(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_90(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_91(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_92(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_93(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_94(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_95(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_96(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_97(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_98(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_99(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_100(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_101(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_102(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_103(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_104(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_105(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_106(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_107(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_108(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_109(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_110(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_111(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_112(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_113(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_114(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_115(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_116(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_117(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_118(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_119(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_120(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_121(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_122(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_123(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_124(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_125(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_126(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_127(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_128(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_129(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_130(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_131(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_132(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_133(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_134(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_135(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_136(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_137(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_138(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_139(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_140(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_141(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_142(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_143(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_144(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_145(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_146(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_147(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_148(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_149(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_150(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_151(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_152(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_153(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_154(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_155(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_156(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_157(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_158(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_159(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_160(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_161(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_162(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_163(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_164(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_165(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_166(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_167(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_168(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_169(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_170(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_171(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_172(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_173(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_174(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_175(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_176(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_177(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_178(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_179(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_180(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_181(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_182(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_183(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_184(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_185(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_186(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_187(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_188(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_189(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_190(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_191(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_192(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_193(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_194(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_195(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_196(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_197(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_198(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_199(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_200(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_201(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_202(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_203(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_204(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_205(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_206(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_207(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_208(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_209(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_210(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_211(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_212(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_213(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_214(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_215(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_216(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_217(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_218(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_219(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_220(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_221(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_222(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_223(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_224(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_225(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_226(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_227(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_228(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_229(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_230(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_231(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_232(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_233(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_234(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_235(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_236(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_237(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_238(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_239(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_240(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_241(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_242(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_243(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_244(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_245(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_246(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_247(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_248(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_249(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_250(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_251(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_252(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_253(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_254(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_255(p, o, s) 0 +# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_256(p, o, s) 0 +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/control/if.hpp --- a/epoc32/include/stdapis/boost/preprocessor/control/if.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_CONTROL_IF_HPP -# define BOOST_PREPROCESSOR_CONTROL_IF_HPP -# -# include -# include -# include -# -# /* BOOST_PP_IF */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_IF(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) -# else -# define BOOST_PP_IF(cond, t, f) BOOST_PP_IF_I(cond, t, f) -# define BOOST_PP_IF_I(cond, t, f) BOOST_PP_IIF(BOOST_PP_BOOL(cond), t, f) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/control/while.hpp --- a/epoc32/include/stdapis/boost/preprocessor/control/while.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,312 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_CONTROL_WHILE_HPP -# define BOOST_PREPROCESSOR_CONTROL_WHILE_HPP -# -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_WHILE */ -# -# if 0 -# define BOOST_PP_WHILE(pred, op, state) -# endif -# -# define BOOST_PP_WHILE BOOST_PP_CAT(BOOST_PP_WHILE_, BOOST_PP_AUTO_REC(BOOST_PP_WHILE_P, 256)) -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_RIGHT_CHECK_, BOOST_PP_LIST_FOLD_RIGHT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL)))) -# else -# define BOOST_PP_WHILE_P(n) BOOST_PP_BITAND(BOOST_PP_CAT(BOOST_PP_WHILE_CHECK_, BOOST_PP_WHILE_ ## n(BOOST_PP_WHILE_F, BOOST_PP_NIL, BOOST_PP_NIL)), BOOST_PP_CAT(BOOST_PP_LIST_FOLD_LEFT_CHECK_, BOOST_PP_LIST_FOLD_LEFT_ ## n(BOOST_PP_NIL, BOOST_PP_NIL, BOOST_PP_NIL))) -# endif -# -# define BOOST_PP_WHILE_F(d, _) 0 -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# include -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# include -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() -# include -# else -# include -# endif -# -# define BOOST_PP_WHILE_257(p, o, s) BOOST_PP_ERROR(0x0001) -# -# define BOOST_PP_WHILE_CHECK_BOOST_PP_NIL 1 -# -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_1(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_2(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_3(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_4(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_5(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_6(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_7(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_8(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_9(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_10(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_11(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_12(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_13(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_14(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_15(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_16(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_17(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_18(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_19(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_20(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_21(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_22(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_23(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_24(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_25(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_26(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_27(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_28(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_29(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_30(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_31(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_32(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_33(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_34(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_35(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_36(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_37(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_38(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_39(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_40(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_41(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_42(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_43(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_44(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_45(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_46(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_47(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_48(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_49(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_50(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_51(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_52(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_53(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_54(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_55(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_56(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_57(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_58(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_59(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_60(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_61(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_62(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_63(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_64(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_65(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_66(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_67(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_68(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_69(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_70(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_71(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_72(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_73(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_74(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_75(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_76(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_77(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_78(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_79(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_80(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_81(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_82(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_83(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_84(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_85(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_86(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_87(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_88(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_89(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_90(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_91(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_92(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_93(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_94(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_95(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_96(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_97(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_98(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_99(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_100(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_101(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_102(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_103(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_104(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_105(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_106(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_107(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_108(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_109(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_110(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_111(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_112(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_113(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_114(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_115(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_116(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_117(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_118(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_119(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_120(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_121(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_122(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_123(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_124(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_125(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_126(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_127(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_128(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_129(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_130(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_131(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_132(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_133(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_134(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_135(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_136(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_137(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_138(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_139(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_140(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_141(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_142(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_143(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_144(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_145(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_146(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_147(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_148(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_149(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_150(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_151(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_152(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_153(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_154(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_155(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_156(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_157(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_158(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_159(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_160(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_161(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_162(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_163(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_164(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_165(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_166(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_167(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_168(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_169(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_170(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_171(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_172(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_173(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_174(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_175(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_176(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_177(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_178(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_179(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_180(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_181(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_182(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_183(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_184(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_185(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_186(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_187(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_188(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_189(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_190(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_191(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_192(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_193(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_194(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_195(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_196(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_197(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_198(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_199(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_200(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_201(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_202(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_203(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_204(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_205(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_206(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_207(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_208(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_209(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_210(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_211(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_212(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_213(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_214(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_215(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_216(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_217(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_218(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_219(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_220(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_221(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_222(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_223(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_224(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_225(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_226(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_227(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_228(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_229(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_230(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_231(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_232(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_233(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_234(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_235(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_236(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_237(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_238(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_239(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_240(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_241(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_242(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_243(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_244(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_245(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_246(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_247(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_248(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_249(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_250(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_251(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_252(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_253(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_254(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_255(p, o, s) 0 -# define BOOST_PP_WHILE_CHECK_BOOST_PP_WHILE_256(p, o, s) 0 -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/debug/assert.hpp --- a/epoc32/include/stdapis/boost/preprocessor/debug/assert.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP -# define BOOST_PREPROCESSOR_DEBUG_ASSERT_HPP -# -# include -# include -# include -# include -# include -# -# /* BOOST_PP_ASSERT */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_ASSERT BOOST_PP_ASSERT_D -# else -# define BOOST_PP_ASSERT(cond) BOOST_PP_ASSERT_D(cond) -# endif -# -# define BOOST_PP_ASSERT_D(cond) BOOST_PP_IIF(BOOST_PP_NOT(cond), BOOST_PP_ASSERT_ERROR, BOOST_PP_TUPLE_EAT_1)(...) -# define BOOST_PP_ASSERT_ERROR(x, y, z) -# -# /* BOOST_PP_ASSERT_MSG */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_ASSERT_MSG BOOST_PP_ASSERT_MSG_D -# else -# define BOOST_PP_ASSERT_MSG(cond, msg) BOOST_PP_ASSERT_MSG_D(cond, msg) -# endif -# -# define BOOST_PP_ASSERT_MSG_D(cond, msg) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(cond), msg) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/enum_params.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/enum_params.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP +# +# include +# include +# include +# +# /* BOOST_PP_ENUM_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) +# define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n +# +# /* BOOST_PP_ENUM_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/enum_shifted_params.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/enum_shifted_params.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,44 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP +# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP +# +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ENUM_SHIFTED_PARAMS */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) +# define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# endif +# +# define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) +# +# /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# else +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) +# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/facilities/apply.hpp --- a/epoc32/include/stdapis/boost/preprocessor/facilities/apply.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,34 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_FACILITIES_APPLY_HPP -# define BOOST_PREPROCESSOR_FACILITIES_APPLY_HPP -# -# include -# include -# include -# include -# -# /* BOOST_PP_APPLY */ -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_APPLY(x) BOOST_PP_APPLY_I(x) -# define BOOST_PP_APPLY_I(x) BOOST_PP_EXPR_IIF(BOOST_PP_IS_UNARY(x), BOOST_PP_TUPLE_REM_1 x) -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_BCC() -# define BOOST_PP_APPLY(x) BOOST_PP_APPLY_I(x) -# define BOOST_PP_APPLY_I(x) BOOST_PP_APPLY_ ## x -# define BOOST_PP_APPLY_(x) x -# define BOOST_PP_APPLY_BOOST_PP_NIL -# else -# define BOOST_PP_APPLY(x) BOOST_PP_EXPR_IIF(BOOST_PP_IS_UNARY(x), BOOST_PP_TUPLE_REM_1 x) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/identity.hpp --- a/epoc32/include/stdapis/boost/preprocessor/identity.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_IDENTITY_HPP -# define BOOST_PREPROCESSOR_IDENTITY_HPP -# -# include -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/inc.hpp --- a/epoc32/include/stdapis/boost/preprocessor/inc.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_INC_HPP -# define BOOST_PREPROCESSOR_INC_HPP -# -# include -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/iterate.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/iterate.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,82 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP +# define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_ITERATION_DEPTH */ +# +# define BOOST_PP_ITERATION_DEPTH() 0 +# +# /* BOOST_PP_ITERATION */ +# +# define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH()) +# +# /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */ +# +# define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH()) +# define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH()) +# +# /* BOOST_PP_ITERATION_FLAGS */ +# +# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())) +# +# /* BOOST_PP_FRAME_ITERATION */ +# +# define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i) +# +# /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */ +# +# define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i) +# define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i) +# +# /* BOOST_PP_FRAME_FLAGS */ +# +# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)) +# +# /* BOOST_PP_RELATIVE_ITERATION */ +# +# define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_) +# +# define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH()) +# define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())) +# define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))) +# define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) +# define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) +# +# /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */ +# +# define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_) +# define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_) +# +# /* BOOST_PP_RELATIVE_FLAGS */ +# +# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)) +# +# /* BOOST_PP_ITERATE */ +# +# define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH())) +# +# define BOOST_PP_ITERATE_1 +# define BOOST_PP_ITERATE_2 +# define BOOST_PP_ITERATE_3 +# define BOOST_PP_ITERATE_4 +# define BOOST_PP_ITERATE_5 +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/iteration/detail/local.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/iteration/detail/local.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,26 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP +# define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP +# +# include +# include +# include +# +# /* BOOST_PP_LOCAL_ITERATE */ +# +# define BOOST_PP_LOCAL_ITERATE() +# +# define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n +# define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/iteration/iterate.hpp --- a/epoc32/include/stdapis/boost/preprocessor/iteration/iterate.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP -# define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP -# -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_ITERATION_DEPTH */ -# -# define BOOST_PP_ITERATION_DEPTH() 0 -# -# /* BOOST_PP_ITERATION */ -# -# define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH()) -# -# /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */ -# -# define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH()) -# define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH()) -# -# /* BOOST_PP_ITERATION_FLAGS */ -# -# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())) -# -# /* BOOST_PP_FRAME_ITERATION */ -# -# define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i) -# -# /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */ -# -# define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i) -# define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i) -# -# /* BOOST_PP_FRAME_FLAGS */ -# -# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)) -# -# /* BOOST_PP_RELATIVE_ITERATION */ -# -# define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_) -# -# define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH()) -# define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())) -# define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))) -# define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))) -# define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))) -# -# /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */ -# -# define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_) -# define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_) -# -# /* BOOST_PP_RELATIVE_FLAGS */ -# -# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)) -# -# /* BOOST_PP_ITERATE */ -# -# define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH())) -# -# define BOOST_PP_ITERATE_1 -# define BOOST_PP_ITERATE_2 -# define BOOST_PP_ITERATE_3 -# define BOOST_PP_ITERATE_4 -# define BOOST_PP_ITERATE_5 -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/iteration/local.hpp --- a/epoc32/include/stdapis/boost/preprocessor/iteration/local.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,26 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP -# define BOOST_PREPROCESSOR_ITERATION_LOCAL_HPP -# -# include -# include -# include -# -# /* BOOST_PP_LOCAL_ITERATE */ -# -# define BOOST_PP_LOCAL_ITERATE() -# -# define BOOST_PP_LOCAL_C(n) (BOOST_PP_LOCAL_S) <= n && (BOOST_PP_LOCAL_F) >= n -# define BOOST_PP_LOCAL_R(n) (BOOST_PP_LOCAL_F) <= n && (BOOST_PP_LOCAL_S) >= n -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list.hpp --- a/epoc32/include/stdapis/boost/preprocessor/list.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LIST_HPP -# define BOOST_PREPROCESSOR_LIST_HPP -# -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/at.hpp --- a/epoc32/include/stdapis/boost/preprocessor/list/at.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LIST_AT_HPP -# define BOOST_PREPROCESSOR_LIST_AT_HPP -# -# include -# include -# include -# -# /* BOOST_PP_LIST_AT */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) -# else -# define BOOST_PP_LIST_AT(list, index) BOOST_PP_LIST_AT_I(list, index) -# define BOOST_PP_LIST_AT_I(list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N(index, list)) -# endif -# -# /* BOOST_PP_LIST_AT_D */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) -# else -# define BOOST_PP_LIST_AT_D(d, list, index) BOOST_PP_LIST_AT_D_I(d, list, index) -# define BOOST_PP_LIST_AT_D_I(d, list, index) BOOST_PP_LIST_FIRST(BOOST_PP_LIST_REST_N_D(d, index, list)) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/detail/edg/fold_left.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/detail/edg/fold_left.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1070 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP +# define BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOLD_LEFT */ +# +# if 0 +# define BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) ... +# endif +# +# define BOOST_PP_SEQ_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) +# define BOOST_PP_SEQ_FOLD_LEFT_P(n) BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_CHECK_, BOOST_PP_SEQ_FOLD_LEFT_I_ ## n(BOOST_PP_SEQ_FOLD_LEFT_O, BOOST_PP_NIL, (nil), 1)) +# define BOOST_PP_SEQ_FOLD_LEFT_O(s, st, _) st +# +# define BOOST_PP_SEQ_FOLD_LEFT_257(op, st, ss) BOOST_PP_ERROR(0x0005) +# define BOOST_PP_SEQ_FOLD_LEFT_I_257(op, st, ss, sz) BOOST_PP_ERROR(0x0005) +# +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) 0 +# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) 0 +# +# define BOOST_PP_SEQ_FOLD_LEFT_F(op, st, ss, sz) st +# +# define BOOST_PP_SEQ_FOLD_LEFT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_LEFT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# else +# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/detail/edg/fold_right.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/detail/edg/fold_right.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,288 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP +# define BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOLD_RIGHT */ +# +# if 0 +# define BOOST_PP_SEQ_FOLD_RIGHT(op, state, seq) ... +# endif +# +# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) +# +# define BOOST_PP_SEQ_FOLD_RIGHT_257(op, st, ss) BOOST_PP_ERROR(0x0005) +# +# define BOOST_PP_SEQ_FOLD_RIGHT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, BOOST_PP_SEQ_REVERSE_S(2, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, BOOST_PP_SEQ_REVERSE_S(3, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, BOOST_PP_SEQ_REVERSE_S(4, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, BOOST_PP_SEQ_REVERSE_S(5, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, BOOST_PP_SEQ_REVERSE_S(6, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, BOOST_PP_SEQ_REVERSE_S(7, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, BOOST_PP_SEQ_REVERSE_S(8, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, BOOST_PP_SEQ_REVERSE_S(9, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, BOOST_PP_SEQ_REVERSE_S(10, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, BOOST_PP_SEQ_REVERSE_S(11, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, BOOST_PP_SEQ_REVERSE_S(12, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, BOOST_PP_SEQ_REVERSE_S(13, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, BOOST_PP_SEQ_REVERSE_S(14, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, BOOST_PP_SEQ_REVERSE_S(15, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, BOOST_PP_SEQ_REVERSE_S(16, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, BOOST_PP_SEQ_REVERSE_S(17, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, BOOST_PP_SEQ_REVERSE_S(18, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, BOOST_PP_SEQ_REVERSE_S(19, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, BOOST_PP_SEQ_REVERSE_S(20, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, BOOST_PP_SEQ_REVERSE_S(21, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, BOOST_PP_SEQ_REVERSE_S(22, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, BOOST_PP_SEQ_REVERSE_S(23, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, BOOST_PP_SEQ_REVERSE_S(24, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, BOOST_PP_SEQ_REVERSE_S(25, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, BOOST_PP_SEQ_REVERSE_S(26, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, BOOST_PP_SEQ_REVERSE_S(27, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, BOOST_PP_SEQ_REVERSE_S(28, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, BOOST_PP_SEQ_REVERSE_S(29, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, BOOST_PP_SEQ_REVERSE_S(30, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, BOOST_PP_SEQ_REVERSE_S(31, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, BOOST_PP_SEQ_REVERSE_S(32, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, BOOST_PP_SEQ_REVERSE_S(33, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, BOOST_PP_SEQ_REVERSE_S(34, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, BOOST_PP_SEQ_REVERSE_S(35, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, BOOST_PP_SEQ_REVERSE_S(36, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, BOOST_PP_SEQ_REVERSE_S(37, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, BOOST_PP_SEQ_REVERSE_S(38, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, BOOST_PP_SEQ_REVERSE_S(39, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, BOOST_PP_SEQ_REVERSE_S(40, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, BOOST_PP_SEQ_REVERSE_S(41, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, BOOST_PP_SEQ_REVERSE_S(42, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, BOOST_PP_SEQ_REVERSE_S(43, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, BOOST_PP_SEQ_REVERSE_S(44, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, BOOST_PP_SEQ_REVERSE_S(45, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, BOOST_PP_SEQ_REVERSE_S(46, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, BOOST_PP_SEQ_REVERSE_S(47, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, BOOST_PP_SEQ_REVERSE_S(48, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, BOOST_PP_SEQ_REVERSE_S(49, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, BOOST_PP_SEQ_REVERSE_S(50, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, BOOST_PP_SEQ_REVERSE_S(51, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, BOOST_PP_SEQ_REVERSE_S(52, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, BOOST_PP_SEQ_REVERSE_S(53, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, BOOST_PP_SEQ_REVERSE_S(54, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, BOOST_PP_SEQ_REVERSE_S(55, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, BOOST_PP_SEQ_REVERSE_S(56, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, BOOST_PP_SEQ_REVERSE_S(57, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, BOOST_PP_SEQ_REVERSE_S(58, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, BOOST_PP_SEQ_REVERSE_S(59, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, BOOST_PP_SEQ_REVERSE_S(60, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, BOOST_PP_SEQ_REVERSE_S(61, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, BOOST_PP_SEQ_REVERSE_S(62, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, BOOST_PP_SEQ_REVERSE_S(63, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, BOOST_PP_SEQ_REVERSE_S(64, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, BOOST_PP_SEQ_REVERSE_S(65, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, BOOST_PP_SEQ_REVERSE_S(66, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, BOOST_PP_SEQ_REVERSE_S(67, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, BOOST_PP_SEQ_REVERSE_S(68, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, BOOST_PP_SEQ_REVERSE_S(69, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, BOOST_PP_SEQ_REVERSE_S(70, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, BOOST_PP_SEQ_REVERSE_S(71, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, BOOST_PP_SEQ_REVERSE_S(72, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, BOOST_PP_SEQ_REVERSE_S(73, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, BOOST_PP_SEQ_REVERSE_S(74, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, BOOST_PP_SEQ_REVERSE_S(75, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, BOOST_PP_SEQ_REVERSE_S(76, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, BOOST_PP_SEQ_REVERSE_S(77, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, BOOST_PP_SEQ_REVERSE_S(78, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, BOOST_PP_SEQ_REVERSE_S(79, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, BOOST_PP_SEQ_REVERSE_S(80, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, BOOST_PP_SEQ_REVERSE_S(81, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, BOOST_PP_SEQ_REVERSE_S(82, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, BOOST_PP_SEQ_REVERSE_S(83, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, BOOST_PP_SEQ_REVERSE_S(84, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, BOOST_PP_SEQ_REVERSE_S(85, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, BOOST_PP_SEQ_REVERSE_S(86, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, BOOST_PP_SEQ_REVERSE_S(87, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, BOOST_PP_SEQ_REVERSE_S(88, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, BOOST_PP_SEQ_REVERSE_S(89, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, BOOST_PP_SEQ_REVERSE_S(90, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, BOOST_PP_SEQ_REVERSE_S(91, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, BOOST_PP_SEQ_REVERSE_S(92, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, BOOST_PP_SEQ_REVERSE_S(93, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, BOOST_PP_SEQ_REVERSE_S(94, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, BOOST_PP_SEQ_REVERSE_S(95, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, BOOST_PP_SEQ_REVERSE_S(96, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, BOOST_PP_SEQ_REVERSE_S(97, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, BOOST_PP_SEQ_REVERSE_S(98, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, BOOST_PP_SEQ_REVERSE_S(99, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, BOOST_PP_SEQ_REVERSE_S(100, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, BOOST_PP_SEQ_REVERSE_S(101, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, BOOST_PP_SEQ_REVERSE_S(102, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, BOOST_PP_SEQ_REVERSE_S(103, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, BOOST_PP_SEQ_REVERSE_S(104, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, BOOST_PP_SEQ_REVERSE_S(105, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, BOOST_PP_SEQ_REVERSE_S(106, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, BOOST_PP_SEQ_REVERSE_S(107, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, BOOST_PP_SEQ_REVERSE_S(108, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, BOOST_PP_SEQ_REVERSE_S(109, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, BOOST_PP_SEQ_REVERSE_S(110, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, BOOST_PP_SEQ_REVERSE_S(111, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, BOOST_PP_SEQ_REVERSE_S(112, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, BOOST_PP_SEQ_REVERSE_S(113, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, BOOST_PP_SEQ_REVERSE_S(114, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, BOOST_PP_SEQ_REVERSE_S(115, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, BOOST_PP_SEQ_REVERSE_S(116, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, BOOST_PP_SEQ_REVERSE_S(117, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, BOOST_PP_SEQ_REVERSE_S(118, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, BOOST_PP_SEQ_REVERSE_S(119, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, BOOST_PP_SEQ_REVERSE_S(120, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, BOOST_PP_SEQ_REVERSE_S(121, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, BOOST_PP_SEQ_REVERSE_S(122, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, BOOST_PP_SEQ_REVERSE_S(123, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, BOOST_PP_SEQ_REVERSE_S(124, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, BOOST_PP_SEQ_REVERSE_S(125, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, BOOST_PP_SEQ_REVERSE_S(126, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, BOOST_PP_SEQ_REVERSE_S(127, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, BOOST_PP_SEQ_REVERSE_S(128, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, BOOST_PP_SEQ_REVERSE_S(129, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, BOOST_PP_SEQ_REVERSE_S(130, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, BOOST_PP_SEQ_REVERSE_S(131, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, BOOST_PP_SEQ_REVERSE_S(132, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, BOOST_PP_SEQ_REVERSE_S(133, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, BOOST_PP_SEQ_REVERSE_S(134, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, BOOST_PP_SEQ_REVERSE_S(135, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, BOOST_PP_SEQ_REVERSE_S(136, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, BOOST_PP_SEQ_REVERSE_S(137, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, BOOST_PP_SEQ_REVERSE_S(138, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, BOOST_PP_SEQ_REVERSE_S(139, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, BOOST_PP_SEQ_REVERSE_S(140, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, BOOST_PP_SEQ_REVERSE_S(141, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, BOOST_PP_SEQ_REVERSE_S(142, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, BOOST_PP_SEQ_REVERSE_S(143, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, BOOST_PP_SEQ_REVERSE_S(144, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, BOOST_PP_SEQ_REVERSE_S(145, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, BOOST_PP_SEQ_REVERSE_S(146, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, BOOST_PP_SEQ_REVERSE_S(147, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, BOOST_PP_SEQ_REVERSE_S(148, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, BOOST_PP_SEQ_REVERSE_S(149, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, BOOST_PP_SEQ_REVERSE_S(150, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, BOOST_PP_SEQ_REVERSE_S(151, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, BOOST_PP_SEQ_REVERSE_S(152, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, BOOST_PP_SEQ_REVERSE_S(153, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, BOOST_PP_SEQ_REVERSE_S(154, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, BOOST_PP_SEQ_REVERSE_S(155, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, BOOST_PP_SEQ_REVERSE_S(156, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, BOOST_PP_SEQ_REVERSE_S(157, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, BOOST_PP_SEQ_REVERSE_S(158, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, BOOST_PP_SEQ_REVERSE_S(159, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, BOOST_PP_SEQ_REVERSE_S(160, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, BOOST_PP_SEQ_REVERSE_S(161, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, BOOST_PP_SEQ_REVERSE_S(162, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, BOOST_PP_SEQ_REVERSE_S(163, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, BOOST_PP_SEQ_REVERSE_S(164, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, BOOST_PP_SEQ_REVERSE_S(165, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, BOOST_PP_SEQ_REVERSE_S(166, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, BOOST_PP_SEQ_REVERSE_S(167, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, BOOST_PP_SEQ_REVERSE_S(168, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, BOOST_PP_SEQ_REVERSE_S(169, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, BOOST_PP_SEQ_REVERSE_S(170, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, BOOST_PP_SEQ_REVERSE_S(171, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, BOOST_PP_SEQ_REVERSE_S(172, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, BOOST_PP_SEQ_REVERSE_S(173, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, BOOST_PP_SEQ_REVERSE_S(174, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, BOOST_PP_SEQ_REVERSE_S(175, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, BOOST_PP_SEQ_REVERSE_S(176, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, BOOST_PP_SEQ_REVERSE_S(177, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, BOOST_PP_SEQ_REVERSE_S(178, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, BOOST_PP_SEQ_REVERSE_S(179, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, BOOST_PP_SEQ_REVERSE_S(180, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, BOOST_PP_SEQ_REVERSE_S(181, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, BOOST_PP_SEQ_REVERSE_S(182, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, BOOST_PP_SEQ_REVERSE_S(183, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, BOOST_PP_SEQ_REVERSE_S(184, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, BOOST_PP_SEQ_REVERSE_S(185, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, BOOST_PP_SEQ_REVERSE_S(186, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, BOOST_PP_SEQ_REVERSE_S(187, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, BOOST_PP_SEQ_REVERSE_S(188, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, BOOST_PP_SEQ_REVERSE_S(189, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, BOOST_PP_SEQ_REVERSE_S(190, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, BOOST_PP_SEQ_REVERSE_S(191, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, BOOST_PP_SEQ_REVERSE_S(192, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, BOOST_PP_SEQ_REVERSE_S(193, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, BOOST_PP_SEQ_REVERSE_S(194, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, BOOST_PP_SEQ_REVERSE_S(195, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, BOOST_PP_SEQ_REVERSE_S(196, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, BOOST_PP_SEQ_REVERSE_S(197, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, BOOST_PP_SEQ_REVERSE_S(198, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, BOOST_PP_SEQ_REVERSE_S(199, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, BOOST_PP_SEQ_REVERSE_S(200, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, BOOST_PP_SEQ_REVERSE_S(201, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, BOOST_PP_SEQ_REVERSE_S(202, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, BOOST_PP_SEQ_REVERSE_S(203, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, BOOST_PP_SEQ_REVERSE_S(204, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, BOOST_PP_SEQ_REVERSE_S(205, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, BOOST_PP_SEQ_REVERSE_S(206, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, BOOST_PP_SEQ_REVERSE_S(207, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, BOOST_PP_SEQ_REVERSE_S(208, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, BOOST_PP_SEQ_REVERSE_S(209, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, BOOST_PP_SEQ_REVERSE_S(210, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, BOOST_PP_SEQ_REVERSE_S(211, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, BOOST_PP_SEQ_REVERSE_S(212, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, BOOST_PP_SEQ_REVERSE_S(213, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, BOOST_PP_SEQ_REVERSE_S(214, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, BOOST_PP_SEQ_REVERSE_S(215, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, BOOST_PP_SEQ_REVERSE_S(216, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, BOOST_PP_SEQ_REVERSE_S(217, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, BOOST_PP_SEQ_REVERSE_S(218, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, BOOST_PP_SEQ_REVERSE_S(219, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, BOOST_PP_SEQ_REVERSE_S(220, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, BOOST_PP_SEQ_REVERSE_S(221, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, BOOST_PP_SEQ_REVERSE_S(222, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, BOOST_PP_SEQ_REVERSE_S(223, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, BOOST_PP_SEQ_REVERSE_S(224, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, BOOST_PP_SEQ_REVERSE_S(225, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, BOOST_PP_SEQ_REVERSE_S(226, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, BOOST_PP_SEQ_REVERSE_S(227, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, BOOST_PP_SEQ_REVERSE_S(228, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, BOOST_PP_SEQ_REVERSE_S(229, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, BOOST_PP_SEQ_REVERSE_S(230, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, BOOST_PP_SEQ_REVERSE_S(231, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, BOOST_PP_SEQ_REVERSE_S(232, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, BOOST_PP_SEQ_REVERSE_S(233, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, BOOST_PP_SEQ_REVERSE_S(234, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, BOOST_PP_SEQ_REVERSE_S(235, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, BOOST_PP_SEQ_REVERSE_S(236, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, BOOST_PP_SEQ_REVERSE_S(237, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, BOOST_PP_SEQ_REVERSE_S(238, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, BOOST_PP_SEQ_REVERSE_S(239, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, BOOST_PP_SEQ_REVERSE_S(240, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, BOOST_PP_SEQ_REVERSE_S(241, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, BOOST_PP_SEQ_REVERSE_S(242, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, BOOST_PP_SEQ_REVERSE_S(243, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, BOOST_PP_SEQ_REVERSE_S(244, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, BOOST_PP_SEQ_REVERSE_S(245, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, BOOST_PP_SEQ_REVERSE_S(246, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, BOOST_PP_SEQ_REVERSE_S(247, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, BOOST_PP_SEQ_REVERSE_S(248, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, BOOST_PP_SEQ_REVERSE_S(249, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, BOOST_PP_SEQ_REVERSE_S(250, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, BOOST_PP_SEQ_REVERSE_S(251, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, BOOST_PP_SEQ_REVERSE_S(252, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, BOOST_PP_SEQ_REVERSE_S(253, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, BOOST_PP_SEQ_REVERSE_S(254, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, BOOST_PP_SEQ_REVERSE_S(255, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, BOOST_PP_SEQ_REVERSE_S(256, ss), BOOST_PP_SEQ_SIZE(ss)) +# define BOOST_PP_SEQ_FOLD_RIGHT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, BOOST_PP_SEQ_REVERSE_S(257, ss), BOOST_PP_SEQ_SIZE(ss)) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/filter.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/filter.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,54 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FILTER_HPP +# define BOOST_PREPROCESSOR_SEQ_FILTER_HPP +# +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FILTER */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_FILTER_I(pred, data, seq) +# define BOOST_PP_SEQ_FILTER_I(pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_IM(s, BOOST_PP_TUPLE_REM_3 st, elem) +# define BOOST_PP_SEQ_FILTER_O_IM(s, im, elem) BOOST_PP_SEQ_FILTER_O_I(s, im, elem) +# else +# define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, st), BOOST_PP_TUPLE_ELEM(3, 1, st), BOOST_PP_TUPLE_ELEM(3, 2, st), elem) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred(s, data, elem), (elem))) +# else +# define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred##(s, data, elem), (elem))) +# endif +# +# /* BOOST_PP_SEQ_FILTER_S */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) +# else +# define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq) +# define BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/first_n.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/first_n.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP +# define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FIRST_N */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) +# else +# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) +# define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/for_each_i.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/for_each_i.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,61 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP +# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOR_EACH_I */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# else +# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 2, x))) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x +# else +# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i) (macro, data, BOOST_PP_SEQ_TAIL(seq), BOOST_PP_INC(i)) +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_4 x) +# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im) +# else +# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq)) +# +# /* BOOST_PP_SEQ_FOR_EACH_I_R */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# else +# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) +# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/for_each_product.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/for_each_product.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,126 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_PRODUCT_HPP +# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_PRODUCT_HPP +# +# include +# include +# include +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_FOR_EACH_PRODUCT */ +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT(macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(BOOST_PP_FOR, macro, sets) +# +# /* BOOST_PP_SEQ_FOR_EACH_PRODUCT_R */ +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_R(r, macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(BOOST_PP_FOR_ ## r, macro, sets) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(impl, macro, sets) impl((BOOST_PP_SEQ_HEAD(sets)(nil), BOOST_PP_SEQ_TAIL(sets)(nil), (nil), macro), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0) +# else +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(impl, macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E_I(impl, macro, sets) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E_I(impl, macro, sets) impl((BOOST_PP_SEQ_HEAD(sets)(nil), BOOST_PP_SEQ_TAIL(sets)(nil), (nil), macro), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0) +# endif +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_P_I data +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P_I(cset, rset, res, macro) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(cset)) +# else +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P(r, data) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 0, data))) +# endif +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_O_I data +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O_I(cset, rset, res, macro) (BOOST_PP_SEQ_TAIL(cset), rset, res, macro) +# else +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O(r, data) (BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(4, 0, data)), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, i) BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 1, data))), BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_ ## i, BOOST_PP_SEQ_FOR_EACH_PRODUCT_I) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, BOOST_PP_TUPLE_ELEM(4, 0, data), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) +# else +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_IM(r, BOOST_PP_TUPLE_REM_4 data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_IM(r, im) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, im) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, cset, rset, res, macro) macro(r, BOOST_PP_SEQ_TAIL(res (BOOST_PP_SEQ_HEAD(cset)))) +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I data +# else +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I(BOOST_PP_TUPLE_ELEM(4, 0, data), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) +# endif +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I(cset, rset, res, macro) (BOOST_PP_SEQ_HEAD(rset)(nil), BOOST_PP_SEQ_TAIL(rset), res (BOOST_PP_SEQ_HEAD(cset)), macro) +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 0)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_1(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 1)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_2(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 2)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_3(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 3)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_4(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 4)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_5(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 5)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_6(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 6)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_7(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 7)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_8(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 8)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_9(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 9)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_10(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 10)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_11(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 11)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_12(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 12)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_13(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 13)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_14(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 14)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_15(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 15)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_16(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 16)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_17(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 17)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_18(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 18)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_19(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 19)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_20(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 20)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_21(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 21)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_22(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 22)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_23(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 23)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_24(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 24)(r, data) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_25(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 25)(r, data) +# +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_0(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_1) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_1(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_2) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_2(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_3) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_3(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_4) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_4(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_5) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_5(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_6) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_6(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_7) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_7(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_8) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_8(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_9) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_9(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_10) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_10(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_11) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_11(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_12) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_12(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_13) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_13(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_14) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_14(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_15) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_15(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_16) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_16(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_17) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_17(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_18) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_18(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_19) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_19(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_20) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_20(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_21) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_21(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_22) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_22(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_23) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_23(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_24) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_24(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_25) +# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_25(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_26) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/rest_n.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/rest_n.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP +# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP +# +# include +# include +# include +# include +# include +# +# /* BOOST_PP_SEQ_REST_N */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() +# else +# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) +# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/list/to_tuple.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/list/to_tuple.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,27 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP +# define BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP +# +# include +# include +# +# /* BOOST_PP_SEQ_TO_TUPLE */ +# +# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TO_TUPLE(seq) (BOOST_PP_SEQ_ENUM(seq)) +# else +# define BOOST_PP_SEQ_TO_TUPLE(seq) BOOST_PP_SEQ_TO_TUPLE_I(seq) +# define BOOST_PP_SEQ_TO_TUPLE_I(seq) (BOOST_PP_SEQ_ENUM(seq)) +# endif +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/logical.hpp --- a/epoc32/include/stdapis/boost/preprocessor/logical.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LOGICAL_HPP -# define BOOST_PREPROCESSOR_LOGICAL_HPP -# -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/logical/and.hpp --- a/epoc32/include/stdapis/boost/preprocessor/logical/and.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LOGICAL_AND_HPP -# define BOOST_PREPROCESSOR_LOGICAL_AND_HPP -# -# include -# include -# include -# -# /* BOOST_PP_AND */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_AND(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) -# else -# define BOOST_PP_AND(p, q) BOOST_PP_AND_I(p, q) -# define BOOST_PP_AND_I(p, q) BOOST_PP_BITAND(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/logical/bool.hpp --- a/epoc32/include/stdapis/boost/preprocessor/logical/bool.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,288 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP -# define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP -# -# include -# -# /* BOOST_PP_BOOL */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x) -# else -# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x)) -# define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par -# endif -# -# define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x -# -# define BOOST_PP_BOOL_0 0 -# define BOOST_PP_BOOL_1 1 -# define BOOST_PP_BOOL_2 1 -# define BOOST_PP_BOOL_3 1 -# define BOOST_PP_BOOL_4 1 -# define BOOST_PP_BOOL_5 1 -# define BOOST_PP_BOOL_6 1 -# define BOOST_PP_BOOL_7 1 -# define BOOST_PP_BOOL_8 1 -# define BOOST_PP_BOOL_9 1 -# define BOOST_PP_BOOL_10 1 -# define BOOST_PP_BOOL_11 1 -# define BOOST_PP_BOOL_12 1 -# define BOOST_PP_BOOL_13 1 -# define BOOST_PP_BOOL_14 1 -# define BOOST_PP_BOOL_15 1 -# define BOOST_PP_BOOL_16 1 -# define BOOST_PP_BOOL_17 1 -# define BOOST_PP_BOOL_18 1 -# define BOOST_PP_BOOL_19 1 -# define BOOST_PP_BOOL_20 1 -# define BOOST_PP_BOOL_21 1 -# define BOOST_PP_BOOL_22 1 -# define BOOST_PP_BOOL_23 1 -# define BOOST_PP_BOOL_24 1 -# define BOOST_PP_BOOL_25 1 -# define BOOST_PP_BOOL_26 1 -# define BOOST_PP_BOOL_27 1 -# define BOOST_PP_BOOL_28 1 -# define BOOST_PP_BOOL_29 1 -# define BOOST_PP_BOOL_30 1 -# define BOOST_PP_BOOL_31 1 -# define BOOST_PP_BOOL_32 1 -# define BOOST_PP_BOOL_33 1 -# define BOOST_PP_BOOL_34 1 -# define BOOST_PP_BOOL_35 1 -# define BOOST_PP_BOOL_36 1 -# define BOOST_PP_BOOL_37 1 -# define BOOST_PP_BOOL_38 1 -# define BOOST_PP_BOOL_39 1 -# define BOOST_PP_BOOL_40 1 -# define BOOST_PP_BOOL_41 1 -# define BOOST_PP_BOOL_42 1 -# define BOOST_PP_BOOL_43 1 -# define BOOST_PP_BOOL_44 1 -# define BOOST_PP_BOOL_45 1 -# define BOOST_PP_BOOL_46 1 -# define BOOST_PP_BOOL_47 1 -# define BOOST_PP_BOOL_48 1 -# define BOOST_PP_BOOL_49 1 -# define BOOST_PP_BOOL_50 1 -# define BOOST_PP_BOOL_51 1 -# define BOOST_PP_BOOL_52 1 -# define BOOST_PP_BOOL_53 1 -# define BOOST_PP_BOOL_54 1 -# define BOOST_PP_BOOL_55 1 -# define BOOST_PP_BOOL_56 1 -# define BOOST_PP_BOOL_57 1 -# define BOOST_PP_BOOL_58 1 -# define BOOST_PP_BOOL_59 1 -# define BOOST_PP_BOOL_60 1 -# define BOOST_PP_BOOL_61 1 -# define BOOST_PP_BOOL_62 1 -# define BOOST_PP_BOOL_63 1 -# define BOOST_PP_BOOL_64 1 -# define BOOST_PP_BOOL_65 1 -# define BOOST_PP_BOOL_66 1 -# define BOOST_PP_BOOL_67 1 -# define BOOST_PP_BOOL_68 1 -# define BOOST_PP_BOOL_69 1 -# define BOOST_PP_BOOL_70 1 -# define BOOST_PP_BOOL_71 1 -# define BOOST_PP_BOOL_72 1 -# define BOOST_PP_BOOL_73 1 -# define BOOST_PP_BOOL_74 1 -# define BOOST_PP_BOOL_75 1 -# define BOOST_PP_BOOL_76 1 -# define BOOST_PP_BOOL_77 1 -# define BOOST_PP_BOOL_78 1 -# define BOOST_PP_BOOL_79 1 -# define BOOST_PP_BOOL_80 1 -# define BOOST_PP_BOOL_81 1 -# define BOOST_PP_BOOL_82 1 -# define BOOST_PP_BOOL_83 1 -# define BOOST_PP_BOOL_84 1 -# define BOOST_PP_BOOL_85 1 -# define BOOST_PP_BOOL_86 1 -# define BOOST_PP_BOOL_87 1 -# define BOOST_PP_BOOL_88 1 -# define BOOST_PP_BOOL_89 1 -# define BOOST_PP_BOOL_90 1 -# define BOOST_PP_BOOL_91 1 -# define BOOST_PP_BOOL_92 1 -# define BOOST_PP_BOOL_93 1 -# define BOOST_PP_BOOL_94 1 -# define BOOST_PP_BOOL_95 1 -# define BOOST_PP_BOOL_96 1 -# define BOOST_PP_BOOL_97 1 -# define BOOST_PP_BOOL_98 1 -# define BOOST_PP_BOOL_99 1 -# define BOOST_PP_BOOL_100 1 -# define BOOST_PP_BOOL_101 1 -# define BOOST_PP_BOOL_102 1 -# define BOOST_PP_BOOL_103 1 -# define BOOST_PP_BOOL_104 1 -# define BOOST_PP_BOOL_105 1 -# define BOOST_PP_BOOL_106 1 -# define BOOST_PP_BOOL_107 1 -# define BOOST_PP_BOOL_108 1 -# define BOOST_PP_BOOL_109 1 -# define BOOST_PP_BOOL_110 1 -# define BOOST_PP_BOOL_111 1 -# define BOOST_PP_BOOL_112 1 -# define BOOST_PP_BOOL_113 1 -# define BOOST_PP_BOOL_114 1 -# define BOOST_PP_BOOL_115 1 -# define BOOST_PP_BOOL_116 1 -# define BOOST_PP_BOOL_117 1 -# define BOOST_PP_BOOL_118 1 -# define BOOST_PP_BOOL_119 1 -# define BOOST_PP_BOOL_120 1 -# define BOOST_PP_BOOL_121 1 -# define BOOST_PP_BOOL_122 1 -# define BOOST_PP_BOOL_123 1 -# define BOOST_PP_BOOL_124 1 -# define BOOST_PP_BOOL_125 1 -# define BOOST_PP_BOOL_126 1 -# define BOOST_PP_BOOL_127 1 -# define BOOST_PP_BOOL_128 1 -# define BOOST_PP_BOOL_129 1 -# define BOOST_PP_BOOL_130 1 -# define BOOST_PP_BOOL_131 1 -# define BOOST_PP_BOOL_132 1 -# define BOOST_PP_BOOL_133 1 -# define BOOST_PP_BOOL_134 1 -# define BOOST_PP_BOOL_135 1 -# define BOOST_PP_BOOL_136 1 -# define BOOST_PP_BOOL_137 1 -# define BOOST_PP_BOOL_138 1 -# define BOOST_PP_BOOL_139 1 -# define BOOST_PP_BOOL_140 1 -# define BOOST_PP_BOOL_141 1 -# define BOOST_PP_BOOL_142 1 -# define BOOST_PP_BOOL_143 1 -# define BOOST_PP_BOOL_144 1 -# define BOOST_PP_BOOL_145 1 -# define BOOST_PP_BOOL_146 1 -# define BOOST_PP_BOOL_147 1 -# define BOOST_PP_BOOL_148 1 -# define BOOST_PP_BOOL_149 1 -# define BOOST_PP_BOOL_150 1 -# define BOOST_PP_BOOL_151 1 -# define BOOST_PP_BOOL_152 1 -# define BOOST_PP_BOOL_153 1 -# define BOOST_PP_BOOL_154 1 -# define BOOST_PP_BOOL_155 1 -# define BOOST_PP_BOOL_156 1 -# define BOOST_PP_BOOL_157 1 -# define BOOST_PP_BOOL_158 1 -# define BOOST_PP_BOOL_159 1 -# define BOOST_PP_BOOL_160 1 -# define BOOST_PP_BOOL_161 1 -# define BOOST_PP_BOOL_162 1 -# define BOOST_PP_BOOL_163 1 -# define BOOST_PP_BOOL_164 1 -# define BOOST_PP_BOOL_165 1 -# define BOOST_PP_BOOL_166 1 -# define BOOST_PP_BOOL_167 1 -# define BOOST_PP_BOOL_168 1 -# define BOOST_PP_BOOL_169 1 -# define BOOST_PP_BOOL_170 1 -# define BOOST_PP_BOOL_171 1 -# define BOOST_PP_BOOL_172 1 -# define BOOST_PP_BOOL_173 1 -# define BOOST_PP_BOOL_174 1 -# define BOOST_PP_BOOL_175 1 -# define BOOST_PP_BOOL_176 1 -# define BOOST_PP_BOOL_177 1 -# define BOOST_PP_BOOL_178 1 -# define BOOST_PP_BOOL_179 1 -# define BOOST_PP_BOOL_180 1 -# define BOOST_PP_BOOL_181 1 -# define BOOST_PP_BOOL_182 1 -# define BOOST_PP_BOOL_183 1 -# define BOOST_PP_BOOL_184 1 -# define BOOST_PP_BOOL_185 1 -# define BOOST_PP_BOOL_186 1 -# define BOOST_PP_BOOL_187 1 -# define BOOST_PP_BOOL_188 1 -# define BOOST_PP_BOOL_189 1 -# define BOOST_PP_BOOL_190 1 -# define BOOST_PP_BOOL_191 1 -# define BOOST_PP_BOOL_192 1 -# define BOOST_PP_BOOL_193 1 -# define BOOST_PP_BOOL_194 1 -# define BOOST_PP_BOOL_195 1 -# define BOOST_PP_BOOL_196 1 -# define BOOST_PP_BOOL_197 1 -# define BOOST_PP_BOOL_198 1 -# define BOOST_PP_BOOL_199 1 -# define BOOST_PP_BOOL_200 1 -# define BOOST_PP_BOOL_201 1 -# define BOOST_PP_BOOL_202 1 -# define BOOST_PP_BOOL_203 1 -# define BOOST_PP_BOOL_204 1 -# define BOOST_PP_BOOL_205 1 -# define BOOST_PP_BOOL_206 1 -# define BOOST_PP_BOOL_207 1 -# define BOOST_PP_BOOL_208 1 -# define BOOST_PP_BOOL_209 1 -# define BOOST_PP_BOOL_210 1 -# define BOOST_PP_BOOL_211 1 -# define BOOST_PP_BOOL_212 1 -# define BOOST_PP_BOOL_213 1 -# define BOOST_PP_BOOL_214 1 -# define BOOST_PP_BOOL_215 1 -# define BOOST_PP_BOOL_216 1 -# define BOOST_PP_BOOL_217 1 -# define BOOST_PP_BOOL_218 1 -# define BOOST_PP_BOOL_219 1 -# define BOOST_PP_BOOL_220 1 -# define BOOST_PP_BOOL_221 1 -# define BOOST_PP_BOOL_222 1 -# define BOOST_PP_BOOL_223 1 -# define BOOST_PP_BOOL_224 1 -# define BOOST_PP_BOOL_225 1 -# define BOOST_PP_BOOL_226 1 -# define BOOST_PP_BOOL_227 1 -# define BOOST_PP_BOOL_228 1 -# define BOOST_PP_BOOL_229 1 -# define BOOST_PP_BOOL_230 1 -# define BOOST_PP_BOOL_231 1 -# define BOOST_PP_BOOL_232 1 -# define BOOST_PP_BOOL_233 1 -# define BOOST_PP_BOOL_234 1 -# define BOOST_PP_BOOL_235 1 -# define BOOST_PP_BOOL_236 1 -# define BOOST_PP_BOOL_237 1 -# define BOOST_PP_BOOL_238 1 -# define BOOST_PP_BOOL_239 1 -# define BOOST_PP_BOOL_240 1 -# define BOOST_PP_BOOL_241 1 -# define BOOST_PP_BOOL_242 1 -# define BOOST_PP_BOOL_243 1 -# define BOOST_PP_BOOL_244 1 -# define BOOST_PP_BOOL_245 1 -# define BOOST_PP_BOOL_246 1 -# define BOOST_PP_BOOL_247 1 -# define BOOST_PP_BOOL_248 1 -# define BOOST_PP_BOOL_249 1 -# define BOOST_PP_BOOL_250 1 -# define BOOST_PP_BOOL_251 1 -# define BOOST_PP_BOOL_252 1 -# define BOOST_PP_BOOL_253 1 -# define BOOST_PP_BOOL_254 1 -# define BOOST_PP_BOOL_255 1 -# define BOOST_PP_BOOL_256 1 -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/logical/not.hpp --- a/epoc32/include/stdapis/boost/preprocessor/logical/not.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LOGICAL_NOT_HPP -# define BOOST_PREPROCESSOR_LOGICAL_NOT_HPP -# -# include -# include -# include -# -# /* BOOST_PP_NOT */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_NOT(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) -# else -# define BOOST_PP_NOT(x) BOOST_PP_NOT_I(x) -# define BOOST_PP_NOT_I(x) BOOST_PP_COMPL(BOOST_PP_BOOL(x)) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/logical/or.hpp --- a/epoc32/include/stdapis/boost/preprocessor/logical/or.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_LOGICAL_OR_HPP -# define BOOST_PREPROCESSOR_LOGICAL_OR_HPP -# -# include -# include -# include -# -# /* BOOST_PP_OR */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_OR(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) -# else -# define BOOST_PP_OR(p, q) BOOST_PP_OR_I(p, q) -# define BOOST_PP_OR_I(p, q) BOOST_PP_BITOR(BOOST_PP_BOOL(p), BOOST_PP_BOOL(q)) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/punctuation/comma_if.hpp --- a/epoc32/include/stdapis/boost/preprocessor/punctuation/comma_if.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP -# define BOOST_PREPROCESSOR_PUNCTUATION_COMMA_IF_HPP -# -# include -# include -# include -# include -# -# /* BOOST_PP_COMMA_IF */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_COMMA_IF(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() -# else -# define BOOST_PP_COMMA_IF(cond) BOOST_PP_COMMA_IF_I(cond) -# define BOOST_PP_COMMA_IF_I(cond) BOOST_PP_IF(cond, BOOST_PP_COMMA, BOOST_PP_EMPTY)() -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/repetition/detail/edg/for.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/repetition/detail/edg/for.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,306 @@ +# /* Copyright (C) 2001 +# * Housemarque Oy +# * http://www.housemarque.com +# * +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# */ +# +# /* Revised by Paul Mensonides (2002) */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_REPETITION_FOR_HPP +# define BOOST_PREPROCESSOR_REPETITION_FOR_HPP +# +# include +# include +# include +# +# /* BOOST_PP_FOR */ +# +# if 0 +# define BOOST_PP_FOR(state, pred, op, macro) +# endif +# +# define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)) +# +# define BOOST_PP_FOR_P(n) BOOST_PP_CAT(BOOST_PP_FOR_CHECK_, BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M)) +# +# define BOOST_PP_FOR_SR_P(r, s) s +# define BOOST_PP_FOR_SR_O(r, s) 0 +# define BOOST_PP_FOR_SR_M(r, s) BOOST_PP_NIL +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# include +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() +# include +# else +# include +# endif +# +# define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) +# +# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 +# +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_1(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_2(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_3(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_4(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_5(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_6(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_7(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_8(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_9(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_10(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_11(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_12(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_13(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_14(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_15(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_16(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_17(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_18(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_19(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_20(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_21(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_22(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_23(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_24(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_25(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_26(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_27(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_28(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_29(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_30(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_31(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_32(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_33(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_34(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_35(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_36(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_37(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_38(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_39(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_40(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_41(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_42(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_43(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_44(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_45(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_46(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_47(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_48(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_49(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_50(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_51(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_52(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_53(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_54(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_55(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_56(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_57(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_58(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_59(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_60(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_61(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_62(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_63(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_64(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_65(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_66(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_67(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_68(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_69(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_70(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_71(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_72(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_73(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_74(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_75(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_76(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_77(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_78(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_79(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_80(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_81(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_82(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_83(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_84(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_85(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_86(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_87(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_88(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_89(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_90(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_91(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_92(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_93(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_94(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_95(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_96(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_97(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_98(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_99(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_100(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_101(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_102(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_103(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_104(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_105(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_106(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_107(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_108(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_109(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_110(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_111(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_112(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_113(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_114(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_115(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_116(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_117(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_118(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_119(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_120(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_121(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_122(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_123(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_124(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_125(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_126(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_127(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_128(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_129(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_130(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_131(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_132(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_133(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_134(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_135(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_136(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_137(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_138(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_139(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_140(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_141(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_142(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_143(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_144(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_145(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_146(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_147(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_148(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_149(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_150(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_151(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_152(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_153(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_154(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_155(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_156(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_157(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_158(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_159(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_160(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_161(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_162(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_163(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_164(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_165(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_166(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_167(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_168(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_169(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_170(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_171(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_172(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_173(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_174(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_175(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_176(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_177(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_178(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_179(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_180(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_181(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_182(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_183(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_184(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_185(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_186(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_187(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_188(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_189(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_190(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_191(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_192(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_193(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_194(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_195(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_196(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_197(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_198(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_199(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_200(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_201(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_202(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_203(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_204(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_205(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_206(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_207(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_208(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_209(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_210(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_211(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_212(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_213(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_214(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_215(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_216(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_217(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_218(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_219(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_220(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_221(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_222(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_223(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_224(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_225(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_226(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_227(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_228(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_229(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_230(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_231(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_232(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_233(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_234(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_235(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_236(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_237(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_238(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_239(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_240(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_241(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_242(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_243(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_244(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_245(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_246(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_247(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_248(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_249(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_250(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_251(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_252(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_253(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_254(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_255(s, p, o, m) 0 +# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_256(s, p, o, m) 0 +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/repetition/enum_params.hpp --- a/epoc32/include/stdapis/boost/preprocessor/repetition/enum_params.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP -# define BOOST_PREPROCESSOR_REPETITION_ENUM_PARAMS_HPP -# -# include -# include -# include -# -# /* BOOST_PP_ENUM_PARAMS */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) -# else -# define BOOST_PP_ENUM_PARAMS(count, param) BOOST_PP_ENUM_PARAMS_I(count, param) -# define BOOST_PP_ENUM_PARAMS_I(count, param) BOOST_PP_REPEAT(count, BOOST_PP_ENUM_PARAMS_M, param) -# endif -# -# define BOOST_PP_ENUM_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) param ## n -# -# /* BOOST_PP_ENUM_PARAMS_Z */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) -# else -# define BOOST_PP_ENUM_PARAMS_Z(z, count, param) BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) -# define BOOST_PP_ENUM_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(count, BOOST_PP_ENUM_PARAMS_M, param) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/repetition/enum_shifted_params.hpp --- a/epoc32/include/stdapis/boost/preprocessor/repetition/enum_shifted_params.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP -# define BOOST_PREPROCESSOR_REPETITION_ENUM_SHIFTED_PARAMS_HPP -# -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_ENUM_SHIFTED_PARAMS */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) -# else -# define BOOST_PP_ENUM_SHIFTED_PARAMS(count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) -# define BOOST_PP_ENUM_SHIFTED_PARAMS_I(count, param) BOOST_PP_REPEAT(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) -# endif -# -# define BOOST_PP_ENUM_SHIFTED_PARAMS_M(z, n, param) BOOST_PP_COMMA_IF(n) BOOST_PP_CAT(param, BOOST_PP_INC(n)) -# -# /* BOOST_PP_ENUM_SHIFTED_PARAMS_Z */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) -# else -# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z(z, count, param) BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) -# define BOOST_PP_ENUM_SHIFTED_PARAMS_Z_I(z, count, param) BOOST_PP_REPEAT_ ## z(BOOST_PP_DEC(count), BOOST_PP_ENUM_SHIFTED_PARAMS_M, param) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/repetition/for.hpp --- a/epoc32/include/stdapis/boost/preprocessor/repetition/for.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,306 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_REPETITION_FOR_HPP -# define BOOST_PREPROCESSOR_REPETITION_FOR_HPP -# -# include -# include -# include -# -# /* BOOST_PP_FOR */ -# -# if 0 -# define BOOST_PP_FOR(state, pred, op, macro) -# endif -# -# define BOOST_PP_FOR BOOST_PP_CAT(BOOST_PP_FOR_, BOOST_PP_AUTO_REC(BOOST_PP_FOR_P, 256)) -# -# define BOOST_PP_FOR_P(n) BOOST_PP_CAT(BOOST_PP_FOR_CHECK_, BOOST_PP_FOR_ ## n(1, BOOST_PP_FOR_SR_P, BOOST_PP_FOR_SR_O, BOOST_PP_FOR_SR_M)) -# -# define BOOST_PP_FOR_SR_P(r, s) s -# define BOOST_PP_FOR_SR_O(r, s) 0 -# define BOOST_PP_FOR_SR_M(r, s) BOOST_PP_NIL -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# include -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# include -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() -# include -# else -# include -# endif -# -# define BOOST_PP_FOR_257(s, p, o, m) BOOST_PP_ERROR(0x0002) -# -# define BOOST_PP_FOR_CHECK_BOOST_PP_NIL 1 -# -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_1(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_2(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_3(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_4(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_5(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_6(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_7(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_8(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_9(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_10(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_11(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_12(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_13(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_14(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_15(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_16(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_17(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_18(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_19(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_20(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_21(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_22(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_23(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_24(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_25(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_26(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_27(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_28(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_29(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_30(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_31(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_32(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_33(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_34(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_35(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_36(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_37(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_38(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_39(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_40(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_41(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_42(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_43(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_44(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_45(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_46(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_47(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_48(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_49(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_50(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_51(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_52(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_53(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_54(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_55(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_56(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_57(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_58(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_59(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_60(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_61(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_62(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_63(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_64(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_65(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_66(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_67(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_68(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_69(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_70(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_71(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_72(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_73(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_74(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_75(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_76(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_77(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_78(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_79(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_80(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_81(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_82(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_83(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_84(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_85(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_86(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_87(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_88(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_89(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_90(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_91(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_92(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_93(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_94(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_95(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_96(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_97(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_98(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_99(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_100(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_101(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_102(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_103(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_104(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_105(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_106(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_107(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_108(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_109(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_110(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_111(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_112(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_113(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_114(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_115(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_116(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_117(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_118(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_119(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_120(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_121(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_122(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_123(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_124(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_125(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_126(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_127(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_128(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_129(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_130(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_131(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_132(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_133(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_134(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_135(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_136(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_137(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_138(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_139(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_140(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_141(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_142(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_143(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_144(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_145(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_146(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_147(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_148(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_149(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_150(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_151(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_152(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_153(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_154(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_155(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_156(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_157(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_158(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_159(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_160(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_161(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_162(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_163(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_164(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_165(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_166(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_167(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_168(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_169(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_170(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_171(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_172(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_173(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_174(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_175(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_176(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_177(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_178(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_179(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_180(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_181(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_182(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_183(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_184(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_185(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_186(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_187(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_188(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_189(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_190(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_191(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_192(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_193(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_194(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_195(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_196(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_197(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_198(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_199(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_200(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_201(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_202(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_203(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_204(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_205(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_206(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_207(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_208(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_209(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_210(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_211(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_212(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_213(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_214(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_215(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_216(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_217(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_218(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_219(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_220(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_221(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_222(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_223(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_224(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_225(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_226(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_227(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_228(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_229(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_230(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_231(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_232(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_233(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_234(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_235(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_236(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_237(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_238(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_239(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_240(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_241(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_242(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_243(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_244(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_245(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_246(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_247(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_248(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_249(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_250(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_251(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_252(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_253(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_254(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_255(s, p, o, m) 0 -# define BOOST_PP_FOR_CHECK_BOOST_PP_FOR_256(s, p, o, m) 0 -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/repetition/repeat.hpp --- a/epoc32/include/stdapis/boost/preprocessor/repetition/repeat.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,825 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP -# define BOOST_PREPROCESSOR_REPETITION_REPEAT_HPP -# -# include -# include -# include -# include -# include -# -# /* BOOST_PP_REPEAT */ -# -# if 0 -# define BOOST_PP_REPEAT(count, macro, data) -# endif -# -# define BOOST_PP_REPEAT BOOST_PP_CAT(BOOST_PP_REPEAT_, BOOST_PP_AUTO_REC(BOOST_PP_REPEAT_P, 4)) -# -# define BOOST_PP_REPEAT_P(n) BOOST_PP_CAT(BOOST_PP_REPEAT_CHECK_, BOOST_PP_REPEAT_ ## n(1, BOOST_PP_NIL BOOST_PP_TUPLE_EAT_3, BOOST_PP_NIL)) -# -# define BOOST_PP_REPEAT_CHECK_BOOST_PP_NIL 1 -# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_1(c, m, d) 0 -# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_2(c, m, d) 0 -# define BOOST_PP_REPEAT_CHECK_BOOST_PP_REPEAT_3(c, m, d) 0 -# -# define BOOST_PP_REPEAT_1(c, m, d) BOOST_PP_REPEAT_1_I(c, m, d) -# define BOOST_PP_REPEAT_2(c, m, d) BOOST_PP_REPEAT_2_I(c, m, d) -# define BOOST_PP_REPEAT_3(c, m, d) BOOST_PP_REPEAT_3_I(c, m, d) -# define BOOST_PP_REPEAT_4(c, m, d) BOOST_PP_ERROR(0x0003) -# -# define BOOST_PP_REPEAT_1_I(c, m, d) BOOST_PP_REPEAT_1_ ## c(m, d) -# define BOOST_PP_REPEAT_2_I(c, m, d) BOOST_PP_REPEAT_2_ ## c(m, d) -# define BOOST_PP_REPEAT_3_I(c, m, d) BOOST_PP_REPEAT_3_ ## c(m, d) -# -# define BOOST_PP_REPEAT_1ST BOOST_PP_REPEAT_1 -# define BOOST_PP_REPEAT_2ND BOOST_PP_REPEAT_2 -# define BOOST_PP_REPEAT_3RD BOOST_PP_REPEAT_3 -# -# define BOOST_PP_REPEAT_1_0(m, d) -# define BOOST_PP_REPEAT_1_1(m, d) m(2, 0, d) -# define BOOST_PP_REPEAT_1_2(m, d) BOOST_PP_REPEAT_1_1(m, d) m(2, 1, d) -# define BOOST_PP_REPEAT_1_3(m, d) BOOST_PP_REPEAT_1_2(m, d) m(2, 2, d) -# define BOOST_PP_REPEAT_1_4(m, d) BOOST_PP_REPEAT_1_3(m, d) m(2, 3, d) -# define BOOST_PP_REPEAT_1_5(m, d) BOOST_PP_REPEAT_1_4(m, d) m(2, 4, d) -# define BOOST_PP_REPEAT_1_6(m, d) BOOST_PP_REPEAT_1_5(m, d) m(2, 5, d) -# define BOOST_PP_REPEAT_1_7(m, d) BOOST_PP_REPEAT_1_6(m, d) m(2, 6, d) -# define BOOST_PP_REPEAT_1_8(m, d) BOOST_PP_REPEAT_1_7(m, d) m(2, 7, d) -# define BOOST_PP_REPEAT_1_9(m, d) BOOST_PP_REPEAT_1_8(m, d) m(2, 8, d) -# define BOOST_PP_REPEAT_1_10(m, d) BOOST_PP_REPEAT_1_9(m, d) m(2, 9, d) -# define BOOST_PP_REPEAT_1_11(m, d) BOOST_PP_REPEAT_1_10(m, d) m(2, 10, d) -# define BOOST_PP_REPEAT_1_12(m, d) BOOST_PP_REPEAT_1_11(m, d) m(2, 11, d) -# define BOOST_PP_REPEAT_1_13(m, d) BOOST_PP_REPEAT_1_12(m, d) m(2, 12, d) -# define BOOST_PP_REPEAT_1_14(m, d) BOOST_PP_REPEAT_1_13(m, d) m(2, 13, d) -# define BOOST_PP_REPEAT_1_15(m, d) BOOST_PP_REPEAT_1_14(m, d) m(2, 14, d) -# define BOOST_PP_REPEAT_1_16(m, d) BOOST_PP_REPEAT_1_15(m, d) m(2, 15, d) -# define BOOST_PP_REPEAT_1_17(m, d) BOOST_PP_REPEAT_1_16(m, d) m(2, 16, d) -# define BOOST_PP_REPEAT_1_18(m, d) BOOST_PP_REPEAT_1_17(m, d) m(2, 17, d) -# define BOOST_PP_REPEAT_1_19(m, d) BOOST_PP_REPEAT_1_18(m, d) m(2, 18, d) -# define BOOST_PP_REPEAT_1_20(m, d) BOOST_PP_REPEAT_1_19(m, d) m(2, 19, d) -# define BOOST_PP_REPEAT_1_21(m, d) BOOST_PP_REPEAT_1_20(m, d) m(2, 20, d) -# define BOOST_PP_REPEAT_1_22(m, d) BOOST_PP_REPEAT_1_21(m, d) m(2, 21, d) -# define BOOST_PP_REPEAT_1_23(m, d) BOOST_PP_REPEAT_1_22(m, d) m(2, 22, d) -# define BOOST_PP_REPEAT_1_24(m, d) BOOST_PP_REPEAT_1_23(m, d) m(2, 23, d) -# define BOOST_PP_REPEAT_1_25(m, d) BOOST_PP_REPEAT_1_24(m, d) m(2, 24, d) -# define BOOST_PP_REPEAT_1_26(m, d) BOOST_PP_REPEAT_1_25(m, d) m(2, 25, d) -# define BOOST_PP_REPEAT_1_27(m, d) BOOST_PP_REPEAT_1_26(m, d) m(2, 26, d) -# define BOOST_PP_REPEAT_1_28(m, d) BOOST_PP_REPEAT_1_27(m, d) m(2, 27, d) -# define BOOST_PP_REPEAT_1_29(m, d) BOOST_PP_REPEAT_1_28(m, d) m(2, 28, d) -# define BOOST_PP_REPEAT_1_30(m, d) BOOST_PP_REPEAT_1_29(m, d) m(2, 29, d) -# define BOOST_PP_REPEAT_1_31(m, d) BOOST_PP_REPEAT_1_30(m, d) m(2, 30, d) -# define BOOST_PP_REPEAT_1_32(m, d) BOOST_PP_REPEAT_1_31(m, d) m(2, 31, d) -# define BOOST_PP_REPEAT_1_33(m, d) BOOST_PP_REPEAT_1_32(m, d) m(2, 32, d) -# define BOOST_PP_REPEAT_1_34(m, d) BOOST_PP_REPEAT_1_33(m, d) m(2, 33, d) -# define BOOST_PP_REPEAT_1_35(m, d) BOOST_PP_REPEAT_1_34(m, d) m(2, 34, d) -# define BOOST_PP_REPEAT_1_36(m, d) BOOST_PP_REPEAT_1_35(m, d) m(2, 35, d) -# define BOOST_PP_REPEAT_1_37(m, d) BOOST_PP_REPEAT_1_36(m, d) m(2, 36, d) -# define BOOST_PP_REPEAT_1_38(m, d) BOOST_PP_REPEAT_1_37(m, d) m(2, 37, d) -# define BOOST_PP_REPEAT_1_39(m, d) BOOST_PP_REPEAT_1_38(m, d) m(2, 38, d) -# define BOOST_PP_REPEAT_1_40(m, d) BOOST_PP_REPEAT_1_39(m, d) m(2, 39, d) -# define BOOST_PP_REPEAT_1_41(m, d) BOOST_PP_REPEAT_1_40(m, d) m(2, 40, d) -# define BOOST_PP_REPEAT_1_42(m, d) BOOST_PP_REPEAT_1_41(m, d) m(2, 41, d) -# define BOOST_PP_REPEAT_1_43(m, d) BOOST_PP_REPEAT_1_42(m, d) m(2, 42, d) -# define BOOST_PP_REPEAT_1_44(m, d) BOOST_PP_REPEAT_1_43(m, d) m(2, 43, d) -# define BOOST_PP_REPEAT_1_45(m, d) BOOST_PP_REPEAT_1_44(m, d) m(2, 44, d) -# define BOOST_PP_REPEAT_1_46(m, d) BOOST_PP_REPEAT_1_45(m, d) m(2, 45, d) -# define BOOST_PP_REPEAT_1_47(m, d) BOOST_PP_REPEAT_1_46(m, d) m(2, 46, d) -# define BOOST_PP_REPEAT_1_48(m, d) BOOST_PP_REPEAT_1_47(m, d) m(2, 47, d) -# define BOOST_PP_REPEAT_1_49(m, d) BOOST_PP_REPEAT_1_48(m, d) m(2, 48, d) -# define BOOST_PP_REPEAT_1_50(m, d) BOOST_PP_REPEAT_1_49(m, d) m(2, 49, d) -# define BOOST_PP_REPEAT_1_51(m, d) BOOST_PP_REPEAT_1_50(m, d) m(2, 50, d) -# define BOOST_PP_REPEAT_1_52(m, d) BOOST_PP_REPEAT_1_51(m, d) m(2, 51, d) -# define BOOST_PP_REPEAT_1_53(m, d) BOOST_PP_REPEAT_1_52(m, d) m(2, 52, d) -# define BOOST_PP_REPEAT_1_54(m, d) BOOST_PP_REPEAT_1_53(m, d) m(2, 53, d) -# define BOOST_PP_REPEAT_1_55(m, d) BOOST_PP_REPEAT_1_54(m, d) m(2, 54, d) -# define BOOST_PP_REPEAT_1_56(m, d) BOOST_PP_REPEAT_1_55(m, d) m(2, 55, d) -# define BOOST_PP_REPEAT_1_57(m, d) BOOST_PP_REPEAT_1_56(m, d) m(2, 56, d) -# define BOOST_PP_REPEAT_1_58(m, d) BOOST_PP_REPEAT_1_57(m, d) m(2, 57, d) -# define BOOST_PP_REPEAT_1_59(m, d) BOOST_PP_REPEAT_1_58(m, d) m(2, 58, d) -# define BOOST_PP_REPEAT_1_60(m, d) BOOST_PP_REPEAT_1_59(m, d) m(2, 59, d) -# define BOOST_PP_REPEAT_1_61(m, d) BOOST_PP_REPEAT_1_60(m, d) m(2, 60, d) -# define BOOST_PP_REPEAT_1_62(m, d) BOOST_PP_REPEAT_1_61(m, d) m(2, 61, d) -# define BOOST_PP_REPEAT_1_63(m, d) BOOST_PP_REPEAT_1_62(m, d) m(2, 62, d) -# define BOOST_PP_REPEAT_1_64(m, d) BOOST_PP_REPEAT_1_63(m, d) m(2, 63, d) -# define BOOST_PP_REPEAT_1_65(m, d) BOOST_PP_REPEAT_1_64(m, d) m(2, 64, d) -# define BOOST_PP_REPEAT_1_66(m, d) BOOST_PP_REPEAT_1_65(m, d) m(2, 65, d) -# define BOOST_PP_REPEAT_1_67(m, d) BOOST_PP_REPEAT_1_66(m, d) m(2, 66, d) -# define BOOST_PP_REPEAT_1_68(m, d) BOOST_PP_REPEAT_1_67(m, d) m(2, 67, d) -# define BOOST_PP_REPEAT_1_69(m, d) BOOST_PP_REPEAT_1_68(m, d) m(2, 68, d) -# define BOOST_PP_REPEAT_1_70(m, d) BOOST_PP_REPEAT_1_69(m, d) m(2, 69, d) -# define BOOST_PP_REPEAT_1_71(m, d) BOOST_PP_REPEAT_1_70(m, d) m(2, 70, d) -# define BOOST_PP_REPEAT_1_72(m, d) BOOST_PP_REPEAT_1_71(m, d) m(2, 71, d) -# define BOOST_PP_REPEAT_1_73(m, d) BOOST_PP_REPEAT_1_72(m, d) m(2, 72, d) -# define BOOST_PP_REPEAT_1_74(m, d) BOOST_PP_REPEAT_1_73(m, d) m(2, 73, d) -# define BOOST_PP_REPEAT_1_75(m, d) BOOST_PP_REPEAT_1_74(m, d) m(2, 74, d) -# define BOOST_PP_REPEAT_1_76(m, d) BOOST_PP_REPEAT_1_75(m, d) m(2, 75, d) -# define BOOST_PP_REPEAT_1_77(m, d) BOOST_PP_REPEAT_1_76(m, d) m(2, 76, d) -# define BOOST_PP_REPEAT_1_78(m, d) BOOST_PP_REPEAT_1_77(m, d) m(2, 77, d) -# define BOOST_PP_REPEAT_1_79(m, d) BOOST_PP_REPEAT_1_78(m, d) m(2, 78, d) -# define BOOST_PP_REPEAT_1_80(m, d) BOOST_PP_REPEAT_1_79(m, d) m(2, 79, d) -# define BOOST_PP_REPEAT_1_81(m, d) BOOST_PP_REPEAT_1_80(m, d) m(2, 80, d) -# define BOOST_PP_REPEAT_1_82(m, d) BOOST_PP_REPEAT_1_81(m, d) m(2, 81, d) -# define BOOST_PP_REPEAT_1_83(m, d) BOOST_PP_REPEAT_1_82(m, d) m(2, 82, d) -# define BOOST_PP_REPEAT_1_84(m, d) BOOST_PP_REPEAT_1_83(m, d) m(2, 83, d) -# define BOOST_PP_REPEAT_1_85(m, d) BOOST_PP_REPEAT_1_84(m, d) m(2, 84, d) -# define BOOST_PP_REPEAT_1_86(m, d) BOOST_PP_REPEAT_1_85(m, d) m(2, 85, d) -# define BOOST_PP_REPEAT_1_87(m, d) BOOST_PP_REPEAT_1_86(m, d) m(2, 86, d) -# define BOOST_PP_REPEAT_1_88(m, d) BOOST_PP_REPEAT_1_87(m, d) m(2, 87, d) -# define BOOST_PP_REPEAT_1_89(m, d) BOOST_PP_REPEAT_1_88(m, d) m(2, 88, d) -# define BOOST_PP_REPEAT_1_90(m, d) BOOST_PP_REPEAT_1_89(m, d) m(2, 89, d) -# define BOOST_PP_REPEAT_1_91(m, d) BOOST_PP_REPEAT_1_90(m, d) m(2, 90, d) -# define BOOST_PP_REPEAT_1_92(m, d) BOOST_PP_REPEAT_1_91(m, d) m(2, 91, d) -# define BOOST_PP_REPEAT_1_93(m, d) BOOST_PP_REPEAT_1_92(m, d) m(2, 92, d) -# define BOOST_PP_REPEAT_1_94(m, d) BOOST_PP_REPEAT_1_93(m, d) m(2, 93, d) -# define BOOST_PP_REPEAT_1_95(m, d) BOOST_PP_REPEAT_1_94(m, d) m(2, 94, d) -# define BOOST_PP_REPEAT_1_96(m, d) BOOST_PP_REPEAT_1_95(m, d) m(2, 95, d) -# define BOOST_PP_REPEAT_1_97(m, d) BOOST_PP_REPEAT_1_96(m, d) m(2, 96, d) -# define BOOST_PP_REPEAT_1_98(m, d) BOOST_PP_REPEAT_1_97(m, d) m(2, 97, d) -# define BOOST_PP_REPEAT_1_99(m, d) BOOST_PP_REPEAT_1_98(m, d) m(2, 98, d) -# define BOOST_PP_REPEAT_1_100(m, d) BOOST_PP_REPEAT_1_99(m, d) m(2, 99, d) -# define BOOST_PP_REPEAT_1_101(m, d) BOOST_PP_REPEAT_1_100(m, d) m(2, 100, d) -# define BOOST_PP_REPEAT_1_102(m, d) BOOST_PP_REPEAT_1_101(m, d) m(2, 101, d) -# define BOOST_PP_REPEAT_1_103(m, d) BOOST_PP_REPEAT_1_102(m, d) m(2, 102, d) -# define BOOST_PP_REPEAT_1_104(m, d) BOOST_PP_REPEAT_1_103(m, d) m(2, 103, d) -# define BOOST_PP_REPEAT_1_105(m, d) BOOST_PP_REPEAT_1_104(m, d) m(2, 104, d) -# define BOOST_PP_REPEAT_1_106(m, d) BOOST_PP_REPEAT_1_105(m, d) m(2, 105, d) -# define BOOST_PP_REPEAT_1_107(m, d) BOOST_PP_REPEAT_1_106(m, d) m(2, 106, d) -# define BOOST_PP_REPEAT_1_108(m, d) BOOST_PP_REPEAT_1_107(m, d) m(2, 107, d) -# define BOOST_PP_REPEAT_1_109(m, d) BOOST_PP_REPEAT_1_108(m, d) m(2, 108, d) -# define BOOST_PP_REPEAT_1_110(m, d) BOOST_PP_REPEAT_1_109(m, d) m(2, 109, d) -# define BOOST_PP_REPEAT_1_111(m, d) BOOST_PP_REPEAT_1_110(m, d) m(2, 110, d) -# define BOOST_PP_REPEAT_1_112(m, d) BOOST_PP_REPEAT_1_111(m, d) m(2, 111, d) -# define BOOST_PP_REPEAT_1_113(m, d) BOOST_PP_REPEAT_1_112(m, d) m(2, 112, d) -# define BOOST_PP_REPEAT_1_114(m, d) BOOST_PP_REPEAT_1_113(m, d) m(2, 113, d) -# define BOOST_PP_REPEAT_1_115(m, d) BOOST_PP_REPEAT_1_114(m, d) m(2, 114, d) -# define BOOST_PP_REPEAT_1_116(m, d) BOOST_PP_REPEAT_1_115(m, d) m(2, 115, d) -# define BOOST_PP_REPEAT_1_117(m, d) BOOST_PP_REPEAT_1_116(m, d) m(2, 116, d) -# define BOOST_PP_REPEAT_1_118(m, d) BOOST_PP_REPEAT_1_117(m, d) m(2, 117, d) -# define BOOST_PP_REPEAT_1_119(m, d) BOOST_PP_REPEAT_1_118(m, d) m(2, 118, d) -# define BOOST_PP_REPEAT_1_120(m, d) BOOST_PP_REPEAT_1_119(m, d) m(2, 119, d) -# define BOOST_PP_REPEAT_1_121(m, d) BOOST_PP_REPEAT_1_120(m, d) m(2, 120, d) -# define BOOST_PP_REPEAT_1_122(m, d) BOOST_PP_REPEAT_1_121(m, d) m(2, 121, d) -# define BOOST_PP_REPEAT_1_123(m, d) BOOST_PP_REPEAT_1_122(m, d) m(2, 122, d) -# define BOOST_PP_REPEAT_1_124(m, d) BOOST_PP_REPEAT_1_123(m, d) m(2, 123, d) -# define BOOST_PP_REPEAT_1_125(m, d) BOOST_PP_REPEAT_1_124(m, d) m(2, 124, d) -# define BOOST_PP_REPEAT_1_126(m, d) BOOST_PP_REPEAT_1_125(m, d) m(2, 125, d) -# define BOOST_PP_REPEAT_1_127(m, d) BOOST_PP_REPEAT_1_126(m, d) m(2, 126, d) -# define BOOST_PP_REPEAT_1_128(m, d) BOOST_PP_REPEAT_1_127(m, d) m(2, 127, d) -# define BOOST_PP_REPEAT_1_129(m, d) BOOST_PP_REPEAT_1_128(m, d) m(2, 128, d) -# define BOOST_PP_REPEAT_1_130(m, d) BOOST_PP_REPEAT_1_129(m, d) m(2, 129, d) -# define BOOST_PP_REPEAT_1_131(m, d) BOOST_PP_REPEAT_1_130(m, d) m(2, 130, d) -# define BOOST_PP_REPEAT_1_132(m, d) BOOST_PP_REPEAT_1_131(m, d) m(2, 131, d) -# define BOOST_PP_REPEAT_1_133(m, d) BOOST_PP_REPEAT_1_132(m, d) m(2, 132, d) -# define BOOST_PP_REPEAT_1_134(m, d) BOOST_PP_REPEAT_1_133(m, d) m(2, 133, d) -# define BOOST_PP_REPEAT_1_135(m, d) BOOST_PP_REPEAT_1_134(m, d) m(2, 134, d) -# define BOOST_PP_REPEAT_1_136(m, d) BOOST_PP_REPEAT_1_135(m, d) m(2, 135, d) -# define BOOST_PP_REPEAT_1_137(m, d) BOOST_PP_REPEAT_1_136(m, d) m(2, 136, d) -# define BOOST_PP_REPEAT_1_138(m, d) BOOST_PP_REPEAT_1_137(m, d) m(2, 137, d) -# define BOOST_PP_REPEAT_1_139(m, d) BOOST_PP_REPEAT_1_138(m, d) m(2, 138, d) -# define BOOST_PP_REPEAT_1_140(m, d) BOOST_PP_REPEAT_1_139(m, d) m(2, 139, d) -# define BOOST_PP_REPEAT_1_141(m, d) BOOST_PP_REPEAT_1_140(m, d) m(2, 140, d) -# define BOOST_PP_REPEAT_1_142(m, d) BOOST_PP_REPEAT_1_141(m, d) m(2, 141, d) -# define BOOST_PP_REPEAT_1_143(m, d) BOOST_PP_REPEAT_1_142(m, d) m(2, 142, d) -# define BOOST_PP_REPEAT_1_144(m, d) BOOST_PP_REPEAT_1_143(m, d) m(2, 143, d) -# define BOOST_PP_REPEAT_1_145(m, d) BOOST_PP_REPEAT_1_144(m, d) m(2, 144, d) -# define BOOST_PP_REPEAT_1_146(m, d) BOOST_PP_REPEAT_1_145(m, d) m(2, 145, d) -# define BOOST_PP_REPEAT_1_147(m, d) BOOST_PP_REPEAT_1_146(m, d) m(2, 146, d) -# define BOOST_PP_REPEAT_1_148(m, d) BOOST_PP_REPEAT_1_147(m, d) m(2, 147, d) -# define BOOST_PP_REPEAT_1_149(m, d) BOOST_PP_REPEAT_1_148(m, d) m(2, 148, d) -# define BOOST_PP_REPEAT_1_150(m, d) BOOST_PP_REPEAT_1_149(m, d) m(2, 149, d) -# define BOOST_PP_REPEAT_1_151(m, d) BOOST_PP_REPEAT_1_150(m, d) m(2, 150, d) -# define BOOST_PP_REPEAT_1_152(m, d) BOOST_PP_REPEAT_1_151(m, d) m(2, 151, d) -# define BOOST_PP_REPEAT_1_153(m, d) BOOST_PP_REPEAT_1_152(m, d) m(2, 152, d) -# define BOOST_PP_REPEAT_1_154(m, d) BOOST_PP_REPEAT_1_153(m, d) m(2, 153, d) -# define BOOST_PP_REPEAT_1_155(m, d) BOOST_PP_REPEAT_1_154(m, d) m(2, 154, d) -# define BOOST_PP_REPEAT_1_156(m, d) BOOST_PP_REPEAT_1_155(m, d) m(2, 155, d) -# define BOOST_PP_REPEAT_1_157(m, d) BOOST_PP_REPEAT_1_156(m, d) m(2, 156, d) -# define BOOST_PP_REPEAT_1_158(m, d) BOOST_PP_REPEAT_1_157(m, d) m(2, 157, d) -# define BOOST_PP_REPEAT_1_159(m, d) BOOST_PP_REPEAT_1_158(m, d) m(2, 158, d) -# define BOOST_PP_REPEAT_1_160(m, d) BOOST_PP_REPEAT_1_159(m, d) m(2, 159, d) -# define BOOST_PP_REPEAT_1_161(m, d) BOOST_PP_REPEAT_1_160(m, d) m(2, 160, d) -# define BOOST_PP_REPEAT_1_162(m, d) BOOST_PP_REPEAT_1_161(m, d) m(2, 161, d) -# define BOOST_PP_REPEAT_1_163(m, d) BOOST_PP_REPEAT_1_162(m, d) m(2, 162, d) -# define BOOST_PP_REPEAT_1_164(m, d) BOOST_PP_REPEAT_1_163(m, d) m(2, 163, d) -# define BOOST_PP_REPEAT_1_165(m, d) BOOST_PP_REPEAT_1_164(m, d) m(2, 164, d) -# define BOOST_PP_REPEAT_1_166(m, d) BOOST_PP_REPEAT_1_165(m, d) m(2, 165, d) -# define BOOST_PP_REPEAT_1_167(m, d) BOOST_PP_REPEAT_1_166(m, d) m(2, 166, d) -# define BOOST_PP_REPEAT_1_168(m, d) BOOST_PP_REPEAT_1_167(m, d) m(2, 167, d) -# define BOOST_PP_REPEAT_1_169(m, d) BOOST_PP_REPEAT_1_168(m, d) m(2, 168, d) -# define BOOST_PP_REPEAT_1_170(m, d) BOOST_PP_REPEAT_1_169(m, d) m(2, 169, d) -# define BOOST_PP_REPEAT_1_171(m, d) BOOST_PP_REPEAT_1_170(m, d) m(2, 170, d) -# define BOOST_PP_REPEAT_1_172(m, d) BOOST_PP_REPEAT_1_171(m, d) m(2, 171, d) -# define BOOST_PP_REPEAT_1_173(m, d) BOOST_PP_REPEAT_1_172(m, d) m(2, 172, d) -# define BOOST_PP_REPEAT_1_174(m, d) BOOST_PP_REPEAT_1_173(m, d) m(2, 173, d) -# define BOOST_PP_REPEAT_1_175(m, d) BOOST_PP_REPEAT_1_174(m, d) m(2, 174, d) -# define BOOST_PP_REPEAT_1_176(m, d) BOOST_PP_REPEAT_1_175(m, d) m(2, 175, d) -# define BOOST_PP_REPEAT_1_177(m, d) BOOST_PP_REPEAT_1_176(m, d) m(2, 176, d) -# define BOOST_PP_REPEAT_1_178(m, d) BOOST_PP_REPEAT_1_177(m, d) m(2, 177, d) -# define BOOST_PP_REPEAT_1_179(m, d) BOOST_PP_REPEAT_1_178(m, d) m(2, 178, d) -# define BOOST_PP_REPEAT_1_180(m, d) BOOST_PP_REPEAT_1_179(m, d) m(2, 179, d) -# define BOOST_PP_REPEAT_1_181(m, d) BOOST_PP_REPEAT_1_180(m, d) m(2, 180, d) -# define BOOST_PP_REPEAT_1_182(m, d) BOOST_PP_REPEAT_1_181(m, d) m(2, 181, d) -# define BOOST_PP_REPEAT_1_183(m, d) BOOST_PP_REPEAT_1_182(m, d) m(2, 182, d) -# define BOOST_PP_REPEAT_1_184(m, d) BOOST_PP_REPEAT_1_183(m, d) m(2, 183, d) -# define BOOST_PP_REPEAT_1_185(m, d) BOOST_PP_REPEAT_1_184(m, d) m(2, 184, d) -# define BOOST_PP_REPEAT_1_186(m, d) BOOST_PP_REPEAT_1_185(m, d) m(2, 185, d) -# define BOOST_PP_REPEAT_1_187(m, d) BOOST_PP_REPEAT_1_186(m, d) m(2, 186, d) -# define BOOST_PP_REPEAT_1_188(m, d) BOOST_PP_REPEAT_1_187(m, d) m(2, 187, d) -# define BOOST_PP_REPEAT_1_189(m, d) BOOST_PP_REPEAT_1_188(m, d) m(2, 188, d) -# define BOOST_PP_REPEAT_1_190(m, d) BOOST_PP_REPEAT_1_189(m, d) m(2, 189, d) -# define BOOST_PP_REPEAT_1_191(m, d) BOOST_PP_REPEAT_1_190(m, d) m(2, 190, d) -# define BOOST_PP_REPEAT_1_192(m, d) BOOST_PP_REPEAT_1_191(m, d) m(2, 191, d) -# define BOOST_PP_REPEAT_1_193(m, d) BOOST_PP_REPEAT_1_192(m, d) m(2, 192, d) -# define BOOST_PP_REPEAT_1_194(m, d) BOOST_PP_REPEAT_1_193(m, d) m(2, 193, d) -# define BOOST_PP_REPEAT_1_195(m, d) BOOST_PP_REPEAT_1_194(m, d) m(2, 194, d) -# define BOOST_PP_REPEAT_1_196(m, d) BOOST_PP_REPEAT_1_195(m, d) m(2, 195, d) -# define BOOST_PP_REPEAT_1_197(m, d) BOOST_PP_REPEAT_1_196(m, d) m(2, 196, d) -# define BOOST_PP_REPEAT_1_198(m, d) BOOST_PP_REPEAT_1_197(m, d) m(2, 197, d) -# define BOOST_PP_REPEAT_1_199(m, d) BOOST_PP_REPEAT_1_198(m, d) m(2, 198, d) -# define BOOST_PP_REPEAT_1_200(m, d) BOOST_PP_REPEAT_1_199(m, d) m(2, 199, d) -# define BOOST_PP_REPEAT_1_201(m, d) BOOST_PP_REPEAT_1_200(m, d) m(2, 200, d) -# define BOOST_PP_REPEAT_1_202(m, d) BOOST_PP_REPEAT_1_201(m, d) m(2, 201, d) -# define BOOST_PP_REPEAT_1_203(m, d) BOOST_PP_REPEAT_1_202(m, d) m(2, 202, d) -# define BOOST_PP_REPEAT_1_204(m, d) BOOST_PP_REPEAT_1_203(m, d) m(2, 203, d) -# define BOOST_PP_REPEAT_1_205(m, d) BOOST_PP_REPEAT_1_204(m, d) m(2, 204, d) -# define BOOST_PP_REPEAT_1_206(m, d) BOOST_PP_REPEAT_1_205(m, d) m(2, 205, d) -# define BOOST_PP_REPEAT_1_207(m, d) BOOST_PP_REPEAT_1_206(m, d) m(2, 206, d) -# define BOOST_PP_REPEAT_1_208(m, d) BOOST_PP_REPEAT_1_207(m, d) m(2, 207, d) -# define BOOST_PP_REPEAT_1_209(m, d) BOOST_PP_REPEAT_1_208(m, d) m(2, 208, d) -# define BOOST_PP_REPEAT_1_210(m, d) BOOST_PP_REPEAT_1_209(m, d) m(2, 209, d) -# define BOOST_PP_REPEAT_1_211(m, d) BOOST_PP_REPEAT_1_210(m, d) m(2, 210, d) -# define BOOST_PP_REPEAT_1_212(m, d) BOOST_PP_REPEAT_1_211(m, d) m(2, 211, d) -# define BOOST_PP_REPEAT_1_213(m, d) BOOST_PP_REPEAT_1_212(m, d) m(2, 212, d) -# define BOOST_PP_REPEAT_1_214(m, d) BOOST_PP_REPEAT_1_213(m, d) m(2, 213, d) -# define BOOST_PP_REPEAT_1_215(m, d) BOOST_PP_REPEAT_1_214(m, d) m(2, 214, d) -# define BOOST_PP_REPEAT_1_216(m, d) BOOST_PP_REPEAT_1_215(m, d) m(2, 215, d) -# define BOOST_PP_REPEAT_1_217(m, d) BOOST_PP_REPEAT_1_216(m, d) m(2, 216, d) -# define BOOST_PP_REPEAT_1_218(m, d) BOOST_PP_REPEAT_1_217(m, d) m(2, 217, d) -# define BOOST_PP_REPEAT_1_219(m, d) BOOST_PP_REPEAT_1_218(m, d) m(2, 218, d) -# define BOOST_PP_REPEAT_1_220(m, d) BOOST_PP_REPEAT_1_219(m, d) m(2, 219, d) -# define BOOST_PP_REPEAT_1_221(m, d) BOOST_PP_REPEAT_1_220(m, d) m(2, 220, d) -# define BOOST_PP_REPEAT_1_222(m, d) BOOST_PP_REPEAT_1_221(m, d) m(2, 221, d) -# define BOOST_PP_REPEAT_1_223(m, d) BOOST_PP_REPEAT_1_222(m, d) m(2, 222, d) -# define BOOST_PP_REPEAT_1_224(m, d) BOOST_PP_REPEAT_1_223(m, d) m(2, 223, d) -# define BOOST_PP_REPEAT_1_225(m, d) BOOST_PP_REPEAT_1_224(m, d) m(2, 224, d) -# define BOOST_PP_REPEAT_1_226(m, d) BOOST_PP_REPEAT_1_225(m, d) m(2, 225, d) -# define BOOST_PP_REPEAT_1_227(m, d) BOOST_PP_REPEAT_1_226(m, d) m(2, 226, d) -# define BOOST_PP_REPEAT_1_228(m, d) BOOST_PP_REPEAT_1_227(m, d) m(2, 227, d) -# define BOOST_PP_REPEAT_1_229(m, d) BOOST_PP_REPEAT_1_228(m, d) m(2, 228, d) -# define BOOST_PP_REPEAT_1_230(m, d) BOOST_PP_REPEAT_1_229(m, d) m(2, 229, d) -# define BOOST_PP_REPEAT_1_231(m, d) BOOST_PP_REPEAT_1_230(m, d) m(2, 230, d) -# define BOOST_PP_REPEAT_1_232(m, d) BOOST_PP_REPEAT_1_231(m, d) m(2, 231, d) -# define BOOST_PP_REPEAT_1_233(m, d) BOOST_PP_REPEAT_1_232(m, d) m(2, 232, d) -# define BOOST_PP_REPEAT_1_234(m, d) BOOST_PP_REPEAT_1_233(m, d) m(2, 233, d) -# define BOOST_PP_REPEAT_1_235(m, d) BOOST_PP_REPEAT_1_234(m, d) m(2, 234, d) -# define BOOST_PP_REPEAT_1_236(m, d) BOOST_PP_REPEAT_1_235(m, d) m(2, 235, d) -# define BOOST_PP_REPEAT_1_237(m, d) BOOST_PP_REPEAT_1_236(m, d) m(2, 236, d) -# define BOOST_PP_REPEAT_1_238(m, d) BOOST_PP_REPEAT_1_237(m, d) m(2, 237, d) -# define BOOST_PP_REPEAT_1_239(m, d) BOOST_PP_REPEAT_1_238(m, d) m(2, 238, d) -# define BOOST_PP_REPEAT_1_240(m, d) BOOST_PP_REPEAT_1_239(m, d) m(2, 239, d) -# define BOOST_PP_REPEAT_1_241(m, d) BOOST_PP_REPEAT_1_240(m, d) m(2, 240, d) -# define BOOST_PP_REPEAT_1_242(m, d) BOOST_PP_REPEAT_1_241(m, d) m(2, 241, d) -# define BOOST_PP_REPEAT_1_243(m, d) BOOST_PP_REPEAT_1_242(m, d) m(2, 242, d) -# define BOOST_PP_REPEAT_1_244(m, d) BOOST_PP_REPEAT_1_243(m, d) m(2, 243, d) -# define BOOST_PP_REPEAT_1_245(m, d) BOOST_PP_REPEAT_1_244(m, d) m(2, 244, d) -# define BOOST_PP_REPEAT_1_246(m, d) BOOST_PP_REPEAT_1_245(m, d) m(2, 245, d) -# define BOOST_PP_REPEAT_1_247(m, d) BOOST_PP_REPEAT_1_246(m, d) m(2, 246, d) -# define BOOST_PP_REPEAT_1_248(m, d) BOOST_PP_REPEAT_1_247(m, d) m(2, 247, d) -# define BOOST_PP_REPEAT_1_249(m, d) BOOST_PP_REPEAT_1_248(m, d) m(2, 248, d) -# define BOOST_PP_REPEAT_1_250(m, d) BOOST_PP_REPEAT_1_249(m, d) m(2, 249, d) -# define BOOST_PP_REPEAT_1_251(m, d) BOOST_PP_REPEAT_1_250(m, d) m(2, 250, d) -# define BOOST_PP_REPEAT_1_252(m, d) BOOST_PP_REPEAT_1_251(m, d) m(2, 251, d) -# define BOOST_PP_REPEAT_1_253(m, d) BOOST_PP_REPEAT_1_252(m, d) m(2, 252, d) -# define BOOST_PP_REPEAT_1_254(m, d) BOOST_PP_REPEAT_1_253(m, d) m(2, 253, d) -# define BOOST_PP_REPEAT_1_255(m, d) BOOST_PP_REPEAT_1_254(m, d) m(2, 254, d) -# define BOOST_PP_REPEAT_1_256(m, d) BOOST_PP_REPEAT_1_255(m, d) m(2, 255, d) -# -# define BOOST_PP_REPEAT_2_0(m, d) -# define BOOST_PP_REPEAT_2_1(m, d) m(3, 0, d) -# define BOOST_PP_REPEAT_2_2(m, d) BOOST_PP_REPEAT_2_1(m, d) m(3, 1, d) -# define BOOST_PP_REPEAT_2_3(m, d) BOOST_PP_REPEAT_2_2(m, d) m(3, 2, d) -# define BOOST_PP_REPEAT_2_4(m, d) BOOST_PP_REPEAT_2_3(m, d) m(3, 3, d) -# define BOOST_PP_REPEAT_2_5(m, d) BOOST_PP_REPEAT_2_4(m, d) m(3, 4, d) -# define BOOST_PP_REPEAT_2_6(m, d) BOOST_PP_REPEAT_2_5(m, d) m(3, 5, d) -# define BOOST_PP_REPEAT_2_7(m, d) BOOST_PP_REPEAT_2_6(m, d) m(3, 6, d) -# define BOOST_PP_REPEAT_2_8(m, d) BOOST_PP_REPEAT_2_7(m, d) m(3, 7, d) -# define BOOST_PP_REPEAT_2_9(m, d) BOOST_PP_REPEAT_2_8(m, d) m(3, 8, d) -# define BOOST_PP_REPEAT_2_10(m, d) BOOST_PP_REPEAT_2_9(m, d) m(3, 9, d) -# define BOOST_PP_REPEAT_2_11(m, d) BOOST_PP_REPEAT_2_10(m, d) m(3, 10, d) -# define BOOST_PP_REPEAT_2_12(m, d) BOOST_PP_REPEAT_2_11(m, d) m(3, 11, d) -# define BOOST_PP_REPEAT_2_13(m, d) BOOST_PP_REPEAT_2_12(m, d) m(3, 12, d) -# define BOOST_PP_REPEAT_2_14(m, d) BOOST_PP_REPEAT_2_13(m, d) m(3, 13, d) -# define BOOST_PP_REPEAT_2_15(m, d) BOOST_PP_REPEAT_2_14(m, d) m(3, 14, d) -# define BOOST_PP_REPEAT_2_16(m, d) BOOST_PP_REPEAT_2_15(m, d) m(3, 15, d) -# define BOOST_PP_REPEAT_2_17(m, d) BOOST_PP_REPEAT_2_16(m, d) m(3, 16, d) -# define BOOST_PP_REPEAT_2_18(m, d) BOOST_PP_REPEAT_2_17(m, d) m(3, 17, d) -# define BOOST_PP_REPEAT_2_19(m, d) BOOST_PP_REPEAT_2_18(m, d) m(3, 18, d) -# define BOOST_PP_REPEAT_2_20(m, d) BOOST_PP_REPEAT_2_19(m, d) m(3, 19, d) -# define BOOST_PP_REPEAT_2_21(m, d) BOOST_PP_REPEAT_2_20(m, d) m(3, 20, d) -# define BOOST_PP_REPEAT_2_22(m, d) BOOST_PP_REPEAT_2_21(m, d) m(3, 21, d) -# define BOOST_PP_REPEAT_2_23(m, d) BOOST_PP_REPEAT_2_22(m, d) m(3, 22, d) -# define BOOST_PP_REPEAT_2_24(m, d) BOOST_PP_REPEAT_2_23(m, d) m(3, 23, d) -# define BOOST_PP_REPEAT_2_25(m, d) BOOST_PP_REPEAT_2_24(m, d) m(3, 24, d) -# define BOOST_PP_REPEAT_2_26(m, d) BOOST_PP_REPEAT_2_25(m, d) m(3, 25, d) -# define BOOST_PP_REPEAT_2_27(m, d) BOOST_PP_REPEAT_2_26(m, d) m(3, 26, d) -# define BOOST_PP_REPEAT_2_28(m, d) BOOST_PP_REPEAT_2_27(m, d) m(3, 27, d) -# define BOOST_PP_REPEAT_2_29(m, d) BOOST_PP_REPEAT_2_28(m, d) m(3, 28, d) -# define BOOST_PP_REPEAT_2_30(m, d) BOOST_PP_REPEAT_2_29(m, d) m(3, 29, d) -# define BOOST_PP_REPEAT_2_31(m, d) BOOST_PP_REPEAT_2_30(m, d) m(3, 30, d) -# define BOOST_PP_REPEAT_2_32(m, d) BOOST_PP_REPEAT_2_31(m, d) m(3, 31, d) -# define BOOST_PP_REPEAT_2_33(m, d) BOOST_PP_REPEAT_2_32(m, d) m(3, 32, d) -# define BOOST_PP_REPEAT_2_34(m, d) BOOST_PP_REPEAT_2_33(m, d) m(3, 33, d) -# define BOOST_PP_REPEAT_2_35(m, d) BOOST_PP_REPEAT_2_34(m, d) m(3, 34, d) -# define BOOST_PP_REPEAT_2_36(m, d) BOOST_PP_REPEAT_2_35(m, d) m(3, 35, d) -# define BOOST_PP_REPEAT_2_37(m, d) BOOST_PP_REPEAT_2_36(m, d) m(3, 36, d) -# define BOOST_PP_REPEAT_2_38(m, d) BOOST_PP_REPEAT_2_37(m, d) m(3, 37, d) -# define BOOST_PP_REPEAT_2_39(m, d) BOOST_PP_REPEAT_2_38(m, d) m(3, 38, d) -# define BOOST_PP_REPEAT_2_40(m, d) BOOST_PP_REPEAT_2_39(m, d) m(3, 39, d) -# define BOOST_PP_REPEAT_2_41(m, d) BOOST_PP_REPEAT_2_40(m, d) m(3, 40, d) -# define BOOST_PP_REPEAT_2_42(m, d) BOOST_PP_REPEAT_2_41(m, d) m(3, 41, d) -# define BOOST_PP_REPEAT_2_43(m, d) BOOST_PP_REPEAT_2_42(m, d) m(3, 42, d) -# define BOOST_PP_REPEAT_2_44(m, d) BOOST_PP_REPEAT_2_43(m, d) m(3, 43, d) -# define BOOST_PP_REPEAT_2_45(m, d) BOOST_PP_REPEAT_2_44(m, d) m(3, 44, d) -# define BOOST_PP_REPEAT_2_46(m, d) BOOST_PP_REPEAT_2_45(m, d) m(3, 45, d) -# define BOOST_PP_REPEAT_2_47(m, d) BOOST_PP_REPEAT_2_46(m, d) m(3, 46, d) -# define BOOST_PP_REPEAT_2_48(m, d) BOOST_PP_REPEAT_2_47(m, d) m(3, 47, d) -# define BOOST_PP_REPEAT_2_49(m, d) BOOST_PP_REPEAT_2_48(m, d) m(3, 48, d) -# define BOOST_PP_REPEAT_2_50(m, d) BOOST_PP_REPEAT_2_49(m, d) m(3, 49, d) -# define BOOST_PP_REPEAT_2_51(m, d) BOOST_PP_REPEAT_2_50(m, d) m(3, 50, d) -# define BOOST_PP_REPEAT_2_52(m, d) BOOST_PP_REPEAT_2_51(m, d) m(3, 51, d) -# define BOOST_PP_REPEAT_2_53(m, d) BOOST_PP_REPEAT_2_52(m, d) m(3, 52, d) -# define BOOST_PP_REPEAT_2_54(m, d) BOOST_PP_REPEAT_2_53(m, d) m(3, 53, d) -# define BOOST_PP_REPEAT_2_55(m, d) BOOST_PP_REPEAT_2_54(m, d) m(3, 54, d) -# define BOOST_PP_REPEAT_2_56(m, d) BOOST_PP_REPEAT_2_55(m, d) m(3, 55, d) -# define BOOST_PP_REPEAT_2_57(m, d) BOOST_PP_REPEAT_2_56(m, d) m(3, 56, d) -# define BOOST_PP_REPEAT_2_58(m, d) BOOST_PP_REPEAT_2_57(m, d) m(3, 57, d) -# define BOOST_PP_REPEAT_2_59(m, d) BOOST_PP_REPEAT_2_58(m, d) m(3, 58, d) -# define BOOST_PP_REPEAT_2_60(m, d) BOOST_PP_REPEAT_2_59(m, d) m(3, 59, d) -# define BOOST_PP_REPEAT_2_61(m, d) BOOST_PP_REPEAT_2_60(m, d) m(3, 60, d) -# define BOOST_PP_REPEAT_2_62(m, d) BOOST_PP_REPEAT_2_61(m, d) m(3, 61, d) -# define BOOST_PP_REPEAT_2_63(m, d) BOOST_PP_REPEAT_2_62(m, d) m(3, 62, d) -# define BOOST_PP_REPEAT_2_64(m, d) BOOST_PP_REPEAT_2_63(m, d) m(3, 63, d) -# define BOOST_PP_REPEAT_2_65(m, d) BOOST_PP_REPEAT_2_64(m, d) m(3, 64, d) -# define BOOST_PP_REPEAT_2_66(m, d) BOOST_PP_REPEAT_2_65(m, d) m(3, 65, d) -# define BOOST_PP_REPEAT_2_67(m, d) BOOST_PP_REPEAT_2_66(m, d) m(3, 66, d) -# define BOOST_PP_REPEAT_2_68(m, d) BOOST_PP_REPEAT_2_67(m, d) m(3, 67, d) -# define BOOST_PP_REPEAT_2_69(m, d) BOOST_PP_REPEAT_2_68(m, d) m(3, 68, d) -# define BOOST_PP_REPEAT_2_70(m, d) BOOST_PP_REPEAT_2_69(m, d) m(3, 69, d) -# define BOOST_PP_REPEAT_2_71(m, d) BOOST_PP_REPEAT_2_70(m, d) m(3, 70, d) -# define BOOST_PP_REPEAT_2_72(m, d) BOOST_PP_REPEAT_2_71(m, d) m(3, 71, d) -# define BOOST_PP_REPEAT_2_73(m, d) BOOST_PP_REPEAT_2_72(m, d) m(3, 72, d) -# define BOOST_PP_REPEAT_2_74(m, d) BOOST_PP_REPEAT_2_73(m, d) m(3, 73, d) -# define BOOST_PP_REPEAT_2_75(m, d) BOOST_PP_REPEAT_2_74(m, d) m(3, 74, d) -# define BOOST_PP_REPEAT_2_76(m, d) BOOST_PP_REPEAT_2_75(m, d) m(3, 75, d) -# define BOOST_PP_REPEAT_2_77(m, d) BOOST_PP_REPEAT_2_76(m, d) m(3, 76, d) -# define BOOST_PP_REPEAT_2_78(m, d) BOOST_PP_REPEAT_2_77(m, d) m(3, 77, d) -# define BOOST_PP_REPEAT_2_79(m, d) BOOST_PP_REPEAT_2_78(m, d) m(3, 78, d) -# define BOOST_PP_REPEAT_2_80(m, d) BOOST_PP_REPEAT_2_79(m, d) m(3, 79, d) -# define BOOST_PP_REPEAT_2_81(m, d) BOOST_PP_REPEAT_2_80(m, d) m(3, 80, d) -# define BOOST_PP_REPEAT_2_82(m, d) BOOST_PP_REPEAT_2_81(m, d) m(3, 81, d) -# define BOOST_PP_REPEAT_2_83(m, d) BOOST_PP_REPEAT_2_82(m, d) m(3, 82, d) -# define BOOST_PP_REPEAT_2_84(m, d) BOOST_PP_REPEAT_2_83(m, d) m(3, 83, d) -# define BOOST_PP_REPEAT_2_85(m, d) BOOST_PP_REPEAT_2_84(m, d) m(3, 84, d) -# define BOOST_PP_REPEAT_2_86(m, d) BOOST_PP_REPEAT_2_85(m, d) m(3, 85, d) -# define BOOST_PP_REPEAT_2_87(m, d) BOOST_PP_REPEAT_2_86(m, d) m(3, 86, d) -# define BOOST_PP_REPEAT_2_88(m, d) BOOST_PP_REPEAT_2_87(m, d) m(3, 87, d) -# define BOOST_PP_REPEAT_2_89(m, d) BOOST_PP_REPEAT_2_88(m, d) m(3, 88, d) -# define BOOST_PP_REPEAT_2_90(m, d) BOOST_PP_REPEAT_2_89(m, d) m(3, 89, d) -# define BOOST_PP_REPEAT_2_91(m, d) BOOST_PP_REPEAT_2_90(m, d) m(3, 90, d) -# define BOOST_PP_REPEAT_2_92(m, d) BOOST_PP_REPEAT_2_91(m, d) m(3, 91, d) -# define BOOST_PP_REPEAT_2_93(m, d) BOOST_PP_REPEAT_2_92(m, d) m(3, 92, d) -# define BOOST_PP_REPEAT_2_94(m, d) BOOST_PP_REPEAT_2_93(m, d) m(3, 93, d) -# define BOOST_PP_REPEAT_2_95(m, d) BOOST_PP_REPEAT_2_94(m, d) m(3, 94, d) -# define BOOST_PP_REPEAT_2_96(m, d) BOOST_PP_REPEAT_2_95(m, d) m(3, 95, d) -# define BOOST_PP_REPEAT_2_97(m, d) BOOST_PP_REPEAT_2_96(m, d) m(3, 96, d) -# define BOOST_PP_REPEAT_2_98(m, d) BOOST_PP_REPEAT_2_97(m, d) m(3, 97, d) -# define BOOST_PP_REPEAT_2_99(m, d) BOOST_PP_REPEAT_2_98(m, d) m(3, 98, d) -# define BOOST_PP_REPEAT_2_100(m, d) BOOST_PP_REPEAT_2_99(m, d) m(3, 99, d) -# define BOOST_PP_REPEAT_2_101(m, d) BOOST_PP_REPEAT_2_100(m, d) m(3, 100, d) -# define BOOST_PP_REPEAT_2_102(m, d) BOOST_PP_REPEAT_2_101(m, d) m(3, 101, d) -# define BOOST_PP_REPEAT_2_103(m, d) BOOST_PP_REPEAT_2_102(m, d) m(3, 102, d) -# define BOOST_PP_REPEAT_2_104(m, d) BOOST_PP_REPEAT_2_103(m, d) m(3, 103, d) -# define BOOST_PP_REPEAT_2_105(m, d) BOOST_PP_REPEAT_2_104(m, d) m(3, 104, d) -# define BOOST_PP_REPEAT_2_106(m, d) BOOST_PP_REPEAT_2_105(m, d) m(3, 105, d) -# define BOOST_PP_REPEAT_2_107(m, d) BOOST_PP_REPEAT_2_106(m, d) m(3, 106, d) -# define BOOST_PP_REPEAT_2_108(m, d) BOOST_PP_REPEAT_2_107(m, d) m(3, 107, d) -# define BOOST_PP_REPEAT_2_109(m, d) BOOST_PP_REPEAT_2_108(m, d) m(3, 108, d) -# define BOOST_PP_REPEAT_2_110(m, d) BOOST_PP_REPEAT_2_109(m, d) m(3, 109, d) -# define BOOST_PP_REPEAT_2_111(m, d) BOOST_PP_REPEAT_2_110(m, d) m(3, 110, d) -# define BOOST_PP_REPEAT_2_112(m, d) BOOST_PP_REPEAT_2_111(m, d) m(3, 111, d) -# define BOOST_PP_REPEAT_2_113(m, d) BOOST_PP_REPEAT_2_112(m, d) m(3, 112, d) -# define BOOST_PP_REPEAT_2_114(m, d) BOOST_PP_REPEAT_2_113(m, d) m(3, 113, d) -# define BOOST_PP_REPEAT_2_115(m, d) BOOST_PP_REPEAT_2_114(m, d) m(3, 114, d) -# define BOOST_PP_REPEAT_2_116(m, d) BOOST_PP_REPEAT_2_115(m, d) m(3, 115, d) -# define BOOST_PP_REPEAT_2_117(m, d) BOOST_PP_REPEAT_2_116(m, d) m(3, 116, d) -# define BOOST_PP_REPEAT_2_118(m, d) BOOST_PP_REPEAT_2_117(m, d) m(3, 117, d) -# define BOOST_PP_REPEAT_2_119(m, d) BOOST_PP_REPEAT_2_118(m, d) m(3, 118, d) -# define BOOST_PP_REPEAT_2_120(m, d) BOOST_PP_REPEAT_2_119(m, d) m(3, 119, d) -# define BOOST_PP_REPEAT_2_121(m, d) BOOST_PP_REPEAT_2_120(m, d) m(3, 120, d) -# define BOOST_PP_REPEAT_2_122(m, d) BOOST_PP_REPEAT_2_121(m, d) m(3, 121, d) -# define BOOST_PP_REPEAT_2_123(m, d) BOOST_PP_REPEAT_2_122(m, d) m(3, 122, d) -# define BOOST_PP_REPEAT_2_124(m, d) BOOST_PP_REPEAT_2_123(m, d) m(3, 123, d) -# define BOOST_PP_REPEAT_2_125(m, d) BOOST_PP_REPEAT_2_124(m, d) m(3, 124, d) -# define BOOST_PP_REPEAT_2_126(m, d) BOOST_PP_REPEAT_2_125(m, d) m(3, 125, d) -# define BOOST_PP_REPEAT_2_127(m, d) BOOST_PP_REPEAT_2_126(m, d) m(3, 126, d) -# define BOOST_PP_REPEAT_2_128(m, d) BOOST_PP_REPEAT_2_127(m, d) m(3, 127, d) -# define BOOST_PP_REPEAT_2_129(m, d) BOOST_PP_REPEAT_2_128(m, d) m(3, 128, d) -# define BOOST_PP_REPEAT_2_130(m, d) BOOST_PP_REPEAT_2_129(m, d) m(3, 129, d) -# define BOOST_PP_REPEAT_2_131(m, d) BOOST_PP_REPEAT_2_130(m, d) m(3, 130, d) -# define BOOST_PP_REPEAT_2_132(m, d) BOOST_PP_REPEAT_2_131(m, d) m(3, 131, d) -# define BOOST_PP_REPEAT_2_133(m, d) BOOST_PP_REPEAT_2_132(m, d) m(3, 132, d) -# define BOOST_PP_REPEAT_2_134(m, d) BOOST_PP_REPEAT_2_133(m, d) m(3, 133, d) -# define BOOST_PP_REPEAT_2_135(m, d) BOOST_PP_REPEAT_2_134(m, d) m(3, 134, d) -# define BOOST_PP_REPEAT_2_136(m, d) BOOST_PP_REPEAT_2_135(m, d) m(3, 135, d) -# define BOOST_PP_REPEAT_2_137(m, d) BOOST_PP_REPEAT_2_136(m, d) m(3, 136, d) -# define BOOST_PP_REPEAT_2_138(m, d) BOOST_PP_REPEAT_2_137(m, d) m(3, 137, d) -# define BOOST_PP_REPEAT_2_139(m, d) BOOST_PP_REPEAT_2_138(m, d) m(3, 138, d) -# define BOOST_PP_REPEAT_2_140(m, d) BOOST_PP_REPEAT_2_139(m, d) m(3, 139, d) -# define BOOST_PP_REPEAT_2_141(m, d) BOOST_PP_REPEAT_2_140(m, d) m(3, 140, d) -# define BOOST_PP_REPEAT_2_142(m, d) BOOST_PP_REPEAT_2_141(m, d) m(3, 141, d) -# define BOOST_PP_REPEAT_2_143(m, d) BOOST_PP_REPEAT_2_142(m, d) m(3, 142, d) -# define BOOST_PP_REPEAT_2_144(m, d) BOOST_PP_REPEAT_2_143(m, d) m(3, 143, d) -# define BOOST_PP_REPEAT_2_145(m, d) BOOST_PP_REPEAT_2_144(m, d) m(3, 144, d) -# define BOOST_PP_REPEAT_2_146(m, d) BOOST_PP_REPEAT_2_145(m, d) m(3, 145, d) -# define BOOST_PP_REPEAT_2_147(m, d) BOOST_PP_REPEAT_2_146(m, d) m(3, 146, d) -# define BOOST_PP_REPEAT_2_148(m, d) BOOST_PP_REPEAT_2_147(m, d) m(3, 147, d) -# define BOOST_PP_REPEAT_2_149(m, d) BOOST_PP_REPEAT_2_148(m, d) m(3, 148, d) -# define BOOST_PP_REPEAT_2_150(m, d) BOOST_PP_REPEAT_2_149(m, d) m(3, 149, d) -# define BOOST_PP_REPEAT_2_151(m, d) BOOST_PP_REPEAT_2_150(m, d) m(3, 150, d) -# define BOOST_PP_REPEAT_2_152(m, d) BOOST_PP_REPEAT_2_151(m, d) m(3, 151, d) -# define BOOST_PP_REPEAT_2_153(m, d) BOOST_PP_REPEAT_2_152(m, d) m(3, 152, d) -# define BOOST_PP_REPEAT_2_154(m, d) BOOST_PP_REPEAT_2_153(m, d) m(3, 153, d) -# define BOOST_PP_REPEAT_2_155(m, d) BOOST_PP_REPEAT_2_154(m, d) m(3, 154, d) -# define BOOST_PP_REPEAT_2_156(m, d) BOOST_PP_REPEAT_2_155(m, d) m(3, 155, d) -# define BOOST_PP_REPEAT_2_157(m, d) BOOST_PP_REPEAT_2_156(m, d) m(3, 156, d) -# define BOOST_PP_REPEAT_2_158(m, d) BOOST_PP_REPEAT_2_157(m, d) m(3, 157, d) -# define BOOST_PP_REPEAT_2_159(m, d) BOOST_PP_REPEAT_2_158(m, d) m(3, 158, d) -# define BOOST_PP_REPEAT_2_160(m, d) BOOST_PP_REPEAT_2_159(m, d) m(3, 159, d) -# define BOOST_PP_REPEAT_2_161(m, d) BOOST_PP_REPEAT_2_160(m, d) m(3, 160, d) -# define BOOST_PP_REPEAT_2_162(m, d) BOOST_PP_REPEAT_2_161(m, d) m(3, 161, d) -# define BOOST_PP_REPEAT_2_163(m, d) BOOST_PP_REPEAT_2_162(m, d) m(3, 162, d) -# define BOOST_PP_REPEAT_2_164(m, d) BOOST_PP_REPEAT_2_163(m, d) m(3, 163, d) -# define BOOST_PP_REPEAT_2_165(m, d) BOOST_PP_REPEAT_2_164(m, d) m(3, 164, d) -# define BOOST_PP_REPEAT_2_166(m, d) BOOST_PP_REPEAT_2_165(m, d) m(3, 165, d) -# define BOOST_PP_REPEAT_2_167(m, d) BOOST_PP_REPEAT_2_166(m, d) m(3, 166, d) -# define BOOST_PP_REPEAT_2_168(m, d) BOOST_PP_REPEAT_2_167(m, d) m(3, 167, d) -# define BOOST_PP_REPEAT_2_169(m, d) BOOST_PP_REPEAT_2_168(m, d) m(3, 168, d) -# define BOOST_PP_REPEAT_2_170(m, d) BOOST_PP_REPEAT_2_169(m, d) m(3, 169, d) -# define BOOST_PP_REPEAT_2_171(m, d) BOOST_PP_REPEAT_2_170(m, d) m(3, 170, d) -# define BOOST_PP_REPEAT_2_172(m, d) BOOST_PP_REPEAT_2_171(m, d) m(3, 171, d) -# define BOOST_PP_REPEAT_2_173(m, d) BOOST_PP_REPEAT_2_172(m, d) m(3, 172, d) -# define BOOST_PP_REPEAT_2_174(m, d) BOOST_PP_REPEAT_2_173(m, d) m(3, 173, d) -# define BOOST_PP_REPEAT_2_175(m, d) BOOST_PP_REPEAT_2_174(m, d) m(3, 174, d) -# define BOOST_PP_REPEAT_2_176(m, d) BOOST_PP_REPEAT_2_175(m, d) m(3, 175, d) -# define BOOST_PP_REPEAT_2_177(m, d) BOOST_PP_REPEAT_2_176(m, d) m(3, 176, d) -# define BOOST_PP_REPEAT_2_178(m, d) BOOST_PP_REPEAT_2_177(m, d) m(3, 177, d) -# define BOOST_PP_REPEAT_2_179(m, d) BOOST_PP_REPEAT_2_178(m, d) m(3, 178, d) -# define BOOST_PP_REPEAT_2_180(m, d) BOOST_PP_REPEAT_2_179(m, d) m(3, 179, d) -# define BOOST_PP_REPEAT_2_181(m, d) BOOST_PP_REPEAT_2_180(m, d) m(3, 180, d) -# define BOOST_PP_REPEAT_2_182(m, d) BOOST_PP_REPEAT_2_181(m, d) m(3, 181, d) -# define BOOST_PP_REPEAT_2_183(m, d) BOOST_PP_REPEAT_2_182(m, d) m(3, 182, d) -# define BOOST_PP_REPEAT_2_184(m, d) BOOST_PP_REPEAT_2_183(m, d) m(3, 183, d) -# define BOOST_PP_REPEAT_2_185(m, d) BOOST_PP_REPEAT_2_184(m, d) m(3, 184, d) -# define BOOST_PP_REPEAT_2_186(m, d) BOOST_PP_REPEAT_2_185(m, d) m(3, 185, d) -# define BOOST_PP_REPEAT_2_187(m, d) BOOST_PP_REPEAT_2_186(m, d) m(3, 186, d) -# define BOOST_PP_REPEAT_2_188(m, d) BOOST_PP_REPEAT_2_187(m, d) m(3, 187, d) -# define BOOST_PP_REPEAT_2_189(m, d) BOOST_PP_REPEAT_2_188(m, d) m(3, 188, d) -# define BOOST_PP_REPEAT_2_190(m, d) BOOST_PP_REPEAT_2_189(m, d) m(3, 189, d) -# define BOOST_PP_REPEAT_2_191(m, d) BOOST_PP_REPEAT_2_190(m, d) m(3, 190, d) -# define BOOST_PP_REPEAT_2_192(m, d) BOOST_PP_REPEAT_2_191(m, d) m(3, 191, d) -# define BOOST_PP_REPEAT_2_193(m, d) BOOST_PP_REPEAT_2_192(m, d) m(3, 192, d) -# define BOOST_PP_REPEAT_2_194(m, d) BOOST_PP_REPEAT_2_193(m, d) m(3, 193, d) -# define BOOST_PP_REPEAT_2_195(m, d) BOOST_PP_REPEAT_2_194(m, d) m(3, 194, d) -# define BOOST_PP_REPEAT_2_196(m, d) BOOST_PP_REPEAT_2_195(m, d) m(3, 195, d) -# define BOOST_PP_REPEAT_2_197(m, d) BOOST_PP_REPEAT_2_196(m, d) m(3, 196, d) -# define BOOST_PP_REPEAT_2_198(m, d) BOOST_PP_REPEAT_2_197(m, d) m(3, 197, d) -# define BOOST_PP_REPEAT_2_199(m, d) BOOST_PP_REPEAT_2_198(m, d) m(3, 198, d) -# define BOOST_PP_REPEAT_2_200(m, d) BOOST_PP_REPEAT_2_199(m, d) m(3, 199, d) -# define BOOST_PP_REPEAT_2_201(m, d) BOOST_PP_REPEAT_2_200(m, d) m(3, 200, d) -# define BOOST_PP_REPEAT_2_202(m, d) BOOST_PP_REPEAT_2_201(m, d) m(3, 201, d) -# define BOOST_PP_REPEAT_2_203(m, d) BOOST_PP_REPEAT_2_202(m, d) m(3, 202, d) -# define BOOST_PP_REPEAT_2_204(m, d) BOOST_PP_REPEAT_2_203(m, d) m(3, 203, d) -# define BOOST_PP_REPEAT_2_205(m, d) BOOST_PP_REPEAT_2_204(m, d) m(3, 204, d) -# define BOOST_PP_REPEAT_2_206(m, d) BOOST_PP_REPEAT_2_205(m, d) m(3, 205, d) -# define BOOST_PP_REPEAT_2_207(m, d) BOOST_PP_REPEAT_2_206(m, d) m(3, 206, d) -# define BOOST_PP_REPEAT_2_208(m, d) BOOST_PP_REPEAT_2_207(m, d) m(3, 207, d) -# define BOOST_PP_REPEAT_2_209(m, d) BOOST_PP_REPEAT_2_208(m, d) m(3, 208, d) -# define BOOST_PP_REPEAT_2_210(m, d) BOOST_PP_REPEAT_2_209(m, d) m(3, 209, d) -# define BOOST_PP_REPEAT_2_211(m, d) BOOST_PP_REPEAT_2_210(m, d) m(3, 210, d) -# define BOOST_PP_REPEAT_2_212(m, d) BOOST_PP_REPEAT_2_211(m, d) m(3, 211, d) -# define BOOST_PP_REPEAT_2_213(m, d) BOOST_PP_REPEAT_2_212(m, d) m(3, 212, d) -# define BOOST_PP_REPEAT_2_214(m, d) BOOST_PP_REPEAT_2_213(m, d) m(3, 213, d) -# define BOOST_PP_REPEAT_2_215(m, d) BOOST_PP_REPEAT_2_214(m, d) m(3, 214, d) -# define BOOST_PP_REPEAT_2_216(m, d) BOOST_PP_REPEAT_2_215(m, d) m(3, 215, d) -# define BOOST_PP_REPEAT_2_217(m, d) BOOST_PP_REPEAT_2_216(m, d) m(3, 216, d) -# define BOOST_PP_REPEAT_2_218(m, d) BOOST_PP_REPEAT_2_217(m, d) m(3, 217, d) -# define BOOST_PP_REPEAT_2_219(m, d) BOOST_PP_REPEAT_2_218(m, d) m(3, 218, d) -# define BOOST_PP_REPEAT_2_220(m, d) BOOST_PP_REPEAT_2_219(m, d) m(3, 219, d) -# define BOOST_PP_REPEAT_2_221(m, d) BOOST_PP_REPEAT_2_220(m, d) m(3, 220, d) -# define BOOST_PP_REPEAT_2_222(m, d) BOOST_PP_REPEAT_2_221(m, d) m(3, 221, d) -# define BOOST_PP_REPEAT_2_223(m, d) BOOST_PP_REPEAT_2_222(m, d) m(3, 222, d) -# define BOOST_PP_REPEAT_2_224(m, d) BOOST_PP_REPEAT_2_223(m, d) m(3, 223, d) -# define BOOST_PP_REPEAT_2_225(m, d) BOOST_PP_REPEAT_2_224(m, d) m(3, 224, d) -# define BOOST_PP_REPEAT_2_226(m, d) BOOST_PP_REPEAT_2_225(m, d) m(3, 225, d) -# define BOOST_PP_REPEAT_2_227(m, d) BOOST_PP_REPEAT_2_226(m, d) m(3, 226, d) -# define BOOST_PP_REPEAT_2_228(m, d) BOOST_PP_REPEAT_2_227(m, d) m(3, 227, d) -# define BOOST_PP_REPEAT_2_229(m, d) BOOST_PP_REPEAT_2_228(m, d) m(3, 228, d) -# define BOOST_PP_REPEAT_2_230(m, d) BOOST_PP_REPEAT_2_229(m, d) m(3, 229, d) -# define BOOST_PP_REPEAT_2_231(m, d) BOOST_PP_REPEAT_2_230(m, d) m(3, 230, d) -# define BOOST_PP_REPEAT_2_232(m, d) BOOST_PP_REPEAT_2_231(m, d) m(3, 231, d) -# define BOOST_PP_REPEAT_2_233(m, d) BOOST_PP_REPEAT_2_232(m, d) m(3, 232, d) -# define BOOST_PP_REPEAT_2_234(m, d) BOOST_PP_REPEAT_2_233(m, d) m(3, 233, d) -# define BOOST_PP_REPEAT_2_235(m, d) BOOST_PP_REPEAT_2_234(m, d) m(3, 234, d) -# define BOOST_PP_REPEAT_2_236(m, d) BOOST_PP_REPEAT_2_235(m, d) m(3, 235, d) -# define BOOST_PP_REPEAT_2_237(m, d) BOOST_PP_REPEAT_2_236(m, d) m(3, 236, d) -# define BOOST_PP_REPEAT_2_238(m, d) BOOST_PP_REPEAT_2_237(m, d) m(3, 237, d) -# define BOOST_PP_REPEAT_2_239(m, d) BOOST_PP_REPEAT_2_238(m, d) m(3, 238, d) -# define BOOST_PP_REPEAT_2_240(m, d) BOOST_PP_REPEAT_2_239(m, d) m(3, 239, d) -# define BOOST_PP_REPEAT_2_241(m, d) BOOST_PP_REPEAT_2_240(m, d) m(3, 240, d) -# define BOOST_PP_REPEAT_2_242(m, d) BOOST_PP_REPEAT_2_241(m, d) m(3, 241, d) -# define BOOST_PP_REPEAT_2_243(m, d) BOOST_PP_REPEAT_2_242(m, d) m(3, 242, d) -# define BOOST_PP_REPEAT_2_244(m, d) BOOST_PP_REPEAT_2_243(m, d) m(3, 243, d) -# define BOOST_PP_REPEAT_2_245(m, d) BOOST_PP_REPEAT_2_244(m, d) m(3, 244, d) -# define BOOST_PP_REPEAT_2_246(m, d) BOOST_PP_REPEAT_2_245(m, d) m(3, 245, d) -# define BOOST_PP_REPEAT_2_247(m, d) BOOST_PP_REPEAT_2_246(m, d) m(3, 246, d) -# define BOOST_PP_REPEAT_2_248(m, d) BOOST_PP_REPEAT_2_247(m, d) m(3, 247, d) -# define BOOST_PP_REPEAT_2_249(m, d) BOOST_PP_REPEAT_2_248(m, d) m(3, 248, d) -# define BOOST_PP_REPEAT_2_250(m, d) BOOST_PP_REPEAT_2_249(m, d) m(3, 249, d) -# define BOOST_PP_REPEAT_2_251(m, d) BOOST_PP_REPEAT_2_250(m, d) m(3, 250, d) -# define BOOST_PP_REPEAT_2_252(m, d) BOOST_PP_REPEAT_2_251(m, d) m(3, 251, d) -# define BOOST_PP_REPEAT_2_253(m, d) BOOST_PP_REPEAT_2_252(m, d) m(3, 252, d) -# define BOOST_PP_REPEAT_2_254(m, d) BOOST_PP_REPEAT_2_253(m, d) m(3, 253, d) -# define BOOST_PP_REPEAT_2_255(m, d) BOOST_PP_REPEAT_2_254(m, d) m(3, 254, d) -# define BOOST_PP_REPEAT_2_256(m, d) BOOST_PP_REPEAT_2_255(m, d) m(3, 255, d) -# -# define BOOST_PP_REPEAT_3_0(m, d) -# define BOOST_PP_REPEAT_3_1(m, d) m(4, 0, d) -# define BOOST_PP_REPEAT_3_2(m, d) BOOST_PP_REPEAT_3_1(m, d) m(4, 1, d) -# define BOOST_PP_REPEAT_3_3(m, d) BOOST_PP_REPEAT_3_2(m, d) m(4, 2, d) -# define BOOST_PP_REPEAT_3_4(m, d) BOOST_PP_REPEAT_3_3(m, d) m(4, 3, d) -# define BOOST_PP_REPEAT_3_5(m, d) BOOST_PP_REPEAT_3_4(m, d) m(4, 4, d) -# define BOOST_PP_REPEAT_3_6(m, d) BOOST_PP_REPEAT_3_5(m, d) m(4, 5, d) -# define BOOST_PP_REPEAT_3_7(m, d) BOOST_PP_REPEAT_3_6(m, d) m(4, 6, d) -# define BOOST_PP_REPEAT_3_8(m, d) BOOST_PP_REPEAT_3_7(m, d) m(4, 7, d) -# define BOOST_PP_REPEAT_3_9(m, d) BOOST_PP_REPEAT_3_8(m, d) m(4, 8, d) -# define BOOST_PP_REPEAT_3_10(m, d) BOOST_PP_REPEAT_3_9(m, d) m(4, 9, d) -# define BOOST_PP_REPEAT_3_11(m, d) BOOST_PP_REPEAT_3_10(m, d) m(4, 10, d) -# define BOOST_PP_REPEAT_3_12(m, d) BOOST_PP_REPEAT_3_11(m, d) m(4, 11, d) -# define BOOST_PP_REPEAT_3_13(m, d) BOOST_PP_REPEAT_3_12(m, d) m(4, 12, d) -# define BOOST_PP_REPEAT_3_14(m, d) BOOST_PP_REPEAT_3_13(m, d) m(4, 13, d) -# define BOOST_PP_REPEAT_3_15(m, d) BOOST_PP_REPEAT_3_14(m, d) m(4, 14, d) -# define BOOST_PP_REPEAT_3_16(m, d) BOOST_PP_REPEAT_3_15(m, d) m(4, 15, d) -# define BOOST_PP_REPEAT_3_17(m, d) BOOST_PP_REPEAT_3_16(m, d) m(4, 16, d) -# define BOOST_PP_REPEAT_3_18(m, d) BOOST_PP_REPEAT_3_17(m, d) m(4, 17, d) -# define BOOST_PP_REPEAT_3_19(m, d) BOOST_PP_REPEAT_3_18(m, d) m(4, 18, d) -# define BOOST_PP_REPEAT_3_20(m, d) BOOST_PP_REPEAT_3_19(m, d) m(4, 19, d) -# define BOOST_PP_REPEAT_3_21(m, d) BOOST_PP_REPEAT_3_20(m, d) m(4, 20, d) -# define BOOST_PP_REPEAT_3_22(m, d) BOOST_PP_REPEAT_3_21(m, d) m(4, 21, d) -# define BOOST_PP_REPEAT_3_23(m, d) BOOST_PP_REPEAT_3_22(m, d) m(4, 22, d) -# define BOOST_PP_REPEAT_3_24(m, d) BOOST_PP_REPEAT_3_23(m, d) m(4, 23, d) -# define BOOST_PP_REPEAT_3_25(m, d) BOOST_PP_REPEAT_3_24(m, d) m(4, 24, d) -# define BOOST_PP_REPEAT_3_26(m, d) BOOST_PP_REPEAT_3_25(m, d) m(4, 25, d) -# define BOOST_PP_REPEAT_3_27(m, d) BOOST_PP_REPEAT_3_26(m, d) m(4, 26, d) -# define BOOST_PP_REPEAT_3_28(m, d) BOOST_PP_REPEAT_3_27(m, d) m(4, 27, d) -# define BOOST_PP_REPEAT_3_29(m, d) BOOST_PP_REPEAT_3_28(m, d) m(4, 28, d) -# define BOOST_PP_REPEAT_3_30(m, d) BOOST_PP_REPEAT_3_29(m, d) m(4, 29, d) -# define BOOST_PP_REPEAT_3_31(m, d) BOOST_PP_REPEAT_3_30(m, d) m(4, 30, d) -# define BOOST_PP_REPEAT_3_32(m, d) BOOST_PP_REPEAT_3_31(m, d) m(4, 31, d) -# define BOOST_PP_REPEAT_3_33(m, d) BOOST_PP_REPEAT_3_32(m, d) m(4, 32, d) -# define BOOST_PP_REPEAT_3_34(m, d) BOOST_PP_REPEAT_3_33(m, d) m(4, 33, d) -# define BOOST_PP_REPEAT_3_35(m, d) BOOST_PP_REPEAT_3_34(m, d) m(4, 34, d) -# define BOOST_PP_REPEAT_3_36(m, d) BOOST_PP_REPEAT_3_35(m, d) m(4, 35, d) -# define BOOST_PP_REPEAT_3_37(m, d) BOOST_PP_REPEAT_3_36(m, d) m(4, 36, d) -# define BOOST_PP_REPEAT_3_38(m, d) BOOST_PP_REPEAT_3_37(m, d) m(4, 37, d) -# define BOOST_PP_REPEAT_3_39(m, d) BOOST_PP_REPEAT_3_38(m, d) m(4, 38, d) -# define BOOST_PP_REPEAT_3_40(m, d) BOOST_PP_REPEAT_3_39(m, d) m(4, 39, d) -# define BOOST_PP_REPEAT_3_41(m, d) BOOST_PP_REPEAT_3_40(m, d) m(4, 40, d) -# define BOOST_PP_REPEAT_3_42(m, d) BOOST_PP_REPEAT_3_41(m, d) m(4, 41, d) -# define BOOST_PP_REPEAT_3_43(m, d) BOOST_PP_REPEAT_3_42(m, d) m(4, 42, d) -# define BOOST_PP_REPEAT_3_44(m, d) BOOST_PP_REPEAT_3_43(m, d) m(4, 43, d) -# define BOOST_PP_REPEAT_3_45(m, d) BOOST_PP_REPEAT_3_44(m, d) m(4, 44, d) -# define BOOST_PP_REPEAT_3_46(m, d) BOOST_PP_REPEAT_3_45(m, d) m(4, 45, d) -# define BOOST_PP_REPEAT_3_47(m, d) BOOST_PP_REPEAT_3_46(m, d) m(4, 46, d) -# define BOOST_PP_REPEAT_3_48(m, d) BOOST_PP_REPEAT_3_47(m, d) m(4, 47, d) -# define BOOST_PP_REPEAT_3_49(m, d) BOOST_PP_REPEAT_3_48(m, d) m(4, 48, d) -# define BOOST_PP_REPEAT_3_50(m, d) BOOST_PP_REPEAT_3_49(m, d) m(4, 49, d) -# define BOOST_PP_REPEAT_3_51(m, d) BOOST_PP_REPEAT_3_50(m, d) m(4, 50, d) -# define BOOST_PP_REPEAT_3_52(m, d) BOOST_PP_REPEAT_3_51(m, d) m(4, 51, d) -# define BOOST_PP_REPEAT_3_53(m, d) BOOST_PP_REPEAT_3_52(m, d) m(4, 52, d) -# define BOOST_PP_REPEAT_3_54(m, d) BOOST_PP_REPEAT_3_53(m, d) m(4, 53, d) -# define BOOST_PP_REPEAT_3_55(m, d) BOOST_PP_REPEAT_3_54(m, d) m(4, 54, d) -# define BOOST_PP_REPEAT_3_56(m, d) BOOST_PP_REPEAT_3_55(m, d) m(4, 55, d) -# define BOOST_PP_REPEAT_3_57(m, d) BOOST_PP_REPEAT_3_56(m, d) m(4, 56, d) -# define BOOST_PP_REPEAT_3_58(m, d) BOOST_PP_REPEAT_3_57(m, d) m(4, 57, d) -# define BOOST_PP_REPEAT_3_59(m, d) BOOST_PP_REPEAT_3_58(m, d) m(4, 58, d) -# define BOOST_PP_REPEAT_3_60(m, d) BOOST_PP_REPEAT_3_59(m, d) m(4, 59, d) -# define BOOST_PP_REPEAT_3_61(m, d) BOOST_PP_REPEAT_3_60(m, d) m(4, 60, d) -# define BOOST_PP_REPEAT_3_62(m, d) BOOST_PP_REPEAT_3_61(m, d) m(4, 61, d) -# define BOOST_PP_REPEAT_3_63(m, d) BOOST_PP_REPEAT_3_62(m, d) m(4, 62, d) -# define BOOST_PP_REPEAT_3_64(m, d) BOOST_PP_REPEAT_3_63(m, d) m(4, 63, d) -# define BOOST_PP_REPEAT_3_65(m, d) BOOST_PP_REPEAT_3_64(m, d) m(4, 64, d) -# define BOOST_PP_REPEAT_3_66(m, d) BOOST_PP_REPEAT_3_65(m, d) m(4, 65, d) -# define BOOST_PP_REPEAT_3_67(m, d) BOOST_PP_REPEAT_3_66(m, d) m(4, 66, d) -# define BOOST_PP_REPEAT_3_68(m, d) BOOST_PP_REPEAT_3_67(m, d) m(4, 67, d) -# define BOOST_PP_REPEAT_3_69(m, d) BOOST_PP_REPEAT_3_68(m, d) m(4, 68, d) -# define BOOST_PP_REPEAT_3_70(m, d) BOOST_PP_REPEAT_3_69(m, d) m(4, 69, d) -# define BOOST_PP_REPEAT_3_71(m, d) BOOST_PP_REPEAT_3_70(m, d) m(4, 70, d) -# define BOOST_PP_REPEAT_3_72(m, d) BOOST_PP_REPEAT_3_71(m, d) m(4, 71, d) -# define BOOST_PP_REPEAT_3_73(m, d) BOOST_PP_REPEAT_3_72(m, d) m(4, 72, d) -# define BOOST_PP_REPEAT_3_74(m, d) BOOST_PP_REPEAT_3_73(m, d) m(4, 73, d) -# define BOOST_PP_REPEAT_3_75(m, d) BOOST_PP_REPEAT_3_74(m, d) m(4, 74, d) -# define BOOST_PP_REPEAT_3_76(m, d) BOOST_PP_REPEAT_3_75(m, d) m(4, 75, d) -# define BOOST_PP_REPEAT_3_77(m, d) BOOST_PP_REPEAT_3_76(m, d) m(4, 76, d) -# define BOOST_PP_REPEAT_3_78(m, d) BOOST_PP_REPEAT_3_77(m, d) m(4, 77, d) -# define BOOST_PP_REPEAT_3_79(m, d) BOOST_PP_REPEAT_3_78(m, d) m(4, 78, d) -# define BOOST_PP_REPEAT_3_80(m, d) BOOST_PP_REPEAT_3_79(m, d) m(4, 79, d) -# define BOOST_PP_REPEAT_3_81(m, d) BOOST_PP_REPEAT_3_80(m, d) m(4, 80, d) -# define BOOST_PP_REPEAT_3_82(m, d) BOOST_PP_REPEAT_3_81(m, d) m(4, 81, d) -# define BOOST_PP_REPEAT_3_83(m, d) BOOST_PP_REPEAT_3_82(m, d) m(4, 82, d) -# define BOOST_PP_REPEAT_3_84(m, d) BOOST_PP_REPEAT_3_83(m, d) m(4, 83, d) -# define BOOST_PP_REPEAT_3_85(m, d) BOOST_PP_REPEAT_3_84(m, d) m(4, 84, d) -# define BOOST_PP_REPEAT_3_86(m, d) BOOST_PP_REPEAT_3_85(m, d) m(4, 85, d) -# define BOOST_PP_REPEAT_3_87(m, d) BOOST_PP_REPEAT_3_86(m, d) m(4, 86, d) -# define BOOST_PP_REPEAT_3_88(m, d) BOOST_PP_REPEAT_3_87(m, d) m(4, 87, d) -# define BOOST_PP_REPEAT_3_89(m, d) BOOST_PP_REPEAT_3_88(m, d) m(4, 88, d) -# define BOOST_PP_REPEAT_3_90(m, d) BOOST_PP_REPEAT_3_89(m, d) m(4, 89, d) -# define BOOST_PP_REPEAT_3_91(m, d) BOOST_PP_REPEAT_3_90(m, d) m(4, 90, d) -# define BOOST_PP_REPEAT_3_92(m, d) BOOST_PP_REPEAT_3_91(m, d) m(4, 91, d) -# define BOOST_PP_REPEAT_3_93(m, d) BOOST_PP_REPEAT_3_92(m, d) m(4, 92, d) -# define BOOST_PP_REPEAT_3_94(m, d) BOOST_PP_REPEAT_3_93(m, d) m(4, 93, d) -# define BOOST_PP_REPEAT_3_95(m, d) BOOST_PP_REPEAT_3_94(m, d) m(4, 94, d) -# define BOOST_PP_REPEAT_3_96(m, d) BOOST_PP_REPEAT_3_95(m, d) m(4, 95, d) -# define BOOST_PP_REPEAT_3_97(m, d) BOOST_PP_REPEAT_3_96(m, d) m(4, 96, d) -# define BOOST_PP_REPEAT_3_98(m, d) BOOST_PP_REPEAT_3_97(m, d) m(4, 97, d) -# define BOOST_PP_REPEAT_3_99(m, d) BOOST_PP_REPEAT_3_98(m, d) m(4, 98, d) -# define BOOST_PP_REPEAT_3_100(m, d) BOOST_PP_REPEAT_3_99(m, d) m(4, 99, d) -# define BOOST_PP_REPEAT_3_101(m, d) BOOST_PP_REPEAT_3_100(m, d) m(4, 100, d) -# define BOOST_PP_REPEAT_3_102(m, d) BOOST_PP_REPEAT_3_101(m, d) m(4, 101, d) -# define BOOST_PP_REPEAT_3_103(m, d) BOOST_PP_REPEAT_3_102(m, d) m(4, 102, d) -# define BOOST_PP_REPEAT_3_104(m, d) BOOST_PP_REPEAT_3_103(m, d) m(4, 103, d) -# define BOOST_PP_REPEAT_3_105(m, d) BOOST_PP_REPEAT_3_104(m, d) m(4, 104, d) -# define BOOST_PP_REPEAT_3_106(m, d) BOOST_PP_REPEAT_3_105(m, d) m(4, 105, d) -# define BOOST_PP_REPEAT_3_107(m, d) BOOST_PP_REPEAT_3_106(m, d) m(4, 106, d) -# define BOOST_PP_REPEAT_3_108(m, d) BOOST_PP_REPEAT_3_107(m, d) m(4, 107, d) -# define BOOST_PP_REPEAT_3_109(m, d) BOOST_PP_REPEAT_3_108(m, d) m(4, 108, d) -# define BOOST_PP_REPEAT_3_110(m, d) BOOST_PP_REPEAT_3_109(m, d) m(4, 109, d) -# define BOOST_PP_REPEAT_3_111(m, d) BOOST_PP_REPEAT_3_110(m, d) m(4, 110, d) -# define BOOST_PP_REPEAT_3_112(m, d) BOOST_PP_REPEAT_3_111(m, d) m(4, 111, d) -# define BOOST_PP_REPEAT_3_113(m, d) BOOST_PP_REPEAT_3_112(m, d) m(4, 112, d) -# define BOOST_PP_REPEAT_3_114(m, d) BOOST_PP_REPEAT_3_113(m, d) m(4, 113, d) -# define BOOST_PP_REPEAT_3_115(m, d) BOOST_PP_REPEAT_3_114(m, d) m(4, 114, d) -# define BOOST_PP_REPEAT_3_116(m, d) BOOST_PP_REPEAT_3_115(m, d) m(4, 115, d) -# define BOOST_PP_REPEAT_3_117(m, d) BOOST_PP_REPEAT_3_116(m, d) m(4, 116, d) -# define BOOST_PP_REPEAT_3_118(m, d) BOOST_PP_REPEAT_3_117(m, d) m(4, 117, d) -# define BOOST_PP_REPEAT_3_119(m, d) BOOST_PP_REPEAT_3_118(m, d) m(4, 118, d) -# define BOOST_PP_REPEAT_3_120(m, d) BOOST_PP_REPEAT_3_119(m, d) m(4, 119, d) -# define BOOST_PP_REPEAT_3_121(m, d) BOOST_PP_REPEAT_3_120(m, d) m(4, 120, d) -# define BOOST_PP_REPEAT_3_122(m, d) BOOST_PP_REPEAT_3_121(m, d) m(4, 121, d) -# define BOOST_PP_REPEAT_3_123(m, d) BOOST_PP_REPEAT_3_122(m, d) m(4, 122, d) -# define BOOST_PP_REPEAT_3_124(m, d) BOOST_PP_REPEAT_3_123(m, d) m(4, 123, d) -# define BOOST_PP_REPEAT_3_125(m, d) BOOST_PP_REPEAT_3_124(m, d) m(4, 124, d) -# define BOOST_PP_REPEAT_3_126(m, d) BOOST_PP_REPEAT_3_125(m, d) m(4, 125, d) -# define BOOST_PP_REPEAT_3_127(m, d) BOOST_PP_REPEAT_3_126(m, d) m(4, 126, d) -# define BOOST_PP_REPEAT_3_128(m, d) BOOST_PP_REPEAT_3_127(m, d) m(4, 127, d) -# define BOOST_PP_REPEAT_3_129(m, d) BOOST_PP_REPEAT_3_128(m, d) m(4, 128, d) -# define BOOST_PP_REPEAT_3_130(m, d) BOOST_PP_REPEAT_3_129(m, d) m(4, 129, d) -# define BOOST_PP_REPEAT_3_131(m, d) BOOST_PP_REPEAT_3_130(m, d) m(4, 130, d) -# define BOOST_PP_REPEAT_3_132(m, d) BOOST_PP_REPEAT_3_131(m, d) m(4, 131, d) -# define BOOST_PP_REPEAT_3_133(m, d) BOOST_PP_REPEAT_3_132(m, d) m(4, 132, d) -# define BOOST_PP_REPEAT_3_134(m, d) BOOST_PP_REPEAT_3_133(m, d) m(4, 133, d) -# define BOOST_PP_REPEAT_3_135(m, d) BOOST_PP_REPEAT_3_134(m, d) m(4, 134, d) -# define BOOST_PP_REPEAT_3_136(m, d) BOOST_PP_REPEAT_3_135(m, d) m(4, 135, d) -# define BOOST_PP_REPEAT_3_137(m, d) BOOST_PP_REPEAT_3_136(m, d) m(4, 136, d) -# define BOOST_PP_REPEAT_3_138(m, d) BOOST_PP_REPEAT_3_137(m, d) m(4, 137, d) -# define BOOST_PP_REPEAT_3_139(m, d) BOOST_PP_REPEAT_3_138(m, d) m(4, 138, d) -# define BOOST_PP_REPEAT_3_140(m, d) BOOST_PP_REPEAT_3_139(m, d) m(4, 139, d) -# define BOOST_PP_REPEAT_3_141(m, d) BOOST_PP_REPEAT_3_140(m, d) m(4, 140, d) -# define BOOST_PP_REPEAT_3_142(m, d) BOOST_PP_REPEAT_3_141(m, d) m(4, 141, d) -# define BOOST_PP_REPEAT_3_143(m, d) BOOST_PP_REPEAT_3_142(m, d) m(4, 142, d) -# define BOOST_PP_REPEAT_3_144(m, d) BOOST_PP_REPEAT_3_143(m, d) m(4, 143, d) -# define BOOST_PP_REPEAT_3_145(m, d) BOOST_PP_REPEAT_3_144(m, d) m(4, 144, d) -# define BOOST_PP_REPEAT_3_146(m, d) BOOST_PP_REPEAT_3_145(m, d) m(4, 145, d) -# define BOOST_PP_REPEAT_3_147(m, d) BOOST_PP_REPEAT_3_146(m, d) m(4, 146, d) -# define BOOST_PP_REPEAT_3_148(m, d) BOOST_PP_REPEAT_3_147(m, d) m(4, 147, d) -# define BOOST_PP_REPEAT_3_149(m, d) BOOST_PP_REPEAT_3_148(m, d) m(4, 148, d) -# define BOOST_PP_REPEAT_3_150(m, d) BOOST_PP_REPEAT_3_149(m, d) m(4, 149, d) -# define BOOST_PP_REPEAT_3_151(m, d) BOOST_PP_REPEAT_3_150(m, d) m(4, 150, d) -# define BOOST_PP_REPEAT_3_152(m, d) BOOST_PP_REPEAT_3_151(m, d) m(4, 151, d) -# define BOOST_PP_REPEAT_3_153(m, d) BOOST_PP_REPEAT_3_152(m, d) m(4, 152, d) -# define BOOST_PP_REPEAT_3_154(m, d) BOOST_PP_REPEAT_3_153(m, d) m(4, 153, d) -# define BOOST_PP_REPEAT_3_155(m, d) BOOST_PP_REPEAT_3_154(m, d) m(4, 154, d) -# define BOOST_PP_REPEAT_3_156(m, d) BOOST_PP_REPEAT_3_155(m, d) m(4, 155, d) -# define BOOST_PP_REPEAT_3_157(m, d) BOOST_PP_REPEAT_3_156(m, d) m(4, 156, d) -# define BOOST_PP_REPEAT_3_158(m, d) BOOST_PP_REPEAT_3_157(m, d) m(4, 157, d) -# define BOOST_PP_REPEAT_3_159(m, d) BOOST_PP_REPEAT_3_158(m, d) m(4, 158, d) -# define BOOST_PP_REPEAT_3_160(m, d) BOOST_PP_REPEAT_3_159(m, d) m(4, 159, d) -# define BOOST_PP_REPEAT_3_161(m, d) BOOST_PP_REPEAT_3_160(m, d) m(4, 160, d) -# define BOOST_PP_REPEAT_3_162(m, d) BOOST_PP_REPEAT_3_161(m, d) m(4, 161, d) -# define BOOST_PP_REPEAT_3_163(m, d) BOOST_PP_REPEAT_3_162(m, d) m(4, 162, d) -# define BOOST_PP_REPEAT_3_164(m, d) BOOST_PP_REPEAT_3_163(m, d) m(4, 163, d) -# define BOOST_PP_REPEAT_3_165(m, d) BOOST_PP_REPEAT_3_164(m, d) m(4, 164, d) -# define BOOST_PP_REPEAT_3_166(m, d) BOOST_PP_REPEAT_3_165(m, d) m(4, 165, d) -# define BOOST_PP_REPEAT_3_167(m, d) BOOST_PP_REPEAT_3_166(m, d) m(4, 166, d) -# define BOOST_PP_REPEAT_3_168(m, d) BOOST_PP_REPEAT_3_167(m, d) m(4, 167, d) -# define BOOST_PP_REPEAT_3_169(m, d) BOOST_PP_REPEAT_3_168(m, d) m(4, 168, d) -# define BOOST_PP_REPEAT_3_170(m, d) BOOST_PP_REPEAT_3_169(m, d) m(4, 169, d) -# define BOOST_PP_REPEAT_3_171(m, d) BOOST_PP_REPEAT_3_170(m, d) m(4, 170, d) -# define BOOST_PP_REPEAT_3_172(m, d) BOOST_PP_REPEAT_3_171(m, d) m(4, 171, d) -# define BOOST_PP_REPEAT_3_173(m, d) BOOST_PP_REPEAT_3_172(m, d) m(4, 172, d) -# define BOOST_PP_REPEAT_3_174(m, d) BOOST_PP_REPEAT_3_173(m, d) m(4, 173, d) -# define BOOST_PP_REPEAT_3_175(m, d) BOOST_PP_REPEAT_3_174(m, d) m(4, 174, d) -# define BOOST_PP_REPEAT_3_176(m, d) BOOST_PP_REPEAT_3_175(m, d) m(4, 175, d) -# define BOOST_PP_REPEAT_3_177(m, d) BOOST_PP_REPEAT_3_176(m, d) m(4, 176, d) -# define BOOST_PP_REPEAT_3_178(m, d) BOOST_PP_REPEAT_3_177(m, d) m(4, 177, d) -# define BOOST_PP_REPEAT_3_179(m, d) BOOST_PP_REPEAT_3_178(m, d) m(4, 178, d) -# define BOOST_PP_REPEAT_3_180(m, d) BOOST_PP_REPEAT_3_179(m, d) m(4, 179, d) -# define BOOST_PP_REPEAT_3_181(m, d) BOOST_PP_REPEAT_3_180(m, d) m(4, 180, d) -# define BOOST_PP_REPEAT_3_182(m, d) BOOST_PP_REPEAT_3_181(m, d) m(4, 181, d) -# define BOOST_PP_REPEAT_3_183(m, d) BOOST_PP_REPEAT_3_182(m, d) m(4, 182, d) -# define BOOST_PP_REPEAT_3_184(m, d) BOOST_PP_REPEAT_3_183(m, d) m(4, 183, d) -# define BOOST_PP_REPEAT_3_185(m, d) BOOST_PP_REPEAT_3_184(m, d) m(4, 184, d) -# define BOOST_PP_REPEAT_3_186(m, d) BOOST_PP_REPEAT_3_185(m, d) m(4, 185, d) -# define BOOST_PP_REPEAT_3_187(m, d) BOOST_PP_REPEAT_3_186(m, d) m(4, 186, d) -# define BOOST_PP_REPEAT_3_188(m, d) BOOST_PP_REPEAT_3_187(m, d) m(4, 187, d) -# define BOOST_PP_REPEAT_3_189(m, d) BOOST_PP_REPEAT_3_188(m, d) m(4, 188, d) -# define BOOST_PP_REPEAT_3_190(m, d) BOOST_PP_REPEAT_3_189(m, d) m(4, 189, d) -# define BOOST_PP_REPEAT_3_191(m, d) BOOST_PP_REPEAT_3_190(m, d) m(4, 190, d) -# define BOOST_PP_REPEAT_3_192(m, d) BOOST_PP_REPEAT_3_191(m, d) m(4, 191, d) -# define BOOST_PP_REPEAT_3_193(m, d) BOOST_PP_REPEAT_3_192(m, d) m(4, 192, d) -# define BOOST_PP_REPEAT_3_194(m, d) BOOST_PP_REPEAT_3_193(m, d) m(4, 193, d) -# define BOOST_PP_REPEAT_3_195(m, d) BOOST_PP_REPEAT_3_194(m, d) m(4, 194, d) -# define BOOST_PP_REPEAT_3_196(m, d) BOOST_PP_REPEAT_3_195(m, d) m(4, 195, d) -# define BOOST_PP_REPEAT_3_197(m, d) BOOST_PP_REPEAT_3_196(m, d) m(4, 196, d) -# define BOOST_PP_REPEAT_3_198(m, d) BOOST_PP_REPEAT_3_197(m, d) m(4, 197, d) -# define BOOST_PP_REPEAT_3_199(m, d) BOOST_PP_REPEAT_3_198(m, d) m(4, 198, d) -# define BOOST_PP_REPEAT_3_200(m, d) BOOST_PP_REPEAT_3_199(m, d) m(4, 199, d) -# define BOOST_PP_REPEAT_3_201(m, d) BOOST_PP_REPEAT_3_200(m, d) m(4, 200, d) -# define BOOST_PP_REPEAT_3_202(m, d) BOOST_PP_REPEAT_3_201(m, d) m(4, 201, d) -# define BOOST_PP_REPEAT_3_203(m, d) BOOST_PP_REPEAT_3_202(m, d) m(4, 202, d) -# define BOOST_PP_REPEAT_3_204(m, d) BOOST_PP_REPEAT_3_203(m, d) m(4, 203, d) -# define BOOST_PP_REPEAT_3_205(m, d) BOOST_PP_REPEAT_3_204(m, d) m(4, 204, d) -# define BOOST_PP_REPEAT_3_206(m, d) BOOST_PP_REPEAT_3_205(m, d) m(4, 205, d) -# define BOOST_PP_REPEAT_3_207(m, d) BOOST_PP_REPEAT_3_206(m, d) m(4, 206, d) -# define BOOST_PP_REPEAT_3_208(m, d) BOOST_PP_REPEAT_3_207(m, d) m(4, 207, d) -# define BOOST_PP_REPEAT_3_209(m, d) BOOST_PP_REPEAT_3_208(m, d) m(4, 208, d) -# define BOOST_PP_REPEAT_3_210(m, d) BOOST_PP_REPEAT_3_209(m, d) m(4, 209, d) -# define BOOST_PP_REPEAT_3_211(m, d) BOOST_PP_REPEAT_3_210(m, d) m(4, 210, d) -# define BOOST_PP_REPEAT_3_212(m, d) BOOST_PP_REPEAT_3_211(m, d) m(4, 211, d) -# define BOOST_PP_REPEAT_3_213(m, d) BOOST_PP_REPEAT_3_212(m, d) m(4, 212, d) -# define BOOST_PP_REPEAT_3_214(m, d) BOOST_PP_REPEAT_3_213(m, d) m(4, 213, d) -# define BOOST_PP_REPEAT_3_215(m, d) BOOST_PP_REPEAT_3_214(m, d) m(4, 214, d) -# define BOOST_PP_REPEAT_3_216(m, d) BOOST_PP_REPEAT_3_215(m, d) m(4, 215, d) -# define BOOST_PP_REPEAT_3_217(m, d) BOOST_PP_REPEAT_3_216(m, d) m(4, 216, d) -# define BOOST_PP_REPEAT_3_218(m, d) BOOST_PP_REPEAT_3_217(m, d) m(4, 217, d) -# define BOOST_PP_REPEAT_3_219(m, d) BOOST_PP_REPEAT_3_218(m, d) m(4, 218, d) -# define BOOST_PP_REPEAT_3_220(m, d) BOOST_PP_REPEAT_3_219(m, d) m(4, 219, d) -# define BOOST_PP_REPEAT_3_221(m, d) BOOST_PP_REPEAT_3_220(m, d) m(4, 220, d) -# define BOOST_PP_REPEAT_3_222(m, d) BOOST_PP_REPEAT_3_221(m, d) m(4, 221, d) -# define BOOST_PP_REPEAT_3_223(m, d) BOOST_PP_REPEAT_3_222(m, d) m(4, 222, d) -# define BOOST_PP_REPEAT_3_224(m, d) BOOST_PP_REPEAT_3_223(m, d) m(4, 223, d) -# define BOOST_PP_REPEAT_3_225(m, d) BOOST_PP_REPEAT_3_224(m, d) m(4, 224, d) -# define BOOST_PP_REPEAT_3_226(m, d) BOOST_PP_REPEAT_3_225(m, d) m(4, 225, d) -# define BOOST_PP_REPEAT_3_227(m, d) BOOST_PP_REPEAT_3_226(m, d) m(4, 226, d) -# define BOOST_PP_REPEAT_3_228(m, d) BOOST_PP_REPEAT_3_227(m, d) m(4, 227, d) -# define BOOST_PP_REPEAT_3_229(m, d) BOOST_PP_REPEAT_3_228(m, d) m(4, 228, d) -# define BOOST_PP_REPEAT_3_230(m, d) BOOST_PP_REPEAT_3_229(m, d) m(4, 229, d) -# define BOOST_PP_REPEAT_3_231(m, d) BOOST_PP_REPEAT_3_230(m, d) m(4, 230, d) -# define BOOST_PP_REPEAT_3_232(m, d) BOOST_PP_REPEAT_3_231(m, d) m(4, 231, d) -# define BOOST_PP_REPEAT_3_233(m, d) BOOST_PP_REPEAT_3_232(m, d) m(4, 232, d) -# define BOOST_PP_REPEAT_3_234(m, d) BOOST_PP_REPEAT_3_233(m, d) m(4, 233, d) -# define BOOST_PP_REPEAT_3_235(m, d) BOOST_PP_REPEAT_3_234(m, d) m(4, 234, d) -# define BOOST_PP_REPEAT_3_236(m, d) BOOST_PP_REPEAT_3_235(m, d) m(4, 235, d) -# define BOOST_PP_REPEAT_3_237(m, d) BOOST_PP_REPEAT_3_236(m, d) m(4, 236, d) -# define BOOST_PP_REPEAT_3_238(m, d) BOOST_PP_REPEAT_3_237(m, d) m(4, 237, d) -# define BOOST_PP_REPEAT_3_239(m, d) BOOST_PP_REPEAT_3_238(m, d) m(4, 238, d) -# define BOOST_PP_REPEAT_3_240(m, d) BOOST_PP_REPEAT_3_239(m, d) m(4, 239, d) -# define BOOST_PP_REPEAT_3_241(m, d) BOOST_PP_REPEAT_3_240(m, d) m(4, 240, d) -# define BOOST_PP_REPEAT_3_242(m, d) BOOST_PP_REPEAT_3_241(m, d) m(4, 241, d) -# define BOOST_PP_REPEAT_3_243(m, d) BOOST_PP_REPEAT_3_242(m, d) m(4, 242, d) -# define BOOST_PP_REPEAT_3_244(m, d) BOOST_PP_REPEAT_3_243(m, d) m(4, 243, d) -# define BOOST_PP_REPEAT_3_245(m, d) BOOST_PP_REPEAT_3_244(m, d) m(4, 244, d) -# define BOOST_PP_REPEAT_3_246(m, d) BOOST_PP_REPEAT_3_245(m, d) m(4, 245, d) -# define BOOST_PP_REPEAT_3_247(m, d) BOOST_PP_REPEAT_3_246(m, d) m(4, 246, d) -# define BOOST_PP_REPEAT_3_248(m, d) BOOST_PP_REPEAT_3_247(m, d) m(4, 247, d) -# define BOOST_PP_REPEAT_3_249(m, d) BOOST_PP_REPEAT_3_248(m, d) m(4, 248, d) -# define BOOST_PP_REPEAT_3_250(m, d) BOOST_PP_REPEAT_3_249(m, d) m(4, 249, d) -# define BOOST_PP_REPEAT_3_251(m, d) BOOST_PP_REPEAT_3_250(m, d) m(4, 250, d) -# define BOOST_PP_REPEAT_3_252(m, d) BOOST_PP_REPEAT_3_251(m, d) m(4, 251, d) -# define BOOST_PP_REPEAT_3_253(m, d) BOOST_PP_REPEAT_3_252(m, d) m(4, 252, d) -# define BOOST_PP_REPEAT_3_254(m, d) BOOST_PP_REPEAT_3_253(m, d) m(4, 253, d) -# define BOOST_PP_REPEAT_3_255(m, d) BOOST_PP_REPEAT_3_254(m, d) m(4, 254, d) -# define BOOST_PP_REPEAT_3_256(m, d) BOOST_PP_REPEAT_3_255(m, d) m(4, 255, d) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/seq.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,44 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP +# define BOOST_PREPROCESSOR_SEQ_SEQ_HPP +# +# include +# include +# +# /* BOOST_PP_SEQ_HEAD */ +# +# define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) +# +# /* BOOST_PP_SEQ_TAIL */ +# +# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) +# define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par +# define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) +# define BOOST_PP_SEQ_TAIL_ID(id) id +# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) +# define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq +# else +# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq +# endif +# +# define BOOST_PP_SEQ_TAIL_I(x) +# +# /* BOOST_PP_SEQ_NIL */ +# +# define BOOST_PP_SEQ_NIL(x) (x) +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/cat.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/cat.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_CAT_HPP -# define BOOST_PREPROCESSOR_SEQ_CAT_HPP -# -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_CAT */ -# -# define BOOST_PP_SEQ_CAT(seq) \ - BOOST_PP_IF( \ - BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ - BOOST_PP_SEQ_CAT_I, \ - BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_1 \ - )(seq) \ - /**/ -# define BOOST_PP_SEQ_CAT_I(seq) BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) -# -# define BOOST_PP_SEQ_CAT_O(s, st, elem) BOOST_PP_SEQ_CAT_O_I(st, elem) -# define BOOST_PP_SEQ_CAT_O_I(a, b) a ## b -# -# /* BOOST_PP_SEQ_CAT_S */ -# -# define BOOST_PP_SEQ_CAT_S(s, seq) \ - BOOST_PP_IF( \ - BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), \ - BOOST_PP_SEQ_CAT_S_I, \ - BOOST_PP_SEQ_HEAD(seq) BOOST_PP_TUPLE_EAT_2 \ - )(s, seq) \ - /**/ -# define BOOST_PP_SEQ_CAT_S_I(s, seq) BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_CAT_O, BOOST_PP_SEQ_HEAD(seq), BOOST_PP_SEQ_TAIL(seq)) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/enum.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/enum.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,288 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_ENUM_HPP -# define BOOST_PREPROCESSOR_SEQ_ENUM_HPP -# -# include -# include -# include -# -# /* BOOST_PP_SEQ_ENUM */ -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(seq) -# define BOOST_PP_SEQ_ENUM_I(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_SEQ_ENUM_I(BOOST_PP_SEQ_SIZE(seq), seq) -# define BOOST_PP_SEQ_ENUM_I(size, seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, size) seq -# else -# define BOOST_PP_SEQ_ENUM(seq) BOOST_PP_CAT(BOOST_PP_SEQ_ENUM_, BOOST_PP_SEQ_SIZE(seq)) seq -# endif -# -# define BOOST_PP_SEQ_ENUM_1(x) x -# define BOOST_PP_SEQ_ENUM_2(x) x, BOOST_PP_SEQ_ENUM_1 -# define BOOST_PP_SEQ_ENUM_3(x) x, BOOST_PP_SEQ_ENUM_2 -# define BOOST_PP_SEQ_ENUM_4(x) x, BOOST_PP_SEQ_ENUM_3 -# define BOOST_PP_SEQ_ENUM_5(x) x, BOOST_PP_SEQ_ENUM_4 -# define BOOST_PP_SEQ_ENUM_6(x) x, BOOST_PP_SEQ_ENUM_5 -# define BOOST_PP_SEQ_ENUM_7(x) x, BOOST_PP_SEQ_ENUM_6 -# define BOOST_PP_SEQ_ENUM_8(x) x, BOOST_PP_SEQ_ENUM_7 -# define BOOST_PP_SEQ_ENUM_9(x) x, BOOST_PP_SEQ_ENUM_8 -# define BOOST_PP_SEQ_ENUM_10(x) x, BOOST_PP_SEQ_ENUM_9 -# define BOOST_PP_SEQ_ENUM_11(x) x, BOOST_PP_SEQ_ENUM_10 -# define BOOST_PP_SEQ_ENUM_12(x) x, BOOST_PP_SEQ_ENUM_11 -# define BOOST_PP_SEQ_ENUM_13(x) x, BOOST_PP_SEQ_ENUM_12 -# define BOOST_PP_SEQ_ENUM_14(x) x, BOOST_PP_SEQ_ENUM_13 -# define BOOST_PP_SEQ_ENUM_15(x) x, BOOST_PP_SEQ_ENUM_14 -# define BOOST_PP_SEQ_ENUM_16(x) x, BOOST_PP_SEQ_ENUM_15 -# define BOOST_PP_SEQ_ENUM_17(x) x, BOOST_PP_SEQ_ENUM_16 -# define BOOST_PP_SEQ_ENUM_18(x) x, BOOST_PP_SEQ_ENUM_17 -# define BOOST_PP_SEQ_ENUM_19(x) x, BOOST_PP_SEQ_ENUM_18 -# define BOOST_PP_SEQ_ENUM_20(x) x, BOOST_PP_SEQ_ENUM_19 -# define BOOST_PP_SEQ_ENUM_21(x) x, BOOST_PP_SEQ_ENUM_20 -# define BOOST_PP_SEQ_ENUM_22(x) x, BOOST_PP_SEQ_ENUM_21 -# define BOOST_PP_SEQ_ENUM_23(x) x, BOOST_PP_SEQ_ENUM_22 -# define BOOST_PP_SEQ_ENUM_24(x) x, BOOST_PP_SEQ_ENUM_23 -# define BOOST_PP_SEQ_ENUM_25(x) x, BOOST_PP_SEQ_ENUM_24 -# define BOOST_PP_SEQ_ENUM_26(x) x, BOOST_PP_SEQ_ENUM_25 -# define BOOST_PP_SEQ_ENUM_27(x) x, BOOST_PP_SEQ_ENUM_26 -# define BOOST_PP_SEQ_ENUM_28(x) x, BOOST_PP_SEQ_ENUM_27 -# define BOOST_PP_SEQ_ENUM_29(x) x, BOOST_PP_SEQ_ENUM_28 -# define BOOST_PP_SEQ_ENUM_30(x) x, BOOST_PP_SEQ_ENUM_29 -# define BOOST_PP_SEQ_ENUM_31(x) x, BOOST_PP_SEQ_ENUM_30 -# define BOOST_PP_SEQ_ENUM_32(x) x, BOOST_PP_SEQ_ENUM_31 -# define BOOST_PP_SEQ_ENUM_33(x) x, BOOST_PP_SEQ_ENUM_32 -# define BOOST_PP_SEQ_ENUM_34(x) x, BOOST_PP_SEQ_ENUM_33 -# define BOOST_PP_SEQ_ENUM_35(x) x, BOOST_PP_SEQ_ENUM_34 -# define BOOST_PP_SEQ_ENUM_36(x) x, BOOST_PP_SEQ_ENUM_35 -# define BOOST_PP_SEQ_ENUM_37(x) x, BOOST_PP_SEQ_ENUM_36 -# define BOOST_PP_SEQ_ENUM_38(x) x, BOOST_PP_SEQ_ENUM_37 -# define BOOST_PP_SEQ_ENUM_39(x) x, BOOST_PP_SEQ_ENUM_38 -# define BOOST_PP_SEQ_ENUM_40(x) x, BOOST_PP_SEQ_ENUM_39 -# define BOOST_PP_SEQ_ENUM_41(x) x, BOOST_PP_SEQ_ENUM_40 -# define BOOST_PP_SEQ_ENUM_42(x) x, BOOST_PP_SEQ_ENUM_41 -# define BOOST_PP_SEQ_ENUM_43(x) x, BOOST_PP_SEQ_ENUM_42 -# define BOOST_PP_SEQ_ENUM_44(x) x, BOOST_PP_SEQ_ENUM_43 -# define BOOST_PP_SEQ_ENUM_45(x) x, BOOST_PP_SEQ_ENUM_44 -# define BOOST_PP_SEQ_ENUM_46(x) x, BOOST_PP_SEQ_ENUM_45 -# define BOOST_PP_SEQ_ENUM_47(x) x, BOOST_PP_SEQ_ENUM_46 -# define BOOST_PP_SEQ_ENUM_48(x) x, BOOST_PP_SEQ_ENUM_47 -# define BOOST_PP_SEQ_ENUM_49(x) x, BOOST_PP_SEQ_ENUM_48 -# define BOOST_PP_SEQ_ENUM_50(x) x, BOOST_PP_SEQ_ENUM_49 -# define BOOST_PP_SEQ_ENUM_51(x) x, BOOST_PP_SEQ_ENUM_50 -# define BOOST_PP_SEQ_ENUM_52(x) x, BOOST_PP_SEQ_ENUM_51 -# define BOOST_PP_SEQ_ENUM_53(x) x, BOOST_PP_SEQ_ENUM_52 -# define BOOST_PP_SEQ_ENUM_54(x) x, BOOST_PP_SEQ_ENUM_53 -# define BOOST_PP_SEQ_ENUM_55(x) x, BOOST_PP_SEQ_ENUM_54 -# define BOOST_PP_SEQ_ENUM_56(x) x, BOOST_PP_SEQ_ENUM_55 -# define BOOST_PP_SEQ_ENUM_57(x) x, BOOST_PP_SEQ_ENUM_56 -# define BOOST_PP_SEQ_ENUM_58(x) x, BOOST_PP_SEQ_ENUM_57 -# define BOOST_PP_SEQ_ENUM_59(x) x, BOOST_PP_SEQ_ENUM_58 -# define BOOST_PP_SEQ_ENUM_60(x) x, BOOST_PP_SEQ_ENUM_59 -# define BOOST_PP_SEQ_ENUM_61(x) x, BOOST_PP_SEQ_ENUM_60 -# define BOOST_PP_SEQ_ENUM_62(x) x, BOOST_PP_SEQ_ENUM_61 -# define BOOST_PP_SEQ_ENUM_63(x) x, BOOST_PP_SEQ_ENUM_62 -# define BOOST_PP_SEQ_ENUM_64(x) x, BOOST_PP_SEQ_ENUM_63 -# define BOOST_PP_SEQ_ENUM_65(x) x, BOOST_PP_SEQ_ENUM_64 -# define BOOST_PP_SEQ_ENUM_66(x) x, BOOST_PP_SEQ_ENUM_65 -# define BOOST_PP_SEQ_ENUM_67(x) x, BOOST_PP_SEQ_ENUM_66 -# define BOOST_PP_SEQ_ENUM_68(x) x, BOOST_PP_SEQ_ENUM_67 -# define BOOST_PP_SEQ_ENUM_69(x) x, BOOST_PP_SEQ_ENUM_68 -# define BOOST_PP_SEQ_ENUM_70(x) x, BOOST_PP_SEQ_ENUM_69 -# define BOOST_PP_SEQ_ENUM_71(x) x, BOOST_PP_SEQ_ENUM_70 -# define BOOST_PP_SEQ_ENUM_72(x) x, BOOST_PP_SEQ_ENUM_71 -# define BOOST_PP_SEQ_ENUM_73(x) x, BOOST_PP_SEQ_ENUM_72 -# define BOOST_PP_SEQ_ENUM_74(x) x, BOOST_PP_SEQ_ENUM_73 -# define BOOST_PP_SEQ_ENUM_75(x) x, BOOST_PP_SEQ_ENUM_74 -# define BOOST_PP_SEQ_ENUM_76(x) x, BOOST_PP_SEQ_ENUM_75 -# define BOOST_PP_SEQ_ENUM_77(x) x, BOOST_PP_SEQ_ENUM_76 -# define BOOST_PP_SEQ_ENUM_78(x) x, BOOST_PP_SEQ_ENUM_77 -# define BOOST_PP_SEQ_ENUM_79(x) x, BOOST_PP_SEQ_ENUM_78 -# define BOOST_PP_SEQ_ENUM_80(x) x, BOOST_PP_SEQ_ENUM_79 -# define BOOST_PP_SEQ_ENUM_81(x) x, BOOST_PP_SEQ_ENUM_80 -# define BOOST_PP_SEQ_ENUM_82(x) x, BOOST_PP_SEQ_ENUM_81 -# define BOOST_PP_SEQ_ENUM_83(x) x, BOOST_PP_SEQ_ENUM_82 -# define BOOST_PP_SEQ_ENUM_84(x) x, BOOST_PP_SEQ_ENUM_83 -# define BOOST_PP_SEQ_ENUM_85(x) x, BOOST_PP_SEQ_ENUM_84 -# define BOOST_PP_SEQ_ENUM_86(x) x, BOOST_PP_SEQ_ENUM_85 -# define BOOST_PP_SEQ_ENUM_87(x) x, BOOST_PP_SEQ_ENUM_86 -# define BOOST_PP_SEQ_ENUM_88(x) x, BOOST_PP_SEQ_ENUM_87 -# define BOOST_PP_SEQ_ENUM_89(x) x, BOOST_PP_SEQ_ENUM_88 -# define BOOST_PP_SEQ_ENUM_90(x) x, BOOST_PP_SEQ_ENUM_89 -# define BOOST_PP_SEQ_ENUM_91(x) x, BOOST_PP_SEQ_ENUM_90 -# define BOOST_PP_SEQ_ENUM_92(x) x, BOOST_PP_SEQ_ENUM_91 -# define BOOST_PP_SEQ_ENUM_93(x) x, BOOST_PP_SEQ_ENUM_92 -# define BOOST_PP_SEQ_ENUM_94(x) x, BOOST_PP_SEQ_ENUM_93 -# define BOOST_PP_SEQ_ENUM_95(x) x, BOOST_PP_SEQ_ENUM_94 -# define BOOST_PP_SEQ_ENUM_96(x) x, BOOST_PP_SEQ_ENUM_95 -# define BOOST_PP_SEQ_ENUM_97(x) x, BOOST_PP_SEQ_ENUM_96 -# define BOOST_PP_SEQ_ENUM_98(x) x, BOOST_PP_SEQ_ENUM_97 -# define BOOST_PP_SEQ_ENUM_99(x) x, BOOST_PP_SEQ_ENUM_98 -# define BOOST_PP_SEQ_ENUM_100(x) x, BOOST_PP_SEQ_ENUM_99 -# define BOOST_PP_SEQ_ENUM_101(x) x, BOOST_PP_SEQ_ENUM_100 -# define BOOST_PP_SEQ_ENUM_102(x) x, BOOST_PP_SEQ_ENUM_101 -# define BOOST_PP_SEQ_ENUM_103(x) x, BOOST_PP_SEQ_ENUM_102 -# define BOOST_PP_SEQ_ENUM_104(x) x, BOOST_PP_SEQ_ENUM_103 -# define BOOST_PP_SEQ_ENUM_105(x) x, BOOST_PP_SEQ_ENUM_104 -# define BOOST_PP_SEQ_ENUM_106(x) x, BOOST_PP_SEQ_ENUM_105 -# define BOOST_PP_SEQ_ENUM_107(x) x, BOOST_PP_SEQ_ENUM_106 -# define BOOST_PP_SEQ_ENUM_108(x) x, BOOST_PP_SEQ_ENUM_107 -# define BOOST_PP_SEQ_ENUM_109(x) x, BOOST_PP_SEQ_ENUM_108 -# define BOOST_PP_SEQ_ENUM_110(x) x, BOOST_PP_SEQ_ENUM_109 -# define BOOST_PP_SEQ_ENUM_111(x) x, BOOST_PP_SEQ_ENUM_110 -# define BOOST_PP_SEQ_ENUM_112(x) x, BOOST_PP_SEQ_ENUM_111 -# define BOOST_PP_SEQ_ENUM_113(x) x, BOOST_PP_SEQ_ENUM_112 -# define BOOST_PP_SEQ_ENUM_114(x) x, BOOST_PP_SEQ_ENUM_113 -# define BOOST_PP_SEQ_ENUM_115(x) x, BOOST_PP_SEQ_ENUM_114 -# define BOOST_PP_SEQ_ENUM_116(x) x, BOOST_PP_SEQ_ENUM_115 -# define BOOST_PP_SEQ_ENUM_117(x) x, BOOST_PP_SEQ_ENUM_116 -# define BOOST_PP_SEQ_ENUM_118(x) x, BOOST_PP_SEQ_ENUM_117 -# define BOOST_PP_SEQ_ENUM_119(x) x, BOOST_PP_SEQ_ENUM_118 -# define BOOST_PP_SEQ_ENUM_120(x) x, BOOST_PP_SEQ_ENUM_119 -# define BOOST_PP_SEQ_ENUM_121(x) x, BOOST_PP_SEQ_ENUM_120 -# define BOOST_PP_SEQ_ENUM_122(x) x, BOOST_PP_SEQ_ENUM_121 -# define BOOST_PP_SEQ_ENUM_123(x) x, BOOST_PP_SEQ_ENUM_122 -# define BOOST_PP_SEQ_ENUM_124(x) x, BOOST_PP_SEQ_ENUM_123 -# define BOOST_PP_SEQ_ENUM_125(x) x, BOOST_PP_SEQ_ENUM_124 -# define BOOST_PP_SEQ_ENUM_126(x) x, BOOST_PP_SEQ_ENUM_125 -# define BOOST_PP_SEQ_ENUM_127(x) x, BOOST_PP_SEQ_ENUM_126 -# define BOOST_PP_SEQ_ENUM_128(x) x, BOOST_PP_SEQ_ENUM_127 -# define BOOST_PP_SEQ_ENUM_129(x) x, BOOST_PP_SEQ_ENUM_128 -# define BOOST_PP_SEQ_ENUM_130(x) x, BOOST_PP_SEQ_ENUM_129 -# define BOOST_PP_SEQ_ENUM_131(x) x, BOOST_PP_SEQ_ENUM_130 -# define BOOST_PP_SEQ_ENUM_132(x) x, BOOST_PP_SEQ_ENUM_131 -# define BOOST_PP_SEQ_ENUM_133(x) x, BOOST_PP_SEQ_ENUM_132 -# define BOOST_PP_SEQ_ENUM_134(x) x, BOOST_PP_SEQ_ENUM_133 -# define BOOST_PP_SEQ_ENUM_135(x) x, BOOST_PP_SEQ_ENUM_134 -# define BOOST_PP_SEQ_ENUM_136(x) x, BOOST_PP_SEQ_ENUM_135 -# define BOOST_PP_SEQ_ENUM_137(x) x, BOOST_PP_SEQ_ENUM_136 -# define BOOST_PP_SEQ_ENUM_138(x) x, BOOST_PP_SEQ_ENUM_137 -# define BOOST_PP_SEQ_ENUM_139(x) x, BOOST_PP_SEQ_ENUM_138 -# define BOOST_PP_SEQ_ENUM_140(x) x, BOOST_PP_SEQ_ENUM_139 -# define BOOST_PP_SEQ_ENUM_141(x) x, BOOST_PP_SEQ_ENUM_140 -# define BOOST_PP_SEQ_ENUM_142(x) x, BOOST_PP_SEQ_ENUM_141 -# define BOOST_PP_SEQ_ENUM_143(x) x, BOOST_PP_SEQ_ENUM_142 -# define BOOST_PP_SEQ_ENUM_144(x) x, BOOST_PP_SEQ_ENUM_143 -# define BOOST_PP_SEQ_ENUM_145(x) x, BOOST_PP_SEQ_ENUM_144 -# define BOOST_PP_SEQ_ENUM_146(x) x, BOOST_PP_SEQ_ENUM_145 -# define BOOST_PP_SEQ_ENUM_147(x) x, BOOST_PP_SEQ_ENUM_146 -# define BOOST_PP_SEQ_ENUM_148(x) x, BOOST_PP_SEQ_ENUM_147 -# define BOOST_PP_SEQ_ENUM_149(x) x, BOOST_PP_SEQ_ENUM_148 -# define BOOST_PP_SEQ_ENUM_150(x) x, BOOST_PP_SEQ_ENUM_149 -# define BOOST_PP_SEQ_ENUM_151(x) x, BOOST_PP_SEQ_ENUM_150 -# define BOOST_PP_SEQ_ENUM_152(x) x, BOOST_PP_SEQ_ENUM_151 -# define BOOST_PP_SEQ_ENUM_153(x) x, BOOST_PP_SEQ_ENUM_152 -# define BOOST_PP_SEQ_ENUM_154(x) x, BOOST_PP_SEQ_ENUM_153 -# define BOOST_PP_SEQ_ENUM_155(x) x, BOOST_PP_SEQ_ENUM_154 -# define BOOST_PP_SEQ_ENUM_156(x) x, BOOST_PP_SEQ_ENUM_155 -# define BOOST_PP_SEQ_ENUM_157(x) x, BOOST_PP_SEQ_ENUM_156 -# define BOOST_PP_SEQ_ENUM_158(x) x, BOOST_PP_SEQ_ENUM_157 -# define BOOST_PP_SEQ_ENUM_159(x) x, BOOST_PP_SEQ_ENUM_158 -# define BOOST_PP_SEQ_ENUM_160(x) x, BOOST_PP_SEQ_ENUM_159 -# define BOOST_PP_SEQ_ENUM_161(x) x, BOOST_PP_SEQ_ENUM_160 -# define BOOST_PP_SEQ_ENUM_162(x) x, BOOST_PP_SEQ_ENUM_161 -# define BOOST_PP_SEQ_ENUM_163(x) x, BOOST_PP_SEQ_ENUM_162 -# define BOOST_PP_SEQ_ENUM_164(x) x, BOOST_PP_SEQ_ENUM_163 -# define BOOST_PP_SEQ_ENUM_165(x) x, BOOST_PP_SEQ_ENUM_164 -# define BOOST_PP_SEQ_ENUM_166(x) x, BOOST_PP_SEQ_ENUM_165 -# define BOOST_PP_SEQ_ENUM_167(x) x, BOOST_PP_SEQ_ENUM_166 -# define BOOST_PP_SEQ_ENUM_168(x) x, BOOST_PP_SEQ_ENUM_167 -# define BOOST_PP_SEQ_ENUM_169(x) x, BOOST_PP_SEQ_ENUM_168 -# define BOOST_PP_SEQ_ENUM_170(x) x, BOOST_PP_SEQ_ENUM_169 -# define BOOST_PP_SEQ_ENUM_171(x) x, BOOST_PP_SEQ_ENUM_170 -# define BOOST_PP_SEQ_ENUM_172(x) x, BOOST_PP_SEQ_ENUM_171 -# define BOOST_PP_SEQ_ENUM_173(x) x, BOOST_PP_SEQ_ENUM_172 -# define BOOST_PP_SEQ_ENUM_174(x) x, BOOST_PP_SEQ_ENUM_173 -# define BOOST_PP_SEQ_ENUM_175(x) x, BOOST_PP_SEQ_ENUM_174 -# define BOOST_PP_SEQ_ENUM_176(x) x, BOOST_PP_SEQ_ENUM_175 -# define BOOST_PP_SEQ_ENUM_177(x) x, BOOST_PP_SEQ_ENUM_176 -# define BOOST_PP_SEQ_ENUM_178(x) x, BOOST_PP_SEQ_ENUM_177 -# define BOOST_PP_SEQ_ENUM_179(x) x, BOOST_PP_SEQ_ENUM_178 -# define BOOST_PP_SEQ_ENUM_180(x) x, BOOST_PP_SEQ_ENUM_179 -# define BOOST_PP_SEQ_ENUM_181(x) x, BOOST_PP_SEQ_ENUM_180 -# define BOOST_PP_SEQ_ENUM_182(x) x, BOOST_PP_SEQ_ENUM_181 -# define BOOST_PP_SEQ_ENUM_183(x) x, BOOST_PP_SEQ_ENUM_182 -# define BOOST_PP_SEQ_ENUM_184(x) x, BOOST_PP_SEQ_ENUM_183 -# define BOOST_PP_SEQ_ENUM_185(x) x, BOOST_PP_SEQ_ENUM_184 -# define BOOST_PP_SEQ_ENUM_186(x) x, BOOST_PP_SEQ_ENUM_185 -# define BOOST_PP_SEQ_ENUM_187(x) x, BOOST_PP_SEQ_ENUM_186 -# define BOOST_PP_SEQ_ENUM_188(x) x, BOOST_PP_SEQ_ENUM_187 -# define BOOST_PP_SEQ_ENUM_189(x) x, BOOST_PP_SEQ_ENUM_188 -# define BOOST_PP_SEQ_ENUM_190(x) x, BOOST_PP_SEQ_ENUM_189 -# define BOOST_PP_SEQ_ENUM_191(x) x, BOOST_PP_SEQ_ENUM_190 -# define BOOST_PP_SEQ_ENUM_192(x) x, BOOST_PP_SEQ_ENUM_191 -# define BOOST_PP_SEQ_ENUM_193(x) x, BOOST_PP_SEQ_ENUM_192 -# define BOOST_PP_SEQ_ENUM_194(x) x, BOOST_PP_SEQ_ENUM_193 -# define BOOST_PP_SEQ_ENUM_195(x) x, BOOST_PP_SEQ_ENUM_194 -# define BOOST_PP_SEQ_ENUM_196(x) x, BOOST_PP_SEQ_ENUM_195 -# define BOOST_PP_SEQ_ENUM_197(x) x, BOOST_PP_SEQ_ENUM_196 -# define BOOST_PP_SEQ_ENUM_198(x) x, BOOST_PP_SEQ_ENUM_197 -# define BOOST_PP_SEQ_ENUM_199(x) x, BOOST_PP_SEQ_ENUM_198 -# define BOOST_PP_SEQ_ENUM_200(x) x, BOOST_PP_SEQ_ENUM_199 -# define BOOST_PP_SEQ_ENUM_201(x) x, BOOST_PP_SEQ_ENUM_200 -# define BOOST_PP_SEQ_ENUM_202(x) x, BOOST_PP_SEQ_ENUM_201 -# define BOOST_PP_SEQ_ENUM_203(x) x, BOOST_PP_SEQ_ENUM_202 -# define BOOST_PP_SEQ_ENUM_204(x) x, BOOST_PP_SEQ_ENUM_203 -# define BOOST_PP_SEQ_ENUM_205(x) x, BOOST_PP_SEQ_ENUM_204 -# define BOOST_PP_SEQ_ENUM_206(x) x, BOOST_PP_SEQ_ENUM_205 -# define BOOST_PP_SEQ_ENUM_207(x) x, BOOST_PP_SEQ_ENUM_206 -# define BOOST_PP_SEQ_ENUM_208(x) x, BOOST_PP_SEQ_ENUM_207 -# define BOOST_PP_SEQ_ENUM_209(x) x, BOOST_PP_SEQ_ENUM_208 -# define BOOST_PP_SEQ_ENUM_210(x) x, BOOST_PP_SEQ_ENUM_209 -# define BOOST_PP_SEQ_ENUM_211(x) x, BOOST_PP_SEQ_ENUM_210 -# define BOOST_PP_SEQ_ENUM_212(x) x, BOOST_PP_SEQ_ENUM_211 -# define BOOST_PP_SEQ_ENUM_213(x) x, BOOST_PP_SEQ_ENUM_212 -# define BOOST_PP_SEQ_ENUM_214(x) x, BOOST_PP_SEQ_ENUM_213 -# define BOOST_PP_SEQ_ENUM_215(x) x, BOOST_PP_SEQ_ENUM_214 -# define BOOST_PP_SEQ_ENUM_216(x) x, BOOST_PP_SEQ_ENUM_215 -# define BOOST_PP_SEQ_ENUM_217(x) x, BOOST_PP_SEQ_ENUM_216 -# define BOOST_PP_SEQ_ENUM_218(x) x, BOOST_PP_SEQ_ENUM_217 -# define BOOST_PP_SEQ_ENUM_219(x) x, BOOST_PP_SEQ_ENUM_218 -# define BOOST_PP_SEQ_ENUM_220(x) x, BOOST_PP_SEQ_ENUM_219 -# define BOOST_PP_SEQ_ENUM_221(x) x, BOOST_PP_SEQ_ENUM_220 -# define BOOST_PP_SEQ_ENUM_222(x) x, BOOST_PP_SEQ_ENUM_221 -# define BOOST_PP_SEQ_ENUM_223(x) x, BOOST_PP_SEQ_ENUM_222 -# define BOOST_PP_SEQ_ENUM_224(x) x, BOOST_PP_SEQ_ENUM_223 -# define BOOST_PP_SEQ_ENUM_225(x) x, BOOST_PP_SEQ_ENUM_224 -# define BOOST_PP_SEQ_ENUM_226(x) x, BOOST_PP_SEQ_ENUM_225 -# define BOOST_PP_SEQ_ENUM_227(x) x, BOOST_PP_SEQ_ENUM_226 -# define BOOST_PP_SEQ_ENUM_228(x) x, BOOST_PP_SEQ_ENUM_227 -# define BOOST_PP_SEQ_ENUM_229(x) x, BOOST_PP_SEQ_ENUM_228 -# define BOOST_PP_SEQ_ENUM_230(x) x, BOOST_PP_SEQ_ENUM_229 -# define BOOST_PP_SEQ_ENUM_231(x) x, BOOST_PP_SEQ_ENUM_230 -# define BOOST_PP_SEQ_ENUM_232(x) x, BOOST_PP_SEQ_ENUM_231 -# define BOOST_PP_SEQ_ENUM_233(x) x, BOOST_PP_SEQ_ENUM_232 -# define BOOST_PP_SEQ_ENUM_234(x) x, BOOST_PP_SEQ_ENUM_233 -# define BOOST_PP_SEQ_ENUM_235(x) x, BOOST_PP_SEQ_ENUM_234 -# define BOOST_PP_SEQ_ENUM_236(x) x, BOOST_PP_SEQ_ENUM_235 -# define BOOST_PP_SEQ_ENUM_237(x) x, BOOST_PP_SEQ_ENUM_236 -# define BOOST_PP_SEQ_ENUM_238(x) x, BOOST_PP_SEQ_ENUM_237 -# define BOOST_PP_SEQ_ENUM_239(x) x, BOOST_PP_SEQ_ENUM_238 -# define BOOST_PP_SEQ_ENUM_240(x) x, BOOST_PP_SEQ_ENUM_239 -# define BOOST_PP_SEQ_ENUM_241(x) x, BOOST_PP_SEQ_ENUM_240 -# define BOOST_PP_SEQ_ENUM_242(x) x, BOOST_PP_SEQ_ENUM_241 -# define BOOST_PP_SEQ_ENUM_243(x) x, BOOST_PP_SEQ_ENUM_242 -# define BOOST_PP_SEQ_ENUM_244(x) x, BOOST_PP_SEQ_ENUM_243 -# define BOOST_PP_SEQ_ENUM_245(x) x, BOOST_PP_SEQ_ENUM_244 -# define BOOST_PP_SEQ_ENUM_246(x) x, BOOST_PP_SEQ_ENUM_245 -# define BOOST_PP_SEQ_ENUM_247(x) x, BOOST_PP_SEQ_ENUM_246 -# define BOOST_PP_SEQ_ENUM_248(x) x, BOOST_PP_SEQ_ENUM_247 -# define BOOST_PP_SEQ_ENUM_249(x) x, BOOST_PP_SEQ_ENUM_248 -# define BOOST_PP_SEQ_ENUM_250(x) x, BOOST_PP_SEQ_ENUM_249 -# define BOOST_PP_SEQ_ENUM_251(x) x, BOOST_PP_SEQ_ENUM_250 -# define BOOST_PP_SEQ_ENUM_252(x) x, BOOST_PP_SEQ_ENUM_251 -# define BOOST_PP_SEQ_ENUM_253(x) x, BOOST_PP_SEQ_ENUM_252 -# define BOOST_PP_SEQ_ENUM_254(x) x, BOOST_PP_SEQ_ENUM_253 -# define BOOST_PP_SEQ_ENUM_255(x) x, BOOST_PP_SEQ_ENUM_254 -# define BOOST_PP_SEQ_ENUM_256(x) x, BOOST_PP_SEQ_ENUM_255 -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/filter.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/filter.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FILTER_HPP -# define BOOST_PREPROCESSOR_SEQ_FILTER_HPP -# -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FILTER */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) -# else -# define BOOST_PP_SEQ_FILTER(pred, data, seq) BOOST_PP_SEQ_FILTER_I(pred, data, seq) -# define BOOST_PP_SEQ_FILTER_I(pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) -# endif -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_IM(s, BOOST_PP_TUPLE_REM_3 st, elem) -# define BOOST_PP_SEQ_FILTER_O_IM(s, im, elem) BOOST_PP_SEQ_FILTER_O_I(s, im, elem) -# else -# define BOOST_PP_SEQ_FILTER_O(s, st, elem) BOOST_PP_SEQ_FILTER_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, st), BOOST_PP_TUPLE_ELEM(3, 1, st), BOOST_PP_TUPLE_ELEM(3, 2, st), elem) -# endif -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() -# define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred(s, data, elem), (elem))) -# else -# define BOOST_PP_SEQ_FILTER_O_I(s, pred, data, res, elem) (pred, data, res BOOST_PP_EXPR_IF(pred##(s, data, elem), (elem))) -# endif -# -# /* BOOST_PP_SEQ_FILTER_S */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) -# else -# define BOOST_PP_SEQ_FILTER_S(s, pred, data, seq) BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq) -# define BOOST_PP_SEQ_FILTER_S_I(s, pred, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_FILTER_O, (pred, data, (nil)), seq))) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/first_n.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/first_n.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP -# define BOOST_PREPROCESSOR_SEQ_FIRST_N_HPP -# -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FIRST_N */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) -# else -# define BOOST_PP_SEQ_FIRST_N(n, seq) BOOST_PP_SEQ_FIRST_N_I(n, seq) -# define BOOST_PP_SEQ_FIRST_N_I(n, seq) BOOST_PP_IF(n, BOOST_PP_TUPLE_ELEM, BOOST_PP_TUPLE_EAT_3)(2, 0, BOOST_PP_SEQ_SPLIT(n, seq (nil))) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/fold_left.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/fold_left.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1070 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP -# define BOOST_PREPROCESSOR_SEQ_FOLD_LEFT_HPP -# -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FOLD_LEFT */ -# -# if 0 -# define BOOST_PP_SEQ_FOLD_LEFT(op, state, seq) ... -# endif -# -# define BOOST_PP_SEQ_FOLD_LEFT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) -# define BOOST_PP_SEQ_FOLD_LEFT_P(n) BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_LEFT_CHECK_, BOOST_PP_SEQ_FOLD_LEFT_I_ ## n(BOOST_PP_SEQ_FOLD_LEFT_O, BOOST_PP_NIL, (nil), 1)) -# define BOOST_PP_SEQ_FOLD_LEFT_O(s, st, _) st -# -# define BOOST_PP_SEQ_FOLD_LEFT_257(op, st, ss) BOOST_PP_ERROR(0x0005) -# define BOOST_PP_SEQ_FOLD_LEFT_I_257(op, st, ss, sz) BOOST_PP_ERROR(0x0005) -# -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_NIL 1 -# -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) 0 -# define BOOST_PP_SEQ_FOLD_LEFT_CHECK_BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) 0 -# -# define BOOST_PP_SEQ_FOLD_LEFT_F(op, st, ss, sz) st -# -# define BOOST_PP_SEQ_FOLD_LEFT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_LEFT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, BOOST_PP_SEQ_SIZE(ss)) -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_DMC() -# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# else -# define BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_2, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(2, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_3, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(3, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_4, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(4, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_5, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(5, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_6, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(6, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_7, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(7, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_8, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(8, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_9, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(9, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_10, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(10, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_11, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(11, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_12, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(12, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_13, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(13, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_14, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(14, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_15, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(15, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_16, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(16, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_17, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(17, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_18, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(18, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_19, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(19, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_20, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(20, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_21, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(21, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_22, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(22, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_23, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(23, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_24, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(24, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_25, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(25, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_26, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(26, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_27, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(27, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_28, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(28, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_29, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(29, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_30, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(30, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_31, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(31, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_32, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(32, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_33, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(33, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_34, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(34, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_35, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(35, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_36, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(36, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_37, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(37, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_38, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(38, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_39, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(39, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_40, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(40, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_41, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(41, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_42, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(42, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_43, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(43, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_44, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(44, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_45, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(45, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_46, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(46, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_47, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(47, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_48, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(48, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_49, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(49, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_50, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(50, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_51, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(51, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_52, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(52, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_53, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(53, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_54, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(54, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_55, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(55, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_56, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(56, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_57, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(57, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_58, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(58, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_59, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(59, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_60, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(60, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_61, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(61, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_62, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(62, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_63, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(63, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_64, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(64, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_65, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(65, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_66, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(66, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_67, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(67, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_68, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(68, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_69, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(69, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_70, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(70, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_71, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(71, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_72, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(72, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_73, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(73, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_74, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(74, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_75, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(75, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_76, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(76, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_77, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(77, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_78, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(78, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_79, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(79, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_80, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(80, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_81, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(81, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_82, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(82, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_83, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(83, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_84, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(84, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_85, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(85, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_86, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(86, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_87, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(87, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_88, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(88, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_89, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(89, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_90, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(90, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_91, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(91, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_92, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(92, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_93, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(93, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_94, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(94, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_95, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(95, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_96, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(96, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_97, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(97, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_98, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(98, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_99, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(99, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_100, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(100, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_101, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(101, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_102, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(102, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_103, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(103, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_104, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(104, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_105, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(105, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_106, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(106, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_107, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(107, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_108, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(108, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_109, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(109, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_110, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(110, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_111, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(111, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_112, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(112, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_113, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(113, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_114, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(114, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_115, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(115, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_116, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(116, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_117, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(117, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_118, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(118, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_119, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(119, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_120, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(120, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_121, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(121, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_122, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(122, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_123, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(123, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_124, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(124, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_125, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(125, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_126, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(126, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_127, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(127, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_128, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(128, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_129, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(129, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_130, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(130, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_131, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(131, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_132, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(132, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_133, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(133, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_134, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(134, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_135, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(135, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_136, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(136, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_137, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(137, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_138, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(138, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_139, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(139, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_140, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(140, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_141, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(141, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_142, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(142, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_143, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(143, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_144, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(144, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_145, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(145, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_146, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(146, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_147, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(147, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_148, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(148, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_149, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(149, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_150, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(150, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_151, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(151, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_152, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(152, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_153, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(153, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_154, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(154, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_155, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(155, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_156, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(156, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_157, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(157, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_158, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(158, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_159, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(159, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_160, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(160, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_161, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(161, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_162, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(162, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_163, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(163, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_164, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(164, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_165, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(165, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_166, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(166, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_167, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(167, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_168, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(168, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_169, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(169, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_170, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(170, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_171, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(171, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_172, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(172, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_173, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(173, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_174, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(174, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_175, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(175, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_176, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(176, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_177, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(177, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_178, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(178, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_179, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(179, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_180, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(180, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_181, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(181, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_182, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(182, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_183, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(183, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_184, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(184, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_185, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(185, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_186, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(186, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_187, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(187, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_188, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(188, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_189, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(189, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_190, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(190, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_191, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(191, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_192, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(192, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_193, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(193, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_194, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(194, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_195, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(195, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_196, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(196, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_197, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(197, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_198, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(198, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_199, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(199, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_200, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(200, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_201, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(201, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_202, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(202, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_203, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(203, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_204, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(204, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_205, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(205, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_206, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(206, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_207, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(207, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_208, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(208, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_209, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(209, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_210, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(210, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_211, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(211, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_212, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(212, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_213, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(213, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_214, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(214, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_215, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(215, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_216, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(216, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_217, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(217, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_218, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(218, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_219, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(219, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_220, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(220, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_221, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(221, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_222, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(222, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_223, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(223, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_224, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(224, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_225, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(225, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_226, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(226, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_227, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(227, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_228, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(228, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_229, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(229, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_230, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(230, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_231, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(231, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_232, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(232, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_233, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(233, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_234, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(234, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_235, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(235, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_236, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(236, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_237, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(237, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_238, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(238, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_239, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(239, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_240, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(240, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_241, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(241, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_242, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(242, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_243, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(243, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_244, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(244, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_245, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(245, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_246, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(246, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_247, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(247, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_248, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(248, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_249, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(249, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_250, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(250, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_251, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(251, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_252, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(252, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_253, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(253, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_254, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(254, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_255, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(255, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_256, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(256, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# define BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, ss, sz) BOOST_PP_IF(BOOST_PP_DEC(sz), BOOST_PP_SEQ_FOLD_LEFT_I_257, BOOST_PP_SEQ_FOLD_LEFT_F)(op, op##(257, st, BOOST_PP_SEQ_HEAD(ss)), BOOST_PP_SEQ_TAIL(ss), BOOST_PP_DEC(sz)) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/fold_right.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/fold_right.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,288 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP -# define BOOST_PREPROCESSOR_SEQ_FOLD_RIGHT_HPP -# -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FOLD_RIGHT */ -# -# if 0 -# define BOOST_PP_SEQ_FOLD_RIGHT(op, state, seq) ... -# endif -# -# define BOOST_PP_SEQ_FOLD_RIGHT BOOST_PP_CAT(BOOST_PP_SEQ_FOLD_RIGHT_, BOOST_PP_AUTO_REC(BOOST_PP_SEQ_FOLD_LEFT_P, 256)) -# -# define BOOST_PP_SEQ_FOLD_RIGHT_257(op, st, ss) BOOST_PP_ERROR(0x0005) -# -# define BOOST_PP_SEQ_FOLD_RIGHT_1(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_1(op, st, BOOST_PP_SEQ_REVERSE_S(2, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_2(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_2(op, st, BOOST_PP_SEQ_REVERSE_S(3, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_3(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_3(op, st, BOOST_PP_SEQ_REVERSE_S(4, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_4(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_4(op, st, BOOST_PP_SEQ_REVERSE_S(5, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_5(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_5(op, st, BOOST_PP_SEQ_REVERSE_S(6, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_6(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_6(op, st, BOOST_PP_SEQ_REVERSE_S(7, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_7(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_7(op, st, BOOST_PP_SEQ_REVERSE_S(8, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_8(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_8(op, st, BOOST_PP_SEQ_REVERSE_S(9, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_9(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_9(op, st, BOOST_PP_SEQ_REVERSE_S(10, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_10(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_10(op, st, BOOST_PP_SEQ_REVERSE_S(11, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_11(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_11(op, st, BOOST_PP_SEQ_REVERSE_S(12, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_12(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_12(op, st, BOOST_PP_SEQ_REVERSE_S(13, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_13(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_13(op, st, BOOST_PP_SEQ_REVERSE_S(14, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_14(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_14(op, st, BOOST_PP_SEQ_REVERSE_S(15, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_15(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_15(op, st, BOOST_PP_SEQ_REVERSE_S(16, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_16(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_16(op, st, BOOST_PP_SEQ_REVERSE_S(17, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_17(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_17(op, st, BOOST_PP_SEQ_REVERSE_S(18, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_18(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_18(op, st, BOOST_PP_SEQ_REVERSE_S(19, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_19(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_19(op, st, BOOST_PP_SEQ_REVERSE_S(20, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_20(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_20(op, st, BOOST_PP_SEQ_REVERSE_S(21, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_21(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_21(op, st, BOOST_PP_SEQ_REVERSE_S(22, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_22(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_22(op, st, BOOST_PP_SEQ_REVERSE_S(23, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_23(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_23(op, st, BOOST_PP_SEQ_REVERSE_S(24, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_24(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_24(op, st, BOOST_PP_SEQ_REVERSE_S(25, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_25(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_25(op, st, BOOST_PP_SEQ_REVERSE_S(26, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_26(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_26(op, st, BOOST_PP_SEQ_REVERSE_S(27, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_27(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_27(op, st, BOOST_PP_SEQ_REVERSE_S(28, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_28(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_28(op, st, BOOST_PP_SEQ_REVERSE_S(29, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_29(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_29(op, st, BOOST_PP_SEQ_REVERSE_S(30, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_30(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_30(op, st, BOOST_PP_SEQ_REVERSE_S(31, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_31(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_31(op, st, BOOST_PP_SEQ_REVERSE_S(32, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_32(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_32(op, st, BOOST_PP_SEQ_REVERSE_S(33, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_33(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_33(op, st, BOOST_PP_SEQ_REVERSE_S(34, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_34(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_34(op, st, BOOST_PP_SEQ_REVERSE_S(35, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_35(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_35(op, st, BOOST_PP_SEQ_REVERSE_S(36, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_36(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_36(op, st, BOOST_PP_SEQ_REVERSE_S(37, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_37(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_37(op, st, BOOST_PP_SEQ_REVERSE_S(38, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_38(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_38(op, st, BOOST_PP_SEQ_REVERSE_S(39, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_39(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_39(op, st, BOOST_PP_SEQ_REVERSE_S(40, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_40(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_40(op, st, BOOST_PP_SEQ_REVERSE_S(41, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_41(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_41(op, st, BOOST_PP_SEQ_REVERSE_S(42, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_42(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_42(op, st, BOOST_PP_SEQ_REVERSE_S(43, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_43(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_43(op, st, BOOST_PP_SEQ_REVERSE_S(44, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_44(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_44(op, st, BOOST_PP_SEQ_REVERSE_S(45, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_45(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_45(op, st, BOOST_PP_SEQ_REVERSE_S(46, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_46(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_46(op, st, BOOST_PP_SEQ_REVERSE_S(47, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_47(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_47(op, st, BOOST_PP_SEQ_REVERSE_S(48, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_48(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_48(op, st, BOOST_PP_SEQ_REVERSE_S(49, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_49(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_49(op, st, BOOST_PP_SEQ_REVERSE_S(50, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_50(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_50(op, st, BOOST_PP_SEQ_REVERSE_S(51, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_51(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_51(op, st, BOOST_PP_SEQ_REVERSE_S(52, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_52(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_52(op, st, BOOST_PP_SEQ_REVERSE_S(53, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_53(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_53(op, st, BOOST_PP_SEQ_REVERSE_S(54, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_54(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_54(op, st, BOOST_PP_SEQ_REVERSE_S(55, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_55(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_55(op, st, BOOST_PP_SEQ_REVERSE_S(56, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_56(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_56(op, st, BOOST_PP_SEQ_REVERSE_S(57, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_57(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_57(op, st, BOOST_PP_SEQ_REVERSE_S(58, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_58(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_58(op, st, BOOST_PP_SEQ_REVERSE_S(59, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_59(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_59(op, st, BOOST_PP_SEQ_REVERSE_S(60, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_60(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_60(op, st, BOOST_PP_SEQ_REVERSE_S(61, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_61(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_61(op, st, BOOST_PP_SEQ_REVERSE_S(62, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_62(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_62(op, st, BOOST_PP_SEQ_REVERSE_S(63, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_63(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_63(op, st, BOOST_PP_SEQ_REVERSE_S(64, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_64(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_64(op, st, BOOST_PP_SEQ_REVERSE_S(65, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_65(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_65(op, st, BOOST_PP_SEQ_REVERSE_S(66, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_66(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_66(op, st, BOOST_PP_SEQ_REVERSE_S(67, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_67(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_67(op, st, BOOST_PP_SEQ_REVERSE_S(68, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_68(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_68(op, st, BOOST_PP_SEQ_REVERSE_S(69, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_69(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_69(op, st, BOOST_PP_SEQ_REVERSE_S(70, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_70(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_70(op, st, BOOST_PP_SEQ_REVERSE_S(71, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_71(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_71(op, st, BOOST_PP_SEQ_REVERSE_S(72, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_72(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_72(op, st, BOOST_PP_SEQ_REVERSE_S(73, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_73(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_73(op, st, BOOST_PP_SEQ_REVERSE_S(74, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_74(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_74(op, st, BOOST_PP_SEQ_REVERSE_S(75, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_75(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_75(op, st, BOOST_PP_SEQ_REVERSE_S(76, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_76(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_76(op, st, BOOST_PP_SEQ_REVERSE_S(77, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_77(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_77(op, st, BOOST_PP_SEQ_REVERSE_S(78, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_78(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_78(op, st, BOOST_PP_SEQ_REVERSE_S(79, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_79(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_79(op, st, BOOST_PP_SEQ_REVERSE_S(80, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_80(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_80(op, st, BOOST_PP_SEQ_REVERSE_S(81, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_81(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_81(op, st, BOOST_PP_SEQ_REVERSE_S(82, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_82(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_82(op, st, BOOST_PP_SEQ_REVERSE_S(83, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_83(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_83(op, st, BOOST_PP_SEQ_REVERSE_S(84, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_84(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_84(op, st, BOOST_PP_SEQ_REVERSE_S(85, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_85(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_85(op, st, BOOST_PP_SEQ_REVERSE_S(86, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_86(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_86(op, st, BOOST_PP_SEQ_REVERSE_S(87, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_87(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_87(op, st, BOOST_PP_SEQ_REVERSE_S(88, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_88(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_88(op, st, BOOST_PP_SEQ_REVERSE_S(89, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_89(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_89(op, st, BOOST_PP_SEQ_REVERSE_S(90, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_90(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_90(op, st, BOOST_PP_SEQ_REVERSE_S(91, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_91(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_91(op, st, BOOST_PP_SEQ_REVERSE_S(92, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_92(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_92(op, st, BOOST_PP_SEQ_REVERSE_S(93, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_93(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_93(op, st, BOOST_PP_SEQ_REVERSE_S(94, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_94(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_94(op, st, BOOST_PP_SEQ_REVERSE_S(95, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_95(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_95(op, st, BOOST_PP_SEQ_REVERSE_S(96, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_96(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_96(op, st, BOOST_PP_SEQ_REVERSE_S(97, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_97(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_97(op, st, BOOST_PP_SEQ_REVERSE_S(98, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_98(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_98(op, st, BOOST_PP_SEQ_REVERSE_S(99, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_99(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_99(op, st, BOOST_PP_SEQ_REVERSE_S(100, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_100(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_100(op, st, BOOST_PP_SEQ_REVERSE_S(101, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_101(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_101(op, st, BOOST_PP_SEQ_REVERSE_S(102, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_102(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_102(op, st, BOOST_PP_SEQ_REVERSE_S(103, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_103(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_103(op, st, BOOST_PP_SEQ_REVERSE_S(104, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_104(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_104(op, st, BOOST_PP_SEQ_REVERSE_S(105, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_105(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_105(op, st, BOOST_PP_SEQ_REVERSE_S(106, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_106(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_106(op, st, BOOST_PP_SEQ_REVERSE_S(107, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_107(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_107(op, st, BOOST_PP_SEQ_REVERSE_S(108, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_108(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_108(op, st, BOOST_PP_SEQ_REVERSE_S(109, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_109(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_109(op, st, BOOST_PP_SEQ_REVERSE_S(110, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_110(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_110(op, st, BOOST_PP_SEQ_REVERSE_S(111, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_111(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_111(op, st, BOOST_PP_SEQ_REVERSE_S(112, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_112(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_112(op, st, BOOST_PP_SEQ_REVERSE_S(113, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_113(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_113(op, st, BOOST_PP_SEQ_REVERSE_S(114, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_114(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_114(op, st, BOOST_PP_SEQ_REVERSE_S(115, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_115(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_115(op, st, BOOST_PP_SEQ_REVERSE_S(116, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_116(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_116(op, st, BOOST_PP_SEQ_REVERSE_S(117, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_117(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_117(op, st, BOOST_PP_SEQ_REVERSE_S(118, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_118(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_118(op, st, BOOST_PP_SEQ_REVERSE_S(119, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_119(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_119(op, st, BOOST_PP_SEQ_REVERSE_S(120, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_120(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_120(op, st, BOOST_PP_SEQ_REVERSE_S(121, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_121(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_121(op, st, BOOST_PP_SEQ_REVERSE_S(122, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_122(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_122(op, st, BOOST_PP_SEQ_REVERSE_S(123, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_123(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_123(op, st, BOOST_PP_SEQ_REVERSE_S(124, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_124(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_124(op, st, BOOST_PP_SEQ_REVERSE_S(125, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_125(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_125(op, st, BOOST_PP_SEQ_REVERSE_S(126, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_126(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_126(op, st, BOOST_PP_SEQ_REVERSE_S(127, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_127(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_127(op, st, BOOST_PP_SEQ_REVERSE_S(128, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_128(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_128(op, st, BOOST_PP_SEQ_REVERSE_S(129, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_129(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_129(op, st, BOOST_PP_SEQ_REVERSE_S(130, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_130(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_130(op, st, BOOST_PP_SEQ_REVERSE_S(131, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_131(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_131(op, st, BOOST_PP_SEQ_REVERSE_S(132, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_132(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_132(op, st, BOOST_PP_SEQ_REVERSE_S(133, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_133(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_133(op, st, BOOST_PP_SEQ_REVERSE_S(134, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_134(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_134(op, st, BOOST_PP_SEQ_REVERSE_S(135, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_135(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_135(op, st, BOOST_PP_SEQ_REVERSE_S(136, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_136(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_136(op, st, BOOST_PP_SEQ_REVERSE_S(137, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_137(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_137(op, st, BOOST_PP_SEQ_REVERSE_S(138, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_138(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_138(op, st, BOOST_PP_SEQ_REVERSE_S(139, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_139(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_139(op, st, BOOST_PP_SEQ_REVERSE_S(140, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_140(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_140(op, st, BOOST_PP_SEQ_REVERSE_S(141, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_141(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_141(op, st, BOOST_PP_SEQ_REVERSE_S(142, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_142(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_142(op, st, BOOST_PP_SEQ_REVERSE_S(143, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_143(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_143(op, st, BOOST_PP_SEQ_REVERSE_S(144, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_144(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_144(op, st, BOOST_PP_SEQ_REVERSE_S(145, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_145(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_145(op, st, BOOST_PP_SEQ_REVERSE_S(146, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_146(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_146(op, st, BOOST_PP_SEQ_REVERSE_S(147, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_147(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_147(op, st, BOOST_PP_SEQ_REVERSE_S(148, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_148(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_148(op, st, BOOST_PP_SEQ_REVERSE_S(149, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_149(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_149(op, st, BOOST_PP_SEQ_REVERSE_S(150, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_150(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_150(op, st, BOOST_PP_SEQ_REVERSE_S(151, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_151(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_151(op, st, BOOST_PP_SEQ_REVERSE_S(152, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_152(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_152(op, st, BOOST_PP_SEQ_REVERSE_S(153, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_153(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_153(op, st, BOOST_PP_SEQ_REVERSE_S(154, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_154(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_154(op, st, BOOST_PP_SEQ_REVERSE_S(155, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_155(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_155(op, st, BOOST_PP_SEQ_REVERSE_S(156, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_156(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_156(op, st, BOOST_PP_SEQ_REVERSE_S(157, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_157(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_157(op, st, BOOST_PP_SEQ_REVERSE_S(158, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_158(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_158(op, st, BOOST_PP_SEQ_REVERSE_S(159, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_159(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_159(op, st, BOOST_PP_SEQ_REVERSE_S(160, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_160(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_160(op, st, BOOST_PP_SEQ_REVERSE_S(161, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_161(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_161(op, st, BOOST_PP_SEQ_REVERSE_S(162, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_162(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_162(op, st, BOOST_PP_SEQ_REVERSE_S(163, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_163(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_163(op, st, BOOST_PP_SEQ_REVERSE_S(164, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_164(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_164(op, st, BOOST_PP_SEQ_REVERSE_S(165, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_165(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_165(op, st, BOOST_PP_SEQ_REVERSE_S(166, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_166(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_166(op, st, BOOST_PP_SEQ_REVERSE_S(167, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_167(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_167(op, st, BOOST_PP_SEQ_REVERSE_S(168, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_168(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_168(op, st, BOOST_PP_SEQ_REVERSE_S(169, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_169(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_169(op, st, BOOST_PP_SEQ_REVERSE_S(170, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_170(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_170(op, st, BOOST_PP_SEQ_REVERSE_S(171, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_171(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_171(op, st, BOOST_PP_SEQ_REVERSE_S(172, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_172(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_172(op, st, BOOST_PP_SEQ_REVERSE_S(173, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_173(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_173(op, st, BOOST_PP_SEQ_REVERSE_S(174, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_174(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_174(op, st, BOOST_PP_SEQ_REVERSE_S(175, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_175(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_175(op, st, BOOST_PP_SEQ_REVERSE_S(176, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_176(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_176(op, st, BOOST_PP_SEQ_REVERSE_S(177, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_177(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_177(op, st, BOOST_PP_SEQ_REVERSE_S(178, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_178(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_178(op, st, BOOST_PP_SEQ_REVERSE_S(179, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_179(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_179(op, st, BOOST_PP_SEQ_REVERSE_S(180, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_180(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_180(op, st, BOOST_PP_SEQ_REVERSE_S(181, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_181(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_181(op, st, BOOST_PP_SEQ_REVERSE_S(182, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_182(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_182(op, st, BOOST_PP_SEQ_REVERSE_S(183, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_183(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_183(op, st, BOOST_PP_SEQ_REVERSE_S(184, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_184(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_184(op, st, BOOST_PP_SEQ_REVERSE_S(185, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_185(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_185(op, st, BOOST_PP_SEQ_REVERSE_S(186, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_186(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_186(op, st, BOOST_PP_SEQ_REVERSE_S(187, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_187(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_187(op, st, BOOST_PP_SEQ_REVERSE_S(188, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_188(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_188(op, st, BOOST_PP_SEQ_REVERSE_S(189, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_189(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_189(op, st, BOOST_PP_SEQ_REVERSE_S(190, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_190(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_190(op, st, BOOST_PP_SEQ_REVERSE_S(191, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_191(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_191(op, st, BOOST_PP_SEQ_REVERSE_S(192, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_192(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_192(op, st, BOOST_PP_SEQ_REVERSE_S(193, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_193(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_193(op, st, BOOST_PP_SEQ_REVERSE_S(194, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_194(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_194(op, st, BOOST_PP_SEQ_REVERSE_S(195, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_195(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_195(op, st, BOOST_PP_SEQ_REVERSE_S(196, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_196(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_196(op, st, BOOST_PP_SEQ_REVERSE_S(197, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_197(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_197(op, st, BOOST_PP_SEQ_REVERSE_S(198, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_198(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_198(op, st, BOOST_PP_SEQ_REVERSE_S(199, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_199(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_199(op, st, BOOST_PP_SEQ_REVERSE_S(200, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_200(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_200(op, st, BOOST_PP_SEQ_REVERSE_S(201, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_201(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_201(op, st, BOOST_PP_SEQ_REVERSE_S(202, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_202(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_202(op, st, BOOST_PP_SEQ_REVERSE_S(203, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_203(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_203(op, st, BOOST_PP_SEQ_REVERSE_S(204, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_204(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_204(op, st, BOOST_PP_SEQ_REVERSE_S(205, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_205(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_205(op, st, BOOST_PP_SEQ_REVERSE_S(206, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_206(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_206(op, st, BOOST_PP_SEQ_REVERSE_S(207, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_207(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_207(op, st, BOOST_PP_SEQ_REVERSE_S(208, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_208(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_208(op, st, BOOST_PP_SEQ_REVERSE_S(209, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_209(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_209(op, st, BOOST_PP_SEQ_REVERSE_S(210, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_210(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_210(op, st, BOOST_PP_SEQ_REVERSE_S(211, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_211(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_211(op, st, BOOST_PP_SEQ_REVERSE_S(212, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_212(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_212(op, st, BOOST_PP_SEQ_REVERSE_S(213, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_213(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_213(op, st, BOOST_PP_SEQ_REVERSE_S(214, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_214(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_214(op, st, BOOST_PP_SEQ_REVERSE_S(215, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_215(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_215(op, st, BOOST_PP_SEQ_REVERSE_S(216, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_216(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_216(op, st, BOOST_PP_SEQ_REVERSE_S(217, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_217(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_217(op, st, BOOST_PP_SEQ_REVERSE_S(218, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_218(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_218(op, st, BOOST_PP_SEQ_REVERSE_S(219, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_219(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_219(op, st, BOOST_PP_SEQ_REVERSE_S(220, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_220(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_220(op, st, BOOST_PP_SEQ_REVERSE_S(221, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_221(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_221(op, st, BOOST_PP_SEQ_REVERSE_S(222, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_222(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_222(op, st, BOOST_PP_SEQ_REVERSE_S(223, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_223(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_223(op, st, BOOST_PP_SEQ_REVERSE_S(224, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_224(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_224(op, st, BOOST_PP_SEQ_REVERSE_S(225, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_225(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_225(op, st, BOOST_PP_SEQ_REVERSE_S(226, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_226(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_226(op, st, BOOST_PP_SEQ_REVERSE_S(227, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_227(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_227(op, st, BOOST_PP_SEQ_REVERSE_S(228, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_228(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_228(op, st, BOOST_PP_SEQ_REVERSE_S(229, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_229(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_229(op, st, BOOST_PP_SEQ_REVERSE_S(230, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_230(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_230(op, st, BOOST_PP_SEQ_REVERSE_S(231, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_231(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_231(op, st, BOOST_PP_SEQ_REVERSE_S(232, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_232(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_232(op, st, BOOST_PP_SEQ_REVERSE_S(233, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_233(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_233(op, st, BOOST_PP_SEQ_REVERSE_S(234, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_234(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_234(op, st, BOOST_PP_SEQ_REVERSE_S(235, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_235(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_235(op, st, BOOST_PP_SEQ_REVERSE_S(236, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_236(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_236(op, st, BOOST_PP_SEQ_REVERSE_S(237, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_237(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_237(op, st, BOOST_PP_SEQ_REVERSE_S(238, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_238(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_238(op, st, BOOST_PP_SEQ_REVERSE_S(239, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_239(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_239(op, st, BOOST_PP_SEQ_REVERSE_S(240, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_240(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_240(op, st, BOOST_PP_SEQ_REVERSE_S(241, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_241(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_241(op, st, BOOST_PP_SEQ_REVERSE_S(242, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_242(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_242(op, st, BOOST_PP_SEQ_REVERSE_S(243, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_243(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_243(op, st, BOOST_PP_SEQ_REVERSE_S(244, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_244(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_244(op, st, BOOST_PP_SEQ_REVERSE_S(245, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_245(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_245(op, st, BOOST_PP_SEQ_REVERSE_S(246, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_246(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_246(op, st, BOOST_PP_SEQ_REVERSE_S(247, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_247(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_247(op, st, BOOST_PP_SEQ_REVERSE_S(248, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_248(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_248(op, st, BOOST_PP_SEQ_REVERSE_S(249, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_249(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_249(op, st, BOOST_PP_SEQ_REVERSE_S(250, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_250(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_250(op, st, BOOST_PP_SEQ_REVERSE_S(251, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_251(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_251(op, st, BOOST_PP_SEQ_REVERSE_S(252, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_252(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_252(op, st, BOOST_PP_SEQ_REVERSE_S(253, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_253(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_253(op, st, BOOST_PP_SEQ_REVERSE_S(254, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_254(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_254(op, st, BOOST_PP_SEQ_REVERSE_S(255, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_255(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_255(op, st, BOOST_PP_SEQ_REVERSE_S(256, ss), BOOST_PP_SEQ_SIZE(ss)) -# define BOOST_PP_SEQ_FOLD_RIGHT_256(op, st, ss) BOOST_PP_SEQ_FOLD_LEFT_I_256(op, st, BOOST_PP_SEQ_REVERSE_S(257, ss), BOOST_PP_SEQ_SIZE(ss)) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/for_each.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/for_each.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP -# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_HPP -# -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FOR_EACH */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) -# else -# define BOOST_PP_SEQ_FOR_EACH(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) -# define BOOST_PP_SEQ_FOR_EACH_D(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(3, 2, x))) -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I x -# else -# define BOOST_PP_SEQ_FOR_EACH_O(r, x) BOOST_PP_SEQ_FOR_EACH_O_I(BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x)) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_O_I(macro, data, seq) (macro, data, BOOST_PP_SEQ_TAIL(seq)) -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_IM(r, BOOST_PP_TUPLE_REM_3 x) -# define BOOST_PP_SEQ_FOR_EACH_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_M_I(r, im) -# else -# define BOOST_PP_SEQ_FOR_EACH_M(r, x) BOOST_PP_SEQ_FOR_EACH_M_I(r, BOOST_PP_TUPLE_ELEM(3, 0, x), BOOST_PP_TUPLE_ELEM(3, 1, x), BOOST_PP_TUPLE_ELEM(3, 2, x)) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_M_I(r, macro, data, seq) macro(r, data, BOOST_PP_SEQ_HEAD(seq)) -# -# /* BOOST_PP_SEQ_FOR_EACH_R */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) -# else -# define BOOST_PP_SEQ_FOR_EACH_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) -# define BOOST_PP_SEQ_FOR_EACH_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil)), BOOST_PP_SEQ_FOR_EACH_P, BOOST_PP_SEQ_FOR_EACH_O, BOOST_PP_SEQ_FOR_EACH_M) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/for_each_i.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/for_each_i.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP -# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_I_HPP -# -# include -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FOR_EACH_I */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) -# else -# define BOOST_PP_SEQ_FOR_EACH_I(macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) -# define BOOST_PP_SEQ_FOR_EACH_I_I(macro, data, seq) BOOST_PP_FOR((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_I_P(r, x) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 2, x))) -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I x -# else -# define BOOST_PP_SEQ_FOR_EACH_I_O(r, x) BOOST_PP_SEQ_FOR_EACH_I_O_I(BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_I_O_I(macro, data, seq, i) (macro, data, BOOST_PP_SEQ_TAIL(seq), BOOST_PP_INC(i)) -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, BOOST_PP_TUPLE_REM_4 x) -# define BOOST_PP_SEQ_FOR_EACH_I_M_IM(r, im) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, im) -# else -# define BOOST_PP_SEQ_FOR_EACH_I_M(r, x) BOOST_PP_SEQ_FOR_EACH_I_M_I(r, BOOST_PP_TUPLE_ELEM(4, 0, x), BOOST_PP_TUPLE_ELEM(4, 1, x), BOOST_PP_TUPLE_ELEM(4, 2, x), BOOST_PP_TUPLE_ELEM(4, 3, x)) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_I_M_I(r, macro, data, seq, i) macro(r, data, i, BOOST_PP_SEQ_HEAD(seq)) -# -# /* BOOST_PP_SEQ_FOR_EACH_I_R */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) -# else -# define BOOST_PP_SEQ_FOR_EACH_I_R(r, macro, data, seq) BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) -# define BOOST_PP_SEQ_FOR_EACH_I_R_I(r, macro, data, seq) BOOST_PP_FOR_ ## r((macro, data, seq (nil), 0), BOOST_PP_SEQ_FOR_EACH_I_P, BOOST_PP_SEQ_FOR_EACH_I_O, BOOST_PP_SEQ_FOR_EACH_I_M) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/for_each_product.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/for_each_product.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_FOR_EACH_PRODUCT_HPP -# define BOOST_PREPROCESSOR_SEQ_FOR_EACH_PRODUCT_HPP -# -# include -# include -# include -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_FOR_EACH_PRODUCT */ -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT(macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(BOOST_PP_FOR, macro, sets) -# -# /* BOOST_PP_SEQ_FOR_EACH_PRODUCT_R */ -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_R(r, macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(BOOST_PP_FOR_ ## r, macro, sets) -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(impl, macro, sets) impl((BOOST_PP_SEQ_HEAD(sets)(nil), BOOST_PP_SEQ_TAIL(sets)(nil), (nil), macro), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0) -# else -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E(impl, macro, sets) BOOST_PP_SEQ_FOR_EACH_PRODUCT_E_I(impl, macro, sets) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_E_I(impl, macro, sets) impl((BOOST_PP_SEQ_HEAD(sets)(nil), BOOST_PP_SEQ_TAIL(sets)(nil), (nil), macro), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0) -# endif -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_P_I data -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P_I(cset, rset, res, macro) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(cset)) -# else -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_P(r, data) BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 0, data))) -# endif -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_O_I data -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O_I(cset, rset, res, macro) (BOOST_PP_SEQ_TAIL(cset), rset, res, macro) -# else -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_O(r, data) (BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(4, 0, data)), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, i) BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(BOOST_PP_TUPLE_ELEM(4, 1, data))), BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_ ## i, BOOST_PP_SEQ_FOR_EACH_PRODUCT_I) -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, BOOST_PP_TUPLE_ELEM(4, 0, data), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) -# else -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_IM(r, BOOST_PP_TUPLE_REM_4 data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_IM(r, im) BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, im) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_I_I(r, cset, rset, res, macro) macro(r, BOOST_PP_SEQ_TAIL(res (BOOST_PP_SEQ_HEAD(cset)))) -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I data -# else -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I(BOOST_PP_TUPLE_ELEM(4, 0, data), BOOST_PP_TUPLE_ELEM(4, 1, data), BOOST_PP_TUPLE_ELEM(4, 2, data), BOOST_PP_TUPLE_ELEM(4, 3, data)) -# endif -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_H_I(cset, rset, res, macro) (BOOST_PP_SEQ_HEAD(rset)(nil), BOOST_PP_SEQ_TAIL(rset), res (BOOST_PP_SEQ_HEAD(cset)), macro) -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_0(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 0)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_1(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 1)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_2(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 2)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_3(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 3)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_4(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 4)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_5(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 5)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_6(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 6)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_7(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 7)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_8(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 8)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_9(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 9)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_10(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 10)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_11(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 11)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_12(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 12)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_13(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 13)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_14(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 14)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_15(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 15)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_16(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 16)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_17(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 17)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_18(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 18)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_19(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 19)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_20(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 20)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_21(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 21)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_22(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 22)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_23(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 23)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_24(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 24)(r, data) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_25(r, data) BOOST_PP_SEQ_FOR_EACH_PRODUCT_C(data, 25)(r, data) -# -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_0(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_1) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_1(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_2) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_2(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_3) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_3(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_4) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_4(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_5) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_5(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_6) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_6(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_7) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_7(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_8) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_8(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_9) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_9(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_10) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_10(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_11) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_11(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_12) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_12(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_13) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_13(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_14) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_14(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_15) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_15(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_16) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_16(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_17) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_17(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_18) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_18(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_19) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_19(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_20) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_20(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_21) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_21(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_22) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_22(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_23) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_23(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_24) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_24(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_25) -# define BOOST_PP_SEQ_FOR_EACH_PRODUCT_N_25(r, data) BOOST_PP_FOR_ ## r(BOOST_PP_SEQ_FOR_EACH_PRODUCT_H(data), BOOST_PP_SEQ_FOR_EACH_PRODUCT_P, BOOST_PP_SEQ_FOR_EACH_PRODUCT_O, BOOST_PP_SEQ_FOR_EACH_PRODUCT_M_26) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/insert.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/insert.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_INSERT_HPP -# define BOOST_PREPROCESSOR_SEQ_INSERT_HPP -# -# include -# include -# include -# -# /* BOOST_PP_SEQ_INSERT */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) -# else -# define BOOST_PP_SEQ_INSERT(seq, i, elem) BOOST_PP_SEQ_INSERT_I(seq, i, elem) -# define BOOST_PP_SEQ_INSERT_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(i, seq) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/pop_back.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/pop_back.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP -# define BOOST_PREPROCESSOR_SEQ_POP_BACK_HPP -# -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_POP_BACK */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) -# else -# define BOOST_PP_SEQ_POP_BACK(seq) BOOST_PP_SEQ_POP_BACK_I(seq) -# define BOOST_PP_SEQ_POP_BACK_I(seq) BOOST_PP_SEQ_FIRST_N(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(seq)), seq) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/pop_front.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/pop_front.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP -# define BOOST_PREPROCESSOR_SEQ_POP_FRONT_HPP -# -# include -# include -# -# /* BOOST_PP_SEQ_POP_FRONT */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_TAIL(seq) -# else -# define BOOST_PP_SEQ_POP_FRONT(seq) BOOST_PP_SEQ_POP_FRONT_I(seq) -# define BOOST_PP_SEQ_POP_FRONT_I(seq) BOOST_PP_SEQ_TAIL(seq) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/push_back.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/push_back.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP -# define BOOST_PREPROCESSOR_SEQ_PUSH_BACK_HPP -# -# /* BOOST_PP_SEQ_PUSH_BACK */ -# -# define BOOST_PP_SEQ_PUSH_BACK(seq, elem) seq(elem) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/push_front.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/push_front.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP -# define BOOST_PREPROCESSOR_SEQ_PUSH_FRONT_HPP -# -# /* BOOST_PP_SEQ_PUSH_FRONT */ -# -# define BOOST_PP_SEQ_PUSH_FRONT(seq, elem) (elem)seq -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/remove.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/remove.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_REMOVE_HPP -# define BOOST_PREPROCESSOR_SEQ_REMOVE_HPP -# -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_REMOVE */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) -# else -# define BOOST_PP_SEQ_REMOVE(seq, i) BOOST_PP_SEQ_REMOVE_I(seq, i) -# define BOOST_PP_SEQ_REMOVE_I(seq, i) BOOST_PP_SEQ_FIRST_N(i, seq) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/replace.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/replace.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_REPLACE_HPP -# define BOOST_PREPROCESSOR_SEQ_REPLACE_HPP -# -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_REPLACE */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) -# else -# define BOOST_PP_SEQ_REPLACE(seq, i, elem) BOOST_PP_SEQ_REPLACE_I(seq, i, elem) -# define BOOST_PP_SEQ_REPLACE_I(seq, i, elem) BOOST_PP_SEQ_FIRST_N(i, seq) (elem) BOOST_PP_SEQ_REST_N(BOOST_PP_INC(i), seq) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/rest_n.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/rest_n.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_REST_N_HPP -# define BOOST_PREPROCESSOR_SEQ_REST_N_HPP -# -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_REST_N */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() -# else -# define BOOST_PP_SEQ_REST_N(n, seq) BOOST_PP_SEQ_REST_N_I(n, seq) -# define BOOST_PP_SEQ_REST_N_I(n, seq) BOOST_PP_TUPLE_ELEM(2, 1, BOOST_PP_SEQ_SPLIT(BOOST_PP_INC(n), (nil) seq BOOST_PP_EMPTY))() -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/seq.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/seq.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_SEQ_HPP -# define BOOST_PREPROCESSOR_SEQ_SEQ_HPP -# -# include -# include -# -# /* BOOST_PP_SEQ_HEAD */ -# -# define BOOST_PP_SEQ_HEAD(seq) BOOST_PP_SEQ_ELEM(0, seq) -# -# /* BOOST_PP_SEQ_TAIL */ -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_1((seq)) -# define BOOST_PP_SEQ_TAIL_1(par) BOOST_PP_SEQ_TAIL_2 ## par -# define BOOST_PP_SEQ_TAIL_2(seq) BOOST_PP_SEQ_TAIL_I ## seq -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_ID(BOOST_PP_SEQ_TAIL_I seq) -# define BOOST_PP_SEQ_TAIL_ID(id) id -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_D(seq) -# define BOOST_PP_SEQ_TAIL_D(seq) BOOST_PP_SEQ_TAIL_I seq -# else -# define BOOST_PP_SEQ_TAIL(seq) BOOST_PP_SEQ_TAIL_I seq -# endif -# -# define BOOST_PP_SEQ_TAIL_I(x) -# -# /* BOOST_PP_SEQ_NIL */ -# -# define BOOST_PP_SEQ_NIL(x) (x) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/to_tuple.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/to_tuple.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP -# define BOOST_PREPROCESSOR_SEQ_TO_TUPLE_HPP -# -# include -# include -# -# /* BOOST_PP_SEQ_TO_TUPLE */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_TO_TUPLE(seq) (BOOST_PP_SEQ_ENUM(seq)) -# else -# define BOOST_PP_SEQ_TO_TUPLE(seq) BOOST_PP_SEQ_TO_TUPLE_I(seq) -# define BOOST_PP_SEQ_TO_TUPLE_I(seq) (BOOST_PP_SEQ_ENUM(seq)) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/seq/transform.hpp --- a/epoc32/include/stdapis/boost/preprocessor/seq/transform.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP -# define BOOST_PREPROCESSOR_SEQ_TRANSFORM_HPP -# -# include -# include -# include -# include -# include -# -# /* BOOST_PP_SEQ_TRANSFORM */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) -# else -# define BOOST_PP_SEQ_TRANSFORM(op, data, seq) BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) -# define BOOST_PP_SEQ_TRANSFORM_I(op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) -# endif -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_STRICT() -# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_IM(s, BOOST_PP_TUPLE_REM_3 state, elem) -# define BOOST_PP_SEQ_TRANSFORM_O_IM(s, im, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, im, elem) -# else -# define BOOST_PP_SEQ_TRANSFORM_O(s, state, elem) BOOST_PP_SEQ_TRANSFORM_O_I(s, BOOST_PP_TUPLE_ELEM(3, 0, state), BOOST_PP_TUPLE_ELEM(3, 1, state), BOOST_PP_TUPLE_ELEM(3, 2, state), elem) -# endif -# -# define BOOST_PP_SEQ_TRANSFORM_O_I(s, op, data, res, elem) (op, data, res (op(s, data, elem))) -# -# /* BOOST_PP_SEQ_TRANSFORM_S */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_EDG() -# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) -# else -# define BOOST_PP_SEQ_TRANSFORM_S(s, op, data, seq) BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) -# define BOOST_PP_SEQ_TRANSFORM_S_I(s, op, data, seq) BOOST_PP_SEQ_TAIL(BOOST_PP_TUPLE_ELEM(3, 2, BOOST_PP_SEQ_FOLD_LEFT_ ## s(BOOST_PP_SEQ_TRANSFORM_O, (op, data, (nil)), seq))) -# endif -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/slot.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/slot.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,32 @@ +# /* ************************************************************************** +# * * +# * (C) Copyright Paul Mensonides 2002. +# * Distributed under the Boost Software License, Version 1.0. (See +# * accompanying file LICENSE_1_0.txt or copy at +# * http://www.boost.org/LICENSE_1_0.txt) +# * * +# ************************************************************************** */ +# +# /* See http://www.boost.org for most recent version. */ +# +# ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP +# define BOOST_PREPROCESSOR_SLOT_SLOT_HPP +# +# include +# include +# +# /* BOOST_PP_ASSIGN_SLOT */ +# +# define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) +# +# define BOOST_PP_ASSIGN_SLOT_1 +# define BOOST_PP_ASSIGN_SLOT_2 +# define BOOST_PP_ASSIGN_SLOT_3 +# define BOOST_PP_ASSIGN_SLOT_4 +# define BOOST_PP_ASSIGN_SLOT_5 +# +# /* BOOST_PP_SLOT */ +# +# define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() +# +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/slot/slot.hpp --- a/epoc32/include/stdapis/boost/preprocessor/slot/slot.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# /* ************************************************************************** -# * * -# * (C) Copyright Paul Mensonides 2002. -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# * * -# ************************************************************************** */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_SLOT_SLOT_HPP -# define BOOST_PREPROCESSOR_SLOT_SLOT_HPP -# -# include -# include -# -# /* BOOST_PP_ASSIGN_SLOT */ -# -# define BOOST_PP_ASSIGN_SLOT(i) BOOST_PP_CAT(BOOST_PP_ASSIGN_SLOT_, i) -# -# define BOOST_PP_ASSIGN_SLOT_1 -# define BOOST_PP_ASSIGN_SLOT_2 -# define BOOST_PP_ASSIGN_SLOT_3 -# define BOOST_PP_ASSIGN_SLOT_4 -# define BOOST_PP_ASSIGN_SLOT_5 -# -# /* BOOST_PP_SLOT */ -# -# define BOOST_PP_SLOT(i) BOOST_PP_CAT(BOOST_PP_SLOT_, i)() -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/tuple.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/preprocessor/tuple.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,90 @@ +// tuple.hpp - Boost Tuple Library -------------------------------------- + +// Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// For more information, see http://www.boost.org + +// ----------------------------------------------------------------- + +#ifndef BOOST_TUPLE_HPP +#define BOOST_TUPLE_HPP + +#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 +// Work around a compiler bug. +// boost::python::tuple has to be seen by the compiler before the +// boost::tuple class template. +namespace boost { namespace python { class tuple; }} +#endif + +#include "boost/config.hpp" +#include "boost/static_assert.hpp" + +#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// The MSVC version +#include "boost/tuple/detail/tuple_basic_no_partial_spec.hpp" + +#else +// other compilers +#include "boost/ref.hpp" +#include "boost/tuple/detail/tuple_basic.hpp" + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +namespace boost { + +using tuples::tuple; +using tuples::make_tuple; +using tuples::tie; +#if !defined(BOOST_NO_USING_TEMPLATE) +using tuples::get; +#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +// +// The "using tuples::get" statement causes the +// Borland compiler to ICE, use forwarding +// functions instead: +// +template +inline typename tuples::access_traits< + typename tuples::element >::type + >::non_const_type +get(tuples::cons& c) { + return tuples::get(c); +} +// get function for const cons-lists, returns a const reference to +// the element. If the element is a reference, returns the reference +// as such (that is, can return a non-const reference) +template +inline typename tuples::access_traits< + typename tuples::element >::type + >::const_type +get(const tuples::cons& c) { + return tuples::get(c); +} +#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +// +// MSVC, using declarations don't mix with templates well, +// so use forwarding functions instead: +// +template +typename tuples::detail::element_ref >::RET +get(tuples::cons& t, tuples::detail::workaround_holder* = 0) +{ + return tuples::detail::get_class::get(t); +} + +template +typename tuples::detail::element_const_ref >::RET +get(const tuples::cons& t, tuples::detail::workaround_holder* = 0) +{ + return tuples::detail::get_class::get(t); +} +#endif // BOOST_NO_USING_TEMPLATE + +} // end namespace boost + + +#endif // BOOST_TUPLE_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/tuple/elem.hpp --- a/epoc32/include/stdapis/boost/preprocessor/tuple/elem.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,385 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_TUPLE_ELEM_HPP -# define BOOST_PREPROCESSOR_TUPLE_ELEM_HPP -# -# include -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_I(size, index, tuple) -# else -# define BOOST_PP_TUPLE_ELEM(size, index, tuple) BOOST_PP_TUPLE_ELEM_OO((size, index, tuple)) -# define BOOST_PP_TUPLE_ELEM_OO(par) BOOST_PP_TUPLE_ELEM_I ## par -# endif -# -# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i ## t -# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_II(BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i t) -# define BOOST_PP_TUPLE_ELEM_II(res) res -# else -# define BOOST_PP_TUPLE_ELEM_I(s, i, t) BOOST_PP_TUPLE_ELEM_ ## s ## _ ## i t -# endif -# -# define BOOST_PP_TUPLE_ELEM_1_0(a) a -# -# define BOOST_PP_TUPLE_ELEM_2_0(a, b) a -# define BOOST_PP_TUPLE_ELEM_2_1(a, b) b -# -# define BOOST_PP_TUPLE_ELEM_3_0(a, b, c) a -# define BOOST_PP_TUPLE_ELEM_3_1(a, b, c) b -# define BOOST_PP_TUPLE_ELEM_3_2(a, b, c) c -# -# define BOOST_PP_TUPLE_ELEM_4_0(a, b, c, d) a -# define BOOST_PP_TUPLE_ELEM_4_1(a, b, c, d) b -# define BOOST_PP_TUPLE_ELEM_4_2(a, b, c, d) c -# define BOOST_PP_TUPLE_ELEM_4_3(a, b, c, d) d -# -# define BOOST_PP_TUPLE_ELEM_5_0(a, b, c, d, e) a -# define BOOST_PP_TUPLE_ELEM_5_1(a, b, c, d, e) b -# define BOOST_PP_TUPLE_ELEM_5_2(a, b, c, d, e) c -# define BOOST_PP_TUPLE_ELEM_5_3(a, b, c, d, e) d -# define BOOST_PP_TUPLE_ELEM_5_4(a, b, c, d, e) e -# -# define BOOST_PP_TUPLE_ELEM_6_0(a, b, c, d, e, f) a -# define BOOST_PP_TUPLE_ELEM_6_1(a, b, c, d, e, f) b -# define BOOST_PP_TUPLE_ELEM_6_2(a, b, c, d, e, f) c -# define BOOST_PP_TUPLE_ELEM_6_3(a, b, c, d, e, f) d -# define BOOST_PP_TUPLE_ELEM_6_4(a, b, c, d, e, f) e -# define BOOST_PP_TUPLE_ELEM_6_5(a, b, c, d, e, f) f -# -# define BOOST_PP_TUPLE_ELEM_7_0(a, b, c, d, e, f, g) a -# define BOOST_PP_TUPLE_ELEM_7_1(a, b, c, d, e, f, g) b -# define BOOST_PP_TUPLE_ELEM_7_2(a, b, c, d, e, f, g) c -# define BOOST_PP_TUPLE_ELEM_7_3(a, b, c, d, e, f, g) d -# define BOOST_PP_TUPLE_ELEM_7_4(a, b, c, d, e, f, g) e -# define BOOST_PP_TUPLE_ELEM_7_5(a, b, c, d, e, f, g) f -# define BOOST_PP_TUPLE_ELEM_7_6(a, b, c, d, e, f, g) g -# -# define BOOST_PP_TUPLE_ELEM_8_0(a, b, c, d, e, f, g, h) a -# define BOOST_PP_TUPLE_ELEM_8_1(a, b, c, d, e, f, g, h) b -# define BOOST_PP_TUPLE_ELEM_8_2(a, b, c, d, e, f, g, h) c -# define BOOST_PP_TUPLE_ELEM_8_3(a, b, c, d, e, f, g, h) d -# define BOOST_PP_TUPLE_ELEM_8_4(a, b, c, d, e, f, g, h) e -# define BOOST_PP_TUPLE_ELEM_8_5(a, b, c, d, e, f, g, h) f -# define BOOST_PP_TUPLE_ELEM_8_6(a, b, c, d, e, f, g, h) g -# define BOOST_PP_TUPLE_ELEM_8_7(a, b, c, d, e, f, g, h) h -# -# define BOOST_PP_TUPLE_ELEM_9_0(a, b, c, d, e, f, g, h, i) a -# define BOOST_PP_TUPLE_ELEM_9_1(a, b, c, d, e, f, g, h, i) b -# define BOOST_PP_TUPLE_ELEM_9_2(a, b, c, d, e, f, g, h, i) c -# define BOOST_PP_TUPLE_ELEM_9_3(a, b, c, d, e, f, g, h, i) d -# define BOOST_PP_TUPLE_ELEM_9_4(a, b, c, d, e, f, g, h, i) e -# define BOOST_PP_TUPLE_ELEM_9_5(a, b, c, d, e, f, g, h, i) f -# define BOOST_PP_TUPLE_ELEM_9_6(a, b, c, d, e, f, g, h, i) g -# define BOOST_PP_TUPLE_ELEM_9_7(a, b, c, d, e, f, g, h, i) h -# define BOOST_PP_TUPLE_ELEM_9_8(a, b, c, d, e, f, g, h, i) i -# -# define BOOST_PP_TUPLE_ELEM_10_0(a, b, c, d, e, f, g, h, i, j) a -# define BOOST_PP_TUPLE_ELEM_10_1(a, b, c, d, e, f, g, h, i, j) b -# define BOOST_PP_TUPLE_ELEM_10_2(a, b, c, d, e, f, g, h, i, j) c -# define BOOST_PP_TUPLE_ELEM_10_3(a, b, c, d, e, f, g, h, i, j) d -# define BOOST_PP_TUPLE_ELEM_10_4(a, b, c, d, e, f, g, h, i, j) e -# define BOOST_PP_TUPLE_ELEM_10_5(a, b, c, d, e, f, g, h, i, j) f -# define BOOST_PP_TUPLE_ELEM_10_6(a, b, c, d, e, f, g, h, i, j) g -# define BOOST_PP_TUPLE_ELEM_10_7(a, b, c, d, e, f, g, h, i, j) h -# define BOOST_PP_TUPLE_ELEM_10_8(a, b, c, d, e, f, g, h, i, j) i -# define BOOST_PP_TUPLE_ELEM_10_9(a, b, c, d, e, f, g, h, i, j) j -# -# define BOOST_PP_TUPLE_ELEM_11_0(a, b, c, d, e, f, g, h, i, j, k) a -# define BOOST_PP_TUPLE_ELEM_11_1(a, b, c, d, e, f, g, h, i, j, k) b -# define BOOST_PP_TUPLE_ELEM_11_2(a, b, c, d, e, f, g, h, i, j, k) c -# define BOOST_PP_TUPLE_ELEM_11_3(a, b, c, d, e, f, g, h, i, j, k) d -# define BOOST_PP_TUPLE_ELEM_11_4(a, b, c, d, e, f, g, h, i, j, k) e -# define BOOST_PP_TUPLE_ELEM_11_5(a, b, c, d, e, f, g, h, i, j, k) f -# define BOOST_PP_TUPLE_ELEM_11_6(a, b, c, d, e, f, g, h, i, j, k) g -# define BOOST_PP_TUPLE_ELEM_11_7(a, b, c, d, e, f, g, h, i, j, k) h -# define BOOST_PP_TUPLE_ELEM_11_8(a, b, c, d, e, f, g, h, i, j, k) i -# define BOOST_PP_TUPLE_ELEM_11_9(a, b, c, d, e, f, g, h, i, j, k) j -# define BOOST_PP_TUPLE_ELEM_11_10(a, b, c, d, e, f, g, h, i, j, k) k -# -# define BOOST_PP_TUPLE_ELEM_12_0(a, b, c, d, e, f, g, h, i, j, k, l) a -# define BOOST_PP_TUPLE_ELEM_12_1(a, b, c, d, e, f, g, h, i, j, k, l) b -# define BOOST_PP_TUPLE_ELEM_12_2(a, b, c, d, e, f, g, h, i, j, k, l) c -# define BOOST_PP_TUPLE_ELEM_12_3(a, b, c, d, e, f, g, h, i, j, k, l) d -# define BOOST_PP_TUPLE_ELEM_12_4(a, b, c, d, e, f, g, h, i, j, k, l) e -# define BOOST_PP_TUPLE_ELEM_12_5(a, b, c, d, e, f, g, h, i, j, k, l) f -# define BOOST_PP_TUPLE_ELEM_12_6(a, b, c, d, e, f, g, h, i, j, k, l) g -# define BOOST_PP_TUPLE_ELEM_12_7(a, b, c, d, e, f, g, h, i, j, k, l) h -# define BOOST_PP_TUPLE_ELEM_12_8(a, b, c, d, e, f, g, h, i, j, k, l) i -# define BOOST_PP_TUPLE_ELEM_12_9(a, b, c, d, e, f, g, h, i, j, k, l) j -# define BOOST_PP_TUPLE_ELEM_12_10(a, b, c, d, e, f, g, h, i, j, k, l) k -# define BOOST_PP_TUPLE_ELEM_12_11(a, b, c, d, e, f, g, h, i, j, k, l) l -# -# define BOOST_PP_TUPLE_ELEM_13_0(a, b, c, d, e, f, g, h, i, j, k, l, m) a -# define BOOST_PP_TUPLE_ELEM_13_1(a, b, c, d, e, f, g, h, i, j, k, l, m) b -# define BOOST_PP_TUPLE_ELEM_13_2(a, b, c, d, e, f, g, h, i, j, k, l, m) c -# define BOOST_PP_TUPLE_ELEM_13_3(a, b, c, d, e, f, g, h, i, j, k, l, m) d -# define BOOST_PP_TUPLE_ELEM_13_4(a, b, c, d, e, f, g, h, i, j, k, l, m) e -# define BOOST_PP_TUPLE_ELEM_13_5(a, b, c, d, e, f, g, h, i, j, k, l, m) f -# define BOOST_PP_TUPLE_ELEM_13_6(a, b, c, d, e, f, g, h, i, j, k, l, m) g -# define BOOST_PP_TUPLE_ELEM_13_7(a, b, c, d, e, f, g, h, i, j, k, l, m) h -# define BOOST_PP_TUPLE_ELEM_13_8(a, b, c, d, e, f, g, h, i, j, k, l, m) i -# define BOOST_PP_TUPLE_ELEM_13_9(a, b, c, d, e, f, g, h, i, j, k, l, m) j -# define BOOST_PP_TUPLE_ELEM_13_10(a, b, c, d, e, f, g, h, i, j, k, l, m) k -# define BOOST_PP_TUPLE_ELEM_13_11(a, b, c, d, e, f, g, h, i, j, k, l, m) l -# define BOOST_PP_TUPLE_ELEM_13_12(a, b, c, d, e, f, g, h, i, j, k, l, m) m -# -# define BOOST_PP_TUPLE_ELEM_14_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n) a -# define BOOST_PP_TUPLE_ELEM_14_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n) b -# define BOOST_PP_TUPLE_ELEM_14_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n) c -# define BOOST_PP_TUPLE_ELEM_14_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n) d -# define BOOST_PP_TUPLE_ELEM_14_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n) e -# define BOOST_PP_TUPLE_ELEM_14_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n) f -# define BOOST_PP_TUPLE_ELEM_14_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n) g -# define BOOST_PP_TUPLE_ELEM_14_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n) h -# define BOOST_PP_TUPLE_ELEM_14_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n) i -# define BOOST_PP_TUPLE_ELEM_14_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n) j -# define BOOST_PP_TUPLE_ELEM_14_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n) k -# define BOOST_PP_TUPLE_ELEM_14_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n) l -# define BOOST_PP_TUPLE_ELEM_14_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n) m -# define BOOST_PP_TUPLE_ELEM_14_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n) n -# -# define BOOST_PP_TUPLE_ELEM_15_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) a -# define BOOST_PP_TUPLE_ELEM_15_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) b -# define BOOST_PP_TUPLE_ELEM_15_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) c -# define BOOST_PP_TUPLE_ELEM_15_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) d -# define BOOST_PP_TUPLE_ELEM_15_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) e -# define BOOST_PP_TUPLE_ELEM_15_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) f -# define BOOST_PP_TUPLE_ELEM_15_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) g -# define BOOST_PP_TUPLE_ELEM_15_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) h -# define BOOST_PP_TUPLE_ELEM_15_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) i -# define BOOST_PP_TUPLE_ELEM_15_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) j -# define BOOST_PP_TUPLE_ELEM_15_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) k -# define BOOST_PP_TUPLE_ELEM_15_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) l -# define BOOST_PP_TUPLE_ELEM_15_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) m -# define BOOST_PP_TUPLE_ELEM_15_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) n -# define BOOST_PP_TUPLE_ELEM_15_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) o -# -# define BOOST_PP_TUPLE_ELEM_16_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) a -# define BOOST_PP_TUPLE_ELEM_16_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) b -# define BOOST_PP_TUPLE_ELEM_16_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) c -# define BOOST_PP_TUPLE_ELEM_16_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) d -# define BOOST_PP_TUPLE_ELEM_16_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) e -# define BOOST_PP_TUPLE_ELEM_16_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) f -# define BOOST_PP_TUPLE_ELEM_16_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) g -# define BOOST_PP_TUPLE_ELEM_16_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) h -# define BOOST_PP_TUPLE_ELEM_16_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) i -# define BOOST_PP_TUPLE_ELEM_16_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) j -# define BOOST_PP_TUPLE_ELEM_16_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) k -# define BOOST_PP_TUPLE_ELEM_16_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) l -# define BOOST_PP_TUPLE_ELEM_16_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) m -# define BOOST_PP_TUPLE_ELEM_16_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) n -# define BOOST_PP_TUPLE_ELEM_16_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) o -# define BOOST_PP_TUPLE_ELEM_16_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) p -# -# define BOOST_PP_TUPLE_ELEM_17_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) a -# define BOOST_PP_TUPLE_ELEM_17_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) b -# define BOOST_PP_TUPLE_ELEM_17_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) c -# define BOOST_PP_TUPLE_ELEM_17_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) d -# define BOOST_PP_TUPLE_ELEM_17_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) e -# define BOOST_PP_TUPLE_ELEM_17_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) f -# define BOOST_PP_TUPLE_ELEM_17_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) g -# define BOOST_PP_TUPLE_ELEM_17_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) h -# define BOOST_PP_TUPLE_ELEM_17_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) i -# define BOOST_PP_TUPLE_ELEM_17_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) j -# define BOOST_PP_TUPLE_ELEM_17_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) k -# define BOOST_PP_TUPLE_ELEM_17_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) l -# define BOOST_PP_TUPLE_ELEM_17_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) m -# define BOOST_PP_TUPLE_ELEM_17_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) n -# define BOOST_PP_TUPLE_ELEM_17_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) o -# define BOOST_PP_TUPLE_ELEM_17_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) p -# define BOOST_PP_TUPLE_ELEM_17_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) q -# -# define BOOST_PP_TUPLE_ELEM_18_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) a -# define BOOST_PP_TUPLE_ELEM_18_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) b -# define BOOST_PP_TUPLE_ELEM_18_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) c -# define BOOST_PP_TUPLE_ELEM_18_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) d -# define BOOST_PP_TUPLE_ELEM_18_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) e -# define BOOST_PP_TUPLE_ELEM_18_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) f -# define BOOST_PP_TUPLE_ELEM_18_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) g -# define BOOST_PP_TUPLE_ELEM_18_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) h -# define BOOST_PP_TUPLE_ELEM_18_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) i -# define BOOST_PP_TUPLE_ELEM_18_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) j -# define BOOST_PP_TUPLE_ELEM_18_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) k -# define BOOST_PP_TUPLE_ELEM_18_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) l -# define BOOST_PP_TUPLE_ELEM_18_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) m -# define BOOST_PP_TUPLE_ELEM_18_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) n -# define BOOST_PP_TUPLE_ELEM_18_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) o -# define BOOST_PP_TUPLE_ELEM_18_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) p -# define BOOST_PP_TUPLE_ELEM_18_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) q -# define BOOST_PP_TUPLE_ELEM_18_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) r -# -# define BOOST_PP_TUPLE_ELEM_19_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) a -# define BOOST_PP_TUPLE_ELEM_19_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) b -# define BOOST_PP_TUPLE_ELEM_19_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) c -# define BOOST_PP_TUPLE_ELEM_19_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) d -# define BOOST_PP_TUPLE_ELEM_19_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) e -# define BOOST_PP_TUPLE_ELEM_19_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) f -# define BOOST_PP_TUPLE_ELEM_19_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) g -# define BOOST_PP_TUPLE_ELEM_19_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) h -# define BOOST_PP_TUPLE_ELEM_19_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) i -# define BOOST_PP_TUPLE_ELEM_19_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) j -# define BOOST_PP_TUPLE_ELEM_19_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) k -# define BOOST_PP_TUPLE_ELEM_19_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) l -# define BOOST_PP_TUPLE_ELEM_19_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) m -# define BOOST_PP_TUPLE_ELEM_19_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) n -# define BOOST_PP_TUPLE_ELEM_19_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) o -# define BOOST_PP_TUPLE_ELEM_19_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) p -# define BOOST_PP_TUPLE_ELEM_19_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) q -# define BOOST_PP_TUPLE_ELEM_19_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) r -# define BOOST_PP_TUPLE_ELEM_19_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) s -# -# define BOOST_PP_TUPLE_ELEM_20_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) a -# define BOOST_PP_TUPLE_ELEM_20_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) b -# define BOOST_PP_TUPLE_ELEM_20_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) c -# define BOOST_PP_TUPLE_ELEM_20_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) d -# define BOOST_PP_TUPLE_ELEM_20_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) e -# define BOOST_PP_TUPLE_ELEM_20_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) f -# define BOOST_PP_TUPLE_ELEM_20_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) g -# define BOOST_PP_TUPLE_ELEM_20_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) h -# define BOOST_PP_TUPLE_ELEM_20_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) i -# define BOOST_PP_TUPLE_ELEM_20_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) j -# define BOOST_PP_TUPLE_ELEM_20_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) k -# define BOOST_PP_TUPLE_ELEM_20_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) l -# define BOOST_PP_TUPLE_ELEM_20_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) m -# define BOOST_PP_TUPLE_ELEM_20_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) n -# define BOOST_PP_TUPLE_ELEM_20_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) o -# define BOOST_PP_TUPLE_ELEM_20_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) p -# define BOOST_PP_TUPLE_ELEM_20_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) q -# define BOOST_PP_TUPLE_ELEM_20_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) r -# define BOOST_PP_TUPLE_ELEM_20_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) s -# define BOOST_PP_TUPLE_ELEM_20_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) t -# -# define BOOST_PP_TUPLE_ELEM_21_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) a -# define BOOST_PP_TUPLE_ELEM_21_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) b -# define BOOST_PP_TUPLE_ELEM_21_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) c -# define BOOST_PP_TUPLE_ELEM_21_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) d -# define BOOST_PP_TUPLE_ELEM_21_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) e -# define BOOST_PP_TUPLE_ELEM_21_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) f -# define BOOST_PP_TUPLE_ELEM_21_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) g -# define BOOST_PP_TUPLE_ELEM_21_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) h -# define BOOST_PP_TUPLE_ELEM_21_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) i -# define BOOST_PP_TUPLE_ELEM_21_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) j -# define BOOST_PP_TUPLE_ELEM_21_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) k -# define BOOST_PP_TUPLE_ELEM_21_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) l -# define BOOST_PP_TUPLE_ELEM_21_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) m -# define BOOST_PP_TUPLE_ELEM_21_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) n -# define BOOST_PP_TUPLE_ELEM_21_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) o -# define BOOST_PP_TUPLE_ELEM_21_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) p -# define BOOST_PP_TUPLE_ELEM_21_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) q -# define BOOST_PP_TUPLE_ELEM_21_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) r -# define BOOST_PP_TUPLE_ELEM_21_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) s -# define BOOST_PP_TUPLE_ELEM_21_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) t -# define BOOST_PP_TUPLE_ELEM_21_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) u -# -# define BOOST_PP_TUPLE_ELEM_22_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) a -# define BOOST_PP_TUPLE_ELEM_22_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) b -# define BOOST_PP_TUPLE_ELEM_22_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) c -# define BOOST_PP_TUPLE_ELEM_22_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) d -# define BOOST_PP_TUPLE_ELEM_22_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) e -# define BOOST_PP_TUPLE_ELEM_22_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) f -# define BOOST_PP_TUPLE_ELEM_22_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) g -# define BOOST_PP_TUPLE_ELEM_22_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) h -# define BOOST_PP_TUPLE_ELEM_22_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) i -# define BOOST_PP_TUPLE_ELEM_22_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) j -# define BOOST_PP_TUPLE_ELEM_22_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) k -# define BOOST_PP_TUPLE_ELEM_22_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) l -# define BOOST_PP_TUPLE_ELEM_22_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) m -# define BOOST_PP_TUPLE_ELEM_22_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) n -# define BOOST_PP_TUPLE_ELEM_22_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) o -# define BOOST_PP_TUPLE_ELEM_22_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) p -# define BOOST_PP_TUPLE_ELEM_22_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) q -# define BOOST_PP_TUPLE_ELEM_22_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) r -# define BOOST_PP_TUPLE_ELEM_22_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) s -# define BOOST_PP_TUPLE_ELEM_22_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) t -# define BOOST_PP_TUPLE_ELEM_22_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) u -# define BOOST_PP_TUPLE_ELEM_22_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) v -# -# define BOOST_PP_TUPLE_ELEM_23_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) a -# define BOOST_PP_TUPLE_ELEM_23_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) b -# define BOOST_PP_TUPLE_ELEM_23_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) c -# define BOOST_PP_TUPLE_ELEM_23_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) d -# define BOOST_PP_TUPLE_ELEM_23_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) e -# define BOOST_PP_TUPLE_ELEM_23_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) f -# define BOOST_PP_TUPLE_ELEM_23_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) g -# define BOOST_PP_TUPLE_ELEM_23_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) h -# define BOOST_PP_TUPLE_ELEM_23_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) i -# define BOOST_PP_TUPLE_ELEM_23_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) j -# define BOOST_PP_TUPLE_ELEM_23_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) k -# define BOOST_PP_TUPLE_ELEM_23_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) l -# define BOOST_PP_TUPLE_ELEM_23_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) m -# define BOOST_PP_TUPLE_ELEM_23_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) n -# define BOOST_PP_TUPLE_ELEM_23_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) o -# define BOOST_PP_TUPLE_ELEM_23_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) p -# define BOOST_PP_TUPLE_ELEM_23_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) q -# define BOOST_PP_TUPLE_ELEM_23_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) r -# define BOOST_PP_TUPLE_ELEM_23_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) s -# define BOOST_PP_TUPLE_ELEM_23_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) t -# define BOOST_PP_TUPLE_ELEM_23_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) u -# define BOOST_PP_TUPLE_ELEM_23_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) v -# define BOOST_PP_TUPLE_ELEM_23_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) w -# -# define BOOST_PP_TUPLE_ELEM_24_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) a -# define BOOST_PP_TUPLE_ELEM_24_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) b -# define BOOST_PP_TUPLE_ELEM_24_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) c -# define BOOST_PP_TUPLE_ELEM_24_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) d -# define BOOST_PP_TUPLE_ELEM_24_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) e -# define BOOST_PP_TUPLE_ELEM_24_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) f -# define BOOST_PP_TUPLE_ELEM_24_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) g -# define BOOST_PP_TUPLE_ELEM_24_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) h -# define BOOST_PP_TUPLE_ELEM_24_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) i -# define BOOST_PP_TUPLE_ELEM_24_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) j -# define BOOST_PP_TUPLE_ELEM_24_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) k -# define BOOST_PP_TUPLE_ELEM_24_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) l -# define BOOST_PP_TUPLE_ELEM_24_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) m -# define BOOST_PP_TUPLE_ELEM_24_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) n -# define BOOST_PP_TUPLE_ELEM_24_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) o -# define BOOST_PP_TUPLE_ELEM_24_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) p -# define BOOST_PP_TUPLE_ELEM_24_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) q -# define BOOST_PP_TUPLE_ELEM_24_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) r -# define BOOST_PP_TUPLE_ELEM_24_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) s -# define BOOST_PP_TUPLE_ELEM_24_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) t -# define BOOST_PP_TUPLE_ELEM_24_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) u -# define BOOST_PP_TUPLE_ELEM_24_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) v -# define BOOST_PP_TUPLE_ELEM_24_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) w -# define BOOST_PP_TUPLE_ELEM_24_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) x -# -# define BOOST_PP_TUPLE_ELEM_25_0(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) a -# define BOOST_PP_TUPLE_ELEM_25_1(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) b -# define BOOST_PP_TUPLE_ELEM_25_2(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) c -# define BOOST_PP_TUPLE_ELEM_25_3(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) d -# define BOOST_PP_TUPLE_ELEM_25_4(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) e -# define BOOST_PP_TUPLE_ELEM_25_5(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) f -# define BOOST_PP_TUPLE_ELEM_25_6(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) g -# define BOOST_PP_TUPLE_ELEM_25_7(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) h -# define BOOST_PP_TUPLE_ELEM_25_8(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) i -# define BOOST_PP_TUPLE_ELEM_25_9(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) j -# define BOOST_PP_TUPLE_ELEM_25_10(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) k -# define BOOST_PP_TUPLE_ELEM_25_11(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) l -# define BOOST_PP_TUPLE_ELEM_25_12(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) m -# define BOOST_PP_TUPLE_ELEM_25_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) n -# define BOOST_PP_TUPLE_ELEM_25_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) o -# define BOOST_PP_TUPLE_ELEM_25_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) p -# define BOOST_PP_TUPLE_ELEM_25_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) q -# define BOOST_PP_TUPLE_ELEM_25_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) r -# define BOOST_PP_TUPLE_ELEM_25_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) s -# define BOOST_PP_TUPLE_ELEM_25_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) t -# define BOOST_PP_TUPLE_ELEM_25_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) u -# define BOOST_PP_TUPLE_ELEM_25_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) v -# define BOOST_PP_TUPLE_ELEM_25_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) w -# define BOOST_PP_TUPLE_ELEM_25_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) x -# define BOOST_PP_TUPLE_ELEM_25_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) y -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/preprocessor/tuple/reverse.hpp --- a/epoc32/include/stdapis/boost/preprocessor/tuple/reverse.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -# /* Copyright (C) 2001 -# * Housemarque Oy -# * http://www.housemarque.com -# * -# * Distributed under the Boost Software License, Version 1.0. (See -# * accompanying file LICENSE_1_0.txt or copy at -# * http://www.boost.org/LICENSE_1_0.txt) -# */ -# -# /* Revised by Paul Mensonides (2002) */ -# -# /* See http://www.boost.org for most recent version. */ -# -# ifndef BOOST_PREPROCESSOR_TUPLE_REVERSE_HPP -# define BOOST_PREPROCESSOR_TUPLE_REVERSE_HPP -# -# include -# -# /* BOOST_PP_TUPLE_REVERSE */ -# -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC() -# define BOOST_PP_TUPLE_REVERSE(size, tuple) BOOST_PP_TUPLE_REVERSE_I(size, tuple) -# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC() -# define BOOST_PP_TUPLE_REVERSE_I(s, t) BOOST_PP_TUPLE_REVERSE_ ## s t -# else -# define BOOST_PP_TUPLE_REVERSE_I(s, t) BOOST_PP_TUPLE_REVERSE_II(BOOST_PP_TUPLE_REVERSE_ ## s t) -# define BOOST_PP_TUPLE_REVERSE_II(res) res -# endif -# else -# define BOOST_PP_TUPLE_REVERSE(size, tuple) BOOST_PP_TUPLE_REVERSE_OO((size, tuple)) -# define BOOST_PP_TUPLE_REVERSE_OO(par) BOOST_PP_TUPLE_REVERSE_I ## par -# define BOOST_PP_TUPLE_REVERSE_I(s, t) BOOST_PP_TUPLE_REVERSE_ ## s ## t -# endif -# -# define BOOST_PP_TUPLE_REVERSE_0() () -# define BOOST_PP_TUPLE_REVERSE_1(a) (a) -# define BOOST_PP_TUPLE_REVERSE_2(a, b) (b, a) -# define BOOST_PP_TUPLE_REVERSE_3(a, b, c) (c, b, a) -# define BOOST_PP_TUPLE_REVERSE_4(a, b, c, d) (d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_5(a, b, c, d, e) (e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_6(a, b, c, d, e, f) (f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_7(a, b, c, d, e, f, g) (g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_8(a, b, c, d, e, f, g, h) (h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_9(a, b, c, d, e, f, g, h, i) (i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_10(a, b, c, d, e, f, g, h, i, j) (j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_11(a, b, c, d, e, f, g, h, i, j, k) (k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_12(a, b, c, d, e, f, g, h, i, j, k, l) (l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_13(a, b, c, d, e, f, g, h, i, j, k, l, m) (m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n) (n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_15(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) (o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_16(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p) (p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_17(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) (q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_18(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r) (r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_19(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s) (s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_20(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) (t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_21(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) (u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_22(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) (v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_23(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w) (w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_24(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x) (x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# define BOOST_PP_TUPLE_REVERSE_25(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y) (y, x, w, v, u, t, s, r, q, p, o, n, m, l, k, j, i, h, g, f, e, d, c, b, a) -# -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/ptr_container/detail/is_convertible.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/ptr_container/detail/is_convertible.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,416 @@ + +// Copyright 2000 John Maddock (john@johnmaddock.co.uk) +// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) +// Copyright 1999, 2000 Jaakko J„rvi (jaakko.jarvi@cs.utu.fi) +// +// Use, modification and distribution are subject to the Boost Software License, +// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt). +// +// See http://www.boost.org/libs/type_traits for most recent version including documentation. + +#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED +#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#ifndef BOOST_NO_IS_ABSTRACT +#include +#endif + +#if defined(__MWERKS__) +#include +#include +#endif + +// should be always the last #include directive +#include + +namespace boost { + +// is one type convertable to another? +// +// there are multiple versions of the is_convertible +// template, almost every compiler seems to require its +// own version. +// +// Thanks to Andrei Alexandrescu for the original version of the +// conversion detection technique! +// + +namespace detail { + +// MS specific version: + +#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) + +// This workaround is necessary to handle when From is void +// which is normally taken care of by the partial specialization +// of the is_convertible typename. +using ::boost::type_traits::yes_type; +using ::boost::type_traits::no_type; + +template< typename From > +struct does_conversion_exist +{ + template< typename To > struct result_ + { + static no_type BOOST_TT_DECL _m_check(...); + static yes_type BOOST_TT_DECL _m_check(To); + static From _m_from; + enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; + }; +}; + +template<> +struct does_conversion_exist +{ + template< typename To > struct result_ + { + enum { value = ::boost::is_void::value }; + }; +}; + +template +struct is_convertible_basic_impl + : does_conversion_exist::template result_ +{ +}; + +#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) +// +// special version for Borland compilers +// this version breaks when used for some +// UDT conversions: +// +template +struct is_convertible_impl +{ +#pragma option push -w-8074 + // This workaround for Borland breaks the EDG C++ frontend, + // so we only use it for Borland. + template struct checker + { + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); + }; + + static From _m_from; + static bool const value = sizeof( checker::_m_check(_m_from) ) + == sizeof(::boost::type_traits::yes_type); +#pragma option pop +}; + +#elif defined(__GNUC__) || defined(__BORLANDC__) && (__BORLANDC__ < 0x600) +// special version for gcc compiler + recent Borland versions +// note that this does not pass UDT's through (...) + +struct any_conversion +{ + template any_conversion(const volatile T&); + template any_conversion(T&); +}; + +template struct checker +{ + static boost::type_traits::no_type _m_check(any_conversion ...); + static boost::type_traits::yes_type _m_check(T, int); +}; + +template +struct is_convertible_basic_impl +{ + static From _m_from; + static bool const value = sizeof( detail::checker::_m_check(_m_from, 0) ) + == sizeof(::boost::type_traits::yes_type); +}; + +#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ + || defined(__IBMCPP__) || defined(__HP_aCC) +// +// This is *almost* an ideal world implementation as it doesn't rely +// on undefined behaviour by passing UDT's through (...). +// Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) +// Enable this for your compiler if is_convertible_test.cpp will compile it... +// +// Note we do not enable this for VC7.1, because even though it passes all the +// type_traits tests it is known to cause problems when instantiation occurs +// deep within the instantiation tree :-( +// +struct any_conversion +{ + template any_conversion(const volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + static From _m_from; + + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +}; + +#elif defined(__DMC__) + +struct any_conversion +{ + template any_conversion(const volatile T&); + // we need this constructor to catch references to functions + // (which can not be cv-qualified): + template any_conversion(T&); +}; + +template +struct is_convertible_basic_impl +{ + // Using '...' doesn't always work on Digital Mars. This version seems to. + template + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); + static From _m_from; + + // Static constants sometime cause the conversion of _m_from to To to be + // called. This doesn't happen with an enum. + enum { value = + sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) + }; +}; + +#elif defined(__MWERKS__) +// +// CW works with the technique implemented above for EDG, except when From +// is a function type (or a reference to such a type), in which case +// any_conversion won't be accepted as a valid conversion. We detect this +// exceptional situation and channel it through an alternative algorithm. +// + +template +struct is_convertible_basic_impl_aux; + +struct any_conversion +{ + template any_conversion(const volatile T&); +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); + static From _m_from; + + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) + ); +}; + +template +struct is_convertible_basic_impl_aux +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + static From _m_from; + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +}; + +template +struct is_convertible_basic_impl: + is_convertible_basic_impl_aux< + From,To, + ::boost::is_function::type>::value + > +{}; + +#else + +// +// This version seems to work pretty well for a wide spectrum of compilers, +// however it does rely on undefined behaviour by passing UDT's through (...). +// +template +struct is_convertible_basic_impl +{ + static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); + static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); + static From _m_from; +#ifdef BOOST_MSVC +#pragma warning(push) +#pragma warning(disable:4244) +#endif + BOOST_STATIC_CONSTANT(bool, value = + sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) + ); +#ifdef BOOST_MSVC +#pragma warning(pop) +#endif +}; + +#endif // is_convertible_impl + +#if defined(__DMC__) +// As before, a static constant sometimes causes errors on Digital Mars. +template +struct is_convertible_impl +{ + typedef typename add_reference::type ref_type; + enum { value = + (::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::detail::is_convertible_basic_impl::value, + ::boost::is_void::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_array::value + >::value + >::value) }; +}; +#elif !defined(__BORLANDC__) || __BORLANDC__ > 0x551 +template +struct is_convertible_impl +{ + typedef typename add_reference::type ref_type; + BOOST_STATIC_CONSTANT(bool, value = + (::boost::type_traits::ice_and< + ::boost::type_traits::ice_or< + ::boost::detail::is_convertible_basic_impl::value, + ::boost::is_void::value + >::value, + ::boost::type_traits::ice_not< + ::boost::is_array::value + >::value + >::value) + ); +}; +#endif + +template +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef is_convertible_impl type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef true_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template <> +struct is_convertible_impl_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_convertible_impl_dispatch_base +{ +#if !BOOST_WORKAROUND(__HP_aCC, < 60700) + typedef is_convertible_impl_select< + ::boost::is_arithmetic::value, + ::boost::is_arithmetic::value, +#ifndef BOOST_NO_IS_ABSTRACT + ::boost::is_abstract::value +#else + false +#endif + > selector; +#else + typedef is_convertible_impl_select selector; +#endif + typedef typename selector::template rebind isc_binder; + typedef typename isc_binder::type type; +}; + +template +struct is_convertible_impl_dispatch + : public is_convertible_impl_dispatch_base::type +{}; + +// +// Now add the full and partial specialisations +// for void types, these are common to all the +// implementation above: +// +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 volatile,value) \ + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const volatile,value) \ + /**/ + +# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 volatile,spec2,value) \ + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const volatile,spec2,value) \ + /**/ + + TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(is_convertible,void,void,true) + +# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2 +# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1 + +#else + BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true) +#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS + +#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,true) +#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,true) +BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,true) +#endif +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace detail + +BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch::value)) + +} // namespace boost + +#include + +#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/ptr_container/detail/move.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/ptr_container/detail/move.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,166 @@ +//----------------------------------------------------------------------------- +// boost variant/detail/move.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2002-2003 Eric Friedman +// Copyright (c) 2002 by Andrei Alexandrescu +// +// Use, modification and distribution are subject to the +// Boost Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +// +// This file derivative of MoJO. Much thanks to Andrei for his initial work. +// See for information on MOJO. +// Re-issued here under the Boost Software License, with permission of the original +// author (Andrei Alexandrescu). + + +#ifndef BOOST_VARIANT_DETAIL_MOVE_HPP +#define BOOST_VARIANT_DETAIL_MOVE_HPP + +#include // for iterator_traits +#include // for placement new + +#include "boost/config.hpp" +#include "boost/detail/workaround.hpp" +#include "boost/mpl/if.hpp" +#include "boost/type_traits/is_base_and_derived.hpp" + +namespace boost { +namespace detail { namespace variant { + +////////////////////////////////////////////////////////////////////////// +// forward declares +// +// NOTE: Incomplete until (if?) Boost.Move becomes part of Boost. +// +template class moveable; +template class move_source; +template class move_return; + +namespace detail { + +// (detail) moveable_tag +// +// Concrete type from which moveable derives. +// +// TODO: Move into moveable_fwd.hpp and define has_move_constructor. +// +template +struct moveable_tag +{ +}; + +} // namespace detail + +////////////////////////////////////////////////////////////////////////// +// function template move +// +// Takes a T& and returns, if T derives moveable, a move_source for +// the object; else, returns the T&. +// + +namespace detail { + +// (detail) class template move_type +// +// Metafunction that, given moveable T, provides move_source, else T&. +// +template +struct move_type +{ +public: // metafunction result + + typedef typename mpl::if_< + is_base_and_derived, T> + , move_source + , T& + >::type type; + +}; + +} // namespace detail + +template +inline + typename detail::move_type::type +move(T& source) +{ + typedef typename detail::move_type::type + move_t; + + return move_t(source); +} + +////////////////////////////////////////////////////////////////////////// +// class template return_t +// +// Metafunction that, given moveable T, provides move_return, else T. +// +template +struct return_t +{ +public: // metafunction result + + typedef typename mpl::if_< + is_base_and_derived, T> + , move_return + , T + >::type type; + +}; + +////////////////////////////////////////////////////////////////////////// +// function template move_swap +// +// Swaps using Koenig lookup but falls back to move-swap for primitive +// types and on non-conforming compilers. +// + +#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \ + || BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(2)) + +// [Indicate that move_swap by overload is disabled...] +#define BOOST_NO_MOVE_SWAP_BY_OVERLOAD + +// [...and provide straight swap-by-move implementation:] +template +inline void move_swap(T& lhs, T& rhs) +{ + T tmp( boost::detail::variant::move(lhs) ); + lhs = boost::detail::variant::move(rhs); + rhs = boost::detail::variant::move(tmp); +} + +#else// !workaround + +namespace detail { namespace move_swap { + +template +inline void swap(T& lhs, T& rhs) +{ + T tmp( boost::detail::variant::move(lhs) ); + lhs = boost::detail::variant::move(rhs); + rhs = boost::detail::variant::move(tmp); +} + +}} // namespace detail::move_swap + +template +inline void move_swap(T& lhs, T& rhs) +{ + using detail::move_swap::swap; + + swap(lhs, rhs); +} + +#endif // workaround + +}} // namespace detail::variant +} // namespace boost + +#endif // BOOST_VARIANT_DETAIL_MOVE_HPP + + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/ptr_container/detail/throw_exception.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/ptr_container/detail/throw_exception.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,46 @@ +#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED +#define BOOST_THROW_EXCEPTION_HPP_INCLUDED + +// MS compatible compilers support #pragma once + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +// +// boost/throw_exception.hpp +// +// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// http://www.boost.org/libs/utility/throw_exception.html +// + +#include + +#ifdef BOOST_NO_EXCEPTIONS +# include +#endif + +namespace boost +{ + +#ifdef BOOST_NO_EXCEPTIONS + +void throw_exception(std::exception const & e); // user defined + +#else + +template inline void throw_exception(E const & e) +{ + throw e; +} + +#endif + +} // namespace boost + +#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/ptr_container/exception.hpp --- a/epoc32/include/stdapis/boost/ptr_container/exception.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -// -// Boost.Pointer Container -// -// Copyright Thorsten Ottosen 2003-2005. Use, modification and -// distribution is subject to the Boost Software License, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// For more information, see http://www.boost.org/libs/ptr_container/ -// - -#ifndef BOOST_PTR_CONTAINER_EXCEPTION_HPP -#define BOOST_PTR_CONTAINER_EXCEPTION_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -namespace boost -{ - class bad_ptr_container_operation : public std::exception - { - const char* what_; - public: - bad_ptr_container_operation( const char* what ) : what_( what ) - { } - - virtual const char* what() const throw() - { - return what_; - } - }; - - - - class bad_index : public bad_ptr_container_operation - { - public: - bad_index( const char* what ) : bad_ptr_container_operation( what ) - { } - }; - - - - class bad_pointer : public bad_ptr_container_operation - { - public: - bad_pointer() : bad_ptr_container_operation( "Null pointer not allowed in a pointer container!" ) - { } - - bad_pointer( const char* text ) : bad_ptr_container_operation( text ) - { } - }; -} - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/random.hpp --- a/epoc32/include/stdapis/boost/random.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -/* boost random.hpp header file - * - * Copyright Jens Maurer 2000-2001 - * Distributed under the Boost Software License, Version 1.0. (See - * accompanying file LICENSE_1_0.txt or copy at - * http://www.boost.org/LICENSE_1_0.txt) - * - * See http://www.boost.org/libs/random for documentation. - * - * $Id: random.hpp,v 1.18 2004/07/27 03:43:27 dgregor Exp $ - * - * Revision history - * 2000-02-18 portability fixes (thanks to Beman Dawes) - * 2000-02-21 shuffle_output, inversive_congruential_schrage, - * generator_iterator, uniform_smallint - * 2000-02-23 generic modulus arithmetic helper, removed *_schrage classes, - * implemented Streamable and EqualityComparable concepts for - * generators, added Bernoulli distribution and Box-Muller - * transform - * 2000-03-01 cauchy, lognormal, triangle distributions; fixed - * uniform_smallint; renamed gaussian to normal distribution - * 2000-03-05 implemented iterator syntax for distribution functions - * 2000-04-21 removed some optimizations for better BCC/MSVC compatibility - * 2000-05-10 adapted to BCC and MSVC - * 2000-06-13 incorporated review results - * 2000-07-06 moved basic templates from namespace detail to random - * 2000-09-23 warning removals and int64 fixes (Ed Brey) - * 2000-09-24 added lagged_fibonacci generator (Matthias Troyer) - * 2001-02-18 moved to individual header files - */ - -#ifndef BOOST_RANDOM_HPP -#define BOOST_RANDOM_HPP - -// generators -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace boost { - typedef random::xor_combine, 0, - random::linear_feedback_shift, 0, 0>, 0, - random::linear_feedback_shift, 0, 0> taus88; -} // namespace boost - -// misc -#include - -// distributions -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif // BOOST_RANDOM_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/range/empty.hpp --- a/epoc32/include/stdapis/boost/range/empty.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. Use, modification and -// distribution is subject to the Boost Software License, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_EMPTY_HPP -#define BOOST_RANGE_EMPTY_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -//#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -//#include -//#else - -#include -#include - -namespace boost -{ -namespace range_detail -{ - - ////////////////////////////////////////////////////////////////////// - // primary template - ////////////////////////////////////////////////////////////////////// - - template< typename C > - inline bool empty( const C& c ) - { - return boost::begin( c ) == boost::end( c ); - } - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - inline bool empty( const char* const& s ) - { - return s == 0 || s[0] == 0; - } - - inline bool empty( const wchar_t* const& s ) - { - return s == 0 || s[0] == 0; - } - -} // namespace 'range_detail' - -template< class T > -inline bool empty( const T& r ) -{ - return range_detail::empty( r ); -} - -} // namepace 'boost' - -//#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/range/iterator.hpp --- a/epoc32/include/stdapis/boost/range/iterator.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. Use, modification and -// distribution is subject to the Boost Software License, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_ITERATOR_HPP -#define BOOST_RANGE_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#else - -#include -#include -#include - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_iterator - { - typedef BOOST_DEDUCED_TYPENAME C::iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - struct range_iterator< std::pair > - { - typedef Iterator type; - }; - - template< typename Iterator > - struct range_iterator< const std::pair > - { - typedef Iterator type; - }; - - ////////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - struct range_iterator< T[sz] > - { - typedef T* type; - }; - - template< typename T, std::size_t sz > - struct range_iterator< const T[sz] > - { - typedef const T* type; - }; - - ////////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////////// - - template<> - struct range_iterator< char* > - { - typedef char* type; - }; - - template<> - struct range_iterator< wchar_t* > - { - typedef wchar_t* type; - }; - - template<> - struct range_iterator< const char* > - { - typedef const char* type; - }; - - template<> - struct range_iterator< const wchar_t* > - { - typedef const wchar_t* type; - }; - - template<> - struct range_iterator< char* const > - { - typedef char* type; - }; - - template<> - struct range_iterator< wchar_t* const > - { - typedef wchar_t* type; - }; - - template<> - struct range_iterator< const char* const > - { - typedef const char* type; - }; - - template<> - struct range_iterator< const wchar_t* const > - { - typedef const wchar_t* type; - }; - -} // namespace boost - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/range/iterator_range.hpp --- a/epoc32/include/stdapis/boost/range/iterator_range.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,608 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen & Pavol Droba 2003-2004. Use, modification and -// distribution is subject to the Boost Software License, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_ITERATOR_RANGE_HPP -#define BOOST_RANGE_ITERATOR_RANGE_HPP - -// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for Cray X1 patch. -#include // Define __STL_CONFIG_H, if appropriate. -#ifndef BOOST_OLD_IOSTREAMS -# if defined(__STL_CONFIG_H) && \ - !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \ - /**/ -# define BOOST_OLD_IOSTREAMS -# endif -#endif // #ifndef BOOST_OLD_IOSTREAMS - -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef BOOST_OLD_IOSTREAMS -# include -#else -# include -#endif -#include - - -/*! \file - Defines the \c iterator_class and related functions. - \c iterator_range is a simple wrapper of iterator pair idiom. It provides - a rich subset of Container interface. -*/ - - -namespace boost -{ - namespace iterator_range_detail - { - // - // The functions adl_begin and adl_end are implemented in a separate - // class for gcc-2.9x - // - template - struct iterator_range_impl { - template< class ForwardRange > - static IteratorT adl_begin( ForwardRange& r ) - { - return IteratorT( boost::begin( r ) ); - } - - template< class ForwardRange > - static IteratorT adl_end( ForwardRange& r ) - { - return IteratorT( boost::end( r ) ); - } - }; - - template< class Left, class Right > - inline bool equal( const Left& l, const Right& r ) - { - typedef BOOST_DEDUCED_TYPENAME boost::range_size::type sz_type; - - sz_type l_size = boost::size( l ), - r_size = boost::size( r ); - - if( l_size != r_size ) - return false; - - return std::equal( boost::begin(l), boost::end(l), - boost::begin(r) ); - } - - template< class Left, class Right > - inline bool less_than( const Left& l, const Right& r ) - { - return std::lexicographical_compare( boost::begin(l), - boost::end(l), - boost::begin(r), - boost::end(r) ); - } - - struct range_tag { }; - struct const_range_tag { }; - - } - -// iterator range template class -----------------------------------------// - - //! iterator_range class - /*! - An \c iterator_range delimits a range in a sequence by beginning and ending iterators. - An iterator_range can be passed to an algorithm which requires a sequence as an input. - For example, the \c toupper() function may be used most frequently on strings, - but can also be used on iterator_ranges: - - \code - boost::tolower( find( s, "UPPERCASE STRING" ) ); - \endcode - - Many algorithms working with sequences take a pair of iterators, - delimiting a working range, as an arguments. The \c iterator_range class is an - encapsulation of a range identified by a pair of iterators. - It provides a collection interface, - so it is possible to pass an instance to an algorithm requiring a collection as an input. - */ - template - class iterator_range - { - protected: // Used by sub_range - //! implementation class - typedef iterator_range_detail::iterator_range_impl impl; - public: - - //! this type - typedef iterator_range type; - //BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(value_type); - - //! Encapsulated value type - typedef BOOST_DEDUCED_TYPENAME - iterator_value::type value_type; - - //! Difference type - typedef BOOST_DEDUCED_TYPENAME - iterator_difference::type difference_type; - - //! Size type - typedef std::size_t size_type; // note: must be unsigned - - //! This type - typedef iterator_range this_type; - - //! Refence type - // - // Needed because value-type is the same for - // const and non-const iterators - // - typedef BOOST_DEDUCED_TYPENAME - iterator_reference::type reference; - - //! const_iterator type - /*! - There is no distinction between const_iterator and iterator. - These typedefs are provides to fulfill container interface - */ - typedef IteratorT const_iterator; - //! iterator type - typedef IteratorT iterator; - - iterator_range() : m_Begin( iterator() ), m_End( iterator() ), - singular( true ) - { } -/* -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - iterator_range( this_type r ) : - : m_Begin(r.begin()), m_End(r.end()) - { } - - this_type& operator=( this_type r ) - { - m_Begin = r.begin(); - m_End = r.end(); - return *this; - } -#endif -*/ - //! Constructor from a pair of iterators - template< class Iterator > - iterator_range( Iterator Begin, Iterator End ) : - m_Begin(Begin), m_End(End), singular(false) {} - - //! Constructor from a Range - template< class Range > - iterator_range( const Range& r ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), - singular(false) {} - - //! Constructor from a Range - template< class Range > - iterator_range( Range& r ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), - singular(false) {} - - //! Constructor from a Range - template< class Range > - iterator_range( const Range& r, iterator_range_detail::const_range_tag ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), - singular(false) {} - - //! Constructor from a Range - template< class Range > - iterator_range( Range& r, iterator_range_detail::range_tag ) : - m_Begin( impl::adl_begin( r ) ), m_End( impl::adl_end( r ) ), - singular(false) {} - - #if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - this_type& operator=( const this_type& r ) - { - m_Begin = r.begin(); - m_End = r.end(); - // - // remark: this need not necessarily be true, but it does no harm - // - singular = r.singular; - return *this; - } - #endif - - template< class Iterator > - iterator_range& operator=( const iterator_range& r ) - { - m_Begin = r.begin(); - m_End = r.end(); - // - // remark: this need not necessarily be true, but it does no harm - // - singular = r.empty(); - return *this; - } - - template< class ForwardRange > - iterator_range& operator=( ForwardRange& r ) - { - m_Begin = impl::adl_begin( r ); - m_End = impl::adl_end( r ); - singular = false; - return *this; - } - - template< class ForwardRange > - iterator_range& operator=( const ForwardRange& r ) - { - m_Begin = impl::adl_begin( r ); - m_End = impl::adl_end( r ); - singular = false; - return *this; - } - - IteratorT begin() const - { - return m_Begin; - } - - IteratorT end() const - { - return m_End; - } - - size_type size() const - { - if( singular ) - return 0; - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) - return std::distance( m_Begin, m_End ); -#else - return std::distance( m_Begin, m_End ); -#endif - } - - bool empty() const - { - if( singular ) - return true; - - return m_Begin == m_End; - } - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - operator bool() const - { - return !empty(); - } -#else - typedef iterator (iterator_range::*unspecified_bool_type) () const; - operator unspecified_bool_type() const - { - return empty() ? 0: &iterator_range::end; - } -#endif - - bool equal( const iterator_range& r ) const - { - return singular == r.singular && m_Begin == r.m_Begin && m_End == r.m_End; - } - - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - bool operator==( const iterator_range& r ) const - { - return iterator_range_detail::equal( *this, r ); - } - - bool operator!=( const iterator_range& r ) const - { - return !operator==(r); - } - - bool operator<( const iterator_range& r ) const - { - return iterator_range_detail::less_than( *this, r ); - } - -#endif - - public: // convenience - reference front() const - { - BOOST_ASSERT( !empty() ); - return *m_Begin; - } - - reference back() const - { - BOOST_ASSERT( !empty() ); - IteratorT last( m_End ); - return *--last; - } - - reference operator[]( size_type sz ) const - { - //BOOST_STATIC_ASSERT( is_random_access ); - BOOST_ASSERT( sz < size() ); - return m_Begin[sz]; - } - - iterator_range& advance_begin( difference_type n ) - { - std::advance( m_Begin, n ); - return *this; - } - - iterator_range& advance_end( difference_type n ) - { - std::advance( m_End, n ); - return *this; - } - - private: - // begin and end iterators - IteratorT m_Begin; - IteratorT m_End; - bool singular; - }; - -// iterator range free-standing operators ---------------------------// - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#else - template< class Iterator > - inline bool empty( const iterator_range& r ) - { - // - // this will preserve the well-defined empty() even - // though 'r' is singular. - // - return r.empty(); - } -#endif - -#ifndef BOOST_OLD_IOSTREAMS - - //! iterator_range output operator - /*! - Output the range to an ostream. Elements are outputed - in a sequence without separators. - */ - template< typename IteratorT, typename Elem, typename Traits > - inline std::basic_ostream& operator<<( - std::basic_ostream& Os, - const iterator_range& r ) - { - std::copy( r.begin(), r.end(), - std::ostream_iterator< BOOST_DEDUCED_TYPENAME - iterator_value::type, - Elem, Traits>(Os) ); - return Os; - } - -#else - - //! iterator_range output operator - /*! - Output the range to an ostream. Elements are outputed - in a sequence without separators. - */ - template< typename IteratorT > - inline std::ostream& operator<<( - std::ostream& Os, - const iterator_range& r ) - { - std::copy( r.begin(), r.end(), std::ostream_iterator(Os)); - return Os; - } - -#endif - - ///////////////////////////////////////////////////////////////////// - // comparison operators - ///////////////////////////////////////////////////////////////////// - - template< class IteratorT, class ForwardRange > - inline bool operator==( const ForwardRange& l, - const iterator_range& r ) - { - return iterator_range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator!=( const ForwardRange& l, - const iterator_range& r ) - { - return !iterator_range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator<( const ForwardRange& l, - const iterator_range& r ) - { - return iterator_range_detail::less_than( l, r ); - } - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#else - template< class Iterator1T, class Iterator2T > - inline bool operator==( const iterator_range& l, - const iterator_range& r ) - { - return iterator_range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator==( const iterator_range& l, - const ForwardRange& r ) - { - return iterator_range_detail::equal( l, r ); - } - - - template< class Iterator1T, class Iterator2T > - inline bool operator!=( const iterator_range& l, - const iterator_range& r ) - { - return !iterator_range_detail::equal( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator!=( const iterator_range& l, - const ForwardRange& r ) - { - return !iterator_range_detail::equal( l, r ); - } - - - template< class Iterator1T, class Iterator2T > - inline bool operator<( const iterator_range& l, - const iterator_range& r ) - { - return iterator_range_detail::less_than( l, r ); - } - - template< class IteratorT, class ForwardRange > - inline bool operator<( const iterator_range& l, - const ForwardRange& r ) - { - return iterator_range_detail::less_than( l, r ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -// iterator range utilities -----------------------------------------// - - //! iterator_range construct helper - /*! - Construct an \c iterator_range from a pair of iterators - - \param Begin A begin iterator - \param End An end iterator - \return iterator_range object - */ - template< typename IteratorT > - inline iterator_range< IteratorT > - make_iterator_range( IteratorT Begin, IteratorT End ) - { - return iterator_range( Begin, End ); - } - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< typename Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - make_iterator_range( Range& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - ( boost::begin( r ), boost::end( r ) ); - } - -#else - //! iterator_range construct helper - /*! - Construct an \c iterator_range from a \c Range containing the begin - and end iterators. - */ - template< class ForwardRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - make_iterator_range( ForwardRange& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - ( r, iterator_range_detail::range_tag() ); - } - - template< class ForwardRange > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > - make_iterator_range( const ForwardRange& r ) - { - return iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > - ( r, iterator_range_detail::const_range_tag() ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - namespace iterator_range_detail - { - template< class Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - make_range_impl( Range& r, - BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, - BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) - { - if( advance_begin == 0 && advance_end == 0 ) - return make_iterator_range( r ); - - BOOST_DEDUCED_TYPENAME range_result_iterator::type - new_begin = boost::begin( r ), - new_end = boost::end( r ); - std::advance( new_begin, advance_begin ); - std::advance( new_end, advance_end ); - return make_iterator_range( new_begin, new_end ); - } - } - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - template< class Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_result_iterator::type > - make_iterator_range( Range& r, - BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, - BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) - { - //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); - return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); - } - -#else - - template< class Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_iterator::type > - make_iterator_range( Range& r, - BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, - BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) - { - //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); - return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); - } - - template< class Range > - inline iterator_range< BOOST_DEDUCED_TYPENAME range_const_iterator::type > - make_iterator_range( const Range& r, - BOOST_DEDUCED_TYPENAME range_difference::type advance_begin, - BOOST_DEDUCED_TYPENAME range_difference::type advance_end ) - { - //BOOST_ASSERT( advance_begin - advance_end <= size(r) && "creating invalid range" ); - return iterator_range_detail::make_range_impl( r, advance_begin, advance_end ); - } - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - - //! copy a range into a sequence - /*! - Construct a new sequence of the specified type from the elements - in the given range - - \param Range An input range - \return New sequence - */ - template< typename SeqT, typename Range > - inline SeqT copy_range( const Range& r ) - { - return SeqT( boost::begin( r ), boost::end( r ) ); - } - -} // namespace 'boost' - -#undef BOOST_OLD_IOSTREAMS - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/range/reverse_iterator.hpp --- a/epoc32/include/stdapis/boost/range/reverse_iterator.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. Use, modification and -// distribution is subject to the Boost Software License, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_REVERSE_ITERATOR_HPP -#define BOOST_RANGE_REVERSE_ITERATOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include -#include -#include - - -namespace boost -{ - ////////////////////////////////////////////////////////////////////////// - // default - ////////////////////////////////////////////////////////////////////////// - - template< typename C > - struct range_reverse_iterator - { - typedef reverse_iterator< - BOOST_DEDUCED_TYPENAME range_iterator::type > type; - }; - - -} // namespace boost - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/range/size.hpp --- a/epoc32/include/stdapis/boost/range/size.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,123 +0,0 @@ -// Boost.Range library -// -// Copyright Thorsten Ottosen 2003-2004. Use, modification and -// distribution is subject to the Boost Software License, Version -// 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// For more information, see http://www.boost.org/libs/range/ -// - -#ifndef BOOST_RANGE_SIZE_HPP -#define BOOST_RANGE_SIZE_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif - -#include - -#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING -#include -#else - -#include -#include -#include -#include -#include - -namespace boost -{ - -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -namespace range_detail -{ -#endif - ////////////////////////////////////////////////////////////////////// - // primary template - ////////////////////////////////////////////////////////////////////// - - template< typename C > - inline BOOST_DEDUCED_TYPENAME C::size_type - boost_range_size( const C& c ) - { - return c.size(); - } - - ////////////////////////////////////////////////////////////////////// - // pair - ////////////////////////////////////////////////////////////////////// - - template< typename Iterator > - inline std::size_t boost_range_size( const std::pair& p ) - { - return std::distance( p.first, p.second ); - } - - ////////////////////////////////////////////////////////////////////// - // array - ////////////////////////////////////////////////////////////////////// - - template< typename T, std::size_t sz > - inline std::size_t boost_range_size( const T (&array)[sz] ) - { - return range_detail::array_size( array ); - } - - template< typename T, std::size_t sz > - inline std::size_t boost_range_size( T (&array)[sz] ) - { - return boost::range_detail::array_size( array ); - } - - ////////////////////////////////////////////////////////////////////// - // string - ////////////////////////////////////////////////////////////////////// - - inline std::size_t boost_range_size( const char* const& s ) - { - return boost::range_detail::str_size( s ); - } - - inline std::size_t boost_range_size( const wchar_t* const& s ) - { - return boost::range_detail::str_size( s ); - } - -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -} // namespace 'range_detail' -#endif - -template< class T > -inline BOOST_DEDUCED_TYPENAME range_size::type size( const T& r ) -{ -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) - using namespace range_detail; -#endif - return boost_range_size( r ); -} - - -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3003 ) || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -// BCB and CW are not able to overload pointer when class overloads are also available. -inline range_size::type size( const char* r ) { - return range_detail::str_size( r ); -} -inline range_size::type size( char* r ) { - return range_detail::str_size( r ); -} -inline range_size::type size( const wchar_t* r ) { - return range_detail::str_size( r ); -} -inline range_size::type size( wchar_t* r ) { - return range_detail::str_size( r ); -} -#endif - - -} // namespace 'boost' - -#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/serialization/is_abstract.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/serialization/is_abstract.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,137 @@ +#ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP +#define BOOST_TT_IS_ABSTRACT_CLASS_HPP + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +# pragma once +#endif + +/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 +// is_abstract_class.hpp: +// +// (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey +// Use, modification and distribution is subject to the Boost Software +// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +// +// See http://www.boost.org for updates, documentation, and revision history. +// + +// Compile type discovery whether given type is abstract class or not. +// +// Requires DR 337 to be supported by compiler +// (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#337). +// +// +// Believed (Jan 2004) to work on: +// - GCC 3.4 +// - VC++ 7.1 +// - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) +// +// Doesn't work on: +// - VC++6, VC++7.0 and less +// - GCC 3.3.X and less +// - Borland C++ 6 and less +// +// +// History: +// - Originally written by Rani Sharoni, see +// http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com +// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. +// - Adapted and added into Boost.Serialization library by Robert Ramey +// (starting with submission #10). +// - Jan 2004: GCC 3.4 fixed to suport DR337 (Giovanni Bajo). +// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). +// - Nov 2004: Christoph Ludwig found that the implementation did not work with +// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig +// and John Maddock. +// - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template +// to degrade gracefully, rather than trash the compiler (John Maddock). +// + +#include +#include +#include +#include +#ifdef BOOST_NO_IS_ABSTRACT +#include +#endif +// should be the last #include +#include + + +namespace boost { +namespace detail{ + +#ifndef BOOST_NO_IS_ABSTRACT +template +struct is_abstract_imp2 +{ + // Deduction fails if T is void, function type, + // reference type (14.8.2/2)or an abstract class type + // according to review status issue #337 + // + template + static type_traits::no_type check_sig(U (*)[1]); + template + static type_traits::yes_type check_sig(...); + // + // T must be a complete type, further if T is a template then + // it must be instantiated in order for us to get the right answer: + // + BOOST_STATIC_ASSERT(sizeof(T) != 0); + + // GCC2 won't even parse this template if we embed the computation + // of s1 in the computation of value. +#ifdef __GNUC__ + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp2::template check_sig(0))); +#else + BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); +#endif + + BOOST_STATIC_CONSTANT(bool, value = + (s1 == sizeof(type_traits::yes_type))); +}; + +template +struct is_abstract_select +{ + template + struct rebind + { + typedef is_abstract_imp2 type; + }; +}; +template <> +struct is_abstract_select +{ + template + struct rebind + { + typedef false_type type; + }; +}; + +template +struct is_abstract_imp +{ + typedef is_abstract_select< ::boost::is_class::value> selector; + typedef typename selector::template rebind binder; + typedef typename binder::type type; + + BOOST_STATIC_CONSTANT(bool, value = type::value); +}; + +#endif +} + +#ifndef BOOST_NO_IS_ABSTRACT +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_abstract_imp::value) +#else +BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_polymorphic_imp::value) +#endif + +} // namespace boost + +#include + +#endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/serialization/version.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/serialization/version.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ +// Boost version.hpp configuration header file ------------------------------// + +// (C) Copyright John maddock 1999. Distributed under the Boost +// Software License, Version 1.0. (See accompanying file +// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +// See http://www.boost.org/libs/config for documentation + +#ifndef BOOST_VERSION_HPP +#define BOOST_VERSION_HPP + +// +// Caution, this is the only boost header that is guarenteed +// to change with every boost release, including this header +// will cause a recompile every time a new boost version is +// released. +// +// BOOST_VERSION % 100 is the sub-minor version +// BOOST_VERSION / 100 % 1000 is the minor version +// BOOST_VERSION / 100000 is the major version + +#define BOOST_VERSION 103400 + +// +// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION +// but as a *string* in the form "x_y" where x is the major version +// number and y is the minor version number. This is used by +// to select which library version to link to. + +#define BOOST_LIB_VERSION "1_34" + +#endif + + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/throw_exception.hpp --- a/epoc32/include/stdapis/boost/throw_exception.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -#ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED -#define BOOST_THROW_EXCEPTION_HPP_INCLUDED - -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -// -// boost/throw_exception.hpp -// -// Copyright (c) 2002 Peter Dimov and Multi Media Ltd. -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// http://www.boost.org/libs/utility/throw_exception.html -// - -#include - -#ifdef BOOST_NO_EXCEPTIONS -# include -#endif - -namespace boost -{ - -#ifdef BOOST_NO_EXCEPTIONS - -void throw_exception(std::exception const & e); // user defined - -#else - -template inline void throw_exception(E const & e) -{ - throw e; -} - -#endif - -} // namespace boost - -#endif // #ifndef BOOST_THROW_EXCEPTION_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/tuple/tuple.hpp --- a/epoc32/include/stdapis/boost/tuple/tuple.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -// tuple.hpp - Boost Tuple Library -------------------------------------- - -// Copyright (C) 1999, 2000 Jaakko Järvi (jaakko.jarvi@cs.utu.fi) -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// For more information, see http://www.boost.org - -// ----------------------------------------------------------------- - -#ifndef BOOST_TUPLE_HPP -#define BOOST_TUPLE_HPP - -#if defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 730 -// Work around a compiler bug. -// boost::python::tuple has to be seen by the compiler before the -// boost::tuple class template. -namespace boost { namespace python { class tuple; }} -#endif - -#include "boost/config.hpp" -#include "boost/static_assert.hpp" - -#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// The MSVC version -#include "boost/tuple/detail/tuple_basic_no_partial_spec.hpp" - -#else -// other compilers -#include "boost/ref.hpp" -#include "boost/tuple/detail/tuple_basic.hpp" - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace boost { - -using tuples::tuple; -using tuples::make_tuple; -using tuples::tie; -#if !defined(BOOST_NO_USING_TEMPLATE) -using tuples::get; -#elif !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) -// -// The "using tuples::get" statement causes the -// Borland compiler to ICE, use forwarding -// functions instead: -// -template -inline typename tuples::access_traits< - typename tuples::element >::type - >::non_const_type -get(tuples::cons& c) { - return tuples::get(c); -} -// get function for const cons-lists, returns a const reference to -// the element. If the element is a reference, returns the reference -// as such (that is, can return a non-const reference) -template -inline typename tuples::access_traits< - typename tuples::element >::type - >::const_type -get(const tuples::cons& c) { - return tuples::get(c); -} -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -// -// MSVC, using declarations don't mix with templates well, -// so use forwarding functions instead: -// -template -typename tuples::detail::element_ref >::RET -get(tuples::cons& t, tuples::detail::workaround_holder* = 0) -{ - return tuples::detail::get_class::get(t); -} - -template -typename tuples::detail::element_const_ref >::RET -get(const tuples::cons& t, tuples::detail::workaround_holder* = 0) -{ - return tuples::detail::get_class::get(t); -} -#endif // BOOST_NO_USING_TEMPLATE - -} // end namespace boost - - -#endif // BOOST_TUPLE_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/aligned_storage.hpp --- a/epoc32/include/stdapis/boost/type_traits/aligned_storage.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ - -// Copyright (C) John Maddock 2005. -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/type_traits for most recent version including documentation. - -#ifndef BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED -# define BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED -# include -#endif // BOOST_TT_ALIGNED_STORAGE_HPP_INCLUDED - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/conversion_traits.hpp --- a/epoc32/include/stdapis/boost/type_traits/conversion_traits.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,17 +0,0 @@ - -// Copyright 2000 John Maddock (john@johnmaddock.co.uk) -// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) -// Copyright 1999, 2000 Jaakko J„rvi (jaakko.jarvi@cs.utu.fi) -// -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/type_traits for most recent version including documentation. - -#ifndef BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED -#define BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED - -#include - -#endif // BOOST_TT_CONVERSION_TRAITS_HPP_INCLUDED diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/detail/bool_trait_def.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/type_traits/detail/bool_trait_def.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +//----------------------------------------------------------------------------- +// boost/variant/detail/bool_trait_def.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Needed until move-related traits incorporated into type_traits library. +// no include guards, the header is intended for multiple inclusion! + +// should be the last #include +#include "boost/type_traits/detail/bool_trait_def.hpp" + +#define BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \ +template< typename T > struct trait \ + BOOST_TT_AUX_BOOL_C_BASE(C) \ +{ \ + BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ +}; \ +/**/ + +#define BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(arity, name) \ +BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(arity, name) \ +/**/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/detail/bool_trait_undef.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/type_traits/detail/bool_trait_undef.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,21 @@ +//----------------------------------------------------------------------------- +// boost/variant/detail/bool_trait_undef.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2003 +// Eric Friedman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) + +// Needed until move-related traits incorporated into type_traits library. +// no include guards, the header is intended for multiple inclusion! + +// should be the last #include +#include "boost/type_traits/detail/bool_trait_undef.hpp" + + +#undef BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1 +#undef BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/is_abstract.hpp --- a/epoc32/include/stdapis/boost/type_traits/is_abstract.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -#ifndef BOOST_TT_IS_ABSTRACT_CLASS_HPP -#define BOOST_TT_IS_ABSTRACT_CLASS_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8 -// is_abstract_class.hpp: -// -// (C) Copyright 2002 Rani Sharoni (rani_sharoni@hotmail.com) and Robert Ramey -// Use, modification and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -// -// See http://www.boost.org for updates, documentation, and revision history. -// - -// Compile type discovery whether given type is abstract class or not. -// -// Requires DR 337 to be supported by compiler -// (http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_active.html#337). -// -// -// Believed (Jan 2004) to work on: -// - GCC 3.4 -// - VC++ 7.1 -// - compilers with new EDG frontend (Intel C++ 7, Comeau 4.3.2) -// -// Doesn't work on: -// - VC++6, VC++7.0 and less -// - GCC 3.3.X and less -// - Borland C++ 6 and less -// -// -// History: -// - Originally written by Rani Sharoni, see -// http://groups.google.com/groups?selm=df893da6.0207110613.75b2fe90%40posting.google.com -// At this time supported by EDG (Intel C++ 7, Comeau 4.3.2) and VC7.1. -// - Adapted and added into Boost.Serialization library by Robert Ramey -// (starting with submission #10). -// - Jan 2004: GCC 3.4 fixed to suport DR337 (Giovanni Bajo). -// - Jan 2004: modified to be part of Boost.TypeTraits (Pavel Vozenilek). -// - Nov 2004: Christoph Ludwig found that the implementation did not work with -// template types and gcc-3.4 or VC7.1, fix due to Christoph Ludwig -// and John Maddock. -// - Dec 2004: Added new config macro BOOST_NO_IS_ABSTRACT which causes the template -// to degrade gracefully, rather than trash the compiler (John Maddock). -// - -#include -#include -#include -#include -#ifdef BOOST_NO_IS_ABSTRACT -#include -#endif -// should be the last #include -#include - - -namespace boost { -namespace detail{ - -#ifndef BOOST_NO_IS_ABSTRACT -template -struct is_abstract_imp2 -{ - // Deduction fails if T is void, function type, - // reference type (14.8.2/2)or an abstract class type - // according to review status issue #337 - // - template - static type_traits::no_type check_sig(U (*)[1]); - template - static type_traits::yes_type check_sig(...); - // - // T must be a complete type, further if T is a template then - // it must be instantiated in order for us to get the right answer: - // - BOOST_STATIC_ASSERT(sizeof(T) != 0); - - // GCC2 won't even parse this template if we embed the computation - // of s1 in the computation of value. -#ifdef __GNUC__ - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(is_abstract_imp2::template check_sig(0))); -#else - BOOST_STATIC_CONSTANT(unsigned, s1 = sizeof(check_sig(0))); -#endif - - BOOST_STATIC_CONSTANT(bool, value = - (s1 == sizeof(type_traits::yes_type))); -}; - -template -struct is_abstract_select -{ - template - struct rebind - { - typedef is_abstract_imp2 type; - }; -}; -template <> -struct is_abstract_select -{ - template - struct rebind - { - typedef false_type type; - }; -}; - -template -struct is_abstract_imp -{ - typedef is_abstract_select< ::boost::is_class::value> selector; - typedef typename selector::template rebind binder; - typedef typename binder::type type; - - BOOST_STATIC_CONSTANT(bool, value = type::value); -}; - -#endif -} - -#ifndef BOOST_NO_IS_ABSTRACT -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_abstract_imp::value) -#else -BOOST_TT_AUX_BOOL_TRAIT_DEF1(is_abstract,T,::boost::detail::is_polymorphic_imp::value) -#endif - -} // namespace boost - -#include - -#endif //BOOST_TT_IS_ABSTRACT_CLASS_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/is_convertible.hpp --- a/epoc32/include/stdapis/boost/type_traits/is_convertible.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,416 +0,0 @@ - -// Copyright 2000 John Maddock (john@johnmaddock.co.uk) -// Copyright 2000 Jeremy Siek (jsiek@lsc.nd.edu) -// Copyright 1999, 2000 Jaakko J„rvi (jaakko.jarvi@cs.utu.fi) -// -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/type_traits for most recent version including documentation. - -#ifndef BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED -#define BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED - -#include -#include -#include -#include -#include -#include -#include -#ifndef BOOST_NO_IS_ABSTRACT -#include -#endif - -#if defined(__MWERKS__) -#include -#include -#endif - -// should be always the last #include directive -#include - -namespace boost { - -// is one type convertable to another? -// -// there are multiple versions of the is_convertible -// template, almost every compiler seems to require its -// own version. -// -// Thanks to Andrei Alexandrescu for the original version of the -// conversion detection technique! -// - -namespace detail { - -// MS specific version: - -#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1300) - -// This workaround is necessary to handle when From is void -// which is normally taken care of by the partial specialization -// of the is_convertible typename. -using ::boost::type_traits::yes_type; -using ::boost::type_traits::no_type; - -template< typename From > -struct does_conversion_exist -{ - template< typename To > struct result_ - { - static no_type BOOST_TT_DECL _m_check(...); - static yes_type BOOST_TT_DECL _m_check(To); - static From _m_from; - enum { value = sizeof( _m_check(_m_from) ) == sizeof(yes_type) }; - }; -}; - -template<> -struct does_conversion_exist -{ - template< typename To > struct result_ - { - enum { value = ::boost::is_void::value }; - }; -}; - -template -struct is_convertible_basic_impl - : does_conversion_exist::template result_ -{ -}; - -#elif defined(__BORLANDC__) && (__BORLANDC__ < 0x560) -// -// special version for Borland compilers -// this version breaks when used for some -// UDT conversions: -// -template -struct is_convertible_impl -{ -#pragma option push -w-8074 - // This workaround for Borland breaks the EDG C++ frontend, - // so we only use it for Borland. - template struct checker - { - static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); - static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(T); - }; - - static From _m_from; - static bool const value = sizeof( checker::_m_check(_m_from) ) - == sizeof(::boost::type_traits::yes_type); -#pragma option pop -}; - -#elif defined(__GNUC__) || defined(__BORLANDC__) && (__BORLANDC__ < 0x600) -// special version for gcc compiler + recent Borland versions -// note that this does not pass UDT's through (...) - -struct any_conversion -{ - template any_conversion(const volatile T&); - template any_conversion(T&); -}; - -template struct checker -{ - static boost::type_traits::no_type _m_check(any_conversion ...); - static boost::type_traits::yes_type _m_check(T, int); -}; - -template -struct is_convertible_basic_impl -{ - static From _m_from; - static bool const value = sizeof( detail::checker::_m_check(_m_from, 0) ) - == sizeof(::boost::type_traits::yes_type); -}; - -#elif (defined(__EDG_VERSION__) && (__EDG_VERSION__ >= 245) && !defined(__ICL)) \ - || defined(__IBMCPP__) || defined(__HP_aCC) -// -// This is *almost* an ideal world implementation as it doesn't rely -// on undefined behaviour by passing UDT's through (...). -// Unfortunately it doesn't quite pass all the tests for most compilers (sigh...) -// Enable this for your compiler if is_convertible_test.cpp will compile it... -// -// Note we do not enable this for VC7.1, because even though it passes all the -// type_traits tests it is known to cause problems when instantiation occurs -// deep within the instantiation tree :-( -// -struct any_conversion -{ - template any_conversion(const volatile T&); - // we need this constructor to catch references to functions - // (which can not be cv-qualified): - template any_conversion(T&); -}; - -template -struct is_convertible_basic_impl -{ - static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); - static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); - static From _m_from; - - BOOST_STATIC_CONSTANT(bool, value = - sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) - ); -}; - -#elif defined(__DMC__) - -struct any_conversion -{ - template any_conversion(const volatile T&); - // we need this constructor to catch references to functions - // (which can not be cv-qualified): - template any_conversion(T&); -}; - -template -struct is_convertible_basic_impl -{ - // Using '...' doesn't always work on Digital Mars. This version seems to. - template - static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion, float, T); - static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int, int); - static From _m_from; - - // Static constants sometime cause the conversion of _m_from to To to be - // called. This doesn't happen with an enum. - enum { value = - sizeof( _m_check(_m_from, 0, 0) ) == sizeof(::boost::type_traits::yes_type) - }; -}; - -#elif defined(__MWERKS__) -// -// CW works with the technique implemented above for EDG, except when From -// is a function type (or a reference to such a type), in which case -// any_conversion won't be accepted as a valid conversion. We detect this -// exceptional situation and channel it through an alternative algorithm. -// - -template -struct is_convertible_basic_impl_aux; - -struct any_conversion -{ - template any_conversion(const volatile T&); -}; - -template -struct is_convertible_basic_impl_aux -{ - static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(any_conversion ...); - static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To, int); - static From _m_from; - - BOOST_STATIC_CONSTANT(bool, value = - sizeof( _m_check(_m_from, 0) ) == sizeof(::boost::type_traits::yes_type) - ); -}; - -template -struct is_convertible_basic_impl_aux -{ - static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); - static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); - static From _m_from; - BOOST_STATIC_CONSTANT(bool, value = - sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) - ); -}; - -template -struct is_convertible_basic_impl: - is_convertible_basic_impl_aux< - From,To, - ::boost::is_function::type>::value - > -{}; - -#else - -// -// This version seems to work pretty well for a wide spectrum of compilers, -// however it does rely on undefined behaviour by passing UDT's through (...). -// -template -struct is_convertible_basic_impl -{ - static ::boost::type_traits::no_type BOOST_TT_DECL _m_check(...); - static ::boost::type_traits::yes_type BOOST_TT_DECL _m_check(To); - static From _m_from; -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4244) -#endif - BOOST_STATIC_CONSTANT(bool, value = - sizeof( _m_check(_m_from) ) == sizeof(::boost::type_traits::yes_type) - ); -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif -}; - -#endif // is_convertible_impl - -#if defined(__DMC__) -// As before, a static constant sometimes causes errors on Digital Mars. -template -struct is_convertible_impl -{ - typedef typename add_reference::type ref_type; - enum { value = - (::boost::type_traits::ice_and< - ::boost::type_traits::ice_or< - ::boost::detail::is_convertible_basic_impl::value, - ::boost::is_void::value - >::value, - ::boost::type_traits::ice_not< - ::boost::is_array::value - >::value - >::value) }; -}; -#elif !defined(__BORLANDC__) || __BORLANDC__ > 0x551 -template -struct is_convertible_impl -{ - typedef typename add_reference::type ref_type; - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - ::boost::type_traits::ice_or< - ::boost::detail::is_convertible_basic_impl::value, - ::boost::is_void::value - >::value, - ::boost::type_traits::ice_not< - ::boost::is_array::value - >::value - >::value) - ); -}; -#endif - -template -struct is_convertible_impl_select -{ - template - struct rebind - { - typedef is_convertible_impl type; - }; -}; - -template <> -struct is_convertible_impl_select -{ - template - struct rebind - { - typedef true_type type; - }; -}; - -template <> -struct is_convertible_impl_select -{ - template - struct rebind - { - typedef false_type type; - }; -}; - -template <> -struct is_convertible_impl_select -{ - template - struct rebind - { - typedef false_type type; - }; -}; - -template -struct is_convertible_impl_dispatch_base -{ -#if !BOOST_WORKAROUND(__HP_aCC, < 60700) - typedef is_convertible_impl_select< - ::boost::is_arithmetic::value, - ::boost::is_arithmetic::value, -#ifndef BOOST_NO_IS_ABSTRACT - ::boost::is_abstract::value -#else - false -#endif - > selector; -#else - typedef is_convertible_impl_select selector; -#endif - typedef typename selector::template rebind isc_binder; - typedef typename isc_binder::type type; -}; - -template -struct is_convertible_impl_dispatch - : public is_convertible_impl_dispatch_base::type -{}; - -// -// Now add the full and partial specialisations -// for void types, these are common to all the -// implementation above: -// -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ - BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2,value) \ - BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const,value) \ - BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 volatile,value) \ - BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,spec1,spec2 const volatile,value) \ - /**/ - -# define TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(trait,spec1,spec2,value) \ - TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1,spec2,value) \ - TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const,spec2,value) \ - TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 volatile,spec2,value) \ - TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1(trait,spec1 const volatile,spec2,value) \ - /**/ - - TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2(is_convertible,void,void,true) - -# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2 -# undef TT_AUX_BOOL_CV_VOID_TRAIT_SPEC2_PART1 - -#else - BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(is_convertible,void,void,true) -#endif // BOOST_NO_CV_VOID_SPECIALIZATIONS - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void,To,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void,true) -#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const,To,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void volatile,To,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename To,is_convertible,void const volatile,To,false) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void volatile,true) -BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(typename From,is_convertible,From,void const volatile,true) -#endif -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_convertible,From,To,(::boost::detail::is_convertible_impl_dispatch::value)) - -} // namespace boost - -#include - -#endif // BOOST_TT_IS_CONVERTIBLE_HPP_INCLUDED - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/type_traits/is_same.hpp --- a/epoc32/include/stdapis/boost/type_traits/is_same.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ - -// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, -// Howard Hinnant and John Maddock 2000. -// (C) Copyright Mat Marcus, Jesse Jones and Adobe Systems Inc 2001 - -// Use, modification and distribution are subject to the Boost Software License, -// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt). -// -// See http://www.boost.org/libs/type_traits for most recent version including documentation. - -// Fixed is_pointer, is_reference, is_const, is_volatile, is_same, -// is_member_pointer based on the Simulated Partial Specialization work -// of Mat Marcus and Jesse Jones. See http://opensource.adobe.com or -// http://groups.yahoo.com/group/boost/message/5441 -// Some workarounds in here use ideas suggested from "Generic: -// Mappings between Types and Values" -// by Andrei Alexandrescu (see http://www.cuj.com/experts/1810/alexandr.html). - - -#ifndef BOOST_TT_IS_SAME_HPP_INCLUDED -#define BOOST_TT_IS_SAME_HPP_INCLUDED - -#include -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -#include -#include -#include -#endif -// should be the last #include -#include - -namespace boost { - -#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,false) -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T,T,true) -#if BOOST_WORKAROUND(__BORLANDC__, < 0x600) -// without this, Borland's compiler gives the wrong answer for -// references to arrays: -BOOST_TT_AUX_BOOL_TRAIT_PARTIAL_SPEC2_1(typename T,is_same,T&,T&,true) -#endif - -#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -namespace detail { - -#ifdef BOOST_MSVC -// the following VC6 specific implementation is *NOT* legal -// C++, but has the advantage that it works for incomplete -// types. - -template< typename T1 > -struct is_same_part_1 -{ - template struct part_2 { enum { value = false }; }; - template<> struct part_2 { enum { value = true }; }; -}; - -template< typename T1, typename T2 > -struct is_same_impl -{ - enum { value = detail::is_same_part_1::template part_2::value }; -}; - -#else // generic "no-partial-specialization" version - -template -::boost::type_traits::yes_type -BOOST_TT_DECL is_same_tester(T*, T*); - -::boost::type_traits::no_type -BOOST_TT_DECL is_same_tester(...); - -template -struct is_same_impl -{ - static T t; - static U u; - - BOOST_STATIC_CONSTANT(bool, value = - (::boost::type_traits::ice_and< - (sizeof(type_traits::yes_type) == sizeof(detail::is_same_tester(&t,&u))), - (::boost::is_reference::value == ::boost::is_reference::value), - (sizeof(T) == sizeof(U)) - >::value)); -}; - -#endif // BOOST_MSVC - -} // namespace detail - -BOOST_TT_AUX_BOOL_TRAIT_DEF2(is_same,T,U,(::boost::detail::is_same_impl::value)) - -#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION - -} // namespace boost - -#include - -#endif // BOOST_TT_IS_SAME_HPP_INCLUDED - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/utility.hpp --- a/epoc32/include/stdapis/boost/utility.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ -// Boost utility.hpp header file -------------------------------------------// - -// Copyright 1999-2003 Aleksey Gurtovoy. Use, modification, and distribution are -// subject to the Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or a copy at .) - -// See for the library's home page. - -#ifndef BOOST_UTILITY_HPP -#define BOOST_UTILITY_HPP - -#include -#include -#include -#include -#include -#include - -#endif // BOOST_UTILITY_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/utility/enable_if.hpp --- a/epoc32/include/stdapis/boost/utility/enable_if.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -// Boost enable_if library - -// Copyright 2003 © The Trustees of Indiana University. - -// Use, modification, and distribution is subject to the Boost Software -// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Authors: Jaakko Järvi (jajarvi at osl.iu.edu) -// Jeremiah Willcock (jewillco at osl.iu.edu) -// Andrew Lumsdaine (lums at osl.iu.edu) - - -#ifndef BOOST_UTILITY_ENABLE_IF_HPP -#define BOOST_UTILITY_ENABLE_IF_HPP - -#include "boost/config.hpp" - -// Even the definition of enable_if causes problems on some compilers, -// so it's macroed out for all compilers that do not support SFINAE - -#ifndef BOOST_NO_SFINAE - -namespace boost -{ - - template - struct enable_if_c { - typedef T type; - }; - - template - struct enable_if_c {}; - - template - struct enable_if : public enable_if_c {}; - - template - struct lazy_enable_if_c { - typedef typename T::type type; - }; - - template - struct lazy_enable_if_c {}; - - template - struct lazy_enable_if : public lazy_enable_if_c {}; - - - template - struct disable_if_c { - typedef T type; - }; - - template - struct disable_if_c {}; - - template - struct disable_if : public disable_if_c {}; - - template - struct lazy_disable_if_c { - typedef typename T::type type; - }; - - template - struct lazy_disable_if_c {}; - - template - struct lazy_disable_if : public lazy_disable_if_c {}; - -} // namespace boost - -#else - -namespace boost { - - namespace detail { typedef void enable_if_default_T; } - - template - struct enable_if_does_not_work_on_this_compiler; - - template - struct enable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct disable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler - { }; - - template - struct enable_if : enable_if_does_not_work_on_this_compiler - { }; - - template - struct disable_if : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_enable_if : enable_if_does_not_work_on_this_compiler - { }; - - template - struct lazy_disable_if : enable_if_does_not_work_on_this_compiler - { }; - -} // namespace boost - -#endif // BOOST_NO_SFINAE - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/variant.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/boost/variant.hpp Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1833 @@ +//----------------------------------------------------------------------------- +// boost variant/variant.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2002-2003 +// Eric Friedman, Itay Maman +// +// Distributed under the Boost Software License, Version 1.0. (See +// accompanying file LICENSE_1_0.txt or copy at +// http://www.boost.org/LICENSE_1_0.txt) +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. +*/ +#ifndef BOOST_VARIANT_VARIANT_HPP +#define BOOST_VARIANT_VARIANT_HPP + +#include // for std::size_t +#include // for placement new +#ifdef __SYMBIAN32__ +#include +#endif +#include // for typeid, std::type_info + +#include "boost/variant/detail/config.hpp" +#include "boost/mpl/aux_/config/eti.hpp" +#include "boost/mpl/aux_/value_wknd.hpp" + +#include "boost/variant/variant_fwd.hpp" +#include "boost/variant/detail/backup_holder.hpp" +#include "boost/variant/detail/enable_recursive_fwd.hpp" +#include "boost/variant/detail/forced_return.hpp" +#include "boost/variant/detail/initializer.hpp" +#include "boost/variant/detail/make_variant_list.hpp" +#include "boost/variant/detail/over_sequence.hpp" +#include "boost/variant/detail/visitation_impl.hpp" + +#include "boost/variant/detail/generic_result_type.hpp" +#include "boost/variant/detail/has_nothrow_move.hpp" +#include "boost/variant/detail/move.hpp" + +#include "boost/detail/reference_content.hpp" +#include "boost/aligned_storage.hpp" +#include "boost/blank.hpp" +#include "boost/static_assert.hpp" +#include "boost/preprocessor/cat.hpp" +#include "boost/preprocessor/repeat.hpp" +#include "boost/type_traits/alignment_of.hpp" +#include "boost/type_traits/add_const.hpp" +#include "boost/type_traits/has_nothrow_constructor.hpp" +#include "boost/type_traits/has_nothrow_copy.hpp" +#include "boost/type_traits/is_const.hpp" +#include "boost/type_traits/is_same.hpp" +#include "boost/utility/enable_if.hpp" +#include "boost/variant/recursive_wrapper_fwd.hpp" +#include "boost/variant/static_visitor.hpp" + +#include "boost/mpl/eval_if.hpp" +#include "boost/mpl/begin_end.hpp" +#include "boost/mpl/bool.hpp" +#include "boost/mpl/empty.hpp" +#include "boost/mpl/find_if.hpp" +#include "boost/mpl/front.hpp" +#include "boost/mpl/identity.hpp" +#include "boost/mpl/if.hpp" +#include "boost/mpl/int.hpp" +#include "boost/mpl/is_sequence.hpp" +#include "boost/mpl/iterator_range.hpp" +#include "boost/mpl/iter_fold_if.hpp" +#include "boost/mpl/logical.hpp" +#include "boost/mpl/max_element.hpp" +#include "boost/mpl/next.hpp" +#include "boost/mpl/deref.hpp" +#include "boost/mpl/pair.hpp" +#include "boost/mpl/protect.hpp" +#include "boost/mpl/push_front.hpp" +#include "boost/mpl/same_as.hpp" +#include "boost/mpl/size_t.hpp" +#include "boost/mpl/sizeof.hpp" +#include "boost/mpl/transform.hpp" +#include "boost/mpl/assert.hpp" + +/////////////////////////////////////////////////////////////////////////////// +// Implementation Macros: +// +// BOOST_VARIANT_VISITATION_UNROLLING_LIMIT +// Defined in boost/variant/detail/visitation_impl.hpp. +// +// BOOST_VARIANT_MINIMIZE_SIZE +// When #defined, implementation employs all known means to minimize the +// size of variant obje cts. However, often unsuccessful due to alignment +// issues, and potentially harmful to runtime speed, so not enabled by +// default. (TODO: Investigate further.) + +#if defined(BOOST_VARIANT_MINIMIZE_SIZE) +# include // for SCHAR_MAX +# include "boost/mpl/eval_if.hpp" +# include "boost/mpl/equal_to.hpp" +# include "boost/mpl/identity.hpp" +# include "boost/mpl/int.hpp" +# include "boost/mpl/if.hpp" +# include "boost/mpl/less.hpp" +# include "boost/mpl/long.hpp" +# include "boost/mpl/O1_size.hpp" +#endif + + +namespace boost { + +namespace detail { namespace variant { + +/////////////////////////////////////////////////////////////////////////////// +// (detail) metafunction max_value +// +// Finds the maximum value of the unary metafunction F over Sequence. +// +template +struct max_value +{ +private: // helpers, for metafunction result (below) + + typedef typename mpl::transform1::type transformed_; + typedef typename mpl::max_element::type max_it; + +public: // metafunction result + + typedef typename mpl::deref::type + type; + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) metafunction find_fallback_type +// +// Provides a fallback (i.e., nothrow default-constructible) type from the +// specified sequence, or no_fallback_type if not found. +// +// This implementation is designed to prefer boost::blank over other potential +// fallback types, regardless of its position in the specified sequence. +// + +class no_fallback_type; + +struct find_fallback_type_pred +{ + template + struct apply + { + private: + typedef typename mpl::deref::type t_; + + public: + typedef mpl::not_< has_nothrow_constructor > type; + }; +}; + +template +struct find_fallback_type +{ +private: // helpers, for metafunction result (below) + + typedef typename mpl::end::type end_it; + + // [Find the first suitable fallback type...] + + typedef typename mpl::iter_fold_if< + Types + , mpl::int_<0>, mpl::protect< mpl::next<> > + , mpl::protect< find_fallback_type_pred > + >::type first_result_; + + typedef typename first_result_::first first_result_index; + typedef typename first_result_::second first_result_it; + + // [...now search the rest of the sequence for boost::blank...] + + typedef typename mpl::iter_fold_if< + mpl::iterator_range< first_result_it,end_it > + , first_result_index, mpl::protect< mpl::next<> > + , mpl::protect< mpl::not_same_as > + >::type second_result_; + + typedef typename second_result_::second second_result_it; + +public: // metafunction result + + // [...and return the results of the search:] + typedef typename mpl::eval_if< + is_same< second_result_it,end_it > + , mpl::if_< + is_same< first_result_it,end_it > + , mpl::pair< no_fallback_type,no_fallback_type > + , first_result_ + > + , mpl::identity< second_result_ > + >::type type; + +}; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +template<> +struct find_fallback_type +{ + typedef mpl::pair< no_fallback_type,no_fallback_type > type; +}; + +#endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround + +/////////////////////////////////////////////////////////////////////////////// +// (detail) metafunction make_storage +// +// Provides an aligned storage type capable of holding any of the types +// specified in the given type-sequence. +// + +template +struct make_storage +{ +private: // helpers, for metafunction result (below) + + typedef typename mpl::eval_if< + NeverUsesBackupFlag + , mpl::identity< Types > + , mpl::push_front< + Types, backup_holder + > + >::type types; + + typedef typename max_value< + types, mpl::sizeof_ + >::type max_size; + +#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) + + typedef typename max_value< + types, alignment_of + >::type max_alignment; + +#else // borland + + // temporary workaround -- use maximal alignment + typedef mpl::size_t< -1 > max_alignment; + +#endif // borland workaround + +public: // metafunction result + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + + typedef ::boost::aligned_storage< + BOOST_MPL_AUX_VALUE_WKND(max_size)::value + , BOOST_MPL_AUX_VALUE_WKND(max_alignment)::value + > type; + +#else // MSVC7 and below + + BOOST_STATIC_CONSTANT(std::size_t, msvc_max_size_c = max_size::value); + BOOST_STATIC_CONSTANT(std::size_t, msvc_max_alignment_c = max_alignment::value); + + typedef ::boost::aligned_storage< + msvc_max_size_c + , msvc_max_alignment_c + > type; + +#endif // MSVC workaround + +}; + +#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) + +template<> +struct make_storage +{ + typedef int type; +}; + +#endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class destroyer +// +// Internal visitor that destroys the value it visits. +// +struct destroyer + : public static_visitor<> +{ +public: // visitor interfaces + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(T& operand, int) const + { + operand.~T(); + +#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) + operand; // suppresses warnings +#endif + + BOOST_VARIANT_AUX_RETURN_VOID; + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class template known_get +// +// Visitor that returns a reference to content of the specified type. +// +// Precondition: visited variant MUST contain logical content of type T. +// +template +class known_get + : public static_visitor +{ + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +public: // visitor interface + + T& operator()(T& operand) const + { + return operand; + } + + template + T& operator()(U&) const + { + // logical error to be here: see precondition above + BOOST_ASSERT(false); + return ::boost::detail::variant::forced_return< T& >(); + } + +#else // MSVC6 + +private: // helpers, for visitor interface (below) + + T& execute(T& operand, mpl::true_) const + { + return operand; + } + + template + T& execute(U& operand, mpl::false_) const + { + // logical error to be here: see precondition above + BOOST_ASSERT(false); + return ::boost::detail::variant::forced_return< T& >(); + } + +public: // visitor interface + + template + T& operator()(U& operand) const + { + typedef typename is_same< U,T >::type + U_is_T; + + return execute(operand, U_is_T()); + } + +#endif // MSVC6 workaround + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class copy_into +// +// Internal visitor that copies the value it visits into the given buffer. +// +class copy_into + : public static_visitor<> +{ +private: // representation + + void* storage_; + +public: // structors + + explicit copy_into(void* storage) + : storage_(storage) + { + } + +public: // internal visitor interface + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(boost::detail::variant::backup_holder& operand, long) const + { + new(storage_) T( operand.get() ); + BOOST_VARIANT_AUX_RETURN_VOID; + } + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(const boost::detail::variant::backup_holder& operand, long) const + { + new(storage_) T( operand.get() ); + BOOST_VARIANT_AUX_RETURN_VOID; + } + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(const T& operand, int) const + { + new(storage_) T(operand); + BOOST_VARIANT_AUX_RETURN_VOID; + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class assign_storage +// +// Internal visitor that assigns the given storage (which must be a +// constructed value of the same type) to the value it visits. +// +struct assign_storage + : public static_visitor<> +{ +private: // representation + + const void* rhs_storage_; + +public: // structors + + explicit assign_storage(const void* rhs_storage) + : rhs_storage_(rhs_storage) + { + } + +public: // internal visitor interfaces + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(backup_holder& lhs_content, long) const + { + lhs_content.get() + = static_cast< const backup_holder* >(rhs_storage_)->get(); + BOOST_VARIANT_AUX_RETURN_VOID; + } + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(const backup_holder& lhs_content, long) const + { + lhs_content.get() + = static_cast< const backup_holder* >(rhs_storage_)->get(); + BOOST_VARIANT_AUX_RETURN_VOID; + } + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(T& lhs_content, int) const + { + // NOTE TO USER : + // Compile error here indicates one of variant's bounded types does + // not meet the requirements of the Assignable concept. Thus, + // variant is not Assignable. + // + // Hint: Are any of the bounded types const-qualified or references? + // + lhs_content = *static_cast< const T* >(rhs_storage_); + BOOST_VARIANT_AUX_RETURN_VOID; + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class direct_assigner +// +// Generic static visitor that: if and only if the visited value is of the +// specified type, assigns the given value to the visited value and returns +// true; else returns false. +// +template +class direct_assigner + : public static_visitor +{ +private: // representation + + T& rhs_; + +public: // structors + + explicit direct_assigner(T& rhs) + : rhs_(rhs) + { + } + +#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) + +public: // visitor interface + + bool operator()(T& lhs) + { + lhs = rhs_; + return true; + } + + template + bool operator()(U&) + { + return false; + } + +#else // MSVC6 + +private: // helpers, for visitor interface (below) + + bool execute(T& lhs, mpl::true_) + { + lhs = rhs_; + return true; + } + + template + bool execute(U&, mpl::false_) + { + return false; + } + +public: // visitor interface + + template + bool operator()(U& lhs) + { + typedef typename is_same::type U_is_T; + return execute(lhs, U_is_T()); + } + +#endif // MSVC6 workaround + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class backup_assigner +// +// Internal visitor that "assigns" the given value to the visited value, +// using backup to recover if the destroy-copy sequence fails. +// +// NOTE: This needs to be a friend of variant, as it needs access to +// indicate_which, indicate_backup_which, etc. +// +template +class backup_assigner + : public static_visitor<> +{ +private: // representation + + Variant& lhs_; + int rhs_which_; + const RhsT& rhs_content_; + +public: // structors + + backup_assigner(Variant& lhs, int rhs_which, const RhsT& rhs_content) + : lhs_(lhs) + , rhs_which_(rhs_which) + , rhs_content_(rhs_content) + { + } + +private: // helpers, for visitor interface (below) + + template + void backup_assign_impl( + LhsT& lhs_content + , mpl::true_// has_nothrow_move + ) + { + // Move lhs content to backup... + LhsT backup_lhs_content( + ::boost::detail::variant::move(lhs_content) + ); // nothrow + + // ...destroy lhs content... + lhs_content.~LhsT(); // nothrow + + try + { + // ...and attempt to copy rhs content into lhs storage: + new(lhs_.storage_.address()) RhsT(rhs_content_); + } + catch (...) + { + // In case of failure, restore backup content to lhs storage... + new(lhs_.storage_.address()) + LhsT( + ::boost::detail::variant::move(backup_lhs_content) + ); // nothrow + + // ...and rethrow: + throw; + } + + // In case of success, indicate new content type: + lhs_.indicate_which(rhs_which_); // nothrow + } + + template + void backup_assign_impl( + LhsT& lhs_content + , mpl::false_// has_nothrow_move + ) + { + // Backup lhs content... + LhsT* backup_lhs_ptr = new LhsT(lhs_content); + + // ...destroy lhs content... + lhs_content.~LhsT(); // nothrow + + try + { + // ...and attempt to copy rhs content into lhs storage: + new(lhs_.storage_.address()) RhsT(rhs_content_); + } + catch (...) + { + // In case of failure, copy backup pointer to lhs storage... + new(lhs_.storage_.address()) + backup_holder( backup_lhs_ptr ); // nothrow + + // ...indicate now using backup... + lhs_.indicate_backup_which( lhs_.which() ); // nothrow + + // ...and rethrow: + throw; + } + + // In case of success, indicate new content type... + lhs_.indicate_which(rhs_which_); // nothrow + + // ...and delete backup: + delete backup_lhs_ptr; // nothrow + } + +public: // visitor interface + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(LhsT& lhs_content, int) + { + typedef typename has_nothrow_move_constructor::type + nothrow_move; + + backup_assign_impl( lhs_content, nothrow_move() ); + + BOOST_VARIANT_AUX_RETURN_VOID; + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class swap_with +// +// Visitor that swaps visited value with content of given variant. +// +// Precondition: Given variant MUST have same logical type as visited value. +// +template +struct swap_with + : public static_visitor<> +{ +private: // representation + + Variant& toswap_; + +public: // structors + + explicit swap_with(Variant& toswap) + : toswap_(toswap) + { + } + +public: // internal visitor interfaces + + template + void operator()(T& operand) const + { + // Since the precondition ensures types are same, get T... + known_get getter; + T& other = toswap_.apply_visitor(getter); + + // ...and swap: + ::boost::detail::variant::move_swap( operand, other ); + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class reflect +// +// Generic static visitor that performs a typeid on the value it visits. +// +class reflect + : public static_visitor +{ +public: // visitor interfaces + + template + const std::type_info& operator()(const T&) const + { + return typeid(T); + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class comparer +// +// Generic static visitor that compares the content of the given lhs variant +// with the visited rhs content using Comp. +// +// Precondition: lhs.which() == rhs.which() +// +template +class comparer + : public static_visitor +{ +private: // representation + + const Variant& lhs_; + +public: // structors + + explicit comparer(const Variant& lhs) + : lhs_(lhs) + { + } + +public: // visitor interfaces + + template + bool operator()(const T& rhs_content) const + { + // Since the precondition ensures lhs and rhs types are same, get T... + known_get getter; + const T& lhs_content = lhs_.apply_visitor(getter); + + // ...and compare lhs and rhs contents: + return Comp()(lhs_content, rhs_content); + } + +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class equal_comp +// +// Generic function object compares lhs with rhs using operator==. +// +struct equal_comp +{ + template + bool operator()(const T& lhs, const T& rhs) const + { + return lhs == rhs; + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class less_comp +// +// Generic function object compares lhs with rhs using operator<. +// +struct less_comp +{ + template + bool operator()(const T& lhs, const T& rhs) const + { + return lhs < rhs; + } +}; + +/////////////////////////////////////////////////////////////////////////////// +// (detail) class template invoke_visitor +// +// Internal visitor that invokes the given visitor using: +// * for wrappers (e.g., recursive_wrapper), the wrapper's held value. +// * for all other values, the value itself. +// +template +class invoke_visitor +{ +private: // representation + + Visitor& visitor_; + +public: // visitor typedefs + + typedef typename Visitor::result_type + result_type; + +public: // structors + + explicit invoke_visitor(Visitor& visitor) + : visitor_(visitor) + { + } + +#if !defined(BOOST_NO_VOID_RETURNS) + +public: // internal visitor interfaces + + template + result_type internal_visit(T& operand, int) + { + return visitor_(operand); + } + +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) + template + result_type internal_visit(const T& operand, int) + { + return visitor_(operand); + } +# endif + +#else // defined(BOOST_NO_VOID_RETURNS) + +private: // helpers, for internal visitor interfaces (below) + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + visit_impl(T& operand, mpl::false_) + { + return visitor_(operand); + } + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + visit_impl(T& operand, mpl::true_) + { + visitor_(operand); + BOOST_VARIANT_AUX_RETURN_VOID; + } + +public: // internal visitor interfaces + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(T& operand, int) + { + typedef typename is_same::type + has_void_result_type; + + return visit_impl(operand, has_void_result_type()); + } + +#endif // BOOST_NO_VOID_RETURNS) workaround + +public: // internal visitor interfaces, cont. + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(boost::recursive_wrapper& operand, long) + { + return internal_visit( operand.get(), 1L ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(const boost::recursive_wrapper& operand, long) + { + return internal_visit( operand.get(), 1L ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(boost::detail::reference_content& operand, long) + { + return internal_visit( operand.get(), 1L ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(const boost::detail::reference_content& operand, long) + { + return internal_visit( operand.get(), 1L ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(boost::detail::variant::backup_holder& operand, long) + { + return internal_visit( operand.get(), 1L ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) + internal_visit(const boost::detail::variant::backup_holder& operand, long) + { + return internal_visit( operand.get(), 1L ); + } + +}; + +}} // namespace detail::variant + +/////////////////////////////////////////////////////////////////////////////// +// class template variant (concept inspired by Andrei Alexandrescu) +// +// See docs and boost/variant/variant_fwd.hpp for more information. +// +template < + typename T0_ + , BOOST_VARIANT_ENUM_SHIFTED_PARAMS(typename T) + > +class variant +{ +private: // helpers, for typedefs (below) + + typedef variant wknd_self_t; + + struct is_recursive_ + : detail::variant::is_recursive_flag + { + }; + + typedef typename mpl::eval_if< + is_recursive_ + , T0_ + , mpl::identity< T0_ > + >::type unwrapped_T0_; + + struct is_sequence_based_ + : detail::variant::is_over_sequence + { + }; + +#if !defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) + +private: // helpers, for typedefs (below) + + typedef typename mpl::eval_if< + is_sequence_based_ + , unwrapped_T0_ // over_sequence<...>::type + , detail::variant::make_variant_list< + unwrapped_T0_ + , BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T) + > + >::type specified_types; + + BOOST_STATIC_ASSERT(( + ::boost::mpl::not_< mpl::empty >::value + )); + + typedef typename mpl::eval_if< + is_recursive_ + , mpl::transform< + specified_types + , mpl::protect< + detail::variant::quoted_enable_recursive + > + > + , mpl::identity< specified_types > + >::type recursive_enabled_types; + +public: // public typedefs + + typedef typename mpl::transform< + recursive_enabled_types + , unwrap_recursive + >::type types; + +private: // internal typedefs + + typedef typename mpl::transform< + recursive_enabled_types + , mpl::protect< detail::make_reference_content<> > + >::type internal_types; + + typedef typename mpl::front< + internal_types + >::type internal_T0; + +#else // defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) + +private: // helpers, for typedefs (below) + + typedef unwrapped_T0_ T0; + + #define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS(z,N,_) \ + typedef typename mpl::eval_if< \ + is_recursive_ \ + , detail::variant::enable_recursive< \ + BOOST_PP_CAT(T,N) \ + , wknd_self_t \ + > \ + , mpl::identity< BOOST_PP_CAT(T,N) > \ + >::type BOOST_PP_CAT(recursive_enabled_T,N); \ + /**/ + + BOOST_PP_REPEAT( + BOOST_VARIANT_LIMIT_TYPES + , BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS + , _ + ) + + #undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS + + #define BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS(z,N,_) \ + typedef typename unwrap_recursive< \ + BOOST_PP_CAT(recursive_enabled_T,N) \ + >::type BOOST_PP_CAT(public_T,N); \ + /**/ + + BOOST_PP_REPEAT( + BOOST_VARIANT_LIMIT_TYPES + , BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS + , _ + ) + + #undef BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS + +public: // public typedefs + + typedef typename detail::variant::make_variant_list< + BOOST_VARIANT_ENUM_PARAMS(public_T) + >::type types; + +private: // helpers, for internal typedefs (below) + + #define BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS(z,N,_) \ + typedef detail::make_reference_content< \ + BOOST_PP_CAT(recursive_enabled_T,N) \ + >::type BOOST_PP_CAT(internal_T,N); \ + /**/ + + BOOST_PP_REPEAT( + BOOST_VARIANT_LIMIT_TYPES + , BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS + , _ + ) + + #undef BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS + +private: // internal typedefs + + typedef typename detail::variant::make_variant_list< + BOOST_VARIANT_ENUM_PARAMS(internal_T) + >::type internal_types; + +private: // static precondition assertions + + // NOTE TO USER : + // variant< type-sequence > syntax is not supported on this compiler! + // + BOOST_MPL_ASSERT_NOT(( is_sequence_based_ )); + +#endif // BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT workaround + +private: // helpers, for representation (below) + + typedef typename detail::variant::find_fallback_type< + internal_types + >::type fallback_type_result_; + + typedef typename fallback_type_result_::first + fallback_type_index_; + typedef typename fallback_type_result_::second + fallback_type_; + + struct has_fallback_type_ + : mpl::not_< + is_same< fallback_type_, detail::variant::no_fallback_type > + > + { + }; + + typedef has_fallback_type_ + never_uses_backup_flag; + + typedef typename detail::variant::make_storage< + internal_types, never_uses_backup_flag + >::type storage_t; + +private: // helpers, for representation (below) + + // which_ on: + // * [0, size) indicates stack content + // * [-size, 0) indicates pointer to heap backup + // if which_ >= 0: + // * then which() -> which_ + // * else which() -> -(which_ + 1) + +#if !defined(BOOST_VARIANT_MINIMIZE_SIZE) + + typedef int which_t; + +#else // defined(BOOST_VARIANT_MINIMIZE_SIZE) + + // [if O1_size available, then attempt which_t size optimization...] + // [select signed char if fewer than SCHAR_MAX types, else signed int:] + typedef typename mpl::eval_if< + mpl::equal_to< mpl::O1_size, mpl::long_<-1> > + , mpl::identity< int > + , mpl::if_< + mpl::less< mpl::O1_size, mpl::int_ > + , signed char + , int + > + >::type which_t; + +#endif // BOOST_VARIANT_MINIMIZE_SIZE switch + +// representation -- private when possible +#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + private: +#else + public: +#endif + + which_t which_; + storage_t storage_; + + void indicate_which(int which) + { + which_ = static_cast( which ); + } + + void indicate_backup_which(int which) + { + which_ = static_cast( -(which + 1) ); + } + +private: // helpers, for queries (below) + + bool using_backup() const + { + return which_ < 0; + } + +public: // queries + + int which() const + { + // If using heap backup... + if (using_backup()) + // ...then return adjusted which_: + return -(which_ + 1); + + // Otherwise, return which_ directly: + return which_; + } + +private: // helpers, for structors (below) + + struct initializer + : BOOST_VARIANT_AUX_INITIALIZER_T( + recursive_enabled_types, recursive_enabled_T + ) + { + }; + + void destroy_content() + { + detail::variant::destroyer visitor; + this->internal_apply_visitor(visitor); + } + +public: // structors + + ~variant() + { + destroy_content(); + } + + variant() + { + // NOTE TO USER : + // Compile error from here indicates that the first bound + // type is not default-constructible, and so variant cannot + // support its own default-construction. + // + new( storage_.address() ) internal_T0(); + indicate_which(0); // zero is the index of the first bounded type + } + +private: // helpers, for structors, cont. (below) + + class convert_copy_into + : public static_visitor + { + private: // representation + + void* storage_; + + public: // structors + + explicit convert_copy_into(void* storage) + : storage_(storage) + { + } + + public: // internal visitor interfaces (below) + + template + int internal_visit(T& operand, int) const + { + // NOTE TO USER : + // Compile error here indicates one of the source variant's types + // cannot be unambiguously converted to the destination variant's + // types (or that no conversion exists). + // + return initializer::initialize(storage_, operand); + } + +# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) + template + result_type internal_visit(const T& operand, int) const + { + return initializer::initialize(storage_, operand); + } +# endif + + template + int internal_visit(boost::detail::reference_content& operand, long) const + { + return internal_visit( operand.get(), 1L ); + } + + template + int internal_visit(const boost::detail::reference_content& operand, long) const + { + return internal_visit( operand.get(), 1L ); + } + + template + int internal_visit(boost::detail::variant::backup_holder& operand, long) const + { + return internal_visit( operand.get(), 1L ); + } + + template + int internal_visit(const boost::detail::variant::backup_holder& operand, long) const + { + return internal_visit( operand.get(), 1L ); + } + + template + int internal_visit(boost::recursive_wrapper& operand, long) const + { + return internal_visit( operand.get(), 1L ); + } + + template + int internal_visit(const boost::recursive_wrapper& operand, long) const + { + return internal_visit( operand.get(), 1L ); + } + + }; + + friend class convert_copy_into; + +private: // helpers, for structors, below + + template + void convert_construct( + T& operand + , int + , mpl::false_ = mpl::false_() // is_foreign_variant + ) + { + // NOTE TO USER : + // Compile error here indicates that the given type is not + // unambiguously convertible to one of the variant's types + // (or that no conversion exists). + // + indicate_which( + initializer::initialize( + storage_.address() + , operand + ) + ); + } + + template + void convert_construct( + Variant& operand + , long + , mpl::true_// is_foreign_variant + ) + { + convert_copy_into visitor(storage_.address()); + indicate_which( + operand.internal_apply_visitor(visitor) + ); + } + + template + void convert_construct_variant(Variant& operand) + { + // [Determine if the given variant is itself a bounded type, or if its + // content needs to be converted (i.e., it is a 'foreign' variant):] + // + + typedef typename mpl::find_if< + types + , is_same< + add_const + , const Variant + > + >::type found_it; + + typedef typename mpl::end::type not_found; + typedef typename is_same< + found_it, not_found + >::type is_foreign_variant; + + // Convert construct from operand: + convert_construct( + operand, 1L + , is_foreign_variant() + ); + } + + template + void convert_construct( + boost::variant& operand + , long + ) + { + convert_construct_variant(operand); + } + + template + void convert_construct( + const boost::variant& operand + , long + ) + { + convert_construct_variant(operand); + } + +public: // structors, cont. + +#if !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) + + template + variant(const T& operand) + { + convert_construct(operand, 1L); + } + + template + variant(T& operand) + { + convert_construct(operand, 1L); + } + +#elif defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) + + // For compilers that cannot distinguish between T& and const T& in + // template constructors, but do fully support SFINAE, we can workaround: + + template + variant(const T& operand) + { + convert_construct(operand, 1L); + } + + template + variant( + T& operand + , typename enable_if< + mpl::not_< is_const > + , void + >::type* = 0 + ) + { + convert_construct(operand, 1L); + } + +#else // !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) + + // For compilers that cannot distinguish between T& and const T& in + // template constructors, and do NOT support SFINAE, we can't workaround: + + template + variant(const T& operand) + { + convert_construct(operand, 1L); + } + +#endif // BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING workarounds + +public: // structors, cont. + + // [MSVC6 requires copy constructor appear after template constructors] + variant(const variant& operand) + { + // Copy the value of operand into *this... + detail::variant::copy_into visitor( storage_.address() ); + operand.internal_apply_visitor(visitor); + + // ...and activate the *this's primary storage on success: + indicate_which(operand.which()); + } + +private: // helpers, for modifiers (below) + +# if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + template + friend class detail::variant::backup_assigner; +# endif + + // class assigner + // + // Internal visitor that "assigns" the visited value to the given variant + // by appropriate destruction and copy-construction. + // + + class assigner + : public static_visitor<> + { + private: // representation + + variant& lhs_; + int rhs_which_; + + public: // structors + + assigner(variant& lhs, int rhs_which) + : lhs_(lhs) + , rhs_which_(rhs_which) + { + } + + private: // helpers, for internal visitor interface (below) + + template + void assign_impl( + const RhsT& rhs_content + , mpl::true_// has_nothrow_copy + , B1// has_nothrow_move_constructor + , B2// has_fallback_type + ) + { + // Destroy lhs's content... + lhs_.destroy_content(); // nothrow + + // ...copy rhs content into lhs's storage... + new(lhs_.storage_.address()) + RhsT( rhs_content ); // nothrow + + // ...and indicate new content type: + lhs_.indicate_which(rhs_which_); // nothrow + } + + template + void assign_impl( + const RhsT& rhs_content + , mpl::false_// has_nothrow_copy + , mpl::true_// has_nothrow_move_constructor + , B// has_fallback_type + ) + { + // Attempt to make a temporary copy (so as to move it below)... + RhsT temp(rhs_content); + + // ...and upon success destroy lhs's content... + lhs_.destroy_content(); // nothrow + + // ...move the temporary copy into lhs's storage... + new(lhs_.storage_.address()) + RhsT( detail::variant::move(temp) ); // nothrow + + // ...and indicate new content type: + lhs_.indicate_which(rhs_which_); // nothrow + } + + template + void assign_impl( + const RhsT& rhs_content + , mpl::false_// has_nothrow_copy + , mpl::false_// has_nothrow_move_constructor + , mpl::true_// has_fallback_type + ) + { + // Destroy lhs's content... + lhs_.destroy_content(); // nothrow + + try + { + // ...and attempt to copy rhs's content into lhs's storage: + new(lhs_.storage_.address()) + RhsT( rhs_content ); + } + catch (...) + { + // In case of failure, default-construct fallback type in lhs's storage... + new (lhs_.storage_.address()) + fallback_type_; // nothrow + + // ...indicate construction of fallback type... + lhs_.indicate_which( + BOOST_MPL_AUX_VALUE_WKND(fallback_type_index_)::value + ); // nothrow + + // ...and rethrow: + throw; + } + + // In the event of success, indicate new content type: + lhs_.indicate_which(rhs_which_); // nothrow + } + + template + void assign_impl( + const RhsT& rhs_content + , mpl::false_// has_nothrow_copy + , mpl::false_// has_nothrow_move_constructor + , mpl::false_// has_fallback_type + ) + { + detail::variant::backup_assigner + visitor(lhs_, rhs_which_, rhs_content); + lhs_.internal_apply_visitor(visitor); + } + + public: // internal visitor interfaces + + template + BOOST_VARIANT_AUX_RETURN_VOID_TYPE + internal_visit(const RhsT& rhs_content, int) + { + typedef typename has_nothrow_copy::type + nothrow_copy; + typedef typename mpl::or_< // reduces compile-time + nothrow_copy + , detail::variant::has_nothrow_move_constructor + >::type nothrow_move_constructor; + + assign_impl( + rhs_content + , nothrow_copy() + , nothrow_move_constructor() + , has_fallback_type_() + ); + + BOOST_VARIANT_AUX_RETURN_VOID; + } + + }; + + friend class assigner; + + void variant_assign(const variant& rhs) + { + // If the contained types are EXACTLY the same... + if (which_ == rhs.which_) + { + // ...then assign rhs's storage to lhs's content: + detail::variant::assign_storage visitor(rhs.storage_.address()); + this->internal_apply_visitor(visitor); + } + else + { + // Otherwise, perform general (copy-based) variant assignment: + assigner visitor(*this, rhs.which()); + rhs.internal_apply_visitor(visitor); + } + } + +private: // helpers, for modifiers (below) + + template + void assign(const T& rhs) + { + // If direct T-to-T assignment is not possible... + detail::variant::direct_assigner direct_assign(rhs); + if (this->apply_visitor(direct_assign) == false) + { + // ...then convert rhs to variant and assign: + // + // While potentially inefficient, the following construction of a + // variant allows T as any type convertible to one of the bounded + // types without excessive code redundancy. + // + variant temp(rhs); + variant_assign( detail::variant::move(temp) ); + } + } + +public: // modifiers + + template + variant& operator=(const T& rhs) + { + assign(rhs); + return *this; + } + + // [MSVC6 requires copy assign appear after templated operator=] + variant& operator=(const variant& rhs) + { + variant_assign(rhs); + return *this; + } + + void swap(variant& rhs) + { + // If the contained types are the same... + if (which() == rhs.which()) + { + // ...then swap the values directly: + detail::variant::swap_with visitor(rhs); + this->apply_visitor(visitor); + } + else + { + // ...otherwise, perform general variant swap: + variant tmp( detail::variant::move(rhs) ); + rhs = detail::variant::move(*this); + *this = detail::variant::move(tmp); + } + } + +public: // queries + + // + // NOTE: member which() defined above. + // + + bool empty() const + { + return false; + } + + const std::type_info& type() const + { + detail::variant::reflect visitor; + return this->apply_visitor(visitor); + } + +public: // prevent comparison with foreign types + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + +# define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \ + void + +#else // MSVC7 + + // + // MSVC7 gives error about return types for above being different than + // the true comparison operator overloads: + // + +# define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \ + bool + +#endif // MSVC7 workaround + + template + BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE + operator==(const U&) const + { + BOOST_STATIC_ASSERT( false && sizeof(U) ); + } + + template + BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE + operator<(const U&) const + { + BOOST_STATIC_ASSERT( false && sizeof(U) ); + } + +public: // comparison operators + + // [MSVC6 requires these operators appear after template operators] + + bool operator==(const variant& rhs) const + { + if (this->which() != rhs.which()) + return false; + + detail::variant::comparer< + variant, detail::variant::equal_comp + > visitor(*this); + return rhs.apply_visitor(visitor); + } + + bool operator<(const variant& rhs) const + { + // + // Dirk Schreib suggested this collating order. + // + + if (this->which() != rhs.which()) + return this->which() < rhs.which(); + + detail::variant::comparer< + variant, detail::variant::less_comp + > visitor(*this); + return rhs.apply_visitor(visitor); + } + +// helpers, for visitation support (below) -- private when possible +#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + + template < BOOST_VARIANT_ENUM_PARAMS(typename U) > + friend class variant; + +private: + +#else// defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + +public: + +#endif// !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) + + template + static + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( + typename Visitor::result_type + ) + internal_apply_visitor_impl( + int internal_which + , int logical_which + , Visitor& visitor + , VoidPtrCV storage + ) + { + typedef mpl::int_<0> first_which; + typedef typename mpl::begin::type first_it; + typedef typename mpl::end::type last_it; + + typedef detail::variant::visitation_impl_step< + first_it, last_it + > first_step; + + return detail::variant::visitation_impl( + internal_which, logical_which + , visitor, storage, mpl::false_() + , never_uses_backup_flag() + , static_cast(0), static_cast(0) + ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( + typename Visitor::result_type + ) + internal_apply_visitor(Visitor& visitor) + { + return internal_apply_visitor_impl( + which_, which(), visitor, storage_.address() + ); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( + typename Visitor::result_type + ) + internal_apply_visitor(Visitor& visitor) const + { + return internal_apply_visitor_impl( + which_, which(), visitor, storage_.address() + ); + } + +public: // visitation support + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( + typename Visitor::result_type + ) + apply_visitor(Visitor& visitor) + { + detail::variant::invoke_visitor invoker(visitor); + return this->internal_apply_visitor(invoker); + } + + template + BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( + typename Visitor::result_type + ) + apply_visitor(Visitor& visitor) const + { + detail::variant::invoke_visitor invoker(visitor); + return this->internal_apply_visitor(invoker); + } + +}; // class variant + +/////////////////////////////////////////////////////////////////////////////// +// metafunction make_variant_over +// +// See docs and boost/variant/variant_fwd.hpp for more information. +// +template +struct make_variant_over +{ +private: // precondition assertions + +#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) + BOOST_STATIC_ASSERT(( ::boost::mpl::is_sequence::value )); +#endif + +public: // metafunction result + + typedef variant< + detail::variant::over_sequence< Types > + > type; + +}; + +/////////////////////////////////////////////////////////////////////////////// +// function template swap +// +// Swaps two variants of the same type (i.e., identical specification). +// +template < BOOST_VARIANT_ENUM_PARAMS(typename T) > +inline void swap( + variant< BOOST_VARIANT_ENUM_PARAMS(T) >& lhs + , variant< BOOST_VARIANT_ENUM_PARAMS(T) >& rhs + ) +{ + lhs.swap(rhs); +} + +} // namespace boost + +// implementation additions +#include "boost/variant/detail/variant_io.hpp" + +#endif // BOOST_VARIANT_VARIANT_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/variant/detail/bool_trait_def.hpp --- a/epoc32/include/stdapis/boost/variant/detail/bool_trait_def.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -//----------------------------------------------------------------------------- -// boost/variant/detail/bool_trait_def.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Needed until move-related traits incorporated into type_traits library. -// no include guards, the header is intended for multiple inclusion! - -// should be the last #include -#include "boost/type_traits/detail/bool_trait_def.hpp" - -#define BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1(trait,T,C) \ -template< typename T > struct trait \ - BOOST_TT_AUX_BOOL_C_BASE(C) \ -{ \ - BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ - BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ -}; \ -/**/ - -#define BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX(arity, name) \ -BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(arity, name) \ -/**/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/variant/detail/bool_trait_undef.hpp --- a/epoc32/include/stdapis/boost/variant/detail/bool_trait_undef.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -//----------------------------------------------------------------------------- -// boost/variant/detail/bool_trait_undef.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -// Needed until move-related traits incorporated into type_traits library. -// no include guards, the header is intended for multiple inclusion! - -// should be the last #include -#include "boost/type_traits/detail/bool_trait_undef.hpp" - - -#undef BOOST_VARIANT_TT_AUX_BOOL_TRAIT_DEF1 -#undef BOOST_VARIANT_TT_AUX_TRAIT_SUFFIX diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/variant/detail/config.hpp --- a/epoc32/include/stdapis/boost/variant/detail/config.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -//----------------------------------------------------------------------------- -// boost variant/detail/config.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2003 -// Eric Friedman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -#ifndef BOOST_VARIANT_DETAIL_CONFIG_HPP -#define BOOST_VARIANT_DETAIL_CONFIG_HPP - -#include "boost/config.hpp" -#include "boost/detail/workaround.hpp" - -/////////////////////////////////////////////////////////////////////////////// -// macro BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING -// -#if BOOST_WORKAROUND(__MWERKS__, <= 0x3201) \ - || BOOST_WORKAROUND(BOOST_INTEL, <= 700) \ - || BOOST_WORKAROUND(BOOST_MSVC, <= 1300) \ - && !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) -# define BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING -#endif - -/////////////////////////////////////////////////////////////////////////////// -// macro BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND -// -#if !defined(BOOST_NO_SFINAE) \ - && !BOOST_WORKAROUND(BOOST_INTEL, <= 700) \ - && !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) -# define BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND -#endif - -#endif // BOOST_VARIANT_DETAIL_CONFIG_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/variant/detail/move.hpp --- a/epoc32/include/stdapis/boost/variant/detail/move.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -//----------------------------------------------------------------------------- -// boost variant/detail/move.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 Eric Friedman -// Copyright (c) 2002 by Andrei Alexandrescu -// -// Use, modification and distribution are subject to the -// Boost Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) -// -// This file derivative of MoJO. Much thanks to Andrei for his initial work. -// See for information on MOJO. -// Re-issued here under the Boost Software License, with permission of the original -// author (Andrei Alexandrescu). - - -#ifndef BOOST_VARIANT_DETAIL_MOVE_HPP -#define BOOST_VARIANT_DETAIL_MOVE_HPP - -#include // for iterator_traits -#include // for placement new - -#include "boost/config.hpp" -#include "boost/detail/workaround.hpp" -#include "boost/mpl/if.hpp" -#include "boost/type_traits/is_base_and_derived.hpp" - -namespace boost { -namespace detail { namespace variant { - -////////////////////////////////////////////////////////////////////////// -// forward declares -// -// NOTE: Incomplete until (if?) Boost.Move becomes part of Boost. -// -template class moveable; -template class move_source; -template class move_return; - -namespace detail { - -// (detail) moveable_tag -// -// Concrete type from which moveable derives. -// -// TODO: Move into moveable_fwd.hpp and define has_move_constructor. -// -template -struct moveable_tag -{ -}; - -} // namespace detail - -////////////////////////////////////////////////////////////////////////// -// function template move -// -// Takes a T& and returns, if T derives moveable, a move_source for -// the object; else, returns the T&. -// - -namespace detail { - -// (detail) class template move_type -// -// Metafunction that, given moveable T, provides move_source, else T&. -// -template -struct move_type -{ -public: // metafunction result - - typedef typename mpl::if_< - is_base_and_derived, T> - , move_source - , T& - >::type type; - -}; - -} // namespace detail - -template -inline - typename detail::move_type::type -move(T& source) -{ - typedef typename detail::move_type::type - move_t; - - return move_t(source); -} - -////////////////////////////////////////////////////////////////////////// -// class template return_t -// -// Metafunction that, given moveable T, provides move_return, else T. -// -template -struct return_t -{ -public: // metafunction result - - typedef typename mpl::if_< - is_base_and_derived, T> - , move_return - , T - >::type type; - -}; - -////////////////////////////////////////////////////////////////////////// -// function template move_swap -// -// Swaps using Koenig lookup but falls back to move-swap for primitive -// types and on non-conforming compilers. -// - -#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) \ - || BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(2)) - -// [Indicate that move_swap by overload is disabled...] -#define BOOST_NO_MOVE_SWAP_BY_OVERLOAD - -// [...and provide straight swap-by-move implementation:] -template -inline void move_swap(T& lhs, T& rhs) -{ - T tmp( boost::detail::variant::move(lhs) ); - lhs = boost::detail::variant::move(rhs); - rhs = boost::detail::variant::move(tmp); -} - -#else// !workaround - -namespace detail { namespace move_swap { - -template -inline void swap(T& lhs, T& rhs) -{ - T tmp( boost::detail::variant::move(lhs) ); - lhs = boost::detail::variant::move(rhs); - rhs = boost::detail::variant::move(tmp); -} - -}} // namespace detail::move_swap - -template -inline void move_swap(T& lhs, T& rhs) -{ - using detail::move_swap::swap; - - swap(lhs, rhs); -} - -#endif // workaround - -}} // namespace detail::variant -} // namespace boost - -#endif // BOOST_VARIANT_DETAIL_MOVE_HPP - - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/variant/variant.hpp --- a/epoc32/include/stdapis/boost/variant/variant.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1833 +0,0 @@ -//----------------------------------------------------------------------------- -// boost variant/variant.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2002-2003 -// Eric Friedman, Itay Maman -// -// Distributed under the Boost Software License, Version 1.0. (See -// accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. -*/ -#ifndef BOOST_VARIANT_VARIANT_HPP -#define BOOST_VARIANT_VARIANT_HPP - -#include // for std::size_t -#include // for placement new -#ifdef __SYMBIAN32__ -#include -#endif -#include // for typeid, std::type_info - -#include "boost/variant/detail/config.hpp" -#include "boost/mpl/aux_/config/eti.hpp" -#include "boost/mpl/aux_/value_wknd.hpp" - -#include "boost/variant/variant_fwd.hpp" -#include "boost/variant/detail/backup_holder.hpp" -#include "boost/variant/detail/enable_recursive_fwd.hpp" -#include "boost/variant/detail/forced_return.hpp" -#include "boost/variant/detail/initializer.hpp" -#include "boost/variant/detail/make_variant_list.hpp" -#include "boost/variant/detail/over_sequence.hpp" -#include "boost/variant/detail/visitation_impl.hpp" - -#include "boost/variant/detail/generic_result_type.hpp" -#include "boost/variant/detail/has_nothrow_move.hpp" -#include "boost/variant/detail/move.hpp" - -#include "boost/detail/reference_content.hpp" -#include "boost/aligned_storage.hpp" -#include "boost/blank.hpp" -#include "boost/static_assert.hpp" -#include "boost/preprocessor/cat.hpp" -#include "boost/preprocessor/repeat.hpp" -#include "boost/type_traits/alignment_of.hpp" -#include "boost/type_traits/add_const.hpp" -#include "boost/type_traits/has_nothrow_constructor.hpp" -#include "boost/type_traits/has_nothrow_copy.hpp" -#include "boost/type_traits/is_const.hpp" -#include "boost/type_traits/is_same.hpp" -#include "boost/utility/enable_if.hpp" -#include "boost/variant/recursive_wrapper_fwd.hpp" -#include "boost/variant/static_visitor.hpp" - -#include "boost/mpl/eval_if.hpp" -#include "boost/mpl/begin_end.hpp" -#include "boost/mpl/bool.hpp" -#include "boost/mpl/empty.hpp" -#include "boost/mpl/find_if.hpp" -#include "boost/mpl/front.hpp" -#include "boost/mpl/identity.hpp" -#include "boost/mpl/if.hpp" -#include "boost/mpl/int.hpp" -#include "boost/mpl/is_sequence.hpp" -#include "boost/mpl/iterator_range.hpp" -#include "boost/mpl/iter_fold_if.hpp" -#include "boost/mpl/logical.hpp" -#include "boost/mpl/max_element.hpp" -#include "boost/mpl/next.hpp" -#include "boost/mpl/deref.hpp" -#include "boost/mpl/pair.hpp" -#include "boost/mpl/protect.hpp" -#include "boost/mpl/push_front.hpp" -#include "boost/mpl/same_as.hpp" -#include "boost/mpl/size_t.hpp" -#include "boost/mpl/sizeof.hpp" -#include "boost/mpl/transform.hpp" -#include "boost/mpl/assert.hpp" - -/////////////////////////////////////////////////////////////////////////////// -// Implementation Macros: -// -// BOOST_VARIANT_VISITATION_UNROLLING_LIMIT -// Defined in boost/variant/detail/visitation_impl.hpp. -// -// BOOST_VARIANT_MINIMIZE_SIZE -// When #defined, implementation employs all known means to minimize the -// size of variant obje cts. However, often unsuccessful due to alignment -// issues, and potentially harmful to runtime speed, so not enabled by -// default. (TODO: Investigate further.) - -#if defined(BOOST_VARIANT_MINIMIZE_SIZE) -# include // for SCHAR_MAX -# include "boost/mpl/eval_if.hpp" -# include "boost/mpl/equal_to.hpp" -# include "boost/mpl/identity.hpp" -# include "boost/mpl/int.hpp" -# include "boost/mpl/if.hpp" -# include "boost/mpl/less.hpp" -# include "boost/mpl/long.hpp" -# include "boost/mpl/O1_size.hpp" -#endif - - -namespace boost { - -namespace detail { namespace variant { - -/////////////////////////////////////////////////////////////////////////////// -// (detail) metafunction max_value -// -// Finds the maximum value of the unary metafunction F over Sequence. -// -template -struct max_value -{ -private: // helpers, for metafunction result (below) - - typedef typename mpl::transform1::type transformed_; - typedef typename mpl::max_element::type max_it; - -public: // metafunction result - - typedef typename mpl::deref::type - type; - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) metafunction find_fallback_type -// -// Provides a fallback (i.e., nothrow default-constructible) type from the -// specified sequence, or no_fallback_type if not found. -// -// This implementation is designed to prefer boost::blank over other potential -// fallback types, regardless of its position in the specified sequence. -// - -class no_fallback_type; - -struct find_fallback_type_pred -{ - template - struct apply - { - private: - typedef typename mpl::deref::type t_; - - public: - typedef mpl::not_< has_nothrow_constructor > type; - }; -}; - -template -struct find_fallback_type -{ -private: // helpers, for metafunction result (below) - - typedef typename mpl::end::type end_it; - - // [Find the first suitable fallback type...] - - typedef typename mpl::iter_fold_if< - Types - , mpl::int_<0>, mpl::protect< mpl::next<> > - , mpl::protect< find_fallback_type_pred > - >::type first_result_; - - typedef typename first_result_::first first_result_index; - typedef typename first_result_::second first_result_it; - - // [...now search the rest of the sequence for boost::blank...] - - typedef typename mpl::iter_fold_if< - mpl::iterator_range< first_result_it,end_it > - , first_result_index, mpl::protect< mpl::next<> > - , mpl::protect< mpl::not_same_as > - >::type second_result_; - - typedef typename second_result_::second second_result_it; - -public: // metafunction result - - // [...and return the results of the search:] - typedef typename mpl::eval_if< - is_same< second_result_it,end_it > - , mpl::if_< - is_same< first_result_it,end_it > - , mpl::pair< no_fallback_type,no_fallback_type > - , first_result_ - > - , mpl::identity< second_result_ > - >::type type; - -}; - -#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) - -template<> -struct find_fallback_type -{ - typedef mpl::pair< no_fallback_type,no_fallback_type > type; -}; - -#endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround - -/////////////////////////////////////////////////////////////////////////////// -// (detail) metafunction make_storage -// -// Provides an aligned storage type capable of holding any of the types -// specified in the given type-sequence. -// - -template -struct make_storage -{ -private: // helpers, for metafunction result (below) - - typedef typename mpl::eval_if< - NeverUsesBackupFlag - , mpl::identity< Types > - , mpl::push_front< - Types, backup_holder - > - >::type types; - - typedef typename max_value< - types, mpl::sizeof_ - >::type max_size; - -#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) - - typedef typename max_value< - types, alignment_of - >::type max_alignment; - -#else // borland - - // temporary workaround -- use maximal alignment - typedef mpl::size_t< -1 > max_alignment; - -#endif // borland workaround - -public: // metafunction result - -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - - typedef ::boost::aligned_storage< - BOOST_MPL_AUX_VALUE_WKND(max_size)::value - , BOOST_MPL_AUX_VALUE_WKND(max_alignment)::value - > type; - -#else // MSVC7 and below - - BOOST_STATIC_CONSTANT(std::size_t, msvc_max_size_c = max_size::value); - BOOST_STATIC_CONSTANT(std::size_t, msvc_max_alignment_c = max_alignment::value); - - typedef ::boost::aligned_storage< - msvc_max_size_c - , msvc_max_alignment_c - > type; - -#endif // MSVC workaround - -}; - -#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG) - -template<> -struct make_storage -{ - typedef int type; -}; - -#endif // BOOST_MPL_CFG_MSVC_60_ETI_BUG workaround - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class destroyer -// -// Internal visitor that destroys the value it visits. -// -struct destroyer - : public static_visitor<> -{ -public: // visitor interfaces - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(T& operand, int) const - { - operand.~T(); - -#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0551)) - operand; // suppresses warnings -#endif - - BOOST_VARIANT_AUX_RETURN_VOID; - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class template known_get -// -// Visitor that returns a reference to content of the specified type. -// -// Precondition: visited variant MUST contain logical content of type T. -// -template -class known_get - : public static_visitor -{ - -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - -public: // visitor interface - - T& operator()(T& operand) const - { - return operand; - } - - template - T& operator()(U&) const - { - // logical error to be here: see precondition above - BOOST_ASSERT(false); - return ::boost::detail::variant::forced_return< T& >(); - } - -#else // MSVC6 - -private: // helpers, for visitor interface (below) - - T& execute(T& operand, mpl::true_) const - { - return operand; - } - - template - T& execute(U& operand, mpl::false_) const - { - // logical error to be here: see precondition above - BOOST_ASSERT(false); - return ::boost::detail::variant::forced_return< T& >(); - } - -public: // visitor interface - - template - T& operator()(U& operand) const - { - typedef typename is_same< U,T >::type - U_is_T; - - return execute(operand, U_is_T()); - } - -#endif // MSVC6 workaround - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class copy_into -// -// Internal visitor that copies the value it visits into the given buffer. -// -class copy_into - : public static_visitor<> -{ -private: // representation - - void* storage_; - -public: // structors - - explicit copy_into(void* storage) - : storage_(storage) - { - } - -public: // internal visitor interface - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(boost::detail::variant::backup_holder& operand, long) const - { - new(storage_) T( operand.get() ); - BOOST_VARIANT_AUX_RETURN_VOID; - } - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(const boost::detail::variant::backup_holder& operand, long) const - { - new(storage_) T( operand.get() ); - BOOST_VARIANT_AUX_RETURN_VOID; - } - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(const T& operand, int) const - { - new(storage_) T(operand); - BOOST_VARIANT_AUX_RETURN_VOID; - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class assign_storage -// -// Internal visitor that assigns the given storage (which must be a -// constructed value of the same type) to the value it visits. -// -struct assign_storage - : public static_visitor<> -{ -private: // representation - - const void* rhs_storage_; - -public: // structors - - explicit assign_storage(const void* rhs_storage) - : rhs_storage_(rhs_storage) - { - } - -public: // internal visitor interfaces - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(backup_holder& lhs_content, long) const - { - lhs_content.get() - = static_cast< const backup_holder* >(rhs_storage_)->get(); - BOOST_VARIANT_AUX_RETURN_VOID; - } - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(const backup_holder& lhs_content, long) const - { - lhs_content.get() - = static_cast< const backup_holder* >(rhs_storage_)->get(); - BOOST_VARIANT_AUX_RETURN_VOID; - } - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(T& lhs_content, int) const - { - // NOTE TO USER : - // Compile error here indicates one of variant's bounded types does - // not meet the requirements of the Assignable concept. Thus, - // variant is not Assignable. - // - // Hint: Are any of the bounded types const-qualified or references? - // - lhs_content = *static_cast< const T* >(rhs_storage_); - BOOST_VARIANT_AUX_RETURN_VOID; - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class direct_assigner -// -// Generic static visitor that: if and only if the visited value is of the -// specified type, assigns the given value to the visited value and returns -// true; else returns false. -// -template -class direct_assigner - : public static_visitor -{ -private: // representation - - T& rhs_; - -public: // structors - - explicit direct_assigner(T& rhs) - : rhs_(rhs) - { - } - -#if !BOOST_WORKAROUND(BOOST_MSVC, < 1300) - -public: // visitor interface - - bool operator()(T& lhs) - { - lhs = rhs_; - return true; - } - - template - bool operator()(U&) - { - return false; - } - -#else // MSVC6 - -private: // helpers, for visitor interface (below) - - bool execute(T& lhs, mpl::true_) - { - lhs = rhs_; - return true; - } - - template - bool execute(U&, mpl::false_) - { - return false; - } - -public: // visitor interface - - template - bool operator()(U& lhs) - { - typedef typename is_same::type U_is_T; - return execute(lhs, U_is_T()); - } - -#endif // MSVC6 workaround - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class backup_assigner -// -// Internal visitor that "assigns" the given value to the visited value, -// using backup to recover if the destroy-copy sequence fails. -// -// NOTE: This needs to be a friend of variant, as it needs access to -// indicate_which, indicate_backup_which, etc. -// -template -class backup_assigner - : public static_visitor<> -{ -private: // representation - - Variant& lhs_; - int rhs_which_; - const RhsT& rhs_content_; - -public: // structors - - backup_assigner(Variant& lhs, int rhs_which, const RhsT& rhs_content) - : lhs_(lhs) - , rhs_which_(rhs_which) - , rhs_content_(rhs_content) - { - } - -private: // helpers, for visitor interface (below) - - template - void backup_assign_impl( - LhsT& lhs_content - , mpl::true_// has_nothrow_move - ) - { - // Move lhs content to backup... - LhsT backup_lhs_content( - ::boost::detail::variant::move(lhs_content) - ); // nothrow - - // ...destroy lhs content... - lhs_content.~LhsT(); // nothrow - - try - { - // ...and attempt to copy rhs content into lhs storage: - new(lhs_.storage_.address()) RhsT(rhs_content_); - } - catch (...) - { - // In case of failure, restore backup content to lhs storage... - new(lhs_.storage_.address()) - LhsT( - ::boost::detail::variant::move(backup_lhs_content) - ); // nothrow - - // ...and rethrow: - throw; - } - - // In case of success, indicate new content type: - lhs_.indicate_which(rhs_which_); // nothrow - } - - template - void backup_assign_impl( - LhsT& lhs_content - , mpl::false_// has_nothrow_move - ) - { - // Backup lhs content... - LhsT* backup_lhs_ptr = new LhsT(lhs_content); - - // ...destroy lhs content... - lhs_content.~LhsT(); // nothrow - - try - { - // ...and attempt to copy rhs content into lhs storage: - new(lhs_.storage_.address()) RhsT(rhs_content_); - } - catch (...) - { - // In case of failure, copy backup pointer to lhs storage... - new(lhs_.storage_.address()) - backup_holder( backup_lhs_ptr ); // nothrow - - // ...indicate now using backup... - lhs_.indicate_backup_which( lhs_.which() ); // nothrow - - // ...and rethrow: - throw; - } - - // In case of success, indicate new content type... - lhs_.indicate_which(rhs_which_); // nothrow - - // ...and delete backup: - delete backup_lhs_ptr; // nothrow - } - -public: // visitor interface - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(LhsT& lhs_content, int) - { - typedef typename has_nothrow_move_constructor::type - nothrow_move; - - backup_assign_impl( lhs_content, nothrow_move() ); - - BOOST_VARIANT_AUX_RETURN_VOID; - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class swap_with -// -// Visitor that swaps visited value with content of given variant. -// -// Precondition: Given variant MUST have same logical type as visited value. -// -template -struct swap_with - : public static_visitor<> -{ -private: // representation - - Variant& toswap_; - -public: // structors - - explicit swap_with(Variant& toswap) - : toswap_(toswap) - { - } - -public: // internal visitor interfaces - - template - void operator()(T& operand) const - { - // Since the precondition ensures types are same, get T... - known_get getter; - T& other = toswap_.apply_visitor(getter); - - // ...and swap: - ::boost::detail::variant::move_swap( operand, other ); - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class reflect -// -// Generic static visitor that performs a typeid on the value it visits. -// -class reflect - : public static_visitor -{ -public: // visitor interfaces - - template - const std::type_info& operator()(const T&) const - { - return typeid(T); - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class comparer -// -// Generic static visitor that compares the content of the given lhs variant -// with the visited rhs content using Comp. -// -// Precondition: lhs.which() == rhs.which() -// -template -class comparer - : public static_visitor -{ -private: // representation - - const Variant& lhs_; - -public: // structors - - explicit comparer(const Variant& lhs) - : lhs_(lhs) - { - } - -public: // visitor interfaces - - template - bool operator()(const T& rhs_content) const - { - // Since the precondition ensures lhs and rhs types are same, get T... - known_get getter; - const T& lhs_content = lhs_.apply_visitor(getter); - - // ...and compare lhs and rhs contents: - return Comp()(lhs_content, rhs_content); - } - -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class equal_comp -// -// Generic function object compares lhs with rhs using operator==. -// -struct equal_comp -{ - template - bool operator()(const T& lhs, const T& rhs) const - { - return lhs == rhs; - } -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class less_comp -// -// Generic function object compares lhs with rhs using operator<. -// -struct less_comp -{ - template - bool operator()(const T& lhs, const T& rhs) const - { - return lhs < rhs; - } -}; - -/////////////////////////////////////////////////////////////////////////////// -// (detail) class template invoke_visitor -// -// Internal visitor that invokes the given visitor using: -// * for wrappers (e.g., recursive_wrapper), the wrapper's held value. -// * for all other values, the value itself. -// -template -class invoke_visitor -{ -private: // representation - - Visitor& visitor_; - -public: // visitor typedefs - - typedef typename Visitor::result_type - result_type; - -public: // structors - - explicit invoke_visitor(Visitor& visitor) - : visitor_(visitor) - { - } - -#if !defined(BOOST_NO_VOID_RETURNS) - -public: // internal visitor interfaces - - template - result_type internal_visit(T& operand, int) - { - return visitor_(operand); - } - -# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) - template - result_type internal_visit(const T& operand, int) - { - return visitor_(operand); - } -# endif - -#else // defined(BOOST_NO_VOID_RETURNS) - -private: // helpers, for internal visitor interfaces (below) - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - visit_impl(T& operand, mpl::false_) - { - return visitor_(operand); - } - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - visit_impl(T& operand, mpl::true_) - { - visitor_(operand); - BOOST_VARIANT_AUX_RETURN_VOID; - } - -public: // internal visitor interfaces - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(T& operand, int) - { - typedef typename is_same::type - has_void_result_type; - - return visit_impl(operand, has_void_result_type()); - } - -#endif // BOOST_NO_VOID_RETURNS) workaround - -public: // internal visitor interfaces, cont. - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(boost::recursive_wrapper& operand, long) - { - return internal_visit( operand.get(), 1L ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(const boost::recursive_wrapper& operand, long) - { - return internal_visit( operand.get(), 1L ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(boost::detail::reference_content& operand, long) - { - return internal_visit( operand.get(), 1L ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(const boost::detail::reference_content& operand, long) - { - return internal_visit( operand.get(), 1L ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(boost::detail::variant::backup_holder& operand, long) - { - return internal_visit( operand.get(), 1L ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE(result_type) - internal_visit(const boost::detail::variant::backup_holder& operand, long) - { - return internal_visit( operand.get(), 1L ); - } - -}; - -}} // namespace detail::variant - -/////////////////////////////////////////////////////////////////////////////// -// class template variant (concept inspired by Andrei Alexandrescu) -// -// See docs and boost/variant/variant_fwd.hpp for more information. -// -template < - typename T0_ - , BOOST_VARIANT_ENUM_SHIFTED_PARAMS(typename T) - > -class variant -{ -private: // helpers, for typedefs (below) - - typedef variant wknd_self_t; - - struct is_recursive_ - : detail::variant::is_recursive_flag - { - }; - - typedef typename mpl::eval_if< - is_recursive_ - , T0_ - , mpl::identity< T0_ > - >::type unwrapped_T0_; - - struct is_sequence_based_ - : detail::variant::is_over_sequence - { - }; - -#if !defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) - -private: // helpers, for typedefs (below) - - typedef typename mpl::eval_if< - is_sequence_based_ - , unwrapped_T0_ // over_sequence<...>::type - , detail::variant::make_variant_list< - unwrapped_T0_ - , BOOST_VARIANT_ENUM_SHIFTED_PARAMS(T) - > - >::type specified_types; - - BOOST_STATIC_ASSERT(( - ::boost::mpl::not_< mpl::empty >::value - )); - - typedef typename mpl::eval_if< - is_recursive_ - , mpl::transform< - specified_types - , mpl::protect< - detail::variant::quoted_enable_recursive - > - > - , mpl::identity< specified_types > - >::type recursive_enabled_types; - -public: // public typedefs - - typedef typename mpl::transform< - recursive_enabled_types - , unwrap_recursive - >::type types; - -private: // internal typedefs - - typedef typename mpl::transform< - recursive_enabled_types - , mpl::protect< detail::make_reference_content<> > - >::type internal_types; - - typedef typename mpl::front< - internal_types - >::type internal_T0; - -#else // defined(BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT) - -private: // helpers, for typedefs (below) - - typedef unwrapped_T0_ T0; - - #define BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS(z,N,_) \ - typedef typename mpl::eval_if< \ - is_recursive_ \ - , detail::variant::enable_recursive< \ - BOOST_PP_CAT(T,N) \ - , wknd_self_t \ - > \ - , mpl::identity< BOOST_PP_CAT(T,N) > \ - >::type BOOST_PP_CAT(recursive_enabled_T,N); \ - /**/ - - BOOST_PP_REPEAT( - BOOST_VARIANT_LIMIT_TYPES - , BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS - , _ - ) - - #undef BOOST_VARIANT_AUX_ENABLE_RECURSIVE_TYPEDEFS - - #define BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS(z,N,_) \ - typedef typename unwrap_recursive< \ - BOOST_PP_CAT(recursive_enabled_T,N) \ - >::type BOOST_PP_CAT(public_T,N); \ - /**/ - - BOOST_PP_REPEAT( - BOOST_VARIANT_LIMIT_TYPES - , BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS - , _ - ) - - #undef BOOST_VARIANT_AUX_UNWRAP_RECURSIVE_TYPEDEFS - -public: // public typedefs - - typedef typename detail::variant::make_variant_list< - BOOST_VARIANT_ENUM_PARAMS(public_T) - >::type types; - -private: // helpers, for internal typedefs (below) - - #define BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS(z,N,_) \ - typedef detail::make_reference_content< \ - BOOST_PP_CAT(recursive_enabled_T,N) \ - >::type BOOST_PP_CAT(internal_T,N); \ - /**/ - - BOOST_PP_REPEAT( - BOOST_VARIANT_LIMIT_TYPES - , BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS - , _ - ) - - #undef BOOST_VARIANT_AUX_MAKE_REFERENCE_CONTENT_TYPEDEFS - -private: // internal typedefs - - typedef typename detail::variant::make_variant_list< - BOOST_VARIANT_ENUM_PARAMS(internal_T) - >::type internal_types; - -private: // static precondition assertions - - // NOTE TO USER : - // variant< type-sequence > syntax is not supported on this compiler! - // - BOOST_MPL_ASSERT_NOT(( is_sequence_based_ )); - -#endif // BOOST_VARIANT_NO_TYPE_SEQUENCE_SUPPORT workaround - -private: // helpers, for representation (below) - - typedef typename detail::variant::find_fallback_type< - internal_types - >::type fallback_type_result_; - - typedef typename fallback_type_result_::first - fallback_type_index_; - typedef typename fallback_type_result_::second - fallback_type_; - - struct has_fallback_type_ - : mpl::not_< - is_same< fallback_type_, detail::variant::no_fallback_type > - > - { - }; - - typedef has_fallback_type_ - never_uses_backup_flag; - - typedef typename detail::variant::make_storage< - internal_types, never_uses_backup_flag - >::type storage_t; - -private: // helpers, for representation (below) - - // which_ on: - // * [0, size) indicates stack content - // * [-size, 0) indicates pointer to heap backup - // if which_ >= 0: - // * then which() -> which_ - // * else which() -> -(which_ + 1) - -#if !defined(BOOST_VARIANT_MINIMIZE_SIZE) - - typedef int which_t; - -#else // defined(BOOST_VARIANT_MINIMIZE_SIZE) - - // [if O1_size available, then attempt which_t size optimization...] - // [select signed char if fewer than SCHAR_MAX types, else signed int:] - typedef typename mpl::eval_if< - mpl::equal_to< mpl::O1_size, mpl::long_<-1> > - , mpl::identity< int > - , mpl::if_< - mpl::less< mpl::O1_size, mpl::int_ > - , signed char - , int - > - >::type which_t; - -#endif // BOOST_VARIANT_MINIMIZE_SIZE switch - -// representation -- private when possible -#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) - private: -#else - public: -#endif - - which_t which_; - storage_t storage_; - - void indicate_which(int which) - { - which_ = static_cast( which ); - } - - void indicate_backup_which(int which) - { - which_ = static_cast( -(which + 1) ); - } - -private: // helpers, for queries (below) - - bool using_backup() const - { - return which_ < 0; - } - -public: // queries - - int which() const - { - // If using heap backup... - if (using_backup()) - // ...then return adjusted which_: - return -(which_ + 1); - - // Otherwise, return which_ directly: - return which_; - } - -private: // helpers, for structors (below) - - struct initializer - : BOOST_VARIANT_AUX_INITIALIZER_T( - recursive_enabled_types, recursive_enabled_T - ) - { - }; - - void destroy_content() - { - detail::variant::destroyer visitor; - this->internal_apply_visitor(visitor); - } - -public: // structors - - ~variant() - { - destroy_content(); - } - - variant() - { - // NOTE TO USER : - // Compile error from here indicates that the first bound - // type is not default-constructible, and so variant cannot - // support its own default-construction. - // - new( storage_.address() ) internal_T0(); - indicate_which(0); // zero is the index of the first bounded type - } - -private: // helpers, for structors, cont. (below) - - class convert_copy_into - : public static_visitor - { - private: // representation - - void* storage_; - - public: // structors - - explicit convert_copy_into(void* storage) - : storage_(storage) - { - } - - public: // internal visitor interfaces (below) - - template - int internal_visit(T& operand, int) const - { - // NOTE TO USER : - // Compile error here indicates one of the source variant's types - // cannot be unambiguously converted to the destination variant's - // types (or that no conversion exists). - // - return initializer::initialize(storage_, operand); - } - -# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) - template - result_type internal_visit(const T& operand, int) const - { - return initializer::initialize(storage_, operand); - } -# endif - - template - int internal_visit(boost::detail::reference_content& operand, long) const - { - return internal_visit( operand.get(), 1L ); - } - - template - int internal_visit(const boost::detail::reference_content& operand, long) const - { - return internal_visit( operand.get(), 1L ); - } - - template - int internal_visit(boost::detail::variant::backup_holder& operand, long) const - { - return internal_visit( operand.get(), 1L ); - } - - template - int internal_visit(const boost::detail::variant::backup_holder& operand, long) const - { - return internal_visit( operand.get(), 1L ); - } - - template - int internal_visit(boost::recursive_wrapper& operand, long) const - { - return internal_visit( operand.get(), 1L ); - } - - template - int internal_visit(const boost::recursive_wrapper& operand, long) const - { - return internal_visit( operand.get(), 1L ); - } - - }; - - friend class convert_copy_into; - -private: // helpers, for structors, below - - template - void convert_construct( - T& operand - , int - , mpl::false_ = mpl::false_() // is_foreign_variant - ) - { - // NOTE TO USER : - // Compile error here indicates that the given type is not - // unambiguously convertible to one of the variant's types - // (or that no conversion exists). - // - indicate_which( - initializer::initialize( - storage_.address() - , operand - ) - ); - } - - template - void convert_construct( - Variant& operand - , long - , mpl::true_// is_foreign_variant - ) - { - convert_copy_into visitor(storage_.address()); - indicate_which( - operand.internal_apply_visitor(visitor) - ); - } - - template - void convert_construct_variant(Variant& operand) - { - // [Determine if the given variant is itself a bounded type, or if its - // content needs to be converted (i.e., it is a 'foreign' variant):] - // - - typedef typename mpl::find_if< - types - , is_same< - add_const - , const Variant - > - >::type found_it; - - typedef typename mpl::end::type not_found; - typedef typename is_same< - found_it, not_found - >::type is_foreign_variant; - - // Convert construct from operand: - convert_construct( - operand, 1L - , is_foreign_variant() - ); - } - - template - void convert_construct( - boost::variant& operand - , long - ) - { - convert_construct_variant(operand); - } - - template - void convert_construct( - const boost::variant& operand - , long - ) - { - convert_construct_variant(operand); - } - -public: // structors, cont. - -#if !defined(BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING) - - template - variant(const T& operand) - { - convert_construct(operand, 1L); - } - - template - variant(T& operand) - { - convert_construct(operand, 1L); - } - -#elif defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) - - // For compilers that cannot distinguish between T& and const T& in - // template constructors, but do fully support SFINAE, we can workaround: - - template - variant(const T& operand) - { - convert_construct(operand, 1L); - } - - template - variant( - T& operand - , typename enable_if< - mpl::not_< is_const > - , void - >::type* = 0 - ) - { - convert_construct(operand, 1L); - } - -#else // !defined(BOOST_VARIANT_AUX_HAS_CONSTRUCTOR_TEMPLATE_ORDERING_SFINAE_WKND) - - // For compilers that cannot distinguish between T& and const T& in - // template constructors, and do NOT support SFINAE, we can't workaround: - - template - variant(const T& operand) - { - convert_construct(operand, 1L); - } - -#endif // BOOST_VARIANT_AUX_BROKEN_CONSTRUCTOR_TEMPLATE_ORDERING workarounds - -public: // structors, cont. - - // [MSVC6 requires copy constructor appear after template constructors] - variant(const variant& operand) - { - // Copy the value of operand into *this... - detail::variant::copy_into visitor( storage_.address() ); - operand.internal_apply_visitor(visitor); - - // ...and activate the *this's primary storage on success: - indicate_which(operand.which()); - } - -private: // helpers, for modifiers (below) - -# if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) - template - friend class detail::variant::backup_assigner; -# endif - - // class assigner - // - // Internal visitor that "assigns" the visited value to the given variant - // by appropriate destruction and copy-construction. - // - - class assigner - : public static_visitor<> - { - private: // representation - - variant& lhs_; - int rhs_which_; - - public: // structors - - assigner(variant& lhs, int rhs_which) - : lhs_(lhs) - , rhs_which_(rhs_which) - { - } - - private: // helpers, for internal visitor interface (below) - - template - void assign_impl( - const RhsT& rhs_content - , mpl::true_// has_nothrow_copy - , B1// has_nothrow_move_constructor - , B2// has_fallback_type - ) - { - // Destroy lhs's content... - lhs_.destroy_content(); // nothrow - - // ...copy rhs content into lhs's storage... - new(lhs_.storage_.address()) - RhsT( rhs_content ); // nothrow - - // ...and indicate new content type: - lhs_.indicate_which(rhs_which_); // nothrow - } - - template - void assign_impl( - const RhsT& rhs_content - , mpl::false_// has_nothrow_copy - , mpl::true_// has_nothrow_move_constructor - , B// has_fallback_type - ) - { - // Attempt to make a temporary copy (so as to move it below)... - RhsT temp(rhs_content); - - // ...and upon success destroy lhs's content... - lhs_.destroy_content(); // nothrow - - // ...move the temporary copy into lhs's storage... - new(lhs_.storage_.address()) - RhsT( detail::variant::move(temp) ); // nothrow - - // ...and indicate new content type: - lhs_.indicate_which(rhs_which_); // nothrow - } - - template - void assign_impl( - const RhsT& rhs_content - , mpl::false_// has_nothrow_copy - , mpl::false_// has_nothrow_move_constructor - , mpl::true_// has_fallback_type - ) - { - // Destroy lhs's content... - lhs_.destroy_content(); // nothrow - - try - { - // ...and attempt to copy rhs's content into lhs's storage: - new(lhs_.storage_.address()) - RhsT( rhs_content ); - } - catch (...) - { - // In case of failure, default-construct fallback type in lhs's storage... - new (lhs_.storage_.address()) - fallback_type_; // nothrow - - // ...indicate construction of fallback type... - lhs_.indicate_which( - BOOST_MPL_AUX_VALUE_WKND(fallback_type_index_)::value - ); // nothrow - - // ...and rethrow: - throw; - } - - // In the event of success, indicate new content type: - lhs_.indicate_which(rhs_which_); // nothrow - } - - template - void assign_impl( - const RhsT& rhs_content - , mpl::false_// has_nothrow_copy - , mpl::false_// has_nothrow_move_constructor - , mpl::false_// has_fallback_type - ) - { - detail::variant::backup_assigner - visitor(lhs_, rhs_which_, rhs_content); - lhs_.internal_apply_visitor(visitor); - } - - public: // internal visitor interfaces - - template - BOOST_VARIANT_AUX_RETURN_VOID_TYPE - internal_visit(const RhsT& rhs_content, int) - { - typedef typename has_nothrow_copy::type - nothrow_copy; - typedef typename mpl::or_< // reduces compile-time - nothrow_copy - , detail::variant::has_nothrow_move_constructor - >::type nothrow_move_constructor; - - assign_impl( - rhs_content - , nothrow_copy() - , nothrow_move_constructor() - , has_fallback_type_() - ); - - BOOST_VARIANT_AUX_RETURN_VOID; - } - - }; - - friend class assigner; - - void variant_assign(const variant& rhs) - { - // If the contained types are EXACTLY the same... - if (which_ == rhs.which_) - { - // ...then assign rhs's storage to lhs's content: - detail::variant::assign_storage visitor(rhs.storage_.address()); - this->internal_apply_visitor(visitor); - } - else - { - // Otherwise, perform general (copy-based) variant assignment: - assigner visitor(*this, rhs.which()); - rhs.internal_apply_visitor(visitor); - } - } - -private: // helpers, for modifiers (below) - - template - void assign(const T& rhs) - { - // If direct T-to-T assignment is not possible... - detail::variant::direct_assigner direct_assign(rhs); - if (this->apply_visitor(direct_assign) == false) - { - // ...then convert rhs to variant and assign: - // - // While potentially inefficient, the following construction of a - // variant allows T as any type convertible to one of the bounded - // types without excessive code redundancy. - // - variant temp(rhs); - variant_assign( detail::variant::move(temp) ); - } - } - -public: // modifiers - - template - variant& operator=(const T& rhs) - { - assign(rhs); - return *this; - } - - // [MSVC6 requires copy assign appear after templated operator=] - variant& operator=(const variant& rhs) - { - variant_assign(rhs); - return *this; - } - - void swap(variant& rhs) - { - // If the contained types are the same... - if (which() == rhs.which()) - { - // ...then swap the values directly: - detail::variant::swap_with visitor(rhs); - this->apply_visitor(visitor); - } - else - { - // ...otherwise, perform general variant swap: - variant tmp( detail::variant::move(rhs) ); - rhs = detail::variant::move(*this); - *this = detail::variant::move(tmp); - } - } - -public: // queries - - // - // NOTE: member which() defined above. - // - - bool empty() const - { - return false; - } - - const std::type_info& type() const - { - detail::variant::reflect visitor; - return this->apply_visitor(visitor); - } - -public: // prevent comparison with foreign types - -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - -# define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \ - void - -#else // MSVC7 - - // - // MSVC7 gives error about return types for above being different than - // the true comparison operator overloads: - // - -# define BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE \ - bool - -#endif // MSVC7 workaround - - template - BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE - operator==(const U&) const - { - BOOST_STATIC_ASSERT( false && sizeof(U) ); - } - - template - BOOST_VARIANT_AUX_FAIL_COMPARISON_RETURN_TYPE - operator<(const U&) const - { - BOOST_STATIC_ASSERT( false && sizeof(U) ); - } - -public: // comparison operators - - // [MSVC6 requires these operators appear after template operators] - - bool operator==(const variant& rhs) const - { - if (this->which() != rhs.which()) - return false; - - detail::variant::comparer< - variant, detail::variant::equal_comp - > visitor(*this); - return rhs.apply_visitor(visitor); - } - - bool operator<(const variant& rhs) const - { - // - // Dirk Schreib suggested this collating order. - // - - if (this->which() != rhs.which()) - return this->which() < rhs.which(); - - detail::variant::comparer< - variant, detail::variant::less_comp - > visitor(*this); - return rhs.apply_visitor(visitor); - } - -// helpers, for visitation support (below) -- private when possible -#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) - - template < BOOST_VARIANT_ENUM_PARAMS(typename U) > - friend class variant; - -private: - -#else// defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) - -public: - -#endif// !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) - - template - static - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( - typename Visitor::result_type - ) - internal_apply_visitor_impl( - int internal_which - , int logical_which - , Visitor& visitor - , VoidPtrCV storage - ) - { - typedef mpl::int_<0> first_which; - typedef typename mpl::begin::type first_it; - typedef typename mpl::end::type last_it; - - typedef detail::variant::visitation_impl_step< - first_it, last_it - > first_step; - - return detail::variant::visitation_impl( - internal_which, logical_which - , visitor, storage, mpl::false_() - , never_uses_backup_flag() - , static_cast(0), static_cast(0) - ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( - typename Visitor::result_type - ) - internal_apply_visitor(Visitor& visitor) - { - return internal_apply_visitor_impl( - which_, which(), visitor, storage_.address() - ); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( - typename Visitor::result_type - ) - internal_apply_visitor(Visitor& visitor) const - { - return internal_apply_visitor_impl( - which_, which(), visitor, storage_.address() - ); - } - -public: // visitation support - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( - typename Visitor::result_type - ) - apply_visitor(Visitor& visitor) - { - detail::variant::invoke_visitor invoker(visitor); - return this->internal_apply_visitor(invoker); - } - - template - BOOST_VARIANT_AUX_GENERIC_RESULT_TYPE( - typename Visitor::result_type - ) - apply_visitor(Visitor& visitor) const - { - detail::variant::invoke_visitor invoker(visitor); - return this->internal_apply_visitor(invoker); - } - -}; // class variant - -/////////////////////////////////////////////////////////////////////////////// -// metafunction make_variant_over -// -// See docs and boost/variant/variant_fwd.hpp for more information. -// -template -struct make_variant_over -{ -private: // precondition assertions - -#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1300) - BOOST_STATIC_ASSERT(( ::boost::mpl::is_sequence::value )); -#endif - -public: // metafunction result - - typedef variant< - detail::variant::over_sequence< Types > - > type; - -}; - -/////////////////////////////////////////////////////////////////////////////// -// function template swap -// -// Swaps two variants of the same type (i.e., identical specification). -// -template < BOOST_VARIANT_ENUM_PARAMS(typename T) > -inline void swap( - variant< BOOST_VARIANT_ENUM_PARAMS(T) >& lhs - , variant< BOOST_VARIANT_ENUM_PARAMS(T) >& rhs - ) -{ - lhs.swap(rhs); -} - -} // namespace boost - -// implementation additions -#include "boost/variant/detail/variant_io.hpp" - -#endif // BOOST_VARIANT_VARIANT_HPP diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/boost/version.hpp --- a/epoc32/include/stdapis/boost/version.hpp Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -// Boost version.hpp configuration header file ------------------------------// - -// (C) Copyright John maddock 1999. Distributed under the Boost -// Software License, Version 1.0. (See accompanying file -// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// See http://www.boost.org/libs/config for documentation - -#ifndef BOOST_VERSION_HPP -#define BOOST_VERSION_HPP - -// -// Caution, this is the only boost header that is guarenteed -// to change with every boost release, including this header -// will cause a recompile every time a new boost version is -// released. -// -// BOOST_VERSION % 100 is the sub-minor version -// BOOST_VERSION / 100 % 1000 is the minor version -// BOOST_VERSION / 100000 is the major version - -#define BOOST_VERSION 103400 - -// -// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION -// but as a *string* in the form "x_y" where x is the major version -// number and y is the minor version number. This is used by -// to select which library version to link to. - -#define BOOST_LIB_VERSION "1_34" - -#endif - - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/float.h --- a/epoc32/include/stdapis/float.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/*- - * Copyright (c) 1989 Regents of the University of California. - * All rights reserved. - * - * 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. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. - * - * from: @(#)float.h 7.1 (Berkeley) 5/8/90 - * $FreeBSD: src/sys/arm/include/float.h,v 1.5 2005/03/20 00:34:24 cognet Exp $ - */ - -#ifndef _MACHINE_FLOAT_H_ -#define _MACHINE_FLOAT_H_ 1 - -#include - -__BEGIN_DECLS -extern int __flt_rounds(void); -__END_DECLS - -#define FLT_RADIX 2 /* b */ -#define FLT_ROUNDS -1 -#define FLT_EVAL_METHOD (-1) /* XXX */ -#define DECIMAL_DIG 17 /* max precision in decimal digits */ - -#define FLT_MANT_DIG 24 /* p */ -#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ -#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ -#define FLT_MIN_EXP (-125) /* emin */ -#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ -#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ -#define FLT_MAX_EXP 128 /* emax */ -#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ -#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ - -#define DBL_MANT_DIG 53 -#define DBL_EPSILON 2.2204460492503131E-16 -#define DBL_DIG 15 -#define DBL_MIN_EXP (-1021) -#define DBL_MIN 2.2250738585072014E-308 -#define DBL_MIN_10_EXP (-307) -#define DBL_MAX_EXP 1024 -#define DBL_MAX 1.7976931348623157E+308 -#define DBL_MAX_10_EXP 308 - -#define LDBL_MANT_DIG DBL_MANT_DIG -#define LDBL_EPSILON DBL_EPSILON -#define LDBL_DIG DBL_DIG -#define LDBL_MIN_EXP DBL_MIN_EXP -#define LDBL_MIN DBL_MIN -#define LDBL_MIN_10_EXP DBL_MIN_10_EXP -#define LDBL_MAX_EXP DBL_MAX_EXP -#define LDBL_MAX DBL_MAX -#define LDBL_MAX_10_EXP DBL_MAX_10_EXP -#endif /* _MACHINE_FLOAT_H_ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/algorithm --- a/epoc32/include/stdapis/stlport/algorithm Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_ALGORITHM -#define _STLP_ALGORITHM - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x1 -# include -# endif - -#ifdef _STLP_PRAGMA_ONCE -# pragma once -#endif - -# if ! defined (_STLP_USE_NAMESPACES) -// remove() conflicts, should always go first -# include -# endif - -# ifndef _STLP_INTERNAL_ALGO_H -# include -# endif - -#if defined (_STLP_IMPORT_VENDOR_STD) -# include _STLP_NATIVE_HEADER(algorithm) -#endif /* _STLP_IMPORT_VENDOR_STD */ - -# if (_STLP_OUTERMOST_HEADER_ID == 0x1 ) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_ALGORITHM */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/bitset --- a/epoc32/include/stdapis/stlport/bitset Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* - * Copyright (c) 1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_BITSET -#define _STLP_BITSET - -// This implementation of bitset<> has a second template parameter, -// _WordT, which defaults to unsigned long. *YOU SHOULD NOT USE -// THIS FEATURE*. It is experimental, and it may be removed in -// future releases. - -// A bitset of size N, using words of type _WordT, will have -// N % (sizeof(_WordT) * CHAR_BIT) unused bits. (They are the high- -// order bits in the highest word.) It is a class invariant -// of class bitset<> that those unused bits are always zero. - -// Most of the actual code isn't contained in bitset<> itself, but in the -// base class _Base_bitset. The base class works with whole words, not with -// individual bits. This allows us to specialize _Base_bitset for the -// important special case where the bitset is only a single word. - -// The C++ standard does not define the precise semantics of operator[]. -// In this implementation the const version of operator[] is equivalent -// to test(), except that it does no range checking. The non-const version -// returns a reference to a bit, again without doing any range checking. - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x2 -# include -# endif - -#ifdef _STLP_PRAGMA_ONCE -# pragma once -#endif - -# include - -# if (_STLP_OUTERMOST_HEADER_ID == 0x2 ) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_BITSET */ - - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/cassert --- a/epoc32/include/stdapis/stlport/cassert Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x103 -# include -# endif - - -# if defined (_STLP_USE_NEW_C_HEADERS) || defined (__IN_STLPORT_CASSERT) -# include _STLP_NATIVE_CPP_C_HEADER(cassert) -# else -# include -# endif - - -# if (_STLP_OUTERMOST_HEADER_ID == 0x103 ) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/config/_gcc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlport/config/_gcc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,461 @@ +/* STLport configuration file + * It is internal STLport header - DO NOT include it directly + */ + +#define _STLP_COMPILER "gcc" + +/* Systems having GLIBC installed have different traits */ +#if defined (__linux__) +# ifndef _STLP_USE_GLIBC +# define _STLP_USE_GLIBC 1 +# endif +# if defined (__UCLIBC__) && !defined (_STLP_USE_UCLIBC) +# define _STLP_USE_UCLIBC 1 +# endif +#endif + +#if defined (__CYGWIN__) && \ + (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3) && !defined (_GLIBCPP_USE_C99) +# define _STLP_NO_VENDOR_MATH_L +# define _STLP_NO_VENDOR_STDLIB_L +#endif + +#if (__GNUC__ < 3) +# define _STLP_NO_VENDOR_STDLIB_L +#endif + +/* We guess if we are using the cygwin distrib that has a special include schema. + * There is no way to distinguish a cygwin distrib used in no-cygwin mode from a + * mingw install. We are forced to use a configuration option + */ +#if !defined (_STLP_NATIVE_INCLUDE_PATH) && \ + (defined (__CYGWIN__) || defined (__MINGW32__) && defined (_STLP_NO_CYGWIN)) +# if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)) +# define _STLP_NATIVE_INCLUDE_PATH ../../../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/include/c++ +# elif defined (_STLP_NO_CYGWIN) +# define _STLP_NATIVE_INCLUDE_PATH ../mingw +/*# else + * Before version gcc 3.4, the cygwin package include path was conform to the + * GNU convention which is set later in this file. + */ +# endif +#endif + +#if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) +/* define for gcc versions before 3.4.0. */ +# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD +#endif + +/* azov: gcc on lynx have a bug that causes internal + * compiler errors when compiling STLport with namespaces turned on. + * When the compiler gets better - comment out _STLP_HAS_NO_NAMESPACES + */ +#if defined (__Lynx__) && (__GNUC__ < 3) +# define _STLP_HAS_NO_NAMESPACES 1 +# define _STLP_NO_STATIC_TEMPLATE_DATA 1 +/* turn off useless warning about including system headers */ +# define __NO_INCLUDE_WARN__ 1 +#endif + +/* Tru64 Unix, AIX, HP : gcc there by default uses native ld and hence cannot auto-instantiate + static template data. If you are using GNU ld, please say so in stl_user_config.h header */ +#if (__GNUC__ < 3) && !defined(_STLP_GCC_USES_GNU_LD) && \ + ((defined (__osf__) && defined (__alpha__)) || defined (_AIX) || defined (__hpux) || defined(__amigaos__) ) +# define _STLP_NO_STATIC_TEMPLATE_DATA +#endif + +#if !defined (_REENTRANT) && (defined (_THREAD_SAFE) || \ + (defined (__OpenBSD__) && defined (_POSIX_THREADS)) || \ + (defined (__MINGW32__) && defined (_MT))) +# define _REENTRANT +#endif + +#if defined (__DJGPP) +# define _STLP_RAND48 1 +# define _NOTHREADS 1 +# undef _PTHREADS +# define _STLP_LITTLE_ENDIAN +#endif + +#if defined (__MINGW32__) +/* Mingw32, egcs compiler using the Microsoft C runtime */ +# undef _STLP_NO_DRAND48 +# define _STLP_NO_DRAND48 +# define _STLP_CALL + +# if defined (_STLP_NEW_PLATFORM_SDK) +/* For the moment the Windows SDK coming with Mingw still mimik the old platform SDK. */ +# undef _STLP_NEW_PLATFORM_SDK +# endif +#endif /* __MINGW32__ */ + +#if defined (__CYGWIN__) || defined (__MINGW32__) +# if !defined (_STLP_USE_STATIC_LIB) +# define _STLP_USE_DECLSPEC 1 +# if !defined (_STLP_USE_DYNAMIC_LIB) +# define _STLP_USE_DYNAMIC_LIB +# endif +# define _STLP_EXPORT_DECLSPEC __declspec(dllexport) +# define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport) +# define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport) +# endif +/* The following is defined independently of _STLP_USE_STATIC_LIB because it is also + * used to import symbols from PSDK under MinGW + */ +# define _STLP_IMPORT_DECLSPEC __declspec(dllimport) +#endif + +#if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun) || defined(__APPLE__)) +# if !defined (__MINGW32__) && !defined (__CYGWIN__) +# define _STLP_NO_NATIVE_MBSTATE_T 1 +# endif +# if !defined (__MINGW32__) || (__GNUC__ < 3) || (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) +# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 +# endif +# define _STLP_NO_NATIVE_WIDE_STREAMS 1 +#endif + +#define _STLP_NORETURN_FUNCTION __attribute__((noreturn)) + +/* Mac OS X is a little different with namespaces and cannot instantiate + * static data members in template classes */ +#if defined (__APPLE__) +# if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))) +/* Mac OS X is missing a required typedef and standard macro */ +typedef unsigned int wint_t; +# endif + +# define __unix + +# if (__GNUC__ < 3) + + /* Mac OS X needs one and only one source file to initialize all static data + * members in template classes. Only one source file in an executable or + * library can declare instances for such data members, otherwise duplicate + * symbols will be generated. */ + +# define _STLP_NO_STATIC_TEMPLATE_DATA +# define _STLP_STATIC_CONST_INIT_BUG 1 +# define _STLP_STATIC_TEMPLATE_DATA 0 +# define _STLP_WEAK_ATTRIBUTE 1 + /* Workaround for the broken Mac OS X C++ preprocessor which cannot handle + * parameterized macros in #include statements */ +# define _STLP_NATIVE_HEADER(header) <../g++/##header##> +# define _STLP_NATIVE_C_HEADER(header) <../include/##header##> +# define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##> +# define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##> +# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##> +# endif /* __GNUC__ < 3 */ + +# define _STLP_NO_LONG_DOUBLE + +/* Mac OS X needs all "::" scope references to be "std::" */ +# define _STLP_USE_NEW_C_HEADERS + +# define _STLP_NO_VENDOR_STDLIB_L + +#endif /* __APPLE__ */ + + +#if defined(__BEOS__) && defined(__INTEL__) +# define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##> +# define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##> +# define _STLP_NATIVE_CPP_C_HEADER(header) <../stlport/beos/##header##> +# define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../stlport/beos/##header##> +# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../stlport/beos/##header##> +# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 +# define _STLP_NO_NATIVE_WIDE_STREAMS 1 +/* +# define _NOTHREADS 1 +*/ +# ifdef _PTHREADS +# undef _PTHREADS +# endif +# ifdef _STLP_PTHREADS +# undef _STLP_PTHREADS +# endif +# define _STLP_USE_STDIO_IO 1 +# define _STLP_USE_GLIBC 1 +#endif + +/* g++ 2.7.x and above */ +#define _STLP_LONG_LONG long long + +#ifdef _STLP_USE_UCLIBC +/* +# ifndef __DO_C99_MATH__ +*/ + /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */ +# define _STLP_NO_VENDOR_MATH_F + /* No *l math fuctions variants (i.e. sqrtl, fabsl, etc.) */ +# define _STLP_NO_VENDOR_MATH_L +# define _STLP_NO_LONG_DOUBLE +/* +# endif +*/ +#endif + +#if defined (__OpenBSD__) || defined (__FreeBSD__) +# define _STLP_NO_VENDOR_MATH_L +# define _STLP_NO_VENDOR_STDLIB_L /* no llabs */ +# ifndef __unix +# define __unix +# endif +#endif + +#if defined (__alpha__) +# define _STLP_NO_VENDOR_MATH_L +# define _STLP_NO_IEC559_SUPPORT +#endif + +#if defined (__hpux) +# define _STLP_NO_VENDOR_STDLIB_L /* no llabs */ + /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */ +# define _STLP_NO_VENDOR_MATH_F +#endif + +#if (__GNUC__ >= 3) +# ifndef _STLP_HAS_NO_NEW_C_HEADERS +/* +# ifndef _STLP_USE_UCLIBC +*/ +# define _STLP_HAS_NATIVE_FLOAT_ABS +/* +# endif +*/ +# else +# ifdef _STLP_USE_GLIBC +# define _STLP_VENDOR_LONG_DOUBLE_MATH 1 +# endif +# endif +#endif + +#if (__GNUC__ < 3) +# define _STLP_HAS_NO_NEW_C_HEADERS 1 +# define _STLP_VENDOR_GLOBAL_CSTD 1 +# define _STLP_DONT_USE_PTHREAD_SPINLOCK 1 +# ifndef __HONOR_STD +# define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1 +# endif +/* egcs fails to initialize builtin types in expr. like this : new(p) char(); */ +# define _STLP_DEF_CONST_PLCT_NEW_BUG 1 +#endif + +/* +#define _STLP_VENDOR_GLOBAL_CSTD 1 +*/ + +#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) +# define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT +# define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT +# define _STLP_DEF_CONST_DEF_PARAM_BUG 1 +#else +# undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT +# undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT +#endif + +#if (__GNUC_MINOR__ < 9) && (__GNUC__ < 3) /* gcc 2.8 */ +# define _STLP_NO_TEMPLATE_CONVERSIONS +# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 +# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 +# define _STLP_NO_FRIEND_TEMPLATES 1 +# define _STLP_HAS_NO_NAMESPACES 1 +# define _STLP_NO_METHOD_SPECIALIZATION 1 +# define _STLP_NO_MEMBER_TEMPLATES 1 +# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +# define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS +/* DJGPP doesn't seem to implement it in 2.8.x */ +# ifdef DJGPP +# define _STLP_NO_STATIC_TEMPLATE_DATA 1 +# endif +#endif + +#if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7 && !defined (__CYGWIN32__) +/* Will it work with 2.6 ? I doubt it. */ +# if ( __GNUC_MINOR__ < 6 ) +__GIVE_UP_WITH_STL(GCC_272); +# endif + +# define _STLP_NO_RELOPS_NAMESPACE +# define _STLP_NON_TYPE_TMPL_PARAM_BUG +# define _STLP_LIMITED_DEFAULT_TEMPLATES 1 +# define _STLP_DEFAULT_TYPE_PARAM 1 +# define _STLP_NO_BAD_ALLOC +# define _STLP_NO_ARROW_OPERATOR 1 +# ifndef _STLP_NO_STATIC_TEMPLATE_DATA +# define _STLP_NO_STATIC_TEMPLATE_DATA +# endif +# define _STLP_STATIC_CONST_INIT_BUG 1 +# define _STLP_NO_METHOD_SPECIALIZATION 1 + +# if !defined (__CYGWIN32__) +# define _STLP_NESTED_TYPE_PARAM_BUG 1 +# define _STLP_BASE_MATCH_BUG 1 +/* unused operators are required (forward) */ +# define _STLP_CONST_CONSTRUCTOR_BUG +# define _STLP_NO_DEFAULT_NON_TYPE_PARAM +# endif +# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1 +# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 +# define _STLP_NO_EXCEPTION_HEADER 1 +#else /* ! <= 2.7.* */ +#endif /* ! <= 2.7.* */ + +/* static template data members workaround strategy for gcc tries + * to use weak symbols. + * if you don't want to use that, #define _STLP_WEAK_ATTRIBUTE=0 ( you'll + * have to put "#define __PUT_STATIC_DATA_MEMBERS_HERE" line in one of your + * compilation unit ( or CFLAGS for it ) _before_ including any STL header ). + */ +#if defined (_STLP_NO_STATIC_TEMPLATE_DATA) && ! defined (_STLP_WEAK_ATTRIBUTE ) +/* systems using GNU ld or format that supports weak symbols + may use "weak" attribute + Linux & Solaris ( x86 & SPARC ) are being auto-recognized here */ +# if defined(_STLP_GNU_LD) || defined(__ELF__) || defined (__CYGWIN__) || \ + (( defined (__SVR4) || defined ( __svr4__ )) && \ + ( defined (sun) || defined ( __sun__ ))) +# define _STLP_WEAK_ATTRIBUTE 1 +# endif +#endif /* _STLP_WEAK_ATTRIBUTE */ + + +/* strict ANSI prohibits "long long" ( gcc) */ +#if defined ( __STRICT_ANSI__ ) +# undef _STLP_LONG_LONG +/* +# define _STLP_STRICT_ANSI 1 +*/ +#endif + +/* +#if !defined (__STRICT_ANSI__) || defined (__BUILDING_STLPORT) +# define _STLP_USE_TEMPLATE_EXPORT +# define _STLP_EXPORT_TEMPLATE_KEYWORD extern +# define _STLP_IMPORT_TEMPLATE_KEYWORD extern +#endif +*/ + +#ifndef __EXCEPTIONS +# undef _STLP_DONT_USE_EXCEPTIONS +# define _STLP_DONT_USE_EXCEPTIONS 1 +#endif + +#if (__GNUC__ >= 3) + +# if !defined (_STLP_NATIVE_INCLUDE_PATH) +# if ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__)))) +# define _STLP_NATIVE_INCLUDE_PATH ../g++-v3 +# else +# if ( ((__GNUC__ == 4 ) || (__GNUC_MINOR__ >= 3)) && defined(__APPLE_CC__)) +# define _STLP_NATIVE_INCLUDE_PATH ../c++ +/* +* Before version 3.4.0 the 0 patch level was not part of the include path: +*/ +# elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \ + (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ + (__GNUC__ > 3)) +# define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__ +# else +# define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__ +# endif +# endif +# endif + +/* Instantiation scheme that used (default) in gcc 3 made void of sense explicit + instantiation within library: nothing except increased library size. - ptr + */ +# define _STLP_NO_FORCE_INSTANTIATE + +#elif (__GNUC_MINOR__ < 8) + +# if !defined (_STLP_NATIVE_INCLUDE_PATH) +# define _STLP_NATIVE_INCLUDE_PATH ../g++-include +# endif + +/* tuning of static template data members workaround */ +# if ( _STLP_STATIC_TEMPLATE_DATA < 1 ) +# if ( _STLP_WEAK_ATTRIBUTE > 0 ) +# define _STLP_WEAK __attribute__ (( weak )) +# else +# define _STLP_WEAK +# endif /* _STLP_WEAK_ATTRIBUTE */ + +# ifdef __PUT_STATIC_DATA_MEMBERS_HERE +# define __DECLARE_INSTANCE(type,item,init) type item _STLP_WEAK init +# else +# define __DECLARE_INSTANCE(type,item,init) +# endif /* __PUT_STATIC_DATA_MEMBERS_HERE */ +# endif /* _STLP_STATIC_TEMPLATE_DATA */ + +#else + +/* gcc-2.95.0 used to use "g++-3" directory which has been changed to "g++" in + * system-dependent "include" for 2.95.2 except for Cygwin and Mingw packages. + * I expect "g++-3" not being used in later releases. + * If your installation use "g++-3" include directory for any reason (pre-2.95.2 or Win binary kit), + * please change the macro below to point to your directory. + */ + +# if !defined (_STLP_NATIVE_INCLUDE_PATH) +# if defined(__DJGPP) +# define _STLP_NATIVE_INCLUDE_PATH ../lang/cxx +# elif (__GNUC__ >= 3) || (__GNUC_MINOR__ >= 97) +# define _STLP_NATIVE_INCLUDE_PATH ../include/g++-v3 +# elif ((__GNUC_MINOR__ >= 95 && __GNUC_MINOR__ < 97) && \ + !( defined (__FreeBSD__) || defined (__NetBSD__) || defined(__sgi) || defined (__OS2__) ) ) +# define _STLP_NATIVE_INCLUDE_PATH ../g++-3 +# elif (__GNUC_MINOR__ > 8) && (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) && !defined( __Lynx__ ) +/* this really sucks, as GNUpro does not really identifies itself, so we have to guess + * depending on a platform + */ +# ifdef __hpux +# define _STLP_NATIVE_INCLUDE_PATH ../g++-3 +# else +# define _STLP_NATIVE_INCLUDE_PATH ../g++-2 +# endif +# else +# define _STLP_NATIVE_INCLUDE_PATH g++ +# endif +# endif + +/* et al */ +# ifdef __FreeBSD__ +# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) +# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include +# endif +# else +/* azov */ +# ifndef __Lynx__ +# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97) +/* +# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../g++-v3 +*/ +# else +# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include +# endif +# endif +# endif + +#endif /* GNUC_MINOR < 8 */ + +#if !defined (_STLP_NATIVE_C_INCLUDE_PATH) +# define _STLP_NATIVE_C_INCLUDE_PATH ../include +#endif + +/* Tune settings for the case where static template data members are not + * instaniated by default + */ +#if defined ( _STLP_NO_STATIC_TEMPLATE_DATA ) +# define _STLP_STATIC_TEMPLATE_DATA 0 +# if !defined ( _STLP_WEAK_ATTRIBUTE ) +# define _STLP_WEAK_ATTRIBUTE 0 +# endif +# ifdef __PUT_STATIC_DATA_MEMBERS_HERE +# define __DECLARE_INSTANCE(type,item,init) type item init +# else +# define __DECLARE_INSTANCE(type,item,init) +# endif +#else +# define _STLP_STATIC_TEMPLATE_DATA 1 +#endif + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/config/stl_confix.h --- a/epoc32/include/stdapis/stlport/config/stl_confix.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* - * STLport configuration file - * It is internal STLport header - DO NOT include it directly - * Purpose of this file : to define STLport settings that depend on - * compiler flags or can be otherwise missed - * - */ - -#ifndef _STLP_CONFIX_H -# define _STLP_CONFIX_H - -/* If, by any chance, C compiler gets there, try to help it to pass smoothly */ -# if ! defined (__cplusplus) && ! defined (_STLP_HAS_NO_NAMESPACES) -# define _STLP_HAS_NO_NAMESPACES -# endif - -# if defined(__MINGW32__) -# define _STLP_NO_DRAND48 -# endif - -/* Modena C++ library */ -#if defined (__MWERKS__) && __MWERKS__ <= 0x2303 || (defined (__KCC) && __KCC_VERSION < 3400) -# include -# define _STLP_USE_MSIPL 1 -# if defined (__KCC) || (defined(__MSL_CPP__) && \ - ( (__MSL_CPP__ >= 0x5000 && defined( _MSL_NO_MESSAGE_FACET )) || \ - (__MSL_CPP__ < 0x5000 && defined( MSIPL_NL_TYPES ))) \ - ) -# define _STLP_NO_NATIVE_MESSAGE_FACET 1 -# endif -#endif - -/* common switches for EDG front-end */ -# if defined (__EDG_SWITCHES) -# if !(defined(_TYPENAME) || defined (_TYPENAME_IS_KEYWORD)) -# undef _STLP_NEED_TYPENAME -# define _STLP_NEED_TYPENAME 1 -# endif -# if !defined(_WCHAR_T_IS_KEYWORD) -# undef _STLP_NO_WCHAR_T -# define _STLP_NO_WCHAR_T 1 -# endif -# ifndef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES -# undef _STLP_NO_CLASS_PARTIAL_SPECIALIZATION -# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 -# endif -# ifndef _MEMBER_TEMPLATES -# undef _STLP_NO_MEMBER_TEMPLATES -# define _STLP_NO_MEMBER_TEMPLATES 1 -# undef _STLP_NO_MEMBER_TEMPLATE_CLASSES -# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 -# endif -# if !defined(_MEMBER_TEMPLATE_KEYWORD) -# undef _STLP_NO_MEMBER_TEMPLATE_KEYWORD -# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 -# endif -# if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS) -# undef _STLP_HAS_NO_EXCEPTIONS -# define _STLP_HAS_NO_EXCEPTIONS -# endif -# undef __EDG_SWITCHES -# endif /* EDG */ -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/config/stl_gcce.h --- a/epoc32/include/stdapis/stlport/config/stl_gcce.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,244 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* 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. -* Neither the name of Nokia Corporation nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. - -* 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 HOLDER 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. -* -* Description: -* -*/ - -// ============================================================================= -// stl_gcce.h -// This is a list of settings for STLport specific to the GCCE compiler. -// Do not include this file directly. -// ============================================================================= - -# ifndef _STLP_GCCE_H -# define _STLP_GCCE_H - - -#if defined(__WINS__) -# pragma warning ( disable : 4018 4097 4100 4127 4244 4284 4511 4512 4514 4786 4800 ) //4355 4284 4231 4511 4512 4097 4786 4800 4018 4146 4244 4514 4127 4100 4663) -# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 -// Uncomment if partial order of template functions is not available -# define _STLP_NO_FUNC_PARTIAL_ORDERING 1 -#endif - -#ifndef _STLP_NO_IOSTREAMS -//# define _STLP_NO_IOSTREAMS 1 -#endif - -//# undef _STLP_OWN_IOSTREAMS -//#define _STLP_OWN_IOSTREAMS -#define _STLP_USE_NEW_IOSTREAMS -//# define _STLP_NO_NATIVE_MBSTATE_T 1 -//# define _NOTHREADS 1 -//# define _STLP_NO_TYPEINFO 1 - -#ifndef __PLACEMENT_NEW_INLINE -#ifndef __E32STD_H__ -#ifdef __cplusplus -inline void * operator new(unsigned int, void *_P) throw() { return (_P); } -inline void operator delete(void* /*aPtr*/, void* /*aBase*/) __NO_THROW {} -#endif -#define __PLACEMENT_NEW_INLINE -#endif // E32STD_H -#endif - - -//========================================================== - -// the values choosen here as defaults try to give -// maximum functionality on the most conservative settings - -// Mostly correct guess, change it for Alpha (and other environments -// that has 64-bit "long") -# define _STLP_UINT32_T unsigned long - - -// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. -// # define _STLP_WCHAR_T_IS_USHORT 1 - -// Uncomment if long long is available - # define _STLP_LONG_LONG long long - -// Uncomment if long double is not available -// # define _STLP_NO_LONG_DOUBLE 1 - -// Uncomment this if your compiler does not support namespaces -//# define _STLP_HAS_NO_NAMESPACES 1 - -// Uncomment if "using" keyword does not work with template types -// # define _STLP_BROKEN_USING_DIRECTIVE 1 - -// Uncomment this if your compiler does not support exceptions -//# define _STLP_HAS_NO_EXCEPTIONS 1 -//# define _STLP_USE_TRAP_LEAVE 1 - -// Header that comes with the compiler -// does not define bad_alloc exception -//#if defined(__WINS__) -// Possibly required ??? -# define _STLP_NO_BAD_ALLOC 1 -//#endif - -// Uncomment if member template methods are not available -// # define _STLP_NO_MEMBER_TEMPLATES 1 - -// Uncomment if member template classes are not available -#if defined(__WINS__) -# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 -#endif - -// Uncomment if friend member templates are not available -#if defined(__WINS__) -// Possibly required ??? -//# define _STLP_NO_FRIEND_TEMPLATES 1 -#endif - -// Compiler does not accept friend declaration qualified with namespace name. -// # define _STLP_NO_QUALIFIED_FRIENDS 1 - -// Uncomment if partial specialization is not available -#if defined(__WINS__) -# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 -#endif - -// Define if class being partially specialized require full name (template parameters) -// of itself for method declarations -// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS - -// Compiler has problems specializing members of partially -// specialized class -// # define _STLP_MEMBER_SPECIALIZATION_BUG - -// Compiler requires typename keyword on outline method definition -// explicitly taking nested types/typedefs -// #define _STLP_TYPENAME_ON_RETURN_TYPE - -// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a -// constant-initializer in the declaration of a static const data member -// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) -#if defined(__WINS__) -# define _STLP_STATIC_CONST_INIT_BUG -#endif - -// Define if default constructor for builtin integer type fails to initialize it to 0 -// # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 - -// Defined if constructor -// required to explicitly call member's default constructors for const objects -// # define _STLP_CONST_CONSTRUCTOR_BUG 1 - -// Define this if compiler lacks header -# define _STLP_NO_EXCEPTION_HEADER 1 - -// Uncomment if native new-style C library headers lile , etc are not available. -# define _STLP_HAS_NO_NEW_C_HEADERS 1 - -// uncomment if new-style headers is available -// # define _STLP_HAS_NEW_NEW_HEADER 1 - -// uncomment this if and other STD headers put their stuff in ::namespace, -// not std:: -// # define _STLP_VENDOR_GLOBAL_STD - -// uncomment this if and the like put stuff in ::namespace, -// not std:: -# define _STLP_VENDOR_GLOBAL_CSTD -/* -# ifdef _PTHREADS -# undef _PTHREADS -# endif -# ifdef _STLP_PTHREADS -# undef _STLP_PTHREADS -# endif -# ifdef _STLP_THREADS -# undef _STLP_THREADS -# endif -*/ - -#ifdef _STLP_USE_NEW_C_HEADERS -#undef _STLP_USE_NEW_C_HEADERS -#endif - -#undef _STLP_NATIVE_C_HEADER -#ifndef __SYMBIAN32__ -#define _STLP_NATIVE_C_HEADER(x) -#endif -#define _STLP_NATIVE_HEADER(x) - - - -# define _STLP_NO_NEW_HEADER -# define _STLP_NO_THREADS - -# define _STLP_NO_EXCEPTIONS -//# define _STLP_USE_TRAP_LEAVE - -# define _STLP_NO_OWN_IOSTREAMS -//# undef _STLP_OWN_IOSTREAMS -//#define _STLP_OWN_IOSTREAMS -#define _STLP_USE_NEW_IOSTREAMS -# define _STLP_USE_NEWALLOC -//# define _STLP_NO_NODE_ALLOC -# define _STLP_NO_LONG_DOUBLE -# define _STLP_BIG_ENDIAN -// this one causes recursive abs() calls -# define _STLP_LABS -# define _STLP_LDIV -# define _STLP_CONST_CONSTRUCTOR_BUG -// # define _STLP_HAS_NAMESPACES - -//#define _STLP_NO_CSTD_FUNCTION_IMPORTS - - -//#warning ********** COMPILER SETTINGS ********** -// ----------------------------------------------------------------------------- -// wstring support -// This is a bit confusing. -// * _STLP_NO_WCHAR_T inhibits the standard C wchar functions (Symbian doesn't -// have them). -// * _STLP_HAS_WCHAR_T triggers the typedef of wstring. It's based on wint_t, -// which isn't typedef's elsewhere, so we take care of it here. -// ----------------------------------------------------------------------------- -//#define _STLP_NO_WCHAR_T 1 -#define _STLP_HAS_WCHAR_T 1 -//typedef unsigned int wint_t; -#include - -#ifdef _WCHAR_T -#warning ********** _WCHAR_T is defined ********** -#endif - -#define _STLP_COMPLEX_SPECIALIZATION_BUG -#define _STLP_USE_EXCEPTIONS -#define _STLP_EXTERN_RANGE_ERRORS -//#define _STLP_NO_FORCE_INSTANTIATE -//#define __BUILDING_STLPORT -# define _STLP_NO_NEW_NEW_HEADER 1 -# define _STLP_USE_DECLSPEC -#define _STLP_LIBSTD_CPP_NO_STATIC_VAR_ - -#endif // _STLP_GCCE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/config/stl_rvct.h --- a/epoc32/include/stdapis/stlport/config/stl_rvct.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,244 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* 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. -* Neither the name of Nokia Corporation nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. - -* 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 HOLDER 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. -* -* Description: -* -*/ - -// ============================================================================= -// stl_rvct.h -// This is a list of settings for STLport specific to the ARM RVCT compiler. -// Do not include this file directly. -// ============================================================================= - -# ifndef _STLP_RVCT_H -# define _STLP_RVCT_H - - -#if defined(__WINS__) -# pragma warning ( disable : 4018 4097 4100 4127 4244 4284 4511 4512 4514 4786 4800 ) //4355 4284 4231 4511 4512 4097 4786 4800 4018 4146 4244 4514 4127 4100 4663) -# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 -// Uncomment if partial order of template functions is not available -# define _STLP_NO_FUNC_PARTIAL_ORDERING 1 -#endif - -#ifndef _STLP_NO_IOSTREAMS -//# define _STLP_NO_IOSTREAMS 1 -#endif - -//# undef _STLP_OWN_IOSTREAMS -//#define _STLP_OWN_IOSTREAMS -#define _STLP_USE_NEW_IOSTREAMS -//# define _STLP_NO_NATIVE_MBSTATE_T 1 -//# define _NOTHREADS 1 -//# define _STLP_NO_TYPEINFO 1 - -#ifndef __PLACEMENT_NEW_INLINE -#ifndef __E32STD_H__ -#ifdef __cplusplus -inline void * operator new(unsigned int, void *_P) throw() { return (_P); } -inline void operator delete(void* /*aPtr*/, void* /*aBase*/) __NO_THROW {} -#endif -#define __PLACEMENT_NEW_INLINE -#endif // E32STD_H -#endif - - -//========================================================== - -// the values choosen here as defaults try to give -// maximum functionality on the most conservative settings - -// Mostly correct guess, change it for Alpha (and other environments -// that has 64-bit "long") -# define _STLP_UINT32_T unsigned long - - -// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. -// # define _STLP_WCHAR_T_IS_USHORT 1 - -// Uncomment if long long is available - # define _STLP_LONG_LONG long long - -// Uncomment if long double is not available -// # define _STLP_NO_LONG_DOUBLE 1 - -// Uncomment this if your compiler does not support namespaces -//# define _STLP_HAS_NO_NAMESPACES 1 - -// Uncomment if "using" keyword does not work with template types -// # define _STLP_BROKEN_USING_DIRECTIVE 1 - -// Uncomment this if your compiler does not support exceptions -//# define _STLP_HAS_NO_EXCEPTIONS 1 -//# define _STLP_USE_TRAP_LEAVE 1 - -// Header that comes with the compiler -// does not define bad_alloc exception -//#if defined(__WINS__) -// Possibly required ??? -# define _STLP_NO_BAD_ALLOC 1 -//#endif - -// Uncomment if member template methods are not available -// # define _STLP_NO_MEMBER_TEMPLATES 1 - -// Uncomment if member template classes are not available -#if defined(__WINS__) -# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 -#endif - -// Uncomment if friend member templates are not available -#if defined(__WINS__) -// Possibly required ??? -//# define _STLP_NO_FRIEND_TEMPLATES 1 -#endif - -// Compiler does not accept friend declaration qualified with namespace name. -// # define _STLP_NO_QUALIFIED_FRIENDS 1 - -// Uncomment if partial specialization is not available -#if defined(__WINS__) -# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 -#endif - -// Define if class being partially specialized require full name (template parameters) -// of itself for method declarations -// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS - -// Compiler has problems specializing members of partially -// specialized class -// # define _STLP_MEMBER_SPECIALIZATION_BUG - -// Compiler requires typename keyword on outline method definition -// explicitly taking nested types/typedefs -// #define _STLP_TYPENAME_ON_RETURN_TYPE - -// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a -// constant-initializer in the declaration of a static const data member -// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) -#if defined(__WINS__) -# define _STLP_STATIC_CONST_INIT_BUG -#endif - -// Define if default constructor for builtin integer type fails to initialize it to 0 -// # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 - -// Defined if constructor -// required to explicitly call member's default constructors for const objects -// # define _STLP_CONST_CONSTRUCTOR_BUG 1 - -// Define this if compiler lacks header -# define _STLP_NO_EXCEPTION_HEADER 1 - -// Uncomment if native new-style C library headers lile , etc are not available. -# define _STLP_HAS_NO_NEW_C_HEADERS 1 - -// uncomment if new-style headers is available -// # define _STLP_HAS_NEW_NEW_HEADER 1 - -// uncomment this if and other STD headers put their stuff in ::namespace, -// not std:: -// # define _STLP_VENDOR_GLOBAL_STD - -// uncomment this if and the like put stuff in ::namespace, -// not std:: -# define _STLP_VENDOR_GLOBAL_CSTD -/* -# ifdef _PTHREADS -# undef _PTHREADS -# endif -# ifdef _STLP_PTHREADS -# undef _STLP_PTHREADS -# endif -# ifdef _STLP_THREADS -# undef _STLP_THREADS -# endif -*/ - -#ifdef _STLP_USE_NEW_C_HEADERS -#undef _STLP_USE_NEW_C_HEADERS -#endif - -#undef _STLP_NATIVE_C_HEADER -#ifndef __SYMBIAN32__ -#define _STLP_NATIVE_C_HEADER(x) -#endif -#define _STLP_NATIVE_HEADER(x) - - - -# define _STLP_NO_NEW_HEADER -# define _STLP_NO_THREADS - -# define _STLP_NO_EXCEPTIONS -//# define _STLP_USE_TRAP_LEAVE - -# define _STLP_NO_OWN_IOSTREAMS -//# undef _STLP_OWN_IOSTREAMS -//#define _STLP_OWN_IOSTREAMS -#define _STLP_USE_NEW_IOSTREAMS -# define _STLP_USE_NEWALLOC -//# define _STLP_NO_NODE_ALLOC -# define _STLP_NO_LONG_DOUBLE -# define _STLP_BIG_ENDIAN -// this one causes recursive abs() calls -# define _STLP_LABS -# define _STLP_LDIV -# define _STLP_CONST_CONSTRUCTOR_BUG -// # define _STLP_HAS_NAMESPACES - -//#define _STLP_NO_CSTD_FUNCTION_IMPORTS - - -//#warning ********** COMPILER SETTINGS ********** -// ----------------------------------------------------------------------------- -// wstring support -// This is a bit confusing. -// * _STLP_NO_WCHAR_T inhibits the standard C wchar functions (Symbian doesn't -// have them). -// * _STLP_HAS_WCHAR_T triggers the typedef of wstring. It's based on wint_t, -// which isn't typedef's elsewhere, so we take care of it here. -// ----------------------------------------------------------------------------- -//#define _STLP_NO_WCHAR_T 1 -#define _STLP_HAS_WCHAR_T 1 -//typedef unsigned int wint_t; -# include - -#ifdef _WCHAR_T -#warning ********** _WCHAR_T is defined ********** -#endif - -#define _STLP_COMPLEX_SPECIALIZATION_BUG -#define _STLP_USE_EXCEPTIONS -#define _STLP_EXTERN_RANGE_ERRORS -//#define _STLP_NO_FORCE_INSTANTIATE -//#define __BUILDING_STLPORT -# define _STLP_NO_NEW_NEW_HEADER 1 -# define _STLP_USE_DECLSPEC -#define _STLP_LIBSTD_CPP_NO_STATIC_VAR_ - -#endif // _STLP_RVCT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/config/stl_winscw.h --- a/epoc32/include/stdapis/stlport/config/stl_winscw.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,236 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* 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. -* Neither the name of Nokia Corporation nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. - -* 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 HOLDER 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. -* -* Description: -* -*/ - -// ============================================================================= -// stl_winscw.h -// This is a list of settings for STLport specific to the Metrowerks -// CodeWarrior for Symbian compiler. Do not include this file directly. -// ============================================================================= - -#ifndef _STLP_WINSCW -# define _STLP_WINSCW - -// ----------------------------------------------------------------------------- -// iostreams -// No support for these in Symbian. -// ----------------------------------------------------------------------------- -/* -# ifndef _STLP_NO_IOSTREAMS -# define _STLP_NO_IOSTREAMS -# endif - -# ifdef _STLP_OWN_IOSTREAMS -# undef _STLP_OWN_IOSTREAMS -# endif -*/ -//# define _STLP_NO_NATIVE_MBSTATE_T 1 -//# define _NOTHREADS 1 -//# define _STLP_NO_TYPEINFO 1 - - -# ifndef __PLACEMENT_NEW_INLINE -# ifndef __E32STD_H__ -# ifdef __cplusplus - inline void * operator new(unsigned int, void *_P) throw(){ return (_P); } - inline void operator delete(void* /*aPtr*/, void* /*aBase*/) __NO_THROW {} -# endif -# define __PLACEMENT_NEW_INLINE -# endif // E32STD_H -# endif - -//# undef _STLP_OWN_IOSTREAMS -//#define _STLP_OWN_IOSTREAMS -#define _STLP_USE_NEW_IOSTREAMS - - -//========================================================== - -// the values choosen here as defaults try to give -// maximum functionality on the most conservative settings - -// Mostly correct guess, change it for Alpha (and other environments -// that has 64-bit "long") -# define _STLP_UINT32_T unsigned long - - -// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. -// # define _STLP_WCHAR_T_IS_USHORT 1 - -// Uncomment if long long is available -# define _STLP_LONG_LONG long long - -// Uncomment if long double is not available -// # define _STLP_NO_LONG_DOUBLE 1 - -// Uncomment this if your compiler does not support namespaces -//# define _STLP_HAS_NO_NAMESPACES 1 - -// Uncomment if "using" keyword does not work with template types -// # define _STLP_BROKEN_USING_DIRECTIVE 1 - -// Uncomment this if your compiler does not support exceptions -//# define _STLP_HAS_NO_EXCEPTIONS 1 -//# define _STLP_USE_TRAP_LEAVE 1 - -// Header that comes with the compiler -// does not define bad_alloc exception -//# if defined(__WINS__) -// Possibly required ??? -# define _STLP_NO_BAD_ALLOC 1 -//# endif - -// Uncomment if member template methods are not available -// # define _STLP_NO_MEMBER_TEMPLATES 1 - -// Uncomment if member template classes are not available -# if defined(__WINS__) -//# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 -# endif - -// Uncomment if friend member templates are not available -#if defined(__WINS__) -// Possibly required ??? -//# define _STLP_NO_FRIEND_TEMPLATES 1 -#endif - -// Compiler does not accept friend declaration qualified with namespace name. -// # define _STLP_NO_QUALIFIED_FRIENDS 1 - -// Uncomment if partial specialization is not available -# if defined(__WINS__) -//# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 -# endif - -// Define if class being partially specialized require full name (template parameters) -// of itself for method declarations -// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS - -// Compiler has problems specializing members of partially -// specialized class -// # define _STLP_MEMBER_SPECIALIZATION_BUG - -// Compiler requires typename keyword on outline method definition -// explicitly taking nested types/typedefs -// #define _STLP_TYPENAME_ON_RETURN_TYPE - -// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a -// constant-initializer in the declaration of a static const data member -// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) -#if defined(__WINS__) -//# define _STLP_STATIC_CONST_INIT_BUG -#endif - -// Define if default constructor for builtin integer type fails to initialize it to 0 -// # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 - -// Defined if constructor -// required to explicitly call member's default constructors for const objects -// # define _STLP_CONST_CONSTRUCTOR_BUG 1 - -// Define this if compiler lacks header -# define _STLP_NO_EXCEPTION_HEADER 1 - -// Uncomment if native new-style C library headers lile , etc are not available. -# define _STLP_HAS_NO_NEW_C_HEADERS 1 - -// uncomment if new-style headers is available -// # define _STLP_HAS_NEW_NEW_HEADER 1 - -// uncomment this if and other STD headers put their stuff in ::namespace, -// not std:: -// # define _STLP_VENDOR_GLOBAL_STD - -// uncomment this if and the like put stuff in ::namespace, -// not std:: -# define _STLP_VENDOR_GLOBAL_CSTD -/* -# ifdef _PTHREADS -# undef _PTHREADS -# endif -# ifdef _STLP_PTHREADS -# undef _STLP_PTHREADS -# endif -# ifdef _STLP_THREADS -# undef _STLP_THREADS -# endif -*/ -# define _STLP_NATIVE_INCLUDE_PATH -# define _STLP_NATIVE_C_INCLUTE_PATH - -# define _STLP_NO_NEW_HEADER -# define _STLP_NO_THREADS - -# define _STLP_NO_EXCEPTIONS - -# define _STLP_USE_NEWALLOC -//# define _STLP_NO_NODE_ALLOC -# define _STLP_NO_LONG_DOUBLE -# define _STLP_BIG_ENDIAN -// this one causes recursive abs() calls -# define _STLP_LABS -# define _STLP_LDIV -# define _STLP_CONST_CONSTRUCTOR_BUG -// # define _STLP_HAS_NAMESPACES - -#ifdef _STLP_USE_NEW_C_HEADERS -#undef _STLP_USE_NEW_C_HEADERS -#endif - -#undef _STLP_NATIVE_C_HEADER -#ifndef __SYMBIAN32__ -#define _STLP_NATIVE_C_HEADER(x) -#endif -#define _STLP_NATIVE_HEADER(x) - -// ----------------------------------------------------------------------------- -// wstring support -// This is a bit confusing. -// * _STLP_NO_WCHAR_T inhibits the standard C wchar functions (Symbian doesn't -// have them). -// * _STLP_HAS_WCHAR_T triggers the typedef of wstring. It's based on wint_t, -// which isn't typedef's elsewhere, so we take care of it here. -// ----------------------------------------------------------------------------- -//# define _STLP_NO_WCHAR_T 1 -# define _STLP_HAS_WCHAR_T 1 -# define _STLP_WCHAR_T_IS_USHORT 1 -# include - -#define _STLP_COMPLEX_SPECIALIZATION_BUG -#define _STLP_USE_EXCEPTIONS -#define _STLP_EXTERN_RANGE_ERRORS -//#define _STLP_NO_FORCE_INSTANTIATE -//#define __BUILDING_STLPORT -//# define _STLP_USE_STDIO_IO -# define _STLP_NO_NEW_NEW_HEADER -# define _STLP_USE_DECLSPEC -#define __LIBSTD_CPP_SYMBIAN32_WSD__ - -//========================================================== -#endif // _STLP_WINSCW diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/deque --- a/epoc32/include/stdapis/stlport/deque Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_DEQUE -#define _STLP_DEQUE - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x22 -# include -# endif - -#ifdef _STLP_PRAGMA_ONCE -# pragma once -#endif - -#ifndef _STLP_INTERNAL_DEQUE_H -# include -#endif - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(deque) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x22) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_DEQUE */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/exception --- a/epoc32/include/stdapis/stlport/exception Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,229 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -// This header exists solely for portability. Normally it just includes -// the native header . - -// The header contains low-level functions that interact -// with a compiler's exception-handling mechanism. It is assumed to -// be supplied with the compiler, rather than with the library, because -// it is inherently tied very closely to the compiler itself. - -// On platforms where does not exist, this header defines -// an exception base class. This is *not* a substitute for everything -// in , but it suffices to support a bare minimum of STL -// functionality. - - -# if !defined (_STLP_OUTERMOST_HEADER_ID) -# define _STLP_OUTERMOST_HEADER_ID 0x423 -# include -# elif (_STLP_OUTERMOST_HEADER_ID == 0x423) && ! defined (_STLP_DONT_POP_0x423) -# define _STLP_DONT_POP_0x423 -# endif - -#ifndef _STLP_EXCEPTION -#define _STLP_EXCEPTION - -# if ! defined (_STLP_NO_EXCEPTION_HEADER) - -# if defined ( _UNCAUGHT_EXCEPTION ) -# undef _STLP_INCOMPLETE_EXCEPTION_HEADER -# endif - -# if defined(_STLP_BROKEN_EXCEPTION_CLASS) -# define exception _STLP_NULLIFIED_BROKEN_EXCEPTION_CLASS -# define bad_exception _STLP_NULLIFIED_BROKEN_BAD_EXCEPTION_CLASS -# if defined (_STLP_NO_NEW_NEW_HEADER) -# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception.h) -# else -# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception) -# endif -# undef exception -# undef bad_exception -# else - -#ifndef _STLP_NO_NEW_NEW_HEADER -#define _STLP_NO_NEW_NEW_HEADER -#endif - -# if defined (_STLP_NO_NEW_NEW_HEADER) -# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h) -# else -# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception) -# endif - -# endif - -# if defined (_STLP_MSVC) || defined (__ICL) -// dwa 02/04/00 - here I'm assuming that __ICL uses the same library headers as vc6. -// the header which ships with vc6 and is included by its native -// actually turns on warnings, so we have to turn them back off. -# include -# endif - - -# ifdef _STLP_USE_OWN_NAMESPACE - -_STLP_BEGIN_NAMESPACE - -#if !defined(_STLP_BROKEN_EXCEPTION_CLASS) -using _STLP_VENDOR_EXCEPT_STD::exception; -using _STLP_VENDOR_EXCEPT_STD::bad_exception; -#endif - -# if ! defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) - -// fbp : many platforms present strange mix of -// those in various namespaces -# if !defined(_STLP_VENDOR_UNEXPECTED_STD) -# define _STLP_VENDOR_UNEXPECTED_STD _STLP_VENDOR_EXCEPT_STD -# endif - -// weird errors -# if (! defined (__BORLANDC__)) || (defined (__STD_EXCEPTION) && defined (__RWSTD_EXCEPTION_SEEN) && defined ( _STLP_DONT_POP_0x423)) -using _STLP_VENDOR_UNEXPECTED_STD::unexpected; -using _STLP_VENDOR_UNEXPECTED_STD::unexpected_handler; -using _STLP_VENDOR_UNEXPECTED_STD::set_unexpected; -using _STLP_VENDOR_UNEXPECTED_STD::terminate; -using _STLP_VENDOR_UNEXPECTED_STD::terminate_handler; -using _STLP_VENDOR_UNEXPECTED_STD::set_terminate; -# endif - -# if !defined (_STLP_INCOMPLETE_EXCEPTION_HEADER) -using _STLP_VENDOR_UNEXPECTED_STD::uncaught_exception; -# endif - -# endif - -_STLP_END_NAMESPACE - -# endif /* _STLP_OWN_NAMESPACE */ - -#else /* _STLP_NO_EXCEPTION_HEADER */ - -// fbp : absence of usually means that those -// functions are not going to be called by compiler. -// Still, define them for the user. -#ifdef __SYMBIAN32__ -_STLP_BEGIN_NAMESPACE -#endif //__SYMBIAN32__ -typedef void (*unexpected_handler)(); -unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY; -void unexpected(); - -typedef void (*terminate_handler)(); -terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY; -void terminate(); - -bool uncaught_exception(); // not implemented under mpw as of Jan/1999 - -#ifdef __SYMBIAN32__ -_STLP_END_NAMESPACE -#endif //__SYMBIAN32__ - -#endif /* _STLP_NO_EXCEPTION_HEADER */ - -# if defined (_STLP_NO_EXCEPTION_HEADER) || defined(_STLP_BROKEN_EXCEPTION_CLASS) -# ifndef _STLP_EXCEPTION_H -# define _STLP_EXCEPTION_H - -_STLP_BEGIN_NAMESPACE - -// section 18.6.1 -#ifdef __SYMBIAN32__ -class exception -#else -class _STLP_CLASS_DECLSPEC exception -#endif - { - public: -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC exception() _STLP_NOTHROW; - _STLP_DECLSPEC virtual ~exception() _STLP_NOTHROW; - _STLP_DECLSPEC virtual const char* what() const _STLP_NOTHROW; -# else - exception() _STLP_NOTHROW {} - virtual ~exception() _STLP_NOTHROW {} - virtual const char* what() const _STLP_NOTHROW {return "class exception";} -# endif - }; - - - -// section 18.6.2.1 -#ifdef __SYMBIAN32__ -class bad_exception : public exception -#else -class _STLP_CLASS_DECLSPEC bad_exception : public exception -#endif - { - public: -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC bad_exception() _STLP_NOTHROW; - _STLP_DECLSPEC ~bad_exception() _STLP_NOTHROW; - _STLP_DECLSPEC const char* what() const _STLP_NOTHROW; -# else - bad_exception() _STLP_NOTHROW {} - ~bad_exception() _STLP_NOTHROW {} - const char* what() const _STLP_NOTHROW {return "class bad_exception";} -# endif - }; - -#ifdef __SYMBIAN32__ -// Give forward declaration, this should be supported by the stdard libraries from platform vendor. -typedef void (*unexpected_handler)(); -_STLP_DECLSPEC unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY; -_STLP_DECLSPEC void unexpected(); - -typedef void (*terminate_handler)(); -_STLP_DECLSPEC terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY; -_STLP_DECLSPEC void terminate(); - -_STLP_DECLSPEC bool uncaught_exception(); // not implemented under mpw as of Jan/1999 - -#endif -_STLP_END_NAMESPACE - -#endif /* _STLP_NO_EXCEPTION_HEADER */ - -_STLP_BEGIN_NAMESPACE -// forward declaration -class __Named_exception; -_STLP_END_NAMESPACE -#endif /* _STLP_EXCEPTION_H */ - -#endif //_STLP_EXCEPTION - -# if (_STLP_OUTERMOST_HEADER_ID == 0x423) -# if ! defined (_STLP_DONT_POP_0x423) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif -# undef _STLP_DONT_POP_0x423 -# endif - - -// Local Variables: -// mode:C++ -// End: - - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/functional --- a/epoc32/include/stdapis/stlport/functional Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_FUNCTIONAL -#define _STLP_FUNCTIONAL - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x27 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# if defined (_STLP_IMPORT_VENDOR_STD) -# include _STLP_NATIVE_HEADER(functional) -# endif - -# ifndef _STLP_INTERNAL_FUNCTION_H -# include -# endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x27) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_FUNCTIONAL */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/hash_map --- a/epoc32/include/stdapis/stlport/hash_map Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_HASH_MAP -#define _STLP_HASH_MAP - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x4028 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#include - -# if (_STLP_OUTERMOST_HEADER_ID == 0x4028) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_HASH_MAP */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/hash_set --- a/epoc32/include/stdapis/stlport/hash_set Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_HASH_SET -#define _STLP_HASH_SET - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x4029 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#include - -# if (_STLP_OUTERMOST_HEADER_ID == 0x4029) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_HASH_SET */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/ios.h --- a/epoc32/include/stdapis/stlport/ios.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_IOS_H -# define _STLP_IOS_H - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x1033 -# include -# endif - -# if defined (_STLP_OWN_IOSTREAMS) - -#ifdef __BORLANDC__ -# include -#else -# include -#endif - -# if defined (_STLP_USE_NAMESPACES) -# include -# endif - -# elif !defined (_STLP_USE_NO_IOSTREAMS) - -# include _STLP_NATIVE_OLD_STREAMS_HEADER(ios.h) -# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) -_STLP_BEGIN_NAMESPACE -using _STLP_OLD_IO_NAMESPACE::ios; -_STLP_END_NAMESPACE -# endif /* _STLP_USE_OWN_NAMESPACE */ - -# endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x1033) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_IOS_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/istream.h --- a/epoc32/include/stdapis/stlport/istream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_ISTREAM_H -# define _STLP_ISTREAM_H - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x2037 -# include -# endif - -# if defined (_STLP_OWN_IOSTREAMS) - -# include - -# ifndef _STLP_HAS_NO_NAMESPACES -# ifdef _STLP_BROKEN_USING_DIRECTIVE -using namespace _STLP_STD; -# else -using _STLP_STD::basic_istream; -using _STLP_STD::basic_iostream; -using _STLP_STD::istream; -using _STLP_STD::iostream; -using _STLP_STD::ios; -# ifndef _STLP_NO_WCHAR_T -using _STLP_STD::wistream; -using _STLP_STD::wiostream; -# endif -using _STLP_STD::ws; -# endif -# endif - -# elif !defined (_STLP_USE_NO_IOSTREAMS) - -# include _STLP_NATIVE_OLD_STREAMS_HEADER(istream.h) - -# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) -_STLP_BEGIN_NAMESPACE -using _STLP_OLD_IO_NAMESPACE::istream; -_STLP_END_NAMESPACE -# endif /* _STLP_USE_OWN_NAMESPACE */ - -# endif /* _STLP_OWN_IOSTREAMS */ - -# if (_STLP_OUTERMOST_HEADER_ID == 0x2037) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_ISTREAM_H */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/iterator --- a/epoc32/include/stdapis/stlport/iterator Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_ITERATOR -#define _STLP_ITERATOR - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x38 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#if defined (_STLP_IMPORT_VENDOR_STD) -# include _STLP_NATIVE_HEADER(iterator) -#endif /* IMPORT */ - -# ifndef _STLP_INTERNAL_ITERATOR_H -# include -# endif - -# ifndef _STLP_INTERNAL_STREAM_ITERATOR_H -# include -# endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x38) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_ITERATOR */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/limits --- a/epoc32/include/stdapis/stlport/limits Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_LIMITS -#define _STLP_LIMITS - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x39 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# ifndef _STLP_LIMITS_H -# include -# endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x39) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_LIMITS */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/list --- a/epoc32/include/stdapis/stlport/list Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_LIST -#define _STLP_LIST - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x40 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#ifndef _STLP_INTERNAL_LIST_H -# include -#endif - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(list) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x40) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_LIST */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/map --- a/epoc32/include/stdapis/stlport/map Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_MAP -#define _STLP_MAP - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x43 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#include - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(map) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x43) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_MAP */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/mem.h --- a/epoc32/include/stdapis/stlport/mem.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -// Boris : highly questionable header for BC++ - -#ifndef _STLP_mem_h - -# if !defined (_STLP_OUTERMOST_HEADER_ID) -# define _STLP_OUTERMOST_HEADER_ID 0x245 -# include -# elif (_STLP_OUTERMOST_HEADER_ID == 0x245) && ! defined (_STLP_DONT_POP_0x245) -# define _STLP_DONT_POP_0x245 -# endif - -# if (__BORLANDC__ > 0x530) && !defined(__linux__) -# include -# endif - -# undef __USING_CNAME__ - -#ifdef __SYMBIAN32__ -# include -#else -# include _STLP_NATIVE_C_HEADER(mem.h) -#endif - - -# define _STLP_mem_h 1 - -# if (_STLP_OUTERMOST_HEADER_ID == 0x245) -# if ! defined (_STLP_DONT_POP_0x245) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif -# undef _STLP_DONT_POP_0x245 -# endif - -#endif /* _STLP_mem_h */ - -// #endif /* NATIVE */ -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/memory --- a/epoc32/include/stdapis/stlport/memory Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_MEMORY -# define _STLP_MEMORY - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x46 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# ifndef _STLP_INTERNAL_ALLOC_H -# include -# endif - -# ifndef _STLP_INTERNAL_TEMPBUF_H -# include -# endif - -# ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H -# include -# endif - -# include - -# if defined (_STLP_IMPORT_VENDOR_STD) - -# if defined (__MSL__) -# include _STLP_NATIVE_HEADER(limits) -# endif - -# include _STLP_NATIVE_HEADER(memory) - -# if defined (__MSL__) && (__MSL__ >= 0x2405 && __MSL__ < 0x5201) -/* 980401 vss MSL 2.4 Pro 3 Release */ -# include -# endif - -# endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x46) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_MEMORY */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/pthread_alloc --- a/epoc32/include/stdapis/stlport/pthread_alloc Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_PTHREAD_ALLOC -#define _STLP_PTHREAD_ALLOC - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x52 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# include - -# if (_STLP_OUTERMOST_HEADER_ID == 0x52) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_PTHREAD_ALLOC */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/queue --- a/epoc32/include/stdapis/stlport/queue Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_QUEUE -#define _STLP_QUEUE - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x53 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#ifndef _STLP_INTERNAL_QUEUE_H -# include -#endif - -#ifndef _STLP_INTERNAL_FUNCTION_H -# include -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x53) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_QUEUE */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/rope --- a/epoc32/include/stdapis/stlport/rope Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -#ifndef _STLP_ROPE -#define _STLP_ROPE - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x54 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# include - -# if (_STLP_OUTERMOST_HEADER_ID == 0x54) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_ROPE */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/set --- a/epoc32/include/stdapis/stlport/set Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_SET -#define _STLP_SET - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x55 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#include - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(set) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x55) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_SET */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/slist --- a/epoc32/include/stdapis/stlport/slist Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ - -#ifndef _STLP_SLIST -#define _STLP_SLIST - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x58 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#ifndef _STLP_INTERNAL_SLIST_H -# include -#endif - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(slist) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x58) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_SLIST */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stack --- a/epoc32/include/stdapis/stlport/stack Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STACK -#define _STLP_STACK - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x60 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#ifndef _STLP_INTERNAL_STACK_H -#include -#endif - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(stack) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x60) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_STACK */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stdexcept --- a/epoc32/include/stdapis/stlport/stdexcept Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,290 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - -# if !defined (_STLP_OUTERMOST_HEADER_ID) -# define _STLP_OUTERMOST_HEADER_ID 0x63 -# include -# elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && ! defined (_STLP_DONT_POP_0x63) -# define _STLP_DONT_POP_0x63 -# endif - -#ifndef _STLP_STDEXCEPT -#define _STLP_STDEXCEPT 1 - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#if defined (_STLP_USE_TRAP_LEAVE) - -enum { - STDEX_bad_alloc = -10000, - STDEX_logic_error = -10001, - STDEX_runtime_error = -10002, - STDEX_domain_error = -10003, - STDEX_invalid_argument = -10004, - STDEX_length_error = -10005, - STDEX_out_of_range = -10006, - STDEX_range_error = -10007, - STDEX_overflow_error = -10008, - STDEX_underflow_error = -10009 -}; - -// User may override this -#ifndef STDEX_REPORT_EXCEPTION -# define STDEX_REPORT_EXCEPTION(x) -#endif - -#endif - -# if !defined(_STLP_STDEXCEPT_SEEN) && \ - (!defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE)) - -# define _STLP_STDEXCEPT_SEEN 1 - -# include - -#if defined(_STLP_USE_EXCEPTIONS) || \ - !(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32) - -# include - -#ifndef _STLP_INTERNAL_ALLOC_H -# include -#endif - -#ifndef _STLP_STRING_FWD_H -# include -#endif - -# define _STLP_OWN_STDEXCEPT 1 - -_STLP_BEGIN_NAMESPACE - -# if ! defined (_STLP_NO_EXCEPTION_HEADER) -# if !defined(_STLP_EXCEPTION_BASE) && !defined(_STLP_BROKEN_EXCEPTION_CLASS) && defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE) -using _STLP_VENDOR_EXCEPT_STD::exception; -# endif -# endif -# define _STLP_EXCEPTION_BASE exception - -#ifdef __SYMBIAN32__ -class __Named_exception : public _STLP_EXCEPTION_BASE { -#else -class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE { -#endif //__SYMBIAN32__ -public: - _STLP_DECLSPEC __Named_exception(const string& __str) -# ifdef _STLP_OWN_IOSTREAMS - ; - _STLP_DECLSPEC const char* what() const _STLP_NOTHROW_INHERENTLY; - _STLP_DECLSPEC ~__Named_exception() _STLP_NOTHROW_INHERENTLY; -# else - { - strncpy(_M_name, __get_c_string(__str), _S_bufsize); - _M_name[_S_bufsize - 1] = '\0'; - } - const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; } -# endif - -private: - enum { _S_bufsize = 256 }; - char _M_name[_S_bufsize]; -}; - -#ifdef __SYMBIAN32__ -class logic_error : public __Named_exception { -#else -class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception { -#endif -public: - _STLP_DECLSPEC logic_error(const string& __s) -#ifdef __SYMBIAN32__ - ; -#else - : __Named_exception(__s) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~logic_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class runtime_error : public __Named_exception { -#else -class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception { -#endif -public: - _STLP_DECLSPEC runtime_error(const string& __s) -#ifdef __SYMBIAN32__ - ; -#else - : __Named_exception(__s) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~runtime_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class domain_error : public logic_error { -#else -class _STLP_CLASS_DECLSPEC domain_error : public logic_error { -#endif -public: - _STLP_DECLSPEC domain_error(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : logic_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~domain_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class invalid_argument : public logic_error { -#else -class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error { -#endif -public: - _STLP_DECLSPEC invalid_argument(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : logic_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~invalid_argument() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class length_error : public logic_error { -#else -class _STLP_CLASS_DECLSPEC length_error : public logic_error { -#endif -public: - _STLP_DECLSPEC length_error(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : logic_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~length_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class out_of_range : public logic_error { -#else -class _STLP_CLASS_DECLSPEC out_of_range : public logic_error { -#endif -public: - _STLP_DECLSPEC out_of_range(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : logic_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~out_of_range() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class range_error : public runtime_error { -#else -class _STLP_CLASS_DECLSPEC range_error : public runtime_error { -#endif -public: - _STLP_DECLSPEC range_error(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : runtime_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~range_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class overflow_error : public runtime_error { -#else -class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error { -#endif -public: - _STLP_DECLSPEC overflow_error(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : runtime_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~overflow_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -#ifdef __SYMBIAN32__ -class underflow_error : public runtime_error { -#else -class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error { -#endif -public: - _STLP_DECLSPEC underflow_error(const string& __arg) -#ifdef __SYMBIAN32__ - ; -#else - : runtime_error(__arg) {} -#endif -# ifdef _STLP_OWN_IOSTREAMS - _STLP_DECLSPEC ~underflow_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -_STLP_END_NAMESPACE - -#endif /* Not o32, and no exceptions */ -# endif /* _STLP_STDEXCEPT_SEEN */ - - -#if defined (_STLP_USE_NATIVE_STDEXCEPT) -# include _STLP_NATIVE_HEADER(stdexcept) -# endif - -#endif /* _STLP_STDEXCEPT */ - -# if (_STLP_OUTERMOST_HEADER_ID == 0x63) -# if ! defined (_STLP_DONT_POP_0x63) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif -# undef _STLP_DONT_POP_0x63 -# endif - - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stdiostream.h --- a/epoc32/include/stdapis/stlport/stdiostream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -#ifndef _STLP_misc_stdiostream_h -# define _STLP_misc_stdiostream_h -# if (__SUNPRO_CC >= 0x500 ) -# include <../CCios/stdiostream.h> -# else if defined (__SUNPRO_CC) -# include <../CC/stdiostream.h> -# else -# error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers." -# endif -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_abbrevs.h --- a/epoc32/include/stdapis/stlport/stl/_abbrevs.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_ABBREVS_H -# define _STLP_INTERNAL_ABBREVS_H - -// ugliness is intentional - to reduce conflicts -# define input_iterator_tag _In__ItT -# define output_iterator_tag _Ou__ItT -# define bidirectional_iterator_tag _Bd__ItT -# define random_access_iterator_tag _Ra__ItT -# define input_iterator _In__It -# define output_iterator _Ou__It -# define bidirectional_iterator _Bd__It -# define random_access_iterator _Ra__It -# define reverse_bidirectional_iterator _rBd__It -# define reverse_iterator _r__It -# define back_insert_iterator _bI__It -# define front_insert_iterator _fI__It -# define raw_storage_iterator _rS__It -# define _Const_traits _C_Tr -# define _Nonconst_traits _N_Tr - -// ugliness is intentional - to reduce conflicts probability -# define __malloc_alloc M__A -# define __node_alloc D__A -# define __new_alloc N__A -# define __debug_alloc G__A - -# define __deque_iterator _dQ__It -# define _Buf_traits _dQ__BTr -# define _Deque_iterator _Dq__It - -# define _Select1st _S1st -# define _Select2nd _S2nd - -# define _Hashtable_iterator _hT__It -# define _Hashtable_const_iterator _hT__cIt -# define _Hashtable_node _hT__N -# define _Hashtable_base _hT__B -# define _Ht_iterator _Ht_It - -# define __list_iterator _L__It -# define __slist_iterator _SL__It - -# define _Rb_tree_node_base _rbT__NB -# define _Rb_tree_node _rbT__N -# define _Rb_base_iterator _rbTB__It -# define _Rb_tree_base_iterator _rbT__It -# define _Rb_tree_base _rbT__B - -#endif - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_algo.c --- a/epoc32/include/stdapis/stlport/stl/_algo.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1934 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_ALGO_C -# define _STLP_ALGO_C - -# if !defined (_STLP_INTERNAL_ALGO_H) -# include -# endif - -_STLP_BEGIN_NAMESPACE - -template -void __merge_without_buffer(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, - _Distance __len1, _Distance __len2, - _Compare __comp); - - -template -_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, - _BidirectionalIter1 __last1, - _BidirectionalIter2 __first2, - _BidirectionalIter2 __last2, - _BidirectionalIter3 __result, - _Compare __comp); - -template -# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 )) -inline -# endif -const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) { - if (__a < __b) - if (__b < __c) - return __b; - else if (__a < __c) - return __c; - else - return __a; - else if (__a < __c) - return __a; - else if (__b < __c) - return __c; - else - return __b; -} - -template -# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 )) -inline -# endif -const _Tp& -__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) { - if (__comp(__a, __b)) - if (__comp(__b, __c)) - return __b; - else if (__comp(__a, __c)) - return __c; - else - return __a; - else if (__comp(__a, __c)) - return __a; - else if (__comp(__b, __c)) - return __c; - else - return __b; -} - -template -_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - // Test for empty ranges - if (__first1 == __last1 || __first2 == __last2) - return __first1; - - // Test for a pattern of length 1. - _ForwardIter2 __tmp(__first2); - ++__tmp; - if (__tmp == __last2) - return find(__first1, __last1, *__first2); - - // General case. - _ForwardIter2 __p1 = __first2; - ++__p1; - - _ForwardIter1 __current = __first1; - - while (__first1 != __last1) { - __first1 = find(__first1, __last1, *__first2); - if (__first1 == __last1) - return __last1; - - _ForwardIter2 __p = __p1; - __current = __first1; - if (++__current == __last1) - return __last1; - - while (*__current == *__p) { - if (++__p == __last2) - return __first1; - if (++__current == __last1) - return __last1; - } - - ++__first1; - } - return __first1; -} - -// search_n. Search for __count consecutive copies of __val. - -template -_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, - _Integer __count, const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__count <= 0) - return __first; - else { - __first = find(__first, __last, __val); - while (__first != __last) { - _Integer __n = __count - 1; - _ForwardIter __i = __first; - ++__i; - while (__i != __last && __n != 0 && *__i == __val) { - ++__i; - --__n; - } - if (__n == 0) - return __first; - else - __first = find(__i, __last, __val); - } - return __last; - } -} - -template -_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, - _Integer __count, const _Tp& __val, - _BinaryPred __binary_pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__count <= 0) - return __first; - else { - while (__first != __last) { - if (__binary_pred(*__first, __val)) - break; - ++__first; - } - while (__first != __last) { - _Integer __n = __count - 1; - _ForwardIter __i = __first; - ++__i; - while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { - ++__i; - --__n; - } - if (__n == 0) - return __first; - else { - while (__i != __last) { - if (__binary_pred(*__i, __val)) - break; - ++__i; - } - __first = __i; - } - } - return __last; - } -} - -template -_ForwardIter1 -find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - return __find_end(__first1, __last1, __first2, __last2, -# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) - _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1), - _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2), -# else - forward_iterator_tag(), - forward_iterator_tag(), -# endif - __equal_to(_STLP_VALUE_TYPE(__first1, _ForwardIter1)) - ); -} - -// unique and unique_copy -template -_STLP_INLINE_LOOP _OutputIterator -__unique_copy(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, - _BinaryPredicate __binary_pred, _Tp*) { - _Tp __val = *__first; - _STLP_PUSH_STACK_ITEM(_Tp, &__val) - *__result = __val; - while (++__first != __last) - if (!__binary_pred(__val, *__first)) { - __val = *__first; - *++__result = __val; - } - return ++__result; -} - -template -inline _OutputIter -__unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result, - _BinaryPredicate __binary_pred, const output_iterator_tag &) { - return __unique_copy(__first, __last, __result, __binary_pred, _STLP_VALUE_TYPE(__first, _InputIter)); -} - -template -_STLP_INLINE_LOOP _ForwardIter -__unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, - _BinaryPredicate __binary_pred, const forward_iterator_tag &) { - *__result = *__first; - while (++__first != __last) - if (!__binary_pred(*__result, *__first)) *++__result = *__first; - return ++__result; -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline _BidirectionalIterator -__unique_copy(_InputIterator __first, _InputIterator __last, - _BidirectionalIterator __result, _BinaryPredicate __binary_pred, - const bidirectional_iterator_tag &) { - return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag()); -} - -template -inline _RandomAccessIterator -__unique_copy(_InputIterator __first, _InputIterator __last, - _RandomAccessIterator __result, _BinaryPredicate __binary_pred, - const random_access_iterator_tag &) { - return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag()); -} -# endif /* _STLP_NONTEMPL_BASE_MATCH_BUG */ - - -template -_OutputIter -unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __result; - return __unique_copy(__first, __last, __result, __equal_to(_STLP_VALUE_TYPE(__first, _InputIter)), - _STLP_ITERATOR_CATEGORY(__result, _OutputIter)); -} - -template -_OutputIter -unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result, - _BinaryPredicate __binary_pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __result; - return __unique_copy(__first, __last, __result, __binary_pred, - _STLP_ITERATOR_CATEGORY(__result, _OutputIter)); -} - -// rotate and rotate_copy, and their auxiliary functions - -template -_ForwardIter __rotate(_ForwardIter __first, - _ForwardIter __middle, - _ForwardIter __last, - _Distance*, - const forward_iterator_tag &) { - if (__first == __middle) - return __last; - if (__last == __middle) - return __first; - - _ForwardIter __first2 = __middle; - do { - swap(*__first++, *__first2++); - if (__first == __middle) - __middle = __first2; - } while (__first2 != __last); - - _ForwardIter __new_middle = __first; - - __first2 = __middle; - - while (__first2 != __last) { - swap (*__first++, *__first2++); - if (__first == __middle) - __middle = __first2; - else if (__first2 == __last) - __first2 = __middle; - } - - return __new_middle; -} - -template -_BidirectionalIter __rotate(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, - _Distance*, - const bidirectional_iterator_tag &) { - if (__first == __middle) - return __last; - if (__last == __middle) - return __first; - - __reverse(__first, __middle, bidirectional_iterator_tag()); - __reverse(__middle, __last, bidirectional_iterator_tag()); - - while (__first != __middle && __middle != __last) - swap (*__first++, *--__last); - - if (__first == __middle) { - __reverse(__middle, __last, bidirectional_iterator_tag()); - return __last; - } - else { - __reverse(__first, __middle, bidirectional_iterator_tag()); - return __first; - } -} - -template -_RandomAccessIter __rotate(_RandomAccessIter __first, - _RandomAccessIter __middle, - _RandomAccessIter __last, - _Distance *, _Tp *) { - - _Distance __n = __last - __first; - _Distance __k = __middle - __first; - _Distance __l = __n - __k; - _RandomAccessIter __result = __first + (__last - __middle); - - if (__k==0) /* __first == middle */ - return __last; - - if (__k == __l) { - swap_ranges(__first, __middle, __middle); - return __result; - } - - _Distance __d = __gcd(__n, __k); - - for (_Distance __i = 0; __i < __d; __i++) { - _Tp __tmp = *__first; - _STLP_PUSH_STACK_ITEM(_Tp, &__tmp) - _RandomAccessIter __p = __first; - - if (__k < __l) { - for (_Distance __j = 0; __j < __l/__d; __j++) { - if (__p > __first + __l) { - *__p = *(__p - __l); - __p -= __l; - } - - *__p = *(__p + __k); - __p += __k; - } - } - - else { - for (_Distance __j = 0; __j < __k/__d - 1; __j ++) { - if (__p < __last - __k) { - *__p = *(__p + __k); - __p += __k; - } - - *__p = * (__p - __l); - __p -= __l; - } - } - - *__p = __tmp; - ++__first; - } - - return __result; -} - -template -inline _RandomAccessIter -__rotate(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last, - _Distance * __dis, const random_access_iterator_tag &) { - return __rotate(__first, __middle, __last, - __dis, _STLP_VALUE_TYPE(__first, _RandomAccessIter)); -} - -template -_ForwardIter -rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __middle)) - _STLP_DEBUG_CHECK(__check_range(__middle, __last)) - return __rotate(__first, __middle, __last, - _STLP_DISTANCE_TYPE(__first, _ForwardIter), - _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); -} - -// Return a random number in the range [0, __n). This function encapsulates -// whether we're using rand (part of the standard C library) or lrand48 -// (not standard, but a much better choice whenever it's available). - -template -inline _Distance __random_number(_Distance __n) { -#ifdef _STLP_NO_DRAND48 - return rand() % __n; -#else - return lrand48() % __n; -#endif -} - -template -void random_shuffle(_RandomAccessIter __first, - _RandomAccessIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return; - for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) - iter_swap(__i, __first + __random_number((__i - __first) + 1)); -} - -template -void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last, - _RandomNumberGenerator& __rand) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return; - for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) - iter_swap(__i, __first + __rand((__i - __first) + 1)); -} - -# ifndef _STLP_NO_EXTENSIONS - -// random_sample and random_sample_n (extensions, not part of the standard). - -template -_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, - _OutputIter __stl_out, const _Distance __n) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _Distance __remaining = distance(__first, __last); - _Distance __m = (min) (__n, __remaining); - - while (__m > 0) { - if (__random_number(__remaining) < __m) { - *__stl_out = *__first; - ++__stl_out; - --__m; - } - - --__remaining; - ++__first; - } - return __stl_out; -} - - -template -_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, - _OutputIter __stl_out, const _Distance __n, - _RandomNumberGenerator& __rand) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _Distance __remaining = distance(__first, __last); - _Distance __m = (min) (__n, __remaining); - - while (__m > 0) { - if (__rand(__remaining) < __m) { - *__stl_out = *__first; - ++__stl_out; - --__m; - } - - --__remaining; - ++__first; - } - return __stl_out; -} - -template -_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, - _RandomAccessIter __stl_out, - const _Distance __n) -{ - _Distance __m = 0; - _Distance __t = __n; - for ( ; __first != __last && __m < __n; ++__m, ++__first) - __stl_out[__m] = *__first; - - while (__first != __last) { - ++__t; - _Distance __M = __random_number(__t); - if (__M < __n) - __stl_out[__M] = *__first; - ++__first; - } - - return __stl_out + __m; -} - -template -_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, - _RandomAccessIter __stl_out, - _RandomNumberGenerator& __rand, - const _Distance __n) -{ - _Distance __m = 0; - _Distance __t = __n; - for ( ; __first != __last && __m < __n; ++__m, ++__first) - __stl_out[__m] = *__first; - - while (__first != __last) { - ++__t; - _Distance __M = __rand(__t); - if (__M < __n) - __stl_out[__M] = *__first; - ++__first; - } - - return __stl_out + __m; -} - -template -_RandomAccessIter -random_sample(_InputIter __first, _InputIter __last, - _RandomAccessIter __out_first, _RandomAccessIter __out_last) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _STLP_DEBUG_CHECK(__check_range(__out_first, __out_last)) - return __random_sample(__first, __last, - __out_first, __out_last - __out_first); -} - -template -_RandomAccessIter -random_sample(_InputIter __first, _InputIter __last, - _RandomAccessIter __out_first, _RandomAccessIter __out_last, - _RandomNumberGenerator& __rand) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _STLP_DEBUG_CHECK(__check_range(__out_first, __out_last)) - return __random_sample(__first, __last, - __out_first, __rand, - __out_last - __out_first); -} - -# endif /* _STLP_NO_EXTENSIONS */ - -// partition, stable_partition, and their auxiliary functions - -template -_STLP_INLINE_LOOP _ForwardIter __partition(_ForwardIter __first, - _ForwardIter __last, - _Predicate __pred, - const forward_iterator_tag &) { - if (__first == __last) return __first; - - while (__pred(*__first)) - if (++__first == __last) return __first; - - _ForwardIter __next = __first; - - while (++__next != __last) - if (__pred(*__next)) { - swap(*__first, *__next); - ++__first; - } - return __first; -} - -/* bug fix- start*/ - -template -_ForwardIter -__rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __middle)) - _STLP_DEBUG_CHECK(__check_range(__middle, __last)) - return __rotate_aux(__first, __middle, __last, - _STLP_DISTANCE_TYPE(__first, _ForwardIter), - _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); -} - -template -_ForwardIter __rotate_aux(_ForwardIter __first, - _ForwardIter __middle, - _ForwardIter __last, - _Distance*, - const forward_iterator_tag &) { - if (__first == __middle) - return __last; - if (__last == __middle) - return __first; - - _ForwardIter __first2 = __middle; - do { - swap(*__first++, *__first2++); - if (__first == __middle) - __middle = __first2; - } while (__first2 != __last); - - _ForwardIter __new_middle = __first; - - __first2 = __middle; - - while (__first2 != __last) { - swap (*__first++, *__first2++); - if (__first == __middle) - __middle = __first2; - else if (__first2 == __last) - __first2 = __middle; - } - - return __new_middle; -} - - -template -_ForwardIter __stable_partition_adaptive(_ForwardIter __first, - _ForwardIter __last, - _Predicate __pred, _Distance __len, - _Pointer __buffer, _Distance __buffer_size, - bool __pred_of_first, bool __pred_of_before_last) { - if (__len <= __buffer_size) { - _ForwardIter __result1 = __first; - _Pointer __result2 = __buffer; - if ((__first != __last) && (!__pred_of_first || __pred(*__first))) { - *__result2 = *__first; - ++__result2; ++__first; --__len; - } - for (; __first != __last ; ++__first, --__len) { - if (((__len == 1) && (__pred_of_before_last || __pred(*__first))) || - ((__len != 1) && __pred(*__first))){ - *__result1 = *__first; - ++__result1; - } - else { - *__result2 = *__first; - ++__result2; - } - } - copy(__buffer, __result2, __result1); - return __result1; - } - else { - _ForwardIter __middle = __first; - _Distance __half_len = __len / 2; - advance(__middle, __half_len); - return __rotate(__stable_partition_adaptive( - __first, __middle, __pred, - __half_len, __buffer, __buffer_size, - __pred_of_first, false), - __middle, - __stable_partition_adaptive( - __middle, __last, __pred, - __len - __half_len, __buffer, __buffer_size, - true, __pred_of_before_last)); - } -} - - -template -_ForwardIter __inplace_stable_partition(_ForwardIter __first, - _ForwardIter __last, - _Predicate __pred, _Distance __len, - bool __pred_of_first, bool __pred_of_before_last) { - if (__len == 1) - return (__pred_of_first && (__pred_of_before_last || __pred(*__first))) ? __last : __first; - _ForwardIter __middle = __first; - _Distance __half_len = __len / 2; - advance(__middle, __half_len); - return __rotate(__inplace_stable_partition(__first, __middle, __pred, __half_len, __pred_of_first, false), - __middle, - __inplace_stable_partition(__middle, __last, __pred, __len - __half_len, true, __pred_of_before_last)); -} - - - -template -_ForwardIter -stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { - _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last)) - for (;;) { - if (__first == __last) - return __first; - else if (__pred(*__first)) - ++__first; - else - break; - } - return __stable_partition_aux(__first, __last, __pred, - _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); -} - - -template -inline _ForwardIter -__stable_partition_aux_aux(_ForwardIter __first, _ForwardIter __last, - _Predicate __pred, _Tp*, _Distance*, bool __pred_of_before_last = false) { - _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last); - return (__buf.size() > 0) ? - __stable_partition_adaptive(__first, __last, __pred, - _Distance(__buf.requested_size()), - __buf.begin(), __buf.size(), - false, __pred_of_before_last) : - __inplace_stable_partition(__first, __last, __pred, - _Distance(__buf.requested_size()), - false, __pred_of_before_last); - -} - -template -_ForwardIter -__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, - const forward_iterator_tag &) { - return __stable_partition_aux_aux(__first, __last, __pred, - _STLP_VALUE_TYPE(__first, _ForwardIter), - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - - -/* bug fix- end*/ - - - -template -_STLP_INLINE_LOOP _BidirectionalIter __partition(_BidirectionalIter __first, - _BidirectionalIter __last, - _Predicate __pred, - const bidirectional_iterator_tag &) { - while (true) { - while (true) - if (__first == __last) - return __first; - else if (__pred(*__first)) - ++__first; - else - break; - --__last; - while (true) - if (__first == __last) - return __first; - else if (!__pred(*__last)) - --__last; - else - break; - iter_swap(__first, __last); - ++__first; - } -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline -_BidirectionalIter __partition(_BidirectionalIter __first, - _BidirectionalIter __last, - _Predicate __pred, - const random_access_iterator_tag &) { - return __partition(__first, __last, __pred, bidirectional_iterator_tag()); -} -# endif - -template -_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __partition(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); -} - -/* -template -_ForwardIter __inplace_stable_partition(_ForwardIter __first, - _ForwardIter __last, - _Predicate __pred, _Distance __len) { - if (__len == 1) - return __pred(*__first) ? __last : __first; - _ForwardIter __middle = __first; - advance(__middle, __len / 2); - return rotate(__inplace_stable_partition(__first, __middle, __pred, - __len / 2), - __middle, - __inplace_stable_partition(__middle, __last, __pred, - __len - __len / 2)); -} - - -template -_ForwardIter __stable_partition_adaptive(_ForwardIter __first, - _ForwardIter __last, - _Predicate __pred, _Distance __len, - _Pointer __buffer, - _Distance __buffer_size) -{ - if (__len <= __buffer_size) { - _ForwardIter __result1 = __first; - _Pointer __result2 = __buffer; - for ( ; __first != __last ; ++__first) - if (__pred(*__first)) { - *__result1 = *__first; - ++__result1; - } - else { - *__result2 = *__first; - ++__result2; - } - copy(__buffer, __result2, __result1); - return __result1; - } - else { - _ForwardIter __middle = __first; - advance(__middle, __len / 2); - return rotate(__stable_partition_adaptive( - __first, __middle, __pred, - _Distance(__len / 2), __buffer, __buffer_size), - __middle, - __stable_partition_adaptive( - __middle, __last, __pred, - _Distance(__len - __len / 2), __buffer, __buffer_size)); - } -} -*/ //bug fix -template -inline _ForwardIter -__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, - _Predicate __pred, _Tp*, _Distance*) -{ - typedef _Temporary_buffer<_ForwardIter, _Tp> _TmpBuf; - _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last); - _STLP_PUSH_STACK_ITEM(_TmpBuf, &__buf); - - _STLP_MPWFIX_TRY //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present - return (__buf.size() > 0) ? - __stable_partition_adaptive(__first, __last, __pred, - _Distance(__buf.requested_size()), - __buf.begin(), _Distance(__buf.size())) : - __inplace_stable_partition(__first, __last, __pred, - _Distance(__buf.requested_size())); - _STLP_MPWFIX_CATCH //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present -} -/* -template -_ForwardIter -stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) - return __first; - else - return __stable_partition_aux(__first, __last, __pred, - _STLP_VALUE_TYPE(__first, _ForwardIter), - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} -*/ //bug fix -template -_RandomAccessIter __unguarded_partition(_RandomAccessIter __first, - _RandomAccessIter __last, - _Tp __pivot, _Compare __comp) -{ - _STLP_PUSH_STACK_ITEM(_Tp, &__pivot) - while (true) { - while (__comp(*__first, __pivot)) - ++__first; - --__last; - while (__comp(__pivot, *__last)) - --__last; - if (!(__first < __last)) - return __first; - iter_swap(__first, __last); - ++__first; - } -} - -// sort() and its auxiliary functions. - -# define __stl_threshold 16 - -template -void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, - _Compare __comp) { - _STLP_PUSH_STACK_ITEM(_Tp, &__val) - _RandomAccessIter __next = __last; - --__next; - while (__comp(__val, *__next)) { - *__last = *__next; - __last = __next; - --__next; - } - *__last = __val; -} - -template -inline void __linear_insert(_RandomAccessIter __first, - _RandomAccessIter __last, _Tp __val, _Compare __comp) { - _STLP_PUSH_STACK_ITEM(_Tp, &__val) - if (__comp(__val, *__first)) { - copy_backward(__first, __last, __last + 1); - *__first = __val; - } - else - __unguarded_linear_insert(__last, __val, __comp); -} - -template -void __insertion_sort(_RandomAccessIter __first, - _RandomAccessIter __last, _Compare __comp) { - if (__first == __last) return; - for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) - __linear_insert(__first, __i, *__i, __comp); //*TY 12/26/1998 - supply *__i as __val -} - -template -void __unguarded_insertion_sort_aux(_RandomAccessIter __first, - _RandomAccessIter __last, - _Tp*, _Compare __comp) { - for (_RandomAccessIter __i = __first; __i != __last; ++__i) - __unguarded_linear_insert(__i, _Tp(*__i), __comp); -} - -template -inline void __unguarded_insertion_sort(_RandomAccessIter __first, - _RandomAccessIter __last, - _Compare __comp) { - __unguarded_insertion_sort_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp); -} - -template -void __final_insertion_sort(_RandomAccessIter __first, - _RandomAccessIter __last, _Compare __comp) { - if (__last - __first > __stl_threshold) { - __insertion_sort(__first, __first + __stl_threshold, __comp); - __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp); - } - else - __insertion_sort(__first, __last, __comp); -} - -template -void __introsort_loop(_RandomAccessIter __first, - _RandomAccessIter __last, _Tp*, - _Size __depth_limit, _Compare __comp) -{ - while (__last - __first > __stl_threshold) { - if (__depth_limit == 0) { - partial_sort(__first, __last, __last, __comp); - return; - } - --__depth_limit; - _RandomAccessIter __cut = - __unguarded_partition(__first, __last, - _Tp(__median(*__first, - *(__first + (__last - __first)/2), - *(__last - 1), __comp)), - __comp); - __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp); - __last = __cut; - } -} - -template -void sort(_RandomAccessIter __first, _RandomAccessIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first != __last) { - __introsort_loop(__first, __last, - _STLP_VALUE_TYPE(__first, _RandomAccessIter), - __lg(__last - __first) * 2, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)) ); - __final_insertion_sort(__first, __last, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); - } -} - -template -void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first != __last) { - __introsort_loop(__first, __last, - _STLP_VALUE_TYPE(__first, _RandomAccessIter), - __lg(__last - __first) * 2, - __comp); - __final_insertion_sort(__first, __last, __comp); - } -} - -// stable_sort() and its auxiliary functions. - -template -void __inplace_stable_sort(_RandomAccessIter __first, - _RandomAccessIter __last, _Compare __comp) { - if (__last - __first < 15) { - __insertion_sort(__first, __last, __comp); - return; - } - _RandomAccessIter __middle = __first + (__last - __first) / 2; - __inplace_stable_sort(__first, __middle, __comp); - __inplace_stable_sort(__middle, __last, __comp); - __merge_without_buffer(__first, __middle, __last, - __middle - __first, - __last - __middle, - __comp); -} - -template -void __merge_sort_loop(_RandomAccessIter1 __first, - _RandomAccessIter1 __last, - _RandomAccessIter2 __result, _Distance __step_size, - _Compare __comp) { - _Distance __two_step = 2 * __step_size; - - while (__last - __first >= __two_step) { - __result = merge(__first, __first + __step_size, - __first + __step_size, __first + __two_step, - __result, - __comp); - __first += __two_step; - } - __step_size = (min) (_Distance(__last - __first), __step_size); - - merge(__first, __first + __step_size, - __first + __step_size, __last, - __result, - __comp); -} - -const int __stl_chunk_size = 7; - -template -void __chunk_insertion_sort(_RandomAccessIter __first, - _RandomAccessIter __last, - _Distance __chunk_size, _Compare __comp) -{ - while (__last - __first >= __chunk_size) { - __insertion_sort(__first, __first + __chunk_size, __comp); - __first += __chunk_size; - } - __insertion_sort(__first, __last, __comp); -} - -template -void __merge_sort_with_buffer(_RandomAccessIter __first, - _RandomAccessIter __last, _Pointer __buffer, - _Distance*, _Compare __comp) { - _Distance __len = __last - __first; - _Pointer __buffer_last = __buffer + __len; - - _Distance __step_size = __stl_chunk_size; - __chunk_insertion_sort(__first, __last, __step_size, __comp); - - while (__step_size < __len) { - __merge_sort_loop(__first, __last, __buffer, __step_size, __comp); - __step_size *= 2; - __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); - __step_size *= 2; - } -} - -template -_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first, - _BidirectionalIter1 __middle, - _BidirectionalIter1 __last, - _Distance __len1, _Distance __len2, - _BidirectionalIter2 __buffer, - _Distance __buffer_size) { - if (__len1 > __len2 && __len2 <= __buffer_size) { - _BidirectionalIter2 __buffer_end = copy(__middle, __last, __buffer); - copy_backward(__first, __middle, __last); - return copy(__buffer, __buffer_end, __first); - } - else if (__len1 <= __buffer_size) { - _BidirectionalIter2 __buffer_end = copy(__first, __middle, __buffer); - copy(__middle, __last, __first); - return copy_backward(__buffer, __buffer_end, __last); - } - else - return rotate(__first, __middle, __last); -} - -template -void __merge_adaptive(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, - _Distance __len1, _Distance __len2, - _Pointer __buffer, _Distance __buffer_size, - _Compare __comp) { - if (__len1 <= __len2 && __len1 <= __buffer_size) { - _Pointer __buffer_end = copy(__first, __middle, __buffer); - merge(__buffer, __buffer_end, __middle, __last, __first, __comp); - } - else if (__len2 <= __buffer_size) { - _Pointer __buffer_end = copy(__middle, __last, __buffer); - __merge_backward(__first, __middle, __buffer, __buffer_end, __last, - __comp); - } - else { - _BidirectionalIter __first_cut = __first; - _BidirectionalIter __second_cut = __middle; - _Distance __len11 = 0; - _Distance __len22 = 0; - if (__len1 > __len2) { - __len11 = __len1 / 2; - advance(__first_cut, __len11); - __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); - __len22 += distance(__middle, __second_cut); - } - else { - __len22 = __len2 / 2; - advance(__second_cut, __len22); - __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); - __len11 += distance(__first, __first_cut); - } - _BidirectionalIter __new_middle = - __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, - __len22, __buffer, __buffer_size); - __merge_adaptive(__first, __first_cut, __new_middle, __len11, - __len22, __buffer, __buffer_size, __comp); - __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, - __len2 - __len22, __buffer, __buffer_size, __comp); - } -} - -template -void __stable_sort_adaptive(_RandomAccessIter __first, - _RandomAccessIter __last, _Pointer __buffer, - _Distance __buffer_size, _Compare __comp) { - _Distance __len = (__last - __first + 1) / 2; - _RandomAccessIter __middle = __first + __len; - if (__len > __buffer_size) { - __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, - __comp); - __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, - __comp); - } - else { - __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0, - __comp); - __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0, - __comp); - } - __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), - _Distance(__last - __middle), __buffer, __buffer_size, - __comp); -} - -template -void __stable_sort_aux(_RandomAccessIter __first, - _RandomAccessIter __last, _Tp*, _Distance*, - _Compare __comp) { - - typedef _Temporary_buffer<_RandomAccessIter, _Tp> _TmpBuf; - _TmpBuf __buf(__first, __last); - _STLP_PUSH_STACK_ITEM(_TmpBuf, &__buf); - - if (__buf.begin() == 0) - __inplace_stable_sort(__first, __last, __comp); - else - __stable_sort_adaptive(__first, __last, __buf.begin(), - _Distance(__buf.size()), - __comp); -} - -template -void stable_sort(_RandomAccessIter __first, - _RandomAccessIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - __stable_sort_aux(__first, __last, - _STLP_VALUE_TYPE(__first, _RandomAccessIter), - _STLP_DISTANCE_TYPE(__first, _RandomAccessIter), - __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); -} - -template -void stable_sort(_RandomAccessIter __first, - _RandomAccessIter __last, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - __stable_sort_aux(__first, __last, - _STLP_VALUE_TYPE(__first, _RandomAccessIter), - _STLP_DISTANCE_TYPE(__first, _RandomAccessIter), - __comp); -} - -// partial_sort, partial_sort_copy, and auxiliary functions. - -template -void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, - _RandomAccessIter __last, _Tp*, _Compare __comp) { - make_heap(__first, __middle, __comp); - for (_RandomAccessIter __i = __middle; __i < __last; ++__i) - if (__comp(*__i, *__first)) - __pop_heap(__first, __middle, __i, _Tp(*__i), __comp, - _STLP_DISTANCE_TYPE(__first, _RandomAccessIter)); - sort_heap(__first, __middle, __comp); -} - - -template -void -partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, _RandomAccessIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __middle)) - _STLP_DEBUG_CHECK(__check_range(__middle, __last)) - __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), - __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); -} - -template -void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, - _RandomAccessIter __last, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __middle)) - _STLP_DEBUG_CHECK(__check_range(__middle, __last)) - __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp); -} - -template -_RandomAccessIter __partial_sort_copy(_InputIter __first, - _InputIter __last, - _RandomAccessIter __result_first, - _RandomAccessIter __result_last, - _Compare __comp, _Distance*, _Tp*) { - if (__result_first == __result_last) return __result_last; - _RandomAccessIter __result_real_last = __result_first; - while(__first != __last && __result_real_last != __result_last) { - *__result_real_last = *__first; - ++__result_real_last; - ++__first; - } - make_heap(__result_first, __result_real_last, __comp); - while (__first != __last) { - if (__comp(*__first, *__result_first)) - __adjust_heap(__result_first, _Distance(0), - _Distance(__result_real_last - __result_first), - _Tp(*__first), - __comp); - ++__first; - } - sort_heap(__result_first, __result_real_last, __comp); - return __result_real_last; -} - -template -_RandomAccessIter -partial_sort_copy(_InputIter __first, _InputIter __last, - _RandomAccessIter __result_first, _RandomAccessIter __result_last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _STLP_DEBUG_CHECK(__check_range(__result_first, __result_last)) - return __partial_sort_copy(__first, __last, __result_first, __result_last, - __less(_STLP_VALUE_TYPE(__first, _InputIter)), - _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter), - _STLP_VALUE_TYPE(__first, _InputIter)); -} - -template -_RandomAccessIter -partial_sort_copy(_InputIter __first, _InputIter __last, - _RandomAccessIter __result_first, - _RandomAccessIter __result_last, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _STLP_DEBUG_CHECK(__check_range(__result_first, __result_last)) - return __partial_sort_copy(__first, __last, __result_first, __result_last, - __comp, - _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter), - _STLP_VALUE_TYPE(__first, _InputIter)); -} - -// nth_element() and its auxiliary functions. - -template -void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, - _RandomAccessIter __last, _Tp*, _Compare __comp) { - while (__last - __first > 3) { - _RandomAccessIter __cut = - __unguarded_partition(__first, __last, - _Tp(__median(*__first, - *(__first + (__last - __first)/2), - *(__last - 1), - __comp)), - __comp); - if (__cut <= __nth) - __first = __cut; - else - __last = __cut; - } - __insertion_sort(__first, __last, __comp); -} - - -template -void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, - _RandomAccessIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __nth)) - _STLP_DEBUG_CHECK(__check_range(__nth, __last)) - __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), - __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); -} - -template -void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, - _RandomAccessIter __last, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __nth)) - _STLP_DEBUG_CHECK(__check_range(__nth, __last)) - __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp); -} - -// Binary search (lower_bound, upper_bound, equal_range, binary_search). - -template -_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, _Compare __comp, _Distance*) -{ - _Distance __len = distance(__first, __last); - _Distance __half; - - while (__len > 0) { - __half = __len >> 1; - _ForwardIter __middle = __first; - advance(__middle, __half); - if (__comp(__val, *__middle)) - __len = __half; - else { - __first = __middle; - ++__first; - __len = __len - __half - 1; - } - } - return __first; -} - -template -pair<_ForwardIter, _ForwardIter> -__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, - _Compare __comp, _Distance*) -{ - _Distance __len = distance(__first, __last); - _Distance __half; - - while (__len > 0) { - __half = __len >> 1; - _ForwardIter __middle = __first; - advance(__middle, __half); - if (__comp(*__middle, __val)) { - __first = __middle; - ++__first; - __len = __len - __half - 1; - } - else if (__comp(__val, *__middle)) - __len = __half; - else { - _ForwardIter __left = lower_bound(__first, __middle, __val, __comp); - advance(__first, __len); - _ForwardIter __right = upper_bound(++__middle, __first, __val, __comp); - return pair<_ForwardIter, _ForwardIter>(__left, __right); - } - } - return pair<_ForwardIter, _ForwardIter>(__first, __first); -} - -template -_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) { - if (*__first2 < *__first1) { - *__result = *__first2; - ++__first2; - } - else { - *__result = *__first1; - ++__first1; - } - ++__result; - } - return copy(__first2, __last2, copy(__first1, __last1, __result)); -} - -template -_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) { - if (__comp(*__first2, *__first1)) { - *__result = *__first2; - ++__first2; - } - else { - *__result = *__first1; - ++__first1; - } - ++__result; - } - return copy(__first2, __last2, copy(__first1, __last1, __result)); -} - -template -void __merge_without_buffer(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, - _Distance __len1, _Distance __len2, - _Compare __comp) { - if (__len1 == 0 || __len2 == 0) - return; - if (__len1 + __len2 == 2) { - if (__comp(*__middle, *__first)) - iter_swap(__first, __middle); - return; - } - _BidirectionalIter __first_cut = __first; - _BidirectionalIter __second_cut = __middle; - _Distance __len11 = 0; - _Distance __len22 = 0; - if (__len1 > __len2) { - __len11 = __len1 / 2; - advance(__first_cut, __len11); - __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); - __len22 += distance(__middle, __second_cut); - } - else { - __len22 = __len2 / 2; - advance(__second_cut, __len22); - __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); - __len11 +=distance(__first, __first_cut); - } - _BidirectionalIter __new_middle - = rotate(__first_cut, __middle, __second_cut); - __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, - __comp); - __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, - __len2 - __len22, __comp); -} - -template -_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, - _BidirectionalIter1 __last1, - _BidirectionalIter2 __first2, - _BidirectionalIter2 __last2, - _BidirectionalIter3 __result, - _Compare __comp) { - if (__first1 == __last1) - return copy_backward(__first2, __last2, __result); - if (__first2 == __last2) - return copy_backward(__first1, __last1, __result); - --__last1; - --__last2; - while (true) { - if (__comp(*__last2, *__last1)) { - *--__result = *__last1; - if (__first1 == __last1) - return copy_backward(__first2, ++__last2, __result); - --__last1; - } - else { - *--__result = *__last2; - if (__first2 == __last2) - return copy_backward(__first1, ++__last1, __result); - --__last2; - } - } -} - -template -inline void __inplace_merge_aux(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, _Tp*, _Distance*, - _Compare __comp) { - _Distance __len1 = distance(__first, __middle); - _Distance __len2 = distance(__middle, __last); - - typedef _Temporary_buffer<_BidirectionalIter, _Tp> _TmpBuf; - _TmpBuf __buf(__first, __last); - _STLP_PUSH_STACK_ITEM(_TmpBuf, &__buf); - - if (__buf.begin() == 0) - __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp); - else - __merge_adaptive(__first, __middle, __last, __len1, __len2, - __buf.begin(), _Distance(__buf.size()), - __comp); -} - -template -void inplace_merge(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __middle)) - _STLP_DEBUG_CHECK(__check_range(__middle, __last)) - if (__first == __middle || __middle == __last) - return; - __inplace_merge_aux(__first, __middle, __last, - _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter), - __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter))); -} - -template -void inplace_merge(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __middle)) - _STLP_DEBUG_CHECK(__check_range(__middle, __last)) - if (__first == __middle || __middle == __last) - return; - __inplace_merge_aux(__first, __middle, __last, - _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter), - __comp); -} - - -template -bool __includes(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) - if (__comp(*__first2, *__first1)) - return false; - else if(__comp(*__first1, *__first2)) - ++__first1; - else - ++__first1, ++__first2; - - return __first2 == __last2; -} - -template -bool includes(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) { - return __includes(__first1, __last1, __first2, __last2, __comp); -} - -template -bool includes(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2) { - return __includes(__first1, __last1, __first2, __last2, __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); -} - -template -_OutputIter __set_union(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) { - if (__comp(*__first1, *__first2)) { - *__result = *__first1; - ++__first1; - } - else if (__comp(*__first2, *__first1)) { - *__result = *__first2; - ++__first2; - } - else { - *__result = *__first1; - ++__first1; - ++__first2; - } - ++__result; - } - return copy(__first2, __last2, copy(__first1, __last1, __result)); -} - -template -_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result) { - return __set_union(__first1, __last1, __first2, __last2, __result, __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); -} - -template -_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - return __set_union(__first1, __last1, __first2, __last2, __result, __comp); -} - -template -_OutputIter __set_intersection(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) - if (__comp(*__first1, *__first2)) - ++__first1; - else if (__comp(*__first2, *__first1)) - ++__first2; - else { - *__result = *__first1; - ++__first1; - ++__first2; - ++__result; - } - return __result; -} - -template -_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result) { - return __set_intersection(__first1, __last1, __first2, __last2, __result, __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); -} - -template -_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - return __set_intersection(__first1, __last1, __first2, __last2, __result, __comp); -} - -template -_OutputIter __set_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) - if (__comp(*__first1, *__first2)) { - *__result = *__first1; - ++__first1; - ++__result; - } - else if (__comp(*__first2, *__first1)) - ++__first2; - else { - ++__first1; - ++__first2; - } - return copy(__first1, __last1, __result); -} - -template -_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result) { - return __set_difference(__first1, __last1, __first2, __last2, __result, - __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); -} - -template -_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - return __set_difference(__first1, __last1, __first2, __last2, __result, __comp); -} - -template -_OutputIter -__set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - while (__first1 != __last1 && __first2 != __last2) - if (__comp(*__first1, *__first2)) { - *__result = *__first1; - ++__first1; - ++__result; - } - else if (__comp(*__first2, *__first1)) { - *__result = *__first2; - ++__first2; - ++__result; - } - else { - ++__first1; - ++__first2; - } - return copy(__first2, __last2, copy(__first1, __last1, __result)); -} - -template -_OutputIter -set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result) { - return __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, - __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); -} - -template -_OutputIter -set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, - _Compare __comp) { - return __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp); -} - -// min_element and max_element, with and without an explicitly supplied -// comparison function. - -template -_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __first; - _ForwardIter __result = __first; - while (++__first != __last) - if (__comp(*__result, *__first)) __result = __first; - return __result; -} - -template -_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __first; - _ForwardIter __result = __first; - while (++__first != __last) - if (*__result < *__first) - __result = __first; - return __result; -} - -template -_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __first; - _ForwardIter __result = __first; - while (++__first != __last) - if (*__first < *__result) - __result = __first; - return __result; -} - -template -_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __first; - _ForwardIter __result = __first; - while (++__first != __last) - if (__comp(*__first, *__result)) __result = __first; - return __result; -} - -// next_permutation and prev_permutation, with and without an explicitly -// supplied comparison function. -template -bool __next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) - return false; - _BidirectionalIter __i = __first; - ++__i; - if (__i == __last) - return false; - __i = __last; - --__i; - - for(;;) { - _BidirectionalIter __ii = __i; - --__i; - if (__comp(*__i, *__ii)) { - _BidirectionalIter __j = __last; - while (!__comp(*__i, *--__j)) - {} - iter_swap(__i, __j); - reverse(__ii, __last); - return true; - } - if (__i == __first) { - reverse(__first, __last); - return false; - } - } -#if defined(_STLP_NEED_UNREACHABLE_RETURN) - return 0; -#endif -} - -template -bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __next_permutation(__first, __last, __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter))); -} - -template -bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __next_permutation(__first, __last, __comp); -} - -template -bool __prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, - _Compare __comp) { - if (__first == __last) - return false; - _BidirectionalIter __i = __first; - ++__i; - if (__i == __last) - return false; - __i = __last; - --__i; - - for(;;) { - _BidirectionalIter __ii = __i; - --__i; - if (__comp(*__ii, *__i)) { - _BidirectionalIter __j = __last; - while (!__comp(*--__j, *__i)) - {} - iter_swap(__i, __j); - reverse(__ii, __last); - return true; - } - if (__i == __first) { - reverse(__first, __last); - return false; - } - } -#if defined(_STLP_NEED_UNREACHABLE_RETURN) - return 0; -#endif -} - -template -bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __prev_permutation(__first, __last, __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter))); -} - -template -bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __prev_permutation(__first, __last, __comp); -} - -# ifndef _STLP_NO_EXTENSIONS - -// is_heap, a predicate testing whether or not a range is -// a heap. This function is an extension, not part of the C++ -// standard. - - -template -bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp, - _Distance __n) -{ - _Distance __parent = 0; - for (_Distance __child = 1; __child < __n; ++__child) { - if (__comp(__first[__parent], __first[__child])) - return false; - if ((__child & 1) == 0) - ++__parent; - } - return true; -} - -template -bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __is_heap(__first, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)), __last - __first); -} - -template -bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last, - _StrictWeakOrdering __comp) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __is_heap(__first, __comp, __last - __first); -} - - -template -bool __is_sorted(_ForwardIter __first, _ForwardIter __last, - _StrictWeakOrdering __comp) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) - return true; - - _ForwardIter __next = __first; - for (++__next; __next != __last; __first = __next, ++__next) { - if (__comp(*__next, *__first)) - return false; - } - - return true; -} - -# endif /* _STLP_NO_EXTENSIONS */ - -_STLP_END_NAMESPACE - -# undef __stl_threshold - -#endif /* _STLP_ALGO_C */ -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_algo.h --- a/epoc32/include/stdapis/stlport/stl/_algo.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,740 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_ALGO_H -#define _STLP_INTERNAL_ALGO_H - -# ifndef _STLP_INTERNAL_ALGOBASE_H -# include -# endif - -# ifndef _STLP_INTERNAL_TEMPBUF_H -# include -# endif - -# ifndef _STLP_INTERNAL_HEAP_H -# include -# endif - -# ifndef _STLP_INTERNAL_ITERATOR_H -# include -# endif - -# ifndef _STLP_INTERNAL_FUNCTION_BASE_H -# include -# endif - -# ifdef __SUNPRO_CC -// remove() conflict -# include -# endif - -_STLP_BEGIN_NAMESPACE - -// for_each. Apply a function to every element of a range. -template -_STLP_INLINE_LOOP _Function -for_each(_InputIter __first, _InputIter __last, _Function __f) { - for ( ; __first != __last; ++__first) - __f(*__first); - return __f; -} - -// count_if -template -_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter) -count_if(_InputIter __first, _InputIter __last, _Predicate __pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) -_STLP_DIFFERENCE_TYPE(_InputIter) __n = 0; - for ( ; __first != __last; ++__first) - if (__pred(*__first)) - ++__n; - return __n; -} - -// adjacent_find. - -template -_STLP_INLINE_LOOP _ForwardIter -adjacent_find(_ForwardIter __first, _ForwardIter __last, - _BinaryPredicate __binary_pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) - return __last; - _ForwardIter __next = __first; - while(++__next != __last) { - if (__binary_pred(*__first, *__next)) - return __first; - __first = __next; - } - return __last; -} - -template -_STLP_INLINE_LOOP _ForwardIter -adjacent_find(_ForwardIter __first, _ForwardIter __last) { - return adjacent_find(__first, __last, - __equal_to(_STLP_VALUE_TYPE(__first, _ForwardIter))); -} - -# ifndef _STLP_NO_ANACHRONISMS -template -_STLP_INLINE_LOOP void -count(_InputIter __first, _InputIter __last, const _Tp& __val, _Size& __n) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - if (*__first == __val) - ++__n; -} - -template -_STLP_INLINE_LOOP void -count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - if (__pred(*__first)) - ++__n; -} -# endif - -template -_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2); - -// search_n. Search for __count consecutive copies of __val. -template -_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, - _Integer __count, const _Tp& __val); -template -_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, - _Integer __count, const _Tp& __val, _BinaryPred __binary_pred); - -template -inline _InputIter find_first_of(_InputIter __first1, _InputIter __last1, - _ForwardIter __first2, _ForwardIter __last2) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - return __find_first_of(__first1, __last1, __first2, __last2,__equal_to(_STLP_VALUE_TYPE(__first1, _InputIter))); -} - -template -inline _InputIter -find_first_of(_InputIter __first1, _InputIter __last1, - _ForwardIter __first2, _ForwardIter __last2,_BinaryPredicate __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - return __find_first_of(__first1, __last1, __first2, __last2,__comp); -} - -template -_ForwardIter1 -find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2); - -// swap_ranges -template -_STLP_INLINE_LOOP _ForwardIter2 -swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - for ( ; __first1 != __last1; ++__first1, ++__first2) - iter_swap(__first1, __first2); - return __first2; -} - -// transform -template -_STLP_INLINE_LOOP _OutputIter -transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __opr) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first, ++__result) - *__result = __opr(*__first); - return __result; -} -template -_STLP_INLINE_LOOP _OutputIter -transform(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _OutputIter __result,_BinaryOperation __binary_op) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) - *__result = __binary_op(*__first1, *__first2); - return __result; -} - -// replace_if, replace_copy, replace_copy_if - -template -_STLP_INLINE_LOOP void -replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - if (__pred(*__first)) - *__first = __new_value; -} - -template -_STLP_INLINE_LOOP _OutputIter -replace_copy(_InputIter __first, _InputIter __last,_OutputIter __result, - const _Tp& __old_value, const _Tp& __new_value) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first, ++__result) - *__result = *__first == __old_value ? __new_value : *__first; - return __result; -} - -template -_STLP_INLINE_LOOP _OutputIter -replace_copy_if(_Iterator __first, _Iterator __last, - _OutputIter __result, - _Predicate __pred, const _Tp& __new_value) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first, ++__result) - *__result = __pred(*__first) ? __new_value : *__first; - return __result; -} - -// generate and generate_n - -template -_STLP_INLINE_LOOP void -generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - *__first = __gen(); -} - -template -_STLP_INLINE_LOOP _OutputIter -generate_n(_OutputIter __first, _Size __n, _Generator __gen) { - for ( ; __n > 0; --__n, ++__first) - *__first = __gen(); - return __first; -} - -// remove, remove_if, remove_copy, remove_copy_if - -template -_STLP_INLINE_LOOP _OutputIter -remove_copy(_InputIter __first, _InputIter __last,_OutputIter __result, const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - if (!(*__first == __val)) { - *__result = *__first; - ++__result; - } - return __result; -} - -template -_STLP_INLINE_LOOP _OutputIter -remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - if (!__pred(*__first)) { - *__result = *__first; - ++__result; - } - return __result; -} - -template -_STLP_INLINE_LOOP _ForwardIter -remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - __first = find(__first, __last, __val); - if (__first == __last) - return __first; - else { - _ForwardIter __next = __first; - return remove_copy(++__next, __last, __first, __val); - } -} - -template -_STLP_INLINE_LOOP _ForwardIter -remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - __first = find_if(__first, __last, __pred); - if ( __first == __last ) - return __first; - else { - _ForwardIter __next = __first; - return remove_copy_if(++__next, __last, __first, __pred); - } -} - -// unique and unique_copy -template -_OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result); - -template -_OutputIter unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result, - _BinaryPredicate __binary_pred); - -template -inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) { - __first = adjacent_find(__first, __last); - return unique_copy(__first, __last, __first); -} - -template -inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last, - _BinaryPredicate __binary_pred) { - __first = adjacent_find(__first, __last, __binary_pred); - return unique_copy(__first, __last, __first, __binary_pred); -} - -// reverse and reverse_copy, and their auxiliary functions - -template -_STLP_INLINE_LOOP void -__reverse(_BidirectionalIter __first, _BidirectionalIter __last, const bidirectional_iterator_tag &) { - for(; __first != __last && __first != --__last; ++__first) - iter_swap(__first,__last); -} - - -template -_STLP_INLINE_LOOP void -__reverse(_RandomAccessIter __first, _RandomAccessIter __last, const random_access_iterator_tag &) { - for (; __first < __last; ++__first) iter_swap(__first, --__last); -} - -template -inline void -reverse(_BidirectionalIter __first, _BidirectionalIter __last) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - __reverse(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _BidirectionalIter)); -} - -template -_STLP_INLINE_LOOP -_OutputIter reverse_copy(_BidirectionalIter __first, - _BidirectionalIter __last, - _OutputIter __result) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - while (__first != __last) { - --__last; - *__result = *__last; - ++__result; - } - return __result; -} - -// rotate and rotate_copy, and their auxiliary functions - -template -_STLP_INLINE_LOOP -_EuclideanRingElement __gcd(_EuclideanRingElement __m, - _EuclideanRingElement __n) -{ - while (__n != 0) { - _EuclideanRingElement __t = __m % __n; - __m = __n; - __n = __t; - } - return __m; -} - -template -_ForwardIter -rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last); - -template -inline _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle, - _ForwardIter __last, _OutputIter __result) { - return copy(__first, __middle, copy(__middle, __last, __result)); -} - -// random_shuffle - -template -void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last); - -template -void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last, - _RandomNumberGenerator& __rand); - -# ifndef _STLP_NO_EXTENSIONS -// random_sample and random_sample_n (extensions, not part of the standard). - -template -_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, - _OutputIter __stl_out, const _Distance __n); - -template -_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, - _OutputIter __stl_out, const _Distance __n, - _RandomNumberGenerator& __rand); - -template -_RandomAccessIter -random_sample(_InputIter __first, _InputIter __last, - _RandomAccessIter __out_first, _RandomAccessIter __out_last); - -template -_RandomAccessIter -random_sample(_InputIter __first, _InputIter __last, - _RandomAccessIter __out_first, _RandomAccessIter __out_last, - _RandomNumberGenerator& __rand); - -# endif /* _STLP_NO_EXTENSIONS */ - -// partition, stable_partition, and their auxiliary functions - -template -_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred); - - -template -_ForwardIter -stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred); - -// sort() and its auxiliary functions. - -template -inline _Size __lg(_Size __n) { - _Size __k; - for (__k = 0; __n != 1; __n >>= 1) ++__k; - return __k; -} - -template -void sort(_RandomAccessIter __first, _RandomAccessIter __last); -template -void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp); - -// stable_sort() and its auxiliary functions. -template -void stable_sort(_RandomAccessIter __first, - _RandomAccessIter __last); - -template -void stable_sort(_RandomAccessIter __first, - _RandomAccessIter __last, _Compare __comp); - -// partial_sort, partial_sort_copy, and auxiliary functions. - -template -void -partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, _RandomAccessIter __last); - -template -void -partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, - _RandomAccessIter __last, _Compare __comp); - -template -_RandomAccessIter -partial_sort_copy(_InputIter __first, _InputIter __last, - _RandomAccessIter __result_first, _RandomAccessIter __result_last); - -template -_RandomAccessIter -partial_sort_copy(_InputIter __first, _InputIter __last, - _RandomAccessIter __result_first, - _RandomAccessIter __result_last, _Compare __comp); - -// nth_element() and its auxiliary functions. - -template -void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, - _RandomAccessIter __last); - -template -void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, - _RandomAccessIter __last, _Compare __comp); - -// auxiliary class for lower_bound, etc. -template -struct __less_2 { - bool operator() (const _T1& __x, const _T2 __y) const { return __x < __y ; } -}; - -template -__less_2<_T1,_T2> __less2(_T1*, _T2* ) { return __less_2<_T1, _T2>(); } - -#ifdef _STLP_FUNCTION_PARTIAL_ORDER -template -less<_Tp> __less2(_Tp*, _Tp* ) { return less<_Tp>(); } -#endif - -// Binary search (lower_bound, upper_bound, equal_range, binary_search). - -template -inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __lower_bound(__first, __last, __val, - __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - -template -inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __lower_bound(__first, __last, __val, __comp, _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - -template -_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, _Compare __comp, _Distance*); - -template -inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __upper_bound(__first, __last, __val, - __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - -template -inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __upper_bound(__first, __last, __val, __comp, - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - -template -pair<_ForwardIter, _ForwardIter> -__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, - _Compare __comp, _Distance*); - -template -inline pair<_ForwardIter, _ForwardIter> -equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __equal_range(__first, __last, __val, - __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - -template -inline pair<_ForwardIter, _ForwardIter> -equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __equal_range(__first, __last, __val, __comp, - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); -} - -template -inline bool binary_search(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _ForwardIter __i = __lower_bound(__first, __last, __val, - __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), - _STLP_DISTANCE_TYPE(__first, _ForwardIter)); - return __i != __last && !(__val < *__i); -} - -template -inline bool binary_search(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _ForwardIter __i = __lower_bound(__first, __last, __val, __comp, _STLP_DISTANCE_TYPE(__first, _ForwardIter)); - return __i != __last && !__comp(__val, *__i); -} - -// merge, with and without an explicitly supplied comparison function. - -template -_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result); - -template -_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp); - - -// inplace_merge and its auxiliary functions. - - -template -void inplace_merge(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last) ; - -template -void inplace_merge(_BidirectionalIter __first, - _BidirectionalIter __middle, - _BidirectionalIter __last, _Compare __comp); - -// Set algorithms: includes, set_union, set_intersection, set_difference, -// set_symmetric_difference. All of these algorithms have the precondition -// that their input ranges are sorted and the postcondition that their output -// ranges are sorted. - -template -bool includes(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2); - -template -bool includes(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, _Compare __comp); - -template -_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result); - -template -_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp); - -template -_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result); - -template -_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp); - - - -template -_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result); - -template -_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, _Compare __comp); - -template -_OutputIter -set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result); - - -template -_OutputIter -set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _OutputIter __result, - _Compare __comp); - - -// min_element and max_element, with and without an explicitly supplied -// comparison function. - -template -_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last); -template -_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last, - _Compare __comp); - -template -_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last); - -template -_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last, - _Compare __comp); - -// next_permutation and prev_permutation, with and without an explicitly -// supplied comparison function. - -template -bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last); - -template -bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, - _Compare __comp); - - -template -bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last); - - -template -bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, - _Compare __comp); - -# ifndef _STLP_NO_EXTENSIONS - -// is_heap, a predicate testing whether or not a range is -// a heap. This function is an extension, not part of the C++ -// standard. - -template -bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last); - -template -bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last, - _StrictWeakOrdering __comp); - - -// is_sorted, a predicated testing whether a range is sorted in -// nondescending order. This is an extension, not part of the C++ -// standard. -template -bool __is_sorted(_ForwardIter __first, _ForwardIter __last, - _StrictWeakOrdering __comp); - -template -inline bool is_sorted(_ForwardIter __first, _ForwardIter __last) { - return __is_sorted(__first, __last, __less(_STLP_VALUE_TYPE(__first, _ForwardIter))); -} - -template -inline bool is_sorted(_ForwardIter __first, _ForwardIter __last, - _StrictWeakOrdering __comp) { - return __is_sorted(__first, __last, __comp); -} -# endif - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_ALGO_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_algobase.c --- a/epoc32/include/stdapis/stlport/stl/_algobase.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,392 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_ALGOBASE_C -#define _STLP_ALGOBASE_C - -# if !defined (_STLP_INTERNAL_ALGOBASE_H) -# include -# endif - -_STLP_BEGIN_NAMESPACE - -template -bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - for ( ; __first1 != __last1 && __first2 != __last2 - ; ++__first1, ++__first2) { - if (*__first1 < *__first2) - return true; - if (*__first2 < *__first1) - return false; - } - return __first1 == __last1 && __first2 != __last2; -} - -template -bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _Compare __comp) { - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - for ( ; __first1 != __last1 && __first2 != __last2 - ; ++__first1, ++__first2) { - if (__comp(*__first1, *__first2)) - return true; - if (__comp(*__first2, *__first1)) - return false; - } - return __first1 == __last1 && __first2 != __last2; -} - -# ifndef _STLP_NO_EXTENSIONS - -template -int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2) -{ - while (__first1 != __last1 && __first2 != __last2) { - if (*__first1 < *__first2) - return -1; - if (*__first2 < *__first1) - return 1; - ++__first1; - ++__first2; - } - if (__first2 == __last2) { - return !(__first1 == __last1); - } - else { - return -1; - } -} - - -template -int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - return __lexicographical_compare_3way(__first1, __last1, __first2, __last2); -} -# endif - -template -_STLP_INLINE_LOOP _RandomAccessIter __find(_RandomAccessIter __first, _RandomAccessIter __last, - const _Tp& __val, - const random_access_iterator_tag &) -{ - _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2; - - for ( ; __trip_count > 0 ; --__trip_count) { - if (*__first == __val) return __first; - ++__first; - - if (*__first == __val) return __first; - ++__first; - - if (*__first == __val) return __first; - ++__first; - - if (*__first == __val) return __first; - ++__first; - } - - switch(__last - __first) { - case 3: - if (*__first == __val) return __first; - ++__first; - case 2: - if (*__first == __val) return __first; - ++__first; - case 1: - if (*__first == __val) return __first; - ++__first; - case 0: - default: - return __last; - } -} - -template -_STLP_INLINE_LOOP _RandomAccessIter __find_if(_RandomAccessIter __first, _RandomAccessIter __last, - _Predicate __pred, - const random_access_iterator_tag &) -{ - _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2; - - for ( ; __trip_count > 0 ; --__trip_count) { - if (__pred(*__first)) return __first; - ++__first; - - if (__pred(*__first)) return __first; - ++__first; - - if (__pred(*__first)) return __first; - ++__first; - - if (__pred(*__first)) return __first; - ++__first; - } - - switch(__last - __first) { - case 3: - if (__pred(*__first)) return __first; - ++__first; - case 2: - if (__pred(*__first)) return __first; - ++__first; - case 1: - if (__pred(*__first)) return __first; - // ++__first; - case 0: - default: - return __last; - } -} - -template -inline _InputIter __find(_InputIter __first, _InputIter __last, - const _Tp& __val, - const input_iterator_tag &) -{ - while (__first != __last && !(*__first == __val)) - ++__first; - return __first; -} - -template -inline _InputIter __find_if(_InputIter __first, _STLP_MPW_EXTRA_CONST _InputIter __last, - _Predicate __pred, - const input_iterator_tag &) -{ - while (__first != __last && !__pred(*__first)) - ++__first; - return __first; -} - -template -_InputIter find_if(_InputIter __first, _InputIter __last, - _Predicate __pred) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __find_if(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); -} - -template -_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __find(__first, __last, __val, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); -} - -template -_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2, - _BinaryPred __predicate) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - // Test for empty ranges - if (__first1 == __last1 || __first2 == __last2) - return __first1; - - // Test for a pattern of length 1. - _ForwardIter2 __tmp(__first2); - ++__tmp; - if (__tmp == __last2) { - while (__first1 != __last1 && !__predicate(*__first1, *__first2)) - ++__first1; - return __first1; - } - - // General case. - - _ForwardIter2 __p1, __p; - - __p1 = __first2; ++__p1; - - // _ForwardIter1 __current = __first1; - - while (__first1 != __last1) { - while (__first1 != __last1) { - if (__predicate(*__first1, *__first2)) - break; - ++__first1; - } - while (__first1 != __last1 && !__predicate(*__first1, *__first2)) - ++__first1; - if (__first1 == __last1) - return __last1; - - __p = __p1; - _ForwardIter1 __current = __first1; - if (++__current == __last1) return __last1; - - while (__predicate(*__current, *__p)) { - if (++__p == __last2) - return __first1; - if (++__current == __last1) - return __last1; - } - - ++__first1; - } - return __first1; -} - -// find_first_of, with and without an explicitly supplied comparison function. - -template -_InputIter __find_first_of(_InputIter __first1, _InputIter __last1, - _ForwardIter __first2, _ForwardIter __last2, - _BinaryPredicate __comp) { - for ( ; __first1 != __last1; ++__first1) - for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) - if (__comp(*__first1, *__iter)) - return __first1; - return __last1; -} - - -// find_end, with and without an explicitly supplied comparison function. -// Search [first2, last2) as a subsequence in [first1, last1), and return -// the *last* possible match. Note that find_end for bidirectional iterators -// is much faster than for forward iterators. - -// find_end for forward iterators. - -template -_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2, - const forward_iterator_tag &, const forward_iterator_tag &, - _BinaryPredicate __comp) -{ - if (__first2 == __last2) - return __last1; - else { - _ForwardIter1 __result = __last1; - while (1) { - _ForwardIter1 __new_result - = search(__first1, __last1, __first2, __last2, __comp); - if (__new_result == __last1) - return __result; - else { - __result = __new_result; - __first1 = __new_result; - ++__first1; - } - } - } -} - -// find_end for bidirectional iterators. Requires partial specialization. -#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) - -#if ! defined (_STLP_INTERNAL_ITERATOR_H) -_STLP_END_NAMESPACE -# include -_STLP_BEGIN_NAMESPACE -#endif - -template -_BidirectionalIter1 -__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, - _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, - const bidirectional_iterator_tag &, const bidirectional_iterator_tag &, - _BinaryPredicate __comp) -{ - typedef reverse_iterator<_BidirectionalIter1> _RevIter1; - typedef reverse_iterator<_BidirectionalIter2> _RevIter2; - - _RevIter1 __rlast1(__first1); - _RevIter2 __rlast2(__first2); - _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1, - _RevIter2(__last2), __rlast2, - __comp); - - if (__rresult == __rlast1) - return __last1; - else { - _BidirectionalIter1 __result = __rresult.base(); - advance(__result, -distance(__first2, __last2)); - return __result; - } -} -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -template -_ForwardIter1 -find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2, - _BinaryPredicate __comp) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - return __find_end(__first1, __last1, __first2, __last2, -# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) - _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1), - _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2), -# else - forward_iterator_tag(), - forward_iterator_tag(), -# endif - __comp); -} - -template -_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, _Compare __comp, _Distance*) -{ - _Distance __len = distance(__first, __last); - _Distance __half; - _ForwardIter __middle; - - while (__len > 0) { - __half = __len >> 1; - __middle = __first; - advance(__middle, __half); - if (__comp(*__middle, __val)) { - __first = __middle; - ++__first; - __len = __len - __half - 1; - } - else - __len = __half; - } - return __first; -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_ALGOBASE_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_algobase.h --- a/epoc32/include/stdapis/stlport/stl/_algobase.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,583 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - - -#ifndef _STLP_INTERNAL_ALGOBASE_H -#define _STLP_INTERNAL_ALGOBASE_H - -# if ! defined (_STLP_CSTDDEF) -# include -# endif - -#ifndef _STLP_CSTRING -# include -#endif - -#ifndef _STLP_CLIMITS -# include -#endif - -# if ! defined (_STLP_CSTDLIB) -# include -# endif - -# ifndef _STLP_INTERNAL_PAIR_H -# include -# endif - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE -// swap and iter_swap -template -inline void swap(_Tp& __a, _Tp& __b) { - _Tp __tmp = __a; - __a = __b; - __b = __tmp; -} - -template -inline void iter_swap(_ForwardIter1 __i1, _ForwardIter2 __i2) { - swap(*__i1, *__i2); -} - -//-------------------------------------------------- -// min and max - -# if !defined (__BORLANDC__) || defined (_STLP_USE_OWN_NAMESPACE) -template -inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } -template -inline const _Tp& (max)(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } -#endif /* __BORLANDC__ */ - -# if defined (__BORLANDC__) && ( __BORLANDC__ < 0x530 || defined (_STLP_USE_OWN_NAMESPACE)) -inline unsigned long (min) (unsigned long __a, unsigned long __b) { return __b < __a ? __b : __a; } -inline unsigned long (max) (unsigned long __a, unsigned long __b) { return __a < __b ? __b : __a; } -# endif - -template -inline const _Tp& (min)(const _Tp& __a, const _Tp& __b, _Compare __comp) { - return __comp(__b, __a) ? __b : __a; -} - -template -inline const _Tp& (max)(const _Tp& __a, const _Tp& __b, _Compare __comp) { - return __comp(__a, __b) ? __b : __a; -} - -//-------------------------------------------------- -// copy - -// All of these auxiliary functions serve two purposes. (1) Replace -// calls to copy with memmove whenever possible. (Memmove, not memcpy, -// because the input and output ranges are permitted to overlap.) -// (2) If we're using random access iterators, then write the loop as -// a for loop with an explicit count. - -template -inline _OutputIter __copy(_InputIter __first, _InputIter __last, - _OutputIter __result, - const input_iterator_tag &, _Distance*) { - for ( ; __first != __last; ++__result, ++__first) - *__result = *__first; - return __result; -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline _OutputIter __copy(_InputIter __first, _InputIter __last, - _OutputIter __result, const forward_iterator_tag &, _Distance* ) { - for ( ; __first != __last; ++__result, ++__first) - *__result = *__first; - return __result; -} - - -template -inline _OutputIter __copy(_InputIter __first, _InputIter __last, - _OutputIter __result, const bidirectional_iterator_tag &, _Distance* __dis) { - for ( ; __first != __last; ++__result, ++__first) - *__result = *__first; - return __result; -} -# endif - -template -inline _OutputIter -__copy(_RandomAccessIter __first, _RandomAccessIter __last, - _OutputIter __result, const random_access_iterator_tag &, _Distance*) { - for (_Distance __n = __last - __first; __n > 0; --__n) { - *__result = *__first; - ++__first; - ++__result; - } - return __result; -} - -inline void* -__copy_trivial(const void* __first, const void* __last, void* __result) { - return (__last == __first) ? __result : - ((char*)memmove(__result, __first, ((const char*)__last - (const char*)__first))) + - ((const char*)__last - (const char*)__first); -} - -//-------------------------------------------------- -// copy_backward auxiliary functions - -template -inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, - _BidirectionalIter1 __last, - _BidirectionalIter2 __result, - const bidirectional_iterator_tag &, - _Distance*) -{ - while (__first != __last) - *--__result = *--__last; - return __result; -} - -template -inline _BidirectionalIter __copy_backward(_RandomAccessIter __first, - _RandomAccessIter __last, - _BidirectionalIter __result, - const random_access_iterator_tag &, - _Distance*) -{ - for (_Distance __n = __last - __first; __n > 0; --__n) - *--__result = *--__last; - return __result; -} - -inline void* -__copy_trivial_backward(const void* __first, const void* __last, void* __result) { - const ptrdiff_t _Num = (const char*)__last - (const char*)__first; - return (_Num > 0) ? memmove((char*)__result - _Num, __first, _Num) : __result ; -} - -template -inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { - return __copy(__first, __last, __result, - _STLP_ITERATOR_CATEGORY(__first, _InputIter), - _STLP_DISTANCE_TYPE(__first, _InputIter)); -} -template -inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { -// we know they all pointers, so this cast is OK - // return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result)); - return (_OutputIter)__copy_trivial(__first, __last, __result); -} - -template -inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { - return __copy_ptrs(__first, __last, __result, - _IsOKToMemCpy(_STLP_VALUE_TYPE(__first, _InputIter), - _STLP_VALUE_TYPE(__result, _OutputIter))._Ret()); -} - -template -inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { - return __copy(__first, __last, __result, - _STLP_ITERATOR_CATEGORY(__first, _InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter)); -} - -template -inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter> :: _Ret()); -} - -template -inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { - return __copy_backward(__first, __last, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter)); -} -template -inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { - return (_OutputIter)__copy_trivial_backward(__first, __last, __result); -} - -template -inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { - return __copy_backward(__first, __last, __result, _STLP_ITERATOR_CATEGORY(__first,_InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter)); -} - -template -inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { - return __copy_backward_ptrs(__first, __last, __result, - _IsOKToMemCpy(_STLP_VALUE_TYPE(__first, _InputIter), - _STLP_VALUE_TYPE(__result, _OutputIter))._Ret()); -} - -template -inline _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - return __copy_backward_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter> :: _Ret() ); -} - -#if ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined ( _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS ) -#define _STLP_DECLARE_COPY_TRIVIAL(_Tp) \ -inline _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) \ -{ return (_Tp*)__copy_trivial(__first, __last, __result); } \ -inline _Tp* copy_backward(const _Tp* __first, const _Tp* __last, _Tp* __result) \ -{ return (_Tp*)__copy_trivial_backward(__first, __last, __result); } - -_STLP_DECLARE_COPY_TRIVIAL(char) -# ifndef _STLP_NO_SIGNED_BUILTINS -_STLP_DECLARE_COPY_TRIVIAL(signed char) -# endif -_STLP_DECLARE_COPY_TRIVIAL(unsigned char) -_STLP_DECLARE_COPY_TRIVIAL(short) -_STLP_DECLARE_COPY_TRIVIAL(unsigned short) -_STLP_DECLARE_COPY_TRIVIAL(int) -_STLP_DECLARE_COPY_TRIVIAL(unsigned int) -_STLP_DECLARE_COPY_TRIVIAL(long) -_STLP_DECLARE_COPY_TRIVIAL(unsigned long) -#if !defined(_STLP_NO_WCHAR_T) && !defined (_STLP_WCHAR_T_IS_USHORT) -_STLP_DECLARE_COPY_TRIVIAL(wchar_t) -#endif -#ifdef _STLP_LONG_LONG -_STLP_DECLARE_COPY_TRIVIAL(long long) -_STLP_DECLARE_COPY_TRIVIAL(unsigned long long) -#endif -_STLP_DECLARE_COPY_TRIVIAL(float) -_STLP_DECLARE_COPY_TRIVIAL(double) -# ifndef _STLP_NO_LONG_DOUBLE -_STLP_DECLARE_COPY_TRIVIAL(long double) -# endif -#undef _STLP_DECLARE_COPY_TRIVIAL -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -//-------------------------------------------------- -// copy_n (not part of the C++ standard) - -template -_STLP_INLINE_LOOP -pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count, - _OutputIter __result, - const input_iterator_tag &) { - for ( ; __count > 0; --__count) { - *__result = *__first; - ++__first; - ++__result; - } - return pair<_InputIter, _OutputIter>(__first, __result); -} - -template -inline pair<_RAIter, _OutputIter> -__copy_n(_RAIter __first, _Size __count, - _OutputIter __result, - const random_access_iterator_tag &) { - _RAIter __last = __first + __count; - return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result)); -} - -template -inline pair<_InputIter, _OutputIter> -__copy_n(_InputIter __first, _Size __count, _OutputIter __result) { - _STLP_FIX_LITERAL_BUG(__first) - return __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); -} - -template -inline pair<_InputIter, _OutputIter> -copy_n(_InputIter __first, _Size __count, _OutputIter __result) { - _STLP_FIX_LITERAL_BUG(__first) - return __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); -} - -//-------------------------------------------------- -// fill and fill_n - - -template -_STLP_INLINE_LOOP -void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - *__first = __val; -} - -template -_STLP_INLINE_LOOP -_OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __val) { - _STLP_FIX_LITERAL_BUG(__first) - for ( ; __n > 0; --__n, ++__first) - *__first = __val; - return __first; -} - - -// Specialization: for one-byte types we can use memset. - -inline void fill(unsigned char* __first, unsigned char* __last, - const unsigned char& __val) { - unsigned char __tmp = __val; - memset(__first, __tmp, __last - __first); -} -# ifndef _STLP_NO_SIGNED_BUILTINS -inline void fill(signed char* __first, signed char* __last, - const signed char& __val) { - signed char __tmp = __val; - memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first); -} -# endif -inline void fill(char* __first, char* __last, const char& __val) { - char __tmp = __val; - memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first); -} - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER - -template -inline unsigned char* fill_n(unsigned char* __first, _Size __n, - const unsigned char& __val) { - fill(__first, __first + __n, __val); - return __first + __n; -} - -template -inline signed char* fill_n(char* __first, _Size __n, - const signed char& __val) { - fill(__first, __first + __n, __val); - return __first + __n; -} - -template -inline char* fill_n(char* __first, _Size __n, const char& __val) { - fill(__first, __first + __n, __val); - return __first + __n; -} - -#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ - - -//-------------------------------------------------- -// equal and mismatch - -template -_STLP_INLINE_LOOP -pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, - _InputIter1 __last1, - _InputIter2 __first2) { - _STLP_FIX_LITERAL_BUG(__first2) - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - while (__first1 != __last1 && *__first1 == *__first2) { - ++__first1; - ++__first2; - } - return pair<_InputIter1, _InputIter2>(__first1, __first2); -} - -template -_STLP_INLINE_LOOP -pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, - _InputIter1 __last1, - _InputIter2 __first2, - _BinaryPredicate __binary_pred) { - _STLP_FIX_LITERAL_BUG(__first2) - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) { - ++__first1; - ++__first2; - } - return pair<_InputIter1, _InputIter2>(__first1, __first2); -} - -template -_STLP_INLINE_LOOP -bool equal(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2) { - _STLP_FIX_LITERAL_BUG(__first1) _STLP_FIX_LITERAL_BUG(__last1) _STLP_FIX_LITERAL_BUG(__first2) - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - for ( ; __first1 != __last1; ++__first1, ++__first2) - if (!(*__first1 == *__first2)) - return false; - return true; -} - -template -_STLP_INLINE_LOOP -bool equal(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _BinaryPredicate __binary_pred) { - _STLP_FIX_LITERAL_BUG(__first2) - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - for ( ; __first1 != __last1; ++__first1, ++__first2) - if (!__binary_pred(*__first1, *__first2)) - return false; - return true; -} - -//-------------------------------------------------- -// lexicographical_compare and lexicographical_compare_3way. -// (the latter is not part of the C++ standard.) - -template -bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2); - -template -bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _Compare __comp); - -inline bool -lexicographical_compare(const unsigned char* __first1, - const unsigned char* __last1, - const unsigned char* __first2, - const unsigned char* __last2) -{ - const size_t __len1 = __last1 - __first1; - const size_t __len2 = __last2 - __first2; - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - - const int __result = memcmp(__first1, __first2, (min) (__len1, __len2)); - return __result != 0 ? (__result < 0) : (__len1 < __len2); -} - - -# if !(CHAR_MAX == SCHAR_MAX) -inline bool lexicographical_compare(const char* __first1, const char* __last1, - const char* __first2, const char* __last2) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) - - return lexicographical_compare((const unsigned char*) __first1, - (const unsigned char*) __last1, - (const unsigned char*) __first2, - (const unsigned char*) __last2); -} -#endif /* CHAR_MAX == SCHAR_MAX */ - -template -int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2); - -inline int -__lexicographical_compare_3way(const unsigned char* __first1, - const unsigned char* __last1, - const unsigned char* __first2, - const unsigned char* __last2) -{ - const ptrdiff_t __len1 = __last1 - __first1; - const ptrdiff_t __len2 = __last2 - __first2; - const int __result = memcmp(__first1, __first2, (min) (__len1, __len2)); - return __result != 0 ? __result - : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1)); -} - - -# if !(CHAR_MAX == SCHAR_MAX) -inline int -__lexicographical_compare_3way(const char* __first1, const char* __last1, - const char* __first2, const char* __last2) -{ - return __lexicographical_compare_3way((const unsigned char*) __first1, - (const unsigned char*) __last1, - (const unsigned char*) __first2, - (const unsigned char*) __last2); -} -# endif - -# ifndef _STLP_NO_EXTENSIONS - -template -int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2); - -# endif /* EXTENSIONS */ - -// count -template -_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter) -count(_InputIter __first, _InputIter __last, const _Tp& __val) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0; - for ( ; __first != __last; ++__first) - if (*__first == __val) - ++__n; - return __n; -} - -// find and find_if. Note find may be expressed in terms of find_if if appropriate binder was available. -template -_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val); -template -_InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred); - -// search. -template -_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred __predicate); - -// find_first_of -template -_InputIter __find_first_of(_InputIter __first1, _InputIter __last1, - _ForwardIter __first2, _ForwardIter __last2, - _BinaryPredicate __comp); - -template -_ForwardIter1 -find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, - _ForwardIter2 __first2, _ForwardIter2 __last2, - _BinaryPredicate __comp); - -// replace -template -_STLP_INLINE_LOOP void -replace(_ForwardIter __first, _ForwardIter __last, - const _Tp& __old_value, const _Tp& __new_value) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - if (*__first == __old_value) - *__first = __new_value; -} - -template -_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, - const _Tp& __val, _Compare __comp, _Distance*); - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_ALGOBASE_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_alloc.c --- a/epoc32/include/stdapis/stlport/stl/_alloc.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,378 +0,0 @@ -/* - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_ALLOC_C -#define _STLP_ALLOC_C - -#ifdef __WATCOMC__ -#pragma warning 13 9 -#pragma warning 367 9 -#pragma warning 368 9 -#endif - -#ifndef _STLP_INTERNAL_ALLOC_H -# include -#endif - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -# ifdef _STLP_SGI_THREADS - // We test whether threads are in use before locking. - // Perhaps this should be moved into stl_threads.h, but that - // probably makes it harder to avoid the procedure call when - // it isn't needed. - extern "C" { - extern int __us_rsthread_malloc; - } -# endif - - -// Specialised debug form of malloc which does not provide "false" -// memory leaks when run with debug CRT libraries. -#if defined(_STLP_MSVC) && (_STLP_MSVC>=1020 && defined(_STLP_DEBUG_ALLOC)) && ! defined (_STLP_WINCE) -# include -inline void* __stlp_chunk_malloc(size_t __bytes) { _STLP_CHECK_NULL_ALLOC(_malloc_dbg(__bytes, _CRT_BLOCK, __FILE__, __LINE__)); } -#else // !_DEBUG -# ifdef _STLP_NODE_ALLOC_USE_MALLOC -# include -inline void* __stlp_chunk_malloc(size_t __bytes) { _STLP_CHECK_NULL_ALLOC(_STLP_VENDOR_CSTD::malloc(__bytes)); } -# else -inline void* __stlp_chunk_malloc(size_t __bytes) { return _STLP_STD::__stl_new(__bytes); } -# endif -#endif // !_DEBUG - - -#define _S_FREELIST_INDEX(__bytes) ((__bytes-size_t(1))>>(int)_ALIGN_SHIFT) - -_STLP_BEGIN_NAMESPACE - -#ifndef _STLP_NO_NODE_ALLOC - -template -void * _STLP_CALL __malloc_alloc<__inst>::_S_oom_malloc(size_t __n) -{ - __oom_handler_type __my_malloc_handler; - void * __result; - - for (;;) { - __my_malloc_handler = __oom_handler; - if (0 == __my_malloc_handler) { __THROW_BAD_ALLOC; } - (*__my_malloc_handler)(); - __result = malloc(__n); - if (__result) return(__result); - } -#if defined(_STLP_NEED_UNREACHABLE_RETURN) - return 0; -#endif - -} - -#endif - -template -void * _STLP_CALL __debug_alloc<_Alloc>::allocate(size_t __n) { - size_t __real_n = __n + __extra_before_chunk() + __extra_after_chunk(); - __alloc_header *__result = (__alloc_header *)__allocator_type::allocate(__real_n); - memset((char*)__result, __shred_byte, __real_n*sizeof(value_type)); - __result->__magic = __magic; - __result->__type_size = sizeof(value_type); - __result->_M_size = (_STLP_UINT32_T)__n; - return ((char*)__result) + (long)__extra_before; -} - -template -void _STLP_CALL -__debug_alloc<_Alloc>::deallocate(void *__p, size_t __n) { - __alloc_header * __real_p = (__alloc_header*)((char *)__p -(long)__extra_before); - // check integrity - _STLP_VERBOSE_ASSERT(__real_p->__magic != __deleted_magic, _StlMsg_DBA_DELETED_TWICE) - _STLP_VERBOSE_ASSERT(__real_p->__magic == __magic, _StlMsg_DBA_NEVER_ALLOCATED) - _STLP_VERBOSE_ASSERT(__real_p->__type_size == 1,_StlMsg_DBA_TYPE_MISMATCH) - _STLP_VERBOSE_ASSERT(__real_p->_M_size == __n, _StlMsg_DBA_SIZE_MISMATCH) - // check pads on both sides - unsigned char* __tmp; - for (__tmp= (unsigned char*)(__real_p+1); __tmp < (unsigned char*)__p; __tmp++) { - _STLP_VERBOSE_ASSERT(*__tmp==__shred_byte, _StlMsg_DBA_UNDERRUN) - } - - size_t __real_n= __n + __extra_before_chunk() + __extra_after_chunk(); - - for (__tmp= ((unsigned char*)__p)+__n*sizeof(value_type); - __tmp < ((unsigned char*)__real_p)+__real_n ; __tmp++) { - _STLP_VERBOSE_ASSERT(*__tmp==__shred_byte, _StlMsg_DBA_OVERRUN) - } - - // that may be unfortunate, just in case - __real_p->__magic=__deleted_magic; - memset((char*)__p, __shred_byte, __n*sizeof(value_type)); - __allocator_type::deallocate(__real_p, __real_n); -} - -#ifndef _STLP_NO_NODE_ALLOC - -// # ifdef _STLP_THREADS - -template -class _Node_Alloc_Lock { -public: - _Node_Alloc_Lock() { - -# ifdef _STLP_SGI_THREADS - if (__threads && __us_rsthread_malloc) -# else /* !_STLP_SGI_THREADS */ - if (__threads) -# endif - _S_lock._M_acquire_lock(); - } - - ~_Node_Alloc_Lock() { -# ifdef _STLP_SGI_THREADS - if (__threads && __us_rsthread_malloc) -# else /* !_STLP_SGI_THREADS */ - if (__threads) -# endif - _S_lock._M_release_lock(); - } - - static _STLP_STATIC_MUTEX _S_lock; -}; - -// # endif /* _STLP_THREADS */ - - -template -void* _STLP_CALL -__node_alloc<__threads, __inst>::_M_allocate(size_t __n) { - void* __r; - _Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n); - // # ifdef _STLP_THREADS - /*REFERENCED*/ - _Node_Alloc_Lock<__threads, __inst> __lock_instance; - // # endif - // Acquire the lock here with a constructor call. - // This ensures that it is released in exit or during stack - // unwinding. - if ( (__r = *__my_free_list) != 0 ) { - *__my_free_list = ((_Obj*)__r) -> _M_free_list_link; - } else { - __r = _S_refill(__n); - } - // lock is released here - return __r; -} - -template -void _STLP_CALL -__node_alloc<__threads, __inst>::_M_deallocate(void *__p, size_t __n) { - _Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n); - // # ifdef _STLP_THREADS - /*REFERENCED*/ - _Node_Alloc_Lock<__threads, __inst> __lock_instance; - // # endif /* _STLP_THREADS */ - // acquire lock - ((_Obj *)__p) -> _M_free_list_link = *__my_free_list; - *__my_free_list = (_Obj *)__p; - // lock is released here -} - -/* We allocate memory in large chunks in order to avoid fragmenting */ -/* the malloc heap too much. */ -/* We assume that size is properly aligned. */ -/* We hold the allocation lock. */ -template -char* _STLP_CALL -__node_alloc<__threads, __inst>::_S_chunk_alloc(size_t _p_size, - int& __nobjs) -{ - char* __result; - size_t __total_bytes = _p_size * __nobjs; - size_t __bytes_left = _S_end_free - _S_start_free; - - if (__bytes_left >= __total_bytes) { - __result = _S_start_free; - _S_start_free += __total_bytes; - return(__result); - } else if (__bytes_left >= _p_size) { - __nobjs = (int)(__bytes_left/_p_size); - __total_bytes = _p_size * __nobjs; - __result = _S_start_free; - _S_start_free += __total_bytes; - return(__result); - } else { - size_t __bytes_to_get = - 2 * __total_bytes + _S_round_up(_S_heap_size >> 4); - // Try to make use of the left-over piece. - if (__bytes_left > 0) { - _Obj* _STLP_VOLATILE* __my_free_list = - _S_free_list + _S_FREELIST_INDEX(__bytes_left); - - ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list; - *__my_free_list = (_Obj*)_S_start_free; - } - _S_start_free = (char*)__stlp_chunk_malloc(__bytes_to_get); - if (0 == _S_start_free) { - size_t __i; - _Obj* _STLP_VOLATILE* __my_free_list; - _Obj* __p; - // Try to make do with what we have. That can't - // hurt. We do not try smaller requests, since that tends - // to result in disaster on multi-process machines. - for (__i = _p_size; __i <= (size_t)_MAX_BYTES; __i += (size_t)_ALIGN) { - __my_free_list = _S_free_list + _S_FREELIST_INDEX(__i); - __p = *__my_free_list; - if (0 != __p) { - *__my_free_list = __p -> _M_free_list_link; - _S_start_free = (char*)__p; - _S_end_free = _S_start_free + __i; - return(_S_chunk_alloc(_p_size, __nobjs)); - // Any leftover piece will eventually make it to the - // right free list. - } - } - _S_end_free = 0; // In case of exception. - _S_start_free = (char*)__stlp_chunk_malloc(__bytes_to_get); - /* - (char*)malloc_alloc::allocate(__bytes_to_get); - */ - - // This should either throw an - // exception or remedy the situation. Thus we assume it - // succeeded. - } - _S_heap_size += __bytes_to_get; - _S_end_free = _S_start_free + __bytes_to_get; - return(_S_chunk_alloc(_p_size, __nobjs)); - } -} - - -/* Returns an object of size __n, and optionally adds to size __n free list.*/ -/* We assume that __n is properly aligned. */ -/* We hold the allocation lock. */ -template -void* _STLP_CALL -__node_alloc<__threads, __inst>::_S_refill(size_t __n) -{ - int __nobjs = 20; - __n = _S_round_up(__n); - char* __chunk = _S_chunk_alloc(__n, __nobjs); - _Obj* _STLP_VOLATILE* __my_free_list; - _Obj* __result; - _Obj* __current_obj; - _Obj* __next_obj; - int __i; - - if (1 == __nobjs) return(__chunk); - __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n); - - /* Build free list in chunk */ - __result = (_Obj*)__chunk; - *__my_free_list = __next_obj = (_Obj*)(__chunk + __n); - for (__i = 1; ; __i++) { - __current_obj = __next_obj; - __next_obj = (_Obj*)((char*)__next_obj + __n); - if (__nobjs - 1 == __i) { - __current_obj -> _M_free_list_link = 0; - break; - } else { - __current_obj -> _M_free_list_link = __next_obj; - } - } - return(__result); -} - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -// malloc_alloc out-of-memory handling -template -__oom_handler_type __malloc_alloc<__inst>::__oom_handler=(__oom_handler_type)0 ; - -#ifdef _STLP_THREADS - template - _STLP_STATIC_MUTEX - _Node_Alloc_Lock<__threads, __inst>::_S_lock _STLP_MUTEX_INITIALIZER; -#endif - -template -_Node_alloc_obj * _STLP_VOLATILE -__node_alloc<__threads, __inst>::_S_free_list[_STLP_NFREELISTS] -= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -// The 16 zeros are necessary to make version 4.1 of the SunPro -// compiler happy. Otherwise it appears to allocate too little -// space for the array. - -template -char *__node_alloc<__threads, __inst>::_S_start_free = 0; - -template -char *__node_alloc<__threads, __inst>::_S_end_free = 0; - -template -size_t __node_alloc<__threads, __inst>::_S_heap_size = 0; - - -# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -__DECLARE_INSTANCE(__oom_handler_type, __malloc_alloc<0>::__oom_handler, =0); - -# define _STLP_ALLOC_NOTHREADS __node_alloc -# define _STLP_ALLOC_THREADS __node_alloc -# define _STLP_ALLOC_NOTHREADS_LOCK _Node_Alloc_Lock -# define _STLP_ALLOC_THREADS_LOCK _Node_Alloc_Lock - -__DECLARE_INSTANCE(char *, _STLP_ALLOC_NOTHREADS::_S_start_free,=0); -__DECLARE_INSTANCE(char *, _STLP_ALLOC_NOTHREADS::_S_end_free,=0); -__DECLARE_INSTANCE(size_t, _STLP_ALLOC_NOTHREADS::_S_heap_size,=0); -__DECLARE_INSTANCE(_Node_alloc_obj * _STLP_VOLATILE, - _STLP_ALLOC_NOTHREADS::_S_free_list[_STLP_NFREELISTS], - ={0}); -__DECLARE_INSTANCE(char *, _STLP_ALLOC_THREADS::_S_start_free,=0); -__DECLARE_INSTANCE(char *, _STLP_ALLOC_THREADS::_S_end_free,=0); -__DECLARE_INSTANCE(size_t, _STLP_ALLOC_THREADS::_S_heap_size,=0); -__DECLARE_INSTANCE(_Node_alloc_obj * _STLP_VOLATILE, - _STLP_ALLOC_THREADS::_S_free_list[_STLP_NFREELISTS], - ={0}); -// # ifdef _STLP_THREADS -__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, - _STLP_ALLOC_NOTHREADS_LOCK::_S_lock, - _STLP_MUTEX_INITIALIZER); -__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, - _STLP_ALLOC_THREADS_LOCK::_S_lock, - _STLP_MUTEX_INITIALIZER); -// # endif - -# undef _STLP_ALLOC_THREADS -# undef _STLP_ALLOC_NOTHREADS - -# endif /* _STLP_STATIC_TEMPLATE_DATA */ - -#endif - -_STLP_END_NAMESPACE - -# undef _S_FREELIST_INDEX - -# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */ - -#endif /* _STLP_ALLOC_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_alloc.h --- a/epoc32/include/stdapis/stlport/stl/_alloc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,543 +0,0 @@ -/* - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_ALLOC_H -#define _STLP_INTERNAL_ALLOC_H - -# ifndef _STLP_CSTDDEF -# include -# endif - -#if !defined (_STLP_DEBUG_H) && (defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)) -# include -#endif - -# ifndef _STLP_CSTDLIB -# include -# endif -# ifndef _STLP_CSTRING -# include -# endif - -# ifndef __THROW_BAD_ALLOC -# if !defined(_STLP_USE_EXCEPTIONS) -# if !defined (_STLP_CSTDIO) -# include -# endif -# if !defined (_STLP_CSTDLIB) -# include -# endif -# define __THROW_BAD_ALLOC puts("out of memory\n"); exit(1) -# else /* !defined(_STLP_USE_EXCEPTIONS) */ -# define __THROW_BAD_ALLOC throw _STLP_STD::bad_alloc() -# endif /* !defined(_STLP_USE_EXCEPTIONS) */ -# endif /* __THROW_BAD_ALLOC */ - -# ifndef _STLP_INTERNAL_NEW_HEADER -# include -# endif - -// #if ! defined (__SYMBIAN32__) -#if /* defined (_STLP_THREADS) && */ ! defined (_STLP_INTERNAL_THREADS_H) -# include -// #endif -#endif - -#ifndef _STLP_INTERNAL_CONSTRUCT_H -# include -#endif - -#ifndef __ALLOC -# define __ALLOC __sgi_alloc -#endif - -# ifndef __RESTRICT -# define __RESTRICT -# endif - -#if defined (_STLP_THREADS) || (defined(_STLP_OWN_IOSTREAMS) && ! defined (_STLP_NO_THREADS) && ! defined (_NOTHREADS) ) -# define _STLP_NODE_ALLOCATOR_THREADS true -#else -# define _STLP_NODE_ALLOCATOR_THREADS false -#endif - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_USE_RAW_SGI_ALLOCATORS) -template struct __allocator; -# endif - -#ifndef _STLP_NO_NODE_ALLOC - -// Malloc-based allocator. Typically slower than default alloc below. -// Typically thread-safe and more storage efficient. - -typedef void (* __oom_handler_type)(); - -template -class __malloc_alloc { -private: - static void* _STLP_CALL _S_oom_malloc(size_t); - static __oom_handler_type __oom_handler; -public: - // this one is needed for proper simple_alloc wrapping - typedef char value_type; -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS) - template struct rebind { - typedef __allocator<_Tp1, __malloc_alloc<__inst> > other; - }; -# endif - static void* _STLP_CALL allocate(size_t __n) { - void* __result = malloc(__n); - if (0 == __result) __result = _S_oom_malloc(__n); - return __result; - } - static void _STLP_CALL deallocate(void* __p, size_t /* __n */) { free((char*)__p); } - static __oom_handler_type _STLP_CALL set_malloc_handler(__oom_handler_type __f) { - __oom_handler_type __old = __oom_handler; - __oom_handler = __f; - return(__old); - } -}; - -# endif - -// New-based allocator. Typically slower than default alloc below. -// Typically thread-safe and more storage efficient. -class _STLP_CLASS_DECLSPEC __new_alloc { -public: - // this one is needed for proper simple_alloc wrapping - typedef char value_type; -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined(_STLP_USE_RAW_SGI_ALLOCATORS) - template struct rebind { - typedef __allocator<_Tp1, __new_alloc > other; - }; -# endif - static void* _STLP_CALL allocate(size_t __n) { - return __stl_new(__n); - } - static void _STLP_CALL deallocate(void* __p, size_t) { __stl_delete(__p); } -}; - - -// Allocator adaptor to check size arguments for debugging. -// Reports errors using assert. Checking can be disabled with -// NDEBUG, but it's far better to just use the underlying allocator -// instead when no checking is desired. -// There is some evidence that this can confuse Purify. -// This adaptor can only be applied to raw allocators - -template -class __debug_alloc : public _Alloc { -public: - typedef _Alloc __allocator_type; - typedef typename _Alloc::value_type value_type; -private: - struct __alloc_header { - size_t __magic: 16; - size_t __type_size:16; - _STLP_UINT32_T _M_size; - }; // that is 8 bytes for sure - // Sunpro CC has bug on enums, so extra_before/after set explicitly - enum { __pad=8, __magic=0xdeba, __deleted_magic = 0xdebd, - __shred_byte= _STLP_SHRED_BYTE - }; - - enum { __extra_before = 16, __extra_after = 8 }; - // Size of space used to store size. Note - // that this must be large enough to preserve - // alignment. - static size_t _STLP_CALL __extra_before_chunk() { - return (long)__extra_before/sizeof(value_type)+ - (size_t)((long)__extra_before%sizeof(value_type)>0); - } - static size_t _STLP_CALL __extra_after_chunk() { - return (long)__extra_after/sizeof(value_type)+ - (size_t)((long)__extra_after%sizeof(value_type)>0); - } -public: -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS) - template struct rebind { - typedef __allocator< _Tp1, __debug_alloc<_Alloc> > other; - }; -# endif - __debug_alloc() {} - ~__debug_alloc() {} - static void * _STLP_CALL allocate(size_t); - static void _STLP_CALL deallocate(void *, size_t); -}; - -# if defined(__OS400__) -enum {_ALIGN = 16, _ALIGN_SHIFT=4, _MAX_BYTES = 256}; -# define _STLP_NFREELISTS 16 -# else -enum {_ALIGN = 8, _ALIGN_SHIFT=3, _MAX_BYTES = 128}; -# define _STLP_NFREELISTS 16 -# endif /* __OS400__ */ - -#ifndef _STLP_NO_NODE_ALLOC - -// Default node allocator. -// With a reasonable compiler, this should be roughly as fast as the -// original STL class-specific allocators, but with less fragmentation. -// Default_alloc_template parameters are experimental and MAY -// DISAPPEAR in the future. Clients should just use alloc for now. -// -// Important implementation properties: -// 1. If the client request an object of size > _MAX_BYTES, the resulting -// object will be obtained directly from malloc. -// 2. In all other cases, we allocate an object of size exactly -// _S_round_up(requested_size). Thus the client has enough size -// information that we can return the object to the proper free list -// without permanently losing part of the object. -// - -// The first template parameter specifies whether more than one thread -// may use this allocator. It is safe to allocate an object from -// one instance of a default_alloc and deallocate it with another -// one. This effectively transfers its ownership to the second one. -// This may have undesirable effects on reference locality. -// The second parameter is unreferenced and serves only to allow the -// creation of multiple default_alloc instances. - -class _STLP_CLASS_DECLSPEC _Node_alloc_obj { -public: - _Node_alloc_obj * _M_free_list_link; -}; - -template -class __node_alloc { - _STLP_PRIVATE: - static inline size_t _STLP_CALL _S_round_up(size_t __bytes) { return (((__bytes) + (size_t)_ALIGN-1) & ~((size_t)_ALIGN - 1)); } - typedef _Node_alloc_obj _Obj; -private: - // Returns an object of size __n, and optionally adds to size __n free list. - static void* _STLP_CALL _S_refill(size_t __n); - // Allocates a chunk for nobjs of size size. nobjs may be reduced - // if it is inconvenient to allocate the requested number. - static char* _STLP_CALL _S_chunk_alloc(size_t __p_size, int& __nobjs); - // Chunk allocation state. - static _Node_alloc_obj * _STLP_VOLATILE _S_free_list[_STLP_NFREELISTS]; - static char* _S_start_free; - static char* _S_end_free; - static size_t _S_heap_size; - static void * _STLP_CALL _M_allocate(size_t __n); - /* __p may not be 0 */ - static void _STLP_CALL _M_deallocate(void *__p, size_t __n); -public: - // this one is needed for proper simple_alloc wrapping - typedef char value_type; -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS) - template struct rebind { - typedef __allocator<_Tp1, __node_alloc<__threads, __inst> > other; - }; -# endif - /* __n must be > 0 */ - static void * _STLP_CALL allocate(size_t __n) { -return (__n > (size_t)_MAX_BYTES) ? __stl_new(__n) : _M_allocate(__n); } - /* __p may not be 0 */ - static void _STLP_CALL deallocate(void *__p, size_t __n) { -if (__n > (size_t)_MAX_BYTES) __stl_delete(__p); else _M_deallocate(__p, __n); } -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS __malloc_alloc<0>; -_STLP_EXPORT_TEMPLATE_CLASS __node_alloc<_STLP_NODE_ALLOCATOR_THREADS, 0>; -# endif /* _STLP_USE_TEMPLATE_EXPORT */ -typedef __node_alloc<_STLP_NODE_ALLOCATOR_THREADS, 0> _Node_alloc; -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<_Node_alloc>; -_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__new_alloc>; -_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__malloc_alloc<0> >; -# endif - -#endif - -# if defined (_STLP_USE_PERTHREAD_ALLOC) - -_STLP_END_NAMESPACE -// include additional header here -# include -_STLP_BEGIN_NAMESPACE - -# if defined ( _STLP_DEBUG_ALLOC ) -typedef __debug_alloc<__pthread_alloc> __sgi_alloc; -# else -typedef __pthread_alloc __sgi_alloc; -# endif /* _STLP_DEBUG_ALLOC */ - -typedef __pthread_alloc __single_client_alloc; -typedef __pthread_alloc __multithreaded_alloc; - -# else - -# if defined ( _STLP_USE_NEWALLOC ) - -# if defined ( _STLP_DEBUG_ALLOC ) -typedef __debug_alloc<__new_alloc> __sgi_alloc; -# else -typedef __new_alloc __sgi_alloc; -# endif /* _STLP_DEBUG_ALLOC */ - -typedef __new_alloc __single_client_alloc; -typedef __new_alloc __multithreaded_alloc; - -# elif defined (_STLP_USE_MALLOC) - -# if defined ( _STLP_DEBUG_ALLOC ) -typedef __debug_alloc<__malloc_alloc<0> > __sgi_alloc; -# else -typedef __malloc_alloc<0> __sgi_alloc; -# endif /* _STLP_DEBUG_ALLOC */ - -typedef __malloc_alloc<0> __single_client_alloc; -typedef __malloc_alloc<0> __multithreaded_alloc; - -# else - -# if defined ( _STLP_DEBUG_ALLOC ) -typedef __debug_alloc<_Node_alloc> __sgi_alloc; -# else -typedef _Node_alloc __sgi_alloc; -# endif - -typedef __node_alloc __single_client_alloc; -typedef __node_alloc __multithreaded_alloc; - -# endif /* _STLP_USE_NEWALLOC */ -# endif /* PTHREAD_ALLOC */ - -// This implements allocators as specified in the C++ standard. -// -// Note that standard-conforming allocators use many language features -// that are not yet widely implemented. In particular, they rely on -// member templates, partial specialization, partial ordering of function -// templates, the typename keyword, and the use of the template keyword -// to refer to a template member of a dependent type. - -template -class allocator { -public: - - typedef _Tp value_type; - typedef value_type * pointer; - typedef const _Tp* const_pointer; - typedef _Tp& reference; - typedef const _Tp& const_reference; - typedef size_t size_type; - typedef ptrdiff_t difference_type; -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) - template struct rebind { - typedef allocator<_Tp1> other; - }; -# endif - allocator() _STLP_NOTHROW {} - # if defined (_STLP_MEMBER_TEMPLATES) - template allocator(const allocator<_Tp1>&) _STLP_NOTHROW {} - # endif - allocator(const allocator<_Tp>&) _STLP_NOTHROW {} - ~allocator() _STLP_NOTHROW {} - pointer address(reference __x) const { return &__x; } - const_pointer address(const_reference __x) const { return &__x; } - // __n is permitted to be 0. The C++ standard says nothing about what the return value is when __n == 0. - _Tp* allocate(size_type __n, const void* = 0) { - return __n != 0 ? __REINTERPRET_CAST(value_type*,__sgi_alloc::allocate(__n * sizeof(value_type))) : 0; - } - // __p is permitted to be a null pointer, only if n==0. - void deallocate(pointer __p, size_type __n) { - _STLP_ASSERT( (__p == 0) == (__n == 0) ) - if (__p != 0) __sgi_alloc::deallocate((void*)__p, __n * sizeof(value_type)); - } - // backwards compatibility - void deallocate(pointer __p) const { if (__p != 0) __sgi_alloc::deallocate((void*)__p, sizeof(value_type)); } - size_type max_size() const _STLP_NOTHROW { return size_t(-1) / sizeof(value_type); } - void construct(pointer __p, const _Tp& __val) { _STLP_STD::_Construct(__p, __val); } - void destroy(pointer __p) { _STLP_STD::_Destroy(__p); } -# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) - template bool operator==(const allocator<_T2>&) const _STLP_NOTHROW { return true; } - template bool operator!=(const allocator<_T2>&) const _STLP_NOTHROW { return false; } -# endif -}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC allocator { -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef void* pointer; - typedef const void* const_pointer; -# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) - typedef void value_type; -# endif -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) - template struct rebind { - typedef allocator<_Tp1> other; - }; -# endif -# if defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__)) //*ty 03/24/2001 - MPW compilers get confused on these operator definitions - template bool operator==(const allocator<_T2>&) const _STLP_NOTHROW { return true; } - template bool operator!=(const allocator<_T2>&) const _STLP_NOTHROW { return false; } -# endif -}; - -#if !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__))) //*ty 03/24/2001 - MPW compilers get confused on these operator definitions -template inline bool _STLP_CALL operator==(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW { return true; } -template inline bool _STLP_CALL operator!=(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW { return false; } -#endif - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS allocator; -# if defined (_STLP_HAS_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS allocator; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -// Another allocator adaptor: _Alloc_traits. This serves two -// purposes. First, make it possible to write containers that can use -// either SGI-style allocators or standard-conforming allocator. - -// The fully general version. -template -struct _Alloc_traits -{ - typedef _Allocator _Orig; -# if defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) - typedef typename _Allocator::_STLP_TEMPLATE rebind<_Tp> _Rebind_type; - typedef typename _Rebind_type::other allocator_type; - static allocator_type create_allocator(const _Orig& __a) { return allocator_type(__a); } -# else - // this is not actually true, used only to pass this type through - // to dynamic overload selection in _STLP_alloc_proxy methods - typedef _Allocator allocator_type; -# endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ -}; - -#ifndef _STLP_FORCE_ALLOCATORS -#define _STLP_FORCE_ALLOCATORS(a,y) -#endif - -#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined (_STLP_MEMBER_TEMPLATE_CLASSES) -// The version for the default allocator, for rare occasion when we have partial spec w/o member template classes -template -struct _Alloc_traits<_Tp, allocator<_Tp1> > { - typedef allocator<_Tp1> _Orig; - typedef allocator<_Tp> allocator_type; - static allocator_type create_allocator(const allocator<_Tp1 >& __a) { return allocator_type(__a); } -}; -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -/* macro to convert the allocator for initialization - * not using MEMBER_TEMPLATE_CLASSES as it should work given template constructor */ -#if defined (_STLP_MEMBER_TEMPLATES) || ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -/* if _STLP_NO_TEMPLATE_CONVERSIONS is set, the member template constructor is - * not used implicitly to convert allocator parameter, so let us do it explicitly */ -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_NO_TEMPLATE_CONVERSIONS) -# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) -# else -# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __a -# endif -/* else convert, but only if partial specialization works, since else - * Container::allocator_type won't be different */ -#else -# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) -#endif - -# if defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) -template -inline _STLP_TYPENAME_ON_RETURN_TYPE _Alloc_traits<_Tp, _Alloc>::allocator_type _STLP_CALL -__stl_alloc_create(const _Alloc& __a, const _Tp*) { - typedef typename _Alloc::_STLP_TEMPLATE rebind<_Tp>::other _Rebound_type; - return _Rebound_type(__a); -} -#else -// If custom allocators are being used without member template classes support : -// user (on purpose) is forced to define rebind/get operations !!! -template -inline allocator<_Tp2>& _STLP_CALL -__stl_alloc_rebind(allocator<_Tp1>& __a, const _Tp2*) { return (allocator<_Tp2>&)(__a); } -template -inline allocator<_Tp2> _STLP_CALL -__stl_alloc_create(const allocator<_Tp1>&, const _Tp2*) { return allocator<_Tp2>(); } -#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ - -# ifdef _STLP_USE_RAW_SGI_ALLOCATORS -// move obsolete stuff out of the way -# include -# endif - -// inheritance is being used for EBO optimization -template -class _STLP_alloc_proxy : public _MaybeReboundAlloc { -private: - typedef _MaybeReboundAlloc _Base; - typedef _STLP_alloc_proxy<_Value, _Tp, _MaybeReboundAlloc> _Self; -public: - _Value _M_data; - inline _STLP_alloc_proxy(const _MaybeReboundAlloc& __a, _Value __p) : _MaybeReboundAlloc(__a), _M_data(__p) {} - -# if 0 - inline _STLP_alloc_proxy(const _Self& __x) : _MaybeReboundAlloc(__x), _M_data(__x._M_data) {} - // construction/destruction - inline _Self& operator = (const _Self& __x) { - *(_MaybeReboundAlloc*)this = *(_MaybeReboundAlloc*)__x; - _M_data = __x._M_data; return *this; - } - inline _Self& operator = (const _Base& __x) { ((_Base&)*this) = __x; return *this; } -# endif - // Unified interface to perform allocate()/deallocate() with limited - // language support -#if ! defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) - // else it is rebound already, and allocate() member is accessible - inline _Tp* allocate(size_t __n) { - return __stl_alloc_rebind(__STATIC_CAST(_Base&,*this),(_Tp*)0).allocate(__n,0); - } - inline void deallocate(_Tp* __p, size_t __n) { - __stl_alloc_rebind(__STATIC_CAST(_Base&, *this),(_Tp*)0).deallocate(__p, __n); - } -#endif /* !_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy >; -# if defined (_STLP_HAS_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -# undef _STLP_NODE_ALLOCATOR_THREADS - -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_ALLOC_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_auto_ptr.h --- a/epoc32/include/stdapis/stlport/stl/_auto_ptr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_AUTO_PTR_H -# define _STLP_AUTO_PTR_H - -_STLP_BEGIN_NAMESPACE -// implementation primitive -class __ptr_base { -public: - void* _M_p; - void __set(const void* __p) { _M_p = __CONST_CAST(void*,__p); } - void __set(void* __p) { _M_p = __p; } -}; - -template class auto_ptr_ref { -public: - __ptr_base& _M_r; - _Tp* const _M_p; - - auto_ptr_ref(__ptr_base& __r, _Tp* __p) : _M_r(__r), _M_p(__p) { } - - _Tp* release() const { _M_r.__set((void*)0); return _M_p; } - -}; - -template class auto_ptr : public __ptr_base { -public: - typedef _Tp element_type; - typedef auto_ptr<_Tp> _Self; - - _Tp* release() { - _Tp* __px = this->get(); - this->_M_p = 0; - return __px; - } - - void reset(_Tp* __px=0) { - _Tp* __pt = this->get(); - if (__px != __pt) - delete __pt; - this->__set(__px); - } - - _Tp* get() const { return __REINTERPRET_CAST(_Tp*,__CONST_CAST(void*,_M_p)); } - -# if !defined (_STLP_NO_ARROW_OPERATOR) - _Tp* operator->() const { - _STLP_VERBOSE_ASSERT(get()!=0, _StlMsg_AUTO_PTR_NULL) - return get(); - } -# endif - _Tp& operator*() const { - _STLP_VERBOSE_ASSERT(get()!=0, _StlMsg_AUTO_PTR_NULL) - return *get(); - } - - auto_ptr() { - this->_M_p = 0; -# ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::PushL(TCleanupItem(Close, (void*)this)); -# endif - } - - explicit auto_ptr(_Tp* __px) { - this->__set(__px); -# ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::PushL(TCleanupItem(Close, (void*)this)); -# endif - } - -#if defined (_STLP_MEMBER_TEMPLATES) -# if !defined (_STLP_NO_TEMPLATE_CONVERSIONS) - template auto_ptr(auto_ptr<_Tp1>& __r) { - _Tp* __conversionCheck = __r.release(); - this->__set(__conversionCheck); -# ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::PushL(TCleanupItem(Close, (void*)this)); -# endif - } -# endif - template auto_ptr<_Tp>& operator=(auto_ptr<_Tp1>& __r) { - _Tp* __conversionCheck = __r.release(); - reset(__conversionCheck); - return *this; - } -#endif /* _STLP_MEMBER_TEMPLATES */ - - auto_ptr(_Self& __r) - { this->__set(__r.release()); -# ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::PushL(TCleanupItem(Close, (void*)this)); -# endif - } - - _Self& operator=(_Self& __r) { - reset(__r.release()); - return *this; - } - - ~auto_ptr() { _STLP_POP_ITEM reset(0); } - - auto_ptr(auto_ptr_ref<_Tp> __r) { - this->__set(__r.release()); -# ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::PushL(TCleanupItem(Close, (void*)this)); -# endif - } - - _Self& operator=(auto_ptr_ref<_Tp> __r) { - reset(__r.release()); - return *this; - } - - - _Self& operator=(_Tp* __px) { - reset(__px); - return *this; - } - - - -# if defined(_STLP_MEMBER_TEMPLATES) && !defined(_STLP_NO_TEMPLATE_CONVERSIONS) - template operator auto_ptr_ref<_Tp1>() { - return auto_ptr_ref<_Tp1>(*this, this->get()); - } - template operator auto_ptr<_Tp1>() { - return auto_ptr<_Tp1>(release()); - } -# else - operator auto_ptr_ref<_Tp>() - { return auto_ptr_ref<_Tp>(*this, this->get()); } -# endif - -# ifdef _STLP_USE_TRAP_LEAVE - static void Close(void* aPtr); -# endif - -}; - -# ifdef _STLP_USE_TRAP_LEAVE -template -void -auto_ptr<_Tp>::Close(void* aPtr) -{ - auto_ptr<_Tp>* self = (auto_ptr<_Tp>*)aPtr; - self->reset(0); -} -# endif - - -_STLP_END_NAMESPACE - -#endif /* _STLP_AUTO_PTR_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_bitset.c --- a/epoc32/include/stdapis/stlport/stl/_bitset.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,407 +0,0 @@ -/* - * Copyright (c) 1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_BITSET_C -# define _STLP_BITSET_C - -# ifndef _STLP_BITSET_H -# include -# endif - -# define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long)) - -_STLP_BEGIN_NAMESPACE - -// -// Definitions of non-inline functions from _Base_bitset. -// - - -template -void _STLP_IMPORT_METHOD _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) -{ - - if (__shift != 0) { - const size_t __wshift = __shift / __BITS_PER_WORD; - const size_t __offset = __shift % __BITS_PER_WORD; - - if (__offset == 0) - for (size_t __n = _Nw - 1; __n >= __wshift; --__n) - _M_w[__n] = _M_w[__n - __wshift]; - - else { - const size_t __sub_offset = __BITS_PER_WORD - __offset; - for (size_t __n = _Nw - 1; __n > __wshift; --__n) - _M_w[__n] = (_M_w[__n - __wshift] << __offset) | - (_M_w[__n - __wshift - 1] >> __sub_offset); - _M_w[__wshift] = _M_w[0] << __offset; - } - - fill(_M_w + 0, _M_w + __wshift, __STATIC_CAST(_WordT,0)); - } -} - -template -void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) -{ - - if (__shift != 0) { - const size_t __wshift = __shift / __BITS_PER_WORD; - const size_t __offset = __shift % __BITS_PER_WORD; - const size_t __limit = _Nw - __wshift - 1; - - if (__offset == 0) - for (size_t __n = 0; __n <= __limit; ++__n) - _M_w[__n] = _M_w[__n + __wshift]; - - else { - const size_t __sub_offset = __BITS_PER_WORD - __offset; - for (size_t __n = 0; __n < __limit; ++__n) - _M_w[__n] = (_M_w[__n + __wshift] >> __offset) | - (_M_w[__n + __wshift + 1] << __sub_offset); - _M_w[__limit] = _M_w[_Nw-1] >> __offset; - } - - fill(_M_w + __limit + 1, _M_w + _Nw, __STATIC_CAST(_WordT,0)); - } -} - -template -unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const -{ - for (size_t __i = 1; __i < _Nw; ++__i) - if (_M_w[__i]) - __stl_throw_overflow_error("bitset"); - return _M_w[0]; -} // End _M_do_to_ulong - -template -size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const -{ - for ( size_t __i = 0; __i < _Nw; __i++ ) { - _WordT __thisword = _M_w[__i]; - if ( __thisword != __STATIC_CAST(_WordT,0) ) { - // find byte within word - for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); - if ( __this_byte ) - return __i*__BITS_PER_WORD + __j*CHAR_BIT + - _Bs_G::_S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - } - // not found, so return an indication of failure. - return __not_found; -} - -template -size_t -_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, - size_t __not_found) const -{ - // make bound inclusive - ++__prev; - - // check out of bounds - if ( __prev >= _Nw * __BITS_PER_WORD ) - return __not_found; - - // search first word - size_t __i = _S_whichword(__prev); - _WordT __thisword = _M_w[__i]; - - // mask off bits below bound - __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev); - - if ( __thisword != __STATIC_CAST(_WordT,0) ) { - // find byte within word - // get first byte into place - __thisword >>= _S_whichbyte(__prev) * CHAR_BIT; - for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); - if ( __this_byte ) - return __i*__BITS_PER_WORD + __j*CHAR_BIT + - _Bs_G::_S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - - // check subsequent words - __i++; - for ( ; __i < _Nw; __i++ ) { - /* _WordT */ __thisword = _M_w[__i]; - if ( __thisword != __STATIC_CAST(_WordT,0) ) { - // find byte within word - for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); - if ( __this_byte ) - return __i*__BITS_PER_WORD + __j*CHAR_BIT + - _Bs_G::_S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - } - - // not found, so return an indication of failure. - return __not_found; -} // end _M_do_find_next - - - -# if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) - -#if defined ( _STLP_USE_NEW_IOSTREAMS) - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) -{ - basic_string<_CharT, _Traits> __tmp; - __tmp.reserve(_Nb); - - // Skip whitespace - typename basic_istream<_CharT, _Traits>::sentry __sentry(__is); - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); - for (size_t __i = 0; __i < _Nb; ++__i) { - static typename _Traits::int_type __eof = _Traits::eof(); - - typename _Traits::int_type __c1 = __buf->sbumpc(); - if (_Traits::eq_int_type(__c1, __eof)) { - __is.setstate(ios_base::eofbit); - break; - } - else { - char __c2 = _Traits::to_char_type(__c1); - char __c = __is.narrow(__c2, '*'); - - if (__c == '0' || __c == '1') - __tmp.push_back(__c); - else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) { - __is.setstate(ios_base::failbit); - break; - } - } - } - - if (__tmp.empty()) - __is.setstate(ios_base::failbit); - else - __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb); - } - - return __is; -} - -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, - const bitset<_Nb>& __x) -{ - basic_string<_CharT, _Traits> __tmp; - __x._M_copy_to_string(__tmp); - return __os << __tmp; -} - -#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) - -// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll -template -_ISTREAM_DLL& _STLP_CALL -operator>>(_ISTREAM_DLL& __is, bitset<_Nb>& __x) { - string __tmp; - __tmp.reserve(_Nb); - - // In new templatized iostreams, use istream::sentry - if (__is.flags() & ios::skipws) { - char __c; - do - __is.get(__c); - while (__is && isspace(__c)); - if (__is) - __is.putback(__c); - } - - for (size_t __i = 0; __i < _Nb; ++__i) { - char __c; - __is.get(__c); - - if (!__is) - break; - else if (__c != '0' && __c != '1') { - __is.putback(__c); - break; - } - else - __tmp.push_back(__c); - } - - if (__tmp.empty()) - __is.clear(__is.rdstate() | ios::failbit); - else - __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb); - - return __is; -} - -# endif /* _STLP_USE_NEW_IOSTREAMS */ - -# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ - - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -// ------------------------------------------------------------ -// Lookup tables for find and count operations. - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -template -const unsigned char _Bs_G<_Dummy>::_S_bit_count[256] = { -# else -const unsigned char _Bs_G::_S_bit_count[256] _STLP_WEAK = { -# endif - 0, /* 0 */ 1, /* 1 */ 1, /* 2 */ 2, /* 3 */ 1, /* 4 */ - 2, /* 5 */ 2, /* 6 */ 3, /* 7 */ 1, /* 8 */ 2, /* 9 */ - 2, /* 10 */ 3, /* 11 */ 2, /* 12 */ 3, /* 13 */ 3, /* 14 */ - 4, /* 15 */ 1, /* 16 */ 2, /* 17 */ 2, /* 18 */ 3, /* 19 */ - 2, /* 20 */ 3, /* 21 */ 3, /* 22 */ 4, /* 23 */ 2, /* 24 */ - 3, /* 25 */ 3, /* 26 */ 4, /* 27 */ 3, /* 28 */ 4, /* 29 */ - 4, /* 30 */ 5, /* 31 */ 1, /* 32 */ 2, /* 33 */ 2, /* 34 */ - 3, /* 35 */ 2, /* 36 */ 3, /* 37 */ 3, /* 38 */ 4, /* 39 */ - 2, /* 40 */ 3, /* 41 */ 3, /* 42 */ 4, /* 43 */ 3, /* 44 */ - 4, /* 45 */ 4, /* 46 */ 5, /* 47 */ 2, /* 48 */ 3, /* 49 */ - 3, /* 50 */ 4, /* 51 */ 3, /* 52 */ 4, /* 53 */ 4, /* 54 */ - 5, /* 55 */ 3, /* 56 */ 4, /* 57 */ 4, /* 58 */ 5, /* 59 */ - 4, /* 60 */ 5, /* 61 */ 5, /* 62 */ 6, /* 63 */ 1, /* 64 */ - 2, /* 65 */ 2, /* 66 */ 3, /* 67 */ 2, /* 68 */ 3, /* 69 */ - 3, /* 70 */ 4, /* 71 */ 2, /* 72 */ 3, /* 73 */ 3, /* 74 */ - 4, /* 75 */ 3, /* 76 */ 4, /* 77 */ 4, /* 78 */ 5, /* 79 */ - 2, /* 80 */ 3, /* 81 */ 3, /* 82 */ 4, /* 83 */ 3, /* 84 */ - 4, /* 85 */ 4, /* 86 */ 5, /* 87 */ 3, /* 88 */ 4, /* 89 */ - 4, /* 90 */ 5, /* 91 */ 4, /* 92 */ 5, /* 93 */ 5, /* 94 */ - 6, /* 95 */ 2, /* 96 */ 3, /* 97 */ 3, /* 98 */ 4, /* 99 */ - 3, /* 100 */ 4, /* 101 */ 4, /* 102 */ 5, /* 103 */ 3, /* 104 */ - 4, /* 105 */ 4, /* 106 */ 5, /* 107 */ 4, /* 108 */ 5, /* 109 */ - 5, /* 110 */ 6, /* 111 */ 3, /* 112 */ 4, /* 113 */ 4, /* 114 */ - 5, /* 115 */ 4, /* 116 */ 5, /* 117 */ 5, /* 118 */ 6, /* 119 */ - 4, /* 120 */ 5, /* 121 */ 5, /* 122 */ 6, /* 123 */ 5, /* 124 */ - 6, /* 125 */ 6, /* 126 */ 7, /* 127 */ 1, /* 128 */ 2, /* 129 */ - 2, /* 130 */ 3, /* 131 */ 2, /* 132 */ 3, /* 133 */ 3, /* 134 */ - 4, /* 135 */ 2, /* 136 */ 3, /* 137 */ 3, /* 138 */ 4, /* 139 */ - 3, /* 140 */ 4, /* 141 */ 4, /* 142 */ 5, /* 143 */ 2, /* 144 */ - 3, /* 145 */ 3, /* 146 */ 4, /* 147 */ 3, /* 148 */ 4, /* 149 */ - 4, /* 150 */ 5, /* 151 */ 3, /* 152 */ 4, /* 153 */ 4, /* 154 */ - 5, /* 155 */ 4, /* 156 */ 5, /* 157 */ 5, /* 158 */ 6, /* 159 */ - 2, /* 160 */ 3, /* 161 */ 3, /* 162 */ 4, /* 163 */ 3, /* 164 */ - 4, /* 165 */ 4, /* 166 */ 5, /* 167 */ 3, /* 168 */ 4, /* 169 */ - 4, /* 170 */ 5, /* 171 */ 4, /* 172 */ 5, /* 173 */ 5, /* 174 */ - 6, /* 175 */ 3, /* 176 */ 4, /* 177 */ 4, /* 178 */ 5, /* 179 */ - 4, /* 180 */ 5, /* 181 */ 5, /* 182 */ 6, /* 183 */ 4, /* 184 */ - 5, /* 185 */ 5, /* 186 */ 6, /* 187 */ 5, /* 188 */ 6, /* 189 */ - 6, /* 190 */ 7, /* 191 */ 2, /* 192 */ 3, /* 193 */ 3, /* 194 */ - 4, /* 195 */ 3, /* 196 */ 4, /* 197 */ 4, /* 198 */ 5, /* 199 */ - 3, /* 200 */ 4, /* 201 */ 4, /* 202 */ 5, /* 203 */ 4, /* 204 */ - 5, /* 205 */ 5, /* 206 */ 6, /* 207 */ 3, /* 208 */ 4, /* 209 */ - 4, /* 210 */ 5, /* 211 */ 4, /* 212 */ 5, /* 213 */ 5, /* 214 */ - 6, /* 215 */ 4, /* 216 */ 5, /* 217 */ 5, /* 218 */ 6, /* 219 */ - 5, /* 220 */ 6, /* 221 */ 6, /* 222 */ 7, /* 223 */ 3, /* 224 */ - 4, /* 225 */ 4, /* 226 */ 5, /* 227 */ 4, /* 228 */ 5, /* 229 */ - 5, /* 230 */ 6, /* 231 */ 4, /* 232 */ 5, /* 233 */ 5, /* 234 */ - 6, /* 235 */ 5, /* 236 */ 6, /* 237 */ 6, /* 238 */ 7, /* 239 */ - 4, /* 240 */ 5, /* 241 */ 5, /* 242 */ 6, /* 243 */ 5, /* 244 */ - 6, /* 245 */ 6, /* 246 */ 7, /* 247 */ 5, /* 248 */ 6, /* 249 */ - 6, /* 250 */ 7, /* 251 */ 6, /* 252 */ 7, /* 253 */ 7, /* 254 */ - 8 /* 255 */ -}; // end _Bitset_global - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -template -const unsigned char _Bs_G<_Dummy>::_S_first_one[256] = { -# else -const unsigned char _Bs_G::_S_first_one[256] _STLP_WEAK = { -# endif - - 0, /* 0 */ 0, /* 1 */ 1, /* 2 */ 0, /* 3 */ 2, /* 4 */ - 0, /* 5 */ 1, /* 6 */ 0, /* 7 */ 3, /* 8 */ 0, /* 9 */ - 1, /* 10 */ 0, /* 11 */ 2, /* 12 */ 0, /* 13 */ 1, /* 14 */ - 0, /* 15 */ 4, /* 16 */ 0, /* 17 */ 1, /* 18 */ 0, /* 19 */ - 2, /* 20 */ 0, /* 21 */ 1, /* 22 */ 0, /* 23 */ 3, /* 24 */ - 0, /* 25 */ 1, /* 26 */ 0, /* 27 */ 2, /* 28 */ 0, /* 29 */ - 1, /* 30 */ 0, /* 31 */ 5, /* 32 */ 0, /* 33 */ 1, /* 34 */ - 0, /* 35 */ 2, /* 36 */ 0, /* 37 */ 1, /* 38 */ 0, /* 39 */ - 3, /* 40 */ 0, /* 41 */ 1, /* 42 */ 0, /* 43 */ 2, /* 44 */ - 0, /* 45 */ 1, /* 46 */ 0, /* 47 */ 4, /* 48 */ 0, /* 49 */ - 1, /* 50 */ 0, /* 51 */ 2, /* 52 */ 0, /* 53 */ 1, /* 54 */ - 0, /* 55 */ 3, /* 56 */ 0, /* 57 */ 1, /* 58 */ 0, /* 59 */ - 2, /* 60 */ 0, /* 61 */ 1, /* 62 */ 0, /* 63 */ 6, /* 64 */ - 0, /* 65 */ 1, /* 66 */ 0, /* 67 */ 2, /* 68 */ 0, /* 69 */ - 1, /* 70 */ 0, /* 71 */ 3, /* 72 */ 0, /* 73 */ 1, /* 74 */ - 0, /* 75 */ 2, /* 76 */ 0, /* 77 */ 1, /* 78 */ 0, /* 79 */ - 4, /* 80 */ 0, /* 81 */ 1, /* 82 */ 0, /* 83 */ 2, /* 84 */ - 0, /* 85 */ 1, /* 86 */ 0, /* 87 */ 3, /* 88 */ 0, /* 89 */ - 1, /* 90 */ 0, /* 91 */ 2, /* 92 */ 0, /* 93 */ 1, /* 94 */ - 0, /* 95 */ 5, /* 96 */ 0, /* 97 */ 1, /* 98 */ 0, /* 99 */ - 2, /* 100 */ 0, /* 101 */ 1, /* 102 */ 0, /* 103 */ 3, /* 104 */ - 0, /* 105 */ 1, /* 106 */ 0, /* 107 */ 2, /* 108 */ 0, /* 109 */ - 1, /* 110 */ 0, /* 111 */ 4, /* 112 */ 0, /* 113 */ 1, /* 114 */ - 0, /* 115 */ 2, /* 116 */ 0, /* 117 */ 1, /* 118 */ 0, /* 119 */ - 3, /* 120 */ 0, /* 121 */ 1, /* 122 */ 0, /* 123 */ 2, /* 124 */ - 0, /* 125 */ 1, /* 126 */ 0, /* 127 */ 7, /* 128 */ 0, /* 129 */ - 1, /* 130 */ 0, /* 131 */ 2, /* 132 */ 0, /* 133 */ 1, /* 134 */ - 0, /* 135 */ 3, /* 136 */ 0, /* 137 */ 1, /* 138 */ 0, /* 139 */ - 2, /* 140 */ 0, /* 141 */ 1, /* 142 */ 0, /* 143 */ 4, /* 144 */ - 0, /* 145 */ 1, /* 146 */ 0, /* 147 */ 2, /* 148 */ 0, /* 149 */ - 1, /* 150 */ 0, /* 151 */ 3, /* 152 */ 0, /* 153 */ 1, /* 154 */ - 0, /* 155 */ 2, /* 156 */ 0, /* 157 */ 1, /* 158 */ 0, /* 159 */ - 5, /* 160 */ 0, /* 161 */ 1, /* 162 */ 0, /* 163 */ 2, /* 164 */ - 0, /* 165 */ 1, /* 166 */ 0, /* 167 */ 3, /* 168 */ 0, /* 169 */ - 1, /* 170 */ 0, /* 171 */ 2, /* 172 */ 0, /* 173 */ 1, /* 174 */ - 0, /* 175 */ 4, /* 176 */ 0, /* 177 */ 1, /* 178 */ 0, /* 179 */ - 2, /* 180 */ 0, /* 181 */ 1, /* 182 */ 0, /* 183 */ 3, /* 184 */ - 0, /* 185 */ 1, /* 186 */ 0, /* 187 */ 2, /* 188 */ 0, /* 189 */ - 1, /* 190 */ 0, /* 191 */ 6, /* 192 */ 0, /* 193 */ 1, /* 194 */ - 0, /* 195 */ 2, /* 196 */ 0, /* 197 */ 1, /* 198 */ 0, /* 199 */ - 3, /* 200 */ 0, /* 201 */ 1, /* 202 */ 0, /* 203 */ 2, /* 204 */ - 0, /* 205 */ 1, /* 206 */ 0, /* 207 */ 4, /* 208 */ 0, /* 209 */ - 1, /* 210 */ 0, /* 211 */ 2, /* 212 */ 0, /* 213 */ 1, /* 214 */ - 0, /* 215 */ 3, /* 216 */ 0, /* 217 */ 1, /* 218 */ 0, /* 219 */ - 2, /* 220 */ 0, /* 221 */ 1, /* 222 */ 0, /* 223 */ 5, /* 224 */ - 0, /* 225 */ 1, /* 226 */ 0, /* 227 */ 2, /* 228 */ 0, /* 229 */ - 1, /* 230 */ 0, /* 231 */ 3, /* 232 */ 0, /* 233 */ 1, /* 234 */ - 0, /* 235 */ 2, /* 236 */ 0, /* 237 */ 1, /* 238 */ 0, /* 239 */ - 4, /* 240 */ 0, /* 241 */ 1, /* 242 */ 0, /* 243 */ 2, /* 244 */ - 0, /* 245 */ 1, /* 246 */ 0, /* 247 */ 3, /* 248 */ 0, /* 249 */ - 1, /* 250 */ 0, /* 251 */ 2, /* 252 */ 0, /* 253 */ 1, /* 254 */ - 0, /* 255 */ -}; // end _Bitset_global - -# endif /* defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) */ - -_STLP_END_NAMESPACE - -# undef __BITS_PER_WORD -# undef bitset - -#endif /* _STLP_BITSET_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_bitset.h --- a/epoc32/include/stdapis/stlport/stl/_bitset.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,791 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_BITSET_H -#define _STLP_BITSET_H - -// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused -// bits. (They are the high- order bits in the highest word.) It is -// a class invariant of class bitset<> that those unused bits are -// always zero. - -// Most of the actual code isn't contained in bitset<> itself, but in the -// base class _Base_bitset. The base class works with whole words, not with -// individual bits. This allows us to specialize _Base_bitset for the -// important special case where the bitset is only a single word. - -// The C++ standard does not define the precise semantics of operator[]. -// In this implementation the const version of operator[] is equivalent -// to test(), except that it does no range checking. The non-const version -// returns a reference to a bit, again without doing any range checking. - - -# ifndef _STLP_INTERNAL_ALGOBASE_H -# include -# endif - -# ifndef _STLP_INTERNAL_ALLOC_H -# include -# endif - -# ifndef _STLP_INTERNAL_ITERATOR_H -# include -# endif - -# ifndef _STLP_INTERNAL_UNINITIALIZED_H -# include -# endif - -# ifndef _STLP_RANGE_ERRORS_H -# include -# endif - -# ifndef _STLP_STRING -# include -# endif - -# ifndef _STLP_ISTREAM -# include -# endif - -#define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long)) -#define __BITSET_WORDS(__n) ((__n + __BITS_PER_WORD - 1)/__BITS_PER_WORD) - -_STLP_BEGIN_NAMESPACE - -// structure to aid in counting bits -template -class _Bs_G { -public: - static const unsigned char _S_bit_count[256]; - // Mapping from 8 bit unsigned integers to the index of the first one - // bit: - static const unsigned char _S_first_one[256]; -}; - -// -// Base class: general case. -// - -template -struct _Base_bitset { - typedef unsigned long _WordT; - - _WordT _M_w[_Nw]; // 0 is the least significant word. - - _Base_bitset( void ) { _M_do_reset(); } - - _Base_bitset(unsigned long __val) { - _M_do_reset(); - _M_w[0] = __val; - } - - static size_t _STLP_CALL _S_whichword( size_t __pos ) { - return __pos / __BITS_PER_WORD; - } - static size_t _STLP_CALL _S_whichbyte( size_t __pos ) { - return (__pos % __BITS_PER_WORD) / CHAR_BIT; - } - static size_t _STLP_CALL _S_whichbit( size_t __pos ) { - return __pos % __BITS_PER_WORD; - } - static _WordT _STLP_CALL _S_maskbit( size_t __pos ) { - return __STATIC_CAST(_WordT,1) << _S_whichbit(__pos); - } - - _WordT& _M_getword(size_t __pos) { return _M_w[_S_whichword(__pos)]; } - _WordT _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; } - - _WordT& _M_hiword() { return _M_w[_Nw - 1]; } - _WordT _M_hiword() const { return _M_w[_Nw - 1]; } - - void _M_do_and(const _Base_bitset<_Nw>& __x) { - for ( size_t __i = 0; __i < _Nw; __i++ ) { - _M_w[__i] &= __x._M_w[__i]; - } - } - - void _M_do_or(const _Base_bitset<_Nw>& __x) { - for ( size_t __i = 0; __i < _Nw; __i++ ) { - _M_w[__i] |= __x._M_w[__i]; - } - } - - void _M_do_xor(const _Base_bitset<_Nw>& __x) { - for ( size_t __i = 0; __i < _Nw; __i++ ) { - _M_w[__i] ^= __x._M_w[__i]; - } - } - - void _M_do_left_shift(size_t __shift); - - void _M_do_right_shift(size_t __shift); - - void _M_do_flip() { - for ( size_t __i = 0; __i < _Nw; __i++ ) { - _M_w[__i] = ~_M_w[__i]; - } - } - - void _M_do_set() { - for ( size_t __i = 0; __i < _Nw; __i++ ) { - _M_w[__i] = ~__STATIC_CAST(_WordT,0); - } - } - - - void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); } - - bool _M_is_equal(const _Base_bitset<_Nw>& __x) const { - for (size_t __i = 0; __i < _Nw; ++__i) { - if (_M_w[__i] != __x._M_w[__i]) - return false; - } - return true; - } - - bool _M_is_any() const { - for ( size_t __i = 0; __i < _Nw ; __i++ ) { - if ( _M_w[__i] != __STATIC_CAST(_WordT,0) ) - return true; - } - return false; - } - - size_t _M_do_count() const { - size_t __result = 0; - const unsigned char* __byte_ptr = (const unsigned char*)_M_w; - const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw); - - while ( __byte_ptr < __end_ptr ) { - __result += _Bs_G::_S_bit_count[*__byte_ptr]; - __byte_ptr++; - } - return __result; - } - - unsigned long _M_do_to_ulong() const; - - // find first "on" bit - size_t _M_do_find_first(size_t __not_found) const; - - // find the next "on" bit that follows "prev" - size_t _M_do_find_next(size_t __prev, size_t __not_found) const; -}; - -// -// Base class: specialization for a single word. -// - -_STLP_TEMPLATE_NULL -struct _Base_bitset<1UL> { - typedef unsigned long _WordT; - typedef _Base_bitset<1UL> _Self; - - _WordT _M_w; - - _Base_bitset( void ) : _M_w(0) {} - _Base_bitset(unsigned long __val) : _M_w(__val) {} - - static size_t _STLP_CALL _S_whichword( size_t __pos ) { - return __pos / __BITS_PER_WORD ; - } - static size_t _STLP_CALL _S_whichbyte( size_t __pos ) { - return (__pos % __BITS_PER_WORD) / CHAR_BIT; - } - static size_t _STLP_CALL _S_whichbit( size_t __pos ) { - return __pos % __BITS_PER_WORD; - } - static _WordT _STLP_CALL _S_maskbit( size_t __pos ) { - return (__STATIC_CAST(_WordT,1)) << _S_whichbit(__pos); - } - - _WordT& _M_getword(size_t) { return _M_w; } - _WordT _M_getword(size_t) const { return _M_w; } - - _WordT& _M_hiword() { return _M_w; } - _WordT _M_hiword() const { return _M_w; } - - - void _M_do_and(const _Self& __x) { _M_w &= __x._M_w; } - void _M_do_or(const _Self& __x) { _M_w |= __x._M_w; } - void _M_do_xor(const _Self& __x) { _M_w ^= __x._M_w; } - void _M_do_left_shift(size_t __shift) { _M_w <<= __shift; } - void _M_do_right_shift(size_t __shift) { _M_w >>= __shift; } - void _M_do_flip() { _M_w = ~_M_w; } - void _M_do_set() { _M_w = ~__STATIC_CAST(_WordT,0); } - void _M_do_reset() { _M_w = 0; } - - bool _M_is_equal(const _Self& __x) const { - return _M_w == __x._M_w; - } - bool _M_is_any() const { - return _M_w != 0; - } - - size_t _M_do_count() const { - size_t __result = 0; - const unsigned char* __byte_ptr = (const unsigned char*)&_M_w; - const unsigned char* __end_ptr = ((const unsigned char*)&_M_w)+sizeof(_M_w); - while ( __byte_ptr < __end_ptr ) { - __result += _Bs_G::_S_bit_count[*__byte_ptr]; - __byte_ptr++; - } - return __result; - } - - unsigned long _M_do_to_ulong() const { return _M_w; } - - inline size_t _M_do_find_first(size_t __not_found) const; - - // find the next "on" bit that follows "prev" - inline size_t _M_do_find_next(size_t __prev, size_t __not_found) const; - -}; - - -// ------------------------------------------------------------ -// -// Definitions of should-be-non-inline functions from the single-word version of -// _Base_bitset. -// - -inline size_t -_Base_bitset<1UL>::_M_do_find_first(size_t __not_found) const -{ - // typedef unsigned long _WordT; - _WordT __thisword = _M_w; - - if ( __thisword != __STATIC_CAST(_WordT,0) ) { - // find byte within word - for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); - if ( __this_byte ) - return __j*CHAR_BIT + _Bs_G::_S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - // not found, so return a value that indicates failure. - return __not_found; -} - -inline size_t -_Base_bitset<1UL>::_M_do_find_next(size_t __prev, - size_t __not_found ) const -{ - // make bound inclusive - ++__prev; - - // check out of bounds - if ( __prev >= __BITS_PER_WORD ) - return __not_found; - - // search first (and only) word - _WordT __thisword = _M_w; - - // mask off bits below bound - __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev); - - if ( __thisword != __STATIC_CAST(_WordT,0) ) { - // find byte within word - // get first byte into place - __thisword >>= _S_whichbyte(__prev) * CHAR_BIT; - for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) { - unsigned char __this_byte - = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); - if ( __this_byte ) - return __j*CHAR_BIT + _Bs_G::_S_first_one[__this_byte]; - - __thisword >>= CHAR_BIT; - } - } - - // not found, so return a value that indicates failure. - return __not_found; -} // end _M_do_find_next - - -// ------------------------------------------------------------ -// Helper class to zero out the unused high-order bits in the highest word. - -template struct _Sanitize { - static void _STLP_CALL _M_do_sanitize(unsigned long& __val) - { __val &= ~((~__STATIC_CAST(unsigned long,0)) << _Extrabits); } -}; - -_STLP_TEMPLATE_NULL struct _Sanitize<0UL> { - static void _STLP_CALL _M_do_sanitize(unsigned long) {} -}; - -// ------------------------------------------------------------ -// Class bitset. -// _Nb may be any nonzero number of type size_t. - - -template -class bitset : public _Base_bitset<__BITSET_WORDS(_Nb) > -{ -public: - enum { _Words = __BITSET_WORDS(_Nb) } ; - -private: - typedef _Base_bitset< _Words > _Base; - - void _M_do_sanitize() { - _Sanitize<_Nb%__BITS_PER_WORD >::_M_do_sanitize(this->_M_hiword()); - } -public: - typedef unsigned long _WordT; - struct reference; - friend struct reference; - - // bit reference: - struct reference { - typedef _Base_bitset<_Words > _Bitset_base; - typedef bitset<_Nb> _Bitset; - // friend _Bitset; - _WordT *_M_wp; - size_t _M_bpos; - - // should be left undefined - reference() {} - - reference( _Bitset& __b, size_t __pos ) { - _M_wp = &__b._M_getword(__pos); - _M_bpos = _Bitset_base::_S_whichbit(__pos); - } - - public: - ~reference() {} - - // for b[i] = __x; - reference& operator=(bool __x) { - if ( __x ) - *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos); - else - *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos); - - return *this; - } - - // for b[i] = b[__j]; - reference& operator=(const reference& __j) { - if ( (*(__j._M_wp) & _Bitset_base::_S_maskbit(__j._M_bpos)) ) - *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos); - else - *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos); - - return *this; - } - - // flips the bit - bool operator~() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) == 0; } - - // for __x = b[i]; - operator bool() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) != 0; } - - // for b[i].flip(); - reference& flip() { - *_M_wp ^= _Bitset_base::_S_maskbit(_M_bpos); - return *this; - } - }; - - // 23.3.5.1 constructors: - bitset() {} - - bitset(unsigned long __val) : _Base_bitset<_Words>(__val) { _M_do_sanitize(); } - -# ifdef _STLP_MEMBER_TEMPLATES - template - explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s, - size_t __pos = 0) - : _Base_bitset<_Words >() - { - if (__pos > __s.size()) - __stl_throw_out_of_range("bitset"); - _M_copy_from_string(__s, __pos, - basic_string<_CharT, _Traits, _Alloc>::npos); - } - template - bitset(const basic_string<_CharT, _Traits, _Alloc>& __s, - size_t __pos, - size_t __n) - : _Base_bitset<_Words >() - { - if (__pos > __s.size()) - __stl_throw_out_of_range("bitset"); - _M_copy_from_string(__s, __pos, __n); - } -#else /* _STLP_MEMBER_TEMPLATES */ - explicit bitset(const string& __s, - size_t __pos = 0, - size_t __n = (size_t)-1) - : _Base_bitset<_Words >() - { - if (__pos > __s.size()) - __stl_throw_out_of_range("bitset"); - _M_copy_from_string(__s, __pos, __n); - } -#endif /* _STLP_MEMBER_TEMPLATES */ - - // 23.3.5.2 bitset operations: - bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) { - this->_M_do_and(__rhs); - return *this; - } - - bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) { - this->_M_do_or(__rhs); - return *this; - } - - bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) { - this->_M_do_xor(__rhs); - return *this; - } - - bitset<_Nb>& operator<<=(size_t __pos) { -#ifdef __SYMBIAN32__ - if(__pos < _Nb) - { - this->_M_do_left_shift(__pos); - this->_M_do_sanitize(); - } - else - this->_M_do_reset(); -#else - this->_M_do_left_shift(__pos); - this->_M_do_sanitize(); -#endif - - return *this; - } - - bitset<_Nb>& operator>>=(size_t __pos) { -#ifdef __SYMBIAN32__ - if(__pos < _Nb) - { - this->_M_do_right_shift(__pos); - this->_M_do_sanitize(); - } - else - this->_M_do_reset(); -#else - this->_M_do_right_shift(__pos); - this->_M_do_sanitize(); -#endif - - return *this; - } - - // - // Extension: - // Versions of single-bit set, reset, flip, test with no range checking. - // - - bitset<_Nb>& _Unchecked_set(size_t __pos) { - this->_M_getword(__pos) |= _Base_bitset<_Words > ::_S_maskbit(__pos); - return *this; - } - - bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) { - if (__val) - this->_M_getword(__pos) |= this->_S_maskbit(__pos); - else - this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos); - - return *this; - } - - bitset<_Nb>& _Unchecked_reset(size_t __pos) { - this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos); - return *this; - } - - bitset<_Nb>& _Unchecked_flip(size_t __pos) { - this->_M_getword(__pos) ^= this->_S_maskbit(__pos); - return *this; - } - - bool _Unchecked_test(size_t __pos) const { - return (this->_M_getword(__pos) & this->_S_maskbit(__pos)) != __STATIC_CAST(_WordT,0); - } - - // Set, reset, and flip. - - bitset<_Nb>& set() { - this->_M_do_set(); - this->_M_do_sanitize(); - return *this; - } - - bitset<_Nb>& set(size_t __pos) { - if (__pos >= _Nb) - __stl_throw_out_of_range("bitset"); - return _Unchecked_set(__pos); - } - - bitset<_Nb>& set(size_t __pos, int __val) { - if (__pos >= _Nb) - __stl_throw_out_of_range("bitset"); - return _Unchecked_set(__pos, __val); - } - - bitset<_Nb>& reset() { - this->_M_do_reset(); - return *this; - } - - bitset<_Nb>& reset(size_t __pos) { - if (__pos >= _Nb) - __stl_throw_out_of_range("bitset"); - - return _Unchecked_reset(__pos); - } - - bitset<_Nb>& flip() { - this->_M_do_flip(); - this->_M_do_sanitize(); - return *this; - } - - bitset<_Nb>& flip(size_t __pos) { - if (__pos >= _Nb) - __stl_throw_out_of_range("bitset"); - - return _Unchecked_flip(__pos); - } - - bitset<_Nb> operator~() const { - return bitset<_Nb>(*this).flip(); - } - - // element access: - //for b[i]; - reference operator[](size_t __pos) { return reference(*this,__pos); } - bool operator[](size_t __pos) const { return _Unchecked_test(__pos); } - - unsigned long to_ulong() const { return this->_M_do_to_ulong(); } - -#if defined (_STLP_MEMBER_TEMPLATES) && ! defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) - template - basic_string<_CharT, _Traits, _Alloc> to_string() const { - basic_string<_CharT, _Traits, _Alloc> __result; - _M_copy_to_string(__result); - return __result; - } -#else - string to_string() const { - string __result; - _M_copy_to_string(__result); - return __result; - } -#endif /* _STLP_EXPLICIT_FUNCTION_TMPL_ARGS */ - - size_t count() const { return this->_M_do_count(); } - - size_t size() const { return _Nb; } - - bool operator==(const bitset<_Nb>& __rhs) const { - return this->_M_is_equal(__rhs); - } - bool operator!=(const bitset<_Nb>& __rhs) const { - return !this->_M_is_equal(__rhs); - } - - bool test(size_t __pos) const { - if (__pos >= _Nb) - __stl_throw_out_of_range("bitset"); - - return _Unchecked_test(__pos); - } - - bool any() const { return this->_M_is_any(); } - bool none() const { return !this->_M_is_any(); } - - bitset<_Nb> operator<<(size_t __pos) const { - bitset<_Nb> __result(*this); - __result <<= __pos ; return __result; - } - bitset<_Nb> operator>>(size_t __pos) const { - bitset<_Nb> __result(*this); - __result >>= __pos ; return __result; - } - - // - // EXTENSIONS: bit-find operations. These operations are - // experimental, and are subject to change or removal in future - // versions. - // - - // find the index of the first "on" bit - size_t _Find_first() const - { return this->_M_do_find_first(_Nb); } - - // find the index of the next "on" bit after prev - size_t _Find_next( size_t __prev ) const - { return this->_M_do_find_next(__prev, _Nb); } - -// -// Definitions of should-be non-inline member functions. -// -# if defined (_STLP_MEMBER_TEMPLATES) - template - void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, - size_t __pos, - size_t __n) { -#else - void _M_copy_from_string(const string& __s, - size_t __pos, - size_t __n) { - typedef char_traits _Traits; -#endif - reset(); - size_t __tmp = _Nb; - const size_t __Nbits = (min) (__tmp, (min) (__n, __s.size() - __pos)); - for ( size_t __i= 0; __i < __Nbits; ++__i) { - typename _Traits::int_type __k = _Traits::to_int_type(__s[__pos + __Nbits - __i - 1]); - // boris : widen() ? - if (__k == '1') - set(__i); - else if (__k !='0') - __stl_throw_invalid_argument("bitset"); - } - } - -# if defined (_STLP_MEMBER_TEMPLATES) - template - void _M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const -# else - void _M_copy_to_string(string& __s) const -# endif - { - __s.assign(_Nb, '0'); - - for (size_t __i = 0; __i < _Nb; ++__i) - if (_Unchecked_test(__i)) - __s[_Nb - 1 - __i] = '1'; - } - -# if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) - bitset<_Nb> operator&(const bitset<_Nb>& __y) const { - bitset<_Nb> __result(*this); - __result &= __y; - return __result; - } - bitset<_Nb> operator|(const bitset<_Nb>& __y) const { - bitset<_Nb> __result(*this); - __result |= __y; - return __result; - } - bitset<_Nb> operator^(const bitset<_Nb>& __y) const { - bitset<_Nb> __result(*this); - __result ^= __y; - return __result; - } -# endif - -}; - -// ------------------------------------------------------------ -// -// 23.3.5.3 bitset operations: -// - -# if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) - -template -inline bitset<_Nb> _STLP_CALL -operator&(const bitset<_Nb>& __x, - const bitset<_Nb>& __y) { - bitset<_Nb> __result(__x); - __result &= __y; - return __result; -} - - -template -inline bitset<_Nb> _STLP_CALL -operator|(const bitset<_Nb>& __x, - const bitset<_Nb>& __y) { - bitset<_Nb> __result(__x); - __result |= __y; - return __result; -} - -template -inline bitset<_Nb> _STLP_CALL -operator^(const bitset<_Nb>& __x, - const bitset<_Nb>& __y) { - bitset<_Nb> __result(__x); - __result ^= __y; - return __result; -} - -#if defined ( _STLP_USE_NEW_IOSTREAMS ) - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x); - - -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x); - -#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) - -// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll -template -_ISTREAM_DLL& _STLP_CALL -operator>>(_ISTREAM_DLL& __is, bitset<_Nb>& __x); - -template -inline _OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, const bitset<_Nb>& __x) { - string __tmp; - __x._M_copy_to_string(__tmp); - return __os << __tmp; -} - -#endif - -# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ - -# undef bitset - - -_STLP_END_NAMESPACE - -# undef __BITS_PER_WORD -# undef __BITSET_WORDS - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_BITSET_H */ - - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_bvector.h --- a/epoc32/include/stdapis/stlport/stl/_bvector.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,831 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_BVECTOR_H -#define _STLP_INTERNAL_BVECTOR_H - -#ifndef _STLP_INTERNAL_VECTOR_H -# include -# endif - -#ifndef __WORD_BIT -#define __WORD_BIT (int(CHAR_BIT*sizeof(unsigned int))) -#endif - -_STLP_BEGIN_NAMESPACE - -struct _Bit_reference { - unsigned int* _M_p; - unsigned int _M_mask; - _Bit_reference(unsigned int* __x, unsigned int __y) - : _M_p(__x), _M_mask(__y) {} - -public: - _Bit_reference() : _M_p(0), _M_mask(0) {} - - operator bool() const { - return !(!(*_M_p & _M_mask)); - } - _Bit_reference& operator=(bool __x) { - if (__x) *_M_p |= _M_mask; - else *_M_p &= ~_M_mask; - return *this; - } - _Bit_reference& operator=(const _Bit_reference& __x) { - return *this = bool(__x); - } - bool operator==(const _Bit_reference& __x) const { - return bool(*this) == bool(__x); - } - bool operator<(const _Bit_reference& __x) const { - return !bool(*this) && bool(__x); - } - - _Bit_reference& operator |= (bool __x) { - if (__x) - *_M_p |= _M_mask; - return *this; - } - _Bit_reference& operator &= (bool __x) { - if (!__x) - *_M_p &= ~_M_mask; - return *this; - } - void flip() { *_M_p ^= _M_mask; } -}; - - -inline void swap(_Bit_reference& __x, _Bit_reference& __y) -{ - bool __tmp = (bool)__x; - __x = __y; - __y = __tmp; -} - -struct _Bit_iterator_base; - -struct _Bit_iterator_base -{ - typedef ptrdiff_t difference_type; - - unsigned int* _M_p; - unsigned int _M_offset; - - void _M_bump_up() { - if (_M_offset++ == __WORD_BIT - 1) { - _M_offset = 0; - ++_M_p; - } - } - - void _M_bump_down() { - if (_M_offset-- == 0) { - _M_offset = __WORD_BIT - 1; - --_M_p; - } - } - - _Bit_iterator_base() : _M_p(0), _M_offset(0) {} - _Bit_iterator_base(unsigned int* __x, unsigned int __y) : _M_p(__x), _M_offset(__y) {} - // _Bit_iterator_base( const _Bit_iterator_base& __x) : _M_p(__x._M_p), _M_offset(__x._M_offset) {} - // _Bit_iterator_base& operator = ( const _Bit_iterator_base& __x) { _M_p = __x._M_p ; _M_offset = __x._M_offset ; return *this; } - - void _M_advance (difference_type __i) { - difference_type __n = __i + _M_offset; - _M_p += __n / __WORD_BIT; - __n = __n % __WORD_BIT; - if (__n < 0) { - _M_offset = (unsigned int) __n + __WORD_BIT; - --_M_p; - } else - _M_offset = (unsigned int) __n; - } - - difference_type _M_subtract(const _Bit_iterator_base& __x) const { - return __WORD_BIT * (_M_p - __x._M_p) + _M_offset - __x._M_offset; - } -}; - -inline bool _STLP_CALL operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return __y._M_p == __x._M_p && __y._M_offset == __x._M_offset; -} -inline bool _STLP_CALL operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return __y._M_p != __x._M_p || __y._M_offset != __x._M_offset; -} - -inline bool _STLP_CALL operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return __x._M_p < __y._M_p || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset); -} - -inline bool _STLP_CALL operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return operator <(__y , __x); -} -inline bool _STLP_CALL operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return !(__y < __x); -} -inline bool _STLP_CALL operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { - return !(__x < __y); -} - -template -struct _Bit_iter : public _Bit_iterator_base -{ - typedef _Ref reference; - typedef _Ptr pointer; - typedef _Bit_iter<_Ref, _Ptr> _Self; - typedef random_access_iterator_tag iterator_category; - typedef bool value_type; - typedef ptrdiff_t difference_type; - typedef size_t size_type; - - _Bit_iter(unsigned int* __x, unsigned int __y) : _Bit_iterator_base(__x, __y) {} - _Bit_iter() {} - - _Bit_iter(const _Bit_iter<_Bit_reference, _Bit_reference*>& __x): - _Bit_iterator_base((const _Bit_iterator_base&)__x) {} - - // _Self& operator = (const _Bit_iter<_Bit_reference, _Bit_reference*>& __x) - // { (_Bit_iterator_base&)*this = (const _Bit_iterator_base&)__x; return *this; } - - reference operator*() const { - return _Bit_reference(_M_p, 1UL << _M_offset); - } - _Self& operator++() { - _M_bump_up(); - return *this; - } - _Self operator++(int) { - _Self __tmp = *this; - _M_bump_up(); - return __tmp; - } - _Self& operator--() { - _M_bump_down(); - return *this; - } - _Self operator--(int) { - _Self __tmp = *this; - _M_bump_down(); - return __tmp; - } - _Self& operator+=(difference_type __i) { - _M_advance(__i); - return *this; - } - _Self& operator-=(difference_type __i) { - *this += -__i; - return *this; - } - _Self operator+(difference_type __i) const { - _Self __tmp = *this; - return __tmp += __i; - } - _Self operator-(difference_type __i) const { - _Self __tmp = *this; - return __tmp -= __i; - } - difference_type operator-(const _Self& __x) const { - return _M_subtract(__x); - } - reference operator[](difference_type __i) { return *(*this + __i); } -}; - -template -inline _Bit_iter<_Ref,_Ptr> _STLP_CALL -operator+(ptrdiff_t __n, const _Bit_iter<_Ref, _Ptr>& __x) { - return __x + __n; -} - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -inline random_access_iterator_tag iterator_category(const _Bit_iterator_base&) {return random_access_iterator_tag();} -inline ptrdiff_t* distance_type(const _Bit_iterator_base&) {return (ptrdiff_t*)0;} -inline bool* value_type(const _Bit_iter<_Bit_reference, _Bit_reference*>&) {return (bool*)0;} -inline bool* value_type(const _Bit_iter&) {return (bool*)0;} -# endif - -typedef _Bit_iter _Bit_const_iterator; -typedef _Bit_iter<_Bit_reference, _Bit_reference*> _Bit_iterator; - -// Bit-vector base class, which encapsulates the difference between -// old SGI-style allocators and standard-conforming allocators. - - -template -class _Bvector_base -{ -public: - _STLP_FORCE_ALLOCATORS(bool, _Alloc) - typedef typename _Alloc_traits::allocator_type allocator_type; - typedef unsigned int __chunk_type; - typedef typename _Alloc_traits<__chunk_type, - _Alloc>::allocator_type __chunk_allocator_type; - allocator_type get_allocator() const { - return _STLP_CONVERT_ALLOCATOR((const __chunk_allocator_type&)_M_end_of_storage, bool); - } - static allocator_type __get_dfl_allocator() { return allocator_type(); } - - _Bvector_base(const allocator_type& __a) - : _M_start(), _M_finish(), _M_end_of_storage(_STLP_CONVERT_ALLOCATOR(__a, __chunk_type), - (__chunk_type*)0) { - } - ~_Bvector_base() { _M_deallocate(); - } - -protected: - - unsigned int* _M_bit_alloc(size_t __n) - { return _M_end_of_storage.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } - void _M_deallocate() { - if (_M_start._M_p) - _M_end_of_storage.deallocate(_M_start._M_p, - _M_end_of_storage._M_data - _M_start._M_p); - } - - _Bit_iterator _M_start; - _Bit_iterator _M_finish; - _STLP_alloc_proxy<__chunk_type*, __chunk_type, __chunk_allocator_type> _M_end_of_storage; -}; - - -// The next few lines are confusing. What we're doing is declaring a -// partial specialization of vector if we have the necessary -// compiler support. Otherwise, we define a class bit_vector which uses -// the default allocator. - -#if defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined(_STLP_NO_BOOL) && ! defined (__SUNPRO_CC) -# define _STLP_VECBOOL_TEMPLATE -# define __BVEC_TMPL_HEADER template -#else -# undef _STLP_VECBOOL_TEMPLATE -# ifdef _STLP_NO_BOOL -# define __BVEC_TMPL_HEADER -# else -# define __BVEC_TMPL_HEADER _STLP_TEMPLATE_NULL -# endif -# if !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__))) //*TY 12/17/2000 - -# define _Alloc _STLP_DEFAULT_ALLOCATOR(bool) -# else -# define _Alloc allocator -# endif -#endif - -#ifdef _STLP_NO_BOOL -# define __BVECTOR_QUALIFIED bit_vector -# define __BVECTOR bit_vector -#else -# ifdef _STLP_VECBOOL_TEMPLATE -# define __BVECTOR_QUALIFIED __WORKAROUND_DBG_RENAME(vector) -# else -# define __BVECTOR_QUALIFIED __WORKAROUND_DBG_RENAME(vector) > -# endif -#if defined (_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS) -# define __BVECTOR __BVECTOR_QUALIFIED -#else -# define __BVECTOR __WORKAROUND_DBG_RENAME(vector) -#endif -#endif - - -__BVEC_TMPL_HEADER -class __BVECTOR_QUALIFIED : public _Bvector_base<_Alloc > -{ - typedef _Bvector_base<_Alloc > _Base; - typedef __BVECTOR_QUALIFIED _Self; -public: - typedef bool value_type; - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Bit_reference reference; - typedef bool const_reference; - typedef _Bit_reference* pointer; - typedef const bool* const_pointer; - typedef random_access_iterator_tag _Iterator_category; - - typedef _Bit_iterator iterator; - typedef _Bit_const_iterator const_iterator; - -#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) - typedef _STLP_STD::reverse_iterator const_reverse_iterator; - typedef _STLP_STD::reverse_iterator reverse_iterator; -#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ -# if defined (_STLP_MSVC50_COMPATIBILITY) - typedef _STLP_STD::reverse_iterator const_reverse_iterator; - typedef _STLP_STD::reverse_iterator reverse_iterator; -# else - typedef _STLP_STD::reverse_iterator const_reverse_iterator; - typedef _STLP_STD::reverse_iterator - reverse_iterator; -# endif -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -# ifdef _STLP_VECBOOL_TEMPLATE - typedef typename _Bvector_base<_Alloc >::allocator_type allocator_type; - typedef typename _Bvector_base<_Alloc >::__chunk_type __chunk_type ; -# else - typedef _Bvector_base<_Alloc >::allocator_type allocator_type; - typedef _Bvector_base<_Alloc >::__chunk_type __chunk_type ; -# endif - -protected: - - void _M_initialize(size_type __n) { - unsigned int* __q = this->_M_bit_alloc(__n); - this->_M_end_of_storage._M_data = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; - this->_M_start = iterator(__q, 0); - this->_M_finish = this->_M_start + difference_type(__n); - } - void _M_insert_aux(iterator __position, bool __x) { - if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) { - __copy_backward(__position, this->_M_finish, this->_M_finish + 1, random_access_iterator_tag(), (difference_type*)0 ); - *__position = __x; - ++this->_M_finish; - } - else { - size_type __len = size() ? 2 * size() : __WORD_BIT; - unsigned int* __q = this->_M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - *__i++ = __x; - this->_M_finish = copy(__position, end(), __i); - this->_M_deallocate(); - this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - this->_M_start = iterator(__q, 0); - } - } - -#ifdef _STLP_MEMBER_TEMPLATES - template - void _M_initialize_range(_InputIterator __first, _InputIterator __last, - const input_iterator_tag &) { - this->_M_start = iterator(); - this->_M_finish = iterator(); - this->_M_end_of_storage._M_data = 0; - for ( ; __first != __last; ++__first) - push_back(*__first); - } - - template - void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, - const forward_iterator_tag &) { - size_type __n = distance(__first, __last); - _M_initialize(__n); - // copy(__first, __last, _M_start); - copy(__first, __last, this->_M_start); // dwa 12/22/99 -- resolving ambiguous reference. - } - - template - void _M_insert_range(iterator __pos, - _InputIterator __first, _InputIterator __last, - const input_iterator_tag &) { - for ( ; __first != __last; ++__first) { - __pos = insert(__pos, *__first); - ++__pos; - } - } - - template - void _M_insert_range(iterator __position, - _ForwardIterator __first, _ForwardIterator __last, - const forward_iterator_tag &) { - if (__first != __last) { - size_type __n = distance(__first, __last); - if (capacity() - size() >= __n) { - __copy_backward(__position, end(), this->_M_finish + difference_type(__n), random_access_iterator_tag(), (difference_type*)0 ); - copy(__first, __last, __position); - this->_M_finish += difference_type(__n); - } - else { - size_type __len = size() + (max)(size(), __n); - unsigned int* __q = this->_M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - __i = copy(__first, __last, __i); - this->_M_finish = copy(__position, end(), __i); - this->_M_deallocate(); - this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - this->_M_start = iterator(__q, 0); - } - } - } - -#endif /* _STLP_MEMBER_TEMPLATES */ - -public: - iterator begin() { return this->_M_start; } - const_iterator begin() const { return this->_M_start; } - iterator end() { return this->_M_finish; } - const_iterator end() const { return this->_M_finish; } - - reverse_iterator rbegin() { return reverse_iterator(end()); } - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - reverse_iterator rend() { return reverse_iterator(begin()); } - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - - size_type size() const { return size_type(end() - begin()); } - size_type max_size() const { return size_type(-1); } - size_type capacity() const { - return size_type(const_iterator(this->_M_end_of_storage._M_data, 0) - begin()); - } - bool empty() const { return begin() == end(); } - reference operator[](size_type __n) - { return *(begin() + difference_type(__n)); } - const_reference operator[](size_type __n) const - { return *(begin() + difference_type(__n)); } - - void _M_range_check(size_type __n) const { - if (__n >= this->size()) - __stl_throw_range_error("vector"); - } - - reference at(size_type __n) - { _M_range_check(__n); return (*this)[__n]; } - const_reference at(size_type __n) const - { _M_range_check(__n); return (*this)[__n]; } - - explicit __BVECTOR(const allocator_type& __a = allocator_type()) - : _Bvector_base<_Alloc >(__a) { - _STLP_POP_IF_CHECK - } - - __BVECTOR(size_type __n, bool __val, - const allocator_type& __a = - allocator_type()) - : _Bvector_base<_Alloc >(__a) - { - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - _M_initialize(__n); - fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __val ? ~0 : 0); - _STLP_POP_CLEANUP_ITEM - } - - explicit __BVECTOR(size_type __n) - : _Bvector_base<_Alloc >(allocator_type()) - { - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - _M_initialize(__n); - fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), 0); - _STLP_POP_CLEANUP_ITEM - } - - __BVECTOR(const _Self& __x) : _Bvector_base<_Alloc >(__x.get_allocator()) { - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - _M_initialize(__x.size()); - copy(__x.begin(), __x.end(), this->_M_start); - _STLP_POP_CLEANUP_ITEM - } - -#if defined (_STLP_MEMBER_TEMPLATES) - template - void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) { - _M_initialize(__n); - fill(this->_M_start._M_p, this->_M_end_of_storage._M_data, __x ? ~0 : 0); - } - - template - void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, - const __false_type&) { - _M_initialize_range(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); - } -# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS - // Check whether it's an integral type. If so, it's not an iterator. - template - __BVECTOR(_InputIterator __first, _InputIterator __last) - : _Base(allocator_type()) - { - typedef typename _Is_integer<_InputIterator>::_Integral _Integral; - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - _M_initialize_dispatch(__first, __last, _Integral()); - _STLP_POP_CLEANUP_ITEM - } -# endif - template - __BVECTOR(_InputIterator __first, _InputIterator __last, - const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) - : _Base(__a) - { - typedef typename _Is_integer<_InputIterator>::_Integral _Integral; - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - _M_initialize_dispatch(__first, __last, _Integral()); - _STLP_POP_CLEANUP_ITEM - } -#else /* _STLP_MEMBER_TEMPLATES */ - __BVECTOR(const_iterator __first, const_iterator __last, - const allocator_type& __a = allocator_type()) - : _Bvector_base<_Alloc >(__a) - { - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - size_type __n = distance(__first, __last); - _M_initialize(__n); - copy(__first, __last, this->_M_start); - _STLP_POP_CLEANUP_ITEM - } - __BVECTOR(const bool* __first, const bool* __last, - const allocator_type& __a = allocator_type()) - : _Bvector_base<_Alloc >(__a) - { - size_type __n = distance(__first, __last); - _STLP_PUSH_CLEANUP_ITEM(_Base, this) - _M_initialize(__n); - copy(__first, __last, this->_M_start); - _STLP_POP_CLEANUP_ITEM - } -#endif /* _STLP_MEMBER_TEMPLATES */ - - ~__BVECTOR() { } - - __BVECTOR_QUALIFIED& operator=(const __BVECTOR_QUALIFIED& __x) { - if (&__x == this) return *this; - if (__x.size() > capacity()) { - this->_M_deallocate(); - _M_initialize(__x.size()); - } - copy(__x.begin(), __x.end(), begin()); - this->_M_finish = begin() + difference_type(__x.size()); - return *this; - } - -#ifdef _STLP_USE_TRAP_LEAVE -public: - static void* operator new (size_t __n, TLeave) { return _STLP_StackHelper::_NewLC(__n); } - static void* operator new (size_t __n) { return _STLP_StackHelper::_NewLC(__n); } -#endif - - // assign(), a generalized assignment member function. Two - // versions: one that takes a count, and one that takes a range. - // The range version is a member template, so we dispatch on whether - // or not the type is an integer. - - void _M_fill_assign(size_t __n, bool __x) { - if (__n > size()) { - fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0); - insert(end(), __n - size(), __x); - } - else { - erase(begin() + __n, end()); - fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0); - } - } - void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); } - -#ifdef _STLP_MEMBER_TEMPLATES - - template - void assign(_InputIterator __first, _InputIterator __last) { - typedef typename _Is_integer<_InputIterator>::_Integral _Integral; - _M_assign_dispatch(__first, __last, _Integral()); - } - - template - void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&) - { _M_fill_assign((size_t) __n, (bool) __val); } - - template - void _M_assign_dispatch(_InputIter __first, _InputIter __last, const __false_type&) - { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); } - - template - void _M_assign_aux(_InputIterator __first, _InputIterator __last, - const input_iterator_tag &) { - iterator __cur = begin(); - for ( ; __first != __last && __cur != end(); ++__cur, ++__first) - *__cur = *__first; - if (__first == __last) - erase(__cur, end()); - else - insert(end(), __first, __last); - } - - template - void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, - const forward_iterator_tag &) { - size_type __len = distance(__first, __last); - if (__len < size()) - erase(copy(__first, __last, begin()), end()); - else { - _ForwardIterator __mid = __first; - advance(__mid, size()); - copy(__first, __mid, begin()); - insert(end(), __mid, __last); - } - } - -#endif /* _STLP_MEMBER_TEMPLATES */ - - void reserve(size_type __n) { - if (capacity() < __n) { - unsigned int* __q = this->_M_bit_alloc(__n); - _Bit_iterator __z(__q, 0); - this->_M_finish = copy(begin(), end(), __z); - this->_M_deallocate(); - this->_M_start = iterator(__q, 0); - this->_M_end_of_storage._M_data = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; - } - } - - reference front() { return *begin(); } - const_reference front() const { return *begin(); } - reference back() { return *(end() - 1); } - const_reference back() const { return *(end() - 1); } - void push_back(bool __x) { - if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) { - *(this->_M_finish) = __x; - ++this->_M_finish; - } - else - _M_insert_aux(end(), __x); - } - void swap(__BVECTOR_QUALIFIED& __x) { - _STLP_STD::swap(this->_M_start, __x._M_start); - _STLP_STD::swap(this->_M_finish, __x._M_finish); - _STLP_STD::swap(this->_M_end_of_storage, __x._M_end_of_storage); - } - iterator insert(iterator __position, bool __x = bool()) { - difference_type __n = __position - begin(); - if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position == end()) { - *(this->_M_finish) = __x; - ++this->_M_finish; - } - else - _M_insert_aux(__position, __x); - return begin() + __n; - } - -#if defined ( _STLP_MEMBER_TEMPLATES ) - - template - void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, - const __true_type&) { - _M_fill_insert(__pos, (size_type) __n, (bool) __x); - } - - template - void _M_insert_dispatch(iterator __pos, - _InputIterator __first, _InputIterator __last, - const __false_type&) { - _M_insert_range(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); - } - - // Check whether it's an integral type. If so, it's not an iterator. - template - void insert(iterator __position, - _InputIterator __first, _InputIterator __last) { - typedef typename _Is_integer<_InputIterator>::_Integral _Is_Integral; - _M_insert_dispatch(__position, __first, __last, _Is_Integral()); - } -#else /* _STLP_MEMBER_TEMPLATES */ - void insert(iterator __position, - const_iterator __first, const_iterator __last) { - if (__first == __last) return; - size_type __n = distance(__first, __last); - if (capacity() - size() >= __n) { - __copy_backward(__position, end(), this->_M_finish + __n, - random_access_iterator_tag(), (difference_type*)0 ); - copy(__first, __last, __position); - this->_M_finish += __n; - } - else { - size_type __len = size() + (max)(size(), __n); - unsigned int* __q = this->_M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - __i = copy(__first, __last, __i); - this->_M_finish = copy(__position, end(), __i); - this->_M_deallocate(); - this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - this->_M_start = iterator(__q, 0); - } - } - - void insert(iterator __position, const bool* __first, const bool* __last) { - if (__first == __last) return; - size_type __n = distance(__first, __last); - if (capacity() - size() >= __n) { - __copy_backward(__position, end(), this->_M_finish + __n, - random_access_iterator_tag(), (difference_type*)0 ); - copy(__first, __last, __position); - this->_M_finish += __n; - } - else { - size_type __len = size() + (max)(size(), __n); - unsigned int* __q = this->_M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - __i = copy(__first, __last, __i); - this->_M_finish = copy(__position, end(), __i); - this->_M_deallocate(); - this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - this->_M_start = iterator(__q, 0); - } - } -#endif /* _STLP_MEMBER_TEMPLATES */ - - void _M_fill_insert(iterator __position, size_type __n, bool __x) { - if (__n == 0) return; - if (capacity() - size() >= __n) { - __copy_backward(__position, end(), this->_M_finish + difference_type(__n), random_access_iterator_tag(), (difference_type*)0 ); - fill(__position, __position + difference_type(__n), __x); - this->_M_finish += difference_type(__n); - } - else { - size_type __len = size() + (max)(size(), __n); - unsigned int* __q = this->_M_bit_alloc(__len); - iterator __i = copy(begin(), __position, iterator(__q, 0)); - fill_n(__i, __n, __x); - this->_M_finish = copy(__position, end(), __i + difference_type(__n)); - this->_M_deallocate(); - this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; - this->_M_start = iterator(__q, 0); - } - } - - void insert(iterator __position, size_type __n, bool __x) { - _M_fill_insert(__position, __n, __x); - } - - void pop_back() { - --this->_M_finish; - } - iterator erase(iterator __position) { - if (__position + 1 != end()) - copy(__position + 1, end(), __position); - --this->_M_finish; - return __position; - } - iterator erase(iterator __first, iterator __last) { - this->_M_finish = copy(__last, end(), __first); - return __first; - } - void resize(size_type __new_size, bool __x = bool()) { - if (__new_size < size()) - erase(begin() + difference_type(__new_size), end()); - else - insert(end(), __new_size - size(), __x); - } - void flip() { - for (unsigned int* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p) - *__p = ~*__p; - } - - void clear() { erase(begin(), end()); } -}; - -# if defined ( _STLP_NO_BOOL ) || defined (__HP_aCC) // fixed soon (03/17/2000) - -#define _STLP_TEMPLATE_HEADER __BVEC_TMPL_HEADER -#define _STLP_TEMPLATE_CONTAINER __BVECTOR_QUALIFIED -#include -#undef _STLP_TEMPLATE_CONTAINER -#undef _STLP_TEMPLATE_HEADER - -# endif /* NO_BOOL */ - -#if !defined (_STLP_NO_BOOL) -// This typedef is non-standard. It is provided for backward compatibility. - typedef __WORKAROUND_DBG_RENAME(vector) > bit_vector; -#endif - -_STLP_END_NAMESPACE - -#undef _Alloc -#undef _STLP_VECBOOL_TEMPLATE -#undef __BVECTOR -#undef __BVECTOR_QUALIFIED -#undef __BVEC_TMPL_HEADER - -# undef __WORD_BIT - -#endif /* _STLP_INTERNAL_BVECTOR_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_check_config.h --- a/epoc32/include/stdapis/stlport/stl/_check_config.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -// This file is reserved to site configuration purpose -// and should NEVER be overridden by user - -# if defined ( _STLP_NO_OWN_IOSTREAMS ) - -// User choose not to use SGI iostreams, which means no -// precompiled library will be used and he is free to override -// any STLport configuration flags - -# else - -// The following will be defined in stl_config.h : -// # define _STLP_OWN_IOSTREAMS 1 -# endif - -/* - * Consistency check : if we use SGI iostreams, we have to use consistent - * thread model (single-threaded or multi-threaded) with the compiled library - * - * Default is multithreaded build. If you want to build and use single-threaded - * STLport, please change _STLP_NOTHREADS configuration setting above and rebuild the library - * - */ - -# if defined (_STLP_OWN_IOSTREAMS) \ - && !defined (_STLP_NO_THREADS) && !defined (_REENTRANT) - -# if defined(_MSC_VER) && !defined(__MWERKS__) && !defined (__COMO__) && !defined(_MT) -# error "Only multi-threaded runtime library may be linked with STLport!" -# endif - -// boris : you may change that to build non-threadsafe STLport library -# if defined (__BUILDING_STLPORT) /* || defined (_STLP_DEBUG) */ -# define _REENTRANT 1 -# endif - -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_cmath.h --- a/epoc32/include/stdapis/stlport/stl/_cmath.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,210 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_CMATH_H_HEADER -# define _STLP_CMATH_H_HEADER - -# include - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_SAME_FUNCTION_NAME_RESOLUTION_BUG) && (! defined (_STLP_VXWORKS_TORNADO)) - -// this proxy is needed for some compilers to resolve problems -// calling sqrt() from within sqrt(), etc. -template -struct _STL_math_proxy { - static inline _Tp _do_abs(const _Tp& __x) { return _STLP_VENDOR_CSTD::fabs(__x); } - static inline _Tp _do_acos(const _Tp& __x) { return _STLP_VENDOR_CSTD::acos(__x); } - static inline _Tp _do_asin(const _Tp& __x) { return _STLP_VENDOR_CSTD::asin(__x); } - static inline _Tp _do_atan(const _Tp& __x) { return _STLP_VENDOR_CSTD::atan(__x); } - static inline _Tp _do_atan2(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::atan2(__x, __y); } - static inline _Tp _do_cos(const _Tp& __x) { return _STLP_VENDOR_CSTD::cos(__x); } - static inline _Tp _do_cosh(const _Tp& __x) { return _STLP_VENDOR_CSTD::cosh(__x); } - static inline _Tp _do_floor(const _Tp& __x) { return _STLP_VENDOR_CSTD::floor(__x); } - static inline _Tp _do_ceil(const _Tp& __x) { return _STLP_VENDOR_CSTD::ceil(__x); } - static inline _Tp _do_fmod(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::fmod(__x, __y); } - static inline _Tp _do_frexp(const _Tp& __x, int* __y) { return _STLP_VENDOR_CSTD::frexp(__x, __y); } - static inline _Tp _do_ldexp(const _Tp& __x, int __y) { return _STLP_VENDOR_CSTD::ldexp(__x, __y); } - static inline _Tp _do_modf(const _Tp& __x, double* __y) { return _STLP_VENDOR_CSTD::modf(__x, __y); } - static inline _Tp _do_log(const _Tp& __x) { return _STLP_VENDOR_CSTD::log(__x); } - static inline _Tp _do_log10(const _Tp& __x) { return _STLP_VENDOR_CSTD::log10(__x); } - static inline _Tp _do_pow(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::pow(__x, __y); } - static inline _Tp _do_pow(const _Tp& __x, int __y) { return _STLP_VENDOR_CSTD::pow(__x, __y); } - static inline _Tp _do_sin(const _Tp& __x) { return _STLP_VENDOR_CSTD::sin(__x); } - static inline _Tp _do_sinh(const _Tp& __x) { return _STLP_VENDOR_CSTD::sinh(__x); } - - static inline _Tp _do_sqrt(const _Tp& __x) { return _STLP_VENDOR_CSTD::sqrt(__x); } - static inline _Tp _do_tan(const _Tp& __x) { return _STLP_VENDOR_CSTD::tan(__x); } - static inline _Tp _do_tanh(const _Tp& __x) { return _STLP_VENDOR_CSTD::tanh(__x); } - static inline _Tp _do_exp(const _Tp& __x) { return _STLP_VENDOR_CSTD::exp(__x); } - static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::hypot(__x, __y); } -}; - -# define _STLP_DO_ABS(_Tp) _STL_math_proxy<_Tp>::_do_abs -# define _STLP_DO_ACOS(_Tp) _STL_math_proxy<_Tp>::_do_acos -# define _STLP_DO_ASIN(_Tp) _STL_math_proxy<_Tp>::_do_asin -# define _STLP_DO_ATAN(_Tp) _STL_math_proxy<_Tp>::_do_atan -# define _STLP_DO_ATAN2(_Tp) _STL_math_proxy<_Tp>::_do_atan2 -# define _STLP_DO_COS(_Tp) _STL_math_proxy<_Tp>::_do_cos -# define _STLP_DO_COSH(_Tp) _STL_math_proxy<_Tp>::_do_cosh -# define _STLP_DO_FLOOR(_Tp) _STL_math_proxy<_Tp>::_do_floor -# define _STLP_DO_CEIL(_Tp) _STL_math_proxy<_Tp>::_do_ceil -# define _STLP_DO_FMOD(_Tp) _STL_math_proxy<_Tp>::_do_fmod -# define _STLP_DO_FREXP(_Tp) _STL_math_proxy<_Tp>::_do_frexp -# define _STLP_DO_LDEXP(_Tp) _STL_math_proxy<_Tp>::_do_ldexp -# define _STLP_DO_MODF(_Tp) _STL_math_proxy<_Tp>::_do_modf -# define _STLP_DO_LOG(_Tp) _STL_math_proxy<_Tp>::_do_log -# define _STLP_DO_LOG10(_Tp) _STL_math_proxy<_Tp>::_do_log10 -# define _STLP_DO_POW(_Tp) _STL_math_proxy<_Tp>::_do_pow -# define _STLP_DO_SIN(_Tp) _STL_math_proxy<_Tp>::_do_sin -# define _STLP_DO_SINH(_Tp) _STL_math_proxy<_Tp>::_do_sinh -# define _STLP_DO_SQRT(_Tp) _STL_math_proxy<_Tp>::_do_sqrt -# define _STLP_DO_TAN(_Tp) _STL_math_proxy<_Tp>::_do_tan -# define _STLP_DO_TANH(_Tp) _STL_math_proxy<_Tp>::_do_tanh -# define _STLP_DO_EXP(_Tp) _STL_math_proxy<_Tp>::_do_exp -# define _STLP_DO_HYPOT(_Tp) _STL_math_proxy<_Tp>::_do_hypot -# else -# define _STLP_DO_ABS(_Tp) _STLP_VENDOR_CSTD::fabs -# define _STLP_DO_ACOS(_Tp) _STLP_VENDOR_CSTD::acos -# define _STLP_DO_ASIN(_Tp) _STLP_VENDOR_CSTD::asin -# define _STLP_DO_ATAN(_Tp) _STLP_VENDOR_CSTD::atan -# define _STLP_DO_ATAN2(_Tp) _STLP_VENDOR_CSTD::atan2 -# define _STLP_DO_COS(_Tp) _STLP_VENDOR_CSTD::cos -# define _STLP_DO_COSH(_Tp) _STLP_VENDOR_CSTD::cosh -# define _STLP_DO_FLOOR(_Tp) _STLP_VENDOR_CSTD::floor -# define _STLP_DO_CEIL(_Tp) _STLP_VENDOR_CSTD::ceil -# define _STLP_DO_FMOD(_Tp) _STLP_VENDOR_CSTD::fmod -# define _STLP_DO_FREXP(_Tp) _STLP_VENDOR_CSTD::frexp -# define _STLP_DO_LDEXP(_Tp) _STLP_VENDOR_CSTD::ldexp -# define _STLP_DO_MODF(_Tp) _STLP_VENDOR_CSTD::modf -# define _STLP_DO_LOG(_Tp) _STLP_VENDOR_CSTD::log -# define _STLP_DO_LOG10(_Tp) _STLP_VENDOR_CSTD::log10 -# define _STLP_DO_POW(_Tp) _STLP_VENDOR_CSTD::pow -# define _STLP_DO_SIN(_Tp) _STLP_VENDOR_CSTD::sin -# define _STLP_DO_SINH(_Tp) _STLP_VENDOR_CSTD::sinh -# define _STLP_DO_SQRT(_Tp) _STLP_VENDOR_CSTD::sqrt -# define _STLP_DO_TAN(_Tp) _STLP_VENDOR_CSTD::tan -# define _STLP_DO_TANH(_Tp) _STLP_VENDOR_CSTD::tanh -# define _STLP_DO_EXP(_Tp) _STLP_VENDOR_CSTD::exp -# define _STLP_DO_HYPOT(_Tp) ::hypot -# endif - -_STLP_END_NAMESPACE - -# if (defined (_STLP_HAS_NO_NEW_C_HEADERS) || defined(_STLP_MSVC) || defined (__ICL)) && !defined (_STLP_HAS_NO_NAMESPACES) - -#if (! defined (_STLP_USE_NEW_C_HEADERS)) && ! defined (_STLP_VXWORKS_TORNADO) -_STLP_BEGIN_NAMESPACE - -# ifndef _STLP_HAS_NATIVE_FLOAT_ABS -inline double abs(double __x) { return _STLP_DO_ABS(double)(__x); } -inline float abs (float __x) { return _STLP_DO_ABS(float)(__x); } -# endif - -#if ( defined (__SYMBIAN32__) || defined (__WINS__)) -inline double pow(double __x, int __y) { return _STLP_DO_POW(double)(__x, __y); } -inline float acos (float __x) { return _STLP_DO_ACOS(float)(__x); } -inline float asin (float __x) { return _STLP_DO_ASIN(float)(__x); } -inline float atan (float __x) { return _STLP_DO_ATAN(float)(__x); } -inline float atan2(float __x, float __y) { return _STLP_DO_ATAN2(float)(__x, __y); } -inline float ceil (float __x) { return _STLP_DO_CEIL(float)(__x); } -inline float cos (float __x) { return _STLP_DO_COS(float)(__x); } -inline float cosh (float __x) { return _STLP_DO_COSH(float)(__x); } -inline float exp (float __x) { return _STLP_DO_EXP(float)(__x); } -# ifdef _STLP_USE_NAMESPACES -inline float fabs (float __x) { return _STLP_DO_ABS(float)(__x); } -# endif -inline float floor(float __x) { return _STLP_DO_FLOOR(float)(__x); } -inline float fmod (float __x, float __y) { return _STLP_DO_FMOD(float)(__x, __y); } -inline float frexp(float __x, int* __y) { return _STLP_DO_FREXP(float)(__x, __y); } -inline float ldexp(float __x, int __y) { return _STLP_DO_LDEXP(float)(__x, __y); } -// fbp : float versions are not always available -#if !defined(_STLP_VENDOR_LONG_DOUBLE_MATH) //*ty 11/25/2001 - -inline float modf (float __x, float* __y) { - #ifndef __SYMBIAN32__ - double __dd[2]; - double __res = _STLP_DO_MODF(double)((double)__x, __dd); - __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; - return (float)__res; -#else - float f = modff(__x, __y); - return f; -#endif -} -#else //*ty 11/25/2001 - i.e. for apple SCpp -inline float modf (float __x, float* __y) { - long double __dd[2]; - long double __res = _STLP_DO_MODF(long double)((long double)__x, __dd); - __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; - return (float)__res; -} -#endif //*ty 11/25/2001 - - -inline float log (float __x) { return _STLP_DO_LOG(float)(__x); } -inline float log10(float __x) { return _STLP_DO_LOG10(float)(__x); } -inline float pow (float __x, float __y) { return _STLP_DO_POW(float)(__x, __y); } -inline float pow (float __x, int __y) { return _STLP_DO_POW(float)(__x, __y); } -inline float sin (float __x) { return _STLP_DO_SIN(float)(__x); } -inline float sinh (float __x) { return _STLP_DO_SINH(float)(__x); } -inline float sqrt (float __x) { return _STLP_DO_SQRT(float)(__x); } -inline float tan (float __x) { return _STLP_DO_TAN(float)(__x); } -inline float tanh (float __x) { return _STLP_DO_TANH(float)(__x); } - -# if ! (defined (_STLP_NO_LONG_DOUBLE) || defined(_STLP_VENDOR_LONG_DOUBLE_MATH)) - -#if !( defined (__MVS__) || defined (_STLP_HAS_NATIVE_FLOAT_ABS)) -inline long double abs (long double __x) { return _STLP_DO_ABS(long double)((double)__x); } -#endif -inline long double acos (long double __x) { return _STLP_DO_ACOS(long double)(__x); } -inline long double asin (long double __x) { return _STLP_DO_ASIN(long double)(__x); } -inline long double atan (long double __x) { return _STLP_DO_ATAN(long double)(__x); } -inline long double atan2(long double __x, long double __y) { return _STLP_DO_ATAN2(long double)(__x, __y); } -inline long double ceil (long double __x) { return _STLP_DO_CEIL(long double)(__x); } -inline long double cos (long double __x) { return _STLP_DO_COS(long double)(__x); } -inline long double cosh (long double __x) { return _STLP_DO_COSH(long double)(__x); } -inline long double exp (long double __x) { return _STLP_DO_EXP(long double)(__x); } -inline long double fabs (long double __x) { return _STLP_DO_ABS(long double)(__x); } -inline long double floor(long double __x) { return _STLP_DO_FLOOR(long double)(__x); } -inline long double fmod (long double __x, long double __y) { return _STLP_DO_FMOD(long double)(__x, __y); } -inline long double frexp(long double __x, int* __y) { return _STLP_DO_FREXP(long double)(__x, __y); } -inline long double ldexp(long double __x, int __y) { return _STLP_DO_LDEXP(long double)(__x, __y); } -// fbp : long double versions are not available -inline long double modf (long double __x, long double* __y) { - double __dd[2]; - double __res = _STLP_DO_MODF(double)((double)__x, __dd); - __y[0] = (long double)__dd[0] ; __y[1] = (long double)__dd[1]; - return (long double)__res; -} -inline long double log (long double __x) { return _STLP_DO_LOG(long double)(__x); } -inline long double log10(long double __x) { return _STLP_DO_LOG10(long double)(__x); } -inline long double pow (long double __x, long double __y) { return _STLP_DO_POW(long double)(__x, __y); } -inline long double pow (long double __x, int __y) { return _STLP_DO_POW(long double)(__x, __y); } -inline long double sin (long double __x) { return _STLP_DO_SIN(long double)(__x); } -inline long double sinh (long double __x) { return _STLP_DO_SINH(long double)(__x); } -inline long double sqrt (long double __x) { return _STLP_DO_SQRT(long double)(__x); } -inline long double tan (long double __x) { return _STLP_DO_TAN(long double)(__x); } -inline long double tanh (long double __x) { return _STLP_DO_TANH(long double)(__x); } -#endif -#endif - -_STLP_END_NAMESPACE - -# endif /* NEW_C_HEADERS */ -# endif /* NEW_C_HEADERS */ - -#endif /* CMATH_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_codecvt.h --- a/epoc32/include/stdapis/stlport/stl/_codecvt.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,323 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_CODECVT_H -#define _STLP_INTERNAL_CODECVT_H - -# ifndef _STLP_C_LOCALE_H -# include -# endif -# ifndef _STLP_INTERNAL_LOCALE_H -# include -# endif - -_STLP_BEGIN_NAMESPACE - -class _STLP_CLASS_DECLSPEC codecvt_base { -public: - enum result {ok, partial, error, noconv}; -}; - -template -class codecvt : public locale::facet, public codecvt_base { - typedef _InternT intern_type; - typedef _ExternT extern_type; - typedef _StateT state_type; -}; - -template -class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> {}; - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class codecvt : public locale::facet, public codecvt_base -#else -class _STLP_CLASS_DECLSPEC codecvt : public locale::facet, public codecvt_base -#endif -{ - friend class _Locale; -public: - typedef char intern_type; - typedef char extern_type; - typedef mbstate_t state_type; - - explicit codecvt(size_t __refs = 0) : _BaseFacet(__refs) {} - - result out(state_type& __state, - const char* __from, - const char* __from_end, - const char*& __from_next, - char* __to, - char* __to_limit, - char*& __to_next) const { - return do_out(__state, - __from, __from_end, __from_next, - __to, __to_limit, __to_next); - } - - result unshift(mbstate_t& __state, - char* __to, char* __to_limit, char*& __to_next) const - { return do_unshift(__state, __to, __to_limit, __to_next); } - - result in(state_type& __state, - const char* __from, - const char* __from_end, - const char*& __from_next, - char* __to, - char* __to_limit, - char*& __to_next) const { - return do_in(__state, - __from, __from_end, __from_next, - __to, __to_limit, __to_next); - } - - int encoding() const _STLP_NOTHROW { return do_encoding(); } - - bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); } - - int length(const state_type& __state, - const char* __from, const char* __end, - size_t __max) const - { return do_length(__state, __from, __end, __max); } - - int max_length() const _STLP_NOTHROW { return do_max_length(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: -_STLP_DECLSPEC ~codecvt(); - - _STLP_DECLSPEC virtual result do_out(mbstate_t& /* __state */, - const char* __from, - const char* /* __from_end */, - const char*& __from_next, - char* __to, - char* /* __to_limit */, - char*& __to_next) const; - - _STLP_DECLSPEC virtual result do_in (mbstate_t& /* __state */ , - const char* __from, - const char* /* __from_end */, - const char*& __from_next, - char* __to, - char* /* __to_end */, - char*& __to_next) const; - - _STLP_DECLSPEC virtual result do_unshift(mbstate_t& /* __state */, - char* __to, - char* /* __to_limit */, - char*& __to_next) const; - - _STLP_DECLSPEC virtual int do_encoding() const _STLP_NOTHROW; - _STLP_DECLSPEC virtual bool do_always_noconv() const _STLP_NOTHROW; - _STLP_DECLSPEC virtual int do_length(const mbstate_t& __state, - const char* __from, - const char* __end, - size_t __max) const; - _STLP_DECLSPEC virtual int do_max_length() const _STLP_NOTHROW; -private: - codecvt(const codecvt&); - codecvt& operator =(const codecvt&); -}; - -# ifndef _STLP_NO_WCHAR_T - -_STLP_TEMPLATE_NULL -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -class codecvt : public locale::facet, public codecvt_base -#else -class _STLP_CLASS_DECLSPEC codecvt : public locale::facet, public codecvt_base -#endif -{ - friend class _Locale; -public: - typedef wchar_t intern_type; - typedef char extern_type; - typedef mbstate_t state_type; - - explicit codecvt(size_t __refs = 0) : _BaseFacet(__refs) {} - - result out(mbstate_t& __state, - const wchar_t* __from, - const wchar_t* __from_end, - const wchar_t*& __from_next, - char* __to, - char* __to_limit, - char*& __to_next) const { - return do_out(__state, - __from, __from_end, __from_next, - __to, __to_limit, __to_next); - } - - result unshift(mbstate_t& __state, - char* __to, char* __to_limit, char*& __to_next) const { - return do_unshift(__state, __to, __to_limit, __to_next); - } - - result in(mbstate_t& __state, - const char* __from, - const char* __from_end, - const char*& __from_next, - wchar_t* __to, - wchar_t* __to_limit, - wchar_t*& __to_next) const { - return do_in(__state, - __from, __from_end, __from_next, - __to, __to_limit, __to_next); - } - - int encoding() const _STLP_NOTHROW { return do_encoding(); } - - bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); } - - int length(const mbstate_t& __state, - const char* __from, - const char* __end, - size_t __max) const - { return do_length(__state, __from, __end, __max); } - - int max_length() const _STLP_NOTHROW { return do_max_length(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - _STLP_DECLSPEC ~codecvt(); - - _STLP_DECLSPEC virtual result do_out(mbstate_t& __state, - const wchar_t* __from, - const wchar_t* __from_end, - const wchar_t*& __from_next, - char* __to, - char* __to_limit, - char*& __to_next) const; - - _STLP_DECLSPEC virtual result do_in (mbstate_t& __state, - const char* __from, - const char* __from_end, - const char*& __from_next, - wchar_t* __to, - wchar_t* __to_limit, - wchar_t*& __to_next) const; - - _STLP_DECLSPEC virtual result do_unshift(mbstate_t& __state, - char* __to, - char* __to_limit, - char*& __to_next) const; - - _STLP_DECLSPEC virtual int do_encoding() const _STLP_NOTHROW; - - _STLP_DECLSPEC virtual bool do_always_noconv() const _STLP_NOTHROW; - - _STLP_DECLSPEC virtual int do_length(const mbstate_t& __state, - const char* __from, - const char* __end, - size_t __max) const; - - _STLP_DECLSPEC virtual int do_max_length() const _STLP_NOTHROW; - -private: - codecvt(const codecvt&); - codecvt& operator = (const codecvt&); -}; - -# endif - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC codecvt_byname - : public codecvt { -public: - explicit _STLP_DECLSPEC codecvt_byname(const char* __name, size_t __refs = 0); - ~codecvt_byname(); -private: - codecvt_byname(const codecvt_byname&); - codecvt_byname& operator =(const codecvt_byname&); -}; - -# ifndef _STLP_NO_WCHAR_T -_STLP_TEMPLATE_NULL -class codecvt_byname - : public codecvt -{ -public: - explicit _STLP_DECLSPEC codecvt_byname(const char * __name, size_t __refs = 0); - -protected: - _STLP_DECLSPEC ~codecvt_byname(); - - _STLP_DECLSPEC virtual result do_out(mbstate_t& __state, - const wchar_t* __from, - const wchar_t* __from_end, - const wchar_t*& __from_next, - char* __to, - char* __to_limit, - char*& __to_next) const; - - _STLP_DECLSPEC virtual result do_in (mbstate_t& __state, - const char* __from, - const char* __from_end, - const char*& __from_next, - wchar_t* __to, - wchar_t* __to_limit, - wchar_t*& __to_next) const; - - _STLP_DECLSPEC virtual result do_unshift(mbstate_t& __state, - char* __to, - char* __to_limit, - char*& __to_next) const; - - _STLP_DECLSPEC virtual int do_encoding() const _STLP_NOTHROW; - - _STLP_DECLSPEC virtual bool do_always_noconv() const _STLP_NOTHROW; - - _STLP_DECLSPEC virtual int do_length(const mbstate_t& __state, - const char* __from, - const char* __end, - size_t __max) const; - - _STLP_DECLSPEC virtual int do_max_length() const _STLP_NOTHROW; - -private: - _Locale_ctype* _M_ctype; - codecvt_byname(const codecvt_byname&); - codecvt_byname& operator =(const codecvt_byname&); -}; - -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_CODECVT_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_collate.h --- a/epoc32/include/stdapis/stlport/stl/_collate.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,204 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - -#ifndef _STLP_INTERNAL_COLLATE_H -#define _STLP_INTERNAL_COLLATE_H - -#ifndef _STLP_C_LOCALE_H -# include -#endif - -#ifndef _STLP_INTERNAL_LOCALE_H -# include -#endif - -#ifndef _STLP_STRING_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - - -template class collate {}; -template class collate_byname {}; - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class collate : public locale::facet -#else -class _STLP_CLASS_DECLSPEC collate : public locale::facet -#endif -{ - friend class _Locale; -public: - typedef char char_type; - typedef string string_type; - - explicit collate(size_t __refs = 0) : _BaseFacet(__refs) {} - - int compare(const char* __low1, const char* __high1, - const char* __low2, const char* __high2) const { - return do_compare( __low1, __high1, __low2, __high2); - } - - string_type transform(const char* __low, const char* __high) const { - return do_transform(__low, __high); - } - - long hash(const char* __low, const char* __high) const - { return do_hash(__low, __high); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: -_STLP_DECLSPEC ~collate(); - -_STLP_DECLSPEC virtual int do_compare(const char*, const char*, - const char*, const char*) const; -_STLP_DECLSPEC virtual string_type do_transform(const char*, const char*) const; -_STLP_DECLSPEC virtual long do_hash(const char*, const char*) const; -private: - collate(const collate&); - collate& operator =(const collate&); -}; - -# ifndef _STLP_NO_WCHAR_T - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class collate : public locale::facet -#else -class _STLP_CLASS_DECLSPEC collate : public locale::facet -#endif -{ - friend class _Locale; -public: - typedef wchar_t char_type; - typedef wstring string_type; - - explicit collate(size_t __refs = 0) : _BaseFacet(__refs) {} - - int compare(const wchar_t* __low1, const wchar_t* __high1, - const wchar_t* __low2, const wchar_t* __high2) const { - return do_compare( __low1, __high1, __low2, __high2); - } - - string_type transform(const wchar_t* __low, const wchar_t* __high) const { - return do_transform(__low, __high); - } - - long hash(const wchar_t* __low, const wchar_t* __high) const - { return do_hash(__low, __high); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: -_STLP_DECLSPEC ~collate(); - -_STLP_DECLSPEC virtual int do_compare(const wchar_t*, const wchar_t*, - const wchar_t*, const wchar_t*) const; -_STLP_DECLSPEC virtual string_type do_transform(const wchar_t*, const wchar_t*) const; -_STLP_DECLSPEC virtual long do_hash(const wchar_t* __low, const wchar_t* __high) const; -private: - collate(const collate&); - collate& operator = (const collate&); -}; - -# endif /* NO_WCHAR_T */ - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC collate_byname: public collate -{ -public: - explicit _STLP_DECLSPEC collate_byname(const char* __name, size_t __refs = 0); - -protected: -_STLP_DECLSPEC ~collate_byname(); - -_STLP_DECLSPEC virtual int do_compare(const char*, const char*, - const char*, const char*) const; -_STLP_DECLSPEC virtual string_type do_transform(const char*, const char*) const; - -private: - _Locale_collate* _M_collate; - collate_byname(const collate_byname&); - collate_byname& operator =(const collate_byname&); -}; - -# ifndef _STLP_NO_WCHAR_T - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC collate_byname: public collate -{ -public: - explicit _STLP_DECLSPEC collate_byname(const char * __name, size_t __refs = 0); - -protected: -_STLP_DECLSPEC ~collate_byname(); - -_STLP_DECLSPEC virtual int do_compare(const wchar_t*, const wchar_t*, - const wchar_t*, const wchar_t*) const; -_STLP_DECLSPEC virtual string_type do_transform(const wchar_t*, const wchar_t*) const; - -private: - _Locale_collate* _M_collate; - collate_byname(const collate_byname&); - collate_byname& operator =(const collate_byname&); -}; - -# endif /* NO_WCHAR_T */ - - -template -bool -__locale_do_operator_call (const locale* __that, - const basic_string<_CharT, _Traits, _Alloc >& __x, - const basic_string<_CharT, _Traits, _Alloc >& __y) -{ -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - collate<_CharT>* __f = (collate<_CharT>*)__that->_M_get_facet(collate<_CharT>::GetFacetLocaleId()); -#else - collate<_CharT>* __f = (collate<_CharT>*)__that->_M_get_facet(collate<_CharT>::id); -#endif - if (!__f) - __that->_M_throw_runtime_error(); - return __f->compare(__x.data(), __x.data() + __x.size(), - __y.data(), __y.data() + __y.size()) < 0; - -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_COLLATE_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_complex.c --- a/epoc32/include/stdapis/stlport/stl/_complex.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_COMPLEX_C -#define _STLP_COMPLEX_C - -# ifndef _STLP_internal_complex_h -# include -# endif - -#include - -#ifdef _STLP_USE_NEW_IOSTREAMS -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// Non-inline member functions. - -template -void complex<_Tp>::_div(const _Tp& __z1_r, const _Tp& __z1_i, - const _Tp& __z2_r, const _Tp& __z2_i, - _Tp& __res_r, _Tp& __res_i) { - _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r; - _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i; - - if (__ar <= __ai) { - _Tp __ratio = __z2_r / __z2_i; - _Tp __denom = __z2_i * (1 + __ratio * __ratio); - __res_r = (__z1_r * __ratio + __z1_i) / __denom; - __res_i = (__z1_i * __ratio - __z1_r) / __denom; - } - else { - _Tp __ratio = __z2_i / __z2_r; - _Tp __denom = __z2_r * (1 + __ratio * __ratio); - __res_r = (__z1_r + __z1_i * __ratio) / __denom; - __res_i = (__z1_i - __z1_r * __ratio) / __denom; - } -} - -template -void complex<_Tp>::_div(const _Tp& __z1_r, - const _Tp& __z2_r, const _Tp& __z2_i, - _Tp& __res_r, _Tp& __res_i) { - _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r; - _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i; - - if (__ar <= __ai) { - _Tp __ratio = __z2_r / __z2_i; - _Tp __denom = __z2_i * (1 + __ratio * __ratio); - __res_r = (__z1_r * __ratio) / __denom; - __res_i = - __z1_r / __denom; - } - else { - _Tp __ratio = __z2_i / __z2_r; - _Tp __denom = __z2_r * (1 + __ratio * __ratio); - __res_r = __z1_r / __denom; - __res_i = - (__z1_r * __ratio) / __denom; - } -} - -// I/O. - -#ifdef _STLP_USE_NEW_IOSTREAMS - -// Complex output, in the form (re,im). We use a two-step process -// involving stringstream so that we get the padding right. -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z) -{ - basic_ostringstream<_CharT, _Traits, allocator<_CharT> > __tmp; - __tmp.flags(__os.flags()); - __tmp.imbue(__os.getloc()); - __tmp.precision(__os.precision()); - __tmp << '(' << __z.real() << ',' << __z.imag() << ')'; - return __os << __tmp.str(); -} - -// Complex input from arbitrary streams. Note that results in some -// locales may be confusing, since the decimal character varies with -// locale and the separator between real and imaginary parts does not. - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z) -{ - _Tp __re = 0; - _Tp __im = 0; - - // typedef ctype<_CharT> _Ctype; - // locale __loc = __is.getloc(); - //const _Ctype& __c_type = use_facet<_Ctype>(__loc); - const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__is._M_ctype_facet(); - - char __punct[4] = "(,)"; - _CharT __wpunct[3]; - __c_type.widen(__punct, __punct + 3, __wpunct); - - _CharT __c; - - __is >> __c; - if (_Traits::eq(__c, __wpunct[0])) { // Left paren - __is >> __re >> __c; - if (_Traits::eq(__c, __wpunct[1])) // Comma - __is >> __im >> __c; - if (!_Traits::eq(__c, __wpunct[2])) // Right paren - __is.setstate(ios_base::failbit); - } - else { - __is.putback(__c); - __is >> __re; - } - - if (__is) - __z = complex<_Tp>(__re, __im); - return __is; -} - - -#else /* _STLP_USE_NEW_IOSTREAMS */ - -template -ostream& _STLP_CALL operator<<(ostream& s, const complex<_Tp>& __z) -{ - return s << "( " << __z._M_re <<", " << __z._M_im <<")"; -} - -template -istream& _STLP_CALL operator>>(istream& s, complex<_Tp>& a) -{ - _Tp re = 0, im = 0; - char c = 0; - - s >> c; - if (c == '(') { - s >> re >> c; - if (c == ',') s >> im >> c; - if (c != ')') s.clear(ios::badbit); - } - else { - s.putback(c); - s >> re; - } - - if (s) a = complex<_Tp>(re, im); - return s; -} - -#endif /* _STLP_USE_NEW_IOSTREAMS */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_COMPLEX_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_complex.h --- a/epoc32/include/stdapis/stlport/stl/_complex.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1013 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_internal_complex_h -#define _STLP_internal_complex_h - -// This header declares the template class complex, as described in -// in the draft C++ standard. Single-precision complex numbers -// are complex, double-precision are complex, and -// quad precision are complex. - -// Note that the template class complex is declared within namespace -// std, as called for by the draft C++ standard. - -#include -#include - -_STLP_BEGIN_NAMESPACE - -#if !defined(_STLP_NO_COMPLEX_SPECIALIZATIONS) //*TY 02/25/2000 - added for MPW compiler workaround - -template struct complex; - -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex; -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex; -# ifndef _STLP_NO_LONG_DOUBLE -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex; -# endif -# endif - -template -struct complex { - typedef _Tp value_type; - typedef complex<_Tp> _Self; - - // Constructors, destructor, assignment operator. - complex() : _M_re(0), _M_im(0) {} - complex(const value_type& __x) - : _M_re(__x), _M_im(0) {} - complex(const value_type& __x, const value_type& __y) - : _M_re(__x), _M_im(__y) {} - complex(const _Self& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} - - _Self& operator=(const _Self& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - -#if defined (_STLP_MEMBER_TEMPLATES) && ( defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) || defined(_STLP_NO_COMPLEX_SPECIALIZATIONS)) - template - explicit complex(const complex<_Tp2>& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} - - template - _Self& operator=(const complex<_Tp2>& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } -#endif /* _STLP_MEMBER_TEMPLATES */ - - // Element access. - value_type real() const { return _M_re; } - value_type imag() const { return _M_im; } - - // Arithmetic op= operations involving one real argument. - - _Self& operator= (const value_type& __x) { - _M_re = __x; - _M_im = 0; - return *this; - } - _Self& operator+= (const value_type& __x) { - _M_re += __x; - return *this; - } - _Self& operator-= (const value_type& __x) { - _M_re -= __x; - return *this; - } - _Self& operator*= (const value_type& __x) { - _M_re *= __x; - _M_im *= __x; - return *this; - } - _Self& operator/= (const value_type& __x) { - _M_re /= __x; - _M_im /= __x; - return *this; - } - - // Arithmetic op= operations involving two complex arguments. - - static void _STLP_CALL _div(const value_type& __z1_r, const value_type& __z1_i, - const value_type& __z2_r, const value_type& __z2_i, - value_type& __res_r, value_type& __res_i); - - static void _STLP_CALL _div(const value_type& __z1_r, - const value_type& __z2_r, const value_type& __z2_i, - value_type& __res_r, value_type& __res_i); - -#if defined ( _STLP_MEMBER_TEMPLATES ) // && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) - - template _Self& operator+= (const complex<_Tp2>& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - template _Self& operator-= (const complex<_Tp2>& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - template _Self& operator*= (const complex<_Tp2>& __z) { - value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; - value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - template _Self& operator/= (const complex<_Tp2>& __z) { - value_type __r; - value_type __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - -#endif /* _STLP_MEMBER_TEMPLATES */ - - _Self& operator+= (const _Self& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - _Self& operator-= (const _Self& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - _Self& operator*= (const _Self& __z) { - value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; - value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - _Self& operator/= (const _Self& __z) { - value_type __r; - value_type __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - - // Data members. - value_type _M_re; - value_type _M_im; -}; - -#if !defined(_STLP_NO_COMPLEX_SPECIALIZATIONS) //*TY 02/25/2000 - added for MPW compiler workaround -// Explicit specializations for float, double, long double. The only -// reason for these specializations is to enable automatic conversions -// from complex to complex, and complex to -// complex. - - -_STLP_TEMPLATE_NULL -struct _STLP_CLASS_DECLSPEC complex { - typedef float value_type; - typedef complex _Self; - // Constructors, destructor, assignment operator. - - complex(value_type __x = 0.0, value_type __y = 0.0) - : _M_re(__x), _M_im(__y) {} - - complex(const complex& __z) : _M_re(__z._M_re), _M_im(__z._M_im) {} - - inline explicit complex(const complex& __z); -# ifndef _STLP_NO_LONG_DOUBLE - inline explicit complex(const complex& __z); -# endif - // Element access. - value_type real() const { return _M_re; } - value_type imag() const { return _M_im; } - - // Arithmetic op= operations involving one real argument. - - _Self& operator= (value_type __x) { - _M_re = __x; - _M_im = 0; - return *this; - } - _Self& operator+= (value_type __x) { - _M_re += __x; - return *this; - } - _Self& operator-= (value_type __x) { - _M_re -= __x; - return *this; - } - _Self& operator*= (value_type __x) { - _M_re *= __x; - _M_im *= __x; - return *this; - } - _Self& operator/= (value_type __x) { - _M_re /= __x; - _M_im /= __x; - return *this; - } - - // Arithmetic op= operations involving two complex arguments. - - _STLP_DECLSPEC static void _STLP_CALL _div(const float& __z1_r, const float& __z1_i, - const float& __z2_r, const float& __z2_i, - float& __res_r, float& __res_i); - - _STLP_DECLSPEC static void _STLP_CALL _div(const float& __z1_r, - const float& __z2_r, const float& __z2_i, - float& __res_r, float& __res_i); - -#if defined (_STLP_MEMBER_TEMPLATES) - - template - complex& operator=(const complex<_Tp2>& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - - template - complex& operator+= (const complex<_Tp2>& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - template - complex& operator-= (const complex<_Tp2>& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - template - complex& operator*= (const complex<_Tp2>& __z) { - float __r = _M_re * __z._M_re - _M_im * __z._M_im; - float __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - template - complex& operator/= (const complex<_Tp2>& __z) { - float __r; - float __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - -#endif /* _STLP_MEMBER_TEMPLATES */ - - _Self& operator=(const _Self& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - - _Self& operator+= (const _Self& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - _Self& operator-= (const _Self& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - _Self& operator*= (const _Self& __z) { - value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; - value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - _Self& operator/= (const _Self& __z) { - value_type __r; - value_type __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - - // Data members. - value_type _M_re; - value_type _M_im; -}; - -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex { - typedef double value_type; - typedef complex _Self; - - // Constructors, destructor, assignment operator. - - complex(value_type __x = 0.0, value_type __y = 0.0) - : _M_re(__x), _M_im(__y) {} - - complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} - inline complex(const complex& __z); -# ifndef _STLP_NO_LONG_DOUBLE - explicit inline complex(const complex& __z); -# endif - // Element access. - value_type real() const { return _M_re; } - value_type imag() const { return _M_im; } - - // Arithmetic op= operations involving one real argument. - - _Self& operator= (value_type __x) { - _M_re = __x; - _M_im = 0; - return *this; - } - _Self& operator+= (value_type __x) { - _M_re += __x; - return *this; - } - _Self& operator-= (value_type __x) { - _M_re -= __x; - return *this; - } - _Self& operator*= (value_type __x) { - _M_re *= __x; - _M_im *= __x; - return *this; - } - _Self& operator/= (value_type __x) { - _M_re /= __x; - _M_im /= __x; - return *this; - } - - // Arithmetic op= operations involving two complex arguments. - - _STLP_DECLSPEC static void _STLP_CALL _div(const double& __z1_r, const double& __z1_i, - const double& __z2_r, const double& __z2_i, - double& __res_r, double& __res_i); - _STLP_DECLSPEC static void _STLP_CALL _div(const double& __z1_r, - const double& __z2_r, const double& __z2_i, - double& __res_r, double& __res_i); - -#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) - - template - complex& operator=(const complex<_Tp2>& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - - template - complex& operator+= (const complex<_Tp2>& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - template - complex& operator-= (const complex<_Tp2>& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - template - complex& operator*= (const complex<_Tp2>& __z) { - double __r = _M_re * __z._M_re - _M_im * __z._M_im; - double __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - template - complex& operator/= (const complex<_Tp2>& __z) { - double __r; - double __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - -#endif /* _STLP_MEMBER_TEMPLATES */ - - _Self& operator=(const _Self& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - - _Self& operator+= (const _Self& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - _Self& operator-= (const _Self& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - _Self& operator*= (const _Self& __z) { - value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; - value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - _Self& operator/= (const _Self& __z) { - value_type __r; - value_type __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - - // Data members. - value_type _M_re; - value_type _M_im; -}; - -# ifndef _STLP_NO_LONG_DOUBLE - -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex { - typedef long double value_type; - typedef complex _Self; - - // Constructors, destructor, assignment operator. - complex(value_type __x = 0.0, value_type __y = 0.0) - : _M_re(__x), _M_im(__y) {} - - complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} - inline complex(const complex& __z); - inline complex(const complex& __z); - - // Element access. - value_type real() const { return _M_re; } - value_type imag() const { return _M_im; } - - // Arithmetic op= operations involving one real argument. - - _Self& operator= (value_type __x) { - _M_re = __x; - _M_im = 0; - return *this; - } - _Self& operator+= (value_type __x) { - _M_re += __x; - return *this; - } - _Self& operator-= (value_type __x) { - _M_re -= __x; - return *this; - } - _Self& operator*= (value_type __x) { - _M_re *= __x; - _M_im *= __x; - return *this; - } - _Self& operator/= (value_type __x) { - _M_re /= __x; - _M_im /= __x; - return *this; - } - - // Arithmetic op= operations involving two complex arguments. - - _STLP_DECLSPEC static void _STLP_CALL _div(const long double& __z1_r, const long double& __z1_i, - const long double& __z2_r, const long double& __z2_i, - long double& __res_r, long double& __res_i); - - _STLP_DECLSPEC static void _STLP_CALL _div(const long double& __z1_r, - const long double& __z2_r, const long double& __z2_i, - long double& __res_r, long double& __res_i); - -#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) - - template - complex& operator=(const complex<_Tp2>& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - - template - complex& operator+= (const complex<_Tp2>& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - template - complex& operator-= (const complex<_Tp2>& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - template - complex& operator*= (const complex<_Tp2>& __z) { - long double __r = _M_re * __z._M_re - _M_im * __z._M_im; - long double __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - template - complex& operator/= (const complex<_Tp2>& __z) { - long double __r; - long double __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - -#endif /* _STLP_MEMBER_TEMPLATES */ - - _Self& operator=(const _Self& __z) { - _M_re = __z._M_re; - _M_im = __z._M_im; - return *this; - } - - _Self& operator+= (const _Self& __z) { - _M_re += __z._M_re; - _M_im += __z._M_im; - return *this; - } - - _Self& operator-= (const _Self& __z) { - _M_re -= __z._M_re; - _M_im -= __z._M_im; - return *this; - } - - _Self& operator*= (const _Self& __z) { - value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; - value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; - _M_re = __r; - _M_im = __i; - return *this; - } - - _Self& operator/= (const _Self& __z) { - value_type __r; - value_type __i; - _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); - _M_re = __r; - _M_im = __i; - return *this; - } - - // Data members. - value_type _M_re; - value_type _M_im; -}; - -# endif /* _STLP_NO_LONG_DOUBLE */ - -// Converting constructors from one of these three specialized types -// to another. - -inline complex::complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} -inline complex::complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} -# ifndef _STLP_NO_LONG_DOUBLE -inline complex::complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} -inline complex::complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} -inline complex::complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} -inline complex::complex(const complex& __z) - : _M_re(__z._M_re), _M_im(__z._M_im) {} -# endif - -# endif /* SPECIALIZATIONS */ - -// Unary non-member arithmetic operators. - -template -inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z) { - return __z; -} - -template -inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z) { - return complex<_Tp>(-__z._M_re, -__z._M_im); -} - -// Non-member arithmetic operations involving one real argument. - -template -inline complex<_Tp> _STLP_CALL operator+(const _Tp& __x, const complex<_Tp>& __z) { - return complex<_Tp>(__x + __z._M_re, __z._M_im); -} - -template -inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z, const _Tp& __x) { - return complex<_Tp>(__z._M_re + __x, __z._M_im); -} - -template -inline complex<_Tp> _STLP_CALL operator-(const _Tp& __x, const complex<_Tp>& __z) { - return complex<_Tp>(__x - __z._M_re, -__z._M_im); -} - -template -inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z, const _Tp& __x) { - return complex<_Tp>(__z._M_re - __x, __z._M_im); -} - -template -inline complex<_Tp> _STLP_CALL operator*(const _Tp& __x, const complex<_Tp>& __z) { - return complex<_Tp>(__x * __z._M_re, __x * __z._M_im); -} - -template -inline complex<_Tp> _STLP_CALL operator*(const complex<_Tp>& __z, const _Tp& __x) { - return complex<_Tp>(__z._M_re * __x, __z._M_im * __x); -} - -template -inline complex<_Tp> _STLP_CALL operator/(const _Tp& __x, const complex<_Tp>& __z) { - complex<_Tp> __result; - complex<_Tp>::_div(__x, - __z._M_re, __z._M_im, - __result._M_re, __result._M_im); - return __result; -} - -template -inline complex<_Tp> _STLP_CALL operator/(const complex<_Tp>& __z, const _Tp& __x) { - return complex<_Tp>(__z._M_re / __x, __z._M_im / __x); -} - -// Non-member arithmetic operations involving two complex arguments - -template -inline complex<_Tp> _STLP_CALL -operator+(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { - return complex<_Tp>(__z1._M_re + __z2._M_re, __z1._M_im + __z2._M_im); -} - -template -inline complex<_Tp> _STLP_CALL -operator-(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { - return complex<_Tp>(__z1._M_re - __z2._M_re, __z1._M_im - __z2._M_im); -} - -template -inline complex<_Tp> _STLP_CALL -operator*(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { - return complex<_Tp>(__z1._M_re * __z2._M_re - __z1._M_im * __z2._M_im, - __z1._M_re * __z2._M_im + __z1._M_im * __z2._M_re); -} - -template -inline complex<_Tp> _STLP_CALL -operator/(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { - complex<_Tp> __result; - complex<_Tp>::_div(__z1._M_re, __z1._M_im, - __z2._M_re, __z2._M_im, - __result._M_re, __result._M_im); - return __result; -} - -// Comparison operators. - -template -inline bool _STLP_CALL operator==(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { - return __z1._M_re == __z2._M_re && __z1._M_im == __z2._M_im; -} - -template -inline bool _STLP_CALL operator==(const complex<_Tp>& __z, const _Tp& __x) { - return __z._M_re == __x && __z._M_im == 0; -} - -template -inline bool _STLP_CALL operator==(const _Tp& __x, const complex<_Tp>& __z) { - return __x == __z._M_re && 0 == __z._M_im; -} - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER - -template -inline bool _STLP_CALL operator!=(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { - return __z1._M_re != __z2._M_re || __z1._M_im != __z2._M_im; -} - -#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ - -template -inline bool _STLP_CALL operator!=(const complex<_Tp>& __z, const _Tp& __x) { - return __z._M_re != __x || __z._M_im != 0; -} - -template -inline bool _STLP_CALL operator!=(const _Tp& __x, const complex<_Tp>& __z) { - return __x != __z._M_re || 0 != __z._M_im; -} - -// Other basic arithmetic operations - -template -inline _Tp _STLP_CALL real(const complex<_Tp>& __z) { - return __z._M_re; -} - -template -inline _Tp _STLP_CALL imag(const complex<_Tp>& __z) { - return __z._M_im; -} - -#ifdef __SYMBIAN32__ -template -#ifdef __WINSCW__ -_STLP_DECLSPEC -#endif -_Tp _STLP_CALL abs_tp(const complex<_Tp>&); - -template -#ifdef __WINSCW__ -_STLP_DECLSPEC -#endif -_Tp _STLP_CALL arg_tp(const complex<_Tp>&); - -template -#ifdef __WINSCW__ -_STLP_DECLSPEC -#endif -complex<_Tp> _STLP_CALL polar_tp(const _Tp& __rho, const _Tp& __phi); - -template -_Tp _STLP_CALL abs(const complex<_Tp>& __z) - { - return abs_tp(__z); - } - -template -_Tp _STLP_CALL arg(const complex<_Tp>& __z) - { - return arg_tp(__z); - } - -template -complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi) { - return polar_tp(__rho, __phi); -} - -#else -template -_Tp _STLP_CALL abs(const complex<_Tp>& __z) { - return _Tp(abs(complex(double(__z.real()), double(__z.imag())))); -} - -template -_Tp _STLP_CALL arg(const complex<_Tp>& __z) { - return _Tp(arg(complex(double(__z.real()), double(__z.imag())))); -} - -#endif - - -template -inline _Tp _STLP_CALL norm(const complex<_Tp>& __z) { - return __z._M_re * __z._M_re + __z._M_im * __z._M_im; -} - -template -inline complex<_Tp> _STLP_CALL conj(const complex<_Tp>& __z) { - return complex<_Tp>(__z._M_re, -__z._M_im); -} - -template -complex<_Tp> _STLP_CALL polar(const _Tp& __rho) { - return complex<_Tp>(__rho, 0); -} - -#ifndef __SYMBIAN32__ -template -complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi) { - complex __tmp = polar(double(__rho), double(__phi)); - return complex<_Tp>(_Tp(__tmp.real()), _Tp(__tmp.imag())); -} - - -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC float _STLP_CALL abs(const complex&); -#ifndef _STLP_COMPLEX_SPECIALIZATION_BUG -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC double _STLP_CALL abs(const complex&); -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC double _STLP_CALL arg(const complex&); -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC complex _STLP_CALL polar(const double& __rho, const double& __phi); -#endif -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC float _STLP_CALL arg(const complex&); -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC complex _STLP_CALL polar(const float& __rho, const float& __phi); - - -# ifndef _STLP_NO_LONG_DOUBLE -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC long double _STLP_CALL arg(const complex&); -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC long double _STLP_CALL abs(const complex&); -_STLP_TEMPLATE_NULL -_STLP_DECLSPEC complex _STLP_CALL polar(const long double&, const long double&); -# endif -#endif - - -#ifdef _STLP_USE_NEW_IOSTREAMS - -// Complex output, in the form (re,im). We use a two-step process -// involving stringstream so that we get the padding right. -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z); - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z); - -// Specializations for narrow characters; lets us avoid widen. - -_STLP_OPERATOR_TEMPLATE -_STLP_DECLSPEC basic_istream >& _STLP_CALL -operator>>(basic_istream >& __is, complex& __z); - -_STLP_OPERATOR_TEMPLATE -_STLP_DECLSPEC basic_istream >& _STLP_CALL -operator>>(basic_istream >& __is, complex& __z); - - -_STLP_OPERATOR_TEMPLATE -_STLP_DECLSPEC basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __is, const complex& __z); - -_STLP_OPERATOR_TEMPLATE -_STLP_DECLSPEC basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __is, const complex& __z); - -# if ! defined (_STLP_NO_LONG_DOUBLE) -_STLP_OPERATOR_TEMPLATE -_STLP_DECLSPEC basic_istream >& _STLP_CALL -operator>>(basic_istream >& __is, complex& __z); - -_STLP_OPERATOR_TEMPLATE -_STLP_DECLSPEC basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __is, const complex& __z); - -# endif - -# if defined (_STLP_USE_TEMPLATE_EXPORT) && ! defined (_STLP_NO_WCHAR_T) - -_STLP_EXPORT_TEMPLATE basic_istream >& _STLP_CALL operator>>( - basic_istream >&, complex&); -_STLP_EXPORT_TEMPLATE basic_ostream >& _STLP_CALL operator<<( - basic_ostream >&, const complex&); -_STLP_EXPORT_TEMPLATE basic_istream >& _STLP_CALL operator>>( - basic_istream >&, complex&); -_STLP_EXPORT_TEMPLATE basic_ostream >& _STLP_CALL operator<<( - basic_ostream >&, const complex&); - -# ifndef _STLP_NO_LONG_DOUBLE -_STLP_EXPORT_TEMPLATE basic_istream >& _STLP_CALL operator>>( - basic_istream >&, complex&); -_STLP_EXPORT_TEMPLATE basic_ostream >& _STLP_CALL operator<<( - basic_ostream >&, const complex&); -# endif - -# endif /* USE_TEMPLATE_EXPORT */ - -#else /* _STLP_USE_NEW_IOSTREAMS */ - -template -ostream& _STLP_CALL operator<<(ostream& s, const complex<_Tp>& __z); - -template -istream& _STLP_CALL operator>>(istream& s, complex<_Tp>& a); - -#endif /* _STLP_USE_NEW_IOSTREAMS */ - - -// Transcendental functions. These are defined only for float, -// double, and long double. (Sqrt isn't transcendental, of course, -// but it's included in this section anyway.) - -_STLP_DECLSPEC complex _STLP_CALL sqrt(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL exp(const complex&); -_STLP_DECLSPEC complex _STLP_CALL log(const complex&); -_STLP_DECLSPEC complex _STLP_CALL log10(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, int); -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const float&); -_STLP_DECLSPEC complex _STLP_CALL pow(const float&, const complex&); -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sin(const complex&); -_STLP_DECLSPEC complex _STLP_CALL cos(const complex&); -_STLP_DECLSPEC complex _STLP_CALL tan(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sinh(const complex&); -_STLP_DECLSPEC complex _STLP_CALL cosh(const complex&); -_STLP_DECLSPEC complex _STLP_CALL tanh(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sqrt(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL exp(const complex&); -_STLP_DECLSPEC complex _STLP_CALL log(const complex&); -_STLP_DECLSPEC complex _STLP_CALL log10(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, int); -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const double&); -_STLP_DECLSPEC complex _STLP_CALL pow(const double&, const complex&); -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sin(const complex&); -_STLP_DECLSPEC complex _STLP_CALL cos(const complex&); -_STLP_DECLSPEC complex _STLP_CALL tan(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sinh(const complex&); -_STLP_DECLSPEC complex _STLP_CALL cosh(const complex&); -_STLP_DECLSPEC complex _STLP_CALL tanh(const complex&); - -# ifndef _STLP_NO_LONG_DOUBLE -_STLP_DECLSPEC complex _STLP_CALL sqrt(const complex&); -_STLP_DECLSPEC complex _STLP_CALL exp(const complex&); -_STLP_DECLSPEC complex _STLP_CALL log(const complex&); -_STLP_DECLSPEC complex _STLP_CALL log10(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, int); -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const long double&); -_STLP_DECLSPEC complex _STLP_CALL pow(const long double&, const complex&); -_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, - const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sin(const complex&); -_STLP_DECLSPEC complex _STLP_CALL cos(const complex&); -_STLP_DECLSPEC complex _STLP_CALL tan(const complex&); - -_STLP_DECLSPEC complex _STLP_CALL sinh(const complex&); -_STLP_DECLSPEC complex _STLP_CALL cosh(const complex&); -_STLP_DECLSPEC complex _STLP_CALL tanh(const complex&); -# endif - -_STLP_END_NAMESPACE - -# ifndef _STLP_LINK_TIME_INSTANTIATION -# include -# endif - -#endif /* _STLP_template_complex */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_config_compat_post.h --- a/epoc32/include/stdapis/stlport/stl/_config_compat_post.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ -//========================================== - -# define __SGI_STL_PORT _STLPORT_VERSION - -# if defined (_STLP_DEBUG) && ! defined ( __STL_DEBUG ) -# define __STL_DEBUG _STLP_DEBUG -# endif - -# if defined (_STLP_USE_NAMESPACES) -# undef __STL_USE_NAMESPACES -# define __STL_USE_NAMESPACES _STLP_USE_NAMESPACES -# endif - -# if defined (_STLP_USE_EXCEPTIONS) -# undef __STL_USE_EXCEPTIONS -# define __STL_USE_EXCEPTIONS _STLP_USE_EXCEPTIONS -# endif - -# if defined (_STLP_USE_NEW_IOSTREAMS) && ! defined ( __STL_USE_NEW_IOSTREAMS ) -# define __STL_USE_NEW_IOSTREAMS _STLP_USE_NEW_IOSTREAMS -# endif - -# if defined (_STLP_BEGIN_NAMESPACE) && ! defined ( __STL_BEGIN_NAMESPACE ) -# define __STL_BEGIN_NAMESPACE _STLP_BEGIN_NAMESPACE -# define __STL_END_NAMESPACE _STLP_END_NAMESPACE -# define __STL_VENDOR_STD _STLP_VENDOR_STD -# define __STL_VENDOR_CSTD _STLP_VENDOR_CSTD -# endif - -/* -# if defined (_STLP_XXX) && ! defined ( __STL_XXX ) -# define __STL_XXX _STLP_XXX -# endif -*/ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_construct.h --- a/epoc32/include/stdapis/stlport/stl/_construct.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_CONSTRUCT_H -#define _STLP_INTERNAL_CONSTRUCT_H - -#ifdef _STLP_USE_TRAP_LEAVE -#include -#endif // _STLP_USE_TRAP_LEAVE - -# if defined (_STLP_DEBUG_UNINITIALIZED) && ! defined (_STLP_CSTRING) -# include -# endif - -# ifndef _STLP_INTERNAL_NEW_HEADER -# include -# endif - - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG -template -inline void __destroy_aux(_Tp* __pointer, const __false_type&) { __pointer->~_Tp(); } -template -inline void __destroy_aux(_Tp* __pointer, const __true_type&) {} -# endif - -template -inline void _Destroy(_Tp* __pointer) { -# if _MSC_VER >= 1010 - __pointer; -# endif // _MSC_VER >= 1000 -# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG - typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor; - __destroy_aux(__pointer, _Trivial_destructor()); -# else -# if ( defined (__BORLANDC__) && ( __BORLANDC__ < 0x500 ) ) - __pointer->_Tp::~_Tp(); -# else - __pointer->~_Tp(); -# endif -# endif -# ifdef _STLP_DEBUG_UNINITIALIZED - memset((char*)__pointer, _STLP_SHRED_BYTE, sizeof(_Tp)); -# endif -} - -# if defined (new) -# define _STLP_NEW_REDEFINE new -# undef new -# endif - -# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG -template -inline void _Construct_aux (_T1* __p, const __false_type&) { -_STLP_PLACEMENT_NEW (__p) _T1(); -} - -template -inline void _Construct_aux (_T1* __p, const __true_type&) { -_STLP_PLACEMENT_NEW (__p) _T1(0); -} -# endif - -template -inline void _Construct(_T1* __p, const _T2& __val) { -# ifdef _STLP_DEBUG_UNINITIALIZED - memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1)); -# endif - _STLP_PLACEMENT_NEW (__p) _T1(__val); -} - -template -inline void _Construct(_T1* __p) { -# ifdef _STLP_DEBUG_UNINITIALIZED - memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1)); -# endif -# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG -typedef typename _Is_integer<_T1>::_Integral _Is_Integral; -_Construct_aux (__p, _Is_Integral() ); -# else - _STLP_PLACEMENT_NEW (__p) _T1(); -# endif -} - -# if defined(_STLP_NEW_REDEFINE) -# ifdef DEBUG_NEW -# define new DEBUG_NEW -# endif -# undef _STLP_NEW_REDEFINE -# endif - -template -_STLP_INLINE_LOOP void -__destroy_aux(_ForwardIterator __first, _ForwardIterator __last, const __false_type&) { - for ( ; __first != __last; ++__first) - _STLP_STD::_Destroy(&*__first); -} - -template -inline void __destroy_aux(_ForwardIterator, _ForwardIterator, const __true_type&) {} - -template -inline void -__destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) { - typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor; - __destroy_aux(__first, __last, _Trivial_destructor()); -} - -template -inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { - __destroy(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator)); -} - -inline void _Destroy(char*, char*) {} -# ifdef _STLP_HAS_WCHAR_T // dwa 8/15/97 -inline void _Destroy(wchar_t*, wchar_t*) {} -inline void _Destroy(const wchar_t*, const wchar_t*) {} -# endif - -# ifndef _STLP_NO_ANACHRONISMS -// -------------------------------------------------- -// Old names from the HP STL. - -template -inline void construct(_T1* __p, const _T2& __val) {_Construct(__p, __val); } -template -inline void construct(_T1* __p) { _Construct(__p); } -template -inline void destroy(_Tp* __pointer) { _STLP_STD::_Destroy(__pointer); } -template -inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { _STLP_STD::_Destroy(__first, __last); } -# endif - -#ifdef _STLP_USE_TRAP_LEAVE - -struct TCleanupOverlay -{ - TAny *vtable; - TAny *iBase; - TAny *iTop; - TAny *iNext; -}; - -template -struct _STLP_StackHelper { - static unsigned int Check( void *ptr ); - static void* _NewLC (size_t __n); -}; - -struct _STLP_StackPopper { - ~_STLP_StackPopper() { CleanupStack::Pop(); } -}; - -template -struct _STLP_Cleanup { - static void clear(TAny* __p); -}; - -# define _STLP_PUSH_CLEANUP_ITEM(_Tp, __p) CleanupStack::PushL(TCleanupItem(&_STLP_Cleanup< _Tp >::clear, (TAny*)__p)); -# define _STLP_PUSH_STACK_ITEM(_Tp, __p) _STLP_PUSH_CLEANUP_ITEM(_Tp, __p) _STLP_StackPopper __Popper; _STLP_no_unused_variable_warning( __Popper ); -# define _STLP_POP_IF_CHECK if (_STLP_StackHelper::Check(this)) CleanupStack::Pop(); -# define _STLP_POP_CLEANUP_ITEM CleanupStack::Pop(); _STLP_POP_IF_CHECK - -# define _STLP_POP_ITEM CleanupStack::Pop(); - -// to be used in complex object constructors -template -struct _STLP_StackPusher { - _STLP_StackPusher(_Tp * __p) { _STLP_PUSH_CLEANUP_ITEM(_Tp, (void*)__p) } -}; - -template -unsigned int _STLP_StackHelper<_Tp>::Check( void *ptr ) - -{ - TCleanupTrapHandler *handler = - (TCleanupTrapHandler *)User::TrapHandler(); - - CCleanup &cleanup = handler->Cleanup(); - - TCleanupOverlay *overlay = (TCleanupOverlay *)( &cleanup ); - - char *raw = (char *)(overlay->iNext) - 4; - void *topptr = *( (void **)(raw) ); - - return ( ptr == topptr ); -} - - -template -void* _STLP_StackHelper<_Tp>::_NewLC(size_t __n) { - void* __p = ::operator new (__n, ELeave) ; - // constructor will pop it back - CleanupStack::PushL(__p); - return __p; -} - -template -void _STLP_Cleanup<_Tp>::clear(TAny* __p) -{ - ((_Tp*)__p)->~_Tp(); -} - - -#else -# define _STLP_PUSH_CLEANUP_ITEM(_Tp, __p) -# define _STLP_POP_CLEANUP_ITEM -# define _STLP_PUSH_STACK_ITEM(_Tp, p) -# define _STLP_POP_ITEM -# define _STLP_POP_IF_CHECK -# define TPush TLeave -#endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_CONSTRUCT_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ctraits_fns.h --- a/epoc32/include/stdapis/stlport/stl/_ctraits_fns.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,95 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - -#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H -#define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H - -# ifndef _STLP_INTERNAL_FUNCTION_H -# include -# endif - -// This file contains a few small adapters that allow a character -// traits class to be used as a function object. - -_STLP_BEGIN_NAMESPACE - -template -struct _Eq_traits - : public binary_function -{ - bool operator()(const typename _Traits::char_type& __x, - const typename _Traits::char_type& __y) const - { return _Traits::eq(__x, __y); } -}; - -template -struct _Eq_char_bound - : public unary_function -{ - typename _Traits::char_type __val; - _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {} - bool operator()(const typename _Traits::char_type& __x) const - { return _Traits::eq(__x, __val); } -}; - -template -struct _Neq_char_bound - : public unary_function -{ - typename _Traits::char_type __val; - _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {} - bool operator()(const typename _Traits::char_type& __x) const - { return !_Traits::eq(__x, __val); } -}; - -template -struct _Eq_int_bound - : public unary_function -{ - typename _Traits::int_type __val; - - _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {} - bool operator()(const typename _Traits::char_type& __x) const - { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); } -}; - -# if 0 -template -struct _Lt_traits - : public binary_function -{ - bool operator()(const typename _Traits::char_type& __x, - const typename _Traits::char_type& __y) const - { return _Traits::lt(__x, __y); } -}; -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_CTRAITS_FUNCTIONS_H */ - -// Local Variables: -// mode:C++ -// End: - - - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_cwchar.h --- a/epoc32/include/stdapis/stlport/stl/_cwchar.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_CWCHAR_H -# define _STLP_CWCHAR_H - -#ifndef _STLP_NO_WCHAR_T -#ifdef __cplusplus -# include -#else -# include -#endif -#endif - -# if defined (__MRC__) || defined (__SC__) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__) || defined( __Lynx__ )) || defined (_STLP_NO_WCHAR_T) - -#ifdef __SYMBIAN32__ -# include -#else -# include _STLP_NATIVE_C_HEADER(stddef.h) -#endif -# if defined (__FreeBSD__) || defined (__Lynx__) -# ifndef _WINT_T -typedef long int wint_t; -# define _WINT_T -# endif /* _WINT_T */ -# endif -# endif - -# if defined ( _STLP_OWN_IOSTREAMS ) && defined (_STLP_NO_NATIVE_MBSTATE_T) && ! defined (_STLP_NO_MBSTATE_T) && ! defined (_MBSTATE_T) && ! defined (__mbstate_t_defined) -# define _STLP_USE_OWN_MBSTATE_T -# define _MBSTATE_T -# endif - -# ifdef _STLP_USE_OWN_MBSTATE_T - -#ifndef __SYMBIAN32__ //no more using the structure __stl_mbstate_t. usinfg _mb_state_t from _types.h. -// to be compatible across different SUN platforms -#ifdef __sun -# define __stl_mbstate_t __mbstate_t -#endif - -struct __stl_mbstate_t; - -# ifdef __cplusplus -struct __stl_mbstate_t { - __stl_mbstate_t( long __st = 0 ) { _M_state[0] = __st ; } - __stl_mbstate_t& operator=(const long __st) { - _M_state[0] = __st; - return *this; - } - __stl_mbstate_t(const __stl_mbstate_t& __x) {_M_state[0]= __x._M_state[0]; } - __stl_mbstate_t& operator=(const __stl_mbstate_t& __x) { - _M_state[0]= __x._M_state[0]; - return *this; - } -# if defined (__sun) -# ifdef _LP64 - long _M_state[4]; -# else - int _M_state[6]; -# endif -# else - long _M_state[1]; -# endif -}; - -inline bool operator==(const __stl_mbstate_t& __x, const __stl_mbstate_t& __y) { - return ( __x._M_state[0] == __y._M_state[0] ); -} - -inline bool operator!=(const __stl_mbstate_t& __x, const __stl_mbstate_t& __y) { - return ( __x._M_state[0] == __y._M_state[0] ); -} -# endif - - -#endif //#if __SYMBIAN32__ -_STLP_BEGIN_NAMESPACE -//typedef __mbstate_t __stl_mbstate_t; -//typedef __mbstate_t mbstate_t; - -_STLP_END_NAMESPACE - -# endif /* _STLP_USE_OWN_MBSTATE_T */ - -#if !defined (_STLP_NO_WCHAR_T) -# ifndef WCHAR_MIN -# define WCHAR_MIN 0 -// SUNpro has some bugs with casts. wchar_t is size of int there anyway. -# if defined (__SUNPRO_CC) || defined (__DJGPP) -# define WCHAR_MAX (~0) -# else -# define WCHAR_MAX ((wchar_t)~0) -# endif -# endif -#endif - -# if defined (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) -_STLP_BEGIN_NAMESPACE -using namespace _STLP_VENDOR_CSTD; -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif /* _STLP_CWCHAR_H */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_deque.c --- a/epoc32/include/stdapis/stlport/stl/_deque.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,691 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_DEQUE_C -# define _STLP_DEQUE_C - -# ifndef _STLP_INTERNAL_DEQUE_H -# include -# endif - -_STLP_BEGIN_NAMESPACE - -// Non-inline member functions from _Deque_base. - -template -_Deque_base<_Tp,_Alloc >::~_Deque_base() { - if (_M_map._M_data) { - if (_M_start._M_node) { - _M_destroy_nodes(_M_start._M_node, this->_M_finish._M_node + 1); - } - _M_map.deallocate(_M_map._M_data, _M_map_size._M_data); - } -} - -template -void -_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements) -{ - size_t __num_nodes = - __num_elements / this->buffer_size() + 1 ; - - _M_map_size._M_data = (max)((size_t) _S_initial_map_size, __num_nodes + 2); - _M_map._M_data = _M_map.allocate(_M_map_size._M_data); - - _Tp** __nstart = _M_map._M_data + (_M_map_size._M_data - __num_nodes) / 2; - _Tp** __nfinish = __nstart + __num_nodes; - - _STLP_TRY { - _M_create_nodes(__nstart, __nfinish); - } - _STLP_UNWIND((_M_map.deallocate(_M_map._M_data, _M_map_size._M_data), - _M_map._M_data = 0, _M_map_size._M_data = 0)); - _M_start._M_set_node(__nstart); - this->_M_finish._M_set_node(__nfinish - 1); - _M_start._M_cur = _M_start._M_first; - this->_M_finish._M_cur = this->_M_finish._M_first + - __num_elements % this->buffer_size(); -} - -template -void -_Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart, - _Tp** __nfinish) -{ - _Tp** _STLP_LEAVE_VOLATILE __cur = 0; - _STLP_TRY { - for (__cur = __nstart; __cur < __nfinish; ++__cur) - *__cur = _M_map_size.allocate(this->buffer_size()); - } - _STLP_UNWIND(_M_destroy_nodes(__nstart, __cur)); -} - -template -void -_Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, - _Tp** __nfinish) -{ - for (_Tp** __n = __nstart; __n < __nfinish; ++__n) - _M_map_size.deallocate(*__n, this->buffer_size()); -} - - - -// Non-inline member functions - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -// qualified references -# define __iterator__ _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > -# define const_iterator _Deque_iterator<_Tp, _Const_traits<_Tp> > -# define iterator __iterator__ -# define size_type size_t -# define value_type _Tp -# else -# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE __deque__<_Tp, _Alloc>::iterator -# endif - -template -__deque__<_Tp, _Alloc >& -__deque__<_Tp, _Alloc >::operator= (const __deque__<_Tp, _Alloc >& __x) { - const size_type __len = size(); - if (&__x != this) { - if (__len >= __x.size()) - erase(copy(__x.begin(), __x.end(), this->_M_start), this->_M_finish); - else { - const_iterator __mid = __x.begin() + difference_type(__len); - copy(__x.begin(), __mid, this->_M_start); - insert(this->_M_finish, __mid, __x.end()); - } - } - return *this; -} - -template -void -__deque__<_Tp, _Alloc >::_M_fill_insert(iterator __pos, - size_type __n, const value_type& __x) -{ - if (__pos._M_cur == this->_M_start._M_cur) { - iterator __new_start = _M_reserve_elements_at_front(__n); - _STLP_TRY { - uninitialized_fill(__new_start, this->_M_start, __x); - } - _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); - this->_M_start = __new_start; - } - else if (__pos._M_cur == this->_M_finish._M_cur) { - iterator __new_finish = _M_reserve_elements_at_back(__n); - _STLP_TRY { - uninitialized_fill(this->_M_finish, __new_finish, __x); - } - _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node+1, __new_finish._M_node+1)); - this->_M_finish = __new_finish; - } - else - _M_insert_aux(__pos, __n, __x); -} - -#ifndef _STLP_MEMBER_TEMPLATES - -template -void __deque__<_Tp, _Alloc>::insert(iterator __pos, - const value_type* __first, - const value_type* __last) { - size_type __n = __last - __first; - if (__pos._M_cur == this->_M_start._M_cur) { - iterator __new_start = _M_reserve_elements_at_front(__n); - _STLP_TRY { - uninitialized_copy(__first, __last, __new_start); - } - _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); - this->_M_start = __new_start; - } - else if (__pos._M_cur == this->_M_finish._M_cur) { - iterator __new_finish = _M_reserve_elements_at_back(__n); - _STLP_TRY { - uninitialized_copy(__first, __last, this->_M_finish); - } - _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, - __new_finish._M_node + 1)); - this->_M_finish = __new_finish; - } - else - _M_insert_aux(__pos, __first, __last, __n); -} - -template -void __deque__<_Tp,_Alloc>::insert(iterator __pos, - const_iterator __first, - const_iterator __last) -{ - size_type __n = __last - __first; - if (__pos._M_cur == this->_M_start._M_cur) { - iterator __new_start = _M_reserve_elements_at_front(__n); - _STLP_TRY { - uninitialized_copy(__first, __last, __new_start); - } - _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); - this->_M_start = __new_start; - } - else if (__pos._M_cur == this->_M_finish._M_cur) { - iterator __new_finish = _M_reserve_elements_at_back(__n); - _STLP_TRY { - uninitialized_copy(__first, __last, this->_M_finish); - } - _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,__new_finish._M_node + 1)); - this->_M_finish = __new_finish; - } - else - _M_insert_aux(__pos, __first, __last, __n); -} - -#endif /* _STLP_MEMBER_TEMPLATES */ - -template -__iterator__ -__deque__<_Tp,_Alloc>::erase(iterator __first, iterator __last) -{ - if (__first == this->_M_start && __last == this->_M_finish) { - clear(); - return this->_M_finish; - } - else { - difference_type __n = __last - __first; - difference_type __elems_before = __first - this->_M_start; - if (__elems_before < difference_type(this->size() - __n) / 2) { - copy_backward(this->_M_start, __first, __last); - iterator __new_start = this->_M_start + __n; - _STLP_STD::_Destroy(this->_M_start, __new_start); - this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node); - this->_M_start = __new_start; - } - else { - copy(__last, this->_M_finish, __first); - iterator __new_finish = this->_M_finish - __n; - _STLP_STD::_Destroy(__new_finish, this->_M_finish); - this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1); - this->_M_finish = __new_finish; - } - return this->_M_start + __elems_before; - } -} - -template -void __deque__<_Tp,_Alloc>::clear() -{ - for (_Map_pointer __node = this->_M_start._M_node + 1; - __node < this->_M_finish._M_node; - ++__node) { - _STLP_STD::_Destroy(*__node, *__node + this->buffer_size()); - this->_M_map_size.deallocate(*__node, this->buffer_size()); - } - - if (this->_M_start._M_node != this->_M_finish._M_node) { - _STLP_STD::_Destroy(this->_M_start._M_cur, this->_M_start._M_last); - _STLP_STD::_Destroy(this->_M_finish._M_first, this->_M_finish._M_cur); - this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size()); - } - else - _STLP_STD::_Destroy(this->_M_start._M_cur, this->_M_finish._M_cur); - - this->_M_finish = this->_M_start; -} - -// Precondition: this->_M_start and this->_M_finish have already been initialized, -// but none of the deque's elements have yet been constructed. -template -void -__deque__<_Tp,_Alloc>::_M_fill_initialize(const value_type& __val) { - _STLP_LEAVE_VOLATILE _Map_pointer __cur = 0; - _STLP_TRY { - for (__cur = this->_M_start._M_node; __cur < this->_M_finish._M_node; ++__cur) - uninitialized_fill(*__cur, *__cur + this->buffer_size(), __val); - uninitialized_fill(this->_M_finish._M_first, this->_M_finish._M_cur, __val); - } - _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_start, iterator(*__cur, __cur))); -} - - -// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1. -template -void -__deque__<_Tp,_Alloc>::_M_push_back_aux_v(const value_type& __t) -{ - value_type __t_copy = __t; - _STLP_PUSH_CLEANUP_ITEM(value_type, &__t_copy); - _M_reserve_map_at_back(); - *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size()); - _STLP_TRY { - _Construct(this->_M_finish._M_cur, __t_copy); - this->_M_finish._M_set_node(this->_M_finish._M_node + 1); - this->_M_finish._M_cur = this->_M_finish._M_first; - } - _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1), - this->buffer_size())); -#ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::Pop(); -#endif -} - -# ifndef _STLP_NO_ANACHRONISMS -// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1. -template -void -__deque__<_Tp,_Alloc>::_M_push_back_aux() -{ - _M_reserve_map_at_back(); - *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size()); - _STLP_TRY { - _Construct(this->_M_finish._M_cur); - this->_M_finish._M_set_node(this->_M_finish._M_node + 1); - this->_M_finish._M_cur = this->_M_finish._M_first; - } - _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1), - this->buffer_size())); -} -# endif - -// Called only if this->_M_start._M_cur == this->_M_start._M_first. -template -void -__deque__<_Tp,_Alloc>::_M_push_front_aux_v(const value_type& __t) -{ - value_type __t_copy = __t; - _STLP_PUSH_CLEANUP_ITEM(value_type, &__t_copy); - _M_reserve_map_at_front(); - *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size()); - _STLP_TRY { - this->_M_start._M_set_node(this->_M_start._M_node - 1); - this->_M_start._M_cur = this->_M_start._M_last - 1; - _Construct(this->_M_start._M_cur, __t_copy); - } - _STLP_UNWIND((++this->_M_start, - this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), this->buffer_size()))); -#ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::Pop(); -#endif -} - - -# ifndef _STLP_NO_ANACHRONISMS -// Called only if this->_M_start._M_cur == this->_M_start._M_first. -template -void -__deque__<_Tp,_Alloc>::_M_push_front_aux() -{ - _M_reserve_map_at_front(); - *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size()); - _STLP_TRY { - this->_M_start._M_set_node(this->_M_start._M_node - 1); - this->_M_start._M_cur = this->_M_start._M_last - 1; - _Construct(this->_M_start._M_cur); - } - _STLP_UNWIND((++this->_M_start, this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), - this->buffer_size() ))); -} -# endif - -// Called only if this->_M_finish._M_cur == this->_M_finish._M_first. -template -void -__deque__<_Tp,_Alloc>::_M_pop_back_aux() -{ - this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size()); - this->_M_finish._M_set_node(this->_M_finish._M_node - 1); - this->_M_finish._M_cur = this->_M_finish._M_last - 1; - _STLP_STD::_Destroy(this->_M_finish._M_cur); -} - -// Called only if this->_M_start._M_cur == this->_M_start._M_last - 1. Note that -// if the deque has at least one element (a precondition for this member -// function), and if this->_M_start._M_cur == this->_M_start._M_last, then the deque -// must have at least two nodes. -template -void -__deque__<_Tp,_Alloc>::_M_pop_front_aux() -{ - _STLP_STD::_Destroy(this->_M_start._M_cur); - this->_M_map_size.deallocate(this->_M_start._M_first, this->buffer_size()); - this->_M_start._M_set_node(this->_M_start._M_node + 1); - this->_M_start._M_cur = this->_M_start._M_first; -} - - - -template -__iterator__ -__deque__<_Tp,_Alloc>::_M_insert_aux_prepare(iterator __pos) { - difference_type __index = __pos - this->_M_start; - if (__index < difference_type(size() / 2)) { - push_front(front()); - iterator __front1 = this->_M_start; - ++__front1; - iterator __front2 = __front1; - ++__front2; - __pos = this->_M_start + __index; - iterator __pos1 = __pos; - ++__pos1; - copy(__front2, __pos1, __front1); - } - else { - push_back(back()); - iterator __back1 = this->_M_finish; - --__back1; - iterator __back2 = __back1; - --__back2; - __pos = this->_M_start + __index; - copy_backward(__pos, __back2, __back1); - } - return __pos; -} - -template -__iterator__ -__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, - const value_type& __x) { - value_type __x_copy = __x; - _STLP_PUSH_CLEANUP_ITEM(value_type, &__x_copy); - _STLP_MPWFIX_TRY //*TY 06/01/2000 - mpw forget to call dtor on __x_copy without this try block - __pos = _M_insert_aux_prepare(__pos); - *__pos = __x_copy; -#ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::Pop(); -#endif - return __pos; - _STLP_MPWFIX_CATCH //*TY 06/01/2000 - -} - -template -__iterator__ -__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos) -{ - __pos = _M_insert_aux_prepare(__pos); - *__pos = value_type(); - return __pos; -} - -template -void -__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, - size_type __n, - const value_type& __x) -{ - const difference_type __elems_before = __pos - this->_M_start; - size_type __length = this->size(); - value_type __x_copy = __x; - _STLP_PUSH_CLEANUP_ITEM(value_type, &__x_copy); - - if (__elems_before < difference_type(__length / 2)) { - iterator __new_start = _M_reserve_elements_at_front(__n); - iterator __old_start = this->_M_start; - __pos = this->_M_start + __elems_before; - _STLP_TRY { - if (__elems_before >= difference_type(__n)) { - iterator __start_n = this->_M_start + difference_type(__n); - uninitialized_copy(this->_M_start, __start_n, __new_start); - this->_M_start = __new_start; - copy(__start_n, __pos, __old_start); - fill(__pos - difference_type(__n), __pos, __x_copy); - } - else { - __uninitialized_copy_fill(this->_M_start, __pos, __new_start, - this->_M_start, __x_copy); - this->_M_start = __new_start; - fill(__old_start, __pos, __x_copy); - } - } - _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); - } - else { - iterator __new_finish = _M_reserve_elements_at_back(__n); - iterator __old_finish = this->_M_finish; - const difference_type __elems_after = - difference_type(__length) - __elems_before; - __pos = this->_M_finish - __elems_after; - _STLP_TRY { - if (__elems_after > difference_type(__n)) { - iterator __finish_n = this->_M_finish - difference_type(__n); - uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); - this->_M_finish = __new_finish; - copy_backward(__pos, __finish_n, __old_finish); - fill(__pos, __pos + difference_type(__n), __x_copy); - } - else { - __uninitialized_fill_copy(this->_M_finish, __pos + difference_type(__n), - __x_copy, __pos, this->_M_finish); - this->_M_finish = __new_finish; - fill(__pos, __old_finish, __x_copy); - } - } - _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)); - } -#ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::Pop(); -#endif -} - -#ifndef _STLP_MEMBER_TEMPLATES -template -void -__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, - const value_type* __first, - const value_type* __last, - size_type __n) -{ - - const difference_type __elemsbefore = __pos - this->_M_start; - size_type __length = size(); - if (__elemsbefore < difference_type(__length / 2)) { - iterator __new_start = _M_reserve_elements_at_front(__n); - iterator __old_start = this->_M_start; - __pos = this->_M_start + __elemsbefore; - _STLP_TRY { - if (__elemsbefore >= difference_type(__n)) { - iterator __start_n = this->_M_start + difference_type(__n); - uninitialized_copy(this->_M_start, __start_n, __new_start); - this->_M_start = __new_start; - copy(__start_n, __pos, __old_start); - copy(__first, __last, __pos - difference_type(__n)); - } - else { - const value_type* __mid = - __first + (difference_type(__n) - __elemsbefore); - __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, - __new_start, _IsPODType()); - this->_M_start = __new_start; - copy(__mid, __last, __old_start); - } - } - _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); - } - else { - iterator __new_finish = _M_reserve_elements_at_back(__n); - iterator __old_finish = this->_M_finish; - const difference_type __elemsafter = - difference_type(__length) - __elemsbefore; - __pos = this->_M_finish - __elemsafter; - _STLP_TRY { - if (__elemsafter > difference_type(__n)) { - iterator __finish_n = this->_M_finish - difference_type(__n); - uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); - this->_M_finish = __new_finish; - copy_backward(__pos, __finish_n, __old_finish); - copy(__first, __last, __pos); - } - else { - const value_type* __mid = __first + __elemsafter; - __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType()); - this->_M_finish = __new_finish; - copy(__first, __mid, __pos); - } - } - _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)); - } -} - -template -void -__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, - const_iterator __first, - const_iterator __last, - size_type __n) -{ - const difference_type __elemsbefore = __pos - this->_M_start; - size_type __length = size(); - if (__elemsbefore < difference_type(__length / 2)) { - iterator __new_start = _M_reserve_elements_at_front(__n); - iterator __old_start = this->_M_start; - __pos = this->_M_start + __elemsbefore; - _STLP_TRY { - if (__elemsbefore >= difference_type(__n)) { - iterator __start_n = this->_M_start + __n; - uninitialized_copy(this->_M_start, __start_n, __new_start); - this->_M_start = __new_start; - copy(__start_n, __pos, __old_start); - copy(__first, __last, __pos - difference_type(__n)); - } - else { - const_iterator __mid = __first + (__n - __elemsbefore); - __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, - __new_start, _IsPODType()); - this->_M_start = __new_start; - copy(__mid, __last, __old_start); - } - } - _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); - } - else { - iterator __new_finish = _M_reserve_elements_at_back(__n); - iterator __old_finish = this->_M_finish; - const difference_type __elemsafter = __length - __elemsbefore; - __pos = this->_M_finish - __elemsafter; - _STLP_TRY { - if (__elemsafter > difference_type(__n)) { - iterator __finish_n = this->_M_finish - difference_type(__n); - uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); - this->_M_finish = __new_finish; - copy_backward(__pos, __finish_n, __old_finish); - copy(__first, __last, __pos); - } - else { - const_iterator __mid = __first + __elemsafter; - __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType()); - this->_M_finish = __new_finish; - copy(__first, __mid, __pos); - } - } - _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)); - } -} - -#endif /* _STLP_MEMBER_TEMPLATES */ - -template -void -__deque__<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems) -{ - size_type __new_nodes - = (__new_elems + this->buffer_size() - 1) / this->buffer_size(); - _M_reserve_map_at_front(__new_nodes); - size_type __i =1; - _STLP_TRY { - for (; __i <= __new_nodes; ++__i) - *(this->_M_start._M_node - __i) = this->_M_map_size.allocate(this->buffer_size()); - } - _STLP_CATCH_ALL { - for (size_type __j = 1; __j < __i; ++__j) - this->_M_map_size.deallocate(*(this->_M_start._M_node - __j), this->buffer_size()); - _STLP_RETHROW; - } -} - -template -void -__deque__<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems) -{ - size_type __new_nodes - = (__new_elems + this->buffer_size() - 1) / this->buffer_size(); - _M_reserve_map_at_back(__new_nodes); - size_type __i = 1; - _STLP_TRY { - for (; __i <= __new_nodes; ++__i) - *(this->_M_finish._M_node + __i) = this->_M_map_size.allocate(this->buffer_size()); - } - _STLP_CATCH_ALL { - for (size_type __j = 1; __j < __i; ++__j) - this->_M_map_size.deallocate(*(this->_M_finish._M_node + __j), this->buffer_size()); - _STLP_RETHROW; - } -} - -template -void -__deque__<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add, - bool __add_at_front) -{ - size_type __old_num_nodes = this->_M_finish._M_node - this->_M_start._M_node + 1; - size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; - - _Map_pointer __new_nstart; - if (this->_M_map_size._M_data > 2 * __new_num_nodes) { - __new_nstart = this->_M_map._M_data + (this->_M_map_size._M_data - __new_num_nodes) / 2 - + (__add_at_front ? __nodes_to_add : 0); - if (__new_nstart < this->_M_start._M_node) - copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart); - else - copy_backward(this->_M_start._M_node, this->_M_finish._M_node + 1, - __new_nstart + __old_num_nodes); - } - else { - size_type __new_map_size = - this->_M_map_size._M_data + (max)((size_t)this->_M_map_size._M_data, __nodes_to_add) + 2; - - _Map_pointer __new_map = this->_M_map.allocate(__new_map_size); - __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 - + (__add_at_front ? __nodes_to_add : 0); - copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart); - this->_M_map.deallocate(this->_M_map._M_data, this->_M_map_size._M_data); - - this->_M_map._M_data = __new_map; - this->_M_map_size._M_data = __new_map_size; - } - - this->_M_start._M_set_node(__new_nstart); - this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); -} - -_STLP_END_NAMESPACE - -# undef __iterator__ -# undef iterator -# undef const_iterator -# undef size_type -# undef value_type - -#endif /* _STLP_DEQUE_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_fstream.c --- a/epoc32/include/stdapis/stlport/stl/_fstream.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,891 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_FSTREAM_C -#define _STLP_FSTREAM_C - -# ifndef _STLP_INTERNAL_FSTREAM_H -# include -# endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -_STLP_BEGIN_NAMESPACE - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -// no wchar_t is supported for this mode -# define __BF_int_type__ int -# define __BF_pos_type__ streampos -# define __BF_off_type__ streamoff -# else -# define __BF_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type -# define __BF_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::pos_type -# define __BF_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::off_type -# endif - - -//---------------------------------------------------------------------- -// Public basic_filebuf<> member functions - -template -basic_filebuf<_CharT, _Traits>::basic_filebuf() - : basic_streambuf<_CharT, _Traits>(), _M_base(), - _M_constant_width(false), _M_always_noconv(false), - _M_int_buf_dynamic(false), - _M_in_input_mode(false), _M_in_output_mode(false), - _M_in_error_mode(false), _M_in_putback_mode(false), - _M_int_buf(0), _M_int_buf_EOS(0), - _M_ext_buf(0), _M_ext_buf_EOS(0), - _M_ext_buf_converted(0), _M_ext_buf_end(0), - _M_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)), - _M_end_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)), - _M_mmap_base(0), _M_mmap_len(0), - _M_saved_eback(0), _M_saved_gptr(0), _M_saved_egptr(0), - _M_codecvt(0), - _M_width(1), _M_max_width(1) -{ - this->_M_setup_codecvt(locale()); -} - -template -basic_filebuf<_CharT, _Traits>::~basic_filebuf() { - this->close(); - _M_deallocate_buffers(); -} - - -template -_STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type -basic_filebuf<_CharT, _Traits>::underflow() -{ - return _Underflow<_CharT, _Traits>::_M_doit(this); -} - -template -basic_filebuf<_CharT, _Traits>* -basic_filebuf<_CharT, _Traits>::close() -{ - bool __ok = this->is_open(); - - if (_M_in_output_mode) { - __ok = __ok && !_Traits::eq_int_type(this->overflow(traits_type::eof()), - traits_type::eof()); - __ok == __ok && this->_M_unshift(); - } - else if (_M_in_input_mode) - this->_M_exit_input_mode(); - - // Note order of arguments. We close the file even if __ok is false. - __ok = _M_base._M_close() && __ok; - - // Restore the initial state, except that we don't deallocate the buffer - // or mess with the cached codecvt information. - _M_state = _M_end_state = _State_type(); - _M_ext_buf_converted = _M_ext_buf_end = 0; - - _M_mmap_base = 0; - _M_mmap_len = 0; - -#ifdef __SYMBIAN32__ - if (__ok) { -#endif // __SYMBIAN32__ - this->setg(0, 0, 0); - this->setp(0, 0); -#ifdef __SYMBIAN32__ - } -#endif // __SYMBIAN32__ - - _M_saved_eback = _M_saved_gptr = _M_saved_egptr = 0; - - _M_in_input_mode = _M_in_output_mode = _M_in_error_mode = _M_in_putback_mode - = false; - - return __ok ? this : 0; -} - -// This member function is called whenever we exit input mode. -// It unmaps the memory-mapped file, if any, and sets -// _M_in_input_mode to false. -template -void basic_filebuf<_CharT, _Traits>::_M_exit_input_mode() -{ - if (_M_mmap_base != 0) - _M_base._M_unmap(_M_mmap_base, _M_mmap_len); - _M_in_input_mode = false; - _M_mmap_base = 0; -} - - -//---------------------------------------------------------------------- -// basic_filebuf<> overridden protected virtual member functions - -template -streamsize basic_filebuf<_CharT, _Traits>::showmanyc() -{ - // Is there any possibility that reads can succeed? -#ifdef __SYMBIAN32__ - if (!this->is_open() || !(_M_base.__o_mode() & (int)ios_base::in) || _M_in_error_mode) -#else - if (!this->is_open() || _M_in_output_mode || _M_in_error_mode) -#endif - return -1; - - else if (_M_in_putback_mode) - return this->egptr() - this->gptr(); - - else if (_M_constant_width) { - streamoff __pos = _M_base._M_seek(0, ios_base::cur); - streamoff __size = _M_base._M_file_size(); -#ifdef __SYMBIAN32__ - if(__size == 0) - return 0; -#endif - return __pos >= 0 && __size > __pos ? __size - __pos : -1; - } - - else - return 0; -} - - -// Make a putback position available, if necessary, by switching to a -// special internal buffer used only for putback. The buffer is -// [_M_pback_buf, _M_pback_buf + _S_pback_buf_size), but the base -// class only sees a piece of it at a time. (We want to make sure -// that we don't try to read a character that hasn't been initialized.) -// The end of the putback buffer is always _M_pback_buf + _S_pback_buf_size, -// but the beginning is usually not _M_pback_buf. -template -__BF_int_type__ -basic_filebuf<_CharT, _Traits>::pbackfail(int_type __c) -{ - const int_type __eof = traits_type::eof(); - - // If we aren't already in input mode, pushback is impossible. - if (!_M_in_input_mode) - return __eof; - - // We can use the ordinary get buffer if there's enough space, and - // if it's a buffer that we're allowed to write to. - if (this->gptr() != this->eback() && - (traits_type::eq_int_type(__c, __eof) || - traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]) || - !_M_mmap_base)) { - this->gbump(-1); - if (traits_type::eq_int_type(__c, __eof) || - traits_type::eq(traits_type::to_char_type(__c), *this->gptr())) - return traits_type::to_int_type(*this->gptr()); - } - else if (!traits_type::eq_int_type(__c, __eof)) { - // Are we in the putback buffer already? - _CharT* __pback_end = _M_pback_buf + __STATIC_CAST(int,_S_pback_buf_size); - if (_M_in_putback_mode) { - // Do we have more room in the putback buffer? - if (this->eback() != _M_pback_buf) - this->setg(this->egptr() - 1, this->egptr() - 1, __pback_end); - else - return __eof; // No more room in the buffer, so fail. - } - else { // We're not yet in the putback buffer. - _M_saved_eback = this->eback(); - _M_saved_gptr = this->gptr(); - _M_saved_egptr = this->egptr(); - this->setg(__pback_end - 1, __pback_end - 1, __pback_end); - _M_in_putback_mode = true; - } - } - else - { -#ifdef __SYMBIAN32__ - if (traits_type::eq_int_type(__c, __eof) ) - { - if(_M_in_putback_mode) - { - _M_in_putback_mode = false; - // we are at putback mode - if(_M_saved_eback != _M_saved_gptr) - { - this->setg(_M_saved_eback, _M_saved_gptr - 1, _M_saved_egptr); - return *this->gptr(); - } - else - this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr); - - } - else - { - if(!this->eback()) - { - streamoff __pos = _M_base._M_seek(0, ios_base::cur); - streamoff __size = _M_base._M_file_size(); - if( __size > 0 && __pos > 0 && __pos == __size) - __pos = _M_base._M_seek(__pos - 1, ios_base::beg); - this->underflow(); - this->setg(this->eback(), this->gptr(), this->egptr()); - return *this->gptr(); - } - else - { - this->setg(this->eback(), this->gptr() - 1, this->egptr()); - return *this->gptr(); - } - } - } -#endif - return __eof; - } - // We have made a putback position available. Assign to it, and return. - *this->gptr() = traits_type::to_char_type(__c); - return __c; -} - -// This member function flushes the put area, and also outputs the -// character __c (unless __c is eof). Invariant: we always leave room -// in the internal buffer for one character more than the base class knows -// about. We see the internal buffer as [_M_int_buf, _M_int_buf_EOS), but -// the base class only sees [_M_int_buf, _M_int_buf_EOS - 1). -template -__BF_int_type__ -basic_filebuf<_CharT, _Traits>::overflow(int_type __c) -{ - // Switch to output mode, if necessary. - bool putflag = false; - if (!_M_in_output_mode) - { -#ifdef __SYMBIAN32__ - if(this->_M_int_buf) - putflag = true; -#endif - if (!_M_switch_to_output_mode()) - return traits_type::eof(); - } - _CharT* __ibegin = this->_M_int_buf; - _CharT* __iend = this->pptr(); - this->setp(_M_int_buf, _M_int_buf_EOS - 1); - - // Put __c at the end of the internal buffer. - if (!traits_type::eq_int_type(__c, traits_type::eof())) - *__iend++ = __c; -#ifdef __SYMBIAN32__ - int current_pos = this->gptr() - this->eback(); - streamoff __size = _M_base._M_file_size(); - if(current_pos > 0 && current_pos < __size && _M_base.__is_open()) - _M_base._M_seek(current_pos, ios_base::beg); -#endif - - // For variable-width encodings, output may take more than one pass. - while (__ibegin != __iend) { - const _CharT* __inext = __ibegin; - char* __enext = _M_ext_buf; - typename _Codecvt::result __status - = _M_codecvt->out(_M_state, __ibegin, __iend, __inext, - _M_ext_buf, _M_ext_buf_EOS, __enext); - if (__status == _Codecvt::noconv) -#ifdef __SYMBIAN32__ - { - if(_Noconv_output<_Traits>::_M_doit(this, __ibegin, __iend)) - { - if (this->eback()) - { - *(this->gptr()) = __c; - this->setg(this->eback(), this->gptr() + 1, this->egptr()); - } - if(putflag && this->pptr() < this->epptr()) - this->setp(this->pptr() + 1, this->epptr()); - return traits_type::not_eof(__c); - } - else - return _M_output_error(); - } -#else - return _Noconv_output<_Traits>::_M_doit(this, __ibegin, __iend) - ? traits_type::not_eof(__c) - : _M_output_error(); -#endif - // For a constant-width encoding we know that the external buffer - // is large enough, so failure to consume the entire internal buffer - // or to produce the correct number of external characters, is an error. - // For a variable-width encoding, however, we require only that we - // consume at least one internal character - else if (__status != _Codecvt::error && - ((__inext == __iend && (__enext - _M_ext_buf == - _M_width * (__iend - __ibegin))) || - (!_M_constant_width && __inext != __ibegin))) { - // We successfully converted part or all of the internal buffer. - ptrdiff_t __n = __enext - _M_ext_buf; - if (_M_write(_M_ext_buf, __n)) - __ibegin += __inext - __ibegin; - else - return _M_output_error(); - } - else - return _M_output_error(); - } - - return traits_type::not_eof(__c); -} - -// This member function must be called before any I/O has been -// performed on the stream, otherwise it has no effect. -// -// __buf == 0 && __n == 0 means to make ths stream unbuffered. -// __buf != 0 && __n > 0 means to use __buf as the stream's internal -// buffer, rather than the buffer that would otherwise be allocated -// automatically. __buf must be a pointer to an array of _CharT whose -// size is at least __n. -template -basic_streambuf<_CharT, _Traits>* -basic_filebuf<_CharT, _Traits>::setbuf(_CharT* __buf, streamsize __n) -{ - if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode && - _M_int_buf == 0) { - if (__buf == 0 && __n == 0) - _M_allocate_buffers(0, 1); - else if (__buf != 0 && __n > 0) - _M_allocate_buffers(__buf, __n); - } - return this; -} - -template -__BF_pos_type__ -basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, - ios_base::seekdir __whence, - ios_base::openmode /* dummy */) -{ - if (this->is_open() && - (__off == 0 || (_M_constant_width && this->_M_base._M_in_binary_mode()))) { - - if (!_M_seek_init(__off != 0 || __whence != ios_base::cur)) - return pos_type(-1); - - // Seek to beginning or end, regardless of whether we're in input mode. - if (__whence == ios_base::beg || __whence == ios_base::end) - return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence), - _State_type()); - - // Seek relative to current position. Complicated if we're in input mode. - else if (__whence == ios_base::cur) { - - if (!_M_in_input_mode) - return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence), - _State_type()); - else if (_M_mmap_base != 0) { - // __off is relative to gptr(). We need to do a bit of arithmetic - // to get an offset relative to the external file pointer. - streamoff __adjust = _M_mmap_len - (this->gptr() - (_CharT*) _M_mmap_base); - - // if __off == 0, we do not need to exit input mode and to shift file pointer - if (__off == 0) { - return pos_type(_M_base._M_seek(0, ios_base::cur) - __adjust); - } - else -#ifdef __SYMBIAN32__ - return _M_seek_return(_M_base._M_seek(__off, ios_base::cur), _State_type()); -#else - return _M_seek_return(_M_base._M_seek(__off - __adjust, ios_base::cur), _State_type()); -#endif - } - else if (_M_constant_width) { // Get or set the position. - - streamoff __iadj = _M_width * (this->gptr() - this->eback()); - - // Compensate for offset relative to gptr versus offset relative - // to external pointer. For a text-oriented stream, where the - // compensation is more than just pointer arithmetic, we may get - // but not set the current position. - - if (__iadj <= _M_ext_buf_end - _M_ext_buf) { - - streamoff __eadj = _M_base._M_get_offset(_M_ext_buf + __iadj, _M_ext_buf_end); - - if (__off == 0) { - return pos_type(_M_base._M_seek(0, ios_base::cur) - __eadj); - } else { - return _M_seek_return(_M_base._M_seek(__off - __eadj, ios_base::cur), _State_type()); - } - } - else - return pos_type(-1); - } - else { // Get the position. Encoding is var width. - // Get position in internal buffer. - ptrdiff_t __ipos = this->gptr() - this->eback(); - - // Get corresponding position in external buffer. - _State_type __state = _M_state; - int __epos = _M_codecvt->length(__state, _M_ext_buf, _M_ext_buf_end, - __ipos); - - // Sanity check (expensive): make sure __epos is the right answer. - _State_type __tmp_state = _M_state; - _Filebuf_Tmp_Buf<_CharT> __buf(__ipos); - _CharT* __ibegin = __buf._M_ptr; - _CharT* __inext = __ibegin; - - const char* __dummy; - typename _Codecvt::result __status - = _M_codecvt->in(__tmp_state, - _M_ext_buf, _M_ext_buf + __epos, __dummy, - __ibegin, __ibegin + __ipos, __inext); - if (__status != _Codecvt::error && - (__status == _Codecvt::noconv || - (__inext == __ibegin + __ipos && - equal(this->gptr(), this->eback(), __ibegin, - _Eq_traits())))) { - // Get the current position (at the end of the external buffer), - // then adjust it. Again, it might be a text-oriented stream. - streamoff __cur = _M_base._M_seek(0, ios_base::cur); - streamoff __adj = - _M_base._M_get_offset(_M_ext_buf, _M_ext_buf + __epos) - - _M_base._M_get_offset(_M_ext_buf, _M_ext_buf_end); - if (__cur != -1 && __cur + __adj >= 0) - return _M_seek_return(__cur + __adj, __state); - else - return pos_type(-1); - } - else // We failed the sanity check. - return pos_type(-1); - } - } - else // Unrecognized value for __whence. - return pos_type(-1); - } - else - return pos_type(-1); -} - - -template -__BF_pos_type__ -basic_filebuf<_CharT, _Traits>::seekpos(pos_type __pos, - ios_base::openmode /* dummy */) -{ - if (this->is_open()) { - if (!_M_seek_init(true)) - return pos_type(-1); - - streamoff __off = off_type(__pos); - if (__off != -1 && _M_base._M_seek(__off, ios_base::beg) != -1) { - _M_state = __pos.state(); - return _M_seek_return(__off, __pos.state()); - } - else - return pos_type(-1); - } - else - return pos_type(-1); -} - - -template -int basic_filebuf<_CharT, _Traits>::sync() -{ - if (_M_in_output_mode) - return traits_type::eq_int_type(this->overflow(traits_type::eof()), - traits_type::eof()) - ? -1 - : 0; - else - return 0; -} - - -// Change the filebuf's locale. This member function has no effect -// unless it is called before any I/O is performed on the stream. -template -void basic_filebuf<_CharT, _Traits>::imbue(const locale& __loc) -{ - if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode) { - this->_M_setup_codecvt(__loc); - } -} - -//---------------------------------------------------------------------- -// basic_filebuf<> helper functions. - -//---------------------------------------- -// Helper functions for switching between modes. - -// This member function is called if we're performing the first I/O -// operation on a filebuf, or if we're performing an input operation -// immediately after a seek. -template -bool basic_filebuf<_CharT, _Traits>::_M_switch_to_input_mode() -{ - - if (this->is_open() && (((int)_M_base.__o_mode() & (int)ios_base::in) !=0) -#ifndef __SYMBIAN32__ - && (_M_in_output_mode == 0) -#endif - && (_M_in_error_mode == 0)) { -#ifdef __STLP_NO_WRITE_SIDE_BUFFERING__ - // If file has been opened in input|output mode - if ((((int)_M_base.__o_mode() & (int)ios_base::out) !=0) -#ifndef __SYMBIAN32__ - && sync() -#endif - && !_M_int_buf && !_M_allocate_buffers(0, 1)) -#else - if (!_M_int_buf && !_M_allocate_buffers()) -#endif - return false; - - _M_ext_buf_converted = _M_ext_buf; - _M_ext_buf_end = _M_ext_buf; - - _M_end_state = _M_state; - - _M_in_input_mode = true; - return true; - } - else - - return false; -} - - -// This member function is called if we're performing the first I/O -// operation on a filebuf, or if we're performing an output operation -// immediately after a seek. -template -bool basic_filebuf<_CharT, _Traits>::_M_switch_to_output_mode() -{ - if (this->is_open() && (_M_base.__o_mode() & (int)ios_base::out) && -#ifdef __SYMBIAN32__ - _M_in_error_mode == 0) { -#else - _M_in_input_mode == 0 && _M_in_error_mode == 0) { -#endif //__SYMBIAN32__ - -#ifdef __STLP_NO_WRITE_SIDE_BUFFERING__ - if (!_M_int_buf && !_M_allocate_buffers(0, 1)) -#else - if (!_M_int_buf && !_M_allocate_buffers()) -#endif - return false; - - // In append mode, every write does an implicit seek to the end - // of the file. Whenever leaving output mode, the end of file - // get put in the initial shift state. - if (_M_base.__o_mode() & ios_base::app) - _M_state = _State_type(); - - this->setp(_M_int_buf, _M_int_buf_EOS - 1); - _M_in_output_mode = true; - - return true; - } - else - return false; -} - - -//---------------------------------------- -// Helper functions for input - -// This member function is called if there is an error during input. -// It puts the filebuf in error mode, clear the get area buffer, and -// returns eof. -// returns eof. Error mode is sticky; it is cleared only by close or -// seek. - -template -__BF_int_type__ -basic_filebuf<_CharT, _Traits>::_M_input_error() -{ - this->_M_exit_input_mode(); - _M_in_output_mode = false; - _M_in_error_mode = true; - this->setg(0, 0, 0); - return traits_type::eof(); -} - -template -__BF_int_type__ -basic_filebuf<_CharT, _Traits>::_M_underflow_aux() -{ - // We have the state and file position from the end of the internal - // buffer. This round, they become the beginning of the internal buffer. - _M_state = _M_end_state; - - // Fill the external buffer. Start with any leftover characters that - // didn't get converted last time. - if (_M_ext_buf_end > _M_ext_buf_converted) - - _M_ext_buf_end = copy(_M_ext_buf_converted, _M_ext_buf_end, _M_ext_buf); - // boris : copy_backward did not work - //_M_ext_buf_end = copy_backward(_M_ext_buf_converted, _M_ext_buf_end, - //_M_ext_buf+ (_M_ext_buf_end - _M_ext_buf_converted)); - else - { -#ifdef __SYMBIAN32__ - if(_M_ext_buf == NULL) - _M_allocate_buffers(0, MMAP_CHUNK); -#endif - _M_ext_buf_end = _M_ext_buf; - } - // Now fill the external buffer with characters from the file. This is - // a loop because occasonally we don't get enough external characters - // to make progress. - while (true) { - ptrdiff_t __n = _M_base._M_read(_M_ext_buf_end, _M_ext_buf_EOS - _M_ext_buf_end); - - // Don't enter error mode for a failed read. Error mode is sticky, - // and we might succeed if we try again. -#ifdef __SYMBIAN32__ //plum hall bug 577 - int nn = (char*)_M_ext_buf_end-(char*)_M_ext_buf; //number of chars unconverted last time - if ( (__n <= 0) && ( nn<=0 ) ) -#else - if (__n <= 0) -#endif - return traits_type::eof(); - - // Convert the external buffer to internal characters. - _M_ext_buf_end += __n; - const char* __enext; - _CharT* __inext; - - typename _Codecvt::result __status - = _M_codecvt->in(_M_end_state, - _M_ext_buf, _M_ext_buf_end, __enext, - _M_int_buf, _M_int_buf_EOS, __inext); - - // Error conditions: (1) Return value of error. (2) Producing internal - // characters without consuming external characters. (3) In fixed-width - // encodings, producing an internal sequence whose length is inconsistent - // with that of the internal sequence. (4) Failure to produce any - // characters if we have enough characters in the external buffer, where - // "enough" means the largest possible width of a single character. - if (__status == _Codecvt::noconv) - return _Noconv_input<_Traits>::_M_doit(this); - - else if (__status == _Codecvt::error || - (__inext != _M_int_buf && __enext == _M_ext_buf) || - (_M_constant_width && - // __inext - _M_int_buf != _M_width * (__enext - _M_ext_buf)) || - (__inext - _M_int_buf) * _M_width != (__enext - _M_ext_buf)) || - (__inext == _M_int_buf && __enext - _M_ext_buf >= _M_max_width)) - return _M_input_error(); - - else if (__inext != _M_int_buf) { - _M_ext_buf_converted = _M_ext_buf + (__enext - _M_ext_buf); - this->setg(_M_int_buf, _M_int_buf, __inext); - return traits_type::to_int_type(*_M_int_buf); - } - // We need to go around the loop again to get more external characters. - } -} - -//---------------------------------------- -// Helper functions for output - -// This member function is called if there is an error during output. -// It puts the filebuf in error mode, clear the put area buffer, and -// returns eof. Error mode is sticky; it is cleared only by close or -// seek. -template -__BF_int_type__ -basic_filebuf<_CharT, _Traits>::_M_output_error() -{ - _M_in_output_mode = false; - _M_in_input_mode = false; - _M_in_error_mode = true; - this->setp(0, 0); - return traits_type::eof(); -} - - -// Write whatever sequence of characters is necessary to get back to -// the initial shift state. This function overwrites the external -// buffer, changes the external file position, and changes the state. -// Precondition: the internal buffer is empty. -template -bool basic_filebuf<_CharT, _Traits>::_M_unshift() -{ - if (_M_in_output_mode && !_M_constant_width) { - typename _Codecvt::result __status; - do { - char* __enext = _M_ext_buf; - __status = _M_codecvt->unshift(_M_state, - _M_ext_buf, _M_ext_buf_EOS, __enext); - if (__status == _Codecvt::noconv || - (__enext == _M_ext_buf && __status == _Codecvt::ok)) - return true; - else if (__status == _Codecvt::error) - return false; - else if (!_M_write(_M_ext_buf, __enext - _M_ext_buf)) - return false; - } while(__status == _Codecvt::partial); - } - - return true; -} - - -//---------------------------------------- -// Helper functions for buffer allocation and deallocation - -// This member function is called when we're initializing a filebuf's -// internal and external buffers. The argument is the size of the -// internal buffer; the external buffer is sized using the character -// width in the current encoding. Preconditions: the buffers are currently -// null. __n >= 1. __buf is either a null pointer or a pointer to an -// array show size is at least __n. - -// We need __n >= 1 for two different reasons. For input, the base -// class always needs a buffer because of the sementics of underflow(). -// For output, we want to have an internal buffer that's larger by one -// element than the buffer that the base class knows about. (See -// basic_filebuf<>::overflow() for the reason.) -template -bool -basic_filebuf<_CharT, _Traits>::_M_allocate_buffers(_CharT* __buf, streamsize __n) -{ - - if (__buf == 0) { - _M_int_buf = __STATIC_CAST(_CharT*,malloc(__n * sizeof(_CharT))); - if (! _M_int_buf) - return false; - _M_int_buf_dynamic = true; - } - else { - _M_int_buf = __buf; - _M_int_buf_dynamic = false; - } - - size_t __ebufsiz = (max)(__n * (max)(_M_codecvt->encoding(), 1), - streamsize(_M_codecvt->max_length())); - - _M_ext_buf = __STATIC_CAST(char*,malloc(__ebufsiz)); - if (!_M_ext_buf) { - _M_deallocate_buffers(); - return false; - } - - _M_int_buf_EOS = _M_int_buf + __n; - _M_ext_buf_EOS = _M_ext_buf + __ebufsiz; - return true; -} - -// Abbreviation for the most common case. -template -bool basic_filebuf<_CharT, _Traits>::_M_allocate_buffers() -{ - // Choose a buffer that's at least 4096 characters long and that's a - // multiple of the page size. - streamsize __default_bufsiz = - ((_M_base.__page_size() + 4095UL) / _M_base.__page_size()) * _M_base.__page_size(); - return _M_allocate_buffers(0, __default_bufsiz); -} - -template -void basic_filebuf<_CharT, _Traits>::_M_deallocate_buffers() -{ - if (_M_int_buf_dynamic) - free(_M_int_buf); - free(_M_ext_buf); - _M_int_buf = 0; - _M_int_buf_EOS = 0; - _M_ext_buf = 0; - _M_ext_buf_EOS = 0; -} - - -//---------------------------------------- -// Helper functiosn for seek and imbue - -template -bool basic_filebuf<_CharT, _Traits>::_M_seek_init(bool __do_unshift) { - // If we're in error mode, leave it. - _M_in_error_mode = false; - - // Flush the output buffer if we're in output mode, and (conditionally) - // emit an unshift sequence. - if (_M_in_output_mode) { - bool __ok = !traits_type::eq_int_type(this->overflow(traits_type::eof()), - traits_type::eof()); - if (__do_unshift) - __ok = __ok && this->_M_unshift(); - if (!__ok) { - _M_in_output_mode = false; - _M_in_error_mode = true; - this->setp(0, 0); - return false; - } - } - - // Discard putback characters, if any. - if (_M_in_input_mode && _M_in_putback_mode) - _M_exit_putback_mode(); - - return true; -} - - -// Change the filebuf's locale. This member function has no effect -// unless it is called before any I/O is performed on the stream. -template -void basic_filebuf<_CharT, _Traits>::_M_setup_codecvt(const locale& __loc) -{ - _M_codecvt = &use_facet<_Codecvt>(__loc) ; - int __encoding = _M_codecvt->encoding(); - - _M_width = (max)(__encoding, 1); - _M_max_width = _M_codecvt->max_length(); - _M_constant_width = __encoding > 0; - _M_always_noconv = _M_codecvt->always_noconv(); -} - - - -template - _STLP_EXP_DECLSPEC basic_fstream<_CharT, _Traits>::basic_fstream() - : basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - } - - -template - _STLP_EXP_DECLSPEC basic_fstream<_CharT, _Traits>::~basic_fstream(){} - -#ifdef __SYMBIAN32__ -template -int basic_filebuf<_CharT, _Traits>::save_read_buffer () - { - return _M_in_putback_mode ? _M_saved_egptr - _M_saved_gptr : 0; - } -template -void basic_filebuf<_CharT, _Traits>::_change_input_mode () - { - _M_in_input_mode = 1; - } - -#endif - -_STLP_END_NAMESPACE - -# undef __BF_int_type__ -# undef __BF_pos_type__ -# undef __BF_off_type__ - -# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ - -#endif /* _STLP_FSTREAM_C */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_fstream.h --- a/epoc32/include/stdapis/stlport/stl/_fstream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,767 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// This header defines classes basic_filebuf, basic_ifstream, -// basic_ofstream, and basic_fstream. These classes represent -// streambufs and streams whose sources or destinations are files. - -#ifndef _STLP_INTERNAL_FSTREAM_H -#define _STLP_INTERNAL_FSTREAM_H - -#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS) -#error This header file requires the -LANG:std option -#endif - -#ifndef _STLP_INTERNAL_STREAMBUF -# include -#endif - -#ifndef _STLP_INTERNAL_ISTREAM_H -#include -#endif - -#ifndef _STLP_INTERNAL_CODECVT_H -#include -#endif - -#ifndef _STLP_STDIO_FILE_H -#include -#endif - -// fbp : let us map 1 MB maximum, just be sure not to trash VM -//for hardware defining 8kb of mmap chunk -# ifdef __SYMBIAN32__ -# define MMAP_CHUNK 0x2000UL -# else -# define MMAP_CHUNK 0x100000UL -# endif - -#if !defined (_STLP_USE_UNIX_IO) && !defined(_STLP_USE_WIN32_IO) \ - && ! defined (_STLP_USE_UNIX_EMULATION_IO) && !defined (_STLP_USE_STDIO_IO) - -# if defined (_STLP_UNIX) || defined (__CYGWIN__) || defined (__amigaos__) || defined (__EMX__) || defined (__SYMBIAN32__) -// open/close/read/write -# define _STLP_USE_UNIX_IO -# elif defined (_STLP_WIN32) && ! defined (__CYGWIN__) -// CreateFile/ReadFile/WriteFile -# define _STLP_USE_WIN32_IO -# elif defined (_STLP_WIN16) || defined (_STLP_WIN32) || defined (_STLP_MAC) -// _open/_read/_write -# define _STLP_USE_UNIX_EMULATION_IO -# else -// fopen/fread/fwrite -# define _STLP_USE_STDIO_IO -# endif /* _STLP_UNIX */ - -#endif /* mode selection */ - - -#if defined (_STLP_USE_WIN32_IO) -typedef void* _STLP_fd; -#elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO) -typedef int _STLP_fd; -#else -#error "Configure i/o !" -#endif - - -_STLP_BEGIN_NAMESPACE - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -_STLP_DECLSPEC size_t& get_fstream_Filebuf_Base_GetPageSize(); -#endif //__LIBSTD_CPP_SYMBIAN32_WSD__ -//---------------------------------------------------------------------- -// Class _Filebuf_base, a private base class to factor out the system- -// dependent code from basic_filebuf<>. - -class _STLP_CLASS_DECLSPEC _Filebuf_base { -public: // Opening and closing files. - _STLP_DECLSPEC _Filebuf_base(); - - _STLP_DECLSPEC bool _M_open(const char*, ios_base::openmode, long __protection); - _STLP_DECLSPEC bool _M_open(const char*, ios_base::openmode); - _STLP_DECLSPEC bool _M_open(int __id, ios_base::openmode = ios_base::__default_mode); - _STLP_DECLSPEC bool _M_close(); - -public: // Low-level I/O, like Unix read/write - _STLP_DECLSPEC ptrdiff_t _M_read(char* __buf, ptrdiff_t __n); - _STLP_DECLSPEC streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir); - _STLP_DECLSPEC streamoff _M_file_size(); - _STLP_DECLSPEC bool _M_write(char* __buf, ptrdiff_t __n); - -public: // Memory-mapped I/O. - _STLP_DECLSPEC void* _M_mmap(streamoff __offset, streamoff __len); - _STLP_DECLSPEC void _M_unmap(void* __mmap_base, streamoff __len); - -public: - // Returns a value n such that, if pos is the file pointer at the - // beginning of the range [first, last), pos + n is the file pointer at - // the end. On many operating systems n == __last - __first. - // In Unix, writing n characters always bumps the file position by n. - // In Windows text mode, however, it bumps the file position by n + m, - // where m is the number of newlines in the range. That's because an - // internal \n corresponds to an external two-character sequence. - streamoff _M_get_offset(char* __first, char* __last) { -#if defined (_STLP_UNIX) || defined (_STLP_MAC) - return __last - __first; -#else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) - return ( (_M_openmode & ios_base::binary) != 0 ) - ? (__last - __first) - : count(__first, __last, '\n') + (__last - __first); -#endif - } - - // Returns true if we're in binary mode or if we're using an OS or file - // system where there is no distinction between text and binary mode. - bool _M_in_binary_mode() const { -# if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__) || defined (_STLP_VXWORKS_TORNADO) - return true; -# elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM) || defined (__EMX__) - return (_M_openmode & ios_base::binary) != 0; -# else -//# error "Port!" -#pragma message(" Symbian I/O stream support on progress."__FILE__) -# endif - } - -protected: // Static data members. -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static size_t _M_page_size; -#endif //__SYMBIAN32__ - -protected: // Data members. - _STLP_fd _M_file_id; -# ifdef _STLP_USE_STDIO_IO - // for stdio, the whole FILE* is being kept here - FILE* _M_file; -# endif -# ifdef _STLP_USE_WIN32_IO - void* _M_view_id; -# endif - - ios_base::openmode _M_openmode ; - unsigned char _M_is_open ; - unsigned char _M_should_close ; - unsigned char _M_regular_file ; - -public : -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static size_t _STLP_CALL __page_size() { return get_fstream_Filebuf_Base_GetPageSize(); } -#else - static size_t _STLP_CALL __page_size() { return _M_page_size; } -#endif - int __o_mode() const { return (int)_M_openmode; } - bool __is_open() const { return (_M_is_open !=0 ); } - bool __should_close() const { return (_M_should_close != 0); } - bool __regular_file() const { return (_M_regular_file != 0); } - _STLP_fd __get_fd() const { return _M_file_id; } -}; - - - - -//---------------------------------------------------------------------- -// Class basic_filebuf<>. - -// Forward declaration of two helper classes. -template class _Noconv_input; -_STLP_TEMPLATE_NULL -class _Noconv_input >; - -template class _Noconv_output; -_STLP_TEMPLATE_NULL -class _Noconv_output< char_traits >; - -// There is a specialized version of underflow, for basic_filebuf, -// in fstream.cxx. - -template -class _Underflow; - - _STLP_TEMPLATE_NULL class _Underflow< char, char_traits >; - -template -class basic_filebuf : public basic_streambuf<_CharT, _Traits> -{ -public: // Types. - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef typename _Traits::state_type _State_type; - typedef basic_streambuf<_CharT, _Traits> _Base; - typedef basic_filebuf<_CharT, _Traits> _Self; - -public: // Constructors, destructor. - basic_filebuf(); - ~basic_filebuf(); - -public: // Opening and closing files. - bool is_open() const { return _M_base.__is_open(); } - - _Self* open(const char* __s, ios_base::openmode __m) { - return _M_base._M_open(__s, __m) ? this : 0; - } - -# ifndef _STLP_NO_EXTENSIONS - // These two version of open() and file descriptor getter are extensions. - _Self* open(const char* __s, ios_base::openmode __m, - long __protection) { - return _M_base._M_open(__s, __m, __protection) ? this : 0; - } - - _STLP_fd fd() const { return _M_base.__get_fd(); } - - _Self* open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) { - return this->_M_open(__id, _Init_mode); - } -# endif - - _Self* _M_open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) { - return _M_base._M_open(__id, _Init_mode) ? this : 0; - } - - _Self* close(); - -protected: // Virtual functions from basic_streambuf. - virtual streamsize showmanyc(); - virtual int_type underflow(); - - virtual int_type pbackfail(int_type = traits_type::eof()); - virtual int_type overflow(int_type = traits_type::eof()); - - virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize); - virtual pos_type seekoff(off_type, ios_base::seekdir, - ios_base::openmode = ios_base::in | ios_base::out); - virtual pos_type seekpos(pos_type, - ios_base::openmode = ios_base::in | ios_base::out); - - virtual int sync(); - virtual void imbue(const locale&); - -#ifdef __SYMBIAN32__ - virtual int save_read_buffer (); - virtual void _change_input_mode(); -#endif - -private: // Helper functions. - - // Precondition: we are currently in putback input mode. Effect: - // switches back to ordinary input mode. - void _M_exit_putback_mode() { - this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr); - _M_in_putback_mode = false; - } - bool _M_switch_to_input_mode(); - void _M_exit_input_mode(); - bool _M_switch_to_output_mode(); - - int_type _M_input_error(); - int_type _M_underflow_aux(); - // friend class _Noconv_input<_Traits>; - // friend class _Noconv_output<_Traits>; - friend class _Underflow<_CharT, _Traits>; - - int_type _M_output_error(); - bool _M_unshift(); - - bool _M_allocate_buffers(_CharT* __buf, streamsize __n); - bool _M_allocate_buffers(); - void _M_deallocate_buffers(); - - pos_type _M_seek_return(off_type __off, _State_type __state) { - if (__off != -1) { - if (_M_in_input_mode) - _M_exit_input_mode(); -#ifndef __SYMBIAN32__ - _M_in_input_mode = false; //moved down, because setg again sets input mode -#endif - _M_in_output_mode = false; - _M_in_putback_mode = false; - _M_in_error_mode = false; - this->setg(0, 0, 0); - this->setp(0, 0); -#ifdef __SYMBIAN32__ - _M_in_input_mode = false; -#endif - } - - pos_type __result(__off); - __result.state(__state); - return __result; - } - - bool _M_seek_init(bool __do_unshift); - - void _M_setup_codecvt(const locale&); - -private: // Data members used in all modes. - - _Filebuf_base _M_base; - -private: // Locale-related information. - - unsigned char _M_constant_width; - unsigned char _M_always_noconv; - - // private: // Mode flags. - unsigned char _M_int_buf_dynamic; // True if internal buffer is heap allocated, - // false if it was supplied by the user. - unsigned char _M_in_input_mode; - unsigned char _M_in_output_mode; - unsigned char _M_in_error_mode; - unsigned char _M_in_putback_mode; - - // Internal buffer: characters seen by the filebuf's clients. - _CharT* _M_int_buf; - _CharT* _M_int_buf_EOS; - - // External buffer: characters corresponding to the external file. - char* _M_ext_buf; - char* _M_ext_buf_EOS; - - // The range [_M_ext_buf, _M_ext_buf_converted) contains the external - // characters corresponding to the sequence in the internal buffer. The - // range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that - // have been read into the external buffer but have not been converted - // to an internal sequence. - char* _M_ext_buf_converted; - char* _M_ext_buf_end; - - // State corresponding to beginning of internal buffer. - _State_type _M_state; - -private: // Data members used only in input mode. - - // Similar to _M_state except that it corresponds to - // the end of the internal buffer instead of the beginning. - _State_type _M_end_state; - - // This is a null pointer unless we are in mmap input mode. - void* _M_mmap_base; - streamoff _M_mmap_len; - -private: // Data members used only in putback mode. - _CharT* _M_saved_eback; - _CharT* _M_saved_gptr; - _CharT* _M_saved_egptr; - - typedef codecvt<_CharT, char, _State_type> _Codecvt; - const _Codecvt* _M_codecvt; - - int _M_width; // Width of the encoding (if constant), else 1 - int _M_max_width; // Largest possible width of single character. - - - enum { _S_pback_buf_size = 8 }; - _CharT _M_pback_buf[_S_pback_buf_size]; - - // for _Noconv_output -public: - bool _M_write(char* __buf, ptrdiff_t __n) {return _M_base._M_write(__buf, __n); } - -public: - int_type - _M_do_noconv_input() { - _M_ext_buf_converted = _M_ext_buf_end; - this->setg((char_type*)_M_ext_buf, (char_type*)_M_ext_buf, (char_type*)_M_ext_buf_end); - return traits_type::to_int_type(*_M_ext_buf); - } -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf >; -# if ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -// public: -// helper class. -template -struct _Filebuf_Tmp_Buf -{ - _CharT* _M_ptr; - _Filebuf_Tmp_Buf(ptrdiff_t __n) : _M_ptr(0) { _M_ptr = new _CharT[__n]; } - ~_Filebuf_Tmp_Buf() { delete[] _M_ptr; } -}; - - -// -// This class had to be designed very carefully to work -// with Visual C++. -// -template -class _Noconv_output { -public: - typedef typename _Traits::char_type char_type; - static bool _STLP_CALL _M_doit(basic_filebuf*, - char_type*, char_type*) - { - return false; - } -}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC _Noconv_output< char_traits > { -public: - static bool _STLP_CALL - _M_doit(basic_filebuf >* __buf, - char* __first, char* __last) - { - ptrdiff_t __n = __last - __first; - if (__buf->_M_write(__first, __n)) { - return true; - } - else - return false; - } -}; - -//---------------------------------------------------------------------- -// basic_filebuf<> helper functions. - - -//---------------------------------------- -// Helper functions for switching between modes. - -// -// This class had to be designed very carefully to work -// with Visual C++. -// -template -class _Noconv_input { -public: - typedef typename _Traits::int_type int_type; - typedef typename _Traits::char_type char_type; - - static inline int_type _STLP_CALL - _M_doit(basic_filebuf*) - { - return 0; - } -}; - -_STLP_TEMPLATE_NULL -class _Noconv_input > { -public: - static inline int _STLP_CALL - _M_doit(basic_filebuf >* __buf) { - return __buf->_M_do_noconv_input(); - } -}; - -// underflow() may be called for one of two reasons. (1) We've -// been going through the special putback buffer, and we need to move back -// to the regular internal buffer. (2) We've exhausted the internal buffer, -// and we need to replentish it. -template -class _Underflow { -public: - typedef typename _Traits::int_type int_type; - typedef _Traits traits_type; - - static int_type _STLP_CALL _M_doit(basic_filebuf<_CharT, _Traits>* __this); -}; - - -// Specialization of underflow: if the character type is char, maybe -// we can use mmap instead of read. -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC _Underflow< char, char_traits > { -public: - typedef char_traits::int_type int_type; - typedef char_traits traits_type; - _STLP_DECLSPEC static int _STLP_CALL _M_doit(basic_filebuf* __this); -}; - -// There is a specialized version of underflow, for basic_filebuf, -// in fstream.cxx. - -template -_STLP_TYPENAME_ON_RETURN_TYPE _Underflow<_CharT, _Traits>::int_type // _STLP_CALL - _Underflow<_CharT, _Traits>::_M_doit(basic_filebuf<_CharT, _Traits>* __this) -{ - if (!__this->_M_in_input_mode) { - if (!__this->_M_switch_to_input_mode()) - return traits_type::eof(); - } - - else if (__this->_M_in_putback_mode) { - __this->_M_exit_putback_mode(); - if (__this->gptr() != __this->egptr()) { - int_type __c = traits_type::to_int_type(*__this->gptr()); - return __c; - } - } - - return __this->_M_underflow_aux(); -} - -#if defined( _STLP_USE_TEMPLATE_EXPORT ) && ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS _Underflow >; -#endif - - -//---------------------------------------------------------------------- -// Class basic_ifstream<> - -template -class basic_ifstream : public basic_istream<_CharT, _Traits> -{ -public: // Types - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_istream<_CharT, _Traits> _Base; - typedef basic_filebuf<_CharT, _Traits> _Buf; - -public: // Constructors, destructor. - - basic_ifstream() : - basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - } - - explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) : - basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), - _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__s, __mod | ios_base::in)) - this->setstate(ios_base::failbit); - } - -# ifndef _STLP_NO_EXTENSIONS - explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) : - basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__id, __mod | ios_base::in)) - this->setstate(ios_base::failbit); - } - basic_ifstream(const char* __s, ios_base::openmode __m, - long __protection) : - basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__s, __m | ios_base::in, __protection)) - this->setstate(ios_base::failbit); - } - -# endif - - ~basic_ifstream() {} - -public: // File and buffer operations. - basic_filebuf<_CharT, _Traits>* rdbuf() const - { return __CONST_CAST(_Buf*,&_M_buf); } - - bool is_open() { - return this->rdbuf()->is_open(); - } - - void open(const char* __s, ios_base::openmode __mod = ios_base::in) { - if (!this->rdbuf()->open(__s, __mod | ios_base::in)) - this->setstate(ios_base::failbit); - } - - void close() { - if (!this->rdbuf()->close()) - this->setstate(ios_base::failbit); - } - - -private: - basic_filebuf<_CharT, _Traits> _M_buf; -}; - - -//---------------------------------------------------------------------- -// Class basic_ofstream<> - -template -class basic_ofstream : public basic_ostream<_CharT, _Traits> -{ -public: // Types - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_ostream<_CharT, _Traits> _Base; - typedef basic_filebuf<_CharT, _Traits> _Buf; - -public: // Constructors, destructor. - basic_ofstream() : - basic_ios<_CharT, _Traits>(), - basic_ostream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - } - explicit basic_ofstream(const char* __s, ios_base::openmode __mod = ios_base::out) - : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), - _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__s, __mod | ios_base::out)) - this->setstate(ios_base::failbit); - } - -# ifndef _STLP_NO_EXTENSIONS - explicit basic_ofstream(int __id, ios_base::openmode __mod = ios_base::out) - : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), - _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__id, __mod | ios_base::out)) - this->setstate(ios_base::failbit); - } - basic_ofstream(const char* __s, ios_base::openmode __m, long __protection) : - basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__s, __m | ios_base::out, __protection)) - this->setstate(ios_base::failbit); - } -# endif - - ~basic_ofstream() {} - -public: // File and buffer operations. - basic_filebuf<_CharT, _Traits>* rdbuf() const - { return __CONST_CAST(_Buf*,&_M_buf); } - - bool is_open() { - return this->rdbuf()->is_open(); - } - - void open(const char* __s, ios_base::openmode __mod= ios_base::out) { - if (!this->rdbuf()->open(__s, __mod | ios_base::out)) - this->setstate(ios_base::failbit); - } - - void close() { - if (!this->rdbuf()->close()) - this->setstate(ios_base::failbit); - } - -private: - basic_filebuf<_CharT, _Traits> _M_buf; -}; - - -//---------------------------------------------------------------------- -// Class basic_fstream<> - -template -class basic_fstream : public basic_iostream<_CharT, _Traits> -{ -public: // Types - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_iostream<_CharT, _Traits> _Base; - typedef basic_filebuf<_CharT, _Traits> _Buf; - -public: // Constructors, destructor. - - _STLP_DECLSPEC basic_fstream(); - explicit basic_fstream(const char* __s, - ios_base::openmode __mod = ios_base::in | ios_base::out) : - basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__s, __mod)) - this->setstate(ios_base::failbit); - } - -# ifndef _STLP_NO_EXTENSIONS - explicit basic_fstream(int __id, - ios_base::openmode __mod = ios_base::in | ios_base::out) : - basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__id, __mod)) - this->setstate(ios_base::failbit); - } - basic_fstream(const char* __s, ios_base::openmode __m, long __protection) : - basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { - this->init(&_M_buf); - if (!_M_buf.open(__s, __m, __protection)) - this->setstate(ios_base::failbit); - } -# endif - _STLP_DECLSPEC ~basic_fstream(); - -public: // File and buffer operations. - - basic_filebuf<_CharT, _Traits>* rdbuf() const - { return __CONST_CAST(_Buf*,&_M_buf); } - - bool is_open() { - return this->rdbuf()->is_open(); - } - - void open(const char* __s, - ios_base::openmode __mod = - ios_base::in | ios_base::out) { - if (!this->rdbuf()->open(__s, __mod)) - this->setstate(ios_base::failbit); - } - - void close() { - if (!this->rdbuf()->close()) - this->setstate(ios_base::failbit); - } - -private: - basic_filebuf<_CharT, _Traits> _M_buf; -}; - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream >; -_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream >; -_STLP_EXPORT_TEMPLATE_CLASS basic_fstream >; -# if ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream >; -_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream >; -_STLP_EXPORT_TEMPLATE_CLASS basic_fstream >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_FSTREAM */ - - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_function.h --- a/epoc32/include/stdapis/stlport/stl/_function.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,371 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_FUNCTION_H -#define _STLP_INTERNAL_FUNCTION_H - -#ifndef _STLP_INTERNAL_FUNCTION_BASE_H -#include -#endif - -_STLP_BEGIN_NAMESPACE - -# ifndef _STLP_NO_EXTENSIONS -// identity_element (not part of the C++ standard). -template inline _Tp identity_element(plus<_Tp>) { return _Tp(0); } -template inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); } -# endif - -# if defined (_STLP_BASE_TYPEDEF_BUG) -// this workaround is needed for SunPro 4.0.1 -// suggested by "Martin Abernethy" : - -// We have to introduce the XXary_predicate_aux structures in order to -// access the argument and return types of predicate functions supplied -// as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters -// of the form 'name1::name2', where name1 is itself a type parameter. -template -struct __pair_aux : private _Pair -{ - typedef typename _Pair::first_type first_type; - typedef typename _Pair::second_type second_type; -}; - -template -struct __unary_fun_aux : private _Operation -{ - typedef typename _Operation::argument_type argument_type; - typedef typename _Operation::result_type result_type; -}; - -template -struct __binary_fun_aux : private _Operation -{ - typedef typename _Operation::first_argument_type first_argument_type; - typedef typename _Operation::second_argument_type second_argument_type; - typedef typename _Operation::result_type result_type; -}; - -# define __UNARY_ARG(__Operation,__type) __unary_fun_aux<__Operation>::__type -# define __BINARY_ARG(__Operation,__type) __binary_fun_aux<__Operation>::__type -# define __PAIR_ARG(__Pair,__type) __pair_aux<__Pair>::__type -# else -# define __UNARY_ARG(__Operation,__type) __Operation::__type -# define __BINARY_ARG(__Operation,__type) __Operation::__type -# define __PAIR_ARG(__Pair,__type) __Pair::__type -# endif - -template -class unary_negate : - public unary_function { -protected: - _Predicate _M_pred; -public: - explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {} - bool operator()(const typename _Predicate::argument_type& __x) const { - return !_M_pred(__x); - } -}; - -template -inline unary_negate<_Predicate> -not1(const _Predicate& __pred) -{ - return unary_negate<_Predicate>(__pred); -} - -template -class binary_negate - : public binary_function { -protected: - _Predicate _M_pred; -public: - explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {} - bool operator()(const typename _Predicate::first_argument_type& __x, - const typename _Predicate::second_argument_type& __y) const - { - return !_M_pred(__x, __y); - } -}; - -template -inline binary_negate<_Predicate> -not2(const _Predicate& __pred) -{ - return binary_negate<_Predicate>(__pred); -} - -template -class binder1st : - public unary_function { -protected: - _Operation op; - typename _Operation::first_argument_type value; -public: - binder1st(const _Operation& __x, - const typename _Operation::first_argument_type& __y) - : op(__x), value(__y) {} - - typename _Operation::result_type - operator()(const typename _Operation::second_argument_type& __x) const { - return op(value, __x); - } - - typename _Operation::result_type - operator()(typename _Operation::second_argument_type& __x) const { - return op(value, __x); - } -}; - -template -inline binder1st<_Operation> -bind1st(const _Operation& __fn, const _Tp& __x) -{ - typedef typename _Operation::first_argument_type _Arg1_type; - return binder1st<_Operation>(__fn, _Arg1_type(__x)); -} - -template -class binder2nd - : public unary_function { -protected: - _Operation op; - typename _Operation::second_argument_type value; -public: - binder2nd(const _Operation& __x, - const typename _Operation::second_argument_type& __y) - : op(__x), value(__y) {} - - typename _Operation::result_type - operator()(const typename _Operation::first_argument_type& __x) const { - return op(__x, value); - } - - typename _Operation::result_type - operator()(typename _Operation::first_argument_type& __x) const { - return op(__x, value); - } -}; - -template -inline binder2nd<_Operation> -bind2nd(const _Operation& __fn, const _Tp& __x) -{ - typedef typename _Operation::second_argument_type _Arg2_type; - return binder2nd<_Operation>(__fn, _Arg2_type(__x)); -} - -# ifndef _STLP_NO_EXTENSIONS -// unary_compose and binary_compose (extensions, not part of the standard). - -template -class unary_compose : - public unary_function { -protected: - _Operation1 _M_fn1; - _Operation2 _M_fn2; -public: - unary_compose(const _Operation1& __x, const _Operation2& __y) - : _M_fn1(__x), _M_fn2(__y) {} - - typename _Operation1::result_type - operator()(const typename _Operation2::argument_type& __x) const { - return _M_fn1(_M_fn2(__x)); - } - - typename _Operation1::result_type - operator()(typename _Operation2::argument_type& __x) const { - return _M_fn1(_M_fn2(__x)); - } -}; - -template -inline unary_compose<_Operation1,_Operation2> -compose1(const _Operation1& __fn1, const _Operation2& __fn2) -{ - return unary_compose<_Operation1,_Operation2>(__fn1, __fn2); -} - -template -class binary_compose : - public unary_function { -protected: - _Operation1 _M_fn1; - _Operation2 _M_fn2; - _Operation3 _M_fn3; -public: - binary_compose(const _Operation1& __x, const _Operation2& __y, - const _Operation3& __z) - : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { } - - typename _Operation1::result_type - operator()(const typename _Operation2::argument_type& __x) const { - return _M_fn1(_M_fn2(__x), _M_fn3(__x)); - } - - typename _Operation1::result_type - operator()(typename _Operation2::argument_type& __x) const { - return _M_fn1(_M_fn2(__x), _M_fn3(__x)); - } -}; - -template -inline binary_compose<_Operation1, _Operation2, _Operation3> -compose2(const _Operation1& __fn1, const _Operation2& __fn2, - const _Operation3& __fn3) -{ - return binary_compose<_Operation1,_Operation2,_Operation3> - (__fn1, __fn2, __fn3); -} - -# endif /* _STLP_NO_EXTENSIONS */ - -# ifndef _STLP_NO_EXTENSIONS - -// identity is an extension: it is not part of the standard. -template struct identity : public _Identity<_Tp> {}; -// select1st and select2nd are extensions: they are not part of the standard. -template struct select1st : public _Select1st<_Pair> {}; -template struct select2nd : public _Select2nd<_Pair> {}; - -template -struct project1st : public _Project1st<_Arg1, _Arg2> {}; - -template -struct project2nd : public _Project2nd<_Arg1, _Arg2> {}; - - -// constant_void_fun, constant_unary_fun, and constant_binary_fun are -// extensions: they are not part of the standard. (The same, of course, -// is true of the helper functions constant0, constant1, and constant2.) - -template -struct _Constant_void_fun { - typedef _Result result_type; - result_type _M_val; - - _Constant_void_fun(const result_type& __v) : _M_val(__v) {} - const result_type& operator()() const { return _M_val; } -}; - - -template -struct constant_void_fun : public _Constant_void_fun<_Result> { - constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {} -}; - -template -struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument> -{ - constant_unary_fun(const _Result& __v) - : _Constant_unary_fun<_Result, _Argument>(__v) {} -}; - -template -struct constant_binary_fun - : public _Constant_binary_fun<_Result, _Arg1, _Arg2> -{ - constant_binary_fun(const _Result& __v) - : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {} -}; - -template -inline constant_void_fun<_Result> constant0(const _Result& __val) -{ - return constant_void_fun<_Result>(__val); -} - -template -inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) -{ - return constant_unary_fun<_Result,_Result>(__val); -} - -template -inline constant_binary_fun<_Result,_Result,_Result> -constant2(const _Result& __val) -{ - return constant_binary_fun<_Result,_Result,_Result>(__val); -} - -// subtractive_rng is an extension: it is not part of the standard. -// Note: this code assumes that int is 32 bits. -class subtractive_rng : public unary_function<_STLP_UINT32_T, _STLP_UINT32_T> { -private: - _STLP_UINT32_T _M_table[55]; - _STLP_UINT32_T _M_index1; - _STLP_UINT32_T _M_index2; -public: - _STLP_UINT32_T operator()(_STLP_UINT32_T __limit) { - _M_index1 = (_M_index1 + 1) % 55; - _M_index2 = (_M_index2 + 1) % 55; - _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2]; - return _M_table[_M_index1] % __limit; - } - - void _M_initialize(_STLP_UINT32_T __seed) - { - _STLP_UINT32_T __k = 1; - _M_table[54] = __seed; - _STLP_UINT32_T __i; - for (__i = 0; __i < 54; __i++) { - _STLP_UINT32_T __ii = (21 * (__i + 1) % 55) - 1; - _M_table[__ii] = __k; - __k = __seed - __k; - __seed = _M_table[__ii]; - } - for (int __loop = 0; __loop < 4; __loop++) { - for (__i = 0; __i < 55; __i++) - _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55]; - } - _M_index1 = 0; - _M_index2 = 31; - } - - subtractive_rng(unsigned int __seed) { _M_initialize(__seed); } - subtractive_rng() { _M_initialize(161803398ul); } -}; - -# endif /* _STLP_NO_EXTENSIONS */ - -_STLP_END_NAMESPACE - -#include - -#endif /* _STLP_INTERNAL_FUNCTION_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_function_adaptors.h --- a/epoc32/include/stdapis/stlport/stl/_function_adaptors.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,802 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * Copyright (c) 2000 - * Pavel Kuznetsov - * - * Copyright (c) 2001 - * Meridian'93 - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -// This file has noo macro protection as it is meant to be included several times -// from other header. -// Adaptor function objects: pointers to member functions. - -// There are a total of 16 = 2^4 function objects in this family. -// (1) Member functions taking no arguments vs member functions taking -// one argument. -// (2) Call through pointer vs call through reference. -// (3) Member function with void return type vs member function with -// non-void return type. -// (4) Const vs non-const member function. - -// Note that choice (3) is nothing more than a workaround: according -// to the draft, compilers should handle void and non-void the same way. -// This feature is not yet widely implemented, though. You can only use -// member functions returning void if your compiler supports partial -// specialization. - -// All of this complexity is in the function objects themselves. You can -// ignore it by using the helper function mem_fun and mem_fun_ref, -// which create whichever type of adaptor is appropriate. - -_STLP_BEGIN_NAMESPACE - -//This implementation will only be used if needed, that is to say when there is the return void bug -//and when there is no partial template specialization -#if defined(_STLP_DONT_RETURN_VOID) && defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined(_STLP_MEMBER_TEMPLATE_CLASSES) - -template -class _Mem_fun0_ptr : public unary_function<_Tp*, _Result> { -protected: - typedef _Result (_Tp::*__fun_type) (); - explicit _Mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(_Tp* __p) const { return (__p->*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Mem_fun1_ptr : public binary_function<_Tp*,_Arg,_Result> { -protected: - typedef _Result (_Tp::*__fun_type) (_Arg); - explicit _Mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Const_mem_fun0_ptr : public unary_function { -protected: - typedef _Result (_Tp::*__fun_type) () const; - explicit _Const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(const _Tp* __p) const { return (__p->*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Const_mem_fun1_ptr : public binary_function { -protected: - typedef _Result (_Tp::*__fun_type) (_Arg) const; - explicit _Const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(const _Tp* __p, _Arg __x) const { - return (__p->*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Mem_fun0_ref : public unary_function<_Tp&,_Result> { -protected: - typedef _Result (_Tp::*__fun_type) (); - explicit _Mem_fun0_ref(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(_Tp& __p) const { return (__p.*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Mem_fun1_ref : public binary_function<_Tp&,_Arg,_Result> { -protected: - typedef _Result (_Tp::*__fun_type) (_Arg); - explicit _Mem_fun1_ref(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(_Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Const_mem_fun0_ref : public unary_function { -protected: - typedef _Result (_Tp::*__fun_type) () const; - explicit _Const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(const _Tp& __p) const { return (__p.*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Const_mem_fun1_ref : public binary_function { -protected: - typedef _Result (_Tp::*__fun_type) (_Arg) const; - explicit _Const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator ()(const _Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -struct _Mem_fun_traits { - template - struct _Args0 { - typedef _Mem_fun0_ptr<_Result,_Tp> _Ptr; - typedef _Const_mem_fun0_ptr<_Result,_Tp> _Ptr_const; - typedef _Mem_fun0_ref<_Result,_Tp> _Ref; - typedef _Const_mem_fun0_ref<_Result,_Tp> _Ref_const; - }; - - template - struct _Args1 { - typedef _Mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr; - typedef _Const_mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr_const; - typedef _Mem_fun1_ref<_Result,_Tp,_Arg> _Ref; - typedef _Const_mem_fun1_ref<_Result,_Tp,_Arg> _Ref_const; - }; -}; - -template -class _Ptr_fun1_base : public unary_function<_Arg, _Result> { -protected: - typedef _Result (*__fun_type) (_Arg); - explicit _Ptr_fun1_base(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator()(_Arg __x) const { return _M_f(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Ptr_fun2_base : public binary_function<_Arg1,_Arg2,_Result> { -protected: - typedef _Result (*__fun_type) (_Arg1, _Arg2); - explicit _Ptr_fun2_base(__fun_type __f) : _M_f(__f) {} - -public: - _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_f(__x, __y); } - -private: - __fun_type _M_f; -}; - -template -struct _Ptr_fun_traits { - template struct _Args1 { - typedef _Ptr_fun1_base<_Arg,_Result> _Fun; - }; - - template struct _Args2 { - typedef _Ptr_fun2_base<_Arg1,_Arg2,_Result> _Fun; - }; -}; - -/*Specialization for void return type -*/ -template -class _Void_mem_fun0_ptr : public unary_function<_Tp*,void> { -protected: - typedef void (_Tp::*__fun_type) (); - explicit _Void_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(_Tp* __p) const { (__p->*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Void_mem_fun1_ptr : public binary_function<_Tp*,_Arg,void> { -protected: - typedef void (_Tp::*__fun_type) (_Arg); - explicit _Void_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Void_const_mem_fun0_ptr : public unary_function { -protected: - typedef void (_Tp::*__fun_type) () const; - explicit _Void_const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(const _Tp* __p) const { (__p->*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Void_const_mem_fun1_ptr : public binary_function { -protected: - typedef void (_Tp::*__fun_type) (_Arg) const; - explicit _Void_const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Void_mem_fun0_ref : public unary_function<_Tp&,void> { -protected: - typedef void (_Tp::*__fun_type) (); - explicit _Void_mem_fun0_ref(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(_Tp& __p) const { (__p.*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Void_mem_fun1_ref : public binary_function<_Tp&,_Arg,void> { -protected: - typedef void (_Tp::*__fun_type) (_Arg); - explicit _Void_mem_fun1_ref(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(_Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Void_const_mem_fun0_ref : public unary_function { -protected: - typedef void (_Tp::*__fun_type) () const; - explicit _Void_const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(const _Tp& __p) const { (__p.*_M_f)(); } - -private: - __fun_type _M_f; -}; - -template -class _Void_const_mem_fun1_ref : public binary_function { -protected: - typedef void (_Tp::*__fun_type) (_Arg) const; - explicit _Void_const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {} - -public: - void operator ()(const _Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); } - -private: - __fun_type _M_f; -}; - -_STLP_TEMPLATE_NULL -struct _Mem_fun_traits { - template struct _Args0 { - typedef _Void_mem_fun0_ptr<_Tp> _Ptr; - typedef _Void_const_mem_fun0_ptr<_Tp> _Ptr_const; - typedef _Void_mem_fun0_ref<_Tp> _Ref; - typedef _Void_const_mem_fun0_ref<_Tp> _Ref_const; - }; - - template struct _Args1 { - typedef _Void_mem_fun1_ptr<_Tp,_Arg> _Ptr; - typedef _Void_const_mem_fun1_ptr<_Tp,_Arg> _Ptr_const; - typedef _Void_mem_fun1_ref<_Tp,_Arg> _Ref; - typedef _Void_const_mem_fun1_ref<_Tp,_Arg> _Ref_const; - }; -}; - -template -class _Ptr_void_fun1_base : public unary_function<_Arg, void> { -protected: - typedef void (*__fun_type) (_Arg); - explicit _Ptr_void_fun1_base(__fun_type __f) : _M_f(__f) {} - -public: - void operator()(_Arg __x) const { _M_f(__x); } - -private: - __fun_type _M_f; -}; - -template -class _Ptr_void_fun2_base : public binary_function<_Arg1,_Arg2,void> { -protected: - typedef void (*__fun_type) (_Arg1, _Arg2); - explicit _Ptr_void_fun2_base(__fun_type __f) : _M_f(__f) {} - -public: - void operator()(_Arg1 __x, _Arg2 __y) const { _M_f(__x, __y); } - -private: - __fun_type _M_f; -}; - -_STLP_TEMPLATE_NULL -struct _Ptr_fun_traits { - template struct _Args1 { - typedef _Ptr_void_fun1_base<_Arg> _Fun; - }; - - template struct _Args2 { - typedef _Ptr_void_fun2_base<_Arg1,_Arg2> _Fun; - }; -}; - -// pavel: need extra level of inheritance here since MSVC++ does not -// accept traits-based fake partial specialization for template -// arguments other than first - -template -class _Ptr_fun1 : - public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun { -protected: - typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun _Base; - explicit _Ptr_fun1(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -template -class _Ptr_fun2 : - public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun { -protected: - typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun _Base; - explicit _Ptr_fun2(typename _Base::__fun_type __f) : _Base(__f) {} -}; - - -#endif /*_STLP_DONT_RETURN_VOID && _STLP_NO_CLASS_PARTIAL_SPECIALIZATION && _STLP_MEMBER_TEMPLATE_CLASSES*/ - - -#if !defined(_STLP_DONT_RETURN_VOID) || !defined(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) || !defined (_STLP_MEMBER_TEMPLATE_CLASSES) - -template -class mem_fun_t : public unary_function<_Tp*,_Ret> { - typedef _Ret (_Tp::*__fun_type)(void); -public: - explicit mem_fun_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun_t : public unary_function { - typedef _Ret (_Tp::*__fun_type)(void) const; -public: - explicit const_mem_fun_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } -private: - __fun_type _M_f; -}; - - -template -class mem_fun_ref_t : public unary_function<_Tp,_Ret> { - typedef _Ret (_Tp::*__fun_type)(void); -public: - explicit mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> { - typedef _Ret (_Tp::*__fun_type)(void) const; -public: - explicit const_mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> { - typedef _Ret (_Tp::*__fun_type)(_Arg); -public: - explicit mem_fun1_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun1_t : public binary_function { - typedef _Ret (_Tp::*__fun_type)(_Arg) const; -public: - explicit const_mem_fun1_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(const _Tp* __p, _Arg __x) const - { return (__p->*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { - typedef _Ret (_Tp::*__fun_type)(_Arg); -public: - explicit mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { - typedef _Ret (_Tp::*__fun_type)(_Arg) const; -public: - explicit const_mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {} - _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class pointer_to_unary_function : public unary_function<_Arg, _Result> { -protected: - _Result (*_M_ptr)(_Arg); -public: - pointer_to_unary_function() {} - explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {} - _Result operator()(_Arg __x) const { return _M_ptr(__x); } -}; - -template -class pointer_to_binary_function : - public binary_function<_Arg1,_Arg2,_Result> { -protected: - _Result (*_M_ptr)(_Arg1, _Arg2); -public: - pointer_to_binary_function() {} - explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) - : _M_ptr(__x) {} - _Result operator()(_Arg1 __x, _Arg2 __y) const { - return _M_ptr(__x, __y); - } -}; - - -#if defined(_STLP_DONT_RETURN_VOID) && !defined(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) -//Partial specialization for the void type -template -class mem_fun_t : public unary_function<_Tp*,void> { - typedef void (_Tp::*__fun_type)(void); -public: - explicit mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} - void operator()(_Tp* __p) const { (__p->*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun_t : public unary_function { - typedef void (_Tp::*__fun_type)(void) const; -public: - explicit const_mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} - void operator()(const _Tp* __p) const { (__p->*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class mem_fun_ref_t : public unary_function<_Tp,void> { - typedef void (_Tp::*__fun_type)(void); -public: - explicit mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} - void operator()(_Tp& __r) const { (__r.*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun_ref_t : public unary_function<_Tp,void> { - typedef void (_Tp::*__fun_type)(void) const; -public: - explicit const_mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} - void operator()(const _Tp& __r) const { (__r.*_M_f)(); } -private: - __fun_type _M_f; -}; - -template -class mem_fun1_t : public binary_function<_Tp*,_Arg,void> { - typedef void (_Tp::*__fun_type)(_Arg); -public: - explicit mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} - void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun1_t - : public binary_function { - typedef void (_Tp::*__fun_type)(_Arg) const; -public: - explicit const_mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} - void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class mem_fun1_ref_t - : public binary_function<_Tp,_Arg,void> { - typedef void (_Tp::*__fun_type)(_Arg); -public: - explicit mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} - void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class const_mem_fun1_ref_t - : public binary_function<_Tp,_Arg,void> { - typedef void (_Tp::*__fun_type)(_Arg) const; -public: - explicit const_mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} - void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } -private: - __fun_type _M_f; -}; - -template -class pointer_to_unary_function : public unary_function<_Arg, void> { - typedef void (*__fun_type)(_Arg); - __fun_type _M_ptr; -public: - pointer_to_unary_function() {} - explicit pointer_to_unary_function(__fun_type __x) : _M_ptr(__x) {} - void operator()(_Arg __x) const { _M_ptr(__x); } -}; - -template -class pointer_to_binary_function : public binary_function<_Arg1,_Arg2,void> { - typedef void (*__fun_type)(_Arg1, _Arg2); - __fun_type _M_ptr; -public: - pointer_to_binary_function() {} - explicit pointer_to_binary_function(__fun_type __x) : _M_ptr(__x) {} - void operator()(_Arg1 __x, _Arg2 __y) const { _M_ptr(__x, __y); } -}; - -#endif /*_STLP_DONT_RETURN_VOID && !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION*/ - -#else /*!_STLP_DONT_RETURN_VOID || !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION || !_STLP_MEMBER_TEMPLATE_CLASSES*/ - -//mem_fun_t -template -class mem_fun_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr _Base; -public: - explicit mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//const_mem_fun_t -template -class const_mem_fun_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const _Base; -public: - explicit const_mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//mem_fun_ref_t -template -class mem_fun_ref_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref _Base; -public: - explicit mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//const_mem_fun_ref_t -template -class const_mem_fun_ref_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const _Base; -public: - explicit const_mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//mem_fun1_t -template -class mem_fun1_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr _Base; -public: - explicit mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//const_mem_fun1_t -template -class const_mem_fun1_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const _Base; -public: - explicit const_mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//mem_fun1_ref_t -template -class mem_fun1_ref_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref _Base; -public: - explicit mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - -//const_mem_fun1_t -template -class const_mem_fun1_ref_t : - public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const { - typedef typename - _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const _Base; -public: - explicit const_mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} -}; - - -template -class pointer_to_unary_function : -public _Ptr_fun1<_Result,_Arg> { - typedef typename - _Ptr_fun1<_Result,_Arg>::__fun_type __fun_type; -public: - explicit pointer_to_unary_function(__fun_type __f) - : _Ptr_fun1<_Result,_Arg>(__f) {} -}; - -template -class pointer_to_binary_function : -public _Ptr_fun2<_Result,_Arg1,_Arg2> { - typedef typename - _Ptr_fun2<_Result,_Arg1,_Arg2>::__fun_type __fun_type; -public: - explicit pointer_to_binary_function(__fun_type __f) - : _Ptr_fun2<_Result,_Arg1,_Arg2>(__f) {} -}; - -#endif /*!_STLP_DONT_RETURN_VOID || !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION || !_STLP_MEMBER_TEMPLATE_CLASSES*/ - - -# if !defined (_STLP_MEMBER_POINTER_PARAM_BUG) -// Mem_fun adaptor helper functions. There are only two: -// mem_fun and mem_fun_ref. (mem_fun1 and mem_fun1_ref -// are provided for backward compatibility, but they are no longer -// part of the C++ standard.) - -template -inline mem_fun_t<_Result,_Tp> -mem_fun(_Result (_Tp::*__f)()) { return mem_fun_t<_Result,_Tp>(__f); } - -template -inline const_mem_fun_t<_Result,_Tp> -mem_fun(_Result (_Tp::*__f)() const) { return const_mem_fun_t<_Result,_Tp>(__f); } - -template -inline mem_fun_ref_t<_Result,_Tp> -mem_fun_ref(_Result (_Tp::*__f)()) { return mem_fun_ref_t<_Result,_Tp>(__f); } - -template -inline const_mem_fun_ref_t<_Result,_Tp> -mem_fun_ref(_Result (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Result,_Tp>(__f); } - -template -inline mem_fun1_t<_Result,_Tp,_Arg> -mem_fun(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); } - -template -inline const_mem_fun1_t<_Result,_Tp,_Arg> -mem_fun(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); } - -template -inline mem_fun1_ref_t<_Result,_Tp,_Arg> -mem_fun_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } - -template -inline const_mem_fun1_ref_t<_Result,_Tp,_Arg> -mem_fun_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } - -# if !(defined (_STLP_NO_EXTENSIONS) || defined (_STLP_NO_ANACHRONISMS)) -// mem_fun1 and mem_fun1_ref are no longer part of the C++ standard, -// but they are provided for backward compatibility. -template -inline mem_fun1_t<_Result,_Tp,_Arg> -mem_fun1(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); } - -template -inline const_mem_fun1_t<_Result,_Tp,_Arg> -mem_fun1(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); } - -template -inline mem_fun1_ref_t<_Result,_Tp,_Arg> -mem_fun1_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } - -template -inline const_mem_fun1_ref_t<_Result,_Tp,_Arg> -mem_fun1_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } - -# endif /* _STLP_NO_EXTENSIONS */ - -# endif /* _STLP_MEMBER_POINTER_PARAM_BUG */ - -template -inline pointer_to_unary_function<_Arg, _Result> -ptr_fun(_Result (*__f)(_Arg)) -{ return pointer_to_unary_function<_Arg, _Result>(__f); } - -template -inline pointer_to_binary_function<_Arg1,_Arg2,_Result> -ptr_fun(_Result (*__f)(_Arg1, _Arg2)) -{ return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f); } - -_STLP_END_NAMESPACE diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_function_base.h --- a/epoc32/include/stdapis/stlport/stl/_function_base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,226 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_FUNCTION_BASE_H -#define _STLP_INTERNAL_FUNCTION_BASE_H - -#ifndef _STLP_CONFIG_H -#include -#endif - -_STLP_BEGIN_NAMESPACE - -template -struct unary_function { - typedef _Arg argument_type; - typedef _Result result_type; -}; - -template -struct binary_function { - typedef _Arg1 first_argument_type; - typedef _Arg2 second_argument_type; - typedef _Result result_type; -}; - -template -struct equal_to : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } -}; - -template -struct not_equal_to : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } -}; - -template -struct greater : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } -}; - -template -struct less : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } -}; - -template -struct greater_equal : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } -}; - -template -struct less_equal : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } -}; - -template -less<_Tp> __less(_Tp* ) { return less<_Tp>(); } - -template -equal_to<_Tp> __equal_to(_Tp* ) { return equal_to<_Tp>(); } - -template -struct plus : public binary_function<_Tp,_Tp,_Tp> { - _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } -}; - -template -struct minus : public binary_function<_Tp,_Tp,_Tp> { - _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } -}; - -template -plus<_Tp> __plus(_Tp* ) { return plus<_Tp>(); } - -template -minus<_Tp> __minus(_Tp* ) { return minus<_Tp>(); } - -template -struct multiplies : public binary_function<_Tp,_Tp,_Tp> { - _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } -}; - -template -struct divides : public binary_function<_Tp,_Tp,_Tp> { - _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } -}; - -template -struct modulus : public binary_function<_Tp,_Tp,_Tp> -{ - _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } -}; - -template -struct negate : public unary_function<_Tp,_Tp> -{ - _Tp operator()(const _Tp& __x) const { return -__x; } -}; - -template -struct logical_and : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } -}; - -template -struct logical_or : public binary_function<_Tp,_Tp,bool> -{ - bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } -}; - -template -struct logical_not : public unary_function<_Tp,bool> -{ - bool operator()(const _Tp& __x) const { return !__x; } -}; - -template -struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { - const typename _Pair::first_type& operator()(const _Pair& __x) const { - return __x.first; - } -}; - -template -struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> -{ - const typename _Pair::second_type& operator()(const _Pair& __x) const { - return __x.second; - } -}; - -// project1st and project2nd are extensions: they are not part of the standard -template -struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> { - _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; } -}; - -template -struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> { - _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; } -}; - -#ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG -// fbp : sort of select1st just for maps -template -// JDJ (CW Pro1 doesn't like const when first_type is also const) -struct __Select1st_hint : public unary_function<_Pair, _Whatever> { - const _Whatever& operator () (const _Pair& __x) const { return __x.first; } -}; -# define _STLP_SELECT1ST(__x,__y) __Select1st_hint< __x, __y > -# else -# define _STLP_SELECT1ST(__x, __y) _Select1st< __x > -# endif - -template -struct _Identity : public unary_function<_Tp,_Tp> { - const _Tp& operator()(const _Tp& __x) const { return __x; } -}; - -template -struct _Constant_unary_fun { - typedef _Argument argument_type; - typedef _Result result_type; - result_type _M_val; - - _Constant_unary_fun(const result_type& __v) : _M_val(__v) {} - const result_type& operator()(const _Argument&) const { return _M_val; } -}; - -template -struct _Constant_binary_fun { - typedef _Arg1 first_argument_type; - typedef _Arg2 second_argument_type; - typedef _Result result_type; - _Result _M_val; - - _Constant_binary_fun(const _Result& __v) : _M_val(__v) {} - const result_type& operator()(const _Arg1&, const _Arg2&) const { - return _M_val; - } -}; - -// identity_element (not part of the C++ standard). -template inline _Tp __identity_element(plus<_Tp>) { return _Tp(0); } -template inline _Tp __identity_element(multiplies<_Tp>) { return _Tp(1); } - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_FUNCTION_BASE_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_hash_fun.h --- a/epoc32/include/stdapis/stlport/stl/_hash_fun.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_HASH_FUN_H -#define _STLP_HASH_FUN_H - -# ifndef _STLP_CSTDDEF -# include -# endif - -_STLP_BEGIN_NAMESPACE - -template struct hash { }; - -inline size_t __stl_hash_string(const char* __s) -{ - _STLP_FIX_LITERAL_BUG(__s) - unsigned long __h = 0; - for ( ; *__s; ++__s) - __h = 5*__h + *__s; - - return size_t(__h); -} - -_STLP_TEMPLATE_NULL struct hash -{ - size_t operator()(const char* __s) const { _STLP_FIX_LITERAL_BUG(__s) return __stl_hash_string(__s); } -}; - -_STLP_TEMPLATE_NULL struct hash -{ - size_t operator()(const char* __s) const { _STLP_FIX_LITERAL_BUG(__s) return __stl_hash_string(__s); } -}; - -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(char __x) const { return __x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(unsigned char __x) const { return __x; } -}; -#ifndef _STLP_NO_SIGNED_BUILTINS -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(unsigned char __x) const { return __x; } -}; -#endif -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(short __x) const { return __x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(unsigned short __x) const { return __x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(int __x) const { return __x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(unsigned int __x) const { return __x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(long __x) const { return __x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(unsigned long __x) const { return __x; } -}; - -# if defined (_STLP_LONG_LONG) -_STLP_TEMPLATE_NULL struct hash<_STLP_LONG_LONG> { - size_t operator()(long x) const { return x; } -}; -_STLP_TEMPLATE_NULL struct hash { - size_t operator()(unsigned long x) const { return x; } -}; -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_HASH_FUN_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_hashtable.c --- a/epoc32/include/stdapis/stlport/stl/_hashtable.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,471 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_HASHTABLE_C -#define _STLP_HASHTABLE_C - -#ifndef _STLP_INTERNAL_HASHTABLE_H -# include -#endif - -#ifdef _STLP_DEBUG -# define hashtable __WORKAROUND_DBG_RENAME(hashtable) -#endif - -_STLP_BEGIN_NAMESPACE - -# define __PRIME_LIST_BODY { \ - 53ul, 97ul, 193ul, 389ul, 769ul, \ - 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, \ - 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, \ - 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, \ - 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,\ - 1610612741ul, 3221225473ul, 4294967291ul \ -} - -#if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -template -const size_t _Stl_prime<_Tp>::_M_list[__stl_num_primes] = __PRIME_LIST_BODY; -#else -__DECLARE_INSTANCE(const size_t, - _Stl_prime_type::_M_list[], =__PRIME_LIST_BODY); -#endif /* _STLP_STATIC_TEMPLATE_DATA */ - -# undef __PRIME_LIST_BODY - -// fbp: these defines are for outline methods definitions. -// needed to definitions to be portable. Should not be used in method bodies. - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -# define __size_type__ size_t -# define size_type size_t -# define value_type _Val -# define key_type _Key -# define _Node _Hashtable_node<_Val> -# define __reference__ _Val& - -# define __iterator__ _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> -# define __const_iterator__ _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> -# else -# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::size_type -# define __reference__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::reference -# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::iterator -# endif - -template -_Hashtable_node<_Val>* -_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_skip_to_next() { - size_t __bucket = _M_ht->_M_bkt_num(_M_cur->_M_val); - size_t __h_sz; - __h_sz = this->_M_ht->bucket_count(); - - _Node* __i=0; - while (__i==0 && ++__bucket < __h_sz) - __i = (_Node*)_M_ht->_M_buckets[__bucket]; - return __i; -} - -template -__size_type__ -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_next_size(size_type __n) const { - const size_type* __first = (const size_type*)_Stl_prime_type::_M_list; - const size_type* __last = (const size_type*)_Stl_prime_type::_M_list + (int)__stl_num_primes; - const size_type* pos = __lower_bound(__first, __last, __n, __less((size_type*)0), (ptrdiff_t*)0); - return (pos == __last ? *(__last - 1) : *pos); -} - -template -bool -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_equal( - const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht1, - const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht2) -{ - // typedef _Hashtable_node<_Val> _Node; - if (__ht1.bucket_count() != __ht2.bucket_count()) - return false; - for (size_t __n = 0; __n < __ht1.bucket_count(); ++__n) { - const _Node* __cur1 = __ht1._M_get_bucket(__n); - const _Node* __cur2 = __ht2._M_get_bucket(__n); - for ( ; __cur1 && __cur2 && __cur1->_M_val == __cur2->_M_val; - __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next) - {} - if (__cur1 || __cur2) - return false; - } - return true; -} - -template -pair< _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> , bool> -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::insert_unique_noresize(const value_type& __obj) -{ - const size_type __n = _M_bkt_num(__obj); - _Node* __first = (_Node*)_M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) - return pair(iterator(__cur, this), false); - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements._M_data; - return pair(iterator(__tmp, this), true); -} - -template -__iterator__ -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::insert_equal_noresize(const value_type& __obj) -{ - const size_type __n = _M_bkt_num(__obj); - _Node* __first = (_Node*)_M_buckets[__n]; - - for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) - if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) { - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __cur->_M_next; - __cur->_M_next = __tmp; - ++_M_num_elements._M_data; - return iterator(__tmp, this); - } - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements._M_data; - return iterator(__tmp, this); -} - -template -__reference__ -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_insert(const value_type& __obj) -{ - resize(_M_num_elements._M_data + 1); - - size_type __n = _M_bkt_num(__obj); - _Node* __first = (_Node*)_M_buckets[__n]; - - _Node* __tmp = _M_new_node(__obj); - __tmp->_M_next = __first; - _M_buckets[__n] = __tmp; - ++_M_num_elements._M_data; - return __tmp->_M_val; -} - -template -__reference__ -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::find_or_insert(const value_type& __obj) -{ - - _Node* __first = _M_find(_M_get_key(__obj)); - if (__first) - return __first->_M_val; - else - return _M_insert(__obj); -} - -template -pair< _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>, - _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> > -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::equal_range(const key_type& __key) -{ - typedef pair _Pii; - const size_type __n = _M_bkt_num_key(__key); - - for (_Node* __first = (_Node*)_M_buckets[__n]; __first; __first = __first->_M_next) - if (_M_equals(_M_get_key(__first->_M_val), __key)) { - for (_Node* __cur = __first->_M_next; __cur; __cur = __cur->_M_next) - if (!_M_equals(_M_get_key(__cur->_M_val), __key)) - return _Pii(iterator(__first, this), iterator(__cur, this)); - for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) - if (_M_buckets[__m]) - return _Pii(iterator(__first, this), - iterator((_Node*)_M_buckets[__m], this)); - return _Pii(iterator(__first, this), end()); - } - return _Pii(end(), end()); -} - -template -pair< _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>, - _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> > -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::equal_range(const key_type& __key) const -{ - typedef pair _Pii; - const size_type __n = _M_bkt_num_key(__key); - - for (const _Node* __first = (_Node*)_M_buckets[__n] ; - __first; - __first = __first->_M_next) { - if (_M_equals(_M_get_key(__first->_M_val), __key)) { - for (const _Node* __cur = __first->_M_next; - __cur; - __cur = __cur->_M_next) - if (!_M_equals(_M_get_key(__cur->_M_val), __key)) - return _Pii(const_iterator(__first, this), - const_iterator(__cur, this)); - for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) - if (_M_buckets[__m]) - return _Pii(const_iterator(__first, this), - const_iterator((_Node*)_M_buckets[__m], this)); - return _Pii(const_iterator(__first, this), end()); - } - } - return _Pii(end(), end()); -} - -template -__size_type__ -hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::erase(const key_type& __key) -{ - const size_type __n = _M_bkt_num_key(__key); - _Node* __first = (_Node*)_M_buckets[__n]; - size_type __erased = 0; - - if (__first) { - _Node* __cur = __first; - _Node* __next = __cur->_M_next; - while (__next) { - if (_M_equals(_M_get_key(__next->_M_val), __key)) { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - __next = __cur->_M_next; - ++__erased; - --_M_num_elements._M_data; - } - else { - __cur = __next; - __next = __cur->_M_next; - } - } - if (_M_equals(_M_get_key(__first->_M_val), __key)) { - _M_buckets[__n] = __first->_M_next; - _M_delete_node(__first); - ++__erased; - --_M_num_elements._M_data; - } - } - return __erased; -} - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::erase(const const_iterator& __it) -{ - // const iterator& __it = __REINTERPRET_CAST(const iterator&,_c_it); - const _Node* __p = __it._M_cur; - if (__p) { - const size_type __n = _M_bkt_num(__p->_M_val); - _Node* __cur = (_Node*)_M_buckets[__n]; - - if (__cur == __p) { - _M_buckets[__n] = __cur->_M_next; - _M_delete_node(__cur); - --_M_num_elements._M_data; - } - else { - _Node* __next = __cur->_M_next; - while (__next) { - if (__next == __p) { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - --_M_num_elements._M_data; - break; - } - else { - __cur = __next; - __next = __cur->_M_next; - } - } - } - } -} - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::erase(const_iterator _c_first, const_iterator _c_last) -{ - iterator& __first = (iterator&)_c_first; - iterator& __last = (iterator&)_c_last; - size_type __f_bucket = __first._M_cur ? - _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size(); - size_type __l_bucket = __last._M_cur ? - _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size(); - if (__first._M_cur == __last._M_cur) - return; - else if (__f_bucket == __l_bucket) - _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur); - else { - _M_erase_bucket(__f_bucket, __first._M_cur, 0); - for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n) - _M_erase_bucket(__n, 0); - if (__l_bucket != _M_buckets.size()) - _M_erase_bucket(__l_bucket, __last._M_cur); - } -} - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::resize(size_type __num_elements_hint) -{ - const size_type __old_n = _M_buckets.size(); - if (__num_elements_hint > __old_n) { - const size_type __n = _M_next_size(__num_elements_hint); - if (__n > __old_n) { - _BucketVector __tmp(__n, (void*)(0), - _M_buckets.get_allocator()); - _STLP_PUSH_CLEANUP_ITEM(_BucketVector, &__tmp); - _STLP_TRY { - for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) { - _Node* __first = (_Node*)_M_buckets[__bucket]; - while (__first) { - size_type __new_bucket = _M_bkt_num(__first->_M_val, __n); - _M_buckets[__bucket] = __first->_M_next; - __first->_M_next = (_Node*)__tmp[__new_bucket]; - __tmp[__new_bucket] = __first; - __first = (_Node*)_M_buckets[__bucket]; - } - } - _M_buckets.swap(__tmp); - } - _STLP_CATCH_ALL { - for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) { - while (__tmp[__bucket]) { - _Node* __next = ((_Node*)__tmp[__bucket])->_M_next; - _M_delete_node((_Node*)__tmp[__bucket]); - __tmp[__bucket] = __next; - } - } - _STLP_RETHROW; - } -#ifdef _STLP_USE_TRAP_LEAVE - CleanupStack::Pop(); -#endif - - } - } -} - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last) -{ - _Node* __cur = (_Node*)_M_buckets[__n]; - if (__cur == __first) - _M_erase_bucket(__n, __last); - else { - _Node* __next; - for (__next = __cur->_M_next; - __next != __first; - __cur = __next, __next = __cur->_M_next) - ; - while (__next != __last) { - __cur->_M_next = __next->_M_next; - _M_delete_node(__next); - __next = __cur->_M_next; - --_M_num_elements._M_data; - } - } -} - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::_M_erase_bucket(const size_type __n, _Node* __last) -{ - _Node* __cur = (_Node*)_M_buckets[__n]; - while (__cur && __cur != __last) { - _Node* __next = __cur->_M_next; - _M_delete_node(__cur); - __cur = __next; - _M_buckets[__n] = __cur; - --_M_num_elements._M_data; - } -} - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::clear() -{ - for (size_type __i = 0; __i < _M_buckets.size(); ++__i) { - _Node* __cur = (_Node*)_M_buckets[__i]; - while (__cur != 0) { - _Node* __next = __cur->_M_next; - _M_delete_node(__cur); - __cur = __next; - } - _M_buckets[__i] = 0; - } - _M_num_elements._M_data = 0; -} - - -template -void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> - ::_M_copy_from(const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht) -{ - _M_buckets.clear(); - _M_buckets.reserve(__ht._M_buckets.size()); - _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (void*) 0); - _STLP_TRY { - for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { - const _Node* __cur = (_Node*)__ht._M_buckets[__i]; - if (__cur) { - _Node* __xcopy = _M_new_node(__cur->_M_val); - _M_buckets[__i] = __xcopy; - - for (_Node* __next = __cur->_M_next; - __next; - __cur = __next, __next = __cur->_M_next) { - __xcopy->_M_next = _M_new_node(__next->_M_val); - __xcopy = __xcopy->_M_next; - } - } - } - _M_num_elements._M_data = __ht._M_num_elements._M_data; - } - _STLP_UNWIND(clear()); -} - -# undef __iterator__ -# undef const_iterator -# undef __size_type__ -# undef __reference__ -# undef size_type -# undef value_type -# undef key_type -# undef _Node -# undef __stl_num_primes -# undef hashtable - -_STLP_END_NAMESPACE - -#endif /* _STLP_HASHTABLE_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_heap.c --- a/epoc32/include/stdapis/stlport/stl/_heap.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,242 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_HEAP_C -#define _STLP_HEAP_C - -#ifndef _STLP_INTERNAL_HEAP_H -# include -#endif - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -_STLP_INLINE_LOOP -void -__push_heap(_RandomAccessIterator __first, - _Distance __holeIndex, _Distance __topIndex, _Tp __val) -{ - _Distance __parent = (__holeIndex - 1) / 2; - while (__holeIndex > __topIndex && *(__first + __parent) < __val) { - *(__first + __holeIndex) = *(__first + __parent); - __holeIndex = __parent; - __parent = (__holeIndex - 1) / 2; - } - *(__first + __holeIndex) = __val; -} - -template -inline void -__push_heap_aux(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Distance*, _Tp*) -{ - __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), - _Tp(*(__last - 1))); -} - -template -void -push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) -{ - __push_heap_aux(__first, __last, - _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator)); -} - - -template -_STLP_INLINE_LOOP -void -__push_heap(_RandomAccessIterator __first, _Distance __holeIndex, - _Distance __topIndex, _Tp __val, _Compare __comp) -{ - _Distance __parent = (__holeIndex - 1) / 2; - while (__holeIndex > __topIndex && __comp(*(__first + __parent), __val)) { - *(__first + __holeIndex) = *(__first + __parent); - __holeIndex = __parent; - __parent = (__holeIndex - 1) / 2; - } - *(__first + __holeIndex) = __val; -} - -template -inline void -__push_heap_aux(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Compare __comp, - _Distance*, _Tp*) -{ - __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), - _Tp(*(__last - 1)), __comp); -} - -template -void -push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Compare __comp) -{ - __push_heap_aux(__first, __last, __comp, - _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator)); -} - -template -void -__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, - _Distance __len, _Tp __val) { - _Distance __topIndex = __holeIndex; - _Distance __secondChild = 2 * __holeIndex + 2; - while (__secondChild < __len) { - if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) - __secondChild--; - *(__first + __holeIndex) = *(__first + __secondChild); - __holeIndex = __secondChild; - __secondChild = 2 * (__secondChild + 1); - } - if (__secondChild == __len) { - *(__first + __holeIndex) = *(__first + (__secondChild - 1)); - __holeIndex = __secondChild - 1; - } - __push_heap(__first, __holeIndex, __topIndex, __val); -} - - -template -inline void -__pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*) { - __pop_heap(__first, __last - 1, __last - 1, - _Tp(*(__last - 1)), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); -} - -template -void pop_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last) { - __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator)); -} - -template -void -__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, - _Distance __len, _Tp __val, _Compare __comp) -{ - _Distance __topIndex = __holeIndex; - _Distance __secondChild = 2 * __holeIndex + 2; - while (__secondChild < __len) { - if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) - __secondChild--; - *(__first + __holeIndex) = *(__first + __secondChild); - __holeIndex = __secondChild; - __secondChild = 2 * (__secondChild + 1); - } - if (__secondChild == __len) { - *(__first + __holeIndex) = *(__first + (__secondChild - 1)); - __holeIndex = __secondChild - 1; - } - __push_heap(__first, __holeIndex, __topIndex, __val, __comp); -} - - -template -inline void -__pop_heap_aux(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Tp*, _Compare __comp) -{ - __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp, - _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); -} - - -template -void -pop_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Compare __comp) -{ - __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator), __comp); -} - -template -_STLP_INLINE_LOOP -void -__make_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Tp*, _Distance*) -{ - if (__last - __first < 2) return; - _Distance __len = __last - __first; - _Distance __parent = (__len - 2)/2; - - while (true) { - __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent))); - if (__parent == 0) return; - __parent--; - } -} - -template -void -make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) -{ - __make_heap(__first, __last, - _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); -} - -template -_STLP_INLINE_LOOP -void -__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Compare __comp, _Tp*, _Distance*) -{ - if (__last - __first < 2) return; - _Distance __len = __last - __first; - _Distance __parent = (__len - 2)/2; - - while (true) { - __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)), - __comp); - if (__parent == 0) return; - __parent--; - } -} - -template -void -make_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Compare __comp) -{ - __make_heap(__first, __last, __comp, - _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_HEAP_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_heap.h --- a/epoc32/include/stdapis/stlport/stl/_heap.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Hewlett-Packard Company makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_HEAP_H -#define _STLP_INTERNAL_HEAP_H - -#ifndef _STLP_CONFIG_H -#include -#endif - -_STLP_BEGIN_NAMESPACE - -// Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap. - -template -void -push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last); - - -template -void -push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _Compare __comp); - -template -void -__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, - _Distance __len, _Tp __val); - -template -inline void -__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _RandomAccessIterator __result, _Tp __val, _Distance*) -{ - *__result = *__first; - __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __val); -} - -template -void pop_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last); - -template -void -__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, - _Distance __len, _Tp __val, _Compare __comp); - -template -inline void -__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, - _RandomAccessIterator __result, _Tp __val, _Compare __comp, - _Distance*) -{ - *__result = *__first; - __adjust_heap(__first, _Distance(0), _Distance(__last - __first), - __val, __comp); -} - -template -void -pop_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Compare __comp); - -template -void -make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last); - -template -void -make_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Compare __comp); - -template -_STLP_INLINE_LOOP -void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) -{ - while (__last - __first > 1) - pop_heap(__first, __last--); -} - -template -_STLP_INLINE_LOOP -void -sort_heap(_RandomAccessIterator __first, - _RandomAccessIterator __last, _Compare __comp) -{ - while (__last - __first > 1) - pop_heap(__first, __last--, __comp); -} - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_HEAP_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ios.c --- a/epoc32/include/stdapis/stlport/stl/_ios.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_IOS_C -#define _STLP_IOS_C - -#ifndef _STLP_INTERNAL_IOS_H -# include -#endif - -#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#ifndef _STLP_INTERNAL_STREAMBUF -# include -#endif - -#ifndef _STLP_INTERNAL_NUMPUNCT_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// basic_ios<>'s non-inline member functions - -// Public constructor, taking a streambuf. -template -basic_ios<_CharT, _Traits> - ::basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf) - : ios_base(), - _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0) -{ - init(__streambuf); -} - -template -basic_streambuf<_CharT, _Traits>* -basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __buf) -{ - basic_streambuf<_CharT, _Traits>* __tmp = _M_streambuf; - _M_streambuf = __buf; - this->clear(); - return __tmp; -} - -template -basic_ios<_CharT, _Traits>& -basic_ios<_CharT, _Traits>::copyfmt(const basic_ios<_CharT, _Traits>& __x) -{ - _M_invoke_callbacks(erase_event); - _M_copy_state(__x); // Inherited from ios_base. - _M_fill = __x._M_fill; - _M_tied_ostream = __x._M_tied_ostream; - _M_invoke_callbacks(copyfmt_event); - // this->_M_set_exception_mask(__x.exceptions()); //Exceptions should copy not simply set. should throw exception if mask&state ==1 ,while copying exception. - this->exceptions(__x.exceptions()); - return *this; -} -//#ifndef __SYMBIAN32__ // Moved to src -template -locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) -{ - locale __tmp = ios_base::imbue(__loc); - - if (_M_streambuf) - _M_streambuf->pubimbue(__loc); - - // no throwing here -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - this->_M_cached_ctype = __loc._M_get_facet(ctype::GetFacetLocaleId()) ; - this->_M_cached_numpunct = __loc._M_get_facet(numpunct::GetFacetLocaleId()) ; -#else - this->_M_cached_ctype = __loc._M_get_facet(ctype::id) ; - this->_M_cached_numpunct = __loc._M_get_facet(numpunct::id) ; -#endif //__LIBSTD_CPP_SYMBIAN32_WSD__ - this->_M_cached_grouping = ((numpunct*)_M_cached_numpunct)->grouping() ; - return __tmp; -} -//#endif // __SYMBIAN32__ -// Protected constructor and initialization functions. The default -// constructor creates an uninitialized basic_ios, and init() initializes -// all of the members to the values in Table 89 of the C++ standard. - -template -basic_ios<_CharT, _Traits>::basic_ios() - : ios_base(), - _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0) -{} - -template -void -basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) -{ - this->rdbuf(__sb); - this->imbue(locale()); - this->tie(0); - this->_M_set_exception_mask(ios_base::goodbit); - this->_M_clear_nothrow(__sb != 0 ? ios_base::goodbit : ios_base::badbit); - ios_base::flags(ios_base::skipws | ios_base::dec); - ios_base::width(0); - ios_base::precision(6); - this->fill(widen(' ')); - // We don't need to worry about any of the three arrays: they are - // initialized correctly in ios_base's constructor. -} - -// This is never called except from within a catch clause. -template -void basic_ios<_CharT, _Traits>::_M_handle_exception(ios_base::iostate __flag) -{ - this->_M_setstate_nothrow(__flag); - if (this->_M_get_exception_mask() & __flag) - _STLP_RETHROW; -} - -_STLP_END_NAMESPACE - -#endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ - -#endif /* _STLP_IOS_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ios.h --- a/epoc32/include/stdapis/stlport/stl/_ios.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,204 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_INTERNAL_IOS_H -#define _STLP_INTERNAL_IOS_H - - -#ifndef _STLP_IOS_BASE_H -# include -#endif - -#ifndef _STLP_INTERNAL_CTYPE_H -# include -#endif -#ifndef _STLP_INTERNAL_NUMPUNCT_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// ---------------------------------------------------------------------- - -// Class basic_ios, a subclass of ios_base. The only important difference -// between the two is that basic_ios is a class template, parameterized -// by the character type. ios_base exists to factor out all of the -// common properties that don't depend on the character type. - -// The second template parameter, _Traits, defaults to char_traits<_CharT>. -// The default is declared in header , and it isn't declared here -// because C++ language rules do not allow it to be declared twice. - -template -#ifdef __SYMBIAN32__ -class basic_ios : public ios_base { -#else -class basic_ios : public ios_base { -#endif - friend class ios_base; -public: // Synonyms for types. - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - -public: // Constructor, destructor. - explicit basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf); - virtual ~basic_ios() {} - -public: // Members from clause 27.4.4.2 - basic_ostream<_CharT, _Traits>* tie() const { - return _M_tied_ostream; - } - basic_ostream<_CharT, _Traits>* - tie(basic_ostream* __new_tied_ostream) { - basic_ostream* __tmp = _M_tied_ostream; - _M_tied_ostream = __new_tied_ostream; - return __tmp; - } - - basic_streambuf<_CharT, _Traits>* rdbuf() const - { return _M_streambuf; } - - basic_streambuf<_CharT, _Traits>* - rdbuf(basic_streambuf*); - - // Copies __x's state to *this. - basic_ios<_CharT, _Traits>& copyfmt(const basic_ios<_CharT, _Traits>& __x); - - char_type fill() const { return _M_fill; } - char_type fill(char_type __fill) { - char_type __tmp(_M_fill); - _M_fill = __fill; - return __tmp; - } - -public: // Members from 27.4.4.3. These four functions - // can almost be defined in ios_base. - - void clear(iostate __state = goodbit) { - _M_clear_nothrow(this->rdbuf() ? __state : iostate(__state|ios_base::badbit)); - _M_check_exception_mask(); - } - void setstate(iostate __state) { this->clear(rdstate() | __state); } - - iostate exceptions() const { return this->_M_get_exception_mask(); } - void exceptions(iostate __mask) { - this->_M_set_exception_mask(__mask); - this->clear(this->rdstate()); - } - -public: // Locale-related member functions. - locale imbue(const locale&); - - inline char narrow(_CharT, char) const ; - inline _CharT widen(char) const; - - // Helper function that makes testing for EOF more convenient. - static bool _STLP_CALL _S_eof(int_type __c) { - const int_type __eof = _Traits::eof(); - return _Traits::eq_int_type(__c, __eof); - } - -protected: - basic_ios(); - - void init(basic_streambuf<_CharT, _Traits>* __streambuf); - -public: - - // Helper function used in istream and ostream. It is called only from - // a catch clause. - void _M_handle_exception(ios_base::iostate __flag); - -private: // Data members - char_type _M_fill; // The fill character, used for padding. - - basic_streambuf<_CharT, _Traits>* _M_streambuf; - basic_ostream<_CharT, _Traits>* _M_tied_ostream; - -}; - - -template -inline char -basic_ios<_CharT, _Traits>::narrow(_CharT __c, char __default) const -{ return ((const ctype<_CharT>*)this->_M_ctype_facet())->narrow(__c, __default); } - -template -inline _CharT -basic_ios<_CharT, _Traits>::widen(char __c) const -{ - return ((const ctype<_CharT>*)this->_M_ctype_facet())->widen(__c); } - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_ios >; -# if ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_ios >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -# if !defined (_STLP_NO_METHOD_SPECIALIZATION) -_STLP_TEMPLATE_NULL -inline char -basic_ios >::narrow(char __c, char) const -{ - return __c; -} - -_STLP_TEMPLATE_NULL -inline char -basic_ios >::widen(char __c) const -{ - return __c; -} -# endif /* _STLP_NO_METHOD_SPECIALIZATION */ - - -_STLP_END_NAMESPACE - -#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -// The following is needed to ensure that the inlined _Stl_loc_init functions -// that ios_base::_Loc_init::_Loc_init() calls are found eventually. -// Otherwise, undefined externs may be caused. - -#if defined(__BORLANDC__) && defined(_RTLDLL) -# ifndef _STLP_INTERNAL_NUM_PUT_H -# include -# endif -# ifndef _STLP_INTERNAL_NUM_GET_H -# include -# endif -# ifndef _STLP_INTERNAL_MONETARY_H -# include -# endif -# ifndef _STLP_INTERNAL_TIME_FACETS_H -# include -# endif -#endif - -#endif /* _STLP_IOS */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ios_base.h --- a/epoc32/include/stdapis/stlport/stl/_ios_base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,439 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_IOS_BASE_H -#define _STLP_IOS_BASE_H - -#ifndef _STLP_STDEXCEPT -#include -#endif -#ifndef _STLP_UTILITY -#include -#endif -#ifndef _STLP_INTERNAL_LOCALE_H -#include -#endif -#ifndef _STLP_STRING_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// ---------------------------------------------------------------------- - -// Class ios_base. This is the base class of the ios hierarchy, which -// includes basic_istream and basic_ostream. Classes in the ios -// hierarchy are actually quite simple: they are just glorified -// wrapper classes. They delegate buffering and physical character -// manipulation to the streambuf classes, and they delegate most -// formatting tasks to a locale. - -#ifdef __SYMBIAN32__ -class ios_base { -#else -class _STLP_CLASS_DECLSPEC ios_base { -#endif -public: - - class _STLP_CLASS_DECLSPEC failure : public __Named_exception { - public: - _STLP_DECLSPEC explicit failure(const string&); - _STLP_DECLSPEC virtual ~failure() _STLP_NOTHROW_INHERENTLY; - }; - - typedef int fmtflags; - typedef int iostate; - typedef int openmode; - typedef int seekdir; - -# ifndef _STLP_NO_ANACHRONISMS - typedef fmtflags fmt_flags; -# endif - - // Formatting flags. -# ifdef _STLP_STATIC_CONST_INIT_BUG - enum { -# else - // boris : type for all those constants is int - static const int -# endif - left = 0x0001, - right = 0x0002, - internal = 0x0004, - dec = 0x0008, - hex = 0x0010, - oct = 0x0020, - fixed = 0x0040, - scientific = 0x0080, - boolalpha = 0x0100, - showbase = 0x0200, - showpoint = 0x0400, - showpos = 0x0800, - skipws = 0x1000, - unitbuf = 0x2000, - uppercase = 0x4000, - adjustfield = left | right | internal, - basefield = dec | hex | oct, - floatfield = scientific | fixed, - - // State flags. - goodbit = 0x00, - badbit = 0x01, - eofbit = 0x02, - failbit = 0x04, - - // Openmode flags. - __default_mode = 0x0, /* implementation detail */ - app = 0x01, - ate = 0x02, - binary = 0x04, - in = 0x08, - out = 0x10, - trunc = 0x20, - - // Seekdir flags - - beg = 0x01, - cur = 0x02, - end = 0x04 -# ifdef _STLP_STATIC_CONST_INIT_BUG - } -# endif - ; - -public: // Flag-manipulation functions. - fmtflags flags() const { return _M_fmtflags; } - fmtflags flags(fmtflags __flags) { - fmtflags __tmp = _M_fmtflags; - _M_fmtflags = __flags; - return __tmp; - } - - fmtflags setf(fmtflags __flag) { - fmtflags __tmp = _M_fmtflags; - _M_fmtflags |= __flag; - return __tmp; - } - fmtflags setf(fmtflags __flag, fmtflags __mask) { - fmtflags __tmp = _M_fmtflags; - _M_fmtflags &= ~__mask; - _M_fmtflags |= __flag & __mask; - return __tmp; - } - void unsetf(fmtflags __mask) { _M_fmtflags &= ~__mask; } - - streamsize precision() const { return _M_precision; } - streamsize precision(streamsize __newprecision) { - streamsize __tmp = _M_precision; - _M_precision = __newprecision; - return __tmp; - } - - streamsize width() const { return _M_width; } - streamsize width(streamsize __newwidth) { - streamsize __tmp = _M_width; - _M_width = __newwidth; - return __tmp; - } - -public: // Locales - _STLP_DECLSPEC locale imbue(const locale&); - _STLP_DECLSPEC locale getloc() const;// { return _M_locale; } - -public: // Auxiliary storage. - _STLP_DECLSPEC static int _STLP_CALL xalloc(); - _STLP_DECLSPEC long& iword(int __index); - _STLP_DECLSPEC void*& pword(int __index); - -public: // Destructor. - _STLP_DECLSPEC virtual ~ios_base(); - -public: // Callbacks. - enum event { erase_event, imbue_event, copyfmt_event }; - typedef void (*event_callback)(event, ios_base&, int __index); - _STLP_DECLSPEC void register_callback(event_callback __fn, int __index); - -public: // This member function affects only - // the eight predefined ios objects: - // cin, cout, etc. - _STLP_DECLSPEC static bool _STLP_CALL sync_with_stdio(bool __sync = true); - -public: // The C++ standard requires only that these - // member functions be defined in basic_ios. - // We define them in the non-template - // base class to avoid code duplication. - operator void*() const { return !fail() ? (void*) __CONST_CAST(ios_base*,this) : (void*) 0; } - bool operator!() const { return fail(); } - - iostate rdstate() const { return _M_iostate; } - - bool good() const { return _M_iostate == 0; } - bool eof() const { return (_M_iostate & eofbit) != 0; } - bool fail() const { return (_M_iostate & (failbit | badbit)) != 0; } - bool bad() const { return (_M_iostate & badbit) != 0; } - -protected: // The functional protected interface. - - // Copies the state of __x to *this. This member function makes it - // possible to implement basic_ios::copyfmt without having to expose - // ios_base's private data members. Does not copy _M_exception_mask - // or _M_iostate. - _STLP_DECLSPEC void _M_copy_state(const ios_base& __x); - - void _M_setstate_nothrow(iostate __state) { _M_iostate |= __state; } - void _M_clear_nothrow(iostate __state) { _M_iostate = __state; } - iostate _M_get_exception_mask() const { return _M_exception_mask; } - void _M_set_exception_mask(iostate __mask) { _M_exception_mask = __mask; } - void _M_check_exception_mask() { - if (_M_iostate & _M_exception_mask) - _M_throw_failure(); - } - - _STLP_DECLSPEC void _M_invoke_callbacks(event); - _STLP_DECLSPEC void _M_throw_failure(); - - _STLP_DECLSPEC ios_base(); // Default constructor. - -protected: // Initialization of the I/O system - static void _STLP_CALL _S_initialize(); - static void _STLP_CALL _S_uninitialize(); -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static bool _S_was_synced; -# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ - friend void CallIosInit(); -private: // Invalidate the copy constructor and - // assignment operator. - ios_base(const ios_base&); - void operator=(const ios_base&); - -private: // Data members. - - fmtflags _M_fmtflags; // Flags - iostate _M_iostate; - openmode _M_openmode; - seekdir _M_seekdir; - iostate _M_exception_mask; - - streamsize _M_precision; - streamsize _M_width; - - locale _M_locale; - - pair* _M_callbacks; - size_t _M_num_callbacks; // Size of the callback array. - size_t _M_callback_index; // Index of the next available callback; - // initially zero. - - long* _M_iwords; // Auxiliary storage. The count is zero - size_t _M_num_iwords; // if and only if the pointer is null. - - void** _M_pwords; - size_t _M_num_pwords; - -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static int _S_index; -# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ - - -protected: - // Cached copies of the curent locale's facets. Set by init() and imbue(). - locale::facet* _M_cached_ctype; - locale::facet* _M_cached_numpunct; - string _M_cached_grouping; -public: - // Equivalent to &use_facet< Facet >(getloc()), but faster. - const locale::facet* _M_ctype_facet() const { return _M_cached_ctype; } - const locale::facet* _M_numpunct_facet() const { return _M_cached_numpunct; } - const string& _M_grouping() const { return _M_cached_grouping; } -public: - - // ---------------------------------------------------------------------- - // Nested initializer class. This is an implementation detail, but it's - // prescribed by the standard. The static initializer object (on - // implementations where such a thing is required) is declared in - // - - class _STLP_CLASS_DECLSPEC Init { - public: - _STLP_DECLSPEC Init(); - _STLP_DECLSPEC ~Init(); - private: -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static long _S_count; -# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ - friend class ios_base; - }; - - // this class is needed to ensure locale initialization w/o inclusion - class _STLP_CLASS_DECLSPEC _Loc_init { - public: - _STLP_DECLSPEC _Loc_init(); - _STLP_DECLSPEC ~_Loc_init(); - private: -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static long _S_count; -# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ - friend class locale; - friend class ios_base; - }; - - friend class Init; - -public: -# ifndef _STLP_NO_ANACHRONISMS - // 31.6 Old iostreams members [depr.ios.members] - typedef iostate io_state; - typedef openmode open_mode; - typedef seekdir seek_dir; - typedef _STLP_STD::streamoff streamoff; - typedef _STLP_STD::streampos streampos; -# endif -}; - -inline _STLP_EXP_DECLSPEC locale ios_base::getloc() const - { - return _M_locale; - } - -// ---------------------------------------------------------------------- -// ios_base manipulator functions, from section 27.4.5 of the C++ standard. -// All of them are trivial one-line wrapper functions. - -// fmtflag manipulators, section 27.4.5.1 -inline ios_base& _STLP_CALL boolalpha(ios_base& __s) - { __s.setf(ios_base::boolalpha); return __s;} - -inline ios_base& _STLP_CALL noboolalpha(ios_base& __s) - { __s.unsetf(ios_base::boolalpha); return __s;} - -inline ios_base& _STLP_CALL showbase(ios_base& __s) - { __s.setf(ios_base::showbase); return __s;} - -inline ios_base& _STLP_CALL noshowbase(ios_base& __s) - { __s.unsetf(ios_base::showbase); return __s;} - -inline ios_base& _STLP_CALL showpoint(ios_base& __s) - { __s.setf(ios_base::showpoint); return __s;} - -inline ios_base& _STLP_CALL noshowpoint(ios_base& __s) - { __s.unsetf(ios_base::showpoint); return __s;} - -inline ios_base& _STLP_CALL showpos(ios_base& __s) - { __s.setf(ios_base::showpos); return __s;} - -inline ios_base& _STLP_CALL noshowpos(ios_base& __s) - { __s.unsetf(ios_base::showpos); return __s;} - -inline ios_base& _STLP_CALL skipws(ios_base& __s) - { __s.setf(ios_base::skipws); return __s;} - -inline ios_base& _STLP_CALL noskipws(ios_base& __s) - { __s.unsetf(ios_base::skipws); return __s;} - -inline ios_base& _STLP_CALL uppercase(ios_base& __s) - { __s.setf(ios_base::uppercase); return __s;} - -inline ios_base& _STLP_CALL nouppercase(ios_base& __s) - { __s.unsetf(ios_base::uppercase); return __s;} - -inline ios_base& _STLP_CALL unitbuf(ios_base& __s) - { __s.setf(ios_base::unitbuf); return __s;} - -inline ios_base& _STLP_CALL nounitbuf(ios_base& __s) - { __s.unsetf(ios_base::unitbuf); return __s;} - - -// adjustfield manipulators, section 27.4.5.2 -inline ios_base& _STLP_CALL internal(ios_base& __s) - { __s.setf(ios_base::internal, ios_base::adjustfield); return __s; } - -inline ios_base& _STLP_CALL left(ios_base& __s) - { __s.setf(ios_base::left, ios_base::adjustfield); return __s; } - -inline ios_base& _STLP_CALL right(ios_base& __s) - { __s.setf(ios_base::right, ios_base::adjustfield); return __s; } - -// basefield manipulators, section 27.4.5.3 -inline ios_base& _STLP_CALL dec(ios_base& __s) - { __s.setf(ios_base::dec, ios_base::basefield); return __s; } - -inline ios_base& _STLP_CALL hex(ios_base& __s) - { __s.setf(ios_base::hex, ios_base::basefield); return __s; } - -inline ios_base& _STLP_CALL oct(ios_base& __s) - { __s.setf(ios_base::oct, ios_base::basefield); return __s; } - - -// floatfield manipulators, section 27.4.5.3 -inline ios_base& _STLP_CALL fixed(ios_base& __s) - { __s.setf(ios_base::fixed, ios_base::floatfield); return __s; } - -inline ios_base& _STLP_CALL scientific(ios_base& __s) - { __s.setf(ios_base::scientific, ios_base::floatfield); return __s; } - -#if defined(__BORLANDC__) && defined(_RTLDLL) - -long ios_base::_Loc_init::_S_count = 0; - -void _STLP_CALL _Stl_loc_init_num_put(); -void _STLP_CALL _Stl_loc_init_num_get(); -void _STLP_CALL _Stl_loc_init_monetary(); -void _STLP_CALL _Stl_loc_init_time_facets(); - -inline ios_base::_Loc_init::_Loc_init() { - if (_S_count++ == 0) { - _Stl_loc_init_num_put(); - _Stl_loc_init_num_get(); - _Stl_loc_init_monetary(); - _Stl_loc_init_time_facets(); - locale::_S_initialize(); - } -} - -inline ios_base::_Loc_init::~_Loc_init() { - if (--_S_count == 0) - locale::_S_uninitialize(); -} - -#endif /* __BORLANDC__ */ - -#if 0 -#ifdef __SYMBIAN32__ -#pragma message("Symbian I/O stream support on progress.") -inline ios_base::_Loc_init::_Loc_init() { -} - -inline ios_base::_Loc_init::~_Loc_init() { -} -#endif - -inline ios_base::Init::Init() { -} - -inline ios_base::Init::~Init() { -} -#endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_IOS_BASE */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_iosfwd.h --- a/epoc32/include/stdapis/stlport/stl/_iosfwd.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,159 +0,0 @@ -# ifndef _STLP_INTERNAL_IOSFWD -# define _STLP_INTERNAL_IOSFWD - -#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS) -#error This header file requires the -LANG:std option -#endif - -// This file provides forward declarations of the most important I/O -// classes. Note that almost all of those classes are class templates, -// with default template arguments. According to the C++ standard, -// if a class template is declared more than once in the same scope -// then only one of those declarations may have default arguments. - -// contains the same declarations as other headers, and including -// both and (say) is permitted. This means that only -// one header may contain those default template arguments. - -// In this implementation, the declarations in contain default -// template arguments. All of the other I/O headers include . - -#ifndef _STLP_CHAR_TRAITS_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -class _STLP_CLASS_DECLSPEC ios_base; - -template ) > -class basic_ios; - -template ) > -class basic_streambuf; - -template ) > -class basic_istream; - -template ) > -class basic_ostream; - -template ) > -class basic_iostream; - -template ), - __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > -class basic_stringbuf; - -template ), - __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > -class basic_istringstream; - -template ), - __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > -class basic_ostringstream; - -template ), - __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > -class basic_stringstream; - -template ) > -class basic_filebuf; - -template ) > -class basic_ifstream; - -template ) > -class basic_ofstream; - -template ) > -class basic_fstream; - -template ) > -class istreambuf_iterator; - -template ) > -class ostreambuf_iterator; - -typedef basic_ios > ios; - -# ifndef _STLP_NO_WCHAR_T -typedef basic_ios > wios; -# endif - -// Forward declaration of class locale, and of the most important facets. -class locale; -# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS -template -struct _Use_facet { - const locale& __loc; - _Use_facet(const locale& __p_loc) : __loc(__p_loc) {} - inline const _Facet& operator *() const; -}; -# define use_facet *_Use_facet -# else -template inline const _Facet& use_facet(const locale&); -# endif - -template class ctype; -template class ctype_byname; -template class collate; -template class collate_byname; - -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype; -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname; -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate; -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname; - -# ifndef _STLP_NO_WCHAR_T -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype; -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname; -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate; -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname; -# endif - -# if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 ) && !defined(_STLP_WINCE) -// Typedefs for ordinary (narrow-character) streams. -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC basic_streambuf >; -# endif - -typedef basic_istream > istream; -typedef basic_ostream > ostream; -typedef basic_iostream > iostream; -typedef basic_streambuf > streambuf; - -typedef basic_stringbuf, allocator > stringbuf; -typedef basic_istringstream, allocator > istringstream; -typedef basic_ostringstream, allocator > ostringstream; -typedef basic_stringstream, allocator > stringstream; - -typedef basic_filebuf > filebuf; -typedef basic_ifstream > ifstream; -typedef basic_ofstream > ofstream; -typedef basic_fstream > fstream; - -# ifndef _STLP_NO_WCHAR_T -// Typedefs for wide-character streams. -typedef basic_streambuf > wstreambuf; -typedef basic_istream > wistream; -typedef basic_ostream > wostream; -typedef basic_iostream > wiostream; - -typedef basic_stringbuf, allocator > wstringbuf; -typedef basic_istringstream, allocator > wistringstream; -typedef basic_ostringstream, allocator > wostringstream; -typedef basic_stringstream, allocator > wstringstream; - -typedef basic_filebuf > wfilebuf; -typedef basic_ifstream > wifstream; -typedef basic_ofstream > wofstream; -typedef basic_fstream > wfstream; -# endif - -_STLP_END_NAMESPACE - -#endif - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_istream.c --- a/epoc32/include/stdapis/stlport/stl/_istream.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1534 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_ISTREAM_C -#define _STLP_ISTREAM_C - -#ifndef _STLP_INTERNAL_ISTREAM_H -# include -#endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#ifndef _STLP_LIMITS_H -# include -#endif - -#ifndef _STLP_INTERNAL_NUM_GET_H -# include -#endif - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -// no wchar_t is supported for this mode -# define __BIS_int_type__ int -# define __BIS_pos_type__ streampos -# define __BIS_off_type__ streamoff -# else -# define __BIS_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::int_type -# define __BIS_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::pos_type -# define __BIS_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::off_type -# endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// Function object structs used by some member functions. - -template -struct _Is_not_wspace { - typedef typename _Traits::char_type argument_type; - typedef bool result_type; - - const ctype* _M_ctype; - - _Is_not_wspace(const ctype* __c_type) : _M_ctype(__c_type) {} - bool operator()(argument_type __c) const - { return !_M_ctype->is(ctype_base::space, __c); } -}; - -template -struct _Is_wspace_null { - typedef typename _Traits::char_type argument_type; - typedef bool result_type; - - const ctype* _M_ctype; - - _Is_wspace_null(const ctype* __c_type) : _M_ctype(__c_type) {} - bool operator()(argument_type __c) const { - return _Traits::eq(__c, argument_type()) || - _M_ctype->is(ctype_base::space, __c); - } -}; - -template -struct _Scan_for_wspace { - typedef typename _Traits::char_type char_type; - typedef char_type* first_argument_type; - typedef char_type* second_argument_type; - typedef char_type* result_type; - - const ctype* _M_ctype; - - _Scan_for_wspace(const ctype* __ctype) : _M_ctype(__ctype) {} - const char_type* - operator()(const char_type* __first, const char_type* __last) const { - return _M_ctype->scan_is(ctype_base::space, __first, __last); - } -}; - -template -struct _Scan_wspace_null { - typedef typename _Traits::char_type char_type; - typedef char_type* first_argument_type; - typedef char_type* second_argument_type; - typedef char_type* result_type; - - const ctype* _M_ctype; - - _Scan_wspace_null(const ctype* __c_type) : _M_ctype(__c_type) {} - const char_type* - operator()(const char_type* __first, const char_type* __last) const { - __last = find_if(__first, __last, - _Eq_char_bound<_Traits>(char_type())); - return _M_ctype->scan_is(ctype_base::space, __first, __last); - } -}; - -template -struct _Scan_for_not_wspace { - typedef typename _Traits::char_type char_type; - typedef char_type* first_argument_type; - typedef char_type* second_argument_type; - typedef char_type* result_type; - - const ctype* _M_ctype; - - _Scan_for_not_wspace(const ctype* __c_type) : _M_ctype(__c_type) {} - const char_type* - operator()(const char_type* __first, const char_type* __last) const { - return _M_ctype->scan_not(ctype_base::space, __first, __last); - } -}; - -template -struct _Scan_for_char_val -{ - typedef typename _Traits::char_type char_type; - typedef char_type* first_argument_type; - typedef char_type* second_argument_type; - typedef char_type* result_type; - - char_type _M_val; - - _Scan_for_char_val(char_type __val) : _M_val(__val) {} - - const char_type* - operator()(const char_type* __first, const char_type* __last) const { - return find_if(__first, __last, _Eq_char_bound<_Traits>(_M_val)); - } -}; - -template -struct _Scan_for_int_val -{ - typedef typename _Traits::char_type char_type; - typedef typename _Traits::int_type int_type; - typedef char_type* first_argument_type; - typedef char_type* second_argument_type; - typedef char_type* result_type; - - int_type _M_val; - - _Scan_for_int_val(int_type __val) : _M_val(__val) {} - - const char_type* - operator()(const char_type* __first, const char_type* __last) const { - return find_if(__first, __last, - _Eq_int_bound<_Traits>(_M_val)); - } -}; - -// Helper function: try to push back a character to a streambuf, -// return true if the pushback succeeded. Does not throw. - -template -bool _STLP_CALL -__pushback(basic_streambuf<_CharT, _Traits>* __buf, _CharT __c) -{ - bool ret; - _STLP_TRY { - const typename _Traits::int_type __eof = _Traits::eof(); - ret = !_Traits::eq_int_type(__buf->sputbackc(__c), __eof); - } - _STLP_CATCH_ALL { - ret = false; - } - return ret; -} - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -ws(basic_istream<_CharT, _Traits>& __is) -{ - typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry; - _Sentry __sentry(__is, _No_Skip_WS()); // Don't skip whitespace. - if (__sentry) - __is._M_skip_whitespace(false); - return __is; -} - -// Helper functions for istream<>::sentry constructor. -template -bool -_M_init_skip(basic_istream<_CharT, _Traits>& __is) { - if (__is.good()) { - if (__is.tie()) - __is.tie()->flush(); - - __is._M_skip_whitespace(true); - } - - if (!__is.good()) { - __is.setstate(ios_base::failbit); - return false; - } else - return true; -} - -template -bool -_M_init_noskip(basic_istream<_CharT, _Traits>& __is){ - if (__is.good()) { - if (__is.tie()) - __is.tie()->flush(); - - if (!__is.rdbuf()) - __is.setstate(ios_base::badbit); - } - else - __is.setstate(ios_base::failbit); - return __is.good(); -} - -//---------------------------------------------------------------------- -// Definitions of basic_istream<>'s noninline member functions. - -// Helper function for formatted input of numbers. -template -ios_base::iostate _STLP_CALL -_M_get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val) -{ - typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry; - ios_base::iostate __err = 0; - _Sentry __sentry( __that ); // Skip whitespace. - if (__sentry) { - typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > _Num_get; - _STLP_TRY { - ((const _Num_get&)use_facet<_Num_get>(__that.getloc())).get(istreambuf_iterator<_CharT, _Traits>(__that.rdbuf()), - 0, __that, __err, __val); - } - _STLP_CATCH_ALL { - __that._M_handle_exception(ios_base::badbit); - } - if (__err) __that.setstate(__err); - } - return __err; -} - - -// Unformatted input - -template -__BIS_int_type__ -basic_istream<_CharT, _Traits>::peek() -{ - typename _Traits::int_type __tmp = _Traits::eof(); - - this->_M_gcount = 0; - sentry __sentry(*this, _No_Skip_WS()); - - if (__sentry) { - _STLP_TRY { - __tmp = this->rdbuf()->sgetc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - } - else - { - if (this->_S_eof(__tmp)) - { - this->clear(); - this->setstate(ios_base::eofbit); - } - } - return __tmp; -} - - -template -__BIS_int_type__ -basic_istream<_CharT, _Traits>::get() -{ - typename _Traits::int_type __tmp = _Traits::eof(); - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - _STLP_TRY { - __tmp = this->rdbuf()->sbumpc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - - if (!this->_S_eof(__tmp)) - this->_M_gcount = 1; - } - - if (_M_gcount == 0) - this->setstate(ios_base::eofbit | ios_base::failbit); - - return __tmp; -} - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::get(_CharT& __c) -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - typename _Traits::int_type __tmp = _Traits::eof(); - _STLP_TRY { - __tmp = this->rdbuf()->sbumpc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - - if (!this->_S_eof(__tmp)) { - this->_M_gcount = 1; - __c = _Traits::to_char_type(__tmp); - } - } - - if (this->_M_gcount == 0) - this->setstate(ios_base::eofbit | ios_base::failbit); - - return *this; -} - - - -// Read characters and discard them. The standard specifies a single -// function with two arguments, each with a default. We instead use -// three overloded functions, because it's possible to implement the -// first two more efficiently than the fully general third version. -template -basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::ignore() -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - int_type __c; - _STLP_TRY { - __c = this->rdbuf()->sbumpc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - return *this; - } - - if (!this->_S_eof(__c)) - this->_M_gcount = 1; - else - this->setstate(ios_base::eofbit); - } - - return *this; -} - -// Putback - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::putback(_CharT __c) { - this->_M_gcount = 0; - sentry __sentry(*this, _No_Skip_WS()); - - if (__sentry) { - typename _Traits::int_type __tmp = _Traits::eof(); - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); -// if (!__buf || this->_S_eof(__buf->sputbackc(__c))) - if (__buf) { - _STLP_TRY { - __tmp = __buf->sputbackc(__c); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - } - if (this->_S_eof(__tmp)) - this->setstate(ios_base::badbit); - } - else - this->setstate(ios_base::failbit); - - return *this; -} - -template -basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::unget() { - this->_M_gcount = 0; - - sentry __sentry(*this, _No_Skip_WS()); - - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - // if (!__buf || _Traits::eq_int_type(__buf->sungetc(), _Traits::eof())) - if (__buf) { - _STLP_TRY { - _CharT __tmp; - __tmp = __buf->sungetc(); -#ifdef __SYMBIAN32__ - if (__tmp == (_CharT)-1) //chek for eof -#else - if (this->_S_eof(__tmp)) -#endif - this->setstate(ios_base::badbit); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - } else - this->setstate(ios_base::badbit); - } - else - this->setstate(ios_base::failbit); - - return *this; -} - -// Positioning and buffer control. - -template -int basic_istream<_CharT, _Traits>::sync() { - sentry __sentry(*this, _No_Skip_WS()); - - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - if (__buf) { - if (__buf->pubsync() == -1) { - this->setstate(ios_base::badbit); - return -1; - } - else - return 0; - } - else - return -1; -} - -template -__BIS_pos_type__ -basic_istream<_CharT, _Traits>::tellg() { -#ifndef __SYMBIAN32__ - sentry __sentry(*this, _No_Skip_WS()); -#endif - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - return (__buf && !this->fail()) ? __buf->pubseekoff(0, ios_base::cur, ios_base::in) - : pos_type(-1); -} - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::seekg(pos_type __pos) { -#ifndef __SYMBIAN32__ - sentry __sentry(*this, _No_Skip_WS()); -#endif - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - if (!this->fail() && __buf) - { - pos_type pos = __buf->pubseekpos(__pos, ios_base::in); - if(pos == pos_type(off_type(-1))) - this->setstate(ios_base::failbit); - } - return *this; -} - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir) -{ -#ifndef __SYMBIAN32__ - sentry __sentry(*this, _No_Skip_WS()); -#endif - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - if (!this->fail() && __buf) - { - - pos_type pos = __buf->pubseekoff(__off, __dir, ios_base::in); - if(pos == pos_type(off_type(-1))) - this->setstate(ios_base::failbit); - } - return *this; -} - -// Formatted input of characters and character arrays. - -template -void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT& __c) -{ -// typename _Traits::int_type __tmp = _Traits::eof(); - - sentry __sentry(*this); // Skip whitespace. - - if (__sentry) { - typename _Traits::int_type __tmp = _Traits::eof(); - - _STLP_TRY { - __tmp = this->rdbuf()->sbumpc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - return; - } - - if (!this->_S_eof(__tmp)) - __c = _Traits::to_char_type(__tmp); - else - this->setstate(ios_base::eofbit | ios_base::failbit); - } -} - - -//--------------------------------------------------------------------------- -// istream's helper functions. - -// A generic function for unbuffered input. We stop when we reach EOF, -// or when we have extracted _Num characters, or when the function object -// __is_delim return true. In the last case, it extracts the character -// for which __is_delim is true, if and only if __extract_delim is true. -// It appends a null character to the end of the string; this means that -// it may store up to _Num + 1 characters. -// -// __is_getline governs two corner cases: reading _Num characters without -// encountering delim or eof (in which case failbit is set if __is_getline -// is true); and reading _Num characters where the _Num+1'st character is -// eof (in which case eofbit is set if __is_getline is true). -// -// It is assumed that __is_delim never throws. -// -// Return value is the number of characters extracted, including the -// delimiter if it is extracted. Note that the number of characaters -// extracted isn't necessarily the same as the number stored. - -template < class _CharT, class _Traits, class _Is_Delim> -streamsize _STLP_CALL -_M_read_unbuffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf, - streamsize _Num, _CharT* __s, - _Is_Delim __is_delim, - bool __extract_delim, bool __append_null, - bool __is_getline) -{ - streamsize __n = 0; - ios_base::iostate __status = 0; - - typedef typename basic_istream<_CharT, _Traits>::int_type int_type; - // The operations that can potentially throw are sbumpc, snextc, and sgetc. - _STLP_TRY { -# if 0 - int_type __c = __buf->sgetc(); - while (true) { - if (__that->_S_eof(__c)) { - if (__n < _Num || __is_getline) - __status |= ios_base::eofbit; - break; - } - - else if (__is_delim(__c)) { - if (__extract_delim) { // Extract and discard current character. - __buf->sbumpc(); - ++__n; - } - break; - } - - else if (__n == _Num) { - if (__is_getline) - __status |= ios_base::failbit; - break; - } - - *__s++ = _Traits::to_char_type(__c); - ++__n; - __c = __buf->snextc(); - } -# else -// int_type __c = __buf->sbumpc(); // __buf->sgetc(); -while (true) { - -int_type __c = __buf->sbumpc(); // sschwarz - -if (__that->_S_eof(__c)) { -if (__n < _Num || __is_getline) -__status |= ios_base::eofbit; -break; -} - -else if (__is_delim(__c)) { -if (__extract_delim) { // Extract and discard current character. -// __buf->sbumpc(); -++__n; -} -break; -} - -else { // regular character - -*__s++ = _Traits::to_char_type(__c); -++__n; - -} - -if (__n == _Num) { -if (__is_getline) // didn't find delimiter as one of the _Num chars -__status |= ios_base::failbit; -break; -} - -// *__s++ = _Traits::to_char_type(__c); -// ++__n; - -} - -# endif - - } - _STLP_CATCH_ALL { - __that->_M_handle_exception(ios_base::badbit); - *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT); - return __n; - } - - if (__append_null) - *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT); - if (__status) - __that->setstate(__status); // This might throw. - return __n; -} - -// Much like _M_read_unbuffered, but with one additional function object: -// __scan_delim(first, last) returns the first pointer p in [first, last) -// such that __is_delim(p) is true. - -template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim> -streamsize _STLP_CALL -_M_read_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf, - streamsize _Num, _CharT* __s, - _Is_Delim __is_delim, _Scan_Delim __scan_delim, - bool __extract_delim, bool __append_null, - bool __is_getline) -{ - streamsize __n = 0; - ios_base::iostate __status = 0; - bool __done = false; - - _STLP_TRY { - while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) { - const _CharT* __first = __buf->_M_gptr(); - const _CharT* __last = __buf->_M_egptr(); - ptrdiff_t __request = _Num - __n; - - const _CharT* __p = __scan_delim(__first, __last); - ptrdiff_t __chunk = (min) (ptrdiff_t(__p - __first), __request); - _Traits::copy(__s, __first, __chunk); - __s += __chunk; - __n += __chunk; - __buf->_M_gbump((int)__chunk); - - // We terminated by finding delim. - if (__p != __last && __p - __first <= __request) { - if (__extract_delim) { - __n += 1; - __buf->_M_gbump(1); - } - __done = true; - } - - // We terminated by reading all the characters we were asked for. - else if(__n == _Num) { - - // Find out if we have reached eof. This matters for getline. - if (__is_getline) { - if (__chunk == __last - __first) { - if (__that->_S_eof(__buf->sgetc())) - __status |= ios_base::eofbit; - } - else - __status |= ios_base::failbit; - } - __done = true; - } - - // The buffer contained fewer than _Num - __n characters. Either we're - // at eof, or we should refill the buffer and try again. - else { - if (__that->_S_eof(__buf->sgetc())) { - __status |= ios_base::eofbit; - __done = true; - } - } - } // Close the while loop. - } - _STLP_CATCH_ALL { - __that->_M_handle_exception(ios_base::badbit); - __done = true; - } - - if (__done) { - if (__append_null) - *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT); - if (__status != 0) - __that->setstate(__status); // This might throw. - return __n; - } - - // If execution has reached this point, then we have an empty buffer but - // we have not reached eof. What that means is that the streambuf has - // decided to switch from buffered to unbuffered input. We switch to - // to _M_read_unbuffered. - - return __n + _M_read_unbuffered(__that, __buf, _Num - __n, __s, __is_delim, - __extract_delim,__append_null,__is_getline); -} - - - - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::get(_CharT* __s, streamsize __n, - _CharT __delim) { - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - if (__n > 0) { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - - if (__buf->egptr() != __buf->gptr()) - this->_M_gcount = - _M_read_buffered(this, __buf, __n - 1, __s, - _Eq_char_bound<_Traits>(__delim), - _Scan_for_char_val<_Traits>(__delim), - false, true, false); - else - this->_M_gcount = - _M_read_unbuffered(this, __buf, __n - 1, __s, - _Eq_char_bound<_Traits>(__delim), - false, true, false); - } - } -#ifdef __SYMBIAN32__ - *(__s + this->_M_gcount) = _STLP_DEFAULT_CONSTRUCTED(_CharT); -#endif //__SYMBIAN32__ - if (this->_M_gcount == 0) - this->setstate(ios_base::failbit); - - return *this; -} - -// Getline is essentially identical to get, except that it extracts -// the delimiter. -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::getline(_CharT* __s, streamsize __n, - _CharT __delim) { - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - if (__n > 0) { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - this->_M_gcount = __buf->egptr() != __buf->gptr() - ? _M_read_buffered(this, __buf, __n - 1, __s, - _Eq_char_bound<_Traits>(__delim), - _Scan_for_char_val<_Traits>(__delim), - true, true, true) - : _M_read_unbuffered(this, __buf, __n - 1, __s, - _Eq_char_bound<_Traits>(__delim), - true, true, true); - } - } - - if (this->_M_gcount == 0) - this->setstate(ios_base::failbit); - - return *this; -} - -// Read n characters. We don't look for any delimiter, and we don't -// put in a terminating null character. -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n) -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry && !this->eof()) { - basic_streambuf<_CharT, _Traits>*__buf = this->rdbuf(); - if (__buf->gptr() != __buf->egptr()) - _M_gcount - = _M_read_buffered(this, __buf, __n, __s, - _Constant_unary_fun(false), - _Project2nd(), - false, false, false); - else - _M_gcount - = _M_read_unbuffered(this, __buf, __n, __s, - _Constant_unary_fun(false), - false, false, false); - } - else - this->setstate(ios_base::failbit); - - if (this->eof()) - this->setstate(ios_base::eofbit | ios_base::failbit); - - return *this; -} - - -// Read n or fewer characters. We don't look for any delimiter, and -// we don't put in a terminating null character. -template -streamsize -basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __nmax) -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry && !this->eof() && __nmax >= 0) { - - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - streamsize __avail = __buf->in_avail(); - - // fbp : isn't full-blown setstate required here ? - if (__avail == -1) - this->_M_setstate_nothrow(ios_base::eofbit); - - else if (__avail != 0) { - - if (__buf->gptr() != __buf->egptr()) - _M_gcount - = _M_read_buffered(this, __buf, (min) (__avail, __nmax), __s, - _Constant_unary_fun(false), - _Project2nd(), - false, false, false); - else - _M_gcount - = _M_read_unbuffered(this, __buf, (min) (__avail, __nmax), __s, - _Constant_unary_fun(false), - false, false, false); - } - } - else { - // fbp : changed so that failbit is set only there, to pass Dietmar's test - if (this->eof()) - this->setstate(ios_base::eofbit | ios_base::failbit); - else - { - if (__nmax < 0) - { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - streamsize __avail = __buf->in_avail(); - if(__avail == -1) - this->setstate(ios_base::eofbit); - } - else - this->setstate(ios_base::failbit); - } - } - - // if (this->eof()) - // this->setstate(ios_base::eofbit | ios_base::failbit); - - return _M_gcount; -} - -template -void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT* __s) -{ - sentry __sentry(*this); // Skip whitespace. - - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - streamsize __nmax = this->width() > 0 - ? this->width() - 1 - : (numeric_limits::max)() / sizeof(_CharT) - 1; - - streamsize __n = __buf->gptr() != __buf->egptr() - ? _M_read_buffered(this, __buf, __nmax, __s, - _Is_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), - _Scan_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), - false, true, false) - : _M_read_unbuffered(this, __buf, __nmax, __s, - _Is_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), - false, true, false); - if (__n == 0) - this->setstate(ios_base::failbit); - } - this->width(0); -} - -// A generic unbuffered function for ignoring characters. We stop -// when we reach EOF, or when the function object __is_delim returns -// true. In the last case, it extracts the character for which -// __is_delim is true, if and only if __extract_delim is true. - -template < class _CharT, class _Traits, class _Is_Delim> -void _STLP_CALL -_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that, - basic_streambuf<_CharT, _Traits>* __buf, - _Is_Delim __is_delim, - bool __extract_delim, bool __set_failbit) -{ - bool __done = false; - ios_base::iostate __status = 0; - typedef typename basic_istream<_CharT, _Traits>::int_type int_type; - - _STLP_TRY { -#ifdef __SYMBIAN32__ - int_type __c = __buf->sgetc(); - do { - - if (__that->_S_eof(__c)) { - __done = true; - __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit - : ios_base::eofbit; - break; - } - - else if (__is_delim(__c)) { - __done = true; - if (__extract_delim) - __buf->snextc(); - break; - - } - __c = __buf->snextc(); - } while(!__done); -#else - while (!__done) { - int_type __c = __buf->sbumpc(); - - if (__that->_S_eof(__c)) { - __done = true; - __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit - : ios_base::eofbit; - } - - else if (__is_delim(__c)) { - __done = true; - if (!__extract_delim) - if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c)))) - __status |= ios_base::failbit; - } - } -#endif - } - _STLP_CATCH_ALL { - __that->_M_handle_exception(ios_base::badbit); - } - - __that->setstate(__status); -} - -// A generic buffered function for ignoring characters. Much like -// _M_ignore_unbuffered, but with one additional function object: -// __scan_delim(first, last) returns the first pointer p in [first, -// last) such that __is_delim(p) is true. - -template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim> -void _STLP_CALL -_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that, - basic_streambuf<_CharT, _Traits>* __buf, - _Is_Delim __is_delim, _Scan_Delim __scan_delim, - bool __extract_delim, bool __set_failbit) -{ - bool __at_eof = false; - bool __found_delim = false; - - _STLP_TRY { - while (__buf->_M_egptr() != __buf->_M_gptr() && !__at_eof && !__found_delim) { - const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr()); - __buf->_M_gbump((int)(__p - __buf->_M_gptr())); - - if (__p != __buf->_M_egptr()) { // We found delim, so we're done. - if (__extract_delim) - __buf->_M_gbump(1); - __found_delim = true; - } - - else // No delim. Try to refil the buffer. - __at_eof = __that->_S_eof(__buf->sgetc()); - } // Close the while loop. - } - _STLP_CATCH_ALL { - __that->_M_handle_exception(ios_base::badbit); - return; - } - - if (__at_eof) { - __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit - : ios_base::eofbit); - return; - } - if (__found_delim) - return; - - // If execution has reached this point, then we have an empty buffer but - // we have not reached eof. What that means is that the streambuf has - // decided to switch from a buffered to an unbuffered mode. We switch - // to _M_ignore_unbuffered. - _M_ignore_unbuffered(__that, __buf, __is_delim, __extract_delim, __set_failbit); -} - -// Overloaded versions of _M_ignore_unbuffered and _M_ignore_unbuffered -// with an explicit count _Num. Return value is the number of -// characters extracted. -// -// The function object __max_chars takes two arguments, _Num and __n -// (the latter being the number of characters we have already read), -// and returns the maximum number of characters to read from the buffer. -// We parameterize _M_ignore_buffered so that we can use it for both -// bounded and unbounded input; for the former the function object should -// be minus<>, and for the latter it should return a constant maximum value. - -template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim> -streamsize _STLP_CALL -_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that, - basic_streambuf<_CharT, _Traits>* __buf, - streamsize _Num, _Max_Chars __max_chars, - _Is_Delim __is_delim, - bool __extract_delim, bool __set_failbit) -{ - streamsize __n = 0; - ios_base::iostate __status = 0; - typedef typename basic_istream<_CharT, _Traits>::int_type int_type; - - _STLP_TRY { - while (__max_chars(_Num, __n) > 0) { - int_type __c = __buf->sbumpc(); - - if (__that->_S_eof(__c)) { - __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit - : ios_base::eofbit; - break; - } - - else if (__is_delim(__c)) { - if (__extract_delim) - ++__n; - else if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c)))) - __status |= ios_base::failbit; - - break; - } - // fbp : added counter increment to pass Dietmar's test - ++__n; - } - } - _STLP_CATCH_ALL { - __that->_M_handle_exception(ios_base::badbit); - } - - if (__status) - __that->setstate(__status); // This might throw. - return __n; -} - -template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim, class _Scan_Delim> -streamsize _STLP_CALL -_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that, - basic_streambuf<_CharT, _Traits>* __buf, - streamsize _Num, - _Max_Chars __max_chars, - _Is_Delim __is_delim, _Scan_Delim __scan_delim, - bool __extract_delim, bool __set_failbit) -{ - streamsize __n = 0; - bool __at_eof = false; - bool __done = false; - - _STLP_TRY { - while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) { - ptrdiff_t __avail = __buf->_M_egptr() - __buf->_M_gptr(); - streamsize __m = __max_chars(_Num, __n); - - if (__avail >= __m) { // We have more characters than we need. - const _CharT* __last = __buf->_M_gptr() + __m; - const _CharT* __p = __scan_delim(__buf->_M_gptr(), __last); - ptrdiff_t __chunk = __p - __buf->_M_gptr(); - __n += __chunk; - __buf->_M_gbump((int)__chunk); - - if (__extract_delim && __p != __last) { - __n += 1; - __buf->_M_gbump(1); - } - - __done = true; - } - - else { - const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr()); - ptrdiff_t __chunk = __p - __buf->_M_gptr(); - __n += __chunk; - __buf->_M_gbump((int)__chunk); - - if (__p != __buf->_M_egptr()) { // We found delim. - if (__extract_delim) { - __n += 1; - __buf->_M_gbump(1); - } - - __done = true; - } - - // We didn't find delim. Try to refill the buffer. - else if (__that->_S_eof(__buf->sgetc())) { - __done = true; - __at_eof = true; - } - } - } // Close the while loop. - } - _STLP_CATCH_ALL { - __that->_M_handle_exception(ios_base::badbit); - return __n; - } - - if (__at_eof) - __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit - : ios_base::eofbit); - - if (__done) - return __n; - - // If execution has reached this point, then we have an empty buffer but - // we have not reached eof. What that means is that the streambuf has - // decided to switch from buffered to unbuffered input. We switch to - // to _M_ignore_unbuffered. - - return __n + _M_ignore_unbuffered( __that, __buf, _Num, __max_chars, - __is_delim, __extract_delim, __set_failbit); -} - - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::ignore(streamsize __n) -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - typedef _Constant_unary_fun _Const_bool; - typedef _Constant_binary_fun - _Const_streamsize; - const streamsize __maxss = (numeric_limits::max)(); - - if (__n == (numeric_limits::max)()) { - if (__buf->gptr() != __buf->egptr()) - _M_gcount - = _M_ignore_buffered(this, __buf, - __maxss, _Const_streamsize(__maxss), - _Const_bool(false), - _Project2nd(), - false, false); - else - _M_gcount = _M_ignore_unbuffered(this, __buf, - __maxss, _Const_streamsize(__maxss), - _Const_bool(false), false, false); - } - else { - if (__buf->gptr() != __buf->egptr()) - _M_gcount - = _M_ignore_buffered(this, __buf, - __n, minus(), - _Const_bool(false), - _Project2nd(), - false, false); - else - _M_gcount = _M_ignore_unbuffered(this, __buf, __n, minus(), - _Const_bool(false), false, false); - } - } - - return *this; -} - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - typedef _Constant_unary_fun _Const_bool; - typedef _Constant_binary_fun - _Const_streamsize; - const streamsize __maxss = (numeric_limits::max)(); - - if (__n == (numeric_limits::max)()) { - if (__buf->gptr() != __buf->egptr()) - _M_gcount = _M_ignore_buffered(this, __buf, - __maxss, _Const_streamsize(__maxss), - _Eq_int_bound<_Traits>(__delim), - _Scan_for_int_val<_Traits>(__delim), - true, false); - else - _M_gcount = _M_ignore_unbuffered(this, __buf, - __maxss, _Const_streamsize(__maxss), - _Eq_int_bound<_Traits>(__delim), - true, false); - } - else { - if (__buf->gptr() != __buf->egptr()) - _M_gcount = _M_ignore_buffered(this, __buf, - __n, minus(), - _Eq_int_bound<_Traits>( - __delim), - _Scan_for_int_val<_Traits>(__delim), - true, false); - else - _M_gcount = _M_ignore_unbuffered(this, __buf, __n, minus(), - _Eq_int_bound<_Traits>(__delim), - true, false); - } - } - - return *this; -} - -// This member function does not construct a sentry object, because -// it is called from sentry's constructor. -template -void basic_istream<_CharT, _Traits>::_M_skip_whitespace(bool __set_failbit) -{ - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - if (!__buf) - this->setstate(ios_base::badbit); - else if (__buf->gptr() != __buf->egptr()) - _M_ignore_buffered(this, __buf, - _Is_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), - _Scan_for_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), - false, __set_failbit); - else - _M_ignore_unbuffered(this, __buf, - _Is_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), - false, __set_failbit); -} - - -// This is a very simple loop that reads characters from __src and puts -// them into __dest. It looks complicated because of the (standard- -// mandated) exception handling policy. -// -// We stop when we get an exception, when we fail to insert into the -// output streambuf, or when __is_delim is true. - -template < class _CharT, class _Traits, class _Is_Delim> -streamsize _STLP_CALL -_M_copy_unbuffered( basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src, - basic_streambuf<_CharT, _Traits>* __dest, - _Is_Delim __is_delim, - bool __extract_delim, bool __rethrow) -{ - streamsize __extracted = 0; - ios_base::iostate __status = 0; - typedef typename basic_istream<_CharT, _Traits>::int_type int_type; - int_type __c; - - _STLP_TRY { -#ifdef __SYMBIAN32__ - __c = __src->sgetc(); - for(;; __c = __src->snextc()){ - - // If we failed to get a character, then quit. - if (__that->_S_eof(__c)) { - __status |= ios_base::eofbit; - break; - } - // If it's the delimiter, then quit. - else if (__is_delim(__c)) { - if (!__extract_delim) - __status |= ios_base::failbit; - break; - } - - else { - - // Try to put the character in the output streambuf. - _STLP_TRY { - if (!__that->_S_eof(__dest->sputc(__c))) - ++__extracted; - else - break; - } - _STLP_CATCH_ALL { - __status |= ios_base::failbit; - break; - } - - } - - } /* while (true) */ -#else - while (true) { - - // Get a character. If there's an exception, catch and (maybe) rethrow it. - __c = __src->sbumpc(); - - // If we failed to get a character, then quit. - if (__that->_S_eof(__c)) { - __status |= ios_base::eofbit; - break; - } - // If it's the delimiter, then quit. - else if (__is_delim(__c)) { - if (!__extract_delim && !__pushback(__src, _Traits::to_char_type(__c))) - __status |= ios_base::failbit; - break; - } - - else { - - // Try to put the character in the output streambuf. - bool __failed = false; - _STLP_TRY { - if (!__that->_S_eof(__dest->sputc(__c))) - ++__extracted; - else - __failed = true; - } - _STLP_CATCH_ALL { - __failed = true; - } - - // If we failed to put the character in the output streambuf, then - // try to push it back to the input streambuf. - if (__failed && !__pushback(__src, _Traits::to_char_type(__c))) - __status |= ios_base::failbit; - - // fbp : avoiding infinite loop in io-27-6-1-2-3.exp - if (__failed) - break; - } - - } /* while (true) */ -#endif - } - // fbp : this try/catch moved here in reasonable assumption - // __is_delim never throw (__pushback is guaranteed not to) - _STLP_CATCH_ALL { - // See 27.6.1.2.3, paragraph 13. - if (__rethrow && __extracted == 0) - __that->_M_handle_exception(ios_base::failbit); - } - __that->setstate(__status); - return __extracted; -} - -// Buffered copying from one streambuf to another. We copy the characters -// in chunks, rather than one at a time. We still have to worry about all -// of the error conditions we checked in _M_copy_unbuffered, plus one more: -// the streambuf might decide to switch from a buffered to an unbuffered mode. - -template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim> -streamsize _STLP_CALL -_M_copy_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src, - basic_streambuf<_CharT, _Traits>* __dest, - _Scan_Delim __scan_delim, _Is_Delim __is_delim, - bool __extract_delim, bool __rethrow) -{ - streamsize __extracted = 0; - ios_base::iostate __status = 0; - typedef typename basic_istream<_CharT, _Traits>::int_type int_type; - int_type __c = _Traits::eof(); - _CharT* __first = __src->_M_gptr(); - ptrdiff_t __avail = __src->_M_egptr() - __first; - // fbp : introduced to move catch/try blocks out of the loop - bool __do_handle_exceptions; - - _STLP_TRY { - while (true) { - __do_handle_exceptions = false ; - const _CharT* __last = __scan_delim(__first, __src->_M_egptr()); - - // Try to copy the entire input buffer to the output buffer. - streamsize __n = __dest->sputn(__first, __extract_delim && __last != __src->_M_egptr() - ? (__last - __first) + 1 - : (__last - __first)); - __src->_M_gbump((int)__n); - __extracted += __n; - - // from this on, catch() will call _M_handle_exceptions() - __do_handle_exceptions = true; - - if (__n < __avail) // We found the delimiter, or else failed to - break; // copy some characters. - - __c = __src->sgetc(); - - // Three possibilities: we succeeded in refilling the buffer, or - // we got EOF, or the streambuf has switched to unbuffered mode. - __first = __src->_M_gptr(); - __avail = __src->_M_egptr() - __first; - - if (__avail > 0) - {} // dwa 1/16/00 -- suppress a Metrowerks warning - else if (__that->_S_eof(__c)) { - __status |= ios_base::eofbit; - break; - } - else - return __extracted + _M_copy_unbuffered(__that, __src, __dest, __is_delim, - __extract_delim, __rethrow); - } /* while */ - } - - _STLP_CATCH_ALL { - // See 27.6.1.2.3, paragraph 13. - if (__rethrow && __do_handle_exceptions && __extracted == 0) - __that->_M_handle_exception(ios_base::failbit); - } - - if (__status) - __that->setstate(__status); // This might throw. - return __extracted; -} - - - -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits> - ::get(basic_streambuf<_CharT, _Traits>& __dest, _CharT __delim) -{ - sentry __sentry(*this, _No_Skip_WS()); - this->_M_gcount = 0; - - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __src = this->rdbuf(); - - if (__src) - this->_M_gcount = __src->egptr() != __src->gptr() - ? _M_copy_buffered(this, __src, &__dest, - _Scan_for_char_val<_Traits>(__delim), - _Eq_char_bound<_Traits>(__delim), - false, false) - : _M_copy_unbuffered(this, __src, &__dest, - _Eq_char_bound<_Traits>(__delim), - false, false); - } - - if (this->_M_gcount == 0) - this->setstate(ios_base::failbit); - - return *this; -} - -// Copying characters into a streambuf. -template -basic_istream<_CharT, _Traits>& -basic_istream<_CharT, _Traits> - ::operator>>(basic_streambuf<_CharT, _Traits>* __dest) -{ - streamsize __n = 0; - typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry; - _Sentry __sentry(*this); - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __src = this->rdbuf(); - if (__src && __dest) - __n = __src->egptr() != __src->gptr() - ? _M_copy_buffered(this, __src, __dest, - _Project2nd(), - _Constant_unary_fun(false), - false, true) - : _M_copy_unbuffered(this, __src, __dest, - _Constant_unary_fun(false), - false, true); - } - - if (__n == 0) - this->setstate(ios_base::failbit); - - return *this; -} - -// ---------------------------------------------------------------- -// basic_iostream<> class -// ---------------------------------------------------------------- - -template -_STLP_EXP_DECLSPEC basic_iostream<_CharT, _Traits> - ::basic_iostream(basic_streambuf<_CharT, _Traits>* __buf) - : basic_ios<_CharT, _Traits>(), - basic_istream<_CharT, _Traits>(__buf), - basic_ostream<_CharT, _Traits>(__buf) -{ - this->init(__buf); -} - -template -_STLP_EXP_DECLSPEC basic_iostream<_CharT, _Traits>::~basic_iostream() -{} - - -template -_STLP_EXP_DECLSPEC basic_istream<_CharT, _Traits> - ::basic_istream(basic_streambuf<_CharT, _Traits>* __buf) : - basic_ios<_CharT, _Traits>(), _M_gcount(0) { - this->init(__buf); - } - -template -_STLP_EXP_DECLSPEC basic_istream<_CharT, _Traits> - ::~basic_istream() {} - - - -_STLP_END_NAMESPACE - -# undef __BIS_int_type__ -# undef __BIS_pos_type__ -# undef __BIS_off_type__ - -# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ - -#endif /* _STLP_ISTREAM_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_istream.h --- a/epoc32/include/stdapis/stlport/stl/_istream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,342 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_INTERNAL_ISTREAM_H -#define _STLP_INTERNAL_ISTREAM_H - -// this block is included by _ostream.h, we include it here to lower #include level -# if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_CWCHAR_H) -# include -# endif - -# ifndef _STLP_INTERNAL_IOS_H -# include // For basic_ios<>. Includes . -# endif - -#ifndef _STLP_INTERNAL_OSTREAM_H -# include // Needed as a base class of basic_iostream. -#endif - -#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H -# include -#endif - -#include // Helper functions that allow char traits - // to be used as function objects. -_STLP_BEGIN_NAMESPACE - -template -ios_base::iostate _STLP_CALL -_M_get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val); - -#if defined (_STLP_USE_TEMPLATE_EXPORT) -template -class _Isentry; -#endif - -struct _No_Skip_WS {}; // Dummy class used by sentry. - -template -bool _M_init_skip(basic_istream<_CharT, _Traits>& __is); -template -bool _M_init_noskip(basic_istream<_CharT, _Traits>& __is); - -//---------------------------------------------------------------------- -// Class basic_istream, a class that performs formatted input through -// a stream buffer. - -// The second template parameter, _Traits, defaults to char_traits<_CharT>. -// The default is declared in header , and it isn't declared here -// because C++ language rules do not allow it to be declared twice. - -template -class basic_istream : virtual public basic_ios<_CharT, _Traits> { -public: - // Types - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_istream<_CharT, _Traits> _Self; - - typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&); - typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&); - typedef _Self& (_STLP_CALL *__istream_fn)(_Self&); - -public: // Constructor and destructor. - _STLP_DECLSPEC explicit basic_istream(basic_streambuf<_CharT, _Traits>* __buf); - _STLP_DECLSPEC ~basic_istream(); - -public: // Nested sentry class. - -public: // Hooks for manipulators. The arguments are - // function pointers. - _Self& operator>> (__istream_fn __f) { return __f(*this); } - _Self& operator>> (__ios_fn __f) { __f(*this); return *this; } - _Self& operator>> (__ios_base_fn __f) { __f(*this); return *this; } - -public: // Formatted input of numbers. - _Self& operator>> (short& __val) { - long __lval = __val; - unsigned short __uval; - _M_get_num(*this, __lval); - __val = __STATIC_CAST(short, __lval); - __uval = __lval; - // check if we lose digits - // if ((__val != __lval) && ((unsigned short)__val != __lval)) - if ((__val != __lval) && ((long)__uval != __lval)) - this->setstate(ios_base::failbit); - return *this; - } - _Self& operator>> (int& __val) { - long __lval = __val; - unsigned int __uval; - _M_get_num(*this, __lval); - __val = __lval; - __uval = __lval; - // check if we lose digits - // if ((__val != __lval) && ((unsigned int)__val != __lval)) - if ((__val != __lval) && ((long)__uval != __lval)) - this->setstate(ios_base::failbit); - return *this; - } - _Self& operator>> (unsigned short& __val) { _M_get_num(*this, __val); return *this; } - _Self& operator>> (unsigned int& __val) { _M_get_num(*this, __val); return *this; } - _Self& operator>> (long& __val) { _M_get_num(*this, __val); return *this; } - _Self& operator>> (unsigned long& __val) { _M_get_num(*this, __val); return *this; } -#ifdef _STLP_LONG_LONG - _Self& operator>> (_STLP_LONG_LONG& __val) { _M_get_num(*this, __val); return *this; } - _Self& operator>> (unsigned _STLP_LONG_LONG& __val) { _M_get_num(*this, __val); return *this; } -#endif - _Self& operator>> (float& __val) { _M_get_num(*this, __val); return *this; } - _Self& operator>> (double& __val) { _M_get_num(*this, __val); return *this; } -# ifndef _STLP_NO_LONG_DOUBLE - _Self& operator>> (long double& __val) { _M_get_num(*this, __val); return *this; } -# endif -# ifndef _STLP_NO_BOOL - _Self& operator>> (bool& __val) { _M_get_num(*this, __val); return *this; } -# endif - _Self& operator>> (void*& __val) { _M_get_num(*this, __val); return *this; } - -public: // Copying characters into a streambuf. - _Self& operator>>(basic_streambuf<_CharT, _Traits>*); - -public: // Unformatted input. - streamsize gcount() const { return _M_gcount; } - int_type peek(); - -public: // get() for single characters - int_type get(); - _Self& get(char_type& __c); - -public: // get() for character arrays. - _Self& get(char_type* __s, streamsize __n, char_type __delim); - _Self& get(char_type* __s, streamsize __n) - { return get(__s, __n, this->widen('\n')); } - -public: // get() for streambufs - _Self& get(basic_streambuf<_CharT, _Traits>& __buf, - char_type __delim); - _Self& get(basic_streambuf<_CharT, _Traits>& __buf) - { return get(__buf, this->widen('\n')); } - -public: // getline() - _Self& getline(char_type* __s, streamsize __n, char_type delim); - _Self& getline(char_type* __s, streamsize __n) - { return getline(__s, __n, this->widen('\n')); } - -public: // read(), readsome(), ignore() - _Self& ignore(); - _Self& ignore(streamsize __n); -#if (defined (_STLP_MSVC) && _STLP_MSVC < 1200) - inline -#endif - _Self& ignore(streamsize __n, int_type __delim); - - _Self& read(char_type* __s, streamsize __n); - streamsize readsome(char_type* __s, streamsize __n); - -public: // putback - _Self& putback(char_type __c); - _Self& unget(); - -public: // Positioning and buffer control. - int sync(); - - pos_type tellg(); - _Self& seekg(pos_type __pos); - _Self& seekg(off_type, ios_base::seekdir); - -public: // Helper functions for non-member extractors. - void _M_formatted_get(_CharT& __c); - void _M_formatted_get(_CharT* __s); - void _M_skip_whitespace(bool __set_failbit); - -private: // Number of characters extracted by the - streamsize _M_gcount; // most recent unformatted input function. - -public: - -#if defined (_STLP_USE_TEMPLATE_EXPORT) - // If we are using DLL specs, we have not to use inner classes - // end class declaration here - typedef _Isentry<_CharT, _Traits> sentry; -}; -# define sentry _Isentry -template -class _Isentry { - typedef _Isentry<_CharT, _Traits> _Self; -# else - class sentry { - typedef sentry _Self; -#endif - - private: - const bool _M_ok; - // basic_streambuf<_CharT, _Traits>* _M_buf; - - public: - typedef _Traits traits_type; - - explicit sentry(basic_istream<_CharT, _Traits>& __is, - bool __noskipws = false) : - _M_ok((__noskipws || !(__is.flags() & ios_base::skipws)) ? _M_init_noskip(__is) : _M_init_skip(__is) ) - /* , _M_buf(__is.rdbuf()) */ - {} - - // Calling this constructor is the same as calling the previous one with - // __noskipws = true, except that it doesn't require a runtime test. - sentry(basic_istream<_CharT, _Traits>& __is, _No_Skip_WS) : /* _M_buf(__is.rdbuf()), */ - _M_ok(_M_init_noskip(__is)) {} - - ~sentry() {} - - operator bool() const { return _M_ok; } - - private: // Disable assignment and copy constructor. - sentry(const _Self&) : _M_ok(false) {} - void operator=(const _Self&) {} - }; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -# undef sentry -# else - // close basic_istream class definition here -}; -# endif - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS _Isentry >; -_STLP_EXPORT_TEMPLATE_CLASS basic_istream >; -# if ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS _Isentry >; -_STLP_EXPORT_TEMPLATE_CLASS basic_istream >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -// Non-member character and string extractor functions. - -template -inline basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __stl_in, _CharT& __c) { - __stl_in._M_formatted_get(__c); - return __stl_in; -} - -template -inline basic_istream& _STLP_CALL -operator>>(basic_istream& __stl_in, unsigned char& __c) { - __stl_in._M_formatted_get(__REINTERPRET_CAST(char&,__c)); - return __stl_in; -} - -template -inline basic_istream& _STLP_CALL -operator>>(basic_istream& __stl_in, signed char& __c) { - __stl_in._M_formatted_get(__REINTERPRET_CAST(char&,__c)); - return __stl_in; -} - -template -inline basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __stl_in, _CharT* __s) { - __stl_in._M_formatted_get(__s); - return __stl_in; -} - -template -inline basic_istream& _STLP_CALL -operator>>(basic_istream& __stl_in, unsigned char* __s) { - __stl_in._M_formatted_get(__REINTERPRET_CAST(char*,__s)); - return __stl_in; -} - -template -inline basic_istream& _STLP_CALL -operator>>(basic_istream& __stl_in, signed char* __s) { - __stl_in._M_formatted_get(__REINTERPRET_CAST(char*,__s)); - return __stl_in; -} - -//---------------------------------------------------------------------- -// istream manipulator. -template -basic_istream<_CharT, _Traits>& _STLP_CALL -ws(basic_istream<_CharT, _Traits>& __is); - -//---------------------------------------------------------------------- -// Class iostream. - -template -class basic_iostream - : public basic_istream<_CharT, _Traits>, - public basic_ostream<_CharT, _Traits> -{ -public: - typedef basic_ios<_CharT, _Traits> _Basic_ios; - - _STLP_DECLSPEC explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __buf); - _STLP_DECLSPEC virtual ~basic_iostream(); -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_iostream >; -# if ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_iostream >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -template -basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& __is) -{ - return __is.rdbuf(); -} - -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_ISTREAM_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_istreambuf_iterator.h --- a/epoc32/include/stdapis/stlport/stl/_istreambuf_iterator.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,169 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H -#define _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -#ifndef _STLP_INTERNAL_STREAMBUF -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// defined in _istream.h -template -extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& ) ; - -// We do not read any characters until operator* is called. operator* calls sgetc -// unless the iterator is unchanged from the last call in which case a cached value is -// used. Calls to operator++ use sbumpc. - -template -class istreambuf_iterator -{ -public: - typedef _CharT char_type; - typedef _Traits traits_type; - typedef typename _Traits::int_type int_type; - typedef basic_streambuf<_CharT, _Traits> streambuf_type; - typedef basic_istream<_CharT, _Traits> istream_type; - - typedef input_iterator_tag iterator_category; - typedef _CharT value_type; - typedef typename _Traits::off_type difference_type; - typedef const _CharT* pointer; - typedef const _CharT& reference; - -public: - istreambuf_iterator(streambuf_type* __p = 0) { this->_M_init(__p); } - // istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) { this->_M_init(_M_get_istreambuf(__is)); } - inline istreambuf_iterator(basic_istream<_CharT, _Traits>& __is); - - char_type operator*() const { this->_M_getc(); return _M_c; } - istreambuf_iterator<_CharT, _Traits>& operator++() { this->_M_bumpc(); return *this; } - istreambuf_iterator<_CharT, _Traits> operator++(int); - - bool equal(const istreambuf_iterator<_CharT, _Traits>& __i) const { - if (this->_M_buf) - this->_M_getc(); - if (__i._M_buf) - __i._M_getc(); - return this->_M_eof == __i._M_eof; - } - -private: - void _M_init(streambuf_type* __p) { - _M_buf = __p; - _M_eof = !__p; - // _M_is_initialized = _M_eof; - _M_have_c = false; - } - - void _M_getc() const { - if (_M_have_c) - return; - int_type __c = _M_buf->sgetc(); -# if !defined (_STLP_NEED_MUTABLE) /* && ! defined (__SUNPRO_CC) */ - _M_c = traits_type::to_char_type(__c); - _M_eof = traits_type::eq_int_type(__c, traits_type::eof()); - _M_have_c = true; -# else - typedef istreambuf_iterator<_CharT,_Traits> _Self; - _Self* __that = __CONST_CAST(_Self*, this); - __that->_M_c = __STATIC_CAST(_CharT, traits_type::to_char_type(__c)); - __that->_M_eof = traits_type::eq_int_type(__c, traits_type::eof()); - __that->_M_have_c = true; -# endif - } - - int_type _M_bumpc() { - int_type ch = _M_buf->sbumpc(); - _M_have_c = false; - return ch; - } - -private: - streambuf_type* _M_buf; - mutable _CharT _M_c; - mutable unsigned char _M_eof; - mutable unsigned char _M_have_c; -}; - -template -inline istreambuf_iterator<_CharT, _Traits>::istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) -{ this->_M_init(_M_get_istreambuf(__is)); } - -template -inline bool _STLP_CALL operator==(const istreambuf_iterator<_CharT, _Traits>& __x, - const istreambuf_iterator<_CharT, _Traits>& __y) { - return __x.equal(__y); -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool _STLP_CALL operator!=(const istreambuf_iterator<_CharT, _Traits>& __x, - const istreambuf_iterator<_CharT, _Traits>& __y) { - return !__x.equal(__y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator >; -# if defined (INSTANTIATE_WIDE_STREAMS) -_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template -inline input_iterator_tag _STLP_CALL iterator_category(const istreambuf_iterator<_CharT, _Traits>&) { return input_iterator_tag(); } -template -inline streamoff* _STLP_CALL -distance_type(const istreambuf_iterator<_CharT, _Traits>&) { return (streamoff*)0; } -template -inline _CharT* _STLP_CALL value_type(const istreambuf_iterator<_CharT, _Traits>&) { return (_CharT*)0; } -# endif - -template -istreambuf_iterator<_CharT, _Traits> -istreambuf_iterator<_CharT, _Traits>::operator++(int) { - istreambuf_iterator<_CharT, _Traits> __tmp = *this; - __tmp._M_c = this->_M_bumpc(); - __tmp._M_have_c = true; - this->_M_have_c = false; - return __tmp; -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_iterator_base.h --- a/epoc32/include/stdapis/stlport/stl/_iterator_base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,463 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -#define _STLP_INTERNAL_ITERATOR_BASE_H - -#ifndef _STLP_CSTDDEF -# include -#endif - -# if defined (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) -_STLP_BEGIN_NAMESPACE -using namespace _STLP_VENDOR_CSTD; -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#ifndef __TYPE_TRAITS_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -struct input_iterator_tag {}; -struct output_iterator_tag {}; -struct forward_iterator_tag : public input_iterator_tag {}; -struct bidirectional_iterator_tag : public forward_iterator_tag {}; -struct random_access_iterator_tag : public bidirectional_iterator_tag {}; - - -template -struct iterator { - typedef _Category iterator_category; - typedef _Tp value_type; - typedef _Distance difference_type; - typedef _Pointer pointer; - typedef _Reference reference; -}; -_STLP_TEMPLATE_NULL -struct iterator { - typedef output_iterator_tag iterator_category; -#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; -#endif -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -# define _STLP_ITERATOR_CATEGORY(_It, _Tp) iterator_category(_It) -# define _STLP_DISTANCE_TYPE(_It, _Tp) distance_type(_It) -# define _STLP_VALUE_TYPE(_It, _Tp) value_type(_It) -# else -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION -# define _STLP_VALUE_TYPE(_It, _Tp) (typename iterator_traits< _Tp >::value_type*)0 -# define _STLP_DISTANCE_TYPE(_It, _Tp) (typename iterator_traits< _Tp >::difference_type*)0 -# if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || ( defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__) -# define _STLP_ITERATOR_CATEGORY(_It, _Tp) iterator_traits< _Tp >::iterator_category() -# else -# define _STLP_ITERATOR_CATEGORY(_It, _Tp) typename iterator_traits< _Tp >::iterator_category() -# endif -# else -# define _STLP_ITERATOR_CATEGORY(_It, _Tp) __iterator_category(_It, _IsPtrType<_Tp>::_Ret()) -# define _STLP_DISTANCE_TYPE(_It, _Tp) (ptrdiff_t*)0 -# define _STLP_VALUE_TYPE(_It, _Tp) __value_type(_It, _IsPtrType<_Tp>::_Ret() ) -# endif -# endif - -template -struct iterator_traits { - typedef typename _Iterator::iterator_category iterator_category; - typedef typename _Iterator::value_type value_type; - typedef typename _Iterator::difference_type difference_type; - typedef typename _Iterator::pointer pointer; - typedef typename _Iterator::reference reference; -}; - - -# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined (__SUNPRO_CC) -# define _STLP_DIFFERENCE_TYPE(_Iterator) typename iterator_traits<_Iterator>::difference_type -# else -# define _STLP_DIFFERENCE_TYPE(_Iterator) ptrdiff_t -# endif - -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - -// fbp : this order keeps gcc happy -template -struct iterator_traits { - typedef random_access_iterator_tag iterator_category; - typedef _Tp value_type; - typedef ptrdiff_t difference_type; - typedef const _Tp* pointer; - typedef const _Tp& reference; -}; - -template -struct iterator_traits<_Tp*> { - typedef random_access_iterator_tag iterator_category; - typedef _Tp value_type; - typedef ptrdiff_t difference_type; - typedef _Tp* pointer; - typedef _Tp& reference; -}; - -# if defined (__BORLANDC__) -template -struct iterator_traits<_Tp* const> { - typedef random_access_iterator_tag iterator_category; - typedef _Tp value_type; - typedef ptrdiff_t difference_type; - typedef const _Tp* pointer; - typedef const _Tp& reference; -}; -# endif - -# endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - - -# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) \ - || (defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) && ! defined (_STLP_NO_ARROW_OPERATOR)) -# define _STLP_POINTERS_SPECIALIZE( _TpP ) -# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(operator*()); } -# else -# include -# endif - -# ifndef _STLP_USE_OLD_HP_ITERATOR_QUERIES -// The overloaded functions iterator_category, distance_type, and -// value_type are not part of the C++ standard. (They have been -// replaced by struct iterator_traits.) They are included for -// backward compatibility with the HP STL. -// We introduce internal names for these functions. - -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - -template -inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { - typedef typename iterator_traits<_Iter>::iterator_category _Category; - return _Category(); -} - -template -inline typename iterator_traits<_Iter>::difference_type* __distance_type(const _Iter&) { - typedef typename iterator_traits<_Iter>::difference_type _diff_type; - return __STATIC_CAST(_diff_type*,0); -} - -template -inline typename iterator_traits<_Iter>::value_type* __value_type(const _Iter&) { - typedef typename iterator_traits<_Iter>::value_type _value_type; - return __STATIC_CAST(_value_type*,0); -} - -# else - -template -inline random_access_iterator_tag -__iterator_category(const _Iter&, const __true_type&) { - return random_access_iterator_tag(); -} - -template -inline _STLP_TYPENAME_ON_RETURN_TYPE iterator_traits<_Iter>::iterator_category -__iterator_category(const _Iter&, const __false_type&) { - typedef typename iterator_traits<_Iter>::iterator_category _Category; - return _Category(); -} - - -template -inline ptrdiff_t* _STLP_CALL __distance_type(const _Iter&) { return (ptrdiff_t*)(0); } - -template -inline _STLP_TYPENAME_ON_RETURN_TYPE iterator_traits<_Iter>::value_type* -__value_type(const _Iter&, const __false_type&) { - typedef typename iterator_traits<_Iter>::value_type _value_type; - return __STATIC_CAST(_value_type*,0); -} - -template -inline _Tp* -__value_type(const _Tp*, const __true_type&) { - return __STATIC_CAST(_Tp*, 0); -} - -# endif - -#else /* old queries */ -template -inline _Category _STLP_CALL iterator_category(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return _Category(); } -template -inline _Tp* _STLP_CALL value_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return (_Tp*)(0); } -template -inline _Distance* _STLP_CALL distance_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return (_Distance*)(0); } -template -inline random_access_iterator_tag _STLP_CALL iterator_category(const _Tp*) { return random_access_iterator_tag(); } -template -inline _Tp* _STLP_CALL value_type(const _Tp*) { return (_Tp*)(0); } -template -inline ptrdiff_t* _STLP_CALL distance_type(const _Tp*) { return (ptrdiff_t*)(0); } -#endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */ - -# if ! defined (_STLP_NO_ANACHRONISMS) -// The base classes input_iterator, output_iterator, forward_iterator, -// bidirectional_iterator, and random_access_iterator are not part of -// the C++ standard. (They have been replaced by struct iterator.) -// They are included for backward compatibility with the HP STL. -template struct input_iterator : - public iterator {}; -struct output_iterator : public iterator {}; -template struct forward_iterator : - public iterator {}; -template struct bidirectional_iterator : - public iterator {}; -template struct random_access_iterator : - public iterator {}; - -# if defined (_STLP_BASE_MATCH_BUG) && defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES) -template -inline input_iterator_tag _STLP_CALL -iterator_category(const input_iterator<_Tp, _Distance>&) { return input_iterator_tag(); } -inline output_iterator_tag _STLP_CALL -iterator_category(const output_iterator&) { return output_iterator_tag(); } -template -inline forward_iterator_tag _STLP_CALL -iterator_category(const forward_iterator<_Tp, _Distance>&) { return forward_iterator_tag(); } -template -inline bidirectional_iterator_tag _STLP_CALL -iterator_category(const bidirectional_iterator<_Tp, _Distance>&) { return bidirectional_iterator_tag(); } -template -inline random_access_iterator_tag _STLP_CALL -iterator_category(const random_access_iterator<_Tp, _Distance>&) { return random_access_iterator_tag(); } -template -inline _Tp* _STLP_CALL value_type(const input_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } -template -inline _Tp* _STLP_CALL value_type(const forward_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } -template -inline _Tp* _STLP_CALL value_type(const bidirectional_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } -template -inline _Tp* _STLP_CALL value_type(const random_access_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } -template -inline _Distance* _STLP_CALL distance_type(const input_iterator<_Tp, _Distance>&) { return (_Distance*)(0); } -template -inline _Distance* _STLP_CALL distance_type(const forward_iterator<_Tp, _Distance>&) { return (_Distance*)(0); } -template -inline _Distance* _STLP_CALL distance_type(const bidirectional_iterator<_Tp, _Distance>&) { return (_Distance*)(0);} -template -inline _Distance* _STLP_CALL distance_type(const random_access_iterator<_Tp, _Distance>&) { return (_Distance*)(0); } -# endif /* BASE_MATCH */ - -#endif /* _STLP_NO_ANACHRONISMS */ - -template -inline void _STLP_CALL __distance(const _InputIterator& __first, const _InputIterator& __last, - _Distance& __n, const input_iterator_tag &) { - _InputIterator __it(__first); - while (__it != __last) { ++__it; ++__n; } -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline void _STLP_CALL __distance(const _ForwardIterator& __first, const _ForwardIterator& __last, - _Distance& __n, const forward_iterator_tag &) { - _ForwardIterator __it(__first); - while (__it != __last) { ++__first; ++__n; } -} - -template -_STLP_INLINE_LOOP void _STLP_CALL __distance(const _BidirectionalIterator& __first, - const _BidirectionalIterator& __last, - _Distance& __n, const bidirectional_iterator_tag &) { - _BidirectionalIterator __it(__first); - while (__it != __last) { ++__it; ++__n; } -} -# endif - -template -inline void _STLP_CALL __distance(const _RandomAccessIterator& __first, - const _RandomAccessIterator& __last, - _Distance& __n, const random_access_iterator_tag &) { - __n += __last - __first; -} - -#ifndef _STLP_NO_ANACHRONISMS -template -inline void _STLP_CALL distance(const _InputIterator& __first, - const _InputIterator& __last, _Distance& __n) { - __distance(__first, __last, __n, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); -} -#endif - -template -inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL -__distance(const _InputIterator& __first, const _InputIterator& __last, const input_iterator_tag &) { - _STLP_DIFFERENCE_TYPE(_InputIterator) __n = 0; - _InputIterator __it(__first); - while (__it != __last) { - ++__it; ++__n; - } - return __n; -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline _STLP_DIFFERENCE_TYPE(_ForwardIterator) _STLP_CALL -__distance(const _ForwardIterator& __first, const _ForwardIterator& __last, - const forward_iterator_tag &) -{ - _STLP_DIFFERENCE_TYPE(_ForwardIterator) __n = 0; - _ForwardIterator __it(__first); - while (__it != __last) { - ++__it; ++__n; - } - return __n; -} - -template -_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) _STLP_CALL -__distance(const _BidirectionalIterator& __first, - const _BidirectionalIterator& __last, - const bidirectional_iterator_tag &) { - _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) __n = 0; - _BidirectionalIterator __it(__first); - while (__it != __last) { - ++__it; ++__n; - } - return __n; -} -# endif - -template -inline _STLP_DIFFERENCE_TYPE(_RandomAccessIterator) _STLP_CALL -__distance(const _RandomAccessIterator& __first, const _RandomAccessIterator& __last, - const random_access_iterator_tag &) { - return __last - __first; -} - -template -inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL -distance(const _InputIterator& __first, const _InputIterator& __last) { - return __distance(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); -} - - -// fbp: those are being used for iterator/const_iterator definitions everywhere -template -struct _Nonconst_traits; - -template -struct _Const_traits { - typedef _Tp value_type; - typedef const _Tp& reference; - typedef const _Tp* pointer; - typedef _Nonconst_traits<_Tp> _Non_const_traits; -}; - -template -struct _Nonconst_traits { - typedef _Tp value_type; - typedef _Tp& reference; - typedef _Tp* pointer; - typedef _Nonconst_traits<_Tp> _Non_const_traits; -}; - -# if defined (_STLP_BASE_TYPEDEF_BUG) -// this workaround is needed for SunPro 4.0.1 -template -struct __cnst_traits_aux : private _Traits -{ - typedef typename _Traits::value_type value_type; -}; -# define __TRAITS_VALUE_TYPE(_Traits) __cnst_traits_aux<_Traits>::value_type -# else -# define __TRAITS_VALUE_TYPE(_Traits) _Traits::value_type -# endif - -# if defined (_STLP_MSVC) -// MSVC specific -template -inline void _STLP_CALL _Distance(_InputIterator __first, - _InputIterator __last, _Dist& __n) { - __distance(__first, __last, __n, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); -} -# endif - -template -_STLP_INLINE_LOOP void _STLP_CALL __advance(_InputIter& __i, _Distance __n, const input_iterator_tag &) { - while (__n--) ++__i; -} - -// fbp : added output iterator tag variant -template -_STLP_INLINE_LOOP void _STLP_CALL __advance(_InputIter& __i, _Distance __n, const output_iterator_tag &) { - while (__n--) ++__i; -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -_STLP_INLINE_LOOP void _STLP_CALL __advance(_ForwardIterator& i, _Distance n, const forward_iterator_tag &) { - while (n--) ++i; -} -# endif - -template -_STLP_INLINE_LOOP void _STLP_CALL __advance(_BidirectionalIterator& __i, _Distance __n, - const bidirectional_iterator_tag &) { - if (__n > 0) - while (__n--) ++__i; - else - while (__n++) --__i; -} - -template -inline void _STLP_CALL __advance(_RandomAccessIterator& __i, _Distance __n, - const random_access_iterator_tag &) { - __i += __n; -} - -template -inline void _STLP_CALL advance(_InputIterator& __i, _Distance __n) { - __advance(__i, __n, _STLP_ITERATOR_CATEGORY(__i, _InputIterator)); -} - -_STLP_END_NAMESPACE - -# if defined (_STLP_DEBUG) && ! defined (_STLP_DEBUG_H) -# include -# endif - -#endif /* _STLP_INTERNAL_ITERATOR_BASE_H */ - - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_iterator_old.h --- a/epoc32/include/stdapis/stlport/stl/_iterator_old.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,351 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_ITERATOR_OLD_H -#define _STLP_INTERNAL_ITERATOR_OLD_H - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES - -template -inline output_iterator_tag _STLP_CALL -iterator_category(const back_insert_iterator<_Container>&) { return output_iterator_tag(); } -template -inline output_iterator_tag _STLP_CALL -iterator_category(const front_insert_iterator<_Container>&) { return output_iterator_tag(); } -template -inline output_iterator_tag _STLP_CALL -iterator_category(const insert_iterator<_Container>&) { return output_iterator_tag(); } - -# endif - -# if defined (_STLP_MSVC50_COMPATIBILITY) -# define __Reference _Reference, class _Pointer -# define Reference__ _Reference, _Pointer -template -# else -# define __Reference _Reference -# define Reference__ _Reference -template -# endif -class reverse_bidirectional_iterator { - typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, - Reference__, _Distance> _Self; - // friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& x, const _Self& y); -protected: - _BidirectionalIterator current; -public: - typedef bidirectional_iterator_tag iterator_category; - typedef _Tp value_type; - typedef _Distance difference_type; -# if defined (_STLP_MSVC50_COMPATIBILITY) - typedef _Pointer pointer; -# else - typedef _Tp* pointer; -# endif - typedef _Reference reference; - - reverse_bidirectional_iterator() {} - explicit reverse_bidirectional_iterator(_BidirectionalIterator __x) - : current(__x) {} - _BidirectionalIterator base() const { return current; } - _Reference operator*() const { - _BidirectionalIterator __tmp = current; - return *--__tmp; - } -# if !(defined _STLP_NO_ARROW_OPERATOR) - _STLP_DEFINE_ARROW_OPERATOR -# endif - _Self& operator++() { - --current; - return *this; - } - _Self operator++(int) { - _Self __tmp = *this; - --current; - return __tmp; - } - _Self& operator--() { - ++current; - return *this; - } - _Self operator--(int) { - _Self __tmp = *this; - ++current; - return __tmp; - } -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template -inline bidirectional_iterator_tag _STLP_CALL -iterator_category(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) -{ return bidirectional_iterator_tag(); } -template -inline _Tp* _STLP_CALL -value_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) -{ return (_Tp*) 0; } -template -inline _Distance* _STLP_CALL -distance_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) -{ return (_Distance*) 0; } -#endif - -template -inline bool _STLP_CALL operator==( - const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, - Reference__, _Distance>& __y) -{ - return __x.base() == __y.base(); -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool _STLP_CALL operator!=( - const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __x, - const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __y) -{ - return !(__x == __y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -#if ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) - -// This is the old version of reverse_iterator, as found in the original -// HP STL. It does not use partial specialization. - -template = 0x2405) \ - || defined(__MRC__) || (defined(__SC__) && !defined(__DMC__)) //*ty 03/22/2001 - give the default to the secont param under MPW. - // I believe giving the default will cause any harm even though the 2nd type parameter - // still have to be provided for T* type iterators. - __DFL_TMPL_PARAM(_Tp,iterator_traits<_RandomAccessIterator>::value_type), -# else - class _Tp, -#endif - __DFL_TMPL_PARAM(_Reference,_Tp&), -# if defined (_STLP_MSVC50_COMPATIBILITY) - __DFL_TMPL_PARAM(_Pointer, _Tp*), -# endif - __DFL_TYPE_PARAM(_Distance,ptrdiff_t)> -class reverse_iterator { - typedef reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance> - _Self; -protected: - _RandomAccessIterator __current; -public: - typedef random_access_iterator_tag iterator_category; - typedef _Tp value_type; - typedef _Distance difference_type; -# if defined (_STLP_MSVC50_COMPATIBILITY) - typedef _Pointer pointer; -# else - typedef _Tp* pointer; -# endif - typedef _Reference reference; - - reverse_iterator() {} - reverse_iterator(const _Self& __x) : __current(__x.base()) {} - explicit reverse_iterator(_RandomAccessIterator __x) : __current(__x) {} - _Self& operator=(const _Self& __x) {__current = __x.base(); return *this; } - - _RandomAccessIterator base() const { return __current; } - _Reference operator*() const { return *(__current - (difference_type)1); } - -# if !(defined _STLP_NO_ARROW_OPERATOR) - _STLP_DEFINE_ARROW_OPERATOR -# endif - - _Self& operator++() { - --__current; - return *this; - } - _Self operator++(int) { - _Self __tmp = *this; - --__current; - return __tmp; - } - _Self& operator--() { - ++__current; - return *this; - } - _Self operator--(int) { - _Self __tmp = *this; - ++__current; - return __tmp; - } - _Self operator+(_Distance __n) const { - return _Self(__current - __n); - } - _Self& operator+=(_Distance __n) { - __current -= __n; - return *this; - } - _Self operator-(_Distance __n) const { - return _Self(__current + __n); - } - _Self& operator-=(_Distance __n) { - __current += __n; - return *this; - } - _Reference operator[](_Distance __n) const { return *(*this + __n); } -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template -inline random_access_iterator_tag _STLP_CALL -iterator_category(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&) -{ return random_access_iterator_tag(); } -template -inline _Tp* _STLP_CALL value_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&) -{ return (_Tp*) 0; } -template -inline _Distance* _STLP_CALL -distance_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&) -{ return (_Distance*) 0; } -#endif - -template -inline bool _STLP_CALL -operator==(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) -{ - return __x.base() == __y.base(); -} - -template -inline bool _STLP_CALL -operator<(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) -{ - return __y.base() < __x.base(); -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool _STLP_CALL -operator!=(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) { - return !(__x == __y); -} - -template -inline bool _STLP_CALL -operator>(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) { - return __y < __x; -} - -template -inline bool _STLP_CALL -operator<=(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) { - return !(__y < __x); -} - -template -inline bool _STLP_CALL -operator>=(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) { - return !(__x < __y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -template -inline _Distance _STLP_CALL -operator-(const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __y) -{ - return __y.base() - __x.base(); -} - -template -inline reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance> _STLP_CALL -operator+(_Distance __n, - const reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>& __x) -{ - return reverse_iterator<_RandomAccessIterator, _Tp, - Reference__, _Distance>(__x.base() - __n); -} - -#endif /* ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_ITERATOR_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_limits.c --- a/epoc32/include/stdapis/stlport/stl/_limits.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,270 +0,0 @@ -/* - * Copyright (c) 1998,1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -# if !defined (_STLP_LIMITS_C) -# define _STLP_LIMITS_C - -#ifndef _STLP_INTERNAL_LIMITS_H -# include -#endif - -//========================================================== -// numeric_limits static members -//========================================================== - -_STLP_BEGIN_NAMESPACE - -# if ! defined ( _STLP_STATIC_CONST_INIT_BUG) - -# define __declare_numeric_base_member(__type, __mem, _Init) \ -template \ - const __type _Numeric_limits_base<__number>:: __mem - -__declare_numeric_base_member(bool, is_specialized, false); -__declare_numeric_base_member(int, digits, 0); -__declare_numeric_base_member(int, digits10, 0); -__declare_numeric_base_member(bool, is_signed, false); -__declare_numeric_base_member(bool, is_integer, false); -__declare_numeric_base_member(bool, is_exact, false); -__declare_numeric_base_member(int, radix, 0); -__declare_numeric_base_member(int, min_exponent, 0); -__declare_numeric_base_member(int, max_exponent, 0); -__declare_numeric_base_member(int, min_exponent10, 0); -__declare_numeric_base_member(int, max_exponent10, 0); -__declare_numeric_base_member(bool, has_infinity, false); -__declare_numeric_base_member(bool, has_quiet_NaN, false); -__declare_numeric_base_member(bool, has_signaling_NaN, false); -__declare_numeric_base_member(float_denorm_style, has_denorm, denorm_absent); -__declare_numeric_base_member(bool, has_denorm_loss, false); -__declare_numeric_base_member(bool, is_iec559, false); -__declare_numeric_base_member(bool, is_bounded, false); -__declare_numeric_base_member(bool, is_modulo, false); -__declare_numeric_base_member(bool, traps, false); -__declare_numeric_base_member(bool, tinyness_before, false); -__declare_numeric_base_member(float_round_style, round_style, round_toward_zero); - -# undef __declare_numeric_base_member - -# define __declare_integer_limits_member(__type, __mem, _Init) \ -template \ - const __type _Integer_limits<_Int, __imin, __imax, __idigits, __ismod>:: __mem - -__declare_integer_limits_member(bool, is_specialized, true); -__declare_integer_limits_member(int, digits, (__idigits < 0) ? \ - ((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1)) \ - : (__idigits) ); -__declare_integer_limits_member(int, digits10, (int)(301UL * digits) /1000); -__declare_integer_limits_member(bool, is_signed, __imin != 0); -__declare_integer_limits_member(bool, is_integer, true); -__declare_integer_limits_member(bool, is_exact, true); -__declare_integer_limits_member(int, radix, 2); -__declare_integer_limits_member(bool, is_bounded, true); -__declare_integer_limits_member(bool, is_modulo, true); - -# define __declare_float_limits_member(__type, __mem, _Init) \ -template \ -const __type _Floating_limits< __number, __Digits, __Digits10, \ - __MinExp, __MaxExp, __MinExp10, __MaxExp10, \ - __IsIEC559, __RoundStyle>::\ - __mem - -__declare_float_limits_member(bool, is_specialized, true); -__declare_float_limits_member(int, digits, __Digits); -__declare_float_limits_member(int, digits10, __Digits10); -__declare_float_limits_member(bool, is_signed, true); -__declare_float_limits_member(int, radix, FLT_RADIX); -__declare_float_limits_member(int, min_exponent, __MinExp); -__declare_float_limits_member(int, max_exponent, __MaxExp); -__declare_float_limits_member(int, min_exponent10, __MinExp10); -__declare_float_limits_member(int, max_exponent10, __MaxExp10); -__declare_float_limits_member(bool, has_infinity, true); -__declare_float_limits_member(bool, has_quiet_NaN, true); -__declare_float_limits_member(bool, has_signaling_NaN, true); -__declare_float_limits_member(float_denorm_style, has_denorm, denorm_indeterminate); -__declare_float_limits_member(bool, has_denorm_loss, false); -__declare_float_limits_member(bool, is_iec559, __IsIEC559); -__declare_float_limits_member(bool, is_bounded, true); -__declare_float_limits_member(bool, traps, true); -__declare_float_limits_member(bool, tinyness_before, false); -__declare_float_limits_member(float_round_style, round_style, __RoundStyle); - -# endif /* _STLP_STATIC_CONST_INIT_BUG */ - - -# ifdef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION - -# if defined(_STLP_BIG_ENDIAN) -# if defined(__OS400__) -# define _STLP_FLOAT_INF_REP { 0x7f80, 0 } -# define _STLP_FLOAT_QNAN_REP { 0xffc0, 0 } -# define _STLP_FLOAT_SNAN_REP { 0xff80, 0 } -# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 } -# define _STLP_DOUBLE_QNAN_REP { 0xfff8, 0, 0, 0 } -# define _STLP_DOUBLE_SNAN_REP { 0xfff0, 0, 0, 0 } -# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 } -# define _STLP_LDOUBLE_QNAN_REP { 0xfff8, 0, 0, 0, 0, 0, 0, 0 } -# define _STLP_LDOUBLE_SNAN_REP { 0xfff0, 0, 0, 0, 0, 0, 0, 0 } -# else -# define _STLP_FLOAT_INF_REP { 0x7f80, 0 } -# define _STLP_FLOAT_SNAN_REP { 0x7f81, 0 } -# define _STLP_FLOAT_QNAN_REP { 0x7fc1, 0 } -# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 } -# define _STLP_DOUBLE_QNAN_REP { 0x7ff1, 0, 0, 0 } -# define _STLP_DOUBLE_SNAN_REP { 0x7ff9, 0, 0, 0 } -# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 } -# define _STLP_LDOUBLE_SNAN_REP { 0x7ff1, 0, 0, 0, 0, 0, 0, 0 } -# define _STLP_LDOUBLE_QNAN_REP { 0x7ff9, 0, 0, 0, 0, 0, 0, 0 } -# endif - -# elif defined (_STLP_LITTLE_ENDIAN) - -# if 0 /* defined(_STLP_MSVC) || defined(__linux__) */ -// some IA-32 platform ?? -# define _STLP_FLOAT_INF_REP { 0, 0x7f80 } -# define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 } -# define _STLP_FLOAT_SNAN_REP { 0, 0xff80 } - -# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 } -# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 } -# define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0xfff0 } -# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 } // ???? -# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 } // ???? -# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF0, 0 } // ???? - -# elif defined(__DECCXX) - -# define _STLP_FLOAT_INF_REP { 0, 0x7f80 } -# define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 } -# define _STLP_FLOAT_SNAN_REP { 0x5555, 0x7f85 } - -# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 } -# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 } -# define _STLP_DOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x7ff5 } - -# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0, 0, 0, 0, 0x7fff } -# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0, 0, 0, 0x8000, 0xffff } -# define _STLP_LDOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x7fff} -# else -# define _STLP_FLOAT_INF_REP { 0, 0x7f80 } -# define _STLP_FLOAT_QNAN_REP { 0, 0x7fa0 } -# define _STLP_FLOAT_SNAN_REP { 0, 0x7fc0 } -# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 } -# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0x7ff4 } -# define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0x7ff8 } -# if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) -# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 } // ???? -# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 } // ???? -# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF8, 0 } -# else -# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff } -# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xa000, 0x7fff } -# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xc000, 0x7fff } -# endif -# endif -#else -/* This is an architecture we don't know how to handle. Return some -obviously wrong values. */ -# define _STLP_FLOAT_INF_REP { 0, 0 } -# define _STLP_FLOAT_QNAN_REP { 0, 0 } -# define _STLP_FLOAT_SNAN_REP { 0, 0 } -# define _STLP_DOUBLE_INF_REP { 0, 0 } -# define _STLP_DOUBLE_QNAN_REP { 0, 0 } -# define _STLP_DOUBLE_SNAN_REP { 0, 0 } -# define _STLP_LDOUBLE_INF_REP { 0 } -# define _STLP_LDOUBLE_QNAN_REP { 0 } -# define _STLP_LDOUBLE_SNAN_REP { 0 } - -#endif - -#if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -# ifndef _STLP_NO_LONG_DOUBLE -template -const _L_rep _LimG<__dummy>::_L_inf = {_STLP_LDOUBLE_INF_REP}; -template -const _L_rep _LimG<__dummy>::_L_qNaN = {_STLP_LDOUBLE_QNAN_REP}; -template -const _L_rep _LimG<__dummy>::_L_sNaN = {_STLP_LDOUBLE_SNAN_REP}; -# endif -template -const _D_rep _LimG<__dummy>::_D_inf = {_STLP_DOUBLE_INF_REP}; -template -const _D_rep _LimG<__dummy>::_D_qNaN = {_STLP_DOUBLE_QNAN_REP}; -template -const _D_rep _LimG<__dummy>::_D_sNaN = {_STLP_DOUBLE_SNAN_REP}; -template -const _F_rep _LimG<__dummy>::_F_inf = {_STLP_FLOAT_INF_REP}; -template -const _F_rep _LimG<__dummy>::_F_qNaN = {_STLP_FLOAT_QNAN_REP}; -template -const _F_rep _LimG<__dummy>::_F_sNaN = {_STLP_FLOAT_SNAN_REP}; - -#else - -__DECLARE_INSTANCE( const _F_rep, - _LimG::_F_inf, = _STLP_FLOAT_INF_REP); -__DECLARE_INSTANCE( const _F_rep, - _LimG::_F_qNaN, = _STLP_FLOAT_QNAN_REP); -__DECLARE_INSTANCE( const _F_rep, - _LimG::_F_sNaN, = _STLP_FLOAT_SNAN_REP); -__DECLARE_INSTANCE( const _D_rep, - _LimG::_D_inf, = _STLP_DOUBLE_INF_REP); -__DECLARE_INSTANCE( const _D_rep, - _LimG::_D_qNaN, = _STLP_DOUBLE_QNAN_REP); -__DECLARE_INSTANCE( const _D_rep, - _LimG::_D_sNaN, = _STLP_DOUBLE_SNAN_REP); -# ifndef _STLP_NO_LONG_DOUBLE -__DECLARE_INSTANCE( const _L_rep, - _LimG::_L_inf, = _STLP_LDOUBLE_INF_REP); -__DECLARE_INSTANCE( const _L_rep, - _LimG::_L_qNaN, = _STLP_LDOUBLE_QNAN_REP); -__DECLARE_INSTANCE( const _L_rep, - _LimG::_L_sNaN, = _STLP_LDOUBLE_SNAN_REP); -# endif - -#endif /* STATIC_DATA */ - -# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */ - -# undef __declare_integer_limits_member -# undef __declare_float_limits_member -# undef __HACK_ILIMITS -# undef __HACK_NOTHING -# undef __declare_int_members -# undef __declare_float_members -# undef _STLP_LIMITS_MIN_TYPE -# undef _STLP_LIMITS_MAX_TYPE - -# undef _STLP_FLOAT_INF_REP -# undef _STLP_FLOAT_QNAN_REP -# undef _STLP_FLOAT_SNAN_REP -# undef _STLP_DOUBLE_INF_REP -# undef _STLP_DOUBLE_QNAN_REP -# undef _STLP_DOUBLE_SNAN_REP -# undef _STLP_LDOUBLE_INF_REP -# undef _STLP_LDOUBLE_QNAN_REP -# undef _STLP_LDOUBLE_SNAN_REP - -_STLP_END_NAMESPACE - - -#endif /* _STLP_LIMITS_C_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_list.c --- a/epoc32/include/stdapis/stlport/stl/_list.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,252 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_LIST_C -#define _STLP_LIST_C - -#ifndef _STLP_INTERNAL_LIST_H -# include -#endif - -#if defined (__WATCOMC__) || defined (_STLP_USE_TRAP_LEAVE) -#include -#endif - -# undef list -# define list __WORKAROUND_DBG_RENAME(list) - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -template -void _STLP_CALL -_List_global<_Dummy>::_Transfer(_List_node_base* __position, - _List_node_base* __first, _List_node_base* __last) { - if (__position != __last) { - // Remove [first, last) from its old position. - ((_Node*) (__last->_M_prev))->_M_next = __position; - ((_Node*) (__first->_M_prev))->_M_next = __last; - ((_Node*) (__position->_M_prev))->_M_next = __first; - - // Splice [first, last) into its new position. - _Node* __tmp = (_Node*) (__position->_M_prev); - __position->_M_prev = __last->_M_prev; - __last->_M_prev = __first->_M_prev; - __first->_M_prev = __tmp; - } -} - -#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */ - - -template -void -_List_base<_Tp,_Alloc>::clear() -{ - _List_node<_Tp>* __cur = this->_M_node._M_data; - if (!__cur) - return; - __cur = (_List_node<_Tp>*)__cur->_M_next; - while (__cur != this->_M_node._M_data) { - _List_node<_Tp>* __tmp = __cur; - __cur = (_List_node<_Tp>*) __cur->_M_next; - _STLP_STD::_Destroy(&__tmp->_M_data); - this->_M_node.deallocate(__tmp, 1); - } - this->_M_node._M_data->_M_next = this->_M_node._M_data; - this->_M_node._M_data->_M_prev = this->_M_node._M_data; -} - -# if defined (_STLP_NESTED_TYPE_PARAM_BUG) -# define size_type size_t -# endif - -template -void list<_Tp, _Alloc>::resize(size_type __new_size, _Tp __x) -{ - iterator __i = begin(); - size_type __len = 0; - for ( ; __i != end() && __len < __new_size; ++__i, ++__len); - - if (__len == __new_size) - erase(__i, end()); - else // __i == end() - insert(end(), __new_size - __len, __x); -} - -template -list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list<_Tp, _Alloc>& __x) -{ - if (this != &__x) { - iterator __first1 = begin(); - iterator __last1 = end(); - const_iterator __first2 = __x.begin(); - const_iterator __last2 = __x.end(); - while (__first1 != __last1 && __first2 != __last2) - *__first1++ = *__first2++; - if (__first2 == __last2) - erase(__first1, __last1); - else - insert(__last1, __first2, __last2); - } - return *this; -} - -template -void list<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { - iterator __i = begin(); - for ( ; __i != end() && __n > 0; ++__i, --__n) - *__i = __val; - if (__n > 0) - insert(end(), __n, __val); - else - erase(__i, end()); -} - -template -void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred) { - typename list<_Tp, _Alloc>::iterator __first = __that.begin(); - typename list<_Tp, _Alloc>::iterator __last = __that.end(); - while (__first != __last) { - typename list<_Tp, _Alloc>::iterator __next = __first; - ++__next; - if (__pred(*__first)) __that.erase(__first); - __first = __next; - } -} - -template -void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred) { - typename list<_Tp, _Alloc>::iterator __first = __that.begin(); - typename list<_Tp, _Alloc>::iterator __last = __that.end(); - if (__first == __last) return; - typename list<_Tp, _Alloc>::iterator __next = __first; - while (++__next != __last) { - if (__binary_pred(*__first, *__next)) - __that.erase(__next); - else - __first = __next; - __next = __first; - } -} - -template -void _S_merge(list<_Tp, _Alloc>& __that, list<_Tp, _Alloc>& __x, - _StrictWeakOrdering __comp) { - typedef typename list<_Tp, _Alloc>::iterator _Literator; - _Literator __first1 = __that.begin(); - _Literator __last1 = __that.end(); - _Literator __first2 = __x.begin(); - _Literator __last2 = __x.end(); - while (__first1 != __last1 && __first2 != __last2) - if (__comp(*__first2, *__first1)) { - _Literator __next = __first2; - _List_global_inst::_Transfer(__first1._M_node, __first2._M_node, (++__next)._M_node); - __first2 = __next; - } - else - ++__first1; - if (__first2 != __last2) _List_global_inst::_Transfer(__last1._M_node, __first2._M_node, __last2._M_node); -} - -template -void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp) { - // Do nothing if the list has length 0 or 1. - if (__that._M_node._M_data->_M_next != __that._M_node._M_data && - (__that._M_node._M_data->_M_next)->_M_next != __that._M_node._M_data) { - -#if !defined (__WATCOMC__) -#ifdef _STLP_USE_TRAP_LEAVE - typedef vector*, _Alloc> _TmpVec; - _TmpVec* __pTmp = new _TmpVec(); - _TmpVec& __counter = *__pTmp; - for (int i = 0; 1< 64; ++i) { - list<_Tp, _Alloc>* __pTmp2 = new list<_Tp, _Alloc>; - __counter.push_back (__pTmp2); - } - list<_Tp, _Alloc>* __pcarry = new list<_Tp, _Alloc>; - list<_Tp, _Alloc>& __carry = *__pcarry; -#else - list<_Tp, _Alloc> __counter[64]; - list<_Tp, _Alloc> __carry; -#endif -#else - list<_Tp, _Alloc> __carry; - __vector__, _Alloc> __counter(64); -#endif - int __fill = 0; -#ifdef _STLP_USE_TRAP_LEAVE - while (!__that.empty()) { - __carry.splice(__carry.begin(), __that, __that.begin()); - int __i = 0; - - while(__i < __fill && !__counter[__i]->empty()) { - _S_merge(*__counter[__i], __carry, __comp); - __carry.swap(*__counter[__i++]); - } - __carry.swap(*__counter[__i]); - if (__i == __fill) ++__fill; - } - - for (int __i = 1; __i < __fill; ++__i) - _S_merge(*__counter[__i], *__counter[__i-1], __comp); - __that.swap(*__counter[__fill-1]); - - // those objects won't just go away - __counter.clear(); - CleanupStack::Pop(66); - } -# else - while (!__that.empty()) { - __carry.splice(__carry.begin(), __that, __that.begin()); - int __i = 0; - - while(__i < __fill && !__counter[__i].empty()) { - _S_merge(__counter[__i], __carry, __comp); - __carry.swap(__counter[__i++]); - } - __carry.swap(__counter[__i]); - if (__i == __fill) ++__fill; - } - - for (int __i = 1; __i < __fill; ++__i) - _S_merge(__counter[__i], __counter[__i-1], __comp); - __that.swap(__counter[__fill-1]); - } -# endif - -} - -# undef list -# undef size_type - -_STLP_END_NAMESPACE - -#endif /* _STLP_LIST_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_locale.h --- a/epoc32/include/stdapis/stlport/stl/_locale.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,259 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_LOCALE_H -#define _STLP_INTERNAL_LOCALE_H - -#ifndef _STLP_CSTDLIB -# include -#endif - -#ifndef _STLP_CWCHAR_H -# include -#endif - -#ifndef _STLP_INTERNAL_THREADS_H -# include -#endif - -#ifndef _STLP_STRING_FWD_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -class _STLP_CLASS_DECLSPEC _Locale_impl; // Forward declaration of opaque type. -class _STLP_CLASS_DECLSPEC _Locale; // Forward declaration of opaque type. -class _STLP_CLASS_DECLSPEC locale; -class _STLP_CLASS_DECLSPEC ios_base; - - -template -bool -__locale_do_operator_call (const locale* __that, - const basic_string<_CharT, _Traits, _Alloc >& __x, - const basic_string<_CharT, _Traits, _Alloc >& __y); - -# define _BaseFacet locale::facet - -class _STLP_CLASS_DECLSPEC locale { -public: - // types: - - class -#if defined (__SYMBIAN32__) || defined(__GCCE__) - _STLP_CLASS_DECLSPEC -#else - _STLP_DECLSPEC -#endif - facet : private _Refcount_Base { - protected: - explicit facet(size_t __no_del = 0) : _Refcount_Base(1), _M_delete(__no_del == 0) {} - - _STLP_DECLSPEC virtual ~facet(); - friend class locale; - friend class _Locale_impl; - friend class _Locale; - - private: // Invalidate assignment and copying. - facet(const facet& __f) : _Refcount_Base(1), _M_delete(__f._M_delete == 0) {}; - void operator=(const facet&); - - private: // Data members. - const bool _M_delete; - }; - -#if defined(__MVS__) || defined(__OS400__) - struct -#else - class -#endif - _STLP_DECLSPEC id { - friend class locale; - friend class _Locale_impl; - public: - size_t _M_index; -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static _STLP_STATIC_MEMBER_DECLSPEC size_t& get_locale_id_S_max(); -# else - static size_t _S_max; -# endif - }; - - typedef int category; -# if defined (_STLP_STATIC_CONST_INIT_BUG) - enum _Category { -# else - static const category -# endif - none = 0x000, - collate = 0x010, - ctype = 0x020, - monetary = 0x040, - numeric = 0x100, - time = 0x200, - messages = 0x400, - all = collate | ctype | monetary | numeric | time | messages -# if defined (_STLP_STATIC_CONST_INIT_BUG) - } -# endif - ; - - // construct/copy/destroy: - _STLP_DECLSPEC locale(); - _STLP_DECLSPEC locale(const locale&) _STLP_NOTHROW; - explicit locale(const char *); - locale(const locale&, const char*, category); - - // those are for internal use - locale(_Locale_impl*); - locale(_Locale_impl*, bool); - -public: - -# if defined ( _STLP_MEMBER_TEMPLATES ) /* && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) */ - template - locale(const locale& __loc, _Facet* __f) : _M_impl(0) - { - // _M_impl = this->_S_copy_impl(__loc._M_impl, __f != 0); - new(this) locale(__loc._M_impl, __f != 0); - if (__f != 0) - this->_M_insert((facet*)__f, _Facet::GetFacetLocaleId()); - } -# endif - - locale(const locale&, const locale&, category); - _STLP_DECLSPEC ~locale() _STLP_NOTHROW; - _STLP_DECLSPEC const locale& operator=(const locale&) _STLP_NOTHROW; - -# if !(defined (_STLP_NO_MEMBER_TEMPLATES) || defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)) - template locale combine(const locale& __loc) const{ - locale __result(__loc._M_impl, true); -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - if (facet* __f = __loc._M_get_facet(_Facet::GetFacetLocaleId())) { - __result._M_insert((facet*)__f, _Facet::GetFacetLocaleId()); -#else - if (facet* __f = __loc._M_get_facet(_Facet::id)) { - __result._M_insert((facet*)__f, _Facet::id); -#endif - __f->_M_incr(); - } - else - _M_throw_runtime_error(); - return __result; - } -# endif - // locale operations: - _STLP_DECLSPEC string name() const; - - _STLP_DECLSPEC bool operator==(const locale&) const; - _STLP_DECLSPEC bool operator!=(const locale&) const; - -# if ! defined ( _STLP_MEMBER_TEMPLATES ) || defined (_STLP_INLINE_MEMBER_TEMPLATES) || (defined(__MWERKS__) && __MWERKS__ <= 0x2301) - bool operator()(const string& __x, const string& __y) const; -# ifndef _STLP_NO_WCHAR_T - bool operator()(const wstring& __x, const wstring& __y) const; -# endif -# else - template - bool operator()(const basic_string<_CharT, _Traits, _Alloc>& __x, - const basic_string<_CharT, _Traits, _Alloc>& __y) const { - return __locale_do_operator_call(this, __x, __y); - } -# endif - - // global locale objects: - _STLP_DECLSPEC static locale _STLP_CALL global(const locale&); - _STLP_DECLSPEC static const locale& _STLP_CALL classic(); - -public: // Helper functions for locale globals. - _STLP_DECLSPEC facet* _M_get_facet(const id&) const; - // same, but throws - _STLP_DECLSPEC facet* _M_use_facet(const id&) const; - _STLP_DECLSPEC static void _STLP_CALL _M_throw_runtime_error(const char* = 0); - static void _STLP_CALL _S_initialize(); - static void _STLP_CALL _S_uninitialize(); - -private: // More helper functions. - // static _Locale_impl* _STLP_CALL _S_copy_impl(_Locale_impl*, bool); - _STLP_DECLSPEC void _M_insert(facet* __f, id& __id); - - // friends: - friend class _Locale_impl; - friend class _Locale; - friend class ios_base; - -private: // Data members - _Locale_impl* _M_impl; -}; - -//---------------------------------------------------------------------- -// locale globals - -# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS -template -inline const _Facet& -_Use_facet<_Facet>::operator *() const -# else -template inline const _Facet& use_facet(const locale& __loc) -# endif -{ -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - return *__STATIC_CAST(const _Facet*,__loc._M_use_facet(_Facet::GetFacetLocaleId())); -#else - return *__STATIC_CAST(const _Facet*,__loc._M_use_facet(_Facet::id)); -#endif -} - - -# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS -template -struct has_facet { - const locale& __loc; - has_facet(const locale& __p_loc) : __loc(__p_loc) {} - operator bool() const _STLP_NOTHROW -# else -template inline bool has_facet(const locale& __loc) _STLP_NOTHROW -# endif -{ -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - return (__loc._M_get_facet(_Facet::GetFacetLocaleId()) != 0); -#else - return (__loc._M_get_facet(_Facet::id) != 0); -#endif -} - -# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS - // close class definition -}; -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_LOCALE_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_messages_facets.h --- a/epoc32/include/stdapis/stlport/stl/_messages_facets.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,186 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_MESSAGES_H -#define _STLP_INTERNAL_MESSAGES_H - -#ifndef _STLP_IOS_BASE_H -# include -#endif - -# ifndef _STLP_C_LOCALE_H -# include -# endif - -#ifndef _STLP_STRING_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// messages facets - -class messages_base { -public: - typedef int catalog; -}; - -template class messages {}; - -class _Messages; - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class messages : public locale::facet, public messages_base -#else -class _STLP_CLASS_DECLSPEC messages : public locale::facet, public messages_base -#endif -{ - friend class _Locale; -public: - typedef messages_base::catalog catalog; - typedef char char_type; - typedef string string_type; - - _STLP_DECLSPEC explicit messages(size_t __refs = 0); - - catalog open(const string& __fn, const locale& __loc) const - { return do_open(__fn, __loc); } - string_type get(catalog __c, int __set, int __msgid, - const string_type& __dfault) const - { return do_get(__c, __set, __msgid, __dfault); } - inline void close(catalog __c) const - { do_close(__c); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - - _STLP_DECLSPEC messages(_Messages*); - -protected: - _STLP_DECLSPEC messages(size_t, _Locale_messages*); -_STLP_DECLSPEC ~messages(); - -_STLP_DECLSPEC virtual catalog do_open(const string& __fn, const locale& __loc) const; -_STLP_DECLSPEC virtual string_type do_get(catalog __c, int __set, int __msgid, - const string_type& __dfault) const; -_STLP_DECLSPEC virtual void do_close(catalog __c) const; - - void _M_initialize(const char* __name); - -private: - _Messages* _M_impl; -}; - -# if !defined (_STLP_NO_WCHAR_T) - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class messages : public locale::facet, public messages_base -#else -class _STLP_CLASS_DECLSPEC messages : public locale::facet, public messages_base -#endif -{ - friend class _Locale; -public: - typedef messages_base::catalog catalog; - typedef wchar_t char_type; - typedef wstring string_type; - -_STLP_DECLSPEC explicit messages(size_t __refs = 0); - - inline catalog open(const string& __fn, const locale& __loc) const - { return do_open(__fn, __loc); } - inline string_type get(catalog __c, int __set, int __msgid, - const string_type& __dfault) const - { return do_get(__c, __set, __msgid, __dfault); } - inline void close(catalog __c) const - { do_close(__c); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - - _STLP_DECLSPEC messages(_Messages*); - -protected: - -_STLP_DECLSPEC messages(size_t, _Locale_messages*); -_STLP_DECLSPEC ~messages(); - -_STLP_DECLSPEC virtual catalog do_open(const string& __fn, const locale& __loc) const; -_STLP_DECLSPEC virtual string_type do_get(catalog __c, int __set, int __msgid, - const string_type& __dfault) const; -_STLP_DECLSPEC virtual void do_close(catalog __c) const; - - void _M_initialize(const char* __name); - -private: - _Messages* _M_impl; -}; - -# endif /* WCHAR_T */ - -template class messages_byname {}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC messages_byname : public messages { -public: - typedef messages_base::catalog catalog; - typedef string string_type; - - _STLP_DECLSPEC explicit messages_byname(const char* __name, size_t __refs = 0); - -protected: -_STLP_DECLSPEC ~messages_byname(); -}; - -# ifndef _STLP_NO_WCHAR_T -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC messages_byname : public messages { -public: - typedef messages_base::catalog catalog; - typedef wstring string_type; - -_STLP_DECLSPEC explicit messages_byname(const char* __name, size_t __refs = 0); - -protected: -_STLP_DECLSPEC ~messages_byname(); -}; -# endif /* WCHAR_T */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_MESSAGES_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_monetary.c --- a/epoc32/include/stdapis/stlport/stl/_monetary.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,827 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_MONETARY_C -#define _STLP_MONETARY_C - -# ifndef _STLP_INTERNAL_MONETARY_H -# include -# endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#ifndef _STLP_INTERNAL_IOS_H -# include -#endif - -#ifndef _STLP_INTERNAL_NUM_PUT_H -# include -#endif - -#ifndef _STLP_INTERNAL_NUM_GET_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -template -locale::id money_get<_CharT, _InputIterator>::id; - -template -locale::id money_put<_CharT, _OutputIterator>::id; -#endif -# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -typedef money_get money_get_char; -typedef money_put money_put_char; -typedef money_get > > money_get_char_2; -typedef money_put > > money_put_char_2; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, money_get_char::id, ); -__DECLARE_INSTANCE(locale::id, money_put_char::id, ); -__DECLARE_INSTANCE(locale::id, money_get_char_2::id, ); -__DECLARE_INSTANCE(locale::id, money_put_char_2::id, ); -#endif - -# ifndef _STLP_NO_WCHAR_T - -typedef money_get money_get_wchar_t; -typedef money_get > > money_get_wchar_t_2; -typedef money_put money_put_wchar_t; -typedef money_put > > money_put_wchar_t_2; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, money_get_wchar_t::id, ); -__DECLARE_INSTANCE(locale::id, money_put_wchar_t::id, ); -__DECLARE_INSTANCE(locale::id, money_get_wchar_t_2::id, ); -__DECLARE_INSTANCE(locale::id, money_put_wchar_t_2::id, ); -#endif - -# endif -# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -// money_get facets - - -// helper functions for do_get -template -pair<_InIt1, bool> __get_string(_InIt1 __first, _InIt1 __last, - _InIt2 __str_first, _InIt2 __str_last) { - pair<_InIt1, _InIt2> __pr = mismatch(__first, __last, __str_first); - return make_pair(__pr.first, __pr.second == __str_last); -} - -template -bool -__get_monetary_value(_InIt& __first, _InIt __last, _OuIt __stl_out, - const ctype<_CharT>& _c_type, - _CharT __point, - int __frac_digits, - _CharT __sep, - const string& __grouping, - bool& __syntax_ok) -{ - - size_t __digits = 0; - - if (__first == __last || !_c_type.is(ctype_base::digit, *__first)) - return false; - - char __group_sizes[128]; - char* __group_sizes_end = __grouping.size() == 0 ? 0 : __group_sizes; - char __current_group_size = 0; - - while (__first != __last) { - if (_c_type.is(ctype_base::digit, *__first)) { - ++__current_group_size; - *__stl_out++ = *__first++; - __digits++; - } -#ifdef __SYMBIAN32__ -else if ( (__current_group_size)&&(__group_sizes_end) ){ -#else - else if (__group_sizes_end) { -#endif - if (*__first == __sep) { - *__group_sizes_end++ = __current_group_size; - __current_group_size = 0; - ++__first; - } - else break; - } - else - break; - } - - if (__grouping.size() == 0) - __syntax_ok = true; - else { - if (__group_sizes_end != __group_sizes) - *__group_sizes_end++ = __current_group_size; - - __syntax_ok = __valid_grouping(__group_sizes, __group_sizes_end, - __grouping.data(), __grouping.data()+ __grouping.size()); - - if (__first == __last || *__first != __point) { - for (int __digits = 0; __digits != __frac_digits; ++__digits) - *__stl_out++ = _CharT('0'); - return true; // OK not to have decimal point - } - } -//bug fix testcase_22427 - commented -// ++__first; - - - //bug fix testcase_22427 - added if - - if (__first != __last && *__first == __point && __frac_digits) - { - //bug fix testcase_22427 - commented - ++__first; - while (__first != __last && _c_type.is(ctype_base::digit, *__first)) { - *__stl_out++ = *__first++; - ++__digits; - } - } - - //bug fix testcase_22427 - condition changed -// __syntax_ok = __syntax_ok && (__digits == __frac_digits); - - if(__digits == 0) - __syntax_ok = false; - - return true; -} - -# ifndef _STLP_NO_LONG_DOUBLE - -//===== methods ====== -template -_InputIter -money_get<_CharT, _InputIter>::do_get(_InputIter __s, _InputIter __end, bool __intl, - ios_base& __str, ios_base::iostate& __err, - long double& __units) const { - string_type __buf; - __s = do_get(__s, __end, __intl, __str, __err, __buf); - - if (__err == ios_base::goodbit || __err == ios_base::eofbit) { - __buf.push_back(0); - typename string_type::iterator __b = __buf.begin(), __e = __buf.end(); - // Can't use atold, since it might be wchar_t. Don't get confused by name below : - // it's perfectly capable of reading long double. - __get_decimal_integer(__b, __e, __units); - } - if (__s == __end) - __err |= ios_base::eofbit; - return __s; -} -# endif - -template -_InputIter -money_get<_CharT, _InputIter>::do_get(iter_type __s, - iter_type __end, bool __intl, - ios_base& __str, ios_base::iostate& __err, - string_type& __digits) const { - __err = 0; - if (__s == __end) { - __err |= ios_base::eofbit; - return __s; - } - - typedef moneypunct<_CharT, false> _Punct; - typedef moneypunct<_CharT, true> _Punct_intl; - typedef ctype<_CharT> _Ctype; -#ifdef __SYMBIAN32__ - bool __isSignSympresent = false; -#endif - - bool __testvalid = true; - locale __loc = __str.getloc(); - const _Punct& __punct = use_facet<_Punct>(__loc) ; - const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ; - const _Ctype& __c_type = use_facet<_Ctype>(__loc) ; - - money_base::pattern __format = __intl ? __punct_intl.neg_format() - : __punct.neg_format(); - string_type __ns = __intl ? __punct_intl.negative_sign() - : __punct.negative_sign(); - string_type __ps = __intl ? __punct_intl.positive_sign() - : __punct.positive_sign(); - string_type __sign = __ps; - int __i; - bool __is_positive = true; - bool __symbol_required = (__str.flags() & ios_base::showbase) !=0; - string_type __buf; - back_insert_iterator __stl_out(__buf); -// pair __result; - - for (__i = 0; __i < 4; ++__i) { - switch (__format.field[__i]) { - case (char) money_base::none: -#ifndef __SYMBIAN32__ - case (char) money_base::space: -#endif - - if (__i == 3) { - //if (__c_type.is(ctype_base::space, *__s)) { //gnu buf fix, 22/12/06 - if((__s != __end) && (!__c_type.is(ctype_base::space, *__s)) && (__ps.size()<=1) && (__ns.size()<=1) ){ - __err = ios_base::failbit; - return __s; - } - // break; //gnu bug fix 2/1/07 - } - while (__s != __end && __c_type.is(ctype_base::space, *__s)) - ++__s; - break; -#ifdef __SYMBIAN32__ - case (char) money_base::space: - if (!__c_type.is(ctype_base::space, *__s)) { -#ifdef __SYMBIAN32__ - if(!__isSignSympresent) //if no sign symbol present, space is not mandatory. - break; -#endif - __err = ios_base::failbit; - return __s; - } - ++__s; - while (__s != __end && __c_type.is(ctype_base::space, *__s)) - ++__s; - break; -#endif - case money_base::symbol: { - string_type __curs = __intl ? __punct_intl.curr_symbol() - : __punct.curr_symbol(); - pair - __result = __get_string(__s, __end, __curs.begin(), __curs.end()); - if (!__result.second && __symbol_required) - __err = ios_base::failbit; - __s = __result.first; - break; - } - case money_base::sign: { - if (__s == __end) { - if (__ps.size() == 0) - break; - if (__ns.size() == 0) { - __is_positive = false; - __sign = __ns; - break; - } - __err = ios_base::failbit; - return __s; - } - else { - if (__ps.size() == 0) { - if (__ns.size() == 0) - break; - if (*__s == __ns[0]) { - ++__s; - __is_positive = false; - __sign = __ns; -#ifdef __SYMBIAN32__ - __isSignSympresent = true; -#endif - - break; - } - // __err = ios_base::failbit; //if ps !=0 and ns!=0, and no negative sign mean it is positive, not fail. - // return __s; - break; - } - else { - if (*__s == __ps[0]) { - ++__s; -#ifdef __SYMBIAN32__ - __isSignSympresent = true; -#endif - - break; - } -#ifdef __SYMBIAN32__ - if (__ns.size() == 0) //here positive have symbol,negative have no symbol - { - __is_positive = false; // in this case if symbol not present means it is negative - __sign = __ns; - break; - } - -#else - if (__ns.size() == 0) - break; -#endif - if (*__s == __ns[0]) { - ++__s; - __is_positive = false; - __sign = __ns; -#ifdef __SYMBIAN32__ - __isSignSympresent = true; -#endif - break; - } - __err = ios_base::failbit; - // return __s; - } - } - return __s; - // break; - } - case money_base::value: { - _CharT __point = __intl ? __punct_intl.decimal_point() - : __punct.decimal_point(); - int __frac_digits = __intl ? __punct_intl.frac_digits() - : __punct.frac_digits(); - string __grouping = __intl ? __punct_intl.grouping() - : __punct.grouping(); - bool __syntax_ok = true; - - bool __result; - - _CharT __sep = __grouping.size() == 0 ? _CharT() : - __intl ? __punct_intl.thousands_sep() : __punct.thousands_sep(); - - __result = __get_monetary_value(__s, __end, __stl_out, __c_type, - __point, __frac_digits, - __sep, - __grouping, __syntax_ok); - - if (!__syntax_ok) - __err |= ios_base::failbit; - if (!__result) { - __err = ios_base::failbit; - return __s; - } - break; - - } // Close money_base::value case - - - } // Close switch statement - } // Close for loop - -#ifndef __SYMBIAN32__ //find the given number pos or neg, required for cases where sign is present at string starting and ending - do{ - bool type = true; - - int si = __ps.size(); - for (int i = 1;i<__ps.size();i++) - { - if(__s[i-1]!=__ps[i]) - { - type = false; - break; - } - } - - if ((si!=0) && (type ==true)) - { - __sign = __ps; - break; - } - if (__ns.size() == 0) - break; - type = true; - for (int i =1;i<__ns.size();i++) - { - if(__s[i-1]!=__ns[i]) - { - type = false; - break; - } - } - if (type ==true) { - __is_positive = false; - __sign = __ns; - break; - } - }while(0); - -#endif - - -#ifdef __SYMBIAN32__ -// Need to get the rest of the sign characters, if they exist. - if (__sign.size() > 1) - { - int __len = __sign.size(); - int __i = 1; - char_type __c = *__s; - char_type __eol = '\0'; - for (; __c != __eol && __i < __len; __i++) - { - if (__s != __end) - __c = *(++__s); - - } - //checking sign completely extracted successfully - - if (__i != __len) - __testvalid = false; - } - -#endif - - if (__is_positive) { - if (__ps.size() > 1) { -#ifndef __SYMBIAN32__ - pair<_InputIter, bool> - __result = __get_string(__s, __end, __ps.begin() + 1, __ps.end()); - __s = __result.first; - if (!__result.second) - __err |= ios::failbit; -#endif - if(!__testvalid) - __err |= ios::failbit; - } - if (!(__err & ios_base::failbit)) - __digits = __buf; - } - else { - if (__ns.size() > 1) { -#ifndef __SYMBIAN32__ - pair<_InputIter, bool> - __result = __get_string(__s, __end, __ns.begin() + 1, __ns.end()); - __s = __result.first; - if (!__result.second) - __err |= ios::failbit; -#endif - if(!__testvalid) - __err |= ios::failbit; - } - if (!(__err & ios::failbit) && (__ns == __sign)) { - __buf.insert(__buf.begin(),__c_type.widen('-')); - } -#ifdef __SYMBIAN32__ - if (!(__err & ios_base::failbit)) - __digits = __buf; -#else - __digits = __buf; -#endif - } - if (__s == __end) - __err |= ios::eofbit; - - return __s; -} - -// money_put facets - -template -_OutputIter -money_put<_CharT, _OutputIter> - ::do_put(_OutputIter __s, bool __intl, ios_base& __str, - char_type __fill, - const string_type& __digits) const { - typedef ctype<_CharT> _Ctype; - typedef moneypunct<_CharT, false> _Punct; - typedef moneypunct<_CharT, true> _Punct_intl; - - locale __loc = __str.getloc(); - const _Ctype& __c_type = use_facet<_Ctype>(__loc) ; - const _Punct& __punct = use_facet<_Punct>(__loc) ; - const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ; - - // some special characters - - char_type __minus = __c_type.widen('-'); - char_type __plus = __c_type.widen('+'); - char_type __space = __c_type.widen(' '); - char_type __zero = __c_type.widen('0'); - char_type __point = __intl ? __c_type.widen(__punct_intl.decimal_point()) - : __c_type.widen(__punct.decimal_point()); - - char_type __sep = __intl ? __punct_intl.thousands_sep() - : __punct .thousands_sep(); - - string __grouping = __intl ? __punct_intl.grouping() - : __punct .grouping(); - - int __frac_digits = __intl ? __punct_intl.frac_digits() - : __punct.frac_digits(); - - string_type __curr_sym = __intl ? __punct_intl.curr_symbol() - : __punct.curr_symbol(); - - // if there are no digits we are going to return __s. If there - // are digits, but not enough to fill the frac_digits, we are - // going to add zeros. I don't know whether this is right or - // not. - - if (__digits.size() == 0) - return __s; - - typename string_type::const_iterator __digits_first = __digits.begin(); - typename string_type::const_iterator __digits_last = __digits.end(); - - bool __is_negative = *__digits_first == __minus; - if (__is_negative) - ++__digits_first; - - string_type __sign = __intl ? - __is_negative ? __punct_intl.negative_sign() - : __punct_intl.positive_sign() - : - __is_negative ? __punct.negative_sign() - : __punct.positive_sign(); - typename string_type::const_iterator __cp = __digits_first; - while (__cp != __digits_last && __c_type.is(ctype_base::digit, *__cp)) - ++__cp; - if (__cp == __digits_first) - return __s; - __digits_last = __cp; - - // If grouping is required, we make a copy of __digits and - // insert the grouping. - - // To handle the fractional digits, we augment the first group - // by frac_digits. If there is only one group, we need first - // to duplicate it. - - string_type __new_digits(__digits_first, __digits_last); -#ifdef __SYMBIAN32__ - int __numberofseperators = 0; - if (__grouping.size()>0) - __numberofseperators = (__new_digits.size()/__grouping[0])+1; - else - __numberofseperators = 0; - __new_digits.resize(__new_digits.size()+__numberofseperators); -#endif - if (__grouping.size() != 0) { - if (__grouping.size() == 1) - __grouping.push_back(__grouping[0]); - __grouping[0] += __frac_digits; - _CharT* __data_ptr = __CONST_CAST(_CharT*,__new_digits.data()); - _CharT* __data_end = __data_ptr + __new_digits.size(); - - - ptrdiff_t __value_length = __insert_grouping(__data_ptr, -#ifdef __SYMBIAN32__ - __data_end-__numberofseperators, -#else - __data_end, -#endif - __grouping, - __sep, - __plus, __minus, 0); - __digits_first = __new_digits.begin(); - __digits_last = __digits_first + __value_length; - } - - // Determine the amount of padding required, if any. -#ifdef __SYMBIAN32__ - int __width = __str.width(); //width returns signed value. -#else - size_t __width = __str.width(); -#endif - -#if defined(_STLP_DEBUG) && (defined(__HP_aCC) || (__HP_aCC <= 1)) - size_t __value_length = operator -(__digits_last, __digits_first); -#else - size_t __value_length = __digits_last - __digits_first; -#endif - - size_t __length = __value_length; - - __length += __sign.size(); - if (__frac_digits != 0) - ++__length; - - bool __generate_curr = (__str.flags() & ios_base::showbase) !=0; - if (__generate_curr) - __length += __curr_sym.size(); - money_base::pattern __format = - __intl ? (__is_negative ? __punct_intl.neg_format() - : __punct_intl.pos_format()) - : (__is_negative ? __punct.neg_format() - : __punct.pos_format()); - { - for (int __i = 0; __i < 4; ++__i) - if (__format.field[__i] == (char) money_base::space) - ++__length; - } - - size_t __fill_amt = (int)__length < __width ? __width - __length : 0; - - ios_base::fmtflags __fill_pos = __str.flags() & ios_base::adjustfield; - - if (__fill_amt != 0 && - !(__fill_pos & (ios_base::left | ios_base::internal))) - __s = fill_n(__s, __fill_amt, __fill); - - for (int __i = 0; __i < 4; ++__i) { - char __ffield = __format.field[__i]; - if (__ffield == money_base::none) { - if (__fill_amt != 0 && __fill_pos == ios_base::internal) - __s = fill_n(__s, __fill_amt, __fill); - } - else if (__ffield == money_base::space) { -#ifdef __SYMBIAN32__ - if(__fill != __space) - *__s++ = __fill; - else -#endif - *__s++ = __space; - if (__fill_amt != 0 && __fill_pos == ios_base::internal) - __s = fill_n(__s, __fill_amt, __fill); - } - else if (__ffield == money_base::symbol) { - if (__generate_curr) - __s = copy(__curr_sym.begin(), __curr_sym.end(), __s); - } - else if (__ffield == money_base::sign) { - if (__sign.size() != 0) - *__s++ = __sign[0]; - } - else if (__ffield == money_base::value) { - if (__frac_digits == 0) - __s = copy(__digits_first, __digits_last, __s); - else { - if ((int)__value_length <= __frac_digits) { - *__s++ = __point; - __s = copy(__digits_first, __digits_last, __s); - __s = fill_n(__s, __frac_digits - __value_length, __zero); - } - else { -#ifdef __SYMBIAN32__ - if (__frac_digits>0) - { -#endif - __s = copy(__digits_first, __digits_last - __frac_digits, __s); - if (__frac_digits != 0) { - *__s++ = __point; - __s = copy(__digits_last - __frac_digits, __digits_last, __s); -#ifdef __SYMBIAN32__ - } -#endif - } - } - } - } - } // Close for loop - - // Ouput rest of sign if necessary. - - if (__sign.size() > 1) - __s = copy(__sign.begin() + 1, __sign.end(), __s); - if (!(__fill_pos & (ios_base::right | ios_base::internal))) - __s = fill_n(__s, __fill_amt, __fill); - -#ifdef __SYMBIAN32__ - __str.width(0); -#endif - return __s; -} - -#ifdef __SYMBIAN32__ -/* -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -moneypunct<_CharT, _International>::moneypunct(size_t __refs = 0):_BaseFacet(__refs) -{ - - -}*/ - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -_CharT moneypunct<_CharT,_International>::do_decimal_point() const -{ - return _CharT('.'); -} - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -_CharT moneypunct<_CharT,_International>::do_thousands_sep() const -{ - return _CharT(','); -} -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -basic_string<_CharT> moneypunct<_CharT,_International>::do_curr_symbol() const -{ - return _M_currSym; -} - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -basic_string<_CharT> moneypunct<_CharT,_International>::do_positive_sign() const -{ - return _M_psign; -} - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -basic_string<_CharT> moneypunct<_CharT,_International>::do_negative_sign() const -{ - return _M_nsign; -} - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -string moneypunct<_CharT,_International>::do_grouping() const -{ - return _M_group; -} - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -money_base::pattern moneypunct<_CharT,_International>::do_pos_format() const -{ - return _M_pos_format; -} - -template//__DFL_NON_TYPE_PARAM(bool, _International, false)> -money_base::pattern moneypunct<_CharT,_International>::do_neg_format() const -{ - return _M_neg_format; -} - -template -int moneypunct<_CharT,_International>::do_frac_digits() const -{ - return 0; -} - - -//monetary_byname - -template -_CharT moneypunct_byname<_CharT, _International>::do_decimal_point() const - {return _Locale_mon_decimal_pointE(_M_monetary);} - -template -_CharT moneypunct_byname<_CharT, _International>::do_thousands_sep() const - {return _Locale_mon_thousands_sepE(_M_monetary);} - -template -string moneypunct_byname<_CharT, _International>::do_grouping() const - {return moneypunct<_CharT,_International>::_M_group;} - -template -basic_string<_CharT> moneypunct_byname<_CharT, _International>::do_curr_symbol() const - {return moneypunct<_CharT,_International>::_M_currSym;} - -template -basic_string<_CharT> moneypunct_byname<_CharT, _International>::do_positive_sign() const - {return moneypunct<_CharT,_International>::_M_psign;} - -template -basic_string<_CharT> moneypunct_byname<_CharT, _International>::do_negative_sign() const - {return moneypunct<_CharT,_International>::_M_nsign;} - -template -int moneypunct_byname<_CharT, _International>::do_frac_digits() const - {return _Locale_int_frac_digitsE(_M_monetary);} - -template -void moneypunct_byname<_CharT, _International>::Convert_string2_string_chart(basic_string<_CharT> &dst, string src) - { - int length = src.length(); - const char* str = src.c_str(); - for(int i = 0; i -moneypunct_byname<_CharT, _International>::moneypunct_byname(const char * name, - size_t refs): - moneypunct<_CharT, _International>(refs), - _M_monetary(__acquire_monetaryE(name)) -{ - if (!_M_monetary) - locale::_M_throw_runtime_error(); - - moneypunct<_CharT,_International>::_M_group = _Locale_mon_groupingE(_M_monetary); - Convert_string2_string_chart(moneypunct<_CharT,_International>::_M_psign, _Locale_positive_signE(_M_monetary)); - Convert_string2_string_chart(moneypunct<_CharT,_International>::_M_nsign, _Locale_negative_signE(_M_monetary)); - Convert_string2_string_chart(moneypunct<_CharT,_International>::_M_currSym, _Locale_int_curr_symbolE(_M_monetary)); -} - -template -moneypunct_byname<_CharT, _International>::~moneypunct_byname() -{ - __release_monetaryE(_M_monetary); -} - - -#endif -_STLP_END_NAMESPACE - -# endif /* EXPOSE */ - -#endif /* _STLP_MONETARY_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_monetary.h --- a/epoc32/include/stdapis/stlport/stl/_monetary.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,641 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_MONETARY_H -#define _STLP_INTERNAL_MONETARY_H - -#ifndef _STLP_INTERNAL_CTYPE_H -# include -#endif - -#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H -# include -#endif - -#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -class money_base { -public: - enum part {none, space, symbol, sign, value}; - struct pattern { - char field[4]; - }; -}; - - -#ifdef __SYMBIAN32__ - -extern locale::id& Moneypunct_charT_GetFacetLocaleId(const char* type); -_STLP_DECLSPEC void _Init_monetary_formatsE(money_base::pattern& pos_format, - money_base::pattern& neg_format); - -template -class moneypunct : public locale::facet , public money_base -{ -public: - typedef _CharT char_type; - typedef basic_string<_CharT> string_type; - explicit moneypunct _STLP_PSPEC2(_CharT, _International) (size_t __refs = 0) - { - _Init_monetary_formatsE(_M_pos_format, _M_neg_format); - } - _CharT decimal_point() const { return do_decimal_point(); } - _CharT thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string_type curr_symbol() const { return do_curr_symbol(); } - string_type positive_sign() const { return do_positive_sign(); } - string_type negative_sign() const { return do_negative_sign(); } - int frac_digits() const { return do_frac_digits(); } - pattern pos_format() const { return do_pos_format(); } - pattern neg_format() const { return do_neg_format(); } - #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static locale::id& GetFacetLocaleId(){return Moneypunct_charT_GetFacetLocaleId(typeid(_CharT).name()); }; -#else - static locale::id id; -#endif -# if defined (_STLP_STATIC_CONST_INIT_BUG) - enum _IntlVal { intl = _International } ; -# else - static const bool intl = _International; -# endif - -protected: - pattern _M_pos_format; - pattern _M_neg_format; - - static string_type _M_psign, _M_nsign, _M_currSym; - static string _M_group; - ~moneypunct _STLP_PSPEC2(char, true) () { }; - - virtual _CharT do_decimal_point() const; - virtual _CharT do_thousands_sep() const; - virtual string do_grouping() const; - - virtual basic_string<_CharT> do_curr_symbol() const; - - virtual basic_string<_CharT> do_positive_sign() const; - virtual basic_string<_CharT> do_negative_sign() const; - virtual int do_frac_digits() const; - virtual pattern do_pos_format() const; - virtual pattern do_neg_format() const; - - friend class _Locale; - -}; -template -string moneypunct<_CharT, _International>::_M_group; -template -basic_string<_CharT> moneypunct<_CharT, _International>::_M_psign; -template -basic_string<_CharT> moneypunct<_CharT, _International>::_M_nsign; -template -basic_string<_CharT> moneypunct<_CharT, _International>::_M_currSym; - - -#else -// moneypunct facets: forward declaration -template class moneypunct {}; -#endif - -// money_get facets - -template ) > -class money_get : public locale::facet -{ - friend class _Locale; -public: - typedef _CharT char_type; - typedef _InputIter iter_type; - typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type; - - money_get(size_t __refs = 0) : _BaseFacet(__refs) {} -# ifndef _STLP_NO_LONG_DOUBLE - iter_type get(iter_type __s, iter_type __end, bool __intl, - ios_base& __str, ios_base::iostate& __err, - long double& __units) const - { return do_get(__s, __end, __intl, __str, __err, __units); } -# endif - iter_type get(iter_type __s, iter_type __end, bool __intl, - ios_base& __str, ios_base::iostate& __err, - string_type& __digits) const - { return do_get(__s, __end, __intl, __str, __err, __digits); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char **); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - ~money_get() {} -# ifndef _STLP_NO_LONG_DOUBLE - virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, - ios_base& __str, ios_base::iostate& __err, - long double& __units) const; -# endif - virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, - ios_base& __str, ios_base::iostate& __err, - string_type& __digits) const; -}; - - -// moneypunct facets: definition of specializations - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class moneypunct : public locale::facet, public money_base -#else -class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base -#endif -{ - -public: - typedef char char_type; - typedef string string_type; -_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(char, true) (size_t __refs = 0); - - char decimal_point() const { return do_decimal_point(); } - char thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string_type curr_symbol() const { return do_curr_symbol(); } - string_type positive_sign() const { return do_positive_sign(); } - string_type negative_sign() const { return do_negative_sign(); } - int frac_digits() const { return do_frac_digits(); } - pattern pos_format() const { return do_pos_format(); } - pattern neg_format() const { return do_neg_format(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif -# if defined (_STLP_STATIC_CONST_INIT_BUG) - enum _IntlVal { intl = 1 } ; -# else - static const bool intl = true; -# endif - -protected: - pattern _M_pos_format; - pattern _M_neg_format; - -_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(char, true) (); - -_STLP_DECLSPEC virtual char do_decimal_point() const; - _STLP_DECLSPEC virtual char do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string do_curr_symbol() const; - -_STLP_DECLSPEC virtual string do_positive_sign() const; -_STLP_DECLSPEC virtual string do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -_STLP_DECLSPEC virtual pattern do_pos_format() const; -_STLP_DECLSPEC virtual pattern do_neg_format() const; - - friend class _Locale; - -}; - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class moneypunct : public locale::facet, public money_base -#else -class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base -#endif -{ -public: - typedef char char_type; - typedef string string_type; - -_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(char, false) (size_t __refs = 0); - - char decimal_point() const { return do_decimal_point(); } - char thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string_type curr_symbol() const { return do_curr_symbol(); } - string_type positive_sign() const { return do_positive_sign(); } - string_type negative_sign() const { return do_negative_sign(); } - int frac_digits() const { return do_frac_digits(); } - pattern pos_format() const { return do_pos_format(); } - pattern neg_format() const { return do_neg_format(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif -# if defined (_STLP_STATIC_CONST_INIT_BUG) - enum _IntlVal { intl = 0 } ; -# else - static const bool intl = false; -# endif - -protected: - pattern _M_pos_format; - pattern _M_neg_format; - -_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(char, false) (); - -_STLP_DECLSPEC virtual char do_decimal_point() const; - _STLP_DECLSPEC virtual char do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string do_curr_symbol() const; - -_STLP_DECLSPEC virtual string do_positive_sign() const; -_STLP_DECLSPEC virtual string do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -_STLP_DECLSPEC virtual pattern do_pos_format() const; -_STLP_DECLSPEC virtual pattern do_neg_format() const; - - friend class _Locale; -}; - - -# ifndef _STLP_NO_WCHAR_T - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class moneypunct : public locale::facet, public money_base -#else -class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base -#endif -{ - friend class _Locale; -public: - typedef wchar_t char_type; - typedef wstring string_type; -_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(wchar_t, true) (size_t __refs = 0); - wchar_t decimal_point() const { return do_decimal_point(); } - wchar_t thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string_type curr_symbol() const { return do_curr_symbol(); } - string_type positive_sign() const { return do_positive_sign(); } - string_type negative_sign() const { return do_negative_sign(); } - int frac_digits() const { return do_frac_digits(); } - pattern pos_format() const { return do_pos_format(); } - pattern neg_format() const { return do_neg_format(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif -# if defined (_STLP_STATIC_CONST_INIT_BUG) - enum _IntlVal { intl = 1 } ; -# else - static const bool intl = true; -# endif - -protected: - pattern _M_pos_format; - pattern _M_neg_format; - -_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(wchar_t, true) (); - -_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; - _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string_type do_curr_symbol() const; - -_STLP_DECLSPEC virtual string_type do_positive_sign() const; -_STLP_DECLSPEC virtual string_type do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -_STLP_DECLSPEC virtual pattern do_pos_format() const; -_STLP_DECLSPEC virtual pattern do_neg_format() const; -}; - - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class moneypunct : public locale::facet, public money_base -#else -class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base -#endif -{ - friend class _Locale; -public: - typedef wchar_t char_type; - typedef wstring string_type; -_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(wchar_t, false) (size_t __refs = 0); - wchar_t decimal_point() const { return do_decimal_point(); } - wchar_t thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string_type curr_symbol() const { return do_curr_symbol(); } - string_type positive_sign() const { return do_positive_sign(); } - string_type negative_sign() const { return do_negative_sign(); } - int frac_digits() const { return do_frac_digits(); } - pattern pos_format() const { return do_pos_format(); } - pattern neg_format() const { return do_neg_format(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif -# if defined (_STLP_STATIC_CONST_INIT_BUG) - enum _IntlVal { intl = 0 } ; -# else - static const bool intl = false; -# endif - -protected: - pattern _M_pos_format; - pattern _M_neg_format; - -_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(wchar_t, false) (); - -_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; - _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string_type do_curr_symbol() const; - -_STLP_DECLSPEC virtual string_type do_positive_sign() const; -_STLP_DECLSPEC virtual string_type do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -_STLP_DECLSPEC virtual pattern do_pos_format() const; -_STLP_DECLSPEC virtual pattern do_neg_format() const; -}; - -# endif - - -#ifdef __SYMBIAN32__ -_STLP_DECLSPEC _Locale_monetary* __acquire_monetaryE(const char* ); -_STLP_DECLSPEC void __release_monetaryE (_Locale_monetary* ); - - -_STLP_DECLSPEC char _Locale_mon_decimal_pointE(_Locale_monetary* _M_monetary); - -_STLP_DECLSPEC char _Locale_mon_thousands_sepE(_Locale_monetary* _M_monetary); - -_STLP_DECLSPEC string _Locale_mon_groupingE(_Locale_monetary* _M_monetary); - -_STLP_DECLSPEC string _Locale_int_curr_symbolE(_Locale_monetary* _M_monetary); - - -_STLP_DECLSPEC string _Locale_positive_signE(_Locale_monetary* _M_monetary); - -_STLP_DECLSPEC string _Locale_negative_signE(_Locale_monetary* _M_monetary); - -_STLP_DECLSPEC int _Locale_int_frac_digitsE(_Locale_monetary* _M_monetary); - - -template -class moneypunct_byname: public moneypunct<_CharT, _International> -{ -public: - typedef money_base::pattern pattern; - typedef char char_type; - typedef basic_string<_CharT> string_type; - - explicit moneypunct_byname _STLP_PSPEC2(char, _International) (const char * __name, size_t __refs = 0); - -protected: - _Locale_monetary* _M_monetary; - ~moneypunct_byname _STLP_PSPEC2(_CharT, _International) (); - virtual _CharT do_decimal_point() const; - virtual _CharT do_thousands_sep() const; - virtual string do_grouping() const; - - virtual string_type do_curr_symbol() const; - - virtual string_type do_positive_sign() const; - virtual string_type do_negative_sign() const; - virtual int do_frac_digits() const; - private: - void Convert_string2_string_chart(basic_string<_CharT> &dst, string src); - -}; - -#else - -template class moneypunct_byname {}; - -#endif - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct -{ -public: - typedef money_base::pattern pattern; - typedef char char_type; - typedef string string_type; - - explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(char, true) (const char * __name, size_t __refs = 0); - -protected: - _Locale_monetary* _M_monetary; -_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(char, true) (); -_STLP_DECLSPEC virtual char do_decimal_point() const; - _STLP_DECLSPEC virtual char do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string_type do_curr_symbol() const; - -_STLP_DECLSPEC virtual string_type do_positive_sign() const; -_STLP_DECLSPEC virtual string_type do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct -{ -public: - typedef money_base::pattern pattern; - typedef char char_type; - typedef string string_type; - - explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(char, false) (const char * __name, size_t __refs = 0); - -protected: - _Locale_monetary* _M_monetary; -_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(char, false) (); -_STLP_DECLSPEC virtual char do_decimal_point() const; - _STLP_DECLSPEC virtual char do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string_type do_curr_symbol() const; - -_STLP_DECLSPEC virtual string_type do_positive_sign() const; -_STLP_DECLSPEC virtual string_type do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -}; - -# ifndef _STLP_NO_WCHAR_T -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct -{ -public: - typedef money_base::pattern pattern; - typedef wchar_t char_type; - typedef wstring string_type; - - explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(wchar_t, true) (const char * __name, size_t __refs = 0); - -protected: - _Locale_monetary* _M_monetary; -_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(wchar_t, true) (); -_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; - _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string_type do_curr_symbol() const; - -_STLP_DECLSPEC virtual string_type do_positive_sign() const; -_STLP_DECLSPEC virtual string_type do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct -{ -public: - typedef money_base::pattern pattern; - typedef wchar_t char_type; - typedef wstring string_type; - - explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(wchar_t, false) (const char * __name, size_t __refs = 0); - -protected: - _Locale_monetary* _M_monetary; -_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(wchar_t, false) (); -_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; - _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -_STLP_DECLSPEC virtual string_type do_curr_symbol() const; - -_STLP_DECLSPEC virtual string_type do_positive_sign() const; -_STLP_DECLSPEC virtual string_type do_negative_sign() const; -_STLP_DECLSPEC virtual int do_frac_digits() const; -}; -# endif - -//===== methods ====== - - -// money_put facets - -template ) > -class money_put : public locale::facet { - friend class _Locale; - -public: - typedef _CharT char_type; - typedef _OutputIter iter_type; - typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type; - - money_put(size_t __refs = 0) : _BaseFacet(__refs) {} -# ifndef _STLP_NO_LONG_DOUBLE - iter_type put(iter_type __s, bool __intl, ios_base& __str, - char_type __fill, long double __units) const - { return do_put(__s, __intl, __str, __fill, __units); } -# endif - iter_type put(iter_type __s, bool __intl, ios_base& __str, - char_type __fill, - const string_type& __digits) const - { return do_put(__s, __intl, __str, __fill, __digits); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(ostreambuf_iterator > *); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(wchar_t**); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(ostreambuf_iterator > *); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - ~money_put() {} -# ifndef _STLP_NO_LONG_DOUBLE - virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __str, - char_type __fill, long double /* __units */ ) const { - - locale __loc = __str.getloc(); - _CharT __buf[64]; - return do_put(__s, __intl, __str, __fill, __buf + 0); - } -# endif - virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __str, - char_type __fill, - const string_type& __digits) const; -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS money_get > >; -_STLP_EXPORT_TEMPLATE_CLASS money_put > >; -// _STLP_EXPORT_TEMPLATE_CLASS money_get; -// _STLP_EXPORT_TEMPLATE_CLASS money_put; -# if ! defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS money_get > >; -_STLP_EXPORT_TEMPLATE_CLASS money_put > >; -// _STLP_EXPORT_TEMPLATE_CLASS money_get; -// _STLP_EXPORT_TEMPLATE_CLASS money_put; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -# if defined (__BORLANDC__) && defined (_RTLDLL) -inline void _Stl_loc_init_monetary() { - money_get > >::id._M_index = 8; - money_get::id._M_index = 9; - money_put > >::id._M_index = 10; - money_put::id._M_index = 11; -# ifndef _STLP_NO_WCHAR_T - money_get > >::id._M_index = 27; - money_get::id._M_index = 28; - money_put > >::id._M_index = 29; - money_put::id._M_index = 30; -# endif -} -#endif - -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_MONETARY_H */ - -// Local Variables: -// mode:C++ -// End: - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_new.h --- a/epoc32/include/stdapis/stlport/stl/_new.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,208 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* 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. -* Neither the name of Nokia Corporation nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. - -* 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 HOLDER 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. -* -* Description: -* -*/ - -#ifndef _STLP_NEW_H_HEADER -# define _STLP_NEW_H_HEADER - -# ifdef _STLP_NO_BAD_ALLOC -# ifndef _STLP_NEW_DONT_THROW -# define _STLP_NEW_DONT_THROW 1 -# endif /* _STLP_NEW_DONT_THROW */ - -# include - - -_STLP_BEGIN_NAMESPACE - -#if defined(__SYMBIAN32__) && defined( __WINSCW__) -// already defined symcpp.h included from rvct2_2.h -struct nothrow_t {}; -#endif - - -# ifdef _STLP_OWN_IOSTREAMS -#ifdef __ARMCC__ -extern _STLP_DECLSPEC const nothrow_t nothrow; -#else -extern IMPORT_C const nothrow_t& GetNoThrowObj(); -#define nothrow GetNoThrowObj() -#endif -# else -# define nothrow nothrow_t() -# endif -#ifndef _STLP_EXCEPTION_BASE -# define _STLP_EXCEPTION_BASE exception -#endif - -class bad_alloc : public _STLP_EXCEPTION_BASE { -public: - bad_alloc () _STLP_NOTHROW_INHERENTLY { } - bad_alloc(const bad_alloc&) _STLP_NOTHROW_INHERENTLY { } - bad_alloc& operator=(const bad_alloc&) _STLP_NOTHROW_INHERENTLY {return *this;} - ~bad_alloc () _STLP_NOTHROW_INHERENTLY { } - const char* what() const _STLP_NOTHROW_INHERENTLY { return "bad alloc"; } -}; - -_STLP_END_NAMESPACE - -#endif /* _STLP_NO_BAD_ALLOC */ - -#if defined (_STLP_WINCE) -_STLP_BEGIN_NAMESPACE - -inline void* _STLP_CALL __stl_new(size_t __n) { - return ::malloc(__n); -} - -inline void _STLP_CALL __stl_delete(void* __p) { - free(__p); -} - -#ifndef __cdecl -# define __cdecl -#endif - -_STLP_END_NAMESPACE - -#else /* _STLP_WINCE */ - -#include - -# ifndef _STLP_NO_BAD_ALLOC -# ifdef _STLP_USE_OWN_NAMESPACE - - _STLP_BEGIN_NAMESPACE - using _STLP_VENDOR_EXCEPT_STD::bad_alloc; - using _STLP_VENDOR_EXCEPT_STD::nothrow_t; - using _STLP_VENDOR_EXCEPT_STD::nothrow; - -# if defined (_STLP_GLOBAL_NEW_HANDLER) - using ::new_handler; - using ::set_new_handler; -# else - using _STLP_VENDOR_EXCEPT_STD::new_handler; - using _STLP_VENDOR_EXCEPT_STD::set_new_handler; -# endif - - _STLP_END_NAMESPACE - -# endif /* _STLP_OWN_NAMESPACE */ - -# endif /* _STLP_NO_BAD_ALLOC */ - -# if defined (_STLP_NO_NEW_NEW_HEADER) || defined (_STLP_NEW_DONT_THROW) || defined (__SYMBIAN32__) \ - || defined (__WINS__) && ! defined (_STLP_CHECK_NULL_ALLOC) -# define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){_STLP_THROW(bad_alloc());}return __y -# if defined (__SYMBIAN32__) -//# define _STLP_NEW operator new -#define _STLP_NEW ::malloc -#endif -/* -# elif defined (__SYMBIAN32__) || defined (__WINS__) -# ifndef _STLP_USE_TRAP_LEAVE -# define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){abort();}return __y -# else -# define _STLP_NEW(x) :: operator new (x, ELeave) -# define _STLP_CHECK_NULL_ALLOC(__x) return __x -# endif -*/ -# else -# define _STLP_CHECK_NULL_ALLOC(__x) return __x -# endif - -#ifndef _STLP_NEW -# define _STLP_NEW ::operator new -#endif -# define _STLP_PLACEMENT_NEW ::new - -_STLP_BEGIN_NAMESPACE - -#ifdef __SYMBIAN32__ - -typedef void(*new_handler)(); - -_STLP_DECLSPEC new_handler set_new_handler(new_handler pnew) throw(); - -#endif - -#if (( defined(__IBMCPP__)|| defined(__OS400__) || defined (__xlC__) || defined (qTidyHeap)) && defined(__DEBUG_ALLOC__) ) -inline void* _STLP_CALL __stl_new(size_t __n) { _STLP_CHECK_NULL_ALLOC(_STLP_NEW(__n, __FILE__, __LINE__)); } -inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p, __FILE__, __LINE__); } -#else -inline void* _STLP_CALL __stl_new(size_t __n) { return ::operator new(__n); } -inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p); } -#endif -_STLP_END_NAMESPACE - - -# endif /* _STLP_WINCE */ - -#if defined(__SYMBIAN32__) && !defined(__GCCE__) -_STLP_DECLSPEC void *operator new(unsigned int aSize); - -_STLP_DECLSPEC void *operator new[](unsigned int aSize); -#endif - -_STLP_DECLSPEC void operator delete(void* aPtr) throw(); - -_STLP_DECLSPEC void operator delete[](void* aPtr) throw(); - -_STLP_DECLSPEC void* operator new(unsigned int aSize, const std::nothrow_t& /*aNoThrow*/) throw(); - -_STLP_DECLSPEC void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) throw(); - -_STLP_DECLSPEC void operator delete(void* aPtr, const std::nothrow_t& /*aNoThrow*/) throw(); - -_STLP_DECLSPEC void operator delete[](void* aPtr, const std::nothrow_t& /*aNoThrow*/) throw(); - - -// placement delete -#ifndef __PLACEMENT_VEC_NEW_INLINE -#define __PLACEMENT_VEC_NEW_INLINE -inline void* operator new[](unsigned int /*aSize*/, void* aBase) throw() - {return aBase;} -inline void operator delete[](void* /*aPtr*/, void* /*aBase*/) throw() - { - - } -#endif - -#ifndef __PLACEMENT_NEW_INLINE -#define __PLACEMENT_NEW_INLINE -inline void* operator new(unsigned int /*aSize*/, void* aBase) throw() - {return aBase;} - -// Global placement operator delete -inline void operator delete(void* /*aPtr*/, void* /*aBase*/) throw() - {} -#endif //__PLACEMENT_NEW_INLINE - - -#endif /* _STLP_NEW_H_HEADER */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_null_stream.h --- a/epoc32/include/stdapis/stlport/stl/_null_stream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_NULL_STREAM_H -# define _STLP_NULL_STREAM_H - -_STLP_BEGIN_NAMESPACE - -struct __null_stream -{ - void flush() { } -}; - -template -__null_stream& operator <<(__null_stream& __x, const _Tp& ) -{ - return __x; -} - -template -__null_stream& operator >>(const _Tp&, __null_stream& __x ) -{ - return __x; -} - -extern __null_stream cin, cout, cerr, endl, ws, hex, dec; - -_STLP_END_NAMESPACE - -# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_num_get.c --- a/epoc32/include/stdapis/stlport/stl/_num_get.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,882 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_NUM_GET_C -#define _STLP_NUM_GET_C - -#ifndef _STLP_INTERNAL_NUM_GET_H -# include -#endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#ifndef _STLP_LIMITS_H -# include -#endif - -_STLP_DECLSPEC unsigned char* __get_digit_val_table(void); -_STLP_DECLSPEC char* __get_narrow_atoms(void); -_STLP_BEGIN_NAMESPACE - -extern const unsigned char __digit_val_table[]; - -template < class _InputIter, class _Integer, class _CharT> -_InputIter _STLP_CALL -_M_do_get_integer(_InputIter&, _InputIter&, ios_base&, ios_base::iostate&, _Integer&, _CharT*); - -// _M_do_get_integer and its helper functions. - -#ifdef __SYMBIAN32__ -template -inline bool _STLP_CALL __get_fdigit(_CharT& c, const _CharT* digits) - { - - const _CharT* p = find(digits, digits + 10, c); - if (p != digits + 10) { - c = (_CharT)( (_CharT)'0' + (p - digits)); - return true; - } - else - return false; -} - -#endif -inline bool _STLP_CALL __get_fdigit(char& __c, const char*) - { return __c >= '0' && __c <= '9'; } - -inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *) -{ - if (__c == __sep) { - __c = ',' ; - return true ; - } else - return ( __c >= '0' && __c <= '9'); -} - -# ifndef _STLP_NO_WCHAR_T - -// Similar, except return the character itself instead of the numeric -// value. Used for floating-point input. -inline bool _STLP_CALL __get_fdigit(wchar_t& c, const wchar_t* digits) -{ - const wchar_t* p = find(digits, digits + 10, c); - if (p != digits + 10) { - c = (char)('0' + (p - digits)); - return true; - } - else - return false; -} - -inline bool _STLP_CALL __get_fdigit_or_sep(wchar_t& c, wchar_t sep, - const wchar_t * digits) -{ - if (c == sep) { - c = (char)','; - return true; - } - else - return __get_fdigit(c, digits); -} -#ifdef __SYMBIAN32__ -template -inline bool _STLP_CALL __get_fdigit_or_sep(_CharT& c, _CharT sep, - const _CharT * digits) -{ - if (c == sep) { - c = (_CharT)','; - return true; - } - else - return __get_fdigit(c, digits); -} - - - -#endif -#endif -inline int _STLP_CALL -__get_digit_from_table(unsigned __index) -{ - return (__index > 127 ? 0xFF : __get_digit_val_table()[__index]); -} - -extern const char __narrow_atoms[]; - -template -int -_M_get_base_or_zero(_InputIter& __stl_in, _InputIter& __end, ios_base& __str, _CharT*) -{ - _CharT __atoms[5]; - const ctype<_CharT>& __c_type = use_facet< ctype<_CharT> >(__str.getloc()); - // const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__str._M_ctype_facet(); - - __c_type.widen(__get_narrow_atoms(), __get_narrow_atoms() + 5, __atoms); - - bool __negative = false; - _CharT __c = *__stl_in; - - if (__c == __atoms[1] /* __xminus_char */ ) { - __negative = true; - ++__stl_in; - } - else if (__c == __atoms[0] /* __xplus_char */ ) - ++__stl_in; - - - int __base; - int __valid_zero = 0; - - ios_base::fmtflags __basefield = __str.flags() & ios_base::basefield; - - switch (__basefield) { - case ios_base::oct: - __base = 8; - break; - case ios_base::dec: - __base = 10; - break; - case ios_base::hex: - __base = 16; - if (__stl_in != __end && *__stl_in == __atoms[2] /* __zero_char */ ) { - ++__stl_in; - if (__stl_in != __end && - (*__stl_in == __atoms[3] /* __x_char */ || *__stl_in == __atoms[4] /* __X_char */ )) - ++__stl_in; - else - __valid_zero = 1; // That zero is valid by itself. - } - break; - default: - if (__stl_in != __end && *__stl_in == __atoms[2] /* __zero_char */ ) { - ++__stl_in; - if (__stl_in != __end && - (*__stl_in == __atoms[3] /* __x_char */ || *__stl_in == __atoms[4] /* __X_char */ )) { - ++__stl_in; - __base = 16; - } - else - { - __base = 8; - __valid_zero = 1; // That zero is still valid by itself. - } - } - else - __base = 10; - break; - } - return (__base << 2) | ((int)__negative << 1) | __valid_zero; -} - - -template -bool _STLP_CALL -__get_integer(_InputIter& __first, _InputIter& __last, - int __base, _Integer& __val, - int __got, bool __is_negative, char __separator, const string& __grouping, const __true_type&) -{ - bool __ovflow = false; - bool __valid_group = true; - - _Integer __result = 0; - bool __is_group = !__grouping.empty(); -// char __group_sizes[64]; - char __group_sizes[256] = {0}; //group sizes can be more -#ifdef __SYMBIAN32__ -int __current_group_size = __got; -#else - int __current_group_size = 0; -#endif - char* __group_sizes_end = __group_sizes; - int prv_got = 0; - - - _Integer __over_base = (numeric_limits<_Integer>::min)() / __STATIC_CAST(_Integer, __base); - - for ( ; __first != __last ; ++__first) { - - const char __c = *__first; - - if (__is_group && __c == __separator) { - if (prv_got == __got) //no successive seperators - return false; - prv_got = __got; - *__group_sizes_end++ = __current_group_size; - __current_group_size = 0; - continue; - } - - int __n = __get_digit_from_table(__c); - - if (__n >= __base) - break; - - ++__got; - ++__current_group_size; - - if (__result < __over_base) - __ovflow = true; // don't need to keep accumulating - else { - _Integer __next = __STATIC_CAST(_Integer, __base * __result - __n); - if (__result != 0) -#ifdef __SYMBIAN32__ - if (__is_negative) - __ovflow = __ovflow || __next >= __result; - else - __ovflow = __ovflow || (__next-1) >= __result; //For signed char, the ranges are -128 to 127, -#else - __ovflow = __ovflow || __next >= __result; -#endif - __result = __next; - } - } - - if (__is_group && __group_sizes_end != __group_sizes) { - *__group_sizes_end++ = __current_group_size; - - } - - // fbp : added to not modify value if nothing was read - if (__got > 0) { - __val = __ovflow - ? __is_negative ? (numeric_limits<_Integer>::min)() - : (numeric_limits<_Integer>::max)() - : (__is_negative ? __result : __STATIC_CAST(_Integer, -__result)); - } - __valid_group = __valid_grouping(__group_sizes, __group_sizes_end, - __grouping.data(), __grouping.data()+ __grouping.size()); - - if (__valid_group == false) - __val = 0; - - // overflow is being treated as failure - return ((__got > 0) && !__ovflow) && (__is_group == 0 || __valid_group) ; -} - -template -bool _STLP_CALL -__get_integer(_InputIter& __first, _InputIter& __last, - int __base, _Integer& __val, - int __got, bool __is_negative, char __separator, const string& __grouping, const __false_type&) -{ - bool __ovflow = false; - bool __valid_group = true; - _Integer __result = 0; - bool __is_group = !__grouping.empty(); -// char __group_sizes[64]; - char __group_sizes[256] = {0};//group sizes can be more - int __current_group_size = 0; - char* __group_sizes_end = __group_sizes; - int prv_got = 0; - - - _Integer __over_base = (numeric_limits<_Integer>::max)() / __STATIC_CAST(_Integer, __base); - - for ( ; __first != __last ; ++__first) { - - const char __c = *__first; -/* - //if (__is_group && __c == __separator) { //no seperator at the start of number. - if (__is_group && __c == __separator && __got) { - // seperator should come after extracting some digits - if (!__current_group_size) - break; - *__group_sizes_end++ = __current_group_size; - __current_group_size = 0; - continue; - } -*/ - if (__is_group && __c == __separator) { - if (prv_got == __got) //no successive seperators - return false; - prv_got = __got; - *__group_sizes_end++ = __current_group_size; - __current_group_size = 0; - continue; - } - int __n = __get_digit_from_table(__c); - - if (__n >= __base) - break; - - ++__got; - ++__current_group_size; - - if (__result > __over_base) - __ovflow = true; //don't need to keep accumulating - else { - _Integer __next = __STATIC_CAST(_Integer, __base * __result + __n); - if (__result != 0) - __ovflow = __ovflow || __next <= __result; - __result = __next; - } - } - - if (__is_group && __group_sizes_end != __group_sizes) { - *__group_sizes_end++ = __current_group_size; - } - - // fbp : added to not modify value if nothing was read - if (__got > 0) { - __val = __ovflow - ? (numeric_limits<_Integer>::max)() - : (__is_negative ? __STATIC_CAST(_Integer, -__result) : __result); - } - __valid_group = __valid_grouping(__group_sizes, __group_sizes_end, - __grouping.data(), __grouping.data()+ __grouping.size()); - - if (__valid_group == false) - __val = 0; - - // overflow is being treated as failure - return ((__got > 0) && !__ovflow) && - (__is_group == 0 ||__valid_group) ; -} - - -template -bool _STLP_CALL -__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val) -{ - string __grp; - return __get_integer(__first, __last, 10, __val, 0, false, ' ', __grp, __false_type()); -} - -template -_InputIter _STLP_CALL -_M_do_get_integer(_InputIter& __stl_in, _InputIter& __end, ios_base& __str, - ios_base::iostate& __err, _Integer& __val, _CharT* __pc) -{ - -#if defined(__HP_aCC) && (__HP_aCC == 1) - bool _IsSigned = !((_Integer)(-1) > 0); -#else - typedef typename __bool2type::is_signed>::_Ret _IsSigned; -#endif - - //const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__str._M_numpunct_facet(); - const numpunct<_CharT>& __numpunct = use_facet< numpunct<_CharT> >(__str.getloc()); -// const string& __grouping = __str._M_grouping(); // cached copy //stdcxx fix - 11/1/06 - const string& __grouping = __numpunct.grouping(); - - - const int __base_or_zero = _M_get_base_or_zero(__stl_in, __end, __str, __pc); - int __got = __base_or_zero & 1; - - bool __result; - - if (__stl_in == __end) { // We may have already read a 0. If so, - - if (__got > 0) { // the result is 0 even if we're at eof. - __val = 0; - __result = true; - } - else - __result = false; - } else { - - const bool __negative = __base_or_zero & 2; - const int __base = __base_or_zero >> 2; - -#if defined(__HP_aCC) && (__HP_aCC == 1) - if (_IsSigned) - __result = __get_integer(__stl_in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __true_type() ); - else - __result = __get_integer(__stl_in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __false_type() ); -#else -#ifdef __SYMBIAN32__ - _Integer __tval; - __result = __get_integer(__stl_in, __end, __base, __tval, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned()); - if(__result) - __val = __tval; -#else - __result = __get_integer(__stl_in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned()); -#endif -# endif - } - - __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit); - - if (__stl_in == __end) - __err |= ios_base::eofbit; - return __stl_in; -} - -// _M_read_float and its helper functions. -template -_InputIter _STLP_CALL -__copy_sign(_InputIter __first, _InputIter __last, string& __v, - _CharT __xplus, _CharT __xminus) { - if (__first != __last) { - _CharT __c = *__first; - if (__c == __xplus) - ++__first; - else if (__c == __xminus) { - __v.push_back('-'); - ++__first; - } - } - return __first; -} - - -template -bool _STLP_CALL -__copy_digits(_InputIter& __first, _InputIter& __last, - string& __v, const _CharT* __digits) -{ - bool __ok = false; - - for ( ; __first != __last; ++__first) { - _CharT __c = *__first; - if (__get_fdigit(__c, __digits)) { - __v.push_back((char)__c); - __ok = true; - } - else - break; - } - return __ok; -} - -template -bool _STLP_CALL -__copy_grouped_digits(_InputIter& __first, _InputIter& __last, - string& __v, const _CharT * __digits, - _CharT __sep, const string& __grouping, - bool& __grouping_ok) -{ - bool __ok = false; -// char __group_sizes[64]; - char __group_sizes[256] = {0};//group sizes can be more - char*__group_sizes_end = __group_sizes; - char __current_group_size = 0; - - for ( ; __first != __last; ++__first) { - _CharT __c = *__first; - bool __tmp = __get_fdigit_or_sep(__c, __sep, __digits); - if (__tmp) { - if (__c == ',') { - // seperator should come after extracting some digits - if (!__current_group_size) - break; - - *__group_sizes_end++ = __current_group_size; - __current_group_size = 0; - } - else { - __ok = true; - __v.push_back((char)__c); - ++__current_group_size; - } - } - else - break; - } - - if (__group_sizes_end != __group_sizes) - *__group_sizes_end++ = __current_group_size; - __grouping_ok = __valid_grouping(__group_sizes, __group_sizes_end, __grouping.data(), __grouping.data() + __grouping.size()); - __ok = __ok & __grouping_ok; //Added, to check for valid grouping. If not valid grouping should return false. - return __ok; -} - - -template -bool _STLP_CALL -_M_read_float(string& __buf, _InputIter& __stl_in, _InputIter& __end, ios_base& __s, _CharT*) -{ - // Create a string, copying characters of the form - // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)? - - bool __digits_before_dot /* = false */; - bool __digits_after_dot = false; - bool __ok; - - bool __grouping_ok = true; - - const ctype<_CharT>& __ct = use_facet< ctype<_CharT> >(__s.getloc()); - // const ctype<_CharT>& __ct = *(const ctype<_CharT>*)__s._M_ctype_facet(); - //const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__s._M_numpunct_facet(); - const numpunct<_CharT>& __numpunct = use_facet< numpunct<_CharT> >(__s.getloc()); -// const string& __grouping = __s._M_grouping(); // cached copy //stdcxx fix - 11/1/06 - const string& __grouping = __numpunct.grouping(); - - _CharT __dot = __numpunct.decimal_point(); - _CharT __sep = __numpunct.thousands_sep(); - - _CharT __digits[10]; - _CharT __xplus; - _CharT __xminus; - - _CharT __pow_e; - _CharT __pow_E; - - _Initialize_get_float(__ct, __xplus, __xminus, __pow_e, __pow_E, __digits); - - // Get an optional sign - __stl_in = __copy_sign(__stl_in, __end, __buf, __xplus, __xminus); - - // Get an optional string of digits. - if (__grouping.size() != 0) - __digits_before_dot = __copy_grouped_digits(__stl_in, __end, __buf, __digits, - __sep, __grouping, __grouping_ok); - else - __digits_before_dot = __copy_digits(__stl_in, __end, __buf, __digits); - - // Get an optional decimal point, and an optional string of digits. - if (__stl_in != __end && *__stl_in == __dot) { - __buf.push_back('.'); - ++__stl_in; - __digits_after_dot = __copy_digits(__stl_in, __end, __buf, __digits); - } - - // There have to be some digits, somewhere. - __ok = __digits_before_dot || __digits_after_dot; - - // Get an optional exponent. - if (__ok && __stl_in != __end && (*__stl_in == __pow_e || *__stl_in == __pow_E)) { - __buf.push_back('e'); - ++__stl_in; - __stl_in = __copy_sign(__stl_in, __end, __buf, __xplus, __xminus); - __ok = __copy_digits(__stl_in, __end, __buf, __digits); - // If we have an exponent then the sign - // is optional but the digits aren't. - } - - return __ok; -} - -// -// num_get<>, num_put<> -// - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -template -locale::id num_get<_CharT, _InputIterator>::id; -#endif -# else - -typedef num_get num_get_char; -typedef num_get > > num_get_char_2; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, num_get_char::id, ); -__DECLARE_INSTANCE(locale::id, num_get_char_2::id, ); -#endif - -# ifndef _STLP_NO_WCHAR_T - -typedef num_get num_get_wchar_t; -typedef num_get > > num_get_wchar_t_2; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, num_get_wchar_t::id, ); -__DECLARE_INSTANCE(locale::id, num_get_wchar_t_2::id, ); -#endif - -# endif - -# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -# ifndef _STLP_NO_BOOL -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, - ios_base& __s, - ios_base::iostate& __err, bool& __x) const -{ - if (__s.flags() & ios_base::boolalpha) { - locale __loc = __s.getloc(); - //const _Numpunct& __np = *(const _Numpunct*)__s._M_numpunct_facet(); - const numpunct<_CharT>& __np = use_facet >(__loc) ; -// const ctype<_CharT>& __ct = use_facet >(__loc) ; - - const basic_string<_CharT> __truename = __np.truename(); - const basic_string<_CharT> __falsename = __np.falsename(); - bool __true_ok = true; - bool __false_ok = true; - - size_t __n = 0; - for ( ; __stl_in != __end; ++__stl_in) { - _CharT __c = *__stl_in; - __true_ok = __true_ok && (__c == __truename[__n]); - __false_ok = __false_ok && (__c == __falsename[__n]); - ++__n; - - if ((!__true_ok && !__false_ok) || - (__true_ok && __n >= __truename.size()) || - (__false_ok && __n >= __falsename.size())) { - - if (__true_ok || __false_ok) //if anything OK then increment, else, break - ++__stl_in; - break; - } - } - // stdcxx fix, Changed to check for complete true,false string - if (__true_ok && __n < __truename.size()) - { - for ( ; __stl_in != __end; ++__stl_in) { - _CharT __c = *__stl_in; - __true_ok = __true_ok && (__c == __truename[__n]); - ++__n; - if ((!__true_ok) ||(__true_ok && __n >= __truename.size()) ) - { - if(__true_ok) - ++__stl_in; - break; - } - - } - if (__true_ok && __n < __truename.size()) - __true_ok = false; - } - if (__false_ok && __n < __falsename.size()) - { - - for ( ; __stl_in != __end; ++__stl_in) { - _CharT __c = *__stl_in; - __false_ok = __false_ok && (__c == __falsename[__n]); - ++__n; - if ((!__false_ok) ||(__false_ok && __n >= __falsename.size()) ) - { - if(__false_ok) - ++__stl_in; - break; - } - - } - if (__false_ok && __n < __falsename.size()) - __false_ok = false; - } - - if (__true_ok || __false_ok) { - __err = ios_base::goodbit; - __x = __true_ok; - } - else - __err = ios_base::failbit; - - if (__stl_in == __end) - __err |= ios_base::eofbit; - - return __stl_in; - } - - else { - long __lx; - _InputIter __tmp = this->do_get(__stl_in, __end, __s, __err, __lx); - if (!(__err & ios_base::failbit)) { - if (__lx == 0) - __x = false; - else if (__lx == 1) - __x = true; - else - __err |= ios_base::failbit; - } - return __tmp; - } -} - -# endif /* _STLP_NO_BOOL */ - -//# ifdef _STLP_FIX_LIBRARY_ISSUES -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, short& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, int& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -//# endif - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, long& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - unsigned short& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - unsigned int& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - unsigned long& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - float& __val) const { - string __buf ; - bool __ok = _M_read_float(__buf, __stl_in, __end, __str, (_CharT*)0 ); - if(__ok) //If success reading float then convert it. - { -#ifdef __SYMBIAN32__ - float __tval; - __ok = __string_to_float(__buf, __tval); - if(__ok) - __val = __tval; -#else - __string_to_float(__buf, __val); -#endif - } - __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit); - if (__stl_in == __end) - __err |= ios_base::eofbit; - return __stl_in; -} - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - double& __val) const { - string __buf ; - bool __ok = _M_read_float(__buf, __stl_in, __end, __str, (_CharT*)0 ); - if(__ok) //If success reading float then convert it. - { -#ifdef __SYMBIAN32__ - double __tval; - __ok = __string_to_float(__buf, __tval); - if(__ok) - __val = __tval; -#else - __string_to_float(__buf, __val); -#endif - } - __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit); - if (__stl_in == __end) - __err |= ios_base::eofbit; - return __stl_in; -} - -#ifndef _STLP_NO_LONG_DOUBLE -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - long double& __val) const { - string __buf ; - bool __ok = _M_read_float(__buf, __stl_in, __end, __str, (_CharT*)0 ); - if(__ok) //If success reading float then convert it. - { -#ifdef __SYMBIAN32__ - long double __tval; - __ok = __string_to_float(__buf, __tval); - if(__ok) - __val = __tval; -#else - __string_to_float(__buf, __val); -#endif - } - __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit); - if (__stl_in == __end) - __err |= ios_base::eofbit; - return __stl_in; -} -#endif /* _STLP_NO_LONG_DOUBLE */ - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - void*& __p) const { -#ifdef __SYMBIAN32__ - unsigned long __val; //using only long -#else -# if defined(_STLP_LONG_LONG)&&!defined(__MRC__) //*ty 12/07/2001 - MrCpp can not cast from long long to void* - unsigned _STLP_LONG_LONG __val; -# else - unsigned long __val; -# endif -#endif //__SYMBIAN32__ -#ifdef __SYMBIAN32__ - ios_base::fmtflags __save_flags = __str.flags(); - - __str.setf(ios_base::hex, ios_base::basefield); - __str.setf(ios_base::showbase); - __str.setf(ios_base::internal, ios_base::adjustfield); - __str.width((sizeof(void*) * 2) + 2); -#endif // __SYMBIAN32__ - iter_type __tmp = _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); - if (!(__err & ios_base::failbit)) - __p = __REINTERPRET_CAST(void*,(long)__val); -#ifdef __SYMBIAN32__ - __str.flags(__save_flags); -#endif //__SYMBIAN32__ - return __tmp; - } - - -#ifdef _STLP_LONG_LONG - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - _STLP_LONG_LONG& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -template -_InputIter -num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - unsigned _STLP_LONG_LONG& __val) const { - return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); -} - -#endif /* _STLP_LONG_LONG */ - -_STLP_END_NAMESPACE - -# endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ - -#endif /* _STLP_NUMERIC_FACETS_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_num_get.h --- a/epoc32/include/stdapis/stlport/stl/_num_get.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,316 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_NUM_GET_H -#define _STLP_INTERNAL_NUM_GET_H - -#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H -# include -#endif - -# ifndef _STLP_C_LOCALE_H -# include -# endif - -#ifndef _STLP_INTERNAL_NUMPUNCT_H -# include -#endif -#ifndef _STLP_INTERNAL_CTYPE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// num_get facets - -# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES -template -# else -template > -# endif -#ifdef __SYMBIAN32__ -class num_get : public locale::facet -#else -class num_get: public locale::facet -#endif -{ - friend class _Locale; -public: - typedef _CharT char_type; - typedef _InputIter iter_type; - - explicit num_get(size_t __refs = 0): locale::facet(__refs) {} - -# ifndef _STLP_NO_BOOL - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, bool& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } -# endif - -//# ifdef _STLP_FIX_LIBRARY_ISSUES - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, short& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, int& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } -//# endif - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, long& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned short& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned int& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned long& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - -#ifdef _STLP_LONG_LONG - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, _STLP_LONG_LONG& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - -#endif /* _STLP_LONG_LONG */ - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, float& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, double& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - -# ifndef _STLP_NO_LONG_DOUBLE - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, long double& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } -# endif - - _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, void*& __val) const { - return do_get(__stl_in, __end, __str, __err, __val); - } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char**); - -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - ~num_get() {} - - typedef string string_type; - typedef ctype<_CharT> _Ctype; - typedef numpunct<_CharT> _Numpunct; - -# ifndef _STLP_NO_BOOL - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, - ios_base& __str, ios_base::iostate& __err, bool& __val) const; -# endif - - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, long& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned short& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned int& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned long& __val) const; -//# ifdef _STLP_FIX_LIBRARY_ISSUES - // issue 118 : those are actually not supposed to be here - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, short& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, int& __val) const; -//# endif - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, float& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, double& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, - void*& __p) const; - -#ifndef _STLP_NO_LONG_DOUBLE - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, long double& __val) const; -#endif /* _STLP_NO_LONG_DOUBLE */ - -#ifdef _STLP_LONG_LONG - - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, _STLP_LONG_LONG& __val) const; - virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, - ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const; -#endif /* _STLP_LONG_LONG */ - -}; - - -# ifdef _STLP_USE_TEMPLATE_EXPORT -_STLP_EXPORT_TEMPLATE_CLASS num_get > >; -// _STLP_EXPORT_TEMPLATE_CLASS num_get; -# ifndef _STLP_NO_WCHAR_T -_STLP_EXPORT_TEMPLATE_CLASS num_get > >; -// _STLP_EXPORT_TEMPLATE_CLASS num_get; -# endif /* _STLP_NO_WCHAR_T */ -# endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -_STLP_DECLSPEC extern bool _STLP_CALL __valid_grouping(const char*, const char*, const char*, const char*); - -template -bool _STLP_CALL -__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val); - -inline bool _STLP_CALL __get_fdigit(char& __c, const char*); -inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *); -# ifndef _STLP_NO_WCHAR_T -inline bool _STLP_CALL __get_fdigit(wchar_t&, const wchar_t*); -inline bool _STLP_CALL __get_fdigit_or_sep(wchar_t&, wchar_t, const wchar_t*); -# endif - -inline void _STLP_CALL -_Initialize_get_float(const ctype&, - char& Plus, char& Minus, - char& pow_e, char& pow_E, - char*) -{ - Plus = '+'; - Minus = '-'; - pow_e = 'e'; - pow_E = 'E'; -} -// Helper functions for _M_do_get_float. - -# ifndef _STLP_NO_WCHAR_T - -inline void _STLP_CALL -_Initialize_get_float( const ctype& ct, - wchar_t& Plus, wchar_t& Minus, - wchar_t& pow_e, wchar_t& pow_E, - wchar_t* digits) -{ - char ndigits[11] = "0123456789"; - Plus = ct.widen('+'); - Minus = ct.widen('-'); - pow_e = ct.widen('e'); - pow_E = ct.widen('E'); - ct.widen(ndigits + 0, ndigits + 10, digits); -} - -# endif /* WCHAR_T */ - -#ifdef __SYMBIAN32__ -template -inline void _STLP_CALL -_Initialize_get_float( const ctype<_CharT>& ct, - _CharT& Plus, _CharT& Minus, - _CharT& pow_e, _CharT& pow_E, - _CharT* digits) -{ - char ndigits[11] = "0123456789"; - Plus = ct.widen('+'); - Minus = ct.widen('-'); - pow_e = ct.widen('e'); - pow_E = ct.widen('E'); - ct.widen(ndigits + 0, ndigits + 10, digits); -} -#endif - -int _STLP_CALL __string_to_float(const string&, float&); -int _STLP_CALL __string_to_float(const string&, double&); -# ifndef _STLP_NO_LONG_DOUBLE -int _STLP_CALL __string_to_float(const string&, long double&); -# endif -# endif - -# if defined (__BORLANDC__) && defined (_RTLDLL) -inline void _Stl_loc_init_num_get() { -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - num_get > >::GetFacetLocaleId()._M_index = 12; - num_get::GetFacetLocaleId()._M_index = 13; -#else - num_get > >::id._M_index = 12; - num_get::id._M_index = 13; -#endif -# ifndef _STLP_NO_WCHAR_T -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - num_get > >::GetFacetLocaleId()._M_index = 31; - num_get::GetFacetLocaleId()._M_index = 32; -#else - num_get > >::id._M_index = 31; - num_get::id._M_index = 32; -#endif -# endif -} -# endif - -_STLP_DECLSPEC unsigned char* _STLP_CALL __get_digit_val_table(void); -_STLP_DECLSPEC char* _STLP_CALL __get_narrow_atoms(void); -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_NUM_GET_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_num_put.c --- a/epoc32/include/stdapis/stlport/stl/_num_put.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,673 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_NUM_PUT_C -#define _STLP_NUM_PUT_C - -#ifndef _STLP_INTERNAL_NUM_PUT_H -# include -#endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#ifndef _STLP_LIMITS_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -// _M_do_put_float and its helper functions. Strategy: write the output -// to a buffer of char, transform the buffer to _CharT, and then copy -// it to the output. - -template -_OutputIter _STLP_CALL -_M_do_put_float(_OutputIter __s, ios_base& __f, _CharT __fill,_Float __x); - - -//---------------------------------------------------------------------- -// num_put facet - -template -_OutputIter _STLP_CALL -__copy_float_and_fill(const _CharT* __first, const _CharT* __last, - _OutputIter __stl_out, - ios_base::fmtflags __flags, - streamsize __width, _CharT __fill, - _CharT __xplus, _CharT __xminus) { - if (__width <= __last - __first) - return copy(__first, __last, __stl_out); - else { - streamsize __pad = __width - (__last - __first); - ios_base::fmtflags __dir = __flags & ios_base::adjustfield; - - if (__dir == ios_base::left) { - __stl_out = copy(__first, __last, __stl_out); - return fill_n(__stl_out, __pad, __fill); - } - else if (__dir == ios_base::internal && __first != __last && - (*__first == __xplus || *__first == __xminus)) { - *__stl_out++ = *__first++; - __stl_out = fill_n(__stl_out, __pad, __fill); - return copy(__first, __last, __stl_out); - } - else { - __stl_out = fill_n(__stl_out, __pad, __fill); - return copy(__first, __last, __stl_out); - } - } -} - -#ifndef _STLP_NO_WCHAR_T -// Helper routine for wchar_t -template -_OutputIter _STLP_CALL -__put_float(char* __ibuf, char* __iend, _OutputIter __stl_out, - ios_base& __f, wchar_t __fill, - wchar_t __decimal_point, - wchar_t __sep, const string& __grouping) -{ - //const ctype& __ct = *(ctype*)__f._M_ctype_facet() ; - const ctype& __ct = use_facet< ctype >(__f.getloc()); - - // wchar_t __wbuf[128]; //stdcxx fix - wchar_t __wbuf[256+10]; - wchar_t* __eend = __convert_float_buffer(__ibuf, __iend, __wbuf, - __ct, __decimal_point); - if (!__grouping.empty()) { - // In order to do separator-insertion only to the left of the - // decimal point, we adjust the size of the first (right-most) - // group. We need to be careful if there is only one entry in - // grouping: in this case we need to duplicate the first entry. - - string __new_grouping = __grouping; - wchar_t* __decimal_pos = find(__wbuf, __eend, __decimal_point); - if (__grouping.size() == 1) - __new_grouping.push_back(__grouping[0]); - - // dwa 1/24/00 - try as I might, there doesn't seem to be a way - // to suppress the warning - __new_grouping[0] += __STATIC_CAST(char, __eend - __decimal_pos); - ptrdiff_t __len = __insert_grouping(__wbuf, __eend, __new_grouping, - __sep, - __ct.widen('+'), __ct.widen('-'), - 0); - __eend = __wbuf + __len; - } - - return __copy_float_and_fill(__wbuf, __eend, __stl_out, - __f.flags(), __f.width(0), __fill, - __ct.widen('+'), __ct.widen('-')); -} -# endif /* WCHAR_T */ - -#ifdef __SYMBIAN32__ -template -ptrdiff_t _STLP_CALL -__insert_grouping(_CharT * first, _CharT * last, const string& grouping, - _CharT separator, _CharT Plus, _CharT Minus, int basechars) -{ - int length = last-first; - ptrdiff_t res; - char* str = new char(length+64); //morespace for seperators - memset(str,'\0',length+64); - memcpy(str,first, length); - char _separator = (char)separator; - char _Plus = (char)Plus; - char _Minus = (char)Minus; - - res = __insert_grouping(str, str+length, grouping, - _separator, _Plus, _Minus, basechars); - memcpy(first,str,res); - delete str; - return res; - -} - -#endif -// Helper routine for char -template -_OutputIter _STLP_CALL -__put_float(char* __ibuf, char* __iend, _OutputIter __stl_out, - ios_base& __f, char __fill, - char __decimal_point, - char __sep, const string& __grouping) -{ - __adjust_float_buffer(__ibuf, __iend, __decimal_point); - if (!__grouping.empty()) { - string __new_grouping = __grouping; - const char * __decimal_pos = find(__ibuf, __iend, __decimal_point); - if (__grouping.size() == 1) - __new_grouping.push_back(__grouping[0]); - __new_grouping[0] += __STATIC_CAST(char, (__iend - __decimal_pos)); - ptrdiff_t __len = __insert_grouping(__ibuf, __iend, __new_grouping, - __sep, '+', '-', 0); - __iend = __ibuf + __len; - } - - return __copy_float_and_fill(__ibuf, __iend, __stl_out, - __f.flags(), __f.width(0), __fill, '+', '-'); -} - -#ifdef __SYMBIAN32__ - -template -_OutputIter _STLP_CALL -__put_float(char* __ibuf, char* __iend, _OutputIter __stl_out, - ios_base& __f, _CharT __fill, - _CharT __decimal_point, - _CharT __sep, const string& __grouping) -{ - __adjust_float_buffer(__ibuf, __iend, __decimal_point); - if (!__grouping.empty()) { - string __new_grouping = __grouping; - const char * __decimal_pos = find(__ibuf, __iend, __decimal_point); - if (__grouping.size() == 1) - __new_grouping.push_back(__grouping[0]); - __new_grouping[0] += __STATIC_CAST(char, (__iend - __decimal_pos)); - ptrdiff_t __len = __insert_grouping(__ibuf, __iend, __new_grouping, - __sep, '+', '-', 0); - __iend = __ibuf + __len; - } - - _CharT __wbuf[64]; - locale __loc = __f.getloc(); - const ctype<_CharT>& __ct = use_facet >(__loc); - __ct.widen(__ibuf, __iend, __wbuf); - - ptrdiff_t __len = __iend - __ibuf; - return __copy_float_and_fill(__wbuf, __wbuf+__len, __stl_out, - __f.flags(), __f.width(0), __fill, (_CharT)'+', (_CharT)'-'); -} - - -#endif -template -_OutputIter _STLP_CALL -_M_do_put_float(_OutputIter __s, ios_base& __f, - _CharT __fill, _Float __x) -{ - string __buf; - __buf.reserve(256+10); //+2 - 10/1/07 - __write_float(__buf, __f.flags(), (int)__f.precision(), __x); - - //const numpunct<_CharT>& __np = *(const numpunct<_CharT>*)__f._M_numpunct_facet(); - const numpunct<_CharT>& __np = use_facet< numpunct<_CharT> >(__f.getloc()); - - return __put_float(__CONST_CAST(char*, __buf.c_str()), - __CONST_CAST(char*, __buf.c_str()) + __buf.size(), - __s, __f, __fill, - __np.decimal_point(), - // __np.thousands_sep(), __f._M_grouping()); //stdcxx fix - 17/1/07 - __np.thousands_sep(), __np.grouping()); -} - -// _M_do_put_integer and its helper functions. - -template -_OutputIter _STLP_CALL -__copy_integer_and_fill(const _CharT* __buf, ptrdiff_t __len, - _OutputIter __stl_out, - ios_base::fmtflags __flg, streamsize __wid, _CharT __fill, - _CharT __xplus, _CharT __xminus) -{ - if (__len >= __wid) - return copy(__buf, __buf + __len, __stl_out); - else { - ptrdiff_t __pad = __wid - __len; - ios_base::fmtflags __dir = __flg & ios_base::adjustfield; - - if (__dir == ios_base::left) { - __stl_out = copy(__buf, __buf + __len, __stl_out); - return fill_n(__stl_out, __pad, __fill); - } - else if (__dir == ios_base::internal && __len != 0 && - (__buf[0] == __xplus || __buf[0] == __xminus)) { - *__stl_out++ = __buf[0]; - __stl_out = fill_n(__stl_out, __pad, __fill); - return copy(__buf + 1, __buf + __len, __stl_out); - } - else if (__dir == ios_base::internal && __len >= 2 && - (__flg & ios_base::showbase) && - (__flg & ios_base::basefield) == ios_base::hex) { - *__stl_out++ = __buf[0]; - *__stl_out++ = __buf[1]; - __stl_out = fill_n(__stl_out, __pad, __fill); - return copy(__buf + 2, __buf + __len, __stl_out); - } - else { - __stl_out = fill_n(__stl_out, __pad, __fill); - return copy(__buf, __buf + __len, __stl_out); - } - } -} - -#ifndef _STLP_NO_WCHAR_T -// Helper function for wchar_t -template -_OutputIter _STLP_CALL -__put_integer(char* __buf, char* __iend, _OutputIter __s, - ios_base& __f, - ios_base::fmtflags __flags, wchar_t __fill) -{ - locale __loc = __f.getloc(); - const ctype& __ct = use_facet >(__loc); - //const ctype& __ct = *(const ctype*)__f._M_ctype_facet(); - - wchar_t __xplus = __ct.widen('+'); - wchar_t __xminus = __ct.widen('-'); - - wchar_t __wbuf[64]; - __ct.widen(__buf, __iend, __wbuf); - ptrdiff_t __len = __iend - __buf; - wchar_t* __eend = __wbuf + __len; - - const numpunct& __np = use_facet >(__loc); - const string& __grouping = __np.grouping(); - - //const numpunct& __np = *(const numpunct*)__f._M_numpunct_facet(); - // const string& __grouping = __f._M_grouping(); - - if (!__grouping.empty()) { - int __basechars; - if (__flags & ios_base::showbase) - switch (__flags & ios_base::basefield) { - case ios_base::hex: __basechars = 2; break; - case ios_base::oct: __basechars = 1; break; - default: __basechars = 0; - } - else - __basechars = 0; - - __len = __insert_grouping(__wbuf, __eend, __grouping, __np.thousands_sep(), - __xplus, __xminus, __basechars); - } - - return __copy_integer_and_fill((wchar_t*)__wbuf, __len, __s, - __flags, __f.width(0), __fill, __xplus, __xminus); -} -#endif - -#ifdef __SYMBIAN32__ -template -_OutputIter _STLP_CALL -__put_integer(char* __buf, char* __iend, _OutputIter __s, - ios_base& __f, - ios_base::fmtflags __flags, _CharT __fill) -{ - locale __loc = __f.getloc(); - const ctype<_CharT>& __ct = use_facet >(__loc); - //const ctype& __ct = *(const ctype*)__f._M_ctype_facet(); - - _CharT __xplus = '+'; - _CharT __xminus = '-'; - - _CharT __wbuf[64]; - - ptrdiff_t __len = __iend - __buf; - _CharT* __eend = __wbuf + __len; - - - const numpunct& __np = use_facet >(__loc); - const string& __grouping = __np.grouping(); - - //const numpunct& __np = *(const numpunct*)__f._M_numpunct_facet(); - // const string& __grouping = __f._M_grouping(); - - if (!__grouping.empty()) { - int __basechars; - if (__flags & ios_base::showbase) - switch (__flags & ios_base::basefield) { - case ios_base::hex: __basechars = 2; break; - case ios_base::oct: __basechars = 1; break; - default: __basechars = 0; - } - else - __basechars = 0; - - __len = __insert_grouping(__buf, __iend, __grouping, __np.thousands_sep(), - __ct.narrow( __xplus, '+'), __ct.narrow(__xminus, '-'), __basechars); - __ct.widen(__buf, __iend, __wbuf); - - } - - return __copy_integer_and_fill(__wbuf, __len, __s, - __flags, __f.width(0), __fill, __xplus, __xminus); -} - - -#endif -// Helper function for char -template -_OutputIter _STLP_CALL -__put_integer(char* __buf, char* __iend, _OutputIter __s, - ios_base& __f, ios_base::fmtflags __flags, char __fill) -{ - ptrdiff_t __len = __iend - __buf; - char __grpbuf[64]; - - // const numpunct& __np = use_facet >(__f.getloc()); - // const string& __grouping = __np.grouping(); - - const numpunct& __np = *(const numpunct*)__f._M_numpunct_facet(); -// const string& __grouping = __f._M_grouping(); //stdcxx fix, 17/1/07 - const string& __grouping = __np.grouping(); - - if (!__grouping.empty()) { - int __basechars; - if (__flags & ios_base::showbase) - switch (__flags & ios_base::basefield) { - case ios_base::hex: __basechars = 2; break; - case ios_base::oct: __basechars = 1; break; - default: __basechars = 0; - } - else - __basechars = 0; - - // make sure there is room at the end of the buffer - // we pass to __insert_grouping - - copy(__buf, __iend, (char *) __grpbuf); - __buf = __grpbuf; - __iend = __grpbuf + __len; - __len = __insert_grouping(__buf, __iend, __grouping, __np.thousands_sep(), - '+', '-', __basechars); - } - - return __copy_integer_and_fill(__buf, __len, __s, __flags, __f.width(0), __fill, '+', '-'); -} - -#ifdef _STLP_LONG_LONG -typedef _STLP_LONG_LONG __max_int_t; -typedef unsigned _STLP_LONG_LONG __umax_int_t; -#else -typedef long __max_int_t; -typedef unsigned long __umax_int_t; -#endif - -extern _STLP_DECLSPEC const char* get_hex_char_table_lo(); -extern _STLP_DECLSPEC const char* get_hex_char_table_hi(); - -template -inline char* _STLP_CALL -__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __true_type& /* is_signed */) -{ - const bool __negative = __x < 0 ; - __max_int_t __temp = __x; - __umax_int_t __utemp = __negative?-__temp:__temp; - - for (; __utemp != 0; __utemp /= 10) - *--__ptr = (int)(__utemp % 10) + '0'; - // put sign if needed or requested - if (__negative) - *--__ptr = '-'; - else if (__flags & ios_base::showpos) - *--__ptr = '+'; - return __ptr; -} - -template -inline char* _STLP_CALL -__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __false_type& /* is_signed */) -{ - for (; __x != 0; __x /= 10) - *--__ptr = (int)(__x % 10) + '0'; - // put sign if requested - if (__flags & ios_base::showpos) - *--__ptr = '+'; - return __ptr; -} - -template -char* _STLP_CALL -__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x) -{ - char* __ptr = __buf; - __umax_int_t __temp; - - if (__x == 0) { - *--__ptr = '0'; - if ((__flags & ios_base::showpos) && ( (__flags & (ios_base::hex | ios_base::oct)) == 0 )) - *--__ptr = '+'; - } - else { - - switch (__flags & ios_base::basefield) { - case ios_base::oct: - __temp = __x; - // if the size of integer is less than 8, clear upper part - if ( sizeof(__x) < 8 && sizeof(__umax_int_t) >= 8 ) - __temp &= 0xFFFFFFFF; - - for (; __temp != 0; __temp >>=3) - *--__ptr = (((unsigned)__temp)& 0x7) + '0'; - - // put leading '0' is showbase is set - if (__flags & ios_base::showbase) - *--__ptr = '0'; - break; - case ios_base::hex: - { - const char* __table_ptr = (__flags & ios_base::uppercase) ? - get_hex_char_table_hi() : get_hex_char_table_lo(); - __temp = __x; - // if the size of integer is less than 8, clear upper part - if ( sizeof(__x) < 8 && sizeof(__umax_int_t) >= 8 ) - __temp &= 0xFFFFFFFF; - - for (; __temp != 0; __temp >>=4) - *--__ptr = __table_ptr[((unsigned)__temp & 0xF)]; - - if (__flags & ios_base::showbase) { - *--__ptr = __table_ptr[16]; - *--__ptr = '0'; - } - } - break; - default: - { -#if defined(__HP_aCC) && (__HP_aCC == 1) - bool _IsSigned = !((_Integer)-1 > 0); - if (_IsSigned) - __ptr = __write_decimal_backward(__ptr, __x, __flags, __true_type() ); - else - __ptr = __write_decimal_backward(__ptr, __x, __flags, __false_type() ); -#else - typedef typename __bool2type::is_signed>::_Ret _IsSigned; - __ptr = __write_decimal_backward(__ptr, __x, __flags, _IsSigned()); -# endif - } - break; - } - } - // return pointer to beginning of the string - return __ptr; -} - -// -// num_put<> -// - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -template -locale::id num_put<_CharT, _OutputIterator>::id; -#endif -# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -typedef num_put num_put_char; -typedef num_put num_put_char_2; -typedef num_put > > num_put_char_3; -typedef num_put > num_put_char_4; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, num_put_char::id, ); -__DECLARE_INSTANCE(locale::id, num_put_char_2::id, ); -__DECLARE_INSTANCE(locale::id, num_put_char_3::id, ); -#endif - -# ifndef _STLP_NO_WCHAR_T - -typedef num_put num_put_wchar_t; -typedef num_put num_put_wchar_t_2; -typedef num_put > > num_put_wchar_t_3; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, num_put_wchar_t::id, ); -__DECLARE_INSTANCE(locale::id, num_put_wchar_t_2::id, ); -__DECLARE_INSTANCE(locale::id, num_put_wchar_t_3::id, ); -#endif - -# endif - -# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -// issue 118 - -# ifndef _STLP_NO_BOOL - -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, - char_type __fill, bool __val) const { - if (!(__f.flags() & ios_base::boolalpha)) - return this->do_put(__s, __f, __fill, __STATIC_CAST(long,__val)); - - locale __loc = __f.getloc(); - typedef numpunct<_CharT> _Punct; - const _Punct& __np = use_facet<_Punct>(__loc); - - //const numpunct<_CharT>& __np = *(const numpunct<_CharT>*)__f._M_numpunct_facet(); - - basic_string<_CharT> __str = __val ? __np.truename() : __np.falsename(); - - // Reuse __copy_integer_and_fill. Since internal padding makes no - // sense for bool, though, make sure we use something else instead. - // The last two argument to __copy_integer_and_fill are dummies. - ios_base::fmtflags __flags = __f.flags(); - if ((__flags & ios_base::adjustfield) == ios_base::internal) - __flags = (__flags & ~ios_base::adjustfield) | ios_base::right; - - return __copy_integer_and_fill(__str.c_str(), __str.size(), __s, - __flags, __f.width(0), __fill, - (_CharT) 0, (_CharT) 0); -} - -# endif - -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - long __val) const { - - char __buf[64]; // Large enough for a base 8 64-bit integer, - // plus any necessary grouping. - ios_base::fmtflags __flags = __f.flags(); - char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); - return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); -} - - -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - unsigned long __val) const { - char __buf[64]; // Large enough for a base 8 64-bit integer, - // plus any necessary grouping. - - ios_base::fmtflags __flags = __f.flags(); - char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); - return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); -} - -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - double __val) const { - return _M_do_put_float(__s, __f, __fill, __val); -} - -#ifndef _STLP_NO_LONG_DOUBLE -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - long double __val) const { - return _M_do_put_float(__s, __f, __fill, __val); -} -#endif - -#ifdef _STLP_LONG_LONG -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - _STLP_LONG_LONG __val) const { - char __buf[64]; // Large enough for a base 8 64-bit integer, - // plus any necessary grouping. - - ios_base::fmtflags __flags = __f.flags(); - char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); - return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); -} - -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - unsigned _STLP_LONG_LONG __val) const { - char __buf[64]; // Large enough for a base 8 64-bit integer, - // plus any necessary grouping. - - ios_base::fmtflags __flags = __f.flags(); - char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); - return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); -} - -#endif /* _STLP_LONG_LONG */ - - -// lib.facet.num.put.virtuals "12 For conversion from void* the specifier is %p." -template -_OutputIter -num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT /*__fill*/, - const void* __val) const { - //const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__f._M_ctype_facet(); - const ctype<_CharT>& __c_type = use_facet< ctype<_CharT> >(__f.getloc()); - ios_base::fmtflags __save_flags = __f.flags(); - - __f.setf(ios_base::hex, ios_base::basefield); - __f.setf(ios_base::showbase); - __f.setf(ios_base::internal, ios_base::adjustfield); - //__f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix //making output equal to linux. -# if defined(_STLP_LONG_LONG) && !defined(__MRC__) //*ty 11/24/2001 - MrCpp can not cast from void* to long long - _OutputIter result = this->do_put(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned _STLP_LONG_LONG,__val)); -# else - _OutputIter result = this->do_put(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned long,__val)); -# endif - __f.flags(__save_flags); - return result; -} - -_STLP_END_NAMESPACE - -# endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ - -#endif /* _STLP_NUM_PUT_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_num_put.h --- a/epoc32/include/stdapis/stlport/stl/_num_put.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,202 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_NUM_PUT_H -#define _STLP_INTERNAL_NUM_PUT_H - -#ifndef _STLP_INTERNAL_NUMPUNCT_H -# include -#endif -#ifndef _STLP_INTERNAL_CTYPE_H -# include -#endif -#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// num_put facet - -# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES -template -# else -template > > -# endif -class num_put: public locale::facet -{ - friend class _Locale; -public: - typedef _CharT char_type; - typedef _OutputIter iter_type; - - explicit num_put(size_t __refs = 0) : _BaseFacet(__refs) {} - -# ifndef _STLP_NO_BOOL - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - bool __val) const { - return do_put(__s, __f, __fill, __val); - } -# endif - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - long __val) const { - return do_put(__s, __f, __fill, __val); - } - - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - unsigned long __val) const { - return do_put(__s, __f, __fill, __val); - } - -#ifdef _STLP_LONG_LONG - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - _STLP_LONG_LONG __val) const { - return do_put(__s, __f, __fill, __val); - } - - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - unsigned _STLP_LONG_LONG __val) const { - return do_put(__s, __f, __fill, __val); - } -#endif - - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - double __val) const { - return do_put(__s, __f, __fill, (double)__val); - } - -#ifndef _STLP_NO_LONG_DOUBLE - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - long double __val) const { - return do_put(__s, __f, __fill, __val); - } -# endif - - iter_type put(iter_type __s, ios_base& __f, char_type __fill, - const void * __val) const { - return do_put(__s, __f, __fill, __val); - } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(ostreambuf_iterator > *); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); - //wchar_t - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(ostreambuf_iterator > *); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(wchar_t**); - //adding for new iterator type - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& - GetFacetLocaleId(back_insert_iterator *); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - ~num_put() {} -# ifndef _STLP_NO_BOOL - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const; -# endif - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const; - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const; - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const; -#ifndef _STLP_NO_LONG_DOUBLE - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const; -#endif - -#ifdef _STLP_LONG_LONG - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const; - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, - unsigned _STLP_LONG_LONG __val) const ; -#endif /* _STLP_LONG_LONG */ - virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const; -}; - -# ifdef _STLP_USE_TEMPLATE_EXPORT -_STLP_EXPORT_TEMPLATE_CLASS num_put > >; -// _STLP_EXPORT_TEMPLATE_CLASS num_put; -# ifndef _STLP_NO_WCHAR_T -_STLP_EXPORT_TEMPLATE_CLASS num_put > >; -// _STLP_EXPORT_TEMPLATE_CLASS num_put; -# endif /* _STLP_NO_WCHAR_T */ -# endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -template -char* _STLP_CALL -__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x); - -extern _STLP_DECLSPEC int _STLP_CALL __string_to_float(const string&, float&); -extern _STLP_DECLSPEC int _STLP_CALL __string_to_float(const string&, double&); -extern _STLP_DECLSPEC void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, double); -# ifndef _STLP_NO_LONG_DOUBLE -int _STLP_CALL __string_to_float(const string&, long double&); -extern _STLP_DECLSPEC void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, long double); -# endif - -#ifndef _STLP_NO_WCHAR_T -extern _STLP_DECLSPEC wchar_t* _STLP_CALL __convert_float_buffer(const char*, const char*, wchar_t*, const ctype&, wchar_t); -#endif -extern _STLP_DECLSPEC void _STLP_CALL __adjust_float_buffer(char*, char*, char); - -extern _STLP_DECLSPEC char* _STLP_CALL -__write_integer(char* buf, ios_base::fmtflags flags, long x); - -extern _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int); -# ifndef _STLP_NO_WCHAR_T -extern _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int); -# endif - -# endif - -# if defined (__BORLANDC__) && defined (_RTLDLL) -inline void _Stl_loc_init_num_put() { - - num_put > >::id._M_index = 14; - num_put::id._M_index = 15; - -# ifndef _STLP_NO_WCHAR_T - num_put > > ::id._M_index = 33; - num_put::id._M_index = 34; -# endif - -} - -# endif - -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_numeric.c --- a/epoc32/include/stdapis/stlport/stl/_numeric.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_NUMERIC_C -#define _STLP_NUMERIC_C - -#ifndef _STLP_INTERNAL_NUMERIC_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -_OutputIterator -__partial_sum(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __result; - *__result = *__first; - - _Tp __val = *__first; - while (++__first != __last) { - __val = __binary_op(__val, *__first); - *++__result = __val; - } - return ++__result; -} - -template -_OutputIterator -__adjacent_difference(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, _Tp*, - _BinaryOperation __binary_op) { - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - if (__first == __last) return __result; - *__result = *__first; - _Tp __val = *__first; - while (++__first != __last) { - _Tp __tmp = *__first; - *++__result = __binary_op(__tmp, __val); - __val = __tmp; - } - return ++__result; -} - - -template -_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr) -{ - _STLP_MPWFIX_TRY - if (__n == 0) - return __identity_element(__opr); - else { - while ((__n & 1) == 0) { - __n >>= 1; - __x = __opr(__x, __x); - } - _Tp __result = __x; - _STLP_MPWFIX_TRY - __n >>= 1; - while (__n != 0) { - __x = __opr(__x, __x); - if ((__n & 1) != 0) - __result = __opr(__result, __x); - __n >>= 1; - } - return __result; - _STLP_MPWFIX_CATCH - } - _STLP_MPWFIX_CATCH_ACTION(__x = _Tp()) -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_NUMERIC_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_numeric.h --- a/epoc32/include/stdapis/stlport/stl/_numeric.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,190 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - - -#ifndef _STLP_INTERNAL_NUMERIC_H -#define _STLP_INTERNAL_NUMERIC_H - -#ifndef _STLP_INTERNAL_FUNCTION_H -# include -#endif - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -_STLP_INLINE_LOOP -_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) -#ifndef __SYMBIAN32__ - _Init = _Init + *__first; -#else - _Init += *__first; -#endif - return _Init; -} - -template -_STLP_INLINE_LOOP -_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init, - _BinaryOperation __binary_op) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - for ( ; __first != __last; ++__first) - _Init = __binary_op(_Init, *__first); - return _Init; -} - -template -_STLP_INLINE_LOOP -_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, - _InputIterator2 __first2, _Tp _Init) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - for ( ; __first1 != __last1; ++__first1, ++__first2) - _Init = _Init + (*__first1 * *__first2); - return _Init; -} - -template -_STLP_INLINE_LOOP -_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, - _InputIterator2 __first2, _Tp _Init, - _BinaryOperation1 __binary_op1, - _BinaryOperation2 __binary_op2) -{ - _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) - for ( ; __first1 != __last1; ++__first1, ++__first2) - _Init = __binary_op1(_Init, __binary_op2(*__first1, *__first2)); - return _Init; -} - -template -_OutputIterator -__partial_sum(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, _Tp*, _BinaryOperation __binary_op); - - -template -inline _OutputIterator -partial_sum(_InputIterator __first, _InputIterator __last, - _OutputIterator __result) { - return __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator), - __plus(_STLP_VALUE_TYPE(__first, _InputIterator))); -} - -template -inline _OutputIterator -partial_sum(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, _BinaryOperation __binary_op) { - return __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator), - __binary_op); -} - - -template -_OutputIterator -__adjacent_difference(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, _Tp*, - _BinaryOperation __binary_op); - -template -inline _OutputIterator -adjacent_difference(_InputIterator __first, - _InputIterator __last, _OutputIterator __result) { - return __adjacent_difference(__first, __last, __result, - _STLP_VALUE_TYPE(__first, _InputIterator), - __minus(_STLP_VALUE_TYPE(__first, _InputIterator))); -} - -template -_OutputIterator -adjacent_difference(_InputIterator __first, _InputIterator __last, - _OutputIterator __result, _BinaryOperation __binary_op) { - return __adjacent_difference(__first, __last, __result, - _STLP_VALUE_TYPE(__first, _InputIterator), - __binary_op); -} - -template -_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr); - -# ifndef _STLP_NO_EXTENSIONS - -// Returns __x ** __n, where __n >= 0. _Note that "multiplication" -// is required to be associative, but not necessarily commutative. - -template -inline _Tp __power(_Tp __x, _Integer __n) -{ - return __power(__x, __n, multiplies<_Tp>()); -} - -// Alias for the internal name __power. Note that power is an extension, -// not part of the C++ standard. -template -inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __opr) { - return __power(__x, __n, __opr); -} - - -template -inline _Tp power(_Tp __x, _Integer __n) { - return __power(__x, __n, multiplies<_Tp>()); -} - -// iota is not part of the C++ standard. It is an extension. - -template -_STLP_INLINE_LOOP -void -iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __val) -{ - _STLP_DEBUG_CHECK(__check_range(__first, __last)) - while (__first != __last) - *__first++ = __val++; -} -# endif - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_NUMERIC_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_numpunct.h --- a/epoc32/include/stdapis/stlport/stl/_numpunct.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_NUMPUNCT_H -#define _STLP_INTERNAL_NUMPUNCT_H - -#ifndef _STLP_IOS_BASE_H -# include -#endif - -# ifndef _STLP_C_LOCALE_H -# include -# endif - -#ifndef _STLP_STRING_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// numpunct facets - -#ifdef __SYMBIAN32__ -extern locale::id& Numpunct_charT_GetFacetLocaleId(const char* type); - -template class numpunct: public locale::facet -{ - friend class _Locale; -public: - typedef char char_type; - typedef basic_string<_CharT> string_type; - explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) { - _M_truename.append(1, (_CharT)'t'); - _M_truename.append(1, (_CharT)'r'); - _M_truename.append(1, (_CharT)'u'); - _M_truename.append(1, (_CharT)'e'); - - _M_falsename.append(1, (_CharT)'f'); - _M_falsename.append(1, (_CharT)'a'); - _M_falsename.append(1, (_CharT)'l'); - _M_falsename.append(1, (_CharT)'s'); - _M_falsename.append(1, (_CharT)'e'); - } - - _CharT decimal_point() const { return do_decimal_point(); } - _CharT thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string_type truename() const { return do_truename(); } - string_type falsename() const { return do_falsename(); } -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - static locale::id& GetFacetLocaleId(){return Numpunct_charT_GetFacetLocaleId(typeid(_CharT).name()); } -#else - static locale::id id; -#endif - -# ifndef _STLP_NO_FRIEND_TEMPLATES -protected: -# endif - ~numpunct(); - -protected: - static string_type _M_truename; - static string_type _M_falsename; - static string _M_grouping; -protected: - - virtual _CharT do_decimal_point() const; - virtual _CharT do_thousands_sep() const; - virtual string do_grouping() const; - virtual string_type do_truename() const; - virtual string_type do_falsename() const; -}; - -template -basic_string<_CharT> numpunct<_CharT>::_M_truename; -template -basic_string<_CharT> numpunct<_CharT>::_M_falsename; -template -string numpunct<_CharT>::_M_grouping ; - -_STLP_DECLSPEC _Locale_numeric* __acquire_numericE(const char* ); -_STLP_DECLSPEC void __release_numericE(_Locale_numeric* ); -_STLP_DECLSPEC const char* _Locale_trueE(_Locale_numeric*); -_STLP_DECLSPEC const char* _Locale_falseE(_Locale_numeric*); -_STLP_DECLSPEC char _Locale_decimal_pointE(_Locale_numeric*); -_STLP_DECLSPEC char _Locale_thousands_sepE(_Locale_numeric*); -_STLP_DECLSPEC const char*_Locale_groupingE(_Locale_numeric*); - -template -class numpunct_byname : public numpunct<_CharT>{ -public: - typedef _CharT char_type; - typedef basic_string<_CharT> string_type; - - explicit numpunct_byname(const char* name, size_t refs = 0); -protected: - - ~numpunct_byname(); - - virtual _CharT do_decimal_point() const; - virtual _CharT do_thousands_sep() const; - virtual string do_grouping() const; - -private: - _Locale_numeric* _M_numeric; -}; - -#else -template class numpunct {}; -template class numpunct_byname {}; -#endif -template class num_get; - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class numpunct : public locale::facet -#else -class _STLP_CLASS_DECLSPEC numpunct : public locale::facet -#endif -{ - friend class _Locale; -# ifndef _STLP_NO_FRIEND_TEMPLATES - template friend class num_get; -# endif -public: - typedef char char_type; - typedef string string_type; - - explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) {} - - char decimal_point() const { return do_decimal_point(); } - char thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - string truename() const { return do_truename(); } - string falsename() const { return do_falsename(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -# ifndef _STLP_NO_FRIEND_TEMPLATES -protected: -# endif - ~numpunct(){}; - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -public: - _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_truename(); - _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_falsename(); - _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_grouping(); -#else -protected: - _STLP_STATIC_MEMBER_DECLSPEC static string _M_truename; - _STLP_STATIC_MEMBER_DECLSPEC static string _M_falsename; - _STLP_STATIC_MEMBER_DECLSPEC static string _M_grouping; -#endif - -protected: - - _STLP_DECLSPEC virtual char do_decimal_point() const; - _STLP_DECLSPEC virtual char do_thousands_sep() const; - _STLP_DECLSPEC virtual string do_grouping() const; - _STLP_DECLSPEC virtual string do_truename() const; - _STLP_DECLSPEC virtual string do_falsename() const; -}; - -# if ! defined (_STLP_NO_WCHAR_T) - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class numpunct : public locale::facet -#else -class _STLP_CLASS_DECLSPEC numpunct : public locale::facet -#endif -{ - friend class _Locale; -public: - typedef wchar_t char_type; - typedef wstring string_type; - - explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) {} - - wchar_t decimal_point() const { return do_decimal_point(); } - wchar_t thousands_sep() const { return do_thousands_sep(); } - string grouping() const { return do_grouping(); } - wstring truename() const { return do_truename(); } - wstring falsename() const { return do_falsename(); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -public: - _STLP_STATIC_MEMBER_DECLSPEC static wstring& GetNumPunct_M_Wchar_truename(); - _STLP_STATIC_MEMBER_DECLSPEC static wstring& GetNumPunct_M_Wchar_falsename(); - _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_Wchar_grouping(); -#else -protected: - _STLP_STATIC_MEMBER_DECLSPEC static wstring _M_truename; - _STLP_STATIC_MEMBER_DECLSPEC static wstring _M_falsename; - _STLP_STATIC_MEMBER_DECLSPEC static string _M_grouping; -#endif -protected: - ~numpunct() {} - - _STLP_DECLSPEC virtual wchar_t do_decimal_point() const; - _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; - _STLP_DECLSPEC virtual string do_grouping() const; - _STLP_DECLSPEC virtual wstring do_truename() const; - _STLP_DECLSPEC virtual wstring do_falsename() const; -}; - -# endif /* WCHAR_T */ - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC numpunct_byname : public numpunct { -public: - typedef char char_type; - typedef string string_type; - - explicit _STLP_DECLSPEC numpunct_byname(const char* __name, size_t __refs = 0); - -protected: - -_STLP_DECLSPEC ~numpunct_byname(); - -_STLP_DECLSPEC virtual char do_decimal_point() const; - _STLP_DECLSPEC virtual char do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -private: - _Locale_numeric* _M_numeric; -}; - -# ifndef _STLP_NO_WCHAR_T -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC numpunct_byname: public numpunct { -public: - typedef wchar_t char_type; - typedef wstring string_type; - - explicit _STLP_DECLSPEC numpunct_byname(const char* __name, size_t __refs = 0); - -protected: - -_STLP_DECLSPEC ~numpunct_byname(); - -_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; - _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; -_STLP_DECLSPEC virtual string do_grouping() const; - -private: - _Locale_numeric* _M_numeric; -}; - -# endif /* WCHAR_T */ - -#ifdef __SYMBIAN32__ -#include -#endif -_STLP_END_NAMESPACE - -#endif /* _STLP_NUMPUNCT_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ostream.c --- a/epoc32/include/stdapis/stlport/stl/_ostream.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,425 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_OSTREAM_C -#define _STLP_OSTREAM_C - - -#ifndef _STLP_INTERNAL_OSTREAM_H -# include -#endif - -#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#if !defined (_STLP_INTERNAL_NUM_PUT_H) -# include // For basic_streambuf and iterators -#endif - -_STLP_BEGIN_NAMESPACE - -// Helper functions for istream<>::sentry constructor. -template -bool -_M_init(basic_ostream<_CharT, _Traits>& __str) { - if (__str.good()) { - // boris : check if this is needed ! - if (!__str.rdbuf()) - __str.setstate(ios_base::badbit); - if (__str.tie()) - __str.tie()->flush(); - return __str.good(); - } else - return false; -} - -//---------------------------------------------------------------------- -// Definitions of non-inline member functions. - -// Constructor, destructor - -template -_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits> - ::basic_ostream(basic_streambuf<_CharT, _Traits>* __buf) - : basic_ios<_CharT, _Traits>() -{ - this->init(__buf); -} - -template -_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>::~basic_ostream() -{} - -// Output directly from a streambuf. -template -_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>& -basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<_CharT, _Traits>* __from) -{ - sentry __sentry(*this); - if (__sentry) { - if (__from) { - bool __any_inserted = __from->gptr() != __from->egptr() - ? this->_M_copy_buffered(__from, this->rdbuf()) - : this->_M_copy_unbuffered(__from, this->rdbuf()); - if (!__any_inserted) - this->setstate(ios_base::failbit); - } - else - this->setstate(ios_base::badbit); - } - - return *this; -} - -// Helper functions for the streambuf version of operator<<. The -// exception-handling code is complicated because exceptions thrown -// while extracting characters are treated differently than exceptions -// thrown while inserting characters. - -template -bool basic_ostream<_CharT, _Traits> - ::_M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from, - basic_streambuf<_CharT, _Traits>* __to) -{ - bool __any_inserted = false; - - while (__from->egptr() != __from->gptr()) { - const ptrdiff_t __avail = __from->egptr() - __from->gptr(); - - streamsize __nwritten; - _STLP_TRY { - __nwritten = __to->sputn(__from->gptr(), __avail); - __from->gbump((int)__nwritten); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - return __any_inserted; - } - - if (__nwritten == __avail) { - _STLP_TRY { - if (this->_S_eof(__from->sgetc())) - return true; - else - __any_inserted = true; - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::failbit); - return false; - } - } - - else if (__nwritten != 0) - return true; - - else - return __any_inserted; - } - - // No characters are in the buffer, but we aren't at EOF. Switch to - // unbuffered mode. - return __any_inserted || this->_M_copy_unbuffered(__from, __to); -} - -template -bool basic_ostream<_CharT, _Traits> - ::_M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from, - basic_streambuf<_CharT, _Traits>* __to) -{ - bool __any_inserted = false; - -#ifdef __SYMBIAN32__ - int_type __c; - _STLP_TRY { - __c = __from->sgetc();; - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::failbit); - return __any_inserted; - } - for(;;){ - - if (this->_S_eof(__c)) - return __any_inserted; - - else { - int_type __tmp; - _STLP_TRY { - __tmp = __to->sputc(__c); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - return __any_inserted; - } - - if (this->_S_eof(__tmp)) { - break; - } - else - __any_inserted = true; - } - _STLP_TRY { - __c = __from->snextc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::failbit); - return __any_inserted; - } - } -#else - while (true) { - int_type __c; - _STLP_TRY { - __c = __from->sbumpc(); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::failbit); - return __any_inserted; - } - - if (this->_S_eof(__c)) - return __any_inserted; - - else { - int_type __tmp; - _STLP_TRY { - __tmp = __to->sputc(__c); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - return __any_inserted; - } - - if (this->_S_eof(__tmp)) { - _STLP_TRY { - /* __tmp = */ __from->sputbackc(__c); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - return __any_inserted; - } - } - else - __any_inserted = true; - } - } -#endif - return __any_inserted; -} - -// Helper function for numeric output. - -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -_M_put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x) -{ - typedef typename basic_ostream<_CharT, _Traits>::sentry _Sentry; - _Sentry __sentry(__os); - bool __failed = true; - - if (__sentry) { - _STLP_TRY { - typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > _NumPut; - __failed = (use_facet<_NumPut>(__os.getloc())).put( - ostreambuf_iterator<_CharT, _Traits>(__os.rdbuf()), - __os, __os.fill(), - __x).failed(); - } - _STLP_CATCH_ALL { - __os._M_handle_exception(ios_base::badbit); - } - } - if (__failed) - __os.setstate(ios_base::badbit); - return __os; -} - -# if defined (_STLP_USE_TEMPLATE_EXPORT) && defined (__BUILDING_STLPORT) -_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL -_M_put_num(basic_ostream >&, unsigned long); -_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL -_M_put_num(basic_ostream >&, long); -# if defined (_STLP_LONG_LONG) -_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL -_M_put_num(basic_ostream >&, unsigned _STLP_LONG_LONG); -_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL -_M_put_num(basic_ostream >&, _STLP_LONG_LONG ); -# endif -# endif - -template -void basic_ostream<_CharT, _Traits>::_M_put_char(_CharT __c) -{ - sentry __sentry(*this); - if (__sentry) { - bool __failed = true; - _STLP_TRY { - streamsize __npad = this->width() > 0 ? this->width() - 1 : 0; - // if (__npad <= 1) - if (__npad == 0) - __failed = this->_S_eof(this->rdbuf()->sputc(__c)); - else if ((this->flags() & ios_base::adjustfield) == ios_base::left) { - __failed = this->_S_eof(this->rdbuf()->sputc(__c)); - __failed = __failed || - this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; - } - else { - __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; - __failed = __failed || this->_S_eof(this->rdbuf()->sputc(__c)); - } - - this->width(0); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - - if (__failed) - this->setstate(ios_base::badbit); - } -} - -template -void basic_ostream<_CharT, _Traits>::_M_put_nowiden(const _CharT* __s) -{ - sentry __sentry(*this); - if (__sentry) { - bool __failed = true; - streamsize __n = _Traits::length(__s); - streamsize __npad = this->width() > __n ? this->width() - __n : 0; - - _STLP_TRY { - if (__npad == 0) - __failed = this->rdbuf()->sputn(__s, __n) != __n; - else if ((this->flags() & ios_base::adjustfield) == ios_base::left) { - __failed = this->rdbuf()->sputn(__s, __n) != __n; - __failed = __failed || - this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; - } - else { - __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; - __failed = __failed || this->rdbuf()->sputn(__s, __n) != __n; - } - - this->width(0); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - - if (__failed) - this->setstate(ios_base::failbit); - } -} - -template -void basic_ostream<_CharT, _Traits>::_M_put_widen(const char* __s) -{ - sentry __sentry(*this); - if (__sentry) { - bool __failed = true; - streamsize __n = char_traits::length(__s); - streamsize __npad = this->width() > __n ? this->width() - __n : 0; - - _STLP_TRY { - if (__npad == 0) - __failed = !this->_M_put_widen_aux(__s, __n); - else if ((this->flags() & ios_base::adjustfield) == ios_base::left) { - __failed = !this->_M_put_widen_aux(__s, __n); - __failed = __failed || - this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; - } - else { - __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; - __failed = __failed || !this->_M_put_widen_aux(__s, __n); - } - - this->width(0); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - - if (__failed) - this->setstate(ios_base::failbit); - } -} - -template -bool basic_ostream<_CharT, _Traits>::_M_put_widen_aux(const char* __s, - streamsize __n) -{ - basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); - - for ( ; __n > 0 ; --__n) - if (this->_S_eof(__buf->sputc(this->widen(*__s++)))) - return false; - return true; -} - -// Unformatted output of a single character. -template -_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>& -basic_ostream<_CharT, _Traits>::put(char_type __c) -{ - sentry __sentry(*this); - bool __failed = true; - - if (__sentry) { - _STLP_TRY { - __failed = this->_S_eof(this->rdbuf()->sputc(__c)); - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - } - - if (__failed) - this->setstate(ios_base::badbit); - - return *this; -} - -// Unformatted output of a single character. -template -_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>& -basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n) -{ - sentry __sentry(*this); - bool __failed = true; - - if (__sentry) { - _STLP_TRY { - __failed = this->rdbuf()->sputn(__s, __n) != __n; - } - _STLP_CATCH_ALL { - this->_M_handle_exception(ios_base::badbit); - } - } - - if (__failed) - this->setstate(ios_base::badbit); - - return *this; -} - -_STLP_END_NAMESPACE - -#endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ - -#endif /* _STLP_OSTREAM_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ostream.h --- a/epoc32/include/stdapis/stlport/stl/_ostream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,411 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - -#ifndef _STLP_INTERNAL_OSTREAM_H -#define _STLP_INTERNAL_OSTREAM_H - -#ifndef _STLP_INTERNAL_IOS_H -# include // For basic_ios<>. Includes . -#endif - -#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -_M_put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x); - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -template -class _Osentry; -# endif - -template -bool -_M_init(basic_ostream<_CharT, _Traits>& __str); - -//---------------------------------------------------------------------- -// class basic_ostream<> - -template -class basic_ostream : virtual public basic_ios<_CharT, _Traits> -{ - typedef basic_ostream<_CharT, _Traits> _Self; - -public: // Types - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - typedef basic_ios<_CharT, _Traits> _Basic_ios; - -public: // Constructor and destructor. - _STLP_DECLSPEC explicit basic_ostream(basic_streambuf<_CharT, _Traits>* __buf); - _STLP_DECLSPEC ~basic_ostream(); - -public: // Hooks for manipulators. - typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&); - typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&); - typedef _Self& (_STLP_CALL *__ostream_fn)(_Self&); - _Self& operator<< (__ostream_fn __f) { return __f(*this); } - _Self & operator<< (__ios_base_fn __f) { __f(*this); return *this; } - _Self& operator<< (__ios_fn __ff) { __ff(*this); return *this; } - -private: - bool _M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from, - basic_streambuf<_CharT, _Traits>* __to); - bool _M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from, - basic_streambuf<_CharT, _Traits>* __to); - -public: - void _M_put_char(_CharT __c); - - void _M_put_nowiden(const _CharT* __s); - void _M_put_widen(const char* __s); - bool _M_put_widen_aux(const char* __s, streamsize __n); - -public: // Unformatted output. - _Self& put(char_type __c); - _Self& write(const char_type* __s, streamsize __n); - -public: // Formatted output. - // Formatted output from a streambuf. - _Self& operator<<(basic_streambuf<_CharT, _Traits>* __buf); -# ifndef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER - // this is needed for compiling with option char = unsigned - _Self& operator<<(unsigned char __x) { _M_put_char(__x); return *this; } -# endif -#ifdef __SYMBIAN32__ - _Self& operator<<(short __x) - { - ios_base::fmtflags __fmtf = - ios_base::flags() & ios_base::basefield; - long __ly = (__fmtf == ios_base::oct || __fmtf == ios_base::hex) ? - (long)(unsigned short)(__x) : (long)__x; - return _M_put_num(*this, __ly); - } - _Self& operator<<(int __x) - { - ios_base::fmtflags __fmtf = - ios_base::flags() & ios_base::basefield; - long __ly = (__fmtf == ios_base::oct || __fmtf == ios_base::hex) ? - (long)(unsigned int)(__x) : (long)__x; - return _M_put_num(*this, __ly); - } -#else - _Self& operator<<(short __x) { return _M_put_num(*this, __x); } - _Self& operator<<(int __x) { return _M_put_num(*this, __x); } -#endif - _Self& operator<<(unsigned int __x) { return _M_put_num(*this, __STATIC_CAST(unsigned long,__x)); } - _Self& operator<<(unsigned short __x) { return _M_put_num(*this, __STATIC_CAST(unsigned long,__x)); } - _Self& operator<<(long __x) { return _M_put_num(*this, __x); } - _Self& operator<<(unsigned long __x) { return _M_put_num(*this, __x); } -#ifdef _STLP_LONG_LONG - _Self& operator<< (_STLP_LONG_LONG __x) { return _M_put_num(*this, __x); } - _Self& operator<< (unsigned _STLP_LONG_LONG __x) { return _M_put_num(*this, __x); } -#endif - _Self& operator<<(float __x) - { return _M_put_num(*this, __STATIC_CAST(double,__x)); } - _Self& operator<<(double __x) { return _M_put_num(*this, __x); } -# ifndef _STLP_NO_LONG_DOUBLE - _Self& operator<<(long double __x) { return _M_put_num(*this, __x); } -# endif - _Self& operator<<(const void* __x) { return _M_put_num(*this, __x); } -# ifndef _STLP_NO_BOOL - _Self& operator<<(bool __x) { return _M_put_num(*this, __x); } -# endif - -public: // Buffer positioning and manipulation. - _Self& flush() { - if (this->rdbuf()) - if (this->rdbuf()->pubsync() == -1) - this->setstate(ios_base::badbit); - return *this; - } - - pos_type tellp() { - return this->rdbuf() && !this->fail() - ? this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out) - : pos_type(-1); - } - - _Self& seekp(pos_type __pos) { - if (this->rdbuf() && !this->fail()) - if( pos_type(off_type(-1)) == this->rdbuf()->pubseekpos(__pos, ios_base::out)) - this->setstate(ios_base::failbit); - return *this; - } - - _Self& seekp(off_type __off, ios_base::seekdir __dir) { - if (this->rdbuf() && !this->fail()) - if( pos_type(off_type(-1)) == this->rdbuf()->pubseekoff(__off, __dir, ios_base::out)) - this->setstate(ios_base::failbit); - return *this; - } - -#if defined (_STLP_USE_TEMPLATE_EXPORT) - // If we are using DLL specs, we have not to use inner classes - // end class declaration here - typedef _Osentry<_CharT, _Traits> sentry; -}; -# define sentry _Osentry - template - class _Osentry { - typedef _Osentry<_CharT, _Traits> _Self; -# else - class sentry { - typedef sentry _Self; -# endif - private: - basic_ostream<_CharT, _Traits>& _M_str; - // basic_streambuf<_CharT, _Traits>* _M_buf; - bool _M_ok; - public: - explicit sentry(basic_ostream<_CharT, _Traits>& __str) - : _M_str(__str), /* _M_buf(__str.rdbuf()), */ _M_ok(_M_init(__str)) - { - } - - ~sentry() { - if (_M_str.flags() & ios_base::unitbuf) -# ifndef _STLP_INCOMPLETE_EXCEPTION_HEADER - if (!_STLP_VENDOR_EXCEPT_STD::uncaught_exception()) -# endif - _M_str.flush(); - } - - operator bool() const { return _M_ok; } - private: // Disable assignment and copy constructor. - sentry(const _Self& __s) : _M_str (__s._M_str) {}; - void operator=(const _Self&) {}; - }; -# if defined (_STLP_USE_TEMPLATE_EXPORT) -# undef sentry -# else - // close basic_ostream class definition here -}; -# endif - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_ostream >; -_STLP_EXPORT_TEMPLATE_CLASS _Osentry >; -# if !defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_ostream >; -_STLP_EXPORT_TEMPLATE_CLASS _Osentry >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -template -inline basic_streambuf<_CharT, _Traits>* _STLP_CALL -_M_get_ostreambuf(basic_ostream<_CharT, _Traits>& __St) -{ - return __St.rdbuf(); -} - -// Non-member functions. - -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c) { - __os._M_put_char(__c); - return __os; -} - -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__s); -#else - __os._M_put_nowiden(__s); -#endif - return __os; -} - -# ifdef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER -// some specializations - -inline basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __os, char __c) { - __os._M_put_char(__c); - return __os; -} - -inline basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __os, signed char __c) { - __os._M_put_char(__c); - return __os; -} - -inline basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __os, unsigned char __c) { - __os._M_put_char(__c); - return __os; -} - -inline basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __os, const char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__s); -#else - __os._M_put_nowiden(__s); -#endif - return __os; -} - -inline basic_ostream >& _STLP_CALL -operator<<(basic_ostream >& __os, const signed char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#else - __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#endif - return __os; -} - -inline basic_ostream >& -operator<<(basic_ostream >& __os, const unsigned char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#else - __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#endif - return __os; -} - -# else - -// also for compilers who might use that -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, char __c) { - __os._M_put_char(__os.widen(__c)); - return __os; -} - -template -inline basic_ostream& _STLP_CALL -operator<<(basic_ostream& __os, char __c) { - __os._M_put_char(__c); - return __os; -} - -template -inline basic_ostream& _STLP_CALL -operator<<(basic_ostream& __os, signed char __c) { - __os._M_put_char(__c); - return __os; -} - -template -inline basic_ostream& _STLP_CALL -operator<<(basic_ostream& __os, unsigned char __c) { - __os._M_put_char(__c); - return __os; -} - -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_widen(__s); -#else - __os._M_put_widen(__s); -#endif - return __os; -} - -template -inline basic_ostream& _STLP_CALL -operator<<(basic_ostream& __os, const char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__s); -#else - __os._M_put_nowiden(__s); -#endif - return __os; -} - -template -inline basic_ostream& _STLP_CALL -operator<<(basic_ostream& __os, const signed char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#else - __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#endif - return __os; -} - -template -inline basic_ostream& -operator<<(basic_ostream& __os, const unsigned char* __s) { -#ifdef __SYMBIAN32__ - !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#else - __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); -#endif - return __os; -} -# endif /* _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER */ - -//---------------------------------------------------------------------- -// basic_ostream manipulators. - -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -endl(basic_ostream<_CharT, _Traits>& __os) { - __os.put(__os.widen('\n')); - __os.flush(); - return __os; -} - -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -ends(basic_ostream<_CharT, _Traits>& __os) { - __os.put(_STLP_DEFAULT_CONSTRUCTED(_CharT)); - return __os; -} - -template -inline basic_ostream<_CharT, _Traits>& _STLP_CALL -flush(basic_ostream<_CharT, _Traits>& __os) { - __os.flush(); - return __os; -} - -_STLP_END_NAMESPACE - -# undef _STLP_MANIP_INLINE - -#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_OSTREAM_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ostreambuf_iterator.h --- a/epoc32/include/stdapis/stlport/stl/_ostreambuf_iterator.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H -#define _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H - -#ifndef _STLP_INTERNAL_STREAMBUF -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_ostreambuf(basic_ostream<_CharT, _Traits>& ) ; - -// The default template argument is declared in iosfwd -template -class ostreambuf_iterator -{ -public: - typedef _CharT char_type; - typedef _Traits traits_type; - typedef typename _Traits::int_type int_type; - typedef basic_streambuf<_CharT, _Traits> streambuf_type; - typedef basic_ostream<_CharT, _Traits> ostream_type; - - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - -public: - ostreambuf_iterator(streambuf_type* __buf) _STLP_NOTHROW : _M_buf(__buf), _M_ok(__buf!=0) {} - // ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {} - inline ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW; - - ostreambuf_iterator<_CharT, _Traits>& operator=(char_type __c) { - _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c), - traits_type::eof()); - return *this; - } - - ostreambuf_iterator<_CharT, _Traits>& operator*() { return *this; } - ostreambuf_iterator<_CharT, _Traits>& operator++() { return *this; } - ostreambuf_iterator<_CharT, _Traits>& operator++(int) { return *this; } - - bool failed() const { return !_M_ok; } - -private: - streambuf_type* _M_buf; - bool _M_ok; -}; - -template -inline ostreambuf_iterator<_CharT, _Traits>::ostreambuf_iterator(basic_ostream<_CharT, _Traits>& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {} - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator >; -# if defined (INSTANTIATE_WIDE_STREAMS) -_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template -inline output_iterator_tag _STLP_CALL -iterator_category(const ostreambuf_iterator<_CharT, _Traits>&) { return output_iterator_tag(); } -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_pair.h --- a/epoc32/include/stdapis/stlport/stl/_pair.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,210 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_PAIR_H -#define _STLP_INTERNAL_PAIR_H - -#include - -_STLP_BEGIN_NAMESPACE - -#ifdef _STLP_USE_TRAP_LEAVE -template -struct pair { - typedef _T1 first_type; - typedef _T2 second_type; - - _T1 first; - _STLP_StackPusher<_T1> __pusher; - _T2 second; - - // first and second should construct themselves with their default constructors in ANSI order - pair() : __pusher(&first) { - CleanupStack::Pop(); - } - - pair(const _T1& __a, const _T2& __b) : first(__a), __pusher(&first), second(__b) { - CleanupStack::Pop(); - } - - // undergroud extensions - pair(const _T1& __a, __false_type) : first(__a), __pusher(&first), second() { - CleanupStack::Pop(); - } - pair(__true_type, const _T2& __a) : first(), __pusher(&first), second(__a) { - CleanupStack::Pop(); - } - -#if defined (_STLP_MEMBER_TEMPLATES) && !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200)) - template - pair(const pair<_U1, _U2>& __p) : first(__p.first), __pusher(&first), second(__p.second) { - CleanupStack::Pop(); - } - - pair(const pair<_T1,_T2>& __o) : first(__o.first), __pusher(&first), second(__o.second) { - CleanupStack::Pop(); - } -#endif - __TRIVIAL_DESTRUCTOR(pair) -}; - -#else - -template -struct pair { - typedef _T1 first_type; - typedef _T2 second_type; - - _T1 first; - _T2 second; -# if defined (_STLP_CONST_CONSTRUCTOR_BUG) - pair() {} -# else - pair() : first(_T1()), second(_T2()) {} -# endif - pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} - - // undergroud extensions - pair(const _T1& __a, __false_type) : first(__a), second() {} - pair(const _T2& __a, __true_type) : first(), second(__a) {} - -#if defined (_STLP_MEMBER_TEMPLATES) && !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200)) - template - pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} - - pair(const pair<_T1,_T2>& __o) : first(__o.first), second(__o.second) {} -#endif - __TRIVIAL_DESTRUCTOR(pair) -}; -#endif - -template -inline bool _STLP_CALL operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) -{ - return __x.first == __y.first && __x.second == __y.second; -} - -template -inline bool _STLP_CALL operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) -{ - return __x.first < __y.first || - (!(__y.first < __x.first) && __x.second < __y.second); -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool _STLP_CALL operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return !(__x == __y); -} - -template -inline bool _STLP_CALL operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return __y < __x; -} - -template -inline bool _STLP_CALL operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return !(__y < __x); -} - -template -inline bool _STLP_CALL operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { - return !(__x < __y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - - -#if defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && ! defined (_STLP_NO_EXTENSIONS) && ! defined (__BORLANDC__) && ! defined (__DMC__) -template -inline pair<_T1, _T2 const*> make_pair(_T1 const& __x, - _T2 const (&__y)[_Sz]) -{ - return pair<_T1, _T2 const*>(__x, static_cast<_T2 const*>(__y)); -} - -template -inline pair<_T1 const*, _T2> make_pair(_T1 const (&__x)[_Sz], - _T2 const& __y) -{ - return pair<_T1 const*, _T2>(static_cast<_T1 const*>(__x), __y); -} - -template -inline pair<_T1 const*, _T2 const*> make_pair(_T1 const (&__x)[_Sz1], - _T2 const (&__y)[_Sz2]) -{ - return pair<_T1 const*, _T2 const*>(static_cast<_T1 const*>(__x), - static_cast<_T2 const*>(__y)); -} -#endif - -template -inline pair<_T1, _T2> _STLP_CALL make_pair(const _T1& __x, const _T2& __y) -{ - return pair<_T1, _T2>(__x, __y); -} - - -_STLP_END_NAMESPACE - -# if defined (_STLP_USE_NAMESPACES) || ! defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) -_STLP_BEGIN_RELOPS_NAMESPACE - -template -inline bool _STLP_CALL operator!=(const _Tp& __x, const _Tp& __y) { - return !(__x == __y); -} - -template -inline bool _STLP_CALL operator>(const _Tp& __x, const _Tp& __y) { - return __y < __x; -} - -template -inline bool _STLP_CALL operator<=(const _Tp& __x, const _Tp& __y) { - return !(__y < __x); -} - -template -inline bool _STLP_CALL operator>=(const _Tp& __x, const _Tp& __y) { - return !(__x < __y); -} - -_STLP_END_RELOPS_NAMESPACE - -# endif - -#endif /* _STLP_INTERNAL_PAIR_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_pthread_alloc.h --- a/epoc32/include/stdapis/stlport/stl/_pthread_alloc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,489 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_PTHREAD_ALLOC_H -#define _STLP_PTHREAD_ALLOC_H - -// Pthread-specific node allocator. -// This is similar to the default allocator, except that free-list -// information is kept separately for each thread, avoiding locking. -// This should be reasonably fast even in the presence of threads. -// The down side is that storage may not be well-utilized. -// It is not an error to allocate memory in thread A and deallocate -// it in thread B. But this effectively transfers ownership of the memory, -// so that it can only be reallocated by thread B. Thus this can effectively -// result in a storage leak if it's done on a regular basis. -// It can also result in frequent sharing of -// cache lines among processors, with potentially serious performance -// consequences. - -#include - -#ifndef _STLP_INTERNAL_ALLOC_H -#include -#endif - -#ifndef __RESTRICT -# define __RESTRICT -#endif - -_STLP_BEGIN_NAMESPACE - -#define _STLP_DATA_ALIGNMENT 8 - -union _Pthread_alloc_obj { - union _Pthread_alloc_obj * __free_list_link; - char __client_data[_STLP_DATA_ALIGNMENT]; /* The client sees this. */ -}; - -// Pthread allocators don't appear to the client to have meaningful -// instances. We do in fact need to associate some state with each -// thread. That state is represented by -// _Pthread_alloc_per_thread_state<_Max_size>. - -template -struct _Pthread_alloc_per_thread_state { - typedef _Pthread_alloc_obj __obj; - enum { _S_NFREELISTS = _Max_size/_STLP_DATA_ALIGNMENT }; - - // Free list link for list of available per thread structures. - // When one of these becomes available for reuse due to thread - // termination, any objects in its free list remain associated - // with it. The whole structure may then be used by a newly - // created thread. - _Pthread_alloc_per_thread_state() : __next(0) - { - memset((void *)__free_list, 0, (size_t)_S_NFREELISTS * sizeof(__obj *)); - } - // Returns an object of size __n, and possibly adds to size n free list. - void *_M_refill(size_t __n); - - _Pthread_alloc_obj* volatile __free_list[_S_NFREELISTS]; - _Pthread_alloc_per_thread_state<_Max_size> * __next; - // this data member is only to be used by per_thread_allocator, which returns memory to the originating thread. - _STLP_mutex _M_lock; - - }; - -// Pthread-specific allocator. -// The argument specifies the largest object size allocated from per-thread -// free lists. Larger objects are allocated using malloc_alloc. -// Max_size must be a power of 2. -template < __DFL_NON_TYPE_PARAM(size_t, _Max_size, _MAX_BYTES) > -class _Pthread_alloc { - -public: // but only for internal use: - - typedef _Pthread_alloc_obj __obj; - typedef _Pthread_alloc_per_thread_state<_Max_size> __state_type; - typedef char value_type; - - // Allocates a chunk for nobjs of size size. nobjs may be reduced - // if it is inconvenient to allocate the requested number. - static char *_S_chunk_alloc(size_t __size, size_t &__nobjs); - - enum {_S_ALIGN = _STLP_DATA_ALIGNMENT}; - - static size_t _S_round_up(size_t __bytes) { - return (((__bytes) + (int)_S_ALIGN-1) & ~((int)_S_ALIGN - 1)); - } - static size_t _S_freelist_index(size_t __bytes) { - return (((__bytes) + (int)_S_ALIGN-1)/(int)_S_ALIGN - 1); - } - -private: - // Chunk allocation state. And other shared state. - // Protected by _S_chunk_allocator_lock. - static _STLP_mutex_base _S_chunk_allocator_lock; - static char *_S_start_free; - static char *_S_end_free; - static size_t _S_heap_size; - static _Pthread_alloc_per_thread_state<_Max_size>* _S_free_per_thread_states; - static pthread_key_t _S_key; - static bool _S_key_initialized; - // Pthread key under which per thread state is stored. - // Allocator instances that are currently unclaimed by any thread. - static void _S_destructor(void *instance); - // Function to be called on thread exit to reclaim per thread - // state. - static _Pthread_alloc_per_thread_state<_Max_size> *_S_new_per_thread_state(); -public: - // Return a recycled or new per thread state. - static _Pthread_alloc_per_thread_state<_Max_size> *_S_get_per_thread_state(); -private: - // ensure that the current thread has an associated - // per thread state. - class _M_lock; - friend class _M_lock; - class _M_lock { - public: - _M_lock () { _S_chunk_allocator_lock._M_acquire_lock(); } - ~_M_lock () { _S_chunk_allocator_lock._M_release_lock(); } - }; - -public: - - /* n must be > 0 */ - static void * allocate(size_t __n) - { - __obj * volatile * __my_free_list; - __obj * __RESTRICT __result; - __state_type* __a; - - if (__n > _Max_size) { - return(__malloc_alloc<0>::allocate(__n)); - } - - __a = _S_get_per_thread_state(); - - __my_free_list = __a -> __free_list + _S_freelist_index(__n); - __result = *__my_free_list; - if (__result == 0) { - void *__r = __a -> _M_refill(_S_round_up(__n)); - return __r; - } - *__my_free_list = __result -> __free_list_link; - return (__result); - }; - - /* p may not be 0 */ - static void deallocate(void *__p, size_t __n) - { - __obj *__q = (__obj *)__p; - __obj * volatile * __my_free_list; - __state_type* __a; - - if (__n > _Max_size) { - __malloc_alloc<0>::deallocate(__p, __n); - return; - } - - __a = _S_get_per_thread_state(); - - __my_free_list = __a->__free_list + _S_freelist_index(__n); - __q -> __free_list_link = *__my_free_list; - *__my_free_list = __q; - } - - // boris : versions for per_thread_allocator - /* n must be > 0 */ - static void * allocate(size_t __n, __state_type* __a) - { - __obj * volatile * __my_free_list; - __obj * __RESTRICT __result; - - if (__n > _Max_size) { - return(__malloc_alloc<0>::allocate(__n)); - } - - // boris : here, we have to lock per thread state, as we may be getting memory from - // different thread pool. - _STLP_mutex_lock __lock(__a->_M_lock); - - __my_free_list = __a -> __free_list + _S_freelist_index(__n); - __result = *__my_free_list; - if (__result == 0) { - void *__r = __a -> _M_refill(_S_round_up(__n)); - return __r; - } - *__my_free_list = __result -> __free_list_link; - return (__result); - }; - - /* p may not be 0 */ - static void deallocate(void *__p, size_t __n, __state_type* __a) - { - __obj *__q = (__obj *)__p; - __obj * volatile * __my_free_list; - - if (__n > _Max_size) { - __malloc_alloc<0>::deallocate(__p, __n); - return; - } - - // boris : here, we have to lock per thread state, as we may be returning memory from - // different thread. - _STLP_mutex_lock __lock(__a->_M_lock); - - __my_free_list = __a->__free_list + _S_freelist_index(__n); - __q -> __free_list_link = *__my_free_list; - *__my_free_list = __q; - } - - static void * reallocate(void *__p, size_t __old_sz, size_t __new_sz); - -} ; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS _Pthread_alloc<_MAX_BYTES>; -# endif - -typedef _Pthread_alloc<_MAX_BYTES> __pthread_alloc; -typedef __pthread_alloc pthread_alloc; - -template -class pthread_allocator { - typedef pthread_alloc _S_Alloc; // The underlying allocator. -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Tp* pointer; - typedef const _Tp* const_pointer; - typedef _Tp& reference; - typedef const _Tp& const_reference; - typedef _Tp value_type; - -#ifdef _STLP_MEMBER_TEMPLATE_CLASSES - template struct rebind { - typedef pthread_allocator<_NewType> other; - }; -#endif - - pthread_allocator() _STLP_NOTHROW {} - pthread_allocator(const pthread_allocator<_Tp>& a) _STLP_NOTHROW {} - -#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */ - template pthread_allocator(const pthread_allocator<_OtherType>&) - _STLP_NOTHROW {} -#endif - - ~pthread_allocator() _STLP_NOTHROW {} - - pointer address(reference __x) const { return &__x; } - const_pointer address(const_reference __x) const { return &__x; } - - // __n is permitted to be 0. The C++ standard says nothing about what - // the return value is when __n == 0. - _Tp* allocate(size_type __n, const void* = 0) { - return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp))) - : 0; - } - - // p is not permitted to be a null pointer. - void deallocate(pointer __p, size_type __n) - { _S_Alloc::deallocate(__p, __n * sizeof(_Tp)); } - - size_type max_size() const _STLP_NOTHROW - { return size_t(-1) / sizeof(_Tp); } - - void construct(pointer __p, const _Tp& __val) { _STLP_PLACEMENT_NEW (__p) _Tp(__val); } - void destroy(pointer _p) { _p->~_Tp(); } -}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC pthread_allocator { -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef void* pointer; - typedef const void* const_pointer; - typedef void value_type; -#ifdef _STLP_MEMBER_TEMPLATE_CLASSES - template struct rebind { - typedef pthread_allocator<_NewType> other; - }; -#endif -}; - -template -inline bool operator==(const pthread_allocator<_T1>&, - const pthread_allocator<_T2>& a2) -{ - return true; -} - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER -template -inline bool operator!=(const pthread_allocator<_T1>&, - const pthread_allocator<_T2>&) -{ - return false; -} -#endif - - -#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - -# ifdef _STLP_USE_RAW_SGI_ALLOCATORS -template -struct _Alloc_traits<_Tp, _Pthread_alloc<_Max_size> > -{ - typedef __allocator<_Tp, _Pthread_alloc<_Max_size> > - allocator_type; -}; -# endif - -template -struct _Alloc_traits<_Tp, pthread_allocator<_Atype> > -{ - typedef pthread_allocator<_Tp> allocator_type; -}; - -#endif - -#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) - -template -inline pthread_allocator<_Tp2>& -__stl_alloc_rebind(pthread_allocator<_Tp1>& __x, const _Tp2*) { - return (pthread_allocator<_Tp2>&)__x; -} - -template -inline pthread_allocator<_Tp2> -__stl_alloc_create(pthread_allocator<_Tp1>&, const _Tp2*) { - return pthread_allocator<_Tp2>(); -} - -#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ - -// -// per_thread_allocator<> : this allocator always return memory to the same thread -// it was allocated from. -// - -template -class per_thread_allocator { - typedef pthread_alloc _S_Alloc; // The underlying allocator. - typedef pthread_alloc::__state_type __state_type; -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef _Tp* pointer; - typedef const _Tp* const_pointer; - typedef _Tp& reference; - typedef const _Tp& const_reference; - typedef _Tp value_type; - -#ifdef _STLP_MEMBER_TEMPLATE_CLASSES - template struct rebind { - typedef per_thread_allocator<_NewType> other; - }; -#endif - - per_thread_allocator() _STLP_NOTHROW { - _M_state = _S_Alloc::_S_get_per_thread_state(); - } - per_thread_allocator(const per_thread_allocator<_Tp>& __a) _STLP_NOTHROW : _M_state(__a._M_state){} - -#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */ - template per_thread_allocator(const per_thread_allocator<_OtherType>& __a) - _STLP_NOTHROW : _M_state(__a._M_state) {} -#endif - - ~per_thread_allocator() _STLP_NOTHROW {} - - pointer address(reference __x) const { return &__x; } - const_pointer address(const_reference __x) const { return &__x; } - - // __n is permitted to be 0. The C++ standard says nothing about what - // the return value is when __n == 0. - _Tp* allocate(size_type __n, const void* = 0) { - return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp), _M_state)): 0; - } - - // p is not permitted to be a null pointer. - void deallocate(pointer __p, size_type __n) - { _S_Alloc::deallocate(__p, __n * sizeof(_Tp), _M_state); } - - size_type max_size() const _STLP_NOTHROW - { return size_t(-1) / sizeof(_Tp); } - - void construct(pointer __p, const _Tp& __val) { _STLP_PLACEMENT_NEW (__p) _Tp(__val); } - void destroy(pointer _p) { _p->~_Tp(); } - - // state is being kept here - __state_type* _M_state; -}; - -_STLP_TEMPLATE_NULL -class _STLP_CLASS_DECLSPEC per_thread_allocator { -public: - typedef size_t size_type; - typedef ptrdiff_t difference_type; - typedef void* pointer; - typedef const void* const_pointer; - typedef void value_type; -#ifdef _STLP_MEMBER_TEMPLATE_CLASSES - template struct rebind { - typedef per_thread_allocator<_NewType> other; - }; -#endif -}; - -template -inline bool operator==(const per_thread_allocator<_T1>& __a1, - const per_thread_allocator<_T2>& __a2) -{ - return __a1._M_state == __a2._M_state; -} - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER -template -inline bool operator!=(const per_thread_allocator<_T1>& __a1, - const per_thread_allocator<_T2>& __a2) -{ - return __a1._M_state != __a2._M_state; -} -#endif - - -#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - -template -struct _Alloc_traits<_Tp, per_thread_allocator<_Atype> > -{ - typedef per_thread_allocator<_Tp> allocator_type; -}; - -#endif - -#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) - -template -inline per_thread_allocator<_Tp2>& -__stl_alloc_rebind(per_thread_allocator<_Tp1>& __x, const _Tp2*) { - return (per_thread_allocator<_Tp2>&)__x; -} - -template -inline per_thread_allocator<_Tp2> -__stl_alloc_create(per_thread_allocator<_Tp1>&, const _Tp2*) { - return per_thread_allocator<_Tp2>(); -} - -#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ - -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_PTHREAD_ALLOC */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_ptrs_specialize.h --- a/epoc32/include/stdapis/stlport/stl/_ptrs_specialize.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,72 +0,0 @@ -#ifndef _STLP_PTRS_SPECIALIZE_H -# define _STLP_PTRS_SPECIALIZE_H - -// the following is a workaround for arrow operator problems -# if defined ( _STLP_NO_ARROW_OPERATOR ) -// User wants to disable proxy -> operators -# define _STLP_DEFINE_ARROW_OPERATOR -# define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp) -# else -// Compiler can handle generic -> operator. -# define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp) -# ifdef __BORLANDC__ -# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(*(*this)); } -# elif defined ( _STLP_WINCE ) || defined(__WATCOMC__) -# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; } -# else -# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(operator*()); } -# endif -# endif /* _STLP_NO_ARROW_OPERATOR */ - -// Important pointers specializations - -# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS -# define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) -# define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) -# else -# define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux {}; -# define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \ -_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***) -# endif - -# define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Type) - -# if !defined ( _STLP_NO_BOOL ) -_STLP_POINTERS_SPECIALIZE( bool ) -# endif -_STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void) -# ifndef _STLP_NO_SIGNED_BUILTINS - _STLP_POINTERS_SPECIALIZE( signed char ) -# endif - _STLP_POINTERS_SPECIALIZE( char ) - _STLP_POINTERS_SPECIALIZE( unsigned char ) - _STLP_POINTERS_SPECIALIZE( short ) - _STLP_POINTERS_SPECIALIZE( unsigned short ) - _STLP_POINTERS_SPECIALIZE( int ) - _STLP_POINTERS_SPECIALIZE( unsigned int ) - _STLP_POINTERS_SPECIALIZE( long ) - _STLP_POINTERS_SPECIALIZE( unsigned long ) - _STLP_POINTERS_SPECIALIZE( float ) - _STLP_POINTERS_SPECIALIZE( double ) -# if !defined ( _STLP_NO_LONG_DOUBLE ) - _STLP_POINTERS_SPECIALIZE( long double ) -# endif -# if defined ( _STLP_LONG_LONG) - _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG ) - _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG ) -# endif -#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT) - _STLP_POINTERS_SPECIALIZE( wchar_t ) -# endif - -# undef _STLP_ARROW_SPECIALIZE -# undef _STLP_ARROW_SPECIALIZE_WITH_PTRS -# undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_queue.h --- a/epoc32/include/stdapis/stlport/stl/_queue.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,212 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_QUEUE_H -#define _STLP_INTERNAL_QUEUE_H - -#ifndef _STLP_INTERNAL_DEQUE_H -# include -#endif - -#ifndef _STLP_INTERNAL_VECTOR_H -# include -#endif - -#ifndef _STLP_INTERNAL_HEAP_H -# include -#endif - -#ifndef _STLP_INTERNAL_FUNCTION_H -# include -#endif - -#if defined(__SC__) && !defined(__DMC__) //*ty 12/07/2001 - since "comp" is a built-in type and reserved under SCpp -#define comp _Comp -#endif - -_STLP_BEGIN_NAMESPACE - -# if ! defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) -template > -# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS ) -# define _STLP_QUEUE_ARGS _Tp -template -# else -template -# endif - -class queue { -# if defined ( _STLP_QUEUE_ARGS ) - typedef deque<_Tp> _Sequence; -# endif -public: - typedef typename _Sequence::value_type value_type; - typedef typename _Sequence::size_type size_type; - typedef _Sequence container_type; - - typedef typename _Sequence::reference reference; - typedef typename _Sequence::const_reference const_reference; - -protected: - _Sequence c; -public: - queue() : c() {} - explicit queue(const _Sequence& __c) : c(__c) {} - - bool empty() const { return c.empty(); } - size_type size() const { return c.size(); } - reference front() { return c.front(); } - const_reference front() const { return c.front(); } - reference back() { return c.back(); } - const_reference back() const { return c.back(); } - void push(const value_type& __x) { c.push_back(__x); } - void pop() { c.pop_front(); } - const _Sequence& _Get_c() const { return c; } -}; - -# ifndef _STLP_QUEUE_ARGS -# define _STLP_QUEUE_ARGS _Tp, _Sequence -# define _STLP_QUEUE_HEADER_ARGS class _Tp, class _Sequence -# else -# define _STLP_QUEUE_HEADER_ARGS class _Tp -# endif - -template < _STLP_QUEUE_HEADER_ARGS > -inline bool _STLP_CALL -operator==(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y) -{ - return __x._Get_c() == __y._Get_c(); -} - -template < _STLP_QUEUE_HEADER_ARGS > -inline bool _STLP_CALL -operator<(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y) -{ - return __x._Get_c() < __y._Get_c(); -} - -_STLP_RELOPS_OPERATORS( template < _STLP_QUEUE_HEADER_ARGS >, queue<_STLP_QUEUE_ARGS > ) - -# if !(defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) || defined ( _STLP_TEMPLATE_PARAM_SUBTYPE_BUG )) -template , - class _Compare = less<_STLP_HEADER_TYPENAME _Sequence::value_type> > -# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS ) -template -# else -template -# endif -class priority_queue { -# ifdef _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS - typedef vector<_Tp> _Sequence; - typedef less< typename vector<_Tp>::value_type> _Compare; -# endif -public: - typedef typename _Sequence::value_type value_type; - typedef typename _Sequence::size_type size_type; - typedef _Sequence container_type; - - typedef typename _Sequence::reference reference; - typedef typename _Sequence::const_reference const_reference; -protected: - _Sequence c; - _Compare comp; -public: - priority_queue() : c() {} - explicit priority_queue(const _Compare& __x) : c(), comp(__x) {} - explicit priority_queue(const _Compare& __x, const _Sequence& __s) - : c(__s), comp(__x) - { make_heap(c.begin(), c.end(), comp); } - -#ifdef _STLP_MEMBER_TEMPLATES - template - priority_queue(_InputIterator __first, _InputIterator __last) - : c(__first, __last) { make_heap(c.begin(), c.end(), comp); } - - template - priority_queue(_InputIterator __first, - _InputIterator __last, const _Compare& __x) - : c(__first, __last), comp(__x) - { make_heap(c.begin(), c.end(), comp); } - - template - priority_queue(_InputIterator __first, _InputIterator __last, - const _Compare& __x, const _Sequence& __s) - : c(__s), comp(__x) - { - c.insert(c.end(), __first, __last); - make_heap(c.begin(), c.end(), comp); - } - -#else /* _STLP_MEMBER_TEMPLATES */ - priority_queue(const value_type* __first, const value_type* __last) - : c(__first, __last) { make_heap(c.begin(), c.end(), comp); } - - priority_queue(const value_type* __first, const value_type* __last, - const _Compare& __x) - : c(__first, __last), comp(__x) - { make_heap(c.begin(), c.end(), comp); } - - priority_queue(const value_type* __first, const value_type* __last, - const _Compare& __x, const _Sequence& __c) - : c(__c), comp(__x) - { - c.insert(c.end(), __first, __last); - make_heap(c.begin(), c.end(), comp); - } -#endif /* _STLP_MEMBER_TEMPLATES */ - - bool empty() const { return c.empty(); } - size_type size() const { return c.size(); } - const_reference top() const { return c.front(); } - void push(const value_type& __x) { - _STLP_TRY { - c.push_back(__x); - push_heap(c.begin(), c.end(), comp); - } - _STLP_UNWIND(c.clear()); - } - void pop() { - _STLP_TRY { - pop_heap(c.begin(), c.end(), comp); - c.pop_back(); - } - _STLP_UNWIND(c.clear()); - } -}; - -_STLP_END_NAMESPACE - -# undef _STLP_QUEUE_ARGS -# undef _STLP_QUEUE_HEADER_ARGS - -#endif /* _STLP_INTERNAL_QUEUE_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_range_errors.h --- a/epoc32/include/stdapis/stlport/stl/_range_errors.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ - -#ifndef _STLP_RANGE_ERRORS_H -#define _STLP_RANGE_ERRORS_H - -// A few places in the STL throw range errors, using standard exception -// classes defined in . This header file provides functions -// to throw those exception objects. - -// _STLP_DONT_THROW_RANGE_ERRORS is a hook so that users can disable -// this exception throwing. -#if defined(_STLP_CAN_THROW_RANGE_ERRORS) && defined(_STLP_USE_EXCEPTIONS) \ - && !defined(_STLP_DONT_THROW_RANGE_ERRORS) -# define _STLP_THROW_RANGE_ERRORS -#endif - -// For the STLport iostreams, only declaration here, definition is in the lib - -#if defined ( _STLP_OWN_IOSTREAMS ) && ! defined (_STLP_EXTERN_RANGE_ERRORS) -# define _STLP_EXTERN_RANGE_ERRORS -# endif - -#if defined (_STLP_EXTERN_RANGE_ERRORS) -# ifndef _STLP_STDEXCEPT -# include -# endif -_STLP_BEGIN_NAMESPACE -void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg); -void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg); -_STLP_END_NAMESPACE -#else - -#if defined(_STLP_THROW_RANGE_ERRORS) -# ifndef _STLP_STDEXCEPT -# include -# endif -# ifndef _STLP_STRING -# include -# endif -# define _STLP_THROW_MSG(ex,msg) throw ex(string(msg)) -#else -# if defined (_STLP_WINCE) -# define _STLP_THROW_MSG(ex,msg) TerminateProcess(GetCurrentProcess(), 0) -# else -# include -# include -# ifdef _STLP_USE_TRAP_LEAVE -# define _STLP_THROW_MSG(ex,msg) { STDEX_REPORT_EXCEPTION(msg) ; User::Leave(STDEX_##ex); } -# include -# else -# define _STLP_THROW_MSG(ex,msg) puts(msg),_STLP_ABORT() -# endif -# endif -#endif - -// For wrapper mode and throwing range errors, include the -// stdexcept header and throw the appropriate exceptions directly. - -_STLP_BEGIN_NAMESPACE -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg) { - _STLP_THROW_MSG(range_error, __msg); -} - -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg) { - _STLP_THROW_MSG(out_of_range, __msg); -} - -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg) { - _STLP_THROW_MSG(length_error, __msg); -} - -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg) { - _STLP_THROW_MSG(invalid_argument, __msg); -} - -inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg) { - _STLP_THROW_MSG(overflow_error, __msg); -} -_STLP_END_NAMESPACE - -# undef _STLP_THROW_MSG - -# endif /* EXTERN_RANGE_ERRORS */ - - -#endif /* _STLP_RANGE_ERRORS_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_raw_storage_iter.h --- a/epoc32/include/stdapis/stlport/stl/_raw_storage_iter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H -#define _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -class raw_storage_iterator -# if defined (_STLP_HAS_VOID_SPECIALIZATION) || defined (__SYMBIAN32__) - : public iterator -# endif -{ -protected: - _ForwardIterator _M_iter; -public: - typedef output_iterator_tag iterator_category; -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; -# endif - explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {} - raw_storage_iterator<_ForwardIterator, _Tp>& operator*() { return *this; } - raw_storage_iterator<_ForwardIterator, _Tp>& operator=(const _Tp& __element) { - _Construct(&*_M_iter, __element); - return *this; - } - raw_storage_iterator<_ForwardIterator, _Tp>& operator++() { - ++_M_iter; - return *this; - } - raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) { - raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; - ++_M_iter; - return __tmp; - } -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template -inline output_iterator_tag iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); } -#endif -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_rope.c --- a/epoc32/include/stdapis/stlport/stl/_rope.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1545 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf -// if necessary. Assumes path_end[leaf_index] and leaf_pos are correct. -// Results in a valid buf_ptr if the iterator can be legitimately -// dereferenced. -# ifndef _STLP_ROPEIMPL_H -# define _STLP_ROPEIMPL_H - -#ifndef _STLP_INTERNAL_ROPE_H -# include -#endif - -# ifndef _STLP_CSTDIO -# include -# endif - -#ifndef _STLP_IOSTREAM -# include -#endif - -# include - -_STLP_BEGIN_NAMESPACE - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -# define __allocator__ _Alloc -# else -# define __allocator__ allocator_type -# endif - -template -_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos) - : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr._M_data, __pos), - _M_root_rope(__r) { _RopeRep::_S_ref(this->_M_root); } - -template -_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos): - _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos), - _M_root_rope(&__r) { - _RopeRep::_S_ref(this->_M_root); if (!(__r.empty()))_S_setcache(*this); -} - -template -void -_Rope_RopeRep<_CharT, _Alloc>::_M_free_c_string() -{ - _CharT* __cstr = _M_c_string; - if (0 != __cstr) { - size_t _p_size = _M_size._M_data + 1; - _STLP_STD::_Destroy(__cstr, __cstr + _p_size); - _M_size.deallocate(__cstr, _p_size); - } -} - - -// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf -// if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct. -// Results in a valid buf_ptr if the iterator can be legitimately -// dereferenced. -template -void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf( - _Rope_iterator_base<_CharT,_Alloc>& __x) -{ - const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index]; - size_t __leaf_pos = __x._M_leaf_pos; - size_t __pos = __x._M_current_pos; - - switch(__leaf->_M_tag) { - case _RopeRep::_S_leaf: - __x._M_buf_start = - ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data; - __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos); - __x._M_buf_end = __x._M_buf_start + __leaf->_M_size._M_data; - break; - case _RopeRep::_S_function: - case _RopeRep::_S_substringfn: - { - size_t __len = _S_iterator_buf_len; - size_t __buf_start_pos = __leaf_pos; - size_t __leaf_end = __leaf_pos + __leaf->_M_size._M_data; - char_producer<_CharT>* __fn = - ((_Rope_RopeFunction<_CharT,_Alloc>*)__leaf)->_M_fn; - - if (__buf_start_pos + __len <= __pos) { - __buf_start_pos = __pos - __len/4; - if (__buf_start_pos + __len > __leaf_end) { - __buf_start_pos = __leaf_end - __len; - } - } - if (__buf_start_pos + __len > __leaf_end) { - __len = __leaf_end - __buf_start_pos; - } - (*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf); - __x._M_buf_ptr = __x._M_tmp_buf + (__pos - __buf_start_pos); - __x._M_buf_start = __x._M_tmp_buf; - __x._M_buf_end = __x._M_tmp_buf + __len; - } - break; - default: - _STLP_ASSERT(0) - ; - } -} - -// Set path and buffer inside a rope iterator. We assume that -// pos and root are already set. -template -void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache -(_Rope_iterator_base<_CharT,_Alloc>& __x) -{ - const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1]; - const _RopeRep* __curr_rope; - int __curr_depth = -1; /* index into path */ - size_t __curr_start_pos = 0; - size_t __pos = __x._M_current_pos; - unsigned char __dirns = 0; // Bit vector marking right turns in the path - - _STLP_ASSERT(__pos <= __x._M_root->_M_size._M_data) - if (__pos >= __x._M_root->_M_size._M_data) { - __x._M_buf_ptr = 0; - return; - } - __curr_rope = __x._M_root; - if (0 != __curr_rope->_M_c_string) { - /* Treat the root as a leaf. */ - __x._M_buf_start = __curr_rope->_M_c_string; - __x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size._M_data; - __x._M_buf_ptr = __curr_rope->_M_c_string + __pos; - __x._M_path_end[0] = __curr_rope; - __x._M_leaf_index = 0; - __x._M_leaf_pos = 0; - return; - } - for(;;) { - ++__curr_depth; - _STLP_ASSERT(__curr_depth <= _RopeRep::_S_max_rope_depth) - __path[__curr_depth] = __curr_rope; - switch(__curr_rope->_M_tag) { - case _RopeRep::_S_leaf: - case _RopeRep::_S_function: - case _RopeRep::_S_substringfn: - __x._M_leaf_pos = __curr_start_pos; - goto done; - case _RopeRep::_S_concat: - { - _Rope_RopeConcatenation<_CharT,_Alloc>* __c = - (_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope; - _RopeRep* __left = __c->_M_left; - size_t __left_len = __left->_M_size._M_data; - - __dirns <<= 1; - if (__pos >= __curr_start_pos + __left_len) { - __dirns |= 1; - __curr_rope = __c->_M_right; - __curr_start_pos += __left_len; - } else { - __curr_rope = __left; - } - } - break; - } - } - done: - // Copy last section of path into _M_path_end. - { - int __i = -1; - int __j = __curr_depth + 1 - _S_path_cache_len; - - if (__j < 0) __j = 0; - while (__j <= __curr_depth) { - __x._M_path_end[++__i] = __path[__j++]; - } - __x._M_leaf_index = __i; - } - __x._M_path_directions = __dirns; - _S_setbuf(__x); -} - -// Specialized version of the above. Assumes that -// the path cache is valid for the previous position. -template -void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr -(_Rope_iterator_base<_CharT,_Alloc>& __x) -{ - int __current_index = __x._M_leaf_index; - const _RopeRep* __current_node = __x._M_path_end[__current_index]; - size_t __len = __current_node->_M_size._M_data; - size_t __node_start_pos = __x._M_leaf_pos; - unsigned char __dirns = __x._M_path_directions; - _Rope_RopeConcatenation<_CharT,_Alloc>* __c; - - _STLP_ASSERT(__x._M_current_pos <= __x._M_root->_M_size._M_data) - if (__x._M_current_pos - __node_start_pos < __len) { - /* More stuff in this leaf, we just didn't cache it. */ - _S_setbuf(__x); - return; - } - _STLP_ASSERT(__node_start_pos + __len == __x._M_current_pos) - // node_start_pos is starting position of last_node. - while (--__current_index >= 0) { - if (!(__dirns & 1) /* Path turned left */) - break; - __current_node = __x._M_path_end[__current_index]; - __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node; - // Otherwise we were in the right child. Thus we should pop - // the concatenation node. - __node_start_pos -= __c->_M_left->_M_size._M_data; - __dirns >>= 1; - } - if (__current_index < 0) { - // We underflowed the cache. Punt. - _S_setcache(__x); - return; - } - __current_node = __x._M_path_end[__current_index]; - __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node; - // current_node is a concatenation node. We are positioned on the first - // character in its right child. - // node_start_pos is starting position of current_node. - __node_start_pos += __c->_M_left->_M_size._M_data; - __current_node = __c->_M_right; - __x._M_path_end[++__current_index] = __current_node; - __dirns |= 1; - while (_RopeRep::_S_concat == __current_node->_M_tag) { - ++__current_index; - if (_S_path_cache_len == __current_index) { - int __i; - for (__i = 0; __i < _S_path_cache_len-1; __i++) { - __x._M_path_end[__i] = __x._M_path_end[__i+1]; - } - --__current_index; - } - __current_node = - ((_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node)->_M_left; - __x._M_path_end[__current_index] = __current_node; - __dirns <<= 1; - // node_start_pos is unchanged. - } - __x._M_leaf_index = __current_index; - __x._M_leaf_pos = __node_start_pos; - __x._M_path_directions = __dirns; - _S_setbuf(__x); -} - -template -void _Rope_iterator_base<_CharT,_Alloc>::_M_incr(size_t __n) { - _M_current_pos += __n; - if (0 != _M_buf_ptr) { - size_t __chars_left = _M_buf_end - _M_buf_ptr; - if (__chars_left > __n) { - _M_buf_ptr += __n; - } else if (__chars_left == __n) { - _M_buf_ptr += __n; - _S_setcache_for_incr(*this); - } else { - _M_buf_ptr = 0; - } - } -} - -template -void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) { - if (0 != _M_buf_ptr) { - size_t __chars_left = _M_buf_ptr - _M_buf_start; - if (__chars_left >= __n) { - _M_buf_ptr -= __n; - } else { - _M_buf_ptr = 0; - } - } - _M_current_pos -= __n; -} - -template -void _Rope_iterator<_CharT,_Alloc>::_M_check() { - if (_M_root_rope->_M_tree_ptr._M_data != this->_M_root) { - // _Rope was modified. Get things fixed up. - _RopeRep::_S_unref(this->_M_root); - this->_M_root = _M_root_rope->_M_tree_ptr._M_data; - _RopeRep::_S_ref(this->_M_root); - this->_M_buf_ptr = 0; - } -} - -# ifndef _GC -// There are several reasons for not doing this with virtual destructors -// and a class specific delete operator: -// - A class specific delete operator can't easily get access to -// allocator instances if we need them. -// - Any virtual function would need a 4 or byte vtable pointer; -// this only requires a one byte tag per object. -template -void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree() -{ - switch(_M_tag) { - case _S_leaf: - { - typedef _Rope_RopeLeaf<_CharT,_Alloc> _Rope_RopeLeaf_T; - _Rope_RopeLeaf_T* __l = (_Rope_RopeLeaf_T*)this; - _STLP_STD::_Destroy(__l); // ->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf(); - _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, _Rope_RopeLeaf_T).deallocate(__l, 1); - break; - } - case _S_concat: - { - typedef _Rope_RopeConcatenation<_CharT,_Alloc> _Rope_RopeConcatenation_T; - _Rope_RopeConcatenation_T* __c = (_Rope_RopeConcatenation_T*)this; - _STLP_STD::_Destroy(__c); - _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, - _Rope_RopeConcatenation_T).deallocate(__c, 1); - break; - } - case _S_function: - { - typedef _Rope_RopeFunction<_CharT,_Alloc> _Rope_RopeFunctionT; - _Rope_RopeFunctionT* __f = (_Rope_RopeFunctionT*)this; - _STLP_STD::_Destroy(__f); - _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, - _Rope_RopeFunctionT).deallocate(__f, 1); - break; - } - case _S_substringfn: - { - typedef _Rope_RopeSubstring<_CharT,_Alloc> _Rope_RopeSubstring_T; - _Rope_RopeSubstring_T* __ss = (_Rope_RopeSubstring_T*)this; - _STLP_STD::_Destroy(__ss); - _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, - _Rope_RopeSubstring_T).deallocate(__ss, 1); - break; - } - } -} -#endif - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -# define __RopeLeaf__ _Rope_RopeLeaf<_CharT,_Alloc> -# define __RopeRep__ _Rope_RopeRep<_CharT,_Alloc> -# define _RopeLeaf _Rope_RopeLeaf<_CharT,_Alloc> -# define _RopeRep _Rope_RopeRep<_CharT,_Alloc> -# define size_type size_t -# else -# define __RopeLeaf__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeLeaf -# define __RopeRep__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeRep -# endif - -// Concatenate a C string onto a leaf rope by copying the rope data. -// Used for short ropes. -template -__RopeLeaf__* -rope<_CharT,_Alloc>::_S_leaf_concat_char_iter - (_RopeLeaf* __r, const _CharT* __iter, size_t __len) -{ - size_t __old_len = __r->_M_size._M_data; - _CharT* __new_data = __r->_M_size.allocate(_S_rounded_up_size(__old_len + __len)); - _RopeLeaf* __result; - - uninitialized_copy_n(__r->_M_data, __old_len, __new_data); - uninitialized_copy_n(__iter, __len, __new_data + __old_len); - _S_cond_store_eos(__new_data[__old_len + __len]); - _STLP_TRY { - __result = _S_new_RopeLeaf(__new_data, __old_len + __len, - __r->get_allocator()); - } - _STLP_UNWIND(_RopeRep::_S_free_string(__new_data, __old_len + __len, - __r->get_allocator())); - return __result; -} - -#ifndef __GC -// As above, but it's OK to clobber original if refcount is 1 -template -__RopeLeaf__* -rope<_CharT,_Alloc>::_S_destr_leaf_concat_char_iter - (_RopeLeaf* __r, const _CharT* __iter, size_t __len) -{ - _STLP_ASSERT(__r->_M_ref_count >= 1) - if (__r->_M_ref_count > 1) - return _S_leaf_concat_char_iter(__r, __iter, __len); - size_t __old_len = __r->_M_size._M_data; - if (_S_allocated_capacity(__old_len) >= __old_len + __len) { - // The space has been partially initialized for the standard - // character types. But that doesn't matter for those types. - uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len); - if (_S_is_basic_char_type((_CharT*)0)) { - _S_cond_store_eos(__r->_M_data[__old_len + __len]); - _STLP_ASSERT(__r->_M_c_string == __r->_M_data) - } else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string) { - __r->_M_free_c_string(); - __r->_M_c_string = 0; - } - __r->_M_size._M_data = __old_len + __len; - _STLP_ASSERT(__r->_M_ref_count == 1) - __r->_M_ref_count = 2; - return __r; - } else { - _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len); - _STLP_ASSERT(__result->_M_ref_count == 1) - return __result; - } -} -#endif - -// Assumes left and right are not 0. -// Does not increment (nor decrement on exception) child reference counts. -// Result has ref count 1. -template -__RopeRep__* -rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right) -{ - _RopeConcatenation* __result = - _S_new_RopeConcatenation(__left, __right, __left->get_allocator()); - size_t __depth = __result->_M_depth; - - _STLP_ASSERT(__left->get_allocator() == __right->get_allocator()) - if (__depth > 20 && (__result->_M_size._M_data < 1000 || - __depth > _RopeRep::_S_max_rope_depth)) { - _RopeRep* __balanced; - - _STLP_TRY { - __balanced = _S_balance(__result); -# ifndef __GC - if (__result != __balanced) { - _STLP_ASSERT(1 == __result->_M_ref_count - && 1 == __balanced->_M_ref_count) - } -# endif - __result->_M_unref_nonnil(); - } - _STLP_UNWIND((_STLP_CREATE_ALLOCATOR(allocator_type,(allocator_type&)__left->_M_size, - _RopeConcatenation).deallocate(__result,1))); - // In case of exception, we need to deallocate - // otherwise dangling result node. But caller - // still owns its children. Thus unref is - // inappropriate. - return __balanced; - } else { - return __result; - } -} - -template -__RopeRep__* -rope<_CharT,_Alloc>::_S_concat_char_iter - (_RopeRep* __r, const _CharT*__s, size_t __slen) -{ - _RopeRep* __result; - if (0 == __slen) { - _S_ref(__r); - return __r; - } - if (0 == __r) - return _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, - /* __r->get_allocator()*/ allocator_type() ); - if (_RopeRep::_S_leaf == __r->_M_tag && - __r->_M_size._M_data + __slen <= _S_copy_max) { - __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); -# ifndef __GC - _STLP_ASSERT(1 == __result->_M_ref_count) -# endif - return __result; - } - if (_RopeRep::_S_concat == __r->_M_tag - && _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) { - _RopeLeaf* __right = - (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right); - if (__right->_M_size._M_data + __slen <= _S_copy_max) { - _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left; - _RopeRep* __nright = - _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen); - __left->_M_ref_nonnil(); - _STLP_TRY { - __result = _S_tree_concat(__left, __nright); - } - _STLP_UNWIND(_S_unref(__left); _S_unref(__nright)); -# ifndef __GC - _STLP_ASSERT(1 == __result->_M_ref_count) -# endif - return __result; - } - } - _RopeRep* __nright = - _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); - _STLP_TRY { - __r->_M_ref_nonnil(); - __result = _S_tree_concat(__r, __nright); - } - _STLP_UNWIND(_S_unref(__r); _S_unref(__nright)); -# ifndef __GC - _STLP_ASSERT(1 == __result->_M_ref_count) -# endif - return __result; -} - -#ifndef __GC -template -__RopeRep__* -rope<_CharT,_Alloc>::_S_destr_concat_char_iter( - _RopeRep* __r, const _CharT* __s, size_t __slen) -{ - _RopeRep* __result; - if (0 == __r) - return _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, - /* __r-> */allocator_type()); - size_t __count = __r->_M_ref_count; - size_t __orig_size = __r->_M_size._M_data; - _STLP_ASSERT(__count >= 1) - if (__count > 1) return _S_concat_char_iter(__r, __s, __slen); - if (0 == __slen) { - __r->_M_ref_count = 2; // One more than before - return __r; - } - if (__orig_size + __slen <= _S_copy_max && - _RopeRep::_S_leaf == __r->_M_tag) { - __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); - return __result; - } - if (_RopeRep::_S_concat == __r->_M_tag) { - _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right); - if (_RopeRep::_S_leaf == __right->_M_tag - && __right->_M_size._M_data + __slen <= _S_copy_max) { - _RopeRep* __new_right = - _S_destr_leaf_concat_char_iter(__right, __s, __slen); - if (__right == __new_right) { - _STLP_ASSERT(__new_right->_M_ref_count == 2) - __new_right->_M_ref_count = 1; - } else { - _STLP_ASSERT(__new_right->_M_ref_count >= 1) - __right->_M_unref_nonnil(); - } - _STLP_ASSERT(__r->_M_ref_count == 1) - __r->_M_ref_count = 2; // One more than before. - ((_RopeConcatenation*)__r)->_M_right = __new_right; - // E.Musser : moved below - // __r->_M_size._M_data = __orig_size + __slen; - if (0 != __r->_M_c_string) { - __r->_M_free_c_string(); - __r->_M_c_string = 0; - } - __r->_M_size._M_data = __orig_size + __slen; - return __r; - } - } - _RopeRep* __right = - _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); - __r->_M_ref_nonnil(); - _STLP_TRY { - __result = _S_tree_concat(__r, __right); - } - _STLP_UNWIND(_S_unref(__r); _S_unref(__right)) - _STLP_ASSERT(1 == __result->_M_ref_count) - return __result; -} -#endif /* !__GC */ - -template -__RopeRep__* -rope<_CharT,_Alloc>::_S_concat_rep(_RopeRep* __left, _RopeRep* __right) -{ - if (0 == __left) { - _S_ref(__right); - return __right; - } - if (0 == __right) { - __left->_M_ref_nonnil(); - return __left; - } - if (_RopeRep::_S_leaf == __right->_M_tag) { - if (_RopeRep::_S_leaf == __left->_M_tag) { - if (__right->_M_size._M_data + __left->_M_size._M_data <= _S_copy_max) { - return _S_leaf_concat_char_iter((_RopeLeaf*)__left, - ((_RopeLeaf*)__right)->_M_data, - __right->_M_size._M_data); - } - } else if (_RopeRep::_S_concat == __left->_M_tag - && _RopeRep::_S_leaf == - ((_RopeConcatenation*)__left)->_M_right->_M_tag) { - _RopeLeaf* __leftright = - (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); - if (__leftright->_M_size._M_data + __right->_M_size._M_data <= _S_copy_max) { - _RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left; - _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright, - ((_RopeLeaf*)__right)->_M_data, - __right->_M_size._M_data); - __leftleft->_M_ref_nonnil(); - _STLP_TRY { - return(_S_tree_concat(__leftleft, __rest)); - } - _STLP_UNWIND(_S_unref(__leftleft); _S_unref(__rest)) - } - } - } - __left->_M_ref_nonnil(); - __right->_M_ref_nonnil(); - _STLP_TRY { - return(_S_tree_concat(__left, __right)); - } - _STLP_UNWIND(_S_unref(__left); _S_unref(__right)); -#ifdef _STLP_THROW_RETURN_BUG - return 0; -#endif -} - -template -__RopeRep__* -rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base, - size_t __start, size_t __endp1) -{ - if (0 == __base) return 0; - size_t __len = __base->_M_size._M_data; - size_t __adj_endp1; - const size_t __lazy_threshold = 128; - - if (__endp1 >= __len) { - if (0 == __start) { - __base->_M_ref_nonnil(); - return __base; - } else { - __adj_endp1 = __len; - } - } else { - __adj_endp1 = __endp1; - } - switch(__base->_M_tag) { - case _RopeRep::_S_concat: - { - _RopeConcatenation* __c = (_RopeConcatenation*)__base; - _RopeRep* __left = __c->_M_left; - _RopeRep* __right = __c->_M_right; - size_t __left_len = __left->_M_size._M_data; - _RopeRep* __result; - - if (__adj_endp1 <= __left_len) { - return _S_substring(__left, __start, __endp1); - } else if (__start >= __left_len) { - return _S_substring(__right, __start - __left_len, - __adj_endp1 - __left_len); - } - _Self_destruct_ptr __left_result( - _S_substring(__left, __start, __left_len)); - _Self_destruct_ptr __right_result( - _S_substring(__right, 0, __endp1 - __left_len)); - _STLP_MPWFIX_TRY //*TY 06/01/2000 - mpw forgets to call dtor on __left_result and __right_result without this try block - __result = _S_concat_rep(__left_result, __right_result); -# ifndef __GC - _STLP_ASSERT(1 == __result->_M_ref_count) -# endif - return __result; - _STLP_MPWFIX_CATCH //*TY 06/01/2000 - - } - case _RopeRep::_S_leaf: - { - _RopeLeaf* __l = (_RopeLeaf*)__base; - _RopeLeaf* __result; - size_t __result_len; - if (__start >= __adj_endp1) return 0; - __result_len = __adj_endp1 - __start; - if (__result_len > __lazy_threshold) goto lazy; -# ifdef __GC - const _CharT* __section = __l->_M_data + __start; - __result = _S_new_RopeLeaf(__section, __result_len, - __base->get_allocator()); - __result->_M_c_string = 0; // Not eos terminated. -# else - // We should sometimes create substring node instead. - __result = _STLP_ROPE_FROM_UNOWNED_CHAR_PTR( - __l->_M_data + __start, __result_len, - __base->get_allocator()); -# endif - return __result; - } - case _RopeRep::_S_substringfn: - // Avoid introducing multiple layers of substring nodes. - { - _RopeSubstring* __old = (_RopeSubstring*)__base; - size_t __result_len; - if (__start >= __adj_endp1) return 0; - __result_len = __adj_endp1 - __start; - if (__result_len > __lazy_threshold) { - _RopeSubstring* __result = - _S_new_RopeSubstring(__old->_M_base, - __start + __old->_M_start, - __adj_endp1 - __start, - __base->get_allocator()); - return __result; - - } // *** else fall through: *** - } - case _RopeRep::_S_function: - { - _RopeFunction* __f = (_RopeFunction*)__base; - if (__start >= __adj_endp1) return 0; - size_t __result_len = __adj_endp1 - __start; - - if (__result_len > __lazy_threshold) goto lazy; - _CharT* __section = __base->_M_size.allocate(_S_rounded_up_size(__result_len)); - _STLP_TRY { - (*(__f->_M_fn))(__start, __result_len, __section); - } - _STLP_UNWIND(_RopeRep::_S_free_string( - __section, __result_len, __base->get_allocator())); - _S_cond_store_eos(__section[__result_len]); - return _S_new_RopeLeaf(__section, __result_len, - __base->get_allocator()); - } - } - /*NOTREACHED*/ - _STLP_ASSERT(false) - lazy: - { - // Create substring node. - return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start, - __base->get_allocator()); - } -} - -template -class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> { - private: - _CharT* _M_buf_ptr; - public: - // _CharT* _M_buffer; // XXX not used - - _Rope_flatten_char_consumer(_CharT* __buffer) { - _M_buf_ptr = __buffer; - }; - ~_Rope_flatten_char_consumer() {} - bool operator() (const _CharT* __leaf, size_t __n) { - uninitialized_copy_n(__leaf, __n, _M_buf_ptr); - _M_buf_ptr += __n; - return true; - } -}; - -template -class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> { - private: - _CharT _M_pattern; - public: - size_t _M_count; // Number of nonmatching characters - _Rope_find_char_char_consumer(_CharT __p) - : _M_pattern(__p), _M_count(0) {} - ~_Rope_find_char_char_consumer() {} - bool operator() (const _CharT* __leaf, size_t __n) { - size_t __i; - for (__i = 0; __i < __n; __i++) { - if (__leaf[__i] == _M_pattern) { - _M_count += __i; return false; - } - } - _M_count += __n; return true; - } -}; - -#if !defined (_STLP_USE_NO_IOSTREAMS) -#if defined (_STLP_USE_NEW_IOSTREAMS) - template - // Here _CharT is both the stream and rope character type. -#else - template - // Here _CharT is the rope character type. Unlike in the - // above case, we somewhat handle the case in which it doesn't - // match the stream character type, i.e. char. -#endif -class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> { - private: -# if defined (_STLP_USE_NEW_IOSTREAMS) - typedef basic_ostream<_CharT,_Traits> _Insert_ostream; -# else - typedef ostream _Insert_ostream; -# endif - _Insert_ostream& _M_o; - public: - // _CharT* buffer; // XXX not used - _Rope_insert_char_consumer(_Insert_ostream& __writer) - : _M_o(__writer) {}; -#if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) //*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable - ~_Rope_insert_char_consumer(); //*TY 05/23/2000 - -#else //*TY 05/23/2000 - - ~_Rope_insert_char_consumer() {} -#endif //*TY 05/23/2000 - - // Caller is presumed to own the ostream - bool operator() (const _CharT* __leaf, size_t __n); - // Returns true to continue traversal. -}; - -# if defined ( _STLP_USE_NEW_IOSTREAMS ) -# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) //*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable - template - _Rope_insert_char_consumer<_CharT, _Traits>:: ~_Rope_insert_char_consumer() {} -# endif //*TY 05/23/2000 - - - template - bool _Rope_insert_char_consumer<_CharT, _Traits>::operator() - (const _CharT* __leaf, size_t __n) -{ - size_t __i; - // We assume that formatting is set up correctly for each element. - for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]); - return true; -} -# else -# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) //*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable - template - _Rope_insert_char_consumer<_CharT>:: ~_Rope_insert_char_consumer() {} -# endif //*TY 05/23/2000 - - - template - bool _Rope_insert_char_consumer<_CharT>::operator() - (const _CharT* __leaf, size_t __n) - { - size_t __i; - // We assume that formatting is set up correctly for each element. - for (__i = 0; __i < __n; __i++) _M_o << __leaf[__i]; - return true; - } - -# if !defined (_STLP_NO_METHOD_SPECIALIZATION) -_STLP_TEMPLATE_NULL -inline bool -_Rope_insert_char_consumer::operator() - (const char* __leaf, size_t __n) -{ - size_t __i; - for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]); - return true; -} - -#endif /* _STLP_METHOD_SPECIALIZATION */ -#endif /* _STLP_USE_NEW_IOSTREAM */ -#endif /* if !defined (_STLP_USE_NO_IOSTREAMS) */ - -template -bool rope<_CharT, _Alloc>::_S_apply_to_pieces( - _Rope_char_consumer<_CharT>& __c, - const _RopeRep* __r, - size_t __begin, size_t __end) -{ - if (0 == __r) return true; - switch(__r->_M_tag) { - case _RopeRep::_S_concat: - { - _RopeConcatenation* __conc = (_RopeConcatenation*)__r; - _RopeRep* __left = __conc->_M_left; - size_t __left_len = __left->_M_size._M_data; - if (__begin < __left_len) { - size_t __left_end = (min) (__left_len, __end); - if (!_S_apply_to_pieces(__c, __left, __begin, __left_end)) - return false; - } - if (__end > __left_len) { - _RopeRep* __right = __conc->_M_right; - size_t __right_start = (max)(__left_len, __begin); - if (!_S_apply_to_pieces(__c, __right, - __right_start - __left_len, - __end - __left_len)) { - return false; - } - } - } - return true; - case _RopeRep::_S_leaf: - { - _RopeLeaf* __l = (_RopeLeaf*)__r; - return __c.operator()(__l->_M_data + __begin, __end - __begin); - } - case _RopeRep::_S_function: - case _RopeRep::_S_substringfn: - { - _RopeFunction* __f = (_RopeFunction*)__r; - size_t __len = __end - __begin; -#ifdef __SYMBIAN32__ - bool __result = false; -#else - bool __result; -#endif - _CharT* __buffer = - (_CharT*)__sgi_alloc::allocate(__len * sizeof(_CharT)); - _STLP_TRY { - (*(__f->_M_fn))(__begin, __len, __buffer); - __result = __c.operator()(__buffer, __len); - __sgi_alloc::deallocate(__buffer, __len * sizeof(_CharT)); - } - _STLP_UNWIND((__sgi_alloc::deallocate(__buffer, - __len * sizeof(_CharT)))) - return __result; - } - default: - _STLP_ASSERT(false) - /*NOTREACHED*/ - return false; - } -} - -template inline bool _Rope_is_simple(_CharT*) { return false; } -inline bool _Rope_is_simple(char*) { return true; } -# ifdef _STLP_HAS_WCHAR_T -inline bool _Rope_is_simple(wchar_t*) { return true; } -# endif - -#if !defined (_STLP_USE_NO_IOSTREAMS) -#if defined (_STLP_USE_NEW_IOSTREAMS) - template - inline void _Rope_fill(basic_ostream<_CharT, _Traits>& __o, size_t __n) -#else -inline void _Rope_fill(ostream& __o, size_t __n) -#endif -{ - char __f = __o.fill(); - size_t __i; - - for (__i = 0; __i < __n; __i++) __o.put(__f); -} - -#if defined (_STLP_USE_NEW_IOSTREAMS) - template - basic_ostream<_CharT, _Traits>& operator<< - (basic_ostream<_CharT, _Traits>& __o, - const rope<_CharT, _Alloc>& __r) -# else -template -ostream& operator<< (ostream& __o, const rope<_CharT, _Alloc>& __r) -#endif -{ - size_t __w = __o.width(); - bool __left = bool(__o.flags() & ios::left); - size_t __pad_len; - size_t __rope_len = __r.size(); -# if defined (_STLP_USE_NEW_IOSTREAMS) - _Rope_insert_char_consumer<_CharT, _Traits> __c(__o); -# else - _Rope_insert_char_consumer<_CharT> __c(__o); -# endif - bool __is_simple = _Rope_is_simple((_CharT*)0); - - if (__rope_len < __w) { - __pad_len = __w - __rope_len; - } else { - __pad_len = 0; - } - if (!__is_simple) __o.width(__w/__rope_len); - _STLP_TRY { - if (__is_simple && !__left && __pad_len > 0) { - _Rope_fill(__o, __pad_len); - } - __r.apply_to_pieces(0, __r.size(), __c); - if (__is_simple && __left && __pad_len > 0) { - _Rope_fill(__o, __pad_len); - } - if (!__is_simple) - __o.width(__w); - } - _STLP_UNWIND(if (!__is_simple) __o.width(__w)) - return __o; -} - -#endif /* NO_IOSTREAMS */ - -template -_CharT* -rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, - size_t __start, size_t __len, - _CharT* __buffer) -{ - _Rope_flatten_char_consumer<_CharT> __c(__buffer); - _S_apply_to_pieces(__c, __r, __start, __start + __len); - return(__buffer + __len); -} - -template -size_t -rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const -{ - _Rope_find_char_char_consumer<_CharT> __c(__pattern); - _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __start, size()); - size_type __result_pos = __start + __c._M_count; -# ifndef _STLP_OLD_ROPE_SEMANTICS - if (__result_pos == size()) __result_pos = npos; -# endif - return __result_pos; -} - -template -_CharT* -rope<_CharT,_Alloc>::_S_flatten(_Rope_RopeRep<_CharT, _Alloc>* __r, _CharT* __buffer) -{ - if (0 == __r) return __buffer; - switch(__r->_M_tag) { - case _RopeRep::_S_concat: - { - _RopeConcatenation* __c = (_RopeConcatenation*)__r; - _RopeRep* __left = __c->_M_left; - _RopeRep* __right = __c->_M_right; - _CharT* __rest = _S_flatten(__left, __buffer); - return _S_flatten(__right, __rest); - } - case _RopeRep::_S_leaf: - { - _RopeLeaf* __l = (_RopeLeaf*)__r; - return copy_n(__l->_M_data, __l->_M_size._M_data, __buffer).second; - } - case _RopeRep::_S_function: - case _RopeRep::_S_substringfn: - // We dont yet do anything with substring nodes. - // This needs to be fixed before ropefiles will work well. - { - _RopeFunction* __f = (_RopeFunction*)__r; - (*(__f->_M_fn))(0, __f->_M_size._M_data, __buffer); - return __buffer + __f->_M_size._M_data; - } - default: - _STLP_ASSERT(false) - /*NOTREACHED*/ - return 0; - } -} - - -// This needs work for _CharT != char -template -void -rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent) -{ - for (int __i = 0; __i < __indent; __i++) putchar(' '); - if (0 == __r) { - printf("NULL\n"); return; - } - if (_RopeRep::_S_concat == __r->_M_tag) { - _RopeConcatenation* __c = (_RopeConcatenation*)__r; - _RopeRep* __left = __c->_M_left; - _RopeRep* __right = __c->_M_right; - -# ifdef __GC - printf("Concatenation %p (depth = %d, len = %ld, %s balanced)\n", - __r, __r->_M_depth, __r->_M_size._M_data, __r->_M_is_balanced? "" : "not"); -# else - printf("Concatenation %p (rc = %ld, depth = %d, " - "len = %ld, %s balanced)\n", - __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data, - __r->_M_is_balanced? "" : "not"); -# endif - _S_dump(__left, __indent + 2); - _S_dump(__right, __indent + 2); - return; - } else { - const char* __kind; - - switch (__r->_M_tag) { - case _RopeRep::_S_leaf: - __kind = "Leaf"; - break; - case _RopeRep::_S_function: - __kind = "Function"; - break; - case _RopeRep::_S_substringfn: - __kind = "Function representing substring"; - break; - default: - __kind = "(corrupted kind field!)"; - } -# ifdef __GC - printf("%s %p (depth = %d, len = %ld) ", - __kind, __r, __r->_M_depth, __r->_M_size._M_data); -# else - printf("%s %p (rc = %ld, depth = %d, len = %ld) ", - __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data); -# endif - if (_S_is_one_byte_char_type((_CharT*)0)) { - const int __max_len = 40; - _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len)); - _CharT __buffer[__max_len + 1]; - bool __too_big = __r->_M_size._M_data > __prefix->_M_size._M_data; - - _S_flatten(__prefix, __buffer); - __buffer[__prefix->_M_size._M_data] = _S_eos((_CharT*)0); - printf("%s%s\n", - (char*)__buffer, __too_big? "...\n" : "\n"); - } else { - printf("\n"); - } - } -} - -# define __ROPE_TABLE_BODY = { \ -/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, \ -/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, \ -/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, \ -/* 18 */6765ul, /* 19 */10946ul, /* 20 */17711ul, /* 21 */28657ul, /* 22 */46368ul, \ -/* 23 */75025ul, /* 24 */121393ul, /* 25 */196418ul, /* 26 */317811ul, \ -/* 27 */514229ul, /* 28 */832040ul, /* 29 */1346269ul, /* 30 */2178309ul, \ -/* 31 */3524578ul, /* 32 */5702887ul, /* 33 */9227465ul, /* 34 */14930352ul, \ -/* 35 */24157817ul, /* 36 */39088169ul, /* 37 */63245986ul, /* 38 */102334155ul, \ -/* 39 */165580141ul, /* 40 */267914296ul, /* 41 */433494437ul, \ -/* 42 */701408733ul, /* 43 */1134903170ul, /* 44 */1836311903ul, \ -/* 45 */2971215073ul } - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -template -const unsigned long -rope<_CharT,_Alloc>::_S_min_len[__ROPE_DEPTH_SIZE] __ROPE_TABLE_BODY ; -# else -__DECLARE_INSTANCE(const unsigned long, - crope::_S_min_len[__ROPE_DEPTH_SIZE], - __ROPE_TABLE_BODY); -# ifndef _STLP_NO_WCHAR_T -__DECLARE_INSTANCE(const unsigned long, - wrope::_S_min_len[__ROPE_DEPTH_SIZE], - __ROPE_TABLE_BODY); -# endif -# endif -# undef __ROPE_DEPTH_SIZE -# undef __ROPE_MAX_DEPTH -# undef __ROPE_TABLE_BODY - -// These are Fibonacci numbers < 2**32. - -template -__RopeRep__* -rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) -{ - _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1]; - _RopeRep* __result = 0; - int __i; - // Invariant: - // The concatenation of forest in descending order is equal to __r. - // __forest[__i]._M_size._M_data >= _S_min_len[__i] - // __forest[__i]._M_depth = __i - // References from forest are included in refcount. - - for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) - __forest[__i] = 0; - _STLP_TRY { - _S_add_to_forest(__r, __forest); - for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) - if (0 != __forest[__i]) { -# ifndef __GC - _Self_destruct_ptr __old(__result); -# endif - __result = _S_concat_rep(__forest[__i], __result); - __forest[__i]->_M_unref_nonnil(); -# if !defined(__GC) && defined(_STLP_USE_EXCEPTIONS) - __forest[__i] = 0; -# endif - } - } - _STLP_UNWIND(for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++) - _S_unref(__forest[__i])) - if (__result->_M_depth > _RopeRep::_S_max_rope_depth) { - __stl_throw_range_error("rope too long"); - } - return(__result); -} - - -template -void -rope<_CharT,_Alloc>::_S_add_to_forest(_RopeRep* __r, _RopeRep** __forest) -{ - if (__r -> _M_is_balanced) { - _S_add_leaf_to_forest(__r, __forest); - return; - } - _STLP_ASSERT(__r->_M_tag == _RopeRep::_S_concat) - { - _RopeConcatenation* __c = (_RopeConcatenation*)__r; - - _S_add_to_forest(__c->_M_left, __forest); - _S_add_to_forest(__c->_M_right, __forest); - } -} - - -template -void -rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest) -{ - _RopeRep* __insertee; // included in refcount - _RopeRep* __too_tiny = 0; // included in refcount - int __i; // forest[0..__i-1] is empty - size_t __s = __r->_M_size._M_data; - - for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) { - if (0 != __forest[__i]) { -# ifndef __GC - _Self_destruct_ptr __old(__too_tiny); -# endif - __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny); - __forest[__i]->_M_unref_nonnil(); - __forest[__i] = 0; - } - } - { -# ifndef __GC - _Self_destruct_ptr __old(__too_tiny); -# endif - __insertee = _S_concat_and_set_balanced(__too_tiny, __r); - } - // Too_tiny dead, and no longer included in refcount. - // Insertee is live and included. - _STLP_ASSERT(_S_is_almost_balanced(__insertee)) - _STLP_ASSERT(__insertee->_M_depth <= __r->_M_depth + 1) - for (;; ++__i) { - if (0 != __forest[__i]) { -# ifndef __GC - _Self_destruct_ptr __old(__insertee); -# endif - __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee); - __forest[__i]->_M_unref_nonnil(); - __forest[__i] = 0; - _STLP_ASSERT(_S_is_almost_balanced(__insertee)) - } - _STLP_ASSERT(_S_min_len[__i] <= __insertee->_M_size._M_data) - _STLP_ASSERT(__forest[__i] == 0) - if (__i == _RopeRep::_S_max_rope_depth || - __insertee->_M_size._M_data < _S_min_len[__i+1]) { - __forest[__i] = __insertee; - // refcount is OK since __insertee is now dead. - return; - } - } -} - -template -_CharT -rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i) -{ - __GC_CONST _CharT* __cstr = __r->_M_c_string; - - _STLP_ASSERT(__i < __r->_M_size._M_data) - if (0 != __cstr) return __cstr[__i]; - for(;;) { - switch(__r->_M_tag) { - case _RopeRep::_S_concat: - { - _RopeConcatenation* __c = (_RopeConcatenation*)__r; - _RopeRep* __left = __c->_M_left; - size_t __left_len = __left->_M_size._M_data; - - if (__i >= __left_len) { - __i -= __left_len; - __r = __c->_M_right; - } else { - __r = __left; - } - } - break; - case _RopeRep::_S_leaf: - { - _RopeLeaf* __l = (_RopeLeaf*)__r; - return __l->_M_data[__i]; - } - case _RopeRep::_S_function: - case _RopeRep::_S_substringfn: - { - _RopeFunction* __f = (_RopeFunction*)__r; - _CharT __result; - - (*(__f->_M_fn))(__i, 1, &__result); - return __result; - } - } - } -#if defined(_STLP_NEED_UNREACHABLE_RETURN) - return 0; -#endif -} - -# ifndef __GC -// Return a uniquely referenced character slot for the given -// position, or 0 if that's not possible. -template -_CharT* -rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i) -{ - _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth]; - size_t __csptr = 0; - - for(;;) { - if (__r->_M_ref_count > 1) return 0; - switch(__r->_M_tag) { - case _RopeRep::_S_concat: - { - _RopeConcatenation* __c = (_RopeConcatenation*)__r; - _RopeRep* __left = __c->_M_left; - size_t __left_len = __left->_M_size._M_data; - - if (__c->_M_c_string != 0) __clrstack[__csptr++] = __c; - if (__i >= __left_len) { - __i -= __left_len; - __r = __c->_M_right; - } else { - __r = __left; - } - } - break; - case _RopeRep::_S_leaf: - { - _RopeLeaf* __l = (_RopeLeaf*)__r; - if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0) - __clrstack[__csptr++] = __l; - while (__csptr > 0) { - -- __csptr; - _RopeRep* __d = __clrstack[__csptr]; - __d->_M_free_c_string(); - __d->_M_c_string = 0; - } - return __l->_M_data + __i; - } - case _RopeRep::_S_function: - case _RopeRep::_S_substringfn: - return 0; - } - } -#if defined(_STLP_NEED_UNREACHABLE_RETURN) - return 0; -#endif - -} -# endif /* __GC */ - -// The following could be implemented trivially using -// lexicographical_compare_3way. -// We do a little more work to avoid dealing with rope iterators for -// flat strings. -template -int -rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left, - const _RopeRep* __right) -{ - size_t __left_len; - size_t __right_len; - - if (0 == __right) return 0 != __left; - if (0 == __left) return -1; - __left_len = __left->_M_size._M_data; - __right_len = __right->_M_size._M_data; - if (_RopeRep::_S_leaf == __left->_M_tag) { - _RopeLeaf* __l = (_RopeLeaf*) __left; - if (_RopeRep::_S_leaf == __right->_M_tag) { - _RopeLeaf* __r = (_RopeLeaf*) __right; - return lexicographical_compare_3way( - __l->_M_data, __l->_M_data + __left_len, - __r->_M_data, __r->_M_data + __right_len); - } else { - const_iterator __rstart(__right, 0); - const_iterator __rend(__right, __right_len); - return lexicographical_compare_3way( - __l->_M_data, __l->_M_data + __left_len, - __rstart, __rend); - } - } else { - const_iterator __lstart(__left, 0); - const_iterator __lend(__left, __left_len); - if (_RopeRep::_S_leaf == __right->_M_tag) { - _RopeLeaf* __r = (_RopeLeaf*) __right; - return lexicographical_compare_3way( - __lstart, __lend, - __r->_M_data, __r->_M_data + __right_len); - } else { - const_iterator __rstart(__right, 0); - const_iterator __rend(__right, __right_len); - return lexicographical_compare_3way( - __lstart, __lend, - __rstart, __rend); - } - } -} - -// Assignment to reference proxies. -template -_Rope_char_ref_proxy<_CharT, _Alloc>& -_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c) { - _RopeRep* __old = _M_root->_M_tree_ptr._M_data; -# ifndef __GC - // First check for the case in which everything is uniquely - // referenced. In that case we can do this destructively. - _CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos); - if (0 != __ptr) { - *__ptr = __c; - return *this; - } -# endif - _Self_destruct_ptr __left( - _My_rope::_S_substring(__old, 0, _M_pos)); - _Self_destruct_ptr __right( - _My_rope::_S_substring(__old, _M_pos+1, __old->_M_size._M_data)); - _Self_destruct_ptr __result_left( - _My_rope::_S_destr_concat_char_iter(__left, &__c, 1)); - -# ifndef __GC - _STLP_ASSERT(__left == __result_left || 1 == __result_left->_M_ref_count) -# endif - _RopeRep* __result = - _My_rope::_S_concat_rep(__result_left, __right); -# ifndef __GC - _STLP_ASSERT(1 <= __result->_M_ref_count) - _RopeRep::_S_unref(__old); -# endif - _M_root->_M_tree_ptr._M_data = __result; - return *this; -} - -template -_Rope_char_ptr_proxy<_CharT, _Alloc> -_Rope_char_ref_proxy<_CharT, _Alloc>::operator& () const { - return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this); -} - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -template -_CharT rope<_CharT,_Alloc>::_S_empty_c_str[1] = { _CharT() }; -# else -__DECLARE_INSTANCE(char, crope::_S_empty_c_str[1], ={0}); -# ifdef _STLP_HAS_WCHAR_T -__DECLARE_INSTANCE(wchar_t, wrope::_S_empty_c_str[1], ={0}); -# endif /* _STLP_HAS_WCHAR_T */ -# endif /* _STLP_STATIC_TEMPLATE_DATA */ -// # endif - -template -const _CharT* rope<_CharT,_Alloc>::c_str() const { - if (0 == _M_tree_ptr._M_data) { - _S_empty_c_str[0] = _S_eos((_CharT*)0); // Possibly redundant, - // but probably fast. - return _S_empty_c_str; - } - __GC_CONST _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string; - if (0 != __old_c_string) return(__old_c_string); - size_t __s = size(); - _CharT* __result = _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).allocate(__s + 1); - _S_flatten(_M_tree_ptr._M_data, __result); - __result[__s] = _S_eos((_CharT*)0); -# ifdef __GC - _M_tree_ptr._M_data->_M_c_string = __result; -# else - if ((__old_c_string = (__GC_CONST _CharT*) - _Atomic_swap((__stl_atomic_t *)(&(_M_tree_ptr._M_data->_M_c_string)), - (__stl_atomic_t)__result)) != 0) { - // It must have been added in the interim. Hence it had to have been - // separately allocated. Deallocate the old copy, since we just - // replaced it. - _STLP_STD::_Destroy(__old_c_string, __old_c_string + __s + 1); - _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).deallocate(__old_c_string, __s + 1); - } -# endif - return(__result); -} - -template -const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() { - if (0 == _M_tree_ptr._M_data) { - _S_empty_c_str[0] = _S_eos((_CharT*)0); - return _S_empty_c_str; - } - __GC_CONST _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string; - if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && 0 != __old_c_string) { - return(__old_c_string); - } - size_t __s = size(); - _CharT* __result = _M_tree_ptr.allocate(_S_rounded_up_size(__s)); - _S_flatten(_M_tree_ptr._M_data, __result); - __result[__s] = _S_eos((_CharT*)0); - _M_tree_ptr._M_data->_M_unref_nonnil(); - _M_tree_ptr._M_data = _S_new_RopeLeaf(__result, __s, get_allocator()); - return(__result); -} - -// Algorithm specializations. More should be added. - -#ifndef _STLP_MSVC -// I couldn't get this to work with VC++ -template -void -_Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first, - _Rope_iterator<_CharT,_Alloc> __middle, - _Rope_iterator<_CharT,_Alloc> __last) -{ - _STLP_ASSERT(__first.container() == __middle.container() - && __middle.container() == __last.container()) - rope<_CharT,_Alloc>& __r(__first.container()); - rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index()); - rope<_CharT,_Alloc> __suffix = - __r.substr(__last.index(), __r.size() - __last.index()); - rope<_CharT,_Alloc> __part1 = - __r.substr(__middle.index(), __last.index() - __middle.index()); - rope<_CharT,_Alloc> __part2 = - __r.substr(__first.index(), __middle.index() - __first.index()); - __r = __prefix; - __r += __part1; - __r += __part2; - __r += __suffix; -} - - -# if 0 -// Probably not useful for several reasons: -// - for SGIs 7.1 compiler and probably some others, -// this forces lots of rope instantiations, creating a -// code bloat and compile time problem. (Fixed in 7.2.) -// - wchar_t is 4 bytes wide on most UNIX platforms, making it unattractive -// for unicode strings. Unsigned short may be a better character -// type. -inline void rotate( - _Rope_iterator __first, - _Rope_iterator __middle, - _Rope_iterator __last) { - _Rope_rotate(__first, __middle, __last); -} -# endif -#endif /* _STLP_MSVC */ - -# undef __RopeLeaf__ -# undef __RopeRep__ -# undef __RopeLeaf -# undef __RopeRep -# undef size_type - -_STLP_END_NAMESPACE - -# endif /* ROPEIMPL_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_rope.h --- a/epoc32/include/stdapis/stlport/stl/_rope.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,2518 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -// rope<_CharT,_Alloc> is a sequence of _CharT. -// Ropes appear to be mutable, but update operations -// really copy enough of the data structure to leave the original -// valid. Thus ropes can be logically copied by just copying -// a pointer value. - -#ifndef _STLP_INTERNAL_ROPE_H -# define _STLP_INTERNAL_ROPE_H - -# ifndef _STLP_INTERNAL_ALGOBASE_H -# include -# endif - -# ifndef _STLP_IOSFWD -# include -# endif - -# ifndef _STLP_INTERNAL_ALLOC_H -# include -# endif - -# ifndef _STLP_INTERNAL_ITERATOR_H -# include -# endif - -# ifndef _STLP_INTERNAL_ALGO_H -# include -# endif - -# ifndef _STLP_INTERNAL_FUNCTION_H -# include -# endif - -# ifndef _STLP_INTERNAL_NUMERIC_H -# include -# endif - -# ifndef _STLP_INTERNAL_HASH_FUN_H -# include -# endif - -# ifdef __GC -# define __GC_CONST const -# else -# include -# define __GC_CONST // constant except for deallocation -# endif -# ifdef _STLP_SGI_THREADS -# include -# endif - -#ifdef _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM -# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) (_Alloc_traits<_Tp,__atype>::create_allocator(__a)) -#elif defined(__MRC__)||defined(__SC__) -# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create<_Tp,__atype>(__a,(_Tp*)0) -#else -# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) -#endif - -_STLP_BEGIN_NAMESPACE - -// First a lot of forward declarations. The standard seems to require -// much stricter "declaration before use" than many of the implementations -// that preceded it. -template class rope; -template struct _Rope_RopeConcatenation; -template struct _Rope_RopeRep; -template struct _Rope_RopeLeaf; -template struct _Rope_RopeFunction; -template struct _Rope_RopeSubstring; -template class _Rope_iterator; -template class _Rope_const_iterator; -template class _Rope_char_ref_proxy; -template class _Rope_char_ptr_proxy; - -// Some helpers, so we can use power on ropes. -// See below for why this isn't local to the implementation. - -// This uses a nonstandard refcount convention. -// The result has refcount 0. -template -struct _Rope_Concat_fn - : public binary_function, rope<_CharT,_Alloc>, - rope<_CharT,_Alloc> > { - rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x, - const rope<_CharT,_Alloc>& __y) { - return __x + __y; - } -}; - -template -inline -rope<_CharT,_Alloc> -__identity_element(_Rope_Concat_fn<_CharT, _Alloc>) -{ - return rope<_CharT,_Alloc>(); -} - -// The _S_eos function is used for those functions that -// convert to/from C-like strings to detect the end of the string. - -// The end-of-C-string character. -// This is what the draft standard says it should be. -template -inline _CharT _S_eos(_CharT*) { return _CharT(); } - -// fbp : some compilers fail to zero-initialize builtins ;( -inline const char _S_eos(const char*) { return 0; } -# ifdef _STLP_HAS_WCHAR_T -inline const wchar_t _S_eos(const wchar_t*) { return 0; } -# endif - -// Test for basic character types. -// For basic character types leaves having a trailing eos. -template -inline bool _S_is_basic_char_type(_CharT*) { return false; } -template -inline bool _S_is_one_byte_char_type(_CharT*) { return false; } - -inline bool _S_is_basic_char_type(char*) { return true; } -inline bool _S_is_one_byte_char_type(char*) { return true; } -# ifdef _STLP_HAS_WCHAR_T -inline bool _S_is_basic_char_type(wchar_t*) { return true; } -# endif - -// Store an eos iff _CharT is a basic character type. -// Do not reference _S_eos if it isn't. -template -inline void _S_cond_store_eos(_CharT&) {} - -inline void _S_cond_store_eos(char& __c) { __c = 0; } -# ifdef _STLP_HAS_WCHAR_T -inline void _S_cond_store_eos(wchar_t& __c) { __c = 0; } -# endif - -// char_producers are logically functions that generate a section of -// a string. These can be convereted to ropes. The resulting rope -// invokes the char_producer on demand. This allows, for example, -// files to be viewed as ropes without reading the entire file. -template -class char_producer { -public: - virtual ~char_producer() {}; - virtual void operator()(size_t __start_pos, size_t __len, - _CharT* __buffer) = 0; - // Buffer should really be an arbitrary output iterator. - // That way we could flatten directly into an ostream, etc. - // This is thoroughly impossible, since iterator types don't - // have runtime descriptions. -}; - -// Sequence buffers: -// -// Sequence must provide an append operation that appends an -// array to the sequence. Sequence buffers are useful only if -// appending an entire array is cheaper than appending element by element. -// This is true for many string representations. -// This should perhaps inherit from ostream -// and be implemented correspondingly, so that they can be used -// for formatted. For the sake of portability, we don't do this yet. -// -// For now, sequence buffers behave as output iterators. But they also -// behave a little like basic_ostringstream and a -// little like containers. - -template -// The 3rd parameter works around a common compiler bug. -class sequence_buffer : public iterator { -public: -# ifndef __TYPEDEF_WORKAROUND - typedef typename _Sequence::value_type value_type; - typedef sequence_buffer<_Sequence -# if !(defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) || \ - defined ( _STLP_NO_DEFAULT_NON_TYPE_PARAM )) - , _Buf_sz - > _Self; -# else /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ - > _Self; - enum { _Buf_sz = 100}; -# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ - // # endif -# else /* __TYPEDEF_WORKAROUND */ - typedef _V value_type; - typedef sequence_buffer<_Sequence, _Buf_sz, _V> _Self; -# endif /* __TYPEDEF_WORKAROUND */ -protected: - _Sequence* _M_prefix; - value_type _M_buffer[_Buf_sz]; - size_t _M_buf_count; -public: - void flush() { - _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count); - _M_buf_count = 0; - } - ~sequence_buffer() { flush(); } - sequence_buffer() : _M_prefix(0), _M_buf_count(0) {} - sequence_buffer(const _Self& __x) { - _M_prefix = __x._M_prefix; - _M_buf_count = __x._M_buf_count; - copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer); - } - sequence_buffer(_Self& __x) { - __x.flush(); - _M_prefix = __x._M_prefix; - _M_buf_count = 0; - } - sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {} - _Self& operator= (_Self& __x) { - __x.flush(); - _M_prefix = __x._M_prefix; - _M_buf_count = 0; - return *this; - } - _Self& operator= (const _Self& __x) { - _M_prefix = __x._M_prefix; - _M_buf_count = __x._M_buf_count; - copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer); - return *this; - } - void push_back(value_type __x) - { - if (_M_buf_count < _Buf_sz) { - _M_buffer[_M_buf_count] = __x; - ++_M_buf_count; - } else { - flush(); - _M_buffer[0] = __x; - _M_buf_count = 1; - } - } - void append(value_type* __s, size_t __len) - { - if (__len + _M_buf_count <= _Buf_sz) { - size_t __i = _M_buf_count; - size_t __j = 0; - for (; __j < __len; __i++, __j++) { - _M_buffer[__i] = __s[__j]; - } - _M_buf_count += __len; - } else if (0 == _M_buf_count) { - _M_prefix->append(__s, __s + __len); - } else { - flush(); - append(__s, __len); - } - } - _Self& write(value_type* __s, size_t __len) - { - append(__s, __len); - return *this; - } - _Self& put(value_type __x) - { - push_back(__x); - return *this; - } - _Self& operator=(const value_type& __rhs) - { - push_back(__rhs); - return *this; - } - _Self& operator*() { return *this; } - _Self& operator++() { return *this; } - _Self& operator++(int) { return *this; } -}; - -// The following should be treated as private, at least for now. -template -class _Rope_char_consumer { -public: - // If we had member templates, these should not be virtual. - // For now we need to use run-time parametrization where - // compile-time would do. _Hence this should all be private - // for now. - // The symmetry with char_producer is accidental and temporary. - virtual ~_Rope_char_consumer() {}; - virtual bool operator()(const _CharT* __buffer, size_t __len) = 0; -}; - -// -// What follows should really be local to rope. Unfortunately, -// that doesn't work, since it makes it impossible to define generic -// equality on rope iterators. According to the draft standard, the -// template parameters for such an equality operator cannot be inferred -// from the occurence of a member class as a parameter. -// (SGI compilers in fact allow this, but the __result wouldn't be -// portable.) -// Similarly, some of the static member functions are member functions -// only to avoid polluting the global namespace, and to circumvent -// restrictions on type inference for template functions. -// - -// -// The internal data structure for representing a rope. This is -// private to the implementation. A rope is really just a pointer -// to one of these. -// -// A few basic functions for manipulating this data structure -// are members of _RopeRep. Most of the more complex algorithms -// are implemented as rope members. -// -// Some of the static member functions of _RopeRep have identically -// named functions in rope that simply invoke the _RopeRep versions. -// -// A macro to introduce various allocation and deallocation functions -// These need to be defined differently depending on whether or not -// we are using standard conforming allocators, and whether the allocator -// instances have real state. Thus this macro is invoked repeatedly -// with different definitions of __ROPE_DEFINE_ALLOC. - -#if defined (_STLP_MEMBER_TEMPLATE_CLASSES) -# define __ROPE_DEFINE_ALLOC(_Tp, __name, _M_proxy) \ - typedef typename \ - _Alloc_traits<_Tp,_Alloc>::allocator_type __name##Allocator; - -#define __ROPE_DEFINE_ALLOCS(__a, _M_proxy) \ - __ROPE_DEFINE_ALLOC(_CharT,_Data, _M_proxy) /* character data */ \ - typedef _Rope_RopeConcatenation<_CharT,__a> __C; \ - __ROPE_DEFINE_ALLOC(__C,_C, _M_proxy) \ - typedef _Rope_RopeLeaf<_CharT,__a> __L; \ - __ROPE_DEFINE_ALLOC(__L,_L, _M_proxy) \ - typedef _Rope_RopeFunction<_CharT,__a> __F; \ - __ROPE_DEFINE_ALLOC(__F,_F, _M_proxy) \ - typedef _Rope_RopeSubstring<_CharT,__a> __S; \ - __ROPE_DEFINE_ALLOC(__S,_S,_M_proxy) -#else -#define __ROPE_DEFINE_ALLOC(_Tp, __name, _M_proxy) -#define __ROPE_DEFINE_ALLOCS(__a, _M_proxy) -#endif - - -template -struct _Rope_RopeRep -# ifndef __GC - : public _Refcount_Base -# endif -{ - typedef _Rope_RopeRep<_CharT, _Alloc> _Self; -public: -# define __ROPE_MAX_DEPTH 45 -# define __ROPE_DEPTH_SIZE 46 - enum { _S_max_rope_depth = __ROPE_MAX_DEPTH }; - enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function}; - // Apparently needed by VC++ - // The data fields of leaves are allocated with some - // extra space, to accomodate future growth and for basic - // character types, to hold a trailing eos character. - enum { _S_alloc_granularity = 8 }; - - - _Tag _M_tag:8; - bool _M_is_balanced:8; - - _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) - typedef typename _Alloc_traits<_CharT,_Alloc>::allocator_type - allocator_type; - - allocator_type get_allocator() const { return allocator_type(_M_size); } - - unsigned char _M_depth; - __GC_CONST _CharT* _M_c_string; - _STLP_alloc_proxy _M_size; - -# ifdef _STLP_NO_ARROW_OPERATOR - _Rope_RopeRep() : _Refcount_Base(1), _M_size(allocator_type(), 0) {} -# endif - - /* Flattened version of string, if needed. */ - /* typically 0. */ - /* If it's not 0, then the memory is owned */ - /* by this node. */ - /* In the case of a leaf, this may point to */ - /* the same memory as the data field. */ - _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t _p_size, - allocator_type __a) : -# ifndef __GC - _Refcount_Base(1), -# endif - _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0), _M_size(__a, _p_size) - { } -# ifdef __GC - void _M_incr () {} -# endif - - // fbp : moved from RopeLeaf - static size_t _S_rounded_up_size(size_t __n) { - size_t __size_with_eos; - - if (_S_is_basic_char_type((_CharT*)0)) { - __size_with_eos = __n + 1; - } else { - __size_with_eos = __n; - } -# ifdef __GC - return __size_with_eos; -# else - // Allow slop for in-place expansion. - return (__size_with_eos + _S_alloc_granularity-1) - &~ (_S_alloc_granularity-1); -# endif - } - - static void _S_free_string(__GC_CONST _CharT* __s, size_t __len, - allocator_type __a) { - - if (!_S_is_basic_char_type((_CharT*)0)) { - _STLP_STD::_Destroy(__s, __s + __len); - } - // This has to be a static member, so this gets a bit messy -# ifdef _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM - __a.deallocate(__s, _S_rounded_up_size(__len)); //*ty 03/24/2001 - restored not to use __stl_alloc_rebind() since it is not defined under _STLP_MEMBER_TEMPLATE_CLASSES -# else - __stl_alloc_rebind (__a, (_CharT*)0).deallocate(__s, _S_rounded_up_size(__len)); -# endif - } - - // Deallocate data section of a leaf. - // This shouldn't be a member function. - // But its hard to do anything else at the - // moment, because it's templatized w.r.t. - // an allocator. - // Does nothing if __GC is defined. -# ifndef __GC - void _M_free_c_string(); - void _M_free_tree(); - // Deallocate t. Assumes t is not 0. - void _M_unref_nonnil() - { - _M_decr(); if (!_M_ref_count) _M_free_tree(); - } - void _M_ref_nonnil() - { - _M_incr(); - } - static void _S_unref(_Self* __t) - { - if (0 != __t) { - __t->_M_unref_nonnil(); - } - } - static void _S_ref(_Self* __t) - { - if (0 != __t) __t->_M_incr(); - } - static void _S_free_if_unref(_Self* __t) - { - if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree(); - } -# else /* __GC */ - void _M_unref_nonnil() {} - void _M_ref_nonnil() {} - static void _S_unref(_Self*) {} - static void _S_ref(_Self*) {} - static void _S_free_if_unref(_Self*) {} -# endif - - __ROPE_DEFINE_ALLOCS(_Alloc, _M_size) - }; - -template -struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> { -public: - __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */ - /* The allocated size is */ - /* _S_rounded_up_size(size), except */ - /* in the GC case, in which it */ - /* doesn't matter. */ - _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) - typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; - _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t _p_size, allocator_type __a) - : _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_leaf, 0, true, _p_size, __a), - _M_data(__d) - { - _STLP_ASSERT(_p_size > 0) - if (_S_is_basic_char_type((_CharT *)0)) { - // already eos terminated. - this->_M_c_string = __d; - } - } - -# ifdef _STLP_NO_ARROW_OPERATOR - _Rope_RopeLeaf() {} - _Rope_RopeLeaf(const _Rope_RopeLeaf<_CharT, _Alloc>& ) {} -# endif - -// The constructor assumes that d has been allocated with - // the proper allocator and the properly padded size. - // In contrast, the destructor deallocates the data: -# ifndef __GC - ~_Rope_RopeLeaf() { - if (_M_data != this->_M_c_string) { - this->_M_free_c_string(); - } - _Rope_RopeRep<_CharT,_Alloc>::_S_free_string(_M_data, this->_M_size._M_data, this->get_allocator()); - } -# endif -}; - -template -struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT,_Alloc> { -public: - _Rope_RopeRep<_CharT,_Alloc>* _M_left; - _Rope_RopeRep<_CharT,_Alloc>* _M_right; - _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) - typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; - _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l, - _Rope_RopeRep<_CharT,_Alloc>* __r, - allocator_type __a) - : _Rope_RopeRep<_CharT,_Alloc>( - _Rope_RopeRep<_CharT,_Alloc>::_S_concat, - (max)(__l->_M_depth, __r->_M_depth) + 1, false, - __l->_M_size._M_data + __r->_M_size._M_data, __a), _M_left(__l), _M_right(__r) - {} -# ifdef _STLP_NO_ARROW_OPERATOR - _Rope_RopeConcatenation() {} - _Rope_RopeConcatenation(const _Rope_RopeConcatenation<_CharT, _Alloc>&) {} -# endif - -# ifndef __GC - ~_Rope_RopeConcatenation() { - this->_M_free_c_string(); - _M_left->_M_unref_nonnil(); - _M_right->_M_unref_nonnil(); - } -# endif -}; - -template -struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT,_Alloc> { -public: - char_producer<_CharT>* _M_fn; -# ifndef __GC - bool _M_delete_when_done; // Char_producer is owned by the - // rope and should be explicitly - // deleted when the rope becomes - // inaccessible. -# else - // In the GC case, we either register the rope for - // finalization, or not. Thus the field is unnecessary; - // the information is stored in the collector data structures. - // We do need a finalization procedure to be invoked by the - // collector. - static void _S_fn_finalization_proc(void * __tree, void *) { - delete ((_Rope_RopeFunction *)__tree) -> _M_fn; - } -# endif - _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) - typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; -# ifdef _STLP_NO_ARROW_OPERATOR - _Rope_RopeFunction() {} - _Rope_RopeFunction(const _Rope_RopeFunction<_CharT, _Alloc>& ) {} -# endif - - _Rope_RopeFunction(char_producer<_CharT>* __f, size_t _p_size, - bool __d, allocator_type __a) - : - _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_function, 0, true, _p_size, __a), - _M_fn(__f) -# ifndef __GC - , _M_delete_when_done(__d) -# endif - { - _STLP_ASSERT(_p_size > 0) -# ifdef __GC - if (__d) { - GC_REGISTER_FINALIZER( - this, _Rope_RopeFunction::_S_fn_finalization_proc, 0, 0, 0); - } -# endif - } -# ifndef __GC - ~_Rope_RopeFunction() { - this->_M_free_c_string(); - if (_M_delete_when_done) { - delete _M_fn; - } - } -# endif -}; -// Substring results are usually represented using just -// concatenation nodes. But in the case of very long flat ropes -// or ropes with a functional representation that isn't practical. -// In that case, we represent the __result as a special case of -// RopeFunction, whose char_producer points back to the rope itself. -// In all cases except repeated substring operations and -// deallocation, we treat the __result as a RopeFunction. -template -# if ( defined (__IBMCPP__) && (__IBMCPP__ == 500) ) // JFA 10-Aug-2000 for some reason xlC cares about the order -struct _Rope_RopeSubstring : public char_producer<_CharT> , public _Rope_RopeFunction<_CharT,_Alloc> -# else -struct _Rope_RopeSubstring : public _Rope_RopeFunction<_CharT,_Alloc>, - public char_producer<_CharT> -# endif -{ -public: - // XXX this whole class should be rewritten. - typedef _Rope_RopeRep<_CharT,_Alloc> _Base; - _Rope_RopeRep<_CharT,_Alloc>* _M_base; // not 0 - size_t _M_start; - virtual void operator()(size_t __start_pos, size_t __req_len, - _CharT* __buffer) { - switch(_M_base->_M_tag) { - case _Base::_S_function: - case _Base::_S_substringfn: - { - char_producer<_CharT>* __fn = - ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn; - _STLP_ASSERT(__start_pos + __req_len <= this->_M_size._M_data) - _STLP_ASSERT(_M_start + this->_M_size._M_data <= _M_base->_M_size._M_data) - (*__fn)(__start_pos + _M_start, __req_len, __buffer); - } - break; - case _Base::_S_leaf: - { - __GC_CONST _CharT* __s = - ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data; - uninitialized_copy_n(__s + __start_pos + _M_start, __req_len, - __buffer); - } - break; - default: - _STLP_ASSERT(false) - ; - } - } - - _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) - typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; - - _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s, - size_t __l, allocator_type __a) - : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a), - _M_base(__b), - _M_start(__s) - - { - _STLP_ASSERT(__l > 0) - _STLP_ASSERT(__s + __l <= __b->_M_size._M_data) -# ifndef __GC - _M_base->_M_ref_nonnil(); -# endif - this->_M_tag = _Base::_S_substringfn; - } - virtual ~_Rope_RopeSubstring() - { -# ifndef __GC - _M_base->_M_unref_nonnil(); -# endif - } -}; - -// Self-destructing pointers to Rope_rep. -// These are not conventional smart pointers. Their -// only purpose in life is to ensure that unref is called -// on the pointer either at normal exit or if an exception -// is raised. It is the caller's responsibility to -// adjust reference counts when these pointers are initialized -// or assigned to. (This convention significantly reduces -// the number of potentially expensive reference count -// updates.) -#ifndef __GC -template -struct _Rope_self_destruct_ptr { - _Rope_RopeRep<_CharT,_Alloc>* _M_ptr; - ~_Rope_self_destruct_ptr() - { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); } -# ifdef _STLP_USE_EXCEPTIONS - _Rope_self_destruct_ptr() : _M_ptr(0) {}; -# else - _Rope_self_destruct_ptr() {}; -# endif - _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {} - _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; } - _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; } - operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; } - _Rope_self_destruct_ptr<_CharT, _Alloc>& - operator= (_Rope_RopeRep<_CharT,_Alloc>* __x) - { _M_ptr = __x; return *this; } -}; -#endif - -// Dereferencing a nonconst iterator has to return something -// that behaves almost like a reference. It's not possible to -// return an actual reference since assignment requires extra -// work. And we would get into the same problems as with the -// CD2 version of basic_string. -template -class _Rope_char_ref_proxy { - typedef _Rope_char_ref_proxy<_CharT, _Alloc> _Self; - friend class rope<_CharT,_Alloc>; - friend class _Rope_iterator<_CharT,_Alloc>; - friend class _Rope_char_ptr_proxy<_CharT,_Alloc>; -# ifdef __GC - typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr; -# else - typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr; -# endif - typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; - typedef rope<_CharT,_Alloc> _My_rope; - size_t _M_pos; - _CharT _M_current; - bool _M_current_valid; - _My_rope* _M_root; // The whole rope. -public: - _Rope_char_ref_proxy(_My_rope* __r, size_t __p) : - _M_pos(__p), _M_current_valid(false), _M_root(__r) {} - _Rope_char_ref_proxy(const _Self& __x) : - _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {} - // Don't preserve cache if the reference can outlive the - // expression. We claim that's not possible without calling - // a copy constructor or generating reference to a proxy - // reference. We declare the latter to have undefined semantics. - _Rope_char_ref_proxy(_My_rope* __r, size_t __p, - _CharT __c) : - _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {} - inline operator _CharT () const; - _Self& operator= (_CharT __c); - _Rope_char_ptr_proxy<_CharT, _Alloc> operator& () const; - _Self& operator= (const _Self& __c) { - return operator=((_CharT)__c); - } -}; - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER -template -inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, - _Rope_char_ref_proxy <_CharT, __Alloc > __b) { - _CharT __tmp = __a; - __a = __b; - __b = __tmp; -} -#else -// There is no really acceptable way to handle this. The default -// definition of swap doesn't work for proxy references. -// It can't really be made to work, even with ugly hacks, since -// the only unusual operation it uses is the copy constructor, which -// is needed for other purposes. We provide a macro for -// full specializations, and instantiate the most common case. -# define _ROPE_SWAP_SPECIALIZATION(_CharT, __Alloc) \ - inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, \ - _Rope_char_ref_proxy <_CharT, __Alloc > __b) { \ - _CharT __tmp = __a; \ - __a = __b; \ - __b = __tmp; \ - } - -_ROPE_SWAP_SPECIALIZATION(char,_STLP_DEFAULT_ALLOCATOR(char) ) - -#endif /* !_STLP_FUNCTION_TMPL_PARTIAL_ORDER */ - - template -class _Rope_char_ptr_proxy { - // XXX this class should be rewritten. -public: - typedef _Rope_char_ptr_proxy<_CharT, _Alloc> _Self; - friend class _Rope_char_ref_proxy<_CharT,_Alloc>; - size_t _M_pos; - rope<_CharT,_Alloc>* _M_root; // The whole rope. - - _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x) - : _M_pos(__x._M_pos), _M_root(__x._M_root) {} - _Rope_char_ptr_proxy(const _Self& __x) - : _M_pos(__x._M_pos), _M_root(__x._M_root) {} - _Rope_char_ptr_proxy() {} - _Rope_char_ptr_proxy(_CharT* __x) : _M_pos(0), _M_root(0) { - _STLP_ASSERT(0 == __x) - } - _Self& - operator= (const _Self& __x) { - _M_pos = __x._M_pos; - _M_root = __x._M_root; - return *this; - } - - _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const { - return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos); - } -}; - - -// Rope iterators: -// Unlike in the C version, we cache only part of the stack -// for rope iterators, since they must be efficiently copyable. -// When we run out of cache, we have to reconstruct the iterator -// value. -// Pointers from iterators are not included in reference counts. -// Iterators are assumed to be thread private. Ropes can -// be shared. - -template -class _Rope_iterator_base -/* : public random_access_iterator<_CharT, ptrdiff_t> */ -{ - friend class rope<_CharT,_Alloc>; - typedef _Rope_iterator_base<_CharT, _Alloc> _Self; -public: - typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; - // Borland doesnt want this to be protected. - // protected: - enum { _S_path_cache_len = 4 }; // Must be <= 9. - enum { _S_iterator_buf_len = 15 }; - size_t _M_current_pos; - _RopeRep* _M_root; // The whole rope. - size_t _M_leaf_pos; // Starting position for current leaf - __GC_CONST _CharT* _M_buf_start; - // Buffer possibly - // containing current char. - __GC_CONST _CharT* _M_buf_ptr; - // Pointer to current char in buffer. - // != 0 ==> buffer valid. - __GC_CONST _CharT* _M_buf_end; - // One past __last valid char in buffer. - // What follows is the path cache. We go out of our - // way to make this compact. - // Path_end contains the bottom section of the path from - // the root to the current leaf. - const _RopeRep* _M_path_end[_S_path_cache_len]; - int _M_leaf_index; // Last valid __pos in path_end; - // _M_path_end[0] ... _M_path_end[leaf_index-1] - // point to concatenation nodes. - unsigned char _M_path_directions; - // (path_directions >> __i) & 1 is 1 - // iff we got from _M_path_end[leaf_index - __i - 1] - // to _M_path_end[leaf_index - __i] by going to the - // __right. Assumes path_cache_len <= 9. - _CharT _M_tmp_buf[_S_iterator_buf_len]; - // Short buffer for surrounding chars. - // This is useful primarily for - // RopeFunctions. We put the buffer - // here to avoid locking in the - // multithreaded case. - // The cached path is generally assumed to be valid - // only if the buffer is valid. - static void _S_setbuf(_Rope_iterator_base<_CharT, _Alloc>& __x); - // Set buffer contents given - // path cache. - static void _S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x); - // Set buffer contents and - // path cache. - static void _S_setcache_for_incr(_Rope_iterator_base<_CharT, _Alloc>& __x); - // As above, but assumes path - // cache is valid for previous posn. - _Rope_iterator_base() {} - _Rope_iterator_base(_RopeRep* __root, size_t __pos) - : _M_current_pos(__pos),_M_root(__root), _M_buf_ptr(0) {} - void _M_incr(size_t __n); - void _M_decr(size_t __n); -public: - size_t index() const { return _M_current_pos; } - _Rope_iterator_base(const _Self& __x) { - if (0 != __x._M_buf_ptr) { - *this = __x; - } else { - _M_current_pos = __x._M_current_pos; - _M_root = __x._M_root; - _M_buf_ptr = 0; - } - } -}; - -template class _Rope_iterator; - -template -class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> { - friend class rope<_CharT,_Alloc>; - typedef _Rope_const_iterator<_CharT, _Alloc> _Self; - typedef _Rope_iterator_base<_CharT,_Alloc> _Base; - // protected: -public: -# ifndef _STLP_HAS_NO_NAMESPACES - typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; - // The one from the base class may not be directly visible. -# endif - _Rope_const_iterator(const _RopeRep* __root, size_t __pos): - _Rope_iterator_base<_CharT,_Alloc>( - __CONST_CAST(_RopeRep*,__root), __pos) - // Only nonconst iterators modify root ref count - {} -public: - typedef _CharT reference; // Really a value. Returning a reference - // Would be a mess, since it would have - // to be included in refcount. - typedef const _CharT* pointer; - typedef _CharT value_type; - typedef ptrdiff_t difference_type; - typedef random_access_iterator_tag iterator_category; - -public: - _Rope_const_iterator() {}; - _Rope_const_iterator(const _Self& __x) : - _Rope_iterator_base<_CharT,_Alloc>(__x) { } - _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x): - _Rope_iterator_base<_CharT,_Alloc>(__x) {} - _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) : - _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos) {} - _Self& operator= (const _Self& __x) { - if (0 != __x._M_buf_ptr) { - *(__STATIC_CAST(_Base*,this)) = __x; - } else { - this->_M_current_pos = __x._M_current_pos; - this->_M_root = __x._M_root; - this->_M_buf_ptr = 0; - } - return(*this); - } - reference operator*() { - if (0 == this->_M_buf_ptr) _S_setcache(*this); - return *(this->_M_buf_ptr); - } - _Self& operator++() { - __GC_CONST _CharT* __next; - if (0 != this->_M_buf_ptr && (__next = this->_M_buf_ptr + 1) < this->_M_buf_end) { - this->_M_buf_ptr = __next; - ++this->_M_current_pos; - } else { - this->_M_incr(1); - } - return *this; - } - _Self& operator+=(ptrdiff_t __n) { - if (__n >= 0) { - this->_M_incr(__n); - } else { - this->_M_decr(-__n); - } - return *this; - } - _Self& operator--() { - this->_M_decr(1); - return *this; - } - _Self& operator-=(ptrdiff_t __n) { - if (__n >= 0) { - this->_M_decr(__n); - } else { - this->_M_incr(-__n); - } - return *this; - } - _Self operator++(int) { - size_t __old_pos = this->_M_current_pos; - this->_M_incr(1); - return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos); - // This makes a subsequent dereference expensive. - // Perhaps we should instead copy the iterator - // if it has a valid cache? - } - _Self operator--(int) { - size_t __old_pos = this->_M_current_pos; - this->_M_decr(1); - return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos); - } - inline reference operator[](size_t __n); -}; - -template -class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> { - friend class rope<_CharT,_Alloc>; - typedef _Rope_iterator<_CharT, _Alloc> _Self; - typedef _Rope_iterator_base<_CharT,_Alloc> _Base; - typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; - // protected: -public: - rope<_CharT,_Alloc>* _M_root_rope; - // root is treated as a cached version of this, - // and is used to detect changes to the underlying - // rope. - // Root is included in the reference count. - // This is necessary so that we can detect changes reliably. - // Unfortunately, it requires careful bookkeeping for the - // nonGC case. - _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos); - - void _M_check(); -public: - typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference; - typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer; - typedef _CharT value_type; - typedef ptrdiff_t difference_type; - typedef random_access_iterator_tag iterator_category; -public: - ~_Rope_iterator() //*TY 5/6/00 - added dtor to balance reference count - { - _RopeRep::_S_unref(this->_M_root); - } - - rope<_CharT,_Alloc>& container() { return *_M_root_rope; } - _Rope_iterator() { - this->_M_root = 0; // Needed for reference counting. - }; - _Rope_iterator(const _Self& __x) : - _Rope_iterator_base<_CharT,_Alloc>(__x) { - _M_root_rope = __x._M_root_rope; - _RopeRep::_S_ref(this->_M_root); - } - _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos); - _Self& operator= (const _Self& __x) { - _RopeRep* __old = this->_M_root; - - _RopeRep::_S_ref(__x._M_root); - if (0 != __x._M_buf_ptr) { - _M_root_rope = __x._M_root_rope; - *(__STATIC_CAST(_Base*,this)) = __x; - } else { - this->_M_current_pos = __x._M_current_pos; - this->_M_root = __x._M_root; - _M_root_rope = __x._M_root_rope; - this->_M_buf_ptr = 0; - } - _RopeRep::_S_unref(__old); - return(*this); - } - reference operator*() { - _M_check(); - if (0 == this->_M_buf_ptr) { - return _Rope_char_ref_proxy<_CharT,_Alloc>( - _M_root_rope, this->_M_current_pos); - } else { - return _Rope_char_ref_proxy<_CharT,_Alloc>( - _M_root_rope, this->_M_current_pos, *(this->_M_buf_ptr)); - } - } - _Self& operator++() { - this->_M_incr(1); - return *this; - } - _Self& operator+=(ptrdiff_t __n) { - if (__n >= 0) { - this->_M_incr(__n); - } else { - this->_M_decr(-__n); - } - return *this; - } - _Self& operator--() { - this->_M_decr(1); - return *this; - } - _Self& operator-=(ptrdiff_t __n) { - if (__n >= 0) { - this->_M_decr(__n); - } else { - this->_M_incr(-__n); - } - return *this; - } - _Self operator++(int) { - size_t __old_pos = this->_M_current_pos; - this->_M_incr(1); - return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos); - } - _Self operator--(int) { - size_t __old_pos = this->_M_current_pos; - this->_M_decr(1); - return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos); - } - reference operator[](ptrdiff_t __n) { - return _Rope_char_ref_proxy<_CharT,_Alloc>( - _M_root_rope, this->_M_current_pos + __n); - } -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template -inline random_access_iterator_tag -iterator_category(const _Rope_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag();} -template -inline _CharT* value_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; } -template -inline ptrdiff_t* distance_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; } -template -inline random_access_iterator_tag -iterator_category(const _Rope_const_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag(); } -template -inline _CharT* value_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; } -template -inline ptrdiff_t* distance_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; } -#endif - -template -class rope { - typedef rope<_CharT,_Alloc> _Self; -public: - typedef _CharT value_type; - typedef ptrdiff_t difference_type; - typedef size_t size_type; - typedef _CharT const_reference; - typedef const _CharT* const_pointer; - typedef _Rope_iterator<_CharT,_Alloc> iterator; - typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator; - typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference; - typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer; - - friend class _Rope_iterator<_CharT,_Alloc>; - friend class _Rope_const_iterator<_CharT,_Alloc>; - friend struct _Rope_RopeRep<_CharT,_Alloc>; - friend class _Rope_iterator_base<_CharT,_Alloc>; - friend class _Rope_char_ptr_proxy<_CharT,_Alloc>; - friend class _Rope_char_ref_proxy<_CharT,_Alloc>; - friend struct _Rope_RopeSubstring<_CharT,_Alloc>; - - _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS; - -protected: - typedef __GC_CONST _CharT* _Cstrptr; - - static _CharT _S_empty_c_str[1]; - - static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); } - enum { _S_copy_max = 23 }; - // For strings shorter than _S_copy_max, we copy to - // concatenate. - -public: - typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep; - _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) - typedef typename _Alloc_traits<_CharT,_Alloc>::allocator_type allocator_type; - allocator_type get_allocator() const { return allocator_type(_M_tree_ptr); } -public: - // The only data member of a rope: - _STLP_alloc_proxy<_RopeRep*, _CharT, allocator_type> _M_tree_ptr; - - typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation; - typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf; - typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction; - typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring; - - - - // Retrieve a character at the indicated position. - static _CharT _S_fetch(_RopeRep* __r, size_type __pos); - -# ifndef __GC - // Obtain a pointer to the character at the indicated position. - // The pointer can be used to change the character. - // If such a pointer cannot be produced, as is frequently the - // case, 0 is returned instead. - // (Returns nonzero only if all nodes in the path have a refcount - // of 1.) - static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos); -# endif - - static bool _S_apply_to_pieces( - // should be template parameter - _Rope_char_consumer<_CharT>& __c, - const _RopeRep* __r, - size_t __begin, size_t __end); - // begin and end are assumed to be in range. - -# ifndef __GC - static void _S_unref(_RopeRep* __t) - { - _RopeRep::_S_unref(__t); - } - static void _S_ref(_RopeRep* __t) - { - _RopeRep::_S_ref(__t); - } -# else /* __GC */ - static void _S_unref(_RopeRep*) {} - static void _S_ref(_RopeRep*) {} -# endif - - -# ifdef __GC - typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr; -# else - typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr; -# endif - - // _Result is counted in refcount. - static _RopeRep* _S_substring(_RopeRep* __base, - size_t __start, size_t __endp1); - - static _RopeRep* _S_concat_char_iter(_RopeRep* __r, - const _CharT* __iter, size_t __slen); - // Concatenate rope and char ptr, copying __s. - // Should really take an arbitrary iterator. - // Result is counted in refcount. - static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r, - const _CharT* __iter, size_t __slen) - // As above, but one reference to __r is about to be - // destroyed. Thus the pieces may be recycled if all - // relevent reference counts are 1. -# ifdef __GC - // We can't really do anything since refcounts are unavailable. - { return _S_concat_char_iter(__r, __iter, __slen); } -# else - ; -# endif - - static _RopeRep* _S_concat_rep(_RopeRep* __left, _RopeRep* __right); - // General concatenation on _RopeRep. _Result - // has refcount of 1. Adjusts argument refcounts. - -public: - void apply_to_pieces( size_t __begin, size_t __end, - _Rope_char_consumer<_CharT>& __c) const { - _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __begin, __end); - } - - -protected: - - static size_t _S_rounded_up_size(size_t __n) { - return _RopeRep::_S_rounded_up_size(__n); - } - - static size_t _S_allocated_capacity(size_t __n) { - if (_S_is_basic_char_type((_CharT*)0)) { - return _S_rounded_up_size(__n) - 1; - } else { - return _S_rounded_up_size(__n); - } - } - - // Allocate and construct a RopeLeaf using the supplied allocator - // Takes ownership of s instead of copying. - static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s, - size_t _p_size, allocator_type __a) - { - _RopeLeaf* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _RopeLeaf).allocate(1,(const void*)0); - _STLP_TRY { - _STLP_PLACEMENT_NEW(__space) _RopeLeaf(__s, _p_size, __a); - } - _STLP_UNWIND(_STLP_CREATE_ALLOCATOR(allocator_type,__a, - _RopeLeaf).deallocate(__space, 1)) - return __space; - } - - static _RopeConcatenation* _S_new_RopeConcatenation( - _RopeRep* __left, _RopeRep* __right, - allocator_type __a) - { - _RopeConcatenation* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, - _RopeConcatenation).allocate(1,(const void*)0); - return _STLP_PLACEMENT_NEW(__space) _RopeConcatenation(__left, __right, __a); - } - - static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f, - size_t _p_size, bool __d, allocator_type __a) - { - _RopeFunction* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, - _RopeFunction).allocate(1,(const void*)0); - return _STLP_PLACEMENT_NEW(__space) _RopeFunction(__f, _p_size, __d, __a); - } - - static _RopeSubstring* _S_new_RopeSubstring( - _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s, - size_t __l, allocator_type __a) - { - _RopeSubstring* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, - _RopeSubstring).allocate(1,(const void*)0); - return _STLP_PLACEMENT_NEW(__space) _RopeSubstring(__b, __s, __l, __a); - } - -# define _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _p_size, __a) \ - _S_RopeLeaf_from_unowned_char_ptr(__s, _p_size, __a) - - static - _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s, - size_t _p_size, allocator_type __a) - { - if (0 == _p_size) return 0; - - _CharT* __buf = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _CharT).allocate(_S_rounded_up_size(_p_size)); - - uninitialized_copy_n(__s, _p_size, __buf); - _S_cond_store_eos(__buf[_p_size]); - - _STLP_TRY { - return _S_new_RopeLeaf(__buf, _p_size, __a); - } - _STLP_UNWIND(_RopeRep::_S_free_string(__buf, _p_size, __a)) - -# if defined (_STLP_THROW_RETURN_BUG) - return 0; -# endif - } - - - // Concatenation of nonempty strings. - // Always builds a concatenation node. - // Rebalances if the result is too deep. - // Result has refcount 1. - // Does not increment left and right ref counts even though - // they are referenced. - static _RopeRep* - _S_tree_concat(_RopeRep* __left, _RopeRep* __right); - - // Concatenation helper functions - static _RopeLeaf* - _S_leaf_concat_char_iter(_RopeLeaf* __r, - const _CharT* __iter, size_t __slen); - // Concatenate by copying leaf. - // should take an arbitrary iterator - // result has refcount 1. -# ifndef __GC - static _RopeLeaf* _S_destr_leaf_concat_char_iter - (_RopeLeaf* __r, const _CharT* __iter, size_t __slen); - // A version that potentially clobbers __r if __r->_M_ref_count == 1. -# endif - - - // A helper function for exponentiating strings. - // This uses a nonstandard refcount convention. - // The result has refcount 0. - friend struct _Rope_Concat_fn<_CharT,_Alloc>; - typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn; - -public: - static size_t _S_char_ptr_len(const _CharT* __s) { - const _CharT* __p = __s; - - while (!_S_is0(*__p)) { ++__p; } - return (__p - __s); - } - -public: /* for operators */ - rope(_RopeRep* __t, const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, __t) { } -private: - // Copy __r to the _CharT buffer. - // Returns __buffer + __r->_M_size._M_data. - // Assumes that buffer is uninitialized. - static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer); - - // Again, with explicit starting position and length. - // Assumes that buffer is uninitialized. - static _CharT* _S_flatten(_RopeRep* __r, - size_t __start, size_t __len, - _CharT* __buffer); - - // fbp : HP aCC prohibits access to protected min_len from within static methods ( ?? ) -public: - static const unsigned long _S_min_len[46]; -protected: - static bool _S_is_balanced(_RopeRep* __r) - { return (__r->_M_size._M_data >= _S_min_len[__r->_M_depth]); } - - static bool _S_is_almost_balanced(_RopeRep* __r) - { return (__r->_M_depth == 0 || - __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 1]); } - - static bool _S_is_roughly_balanced(_RopeRep* __r) - { return (__r->_M_depth <= 1 || - __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 2]); } - - // Assumes the result is not empty. - static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left, - _RopeRep* __right) - { - _RopeRep* __result = _S_concat_rep(__left, __right); - if (_S_is_balanced(__result)) __result->_M_is_balanced = true; - return __result; - } - - // The basic rebalancing operation. Logically copies the - // rope. The result has refcount of 1. The client will - // usually decrement the reference count of __r. - // The result is within height 2 of balanced by the above - // definition. - static _RopeRep* _S_balance(_RopeRep* __r); - - // Add all unbalanced subtrees to the forest of balanceed trees. - // Used only by balance. - static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest); - - // Add __r to forest, assuming __r is already balanced. - static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest); - - // Print to stdout, exposing structure - static void _S_dump(_RopeRep* __r, int __indent = 0); - - // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp. - static int _S_compare(const _RopeRep* __x, const _RopeRep* __y); - -public: - bool empty() const { return 0 == _M_tree_ptr._M_data; } - - // Comparison member function. This is public only for those - // clients that need a ternary comparison. Others - // should use the comparison operators below. - int compare(const _Self& __y) const { - return _S_compare(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data); - } - - rope(const _CharT* __s, const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),__a)) - { } - - rope(const _CharT* __s, size_t __len, - const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, (_STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, __a))) - { } - - // Should perhaps be templatized with respect to the iterator type - // and use Sequence_buffer. (It should perhaps use sequence_buffer - // even now.) - rope(const _CharT *__s, const _CharT *__e, - const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, __a)) - { } - - rope(const const_iterator& __s, const const_iterator& __e, - const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos, - __e._M_current_pos)) - { } - - rope(const iterator& __s, const iterator& __e, - const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos, - __e._M_current_pos)) - { } - - rope(_CharT __c, const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, (_RopeRep*)0) - { - _CharT* __buf = _M_tree_ptr.allocate(_S_rounded_up_size(1)); - - _Construct(__buf, __c); - _STLP_TRY { - _M_tree_ptr._M_data = _S_new_RopeLeaf(__buf, 1, __a); - } - _STLP_UNWIND(_RopeRep::_S_free_string(__buf, 1, __a)) - } - - rope(size_t __n, _CharT __c, - const allocator_type& __a = allocator_type()): - _M_tree_ptr(__a, (_RopeRep*)0) { - rope<_CharT,_Alloc> __result; -# define __exponentiate_threshold size_t(32) - _RopeRep* __remainder; - rope<_CharT,_Alloc> __remainder_rope; - - // gcc-2.7.2 bugs - typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn; - - if (0 == __n) - return; - - size_t __exponent = __n / __exponentiate_threshold; - size_t __rest = __n % __exponentiate_threshold; - if (0 == __rest) { - __remainder = 0; - } else { - _CharT* __rest_buffer = _M_tree_ptr.allocate(_S_rounded_up_size(__rest)); - uninitialized_fill_n(__rest_buffer, __rest, __c); - _S_cond_store_eos(__rest_buffer[__rest]); - _STLP_TRY { - __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, __a); - } - _STLP_UNWIND(_RopeRep::_S_free_string(__rest_buffer, __rest, __a)) - } - __remainder_rope._M_tree_ptr._M_data = __remainder; - if (__exponent != 0) { - _CharT* __base_buffer = - _M_tree_ptr.allocate(_S_rounded_up_size(__exponentiate_threshold)); - _RopeLeaf* __base_leaf; - rope<_CharT,_Alloc> __base_rope; - uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c); - _S_cond_store_eos(__base_buffer[__exponentiate_threshold]); - _STLP_TRY { - __base_leaf = _S_new_RopeLeaf(__base_buffer, - __exponentiate_threshold, __a); - } - _STLP_UNWIND(_RopeRep::_S_free_string(__base_buffer, - __exponentiate_threshold, __a)) - __base_rope._M_tree_ptr._M_data = __base_leaf; - if (1 == __exponent) { - __result = __base_rope; -# ifndef __GC - _STLP_ASSERT(2 == __result._M_tree_ptr._M_data->_M_ref_count) - // One each for base_rope and __result -# endif - } else { - __result = power(__base_rope, __exponent, _Concat_fn()); - } - if (0 != __remainder) { - __result += __remainder_rope; - } - } else { - __result = __remainder_rope; - } - _M_tree_ptr._M_data = __result._M_tree_ptr._M_data; - _M_tree_ptr._M_data->_M_ref_nonnil(); -# undef __exponentiate_threshold - } - - rope(const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, (_RopeRep*)0) {} - - // Construct a rope from a function that can compute its members - rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn, - const allocator_type& __a = allocator_type()) - : _M_tree_ptr(__a, (_RopeRep*)0) - { - _M_tree_ptr._M_data = (0 == __len) ? - 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a); - } - - rope(const _Self& __x) - : _M_tree_ptr(__x.get_allocator(), __x._M_tree_ptr._M_data) - { - _S_ref(_M_tree_ptr._M_data); - } - - ~rope() - { - _S_unref(_M_tree_ptr._M_data); - } - - _Self& operator=(const _Self& __x) - { - _RopeRep* __old = _M_tree_ptr._M_data; - _STLP_ASSERT(get_allocator() == __x.get_allocator()) - _M_tree_ptr._M_data = __x._M_tree_ptr._M_data; - _S_ref(_M_tree_ptr._M_data); - _S_unref(__old); - return(*this); - } - void clear() - { - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = 0; - } - void push_back(_CharT __x) - { - _RopeRep* __old = _M_tree_ptr._M_data; - _M_tree_ptr._M_data = _S_destr_concat_char_iter(_M_tree_ptr._M_data, &__x, 1); - _S_unref(__old); - } - - void pop_back() - { - _RopeRep* __old = _M_tree_ptr._M_data; - _M_tree_ptr._M_data = - _S_substring(_M_tree_ptr._M_data, 0, _M_tree_ptr._M_data->_M_size._M_data - 1); - _S_unref(__old); - } - - _CharT back() const - { - return _S_fetch(_M_tree_ptr._M_data, _M_tree_ptr._M_data->_M_size._M_data - 1); - } - - void push_front(_CharT __x) - { - _RopeRep* __old = _M_tree_ptr._M_data; - _RopeRep* __left = - _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, get_allocator()); - _STLP_TRY { - _M_tree_ptr._M_data = _S_concat_rep(__left, _M_tree_ptr._M_data); - _S_unref(__old); - _S_unref(__left); - } - _STLP_UNWIND(_S_unref(__left)) - } - - void pop_front() - { - _RopeRep* __old = _M_tree_ptr._M_data; - _M_tree_ptr._M_data = _S_substring(_M_tree_ptr._M_data, 1, _M_tree_ptr._M_data->_M_size._M_data); - _S_unref(__old); - } - - _CharT front() const - { - return _S_fetch(_M_tree_ptr._M_data, 0); - } - - void balance() - { - _RopeRep* __old = _M_tree_ptr._M_data; - _M_tree_ptr._M_data = _S_balance(_M_tree_ptr._M_data); - _S_unref(__old); - } - - void copy(_CharT* __buffer) const { - _STLP_STD::_Destroy(__buffer, __buffer + size()); - _S_flatten(_M_tree_ptr._M_data, __buffer); - } - - // This is the copy function from the standard, but - // with the arguments reordered to make it consistent with the - // rest of the interface. - // Note that this guaranteed not to compile if the draft standard - // order is assumed. - size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const - { - size_t _p_size = size(); - size_t __len = (__pos + __n > _p_size? _p_size - __pos : __n); - - _STLP_STD::_Destroy(__buffer, __buffer + __len); - _S_flatten(_M_tree_ptr._M_data, __pos, __len, __buffer); - return __len; - } - - // Print to stdout, exposing structure. May be useful for - // performance debugging. - void dump() { - _S_dump(_M_tree_ptr._M_data); - } - - // Convert to 0 terminated string in new allocated memory. - // Embedded 0s in the input do not terminate the copy. - const _CharT* c_str() const; - - // As above, but lso use the flattened representation as the - // the new rope representation. - const _CharT* replace_with_c_str(); - - // Reclaim memory for the c_str generated flattened string. - // Intentionally undocumented, since it's hard to say when this - // is safe for multiple threads. - void delete_c_str () { - if (0 == _M_tree_ptr._M_data) return; - if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && - ((_RopeLeaf*)_M_tree_ptr._M_data)->_M_data == - _M_tree_ptr._M_data->_M_c_string) { - // Representation shared - return; - } -# ifndef __GC - _M_tree_ptr._M_data->_M_free_c_string(); -# endif - _M_tree_ptr._M_data->_M_c_string = 0; - } - - _CharT operator[] (size_type __pos) const { - return _S_fetch(_M_tree_ptr._M_data, __pos); - } - - _CharT at(size_type __pos) const { - // if (__pos >= size()) throw out_of_range; // XXX - return (*this)[__pos]; - } - - const_iterator begin() const { - return(const_iterator(_M_tree_ptr._M_data, 0)); - } - - // An easy way to get a const iterator from a non-const container. - const_iterator const_begin() const { - return(const_iterator(_M_tree_ptr._M_data, 0)); - } - - const_iterator end() const { - return(const_iterator(_M_tree_ptr._M_data, size())); - } - - const_iterator const_end() const { - return(const_iterator(_M_tree_ptr._M_data, size())); - } - - size_type size() const { - return(0 == _M_tree_ptr._M_data? 0 : _M_tree_ptr._M_data->_M_size._M_data); - } - - size_type length() const { - return size(); - } - - size_type max_size() const { - return _S_min_len[__ROPE_MAX_DEPTH-1] - 1; - // Guarantees that the result can be sufficirntly - // balanced. Longer ropes will probably still work, - // but it's harder to make guarantees. - } - - const_reverse_iterator rbegin() const { - return const_reverse_iterator(end()); - } - - const_reverse_iterator const_rbegin() const { - return const_reverse_iterator(end()); - } - - const_reverse_iterator rend() const { - return const_reverse_iterator(begin()); - } - - const_reverse_iterator const_rend() const { - return const_reverse_iterator(begin()); - } - // The symmetric cases are intentionally omitted, since they're presumed - // to be less common, and we don't handle them as well. - - // The following should really be templatized. - // The first argument should be an input iterator or - // forward iterator with value_type _CharT. - _Self& append(const _CharT* __iter, size_t __n) { - _RopeRep* __result = - _S_destr_concat_char_iter(_M_tree_ptr._M_data, __iter, __n); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - return *this; - } - - _Self& append(const _CharT* __c_string) { - size_t __len = _S_char_ptr_len(__c_string); - append(__c_string, __len); - return(*this); - } - - _Self& append(const _CharT* __s, const _CharT* __e) { - _RopeRep* __result = - _S_destr_concat_char_iter(_M_tree_ptr._M_data, __s, __e - __s); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - return *this; - } - - _Self& append(const_iterator __s, const_iterator __e) { - _STLP_ASSERT(__s._M_root == __e._M_root) - _STLP_ASSERT(get_allocator() == __s._M_root->get_allocator()) - _Self_destruct_ptr __appendee(_S_substring( - __s._M_root, __s._M_current_pos, __e._M_current_pos)); - _RopeRep* __result = - _S_concat_rep(_M_tree_ptr._M_data, (_RopeRep*)__appendee); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - return *this; - } - - _Self& append(_CharT __c) { - _RopeRep* __result = - _S_destr_concat_char_iter(_M_tree_ptr._M_data, &__c, 1); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - return *this; - } - - _Self& append() { return append(_CharT()); } // XXX why? - - _Self& append(const _Self& __y) { - _STLP_ASSERT(__y.get_allocator() == get_allocator()) - _RopeRep* __result = _S_concat_rep(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - return *this; - } - - _Self& append(size_t __n, _CharT __c) { - rope<_CharT,_Alloc> __last(__n, __c); - return append(__last); - } - - void swap(_Self& __b) { - _STLP_ASSERT(get_allocator() == __b.get_allocator()) - _RopeRep* __tmp = _M_tree_ptr._M_data; - _M_tree_ptr._M_data = __b._M_tree_ptr._M_data; - __b._M_tree_ptr._M_data = __tmp; - } - - -protected: - // Result is included in refcount. - static _RopeRep* replace(_RopeRep* __old, size_t __pos1, - size_t __pos2, _RopeRep* __r) { - if (0 == __old) { _S_ref(__r); return __r; } - _Self_destruct_ptr __left( - _S_substring(__old, 0, __pos1)); - _Self_destruct_ptr __right( - _S_substring(__old, __pos2, __old->_M_size._M_data)); - _STLP_MPWFIX_TRY //*TY 06/01/2000 - - _RopeRep* __result; - - if (0 == __r) { - __result = _S_concat_rep(__left, __right); - } else { - _STLP_ASSERT(__old->get_allocator() == __r->get_allocator()) - _Self_destruct_ptr __left_result(_S_concat_rep(__left, __r)); - __result = _S_concat_rep(__left_result, __right); - } - return __result; - _STLP_MPWFIX_CATCH //*TY 06/01/2000 - - } - -public: - void insert(size_t __p, const _Self& __r) { - _RopeRep* __result = - replace(_M_tree_ptr._M_data, __p, __p, __r._M_tree_ptr._M_data); - _STLP_ASSERT(get_allocator() == __r.get_allocator()) - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - } - - void insert(size_t __p, size_t __n, _CharT __c) { - rope<_CharT,_Alloc> __r(__n,__c); - insert(__p, __r); - } - - void insert(size_t __p, const _CharT* __i, size_t __n) { - _Self_destruct_ptr __left(_S_substring(_M_tree_ptr._M_data, 0, __p)); - _Self_destruct_ptr __right(_S_substring(_M_tree_ptr._M_data, __p, size())); - _Self_destruct_ptr __left_result( - _S_concat_char_iter(__left, __i, __n)); - // _S_ destr_concat_char_iter should be safe here. - // But as it stands it's probably not a win, since __left - // is likely to have additional references. - _RopeRep* __result = _S_concat_rep(__left_result, __right); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - } - - void insert(size_t __p, const _CharT* __c_string) { - insert(__p, __c_string, _S_char_ptr_len(__c_string)); - } - - void insert(size_t __p, _CharT __c) { - insert(__p, &__c, 1); - } - - void insert(size_t __p) { - _CharT __c = _CharT(); - insert(__p, &__c, 1); - } - - void insert(size_t __p, const _CharT* __i, const _CharT* __j) { - _Self __r(__i, __j); - insert(__p, __r); - } - - void insert(size_t __p, const const_iterator& __i, - const const_iterator& __j) { - _Self __r(__i, __j); - insert(__p, __r); - } - - void insert(size_t __p, const iterator& __i, - const iterator& __j) { - _Self __r(__i, __j); - insert(__p, __r); - } - - // (position, length) versions of replace operations: - - void replace(size_t __p, size_t __n, const _Self& __r) { - _RopeRep* __result = - replace(_M_tree_ptr._M_data, __p, __p + __n, __r._M_tree_ptr._M_data); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - } - - void replace(size_t __p, size_t __n, - const _CharT* __i, size_t __i_len) { - _Self __r(__i, __i_len); - replace(__p, __n, __r); - } - - void replace(size_t __p, size_t __n, _CharT __c) { - _Self __r(__c); - replace(__p, __n, __r); - } - - void replace(size_t __p, size_t __n, const _CharT* __c_string) { - _Self __r(__c_string); - replace(__p, __n, __r); - } - - void replace(size_t __p, size_t __n, - const _CharT* __i, const _CharT* __j) { - _Self __r(__i, __j); - replace(__p, __n, __r); - } - - void replace(size_t __p, size_t __n, - const const_iterator& __i, const const_iterator& __j) { - _Self __r(__i, __j); - replace(__p, __n, __r); - } - - void replace(size_t __p, size_t __n, - const iterator& __i, const iterator& __j) { - _Self __r(__i, __j); - replace(__p, __n, __r); - } - - // Single character variants: - void replace(size_t __p, _CharT __c) { - iterator __i(this, __p); - *__i = __c; - } - - void replace(size_t __p, const _Self& __r) { - replace(__p, 1, __r); - } - - void replace(size_t __p, const _CharT* __i, size_t __i_len) { - replace(__p, 1, __i, __i_len); - } - - void replace(size_t __p, const _CharT* __c_string) { - replace(__p, 1, __c_string); - } - - void replace(size_t __p, const _CharT* __i, const _CharT* __j) { - replace(__p, 1, __i, __j); - } - - void replace(size_t __p, const const_iterator& __i, - const const_iterator& __j) { - replace(__p, 1, __i, __j); - } - - void replace(size_t __p, const iterator& __i, - const iterator& __j) { - replace(__p, 1, __i, __j); - } - - // Erase, (position, size) variant. - void erase(size_t __p, size_t __n) { - _RopeRep* __result = replace(_M_tree_ptr._M_data, __p, __p + __n, 0); - _S_unref(_M_tree_ptr._M_data); - _M_tree_ptr._M_data = __result; - } - - // Erase, single character - void erase(size_t __p) { - erase(__p, __p + 1); - } - - // Insert, iterator variants. - iterator insert(const iterator& __p, const _Self& __r) - { insert(__p.index(), __r); return __p; } - iterator insert(const iterator& __p, size_t __n, _CharT __c) - { insert(__p.index(), __n, __c); return __p; } - iterator insert(const iterator& __p, _CharT __c) - { insert(__p.index(), __c); return __p; } - iterator insert(const iterator& __p ) - { insert(__p.index()); return __p; } - iterator insert(const iterator& __p, const _CharT* c_string) - { insert(__p.index(), c_string); return __p; } - iterator insert(const iterator& __p, const _CharT* __i, size_t __n) - { insert(__p.index(), __i, __n); return __p; } - iterator insert(const iterator& __p, const _CharT* __i, - const _CharT* __j) - { insert(__p.index(), __i, __j); return __p; } - iterator insert(const iterator& __p, - const const_iterator& __i, const const_iterator& __j) - { insert(__p.index(), __i, __j); return __p; } - iterator insert(const iterator& __p, - const iterator& __i, const iterator& __j) - { insert(__p.index(), __i, __j); return __p; } - - // Replace, range variants. - void replace(const iterator& __p, const iterator& __q, - const _Self& __r) - { replace(__p.index(), __q.index() - __p.index(), __r); } - void replace(const iterator& __p, const iterator& __q, _CharT __c) - { replace(__p.index(), __q.index() - __p.index(), __c); } - void replace(const iterator& __p, const iterator& __q, - const _CharT* __c_string) - { replace(__p.index(), __q.index() - __p.index(), __c_string); } - void replace(const iterator& __p, const iterator& __q, - const _CharT* __i, size_t __n) - { replace(__p.index(), __q.index() - __p.index(), __i, __n); } - void replace(const iterator& __p, const iterator& __q, - const _CharT* __i, const _CharT* __j) - { replace(__p.index(), __q.index() - __p.index(), __i, __j); } - void replace(const iterator& __p, const iterator& __q, - const const_iterator& __i, const const_iterator& __j) - { replace(__p.index(), __q.index() - __p.index(), __i, __j); } - void replace(const iterator& __p, const iterator& __q, - const iterator& __i, const iterator& __j) - { replace(__p.index(), __q.index() - __p.index(), __i, __j); } - - // Replace, iterator variants. - void replace(const iterator& __p, const _Self& __r) - { replace(__p.index(), __r); } - void replace(const iterator& __p, _CharT __c) - { replace(__p.index(), __c); } - void replace(const iterator& __p, const _CharT* __c_string) - { replace(__p.index(), __c_string); } - void replace(const iterator& __p, const _CharT* __i, size_t __n) - { replace(__p.index(), __i, __n); } - void replace(const iterator& __p, const _CharT* __i, const _CharT* __j) - { replace(__p.index(), __i, __j); } - void replace(const iterator& __p, const_iterator __i, - const_iterator __j) - { replace(__p.index(), __i, __j); } - void replace(const iterator& __p, iterator __i, iterator __j) - { replace(__p.index(), __i, __j); } - - // Iterator and range variants of erase - iterator erase(const iterator& __p, const iterator& __q) { - size_t __p_index = __p.index(); - erase(__p_index, __q.index() - __p_index); - return iterator(this, __p_index); - } - iterator erase(const iterator& __p) { - size_t __p_index = __p.index(); - erase(__p_index, 1); - return iterator(this, __p_index); - } - - _Self substr(size_t __start, size_t __len = 1) const { - return rope<_CharT,_Alloc>( - _S_substring(_M_tree_ptr._M_data, __start, __start + __len)); - } - - _Self substr(iterator __start, iterator __end) const { - return rope<_CharT,_Alloc>( - _S_substring(_M_tree_ptr._M_data, __start.index(), __end.index())); - } - - _Self substr(iterator __start) const { - size_t __pos = __start.index(); - return rope<_CharT,_Alloc>( - _S_substring(_M_tree_ptr._M_data, __pos, __pos + 1)); - } - - _Self substr(const_iterator __start, const_iterator __end) const { - // This might eventually take advantage of the cache in the - // iterator. - return rope<_CharT,_Alloc>( - _S_substring(_M_tree_ptr._M_data, __start.index(), __end.index())); - } - - rope<_CharT,_Alloc> substr(const_iterator __start) { - size_t __pos = __start.index(); - return rope<_CharT,_Alloc>( - _S_substring(_M_tree_ptr._M_data, __pos, __pos + 1)); - } - - enum { npos = -1 }; - - // static const size_type npos; - - size_type find(_CharT __c, size_type __pos = 0) const; - size_type find(const _CharT* __s, size_type __pos = 0) const { - size_type __result_pos; - const_iterator __result = search(const_begin() + (ptrdiff_t)__pos, const_end(), - __s, __s + _S_char_ptr_len(__s)); - __result_pos = __result.index(); -# ifndef _STLP_OLD_ROPE_SEMANTICS - if (__result_pos == size()) __result_pos = npos; -# endif - return __result_pos; - } - - iterator mutable_begin() { - return(iterator(this, 0)); - } - - iterator mutable_end() { - return(iterator(this, size())); - } - - reverse_iterator mutable_rbegin() { - return reverse_iterator(mutable_end()); - } - - reverse_iterator mutable_rend() { - return reverse_iterator(mutable_begin()); - } - - reference mutable_reference_at(size_type __pos) { - return reference(this, __pos); - } - -# ifdef __STD_STUFF - reference operator[] (size_type __pos) { - return reference(this, __pos); - } - - reference at(size_type __pos) { - // if (__pos >= size()) throw out_of_range; // XXX - return (*this)[__pos]; - } - - void resize(size_type, _CharT) {} - void resize(size_type) {} - void reserve(size_type = 0) {} - size_type capacity() const { - return max_size(); - } - - // Stuff below this line is dangerous because it's error prone. - // I would really like to get rid of it. - // copy function with funny arg ordering. - size_type copy(_CharT* __buffer, size_type __n, - size_type __pos = 0) const { - return copy(__pos, __n, __buffer); - } - - iterator end() { return mutable_end(); } - - iterator begin() { return mutable_begin(); } - - reverse_iterator rend() { return mutable_rend(); } - - reverse_iterator rbegin() { return mutable_rbegin(); } - -# else - - const_iterator end() { return const_end(); } - - const_iterator begin() { return const_begin(); } - - const_reverse_iterator rend() { return const_rend(); } - - const_reverse_iterator rbegin() { return const_rbegin(); } - -# endif - - __ROPE_DEFINE_ALLOCS(_Alloc, _M_tree_ptr) - }; - -# undef __ROPE_DEFINE_ALLOC -# undef __ROPE_DEFINE_ALLOCS - -template -inline _CharT -_Rope_const_iterator< _CharT, _Alloc>::operator[](size_t __n) -{ - return rope<_CharT,_Alloc>::_S_fetch(this->_M_root, this->_M_current_pos + __n); -} - -template -inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return (__x._M_current_pos == __y._M_current_pos && - __x._M_root == __y._M_root); -} - -template -inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return (__x._M_current_pos < __y._M_current_pos); -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return !(__x == __y); -} - -template -inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return __y < __x; -} - -template -inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return !(__y < __x); -} - -template -inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return !(__x < __y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -template -inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, - const _Rope_const_iterator<_CharT,_Alloc>& __y) { - return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; -} - -#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000 // dwa 8/21/97 - "ambiguous access to overloaded function" bug. -template -inline _Rope_const_iterator<_CharT,_Alloc> -operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) { - return _Rope_const_iterator<_CharT,_Alloc>( - __x._M_root, __x._M_current_pos - __n); -} -# endif - -template -inline _Rope_const_iterator<_CharT,_Alloc> -operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) { - return _Rope_const_iterator<_CharT,_Alloc>( - __x._M_root, __x._M_current_pos + __n); -} - -template -inline _Rope_const_iterator<_CharT,_Alloc> -operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x) { - return _Rope_const_iterator<_CharT,_Alloc>( - __x._M_root, __x._M_current_pos + __n); -} - -template -inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return (__x._M_current_pos == __y._M_current_pos && - __x._M_root_rope == __y._M_root_rope); -} - -template -inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return (__x._M_current_pos < __y._M_current_pos); -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return !(__x == __y); -} - -template -inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return __y < __x; -} - -template -inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return !(__y < __x); -} - -template -inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return !(__x < __y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -template -inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x, - const _Rope_iterator<_CharT,_Alloc>& __y) { - return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; -} - -#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000 // dwa 8/21/97 - "ambiguous access to overloaded function" bug. -template -inline _Rope_iterator<_CharT,_Alloc> -operator-(const _Rope_iterator<_CharT,_Alloc>& __x, - ptrdiff_t __n) { - return _Rope_iterator<_CharT,_Alloc>( - __x._M_root_rope, __x._M_current_pos - __n); -} -# endif - -template -inline _Rope_iterator<_CharT,_Alloc> -operator+(const _Rope_iterator<_CharT,_Alloc>& __x, - ptrdiff_t __n) { - return _Rope_iterator<_CharT,_Alloc>( - __x._M_root_rope, __x._M_current_pos + __n); -} - -template -inline _Rope_iterator<_CharT,_Alloc> -operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) { - return _Rope_iterator<_CharT,_Alloc>( - __x._M_root_rope, __x._M_current_pos + __n); -} - -template -inline -rope<_CharT,_Alloc> -operator+ (const rope<_CharT,_Alloc>& __left, - const rope<_CharT,_Alloc>& __right) -{ - _STLP_ASSERT(__left.get_allocator() == __right.get_allocator()) - return rope<_CharT,_Alloc>(rope<_CharT,_Alloc>::_S_concat_rep(__left._M_tree_ptr._M_data, __right._M_tree_ptr._M_data)); - // Inlining this should make it possible to keep __left and - // __right in registers. -} - -template -inline -rope<_CharT,_Alloc>& -operator+= (rope<_CharT,_Alloc>& __left, - const rope<_CharT,_Alloc>& __right) -{ - __left.append(__right); - return __left; -} - -template -inline -rope<_CharT,_Alloc> -operator+ (const rope<_CharT,_Alloc>& __left, - const _CharT* __right) { - size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right); - return rope<_CharT,_Alloc>( - rope<_CharT,_Alloc>::_S_concat_char_iter( - __left._M_tree_ptr._M_data, __right, __rlen)); -} - -template -inline -rope<_CharT,_Alloc>& -operator+= (rope<_CharT,_Alloc>& __left, - const _CharT* __right) { - __left.append(__right); - return __left; -} - -template -inline -rope<_CharT,_Alloc> -operator+ (const rope<_CharT,_Alloc>& __left, _STLP_SIMPLE_TYPE(_CharT) __right) { - return rope<_CharT,_Alloc>( - rope<_CharT,_Alloc>::_S_concat_char_iter( - __left._M_tree_ptr._M_data, &__right, 1)); -} - -template -inline -rope<_CharT,_Alloc>& -operator+= (rope<_CharT,_Alloc>& __left, _STLP_SIMPLE_TYPE(_CharT) __right) { - __left.append(__right); - return __left; -} - -template -inline bool -operator< (const rope<_CharT,_Alloc>& __left, - const rope<_CharT,_Alloc>& __right) { - return __left.compare(__right) < 0; -} - -template -inline bool -operator== (const rope<_CharT,_Alloc>& __left, - const rope<_CharT,_Alloc>& __right) { - return __left.compare(__right) == 0; -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline bool -operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { - return !(__x == __y); -} - -template -inline bool -operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { - return __y < __x; -} - -template -inline bool -operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { - return !(__y < __x); -} - -template -inline bool -operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { - return !(__x < __y); -} - -template -inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, - const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) { - return !(__x == __y); -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -template -inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, - const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) { - return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root); -} - -#ifdef _STLP_USE_NEW_IOSTREAMS -template -basic_ostream<_CharT, _Traits>& operator<< ( - basic_ostream<_CharT, _Traits>& __o, - const rope<_CharT, _Alloc>& __r); -#elif ! defined (_STLP_USE_NO_IOSTREAMS) -template -ostream& operator<< (ostream& __o, const rope<_CharT,_Alloc>& __r); -#endif - -typedef rope crope; -# ifdef _STLP_HAS_WCHAR_T -typedef rope wrope; -# endif - -inline crope::reference __mutable_reference_at(crope& __c, size_t __i) -{ - return __c.mutable_reference_at(__i); -} - -# ifdef _STLP_HAS_WCHAR_T -inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i) -{ - return __c.mutable_reference_at(__i); -} -# endif - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER - -template -inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y) { - __x.swap(__y); -} -#else - -inline void swap(crope& __x, crope& __y) { __x.swap(__y); } -# ifdef _STLP_HAS_WCHAR_T // dwa 8/21/97 -inline void swap(wrope& __x, wrope& __y) { __x.swap(__y); } -# endif - -#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ - - -// Hash functions should probably be revisited later: -_STLP_TEMPLATE_NULL struct hash -{ - size_t operator()(const crope& __str) const - { - size_t _p_size = __str.size(); - - if (0 == _p_size) return 0; - return 13*__str[0] + 5*__str[_p_size - 1] + _p_size; - } -}; - -# ifdef _STLP_HAS_WCHAR_T // dwa 8/21/97 -_STLP_TEMPLATE_NULL struct hash -{ - size_t operator()(const wrope& __str) const - { - size_t _p_size = __str.size(); - - if (0 == _p_size) return 0; - return 13*__str[0] + 5*__str[_p_size - 1] + _p_size; - } -}; -#endif - -#ifndef _STLP_MSVC -// I couldn't get this to work with VC++ -template -void -_Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first, - _Rope_iterator<_CharT,_Alloc> __middle, - _Rope_iterator<_CharT,_Alloc> __last); - -#if !defined(__GNUC__) -// Appears to confuse g++ -inline void rotate(_Rope_iterator __first, - _Rope_iterator __middle, - _Rope_iterator __last) { - _Rope_rotate(__first, __middle, __last); -} -#endif - -#endif - -template -inline _Rope_char_ref_proxy<_CharT, _Alloc>::operator _CharT () const -{ - if (_M_current_valid) { - return _M_current; - } else { - return _My_rope::_S_fetch(_M_root->_M_tree_ptr._M_data, _M_pos); - } -} -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -# endif /* _STLP_INTERNAL_ROPE_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_slist.c --- a/epoc32/include/stdapis/stlport/stl/_slist.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_SLIST_C -#define _STLP_SLIST_C - -#ifndef _STLP_INTERNAL_SLIST_H -# include -#endif - -# undef slist -# define slist __WORKAROUND_DBG_RENAME(slist) -# if defined (_STLP_NESTED_TYPE_PARAM_BUG) -# define size_type size_t -# endif - -_STLP_BEGIN_NAMESPACE - -template -_Slist_node_base* -_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, - _Slist_node_base* __last_node) { - _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next); - while (__cur != __last_node) { - _Slist_node<_Tp>* __tmp = __cur; - __cur = (_Slist_node<_Tp>*) __cur->_M_next; - _STLP_STD::_Destroy(&__tmp->_M_data); - _M_head.deallocate(__tmp,1); - } - __before_first->_M_next = __last_node; - return __last_node; -} - -template -slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x) -{ - if (&__x != this) { - _Node_base* __p1 = &this->_M_head._M_data; - _Node* __n1 = (_Node*) this->_M_head._M_data._M_next; - const _Node* __n2 = (const _Node*) __x._M_head._M_data._M_next; - while (__n1 && __n2) { - __n1->_M_data = __n2->_M_data; - __p1 = __n1; - __n1 = (_Node*) __n1->_M_next; - __n2 = (const _Node*) __n2->_M_next; - } - if (__n2 == 0) - this->_M_erase_after(__p1, 0); - else - _M_insert_after_range(__p1, const_iterator((_Node*)__n2), - const_iterator(0)); - } - return *this; -} - -template -void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { - _Node_base* __prev = &this->_M_head._M_data; - _Node* __node = (_Node*) this->_M_head._M_data._M_next; - for ( ; __node != 0 && __n > 0 ; --__n) { - __node->_M_data = __val; - __prev = __node; - __node = (_Node*) __node->_M_next; - } - if (__n > 0) - _M_insert_after_fill(__prev, __n, __val); - else - this->_M_erase_after(__prev, 0); -} - - -template -void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x) -{ - _Node_base* __cur = &this->_M_head._M_data; - while (__cur->_M_next != 0 && __len > 0) { - --__len; - __cur = __cur->_M_next; - } - if (__cur->_M_next) - this->_M_erase_after(__cur, 0); - else - _M_insert_after_fill(__cur, __len, __x); -} - -template -void slist<_Tp,_Alloc>::remove(const _Tp& __val) -{ - _Node_base* __cur = &this->_M_head._M_data; - while (__cur && __cur->_M_next) { - if (((_Node*) __cur->_M_next)->_M_data == __val) - this->_M_erase_after(__cur); - else - __cur = __cur->_M_next; - } -} - -template -void slist<_Tp,_Alloc>::unique() -{ - _Node_base* __cur = this->_M_head._M_data._M_next; - if (__cur) { - while (__cur->_M_next) { - if (((_Node*)__cur)->_M_data == - ((_Node*)(__cur->_M_next))->_M_data) - this->_M_erase_after(__cur); - else - __cur = __cur->_M_next; - } - } -} - -template -void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x) -{ - _Node_base* __n1 = &this->_M_head._M_data; - while (__n1->_M_next && __x._M_head._M_data._M_next) { - if (((_Node*) __x._M_head._M_data._M_next)->_M_data < - ((_Node*) __n1->_M_next)->_M_data) - _Sl_global_inst::__splice_after(__n1, &__x._M_head._M_data, __x._M_head._M_data._M_next); - __n1 = __n1->_M_next; - } - if (__x._M_head._M_data._M_next) { - __n1->_M_next = __x._M_head._M_data._M_next; - __x._M_head._M_data._M_next = 0; - } -} - -template -void slist<_Tp,_Alloc>::sort() -{ - if (this->_M_head._M_data._M_next && this->_M_head._M_data._M_next->_M_next) { - _Self __carry; - _Self __counter[64]; - int __fill = 0; - while (!empty()) { - _Sl_global_inst::__splice_after(&__carry._M_head._M_data, &this->_M_head._M_data, this->_M_head._M_data._M_next); - int __i = 0; - while (__i < __fill && !__counter[__i].empty()) { - __counter[__i].merge(__carry); - __carry.swap(__counter[__i]); - ++__i; - } - __carry.swap(__counter[__i]); - if (__i == __fill) - ++__fill; - } - - for (int __i = 1; __i < __fill; ++__i) - __counter[__i].merge(__counter[__i-1]); - this->swap(__counter[__fill-1]); - } -} - -# undef slist -# undef size_type - -_STLP_END_NAMESPACE - -#endif /* _STLP_SLIST_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_slist_base.c --- a/epoc32/include/stdapis/stlport/stl/_slist_base.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,109 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_SLIST_BASE_C -#define _STLP_SLIST_BASE_C - -#ifndef _STLP_INTERNAL_SLIST_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -template -_Slist_node_base* _STLP_CALL -_Sl_global<_Dummy>::__previous(_Slist_node_base* __head, - const _Slist_node_base* __node) -{ - while (__head && __head->_M_next != __node) - __head = __head->_M_next; - return __head; -} - -template -void _STLP_CALL -_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos, _Slist_node_base* __head) -{ - _Slist_node_base* __before_last = __previous(__head, 0); - if (__before_last != __head) { - _Slist_node_base* __after = __pos->_M_next; - __pos->_M_next = __head->_M_next; - __head->_M_next = 0; - __before_last->_M_next = __after; - } -} - -template -void _STLP_CALL -_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos, - _Slist_node_base* __before_first, - _Slist_node_base* __before_last) -{ - if (__pos != __before_first && __pos != __before_last) { - _Slist_node_base* __first = __before_first->_M_next; - _Slist_node_base* __after = __pos->_M_next; - __before_first->_M_next = __before_last->_M_next; - __pos->_M_next = __first; - __before_last->_M_next = __after; - } -} - -template -_Slist_node_base* _STLP_CALL -_Sl_global<_Dummy>::__reverse(_Slist_node_base* __node) -{ - _Slist_node_base* __result = __node; - __node = __node->_M_next; - __result->_M_next = 0; - while(__node) { - _Slist_node_base* __next = __node->_M_next; - __node->_M_next = __result; - __result = __node; - __node = __next; - } - return __result; -} - -template -size_t _STLP_CALL -_Sl_global<_Dummy>::size(_Slist_node_base* __node) -{ - size_t __result = 0; - for ( ; __node != 0; __node = __node->_M_next) - ++__result; - return __result; -} - -#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_SLIST_BASE_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_slist_base.h --- a/epoc32/include/stdapis/stlport/stl/_slist_base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,87 +0,0 @@ -/* - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_SLIST_BASE_H -#define _STLP_INTERNAL_SLIST_BASE_H - -#ifndef _STLP_CSTDDEF -#include -#endif - -_STLP_BEGIN_NAMESPACE - -struct _Slist_node_base -{ - _Slist_node_base* _M_next; -}; - -inline _Slist_node_base* -__slist_make_link(_Slist_node_base* __prev_node, - _Slist_node_base* __new_node) -{ - __new_node->_M_next = __prev_node->_M_next; - __prev_node->_M_next = __new_node; - return __new_node; -} - - -template -class _Sl_global { -public: - // those used to be global functions - // moved here to reduce code bloat without templatizing _Slist_iterator_base - static size_t _STLP_CALL size(_Slist_node_base* __node); - static _Slist_node_base* _STLP_CALL __reverse(_Slist_node_base* __node); - static void _STLP_CALL __splice_after(_Slist_node_base* __pos, - _Slist_node_base* __before_first, - _Slist_node_base* __before_last); - - static void _STLP_CALL __splice_after(_Slist_node_base* __pos, _Slist_node_base* __head); - - static _Slist_node_base* _STLP_CALL __previous(_Slist_node_base* __head, - const _Slist_node_base* __node); - static const _Slist_node_base* _STLP_CALL __previous(const _Slist_node_base* __head, - const _Slist_node_base* __node) { - return _Sl_global<_Dummy>::__previous((_Slist_node_base*)__head, __node); - } -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS _Sl_global; -# endif -typedef _Sl_global _Sl_global_inst; - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_SLIST_BASE_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_sstream.c --- a/epoc32/include/stdapis/stlport/stl/_sstream.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,671 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_SSTREAM_C -#define _STLP_SSTREAM_C - -#ifndef _STLP_SSTREAM_H -# include -#include -#endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -// no wint_t is supported for this mode -# define __BSB_int_type__ int -# define __BSB_pos_type__ streampos -# else -# define __BSB_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::int_type -# define __BSB_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type -# endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// Non-inline stringbuf member functions. - -// Constructors. Note that the base class constructor sets all of the -// get and area pointers to null. - -template -_STLP_EXP_DECLSPEC basic_stringbuf<_CharT, _Traits, _Alloc> - ::basic_stringbuf(ios_base::openmode __mode) - : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str() -{ -#ifdef __SYMBIAN32__ -if (_M_mode & ios_base::out) { - if (_M_mode & (ios_base::app | ios_base::ate)) - //increment the streampos to reflect the current streampos while writing - _M_str._M_stream_pos += _M_str.size(); -} -#endif -} - -template -_STLP_EXP_DECLSPEC basic_stringbuf<_CharT, _Traits, _Alloc> - ::basic_stringbuf(const basic_string<_CharT, _Traits, _Alloc>& __s, ios_base::openmode __mode) - : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str(__s) -{ -#ifdef __SYMBIAN32__ -if (_M_mode & ios_base::out) { - if (_M_mode & (ios_base::app | ios_base::ate)) - //increment the streampos to reflect the current streampos while writing - _M_str._M_stream_pos += _M_str.size(); -} -#endif - _M_set_ptrs(); -} - -template -_STLP_EXP_DECLSPEC basic_stringbuf<_CharT, _Traits, _Alloc>::~basic_stringbuf() -{} - -// Set the underlying string to a new value. -template -_STLP_EXP_DECLSPEC void -basic_stringbuf<_CharT, _Traits, _Alloc>::str(const basic_string<_CharT, _Traits, _Alloc>& __s) -{ - _M_str = __s; - _M_set_ptrs(); -} - -template -void -basic_stringbuf<_CharT, _Traits, _Alloc>::_M_set_ptrs() { - _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); - _CharT* __data_end = __data_ptr + _M_str.size(); - // The initial read position is the beginning of the string. - if (_M_mode & ios_base::in) { - if (_M_mode & ios_base::ate) - this->setg(__data_ptr, __data_end, __data_end); - else - this->setg(__data_ptr, __data_ptr, __data_end); - } - - // The initial write position is the beginning of the string. - if (_M_mode & ios_base::out) { - if (_M_mode & (ios_base::app | ios_base::ate)) - this->setp(__data_end, __data_end); - else - this->setp(__data_ptr, __data_end); - } -} - -// Precondition: gptr() >= egptr(). Returns a character, if one is available. -template -_STLP_EXP_DECLSPEC __BSB_int_type__ -basic_stringbuf<_CharT, _Traits, _Alloc>::underflow() -{ - return this->gptr() != this->egptr() - ? _Traits::to_int_type(*this->gptr()) - : _Traits::eof(); -} - -// Precondition: gptr() >= egptr(). -template -_STLP_EXP_DECLSPEC __BSB_int_type__ -basic_stringbuf<_CharT, _Traits, _Alloc>::uflow() -{ - if (this->gptr() != this->egptr()) { - int_type __c = _Traits::to_int_type(*this->gptr()); - this->gbump(1); - return __c; - } - else - return _Traits::eof(); -} - -template -_STLP_EXP_DECLSPEC __BSB_int_type__ -basic_stringbuf<_CharT, _Traits, _Alloc>::pbackfail(int_type __c) -{ - if (this->gptr() != this->eback()) { - if (!_Traits::eq_int_type(__c, _Traits::eof())) { - -if (_Traits::eq(_Traits::to_char_type(__c), this->gptr()[-1]) - || _M_mode == (ios_base::in | ios_base::out)) { - this->gbump(-1); - *this->gptr() = _Traits::to_char_type(__c); - return _Traits::not_eof(__c); - } - else{ - return _Traits::eof(); - } - } - else { - this->gbump(-1); - return _Traits::not_eof(__c); - } - } - else - return _Traits::eof(); -} - -template -_STLP_EXP_DECLSPEC __BSB_int_type__ -basic_stringbuf<_CharT, _Traits, _Alloc>::overflow(int_type __c) -{ - // fbp : reverse order of "ifs" to pass Dietmar's test. - // Apparently, standard allows overflow with eof even for read-only streams. - if (!_Traits::eq_int_type(__c, _Traits::eof())) { - if (_M_mode & ios_base::out) { - if (!(_M_mode & ios_base::in)) { - // It's a write-only streambuf, so we can use special append buffer. - if (this->pptr() == this->epptr()) - this->_M_append_buffer(); - - if (this->pptr() != this->epptr()) { - *this->pptr() = _Traits::to_char_type(__c); - this->pbump(1); - return __c; - } - else - return _Traits::eof(); - } - - else { - // We're not using a special append buffer, just the string itself. - if (this->pptr() == this->epptr()) { - ptrdiff_t __offset = this->gptr() - this->eback(); - _M_str.push_back(_Traits::to_char_type(__c)); - - _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); - size_t __data_size = _M_str.size(); - - this->setg(__data_ptr, __data_ptr + __offset, __data_ptr+__data_size); - this->setp(__data_ptr, __data_ptr + __data_size); - this->pbump((int)__data_size); - return __c; - } - else { - *this->pptr() = _Traits::to_char_type(__c); - this->pbump(1); - return __c; - } - } - } - else // Overflow always fails if it's read-only - return _Traits::eof(); - } - else // __c is EOF, so we don't have to do anything - return _Traits::not_eof(__c); -} - -template -_STLP_EXP_DECLSPEC streamsize -basic_stringbuf<_CharT, _Traits, _Alloc>::xsputn(const char_type* __s, - streamsize __n) -{ - streamsize __nwritten = 0; - - if ((_M_mode & ios_base::out) && __n > 0) { - // If the put pointer is somewhere in the middle of the string, - // then overwrite instead of append. - if (this->pbase() == _M_str.data() ) { - ptrdiff_t __avail = _M_str.data() + _M_str.size() - this->pptr(); - if (__avail > __n) { - _Traits::copy(this->pptr(), __s, __n); - this->pbump((int)__n); -#ifdef __SYMBIAN32__ - // _M_str._M_stream_pos += __n; //increment streampos to number of characters in stream -#endif - return __n; - } - else { - _Traits::copy(this->pptr(), __s, __avail); - __nwritten += __avail; - __n -= __avail; - __s += __avail; -#ifdef __SYMBIAN32__ - // _M_str._M_stream_pos += __avail;//increment streampos to number of characters in stream -#endif - this->setp(_M_Buf, _M_Buf + __STATIC_CAST(int,_S_BufSiz)); - } - } - - // At this point we know we're appending. - if (_M_mode & ios_base::in) { - ptrdiff_t __get_offset = this->gptr() - this->eback(); - _M_str.append(__s, __s + __n); - - _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); - size_t __data_size = _M_str.size(); - - this->setg(__data_ptr, __data_ptr + __get_offset, __data_ptr+__data_size); - this->setp(__data_ptr, __data_ptr + __data_size); - this->pbump((int)__data_size); - } - else { - _M_append_buffer(); -#ifdef __SYMBIAN32__ - if (_M_str._M_stream_pos >= 0 - && (_M_str._M_stream_pos < _M_str.size())) { - if((_M_str.size() - _M_str._M_stream_pos) >= __n) - _M_str.replace(_M_str._M_stream_pos, __n, __s); - else - { - _M_str.replace(_M_str._M_stream_pos, (_M_str.size() - _M_str._M_stream_pos), __s); - _M_str.append(__s + (__n - (_M_str.size() - _M_str._M_stream_pos)), __s + __n); - } - } else { - _M_str.append(__s, __s + __n); - } - _M_str._M_stream_pos += __n; -#else //__SYMBIAN32__ - _M_str.append(__s, __s + __n); -#endif // __SYMBIAN32__ - } - __nwritten += __n; - } - - return __nwritten; -} - -template -streamsize -basic_stringbuf<_CharT, _Traits, _Alloc>::_M_xsputnc(char_type __c, - streamsize __n) -{ - streamsize __nwritten = 0; - - if ((_M_mode & ios_base::out) && __n > 0) { - // If the put pointer is somewhere in the middle of the string, - // then overwrite instead of append. - if (this->pbase() == _M_str.data()) { - ptrdiff_t __avail = _M_str.data() + _M_str.size() - this->pptr(); - if (__avail > __n) { - _Traits::assign(this->pptr(), __n, __c); - this->pbump((int)__n); - return __n; - } - else { - _Traits::assign(this->pptr(), __avail, __c); - __nwritten += __avail; - __n -= __avail; - this->setp(_M_Buf, _M_Buf + __STATIC_CAST(int,_S_BufSiz)); - } - } - - // At this point we know we're appending. - if (this->_M_mode & ios_base::in) { - ptrdiff_t __get_offset = this->gptr() - this->eback(); - _M_str.append(__n, __c); - - _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); - size_t __data_size = _M_str.size(); - - this->setg(__data_ptr, __data_ptr + __get_offset, __data_ptr+__data_size); - this->setp(__data_ptr, __data_ptr + __data_size); - this->pbump((int)__data_size); - - } - else { - _M_append_buffer(); -// _M_str.append(__n, __c); -#ifdef __SYMBIAN32__ - if (_M_str._M_stream_pos >= 0 - && (_M_str._M_stream_pos < _M_str.size())) { - if((_M_str.size() - _M_str._M_stream_pos) >= __n) - _M_str.replace(_M_str._M_stream_pos,__n, __n, __c); - else - { - _M_str.replace(_M_str._M_stream_pos, (_M_str.size() - _M_str._M_stream_pos), (_M_str.size() - _M_str._M_stream_pos), __c); - _M_str.append(__n, __c); - } - } else { - _M_str.append(__n, __c); - } - _M_str._M_stream_pos += __n; -#else //__SYMBIAN32__ - _M_str.append(__n, __c); -#endif // __SYMBIAN32__ - } - - __nwritten += __n; - } - - return __nwritten; -} - -// According to the C++ standard the effects of setbuf are implementation -// defined, except that setbuf(0, 0) has no effect. In this implementation, -// setbuf(, n), for n > 0, calls reserve(n) on the underlying -// string. -template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>* -#ifdef __SYMBIAN32__ -basic_stringbuf<_CharT, _Traits, _Alloc>::setbuf(_CharT* __s, streamsize __n) -#else -basic_stringbuf<_CharT, _Traits, _Alloc>::setbuf(_CharT*, streamsize __n) -#endif //__SYMBIAN32__ -{ - if (__n > 0) { - bool __do_get_area = false; - bool __do_put_area = false; - ptrdiff_t __offg = 0; - ptrdiff_t __offp = 0; - - if (this->pbase() == _M_str.data()) { - __do_put_area = true; - __offp = this->pptr() - this->pbase(); - } - - if (this->eback() == _M_str.data()) { - __do_get_area = true; - __offg = this->gptr() - this->eback(); - } - - if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in)) - _M_append_buffer(); - - _M_str.reserve(__n); - - _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); -#ifdef __SYMBIAN32__ - size_t __data_size = __n; - memmove(__data_ptr, __s, __n*sizeof(_CharT)); - _M_str._M_start = __data_ptr; - _M_str._M_finish = __data_ptr+__n; -#else - size_t __data_size = _M_str.size(); -#endif //__SYMBIAN32__ - - if (__do_get_area) { -#ifdef __SYMBIAN32__ - this->setg(__data_ptr, __data_ptr, __data_ptr+__data_size); -#else - this->setg(__data_ptr, __data_ptr + __offg, __data_ptr+__data_size); -#endif //__SYMBIAN32__ - } - - if (__do_put_area) { - this->setp(__data_ptr, __data_ptr+__data_size); -#ifndef __SYMBIAN32__ - this->pbump((int)__offp); -#endif //__SYMBIAN32__ - } - } - - return this; -} - -template -_STLP_EXP_DECLSPEC __BSB_pos_type__ -basic_stringbuf<_CharT, _Traits, _Alloc>::seekoff(off_type __off, - ios_base::seekdir __dir, - ios_base::openmode __mode) -{ - bool __stl_in = false; - bool __stl_out = false; - - if ((__mode & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out) ) { - if (__dir == ios_base::beg || __dir == ios_base::end) - __stl_in = __stl_out = true; - } - else if (__mode & ios_base::in) - __stl_in = true; - else if (__mode & ios_base::out) - __stl_out = true; - - if (!__stl_in && !__stl_out) - return pos_type(off_type(-1)); - else if ((__stl_in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) || - (__stl_out && (!(_M_mode & ios_base::out) || this->pptr() == 0))) - return pos_type(off_type(-1)); - -#ifdef __SYMBIAN32__ - if (_M_mode & ios_base::out) -#else - if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in)) -#endif - _M_append_buffer(); - - streamoff __newoff; - switch(__dir) { - case ios_base::beg: - __newoff = 0; - break; - case ios_base::end: - __newoff = _M_str.size(); - break; - case ios_base::cur: - __newoff = __stl_in ? this->gptr() - this->eback() -#ifdef __SYMBIAN32__ - : ((this->pbase() != this->_M_str) ? _M_str._M_stream_pos - : this->pptr() - this->pbase()); -#else - : this->pptr() - this->pbase(); -#endif //__SYMBIAN32__ - break; - default: - return pos_type(off_type(-1)); - } - - __off += __newoff; - - if (__stl_in) { - ptrdiff_t __n = this->egptr() - this->eback(); - - if (__off < 0 || __off > __n) - return pos_type(off_type(-1)); - else - this->setg(this->eback(), this->eback() + __off, this->eback() + __n); - } - - if (__stl_out) { - ptrdiff_t __n; -#ifdef __SYMBIAN32__ - //if (this->pbase() != this->_M_str) { - void* __data_ptr1 = reinterpret_cast(this->pbase()); - _CharT* __data_ptr2 = __CONST_CAST(_CharT*,this->_M_str.data()); - - if (__data_ptr1 != __data_ptr2) { - __n = _M_str.size(); - } else { -#endif // __SYMBIAN32__ - __n = this->epptr() - this->pbase(); -#ifdef __SYMBIAN32__ - } -#endif //__SYMBIAN32__ - if (__off < 0 || __off > __n) - return pos_type(off_type(-1)); - else { -#ifdef __SYMBIAN32__ - void* __data_ptr1 = reinterpret_cast(this->pbase()); - _CharT* __data_ptr2 = __CONST_CAST(_CharT*,this->_M_str.data()); - - if (__data_ptr1 != __data_ptr2) { - _M_str._M_stream_pos = __off; - } else { -#endif //__SYMBIAN32__ - this->setp(this->pbase(), this->pbase() + __n); - this->pbump((int)__off); -#ifdef __SYMBIAN32__ - } -#endif // __SYMBIAN32__ - } - } - - return pos_type(__off); -} - -template -_STLP_EXP_DECLSPEC __BSB_pos_type__ -basic_stringbuf<_CharT, _Traits, _Alloc> - ::seekpos(pos_type __pos, ios_base::openmode __mode) -{ - bool __stl_in = (__mode & ios_base::in) != 0; - bool __stl_out = (__mode & ios_base::out) != 0; - - if ((__stl_in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) || - (__stl_out && (!(_M_mode & ios_base::out) || this->pptr() == 0)) || - (!__stl_in && !__stl_out)) - return pos_type(off_type(-1)); - - const off_type __n = __pos - pos_type(off_type(0)); - if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in)) - _M_append_buffer(); - - if (__stl_in) { - if (__n < 0 || __n > this->egptr() - this->eback()) - return pos_type(off_type(-1)); - this->setg(this->eback(), this->eback() + __n, this->egptr()); - } - - if (__stl_out) { - if (__n < 0 || size_t(__n) > _M_str.size()) - return pos_type(off_type(-1)); - - _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); - size_t __data_size = _M_str.size(); - - this->setp(__data_ptr, __data_ptr+__data_size); - this->pbump((int)__n); - } - - return __pos; -} - -// This is declared as a const member function because it is -// called by basic_stringbuf<>::str(). Precondition: this is a -// write-only stringbuf. We can't use an output buffer for read- -// write stringbufs. Postcondition: pptr is reset to the beginning -// of the buffer. -template -void basic_stringbuf<_CharT, _Traits, _Alloc>::_M_append_buffer() const - -{ - // Do we have a buffer to append? - if (this->pbase() == this->_M_Buf && this->pptr() != this->_M_Buf) { - basic_stringbuf<_CharT, _Traits, _Alloc>* __this = __CONST_CAST(_Self*,this); -#ifdef __SYMBIAN32__ - size_t __n = this->pptr() - this->pbase(); - if (__this->_M_str._M_stream_pos >= 0 - && (__this->_M_str._M_stream_pos != __this->_M_str.size())) { - { - *(this->pptr()) = (_CharT)0; -#ifdef __SYMBIAN32__ - __this->_M_str.replace(_M_str._M_stream_pos, __n, (const _CharT*)this->pbase(), (const _CharT*)this->pptr()-(const _CharT*)this->pbase()); -#else - __this->_M_str.replace(_M_str._M_stream_pos, __n, (const _CharT*)this->pbase()); - -#endif - } - } else { - __this->_M_str.append((const _CharT*)this->pbase(), (const _CharT*)this->pptr()); - } - __this->_M_str._M_stream_pos += __n; -#else // __SYMBAIN32__ - __this->_M_str.append((const _CharT*)this->pbase(), (const _CharT*)this->pptr()); -#endif // __SYMBIAN32__ - __this->setp(__CONST_CAST(_CharT*,_M_Buf), - __CONST_CAST(_CharT*,_M_Buf + __STATIC_CAST(int,_S_BufSiz))); - } - - // Have we run off the end of the string? - else if (this->pptr() == this->epptr()) { - basic_stringbuf<_CharT, _Traits, _Alloc>* __this = __CONST_CAST(_Self*,this); - __this->setp(__CONST_CAST(_CharT*,_M_Buf), - __CONST_CAST(_CharT*,_M_Buf + __STATIC_CAST(int,_S_BufSiz))); - __this->_M_str._M_stream_pos = __this->_M_str._M_finish - __this->_M_str._M_start; - } -} - -//---------------------------------------------------------------------- -// Non-inline istringstream member functions. - -template -basic_istringstream<_CharT, _Traits, _Alloc> - ::basic_istringstream(ios_base::openmode __mode) - : basic_istream<_CharT, _Traits>(0), - _M_buf(__mode | ios_base::in) -{ - this->init(&_M_buf); -} - -template -basic_istringstream<_CharT, _Traits, _Alloc> - ::basic_istringstream(const _String& __str,ios_base::openmode __mode) - : basic_istream<_CharT, _Traits>(0), - _M_buf(__str, __mode | ios_base::in) -{ - this->init(&_M_buf); -} - -template -basic_istringstream<_CharT, _Traits, _Alloc>::~basic_istringstream() -{} - -//---------------------------------------------------------------------- -// Non-inline ostringstream member functions. - -template -basic_ostringstream<_CharT, _Traits, _Alloc> - ::basic_ostringstream(ios_base::openmode __mode) - : basic_ostream<_CharT, _Traits>(0), - _M_buf(__mode | ios_base::out) -{ - this->init(&_M_buf); -} - -template -basic_ostringstream<_CharT, _Traits, _Alloc> - ::basic_ostringstream(const _String& __str, ios_base::openmode __mode) - : basic_ostream<_CharT, _Traits>(0), - _M_buf(__str, __mode | ios_base::out) -{ - this->init(&_M_buf); -} - -template -basic_ostringstream<_CharT, _Traits, _Alloc>::~basic_ostringstream() -{} - -//---------------------------------------------------------------------- -// Non-inline stringstream member functions. - -template -_STLP_EXP_DECLSPEC basic_stringstream<_CharT, _Traits, _Alloc> - ::basic_stringstream(ios_base::openmode __mode) - : basic_iostream<_CharT, _Traits>(0), _M_buf(__mode) -{ - this->init(&_M_buf); -} - -template -_STLP_EXP_DECLSPEC basic_stringstream<_CharT, _Traits, _Alloc> - ::basic_stringstream(const _String& __str, ios_base::openmode __mode) - : basic_iostream<_CharT, _Traits>(0), _M_buf(__str, __mode) -{ - this->init(&_M_buf); -} - -template -basic_stringstream<_CharT, _Traits, _Alloc>::~basic_stringstream() -{} - -_STLP_END_NAMESPACE - -# undef __BSB_int_type__ -# undef __BSB_pos_type__ - -# endif /* EXPOSE */ - -#endif /* _STLP_SSTREAM_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_sstream.h --- a/epoc32/include/stdapis/stlport/stl/_sstream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,273 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - -// This header defines classes basic_stringbuf, basic_istringstream, -// basic_ostringstream, and basic_stringstream. These classes -// represent streamsbufs and streams whose sources or destinations are -// C++ strings. - -#ifndef _STLP_SSTREAM_H -#define _STLP_SSTREAM_H - -#ifndef _STLP_INTERNAL_STREAMBUF -# include -#endif - -#ifndef _STLP_INTERNAL_ISTREAM_H -# include // Includes , , -#endif - -#ifndef _STLP_STRING_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// This version of basic_stringbuf relies on the internal details of -// basic_string. It relies on the fact that, in this implementation, -// basic_string's iterators are pointers. It also assumes (as allowed -// by the standard) that _CharT is a POD type. - -// We have a very small buffer for the put area, just so that we don't -// have to use append() for every sputc. Conceptually, the buffer -// immediately follows the end of the underlying string. We use this -// buffer when appending to write-only streambufs, but we don't use it -// for read-write streambufs. - -template -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS ( basic_stringbuf ) : public basic_streambuf<_CharT, _Traits> -#else -class basic_stringbuf : public basic_streambuf<_CharT, _Traits> -#endif -{ -public: // Typedefs. - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_streambuf<_CharT, _Traits> _Base; - typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Self; - typedef basic_string<_CharT, _Traits, _Alloc> _String; - -public: // Constructors, destructor. - _STLP_DECLSPEC explicit basic_stringbuf(ios_base::openmode __mode - = ios_base::in | ios_base::out); - _STLP_DECLSPEC explicit basic_stringbuf(const _String& __s, ios_base::openmode __mode - = ios_base::in | ios_base::out); - _STLP_DECLSPEC virtual ~basic_stringbuf(); - -public: // Get or set the string. - _String str() const { - if ( _M_mode & ios_base::out ) - _M_append_buffer(); - return _M_str; - } - _STLP_DECLSPEC void str(const _String& __s); - -protected: // Overridden virtual member functions. - virtual int_type underflow(); - virtual int_type uflow(); - virtual int_type pbackfail(int_type __c); - virtual int_type overflow(int_type __c); - int_type pbackfail() {return pbackfail(_Traits::eof());} - int_type overflow() {return overflow(_Traits::eof());} - - virtual streamsize xsputn(const char_type* __s, streamsize __n); - virtual streamsize _M_xsputnc(char_type __c, streamsize __n); - - virtual _Base* setbuf(_CharT* __buf, streamsize __n); - virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir, - ios_base::openmode __mode - = ios_base::in | ios_base::out); - virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode - = ios_base::in | ios_base::out); - ios_base::openmode _M_mode; - -private: // Helper functions. - // Append the internal buffer to the string if necessary. - void _M_append_buffer() const; - void _M_set_ptrs(); - -private: - mutable basic_string<_CharT, _Traits, _Alloc> _M_str; - - enum _JustName { _S_BufSiz = 8 }; - _CharT _M_Buf[ 8 /* _S_BufSiz */]; -}; - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf, allocator >; -# if !defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf, allocator >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -//---------------------------------------------------------------------- -// Class basic_istringstream, an input stream that uses a stringbuf. - -template -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS ( basic_istringstream ) : public basic_istream<_CharT, _Traits> -#else -class basic_istringstream : public basic_istream<_CharT, _Traits> -#endif -{ -public: // Typedefs - typedef typename _Traits::char_type char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_istream<_CharT, _Traits> _Base; - typedef basic_string<_CharT, _Traits, _Alloc> _String; - typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf; - -public: // Constructors, destructor. - basic_istringstream(ios_base::openmode __mode = ios_base::in); - basic_istringstream(const _String& __str, - ios_base::openmode __mode = ios_base::in); - ~basic_istringstream(); - -public: // Member functions - - basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const - { return __CONST_CAST(_Buf*,&_M_buf); } - - _String str() const { return _M_buf.str(); } - void str(const _String& __s) { _M_buf.str(__s); } - -private: - basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf; -}; - - -//---------------------------------------------------------------------- -// Class basic_ostringstream, an output stream that uses a stringbuf. - -template -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS ( basic_ostringstream ) : public basic_ostream<_CharT, _Traits> -#else -class basic_ostringstream : public basic_ostream<_CharT, _Traits> -#endif -{ -public: // Typedefs - typedef typename _Traits::char_type char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_ostream<_CharT, _Traits> _Base; - typedef basic_string<_CharT, _Traits, _Alloc> _String; - typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf; - -public: // Constructors, destructor. - basic_ostringstream(ios_base::openmode __mode = ios_base::out); - basic_ostringstream(const _String& __str, - ios_base::openmode __mode = ios_base::out); - ~basic_ostringstream(); - -public: // Member functions. - - basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const - { return __CONST_CAST(_Buf*,&_M_buf); } - - _String str() const { return _M_buf.str(); } - void str(const _String& __s) { _M_buf.str(__s); } // dwa 02/07/00 - BUG STOMPER DAVE - - -private: - basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf; -}; - - -//---------------------------------------------------------------------- -// Class basic_stringstream, a bidirectional stream that uses a stringbuf. - -template -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS ( basic_stringstream ) : public basic_iostream<_CharT, _Traits> -#else -class basic_stringstream : public basic_iostream<_CharT, _Traits> -#endif -{ -public: // Typedefs - typedef typename _Traits::char_type char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - - typedef basic_ios<_CharT, _Traits> _Basic_ios; - typedef basic_iostream<_CharT, _Traits> _Base; - typedef basic_string<_CharT, _Traits, _Alloc> _String; - typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf; - - typedef ios_base::openmode openmode; - -public: // Constructors, destructor. - _STLP_DECLSPEC basic_stringstream(openmode __mod = ios_base::in | ios_base::out); - _STLP_DECLSPEC basic_stringstream(const _String& __str, - openmode __mod = ios_base::in | ios_base::out); - ~basic_stringstream(); - -public: // Member functions. - - basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const - { return __CONST_CAST(_Buf*,&_M_buf); } - - _String str() const { return _M_buf.str(); } - void str(const _String& __s) { _M_buf.str(__s); } - -private: - basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf; -}; - - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream, allocator >; -_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream, allocator >; -_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream, allocator >; -# if !defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream, allocator >; -_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream, allocator >; -_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream, allocator >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_SSTREAM_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_stack.h --- a/epoc32/include/stdapis/stlport/stl/_stack.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_STACK_H -#define _STLP_INTERNAL_STACK_H - -#ifndef _STLP_INTERNAL_DEQUE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -# if !defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) -template > -# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS ) -# define _STLP_STACK_ARGS _Tp -template -# else -template -# endif -class stack { - -# ifdef _STLP_STACK_ARGS - typedef deque<_Tp> _Sequence; -# endif - -public: - typedef typename _Sequence::value_type value_type; - typedef typename _Sequence::size_type size_type; - typedef _Sequence container_type; - - typedef typename _Sequence::reference reference; - typedef typename _Sequence::const_reference const_reference; -protected: - _Sequence c; -public: - stack() : c() {} - explicit stack(const _Sequence& __s) : c(__s) {} - - bool empty() const { return c.empty(); } - size_type size() const { return c.size(); } - reference top() { return c.back(); } - const_reference top() const { return c.back(); } - void push(const value_type& __x) { c.push_back(__x); } - void pop() { c.pop_back(); } - const _Sequence& _Get_c() const { return c; } -}; - -# ifndef _STLP_STACK_ARGS -# define _STLP_STACK_ARGS _Tp, _Sequence -# define _STLP_STACK_HEADER_ARGS class _Tp, class _Sequence -# else -# define _STLP_STACK_HEADER_ARGS class _Tp -# endif - -template < _STLP_STACK_HEADER_ARGS > -inline bool _STLP_CALL operator==(const stack< _STLP_STACK_ARGS >& __x, const stack< _STLP_STACK_ARGS >& __y) -{ - return __x._Get_c() == __y._Get_c(); -} - -template < _STLP_STACK_HEADER_ARGS > -inline bool _STLP_CALL operator<(const stack< _STLP_STACK_ARGS >& __x, const stack< _STLP_STACK_ARGS >& __y) -{ - return __x._Get_c() < __y._Get_c(); -} - -_STLP_RELOPS_OPERATORS(template < _STLP_STACK_HEADER_ARGS >, stack< _STLP_STACK_ARGS >) - -_STLP_END_NAMESPACE - -# undef _STLP_STACK_ARGS -# undef _STLP_STACK_HEADER_ARGS - -#endif /* _STLP_INTERNAL_STACK_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_stream_iterator.h --- a/epoc32/include/stdapis/stlport/stl/_stream_iterator.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,343 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996-1998 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#if !defined (_STLP_INTERNAL_STREAM_ITERATOR_H) && ! defined (_STLP_USE_NO_IOSTREAMS) -#define _STLP_INTERNAL_STREAM_ITERATOR_H - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -// streambuf_iterators predeclarations must appear first -#ifndef _STLP_IOSFWD -# include -#endif - -#ifndef _STLP_INTERNAL_ALGOBASE_H -#include -#endif - -#if defined (_STLP_OWN_IOSTREAMS) - -#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H -# include -#endif - -#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H -# include -#endif - -#ifndef _STLP_INTERNAL_ISTREAM_H -# include -#endif -#endif /* _STLP_OWN_IOSTREAMS */ - -// istream_iterator and ostream_iterator look very different if we're -// using new, templatized iostreams than if we're using the old cfront -// version. - -# if defined (_STLP_USE_NEW_IOSTREAMS) - -_STLP_BEGIN_NAMESPACE - -# ifndef _STLP_LIMITED_DEFAULT_TEMPLATES -template , - class _Dist = ptrdiff_t> -# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _CharT, class _Traits, class _Dist -# define __ISI_TMPL_ARGUMENTS _Tp, _CharT, _Traits, _Dist -class istream_iterator : public iterator { -# else - -# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) -# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp -# define __ISI_TMPL_ARGUMENTS _Tp -template -class istream_iterator : public iterator { -# else -# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist -# define __ISI_TMPL_ARGUMENTS _Tp, _Dist -template -class istream_iterator : public iterator { -# endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */ - -# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */ - -# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES - typedef char _CharT; - typedef char_traits _Traits; -# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) - typedef ptrdiff_t _Dist; -# endif -# endif - - typedef istream_iterator< __ISI_TMPL_ARGUMENTS > _Self; -public: - typedef _CharT char_type; - typedef _Traits traits_type; - typedef basic_istream<_CharT, _Traits> istream_type; - - typedef input_iterator_tag iterator_category; - typedef _Tp value_type; - typedef _Dist difference_type; - typedef const _Tp* pointer; - typedef const _Tp& reference; - - istream_iterator() : _M_stream(0), _M_ok(false) {} - istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); } - - reference operator*() const { return _M_value; } - - _STLP_DEFINE_ARROW_OPERATOR - - _Self& operator++() { - _M_read(); - return *this; - } - _Self operator++(int) { - _Self __tmp = *this; - _M_read(); - return __tmp; - } - - bool _M_equal(const _Self& __x) const - { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } - -private: - istream_type* _M_stream; - _Tp _M_value; - bool _M_ok; - - void _M_read() { - _M_ok = (_M_stream && *_M_stream) ? true : false; - if (_M_ok) { - *_M_stream >> _M_value; - _M_ok = *_M_stream ? true : false; - } - } -}; - -#ifndef _STLP_LIMITED_DEFAULT_TEMPLATES -template > -#else -template -#endif -class ostream_iterator: public iterator { -# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES - typedef char _CharT; - typedef char_traits _Traits; - typedef ostream_iterator<_TpP> _Self; -# else - typedef ostream_iterator<_TpP, _CharT, _Traits> _Self; -# endif -public: - typedef _CharT char_type; - typedef _Traits traits_type; - typedef basic_ostream<_CharT, _Traits> ostream_type; - - typedef output_iterator_tag iterator_category; - - ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} - ostream_iterator(ostream_type& __s, const _CharT* __c) - : _M_stream(&__s), _M_string(__c) {} - _Self& operator=(const _TpP& __val) { - *_M_stream << __val; - if (_M_string) *_M_stream << _M_string; - return *this; - } - _Self& operator*() { return *this; } - _Self& operator++() { return *this; } - _Self& operator++(int) { return *this; } -private: - ostream_type* _M_stream; - const _CharT* _M_string; -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES -template -inline output_iterator_tag _STLP_CALL -iterator_category(const ostream_iterator<_TpP>&) { return output_iterator_tag(); } -# else -template -inline output_iterator_tag _STLP_CALL -iterator_category(const ostream_iterator<_TpP, _CharT, _Traits>&) { return output_iterator_tag(); } -# endif -# endif - -_STLP_END_NAMESPACE - -# elif ! defined(_STLP_USE_NO_IOSTREAMS) - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) -# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp -# define __ISI_TMPL_ARGUMENTS _Tp -template -class istream_iterator : public iterator { -# else -# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist -# define __ISI_TMPL_ARGUMENTS _Tp, _Dist -template -class istream_iterator : public iterator { -# endif - -protected: - istream* _M_stream; - _Tp _M_value; - bool _M_end_marker; - void _M_read() { - _M_end_marker = (*_M_stream) ? true : false; - if (_M_end_marker) *_M_stream >> _M_value; - _M_end_marker = (*_M_stream) ? true : false; -} -public: - typedef input_iterator_tag iterator_category; - typedef _Tp value_type; - typedef _Dist difference_type; - typedef const _Tp* pointer; - typedef const _Tp& reference; - - istream_iterator() : _M_stream(&cin), _M_end_marker(false) {} - istream_iterator(istream& __s) : _M_stream(&__s) { _M_read(); } - reference operator*() const { return _M_value; } - - _STLP_DEFINE_ARROW_OPERATOR - - istream_iterator< __ISI_TMPL_ARGUMENTS >& operator++() { - _M_read(); - return *this; - } - istream_iterator< __ISI_TMPL_ARGUMENTS > operator++(int) { - istream_iterator< __ISI_TMPL_ARGUMENTS > __tmp = *this; - _M_read(); - return __tmp; - } - inline bool _M_equal(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) const { - return (_M_stream == __y._M_stream && - _M_end_marker == __y._M_end_marker) || - _M_end_marker == false && __y._M_end_marker == false; - } -}; - -template -class ostream_iterator { -protected: - ostream* _M_stream; - const char* _M_string; -public: - typedef output_iterator_tag iterator_category; -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; -# endif - ostream_iterator(ostream& __s) : _M_stream(&__s), _M_string(0) {} - ostream_iterator(ostream& __s, const char* __c) - : _M_stream(&__s), _M_string(__c) {} - ostream_iterator<_Tp>& operator=(const _Tp& __val) { - *_M_stream << __val; - if (_M_string) *_M_stream << _M_string; - return *this; - } - ostream_iterator<_Tp>& operator*() { return *this; } - ostream_iterator<_Tp>& operator++() { return *this; } - ostream_iterator<_Tp>& operator++(int) { return *this; } -}; - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template inline output_iterator_tag -iterator_category(const ostream_iterator<_Tp>&) { return output_iterator_tag(); } -#endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_USE_NEW_IOSTREAMS */ - -// form-independent definiotion of stream iterators -_STLP_BEGIN_NAMESPACE - -template < __ISI_TMPL_HEADER_ARGUMENTS > -inline bool _STLP_CALL -operator==(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x, - const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) { - return __x._M_equal(__y); -} - -# ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template < __ISI_TMPL_HEADER_ARGUMENTS > -inline bool _STLP_CALL -operator!=(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x, - const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) { - return !__x._M_equal(__y); -} - -# endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES -template < __ISI_TMPL_HEADER_ARGUMENTS > -inline input_iterator_tag _STLP_CALL -iterator_category(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) -{ return input_iterator_tag(); } -template < __ISI_TMPL_HEADER_ARGUMENTS > -inline _Tp* _STLP_CALL -value_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Tp*) 0; } - -# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) -template < __ISI_TMPL_HEADER_ARGUMENTS > -inline ptrdiff_t* _STLP_CALL -distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (ptrdiff_t*)0; } -# else -template < __ISI_TMPL_HEADER_ARGUMENTS > -inline _Dist* _STLP_CALL -distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Dist*)0; } -# endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */ - -# endif - -_STLP_END_NAMESPACE - -# undef __ISI_TMPL_HEADER_ARGUMENTS -# undef __ISI_TMPL_ARGUMENTS - - -#endif /* _STLP_INTERNAL_STREAM_ITERATOR_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_streambuf.c --- a/epoc32/include/stdapis/stlport/stl/_streambuf.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,218 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_STREAMBUF_C -#define _STLP_STREAMBUF_C - -#ifndef _STLP_INTERNAL_STREAMBUF -# include -#endif - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -_STLP_BEGIN_NAMESPACE -//---------------------------------------------------------------------- -// Non-inline basic_streambuf<> member functions. - -template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>::basic_streambuf() - : _M_gbegin(0), _M_gnext(0), _M_gend(0), - _M_pbegin(0), _M_pnext(0), _M_pend(0), - _M_locale() -{ - // _M_lock._M_initialize(); -} - -template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>::~basic_streambuf() -{} - - -template -_STLP_EXP_DECLSPEC locale -basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) { - this->imbue(__loc); - locale __tmp = _M_locale; - _M_locale = __loc; - return __tmp; -} - -template -_STLP_EXP_DECLSPEC streamsize -basic_streambuf<_CharT, _Traits>::xsgetn(_CharT* __s, streamsize __n) -{ - streamsize __result = 0; - const int_type __eof = _Traits::eof(); - - while (__result < __n) { - if (_M_gnext < _M_gend) { - size_t __chunk = (min) (__STATIC_CAST(size_t,_M_gend - _M_gnext), - __STATIC_CAST(size_t,__n - __result)); - _Traits::copy(__s, _M_gnext, __chunk); - __result += __chunk; - __s += __chunk; - _M_gnext += __chunk; - } - else { - int_type __c = this->sbumpc(); - if (!_Traits::eq_int_type(__c, __eof)) { - *__s = __c; - ++__result; - ++__s; - } - else - break; - } - } - - return __result; -} - -template -_STLP_EXP_DECLSPEC streamsize -basic_streambuf<_CharT, _Traits>::xsputn(const _CharT* __s, streamsize __n) -{ - streamsize __result = 0; - const int_type __eof = _Traits::eof(); - - while (__result < __n) { - if (_M_pnext < _M_pend) { - size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext), - __STATIC_CAST(size_t,__n - __result)); - _Traits::copy(_M_pnext, __s, __chunk); - __result += __chunk; - __s += __chunk; - _M_pnext += __chunk; - } - - else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(*__s)), - __eof)) { - ++__result; - ++__s; - } - else - break; - } - return __result; -} - -template -_STLP_EXP_DECLSPEC streamsize -basic_streambuf<_CharT, _Traits>::_M_xsputnc(_CharT __c, streamsize __n) -{ - streamsize __result = 0; - const int_type __eof = _Traits::eof(); - - while (__result < __n) { - if (_M_pnext < _M_pend) { - size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext), - __STATIC_CAST(size_t,__n - __result)); - _Traits::assign(_M_pnext, __chunk, __c); - __result += __chunk; - _M_pnext += __chunk; - } - - else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(__c)), - __eof)) - ++__result; - else - break; - } - return __result; -} - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::_M_snextc_aux() -{ - int_type __eof = _Traits::eof(); - if (_M_gend == _M_gnext) - return _Traits::eq_int_type(this->uflow(), __eof) ? __eof : this->sgetc(); - else { - _M_gnext = _M_gend; - return this->underflow(); - } -} - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::pbackfail(int_type) { - return _Traits::eof(); -} - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::overflow(int_type) { - return _Traits::eof(); -} - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::uflow() { - return ( _Traits::eq_int_type(this->underflow(),_Traits::eof()) ? - _Traits::eof() : - _Traits::to_int_type(*_M_gnext++)); -} - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type -basic_streambuf<_CharT, _Traits>::underflow() -{ return _Traits::eof(); } - -template -_STLP_EXP_DECLSPEC streamsize -basic_streambuf<_CharT, _Traits>::showmanyc() -{ return 0; } - -template -_STLP_EXP_DECLSPEC void -basic_streambuf<_CharT, _Traits>::imbue(const locale&) {} - -template -_STLP_EXP_DECLSPEC int -basic_streambuf<_CharT, _Traits>::sync() { return 0; } - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type -basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode) -{ return pos_type(-1); } - -template -_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type -basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir, - ios_base::openmode) -{ return pos_type(-1); } - -template -_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>* -basic_streambuf<_CharT, _Traits>:: setbuf(char_type*, streamsize) -{ return this; } - - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -# if !defined (_STLP_NO_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS basic_streambuf >; -# endif -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -_STLP_END_NAMESPACE - -# endif /* EXPOSE */ - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_streambuf.h --- a/epoc32/include/stdapis/stlport/stl/_streambuf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,537 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_INTERNAL_STREAMBUF -#define _STLP_INTERNAL_STREAMBUF - -#ifndef _STLP_IOS_BASE_H -#include // Needed for ios_base bitfield members. - // includes . -#endif - -#ifndef _STLP_STDIO_FILE_H -#include // Declaration of struct FILE, and of - // functions to manipulate it. -#endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// Class basic_streambuf<>, the base class of the streambuf hierarchy. - -// A basic_streambuf<> manages an input (get) area and an output (put) -// area. Each is described by three pointers: a beginning, an end, and a -// current position. basic_streambuf<> contains some very simple member -// functions that manipulate those six pointers, but almost all of the real -// functionality gets delegated to protected virtual member functions. -// All of the public member functions are inline, and most of the protected -// member functions are virtual. - -// Although basic_streambuf<> is not abstract, it is useful only as a base -// class. Its virtual member functions have default definitions such that -// reading from a basic_streambuf<> will always yield EOF, and writing to a -// basic_streambuf<> will always fail. - -// The second template parameter, _Traits, defaults to char_traits<_CharT>. -// The default is declared in header , and it isn't declared here -// because C++ language rules do not allow it to be declared twice. - -template -#ifdef __SYMBIAN32__ -class basic_streambuf -#else -class basic_streambuf -#endif -{ - friend class basic_istream<_CharT, _Traits>; - friend class basic_ostream<_CharT, _Traits>; - -public: // Typedefs. - typedef _CharT char_type; - typedef typename _Traits::int_type int_type; - typedef typename _Traits::pos_type pos_type; - typedef typename _Traits::off_type off_type; - typedef _Traits traits_type; - -private: // Data members. - - char_type* _M_gbegin; // Beginning of get area - char_type* _M_gnext; // Current position within the get area - char_type* _M_gend; // End of get area - - char_type* _M_pbegin; // Beginning of put area - char_type* _M_pnext; // Current position within the put area - char_type* _M_pend; // End of put area - - locale _M_locale; // The streambuf's locale object - -public: // Extension: locking, for thread safety. - _STLP_mutex _M_lock; - -public: // Destructor. - _STLP_DECLSPEC virtual ~basic_streambuf(); - -protected: // The default constructor. - _STLP_DECLSPEC basic_streambuf(); - -protected: // Protected interface to the get area. - char_type* eback() const { return _M_gbegin; } // Beginning - char_type* gptr() const { return _M_gnext; } // Current position - char_type* egptr() const { return _M_gend; } // End - - void gbump(int __n) { _M_gnext += __n; } - void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) { - _M_gbegin = __gbegin; - _M_gnext = __gnext; - _M_gend = __gend; - } - -public: - // An alternate public interface to the above functions - // which allows us to avoid using templated friends which - // are not supported on some compilers. - - char_type* _M_eback() const { return eback(); } - char_type* _M_gptr() const { return gptr(); } - char_type* _M_egptr() const { return egptr(); } - void _M_gbump(int __n) { gbump(__n); } - void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) - { setg(__gbegin, __gnext, __gend); } - -protected: // Protected interface to the put area - - char_type* pbase() const { return _M_pbegin; } // Beginning - char_type* pptr() const { return _M_pnext; } // Current position - char_type* epptr() const { return _M_pend; } // End - - void pbump(int __n) { _M_pnext += __n; } - void setp(char_type* __pbegin, char_type* __pend) { - _M_pbegin = __pbegin; - _M_pnext = __pbegin; - _M_pend = __pend; - } - -protected: // Virtual buffer management functions. - - _STLP_DECLSPEC virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize); - - // Alters the stream position, using an integer offset. In this - // class seekoff does nothing; subclasses are expected to override it. - _STLP_DECLSPEC virtual pos_type seekoff(off_type, ios_base::seekdir, - ios_base::openmode = ios_base::in | ios_base::out); - - // Alters the stream position, using a previously obtained streampos. In - // this class seekpos does nothing; subclasses are expected to override it. - _STLP_DECLSPEC virtual pos_type - seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out); - - // Synchronizes (i.e. flushes) the buffer. All subclasses are expected to - // override this virtual member function. - _STLP_DECLSPEC virtual int sync(); - - -public: // Buffer management. - basic_streambuf<_CharT, _Traits>* pubsetbuf(char_type* __s, streamsize __n) - { return this->setbuf(__s, __n); } - - pos_type pubseekoff(off_type __offset, ios_base::seekdir __way, - ios_base::openmode __mod = ios_base::in | ios_base::out) - { return this->seekoff(__offset, __way, __mod); } - - pos_type pubseekpos(pos_type __sp, - ios_base::openmode __mod = ios_base::in | ios_base::out) - { return this->seekpos(__sp, __mod); } - - int pubsync() { return this->sync(); } - -protected: // Virtual get area functions, as defined in - // 17.5.2.4.3 and 17.5.2.4.4 of the standard. - // Returns a lower bound on the number of characters that we can read, - // with underflow, before reaching end of file. (-1 is a special value: - // it means that underflow will fail.) Most subclasses should probably - // override this virtual member function. - _STLP_DECLSPEC virtual streamsize showmanyc(); - - // Reads up to __n characters. Return value is the number of - // characters read. - _STLP_DECLSPEC virtual streamsize xsgetn(char_type* __s, streamsize __n); - - // Called when there is no read position, i.e. when gptr() is null - // or when gptr() >= egptr(). Subclasses are expected to override - // this virtual member function. - _STLP_DECLSPEC virtual int_type underflow(); - - // Similar to underflow(), but used for unbuffered input. Most - // subclasses should probably override this virtual member function. - _STLP_DECLSPEC virtual int_type uflow(); - - // Called when there is no putback position, i.e. when gptr() is null - // or when gptr() == eback(). All subclasses are expected to override - // this virtual member function. - _STLP_DECLSPEC virtual int_type pbackfail(int_type = traits_type::eof()); - -protected: // Virtual put area functions, as defined in - // 27.5.2.4.5 of the standard. - - // Writes up to __n characters. Return value is the number of characters - // written. - _STLP_DECLSPEC virtual streamsize xsputn(const char_type* __s, streamsize __n); - - // Extension: writes up to __n copies of __c. Return value is the number - // of characters written. - _STLP_DECLSPEC virtual streamsize _M_xsputnc(char_type __c, streamsize __n); - - // Called when there is no write position. All subclasses are expected to - // override this virtual member function. - _STLP_DECLSPEC virtual int_type overflow(int_type = traits_type::eof()); - -public: // Public members for writing characters. - // Write a single character. - int_type sputc(char_type __c) { - return ((_M_pnext < _M_pend) ? _Traits::to_int_type(*_M_pnext++ = __c) - : this->overflow(_Traits::to_int_type(__c))); - } - - // Write __n characters. - streamsize sputn(const char_type* __s, streamsize __n) - { return this->xsputn(__s, __n); } - - // Extension: write __n copies of __c. - streamsize _M_sputnc(char_type __c, streamsize __n) - { return this->_M_xsputnc(__c, __n); } - -private: // Helper functions. - _STLP_DECLSPEC int_type _M_snextc_aux(); - - -public: // Public members for reading characters. - streamsize in_avail() { - return (_M_gnext < _M_gend) ? (_M_gend - _M_gnext) : this->showmanyc(); - } - - // Advance to the next character and return it. - int_type snextc() { - return ( _M_gend - _M_gnext > 1 ? - _Traits::to_int_type(*++_M_gnext) : - this->_M_snextc_aux()); - } - - // Return the current character and advance to the next. - int_type sbumpc() { - return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext++) - : this->uflow(); - } - - // Return the current character without advancing to the next. - int_type sgetc() { - return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext) - : this->underflow(); - } - - streamsize sgetn(char_type* __s, streamsize __n) - { return this->xsgetn(__s, __n); } - - int_type sputbackc(char_type __c) { - return ((_M_gbegin < _M_gnext) && _Traits::eq(__c, *(_M_gnext - 1))) - ? _Traits::to_int_type(*--_M_gnext) - : this->pbackfail(_Traits::to_int_type(__c)); - } - - int_type sungetc() { - return (_M_gbegin < _M_gnext) - ? _Traits::to_int_type(*--_M_gnext) - : this->pbackfail(); - } - -protected: // Virtual locale functions. - - // This is a hook, called by pubimbue() just before pubimbue() - // sets the streambuf's locale to __loc. Note that imbue should - // not (and cannot, since it has no access to streambuf's private - // members) set the streambuf's locale itself. - _STLP_DECLSPEC virtual void imbue(const locale&); - -public: // Locale-related functions. - _STLP_DECLSPEC locale pubimbue(const locale&); - locale getloc() const { return _M_locale; } - -# ifndef _STLP_NO_ANACHRONISMS - void stossc() { this->sbumpc(); } -# endif -#if defined(__MVS__) || defined(__OS400__) -private: // Data members. - - char_type* _M_gbegin; // Beginning of get area - char_type* _M_gnext; // Current position within the get area - char_type* _M_gend; // End of get area - - char_type* _M_pbegin; // Beginning of put area - char_type* _M_pnext; // Current position within the put area - char_type* _M_pend; // End of put area -#endif -}; - - -//---------------------------------------------------------------------- -// Specialization: basic_streambuf > - -// We implement basic_streambuf > very differently -// than the general basic_streambuf<> template. The main reason for this -// difference is a requirement in the C++ standard: the standard input -// and output streams cin and cout are required by default to be synchronized -// with the C library components stdin and stdout. This means it must be -// possible to synchronize a basic_streambuf with a C buffer. -// -// There are two basic ways to do that. First, the streambuf could be -// unbuffered and delegate all buffering to stdio operations. This -// would be correct, but slow: it would require at least one virtual -// function call for every character. Second, the streambuf could use -// a C stdio FILE as its buffer. -// -// We choose the latter option. Every streambuf has pointers to two -// FILE objects, one for the get area and one for the put area. Ordinarily -// it just uses a FILE object as a convenient way to package the three -// get/put area pointers. If a basic_streambuf is synchronized with -// a stdio stream, though, then the pointers are to a FILE object that's -// also used by the C library. -// -// The header encapsulates the implementation details -// of struct FILE. It contains low-level inline functions that convert -// between whe FILE's internal representation and the three-pointer -// representation that basic_streambuf<> needs. - -_STLP_TEMPLATE_NULL -#ifdef __SYMBIAN32__ -class basic_streambuf > -#else -class _STLP_CLASS_DECLSPEC basic_streambuf > -#endif -{ - friend class basic_istream >; - friend class basic_ostream >; -public: // Typedefs. - typedef char char_type; - typedef char_traits::int_type int_type; - typedef char_traits::pos_type pos_type; - typedef char_traits::off_type off_type; - typedef char_traits traits_type; - -private: // Data members. - - FILE* _M_get; // Reference to the get area - FILE* _M_put; // Reference to the put area - -#if defined(__hpux) - _FILEX _M_default_get; // Get area, unless we're syncing with stdio. - _FILEX _M_default_put; // Put area, unless we're syncing with stdio. -#else - FILE _M_default_get; // Get area, unless we're syncing with stdio. - FILE _M_default_put; // Put area, unless we're syncing with stdio. -#endif - - locale _M_locale; - -public: // Extension: locking, for thread safety. - _STLP_mutex _M_lock; - -public: // Destructor. - _STLP_DECLSPEC virtual ~basic_streambuf _STLP_PSPEC2(char, char_traits) (); - -public: - // The default constructor; defined here inline as some compilers require it - _STLP_DECLSPEC basic_streambuf _STLP_PSPEC2(char, char_traits) (); - // Extension: a constructor for streambufs synchronized with C stdio files. - _STLP_DECLSPEC basic_streambuf _STLP_PSPEC2(char, char_traits) (FILE* __get, FILE* __put); - -protected: // Protected interface to the get area. - char_type* eback() const { return _FILE_I_begin(_M_get); } - char_type* gptr() const { return _FILE_I_next(_M_get); } - char_type* egptr() const { return _FILE_I_end(_M_get); } - void gbump(int __n) { _FILE_I_bump(_M_get, __n); } - void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) - { - _FILE_I_set(_M_get, __gbegin, __gnext, __gend); -#ifdef __SYMBIAN32__ - _change_input_mode(); -#endif - } - -public: - // An alternate public interface to the above functions - // which allows us to avoid using templated friends which - // are not supported on some compilers. - - char_type* _M_eback() const { return _FILE_I_begin(_M_get); } - char_type* _M_gptr() const { return _FILE_I_next(_M_get); } - char_type* _M_egptr() const { return _FILE_I_end(_M_get); } - - void _M_gbump(int __n) { _FILE_I_bump(_M_get, __n); } - void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) - { _FILE_I_set(_M_get, __gbegin, __gnext, __gend); } - -protected: // Protected interface to the put area - char_type* pbase() const { return _FILE_O_begin(_M_put); } - char_type* pptr() const { return _FILE_O_next(_M_put); } - char_type* epptr() const { return _FILE_O_end(_M_put); } - - void pbump(int __n) { _FILE_O_bump(_M_put, __n); } - void setp(char_type* __pbegin, char_type* __pend) - { _FILE_O_set(_M_put, __pbegin, __pbegin, __pend); } - -protected: // Virtual buffer-management functions. - _STLP_DECLSPEC virtual basic_streambuf >* setbuf(char_type*, streamsize); - _STLP_DECLSPEC virtual pos_type seekoff(off_type, ios_base::seekdir, - ios_base::openmode = ios_base::in | ios_base::out); - _STLP_DECLSPEC virtual pos_type - seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out); - _STLP_DECLSPEC virtual int sync(); - -public: // Buffer management. - basic_streambuf >* pubsetbuf(char_type* __s, streamsize __n) - { return this->setbuf(__s, __n); } - - pos_type pubseekoff(off_type __offset, ios_base::seekdir __way, - ios_base::openmode __mod = ios_base::in | ios_base::out) - { return this->seekoff(__offset, __way, __mod); } - - pos_type pubseekpos(pos_type __sp, - ios_base::openmode __mod = ios_base::in | ios_base::out) - { return this->seekpos(__sp, __mod); } - - int pubsync() { return this->sync(); } - -protected: // Virtual get area functions. - _STLP_DECLSPEC virtual streamsize showmanyc(); - _STLP_DECLSPEC virtual streamsize xsgetn(char_type* __s, streamsize __n); - _STLP_DECLSPEC virtual int_type underflow(); - _STLP_DECLSPEC virtual int_type uflow(); - _STLP_DECLSPEC virtual int_type pbackfail(int_type __c = traits_type::eof()); - -protected: // Virtual put area functions. - _STLP_DECLSPEC virtual streamsize xsputn(const char_type* __s, streamsize __n); - _STLP_DECLSPEC virtual streamsize _M_xsputnc(char_type __c, streamsize __n); - _STLP_DECLSPEC virtual int_type overflow(int_type = traits_type::eof()); -#ifdef __SYMBIAN32__ - virtual int save_read_buffer () { return 0; } - virtual void _change_input_mode() {}; -#endif -public: // Public members for writing characters. - // Write a single character. - int_type sputc(char_type __c) { - int_type __res; - if( _FILE_O_avail(_M_put) > 0 ) - { - _FILE_O_postincr(_M_put) = __c; - __res = traits_type::to_int_type(__c); - } - else - __res = this->overflow(traits_type::to_int_type(__c)); - return __res; - } - - // Write __n characters. - streamsize sputn(const char_type* __s, streamsize __n) - { return this->xsputn(__s, __n); } - - // Extension: write __n copies of __c. - streamsize _M_sputnc(char_type __c, streamsize __n) - { return this->_M_xsputnc(__c, __n); } - -private: // Helper functions. - _STLP_DECLSPEC int_type _M_snextc_aux(); - -public: // Public members for reading characters. - streamsize in_avail() - { return _FILE_I_avail(_M_get) > 0 ? _FILE_I_avail(_M_get) -#ifdef __SYMBIAN32__ - + save_read_buffer() -#endif - : this->showmanyc(); } - - // Advance to the next character and return it. - int_type snextc() { - return _FILE_I_avail(_M_get) > 1 - ? traits_type::to_int_type(_FILE_I_preincr(_M_get)) - : this->_M_snextc_aux(); - } - - // Return the current character and advance to the next. - int_type sbumpc() { - return _FILE_I_avail(_M_get) > 0 - ? traits_type::to_int_type(_FILE_I_postincr(_M_get)) - : this->uflow(); - } - - // Return the current character without advancing to the next. - int_type sgetc() { - return _FILE_I_avail(_M_get) > 0 - ? traits_type::to_int_type(*_FILE_I_next(_M_get)) - : this->underflow(); - } - - streamsize sgetn(char_type* __s, streamsize __n) - { return this->xsgetn(__s, __n); } - - int_type sputbackc(char_type __c) { - return _FILE_I_begin(_M_get) < _FILE_I_next(_M_get) && - __c == *(_FILE_I_next(_M_get) - 1) - ? traits_type::to_int_type(_FILE_I_predecr(_M_get)) - : this->pbackfail(traits_type::to_int_type(__c)); - } - - int_type sungetc() { - return _FILE_I_begin(_M_get) < _FILE_I_next(_M_get) - ? traits_type::to_int_type(_FILE_I_predecr(_M_get)) - : this->pbackfail(); - } - -protected: // Virtual locale functions. - _STLP_DECLSPEC virtual void imbue(const locale&); -public: // Locale-related functions. - _STLP_DECLSPEC locale pubimbue(const locale&); - locale getloc() const { return _M_locale; } - -# ifndef _STLP_NO_ANACHRONISMS -public: - void stossc() { this->sbumpc(); } -# endif - -#if defined(__MVS__) || defined(__OS400__) -private: // Data members. - - char_type* _M_gbegin; // Beginning of get area - char_type* _M_gnext; // Current position within the get area - char_type* _M_gend; // End of get area - - char_type* _M_pbegin; // Beginning of put area - char_type* _M_pnext; // Current position within the put area - char_type* _M_pend; // End of put area -#endif - -}; -_STLP_END_NAMESPACE - -# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_string.c --- a/epoc32/include/stdapis/stlport/stl/_string.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,627 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_STRING_C -#define _STLP_STRING_C - -#ifndef _STLP_STRING_H -# include -#endif - -# ifdef _STLP_DEBUG -# define basic_string _Nondebug_string -# endif - -# if defined (_STLP_USE_OWN_NAMESPACE) || !defined (_STLP_USE_NATIVE_STRING) - -# if defined (_STLP_NESTED_TYPE_PARAM_BUG) -# define __size_type__ size_t -# define size_type size_t -# define iterator _CharT* -# else -# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::size_type -# endif - -_STLP_BEGIN_NAMESPACE - -// ------------------------------------------------------------ -// Non-inline declarations. - - -// Change the string's capacity so that it is large enough to hold -// at least __res_arg elements, plus the terminating _CharT(). Note that, -// if __res_arg < capacity(), this member function may actually decrease -// the string's capacity. -template -_STLP_EXP_DECLSPEC void basic_string<_CharT,_Traits,_Alloc>::reserve(size_type __res_arg) { - - if (__res_arg >= capacity()) - { - if (__res_arg > max_size()) - this->_M_throw_length_error(); - - size_type __n = __res_arg + 1; - _STLP_LEAVE_VOLATILE pointer __new_start = this->_M_end_of_storage.allocate(__n); - _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; - - _STLP_TRY { - __new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start); - _M_construct_null(__new_finish); - } - _STLP_UNWIND((_STLP_STD::_Destroy(__new_start, __new_finish), - this->_M_end_of_storage.deallocate(__new_start, __n))); - - _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); - this->_M_deallocate_block(); - this->_M_start = __new_start; - this->_M_finish = __new_finish; - this->_M_end_of_storage._M_data = __new_start + __n; - } -} - -template -_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& -basic_string<_CharT,_Traits,_Alloc>::append(size_type __n, _CharT __c) -{ - if (__n > max_size() || size() > max_size() - __n) - this->_M_throw_length_error(); - if (size() + __n > capacity()) - reserve(size() + (max)(size(), __n)); - if (__n > 0) { - uninitialized_fill_n(this->_M_finish + 1, __n - 1, __c); - _STLP_TRY { - _M_construct_null(this->_M_finish + __n); - } - _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n)); - _Traits::assign(*end(), __c); - this->_M_finish += __n; - } - return *this; -} - -#ifndef _STLP_MEMBER_TEMPLATES - -template -_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>& -basic_string<_CharT, _Traits, _Alloc>::append(const _CharT* __first, - const _CharT* __last) -{ - if (__first != __last) { - const size_type __old_size = size(); - ptrdiff_t __n = __last - __first; - if ((size_type)__n > max_size() || __old_size > max_size() - __n) - this->_M_throw_length_error(); - if (__old_size + __n > capacity()) { - const size_type __len = __old_size + (max)(__old_size, (size_t) __n) + 1; - pointer __new_start = this->_M_end_of_storage.allocate(__len); - _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; - _STLP_TRY { - __new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start); - __new_finish = uninitialized_copy(__first, __last, __new_finish); - _M_construct_null(__new_finish); - } - _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), - this->_M_end_of_storage.deallocate(__new_start,__len))); - _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); - this->_M_deallocate_block(); - this->_M_start = __new_start; - this->_M_finish = __new_finish; - this->_M_end_of_storage._M_data = __new_start + __len; - } - else { - const _CharT* __f1 = __first; - ++__f1; - uninitialized_copy(__f1, __last, this->_M_finish + 1); - _STLP_TRY { - _M_construct_null(this->_M_finish + __n); - } - _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n)); - _Traits::assign(*end(), *__first); - this->_M_finish += __n; - } - } - return *this; -} - -#endif /* _STLP_MEMBER_TEMPLATES */ - -template -_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& -basic_string<_CharT,_Traits,_Alloc>::assign(size_type __n, _CharT __c) { - if (__n <= size()) { - _Traits::assign(this->_M_start, __n, __c); - erase(begin() + __n, end()); - } - else { - _Traits::assign(this->_M_start, size(), __c); - append(__n - size(), __c); - } - return *this; -} - -template -_CharT* basic_string<_CharT,_Traits,_Alloc> ::_M_insert_aux(_CharT* __p, - _CharT __c) -{ - pointer __new_pos = __p; - if (this->_M_finish + 1 < this->_M_end_of_storage._M_data) { - _M_construct_null(this->_M_finish + 1); - _Traits::move(__p + 1, __p, this->_M_finish - __p); - _Traits::assign(*__p, __c); - ++this->_M_finish; - } - else { - const size_type __old_len = size(); - const size_type __len = __old_len + - (max)(__old_len, __STATIC_CAST(size_type,1)) + 1; - pointer __new_start = this->_M_end_of_storage.allocate(__len); - _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; - _STLP_TRY { - __new_pos = uninitialized_copy(this->_M_start, __p, __new_start); - _Construct(__new_pos, __c); - __new_finish = __new_pos + 1; - __new_finish = uninitialized_copy(__p, this->_M_finish, __new_finish); - _M_construct_null(__new_finish); - } - _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), - this->_M_end_of_storage.deallocate(__new_start,__len))); - _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); - this->_M_deallocate_block(); - this->_M_start = __new_start; - this->_M_finish = __new_finish; - this->_M_end_of_storage._M_data = __new_start + __len; - } - return __new_pos; -} - -template -_STLP_EXP_DECLSPEC void basic_string<_CharT,_Traits,_Alloc>::insert(iterator __position, - size_t __n, _CharT __c) -{ - if (__n != 0) { - if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n + 1) { - const size_type __elems_after = this->_M_finish - __position; - pointer __old_finish = this->_M_finish; - if (__elems_after >= __n) { - uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1, - this->_M_finish + 1); - this->_M_finish += __n; - _Traits::move(__position + __n, - __position, (__elems_after - __n) + 1); - _Traits::assign(__position, __n, __c); - } - else { - uninitialized_fill_n(this->_M_finish + 1, __n - __elems_after - 1, __c); - this->_M_finish += __n - __elems_after; - _STLP_TRY { - uninitialized_copy(__position, __old_finish + 1, this->_M_finish); - this->_M_finish += __elems_after; - } - _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), - this->_M_finish = __old_finish)); - _Traits::assign(__position, __elems_after + 1, __c); - } - } - else { - const size_type __old_size = size(); - const size_type __len = __old_size + (max)(__old_size, __n) + 1; - pointer __new_start = this->_M_end_of_storage.allocate(__len); - _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; - _STLP_TRY { - __new_finish = uninitialized_copy(this->_M_start, __position, __new_start); - __new_finish = uninitialized_fill_n(__new_finish, __n, __c); - __new_finish = uninitialized_copy(__position, this->_M_finish, - __new_finish); - _M_construct_null(__new_finish); - } - _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), - this->_M_end_of_storage.deallocate(__new_start,__len))); - _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); - this->_M_deallocate_block(); - this->_M_start = __new_start; - this->_M_finish = __new_finish; - this->_M_end_of_storage._M_data = __new_start + __len; - } - } -} - -#ifndef _STLP_MEMBER_TEMPLATES - -template -_STLP_EXP_DECLSPEC void -basic_string<_CharT,_Traits,_Alloc>::insert(iterator __position, - const _CharT* __first, - const _CharT* __last) -{ - if (__first != __last) { - const ptrdiff_t __n = __last - __first; - if (this->_M_end_of_storage._M_data - this->_M_finish >= __n + 1) { - const ptrdiff_t __elems_after = this->_M_finish - __position; - pointer __old_finish = this->_M_finish; - if (__elems_after >= __n) { - uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1, - this->_M_finish + 1); - this->_M_finish += __n; - _Traits::move(__position + __n, - __position, (__elems_after - __n) + 1); - _M_copy(__first, __last, __position); - } - else { - const _CharT* __mid = __first; - advance(__mid, __elems_after + 1); - uninitialized_copy(__mid, __last, this->_M_finish + 1); - this->_M_finish += __n - __elems_after; - _STLP_TRY { - uninitialized_copy(__position, __old_finish + 1, this->_M_finish); - this->_M_finish += __elems_after; - } - _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), - this->_M_finish = __old_finish)); - _M_copy(__first, __mid, __position); - } - } - else { - size_type __old_size = size(); - size_type __len - = __old_size + (max)(__old_size, __STATIC_CAST(const size_type,__n)) + 1; - pointer __new_start = this->_M_end_of_storage.allocate(__len); - _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; - _STLP_TRY { - __new_finish = uninitialized_copy(this->_M_start, __position, __new_start); - __new_finish = uninitialized_copy(__first, __last, __new_finish); - __new_finish - = uninitialized_copy(__position, this->_M_finish, __new_finish); - _M_construct_null(__new_finish); - } - _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), - this->_M_end_of_storage.deallocate(__new_start,__len))); - _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); - this->_M_deallocate_block(); - this->_M_start = __new_start; - this->_M_finish = __new_finish; - this->_M_end_of_storage._M_data = __new_start + __len; - } - } -} - -#endif /* _STLP_MEMBER_TEMPLATES */ - -template -_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& -basic_string<_CharT,_Traits,_Alloc>::replace(iterator __first, iterator __last, size_type __n, _CharT __c) -{ - size_type __len = (size_type)(__last - __first); - - if (__len >= __n) { - _Traits::assign(__first, __n, __c); - erase(__first + __n, __last); - } - else { - _Traits::assign(__first, __len, __c); - insert(__last, __n - __len, __c); - } - return *this; -} - -#ifndef _STLP_MEMBER_TEMPLATES - - -template -_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& -basic_string<_CharT,_Traits,_Alloc> ::replace(iterator __first, iterator __last, - const _CharT* __f, const _CharT* __l) -{ - const ptrdiff_t __n = __l - __f; - const difference_type __len = __last - __first; - if (__len >= __n) { - _M_copy(__f, __l, __first); - erase(__first + __n, __last); - } - else { - const _CharT* __m = __f + __len; - _M_copy(__f, __m, __first); - insert(__last, __m, __l); - } - return *this; -} - -#endif /* _STLP_MEMBER_TEMPLATES */ - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::find(const _CharT* __s, size_type __pos, size_type __n) const -{ -#ifndef __SYMBIAN32__ // A different implementation without using search - if (__pos + __n > size()) - return npos; - else { - const const_pointer __result = - _STLP_STD::search((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, - __s, __s + __n, _Eq_traits<_Traits>()); - return __result != this->_M_finish ? __result - this->_M_start : npos; - } -#else - const size_type __len = this->size(); - size_t __tpos = __pos; - const _CharT* __data = this->_M_start; - while (__tpos + __n <= __len) { - if (traits_type::compare(__data + __tpos, __s, __n) == 0) - return __tpos; - ++__tpos; - } - return npos; -#endif //__SYMBIAN32__ -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::find(_CharT __c, size_type __pos) const -{ - if (__pos >= size()) - return npos; - else { - const const_pointer __result = - _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, - _Eq_char_bound<_Traits>(__c)); - return __result != this->_M_finish ? __result - this->_M_start : npos; - } -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::rfind(const _CharT* __s, size_type __pos, size_type __n) const -{ - const size_t __len = size(); - - if (__n > __len) - return npos; - else if (__n == 0) - return (min) (__len, __pos); - else { - const_pointer __last = this->_M_start + (min) (__len - __n, __pos) + __n; - const_pointer __result = _STLP_STD::find_end((const_pointer)this->_M_start, __last, - __s, __s + __n, - _Eq_traits<_Traits>()); - return __result != __last ? __result - this->_M_start : npos; - } -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::rfind(_CharT __c, size_type __pos) const -{ - const size_type __len = size(); - - if (__len < 1) - return npos; - else { - const const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; - const_reverse_iterator __rresult = - _STLP_STD::find_if(const_reverse_iterator(__last), rend(), - _Eq_char_bound<_Traits>(__c)); - return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; - } -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> - ::find_first_of(const _CharT* __s, size_type __pos, size_type __n) const -{ - if (__pos >= size()) - return npos; - else { - const_iterator __result = __find_first_of(begin() + __pos, end(), - __s, __s + __n, - _Eq_traits<_Traits>()); - return __result != end() ? __result - begin() : npos; - } -} - - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> - ::find_last_of(const _CharT* __s, size_type __pos, size_type __n) const -{ - const size_type __len = size(); - - if (__len < 1) - return npos; - else { - const const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; - const const_reverse_iterator __rresult = - __find_first_of(const_reverse_iterator(__last), rend(), - __s, __s + __n, - _Eq_traits<_Traits>()); - return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; - } -} - - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const -{ - typedef typename _Traits::char_type _CharType; - if (__pos > size()) - return npos; - else { - const_pointer __result = _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, - (const _CharT*)this->_M_finish, - _Not_within_traits<_Traits>((const _CharType*)__s, - (const _CharType*)__s + __n)); - return __result != this->_M_finish ? __result - this->_M_start : npos; - } -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(_CharT __c, size_type __pos) const -{ - if (__pos > size()) - return npos; - else { - const_pointer __result = _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, - _Neq_char_bound<_Traits>(__c)); - return __result != this->_M_finish ? __result - this->_M_start : npos; - } -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT,_Traits,_Alloc> ::find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const -{ - typedef typename _Traits::char_type _CharType; - const size_type __len = size(); - - if (__len < 1) - return npos; - else { - const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; - const_reverse_iterator __rlast = const_reverse_iterator(__last); - const_reverse_iterator __rresult = - _STLP_STD::find_if(__rlast, rend(), - _Not_within_traits<_Traits>((const _CharType*)__s, - (const _CharType*)__s + __n)); - return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; - } -} - -template -_STLP_EXP_DECLSPEC __size_type__ -basic_string<_CharT, _Traits, _Alloc> ::find_last_not_of(_CharT __c, size_type __pos) const -{ - const size_type __len = size(); - - if (__len < 1) - return npos; - else { - const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; - const_reverse_iterator __rlast = const_reverse_iterator(__last); - const_reverse_iterator __rresult = - _STLP_STD::find_if(__rlast, rend(), - _Neq_char_bound<_Traits>(__c)); - return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; - } -} - -template -void _STLP_CALL _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s, - _CharT* __buf, - size_t __n) -{ - if (__n > 0) { - __n = (min) (__n - 1, __s.size()); - _STLP_STD::copy(__s.begin(), __s.begin() + __n, __buf); - __buf[__n] = _CharT(); - } -} -_STLP_END_NAMESPACE - -// _string_fwd has to see clean basic_string -# undef basic_string - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -# ifdef _STLP_DEBUG -# define basic_string _Nondebug_string -# endif - -# include -_STLP_BEGIN_NAMESPACE - -// _String_base methods -template -void _String_base<_Tp,_Alloc>::_M_throw_length_error() const { - __stl_throw_length_error("basic_string"); -} - -template -void _String_base<_Tp, _Alloc>::_M_throw_out_of_range() const { - __stl_throw_out_of_range("basic_string"); -} - -template -void _String_base<_Tp, _Alloc>::_M_allocate_block(size_t __n) { - if ((__n <= (max_size()+1)) && (__n>0)){ - _M_start = _M_end_of_storage.allocate(__n); - _M_finish = _M_start; - _M_end_of_storage._M_data = _M_start + __n; - } - else - _M_throw_length_error(); -} - -template -_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>::basic_string() - : _String_base<_CharT,_Alloc>(allocator_type()) -{ - this->_M_start = this->_M_end_of_storage.allocate(8); - this->_M_finish = this->_M_start; - this->_M_end_of_storage._M_data = this->_M_start + 8; - _M_terminate_string(); - _STLP_POP_CLEANUP_ITEM -} - - -template -_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT* __s, - const allocator_type& __a) - : _String_base<_CharT,_Alloc>(__a) -{ - _STLP_FIX_LITERAL_BUG(__s) - _M_range_initialize(__s, __s + traits_type::length(__s)); - _STLP_POP_CLEANUP_ITEM -} - - -template -_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>::basic_string(const basic_string<_CharT, _Traits, _Alloc> & __s) - : _String_base<_CharT,_Alloc>(__s.get_allocator()) -{ - _M_range_initialize(__s._M_start, __s._M_finish); - _STLP_POP_CLEANUP_ITEM -} - -# if defined ( __SUNPRO_CC) && ! defined(_STLP_STATIC_CONST_INIT_BUG) -template const size_t basic_string<_CharT, _Traits, _Alloc>::npos; -# endif - -_STLP_END_NAMESPACE - -# undef basic_string -# undef __size_type__ -# undef size_type -# undef iterator -# endif /* NATIVE */ - -#endif /* _STLP_STRING_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_string_fwd.h --- a/epoc32/include/stdapis/stlport/stl/_string_fwd.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* - * Copyright (c) 1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STRING_FWD_H -#define _STLP_STRING_FWD_H - -#ifndef _STLP_IOSFWD -# include -#endif - -_STLP_BEGIN_NAMESPACE - -# if !defined (_STLP_LIMITED_DEFAULT_TEMPLATES) -template , - class _Alloc = allocator<_CharT> > -class basic_string; -# else -template -class basic_string; -# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */ - -typedef basic_string, allocator > string; - -# ifdef _STLP_HAS_WCHAR_T -typedef basic_string, allocator > wstring; -# endif - -# ifdef _STLP_OWN_IOSTREAMS -_STLP_DECLSPEC const char* _STLP_CALL -__get_c_string(const string& __str); -# else -template -const char* _STLP_CALL -__get_c_string(const basic_string<_CharT, _Traits, _Alloc>& __str); -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_STRING_FWD_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_string_hash.h --- a/epoc32/include/stdapis/stlport/stl/_string_hash.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STRING_HASH_H -# define _STLP_STRING_HASH_H - -#ifndef _STLP_HASH_FUN_H -# include -#endif - -#ifndef _STLP_STRING_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -_STLP_INLINE_LOOP size_t -__stl_string_hash(const basic_string<_CharT,_Traits,_Alloc>& __s) { - unsigned long __h = 0; - typedef typename basic_string<_CharT,_Traits,_Alloc>::const_pointer const_ptr; - size_t __len = __s.size(); - const _CharT* __data = __s.data(); - for ( size_t __i = 0; __i < __len; ++__i) - __h = 5*__h + __data[__i]; - return size_t(__h); -} - -#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION - -template -struct hash > { - size_t operator()(const basic_string<_CharT,_Traits,_Alloc>& __s) const - { return __stl_string_hash(__s); } -}; - -#else - -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash { - size_t operator()(const string& __s) const - { return __stl_string_hash(__s); } -}; - -# if defined (_STLP_HAS_WCHAR_T) -_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash { - size_t operator()(const wstring& __s) const - { return __stl_string_hash(__s); } -}; -# endif - -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -_STLP_END_NAMESPACE - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_string_io.c --- a/epoc32/include/stdapis/stlport/stl/_string_io.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,369 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* 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. -* Neither the name of Nokia Corporation nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. - -* 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 HOLDER 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. -* -* Description: -* -*/ - -#ifndef _STLP_STRING_IO_C -#define _STLP_STRING_IO_C - -#ifndef _STLP_STRING_IO_H -# include -#endif - -#ifndef _STLP_INTERNAL_CTYPE_H -# include -#endif - -# ifdef _STLP_DEBUG -# define basic_string _Nondebug_string -# endif - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_OWN_IOSTREAMS) -# define _STLP_USING_IO -# else -# define _STLP_USING_IO _STLP_USING_VENDOR_STD -# endif - -#if defined (_STLP_USE_NEW_IOSTREAMS) - -template -bool _STLP_CALL -__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os, - basic_streambuf<_CharT, _Traits>* __buf, - size_t __n) -{ - _CharT __f = __os.fill(); - size_t __i; - bool __ok = true; - - for (__i = 0; __i < __n; ++__i) - __ok = __ok && !_Traits::eq_int_type(__buf->sputc(__f), _Traits::eof()); - return __ok; -} - -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, - const basic_string<_CharT,_Traits,_Alloc>& __s) -{ - - _STLP_USING_IO - typedef basic_ostream<_CharT, _Traits> __ostream; - typename __ostream::sentry __sentry(__os); - bool __ok = false; - - if (__sentry) { - __ok = true; - size_t __n = __s.size(); - size_t __pad_len = 0; - const bool __left = (__os.flags() & __ostream::left) != 0; - const size_t __w = __os.width(0); - basic_streambuf<_CharT, _Traits>* __buf = __os.rdbuf(); - - if (__n < __w) { - __pad_len = __w - __n; - } - - if (!__left) - __ok = __stlp_string_fill(__os, __buf, __pad_len); - - __ok = __ok && (__buf->sputn(__s.data(), streamsize(__n)) == streamsize(__n)); - - if (__left) - __ok = __ok && __stlp_string_fill(__os, __buf, __pad_len); - } - - if (!__ok) - __os.setstate(__ostream::failbit); - - return __os; -} - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __is, - basic_string<_CharT,_Traits, _Alloc>& __s) -{ - _STLP_USING_IO - typedef basic_istream<_CharT, _Traits> __istream; - typename __istream::sentry __sentry(__is); - - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); - typedef ctype<_CharT> _C_type; - -#ifdef _STLP_OWN_IOSTREAMS - // const _C_type& _Ctype = use_facet<_C_type>(__loc); - const _C_type& _Ctype = *(const _C_type*)__is._M_ctype_facet(); -#else -# if defined (_STLP_MSVC) && (_STLP_MSVC <= 1200 ) || defined (__ICL) - const locale& __loc = __is.getloc(); - const _C_type& _Ctype = use_facet(__loc , ( _C_type * ) 0, true); -# elif defined (__SUNPRO_CC) - const locale& __loc = __is.getloc(); - const _C_type& _Ctype = use_facet(__loc , ( _C_type * ) 0); -# else - const locale& __loc = __is.getloc(); - const _C_type& _Ctype = use_facet<_C_type>(__loc); -# endif -#endif - __s.clear(); - size_t __n = __is.width(0); - if (__n == 0) - __n = __STATIC_CAST(size_t,-1); - else - __s.reserve(__n); - - - while (__n-- > 0) { - typename _Traits::int_type __c1 = __buf->sbumpc(); - if (_Traits::eq_int_type(__c1, _Traits::eof())) { - __is.setstate(__istream::eofbit); - break; - } - else { - _CharT __c = _Traits::to_char_type(__c1); - - if (_Ctype.is(_C_type::space, __c)) { - if (_Traits::eq_int_type(__buf->sputbackc(__c), _Traits::eof())) - __is.setstate(__istream::failbit); - break; - } -#ifdef __SYMBIAN32__ - else if (__c == '\b') { - __s.pop_back(); - } -#endif - else - __s.push_back(__c); - } - } - - // If we have read no characters, then set failbit. - if (__s.size() == 0) - __is.setstate(__istream::failbit); - } - else - __is.setstate(__istream::failbit); - - return __is; -} - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -getline(basic_istream<_CharT, _Traits>& __is, - basic_string<_CharT,_Traits,_Alloc>& __s, - _CharT __delim) -{ - _STLP_USING_IO - typedef basic_istream<_CharT, _Traits> __istream; - size_t __nread = 0; - typename basic_istream<_CharT, _Traits>::sentry __sentry(__is, true); - if (__sentry) { - basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); - __s.clear(); - - while (__nread < __s.max_size()) { - int __c1 = __buf->sbumpc(); - if (_Traits::eq_int_type(__c1, _Traits::eof())) { - __is.setstate(__istream::eofbit); - break; - } - else { - ++__nread; - _CharT __c = _Traits::to_char_type(__c1); - if (!_Traits::eq(__c, __delim)) - __s.push_back(__c); - else - break; // Character is extracted but not appended. - } - } - } - if (__nread == 0 || __nread >= __s.max_size()) - __is.setstate(__istream::failbit); - - return __is; -} - -#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) - -// (reg) For Watcom IO, _OSTREAM_DLL tells if ostream class is in .exe or in .dll - -template -_OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, - const basic_string<_CharT,_Traits,_Alloc>& __s) -{ - _STLP_USING_IO - streambuf* __buf = __os.rdbuf(); - if (__buf) { - size_t __n = __s.size(); - size_t __pad_len = 0; - const bool __left = (__os.flags() & ios::left) !=0; - const size_t __w = __os.width(); - - if (__n < __w) { - __pad_len = __w - __n; - } - - if (!__left) - __stlp_string_fill(__os, __buf, __pad_len); - - const size_t __nwritten = __buf->sputn(__s.data(), __n); - - if (__left) - __stlp_string_fill(__os, __buf, __pad_len); - - if (__nwritten != __n) - __os.clear(__os.rdstate() | ios::failbit); - - __os.width(0); - } - else - __os.clear(__os.rdstate() | ios::badbit); - - return __os; -} - -template -_ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s) -{ - _STLP_USING_IO - if (!__is) - return __is; - - streambuf* __buf = __is.rdbuf(); - if (__buf) { - - if (__is.flags() & ios::skipws) { - // _CharT __c; - int __c; - do { - __c = __buf->sbumpc(); - } - while (__c != EOF && isspace((unsigned char)__c)); - - if (__c == EOF) { - __is.clear(__is.rdstate() | ios::eofbit | ios::failbit); - } - else { - if (__buf->sputbackc(__c) == EOF) - __is.clear(__is.rdstate() | ios::failbit); - } - } - - // If we arrive at end of file (or fail for some other reason) while - // still discarding whitespace, then we don't try to read the string. - if (__is) { - __s.clear(); - - size_t __n = __is.width(); - if (__n == 0) - __n = __STATIC_CAST(size_t,-1); - else - __s.reserve(__n); - - while (__n-- > 0) { - int __c1 = __buf->sbumpc(); - if (__c1 == EOF) { - __is.clear(__is.rdstate() | ios::eofbit); - break; - } - else { - _CharT __c = _Traits::to_char_type(__c1); - - if (isspace((unsigned char) __c)) { - if (__buf->sputbackc(__c) == EOF) - __is.clear(__is.rdstate() | ios::failbit); - break; - } - else - __s.push_back(__c); - } - } - - // If we have read no characters, then set failbit. - if (__s.size() == 0) - __is.clear(__is.rdstate() | ios::failbit); - } - - __is.width(0); - } - else // We have no streambuf. - __is.clear(__is.rdstate() | ios::badbit); - - return __is; -} - -template -_ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is, - basic_string<_CharT,_Traits,_Alloc>& __s, - _CharT __delim) -{ - _STLP_USING_IO - streambuf* __buf = __is.rdbuf(); - if (__buf) { - size_t __nread = 0; - if (__is) { - __s.clear(); - - while (__nread < __s.max_size()) { - int __c1 = __buf->sbumpc(); - if (__c1 == EOF) { - __is.clear(__is.rdstate() | ios::eofbit); - break; - } - else { - ++__nread; - _CharT __c = _Traits::to_char_type(__c1); - if (!_Traits::eq(__c, __delim)) - __s.push_back(__c); - else - break; // Character is extracted but not appended. - } - } - } - - if (__nread == 0 || __nread >= __s.max_size()) - __is.clear(__is.rdstate() | ios::failbit); - } - else - __is.clear(__is.rdstate() | ios::badbit); - - return __is; -} - -# endif /* _STLP_NEW_IOSTREAMS */ - -_STLP_END_NAMESPACE - -// # undef _STLP_USING_IO -# undef basic_string - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_string_io.h --- a/epoc32/include/stdapis/stlport/stl/_string_io.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STRING_IO_H -#define _STLP_STRING_IO_H - -// this is for link-time instantiation -#if !defined ( _STLP_STRING ) -# include -# endif - -//#ifndef _STLP_LOCALE -//# include -//#endif - -# ifdef _STLP_DEBUG -# define basic_string _Nondebug_string -# endif - -// I/O. -_STLP_BEGIN_NAMESPACE - -#if defined (_STLP_USE_NEW_IOSTREAMS) - -template -basic_ostream<_CharT, _Traits>& _STLP_CALL -operator<<(basic_ostream<_CharT, _Traits>& __os, - const basic_string<_CharT,_Traits,_Alloc>& __s); - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -operator>>(basic_istream<_CharT, _Traits>& __is, - basic_string<_CharT,_Traits,_Alloc>& __s); - -template -basic_istream<_CharT, _Traits>& _STLP_CALL -getline(basic_istream<_CharT, _Traits>& __is, - basic_string<_CharT,_Traits,_Alloc>& __s, - _CharT __delim); - -# if !(defined (__BORLANDC__) && ! defined (_STLP_USE_OWN_NAMESPACE)) - -template -inline basic_istream<_CharT, _Traits>& _STLP_CALL -getline(basic_istream<_CharT, _Traits>& __is, - basic_string<_CharT,_Traits,_Alloc>& __s) -{ - return getline(__is, __s, __is.widen('\n')); -} -# endif - -template -bool _STLP_CALL -__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os, - basic_streambuf<_CharT, _Traits>* __buf, - size_t __n); -#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) - -// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll -# ifdef _WPRTLINK -typedef _WPRTLINK ostream _OSTREAM_DLL; -typedef _WPRTLINK istream _ISTREAM_DLL; -#else -typedef ostream _OSTREAM_DLL; -typedef istream _ISTREAM_DLL; -#endif - -template -_OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, - const basic_string<_CharT,_Traits,_Alloc>& __s); - -template -_ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s); - -template -_ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is, - basic_string<_CharT,_Traits,_Alloc>& __s, - _CharT __delim); - - -template -inline _ISTREAM_DLL& _STLP_CALL -getline(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s) -{ - return getline(__is, __s, '\n'); -} - -inline void _STLP_CALL -__stlp_string_fill(_OSTREAM_DLL& __os, streambuf* __buf, size_t __n) -{ - char __f = __os.fill(); - size_t __i; - - for (__i = 0; __i < __n; ++__i) __buf->sputc(__f); -} - -#endif /* _STLP_USE_NEW_IOSTREAMS */ - -_STLP_END_NAMESPACE - -# undef basic_string - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_STRING_IO_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_strstream.h --- a/epoc32/include/stdapis/stlport/stl/_strstream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,213 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. - -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -* list of conditions and the following disclaimer. -* 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. -* Neither the name of Nokia Corporation nor the names of its contributors -* may be used to endorse or promote products derived from this software -* without specific prior written permission. - -* 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 HOLDER 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. -* -* Description: -* -*/ - -#ifndef _STLP_INTERNAL_STREAMBUF -#include -#endif -#ifndef _STLP_ISTREAM -#include // Includes , , -#endif -#ifndef _STLP_STRING_H -#include -#endif - -_STLP_BEGIN_NAMESPACE - -#ifndef _STLP_USE_NAMESPACES -# define strstream _STLP_strstream -# define ostrstream _STLP_ostrstream -# define istrstream _STLP_istrstream -# define strstreambuf _STLP_strstreambuf -#endif - -//---------------------------------------------------------------------- -// Class strstreambuf, a streambuf class that manages an array of char. -// Note that this class is not a template. -#ifdef __SYMBIAN32__ -class strstreambuf : public basic_streambuf > -#else -class _STLP_CLASS_DECLSPEC strstreambuf : public basic_streambuf > -#endif -{ -public: // Types. - typedef char_traits _Traits; - typedef basic_streambuf > _Base; - typedef void* (*__alloc_fn)(size_t); - typedef void (*__free_fn)(void*); -public: // Constructor, destructor - - explicit strstreambuf(streamsize _Initial_capacity = 0); - - _STLP_DECLSPEC strstreambuf(__alloc_fn, __free_fn); - - _STLP_DECLSPEC strstreambuf(char* __get, streamsize __n, char* __put = 0); - _STLP_DECLSPEC strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0); - _STLP_DECLSPEC strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0); - - _STLP_DECLSPEC strstreambuf(const char* __get, streamsize __n); - _STLP_DECLSPEC strstreambuf(const signed char* __get, streamsize __n); - _STLP_DECLSPEC strstreambuf(const unsigned char* __get, streamsize __n); - - virtual ~strstreambuf(); - -public: // strstreambuf operations. - _STLP_DECLSPEC void freeze(bool = true); - _STLP_DECLSPEC char* str(); - _STLP_DECLSPEC int pcount() const; - -protected: // Overridden virtual member functions. - virtual int_type overflow(int_type __c = _Traits::eof()); - virtual int_type pbackfail(int_type __c = _Traits::eof()); - virtual int_type underflow(); - virtual _Base* setbuf(char* __buf, streamsize __n); - virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir, - ios_base::openmode __mode - = ios_base::in | ios_base::out); - virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode - = ios_base::in | ios_base::out); - -private: // Helper functions. - // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun. - char* _M_alloc(size_t); - inline void _M_free(char*); - - // Helper function used in constructors. - void _M_setup(char* __get, char* __put, streamsize __n); -private: // Data members. - __alloc_fn _M_alloc_fun; - __free_fn _M_free_fun; - bool _M_dynamic : 1; - bool _M_frozen : 1; - bool _M_constant : 1; -#ifdef __SYMBIAN32__ - char* _pfrozenendsave; - char* _pgetfrozenendsave; -#endif -}; - -inline strstreambuf::~strstreambuf() -{ -#ifdef __SYMBIAN32__ - if (_M_dynamic && !_M_frozen) - { - if (_M_free_fun) - _M_free_fun(eback()); - else - _M_free(eback()); - } -#else - if (_M_dynamic && !_M_frozen) - _M_free(eback()); -#endif -} - -inline void strstreambuf::_M_free(char* p) -{ - if (p) - if (_M_free_fun) - _M_free_fun(p); - else - delete[] p; -} - - -//---------------------------------------------------------------------- -// Class istrstream, an istream that manages a strstreambuf. - -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS (istrstream) : public basic_istream > -#else -class _STLP_CLASS_DECLSPEC istrstream : public basic_istream > -#endif -{ -public: - _STLP_DECLSPEC explicit istrstream(char*); - _STLP_DECLSPEC explicit istrstream(const char*); - _STLP_DECLSPEC istrstream(char* , streamsize); - _STLP_DECLSPEC istrstream(const char*, streamsize); - virtual ~istrstream(); - - _STLP_DECLSPEC strstreambuf* rdbuf() const; - _STLP_DECLSPEC char* str(); - -private: - strstreambuf _M_buf; -}; - -//---------------------------------------------------------------------- -// Class ostrstream -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS (ostrstream) : public basic_ostream > -#else -class _STLP_CLASS_DECLSPEC ostrstream : public basic_ostream > -#endif -{ -public: - _STLP_DECLSPEC ostrstream(); - _STLP_DECLSPEC ostrstream(char*, int, ios_base::openmode = ios_base::out); - virtual ~ostrstream(); - - _STLP_DECLSPEC strstreambuf* rdbuf() const; - _STLP_DECLSPEC void freeze(bool = true); - _STLP_DECLSPEC char* str(); - _STLP_DECLSPEC int pcount() const; - -private: - strstreambuf _M_buf; -}; - -//---------------------------------------------------------------------- -// Class strstream -#ifdef __SYMBIAN32__ -NONSHARABLE_CLASS (strstream) : public basic_iostream > -#else -class _STLP_CLASS_DECLSPEC strstream : public basic_iostream > -#endif -{ -public: - typedef char char_type; - typedef char_traits::int_type int_type; - typedef char_traits::pos_type pos_type; - typedef char_traits::off_type off_type; - - _STLP_DECLSPEC strstream(); - _STLP_DECLSPEC strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out); - virtual ~strstream(); - - _STLP_DECLSPEC strstreambuf* rdbuf() const; - _STLP_DECLSPEC void freeze(bool = true); - _STLP_DECLSPEC int pcount() const; - _STLP_DECLSPEC char* str(); - -private: - strstreambuf _M_buf; -}; - -_STLP_END_NAMESPACE diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_tempbuf.c --- a/epoc32/include/stdapis/stlport/stl/_tempbuf.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_TEMPBUF_C -#define _STLP_TEMPBUF_C - -#ifndef _STLP_INTERNAL_TEMPBUF_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -pair<_Tp*, ptrdiff_t> _STLP_CALL -__get_temporary_buffer(ptrdiff_t __len, _Tp*) -{ - if (__len > ptrdiff_t(INT_MAX / sizeof(_Tp))) - __len = INT_MAX / sizeof(_Tp); - - while (__len > 0) { - _Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp)); - if (__tmp != 0) - return pair<_Tp*, ptrdiff_t>(__tmp, __len); - __len /= 2; - } - - return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0); -} -_STLP_END_NAMESPACE - -#endif /* _STLP_TEMPBUF_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_tempbuf.h --- a/epoc32/include/stdapis/stlport/stl/_tempbuf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_TEMPBUF_H -#define _STLP_INTERNAL_TEMPBUF_H - -# ifndef _STLP_CLIMITS -# include -# endif -# ifndef _STLP_CSTDLIB -# include -# endif -# ifndef _STLP_INTERNAL_UNINITIALIZED_H -# include -# endif - -_STLP_BEGIN_NAMESPACE - -template -pair<_Tp*, ptrdiff_t> _STLP_CALL -__get_temporary_buffer(ptrdiff_t __len, _Tp*); - -#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS - -template -inline pair<_Tp*, ptrdiff_t> _STLP_CALL get_temporary_buffer(ptrdiff_t __len) { - return __get_temporary_buffer(__len, (_Tp*) 0); -} - -# if ! defined(_STLP_NO_EXTENSIONS) -// This overload is not required by the standard; it is an extension. -// It is supported for backward compatibility with the HP STL, and -// because not all compilers support the language feature (explicit -// function template arguments) that is required for the standard -// version of get_temporary_buffer. -template -inline pair<_Tp*, ptrdiff_t> _STLP_CALL -get_temporary_buffer(ptrdiff_t __len, _Tp*) { - return __get_temporary_buffer(__len, (_Tp*) 0); -} -# endif -#endif - -template -inline void _STLP_CALL return_temporary_buffer(_Tp* __p) { -// SunPro brain damage - free((char*)__p); -} - -template -class _Temporary_buffer { -private: - ptrdiff_t _M_original_len; - ptrdiff_t _M_len; - _Tp* _M_buffer; - - void _M_allocate_buffer() { - _M_original_len = _M_len; - _M_buffer = 0; - - if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp))) - _M_len = INT_MAX / sizeof(_Tp); - - while (_M_len > 0) { - _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp)); - if (_M_buffer) - break; - _M_len /= 2; - } - } - - void _M_initialize_buffer(const _Tp&, const __true_type&) {} - void _M_initialize_buffer(const _Tp& val, const __false_type&) { - uninitialized_fill_n(_M_buffer, _M_len, val); - } - -public: - ptrdiff_t size() const { return _M_len; } - ptrdiff_t requested_size() const { return _M_original_len; } - _Tp* begin() { return _M_buffer; } - _Tp* end() { return _M_buffer + _M_len; } - - _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) { - // Workaround for a __type_traits bug in the pre-7.3 compiler. -# if defined(__sgi) && !defined(__GNUC__) && _COMPILER_VERSION < 730 - typedef typename __type_traits<_Tp>::is_POD_type _Trivial; -# else - typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Trivial; -# endif - _STLP_TRY { - _M_len = distance(__first, __last); - _M_allocate_buffer(); - if (_M_len > 0) - _M_initialize_buffer(*__first, _Trivial()); - } - _STLP_UNWIND(free(_M_buffer); _M_buffer = 0; _M_len = 0); - } - - ~_Temporary_buffer() { - _STLP_STD::_Destroy(_M_buffer, _M_buffer + _M_len); - free(_M_buffer); - } - -private: - // Disable copy constructor and assignment operator. - _Temporary_buffer(const _Temporary_buffer<_ForwardIterator, _Tp>&) {} - void operator=(const _Temporary_buffer<_ForwardIterator, _Tp>&) {} -}; - -# ifndef _STLP_NO_EXTENSIONS - -// Class temporary_buffer is not part of the standard. It is an extension. - -template ::value_type -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - > -struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp> -{ - temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) - : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {} - ~temporary_buffer() {} -}; - -# endif /* _STLP_NO_EXTENSIONS */ - -_STLP_END_NAMESPACE - -# ifndef _STLP_LINK_TIME_INSTANTIATION -# include -# endif - -#endif /* _STLP_INTERNAL_TEMPBUF_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_threads.c --- a/epoc32/include/stdapis/stlport/stl/_threads.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,172 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_THREADS_C -#define _STLP_THREADS_C - -#ifndef _STLP_INTERNAL_THREADS_H -# include -#endif - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -# if defined(_STLP_SGI_THREADS) -# include -# elif defined (_STLP_UNIX) -# include -# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) -using _STLP_VENDOR_CSTD::time_t; -# endif -# include -# endif - -_STLP_BEGIN_NAMESPACE - -# if (_STLP_STATIC_TEMPLATE_DATA > 0) - -# ifdef _STLP_THREADS -# if !defined(_STLP_ATOMIC_EXCHANGE) && (defined(_STLP_PTHREADS) || defined(_STLP_UITHREADS) || defined(_STLP_OS2THREADS) || defined(_STLP_USE_PTHREAD_SPINLOCK)) -template -_STLP_STATIC_MUTEX -_Swap_lock_struct<__dummy>::_S_swap_lock _STLP_MUTEX_INITIALIZER; -# endif -# endif //_STLP_THREADS - -# ifndef _STLP_USE_PTHREAD_SPINLOCK -template -unsigned _STLP_mutex_spin<__inst>::__max = _STLP_mutex_spin<__inst>::__low_max; - -template -unsigned _STLP_mutex_spin<__inst>::__last = 0; -# endif // _STLP_USE_PTHREAD_SPINLOCK - -# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -# if defined(_STLP_PTHREADS) || defined(_STLP_UITHREADS) || defined(_STLP_OS2THREADS) -__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, _Swap_lock_struct<0>::_S_swap_lock, - _STLP_MUTEX_INITIALIZER ); -# endif /* _STLP_PTHREADS */ - -# ifndef _STLP_USE_PTHREAD_SPINLOCK -__DECLARE_INSTANCE(unsigned, _STLP_mutex_spin<0>::__max, =30); -__DECLARE_INSTANCE(unsigned, _STLP_mutex_spin<0>::__last, =0); -# endif // _STLP_USE_PTHREAD_SPINLOCK - -# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -#ifndef _STLP_USE_PTHREAD_SPINLOCK - -#ifdef _STLP_SPARC_SOLARIS_THREADS -// underground function in libc.so; we do not want dependance on librt -extern "C" int __nanosleep(const struct timespec*, struct timespec*); -# define _STLP_NANOSLEEP __nanosleep -#else -# define _STLP_NANOSLEEP nanosleep -#endif - -template -void _STLP_CALL -_STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec) { -# if defined(_STLP_WIN32THREADS) - if (__log_nsec <= 20) { - // Note from boost (www.boost.org): - // Changed to Sleep(1) from Sleep(0). - // According to MSDN, Sleep(0) will never yield - // to a lower-priority thread, whereas Sleep(1) - // will. Performance seems not to be affected. - Sleep(1); - } else { - Sleep(1 << (__log_nsec - 20)); - } -# elif defined(_STLP_OS2THREADS) - if (__log_nsec <= 20) { - DosSleep(0); - } else { - DosSleep(1 << (__log_nsec - 20)); - } -# elif defined (_STLP_UNIX) - timespec __ts; - /* Max sleep is 2**27nsec ~ 60msec */ - __ts.tv_sec = 0; - __ts.tv_nsec = 1 << __log_nsec; - _STLP_NANOSLEEP(&__ts, 0); -# endif - } - - -template -void _STLP_CALL -_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* __lock) -{ -#if defined(_STLP_ATOMIC_EXCHANGE) - if (_Atomic_swap(__lock, 1)) { - unsigned __my_spin_max = _STLP_mutex_spin<0>::__max; - unsigned __my_last_spins = _STLP_mutex_spin<0>::__last; - volatile unsigned __junk = 17; // Value doesn't matter. - unsigned __i; - - for (__i = 0; __i < __my_spin_max; ++__i) { - if (__i < __my_last_spins/2 || *__lock) { - __junk *= __junk; __junk *= __junk; - __junk *= __junk; __junk *= __junk; - } else { - if (!_Atomic_swap(__lock, 1)) { - // got it! - // Spinning worked. Thus we're probably not being scheduled - // against the other process with which we were contending. - // Thus it makes sense to spin longer the next time. - _STLP_mutex_spin<0>::__last = __i; - _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__high_max; - return; - } - } - } - - // We are probably being scheduled against the other process. Sleep. - _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__low_max; - - for (__i = 0 ;; ++__i) { - int __log_nsec = __i + 6; - - if (__log_nsec > 27) __log_nsec = 27; - if (!_Atomic_swap(__lock, 1)) { - break; - } - _S_nsec_sleep(__log_nsec); - } - - } /* first _Atomic_swap */ -# endif -} -#endif // _STLP_USE_PTHREAD_SPINLOCK - -_STLP_END_NAMESPACE - -# endif /* BUILDING_STLPORT */ -#endif /* _STLP_THREADS_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_threads.h --- a/epoc32/include/stdapis/stlport/stl/_threads.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,666 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. -// Stl_config.h should be included before this file. - - -#ifndef _STLP_INTERNAL_THREADS_H -#define _STLP_INTERNAL_THREADS_H - -// Supported threading models are native SGI, pthreads, uithreads -// (similar to pthreads, but based on an earlier draft of the Posix -// threads standard), and Win32 threads. Uithread support by Jochen -// Schlick, 1999, and Solaris threads generalized to them. - -#ifndef _STLP_CONFIG_H -#include -#endif - -# if ! defined (_STLP_CSTDDEF) -# include -# endif - -# if ! defined (_STLP_CSTDLIB) -# include -# endif - -// On SUN and Mac OS X gcc, zero-initialization works just fine... -# if defined (__sun) || ( defined(__GNUC__) && defined(__APPLE__) ) -# define _STLP_MUTEX_INITIALIZER -# endif - -# if defined (_STLP_WIN32) || defined (__sgi) || defined (_STLP_SPARC_SOLARIS_THREADS) - typedef long __stl_atomic_t; -# else -# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) -// using _STLP_VENDOR_CSTD::size_t; -using namespace _STLP_VENDOR_CSTD; -# endif - typedef size_t __stl_atomic_t; -#endif - -# if defined(_STLP_SGI_THREADS) -# include -// Hack for SGI o32 compilers. -#if !defined(__add_and_fetch) && \ - (__mips < 3 || !(defined (_ABIN32) || defined(_ABI64))) -# define __add_and_fetch(__l,__v) add_then_test((unsigned long*)__l,__v) -# define __test_and_set(__l,__v) test_and_set(__l,__v) -#endif /* o32 */ - -# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) -# define _STLP_ATOMIC_EXCHANGE(__p, __q) test_and_set(__p, __q) -# else -# define _STLP_ATOMIC_EXCHANGE(__p, __q) __test_and_set((unsigned long*)__p, (unsigned long)__q) -# endif - -# define _STLP_ATOMIC_INCREMENT(__x) __add_and_fetch(__x, 1) -# define _STLP_ATOMIC_DECREMENT(__x) __add_and_fetch(__x, (size_t) -1) - -# elif defined (__GNUC__) && defined (__i386__) && defined (__unix__) && defined (_STLP_USE_INLINE_X86_SPINLOCK) - -// gcc on i386 linux, freebsd, etc. - -// This enables the memory caching on x86 linux. It is critical for SMP -// without it the performace is DISMAL! -static inline unsigned long __xchg(volatile __stl_atomic_t* target, int source) -{ - - // The target is refernce in memory rather than the register - // because making a copy of it from memory to the register and - // back again would ruin the atomic nature of the call. - // the source does not need to be delt with atomicly so it can - // be copied about as needed. - // - // The casting of the source is used to prevent gcc from optimizing - // in such a way that breaks the atomic nature of this call. - // - __asm__ __volatile__("xchgl %1,%0" - :"=m" (*(volatile long *) target), "=r" (source) - :"m" (*(volatile long *) target), "r" (source) ); - return source; - - // The assembly above does the following atomicly: - // int temp=source; - // source=(int)(*target); - // (int)(*target)=temp; - // return source -} - -static inline void __inc_and_fetch(volatile __stl_atomic_t* __x) -{ - // Referenced in memory rather than register to preserve the atomic nature. - // - __asm__ __volatile__( - "lock; incl %0" - :"=m" (*__x) - :"m" (*__x) ); - - // The assembly above does the following atomicly: - // ++(int)(*__x); - -} -static inline void __dec_and_fetch(volatile __stl_atomic_t* __x) -{ - // Referenced in memory rather than register to preserve the atomic nature. - // - __asm__ __volatile__( - "lock; decl %0" - :"=m" (*__x) - :"m" (*__x) ); - - // The assembly above does the following atomicly: - // --(int)(*__x); -} - -# define _STLP_ATOMIC_EXCHANGE(target, newValue) ((__xchg(target, newValue))) -# define _STLP_ATOMIC_INCREMENT(__x) __inc_and_fetch(__x) -# define _STLP_ATOMIC_DECREMENT(__x) __dec_and_fetch(__x) - -# elif defined(_STLP_PTHREADS) - -# include -# ifndef _STLP_USE_PTHREAD_SPINLOCK -# if defined(PTHREAD_MUTEX_INITIALIZER) && !defined(_STLP_MUTEX_INITIALIZER) -# define _STLP_MUTEX_INITIALIZER = { PTHREAD_MUTEX_INITIALIZER } -# endif - -//HPUX variants have (on some platforms optional) non-standard "DCE" pthreads impl -# if defined(_DECTHREADS_) && (defined(_PTHREAD_USE_D4) || defined(__hpux)) && !defined(_CMA_SUPPRESS_EXTERNALS_) -# define _STLP_PTHREAD_ATTR_DEFAULT pthread_mutexattr_default -# else -# define _STLP_PTHREAD_ATTR_DEFAULT 0 -# endif -# endif // !_STLP_USE_PTHREAD_SPINLOCK - -# elif defined(_STLP_WIN32THREADS) -# if !defined (_STLP_WINDOWS_H_INCLUDED) && ! defined (_WINDOWS_H) -# if ! (defined ( _STLP_MSVC ) || defined (__BORLANDC__) || defined (__ICL) || defined (__WATCOMC__) || defined (__MINGW32__) || defined (__DMC__)) -# ifdef _STLP_USE_MFC -# include -# else -# include -# endif -# define _STLP_WINDOWS_H_INCLUDED -# else -// This section serves as a replacement for windows.h header for Visual C++ -extern "C" { -# if (defined(_M_MRX000) || defined(_M_ALPHA) \ - || (defined(_M_PPC) && (_MSC_VER >= 1000))) && !defined(RC_INVOKED) -# define InterlockedIncrement _InterlockedIncrement -# define InterlockedDecrement _InterlockedDecrement -# define InterlockedExchange _InterlockedExchange -# define _STLP_STDCALL -# else -# ifdef _MAC -# define _STLP_STDCALL _cdecl -# else -# define _STLP_STDCALL __stdcall -# endif -# endif - -#if (_MSC_VER >= 1300) || defined (_STLP_NEW_PLATFORM_SDK) -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long); -#else - // boris : for the latest SDK, you may actually need the other version of the declaration (above) - // even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ... -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long); -#endif - -_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long); -_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA( const char* lpOutputString ); - -#ifdef _STLP_DEBUG -typedef unsigned long DWORD; -_STLP_IMPORT_DECLSPEC DWORD _STLP_STDCALL GetCurrentThreadId(); -#endif /* _STLP_DEBUG */ - -# if defined (InterlockedIncrement) -# pragma intrinsic(_InterlockedIncrement) -# pragma intrinsic(_InterlockedDecrement) -# pragma intrinsic(_InterlockedExchange) -# endif -} /* extern "C" */ - -# endif /* STL_MSVC */ - -# define _STLP_WINDOWS_H_INCLUDED - -# endif /* _STLP_WIN32 */ - -# ifndef _STLP_ATOMIC_INCREMENT -# define _STLP_ATOMIC_INCREMENT(__x) InterlockedIncrement((long*)__x) -# define _STLP_ATOMIC_DECREMENT(__x) InterlockedDecrement((long*)__x) -# define _STLP_ATOMIC_EXCHANGE(__x, __y) InterlockedExchange((long*)__x, (long)__y) -# endif -# elif defined(__DECC) || defined(__DECCXX) -# include -# define _STLP_ATOMIC_EXCHANGE __ATOMIC_EXCH_LONG -# define _STLP_ATOMIC_INCREMENT(__x) __ATOMIC_ADD_LONG(__x, 1) -# define _STLP_ATOMIC_DECREMENT(__x) __ATOMIC_ADD_LONG(__x, -1) -# elif defined(_STLP_SPARC_SOLARIS_THREADS) -# include -# elif defined (_STLP_UITHREADS) -// this inclusion is potential hazard to bring up all sorts -// of old-style headers. Let's assume vendor already know how -// to deal with that. -# include -# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) -using _STLP_VENDOR_CSTD::time_t; -# endif -# include -# include -# include -# elif defined (_STLP_BETHREADS) -# include -#include -#include -# define _STLP_MUTEX_INITIALIZER = { 0 } -#elif defined(_STLP_OS2THREADS) -# ifdef __GNUC__ -# define INCL_DOSSEMAPHORES -# include -# else - // This section serves to replace os2.h for VisualAge C++ - typedef unsigned long ULONG; - #ifndef __HEV__ /* INCL_SEMAPHORE may also define HEV */ - #define __HEV__ - typedef ULONG HEV; - typedef HEV* PHEV; - #endif - typedef ULONG APIRET; - typedef ULONG HMTX; - typedef HMTX* PHMTX; - typedef const char* PCSZ; - typedef ULONG BOOL32; - APIRET _System DosCreateMutexSem(PCSZ pszName, PHEV phev, ULONG flAttr, BOOL32 fState); - APIRET _System DosRequestMutexSem(HMTX hmtx, ULONG ulTimeout); - APIRET _System DosReleaseMutexSem(HMTX hmtx); - APIRET _System DosCloseMutexSem(HMTX hmtx); -# define _STLP_MUTEX_INITIALIZER = { 0 }; -# endif /* GNUC */ -# elif defined(_STLP_VXWORKS_THREADS) -# include "semLib.h" -# endif - -# ifndef _STLP_MUTEX_INITIALIZER -# if defined(_STLP_ATOMIC_EXCHANGE) -// we are using our own spinlock. -# define _STLP_MUTEX_INITIALIZER = { 0 } -# elif defined(_STLP_UITHREADS) -// known case -# define _STLP_MUTEX_INITIALIZER = { DEFAULTMUTEX } -# else -// we do not have static initializer available. therefore, on-demand synchronization is needed. -# define _STLP_MUTEX_INITIALIZER -# define _STLP_MUTEX_NEEDS_ONDEMAND_INITIALIZATION -# endif -# endif - -_STLP_BEGIN_NAMESPACE - -#ifndef _STLP_USE_PTHREAD_SPINLOCK -// Helper struct. This is a workaround for various compilers that don't -// handle static variables in inline functions properly. -template -struct _STLP_mutex_spin { - enum { __low_max = 30, __high_max = 1000 }; - // Low if we suspect uniprocessor, high for multiprocessor. - static unsigned __max; - static unsigned __last; - static void _STLP_CALL _M_do_lock(volatile __stl_atomic_t* __lock); - static void _STLP_CALL _S_nsec_sleep(int __log_nsec); -}; -#endif // !_STLP_USE_PTHREAD_SPINLOCK - - -// Locking class. Note that this class *does not have a constructor*. -// It must be initialized either statically, with _STLP_MUTEX_INITIALIZER, -// or dynamically, by explicitly calling the _M_initialize member function. -// (This is similar to the ways that a pthreads mutex can be initialized.) -// There are explicit member functions for acquiring and releasing the lock. - -// There is no constructor because static initialization is essential for -// some uses, and only a class aggregate (see section 8.5.1 of the C++ -// standard) can be initialized that way. That means we must have no -// constructors, no base classes, no virtual functions, and no private or -// protected members. - -// For non-static cases, clients should use _STLP_mutex. - -struct _STLP_CLASS_DECLSPEC _STLP_mutex_base -{ -#if defined(_STLP_ATOMIC_EXCHANGE) || defined(_STLP_SGI_THREADS) - // It should be relatively easy to get this to work on any modern Unix. - volatile __stl_atomic_t _M_lock; -#endif - -#ifdef _STLP_THREADS - -# ifdef _STLP_ATOMIC_EXCHANGE - inline void _M_initialize() { _M_lock=0; } - inline void _M_destroy() {} - - void _M_acquire_lock() { - _STLP_mutex_spin<0>::_M_do_lock(&_M_lock); - } - - inline void _M_release_lock() { - volatile __stl_atomic_t* __lock = &_M_lock; -# if defined(_STLP_SGI_THREADS) && defined(__GNUC__) && __mips >= 3 - asm("sync"); - *__lock = 0; -# elif defined(_STLP_SGI_THREADS) && __mips >= 3 \ - && (defined (_ABIN32) || defined(_ABI64)) - __lock_release(__lock); -# elif defined (_STLP_SPARC_SOLARIS_THREADS) -# if defined (__WORD64) || defined (__arch64__) || defined (__sparcv9) || defined (__sparcv8plus) - asm("membar #StoreStore ; membar #LoadStore"); -# else - asm(" stbar "); -# endif - *__lock = 0; -# else - *__lock = 0; - // This is not sufficient on many multiprocessors, since - // writes to protected variables and the lock may be reordered. -# endif - } -# elif defined(_STLP_PTHREADS) -# ifdef _STLP_USE_PTHREAD_SPINLOCK - pthread_spinlock_t _M_lock; - inline void _M_initialize() { pthread_spin_init( &_M_lock, 0 ); } - inline void _M_destroy() { pthread_spin_destroy( &_M_lock ); } - - inline void _M_acquire_lock() { - // we do not care about race conditions here : there is only one thread at this point - if(!_M_lock) pthread_spin_init( &_M_lock, 0 ); - - // fbp: here, initialization on demand should happen before the lock - // we use simple strategy as we are sure this only happens on initialization - pthread_spin_lock( &_M_lock ); - } - - inline void _M_acquire_lock_nodemand() { - pthread_spin_lock( &_M_lock ); - } - inline void _M_release_lock() { pthread_spin_unlock( &_M_lock ); } -# else // !_STLP_USE_PTHREAD_SPINLOCK - pthread_mutex_t _M_lock; - - inline void _M_initialize() { - pthread_mutex_init(&_M_lock,_STLP_PTHREAD_ATTR_DEFAULT); - } - inline void _M_destroy() { - pthread_mutex_destroy(&_M_lock); - } - inline void _M_acquire_lock_nodemand() { - pthread_mutex_lock(&_M_lock); - } - - inline void _M_acquire_lock() { -# if defined (__hpux) && !defined (PTHREAD_MUTEX_INITIALIZER) - if (!_M_lock.field1) _M_initialize(); -# endif - pthread_mutex_lock(&_M_lock); - } - inline void _M_release_lock() { pthread_mutex_unlock(&_M_lock); } -# endif // !_STLP_USE_PTHREAD_SPINLOCK - -# elif defined (_STLP_UITHREADS) - mutex_t _M_lock; - inline void _M_initialize() { - mutex_init(&_M_lock,0,NULL); - } - inline void _M_destroy() { - mutex_destroy(&_M_lock); - } - inline void _M_acquire_lock() { mutex_lock(&_M_lock); } - inline void _M_release_lock() { mutex_unlock(&_M_lock); } - -# elif defined(_STLP_OS2THREADS) - HMTX _M_lock; - inline void _M_initialize() { DosCreateMutexSem(NULL, &_M_lock, 0, false); } - inline void _M_destroy() { DosCloseMutexSem(_M_lock); } - inline void _M_acquire_lock_nodemand() { - DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT); - } - inline void _M_acquire_lock() { - if(!_M_lock) _M_initialize(); - DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT); - } - inline void _M_release_lock() { DosReleaseMutexSem(_M_lock); } -# elif defined(_STLP_BETHREADS) - sem_id sem; - inline void _M_initialize() - { - sem = create_sem(1, "STLPort"); - assert(sem > 0); - } - inline void _M_destroy() - { - int t = delete_sem(sem); - assert(t == B_NO_ERROR); - } - inline void _M_acquire_lock_nodemand() - { - status_t t; - t = acquire_sem(sem); - assert(t == B_NO_ERROR); - } - inline void _M_acquire_lock(); - inline void _M_release_lock() - { - status_t t = release_sem(sem); - assert(t == B_NO_ERROR); - } -# elif defined(_STLP_VXWORKS_THREADS) - SEM_ID _M_sem; - inline void _M_initialize() - { - _M_sem = semMCreate(SEM_Q_FIFO); - assert(_M_sem > 0); - } - inline void _M_destroy() - { - STATUS __s; - semDelete (_M_sem); - assert(__s == OK); - } - inline void _M_acquire_lock_nodemand() - { - STATUS __s; - semTake (_M_sem, WAIT_FOREVER); - assert(__s == OK); - } - inline void _M_acquire_lock() - { - if (!_M_sem) - _M_initialize(); - _M_acquire_lock_nodemand(); - } - inline void _M_release_lock() - { - STATUS __s; - semGive (_M_sem, WAIT_FOREVER); - assert(__s == OK); - } -# else //*ty 11/24/2001 - added configuration check -# error "Unknown thread facility configuration" -# endif -#else /* No threads */ - inline void _M_initialize() {} - inline void _M_destroy() {} - inline void _M_acquire_lock() {} - inline void _M_release_lock() {} -#endif // _STLP_PTHREADS -}; - - -#if defined (_STLP_THREADS) && defined (_STLP_MUTEX_NEEDS_ONDEMAND_INITIALIZATION) -// for use in _STLP_mutex, our purposes do not require ondemand initialization -// also, mutex_base may use some hacks to determine uninitialized state by zero data, which only works for globals. -class _STLP_CLASS_DECLSPEC _STLP_mutex_nodemand : public _STLP_mutex_base { - inline void _M_acquire_lock() { - _M_acquire_lock_nodemand(); - } -}; -#else -typedef _STLP_mutex_base _STLP_mutex_nodemand; -#endif - - -// Locking class. The constructor initializes the lock, the destructor destroys it. -// Well - behaving class, does not need static initializer -class _STLP_CLASS_DECLSPEC _STLP_mutex : public _STLP_mutex_nodemand { - public: - inline _STLP_mutex () { _M_initialize(); } - inline ~_STLP_mutex () { _M_destroy(); } - private: - _STLP_mutex(const _STLP_mutex&); - void operator=(const _STLP_mutex&); -}; - - - -/* - * Class _Refcount_Base provides a type, __stl_atomic_t, a data member, - * _M_ref_count, and member functions _M_incr and _M_decr, which perform - * atomic preincrement/predecrement. The constructor initializes - * _M_ref_count. - */ -struct _STLP_CLASS_DECLSPEC _Refcount_Base -{ - // The data member _M_ref_count - volatile __stl_atomic_t _M_ref_count; - -# if !defined (_STLP_ATOMIC_EXCHANGE) - _STLP_mutex _M_mutex; -# endif - - // Constructor - _Refcount_Base(__stl_atomic_t __n) : _M_ref_count(__n) {} - - // _M_incr and _M_decr -# if defined (_STLP_THREADS) && defined (_STLP_ATOMIC_EXCHANGE) - void _M_incr() { _STLP_ATOMIC_INCREMENT((__stl_atomic_t*)&_M_ref_count); } - void _M_decr() { _STLP_ATOMIC_DECREMENT((__stl_atomic_t*)&_M_ref_count); } -# elif defined(_STLP_THREADS) - void _M_incr() { - _M_mutex._M_acquire_lock(); - ++_M_ref_count; - _M_mutex._M_release_lock(); - } - void _M_decr() { - _M_mutex._M_acquire_lock(); - --_M_ref_count; - _M_mutex._M_release_lock(); - } -# else /* No threads */ - void _M_incr() { ++_M_ref_count; } - void _M_decr() { --_M_ref_count; } -# endif -}; - -// Atomic swap on unsigned long -// This is guaranteed to behave as though it were atomic only if all -// possibly concurrent updates use _Atomic_swap. -// In some cases the operation is emulated with a lock. -# if defined (_STLP_THREADS) -# ifdef _STLP_ATOMIC_EXCHANGE -inline __stl_atomic_t _Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) { - return (__stl_atomic_t) _STLP_ATOMIC_EXCHANGE(__p,__q); -} -# elif defined(_STLP_PTHREADS) || defined (_STLP_UITHREADS) || defined (_STLP_OS2THREADS) || defined(_STLP_USE_PTHREAD_SPINLOCK) -// We use a template here only to get a unique initialized instance. -template -struct _Swap_lock_struct { - static _STLP_STATIC_MUTEX _S_swap_lock; -}; - - -// This should be portable, but performance is expected -// to be quite awful. This really needs platform specific -// code. -inline __stl_atomic_t _Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) { - _Swap_lock_struct<0>::_S_swap_lock._M_acquire_lock(); - __stl_atomic_t __result = *__p; - *__p = __q; - _Swap_lock_struct<0>::_S_swap_lock._M_release_lock(); - return __result; -} -# endif // _STLP_PTHREADS || _STLP_UITHREADS || _STLP_OS2THREADS || _STLP_USE_PTHREAD_SPINLOCK -# else // !_STLP_THREADS -/* no threads */ -static inline __stl_atomic_t _STLP_CALL -_Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) { - __stl_atomic_t __result = *__p; - *__p = __q; - return __result; -} -# endif // _STLP_THREADS - -// A locking class that uses _STLP_STATIC_MUTEX. The constructor takes -// a reference to an _STLP_STATIC_MUTEX, and acquires a lock. The destructor -// releases the lock. - -struct _STLP_CLASS_DECLSPEC _STLP_auto_lock -{ - _STLP_STATIC_MUTEX& _M_lock; - - _STLP_auto_lock(_STLP_STATIC_MUTEX& __lock) : _M_lock(__lock) - { _M_lock._M_acquire_lock(); } - ~_STLP_auto_lock() { _M_lock._M_release_lock(); } - -private: - void operator=(const _STLP_auto_lock&); - _STLP_auto_lock(const _STLP_auto_lock&); -}; - -typedef _STLP_auto_lock _STLP_mutex_lock; - -#ifdef _STLP_BETHREADS - -template -struct _STLP_beos_static_lock_data -{ - static bool is_init; - struct mutex_t : public _STLP_mutex - { - mutex_t() - { - _STLP_beos_static_lock_data<0>::is_init = true; - } - ~mutex_t() - { - _STLP_beos_static_lock_data<0>::is_init = false; - } - }; - static mutex_t mut; -}; - -template -bool _STLP_beos_static_lock_data<__inst>::is_init = false; -template -typename _STLP_beos_static_lock_data<__inst>::mutex_t _STLP_beos_static_lock_data<__inst>::mut; - - -inline void _STLP_mutex_base::_M_acquire_lock() -{ - if(sem == 0) - { - // we need to initialise on demand here - // to prevent race conditions use our global - // mutex if it's available: - if(_STLP_beos_static_lock_data<0>::is_init) - { - _STLP_auto_lock al(_STLP_beos_static_lock_data<0>::mut); - if(sem == 0) _M_initialize(); - } - else - { - // no lock available, we must still be - // in startup code, THERE MUST BE ONE THREAD - // ONLY active at this point. - _M_initialize(); - } - } - _M_acquire_lock_nodemand(); -} - -#endif - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_THREADS_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_time_facets.c --- a/epoc32/include/stdapis/stlport/stl/_time_facets.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,522 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_TIME_FACETS_C -#define _STLP_TIME_FACETS_C - -#ifndef _STLP_INTERNAL_TIME_FACETS_H -# include -#endif - -#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) - -#ifndef _STLP_INTERNAL_NUM_PUT_H -# include -#endif - -#ifndef _STLP_INTERNAL_NUM_GET_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//---------------------------------------------------------------------- -// Declarations of static template members. -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) -template -locale::id time_get<_CharT, _InputIterator>::id; - -template -locale::id time_put<_CharT, _OutputIterator>::id; -#endif - -# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -typedef time_get time_get_char; -typedef time_get time_get_char_2; -typedef time_get > > time_get_char_3; -typedef time_put time_put_char; -typedef time_put time_put_char_2; -typedef time_put > > time_put_char_3; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, time_get_char::id, ); -__DECLARE_INSTANCE(locale::id, time_get_char_2::id, ); -__DECLARE_INSTANCE(locale::id, time_get_char_3::id, ); -__DECLARE_INSTANCE(locale::id, time_put_char::id, ); -__DECLARE_INSTANCE(locale::id, time_put_char_2::id, ); -__DECLARE_INSTANCE(locale::id, time_put_char_3::id, ); -#endif - -# ifndef _STLP_NO_WCHAR_T - -typedef time_get time_get_wchar_t; -typedef time_get time_get_wchar_t_2; -typedef time_get > > time_get_wchar_t_3; -typedef time_put time_put_wchar_t; -typedef time_put time_put_wchar_t_2; -typedef time_put > > time_put_wchar_t_3; - -#ifndef __SYMBIAN32__ -__DECLARE_INSTANCE(locale::id, time_get_wchar_t::id, ); -__DECLARE_INSTANCE(locale::id, time_get_wchar_t_2::id, ); -__DECLARE_INSTANCE(locale::id, time_get_wchar_t_3::id, ); -__DECLARE_INSTANCE(locale::id, time_put_wchar_t::id, ); -__DECLARE_INSTANCE(locale::id, time_put_wchar_t_2::id, ); -__DECLARE_INSTANCE(locale::id, time_put_wchar_t_3::id, ); -#endif - -# endif - -# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ - -template -_RAIt _STLP_CALL -__match(_InIt& __first, _InIt& __last, _RAIt __name, _RAIt __name_end, _DiffType*) { - typedef _DiffType difference_type; - difference_type __n = __name_end - __name; - size_t __max_pos = 0; - difference_type __i; - difference_type __pos = 0; - difference_type __check_count = __n; - bool __do_check[_MAXNAMES]; - _RAIt __matching_name[_MAX_NAME_LENGTH]; - - for (__i = 0; __i < __n; ++__i) - __max_pos = (max)(__max_pos, __name[__i].size()); - - for (__i = 0; __i < _MAXNAMES; ++__i) - __do_check[__i] = true; - - - - for (__i = 0; __i < _MAX_NAME_LENGTH; ++__i) - __matching_name[__i] = __name_end; - - while (__first != __last) { - for (__i = 0; __i < __n; ++__i) - if (__do_check[__i]) - if (*__first == __name[__i][__pos]) { - if (__pos == _DiffType(__name[__i].size()) - 1) { - __do_check[__i] = 0; - __matching_name[__pos+1] = __name + __i; - --__check_count; - if (__check_count == 0) { - ++__first; - return __name + __i; - } - } - } - else { - __do_check[__i] = 0; - --__check_count; - if (__check_count == 0) - return __matching_name[__pos]; - } - - ++__first; ++__pos; - } - - return __matching_name[__pos]; -} - -template -_RAIt _STLP_CALL -__match(_InIt& __first, _InIt& __last, _RAIt __name, _RAIt __name_end) { - return __match((_InIt&)__first, (_InIt&)__last, __name, __name_end, _STLP_DISTANCE_TYPE(__name, _InIt)); -} - -// __get_formatted_time reads input that is assumed to be formatted -// according to the rules for the C strftime function (C standard, -// 7.12.3.5). This function is used to implement the do_get_time -// and do_get_date virtual functions, which depend on the locale -// specifications for the time and day formats respectively. -// Note the catchall default case, intended mainly for the '%Z' -// format designator, which does not make sense here since the -// representation of timezones is not part of the locale. -// -// The case branches are implemented either by doing a match using -// the appopriate name table or by doing a __get_integer_nogroup. -// -// 'y' format is assumed to mean that the input represents years -// since 1900. That is, 2002 should be represented as 102. There -// is no century-guessing. -// -// The match is successful if and only if the second component of the -// return value is format_end. - -// Note that the antepenultimate parameter is being used only to determine -// the correct overloading for the calls to __get_integer_nogroup. - -template -_InIt2 _STLP_CALL -__get_formatted_time _STLP_WEAK (_InIt1 __first, _InIt1 __last, - _InIt2 __format, _InIt2 __format_end, - /* _Ch, */ const _Time_Info& __table, - ios_base::iostate& __err, - tm* __t) { - while(__first != __last && __format != __format_end) { - if (*__format == '%') { - ++__format; - char __c = *__format; - switch (__c) { - case 'a': { - const string* __pr = - __match(__first, __last, - (string*)__table._M_dayname + 0 , (string*)__table._M_dayname + 7); - if (__pr == (string*)__table._M_dayname + 7) - return __format; - __t->tm_wday = (int)(__pr - (string*)__table._M_dayname); - break; - } - - case 'A': { - const string* __pr = - __match(__first, __last, - (string*)__table._M_dayname + 7, (string*)__table._M_dayname + 14); - if (__pr == (string*)__table._M_dayname + 14) - return __format; - __t->tm_wday = (int)(__pr - (string*)__table._M_dayname - 7); - break; - } - - case 'b': { - const string* __pr = - __match(__first, __last, - (string*)__table._M_monthname + 0, (string*)__table._M_monthname + 12); - if (__pr == (string*)__table._M_monthname + 12) - return __format; - __t->tm_mon = (int)(__pr - (string*)__table._M_monthname); - break; - } - - case 'B': { - const string* __pr = - __match(__first, __last, - (string*)__table._M_monthname + 12, (string*)__table._M_monthname + 24); - if (__pr == (string*)__table._M_monthname + 24) - return __format; - __t->tm_mon = (int)(__pr - (string*)__table._M_monthname - 12); - break; - } - - case 'd': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_mday); - if (!__pr || __t->tm_mday < 1 || __t->tm_mday > 31) { - __err |= ios_base::failbit; - return __format; - } - break; - } - - case 'H': case 'I': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_hour); - if (!__pr) - return __format; - break; - } - - case 'j': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_yday); - if (!__pr) - return __format; - break; - } - - case 'm': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_mon); - --__t->tm_mon; - if (!__pr || __t->tm_mon < 0 || __t->tm_mon > 11) { - __err |= ios_base::failbit; - return __format; - } - break; - } - - case 'M': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_min); - if (!__pr) - return __format; - break; - } - - case 'p': { - const string* __pr = - __match(__first, __last, (string*)__table._M_am_pm + 0, (string*)__table._M_am_pm + 2); - if (__pr == (string*)__table._M_am_pm + 2) - return __format; - if (__pr == (string*)__table._M_am_pm + 1) - __t->tm_hour += 12; - break; - } - - case 'S': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_sec); - if (!__pr) - return __format; - break; - } - - case 'y': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_year); - if (!__pr) - return __format; - break; - } - - case 'Y': { - bool __pr = - __get_decimal_integer(__first, __last, __t->tm_year); - __t->tm_year -= 1900; - if (!__pr) - return __format; - break; - } - - default: - break; - } - - } - else { - if (*__first != *__format) - break; - __first++; - } - - ++__format; - } - - return __format; -} - -template -bool _STLP_CALL -__get_short_or_long_dayname(_InIt& __first, _InIt& __last, - const _Time_Info& __table, tm* __t) { - const string* __pr = - __match(__first, __last, __table._M_dayname + 0, __table._M_dayname + 14); - __t->tm_wday = (int)(__pr - __table._M_dayname) % 7; - return __pr != __table._M_dayname + 14; -} - -template -bool _STLP_CALL -__get_short_or_long_monthname(_InIt& __first, _InIt& __last, - const _Time_Info& __table, tm* __t) { - const string* __pr = - __match(__first, __last, (string*)__table._M_monthname + 0, (string*)__table._M_monthname + 24); - __t->tm_mon = (int)(__pr - __table._M_monthname) % 12; - return __pr != __table._M_monthname + 24; -} - -# ifndef _STLP_NO_WCHAR_T -template -_OuIt _STLP_CALL -__put_time(char * __first, char * __last, _OuIt __stl_out, - const ios_base& __s, wchar_t) { - //const ctype& __ct = *(ctype*)__s._M_ctype_facet(); - const ctype& __ct = use_facet< ctype >(__s.getloc()); - wchar_t __wbuf[64]; - __ct.widen(__first, __last, __wbuf); - ptrdiff_t __len = __last - __first; - wchar_t * __eend = __wbuf + __len; - return copy((wchar_t*)__wbuf, __eend, __stl_out); -} -# endif - -#ifdef __SYMBIAN32__ -template -_OuIt _STLP_CALL -__put_time(char * __first, char * __last, _OuIt __stl_out, - const ios_base& __s, _CharT) { - //const ctype& __ct = *(ctype*)__s._M_ctype_facet(); - const ctype<_CharT>& __ct = use_facet< ctype<_CharT> >(__s.getloc()); - _CharT __wbuf[64]; - __ct.widen(__first, __last, __wbuf); - ptrdiff_t __len = __last - __first; - _CharT * __eend = __wbuf + __len; - return copy((_CharT*)__wbuf, __eend, __stl_out); -} - -#endif -template -_InIt -time_get<_Ch, _InIt>::do_get_date(_InIt __s, _InIt __end, - ios_base& /* __str */, ios_base::iostate& __err, - tm* __t) const -{ - typedef string::const_iterator string_iterator; - - string_iterator __format - = _M_timeinfo._M_date_format.begin(); - string_iterator __format_end - = _M_timeinfo._M_date_format.end(); - - string_iterator __result - = __get_formatted_time(__s, __end, __format, __format_end, - /* _Ch() ,*/ _M_timeinfo, __err, __t); - if (__result == __format_end) - __err = ios_base::goodbit; - else { - __err = ios_base::failbit; - if (__s == __end) - __err |= ios_base::eofbit; - } - return __s; -} - -template -_InIt -time_get<_Ch, _InIt>::do_get_time(_InIt __s, _InIt __end, - ios_base& /* __str */, ios_base::iostate& __err, - tm* __t) const -{ - typedef string::const_iterator string_iterator; - string_iterator __format - = _M_timeinfo._M_time_format.begin(); - string_iterator __format_end - = _M_timeinfo._M_time_format.end(); - - string_iterator __result - = __get_formatted_time(__s, __end, __format, __format_end, - /* _Ch() , */ _M_timeinfo, __err, __t); - __err = __result == __format_end ? ios_base::goodbit - : ios_base::failbit; - if (__s == __end) - __err |= ios_base::eofbit; - return __s; -} - -template -_InIt -time_get<_Ch, _InIt>::do_get_year(_InIt __s, _InIt __end, - ios_base&, - ios_base::iostate& __err, - tm* __t) const -{ - - if (__s == __end) { - __err = ios_base::failbit | ios_base::eofbit; - return __s; - } - - bool __pr = __get_decimal_integer(__s, __end, __t->tm_year); - __t->tm_year -= 1900; - __err = __pr ? ios_base::goodbit : ios_base::failbit; - if (__s == __end) - __err |= ios_base::eofbit; - - return __s; -} - -template -_InIt -time_get<_Ch, _InIt>::do_get_weekday(_InIt __s, _InIt __end, - ios_base& /* __str */, - ios_base::iostate& __err, - tm* __t) const -{ - bool __result = - __get_short_or_long_dayname(__s, __end, _M_timeinfo, __t); - if (__result) - __err = ios_base::goodbit; - else { - __err = ios_base::failbit; - if (__s == __end) - __err |= ios_base::eofbit; - } - return __s; -} - -template -_InIt -time_get<_Ch, _InIt>::do_get_monthname(_InIt __s, _InIt __end, - ios_base& /* __str */, - ios_base::iostate& __err, - tm* __t) const -{ - bool __result = - __get_short_or_long_monthname(__s, __end, _M_timeinfo, __t); - if (__result) - __err = ios_base::goodbit; - else { - __err = ios_base::failbit; - if (__s == __end) - __err |= ios_base::eofbit; - } - return __s; -} - -template -_OutputIter -time_put<_Ch,_OutputIter>::put(_OutputIter __s, ios_base& __f, _Ch __fill, - const tm* __tmb, - const _Ch* __pat, const _Ch* __pat_end) const -{ - locale __loc = __f.getloc(); - const ctype<_Ch>& _Ct = use_facet >(__loc); - // const ctype<_Ch>& _Ct = *(ctype<_Ch>*)__f._M_ctype_facet(); - while (__pat != __pat_end) { - char __c = _Ct.narrow(*__pat, 0); - if (__c == '%') { - char __mod = 0; - ++__pat; - __c = _Ct.narrow(*__pat++, 0); - if(__c == '#') { // MS extension - __mod = __c; - __c = _Ct.narrow(*__pat++, 0); - } - __s = do_put(__s, __f, __fill, __tmb, __c, __mod); - } - else - *__s++ = *__pat++; - } - return __s; -} - -template -_OutputIter -time_put<_Ch,_OutputIter>::do_put(_OutputIter __s, ios_base& __f, _Ch /* __fill */ , - const tm* __tmb, - char __format, char __modifier ) const -{ - char __buf[64]; - char * __iend = __write_formatted_time(__buf, __format, __modifier, - _M_timeinfo, __tmb); - // locale __loc = __f.getloc(); - return __put_time(__buf, __iend, __s, __f, _Ch()); -} - -_STLP_END_NAMESPACE - -# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ -#endif /* _STLP_TIME_FACETS_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_time_facets.h --- a/epoc32/include/stdapis/stlport/stl/_time_facets.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,345 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -// WARNING: This is an internal header file, included by other C++ -// standard library headers. You should not attempt to use this header -// file directly. - - -#ifndef _STLP_INTERNAL_TIME_FACETS_H -#define _STLP_INTERNAL_TIME_FACETS_H - -#ifndef _STLP_CTIME -# include // Needed (for struct tm) by time facets -#endif - -#include -#include - -_STLP_BEGIN_NAMESPACE - -// Template functions used by time_get - -// Matching input against a list of names - -// Alphabetic input of the names of months and the names -// of weekdays requires matching input against a list of names. -// We use a simple generic algorithm to accomplish this. This -// algorithm is not very efficient, especially for longer lists -// of names, but it probably does not matter for the initial -// implementation and it may never matter, since we do not expect -// this kind of input to be used very often. The algorithm -// could be improved fairly simply by creating a new list of -// names still in the running at each iteration. A more sophisticated -// approach would be to build a trie to do the matching. -// -// We compare each character of the input to the corresponding -// character of each name on the list that has not been eliminated, -// either because every character in the name has already been -// matched, or because some character has not been matched. We -// continue only as long as there are some names that have not been -// eliminated. - -// We do not really need a random access iterator (a forward iterator -// would do), but the extra generality makes the notation clumsier, -// and we don't really need it. - -// We can recognize a failed match by the fact that the second -// component of the return value will be __name_end. - -#define _MAXNAMES 64 -#define _MAX_NAME_LENGTH 64 - -// Both time_get and time_put need a structure of type _Time_Info -// to provide names and abbreviated names for months and days, -// as well as the am/pm designator. The month and weekday tables -// have the all the abbreviated names before all the full names. -// The _Time_Info tables are initialized using the non-template -// function _Init_timeinfo, which has two overloadings: one -// with a single reference parameter for the table to be initialized, -// and one with a second _Locale_time * parameter. The first form -// is called by the default constructor and the second by a special -// constructor invoked from the _byname subclass constructor to -// construct the base class. - -class _STLP_CLASS_DECLSPEC _Time_Info { -public: - string _M_dayname[14]; - string _M_monthname[24]; - string _M_am_pm[2]; - string _M_time_format; - string _M_date_format; - string _M_date_time_format; - string _M_long_date_format; - string _M_long_date_time_format; -}; - -_STLP_DECLSPEC void _STLP_CALL _Init_timeinfo(_Time_Info&); -_STLP_DECLSPEC void _STLP_CALL _Init_timeinfo(_Time_Info&, _Locale_time*); - -class _STLP_CLASS_DECLSPEC time_base { -public: - enum dateorder {no_order, dmy, mdy, ymd, ydm}; -}; - - -template ) > -class time_get : public locale::facet, public time_base -{ - friend class _Locale; - -public: - typedef _Ch char_type; - typedef _InIt iter_type; - - explicit time_get(size_t __refs = 0) : _BaseFacet(__refs) { - _Init_timeinfo(_M_timeinfo); - } - dateorder date_order() const { return do_date_order(); } - iter_type get_time(iter_type __s, iter_type __end, ios_base& __str, - ios_base::iostate& __err, tm* __t) const - { return do_get_time(__s, __end, __str, __err, __t); } - iter_type get_date(iter_type __s, iter_type __end, ios_base& __str, - ios_base::iostate& __err, tm* __t) const - { return do_get_date(__s, __end, __str, __err, __t); } - iter_type get_weekday(iter_type __s, iter_type __end, ios_base& __str, - ios_base::iostate& __err, tm* __t) const - { return do_get_weekday(__s, __end, __str, __err, __t); } - iter_type get_monthname(iter_type __s, iter_type __end, ios_base& __str, - ios_base::iostate& __err, tm* __t) const - { return do_get_monthname(__s, __end, __str, __err, __t); } - iter_type get_year(iter_type __s, iter_type __end, ios_base& __str, - ios_base::iostate& __err, tm* __t) const - { return do_get_year(__s, __end, __str, __err, __t); } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >*); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >*); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char**); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - _Time_Info _M_timeinfo; - - time_get(_Locale_time *, size_t __refs) : _BaseFacet(__refs) {} - - ~time_get() {} - - virtual dateorder do_date_order() const {return no_order;} - - virtual iter_type do_get_time(iter_type __s, iter_type __end, - ios_base&, ios_base::iostate& __err, - tm* __t) const; - - virtual iter_type do_get_date(iter_type __s, iter_type __end, - ios_base&, ios_base::iostate& __err, - tm* __t) const; - - virtual iter_type do_get_weekday(iter_type __s, iter_type __end, - ios_base&, - ios_base::iostate& __err, - tm* __t) const; - virtual iter_type do_get_monthname(iter_type __s, iter_type __end, - ios_base&, - ios_base::iostate& __err, - tm* __t) const; - - virtual iter_type do_get_year(iter_type __s, iter_type __end, - ios_base&, ios_base::iostate& __err, - tm* __t) const; -}; - -time_base::dateorder _STLP_CALL -_STLP_DECLSPEC __get_date_order(_Locale_time*); -_Locale_time* _STLP_CALL __acquire_time(const char* __name); -void _STLP_CALL __release_time(_Locale_time* __time); - -template ) > -class time_get_byname : public time_get<_Ch, _InIt> -{ -public: - typedef time_base::dateorder dateorder; - typedef _InIt iter_type; - - explicit time_get_byname(const char* __name, size_t __refs = 0) - : time_get<_Ch, _InIt>((_Locale_time*) 0, __refs), - _M_time(__acquire_time(__name)) - { _Init_timeinfo(this->_M_timeinfo, this->_M_time); } - -protected: - ~time_get_byname() { __release_time(_M_time); } - dateorder do_date_order() const { return __get_date_order(_M_time); } -private: - _Locale_time* _M_time; -}; - -// time_put facet - -// For the formats 'x, 'X', and 'c', do_put calls the first form of -// put with the pattern obtained from _M_timeinfo._M_date_format or -// _M_timeinfo._M_time_format. - -// Helper function: __ takes a single-character -// format. As indicated by the foregoing remark, this will never be -// 'x', 'X', or 'c'. - -_STLP_DECLSPEC char * _STLP_CALL -__write_formatted_time(char * __buf, char __format, char __modifier, - const _Time_Info& __table, const tm* __t); - -template -inline _OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out, - const ios_base& /* __loc */, char) { - return copy(__first, __last, __out); -} - -# ifndef _STLP_NO_WCHAR_T -template -_OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out, - const ios_base& __s, wchar_t); -# endif - -template ) > -class time_put : public locale::facet, public time_base -{ - friend class _Locale; -public: - typedef _Ch char_type; - typedef _OutputIter iter_type; - - explicit time_put(size_t __refs = 0) : _BaseFacet(__refs) { - _Init_timeinfo(_M_timeinfo); - } - - _OutputIter put(iter_type __s, ios_base& __f, _Ch __fill, - const tm* __tmb, - const _Ch* __pat, const _Ch* __pat_end) const; - - _OutputIter put(iter_type __s, ios_base& __f, _Ch __fill, - const tm* __tmb, char __format, char __modifier = 0) const { - return do_put(__s, __f, __fill, __tmb, __format, __modifier); - } - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(ostreambuf_iterator >*); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(wchar_t**); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(ostreambuf_iterator >*); - _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); -#else - _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; -#endif - -protected: - _Time_Info _M_timeinfo; - - time_put(_Locale_time* /*__time*/, size_t __refs) : _BaseFacet(__refs) { - // _Init_timeinfo(_M_timeinfo, __time); - } - - ~time_put() {} - virtual iter_type do_put(iter_type __s, ios_base& __f, - char_type /* __fill */, const tm* __tmb, - char __format, char /* __modifier */) const; -}; - -template ) > -class time_put_byname : public time_put<_Ch, _InIt> -{ - friend class _Locale; -public: - typedef time_base::dateorder dateorder; - typedef _InIt iter_type; - typedef _Ch char_type; - - explicit time_put_byname(const char * __name, size_t __refs = 0) - : time_put<_Ch, _InIt>((_Locale_time*) 0, __refs), - _M_time(__acquire_time(__name)) - { _Init_timeinfo(this->_M_timeinfo, this->_M_time); } - -protected: - ~time_put_byname() { __release_time(_M_time); } - -private: - _Locale_time* _M_time; -}; - -# ifdef _STLP_USE_TEMPLATE_EXPORT -_STLP_EXPORT_TEMPLATE_CLASS time_get > >; -_STLP_EXPORT_TEMPLATE_CLASS time_put > >; -// _STLP_EXPORT_TEMPLATE_CLASS time_get; -// _STLP_EXPORT_TEMPLATE_CLASS time_put; -# ifndef _STLP_NO_WCHAR_T -_STLP_EXPORT_TEMPLATE_CLASS time_get > >; -_STLP_EXPORT_TEMPLATE_CLASS time_put > >; -// _STLP_EXPORT_TEMPLATE_CLASS time_get; -// _STLP_EXPORT_TEMPLATE_CLASS time_put; -# endif /* INSTANTIATE_WIDE_STREAMS */ - -# endif - -# if defined (__BORLANDC__) && defined (_RTLDLL) -inline void _Stl_loc_init_time_facets() { - -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - time_get > >::GetFacetLocaleId()._M_index = 16; - time_get::GetFacetLocaleId()._M_index = 17; - time_put > >::GetFacetLocaleId()._M_index = 18; - time_put::GetFacetLocaleId()._M_index = 19; -#else - time_get > >::GetFacetLocaleId()._M_index = 16; - time_get::id._M_index = 17; - time_put > >::GetFacetLocaleId()._M_index = 18; - time_put::id._M_index = 19; -#endif - -# ifndef _STLP_NO_WCHAR_T -#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) - time_get > >::GetFacetLocaleId()._M_index = 35; - time_get::GetFacetLocaleId()._M_index = 36; - time_put > >::GetFacetLocaleId()._M_index = 37; - time_put::GetFacetLocaleId()._M_index = 38; -#else - time_get > >::id._M_index = 35; - time_get::id._M_index = 36; - time_put > >::id._M_index = 37; - time_put::id._M_index = 38; -#endif //__SYMBIAN32__ -# endif //!_STLP_NO_WCHAR_T - -} -# endif - -_STLP_END_NAMESPACE - -#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_INTERNAL_TIME_FACETS_H */ - -// Local Variables: -// mode:C++ -// End: - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_tree.c --- a/epoc32/include/stdapis/stlport/stl/_tree.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,715 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - * Modified CRP 7/10/00 for improved conformance / efficiency on insert_unique / - * insert_equal with valid hint -- efficiency is improved all around, and it is - * should now be standard conforming for complexity on insert point immediately - * after hint (amortized constant time). - * - */ -#ifndef _STLP_TREE_C -#define _STLP_TREE_C - -#ifndef _STLP_INTERNAL_TREE_H -# include -#endif - -// fbp: these defines are for outline methods definitions. -// needed for definitions to be portable. Should not be used in method bodies. -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -# define __iterator__ _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> > -# define __size_type__ size_t -# define iterator __iterator__ -# else -# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::iterator -# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::size_type -# endif - -#if defined ( _STLP_DEBUG) -# define _Rb_tree __WORKAROUND_DBG_RENAME(Rb_tree) -#endif - -_STLP_BEGIN_NAMESPACE - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -template void _STLP_CALL -_Rb_global<_Dummy>::_Rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) -{ - _Rb_tree_node_base* __y = __x->_M_right; - __x->_M_right = __y->_M_left; - if (__y->_M_left !=0) - __y->_M_left->_M_parent = __x; - __y->_M_parent = __x->_M_parent; - - if (__x == __root) - __root = __y; - else if (__x == __x->_M_parent->_M_left) - __x->_M_parent->_M_left = __y; - else - __x->_M_parent->_M_right = __y; - __y->_M_left = __x; - __x->_M_parent = __y; -} - -template void _STLP_CALL -_Rb_global<_Dummy>::_Rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) -{ - _Rb_tree_node_base* __y = __x->_M_left; - __x->_M_left = __y->_M_right; - if (__y->_M_right != 0) - __y->_M_right->_M_parent = __x; - __y->_M_parent = __x->_M_parent; - - if (__x == __root) - __root = __y; - else if (__x == __x->_M_parent->_M_right) - __x->_M_parent->_M_right = __y; - else - __x->_M_parent->_M_left = __y; - __y->_M_right = __x; - __x->_M_parent = __y; -} - -template void _STLP_CALL -_Rb_global<_Dummy>::_Rebalance(_Rb_tree_node_base* __x, - _Rb_tree_node_base*& __root) -{ - __x->_M_color = _S_rb_tree_red; - while (__x != __root && __x->_M_parent->_M_color == _S_rb_tree_red) { - if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left) { - _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right; - if (__y && __y->_M_color == _S_rb_tree_red) { - __x->_M_parent->_M_color = _S_rb_tree_black; - __y->_M_color = _S_rb_tree_black; - __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; - __x = __x->_M_parent->_M_parent; - } - else { - if (__x == __x->_M_parent->_M_right) { - __x = __x->_M_parent; - _Rotate_left(__x, __root); - } - __x->_M_parent->_M_color = _S_rb_tree_black; - __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; - _Rotate_right(__x->_M_parent->_M_parent, __root); - } - } - else { - _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left; - if (__y && __y->_M_color == _S_rb_tree_red) { - __x->_M_parent->_M_color = _S_rb_tree_black; - __y->_M_color = _S_rb_tree_black; - __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; - __x = __x->_M_parent->_M_parent; - } - else { - if (__x == __x->_M_parent->_M_left) { - __x = __x->_M_parent; - _Rotate_right(__x, __root); - } - __x->_M_parent->_M_color = _S_rb_tree_black; - __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; - _Rotate_left(__x->_M_parent->_M_parent, __root); - } - } - } - __root->_M_color = _S_rb_tree_black; -} - -template _Rb_tree_node_base* _STLP_CALL -_Rb_global<_Dummy>::_Rebalance_for_erase(_Rb_tree_node_base* __z, - _Rb_tree_node_base*& __root, - _Rb_tree_node_base*& __leftmost, - _Rb_tree_node_base*& __rightmost) -{ - _Rb_tree_node_base* __y = __z; - _Rb_tree_node_base* __x = 0; - _Rb_tree_node_base* __x_parent = 0; - if (__y->_M_left == 0) // __z has at most one non-null child. y == z. - __x = __y->_M_right; // __x might be null. - else - if (__y->_M_right == 0) // __z has exactly one non-null child. y == z. - __x = __y->_M_left; // __x is not null. - else { // __z has two non-null children. Set __y to - __y = __y->_M_right; // __z's successor. __x might be null. - while (__y->_M_left != 0) - __y = __y->_M_left; - __x = __y->_M_right; - } - if (__y != __z) { // relink y in place of z. y is z's successor - __z->_M_left->_M_parent = __y; - __y->_M_left = __z->_M_left; - if (__y != __z->_M_right) { - __x_parent = __y->_M_parent; - if (__x) __x->_M_parent = __y->_M_parent; - __y->_M_parent->_M_left = __x; // __y must be a child of _M_left - __y->_M_right = __z->_M_right; - __z->_M_right->_M_parent = __y; - } - else - __x_parent = __y; - if (__root == __z) - __root = __y; - else if (__z->_M_parent->_M_left == __z) - __z->_M_parent->_M_left = __y; - else - __z->_M_parent->_M_right = __y; - __y->_M_parent = __z->_M_parent; - _STLP_STD::swap(__y->_M_color, __z->_M_color); - __y = __z; - // __y now points to node to be actually deleted - } - else { // __y == __z - __x_parent = __y->_M_parent; - if (__x) __x->_M_parent = __y->_M_parent; - if (__root == __z) - __root = __x; - else - if (__z->_M_parent->_M_left == __z) - __z->_M_parent->_M_left = __x; - else - __z->_M_parent->_M_right = __x; - if (__leftmost == __z) - if (__z->_M_right == 0) // __z->_M_left must be null also - __leftmost = __z->_M_parent; - // makes __leftmost == _M_header if __z == __root - else - __leftmost = _Rb_tree_node_base::_S_minimum(__x); - if (__rightmost == __z) - if (__z->_M_left == 0) // __z->_M_right must be null also - __rightmost = __z->_M_parent; - // makes __rightmost == _M_header if __z == __root - else // __x == __z->_M_left - __rightmost = _Rb_tree_node_base::_S_maximum(__x); - } - if (__y->_M_color != _S_rb_tree_red) { - while (__x != __root && (__x == 0 || __x->_M_color == _S_rb_tree_black)) - if (__x == __x_parent->_M_left) { - _Rb_tree_node_base* __w = __x_parent->_M_right; - if (__w->_M_color == _S_rb_tree_red) { - __w->_M_color = _S_rb_tree_black; - __x_parent->_M_color = _S_rb_tree_red; - _Rotate_left(__x_parent, __root); - __w = __x_parent->_M_right; - } - if ((__w->_M_left == 0 || - __w->_M_left->_M_color == _S_rb_tree_black) && (__w->_M_right == 0 || - __w->_M_right->_M_color == _S_rb_tree_black)) { - __w->_M_color = _S_rb_tree_red; - __x = __x_parent; - __x_parent = __x_parent->_M_parent; - } else { - if (__w->_M_right == 0 || - __w->_M_right->_M_color == _S_rb_tree_black) { - if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black; - __w->_M_color = _S_rb_tree_red; - _Rotate_right(__w, __root); - __w = __x_parent->_M_right; - } - __w->_M_color = __x_parent->_M_color; - __x_parent->_M_color = _S_rb_tree_black; - if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black; - _Rotate_left(__x_parent, __root); - break; - } - } else { // same as above, with _M_right <-> _M_left. - _Rb_tree_node_base* __w = __x_parent->_M_left; - if (__w->_M_color == _S_rb_tree_red) { - __w->_M_color = _S_rb_tree_black; - __x_parent->_M_color = _S_rb_tree_red; - _Rotate_right(__x_parent, __root); - __w = __x_parent->_M_left; - } - if ((__w->_M_right == 0 || - __w->_M_right->_M_color == _S_rb_tree_black) && (__w->_M_left == 0 || - __w->_M_left->_M_color == _S_rb_tree_black)) { - __w->_M_color = _S_rb_tree_red; - __x = __x_parent; - __x_parent = __x_parent->_M_parent; - } else { - if (__w->_M_left == 0 || - __w->_M_left->_M_color == _S_rb_tree_black) { - if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black; - __w->_M_color = _S_rb_tree_red; - _Rotate_left(__w, __root); - __w = __x_parent->_M_left; - } - __w->_M_color = __x_parent->_M_color; - __x_parent->_M_color = _S_rb_tree_black; - if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black; - _Rotate_right(__x_parent, __root); - break; - } - } - if (__x) __x->_M_color = _S_rb_tree_black; - } - return __y; -} - -template _Rb_tree_node_base* _STLP_CALL -_Rb_global<_Dummy>::_M_decrement(_Rb_tree_node_base* _M_node) -{ - if (_M_node->_M_color == _S_rb_tree_red && _M_node->_M_parent->_M_parent == _M_node) - _M_node = _M_node->_M_right; - else if (_M_node->_M_left != 0) { - _Base_ptr __y = _M_node->_M_left; - while (__y->_M_right != 0) - __y = __y->_M_right; - _M_node = __y; - } - else { - _Base_ptr __y = _M_node->_M_parent; - while (_M_node == __y->_M_left) { - _M_node = __y; - __y = __y->_M_parent; - } - _M_node = __y; - } - return _M_node; -} - -template _Rb_tree_node_base* _STLP_CALL -_Rb_global<_Dummy>::_M_increment(_Rb_tree_node_base* _M_node) -{ - if (_M_node->_M_right != 0) { - _M_node = _M_node->_M_right; - while (_M_node->_M_left != 0) - _M_node = _M_node->_M_left; - } - else { - _Base_ptr __y = _M_node->_M_parent; - while (_M_node == __y->_M_right) { - _M_node = __y; - __y = __y->_M_parent; - } - if (_M_node->_M_right != __y) - _M_node = __y; - } - return _M_node; -} - -#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */ - - -template _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::operator=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x) -{ - if (this != &__x) { - // Note that _Key may be a constant type. - clear(); - _M_node_count = 0; - _M_key_compare = __x._M_key_compare; - if (__x._M_root() == 0) { - _M_root() = 0; - _M_leftmost() = this->_M_header._M_data; - _M_rightmost() = this->_M_header._M_data; - } - else { - _M_root() = _M_copy(__x._M_root(), this->_M_header._M_data); - _M_leftmost() = _S_minimum(_M_root()); - _M_rightmost() = _S_maximum(_M_root()); - _M_node_count = __x._M_node_count; - } - } - return *this; -} - -// CRP 7/10/00 inserted argument __w_, which is another hint (meant to -// act like __x_ and ignore a portion of the if conditions -- specify -// __w_ != 0 to bypass comparison as false or __x_ != 0 to bypass -// comparison as true) -template __iterator__ -_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::_M_insert(_Rb_tree_node_base* __x_, _Rb_tree_node_base* __y_, const _Value& __v, - _Rb_tree_node_base* __w_) -{ - _Link_type __w = (_Link_type) __w_; - _Link_type __x = (_Link_type) __x_; - _Link_type __y = (_Link_type) __y_; - _Link_type __z; - - if ( __y == this->_M_header._M_data || - ( __w == 0 && // If w != 0, the remainder fails to false - ( __x != 0 || // If x != 0, the remainder succeeds to true - _M_key_compare( _KeyOfValue()(__v), _S_key(__y) ) ) - ) - ) { - - __z = _M_create_node(__v); - _S_left(__y) = __z; // also makes _M_leftmost() = __z - // when __y == _M_header - if (__y == this->_M_header._M_data) { - _M_root() = __z; - _M_rightmost() = __z; - } - else if (__y == _M_leftmost()) - _M_leftmost() = __z; // maintain _M_leftmost() pointing to min node - } - else { - __z = _M_create_node(__v); - _S_right(__y) = __z; - if (__y == _M_rightmost()) - _M_rightmost() = __z; // maintain _M_rightmost() pointing to max node - } - _S_parent(__z) = __y; - _S_left(__z) = 0; - _S_right(__z) = 0; - _Rb_global_inst::_Rebalance(__z, this->_M_header._M_data->_M_parent); - ++_M_node_count; - return iterator(__z); -} - -template __iterator__ -_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_equal(const _Value& __v) -{ - _Link_type __y = this->_M_header._M_data; - _Link_type __x = _M_root(); - while (__x != 0) { - __y = __x; - __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? - _S_left(__x) : _S_right(__x); - } - return _M_insert(__x, __y, __v); -} - - -template pair< _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> >, bool> _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_unique(const _Value& __v) -{ - _Link_type __y = this->_M_header._M_data; - _Link_type __x = _M_root(); - bool __comp = true; - while (__x != 0) { - __y = __x; - __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)); - __x = __comp ? _S_left(__x) : _S_right(__x); - } - iterator __j = iterator(__y); - if (__comp) - if (__j == begin()) - return pair(_M_insert(/* __x*/ __y, __y, __v), true); - else - --__j; - if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) - return pair(_M_insert(__x, __y, __v), true); - return pair(__j, false); -} - -// Modifications CRP 7/10/00 as noted to improve conformance and -// efficiency. -template __iterator__ -_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> ::insert_unique(iterator __position, const _Value& __v) -{ - if (__position._M_node == this->_M_header._M_data->_M_left) { // begin() - - // if the container is empty, fall back on insert_unique. - if (size() <= 0) - return insert_unique(__v).first; - - if ( _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) - return _M_insert(__position._M_node, __position._M_node, __v); - // first argument just needs to be non-null - else - { - bool __comp_pos_v = _M_key_compare( _S_key(__position._M_node), _KeyOfValue()(__v) ); - - if (__comp_pos_v == false) // compare > and compare < both false so compare equal - return __position; - //Below __comp_pos_v == true - - // Standard-conformance - does the insertion point fall immediately AFTER - // the hint? - iterator __after = __position; - ++__after; - - // Check for only one member -- in that case, __position points to itself, - // and attempting to increment will cause an infinite loop. - if (__after._M_node == this->_M_header._M_data) - // Check guarantees exactly one member, so comparison was already - // performed and we know the result; skip repeating it in _M_insert - // by specifying a non-zero fourth argument. - return _M_insert(0, __position._M_node, __v, __position._M_node); - - - // All other cases: - - // Optimization to catch insert-equivalent -- save comparison results, - // and we get this for free. - if(_M_key_compare( _KeyOfValue()(__v), _S_key(__after._M_node) )) { - if (_S_right(__position._M_node) == 0) - return _M_insert(0, __position._M_node, __v, __position._M_node); - else - return _M_insert(__after._M_node, __after._M_node, __v); - } else { - return insert_unique(__v).first; - } - } - - } else if (__position._M_node == this->_M_header._M_data) { // end() - if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) - // pass along to _M_insert that it can skip comparing - // v, Key ; since compare Key, v was true, compare v, Key must be false. - return _M_insert(0, _M_rightmost(), __v, __position._M_node); // Last argument only needs to be non-null - else - return insert_unique(__v).first; - } else { - iterator __before = __position; - --__before; - - bool __comp_v_pos = _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)); - - if (__comp_v_pos - && _M_key_compare( _S_key(__before._M_node), _KeyOfValue()(__v) )) { - - if (_S_right(__before._M_node) == 0) - return _M_insert(0, __before._M_node, __v, __before._M_node); // Last argument only needs to be non-null - else - return _M_insert(__position._M_node, __position._M_node, __v); - // first argument just needs to be non-null - } else - { - // Does the insertion point fall immediately AFTER the hint? - iterator __after = __position; - ++__after; - - // Optimization to catch equivalent cases and avoid unnecessary comparisons - bool __comp_pos_v = !__comp_v_pos; // Stored this result earlier - // If the earlier comparison was true, this comparison doesn't need to be - // performed because it must be false. However, if the earlier comparison - // was false, we need to perform this one because in the equal case, both will - // be false. - if (!__comp_v_pos) __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)); - - if ( (!__comp_v_pos) // comp_v_pos true implies comp_v_pos false - && __comp_pos_v - && (__after._M_node == this->_M_header._M_data || - _M_key_compare( _KeyOfValue()(__v), _S_key(__after._M_node) ))) { - - if (_S_right(__position._M_node) == 0) - return _M_insert(0, __position._M_node, __v, __position._M_node); - else - return _M_insert(__after._M_node, __after._M_node, __v); - } else { - // Test for equivalent case - if (__comp_v_pos == __comp_pos_v) - return __position; - else - return insert_unique(__v).first; - } - } - } -} - - -template __iterator__ -_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_equal(iterator __position, const _Value& __v) -{ - if (__position._M_node == this->_M_header._M_data->_M_left) { // begin() - - // Check for zero members - if (size() <= 0) - return insert_equal(__v); - - if (!_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) - return _M_insert(__position._M_node, __position._M_node, __v); - else { - // Check for only one member - if (__position._M_node->_M_left == __position._M_node) - // Unlike insert_unique, can't avoid doing a comparison here. - return _M_insert(0, __position._M_node, __v); - - // All other cases: - // Standard-conformance - does the insertion point fall immediately AFTER - // the hint? - iterator __after = __position; - ++__after; - - // Already know that compare(pos, v) must be true! - // Therefore, we want to know if compare(after, v) is false. - // (i.e., we now pos < v, now we want to know if v <= after) - // If not, invalid hint. - if ( __after._M_node==this->_M_header._M_data || - !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__v) ) ) { - if (_S_right(__position._M_node) == 0) - return _M_insert(0, __position._M_node, __v, __position._M_node); - else - return _M_insert(__after._M_node, __after._M_node, __v); - } else // Invalid hint - return insert_equal(__v); - } - } else if (__position._M_node == this->_M_header._M_data) {// end() - if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) - return _M_insert(0, _M_rightmost(), __v, __position._M_node); // Last argument only needs to be non-null - else - return insert_equal(__v); - } else { - iterator __before = __position; - --__before; - // store the result of the comparison between pos and v so - // that we don't have to do it again later. Note that this reverses the shortcut - // on the if, possibly harming efficiency in comparisons; I think the harm will - // be negligible, and to do what I want to do (save the result of a comparison so - // that it can be re-used) there is no alternative. Test here is for before <= v <= pos. - bool __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)); - if (!__comp_pos_v - && !_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node))) { - if (_S_right(__before._M_node) == 0) - return _M_insert(0, __before._M_node, __v, __before._M_node); // Last argument only needs to be non-null - else - return _M_insert(__position._M_node, __position._M_node, __v); - } else { - // Does the insertion point fall immediately AFTER the hint? - // Test for pos < v <= after - iterator __after = __position; - ++__after; - - if (__comp_pos_v - && ( __after._M_node==this->_M_header._M_data - || !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__v) ) ) ) { - if (_S_right(__position._M_node) == 0) - return _M_insert(0, __position._M_node, __v, __position._M_node); - else - return _M_insert(__after._M_node, __after._M_node, __v); - } else // Invalid hint - return insert_equal(__v); - } - } -} - -template _Rb_tree_node<_Value>* -_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::_M_copy(_Rb_tree_node<_Value>* __x, _Rb_tree_node<_Value>* __p) -{ - // structural copy. __x and __p must be non-null. - _STLP_LEAVE_VOLATILE _Link_type __top = _M_clone_node(__x); - __top->_M_parent = __p; - - _STLP_TRY { - if (__x->_M_right) - __top->_M_right = _M_copy(_S_right(__x), __top); - __p = __top; - __x = _S_left(__x); - - while (__x != 0) { - _Link_type __y = _M_clone_node(__x); - __p->_M_left = __y; - __y->_M_parent = __p; - if (__x->_M_right) - __y->_M_right = _M_copy(_S_right(__x), __y); - __p = __y; - __x = _S_left(__x); - } - } - _STLP_UNWIND(_M_erase(__top)); - - return __top; -} - -// this has to stay out-of-line : it's recursive -template void -_Rb_tree<_Key,_Value,_KeyOfValue, - _Compare,_Alloc>::_M_erase(_Rb_tree_node<_Value>* __x) -{ - // erase without rebalancing - while (__x != 0) { - _M_erase(_S_right(__x)); - _Link_type __y = _S_left(__x); - _STLP_STD::_Destroy(&__x->_M_value_field); - this->_M_header.deallocate(__x,1); - __x = __y; - } -} - -template __size_type__ -_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::count(const _Key& __k) const -{ - pair __p = equal_range(__k); - size_type __n = distance(__p.first, __p.second); - return __n; -} - -inline int -__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root) -{ - if (__node == 0) - return 0; - else { - int __bc = __node->_M_color == _S_rb_tree_black ? 1 : 0; - if (__node == __root) - return __bc; - else - return __bc + __black_count(__node->_M_parent, __root); - } -} - -template bool _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const -{ - if (_M_node_count == 0 || begin() == end()) - return _M_node_count == 0 && begin() == end() && this->_M_header._M_data->_M_left == this->_M_header._M_data - && this->_M_header._M_data->_M_right == this->_M_header._M_data; - - int __len = __black_count(_M_leftmost(), _M_root()); - for (const_iterator __it = begin(); __it != end(); ++__it) { - _Link_type __x = (_Link_type) __it._M_node; - _Link_type __L = _S_left(__x); - _Link_type __R = _S_right(__x); - - if (__x->_M_color == _S_rb_tree_red) - if ((__L && __L->_M_color == _S_rb_tree_red) || - (__R && __R->_M_color == _S_rb_tree_red)) - return false; - - if (__L && _M_key_compare(_S_key(__x), _S_key(__L))) - return false; - if (__R && _M_key_compare(_S_key(__R), _S_key(__x))) - return false; - - if (!__L && !__R && __black_count(__x, _M_root()) != __len) - return false; - } - - if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) - return false; - if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) - return false; - - return true; -} -_STLP_END_NAMESPACE - -# undef __iterator__ -# undef iterator -# undef __size_type__ - -#endif /* _STLP_TREE_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_uninitialized.h --- a/epoc32/include/stdapis/stlport/stl/_uninitialized.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,291 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_UNINITIALIZED_H -#define _STLP_INTERNAL_UNINITIALIZED_H - -# ifndef _STLP_CSTRING -# include -# endif - -# ifndef _STLP_INTERNAL_ALGOBASE_H -# include -# endif - -# ifndef _STLP_INTERNAL_CONSTRUCT_H -# include -# endif - -_STLP_BEGIN_NAMESPACE - -// uninitialized_copy - -// Valid if copy construction is equivalent to assignment, and if the -// destructor is trivial. -template -inline _ForwardIter -__uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, - const __true_type&) { - return __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _ForwardIter> :: _Ret()); -} - -template -// _STLP_INLINE_LOOP -_ForwardIter -__uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, - const __false_type&) -{ - _STLP_LEAVE_VOLATILE _ForwardIter __cur = __result; - _STLP_TRY { - for ( ; __first != __last; ++__first, ++__cur) - _Construct(&*__cur, *__first); - // return __cur; - } - _STLP_UNWIND (_STLP_STD::_Destroy(__result, __cur)); - return __cur; -} - -template -inline _ForwardIter -uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result) { - return __uninitialized_copy(__first, __last, __result, _IS_POD_ITER(__result, _ForwardIter)); -} - -inline char* -uninitialized_copy(const char* __first, const char* __last, char* __result) { - return (char*)__copy_trivial (__first, __last, __result); -} - -# ifdef _STLP_HAS_WCHAR_T // dwa 8/15/97 -inline wchar_t* -uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result) { - return (wchar_t*)__copy_trivial (__first, __last, __result); -} -# endif /* _STLP_HAS_WCHAR_T */ - -# ifndef _STLP_NO_EXTENSIONS -// uninitialized_copy_n (not part of the C++ standard) - -template -// _STLP_INLINE_LOOP -pair<_InputIter, _ForwardIter> -__uninitialized_copy_n(_InputIter __first, _Size __count, - _ForwardIter __result, - const input_iterator_tag &) -{ - _STLP_LEAVE_VOLATILE _ForwardIter __cur = __result; - _STLP_TRY { - for ( ; __count > 0 ; --__count, ++__first, ++__cur) - _Construct(&*__cur, *__first); - // return pair<_InputIter, _ForwardIter>(__first, __cur); - } - _STLP_UNWIND(_STLP_STD::_Destroy(__result, __cur)); - - return pair<_InputIter, _ForwardIter>(__first, __cur); - -} - -# if defined(_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline pair<_InputIterator, _ForwardIterator> -__uninitialized_copy_n(_InputIterator __first, _Size __count, - _ForwardIterator __result, - const forward_iterator_tag &) { - return __uninitialized_copy_n(__first, __count, __result, input_iterator_tag()); -} - -template -inline pair<_InputIterator, _ForwardIterator> -__uninitialized_copy_n(_InputIterator __first, _Size __count, - _ForwardIterator __result, - const bidirectional_iterator_tag &) { - return __uninitialized_copy_n(__first, __count, __result, input_iterator_tag()); -} -# endif - - -template -inline pair<_RandomAccessIter, _ForwardIter> -__uninitialized_copy_n(_RandomAccessIter __first, _Size __count, _ForwardIter __result, const random_access_iterator_tag &) { - _RandomAccessIter __last = __first + __count; - return pair<_RandomAccessIter, _ForwardIter>( __last, __uninitialized_copy(__first, __last, __result, - _IS_POD_ITER(__result, _ForwardIter))); -} - -// this is used internally in , which is extension itself. -template -inline pair<_InputIter, _ForwardIter> -uninitialized_copy_n(_InputIter __first, _Size __count, - _ForwardIter __result) { - return __uninitialized_copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); -} -# endif /* _STLP_NO_EXTENSIONS */ - -// Valid if copy construction is equivalent to assignment, and if the -// destructor is trivial. -template -inline void -__uninitialized_fill(_ForwardIter __first, _ForwardIter __last, - const _Tp& __x, const __true_type&) { - _STLP_STD::fill(__first, __last, __x); -} - -template -// _STLP_INLINE_LOOP -void -__uninitialized_fill(_ForwardIter __first, _ForwardIter __last, - const _Tp& __x, const __false_type&) -{ - _STLP_LEAVE_VOLATILE _ForwardIter __cur = __first; - _STLP_TRY { - for ( ; __cur != __last; ++__cur) - _Construct(&*__cur, __x); - } - _STLP_UNWIND(_STLP_STD::_Destroy(__first, __cur)); -} - -template -inline void uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x) { - __uninitialized_fill(__first, __last, __x, _IS_POD_ITER(__first, _ForwardIter)); -} - -// Valid if copy construction is equivalent to assignment, and if the -// destructor is trivial. -template -inline _ForwardIter -__uninitialized_fill_n(_ForwardIter __first, _Size __n, - const _Tp& __x, const __true_type&) { - return _STLP_STD::fill_n(__first, __n, __x); -} - -template -//_STLP_INLINE_LOOP -_ForwardIter -__uninitialized_fill_n(_ForwardIter __first, _Size __n, - const _Tp& __x, const __false_type&) -{ - _STLP_LEAVE_VOLATILE _ForwardIter __cur = __first; - _STLP_TRY { - for ( ; __n > 0; --__n, ++__cur) - _Construct(&*__cur, __x); - // return __cur; - } - _STLP_UNWIND(_STLP_STD::_Destroy(__first, __cur)); - // # ifdef _STLP_THROW_RETURN_BUG - return __cur; - //# endif -} - -template -inline _ForwardIter -uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) { - return __uninitialized_fill_n(__first, __n, __x, _IS_POD_ITER(__first, _ForwardIter)); -} - -// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, -// __uninitialized_fill_copy. - -// __uninitialized_copy_copy -// Copies [first1, last1) into [result, result + (last1 - first1)), and -// copies [first2, last2) into -// [result, result + (last1 - first1) + (last2 - first2)). - -template -inline _ForwardIter -__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _ForwardIter __result, __true_type) -{ - return __uninitialized_copy(__first2, __last2, - __uninitialized_copy(__first1, __last1, __result, __true_type()), __true_type()); -} - -template -// inline -_ForwardIter -__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, - _InputIter2 __first2, _InputIter2 __last2, - _ForwardIter __result, __false_type) -{ - _STLP_LEAVE_VOLATILE _ForwardIter __mid = __uninitialized_copy(__first1, __last1, __result, _IS_POD_ITER(__result, _ForwardIter)); - - _STLP_TRY { - return __uninitialized_copy(__first2, __last2, __mid , _IS_POD_ITER(__result, _ForwardIter)); - } - _STLP_UNWIND (_STLP_STD::_Destroy(__result, __mid)); -# ifdef _STLP_THROW_RETURN_BUG - return __mid; -# endif -} - -// __uninitialized_fill_copy -// Fills [result, mid) with x, and copies [first, last) into -// [mid, mid + (last - first)). -template -// inline -_ForwardIter -__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, const _Tp& __x, - _InputIter __first, _InputIter __last) -{ - typedef typename __type_traits<_Tp>::is_POD_type _I_POD; - __uninitialized_fill(__result, __mid, __x, _I_POD()); - _STLP_TRY { - return __uninitialized_copy(__first, __last, __mid, _I_POD()); - } - _STLP_UNWIND (_STLP_STD::_Destroy(__result, __mid)); -# ifdef _STLP_THROW_RETURN_BUG - return __result; -# endif -} - -// __uninitialized_copy_fill -// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and -// fills [first2 + (last1 - first1), last2) with x. -template -// inline -void -__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1, - _ForwardIter __first2, _ForwardIter __last2, - const _Tp& __x) -{ - typedef typename __type_traits<_Tp>::is_POD_type _I_POD; - _ForwardIter __mid2 = __uninitialized_copy(__first1, __last1, __first2, _I_POD()); - _STLP_TRY { - __uninitialized_fill(__mid2, __last2, __x, _I_POD()); - } - _STLP_UNWIND(_STLP_STD::_Destroy(__first2, __mid2)); -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_UNINITIALIZED_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_valarray.c --- a/epoc32/include/stdapis/stlport/stl/_valarray.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,203 +0,0 @@ -/* - * - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_VALARRAY_C -#define _STLP_VALARRAY_C - -#ifndef _STLP_VALARRAY_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -template -_Valarray_bool valarray<_Tp>:: operator!() const { - _Valarray_bool __tmp(this->size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < this->size(); ++__i) - __tmp[__i] = !(*this)[__i]; - return __tmp; -} - -// Behavior is undefined if __x and *this have different sizes -template -valarray<_Tp>& valarray<_Tp>::operator=(const slice_array<_Tp>& __x) -{ - size_t __index = __x._M_slice.start(); - for (size_t __i = 0; - __i < __x._M_slice.size(); - ++__i, __index += __x._M_slice.stride()) - (*this)[__i] = (*(__x._M_array))[__index]; - return *this; -} - -template -valarray<_Tp> valarray<_Tp>::operator[](slice __slice) const { - valarray<_Tp> __tmp(__slice.size(), _NoInit()); - size_t __index = __slice.start(); - for (size_t __i = 0; - __i < __slice.size(); - ++__i, __index += __slice.stride()) - __tmp[__i] = (*this)[__index]; - return __tmp; -} - -template -bool _Gslice_Iter_tmpl<_Size>::_M_incr() { - size_t __dim = _M_indices.size() - 1; - ++_M_step; - while (true) { - _M_1d_idx += _M_gslice._M_strides[__dim]; - if (++_M_indices[__dim] != _M_gslice._M_lengths[__dim]) - return true; - else if (__dim != 0) { - _M_1d_idx -= - _M_gslice._M_strides[__dim] * _M_gslice._M_lengths[__dim]; - _M_indices[__dim] = 0; - --__dim; - } - else - return false; - } -} - -// Behavior is undefined if __x and *this have different sizes, or if -// __x was constructed from a degenerate gslice. -template -valarray<_Tp>& valarray<_Tp>::operator=(const gslice_array<_Tp>& __x) -{ - if (this->size() != 0) { - _Gslice_Iter __i(__x._M_gslice); - do - (*this)[__i._M_step] = __x._M_array[__i._M_1d_idx]; - while(__i._M_incr()); - } - return *this; -} - -template -valarray<_Tp> valarray<_Tp>::operator[](gslice __slice) const -{ - valarray<_Tp> __tmp(__slice._M_size(), _NoInit()); - if (__tmp.size() != 0) { - _Gslice_Iter __i(__slice); - do __tmp[__i._M_step] = (*this)[__i._M_1d_idx]; while(__i._M_incr()); - } - return __tmp; -} - -template -valarray<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) const -{ - size_t _p_size = 0; - { - for (size_t __i = 0; __i < __mask.size(); ++__i) - if (__mask[__i]) ++_p_size; - } - - valarray<_Tp> __tmp(_p_size, _NoInit()); - size_t __idx = 0; - { - for (size_t __i = 0; __i < __mask.size(); ++__i) - if (__mask[__i]) __tmp[__idx++] = (*this)[__i]; - } - - return __tmp; -} - -template -valarray<_Tp>& valarray<_Tp>::operator=(const indirect_array<_Tp>& __x) { - for (size_t __i = 0; __i < __x._M_addr.size(); ++__i) - (*this)[__i] = __x._M_array[__x._M_addr[__i]]; - return *this; -} - -template -valarray<_Tp> -valarray<_Tp>::operator[](const _Valarray_size_t& __addr) const -{ - valarray<_Tp> __tmp(__addr.size(), _NoInit()); - for (size_t __i = 0; __i < __addr.size(); ++__i) - __tmp[__i] = (*this)[__addr[__i]]; - return __tmp; -} - -//---------------------------------------------------------------------- -// Other valarray noninline member functions - -// Shift and cshift - -template -valarray<_Tp> valarray<_Tp>::shift(int __n) const -{ - valarray<_Tp> __tmp(this->size()); - - if (__n >= 0) { - if (__n < this->size()) - copy(this->_M_first + __n, this->_M_first + this->size(), - __tmp._M_first); - } - else { - if (-__n < this->size()) - copy(this->_M_first, this->_M_first + this->size() + __n, - __tmp._M_first - __n); - } - return __tmp; -} - -template -valarray<_Tp> valarray<_Tp>::cshift(int __m) const -{ - valarray<_Tp> __tmp(this->size()); - -#ifdef __SYMBIAN32__ - if (!this->size()) - return __tmp; -#endif - - // Reduce __m to an equivalent number in the range [0, size()). We - // have to be careful with negative numbers, since the sign of a % b - // is unspecified when a < 0. - long __n = __m; - if (this->size() < (numeric_limits::max)()) - __n %= long(this->size()); - if (__n < 0) - __n += this->size(); - - copy(this->_M_first, this->_M_first + __n, - __tmp._M_first + (this->size() - __n)); - copy(this->_M_first + __n, this->_M_first + this->size(), - __tmp._M_first); - - return __tmp; -} - -_STLP_END_NAMESPACE - -#endif /* _STLP_VALARRAY_C */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_valarray.h --- a/epoc32/include/stdapis/stlport/stl/_valarray.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1791 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_VALARRAY_H -#define _STLP_VALARRAY_H - -#ifndef _STLP_CMATH_H_HEADER -#include -#endif -#ifndef _STLP_INTERNAL_NEW_HEADER -#include -#endif -#ifndef _STLP_INTERNAL_ALGO_H -#include -#endif -#ifndef _STLP_INTERNAL_NUMERIC_H -#include -#endif -#ifndef _STLP_LIMITS_H -#include -#endif - -//To resolve the unidentified identifier __THROW_BAD_ALLOC -#include - -_STLP_BEGIN_NAMESPACE - -class slice; -class gslice; - -template class valarray; -typedef valarray _Valarray_bool; -typedef valarray _Valarray_size_t; - -template class slice_array; -template class gslice_array; -template class mask_array; -template class indirect_array; - -//---------------------------------------------------------------------- -// class valarray - -// Base class to handle memory allocation and deallocation. We can't just -// use vector<>, because vector would be unsuitable as an internal -// representation for valarray. - -template -struct _Valarray_base -{ - _Tp* _M_first; - size_t _M_size; - - _Valarray_base() : _M_first(0), _M_size(0) {} - _Valarray_base(size_t __n) : _M_first(0), _M_size(0) { _M_allocate(__n); } - ~_Valarray_base() { _M_deallocate(); } - - void _M_allocate(size_t __n) { - if (__n != 0) { -#ifdef __SYMBIAN32__ - _M_first = ::new _Tp[__n]; -#else - _M_first = __STATIC_CAST(_Tp*, (malloc(__n * sizeof(_Tp)))); -#endif - _M_size = __n; - if (_M_first == 0) { - _M_size = 0; - __THROW_BAD_ALLOC; - } - } - else { - _M_first = 0; - _M_size = 0; - } - } - - void _M_deallocate() { -#ifdef __SYMBIAN32__ - delete [] _M_first; -#else - free(_M_first); -#endif - _M_first = 0; - _M_size = 0; - } -}; - -template -class valarray : private _Valarray_base<_Tp> -{ - friend class gslice; - -public: - typedef _Tp value_type; - - // Basic constructors - valarray() : _Valarray_base<_Tp>() {} - valarray(size_t __n) : _Valarray_base<_Tp>(__n) {} - valarray(const value_type& __x, size_t __n) : _Valarray_base<_Tp>(__n) - { uninitialized_fill_n(this->_M_first, this->_M_size, __x); } - valarray(const value_type* __p, size_t __n) : _Valarray_base<_Tp>(__n) - { uninitialized_copy(__p, __p + __n, this->_M_first); } - valarray(const valarray<_Tp>& __x) : _Valarray_base<_Tp>(__x._M_size) { - uninitialized_copy(__x._M_first, __x._M_first + __x._M_size, - this->_M_first); - } - - // Constructors from auxiliary array types - valarray(const slice_array<_Tp>&); - valarray(const gslice_array<_Tp>&); - valarray(const mask_array<_Tp>&); - valarray(const indirect_array<_Tp>&); - - // Destructor - ~valarray() { _STLP_STD::_Destroy(this->_M_first, this->_M_first + this->_M_size); } - - // Extension: constructor that doesn't initialize valarray elements to a - // specific value. This is faster for types such as int and double. -private: - void _M_initialize(const __true_type&) {} - void _M_initialize(const __false_type&) - { uninitialized_fill_n(this->_M_first, this->_M_size, value_type()); } - -public: - struct _NoInit {}; - valarray(size_t __n, _NoInit) : _Valarray_base<_Tp>(__n) { - typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Is_Trivial; - _M_initialize(_Is_Trivial()); - } - -public: // Assignment - // Basic assignment. Note that 'x = y' is undefined if x.size() != y.size() - valarray<_Tp>& operator=(const valarray<_Tp>& __x) { - _STLP_ASSERT(__x.size() == this->size()) - if (this != &__x) - { -#ifdef __SYMBIAN32__ - resize(__x._M_size); -#endif - copy(__x._M_first, __x._M_first + __x._M_size, this->_M_first); - } - return *this; - } - - // Scalar assignment - valarray<_Tp>& operator=(const value_type& __x) { - fill_n(this->_M_first, this->_M_size, __x); - return *this; - } - - // Assignment of auxiliary array types - valarray<_Tp>& operator=(const slice_array<_Tp>&); - valarray<_Tp>& operator=(const gslice_array<_Tp>&); - valarray<_Tp>& operator=(const mask_array<_Tp>&); - valarray<_Tp>& operator=(const indirect_array<_Tp>&); - -public: // Element access - value_type operator[](size_t __n) const { return this->_M_first[__n]; } - value_type& operator[](size_t __n) { return this->_M_first[__n]; } - size_t size() const { return this->_M_size; } - -public: // Subsetting operations with auxiliary type - valarray<_Tp> operator[](slice) const; - slice_array<_Tp> operator[](slice); - valarray<_Tp> operator[](gslice) const; - gslice_array<_Tp> operator[](const gslice&); - valarray<_Tp> operator[](const _Valarray_bool&) const; - mask_array<_Tp> operator[](const _Valarray_bool&); - valarray<_Tp> operator[](const _Valarray_size_t&) const; - indirect_array<_Tp> operator[](const _Valarray_size_t&); - -public: // Unary operators. - valarray<_Tp> operator+() const { return *this; } - - valarray<_Tp> operator-() const { - valarray<_Tp> __tmp(this->size(), _NoInit()); - for (size_t __i = 0; __i < this->size(); ++__i) - __tmp[__i] = -(*this)[__i]; - return __tmp; - } - - valarray<_Tp> operator~() const { - valarray<_Tp> __tmp(this->size(), _NoInit()); - for (size_t __i = 0; __i < this->size(); ++__i) - __tmp[__i] = ~(*this)[__i]; - return __tmp; - } - - _Valarray_bool operator!() const; - -public: // Scalar computed assignment. - valarray<_Tp>& operator*= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] *= __x; - return *this; - } - - valarray<_Tp>& operator/= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] /= __x; - return *this; - } - - valarray<_Tp>& operator%= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] %= __x; - return *this; - } - - valarray<_Tp>& operator+= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] += __x; - return *this; - } - - valarray<_Tp>& operator-= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] -= __x; - return *this; - } - - valarray<_Tp>& operator^= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] ^= __x; - return *this; - } - - valarray<_Tp>& operator&= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] &= __x; - return *this; - } - - valarray<_Tp>& operator|= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] |= __x; - return *this; - } - - valarray<_Tp>& operator<<= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] <<= __x; - return *this; - } - - valarray<_Tp>& operator>>= (const value_type& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] >>= __x; - return *this; - } - -public: // Array computed assignment. - valarray<_Tp>& operator*= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] *= __x[__i]; - return *this; - } - - valarray<_Tp>& operator/= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] /= __x[__i]; - return *this; - } - - valarray<_Tp>& operator%= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] %= __x[__i]; - return *this; - } - - valarray<_Tp>& operator+= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] += __x[__i]; - return *this; - } - - valarray<_Tp>& operator-= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] -= __x[__i]; - return *this; - } - - valarray<_Tp>& operator^= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] ^= __x[__i]; - return *this; - } - - valarray<_Tp>& operator&= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] &= __x[__i]; - return *this; - } - - valarray<_Tp>& operator|= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] |= __x[__i]; - return *this; - } - - valarray<_Tp>& operator<<= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] <<= __x[__i]; - return *this; - } - - valarray<_Tp>& operator>>= (const valarray<_Tp>& __x) { - for (size_t __i = 0; __i < this->size(); ++__i) - (*this)[__i] >>= __x[__i]; - return *this; - } - -public: // Other member functions. - - // The result is undefined for zero-length arrays - value_type sum() const { - return accumulate(this->_M_first + 1, this->_M_first + this->_M_size, - (*this)[0]); - } - - // The result is undefined for zero-length arrays - value_type (min) () const { - return *min_element(this->_M_first + 0, this->_M_first + this->_M_size); - } - - value_type (max) () const { - return *max_element(this->_M_first + 0, this->_M_first + this->_M_size); - } - - valarray<_Tp> shift(int __n) const; - valarray<_Tp> cshift(int __n) const; - - valarray<_Tp> apply(value_type __f(value_type)) const { - valarray<_Tp> __tmp(this->size()); - transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first, - __f); - return __tmp; - } - valarray<_Tp> apply(value_type __f(const value_type&)) const { - valarray<_Tp> __tmp(this->size()); - transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first, - __f); - return __tmp; - } - - void resize(size_t __n, value_type __x = value_type()) { - _STLP_STD::_Destroy(this->_M_first, this->_M_first + this->_M_size); - this->_Valarray_base<_Tp>::_M_deallocate(); - this->_Valarray_base<_Tp>::_M_allocate(__n); - uninitialized_fill_n(this->_M_first, this->_M_size, __x); - } -}; - -//---------------------------------------------------------------------- -// valarray non-member functions. - -// Binary arithmetic operations between two arrays. Behavior is -// undefined if the two arrays do not have the same length. - -template -inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] * __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] / __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] % __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] + __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] - __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] ^ __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] & __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] | __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] << __y[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] >> __y[__i]; - return __tmp; -} - -// Binary arithmetic operations between an array and a scalar. - -template -inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] * __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator*(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c * __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] / __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator/(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c / __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] % __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator%(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c % __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] + __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator+(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c + __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] - __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator-(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c - __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] ^ __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator^(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c ^ __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] & __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator&(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c & __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] | __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator|(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c | __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] << __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator<<(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c << __x[__i]; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] >> __c; - return __tmp; -} - -template -inline valarray<_Tp> _STLP_CALL operator>>(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c >> __x[__i]; - return __tmp; -} - -// Binary logical operations between two arrays. Behavior is undefined -// if the two arrays have different lengths. Note that operator== does -// not do what you might at first expect. - -template -inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] == __y[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] < __y[__i]; - return __tmp; -} - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE - -template -inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] != __y[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] > __y[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] <= __y[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] >= __y[__i]; - return __tmp; -} - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ -// fbp : swap ? - -template -inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] && __y[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] || __y[__i]; - return __tmp; -} - -// Logical operations between an array and a scalar. - -template -inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] == __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator==(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c == __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] != __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator!=(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c != __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] < __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator<(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c < __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] > __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator>(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c > __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] <= __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator<=(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c <= __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] >= __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator>=(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c >= __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] && __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator&&(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c && __x[__i]; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x, const _Tp& __c) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __x[__i] || __c; - return __tmp; -} - -template -inline _Valarray_bool _STLP_CALL operator||(const _Tp& __c, const valarray<_Tp>& __x) -{ - _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = __c || __x[__i]; - return __tmp; -} - -// valarray "transcendentals" (the list includes abs and sqrt, which, -// of course, are not transcendental). - -template -inline valarray<_Tp> abs(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ABS(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> acos(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ACOS(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> asin(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ASIN(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> atan(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ATAN(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> atan2(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__x[__i], __y[__i]); - return __tmp; -} - -template -inline valarray<_Tp> atan2(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__x[__i], __c); - return __tmp; -} - -template -inline valarray<_Tp> atan2(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__c, __x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> cos(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_COS(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> cosh(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_COSH(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> exp(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_EXP(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> log(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_LOG(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> log10(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_LOG10(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> pow(const valarray<_Tp>& __x, - const valarray<_Tp>& __y) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_POW(_Tp)(__x[__i], __y[__i]); - return __tmp; -} - -template -inline valarray<_Tp> pow(const valarray<_Tp>& __x, const _Tp& __c) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_POW(_Tp)(__x[__i], __c); - return __tmp; -} - -template -inline valarray<_Tp> pow(const _Tp& __c, const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_POW(_Tp)(__c, __x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> sin(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_SIN(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> sinh(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_SINH(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> sqrt(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_SQRT(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> tan(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_TAN(_Tp)(__x[__i]); - return __tmp; -} - -template -inline valarray<_Tp> tanh(const valarray<_Tp>& __x) { - typedef typename valarray<_Tp>::_NoInit _NoInit; - valarray<_Tp> __tmp(__x.size(), _NoInit()); - for (size_t __i = 0; __i < __x.size(); ++__i) - __tmp[__i] = _STLP_DO_TANH(_Tp)(__x[__i]); - return __tmp; -} - -//---------------------------------------------------------------------- -// slice and slice_array - -class slice { -public: - slice() : _M_start(0), _M_length(0), _M_stride(0) {} - slice(size_t __start, size_t __length, size_t __stride) - : _M_start(__start), _M_length(__length), _M_stride(__stride) - {} - __TRIVIAL_DESTRUCTOR(slice) - - size_t start() const { return _M_start; } - size_t size() const { return _M_length; } - size_t stride() const { return _M_stride; } - - -private: - size_t _M_start; - size_t _M_length; - size_t _M_stride; -}; - -template -class slice_array { - friend class valarray<_Tp>; -public: - typedef _Tp value_type; - - void operator=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] = __x[__i]; -#else - _M_array[__index] = __x[__i]; -#endif - } - - void operator*=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] *= __x[__i]; -#else - _M_array[__index] *= __x[__i]; -#endif - } - - void operator/=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] /= __x[__i]; -#else - _M_array[__index] /= __x[__i]; -#endif - } - - void operator%=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] %= __x[__i]; -#else - _M_array[__index] %= __x[__i]; -#endif - } - - void operator+=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] += __x[__i]; -#else - _M_array[__index] += __x[__i]; -#endif - } - - void operator-=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] -= __x[__i]; -#else - _M_array[__index] -= __x[__i]; -#endif - } - - void operator^=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] ^= __x[__i]; -#else - _M_array[__index] ^= __x[__i]; -#endif - } - - void operator&=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] &= __x[__i]; -#else - _M_array[__index] &= __x[__i]; -#endif - } - - void operator|=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] |= __x[__i]; -#else - _M_array[__index] |= __x[__i]; -#endif - } - - void operator<<=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] <<= __x[__i]; -#else - _M_array[__index] <<= __x[__i]; -#endif - } - - void operator>>=(const valarray& __x) const { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] >>= __x[__i]; -#else - _M_array[__index] >>= __x[__i]; -#endif - } - - void operator=(const value_type& __c) { - size_t __index = _M_slice.start(); - for (size_t __i = 0; - __i < _M_slice.size(); - ++__i, __index += _M_slice.stride()) -#ifdef __SYMBIAN32__ - (*_M_array)[__index] = __c; -#else - _M_array[__index] = __c; -#endif - } - - slice_array<_Tp>& - operator=(const slice_array<_Tp>& __a) - { - size_t __index = _M_slice.start(); - for (size_t __i = __a._M_slice.start(); - __i < _M_slice.size(); - __i += __a._M_slice.stride(), __index += _M_slice.stride()) - _M_array[__index] = __a._M_array[__index][__i]; - return *this; - } - - slice_array(const slice_array<_Tp>& a) - : _M_slice(a._M_slice), _M_array(a._M_array){} - - ~slice_array() {} - -private: - slice_array(const slice& __slice, valarray<_Tp>* __array) - : _M_slice(__slice), _M_array(__array) - {} - - slice _M_slice; - valarray<_Tp>* _M_array; - -private: // Disable assignment and default constructor - slice_array(); -}; - -// valarray member functions dealing with slice and slice_array - -template -inline valarray<_Tp>::valarray(const slice_array<_Tp>& __x) - : _Valarray_base<_Tp>(__x._M_slice.size()) -{ - typedef typename __type_traits<_Tp>::has_trivial_default_constructor - _Is_Trivial; - _M_initialize(_Is_Trivial()); - *this = __x; -} - - -template -inline slice_array<_Tp> valarray<_Tp>::operator[](slice __slice) { - return slice_array<_Tp>(__slice, this); -} - -//---------------------------------------------------------------------- -// gslice and gslice_array - -template -struct _Gslice_Iter_tmpl; - -class gslice { - friend struct _Gslice_Iter_tmpl; -public: - gslice() : _M_start(0), _M_lengths(0), _M_strides(0) {} - gslice(size_t __start, - const _Valarray_size_t& __lengths, const _Valarray_size_t& __strides) - : _M_start(__start), _M_lengths(__lengths), _M_strides(__strides) - {} - __TRIVIAL_DESTRUCTOR(gslice) - - size_t start() const { return _M_start; } - _Valarray_size_t size() const { return _M_lengths; } - _Valarray_size_t stride() const { return _M_strides; } - - // Extension: check for an empty gslice. - bool _M_empty() const { return _M_lengths.size() == 0; } - - // Extension: number of indices this gslice represents. (For a degenerate - // gslice, they're not necessarily all distinct.) - size_t _M_size() const { - return !this->_M_empty() - ? accumulate(_M_lengths._M_first + 1, - _M_lengths._M_first + _M_lengths._M_size, - _M_lengths[0], - multiplies()) - : 0; - } - -# ifndef __HP_aCC -private: -# endif - - size_t _M_start; - _Valarray_size_t _M_lengths; - _Valarray_size_t _M_strides; -}; - -// This is not an STL iterator. It is constructed from a gslice, and it -// steps through the gslice indices in sequence. See 23.3.6 of the C++ -// standard, paragraphs 2-3, for an explanation of the sequence. At -// each step we get two things: the ordinal (i.e. number of steps taken), -// and the one-dimensional index. - -template -struct _Gslice_Iter_tmpl { - _Gslice_Iter_tmpl(const gslice& __gslice) - : _M_step(0), _M_1d_idx(__gslice.start()), - _M_indices(size_t(0), __gslice._M_lengths.size()), - _M_gslice(__gslice) - {} - - bool _M_done() const { return _M_indices[0] == _M_gslice._M_lengths[0]; } - - bool _M_incr(); - - _Size _M_step; - _Size _M_1d_idx; - - valarray<_Size> _M_indices; - const gslice& _M_gslice; -}; - -typedef _Gslice_Iter_tmpl _Gslice_Iter; - -template -class gslice_array { - friend class valarray<_Tp>; -public: - typedef _Tp value_type; - - void operator= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] = __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator*= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] *= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator/= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] /= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator%= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] %= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator+= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] += __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator-= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] -= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator^= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] ^= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator&= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] &= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator|= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] |= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator<<= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] <<= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator>>= (const valarray& __x) const { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] >>= __x[__i._M_step]; while(__i._M_incr()); - } - } - - void operator= (const value_type& __c) { - if (!_M_gslice._M_empty()) { - _Gslice_Iter __i(_M_gslice); - do _M_array[__i._M_1d_idx] = __c; while(__i._M_incr()); - } - } - - ~gslice_array() {} - -private: - gslice_array(gslice __gslice, valarray<_Tp>& __array) - : _M_gslice(__gslice), _M_array(__array) - {} - - gslice _M_gslice; - valarray& _M_array; - -private: // Disable assignment - void operator=(const gslice_array<_Tp>&); -}; - -// valarray member functions dealing with gslice and gslice_array. Note -// that it is illegal (behavior is undefined) to construct a gslice_array -// from a degenerate gslice. - -template -inline valarray<_Tp>::valarray(const gslice_array<_Tp>& __x) - : _Valarray_base<_Tp>(__x._M_gslice._M_size()) -{ - typedef typename __type_traits<_Tp>::has_trivial_default_constructor - _Is_Trivial; - _M_initialize(_Is_Trivial()); - *this = __x; -} - -template -inline gslice_array<_Tp> valarray<_Tp>::operator[](const gslice& __slice) { - return gslice_array<_Tp>(__slice, *this); -} - - -//---------------------------------------------------------------------- -// mask_array - -template -class mask_array { - friend class valarray<_Tp>; -public: - typedef _Tp value_type; - - void operator=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] = __x[__idx++]; - } - - void operator*=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] *= __x[__idx++]; - } - - void operator/=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif //__SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] /= __x[__idx++]; - } - - void operator%=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif - if (_M_mask[__i]) _M_array[__i] %= __x[__idx++]; - } - - void operator+=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif - if (_M_mask[__i]) _M_array[__i] += __x[__idx++]; - } - - void operator-=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif //__SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] -= __x[__idx++]; - } - - void operator^=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] ^= __x[__idx++]; - } - - void operator&=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] &= __x[__idx++]; - } - - void operator|=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] |= __x[__idx++]; - } - - void operator<<=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] <<= __x[__idx++]; - } - - void operator>>=(const valarray& __x) const { - size_t __idx = 0; -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] >>= __x[__idx++]; - } - - void operator=(const value_type& __c) const { -#ifdef __SYMBIAN32__ - for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) -#else - for (size_t __i = 0; __i < _M_array.size(); ++__i) -#endif // __SYMBIAN32__ - if (_M_mask[__i]) _M_array[__i] = __c; - } - - ~mask_array() {} - - // Extension: number of true values in the mask - size_t _M_num_true() const { - size_t __result = 0; - for (size_t __i = 0; __i < _M_mask.size(); ++__i) - if (_M_mask[__i]) ++__result; - return __result; - } - -private: - mask_array(const _Valarray_bool& __mask, valarray<_Tp>& __array) - : _M_mask(__mask), _M_array(__array) - {} - - _Valarray_bool _M_mask; - valarray<_Tp>& _M_array; - -private: // Disable assignment - void operator=(const mask_array<_Tp>&); -}; - -// valarray member functions dealing with mask_array - -template -inline valarray<_Tp>::valarray(const mask_array<_Tp>& __x) - : _Valarray_base<_Tp>(__x._M_num_true()) -{ - typedef typename __type_traits<_Tp>::has_trivial_default_constructor - _Is_Trivial; - _M_initialize(_Is_Trivial()); - *this = __x; -} - -// Behavior is undefined if __x._M_num_true() != this->size() -template -inline valarray<_Tp>& valarray<_Tp>::operator=(const mask_array<_Tp>& __x) { - size_t __idx = 0; - for (size_t __i = 0; __i < __x._M_array.size(); ++__i) - if (__x._M_mask[__i]) - { -#ifdef __SYMBIAN32__ - if(__idx < this->_M_size) - (*this)[__idx++] = __x._M_array[__i]; - else - break; -#else - (*this)[__idx++] = __x._M_array[__i]; -#endif - } - return *this; -} - -template -inline mask_array<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) -{ - return mask_array<_Tp>(__mask, *this); -} - - -//---------------------------------------------------------------------- -// indirect_array - -template -class indirect_array { - friend class valarray<_Tp>; -public: - typedef _Tp value_type; - - void operator=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] = __x[__i]; - } - - void operator*=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] *= __x[__i]; - } - - void operator/=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] /= __x[__i]; - } - - void operator%=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] %= __x[__i]; - } - - void operator+=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] += __x[__i]; - } - - void operator-=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] -= __x[__i]; - } - - void operator^=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] ^= __x[__i]; - } - - void operator&=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] &= __x[__i]; - } - - void operator|=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] |= __x[__i]; - } - - void operator<<=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] <<= __x[__i]; - } - - void operator>>=(const valarray& __x) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] >>= __x[__i]; - } - - void operator=(const value_type& __c) const { - for (size_t __i = 0; __i < _M_addr.size(); ++__i) - _M_array[_M_addr[__i]] = __c; - } - - ~indirect_array() {} - -private: - indirect_array(const _Valarray_size_t& __addr, valarray<_Tp>& __array) - : _M_addr(__addr), _M_array(__array) - {} - - _Valarray_size_t _M_addr; - valarray<_Tp>& _M_array; - -private: // Disable assignment - void operator=(const indirect_array<_Tp>&); -}; - -// valarray member functions dealing with indirect_array - -template -inline valarray<_Tp>::valarray(const indirect_array<_Tp>& __x) - : _Valarray_base<_Tp>(__x._M_addr.size()) -{ - typedef typename __type_traits<_Tp>::has_trivial_default_constructor - _Is_Trivial; - _M_initialize(_Is_Trivial()); - *this = __x; -} - - -template -inline indirect_array<_Tp> -valarray<_Tp>::operator[](const _Valarray_size_t& __addr) -{ - return indirect_array<_Tp>(__addr, *this); -} - -_STLP_END_NAMESPACE - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* _STLP_VALARRAY */ - - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/_vector.c --- a/epoc32/include/stdapis/stlport/stl/_vector.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,137 +0,0 @@ -/* - * - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_VECTOR_C -#define _STLP_VECTOR_C - -# if !defined (_STLP_INTERNAL_VECTOR_H) -# include -# endif - -# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) -# define iterator _Tp* -# define size_type size_t -# endif - -# undef vector -# define vector __WORKAROUND_DBG_RENAME(vector) - -_STLP_BEGIN_NAMESPACE - -template -void -__vector__<_Tp, _Alloc>::reserve(size_type __n) { - if (capacity() < __n) { - const size_type __old_size = size(); - pointer __tmp; - if (this->_M_start) { - __tmp = _M_allocate_and_copy(__n, this->_M_start, this->_M_finish); - _M_clear(); - } else { - __tmp = this->_M_end_of_storage.allocate(__n); - } - _M_set(__tmp, __tmp + __old_size, __tmp + __n); - } -} - -template -void -__vector__<_Tp, _Alloc>::_M_fill_insert( - iterator __position, - size_type __n, const _Tp& __x) { - if (__n != 0) { - if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n) { - _Tp __x_copy = __x; - const size_type __elems_after = this->_M_finish - __position; - pointer __old_finish = this->_M_finish; - if (__elems_after > __n) { - __uninitialized_copy(this->_M_finish - __n, this->_M_finish, this->_M_finish, _IsPODType()); - this->_M_finish += __n; - __copy_backward_ptrs(__position, __old_finish - __n, __old_finish, _TrivialAss()); - _STLP_STD::fill(__position, __position + __n, __x_copy); - } - else { - uninitialized_fill_n(this->_M_finish, __n - __elems_after, __x_copy); - this->_M_finish += __n - __elems_after; - __uninitialized_copy(__position, __old_finish, this->_M_finish, _IsPODType()); - this->_M_finish += __elems_after; - _STLP_STD::fill(__position, __old_finish, __x_copy); - } - } - else - _M_insert_overflow(__position, __x, _IsPODType(), __n); - } -} - -template -__vector__<_Tp,_Alloc>& -__vector__<_Tp,_Alloc>::operator=(const __vector__<_Tp, _Alloc>& __x) -{ - if (&__x != this) { - const size_type __xlen = __x.size(); - if (__xlen > capacity()) { - pointer __tmp = _M_allocate_and_copy(__xlen, (const_pointer)__x._M_start+0, (const_pointer)__x._M_finish+0); - _M_clear(); - this->_M_start = __tmp; - this->_M_end_of_storage._M_data = this->_M_start + __xlen; - } - else if (size() >= __xlen) { - pointer __i = __copy_ptrs((const_pointer)__x._M_start+0, (const_pointer)__x._M_finish+0, (pointer)this->_M_start, _TrivialAss()); - _STLP_STD::_Destroy(__i, this->_M_finish); - } - else { - __copy_ptrs((const_pointer)__x._M_start, (const_pointer)__x._M_start + size(), (pointer)this->_M_start, _TrivialAss()); - __uninitialized_copy((const_pointer)__x._M_start + size(), (const_pointer)__x._M_finish+0, this->_M_finish, _IsPODType()); - } - this->_M_finish = this->_M_start + __xlen; - } - return *this; -} - -template -void __vector__<_Tp, _Alloc>::_M_fill_assign(size_t __n, const _Tp& __val) { - if (__n > capacity()) { - __vector__<_Tp, _Alloc> __tmp(__n, __val, get_allocator()); - __tmp.swap(*this); - } - else if (__n > size()) { - fill(begin(), end(), __val); - this->_M_finish = _STLP_STD::uninitialized_fill_n(this->_M_finish, __n - size(), __val); - } - else - erase(_STLP_STD::fill_n(begin(), __n, __val), end()); -} - -_STLP_END_NAMESPACE - -# undef size_type -# undef iterator -# undef vector - -#endif /* _STLP_VECTOR_C */ - - // Local Variables: - // mode:C++ - // End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/c_locale.h --- a/epoc32/include/stdapis/stlport/stl/c_locale.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,459 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - -#ifndef _STLP_C_LOCALE_H -# define _STLP_C_LOCALE_H - -/* - * Implementation dependent definitions - */ -#ifdef __cplusplus -# include -#endif - -#if defined(__sgi) -# if defined(ROOT_65) /* IRIX 6.5.x */ -# include -# include -# include -# include - -# else - /* IRIX pre-6.5 */ -# include -# include - -# if !defined(_SIZE_T) && !defined(_SIZE_T_) -# define _SIZE_T -# if (_MIPS_SZLONG == 32) -typedef unsigned int size_t; -# endif -# if (_MIPS_SZLONG == 64) -typedef unsigned long size_t; -# endif -# endif - -# ifndef _WCHAR_T -# define _WCHAR_T -# if (_MIPS_SZLONG == 32) -typedef long wchar_t; -# endif -# if (_MIPS_SZLONG == 64) -typedef __int32_t wchar_t; -# endif -# endif /* _WCHAR_T */ - -# ifndef _WINT_T -# define _WINT_T -# if (_MIPS_SZLONG == 32) - typedef long wint_t; -# endif -# if (_MIPS_SZLONG == 64) - typedef __int32_t wint_t; -# endif -# endif /* _WINT_T */ - -# ifndef _MBSTATE_T -# define _MBSTATE_T -# ifdef _MSC_VER - typedef int mbstate_t; -# else - typedef char mbstate_t; -# endif -# endif /* _MBSTATE_T */ - -# endif /* ROOT65 */ - -# else /* __sgi */ - -# ifdef __cplusplus -# ifndef _STLP_CSTDDEF -# include -# endif -# ifndef _STLP_CWCHAR_H -# include -# endif -# ifndef _STLP_CCTYPE -# include -# endif -# else -# include -# include -# include -# endif - -#endif /* __sgi */ - -/* - * GENERAL FRAMEWORK - */ - -struct _Locale_ctype; -struct _Locale_numeric; -struct _Locale_time; -struct _Locale_collate; -struct _Locale_monetary; -struct _Locale_messages; - -/* - Bitmask macros. -*/ - -/* - * For narrow characters, we expose the lookup table interface. - */ - -/* Internal bitmask macros, os-specific. */ - -#if defined(__sgi) /* IRIX */ - -#define _Locale_S 0x00000008 /* Spacing character */ -#define _Locale_A 0x00004000 /* Alphabetical characters only */ -#define _Locale_B 0x00000040 /* Obsolete: was space char only */ -#define _Locale_PR 0x00008000 /* Printable characters only */ -#define _Locale_G 0x40000000 /* Graphic characters only */ -#define _Locale_BL 0x80000000 /* The blank character class */ - -/* Public bitmask macros, must be defined for every OS. These values, of - * course, are specific to IRIX. */ - -#define _Locale_CNTRL 0x00000020 /* Control character */ -#define _Locale_UPPER 0x00000001 /* Upper case */ -#define _Locale_LOWER 0x00000002 /* Lower case */ -#define _Locale_DIGIT 0x00000004 /* Numeral (digit) */ -#define _Locale_XDIGIT 0x00000080 /* heXadecimal digit */ -#define _Locale_PUNCT 0x00000010 /* Punctuation */ -#define _Locale_SPACE (_Locale_S | _Locale_BL) -#define _Locale_PRINT (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \ - _Locale_DIGIT | _Locale_A | _Locale_XDIGIT | \ - _Locale_PR) -#define _Locale_ALPHA _Locale_A - -/* -* All of these except for graph and blank are from the C standard; -* graph and blank are XPG4. (graph in XPG4 doesn't mean quite the -* same thing as graph in the C++ library) -*/ - -#endif /* IRIX */ - - -#if defined( __Lynx__ ) - /* azov: On Lynx isalpha defined as (_U | _L), which gives us a mask - * unusable in ctype_table. So we have to redefine it and use hard-coded - * numbers (to avoid potential clashes if system headers change). - * - * P.S. Actually, I see no reason in using platform-specific masks - - * having just one set of masks for all platforms should work just as - * well - we only use them internally and they don't have to be equal - * to whatever defined in local ctype.h - * - */ -# define _Locale_CNTRL 040 /* _C, Control character */ -# define _Locale_UPPER 01 /* _U, Upper case */ -# define _Locale_LOWER 02 /* _L, Lower case */ -# define _Locale_DIGIT 04 /* _N, Numeral (digit) */ -# define _Locale_XDIGIT 0200 /* _X, heXadecimal digit */ -# define _Locale_PUNCT 020 /* _P, Punctuation */ -# define _Locale_SPACE 010 /* _S, Spacing */ -# define _Locale_ALPHA 040000 /* none, Alphanumerical */ -# define _Locale_PRINT (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \ - _Locale_DIGIT | _Locale_ALPHA | _Locale_XDIGIT |\ - _Locale_SPACE ) /* Printable */ -# endif /* __Lynx__ */ - -#if defined(__GNUC__) || defined (__BORLANDC__) || defined (__COMO__) - -# if defined (__CYGWIN__) - -# define _Locale_CNTRL 040 -# define _Locale_UPPER 02 -# define _Locale_LOWER 01 -# define _Locale_DIGIT 04 -# define _Locale_XDIGIT ( 0100 | _Locale_DIGIT ) -# define _Locale_PUNCT 020 -# define _Locale_SPACE 010 -# define _Locale_ALPHA (_Locale_UPPER | _Locale_LOWER) -# define _Locale_PRINT (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0200 ) - -# elif defined (__FreeBSD__) - -# define _Locale_CNTRL _CTYPE_C -# define _Locale_UPPER _CTYPE_U -# define _Locale_LOWER _CTYPE_L -# define _Locale_DIGIT _CTYPE_D -# define _Locale_XDIGIT _CTYPE_X -# define _Locale_PUNCT _CTYPE_P -# define _Locale_SPACE _CTYPE_S -# define _Locale_PRINT _CTYPE_R -# define _Locale_ALPHA _CTYPE_A - -# elif defined (__NetBSD__) || defined (__amigaos__) - -# define _Locale_CNTRL _C -# define _Locale_UPPER _U -# define _Locale_LOWER _L -# define _Locale_DIGIT _N -# define _Locale_XDIGIT (_N|_X) -# define _Locale_PUNCT _P -# define _Locale_SPACE _S -# define _Locale_PRINT (_P|_U|_L|_N|_B) -# define _Locale_ALPHA (_U|_L) -# elif defined(__EMX__) /* OS/2 with emx runtime */ -# define _Locale_CNTRL _CNTRL -# define _Locale_UPPER _UPPER -# define _Locale_LOWER _LOWER -# define _Locale_DIGIT _DIGIT -# define _Locale_XDIGIT _XDIGIT -# define _Locale_PUNCT _PUNCT -# define _Locale_SPACE _SPACE -# define _Locale_PRINT _PRINT -# define _Locale_ALPHA (_UPPER|_LOWER) - -# elif defined(_STLP_USE_GLIBC) /* linux, using the gnu compiler */ - -/* This section uses macros defined in the gnu libc ctype.h header */ - -# define _Locale_CNTRL _IScntrl -# define _Locale_UPPER _ISupper -# define _Locale_LOWER _ISlower -# define _Locale_DIGIT _ISdigit -# define _Locale_XDIGIT _ISxdigit -# define _Locale_PUNCT _ISpunct -# define _Locale_SPACE _ISspace -# define _Locale_PRINT _ISprint -# define _Locale_ALPHA _ISalpha - -# endif /* GLIBC */ - -#endif /* gnu */ - -#if ( defined(__sun) && defined (__SVR4) ) \ - || (defined (__digital__) && defined (__unix__)) \ - || defined(_AIX) -/* fbp : condition from AT&T code*/ -#if !(defined(__XPG4_CHAR_CLASS__) || defined(_XPG4_2) || \ - (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4))) && ! defined (_ISCNTRL) - /* fbp : on 2.5.1, the defines are different ;( */ - // # if ( defined (__sun) && defined (__SVR4) && ! defined (_ISCNTRL) ) -# define _ISCNTRL _C -# define _ISUPPER _U -# define _ISLOWER _L -# define _ISDIGIT _N -# define _ISXDIGIT _X -# define _ISPUNCT _P -# define _ISSPACE _S -# define _ISPRINT (_P | _U | _L | _N | _B) -# define _ISALPHA (_U | _L) -# endif - -# define _Locale_CNTRL _ISCNTRL -# define _Locale_UPPER _ISUPPER -# define _Locale_LOWER _ISLOWER -# define _Locale_DIGIT _ISDIGIT -# define _Locale_XDIGIT _ISXDIGIT -# define _Locale_PUNCT _ISPUNCT -# define _Locale_SPACE _ISSPACE -# define _Locale_PRINT _ISPRINT -# define _Locale_ALPHA _ISALPHA -# elif defined(__SYMBIAN32__) -# define _Locale_CNTRL _CTYPE_C -# define _Locale_UPPER _CTYPE_U -# define _Locale_LOWER _CTYPE_L -# define _Locale_DIGIT _CTYPE_D -# define _Locale_XDIGIT _CTYPE_X -# define _Locale_PUNCT _CTYPE_P -# define _Locale_SPACE _CTYPE_S -# define _Locale_PRINT _CTYPE_R -# define _Locale_ALPHA _CTYPE_A - -#elif defined (__MWERKS__) -# define _Locale_CNTRL __control_char -# define _Locale_UPPER __upper_case -# define _Locale_LOWER __lower_case -# define _Locale_DIGIT __digit -# define _Locale_XDIGIT __hex_digit -# define _Locale_PUNCT __punctuation -# define _Locale_SPACE __space_char -# define _Locale_PRINT __printable -# define _Locale_ALPHA __alphanumeric -#elif defined (__BORLANDC__) -# define _Locale_CNTRL _IS_CTL -# define _Locale_UPPER _IS_UPP -# define _Locale_LOWER _IS_LOW -# define _Locale_DIGIT _IS_DIG -# define _Locale_XDIGIT _IS_HEX -# define _Locale_PUNCT _IS_PUN -# define _Locale_SPACE _IS_SP -# define _Locale_PRINT (_IS_SP|_IS_PUN|_IS_UPP|_IS_LOW|_IS_DIG) -# define _Locale_ALPHA _IS_ALPHA -#elif defined (_MSC_VER) || defined (__MINGW32__) -# define _Locale_CNTRL _CONTROL -# define _Locale_UPPER _UPPER -# define _Locale_LOWER _LOWER -# define _Locale_DIGIT _DIGIT -# define _Locale_XDIGIT _HEX -# define _Locale_PUNCT _PUNCT -# define _Locale_SPACE _SPACE -# define _Locale_PRINT (_ALPHA | _DIGIT | _BLANK | _PUNCT) -// is this one has to be so complex ? -# define _Locale_ALPHA ( _ALPHA & ~ (_UPPER | _LOWER )) -#elif defined (__DMC__) -# define _Locale_CNTRL _CONTROL -# define _Locale_UPPER _UPPER -# define _Locale_LOWER _LOWER -# define _Locale_DIGIT _DIGIT -# define _Locale_XDIGIT _HEX -# define _Locale_PUNCT _PUNCT -# define _Locale_SPACE _SPACE -# define _Locale_PRINT (_UPPER | _LOWER | _DIGIT | _PUNCT | _SPACE) -# define _Locale_ALPHA _ALPHA -#elif defined(__MRC__) || defined(__SC__) //*TY 02/24/2000 - added support for MPW -# define _Locale_CNTRL _CTL -# define _Locale_UPPER _UPP -# define _Locale_LOWER _LOW -# define _Locale_DIGIT _DIG -# define _Locale_XDIGIT _HEX -# define _Locale_PUNCT _PUN -# define _Locale_SPACE _BLA -# define _Locale_PRINT (_UPP | _LOW | _DIG | _PUN | _BLA) -# define _Locale_ALPHA (_UPP | _LOW) -#elif defined(__MLCCPP__) -# define _Locale_CNTRL 1 -# define _Locale_UPPER 2 -# define _Locale_LOWER 4 -# define _Locale_DIGIT 8 -# define _Locale_XDIGIT 16 -# define _Locale_PUNCT 32 -# define _Locale_SPACE 64 -# define _Locale_PRINT 128 -# define _Locale_ALPHA 256 - -# elif defined (__GNUC__) && defined (__APPLE__) - -# define _Locale_CNTRL _C -# define _Locale_UPPER _U -# define _Locale_LOWER _L -# define _Locale_DIGIT _D -# define _Locale_XDIGIT _X -# define _Locale_PUNCT _P -# define _Locale_SPACE _S -# define _Locale_PRINT _R -# define _Locale_ALPHA _A - -# elif defined (__hpux) || defined (__osf__) - -# if defined(__HP_aCC) && !defined(_INCLUDE_HPUX_SOURCE) -# define _ISALPHA 0x001 -# define _ISALNUM 0x002 -# define _ISBLANK 0x004 -# define _ISCNTRL 0x008 -# define _ISDIGIT 0x010 -# define _ISGRAPH 0x020 -# define _ISLOWER 0x040 -# define _ISPRINT 0x080 -# define _ISPUNCT 0x100 -# define _ISSPACE 0x200 -# define _ISUPPER 0x400 -# define _ISXDIGIT 0x800 -# endif -# define _Locale_CNTRL _ISCNTRL -# define _Locale_UPPER _ISUPPER -# define _Locale_LOWER _ISLOWER -# define _Locale_DIGIT _ISDIGIT -# define _Locale_XDIGIT _ISXDIGIT -# define _Locale_PUNCT _ISPUNCT -# define _Locale_SPACE _ISSPACE -# define _Locale_PRINT _ISPRINT -# define _Locale_ALPHA _ISALPHA -# elif defined (__MVS__) || defined(__OS400__) -# define _Locale_CNTRL __ISCNTRL -# define _Locale_UPPER __ISUPPER -# define _Locale_LOWER __ISLOWER -# define _Locale_DIGIT __ISDIGIT -# define _Locale_XDIGIT __ISXDIGIT -# define _Locale_PUNCT __ISPUNCT -# define _Locale_SPACE __ISSPACE -# define _Locale_PRINT __ISPRINT -# define _Locale_ALPHA __ISALPHA -# elif defined (__QNXNTO__) || defined (__WATCOMC__) -# define _Locale_CNTRL _CNTRL -# define _Locale_UPPER _UPPER -# define _Locale_LOWER _LOWER -# define _Locale_DIGIT _DIGIT -# define _Locale_XDIGIT _XDIGT -# define _Locale_PUNCT _PUNCT -# define _Locale_SPACE _SPACE -# define _Locale_PRINT _PRINT -# define _Locale_ALPHA (_UPPER | _LOWER) -#elif defined (__DJGPP) -# define _Locale_CNTRL __dj_ISCNTRL -# define _Locale_UPPER __dj_ISUPPER -# define _Locale_LOWER __dj_ISLOWER -# define _Locale_DIGIT __dj_ISDIGIT -# define _Locale_XDIGIT __dj_ISXDIGIT -# define _Locale_PUNCT __dj_ISPUNCT -# define _Locale_SPACE __dj_ISSPACE -# define _Locale_PRINT __dj_ISPRINT -# define _Locale_ALPHA __dj_ISALPHA -#elif defined (_STLP_SCO_OPENSERVER) -# define _Locale_CNTRL _C -# define _Locale_UPPER _U -# define _Locale_LOWER _L -# define _Locale_DIGIT _N -# define _Locale_XDIGIT _X -# define _Locale_PUNCT _P -# define _Locale_SPACE _S -# define _Locale_PRINT _R -# define _Locale_ALPHA _A -#elif defined (__NCR_SVR) -# define _Locale_CNTRL _C -# define _Locale_UPPER _U -# define _Locale_LOWER _L -# define _Locale_DIGIT _N -# define _Locale_XDIGIT _X -# define _Locale_PUNCT _P -# define _Locale_SPACE _S -# define _Locale_PRINT (_P | _U | _L | _N | _B) -# define _Locale_ALPHA (_U | _L) -#elif defined (_CRAY) -# define _Locale_CNTRL _CNTRL -# define _Locale_UPPER _UPPER -# define _Locale_LOWER _LOWER -# define _Locale_DIGIT _DIGIT -# define _Locale_XDIGIT _XDIGIT -# define _Locale_PUNCT _PUNCT -# define _Locale_SPACE _SPACE -# define _Locale_PRINT _PRINT -# define _Locale_ALPHA _ALPHA -#elif defined (_STLP_VXWORKS_TORNADO) -#define _Locale_UPPER _C_UPPER /* 0x01 */ -#define _Locale_LOWER _C_LOWER /* 0x02 */ -#define _Locale_DIGIT _C_NUMBER /* 0x04 */ -#define _Locale_SPACE _C_WHITE_SPACE /* 0x08 */ -#define _Locale_PUNCT _C_PUNCT /* 0x10 */ -#define _Locale_CNTRL _C_CONTROL /* 0x20 */ -#define _Locale_XDIGIT _C_HEX_NUMBER /* 0x40 */ -#define _Locale_PRINT (_C_B | _C_UPPER | _C_LOWER | _C_NUMBER | _C_PUNCT) -#define _Locale_ALPHA (_C_UPPER | _C_LOWER) -#endif - -# endif /* _STLP_C_LOCALE_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/char_traits.h --- a/epoc32/include/stdapis/stlport/stl/char_traits.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,266 +0,0 @@ -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_CHAR_TRAITS_H -#define _STLP_CHAR_TRAITS_H - -// Define char_traits - -# if defined (_STLP_OWN_IOSTREAMS) || ! defined (_STLP_USE_NEW_IOSTREAMS) - -# if ! defined (_STLP_CSTDDEF) -# include -# endif - -#if ! defined (_STLP_CSTRING) -# include -#endif - -#if defined (_STLP_UNIX) && defined (_STLP_HAS_NO_NEW_C_HEADERS) -#include // For off_t -#endif /* __unix */ - -#ifdef __BORLANDC__ -# include -# include -# include <_stddef.h> -// class mbstate_t; -#endif - -#ifndef __TYPE_TRAITS_H -# include -#endif - -# if !defined (_STLP_CWCHAR) -# include -# endif - -_STLP_BEGIN_NAMESPACE - -# ifdef _STLP_OWN_IOSTREAMS - -template class allocator; - -#define _STLP_NULL_CHAR_INIT(_ChT) _STLP_DEFAULT_CONSTRUCTED(_ChT) - -#if defined (__sgi) && defined (_STLP_HAS_NO_NEW_C_HEADERS) /* IRIX */ -typedef off64_t streamoff; -// #elif defined (__unix) && defined (_STLP_HAS_NO_NEW_C_HEADERS) /* Other version of UNIX */ -// typedef off_t streamoff; -#else /* __unix */ -// boris : here, it's not ptrdiff_t as some Solaris systems have confusing definitions of these. -typedef long streamoff; -#endif /* _STLP_HAS_NO_NEW_C_HEADERS */ - -typedef ptrdiff_t streamsize; - -// Class fpos, which represents a position within a file. (The C++ -// standard calls for it to be defined in . This implementation -// moves it to , which is included by .) -template class fpos -{ -public: // From table 88 of the C++ standard. - fpos(streamoff __pos) : _M_pos(__pos), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {} - fpos() : _M_pos(0), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {} - - operator streamoff() const { return _M_pos; } - - bool _STLP_CALL operator==(const fpos<_StateT>& __y) const - { return _M_pos == __y._M_pos; } - bool _STLP_CALL operator!=(const fpos<_StateT>& __y) const - { return _M_pos != __y._M_pos; } - - fpos<_StateT>& operator+=(streamoff __off) { - _M_pos += __off; - return *this; - } - fpos<_StateT>& operator-=(streamoff __off) { - _M_pos -= __off; - return *this; - } - - fpos<_StateT> operator+(streamoff __off) { - fpos<_StateT> __tmp(*this); - __tmp += __off; - return __tmp; - } - fpos<_StateT> operator-(streamoff __off) { - fpos<_StateT> __tmp(*this); - __tmp -= __off; - return __tmp; - } - -public: // Manipulation of the state member. - _StateT state() const { return _M_st; } - void state(_StateT __st) { _M_st = __st; } -private: - streamoff _M_pos; - _StateT _M_st; -}; - -typedef fpos streampos; -typedef fpos wstreampos; -# endif - -// Class __char_traits_base. - -template class __char_traits_base { -public: - typedef _CharT char_type; - typedef _IntT int_type; -#ifdef _STLP_USE_NEW_IOSTREAMS - typedef streamoff off_type; - typedef streampos pos_type; -# ifdef _STLP_NO_MBSTATE_T - typedef char state_type; -# else - typedef mbstate_t state_type; -# endif -#endif /* _STLP_USE_NEW_IOSTREAMS */ - - static void _STLP_CALL assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } - static bool _STLP_CALL eq(const _CharT& __c1, const _CharT& __c2) - { return __c1 == __c2; } - static bool _STLP_CALL lt(const _CharT& __c1, const _CharT& __c2) - { return __c1 < __c2; } - - static int _STLP_CALL compare(const _CharT* __s1, const _CharT* __s2, size_t __n) { - for (size_t __i = 0; __i < __n; ++__i) - if (!eq(__s1[__i], __s2[__i])) - return __s1[__i] < __s2[__i] ? -1 : 1; - return 0; - } - - static size_t _STLP_CALL length(const _CharT* __s) { - const _CharT _NullChar = _STLP_DEFAULT_CONSTRUCTED(_CharT); - size_t __i; - for (__i = 0; !eq(__s[__i], _NullChar); ++__i) - {} - return __i; - } - - static const _CharT* _STLP_CALL find(const _CharT* __s, size_t __n, const _CharT& __c) { - for ( ; __n > 0 ; ++__s, --__n) - if (eq(*__s, __c)) - return __s; - return 0; - } - - - static _CharT* _STLP_CALL move(_CharT* __s1, const _CharT* __s2, size_t _Sz) { - return (_Sz == 0 ? __s1 : (_CharT*)memmove(__s1, __s2, _Sz * sizeof(_CharT))); - } - - static _CharT* _STLP_CALL copy(_CharT* __s1, const _CharT* __s2, size_t __n) { - return (__n == 0 ? __s1 : - (_CharT*)memcpy(__s1, __s2, __n * sizeof(_CharT))); - } - - static _CharT* _STLP_CALL assign(_CharT* __s, size_t __n, _CharT __c) { - for (size_t __i = 0; __i < __n; ++__i) - __s[__i] = __c; - return __s; - } - - static int_type _STLP_CALL not_eof(const int_type& __c) { - return !eq_int_type(__c, eof()) ? __c : __STATIC_CAST(int_type, 0); - } - - static char_type _STLP_CALL to_char_type(const int_type& __c) { - return (char_type)__c; - } - - static int_type _STLP_CALL to_int_type(const char_type& __c) { - return (int_type)__c; - } - - static bool _STLP_CALL eq_int_type(const int_type& __c1, const int_type& __c2) { - return __c1 == __c2; - } - - static int_type _STLP_CALL eof() { - return (int_type)-1; - // return __STATIC_CAST(int_type,-1); - } -}; - -// Generic char_traits class. Note that this class is provided only -// as a base for explicit specialization; it is unlikely to be useful -// as is for any particular user-defined type. In particular, it -// *will not work* for a non-POD type. - -template class char_traits - : public __char_traits_base<_CharT, _CharT> -{}; - -// Specialization for char. - -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC char_traits - : public __char_traits_base -{ -public: - typedef char char_type; - typedef int int_type; -#ifdef _STLP_USE_NEW_IOSTREAMS - typedef streamoff off_type; -# ifndef _STLP_NO_MBSTATE_T - typedef streampos pos_type; - typedef mbstate_t state_type; -# endif -#endif /* _STLP_USE_NEW_IOSTREAMS */ - - static char _STLP_CALL to_char_type(const int& __c) { - return (char)(unsigned char)__c; - } - - static int _STLP_CALL to_int_type(const char& __c) { - return (unsigned char)__c; - } - - static int _STLP_CALL compare(const char* __s1, const char* __s2, size_t __n) - { return memcmp(__s1, __s2, __n); } - - static size_t _STLP_CALL length(const char* __s) { return strlen(__s); } - - static void _STLP_CALL assign(char& __c1, const char& __c2) { __c1 = __c2; } - - static char* _STLP_CALL assign(char* __s, size_t __n, char __c) - { memset(__s, __c, __n); return __s; } -}; - -# if defined (_STLP_HAS_WCHAR_T) -// Specialization for wchar_t. -_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC char_traits - : public __char_traits_base -{}; -# endif - -_STLP_END_NAMESPACE - -# else /* OWN_IOSTREAMS */ - -# include - -# endif /* OWN_IOSTREAMS */ - -#endif /* _STLP_CHAR_TRAITS_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/concept_checks.h --- a/epoc32/include/stdapis/stlport/stl/concept_checks.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,810 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Silicon Graphics makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - */ - -#ifndef __CONCEPT_CHECKS_H -#define __CONCEPT_CHECKS_H - -/* - Use these macro like assertions, but they assert properties - on types (usually template arguments). In technical terms they - verify whether a type "models" a "concept". - - This set of requirements and the terminology used here is derived - from the book "Generic Programming and the STL" by Matt Austern - (Addison Wesley). For further information please consult that - book. The requirements also are intended to match the ANSI/ISO C++ - standard. - - This file covers the basic concepts and the iterator concepts. - There are several other files that provide the requirements - for the STL containers: - container_concepts.h - sequence_concepts.h - assoc_container_concepts.h - - Jeremy Siek, 1999 - - TO DO: - - some issues with regards to concept classification and mutability - including AssociativeContianer -> ForwardContainer - and SortedAssociativeContainer -> ReversibleContainer - - HashedAssociativeContainer - - Allocator - - Function Object Concepts - - */ - -#ifndef _STLP_USE_CONCEPT_CHECKS - -// Some compilers lack the features that are necessary for concept checks. -// On those compilers we define the concept check macros to do nothing. -#define _STLP_REQUIRES(__type_var, __concept) do {} while(0) -#define _STLP_CLASS_REQUIRES(__type_var, __concept) \ - static int __##__type_var##_##__concept -#define _STLP_CONVERTIBLE(__type_x, __type_y) do {} while(0) -#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) do {} while(0) -#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \ - static int __##__type_x##__type_y##_require_same_type -#define _STLP_GENERATOR_CHECK(__func, __ret) do {} while(0) -#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \ - static int __##__func##__ret##_generator_check -#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) do {} while(0) -#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ - static int __##__func##__ret##__arg##_unary_function_check -#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ - do {} while(0) -#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ - static int __##__func##__ret##__first##__second##_binary_function_check -#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ - do {} while(0) -#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ - static int __##__opname##__ret##__first##__second##_require_binary_op - -#else /* _STLP_USE_CONCEPT_CHECKS */ - -// This macro tests whether the template argument "__type_var" -// satisfies the requirements of "__concept". Here is a list of concepts -// that we know how to check: -// _Allocator -// _Assignable -// _DefaultConstructible -// _EqualityComparable -// _LessThanComparable -// _TrivialIterator -// _InputIterator -// _OutputIterator -// _ForwardIterator -// _BidirectionalIterator -// _RandomAccessIterator -// _Mutable_TrivialIterator -// _Mutable_ForwardIterator -// _Mutable_BidirectionalIterator -// _Mutable_RandomAccessIterator - -#define _STLP_REQUIRES(__type_var, __concept) \ -do { \ - void (*__x)( __type_var ) = __concept##_concept_specification< __type_var >\ - ::##__concept##_requirement_violation; __x = __x; } while (0) - -// Use this to check whether type X is convertible to type Y -#define _STLP_CONVERTIBLE(__type_x, __type_y) \ -do { \ - void (*__x)( __type_x , __type_y ) = _STL_CONVERT_ERROR< __type_x , \ - __type_y >::__type_X_is_not_convertible_to_type_Y; \ - __x = __x; } while (0) - -// Use this to test whether two template arguments are the same type -#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) \ -do { \ - void (*__x)( __type_x , __type_y ) = _STL_SAME_TYPE_ERROR< __type_x, \ - __type_y >::__type_X_not_same_as_type_Y; \ - __x = __x; } while (0) - - -// function object checks -#define _STLP_GENERATOR_CHECK(__func, __ret) \ -do { \ - __ret (*__x)( __func&) = \ - _STL_GENERATOR_ERROR< \ - __func, __ret>::__generator_requirement_violation; \ - __x = __x; } while (0) - - -#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ -do { \ - __ret (*__x)( __func&, const __arg& ) = \ - _STL_UNARY_FUNCTION_ERROR< \ - __func, __ret, __arg>::__unary_function_requirement_violation; \ - __x = __x; } while (0) - - -#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ -do { \ - __ret (*__x)( __func&, const __first&, const __second& ) = \ - _STL_BINARY_FUNCTION_ERROR< \ - __func, __ret, __first, __second>::__binary_function_requirement_violation; \ - __x = __x; } while (0) - - -#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ - do { \ - __ret (*__x)( __first&, __second& ) = _STL_BINARY##__opname##_ERROR< \ - __ret, __first, __second>::__binary_operator_requirement_violation; \ - __ret (*__y)( const __first&, const __second& ) = \ - _STL_BINARY##__opname##_ERROR< __ret, __first, __second>:: \ - __const_binary_operator_requirement_violation; \ - __y = __y; __x = __x; } while (0) - - -#ifdef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE - -#define _STLP_CLASS_REQUIRES(__type_var, __concept) -#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) -#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) -#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) -#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) -#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) - -#else - -// Use this macro inside of template classes, where you would -// like to place requirements on the template arguments to the class -// Warning: do not pass pointers and such (e.g. T*) in as the __type_var, -// since the type_var is used to construct identifiers. Instead typedef -// the pointer type, then use the typedef name for the __type_var. -#define _STLP_CLASS_REQUIRES(__type_var, __concept) \ - typedef void (* __func##__type_var##__concept)( __type_var ); \ - template <__func##__type_var##__concept _Tp1> \ - struct __dummy_struct_##__type_var##__concept { }; \ - static __dummy_struct_##__type_var##__concept< \ - __concept##_concept_specification< \ - __type_var>::__concept##_requirement_violation> \ - __dummy_ptr_##__type_var##__concept - - -#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \ - typedef void (* __func_##__type_x##__type_y##same_type)( __type_x, \ - __type_y ); \ - template < __func_##__type_x##__type_y##same_type _Tp1> \ - struct __dummy_struct_##__type_x##__type_y##_same_type { }; \ - static __dummy_struct_##__type_x##__type_y##_same_type< \ - _STL_SAME_TYPE_ERROR<__type_x, __type_y>::__type_X_not_same_as_type_Y> \ - __dummy_ptr_##__type_x##__type_y##_same_type - - -#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \ - typedef __ret (* __f_##__func##__ret##_generator)( __func& ); \ - template <__f_##__func##__ret##_generator _Tp1> \ - struct __dummy_struct_##__func##__ret##_generator { }; \ - static __dummy_struct_##__func##__ret##_generator< \ - _STL_GENERATOR_ERROR< \ - __func, __ret>::__generator_requirement_violation> \ - __dummy_ptr_##__func##__ret##_generator - - -#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ - typedef __ret (* __f_##__func##__ret##__arg##_unary_check)( __func&, \ - const __arg& ); \ - template <__f_##__func##__ret##__arg##_unary_check _Tp1> \ - struct __dummy_struct_##__func##__ret##__arg##_unary_check { }; \ - static __dummy_struct_##__func##__ret##__arg##_unary_check< \ - _STL_UNARY_FUNCTION_ERROR< \ - __func, __ret, __arg>::__unary_function_requirement_violation> \ - __dummy_ptr_##__func##__ret##__arg##_unary_check - - -#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ - typedef __ret (* __f_##__func##__ret##__first##__second##_binary_check)( __func&, const __first&,\ - const __second& ); \ - template <__f_##__func##__ret##__first##__second##_binary_check _Tp1> \ - struct __dummy_struct_##__func##__ret##__first##__second##_binary_check { }; \ - static __dummy_struct_##__func##__ret##__first##__second##_binary_check< \ - _STL_BINARY_FUNCTION_ERROR<__func, __ret, __first, __second>:: \ - __binary_function_requirement_violation> \ - __dummy_ptr_##__func##__ret##__first##__second##_binary_check - - -#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ - typedef __ret (* __f_##__func##__ret##__first##__second##_binary_op)(const __first&, \ - const __second& ); \ - template <__f_##__func##__ret##__first##__second##_binary_op _Tp1> \ - struct __dummy_struct_##__func##__ret##__first##__second##_binary_op { }; \ - static __dummy_struct_##__func##__ret##__first##__second##_binary_op< \ - _STL_BINARY##__opname##_ERROR<__ret, __first, __second>:: \ - __binary_operator_requirement_violation> \ - __dummy_ptr_##__func##__ret##__first##__second##_binary_op - -#endif - -/* helper class for finding non-const version of a type. Need to have - something to assign to etc. when testing constant iterators. */ - -template -struct _Mutable_trait { - typedef _Tp _Type; -}; -template -struct _Mutable_trait { - typedef _Tp _Type; -}; - - -/* helper function for avoiding compiler warnings about unused variables */ -template -void __sink_unused_warning(_Type) { } - -template -struct _STL_CONVERT_ERROR { - static void - __type_X_is_not_convertible_to_type_Y(_TypeX __x, _TypeY) { - _TypeY __y = __x; - __sink_unused_warning(__y); - } -}; - - -template struct __check_equal { }; - -template -struct _STL_SAME_TYPE_ERROR { - static void - __type_X_not_same_as_type_Y(_TypeX , _TypeY ) { - __check_equal<_TypeX> t1 = __check_equal<_TypeY>(); - } -}; - - -// Some Functon Object Checks - -template -struct _STL_GENERATOR_ERROR { - static _Ret __generator_requirement_violation(_Func& __f) { - return __f(); - } -}; - -template -struct _STL_GENERATOR_ERROR<_Func, void> { - static void __generator_requirement_violation(_Func& __f) { - __f(); - } -}; - - -template -struct _STL_UNARY_FUNCTION_ERROR { - static _Ret - __unary_function_requirement_violation(_Func& __f, - const _Arg& __arg) { - return __f(__arg); - } -}; - -template -struct _STL_UNARY_FUNCTION_ERROR<_Func, void, _Arg> { - static void - __unary_function_requirement_violation(_Func& __f, - const _Arg& __arg) { - __f(__arg); - } -}; - -template -struct _STL_BINARY_FUNCTION_ERROR { - static _Ret - __binary_function_requirement_violation(_Func& __f, - const _First& __first, - const _Second& __second) { - return __f(__first, __second); - } -}; - -template -struct _STL_BINARY_FUNCTION_ERROR<_Func, void, _First, _Second> { - static void - __binary_function_requirement_violation(_Func& __f, - const _First& __first, - const _Second& __second) { - __f(__first, __second); - } -}; - - -#define _STLP_DEFINE_BINARY_OP_CHECK(_OP, _NAME) \ -template \ -struct _STL_BINARY##_NAME##_ERROR { \ - static _Ret \ - __const_binary_operator_requirement_violation(const _First& __first, \ - const _Second& __second) { \ - return __first _OP __second; \ - } \ - static _Ret \ - __binary_operator_requirement_violation(_First& __first, \ - _Second& __second) { \ - return __first _OP __second; \ - } \ -} - -_STLP_DEFINE_BINARY_OP_CHECK(==, _OP_EQUAL); -_STLP_DEFINE_BINARY_OP_CHECK(!=, _OP_NOT_EQUAL); -_STLP_DEFINE_BINARY_OP_CHECK(<, _OP_LESS_THAN); -_STLP_DEFINE_BINARY_OP_CHECK(<=, _OP_LESS_EQUAL); -_STLP_DEFINE_BINARY_OP_CHECK(>, _OP_GREATER_THAN); -_STLP_DEFINE_BINARY_OP_CHECK(>=, _OP_GREATER_EQUAL); -_STLP_DEFINE_BINARY_OP_CHECK(+, _OP_PLUS); -_STLP_DEFINE_BINARY_OP_CHECK(*, _OP_TIMES); -_STLP_DEFINE_BINARY_OP_CHECK(/, _OP_DIVIDE); -_STLP_DEFINE_BINARY_OP_CHECK(-, _OP_SUBTRACT); -_STLP_DEFINE_BINARY_OP_CHECK(%, _OP_MOD); -// ... - -// TODO, add unary operators (prefix and postfix) - -/* - The presence of this class is just to trick EDG into displaying - these error messages before any other errors. Without the - classes, the errors in the functions get reported after - other class errors deep inside the library. The name - choice just makes for an eye catching error message :) - */ -struct _STL_ERROR { - - template - static _Type - __default_constructor_requirement_violation(_Type) { - return _Type(); - } - template - static _Type - __assignment_operator_requirement_violation(_Type __a) { - __a = __a; - return __a; - } - template - static _Type - __copy_constructor_requirement_violation(_Type __a) { - _Type __c(__a); - return __c; - } - template - static _Type - __const_parameter_required_for_copy_constructor(_Type /* __a */, - const _Type& __b) { - _Type __c(__b); - return __c; - } - template - static _Type - __const_parameter_required_for_assignment_operator(_Type __a, - const _Type& __b) { - __a = __b; - return __a; - } - template - static _Type - __less_than_comparable_requirement_violation(_Type __a, _Type __b) { - if (__a < __b || __a > __b || __a <= __b || __a >= __b) return __a; - return __b; - } - template - static _Type - __equality_comparable_requirement_violation(_Type __a, _Type __b) { - if (__a == __b || __a != __b) return __a; - return __b; - } - template - static void - __dereference_operator_requirement_violation(_Iterator __i) { - __sink_unused_warning(*__i); - } - template - static void - __dereference_operator_and_assignment_requirement_violation(_Iterator __i) { - *__i = *__i; - } - template - static void - __preincrement_operator_requirement_violation(_Iterator __i) { - ++__i; - } - template - static void - __postincrement_operator_requirement_violation(_Iterator __i) { - __i++; - } - template - static void - __predecrement_operator_requirement_violation(_Iterator __i) { - --__i; - } - template - static void - __postdecrement_operator_requirement_violation(_Iterator __i) { - __i--; - } - template - static void - __postincrement_operator_and_assignment_requirement_violation(_Iterator __i, - _Type __t) { - *__i++ = __t; - } - template - static _Iterator - __iterator_addition_assignment_requirement_violation(_Iterator __i, - _Distance __n) { - __i += __n; - return __i; - } - template - static _Iterator - __iterator_addition_requirement_violation(_Iterator __i, _Distance __n) { - __i = __i + __n; - __i = __n + __i; - return __i; - } - template - static _Iterator - __iterator_subtraction_assignment_requirement_violation(_Iterator __i, - _Distance __n) { - __i -= __n; - return __i; - } - template - static _Iterator - __iterator_subtraction_requirement_violation(_Iterator __i, _Distance __n) { - __i = __i - __n; - return __i; - } - template - static _Distance - __difference_operator_requirement_violation(_Iterator __i, _Iterator __j, - _Distance __n) { - __n = __i - __j; - return __n; - } - template - static _Type - __element_access_operator_requirement_violation(_Exp __x, _Type*, - _Distance __n) { - return __x[__n]; - } - template - static void - __element_assignment_operator_requirement_violation(_Exp __x, - _Type* __t, - _Distance __n) { - __x[__n] = *__t; - } - -}; /* _STL_ERROR */ - -/* Associated Type Requirements */ - -_STLP_BEGIN_NAMESPACE -template struct iterator_traits; -_STLP_END_NAMESPACE - -template -struct __value_type_type_definition_requirement_violation { - typedef typename __STD::iterator_traits<_Iter>::value_type value_type; -}; - -template -struct __difference_type_type_definition_requirement_violation { - typedef typename __STD::iterator_traits<_Iter>::difference_type - difference_type; -}; - -template -struct __reference_type_definition_requirement_violation { - typedef typename __STD::iterator_traits<_Iter>::reference reference; -}; - -template -struct __pointer_type_definition_requirement_violation { - typedef typename __STD::iterator_traits<_Iter>::pointer pointer; -}; - -template -struct __iterator_category_type_definition_requirement_violation { - typedef typename __STD::iterator_traits<_Iter>::iterator_category - iterator_category; -}; - -/* Assignable Requirements */ - - -template -struct _Assignable_concept_specification { - static void _Assignable_requirement_violation(_Type __a) { - _STL_ERROR::__assignment_operator_requirement_violation(__a); - _STL_ERROR::__copy_constructor_requirement_violation(__a); - _STL_ERROR::__const_parameter_required_for_copy_constructor(__a,__a); - _STL_ERROR::__const_parameter_required_for_assignment_operator(__a,__a); - } -}; - -/* DefaultConstructible Requirements */ - - -template -struct _DefaultConstructible_concept_specification { - static void _DefaultConstructible_requirement_violation(_Type __a) { - _STL_ERROR::__default_constructor_requirement_violation(__a); - } -}; - -/* EqualityComparable Requirements */ - -template -struct _EqualityComparable_concept_specification { - static void _EqualityComparable_requirement_violation(_Type __a) { - _STL_ERROR::__equality_comparable_requirement_violation(__a, __a); - } -}; - -/* LessThanComparable Requirements */ -template -struct _LessThanComparable_concept_specification { - static void _LessThanComparable_requirement_violation(_Type __a) { - _STL_ERROR::__less_than_comparable_requirement_violation(__a, __a); - } -}; - -/* TrivialIterator Requirements */ - -template -struct _TrivialIterator_concept_specification { -static void -_TrivialIterator_requirement_violation(_TrivialIterator __i) { - typedef typename - __value_type_type_definition_requirement_violation<_TrivialIterator>:: - value_type __T; - // Refinement of Assignable - _Assignable_concept_specification<_TrivialIterator>:: - _Assignable_requirement_violation(__i); - // Refinement of DefaultConstructible - _DefaultConstructible_concept_specification<_TrivialIterator>:: - _DefaultConstructible_requirement_violation(__i); - // Refinement of EqualityComparable - _EqualityComparable_concept_specification<_TrivialIterator>:: - _EqualityComparable_requirement_violation(__i); - // Valid Expressions - _STL_ERROR::__dereference_operator_requirement_violation(__i); -} -}; - -template -struct _Mutable_TrivialIterator_concept_specification { -static void -_Mutable_TrivialIterator_requirement_violation(_TrivialIterator __i) { - _TrivialIterator_concept_specification<_TrivialIterator>:: - _TrivialIterator_requirement_violation(__i); - // Valid Expressions - _STL_ERROR::__dereference_operator_and_assignment_requirement_violation(__i); -} -}; - -/* InputIterator Requirements */ - -template -struct _InputIterator_concept_specification { -static void -_InputIterator_requirement_violation(_InputIterator __i) { - // Refinement of TrivialIterator - _TrivialIterator_concept_specification<_InputIterator>:: - _TrivialIterator_requirement_violation(__i); - // Associated Types - __difference_type_type_definition_requirement_violation<_InputIterator>(); - __reference_type_definition_requirement_violation<_InputIterator>(); - __pointer_type_definition_requirement_violation<_InputIterator>(); - __iterator_category_type_definition_requirement_violation<_InputIterator>(); - // Valid Expressions - _STL_ERROR::__preincrement_operator_requirement_violation(__i); - _STL_ERROR::__postincrement_operator_requirement_violation(__i); -} -}; - -/* OutputIterator Requirements */ - -template -struct _OutputIterator_concept_specification { -static void -_OutputIterator_requirement_violation(_OutputIterator __i) { - // Refinement of Assignable - _Assignable_concept_specification<_OutputIterator>:: - _Assignable_requirement_violation(__i); - // Associated Types - __iterator_category_type_definition_requirement_violation<_OutputIterator>(); - // Valid Expressions - _STL_ERROR::__dereference_operator_requirement_violation(__i); - _STL_ERROR::__preincrement_operator_requirement_violation(__i); - _STL_ERROR::__postincrement_operator_requirement_violation(__i); - _STL_ERROR:: - __postincrement_operator_and_assignment_requirement_violation(__i, *__i); -} -}; - -/* ForwardIterator Requirements */ - -template -struct _ForwardIterator_concept_specification { -static void -_ForwardIterator_requirement_violation(_ForwardIterator __i) { - // Refinement of InputIterator - _InputIterator_concept_specification<_ForwardIterator>:: - _InputIterator_requirement_violation(__i); -} -}; - -template -struct _Mutable_ForwardIterator_concept_specification { -static void -_Mutable_ForwardIterator_requirement_violation(_ForwardIterator __i) { - _ForwardIterator_concept_specification<_ForwardIterator>:: - _ForwardIterator_requirement_violation(__i); - // Refinement of OutputIterator - _OutputIterator_concept_specification<_ForwardIterator>:: - _OutputIterator_requirement_violation(__i); -} -}; - -/* BidirectionalIterator Requirements */ - -template -struct _BidirectionalIterator_concept_specification { -static void -_BidirectionalIterator_requirement_violation(_BidirectionalIterator __i) { - // Refinement of ForwardIterator - _ForwardIterator_concept_specification<_BidirectionalIterator>:: - _ForwardIterator_requirement_violation(__i); - // Valid Expressions - _STL_ERROR::__predecrement_operator_requirement_violation(__i); - _STL_ERROR::__postdecrement_operator_requirement_violation(__i); -} -}; - -template -struct _Mutable_BidirectionalIterator_concept_specification { -static void -_Mutable_BidirectionalIterator_requirement_violation( - _BidirectionalIterator __i) -{ - _BidirectionalIterator_concept_specification<_BidirectionalIterator>:: - _BidirectionalIterator_requirement_violation(__i); - // Refinement of mutable_ForwardIterator - _Mutable_ForwardIterator_concept_specification<_BidirectionalIterator>:: - _Mutable_ForwardIterator_requirement_violation(__i); - typedef typename - __value_type_type_definition_requirement_violation< - _BidirectionalIterator>::value_type __T; - typename _Mutable_trait<__T>::_Type* __tmp_ptr = 0; - // Valid Expressions - _STL_ERROR:: - __postincrement_operator_and_assignment_requirement_violation(__i, - *__tmp_ptr); -} -}; - -/* RandomAccessIterator Requirements */ - -template -struct _RandomAccessIterator_concept_specification { -static void -_RandomAccessIterator_requirement_violation(_RandAccIter __i) { - // Refinement of BidirectionalIterator - _BidirectionalIterator_concept_specification<_RandAccIter>:: - _BidirectionalIterator_requirement_violation(__i); - // Refinement of LessThanComparable - _LessThanComparable_concept_specification<_RandAccIter>:: - _LessThanComparable_requirement_violation(__i); - typedef typename - __value_type_type_definition_requirement_violation<_RandAccIter> - ::value_type - value_type; - typedef typename - __difference_type_type_definition_requirement_violation<_RandAccIter> - ::difference_type - _Dist; - typedef typename _Mutable_trait<_Dist>::_Type _MutDist; - - // Valid Expressions - _STL_ERROR::__iterator_addition_assignment_requirement_violation(__i, - _MutDist()); - _STL_ERROR::__iterator_addition_requirement_violation(__i, - _MutDist()); - _STL_ERROR:: - __iterator_subtraction_assignment_requirement_violation(__i, - _MutDist()); - _STL_ERROR::__iterator_subtraction_requirement_violation(__i, - _MutDist()); - _STL_ERROR::__difference_operator_requirement_violation(__i, __i, - _MutDist()); - typename _Mutable_trait::_Type* __dummy_ptr = 0; - _STL_ERROR::__element_access_operator_requirement_violation(__i, - __dummy_ptr, - _MutDist()); -} -}; - -template -struct _Mutable_RandomAccessIterator_concept_specification { -static void -_Mutable_RandomAccessIterator_requirement_violation(_RandAccIter __i) -{ - _RandomAccessIterator_concept_specification<_RandAccIter>:: - _RandomAccessIterator_requirement_violation(__i); - // Refinement of mutable_BidirectionalIterator - _Mutable_BidirectionalIterator_concept_specification<_RandAccIter>:: - _Mutable_BidirectionalIterator_requirement_violation(__i); - typedef typename - __value_type_type_definition_requirement_violation<_RandAccIter> - ::value_type - value_type; - typedef typename - __difference_type_type_definition_requirement_violation<_RandAccIter> - ::difference_type - _Dist; - - typename _Mutable_trait::_Type* __tmp_ptr = 0; - // Valid Expressions - _STL_ERROR::__element_assignment_operator_requirement_violation(__i, - __tmp_ptr, _Dist()); -} -}; - -#define _STLP_TYPEDEF_REQUIREMENT(__REQUIREMENT) \ -template \ -struct __##__REQUIREMENT##__typedef_requirement_violation { \ - typedef typename Type::__REQUIREMENT __REQUIREMENT; \ -}; - -_STLP_TYPEDEF_REQUIREMENT(value_type); -_STLP_TYPEDEF_REQUIREMENT(difference_type); -_STLP_TYPEDEF_REQUIREMENT(size_type); -_STLP_TYPEDEF_REQUIREMENT(reference); -_STLP_TYPEDEF_REQUIREMENT(const_reference); -_STLP_TYPEDEF_REQUIREMENT(pointer); -_STLP_TYPEDEF_REQUIREMENT(const_pointer); - - -template -struct _Allocator_concept_specification { -static void -_Allocator_requirement_violation(_Alloc __a) { - // Refinement of DefaultConstructible - _DefaultConstructible_concept_specification<_Alloc>:: - _DefaultConstructible_requirement_violation(__a); - // Refinement of EqualityComparable - _EqualityComparable_concept_specification<_Alloc>:: - _EqualityComparable_requirement_violation(__a); - // Associated Types - __value_type__typedef_requirement_violation<_Alloc>(); - __difference_type__typedef_requirement_violation<_Alloc>(); - __size_type__typedef_requirement_violation<_Alloc>(); - __reference__typedef_requirement_violation<_Alloc>(); - __const_reference__typedef_requirement_violation<_Alloc>(); - __pointer__typedef_requirement_violation<_Alloc>(); - __const_pointer__typedef_requirement_violation<_Alloc>(); - typedef typename _Alloc::value_type _Type; - _STLP_REQUIRES_SAME_TYPE(typename _Alloc::rebind<_Type>::other, _Alloc); -} -}; - -#endif /* _STLP_USE_CONCEPT_CHECKS */ - -#endif /* __CONCEPT_CHECKS_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/debug/_debug.c --- a/epoc32/include/stdapis/stlport/stl/debug/_debug.c Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,496 +0,0 @@ -/* - * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -# ifndef _STLP_DEBUG_C -# define _STLP_DEBUG_C - -#if defined ( _STLP_DEBUG ) - -# ifdef _STLP_THREADS -# ifndef _STLP_NEED_MUTABLE -# define _STLP_ACQUIRE_LOCK(_Lock) _Lock._M_acquire_lock(); -# define _STLP_RELEASE_LOCK(_Lock) _Lock._M_release_lock(); -# else -# define _STLP_ACQUIRE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_acquire_lock(); -# define _STLP_RELEASE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_release_lock(); -# endif /* _STLP_NEED_MUTABLE */ -# else -# define _STLP_ACQUIRE_LOCK(_Lock) -# define _STLP_RELEASE_LOCK(_Lock) -# endif /* _STLP_THREADS */ - -_STLP_BEGIN_NAMESPACE - -//========================================================== -// global non-inline functions -//========================================================== - -// [ i1, i2) -template -inline bool _STLP_CALL -__in_range_aux(const _Iterator& __it, const _Iterator& __first, - const _Iterator& __last, const random_access_iterator_tag &) { - return ( __it >= __first && - __it < __last); -} - -template -# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1100) -inline bool _STLP_CALL __in_range_aux(_Iterator1 __it, const _Iterator& __first, -# else -inline bool _STLP_CALL __in_range_aux(const _Iterator1& __it, const _Iterator& __first, -# endif - const _Iterator& __last, const forward_iterator_tag &) { - _Iterator1 __i(__first); - for (; __i != __last && __i != __it; ++__i); - return (__i!=__last); -} - -# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) -template -inline bool _STLP_CALL -__in_range_aux(const _Iterator1& __it, const _Iterator& __first, - const _Iterator& __last, const bidirectional_iterator_tag &) { - _Iterator1 __i(__first); - for (; __i != __last && __i != __it; ++__i); - return (__i !=__last); -} -# endif - -template -bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last) { - _STLP_VERBOSE_RETURN(__valid_range(__first,__last), _StlMsg_INVALID_RANGE ) - return true; -} - -template -bool _STLP_CALL __check_range(const _Iterator& __it, - const _Iterator& __start, const _Iterator& __finish) { - _STLP_VERBOSE_RETURN(__in_range(__it,__start, __finish), - _StlMsg_NOT_IN_RANGE_1) - return true; -} - -template -bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last, - const _Iterator& __start, const _Iterator& __finish) { - _STLP_VERBOSE_RETURN(__in_range(__first, __last, __start, __finish), - _StlMsg_NOT_IN_RANGE_2) - return true; -} - -//=============================================================== - -template -void _STLP_CALL __invalidate_range(const __owned_list* __base, - const _Iterator& __first, - const _Iterator& __last) -{ - typedef _Iterator* _Safe_iterator_ptr; - typedef __owned_link _L_type; - _STLP_ACQUIRE_LOCK(__base->_M_lock) - _L_type* __pos; - _L_type* __prev; - - for (__prev = (_L_type*)&__base->_M_node, __pos= (_L_type*)__prev->_M_next; - __pos!=0;) { - if ((!(&__first == (_Iterator*)__pos || &__last == (_Iterator*)__pos)) - && __in_range_aux( - ((_Iterator*)__pos)->_M_iterator, - __first._M_iterator, - __last._M_iterator, - _STLP_ITERATOR_CATEGORY(__first, _Iterator))) { - __pos->_M_owner = 0; - __pos = (_L_type*) (__prev->_M_next = __pos->_M_next); - } - else { - __prev = __pos; - __pos=(_L_type*)__pos->_M_next; - } - } - _STLP_RELEASE_LOCK(__base->_M_lock) -} - -template -void _STLP_CALL __invalidate_iterator(const __owned_list* __base, - const _Iterator& __it) -{ - typedef __owned_link _L_type; - _L_type* __position, *__prev; - _STLP_ACQUIRE_LOCK(__base->_M_lock) - for (__prev = (_L_type*)&__base->_M_node, __position = (_L_type*)__prev->_M_next; - __position!= 0;) { - // this requires safe iterators to be derived from __owned_link - if ((__position != (_L_type*)&__it) && ((_Iterator*)__position)->_M_iterator ==__it._M_iterator) { - __position->_M_owner = 0; - __position = (_L_type*) (__prev->_M_next = __position->_M_next); - } - else { - __prev = __position; - __position=(_L_type*)__position->_M_next; - } - } - _STLP_RELEASE_LOCK(__base->_M_lock) -} - -_STLP_END_NAMESPACE - -# endif /* _STLP_DEBUG */ - -# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) - -// dwa 12/26/99 -- for abort -# if defined (_STLP_USE_NEW_C_HEADERS) -# include -# else -# include -# endif - -# if defined (_STLP_WIN32) -# include -# endif - -//========================================================== -// .c section -// owned_list non-inline methods and global functions -//========================================================== - -#if defined ( _STLP_ASSERTIONS ) - -_STLP_BEGIN_NAMESPACE - -# ifndef _STLP_STRING_LITERAL -# define _STLP_STRING_LITERAL(__x) __x -# endif - -# ifdef _STLP_WINCE -# define _STLP_PERCENT_S "%hs" -# else -# define _STLP_PERCENT_S "%s" -# endif - -# define _STLP_MESSAGE_TABLE_BODY = { \ -_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error: %s\n"), \ -_STLP_STRING_LITERAL(_STLP_PERCENT_S "(%d): STL assertion failure : " _STLP_PERCENT_S "\n" _STLP_ASSERT_MSG_TRAILER), \ -_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error : " _STLP_PERCENT_S "\n" _STLP_PERCENT_S "(%d): STL assertion failure: " _STLP_PERCENT_S " \n" _STLP_ASSERT_MSG_TRAILER), \ -_STLP_STRING_LITERAL("Invalid argument to operation (see operation documentation)"), \ -_STLP_STRING_LITERAL("Taking an iterator out of destroyed (or otherwise corrupted) container"), \ -_STLP_STRING_LITERAL("Trying to extract an object out from empty container"),\ -_STLP_STRING_LITERAL("Past-the-end iterator could not be erased"), \ -_STLP_STRING_LITERAL("Index out of bounds"), \ -_STLP_STRING_LITERAL("Container doesn't own the iterator"), \ -_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) iterator used"), \ -_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) lefthand iterator in expression"), \ -_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) righthand iterator in expression"), \ -_STLP_STRING_LITERAL("Iterators used in expression are from different owners"), \ -_STLP_STRING_LITERAL("Iterator could not be dereferenced (past-the-end ?)"), \ -_STLP_STRING_LITERAL("Range [first,last) is invalid"), \ -_STLP_STRING_LITERAL("Iterator is not in range [first,last)"), \ -_STLP_STRING_LITERAL("Range [first,last) is not in range [start,finish)"), \ -_STLP_STRING_LITERAL("The advance would produce invalid iterator"), \ -_STLP_STRING_LITERAL("Iterator is singular (advanced beyond the bounds ?)"), \ -_STLP_STRING_LITERAL("Memory block deallocated twice"), \ -_STLP_STRING_LITERAL("Deallocating a block that was never allocated"), \ -_STLP_STRING_LITERAL("Deallocating a memory block allocated for another type"), \ -_STLP_STRING_LITERAL("Size of block passed to deallocate() doesn't match block size"), \ -_STLP_STRING_LITERAL("Pointer underrun - safety margin at front of memory block overwritten"), \ -_STLP_STRING_LITERAL("Pointer overrrun - safety margin at back of memory block overwritten"), \ -_STLP_STRING_LITERAL("Attempt to dereference null pointer returned by auto_ptr::get()"), \ -_STLP_STRING_LITERAL("Unknown problem") \ - } - -# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) -#ifdef __SYMBIAN32__ -template -const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX];// _STLP_MESSAGE_TABLE_BODY; -#else -template -const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX] _STLP_MESSAGE_TABLE_BODY; -#endif - -# else -__DECLARE_INSTANCE(const char*, __stl_debug_engine::_Message_table[_StlMsg_MAX], - _STLP_MESSAGE_TABLE_BODY); - -# endif - -# undef _STLP_STRING_LITERAL -# undef _STLP_PERCENT_S -_STLP_END_NAMESPACE - -// abort() -# include - -# if !defined( _STLP_DEBUG_MESSAGE ) - -# include -# include - -_STLP_BEGIN_NAMESPACE - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Message(const char * __format_str, ...) -{ - STLPORT_CSTD::va_list __args; - va_start( __args, __format_str ); - -# if defined (_STLP_WINCE) - TCHAR __buffer[512]; - int _convert = strlen(__format_str) + 1; - LPWSTR _lpw = (LPWSTR)alloca(_convert*sizeof(wchar_t)); - _lpw[0] = '\0'; - MultiByteToWideChar(GetACP(), 0, __format_str, -1, _lpw, _convert); - wvsprintf(__buffer, _lpw, __args); - // wvsprintf(__buffer, __format_str, __args); - _STLP_WINCE_TRACE(__buffer); -# elif defined (_STLP_WIN32) && ( defined(_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)) && ! defined (__WINS__) - char __buffer [4096]; - _vsnprintf(__buffer, sizeof(__buffer) / sizeof(char), - __format_str, __args); - OutputDebugStringA(__buffer); -# elif defined (__amigaos__) - STLPORT_CSTD::vfprintf(stderr, __format_str, (char *)__args); -# else - STLPORT_CSTD::vfprintf(stderr, __format_str, __args); -# endif /* WINCE */ - -# ifdef _STLP_DEBUG_MESSAGE_POST - _STLP_DEBUG_MESSAGE_POST -# endif - - va_end(__args); - -} - -_STLP_END_NAMESPACE - -# endif /* _STLP_DEBUG_MESSAGE */ - - -_STLP_BEGIN_NAMESPACE - - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_IndexedError(int __error_ind, const char* __f, int __l) -{ - __stl_debug_message(_Message_table[_StlFormat_ERROR_RETURN], - __f, __l, _Message_table[__error_ind]); -} - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l) -{ - __stl_debug_message(_Message_table[_StlFormat_VERBOSE_ASSERTION_FAILURE], - __f, __l, _Message_table[__error_ind], __f, __l, __expr); - __stl_debug_terminate(); -} - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Assert(const char* __expr, const char* __f, int __l) -{ - __stl_debug_message(_Message_table[_StlFormat_ASSERTION_FAILURE],__f, __l, __expr); - __stl_debug_terminate(); -} - -// if exceptions are present, sends unique exception -// if not, calls abort() to terminate -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Terminate() -{ -# ifdef _STLP_USE_NAMESPACES - using namespace _STLP_STD; -# endif -# if defined (_STLP_USE_EXCEPTIONS) && ! defined (_STLP_NO_DEBUG_EXCEPTIONS) - throw __stl_debug_exception(); -# else - _STLP_ABORT(); -# endif -} - -_STLP_END_NAMESPACE - -# endif /* _STLP_ASSERTIONS */ - -#ifdef _STLP_DEBUG - -_STLP_BEGIN_NAMESPACE - -//========================================================== -// owned_list non-inline methods -//========================================================== - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Invalidate_all(__owned_list* __l) { - _STLP_ACQUIRE_LOCK(__l->_M_lock); - _Stamp_all(__l, 0); - __l->_M_node._M_next =0; - _STLP_RELEASE_LOCK(__l->_M_lock); -} - -// boris : this is unasafe routine; should be used from within critical section only ! -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Stamp_all(__owned_list* __l, __owned_list* __o) { - // crucial - if (__l->_M_node._M_owner) { - for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next; - __position != 0; __position= (__owned_link*)__position->_M_next) { - _STLP_ASSERT(__position->_Owner()== __l) - __position->_M_owner=__o; - } - } -} - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Verify(const __owned_list* __l) { - _STLP_ACQUIRE_LOCK(__l->_M_lock); - if (__l) { - _STLP_ASSERT(__l->_M_node._Owner() != 0) - for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next; - __position != 0; __position= (__owned_link*)__position->_M_next) { - _STLP_ASSERT(__position->_Owner()== __l) - } - } - _STLP_RELEASE_LOCK(__l->_M_lock); -} - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_Swap_owners(__owned_list& __x, __owned_list& __y) { - - // according to the standard : --no swap() function invalidates any references, - // pointers, or iterators referring to the elements of the containers being swapped. - - __owned_link* __tmp; - - // boris : there is a deadlock potential situation here if we lock two containers sequentially. - // As user is supposed to provide its own synchronization around swap() ( it is unsafe to do any container/iterator access - // in parallel with swap()), we just do not use any locking at all -- that behaviour is closer to non-debug version - - __tmp = __x._M_node._M_next; - - _Stamp_all(&__x, &__y); - _Stamp_all(&__y, &__x); - - __x._M_node._M_next = __y._M_node._M_next; - __y._M_node._M_next = __tmp; - -} - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_M_detach(__owned_list* __l, __owned_link* __c_node) { - if (__l != 0) { - - _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER) - - _STLP_ACQUIRE_LOCK(__l->_M_lock) - // boris : re-test the condition in case someone else already deleted us - if(__c_node->_M_owner != 0) { - __owned_link* __prev, *__next; - - for (__prev = &__l->_M_node; (__next = __prev->_M_next) != __c_node; - __prev = __next) { - _STLP_ASSERT(__next && __next->_Owner() == __l) - } - - __prev->_M_next = __c_node->_M_next; - __c_node->_M_owner=0; - } - _STLP_RELEASE_LOCK(__l->_M_lock) - } -} - -template -void _STLP_CALL -__stl_debug_engine<_Dummy>::_M_attach(__owned_list* __l, __owned_link* __c_node) { - if (__l ==0) { - (__c_node)->_M_owner = 0; - } else { - _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER) - _STLP_ACQUIRE_LOCK(__l->_M_lock) - __c_node->_M_owner = __l; - __c_node->_M_next = __l->_M_node._M_next; - __l->_M_node._M_next = __c_node; - _STLP_RELEASE_LOCK(__l->_M_lock) - } -} - - -template -void* _STLP_CALL -__stl_debug_engine<_Dummy>::_Get_container_ptr(const __owned_link* __l) { - const __owned_list* __owner = __l->_Owner(); - _STLP_VERBOSE_RETURN_0(__owner != 0, _StlMsg_INVALID_ITERATOR) - void* __ret = __CONST_CAST(void*,__owner->_Owner()); - _STLP_VERBOSE_RETURN_0(__ret !=0, _StlMsg_INVALID_CONTAINER) - return __ret; -} - -template -bool _STLP_CALL -__stl_debug_engine<_Dummy>::_Check_same_owner( const __owned_link& __i1, - const __owned_link& __i2) -{ - _STLP_VERBOSE_RETURN(__i1._Valid(), _StlMsg_INVALID_LEFTHAND_ITERATOR) - _STLP_VERBOSE_RETURN(__i2._Valid(), _StlMsg_INVALID_RIGHTHAND_ITERATOR) - _STLP_VERBOSE_RETURN((__i1._Owner()==__i2._Owner()), _StlMsg_DIFFERENT_OWNERS) - return true; -} - -template -bool _STLP_CALL -__stl_debug_engine<_Dummy>::_Check_same_owner_or_null( const __owned_link& __i1, - const __owned_link& __i2) -{ - _STLP_VERBOSE_RETURN(__i1._Owner()==__i2._Owner(), _StlMsg_DIFFERENT_OWNERS) - return true; -} - -template -bool _STLP_CALL -__stl_debug_engine<_Dummy>::_Check_if_owner( const __owned_list * __l, const __owned_link& __it) -{ - const __owned_list* __owner_ptr = __it._Owner(); - _STLP_VERBOSE_RETURN(__owner_ptr!=0, _StlMsg_INVALID_ITERATOR) - _STLP_VERBOSE_RETURN(__l==__owner_ptr, _StlMsg_NOT_OWNER) - return true; -} - - -_STLP_END_NAMESPACE - -#endif /* _STLP_DEBUG */ - -#endif /* if defined (EXPOSE_GLOBALS_IMPLEMENTATION) */ - -#endif /* header guard */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/debug/_debug.h --- a/epoc32/include/stdapis/stlport/stl/debug/_debug.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,426 +0,0 @@ -/* - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_DEBUG_H -# define _STLP_DEBUG_H - -# if defined (_STLP_ASSERTIONS) || defined (_STLP_DEBUG) - -#ifndef _STLP_CONFIG_H -# include -#endif - -# if !defined (_STLP_EXTRA_OPERATORS_FOR_DEBUG) && \ - ( defined (_STLP_BASE_MATCH_BUG) || (defined (_STLP_MSVC) && _STLP_MSVC < 1100 ) ) -# define _STLP_EXTRA_OPERATORS_FOR_DEBUG -# endif - -# if !defined(_STLP_FILE__) -# define _STLP_FILE__ __FILE__ -# endif - -enum { - _StlFormat_ERROR_RETURN, - _StlFormat_ASSERTION_FAILURE, - _StlFormat_VERBOSE_ASSERTION_FAILURE, - _StlMsg_INVALID_ARGUMENT, - _StlMsg_INVALID_CONTAINER, - _StlMsg_EMPTY_CONTAINER, - _StlMsg_ERASE_PAST_THE_END, - _StlMsg_OUT_OF_BOUNDS, - _StlMsg_NOT_OWNER, - _StlMsg_INVALID_ITERATOR, - _StlMsg_INVALID_LEFTHAND_ITERATOR, - _StlMsg_INVALID_RIGHTHAND_ITERATOR, - _StlMsg_DIFFERENT_OWNERS , - _StlMsg_NOT_DEREFERENCEABLE , - _StlMsg_INVALID_RANGE , - _StlMsg_NOT_IN_RANGE_1 , - _StlMsg_NOT_IN_RANGE_2 , - _StlMsg_INVALID_ADVANCE , - _StlMsg_SINGULAR_ITERATOR , - // debug alloc messages - _StlMsg_DBA_DELETED_TWICE , - _StlMsg_DBA_NEVER_ALLOCATED , - _StlMsg_DBA_TYPE_MISMATCH , - _StlMsg_DBA_SIZE_MISMATCH , - _StlMsg_DBA_UNDERRUN , - _StlMsg_DBA_OVERRUN , - // auto_ptr messages - _StlMsg_AUTO_PTR_NULL , - _StlMsg_UNKNOWN - /* _StlMsg_MAX */ -}; - -/* have to hardcode that ;() */ -# define _StlMsg_MAX 27 - -_STLP_BEGIN_NAMESPACE - -// This class is unique (not inherited from exception), -// to disallow catch in anything but (...) -struct __stl_debug_exception { - // no members -}; - -class _STLP_CLASS_DECLSPEC __owned_link; -class _STLP_CLASS_DECLSPEC __owned_list; - -template -struct __stl_debug_engine { - - // Basic routine to report any debug message - // Use _STLP_DEBUG_MESSAGE to override - static void _STLP_CALL _Message(const char * format_str, ...); - - // Micsellanous function to report indexed error message - static void _STLP_CALL _IndexedError(int __ind, const char* __f, int __l); - - // Basic assertion report mechanism. - // Reports failed assertion via __stl_debug_message and calls _Terminate - // if _STLP_DEBUG_TERMINATE is specified, calls __stl_debug_terminate instead - static void _STLP_CALL _Assert(const char* __expr, const char* __f, int __l); - - // The same, with additional diagnostics - static void _STLP_CALL _VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l); - - // If exceptions are present, sends unique exception - // If not, calls _STLP_ABORT() to terminate - // Use _STLP_DEBUG_TERMINATE to override - static void _STLP_CALL _Terminate(); - -# ifdef _STLP_DEBUG - - // owned_list/link delegate non-inline functions here - - static bool _STLP_CALL _Check_same_owner( const __owned_link& __i1, - const __owned_link& __i2); - static bool _STLP_CALL _Check_same_owner_or_null( const __owned_link& __i1, - const __owned_link& __i2); - static bool _STLP_CALL _Check_if_owner( const __owned_list*, const __owned_link&); - - static void _STLP_CALL _Verify(const __owned_list*); - - static void _STLP_CALL _Swap_owners(__owned_list&, __owned_list& /*, bool __swap_roots */ ); - - static void _STLP_CALL _Invalidate_all(__owned_list*); - - static void _STLP_CALL _Stamp_all(__owned_list*, __owned_list*); - - static void _STLP_CALL _M_detach(__owned_list*, __owned_link*); - - static void _STLP_CALL _M_attach(__owned_list*, __owned_link*); - - // accessor : check and get pointer to the container - static void* _STLP_CALL _Get_container_ptr(const __owned_link*); -# endif /* _STLP_DEBUG */ - - // debug messages and formats - _STLP_STATIC_MEMBER_DECLSPEC static const char* _Message_table[_StlMsg_MAX]; -}; - - -# if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE struct _STLP_CLASS_DECLSPEC __stl_debug_engine; -# endif /* _STLP_USE_TEMPLATE_EXPORT */ - -typedef __stl_debug_engine __stl_debugger; - -_STLP_END_NAMESPACE - -# ifndef _STLP_ASSERT -# define _STLP_ASSERT(expr) \ - if (!(expr)) {STLPORT::__stl_debugger::_Assert( # expr, _STLP_FILE__, __LINE__);} -# endif - -# endif /* _STLP_ASSERTIONS || _STLP_DEBUG */ - - -// this section is for _STLP_DEBUG only -#if defined ( _STLP_DEBUG ) - -# ifndef _STLP_VERBOSE_ASSERT -// fbp : new form not requiring ";" -# define _STLP_VERBOSE_ASSERT(expr,__diag_num) \ - if (!(expr)) { STLPORT::__stl_debugger::_VerboseAssert\ - ( # expr, __diag_num, _STLP_FILE__, __LINE__ ); \ - } -# endif - -# define _STLP_DEBUG_CHECK(expr) _STLP_ASSERT(expr) -# define _STLP_DEBUG_DO(expr) expr; - -# ifndef _STLP_VERBOSE_RETURN -# define _STLP_VERBOSE_RETURN(__expr,__diag_num) if (!(__expr)) { \ - __stl_debugger::_IndexedError(__diag_num, __FILE__ , __LINE__); \ - return false; } -# endif - -# ifndef _STLP_VERBOSE_RETURN_0 -# define _STLP_VERBOSE_RETURN_0(__expr,__diag_num) if (!(__expr)) { \ - __stl_debugger::_IndexedError(__diag_num, __FILE__ , __LINE__); \ - return 0; } -# endif - -#if ! defined (_STLP_INTERNAL_THREADS_H) -# include -#endif - -#ifndef _STLP_INTERNAL_ITERATOR_BASE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//============================================================= -template -inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, - const random_access_iterator_tag&) { - return (__i1< __i2) || (__i1 == __i2); -} - -template -inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, - const bidirectional_iterator_tag&) { - // check if comparable - bool __dummy(__i1==__i2); - return (__dummy==__dummy); -} - -template -inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, const forward_iterator_tag&) { - // check if comparable - bool __dummy(__i1==__i2); - return (__dummy==__dummy); -} - -template -inline bool _STLP_CALL __valid_range(const _Iterator&,const _Iterator&, const input_iterator_tag&) { - return true; -} - -template -inline bool _STLP_CALL __valid_range(const _Iterator&,const _Iterator&, const output_iterator_tag&) { - return true; -} - -template -inline bool _STLP_CALL __valid_range(const _Iterator& __i1, const _Iterator& __i2) { - return __valid_range(__i1,__i2,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)); -} - -// Note : that means in range [i1, i2]. -template -inline bool _STLP_CALL __in_range(const _Iterator& _It, const _Iterator& __i1, - const _Iterator& __i2) { - return __valid_range(__i1,_It,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)) && - __valid_range(_It,__i2,_STLP_ITERATOR_CATEGORY(_It, _Iterator)); -} - -template -inline bool _STLP_CALL __in_range(const _Iterator& __first, const _Iterator& __last, - const _Iterator& __start, const _Iterator& __finish) { - return __valid_range(__first,__last,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) && - __valid_range(__start,__first,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) && - __valid_range(__last,__finish,_STLP_ITERATOR_CATEGORY(__last, _Iterator)); -} - -//========================================================== - - -class _STLP_CLASS_DECLSPEC __owned_link { -public: - - __owned_link() : _M_owner(0) {} - __owned_link(const __owned_list* __c) : _M_owner(0), _M_next(0) { - __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__c), this); - } - __owned_link(const __owned_link& __rhs): _M_owner(0) { - __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__rhs._M_owner), this); - } - __owned_link& operator=(const __owned_link& __rhs) { - __owned_list* __new_owner = __CONST_CAST(__owned_list*,__rhs._M_owner); - __owned_list* __old_owner = _M_owner; - if ( __old_owner != __new_owner ) { - __stl_debugger::_M_detach(__old_owner, this); - __stl_debugger::_M_attach(__new_owner, this); - } - return *this; - } - ~__owned_link() { - __stl_debugger::_M_detach(_M_owner, this); - _Invalidate(); - } - - const __owned_list* _Owner() const { - return _M_owner; - } - __owned_list* _Owner() { - return _M_owner; - } - void _Set_owner(const __owned_list* __o) { - _M_owner= __CONST_CAST(__owned_list*,__o); - } - bool _Valid() const { - return _M_owner !=0; - } - - void _Invalidate() { _M_owner=0; _M_next = 0; } - void _Link_to_self() { _M_next= 0; } - - __owned_link* _Next() { return _M_next; } - const __owned_link* _Next() const { return _M_next; } - -public: - __owned_list* _M_owner; - __owned_link* _M_next; -}; - - -class _STLP_CLASS_DECLSPEC __owned_list { -public: - __owned_list(const void* __o) { - // fprintf(stderr, "__owned_list(): %p\n",(void*)this); - _M_node._M_owner = __CONST_CAST(__owned_list*, __REINTERPRET_CAST(const __owned_list*,__o)); - _M_node._M_next=0; - } - ~__owned_list() { - // fprintf(stderr, "~__owned_list(): %p\n",(void*)this); - _Invalidate_all(); - // that prevents detach - _M_node._Invalidate(); - } - const void* _Owner() const { - return (const void*)_M_node._M_owner; - } - void* _Owner() { - return (void*)_M_node._M_owner; - } - bool _Valid() const { - return _M_node._M_owner!=0; - } - void _Invalidate() { _M_node._M_owner=0; } - - __owned_link* _First() { return _M_node._Next(); } - __owned_link* _Last() { return 0 ; } - - const __owned_link* _First() const { return (__owned_link*)_M_node._M_next; } - const __owned_link* _Last() const { return 0 ;} - - void _Verify() const { - __stl_debugger::_Verify(this); - } - - void _Swap_owners(__owned_list& __y) { - __stl_debugger::_Swap_owners(*this, __y); - } - - void _Invalidate_all() { - __stl_debugger::_Invalidate_all(this); - } - - mutable __owned_link _M_node; - mutable _STLP_mutex _M_lock; - -private: - // should never be called, should be left undefined, - // but some compilers complain about it ;( - __owned_list(const __owned_list&){} - void operator=(const __owned_list&) {} - - friend class __owned_link; - friend struct __stl_debug_engine; -}; - - -//========================================================== - -// forward declaratioins - -template -bool _STLP_CALL __check_range(const _Iterator&, const _Iterator&); -template -bool _STLP_CALL __check_range(const _Iterator&, - const _Iterator&, const _Iterator&); -template -bool _STLP_CALL __check_range(const _Iterator&, const _Iterator& , - const _Iterator&, const _Iterator& ); - -template -void _STLP_CALL __invalidate_range(const __owned_list* __base, - const _Iterator& __first, - const _Iterator& __last); - -template -void _STLP_CALL __invalidate_iterator(const __owned_list* __base, - const _Iterator& __it); - -//============================================================ - -inline bool _STLP_CALL -__check_same_owner( const __owned_link& __i1, const __owned_link& __i2) { - return __stl_debugger::_Check_same_owner(__i1,__i2); -} -inline bool _STLP_CALL -__check_same_owner_or_null( const __owned_link& __i1, const __owned_link& __i2) { - return __stl_debugger::_Check_same_owner_or_null(__i1,__i2); -} - -template -inline bool _STLP_CALL __check_if_owner( const __owned_list* __owner, - const _Iterator& __it) { - return __stl_debugger::_Check_if_owner(__owner, (const __owned_link&)__it); -} - -_STLP_END_NAMESPACE - -# endif /* _STLP_DEBUG */ - -#if defined ( _STLP_ASSERTIONS ) - -# ifndef _STLP_ASSERT_MSG_TRAILER -# define _STLP_ASSERT_MSG_TRAILER -# endif - -// dwa 12/30/98 - if _STLP_DEBUG_MESSAGE is defined, the user can supply own definition. -# if !defined( _STLP_DEBUG_MESSAGE ) -# define __stl_debug_message __stl_debugger::_Message -# else - extern void __stl_debug_message(const char * format_str, ...); -# endif - -// fbp: if _STLP_DEBUG_TERMINATE is defined, the user can supply own definition. -# if !defined( _STLP_DEBUG_TERMINATE ) -# define __stl_debug_terminate __stl_debugger::_Terminate -# else - extern void __stl_debug_terminate(void); -# endif - -#endif - -# if !defined (_STLP_LINK_TIME_INSTANTIATION) -# include -# endif - -#endif /* DEBUG_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/msl_string.h --- a/epoc32/include/stdapis/stlport/stl/msl_string.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* - * Copyright (c) 1998 - * Mark of the Unicorn, Inc. - * - * Permission to use, copy, modify, distribute and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation. Mark of the Unicorn, Inc. makes no - * representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied warranty. - * - */ -#if defined( _STLP_USE_MSIPL ) && !defined( _STLP_MSL_STRING_H_ ) -#define _STLP_MSL_STRING_H_ - -//# define char_traits __msl_char_traits -# define basic_string __msl_basic_string -# define b_str_ref __msl_b_str_ref -# define basic_istream __msl_basic_istream -# define basic_ostream __msl_basic_ostream -# define string __msl_string -# define wstring __msl_wstring -# define iterator_traits __msl_iterator_traits - -namespace std -{ - template class basic_istream; - template class basic_ostream; -} - -# include _STLP_NATIVE_HEADER(string) -// # undef char_traits -# undef basic_string -# undef b_str_ref -# undef basic_istream -# undef basic_ostream -# undef string -# undef wstring -# undef iterator_traits - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/stl/type_traits.h --- a/epoc32/include/stdapis/stlport/stl/type_traits.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,418 +0,0 @@ -/* - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_TYPE_TRAITS_H -#define _STLP_TYPE_TRAITS_H - -/* -This header file provides a framework for allowing compile time dispatch -based on type attributes. This is useful when writing template code. -For example, when making a copy of an array of an unknown type, it helps -to know if the type has a trivial copy constructor or not, to help decide -if a memcpy can be used. - -The class template __type_traits provides a series of typedefs each of -which is either __true_type or __false_type. The argument to -__type_traits can be any type. The typedefs within this template will -attain their correct values by one of these means: - 1. The general instantiation contain conservative values which work - for all types. - 2. Specializations may be declared to make distinctions between types. - 3. Some compilers (such as the Silicon Graphics N32 and N64 compilers) - will automatically provide the appropriate specializations for all - types. - -EXAMPLE: - -//Copy an array of elements which have non-trivial copy constructors -template void copy(T* source, T* destination, int n, __false_type); -//Copy an array of elements which have trivial copy constructors. Use memcpy. -template void copy(T* source, T* destination, int n, __true_type); - -//Copy an array of any type by using the most efficient copy mechanism -template inline void copy(T* source,T* destination,int n) { - copy(source, destination, n, - typename __type_traits::has_trivial_copy_constructor()); -} -*/ - -#ifdef __WATCOMC__ -# include -#endif - -_STLP_BEGIN_NAMESPACE - -struct __true_type {}; -struct __false_type {}; - - -template struct __bool2type { - typedef __false_type _Ret; -}; - -_STLP_TEMPLATE_NULL -struct __bool2type<1> { typedef __true_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct __bool2type<0> { typedef __false_type _Ret; }; - -// logical end of 3 predicated -template -struct _Land3 { - typedef __false_type _Ret; -}; - -_STLP_TEMPLATE_NULL -struct _Land3<__true_type, __true_type, __true_type> { - typedef __true_type _Ret; -}; - - -// Forward declarations. -template struct __type_traits; -template struct __type_traits_aux { - typedef __false_type has_trivial_default_constructor; - typedef __false_type has_trivial_copy_constructor; - typedef __false_type has_trivial_assignment_operator; - typedef __false_type has_trivial_destructor; - typedef __false_type is_POD_type; -}; - -_STLP_TEMPLATE_NULL -struct __type_traits_aux<0> { - typedef __false_type has_trivial_default_constructor; - typedef __false_type has_trivial_copy_constructor; - typedef __false_type has_trivial_assignment_operator; - typedef __false_type has_trivial_destructor; - typedef __false_type is_POD_type; -}; - -_STLP_TEMPLATE_NULL -struct __type_traits_aux<1> { - typedef __true_type has_trivial_default_constructor; - typedef __true_type has_trivial_copy_constructor; - typedef __true_type has_trivial_assignment_operator; - typedef __true_type has_trivial_destructor; - typedef __true_type is_POD_type; -}; - -# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS - -// Boris : simulation technique is used here according to Adobe Open Source License Version 1.0. -// Copyright 2000 Adobe Systems Incorporated and others. All rights reserved. -// Authors: Mat Marcus and Jesse Jones -// The original version of this source code may be found at -// http://opensource.adobe.com. - -struct _PointerShim { - // Since the compiler only allows at most one non-trivial - // implicit conversion we can make use of a shim class to - // be sure that IsPtr below doesn't accept classes with - // implicit pointer conversion operators - _PointerShim(const volatile void*); // no implementation -}; - -// These are the discriminating functions - -char _STLP_CALL _IsP(bool, _PointerShim); // no implementation is required -char* _STLP_CALL _IsP(bool, ...); // no implementation is required - -template -char _STLP_CALL _IsSameFun(bool, _Tp*, _Tp*); // no implementation is required -char* _STLP_CALL _IsSameFun(bool, ...); // no implementation is required - -template -struct _IsSame { - // boris : check! - static _Tp1* __null_rep1(); - static _Tp2* __null_rep2(); - enum { _Ret = (sizeof(_IsSameFun(false,__null_rep1(),__null_rep2())) == sizeof(char)) }; -}; - -template -struct _IsPtr { - - // This template meta function takes a type T - // and returns true exactly when T is a pointer. - // One can imagine meta-functions discriminating on - // other criteria. - static _Tp& __null_rep(); - enum { _Ret = (sizeof(_IsP(false,__null_rep())) == sizeof(char)) }; - -}; - -template -struct _IsPtrType { - enum { _Is = _IsPtr<_Tp>::_Ret } ; - typedef __bool2type< _Is > _BT; - typedef typename _BT::_Ret _Type; - static _Type _Ret() { return _Type(); } -}; - -template -struct _BothPtrType { - typedef __bool2type< _IsPtr<_Tp1>::_Ret> _B1; - typedef __bool2type< _IsPtr<_Tp2>::_Ret> _B2; - typedef typename _B1::_Ret _Type1; - typedef typename _B2::_Ret _Type2; - typedef typename _Land3<_Type1, _Type2, __true_type>::_Ret _Type; - static _Type _Ret() { return _Type(); } -}; - -// we make general case dependant on the fact the type is actually a pointer. - -template -struct __type_traits : __type_traits_aux<_IsPtr<_Tp>::_Ret> {}; - -# else - -template -struct __type_traits { - typedef __true_type this_dummy_member_must_be_first; - /* Do not remove this member. It informs a compiler which - automatically specializes __type_traits that this - __type_traits template is special. It just makes sure that - things work if an implementation is using a template - called __type_traits for something unrelated. */ - - /* The following restrictions should be observed for the sake of - compilers which automatically produce type specific specializations - of this class: - - You may reorder the members below if you wish - - You may remove any of the members below if you wish - - You must not rename members without making the corresponding - name change in the compiler - - Members you add will be treated like regular members unless - you add the appropriate support in the compiler. */ - typedef __false_type has_trivial_default_constructor; - typedef __false_type has_trivial_copy_constructor; - typedef __false_type has_trivial_assignment_operator; - typedef __false_type has_trivial_destructor; - typedef __false_type is_POD_type; -}; - - -template struct _IsPtr { enum { _Ret = 0 }; }; -template struct _IsPtrType { - static __false_type _Ret() { return __false_type();} -}; -template struct _BothPtrType { - static __false_type _Ret() { return __false_type();} -}; - -template -struct _IsSame { enum { _Ret = 0 }; }; - -// template -// struct _IsSameType { static __false_type _Ret() { return __false_type(); } }; - -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION -template struct _IsPtr<_Tp*> { enum { _Ret = 1 }; }; -template struct _IsPtrType<_Tp*> { - static __true_type _Ret() { return __true_type();} -}; -template struct _BothPtrType<_Tp1*, _Tp2*> { - static __true_type _Ret() { return __true_type();} -}; -template -struct _IsSame<_Tp, _Tp> { enum { _Ret = 1 }; }; -# endif - -# endif /* _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS */ - -// Provide some specializations. This is harmless for compilers that -// have built-in __types_traits support, and essential for compilers -// that don't. -#ifndef _STLP_NO_BOOL -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -#endif /* _STLP_NO_BOOL */ -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -#ifndef _STLP_NO_SIGNED_BUILTINS -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -# endif -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT) -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -#endif /* _STLP_HAS_WCHAR_T */ - -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; - -#ifdef _STLP_LONG_LONG -_STLP_TEMPLATE_NULL struct __type_traits<_STLP_LONG_LONG> : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -#endif /* _STLP_LONG_LONG */ - -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; - -# if !defined ( _STLP_NO_LONG_DOUBLE ) -_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; -# endif - -#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION -template struct __type_traits<_Tp*> : __type_traits_aux<1> {}; -#endif - -// The following could be written in terms of numeric_limits. -// We're doing it separately to reduce the number of dependencies. - -template struct _Is_integer { - typedef __false_type _Integral; -}; - -#ifndef _STLP_NO_BOOL - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -#endif /* _STLP_NO_BOOL */ - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -#ifndef _STLP_NO_SIGNED_BUILTINS - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; -#endif - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT) - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -#endif /* _STLP_HAS_WCHAR_T */ - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -#ifdef _STLP_LONG_LONG - -_STLP_TEMPLATE_NULL struct _Is_integer<_STLP_LONG_LONG> { - typedef __true_type _Integral; -}; - -_STLP_TEMPLATE_NULL struct _Is_integer { - typedef __true_type _Integral; -}; - -#endif /* _STLP_LONG_LONG */ - -template -struct _OKToMemCpy { - enum { _Same = _IsSame<_Tp1,_Tp2>::_Ret } ; - typedef typename __type_traits<_Tp1>::has_trivial_assignment_operator _Tr1; - typedef typename __type_traits<_Tp2>::has_trivial_assignment_operator _Tr2; - typedef typename __bool2type< _Same >::_Ret _Tr3; - typedef typename _Land3<_Tr1, _Tr2, _Tr3>::_Ret _Type; - static _Type _Ret() { return _Type(); } -}; - -template -inline _OKToMemCpy<_Tp1, _Tp2> _IsOKToMemCpy(_Tp1*, _Tp2*) { - return _OKToMemCpy<_Tp1, _Tp2>(); -} - -template -struct _IsPOD { - typedef typename __type_traits<_Tp>::is_POD_type _Type; - static _Type _Ret() { return _Type(); } -}; - -template -inline _IsPOD<_Tp> _Is_POD (_Tp*) { return _IsPOD<_Tp>(); } - -# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION -# if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || ( defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__) -# define _IS_POD_ITER(_It, _Tp) __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type() -# else -# define _IS_POD_ITER(_It, _Tp) typename __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type() -# endif -# else -# define _IS_POD_ITER(_It, _Tp) _Is_POD( _STLP_VALUE_TYPE( _It, _Tp ) )._Ret() -# endif - -# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG -// Those adaptors are here to fix common compiler bug regarding builtins: -// expressions like int k = int() should initialize k to 0 -template -inline _Tp __default_constructed_aux(_Tp*, const __false_type&) { - return _Tp(); -} -template -inline _Tp __default_constructed_aux(_Tp*, const __true_type&) { - return _Tp(0); -} - -template -inline _Tp __default_constructed(_Tp* __p) { - typedef typename _Is_integer<_Tp>::_Integral _Is_Integral; - return __default_constructed_aux(__p, _Is_Integral()); -} - -# define _STLP_DEFAULT_CONSTRUCTED(_TTp) __default_constructed((_TTp*)0) -# else -# define _STLP_DEFAULT_CONSTRUCTED(_TTp) _TTp() -# endif - -_STLP_END_NAMESPACE - -#endif /* __TYPE_TRAITS_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/string --- a/epoc32/include/stdapis/stlport/string Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STRING -# define _STLP_STRING - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x68 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#if defined (_STLP_USE_NATIVE_STRING) - -// as part of compiled runtime library depends on it. - -# if defined (_STLP_MSVC) -# include -# include -# endif - -# include _STLP_NATIVE_HEADER(string) - -# endif /* _STLP_USE_NATIVE_STRING */ - -# if !defined (_STLP_USE_NATIVE_STRING) || defined (_STLP_USE_OWN_NAMESPACE) -# include -# else -# include -# endif /*_STLP_USE_NATIVE_STRING */ - -// cleanup - -# if (_STLP_OUTERMOST_HEADER_ID == 0x68) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_STRING */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/utility --- a/epoc32/include/stdapis/stlport/utility Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_UTILITY -#define _STLP_UTILITY - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x75 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# ifndef __TYPE_TRAITS_H -# include -# endif - -# if !defined (_STLP_DEBUG_H) && (defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)) -# include -# endif - -# ifndef _STLP_INTERNAL_PAIR_H -# include -# endif - -# if defined (_STLP_IMPORT_VENDOR_STD) -# include _STLP_NATIVE_HEADER(utility) -# else -# if defined (_STLP_MSVC) && ! defined (_STLP_INTERNAL_ITERATOR_H) -# include -# endif -# endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x75) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_UTILITY */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/valarray --- a/epoc32/include/stdapis/stlport/valarray Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* - * Copyright (c) 1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_VALARRAY -#define _STLP_VALARRAY - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x76 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -#include - -#if defined (_STLP_WHOLE_VENDOR_STD) -# include _STLP_NATIVE_HEADER(valarray) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x76) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_VALARRAY */ - - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlport/vector --- a/epoc32/include/stdapis/stlport/vector Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -/* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_VECTOR -#define _STLP_VECTOR - -# ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x77 -# include -# endif - -# ifdef _STLP_PRAGMA_ONCE -# pragma once -# endif - -# ifndef _STLP_INTERNAL_ALGOBASE_H -# include -# endif - -#ifndef _STLP_INTERNAL_VECTOR_H -# include -#endif - -#if defined (_STLP_IMPORT_VENDOR_STD) && ! defined (_STLP_MINIMUM_IMPORT_STD) -# include _STLP_NATIVE_HEADER(vector) -#endif - -# if (_STLP_OUTERMOST_HEADER_ID == 0x77) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif - -#endif /* _STLP_VECTOR */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/algorithm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/algorithm Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,60 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_ALGORITHM +#define _STLP_ALGORITHM + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x1 +# include +# endif + +#ifdef _STLP_PRAGMA_ONCE +# pragma once +#endif + +# if ! defined (_STLP_USE_NAMESPACES) +// remove() conflicts, should always go first +# include +# endif + +# ifndef _STLP_INTERNAL_ALGO_H +# include +# endif + +#if defined (_STLP_IMPORT_VENDOR_STD) +# include _STLP_NATIVE_HEADER(algorithm) +#endif /* _STLP_IMPORT_VENDOR_STD */ + +# if (_STLP_OUTERMOST_HEADER_ID == 0x1 ) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_ALGORITHM */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/bitset --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/bitset Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,64 @@ +/* + * Copyright (c) 1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_BITSET +#define _STLP_BITSET + +// This implementation of bitset<> has a second template parameter, +// _WordT, which defaults to unsigned long. *YOU SHOULD NOT USE +// THIS FEATURE*. It is experimental, and it may be removed in +// future releases. + +// A bitset of size N, using words of type _WordT, will have +// N % (sizeof(_WordT) * CHAR_BIT) unused bits. (They are the high- +// order bits in the highest word.) It is a class invariant +// of class bitset<> that those unused bits are always zero. + +// Most of the actual code isn't contained in bitset<> itself, but in the +// base class _Base_bitset. The base class works with whole words, not with +// individual bits. This allows us to specialize _Base_bitset for the +// important special case where the bitset is only a single word. + +// The C++ standard does not define the precise semantics of operator[]. +// In this implementation the const version of operator[] is equivalent +// to test(), except that it does no range checking. The non-const version +// returns a reference to a bit, again without doing any range checking. + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x2 +# include +# endif + +#ifdef _STLP_PRAGMA_ONCE +# pragma once +#endif + +# include + +# if (_STLP_OUTERMOST_HEADER_ID == 0x2 ) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_BITSET */ + + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/cassert --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/cassert Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x103 +# include +# endif + + +# if defined (_STLP_USE_NEW_C_HEADERS) || defined (__IN_STLPORT_CASSERT) +# include _STLP_NATIVE_CPP_C_HEADER(cassert) +# else +# include +# endif + + +# if (_STLP_OUTERMOST_HEADER_ID == 0x103 ) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/ciso646 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/ciso646 Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_CISO646 +#define _STLP_CISO646 + +#ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x107 +# include +#endif + +#if !defined(_STLP_WCE_EVC3) && !defined (N_PLAT_NLM) && !defined (__BORLANDC__) +# if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(ciso646) +# else +# include +# endif /* _STLP_USE_NEW_C_HEADERS */ +#endif + +#if (_STLP_OUTERMOST_HEADER_ID == 0x107 ) +# include +# undef _STLP_OUTERMOST_HEADER_ID +#endif + +#endif /* _STLP_CISO646 */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/deque --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/deque Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_DEQUE +#define _STLP_DEQUE + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x22 +# include +# endif + +#ifdef _STLP_PRAGMA_ONCE +# pragma once +#endif + +#ifndef _STLP_INTERNAL_DEQUE_H +# include +#endif + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(deque) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x22) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_DEQUE */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/exception --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/exception Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,229 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +// This header exists solely for portability. Normally it just includes +// the native header . + +// The header contains low-level functions that interact +// with a compiler's exception-handling mechanism. It is assumed to +// be supplied with the compiler, rather than with the library, because +// it is inherently tied very closely to the compiler itself. + +// On platforms where does not exist, this header defines +// an exception base class. This is *not* a substitute for everything +// in , but it suffices to support a bare minimum of STL +// functionality. + + +# if !defined (_STLP_OUTERMOST_HEADER_ID) +# define _STLP_OUTERMOST_HEADER_ID 0x423 +# include +# elif (_STLP_OUTERMOST_HEADER_ID == 0x423) && ! defined (_STLP_DONT_POP_0x423) +# define _STLP_DONT_POP_0x423 +# endif + +#ifndef _STLP_EXCEPTION +#define _STLP_EXCEPTION + +# if ! defined (_STLP_NO_EXCEPTION_HEADER) + +# if defined ( _UNCAUGHT_EXCEPTION ) +# undef _STLP_INCOMPLETE_EXCEPTION_HEADER +# endif + +# if defined(_STLP_BROKEN_EXCEPTION_CLASS) +# define exception _STLP_NULLIFIED_BROKEN_EXCEPTION_CLASS +# define bad_exception _STLP_NULLIFIED_BROKEN_BAD_EXCEPTION_CLASS +# if defined (_STLP_NO_NEW_NEW_HEADER) +# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception.h) +# else +# include _STLP_NATIVE_CPP_RUNTIME_HEADER(Exception) +# endif +# undef exception +# undef bad_exception +# else + +#ifndef _STLP_NO_NEW_NEW_HEADER +#define _STLP_NO_NEW_NEW_HEADER +#endif + +# if defined (_STLP_NO_NEW_NEW_HEADER) +# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception.h) +# else +# include _STLP_NATIVE_CPP_RUNTIME_HEADER(exception) +# endif + +# endif + +# if defined (_STLP_MSVC) || defined (__ICL) +// dwa 02/04/00 - here I'm assuming that __ICL uses the same library headers as vc6. +// the header which ships with vc6 and is included by its native +// actually turns on warnings, so we have to turn them back off. +# include +# endif + + +# ifdef _STLP_USE_OWN_NAMESPACE + +_STLP_BEGIN_NAMESPACE + +#if !defined(_STLP_BROKEN_EXCEPTION_CLASS) +using _STLP_VENDOR_EXCEPT_STD::exception; +using _STLP_VENDOR_EXCEPT_STD::bad_exception; +#endif + +# if ! defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) + +// fbp : many platforms present strange mix of +// those in various namespaces +# if !defined(_STLP_VENDOR_UNEXPECTED_STD) +# define _STLP_VENDOR_UNEXPECTED_STD _STLP_VENDOR_EXCEPT_STD +# endif + +// weird errors +# if (! defined (__BORLANDC__)) || (defined (__STD_EXCEPTION) && defined (__RWSTD_EXCEPTION_SEEN) && defined ( _STLP_DONT_POP_0x423)) +using _STLP_VENDOR_UNEXPECTED_STD::unexpected; +using _STLP_VENDOR_UNEXPECTED_STD::unexpected_handler; +using _STLP_VENDOR_UNEXPECTED_STD::set_unexpected; +using _STLP_VENDOR_UNEXPECTED_STD::terminate; +using _STLP_VENDOR_UNEXPECTED_STD::terminate_handler; +using _STLP_VENDOR_UNEXPECTED_STD::set_terminate; +# endif + +# if !defined (_STLP_INCOMPLETE_EXCEPTION_HEADER) +using _STLP_VENDOR_UNEXPECTED_STD::uncaught_exception; +# endif + +# endif + +_STLP_END_NAMESPACE + +# endif /* _STLP_OWN_NAMESPACE */ + +#else /* _STLP_NO_EXCEPTION_HEADER */ + +// fbp : absence of usually means that those +// functions are not going to be called by compiler. +// Still, define them for the user. +#ifdef __SYMBIAN32__ +_STLP_BEGIN_NAMESPACE +#endif //__SYMBIAN32__ +typedef void (*unexpected_handler)(); +unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY; +void unexpected(); + +typedef void (*terminate_handler)(); +terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY; +void terminate(); + +bool uncaught_exception(); // not implemented under mpw as of Jan/1999 + +#ifdef __SYMBIAN32__ +_STLP_END_NAMESPACE +#endif //__SYMBIAN32__ + +#endif /* _STLP_NO_EXCEPTION_HEADER */ + +# if defined (_STLP_NO_EXCEPTION_HEADER) || defined(_STLP_BROKEN_EXCEPTION_CLASS) +# ifndef _STLP_EXCEPTION_H +# define _STLP_EXCEPTION_H + +_STLP_BEGIN_NAMESPACE + +// section 18.6.1 +#ifdef __SYMBIAN32__ +class exception +#else +class _STLP_CLASS_DECLSPEC exception +#endif + { + public: +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC exception() _STLP_NOTHROW; + _STLP_DECLSPEC virtual ~exception() _STLP_NOTHROW; + _STLP_DECLSPEC virtual const char* what() const _STLP_NOTHROW; +# else + exception() _STLP_NOTHROW {} + virtual ~exception() _STLP_NOTHROW {} + virtual const char* what() const _STLP_NOTHROW {return "class exception";} +# endif + }; + + + +// section 18.6.2.1 +#ifdef __SYMBIAN32__ +class bad_exception : public exception +#else +class _STLP_CLASS_DECLSPEC bad_exception : public exception +#endif + { + public: +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC bad_exception() _STLP_NOTHROW; + _STLP_DECLSPEC ~bad_exception() _STLP_NOTHROW; + _STLP_DECLSPEC const char* what() const _STLP_NOTHROW; +# else + bad_exception() _STLP_NOTHROW {} + ~bad_exception() _STLP_NOTHROW {} + const char* what() const _STLP_NOTHROW {return "class bad_exception";} +# endif + }; + +#ifdef __SYMBIAN32__ +// Give forward declaration, this should be supported by the stdard libraries from platform vendor. +typedef void (*unexpected_handler)(); +_STLP_DECLSPEC unexpected_handler set_unexpected(unexpected_handler f) _STLP_NOTHROW_INHERENTLY; +_STLP_DECLSPEC void unexpected(); + +typedef void (*terminate_handler)(); +_STLP_DECLSPEC terminate_handler set_terminate(terminate_handler f) _STLP_NOTHROW_INHERENTLY; +_STLP_DECLSPEC void terminate(); + +_STLP_DECLSPEC bool uncaught_exception(); // not implemented under mpw as of Jan/1999 + +#endif +_STLP_END_NAMESPACE + +#endif /* _STLP_NO_EXCEPTION_HEADER */ + +_STLP_BEGIN_NAMESPACE +// forward declaration +class __Named_exception; +_STLP_END_NAMESPACE +#endif /* _STLP_EXCEPTION_H */ + +#endif //_STLP_EXCEPTION + +# if (_STLP_OUTERMOST_HEADER_ID == 0x423) +# if ! defined (_STLP_DONT_POP_0x423) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif +# undef _STLP_DONT_POP_0x423 +# endif + + +// Local Variables: +// mode:C++ +// End: + + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/functional --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/functional Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_FUNCTIONAL +#define _STLP_FUNCTIONAL + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x27 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# if defined (_STLP_IMPORT_VENDOR_STD) +# include _STLP_NATIVE_HEADER(functional) +# endif + +# ifndef _STLP_INTERNAL_FUNCTION_H +# include +# endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x27) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_FUNCTIONAL */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/hash_map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/hash_map Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_HASH_MAP +#define _STLP_HASH_MAP + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x4028 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#include + +# if (_STLP_OUTERMOST_HEADER_ID == 0x4028) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_HASH_MAP */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/hash_set --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/hash_set Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_HASH_SET +#define _STLP_HASH_SET + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x4029 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#include + +# if (_STLP_OUTERMOST_HEADER_ID == 0x4029) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_HASH_SET */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/ios.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/ios.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_IOS_H +# define _STLP_IOS_H + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x1033 +# include +# endif + +# if defined (_STLP_OWN_IOSTREAMS) + +#ifdef __BORLANDC__ +# include +#else +# include +#endif + +# if defined (_STLP_USE_NAMESPACES) +# include +# endif + +# elif !defined (_STLP_USE_NO_IOSTREAMS) + +# include _STLP_NATIVE_OLD_STREAMS_HEADER(ios.h) +# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) +_STLP_BEGIN_NAMESPACE +using _STLP_OLD_IO_NAMESPACE::ios; +_STLP_END_NAMESPACE +# endif /* _STLP_USE_OWN_NAMESPACE */ + +# endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x1033) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_IOS_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/iso646.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/iso646.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#if !defined (_STLP_OUTERMOST_HEADER_ID) +# define _STLP_OUTERMOST_HEADER_ID 0x204 +# include +#elif (_STLP_OUTERMOST_HEADER_ID == 0x204) && !defined (_STLP_DONT_POP_HEADER_ID) +# define _STLP_DONT_POP_HEADER_ID +#endif + +/* evc3 doesn't have iso646.h */ +#if !defined (_STLP_WCE_EVC3) && !defined (N_PLAT_NLM) && !defined (__BORLANDC__) +# include _STLP_NATIVE_C_HEADER(iso646.h) +#endif + +#if (_STLP_OUTERMOST_HEADER_ID == 0x204) +# if ! defined (_STLP_DONT_POP_HEADER_ID) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif +# undef _STLP_DONT_POP_HEADER_ID +#endif + +/* Local Variables: + * mode:C++ + * End: + */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/istream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/istream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,63 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_ISTREAM_H +# define _STLP_ISTREAM_H + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x2037 +# include +# endif + +# if defined (_STLP_OWN_IOSTREAMS) + +# include + +# ifndef _STLP_HAS_NO_NAMESPACES +# ifdef _STLP_BROKEN_USING_DIRECTIVE +using namespace _STLP_STD; +# else +using _STLP_STD::basic_istream; +using _STLP_STD::basic_iostream; +using _STLP_STD::istream; +using _STLP_STD::iostream; +using _STLP_STD::ios; +# ifndef _STLP_NO_WCHAR_T +using _STLP_STD::wistream; +using _STLP_STD::wiostream; +# endif +using _STLP_STD::ws; +# endif +# endif + +# elif !defined (_STLP_USE_NO_IOSTREAMS) + +# include _STLP_NATIVE_OLD_STREAMS_HEADER(istream.h) + +# if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) +_STLP_BEGIN_NAMESPACE +using _STLP_OLD_IO_NAMESPACE::istream; +_STLP_END_NAMESPACE +# endif /* _STLP_USE_OWN_NAMESPACE */ + +# endif /* _STLP_OWN_IOSTREAMS */ + +# if (_STLP_OUTERMOST_HEADER_ID == 0x2037) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_ISTREAM_H */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/iterator --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/iterator Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_ITERATOR +#define _STLP_ITERATOR + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x38 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#if defined (_STLP_IMPORT_VENDOR_STD) +# include _STLP_NATIVE_HEADER(iterator) +#endif /* IMPORT */ + +# ifndef _STLP_INTERNAL_ITERATOR_H +# include +# endif + +# ifndef _STLP_INTERNAL_STREAM_ITERATOR_H +# include +# endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x38) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_ITERATOR */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/limits --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/limits Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_LIMITS +#define _STLP_LIMITS + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x39 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# ifndef _STLP_LIMITS_H +# include +# endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x39) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_LIMITS */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/list --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/list Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_LIST +#define _STLP_LIST + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x40 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#ifndef _STLP_INTERNAL_LIST_H +# include +#endif + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(list) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x40) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_LIST */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/map Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_MAP +#define _STLP_MAP + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x43 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#include + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(map) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x43) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_MAP */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/mem.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/mem.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +// Boris : highly questionable header for BC++ + +#ifndef _STLP_mem_h + +# if !defined (_STLP_OUTERMOST_HEADER_ID) +# define _STLP_OUTERMOST_HEADER_ID 0x245 +# include +# elif (_STLP_OUTERMOST_HEADER_ID == 0x245) && ! defined (_STLP_DONT_POP_0x245) +# define _STLP_DONT_POP_0x245 +# endif + +# if (__BORLANDC__ > 0x530) && !defined(__linux__) +# include +# endif + +# undef __USING_CNAME__ + +#ifdef __SYMBIAN32__ +# include +#else +# include _STLP_NATIVE_C_HEADER(mem.h) +#endif + + +# define _STLP_mem_h 1 + +# if (_STLP_OUTERMOST_HEADER_ID == 0x245) +# if ! defined (_STLP_DONT_POP_0x245) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif +# undef _STLP_DONT_POP_0x245 +# endif + +#endif /* _STLP_mem_h */ + +// #endif /* NATIVE */ +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/memory --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/memory Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_MEMORY +# define _STLP_MEMORY + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x46 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# ifndef _STLP_INTERNAL_ALLOC_H +# include +# endif + +# ifndef _STLP_INTERNAL_TEMPBUF_H +# include +# endif + +# ifndef _STLP_INTERNAL_RAW_STORAGE_ITER_H +# include +# endif + +# include + +# if defined (_STLP_IMPORT_VENDOR_STD) + +# if defined (__MSL__) +# include _STLP_NATIVE_HEADER(limits) +# endif + +# include _STLP_NATIVE_HEADER(memory) + +# if defined (__MSL__) && (__MSL__ >= 0x2405 && __MSL__ < 0x5201) +/* 980401 vss MSL 2.4 Pro 3 Release */ +# include +# endif + +# endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x46) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_MEMORY */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/pthread_alloc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/pthread_alloc Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,49 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_PTHREAD_ALLOC +#define _STLP_PTHREAD_ALLOC + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x52 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# include + +# if (_STLP_OUTERMOST_HEADER_ID == 0x52) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_PTHREAD_ALLOC */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/queue --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/queue Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_QUEUE +#define _STLP_QUEUE + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x53 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#ifndef _STLP_INTERNAL_QUEUE_H +# include +#endif + +#ifndef _STLP_INTERNAL_FUNCTION_H +# include +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x53) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_QUEUE */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/rope --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/rope Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef _STLP_ROPE +#define _STLP_ROPE + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x54 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# include + +# if (_STLP_OUTERMOST_HEADER_ID == 0x54) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_ROPE */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/set --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/set Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,53 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_SET +#define _STLP_SET + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x55 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#include + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(set) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x55) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_SET */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/slist --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/slist Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,44 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _STLP_SLIST +#define _STLP_SLIST + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x58 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#ifndef _STLP_INTERNAL_SLIST_H +# include +#endif + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(slist) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x58) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_SLIST */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stack --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stack Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,55 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STACK +#define _STLP_STACK + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x60 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#ifndef _STLP_INTERNAL_STACK_H +#include +#endif + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(stack) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x60) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_STACK */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stdexcept --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stdexcept Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,290 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + +# if !defined (_STLP_OUTERMOST_HEADER_ID) +# define _STLP_OUTERMOST_HEADER_ID 0x63 +# include +# elif (_STLP_OUTERMOST_HEADER_ID == 0x63) && ! defined (_STLP_DONT_POP_0x63) +# define _STLP_DONT_POP_0x63 +# endif + +#ifndef _STLP_STDEXCEPT +#define _STLP_STDEXCEPT 1 + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#if defined (_STLP_USE_TRAP_LEAVE) + +enum { + STDEX_bad_alloc = -10000, + STDEX_logic_error = -10001, + STDEX_runtime_error = -10002, + STDEX_domain_error = -10003, + STDEX_invalid_argument = -10004, + STDEX_length_error = -10005, + STDEX_out_of_range = -10006, + STDEX_range_error = -10007, + STDEX_overflow_error = -10008, + STDEX_underflow_error = -10009 +}; + +// User may override this +#ifndef STDEX_REPORT_EXCEPTION +# define STDEX_REPORT_EXCEPTION(x) +#endif + +#endif + +# if !defined(_STLP_STDEXCEPT_SEEN) && \ + (!defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE)) + +# define _STLP_STDEXCEPT_SEEN 1 + +# include + +#if defined(_STLP_USE_EXCEPTIONS) || \ + !(defined(_MIPS_SIM) && defined(_ABIO32) && _MIPS_SIM == _ABIO32) + +# include + +#ifndef _STLP_INTERNAL_ALLOC_H +# include +#endif + +#ifndef _STLP_STRING_FWD_H +# include +#endif + +# define _STLP_OWN_STDEXCEPT 1 + +_STLP_BEGIN_NAMESPACE + +# if ! defined (_STLP_NO_EXCEPTION_HEADER) +# if !defined(_STLP_EXCEPTION_BASE) && !defined(_STLP_BROKEN_EXCEPTION_CLASS) && defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE) +using _STLP_VENDOR_EXCEPT_STD::exception; +# endif +# endif +# define _STLP_EXCEPTION_BASE exception + +#ifdef __SYMBIAN32__ +class __Named_exception : public _STLP_EXCEPTION_BASE { +#else +class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE { +#endif //__SYMBIAN32__ +public: + _STLP_DECLSPEC __Named_exception(const string& __str) +# ifdef _STLP_OWN_IOSTREAMS + ; + _STLP_DECLSPEC const char* what() const _STLP_NOTHROW_INHERENTLY; + _STLP_DECLSPEC ~__Named_exception() _STLP_NOTHROW_INHERENTLY; +# else + { + strncpy(_M_name, __get_c_string(__str), _S_bufsize); + _M_name[_S_bufsize - 1] = '\0'; + } + const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; } +# endif + +private: + enum { _S_bufsize = 256 }; + char _M_name[_S_bufsize]; +}; + +#ifdef __SYMBIAN32__ +class logic_error : public __Named_exception { +#else +class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception { +#endif +public: + _STLP_DECLSPEC logic_error(const string& __s) +#ifdef __SYMBIAN32__ + ; +#else + : __Named_exception(__s) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~logic_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class runtime_error : public __Named_exception { +#else +class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception { +#endif +public: + _STLP_DECLSPEC runtime_error(const string& __s) +#ifdef __SYMBIAN32__ + ; +#else + : __Named_exception(__s) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~runtime_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class domain_error : public logic_error { +#else +class _STLP_CLASS_DECLSPEC domain_error : public logic_error { +#endif +public: + _STLP_DECLSPEC domain_error(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : logic_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~domain_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class invalid_argument : public logic_error { +#else +class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error { +#endif +public: + _STLP_DECLSPEC invalid_argument(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : logic_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~invalid_argument() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class length_error : public logic_error { +#else +class _STLP_CLASS_DECLSPEC length_error : public logic_error { +#endif +public: + _STLP_DECLSPEC length_error(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : logic_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~length_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class out_of_range : public logic_error { +#else +class _STLP_CLASS_DECLSPEC out_of_range : public logic_error { +#endif +public: + _STLP_DECLSPEC out_of_range(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : logic_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~out_of_range() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class range_error : public runtime_error { +#else +class _STLP_CLASS_DECLSPEC range_error : public runtime_error { +#endif +public: + _STLP_DECLSPEC range_error(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : runtime_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~range_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class overflow_error : public runtime_error { +#else +class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error { +#endif +public: + _STLP_DECLSPEC overflow_error(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : runtime_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~overflow_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +#ifdef __SYMBIAN32__ +class underflow_error : public runtime_error { +#else +class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error { +#endif +public: + _STLP_DECLSPEC underflow_error(const string& __arg) +#ifdef __SYMBIAN32__ + ; +#else + : runtime_error(__arg) {} +#endif +# ifdef _STLP_OWN_IOSTREAMS + _STLP_DECLSPEC ~underflow_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +_STLP_END_NAMESPACE + +#endif /* Not o32, and no exceptions */ +# endif /* _STLP_STDEXCEPT_SEEN */ + + +#if defined (_STLP_USE_NATIVE_STDEXCEPT) +# include _STLP_NATIVE_HEADER(stdexcept) +# endif + +#endif /* _STLP_STDEXCEPT */ + +# if (_STLP_OUTERMOST_HEADER_ID == 0x63) +# if ! defined (_STLP_DONT_POP_0x63) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif +# undef _STLP_DONT_POP_0x63 +# endif + + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stdiostream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stdiostream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,10 @@ +#ifndef _STLP_misc_stdiostream_h +# define _STLP_misc_stdiostream_h +# if (__SUNPRO_CC >= 0x500 ) +# include <../CCios/stdiostream.h> +# else if defined (__SUNPRO_CC) +# include <../CC/stdiostream.h> +# else +# error "This file is for SUN CC only. Please remove it if it causes any harm for other compilers." +# endif +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_abbrevs.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_abbrevs.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +/* + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_ABBREVS_H +# define _STLP_INTERNAL_ABBREVS_H + +// ugliness is intentional - to reduce conflicts +# define input_iterator_tag _In__ItT +# define output_iterator_tag _Ou__ItT +# define bidirectional_iterator_tag _Bd__ItT +# define random_access_iterator_tag _Ra__ItT +# define input_iterator _In__It +# define output_iterator _Ou__It +# define bidirectional_iterator _Bd__It +# define random_access_iterator _Ra__It +# define reverse_bidirectional_iterator _rBd__It +# define reverse_iterator _r__It +# define back_insert_iterator _bI__It +# define front_insert_iterator _fI__It +# define raw_storage_iterator _rS__It +# define _Const_traits _C_Tr +# define _Nonconst_traits _N_Tr + +// ugliness is intentional - to reduce conflicts probability +# define __malloc_alloc M__A +# define __node_alloc D__A +# define __new_alloc N__A +# define __debug_alloc G__A + +# define __deque_iterator _dQ__It +# define _Buf_traits _dQ__BTr +# define _Deque_iterator _Dq__It + +# define _Select1st _S1st +# define _Select2nd _S2nd + +# define _Hashtable_iterator _hT__It +# define _Hashtable_const_iterator _hT__cIt +# define _Hashtable_node _hT__N +# define _Hashtable_base _hT__B +# define _Ht_iterator _Ht_It + +# define __list_iterator _L__It +# define __slist_iterator _SL__It + +# define _Rb_tree_node_base _rbT__NB +# define _Rb_tree_node _rbT__N +# define _Rb_base_iterator _rbTB__It +# define _Rb_tree_base_iterator _rbT__It +# define _Rb_tree_base _rbT__B + +#endif + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_algo.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_algo.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1934 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_ALGO_C +# define _STLP_ALGO_C + +# if !defined (_STLP_INTERNAL_ALGO_H) +# include +# endif + +_STLP_BEGIN_NAMESPACE + +template +void __merge_without_buffer(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2, + _Compare __comp); + + +template +_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, + _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, + _BidirectionalIter2 __last2, + _BidirectionalIter3 __result, + _Compare __comp); + +template +# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 )) +inline +# endif +const _Tp& __median(const _Tp& __a, const _Tp& __b, const _Tp& __c) { + if (__a < __b) + if (__b < __c) + return __b; + else if (__a < __c) + return __c; + else + return __a; + else if (__a < __c) + return __a; + else if (__b < __c) + return __c; + else + return __b; +} + +template +# if !(defined (__SUNPRO_CC) && (__SUNPRO_CC < 0x420 )) +inline +# endif +const _Tp& +__median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp) { + if (__comp(__a, __b)) + if (__comp(__b, __c)) + return __b; + else if (__comp(__a, __c)) + return __c; + else + return __a; + else if (__comp(__a, __c)) + return __a; + else if (__comp(__b, __c)) + return __c; + else + return __b; +} + +template +_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + // Test for empty ranges + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + // Test for a pattern of length 1. + _ForwardIter2 __tmp(__first2); + ++__tmp; + if (__tmp == __last2) + return find(__first1, __last1, *__first2); + + // General case. + _ForwardIter2 __p1 = __first2; + ++__p1; + + _ForwardIter1 __current = __first1; + + while (__first1 != __last1) { + __first1 = find(__first1, __last1, *__first2); + if (__first1 == __last1) + return __last1; + + _ForwardIter2 __p = __p1; + __current = __first1; + if (++__current == __last1) + return __last1; + + while (*__current == *__p) { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + + ++__first1; + } + return __first1; +} + +// search_n. Search for __count consecutive copies of __val. + +template +_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, + _Integer __count, const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__count <= 0) + return __first; + else { + __first = find(__first, __last, __val); + while (__first != __last) { + _Integer __n = __count - 1; + _ForwardIter __i = __first; + ++__i; + while (__i != __last && __n != 0 && *__i == __val) { + ++__i; + --__n; + } + if (__n == 0) + return __first; + else + __first = find(__i, __last, __val); + } + return __last; + } +} + +template +_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, + _Integer __count, const _Tp& __val, + _BinaryPred __binary_pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__count <= 0) + return __first; + else { + while (__first != __last) { + if (__binary_pred(*__first, __val)) + break; + ++__first; + } + while (__first != __last) { + _Integer __n = __count - 1; + _ForwardIter __i = __first; + ++__i; + while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) { + ++__i; + --__n; + } + if (__n == 0) + return __first; + else { + while (__i != __last) { + if (__binary_pred(*__i, __val)) + break; + ++__i; + } + __first = __i; + } + } + return __last; + } +} + +template +_ForwardIter1 +find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + return __find_end(__first1, __last1, __first2, __last2, +# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) + _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1), + _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2), +# else + forward_iterator_tag(), + forward_iterator_tag(), +# endif + __equal_to(_STLP_VALUE_TYPE(__first1, _ForwardIter1)) + ); +} + +// unique and unique_copy +template +_STLP_INLINE_LOOP _OutputIterator +__unique_copy(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, + _BinaryPredicate __binary_pred, _Tp*) { + _Tp __val = *__first; + _STLP_PUSH_STACK_ITEM(_Tp, &__val) + *__result = __val; + while (++__first != __last) + if (!__binary_pred(__val, *__first)) { + __val = *__first; + *++__result = __val; + } + return ++__result; +} + +template +inline _OutputIter +__unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result, + _BinaryPredicate __binary_pred, const output_iterator_tag &) { + return __unique_copy(__first, __last, __result, __binary_pred, _STLP_VALUE_TYPE(__first, _InputIter)); +} + +template +_STLP_INLINE_LOOP _ForwardIter +__unique_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, + _BinaryPredicate __binary_pred, const forward_iterator_tag &) { + *__result = *__first; + while (++__first != __last) + if (!__binary_pred(*__result, *__first)) *++__result = *__first; + return ++__result; +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline _BidirectionalIterator +__unique_copy(_InputIterator __first, _InputIterator __last, + _BidirectionalIterator __result, _BinaryPredicate __binary_pred, + const bidirectional_iterator_tag &) { + return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag()); +} + +template +inline _RandomAccessIterator +__unique_copy(_InputIterator __first, _InputIterator __last, + _RandomAccessIterator __result, _BinaryPredicate __binary_pred, + const random_access_iterator_tag &) { + return __unique_copy(__first, __last, __result, __binary_pred, forward_iterator_tag()); +} +# endif /* _STLP_NONTEMPL_BASE_MATCH_BUG */ + + +template +_OutputIter +unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __result; + return __unique_copy(__first, __last, __result, __equal_to(_STLP_VALUE_TYPE(__first, _InputIter)), + _STLP_ITERATOR_CATEGORY(__result, _OutputIter)); +} + +template +_OutputIter +unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result, + _BinaryPredicate __binary_pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __result; + return __unique_copy(__first, __last, __result, __binary_pred, + _STLP_ITERATOR_CATEGORY(__result, _OutputIter)); +} + +// rotate and rotate_copy, and their auxiliary functions + +template +_ForwardIter __rotate(_ForwardIter __first, + _ForwardIter __middle, + _ForwardIter __last, + _Distance*, + const forward_iterator_tag &) { + if (__first == __middle) + return __last; + if (__last == __middle) + return __first; + + _ForwardIter __first2 = __middle; + do { + swap(*__first++, *__first2++); + if (__first == __middle) + __middle = __first2; + } while (__first2 != __last); + + _ForwardIter __new_middle = __first; + + __first2 = __middle; + + while (__first2 != __last) { + swap (*__first++, *__first2++); + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + + return __new_middle; +} + +template +_BidirectionalIter __rotate(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance*, + const bidirectional_iterator_tag &) { + if (__first == __middle) + return __last; + if (__last == __middle) + return __first; + + __reverse(__first, __middle, bidirectional_iterator_tag()); + __reverse(__middle, __last, bidirectional_iterator_tag()); + + while (__first != __middle && __middle != __last) + swap (*__first++, *--__last); + + if (__first == __middle) { + __reverse(__middle, __last, bidirectional_iterator_tag()); + return __last; + } + else { + __reverse(__first, __middle, bidirectional_iterator_tag()); + return __first; + } +} + +template +_RandomAccessIter __rotate(_RandomAccessIter __first, + _RandomAccessIter __middle, + _RandomAccessIter __last, + _Distance *, _Tp *) { + + _Distance __n = __last - __first; + _Distance __k = __middle - __first; + _Distance __l = __n - __k; + _RandomAccessIter __result = __first + (__last - __middle); + + if (__k==0) /* __first == middle */ + return __last; + + if (__k == __l) { + swap_ranges(__first, __middle, __middle); + return __result; + } + + _Distance __d = __gcd(__n, __k); + + for (_Distance __i = 0; __i < __d; __i++) { + _Tp __tmp = *__first; + _STLP_PUSH_STACK_ITEM(_Tp, &__tmp) + _RandomAccessIter __p = __first; + + if (__k < __l) { + for (_Distance __j = 0; __j < __l/__d; __j++) { + if (__p > __first + __l) { + *__p = *(__p - __l); + __p -= __l; + } + + *__p = *(__p + __k); + __p += __k; + } + } + + else { + for (_Distance __j = 0; __j < __k/__d - 1; __j ++) { + if (__p < __last - __k) { + *__p = *(__p + __k); + __p += __k; + } + + *__p = * (__p - __l); + __p -= __l; + } + } + + *__p = __tmp; + ++__first; + } + + return __result; +} + +template +inline _RandomAccessIter +__rotate(_RandomAccessIter __first, _RandomAccessIter __middle, _RandomAccessIter __last, + _Distance * __dis, const random_access_iterator_tag &) { + return __rotate(__first, __middle, __last, + __dis, _STLP_VALUE_TYPE(__first, _RandomAccessIter)); +} + +template +_ForwardIter +rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __middle)) + _STLP_DEBUG_CHECK(__check_range(__middle, __last)) + return __rotate(__first, __middle, __last, + _STLP_DISTANCE_TYPE(__first, _ForwardIter), + _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); +} + +// Return a random number in the range [0, __n). This function encapsulates +// whether we're using rand (part of the standard C library) or lrand48 +// (not standard, but a much better choice whenever it's available). + +template +inline _Distance __random_number(_Distance __n) { +#ifdef _STLP_NO_DRAND48 + return rand() % __n; +#else + return lrand48() % __n; +#endif +} + +template +void random_shuffle(_RandomAccessIter __first, + _RandomAccessIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + iter_swap(__i, __first + __random_number((__i - __first) + 1)); +} + +template +void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last, + _RandomNumberGenerator& __rand) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + iter_swap(__i, __first + __rand((__i - __first) + 1)); +} + +# ifndef _STLP_NO_EXTENSIONS + +// random_sample and random_sample_n (extensions, not part of the standard). + +template +_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, + _OutputIter __stl_out, const _Distance __n) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _Distance __remaining = distance(__first, __last); + _Distance __m = (min) (__n, __remaining); + + while (__m > 0) { + if (__random_number(__remaining) < __m) { + *__stl_out = *__first; + ++__stl_out; + --__m; + } + + --__remaining; + ++__first; + } + return __stl_out; +} + + +template +_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, + _OutputIter __stl_out, const _Distance __n, + _RandomNumberGenerator& __rand) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _Distance __remaining = distance(__first, __last); + _Distance __m = (min) (__n, __remaining); + + while (__m > 0) { + if (__rand(__remaining) < __m) { + *__stl_out = *__first; + ++__stl_out; + --__m; + } + + --__remaining; + ++__first; + } + return __stl_out; +} + +template +_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __stl_out, + const _Distance __n) +{ + _Distance __m = 0; + _Distance __t = __n; + for ( ; __first != __last && __m < __n; ++__m, ++__first) + __stl_out[__m] = *__first; + + while (__first != __last) { + ++__t; + _Distance __M = __random_number(__t); + if (__M < __n) + __stl_out[__M] = *__first; + ++__first; + } + + return __stl_out + __m; +} + +template +_RandomAccessIter __random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __stl_out, + _RandomNumberGenerator& __rand, + const _Distance __n) +{ + _Distance __m = 0; + _Distance __t = __n; + for ( ; __first != __last && __m < __n; ++__m, ++__first) + __stl_out[__m] = *__first; + + while (__first != __last) { + ++__t; + _Distance __M = __rand(__t); + if (__M < __n) + __stl_out[__M] = *__first; + ++__first; + } + + return __stl_out + __m; +} + +template +_RandomAccessIter +random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out_first, _RandomAccessIter __out_last) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _STLP_DEBUG_CHECK(__check_range(__out_first, __out_last)) + return __random_sample(__first, __last, + __out_first, __out_last - __out_first); +} + +template +_RandomAccessIter +random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out_first, _RandomAccessIter __out_last, + _RandomNumberGenerator& __rand) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _STLP_DEBUG_CHECK(__check_range(__out_first, __out_last)) + return __random_sample(__first, __last, + __out_first, __rand, + __out_last - __out_first); +} + +# endif /* _STLP_NO_EXTENSIONS */ + +// partition, stable_partition, and their auxiliary functions + +template +_STLP_INLINE_LOOP _ForwardIter __partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, + const forward_iterator_tag &) { + if (__first == __last) return __first; + + while (__pred(*__first)) + if (++__first == __last) return __first; + + _ForwardIter __next = __first; + + while (++__next != __last) + if (__pred(*__next)) { + swap(*__first, *__next); + ++__first; + } + return __first; +} + +/* bug fix- start*/ + +template +_ForwardIter +__rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __middle)) + _STLP_DEBUG_CHECK(__check_range(__middle, __last)) + return __rotate_aux(__first, __middle, __last, + _STLP_DISTANCE_TYPE(__first, _ForwardIter), + _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); +} + +template +_ForwardIter __rotate_aux(_ForwardIter __first, + _ForwardIter __middle, + _ForwardIter __last, + _Distance*, + const forward_iterator_tag &) { + if (__first == __middle) + return __last; + if (__last == __middle) + return __first; + + _ForwardIter __first2 = __middle; + do { + swap(*__first++, *__first2++); + if (__first == __middle) + __middle = __first2; + } while (__first2 != __last); + + _ForwardIter __new_middle = __first; + + __first2 = __middle; + + while (__first2 != __last) { + swap (*__first++, *__first2++); + if (__first == __middle) + __middle = __first2; + else if (__first2 == __last) + __first2 = __middle; + } + + return __new_middle; +} + + +template +_ForwardIter __stable_partition_adaptive(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, _Distance __buffer_size, + bool __pred_of_first, bool __pred_of_before_last) { + if (__len <= __buffer_size) { + _ForwardIter __result1 = __first; + _Pointer __result2 = __buffer; + if ((__first != __last) && (!__pred_of_first || __pred(*__first))) { + *__result2 = *__first; + ++__result2; ++__first; --__len; + } + for (; __first != __last ; ++__first, --__len) { + if (((__len == 1) && (__pred_of_before_last || __pred(*__first))) || + ((__len != 1) && __pred(*__first))){ + *__result1 = *__first; + ++__result1; + } + else { + *__result2 = *__first; + ++__result2; + } + } + copy(__buffer, __result2, __result1); + return __result1; + } + else { + _ForwardIter __middle = __first; + _Distance __half_len = __len / 2; + advance(__middle, __half_len); + return __rotate(__stable_partition_adaptive( + __first, __middle, __pred, + __half_len, __buffer, __buffer_size, + __pred_of_first, false), + __middle, + __stable_partition_adaptive( + __middle, __last, __pred, + __len - __half_len, __buffer, __buffer_size, + true, __pred_of_before_last)); + } +} + + +template +_ForwardIter __inplace_stable_partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, _Distance __len, + bool __pred_of_first, bool __pred_of_before_last) { + if (__len == 1) + return (__pred_of_first && (__pred_of_before_last || __pred(*__first))) ? __last : __first; + _ForwardIter __middle = __first; + _Distance __half_len = __len / 2; + advance(__middle, __half_len); + return __rotate(__inplace_stable_partition(__first, __middle, __pred, __half_len, __pred_of_first, false), + __middle, + __inplace_stable_partition(__middle, __last, __pred, __len - __half_len, true, __pred_of_before_last)); +} + + + +template +_ForwardIter +stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { + _STLP_DEBUG_CHECK(_STLP_PRIV __check_range(__first, __last)) + for (;;) { + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + } + return __stable_partition_aux(__first, __last, __pred, + _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); +} + + +template +inline _ForwardIter +__stable_partition_aux_aux(_ForwardIter __first, _ForwardIter __last, + _Predicate __pred, _Tp*, _Distance*, bool __pred_of_before_last = false) { + _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last); + return (__buf.size() > 0) ? + __stable_partition_adaptive(__first, __last, __pred, + _Distance(__buf.requested_size()), + __buf.begin(), __buf.size(), + false, __pred_of_before_last) : + __inplace_stable_partition(__first, __last, __pred, + _Distance(__buf.requested_size()), + false, __pred_of_before_last); + +} + +template +_ForwardIter +__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, + const forward_iterator_tag &) { + return __stable_partition_aux_aux(__first, __last, __pred, + _STLP_VALUE_TYPE(__first, _ForwardIter), + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + + +/* bug fix- end*/ + + + +template +_STLP_INLINE_LOOP _BidirectionalIter __partition(_BidirectionalIter __first, + _BidirectionalIter __last, + _Predicate __pred, + const bidirectional_iterator_tag &) { + while (true) { + while (true) + if (__first == __last) + return __first; + else if (__pred(*__first)) + ++__first; + else + break; + --__last; + while (true) + if (__first == __last) + return __first; + else if (!__pred(*__last)) + --__last; + else + break; + iter_swap(__first, __last); + ++__first; + } +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline +_BidirectionalIter __partition(_BidirectionalIter __first, + _BidirectionalIter __last, + _Predicate __pred, + const random_access_iterator_tag &) { + return __partition(__first, __last, __pred, bidirectional_iterator_tag()); +} +# endif + +template +_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __partition(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _ForwardIter)); +} + +/* +template +_ForwardIter __inplace_stable_partition(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, _Distance __len) { + if (__len == 1) + return __pred(*__first) ? __last : __first; + _ForwardIter __middle = __first; + advance(__middle, __len / 2); + return rotate(__inplace_stable_partition(__first, __middle, __pred, + __len / 2), + __middle, + __inplace_stable_partition(__middle, __last, __pred, + __len - __len / 2)); +} + + +template +_ForwardIter __stable_partition_adaptive(_ForwardIter __first, + _ForwardIter __last, + _Predicate __pred, _Distance __len, + _Pointer __buffer, + _Distance __buffer_size) +{ + if (__len <= __buffer_size) { + _ForwardIter __result1 = __first; + _Pointer __result2 = __buffer; + for ( ; __first != __last ; ++__first) + if (__pred(*__first)) { + *__result1 = *__first; + ++__result1; + } + else { + *__result2 = *__first; + ++__result2; + } + copy(__buffer, __result2, __result1); + return __result1; + } + else { + _ForwardIter __middle = __first; + advance(__middle, __len / 2); + return rotate(__stable_partition_adaptive( + __first, __middle, __pred, + _Distance(__len / 2), __buffer, __buffer_size), + __middle, + __stable_partition_adaptive( + __middle, __last, __pred, + _Distance(__len - __len / 2), __buffer, __buffer_size)); + } +} +*/ //bug fix +template +inline _ForwardIter +__stable_partition_aux(_ForwardIter __first, _ForwardIter __last, + _Predicate __pred, _Tp*, _Distance*) +{ + typedef _Temporary_buffer<_ForwardIter, _Tp> _TmpBuf; + _Temporary_buffer<_ForwardIter, _Tp> __buf(__first, __last); + _STLP_PUSH_STACK_ITEM(_TmpBuf, &__buf); + + _STLP_MPWFIX_TRY //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present + return (__buf.size() > 0) ? + __stable_partition_adaptive(__first, __last, __pred, + _Distance(__buf.requested_size()), + __buf.begin(), _Distance(__buf.size())) : + __inplace_stable_partition(__first, __last, __pred, + _Distance(__buf.requested_size())); + _STLP_MPWFIX_CATCH //*TY 06/01/2000 - they forget to call dtor for _Temporary_buffer if no try/catch block is present +} +/* +template +_ForwardIter +stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) + return __first; + else + return __stable_partition_aux(__first, __last, __pred, + _STLP_VALUE_TYPE(__first, _ForwardIter), + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} +*/ //bug fix +template +_RandomAccessIter __unguarded_partition(_RandomAccessIter __first, + _RandomAccessIter __last, + _Tp __pivot, _Compare __comp) +{ + _STLP_PUSH_STACK_ITEM(_Tp, &__pivot) + while (true) { + while (__comp(*__first, __pivot)) + ++__first; + --__last; + while (__comp(__pivot, *__last)) + --__last; + if (!(__first < __last)) + return __first; + iter_swap(__first, __last); + ++__first; + } +} + +// sort() and its auxiliary functions. + +# define __stl_threshold 16 + +template +void __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, + _Compare __comp) { + _STLP_PUSH_STACK_ITEM(_Tp, &__val) + _RandomAccessIter __next = __last; + --__next; + while (__comp(__val, *__next)) { + *__last = *__next; + __last = __next; + --__next; + } + *__last = __val; +} + +template +inline void __linear_insert(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp __val, _Compare __comp) { + _STLP_PUSH_STACK_ITEM(_Tp, &__val) + if (__comp(__val, *__first)) { + copy_backward(__first, __last, __last + 1); + *__first = __val; + } + else + __unguarded_linear_insert(__last, __val, __comp); +} + +template +void __insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) { + if (__first == __last) return; + for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i) + __linear_insert(__first, __i, *__i, __comp); //*TY 12/26/1998 - supply *__i as __val +} + +template +void __unguarded_insertion_sort_aux(_RandomAccessIter __first, + _RandomAccessIter __last, + _Tp*, _Compare __comp) { + for (_RandomAccessIter __i = __first; __i != __last; ++__i) + __unguarded_linear_insert(__i, _Tp(*__i), __comp); +} + +template +inline void __unguarded_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, + _Compare __comp) { + __unguarded_insertion_sort_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp); +} + +template +void __final_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) { + if (__last - __first > __stl_threshold) { + __insertion_sort(__first, __first + __stl_threshold, __comp); + __unguarded_insertion_sort(__first + __stl_threshold, __last, __comp); + } + else + __insertion_sort(__first, __last, __comp); +} + +template +void __introsort_loop(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, + _Size __depth_limit, _Compare __comp) +{ + while (__last - __first > __stl_threshold) { + if (__depth_limit == 0) { + partial_sort(__first, __last, __last, __comp); + return; + } + --__depth_limit; + _RandomAccessIter __cut = + __unguarded_partition(__first, __last, + _Tp(__median(*__first, + *(__first + (__last - __first)/2), + *(__last - 1), __comp)), + __comp); + __introsort_loop(__cut, __last, (_Tp*) 0, __depth_limit, __comp); + __last = __cut; + } +} + +template +void sort(_RandomAccessIter __first, _RandomAccessIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first != __last) { + __introsort_loop(__first, __last, + _STLP_VALUE_TYPE(__first, _RandomAccessIter), + __lg(__last - __first) * 2, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)) ); + __final_insertion_sort(__first, __last, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); + } +} + +template +void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first != __last) { + __introsort_loop(__first, __last, + _STLP_VALUE_TYPE(__first, _RandomAccessIter), + __lg(__last - __first) * 2, + __comp); + __final_insertion_sort(__first, __last, __comp); + } +} + +// stable_sort() and its auxiliary functions. + +template +void __inplace_stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) { + if (__last - __first < 15) { + __insertion_sort(__first, __last, __comp); + return; + } + _RandomAccessIter __middle = __first + (__last - __first) / 2; + __inplace_stable_sort(__first, __middle, __comp); + __inplace_stable_sort(__middle, __last, __comp); + __merge_without_buffer(__first, __middle, __last, + __middle - __first, + __last - __middle, + __comp); +} + +template +void __merge_sort_loop(_RandomAccessIter1 __first, + _RandomAccessIter1 __last, + _RandomAccessIter2 __result, _Distance __step_size, + _Compare __comp) { + _Distance __two_step = 2 * __step_size; + + while (__last - __first >= __two_step) { + __result = merge(__first, __first + __step_size, + __first + __step_size, __first + __two_step, + __result, + __comp); + __first += __two_step; + } + __step_size = (min) (_Distance(__last - __first), __step_size); + + merge(__first, __first + __step_size, + __first + __step_size, __last, + __result, + __comp); +} + +const int __stl_chunk_size = 7; + +template +void __chunk_insertion_sort(_RandomAccessIter __first, + _RandomAccessIter __last, + _Distance __chunk_size, _Compare __comp) +{ + while (__last - __first >= __chunk_size) { + __insertion_sort(__first, __first + __chunk_size, __comp); + __first += __chunk_size; + } + __insertion_sort(__first, __last, __comp); +} + +template +void __merge_sort_with_buffer(_RandomAccessIter __first, + _RandomAccessIter __last, _Pointer __buffer, + _Distance*, _Compare __comp) { + _Distance __len = __last - __first; + _Pointer __buffer_last = __buffer + __len; + + _Distance __step_size = __stl_chunk_size; + __chunk_insertion_sort(__first, __last, __step_size, __comp); + + while (__step_size < __len) { + __merge_sort_loop(__first, __last, __buffer, __step_size, __comp); + __step_size *= 2; + __merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp); + __step_size *= 2; + } +} + +template +_BidirectionalIter1 __rotate_adaptive(_BidirectionalIter1 __first, + _BidirectionalIter1 __middle, + _BidirectionalIter1 __last, + _Distance __len1, _Distance __len2, + _BidirectionalIter2 __buffer, + _Distance __buffer_size) { + if (__len1 > __len2 && __len2 <= __buffer_size) { + _BidirectionalIter2 __buffer_end = copy(__middle, __last, __buffer); + copy_backward(__first, __middle, __last); + return copy(__buffer, __buffer_end, __first); + } + else if (__len1 <= __buffer_size) { + _BidirectionalIter2 __buffer_end = copy(__first, __middle, __buffer); + copy(__middle, __last, __first); + return copy_backward(__buffer, __buffer_end, __last); + } + else + return rotate(__first, __middle, __last); +} + +template +void __merge_adaptive(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2, + _Pointer __buffer, _Distance __buffer_size, + _Compare __comp) { + if (__len1 <= __len2 && __len1 <= __buffer_size) { + _Pointer __buffer_end = copy(__first, __middle, __buffer); + merge(__buffer, __buffer_end, __middle, __last, __first, __comp); + } + else if (__len2 <= __buffer_size) { + _Pointer __buffer_end = copy(__middle, __last, __buffer); + __merge_backward(__first, __middle, __buffer, __buffer_end, __last, + __comp); + } + else { + _BidirectionalIter __first_cut = __first; + _BidirectionalIter __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) { + __len11 = __len1 / 2; + advance(__first_cut, __len11); + __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); + __len22 += distance(__middle, __second_cut); + } + else { + __len22 = __len2 / 2; + advance(__second_cut, __len22); + __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); + __len11 += distance(__first, __first_cut); + } + _BidirectionalIter __new_middle = + __rotate_adaptive(__first_cut, __middle, __second_cut, __len1 - __len11, + __len22, __buffer, __buffer_size); + __merge_adaptive(__first, __first_cut, __new_middle, __len11, + __len22, __buffer, __buffer_size, __comp); + __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11, + __len2 - __len22, __buffer, __buffer_size, __comp); + } +} + +template +void __stable_sort_adaptive(_RandomAccessIter __first, + _RandomAccessIter __last, _Pointer __buffer, + _Distance __buffer_size, _Compare __comp) { + _Distance __len = (__last - __first + 1) / 2; + _RandomAccessIter __middle = __first + __len; + if (__len > __buffer_size) { + __stable_sort_adaptive(__first, __middle, __buffer, __buffer_size, + __comp); + __stable_sort_adaptive(__middle, __last, __buffer, __buffer_size, + __comp); + } + else { + __merge_sort_with_buffer(__first, __middle, __buffer, (_Distance*)0, + __comp); + __merge_sort_with_buffer(__middle, __last, __buffer, (_Distance*)0, + __comp); + } + __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first), + _Distance(__last - __middle), __buffer, __buffer_size, + __comp); +} + +template +void __stable_sort_aux(_RandomAccessIter __first, + _RandomAccessIter __last, _Tp*, _Distance*, + _Compare __comp) { + + typedef _Temporary_buffer<_RandomAccessIter, _Tp> _TmpBuf; + _TmpBuf __buf(__first, __last); + _STLP_PUSH_STACK_ITEM(_TmpBuf, &__buf); + + if (__buf.begin() == 0) + __inplace_stable_sort(__first, __last, __comp); + else + __stable_sort_adaptive(__first, __last, __buf.begin(), + _Distance(__buf.size()), + __comp); +} + +template +void stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + __stable_sort_aux(__first, __last, + _STLP_VALUE_TYPE(__first, _RandomAccessIter), + _STLP_DISTANCE_TYPE(__first, _RandomAccessIter), + __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); +} + +template +void stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + __stable_sort_aux(__first, __last, + _STLP_VALUE_TYPE(__first, _RandomAccessIter), + _STLP_DISTANCE_TYPE(__first, _RandomAccessIter), + __comp); +} + +// partial_sort, partial_sort_copy, and auxiliary functions. + +template +void __partial_sort(_RandomAccessIter __first, _RandomAccessIter __middle, + _RandomAccessIter __last, _Tp*, _Compare __comp) { + make_heap(__first, __middle, __comp); + for (_RandomAccessIter __i = __middle; __i < __last; ++__i) + if (__comp(*__i, *__first)) + __pop_heap(__first, __middle, __i, _Tp(*__i), __comp, + _STLP_DISTANCE_TYPE(__first, _RandomAccessIter)); + sort_heap(__first, __middle, __comp); +} + + +template +void +partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, _RandomAccessIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __middle)) + _STLP_DEBUG_CHECK(__check_range(__middle, __last)) + __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), + __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); +} + +template +void partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, + _RandomAccessIter __last, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __middle)) + _STLP_DEBUG_CHECK(__check_range(__middle, __last)) + __partial_sort(__first, __middle, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp); +} + +template +_RandomAccessIter __partial_sort_copy(_InputIter __first, + _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last, + _Compare __comp, _Distance*, _Tp*) { + if (__result_first == __result_last) return __result_last; + _RandomAccessIter __result_real_last = __result_first; + while(__first != __last && __result_real_last != __result_last) { + *__result_real_last = *__first; + ++__result_real_last; + ++__first; + } + make_heap(__result_first, __result_real_last, __comp); + while (__first != __last) { + if (__comp(*__first, *__result_first)) + __adjust_heap(__result_first, _Distance(0), + _Distance(__result_real_last - __result_first), + _Tp(*__first), + __comp); + ++__first; + } + sort_heap(__result_first, __result_real_last, __comp); + return __result_real_last; +} + +template +_RandomAccessIter +partial_sort_copy(_InputIter __first, _InputIter __last, + _RandomAccessIter __result_first, _RandomAccessIter __result_last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _STLP_DEBUG_CHECK(__check_range(__result_first, __result_last)) + return __partial_sort_copy(__first, __last, __result_first, __result_last, + __less(_STLP_VALUE_TYPE(__first, _InputIter)), + _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter), + _STLP_VALUE_TYPE(__first, _InputIter)); +} + +template +_RandomAccessIter +partial_sort_copy(_InputIter __first, _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _STLP_DEBUG_CHECK(__check_range(__result_first, __result_last)) + return __partial_sort_copy(__first, __last, __result_first, __result_last, + __comp, + _STLP_DISTANCE_TYPE(__result_first, _RandomAccessIter), + _STLP_VALUE_TYPE(__first, _InputIter)); +} + +// nth_element() and its auxiliary functions. + +template +void __nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last, _Tp*, _Compare __comp) { + while (__last - __first > 3) { + _RandomAccessIter __cut = + __unguarded_partition(__first, __last, + _Tp(__median(*__first, + *(__first + (__last - __first)/2), + *(__last - 1), + __comp)), + __comp); + if (__cut <= __nth) + __first = __cut; + else + __last = __cut; + } + __insertion_sort(__first, __last, __comp); +} + + +template +void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __nth)) + _STLP_DEBUG_CHECK(__check_range(__nth, __last)) + __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), + __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter))); +} + +template +void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __nth)) + _STLP_DEBUG_CHECK(__check_range(__nth, __last)) + __nth_element(__first, __nth, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIter), __comp); +} + +// Binary search (lower_bound, upper_bound, equal_range, binary_search). + +template +_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp, _Distance*) +{ + _Distance __len = distance(__first, __last); + _Distance __half; + + while (__len > 0) { + __half = __len >> 1; + _ForwardIter __middle = __first; + advance(__middle, __half); + if (__comp(__val, *__middle)) + __len = __half; + else { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + } + return __first; +} + +template +pair<_ForwardIter, _ForwardIter> +__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, + _Compare __comp, _Distance*) +{ + _Distance __len = distance(__first, __last); + _Distance __half; + + while (__len > 0) { + __half = __len >> 1; + _ForwardIter __middle = __first; + advance(__middle, __half); + if (__comp(*__middle, __val)) { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else if (__comp(__val, *__middle)) + __len = __half; + else { + _ForwardIter __left = lower_bound(__first, __middle, __val, __comp); + advance(__first, __len); + _ForwardIter __right = upper_bound(++__middle, __first, __val, __comp); + return pair<_ForwardIter, _ForwardIter>(__left, __right); + } + } + return pair<_ForwardIter, _ForwardIter>(__first, __first); +} + +template +_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) { + if (*__first2 < *__first1) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) { + if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +void __merge_without_buffer(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, + _Distance __len1, _Distance __len2, + _Compare __comp) { + if (__len1 == 0 || __len2 == 0) + return; + if (__len1 + __len2 == 2) { + if (__comp(*__middle, *__first)) + iter_swap(__first, __middle); + return; + } + _BidirectionalIter __first_cut = __first; + _BidirectionalIter __second_cut = __middle; + _Distance __len11 = 0; + _Distance __len22 = 0; + if (__len1 > __len2) { + __len11 = __len1 / 2; + advance(__first_cut, __len11); + __second_cut = lower_bound(__middle, __last, *__first_cut, __comp); + __len22 += distance(__middle, __second_cut); + } + else { + __len22 = __len2 / 2; + advance(__second_cut, __len22); + __first_cut = upper_bound(__first, __middle, *__second_cut, __comp); + __len11 +=distance(__first, __first_cut); + } + _BidirectionalIter __new_middle + = rotate(__first_cut, __middle, __second_cut); + __merge_without_buffer(__first, __first_cut, __new_middle, __len11, __len22, + __comp); + __merge_without_buffer(__new_middle, __second_cut, __last, __len1 - __len11, + __len2 - __len22, __comp); +} + +template +_BidirectionalIter3 __merge_backward(_BidirectionalIter1 __first1, + _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, + _BidirectionalIter2 __last2, + _BidirectionalIter3 __result, + _Compare __comp) { + if (__first1 == __last1) + return copy_backward(__first2, __last2, __result); + if (__first2 == __last2) + return copy_backward(__first1, __last1, __result); + --__last1; + --__last2; + while (true) { + if (__comp(*__last2, *__last1)) { + *--__result = *__last1; + if (__first1 == __last1) + return copy_backward(__first2, ++__last2, __result); + --__last1; + } + else { + *--__result = *__last2; + if (__first2 == __last2) + return copy_backward(__first1, ++__last1, __result); + --__last2; + } + } +} + +template +inline void __inplace_merge_aux(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, _Tp*, _Distance*, + _Compare __comp) { + _Distance __len1 = distance(__first, __middle); + _Distance __len2 = distance(__middle, __last); + + typedef _Temporary_buffer<_BidirectionalIter, _Tp> _TmpBuf; + _TmpBuf __buf(__first, __last); + _STLP_PUSH_STACK_ITEM(_TmpBuf, &__buf); + + if (__buf.begin() == 0) + __merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp); + else + __merge_adaptive(__first, __middle, __last, __len1, __len2, + __buf.begin(), _Distance(__buf.size()), + __comp); +} + +template +void inplace_merge(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __middle)) + _STLP_DEBUG_CHECK(__check_range(__middle, __last)) + if (__first == __middle || __middle == __last) + return; + __inplace_merge_aux(__first, __middle, __last, + _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter), + __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter))); +} + +template +void inplace_merge(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __middle)) + _STLP_DEBUG_CHECK(__check_range(__middle, __last)) + if (__first == __middle || __middle == __last) + return; + __inplace_merge_aux(__first, __middle, __last, + _STLP_VALUE_TYPE(__first, _BidirectionalIter), _STLP_DISTANCE_TYPE(__first, _BidirectionalIter), + __comp); +} + + +template +bool __includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) + return false; + else if(__comp(*__first1, *__first2)) + ++__first1; + else + ++__first1, ++__first2; + + return __first2 == __last2; +} + +template +bool includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, _Compare __comp) { + return __includes(__first1, __last1, __first2, __last2, __comp); +} + +template +bool includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) { + return __includes(__first1, __last1, __first2, __last2, __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); +} + +template +_OutputIter __set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) { + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + } + else if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + } + else { + *__result = *__first1; + ++__first1; + ++__first2; + } + ++__result; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) { + return __set_union(__first1, __last1, __first2, __last2, __result, __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); +} + +template +_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + return __set_union(__first1, __last1, __first2, __last2, __result, __comp); +} + +template +_OutputIter __set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) + ++__first1; + else if (__comp(*__first2, *__first1)) + ++__first2; + else { + *__result = *__first1; + ++__first1; + ++__first2; + ++__result; + } + return __result; +} + +template +_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) { + return __set_intersection(__first1, __last1, __first2, __last2, __result, __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); +} + +template +_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + return __set_intersection(__first1, __last1, __first2, __last2, __result, __comp); +} + +template +_OutputIter __set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) + ++__first2; + else { + ++__first1; + ++__first2; + } + return copy(__first1, __last1, __result); +} + +template +_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) { + return __set_difference(__first1, __last1, __first2, __last2, __result, + __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); +} + +template +_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + return __set_difference(__first1, __last1, __first2, __last2, __result, __comp); +} + +template +_OutputIter +__set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first1, *__first2)) { + *__result = *__first1; + ++__first1; + ++__result; + } + else if (__comp(*__first2, *__first1)) { + *__result = *__first2; + ++__first2; + ++__result; + } + else { + ++__first1; + ++__first2; + } + return copy(__first2, __last2, copy(__first1, __last1, __result)); +} + +template +_OutputIter +set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result) { + return __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, + __less(_STLP_VALUE_TYPE(__first1, _InputIter1))); +} + +template +_OutputIter +set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, + _Compare __comp) { + return __set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp); +} + +// min_element and max_element, with and without an explicitly supplied +// comparison function. + +template +_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (__comp(*__result, *__first)) __result = __first; + return __result; +} + +template +_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (*__result < *__first) + __result = __first; + return __result; +} + +template +_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (*__first < *__result) + __result = __first; + return __result; +} + +template +_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __first; + _ForwardIter __result = __first; + while (++__first != __last) + if (__comp(*__first, *__result)) __result = __first; + return __result; +} + +// next_permutation and prev_permutation, with and without an explicitly +// supplied comparison function. +template +bool __next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) + return false; + _BidirectionalIter __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) { + _BidirectionalIter __ii = __i; + --__i; + if (__comp(*__i, *__ii)) { + _BidirectionalIter __j = __last; + while (!__comp(*__i, *--__j)) + {} + iter_swap(__i, __j); + reverse(__ii, __last); + return true; + } + if (__i == __first) { + reverse(__first, __last); + return false; + } + } +#if defined(_STLP_NEED_UNREACHABLE_RETURN) + return 0; +#endif +} + +template +bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __next_permutation(__first, __last, __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter))); +} + +template +bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __next_permutation(__first, __last, __comp); +} + +template +bool __prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp) { + if (__first == __last) + return false; + _BidirectionalIter __i = __first; + ++__i; + if (__i == __last) + return false; + __i = __last; + --__i; + + for(;;) { + _BidirectionalIter __ii = __i; + --__i; + if (__comp(*__ii, *__i)) { + _BidirectionalIter __j = __last; + while (!__comp(*--__j, *__i)) + {} + iter_swap(__i, __j); + reverse(__ii, __last); + return true; + } + if (__i == __first) { + reverse(__first, __last); + return false; + } + } +#if defined(_STLP_NEED_UNREACHABLE_RETURN) + return 0; +#endif +} + +template +bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __prev_permutation(__first, __last, __less(_STLP_VALUE_TYPE(__first, _BidirectionalIter))); +} + +template +bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __prev_permutation(__first, __last, __comp); +} + +# ifndef _STLP_NO_EXTENSIONS + +// is_heap, a predicate testing whether or not a range is +// a heap. This function is an extension, not part of the C++ +// standard. + + +template +bool __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp, + _Distance __n) +{ + _Distance __parent = 0; + for (_Distance __child = 1; __child < __n; ++__child) { + if (__comp(__first[__parent], __first[__child])) + return false; + if ((__child & 1) == 0) + ++__parent; + } + return true; +} + +template +bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __is_heap(__first, __less(_STLP_VALUE_TYPE(__first, _RandomAccessIter)), __last - __first); +} + +template +bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last, + _StrictWeakOrdering __comp) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __is_heap(__first, __comp, __last - __first); +} + + +template +bool __is_sorted(_ForwardIter __first, _ForwardIter __last, + _StrictWeakOrdering __comp) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) + return true; + + _ForwardIter __next = __first; + for (++__next; __next != __last; __first = __next, ++__next) { + if (__comp(*__next, *__first)) + return false; + } + + return true; +} + +# endif /* _STLP_NO_EXTENSIONS */ + +_STLP_END_NAMESPACE + +# undef __stl_threshold + +#endif /* _STLP_ALGO_C */ +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_algo.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_algo.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,740 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_ALGO_H +#define _STLP_INTERNAL_ALGO_H + +# ifndef _STLP_INTERNAL_ALGOBASE_H +# include +# endif + +# ifndef _STLP_INTERNAL_TEMPBUF_H +# include +# endif + +# ifndef _STLP_INTERNAL_HEAP_H +# include +# endif + +# ifndef _STLP_INTERNAL_ITERATOR_H +# include +# endif + +# ifndef _STLP_INTERNAL_FUNCTION_BASE_H +# include +# endif + +# ifdef __SUNPRO_CC +// remove() conflict +# include +# endif + +_STLP_BEGIN_NAMESPACE + +// for_each. Apply a function to every element of a range. +template +_STLP_INLINE_LOOP _Function +for_each(_InputIter __first, _InputIter __last, _Function __f) { + for ( ; __first != __last; ++__first) + __f(*__first); + return __f; +} + +// count_if +template +_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter) +count_if(_InputIter __first, _InputIter __last, _Predicate __pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) +_STLP_DIFFERENCE_TYPE(_InputIter) __n = 0; + for ( ; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; + return __n; +} + +// adjacent_find. + +template +_STLP_INLINE_LOOP _ForwardIter +adjacent_find(_ForwardIter __first, _ForwardIter __last, + _BinaryPredicate __binary_pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) + return __last; + _ForwardIter __next = __first; + while(++__next != __last) { + if (__binary_pred(*__first, *__next)) + return __first; + __first = __next; + } + return __last; +} + +template +_STLP_INLINE_LOOP _ForwardIter +adjacent_find(_ForwardIter __first, _ForwardIter __last) { + return adjacent_find(__first, __last, + __equal_to(_STLP_VALUE_TYPE(__first, _ForwardIter))); +} + +# ifndef _STLP_NO_ANACHRONISMS +template +_STLP_INLINE_LOOP void +count(_InputIter __first, _InputIter __last, const _Tp& __val, _Size& __n) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + if (*__first == __val) + ++__n; +} + +template +_STLP_INLINE_LOOP void +count_if(_InputIter __first, _InputIter __last, _Predicate __pred, _Size& __n) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + if (__pred(*__first)) + ++__n; +} +# endif + +template +_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2); + +// search_n. Search for __count consecutive copies of __val. +template +_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, + _Integer __count, const _Tp& __val); +template +_ForwardIter search_n(_ForwardIter __first, _ForwardIter __last, + _Integer __count, const _Tp& __val, _BinaryPred __binary_pred); + +template +inline _InputIter find_first_of(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + return __find_first_of(__first1, __last1, __first2, __last2,__equal_to(_STLP_VALUE_TYPE(__first1, _InputIter))); +} + +template +inline _InputIter +find_first_of(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2,_BinaryPredicate __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + return __find_first_of(__first1, __last1, __first2, __last2,__comp); +} + +template +_ForwardIter1 +find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2); + +// swap_ranges +template +_STLP_INLINE_LOOP _ForwardIter2 +swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1, _ForwardIter2 __first2) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + for ( ; __first1 != __last1; ++__first1, ++__first2) + iter_swap(__first1, __first2); + return __first2; +} + +// transform +template +_STLP_INLINE_LOOP _OutputIter +transform(_InputIter __first, _InputIter __last, _OutputIter __result, _UnaryOperation __opr) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first, ++__result) + *__result = __opr(*__first); + return __result; +} +template +_STLP_INLINE_LOOP _OutputIter +transform(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _OutputIter __result,_BinaryOperation __binary_op) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result) + *__result = __binary_op(*__first1, *__first2); + return __result; +} + +// replace_if, replace_copy, replace_copy_if + +template +_STLP_INLINE_LOOP void +replace_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred, const _Tp& __new_value) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + if (__pred(*__first)) + *__first = __new_value; +} + +template +_STLP_INLINE_LOOP _OutputIter +replace_copy(_InputIter __first, _InputIter __last,_OutputIter __result, + const _Tp& __old_value, const _Tp& __new_value) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first, ++__result) + *__result = *__first == __old_value ? __new_value : *__first; + return __result; +} + +template +_STLP_INLINE_LOOP _OutputIter +replace_copy_if(_Iterator __first, _Iterator __last, + _OutputIter __result, + _Predicate __pred, const _Tp& __new_value) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first, ++__result) + *__result = __pred(*__first) ? __new_value : *__first; + return __result; +} + +// generate and generate_n + +template +_STLP_INLINE_LOOP void +generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + *__first = __gen(); +} + +template +_STLP_INLINE_LOOP _OutputIter +generate_n(_OutputIter __first, _Size __n, _Generator __gen) { + for ( ; __n > 0; --__n, ++__first) + *__first = __gen(); + return __first; +} + +// remove, remove_if, remove_copy, remove_copy_if + +template +_STLP_INLINE_LOOP _OutputIter +remove_copy(_InputIter __first, _InputIter __last,_OutputIter __result, const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + if (!(*__first == __val)) { + *__result = *__first; + ++__result; + } + return __result; +} + +template +_STLP_INLINE_LOOP _OutputIter +remove_copy_if(_InputIter __first, _InputIter __last, _OutputIter __result, _Predicate __pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + if (!__pred(*__first)) { + *__result = *__first; + ++__result; + } + return __result; +} + +template +_STLP_INLINE_LOOP _ForwardIter +remove(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + __first = find(__first, __last, __val); + if (__first == __last) + return __first; + else { + _ForwardIter __next = __first; + return remove_copy(++__next, __last, __first, __val); + } +} + +template +_STLP_INLINE_LOOP _ForwardIter +remove_if(_ForwardIter __first, _ForwardIter __last, _Predicate __pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + __first = find_if(__first, __last, __pred); + if ( __first == __last ) + return __first; + else { + _ForwardIter __next = __first; + return remove_copy_if(++__next, __last, __first, __pred); + } +} + +// unique and unique_copy +template +_OutputIter unique_copy(_InputIter __first, _InputIter __last, _OutputIter __result); + +template +_OutputIter unique_copy(_InputIter __first, _InputIter __last,_OutputIter __result, + _BinaryPredicate __binary_pred); + +template +inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last) { + __first = adjacent_find(__first, __last); + return unique_copy(__first, __last, __first); +} + +template +inline _ForwardIter unique(_ForwardIter __first, _ForwardIter __last, + _BinaryPredicate __binary_pred) { + __first = adjacent_find(__first, __last, __binary_pred); + return unique_copy(__first, __last, __first, __binary_pred); +} + +// reverse and reverse_copy, and their auxiliary functions + +template +_STLP_INLINE_LOOP void +__reverse(_BidirectionalIter __first, _BidirectionalIter __last, const bidirectional_iterator_tag &) { + for(; __first != __last && __first != --__last; ++__first) + iter_swap(__first,__last); +} + + +template +_STLP_INLINE_LOOP void +__reverse(_RandomAccessIter __first, _RandomAccessIter __last, const random_access_iterator_tag &) { + for (; __first < __last; ++__first) iter_swap(__first, --__last); +} + +template +inline void +reverse(_BidirectionalIter __first, _BidirectionalIter __last) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + __reverse(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _BidirectionalIter)); +} + +template +_STLP_INLINE_LOOP +_OutputIter reverse_copy(_BidirectionalIter __first, + _BidirectionalIter __last, + _OutputIter __result) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + while (__first != __last) { + --__last; + *__result = *__last; + ++__result; + } + return __result; +} + +// rotate and rotate_copy, and their auxiliary functions + +template +_STLP_INLINE_LOOP +_EuclideanRingElement __gcd(_EuclideanRingElement __m, + _EuclideanRingElement __n) +{ + while (__n != 0) { + _EuclideanRingElement __t = __m % __n; + __m = __n; + __n = __t; + } + return __m; +} + +template +_ForwardIter +rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last); + +template +inline _OutputIter rotate_copy(_ForwardIter __first, _ForwardIter __middle, + _ForwardIter __last, _OutputIter __result) { + return copy(__first, __middle, copy(__middle, __last, __result)); +} + +// random_shuffle + +template +void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last); + +template +void random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last, + _RandomNumberGenerator& __rand); + +# ifndef _STLP_NO_EXTENSIONS +// random_sample and random_sample_n (extensions, not part of the standard). + +template +_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, + _OutputIter __stl_out, const _Distance __n); + +template +_OutputIter random_sample_n(_ForwardIter __first, _ForwardIter __last, + _OutputIter __stl_out, const _Distance __n, + _RandomNumberGenerator& __rand); + +template +_RandomAccessIter +random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out_first, _RandomAccessIter __out_last); + +template +_RandomAccessIter +random_sample(_InputIter __first, _InputIter __last, + _RandomAccessIter __out_first, _RandomAccessIter __out_last, + _RandomNumberGenerator& __rand); + +# endif /* _STLP_NO_EXTENSIONS */ + +// partition, stable_partition, and their auxiliary functions + +template +_ForwardIter partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred); + + +template +_ForwardIter +stable_partition(_ForwardIter __first, _ForwardIter __last, _Predicate __pred); + +// sort() and its auxiliary functions. + +template +inline _Size __lg(_Size __n) { + _Size __k; + for (__k = 0; __n != 1; __n >>= 1) ++__k; + return __k; +} + +template +void sort(_RandomAccessIter __first, _RandomAccessIter __last); +template +void sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp); + +// stable_sort() and its auxiliary functions. +template +void stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last); + +template +void stable_sort(_RandomAccessIter __first, + _RandomAccessIter __last, _Compare __comp); + +// partial_sort, partial_sort_copy, and auxiliary functions. + +template +void +partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, _RandomAccessIter __last); + +template +void +partial_sort(_RandomAccessIter __first,_RandomAccessIter __middle, + _RandomAccessIter __last, _Compare __comp); + +template +_RandomAccessIter +partial_sort_copy(_InputIter __first, _InputIter __last, + _RandomAccessIter __result_first, _RandomAccessIter __result_last); + +template +_RandomAccessIter +partial_sort_copy(_InputIter __first, _InputIter __last, + _RandomAccessIter __result_first, + _RandomAccessIter __result_last, _Compare __comp); + +// nth_element() and its auxiliary functions. + +template +void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last); + +template +void nth_element(_RandomAccessIter __first, _RandomAccessIter __nth, + _RandomAccessIter __last, _Compare __comp); + +// auxiliary class for lower_bound, etc. +template +struct __less_2 { + bool operator() (const _T1& __x, const _T2 __y) const { return __x < __y ; } +}; + +template +__less_2<_T1,_T2> __less2(_T1*, _T2* ) { return __less_2<_T1, _T2>(); } + +#ifdef _STLP_FUNCTION_PARTIAL_ORDER +template +less<_Tp> __less2(_Tp*, _Tp* ) { return less<_Tp>(); } +#endif + +// Binary search (lower_bound, upper_bound, equal_range, binary_search). + +template +inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __lower_bound(__first, __last, __val, + __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + +template +inline _ForwardIter lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __lower_bound(__first, __last, __val, __comp, _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + +template +_ForwardIter __upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp, _Distance*); + +template +inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __upper_bound(__first, __last, __val, + __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + +template +inline _ForwardIter upper_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __upper_bound(__first, __last, __val, __comp, + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + +template +pair<_ForwardIter, _ForwardIter> +__equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, + _Compare __comp, _Distance*); + +template +inline pair<_ForwardIter, _ForwardIter> +equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __equal_range(__first, __last, __val, + __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + +template +inline pair<_ForwardIter, _ForwardIter> +equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __equal_range(__first, __last, __val, __comp, + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); +} + +template +inline bool binary_search(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _ForwardIter __i = __lower_bound(__first, __last, __val, + __less2(_STLP_VALUE_TYPE(__first, _ForwardIter), (_Tp*)0), + _STLP_DISTANCE_TYPE(__first, _ForwardIter)); + return __i != __last && !(__val < *__i); +} + +template +inline bool binary_search(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _ForwardIter __i = __lower_bound(__first, __last, __val, __comp, _STLP_DISTANCE_TYPE(__first, _ForwardIter)); + return __i != __last && !__comp(__val, *__i); +} + +// merge, with and without an explicitly supplied comparison function. + +template +_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result); + +template +_OutputIter merge(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp); + + +// inplace_merge and its auxiliary functions. + + +template +void inplace_merge(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last) ; + +template +void inplace_merge(_BidirectionalIter __first, + _BidirectionalIter __middle, + _BidirectionalIter __last, _Compare __comp); + +// Set algorithms: includes, set_union, set_intersection, set_difference, +// set_symmetric_difference. All of these algorithms have the precondition +// that their input ranges are sorted and the postcondition that their output +// ranges are sorted. + +template +bool includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2); + +template +bool includes(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, _Compare __comp); + +template +_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result); + +template +_OutputIter set_union(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp); + +template +_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result); + +template +_OutputIter set_intersection(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp); + + + +template +_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result); + +template +_OutputIter set_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, _Compare __comp); + +template +_OutputIter +set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result); + + +template +_OutputIter +set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _OutputIter __result, + _Compare __comp); + + +// min_element and max_element, with and without an explicitly supplied +// comparison function. + +template +_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last); +template +_ForwardIter max_element(_ForwardIter __first, _ForwardIter __last, + _Compare __comp); + +template +_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last); + +template +_ForwardIter min_element(_ForwardIter __first, _ForwardIter __last, + _Compare __comp); + +// next_permutation and prev_permutation, with and without an explicitly +// supplied comparison function. + +template +bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last); + +template +bool next_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp); + + +template +bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last); + + +template +bool prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last, + _Compare __comp); + +# ifndef _STLP_NO_EXTENSIONS + +// is_heap, a predicate testing whether or not a range is +// a heap. This function is an extension, not part of the C++ +// standard. + +template +bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last); + +template +bool is_heap(_RandomAccessIter __first, _RandomAccessIter __last, + _StrictWeakOrdering __comp); + + +// is_sorted, a predicated testing whether a range is sorted in +// nondescending order. This is an extension, not part of the C++ +// standard. +template +bool __is_sorted(_ForwardIter __first, _ForwardIter __last, + _StrictWeakOrdering __comp); + +template +inline bool is_sorted(_ForwardIter __first, _ForwardIter __last) { + return __is_sorted(__first, __last, __less(_STLP_VALUE_TYPE(__first, _ForwardIter))); +} + +template +inline bool is_sorted(_ForwardIter __first, _ForwardIter __last, + _StrictWeakOrdering __comp) { + return __is_sorted(__first, __last, __comp); +} +# endif + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_ALGO_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_algobase.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_algobase.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,392 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_ALGOBASE_C +#define _STLP_ALGOBASE_C + +# if !defined (_STLP_INTERNAL_ALGOBASE_H) +# include +# endif + +_STLP_BEGIN_NAMESPACE + +template +bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + for ( ; __first1 != __last1 && __first2 != __last2 + ; ++__first1, ++__first2) { + if (*__first1 < *__first2) + return true; + if (*__first2 < *__first1) + return false; + } + return __first1 == __last1 && __first2 != __last2; +} + +template +bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _Compare __comp) { + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + for ( ; __first1 != __last1 && __first2 != __last2 + ; ++__first1, ++__first2) { + if (__comp(*__first1, *__first2)) + return true; + if (__comp(*__first2, *__first1)) + return false; + } + return __first1 == __last1 && __first2 != __last2; +} + +# ifndef _STLP_NO_EXTENSIONS + +template +int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) +{ + while (__first1 != __last1 && __first2 != __last2) { + if (*__first1 < *__first2) + return -1; + if (*__first2 < *__first1) + return 1; + ++__first1; + ++__first2; + } + if (__first2 == __last2) { + return !(__first1 == __last1); + } + else { + return -1; + } +} + + +template +int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + return __lexicographical_compare_3way(__first1, __last1, __first2, __last2); +} +# endif + +template +_STLP_INLINE_LOOP _RandomAccessIter __find(_RandomAccessIter __first, _RandomAccessIter __last, + const _Tp& __val, + const random_access_iterator_tag &) +{ + _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2; + + for ( ; __trip_count > 0 ; --__trip_count) { + if (*__first == __val) return __first; + ++__first; + + if (*__first == __val) return __first; + ++__first; + + if (*__first == __val) return __first; + ++__first; + + if (*__first == __val) return __first; + ++__first; + } + + switch(__last - __first) { + case 3: + if (*__first == __val) return __first; + ++__first; + case 2: + if (*__first == __val) return __first; + ++__first; + case 1: + if (*__first == __val) return __first; + ++__first; + case 0: + default: + return __last; + } +} + +template +_STLP_INLINE_LOOP _RandomAccessIter __find_if(_RandomAccessIter __first, _RandomAccessIter __last, + _Predicate __pred, + const random_access_iterator_tag &) +{ + _STLP_DIFFERENCE_TYPE(_RandomAccessIter) __trip_count = (__last - __first) >> 2; + + for ( ; __trip_count > 0 ; --__trip_count) { + if (__pred(*__first)) return __first; + ++__first; + + if (__pred(*__first)) return __first; + ++__first; + + if (__pred(*__first)) return __first; + ++__first; + + if (__pred(*__first)) return __first; + ++__first; + } + + switch(__last - __first) { + case 3: + if (__pred(*__first)) return __first; + ++__first; + case 2: + if (__pred(*__first)) return __first; + ++__first; + case 1: + if (__pred(*__first)) return __first; + // ++__first; + case 0: + default: + return __last; + } +} + +template +inline _InputIter __find(_InputIter __first, _InputIter __last, + const _Tp& __val, + const input_iterator_tag &) +{ + while (__first != __last && !(*__first == __val)) + ++__first; + return __first; +} + +template +inline _InputIter __find_if(_InputIter __first, _STLP_MPW_EXTRA_CONST _InputIter __last, + _Predicate __pred, + const input_iterator_tag &) +{ + while (__first != __last && !__pred(*__first)) + ++__first; + return __first; +} + +template +_InputIter find_if(_InputIter __first, _InputIter __last, + _Predicate __pred) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __find_if(__first, __last, __pred, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); +} + +template +_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __find(__first, __last, __val, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); +} + +template +_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + _BinaryPred __predicate) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + // Test for empty ranges + if (__first1 == __last1 || __first2 == __last2) + return __first1; + + // Test for a pattern of length 1. + _ForwardIter2 __tmp(__first2); + ++__tmp; + if (__tmp == __last2) { + while (__first1 != __last1 && !__predicate(*__first1, *__first2)) + ++__first1; + return __first1; + } + + // General case. + + _ForwardIter2 __p1, __p; + + __p1 = __first2; ++__p1; + + // _ForwardIter1 __current = __first1; + + while (__first1 != __last1) { + while (__first1 != __last1) { + if (__predicate(*__first1, *__first2)) + break; + ++__first1; + } + while (__first1 != __last1 && !__predicate(*__first1, *__first2)) + ++__first1; + if (__first1 == __last1) + return __last1; + + __p = __p1; + _ForwardIter1 __current = __first1; + if (++__current == __last1) return __last1; + + while (__predicate(*__current, *__p)) { + if (++__p == __last2) + return __first1; + if (++__current == __last1) + return __last1; + } + + ++__first1; + } + return __first1; +} + +// find_first_of, with and without an explicitly supplied comparison function. + +template +_InputIter __find_first_of(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2, + _BinaryPredicate __comp) { + for ( ; __first1 != __last1; ++__first1) + for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter) + if (__comp(*__first1, *__iter)) + return __first1; + return __last1; +} + + +// find_end, with and without an explicitly supplied comparison function. +// Search [first2, last2) as a subsequence in [first1, last1), and return +// the *last* possible match. Note that find_end for bidirectional iterators +// is much faster than for forward iterators. + +// find_end for forward iterators. + +template +_ForwardIter1 __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + const forward_iterator_tag &, const forward_iterator_tag &, + _BinaryPredicate __comp) +{ + if (__first2 == __last2) + return __last1; + else { + _ForwardIter1 __result = __last1; + while (1) { + _ForwardIter1 __new_result + = search(__first1, __last1, __first2, __last2, __comp); + if (__new_result == __last1) + return __result; + else { + __result = __new_result; + __first1 = __new_result; + ++__first1; + } + } + } +} + +// find_end for bidirectional iterators. Requires partial specialization. +#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) + +#if ! defined (_STLP_INTERNAL_ITERATOR_H) +_STLP_END_NAMESPACE +# include +_STLP_BEGIN_NAMESPACE +#endif + +template +_BidirectionalIter1 +__find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1, + _BidirectionalIter2 __first2, _BidirectionalIter2 __last2, + const bidirectional_iterator_tag &, const bidirectional_iterator_tag &, + _BinaryPredicate __comp) +{ + typedef reverse_iterator<_BidirectionalIter1> _RevIter1; + typedef reverse_iterator<_BidirectionalIter2> _RevIter2; + + _RevIter1 __rlast1(__first1); + _RevIter2 __rlast2(__first2); + _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1, + _RevIter2(__last2), __rlast2, + __comp); + + if (__rresult == __rlast1) + return __last1; + else { + _BidirectionalIter1 __result = __rresult.base(); + advance(__result, -distance(__first2, __last2)); + return __result; + } +} +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +template +_ForwardIter1 +find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + _BinaryPredicate __comp) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + return __find_end(__first1, __last1, __first2, __last2, +# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) + _STLP_ITERATOR_CATEGORY(__first1, _ForwardIter1), + _STLP_ITERATOR_CATEGORY(__first2, _ForwardIter2), +# else + forward_iterator_tag(), + forward_iterator_tag(), +# endif + __comp); +} + +template +_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp, _Distance*) +{ + _Distance __len = distance(__first, __last); + _Distance __half; + _ForwardIter __middle; + + while (__len > 0) { + __half = __len >> 1; + __middle = __first; + advance(__middle, __half); + if (__comp(*__middle, __val)) { + __first = __middle; + ++__first; + __len = __len - __half - 1; + } + else + __len = __half; + } + return __first; +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_ALGOBASE_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_algobase.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_algobase.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,583 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + + +#ifndef _STLP_INTERNAL_ALGOBASE_H +#define _STLP_INTERNAL_ALGOBASE_H + +# if ! defined (_STLP_CSTDDEF) +# include +# endif + +#ifndef _STLP_CSTRING +# include +#endif + +#ifndef _STLP_CLIMITS +# include +#endif + +# if ! defined (_STLP_CSTDLIB) +# include +# endif + +# ifndef _STLP_INTERNAL_PAIR_H +# include +# endif + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE +// swap and iter_swap +template +inline void swap(_Tp& __a, _Tp& __b) { + _Tp __tmp = __a; + __a = __b; + __b = __tmp; +} + +template +inline void iter_swap(_ForwardIter1 __i1, _ForwardIter2 __i2) { + swap(*__i1, *__i2); +} + +//-------------------------------------------------- +// min and max + +# if !defined (__BORLANDC__) || defined (_STLP_USE_OWN_NAMESPACE) +template +inline const _Tp& (min)(const _Tp& __a, const _Tp& __b) { return __b < __a ? __b : __a; } +template +inline const _Tp& (max)(const _Tp& __a, const _Tp& __b) { return __a < __b ? __b : __a; } +#endif /* __BORLANDC__ */ + +# if defined (__BORLANDC__) && ( __BORLANDC__ < 0x530 || defined (_STLP_USE_OWN_NAMESPACE)) +inline unsigned long (min) (unsigned long __a, unsigned long __b) { return __b < __a ? __b : __a; } +inline unsigned long (max) (unsigned long __a, unsigned long __b) { return __a < __b ? __b : __a; } +# endif + +template +inline const _Tp& (min)(const _Tp& __a, const _Tp& __b, _Compare __comp) { + return __comp(__b, __a) ? __b : __a; +} + +template +inline const _Tp& (max)(const _Tp& __a, const _Tp& __b, _Compare __comp) { + return __comp(__a, __b) ? __b : __a; +} + +//-------------------------------------------------- +// copy + +// All of these auxiliary functions serve two purposes. (1) Replace +// calls to copy with memmove whenever possible. (Memmove, not memcpy, +// because the input and output ranges are permitted to overlap.) +// (2) If we're using random access iterators, then write the loop as +// a for loop with an explicit count. + +template +inline _OutputIter __copy(_InputIter __first, _InputIter __last, + _OutputIter __result, + const input_iterator_tag &, _Distance*) { + for ( ; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline _OutputIter __copy(_InputIter __first, _InputIter __last, + _OutputIter __result, const forward_iterator_tag &, _Distance* ) { + for ( ; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; +} + + +template +inline _OutputIter __copy(_InputIter __first, _InputIter __last, + _OutputIter __result, const bidirectional_iterator_tag &, _Distance* __dis) { + for ( ; __first != __last; ++__result, ++__first) + *__result = *__first; + return __result; +} +# endif + +template +inline _OutputIter +__copy(_RandomAccessIter __first, _RandomAccessIter __last, + _OutputIter __result, const random_access_iterator_tag &, _Distance*) { + for (_Distance __n = __last - __first; __n > 0; --__n) { + *__result = *__first; + ++__first; + ++__result; + } + return __result; +} + +inline void* +__copy_trivial(const void* __first, const void* __last, void* __result) { + return (__last == __first) ? __result : + ((char*)memmove(__result, __first, ((const char*)__last - (const char*)__first))) + + ((const char*)__last - (const char*)__first); +} + +//-------------------------------------------------- +// copy_backward auxiliary functions + +template +inline _BidirectionalIter2 __copy_backward(_BidirectionalIter1 __first, + _BidirectionalIter1 __last, + _BidirectionalIter2 __result, + const bidirectional_iterator_tag &, + _Distance*) +{ + while (__first != __last) + *--__result = *--__last; + return __result; +} + +template +inline _BidirectionalIter __copy_backward(_RandomAccessIter __first, + _RandomAccessIter __last, + _BidirectionalIter __result, + const random_access_iterator_tag &, + _Distance*) +{ + for (_Distance __n = __last - __first; __n > 0; --__n) + *--__result = *--__last; + return __result; +} + +inline void* +__copy_trivial_backward(const void* __first, const void* __last, void* __result) { + const ptrdiff_t _Num = (const char*)__last - (const char*)__first; + return (_Num > 0) ? memmove((char*)__result - _Num, __first, _Num) : __result ; +} + +template +inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { + return __copy(__first, __last, __result, + _STLP_ITERATOR_CATEGORY(__first, _InputIter), + _STLP_DISTANCE_TYPE(__first, _InputIter)); +} +template +inline _OutputIter __copy_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { +// we know they all pointers, so this cast is OK + // return (_OutputIter)__copy_trivial(&(*__first), &(*__last), &(*__result)); + return (_OutputIter)__copy_trivial(__first, __last, __result); +} + +template +inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { + return __copy_ptrs(__first, __last, __result, + _IsOKToMemCpy(_STLP_VALUE_TYPE(__first, _InputIter), + _STLP_VALUE_TYPE(__result, _OutputIter))._Ret()); +} + +template +inline _OutputIter __copy_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { + return __copy(__first, __last, __result, + _STLP_ITERATOR_CATEGORY(__first, _InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter)); +} + +template +inline _OutputIter copy(_InputIter __first, _InputIter __last, _OutputIter __result) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter> :: _Ret()); +} + +template +inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { + return __copy_backward(__first, __last, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter)); +} +template +inline _OutputIter __copy_backward_ptrs(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { + return (_OutputIter)__copy_trivial_backward(__first, __last, __result); +} + +template +inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __false_type&) { + return __copy_backward(__first, __last, __result, _STLP_ITERATOR_CATEGORY(__first,_InputIter), _STLP_DISTANCE_TYPE(__first, _InputIter)); +} + +template +inline _OutputIter __copy_backward_aux(_InputIter __first, _InputIter __last, _OutputIter __result, const __true_type&) { + return __copy_backward_ptrs(__first, __last, __result, + _IsOKToMemCpy(_STLP_VALUE_TYPE(__first, _InputIter), + _STLP_VALUE_TYPE(__result, _OutputIter))._Ret()); +} + +template +inline _OutputIter copy_backward(_InputIter __first, _InputIter __last, _OutputIter __result) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + return __copy_backward_aux(__first, __last, __result, _BothPtrType< _InputIter, _OutputIter> :: _Ret() ); +} + +#if ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined ( _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS ) +#define _STLP_DECLARE_COPY_TRIVIAL(_Tp) \ +inline _Tp* copy(const _Tp* __first, const _Tp* __last, _Tp* __result) \ +{ return (_Tp*)__copy_trivial(__first, __last, __result); } \ +inline _Tp* copy_backward(const _Tp* __first, const _Tp* __last, _Tp* __result) \ +{ return (_Tp*)__copy_trivial_backward(__first, __last, __result); } + +_STLP_DECLARE_COPY_TRIVIAL(char) +# ifndef _STLP_NO_SIGNED_BUILTINS +_STLP_DECLARE_COPY_TRIVIAL(signed char) +# endif +_STLP_DECLARE_COPY_TRIVIAL(unsigned char) +_STLP_DECLARE_COPY_TRIVIAL(short) +_STLP_DECLARE_COPY_TRIVIAL(unsigned short) +_STLP_DECLARE_COPY_TRIVIAL(int) +_STLP_DECLARE_COPY_TRIVIAL(unsigned int) +_STLP_DECLARE_COPY_TRIVIAL(long) +_STLP_DECLARE_COPY_TRIVIAL(unsigned long) +#if !defined(_STLP_NO_WCHAR_T) && !defined (_STLP_WCHAR_T_IS_USHORT) +_STLP_DECLARE_COPY_TRIVIAL(wchar_t) +#endif +#ifdef _STLP_LONG_LONG +_STLP_DECLARE_COPY_TRIVIAL(long long) +_STLP_DECLARE_COPY_TRIVIAL(unsigned long long) +#endif +_STLP_DECLARE_COPY_TRIVIAL(float) +_STLP_DECLARE_COPY_TRIVIAL(double) +# ifndef _STLP_NO_LONG_DOUBLE +_STLP_DECLARE_COPY_TRIVIAL(long double) +# endif +#undef _STLP_DECLARE_COPY_TRIVIAL +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +//-------------------------------------------------- +// copy_n (not part of the C++ standard) + +template +_STLP_INLINE_LOOP +pair<_InputIter, _OutputIter> __copy_n(_InputIter __first, _Size __count, + _OutputIter __result, + const input_iterator_tag &) { + for ( ; __count > 0; --__count) { + *__result = *__first; + ++__first; + ++__result; + } + return pair<_InputIter, _OutputIter>(__first, __result); +} + +template +inline pair<_RAIter, _OutputIter> +__copy_n(_RAIter __first, _Size __count, + _OutputIter __result, + const random_access_iterator_tag &) { + _RAIter __last = __first + __count; + return pair<_RAIter, _OutputIter>(__last, copy(__first, __last, __result)); +} + +template +inline pair<_InputIter, _OutputIter> +__copy_n(_InputIter __first, _Size __count, _OutputIter __result) { + _STLP_FIX_LITERAL_BUG(__first) + return __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); +} + +template +inline pair<_InputIter, _OutputIter> +copy_n(_InputIter __first, _Size __count, _OutputIter __result) { + _STLP_FIX_LITERAL_BUG(__first) + return __copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); +} + +//-------------------------------------------------- +// fill and fill_n + + +template +_STLP_INLINE_LOOP +void fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + *__first = __val; +} + +template +_STLP_INLINE_LOOP +_OutputIter fill_n(_OutputIter __first, _Size __n, const _Tp& __val) { + _STLP_FIX_LITERAL_BUG(__first) + for ( ; __n > 0; --__n, ++__first) + *__first = __val; + return __first; +} + + +// Specialization: for one-byte types we can use memset. + +inline void fill(unsigned char* __first, unsigned char* __last, + const unsigned char& __val) { + unsigned char __tmp = __val; + memset(__first, __tmp, __last - __first); +} +# ifndef _STLP_NO_SIGNED_BUILTINS +inline void fill(signed char* __first, signed char* __last, + const signed char& __val) { + signed char __tmp = __val; + memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first); +} +# endif +inline void fill(char* __first, char* __last, const char& __val) { + char __tmp = __val; + memset(__first, __STATIC_CAST(unsigned char,__tmp), __last - __first); +} + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER + +template +inline unsigned char* fill_n(unsigned char* __first, _Size __n, + const unsigned char& __val) { + fill(__first, __first + __n, __val); + return __first + __n; +} + +template +inline signed char* fill_n(char* __first, _Size __n, + const signed char& __val) { + fill(__first, __first + __n, __val); + return __first + __n; +} + +template +inline char* fill_n(char* __first, _Size __n, const char& __val) { + fill(__first, __first + __n, __val); + return __first + __n; +} + +#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ + + +//-------------------------------------------------- +// equal and mismatch + +template +_STLP_INLINE_LOOP +pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2) { + _STLP_FIX_LITERAL_BUG(__first2) + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + while (__first1 != __last1 && *__first1 == *__first2) { + ++__first1; + ++__first2; + } + return pair<_InputIter1, _InputIter2>(__first1, __first2); +} + +template +_STLP_INLINE_LOOP +pair<_InputIter1, _InputIter2> mismatch(_InputIter1 __first1, + _InputIter1 __last1, + _InputIter2 __first2, + _BinaryPredicate __binary_pred) { + _STLP_FIX_LITERAL_BUG(__first2) + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) { + ++__first1; + ++__first2; + } + return pair<_InputIter1, _InputIter2>(__first1, __first2); +} + +template +_STLP_INLINE_LOOP +bool equal(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2) { + _STLP_FIX_LITERAL_BUG(__first1) _STLP_FIX_LITERAL_BUG(__last1) _STLP_FIX_LITERAL_BUG(__first2) + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + for ( ; __first1 != __last1; ++__first1, ++__first2) + if (!(*__first1 == *__first2)) + return false; + return true; +} + +template +_STLP_INLINE_LOOP +bool equal(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _BinaryPredicate __binary_pred) { + _STLP_FIX_LITERAL_BUG(__first2) + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + for ( ; __first1 != __last1; ++__first1, ++__first2) + if (!__binary_pred(*__first1, *__first2)) + return false; + return true; +} + +//-------------------------------------------------- +// lexicographical_compare and lexicographical_compare_3way. +// (the latter is not part of the C++ standard.) + +template +bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2); + +template +bool lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _Compare __comp); + +inline bool +lexicographical_compare(const unsigned char* __first1, + const unsigned char* __last1, + const unsigned char* __first2, + const unsigned char* __last2) +{ + const size_t __len1 = __last1 - __first1; + const size_t __len2 = __last2 - __first2; + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + + const int __result = memcmp(__first1, __first2, (min) (__len1, __len2)); + return __result != 0 ? (__result < 0) : (__len1 < __len2); +} + + +# if !(CHAR_MAX == SCHAR_MAX) +inline bool lexicographical_compare(const char* __first1, const char* __last1, + const char* __first2, const char* __last2) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + _STLP_DEBUG_CHECK(__check_range(__first2, __last2)) + + return lexicographical_compare((const unsigned char*) __first1, + (const unsigned char*) __last1, + (const unsigned char*) __first2, + (const unsigned char*) __last2); +} +#endif /* CHAR_MAX == SCHAR_MAX */ + +template +int __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2); + +inline int +__lexicographical_compare_3way(const unsigned char* __first1, + const unsigned char* __last1, + const unsigned char* __first2, + const unsigned char* __last2) +{ + const ptrdiff_t __len1 = __last1 - __first1; + const ptrdiff_t __len2 = __last2 - __first2; + const int __result = memcmp(__first1, __first2, (min) (__len1, __len2)); + return __result != 0 ? __result + : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1)); +} + + +# if !(CHAR_MAX == SCHAR_MAX) +inline int +__lexicographical_compare_3way(const char* __first1, const char* __last1, + const char* __first2, const char* __last2) +{ + return __lexicographical_compare_3way((const unsigned char*) __first1, + (const unsigned char*) __last1, + (const unsigned char*) __first2, + (const unsigned char*) __last2); +} +# endif + +# ifndef _STLP_NO_EXTENSIONS + +template +int lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2); + +# endif /* EXTENSIONS */ + +// count +template +_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_InputIter) +count(_InputIter __first, _InputIter __last, const _Tp& __val) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + _STLP_DIFFERENCE_TYPE(_InputIter) __n = 0; + for ( ; __first != __last; ++__first) + if (*__first == __val) + ++__n; + return __n; +} + +// find and find_if. Note find may be expressed in terms of find_if if appropriate binder was available. +template +_InputIter find(_InputIter __first, _InputIter __last, const _Tp& __val); +template +_InputIter find_if(_InputIter __first, _InputIter __last, _Predicate __pred); + +// search. +template +_ForwardIter1 search(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, _BinaryPred __predicate); + +// find_first_of +template +_InputIter __find_first_of(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2, + _BinaryPredicate __comp); + +template +_ForwardIter1 +find_end(_ForwardIter1 __first1, _ForwardIter1 __last1, + _ForwardIter2 __first2, _ForwardIter2 __last2, + _BinaryPredicate __comp); + +// replace +template +_STLP_INLINE_LOOP void +replace(_ForwardIter __first, _ForwardIter __last, + const _Tp& __old_value, const _Tp& __new_value) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + if (*__first == __old_value) + *__first = __new_value; +} + +template +_ForwardIter __lower_bound(_ForwardIter __first, _ForwardIter __last, + const _Tp& __val, _Compare __comp, _Distance*); + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_ALGOBASE_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_alloc.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_alloc.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,378 @@ +/* + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_ALLOC_C +#define _STLP_ALLOC_C + +#ifdef __WATCOMC__ +#pragma warning 13 9 +#pragma warning 367 9 +#pragma warning 368 9 +#endif + +#ifndef _STLP_INTERNAL_ALLOC_H +# include +#endif + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +# ifdef _STLP_SGI_THREADS + // We test whether threads are in use before locking. + // Perhaps this should be moved into stl_threads.h, but that + // probably makes it harder to avoid the procedure call when + // it isn't needed. + extern "C" { + extern int __us_rsthread_malloc; + } +# endif + + +// Specialised debug form of malloc which does not provide "false" +// memory leaks when run with debug CRT libraries. +#if defined(_STLP_MSVC) && (_STLP_MSVC>=1020 && defined(_STLP_DEBUG_ALLOC)) && ! defined (_STLP_WINCE) +# include +inline void* __stlp_chunk_malloc(size_t __bytes) { _STLP_CHECK_NULL_ALLOC(_malloc_dbg(__bytes, _CRT_BLOCK, __FILE__, __LINE__)); } +#else // !_DEBUG +# ifdef _STLP_NODE_ALLOC_USE_MALLOC +# include +inline void* __stlp_chunk_malloc(size_t __bytes) { _STLP_CHECK_NULL_ALLOC(_STLP_VENDOR_CSTD::malloc(__bytes)); } +# else +inline void* __stlp_chunk_malloc(size_t __bytes) { return _STLP_STD::__stl_new(__bytes); } +# endif +#endif // !_DEBUG + + +#define _S_FREELIST_INDEX(__bytes) ((__bytes-size_t(1))>>(int)_ALIGN_SHIFT) + +_STLP_BEGIN_NAMESPACE + +#ifndef _STLP_NO_NODE_ALLOC + +template +void * _STLP_CALL __malloc_alloc<__inst>::_S_oom_malloc(size_t __n) +{ + __oom_handler_type __my_malloc_handler; + void * __result; + + for (;;) { + __my_malloc_handler = __oom_handler; + if (0 == __my_malloc_handler) { __THROW_BAD_ALLOC; } + (*__my_malloc_handler)(); + __result = malloc(__n); + if (__result) return(__result); + } +#if defined(_STLP_NEED_UNREACHABLE_RETURN) + return 0; +#endif + +} + +#endif + +template +void * _STLP_CALL __debug_alloc<_Alloc>::allocate(size_t __n) { + size_t __real_n = __n + __extra_before_chunk() + __extra_after_chunk(); + __alloc_header *__result = (__alloc_header *)__allocator_type::allocate(__real_n); + memset((char*)__result, __shred_byte, __real_n*sizeof(value_type)); + __result->__magic = __magic; + __result->__type_size = sizeof(value_type); + __result->_M_size = (_STLP_UINT32_T)__n; + return ((char*)__result) + (long)__extra_before; +} + +template +void _STLP_CALL +__debug_alloc<_Alloc>::deallocate(void *__p, size_t __n) { + __alloc_header * __real_p = (__alloc_header*)((char *)__p -(long)__extra_before); + // check integrity + _STLP_VERBOSE_ASSERT(__real_p->__magic != __deleted_magic, _StlMsg_DBA_DELETED_TWICE) + _STLP_VERBOSE_ASSERT(__real_p->__magic == __magic, _StlMsg_DBA_NEVER_ALLOCATED) + _STLP_VERBOSE_ASSERT(__real_p->__type_size == 1,_StlMsg_DBA_TYPE_MISMATCH) + _STLP_VERBOSE_ASSERT(__real_p->_M_size == __n, _StlMsg_DBA_SIZE_MISMATCH) + // check pads on both sides + unsigned char* __tmp; + for (__tmp= (unsigned char*)(__real_p+1); __tmp < (unsigned char*)__p; __tmp++) { + _STLP_VERBOSE_ASSERT(*__tmp==__shred_byte, _StlMsg_DBA_UNDERRUN) + } + + size_t __real_n= __n + __extra_before_chunk() + __extra_after_chunk(); + + for (__tmp= ((unsigned char*)__p)+__n*sizeof(value_type); + __tmp < ((unsigned char*)__real_p)+__real_n ; __tmp++) { + _STLP_VERBOSE_ASSERT(*__tmp==__shred_byte, _StlMsg_DBA_OVERRUN) + } + + // that may be unfortunate, just in case + __real_p->__magic=__deleted_magic; + memset((char*)__p, __shred_byte, __n*sizeof(value_type)); + __allocator_type::deallocate(__real_p, __real_n); +} + +#ifndef _STLP_NO_NODE_ALLOC + +// # ifdef _STLP_THREADS + +template +class _Node_Alloc_Lock { +public: + _Node_Alloc_Lock() { + +# ifdef _STLP_SGI_THREADS + if (__threads && __us_rsthread_malloc) +# else /* !_STLP_SGI_THREADS */ + if (__threads) +# endif + _S_lock._M_acquire_lock(); + } + + ~_Node_Alloc_Lock() { +# ifdef _STLP_SGI_THREADS + if (__threads && __us_rsthread_malloc) +# else /* !_STLP_SGI_THREADS */ + if (__threads) +# endif + _S_lock._M_release_lock(); + } + + static _STLP_STATIC_MUTEX _S_lock; +}; + +// # endif /* _STLP_THREADS */ + + +template +void* _STLP_CALL +__node_alloc<__threads, __inst>::_M_allocate(size_t __n) { + void* __r; + _Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n); + // # ifdef _STLP_THREADS + /*REFERENCED*/ + _Node_Alloc_Lock<__threads, __inst> __lock_instance; + // # endif + // Acquire the lock here with a constructor call. + // This ensures that it is released in exit or during stack + // unwinding. + if ( (__r = *__my_free_list) != 0 ) { + *__my_free_list = ((_Obj*)__r) -> _M_free_list_link; + } else { + __r = _S_refill(__n); + } + // lock is released here + return __r; +} + +template +void _STLP_CALL +__node_alloc<__threads, __inst>::_M_deallocate(void *__p, size_t __n) { + _Obj * _STLP_VOLATILE * __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n); + // # ifdef _STLP_THREADS + /*REFERENCED*/ + _Node_Alloc_Lock<__threads, __inst> __lock_instance; + // # endif /* _STLP_THREADS */ + // acquire lock + ((_Obj *)__p) -> _M_free_list_link = *__my_free_list; + *__my_free_list = (_Obj *)__p; + // lock is released here +} + +/* We allocate memory in large chunks in order to avoid fragmenting */ +/* the malloc heap too much. */ +/* We assume that size is properly aligned. */ +/* We hold the allocation lock. */ +template +char* _STLP_CALL +__node_alloc<__threads, __inst>::_S_chunk_alloc(size_t _p_size, + int& __nobjs) +{ + char* __result; + size_t __total_bytes = _p_size * __nobjs; + size_t __bytes_left = _S_end_free - _S_start_free; + + if (__bytes_left >= __total_bytes) { + __result = _S_start_free; + _S_start_free += __total_bytes; + return(__result); + } else if (__bytes_left >= _p_size) { + __nobjs = (int)(__bytes_left/_p_size); + __total_bytes = _p_size * __nobjs; + __result = _S_start_free; + _S_start_free += __total_bytes; + return(__result); + } else { + size_t __bytes_to_get = + 2 * __total_bytes + _S_round_up(_S_heap_size >> 4); + // Try to make use of the left-over piece. + if (__bytes_left > 0) { + _Obj* _STLP_VOLATILE* __my_free_list = + _S_free_list + _S_FREELIST_INDEX(__bytes_left); + + ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list; + *__my_free_list = (_Obj*)_S_start_free; + } + _S_start_free = (char*)__stlp_chunk_malloc(__bytes_to_get); + if (0 == _S_start_free) { + size_t __i; + _Obj* _STLP_VOLATILE* __my_free_list; + _Obj* __p; + // Try to make do with what we have. That can't + // hurt. We do not try smaller requests, since that tends + // to result in disaster on multi-process machines. + for (__i = _p_size; __i <= (size_t)_MAX_BYTES; __i += (size_t)_ALIGN) { + __my_free_list = _S_free_list + _S_FREELIST_INDEX(__i); + __p = *__my_free_list; + if (0 != __p) { + *__my_free_list = __p -> _M_free_list_link; + _S_start_free = (char*)__p; + _S_end_free = _S_start_free + __i; + return(_S_chunk_alloc(_p_size, __nobjs)); + // Any leftover piece will eventually make it to the + // right free list. + } + } + _S_end_free = 0; // In case of exception. + _S_start_free = (char*)__stlp_chunk_malloc(__bytes_to_get); + /* + (char*)malloc_alloc::allocate(__bytes_to_get); + */ + + // This should either throw an + // exception or remedy the situation. Thus we assume it + // succeeded. + } + _S_heap_size += __bytes_to_get; + _S_end_free = _S_start_free + __bytes_to_get; + return(_S_chunk_alloc(_p_size, __nobjs)); + } +} + + +/* Returns an object of size __n, and optionally adds to size __n free list.*/ +/* We assume that __n is properly aligned. */ +/* We hold the allocation lock. */ +template +void* _STLP_CALL +__node_alloc<__threads, __inst>::_S_refill(size_t __n) +{ + int __nobjs = 20; + __n = _S_round_up(__n); + char* __chunk = _S_chunk_alloc(__n, __nobjs); + _Obj* _STLP_VOLATILE* __my_free_list; + _Obj* __result; + _Obj* __current_obj; + _Obj* __next_obj; + int __i; + + if (1 == __nobjs) return(__chunk); + __my_free_list = _S_free_list + _S_FREELIST_INDEX(__n); + + /* Build free list in chunk */ + __result = (_Obj*)__chunk; + *__my_free_list = __next_obj = (_Obj*)(__chunk + __n); + for (__i = 1; ; __i++) { + __current_obj = __next_obj; + __next_obj = (_Obj*)((char*)__next_obj + __n); + if (__nobjs - 1 == __i) { + __current_obj -> _M_free_list_link = 0; + break; + } else { + __current_obj -> _M_free_list_link = __next_obj; + } + } + return(__result); +} + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +// malloc_alloc out-of-memory handling +template +__oom_handler_type __malloc_alloc<__inst>::__oom_handler=(__oom_handler_type)0 ; + +#ifdef _STLP_THREADS + template + _STLP_STATIC_MUTEX + _Node_Alloc_Lock<__threads, __inst>::_S_lock _STLP_MUTEX_INITIALIZER; +#endif + +template +_Node_alloc_obj * _STLP_VOLATILE +__node_alloc<__threads, __inst>::_S_free_list[_STLP_NFREELISTS] += {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +// The 16 zeros are necessary to make version 4.1 of the SunPro +// compiler happy. Otherwise it appears to allocate too little +// space for the array. + +template +char *__node_alloc<__threads, __inst>::_S_start_free = 0; + +template +char *__node_alloc<__threads, __inst>::_S_end_free = 0; + +template +size_t __node_alloc<__threads, __inst>::_S_heap_size = 0; + + +# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +__DECLARE_INSTANCE(__oom_handler_type, __malloc_alloc<0>::__oom_handler, =0); + +# define _STLP_ALLOC_NOTHREADS __node_alloc +# define _STLP_ALLOC_THREADS __node_alloc +# define _STLP_ALLOC_NOTHREADS_LOCK _Node_Alloc_Lock +# define _STLP_ALLOC_THREADS_LOCK _Node_Alloc_Lock + +__DECLARE_INSTANCE(char *, _STLP_ALLOC_NOTHREADS::_S_start_free,=0); +__DECLARE_INSTANCE(char *, _STLP_ALLOC_NOTHREADS::_S_end_free,=0); +__DECLARE_INSTANCE(size_t, _STLP_ALLOC_NOTHREADS::_S_heap_size,=0); +__DECLARE_INSTANCE(_Node_alloc_obj * _STLP_VOLATILE, + _STLP_ALLOC_NOTHREADS::_S_free_list[_STLP_NFREELISTS], + ={0}); +__DECLARE_INSTANCE(char *, _STLP_ALLOC_THREADS::_S_start_free,=0); +__DECLARE_INSTANCE(char *, _STLP_ALLOC_THREADS::_S_end_free,=0); +__DECLARE_INSTANCE(size_t, _STLP_ALLOC_THREADS::_S_heap_size,=0); +__DECLARE_INSTANCE(_Node_alloc_obj * _STLP_VOLATILE, + _STLP_ALLOC_THREADS::_S_free_list[_STLP_NFREELISTS], + ={0}); +// # ifdef _STLP_THREADS +__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, + _STLP_ALLOC_NOTHREADS_LOCK::_S_lock, + _STLP_MUTEX_INITIALIZER); +__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, + _STLP_ALLOC_THREADS_LOCK::_S_lock, + _STLP_MUTEX_INITIALIZER); +// # endif + +# undef _STLP_ALLOC_THREADS +# undef _STLP_ALLOC_NOTHREADS + +# endif /* _STLP_STATIC_TEMPLATE_DATA */ + +#endif + +_STLP_END_NAMESPACE + +# undef _S_FREELIST_INDEX + +# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */ + +#endif /* _STLP_ALLOC_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_alloc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_alloc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,543 @@ +/* + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_ALLOC_H +#define _STLP_INTERNAL_ALLOC_H + +# ifndef _STLP_CSTDDEF +# include +# endif + +#if !defined (_STLP_DEBUG_H) && (defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)) +# include +#endif + +# ifndef _STLP_CSTDLIB +# include +# endif +# ifndef _STLP_CSTRING +# include +# endif + +# ifndef __THROW_BAD_ALLOC +# if !defined(_STLP_USE_EXCEPTIONS) +# if !defined (_STLP_CSTDIO) +# include +# endif +# if !defined (_STLP_CSTDLIB) +# include +# endif +# define __THROW_BAD_ALLOC puts("out of memory\n"); exit(1) +# else /* !defined(_STLP_USE_EXCEPTIONS) */ +# define __THROW_BAD_ALLOC throw _STLP_STD::bad_alloc() +# endif /* !defined(_STLP_USE_EXCEPTIONS) */ +# endif /* __THROW_BAD_ALLOC */ + +# ifndef _STLP_INTERNAL_NEW_HEADER +# include +# endif + +// #if ! defined (__SYMBIAN32__) +#if /* defined (_STLP_THREADS) && */ ! defined (_STLP_INTERNAL_THREADS_H) +# include +// #endif +#endif + +#ifndef _STLP_INTERNAL_CONSTRUCT_H +# include +#endif + +#ifndef __ALLOC +# define __ALLOC __sgi_alloc +#endif + +# ifndef __RESTRICT +# define __RESTRICT +# endif + +#if defined (_STLP_THREADS) || (defined(_STLP_OWN_IOSTREAMS) && ! defined (_STLP_NO_THREADS) && ! defined (_NOTHREADS) ) +# define _STLP_NODE_ALLOCATOR_THREADS true +#else +# define _STLP_NODE_ALLOCATOR_THREADS false +#endif + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_USE_RAW_SGI_ALLOCATORS) +template struct __allocator; +# endif + +#ifndef _STLP_NO_NODE_ALLOC + +// Malloc-based allocator. Typically slower than default alloc below. +// Typically thread-safe and more storage efficient. + +typedef void (* __oom_handler_type)(); + +template +class __malloc_alloc { +private: + static void* _STLP_CALL _S_oom_malloc(size_t); + static __oom_handler_type __oom_handler; +public: + // this one is needed for proper simple_alloc wrapping + typedef char value_type; +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS) + template struct rebind { + typedef __allocator<_Tp1, __malloc_alloc<__inst> > other; + }; +# endif + static void* _STLP_CALL allocate(size_t __n) { + void* __result = malloc(__n); + if (0 == __result) __result = _S_oom_malloc(__n); + return __result; + } + static void _STLP_CALL deallocate(void* __p, size_t /* __n */) { free((char*)__p); } + static __oom_handler_type _STLP_CALL set_malloc_handler(__oom_handler_type __f) { + __oom_handler_type __old = __oom_handler; + __oom_handler = __f; + return(__old); + } +}; + +# endif + +// New-based allocator. Typically slower than default alloc below. +// Typically thread-safe and more storage efficient. +class _STLP_CLASS_DECLSPEC __new_alloc { +public: + // this one is needed for proper simple_alloc wrapping + typedef char value_type; +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined(_STLP_USE_RAW_SGI_ALLOCATORS) + template struct rebind { + typedef __allocator<_Tp1, __new_alloc > other; + }; +# endif + static void* _STLP_CALL allocate(size_t __n) { + return __stl_new(__n); + } + static void _STLP_CALL deallocate(void* __p, size_t) { __stl_delete(__p); } +}; + + +// Allocator adaptor to check size arguments for debugging. +// Reports errors using assert. Checking can be disabled with +// NDEBUG, but it's far better to just use the underlying allocator +// instead when no checking is desired. +// There is some evidence that this can confuse Purify. +// This adaptor can only be applied to raw allocators + +template +class __debug_alloc : public _Alloc { +public: + typedef _Alloc __allocator_type; + typedef typename _Alloc::value_type value_type; +private: + struct __alloc_header { + size_t __magic: 16; + size_t __type_size:16; + _STLP_UINT32_T _M_size; + }; // that is 8 bytes for sure + // Sunpro CC has bug on enums, so extra_before/after set explicitly + enum { __pad=8, __magic=0xdeba, __deleted_magic = 0xdebd, + __shred_byte= _STLP_SHRED_BYTE + }; + + enum { __extra_before = 16, __extra_after = 8 }; + // Size of space used to store size. Note + // that this must be large enough to preserve + // alignment. + static size_t _STLP_CALL __extra_before_chunk() { + return (long)__extra_before/sizeof(value_type)+ + (size_t)((long)__extra_before%sizeof(value_type)>0); + } + static size_t _STLP_CALL __extra_after_chunk() { + return (long)__extra_after/sizeof(value_type)+ + (size_t)((long)__extra_after%sizeof(value_type)>0); + } +public: +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS) + template struct rebind { + typedef __allocator< _Tp1, __debug_alloc<_Alloc> > other; + }; +# endif + __debug_alloc() {} + ~__debug_alloc() {} + static void * _STLP_CALL allocate(size_t); + static void _STLP_CALL deallocate(void *, size_t); +}; + +# if defined(__OS400__) +enum {_ALIGN = 16, _ALIGN_SHIFT=4, _MAX_BYTES = 256}; +# define _STLP_NFREELISTS 16 +# else +enum {_ALIGN = 8, _ALIGN_SHIFT=3, _MAX_BYTES = 128}; +# define _STLP_NFREELISTS 16 +# endif /* __OS400__ */ + +#ifndef _STLP_NO_NODE_ALLOC + +// Default node allocator. +// With a reasonable compiler, this should be roughly as fast as the +// original STL class-specific allocators, but with less fragmentation. +// Default_alloc_template parameters are experimental and MAY +// DISAPPEAR in the future. Clients should just use alloc for now. +// +// Important implementation properties: +// 1. If the client request an object of size > _MAX_BYTES, the resulting +// object will be obtained directly from malloc. +// 2. In all other cases, we allocate an object of size exactly +// _S_round_up(requested_size). Thus the client has enough size +// information that we can return the object to the proper free list +// without permanently losing part of the object. +// + +// The first template parameter specifies whether more than one thread +// may use this allocator. It is safe to allocate an object from +// one instance of a default_alloc and deallocate it with another +// one. This effectively transfers its ownership to the second one. +// This may have undesirable effects on reference locality. +// The second parameter is unreferenced and serves only to allow the +// creation of multiple default_alloc instances. + +class _STLP_CLASS_DECLSPEC _Node_alloc_obj { +public: + _Node_alloc_obj * _M_free_list_link; +}; + +template +class __node_alloc { + _STLP_PRIVATE: + static inline size_t _STLP_CALL _S_round_up(size_t __bytes) { return (((__bytes) + (size_t)_ALIGN-1) & ~((size_t)_ALIGN - 1)); } + typedef _Node_alloc_obj _Obj; +private: + // Returns an object of size __n, and optionally adds to size __n free list. + static void* _STLP_CALL _S_refill(size_t __n); + // Allocates a chunk for nobjs of size size. nobjs may be reduced + // if it is inconvenient to allocate the requested number. + static char* _STLP_CALL _S_chunk_alloc(size_t __p_size, int& __nobjs); + // Chunk allocation state. + static _Node_alloc_obj * _STLP_VOLATILE _S_free_list[_STLP_NFREELISTS]; + static char* _S_start_free; + static char* _S_end_free; + static size_t _S_heap_size; + static void * _STLP_CALL _M_allocate(size_t __n); + /* __p may not be 0 */ + static void _STLP_CALL _M_deallocate(void *__p, size_t __n); +public: + // this one is needed for proper simple_alloc wrapping + typedef char value_type; +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_USE_RAW_SGI_ALLOCATORS) + template struct rebind { + typedef __allocator<_Tp1, __node_alloc<__threads, __inst> > other; + }; +# endif + /* __n must be > 0 */ + static void * _STLP_CALL allocate(size_t __n) { +return (__n > (size_t)_MAX_BYTES) ? __stl_new(__n) : _M_allocate(__n); } + /* __p may not be 0 */ + static void _STLP_CALL deallocate(void *__p, size_t __n) { +if (__n > (size_t)_MAX_BYTES) __stl_delete(__p); else _M_deallocate(__p, __n); } +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS __malloc_alloc<0>; +_STLP_EXPORT_TEMPLATE_CLASS __node_alloc<_STLP_NODE_ALLOCATOR_THREADS, 0>; +# endif /* _STLP_USE_TEMPLATE_EXPORT */ +typedef __node_alloc<_STLP_NODE_ALLOCATOR_THREADS, 0> _Node_alloc; +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<_Node_alloc>; +_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__new_alloc>; +_STLP_EXPORT_TEMPLATE_CLASS __debug_alloc<__malloc_alloc<0> >; +# endif + +#endif + +# if defined (_STLP_USE_PERTHREAD_ALLOC) + +_STLP_END_NAMESPACE +// include additional header here +# include +_STLP_BEGIN_NAMESPACE + +# if defined ( _STLP_DEBUG_ALLOC ) +typedef __debug_alloc<__pthread_alloc> __sgi_alloc; +# else +typedef __pthread_alloc __sgi_alloc; +# endif /* _STLP_DEBUG_ALLOC */ + +typedef __pthread_alloc __single_client_alloc; +typedef __pthread_alloc __multithreaded_alloc; + +# else + +# if defined ( _STLP_USE_NEWALLOC ) + +# if defined ( _STLP_DEBUG_ALLOC ) +typedef __debug_alloc<__new_alloc> __sgi_alloc; +# else +typedef __new_alloc __sgi_alloc; +# endif /* _STLP_DEBUG_ALLOC */ + +typedef __new_alloc __single_client_alloc; +typedef __new_alloc __multithreaded_alloc; + +# elif defined (_STLP_USE_MALLOC) + +# if defined ( _STLP_DEBUG_ALLOC ) +typedef __debug_alloc<__malloc_alloc<0> > __sgi_alloc; +# else +typedef __malloc_alloc<0> __sgi_alloc; +# endif /* _STLP_DEBUG_ALLOC */ + +typedef __malloc_alloc<0> __single_client_alloc; +typedef __malloc_alloc<0> __multithreaded_alloc; + +# else + +# if defined ( _STLP_DEBUG_ALLOC ) +typedef __debug_alloc<_Node_alloc> __sgi_alloc; +# else +typedef _Node_alloc __sgi_alloc; +# endif + +typedef __node_alloc __single_client_alloc; +typedef __node_alloc __multithreaded_alloc; + +# endif /* _STLP_USE_NEWALLOC */ +# endif /* PTHREAD_ALLOC */ + +// This implements allocators as specified in the C++ standard. +// +// Note that standard-conforming allocators use many language features +// that are not yet widely implemented. In particular, they rely on +// member templates, partial specialization, partial ordering of function +// templates, the typename keyword, and the use of the template keyword +// to refer to a template member of a dependent type. + +template +class allocator { +public: + + typedef _Tp value_type; + typedef value_type * pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef size_t size_type; + typedef ptrdiff_t difference_type; +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) + template struct rebind { + typedef allocator<_Tp1> other; + }; +# endif + allocator() _STLP_NOTHROW {} + # if defined (_STLP_MEMBER_TEMPLATES) + template allocator(const allocator<_Tp1>&) _STLP_NOTHROW {} + # endif + allocator(const allocator<_Tp>&) _STLP_NOTHROW {} + ~allocator() _STLP_NOTHROW {} + pointer address(reference __x) const { return &__x; } + const_pointer address(const_reference __x) const { return &__x; } + // __n is permitted to be 0. The C++ standard says nothing about what the return value is when __n == 0. + _Tp* allocate(size_type __n, const void* = 0) { + return __n != 0 ? __REINTERPRET_CAST(value_type*,__sgi_alloc::allocate(__n * sizeof(value_type))) : 0; + } + // __p is permitted to be a null pointer, only if n==0. + void deallocate(pointer __p, size_type __n) { + _STLP_ASSERT( (__p == 0) == (__n == 0) ) + if (__p != 0) __sgi_alloc::deallocate((void*)__p, __n * sizeof(value_type)); + } + // backwards compatibility + void deallocate(pointer __p) const { if (__p != 0) __sgi_alloc::deallocate((void*)__p, sizeof(value_type)); } + size_type max_size() const _STLP_NOTHROW { return size_t(-1) / sizeof(value_type); } + void construct(pointer __p, const _Tp& __val) { _STLP_STD::_Construct(__p, __val); } + void destroy(pointer __p) { _STLP_STD::_Destroy(__p); } +# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) + template bool operator==(const allocator<_T2>&) const _STLP_NOTHROW { return true; } + template bool operator!=(const allocator<_T2>&) const _STLP_NOTHROW { return false; } +# endif +}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC allocator { +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; +# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) + typedef void value_type; +# endif +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) + template struct rebind { + typedef allocator<_Tp1> other; + }; +# endif +# if defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__)) //*ty 03/24/2001 - MPW compilers get confused on these operator definitions + template bool operator==(const allocator<_T2>&) const _STLP_NOTHROW { return true; } + template bool operator!=(const allocator<_T2>&) const _STLP_NOTHROW { return false; } +# endif +}; + +#if !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__))) //*ty 03/24/2001 - MPW compilers get confused on these operator definitions +template inline bool _STLP_CALL operator==(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW { return true; } +template inline bool _STLP_CALL operator!=(const allocator<_T1>&, const allocator<_T2>&) _STLP_NOTHROW { return false; } +#endif + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS allocator; +# if defined (_STLP_HAS_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS allocator; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +// Another allocator adaptor: _Alloc_traits. This serves two +// purposes. First, make it possible to write containers that can use +// either SGI-style allocators or standard-conforming allocator. + +// The fully general version. +template +struct _Alloc_traits +{ + typedef _Allocator _Orig; +# if defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) + typedef typename _Allocator::_STLP_TEMPLATE rebind<_Tp> _Rebind_type; + typedef typename _Rebind_type::other allocator_type; + static allocator_type create_allocator(const _Orig& __a) { return allocator_type(__a); } +# else + // this is not actually true, used only to pass this type through + // to dynamic overload selection in _STLP_alloc_proxy methods + typedef _Allocator allocator_type; +# endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ +}; + +#ifndef _STLP_FORCE_ALLOCATORS +#define _STLP_FORCE_ALLOCATORS(a,y) +#endif + +#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined (_STLP_MEMBER_TEMPLATE_CLASSES) +// The version for the default allocator, for rare occasion when we have partial spec w/o member template classes +template +struct _Alloc_traits<_Tp, allocator<_Tp1> > { + typedef allocator<_Tp1> _Orig; + typedef allocator<_Tp> allocator_type; + static allocator_type create_allocator(const allocator<_Tp1 >& __a) { return allocator_type(__a); } +}; +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +/* macro to convert the allocator for initialization + * not using MEMBER_TEMPLATE_CLASSES as it should work given template constructor */ +#if defined (_STLP_MEMBER_TEMPLATES) || ! defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +/* if _STLP_NO_TEMPLATE_CONVERSIONS is set, the member template constructor is + * not used implicitly to convert allocator parameter, so let us do it explicitly */ +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) && defined (_STLP_NO_TEMPLATE_CONVERSIONS) +# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) +# else +# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __a +# endif +/* else convert, but only if partial specialization works, since else + * Container::allocator_type won't be different */ +#else +# define _STLP_CONVERT_ALLOCATOR(__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) +#endif + +# if defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) +template +inline _STLP_TYPENAME_ON_RETURN_TYPE _Alloc_traits<_Tp, _Alloc>::allocator_type _STLP_CALL +__stl_alloc_create(const _Alloc& __a, const _Tp*) { + typedef typename _Alloc::_STLP_TEMPLATE rebind<_Tp>::other _Rebound_type; + return _Rebound_type(__a); +} +#else +// If custom allocators are being used without member template classes support : +// user (on purpose) is forced to define rebind/get operations !!! +template +inline allocator<_Tp2>& _STLP_CALL +__stl_alloc_rebind(allocator<_Tp1>& __a, const _Tp2*) { return (allocator<_Tp2>&)(__a); } +template +inline allocator<_Tp2> _STLP_CALL +__stl_alloc_create(const allocator<_Tp1>&, const _Tp2*) { return allocator<_Tp2>(); } +#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ + +# ifdef _STLP_USE_RAW_SGI_ALLOCATORS +// move obsolete stuff out of the way +# include +# endif + +// inheritance is being used for EBO optimization +template +class _STLP_alloc_proxy : public _MaybeReboundAlloc { +private: + typedef _MaybeReboundAlloc _Base; + typedef _STLP_alloc_proxy<_Value, _Tp, _MaybeReboundAlloc> _Self; +public: + _Value _M_data; + inline _STLP_alloc_proxy(const _MaybeReboundAlloc& __a, _Value __p) : _MaybeReboundAlloc(__a), _M_data(__p) {} + +# if 0 + inline _STLP_alloc_proxy(const _Self& __x) : _MaybeReboundAlloc(__x), _M_data(__x._M_data) {} + // construction/destruction + inline _Self& operator = (const _Self& __x) { + *(_MaybeReboundAlloc*)this = *(_MaybeReboundAlloc*)__x; + _M_data = __x._M_data; return *this; + } + inline _Self& operator = (const _Base& __x) { ((_Base&)*this) = __x; return *this; } +# endif + // Unified interface to perform allocate()/deallocate() with limited + // language support +#if ! defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) + // else it is rebound already, and allocate() member is accessible + inline _Tp* allocate(size_t __n) { + return __stl_alloc_rebind(__STATIC_CAST(_Base&,*this),(_Tp*)0).allocate(__n,0); + } + inline void deallocate(_Tp* __p, size_t __n) { + __stl_alloc_rebind(__STATIC_CAST(_Base&, *this),(_Tp*)0).deallocate(__p, __n); + } +#endif /* !_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy >; +# if defined (_STLP_HAS_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS _STLP_alloc_proxy >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +# undef _STLP_NODE_ALLOCATOR_THREADS + +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_ALLOC_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_auto_ptr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_auto_ptr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,175 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_AUTO_PTR_H +# define _STLP_AUTO_PTR_H + +_STLP_BEGIN_NAMESPACE +// implementation primitive +class __ptr_base { +public: + void* _M_p; + void __set(const void* __p) { _M_p = __CONST_CAST(void*,__p); } + void __set(void* __p) { _M_p = __p; } +}; + +template class auto_ptr_ref { +public: + __ptr_base& _M_r; + _Tp* const _M_p; + + auto_ptr_ref(__ptr_base& __r, _Tp* __p) : _M_r(__r), _M_p(__p) { } + + _Tp* release() const { _M_r.__set((void*)0); return _M_p; } + +}; + +template class auto_ptr : public __ptr_base { +public: + typedef _Tp element_type; + typedef auto_ptr<_Tp> _Self; + + _Tp* release() { + _Tp* __px = this->get(); + this->_M_p = 0; + return __px; + } + + void reset(_Tp* __px=0) { + _Tp* __pt = this->get(); + if (__px != __pt) + delete __pt; + this->__set(__px); + } + + _Tp* get() const { return __REINTERPRET_CAST(_Tp*,__CONST_CAST(void*,_M_p)); } + +# if !defined (_STLP_NO_ARROW_OPERATOR) + _Tp* operator->() const { + _STLP_VERBOSE_ASSERT(get()!=0, _StlMsg_AUTO_PTR_NULL) + return get(); + } +# endif + _Tp& operator*() const { + _STLP_VERBOSE_ASSERT(get()!=0, _StlMsg_AUTO_PTR_NULL) + return *get(); + } + + auto_ptr() { + this->_M_p = 0; +# ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::PushL(TCleanupItem(Close, (void*)this)); +# endif + } + + explicit auto_ptr(_Tp* __px) { + this->__set(__px); +# ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::PushL(TCleanupItem(Close, (void*)this)); +# endif + } + +#if defined (_STLP_MEMBER_TEMPLATES) +# if !defined (_STLP_NO_TEMPLATE_CONVERSIONS) + template auto_ptr(auto_ptr<_Tp1>& __r) { + _Tp* __conversionCheck = __r.release(); + this->__set(__conversionCheck); +# ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::PushL(TCleanupItem(Close, (void*)this)); +# endif + } +# endif + template auto_ptr<_Tp>& operator=(auto_ptr<_Tp1>& __r) { + _Tp* __conversionCheck = __r.release(); + reset(__conversionCheck); + return *this; + } +#endif /* _STLP_MEMBER_TEMPLATES */ + + auto_ptr(_Self& __r) + { this->__set(__r.release()); +# ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::PushL(TCleanupItem(Close, (void*)this)); +# endif + } + + _Self& operator=(_Self& __r) { + reset(__r.release()); + return *this; + } + + ~auto_ptr() { _STLP_POP_ITEM reset(0); } + + auto_ptr(auto_ptr_ref<_Tp> __r) { + this->__set(__r.release()); +# ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::PushL(TCleanupItem(Close, (void*)this)); +# endif + } + + _Self& operator=(auto_ptr_ref<_Tp> __r) { + reset(__r.release()); + return *this; + } + + + _Self& operator=(_Tp* __px) { + reset(__px); + return *this; + } + + + +# if defined(_STLP_MEMBER_TEMPLATES) && !defined(_STLP_NO_TEMPLATE_CONVERSIONS) + template operator auto_ptr_ref<_Tp1>() { + return auto_ptr_ref<_Tp1>(*this, this->get()); + } + template operator auto_ptr<_Tp1>() { + return auto_ptr<_Tp1>(release()); + } +# else + operator auto_ptr_ref<_Tp>() + { return auto_ptr_ref<_Tp>(*this, this->get()); } +# endif + +# ifdef _STLP_USE_TRAP_LEAVE + static void Close(void* aPtr); +# endif + +}; + +# ifdef _STLP_USE_TRAP_LEAVE +template +void +auto_ptr<_Tp>::Close(void* aPtr) +{ + auto_ptr<_Tp>* self = (auto_ptr<_Tp>*)aPtr; + self->reset(0); +} +# endif + + +_STLP_END_NAMESPACE + +#endif /* _STLP_AUTO_PTR_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_bitset.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_bitset.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,407 @@ +/* + * Copyright (c) 1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_BITSET_C +# define _STLP_BITSET_C + +# ifndef _STLP_BITSET_H +# include +# endif + +# define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long)) + +_STLP_BEGIN_NAMESPACE + +// +// Definitions of non-inline functions from _Base_bitset. +// + + +template +void _STLP_IMPORT_METHOD _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift) +{ + + if (__shift != 0) { + const size_t __wshift = __shift / __BITS_PER_WORD; + const size_t __offset = __shift % __BITS_PER_WORD; + + if (__offset == 0) + for (size_t __n = _Nw - 1; __n >= __wshift; --__n) + _M_w[__n] = _M_w[__n - __wshift]; + + else { + const size_t __sub_offset = __BITS_PER_WORD - __offset; + for (size_t __n = _Nw - 1; __n > __wshift; --__n) + _M_w[__n] = (_M_w[__n - __wshift] << __offset) | + (_M_w[__n - __wshift - 1] >> __sub_offset); + _M_w[__wshift] = _M_w[0] << __offset; + } + + fill(_M_w + 0, _M_w + __wshift, __STATIC_CAST(_WordT,0)); + } +} + +template +void _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift) +{ + + if (__shift != 0) { + const size_t __wshift = __shift / __BITS_PER_WORD; + const size_t __offset = __shift % __BITS_PER_WORD; + const size_t __limit = _Nw - __wshift - 1; + + if (__offset == 0) + for (size_t __n = 0; __n <= __limit; ++__n) + _M_w[__n] = _M_w[__n + __wshift]; + + else { + const size_t __sub_offset = __BITS_PER_WORD - __offset; + for (size_t __n = 0; __n < __limit; ++__n) + _M_w[__n] = (_M_w[__n + __wshift] >> __offset) | + (_M_w[__n + __wshift + 1] << __sub_offset); + _M_w[__limit] = _M_w[_Nw-1] >> __offset; + } + + fill(_M_w + __limit + 1, _M_w + _Nw, __STATIC_CAST(_WordT,0)); + } +} + +template +unsigned long _Base_bitset<_Nw>::_M_do_to_ulong() const +{ + for (size_t __i = 1; __i < _Nw; ++__i) + if (_M_w[__i]) + __stl_throw_overflow_error("bitset"); + return _M_w[0]; +} // End _M_do_to_ulong + +template +size_t _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const +{ + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _WordT __thisword = _M_w[__i]; + if ( __thisword != __STATIC_CAST(_WordT,0) ) { + // find byte within word + for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); + if ( __this_byte ) + return __i*__BITS_PER_WORD + __j*CHAR_BIT + + _Bs_G::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + } + // not found, so return an indication of failure. + return __not_found; +} + +template +size_t +_Base_bitset<_Nw>::_M_do_find_next(size_t __prev, + size_t __not_found) const +{ + // make bound inclusive + ++__prev; + + // check out of bounds + if ( __prev >= _Nw * __BITS_PER_WORD ) + return __not_found; + + // search first word + size_t __i = _S_whichword(__prev); + _WordT __thisword = _M_w[__i]; + + // mask off bits below bound + __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev); + + if ( __thisword != __STATIC_CAST(_WordT,0) ) { + // find byte within word + // get first byte into place + __thisword >>= _S_whichbyte(__prev) * CHAR_BIT; + for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); + if ( __this_byte ) + return __i*__BITS_PER_WORD + __j*CHAR_BIT + + _Bs_G::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + + // check subsequent words + __i++; + for ( ; __i < _Nw; __i++ ) { + /* _WordT */ __thisword = _M_w[__i]; + if ( __thisword != __STATIC_CAST(_WordT,0) ) { + // find byte within word + for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); + if ( __this_byte ) + return __i*__BITS_PER_WORD + __j*CHAR_BIT + + _Bs_G::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + } + + // not found, so return an indication of failure. + return __not_found; +} // end _M_do_find_next + + + +# if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) + +#if defined ( _STLP_USE_NEW_IOSTREAMS) + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x) +{ + basic_string<_CharT, _Traits> __tmp; + __tmp.reserve(_Nb); + + // Skip whitespace + typename basic_istream<_CharT, _Traits>::sentry __sentry(__is); + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); + for (size_t __i = 0; __i < _Nb; ++__i) { + static typename _Traits::int_type __eof = _Traits::eof(); + + typename _Traits::int_type __c1 = __buf->sbumpc(); + if (_Traits::eq_int_type(__c1, __eof)) { + __is.setstate(ios_base::eofbit); + break; + } + else { + char __c2 = _Traits::to_char_type(__c1); + char __c = __is.narrow(__c2, '*'); + + if (__c == '0' || __c == '1') + __tmp.push_back(__c); + else if (_Traits::eq_int_type(__buf->sputbackc(__c2), __eof)) { + __is.setstate(ios_base::failbit); + break; + } + } + } + + if (__tmp.empty()) + __is.setstate(ios_base::failbit); + else + __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb); + } + + return __is; +} + +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, + const bitset<_Nb>& __x) +{ + basic_string<_CharT, _Traits> __tmp; + __x._M_copy_to_string(__tmp); + return __os << __tmp; +} + +#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) + +// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll +template +_ISTREAM_DLL& _STLP_CALL +operator>>(_ISTREAM_DLL& __is, bitset<_Nb>& __x) { + string __tmp; + __tmp.reserve(_Nb); + + // In new templatized iostreams, use istream::sentry + if (__is.flags() & ios::skipws) { + char __c; + do + __is.get(__c); + while (__is && isspace(__c)); + if (__is) + __is.putback(__c); + } + + for (size_t __i = 0; __i < _Nb; ++__i) { + char __c; + __is.get(__c); + + if (!__is) + break; + else if (__c != '0' && __c != '1') { + __is.putback(__c); + break; + } + else + __tmp.push_back(__c); + } + + if (__tmp.empty()) + __is.clear(__is.rdstate() | ios::failbit); + else + __x._M_copy_from_string(__tmp, __STATIC_CAST(size_t,0), _Nb); + + return __is; +} + +# endif /* _STLP_USE_NEW_IOSTREAMS */ + +# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ + + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +// ------------------------------------------------------------ +// Lookup tables for find and count operations. + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +template +const unsigned char _Bs_G<_Dummy>::_S_bit_count[256] = { +# else +const unsigned char _Bs_G::_S_bit_count[256] _STLP_WEAK = { +# endif + 0, /* 0 */ 1, /* 1 */ 1, /* 2 */ 2, /* 3 */ 1, /* 4 */ + 2, /* 5 */ 2, /* 6 */ 3, /* 7 */ 1, /* 8 */ 2, /* 9 */ + 2, /* 10 */ 3, /* 11 */ 2, /* 12 */ 3, /* 13 */ 3, /* 14 */ + 4, /* 15 */ 1, /* 16 */ 2, /* 17 */ 2, /* 18 */ 3, /* 19 */ + 2, /* 20 */ 3, /* 21 */ 3, /* 22 */ 4, /* 23 */ 2, /* 24 */ + 3, /* 25 */ 3, /* 26 */ 4, /* 27 */ 3, /* 28 */ 4, /* 29 */ + 4, /* 30 */ 5, /* 31 */ 1, /* 32 */ 2, /* 33 */ 2, /* 34 */ + 3, /* 35 */ 2, /* 36 */ 3, /* 37 */ 3, /* 38 */ 4, /* 39 */ + 2, /* 40 */ 3, /* 41 */ 3, /* 42 */ 4, /* 43 */ 3, /* 44 */ + 4, /* 45 */ 4, /* 46 */ 5, /* 47 */ 2, /* 48 */ 3, /* 49 */ + 3, /* 50 */ 4, /* 51 */ 3, /* 52 */ 4, /* 53 */ 4, /* 54 */ + 5, /* 55 */ 3, /* 56 */ 4, /* 57 */ 4, /* 58 */ 5, /* 59 */ + 4, /* 60 */ 5, /* 61 */ 5, /* 62 */ 6, /* 63 */ 1, /* 64 */ + 2, /* 65 */ 2, /* 66 */ 3, /* 67 */ 2, /* 68 */ 3, /* 69 */ + 3, /* 70 */ 4, /* 71 */ 2, /* 72 */ 3, /* 73 */ 3, /* 74 */ + 4, /* 75 */ 3, /* 76 */ 4, /* 77 */ 4, /* 78 */ 5, /* 79 */ + 2, /* 80 */ 3, /* 81 */ 3, /* 82 */ 4, /* 83 */ 3, /* 84 */ + 4, /* 85 */ 4, /* 86 */ 5, /* 87 */ 3, /* 88 */ 4, /* 89 */ + 4, /* 90 */ 5, /* 91 */ 4, /* 92 */ 5, /* 93 */ 5, /* 94 */ + 6, /* 95 */ 2, /* 96 */ 3, /* 97 */ 3, /* 98 */ 4, /* 99 */ + 3, /* 100 */ 4, /* 101 */ 4, /* 102 */ 5, /* 103 */ 3, /* 104 */ + 4, /* 105 */ 4, /* 106 */ 5, /* 107 */ 4, /* 108 */ 5, /* 109 */ + 5, /* 110 */ 6, /* 111 */ 3, /* 112 */ 4, /* 113 */ 4, /* 114 */ + 5, /* 115 */ 4, /* 116 */ 5, /* 117 */ 5, /* 118 */ 6, /* 119 */ + 4, /* 120 */ 5, /* 121 */ 5, /* 122 */ 6, /* 123 */ 5, /* 124 */ + 6, /* 125 */ 6, /* 126 */ 7, /* 127 */ 1, /* 128 */ 2, /* 129 */ + 2, /* 130 */ 3, /* 131 */ 2, /* 132 */ 3, /* 133 */ 3, /* 134 */ + 4, /* 135 */ 2, /* 136 */ 3, /* 137 */ 3, /* 138 */ 4, /* 139 */ + 3, /* 140 */ 4, /* 141 */ 4, /* 142 */ 5, /* 143 */ 2, /* 144 */ + 3, /* 145 */ 3, /* 146 */ 4, /* 147 */ 3, /* 148 */ 4, /* 149 */ + 4, /* 150 */ 5, /* 151 */ 3, /* 152 */ 4, /* 153 */ 4, /* 154 */ + 5, /* 155 */ 4, /* 156 */ 5, /* 157 */ 5, /* 158 */ 6, /* 159 */ + 2, /* 160 */ 3, /* 161 */ 3, /* 162 */ 4, /* 163 */ 3, /* 164 */ + 4, /* 165 */ 4, /* 166 */ 5, /* 167 */ 3, /* 168 */ 4, /* 169 */ + 4, /* 170 */ 5, /* 171 */ 4, /* 172 */ 5, /* 173 */ 5, /* 174 */ + 6, /* 175 */ 3, /* 176 */ 4, /* 177 */ 4, /* 178 */ 5, /* 179 */ + 4, /* 180 */ 5, /* 181 */ 5, /* 182 */ 6, /* 183 */ 4, /* 184 */ + 5, /* 185 */ 5, /* 186 */ 6, /* 187 */ 5, /* 188 */ 6, /* 189 */ + 6, /* 190 */ 7, /* 191 */ 2, /* 192 */ 3, /* 193 */ 3, /* 194 */ + 4, /* 195 */ 3, /* 196 */ 4, /* 197 */ 4, /* 198 */ 5, /* 199 */ + 3, /* 200 */ 4, /* 201 */ 4, /* 202 */ 5, /* 203 */ 4, /* 204 */ + 5, /* 205 */ 5, /* 206 */ 6, /* 207 */ 3, /* 208 */ 4, /* 209 */ + 4, /* 210 */ 5, /* 211 */ 4, /* 212 */ 5, /* 213 */ 5, /* 214 */ + 6, /* 215 */ 4, /* 216 */ 5, /* 217 */ 5, /* 218 */ 6, /* 219 */ + 5, /* 220 */ 6, /* 221 */ 6, /* 222 */ 7, /* 223 */ 3, /* 224 */ + 4, /* 225 */ 4, /* 226 */ 5, /* 227 */ 4, /* 228 */ 5, /* 229 */ + 5, /* 230 */ 6, /* 231 */ 4, /* 232 */ 5, /* 233 */ 5, /* 234 */ + 6, /* 235 */ 5, /* 236 */ 6, /* 237 */ 6, /* 238 */ 7, /* 239 */ + 4, /* 240 */ 5, /* 241 */ 5, /* 242 */ 6, /* 243 */ 5, /* 244 */ + 6, /* 245 */ 6, /* 246 */ 7, /* 247 */ 5, /* 248 */ 6, /* 249 */ + 6, /* 250 */ 7, /* 251 */ 6, /* 252 */ 7, /* 253 */ 7, /* 254 */ + 8 /* 255 */ +}; // end _Bitset_global + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +template +const unsigned char _Bs_G<_Dummy>::_S_first_one[256] = { +# else +const unsigned char _Bs_G::_S_first_one[256] _STLP_WEAK = { +# endif + + 0, /* 0 */ 0, /* 1 */ 1, /* 2 */ 0, /* 3 */ 2, /* 4 */ + 0, /* 5 */ 1, /* 6 */ 0, /* 7 */ 3, /* 8 */ 0, /* 9 */ + 1, /* 10 */ 0, /* 11 */ 2, /* 12 */ 0, /* 13 */ 1, /* 14 */ + 0, /* 15 */ 4, /* 16 */ 0, /* 17 */ 1, /* 18 */ 0, /* 19 */ + 2, /* 20 */ 0, /* 21 */ 1, /* 22 */ 0, /* 23 */ 3, /* 24 */ + 0, /* 25 */ 1, /* 26 */ 0, /* 27 */ 2, /* 28 */ 0, /* 29 */ + 1, /* 30 */ 0, /* 31 */ 5, /* 32 */ 0, /* 33 */ 1, /* 34 */ + 0, /* 35 */ 2, /* 36 */ 0, /* 37 */ 1, /* 38 */ 0, /* 39 */ + 3, /* 40 */ 0, /* 41 */ 1, /* 42 */ 0, /* 43 */ 2, /* 44 */ + 0, /* 45 */ 1, /* 46 */ 0, /* 47 */ 4, /* 48 */ 0, /* 49 */ + 1, /* 50 */ 0, /* 51 */ 2, /* 52 */ 0, /* 53 */ 1, /* 54 */ + 0, /* 55 */ 3, /* 56 */ 0, /* 57 */ 1, /* 58 */ 0, /* 59 */ + 2, /* 60 */ 0, /* 61 */ 1, /* 62 */ 0, /* 63 */ 6, /* 64 */ + 0, /* 65 */ 1, /* 66 */ 0, /* 67 */ 2, /* 68 */ 0, /* 69 */ + 1, /* 70 */ 0, /* 71 */ 3, /* 72 */ 0, /* 73 */ 1, /* 74 */ + 0, /* 75 */ 2, /* 76 */ 0, /* 77 */ 1, /* 78 */ 0, /* 79 */ + 4, /* 80 */ 0, /* 81 */ 1, /* 82 */ 0, /* 83 */ 2, /* 84 */ + 0, /* 85 */ 1, /* 86 */ 0, /* 87 */ 3, /* 88 */ 0, /* 89 */ + 1, /* 90 */ 0, /* 91 */ 2, /* 92 */ 0, /* 93 */ 1, /* 94 */ + 0, /* 95 */ 5, /* 96 */ 0, /* 97 */ 1, /* 98 */ 0, /* 99 */ + 2, /* 100 */ 0, /* 101 */ 1, /* 102 */ 0, /* 103 */ 3, /* 104 */ + 0, /* 105 */ 1, /* 106 */ 0, /* 107 */ 2, /* 108 */ 0, /* 109 */ + 1, /* 110 */ 0, /* 111 */ 4, /* 112 */ 0, /* 113 */ 1, /* 114 */ + 0, /* 115 */ 2, /* 116 */ 0, /* 117 */ 1, /* 118 */ 0, /* 119 */ + 3, /* 120 */ 0, /* 121 */ 1, /* 122 */ 0, /* 123 */ 2, /* 124 */ + 0, /* 125 */ 1, /* 126 */ 0, /* 127 */ 7, /* 128 */ 0, /* 129 */ + 1, /* 130 */ 0, /* 131 */ 2, /* 132 */ 0, /* 133 */ 1, /* 134 */ + 0, /* 135 */ 3, /* 136 */ 0, /* 137 */ 1, /* 138 */ 0, /* 139 */ + 2, /* 140 */ 0, /* 141 */ 1, /* 142 */ 0, /* 143 */ 4, /* 144 */ + 0, /* 145 */ 1, /* 146 */ 0, /* 147 */ 2, /* 148 */ 0, /* 149 */ + 1, /* 150 */ 0, /* 151 */ 3, /* 152 */ 0, /* 153 */ 1, /* 154 */ + 0, /* 155 */ 2, /* 156 */ 0, /* 157 */ 1, /* 158 */ 0, /* 159 */ + 5, /* 160 */ 0, /* 161 */ 1, /* 162 */ 0, /* 163 */ 2, /* 164 */ + 0, /* 165 */ 1, /* 166 */ 0, /* 167 */ 3, /* 168 */ 0, /* 169 */ + 1, /* 170 */ 0, /* 171 */ 2, /* 172 */ 0, /* 173 */ 1, /* 174 */ + 0, /* 175 */ 4, /* 176 */ 0, /* 177 */ 1, /* 178 */ 0, /* 179 */ + 2, /* 180 */ 0, /* 181 */ 1, /* 182 */ 0, /* 183 */ 3, /* 184 */ + 0, /* 185 */ 1, /* 186 */ 0, /* 187 */ 2, /* 188 */ 0, /* 189 */ + 1, /* 190 */ 0, /* 191 */ 6, /* 192 */ 0, /* 193 */ 1, /* 194 */ + 0, /* 195 */ 2, /* 196 */ 0, /* 197 */ 1, /* 198 */ 0, /* 199 */ + 3, /* 200 */ 0, /* 201 */ 1, /* 202 */ 0, /* 203 */ 2, /* 204 */ + 0, /* 205 */ 1, /* 206 */ 0, /* 207 */ 4, /* 208 */ 0, /* 209 */ + 1, /* 210 */ 0, /* 211 */ 2, /* 212 */ 0, /* 213 */ 1, /* 214 */ + 0, /* 215 */ 3, /* 216 */ 0, /* 217 */ 1, /* 218 */ 0, /* 219 */ + 2, /* 220 */ 0, /* 221 */ 1, /* 222 */ 0, /* 223 */ 5, /* 224 */ + 0, /* 225 */ 1, /* 226 */ 0, /* 227 */ 2, /* 228 */ 0, /* 229 */ + 1, /* 230 */ 0, /* 231 */ 3, /* 232 */ 0, /* 233 */ 1, /* 234 */ + 0, /* 235 */ 2, /* 236 */ 0, /* 237 */ 1, /* 238 */ 0, /* 239 */ + 4, /* 240 */ 0, /* 241 */ 1, /* 242 */ 0, /* 243 */ 2, /* 244 */ + 0, /* 245 */ 1, /* 246 */ 0, /* 247 */ 3, /* 248 */ 0, /* 249 */ + 1, /* 250 */ 0, /* 251 */ 2, /* 252 */ 0, /* 253 */ 1, /* 254 */ + 0, /* 255 */ +}; // end _Bitset_global + +# endif /* defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) */ + +_STLP_END_NAMESPACE + +# undef __BITS_PER_WORD +# undef bitset + +#endif /* _STLP_BITSET_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_bitset.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_bitset.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,791 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_BITSET_H +#define _STLP_BITSET_H + +// A bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused +// bits. (They are the high- order bits in the highest word.) It is +// a class invariant of class bitset<> that those unused bits are +// always zero. + +// Most of the actual code isn't contained in bitset<> itself, but in the +// base class _Base_bitset. The base class works with whole words, not with +// individual bits. This allows us to specialize _Base_bitset for the +// important special case where the bitset is only a single word. + +// The C++ standard does not define the precise semantics of operator[]. +// In this implementation the const version of operator[] is equivalent +// to test(), except that it does no range checking. The non-const version +// returns a reference to a bit, again without doing any range checking. + + +# ifndef _STLP_INTERNAL_ALGOBASE_H +# include +# endif + +# ifndef _STLP_INTERNAL_ALLOC_H +# include +# endif + +# ifndef _STLP_INTERNAL_ITERATOR_H +# include +# endif + +# ifndef _STLP_INTERNAL_UNINITIALIZED_H +# include +# endif + +# ifndef _STLP_RANGE_ERRORS_H +# include +# endif + +# ifndef _STLP_STRING +# include +# endif + +# ifndef _STLP_ISTREAM +# include +# endif + +#define __BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long)) +#define __BITSET_WORDS(__n) ((__n + __BITS_PER_WORD - 1)/__BITS_PER_WORD) + +_STLP_BEGIN_NAMESPACE + +// structure to aid in counting bits +template +class _Bs_G { +public: + static const unsigned char _S_bit_count[256]; + // Mapping from 8 bit unsigned integers to the index of the first one + // bit: + static const unsigned char _S_first_one[256]; +}; + +// +// Base class: general case. +// + +template +struct _Base_bitset { + typedef unsigned long _WordT; + + _WordT _M_w[_Nw]; // 0 is the least significant word. + + _Base_bitset( void ) { _M_do_reset(); } + + _Base_bitset(unsigned long __val) { + _M_do_reset(); + _M_w[0] = __val; + } + + static size_t _STLP_CALL _S_whichword( size_t __pos ) { + return __pos / __BITS_PER_WORD; + } + static size_t _STLP_CALL _S_whichbyte( size_t __pos ) { + return (__pos % __BITS_PER_WORD) / CHAR_BIT; + } + static size_t _STLP_CALL _S_whichbit( size_t __pos ) { + return __pos % __BITS_PER_WORD; + } + static _WordT _STLP_CALL _S_maskbit( size_t __pos ) { + return __STATIC_CAST(_WordT,1) << _S_whichbit(__pos); + } + + _WordT& _M_getword(size_t __pos) { return _M_w[_S_whichword(__pos)]; } + _WordT _M_getword(size_t __pos) const { return _M_w[_S_whichword(__pos)]; } + + _WordT& _M_hiword() { return _M_w[_Nw - 1]; } + _WordT _M_hiword() const { return _M_w[_Nw - 1]; } + + void _M_do_and(const _Base_bitset<_Nw>& __x) { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] &= __x._M_w[__i]; + } + } + + void _M_do_or(const _Base_bitset<_Nw>& __x) { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] |= __x._M_w[__i]; + } + } + + void _M_do_xor(const _Base_bitset<_Nw>& __x) { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] ^= __x._M_w[__i]; + } + } + + void _M_do_left_shift(size_t __shift); + + void _M_do_right_shift(size_t __shift); + + void _M_do_flip() { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] = ~_M_w[__i]; + } + } + + void _M_do_set() { + for ( size_t __i = 0; __i < _Nw; __i++ ) { + _M_w[__i] = ~__STATIC_CAST(_WordT,0); + } + } + + + void _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); } + + bool _M_is_equal(const _Base_bitset<_Nw>& __x) const { + for (size_t __i = 0; __i < _Nw; ++__i) { + if (_M_w[__i] != __x._M_w[__i]) + return false; + } + return true; + } + + bool _M_is_any() const { + for ( size_t __i = 0; __i < _Nw ; __i++ ) { + if ( _M_w[__i] != __STATIC_CAST(_WordT,0) ) + return true; + } + return false; + } + + size_t _M_do_count() const { + size_t __result = 0; + const unsigned char* __byte_ptr = (const unsigned char*)_M_w; + const unsigned char* __end_ptr = (const unsigned char*)(_M_w+_Nw); + + while ( __byte_ptr < __end_ptr ) { + __result += _Bs_G::_S_bit_count[*__byte_ptr]; + __byte_ptr++; + } + return __result; + } + + unsigned long _M_do_to_ulong() const; + + // find first "on" bit + size_t _M_do_find_first(size_t __not_found) const; + + // find the next "on" bit that follows "prev" + size_t _M_do_find_next(size_t __prev, size_t __not_found) const; +}; + +// +// Base class: specialization for a single word. +// + +_STLP_TEMPLATE_NULL +struct _Base_bitset<1UL> { + typedef unsigned long _WordT; + typedef _Base_bitset<1UL> _Self; + + _WordT _M_w; + + _Base_bitset( void ) : _M_w(0) {} + _Base_bitset(unsigned long __val) : _M_w(__val) {} + + static size_t _STLP_CALL _S_whichword( size_t __pos ) { + return __pos / __BITS_PER_WORD ; + } + static size_t _STLP_CALL _S_whichbyte( size_t __pos ) { + return (__pos % __BITS_PER_WORD) / CHAR_BIT; + } + static size_t _STLP_CALL _S_whichbit( size_t __pos ) { + return __pos % __BITS_PER_WORD; + } + static _WordT _STLP_CALL _S_maskbit( size_t __pos ) { + return (__STATIC_CAST(_WordT,1)) << _S_whichbit(__pos); + } + + _WordT& _M_getword(size_t) { return _M_w; } + _WordT _M_getword(size_t) const { return _M_w; } + + _WordT& _M_hiword() { return _M_w; } + _WordT _M_hiword() const { return _M_w; } + + + void _M_do_and(const _Self& __x) { _M_w &= __x._M_w; } + void _M_do_or(const _Self& __x) { _M_w |= __x._M_w; } + void _M_do_xor(const _Self& __x) { _M_w ^= __x._M_w; } + void _M_do_left_shift(size_t __shift) { _M_w <<= __shift; } + void _M_do_right_shift(size_t __shift) { _M_w >>= __shift; } + void _M_do_flip() { _M_w = ~_M_w; } + void _M_do_set() { _M_w = ~__STATIC_CAST(_WordT,0); } + void _M_do_reset() { _M_w = 0; } + + bool _M_is_equal(const _Self& __x) const { + return _M_w == __x._M_w; + } + bool _M_is_any() const { + return _M_w != 0; + } + + size_t _M_do_count() const { + size_t __result = 0; + const unsigned char* __byte_ptr = (const unsigned char*)&_M_w; + const unsigned char* __end_ptr = ((const unsigned char*)&_M_w)+sizeof(_M_w); + while ( __byte_ptr < __end_ptr ) { + __result += _Bs_G::_S_bit_count[*__byte_ptr]; + __byte_ptr++; + } + return __result; + } + + unsigned long _M_do_to_ulong() const { return _M_w; } + + inline size_t _M_do_find_first(size_t __not_found) const; + + // find the next "on" bit that follows "prev" + inline size_t _M_do_find_next(size_t __prev, size_t __not_found) const; + +}; + + +// ------------------------------------------------------------ +// +// Definitions of should-be-non-inline functions from the single-word version of +// _Base_bitset. +// + +inline size_t +_Base_bitset<1UL>::_M_do_find_first(size_t __not_found) const +{ + // typedef unsigned long _WordT; + _WordT __thisword = _M_w; + + if ( __thisword != __STATIC_CAST(_WordT,0) ) { + // find byte within word + for ( size_t __j = 0; __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); + if ( __this_byte ) + return __j*CHAR_BIT + _Bs_G::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + // not found, so return a value that indicates failure. + return __not_found; +} + +inline size_t +_Base_bitset<1UL>::_M_do_find_next(size_t __prev, + size_t __not_found ) const +{ + // make bound inclusive + ++__prev; + + // check out of bounds + if ( __prev >= __BITS_PER_WORD ) + return __not_found; + + // search first (and only) word + _WordT __thisword = _M_w; + + // mask off bits below bound + __thisword &= (~__STATIC_CAST(_WordT,0)) << _S_whichbit(__prev); + + if ( __thisword != __STATIC_CAST(_WordT,0) ) { + // find byte within word + // get first byte into place + __thisword >>= _S_whichbyte(__prev) * CHAR_BIT; + for ( size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) { + unsigned char __this_byte + = __STATIC_CAST(unsigned char,(__thisword & (~(unsigned char)0))); + if ( __this_byte ) + return __j*CHAR_BIT + _Bs_G::_S_first_one[__this_byte]; + + __thisword >>= CHAR_BIT; + } + } + + // not found, so return a value that indicates failure. + return __not_found; +} // end _M_do_find_next + + +// ------------------------------------------------------------ +// Helper class to zero out the unused high-order bits in the highest word. + +template struct _Sanitize { + static void _STLP_CALL _M_do_sanitize(unsigned long& __val) + { __val &= ~((~__STATIC_CAST(unsigned long,0)) << _Extrabits); } +}; + +_STLP_TEMPLATE_NULL struct _Sanitize<0UL> { + static void _STLP_CALL _M_do_sanitize(unsigned long) {} +}; + +// ------------------------------------------------------------ +// Class bitset. +// _Nb may be any nonzero number of type size_t. + + +template +class bitset : public _Base_bitset<__BITSET_WORDS(_Nb) > +{ +public: + enum { _Words = __BITSET_WORDS(_Nb) } ; + +private: + typedef _Base_bitset< _Words > _Base; + + void _M_do_sanitize() { + _Sanitize<_Nb%__BITS_PER_WORD >::_M_do_sanitize(this->_M_hiword()); + } +public: + typedef unsigned long _WordT; + struct reference; + friend struct reference; + + // bit reference: + struct reference { + typedef _Base_bitset<_Words > _Bitset_base; + typedef bitset<_Nb> _Bitset; + // friend _Bitset; + _WordT *_M_wp; + size_t _M_bpos; + + // should be left undefined + reference() {} + + reference( _Bitset& __b, size_t __pos ) { + _M_wp = &__b._M_getword(__pos); + _M_bpos = _Bitset_base::_S_whichbit(__pos); + } + + public: + ~reference() {} + + // for b[i] = __x; + reference& operator=(bool __x) { + if ( __x ) + *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos); + else + *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos); + + return *this; + } + + // for b[i] = b[__j]; + reference& operator=(const reference& __j) { + if ( (*(__j._M_wp) & _Bitset_base::_S_maskbit(__j._M_bpos)) ) + *_M_wp |= _Bitset_base::_S_maskbit(_M_bpos); + else + *_M_wp &= ~_Bitset_base::_S_maskbit(_M_bpos); + + return *this; + } + + // flips the bit + bool operator~() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) == 0; } + + // for __x = b[i]; + operator bool() const { return (*(_M_wp) & _Bitset_base::_S_maskbit(_M_bpos)) != 0; } + + // for b[i].flip(); + reference& flip() { + *_M_wp ^= _Bitset_base::_S_maskbit(_M_bpos); + return *this; + } + }; + + // 23.3.5.1 constructors: + bitset() {} + + bitset(unsigned long __val) : _Base_bitset<_Words>(__val) { _M_do_sanitize(); } + +# ifdef _STLP_MEMBER_TEMPLATES + template + explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s, + size_t __pos = 0) + : _Base_bitset<_Words >() + { + if (__pos > __s.size()) + __stl_throw_out_of_range("bitset"); + _M_copy_from_string(__s, __pos, + basic_string<_CharT, _Traits, _Alloc>::npos); + } + template + bitset(const basic_string<_CharT, _Traits, _Alloc>& __s, + size_t __pos, + size_t __n) + : _Base_bitset<_Words >() + { + if (__pos > __s.size()) + __stl_throw_out_of_range("bitset"); + _M_copy_from_string(__s, __pos, __n); + } +#else /* _STLP_MEMBER_TEMPLATES */ + explicit bitset(const string& __s, + size_t __pos = 0, + size_t __n = (size_t)-1) + : _Base_bitset<_Words >() + { + if (__pos > __s.size()) + __stl_throw_out_of_range("bitset"); + _M_copy_from_string(__s, __pos, __n); + } +#endif /* _STLP_MEMBER_TEMPLATES */ + + // 23.3.5.2 bitset operations: + bitset<_Nb>& operator&=(const bitset<_Nb>& __rhs) { + this->_M_do_and(__rhs); + return *this; + } + + bitset<_Nb>& operator|=(const bitset<_Nb>& __rhs) { + this->_M_do_or(__rhs); + return *this; + } + + bitset<_Nb>& operator^=(const bitset<_Nb>& __rhs) { + this->_M_do_xor(__rhs); + return *this; + } + + bitset<_Nb>& operator<<=(size_t __pos) { +#ifdef __SYMBIAN32__ + if(__pos < _Nb) + { + this->_M_do_left_shift(__pos); + this->_M_do_sanitize(); + } + else + this->_M_do_reset(); +#else + this->_M_do_left_shift(__pos); + this->_M_do_sanitize(); +#endif + + return *this; + } + + bitset<_Nb>& operator>>=(size_t __pos) { +#ifdef __SYMBIAN32__ + if(__pos < _Nb) + { + this->_M_do_right_shift(__pos); + this->_M_do_sanitize(); + } + else + this->_M_do_reset(); +#else + this->_M_do_right_shift(__pos); + this->_M_do_sanitize(); +#endif + + return *this; + } + + // + // Extension: + // Versions of single-bit set, reset, flip, test with no range checking. + // + + bitset<_Nb>& _Unchecked_set(size_t __pos) { + this->_M_getword(__pos) |= _Base_bitset<_Words > ::_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& _Unchecked_set(size_t __pos, int __val) { + if (__val) + this->_M_getword(__pos) |= this->_S_maskbit(__pos); + else + this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos); + + return *this; + } + + bitset<_Nb>& _Unchecked_reset(size_t __pos) { + this->_M_getword(__pos) &= ~ this->_S_maskbit(__pos); + return *this; + } + + bitset<_Nb>& _Unchecked_flip(size_t __pos) { + this->_M_getword(__pos) ^= this->_S_maskbit(__pos); + return *this; + } + + bool _Unchecked_test(size_t __pos) const { + return (this->_M_getword(__pos) & this->_S_maskbit(__pos)) != __STATIC_CAST(_WordT,0); + } + + // Set, reset, and flip. + + bitset<_Nb>& set() { + this->_M_do_set(); + this->_M_do_sanitize(); + return *this; + } + + bitset<_Nb>& set(size_t __pos) { + if (__pos >= _Nb) + __stl_throw_out_of_range("bitset"); + return _Unchecked_set(__pos); + } + + bitset<_Nb>& set(size_t __pos, int __val) { + if (__pos >= _Nb) + __stl_throw_out_of_range("bitset"); + return _Unchecked_set(__pos, __val); + } + + bitset<_Nb>& reset() { + this->_M_do_reset(); + return *this; + } + + bitset<_Nb>& reset(size_t __pos) { + if (__pos >= _Nb) + __stl_throw_out_of_range("bitset"); + + return _Unchecked_reset(__pos); + } + + bitset<_Nb>& flip() { + this->_M_do_flip(); + this->_M_do_sanitize(); + return *this; + } + + bitset<_Nb>& flip(size_t __pos) { + if (__pos >= _Nb) + __stl_throw_out_of_range("bitset"); + + return _Unchecked_flip(__pos); + } + + bitset<_Nb> operator~() const { + return bitset<_Nb>(*this).flip(); + } + + // element access: + //for b[i]; + reference operator[](size_t __pos) { return reference(*this,__pos); } + bool operator[](size_t __pos) const { return _Unchecked_test(__pos); } + + unsigned long to_ulong() const { return this->_M_do_to_ulong(); } + +#if defined (_STLP_MEMBER_TEMPLATES) && ! defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS) + template + basic_string<_CharT, _Traits, _Alloc> to_string() const { + basic_string<_CharT, _Traits, _Alloc> __result; + _M_copy_to_string(__result); + return __result; + } +#else + string to_string() const { + string __result; + _M_copy_to_string(__result); + return __result; + } +#endif /* _STLP_EXPLICIT_FUNCTION_TMPL_ARGS */ + + size_t count() const { return this->_M_do_count(); } + + size_t size() const { return _Nb; } + + bool operator==(const bitset<_Nb>& __rhs) const { + return this->_M_is_equal(__rhs); + } + bool operator!=(const bitset<_Nb>& __rhs) const { + return !this->_M_is_equal(__rhs); + } + + bool test(size_t __pos) const { + if (__pos >= _Nb) + __stl_throw_out_of_range("bitset"); + + return _Unchecked_test(__pos); + } + + bool any() const { return this->_M_is_any(); } + bool none() const { return !this->_M_is_any(); } + + bitset<_Nb> operator<<(size_t __pos) const { + bitset<_Nb> __result(*this); + __result <<= __pos ; return __result; + } + bitset<_Nb> operator>>(size_t __pos) const { + bitset<_Nb> __result(*this); + __result >>= __pos ; return __result; + } + + // + // EXTENSIONS: bit-find operations. These operations are + // experimental, and are subject to change or removal in future + // versions. + // + + // find the index of the first "on" bit + size_t _Find_first() const + { return this->_M_do_find_first(_Nb); } + + // find the index of the next "on" bit after prev + size_t _Find_next( size_t __prev ) const + { return this->_M_do_find_next(__prev, _Nb); } + +// +// Definitions of should-be non-inline member functions. +// +# if defined (_STLP_MEMBER_TEMPLATES) + template + void _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, + size_t __pos, + size_t __n) { +#else + void _M_copy_from_string(const string& __s, + size_t __pos, + size_t __n) { + typedef char_traits _Traits; +#endif + reset(); + size_t __tmp = _Nb; + const size_t __Nbits = (min) (__tmp, (min) (__n, __s.size() - __pos)); + for ( size_t __i= 0; __i < __Nbits; ++__i) { + typename _Traits::int_type __k = _Traits::to_int_type(__s[__pos + __Nbits - __i - 1]); + // boris : widen() ? + if (__k == '1') + set(__i); + else if (__k !='0') + __stl_throw_invalid_argument("bitset"); + } + } + +# if defined (_STLP_MEMBER_TEMPLATES) + template + void _M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const +# else + void _M_copy_to_string(string& __s) const +# endif + { + __s.assign(_Nb, '0'); + + for (size_t __i = 0; __i < _Nb; ++__i) + if (_Unchecked_test(__i)) + __s[_Nb - 1 - __i] = '1'; + } + +# if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) + bitset<_Nb> operator&(const bitset<_Nb>& __y) const { + bitset<_Nb> __result(*this); + __result &= __y; + return __result; + } + bitset<_Nb> operator|(const bitset<_Nb>& __y) const { + bitset<_Nb> __result(*this); + __result |= __y; + return __result; + } + bitset<_Nb> operator^(const bitset<_Nb>& __y) const { + bitset<_Nb> __result(*this); + __result ^= __y; + return __result; + } +# endif + +}; + +// ------------------------------------------------------------ +// +// 23.3.5.3 bitset operations: +// + +# if ! defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) + +template +inline bitset<_Nb> _STLP_CALL +operator&(const bitset<_Nb>& __x, + const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result &= __y; + return __result; +} + + +template +inline bitset<_Nb> _STLP_CALL +operator|(const bitset<_Nb>& __x, + const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result |= __y; + return __result; +} + +template +inline bitset<_Nb> _STLP_CALL +operator^(const bitset<_Nb>& __x, + const bitset<_Nb>& __y) { + bitset<_Nb> __result(__x); + __result ^= __y; + return __result; +} + +#if defined ( _STLP_USE_NEW_IOSTREAMS ) + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x); + + +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x); + +#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) + +// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll +template +_ISTREAM_DLL& _STLP_CALL +operator>>(_ISTREAM_DLL& __is, bitset<_Nb>& __x); + +template +inline _OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, const bitset<_Nb>& __x) { + string __tmp; + __x._M_copy_to_string(__tmp); + return __os << __tmp; +} + +#endif + +# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ + +# undef bitset + + +_STLP_END_NAMESPACE + +# undef __BITS_PER_WORD +# undef __BITSET_WORDS + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_BITSET_H */ + + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_bvector.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_bvector.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,831 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_BVECTOR_H +#define _STLP_INTERNAL_BVECTOR_H + +#ifndef _STLP_INTERNAL_VECTOR_H +# include +# endif + +#ifndef __WORD_BIT +#define __WORD_BIT (int(CHAR_BIT*sizeof(unsigned int))) +#endif + +_STLP_BEGIN_NAMESPACE + +struct _Bit_reference { + unsigned int* _M_p; + unsigned int _M_mask; + _Bit_reference(unsigned int* __x, unsigned int __y) + : _M_p(__x), _M_mask(__y) {} + +public: + _Bit_reference() : _M_p(0), _M_mask(0) {} + + operator bool() const { + return !(!(*_M_p & _M_mask)); + } + _Bit_reference& operator=(bool __x) { + if (__x) *_M_p |= _M_mask; + else *_M_p &= ~_M_mask; + return *this; + } + _Bit_reference& operator=(const _Bit_reference& __x) { + return *this = bool(__x); + } + bool operator==(const _Bit_reference& __x) const { + return bool(*this) == bool(__x); + } + bool operator<(const _Bit_reference& __x) const { + return !bool(*this) && bool(__x); + } + + _Bit_reference& operator |= (bool __x) { + if (__x) + *_M_p |= _M_mask; + return *this; + } + _Bit_reference& operator &= (bool __x) { + if (!__x) + *_M_p &= ~_M_mask; + return *this; + } + void flip() { *_M_p ^= _M_mask; } +}; + + +inline void swap(_Bit_reference& __x, _Bit_reference& __y) +{ + bool __tmp = (bool)__x; + __x = __y; + __y = __tmp; +} + +struct _Bit_iterator_base; + +struct _Bit_iterator_base +{ + typedef ptrdiff_t difference_type; + + unsigned int* _M_p; + unsigned int _M_offset; + + void _M_bump_up() { + if (_M_offset++ == __WORD_BIT - 1) { + _M_offset = 0; + ++_M_p; + } + } + + void _M_bump_down() { + if (_M_offset-- == 0) { + _M_offset = __WORD_BIT - 1; + --_M_p; + } + } + + _Bit_iterator_base() : _M_p(0), _M_offset(0) {} + _Bit_iterator_base(unsigned int* __x, unsigned int __y) : _M_p(__x), _M_offset(__y) {} + // _Bit_iterator_base( const _Bit_iterator_base& __x) : _M_p(__x._M_p), _M_offset(__x._M_offset) {} + // _Bit_iterator_base& operator = ( const _Bit_iterator_base& __x) { _M_p = __x._M_p ; _M_offset = __x._M_offset ; return *this; } + + void _M_advance (difference_type __i) { + difference_type __n = __i + _M_offset; + _M_p += __n / __WORD_BIT; + __n = __n % __WORD_BIT; + if (__n < 0) { + _M_offset = (unsigned int) __n + __WORD_BIT; + --_M_p; + } else + _M_offset = (unsigned int) __n; + } + + difference_type _M_subtract(const _Bit_iterator_base& __x) const { + return __WORD_BIT * (_M_p - __x._M_p) + _M_offset - __x._M_offset; + } +}; + +inline bool _STLP_CALL operator==(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return __y._M_p == __x._M_p && __y._M_offset == __x._M_offset; +} +inline bool _STLP_CALL operator!=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return __y._M_p != __x._M_p || __y._M_offset != __x._M_offset; +} + +inline bool _STLP_CALL operator<(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return __x._M_p < __y._M_p || (__x._M_p == __y._M_p && __x._M_offset < __y._M_offset); +} + +inline bool _STLP_CALL operator>(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return operator <(__y , __x); +} +inline bool _STLP_CALL operator<=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return !(__y < __x); +} +inline bool _STLP_CALL operator>=(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) { + return !(__x < __y); +} + +template +struct _Bit_iter : public _Bit_iterator_base +{ + typedef _Ref reference; + typedef _Ptr pointer; + typedef _Bit_iter<_Ref, _Ptr> _Self; + typedef random_access_iterator_tag iterator_category; + typedef bool value_type; + typedef ptrdiff_t difference_type; + typedef size_t size_type; + + _Bit_iter(unsigned int* __x, unsigned int __y) : _Bit_iterator_base(__x, __y) {} + _Bit_iter() {} + + _Bit_iter(const _Bit_iter<_Bit_reference, _Bit_reference*>& __x): + _Bit_iterator_base((const _Bit_iterator_base&)__x) {} + + // _Self& operator = (const _Bit_iter<_Bit_reference, _Bit_reference*>& __x) + // { (_Bit_iterator_base&)*this = (const _Bit_iterator_base&)__x; return *this; } + + reference operator*() const { + return _Bit_reference(_M_p, 1UL << _M_offset); + } + _Self& operator++() { + _M_bump_up(); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + _M_bump_up(); + return __tmp; + } + _Self& operator--() { + _M_bump_down(); + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + _M_bump_down(); + return __tmp; + } + _Self& operator+=(difference_type __i) { + _M_advance(__i); + return *this; + } + _Self& operator-=(difference_type __i) { + *this += -__i; + return *this; + } + _Self operator+(difference_type __i) const { + _Self __tmp = *this; + return __tmp += __i; + } + _Self operator-(difference_type __i) const { + _Self __tmp = *this; + return __tmp -= __i; + } + difference_type operator-(const _Self& __x) const { + return _M_subtract(__x); + } + reference operator[](difference_type __i) { return *(*this + __i); } +}; + +template +inline _Bit_iter<_Ref,_Ptr> _STLP_CALL +operator+(ptrdiff_t __n, const _Bit_iter<_Ref, _Ptr>& __x) { + return __x + __n; +} + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +inline random_access_iterator_tag iterator_category(const _Bit_iterator_base&) {return random_access_iterator_tag();} +inline ptrdiff_t* distance_type(const _Bit_iterator_base&) {return (ptrdiff_t*)0;} +inline bool* value_type(const _Bit_iter<_Bit_reference, _Bit_reference*>&) {return (bool*)0;} +inline bool* value_type(const _Bit_iter&) {return (bool*)0;} +# endif + +typedef _Bit_iter _Bit_const_iterator; +typedef _Bit_iter<_Bit_reference, _Bit_reference*> _Bit_iterator; + +// Bit-vector base class, which encapsulates the difference between +// old SGI-style allocators and standard-conforming allocators. + + +template +class _Bvector_base +{ +public: + _STLP_FORCE_ALLOCATORS(bool, _Alloc) + typedef typename _Alloc_traits::allocator_type allocator_type; + typedef unsigned int __chunk_type; + typedef typename _Alloc_traits<__chunk_type, + _Alloc>::allocator_type __chunk_allocator_type; + allocator_type get_allocator() const { + return _STLP_CONVERT_ALLOCATOR((const __chunk_allocator_type&)_M_end_of_storage, bool); + } + static allocator_type __get_dfl_allocator() { return allocator_type(); } + + _Bvector_base(const allocator_type& __a) + : _M_start(), _M_finish(), _M_end_of_storage(_STLP_CONVERT_ALLOCATOR(__a, __chunk_type), + (__chunk_type*)0) { + } + ~_Bvector_base() { _M_deallocate(); + } + +protected: + + unsigned int* _M_bit_alloc(size_t __n) + { return _M_end_of_storage.allocate((__n + __WORD_BIT - 1)/__WORD_BIT); } + void _M_deallocate() { + if (_M_start._M_p) + _M_end_of_storage.deallocate(_M_start._M_p, + _M_end_of_storage._M_data - _M_start._M_p); + } + + _Bit_iterator _M_start; + _Bit_iterator _M_finish; + _STLP_alloc_proxy<__chunk_type*, __chunk_type, __chunk_allocator_type> _M_end_of_storage; +}; + + +// The next few lines are confusing. What we're doing is declaring a +// partial specialization of vector if we have the necessary +// compiler support. Otherwise, we define a class bit_vector which uses +// the default allocator. + +#if defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined(_STLP_NO_BOOL) && ! defined (__SUNPRO_CC) +# define _STLP_VECBOOL_TEMPLATE +# define __BVEC_TMPL_HEADER template +#else +# undef _STLP_VECBOOL_TEMPLATE +# ifdef _STLP_NO_BOOL +# define __BVEC_TMPL_HEADER +# else +# define __BVEC_TMPL_HEADER _STLP_TEMPLATE_NULL +# endif +# if !(defined(__MRC__)||(defined(__SC__)&&!defined(__DMC__))) //*TY 12/17/2000 - +# define _Alloc _STLP_DEFAULT_ALLOCATOR(bool) +# else +# define _Alloc allocator +# endif +#endif + +#ifdef _STLP_NO_BOOL +# define __BVECTOR_QUALIFIED bit_vector +# define __BVECTOR bit_vector +#else +# ifdef _STLP_VECBOOL_TEMPLATE +# define __BVECTOR_QUALIFIED __WORKAROUND_DBG_RENAME(vector) +# else +# define __BVECTOR_QUALIFIED __WORKAROUND_DBG_RENAME(vector) > +# endif +#if defined (_STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS) +# define __BVECTOR __BVECTOR_QUALIFIED +#else +# define __BVECTOR __WORKAROUND_DBG_RENAME(vector) +#endif +#endif + + +__BVEC_TMPL_HEADER +class __BVECTOR_QUALIFIED : public _Bvector_base<_Alloc > +{ + typedef _Bvector_base<_Alloc > _Base; + typedef __BVECTOR_QUALIFIED _Self; +public: + typedef bool value_type; + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Bit_reference reference; + typedef bool const_reference; + typedef _Bit_reference* pointer; + typedef const bool* const_pointer; + typedef random_access_iterator_tag _Iterator_category; + + typedef _Bit_iterator iterator; + typedef _Bit_const_iterator const_iterator; + +#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) + typedef _STLP_STD::reverse_iterator const_reverse_iterator; + typedef _STLP_STD::reverse_iterator reverse_iterator; +#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ +# if defined (_STLP_MSVC50_COMPATIBILITY) + typedef _STLP_STD::reverse_iterator const_reverse_iterator; + typedef _STLP_STD::reverse_iterator reverse_iterator; +# else + typedef _STLP_STD::reverse_iterator const_reverse_iterator; + typedef _STLP_STD::reverse_iterator + reverse_iterator; +# endif +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +# ifdef _STLP_VECBOOL_TEMPLATE + typedef typename _Bvector_base<_Alloc >::allocator_type allocator_type; + typedef typename _Bvector_base<_Alloc >::__chunk_type __chunk_type ; +# else + typedef _Bvector_base<_Alloc >::allocator_type allocator_type; + typedef _Bvector_base<_Alloc >::__chunk_type __chunk_type ; +# endif + +protected: + + void _M_initialize(size_type __n) { + unsigned int* __q = this->_M_bit_alloc(__n); + this->_M_end_of_storage._M_data = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + this->_M_start = iterator(__q, 0); + this->_M_finish = this->_M_start + difference_type(__n); + } + void _M_insert_aux(iterator __position, bool __x) { + if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) { + __copy_backward(__position, this->_M_finish, this->_M_finish + 1, random_access_iterator_tag(), (difference_type*)0 ); + *__position = __x; + ++this->_M_finish; + } + else { + size_type __len = size() ? 2 * size() : __WORD_BIT; + unsigned int* __q = this->_M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + *__i++ = __x; + this->_M_finish = copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + this->_M_start = iterator(__q, 0); + } + } + +#ifdef _STLP_MEMBER_TEMPLATES + template + void _M_initialize_range(_InputIterator __first, _InputIterator __last, + const input_iterator_tag &) { + this->_M_start = iterator(); + this->_M_finish = iterator(); + this->_M_end_of_storage._M_data = 0; + for ( ; __first != __last; ++__first) + push_back(*__first); + } + + template + void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last, + const forward_iterator_tag &) { + size_type __n = distance(__first, __last); + _M_initialize(__n); + // copy(__first, __last, _M_start); + copy(__first, __last, this->_M_start); // dwa 12/22/99 -- resolving ambiguous reference. + } + + template + void _M_insert_range(iterator __pos, + _InputIterator __first, _InputIterator __last, + const input_iterator_tag &) { + for ( ; __first != __last; ++__first) { + __pos = insert(__pos, *__first); + ++__pos; + } + } + + template + void _M_insert_range(iterator __position, + _ForwardIterator __first, _ForwardIterator __last, + const forward_iterator_tag &) { + if (__first != __last) { + size_type __n = distance(__first, __last); + if (capacity() - size() >= __n) { + __copy_backward(__position, end(), this->_M_finish + difference_type(__n), random_access_iterator_tag(), (difference_type*)0 ); + copy(__first, __last, __position); + this->_M_finish += difference_type(__n); + } + else { + size_type __len = size() + (max)(size(), __n); + unsigned int* __q = this->_M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + this->_M_finish = copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + this->_M_start = iterator(__q, 0); + } + } + } + +#endif /* _STLP_MEMBER_TEMPLATES */ + +public: + iterator begin() { return this->_M_start; } + const_iterator begin() const { return this->_M_start; } + iterator end() { return this->_M_finish; } + const_iterator end() const { return this->_M_finish; } + + reverse_iterator rbegin() { return reverse_iterator(end()); } + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + reverse_iterator rend() { return reverse_iterator(begin()); } + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + size_type size() const { return size_type(end() - begin()); } + size_type max_size() const { return size_type(-1); } + size_type capacity() const { + return size_type(const_iterator(this->_M_end_of_storage._M_data, 0) - begin()); + } + bool empty() const { return begin() == end(); } + reference operator[](size_type __n) + { return *(begin() + difference_type(__n)); } + const_reference operator[](size_type __n) const + { return *(begin() + difference_type(__n)); } + + void _M_range_check(size_type __n) const { + if (__n >= this->size()) + __stl_throw_range_error("vector"); + } + + reference at(size_type __n) + { _M_range_check(__n); return (*this)[__n]; } + const_reference at(size_type __n) const + { _M_range_check(__n); return (*this)[__n]; } + + explicit __BVECTOR(const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc >(__a) { + _STLP_POP_IF_CHECK + } + + __BVECTOR(size_type __n, bool __val, + const allocator_type& __a = + allocator_type()) + : _Bvector_base<_Alloc >(__a) + { + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + _M_initialize(__n); + fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __val ? ~0 : 0); + _STLP_POP_CLEANUP_ITEM + } + + explicit __BVECTOR(size_type __n) + : _Bvector_base<_Alloc >(allocator_type()) + { + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + _M_initialize(__n); + fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), 0); + _STLP_POP_CLEANUP_ITEM + } + + __BVECTOR(const _Self& __x) : _Bvector_base<_Alloc >(__x.get_allocator()) { + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + _M_initialize(__x.size()); + copy(__x.begin(), __x.end(), this->_M_start); + _STLP_POP_CLEANUP_ITEM + } + +#if defined (_STLP_MEMBER_TEMPLATES) + template + void _M_initialize_dispatch(_Integer __n, _Integer __x, const __true_type&) { + _M_initialize(__n); + fill(this->_M_start._M_p, this->_M_end_of_storage._M_data, __x ? ~0 : 0); + } + + template + void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + const __false_type&) { + _M_initialize_range(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); + } +# ifdef _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS + // Check whether it's an integral type. If so, it's not an iterator. + template + __BVECTOR(_InputIterator __first, _InputIterator __last) + : _Base(allocator_type()) + { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + _M_initialize_dispatch(__first, __last, _Integral()); + _STLP_POP_CLEANUP_ITEM + } +# endif + template + __BVECTOR(_InputIterator __first, _InputIterator __last, + const allocator_type& __a _STLP_ALLOCATOR_TYPE_DFL) + : _Base(__a) + { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + _M_initialize_dispatch(__first, __last, _Integral()); + _STLP_POP_CLEANUP_ITEM + } +#else /* _STLP_MEMBER_TEMPLATES */ + __BVECTOR(const_iterator __first, const_iterator __last, + const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc >(__a) + { + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + size_type __n = distance(__first, __last); + _M_initialize(__n); + copy(__first, __last, this->_M_start); + _STLP_POP_CLEANUP_ITEM + } + __BVECTOR(const bool* __first, const bool* __last, + const allocator_type& __a = allocator_type()) + : _Bvector_base<_Alloc >(__a) + { + size_type __n = distance(__first, __last); + _STLP_PUSH_CLEANUP_ITEM(_Base, this) + _M_initialize(__n); + copy(__first, __last, this->_M_start); + _STLP_POP_CLEANUP_ITEM + } +#endif /* _STLP_MEMBER_TEMPLATES */ + + ~__BVECTOR() { } + + __BVECTOR_QUALIFIED& operator=(const __BVECTOR_QUALIFIED& __x) { + if (&__x == this) return *this; + if (__x.size() > capacity()) { + this->_M_deallocate(); + _M_initialize(__x.size()); + } + copy(__x.begin(), __x.end(), begin()); + this->_M_finish = begin() + difference_type(__x.size()); + return *this; + } + +#ifdef _STLP_USE_TRAP_LEAVE +public: + static void* operator new (size_t __n, TLeave) { return _STLP_StackHelper::_NewLC(__n); } + static void* operator new (size_t __n) { return _STLP_StackHelper::_NewLC(__n); } +#endif + + // assign(), a generalized assignment member function. Two + // versions: one that takes a count, and one that takes a range. + // The range version is a member template, so we dispatch on whether + // or not the type is an integer. + + void _M_fill_assign(size_t __n, bool __x) { + if (__n > size()) { + fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0); + insert(end(), __n - size(), __x); + } + else { + erase(begin() + __n, end()); + fill(this->_M_start._M_p, (__chunk_type*)(this->_M_end_of_storage._M_data), __x ? ~0 : 0); + } + } + void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); } + +#ifdef _STLP_MEMBER_TEMPLATES + + template + void assign(_InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Integral; + _M_assign_dispatch(__first, __last, _Integral()); + } + + template + void _M_assign_dispatch(_Integer __n, _Integer __val, const __true_type&) + { _M_fill_assign((size_t) __n, (bool) __val); } + + template + void _M_assign_dispatch(_InputIter __first, _InputIter __last, const __false_type&) + { _M_assign_aux(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); } + + template + void _M_assign_aux(_InputIterator __first, _InputIterator __last, + const input_iterator_tag &) { + iterator __cur = begin(); + for ( ; __first != __last && __cur != end(); ++__cur, ++__first) + *__cur = *__first; + if (__first == __last) + erase(__cur, end()); + else + insert(end(), __first, __last); + } + + template + void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last, + const forward_iterator_tag &) { + size_type __len = distance(__first, __last); + if (__len < size()) + erase(copy(__first, __last, begin()), end()); + else { + _ForwardIterator __mid = __first; + advance(__mid, size()); + copy(__first, __mid, begin()); + insert(end(), __mid, __last); + } + } + +#endif /* _STLP_MEMBER_TEMPLATES */ + + void reserve(size_type __n) { + if (capacity() < __n) { + unsigned int* __q = this->_M_bit_alloc(__n); + _Bit_iterator __z(__q, 0); + this->_M_finish = copy(begin(), end(), __z); + this->_M_deallocate(); + this->_M_start = iterator(__q, 0); + this->_M_end_of_storage._M_data = __q + (__n + __WORD_BIT - 1)/__WORD_BIT; + } + } + + reference front() { return *begin(); } + const_reference front() const { return *begin(); } + reference back() { return *(end() - 1); } + const_reference back() const { return *(end() - 1); } + void push_back(bool __x) { + if (this->_M_finish._M_p != this->_M_end_of_storage._M_data) { + *(this->_M_finish) = __x; + ++this->_M_finish; + } + else + _M_insert_aux(end(), __x); + } + void swap(__BVECTOR_QUALIFIED& __x) { + _STLP_STD::swap(this->_M_start, __x._M_start); + _STLP_STD::swap(this->_M_finish, __x._M_finish); + _STLP_STD::swap(this->_M_end_of_storage, __x._M_end_of_storage); + } + iterator insert(iterator __position, bool __x = bool()) { + difference_type __n = __position - begin(); + if (this->_M_finish._M_p != this->_M_end_of_storage._M_data && __position == end()) { + *(this->_M_finish) = __x; + ++this->_M_finish; + } + else + _M_insert_aux(__position, __x); + return begin() + __n; + } + +#if defined ( _STLP_MEMBER_TEMPLATES ) + + template + void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, + const __true_type&) { + _M_fill_insert(__pos, (size_type) __n, (bool) __x); + } + + template + void _M_insert_dispatch(iterator __pos, + _InputIterator __first, _InputIterator __last, + const __false_type&) { + _M_insert_range(__pos, __first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); + } + + // Check whether it's an integral type. If so, it's not an iterator. + template + void insert(iterator __position, + _InputIterator __first, _InputIterator __last) { + typedef typename _Is_integer<_InputIterator>::_Integral _Is_Integral; + _M_insert_dispatch(__position, __first, __last, _Is_Integral()); + } +#else /* _STLP_MEMBER_TEMPLATES */ + void insert(iterator __position, + const_iterator __first, const_iterator __last) { + if (__first == __last) return; + size_type __n = distance(__first, __last); + if (capacity() - size() >= __n) { + __copy_backward(__position, end(), this->_M_finish + __n, + random_access_iterator_tag(), (difference_type*)0 ); + copy(__first, __last, __position); + this->_M_finish += __n; + } + else { + size_type __len = size() + (max)(size(), __n); + unsigned int* __q = this->_M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + this->_M_finish = copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + this->_M_start = iterator(__q, 0); + } + } + + void insert(iterator __position, const bool* __first, const bool* __last) { + if (__first == __last) return; + size_type __n = distance(__first, __last); + if (capacity() - size() >= __n) { + __copy_backward(__position, end(), this->_M_finish + __n, + random_access_iterator_tag(), (difference_type*)0 ); + copy(__first, __last, __position); + this->_M_finish += __n; + } + else { + size_type __len = size() + (max)(size(), __n); + unsigned int* __q = this->_M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + __i = copy(__first, __last, __i); + this->_M_finish = copy(__position, end(), __i); + this->_M_deallocate(); + this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + this->_M_start = iterator(__q, 0); + } + } +#endif /* _STLP_MEMBER_TEMPLATES */ + + void _M_fill_insert(iterator __position, size_type __n, bool __x) { + if (__n == 0) return; + if (capacity() - size() >= __n) { + __copy_backward(__position, end(), this->_M_finish + difference_type(__n), random_access_iterator_tag(), (difference_type*)0 ); + fill(__position, __position + difference_type(__n), __x); + this->_M_finish += difference_type(__n); + } + else { + size_type __len = size() + (max)(size(), __n); + unsigned int* __q = this->_M_bit_alloc(__len); + iterator __i = copy(begin(), __position, iterator(__q, 0)); + fill_n(__i, __n, __x); + this->_M_finish = copy(__position, end(), __i + difference_type(__n)); + this->_M_deallocate(); + this->_M_end_of_storage._M_data = __q + (__len + __WORD_BIT - 1)/__WORD_BIT; + this->_M_start = iterator(__q, 0); + } + } + + void insert(iterator __position, size_type __n, bool __x) { + _M_fill_insert(__position, __n, __x); + } + + void pop_back() { + --this->_M_finish; + } + iterator erase(iterator __position) { + if (__position + 1 != end()) + copy(__position + 1, end(), __position); + --this->_M_finish; + return __position; + } + iterator erase(iterator __first, iterator __last) { + this->_M_finish = copy(__last, end(), __first); + return __first; + } + void resize(size_type __new_size, bool __x = bool()) { + if (__new_size < size()) + erase(begin() + difference_type(__new_size), end()); + else + insert(end(), __new_size - size(), __x); + } + void flip() { + for (unsigned int* __p = this->_M_start._M_p; __p != this->_M_end_of_storage._M_data; ++__p) + *__p = ~*__p; + } + + void clear() { erase(begin(), end()); } +}; + +# if defined ( _STLP_NO_BOOL ) || defined (__HP_aCC) // fixed soon (03/17/2000) + +#define _STLP_TEMPLATE_HEADER __BVEC_TMPL_HEADER +#define _STLP_TEMPLATE_CONTAINER __BVECTOR_QUALIFIED +#include +#undef _STLP_TEMPLATE_CONTAINER +#undef _STLP_TEMPLATE_HEADER + +# endif /* NO_BOOL */ + +#if !defined (_STLP_NO_BOOL) +// This typedef is non-standard. It is provided for backward compatibility. + typedef __WORKAROUND_DBG_RENAME(vector) > bit_vector; +#endif + +_STLP_END_NAMESPACE + +#undef _Alloc +#undef _STLP_VECBOOL_TEMPLATE +#undef __BVECTOR +#undef __BVECTOR_QUALIFIED +#undef __BVEC_TMPL_HEADER + +# undef __WORD_BIT + +#endif /* _STLP_INTERNAL_BVECTOR_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_carray.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_carray.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2005 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_CARRAY_H +#define _STLP_CARRAY_H + +/* Purpose: Mimic a pur C array with the additionnal feature of + * being able to be used with type not default constructible. + */ + +#ifndef _STLP_INTERNAL_CONSTRUCT_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +_STLP_MOVE_TO_PRIV_NAMESPACE + +template +struct _CArray { + _CArray (const _Tp& __val) { + for (size_t __i = 0; __i < _Nb; ++__i) { + _Copy_Construct(__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)), __val); + } + } + + ~_CArray() { + _Destroy_Range(__REINTERPRET_CAST(_Tp*, _M_data + 0), + __REINTERPRET_CAST(_Tp*, _M_data + _Nb * sizeof(_Tp))); + } + + _Tp& operator [] (size_t __i) { + _STLP_ASSERT(__i < _Nb) + return *__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)); + } + +private: + char _M_data[sizeof(_Tp) * _Nb]; +}; + +_STLP_MOVE_TO_STD_NAMESPACE + +_STLP_END_NAMESPACE + +#endif //_STLP_CARRAY_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cctype.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cctype.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,45 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CCTYPE +#define _STLP_INTERNAL_CCTYPE + +#if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(cctype) +#else +# include +#endif /* _STLP_USE_NEW_C_HEADERS */ + +#if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +# if defined ( _STLP_IMPORT_VENDOR_CSTD ) +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::isalnum; +using _STLP_VENDOR_CSTD::isalpha; +using _STLP_VENDOR_CSTD::iscntrl; +using _STLP_VENDOR_CSTD::isdigit; +using _STLP_VENDOR_CSTD::isgraph; +using _STLP_VENDOR_CSTD::islower; +using _STLP_VENDOR_CSTD::isprint; +using _STLP_VENDOR_CSTD::ispunct; +using _STLP_VENDOR_CSTD::isspace; +using _STLP_VENDOR_CSTD::isupper; +using _STLP_VENDOR_CSTD::isxdigit; +using _STLP_VENDOR_CSTD::tolower; +using _STLP_VENDOR_CSTD::toupper; +_STLP_END_NAMESPACE +# endif /* _STLP_IMPORT_VENDOR_CSTD*/ +#endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_check_config.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_check_config.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,37 @@ +// This file is reserved to site configuration purpose +// and should NEVER be overridden by user + +# if defined ( _STLP_NO_OWN_IOSTREAMS ) + +// User choose not to use SGI iostreams, which means no +// precompiled library will be used and he is free to override +// any STLport configuration flags + +# else + +// The following will be defined in stl_config.h : +// # define _STLP_OWN_IOSTREAMS 1 +# endif + +/* + * Consistency check : if we use SGI iostreams, we have to use consistent + * thread model (single-threaded or multi-threaded) with the compiled library + * + * Default is multithreaded build. If you want to build and use single-threaded + * STLport, please change _STLP_NOTHREADS configuration setting above and rebuild the library + * + */ + +# if defined (_STLP_OWN_IOSTREAMS) \ + && !defined (_STLP_NO_THREADS) && !defined (_REENTRANT) + +# if defined(_MSC_VER) && !defined(__MWERKS__) && !defined (__COMO__) && !defined(_MT) +# error "Only multi-threaded runtime library may be linked with STLport!" +# endif + +// boris : you may change that to build non-threadsafe STLport library +# if defined (__BUILDING_STLPORT) /* || defined (_STLP_DEBUG) */ +# define _REENTRANT 1 +# endif + +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_clocale.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_clocale.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CLOCALE +#define _STLP_INTERNAL_CLOCALE + +#if !defined (_STLP_WCE_EVC3) + +# if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(clocale) +# else +# include _STLP_NATIVE_C_HEADER(locale.h) +# endif + +# if defined (_STLP_IMPORT_VENDOR_CSTD) +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::lconv; +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +using _STLP_VENDOR_CSTD::localeconv; +using _STLP_VENDOR_CSTD::setlocale; +# endif +_STLP_END_NAMESPACE +# endif + +#endif /* !_STLP_WCE_EVC3 */ + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cmath.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cmath.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,210 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_CMATH_H_HEADER +# define _STLP_CMATH_H_HEADER + +# include + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_SAME_FUNCTION_NAME_RESOLUTION_BUG) && (! defined (_STLP_VXWORKS_TORNADO)) + +// this proxy is needed for some compilers to resolve problems +// calling sqrt() from within sqrt(), etc. +template +struct _STL_math_proxy { + static inline _Tp _do_abs(const _Tp& __x) { return _STLP_VENDOR_CSTD::fabs(__x); } + static inline _Tp _do_acos(const _Tp& __x) { return _STLP_VENDOR_CSTD::acos(__x); } + static inline _Tp _do_asin(const _Tp& __x) { return _STLP_VENDOR_CSTD::asin(__x); } + static inline _Tp _do_atan(const _Tp& __x) { return _STLP_VENDOR_CSTD::atan(__x); } + static inline _Tp _do_atan2(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::atan2(__x, __y); } + static inline _Tp _do_cos(const _Tp& __x) { return _STLP_VENDOR_CSTD::cos(__x); } + static inline _Tp _do_cosh(const _Tp& __x) { return _STLP_VENDOR_CSTD::cosh(__x); } + static inline _Tp _do_floor(const _Tp& __x) { return _STLP_VENDOR_CSTD::floor(__x); } + static inline _Tp _do_ceil(const _Tp& __x) { return _STLP_VENDOR_CSTD::ceil(__x); } + static inline _Tp _do_fmod(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::fmod(__x, __y); } + static inline _Tp _do_frexp(const _Tp& __x, int* __y) { return _STLP_VENDOR_CSTD::frexp(__x, __y); } + static inline _Tp _do_ldexp(const _Tp& __x, int __y) { return _STLP_VENDOR_CSTD::ldexp(__x, __y); } + static inline _Tp _do_modf(const _Tp& __x, double* __y) { return _STLP_VENDOR_CSTD::modf(__x, __y); } + static inline _Tp _do_log(const _Tp& __x) { return _STLP_VENDOR_CSTD::log(__x); } + static inline _Tp _do_log10(const _Tp& __x) { return _STLP_VENDOR_CSTD::log10(__x); } + static inline _Tp _do_pow(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::pow(__x, __y); } + static inline _Tp _do_pow(const _Tp& __x, int __y) { return _STLP_VENDOR_CSTD::pow(__x, __y); } + static inline _Tp _do_sin(const _Tp& __x) { return _STLP_VENDOR_CSTD::sin(__x); } + static inline _Tp _do_sinh(const _Tp& __x) { return _STLP_VENDOR_CSTD::sinh(__x); } + + static inline _Tp _do_sqrt(const _Tp& __x) { return _STLP_VENDOR_CSTD::sqrt(__x); } + static inline _Tp _do_tan(const _Tp& __x) { return _STLP_VENDOR_CSTD::tan(__x); } + static inline _Tp _do_tanh(const _Tp& __x) { return _STLP_VENDOR_CSTD::tanh(__x); } + static inline _Tp _do_exp(const _Tp& __x) { return _STLP_VENDOR_CSTD::exp(__x); } + static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y) { return _STLP_VENDOR_CSTD::hypot(__x, __y); } +}; + +# define _STLP_DO_ABS(_Tp) _STL_math_proxy<_Tp>::_do_abs +# define _STLP_DO_ACOS(_Tp) _STL_math_proxy<_Tp>::_do_acos +# define _STLP_DO_ASIN(_Tp) _STL_math_proxy<_Tp>::_do_asin +# define _STLP_DO_ATAN(_Tp) _STL_math_proxy<_Tp>::_do_atan +# define _STLP_DO_ATAN2(_Tp) _STL_math_proxy<_Tp>::_do_atan2 +# define _STLP_DO_COS(_Tp) _STL_math_proxy<_Tp>::_do_cos +# define _STLP_DO_COSH(_Tp) _STL_math_proxy<_Tp>::_do_cosh +# define _STLP_DO_FLOOR(_Tp) _STL_math_proxy<_Tp>::_do_floor +# define _STLP_DO_CEIL(_Tp) _STL_math_proxy<_Tp>::_do_ceil +# define _STLP_DO_FMOD(_Tp) _STL_math_proxy<_Tp>::_do_fmod +# define _STLP_DO_FREXP(_Tp) _STL_math_proxy<_Tp>::_do_frexp +# define _STLP_DO_LDEXP(_Tp) _STL_math_proxy<_Tp>::_do_ldexp +# define _STLP_DO_MODF(_Tp) _STL_math_proxy<_Tp>::_do_modf +# define _STLP_DO_LOG(_Tp) _STL_math_proxy<_Tp>::_do_log +# define _STLP_DO_LOG10(_Tp) _STL_math_proxy<_Tp>::_do_log10 +# define _STLP_DO_POW(_Tp) _STL_math_proxy<_Tp>::_do_pow +# define _STLP_DO_SIN(_Tp) _STL_math_proxy<_Tp>::_do_sin +# define _STLP_DO_SINH(_Tp) _STL_math_proxy<_Tp>::_do_sinh +# define _STLP_DO_SQRT(_Tp) _STL_math_proxy<_Tp>::_do_sqrt +# define _STLP_DO_TAN(_Tp) _STL_math_proxy<_Tp>::_do_tan +# define _STLP_DO_TANH(_Tp) _STL_math_proxy<_Tp>::_do_tanh +# define _STLP_DO_EXP(_Tp) _STL_math_proxy<_Tp>::_do_exp +# define _STLP_DO_HYPOT(_Tp) _STL_math_proxy<_Tp>::_do_hypot +# else +# define _STLP_DO_ABS(_Tp) _STLP_VENDOR_CSTD::fabs +# define _STLP_DO_ACOS(_Tp) _STLP_VENDOR_CSTD::acos +# define _STLP_DO_ASIN(_Tp) _STLP_VENDOR_CSTD::asin +# define _STLP_DO_ATAN(_Tp) _STLP_VENDOR_CSTD::atan +# define _STLP_DO_ATAN2(_Tp) _STLP_VENDOR_CSTD::atan2 +# define _STLP_DO_COS(_Tp) _STLP_VENDOR_CSTD::cos +# define _STLP_DO_COSH(_Tp) _STLP_VENDOR_CSTD::cosh +# define _STLP_DO_FLOOR(_Tp) _STLP_VENDOR_CSTD::floor +# define _STLP_DO_CEIL(_Tp) _STLP_VENDOR_CSTD::ceil +# define _STLP_DO_FMOD(_Tp) _STLP_VENDOR_CSTD::fmod +# define _STLP_DO_FREXP(_Tp) _STLP_VENDOR_CSTD::frexp +# define _STLP_DO_LDEXP(_Tp) _STLP_VENDOR_CSTD::ldexp +# define _STLP_DO_MODF(_Tp) _STLP_VENDOR_CSTD::modf +# define _STLP_DO_LOG(_Tp) _STLP_VENDOR_CSTD::log +# define _STLP_DO_LOG10(_Tp) _STLP_VENDOR_CSTD::log10 +# define _STLP_DO_POW(_Tp) _STLP_VENDOR_CSTD::pow +# define _STLP_DO_SIN(_Tp) _STLP_VENDOR_CSTD::sin +# define _STLP_DO_SINH(_Tp) _STLP_VENDOR_CSTD::sinh +# define _STLP_DO_SQRT(_Tp) _STLP_VENDOR_CSTD::sqrt +# define _STLP_DO_TAN(_Tp) _STLP_VENDOR_CSTD::tan +# define _STLP_DO_TANH(_Tp) _STLP_VENDOR_CSTD::tanh +# define _STLP_DO_EXP(_Tp) _STLP_VENDOR_CSTD::exp +# define _STLP_DO_HYPOT(_Tp) ::hypot +# endif + +_STLP_END_NAMESPACE + +# if (defined (_STLP_HAS_NO_NEW_C_HEADERS) || defined(_STLP_MSVC) || defined (__ICL)) && !defined (_STLP_HAS_NO_NAMESPACES) + +#if (! defined (_STLP_USE_NEW_C_HEADERS)) && ! defined (_STLP_VXWORKS_TORNADO) +_STLP_BEGIN_NAMESPACE + +# ifndef _STLP_HAS_NATIVE_FLOAT_ABS +inline double abs(double __x) { return _STLP_DO_ABS(double)(__x); } +inline float abs (float __x) { return _STLP_DO_ABS(float)(__x); } +# endif + +#if ( defined (__SYMBIAN32__) || defined (__WINS__)) +inline double pow(double __x, int __y) { return _STLP_DO_POW(double)(__x, __y); } +inline float acos (float __x) { return _STLP_DO_ACOS(float)(__x); } +inline float asin (float __x) { return _STLP_DO_ASIN(float)(__x); } +inline float atan (float __x) { return _STLP_DO_ATAN(float)(__x); } +inline float atan2(float __x, float __y) { return _STLP_DO_ATAN2(float)(__x, __y); } +inline float ceil (float __x) { return _STLP_DO_CEIL(float)(__x); } +inline float cos (float __x) { return _STLP_DO_COS(float)(__x); } +inline float cosh (float __x) { return _STLP_DO_COSH(float)(__x); } +inline float exp (float __x) { return _STLP_DO_EXP(float)(__x); } +# ifdef _STLP_USE_NAMESPACES +inline float fabs (float __x) { return _STLP_DO_ABS(float)(__x); } +# endif +inline float floor(float __x) { return _STLP_DO_FLOOR(float)(__x); } +inline float fmod (float __x, float __y) { return _STLP_DO_FMOD(float)(__x, __y); } +inline float frexp(float __x, int* __y) { return _STLP_DO_FREXP(float)(__x, __y); } +inline float ldexp(float __x, int __y) { return _STLP_DO_LDEXP(float)(__x, __y); } +// fbp : float versions are not always available +#if !defined(_STLP_VENDOR_LONG_DOUBLE_MATH) //*ty 11/25/2001 - +inline float modf (float __x, float* __y) { + #ifndef __SYMBIAN32__ + double __dd[2]; + double __res = _STLP_DO_MODF(double)((double)__x, __dd); + __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; + return (float)__res; +#else + float f = modff(__x, __y); + return f; +#endif +} +#else //*ty 11/25/2001 - i.e. for apple SCpp +inline float modf (float __x, float* __y) { + long double __dd[2]; + long double __res = _STLP_DO_MODF(long double)((long double)__x, __dd); + __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; + return (float)__res; +} +#endif //*ty 11/25/2001 - + +inline float log (float __x) { return _STLP_DO_LOG(float)(__x); } +inline float log10(float __x) { return _STLP_DO_LOG10(float)(__x); } +inline float pow (float __x, float __y) { return _STLP_DO_POW(float)(__x, __y); } +inline float pow (float __x, int __y) { return _STLP_DO_POW(float)(__x, __y); } +inline float sin (float __x) { return _STLP_DO_SIN(float)(__x); } +inline float sinh (float __x) { return _STLP_DO_SINH(float)(__x); } +inline float sqrt (float __x) { return _STLP_DO_SQRT(float)(__x); } +inline float tan (float __x) { return _STLP_DO_TAN(float)(__x); } +inline float tanh (float __x) { return _STLP_DO_TANH(float)(__x); } + +# if ! (defined (_STLP_NO_LONG_DOUBLE) || defined(_STLP_VENDOR_LONG_DOUBLE_MATH)) + +#if !( defined (__MVS__) || defined (_STLP_HAS_NATIVE_FLOAT_ABS)) +inline long double abs (long double __x) { return _STLP_DO_ABS(long double)((double)__x); } +#endif +inline long double acos (long double __x) { return _STLP_DO_ACOS(long double)(__x); } +inline long double asin (long double __x) { return _STLP_DO_ASIN(long double)(__x); } +inline long double atan (long double __x) { return _STLP_DO_ATAN(long double)(__x); } +inline long double atan2(long double __x, long double __y) { return _STLP_DO_ATAN2(long double)(__x, __y); } +inline long double ceil (long double __x) { return _STLP_DO_CEIL(long double)(__x); } +inline long double cos (long double __x) { return _STLP_DO_COS(long double)(__x); } +inline long double cosh (long double __x) { return _STLP_DO_COSH(long double)(__x); } +inline long double exp (long double __x) { return _STLP_DO_EXP(long double)(__x); } +inline long double fabs (long double __x) { return _STLP_DO_ABS(long double)(__x); } +inline long double floor(long double __x) { return _STLP_DO_FLOOR(long double)(__x); } +inline long double fmod (long double __x, long double __y) { return _STLP_DO_FMOD(long double)(__x, __y); } +inline long double frexp(long double __x, int* __y) { return _STLP_DO_FREXP(long double)(__x, __y); } +inline long double ldexp(long double __x, int __y) { return _STLP_DO_LDEXP(long double)(__x, __y); } +// fbp : long double versions are not available +inline long double modf (long double __x, long double* __y) { + double __dd[2]; + double __res = _STLP_DO_MODF(double)((double)__x, __dd); + __y[0] = (long double)__dd[0] ; __y[1] = (long double)__dd[1]; + return (long double)__res; +} +inline long double log (long double __x) { return _STLP_DO_LOG(long double)(__x); } +inline long double log10(long double __x) { return _STLP_DO_LOG10(long double)(__x); } +inline long double pow (long double __x, long double __y) { return _STLP_DO_POW(long double)(__x, __y); } +inline long double pow (long double __x, int __y) { return _STLP_DO_POW(long double)(__x, __y); } +inline long double sin (long double __x) { return _STLP_DO_SIN(long double)(__x); } +inline long double sinh (long double __x) { return _STLP_DO_SINH(long double)(__x); } +inline long double sqrt (long double __x) { return _STLP_DO_SQRT(long double)(__x); } +inline long double tan (long double __x) { return _STLP_DO_TAN(long double)(__x); } +inline long double tanh (long double __x) { return _STLP_DO_TANH(long double)(__x); } +#endif +#endif + +_STLP_END_NAMESPACE + +# endif /* NEW_C_HEADERS */ +# endif /* NEW_C_HEADERS */ + +#endif /* CMATH_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_codecvt.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_codecvt.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,323 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_CODECVT_H +#define _STLP_INTERNAL_CODECVT_H + +# ifndef _STLP_C_LOCALE_H +# include +# endif +# ifndef _STLP_INTERNAL_LOCALE_H +# include +# endif + +_STLP_BEGIN_NAMESPACE + +class _STLP_CLASS_DECLSPEC codecvt_base { +public: + enum result {ok, partial, error, noconv}; +}; + +template +class codecvt : public locale::facet, public codecvt_base { + typedef _InternT intern_type; + typedef _ExternT extern_type; + typedef _StateT state_type; +}; + +template +class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT> {}; + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class codecvt : public locale::facet, public codecvt_base +#else +class _STLP_CLASS_DECLSPEC codecvt : public locale::facet, public codecvt_base +#endif +{ + friend class _Locale; +public: + typedef char intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + explicit codecvt(size_t __refs = 0) : _BaseFacet(__refs) {} + + result out(state_type& __state, + const char* __from, + const char* __from_end, + const char*& __from_next, + char* __to, + char* __to_limit, + char*& __to_next) const { + return do_out(__state, + __from, __from_end, __from_next, + __to, __to_limit, __to_next); + } + + result unshift(mbstate_t& __state, + char* __to, char* __to_limit, char*& __to_next) const + { return do_unshift(__state, __to, __to_limit, __to_next); } + + result in(state_type& __state, + const char* __from, + const char* __from_end, + const char*& __from_next, + char* __to, + char* __to_limit, + char*& __to_next) const { + return do_in(__state, + __from, __from_end, __from_next, + __to, __to_limit, __to_next); + } + + int encoding() const _STLP_NOTHROW { return do_encoding(); } + + bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); } + + int length(const state_type& __state, + const char* __from, const char* __end, + size_t __max) const + { return do_length(__state, __from, __end, __max); } + + int max_length() const _STLP_NOTHROW { return do_max_length(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: +_STLP_DECLSPEC ~codecvt(); + + _STLP_DECLSPEC virtual result do_out(mbstate_t& /* __state */, + const char* __from, + const char* /* __from_end */, + const char*& __from_next, + char* __to, + char* /* __to_limit */, + char*& __to_next) const; + + _STLP_DECLSPEC virtual result do_in (mbstate_t& /* __state */ , + const char* __from, + const char* /* __from_end */, + const char*& __from_next, + char* __to, + char* /* __to_end */, + char*& __to_next) const; + + _STLP_DECLSPEC virtual result do_unshift(mbstate_t& /* __state */, + char* __to, + char* /* __to_limit */, + char*& __to_next) const; + + _STLP_DECLSPEC virtual int do_encoding() const _STLP_NOTHROW; + _STLP_DECLSPEC virtual bool do_always_noconv() const _STLP_NOTHROW; + _STLP_DECLSPEC virtual int do_length(const mbstate_t& __state, + const char* __from, + const char* __end, + size_t __max) const; + _STLP_DECLSPEC virtual int do_max_length() const _STLP_NOTHROW; +private: + codecvt(const codecvt&); + codecvt& operator =(const codecvt&); +}; + +# ifndef _STLP_NO_WCHAR_T + +_STLP_TEMPLATE_NULL +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +class codecvt : public locale::facet, public codecvt_base +#else +class _STLP_CLASS_DECLSPEC codecvt : public locale::facet, public codecvt_base +#endif +{ + friend class _Locale; +public: + typedef wchar_t intern_type; + typedef char extern_type; + typedef mbstate_t state_type; + + explicit codecvt(size_t __refs = 0) : _BaseFacet(__refs) {} + + result out(mbstate_t& __state, + const wchar_t* __from, + const wchar_t* __from_end, + const wchar_t*& __from_next, + char* __to, + char* __to_limit, + char*& __to_next) const { + return do_out(__state, + __from, __from_end, __from_next, + __to, __to_limit, __to_next); + } + + result unshift(mbstate_t& __state, + char* __to, char* __to_limit, char*& __to_next) const { + return do_unshift(__state, __to, __to_limit, __to_next); + } + + result in(mbstate_t& __state, + const char* __from, + const char* __from_end, + const char*& __from_next, + wchar_t* __to, + wchar_t* __to_limit, + wchar_t*& __to_next) const { + return do_in(__state, + __from, __from_end, __from_next, + __to, __to_limit, __to_next); + } + + int encoding() const _STLP_NOTHROW { return do_encoding(); } + + bool always_noconv() const _STLP_NOTHROW { return do_always_noconv(); } + + int length(const mbstate_t& __state, + const char* __from, + const char* __end, + size_t __max) const + { return do_length(__state, __from, __end, __max); } + + int max_length() const _STLP_NOTHROW { return do_max_length(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + _STLP_DECLSPEC ~codecvt(); + + _STLP_DECLSPEC virtual result do_out(mbstate_t& __state, + const wchar_t* __from, + const wchar_t* __from_end, + const wchar_t*& __from_next, + char* __to, + char* __to_limit, + char*& __to_next) const; + + _STLP_DECLSPEC virtual result do_in (mbstate_t& __state, + const char* __from, + const char* __from_end, + const char*& __from_next, + wchar_t* __to, + wchar_t* __to_limit, + wchar_t*& __to_next) const; + + _STLP_DECLSPEC virtual result do_unshift(mbstate_t& __state, + char* __to, + char* __to_limit, + char*& __to_next) const; + + _STLP_DECLSPEC virtual int do_encoding() const _STLP_NOTHROW; + + _STLP_DECLSPEC virtual bool do_always_noconv() const _STLP_NOTHROW; + + _STLP_DECLSPEC virtual int do_length(const mbstate_t& __state, + const char* __from, + const char* __end, + size_t __max) const; + + _STLP_DECLSPEC virtual int do_max_length() const _STLP_NOTHROW; + +private: + codecvt(const codecvt&); + codecvt& operator = (const codecvt&); +}; + +# endif + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC codecvt_byname + : public codecvt { +public: + explicit _STLP_DECLSPEC codecvt_byname(const char* __name, size_t __refs = 0); + ~codecvt_byname(); +private: + codecvt_byname(const codecvt_byname&); + codecvt_byname& operator =(const codecvt_byname&); +}; + +# ifndef _STLP_NO_WCHAR_T +_STLP_TEMPLATE_NULL +class codecvt_byname + : public codecvt +{ +public: + explicit _STLP_DECLSPEC codecvt_byname(const char * __name, size_t __refs = 0); + +protected: + _STLP_DECLSPEC ~codecvt_byname(); + + _STLP_DECLSPEC virtual result do_out(mbstate_t& __state, + const wchar_t* __from, + const wchar_t* __from_end, + const wchar_t*& __from_next, + char* __to, + char* __to_limit, + char*& __to_next) const; + + _STLP_DECLSPEC virtual result do_in (mbstate_t& __state, + const char* __from, + const char* __from_end, + const char*& __from_next, + wchar_t* __to, + wchar_t* __to_limit, + wchar_t*& __to_next) const; + + _STLP_DECLSPEC virtual result do_unshift(mbstate_t& __state, + char* __to, + char* __to_limit, + char*& __to_next) const; + + _STLP_DECLSPEC virtual int do_encoding() const _STLP_NOTHROW; + + _STLP_DECLSPEC virtual bool do_always_noconv() const _STLP_NOTHROW; + + _STLP_DECLSPEC virtual int do_length(const mbstate_t& __state, + const char* __from, + const char* __end, + size_t __max) const; + + _STLP_DECLSPEC virtual int do_max_length() const _STLP_NOTHROW; + +private: + _Locale_ctype* _M_ctype; + codecvt_byname(const codecvt_byname&); + codecvt_byname& operator =(const codecvt_byname&); +}; + +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_CODECVT_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_collate.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_collate.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,204 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + +#ifndef _STLP_INTERNAL_COLLATE_H +#define _STLP_INTERNAL_COLLATE_H + +#ifndef _STLP_C_LOCALE_H +# include +#endif + +#ifndef _STLP_INTERNAL_LOCALE_H +# include +#endif + +#ifndef _STLP_STRING_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + + +template class collate {}; +template class collate_byname {}; + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class collate : public locale::facet +#else +class _STLP_CLASS_DECLSPEC collate : public locale::facet +#endif +{ + friend class _Locale; +public: + typedef char char_type; + typedef string string_type; + + explicit collate(size_t __refs = 0) : _BaseFacet(__refs) {} + + int compare(const char* __low1, const char* __high1, + const char* __low2, const char* __high2) const { + return do_compare( __low1, __high1, __low2, __high2); + } + + string_type transform(const char* __low, const char* __high) const { + return do_transform(__low, __high); + } + + long hash(const char* __low, const char* __high) const + { return do_hash(__low, __high); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: +_STLP_DECLSPEC ~collate(); + +_STLP_DECLSPEC virtual int do_compare(const char*, const char*, + const char*, const char*) const; +_STLP_DECLSPEC virtual string_type do_transform(const char*, const char*) const; +_STLP_DECLSPEC virtual long do_hash(const char*, const char*) const; +private: + collate(const collate&); + collate& operator =(const collate&); +}; + +# ifndef _STLP_NO_WCHAR_T + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class collate : public locale::facet +#else +class _STLP_CLASS_DECLSPEC collate : public locale::facet +#endif +{ + friend class _Locale; +public: + typedef wchar_t char_type; + typedef wstring string_type; + + explicit collate(size_t __refs = 0) : _BaseFacet(__refs) {} + + int compare(const wchar_t* __low1, const wchar_t* __high1, + const wchar_t* __low2, const wchar_t* __high2) const { + return do_compare( __low1, __high1, __low2, __high2); + } + + string_type transform(const wchar_t* __low, const wchar_t* __high) const { + return do_transform(__low, __high); + } + + long hash(const wchar_t* __low, const wchar_t* __high) const + { return do_hash(__low, __high); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: +_STLP_DECLSPEC ~collate(); + +_STLP_DECLSPEC virtual int do_compare(const wchar_t*, const wchar_t*, + const wchar_t*, const wchar_t*) const; +_STLP_DECLSPEC virtual string_type do_transform(const wchar_t*, const wchar_t*) const; +_STLP_DECLSPEC virtual long do_hash(const wchar_t* __low, const wchar_t* __high) const; +private: + collate(const collate&); + collate& operator = (const collate&); +}; + +# endif /* NO_WCHAR_T */ + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC collate_byname: public collate +{ +public: + explicit _STLP_DECLSPEC collate_byname(const char* __name, size_t __refs = 0); + +protected: +_STLP_DECLSPEC ~collate_byname(); + +_STLP_DECLSPEC virtual int do_compare(const char*, const char*, + const char*, const char*) const; +_STLP_DECLSPEC virtual string_type do_transform(const char*, const char*) const; + +private: + _Locale_collate* _M_collate; + collate_byname(const collate_byname&); + collate_byname& operator =(const collate_byname&); +}; + +# ifndef _STLP_NO_WCHAR_T + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC collate_byname: public collate +{ +public: + explicit _STLP_DECLSPEC collate_byname(const char * __name, size_t __refs = 0); + +protected: +_STLP_DECLSPEC ~collate_byname(); + +_STLP_DECLSPEC virtual int do_compare(const wchar_t*, const wchar_t*, + const wchar_t*, const wchar_t*) const; +_STLP_DECLSPEC virtual string_type do_transform(const wchar_t*, const wchar_t*) const; + +private: + _Locale_collate* _M_collate; + collate_byname(const collate_byname&); + collate_byname& operator =(const collate_byname&); +}; + +# endif /* NO_WCHAR_T */ + + +template +bool +__locale_do_operator_call (const locale* __that, + const basic_string<_CharT, _Traits, _Alloc >& __x, + const basic_string<_CharT, _Traits, _Alloc >& __y) +{ +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + collate<_CharT>* __f = (collate<_CharT>*)__that->_M_get_facet(collate<_CharT>::GetFacetLocaleId()); +#else + collate<_CharT>* __f = (collate<_CharT>*)__that->_M_get_facet(collate<_CharT>::id); +#endif + if (!__f) + __that->_M_throw_runtime_error(); + return __f->compare(__x.data(), __x.data() + __x.size(), + __y.data(), __y.data() + __y.size()) < 0; + +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_COLLATE_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_complex.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_complex.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,169 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_COMPLEX_C +#define _STLP_COMPLEX_C + +# ifndef _STLP_internal_complex_h +# include +# endif + +#include + +#ifdef _STLP_USE_NEW_IOSTREAMS +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// Non-inline member functions. + +template +void complex<_Tp>::_div(const _Tp& __z1_r, const _Tp& __z1_i, + const _Tp& __z2_r, const _Tp& __z2_i, + _Tp& __res_r, _Tp& __res_i) { + _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r; + _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i; + + if (__ar <= __ai) { + _Tp __ratio = __z2_r / __z2_i; + _Tp __denom = __z2_i * (1 + __ratio * __ratio); + __res_r = (__z1_r * __ratio + __z1_i) / __denom; + __res_i = (__z1_i * __ratio - __z1_r) / __denom; + } + else { + _Tp __ratio = __z2_i / __z2_r; + _Tp __denom = __z2_r * (1 + __ratio * __ratio); + __res_r = (__z1_r + __z1_i * __ratio) / __denom; + __res_i = (__z1_i - __z1_r * __ratio) / __denom; + } +} + +template +void complex<_Tp>::_div(const _Tp& __z1_r, + const _Tp& __z2_r, const _Tp& __z2_i, + _Tp& __res_r, _Tp& __res_i) { + _Tp __ar = __z2_r >= 0 ? __z2_r : -__z2_r; + _Tp __ai = __z2_i >= 0 ? __z2_i : -__z2_i; + + if (__ar <= __ai) { + _Tp __ratio = __z2_r / __z2_i; + _Tp __denom = __z2_i * (1 + __ratio * __ratio); + __res_r = (__z1_r * __ratio) / __denom; + __res_i = - __z1_r / __denom; + } + else { + _Tp __ratio = __z2_i / __z2_r; + _Tp __denom = __z2_r * (1 + __ratio * __ratio); + __res_r = __z1_r / __denom; + __res_i = - (__z1_r * __ratio) / __denom; + } +} + +// I/O. + +#ifdef _STLP_USE_NEW_IOSTREAMS + +// Complex output, in the form (re,im). We use a two-step process +// involving stringstream so that we get the padding right. +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z) +{ + basic_ostringstream<_CharT, _Traits, allocator<_CharT> > __tmp; + __tmp.flags(__os.flags()); + __tmp.imbue(__os.getloc()); + __tmp.precision(__os.precision()); + __tmp << '(' << __z.real() << ',' << __z.imag() << ')'; + return __os << __tmp.str(); +} + +// Complex input from arbitrary streams. Note that results in some +// locales may be confusing, since the decimal character varies with +// locale and the separator between real and imaginary parts does not. + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z) +{ + _Tp __re = 0; + _Tp __im = 0; + + // typedef ctype<_CharT> _Ctype; + // locale __loc = __is.getloc(); + //const _Ctype& __c_type = use_facet<_Ctype>(__loc); + const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__is._M_ctype_facet(); + + char __punct[4] = "(,)"; + _CharT __wpunct[3]; + __c_type.widen(__punct, __punct + 3, __wpunct); + + _CharT __c; + + __is >> __c; + if (_Traits::eq(__c, __wpunct[0])) { // Left paren + __is >> __re >> __c; + if (_Traits::eq(__c, __wpunct[1])) // Comma + __is >> __im >> __c; + if (!_Traits::eq(__c, __wpunct[2])) // Right paren + __is.setstate(ios_base::failbit); + } + else { + __is.putback(__c); + __is >> __re; + } + + if (__is) + __z = complex<_Tp>(__re, __im); + return __is; +} + + +#else /* _STLP_USE_NEW_IOSTREAMS */ + +template +ostream& _STLP_CALL operator<<(ostream& s, const complex<_Tp>& __z) +{ + return s << "( " << __z._M_re <<", " << __z._M_im <<")"; +} + +template +istream& _STLP_CALL operator>>(istream& s, complex<_Tp>& a) +{ + _Tp re = 0, im = 0; + char c = 0; + + s >> c; + if (c == '(') { + s >> re >> c; + if (c == ',') s >> im >> c; + if (c != ')') s.clear(ios::badbit); + } + else { + s.putback(c); + s >> re; + } + + if (s) a = complex<_Tp>(re, im); + return s; +} + +#endif /* _STLP_USE_NEW_IOSTREAMS */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_COMPLEX_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_complex.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_complex.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1013 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_internal_complex_h +#define _STLP_internal_complex_h + +// This header declares the template class complex, as described in +// in the draft C++ standard. Single-precision complex numbers +// are complex, double-precision are complex, and +// quad precision are complex. + +// Note that the template class complex is declared within namespace +// std, as called for by the draft C++ standard. + +#include +#include + +_STLP_BEGIN_NAMESPACE + +#if !defined(_STLP_NO_COMPLEX_SPECIALIZATIONS) //*TY 02/25/2000 - added for MPW compiler workaround + +template struct complex; + +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex; +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex; +# ifndef _STLP_NO_LONG_DOUBLE +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex; +# endif +# endif + +template +struct complex { + typedef _Tp value_type; + typedef complex<_Tp> _Self; + + // Constructors, destructor, assignment operator. + complex() : _M_re(0), _M_im(0) {} + complex(const value_type& __x) + : _M_re(__x), _M_im(0) {} + complex(const value_type& __x, const value_type& __y) + : _M_re(__x), _M_im(__y) {} + complex(const _Self& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} + + _Self& operator=(const _Self& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + +#if defined (_STLP_MEMBER_TEMPLATES) && ( defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) || defined(_STLP_NO_COMPLEX_SPECIALIZATIONS)) + template + explicit complex(const complex<_Tp2>& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} + + template + _Self& operator=(const complex<_Tp2>& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } +#endif /* _STLP_MEMBER_TEMPLATES */ + + // Element access. + value_type real() const { return _M_re; } + value_type imag() const { return _M_im; } + + // Arithmetic op= operations involving one real argument. + + _Self& operator= (const value_type& __x) { + _M_re = __x; + _M_im = 0; + return *this; + } + _Self& operator+= (const value_type& __x) { + _M_re += __x; + return *this; + } + _Self& operator-= (const value_type& __x) { + _M_re -= __x; + return *this; + } + _Self& operator*= (const value_type& __x) { + _M_re *= __x; + _M_im *= __x; + return *this; + } + _Self& operator/= (const value_type& __x) { + _M_re /= __x; + _M_im /= __x; + return *this; + } + + // Arithmetic op= operations involving two complex arguments. + + static void _STLP_CALL _div(const value_type& __z1_r, const value_type& __z1_i, + const value_type& __z2_r, const value_type& __z2_i, + value_type& __res_r, value_type& __res_i); + + static void _STLP_CALL _div(const value_type& __z1_r, + const value_type& __z2_r, const value_type& __z2_i, + value_type& __res_r, value_type& __res_i); + +#if defined ( _STLP_MEMBER_TEMPLATES ) // && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) + + template _Self& operator+= (const complex<_Tp2>& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + template _Self& operator-= (const complex<_Tp2>& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + template _Self& operator*= (const complex<_Tp2>& __z) { + value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; + value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + template _Self& operator/= (const complex<_Tp2>& __z) { + value_type __r; + value_type __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + +#endif /* _STLP_MEMBER_TEMPLATES */ + + _Self& operator+= (const _Self& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + _Self& operator-= (const _Self& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + _Self& operator*= (const _Self& __z) { + value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; + value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + _Self& operator/= (const _Self& __z) { + value_type __r; + value_type __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + + // Data members. + value_type _M_re; + value_type _M_im; +}; + +#if !defined(_STLP_NO_COMPLEX_SPECIALIZATIONS) //*TY 02/25/2000 - added for MPW compiler workaround +// Explicit specializations for float, double, long double. The only +// reason for these specializations is to enable automatic conversions +// from complex to complex, and complex to +// complex. + + +_STLP_TEMPLATE_NULL +struct _STLP_CLASS_DECLSPEC complex { + typedef float value_type; + typedef complex _Self; + // Constructors, destructor, assignment operator. + + complex(value_type __x = 0.0, value_type __y = 0.0) + : _M_re(__x), _M_im(__y) {} + + complex(const complex& __z) : _M_re(__z._M_re), _M_im(__z._M_im) {} + + inline explicit complex(const complex& __z); +# ifndef _STLP_NO_LONG_DOUBLE + inline explicit complex(const complex& __z); +# endif + // Element access. + value_type real() const { return _M_re; } + value_type imag() const { return _M_im; } + + // Arithmetic op= operations involving one real argument. + + _Self& operator= (value_type __x) { + _M_re = __x; + _M_im = 0; + return *this; + } + _Self& operator+= (value_type __x) { + _M_re += __x; + return *this; + } + _Self& operator-= (value_type __x) { + _M_re -= __x; + return *this; + } + _Self& operator*= (value_type __x) { + _M_re *= __x; + _M_im *= __x; + return *this; + } + _Self& operator/= (value_type __x) { + _M_re /= __x; + _M_im /= __x; + return *this; + } + + // Arithmetic op= operations involving two complex arguments. + + _STLP_DECLSPEC static void _STLP_CALL _div(const float& __z1_r, const float& __z1_i, + const float& __z2_r, const float& __z2_i, + float& __res_r, float& __res_i); + + _STLP_DECLSPEC static void _STLP_CALL _div(const float& __z1_r, + const float& __z2_r, const float& __z2_i, + float& __res_r, float& __res_i); + +#if defined (_STLP_MEMBER_TEMPLATES) + + template + complex& operator=(const complex<_Tp2>& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + + template + complex& operator+= (const complex<_Tp2>& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + template + complex& operator-= (const complex<_Tp2>& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + template + complex& operator*= (const complex<_Tp2>& __z) { + float __r = _M_re * __z._M_re - _M_im * __z._M_im; + float __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + template + complex& operator/= (const complex<_Tp2>& __z) { + float __r; + float __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + +#endif /* _STLP_MEMBER_TEMPLATES */ + + _Self& operator=(const _Self& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + + _Self& operator+= (const _Self& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + _Self& operator-= (const _Self& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + _Self& operator*= (const _Self& __z) { + value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; + value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + _Self& operator/= (const _Self& __z) { + value_type __r; + value_type __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + + // Data members. + value_type _M_re; + value_type _M_im; +}; + +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex { + typedef double value_type; + typedef complex _Self; + + // Constructors, destructor, assignment operator. + + complex(value_type __x = 0.0, value_type __y = 0.0) + : _M_re(__x), _M_im(__y) {} + + complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} + inline complex(const complex& __z); +# ifndef _STLP_NO_LONG_DOUBLE + explicit inline complex(const complex& __z); +# endif + // Element access. + value_type real() const { return _M_re; } + value_type imag() const { return _M_im; } + + // Arithmetic op= operations involving one real argument. + + _Self& operator= (value_type __x) { + _M_re = __x; + _M_im = 0; + return *this; + } + _Self& operator+= (value_type __x) { + _M_re += __x; + return *this; + } + _Self& operator-= (value_type __x) { + _M_re -= __x; + return *this; + } + _Self& operator*= (value_type __x) { + _M_re *= __x; + _M_im *= __x; + return *this; + } + _Self& operator/= (value_type __x) { + _M_re /= __x; + _M_im /= __x; + return *this; + } + + // Arithmetic op= operations involving two complex arguments. + + _STLP_DECLSPEC static void _STLP_CALL _div(const double& __z1_r, const double& __z1_i, + const double& __z2_r, const double& __z2_i, + double& __res_r, double& __res_i); + _STLP_DECLSPEC static void _STLP_CALL _div(const double& __z1_r, + const double& __z2_r, const double& __z2_i, + double& __res_r, double& __res_i); + +#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) + + template + complex& operator=(const complex<_Tp2>& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + + template + complex& operator+= (const complex<_Tp2>& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + template + complex& operator-= (const complex<_Tp2>& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + template + complex& operator*= (const complex<_Tp2>& __z) { + double __r = _M_re * __z._M_re - _M_im * __z._M_im; + double __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + template + complex& operator/= (const complex<_Tp2>& __z) { + double __r; + double __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + +#endif /* _STLP_MEMBER_TEMPLATES */ + + _Self& operator=(const _Self& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + + _Self& operator+= (const _Self& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + _Self& operator-= (const _Self& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + _Self& operator*= (const _Self& __z) { + value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; + value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + _Self& operator/= (const _Self& __z) { + value_type __r; + value_type __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + + // Data members. + value_type _M_re; + value_type _M_im; +}; + +# ifndef _STLP_NO_LONG_DOUBLE + +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC complex { + typedef long double value_type; + typedef complex _Self; + + // Constructors, destructor, assignment operator. + complex(value_type __x = 0.0, value_type __y = 0.0) + : _M_re(__x), _M_im(__y) {} + + complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} + inline complex(const complex& __z); + inline complex(const complex& __z); + + // Element access. + value_type real() const { return _M_re; } + value_type imag() const { return _M_im; } + + // Arithmetic op= operations involving one real argument. + + _Self& operator= (value_type __x) { + _M_re = __x; + _M_im = 0; + return *this; + } + _Self& operator+= (value_type __x) { + _M_re += __x; + return *this; + } + _Self& operator-= (value_type __x) { + _M_re -= __x; + return *this; + } + _Self& operator*= (value_type __x) { + _M_re *= __x; + _M_im *= __x; + return *this; + } + _Self& operator/= (value_type __x) { + _M_re /= __x; + _M_im /= __x; + return *this; + } + + // Arithmetic op= operations involving two complex arguments. + + _STLP_DECLSPEC static void _STLP_CALL _div(const long double& __z1_r, const long double& __z1_i, + const long double& __z2_r, const long double& __z2_i, + long double& __res_r, long double& __res_i); + + _STLP_DECLSPEC static void _STLP_CALL _div(const long double& __z1_r, + const long double& __z2_r, const long double& __z2_i, + long double& __res_r, long double& __res_i); + +#if defined (_STLP_MEMBER_TEMPLATES) && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) + + template + complex& operator=(const complex<_Tp2>& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + + template + complex& operator+= (const complex<_Tp2>& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + template + complex& operator-= (const complex<_Tp2>& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + template + complex& operator*= (const complex<_Tp2>& __z) { + long double __r = _M_re * __z._M_re - _M_im * __z._M_im; + long double __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + template + complex& operator/= (const complex<_Tp2>& __z) { + long double __r; + long double __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + +#endif /* _STLP_MEMBER_TEMPLATES */ + + _Self& operator=(const _Self& __z) { + _M_re = __z._M_re; + _M_im = __z._M_im; + return *this; + } + + _Self& operator+= (const _Self& __z) { + _M_re += __z._M_re; + _M_im += __z._M_im; + return *this; + } + + _Self& operator-= (const _Self& __z) { + _M_re -= __z._M_re; + _M_im -= __z._M_im; + return *this; + } + + _Self& operator*= (const _Self& __z) { + value_type __r = _M_re * __z._M_re - _M_im * __z._M_im; + value_type __i = _M_re * __z._M_im + _M_im * __z._M_re; + _M_re = __r; + _M_im = __i; + return *this; + } + + _Self& operator/= (const _Self& __z) { + value_type __r; + value_type __i; + _div(_M_re, _M_im, __z._M_re, __z._M_im, __r, __i); + _M_re = __r; + _M_im = __i; + return *this; + } + + // Data members. + value_type _M_re; + value_type _M_im; +}; + +# endif /* _STLP_NO_LONG_DOUBLE */ + +// Converting constructors from one of these three specialized types +// to another. + +inline complex::complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} +inline complex::complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} +# ifndef _STLP_NO_LONG_DOUBLE +inline complex::complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} +inline complex::complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} +inline complex::complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} +inline complex::complex(const complex& __z) + : _M_re(__z._M_re), _M_im(__z._M_im) {} +# endif + +# endif /* SPECIALIZATIONS */ + +// Unary non-member arithmetic operators. + +template +inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z) { + return __z; +} + +template +inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z) { + return complex<_Tp>(-__z._M_re, -__z._M_im); +} + +// Non-member arithmetic operations involving one real argument. + +template +inline complex<_Tp> _STLP_CALL operator+(const _Tp& __x, const complex<_Tp>& __z) { + return complex<_Tp>(__x + __z._M_re, __z._M_im); +} + +template +inline complex<_Tp> _STLP_CALL operator+(const complex<_Tp>& __z, const _Tp& __x) { + return complex<_Tp>(__z._M_re + __x, __z._M_im); +} + +template +inline complex<_Tp> _STLP_CALL operator-(const _Tp& __x, const complex<_Tp>& __z) { + return complex<_Tp>(__x - __z._M_re, -__z._M_im); +} + +template +inline complex<_Tp> _STLP_CALL operator-(const complex<_Tp>& __z, const _Tp& __x) { + return complex<_Tp>(__z._M_re - __x, __z._M_im); +} + +template +inline complex<_Tp> _STLP_CALL operator*(const _Tp& __x, const complex<_Tp>& __z) { + return complex<_Tp>(__x * __z._M_re, __x * __z._M_im); +} + +template +inline complex<_Tp> _STLP_CALL operator*(const complex<_Tp>& __z, const _Tp& __x) { + return complex<_Tp>(__z._M_re * __x, __z._M_im * __x); +} + +template +inline complex<_Tp> _STLP_CALL operator/(const _Tp& __x, const complex<_Tp>& __z) { + complex<_Tp> __result; + complex<_Tp>::_div(__x, + __z._M_re, __z._M_im, + __result._M_re, __result._M_im); + return __result; +} + +template +inline complex<_Tp> _STLP_CALL operator/(const complex<_Tp>& __z, const _Tp& __x) { + return complex<_Tp>(__z._M_re / __x, __z._M_im / __x); +} + +// Non-member arithmetic operations involving two complex arguments + +template +inline complex<_Tp> _STLP_CALL +operator+(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { + return complex<_Tp>(__z1._M_re + __z2._M_re, __z1._M_im + __z2._M_im); +} + +template +inline complex<_Tp> _STLP_CALL +operator-(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { + return complex<_Tp>(__z1._M_re - __z2._M_re, __z1._M_im - __z2._M_im); +} + +template +inline complex<_Tp> _STLP_CALL +operator*(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { + return complex<_Tp>(__z1._M_re * __z2._M_re - __z1._M_im * __z2._M_im, + __z1._M_re * __z2._M_im + __z1._M_im * __z2._M_re); +} + +template +inline complex<_Tp> _STLP_CALL +operator/(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { + complex<_Tp> __result; + complex<_Tp>::_div(__z1._M_re, __z1._M_im, + __z2._M_re, __z2._M_im, + __result._M_re, __result._M_im); + return __result; +} + +// Comparison operators. + +template +inline bool _STLP_CALL operator==(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { + return __z1._M_re == __z2._M_re && __z1._M_im == __z2._M_im; +} + +template +inline bool _STLP_CALL operator==(const complex<_Tp>& __z, const _Tp& __x) { + return __z._M_re == __x && __z._M_im == 0; +} + +template +inline bool _STLP_CALL operator==(const _Tp& __x, const complex<_Tp>& __z) { + return __x == __z._M_re && 0 == __z._M_im; +} + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER + +template +inline bool _STLP_CALL operator!=(const complex<_Tp>& __z1, const complex<_Tp>& __z2) { + return __z1._M_re != __z2._M_re || __z1._M_im != __z2._M_im; +} + +#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ + +template +inline bool _STLP_CALL operator!=(const complex<_Tp>& __z, const _Tp& __x) { + return __z._M_re != __x || __z._M_im != 0; +} + +template +inline bool _STLP_CALL operator!=(const _Tp& __x, const complex<_Tp>& __z) { + return __x != __z._M_re || 0 != __z._M_im; +} + +// Other basic arithmetic operations + +template +inline _Tp _STLP_CALL real(const complex<_Tp>& __z) { + return __z._M_re; +} + +template +inline _Tp _STLP_CALL imag(const complex<_Tp>& __z) { + return __z._M_im; +} + +#ifdef __SYMBIAN32__ +template +#ifdef __WINSCW__ +_STLP_DECLSPEC +#endif +_Tp _STLP_CALL abs_tp(const complex<_Tp>&); + +template +#ifdef __WINSCW__ +_STLP_DECLSPEC +#endif +_Tp _STLP_CALL arg_tp(const complex<_Tp>&); + +template +#ifdef __WINSCW__ +_STLP_DECLSPEC +#endif +complex<_Tp> _STLP_CALL polar_tp(const _Tp& __rho, const _Tp& __phi); + +template +_Tp _STLP_CALL abs(const complex<_Tp>& __z) + { + return abs_tp(__z); + } + +template +_Tp _STLP_CALL arg(const complex<_Tp>& __z) + { + return arg_tp(__z); + } + +template +complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi) { + return polar_tp(__rho, __phi); +} + +#else +template +_Tp _STLP_CALL abs(const complex<_Tp>& __z) { + return _Tp(abs(complex(double(__z.real()), double(__z.imag())))); +} + +template +_Tp _STLP_CALL arg(const complex<_Tp>& __z) { + return _Tp(arg(complex(double(__z.real()), double(__z.imag())))); +} + +#endif + + +template +inline _Tp _STLP_CALL norm(const complex<_Tp>& __z) { + return __z._M_re * __z._M_re + __z._M_im * __z._M_im; +} + +template +inline complex<_Tp> _STLP_CALL conj(const complex<_Tp>& __z) { + return complex<_Tp>(__z._M_re, -__z._M_im); +} + +template +complex<_Tp> _STLP_CALL polar(const _Tp& __rho) { + return complex<_Tp>(__rho, 0); +} + +#ifndef __SYMBIAN32__ +template +complex<_Tp> _STLP_CALL polar(const _Tp& __rho, const _Tp& __phi) { + complex __tmp = polar(double(__rho), double(__phi)); + return complex<_Tp>(_Tp(__tmp.real()), _Tp(__tmp.imag())); +} + + +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC float _STLP_CALL abs(const complex&); +#ifndef _STLP_COMPLEX_SPECIALIZATION_BUG +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC double _STLP_CALL abs(const complex&); +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC double _STLP_CALL arg(const complex&); +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC complex _STLP_CALL polar(const double& __rho, const double& __phi); +#endif +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC float _STLP_CALL arg(const complex&); +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC complex _STLP_CALL polar(const float& __rho, const float& __phi); + + +# ifndef _STLP_NO_LONG_DOUBLE +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC long double _STLP_CALL arg(const complex&); +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC long double _STLP_CALL abs(const complex&); +_STLP_TEMPLATE_NULL +_STLP_DECLSPEC complex _STLP_CALL polar(const long double&, const long double&); +# endif +#endif + + +#ifdef _STLP_USE_NEW_IOSTREAMS + +// Complex output, in the form (re,im). We use a two-step process +// involving stringstream so that we get the padding right. +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __z); + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __z); + +// Specializations for narrow characters; lets us avoid widen. + +_STLP_OPERATOR_TEMPLATE +_STLP_DECLSPEC basic_istream >& _STLP_CALL +operator>>(basic_istream >& __is, complex& __z); + +_STLP_OPERATOR_TEMPLATE +_STLP_DECLSPEC basic_istream >& _STLP_CALL +operator>>(basic_istream >& __is, complex& __z); + + +_STLP_OPERATOR_TEMPLATE +_STLP_DECLSPEC basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __is, const complex& __z); + +_STLP_OPERATOR_TEMPLATE +_STLP_DECLSPEC basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __is, const complex& __z); + +# if ! defined (_STLP_NO_LONG_DOUBLE) +_STLP_OPERATOR_TEMPLATE +_STLP_DECLSPEC basic_istream >& _STLP_CALL +operator>>(basic_istream >& __is, complex& __z); + +_STLP_OPERATOR_TEMPLATE +_STLP_DECLSPEC basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __is, const complex& __z); + +# endif + +# if defined (_STLP_USE_TEMPLATE_EXPORT) && ! defined (_STLP_NO_WCHAR_T) + +_STLP_EXPORT_TEMPLATE basic_istream >& _STLP_CALL operator>>( + basic_istream >&, complex&); +_STLP_EXPORT_TEMPLATE basic_ostream >& _STLP_CALL operator<<( + basic_ostream >&, const complex&); +_STLP_EXPORT_TEMPLATE basic_istream >& _STLP_CALL operator>>( + basic_istream >&, complex&); +_STLP_EXPORT_TEMPLATE basic_ostream >& _STLP_CALL operator<<( + basic_ostream >&, const complex&); + +# ifndef _STLP_NO_LONG_DOUBLE +_STLP_EXPORT_TEMPLATE basic_istream >& _STLP_CALL operator>>( + basic_istream >&, complex&); +_STLP_EXPORT_TEMPLATE basic_ostream >& _STLP_CALL operator<<( + basic_ostream >&, const complex&); +# endif + +# endif /* USE_TEMPLATE_EXPORT */ + +#else /* _STLP_USE_NEW_IOSTREAMS */ + +template +ostream& _STLP_CALL operator<<(ostream& s, const complex<_Tp>& __z); + +template +istream& _STLP_CALL operator>>(istream& s, complex<_Tp>& a); + +#endif /* _STLP_USE_NEW_IOSTREAMS */ + + +// Transcendental functions. These are defined only for float, +// double, and long double. (Sqrt isn't transcendental, of course, +// but it's included in this section anyway.) + +_STLP_DECLSPEC complex _STLP_CALL sqrt(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL exp(const complex&); +_STLP_DECLSPEC complex _STLP_CALL log(const complex&); +_STLP_DECLSPEC complex _STLP_CALL log10(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, int); +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const float&); +_STLP_DECLSPEC complex _STLP_CALL pow(const float&, const complex&); +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sin(const complex&); +_STLP_DECLSPEC complex _STLP_CALL cos(const complex&); +_STLP_DECLSPEC complex _STLP_CALL tan(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sinh(const complex&); +_STLP_DECLSPEC complex _STLP_CALL cosh(const complex&); +_STLP_DECLSPEC complex _STLP_CALL tanh(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sqrt(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL exp(const complex&); +_STLP_DECLSPEC complex _STLP_CALL log(const complex&); +_STLP_DECLSPEC complex _STLP_CALL log10(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, int); +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const double&); +_STLP_DECLSPEC complex _STLP_CALL pow(const double&, const complex&); +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sin(const complex&); +_STLP_DECLSPEC complex _STLP_CALL cos(const complex&); +_STLP_DECLSPEC complex _STLP_CALL tan(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sinh(const complex&); +_STLP_DECLSPEC complex _STLP_CALL cosh(const complex&); +_STLP_DECLSPEC complex _STLP_CALL tanh(const complex&); + +# ifndef _STLP_NO_LONG_DOUBLE +_STLP_DECLSPEC complex _STLP_CALL sqrt(const complex&); +_STLP_DECLSPEC complex _STLP_CALL exp(const complex&); +_STLP_DECLSPEC complex _STLP_CALL log(const complex&); +_STLP_DECLSPEC complex _STLP_CALL log10(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, int); +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, const long double&); +_STLP_DECLSPEC complex _STLP_CALL pow(const long double&, const complex&); +_STLP_DECLSPEC complex _STLP_CALL pow(const complex&, + const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sin(const complex&); +_STLP_DECLSPEC complex _STLP_CALL cos(const complex&); +_STLP_DECLSPEC complex _STLP_CALL tan(const complex&); + +_STLP_DECLSPEC complex _STLP_CALL sinh(const complex&); +_STLP_DECLSPEC complex _STLP_CALL cosh(const complex&); +_STLP_DECLSPEC complex _STLP_CALL tanh(const complex&); +# endif + +_STLP_END_NAMESPACE + +# ifndef _STLP_LINK_TIME_INSTANTIATION +# include +# endif + +#endif /* _STLP_template_complex */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_config_compat_post.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_config_compat_post.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,35 @@ +//========================================== + +# define __SGI_STL_PORT _STLPORT_VERSION + +# if defined (_STLP_DEBUG) && ! defined ( __STL_DEBUG ) +# define __STL_DEBUG _STLP_DEBUG +# endif + +# if defined (_STLP_USE_NAMESPACES) +# undef __STL_USE_NAMESPACES +# define __STL_USE_NAMESPACES _STLP_USE_NAMESPACES +# endif + +# if defined (_STLP_USE_EXCEPTIONS) +# undef __STL_USE_EXCEPTIONS +# define __STL_USE_EXCEPTIONS _STLP_USE_EXCEPTIONS +# endif + +# if defined (_STLP_USE_NEW_IOSTREAMS) && ! defined ( __STL_USE_NEW_IOSTREAMS ) +# define __STL_USE_NEW_IOSTREAMS _STLP_USE_NEW_IOSTREAMS +# endif + +# if defined (_STLP_BEGIN_NAMESPACE) && ! defined ( __STL_BEGIN_NAMESPACE ) +# define __STL_BEGIN_NAMESPACE _STLP_BEGIN_NAMESPACE +# define __STL_END_NAMESPACE _STLP_END_NAMESPACE +# define __STL_VENDOR_STD _STLP_VENDOR_STD +# define __STL_VENDOR_CSTD _STLP_VENDOR_CSTD +# endif + +/* +# if defined (_STLP_XXX) && ! defined ( __STL_XXX ) +# define __STL_XXX _STLP_XXX +# endif +*/ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_construct.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_construct.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,252 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_CONSTRUCT_H +#define _STLP_INTERNAL_CONSTRUCT_H + +#ifdef _STLP_USE_TRAP_LEAVE +#include +#endif // _STLP_USE_TRAP_LEAVE + +# if defined (_STLP_DEBUG_UNINITIALIZED) && ! defined (_STLP_CSTRING) +# include +# endif + +# ifndef _STLP_INTERNAL_NEW_HEADER +# include +# endif + + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG +template +inline void __destroy_aux(_Tp* __pointer, const __false_type&) { __pointer->~_Tp(); } +template +inline void __destroy_aux(_Tp* __pointer, const __true_type&) {} +# endif + +template +inline void _Destroy(_Tp* __pointer) { +# if _MSC_VER >= 1010 + __pointer; +# endif // _MSC_VER >= 1000 +# ifdef _STLP_TRIVIAL_DESTRUCTOR_BUG + typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor; + __destroy_aux(__pointer, _Trivial_destructor()); +# else +# if ( defined (__BORLANDC__) && ( __BORLANDC__ < 0x500 ) ) + __pointer->_Tp::~_Tp(); +# else + __pointer->~_Tp(); +# endif +# endif +# ifdef _STLP_DEBUG_UNINITIALIZED + memset((char*)__pointer, _STLP_SHRED_BYTE, sizeof(_Tp)); +# endif +} + +# if defined (new) +# define _STLP_NEW_REDEFINE new +# undef new +# endif + +# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG +template +inline void _Construct_aux (_T1* __p, const __false_type&) { +_STLP_PLACEMENT_NEW (__p) _T1(); +} + +template +inline void _Construct_aux (_T1* __p, const __true_type&) { +_STLP_PLACEMENT_NEW (__p) _T1(0); +} +# endif + +template +inline void _Construct(_T1* __p, const _T2& __val) { +# ifdef _STLP_DEBUG_UNINITIALIZED + memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1)); +# endif + _STLP_PLACEMENT_NEW (__p) _T1(__val); +} + +template +inline void _Construct(_T1* __p) { +# ifdef _STLP_DEBUG_UNINITIALIZED + memset((char*)__p, _STLP_SHRED_BYTE, sizeof(_T1)); +# endif +# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG +typedef typename _Is_integer<_T1>::_Integral _Is_Integral; +_Construct_aux (__p, _Is_Integral() ); +# else + _STLP_PLACEMENT_NEW (__p) _T1(); +# endif +} + +# if defined(_STLP_NEW_REDEFINE) +# ifdef DEBUG_NEW +# define new DEBUG_NEW +# endif +# undef _STLP_NEW_REDEFINE +# endif + +template +_STLP_INLINE_LOOP void +__destroy_aux(_ForwardIterator __first, _ForwardIterator __last, const __false_type&) { + for ( ; __first != __last; ++__first) + _STLP_STD::_Destroy(&*__first); +} + +template +inline void __destroy_aux(_ForwardIterator, _ForwardIterator, const __true_type&) {} + +template +inline void +__destroy(_ForwardIterator __first, _ForwardIterator __last, _Tp*) { + typedef typename __type_traits<_Tp>::has_trivial_destructor _Trivial_destructor; + __destroy_aux(__first, __last, _Trivial_destructor()); +} + +template +inline void _Destroy(_ForwardIterator __first, _ForwardIterator __last) { + __destroy(__first, __last, _STLP_VALUE_TYPE(__first, _ForwardIterator)); +} + +inline void _Destroy(char*, char*) {} +# ifdef _STLP_HAS_WCHAR_T // dwa 8/15/97 +inline void _Destroy(wchar_t*, wchar_t*) {} +inline void _Destroy(const wchar_t*, const wchar_t*) {} +# endif + +# ifndef _STLP_NO_ANACHRONISMS +// -------------------------------------------------- +// Old names from the HP STL. + +template +inline void construct(_T1* __p, const _T2& __val) {_Construct(__p, __val); } +template +inline void construct(_T1* __p) { _Construct(__p); } +template +inline void destroy(_Tp* __pointer) { _STLP_STD::_Destroy(__pointer); } +template +inline void destroy(_ForwardIterator __first, _ForwardIterator __last) { _STLP_STD::_Destroy(__first, __last); } +# endif + +#ifdef _STLP_USE_TRAP_LEAVE + +struct TCleanupOverlay +{ + TAny *vtable; + TAny *iBase; + TAny *iTop; + TAny *iNext; +}; + +template +struct _STLP_StackHelper { + static unsigned int Check( void *ptr ); + static void* _NewLC (size_t __n); +}; + +struct _STLP_StackPopper { + ~_STLP_StackPopper() { CleanupStack::Pop(); } +}; + +template +struct _STLP_Cleanup { + static void clear(TAny* __p); +}; + +# define _STLP_PUSH_CLEANUP_ITEM(_Tp, __p) CleanupStack::PushL(TCleanupItem(&_STLP_Cleanup< _Tp >::clear, (TAny*)__p)); +# define _STLP_PUSH_STACK_ITEM(_Tp, __p) _STLP_PUSH_CLEANUP_ITEM(_Tp, __p) _STLP_StackPopper __Popper; _STLP_no_unused_variable_warning( __Popper ); +# define _STLP_POP_IF_CHECK if (_STLP_StackHelper::Check(this)) CleanupStack::Pop(); +# define _STLP_POP_CLEANUP_ITEM CleanupStack::Pop(); _STLP_POP_IF_CHECK + +# define _STLP_POP_ITEM CleanupStack::Pop(); + +// to be used in complex object constructors +template +struct _STLP_StackPusher { + _STLP_StackPusher(_Tp * __p) { _STLP_PUSH_CLEANUP_ITEM(_Tp, (void*)__p) } +}; + +template +unsigned int _STLP_StackHelper<_Tp>::Check( void *ptr ) + +{ + TCleanupTrapHandler *handler = + (TCleanupTrapHandler *)User::TrapHandler(); + + CCleanup &cleanup = handler->Cleanup(); + + TCleanupOverlay *overlay = (TCleanupOverlay *)( &cleanup ); + + char *raw = (char *)(overlay->iNext) - 4; + void *topptr = *( (void **)(raw) ); + + return ( ptr == topptr ); +} + + +template +void* _STLP_StackHelper<_Tp>::_NewLC(size_t __n) { + void* __p = ::operator new (__n, ELeave) ; + // constructor will pop it back + CleanupStack::PushL(__p); + return __p; +} + +template +void _STLP_Cleanup<_Tp>::clear(TAny* __p) +{ + ((_Tp*)__p)->~_Tp(); +} + + +#else +# define _STLP_PUSH_CLEANUP_ITEM(_Tp, __p) +# define _STLP_POP_CLEANUP_ITEM +# define _STLP_PUSH_STACK_ITEM(_Tp, p) +# define _STLP_POP_ITEM +# define _STLP_POP_IF_CHECK +# define TPush TLeave +#endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_CONSTRUCT_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_csetjmp.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_csetjmp.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,65 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CSETJMP +#define _STLP_INTERNAL_CSETJMP + +// if the macro is on, the header is already there +#if !defined (setjmp) +# if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(csetjmp) +# else +# define _STLP_NATIVE_SETJMP_H_INCLUDED +# include _STLP_NATIVE_C_HEADER(setjmp.h) +# endif +#endif + +#if defined (_STLP_IMPORT_VENDOR_CSTD) + +# if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS) +/* For Borland, even if stdjmp.h is included symbols won't be in global namespace + * so we need to reach them in vendor namespace: + */ +# undef _STLP_NATIVE_SETJMP_H_INCLUDED +# endif + +_STLP_BEGIN_NAMESPACE +# if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED) +using _STLP_VENDOR_CSTD::jmp_buf; +# else +// if setjmp.h was included first, this is in global namespace, not in +// vendor's std. - 2005-08-04, ptr +using ::jmp_buf; +# endif +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +# if !defined (setjmp) +# if !defined (__MSL__) || ((__MSL__ > 0x7001) && (__MSL__ < 0x8000)) +# ifndef _STLP_NATIVE_SETJMP_H_INCLUDED +using _STLP_VENDOR_CSTD::setjmp; +# else +using ::setjmp; +# endif +# endif +# endif +# if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED) +using _STLP_VENDOR_CSTD::longjmp; +# else +using ::longjmp; +# endif +# endif +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_csignal.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_csignal.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,37 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CSIGNAL +#define _STLP_INTERNAL_CSIGNAL + +#if !defined (_STLP_WCE) +# if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(csignal) +# else +# include _STLP_NATIVE_C_HEADER(signal.h) +# endif + +# if defined (_STLP_IMPORT_VENDOR_CSTD) +_STLP_BEGIN_NAMESPACE +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +using _STLP_VENDOR_CSTD::signal; +using _STLP_VENDOR_CSTD::raise; +# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ +using _STLP_VENDOR_CSTD::sig_atomic_t; +_STLP_END_NAMESPACE +# endif /* _STLP_IMPORT_VENDOR_CSTD */ +#endif + +#endif /* _STLP_INTERNAL_CSIGNAL */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cstdarg.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cstdarg.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + +#ifndef _STLP_INTERNAL_CSTDARG +#define _STLP_INTERNAL_CSTDARG + +#if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(cstdarg) +#else +# include _STLP_NATIVE_C_HEADER(stdarg.h) +#endif + +#ifdef _STLP_IMPORT_VENDOR_CSTD +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::va_list; +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cstddef.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cstddef.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CSTDDEF +#define _STLP_INTERNAL_CSTDDEF + +# if (__GNUC__ >= 3) && defined (__CYGWIN__) // this total HACK is the only expedient way I could cygwin to work with GCC 3.0 +# define __need_wint_t // mostly because wint_t didn't seem to get defined otherwise :( +# define __need_wchar_t +# define __need_size_t +# define __need_ptrdiff_t +# define __need_NULL +# endif + +# if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(cstddef) +# else +# include +# endif + +# ifdef _STLP_IMPORT_VENDOR_CSTD +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::ptrdiff_t; +using _STLP_VENDOR_CSTD::size_t; +_STLP_END_NAMESPACE +# endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif /* _STLP_INTERNAL_CSTDDEF */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cstdio.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cstdio.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,125 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CSTDIO +#define _STLP_INTERNAL_CSTDIO + +#if defined (__Lynx__) +# include _STLP_NATIVE_C_HEADER(stdarg.h) +#endif + +#if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(cstdio) +#else +# include _STLP_NATIVE_C_HEADER(stdio.h) +#endif + +#if (defined (__MWERKS__) && !defined (N_PLAT_NLM)) || defined (__BORLANDC__) +# undef stdin +# undef stdout +# undef stderr +# if defined (__MWERKS__) +# define stdin (&_STLP_VENDOR_CSTD::__files[0]) +# define stdout (&_STLP_VENDOR_CSTD::__files[1]) +# define stderr (&_STLP_VENDOR_CSTD::__files[2]) +# elif defined (__BORLANDC__) +# define stdin (&_STLP_VENDOR_CSTD::_streams[0]) +# define stdout (&_STLP_VENDOR_CSTD::_streams[1]) +# define stderr (&_STLP_VENDOR_CSTD::_streams[2]) +# endif +#endif + +#if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) +inline int vsnprintf(char *s1, size_t n, const char *s2, va_list v) +{ return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v); } +#endif + +#if defined (_STLP_IMPORT_VENDOR_CSTD ) +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::FILE; +using _STLP_VENDOR_CSTD::fpos_t; +using _STLP_VENDOR_CSTD::size_t; + +// undef obsolete macros +# undef putc +# undef getc +# undef getchar +# undef putchar +# undef feof +# undef ferror + +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +using _STLP_VENDOR_CSTD::clearerr; +using _STLP_VENDOR_CSTD::fclose; +using _STLP_VENDOR_CSTD::feof; +using _STLP_VENDOR_CSTD::ferror; +using _STLP_VENDOR_CSTD::fflush; +using _STLP_VENDOR_CSTD::fgetc; +using _STLP_VENDOR_CSTD::fgetpos; +using _STLP_VENDOR_CSTD::fgets; +using _STLP_VENDOR_CSTD::fopen; +using _STLP_VENDOR_CSTD::fprintf; +using _STLP_VENDOR_CSTD::fputc; +using _STLP_VENDOR_CSTD::fputs; +using _STLP_VENDOR_CSTD::fread; +# if _WIN32_WCE < 0x500 // CE5 stopped supplying this +using _STLP_VENDOR_CSTD::freopen; +# endif +using _STLP_VENDOR_CSTD::fscanf; +using _STLP_VENDOR_CSTD::fseek; +using _STLP_VENDOR_CSTD::fsetpos; +using _STLP_VENDOR_CSTD::ftell; +using _STLP_VENDOR_CSTD::fwrite; + +# if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500)) +# if _WIN32_WCE < 0x500 // CE5 stopped supplying this except as macros. TODO: use inline function to redirect to the macros? + using _STLP_VENDOR_CSTD::getc; + using _STLP_VENDOR_CSTD::putc; +# endif + using _STLP_VENDOR_CSTD::getchar; + using _STLP_VENDOR_CSTD::putchar; +# endif + +using _STLP_VENDOR_CSTD::gets; +# if _WIN32_WCE < 0x500 // CE5 stopped supplying this +using _STLP_VENDOR_CSTD::perror; +# endif +using _STLP_VENDOR_CSTD::printf; +using _STLP_VENDOR_CSTD::puts; +# if _WIN32_WCE < 0x500 // CE5 stopped supplying this +using _STLP_VENDOR_CSTD::remove; +using _STLP_VENDOR_CSTD::rename; +using _STLP_VENDOR_CSTD::rewind; +using _STLP_VENDOR_CSTD::setbuf; +using _STLP_VENDOR_CSTD::tmpfile; +using _STLP_VENDOR_CSTD::tmpnam; +# endif +using _STLP_VENDOR_CSTD::scanf; +using _STLP_VENDOR_CSTD::setvbuf; +using _STLP_VENDOR_CSTD::sprintf; +using _STLP_VENDOR_CSTD::sscanf; +using _STLP_VENDOR_CSTD::ungetc; +using _STLP_VENDOR_CSTD::vfprintf; +using _STLP_VENDOR_CSTD::vprintf; +using _STLP_VENDOR_CSTD::vsprintf; +# if ((defined (__MWERKS__) && !defined (N_PLAT_NLM)) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \ + (defined (__BORLANDC__))) +using _STLP_VENDOR_CSTD::vsnprintf; +# endif +# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif /* _STLP_INTERNAL_CSTDIO */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cstdlib.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cstdlib.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CSTDLIB +#define _STLP_INTERNAL_CSTDLIB + +#if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(cstdlib) +#else +# include +#endif + +#if defined (__BORLANDC__) +/* Borland process.h header do not bring anything here and is just included + * in order to avoid inclusion later. This header cannot be included later + * because Borland compiler consider that for instance the abort function + * defined as extern "C" cannot be overloaded and it finds 2 "overloads", + * once in native std namespace and the other in STLport namespace... + */ +# include +#endif + +/* on evc3/evc4 including stdlib.h also defines setjmp macro */ +#if defined (_STLP_WCE) +# define _STLP_NATIVE_SETJMP_H_INCLUDED +#endif + +#if defined (__MSL__) && (__MSL__ <= 0x5003) +namespace std { + typedef ::div_t div_t; + typedef ::ldiv_t ldiv_t; +# ifdef __MSL_LONGLONG_SUPPORT__ + typedef ::lldiv_t lldiv_t; +# endif +} +#endif + +#ifdef _STLP_IMPORT_VENDOR_CSTD +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::div_t; +using _STLP_VENDOR_CSTD::ldiv_t; +using _STLP_VENDOR_CSTD::size_t; + +# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS +# ifndef _STLP_WCE +// these functions just don't exist on Windows CE +using _STLP_VENDOR_CSTD::abort; +using _STLP_VENDOR_CSTD::getenv; +using _STLP_VENDOR_CSTD::mblen; +using _STLP_VENDOR_CSTD::mbtowc; +using _STLP_VENDOR_CSTD::system; +using _STLP_VENDOR_CSTD::bsearch; +# endif +using _STLP_VENDOR_CSTD::atexit; +using _STLP_VENDOR_CSTD::exit; +using _STLP_VENDOR_CSTD::calloc; +using _STLP_VENDOR_CSTD::free; +using _STLP_VENDOR_CSTD::malloc; +using _STLP_VENDOR_CSTD::realloc; +using _STLP_VENDOR_CSTD::atof; +using _STLP_VENDOR_CSTD::atoi; +using _STLP_VENDOR_CSTD::atol; +using _STLP_VENDOR_CSTD::mbstowcs; +using _STLP_VENDOR_CSTD::strtod; +using _STLP_VENDOR_CSTD::strtol; +using _STLP_VENDOR_CSTD::strtoul; + +# if !(defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_MBSTATE_T)) +using _STLP_VENDOR_CSTD::wcstombs; +# ifndef _STLP_WCE +using _STLP_VENDOR_CSTD::wctomb; +# endif +# endif +using _STLP_VENDOR_CSTD::qsort; +using _STLP_VENDOR_CSTD::labs; +using _STLP_VENDOR_CSTD::ldiv; +# if defined (_STLP_LONG_LONG) && !defined (_STLP_NO_VENDOR_STDLIB_L) +# if !defined(__sun) +using _STLP_VENDOR_CSTD::llabs; +using _STLP_VENDOR_CSTD::lldiv_t; +using _STLP_VENDOR_CSTD::lldiv; +# else +using ::llabs; +using ::lldiv_t; +using ::lldiv; +# endif +# endif +using _STLP_VENDOR_CSTD::rand; +using _STLP_VENDOR_CSTD::srand; +# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS) +//In this config bcc define everything in std namespace and not in +//the global one. +inline int abs(int __x) { return _STLP_VENDOR_CSTD::abs(__x); } +inline _STLP_VENDOR_CSTD::div_t div(int __x, int __y) { return _STLP_VENDOR_CSTD::div(__x, __y); } +#endif + +#if defined(_MSC_EXTENSIONS) && defined(_STLP_MSVC) && (_STLP_MSVC <= 1300) +# define _STLP_RESTORE_FUNCTION_INTRINSIC +# pragma warning (push) +# pragma warning (disable: 4162) +# pragma function (abs) +#endif + +//HP-UX native lib has abs() and div() functions in global namespace +#if !defined (__HP_aCC) || (__HP_aCC < 30000) + +//MSVC starting with .Net 2003 already define all math functions in global namespace: +# if !defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined(UNDER_CE) +inline long abs(long __x) { return _STLP_VENDOR_CSTD::labs(__x); } +# endif + +/** VC since version 8 has this, the platform SDK and CE SDKs hanging behind. */ +# if !defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) || defined(UNDER_CE) +inline _STLP_VENDOR_CSTD::ldiv_t div(long __x, long __y) { return _STLP_VENDOR_CSTD::ldiv(__x, __y); } +# endif + +#endif + +#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC) +# pragma intrinsic (abs) +# pragma warning (pop) +# undef _STLP_RESTORE_FUNCTION_INTRINSIC +#endif + +#if defined (_STLP_LONG_LONG) +# if !defined (_STLP_NO_VENDOR_STDLIB_L) +# if !defined (__sun) +inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return _STLP_VENDOR_CSTD::llabs(__x); } +inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return _STLP_VENDOR_CSTD::lldiv(__x, __y); } +# else +inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return ::llabs(__x); } +inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return ::lldiv(__x, __y); } +# endif +# else +inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return __x < 0 ? -__x : __x; } +# endif +#endif + +/* C++ Standard is unclear about several call to 'using ::func' if new overloads + * of ::func appears between 2 successive 'using' calls. To avoid this potential + * problem we provide all abs overload before the 'using' call. + * Beware: This header inclusion has to be after all abs overload of this file. + * The first 'using ::abs' call is going to be in the other header. + */ +#ifndef _STLP_INTERNAL_CMATH +# include +#endif + +#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +// ad hoc, don't replace with _STLP_VENDOR_CSTD::abs here! - ptr 2005-03-05 +_STLP_BEGIN_NAMESPACE +using ::abs; +# if !defined (N_PLAT_NLM) +using ::div; +# else +// Don't use div from clib or libc on NetWare---buggy! - ptr 2005-06-06 +inline div_t div(int __x, int __y) { div_t d; d.quot = __x / __y; d.rem = __x % __y; return d; } +inline ldiv_t div(long __x, long __y) { ldiv_t d; d.quot = __x / __y; d.rem = __x % __y; return d; } +# endif +_STLP_END_NAMESPACE +#endif + +#endif /* _STLP_INTERNAL_CSTDLIB */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cstring.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cstring.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,31 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CSTRING +#define _STLP_INTERNAL_CSTRING + +#if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(cstring) +#else +# include _STLP_NATIVE_C_HEADER(string.h) +#endif + +#ifdef _STLP_IMPORT_VENDOR_CSTD +_STLP_BEGIN_NAMESPACE +# include +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif /* _STLP_INTERNAL_CSTRING */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ctime.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ctime.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,52 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CTIME +#define _STLP_INTERNAL_CTIME + +#if !defined (_STLP_WCE_EVC3) + +# if defined (_STLP_USE_NEW_C_HEADERS) +# include _STLP_NATIVE_CPP_C_HEADER(ctime) +# else +# include _STLP_NATIVE_C_HEADER(time.h) +# endif + +# if defined (_STLP_IMPORT_VENDOR_CSTD) +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD::size_t; +using _STLP_VENDOR_CSTD::clock_t; +using _STLP_VENDOR_CSTD::time_t; +using _STLP_VENDOR_CSTD::tm; +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +using _STLP_VENDOR_CSTD::clock; +using _STLP_VENDOR_CSTD::asctime; +using _STLP_VENDOR_CSTD::ctime; +using _STLP_VENDOR_CSTD::gmtime; + +# if _WIN32_WCE < 0x500 // CE5 stopped supplying this +using _STLP_VENDOR_CSTD::difftime; +# endif +using _STLP_VENDOR_CSTD::mktime; +using _STLP_VENDOR_CSTD::localtime; +using _STLP_VENDOR_CSTD::strftime; +using _STLP_VENDOR_CSTD::time; +# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ +_STLP_END_NAMESPACE +# endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif + +#endif /* _STLP_INTERNAL_CTIME */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ctraits_fns.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ctraits_fns.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,95 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + +#ifndef _STLP_INTERNAL_CTRAITS_FUNCTIONS_H +#define _STLP_INTERNAL_CTRAITS_FUNCTIONS_H + +# ifndef _STLP_INTERNAL_FUNCTION_H +# include +# endif + +// This file contains a few small adapters that allow a character +// traits class to be used as a function object. + +_STLP_BEGIN_NAMESPACE + +template +struct _Eq_traits + : public binary_function +{ + bool operator()(const typename _Traits::char_type& __x, + const typename _Traits::char_type& __y) const + { return _Traits::eq(__x, __y); } +}; + +template +struct _Eq_char_bound + : public unary_function +{ + typename _Traits::char_type __val; + _Eq_char_bound(typename _Traits::char_type __c) : __val(__c) {} + bool operator()(const typename _Traits::char_type& __x) const + { return _Traits::eq(__x, __val); } +}; + +template +struct _Neq_char_bound + : public unary_function +{ + typename _Traits::char_type __val; + _Neq_char_bound(typename _Traits::char_type __c) : __val(__c) {} + bool operator()(const typename _Traits::char_type& __x) const + { return !_Traits::eq(__x, __val); } +}; + +template +struct _Eq_int_bound + : public unary_function +{ + typename _Traits::int_type __val; + + _Eq_int_bound(typename _Traits::int_type __c) : __val(__c) {} + bool operator()(const typename _Traits::char_type& __x) const + { return _Traits::eq_int_type(_Traits::to_int_type(__x), __val); } +}; + +# if 0 +template +struct _Lt_traits + : public binary_function +{ + bool operator()(const typename _Traits::char_type& __x, + const typename _Traits::char_type& __y) const + { return _Traits::lt(__x, __y); } +}; +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_CTRAITS_FUNCTIONS_H */ + +// Local Variables: +// mode:C++ +// End: + + + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cwchar.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cwchar.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,119 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_CWCHAR_H +# define _STLP_CWCHAR_H + +#ifndef _STLP_NO_WCHAR_T +#ifdef __cplusplus +# include +#else +# include +#endif +#endif + +# if defined (__MRC__) || defined (__SC__) || defined (__BORLANDC__) || defined(__FreeBSD__) || (defined (__GNUC__) && defined (__APPLE__) || defined( __Lynx__ )) || defined (_STLP_NO_WCHAR_T) + +#ifdef __SYMBIAN32__ +# include +#else +# include _STLP_NATIVE_C_HEADER(stddef.h) +#endif +# if defined (__FreeBSD__) || defined (__Lynx__) +# ifndef _WINT_T +typedef long int wint_t; +# define _WINT_T +# endif /* _WINT_T */ +# endif +# endif + +# if defined ( _STLP_OWN_IOSTREAMS ) && defined (_STLP_NO_NATIVE_MBSTATE_T) && ! defined (_STLP_NO_MBSTATE_T) && ! defined (_MBSTATE_T) && ! defined (__mbstate_t_defined) +# define _STLP_USE_OWN_MBSTATE_T +# define _MBSTATE_T +# endif + +# ifdef _STLP_USE_OWN_MBSTATE_T + +#ifndef __SYMBIAN32__ //no more using the structure __stl_mbstate_t. usinfg _mb_state_t from _types.h. +// to be compatible across different SUN platforms +#ifdef __sun +# define __stl_mbstate_t __mbstate_t +#endif + +struct __stl_mbstate_t; + +# ifdef __cplusplus +struct __stl_mbstate_t { + __stl_mbstate_t( long __st = 0 ) { _M_state[0] = __st ; } + __stl_mbstate_t& operator=(const long __st) { + _M_state[0] = __st; + return *this; + } + __stl_mbstate_t(const __stl_mbstate_t& __x) {_M_state[0]= __x._M_state[0]; } + __stl_mbstate_t& operator=(const __stl_mbstate_t& __x) { + _M_state[0]= __x._M_state[0]; + return *this; + } +# if defined (__sun) +# ifdef _LP64 + long _M_state[4]; +# else + int _M_state[6]; +# endif +# else + long _M_state[1]; +# endif +}; + +inline bool operator==(const __stl_mbstate_t& __x, const __stl_mbstate_t& __y) { + return ( __x._M_state[0] == __y._M_state[0] ); +} + +inline bool operator!=(const __stl_mbstate_t& __x, const __stl_mbstate_t& __y) { + return ( __x._M_state[0] == __y._M_state[0] ); +} +# endif + + +#endif //#if __SYMBIAN32__ +_STLP_BEGIN_NAMESPACE +//typedef __mbstate_t __stl_mbstate_t; +//typedef __mbstate_t mbstate_t; + +_STLP_END_NAMESPACE + +# endif /* _STLP_USE_OWN_MBSTATE_T */ + +#if !defined (_STLP_NO_WCHAR_T) +# ifndef WCHAR_MIN +# define WCHAR_MIN 0 +// SUNpro has some bugs with casts. wchar_t is size of int there anyway. +# if defined (__SUNPRO_CC) || defined (__DJGPP) +# define WCHAR_MAX (~0) +# else +# define WCHAR_MAX ((wchar_t)~0) +# endif +# endif +#endif + +# if defined (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) +_STLP_BEGIN_NAMESPACE +using namespace _STLP_VENDOR_CSTD; +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#endif /* _STLP_CWCHAR_H */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_cwctype.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_cwctype.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,93 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_CWCTYPE +#define _STLP_INTERNAL_CWCTYPE + +#if defined (__BORLANDC__) && !defined (_STLP_INTERNAL_CCTYPE) +# include +#endif + +#if !defined (_STLP_WCE_EVC3) +# if defined (_STLP_USE_NEW_C_HEADERS) +# if !defined (N_PLAT_NLM) +# include _STLP_NATIVE_CPP_C_HEADER(cwctype) +# else + // see comments in stlport/cwchar about wint_t on Novell +# include _STLP_NATIVE_CPP_C_HEADER(wchar_t.h) +# include _STLP_NATIVE_C_HEADER(stddef.h) +# include _STLP_NATIVE_C_HEADER(stdio.h) +# endif +# if defined (__MSL__) && !defined (N_PLAT_NLM) +namespace std { + typedef wchar_t wctrans_t; + wint_t towctrans(wint_t c, wctrans_t value); + wctrans_t wctrans(const char *name); +} +using std::wctrans_t; +using std::towctrans; +using std::wctrans; +# endif +# else +# include _STLP_NATIVE_C_HEADER(wctype.h) +# endif + +# if defined (_STLP_IMPORT_VENDOR_CSTD) + +# if defined (_STLP_USE_GLIBC) && !(defined (_GLIBCPP_USE_WCHAR_T) || defined (_GLIBCXX_USE_WCHAR_T)) || \ + defined (__sun) || defined (__FreeBSD__) || \ + defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION < 3) || (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION <= 0)) +//We take wide functions from global namespace: +# define _STLP_VENDOR_CSTD_WFUNC +# else +# define _STLP_VENDOR_CSTD_WFUNC _STLP_VENDOR_CSTD +# endif + +_STLP_BEGIN_NAMESPACE +using _STLP_VENDOR_CSTD_WFUNC::wctype_t; +using _STLP_VENDOR_CSTD_WFUNC::wint_t; +# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) +# if !defined (__BORLANDC__) && !defined (__MSL__) +using _STLP_VENDOR_CSTD_WFUNC::wctrans_t; +# if !defined (__DMC__) && (!defined(_WIN32_WCE) || _WIN32_WCE<0x500) +using _STLP_VENDOR_CSTD_WFUNC::towctrans; +using _STLP_VENDOR_CSTD_WFUNC::wctrans; +using _STLP_VENDOR_CSTD_WFUNC::wctype; +# endif +using _STLP_VENDOR_CSTD_WFUNC::iswctype; +# endif +# if !defined(N_PLAT_NLM) +using _STLP_VENDOR_CSTD_WFUNC::iswalnum; +using _STLP_VENDOR_CSTD_WFUNC::iswalpha; +using _STLP_VENDOR_CSTD_WFUNC::iswcntrl; + +using _STLP_VENDOR_CSTD_WFUNC::iswdigit; +using _STLP_VENDOR_CSTD_WFUNC::iswgraph; +using _STLP_VENDOR_CSTD_WFUNC::iswlower; +using _STLP_VENDOR_CSTD_WFUNC::iswprint; +using _STLP_VENDOR_CSTD_WFUNC::iswpunct; +using _STLP_VENDOR_CSTD_WFUNC::iswspace; +using _STLP_VENDOR_CSTD_WFUNC::iswupper; +using _STLP_VENDOR_CSTD_WFUNC::iswxdigit; + +using _STLP_VENDOR_CSTD_WFUNC::towlower; +using _STLP_VENDOR_CSTD_WFUNC::towupper; +# endif /* !N_PLAT_NLM */ +# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ +_STLP_END_NAMESPACE +# endif /* _STLP_IMPORT_VENDOR_CSTD */ +#endif /* _STLP_WCE_EVC3 */ + +#endif /* _STLP_INTERNAL_CWCTYPE */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_deque.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_deque.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,691 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_DEQUE_C +# define _STLP_DEQUE_C + +# ifndef _STLP_INTERNAL_DEQUE_H +# include +# endif + +_STLP_BEGIN_NAMESPACE + +// Non-inline member functions from _Deque_base. + +template +_Deque_base<_Tp,_Alloc >::~_Deque_base() { + if (_M_map._M_data) { + if (_M_start._M_node) { + _M_destroy_nodes(_M_start._M_node, this->_M_finish._M_node + 1); + } + _M_map.deallocate(_M_map._M_data, _M_map_size._M_data); + } +} + +template +void +_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements) +{ + size_t __num_nodes = + __num_elements / this->buffer_size() + 1 ; + + _M_map_size._M_data = (max)((size_t) _S_initial_map_size, __num_nodes + 2); + _M_map._M_data = _M_map.allocate(_M_map_size._M_data); + + _Tp** __nstart = _M_map._M_data + (_M_map_size._M_data - __num_nodes) / 2; + _Tp** __nfinish = __nstart + __num_nodes; + + _STLP_TRY { + _M_create_nodes(__nstart, __nfinish); + } + _STLP_UNWIND((_M_map.deallocate(_M_map._M_data, _M_map_size._M_data), + _M_map._M_data = 0, _M_map_size._M_data = 0)); + _M_start._M_set_node(__nstart); + this->_M_finish._M_set_node(__nfinish - 1); + _M_start._M_cur = _M_start._M_first; + this->_M_finish._M_cur = this->_M_finish._M_first + + __num_elements % this->buffer_size(); +} + +template +void +_Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart, + _Tp** __nfinish) +{ + _Tp** _STLP_LEAVE_VOLATILE __cur = 0; + _STLP_TRY { + for (__cur = __nstart; __cur < __nfinish; ++__cur) + *__cur = _M_map_size.allocate(this->buffer_size()); + } + _STLP_UNWIND(_M_destroy_nodes(__nstart, __cur)); +} + +template +void +_Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, + _Tp** __nfinish) +{ + for (_Tp** __n = __nstart; __n < __nfinish; ++__n) + _M_map_size.deallocate(*__n, this->buffer_size()); +} + + + +// Non-inline member functions + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +// qualified references +# define __iterator__ _Deque_iterator<_Tp, _Nonconst_traits<_Tp> > +# define const_iterator _Deque_iterator<_Tp, _Const_traits<_Tp> > +# define iterator __iterator__ +# define size_type size_t +# define value_type _Tp +# else +# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE __deque__<_Tp, _Alloc>::iterator +# endif + +template +__deque__<_Tp, _Alloc >& +__deque__<_Tp, _Alloc >::operator= (const __deque__<_Tp, _Alloc >& __x) { + const size_type __len = size(); + if (&__x != this) { + if (__len >= __x.size()) + erase(copy(__x.begin(), __x.end(), this->_M_start), this->_M_finish); + else { + const_iterator __mid = __x.begin() + difference_type(__len); + copy(__x.begin(), __mid, this->_M_start); + insert(this->_M_finish, __mid, __x.end()); + } + } + return *this; +} + +template +void +__deque__<_Tp, _Alloc >::_M_fill_insert(iterator __pos, + size_type __n, const value_type& __x) +{ + if (__pos._M_cur == this->_M_start._M_cur) { + iterator __new_start = _M_reserve_elements_at_front(__n); + _STLP_TRY { + uninitialized_fill(__new_start, this->_M_start, __x); + } + _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); + this->_M_start = __new_start; + } + else if (__pos._M_cur == this->_M_finish._M_cur) { + iterator __new_finish = _M_reserve_elements_at_back(__n); + _STLP_TRY { + uninitialized_fill(this->_M_finish, __new_finish, __x); + } + _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node+1, __new_finish._M_node+1)); + this->_M_finish = __new_finish; + } + else + _M_insert_aux(__pos, __n, __x); +} + +#ifndef _STLP_MEMBER_TEMPLATES + +template +void __deque__<_Tp, _Alloc>::insert(iterator __pos, + const value_type* __first, + const value_type* __last) { + size_type __n = __last - __first; + if (__pos._M_cur == this->_M_start._M_cur) { + iterator __new_start = _M_reserve_elements_at_front(__n); + _STLP_TRY { + uninitialized_copy(__first, __last, __new_start); + } + _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); + this->_M_start = __new_start; + } + else if (__pos._M_cur == this->_M_finish._M_cur) { + iterator __new_finish = _M_reserve_elements_at_back(__n); + _STLP_TRY { + uninitialized_copy(__first, __last, this->_M_finish); + } + _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, + __new_finish._M_node + 1)); + this->_M_finish = __new_finish; + } + else + _M_insert_aux(__pos, __first, __last, __n); +} + +template +void __deque__<_Tp,_Alloc>::insert(iterator __pos, + const_iterator __first, + const_iterator __last) +{ + size_type __n = __last - __first; + if (__pos._M_cur == this->_M_start._M_cur) { + iterator __new_start = _M_reserve_elements_at_front(__n); + _STLP_TRY { + uninitialized_copy(__first, __last, __new_start); + } + _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); + this->_M_start = __new_start; + } + else if (__pos._M_cur == this->_M_finish._M_cur) { + iterator __new_finish = _M_reserve_elements_at_back(__n); + _STLP_TRY { + uninitialized_copy(__first, __last, this->_M_finish); + } + _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1,__new_finish._M_node + 1)); + this->_M_finish = __new_finish; + } + else + _M_insert_aux(__pos, __first, __last, __n); +} + +#endif /* _STLP_MEMBER_TEMPLATES */ + +template +__iterator__ +__deque__<_Tp,_Alloc>::erase(iterator __first, iterator __last) +{ + if (__first == this->_M_start && __last == this->_M_finish) { + clear(); + return this->_M_finish; + } + else { + difference_type __n = __last - __first; + difference_type __elems_before = __first - this->_M_start; + if (__elems_before < difference_type(this->size() - __n) / 2) { + copy_backward(this->_M_start, __first, __last); + iterator __new_start = this->_M_start + __n; + _STLP_STD::_Destroy(this->_M_start, __new_start); + this->_M_destroy_nodes(this->_M_start._M_node, __new_start._M_node); + this->_M_start = __new_start; + } + else { + copy(__last, this->_M_finish, __first); + iterator __new_finish = this->_M_finish - __n; + _STLP_STD::_Destroy(__new_finish, this->_M_finish); + this->_M_destroy_nodes(__new_finish._M_node + 1, this->_M_finish._M_node + 1); + this->_M_finish = __new_finish; + } + return this->_M_start + __elems_before; + } +} + +template +void __deque__<_Tp,_Alloc>::clear() +{ + for (_Map_pointer __node = this->_M_start._M_node + 1; + __node < this->_M_finish._M_node; + ++__node) { + _STLP_STD::_Destroy(*__node, *__node + this->buffer_size()); + this->_M_map_size.deallocate(*__node, this->buffer_size()); + } + + if (this->_M_start._M_node != this->_M_finish._M_node) { + _STLP_STD::_Destroy(this->_M_start._M_cur, this->_M_start._M_last); + _STLP_STD::_Destroy(this->_M_finish._M_first, this->_M_finish._M_cur); + this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size()); + } + else + _STLP_STD::_Destroy(this->_M_start._M_cur, this->_M_finish._M_cur); + + this->_M_finish = this->_M_start; +} + +// Precondition: this->_M_start and this->_M_finish have already been initialized, +// but none of the deque's elements have yet been constructed. +template +void +__deque__<_Tp,_Alloc>::_M_fill_initialize(const value_type& __val) { + _STLP_LEAVE_VOLATILE _Map_pointer __cur = 0; + _STLP_TRY { + for (__cur = this->_M_start._M_node; __cur < this->_M_finish._M_node; ++__cur) + uninitialized_fill(*__cur, *__cur + this->buffer_size(), __val); + uninitialized_fill(this->_M_finish._M_first, this->_M_finish._M_cur, __val); + } + _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_start, iterator(*__cur, __cur))); +} + + +// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1. +template +void +__deque__<_Tp,_Alloc>::_M_push_back_aux_v(const value_type& __t) +{ + value_type __t_copy = __t; + _STLP_PUSH_CLEANUP_ITEM(value_type, &__t_copy); + _M_reserve_map_at_back(); + *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size()); + _STLP_TRY { + _Construct(this->_M_finish._M_cur, __t_copy); + this->_M_finish._M_set_node(this->_M_finish._M_node + 1); + this->_M_finish._M_cur = this->_M_finish._M_first; + } + _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1), + this->buffer_size())); +#ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::Pop(); +#endif +} + +# ifndef _STLP_NO_ANACHRONISMS +// Called only if this->_M_finish._M_cur == this->_M_finish._M_last - 1. +template +void +__deque__<_Tp,_Alloc>::_M_push_back_aux() +{ + _M_reserve_map_at_back(); + *(this->_M_finish._M_node + 1) = this->_M_map_size.allocate(this->buffer_size()); + _STLP_TRY { + _Construct(this->_M_finish._M_cur); + this->_M_finish._M_set_node(this->_M_finish._M_node + 1); + this->_M_finish._M_cur = this->_M_finish._M_first; + } + _STLP_UNWIND(this->_M_map_size.deallocate(*(this->_M_finish._M_node + 1), + this->buffer_size())); +} +# endif + +// Called only if this->_M_start._M_cur == this->_M_start._M_first. +template +void +__deque__<_Tp,_Alloc>::_M_push_front_aux_v(const value_type& __t) +{ + value_type __t_copy = __t; + _STLP_PUSH_CLEANUP_ITEM(value_type, &__t_copy); + _M_reserve_map_at_front(); + *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size()); + _STLP_TRY { + this->_M_start._M_set_node(this->_M_start._M_node - 1); + this->_M_start._M_cur = this->_M_start._M_last - 1; + _Construct(this->_M_start._M_cur, __t_copy); + } + _STLP_UNWIND((++this->_M_start, + this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), this->buffer_size()))); +#ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::Pop(); +#endif +} + + +# ifndef _STLP_NO_ANACHRONISMS +// Called only if this->_M_start._M_cur == this->_M_start._M_first. +template +void +__deque__<_Tp,_Alloc>::_M_push_front_aux() +{ + _M_reserve_map_at_front(); + *(this->_M_start._M_node - 1) = this->_M_map_size.allocate(this->buffer_size()); + _STLP_TRY { + this->_M_start._M_set_node(this->_M_start._M_node - 1); + this->_M_start._M_cur = this->_M_start._M_last - 1; + _Construct(this->_M_start._M_cur); + } + _STLP_UNWIND((++this->_M_start, this->_M_map_size.deallocate(*(this->_M_start._M_node - 1), + this->buffer_size() ))); +} +# endif + +// Called only if this->_M_finish._M_cur == this->_M_finish._M_first. +template +void +__deque__<_Tp,_Alloc>::_M_pop_back_aux() +{ + this->_M_map_size.deallocate(this->_M_finish._M_first, this->buffer_size()); + this->_M_finish._M_set_node(this->_M_finish._M_node - 1); + this->_M_finish._M_cur = this->_M_finish._M_last - 1; + _STLP_STD::_Destroy(this->_M_finish._M_cur); +} + +// Called only if this->_M_start._M_cur == this->_M_start._M_last - 1. Note that +// if the deque has at least one element (a precondition for this member +// function), and if this->_M_start._M_cur == this->_M_start._M_last, then the deque +// must have at least two nodes. +template +void +__deque__<_Tp,_Alloc>::_M_pop_front_aux() +{ + _STLP_STD::_Destroy(this->_M_start._M_cur); + this->_M_map_size.deallocate(this->_M_start._M_first, this->buffer_size()); + this->_M_start._M_set_node(this->_M_start._M_node + 1); + this->_M_start._M_cur = this->_M_start._M_first; +} + + + +template +__iterator__ +__deque__<_Tp,_Alloc>::_M_insert_aux_prepare(iterator __pos) { + difference_type __index = __pos - this->_M_start; + if (__index < difference_type(size() / 2)) { + push_front(front()); + iterator __front1 = this->_M_start; + ++__front1; + iterator __front2 = __front1; + ++__front2; + __pos = this->_M_start + __index; + iterator __pos1 = __pos; + ++__pos1; + copy(__front2, __pos1, __front1); + } + else { + push_back(back()); + iterator __back1 = this->_M_finish; + --__back1; + iterator __back2 = __back1; + --__back2; + __pos = this->_M_start + __index; + copy_backward(__pos, __back2, __back1); + } + return __pos; +} + +template +__iterator__ +__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, + const value_type& __x) { + value_type __x_copy = __x; + _STLP_PUSH_CLEANUP_ITEM(value_type, &__x_copy); + _STLP_MPWFIX_TRY //*TY 06/01/2000 - mpw forget to call dtor on __x_copy without this try block + __pos = _M_insert_aux_prepare(__pos); + *__pos = __x_copy; +#ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::Pop(); +#endif + return __pos; + _STLP_MPWFIX_CATCH //*TY 06/01/2000 - +} + +template +__iterator__ +__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos) +{ + __pos = _M_insert_aux_prepare(__pos); + *__pos = value_type(); + return __pos; +} + +template +void +__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, + size_type __n, + const value_type& __x) +{ + const difference_type __elems_before = __pos - this->_M_start; + size_type __length = this->size(); + value_type __x_copy = __x; + _STLP_PUSH_CLEANUP_ITEM(value_type, &__x_copy); + + if (__elems_before < difference_type(__length / 2)) { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_start; + __pos = this->_M_start + __elems_before; + _STLP_TRY { + if (__elems_before >= difference_type(__n)) { + iterator __start_n = this->_M_start + difference_type(__n); + uninitialized_copy(this->_M_start, __start_n, __new_start); + this->_M_start = __new_start; + copy(__start_n, __pos, __old_start); + fill(__pos - difference_type(__n), __pos, __x_copy); + } + else { + __uninitialized_copy_fill(this->_M_start, __pos, __new_start, + this->_M_start, __x_copy); + this->_M_start = __new_start; + fill(__old_start, __pos, __x_copy); + } + } + _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); + } + else { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_finish; + const difference_type __elems_after = + difference_type(__length) - __elems_before; + __pos = this->_M_finish - __elems_after; + _STLP_TRY { + if (__elems_after > difference_type(__n)) { + iterator __finish_n = this->_M_finish - difference_type(__n); + uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); + this->_M_finish = __new_finish; + copy_backward(__pos, __finish_n, __old_finish); + fill(__pos, __pos + difference_type(__n), __x_copy); + } + else { + __uninitialized_fill_copy(this->_M_finish, __pos + difference_type(__n), + __x_copy, __pos, this->_M_finish); + this->_M_finish = __new_finish; + fill(__pos, __old_finish, __x_copy); + } + } + _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)); + } +#ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::Pop(); +#endif +} + +#ifndef _STLP_MEMBER_TEMPLATES +template +void +__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, + const value_type* __first, + const value_type* __last, + size_type __n) +{ + + const difference_type __elemsbefore = __pos - this->_M_start; + size_type __length = size(); + if (__elemsbefore < difference_type(__length / 2)) { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_start; + __pos = this->_M_start + __elemsbefore; + _STLP_TRY { + if (__elemsbefore >= difference_type(__n)) { + iterator __start_n = this->_M_start + difference_type(__n); + uninitialized_copy(this->_M_start, __start_n, __new_start); + this->_M_start = __new_start; + copy(__start_n, __pos, __old_start); + copy(__first, __last, __pos - difference_type(__n)); + } + else { + const value_type* __mid = + __first + (difference_type(__n) - __elemsbefore); + __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, + __new_start, _IsPODType()); + this->_M_start = __new_start; + copy(__mid, __last, __old_start); + } + } + _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); + } + else { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_finish; + const difference_type __elemsafter = + difference_type(__length) - __elemsbefore; + __pos = this->_M_finish - __elemsafter; + _STLP_TRY { + if (__elemsafter > difference_type(__n)) { + iterator __finish_n = this->_M_finish - difference_type(__n); + uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); + this->_M_finish = __new_finish; + copy_backward(__pos, __finish_n, __old_finish); + copy(__first, __last, __pos); + } + else { + const value_type* __mid = __first + __elemsafter; + __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType()); + this->_M_finish = __new_finish; + copy(__first, __mid, __pos); + } + } + _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)); + } +} + +template +void +__deque__<_Tp,_Alloc>::_M_insert_aux(iterator __pos, + const_iterator __first, + const_iterator __last, + size_type __n) +{ + const difference_type __elemsbefore = __pos - this->_M_start; + size_type __length = size(); + if (__elemsbefore < difference_type(__length / 2)) { + iterator __new_start = _M_reserve_elements_at_front(__n); + iterator __old_start = this->_M_start; + __pos = this->_M_start + __elemsbefore; + _STLP_TRY { + if (__elemsbefore >= difference_type(__n)) { + iterator __start_n = this->_M_start + __n; + uninitialized_copy(this->_M_start, __start_n, __new_start); + this->_M_start = __new_start; + copy(__start_n, __pos, __old_start); + copy(__first, __last, __pos - difference_type(__n)); + } + else { + const_iterator __mid = __first + (__n - __elemsbefore); + __uninitialized_copy_copy(this->_M_start, __pos, __first, __mid, + __new_start, _IsPODType()); + this->_M_start = __new_start; + copy(__mid, __last, __old_start); + } + } + _STLP_UNWIND(this->_M_destroy_nodes(__new_start._M_node, this->_M_start._M_node)); + } + else { + iterator __new_finish = _M_reserve_elements_at_back(__n); + iterator __old_finish = this->_M_finish; + const difference_type __elemsafter = __length - __elemsbefore; + __pos = this->_M_finish - __elemsafter; + _STLP_TRY { + if (__elemsafter > difference_type(__n)) { + iterator __finish_n = this->_M_finish - difference_type(__n); + uninitialized_copy(__finish_n, this->_M_finish, this->_M_finish); + this->_M_finish = __new_finish; + copy_backward(__pos, __finish_n, __old_finish); + copy(__first, __last, __pos); + } + else { + const_iterator __mid = __first + __elemsafter; + __uninitialized_copy_copy(__mid, __last, __pos, this->_M_finish, this->_M_finish, _IsPODType()); + this->_M_finish = __new_finish; + copy(__first, __mid, __pos); + } + } + _STLP_UNWIND(this->_M_destroy_nodes(this->_M_finish._M_node + 1, __new_finish._M_node + 1)); + } +} + +#endif /* _STLP_MEMBER_TEMPLATES */ + +template +void +__deque__<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems) +{ + size_type __new_nodes + = (__new_elems + this->buffer_size() - 1) / this->buffer_size(); + _M_reserve_map_at_front(__new_nodes); + size_type __i =1; + _STLP_TRY { + for (; __i <= __new_nodes; ++__i) + *(this->_M_start._M_node - __i) = this->_M_map_size.allocate(this->buffer_size()); + } + _STLP_CATCH_ALL { + for (size_type __j = 1; __j < __i; ++__j) + this->_M_map_size.deallocate(*(this->_M_start._M_node - __j), this->buffer_size()); + _STLP_RETHROW; + } +} + +template +void +__deque__<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems) +{ + size_type __new_nodes + = (__new_elems + this->buffer_size() - 1) / this->buffer_size(); + _M_reserve_map_at_back(__new_nodes); + size_type __i = 1; + _STLP_TRY { + for (; __i <= __new_nodes; ++__i) + *(this->_M_finish._M_node + __i) = this->_M_map_size.allocate(this->buffer_size()); + } + _STLP_CATCH_ALL { + for (size_type __j = 1; __j < __i; ++__j) + this->_M_map_size.deallocate(*(this->_M_finish._M_node + __j), this->buffer_size()); + _STLP_RETHROW; + } +} + +template +void +__deque__<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add, + bool __add_at_front) +{ + size_type __old_num_nodes = this->_M_finish._M_node - this->_M_start._M_node + 1; + size_type __new_num_nodes = __old_num_nodes + __nodes_to_add; + + _Map_pointer __new_nstart; + if (this->_M_map_size._M_data > 2 * __new_num_nodes) { + __new_nstart = this->_M_map._M_data + (this->_M_map_size._M_data - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + if (__new_nstart < this->_M_start._M_node) + copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart); + else + copy_backward(this->_M_start._M_node, this->_M_finish._M_node + 1, + __new_nstart + __old_num_nodes); + } + else { + size_type __new_map_size = + this->_M_map_size._M_data + (max)((size_t)this->_M_map_size._M_data, __nodes_to_add) + 2; + + _Map_pointer __new_map = this->_M_map.allocate(__new_map_size); + __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2 + + (__add_at_front ? __nodes_to_add : 0); + copy(this->_M_start._M_node, this->_M_finish._M_node + 1, __new_nstart); + this->_M_map.deallocate(this->_M_map._M_data, this->_M_map_size._M_data); + + this->_M_map._M_data = __new_map; + this->_M_map_size._M_data = __new_map_size; + } + + this->_M_start._M_set_node(__new_nstart); + this->_M_finish._M_set_node(__new_nstart + __old_num_nodes - 1); +} + +_STLP_END_NAMESPACE + +# undef __iterator__ +# undef iterator +# undef const_iterator +# undef size_type +# undef value_type + +#endif /* _STLP_DEQUE_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_fstream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_fstream.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,891 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_FSTREAM_C +#define _STLP_FSTREAM_C + +# ifndef _STLP_INTERNAL_FSTREAM_H +# include +# endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +_STLP_BEGIN_NAMESPACE + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +// no wchar_t is supported for this mode +# define __BF_int_type__ int +# define __BF_pos_type__ streampos +# define __BF_off_type__ streamoff +# else +# define __BF_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type +# define __BF_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::pos_type +# define __BF_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::off_type +# endif + + +//---------------------------------------------------------------------- +// Public basic_filebuf<> member functions + +template +basic_filebuf<_CharT, _Traits>::basic_filebuf() + : basic_streambuf<_CharT, _Traits>(), _M_base(), + _M_constant_width(false), _M_always_noconv(false), + _M_int_buf_dynamic(false), + _M_in_input_mode(false), _M_in_output_mode(false), + _M_in_error_mode(false), _M_in_putback_mode(false), + _M_int_buf(0), _M_int_buf_EOS(0), + _M_ext_buf(0), _M_ext_buf_EOS(0), + _M_ext_buf_converted(0), _M_ext_buf_end(0), + _M_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)), + _M_end_state(_STLP_DEFAULT_CONSTRUCTED(_State_type)), + _M_mmap_base(0), _M_mmap_len(0), + _M_saved_eback(0), _M_saved_gptr(0), _M_saved_egptr(0), + _M_codecvt(0), + _M_width(1), _M_max_width(1) +{ + this->_M_setup_codecvt(locale()); +} + +template +basic_filebuf<_CharT, _Traits>::~basic_filebuf() { + this->close(); + _M_deallocate_buffers(); +} + + +template +_STLP_TYPENAME_ON_RETURN_TYPE basic_filebuf<_CharT, _Traits>::int_type +basic_filebuf<_CharT, _Traits>::underflow() +{ + return _Underflow<_CharT, _Traits>::_M_doit(this); +} + +template +basic_filebuf<_CharT, _Traits>* +basic_filebuf<_CharT, _Traits>::close() +{ + bool __ok = this->is_open(); + + if (_M_in_output_mode) { + __ok = __ok && !_Traits::eq_int_type(this->overflow(traits_type::eof()), + traits_type::eof()); + __ok == __ok && this->_M_unshift(); + } + else if (_M_in_input_mode) + this->_M_exit_input_mode(); + + // Note order of arguments. We close the file even if __ok is false. + __ok = _M_base._M_close() && __ok; + + // Restore the initial state, except that we don't deallocate the buffer + // or mess with the cached codecvt information. + _M_state = _M_end_state = _State_type(); + _M_ext_buf_converted = _M_ext_buf_end = 0; + + _M_mmap_base = 0; + _M_mmap_len = 0; + +#ifdef __SYMBIAN32__ + if (__ok) { +#endif // __SYMBIAN32__ + this->setg(0, 0, 0); + this->setp(0, 0); +#ifdef __SYMBIAN32__ + } +#endif // __SYMBIAN32__ + + _M_saved_eback = _M_saved_gptr = _M_saved_egptr = 0; + + _M_in_input_mode = _M_in_output_mode = _M_in_error_mode = _M_in_putback_mode + = false; + + return __ok ? this : 0; +} + +// This member function is called whenever we exit input mode. +// It unmaps the memory-mapped file, if any, and sets +// _M_in_input_mode to false. +template +void basic_filebuf<_CharT, _Traits>::_M_exit_input_mode() +{ + if (_M_mmap_base != 0) + _M_base._M_unmap(_M_mmap_base, _M_mmap_len); + _M_in_input_mode = false; + _M_mmap_base = 0; +} + + +//---------------------------------------------------------------------- +// basic_filebuf<> overridden protected virtual member functions + +template +streamsize basic_filebuf<_CharT, _Traits>::showmanyc() +{ + // Is there any possibility that reads can succeed? +#ifdef __SYMBIAN32__ + if (!this->is_open() || !(_M_base.__o_mode() & (int)ios_base::in) || _M_in_error_mode) +#else + if (!this->is_open() || _M_in_output_mode || _M_in_error_mode) +#endif + return -1; + + else if (_M_in_putback_mode) + return this->egptr() - this->gptr(); + + else if (_M_constant_width) { + streamoff __pos = _M_base._M_seek(0, ios_base::cur); + streamoff __size = _M_base._M_file_size(); +#ifdef __SYMBIAN32__ + if(__size == 0) + return 0; +#endif + return __pos >= 0 && __size > __pos ? __size - __pos : -1; + } + + else + return 0; +} + + +// Make a putback position available, if necessary, by switching to a +// special internal buffer used only for putback. The buffer is +// [_M_pback_buf, _M_pback_buf + _S_pback_buf_size), but the base +// class only sees a piece of it at a time. (We want to make sure +// that we don't try to read a character that hasn't been initialized.) +// The end of the putback buffer is always _M_pback_buf + _S_pback_buf_size, +// but the beginning is usually not _M_pback_buf. +template +__BF_int_type__ +basic_filebuf<_CharT, _Traits>::pbackfail(int_type __c) +{ + const int_type __eof = traits_type::eof(); + + // If we aren't already in input mode, pushback is impossible. + if (!_M_in_input_mode) + return __eof; + + // We can use the ordinary get buffer if there's enough space, and + // if it's a buffer that we're allowed to write to. + if (this->gptr() != this->eback() && + (traits_type::eq_int_type(__c, __eof) || + traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1]) || + !_M_mmap_base)) { + this->gbump(-1); + if (traits_type::eq_int_type(__c, __eof) || + traits_type::eq(traits_type::to_char_type(__c), *this->gptr())) + return traits_type::to_int_type(*this->gptr()); + } + else if (!traits_type::eq_int_type(__c, __eof)) { + // Are we in the putback buffer already? + _CharT* __pback_end = _M_pback_buf + __STATIC_CAST(int,_S_pback_buf_size); + if (_M_in_putback_mode) { + // Do we have more room in the putback buffer? + if (this->eback() != _M_pback_buf) + this->setg(this->egptr() - 1, this->egptr() - 1, __pback_end); + else + return __eof; // No more room in the buffer, so fail. + } + else { // We're not yet in the putback buffer. + _M_saved_eback = this->eback(); + _M_saved_gptr = this->gptr(); + _M_saved_egptr = this->egptr(); + this->setg(__pback_end - 1, __pback_end - 1, __pback_end); + _M_in_putback_mode = true; + } + } + else + { +#ifdef __SYMBIAN32__ + if (traits_type::eq_int_type(__c, __eof) ) + { + if(_M_in_putback_mode) + { + _M_in_putback_mode = false; + // we are at putback mode + if(_M_saved_eback != _M_saved_gptr) + { + this->setg(_M_saved_eback, _M_saved_gptr - 1, _M_saved_egptr); + return *this->gptr(); + } + else + this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr); + + } + else + { + if(!this->eback()) + { + streamoff __pos = _M_base._M_seek(0, ios_base::cur); + streamoff __size = _M_base._M_file_size(); + if( __size > 0 && __pos > 0 && __pos == __size) + __pos = _M_base._M_seek(__pos - 1, ios_base::beg); + this->underflow(); + this->setg(this->eback(), this->gptr(), this->egptr()); + return *this->gptr(); + } + else + { + this->setg(this->eback(), this->gptr() - 1, this->egptr()); + return *this->gptr(); + } + } + } +#endif + return __eof; + } + // We have made a putback position available. Assign to it, and return. + *this->gptr() = traits_type::to_char_type(__c); + return __c; +} + +// This member function flushes the put area, and also outputs the +// character __c (unless __c is eof). Invariant: we always leave room +// in the internal buffer for one character more than the base class knows +// about. We see the internal buffer as [_M_int_buf, _M_int_buf_EOS), but +// the base class only sees [_M_int_buf, _M_int_buf_EOS - 1). +template +__BF_int_type__ +basic_filebuf<_CharT, _Traits>::overflow(int_type __c) +{ + // Switch to output mode, if necessary. + bool putflag = false; + if (!_M_in_output_mode) + { +#ifdef __SYMBIAN32__ + if(this->_M_int_buf) + putflag = true; +#endif + if (!_M_switch_to_output_mode()) + return traits_type::eof(); + } + _CharT* __ibegin = this->_M_int_buf; + _CharT* __iend = this->pptr(); + this->setp(_M_int_buf, _M_int_buf_EOS - 1); + + // Put __c at the end of the internal buffer. + if (!traits_type::eq_int_type(__c, traits_type::eof())) + *__iend++ = __c; +#ifdef __SYMBIAN32__ + int current_pos = this->gptr() - this->eback(); + streamoff __size = _M_base._M_file_size(); + if(current_pos > 0 && current_pos < __size && _M_base.__is_open()) + _M_base._M_seek(current_pos, ios_base::beg); +#endif + + // For variable-width encodings, output may take more than one pass. + while (__ibegin != __iend) { + const _CharT* __inext = __ibegin; + char* __enext = _M_ext_buf; + typename _Codecvt::result __status + = _M_codecvt->out(_M_state, __ibegin, __iend, __inext, + _M_ext_buf, _M_ext_buf_EOS, __enext); + if (__status == _Codecvt::noconv) +#ifdef __SYMBIAN32__ + { + if(_Noconv_output<_Traits>::_M_doit(this, __ibegin, __iend)) + { + if (this->eback()) + { + *(this->gptr()) = __c; + this->setg(this->eback(), this->gptr() + 1, this->egptr()); + } + if(putflag && this->pptr() < this->epptr()) + this->setp(this->pptr() + 1, this->epptr()); + return traits_type::not_eof(__c); + } + else + return _M_output_error(); + } +#else + return _Noconv_output<_Traits>::_M_doit(this, __ibegin, __iend) + ? traits_type::not_eof(__c) + : _M_output_error(); +#endif + // For a constant-width encoding we know that the external buffer + // is large enough, so failure to consume the entire internal buffer + // or to produce the correct number of external characters, is an error. + // For a variable-width encoding, however, we require only that we + // consume at least one internal character + else if (__status != _Codecvt::error && + ((__inext == __iend && (__enext - _M_ext_buf == + _M_width * (__iend - __ibegin))) || + (!_M_constant_width && __inext != __ibegin))) { + // We successfully converted part or all of the internal buffer. + ptrdiff_t __n = __enext - _M_ext_buf; + if (_M_write(_M_ext_buf, __n)) + __ibegin += __inext - __ibegin; + else + return _M_output_error(); + } + else + return _M_output_error(); + } + + return traits_type::not_eof(__c); +} + +// This member function must be called before any I/O has been +// performed on the stream, otherwise it has no effect. +// +// __buf == 0 && __n == 0 means to make ths stream unbuffered. +// __buf != 0 && __n > 0 means to use __buf as the stream's internal +// buffer, rather than the buffer that would otherwise be allocated +// automatically. __buf must be a pointer to an array of _CharT whose +// size is at least __n. +template +basic_streambuf<_CharT, _Traits>* +basic_filebuf<_CharT, _Traits>::setbuf(_CharT* __buf, streamsize __n) +{ + if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode && + _M_int_buf == 0) { + if (__buf == 0 && __n == 0) + _M_allocate_buffers(0, 1); + else if (__buf != 0 && __n > 0) + _M_allocate_buffers(__buf, __n); + } + return this; +} + +template +__BF_pos_type__ +basic_filebuf<_CharT, _Traits>::seekoff(off_type __off, + ios_base::seekdir __whence, + ios_base::openmode /* dummy */) +{ + if (this->is_open() && + (__off == 0 || (_M_constant_width && this->_M_base._M_in_binary_mode()))) { + + if (!_M_seek_init(__off != 0 || __whence != ios_base::cur)) + return pos_type(-1); + + // Seek to beginning or end, regardless of whether we're in input mode. + if (__whence == ios_base::beg || __whence == ios_base::end) + return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence), + _State_type()); + + // Seek relative to current position. Complicated if we're in input mode. + else if (__whence == ios_base::cur) { + + if (!_M_in_input_mode) + return _M_seek_return(_M_base._M_seek(_M_width * __off, __whence), + _State_type()); + else if (_M_mmap_base != 0) { + // __off is relative to gptr(). We need to do a bit of arithmetic + // to get an offset relative to the external file pointer. + streamoff __adjust = _M_mmap_len - (this->gptr() - (_CharT*) _M_mmap_base); + + // if __off == 0, we do not need to exit input mode and to shift file pointer + if (__off == 0) { + return pos_type(_M_base._M_seek(0, ios_base::cur) - __adjust); + } + else +#ifdef __SYMBIAN32__ + return _M_seek_return(_M_base._M_seek(__off, ios_base::cur), _State_type()); +#else + return _M_seek_return(_M_base._M_seek(__off - __adjust, ios_base::cur), _State_type()); +#endif + } + else if (_M_constant_width) { // Get or set the position. + + streamoff __iadj = _M_width * (this->gptr() - this->eback()); + + // Compensate for offset relative to gptr versus offset relative + // to external pointer. For a text-oriented stream, where the + // compensation is more than just pointer arithmetic, we may get + // but not set the current position. + + if (__iadj <= _M_ext_buf_end - _M_ext_buf) { + + streamoff __eadj = _M_base._M_get_offset(_M_ext_buf + __iadj, _M_ext_buf_end); + + if (__off == 0) { + return pos_type(_M_base._M_seek(0, ios_base::cur) - __eadj); + } else { + return _M_seek_return(_M_base._M_seek(__off - __eadj, ios_base::cur), _State_type()); + } + } + else + return pos_type(-1); + } + else { // Get the position. Encoding is var width. + // Get position in internal buffer. + ptrdiff_t __ipos = this->gptr() - this->eback(); + + // Get corresponding position in external buffer. + _State_type __state = _M_state; + int __epos = _M_codecvt->length(__state, _M_ext_buf, _M_ext_buf_end, + __ipos); + + // Sanity check (expensive): make sure __epos is the right answer. + _State_type __tmp_state = _M_state; + _Filebuf_Tmp_Buf<_CharT> __buf(__ipos); + _CharT* __ibegin = __buf._M_ptr; + _CharT* __inext = __ibegin; + + const char* __dummy; + typename _Codecvt::result __status + = _M_codecvt->in(__tmp_state, + _M_ext_buf, _M_ext_buf + __epos, __dummy, + __ibegin, __ibegin + __ipos, __inext); + if (__status != _Codecvt::error && + (__status == _Codecvt::noconv || + (__inext == __ibegin + __ipos && + equal(this->gptr(), this->eback(), __ibegin, + _Eq_traits())))) { + // Get the current position (at the end of the external buffer), + // then adjust it. Again, it might be a text-oriented stream. + streamoff __cur = _M_base._M_seek(0, ios_base::cur); + streamoff __adj = + _M_base._M_get_offset(_M_ext_buf, _M_ext_buf + __epos) - + _M_base._M_get_offset(_M_ext_buf, _M_ext_buf_end); + if (__cur != -1 && __cur + __adj >= 0) + return _M_seek_return(__cur + __adj, __state); + else + return pos_type(-1); + } + else // We failed the sanity check. + return pos_type(-1); + } + } + else // Unrecognized value for __whence. + return pos_type(-1); + } + else + return pos_type(-1); +} + + +template +__BF_pos_type__ +basic_filebuf<_CharT, _Traits>::seekpos(pos_type __pos, + ios_base::openmode /* dummy */) +{ + if (this->is_open()) { + if (!_M_seek_init(true)) + return pos_type(-1); + + streamoff __off = off_type(__pos); + if (__off != -1 && _M_base._M_seek(__off, ios_base::beg) != -1) { + _M_state = __pos.state(); + return _M_seek_return(__off, __pos.state()); + } + else + return pos_type(-1); + } + else + return pos_type(-1); +} + + +template +int basic_filebuf<_CharT, _Traits>::sync() +{ + if (_M_in_output_mode) + return traits_type::eq_int_type(this->overflow(traits_type::eof()), + traits_type::eof()) + ? -1 + : 0; + else + return 0; +} + + +// Change the filebuf's locale. This member function has no effect +// unless it is called before any I/O is performed on the stream. +template +void basic_filebuf<_CharT, _Traits>::imbue(const locale& __loc) +{ + if (!_M_in_input_mode &&! _M_in_output_mode && !_M_in_error_mode) { + this->_M_setup_codecvt(__loc); + } +} + +//---------------------------------------------------------------------- +// basic_filebuf<> helper functions. + +//---------------------------------------- +// Helper functions for switching between modes. + +// This member function is called if we're performing the first I/O +// operation on a filebuf, or if we're performing an input operation +// immediately after a seek. +template +bool basic_filebuf<_CharT, _Traits>::_M_switch_to_input_mode() +{ + + if (this->is_open() && (((int)_M_base.__o_mode() & (int)ios_base::in) !=0) +#ifndef __SYMBIAN32__ + && (_M_in_output_mode == 0) +#endif + && (_M_in_error_mode == 0)) { +#ifdef __STLP_NO_WRITE_SIDE_BUFFERING__ + // If file has been opened in input|output mode + if ((((int)_M_base.__o_mode() & (int)ios_base::out) !=0) +#ifndef __SYMBIAN32__ + && sync() +#endif + && !_M_int_buf && !_M_allocate_buffers(0, 1)) +#else + if (!_M_int_buf && !_M_allocate_buffers()) +#endif + return false; + + _M_ext_buf_converted = _M_ext_buf; + _M_ext_buf_end = _M_ext_buf; + + _M_end_state = _M_state; + + _M_in_input_mode = true; + return true; + } + else + + return false; +} + + +// This member function is called if we're performing the first I/O +// operation on a filebuf, or if we're performing an output operation +// immediately after a seek. +template +bool basic_filebuf<_CharT, _Traits>::_M_switch_to_output_mode() +{ + if (this->is_open() && (_M_base.__o_mode() & (int)ios_base::out) && +#ifdef __SYMBIAN32__ + _M_in_error_mode == 0) { +#else + _M_in_input_mode == 0 && _M_in_error_mode == 0) { +#endif //__SYMBIAN32__ + +#ifdef __STLP_NO_WRITE_SIDE_BUFFERING__ + if (!_M_int_buf && !_M_allocate_buffers(0, 1)) +#else + if (!_M_int_buf && !_M_allocate_buffers()) +#endif + return false; + + // In append mode, every write does an implicit seek to the end + // of the file. Whenever leaving output mode, the end of file + // get put in the initial shift state. + if (_M_base.__o_mode() & ios_base::app) + _M_state = _State_type(); + + this->setp(_M_int_buf, _M_int_buf_EOS - 1); + _M_in_output_mode = true; + + return true; + } + else + return false; +} + + +//---------------------------------------- +// Helper functions for input + +// This member function is called if there is an error during input. +// It puts the filebuf in error mode, clear the get area buffer, and +// returns eof. +// returns eof. Error mode is sticky; it is cleared only by close or +// seek. + +template +__BF_int_type__ +basic_filebuf<_CharT, _Traits>::_M_input_error() +{ + this->_M_exit_input_mode(); + _M_in_output_mode = false; + _M_in_error_mode = true; + this->setg(0, 0, 0); + return traits_type::eof(); +} + +template +__BF_int_type__ +basic_filebuf<_CharT, _Traits>::_M_underflow_aux() +{ + // We have the state and file position from the end of the internal + // buffer. This round, they become the beginning of the internal buffer. + _M_state = _M_end_state; + + // Fill the external buffer. Start with any leftover characters that + // didn't get converted last time. + if (_M_ext_buf_end > _M_ext_buf_converted) + + _M_ext_buf_end = copy(_M_ext_buf_converted, _M_ext_buf_end, _M_ext_buf); + // boris : copy_backward did not work + //_M_ext_buf_end = copy_backward(_M_ext_buf_converted, _M_ext_buf_end, + //_M_ext_buf+ (_M_ext_buf_end - _M_ext_buf_converted)); + else + { +#ifdef __SYMBIAN32__ + if(_M_ext_buf == NULL) + _M_allocate_buffers(0, MMAP_CHUNK); +#endif + _M_ext_buf_end = _M_ext_buf; + } + // Now fill the external buffer with characters from the file. This is + // a loop because occasonally we don't get enough external characters + // to make progress. + while (true) { + ptrdiff_t __n = _M_base._M_read(_M_ext_buf_end, _M_ext_buf_EOS - _M_ext_buf_end); + + // Don't enter error mode for a failed read. Error mode is sticky, + // and we might succeed if we try again. +#ifdef __SYMBIAN32__ //plum hall bug 577 + int nn = (char*)_M_ext_buf_end-(char*)_M_ext_buf; //number of chars unconverted last time + if ( (__n <= 0) && ( nn<=0 ) ) +#else + if (__n <= 0) +#endif + return traits_type::eof(); + + // Convert the external buffer to internal characters. + _M_ext_buf_end += __n; + const char* __enext; + _CharT* __inext; + + typename _Codecvt::result __status + = _M_codecvt->in(_M_end_state, + _M_ext_buf, _M_ext_buf_end, __enext, + _M_int_buf, _M_int_buf_EOS, __inext); + + // Error conditions: (1) Return value of error. (2) Producing internal + // characters without consuming external characters. (3) In fixed-width + // encodings, producing an internal sequence whose length is inconsistent + // with that of the internal sequence. (4) Failure to produce any + // characters if we have enough characters in the external buffer, where + // "enough" means the largest possible width of a single character. + if (__status == _Codecvt::noconv) + return _Noconv_input<_Traits>::_M_doit(this); + + else if (__status == _Codecvt::error || + (__inext != _M_int_buf && __enext == _M_ext_buf) || + (_M_constant_width && + // __inext - _M_int_buf != _M_width * (__enext - _M_ext_buf)) || + (__inext - _M_int_buf) * _M_width != (__enext - _M_ext_buf)) || + (__inext == _M_int_buf && __enext - _M_ext_buf >= _M_max_width)) + return _M_input_error(); + + else if (__inext != _M_int_buf) { + _M_ext_buf_converted = _M_ext_buf + (__enext - _M_ext_buf); + this->setg(_M_int_buf, _M_int_buf, __inext); + return traits_type::to_int_type(*_M_int_buf); + } + // We need to go around the loop again to get more external characters. + } +} + +//---------------------------------------- +// Helper functions for output + +// This member function is called if there is an error during output. +// It puts the filebuf in error mode, clear the put area buffer, and +// returns eof. Error mode is sticky; it is cleared only by close or +// seek. +template +__BF_int_type__ +basic_filebuf<_CharT, _Traits>::_M_output_error() +{ + _M_in_output_mode = false; + _M_in_input_mode = false; + _M_in_error_mode = true; + this->setp(0, 0); + return traits_type::eof(); +} + + +// Write whatever sequence of characters is necessary to get back to +// the initial shift state. This function overwrites the external +// buffer, changes the external file position, and changes the state. +// Precondition: the internal buffer is empty. +template +bool basic_filebuf<_CharT, _Traits>::_M_unshift() +{ + if (_M_in_output_mode && !_M_constant_width) { + typename _Codecvt::result __status; + do { + char* __enext = _M_ext_buf; + __status = _M_codecvt->unshift(_M_state, + _M_ext_buf, _M_ext_buf_EOS, __enext); + if (__status == _Codecvt::noconv || + (__enext == _M_ext_buf && __status == _Codecvt::ok)) + return true; + else if (__status == _Codecvt::error) + return false; + else if (!_M_write(_M_ext_buf, __enext - _M_ext_buf)) + return false; + } while(__status == _Codecvt::partial); + } + + return true; +} + + +//---------------------------------------- +// Helper functions for buffer allocation and deallocation + +// This member function is called when we're initializing a filebuf's +// internal and external buffers. The argument is the size of the +// internal buffer; the external buffer is sized using the character +// width in the current encoding. Preconditions: the buffers are currently +// null. __n >= 1. __buf is either a null pointer or a pointer to an +// array show size is at least __n. + +// We need __n >= 1 for two different reasons. For input, the base +// class always needs a buffer because of the sementics of underflow(). +// For output, we want to have an internal buffer that's larger by one +// element than the buffer that the base class knows about. (See +// basic_filebuf<>::overflow() for the reason.) +template +bool +basic_filebuf<_CharT, _Traits>::_M_allocate_buffers(_CharT* __buf, streamsize __n) +{ + + if (__buf == 0) { + _M_int_buf = __STATIC_CAST(_CharT*,malloc(__n * sizeof(_CharT))); + if (! _M_int_buf) + return false; + _M_int_buf_dynamic = true; + } + else { + _M_int_buf = __buf; + _M_int_buf_dynamic = false; + } + + size_t __ebufsiz = (max)(__n * (max)(_M_codecvt->encoding(), 1), + streamsize(_M_codecvt->max_length())); + + _M_ext_buf = __STATIC_CAST(char*,malloc(__ebufsiz)); + if (!_M_ext_buf) { + _M_deallocate_buffers(); + return false; + } + + _M_int_buf_EOS = _M_int_buf + __n; + _M_ext_buf_EOS = _M_ext_buf + __ebufsiz; + return true; +} + +// Abbreviation for the most common case. +template +bool basic_filebuf<_CharT, _Traits>::_M_allocate_buffers() +{ + // Choose a buffer that's at least 4096 characters long and that's a + // multiple of the page size. + streamsize __default_bufsiz = + ((_M_base.__page_size() + 4095UL) / _M_base.__page_size()) * _M_base.__page_size(); + return _M_allocate_buffers(0, __default_bufsiz); +} + +template +void basic_filebuf<_CharT, _Traits>::_M_deallocate_buffers() +{ + if (_M_int_buf_dynamic) + free(_M_int_buf); + free(_M_ext_buf); + _M_int_buf = 0; + _M_int_buf_EOS = 0; + _M_ext_buf = 0; + _M_ext_buf_EOS = 0; +} + + +//---------------------------------------- +// Helper functiosn for seek and imbue + +template +bool basic_filebuf<_CharT, _Traits>::_M_seek_init(bool __do_unshift) { + // If we're in error mode, leave it. + _M_in_error_mode = false; + + // Flush the output buffer if we're in output mode, and (conditionally) + // emit an unshift sequence. + if (_M_in_output_mode) { + bool __ok = !traits_type::eq_int_type(this->overflow(traits_type::eof()), + traits_type::eof()); + if (__do_unshift) + __ok = __ok && this->_M_unshift(); + if (!__ok) { + _M_in_output_mode = false; + _M_in_error_mode = true; + this->setp(0, 0); + return false; + } + } + + // Discard putback characters, if any. + if (_M_in_input_mode && _M_in_putback_mode) + _M_exit_putback_mode(); + + return true; +} + + +// Change the filebuf's locale. This member function has no effect +// unless it is called before any I/O is performed on the stream. +template +void basic_filebuf<_CharT, _Traits>::_M_setup_codecvt(const locale& __loc) +{ + _M_codecvt = &use_facet<_Codecvt>(__loc) ; + int __encoding = _M_codecvt->encoding(); + + _M_width = (max)(__encoding, 1); + _M_max_width = _M_codecvt->max_length(); + _M_constant_width = __encoding > 0; + _M_always_noconv = _M_codecvt->always_noconv(); +} + + + +template + _STLP_EXP_DECLSPEC basic_fstream<_CharT, _Traits>::basic_fstream() + : basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + } + + +template + _STLP_EXP_DECLSPEC basic_fstream<_CharT, _Traits>::~basic_fstream(){} + +#ifdef __SYMBIAN32__ +template +int basic_filebuf<_CharT, _Traits>::save_read_buffer () + { + return _M_in_putback_mode ? _M_saved_egptr - _M_saved_gptr : 0; + } +template +void basic_filebuf<_CharT, _Traits>::_change_input_mode () + { + _M_in_input_mode = 1; + } + +#endif + +_STLP_END_NAMESPACE + +# undef __BF_int_type__ +# undef __BF_pos_type__ +# undef __BF_off_type__ + +# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ + +#endif /* _STLP_FSTREAM_C */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_fstream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_fstream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,767 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// This header defines classes basic_filebuf, basic_ifstream, +// basic_ofstream, and basic_fstream. These classes represent +// streambufs and streams whose sources or destinations are files. + +#ifndef _STLP_INTERNAL_FSTREAM_H +#define _STLP_INTERNAL_FSTREAM_H + +#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS) +#error This header file requires the -LANG:std option +#endif + +#ifndef _STLP_INTERNAL_STREAMBUF +# include +#endif + +#ifndef _STLP_INTERNAL_ISTREAM_H +#include +#endif + +#ifndef _STLP_INTERNAL_CODECVT_H +#include +#endif + +#ifndef _STLP_STDIO_FILE_H +#include +#endif + +// fbp : let us map 1 MB maximum, just be sure not to trash VM +//for hardware defining 8kb of mmap chunk +# ifdef __SYMBIAN32__ +# define MMAP_CHUNK 0x2000UL +# else +# define MMAP_CHUNK 0x100000UL +# endif + +#if !defined (_STLP_USE_UNIX_IO) && !defined(_STLP_USE_WIN32_IO) \ + && ! defined (_STLP_USE_UNIX_EMULATION_IO) && !defined (_STLP_USE_STDIO_IO) + +# if defined (_STLP_UNIX) || defined (__CYGWIN__) || defined (__amigaos__) || defined (__EMX__) || defined (__SYMBIAN32__) +// open/close/read/write +# define _STLP_USE_UNIX_IO +# elif defined (_STLP_WIN32) && ! defined (__CYGWIN__) +// CreateFile/ReadFile/WriteFile +# define _STLP_USE_WIN32_IO +# elif defined (_STLP_WIN16) || defined (_STLP_WIN32) || defined (_STLP_MAC) +// _open/_read/_write +# define _STLP_USE_UNIX_EMULATION_IO +# else +// fopen/fread/fwrite +# define _STLP_USE_STDIO_IO +# endif /* _STLP_UNIX */ + +#endif /* mode selection */ + + +#if defined (_STLP_USE_WIN32_IO) +typedef void* _STLP_fd; +#elif defined (_STLP_USE_UNIX_EMULATION_IO) || defined (_STLP_USE_STDIO_IO) || defined (_STLP_USE_UNIX_IO) +typedef int _STLP_fd; +#else +#error "Configure i/o !" +#endif + + +_STLP_BEGIN_NAMESPACE + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +_STLP_DECLSPEC size_t& get_fstream_Filebuf_Base_GetPageSize(); +#endif //__LIBSTD_CPP_SYMBIAN32_WSD__ +//---------------------------------------------------------------------- +// Class _Filebuf_base, a private base class to factor out the system- +// dependent code from basic_filebuf<>. + +class _STLP_CLASS_DECLSPEC _Filebuf_base { +public: // Opening and closing files. + _STLP_DECLSPEC _Filebuf_base(); + + _STLP_DECLSPEC bool _M_open(const char*, ios_base::openmode, long __protection); + _STLP_DECLSPEC bool _M_open(const char*, ios_base::openmode); + _STLP_DECLSPEC bool _M_open(int __id, ios_base::openmode = ios_base::__default_mode); + _STLP_DECLSPEC bool _M_close(); + +public: // Low-level I/O, like Unix read/write + _STLP_DECLSPEC ptrdiff_t _M_read(char* __buf, ptrdiff_t __n); + _STLP_DECLSPEC streamoff _M_seek(streamoff __offset, ios_base::seekdir __dir); + _STLP_DECLSPEC streamoff _M_file_size(); + _STLP_DECLSPEC bool _M_write(char* __buf, ptrdiff_t __n); + +public: // Memory-mapped I/O. + _STLP_DECLSPEC void* _M_mmap(streamoff __offset, streamoff __len); + _STLP_DECLSPEC void _M_unmap(void* __mmap_base, streamoff __len); + +public: + // Returns a value n such that, if pos is the file pointer at the + // beginning of the range [first, last), pos + n is the file pointer at + // the end. On many operating systems n == __last - __first. + // In Unix, writing n characters always bumps the file position by n. + // In Windows text mode, however, it bumps the file position by n + m, + // where m is the number of newlines in the range. That's because an + // internal \n corresponds to an external two-character sequence. + streamoff _M_get_offset(char* __first, char* __last) { +#if defined (_STLP_UNIX) || defined (_STLP_MAC) + return __last - __first; +#else // defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) + return ( (_M_openmode & ios_base::binary) != 0 ) + ? (__last - __first) + : count(__first, __last, '\n') + (__last - __first); +#endif + } + + // Returns true if we're in binary mode or if we're using an OS or file + // system where there is no distinction between text and binary mode. + bool _M_in_binary_mode() const { +# if defined (_STLP_UNIX) || defined (_STLP_MAC) || defined(__BEOS__) || defined (__amigaos__) || defined (_STLP_VXWORKS_TORNADO) + return true; +# elif defined (_STLP_WIN32) || defined (_STLP_WIN16) || defined (_STLP_DOS) || defined (_STLP_VM) || defined (__EMX__) + return (_M_openmode & ios_base::binary) != 0; +# else +//# error "Port!" +#pragma message(" Symbian I/O stream support on progress."__FILE__) +# endif + } + +protected: // Static data members. +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static size_t _M_page_size; +#endif //__SYMBIAN32__ + +protected: // Data members. + _STLP_fd _M_file_id; +# ifdef _STLP_USE_STDIO_IO + // for stdio, the whole FILE* is being kept here + FILE* _M_file; +# endif +# ifdef _STLP_USE_WIN32_IO + void* _M_view_id; +# endif + + ios_base::openmode _M_openmode ; + unsigned char _M_is_open ; + unsigned char _M_should_close ; + unsigned char _M_regular_file ; + +public : +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static size_t _STLP_CALL __page_size() { return get_fstream_Filebuf_Base_GetPageSize(); } +#else + static size_t _STLP_CALL __page_size() { return _M_page_size; } +#endif + int __o_mode() const { return (int)_M_openmode; } + bool __is_open() const { return (_M_is_open !=0 ); } + bool __should_close() const { return (_M_should_close != 0); } + bool __regular_file() const { return (_M_regular_file != 0); } + _STLP_fd __get_fd() const { return _M_file_id; } +}; + + + + +//---------------------------------------------------------------------- +// Class basic_filebuf<>. + +// Forward declaration of two helper classes. +template class _Noconv_input; +_STLP_TEMPLATE_NULL +class _Noconv_input >; + +template class _Noconv_output; +_STLP_TEMPLATE_NULL +class _Noconv_output< char_traits >; + +// There is a specialized version of underflow, for basic_filebuf, +// in fstream.cxx. + +template +class _Underflow; + + _STLP_TEMPLATE_NULL class _Underflow< char, char_traits >; + +template +class basic_filebuf : public basic_streambuf<_CharT, _Traits> +{ +public: // Types. + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef typename _Traits::state_type _State_type; + typedef basic_streambuf<_CharT, _Traits> _Base; + typedef basic_filebuf<_CharT, _Traits> _Self; + +public: // Constructors, destructor. + basic_filebuf(); + ~basic_filebuf(); + +public: // Opening and closing files. + bool is_open() const { return _M_base.__is_open(); } + + _Self* open(const char* __s, ios_base::openmode __m) { + return _M_base._M_open(__s, __m) ? this : 0; + } + +# ifndef _STLP_NO_EXTENSIONS + // These two version of open() and file descriptor getter are extensions. + _Self* open(const char* __s, ios_base::openmode __m, + long __protection) { + return _M_base._M_open(__s, __m, __protection) ? this : 0; + } + + _STLP_fd fd() const { return _M_base.__get_fd(); } + + _Self* open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) { + return this->_M_open(__id, _Init_mode); + } +# endif + + _Self* _M_open(int __id, ios_base::openmode _Init_mode = ios_base::__default_mode) { + return _M_base._M_open(__id, _Init_mode) ? this : 0; + } + + _Self* close(); + +protected: // Virtual functions from basic_streambuf. + virtual streamsize showmanyc(); + virtual int_type underflow(); + + virtual int_type pbackfail(int_type = traits_type::eof()); + virtual int_type overflow(int_type = traits_type::eof()); + + virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize); + virtual pos_type seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out); + virtual pos_type seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out); + + virtual int sync(); + virtual void imbue(const locale&); + +#ifdef __SYMBIAN32__ + virtual int save_read_buffer (); + virtual void _change_input_mode(); +#endif + +private: // Helper functions. + + // Precondition: we are currently in putback input mode. Effect: + // switches back to ordinary input mode. + void _M_exit_putback_mode() { + this->setg(_M_saved_eback, _M_saved_gptr, _M_saved_egptr); + _M_in_putback_mode = false; + } + bool _M_switch_to_input_mode(); + void _M_exit_input_mode(); + bool _M_switch_to_output_mode(); + + int_type _M_input_error(); + int_type _M_underflow_aux(); + // friend class _Noconv_input<_Traits>; + // friend class _Noconv_output<_Traits>; + friend class _Underflow<_CharT, _Traits>; + + int_type _M_output_error(); + bool _M_unshift(); + + bool _M_allocate_buffers(_CharT* __buf, streamsize __n); + bool _M_allocate_buffers(); + void _M_deallocate_buffers(); + + pos_type _M_seek_return(off_type __off, _State_type __state) { + if (__off != -1) { + if (_M_in_input_mode) + _M_exit_input_mode(); +#ifndef __SYMBIAN32__ + _M_in_input_mode = false; //moved down, because setg again sets input mode +#endif + _M_in_output_mode = false; + _M_in_putback_mode = false; + _M_in_error_mode = false; + this->setg(0, 0, 0); + this->setp(0, 0); +#ifdef __SYMBIAN32__ + _M_in_input_mode = false; +#endif + } + + pos_type __result(__off); + __result.state(__state); + return __result; + } + + bool _M_seek_init(bool __do_unshift); + + void _M_setup_codecvt(const locale&); + +private: // Data members used in all modes. + + _Filebuf_base _M_base; + +private: // Locale-related information. + + unsigned char _M_constant_width; + unsigned char _M_always_noconv; + + // private: // Mode flags. + unsigned char _M_int_buf_dynamic; // True if internal buffer is heap allocated, + // false if it was supplied by the user. + unsigned char _M_in_input_mode; + unsigned char _M_in_output_mode; + unsigned char _M_in_error_mode; + unsigned char _M_in_putback_mode; + + // Internal buffer: characters seen by the filebuf's clients. + _CharT* _M_int_buf; + _CharT* _M_int_buf_EOS; + + // External buffer: characters corresponding to the external file. + char* _M_ext_buf; + char* _M_ext_buf_EOS; + + // The range [_M_ext_buf, _M_ext_buf_converted) contains the external + // characters corresponding to the sequence in the internal buffer. The + // range [_M_ext_buf_converted, _M_ext_buf_end) contains characters that + // have been read into the external buffer but have not been converted + // to an internal sequence. + char* _M_ext_buf_converted; + char* _M_ext_buf_end; + + // State corresponding to beginning of internal buffer. + _State_type _M_state; + +private: // Data members used only in input mode. + + // Similar to _M_state except that it corresponds to + // the end of the internal buffer instead of the beginning. + _State_type _M_end_state; + + // This is a null pointer unless we are in mmap input mode. + void* _M_mmap_base; + streamoff _M_mmap_len; + +private: // Data members used only in putback mode. + _CharT* _M_saved_eback; + _CharT* _M_saved_gptr; + _CharT* _M_saved_egptr; + + typedef codecvt<_CharT, char, _State_type> _Codecvt; + const _Codecvt* _M_codecvt; + + int _M_width; // Width of the encoding (if constant), else 1 + int _M_max_width; // Largest possible width of single character. + + + enum { _S_pback_buf_size = 8 }; + _CharT _M_pback_buf[_S_pback_buf_size]; + + // for _Noconv_output +public: + bool _M_write(char* __buf, ptrdiff_t __n) {return _M_base._M_write(__buf, __n); } + +public: + int_type + _M_do_noconv_input() { + _M_ext_buf_converted = _M_ext_buf_end; + this->setg((char_type*)_M_ext_buf, (char_type*)_M_ext_buf, (char_type*)_M_ext_buf_end); + return traits_type::to_int_type(*_M_ext_buf); + } +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf >; +# if ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_filebuf >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +// public: +// helper class. +template +struct _Filebuf_Tmp_Buf +{ + _CharT* _M_ptr; + _Filebuf_Tmp_Buf(ptrdiff_t __n) : _M_ptr(0) { _M_ptr = new _CharT[__n]; } + ~_Filebuf_Tmp_Buf() { delete[] _M_ptr; } +}; + + +// +// This class had to be designed very carefully to work +// with Visual C++. +// +template +class _Noconv_output { +public: + typedef typename _Traits::char_type char_type; + static bool _STLP_CALL _M_doit(basic_filebuf*, + char_type*, char_type*) + { + return false; + } +}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC _Noconv_output< char_traits > { +public: + static bool _STLP_CALL + _M_doit(basic_filebuf >* __buf, + char* __first, char* __last) + { + ptrdiff_t __n = __last - __first; + if (__buf->_M_write(__first, __n)) { + return true; + } + else + return false; + } +}; + +//---------------------------------------------------------------------- +// basic_filebuf<> helper functions. + + +//---------------------------------------- +// Helper functions for switching between modes. + +// +// This class had to be designed very carefully to work +// with Visual C++. +// +template +class _Noconv_input { +public: + typedef typename _Traits::int_type int_type; + typedef typename _Traits::char_type char_type; + + static inline int_type _STLP_CALL + _M_doit(basic_filebuf*) + { + return 0; + } +}; + +_STLP_TEMPLATE_NULL +class _Noconv_input > { +public: + static inline int _STLP_CALL + _M_doit(basic_filebuf >* __buf) { + return __buf->_M_do_noconv_input(); + } +}; + +// underflow() may be called for one of two reasons. (1) We've +// been going through the special putback buffer, and we need to move back +// to the regular internal buffer. (2) We've exhausted the internal buffer, +// and we need to replentish it. +template +class _Underflow { +public: + typedef typename _Traits::int_type int_type; + typedef _Traits traits_type; + + static int_type _STLP_CALL _M_doit(basic_filebuf<_CharT, _Traits>* __this); +}; + + +// Specialization of underflow: if the character type is char, maybe +// we can use mmap instead of read. +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC _Underflow< char, char_traits > { +public: + typedef char_traits::int_type int_type; + typedef char_traits traits_type; + _STLP_DECLSPEC static int _STLP_CALL _M_doit(basic_filebuf* __this); +}; + +// There is a specialized version of underflow, for basic_filebuf, +// in fstream.cxx. + +template +_STLP_TYPENAME_ON_RETURN_TYPE _Underflow<_CharT, _Traits>::int_type // _STLP_CALL + _Underflow<_CharT, _Traits>::_M_doit(basic_filebuf<_CharT, _Traits>* __this) +{ + if (!__this->_M_in_input_mode) { + if (!__this->_M_switch_to_input_mode()) + return traits_type::eof(); + } + + else if (__this->_M_in_putback_mode) { + __this->_M_exit_putback_mode(); + if (__this->gptr() != __this->egptr()) { + int_type __c = traits_type::to_int_type(*__this->gptr()); + return __c; + } + } + + return __this->_M_underflow_aux(); +} + +#if defined( _STLP_USE_TEMPLATE_EXPORT ) && ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS _Underflow >; +#endif + + +//---------------------------------------------------------------------- +// Class basic_ifstream<> + +template +class basic_ifstream : public basic_istream<_CharT, _Traits> +{ +public: // Types + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_istream<_CharT, _Traits> _Base; + typedef basic_filebuf<_CharT, _Traits> _Buf; + +public: // Constructors, destructor. + + basic_ifstream() : + basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + } + + explicit basic_ifstream(const char* __s, ios_base::openmode __mod = ios_base::in) : + basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), + _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__s, __mod | ios_base::in)) + this->setstate(ios_base::failbit); + } + +# ifndef _STLP_NO_EXTENSIONS + explicit basic_ifstream(int __id, ios_base::openmode __mod = ios_base::in) : + basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__id, __mod | ios_base::in)) + this->setstate(ios_base::failbit); + } + basic_ifstream(const char* __s, ios_base::openmode __m, + long __protection) : + basic_ios<_CharT, _Traits>(), basic_istream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__s, __m | ios_base::in, __protection)) + this->setstate(ios_base::failbit); + } + +# endif + + ~basic_ifstream() {} + +public: // File and buffer operations. + basic_filebuf<_CharT, _Traits>* rdbuf() const + { return __CONST_CAST(_Buf*,&_M_buf); } + + bool is_open() { + return this->rdbuf()->is_open(); + } + + void open(const char* __s, ios_base::openmode __mod = ios_base::in) { + if (!this->rdbuf()->open(__s, __mod | ios_base::in)) + this->setstate(ios_base::failbit); + } + + void close() { + if (!this->rdbuf()->close()) + this->setstate(ios_base::failbit); + } + + +private: + basic_filebuf<_CharT, _Traits> _M_buf; +}; + + +//---------------------------------------------------------------------- +// Class basic_ofstream<> + +template +class basic_ofstream : public basic_ostream<_CharT, _Traits> +{ +public: // Types + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_ostream<_CharT, _Traits> _Base; + typedef basic_filebuf<_CharT, _Traits> _Buf; + +public: // Constructors, destructor. + basic_ofstream() : + basic_ios<_CharT, _Traits>(), + basic_ostream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + } + explicit basic_ofstream(const char* __s, ios_base::openmode __mod = ios_base::out) + : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), + _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__s, __mod | ios_base::out)) + this->setstate(ios_base::failbit); + } + +# ifndef _STLP_NO_EXTENSIONS + explicit basic_ofstream(int __id, ios_base::openmode __mod = ios_base::out) + : basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), + _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__id, __mod | ios_base::out)) + this->setstate(ios_base::failbit); + } + basic_ofstream(const char* __s, ios_base::openmode __m, long __protection) : + basic_ios<_CharT, _Traits>(), basic_ostream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__s, __m | ios_base::out, __protection)) + this->setstate(ios_base::failbit); + } +# endif + + ~basic_ofstream() {} + +public: // File and buffer operations. + basic_filebuf<_CharT, _Traits>* rdbuf() const + { return __CONST_CAST(_Buf*,&_M_buf); } + + bool is_open() { + return this->rdbuf()->is_open(); + } + + void open(const char* __s, ios_base::openmode __mod= ios_base::out) { + if (!this->rdbuf()->open(__s, __mod | ios_base::out)) + this->setstate(ios_base::failbit); + } + + void close() { + if (!this->rdbuf()->close()) + this->setstate(ios_base::failbit); + } + +private: + basic_filebuf<_CharT, _Traits> _M_buf; +}; + + +//---------------------------------------------------------------------- +// Class basic_fstream<> + +template +class basic_fstream : public basic_iostream<_CharT, _Traits> +{ +public: // Types + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_iostream<_CharT, _Traits> _Base; + typedef basic_filebuf<_CharT, _Traits> _Buf; + +public: // Constructors, destructor. + + _STLP_DECLSPEC basic_fstream(); + explicit basic_fstream(const char* __s, + ios_base::openmode __mod = ios_base::in | ios_base::out) : + basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__s, __mod)) + this->setstate(ios_base::failbit); + } + +# ifndef _STLP_NO_EXTENSIONS + explicit basic_fstream(int __id, + ios_base::openmode __mod = ios_base::in | ios_base::out) : + basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__id, __mod)) + this->setstate(ios_base::failbit); + } + basic_fstream(const char* __s, ios_base::openmode __m, long __protection) : + basic_ios<_CharT, _Traits>(), basic_iostream<_CharT, _Traits>(0), _M_buf() { + this->init(&_M_buf); + if (!_M_buf.open(__s, __m, __protection)) + this->setstate(ios_base::failbit); + } +# endif + _STLP_DECLSPEC ~basic_fstream(); + +public: // File and buffer operations. + + basic_filebuf<_CharT, _Traits>* rdbuf() const + { return __CONST_CAST(_Buf*,&_M_buf); } + + bool is_open() { + return this->rdbuf()->is_open(); + } + + void open(const char* __s, + ios_base::openmode __mod = + ios_base::in | ios_base::out) { + if (!this->rdbuf()->open(__s, __mod)) + this->setstate(ios_base::failbit); + } + + void close() { + if (!this->rdbuf()->close()) + this->setstate(ios_base::failbit); + } + +private: + basic_filebuf<_CharT, _Traits> _M_buf; +}; + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream >; +_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream >; +_STLP_EXPORT_TEMPLATE_CLASS basic_fstream >; +# if ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_ifstream >; +_STLP_EXPORT_TEMPLATE_CLASS basic_ofstream >; +_STLP_EXPORT_TEMPLATE_CLASS basic_fstream >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_FSTREAM */ + + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_function.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_function.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,371 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_FUNCTION_H +#define _STLP_INTERNAL_FUNCTION_H + +#ifndef _STLP_INTERNAL_FUNCTION_BASE_H +#include +#endif + +_STLP_BEGIN_NAMESPACE + +# ifndef _STLP_NO_EXTENSIONS +// identity_element (not part of the C++ standard). +template inline _Tp identity_element(plus<_Tp>) { return _Tp(0); } +template inline _Tp identity_element(multiplies<_Tp>) { return _Tp(1); } +# endif + +# if defined (_STLP_BASE_TYPEDEF_BUG) +// this workaround is needed for SunPro 4.0.1 +// suggested by "Martin Abernethy" : + +// We have to introduce the XXary_predicate_aux structures in order to +// access the argument and return types of predicate functions supplied +// as type parameters. SUN C++ 4.0.1 compiler gives errors for template type parameters +// of the form 'name1::name2', where name1 is itself a type parameter. +template +struct __pair_aux : private _Pair +{ + typedef typename _Pair::first_type first_type; + typedef typename _Pair::second_type second_type; +}; + +template +struct __unary_fun_aux : private _Operation +{ + typedef typename _Operation::argument_type argument_type; + typedef typename _Operation::result_type result_type; +}; + +template +struct __binary_fun_aux : private _Operation +{ + typedef typename _Operation::first_argument_type first_argument_type; + typedef typename _Operation::second_argument_type second_argument_type; + typedef typename _Operation::result_type result_type; +}; + +# define __UNARY_ARG(__Operation,__type) __unary_fun_aux<__Operation>::__type +# define __BINARY_ARG(__Operation,__type) __binary_fun_aux<__Operation>::__type +# define __PAIR_ARG(__Pair,__type) __pair_aux<__Pair>::__type +# else +# define __UNARY_ARG(__Operation,__type) __Operation::__type +# define __BINARY_ARG(__Operation,__type) __Operation::__type +# define __PAIR_ARG(__Pair,__type) __Pair::__type +# endif + +template +class unary_negate : + public unary_function { +protected: + _Predicate _M_pred; +public: + explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {} + bool operator()(const typename _Predicate::argument_type& __x) const { + return !_M_pred(__x); + } +}; + +template +inline unary_negate<_Predicate> +not1(const _Predicate& __pred) +{ + return unary_negate<_Predicate>(__pred); +} + +template +class binary_negate + : public binary_function { +protected: + _Predicate _M_pred; +public: + explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {} + bool operator()(const typename _Predicate::first_argument_type& __x, + const typename _Predicate::second_argument_type& __y) const + { + return !_M_pred(__x, __y); + } +}; + +template +inline binary_negate<_Predicate> +not2(const _Predicate& __pred) +{ + return binary_negate<_Predicate>(__pred); +} + +template +class binder1st : + public unary_function { +protected: + _Operation op; + typename _Operation::first_argument_type value; +public: + binder1st(const _Operation& __x, + const typename _Operation::first_argument_type& __y) + : op(__x), value(__y) {} + + typename _Operation::result_type + operator()(const typename _Operation::second_argument_type& __x) const { + return op(value, __x); + } + + typename _Operation::result_type + operator()(typename _Operation::second_argument_type& __x) const { + return op(value, __x); + } +}; + +template +inline binder1st<_Operation> +bind1st(const _Operation& __fn, const _Tp& __x) +{ + typedef typename _Operation::first_argument_type _Arg1_type; + return binder1st<_Operation>(__fn, _Arg1_type(__x)); +} + +template +class binder2nd + : public unary_function { +protected: + _Operation op; + typename _Operation::second_argument_type value; +public: + binder2nd(const _Operation& __x, + const typename _Operation::second_argument_type& __y) + : op(__x), value(__y) {} + + typename _Operation::result_type + operator()(const typename _Operation::first_argument_type& __x) const { + return op(__x, value); + } + + typename _Operation::result_type + operator()(typename _Operation::first_argument_type& __x) const { + return op(__x, value); + } +}; + +template +inline binder2nd<_Operation> +bind2nd(const _Operation& __fn, const _Tp& __x) +{ + typedef typename _Operation::second_argument_type _Arg2_type; + return binder2nd<_Operation>(__fn, _Arg2_type(__x)); +} + +# ifndef _STLP_NO_EXTENSIONS +// unary_compose and binary_compose (extensions, not part of the standard). + +template +class unary_compose : + public unary_function { +protected: + _Operation1 _M_fn1; + _Operation2 _M_fn2; +public: + unary_compose(const _Operation1& __x, const _Operation2& __y) + : _M_fn1(__x), _M_fn2(__y) {} + + typename _Operation1::result_type + operator()(const typename _Operation2::argument_type& __x) const { + return _M_fn1(_M_fn2(__x)); + } + + typename _Operation1::result_type + operator()(typename _Operation2::argument_type& __x) const { + return _M_fn1(_M_fn2(__x)); + } +}; + +template +inline unary_compose<_Operation1,_Operation2> +compose1(const _Operation1& __fn1, const _Operation2& __fn2) +{ + return unary_compose<_Operation1,_Operation2>(__fn1, __fn2); +} + +template +class binary_compose : + public unary_function { +protected: + _Operation1 _M_fn1; + _Operation2 _M_fn2; + _Operation3 _M_fn3; +public: + binary_compose(const _Operation1& __x, const _Operation2& __y, + const _Operation3& __z) + : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { } + + typename _Operation1::result_type + operator()(const typename _Operation2::argument_type& __x) const { + return _M_fn1(_M_fn2(__x), _M_fn3(__x)); + } + + typename _Operation1::result_type + operator()(typename _Operation2::argument_type& __x) const { + return _M_fn1(_M_fn2(__x), _M_fn3(__x)); + } +}; + +template +inline binary_compose<_Operation1, _Operation2, _Operation3> +compose2(const _Operation1& __fn1, const _Operation2& __fn2, + const _Operation3& __fn3) +{ + return binary_compose<_Operation1,_Operation2,_Operation3> + (__fn1, __fn2, __fn3); +} + +# endif /* _STLP_NO_EXTENSIONS */ + +# ifndef _STLP_NO_EXTENSIONS + +// identity is an extension: it is not part of the standard. +template struct identity : public _Identity<_Tp> {}; +// select1st and select2nd are extensions: they are not part of the standard. +template struct select1st : public _Select1st<_Pair> {}; +template struct select2nd : public _Select2nd<_Pair> {}; + +template +struct project1st : public _Project1st<_Arg1, _Arg2> {}; + +template +struct project2nd : public _Project2nd<_Arg1, _Arg2> {}; + + +// constant_void_fun, constant_unary_fun, and constant_binary_fun are +// extensions: they are not part of the standard. (The same, of course, +// is true of the helper functions constant0, constant1, and constant2.) + +template +struct _Constant_void_fun { + typedef _Result result_type; + result_type _M_val; + + _Constant_void_fun(const result_type& __v) : _M_val(__v) {} + const result_type& operator()() const { return _M_val; } +}; + + +template +struct constant_void_fun : public _Constant_void_fun<_Result> { + constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {} +}; + +template +struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument> +{ + constant_unary_fun(const _Result& __v) + : _Constant_unary_fun<_Result, _Argument>(__v) {} +}; + +template +struct constant_binary_fun + : public _Constant_binary_fun<_Result, _Arg1, _Arg2> +{ + constant_binary_fun(const _Result& __v) + : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {} +}; + +template +inline constant_void_fun<_Result> constant0(const _Result& __val) +{ + return constant_void_fun<_Result>(__val); +} + +template +inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val) +{ + return constant_unary_fun<_Result,_Result>(__val); +} + +template +inline constant_binary_fun<_Result,_Result,_Result> +constant2(const _Result& __val) +{ + return constant_binary_fun<_Result,_Result,_Result>(__val); +} + +// subtractive_rng is an extension: it is not part of the standard. +// Note: this code assumes that int is 32 bits. +class subtractive_rng : public unary_function<_STLP_UINT32_T, _STLP_UINT32_T> { +private: + _STLP_UINT32_T _M_table[55]; + _STLP_UINT32_T _M_index1; + _STLP_UINT32_T _M_index2; +public: + _STLP_UINT32_T operator()(_STLP_UINT32_T __limit) { + _M_index1 = (_M_index1 + 1) % 55; + _M_index2 = (_M_index2 + 1) % 55; + _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2]; + return _M_table[_M_index1] % __limit; + } + + void _M_initialize(_STLP_UINT32_T __seed) + { + _STLP_UINT32_T __k = 1; + _M_table[54] = __seed; + _STLP_UINT32_T __i; + for (__i = 0; __i < 54; __i++) { + _STLP_UINT32_T __ii = (21 * (__i + 1) % 55) - 1; + _M_table[__ii] = __k; + __k = __seed - __k; + __seed = _M_table[__ii]; + } + for (int __loop = 0; __loop < 4; __loop++) { + for (__i = 0; __i < 55; __i++) + _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55]; + } + _M_index1 = 0; + _M_index2 = 31; + } + + subtractive_rng(unsigned int __seed) { _M_initialize(__seed); } + subtractive_rng() { _M_initialize(161803398ul); } +}; + +# endif /* _STLP_NO_EXTENSIONS */ + +_STLP_END_NAMESPACE + +#include + +#endif /* _STLP_INTERNAL_FUNCTION_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_function_adaptors.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_function_adaptors.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,802 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * Copyright (c) 2000 + * Pavel Kuznetsov + * + * Copyright (c) 2001 + * Meridian'93 + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +// This file has noo macro protection as it is meant to be included several times +// from other header. +// Adaptor function objects: pointers to member functions. + +// There are a total of 16 = 2^4 function objects in this family. +// (1) Member functions taking no arguments vs member functions taking +// one argument. +// (2) Call through pointer vs call through reference. +// (3) Member function with void return type vs member function with +// non-void return type. +// (4) Const vs non-const member function. + +// Note that choice (3) is nothing more than a workaround: according +// to the draft, compilers should handle void and non-void the same way. +// This feature is not yet widely implemented, though. You can only use +// member functions returning void if your compiler supports partial +// specialization. + +// All of this complexity is in the function objects themselves. You can +// ignore it by using the helper function mem_fun and mem_fun_ref, +// which create whichever type of adaptor is appropriate. + +_STLP_BEGIN_NAMESPACE + +//This implementation will only be used if needed, that is to say when there is the return void bug +//and when there is no partial template specialization +#if defined(_STLP_DONT_RETURN_VOID) && defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined(_STLP_MEMBER_TEMPLATE_CLASSES) + +template +class _Mem_fun0_ptr : public unary_function<_Tp*, _Result> { +protected: + typedef _Result (_Tp::*__fun_type) (); + explicit _Mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(_Tp* __p) const { return (__p->*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Mem_fun1_ptr : public binary_function<_Tp*,_Arg,_Result> { +protected: + typedef _Result (_Tp::*__fun_type) (_Arg); + explicit _Mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Const_mem_fun0_ptr : public unary_function { +protected: + typedef _Result (_Tp::*__fun_type) () const; + explicit _Const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(const _Tp* __p) const { return (__p->*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Const_mem_fun1_ptr : public binary_function { +protected: + typedef _Result (_Tp::*__fun_type) (_Arg) const; + explicit _Const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(const _Tp* __p, _Arg __x) const { + return (__p->*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Mem_fun0_ref : public unary_function<_Tp&,_Result> { +protected: + typedef _Result (_Tp::*__fun_type) (); + explicit _Mem_fun0_ref(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(_Tp& __p) const { return (__p.*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Mem_fun1_ref : public binary_function<_Tp&,_Arg,_Result> { +protected: + typedef _Result (_Tp::*__fun_type) (_Arg); + explicit _Mem_fun1_ref(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(_Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Const_mem_fun0_ref : public unary_function { +protected: + typedef _Result (_Tp::*__fun_type) () const; + explicit _Const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(const _Tp& __p) const { return (__p.*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Const_mem_fun1_ref : public binary_function { +protected: + typedef _Result (_Tp::*__fun_type) (_Arg) const; + explicit _Const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator ()(const _Tp& __p, _Arg __x) const { return (__p.*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +struct _Mem_fun_traits { + template + struct _Args0 { + typedef _Mem_fun0_ptr<_Result,_Tp> _Ptr; + typedef _Const_mem_fun0_ptr<_Result,_Tp> _Ptr_const; + typedef _Mem_fun0_ref<_Result,_Tp> _Ref; + typedef _Const_mem_fun0_ref<_Result,_Tp> _Ref_const; + }; + + template + struct _Args1 { + typedef _Mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr; + typedef _Const_mem_fun1_ptr<_Result,_Tp,_Arg> _Ptr_const; + typedef _Mem_fun1_ref<_Result,_Tp,_Arg> _Ref; + typedef _Const_mem_fun1_ref<_Result,_Tp,_Arg> _Ref_const; + }; +}; + +template +class _Ptr_fun1_base : public unary_function<_Arg, _Result> { +protected: + typedef _Result (*__fun_type) (_Arg); + explicit _Ptr_fun1_base(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator()(_Arg __x) const { return _M_f(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Ptr_fun2_base : public binary_function<_Arg1,_Arg2,_Result> { +protected: + typedef _Result (*__fun_type) (_Arg1, _Arg2); + explicit _Ptr_fun2_base(__fun_type __f) : _M_f(__f) {} + +public: + _Result operator()(_Arg1 __x, _Arg2 __y) const { return _M_f(__x, __y); } + +private: + __fun_type _M_f; +}; + +template +struct _Ptr_fun_traits { + template struct _Args1 { + typedef _Ptr_fun1_base<_Arg,_Result> _Fun; + }; + + template struct _Args2 { + typedef _Ptr_fun2_base<_Arg1,_Arg2,_Result> _Fun; + }; +}; + +/*Specialization for void return type +*/ +template +class _Void_mem_fun0_ptr : public unary_function<_Tp*,void> { +protected: + typedef void (_Tp::*__fun_type) (); + explicit _Void_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(_Tp* __p) const { (__p->*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Void_mem_fun1_ptr : public binary_function<_Tp*,_Arg,void> { +protected: + typedef void (_Tp::*__fun_type) (_Arg); + explicit _Void_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Void_const_mem_fun0_ptr : public unary_function { +protected: + typedef void (_Tp::*__fun_type) () const; + explicit _Void_const_mem_fun0_ptr(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(const _Tp* __p) const { (__p->*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Void_const_mem_fun1_ptr : public binary_function { +protected: + typedef void (_Tp::*__fun_type) (_Arg) const; + explicit _Void_const_mem_fun1_ptr(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Void_mem_fun0_ref : public unary_function<_Tp&,void> { +protected: + typedef void (_Tp::*__fun_type) (); + explicit _Void_mem_fun0_ref(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(_Tp& __p) const { (__p.*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Void_mem_fun1_ref : public binary_function<_Tp&,_Arg,void> { +protected: + typedef void (_Tp::*__fun_type) (_Arg); + explicit _Void_mem_fun1_ref(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(_Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Void_const_mem_fun0_ref : public unary_function { +protected: + typedef void (_Tp::*__fun_type) () const; + explicit _Void_const_mem_fun0_ref(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(const _Tp& __p) const { (__p.*_M_f)(); } + +private: + __fun_type _M_f; +}; + +template +class _Void_const_mem_fun1_ref : public binary_function { +protected: + typedef void (_Tp::*__fun_type) (_Arg) const; + explicit _Void_const_mem_fun1_ref(__fun_type __f) : _M_f(__f) {} + +public: + void operator ()(const _Tp& __p, _Arg __x) const { (__p.*_M_f)(__x); } + +private: + __fun_type _M_f; +}; + +_STLP_TEMPLATE_NULL +struct _Mem_fun_traits { + template struct _Args0 { + typedef _Void_mem_fun0_ptr<_Tp> _Ptr; + typedef _Void_const_mem_fun0_ptr<_Tp> _Ptr_const; + typedef _Void_mem_fun0_ref<_Tp> _Ref; + typedef _Void_const_mem_fun0_ref<_Tp> _Ref_const; + }; + + template struct _Args1 { + typedef _Void_mem_fun1_ptr<_Tp,_Arg> _Ptr; + typedef _Void_const_mem_fun1_ptr<_Tp,_Arg> _Ptr_const; + typedef _Void_mem_fun1_ref<_Tp,_Arg> _Ref; + typedef _Void_const_mem_fun1_ref<_Tp,_Arg> _Ref_const; + }; +}; + +template +class _Ptr_void_fun1_base : public unary_function<_Arg, void> { +protected: + typedef void (*__fun_type) (_Arg); + explicit _Ptr_void_fun1_base(__fun_type __f) : _M_f(__f) {} + +public: + void operator()(_Arg __x) const { _M_f(__x); } + +private: + __fun_type _M_f; +}; + +template +class _Ptr_void_fun2_base : public binary_function<_Arg1,_Arg2,void> { +protected: + typedef void (*__fun_type) (_Arg1, _Arg2); + explicit _Ptr_void_fun2_base(__fun_type __f) : _M_f(__f) {} + +public: + void operator()(_Arg1 __x, _Arg2 __y) const { _M_f(__x, __y); } + +private: + __fun_type _M_f; +}; + +_STLP_TEMPLATE_NULL +struct _Ptr_fun_traits { + template struct _Args1 { + typedef _Ptr_void_fun1_base<_Arg> _Fun; + }; + + template struct _Args2 { + typedef _Ptr_void_fun2_base<_Arg1,_Arg2> _Fun; + }; +}; + +// pavel: need extra level of inheritance here since MSVC++ does not +// accept traits-based fake partial specialization for template +// arguments other than first + +template +class _Ptr_fun1 : + public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun { +protected: + typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Arg>::_Fun _Base; + explicit _Ptr_fun1(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +template +class _Ptr_fun2 : + public _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun { +protected: + typedef typename _Ptr_fun_traits<_Result>::_STLP_TEMPLATE _Args2<_Arg1,_Arg2>::_Fun _Base; + explicit _Ptr_fun2(typename _Base::__fun_type __f) : _Base(__f) {} +}; + + +#endif /*_STLP_DONT_RETURN_VOID && _STLP_NO_CLASS_PARTIAL_SPECIALIZATION && _STLP_MEMBER_TEMPLATE_CLASSES*/ + + +#if !defined(_STLP_DONT_RETURN_VOID) || !defined(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) || !defined (_STLP_MEMBER_TEMPLATE_CLASSES) + +template +class mem_fun_t : public unary_function<_Tp*,_Ret> { + typedef _Ret (_Tp::*__fun_type)(void); +public: + explicit mem_fun_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun_t : public unary_function { + typedef _Ret (_Tp::*__fun_type)(void) const; +public: + explicit const_mem_fun_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); } +private: + __fun_type _M_f; +}; + + +template +class mem_fun_ref_t : public unary_function<_Tp,_Ret> { + typedef _Ret (_Tp::*__fun_type)(void); +public: + explicit mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> { + typedef _Ret (_Tp::*__fun_type)(void) const; +public: + explicit const_mem_fun_ref_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> { + typedef _Ret (_Tp::*__fun_type)(_Arg); +public: + explicit mem_fun1_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun1_t : public binary_function { + typedef _Ret (_Tp::*__fun_type)(_Arg) const; +public: + explicit const_mem_fun1_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(const _Tp* __p, _Arg __x) const + { return (__p->*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { + typedef _Ret (_Tp::*__fun_type)(_Arg); +public: + explicit mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> { + typedef _Ret (_Tp::*__fun_type)(_Arg) const; +public: + explicit const_mem_fun1_ref_t(__fun_type __pf) : _M_f(__pf) {} + _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class pointer_to_unary_function : public unary_function<_Arg, _Result> { +protected: + _Result (*_M_ptr)(_Arg); +public: + pointer_to_unary_function() {} + explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {} + _Result operator()(_Arg __x) const { return _M_ptr(__x); } +}; + +template +class pointer_to_binary_function : + public binary_function<_Arg1,_Arg2,_Result> { +protected: + _Result (*_M_ptr)(_Arg1, _Arg2); +public: + pointer_to_binary_function() {} + explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) + : _M_ptr(__x) {} + _Result operator()(_Arg1 __x, _Arg2 __y) const { + return _M_ptr(__x, __y); + } +}; + + +#if defined(_STLP_DONT_RETURN_VOID) && !defined(_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) +//Partial specialization for the void type +template +class mem_fun_t : public unary_function<_Tp*,void> { + typedef void (_Tp::*__fun_type)(void); +public: + explicit mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} + void operator()(_Tp* __p) const { (__p->*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun_t : public unary_function { + typedef void (_Tp::*__fun_type)(void) const; +public: + explicit const_mem_fun_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} + void operator()(const _Tp* __p) const { (__p->*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class mem_fun_ref_t : public unary_function<_Tp,void> { + typedef void (_Tp::*__fun_type)(void); +public: + explicit mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} + void operator()(_Tp& __r) const { (__r.*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun_ref_t : public unary_function<_Tp,void> { + typedef void (_Tp::*__fun_type)(void) const; +public: + explicit const_mem_fun_ref_t _STLP_PSPEC2(void,_Tp) (__fun_type __pf) : _M_f(__pf) {} + void operator()(const _Tp& __r) const { (__r.*_M_f)(); } +private: + __fun_type _M_f; +}; + +template +class mem_fun1_t : public binary_function<_Tp*,_Arg,void> { + typedef void (_Tp::*__fun_type)(_Arg); +public: + explicit mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} + void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun1_t + : public binary_function { + typedef void (_Tp::*__fun_type)(_Arg) const; +public: + explicit const_mem_fun1_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} + void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class mem_fun1_ref_t + : public binary_function<_Tp,_Arg,void> { + typedef void (_Tp::*__fun_type)(_Arg); +public: + explicit mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} + void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class const_mem_fun1_ref_t + : public binary_function<_Tp,_Arg,void> { + typedef void (_Tp::*__fun_type)(_Arg) const; +public: + explicit const_mem_fun1_ref_t _STLP_PSPEC3(void,_Tp,_Arg) (__fun_type __pf) : _M_f(__pf) {} + void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); } +private: + __fun_type _M_f; +}; + +template +class pointer_to_unary_function : public unary_function<_Arg, void> { + typedef void (*__fun_type)(_Arg); + __fun_type _M_ptr; +public: + pointer_to_unary_function() {} + explicit pointer_to_unary_function(__fun_type __x) : _M_ptr(__x) {} + void operator()(_Arg __x) const { _M_ptr(__x); } +}; + +template +class pointer_to_binary_function : public binary_function<_Arg1,_Arg2,void> { + typedef void (*__fun_type)(_Arg1, _Arg2); + __fun_type _M_ptr; +public: + pointer_to_binary_function() {} + explicit pointer_to_binary_function(__fun_type __x) : _M_ptr(__x) {} + void operator()(_Arg1 __x, _Arg2 __y) const { _M_ptr(__x, __y); } +}; + +#endif /*_STLP_DONT_RETURN_VOID && !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION*/ + +#else /*!_STLP_DONT_RETURN_VOID || !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION || !_STLP_MEMBER_TEMPLATE_CLASSES*/ + +//mem_fun_t +template +class mem_fun_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr _Base; +public: + explicit mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//const_mem_fun_t +template +class const_mem_fun_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ptr_const _Base; +public: + explicit const_mem_fun_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//mem_fun_ref_t +template +class mem_fun_ref_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref _Base; +public: + explicit mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//const_mem_fun_ref_t +template +class const_mem_fun_ref_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args0<_Tp>::_Ref_const _Base; +public: + explicit const_mem_fun_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//mem_fun1_t +template +class mem_fun1_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr _Base; +public: + explicit mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//const_mem_fun1_t +template +class const_mem_fun1_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ptr_const _Base; +public: + explicit const_mem_fun1_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//mem_fun1_ref_t +template +class mem_fun1_ref_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref _Base; +public: + explicit mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + +//const_mem_fun1_t +template +class const_mem_fun1_ref_t : + public _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const { + typedef typename + _Mem_fun_traits<_Result>::_STLP_TEMPLATE _Args1<_Tp,_Arg>::_Ref_const _Base; +public: + explicit const_mem_fun1_ref_t(typename _Base::__fun_type __f) : _Base(__f) {} +}; + + +template +class pointer_to_unary_function : +public _Ptr_fun1<_Result,_Arg> { + typedef typename + _Ptr_fun1<_Result,_Arg>::__fun_type __fun_type; +public: + explicit pointer_to_unary_function(__fun_type __f) + : _Ptr_fun1<_Result,_Arg>(__f) {} +}; + +template +class pointer_to_binary_function : +public _Ptr_fun2<_Result,_Arg1,_Arg2> { + typedef typename + _Ptr_fun2<_Result,_Arg1,_Arg2>::__fun_type __fun_type; +public: + explicit pointer_to_binary_function(__fun_type __f) + : _Ptr_fun2<_Result,_Arg1,_Arg2>(__f) {} +}; + +#endif /*!_STLP_DONT_RETURN_VOID || !_STLP_NO_CLASS_PARTIAL_SPECIALIZATION || !_STLP_MEMBER_TEMPLATE_CLASSES*/ + + +# if !defined (_STLP_MEMBER_POINTER_PARAM_BUG) +// Mem_fun adaptor helper functions. There are only two: +// mem_fun and mem_fun_ref. (mem_fun1 and mem_fun1_ref +// are provided for backward compatibility, but they are no longer +// part of the C++ standard.) + +template +inline mem_fun_t<_Result,_Tp> +mem_fun(_Result (_Tp::*__f)()) { return mem_fun_t<_Result,_Tp>(__f); } + +template +inline const_mem_fun_t<_Result,_Tp> +mem_fun(_Result (_Tp::*__f)() const) { return const_mem_fun_t<_Result,_Tp>(__f); } + +template +inline mem_fun_ref_t<_Result,_Tp> +mem_fun_ref(_Result (_Tp::*__f)()) { return mem_fun_ref_t<_Result,_Tp>(__f); } + +template +inline const_mem_fun_ref_t<_Result,_Tp> +mem_fun_ref(_Result (_Tp::*__f)() const) { return const_mem_fun_ref_t<_Result,_Tp>(__f); } + +template +inline mem_fun1_t<_Result,_Tp,_Arg> +mem_fun(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_t<_Result,_Tp,_Arg> +mem_fun(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); } + +template +inline mem_fun1_ref_t<_Result,_Tp,_Arg> +mem_fun_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_ref_t<_Result,_Tp,_Arg> +mem_fun_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } + +# if !(defined (_STLP_NO_EXTENSIONS) || defined (_STLP_NO_ANACHRONISMS)) +// mem_fun1 and mem_fun1_ref are no longer part of the C++ standard, +// but they are provided for backward compatibility. +template +inline mem_fun1_t<_Result,_Tp,_Arg> +mem_fun1(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_t<_Result,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_t<_Result,_Tp,_Arg> +mem_fun1(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_t<_Result,_Tp,_Arg>(__f); } + +template +inline mem_fun1_ref_t<_Result,_Tp,_Arg> +mem_fun1_ref(_Result (_Tp::*__f)(_Arg)) { return mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } + +template +inline const_mem_fun1_ref_t<_Result,_Tp,_Arg> +mem_fun1_ref(_Result (_Tp::*__f)(_Arg) const) { return const_mem_fun1_ref_t<_Result,_Tp,_Arg>(__f); } + +# endif /* _STLP_NO_EXTENSIONS */ + +# endif /* _STLP_MEMBER_POINTER_PARAM_BUG */ + +template +inline pointer_to_unary_function<_Arg, _Result> +ptr_fun(_Result (*__f)(_Arg)) +{ return pointer_to_unary_function<_Arg, _Result>(__f); } + +template +inline pointer_to_binary_function<_Arg1,_Arg2,_Result> +ptr_fun(_Result (*__f)(_Arg1, _Arg2)) +{ return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__f); } + +_STLP_END_NAMESPACE diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_function_base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_function_base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,226 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_FUNCTION_BASE_H +#define _STLP_INTERNAL_FUNCTION_BASE_H + +#ifndef _STLP_CONFIG_H +#include +#endif + +_STLP_BEGIN_NAMESPACE + +template +struct unary_function { + typedef _Arg argument_type; + typedef _Result result_type; +}; + +template +struct binary_function { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; +}; + +template +struct equal_to : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; } +}; + +template +struct not_equal_to : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; } +}; + +template +struct greater : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; } +}; + +template +struct less : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; } +}; + +template +struct greater_equal : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; } +}; + +template +struct less_equal : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; } +}; + +template +less<_Tp> __less(_Tp* ) { return less<_Tp>(); } + +template +equal_to<_Tp> __equal_to(_Tp* ) { return equal_to<_Tp>(); } + +template +struct plus : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; } +}; + +template +struct minus : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; } +}; + +template +plus<_Tp> __plus(_Tp* ) { return plus<_Tp>(); } + +template +minus<_Tp> __minus(_Tp* ) { return minus<_Tp>(); } + +template +struct multiplies : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; } +}; + +template +struct divides : public binary_function<_Tp,_Tp,_Tp> { + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; } +}; + +template +struct modulus : public binary_function<_Tp,_Tp,_Tp> +{ + _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; } +}; + +template +struct negate : public unary_function<_Tp,_Tp> +{ + _Tp operator()(const _Tp& __x) const { return -__x; } +}; + +template +struct logical_and : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; } +}; + +template +struct logical_or : public binary_function<_Tp,_Tp,bool> +{ + bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; } +}; + +template +struct logical_not : public unary_function<_Tp,bool> +{ + bool operator()(const _Tp& __x) const { return !__x; } +}; + +template +struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> { + const typename _Pair::first_type& operator()(const _Pair& __x) const { + return __x.first; + } +}; + +template +struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type> +{ + const typename _Pair::second_type& operator()(const _Pair& __x) const { + return __x.second; + } +}; + +// project1st and project2nd are extensions: they are not part of the standard +template +struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> { + _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; } +}; + +template +struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> { + _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; } +}; + +#ifdef _STLP_MULTI_CONST_TEMPLATE_ARG_BUG +// fbp : sort of select1st just for maps +template +// JDJ (CW Pro1 doesn't like const when first_type is also const) +struct __Select1st_hint : public unary_function<_Pair, _Whatever> { + const _Whatever& operator () (const _Pair& __x) const { return __x.first; } +}; +# define _STLP_SELECT1ST(__x,__y) __Select1st_hint< __x, __y > +# else +# define _STLP_SELECT1ST(__x, __y) _Select1st< __x > +# endif + +template +struct _Identity : public unary_function<_Tp,_Tp> { + const _Tp& operator()(const _Tp& __x) const { return __x; } +}; + +template +struct _Constant_unary_fun { + typedef _Argument argument_type; + typedef _Result result_type; + result_type _M_val; + + _Constant_unary_fun(const result_type& __v) : _M_val(__v) {} + const result_type& operator()(const _Argument&) const { return _M_val; } +}; + +template +struct _Constant_binary_fun { + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; + _Result _M_val; + + _Constant_binary_fun(const _Result& __v) : _M_val(__v) {} + const result_type& operator()(const _Arg1&, const _Arg2&) const { + return _M_val; + } +}; + +// identity_element (not part of the C++ standard). +template inline _Tp __identity_element(plus<_Tp>) { return _Tp(0); } +template inline _Tp __identity_element(multiplies<_Tp>) { return _Tp(1); } + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_FUNCTION_BASE_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_hash_fun.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_hash_fun.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,107 @@ +/* + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_HASH_FUN_H +#define _STLP_HASH_FUN_H + +# ifndef _STLP_CSTDDEF +# include +# endif + +_STLP_BEGIN_NAMESPACE + +template struct hash { }; + +inline size_t __stl_hash_string(const char* __s) +{ + _STLP_FIX_LITERAL_BUG(__s) + unsigned long __h = 0; + for ( ; *__s; ++__s) + __h = 5*__h + *__s; + + return size_t(__h); +} + +_STLP_TEMPLATE_NULL struct hash +{ + size_t operator()(const char* __s) const { _STLP_FIX_LITERAL_BUG(__s) return __stl_hash_string(__s); } +}; + +_STLP_TEMPLATE_NULL struct hash +{ + size_t operator()(const char* __s) const { _STLP_FIX_LITERAL_BUG(__s) return __stl_hash_string(__s); } +}; + +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(char __x) const { return __x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(unsigned char __x) const { return __x; } +}; +#ifndef _STLP_NO_SIGNED_BUILTINS +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(unsigned char __x) const { return __x; } +}; +#endif +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(short __x) const { return __x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(unsigned short __x) const { return __x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(int __x) const { return __x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(unsigned int __x) const { return __x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(long __x) const { return __x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(unsigned long __x) const { return __x; } +}; + +# if defined (_STLP_LONG_LONG) +_STLP_TEMPLATE_NULL struct hash<_STLP_LONG_LONG> { + size_t operator()(long x) const { return x; } +}; +_STLP_TEMPLATE_NULL struct hash { + size_t operator()(unsigned long x) const { return x; } +}; +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_HASH_FUN_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_hashtable.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_hashtable.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,471 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_HASHTABLE_C +#define _STLP_HASHTABLE_C + +#ifndef _STLP_INTERNAL_HASHTABLE_H +# include +#endif + +#ifdef _STLP_DEBUG +# define hashtable __WORKAROUND_DBG_RENAME(hashtable) +#endif + +_STLP_BEGIN_NAMESPACE + +# define __PRIME_LIST_BODY { \ + 53ul, 97ul, 193ul, 389ul, 769ul, \ + 1543ul, 3079ul, 6151ul, 12289ul, 24593ul, \ + 49157ul, 98317ul, 196613ul, 393241ul, 786433ul, \ + 1572869ul, 3145739ul, 6291469ul, 12582917ul, 25165843ul, \ + 50331653ul, 100663319ul, 201326611ul, 402653189ul, 805306457ul,\ + 1610612741ul, 3221225473ul, 4294967291ul \ +} + +#if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +template +const size_t _Stl_prime<_Tp>::_M_list[__stl_num_primes] = __PRIME_LIST_BODY; +#else +__DECLARE_INSTANCE(const size_t, + _Stl_prime_type::_M_list[], =__PRIME_LIST_BODY); +#endif /* _STLP_STATIC_TEMPLATE_DATA */ + +# undef __PRIME_LIST_BODY + +// fbp: these defines are for outline methods definitions. +// needed to definitions to be portable. Should not be used in method bodies. + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +# define __size_type__ size_t +# define size_type size_t +# define value_type _Val +# define key_type _Key +# define _Node _Hashtable_node<_Val> +# define __reference__ _Val& + +# define __iterator__ _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> +# define __const_iterator__ _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> +# else +# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::size_type +# define __reference__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::reference +# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE hashtable<_Val, _Key, _HF, _ExK, _EqK, _All>::iterator +# endif + +template +_Hashtable_node<_Val>* +_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_skip_to_next() { + size_t __bucket = _M_ht->_M_bkt_num(_M_cur->_M_val); + size_t __h_sz; + __h_sz = this->_M_ht->bucket_count(); + + _Node* __i=0; + while (__i==0 && ++__bucket < __h_sz) + __i = (_Node*)_M_ht->_M_buckets[__bucket]; + return __i; +} + +template +__size_type__ +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_next_size(size_type __n) const { + const size_type* __first = (const size_type*)_Stl_prime_type::_M_list; + const size_type* __last = (const size_type*)_Stl_prime_type::_M_list + (int)__stl_num_primes; + const size_type* pos = __lower_bound(__first, __last, __n, __less((size_type*)0), (ptrdiff_t*)0); + return (pos == __last ? *(__last - 1) : *pos); +} + +template +bool +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_equal( + const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht1, + const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht2) +{ + // typedef _Hashtable_node<_Val> _Node; + if (__ht1.bucket_count() != __ht2.bucket_count()) + return false; + for (size_t __n = 0; __n < __ht1.bucket_count(); ++__n) { + const _Node* __cur1 = __ht1._M_get_bucket(__n); + const _Node* __cur2 = __ht2._M_get_bucket(__n); + for ( ; __cur1 && __cur2 && __cur1->_M_val == __cur2->_M_val; + __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next) + {} + if (__cur1 || __cur2) + return false; + } + return true; +} + +template +pair< _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> , bool> +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::insert_unique_noresize(const value_type& __obj) +{ + const size_type __n = _M_bkt_num(__obj); + _Node* __first = (_Node*)_M_buckets[__n]; + + for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) + if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) + return pair(iterator(__cur, this), false); + + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __first; + _M_buckets[__n] = __tmp; + ++_M_num_elements._M_data; + return pair(iterator(__tmp, this), true); +} + +template +__iterator__ +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::insert_equal_noresize(const value_type& __obj) +{ + const size_type __n = _M_bkt_num(__obj); + _Node* __first = (_Node*)_M_buckets[__n]; + + for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) + if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) { + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __cur->_M_next; + __cur->_M_next = __tmp; + ++_M_num_elements._M_data; + return iterator(__tmp, this); + } + + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __first; + _M_buckets[__n] = __tmp; + ++_M_num_elements._M_data; + return iterator(__tmp, this); +} + +template +__reference__ +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::_M_insert(const value_type& __obj) +{ + resize(_M_num_elements._M_data + 1); + + size_type __n = _M_bkt_num(__obj); + _Node* __first = (_Node*)_M_buckets[__n]; + + _Node* __tmp = _M_new_node(__obj); + __tmp->_M_next = __first; + _M_buckets[__n] = __tmp; + ++_M_num_elements._M_data; + return __tmp->_M_val; +} + +template +__reference__ +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::find_or_insert(const value_type& __obj) +{ + + _Node* __first = _M_find(_M_get_key(__obj)); + if (__first) + return __first->_M_val; + else + return _M_insert(__obj); +} + +template +pair< _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>, + _Ht_iterator<_Val, _Nonconst_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> > +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::equal_range(const key_type& __key) +{ + typedef pair _Pii; + const size_type __n = _M_bkt_num_key(__key); + + for (_Node* __first = (_Node*)_M_buckets[__n]; __first; __first = __first->_M_next) + if (_M_equals(_M_get_key(__first->_M_val), __key)) { + for (_Node* __cur = __first->_M_next; __cur; __cur = __cur->_M_next) + if (!_M_equals(_M_get_key(__cur->_M_val), __key)) + return _Pii(iterator(__first, this), iterator(__cur, this)); + for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) + if (_M_buckets[__m]) + return _Pii(iterator(__first, this), + iterator((_Node*)_M_buckets[__m], this)); + return _Pii(iterator(__first, this), end()); + } + return _Pii(end(), end()); +} + +template +pair< _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All>, + _Ht_iterator<_Val, _Const_traits<_Val>, _Key, _HF, _ExK, _EqK, _All> > +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::equal_range(const key_type& __key) const +{ + typedef pair _Pii; + const size_type __n = _M_bkt_num_key(__key); + + for (const _Node* __first = (_Node*)_M_buckets[__n] ; + __first; + __first = __first->_M_next) { + if (_M_equals(_M_get_key(__first->_M_val), __key)) { + for (const _Node* __cur = __first->_M_next; + __cur; + __cur = __cur->_M_next) + if (!_M_equals(_M_get_key(__cur->_M_val), __key)) + return _Pii(const_iterator(__first, this), + const_iterator(__cur, this)); + for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m) + if (_M_buckets[__m]) + return _Pii(const_iterator(__first, this), + const_iterator((_Node*)_M_buckets[__m], this)); + return _Pii(const_iterator(__first, this), end()); + } + } + return _Pii(end(), end()); +} + +template +__size_type__ +hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::erase(const key_type& __key) +{ + const size_type __n = _M_bkt_num_key(__key); + _Node* __first = (_Node*)_M_buckets[__n]; + size_type __erased = 0; + + if (__first) { + _Node* __cur = __first; + _Node* __next = __cur->_M_next; + while (__next) { + if (_M_equals(_M_get_key(__next->_M_val), __key)) { + __cur->_M_next = __next->_M_next; + _M_delete_node(__next); + __next = __cur->_M_next; + ++__erased; + --_M_num_elements._M_data; + } + else { + __cur = __next; + __next = __cur->_M_next; + } + } + if (_M_equals(_M_get_key(__first->_M_val), __key)) { + _M_buckets[__n] = __first->_M_next; + _M_delete_node(__first); + ++__erased; + --_M_num_elements._M_data; + } + } + return __erased; +} + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::erase(const const_iterator& __it) +{ + // const iterator& __it = __REINTERPRET_CAST(const iterator&,_c_it); + const _Node* __p = __it._M_cur; + if (__p) { + const size_type __n = _M_bkt_num(__p->_M_val); + _Node* __cur = (_Node*)_M_buckets[__n]; + + if (__cur == __p) { + _M_buckets[__n] = __cur->_M_next; + _M_delete_node(__cur); + --_M_num_elements._M_data; + } + else { + _Node* __next = __cur->_M_next; + while (__next) { + if (__next == __p) { + __cur->_M_next = __next->_M_next; + _M_delete_node(__next); + --_M_num_elements._M_data; + break; + } + else { + __cur = __next; + __next = __cur->_M_next; + } + } + } + } +} + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::erase(const_iterator _c_first, const_iterator _c_last) +{ + iterator& __first = (iterator&)_c_first; + iterator& __last = (iterator&)_c_last; + size_type __f_bucket = __first._M_cur ? + _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size(); + size_type __l_bucket = __last._M_cur ? + _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size(); + if (__first._M_cur == __last._M_cur) + return; + else if (__f_bucket == __l_bucket) + _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur); + else { + _M_erase_bucket(__f_bucket, __first._M_cur, 0); + for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n) + _M_erase_bucket(__n, 0); + if (__l_bucket != _M_buckets.size()) + _M_erase_bucket(__l_bucket, __last._M_cur); + } +} + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::resize(size_type __num_elements_hint) +{ + const size_type __old_n = _M_buckets.size(); + if (__num_elements_hint > __old_n) { + const size_type __n = _M_next_size(__num_elements_hint); + if (__n > __old_n) { + _BucketVector __tmp(__n, (void*)(0), + _M_buckets.get_allocator()); + _STLP_PUSH_CLEANUP_ITEM(_BucketVector, &__tmp); + _STLP_TRY { + for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) { + _Node* __first = (_Node*)_M_buckets[__bucket]; + while (__first) { + size_type __new_bucket = _M_bkt_num(__first->_M_val, __n); + _M_buckets[__bucket] = __first->_M_next; + __first->_M_next = (_Node*)__tmp[__new_bucket]; + __tmp[__new_bucket] = __first; + __first = (_Node*)_M_buckets[__bucket]; + } + } + _M_buckets.swap(__tmp); + } + _STLP_CATCH_ALL { + for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) { + while (__tmp[__bucket]) { + _Node* __next = ((_Node*)__tmp[__bucket])->_M_next; + _M_delete_node((_Node*)__tmp[__bucket]); + __tmp[__bucket] = __next; + } + } + _STLP_RETHROW; + } +#ifdef _STLP_USE_TRAP_LEAVE + CleanupStack::Pop(); +#endif + + } + } +} + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last) +{ + _Node* __cur = (_Node*)_M_buckets[__n]; + if (__cur == __first) + _M_erase_bucket(__n, __last); + else { + _Node* __next; + for (__next = __cur->_M_next; + __next != __first; + __cur = __next, __next = __cur->_M_next) + ; + while (__next != __last) { + __cur->_M_next = __next->_M_next; + _M_delete_node(__next); + __next = __cur->_M_next; + --_M_num_elements._M_data; + } + } +} + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::_M_erase_bucket(const size_type __n, _Node* __last) +{ + _Node* __cur = (_Node*)_M_buckets[__n]; + while (__cur && __cur != __last) { + _Node* __next = __cur->_M_next; + _M_delete_node(__cur); + __cur = __next; + _M_buckets[__n] = __cur; + --_M_num_elements._M_data; + } +} + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>::clear() +{ + for (size_type __i = 0; __i < _M_buckets.size(); ++__i) { + _Node* __cur = (_Node*)_M_buckets[__i]; + while (__cur != 0) { + _Node* __next = __cur->_M_next; + _M_delete_node(__cur); + __cur = __next; + } + _M_buckets[__i] = 0; + } + _M_num_elements._M_data = 0; +} + + +template +void hashtable<_Val,_Key,_HF,_ExK,_EqK,_All> + ::_M_copy_from(const hashtable<_Val,_Key,_HF,_ExK,_EqK,_All>& __ht) +{ + _M_buckets.clear(); + _M_buckets.reserve(__ht._M_buckets.size()); + _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (void*) 0); + _STLP_TRY { + for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) { + const _Node* __cur = (_Node*)__ht._M_buckets[__i]; + if (__cur) { + _Node* __xcopy = _M_new_node(__cur->_M_val); + _M_buckets[__i] = __xcopy; + + for (_Node* __next = __cur->_M_next; + __next; + __cur = __next, __next = __cur->_M_next) { + __xcopy->_M_next = _M_new_node(__next->_M_val); + __xcopy = __xcopy->_M_next; + } + } + } + _M_num_elements._M_data = __ht._M_num_elements._M_data; + } + _STLP_UNWIND(clear()); +} + +# undef __iterator__ +# undef const_iterator +# undef __size_type__ +# undef __reference__ +# undef size_type +# undef value_type +# undef key_type +# undef _Node +# undef __stl_num_primes +# undef hashtable + +_STLP_END_NAMESPACE + +#endif /* _STLP_HASHTABLE_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_heap.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_heap.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,242 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_HEAP_C +#define _STLP_HEAP_C + +#ifndef _STLP_INTERNAL_HEAP_H +# include +#endif + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +_STLP_INLINE_LOOP +void +__push_heap(_RandomAccessIterator __first, + _Distance __holeIndex, _Distance __topIndex, _Tp __val) +{ + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && *(__first + __parent) < __val) { + *(__first + __holeIndex) = *(__first + __parent); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = __val; +} + +template +inline void +__push_heap_aux(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Distance*, _Tp*) +{ + __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), + _Tp(*(__last - 1))); +} + +template +void +push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + __push_heap_aux(__first, __last, + _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator)); +} + + +template +_STLP_INLINE_LOOP +void +__push_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __topIndex, _Tp __val, _Compare __comp) +{ + _Distance __parent = (__holeIndex - 1) / 2; + while (__holeIndex > __topIndex && __comp(*(__first + __parent), __val)) { + *(__first + __holeIndex) = *(__first + __parent); + __holeIndex = __parent; + __parent = (__holeIndex - 1) / 2; + } + *(__first + __holeIndex) = __val; +} + +template +inline void +__push_heap_aux(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp, + _Distance*, _Tp*) +{ + __push_heap(__first, _Distance((__last - __first) - 1), _Distance(0), + _Tp(*(__last - 1)), __comp); +} + +template +void +push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp) +{ + __push_heap_aux(__first, __last, __comp, + _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator), _STLP_VALUE_TYPE(__first, _RandomAccessIterator)); +} + +template +void +__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __val) { + _Distance __topIndex = __holeIndex; + _Distance __secondChild = 2 * __holeIndex + 2; + while (__secondChild < __len) { + if (*(__first + __secondChild) < *(__first + (__secondChild - 1))) + __secondChild--; + *(__first + __holeIndex) = *(__first + __secondChild); + __holeIndex = __secondChild; + __secondChild = 2 * (__secondChild + 1); + } + if (__secondChild == __len) { + *(__first + __holeIndex) = *(__first + (__secondChild - 1)); + __holeIndex = __secondChild - 1; + } + __push_heap(__first, __holeIndex, __topIndex, __val); +} + + +template +inline void +__pop_heap_aux(_RandomAccessIterator __first, _RandomAccessIterator __last, _Tp*) { + __pop_heap(__first, __last - 1, __last - 1, + _Tp(*(__last - 1)), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); +} + +template +void pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last) { + __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator)); +} + +template +void +__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __val, _Compare __comp) +{ + _Distance __topIndex = __holeIndex; + _Distance __secondChild = 2 * __holeIndex + 2; + while (__secondChild < __len) { + if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1)))) + __secondChild--; + *(__first + __holeIndex) = *(__first + __secondChild); + __holeIndex = __secondChild; + __secondChild = 2 * (__secondChild + 1); + } + if (__secondChild == __len) { + *(__first + __holeIndex) = *(__first + (__secondChild - 1)); + __holeIndex = __secondChild - 1; + } + __push_heap(__first, __holeIndex, __topIndex, __val, __comp); +} + + +template +inline void +__pop_heap_aux(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Tp*, _Compare __comp) +{ + __pop_heap(__first, __last - 1, __last - 1, _Tp(*(__last - 1)), __comp, + _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); +} + + +template +void +pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) +{ + __pop_heap_aux(__first, __last, _STLP_VALUE_TYPE(__first, _RandomAccessIterator), __comp); +} + +template +_STLP_INLINE_LOOP +void +__make_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Tp*, _Distance*) +{ + if (__last - __first < 2) return; + _Distance __len = __last - __first; + _Distance __parent = (__len - 2)/2; + + while (true) { + __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent))); + if (__parent == 0) return; + __parent--; + } +} + +template +void +make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + __make_heap(__first, __last, + _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); +} + +template +_STLP_INLINE_LOOP +void +__make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp, _Tp*, _Distance*) +{ + if (__last - __first < 2) return; + _Distance __len = __last - __first; + _Distance __parent = (__len - 2)/2; + + while (true) { + __adjust_heap(__first, __parent, __len, _Tp(*(__first + __parent)), + __comp); + if (__parent == 0) return; + __parent--; + } +} + +template +void +make_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) +{ + __make_heap(__first, __last, __comp, + _STLP_VALUE_TYPE(__first, _RandomAccessIterator), _STLP_DISTANCE_TYPE(__first, _RandomAccessIterator)); +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_HEAP_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_heap.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_heap.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,129 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Hewlett-Packard Company makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_HEAP_H +#define _STLP_INTERNAL_HEAP_H + +#ifndef _STLP_CONFIG_H +#include +#endif + +_STLP_BEGIN_NAMESPACE + +// Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap. + +template +void +push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last); + + +template +void +push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _Compare __comp); + +template +void +__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __val); + +template +inline void +__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Tp __val, _Distance*) +{ + *__result = *__first; + __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __val); +} + +template +void pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last); + +template +void +__adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex, + _Distance __len, _Tp __val, _Compare __comp); + +template +inline void +__pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last, + _RandomAccessIterator __result, _Tp __val, _Compare __comp, + _Distance*) +{ + *__result = *__first; + __adjust_heap(__first, _Distance(0), _Distance(__last - __first), + __val, __comp); +} + +template +void +pop_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp); + +template +void +make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last); + +template +void +make_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp); + +template +_STLP_INLINE_LOOP +void sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last) +{ + while (__last - __first > 1) + pop_heap(__first, __last--); +} + +template +_STLP_INLINE_LOOP +void +sort_heap(_RandomAccessIterator __first, + _RandomAccessIterator __last, _Compare __comp) +{ + while (__last - __first > 1) + pop_heap(__first, __last--, __comp); +} + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_HEAP_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ios.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ios.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,134 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_IOS_C +#define _STLP_IOS_C + +#ifndef _STLP_INTERNAL_IOS_H +# include +#endif + +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#ifndef _STLP_INTERNAL_STREAMBUF +# include +#endif + +#ifndef _STLP_INTERNAL_NUMPUNCT_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// basic_ios<>'s non-inline member functions + +// Public constructor, taking a streambuf. +template +basic_ios<_CharT, _Traits> + ::basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf) + : ios_base(), + _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0) +{ + init(__streambuf); +} + +template +basic_streambuf<_CharT, _Traits>* +basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __buf) +{ + basic_streambuf<_CharT, _Traits>* __tmp = _M_streambuf; + _M_streambuf = __buf; + this->clear(); + return __tmp; +} + +template +basic_ios<_CharT, _Traits>& +basic_ios<_CharT, _Traits>::copyfmt(const basic_ios<_CharT, _Traits>& __x) +{ + _M_invoke_callbacks(erase_event); + _M_copy_state(__x); // Inherited from ios_base. + _M_fill = __x._M_fill; + _M_tied_ostream = __x._M_tied_ostream; + _M_invoke_callbacks(copyfmt_event); + // this->_M_set_exception_mask(__x.exceptions()); //Exceptions should copy not simply set. should throw exception if mask&state ==1 ,while copying exception. + this->exceptions(__x.exceptions()); + return *this; +} +//#ifndef __SYMBIAN32__ // Moved to src +template +locale basic_ios<_CharT, _Traits>::imbue(const locale& __loc) +{ + locale __tmp = ios_base::imbue(__loc); + + if (_M_streambuf) + _M_streambuf->pubimbue(__loc); + + // no throwing here +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + this->_M_cached_ctype = __loc._M_get_facet(ctype::GetFacetLocaleId()) ; + this->_M_cached_numpunct = __loc._M_get_facet(numpunct::GetFacetLocaleId()) ; +#else + this->_M_cached_ctype = __loc._M_get_facet(ctype::id) ; + this->_M_cached_numpunct = __loc._M_get_facet(numpunct::id) ; +#endif //__LIBSTD_CPP_SYMBIAN32_WSD__ + this->_M_cached_grouping = ((numpunct*)_M_cached_numpunct)->grouping() ; + return __tmp; +} +//#endif // __SYMBIAN32__ +// Protected constructor and initialization functions. The default +// constructor creates an uninitialized basic_ios, and init() initializes +// all of the members to the values in Table 89 of the C++ standard. + +template +basic_ios<_CharT, _Traits>::basic_ios() + : ios_base(), + _M_fill(_STLP_NULL_CHAR_INIT(_CharT)), _M_streambuf(0), _M_tied_ostream(0) +{} + +template +void +basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb) +{ + this->rdbuf(__sb); + this->imbue(locale()); + this->tie(0); + this->_M_set_exception_mask(ios_base::goodbit); + this->_M_clear_nothrow(__sb != 0 ? ios_base::goodbit : ios_base::badbit); + ios_base::flags(ios_base::skipws | ios_base::dec); + ios_base::width(0); + ios_base::precision(6); + this->fill(widen(' ')); + // We don't need to worry about any of the three arrays: they are + // initialized correctly in ios_base's constructor. +} + +// This is never called except from within a catch clause. +template +void basic_ios<_CharT, _Traits>::_M_handle_exception(ios_base::iostate __flag) +{ + this->_M_setstate_nothrow(__flag); + if (this->_M_get_exception_mask() & __flag) + _STLP_RETHROW; +} + +_STLP_END_NAMESPACE + +#endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ + +#endif /* _STLP_IOS_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ios.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ios.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,204 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_INTERNAL_IOS_H +#define _STLP_INTERNAL_IOS_H + + +#ifndef _STLP_IOS_BASE_H +# include +#endif + +#ifndef _STLP_INTERNAL_CTYPE_H +# include +#endif +#ifndef _STLP_INTERNAL_NUMPUNCT_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// ---------------------------------------------------------------------- + +// Class basic_ios, a subclass of ios_base. The only important difference +// between the two is that basic_ios is a class template, parameterized +// by the character type. ios_base exists to factor out all of the +// common properties that don't depend on the character type. + +// The second template parameter, _Traits, defaults to char_traits<_CharT>. +// The default is declared in header , and it isn't declared here +// because C++ language rules do not allow it to be declared twice. + +template +#ifdef __SYMBIAN32__ +class basic_ios : public ios_base { +#else +class basic_ios : public ios_base { +#endif + friend class ios_base; +public: // Synonyms for types. + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + +public: // Constructor, destructor. + explicit basic_ios(basic_streambuf<_CharT, _Traits>* __streambuf); + virtual ~basic_ios() {} + +public: // Members from clause 27.4.4.2 + basic_ostream<_CharT, _Traits>* tie() const { + return _M_tied_ostream; + } + basic_ostream<_CharT, _Traits>* + tie(basic_ostream* __new_tied_ostream) { + basic_ostream* __tmp = _M_tied_ostream; + _M_tied_ostream = __new_tied_ostream; + return __tmp; + } + + basic_streambuf<_CharT, _Traits>* rdbuf() const + { return _M_streambuf; } + + basic_streambuf<_CharT, _Traits>* + rdbuf(basic_streambuf*); + + // Copies __x's state to *this. + basic_ios<_CharT, _Traits>& copyfmt(const basic_ios<_CharT, _Traits>& __x); + + char_type fill() const { return _M_fill; } + char_type fill(char_type __fill) { + char_type __tmp(_M_fill); + _M_fill = __fill; + return __tmp; + } + +public: // Members from 27.4.4.3. These four functions + // can almost be defined in ios_base. + + void clear(iostate __state = goodbit) { + _M_clear_nothrow(this->rdbuf() ? __state : iostate(__state|ios_base::badbit)); + _M_check_exception_mask(); + } + void setstate(iostate __state) { this->clear(rdstate() | __state); } + + iostate exceptions() const { return this->_M_get_exception_mask(); } + void exceptions(iostate __mask) { + this->_M_set_exception_mask(__mask); + this->clear(this->rdstate()); + } + +public: // Locale-related member functions. + locale imbue(const locale&); + + inline char narrow(_CharT, char) const ; + inline _CharT widen(char) const; + + // Helper function that makes testing for EOF more convenient. + static bool _STLP_CALL _S_eof(int_type __c) { + const int_type __eof = _Traits::eof(); + return _Traits::eq_int_type(__c, __eof); + } + +protected: + basic_ios(); + + void init(basic_streambuf<_CharT, _Traits>* __streambuf); + +public: + + // Helper function used in istream and ostream. It is called only from + // a catch clause. + void _M_handle_exception(ios_base::iostate __flag); + +private: // Data members + char_type _M_fill; // The fill character, used for padding. + + basic_streambuf<_CharT, _Traits>* _M_streambuf; + basic_ostream<_CharT, _Traits>* _M_tied_ostream; + +}; + + +template +inline char +basic_ios<_CharT, _Traits>::narrow(_CharT __c, char __default) const +{ return ((const ctype<_CharT>*)this->_M_ctype_facet())->narrow(__c, __default); } + +template +inline _CharT +basic_ios<_CharT, _Traits>::widen(char __c) const +{ + return ((const ctype<_CharT>*)this->_M_ctype_facet())->widen(__c); } + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_ios >; +# if ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_ios >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +# if !defined (_STLP_NO_METHOD_SPECIALIZATION) +_STLP_TEMPLATE_NULL +inline char +basic_ios >::narrow(char __c, char) const +{ + return __c; +} + +_STLP_TEMPLATE_NULL +inline char +basic_ios >::widen(char __c) const +{ + return __c; +} +# endif /* _STLP_NO_METHOD_SPECIALIZATION */ + + +_STLP_END_NAMESPACE + +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +// The following is needed to ensure that the inlined _Stl_loc_init functions +// that ios_base::_Loc_init::_Loc_init() calls are found eventually. +// Otherwise, undefined externs may be caused. + +#if defined(__BORLANDC__) && defined(_RTLDLL) +# ifndef _STLP_INTERNAL_NUM_PUT_H +# include +# endif +# ifndef _STLP_INTERNAL_NUM_GET_H +# include +# endif +# ifndef _STLP_INTERNAL_MONETARY_H +# include +# endif +# ifndef _STLP_INTERNAL_TIME_FACETS_H +# include +# endif +#endif + +#endif /* _STLP_IOS */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ios_base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ios_base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,439 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_IOS_BASE_H +#define _STLP_IOS_BASE_H + +#ifndef _STLP_STDEXCEPT +#include +#endif +#ifndef _STLP_UTILITY +#include +#endif +#ifndef _STLP_INTERNAL_LOCALE_H +#include +#endif +#ifndef _STLP_STRING_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// ---------------------------------------------------------------------- + +// Class ios_base. This is the base class of the ios hierarchy, which +// includes basic_istream and basic_ostream. Classes in the ios +// hierarchy are actually quite simple: they are just glorified +// wrapper classes. They delegate buffering and physical character +// manipulation to the streambuf classes, and they delegate most +// formatting tasks to a locale. + +#ifdef __SYMBIAN32__ +class ios_base { +#else +class _STLP_CLASS_DECLSPEC ios_base { +#endif +public: + + class _STLP_CLASS_DECLSPEC failure : public __Named_exception { + public: + _STLP_DECLSPEC explicit failure(const string&); + _STLP_DECLSPEC virtual ~failure() _STLP_NOTHROW_INHERENTLY; + }; + + typedef int fmtflags; + typedef int iostate; + typedef int openmode; + typedef int seekdir; + +# ifndef _STLP_NO_ANACHRONISMS + typedef fmtflags fmt_flags; +# endif + + // Formatting flags. +# ifdef _STLP_STATIC_CONST_INIT_BUG + enum { +# else + // boris : type for all those constants is int + static const int +# endif + left = 0x0001, + right = 0x0002, + internal = 0x0004, + dec = 0x0008, + hex = 0x0010, + oct = 0x0020, + fixed = 0x0040, + scientific = 0x0080, + boolalpha = 0x0100, + showbase = 0x0200, + showpoint = 0x0400, + showpos = 0x0800, + skipws = 0x1000, + unitbuf = 0x2000, + uppercase = 0x4000, + adjustfield = left | right | internal, + basefield = dec | hex | oct, + floatfield = scientific | fixed, + + // State flags. + goodbit = 0x00, + badbit = 0x01, + eofbit = 0x02, + failbit = 0x04, + + // Openmode flags. + __default_mode = 0x0, /* implementation detail */ + app = 0x01, + ate = 0x02, + binary = 0x04, + in = 0x08, + out = 0x10, + trunc = 0x20, + + // Seekdir flags + + beg = 0x01, + cur = 0x02, + end = 0x04 +# ifdef _STLP_STATIC_CONST_INIT_BUG + } +# endif + ; + +public: // Flag-manipulation functions. + fmtflags flags() const { return _M_fmtflags; } + fmtflags flags(fmtflags __flags) { + fmtflags __tmp = _M_fmtflags; + _M_fmtflags = __flags; + return __tmp; + } + + fmtflags setf(fmtflags __flag) { + fmtflags __tmp = _M_fmtflags; + _M_fmtflags |= __flag; + return __tmp; + } + fmtflags setf(fmtflags __flag, fmtflags __mask) { + fmtflags __tmp = _M_fmtflags; + _M_fmtflags &= ~__mask; + _M_fmtflags |= __flag & __mask; + return __tmp; + } + void unsetf(fmtflags __mask) { _M_fmtflags &= ~__mask; } + + streamsize precision() const { return _M_precision; } + streamsize precision(streamsize __newprecision) { + streamsize __tmp = _M_precision; + _M_precision = __newprecision; + return __tmp; + } + + streamsize width() const { return _M_width; } + streamsize width(streamsize __newwidth) { + streamsize __tmp = _M_width; + _M_width = __newwidth; + return __tmp; + } + +public: // Locales + _STLP_DECLSPEC locale imbue(const locale&); + _STLP_DECLSPEC locale getloc() const;// { return _M_locale; } + +public: // Auxiliary storage. + _STLP_DECLSPEC static int _STLP_CALL xalloc(); + _STLP_DECLSPEC long& iword(int __index); + _STLP_DECLSPEC void*& pword(int __index); + +public: // Destructor. + _STLP_DECLSPEC virtual ~ios_base(); + +public: // Callbacks. + enum event { erase_event, imbue_event, copyfmt_event }; + typedef void (*event_callback)(event, ios_base&, int __index); + _STLP_DECLSPEC void register_callback(event_callback __fn, int __index); + +public: // This member function affects only + // the eight predefined ios objects: + // cin, cout, etc. + _STLP_DECLSPEC static bool _STLP_CALL sync_with_stdio(bool __sync = true); + +public: // The C++ standard requires only that these + // member functions be defined in basic_ios. + // We define them in the non-template + // base class to avoid code duplication. + operator void*() const { return !fail() ? (void*) __CONST_CAST(ios_base*,this) : (void*) 0; } + bool operator!() const { return fail(); } + + iostate rdstate() const { return _M_iostate; } + + bool good() const { return _M_iostate == 0; } + bool eof() const { return (_M_iostate & eofbit) != 0; } + bool fail() const { return (_M_iostate & (failbit | badbit)) != 0; } + bool bad() const { return (_M_iostate & badbit) != 0; } + +protected: // The functional protected interface. + + // Copies the state of __x to *this. This member function makes it + // possible to implement basic_ios::copyfmt without having to expose + // ios_base's private data members. Does not copy _M_exception_mask + // or _M_iostate. + _STLP_DECLSPEC void _M_copy_state(const ios_base& __x); + + void _M_setstate_nothrow(iostate __state) { _M_iostate |= __state; } + void _M_clear_nothrow(iostate __state) { _M_iostate = __state; } + iostate _M_get_exception_mask() const { return _M_exception_mask; } + void _M_set_exception_mask(iostate __mask) { _M_exception_mask = __mask; } + void _M_check_exception_mask() { + if (_M_iostate & _M_exception_mask) + _M_throw_failure(); + } + + _STLP_DECLSPEC void _M_invoke_callbacks(event); + _STLP_DECLSPEC void _M_throw_failure(); + + _STLP_DECLSPEC ios_base(); // Default constructor. + +protected: // Initialization of the I/O system + static void _STLP_CALL _S_initialize(); + static void _STLP_CALL _S_uninitialize(); +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static bool _S_was_synced; +# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ + friend void CallIosInit(); +private: // Invalidate the copy constructor and + // assignment operator. + ios_base(const ios_base&); + void operator=(const ios_base&); + +private: // Data members. + + fmtflags _M_fmtflags; // Flags + iostate _M_iostate; + openmode _M_openmode; + seekdir _M_seekdir; + iostate _M_exception_mask; + + streamsize _M_precision; + streamsize _M_width; + + locale _M_locale; + + pair* _M_callbacks; + size_t _M_num_callbacks; // Size of the callback array. + size_t _M_callback_index; // Index of the next available callback; + // initially zero. + + long* _M_iwords; // Auxiliary storage. The count is zero + size_t _M_num_iwords; // if and only if the pointer is null. + + void** _M_pwords; + size_t _M_num_pwords; + +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static int _S_index; +# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ + + +protected: + // Cached copies of the curent locale's facets. Set by init() and imbue(). + locale::facet* _M_cached_ctype; + locale::facet* _M_cached_numpunct; + string _M_cached_grouping; +public: + // Equivalent to &use_facet< Facet >(getloc()), but faster. + const locale::facet* _M_ctype_facet() const { return _M_cached_ctype; } + const locale::facet* _M_numpunct_facet() const { return _M_cached_numpunct; } + const string& _M_grouping() const { return _M_cached_grouping; } +public: + + // ---------------------------------------------------------------------- + // Nested initializer class. This is an implementation detail, but it's + // prescribed by the standard. The static initializer object (on + // implementations where such a thing is required) is declared in + // + + class _STLP_CLASS_DECLSPEC Init { + public: + _STLP_DECLSPEC Init(); + _STLP_DECLSPEC ~Init(); + private: +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static long _S_count; +# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ + friend class ios_base; + }; + + // this class is needed to ensure locale initialization w/o inclusion + class _STLP_CLASS_DECLSPEC _Loc_init { + public: + _STLP_DECLSPEC _Loc_init(); + _STLP_DECLSPEC ~_Loc_init(); + private: +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static long _S_count; +# endif //__LIBSTD_CPP_SYMBIAN32_WSD__ + friend class locale; + friend class ios_base; + }; + + friend class Init; + +public: +# ifndef _STLP_NO_ANACHRONISMS + // 31.6 Old iostreams members [depr.ios.members] + typedef iostate io_state; + typedef openmode open_mode; + typedef seekdir seek_dir; + typedef _STLP_STD::streamoff streamoff; + typedef _STLP_STD::streampos streampos; +# endif +}; + +inline _STLP_EXP_DECLSPEC locale ios_base::getloc() const + { + return _M_locale; + } + +// ---------------------------------------------------------------------- +// ios_base manipulator functions, from section 27.4.5 of the C++ standard. +// All of them are trivial one-line wrapper functions. + +// fmtflag manipulators, section 27.4.5.1 +inline ios_base& _STLP_CALL boolalpha(ios_base& __s) + { __s.setf(ios_base::boolalpha); return __s;} + +inline ios_base& _STLP_CALL noboolalpha(ios_base& __s) + { __s.unsetf(ios_base::boolalpha); return __s;} + +inline ios_base& _STLP_CALL showbase(ios_base& __s) + { __s.setf(ios_base::showbase); return __s;} + +inline ios_base& _STLP_CALL noshowbase(ios_base& __s) + { __s.unsetf(ios_base::showbase); return __s;} + +inline ios_base& _STLP_CALL showpoint(ios_base& __s) + { __s.setf(ios_base::showpoint); return __s;} + +inline ios_base& _STLP_CALL noshowpoint(ios_base& __s) + { __s.unsetf(ios_base::showpoint); return __s;} + +inline ios_base& _STLP_CALL showpos(ios_base& __s) + { __s.setf(ios_base::showpos); return __s;} + +inline ios_base& _STLP_CALL noshowpos(ios_base& __s) + { __s.unsetf(ios_base::showpos); return __s;} + +inline ios_base& _STLP_CALL skipws(ios_base& __s) + { __s.setf(ios_base::skipws); return __s;} + +inline ios_base& _STLP_CALL noskipws(ios_base& __s) + { __s.unsetf(ios_base::skipws); return __s;} + +inline ios_base& _STLP_CALL uppercase(ios_base& __s) + { __s.setf(ios_base::uppercase); return __s;} + +inline ios_base& _STLP_CALL nouppercase(ios_base& __s) + { __s.unsetf(ios_base::uppercase); return __s;} + +inline ios_base& _STLP_CALL unitbuf(ios_base& __s) + { __s.setf(ios_base::unitbuf); return __s;} + +inline ios_base& _STLP_CALL nounitbuf(ios_base& __s) + { __s.unsetf(ios_base::unitbuf); return __s;} + + +// adjustfield manipulators, section 27.4.5.2 +inline ios_base& _STLP_CALL internal(ios_base& __s) + { __s.setf(ios_base::internal, ios_base::adjustfield); return __s; } + +inline ios_base& _STLP_CALL left(ios_base& __s) + { __s.setf(ios_base::left, ios_base::adjustfield); return __s; } + +inline ios_base& _STLP_CALL right(ios_base& __s) + { __s.setf(ios_base::right, ios_base::adjustfield); return __s; } + +// basefield manipulators, section 27.4.5.3 +inline ios_base& _STLP_CALL dec(ios_base& __s) + { __s.setf(ios_base::dec, ios_base::basefield); return __s; } + +inline ios_base& _STLP_CALL hex(ios_base& __s) + { __s.setf(ios_base::hex, ios_base::basefield); return __s; } + +inline ios_base& _STLP_CALL oct(ios_base& __s) + { __s.setf(ios_base::oct, ios_base::basefield); return __s; } + + +// floatfield manipulators, section 27.4.5.3 +inline ios_base& _STLP_CALL fixed(ios_base& __s) + { __s.setf(ios_base::fixed, ios_base::floatfield); return __s; } + +inline ios_base& _STLP_CALL scientific(ios_base& __s) + { __s.setf(ios_base::scientific, ios_base::floatfield); return __s; } + +#if defined(__BORLANDC__) && defined(_RTLDLL) + +long ios_base::_Loc_init::_S_count = 0; + +void _STLP_CALL _Stl_loc_init_num_put(); +void _STLP_CALL _Stl_loc_init_num_get(); +void _STLP_CALL _Stl_loc_init_monetary(); +void _STLP_CALL _Stl_loc_init_time_facets(); + +inline ios_base::_Loc_init::_Loc_init() { + if (_S_count++ == 0) { + _Stl_loc_init_num_put(); + _Stl_loc_init_num_get(); + _Stl_loc_init_monetary(); + _Stl_loc_init_time_facets(); + locale::_S_initialize(); + } +} + +inline ios_base::_Loc_init::~_Loc_init() { + if (--_S_count == 0) + locale::_S_uninitialize(); +} + +#endif /* __BORLANDC__ */ + +#if 0 +#ifdef __SYMBIAN32__ +#pragma message("Symbian I/O stream support on progress.") +inline ios_base::_Loc_init::_Loc_init() { +} + +inline ios_base::_Loc_init::~_Loc_init() { +} +#endif + +inline ios_base::Init::Init() { +} + +inline ios_base::Init::~Init() { +} +#endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_IOS_BASE */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ioserr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ioserr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,12 @@ +/* + * This file is included in every header that needs the STLport library to be + * built; the header files mostly are the iostreams-headers. The file checks for + * _STLP_USE_NO_IOSTREAMS or _STLP_NO_IOSTREAMS being not defined, so that the + * iostreams part of STLport cannot be used when the symbols were defined + * accidentally. + */ +#if defined (_STLP_NO_IOSTREAMS) +# error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h). +#elif defined (_STLP_USE_NO_IOSTREAMS ) +# error STLport iostreams header cannot be used; your compiler do not support it. +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_iosfwd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_iosfwd.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,159 @@ +# ifndef _STLP_INTERNAL_IOSFWD +# define _STLP_INTERNAL_IOSFWD + +#if defined(__sgi) && !defined(__GNUC__) && !defined(_STANDARD_C_PLUS_PLUS) +#error This header file requires the -LANG:std option +#endif + +// This file provides forward declarations of the most important I/O +// classes. Note that almost all of those classes are class templates, +// with default template arguments. According to the C++ standard, +// if a class template is declared more than once in the same scope +// then only one of those declarations may have default arguments. + +// contains the same declarations as other headers, and including +// both and (say) is permitted. This means that only +// one header may contain those default template arguments. + +// In this implementation, the declarations in contain default +// template arguments. All of the other I/O headers include . + +#ifndef _STLP_CHAR_TRAITS_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +class _STLP_CLASS_DECLSPEC ios_base; + +template ) > +class basic_ios; + +template ) > +class basic_streambuf; + +template ) > +class basic_istream; + +template ) > +class basic_ostream; + +template ) > +class basic_iostream; + +template ), + __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > +class basic_stringbuf; + +template ), + __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > +class basic_istringstream; + +template ), + __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > +class basic_ostringstream; + +template ), + __DFL_TMPL_PARAM(_Allocator , allocator<_CharT>) > +class basic_stringstream; + +template ) > +class basic_filebuf; + +template ) > +class basic_ifstream; + +template ) > +class basic_ofstream; + +template ) > +class basic_fstream; + +template ) > +class istreambuf_iterator; + +template ) > +class ostreambuf_iterator; + +typedef basic_ios > ios; + +# ifndef _STLP_NO_WCHAR_T +typedef basic_ios > wios; +# endif + +// Forward declaration of class locale, and of the most important facets. +class locale; +# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS +template +struct _Use_facet { + const locale& __loc; + _Use_facet(const locale& __p_loc) : __loc(__p_loc) {} + inline const _Facet& operator *() const; +}; +# define use_facet *_Use_facet +# else +template inline const _Facet& use_facet(const locale&); +# endif + +template class ctype; +template class ctype_byname; +template class collate; +template class collate_byname; + +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype; +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname; +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate; +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname; + +# ifndef _STLP_NO_WCHAR_T +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype; +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC ctype_byname; +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate; +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC collate_byname; +# endif + +# if !(defined (__SUNPRO_CC) && __SUNPRO_CC < 0x500 ) && !defined(_STLP_WINCE) +// Typedefs for ordinary (narrow-character) streams. +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC basic_streambuf >; +# endif + +typedef basic_istream > istream; +typedef basic_ostream > ostream; +typedef basic_iostream > iostream; +typedef basic_streambuf > streambuf; + +typedef basic_stringbuf, allocator > stringbuf; +typedef basic_istringstream, allocator > istringstream; +typedef basic_ostringstream, allocator > ostringstream; +typedef basic_stringstream, allocator > stringstream; + +typedef basic_filebuf > filebuf; +typedef basic_ifstream > ifstream; +typedef basic_ofstream > ofstream; +typedef basic_fstream > fstream; + +# ifndef _STLP_NO_WCHAR_T +// Typedefs for wide-character streams. +typedef basic_streambuf > wstreambuf; +typedef basic_istream > wistream; +typedef basic_ostream > wostream; +typedef basic_iostream > wiostream; + +typedef basic_stringbuf, allocator > wstringbuf; +typedef basic_istringstream, allocator > wistringstream; +typedef basic_ostringstream, allocator > wostringstream; +typedef basic_stringstream, allocator > wstringstream; + +typedef basic_filebuf > wfilebuf; +typedef basic_ifstream > wifstream; +typedef basic_ofstream > wofstream; +typedef basic_fstream > wfstream; +# endif + +_STLP_END_NAMESPACE + +#endif + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_iostream_string.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_iostream_string.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2004 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + /* + * This is an internal string for the STLport own iostream implementation. + * The only diference rely on the allocator used to instanciate the basic_string. + * Its goals is to improve performance limitating the number of dynamic allocation + * that could occur when requesting a big float ouput for instance. This allocator + * is not standard conformant as it has an internal state (the static buffer) + */ + + +#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H +#define _STLP_INTERNAL_IOSTREAM_STRING_H + +#ifndef _STLP_INTERNAL_ALLOC_H +# include +#endif /* _STLP_INTERNAL_ALLOC_H */ + +#ifndef _STLP_INTERNAL_STRING_H +# include +#endif /* _STLP_INTERNAL_STRING_H */ + +_STLP_BEGIN_NAMESPACE + +_STLP_MOVE_TO_PRIV_NAMESPACE + +template +class __iostring_allocator : public allocator<_CharT> { +public: + enum { _STR_SIZE = 256 }; + +private: + enum { _BUF_SIZE = _STR_SIZE + 1 }; + typedef allocator<_CharT> _Base; + _CharT _M_static_buf[_BUF_SIZE]; + +public: + typedef typename _Base::size_type size_type; + typedef typename _Base::pointer pointer; +#if defined (_STLP_MEMBER_TEMPLATE_CLASSES) + template struct rebind { +# if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300) + typedef __iostring_allocator<_Tp1> other; +# else + typedef _STLP_PRIV __iostring_allocator<_Tp1> other; +# endif + }; +#endif + + _CharT* allocate(size_type __n, const void* __ptr = 0) { + if (__n > _BUF_SIZE) { + return _Base::allocate(__n, __ptr); + } + return _M_static_buf; + } + void deallocate(pointer __p, size_type __n) { + if (__p != _M_static_buf) _Base::deallocate(__p, __n); + } +}; + +#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) || !defined (_STLP_MEMBER_TEMPLATES) +/* + * As the __iostring_allocator allocator will only be used in the basic_string implementation + * we known that it is never going to be bound to another type that the one used to instantiate + * the basic_string. This is why the associated __stl_alloc_rebind has only one template + * parameter. + */ +_STLP_MOVE_TO_STD_NAMESPACE + +template +inline _STLP_PRIV __iostring_allocator<_Tp>& _STLP_CALL +__stl_alloc_rebind(_STLP_PRIV __iostring_allocator<_Tp>& __a, const _Tp*) +{ return __a; } +template +inline _STLP_PRIV __iostring_allocator<_Tp> _STLP_CALL +__stl_alloc_create(const _STLP_PRIV __iostring_allocator<_Tp>&, const _Tp*) +{ return _STLP_PRIV __iostring_allocator<_Tp>(); } + +_STLP_MOVE_TO_PRIV_NAMESPACE +#endif /* _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE */ + +#if !defined (_STLP_DEBUG) +template +struct __basic_iostring : public basic_string<_CharT, char_traits<_CharT>, __iostring_allocator<_CharT> > { + /* + * A consequence of the non standard conformant allocator is that a string using it + * must always be presized to the allocator static buffer size because the basic_string implementation + * do not manage an allocator returning always the same memory adress as long as the + * requested memory block size is under a certain value. + */ + typedef __basic_iostring<_CharT> _Self; + typedef basic_string<_CharT, char_traits<_CharT>, __iostring_allocator<_CharT> > _Base; + typedef typename _Base::_Reserve_t _Reserve_t; + + __basic_iostring() : _Base(_Reserve_t(), __iostring_allocator<_CharT>::_STR_SIZE) + {} + + _Self& operator=(const _CharT* __s) { + _Base::operator=(__s); + return *this; + } +}; + +typedef __basic_iostring __iostring; + +# if !defined (_STLP_NO_WCHAR_T) +typedef __basic_iostring __iowstring; +# endif + +# define _STLP_BASIC_IOSTRING(_CharT) _STLP_PRIV __basic_iostring<_CharT> + +#else + +typedef string __iostring; +# if !defined (_STLP_NO_WCHAR_T) +typedef wstring __iowstring; +# endif + +# define _STLP_BASIC_IOSTRING(_CharT) basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > + +#endif + +_STLP_MOVE_TO_STD_NAMESPACE + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_IOSTREAM_STRING_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_istream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_istream.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1534 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_ISTREAM_C +#define _STLP_ISTREAM_C + +#ifndef _STLP_INTERNAL_ISTREAM_H +# include +#endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#ifndef _STLP_LIMITS_H +# include +#endif + +#ifndef _STLP_INTERNAL_NUM_GET_H +# include +#endif + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +// no wchar_t is supported for this mode +# define __BIS_int_type__ int +# define __BIS_pos_type__ streampos +# define __BIS_off_type__ streamoff +# else +# define __BIS_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::int_type +# define __BIS_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::pos_type +# define __BIS_off_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_istream<_CharT, _Traits>::off_type +# endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// Function object structs used by some member functions. + +template +struct _Is_not_wspace { + typedef typename _Traits::char_type argument_type; + typedef bool result_type; + + const ctype* _M_ctype; + + _Is_not_wspace(const ctype* __c_type) : _M_ctype(__c_type) {} + bool operator()(argument_type __c) const + { return !_M_ctype->is(ctype_base::space, __c); } +}; + +template +struct _Is_wspace_null { + typedef typename _Traits::char_type argument_type; + typedef bool result_type; + + const ctype* _M_ctype; + + _Is_wspace_null(const ctype* __c_type) : _M_ctype(__c_type) {} + bool operator()(argument_type __c) const { + return _Traits::eq(__c, argument_type()) || + _M_ctype->is(ctype_base::space, __c); + } +}; + +template +struct _Scan_for_wspace { + typedef typename _Traits::char_type char_type; + typedef char_type* first_argument_type; + typedef char_type* second_argument_type; + typedef char_type* result_type; + + const ctype* _M_ctype; + + _Scan_for_wspace(const ctype* __ctype) : _M_ctype(__ctype) {} + const char_type* + operator()(const char_type* __first, const char_type* __last) const { + return _M_ctype->scan_is(ctype_base::space, __first, __last); + } +}; + +template +struct _Scan_wspace_null { + typedef typename _Traits::char_type char_type; + typedef char_type* first_argument_type; + typedef char_type* second_argument_type; + typedef char_type* result_type; + + const ctype* _M_ctype; + + _Scan_wspace_null(const ctype* __c_type) : _M_ctype(__c_type) {} + const char_type* + operator()(const char_type* __first, const char_type* __last) const { + __last = find_if(__first, __last, + _Eq_char_bound<_Traits>(char_type())); + return _M_ctype->scan_is(ctype_base::space, __first, __last); + } +}; + +template +struct _Scan_for_not_wspace { + typedef typename _Traits::char_type char_type; + typedef char_type* first_argument_type; + typedef char_type* second_argument_type; + typedef char_type* result_type; + + const ctype* _M_ctype; + + _Scan_for_not_wspace(const ctype* __c_type) : _M_ctype(__c_type) {} + const char_type* + operator()(const char_type* __first, const char_type* __last) const { + return _M_ctype->scan_not(ctype_base::space, __first, __last); + } +}; + +template +struct _Scan_for_char_val +{ + typedef typename _Traits::char_type char_type; + typedef char_type* first_argument_type; + typedef char_type* second_argument_type; + typedef char_type* result_type; + + char_type _M_val; + + _Scan_for_char_val(char_type __val) : _M_val(__val) {} + + const char_type* + operator()(const char_type* __first, const char_type* __last) const { + return find_if(__first, __last, _Eq_char_bound<_Traits>(_M_val)); + } +}; + +template +struct _Scan_for_int_val +{ + typedef typename _Traits::char_type char_type; + typedef typename _Traits::int_type int_type; + typedef char_type* first_argument_type; + typedef char_type* second_argument_type; + typedef char_type* result_type; + + int_type _M_val; + + _Scan_for_int_val(int_type __val) : _M_val(__val) {} + + const char_type* + operator()(const char_type* __first, const char_type* __last) const { + return find_if(__first, __last, + _Eq_int_bound<_Traits>(_M_val)); + } +}; + +// Helper function: try to push back a character to a streambuf, +// return true if the pushback succeeded. Does not throw. + +template +bool _STLP_CALL +__pushback(basic_streambuf<_CharT, _Traits>* __buf, _CharT __c) +{ + bool ret; + _STLP_TRY { + const typename _Traits::int_type __eof = _Traits::eof(); + ret = !_Traits::eq_int_type(__buf->sputbackc(__c), __eof); + } + _STLP_CATCH_ALL { + ret = false; + } + return ret; +} + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +ws(basic_istream<_CharT, _Traits>& __is) +{ + typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry; + _Sentry __sentry(__is, _No_Skip_WS()); // Don't skip whitespace. + if (__sentry) + __is._M_skip_whitespace(false); + return __is; +} + +// Helper functions for istream<>::sentry constructor. +template +bool +_M_init_skip(basic_istream<_CharT, _Traits>& __is) { + if (__is.good()) { + if (__is.tie()) + __is.tie()->flush(); + + __is._M_skip_whitespace(true); + } + + if (!__is.good()) { + __is.setstate(ios_base::failbit); + return false; + } else + return true; +} + +template +bool +_M_init_noskip(basic_istream<_CharT, _Traits>& __is){ + if (__is.good()) { + if (__is.tie()) + __is.tie()->flush(); + + if (!__is.rdbuf()) + __is.setstate(ios_base::badbit); + } + else + __is.setstate(ios_base::failbit); + return __is.good(); +} + +//---------------------------------------------------------------------- +// Definitions of basic_istream<>'s noninline member functions. + +// Helper function for formatted input of numbers. +template +ios_base::iostate _STLP_CALL +_M_get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val) +{ + typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry; + ios_base::iostate __err = 0; + _Sentry __sentry( __that ); // Skip whitespace. + if (__sentry) { + typedef num_get<_CharT, istreambuf_iterator<_CharT, _Traits> > _Num_get; + _STLP_TRY { + ((const _Num_get&)use_facet<_Num_get>(__that.getloc())).get(istreambuf_iterator<_CharT, _Traits>(__that.rdbuf()), + 0, __that, __err, __val); + } + _STLP_CATCH_ALL { + __that._M_handle_exception(ios_base::badbit); + } + if (__err) __that.setstate(__err); + } + return __err; +} + + +// Unformatted input + +template +__BIS_int_type__ +basic_istream<_CharT, _Traits>::peek() +{ + typename _Traits::int_type __tmp = _Traits::eof(); + + this->_M_gcount = 0; + sentry __sentry(*this, _No_Skip_WS()); + + if (__sentry) { + _STLP_TRY { + __tmp = this->rdbuf()->sgetc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + } + else + { + if (this->_S_eof(__tmp)) + { + this->clear(); + this->setstate(ios_base::eofbit); + } + } + return __tmp; +} + + +template +__BIS_int_type__ +basic_istream<_CharT, _Traits>::get() +{ + typename _Traits::int_type __tmp = _Traits::eof(); + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + _STLP_TRY { + __tmp = this->rdbuf()->sbumpc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + + if (!this->_S_eof(__tmp)) + this->_M_gcount = 1; + } + + if (_M_gcount == 0) + this->setstate(ios_base::eofbit | ios_base::failbit); + + return __tmp; +} + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::get(_CharT& __c) +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + typename _Traits::int_type __tmp = _Traits::eof(); + _STLP_TRY { + __tmp = this->rdbuf()->sbumpc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + + if (!this->_S_eof(__tmp)) { + this->_M_gcount = 1; + __c = _Traits::to_char_type(__tmp); + } + } + + if (this->_M_gcount == 0) + this->setstate(ios_base::eofbit | ios_base::failbit); + + return *this; +} + + + +// Read characters and discard them. The standard specifies a single +// function with two arguments, each with a default. We instead use +// three overloded functions, because it's possible to implement the +// first two more efficiently than the fully general third version. +template +basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::ignore() +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + int_type __c; + _STLP_TRY { + __c = this->rdbuf()->sbumpc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + return *this; + } + + if (!this->_S_eof(__c)) + this->_M_gcount = 1; + else + this->setstate(ios_base::eofbit); + } + + return *this; +} + +// Putback + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::putback(_CharT __c) { + this->_M_gcount = 0; + sentry __sentry(*this, _No_Skip_WS()); + + if (__sentry) { + typename _Traits::int_type __tmp = _Traits::eof(); + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); +// if (!__buf || this->_S_eof(__buf->sputbackc(__c))) + if (__buf) { + _STLP_TRY { + __tmp = __buf->sputbackc(__c); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + } + if (this->_S_eof(__tmp)) + this->setstate(ios_base::badbit); + } + else + this->setstate(ios_base::failbit); + + return *this; +} + +template +basic_istream<_CharT, _Traits>& basic_istream<_CharT, _Traits>::unget() { + this->_M_gcount = 0; + + sentry __sentry(*this, _No_Skip_WS()); + + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + // if (!__buf || _Traits::eq_int_type(__buf->sungetc(), _Traits::eof())) + if (__buf) { + _STLP_TRY { + _CharT __tmp; + __tmp = __buf->sungetc(); +#ifdef __SYMBIAN32__ + if (__tmp == (_CharT)-1) //chek for eof +#else + if (this->_S_eof(__tmp)) +#endif + this->setstate(ios_base::badbit); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + } else + this->setstate(ios_base::badbit); + } + else + this->setstate(ios_base::failbit); + + return *this; +} + +// Positioning and buffer control. + +template +int basic_istream<_CharT, _Traits>::sync() { + sentry __sentry(*this, _No_Skip_WS()); + + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + if (__buf) { + if (__buf->pubsync() == -1) { + this->setstate(ios_base::badbit); + return -1; + } + else + return 0; + } + else + return -1; +} + +template +__BIS_pos_type__ +basic_istream<_CharT, _Traits>::tellg() { +#ifndef __SYMBIAN32__ + sentry __sentry(*this, _No_Skip_WS()); +#endif + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + return (__buf && !this->fail()) ? __buf->pubseekoff(0, ios_base::cur, ios_base::in) + : pos_type(-1); +} + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::seekg(pos_type __pos) { +#ifndef __SYMBIAN32__ + sentry __sentry(*this, _No_Skip_WS()); +#endif + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + if (!this->fail() && __buf) + { + pos_type pos = __buf->pubseekpos(__pos, ios_base::in); + if(pos == pos_type(off_type(-1))) + this->setstate(ios_base::failbit); + } + return *this; +} + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::seekg(off_type __off, ios_base::seekdir __dir) +{ +#ifndef __SYMBIAN32__ + sentry __sentry(*this, _No_Skip_WS()); +#endif + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + if (!this->fail() && __buf) + { + + pos_type pos = __buf->pubseekoff(__off, __dir, ios_base::in); + if(pos == pos_type(off_type(-1))) + this->setstate(ios_base::failbit); + } + return *this; +} + +// Formatted input of characters and character arrays. + +template +void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT& __c) +{ +// typename _Traits::int_type __tmp = _Traits::eof(); + + sentry __sentry(*this); // Skip whitespace. + + if (__sentry) { + typename _Traits::int_type __tmp = _Traits::eof(); + + _STLP_TRY { + __tmp = this->rdbuf()->sbumpc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + return; + } + + if (!this->_S_eof(__tmp)) + __c = _Traits::to_char_type(__tmp); + else + this->setstate(ios_base::eofbit | ios_base::failbit); + } +} + + +//--------------------------------------------------------------------------- +// istream's helper functions. + +// A generic function for unbuffered input. We stop when we reach EOF, +// or when we have extracted _Num characters, or when the function object +// __is_delim return true. In the last case, it extracts the character +// for which __is_delim is true, if and only if __extract_delim is true. +// It appends a null character to the end of the string; this means that +// it may store up to _Num + 1 characters. +// +// __is_getline governs two corner cases: reading _Num characters without +// encountering delim or eof (in which case failbit is set if __is_getline +// is true); and reading _Num characters where the _Num+1'st character is +// eof (in which case eofbit is set if __is_getline is true). +// +// It is assumed that __is_delim never throws. +// +// Return value is the number of characters extracted, including the +// delimiter if it is extracted. Note that the number of characaters +// extracted isn't necessarily the same as the number stored. + +template < class _CharT, class _Traits, class _Is_Delim> +streamsize _STLP_CALL +_M_read_unbuffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf, + streamsize _Num, _CharT* __s, + _Is_Delim __is_delim, + bool __extract_delim, bool __append_null, + bool __is_getline) +{ + streamsize __n = 0; + ios_base::iostate __status = 0; + + typedef typename basic_istream<_CharT, _Traits>::int_type int_type; + // The operations that can potentially throw are sbumpc, snextc, and sgetc. + _STLP_TRY { +# if 0 + int_type __c = __buf->sgetc(); + while (true) { + if (__that->_S_eof(__c)) { + if (__n < _Num || __is_getline) + __status |= ios_base::eofbit; + break; + } + + else if (__is_delim(__c)) { + if (__extract_delim) { // Extract and discard current character. + __buf->sbumpc(); + ++__n; + } + break; + } + + else if (__n == _Num) { + if (__is_getline) + __status |= ios_base::failbit; + break; + } + + *__s++ = _Traits::to_char_type(__c); + ++__n; + __c = __buf->snextc(); + } +# else +// int_type __c = __buf->sbumpc(); // __buf->sgetc(); +while (true) { + +int_type __c = __buf->sbumpc(); // sschwarz + +if (__that->_S_eof(__c)) { +if (__n < _Num || __is_getline) +__status |= ios_base::eofbit; +break; +} + +else if (__is_delim(__c)) { +if (__extract_delim) { // Extract and discard current character. +// __buf->sbumpc(); +++__n; +} +break; +} + +else { // regular character + +*__s++ = _Traits::to_char_type(__c); +++__n; + +} + +if (__n == _Num) { +if (__is_getline) // didn't find delimiter as one of the _Num chars +__status |= ios_base::failbit; +break; +} + +// *__s++ = _Traits::to_char_type(__c); +// ++__n; + +} + +# endif + + } + _STLP_CATCH_ALL { + __that->_M_handle_exception(ios_base::badbit); + *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT); + return __n; + } + + if (__append_null) + *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT); + if (__status) + __that->setstate(__status); // This might throw. + return __n; +} + +// Much like _M_read_unbuffered, but with one additional function object: +// __scan_delim(first, last) returns the first pointer p in [first, last) +// such that __is_delim(p) is true. + +template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim> +streamsize _STLP_CALL +_M_read_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __buf, + streamsize _Num, _CharT* __s, + _Is_Delim __is_delim, _Scan_Delim __scan_delim, + bool __extract_delim, bool __append_null, + bool __is_getline) +{ + streamsize __n = 0; + ios_base::iostate __status = 0; + bool __done = false; + + _STLP_TRY { + while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) { + const _CharT* __first = __buf->_M_gptr(); + const _CharT* __last = __buf->_M_egptr(); + ptrdiff_t __request = _Num - __n; + + const _CharT* __p = __scan_delim(__first, __last); + ptrdiff_t __chunk = (min) (ptrdiff_t(__p - __first), __request); + _Traits::copy(__s, __first, __chunk); + __s += __chunk; + __n += __chunk; + __buf->_M_gbump((int)__chunk); + + // We terminated by finding delim. + if (__p != __last && __p - __first <= __request) { + if (__extract_delim) { + __n += 1; + __buf->_M_gbump(1); + } + __done = true; + } + + // We terminated by reading all the characters we were asked for. + else if(__n == _Num) { + + // Find out if we have reached eof. This matters for getline. + if (__is_getline) { + if (__chunk == __last - __first) { + if (__that->_S_eof(__buf->sgetc())) + __status |= ios_base::eofbit; + } + else + __status |= ios_base::failbit; + } + __done = true; + } + + // The buffer contained fewer than _Num - __n characters. Either we're + // at eof, or we should refill the buffer and try again. + else { + if (__that->_S_eof(__buf->sgetc())) { + __status |= ios_base::eofbit; + __done = true; + } + } + } // Close the while loop. + } + _STLP_CATCH_ALL { + __that->_M_handle_exception(ios_base::badbit); + __done = true; + } + + if (__done) { + if (__append_null) + *__s = _STLP_DEFAULT_CONSTRUCTED(_CharT); + if (__status != 0) + __that->setstate(__status); // This might throw. + return __n; + } + + // If execution has reached this point, then we have an empty buffer but + // we have not reached eof. What that means is that the streambuf has + // decided to switch from buffered to unbuffered input. We switch to + // to _M_read_unbuffered. + + return __n + _M_read_unbuffered(__that, __buf, _Num - __n, __s, __is_delim, + __extract_delim,__append_null,__is_getline); +} + + + + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::get(_CharT* __s, streamsize __n, + _CharT __delim) { + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + if (__n > 0) { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + + if (__buf->egptr() != __buf->gptr()) + this->_M_gcount = + _M_read_buffered(this, __buf, __n - 1, __s, + _Eq_char_bound<_Traits>(__delim), + _Scan_for_char_val<_Traits>(__delim), + false, true, false); + else + this->_M_gcount = + _M_read_unbuffered(this, __buf, __n - 1, __s, + _Eq_char_bound<_Traits>(__delim), + false, true, false); + } + } +#ifdef __SYMBIAN32__ + *(__s + this->_M_gcount) = _STLP_DEFAULT_CONSTRUCTED(_CharT); +#endif //__SYMBIAN32__ + if (this->_M_gcount == 0) + this->setstate(ios_base::failbit); + + return *this; +} + +// Getline is essentially identical to get, except that it extracts +// the delimiter. +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::getline(_CharT* __s, streamsize __n, + _CharT __delim) { + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + if (__n > 0) { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + this->_M_gcount = __buf->egptr() != __buf->gptr() + ? _M_read_buffered(this, __buf, __n - 1, __s, + _Eq_char_bound<_Traits>(__delim), + _Scan_for_char_val<_Traits>(__delim), + true, true, true) + : _M_read_unbuffered(this, __buf, __n - 1, __s, + _Eq_char_bound<_Traits>(__delim), + true, true, true); + } + } + + if (this->_M_gcount == 0) + this->setstate(ios_base::failbit); + + return *this; +} + +// Read n characters. We don't look for any delimiter, and we don't +// put in a terminating null character. +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::read(char_type* __s, streamsize __n) +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry && !this->eof()) { + basic_streambuf<_CharT, _Traits>*__buf = this->rdbuf(); + if (__buf->gptr() != __buf->egptr()) + _M_gcount + = _M_read_buffered(this, __buf, __n, __s, + _Constant_unary_fun(false), + _Project2nd(), + false, false, false); + else + _M_gcount + = _M_read_unbuffered(this, __buf, __n, __s, + _Constant_unary_fun(false), + false, false, false); + } + else + this->setstate(ios_base::failbit); + + if (this->eof()) + this->setstate(ios_base::eofbit | ios_base::failbit); + + return *this; +} + + +// Read n or fewer characters. We don't look for any delimiter, and +// we don't put in a terminating null character. +template +streamsize +basic_istream<_CharT, _Traits>::readsome(char_type* __s, streamsize __nmax) +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry && !this->eof() && __nmax >= 0) { + + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + streamsize __avail = __buf->in_avail(); + + // fbp : isn't full-blown setstate required here ? + if (__avail == -1) + this->_M_setstate_nothrow(ios_base::eofbit); + + else if (__avail != 0) { + + if (__buf->gptr() != __buf->egptr()) + _M_gcount + = _M_read_buffered(this, __buf, (min) (__avail, __nmax), __s, + _Constant_unary_fun(false), + _Project2nd(), + false, false, false); + else + _M_gcount + = _M_read_unbuffered(this, __buf, (min) (__avail, __nmax), __s, + _Constant_unary_fun(false), + false, false, false); + } + } + else { + // fbp : changed so that failbit is set only there, to pass Dietmar's test + if (this->eof()) + this->setstate(ios_base::eofbit | ios_base::failbit); + else + { + if (__nmax < 0) + { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + streamsize __avail = __buf->in_avail(); + if(__avail == -1) + this->setstate(ios_base::eofbit); + } + else + this->setstate(ios_base::failbit); + } + } + + // if (this->eof()) + // this->setstate(ios_base::eofbit | ios_base::failbit); + + return _M_gcount; +} + +template +void basic_istream<_CharT, _Traits>::_M_formatted_get(_CharT* __s) +{ + sentry __sentry(*this); // Skip whitespace. + + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + streamsize __nmax = this->width() > 0 + ? this->width() - 1 + : (numeric_limits::max)() / sizeof(_CharT) - 1; + + streamsize __n = __buf->gptr() != __buf->egptr() + ? _M_read_buffered(this, __buf, __nmax, __s, + _Is_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), + _Scan_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), + false, true, false) + : _M_read_unbuffered(this, __buf, __nmax, __s, + _Is_wspace_null<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), + false, true, false); + if (__n == 0) + this->setstate(ios_base::failbit); + } + this->width(0); +} + +// A generic unbuffered function for ignoring characters. We stop +// when we reach EOF, or when the function object __is_delim returns +// true. In the last case, it extracts the character for which +// __is_delim is true, if and only if __extract_delim is true. + +template < class _CharT, class _Traits, class _Is_Delim> +void _STLP_CALL +_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that, + basic_streambuf<_CharT, _Traits>* __buf, + _Is_Delim __is_delim, + bool __extract_delim, bool __set_failbit) +{ + bool __done = false; + ios_base::iostate __status = 0; + typedef typename basic_istream<_CharT, _Traits>::int_type int_type; + + _STLP_TRY { +#ifdef __SYMBIAN32__ + int_type __c = __buf->sgetc(); + do { + + if (__that->_S_eof(__c)) { + __done = true; + __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit + : ios_base::eofbit; + break; + } + + else if (__is_delim(__c)) { + __done = true; + if (__extract_delim) + __buf->snextc(); + break; + + } + __c = __buf->snextc(); + } while(!__done); +#else + while (!__done) { + int_type __c = __buf->sbumpc(); + + if (__that->_S_eof(__c)) { + __done = true; + __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit + : ios_base::eofbit; + } + + else if (__is_delim(__c)) { + __done = true; + if (!__extract_delim) + if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c)))) + __status |= ios_base::failbit; + } + } +#endif + } + _STLP_CATCH_ALL { + __that->_M_handle_exception(ios_base::badbit); + } + + __that->setstate(__status); +} + +// A generic buffered function for ignoring characters. Much like +// _M_ignore_unbuffered, but with one additional function object: +// __scan_delim(first, last) returns the first pointer p in [first, +// last) such that __is_delim(p) is true. + +template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim> +void _STLP_CALL +_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that, + basic_streambuf<_CharT, _Traits>* __buf, + _Is_Delim __is_delim, _Scan_Delim __scan_delim, + bool __extract_delim, bool __set_failbit) +{ + bool __at_eof = false; + bool __found_delim = false; + + _STLP_TRY { + while (__buf->_M_egptr() != __buf->_M_gptr() && !__at_eof && !__found_delim) { + const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr()); + __buf->_M_gbump((int)(__p - __buf->_M_gptr())); + + if (__p != __buf->_M_egptr()) { // We found delim, so we're done. + if (__extract_delim) + __buf->_M_gbump(1); + __found_delim = true; + } + + else // No delim. Try to refil the buffer. + __at_eof = __that->_S_eof(__buf->sgetc()); + } // Close the while loop. + } + _STLP_CATCH_ALL { + __that->_M_handle_exception(ios_base::badbit); + return; + } + + if (__at_eof) { + __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit + : ios_base::eofbit); + return; + } + if (__found_delim) + return; + + // If execution has reached this point, then we have an empty buffer but + // we have not reached eof. What that means is that the streambuf has + // decided to switch from a buffered to an unbuffered mode. We switch + // to _M_ignore_unbuffered. + _M_ignore_unbuffered(__that, __buf, __is_delim, __extract_delim, __set_failbit); +} + +// Overloaded versions of _M_ignore_unbuffered and _M_ignore_unbuffered +// with an explicit count _Num. Return value is the number of +// characters extracted. +// +// The function object __max_chars takes two arguments, _Num and __n +// (the latter being the number of characters we have already read), +// and returns the maximum number of characters to read from the buffer. +// We parameterize _M_ignore_buffered so that we can use it for both +// bounded and unbounded input; for the former the function object should +// be minus<>, and for the latter it should return a constant maximum value. + +template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim> +streamsize _STLP_CALL +_M_ignore_unbuffered(basic_istream<_CharT, _Traits>* __that, + basic_streambuf<_CharT, _Traits>* __buf, + streamsize _Num, _Max_Chars __max_chars, + _Is_Delim __is_delim, + bool __extract_delim, bool __set_failbit) +{ + streamsize __n = 0; + ios_base::iostate __status = 0; + typedef typename basic_istream<_CharT, _Traits>::int_type int_type; + + _STLP_TRY { + while (__max_chars(_Num, __n) > 0) { + int_type __c = __buf->sbumpc(); + + if (__that->_S_eof(__c)) { + __status |= __set_failbit ? ios_base::eofbit | ios_base::failbit + : ios_base::eofbit; + break; + } + + else if (__is_delim(__c)) { + if (__extract_delim) + ++__n; + else if (__that->_S_eof(__buf->sputbackc(_Traits::to_char_type(__c)))) + __status |= ios_base::failbit; + + break; + } + // fbp : added counter increment to pass Dietmar's test + ++__n; + } + } + _STLP_CATCH_ALL { + __that->_M_handle_exception(ios_base::badbit); + } + + if (__status) + __that->setstate(__status); // This might throw. + return __n; +} + +template < class _CharT, class _Traits, class _Max_Chars, class _Is_Delim, class _Scan_Delim> +streamsize _STLP_CALL +_M_ignore_buffered(basic_istream<_CharT, _Traits>* __that, + basic_streambuf<_CharT, _Traits>* __buf, + streamsize _Num, + _Max_Chars __max_chars, + _Is_Delim __is_delim, _Scan_Delim __scan_delim, + bool __extract_delim, bool __set_failbit) +{ + streamsize __n = 0; + bool __at_eof = false; + bool __done = false; + + _STLP_TRY { + while (__buf->_M_egptr() != __buf->_M_gptr() && !__done) { + ptrdiff_t __avail = __buf->_M_egptr() - __buf->_M_gptr(); + streamsize __m = __max_chars(_Num, __n); + + if (__avail >= __m) { // We have more characters than we need. + const _CharT* __last = __buf->_M_gptr() + __m; + const _CharT* __p = __scan_delim(__buf->_M_gptr(), __last); + ptrdiff_t __chunk = __p - __buf->_M_gptr(); + __n += __chunk; + __buf->_M_gbump((int)__chunk); + + if (__extract_delim && __p != __last) { + __n += 1; + __buf->_M_gbump(1); + } + + __done = true; + } + + else { + const _CharT* __p = __scan_delim(__buf->_M_gptr(), __buf->_M_egptr()); + ptrdiff_t __chunk = __p - __buf->_M_gptr(); + __n += __chunk; + __buf->_M_gbump((int)__chunk); + + if (__p != __buf->_M_egptr()) { // We found delim. + if (__extract_delim) { + __n += 1; + __buf->_M_gbump(1); + } + + __done = true; + } + + // We didn't find delim. Try to refill the buffer. + else if (__that->_S_eof(__buf->sgetc())) { + __done = true; + __at_eof = true; + } + } + } // Close the while loop. + } + _STLP_CATCH_ALL { + __that->_M_handle_exception(ios_base::badbit); + return __n; + } + + if (__at_eof) + __that->setstate(__set_failbit ? ios_base::eofbit | ios_base::failbit + : ios_base::eofbit); + + if (__done) + return __n; + + // If execution has reached this point, then we have an empty buffer but + // we have not reached eof. What that means is that the streambuf has + // decided to switch from buffered to unbuffered input. We switch to + // to _M_ignore_unbuffered. + + return __n + _M_ignore_unbuffered( __that, __buf, _Num, __max_chars, + __is_delim, __extract_delim, __set_failbit); +} + + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::ignore(streamsize __n) +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + typedef _Constant_unary_fun _Const_bool; + typedef _Constant_binary_fun + _Const_streamsize; + const streamsize __maxss = (numeric_limits::max)(); + + if (__n == (numeric_limits::max)()) { + if (__buf->gptr() != __buf->egptr()) + _M_gcount + = _M_ignore_buffered(this, __buf, + __maxss, _Const_streamsize(__maxss), + _Const_bool(false), + _Project2nd(), + false, false); + else + _M_gcount = _M_ignore_unbuffered(this, __buf, + __maxss, _Const_streamsize(__maxss), + _Const_bool(false), false, false); + } + else { + if (__buf->gptr() != __buf->egptr()) + _M_gcount + = _M_ignore_buffered(this, __buf, + __n, minus(), + _Const_bool(false), + _Project2nd(), + false, false); + else + _M_gcount = _M_ignore_unbuffered(this, __buf, __n, minus(), + _Const_bool(false), false, false); + } + } + + return *this; +} + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits>::ignore(streamsize __n, int_type __delim) +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + typedef _Constant_unary_fun _Const_bool; + typedef _Constant_binary_fun + _Const_streamsize; + const streamsize __maxss = (numeric_limits::max)(); + + if (__n == (numeric_limits::max)()) { + if (__buf->gptr() != __buf->egptr()) + _M_gcount = _M_ignore_buffered(this, __buf, + __maxss, _Const_streamsize(__maxss), + _Eq_int_bound<_Traits>(__delim), + _Scan_for_int_val<_Traits>(__delim), + true, false); + else + _M_gcount = _M_ignore_unbuffered(this, __buf, + __maxss, _Const_streamsize(__maxss), + _Eq_int_bound<_Traits>(__delim), + true, false); + } + else { + if (__buf->gptr() != __buf->egptr()) + _M_gcount = _M_ignore_buffered(this, __buf, + __n, minus(), + _Eq_int_bound<_Traits>( + __delim), + _Scan_for_int_val<_Traits>(__delim), + true, false); + else + _M_gcount = _M_ignore_unbuffered(this, __buf, __n, minus(), + _Eq_int_bound<_Traits>(__delim), + true, false); + } + } + + return *this; +} + +// This member function does not construct a sentry object, because +// it is called from sentry's constructor. +template +void basic_istream<_CharT, _Traits>::_M_skip_whitespace(bool __set_failbit) +{ + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + if (!__buf) + this->setstate(ios_base::badbit); + else if (__buf->gptr() != __buf->egptr()) + _M_ignore_buffered(this, __buf, + _Is_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), + _Scan_for_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), + false, __set_failbit); + else + _M_ignore_unbuffered(this, __buf, + _Is_not_wspace<_Traits>((const ctype<_CharT>*)this->_M_ctype_facet()), + false, __set_failbit); +} + + +// This is a very simple loop that reads characters from __src and puts +// them into __dest. It looks complicated because of the (standard- +// mandated) exception handling policy. +// +// We stop when we get an exception, when we fail to insert into the +// output streambuf, or when __is_delim is true. + +template < class _CharT, class _Traits, class _Is_Delim> +streamsize _STLP_CALL +_M_copy_unbuffered( basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src, + basic_streambuf<_CharT, _Traits>* __dest, + _Is_Delim __is_delim, + bool __extract_delim, bool __rethrow) +{ + streamsize __extracted = 0; + ios_base::iostate __status = 0; + typedef typename basic_istream<_CharT, _Traits>::int_type int_type; + int_type __c; + + _STLP_TRY { +#ifdef __SYMBIAN32__ + __c = __src->sgetc(); + for(;; __c = __src->snextc()){ + + // If we failed to get a character, then quit. + if (__that->_S_eof(__c)) { + __status |= ios_base::eofbit; + break; + } + // If it's the delimiter, then quit. + else if (__is_delim(__c)) { + if (!__extract_delim) + __status |= ios_base::failbit; + break; + } + + else { + + // Try to put the character in the output streambuf. + _STLP_TRY { + if (!__that->_S_eof(__dest->sputc(__c))) + ++__extracted; + else + break; + } + _STLP_CATCH_ALL { + __status |= ios_base::failbit; + break; + } + + } + + } /* while (true) */ +#else + while (true) { + + // Get a character. If there's an exception, catch and (maybe) rethrow it. + __c = __src->sbumpc(); + + // If we failed to get a character, then quit. + if (__that->_S_eof(__c)) { + __status |= ios_base::eofbit; + break; + } + // If it's the delimiter, then quit. + else if (__is_delim(__c)) { + if (!__extract_delim && !__pushback(__src, _Traits::to_char_type(__c))) + __status |= ios_base::failbit; + break; + } + + else { + + // Try to put the character in the output streambuf. + bool __failed = false; + _STLP_TRY { + if (!__that->_S_eof(__dest->sputc(__c))) + ++__extracted; + else + __failed = true; + } + _STLP_CATCH_ALL { + __failed = true; + } + + // If we failed to put the character in the output streambuf, then + // try to push it back to the input streambuf. + if (__failed && !__pushback(__src, _Traits::to_char_type(__c))) + __status |= ios_base::failbit; + + // fbp : avoiding infinite loop in io-27-6-1-2-3.exp + if (__failed) + break; + } + + } /* while (true) */ +#endif + } + // fbp : this try/catch moved here in reasonable assumption + // __is_delim never throw (__pushback is guaranteed not to) + _STLP_CATCH_ALL { + // See 27.6.1.2.3, paragraph 13. + if (__rethrow && __extracted == 0) + __that->_M_handle_exception(ios_base::failbit); + } + __that->setstate(__status); + return __extracted; +} + +// Buffered copying from one streambuf to another. We copy the characters +// in chunks, rather than one at a time. We still have to worry about all +// of the error conditions we checked in _M_copy_unbuffered, plus one more: +// the streambuf might decide to switch from a buffered to an unbuffered mode. + +template < class _CharT, class _Traits, class _Is_Delim, class _Scan_Delim> +streamsize _STLP_CALL +_M_copy_buffered(basic_istream<_CharT, _Traits>* __that, basic_streambuf<_CharT, _Traits>* __src, + basic_streambuf<_CharT, _Traits>* __dest, + _Scan_Delim __scan_delim, _Is_Delim __is_delim, + bool __extract_delim, bool __rethrow) +{ + streamsize __extracted = 0; + ios_base::iostate __status = 0; + typedef typename basic_istream<_CharT, _Traits>::int_type int_type; + int_type __c = _Traits::eof(); + _CharT* __first = __src->_M_gptr(); + ptrdiff_t __avail = __src->_M_egptr() - __first; + // fbp : introduced to move catch/try blocks out of the loop + bool __do_handle_exceptions; + + _STLP_TRY { + while (true) { + __do_handle_exceptions = false ; + const _CharT* __last = __scan_delim(__first, __src->_M_egptr()); + + // Try to copy the entire input buffer to the output buffer. + streamsize __n = __dest->sputn(__first, __extract_delim && __last != __src->_M_egptr() + ? (__last - __first) + 1 + : (__last - __first)); + __src->_M_gbump((int)__n); + __extracted += __n; + + // from this on, catch() will call _M_handle_exceptions() + __do_handle_exceptions = true; + + if (__n < __avail) // We found the delimiter, or else failed to + break; // copy some characters. + + __c = __src->sgetc(); + + // Three possibilities: we succeeded in refilling the buffer, or + // we got EOF, or the streambuf has switched to unbuffered mode. + __first = __src->_M_gptr(); + __avail = __src->_M_egptr() - __first; + + if (__avail > 0) + {} // dwa 1/16/00 -- suppress a Metrowerks warning + else if (__that->_S_eof(__c)) { + __status |= ios_base::eofbit; + break; + } + else + return __extracted + _M_copy_unbuffered(__that, __src, __dest, __is_delim, + __extract_delim, __rethrow); + } /* while */ + } + + _STLP_CATCH_ALL { + // See 27.6.1.2.3, paragraph 13. + if (__rethrow && __do_handle_exceptions && __extracted == 0) + __that->_M_handle_exception(ios_base::failbit); + } + + if (__status) + __that->setstate(__status); // This might throw. + return __extracted; +} + + + +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits> + ::get(basic_streambuf<_CharT, _Traits>& __dest, _CharT __delim) +{ + sentry __sentry(*this, _No_Skip_WS()); + this->_M_gcount = 0; + + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __src = this->rdbuf(); + + if (__src) + this->_M_gcount = __src->egptr() != __src->gptr() + ? _M_copy_buffered(this, __src, &__dest, + _Scan_for_char_val<_Traits>(__delim), + _Eq_char_bound<_Traits>(__delim), + false, false) + : _M_copy_unbuffered(this, __src, &__dest, + _Eq_char_bound<_Traits>(__delim), + false, false); + } + + if (this->_M_gcount == 0) + this->setstate(ios_base::failbit); + + return *this; +} + +// Copying characters into a streambuf. +template +basic_istream<_CharT, _Traits>& +basic_istream<_CharT, _Traits> + ::operator>>(basic_streambuf<_CharT, _Traits>* __dest) +{ + streamsize __n = 0; + typedef typename basic_istream<_CharT, _Traits>::sentry _Sentry; + _Sentry __sentry(*this); + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __src = this->rdbuf(); + if (__src && __dest) + __n = __src->egptr() != __src->gptr() + ? _M_copy_buffered(this, __src, __dest, + _Project2nd(), + _Constant_unary_fun(false), + false, true) + : _M_copy_unbuffered(this, __src, __dest, + _Constant_unary_fun(false), + false, true); + } + + if (__n == 0) + this->setstate(ios_base::failbit); + + return *this; +} + +// ---------------------------------------------------------------- +// basic_iostream<> class +// ---------------------------------------------------------------- + +template +_STLP_EXP_DECLSPEC basic_iostream<_CharT, _Traits> + ::basic_iostream(basic_streambuf<_CharT, _Traits>* __buf) + : basic_ios<_CharT, _Traits>(), + basic_istream<_CharT, _Traits>(__buf), + basic_ostream<_CharT, _Traits>(__buf) +{ + this->init(__buf); +} + +template +_STLP_EXP_DECLSPEC basic_iostream<_CharT, _Traits>::~basic_iostream() +{} + + +template +_STLP_EXP_DECLSPEC basic_istream<_CharT, _Traits> + ::basic_istream(basic_streambuf<_CharT, _Traits>* __buf) : + basic_ios<_CharT, _Traits>(), _M_gcount(0) { + this->init(__buf); + } + +template +_STLP_EXP_DECLSPEC basic_istream<_CharT, _Traits> + ::~basic_istream() {} + + + +_STLP_END_NAMESPACE + +# undef __BIS_int_type__ +# undef __BIS_pos_type__ +# undef __BIS_off_type__ + +# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ + +#endif /* _STLP_ISTREAM_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_istream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_istream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,342 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_INTERNAL_ISTREAM_H +#define _STLP_INTERNAL_ISTREAM_H + +// this block is included by _ostream.h, we include it here to lower #include level +# if defined (_STLP_HAS_WCHAR_T) && !defined (_STLP_CWCHAR_H) +# include +# endif + +# ifndef _STLP_INTERNAL_IOS_H +# include // For basic_ios<>. Includes . +# endif + +#ifndef _STLP_INTERNAL_OSTREAM_H +# include // Needed as a base class of basic_iostream. +#endif + +#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H +# include +#endif + +#include // Helper functions that allow char traits + // to be used as function objects. +_STLP_BEGIN_NAMESPACE + +template +ios_base::iostate _STLP_CALL +_M_get_num(basic_istream<_CharT, _Traits>& __that, _Number& __val); + +#if defined (_STLP_USE_TEMPLATE_EXPORT) +template +class _Isentry; +#endif + +struct _No_Skip_WS {}; // Dummy class used by sentry. + +template +bool _M_init_skip(basic_istream<_CharT, _Traits>& __is); +template +bool _M_init_noskip(basic_istream<_CharT, _Traits>& __is); + +//---------------------------------------------------------------------- +// Class basic_istream, a class that performs formatted input through +// a stream buffer. + +// The second template parameter, _Traits, defaults to char_traits<_CharT>. +// The default is declared in header , and it isn't declared here +// because C++ language rules do not allow it to be declared twice. + +template +class basic_istream : virtual public basic_ios<_CharT, _Traits> { +public: + // Types + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_istream<_CharT, _Traits> _Self; + + typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&); + typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&); + typedef _Self& (_STLP_CALL *__istream_fn)(_Self&); + +public: // Constructor and destructor. + _STLP_DECLSPEC explicit basic_istream(basic_streambuf<_CharT, _Traits>* __buf); + _STLP_DECLSPEC ~basic_istream(); + +public: // Nested sentry class. + +public: // Hooks for manipulators. The arguments are + // function pointers. + _Self& operator>> (__istream_fn __f) { return __f(*this); } + _Self& operator>> (__ios_fn __f) { __f(*this); return *this; } + _Self& operator>> (__ios_base_fn __f) { __f(*this); return *this; } + +public: // Formatted input of numbers. + _Self& operator>> (short& __val) { + long __lval = __val; + unsigned short __uval; + _M_get_num(*this, __lval); + __val = __STATIC_CAST(short, __lval); + __uval = __lval; + // check if we lose digits + // if ((__val != __lval) && ((unsigned short)__val != __lval)) + if ((__val != __lval) && ((long)__uval != __lval)) + this->setstate(ios_base::failbit); + return *this; + } + _Self& operator>> (int& __val) { + long __lval = __val; + unsigned int __uval; + _M_get_num(*this, __lval); + __val = __lval; + __uval = __lval; + // check if we lose digits + // if ((__val != __lval) && ((unsigned int)__val != __lval)) + if ((__val != __lval) && ((long)__uval != __lval)) + this->setstate(ios_base::failbit); + return *this; + } + _Self& operator>> (unsigned short& __val) { _M_get_num(*this, __val); return *this; } + _Self& operator>> (unsigned int& __val) { _M_get_num(*this, __val); return *this; } + _Self& operator>> (long& __val) { _M_get_num(*this, __val); return *this; } + _Self& operator>> (unsigned long& __val) { _M_get_num(*this, __val); return *this; } +#ifdef _STLP_LONG_LONG + _Self& operator>> (_STLP_LONG_LONG& __val) { _M_get_num(*this, __val); return *this; } + _Self& operator>> (unsigned _STLP_LONG_LONG& __val) { _M_get_num(*this, __val); return *this; } +#endif + _Self& operator>> (float& __val) { _M_get_num(*this, __val); return *this; } + _Self& operator>> (double& __val) { _M_get_num(*this, __val); return *this; } +# ifndef _STLP_NO_LONG_DOUBLE + _Self& operator>> (long double& __val) { _M_get_num(*this, __val); return *this; } +# endif +# ifndef _STLP_NO_BOOL + _Self& operator>> (bool& __val) { _M_get_num(*this, __val); return *this; } +# endif + _Self& operator>> (void*& __val) { _M_get_num(*this, __val); return *this; } + +public: // Copying characters into a streambuf. + _Self& operator>>(basic_streambuf<_CharT, _Traits>*); + +public: // Unformatted input. + streamsize gcount() const { return _M_gcount; } + int_type peek(); + +public: // get() for single characters + int_type get(); + _Self& get(char_type& __c); + +public: // get() for character arrays. + _Self& get(char_type* __s, streamsize __n, char_type __delim); + _Self& get(char_type* __s, streamsize __n) + { return get(__s, __n, this->widen('\n')); } + +public: // get() for streambufs + _Self& get(basic_streambuf<_CharT, _Traits>& __buf, + char_type __delim); + _Self& get(basic_streambuf<_CharT, _Traits>& __buf) + { return get(__buf, this->widen('\n')); } + +public: // getline() + _Self& getline(char_type* __s, streamsize __n, char_type delim); + _Self& getline(char_type* __s, streamsize __n) + { return getline(__s, __n, this->widen('\n')); } + +public: // read(), readsome(), ignore() + _Self& ignore(); + _Self& ignore(streamsize __n); +#if (defined (_STLP_MSVC) && _STLP_MSVC < 1200) + inline +#endif + _Self& ignore(streamsize __n, int_type __delim); + + _Self& read(char_type* __s, streamsize __n); + streamsize readsome(char_type* __s, streamsize __n); + +public: // putback + _Self& putback(char_type __c); + _Self& unget(); + +public: // Positioning and buffer control. + int sync(); + + pos_type tellg(); + _Self& seekg(pos_type __pos); + _Self& seekg(off_type, ios_base::seekdir); + +public: // Helper functions for non-member extractors. + void _M_formatted_get(_CharT& __c); + void _M_formatted_get(_CharT* __s); + void _M_skip_whitespace(bool __set_failbit); + +private: // Number of characters extracted by the + streamsize _M_gcount; // most recent unformatted input function. + +public: + +#if defined (_STLP_USE_TEMPLATE_EXPORT) + // If we are using DLL specs, we have not to use inner classes + // end class declaration here + typedef _Isentry<_CharT, _Traits> sentry; +}; +# define sentry _Isentry +template +class _Isentry { + typedef _Isentry<_CharT, _Traits> _Self; +# else + class sentry { + typedef sentry _Self; +#endif + + private: + const bool _M_ok; + // basic_streambuf<_CharT, _Traits>* _M_buf; + + public: + typedef _Traits traits_type; + + explicit sentry(basic_istream<_CharT, _Traits>& __is, + bool __noskipws = false) : + _M_ok((__noskipws || !(__is.flags() & ios_base::skipws)) ? _M_init_noskip(__is) : _M_init_skip(__is) ) + /* , _M_buf(__is.rdbuf()) */ + {} + + // Calling this constructor is the same as calling the previous one with + // __noskipws = true, except that it doesn't require a runtime test. + sentry(basic_istream<_CharT, _Traits>& __is, _No_Skip_WS) : /* _M_buf(__is.rdbuf()), */ + _M_ok(_M_init_noskip(__is)) {} + + ~sentry() {} + + operator bool() const { return _M_ok; } + + private: // Disable assignment and copy constructor. + sentry(const _Self&) : _M_ok(false) {} + void operator=(const _Self&) {} + }; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +# undef sentry +# else + // close basic_istream class definition here +}; +# endif + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS _Isentry >; +_STLP_EXPORT_TEMPLATE_CLASS basic_istream >; +# if ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS _Isentry >; +_STLP_EXPORT_TEMPLATE_CLASS basic_istream >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +// Non-member character and string extractor functions. + +template +inline basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __stl_in, _CharT& __c) { + __stl_in._M_formatted_get(__c); + return __stl_in; +} + +template +inline basic_istream& _STLP_CALL +operator>>(basic_istream& __stl_in, unsigned char& __c) { + __stl_in._M_formatted_get(__REINTERPRET_CAST(char&,__c)); + return __stl_in; +} + +template +inline basic_istream& _STLP_CALL +operator>>(basic_istream& __stl_in, signed char& __c) { + __stl_in._M_formatted_get(__REINTERPRET_CAST(char&,__c)); + return __stl_in; +} + +template +inline basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __stl_in, _CharT* __s) { + __stl_in._M_formatted_get(__s); + return __stl_in; +} + +template +inline basic_istream& _STLP_CALL +operator>>(basic_istream& __stl_in, unsigned char* __s) { + __stl_in._M_formatted_get(__REINTERPRET_CAST(char*,__s)); + return __stl_in; +} + +template +inline basic_istream& _STLP_CALL +operator>>(basic_istream& __stl_in, signed char* __s) { + __stl_in._M_formatted_get(__REINTERPRET_CAST(char*,__s)); + return __stl_in; +} + +//---------------------------------------------------------------------- +// istream manipulator. +template +basic_istream<_CharT, _Traits>& _STLP_CALL +ws(basic_istream<_CharT, _Traits>& __is); + +//---------------------------------------------------------------------- +// Class iostream. + +template +class basic_iostream + : public basic_istream<_CharT, _Traits>, + public basic_ostream<_CharT, _Traits> +{ +public: + typedef basic_ios<_CharT, _Traits> _Basic_ios; + + _STLP_DECLSPEC explicit basic_iostream(basic_streambuf<_CharT, _Traits>* __buf); + _STLP_DECLSPEC virtual ~basic_iostream(); +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_iostream >; +# if ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_iostream >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +template +basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& __is) +{ + return __is.rdbuf(); +} + +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_ISTREAM_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_istreambuf_iterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_istreambuf_iterator.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,169 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H +#define _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +#ifndef _STLP_INTERNAL_STREAMBUF +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// defined in _istream.h +template +extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_istreambuf(basic_istream<_CharT, _Traits>& ) ; + +// We do not read any characters until operator* is called. operator* calls sgetc +// unless the iterator is unchanged from the last call in which case a cached value is +// used. Calls to operator++ use sbumpc. + +template +class istreambuf_iterator +{ +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + typedef input_iterator_tag iterator_category; + typedef _CharT value_type; + typedef typename _Traits::off_type difference_type; + typedef const _CharT* pointer; + typedef const _CharT& reference; + +public: + istreambuf_iterator(streambuf_type* __p = 0) { this->_M_init(__p); } + // istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) { this->_M_init(_M_get_istreambuf(__is)); } + inline istreambuf_iterator(basic_istream<_CharT, _Traits>& __is); + + char_type operator*() const { this->_M_getc(); return _M_c; } + istreambuf_iterator<_CharT, _Traits>& operator++() { this->_M_bumpc(); return *this; } + istreambuf_iterator<_CharT, _Traits> operator++(int); + + bool equal(const istreambuf_iterator<_CharT, _Traits>& __i) const { + if (this->_M_buf) + this->_M_getc(); + if (__i._M_buf) + __i._M_getc(); + return this->_M_eof == __i._M_eof; + } + +private: + void _M_init(streambuf_type* __p) { + _M_buf = __p; + _M_eof = !__p; + // _M_is_initialized = _M_eof; + _M_have_c = false; + } + + void _M_getc() const { + if (_M_have_c) + return; + int_type __c = _M_buf->sgetc(); +# if !defined (_STLP_NEED_MUTABLE) /* && ! defined (__SUNPRO_CC) */ + _M_c = traits_type::to_char_type(__c); + _M_eof = traits_type::eq_int_type(__c, traits_type::eof()); + _M_have_c = true; +# else + typedef istreambuf_iterator<_CharT,_Traits> _Self; + _Self* __that = __CONST_CAST(_Self*, this); + __that->_M_c = __STATIC_CAST(_CharT, traits_type::to_char_type(__c)); + __that->_M_eof = traits_type::eq_int_type(__c, traits_type::eof()); + __that->_M_have_c = true; +# endif + } + + int_type _M_bumpc() { + int_type ch = _M_buf->sbumpc(); + _M_have_c = false; + return ch; + } + +private: + streambuf_type* _M_buf; + mutable _CharT _M_c; + mutable unsigned char _M_eof; + mutable unsigned char _M_have_c; +}; + +template +inline istreambuf_iterator<_CharT, _Traits>::istreambuf_iterator(basic_istream<_CharT, _Traits>& __is) +{ this->_M_init(_M_get_istreambuf(__is)); } + +template +inline bool _STLP_CALL operator==(const istreambuf_iterator<_CharT, _Traits>& __x, + const istreambuf_iterator<_CharT, _Traits>& __y) { + return __x.equal(__y); +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool _STLP_CALL operator!=(const istreambuf_iterator<_CharT, _Traits>& __x, + const istreambuf_iterator<_CharT, _Traits>& __y) { + return !__x.equal(__y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator >; +# if defined (INSTANTIATE_WIDE_STREAMS) +_STLP_EXPORT_TEMPLATE_CLASS istreambuf_iterator >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template +inline input_iterator_tag _STLP_CALL iterator_category(const istreambuf_iterator<_CharT, _Traits>&) { return input_iterator_tag(); } +template +inline streamoff* _STLP_CALL +distance_type(const istreambuf_iterator<_CharT, _Traits>&) { return (streamoff*)0; } +template +inline _CharT* _STLP_CALL value_type(const istreambuf_iterator<_CharT, _Traits>&) { return (_CharT*)0; } +# endif + +template +istreambuf_iterator<_CharT, _Traits> +istreambuf_iterator<_CharT, _Traits>::operator++(int) { + istreambuf_iterator<_CharT, _Traits> __tmp = *this; + __tmp._M_c = this->_M_bumpc(); + __tmp._M_have_c = true; + this->_M_have_c = false; + return __tmp; +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_iterator_base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_iterator_base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,463 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +#define _STLP_INTERNAL_ITERATOR_BASE_H + +#ifndef _STLP_CSTDDEF +# include +#endif + +# if defined (_STLP_IMPORT_VENDOR_CSTD) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) +_STLP_BEGIN_NAMESPACE +using namespace _STLP_VENDOR_CSTD; +_STLP_END_NAMESPACE +#endif /* _STLP_IMPORT_VENDOR_CSTD */ + +#ifndef __TYPE_TRAITS_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +struct input_iterator_tag {}; +struct output_iterator_tag {}; +struct forward_iterator_tag : public input_iterator_tag {}; +struct bidirectional_iterator_tag : public forward_iterator_tag {}; +struct random_access_iterator_tag : public bidirectional_iterator_tag {}; + + +template +struct iterator { + typedef _Category iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; + typedef _Pointer pointer; + typedef _Reference reference; +}; +_STLP_TEMPLATE_NULL +struct iterator { + typedef output_iterator_tag iterator_category; +#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; +#endif +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +# define _STLP_ITERATOR_CATEGORY(_It, _Tp) iterator_category(_It) +# define _STLP_DISTANCE_TYPE(_It, _Tp) distance_type(_It) +# define _STLP_VALUE_TYPE(_It, _Tp) value_type(_It) +# else +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION +# define _STLP_VALUE_TYPE(_It, _Tp) (typename iterator_traits< _Tp >::value_type*)0 +# define _STLP_DISTANCE_TYPE(_It, _Tp) (typename iterator_traits< _Tp >::difference_type*)0 +# if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || ( defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__) +# define _STLP_ITERATOR_CATEGORY(_It, _Tp) iterator_traits< _Tp >::iterator_category() +# else +# define _STLP_ITERATOR_CATEGORY(_It, _Tp) typename iterator_traits< _Tp >::iterator_category() +# endif +# else +# define _STLP_ITERATOR_CATEGORY(_It, _Tp) __iterator_category(_It, _IsPtrType<_Tp>::_Ret()) +# define _STLP_DISTANCE_TYPE(_It, _Tp) (ptrdiff_t*)0 +# define _STLP_VALUE_TYPE(_It, _Tp) __value_type(_It, _IsPtrType<_Tp>::_Ret() ) +# endif +# endif + +template +struct iterator_traits { + typedef typename _Iterator::iterator_category iterator_category; + typedef typename _Iterator::value_type value_type; + typedef typename _Iterator::difference_type difference_type; + typedef typename _Iterator::pointer pointer; + typedef typename _Iterator::reference reference; +}; + + +# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && ! defined (__SUNPRO_CC) +# define _STLP_DIFFERENCE_TYPE(_Iterator) typename iterator_traits<_Iterator>::difference_type +# else +# define _STLP_DIFFERENCE_TYPE(_Iterator) ptrdiff_t +# endif + +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + +// fbp : this order keeps gcc happy +template +struct iterator_traits { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; +}; + +template +struct iterator_traits<_Tp*> { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef _Tp& reference; +}; + +# if defined (__BORLANDC__) +template +struct iterator_traits<_Tp* const> { + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef ptrdiff_t difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; +}; +# endif + +# endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + + +# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) \ + || (defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) && ! defined (_STLP_NO_ARROW_OPERATOR)) +# define _STLP_POINTERS_SPECIALIZE( _TpP ) +# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(operator*()); } +# else +# include +# endif + +# ifndef _STLP_USE_OLD_HP_ITERATOR_QUERIES +// The overloaded functions iterator_category, distance_type, and +// value_type are not part of the C++ standard. (They have been +// replaced by struct iterator_traits.) They are included for +// backward compatibility with the HP STL. +// We introduce internal names for these functions. + +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + +template +inline typename iterator_traits<_Iter>::iterator_category __iterator_category(const _Iter&) { + typedef typename iterator_traits<_Iter>::iterator_category _Category; + return _Category(); +} + +template +inline typename iterator_traits<_Iter>::difference_type* __distance_type(const _Iter&) { + typedef typename iterator_traits<_Iter>::difference_type _diff_type; + return __STATIC_CAST(_diff_type*,0); +} + +template +inline typename iterator_traits<_Iter>::value_type* __value_type(const _Iter&) { + typedef typename iterator_traits<_Iter>::value_type _value_type; + return __STATIC_CAST(_value_type*,0); +} + +# else + +template +inline random_access_iterator_tag +__iterator_category(const _Iter&, const __true_type&) { + return random_access_iterator_tag(); +} + +template +inline _STLP_TYPENAME_ON_RETURN_TYPE iterator_traits<_Iter>::iterator_category +__iterator_category(const _Iter&, const __false_type&) { + typedef typename iterator_traits<_Iter>::iterator_category _Category; + return _Category(); +} + + +template +inline ptrdiff_t* _STLP_CALL __distance_type(const _Iter&) { return (ptrdiff_t*)(0); } + +template +inline _STLP_TYPENAME_ON_RETURN_TYPE iterator_traits<_Iter>::value_type* +__value_type(const _Iter&, const __false_type&) { + typedef typename iterator_traits<_Iter>::value_type _value_type; + return __STATIC_CAST(_value_type*,0); +} + +template +inline _Tp* +__value_type(const _Tp*, const __true_type&) { + return __STATIC_CAST(_Tp*, 0); +} + +# endif + +#else /* old queries */ +template +inline _Category _STLP_CALL iterator_category(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return _Category(); } +template +inline _Tp* _STLP_CALL value_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return (_Tp*)(0); } +template +inline _Distance* _STLP_CALL distance_type(const iterator<_Category,_Tp,_Distance,_Pointer,_Reference>&) { return (_Distance*)(0); } +template +inline random_access_iterator_tag _STLP_CALL iterator_category(const _Tp*) { return random_access_iterator_tag(); } +template +inline _Tp* _STLP_CALL value_type(const _Tp*) { return (_Tp*)(0); } +template +inline ptrdiff_t* _STLP_CALL distance_type(const _Tp*) { return (ptrdiff_t*)(0); } +#endif /* _STLP_USE_OLD_HP_ITERATOR_QUERIES */ + +# if ! defined (_STLP_NO_ANACHRONISMS) +// The base classes input_iterator, output_iterator, forward_iterator, +// bidirectional_iterator, and random_access_iterator are not part of +// the C++ standard. (They have been replaced by struct iterator.) +// They are included for backward compatibility with the HP STL. +template struct input_iterator : + public iterator {}; +struct output_iterator : public iterator {}; +template struct forward_iterator : + public iterator {}; +template struct bidirectional_iterator : + public iterator {}; +template struct random_access_iterator : + public iterator {}; + +# if defined (_STLP_BASE_MATCH_BUG) && defined (_STLP_USE_OLD_HP_ITERATOR_QUERIES) +template +inline input_iterator_tag _STLP_CALL +iterator_category(const input_iterator<_Tp, _Distance>&) { return input_iterator_tag(); } +inline output_iterator_tag _STLP_CALL +iterator_category(const output_iterator&) { return output_iterator_tag(); } +template +inline forward_iterator_tag _STLP_CALL +iterator_category(const forward_iterator<_Tp, _Distance>&) { return forward_iterator_tag(); } +template +inline bidirectional_iterator_tag _STLP_CALL +iterator_category(const bidirectional_iterator<_Tp, _Distance>&) { return bidirectional_iterator_tag(); } +template +inline random_access_iterator_tag _STLP_CALL +iterator_category(const random_access_iterator<_Tp, _Distance>&) { return random_access_iterator_tag(); } +template +inline _Tp* _STLP_CALL value_type(const input_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } +template +inline _Tp* _STLP_CALL value_type(const forward_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } +template +inline _Tp* _STLP_CALL value_type(const bidirectional_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } +template +inline _Tp* _STLP_CALL value_type(const random_access_iterator<_Tp, _Distance>&) { return (_Tp*)(0); } +template +inline _Distance* _STLP_CALL distance_type(const input_iterator<_Tp, _Distance>&) { return (_Distance*)(0); } +template +inline _Distance* _STLP_CALL distance_type(const forward_iterator<_Tp, _Distance>&) { return (_Distance*)(0); } +template +inline _Distance* _STLP_CALL distance_type(const bidirectional_iterator<_Tp, _Distance>&) { return (_Distance*)(0);} +template +inline _Distance* _STLP_CALL distance_type(const random_access_iterator<_Tp, _Distance>&) { return (_Distance*)(0); } +# endif /* BASE_MATCH */ + +#endif /* _STLP_NO_ANACHRONISMS */ + +template +inline void _STLP_CALL __distance(const _InputIterator& __first, const _InputIterator& __last, + _Distance& __n, const input_iterator_tag &) { + _InputIterator __it(__first); + while (__it != __last) { ++__it; ++__n; } +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline void _STLP_CALL __distance(const _ForwardIterator& __first, const _ForwardIterator& __last, + _Distance& __n, const forward_iterator_tag &) { + _ForwardIterator __it(__first); + while (__it != __last) { ++__first; ++__n; } +} + +template +_STLP_INLINE_LOOP void _STLP_CALL __distance(const _BidirectionalIterator& __first, + const _BidirectionalIterator& __last, + _Distance& __n, const bidirectional_iterator_tag &) { + _BidirectionalIterator __it(__first); + while (__it != __last) { ++__it; ++__n; } +} +# endif + +template +inline void _STLP_CALL __distance(const _RandomAccessIterator& __first, + const _RandomAccessIterator& __last, + _Distance& __n, const random_access_iterator_tag &) { + __n += __last - __first; +} + +#ifndef _STLP_NO_ANACHRONISMS +template +inline void _STLP_CALL distance(const _InputIterator& __first, + const _InputIterator& __last, _Distance& __n) { + __distance(__first, __last, __n, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); +} +#endif + +template +inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL +__distance(const _InputIterator& __first, const _InputIterator& __last, const input_iterator_tag &) { + _STLP_DIFFERENCE_TYPE(_InputIterator) __n = 0; + _InputIterator __it(__first); + while (__it != __last) { + ++__it; ++__n; + } + return __n; +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline _STLP_DIFFERENCE_TYPE(_ForwardIterator) _STLP_CALL +__distance(const _ForwardIterator& __first, const _ForwardIterator& __last, + const forward_iterator_tag &) +{ + _STLP_DIFFERENCE_TYPE(_ForwardIterator) __n = 0; + _ForwardIterator __it(__first); + while (__it != __last) { + ++__it; ++__n; + } + return __n; +} + +template +_STLP_INLINE_LOOP _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) _STLP_CALL +__distance(const _BidirectionalIterator& __first, + const _BidirectionalIterator& __last, + const bidirectional_iterator_tag &) { + _STLP_DIFFERENCE_TYPE(_BidirectionalIterator) __n = 0; + _BidirectionalIterator __it(__first); + while (__it != __last) { + ++__it; ++__n; + } + return __n; +} +# endif + +template +inline _STLP_DIFFERENCE_TYPE(_RandomAccessIterator) _STLP_CALL +__distance(const _RandomAccessIterator& __first, const _RandomAccessIterator& __last, + const random_access_iterator_tag &) { + return __last - __first; +} + +template +inline _STLP_DIFFERENCE_TYPE(_InputIterator) _STLP_CALL +distance(const _InputIterator& __first, const _InputIterator& __last) { + return __distance(__first, __last, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); +} + + +// fbp: those are being used for iterator/const_iterator definitions everywhere +template +struct _Nonconst_traits; + +template +struct _Const_traits { + typedef _Tp value_type; + typedef const _Tp& reference; + typedef const _Tp* pointer; + typedef _Nonconst_traits<_Tp> _Non_const_traits; +}; + +template +struct _Nonconst_traits { + typedef _Tp value_type; + typedef _Tp& reference; + typedef _Tp* pointer; + typedef _Nonconst_traits<_Tp> _Non_const_traits; +}; + +# if defined (_STLP_BASE_TYPEDEF_BUG) +// this workaround is needed for SunPro 4.0.1 +template +struct __cnst_traits_aux : private _Traits +{ + typedef typename _Traits::value_type value_type; +}; +# define __TRAITS_VALUE_TYPE(_Traits) __cnst_traits_aux<_Traits>::value_type +# else +# define __TRAITS_VALUE_TYPE(_Traits) _Traits::value_type +# endif + +# if defined (_STLP_MSVC) +// MSVC specific +template +inline void _STLP_CALL _Distance(_InputIterator __first, + _InputIterator __last, _Dist& __n) { + __distance(__first, __last, __n, _STLP_ITERATOR_CATEGORY(__first, _InputIterator)); +} +# endif + +template +_STLP_INLINE_LOOP void _STLP_CALL __advance(_InputIter& __i, _Distance __n, const input_iterator_tag &) { + while (__n--) ++__i; +} + +// fbp : added output iterator tag variant +template +_STLP_INLINE_LOOP void _STLP_CALL __advance(_InputIter& __i, _Distance __n, const output_iterator_tag &) { + while (__n--) ++__i; +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +_STLP_INLINE_LOOP void _STLP_CALL __advance(_ForwardIterator& i, _Distance n, const forward_iterator_tag &) { + while (n--) ++i; +} +# endif + +template +_STLP_INLINE_LOOP void _STLP_CALL __advance(_BidirectionalIterator& __i, _Distance __n, + const bidirectional_iterator_tag &) { + if (__n > 0) + while (__n--) ++__i; + else + while (__n++) --__i; +} + +template +inline void _STLP_CALL __advance(_RandomAccessIterator& __i, _Distance __n, + const random_access_iterator_tag &) { + __i += __n; +} + +template +inline void _STLP_CALL advance(_InputIterator& __i, _Distance __n) { + __advance(__i, __n, _STLP_ITERATOR_CATEGORY(__i, _InputIterator)); +} + +_STLP_END_NAMESPACE + +# if defined (_STLP_DEBUG) && ! defined (_STLP_DEBUG_H) +# include +# endif + +#endif /* _STLP_INTERNAL_ITERATOR_BASE_H */ + + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_iterator_old.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_iterator_old.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,351 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_ITERATOR_OLD_H +#define _STLP_INTERNAL_ITERATOR_OLD_H + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES + +template +inline output_iterator_tag _STLP_CALL +iterator_category(const back_insert_iterator<_Container>&) { return output_iterator_tag(); } +template +inline output_iterator_tag _STLP_CALL +iterator_category(const front_insert_iterator<_Container>&) { return output_iterator_tag(); } +template +inline output_iterator_tag _STLP_CALL +iterator_category(const insert_iterator<_Container>&) { return output_iterator_tag(); } + +# endif + +# if defined (_STLP_MSVC50_COMPATIBILITY) +# define __Reference _Reference, class _Pointer +# define Reference__ _Reference, _Pointer +template +# else +# define __Reference _Reference +# define Reference__ _Reference +template +# endif +class reverse_bidirectional_iterator { + typedef reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, + Reference__, _Distance> _Self; + // friend inline bool operator== _STLP_NULL_TMPL_ARGS (const _Self& x, const _Self& y); +protected: + _BidirectionalIterator current; +public: + typedef bidirectional_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; +# if defined (_STLP_MSVC50_COMPATIBILITY) + typedef _Pointer pointer; +# else + typedef _Tp* pointer; +# endif + typedef _Reference reference; + + reverse_bidirectional_iterator() {} + explicit reverse_bidirectional_iterator(_BidirectionalIterator __x) + : current(__x) {} + _BidirectionalIterator base() const { return current; } + _Reference operator*() const { + _BidirectionalIterator __tmp = current; + return *--__tmp; + } +# if !(defined _STLP_NO_ARROW_OPERATOR) + _STLP_DEFINE_ARROW_OPERATOR +# endif + _Self& operator++() { + --current; + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + --current; + return __tmp; + } + _Self& operator--() { + ++current; + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + ++current; + return __tmp; + } +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template +inline bidirectional_iterator_tag _STLP_CALL +iterator_category(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) +{ return bidirectional_iterator_tag(); } +template +inline _Tp* _STLP_CALL +value_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) +{ return (_Tp*) 0; } +template +inline _Distance* _STLP_CALL +distance_type(const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, Reference__, _Distance>&) +{ return (_Distance*) 0; } +#endif + +template +inline bool _STLP_CALL operator==( + const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_bidirectional_iterator<_BidirectionalIterator, _Tp, + Reference__, _Distance>& __y) +{ + return __x.base() == __y.base(); +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool _STLP_CALL operator!=( + const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __x, + const reverse_bidirectional_iterator<_BiIter, _Tp, Reference__, _Distance>& __y) +{ + return !(__x == __y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +#if ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) + +// This is the old version of reverse_iterator, as found in the original +// HP STL. It does not use partial specialization. + +template = 0x2405) \ + || defined(__MRC__) || (defined(__SC__) && !defined(__DMC__)) //*ty 03/22/2001 - give the default to the secont param under MPW. + // I believe giving the default will cause any harm even though the 2nd type parameter + // still have to be provided for T* type iterators. + __DFL_TMPL_PARAM(_Tp,iterator_traits<_RandomAccessIterator>::value_type), +# else + class _Tp, +#endif + __DFL_TMPL_PARAM(_Reference,_Tp&), +# if defined (_STLP_MSVC50_COMPATIBILITY) + __DFL_TMPL_PARAM(_Pointer, _Tp*), +# endif + __DFL_TYPE_PARAM(_Distance,ptrdiff_t)> +class reverse_iterator { + typedef reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance> + _Self; +protected: + _RandomAccessIterator __current; +public: + typedef random_access_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Distance difference_type; +# if defined (_STLP_MSVC50_COMPATIBILITY) + typedef _Pointer pointer; +# else + typedef _Tp* pointer; +# endif + typedef _Reference reference; + + reverse_iterator() {} + reverse_iterator(const _Self& __x) : __current(__x.base()) {} + explicit reverse_iterator(_RandomAccessIterator __x) : __current(__x) {} + _Self& operator=(const _Self& __x) {__current = __x.base(); return *this; } + + _RandomAccessIterator base() const { return __current; } + _Reference operator*() const { return *(__current - (difference_type)1); } + +# if !(defined _STLP_NO_ARROW_OPERATOR) + _STLP_DEFINE_ARROW_OPERATOR +# endif + + _Self& operator++() { + --__current; + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + --__current; + return __tmp; + } + _Self& operator--() { + ++__current; + return *this; + } + _Self operator--(int) { + _Self __tmp = *this; + ++__current; + return __tmp; + } + _Self operator+(_Distance __n) const { + return _Self(__current - __n); + } + _Self& operator+=(_Distance __n) { + __current -= __n; + return *this; + } + _Self operator-(_Distance __n) const { + return _Self(__current + __n); + } + _Self& operator-=(_Distance __n) { + __current += __n; + return *this; + } + _Reference operator[](_Distance __n) const { return *(*this + __n); } +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template +inline random_access_iterator_tag _STLP_CALL +iterator_category(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&) +{ return random_access_iterator_tag(); } +template +inline _Tp* _STLP_CALL value_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&) +{ return (_Tp*) 0; } +template +inline _Distance* _STLP_CALL +distance_type(const reverse_iterator<_RandomAccessIterator, _Tp, Reference__, _Distance>&) +{ return (_Distance*) 0; } +#endif + +template +inline bool _STLP_CALL +operator==(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) +{ + return __x.base() == __y.base(); +} + +template +inline bool _STLP_CALL +operator<(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) +{ + return __y.base() < __x.base(); +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool _STLP_CALL +operator!=(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) { + return !(__x == __y); +} + +template +inline bool _STLP_CALL +operator>(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) { + return __y < __x; +} + +template +inline bool _STLP_CALL +operator<=(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) { + return !(__y < __x); +} + +template +inline bool _STLP_CALL +operator>=(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) { + return !(__x < __y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +template +inline _Distance _STLP_CALL +operator-(const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __y) +{ + return __y.base() - __x.base(); +} + +template +inline reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance> _STLP_CALL +operator+(_Distance __n, + const reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>& __x) +{ + return reverse_iterator<_RandomAccessIterator, _Tp, + Reference__, _Distance>(__x.base() - __n); +} + +#endif /* ! defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_limits.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_limits.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,270 @@ +/* + * Copyright (c) 1998,1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +# if !defined (_STLP_LIMITS_C) +# define _STLP_LIMITS_C + +#ifndef _STLP_INTERNAL_LIMITS_H +# include +#endif + +//========================================================== +// numeric_limits static members +//========================================================== + +_STLP_BEGIN_NAMESPACE + +# if ! defined ( _STLP_STATIC_CONST_INIT_BUG) + +# define __declare_numeric_base_member(__type, __mem, _Init) \ +template \ + const __type _Numeric_limits_base<__number>:: __mem + +__declare_numeric_base_member(bool, is_specialized, false); +__declare_numeric_base_member(int, digits, 0); +__declare_numeric_base_member(int, digits10, 0); +__declare_numeric_base_member(bool, is_signed, false); +__declare_numeric_base_member(bool, is_integer, false); +__declare_numeric_base_member(bool, is_exact, false); +__declare_numeric_base_member(int, radix, 0); +__declare_numeric_base_member(int, min_exponent, 0); +__declare_numeric_base_member(int, max_exponent, 0); +__declare_numeric_base_member(int, min_exponent10, 0); +__declare_numeric_base_member(int, max_exponent10, 0); +__declare_numeric_base_member(bool, has_infinity, false); +__declare_numeric_base_member(bool, has_quiet_NaN, false); +__declare_numeric_base_member(bool, has_signaling_NaN, false); +__declare_numeric_base_member(float_denorm_style, has_denorm, denorm_absent); +__declare_numeric_base_member(bool, has_denorm_loss, false); +__declare_numeric_base_member(bool, is_iec559, false); +__declare_numeric_base_member(bool, is_bounded, false); +__declare_numeric_base_member(bool, is_modulo, false); +__declare_numeric_base_member(bool, traps, false); +__declare_numeric_base_member(bool, tinyness_before, false); +__declare_numeric_base_member(float_round_style, round_style, round_toward_zero); + +# undef __declare_numeric_base_member + +# define __declare_integer_limits_member(__type, __mem, _Init) \ +template \ + const __type _Integer_limits<_Int, __imin, __imax, __idigits, __ismod>:: __mem + +__declare_integer_limits_member(bool, is_specialized, true); +__declare_integer_limits_member(int, digits, (__idigits < 0) ? \ + ((int)((sizeof(_Int) * (CHAR_BIT))) - ((__imin == 0) ? 0 : 1)) \ + : (__idigits) ); +__declare_integer_limits_member(int, digits10, (int)(301UL * digits) /1000); +__declare_integer_limits_member(bool, is_signed, __imin != 0); +__declare_integer_limits_member(bool, is_integer, true); +__declare_integer_limits_member(bool, is_exact, true); +__declare_integer_limits_member(int, radix, 2); +__declare_integer_limits_member(bool, is_bounded, true); +__declare_integer_limits_member(bool, is_modulo, true); + +# define __declare_float_limits_member(__type, __mem, _Init) \ +template \ +const __type _Floating_limits< __number, __Digits, __Digits10, \ + __MinExp, __MaxExp, __MinExp10, __MaxExp10, \ + __IsIEC559, __RoundStyle>::\ + __mem + +__declare_float_limits_member(bool, is_specialized, true); +__declare_float_limits_member(int, digits, __Digits); +__declare_float_limits_member(int, digits10, __Digits10); +__declare_float_limits_member(bool, is_signed, true); +__declare_float_limits_member(int, radix, FLT_RADIX); +__declare_float_limits_member(int, min_exponent, __MinExp); +__declare_float_limits_member(int, max_exponent, __MaxExp); +__declare_float_limits_member(int, min_exponent10, __MinExp10); +__declare_float_limits_member(int, max_exponent10, __MaxExp10); +__declare_float_limits_member(bool, has_infinity, true); +__declare_float_limits_member(bool, has_quiet_NaN, true); +__declare_float_limits_member(bool, has_signaling_NaN, true); +__declare_float_limits_member(float_denorm_style, has_denorm, denorm_indeterminate); +__declare_float_limits_member(bool, has_denorm_loss, false); +__declare_float_limits_member(bool, is_iec559, __IsIEC559); +__declare_float_limits_member(bool, is_bounded, true); +__declare_float_limits_member(bool, traps, true); +__declare_float_limits_member(bool, tinyness_before, false); +__declare_float_limits_member(float_round_style, round_style, __RoundStyle); + +# endif /* _STLP_STATIC_CONST_INIT_BUG */ + + +# ifdef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION + +# if defined(_STLP_BIG_ENDIAN) +# if defined(__OS400__) +# define _STLP_FLOAT_INF_REP { 0x7f80, 0 } +# define _STLP_FLOAT_QNAN_REP { 0xffc0, 0 } +# define _STLP_FLOAT_SNAN_REP { 0xff80, 0 } +# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 } +# define _STLP_DOUBLE_QNAN_REP { 0xfff8, 0, 0, 0 } +# define _STLP_DOUBLE_SNAN_REP { 0xfff0, 0, 0, 0 } +# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 } +# define _STLP_LDOUBLE_QNAN_REP { 0xfff8, 0, 0, 0, 0, 0, 0, 0 } +# define _STLP_LDOUBLE_SNAN_REP { 0xfff0, 0, 0, 0, 0, 0, 0, 0 } +# else +# define _STLP_FLOAT_INF_REP { 0x7f80, 0 } +# define _STLP_FLOAT_SNAN_REP { 0x7f81, 0 } +# define _STLP_FLOAT_QNAN_REP { 0x7fc1, 0 } +# define _STLP_DOUBLE_INF_REP { 0x7ff0, 0, 0, 0 } +# define _STLP_DOUBLE_QNAN_REP { 0x7ff1, 0, 0, 0 } +# define _STLP_DOUBLE_SNAN_REP { 0x7ff9, 0, 0, 0 } +# define _STLP_LDOUBLE_INF_REP { 0x7ff0, 0, 0, 0, 0, 0, 0, 0 } +# define _STLP_LDOUBLE_SNAN_REP { 0x7ff1, 0, 0, 0, 0, 0, 0, 0 } +# define _STLP_LDOUBLE_QNAN_REP { 0x7ff9, 0, 0, 0, 0, 0, 0, 0 } +# endif + +# elif defined (_STLP_LITTLE_ENDIAN) + +# if 0 /* defined(_STLP_MSVC) || defined(__linux__) */ +// some IA-32 platform ?? +# define _STLP_FLOAT_INF_REP { 0, 0x7f80 } +# define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 } +# define _STLP_FLOAT_SNAN_REP { 0, 0xff80 } + +# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 } +# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 } +# define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0xfff0 } +# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 } // ???? +# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 } // ???? +# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF0, 0 } // ???? + +# elif defined(__DECCXX) + +# define _STLP_FLOAT_INF_REP { 0, 0x7f80 } +# define _STLP_FLOAT_QNAN_REP { 0, 0xffc0 } +# define _STLP_FLOAT_SNAN_REP { 0x5555, 0x7f85 } + +# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 } +# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0xfff8 } +# define _STLP_DOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x7ff5 } + +# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0, 0, 0, 0, 0x7fff } +# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0, 0, 0, 0x8000, 0xffff } +# define _STLP_LDOUBLE_SNAN_REP { 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x5555, 0x7fff} +# else +# define _STLP_FLOAT_INF_REP { 0, 0x7f80 } +# define _STLP_FLOAT_QNAN_REP { 0, 0x7fa0 } +# define _STLP_FLOAT_SNAN_REP { 0, 0x7fc0 } +# define _STLP_DOUBLE_INF_REP { 0, 0, 0, 0x7ff0 } +# define _STLP_DOUBLE_QNAN_REP { 0, 0, 0, 0x7ff4 } +# define _STLP_DOUBLE_SNAN_REP { 0, 0, 0, 0x7ff8 } +# if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) +# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x7FF0, 0 } // ???? +# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xFFF8, 0 } // ???? +# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xFFF8, 0 } +# else +# define _STLP_LDOUBLE_INF_REP { 0, 0, 0, 0x8000, 0x7fff } +# define _STLP_LDOUBLE_QNAN_REP { 0, 0, 0, 0xa000, 0x7fff } +# define _STLP_LDOUBLE_SNAN_REP { 0, 0, 0, 0xc000, 0x7fff } +# endif +# endif +#else +/* This is an architecture we don't know how to handle. Return some +obviously wrong values. */ +# define _STLP_FLOAT_INF_REP { 0, 0 } +# define _STLP_FLOAT_QNAN_REP { 0, 0 } +# define _STLP_FLOAT_SNAN_REP { 0, 0 } +# define _STLP_DOUBLE_INF_REP { 0, 0 } +# define _STLP_DOUBLE_QNAN_REP { 0, 0 } +# define _STLP_DOUBLE_SNAN_REP { 0, 0 } +# define _STLP_LDOUBLE_INF_REP { 0 } +# define _STLP_LDOUBLE_QNAN_REP { 0 } +# define _STLP_LDOUBLE_SNAN_REP { 0 } + +#endif + +#if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +# ifndef _STLP_NO_LONG_DOUBLE +template +const _L_rep _LimG<__dummy>::_L_inf = {_STLP_LDOUBLE_INF_REP}; +template +const _L_rep _LimG<__dummy>::_L_qNaN = {_STLP_LDOUBLE_QNAN_REP}; +template +const _L_rep _LimG<__dummy>::_L_sNaN = {_STLP_LDOUBLE_SNAN_REP}; +# endif +template +const _D_rep _LimG<__dummy>::_D_inf = {_STLP_DOUBLE_INF_REP}; +template +const _D_rep _LimG<__dummy>::_D_qNaN = {_STLP_DOUBLE_QNAN_REP}; +template +const _D_rep _LimG<__dummy>::_D_sNaN = {_STLP_DOUBLE_SNAN_REP}; +template +const _F_rep _LimG<__dummy>::_F_inf = {_STLP_FLOAT_INF_REP}; +template +const _F_rep _LimG<__dummy>::_F_qNaN = {_STLP_FLOAT_QNAN_REP}; +template +const _F_rep _LimG<__dummy>::_F_sNaN = {_STLP_FLOAT_SNAN_REP}; + +#else + +__DECLARE_INSTANCE( const _F_rep, + _LimG::_F_inf, = _STLP_FLOAT_INF_REP); +__DECLARE_INSTANCE( const _F_rep, + _LimG::_F_qNaN, = _STLP_FLOAT_QNAN_REP); +__DECLARE_INSTANCE( const _F_rep, + _LimG::_F_sNaN, = _STLP_FLOAT_SNAN_REP); +__DECLARE_INSTANCE( const _D_rep, + _LimG::_D_inf, = _STLP_DOUBLE_INF_REP); +__DECLARE_INSTANCE( const _D_rep, + _LimG::_D_qNaN, = _STLP_DOUBLE_QNAN_REP); +__DECLARE_INSTANCE( const _D_rep, + _LimG::_D_sNaN, = _STLP_DOUBLE_SNAN_REP); +# ifndef _STLP_NO_LONG_DOUBLE +__DECLARE_INSTANCE( const _L_rep, + _LimG::_L_inf, = _STLP_LDOUBLE_INF_REP); +__DECLARE_INSTANCE( const _L_rep, + _LimG::_L_qNaN, = _STLP_LDOUBLE_QNAN_REP); +__DECLARE_INSTANCE( const _L_rep, + _LimG::_L_sNaN, = _STLP_LDOUBLE_SNAN_REP); +# endif + +#endif /* STATIC_DATA */ + +# endif /* _STLP_EXPOSE_GLOBALS_IMPLEMENTATION */ + +# undef __declare_integer_limits_member +# undef __declare_float_limits_member +# undef __HACK_ILIMITS +# undef __HACK_NOTHING +# undef __declare_int_members +# undef __declare_float_members +# undef _STLP_LIMITS_MIN_TYPE +# undef _STLP_LIMITS_MAX_TYPE + +# undef _STLP_FLOAT_INF_REP +# undef _STLP_FLOAT_QNAN_REP +# undef _STLP_FLOAT_SNAN_REP +# undef _STLP_DOUBLE_INF_REP +# undef _STLP_DOUBLE_QNAN_REP +# undef _STLP_DOUBLE_SNAN_REP +# undef _STLP_LDOUBLE_INF_REP +# undef _STLP_LDOUBLE_QNAN_REP +# undef _STLP_LDOUBLE_SNAN_REP + +_STLP_END_NAMESPACE + + +#endif /* _STLP_LIMITS_C_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_list.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_list.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,252 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_LIST_C +#define _STLP_LIST_C + +#ifndef _STLP_INTERNAL_LIST_H +# include +#endif + +#if defined (__WATCOMC__) || defined (_STLP_USE_TRAP_LEAVE) +#include +#endif + +# undef list +# define list __WORKAROUND_DBG_RENAME(list) + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +template +void _STLP_CALL +_List_global<_Dummy>::_Transfer(_List_node_base* __position, + _List_node_base* __first, _List_node_base* __last) { + if (__position != __last) { + // Remove [first, last) from its old position. + ((_Node*) (__last->_M_prev))->_M_next = __position; + ((_Node*) (__first->_M_prev))->_M_next = __last; + ((_Node*) (__position->_M_prev))->_M_next = __first; + + // Splice [first, last) into its new position. + _Node* __tmp = (_Node*) (__position->_M_prev); + __position->_M_prev = __last->_M_prev; + __last->_M_prev = __first->_M_prev; + __first->_M_prev = __tmp; + } +} + +#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */ + + +template +void +_List_base<_Tp,_Alloc>::clear() +{ + _List_node<_Tp>* __cur = this->_M_node._M_data; + if (!__cur) + return; + __cur = (_List_node<_Tp>*)__cur->_M_next; + while (__cur != this->_M_node._M_data) { + _List_node<_Tp>* __tmp = __cur; + __cur = (_List_node<_Tp>*) __cur->_M_next; + _STLP_STD::_Destroy(&__tmp->_M_data); + this->_M_node.deallocate(__tmp, 1); + } + this->_M_node._M_data->_M_next = this->_M_node._M_data; + this->_M_node._M_data->_M_prev = this->_M_node._M_data; +} + +# if defined (_STLP_NESTED_TYPE_PARAM_BUG) +# define size_type size_t +# endif + +template +void list<_Tp, _Alloc>::resize(size_type __new_size, _Tp __x) +{ + iterator __i = begin(); + size_type __len = 0; + for ( ; __i != end() && __len < __new_size; ++__i, ++__len); + + if (__len == __new_size) + erase(__i, end()); + else // __i == end() + insert(end(), __new_size - __len, __x); +} + +template +list<_Tp, _Alloc>& list<_Tp, _Alloc>::operator=(const list<_Tp, _Alloc>& __x) +{ + if (this != &__x) { + iterator __first1 = begin(); + iterator __last1 = end(); + const_iterator __first2 = __x.begin(); + const_iterator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + *__first1++ = *__first2++; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); + } + return *this; +} + +template +void list<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { + iterator __i = begin(); + for ( ; __i != end() && __n > 0; ++__i, --__n) + *__i = __val; + if (__n > 0) + insert(end(), __n, __val); + else + erase(__i, end()); +} + +template +void _S_remove_if(list<_Tp, _Alloc>& __that, _Predicate __pred) { + typename list<_Tp, _Alloc>::iterator __first = __that.begin(); + typename list<_Tp, _Alloc>::iterator __last = __that.end(); + while (__first != __last) { + typename list<_Tp, _Alloc>::iterator __next = __first; + ++__next; + if (__pred(*__first)) __that.erase(__first); + __first = __next; + } +} + +template +void _S_unique(list<_Tp, _Alloc>& __that, _BinaryPredicate __binary_pred) { + typename list<_Tp, _Alloc>::iterator __first = __that.begin(); + typename list<_Tp, _Alloc>::iterator __last = __that.end(); + if (__first == __last) return; + typename list<_Tp, _Alloc>::iterator __next = __first; + while (++__next != __last) { + if (__binary_pred(*__first, *__next)) + __that.erase(__next); + else + __first = __next; + __next = __first; + } +} + +template +void _S_merge(list<_Tp, _Alloc>& __that, list<_Tp, _Alloc>& __x, + _StrictWeakOrdering __comp) { + typedef typename list<_Tp, _Alloc>::iterator _Literator; + _Literator __first1 = __that.begin(); + _Literator __last1 = __that.end(); + _Literator __first2 = __x.begin(); + _Literator __last2 = __x.end(); + while (__first1 != __last1 && __first2 != __last2) + if (__comp(*__first2, *__first1)) { + _Literator __next = __first2; + _List_global_inst::_Transfer(__first1._M_node, __first2._M_node, (++__next)._M_node); + __first2 = __next; + } + else + ++__first1; + if (__first2 != __last2) _List_global_inst::_Transfer(__last1._M_node, __first2._M_node, __last2._M_node); +} + +template +void _S_sort(list<_Tp, _Alloc>& __that, _StrictWeakOrdering __comp) { + // Do nothing if the list has length 0 or 1. + if (__that._M_node._M_data->_M_next != __that._M_node._M_data && + (__that._M_node._M_data->_M_next)->_M_next != __that._M_node._M_data) { + +#if !defined (__WATCOMC__) +#ifdef _STLP_USE_TRAP_LEAVE + typedef vector*, _Alloc> _TmpVec; + _TmpVec* __pTmp = new _TmpVec(); + _TmpVec& __counter = *__pTmp; + for (int i = 0; 1< 64; ++i) { + list<_Tp, _Alloc>* __pTmp2 = new list<_Tp, _Alloc>; + __counter.push_back (__pTmp2); + } + list<_Tp, _Alloc>* __pcarry = new list<_Tp, _Alloc>; + list<_Tp, _Alloc>& __carry = *__pcarry; +#else + list<_Tp, _Alloc> __counter[64]; + list<_Tp, _Alloc> __carry; +#endif +#else + list<_Tp, _Alloc> __carry; + __vector__, _Alloc> __counter(64); +#endif + int __fill = 0; +#ifdef _STLP_USE_TRAP_LEAVE + while (!__that.empty()) { + __carry.splice(__carry.begin(), __that, __that.begin()); + int __i = 0; + + while(__i < __fill && !__counter[__i]->empty()) { + _S_merge(*__counter[__i], __carry, __comp); + __carry.swap(*__counter[__i++]); + } + __carry.swap(*__counter[__i]); + if (__i == __fill) ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + _S_merge(*__counter[__i], *__counter[__i-1], __comp); + __that.swap(*__counter[__fill-1]); + + // those objects won't just go away + __counter.clear(); + CleanupStack::Pop(66); + } +# else + while (!__that.empty()) { + __carry.splice(__carry.begin(), __that, __that.begin()); + int __i = 0; + + while(__i < __fill && !__counter[__i].empty()) { + _S_merge(__counter[__i], __carry, __comp); + __carry.swap(__counter[__i++]); + } + __carry.swap(__counter[__i]); + if (__i == __fill) ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + _S_merge(__counter[__i], __counter[__i-1], __comp); + __that.swap(__counter[__fill-1]); + } +# endif + +} + +# undef list +# undef size_type + +_STLP_END_NAMESPACE + +#endif /* _STLP_LIST_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_locale.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_locale.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,259 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_LOCALE_H +#define _STLP_INTERNAL_LOCALE_H + +#ifndef _STLP_CSTDLIB +# include +#endif + +#ifndef _STLP_CWCHAR_H +# include +#endif + +#ifndef _STLP_INTERNAL_THREADS_H +# include +#endif + +#ifndef _STLP_STRING_FWD_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +class _STLP_CLASS_DECLSPEC _Locale_impl; // Forward declaration of opaque type. +class _STLP_CLASS_DECLSPEC _Locale; // Forward declaration of opaque type. +class _STLP_CLASS_DECLSPEC locale; +class _STLP_CLASS_DECLSPEC ios_base; + + +template +bool +__locale_do_operator_call (const locale* __that, + const basic_string<_CharT, _Traits, _Alloc >& __x, + const basic_string<_CharT, _Traits, _Alloc >& __y); + +# define _BaseFacet locale::facet + +class _STLP_CLASS_DECLSPEC locale { +public: + // types: + + class +#if defined (__SYMBIAN32__) || defined(__GCCE__) + _STLP_CLASS_DECLSPEC +#else + _STLP_DECLSPEC +#endif + facet : private _Refcount_Base { + protected: + explicit facet(size_t __no_del = 0) : _Refcount_Base(1), _M_delete(__no_del == 0) {} + + _STLP_DECLSPEC virtual ~facet(); + friend class locale; + friend class _Locale_impl; + friend class _Locale; + + private: // Invalidate assignment and copying. + facet(const facet& __f) : _Refcount_Base(1), _M_delete(__f._M_delete == 0) {}; + void operator=(const facet&); + + private: // Data members. + const bool _M_delete; + }; + +#if defined(__MVS__) || defined(__OS400__) + struct +#else + class +#endif + _STLP_DECLSPEC id { + friend class locale; + friend class _Locale_impl; + public: + size_t _M_index; +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static _STLP_STATIC_MEMBER_DECLSPEC size_t& get_locale_id_S_max(); +# else + static size_t _S_max; +# endif + }; + + typedef int category; +# if defined (_STLP_STATIC_CONST_INIT_BUG) + enum _Category { +# else + static const category +# endif + none = 0x000, + collate = 0x010, + ctype = 0x020, + monetary = 0x040, + numeric = 0x100, + time = 0x200, + messages = 0x400, + all = collate | ctype | monetary | numeric | time | messages +# if defined (_STLP_STATIC_CONST_INIT_BUG) + } +# endif + ; + + // construct/copy/destroy: + _STLP_DECLSPEC locale(); + _STLP_DECLSPEC locale(const locale&) _STLP_NOTHROW; + explicit locale(const char *); + locale(const locale&, const char*, category); + + // those are for internal use + locale(_Locale_impl*); + locale(_Locale_impl*, bool); + +public: + +# if defined ( _STLP_MEMBER_TEMPLATES ) /* && defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) */ + template + locale(const locale& __loc, _Facet* __f) : _M_impl(0) + { + // _M_impl = this->_S_copy_impl(__loc._M_impl, __f != 0); + new(this) locale(__loc._M_impl, __f != 0); + if (__f != 0) + this->_M_insert((facet*)__f, _Facet::GetFacetLocaleId()); + } +# endif + + locale(const locale&, const locale&, category); + _STLP_DECLSPEC ~locale() _STLP_NOTHROW; + _STLP_DECLSPEC const locale& operator=(const locale&) _STLP_NOTHROW; + +# if !(defined (_STLP_NO_MEMBER_TEMPLATES) || defined (_STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS)) + template locale combine(const locale& __loc) const{ + locale __result(__loc._M_impl, true); +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + if (facet* __f = __loc._M_get_facet(_Facet::GetFacetLocaleId())) { + __result._M_insert((facet*)__f, _Facet::GetFacetLocaleId()); +#else + if (facet* __f = __loc._M_get_facet(_Facet::id)) { + __result._M_insert((facet*)__f, _Facet::id); +#endif + __f->_M_incr(); + } + else + _M_throw_runtime_error(); + return __result; + } +# endif + // locale operations: + _STLP_DECLSPEC string name() const; + + _STLP_DECLSPEC bool operator==(const locale&) const; + _STLP_DECLSPEC bool operator!=(const locale&) const; + +# if ! defined ( _STLP_MEMBER_TEMPLATES ) || defined (_STLP_INLINE_MEMBER_TEMPLATES) || (defined(__MWERKS__) && __MWERKS__ <= 0x2301) + bool operator()(const string& __x, const string& __y) const; +# ifndef _STLP_NO_WCHAR_T + bool operator()(const wstring& __x, const wstring& __y) const; +# endif +# else + template + bool operator()(const basic_string<_CharT, _Traits, _Alloc>& __x, + const basic_string<_CharT, _Traits, _Alloc>& __y) const { + return __locale_do_operator_call(this, __x, __y); + } +# endif + + // global locale objects: + _STLP_DECLSPEC static locale _STLP_CALL global(const locale&); + _STLP_DECLSPEC static const locale& _STLP_CALL classic(); + +public: // Helper functions for locale globals. + _STLP_DECLSPEC facet* _M_get_facet(const id&) const; + // same, but throws + _STLP_DECLSPEC facet* _M_use_facet(const id&) const; + _STLP_DECLSPEC static void _STLP_CALL _M_throw_runtime_error(const char* = 0); + static void _STLP_CALL _S_initialize(); + static void _STLP_CALL _S_uninitialize(); + +private: // More helper functions. + // static _Locale_impl* _STLP_CALL _S_copy_impl(_Locale_impl*, bool); + _STLP_DECLSPEC void _M_insert(facet* __f, id& __id); + + // friends: + friend class _Locale_impl; + friend class _Locale; + friend class ios_base; + +private: // Data members + _Locale_impl* _M_impl; +}; + +//---------------------------------------------------------------------- +// locale globals + +# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS +template +inline const _Facet& +_Use_facet<_Facet>::operator *() const +# else +template inline const _Facet& use_facet(const locale& __loc) +# endif +{ +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + return *__STATIC_CAST(const _Facet*,__loc._M_use_facet(_Facet::GetFacetLocaleId())); +#else + return *__STATIC_CAST(const _Facet*,__loc._M_use_facet(_Facet::id)); +#endif +} + + +# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS +template +struct has_facet { + const locale& __loc; + has_facet(const locale& __p_loc) : __loc(__p_loc) {} + operator bool() const _STLP_NOTHROW +# else +template inline bool has_facet(const locale& __loc) _STLP_NOTHROW +# endif +{ +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + return (__loc._M_get_facet(_Facet::GetFacetLocaleId()) != 0); +#else + return (__loc._M_get_facet(_Facet::id) != 0); +#endif +} + +# ifdef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS + // close class definition +}; +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_LOCALE_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_mbstate_t.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_mbstate_t.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_MBSTATE_T +#define _STLP_INTERNAL_MBSTATE_T + +#if (defined (__OpenBSD__) || defined (__FreeBSD__)) && defined (__GNUC__) && !defined (_GLIBCPP_HAVE_MBSTATE_T) +# define __mbstate_t_defined /* mbstate_t defined in native , so not defined in C! */ +#endif + +#if defined (_STLP_NO_NATIVE_MBSTATE_T) && !defined (_STLP_NO_MBSTATE_T) && !defined (_MBSTATE_T) && !defined (__mbstate_t_defined) +# define _STLP_USE_OWN_MBSTATE_T +# define _MBSTATE_T +#endif + +#if defined (_STLP_USE_OWN_MBSTATE_T) +typedef int mbstate_t; + +# if defined (__cplusplus) +_STLP_BEGIN_NAMESPACE +using ::mbstate_t; +_STLP_END_NAMESPACE +# endif + +#endif /* _STLP_USE_OWN_MBSTATE_T */ + +#endif /* _STLP_INTERNAL_MBSTATE_T */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_messages_facets.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_messages_facets.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,186 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_MESSAGES_H +#define _STLP_INTERNAL_MESSAGES_H + +#ifndef _STLP_IOS_BASE_H +# include +#endif + +# ifndef _STLP_C_LOCALE_H +# include +# endif + +#ifndef _STLP_STRING_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// messages facets + +class messages_base { +public: + typedef int catalog; +}; + +template class messages {}; + +class _Messages; + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class messages : public locale::facet, public messages_base +#else +class _STLP_CLASS_DECLSPEC messages : public locale::facet, public messages_base +#endif +{ + friend class _Locale; +public: + typedef messages_base::catalog catalog; + typedef char char_type; + typedef string string_type; + + _STLP_DECLSPEC explicit messages(size_t __refs = 0); + + catalog open(const string& __fn, const locale& __loc) const + { return do_open(__fn, __loc); } + string_type get(catalog __c, int __set, int __msgid, + const string_type& __dfault) const + { return do_get(__c, __set, __msgid, __dfault); } + inline void close(catalog __c) const + { do_close(__c); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + + _STLP_DECLSPEC messages(_Messages*); + +protected: + _STLP_DECLSPEC messages(size_t, _Locale_messages*); +_STLP_DECLSPEC ~messages(); + +_STLP_DECLSPEC virtual catalog do_open(const string& __fn, const locale& __loc) const; +_STLP_DECLSPEC virtual string_type do_get(catalog __c, int __set, int __msgid, + const string_type& __dfault) const; +_STLP_DECLSPEC virtual void do_close(catalog __c) const; + + void _M_initialize(const char* __name); + +private: + _Messages* _M_impl; +}; + +# if !defined (_STLP_NO_WCHAR_T) + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class messages : public locale::facet, public messages_base +#else +class _STLP_CLASS_DECLSPEC messages : public locale::facet, public messages_base +#endif +{ + friend class _Locale; +public: + typedef messages_base::catalog catalog; + typedef wchar_t char_type; + typedef wstring string_type; + +_STLP_DECLSPEC explicit messages(size_t __refs = 0); + + inline catalog open(const string& __fn, const locale& __loc) const + { return do_open(__fn, __loc); } + inline string_type get(catalog __c, int __set, int __msgid, + const string_type& __dfault) const + { return do_get(__c, __set, __msgid, __dfault); } + inline void close(catalog __c) const + { do_close(__c); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + + _STLP_DECLSPEC messages(_Messages*); + +protected: + +_STLP_DECLSPEC messages(size_t, _Locale_messages*); +_STLP_DECLSPEC ~messages(); + +_STLP_DECLSPEC virtual catalog do_open(const string& __fn, const locale& __loc) const; +_STLP_DECLSPEC virtual string_type do_get(catalog __c, int __set, int __msgid, + const string_type& __dfault) const; +_STLP_DECLSPEC virtual void do_close(catalog __c) const; + + void _M_initialize(const char* __name); + +private: + _Messages* _M_impl; +}; + +# endif /* WCHAR_T */ + +template class messages_byname {}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC messages_byname : public messages { +public: + typedef messages_base::catalog catalog; + typedef string string_type; + + _STLP_DECLSPEC explicit messages_byname(const char* __name, size_t __refs = 0); + +protected: +_STLP_DECLSPEC ~messages_byname(); +}; + +# ifndef _STLP_NO_WCHAR_T +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC messages_byname : public messages { +public: + typedef messages_base::catalog catalog; + typedef wstring string_type; + +_STLP_DECLSPEC explicit messages_byname(const char* __name, size_t __refs = 0); + +protected: +_STLP_DECLSPEC ~messages_byname(); +}; +# endif /* WCHAR_T */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_MESSAGES_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_monetary.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_monetary.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,827 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_MONETARY_C +#define _STLP_MONETARY_C + +# ifndef _STLP_INTERNAL_MONETARY_H +# include +# endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#ifndef _STLP_INTERNAL_IOS_H +# include +#endif + +#ifndef _STLP_INTERNAL_NUM_PUT_H +# include +#endif + +#ifndef _STLP_INTERNAL_NUM_GET_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +template +locale::id money_get<_CharT, _InputIterator>::id; + +template +locale::id money_put<_CharT, _OutputIterator>::id; +#endif +# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +typedef money_get money_get_char; +typedef money_put money_put_char; +typedef money_get > > money_get_char_2; +typedef money_put > > money_put_char_2; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, money_get_char::id, ); +__DECLARE_INSTANCE(locale::id, money_put_char::id, ); +__DECLARE_INSTANCE(locale::id, money_get_char_2::id, ); +__DECLARE_INSTANCE(locale::id, money_put_char_2::id, ); +#endif + +# ifndef _STLP_NO_WCHAR_T + +typedef money_get money_get_wchar_t; +typedef money_get > > money_get_wchar_t_2; +typedef money_put money_put_wchar_t; +typedef money_put > > money_put_wchar_t_2; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, money_get_wchar_t::id, ); +__DECLARE_INSTANCE(locale::id, money_put_wchar_t::id, ); +__DECLARE_INSTANCE(locale::id, money_get_wchar_t_2::id, ); +__DECLARE_INSTANCE(locale::id, money_put_wchar_t_2::id, ); +#endif + +# endif +# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +// money_get facets + + +// helper functions for do_get +template +pair<_InIt1, bool> __get_string(_InIt1 __first, _InIt1 __last, + _InIt2 __str_first, _InIt2 __str_last) { + pair<_InIt1, _InIt2> __pr = mismatch(__first, __last, __str_first); + return make_pair(__pr.first, __pr.second == __str_last); +} + +template +bool +__get_monetary_value(_InIt& __first, _InIt __last, _OuIt __stl_out, + const ctype<_CharT>& _c_type, + _CharT __point, + int __frac_digits, + _CharT __sep, + const string& __grouping, + bool& __syntax_ok) +{ + + size_t __digits = 0; + + if (__first == __last || !_c_type.is(ctype_base::digit, *__first)) + return false; + + char __group_sizes[128]; + char* __group_sizes_end = __grouping.size() == 0 ? 0 : __group_sizes; + char __current_group_size = 0; + + while (__first != __last) { + if (_c_type.is(ctype_base::digit, *__first)) { + ++__current_group_size; + *__stl_out++ = *__first++; + __digits++; + } +#ifdef __SYMBIAN32__ +else if ( (__current_group_size)&&(__group_sizes_end) ){ +#else + else if (__group_sizes_end) { +#endif + if (*__first == __sep) { + *__group_sizes_end++ = __current_group_size; + __current_group_size = 0; + ++__first; + } + else break; + } + else + break; + } + + if (__grouping.size() == 0) + __syntax_ok = true; + else { + if (__group_sizes_end != __group_sizes) + *__group_sizes_end++ = __current_group_size; + + __syntax_ok = __valid_grouping(__group_sizes, __group_sizes_end, + __grouping.data(), __grouping.data()+ __grouping.size()); + + if (__first == __last || *__first != __point) { + for (int __digits = 0; __digits != __frac_digits; ++__digits) + *__stl_out++ = _CharT('0'); + return true; // OK not to have decimal point + } + } +//bug fix testcase_22427 - commented +// ++__first; + + + //bug fix testcase_22427 - added if + + if (__first != __last && *__first == __point && __frac_digits) + { + //bug fix testcase_22427 - commented + ++__first; + while (__first != __last && _c_type.is(ctype_base::digit, *__first)) { + *__stl_out++ = *__first++; + ++__digits; + } + } + + //bug fix testcase_22427 - condition changed +// __syntax_ok = __syntax_ok && (__digits == __frac_digits); + + if(__digits == 0) + __syntax_ok = false; + + return true; +} + +# ifndef _STLP_NO_LONG_DOUBLE + +//===== methods ====== +template +_InputIter +money_get<_CharT, _InputIter>::do_get(_InputIter __s, _InputIter __end, bool __intl, + ios_base& __str, ios_base::iostate& __err, + long double& __units) const { + string_type __buf; + __s = do_get(__s, __end, __intl, __str, __err, __buf); + + if (__err == ios_base::goodbit || __err == ios_base::eofbit) { + __buf.push_back(0); + typename string_type::iterator __b = __buf.begin(), __e = __buf.end(); + // Can't use atold, since it might be wchar_t. Don't get confused by name below : + // it's perfectly capable of reading long double. + __get_decimal_integer(__b, __e, __units); + } + if (__s == __end) + __err |= ios_base::eofbit; + return __s; +} +# endif + +template +_InputIter +money_get<_CharT, _InputIter>::do_get(iter_type __s, + iter_type __end, bool __intl, + ios_base& __str, ios_base::iostate& __err, + string_type& __digits) const { + __err = 0; + if (__s == __end) { + __err |= ios_base::eofbit; + return __s; + } + + typedef moneypunct<_CharT, false> _Punct; + typedef moneypunct<_CharT, true> _Punct_intl; + typedef ctype<_CharT> _Ctype; +#ifdef __SYMBIAN32__ + bool __isSignSympresent = false; +#endif + + bool __testvalid = true; + locale __loc = __str.getloc(); + const _Punct& __punct = use_facet<_Punct>(__loc) ; + const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ; + const _Ctype& __c_type = use_facet<_Ctype>(__loc) ; + + money_base::pattern __format = __intl ? __punct_intl.neg_format() + : __punct.neg_format(); + string_type __ns = __intl ? __punct_intl.negative_sign() + : __punct.negative_sign(); + string_type __ps = __intl ? __punct_intl.positive_sign() + : __punct.positive_sign(); + string_type __sign = __ps; + int __i; + bool __is_positive = true; + bool __symbol_required = (__str.flags() & ios_base::showbase) !=0; + string_type __buf; + back_insert_iterator __stl_out(__buf); +// pair __result; + + for (__i = 0; __i < 4; ++__i) { + switch (__format.field[__i]) { + case (char) money_base::none: +#ifndef __SYMBIAN32__ + case (char) money_base::space: +#endif + + if (__i == 3) { + //if (__c_type.is(ctype_base::space, *__s)) { //gnu buf fix, 22/12/06 + if((__s != __end) && (!__c_type.is(ctype_base::space, *__s)) && (__ps.size()<=1) && (__ns.size()<=1) ){ + __err = ios_base::failbit; + return __s; + } + // break; //gnu bug fix 2/1/07 + } + while (__s != __end && __c_type.is(ctype_base::space, *__s)) + ++__s; + break; +#ifdef __SYMBIAN32__ + case (char) money_base::space: + if (!__c_type.is(ctype_base::space, *__s)) { +#ifdef __SYMBIAN32__ + if(!__isSignSympresent) //if no sign symbol present, space is not mandatory. + break; +#endif + __err = ios_base::failbit; + return __s; + } + ++__s; + while (__s != __end && __c_type.is(ctype_base::space, *__s)) + ++__s; + break; +#endif + case money_base::symbol: { + string_type __curs = __intl ? __punct_intl.curr_symbol() + : __punct.curr_symbol(); + pair + __result = __get_string(__s, __end, __curs.begin(), __curs.end()); + if (!__result.second && __symbol_required) + __err = ios_base::failbit; + __s = __result.first; + break; + } + case money_base::sign: { + if (__s == __end) { + if (__ps.size() == 0) + break; + if (__ns.size() == 0) { + __is_positive = false; + __sign = __ns; + break; + } + __err = ios_base::failbit; + return __s; + } + else { + if (__ps.size() == 0) { + if (__ns.size() == 0) + break; + if (*__s == __ns[0]) { + ++__s; + __is_positive = false; + __sign = __ns; +#ifdef __SYMBIAN32__ + __isSignSympresent = true; +#endif + + break; + } + // __err = ios_base::failbit; //if ps !=0 and ns!=0, and no negative sign mean it is positive, not fail. + // return __s; + break; + } + else { + if (*__s == __ps[0]) { + ++__s; +#ifdef __SYMBIAN32__ + __isSignSympresent = true; +#endif + + break; + } +#ifdef __SYMBIAN32__ + if (__ns.size() == 0) //here positive have symbol,negative have no symbol + { + __is_positive = false; // in this case if symbol not present means it is negative + __sign = __ns; + break; + } + +#else + if (__ns.size() == 0) + break; +#endif + if (*__s == __ns[0]) { + ++__s; + __is_positive = false; + __sign = __ns; +#ifdef __SYMBIAN32__ + __isSignSympresent = true; +#endif + break; + } + __err = ios_base::failbit; + // return __s; + } + } + return __s; + // break; + } + case money_base::value: { + _CharT __point = __intl ? __punct_intl.decimal_point() + : __punct.decimal_point(); + int __frac_digits = __intl ? __punct_intl.frac_digits() + : __punct.frac_digits(); + string __grouping = __intl ? __punct_intl.grouping() + : __punct.grouping(); + bool __syntax_ok = true; + + bool __result; + + _CharT __sep = __grouping.size() == 0 ? _CharT() : + __intl ? __punct_intl.thousands_sep() : __punct.thousands_sep(); + + __result = __get_monetary_value(__s, __end, __stl_out, __c_type, + __point, __frac_digits, + __sep, + __grouping, __syntax_ok); + + if (!__syntax_ok) + __err |= ios_base::failbit; + if (!__result) { + __err = ios_base::failbit; + return __s; + } + break; + + } // Close money_base::value case + + + } // Close switch statement + } // Close for loop + +#ifndef __SYMBIAN32__ //find the given number pos or neg, required for cases where sign is present at string starting and ending + do{ + bool type = true; + + int si = __ps.size(); + for (int i = 1;i<__ps.size();i++) + { + if(__s[i-1]!=__ps[i]) + { + type = false; + break; + } + } + + if ((si!=0) && (type ==true)) + { + __sign = __ps; + break; + } + if (__ns.size() == 0) + break; + type = true; + for (int i =1;i<__ns.size();i++) + { + if(__s[i-1]!=__ns[i]) + { + type = false; + break; + } + } + if (type ==true) { + __is_positive = false; + __sign = __ns; + break; + } + }while(0); + +#endif + + +#ifdef __SYMBIAN32__ +// Need to get the rest of the sign characters, if they exist. + if (__sign.size() > 1) + { + int __len = __sign.size(); + int __i = 1; + char_type __c = *__s; + char_type __eol = '\0'; + for (; __c != __eol && __i < __len; __i++) + { + if (__s != __end) + __c = *(++__s); + + } + //checking sign completely extracted successfully + + if (__i != __len) + __testvalid = false; + } + +#endif + + if (__is_positive) { + if (__ps.size() > 1) { +#ifndef __SYMBIAN32__ + pair<_InputIter, bool> + __result = __get_string(__s, __end, __ps.begin() + 1, __ps.end()); + __s = __result.first; + if (!__result.second) + __err |= ios::failbit; +#endif + if(!__testvalid) + __err |= ios::failbit; + } + if (!(__err & ios_base::failbit)) + __digits = __buf; + } + else { + if (__ns.size() > 1) { +#ifndef __SYMBIAN32__ + pair<_InputIter, bool> + __result = __get_string(__s, __end, __ns.begin() + 1, __ns.end()); + __s = __result.first; + if (!__result.second) + __err |= ios::failbit; +#endif + if(!__testvalid) + __err |= ios::failbit; + } + if (!(__err & ios::failbit) && (__ns == __sign)) { + __buf.insert(__buf.begin(),__c_type.widen('-')); + } +#ifdef __SYMBIAN32__ + if (!(__err & ios_base::failbit)) + __digits = __buf; +#else + __digits = __buf; +#endif + } + if (__s == __end) + __err |= ios::eofbit; + + return __s; +} + +// money_put facets + +template +_OutputIter +money_put<_CharT, _OutputIter> + ::do_put(_OutputIter __s, bool __intl, ios_base& __str, + char_type __fill, + const string_type& __digits) const { + typedef ctype<_CharT> _Ctype; + typedef moneypunct<_CharT, false> _Punct; + typedef moneypunct<_CharT, true> _Punct_intl; + + locale __loc = __str.getloc(); + const _Ctype& __c_type = use_facet<_Ctype>(__loc) ; + const _Punct& __punct = use_facet<_Punct>(__loc) ; + const _Punct_intl& __punct_intl = use_facet<_Punct_intl>(__loc) ; + + // some special characters + + char_type __minus = __c_type.widen('-'); + char_type __plus = __c_type.widen('+'); + char_type __space = __c_type.widen(' '); + char_type __zero = __c_type.widen('0'); + char_type __point = __intl ? __c_type.widen(__punct_intl.decimal_point()) + : __c_type.widen(__punct.decimal_point()); + + char_type __sep = __intl ? __punct_intl.thousands_sep() + : __punct .thousands_sep(); + + string __grouping = __intl ? __punct_intl.grouping() + : __punct .grouping(); + + int __frac_digits = __intl ? __punct_intl.frac_digits() + : __punct.frac_digits(); + + string_type __curr_sym = __intl ? __punct_intl.curr_symbol() + : __punct.curr_symbol(); + + // if there are no digits we are going to return __s. If there + // are digits, but not enough to fill the frac_digits, we are + // going to add zeros. I don't know whether this is right or + // not. + + if (__digits.size() == 0) + return __s; + + typename string_type::const_iterator __digits_first = __digits.begin(); + typename string_type::const_iterator __digits_last = __digits.end(); + + bool __is_negative = *__digits_first == __minus; + if (__is_negative) + ++__digits_first; + + string_type __sign = __intl ? + __is_negative ? __punct_intl.negative_sign() + : __punct_intl.positive_sign() + : + __is_negative ? __punct.negative_sign() + : __punct.positive_sign(); + typename string_type::const_iterator __cp = __digits_first; + while (__cp != __digits_last && __c_type.is(ctype_base::digit, *__cp)) + ++__cp; + if (__cp == __digits_first) + return __s; + __digits_last = __cp; + + // If grouping is required, we make a copy of __digits and + // insert the grouping. + + // To handle the fractional digits, we augment the first group + // by frac_digits. If there is only one group, we need first + // to duplicate it. + + string_type __new_digits(__digits_first, __digits_last); +#ifdef __SYMBIAN32__ + int __numberofseperators = 0; + if (__grouping.size()>0) + __numberofseperators = (__new_digits.size()/__grouping[0])+1; + else + __numberofseperators = 0; + __new_digits.resize(__new_digits.size()+__numberofseperators); +#endif + if (__grouping.size() != 0) { + if (__grouping.size() == 1) + __grouping.push_back(__grouping[0]); + __grouping[0] += __frac_digits; + _CharT* __data_ptr = __CONST_CAST(_CharT*,__new_digits.data()); + _CharT* __data_end = __data_ptr + __new_digits.size(); + + + ptrdiff_t __value_length = __insert_grouping(__data_ptr, +#ifdef __SYMBIAN32__ + __data_end-__numberofseperators, +#else + __data_end, +#endif + __grouping, + __sep, + __plus, __minus, 0); + __digits_first = __new_digits.begin(); + __digits_last = __digits_first + __value_length; + } + + // Determine the amount of padding required, if any. +#ifdef __SYMBIAN32__ + int __width = __str.width(); //width returns signed value. +#else + size_t __width = __str.width(); +#endif + +#if defined(_STLP_DEBUG) && (defined(__HP_aCC) || (__HP_aCC <= 1)) + size_t __value_length = operator -(__digits_last, __digits_first); +#else + size_t __value_length = __digits_last - __digits_first; +#endif + + size_t __length = __value_length; + + __length += __sign.size(); + if (__frac_digits != 0) + ++__length; + + bool __generate_curr = (__str.flags() & ios_base::showbase) !=0; + if (__generate_curr) + __length += __curr_sym.size(); + money_base::pattern __format = + __intl ? (__is_negative ? __punct_intl.neg_format() + : __punct_intl.pos_format()) + : (__is_negative ? __punct.neg_format() + : __punct.pos_format()); + { + for (int __i = 0; __i < 4; ++__i) + if (__format.field[__i] == (char) money_base::space) + ++__length; + } + + size_t __fill_amt = (int)__length < __width ? __width - __length : 0; + + ios_base::fmtflags __fill_pos = __str.flags() & ios_base::adjustfield; + + if (__fill_amt != 0 && + !(__fill_pos & (ios_base::left | ios_base::internal))) + __s = fill_n(__s, __fill_amt, __fill); + + for (int __i = 0; __i < 4; ++__i) { + char __ffield = __format.field[__i]; + if (__ffield == money_base::none) { + if (__fill_amt != 0 && __fill_pos == ios_base::internal) + __s = fill_n(__s, __fill_amt, __fill); + } + else if (__ffield == money_base::space) { +#ifdef __SYMBIAN32__ + if(__fill != __space) + *__s++ = __fill; + else +#endif + *__s++ = __space; + if (__fill_amt != 0 && __fill_pos == ios_base::internal) + __s = fill_n(__s, __fill_amt, __fill); + } + else if (__ffield == money_base::symbol) { + if (__generate_curr) + __s = copy(__curr_sym.begin(), __curr_sym.end(), __s); + } + else if (__ffield == money_base::sign) { + if (__sign.size() != 0) + *__s++ = __sign[0]; + } + else if (__ffield == money_base::value) { + if (__frac_digits == 0) + __s = copy(__digits_first, __digits_last, __s); + else { + if ((int)__value_length <= __frac_digits) { + *__s++ = __point; + __s = copy(__digits_first, __digits_last, __s); + __s = fill_n(__s, __frac_digits - __value_length, __zero); + } + else { +#ifdef __SYMBIAN32__ + if (__frac_digits>0) + { +#endif + __s = copy(__digits_first, __digits_last - __frac_digits, __s); + if (__frac_digits != 0) { + *__s++ = __point; + __s = copy(__digits_last - __frac_digits, __digits_last, __s); +#ifdef __SYMBIAN32__ + } +#endif + } + } + } + } + } // Close for loop + + // Ouput rest of sign if necessary. + + if (__sign.size() > 1) + __s = copy(__sign.begin() + 1, __sign.end(), __s); + if (!(__fill_pos & (ios_base::right | ios_base::internal))) + __s = fill_n(__s, __fill_amt, __fill); + +#ifdef __SYMBIAN32__ + __str.width(0); +#endif + return __s; +} + +#ifdef __SYMBIAN32__ +/* +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +moneypunct<_CharT, _International>::moneypunct(size_t __refs = 0):_BaseFacet(__refs) +{ + + +}*/ + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +_CharT moneypunct<_CharT,_International>::do_decimal_point() const +{ + return _CharT('.'); +} + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +_CharT moneypunct<_CharT,_International>::do_thousands_sep() const +{ + return _CharT(','); +} +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +basic_string<_CharT> moneypunct<_CharT,_International>::do_curr_symbol() const +{ + return _M_currSym; +} + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +basic_string<_CharT> moneypunct<_CharT,_International>::do_positive_sign() const +{ + return _M_psign; +} + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +basic_string<_CharT> moneypunct<_CharT,_International>::do_negative_sign() const +{ + return _M_nsign; +} + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +string moneypunct<_CharT,_International>::do_grouping() const +{ + return _M_group; +} + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +money_base::pattern moneypunct<_CharT,_International>::do_pos_format() const +{ + return _M_pos_format; +} + +template//__DFL_NON_TYPE_PARAM(bool, _International, false)> +money_base::pattern moneypunct<_CharT,_International>::do_neg_format() const +{ + return _M_neg_format; +} + +template +int moneypunct<_CharT,_International>::do_frac_digits() const +{ + return 0; +} + + +//monetary_byname + +template +_CharT moneypunct_byname<_CharT, _International>::do_decimal_point() const + {return _Locale_mon_decimal_pointE(_M_monetary);} + +template +_CharT moneypunct_byname<_CharT, _International>::do_thousands_sep() const + {return _Locale_mon_thousands_sepE(_M_monetary);} + +template +string moneypunct_byname<_CharT, _International>::do_grouping() const + {return moneypunct<_CharT,_International>::_M_group;} + +template +basic_string<_CharT> moneypunct_byname<_CharT, _International>::do_curr_symbol() const + {return moneypunct<_CharT,_International>::_M_currSym;} + +template +basic_string<_CharT> moneypunct_byname<_CharT, _International>::do_positive_sign() const + {return moneypunct<_CharT,_International>::_M_psign;} + +template +basic_string<_CharT> moneypunct_byname<_CharT, _International>::do_negative_sign() const + {return moneypunct<_CharT,_International>::_M_nsign;} + +template +int moneypunct_byname<_CharT, _International>::do_frac_digits() const + {return _Locale_int_frac_digitsE(_M_monetary);} + +template +void moneypunct_byname<_CharT, _International>::Convert_string2_string_chart(basic_string<_CharT> &dst, string src) + { + int length = src.length(); + const char* str = src.c_str(); + for(int i = 0; i +moneypunct_byname<_CharT, _International>::moneypunct_byname(const char * name, + size_t refs): + moneypunct<_CharT, _International>(refs), + _M_monetary(__acquire_monetaryE(name)) +{ + if (!_M_monetary) + locale::_M_throw_runtime_error(); + + moneypunct<_CharT,_International>::_M_group = _Locale_mon_groupingE(_M_monetary); + Convert_string2_string_chart(moneypunct<_CharT,_International>::_M_psign, _Locale_positive_signE(_M_monetary)); + Convert_string2_string_chart(moneypunct<_CharT,_International>::_M_nsign, _Locale_negative_signE(_M_monetary)); + Convert_string2_string_chart(moneypunct<_CharT,_International>::_M_currSym, _Locale_int_curr_symbolE(_M_monetary)); +} + +template +moneypunct_byname<_CharT, _International>::~moneypunct_byname() +{ + __release_monetaryE(_M_monetary); +} + + +#endif +_STLP_END_NAMESPACE + +# endif /* EXPOSE */ + +#endif /* _STLP_MONETARY_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_monetary.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_monetary.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,641 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_MONETARY_H +#define _STLP_INTERNAL_MONETARY_H + +#ifndef _STLP_INTERNAL_CTYPE_H +# include +#endif + +#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H +# include +#endif + +#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +class money_base { +public: + enum part {none, space, symbol, sign, value}; + struct pattern { + char field[4]; + }; +}; + + +#ifdef __SYMBIAN32__ + +extern locale::id& Moneypunct_charT_GetFacetLocaleId(const char* type); +_STLP_DECLSPEC void _Init_monetary_formatsE(money_base::pattern& pos_format, + money_base::pattern& neg_format); + +template +class moneypunct : public locale::facet , public money_base +{ +public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + explicit moneypunct _STLP_PSPEC2(_CharT, _International) (size_t __refs = 0) + { + _Init_monetary_formatsE(_M_pos_format, _M_neg_format); + } + _CharT decimal_point() const { return do_decimal_point(); } + _CharT thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string_type curr_symbol() const { return do_curr_symbol(); } + string_type positive_sign() const { return do_positive_sign(); } + string_type negative_sign() const { return do_negative_sign(); } + int frac_digits() const { return do_frac_digits(); } + pattern pos_format() const { return do_pos_format(); } + pattern neg_format() const { return do_neg_format(); } + #if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static locale::id& GetFacetLocaleId(){return Moneypunct_charT_GetFacetLocaleId(typeid(_CharT).name()); }; +#else + static locale::id id; +#endif +# if defined (_STLP_STATIC_CONST_INIT_BUG) + enum _IntlVal { intl = _International } ; +# else + static const bool intl = _International; +# endif + +protected: + pattern _M_pos_format; + pattern _M_neg_format; + + static string_type _M_psign, _M_nsign, _M_currSym; + static string _M_group; + ~moneypunct _STLP_PSPEC2(char, true) () { }; + + virtual _CharT do_decimal_point() const; + virtual _CharT do_thousands_sep() const; + virtual string do_grouping() const; + + virtual basic_string<_CharT> do_curr_symbol() const; + + virtual basic_string<_CharT> do_positive_sign() const; + virtual basic_string<_CharT> do_negative_sign() const; + virtual int do_frac_digits() const; + virtual pattern do_pos_format() const; + virtual pattern do_neg_format() const; + + friend class _Locale; + +}; +template +string moneypunct<_CharT, _International>::_M_group; +template +basic_string<_CharT> moneypunct<_CharT, _International>::_M_psign; +template +basic_string<_CharT> moneypunct<_CharT, _International>::_M_nsign; +template +basic_string<_CharT> moneypunct<_CharT, _International>::_M_currSym; + + +#else +// moneypunct facets: forward declaration +template class moneypunct {}; +#endif + +// money_get facets + +template ) > +class money_get : public locale::facet +{ + friend class _Locale; +public: + typedef _CharT char_type; + typedef _InputIter iter_type; + typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type; + + money_get(size_t __refs = 0) : _BaseFacet(__refs) {} +# ifndef _STLP_NO_LONG_DOUBLE + iter_type get(iter_type __s, iter_type __end, bool __intl, + ios_base& __str, ios_base::iostate& __err, + long double& __units) const + { return do_get(__s, __end, __intl, __str, __err, __units); } +# endif + iter_type get(iter_type __s, iter_type __end, bool __intl, + ios_base& __str, ios_base::iostate& __err, + string_type& __digits) const + { return do_get(__s, __end, __intl, __str, __err, __digits); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char **); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + ~money_get() {} +# ifndef _STLP_NO_LONG_DOUBLE + virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, + ios_base& __str, ios_base::iostate& __err, + long double& __units) const; +# endif + virtual iter_type do_get(iter_type __s, iter_type __end, bool __intl, + ios_base& __str, ios_base::iostate& __err, + string_type& __digits) const; +}; + + +// moneypunct facets: definition of specializations + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class moneypunct : public locale::facet, public money_base +#else +class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base +#endif +{ + +public: + typedef char char_type; + typedef string string_type; +_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(char, true) (size_t __refs = 0); + + char decimal_point() const { return do_decimal_point(); } + char thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string_type curr_symbol() const { return do_curr_symbol(); } + string_type positive_sign() const { return do_positive_sign(); } + string_type negative_sign() const { return do_negative_sign(); } + int frac_digits() const { return do_frac_digits(); } + pattern pos_format() const { return do_pos_format(); } + pattern neg_format() const { return do_neg_format(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif +# if defined (_STLP_STATIC_CONST_INIT_BUG) + enum _IntlVal { intl = 1 } ; +# else + static const bool intl = true; +# endif + +protected: + pattern _M_pos_format; + pattern _M_neg_format; + +_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(char, true) (); + +_STLP_DECLSPEC virtual char do_decimal_point() const; + _STLP_DECLSPEC virtual char do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string do_curr_symbol() const; + +_STLP_DECLSPEC virtual string do_positive_sign() const; +_STLP_DECLSPEC virtual string do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +_STLP_DECLSPEC virtual pattern do_pos_format() const; +_STLP_DECLSPEC virtual pattern do_neg_format() const; + + friend class _Locale; + +}; + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class moneypunct : public locale::facet, public money_base +#else +class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base +#endif +{ +public: + typedef char char_type; + typedef string string_type; + +_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(char, false) (size_t __refs = 0); + + char decimal_point() const { return do_decimal_point(); } + char thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string_type curr_symbol() const { return do_curr_symbol(); } + string_type positive_sign() const { return do_positive_sign(); } + string_type negative_sign() const { return do_negative_sign(); } + int frac_digits() const { return do_frac_digits(); } + pattern pos_format() const { return do_pos_format(); } + pattern neg_format() const { return do_neg_format(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif +# if defined (_STLP_STATIC_CONST_INIT_BUG) + enum _IntlVal { intl = 0 } ; +# else + static const bool intl = false; +# endif + +protected: + pattern _M_pos_format; + pattern _M_neg_format; + +_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(char, false) (); + +_STLP_DECLSPEC virtual char do_decimal_point() const; + _STLP_DECLSPEC virtual char do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string do_curr_symbol() const; + +_STLP_DECLSPEC virtual string do_positive_sign() const; +_STLP_DECLSPEC virtual string do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +_STLP_DECLSPEC virtual pattern do_pos_format() const; +_STLP_DECLSPEC virtual pattern do_neg_format() const; + + friend class _Locale; +}; + + +# ifndef _STLP_NO_WCHAR_T + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class moneypunct : public locale::facet, public money_base +#else +class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base +#endif +{ + friend class _Locale; +public: + typedef wchar_t char_type; + typedef wstring string_type; +_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(wchar_t, true) (size_t __refs = 0); + wchar_t decimal_point() const { return do_decimal_point(); } + wchar_t thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string_type curr_symbol() const { return do_curr_symbol(); } + string_type positive_sign() const { return do_positive_sign(); } + string_type negative_sign() const { return do_negative_sign(); } + int frac_digits() const { return do_frac_digits(); } + pattern pos_format() const { return do_pos_format(); } + pattern neg_format() const { return do_neg_format(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif +# if defined (_STLP_STATIC_CONST_INIT_BUG) + enum _IntlVal { intl = 1 } ; +# else + static const bool intl = true; +# endif + +protected: + pattern _M_pos_format; + pattern _M_neg_format; + +_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(wchar_t, true) (); + +_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; + _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string_type do_curr_symbol() const; + +_STLP_DECLSPEC virtual string_type do_positive_sign() const; +_STLP_DECLSPEC virtual string_type do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +_STLP_DECLSPEC virtual pattern do_pos_format() const; +_STLP_DECLSPEC virtual pattern do_neg_format() const; +}; + + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class moneypunct : public locale::facet, public money_base +#else +class _STLP_CLASS_DECLSPEC moneypunct : public locale::facet, public money_base +#endif +{ + friend class _Locale; +public: + typedef wchar_t char_type; + typedef wstring string_type; +_STLP_DECLSPEC explicit moneypunct _STLP_PSPEC2(wchar_t, false) (size_t __refs = 0); + wchar_t decimal_point() const { return do_decimal_point(); } + wchar_t thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string_type curr_symbol() const { return do_curr_symbol(); } + string_type positive_sign() const { return do_positive_sign(); } + string_type negative_sign() const { return do_negative_sign(); } + int frac_digits() const { return do_frac_digits(); } + pattern pos_format() const { return do_pos_format(); } + pattern neg_format() const { return do_neg_format(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif +# if defined (_STLP_STATIC_CONST_INIT_BUG) + enum _IntlVal { intl = 0 } ; +# else + static const bool intl = false; +# endif + +protected: + pattern _M_pos_format; + pattern _M_neg_format; + +_STLP_DECLSPEC ~moneypunct _STLP_PSPEC2(wchar_t, false) (); + +_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; + _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string_type do_curr_symbol() const; + +_STLP_DECLSPEC virtual string_type do_positive_sign() const; +_STLP_DECLSPEC virtual string_type do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +_STLP_DECLSPEC virtual pattern do_pos_format() const; +_STLP_DECLSPEC virtual pattern do_neg_format() const; +}; + +# endif + + +#ifdef __SYMBIAN32__ +_STLP_DECLSPEC _Locale_monetary* __acquire_monetaryE(const char* ); +_STLP_DECLSPEC void __release_monetaryE (_Locale_monetary* ); + + +_STLP_DECLSPEC char _Locale_mon_decimal_pointE(_Locale_monetary* _M_monetary); + +_STLP_DECLSPEC char _Locale_mon_thousands_sepE(_Locale_monetary* _M_monetary); + +_STLP_DECLSPEC string _Locale_mon_groupingE(_Locale_monetary* _M_monetary); + +_STLP_DECLSPEC string _Locale_int_curr_symbolE(_Locale_monetary* _M_monetary); + + +_STLP_DECLSPEC string _Locale_positive_signE(_Locale_monetary* _M_monetary); + +_STLP_DECLSPEC string _Locale_negative_signE(_Locale_monetary* _M_monetary); + +_STLP_DECLSPEC int _Locale_int_frac_digitsE(_Locale_monetary* _M_monetary); + + +template +class moneypunct_byname: public moneypunct<_CharT, _International> +{ +public: + typedef money_base::pattern pattern; + typedef char char_type; + typedef basic_string<_CharT> string_type; + + explicit moneypunct_byname _STLP_PSPEC2(char, _International) (const char * __name, size_t __refs = 0); + +protected: + _Locale_monetary* _M_monetary; + ~moneypunct_byname _STLP_PSPEC2(_CharT, _International) (); + virtual _CharT do_decimal_point() const; + virtual _CharT do_thousands_sep() const; + virtual string do_grouping() const; + + virtual string_type do_curr_symbol() const; + + virtual string_type do_positive_sign() const; + virtual string_type do_negative_sign() const; + virtual int do_frac_digits() const; + private: + void Convert_string2_string_chart(basic_string<_CharT> &dst, string src); + +}; + +#else + +template class moneypunct_byname {}; + +#endif + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct +{ +public: + typedef money_base::pattern pattern; + typedef char char_type; + typedef string string_type; + + explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(char, true) (const char * __name, size_t __refs = 0); + +protected: + _Locale_monetary* _M_monetary; +_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(char, true) (); +_STLP_DECLSPEC virtual char do_decimal_point() const; + _STLP_DECLSPEC virtual char do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string_type do_curr_symbol() const; + +_STLP_DECLSPEC virtual string_type do_positive_sign() const; +_STLP_DECLSPEC virtual string_type do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct +{ +public: + typedef money_base::pattern pattern; + typedef char char_type; + typedef string string_type; + + explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(char, false) (const char * __name, size_t __refs = 0); + +protected: + _Locale_monetary* _M_monetary; +_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(char, false) (); +_STLP_DECLSPEC virtual char do_decimal_point() const; + _STLP_DECLSPEC virtual char do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string_type do_curr_symbol() const; + +_STLP_DECLSPEC virtual string_type do_positive_sign() const; +_STLP_DECLSPEC virtual string_type do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +}; + +# ifndef _STLP_NO_WCHAR_T +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct +{ +public: + typedef money_base::pattern pattern; + typedef wchar_t char_type; + typedef wstring string_type; + + explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(wchar_t, true) (const char * __name, size_t __refs = 0); + +protected: + _Locale_monetary* _M_monetary; +_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(wchar_t, true) (); +_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; + _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string_type do_curr_symbol() const; + +_STLP_DECLSPEC virtual string_type do_positive_sign() const; +_STLP_DECLSPEC virtual string_type do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC moneypunct_byname : public moneypunct +{ +public: + typedef money_base::pattern pattern; + typedef wchar_t char_type; + typedef wstring string_type; + + explicit _STLP_DECLSPEC moneypunct_byname _STLP_PSPEC2(wchar_t, false) (const char * __name, size_t __refs = 0); + +protected: + _Locale_monetary* _M_monetary; +_STLP_DECLSPEC ~moneypunct_byname _STLP_PSPEC2(wchar_t, false) (); +_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; + _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +_STLP_DECLSPEC virtual string_type do_curr_symbol() const; + +_STLP_DECLSPEC virtual string_type do_positive_sign() const; +_STLP_DECLSPEC virtual string_type do_negative_sign() const; +_STLP_DECLSPEC virtual int do_frac_digits() const; +}; +# endif + +//===== methods ====== + + +// money_put facets + +template ) > +class money_put : public locale::facet { + friend class _Locale; + +public: + typedef _CharT char_type; + typedef _OutputIter iter_type; + typedef basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > string_type; + + money_put(size_t __refs = 0) : _BaseFacet(__refs) {} +# ifndef _STLP_NO_LONG_DOUBLE + iter_type put(iter_type __s, bool __intl, ios_base& __str, + char_type __fill, long double __units) const + { return do_put(__s, __intl, __str, __fill, __units); } +# endif + iter_type put(iter_type __s, bool __intl, ios_base& __str, + char_type __fill, + const string_type& __digits) const + { return do_put(__s, __intl, __str, __fill, __digits); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& + GetFacetLocaleId(ostreambuf_iterator > *); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& + GetFacetLocaleId(wchar_t**); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& + GetFacetLocaleId(ostreambuf_iterator > *); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + ~money_put() {} +# ifndef _STLP_NO_LONG_DOUBLE + virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __str, + char_type __fill, long double /* __units */ ) const { + + locale __loc = __str.getloc(); + _CharT __buf[64]; + return do_put(__s, __intl, __str, __fill, __buf + 0); + } +# endif + virtual iter_type do_put(iter_type __s, bool __intl, ios_base& __str, + char_type __fill, + const string_type& __digits) const; +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS money_get > >; +_STLP_EXPORT_TEMPLATE_CLASS money_put > >; +// _STLP_EXPORT_TEMPLATE_CLASS money_get; +// _STLP_EXPORT_TEMPLATE_CLASS money_put; +# if ! defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS money_get > >; +_STLP_EXPORT_TEMPLATE_CLASS money_put > >; +// _STLP_EXPORT_TEMPLATE_CLASS money_get; +// _STLP_EXPORT_TEMPLATE_CLASS money_put; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +# if defined (__BORLANDC__) && defined (_RTLDLL) +inline void _Stl_loc_init_monetary() { + money_get > >::id._M_index = 8; + money_get::id._M_index = 9; + money_put > >::id._M_index = 10; + money_put::id._M_index = 11; +# ifndef _STLP_NO_WCHAR_T + money_get > >::id._M_index = 27; + money_get::id._M_index = 28; + money_put > >::id._M_index = 29; + money_put::id._M_index = 30; +# endif +} +#endif + +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_MONETARY_H */ + +// Local Variables: +// mode:C++ +// End: + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_move_construct_fwk.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_move_construct_fwk.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,160 @@ +/* + * + * Copyright (c) 2003 + * François Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_MOVE_CONSTRUCT_FWK_H +#define _STLP_MOVE_CONSTRUCT_FWK_H + +#ifndef _STLP_TYPE_TRAITS_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +/************************************************************* + * Move constructor framework + *************************************************************/ + +/************************************************************* + *Partial move: + *The source HAS to be a valid instance after the move! + *************************************************************/ +template +class __move_source { +public: + explicit __move_source (_Tp &_src) : _M_data(_src) + {} + + _Tp& get() const + { return _M_data; } +private: + _Tp &_M_data; + + //We explicitely forbid assignment to avoid warning: + typedef __move_source<_Tp> _Self; + _Self& operator = (_Self const&); +}; + +//Class used to signal move constructor support, implementation and type. +template +struct __move_traits { + /* + * implemented tells if a the special move constructor has to be called or the classic + * copy constructor is just fine. Most of the time the copy constructor is fine only + * if the following info is true. + */ +#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && \ + !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && \ + !defined (_STLP_NO_MOVE_SEMANTIC) + typedef typename _IsSTLportClass<_Tp>::_Ret implemented; +#else + typedef __false_type implemented; +#endif + /* + * complete tells if the move is complete or partial, that is to say, does the source + * needs to be destroyed once it has been moved. + */ + typedef typename __type_traits<_Tp>::has_trivial_destructor complete; +}; + +#if !defined (_STLP_NO_MOVE_SEMANTIC) +typedef __true_type __stlp_movable; +#else +typedef __false_type __stlp_movable; +#endif + +_STLP_MOVE_TO_PRIV_NAMESPACE + +/* + * This struct should never be used if the user has not explicitely stipulated + * that its class support the full move concept. To check that the return type + * in such a case will be __invalid_source<_Tp> to generate a compile error + * revealing the configuration problem. + */ +template +struct _MoveSourceTraits { + typedef typename __move_traits<_Tp>::implemented _MvImpRet; +#if defined (__BORLANDC__) + typedef typename __selectT<_MvImpRet, +#else + enum {_MvImp = __type2bool<_MvImpRet>::_Ret}; + typedef typename __select<_MvImp, +#endif + __move_source<_Tp>, + _Tp const&>::_Ret _Type; +}; + +//The helper function +template +inline _STLP_TYPENAME_ON_RETURN_TYPE _MoveSourceTraits<_Tp>::_Type +_AsMoveSource (_Tp &src) { + typedef typename _MoveSourceTraits<_Tp>::_Type _SrcType; + return _SrcType(src); +} + +//Helper structs used for many class. +template +struct __move_traits_aux { + typedef typename __move_traits<_Tp>::implemented implemented; + typedef typename __move_traits<_Tp>::complete complete; +}; + +template +struct __move_traits_aux2 { + typedef __move_traits<_Tp1> _MoveTraits1; + typedef __move_traits<_Tp2> _MoveTraits2; + + typedef typename _Lor2::_Ret implemented; + typedef typename _Land2::_Ret complete; +}; + +/* + * Most of the time a class implement a move constructor but its use depends + * on a third party, this is what the following struct are for. + */ +template +struct __move_traits_help { + typedef __true_type implemented; + typedef typename __move_traits<_Tp>::complete complete; +}; + +template +struct __move_traits_help1 { + typedef __move_traits<_Tp1> _MoveTraits1; + typedef __move_traits<_Tp2> _MoveTraits2; + + typedef typename _Lor2::_Ret implemented; + typedef typename _Land2::_Ret complete; +}; + +template +struct __move_traits_help2 { + typedef __move_traits<_Tp1> _MoveTraits1; + typedef __move_traits<_Tp2> _MoveTraits2; + + typedef __stlp_movable implemented; + typedef typename _Land2::_Ret complete; +}; + +_STLP_MOVE_TO_STD_NAMESPACE + +_STLP_END_NAMESPACE + +#endif /* _STLP_MOVE_CONSTRUCT_FWK_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_new.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_new.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,208 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* 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. +* Neither the name of Nokia Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. + +* 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 HOLDER 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. +* +* Description: +* +*/ + +#ifndef _STLP_NEW_H_HEADER +# define _STLP_NEW_H_HEADER + +# ifdef _STLP_NO_BAD_ALLOC +# ifndef _STLP_NEW_DONT_THROW +# define _STLP_NEW_DONT_THROW 1 +# endif /* _STLP_NEW_DONT_THROW */ + +# include + + +_STLP_BEGIN_NAMESPACE + +#if defined(__SYMBIAN32__) && defined( __WINSCW__) +// already defined symcpp.h included from rvct2_2.h +struct nothrow_t {}; +#endif + + +# ifdef _STLP_OWN_IOSTREAMS +#ifdef __ARMCC__ +extern _STLP_DECLSPEC const nothrow_t nothrow; +#else +extern IMPORT_C const nothrow_t& GetNoThrowObj(); +#define nothrow GetNoThrowObj() +#endif +# else +# define nothrow nothrow_t() +# endif +#ifndef _STLP_EXCEPTION_BASE +# define _STLP_EXCEPTION_BASE exception +#endif + +class bad_alloc : public _STLP_EXCEPTION_BASE { +public: + bad_alloc () _STLP_NOTHROW_INHERENTLY { } + bad_alloc(const bad_alloc&) _STLP_NOTHROW_INHERENTLY { } + bad_alloc& operator=(const bad_alloc&) _STLP_NOTHROW_INHERENTLY {return *this;} + ~bad_alloc () _STLP_NOTHROW_INHERENTLY { } + const char* what() const _STLP_NOTHROW_INHERENTLY { return "bad alloc"; } +}; + +_STLP_END_NAMESPACE + +#endif /* _STLP_NO_BAD_ALLOC */ + +#if defined (_STLP_WINCE) +_STLP_BEGIN_NAMESPACE + +inline void* _STLP_CALL __stl_new(size_t __n) { + return ::malloc(__n); +} + +inline void _STLP_CALL __stl_delete(void* __p) { + free(__p); +} + +#ifndef __cdecl +# define __cdecl +#endif + +_STLP_END_NAMESPACE + +#else /* _STLP_WINCE */ + +#include + +# ifndef _STLP_NO_BAD_ALLOC +# ifdef _STLP_USE_OWN_NAMESPACE + + _STLP_BEGIN_NAMESPACE + using _STLP_VENDOR_EXCEPT_STD::bad_alloc; + using _STLP_VENDOR_EXCEPT_STD::nothrow_t; + using _STLP_VENDOR_EXCEPT_STD::nothrow; + +# if defined (_STLP_GLOBAL_NEW_HANDLER) + using ::new_handler; + using ::set_new_handler; +# else + using _STLP_VENDOR_EXCEPT_STD::new_handler; + using _STLP_VENDOR_EXCEPT_STD::set_new_handler; +# endif + + _STLP_END_NAMESPACE + +# endif /* _STLP_OWN_NAMESPACE */ + +# endif /* _STLP_NO_BAD_ALLOC */ + +# if defined (_STLP_NO_NEW_NEW_HEADER) || defined (_STLP_NEW_DONT_THROW) || defined (__SYMBIAN32__) \ + || defined (__WINS__) && ! defined (_STLP_CHECK_NULL_ALLOC) +# define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){_STLP_THROW(bad_alloc());}return __y +# if defined (__SYMBIAN32__) +//# define _STLP_NEW operator new +#define _STLP_NEW ::malloc +#endif +/* +# elif defined (__SYMBIAN32__) || defined (__WINS__) +# ifndef _STLP_USE_TRAP_LEAVE +# define _STLP_CHECK_NULL_ALLOC(__x) void* __y = __x;if (__y == 0){abort();}return __y +# else +# define _STLP_NEW(x) :: operator new (x, ELeave) +# define _STLP_CHECK_NULL_ALLOC(__x) return __x +# endif +*/ +# else +# define _STLP_CHECK_NULL_ALLOC(__x) return __x +# endif + +#ifndef _STLP_NEW +# define _STLP_NEW ::operator new +#endif +# define _STLP_PLACEMENT_NEW ::new + +_STLP_BEGIN_NAMESPACE + +#ifdef __SYMBIAN32__ + +typedef void(*new_handler)(); + +_STLP_DECLSPEC new_handler set_new_handler(new_handler pnew) throw(); + +#endif + +#if (( defined(__IBMCPP__)|| defined(__OS400__) || defined (__xlC__) || defined (qTidyHeap)) && defined(__DEBUG_ALLOC__) ) +inline void* _STLP_CALL __stl_new(size_t __n) { _STLP_CHECK_NULL_ALLOC(_STLP_NEW(__n, __FILE__, __LINE__)); } +inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p, __FILE__, __LINE__); } +#else +inline void* _STLP_CALL __stl_new(size_t __n) { return ::operator new(__n); } +inline void _STLP_CALL __stl_delete(void* __p) { ::operator delete(__p); } +#endif +_STLP_END_NAMESPACE + + +# endif /* _STLP_WINCE */ + +#if defined(__SYMBIAN32__) && !defined(__GCCE__) +_STLP_DECLSPEC void *operator new(unsigned int aSize); + +_STLP_DECLSPEC void *operator new[](unsigned int aSize); +#endif + +_STLP_DECLSPEC void operator delete(void* aPtr) throw(); + +_STLP_DECLSPEC void operator delete[](void* aPtr) throw(); + +_STLP_DECLSPEC void* operator new(unsigned int aSize, const std::nothrow_t& /*aNoThrow*/) throw(); + +_STLP_DECLSPEC void* operator new[](unsigned int aSize, const std::nothrow_t& aNoThrow) throw(); + +_STLP_DECLSPEC void operator delete(void* aPtr, const std::nothrow_t& /*aNoThrow*/) throw(); + +_STLP_DECLSPEC void operator delete[](void* aPtr, const std::nothrow_t& /*aNoThrow*/) throw(); + + +// placement delete +#ifndef __PLACEMENT_VEC_NEW_INLINE +#define __PLACEMENT_VEC_NEW_INLINE +inline void* operator new[](unsigned int /*aSize*/, void* aBase) throw() + {return aBase;} +inline void operator delete[](void* /*aPtr*/, void* /*aBase*/) throw() + { + + } +#endif + +#ifndef __PLACEMENT_NEW_INLINE +#define __PLACEMENT_NEW_INLINE +inline void* operator new(unsigned int /*aSize*/, void* aBase) throw() + {return aBase;} + +// Global placement operator delete +inline void operator delete(void* /*aPtr*/, void* /*aBase*/) throw() + {} +#endif //__PLACEMENT_NEW_INLINE + + +#endif /* _STLP_NEW_H_HEADER */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_null_stream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_null_stream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2000 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_NULL_STREAM_H +# define _STLP_NULL_STREAM_H + +_STLP_BEGIN_NAMESPACE + +struct __null_stream +{ + void flush() { } +}; + +template +__null_stream& operator <<(__null_stream& __x, const _Tp& ) +{ + return __x; +} + +template +__null_stream& operator >>(const _Tp&, __null_stream& __x ) +{ + return __x; +} + +extern __null_stream cin, cout, cerr, endl, ws, hex, dec; + +_STLP_END_NAMESPACE + +# endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_num_get.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_num_get.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,882 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_NUM_GET_C +#define _STLP_NUM_GET_C + +#ifndef _STLP_INTERNAL_NUM_GET_H +# include +#endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#ifndef _STLP_LIMITS_H +# include +#endif + +_STLP_DECLSPEC unsigned char* __get_digit_val_table(void); +_STLP_DECLSPEC char* __get_narrow_atoms(void); +_STLP_BEGIN_NAMESPACE + +extern const unsigned char __digit_val_table[]; + +template < class _InputIter, class _Integer, class _CharT> +_InputIter _STLP_CALL +_M_do_get_integer(_InputIter&, _InputIter&, ios_base&, ios_base::iostate&, _Integer&, _CharT*); + +// _M_do_get_integer and its helper functions. + +#ifdef __SYMBIAN32__ +template +inline bool _STLP_CALL __get_fdigit(_CharT& c, const _CharT* digits) + { + + const _CharT* p = find(digits, digits + 10, c); + if (p != digits + 10) { + c = (_CharT)( (_CharT)'0' + (p - digits)); + return true; + } + else + return false; +} + +#endif +inline bool _STLP_CALL __get_fdigit(char& __c, const char*) + { return __c >= '0' && __c <= '9'; } + +inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *) +{ + if (__c == __sep) { + __c = ',' ; + return true ; + } else + return ( __c >= '0' && __c <= '9'); +} + +# ifndef _STLP_NO_WCHAR_T + +// Similar, except return the character itself instead of the numeric +// value. Used for floating-point input. +inline bool _STLP_CALL __get_fdigit(wchar_t& c, const wchar_t* digits) +{ + const wchar_t* p = find(digits, digits + 10, c); + if (p != digits + 10) { + c = (char)('0' + (p - digits)); + return true; + } + else + return false; +} + +inline bool _STLP_CALL __get_fdigit_or_sep(wchar_t& c, wchar_t sep, + const wchar_t * digits) +{ + if (c == sep) { + c = (char)','; + return true; + } + else + return __get_fdigit(c, digits); +} +#ifdef __SYMBIAN32__ +template +inline bool _STLP_CALL __get_fdigit_or_sep(_CharT& c, _CharT sep, + const _CharT * digits) +{ + if (c == sep) { + c = (_CharT)','; + return true; + } + else + return __get_fdigit(c, digits); +} + + + +#endif +#endif +inline int _STLP_CALL +__get_digit_from_table(unsigned __index) +{ + return (__index > 127 ? 0xFF : __get_digit_val_table()[__index]); +} + +extern const char __narrow_atoms[]; + +template +int +_M_get_base_or_zero(_InputIter& __stl_in, _InputIter& __end, ios_base& __str, _CharT*) +{ + _CharT __atoms[5]; + const ctype<_CharT>& __c_type = use_facet< ctype<_CharT> >(__str.getloc()); + // const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__str._M_ctype_facet(); + + __c_type.widen(__get_narrow_atoms(), __get_narrow_atoms() + 5, __atoms); + + bool __negative = false; + _CharT __c = *__stl_in; + + if (__c == __atoms[1] /* __xminus_char */ ) { + __negative = true; + ++__stl_in; + } + else if (__c == __atoms[0] /* __xplus_char */ ) + ++__stl_in; + + + int __base; + int __valid_zero = 0; + + ios_base::fmtflags __basefield = __str.flags() & ios_base::basefield; + + switch (__basefield) { + case ios_base::oct: + __base = 8; + break; + case ios_base::dec: + __base = 10; + break; + case ios_base::hex: + __base = 16; + if (__stl_in != __end && *__stl_in == __atoms[2] /* __zero_char */ ) { + ++__stl_in; + if (__stl_in != __end && + (*__stl_in == __atoms[3] /* __x_char */ || *__stl_in == __atoms[4] /* __X_char */ )) + ++__stl_in; + else + __valid_zero = 1; // That zero is valid by itself. + } + break; + default: + if (__stl_in != __end && *__stl_in == __atoms[2] /* __zero_char */ ) { + ++__stl_in; + if (__stl_in != __end && + (*__stl_in == __atoms[3] /* __x_char */ || *__stl_in == __atoms[4] /* __X_char */ )) { + ++__stl_in; + __base = 16; + } + else + { + __base = 8; + __valid_zero = 1; // That zero is still valid by itself. + } + } + else + __base = 10; + break; + } + return (__base << 2) | ((int)__negative << 1) | __valid_zero; +} + + +template +bool _STLP_CALL +__get_integer(_InputIter& __first, _InputIter& __last, + int __base, _Integer& __val, + int __got, bool __is_negative, char __separator, const string& __grouping, const __true_type&) +{ + bool __ovflow = false; + bool __valid_group = true; + + _Integer __result = 0; + bool __is_group = !__grouping.empty(); +// char __group_sizes[64]; + char __group_sizes[256] = {0}; //group sizes can be more +#ifdef __SYMBIAN32__ +int __current_group_size = __got; +#else + int __current_group_size = 0; +#endif + char* __group_sizes_end = __group_sizes; + int prv_got = 0; + + + _Integer __over_base = (numeric_limits<_Integer>::min)() / __STATIC_CAST(_Integer, __base); + + for ( ; __first != __last ; ++__first) { + + const char __c = *__first; + + if (__is_group && __c == __separator) { + if (prv_got == __got) //no successive seperators + return false; + prv_got = __got; + *__group_sizes_end++ = __current_group_size; + __current_group_size = 0; + continue; + } + + int __n = __get_digit_from_table(__c); + + if (__n >= __base) + break; + + ++__got; + ++__current_group_size; + + if (__result < __over_base) + __ovflow = true; // don't need to keep accumulating + else { + _Integer __next = __STATIC_CAST(_Integer, __base * __result - __n); + if (__result != 0) +#ifdef __SYMBIAN32__ + if (__is_negative) + __ovflow = __ovflow || __next >= __result; + else + __ovflow = __ovflow || (__next-1) >= __result; //For signed char, the ranges are -128 to 127, +#else + __ovflow = __ovflow || __next >= __result; +#endif + __result = __next; + } + } + + if (__is_group && __group_sizes_end != __group_sizes) { + *__group_sizes_end++ = __current_group_size; + + } + + // fbp : added to not modify value if nothing was read + if (__got > 0) { + __val = __ovflow + ? __is_negative ? (numeric_limits<_Integer>::min)() + : (numeric_limits<_Integer>::max)() + : (__is_negative ? __result : __STATIC_CAST(_Integer, -__result)); + } + __valid_group = __valid_grouping(__group_sizes, __group_sizes_end, + __grouping.data(), __grouping.data()+ __grouping.size()); + + if (__valid_group == false) + __val = 0; + + // overflow is being treated as failure + return ((__got > 0) && !__ovflow) && (__is_group == 0 || __valid_group) ; +} + +template +bool _STLP_CALL +__get_integer(_InputIter& __first, _InputIter& __last, + int __base, _Integer& __val, + int __got, bool __is_negative, char __separator, const string& __grouping, const __false_type&) +{ + bool __ovflow = false; + bool __valid_group = true; + _Integer __result = 0; + bool __is_group = !__grouping.empty(); +// char __group_sizes[64]; + char __group_sizes[256] = {0};//group sizes can be more + int __current_group_size = 0; + char* __group_sizes_end = __group_sizes; + int prv_got = 0; + + + _Integer __over_base = (numeric_limits<_Integer>::max)() / __STATIC_CAST(_Integer, __base); + + for ( ; __first != __last ; ++__first) { + + const char __c = *__first; +/* + //if (__is_group && __c == __separator) { //no seperator at the start of number. + if (__is_group && __c == __separator && __got) { + // seperator should come after extracting some digits + if (!__current_group_size) + break; + *__group_sizes_end++ = __current_group_size; + __current_group_size = 0; + continue; + } +*/ + if (__is_group && __c == __separator) { + if (prv_got == __got) //no successive seperators + return false; + prv_got = __got; + *__group_sizes_end++ = __current_group_size; + __current_group_size = 0; + continue; + } + int __n = __get_digit_from_table(__c); + + if (__n >= __base) + break; + + ++__got; + ++__current_group_size; + + if (__result > __over_base) + __ovflow = true; //don't need to keep accumulating + else { + _Integer __next = __STATIC_CAST(_Integer, __base * __result + __n); + if (__result != 0) + __ovflow = __ovflow || __next <= __result; + __result = __next; + } + } + + if (__is_group && __group_sizes_end != __group_sizes) { + *__group_sizes_end++ = __current_group_size; + } + + // fbp : added to not modify value if nothing was read + if (__got > 0) { + __val = __ovflow + ? (numeric_limits<_Integer>::max)() + : (__is_negative ? __STATIC_CAST(_Integer, -__result) : __result); + } + __valid_group = __valid_grouping(__group_sizes, __group_sizes_end, + __grouping.data(), __grouping.data()+ __grouping.size()); + + if (__valid_group == false) + __val = 0; + + // overflow is being treated as failure + return ((__got > 0) && !__ovflow) && + (__is_group == 0 ||__valid_group) ; +} + + +template +bool _STLP_CALL +__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val) +{ + string __grp; + return __get_integer(__first, __last, 10, __val, 0, false, ' ', __grp, __false_type()); +} + +template +_InputIter _STLP_CALL +_M_do_get_integer(_InputIter& __stl_in, _InputIter& __end, ios_base& __str, + ios_base::iostate& __err, _Integer& __val, _CharT* __pc) +{ + +#if defined(__HP_aCC) && (__HP_aCC == 1) + bool _IsSigned = !((_Integer)(-1) > 0); +#else + typedef typename __bool2type::is_signed>::_Ret _IsSigned; +#endif + + //const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__str._M_numpunct_facet(); + const numpunct<_CharT>& __numpunct = use_facet< numpunct<_CharT> >(__str.getloc()); +// const string& __grouping = __str._M_grouping(); // cached copy //stdcxx fix - 11/1/06 + const string& __grouping = __numpunct.grouping(); + + + const int __base_or_zero = _M_get_base_or_zero(__stl_in, __end, __str, __pc); + int __got = __base_or_zero & 1; + + bool __result; + + if (__stl_in == __end) { // We may have already read a 0. If so, + + if (__got > 0) { // the result is 0 even if we're at eof. + __val = 0; + __result = true; + } + else + __result = false; + } else { + + const bool __negative = __base_or_zero & 2; + const int __base = __base_or_zero >> 2; + +#if defined(__HP_aCC) && (__HP_aCC == 1) + if (_IsSigned) + __result = __get_integer(__stl_in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __true_type() ); + else + __result = __get_integer(__stl_in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, __false_type() ); +#else +#ifdef __SYMBIAN32__ + _Integer __tval; + __result = __get_integer(__stl_in, __end, __base, __tval, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned()); + if(__result) + __val = __tval; +#else + __result = __get_integer(__stl_in, __end, __base, __val, __got, __negative, __numpunct.thousands_sep(), __grouping, _IsSigned()); +#endif +# endif + } + + __err = __STATIC_CAST(ios_base::iostate, __result ? ios_base::goodbit : ios_base::failbit); + + if (__stl_in == __end) + __err |= ios_base::eofbit; + return __stl_in; +} + +// _M_read_float and its helper functions. +template +_InputIter _STLP_CALL +__copy_sign(_InputIter __first, _InputIter __last, string& __v, + _CharT __xplus, _CharT __xminus) { + if (__first != __last) { + _CharT __c = *__first; + if (__c == __xplus) + ++__first; + else if (__c == __xminus) { + __v.push_back('-'); + ++__first; + } + } + return __first; +} + + +template +bool _STLP_CALL +__copy_digits(_InputIter& __first, _InputIter& __last, + string& __v, const _CharT* __digits) +{ + bool __ok = false; + + for ( ; __first != __last; ++__first) { + _CharT __c = *__first; + if (__get_fdigit(__c, __digits)) { + __v.push_back((char)__c); + __ok = true; + } + else + break; + } + return __ok; +} + +template +bool _STLP_CALL +__copy_grouped_digits(_InputIter& __first, _InputIter& __last, + string& __v, const _CharT * __digits, + _CharT __sep, const string& __grouping, + bool& __grouping_ok) +{ + bool __ok = false; +// char __group_sizes[64]; + char __group_sizes[256] = {0};//group sizes can be more + char*__group_sizes_end = __group_sizes; + char __current_group_size = 0; + + for ( ; __first != __last; ++__first) { + _CharT __c = *__first; + bool __tmp = __get_fdigit_or_sep(__c, __sep, __digits); + if (__tmp) { + if (__c == ',') { + // seperator should come after extracting some digits + if (!__current_group_size) + break; + + *__group_sizes_end++ = __current_group_size; + __current_group_size = 0; + } + else { + __ok = true; + __v.push_back((char)__c); + ++__current_group_size; + } + } + else + break; + } + + if (__group_sizes_end != __group_sizes) + *__group_sizes_end++ = __current_group_size; + __grouping_ok = __valid_grouping(__group_sizes, __group_sizes_end, __grouping.data(), __grouping.data() + __grouping.size()); + __ok = __ok & __grouping_ok; //Added, to check for valid grouping. If not valid grouping should return false. + return __ok; +} + + +template +bool _STLP_CALL +_M_read_float(string& __buf, _InputIter& __stl_in, _InputIter& __end, ios_base& __s, _CharT*) +{ + // Create a string, copying characters of the form + // [+-]? [0-9]* .? [0-9]* ([eE] [+-]? [0-9]+)? + + bool __digits_before_dot /* = false */; + bool __digits_after_dot = false; + bool __ok; + + bool __grouping_ok = true; + + const ctype<_CharT>& __ct = use_facet< ctype<_CharT> >(__s.getloc()); + // const ctype<_CharT>& __ct = *(const ctype<_CharT>*)__s._M_ctype_facet(); + //const numpunct<_CharT>& __numpunct = *(const numpunct<_CharT>*)__s._M_numpunct_facet(); + const numpunct<_CharT>& __numpunct = use_facet< numpunct<_CharT> >(__s.getloc()); +// const string& __grouping = __s._M_grouping(); // cached copy //stdcxx fix - 11/1/06 + const string& __grouping = __numpunct.grouping(); + + _CharT __dot = __numpunct.decimal_point(); + _CharT __sep = __numpunct.thousands_sep(); + + _CharT __digits[10]; + _CharT __xplus; + _CharT __xminus; + + _CharT __pow_e; + _CharT __pow_E; + + _Initialize_get_float(__ct, __xplus, __xminus, __pow_e, __pow_E, __digits); + + // Get an optional sign + __stl_in = __copy_sign(__stl_in, __end, __buf, __xplus, __xminus); + + // Get an optional string of digits. + if (__grouping.size() != 0) + __digits_before_dot = __copy_grouped_digits(__stl_in, __end, __buf, __digits, + __sep, __grouping, __grouping_ok); + else + __digits_before_dot = __copy_digits(__stl_in, __end, __buf, __digits); + + // Get an optional decimal point, and an optional string of digits. + if (__stl_in != __end && *__stl_in == __dot) { + __buf.push_back('.'); + ++__stl_in; + __digits_after_dot = __copy_digits(__stl_in, __end, __buf, __digits); + } + + // There have to be some digits, somewhere. + __ok = __digits_before_dot || __digits_after_dot; + + // Get an optional exponent. + if (__ok && __stl_in != __end && (*__stl_in == __pow_e || *__stl_in == __pow_E)) { + __buf.push_back('e'); + ++__stl_in; + __stl_in = __copy_sign(__stl_in, __end, __buf, __xplus, __xminus); + __ok = __copy_digits(__stl_in, __end, __buf, __digits); + // If we have an exponent then the sign + // is optional but the digits aren't. + } + + return __ok; +} + +// +// num_get<>, num_put<> +// + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +template +locale::id num_get<_CharT, _InputIterator>::id; +#endif +# else + +typedef num_get num_get_char; +typedef num_get > > num_get_char_2; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, num_get_char::id, ); +__DECLARE_INSTANCE(locale::id, num_get_char_2::id, ); +#endif + +# ifndef _STLP_NO_WCHAR_T + +typedef num_get num_get_wchar_t; +typedef num_get > > num_get_wchar_t_2; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, num_get_wchar_t::id, ); +__DECLARE_INSTANCE(locale::id, num_get_wchar_t_2::id, ); +#endif + +# endif + +# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +# ifndef _STLP_NO_BOOL +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, + ios_base& __s, + ios_base::iostate& __err, bool& __x) const +{ + if (__s.flags() & ios_base::boolalpha) { + locale __loc = __s.getloc(); + //const _Numpunct& __np = *(const _Numpunct*)__s._M_numpunct_facet(); + const numpunct<_CharT>& __np = use_facet >(__loc) ; +// const ctype<_CharT>& __ct = use_facet >(__loc) ; + + const basic_string<_CharT> __truename = __np.truename(); + const basic_string<_CharT> __falsename = __np.falsename(); + bool __true_ok = true; + bool __false_ok = true; + + size_t __n = 0; + for ( ; __stl_in != __end; ++__stl_in) { + _CharT __c = *__stl_in; + __true_ok = __true_ok && (__c == __truename[__n]); + __false_ok = __false_ok && (__c == __falsename[__n]); + ++__n; + + if ((!__true_ok && !__false_ok) || + (__true_ok && __n >= __truename.size()) || + (__false_ok && __n >= __falsename.size())) { + + if (__true_ok || __false_ok) //if anything OK then increment, else, break + ++__stl_in; + break; + } + } + // stdcxx fix, Changed to check for complete true,false string + if (__true_ok && __n < __truename.size()) + { + for ( ; __stl_in != __end; ++__stl_in) { + _CharT __c = *__stl_in; + __true_ok = __true_ok && (__c == __truename[__n]); + ++__n; + if ((!__true_ok) ||(__true_ok && __n >= __truename.size()) ) + { + if(__true_ok) + ++__stl_in; + break; + } + + } + if (__true_ok && __n < __truename.size()) + __true_ok = false; + } + if (__false_ok && __n < __falsename.size()) + { + + for ( ; __stl_in != __end; ++__stl_in) { + _CharT __c = *__stl_in; + __false_ok = __false_ok && (__c == __falsename[__n]); + ++__n; + if ((!__false_ok) ||(__false_ok && __n >= __falsename.size()) ) + { + if(__false_ok) + ++__stl_in; + break; + } + + } + if (__false_ok && __n < __falsename.size()) + __false_ok = false; + } + + if (__true_ok || __false_ok) { + __err = ios_base::goodbit; + __x = __true_ok; + } + else + __err = ios_base::failbit; + + if (__stl_in == __end) + __err |= ios_base::eofbit; + + return __stl_in; + } + + else { + long __lx; + _InputIter __tmp = this->do_get(__stl_in, __end, __s, __err, __lx); + if (!(__err & ios_base::failbit)) { + if (__lx == 0) + __x = false; + else if (__lx == 1) + __x = true; + else + __err |= ios_base::failbit; + } + return __tmp; + } +} + +# endif /* _STLP_NO_BOOL */ + +//# ifdef _STLP_FIX_LIBRARY_ISSUES +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, short& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, int& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +//# endif + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, long& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + unsigned short& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + unsigned int& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + unsigned long& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + float& __val) const { + string __buf ; + bool __ok = _M_read_float(__buf, __stl_in, __end, __str, (_CharT*)0 ); + if(__ok) //If success reading float then convert it. + { +#ifdef __SYMBIAN32__ + float __tval; + __ok = __string_to_float(__buf, __tval); + if(__ok) + __val = __tval; +#else + __string_to_float(__buf, __val); +#endif + } + __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit); + if (__stl_in == __end) + __err |= ios_base::eofbit; + return __stl_in; +} + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + double& __val) const { + string __buf ; + bool __ok = _M_read_float(__buf, __stl_in, __end, __str, (_CharT*)0 ); + if(__ok) //If success reading float then convert it. + { +#ifdef __SYMBIAN32__ + double __tval; + __ok = __string_to_float(__buf, __tval); + if(__ok) + __val = __tval; +#else + __string_to_float(__buf, __val); +#endif + } + __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit); + if (__stl_in == __end) + __err |= ios_base::eofbit; + return __stl_in; +} + +#ifndef _STLP_NO_LONG_DOUBLE +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + long double& __val) const { + string __buf ; + bool __ok = _M_read_float(__buf, __stl_in, __end, __str, (_CharT*)0 ); + if(__ok) //If success reading float then convert it. + { +#ifdef __SYMBIAN32__ + long double __tval; + __ok = __string_to_float(__buf, __tval); + if(__ok) + __val = __tval; +#else + __string_to_float(__buf, __val); +#endif + } + __err = __STATIC_CAST(ios_base::iostate, __ok ? ios_base::goodbit : ios_base::failbit); + if (__stl_in == __end) + __err |= ios_base::eofbit; + return __stl_in; +} +#endif /* _STLP_NO_LONG_DOUBLE */ + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + void*& __p) const { +#ifdef __SYMBIAN32__ + unsigned long __val; //using only long +#else +# if defined(_STLP_LONG_LONG)&&!defined(__MRC__) //*ty 12/07/2001 - MrCpp can not cast from long long to void* + unsigned _STLP_LONG_LONG __val; +# else + unsigned long __val; +# endif +#endif //__SYMBIAN32__ +#ifdef __SYMBIAN32__ + ios_base::fmtflags __save_flags = __str.flags(); + + __str.setf(ios_base::hex, ios_base::basefield); + __str.setf(ios_base::showbase); + __str.setf(ios_base::internal, ios_base::adjustfield); + __str.width((sizeof(void*) * 2) + 2); +#endif // __SYMBIAN32__ + iter_type __tmp = _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); + if (!(__err & ios_base::failbit)) + __p = __REINTERPRET_CAST(void*,(long)__val); +#ifdef __SYMBIAN32__ + __str.flags(__save_flags); +#endif //__SYMBIAN32__ + return __tmp; + } + + +#ifdef _STLP_LONG_LONG + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + _STLP_LONG_LONG& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +template +_InputIter +num_get<_CharT, _InputIter>::do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + unsigned _STLP_LONG_LONG& __val) const { + return _M_do_get_integer(__stl_in, __end, __str, __err, __val, (_CharT*)0 ); +} + +#endif /* _STLP_LONG_LONG */ + +_STLP_END_NAMESPACE + +# endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ + +#endif /* _STLP_NUMERIC_FACETS_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_num_get.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_num_get.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,316 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_NUM_GET_H +#define _STLP_INTERNAL_NUM_GET_H + +#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H +# include +#endif + +# ifndef _STLP_C_LOCALE_H +# include +# endif + +#ifndef _STLP_INTERNAL_NUMPUNCT_H +# include +#endif +#ifndef _STLP_INTERNAL_CTYPE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// num_get facets + +# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES +template +# else +template > +# endif +#ifdef __SYMBIAN32__ +class num_get : public locale::facet +#else +class num_get: public locale::facet +#endif +{ + friend class _Locale; +public: + typedef _CharT char_type; + typedef _InputIter iter_type; + + explicit num_get(size_t __refs = 0): locale::facet(__refs) {} + +# ifndef _STLP_NO_BOOL + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, bool& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } +# endif + +//# ifdef _STLP_FIX_LIBRARY_ISSUES + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, short& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, int& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } +//# endif + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, long& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned short& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned int& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned long& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + +#ifdef _STLP_LONG_LONG + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, _STLP_LONG_LONG& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + +#endif /* _STLP_LONG_LONG */ + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, float& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, double& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + +# ifndef _STLP_NO_LONG_DOUBLE + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, long double& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } +# endif + + _InputIter get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, void*& __val) const { + return do_get(__stl_in, __end, __str, __err, __val); + } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >* ); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char**); + +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + ~num_get() {} + + typedef string string_type; + typedef ctype<_CharT> _Ctype; + typedef numpunct<_CharT> _Numpunct; + +# ifndef _STLP_NO_BOOL + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, + ios_base& __str, ios_base::iostate& __err, bool& __val) const; +# endif + + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, long& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned short& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned int& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned long& __val) const; +//# ifdef _STLP_FIX_LIBRARY_ISSUES + // issue 118 : those are actually not supposed to be here + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, short& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, int& __val) const; +//# endif + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, float& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, double& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, + void*& __p) const; + +#ifndef _STLP_NO_LONG_DOUBLE + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, long double& __val) const; +#endif /* _STLP_NO_LONG_DOUBLE */ + +#ifdef _STLP_LONG_LONG + + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, _STLP_LONG_LONG& __val) const; + virtual _InputIter do_get(_InputIter __stl_in, _InputIter __end, ios_base& __str, + ios_base::iostate& __err, unsigned _STLP_LONG_LONG& __val) const; +#endif /* _STLP_LONG_LONG */ + +}; + + +# ifdef _STLP_USE_TEMPLATE_EXPORT +_STLP_EXPORT_TEMPLATE_CLASS num_get > >; +// _STLP_EXPORT_TEMPLATE_CLASS num_get; +# ifndef _STLP_NO_WCHAR_T +_STLP_EXPORT_TEMPLATE_CLASS num_get > >; +// _STLP_EXPORT_TEMPLATE_CLASS num_get; +# endif /* _STLP_NO_WCHAR_T */ +# endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +_STLP_DECLSPEC extern bool _STLP_CALL __valid_grouping(const char*, const char*, const char*, const char*); + +template +bool _STLP_CALL +__get_decimal_integer(_InputIter& __first, _InputIter& __last, _Integer& __val); + +inline bool _STLP_CALL __get_fdigit(char& __c, const char*); +inline bool _STLP_CALL __get_fdigit_or_sep(char& __c, char __sep, const char *); +# ifndef _STLP_NO_WCHAR_T +inline bool _STLP_CALL __get_fdigit(wchar_t&, const wchar_t*); +inline bool _STLP_CALL __get_fdigit_or_sep(wchar_t&, wchar_t, const wchar_t*); +# endif + +inline void _STLP_CALL +_Initialize_get_float(const ctype&, + char& Plus, char& Minus, + char& pow_e, char& pow_E, + char*) +{ + Plus = '+'; + Minus = '-'; + pow_e = 'e'; + pow_E = 'E'; +} +// Helper functions for _M_do_get_float. + +# ifndef _STLP_NO_WCHAR_T + +inline void _STLP_CALL +_Initialize_get_float( const ctype& ct, + wchar_t& Plus, wchar_t& Minus, + wchar_t& pow_e, wchar_t& pow_E, + wchar_t* digits) +{ + char ndigits[11] = "0123456789"; + Plus = ct.widen('+'); + Minus = ct.widen('-'); + pow_e = ct.widen('e'); + pow_E = ct.widen('E'); + ct.widen(ndigits + 0, ndigits + 10, digits); +} + +# endif /* WCHAR_T */ + +#ifdef __SYMBIAN32__ +template +inline void _STLP_CALL +_Initialize_get_float( const ctype<_CharT>& ct, + _CharT& Plus, _CharT& Minus, + _CharT& pow_e, _CharT& pow_E, + _CharT* digits) +{ + char ndigits[11] = "0123456789"; + Plus = ct.widen('+'); + Minus = ct.widen('-'); + pow_e = ct.widen('e'); + pow_E = ct.widen('E'); + ct.widen(ndigits + 0, ndigits + 10, digits); +} +#endif + +int _STLP_CALL __string_to_float(const string&, float&); +int _STLP_CALL __string_to_float(const string&, double&); +# ifndef _STLP_NO_LONG_DOUBLE +int _STLP_CALL __string_to_float(const string&, long double&); +# endif +# endif + +# if defined (__BORLANDC__) && defined (_RTLDLL) +inline void _Stl_loc_init_num_get() { +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + num_get > >::GetFacetLocaleId()._M_index = 12; + num_get::GetFacetLocaleId()._M_index = 13; +#else + num_get > >::id._M_index = 12; + num_get::id._M_index = 13; +#endif +# ifndef _STLP_NO_WCHAR_T +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + num_get > >::GetFacetLocaleId()._M_index = 31; + num_get::GetFacetLocaleId()._M_index = 32; +#else + num_get > >::id._M_index = 31; + num_get::id._M_index = 32; +#endif +# endif +} +# endif + +_STLP_DECLSPEC unsigned char* _STLP_CALL __get_digit_val_table(void); +_STLP_DECLSPEC char* _STLP_CALL __get_narrow_atoms(void); +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_NUM_GET_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_num_put.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_num_put.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,673 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_NUM_PUT_C +#define _STLP_NUM_PUT_C + +#ifndef _STLP_INTERNAL_NUM_PUT_H +# include +#endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#ifndef _STLP_LIMITS_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +// _M_do_put_float and its helper functions. Strategy: write the output +// to a buffer of char, transform the buffer to _CharT, and then copy +// it to the output. + +template +_OutputIter _STLP_CALL +_M_do_put_float(_OutputIter __s, ios_base& __f, _CharT __fill,_Float __x); + + +//---------------------------------------------------------------------- +// num_put facet + +template +_OutputIter _STLP_CALL +__copy_float_and_fill(const _CharT* __first, const _CharT* __last, + _OutputIter __stl_out, + ios_base::fmtflags __flags, + streamsize __width, _CharT __fill, + _CharT __xplus, _CharT __xminus) { + if (__width <= __last - __first) + return copy(__first, __last, __stl_out); + else { + streamsize __pad = __width - (__last - __first); + ios_base::fmtflags __dir = __flags & ios_base::adjustfield; + + if (__dir == ios_base::left) { + __stl_out = copy(__first, __last, __stl_out); + return fill_n(__stl_out, __pad, __fill); + } + else if (__dir == ios_base::internal && __first != __last && + (*__first == __xplus || *__first == __xminus)) { + *__stl_out++ = *__first++; + __stl_out = fill_n(__stl_out, __pad, __fill); + return copy(__first, __last, __stl_out); + } + else { + __stl_out = fill_n(__stl_out, __pad, __fill); + return copy(__first, __last, __stl_out); + } + } +} + +#ifndef _STLP_NO_WCHAR_T +// Helper routine for wchar_t +template +_OutputIter _STLP_CALL +__put_float(char* __ibuf, char* __iend, _OutputIter __stl_out, + ios_base& __f, wchar_t __fill, + wchar_t __decimal_point, + wchar_t __sep, const string& __grouping) +{ + //const ctype& __ct = *(ctype*)__f._M_ctype_facet() ; + const ctype& __ct = use_facet< ctype >(__f.getloc()); + + // wchar_t __wbuf[128]; //stdcxx fix + wchar_t __wbuf[256+10]; + wchar_t* __eend = __convert_float_buffer(__ibuf, __iend, __wbuf, + __ct, __decimal_point); + if (!__grouping.empty()) { + // In order to do separator-insertion only to the left of the + // decimal point, we adjust the size of the first (right-most) + // group. We need to be careful if there is only one entry in + // grouping: in this case we need to duplicate the first entry. + + string __new_grouping = __grouping; + wchar_t* __decimal_pos = find(__wbuf, __eend, __decimal_point); + if (__grouping.size() == 1) + __new_grouping.push_back(__grouping[0]); + + // dwa 1/24/00 - try as I might, there doesn't seem to be a way + // to suppress the warning + __new_grouping[0] += __STATIC_CAST(char, __eend - __decimal_pos); + ptrdiff_t __len = __insert_grouping(__wbuf, __eend, __new_grouping, + __sep, + __ct.widen('+'), __ct.widen('-'), + 0); + __eend = __wbuf + __len; + } + + return __copy_float_and_fill(__wbuf, __eend, __stl_out, + __f.flags(), __f.width(0), __fill, + __ct.widen('+'), __ct.widen('-')); +} +# endif /* WCHAR_T */ + +#ifdef __SYMBIAN32__ +template +ptrdiff_t _STLP_CALL +__insert_grouping(_CharT * first, _CharT * last, const string& grouping, + _CharT separator, _CharT Plus, _CharT Minus, int basechars) +{ + int length = last-first; + ptrdiff_t res; + char* str = new char(length+64); //morespace for seperators + memset(str,'\0',length+64); + memcpy(str,first, length); + char _separator = (char)separator; + char _Plus = (char)Plus; + char _Minus = (char)Minus; + + res = __insert_grouping(str, str+length, grouping, + _separator, _Plus, _Minus, basechars); + memcpy(first,str,res); + delete str; + return res; + +} + +#endif +// Helper routine for char +template +_OutputIter _STLP_CALL +__put_float(char* __ibuf, char* __iend, _OutputIter __stl_out, + ios_base& __f, char __fill, + char __decimal_point, + char __sep, const string& __grouping) +{ + __adjust_float_buffer(__ibuf, __iend, __decimal_point); + if (!__grouping.empty()) { + string __new_grouping = __grouping; + const char * __decimal_pos = find(__ibuf, __iend, __decimal_point); + if (__grouping.size() == 1) + __new_grouping.push_back(__grouping[0]); + __new_grouping[0] += __STATIC_CAST(char, (__iend - __decimal_pos)); + ptrdiff_t __len = __insert_grouping(__ibuf, __iend, __new_grouping, + __sep, '+', '-', 0); + __iend = __ibuf + __len; + } + + return __copy_float_and_fill(__ibuf, __iend, __stl_out, + __f.flags(), __f.width(0), __fill, '+', '-'); +} + +#ifdef __SYMBIAN32__ + +template +_OutputIter _STLP_CALL +__put_float(char* __ibuf, char* __iend, _OutputIter __stl_out, + ios_base& __f, _CharT __fill, + _CharT __decimal_point, + _CharT __sep, const string& __grouping) +{ + __adjust_float_buffer(__ibuf, __iend, __decimal_point); + if (!__grouping.empty()) { + string __new_grouping = __grouping; + const char * __decimal_pos = find(__ibuf, __iend, __decimal_point); + if (__grouping.size() == 1) + __new_grouping.push_back(__grouping[0]); + __new_grouping[0] += __STATIC_CAST(char, (__iend - __decimal_pos)); + ptrdiff_t __len = __insert_grouping(__ibuf, __iend, __new_grouping, + __sep, '+', '-', 0); + __iend = __ibuf + __len; + } + + _CharT __wbuf[64]; + locale __loc = __f.getloc(); + const ctype<_CharT>& __ct = use_facet >(__loc); + __ct.widen(__ibuf, __iend, __wbuf); + + ptrdiff_t __len = __iend - __ibuf; + return __copy_float_and_fill(__wbuf, __wbuf+__len, __stl_out, + __f.flags(), __f.width(0), __fill, (_CharT)'+', (_CharT)'-'); +} + + +#endif +template +_OutputIter _STLP_CALL +_M_do_put_float(_OutputIter __s, ios_base& __f, + _CharT __fill, _Float __x) +{ + string __buf; + __buf.reserve(256+10); //+2 - 10/1/07 + __write_float(__buf, __f.flags(), (int)__f.precision(), __x); + + //const numpunct<_CharT>& __np = *(const numpunct<_CharT>*)__f._M_numpunct_facet(); + const numpunct<_CharT>& __np = use_facet< numpunct<_CharT> >(__f.getloc()); + + return __put_float(__CONST_CAST(char*, __buf.c_str()), + __CONST_CAST(char*, __buf.c_str()) + __buf.size(), + __s, __f, __fill, + __np.decimal_point(), + // __np.thousands_sep(), __f._M_grouping()); //stdcxx fix - 17/1/07 + __np.thousands_sep(), __np.grouping()); +} + +// _M_do_put_integer and its helper functions. + +template +_OutputIter _STLP_CALL +__copy_integer_and_fill(const _CharT* __buf, ptrdiff_t __len, + _OutputIter __stl_out, + ios_base::fmtflags __flg, streamsize __wid, _CharT __fill, + _CharT __xplus, _CharT __xminus) +{ + if (__len >= __wid) + return copy(__buf, __buf + __len, __stl_out); + else { + ptrdiff_t __pad = __wid - __len; + ios_base::fmtflags __dir = __flg & ios_base::adjustfield; + + if (__dir == ios_base::left) { + __stl_out = copy(__buf, __buf + __len, __stl_out); + return fill_n(__stl_out, __pad, __fill); + } + else if (__dir == ios_base::internal && __len != 0 && + (__buf[0] == __xplus || __buf[0] == __xminus)) { + *__stl_out++ = __buf[0]; + __stl_out = fill_n(__stl_out, __pad, __fill); + return copy(__buf + 1, __buf + __len, __stl_out); + } + else if (__dir == ios_base::internal && __len >= 2 && + (__flg & ios_base::showbase) && + (__flg & ios_base::basefield) == ios_base::hex) { + *__stl_out++ = __buf[0]; + *__stl_out++ = __buf[1]; + __stl_out = fill_n(__stl_out, __pad, __fill); + return copy(__buf + 2, __buf + __len, __stl_out); + } + else { + __stl_out = fill_n(__stl_out, __pad, __fill); + return copy(__buf, __buf + __len, __stl_out); + } + } +} + +#ifndef _STLP_NO_WCHAR_T +// Helper function for wchar_t +template +_OutputIter _STLP_CALL +__put_integer(char* __buf, char* __iend, _OutputIter __s, + ios_base& __f, + ios_base::fmtflags __flags, wchar_t __fill) +{ + locale __loc = __f.getloc(); + const ctype& __ct = use_facet >(__loc); + //const ctype& __ct = *(const ctype*)__f._M_ctype_facet(); + + wchar_t __xplus = __ct.widen('+'); + wchar_t __xminus = __ct.widen('-'); + + wchar_t __wbuf[64]; + __ct.widen(__buf, __iend, __wbuf); + ptrdiff_t __len = __iend - __buf; + wchar_t* __eend = __wbuf + __len; + + const numpunct& __np = use_facet >(__loc); + const string& __grouping = __np.grouping(); + + //const numpunct& __np = *(const numpunct*)__f._M_numpunct_facet(); + // const string& __grouping = __f._M_grouping(); + + if (!__grouping.empty()) { + int __basechars; + if (__flags & ios_base::showbase) + switch (__flags & ios_base::basefield) { + case ios_base::hex: __basechars = 2; break; + case ios_base::oct: __basechars = 1; break; + default: __basechars = 0; + } + else + __basechars = 0; + + __len = __insert_grouping(__wbuf, __eend, __grouping, __np.thousands_sep(), + __xplus, __xminus, __basechars); + } + + return __copy_integer_and_fill((wchar_t*)__wbuf, __len, __s, + __flags, __f.width(0), __fill, __xplus, __xminus); +} +#endif + +#ifdef __SYMBIAN32__ +template +_OutputIter _STLP_CALL +__put_integer(char* __buf, char* __iend, _OutputIter __s, + ios_base& __f, + ios_base::fmtflags __flags, _CharT __fill) +{ + locale __loc = __f.getloc(); + const ctype<_CharT>& __ct = use_facet >(__loc); + //const ctype& __ct = *(const ctype*)__f._M_ctype_facet(); + + _CharT __xplus = '+'; + _CharT __xminus = '-'; + + _CharT __wbuf[64]; + + ptrdiff_t __len = __iend - __buf; + _CharT* __eend = __wbuf + __len; + + + const numpunct& __np = use_facet >(__loc); + const string& __grouping = __np.grouping(); + + //const numpunct& __np = *(const numpunct*)__f._M_numpunct_facet(); + // const string& __grouping = __f._M_grouping(); + + if (!__grouping.empty()) { + int __basechars; + if (__flags & ios_base::showbase) + switch (__flags & ios_base::basefield) { + case ios_base::hex: __basechars = 2; break; + case ios_base::oct: __basechars = 1; break; + default: __basechars = 0; + } + else + __basechars = 0; + + __len = __insert_grouping(__buf, __iend, __grouping, __np.thousands_sep(), + __ct.narrow( __xplus, '+'), __ct.narrow(__xminus, '-'), __basechars); + __ct.widen(__buf, __iend, __wbuf); + + } + + return __copy_integer_and_fill(__wbuf, __len, __s, + __flags, __f.width(0), __fill, __xplus, __xminus); +} + + +#endif +// Helper function for char +template +_OutputIter _STLP_CALL +__put_integer(char* __buf, char* __iend, _OutputIter __s, + ios_base& __f, ios_base::fmtflags __flags, char __fill) +{ + ptrdiff_t __len = __iend - __buf; + char __grpbuf[64]; + + // const numpunct& __np = use_facet >(__f.getloc()); + // const string& __grouping = __np.grouping(); + + const numpunct& __np = *(const numpunct*)__f._M_numpunct_facet(); +// const string& __grouping = __f._M_grouping(); //stdcxx fix, 17/1/07 + const string& __grouping = __np.grouping(); + + if (!__grouping.empty()) { + int __basechars; + if (__flags & ios_base::showbase) + switch (__flags & ios_base::basefield) { + case ios_base::hex: __basechars = 2; break; + case ios_base::oct: __basechars = 1; break; + default: __basechars = 0; + } + else + __basechars = 0; + + // make sure there is room at the end of the buffer + // we pass to __insert_grouping + + copy(__buf, __iend, (char *) __grpbuf); + __buf = __grpbuf; + __iend = __grpbuf + __len; + __len = __insert_grouping(__buf, __iend, __grouping, __np.thousands_sep(), + '+', '-', __basechars); + } + + return __copy_integer_and_fill(__buf, __len, __s, __flags, __f.width(0), __fill, '+', '-'); +} + +#ifdef _STLP_LONG_LONG +typedef _STLP_LONG_LONG __max_int_t; +typedef unsigned _STLP_LONG_LONG __umax_int_t; +#else +typedef long __max_int_t; +typedef unsigned long __umax_int_t; +#endif + +extern _STLP_DECLSPEC const char* get_hex_char_table_lo(); +extern _STLP_DECLSPEC const char* get_hex_char_table_hi(); + +template +inline char* _STLP_CALL +__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __true_type& /* is_signed */) +{ + const bool __negative = __x < 0 ; + __max_int_t __temp = __x; + __umax_int_t __utemp = __negative?-__temp:__temp; + + for (; __utemp != 0; __utemp /= 10) + *--__ptr = (int)(__utemp % 10) + '0'; + // put sign if needed or requested + if (__negative) + *--__ptr = '-'; + else if (__flags & ios_base::showpos) + *--__ptr = '+'; + return __ptr; +} + +template +inline char* _STLP_CALL +__write_decimal_backward(char* __ptr, _Integer __x, ios_base::fmtflags __flags, const __false_type& /* is_signed */) +{ + for (; __x != 0; __x /= 10) + *--__ptr = (int)(__x % 10) + '0'; + // put sign if requested + if (__flags & ios_base::showpos) + *--__ptr = '+'; + return __ptr; +} + +template +char* _STLP_CALL +__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x) +{ + char* __ptr = __buf; + __umax_int_t __temp; + + if (__x == 0) { + *--__ptr = '0'; + if ((__flags & ios_base::showpos) && ( (__flags & (ios_base::hex | ios_base::oct)) == 0 )) + *--__ptr = '+'; + } + else { + + switch (__flags & ios_base::basefield) { + case ios_base::oct: + __temp = __x; + // if the size of integer is less than 8, clear upper part + if ( sizeof(__x) < 8 && sizeof(__umax_int_t) >= 8 ) + __temp &= 0xFFFFFFFF; + + for (; __temp != 0; __temp >>=3) + *--__ptr = (((unsigned)__temp)& 0x7) + '0'; + + // put leading '0' is showbase is set + if (__flags & ios_base::showbase) + *--__ptr = '0'; + break; + case ios_base::hex: + { + const char* __table_ptr = (__flags & ios_base::uppercase) ? + get_hex_char_table_hi() : get_hex_char_table_lo(); + __temp = __x; + // if the size of integer is less than 8, clear upper part + if ( sizeof(__x) < 8 && sizeof(__umax_int_t) >= 8 ) + __temp &= 0xFFFFFFFF; + + for (; __temp != 0; __temp >>=4) + *--__ptr = __table_ptr[((unsigned)__temp & 0xF)]; + + if (__flags & ios_base::showbase) { + *--__ptr = __table_ptr[16]; + *--__ptr = '0'; + } + } + break; + default: + { +#if defined(__HP_aCC) && (__HP_aCC == 1) + bool _IsSigned = !((_Integer)-1 > 0); + if (_IsSigned) + __ptr = __write_decimal_backward(__ptr, __x, __flags, __true_type() ); + else + __ptr = __write_decimal_backward(__ptr, __x, __flags, __false_type() ); +#else + typedef typename __bool2type::is_signed>::_Ret _IsSigned; + __ptr = __write_decimal_backward(__ptr, __x, __flags, _IsSigned()); +# endif + } + break; + } + } + // return pointer to beginning of the string + return __ptr; +} + +// +// num_put<> +// + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +template +locale::id num_put<_CharT, _OutputIterator>::id; +#endif +# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +typedef num_put num_put_char; +typedef num_put num_put_char_2; +typedef num_put > > num_put_char_3; +typedef num_put > num_put_char_4; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, num_put_char::id, ); +__DECLARE_INSTANCE(locale::id, num_put_char_2::id, ); +__DECLARE_INSTANCE(locale::id, num_put_char_3::id, ); +#endif + +# ifndef _STLP_NO_WCHAR_T + +typedef num_put num_put_wchar_t; +typedef num_put num_put_wchar_t_2; +typedef num_put > > num_put_wchar_t_3; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, num_put_wchar_t::id, ); +__DECLARE_INSTANCE(locale::id, num_put_wchar_t_2::id, ); +__DECLARE_INSTANCE(locale::id, num_put_wchar_t_3::id, ); +#endif + +# endif + +# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +// issue 118 + +# ifndef _STLP_NO_BOOL + +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, + char_type __fill, bool __val) const { + if (!(__f.flags() & ios_base::boolalpha)) + return this->do_put(__s, __f, __fill, __STATIC_CAST(long,__val)); + + locale __loc = __f.getloc(); + typedef numpunct<_CharT> _Punct; + const _Punct& __np = use_facet<_Punct>(__loc); + + //const numpunct<_CharT>& __np = *(const numpunct<_CharT>*)__f._M_numpunct_facet(); + + basic_string<_CharT> __str = __val ? __np.truename() : __np.falsename(); + + // Reuse __copy_integer_and_fill. Since internal padding makes no + // sense for bool, though, make sure we use something else instead. + // The last two argument to __copy_integer_and_fill are dummies. + ios_base::fmtflags __flags = __f.flags(); + if ((__flags & ios_base::adjustfield) == ios_base::internal) + __flags = (__flags & ~ios_base::adjustfield) | ios_base::right; + + return __copy_integer_and_fill(__str.c_str(), __str.size(), __s, + __flags, __f.width(0), __fill, + (_CharT) 0, (_CharT) 0); +} + +# endif + +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + long __val) const { + + char __buf[64]; // Large enough for a base 8 64-bit integer, + // plus any necessary grouping. + ios_base::fmtflags __flags = __f.flags(); + char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); + return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); +} + + +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + unsigned long __val) const { + char __buf[64]; // Large enough for a base 8 64-bit integer, + // plus any necessary grouping. + + ios_base::fmtflags __flags = __f.flags(); + char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); + return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); +} + +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + double __val) const { + return _M_do_put_float(__s, __f, __fill, __val); +} + +#ifndef _STLP_NO_LONG_DOUBLE +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + long double __val) const { + return _M_do_put_float(__s, __f, __fill, __val); +} +#endif + +#ifdef _STLP_LONG_LONG +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + _STLP_LONG_LONG __val) const { + char __buf[64]; // Large enough for a base 8 64-bit integer, + // plus any necessary grouping. + + ios_base::fmtflags __flags = __f.flags(); + char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); + return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); +} + +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + unsigned _STLP_LONG_LONG __val) const { + char __buf[64]; // Large enough for a base 8 64-bit integer, + // plus any necessary grouping. + + ios_base::fmtflags __flags = __f.flags(); + char* __ibeg = __write_integer_backward((char*)__buf+64, __flags, __val); + return __put_integer(__ibeg, (char*)__buf+64, __s, __f, __flags, __fill); +} + +#endif /* _STLP_LONG_LONG */ + + +// lib.facet.num.put.virtuals "12 For conversion from void* the specifier is %p." +template +_OutputIter +num_put<_CharT, _OutputIter>::do_put(_OutputIter __s, ios_base& __f, _CharT /*__fill*/, + const void* __val) const { + //const ctype<_CharT>& __c_type = *(const ctype<_CharT>*)__f._M_ctype_facet(); + const ctype<_CharT>& __c_type = use_facet< ctype<_CharT> >(__f.getloc()); + ios_base::fmtflags __save_flags = __f.flags(); + + __f.setf(ios_base::hex, ios_base::basefield); + __f.setf(ios_base::showbase); + __f.setf(ios_base::internal, ios_base::adjustfield); + //__f.width((sizeof(void*) * 2) + 2); // digits in pointer type plus '0x' prefix //making output equal to linux. +# if defined(_STLP_LONG_LONG) && !defined(__MRC__) //*ty 11/24/2001 - MrCpp can not cast from void* to long long + _OutputIter result = this->do_put(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned _STLP_LONG_LONG,__val)); +# else + _OutputIter result = this->do_put(__s, __f, __c_type.widen('0'), __REINTERPRET_CAST(unsigned long,__val)); +# endif + __f.flags(__save_flags); + return result; +} + +_STLP_END_NAMESPACE + +# endif /* _STLP_EXPOSE_STREAM_IMPLEMENTATION */ + +#endif /* _STLP_NUM_PUT_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_num_put.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_num_put.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,202 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_NUM_PUT_H +#define _STLP_INTERNAL_NUM_PUT_H + +#ifndef _STLP_INTERNAL_NUMPUNCT_H +# include +#endif +#ifndef _STLP_INTERNAL_CTYPE_H +# include +#endif +#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// num_put facet + +# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES +template +# else +template > > +# endif +class num_put: public locale::facet +{ + friend class _Locale; +public: + typedef _CharT char_type; + typedef _OutputIter iter_type; + + explicit num_put(size_t __refs = 0) : _BaseFacet(__refs) {} + +# ifndef _STLP_NO_BOOL + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + bool __val) const { + return do_put(__s, __f, __fill, __val); + } +# endif + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + long __val) const { + return do_put(__s, __f, __fill, __val); + } + + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + unsigned long __val) const { + return do_put(__s, __f, __fill, __val); + } + +#ifdef _STLP_LONG_LONG + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + _STLP_LONG_LONG __val) const { + return do_put(__s, __f, __fill, __val); + } + + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + unsigned _STLP_LONG_LONG __val) const { + return do_put(__s, __f, __fill, __val); + } +#endif + + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + double __val) const { + return do_put(__s, __f, __fill, (double)__val); + } + +#ifndef _STLP_NO_LONG_DOUBLE + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + long double __val) const { + return do_put(__s, __f, __fill, __val); + } +# endif + + iter_type put(iter_type __s, ios_base& __f, char_type __fill, + const void * __val) const { + return do_put(__s, __f, __fill, __val); + } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& + GetFacetLocaleId(ostreambuf_iterator > *); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); + //wchar_t + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& + GetFacetLocaleId(ostreambuf_iterator > *); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(wchar_t**); + //adding for new iterator type + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& + GetFacetLocaleId(back_insert_iterator *); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + ~num_put() {} +# ifndef _STLP_NO_BOOL + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, bool __val) const; +# endif + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long __val) const; + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, unsigned long __val) const; + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, double __val) const; +#ifndef _STLP_NO_LONG_DOUBLE + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, long double __val) const; +#endif + +#ifdef _STLP_LONG_LONG + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, _STLP_LONG_LONG __val) const; + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, + unsigned _STLP_LONG_LONG __val) const ; +#endif /* _STLP_LONG_LONG */ + virtual _OutputIter do_put(_OutputIter __s, ios_base& __f, _CharT __fill, const void* __val) const; +}; + +# ifdef _STLP_USE_TEMPLATE_EXPORT +_STLP_EXPORT_TEMPLATE_CLASS num_put > >; +// _STLP_EXPORT_TEMPLATE_CLASS num_put; +# ifndef _STLP_NO_WCHAR_T +_STLP_EXPORT_TEMPLATE_CLASS num_put > >; +// _STLP_EXPORT_TEMPLATE_CLASS num_put; +# endif /* _STLP_NO_WCHAR_T */ +# endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +template +char* _STLP_CALL +__write_integer_backward(char* __buf, ios_base::fmtflags __flags, _Integer __x); + +extern _STLP_DECLSPEC int _STLP_CALL __string_to_float(const string&, float&); +extern _STLP_DECLSPEC int _STLP_CALL __string_to_float(const string&, double&); +extern _STLP_DECLSPEC void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, double); +# ifndef _STLP_NO_LONG_DOUBLE +int _STLP_CALL __string_to_float(const string&, long double&); +extern _STLP_DECLSPEC void _STLP_CALL __write_float(string&, ios_base::fmtflags, int, long double); +# endif + +#ifndef _STLP_NO_WCHAR_T +extern _STLP_DECLSPEC wchar_t* _STLP_CALL __convert_float_buffer(const char*, const char*, wchar_t*, const ctype&, wchar_t); +#endif +extern _STLP_DECLSPEC void _STLP_CALL __adjust_float_buffer(char*, char*, char); + +extern _STLP_DECLSPEC char* _STLP_CALL +__write_integer(char* buf, ios_base::fmtflags flags, long x); + +extern _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(char* first, char* last, const string&, char, char, char, int); +# ifndef _STLP_NO_WCHAR_T +extern _STLP_DECLSPEC ptrdiff_t _STLP_CALL __insert_grouping(wchar_t*, wchar_t*, const string&, wchar_t, wchar_t, wchar_t, int); +# endif + +# endif + +# if defined (__BORLANDC__) && defined (_RTLDLL) +inline void _Stl_loc_init_num_put() { + + num_put > >::id._M_index = 14; + num_put::id._M_index = 15; + +# ifndef _STLP_NO_WCHAR_T + num_put > > ::id._M_index = 33; + num_put::id._M_index = 34; +# endif + +} + +# endif + +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && ! defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_NUMERIC_FACETS_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_numeric.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_numeric.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,104 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_NUMERIC_C +#define _STLP_NUMERIC_C + +#ifndef _STLP_INTERNAL_NUMERIC_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +_OutputIterator +__partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*, _BinaryOperation __binary_op) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __result; + *__result = *__first; + + _Tp __val = *__first; + while (++__first != __last) { + __val = __binary_op(__val, *__first); + *++__result = __val; + } + return ++__result; +} + +template +_OutputIterator +__adjacent_difference(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*, + _BinaryOperation __binary_op) { + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + if (__first == __last) return __result; + *__result = *__first; + _Tp __val = *__first; + while (++__first != __last) { + _Tp __tmp = *__first; + *++__result = __binary_op(__tmp, __val); + __val = __tmp; + } + return ++__result; +} + + +template +_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr) +{ + _STLP_MPWFIX_TRY + if (__n == 0) + return __identity_element(__opr); + else { + while ((__n & 1) == 0) { + __n >>= 1; + __x = __opr(__x, __x); + } + _Tp __result = __x; + _STLP_MPWFIX_TRY + __n >>= 1; + while (__n != 0) { + __x = __opr(__x, __x); + if ((__n & 1) != 0) + __result = __opr(__result, __x); + __n >>= 1; + } + return __result; + _STLP_MPWFIX_CATCH + } + _STLP_MPWFIX_CATCH_ACTION(__x = _Tp()) +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_NUMERIC_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_numeric.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_numeric.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,190 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + + +#ifndef _STLP_INTERNAL_NUMERIC_H +#define _STLP_INTERNAL_NUMERIC_H + +#ifndef _STLP_INTERNAL_FUNCTION_H +# include +#endif + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +_STLP_INLINE_LOOP +_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) +#ifndef __SYMBIAN32__ + _Init = _Init + *__first; +#else + _Init += *__first; +#endif + return _Init; +} + +template +_STLP_INLINE_LOOP +_Tp accumulate(_InputIterator __first, _InputIterator __last, _Tp _Init, + _BinaryOperation __binary_op) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + for ( ; __first != __last; ++__first) + _Init = __binary_op(_Init, *__first); + return _Init; +} + +template +_STLP_INLINE_LOOP +_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _Tp _Init) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + for ( ; __first1 != __last1; ++__first1, ++__first2) + _Init = _Init + (*__first1 * *__first2); + return _Init; +} + +template +_STLP_INLINE_LOOP +_Tp inner_product(_InputIterator1 __first1, _InputIterator1 __last1, + _InputIterator2 __first2, _Tp _Init, + _BinaryOperation1 __binary_op1, + _BinaryOperation2 __binary_op2) +{ + _STLP_DEBUG_CHECK(__check_range(__first1, __last1)) + for ( ; __first1 != __last1; ++__first1, ++__first2) + _Init = __binary_op1(_Init, __binary_op2(*__first1, *__first2)); + return _Init; +} + +template +_OutputIterator +__partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*, _BinaryOperation __binary_op); + + +template +inline _OutputIterator +partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result) { + return __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator), + __plus(_STLP_VALUE_TYPE(__first, _InputIterator))); +} + +template +inline _OutputIterator +partial_sum(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOperation __binary_op) { + return __partial_sum(__first, __last, __result, _STLP_VALUE_TYPE(__first, _InputIterator), + __binary_op); +} + + +template +_OutputIterator +__adjacent_difference(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _Tp*, + _BinaryOperation __binary_op); + +template +inline _OutputIterator +adjacent_difference(_InputIterator __first, + _InputIterator __last, _OutputIterator __result) { + return __adjacent_difference(__first, __last, __result, + _STLP_VALUE_TYPE(__first, _InputIterator), + __minus(_STLP_VALUE_TYPE(__first, _InputIterator))); +} + +template +_OutputIterator +adjacent_difference(_InputIterator __first, _InputIterator __last, + _OutputIterator __result, _BinaryOperation __binary_op) { + return __adjacent_difference(__first, __last, __result, + _STLP_VALUE_TYPE(__first, _InputIterator), + __binary_op); +} + +template +_Tp __power(_Tp __x, _Integer __n, _MonoidOperation __opr); + +# ifndef _STLP_NO_EXTENSIONS + +// Returns __x ** __n, where __n >= 0. _Note that "multiplication" +// is required to be associative, but not necessarily commutative. + +template +inline _Tp __power(_Tp __x, _Integer __n) +{ + return __power(__x, __n, multiplies<_Tp>()); +} + +// Alias for the internal name __power. Note that power is an extension, +// not part of the C++ standard. +template +inline _Tp power(_Tp __x, _Integer __n, _MonoidOperation __opr) { + return __power(__x, __n, __opr); +} + + +template +inline _Tp power(_Tp __x, _Integer __n) { + return __power(__x, __n, multiplies<_Tp>()); +} + +// iota is not part of the C++ standard. It is an extension. + +template +_STLP_INLINE_LOOP +void +iota(_ForwardIterator __first, _ForwardIterator __last, _Tp __val) +{ + _STLP_DEBUG_CHECK(__check_range(__first, __last)) + while (__first != __last) + *__first++ = __val++; +} +# endif + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_NUMERIC_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_numpunct.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_numpunct.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,295 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_NUMPUNCT_H +#define _STLP_INTERNAL_NUMPUNCT_H + +#ifndef _STLP_IOS_BASE_H +# include +#endif + +# ifndef _STLP_C_LOCALE_H +# include +# endif + +#ifndef _STLP_STRING_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// numpunct facets + +#ifdef __SYMBIAN32__ +extern locale::id& Numpunct_charT_GetFacetLocaleId(const char* type); + +template class numpunct: public locale::facet +{ + friend class _Locale; +public: + typedef char char_type; + typedef basic_string<_CharT> string_type; + explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) { + _M_truename.append(1, (_CharT)'t'); + _M_truename.append(1, (_CharT)'r'); + _M_truename.append(1, (_CharT)'u'); + _M_truename.append(1, (_CharT)'e'); + + _M_falsename.append(1, (_CharT)'f'); + _M_falsename.append(1, (_CharT)'a'); + _M_falsename.append(1, (_CharT)'l'); + _M_falsename.append(1, (_CharT)'s'); + _M_falsename.append(1, (_CharT)'e'); + } + + _CharT decimal_point() const { return do_decimal_point(); } + _CharT thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string_type truename() const { return do_truename(); } + string_type falsename() const { return do_falsename(); } +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + static locale::id& GetFacetLocaleId(){return Numpunct_charT_GetFacetLocaleId(typeid(_CharT).name()); } +#else + static locale::id id; +#endif + +# ifndef _STLP_NO_FRIEND_TEMPLATES +protected: +# endif + ~numpunct(); + +protected: + static string_type _M_truename; + static string_type _M_falsename; + static string _M_grouping; +protected: + + virtual _CharT do_decimal_point() const; + virtual _CharT do_thousands_sep() const; + virtual string do_grouping() const; + virtual string_type do_truename() const; + virtual string_type do_falsename() const; +}; + +template +basic_string<_CharT> numpunct<_CharT>::_M_truename; +template +basic_string<_CharT> numpunct<_CharT>::_M_falsename; +template +string numpunct<_CharT>::_M_grouping ; + +_STLP_DECLSPEC _Locale_numeric* __acquire_numericE(const char* ); +_STLP_DECLSPEC void __release_numericE(_Locale_numeric* ); +_STLP_DECLSPEC const char* _Locale_trueE(_Locale_numeric*); +_STLP_DECLSPEC const char* _Locale_falseE(_Locale_numeric*); +_STLP_DECLSPEC char _Locale_decimal_pointE(_Locale_numeric*); +_STLP_DECLSPEC char _Locale_thousands_sepE(_Locale_numeric*); +_STLP_DECLSPEC const char*_Locale_groupingE(_Locale_numeric*); + +template +class numpunct_byname : public numpunct<_CharT>{ +public: + typedef _CharT char_type; + typedef basic_string<_CharT> string_type; + + explicit numpunct_byname(const char* name, size_t refs = 0); +protected: + + ~numpunct_byname(); + + virtual _CharT do_decimal_point() const; + virtual _CharT do_thousands_sep() const; + virtual string do_grouping() const; + +private: + _Locale_numeric* _M_numeric; +}; + +#else +template class numpunct {}; +template class numpunct_byname {}; +#endif +template class num_get; + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class numpunct : public locale::facet +#else +class _STLP_CLASS_DECLSPEC numpunct : public locale::facet +#endif +{ + friend class _Locale; +# ifndef _STLP_NO_FRIEND_TEMPLATES + template friend class num_get; +# endif +public: + typedef char char_type; + typedef string string_type; + + explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) {} + + char decimal_point() const { return do_decimal_point(); } + char thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + string truename() const { return do_truename(); } + string falsename() const { return do_falsename(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +# ifndef _STLP_NO_FRIEND_TEMPLATES +protected: +# endif + ~numpunct(){}; + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +public: + _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_truename(); + _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_falsename(); + _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_grouping(); +#else +protected: + _STLP_STATIC_MEMBER_DECLSPEC static string _M_truename; + _STLP_STATIC_MEMBER_DECLSPEC static string _M_falsename; + _STLP_STATIC_MEMBER_DECLSPEC static string _M_grouping; +#endif + +protected: + + _STLP_DECLSPEC virtual char do_decimal_point() const; + _STLP_DECLSPEC virtual char do_thousands_sep() const; + _STLP_DECLSPEC virtual string do_grouping() const; + _STLP_DECLSPEC virtual string do_truename() const; + _STLP_DECLSPEC virtual string do_falsename() const; +}; + +# if ! defined (_STLP_NO_WCHAR_T) + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class numpunct : public locale::facet +#else +class _STLP_CLASS_DECLSPEC numpunct : public locale::facet +#endif +{ + friend class _Locale; +public: + typedef wchar_t char_type; + typedef wstring string_type; + + explicit numpunct(size_t __refs = 0) : _BaseFacet(__refs) {} + + wchar_t decimal_point() const { return do_decimal_point(); } + wchar_t thousands_sep() const { return do_thousands_sep(); } + string grouping() const { return do_grouping(); } + wstring truename() const { return do_truename(); } + wstring falsename() const { return do_falsename(); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +public: + _STLP_STATIC_MEMBER_DECLSPEC static wstring& GetNumPunct_M_Wchar_truename(); + _STLP_STATIC_MEMBER_DECLSPEC static wstring& GetNumPunct_M_Wchar_falsename(); + _STLP_STATIC_MEMBER_DECLSPEC static string& GetNumPunct_M_Wchar_grouping(); +#else +protected: + _STLP_STATIC_MEMBER_DECLSPEC static wstring _M_truename; + _STLP_STATIC_MEMBER_DECLSPEC static wstring _M_falsename; + _STLP_STATIC_MEMBER_DECLSPEC static string _M_grouping; +#endif +protected: + ~numpunct() {} + + _STLP_DECLSPEC virtual wchar_t do_decimal_point() const; + _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; + _STLP_DECLSPEC virtual string do_grouping() const; + _STLP_DECLSPEC virtual wstring do_truename() const; + _STLP_DECLSPEC virtual wstring do_falsename() const; +}; + +# endif /* WCHAR_T */ + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC numpunct_byname : public numpunct { +public: + typedef char char_type; + typedef string string_type; + + explicit _STLP_DECLSPEC numpunct_byname(const char* __name, size_t __refs = 0); + +protected: + +_STLP_DECLSPEC ~numpunct_byname(); + +_STLP_DECLSPEC virtual char do_decimal_point() const; + _STLP_DECLSPEC virtual char do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +private: + _Locale_numeric* _M_numeric; +}; + +# ifndef _STLP_NO_WCHAR_T +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC numpunct_byname: public numpunct { +public: + typedef wchar_t char_type; + typedef wstring string_type; + + explicit _STLP_DECLSPEC numpunct_byname(const char* __name, size_t __refs = 0); + +protected: + +_STLP_DECLSPEC ~numpunct_byname(); + +_STLP_DECLSPEC virtual wchar_t do_decimal_point() const; + _STLP_DECLSPEC virtual wchar_t do_thousands_sep() const; +_STLP_DECLSPEC virtual string do_grouping() const; + +private: + _Locale_numeric* _M_numeric; +}; + +# endif /* WCHAR_T */ + +#ifdef __SYMBIAN32__ +#include +#endif +_STLP_END_NAMESPACE + +#endif /* _STLP_NUMPUNCT_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ostream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ostream.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,425 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_OSTREAM_C +#define _STLP_OSTREAM_C + + +#ifndef _STLP_INTERNAL_OSTREAM_H +# include +#endif + +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#if !defined (_STLP_INTERNAL_NUM_PUT_H) +# include // For basic_streambuf and iterators +#endif + +_STLP_BEGIN_NAMESPACE + +// Helper functions for istream<>::sentry constructor. +template +bool +_M_init(basic_ostream<_CharT, _Traits>& __str) { + if (__str.good()) { + // boris : check if this is needed ! + if (!__str.rdbuf()) + __str.setstate(ios_base::badbit); + if (__str.tie()) + __str.tie()->flush(); + return __str.good(); + } else + return false; +} + +//---------------------------------------------------------------------- +// Definitions of non-inline member functions. + +// Constructor, destructor + +template +_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits> + ::basic_ostream(basic_streambuf<_CharT, _Traits>* __buf) + : basic_ios<_CharT, _Traits>() +{ + this->init(__buf); +} + +template +_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>::~basic_ostream() +{} + +// Output directly from a streambuf. +template +_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>& +basic_ostream<_CharT, _Traits>::operator<<(basic_streambuf<_CharT, _Traits>* __from) +{ + sentry __sentry(*this); + if (__sentry) { + if (__from) { + bool __any_inserted = __from->gptr() != __from->egptr() + ? this->_M_copy_buffered(__from, this->rdbuf()) + : this->_M_copy_unbuffered(__from, this->rdbuf()); + if (!__any_inserted) + this->setstate(ios_base::failbit); + } + else + this->setstate(ios_base::badbit); + } + + return *this; +} + +// Helper functions for the streambuf version of operator<<. The +// exception-handling code is complicated because exceptions thrown +// while extracting characters are treated differently than exceptions +// thrown while inserting characters. + +template +bool basic_ostream<_CharT, _Traits> + ::_M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from, + basic_streambuf<_CharT, _Traits>* __to) +{ + bool __any_inserted = false; + + while (__from->egptr() != __from->gptr()) { + const ptrdiff_t __avail = __from->egptr() - __from->gptr(); + + streamsize __nwritten; + _STLP_TRY { + __nwritten = __to->sputn(__from->gptr(), __avail); + __from->gbump((int)__nwritten); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + return __any_inserted; + } + + if (__nwritten == __avail) { + _STLP_TRY { + if (this->_S_eof(__from->sgetc())) + return true; + else + __any_inserted = true; + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::failbit); + return false; + } + } + + else if (__nwritten != 0) + return true; + + else + return __any_inserted; + } + + // No characters are in the buffer, but we aren't at EOF. Switch to + // unbuffered mode. + return __any_inserted || this->_M_copy_unbuffered(__from, __to); +} + +template +bool basic_ostream<_CharT, _Traits> + ::_M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from, + basic_streambuf<_CharT, _Traits>* __to) +{ + bool __any_inserted = false; + +#ifdef __SYMBIAN32__ + int_type __c; + _STLP_TRY { + __c = __from->sgetc();; + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::failbit); + return __any_inserted; + } + for(;;){ + + if (this->_S_eof(__c)) + return __any_inserted; + + else { + int_type __tmp; + _STLP_TRY { + __tmp = __to->sputc(__c); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + return __any_inserted; + } + + if (this->_S_eof(__tmp)) { + break; + } + else + __any_inserted = true; + } + _STLP_TRY { + __c = __from->snextc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::failbit); + return __any_inserted; + } + } +#else + while (true) { + int_type __c; + _STLP_TRY { + __c = __from->sbumpc(); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::failbit); + return __any_inserted; + } + + if (this->_S_eof(__c)) + return __any_inserted; + + else { + int_type __tmp; + _STLP_TRY { + __tmp = __to->sputc(__c); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + return __any_inserted; + } + + if (this->_S_eof(__tmp)) { + _STLP_TRY { + /* __tmp = */ __from->sputbackc(__c); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + return __any_inserted; + } + } + else + __any_inserted = true; + } + } +#endif + return __any_inserted; +} + +// Helper function for numeric output. + +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +_M_put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x) +{ + typedef typename basic_ostream<_CharT, _Traits>::sentry _Sentry; + _Sentry __sentry(__os); + bool __failed = true; + + if (__sentry) { + _STLP_TRY { + typedef num_put<_CharT, ostreambuf_iterator<_CharT, _Traits> > _NumPut; + __failed = (use_facet<_NumPut>(__os.getloc())).put( + ostreambuf_iterator<_CharT, _Traits>(__os.rdbuf()), + __os, __os.fill(), + __x).failed(); + } + _STLP_CATCH_ALL { + __os._M_handle_exception(ios_base::badbit); + } + } + if (__failed) + __os.setstate(ios_base::badbit); + return __os; +} + +# if defined (_STLP_USE_TEMPLATE_EXPORT) && defined (__BUILDING_STLPORT) +_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL +_M_put_num(basic_ostream >&, unsigned long); +_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL +_M_put_num(basic_ostream >&, long); +# if defined (_STLP_LONG_LONG) +_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL +_M_put_num(basic_ostream >&, unsigned _STLP_LONG_LONG); +_STLP_EXPORT_TEMPLATE _STLP_EXP_DECLSPEC basic_ostream >& _STLP_CALL +_M_put_num(basic_ostream >&, _STLP_LONG_LONG ); +# endif +# endif + +template +void basic_ostream<_CharT, _Traits>::_M_put_char(_CharT __c) +{ + sentry __sentry(*this); + if (__sentry) { + bool __failed = true; + _STLP_TRY { + streamsize __npad = this->width() > 0 ? this->width() - 1 : 0; + // if (__npad <= 1) + if (__npad == 0) + __failed = this->_S_eof(this->rdbuf()->sputc(__c)); + else if ((this->flags() & ios_base::adjustfield) == ios_base::left) { + __failed = this->_S_eof(this->rdbuf()->sputc(__c)); + __failed = __failed || + this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; + } + else { + __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; + __failed = __failed || this->_S_eof(this->rdbuf()->sputc(__c)); + } + + this->width(0); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + + if (__failed) + this->setstate(ios_base::badbit); + } +} + +template +void basic_ostream<_CharT, _Traits>::_M_put_nowiden(const _CharT* __s) +{ + sentry __sentry(*this); + if (__sentry) { + bool __failed = true; + streamsize __n = _Traits::length(__s); + streamsize __npad = this->width() > __n ? this->width() - __n : 0; + + _STLP_TRY { + if (__npad == 0) + __failed = this->rdbuf()->sputn(__s, __n) != __n; + else if ((this->flags() & ios_base::adjustfield) == ios_base::left) { + __failed = this->rdbuf()->sputn(__s, __n) != __n; + __failed = __failed || + this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; + } + else { + __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; + __failed = __failed || this->rdbuf()->sputn(__s, __n) != __n; + } + + this->width(0); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + + if (__failed) + this->setstate(ios_base::failbit); + } +} + +template +void basic_ostream<_CharT, _Traits>::_M_put_widen(const char* __s) +{ + sentry __sentry(*this); + if (__sentry) { + bool __failed = true; + streamsize __n = char_traits::length(__s); + streamsize __npad = this->width() > __n ? this->width() - __n : 0; + + _STLP_TRY { + if (__npad == 0) + __failed = !this->_M_put_widen_aux(__s, __n); + else if ((this->flags() & ios_base::adjustfield) == ios_base::left) { + __failed = !this->_M_put_widen_aux(__s, __n); + __failed = __failed || + this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; + } + else { + __failed = this->rdbuf()->_M_sputnc(this->fill(), __npad) != __npad; + __failed = __failed || !this->_M_put_widen_aux(__s, __n); + } + + this->width(0); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + + if (__failed) + this->setstate(ios_base::failbit); + } +} + +template +bool basic_ostream<_CharT, _Traits>::_M_put_widen_aux(const char* __s, + streamsize __n) +{ + basic_streambuf<_CharT, _Traits>* __buf = this->rdbuf(); + + for ( ; __n > 0 ; --__n) + if (this->_S_eof(__buf->sputc(this->widen(*__s++)))) + return false; + return true; +} + +// Unformatted output of a single character. +template +_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>& +basic_ostream<_CharT, _Traits>::put(char_type __c) +{ + sentry __sentry(*this); + bool __failed = true; + + if (__sentry) { + _STLP_TRY { + __failed = this->_S_eof(this->rdbuf()->sputc(__c)); + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + } + + if (__failed) + this->setstate(ios_base::badbit); + + return *this; +} + +// Unformatted output of a single character. +template +_STLP_EXP_DECLSPEC basic_ostream<_CharT, _Traits>& +basic_ostream<_CharT, _Traits>::write(const char_type* __s, streamsize __n) +{ + sentry __sentry(*this); + bool __failed = true; + + if (__sentry) { + _STLP_TRY { + __failed = this->rdbuf()->sputn(__s, __n) != __n; + } + _STLP_CATCH_ALL { + this->_M_handle_exception(ios_base::badbit); + } + } + + if (__failed) + this->setstate(ios_base::badbit); + + return *this; +} + +_STLP_END_NAMESPACE + +#endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ + +#endif /* _STLP_OSTREAM_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ostream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ostream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,411 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + +#ifndef _STLP_INTERNAL_OSTREAM_H +#define _STLP_INTERNAL_OSTREAM_H + +#ifndef _STLP_INTERNAL_IOS_H +# include // For basic_ios<>. Includes . +#endif + +#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +_M_put_num(basic_ostream<_CharT, _Traits>& __os, _Number __x); + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +template +class _Osentry; +# endif + +template +bool +_M_init(basic_ostream<_CharT, _Traits>& __str); + +//---------------------------------------------------------------------- +// class basic_ostream<> + +template +class basic_ostream : virtual public basic_ios<_CharT, _Traits> +{ + typedef basic_ostream<_CharT, _Traits> _Self; + +public: // Types + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + typedef basic_ios<_CharT, _Traits> _Basic_ios; + +public: // Constructor and destructor. + _STLP_DECLSPEC explicit basic_ostream(basic_streambuf<_CharT, _Traits>* __buf); + _STLP_DECLSPEC ~basic_ostream(); + +public: // Hooks for manipulators. + typedef basic_ios<_CharT, _Traits>& (_STLP_CALL *__ios_fn)(basic_ios<_CharT, _Traits>&); + typedef ios_base& (_STLP_CALL *__ios_base_fn)(ios_base&); + typedef _Self& (_STLP_CALL *__ostream_fn)(_Self&); + _Self& operator<< (__ostream_fn __f) { return __f(*this); } + _Self & operator<< (__ios_base_fn __f) { __f(*this); return *this; } + _Self& operator<< (__ios_fn __ff) { __ff(*this); return *this; } + +private: + bool _M_copy_buffered(basic_streambuf<_CharT, _Traits>* __from, + basic_streambuf<_CharT, _Traits>* __to); + bool _M_copy_unbuffered(basic_streambuf<_CharT, _Traits>* __from, + basic_streambuf<_CharT, _Traits>* __to); + +public: + void _M_put_char(_CharT __c); + + void _M_put_nowiden(const _CharT* __s); + void _M_put_widen(const char* __s); + bool _M_put_widen_aux(const char* __s, streamsize __n); + +public: // Unformatted output. + _Self& put(char_type __c); + _Self& write(const char_type* __s, streamsize __n); + +public: // Formatted output. + // Formatted output from a streambuf. + _Self& operator<<(basic_streambuf<_CharT, _Traits>* __buf); +# ifndef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER + // this is needed for compiling with option char = unsigned + _Self& operator<<(unsigned char __x) { _M_put_char(__x); return *this; } +# endif +#ifdef __SYMBIAN32__ + _Self& operator<<(short __x) + { + ios_base::fmtflags __fmtf = + ios_base::flags() & ios_base::basefield; + long __ly = (__fmtf == ios_base::oct || __fmtf == ios_base::hex) ? + (long)(unsigned short)(__x) : (long)__x; + return _M_put_num(*this, __ly); + } + _Self& operator<<(int __x) + { + ios_base::fmtflags __fmtf = + ios_base::flags() & ios_base::basefield; + long __ly = (__fmtf == ios_base::oct || __fmtf == ios_base::hex) ? + (long)(unsigned int)(__x) : (long)__x; + return _M_put_num(*this, __ly); + } +#else + _Self& operator<<(short __x) { return _M_put_num(*this, __x); } + _Self& operator<<(int __x) { return _M_put_num(*this, __x); } +#endif + _Self& operator<<(unsigned int __x) { return _M_put_num(*this, __STATIC_CAST(unsigned long,__x)); } + _Self& operator<<(unsigned short __x) { return _M_put_num(*this, __STATIC_CAST(unsigned long,__x)); } + _Self& operator<<(long __x) { return _M_put_num(*this, __x); } + _Self& operator<<(unsigned long __x) { return _M_put_num(*this, __x); } +#ifdef _STLP_LONG_LONG + _Self& operator<< (_STLP_LONG_LONG __x) { return _M_put_num(*this, __x); } + _Self& operator<< (unsigned _STLP_LONG_LONG __x) { return _M_put_num(*this, __x); } +#endif + _Self& operator<<(float __x) + { return _M_put_num(*this, __STATIC_CAST(double,__x)); } + _Self& operator<<(double __x) { return _M_put_num(*this, __x); } +# ifndef _STLP_NO_LONG_DOUBLE + _Self& operator<<(long double __x) { return _M_put_num(*this, __x); } +# endif + _Self& operator<<(const void* __x) { return _M_put_num(*this, __x); } +# ifndef _STLP_NO_BOOL + _Self& operator<<(bool __x) { return _M_put_num(*this, __x); } +# endif + +public: // Buffer positioning and manipulation. + _Self& flush() { + if (this->rdbuf()) + if (this->rdbuf()->pubsync() == -1) + this->setstate(ios_base::badbit); + return *this; + } + + pos_type tellp() { + return this->rdbuf() && !this->fail() + ? this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out) + : pos_type(-1); + } + + _Self& seekp(pos_type __pos) { + if (this->rdbuf() && !this->fail()) + if( pos_type(off_type(-1)) == this->rdbuf()->pubseekpos(__pos, ios_base::out)) + this->setstate(ios_base::failbit); + return *this; + } + + _Self& seekp(off_type __off, ios_base::seekdir __dir) { + if (this->rdbuf() && !this->fail()) + if( pos_type(off_type(-1)) == this->rdbuf()->pubseekoff(__off, __dir, ios_base::out)) + this->setstate(ios_base::failbit); + return *this; + } + +#if defined (_STLP_USE_TEMPLATE_EXPORT) + // If we are using DLL specs, we have not to use inner classes + // end class declaration here + typedef _Osentry<_CharT, _Traits> sentry; +}; +# define sentry _Osentry + template + class _Osentry { + typedef _Osentry<_CharT, _Traits> _Self; +# else + class sentry { + typedef sentry _Self; +# endif + private: + basic_ostream<_CharT, _Traits>& _M_str; + // basic_streambuf<_CharT, _Traits>* _M_buf; + bool _M_ok; + public: + explicit sentry(basic_ostream<_CharT, _Traits>& __str) + : _M_str(__str), /* _M_buf(__str.rdbuf()), */ _M_ok(_M_init(__str)) + { + } + + ~sentry() { + if (_M_str.flags() & ios_base::unitbuf) +# ifndef _STLP_INCOMPLETE_EXCEPTION_HEADER + if (!_STLP_VENDOR_EXCEPT_STD::uncaught_exception()) +# endif + _M_str.flush(); + } + + operator bool() const { return _M_ok; } + private: // Disable assignment and copy constructor. + sentry(const _Self& __s) : _M_str (__s._M_str) {}; + void operator=(const _Self&) {}; + }; +# if defined (_STLP_USE_TEMPLATE_EXPORT) +# undef sentry +# else + // close basic_ostream class definition here +}; +# endif + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_ostream >; +_STLP_EXPORT_TEMPLATE_CLASS _Osentry >; +# if !defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_ostream >; +_STLP_EXPORT_TEMPLATE_CLASS _Osentry >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +template +inline basic_streambuf<_CharT, _Traits>* _STLP_CALL +_M_get_ostreambuf(basic_ostream<_CharT, _Traits>& __St) +{ + return __St.rdbuf(); +} + +// Non-member functions. + +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, _CharT __c) { + __os._M_put_char(__c); + return __os; +} + +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, const _CharT* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__s); +#else + __os._M_put_nowiden(__s); +#endif + return __os; +} + +# ifdef _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER +// some specializations + +inline basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __os, char __c) { + __os._M_put_char(__c); + return __os; +} + +inline basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __os, signed char __c) { + __os._M_put_char(__c); + return __os; +} + +inline basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __os, unsigned char __c) { + __os._M_put_char(__c); + return __os; +} + +inline basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __os, const char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__s); +#else + __os._M_put_nowiden(__s); +#endif + return __os; +} + +inline basic_ostream >& _STLP_CALL +operator<<(basic_ostream >& __os, const signed char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#else + __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#endif + return __os; +} + +inline basic_ostream >& +operator<<(basic_ostream >& __os, const unsigned char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#else + __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#endif + return __os; +} + +# else + +// also for compilers who might use that +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, char __c) { + __os._M_put_char(__os.widen(__c)); + return __os; +} + +template +inline basic_ostream& _STLP_CALL +operator<<(basic_ostream& __os, char __c) { + __os._M_put_char(__c); + return __os; +} + +template +inline basic_ostream& _STLP_CALL +operator<<(basic_ostream& __os, signed char __c) { + __os._M_put_char(__c); + return __os; +} + +template +inline basic_ostream& _STLP_CALL +operator<<(basic_ostream& __os, unsigned char __c) { + __os._M_put_char(__c); + return __os; +} + +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, const char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_widen(__s); +#else + __os._M_put_widen(__s); +#endif + return __os; +} + +template +inline basic_ostream& _STLP_CALL +operator<<(basic_ostream& __os, const char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__s); +#else + __os._M_put_nowiden(__s); +#endif + return __os; +} + +template +inline basic_ostream& _STLP_CALL +operator<<(basic_ostream& __os, const signed char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#else + __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#endif + return __os; +} + +template +inline basic_ostream& +operator<<(basic_ostream& __os, const unsigned char* __s) { +#ifdef __SYMBIAN32__ + !__s ? __os.setstate(ios_base::badbit):__os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#else + __os._M_put_nowiden(__REINTERPRET_CAST(const char*,__s)); +#endif + return __os; +} +# endif /* _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER */ + +//---------------------------------------------------------------------- +// basic_ostream manipulators. + +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +endl(basic_ostream<_CharT, _Traits>& __os) { + __os.put(__os.widen('\n')); + __os.flush(); + return __os; +} + +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +ends(basic_ostream<_CharT, _Traits>& __os) { + __os.put(_STLP_DEFAULT_CONSTRUCTED(_CharT)); + return __os; +} + +template +inline basic_ostream<_CharT, _Traits>& _STLP_CALL +flush(basic_ostream<_CharT, _Traits>& __os) { + __os.flush(); + return __os; +} + +_STLP_END_NAMESPACE + +# undef _STLP_MANIP_INLINE + +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_OSTREAM_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ostreambuf_iterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ostreambuf_iterator.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,97 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H +#define _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H + +#ifndef _STLP_INTERNAL_STREAMBUF +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +extern basic_streambuf<_CharT, _Traits>* _STLP_CALL _M_get_ostreambuf(basic_ostream<_CharT, _Traits>& ) ; + +// The default template argument is declared in iosfwd +template +class ostreambuf_iterator +{ +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef basic_streambuf<_CharT, _Traits> streambuf_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + +public: + ostreambuf_iterator(streambuf_type* __buf) _STLP_NOTHROW : _M_buf(__buf), _M_ok(__buf!=0) {} + // ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {} + inline ostreambuf_iterator(ostream_type& __o) _STLP_NOTHROW; + + ostreambuf_iterator<_CharT, _Traits>& operator=(char_type __c) { + _M_ok = _M_ok && !traits_type::eq_int_type(_M_buf->sputc(__c), + traits_type::eof()); + return *this; + } + + ostreambuf_iterator<_CharT, _Traits>& operator*() { return *this; } + ostreambuf_iterator<_CharT, _Traits>& operator++() { return *this; } + ostreambuf_iterator<_CharT, _Traits>& operator++(int) { return *this; } + + bool failed() const { return !_M_ok; } + +private: + streambuf_type* _M_buf; + bool _M_ok; +}; + +template +inline ostreambuf_iterator<_CharT, _Traits>::ostreambuf_iterator(basic_ostream<_CharT, _Traits>& __o) _STLP_NOTHROW : _M_buf(_M_get_ostreambuf(__o)), _M_ok(_M_buf != 0) {} + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator >; +# if defined (INSTANTIATE_WIDE_STREAMS) +_STLP_EXPORT_TEMPLATE_CLASS ostreambuf_iterator >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template +inline output_iterator_tag _STLP_CALL +iterator_category(const ostreambuf_iterator<_CharT, _Traits>&) { return output_iterator_tag(); } +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_pair.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_pair.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,210 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_PAIR_H +#define _STLP_INTERNAL_PAIR_H + +#include + +_STLP_BEGIN_NAMESPACE + +#ifdef _STLP_USE_TRAP_LEAVE +template +struct pair { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _STLP_StackPusher<_T1> __pusher; + _T2 second; + + // first and second should construct themselves with their default constructors in ANSI order + pair() : __pusher(&first) { + CleanupStack::Pop(); + } + + pair(const _T1& __a, const _T2& __b) : first(__a), __pusher(&first), second(__b) { + CleanupStack::Pop(); + } + + // undergroud extensions + pair(const _T1& __a, __false_type) : first(__a), __pusher(&first), second() { + CleanupStack::Pop(); + } + pair(__true_type, const _T2& __a) : first(), __pusher(&first), second(__a) { + CleanupStack::Pop(); + } + +#if defined (_STLP_MEMBER_TEMPLATES) && !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200)) + template + pair(const pair<_U1, _U2>& __p) : first(__p.first), __pusher(&first), second(__p.second) { + CleanupStack::Pop(); + } + + pair(const pair<_T1,_T2>& __o) : first(__o.first), __pusher(&first), second(__o.second) { + CleanupStack::Pop(); + } +#endif + __TRIVIAL_DESTRUCTOR(pair) +}; + +#else + +template +struct pair { + typedef _T1 first_type; + typedef _T2 second_type; + + _T1 first; + _T2 second; +# if defined (_STLP_CONST_CONSTRUCTOR_BUG) + pair() {} +# else + pair() : first(_T1()), second(_T2()) {} +# endif + pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {} + + // undergroud extensions + pair(const _T1& __a, __false_type) : first(__a), second() {} + pair(const _T2& __a, __true_type) : first(), second(__a) {} + +#if defined (_STLP_MEMBER_TEMPLATES) && !(defined (_STLP_MSVC) && (_STLP_MSVC < 1200)) + template + pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {} + + pair(const pair<_T1,_T2>& __o) : first(__o.first), second(__o.second) {} +#endif + __TRIVIAL_DESTRUCTOR(pair) +}; +#endif + +template +inline bool _STLP_CALL operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) +{ + return __x.first == __y.first && __x.second == __y.second; +} + +template +inline bool _STLP_CALL operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) +{ + return __x.first < __y.first || + (!(__y.first < __x.first) && __x.second < __y.second); +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool _STLP_CALL operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return !(__x == __y); +} + +template +inline bool _STLP_CALL operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return __y < __x; +} + +template +inline bool _STLP_CALL operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return !(__y < __x); +} + +template +inline bool _STLP_CALL operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) { + return !(__x < __y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + + +#if defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && ! defined (_STLP_NO_EXTENSIONS) && ! defined (__BORLANDC__) && ! defined (__DMC__) +template +inline pair<_T1, _T2 const*> make_pair(_T1 const& __x, + _T2 const (&__y)[_Sz]) +{ + return pair<_T1, _T2 const*>(__x, static_cast<_T2 const*>(__y)); +} + +template +inline pair<_T1 const*, _T2> make_pair(_T1 const (&__x)[_Sz], + _T2 const& __y) +{ + return pair<_T1 const*, _T2>(static_cast<_T1 const*>(__x), __y); +} + +template +inline pair<_T1 const*, _T2 const*> make_pair(_T1 const (&__x)[_Sz1], + _T2 const (&__y)[_Sz2]) +{ + return pair<_T1 const*, _T2 const*>(static_cast<_T1 const*>(__x), + static_cast<_T2 const*>(__y)); +} +#endif + +template +inline pair<_T1, _T2> _STLP_CALL make_pair(const _T1& __x, const _T2& __y) +{ + return pair<_T1, _T2>(__x, __y); +} + + +_STLP_END_NAMESPACE + +# if defined (_STLP_USE_NAMESPACES) || ! defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) +_STLP_BEGIN_RELOPS_NAMESPACE + +template +inline bool _STLP_CALL operator!=(const _Tp& __x, const _Tp& __y) { + return !(__x == __y); +} + +template +inline bool _STLP_CALL operator>(const _Tp& __x, const _Tp& __y) { + return __y < __x; +} + +template +inline bool _STLP_CALL operator<=(const _Tp& __x, const _Tp& __y) { + return !(__y < __x); +} + +template +inline bool _STLP_CALL operator>=(const _Tp& __x, const _Tp& __y) { + return !(__x < __y); +} + +_STLP_END_RELOPS_NAMESPACE + +# endif + +#endif /* _STLP_INTERNAL_PAIR_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_pthread_alloc.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_pthread_alloc.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,489 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_PTHREAD_ALLOC_H +#define _STLP_PTHREAD_ALLOC_H + +// Pthread-specific node allocator. +// This is similar to the default allocator, except that free-list +// information is kept separately for each thread, avoiding locking. +// This should be reasonably fast even in the presence of threads. +// The down side is that storage may not be well-utilized. +// It is not an error to allocate memory in thread A and deallocate +// it in thread B. But this effectively transfers ownership of the memory, +// so that it can only be reallocated by thread B. Thus this can effectively +// result in a storage leak if it's done on a regular basis. +// It can also result in frequent sharing of +// cache lines among processors, with potentially serious performance +// consequences. + +#include + +#ifndef _STLP_INTERNAL_ALLOC_H +#include +#endif + +#ifndef __RESTRICT +# define __RESTRICT +#endif + +_STLP_BEGIN_NAMESPACE + +#define _STLP_DATA_ALIGNMENT 8 + +union _Pthread_alloc_obj { + union _Pthread_alloc_obj * __free_list_link; + char __client_data[_STLP_DATA_ALIGNMENT]; /* The client sees this. */ +}; + +// Pthread allocators don't appear to the client to have meaningful +// instances. We do in fact need to associate some state with each +// thread. That state is represented by +// _Pthread_alloc_per_thread_state<_Max_size>. + +template +struct _Pthread_alloc_per_thread_state { + typedef _Pthread_alloc_obj __obj; + enum { _S_NFREELISTS = _Max_size/_STLP_DATA_ALIGNMENT }; + + // Free list link for list of available per thread structures. + // When one of these becomes available for reuse due to thread + // termination, any objects in its free list remain associated + // with it. The whole structure may then be used by a newly + // created thread. + _Pthread_alloc_per_thread_state() : __next(0) + { + memset((void *)__free_list, 0, (size_t)_S_NFREELISTS * sizeof(__obj *)); + } + // Returns an object of size __n, and possibly adds to size n free list. + void *_M_refill(size_t __n); + + _Pthread_alloc_obj* volatile __free_list[_S_NFREELISTS]; + _Pthread_alloc_per_thread_state<_Max_size> * __next; + // this data member is only to be used by per_thread_allocator, which returns memory to the originating thread. + _STLP_mutex _M_lock; + + }; + +// Pthread-specific allocator. +// The argument specifies the largest object size allocated from per-thread +// free lists. Larger objects are allocated using malloc_alloc. +// Max_size must be a power of 2. +template < __DFL_NON_TYPE_PARAM(size_t, _Max_size, _MAX_BYTES) > +class _Pthread_alloc { + +public: // but only for internal use: + + typedef _Pthread_alloc_obj __obj; + typedef _Pthread_alloc_per_thread_state<_Max_size> __state_type; + typedef char value_type; + + // Allocates a chunk for nobjs of size size. nobjs may be reduced + // if it is inconvenient to allocate the requested number. + static char *_S_chunk_alloc(size_t __size, size_t &__nobjs); + + enum {_S_ALIGN = _STLP_DATA_ALIGNMENT}; + + static size_t _S_round_up(size_t __bytes) { + return (((__bytes) + (int)_S_ALIGN-1) & ~((int)_S_ALIGN - 1)); + } + static size_t _S_freelist_index(size_t __bytes) { + return (((__bytes) + (int)_S_ALIGN-1)/(int)_S_ALIGN - 1); + } + +private: + // Chunk allocation state. And other shared state. + // Protected by _S_chunk_allocator_lock. + static _STLP_mutex_base _S_chunk_allocator_lock; + static char *_S_start_free; + static char *_S_end_free; + static size_t _S_heap_size; + static _Pthread_alloc_per_thread_state<_Max_size>* _S_free_per_thread_states; + static pthread_key_t _S_key; + static bool _S_key_initialized; + // Pthread key under which per thread state is stored. + // Allocator instances that are currently unclaimed by any thread. + static void _S_destructor(void *instance); + // Function to be called on thread exit to reclaim per thread + // state. + static _Pthread_alloc_per_thread_state<_Max_size> *_S_new_per_thread_state(); +public: + // Return a recycled or new per thread state. + static _Pthread_alloc_per_thread_state<_Max_size> *_S_get_per_thread_state(); +private: + // ensure that the current thread has an associated + // per thread state. + class _M_lock; + friend class _M_lock; + class _M_lock { + public: + _M_lock () { _S_chunk_allocator_lock._M_acquire_lock(); } + ~_M_lock () { _S_chunk_allocator_lock._M_release_lock(); } + }; + +public: + + /* n must be > 0 */ + static void * allocate(size_t __n) + { + __obj * volatile * __my_free_list; + __obj * __RESTRICT __result; + __state_type* __a; + + if (__n > _Max_size) { + return(__malloc_alloc<0>::allocate(__n)); + } + + __a = _S_get_per_thread_state(); + + __my_free_list = __a -> __free_list + _S_freelist_index(__n); + __result = *__my_free_list; + if (__result == 0) { + void *__r = __a -> _M_refill(_S_round_up(__n)); + return __r; + } + *__my_free_list = __result -> __free_list_link; + return (__result); + }; + + /* p may not be 0 */ + static void deallocate(void *__p, size_t __n) + { + __obj *__q = (__obj *)__p; + __obj * volatile * __my_free_list; + __state_type* __a; + + if (__n > _Max_size) { + __malloc_alloc<0>::deallocate(__p, __n); + return; + } + + __a = _S_get_per_thread_state(); + + __my_free_list = __a->__free_list + _S_freelist_index(__n); + __q -> __free_list_link = *__my_free_list; + *__my_free_list = __q; + } + + // boris : versions for per_thread_allocator + /* n must be > 0 */ + static void * allocate(size_t __n, __state_type* __a) + { + __obj * volatile * __my_free_list; + __obj * __RESTRICT __result; + + if (__n > _Max_size) { + return(__malloc_alloc<0>::allocate(__n)); + } + + // boris : here, we have to lock per thread state, as we may be getting memory from + // different thread pool. + _STLP_mutex_lock __lock(__a->_M_lock); + + __my_free_list = __a -> __free_list + _S_freelist_index(__n); + __result = *__my_free_list; + if (__result == 0) { + void *__r = __a -> _M_refill(_S_round_up(__n)); + return __r; + } + *__my_free_list = __result -> __free_list_link; + return (__result); + }; + + /* p may not be 0 */ + static void deallocate(void *__p, size_t __n, __state_type* __a) + { + __obj *__q = (__obj *)__p; + __obj * volatile * __my_free_list; + + if (__n > _Max_size) { + __malloc_alloc<0>::deallocate(__p, __n); + return; + } + + // boris : here, we have to lock per thread state, as we may be returning memory from + // different thread. + _STLP_mutex_lock __lock(__a->_M_lock); + + __my_free_list = __a->__free_list + _S_freelist_index(__n); + __q -> __free_list_link = *__my_free_list; + *__my_free_list = __q; + } + + static void * reallocate(void *__p, size_t __old_sz, size_t __new_sz); + +} ; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS _Pthread_alloc<_MAX_BYTES>; +# endif + +typedef _Pthread_alloc<_MAX_BYTES> __pthread_alloc; +typedef __pthread_alloc pthread_alloc; + +template +class pthread_allocator { + typedef pthread_alloc _S_Alloc; // The underlying allocator. +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + +#ifdef _STLP_MEMBER_TEMPLATE_CLASSES + template struct rebind { + typedef pthread_allocator<_NewType> other; + }; +#endif + + pthread_allocator() _STLP_NOTHROW {} + pthread_allocator(const pthread_allocator<_Tp>& a) _STLP_NOTHROW {} + +#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */ + template pthread_allocator(const pthread_allocator<_OtherType>&) + _STLP_NOTHROW {} +#endif + + ~pthread_allocator() _STLP_NOTHROW {} + + pointer address(reference __x) const { return &__x; } + const_pointer address(const_reference __x) const { return &__x; } + + // __n is permitted to be 0. The C++ standard says nothing about what + // the return value is when __n == 0. + _Tp* allocate(size_type __n, const void* = 0) { + return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp))) + : 0; + } + + // p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type __n) + { _S_Alloc::deallocate(__p, __n * sizeof(_Tp)); } + + size_type max_size() const _STLP_NOTHROW + { return size_t(-1) / sizeof(_Tp); } + + void construct(pointer __p, const _Tp& __val) { _STLP_PLACEMENT_NEW (__p) _Tp(__val); } + void destroy(pointer _p) { _p->~_Tp(); } +}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC pthread_allocator { +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; +#ifdef _STLP_MEMBER_TEMPLATE_CLASSES + template struct rebind { + typedef pthread_allocator<_NewType> other; + }; +#endif +}; + +template +inline bool operator==(const pthread_allocator<_T1>&, + const pthread_allocator<_T2>& a2) +{ + return true; +} + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER +template +inline bool operator!=(const pthread_allocator<_T1>&, + const pthread_allocator<_T2>&) +{ + return false; +} +#endif + + +#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + +# ifdef _STLP_USE_RAW_SGI_ALLOCATORS +template +struct _Alloc_traits<_Tp, _Pthread_alloc<_Max_size> > +{ + typedef __allocator<_Tp, _Pthread_alloc<_Max_size> > + allocator_type; +}; +# endif + +template +struct _Alloc_traits<_Tp, pthread_allocator<_Atype> > +{ + typedef pthread_allocator<_Tp> allocator_type; +}; + +#endif + +#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) + +template +inline pthread_allocator<_Tp2>& +__stl_alloc_rebind(pthread_allocator<_Tp1>& __x, const _Tp2*) { + return (pthread_allocator<_Tp2>&)__x; +} + +template +inline pthread_allocator<_Tp2> +__stl_alloc_create(pthread_allocator<_Tp1>&, const _Tp2*) { + return pthread_allocator<_Tp2>(); +} + +#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ + +// +// per_thread_allocator<> : this allocator always return memory to the same thread +// it was allocated from. +// + +template +class per_thread_allocator { + typedef pthread_alloc _S_Alloc; // The underlying allocator. + typedef pthread_alloc::__state_type __state_type; +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef _Tp* pointer; + typedef const _Tp* const_pointer; + typedef _Tp& reference; + typedef const _Tp& const_reference; + typedef _Tp value_type; + +#ifdef _STLP_MEMBER_TEMPLATE_CLASSES + template struct rebind { + typedef per_thread_allocator<_NewType> other; + }; +#endif + + per_thread_allocator() _STLP_NOTHROW { + _M_state = _S_Alloc::_S_get_per_thread_state(); + } + per_thread_allocator(const per_thread_allocator<_Tp>& __a) _STLP_NOTHROW : _M_state(__a._M_state){} + +#if defined (_STLP_MEMBER_TEMPLATES) /* && defined (_STLP_FUNCTION_PARTIAL_ORDER) */ + template per_thread_allocator(const per_thread_allocator<_OtherType>& __a) + _STLP_NOTHROW : _M_state(__a._M_state) {} +#endif + + ~per_thread_allocator() _STLP_NOTHROW {} + + pointer address(reference __x) const { return &__x; } + const_pointer address(const_reference __x) const { return &__x; } + + // __n is permitted to be 0. The C++ standard says nothing about what + // the return value is when __n == 0. + _Tp* allocate(size_type __n, const void* = 0) { + return __n != 0 ? __STATIC_CAST(_Tp*,_S_Alloc::allocate(__n * sizeof(_Tp), _M_state)): 0; + } + + // p is not permitted to be a null pointer. + void deallocate(pointer __p, size_type __n) + { _S_Alloc::deallocate(__p, __n * sizeof(_Tp), _M_state); } + + size_type max_size() const _STLP_NOTHROW + { return size_t(-1) / sizeof(_Tp); } + + void construct(pointer __p, const _Tp& __val) { _STLP_PLACEMENT_NEW (__p) _Tp(__val); } + void destroy(pointer _p) { _p->~_Tp(); } + + // state is being kept here + __state_type* _M_state; +}; + +_STLP_TEMPLATE_NULL +class _STLP_CLASS_DECLSPEC per_thread_allocator { +public: + typedef size_t size_type; + typedef ptrdiff_t difference_type; + typedef void* pointer; + typedef const void* const_pointer; + typedef void value_type; +#ifdef _STLP_MEMBER_TEMPLATE_CLASSES + template struct rebind { + typedef per_thread_allocator<_NewType> other; + }; +#endif +}; + +template +inline bool operator==(const per_thread_allocator<_T1>& __a1, + const per_thread_allocator<_T2>& __a2) +{ + return __a1._M_state == __a2._M_state; +} + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER +template +inline bool operator!=(const per_thread_allocator<_T1>& __a1, + const per_thread_allocator<_T2>& __a2) +{ + return __a1._M_state != __a2._M_state; +} +#endif + + +#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + +template +struct _Alloc_traits<_Tp, per_thread_allocator<_Atype> > +{ + typedef per_thread_allocator<_Tp> allocator_type; +}; + +#endif + +#if !defined (_STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM) + +template +inline per_thread_allocator<_Tp2>& +__stl_alloc_rebind(per_thread_allocator<_Tp1>& __x, const _Tp2*) { + return (per_thread_allocator<_Tp2>&)__x; +} + +template +inline per_thread_allocator<_Tp2> +__stl_alloc_create(per_thread_allocator<_Tp1>&, const _Tp2*) { + return per_thread_allocator<_Tp2>(); +} + +#endif /* _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM */ + +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_PTHREAD_ALLOC */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_ptrs_specialize.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_ptrs_specialize.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,72 @@ +#ifndef _STLP_PTRS_SPECIALIZE_H +# define _STLP_PTRS_SPECIALIZE_H + +// the following is a workaround for arrow operator problems +# if defined ( _STLP_NO_ARROW_OPERATOR ) +// User wants to disable proxy -> operators +# define _STLP_DEFINE_ARROW_OPERATOR +# define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp) +# else +// Compiler can handle generic -> operator. +# define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp) +# ifdef __BORLANDC__ +# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(*(*this)); } +# elif defined ( _STLP_WINCE ) || defined(__WATCOMC__) +# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; } +# else +# define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { return &(operator*()); } +# endif +# endif /* _STLP_NO_ARROW_OPERATOR */ + +// Important pointers specializations + +# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS +# define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) +# define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) +# else +# define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux {}; +# define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \ +_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***) +# endif + +# define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Type) + +# if !defined ( _STLP_NO_BOOL ) +_STLP_POINTERS_SPECIALIZE( bool ) +# endif +_STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void) +# ifndef _STLP_NO_SIGNED_BUILTINS + _STLP_POINTERS_SPECIALIZE( signed char ) +# endif + _STLP_POINTERS_SPECIALIZE( char ) + _STLP_POINTERS_SPECIALIZE( unsigned char ) + _STLP_POINTERS_SPECIALIZE( short ) + _STLP_POINTERS_SPECIALIZE( unsigned short ) + _STLP_POINTERS_SPECIALIZE( int ) + _STLP_POINTERS_SPECIALIZE( unsigned int ) + _STLP_POINTERS_SPECIALIZE( long ) + _STLP_POINTERS_SPECIALIZE( unsigned long ) + _STLP_POINTERS_SPECIALIZE( float ) + _STLP_POINTERS_SPECIALIZE( double ) +# if !defined ( _STLP_NO_LONG_DOUBLE ) + _STLP_POINTERS_SPECIALIZE( long double ) +# endif +# if defined ( _STLP_LONG_LONG) + _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG ) + _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG ) +# endif +#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT) + _STLP_POINTERS_SPECIALIZE( wchar_t ) +# endif + +# undef _STLP_ARROW_SPECIALIZE +# undef _STLP_ARROW_SPECIALIZE_WITH_PTRS +# undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_queue.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_queue.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,212 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_QUEUE_H +#define _STLP_INTERNAL_QUEUE_H + +#ifndef _STLP_INTERNAL_DEQUE_H +# include +#endif + +#ifndef _STLP_INTERNAL_VECTOR_H +# include +#endif + +#ifndef _STLP_INTERNAL_HEAP_H +# include +#endif + +#ifndef _STLP_INTERNAL_FUNCTION_H +# include +#endif + +#if defined(__SC__) && !defined(__DMC__) //*ty 12/07/2001 - since "comp" is a built-in type and reserved under SCpp +#define comp _Comp +#endif + +_STLP_BEGIN_NAMESPACE + +# if ! defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) +template > +# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS ) +# define _STLP_QUEUE_ARGS _Tp +template +# else +template +# endif + +class queue { +# if defined ( _STLP_QUEUE_ARGS ) + typedef deque<_Tp> _Sequence; +# endif +public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; + +protected: + _Sequence c; +public: + queue() : c() {} + explicit queue(const _Sequence& __c) : c(__c) {} + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + reference front() { return c.front(); } + const_reference front() const { return c.front(); } + reference back() { return c.back(); } + const_reference back() const { return c.back(); } + void push(const value_type& __x) { c.push_back(__x); } + void pop() { c.pop_front(); } + const _Sequence& _Get_c() const { return c; } +}; + +# ifndef _STLP_QUEUE_ARGS +# define _STLP_QUEUE_ARGS _Tp, _Sequence +# define _STLP_QUEUE_HEADER_ARGS class _Tp, class _Sequence +# else +# define _STLP_QUEUE_HEADER_ARGS class _Tp +# endif + +template < _STLP_QUEUE_HEADER_ARGS > +inline bool _STLP_CALL +operator==(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y) +{ + return __x._Get_c() == __y._Get_c(); +} + +template < _STLP_QUEUE_HEADER_ARGS > +inline bool _STLP_CALL +operator<(const queue<_STLP_QUEUE_ARGS >& __x, const queue<_STLP_QUEUE_ARGS >& __y) +{ + return __x._Get_c() < __y._Get_c(); +} + +_STLP_RELOPS_OPERATORS( template < _STLP_QUEUE_HEADER_ARGS >, queue<_STLP_QUEUE_ARGS > ) + +# if !(defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) || defined ( _STLP_TEMPLATE_PARAM_SUBTYPE_BUG )) +template , + class _Compare = less<_STLP_HEADER_TYPENAME _Sequence::value_type> > +# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS ) +template +# else +template +# endif +class priority_queue { +# ifdef _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS + typedef vector<_Tp> _Sequence; + typedef less< typename vector<_Tp>::value_type> _Compare; +# endif +public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; +protected: + _Sequence c; + _Compare comp; +public: + priority_queue() : c() {} + explicit priority_queue(const _Compare& __x) : c(), comp(__x) {} + explicit priority_queue(const _Compare& __x, const _Sequence& __s) + : c(__s), comp(__x) + { make_heap(c.begin(), c.end(), comp); } + +#ifdef _STLP_MEMBER_TEMPLATES + template + priority_queue(_InputIterator __first, _InputIterator __last) + : c(__first, __last) { make_heap(c.begin(), c.end(), comp); } + + template + priority_queue(_InputIterator __first, + _InputIterator __last, const _Compare& __x) + : c(__first, __last), comp(__x) + { make_heap(c.begin(), c.end(), comp); } + + template + priority_queue(_InputIterator __first, _InputIterator __last, + const _Compare& __x, const _Sequence& __s) + : c(__s), comp(__x) + { + c.insert(c.end(), __first, __last); + make_heap(c.begin(), c.end(), comp); + } + +#else /* _STLP_MEMBER_TEMPLATES */ + priority_queue(const value_type* __first, const value_type* __last) + : c(__first, __last) { make_heap(c.begin(), c.end(), comp); } + + priority_queue(const value_type* __first, const value_type* __last, + const _Compare& __x) + : c(__first, __last), comp(__x) + { make_heap(c.begin(), c.end(), comp); } + + priority_queue(const value_type* __first, const value_type* __last, + const _Compare& __x, const _Sequence& __c) + : c(__c), comp(__x) + { + c.insert(c.end(), __first, __last); + make_heap(c.begin(), c.end(), comp); + } +#endif /* _STLP_MEMBER_TEMPLATES */ + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + const_reference top() const { return c.front(); } + void push(const value_type& __x) { + _STLP_TRY { + c.push_back(__x); + push_heap(c.begin(), c.end(), comp); + } + _STLP_UNWIND(c.clear()); + } + void pop() { + _STLP_TRY { + pop_heap(c.begin(), c.end(), comp); + c.pop_back(); + } + _STLP_UNWIND(c.clear()); + } +}; + +_STLP_END_NAMESPACE + +# undef _STLP_QUEUE_ARGS +# undef _STLP_QUEUE_HEADER_ARGS + +#endif /* _STLP_INTERNAL_QUEUE_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_range_errors.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_range_errors.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,105 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ + +#ifndef _STLP_RANGE_ERRORS_H +#define _STLP_RANGE_ERRORS_H + +// A few places in the STL throw range errors, using standard exception +// classes defined in . This header file provides functions +// to throw those exception objects. + +// _STLP_DONT_THROW_RANGE_ERRORS is a hook so that users can disable +// this exception throwing. +#if defined(_STLP_CAN_THROW_RANGE_ERRORS) && defined(_STLP_USE_EXCEPTIONS) \ + && !defined(_STLP_DONT_THROW_RANGE_ERRORS) +# define _STLP_THROW_RANGE_ERRORS +#endif + +// For the STLport iostreams, only declaration here, definition is in the lib + +#if defined ( _STLP_OWN_IOSTREAMS ) && ! defined (_STLP_EXTERN_RANGE_ERRORS) +# define _STLP_EXTERN_RANGE_ERRORS +# endif + +#if defined (_STLP_EXTERN_RANGE_ERRORS) +# ifndef _STLP_STDEXCEPT +# include +# endif +_STLP_BEGIN_NAMESPACE +void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg); +void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg); +void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg); +void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg); +void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg); +_STLP_END_NAMESPACE +#else + +#if defined(_STLP_THROW_RANGE_ERRORS) +# ifndef _STLP_STDEXCEPT +# include +# endif +# ifndef _STLP_STRING +# include +# endif +# define _STLP_THROW_MSG(ex,msg) throw ex(string(msg)) +#else +# if defined (_STLP_WINCE) +# define _STLP_THROW_MSG(ex,msg) TerminateProcess(GetCurrentProcess(), 0) +# else +# include +# include +# ifdef _STLP_USE_TRAP_LEAVE +# define _STLP_THROW_MSG(ex,msg) { STDEX_REPORT_EXCEPTION(msg) ; User::Leave(STDEX_##ex); } +# include +# else +# define _STLP_THROW_MSG(ex,msg) puts(msg),_STLP_ABORT() +# endif +# endif +#endif + +// For wrapper mode and throwing range errors, include the +// stdexcept header and throw the appropriate exceptions directly. + +_STLP_BEGIN_NAMESPACE +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_range_error(const char* __msg) { + _STLP_THROW_MSG(range_error, __msg); +} + +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_out_of_range(const char* __msg) { + _STLP_THROW_MSG(out_of_range, __msg); +} + +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_length_error(const char* __msg) { + _STLP_THROW_MSG(length_error, __msg); +} + +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_invalid_argument(const char* __msg) { + _STLP_THROW_MSG(invalid_argument, __msg); +} + +inline void _STLP_DECLSPEC _STLP_CALL __stl_throw_overflow_error(const char* __msg) { + _STLP_THROW_MSG(overflow_error, __msg); +} +_STLP_END_NAMESPACE + +# undef _STLP_THROW_MSG + +# endif /* EXTERN_RANGE_ERRORS */ + + +#endif /* _STLP_RANGE_ERRORS_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_raw_storage_iter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_raw_storage_iter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,82 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H +#define _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +class raw_storage_iterator +# if defined (_STLP_HAS_VOID_SPECIALIZATION) || defined (__SYMBIAN32__) + : public iterator +# endif +{ +protected: + _ForwardIterator _M_iter; +public: + typedef output_iterator_tag iterator_category; +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; +# endif + explicit raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {} + raw_storage_iterator<_ForwardIterator, _Tp>& operator*() { return *this; } + raw_storage_iterator<_ForwardIterator, _Tp>& operator=(const _Tp& __element) { + _Construct(&*_M_iter, __element); + return *this; + } + raw_storage_iterator<_ForwardIterator, _Tp>& operator++() { + ++_M_iter; + return *this; + } + raw_storage_iterator<_ForwardIterator, _Tp> operator++(int) { + raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this; + ++_M_iter; + return __tmp; + } +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template +inline output_iterator_tag iterator_category(const raw_storage_iterator<_ForwardIterator, _Tp>&) { return output_iterator_tag(); } +#endif +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_RAW_STORAGE_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_rope.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_rope.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1545 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf +// if necessary. Assumes path_end[leaf_index] and leaf_pos are correct. +// Results in a valid buf_ptr if the iterator can be legitimately +// dereferenced. +# ifndef _STLP_ROPEIMPL_H +# define _STLP_ROPEIMPL_H + +#ifndef _STLP_INTERNAL_ROPE_H +# include +#endif + +# ifndef _STLP_CSTDIO +# include +# endif + +#ifndef _STLP_IOSTREAM +# include +#endif + +# include + +_STLP_BEGIN_NAMESPACE + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +# define __allocator__ _Alloc +# else +# define __allocator__ allocator_type +# endif + +template +_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos) + : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr._M_data, __pos), + _M_root_rope(__r) { _RopeRep::_S_ref(this->_M_root); } + +template +_Rope_iterator<_CharT, _Alloc>::_Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos): + _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos), + _M_root_rope(&__r) { + _RopeRep::_S_ref(this->_M_root); if (!(__r.empty()))_S_setcache(*this); +} + +template +void +_Rope_RopeRep<_CharT, _Alloc>::_M_free_c_string() +{ + _CharT* __cstr = _M_c_string; + if (0 != __cstr) { + size_t _p_size = _M_size._M_data + 1; + _STLP_STD::_Destroy(__cstr, __cstr + _p_size); + _M_size.deallocate(__cstr, _p_size); + } +} + + +// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf +// if necessary. Assumes _M_path_end[leaf_index] and leaf_pos are correct. +// Results in a valid buf_ptr if the iterator can be legitimately +// dereferenced. +template +void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf( + _Rope_iterator_base<_CharT,_Alloc>& __x) +{ + const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index]; + size_t __leaf_pos = __x._M_leaf_pos; + size_t __pos = __x._M_current_pos; + + switch(__leaf->_M_tag) { + case _RopeRep::_S_leaf: + __x._M_buf_start = + ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data; + __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos); + __x._M_buf_end = __x._M_buf_start + __leaf->_M_size._M_data; + break; + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + { + size_t __len = _S_iterator_buf_len; + size_t __buf_start_pos = __leaf_pos; + size_t __leaf_end = __leaf_pos + __leaf->_M_size._M_data; + char_producer<_CharT>* __fn = + ((_Rope_RopeFunction<_CharT,_Alloc>*)__leaf)->_M_fn; + + if (__buf_start_pos + __len <= __pos) { + __buf_start_pos = __pos - __len/4; + if (__buf_start_pos + __len > __leaf_end) { + __buf_start_pos = __leaf_end - __len; + } + } + if (__buf_start_pos + __len > __leaf_end) { + __len = __leaf_end - __buf_start_pos; + } + (*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf); + __x._M_buf_ptr = __x._M_tmp_buf + (__pos - __buf_start_pos); + __x._M_buf_start = __x._M_tmp_buf; + __x._M_buf_end = __x._M_tmp_buf + __len; + } + break; + default: + _STLP_ASSERT(0) + ; + } +} + +// Set path and buffer inside a rope iterator. We assume that +// pos and root are already set. +template +void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache +(_Rope_iterator_base<_CharT,_Alloc>& __x) +{ + const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1]; + const _RopeRep* __curr_rope; + int __curr_depth = -1; /* index into path */ + size_t __curr_start_pos = 0; + size_t __pos = __x._M_current_pos; + unsigned char __dirns = 0; // Bit vector marking right turns in the path + + _STLP_ASSERT(__pos <= __x._M_root->_M_size._M_data) + if (__pos >= __x._M_root->_M_size._M_data) { + __x._M_buf_ptr = 0; + return; + } + __curr_rope = __x._M_root; + if (0 != __curr_rope->_M_c_string) { + /* Treat the root as a leaf. */ + __x._M_buf_start = __curr_rope->_M_c_string; + __x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size._M_data; + __x._M_buf_ptr = __curr_rope->_M_c_string + __pos; + __x._M_path_end[0] = __curr_rope; + __x._M_leaf_index = 0; + __x._M_leaf_pos = 0; + return; + } + for(;;) { + ++__curr_depth; + _STLP_ASSERT(__curr_depth <= _RopeRep::_S_max_rope_depth) + __path[__curr_depth] = __curr_rope; + switch(__curr_rope->_M_tag) { + case _RopeRep::_S_leaf: + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + __x._M_leaf_pos = __curr_start_pos; + goto done; + case _RopeRep::_S_concat: + { + _Rope_RopeConcatenation<_CharT,_Alloc>* __c = + (_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope; + _RopeRep* __left = __c->_M_left; + size_t __left_len = __left->_M_size._M_data; + + __dirns <<= 1; + if (__pos >= __curr_start_pos + __left_len) { + __dirns |= 1; + __curr_rope = __c->_M_right; + __curr_start_pos += __left_len; + } else { + __curr_rope = __left; + } + } + break; + } + } + done: + // Copy last section of path into _M_path_end. + { + int __i = -1; + int __j = __curr_depth + 1 - _S_path_cache_len; + + if (__j < 0) __j = 0; + while (__j <= __curr_depth) { + __x._M_path_end[++__i] = __path[__j++]; + } + __x._M_leaf_index = __i; + } + __x._M_path_directions = __dirns; + _S_setbuf(__x); +} + +// Specialized version of the above. Assumes that +// the path cache is valid for the previous position. +template +void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr +(_Rope_iterator_base<_CharT,_Alloc>& __x) +{ + int __current_index = __x._M_leaf_index; + const _RopeRep* __current_node = __x._M_path_end[__current_index]; + size_t __len = __current_node->_M_size._M_data; + size_t __node_start_pos = __x._M_leaf_pos; + unsigned char __dirns = __x._M_path_directions; + _Rope_RopeConcatenation<_CharT,_Alloc>* __c; + + _STLP_ASSERT(__x._M_current_pos <= __x._M_root->_M_size._M_data) + if (__x._M_current_pos - __node_start_pos < __len) { + /* More stuff in this leaf, we just didn't cache it. */ + _S_setbuf(__x); + return; + } + _STLP_ASSERT(__node_start_pos + __len == __x._M_current_pos) + // node_start_pos is starting position of last_node. + while (--__current_index >= 0) { + if (!(__dirns & 1) /* Path turned left */) + break; + __current_node = __x._M_path_end[__current_index]; + __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node; + // Otherwise we were in the right child. Thus we should pop + // the concatenation node. + __node_start_pos -= __c->_M_left->_M_size._M_data; + __dirns >>= 1; + } + if (__current_index < 0) { + // We underflowed the cache. Punt. + _S_setcache(__x); + return; + } + __current_node = __x._M_path_end[__current_index]; + __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node; + // current_node is a concatenation node. We are positioned on the first + // character in its right child. + // node_start_pos is starting position of current_node. + __node_start_pos += __c->_M_left->_M_size._M_data; + __current_node = __c->_M_right; + __x._M_path_end[++__current_index] = __current_node; + __dirns |= 1; + while (_RopeRep::_S_concat == __current_node->_M_tag) { + ++__current_index; + if (_S_path_cache_len == __current_index) { + int __i; + for (__i = 0; __i < _S_path_cache_len-1; __i++) { + __x._M_path_end[__i] = __x._M_path_end[__i+1]; + } + --__current_index; + } + __current_node = + ((_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node)->_M_left; + __x._M_path_end[__current_index] = __current_node; + __dirns <<= 1; + // node_start_pos is unchanged. + } + __x._M_leaf_index = __current_index; + __x._M_leaf_pos = __node_start_pos; + __x._M_path_directions = __dirns; + _S_setbuf(__x); +} + +template +void _Rope_iterator_base<_CharT,_Alloc>::_M_incr(size_t __n) { + _M_current_pos += __n; + if (0 != _M_buf_ptr) { + size_t __chars_left = _M_buf_end - _M_buf_ptr; + if (__chars_left > __n) { + _M_buf_ptr += __n; + } else if (__chars_left == __n) { + _M_buf_ptr += __n; + _S_setcache_for_incr(*this); + } else { + _M_buf_ptr = 0; + } + } +} + +template +void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) { + if (0 != _M_buf_ptr) { + size_t __chars_left = _M_buf_ptr - _M_buf_start; + if (__chars_left >= __n) { + _M_buf_ptr -= __n; + } else { + _M_buf_ptr = 0; + } + } + _M_current_pos -= __n; +} + +template +void _Rope_iterator<_CharT,_Alloc>::_M_check() { + if (_M_root_rope->_M_tree_ptr._M_data != this->_M_root) { + // _Rope was modified. Get things fixed up. + _RopeRep::_S_unref(this->_M_root); + this->_M_root = _M_root_rope->_M_tree_ptr._M_data; + _RopeRep::_S_ref(this->_M_root); + this->_M_buf_ptr = 0; + } +} + +# ifndef _GC +// There are several reasons for not doing this with virtual destructors +// and a class specific delete operator: +// - A class specific delete operator can't easily get access to +// allocator instances if we need them. +// - Any virtual function would need a 4 or byte vtable pointer; +// this only requires a one byte tag per object. +template +void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree() +{ + switch(_M_tag) { + case _S_leaf: + { + typedef _Rope_RopeLeaf<_CharT,_Alloc> _Rope_RopeLeaf_T; + _Rope_RopeLeaf_T* __l = (_Rope_RopeLeaf_T*)this; + _STLP_STD::_Destroy(__l); // ->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf(); + _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, _Rope_RopeLeaf_T).deallocate(__l, 1); + break; + } + case _S_concat: + { + typedef _Rope_RopeConcatenation<_CharT,_Alloc> _Rope_RopeConcatenation_T; + _Rope_RopeConcatenation_T* __c = (_Rope_RopeConcatenation_T*)this; + _STLP_STD::_Destroy(__c); + _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, + _Rope_RopeConcatenation_T).deallocate(__c, 1); + break; + } + case _S_function: + { + typedef _Rope_RopeFunction<_CharT,_Alloc> _Rope_RopeFunctionT; + _Rope_RopeFunctionT* __f = (_Rope_RopeFunctionT*)this; + _STLP_STD::_Destroy(__f); + _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, + _Rope_RopeFunctionT).deallocate(__f, 1); + break; + } + case _S_substringfn: + { + typedef _Rope_RopeSubstring<_CharT,_Alloc> _Rope_RopeSubstring_T; + _Rope_RopeSubstring_T* __ss = (_Rope_RopeSubstring_T*)this; + _STLP_STD::_Destroy(__ss); + _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_size, + _Rope_RopeSubstring_T).deallocate(__ss, 1); + break; + } + } +} +#endif + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +# define __RopeLeaf__ _Rope_RopeLeaf<_CharT,_Alloc> +# define __RopeRep__ _Rope_RopeRep<_CharT,_Alloc> +# define _RopeLeaf _Rope_RopeLeaf<_CharT,_Alloc> +# define _RopeRep _Rope_RopeRep<_CharT,_Alloc> +# define size_type size_t +# else +# define __RopeLeaf__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeLeaf +# define __RopeRep__ _STLP_TYPENAME_ON_RETURN_TYPE rope<_CharT,_Alloc>::_RopeRep +# endif + +// Concatenate a C string onto a leaf rope by copying the rope data. +// Used for short ropes. +template +__RopeLeaf__* +rope<_CharT,_Alloc>::_S_leaf_concat_char_iter + (_RopeLeaf* __r, const _CharT* __iter, size_t __len) +{ + size_t __old_len = __r->_M_size._M_data; + _CharT* __new_data = __r->_M_size.allocate(_S_rounded_up_size(__old_len + __len)); + _RopeLeaf* __result; + + uninitialized_copy_n(__r->_M_data, __old_len, __new_data); + uninitialized_copy_n(__iter, __len, __new_data + __old_len); + _S_cond_store_eos(__new_data[__old_len + __len]); + _STLP_TRY { + __result = _S_new_RopeLeaf(__new_data, __old_len + __len, + __r->get_allocator()); + } + _STLP_UNWIND(_RopeRep::_S_free_string(__new_data, __old_len + __len, + __r->get_allocator())); + return __result; +} + +#ifndef __GC +// As above, but it's OK to clobber original if refcount is 1 +template +__RopeLeaf__* +rope<_CharT,_Alloc>::_S_destr_leaf_concat_char_iter + (_RopeLeaf* __r, const _CharT* __iter, size_t __len) +{ + _STLP_ASSERT(__r->_M_ref_count >= 1) + if (__r->_M_ref_count > 1) + return _S_leaf_concat_char_iter(__r, __iter, __len); + size_t __old_len = __r->_M_size._M_data; + if (_S_allocated_capacity(__old_len) >= __old_len + __len) { + // The space has been partially initialized for the standard + // character types. But that doesn't matter for those types. + uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len); + if (_S_is_basic_char_type((_CharT*)0)) { + _S_cond_store_eos(__r->_M_data[__old_len + __len]); + _STLP_ASSERT(__r->_M_c_string == __r->_M_data) + } else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string) { + __r->_M_free_c_string(); + __r->_M_c_string = 0; + } + __r->_M_size._M_data = __old_len + __len; + _STLP_ASSERT(__r->_M_ref_count == 1) + __r->_M_ref_count = 2; + return __r; + } else { + _RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len); + _STLP_ASSERT(__result->_M_ref_count == 1) + return __result; + } +} +#endif + +// Assumes left and right are not 0. +// Does not increment (nor decrement on exception) child reference counts. +// Result has ref count 1. +template +__RopeRep__* +rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right) +{ + _RopeConcatenation* __result = + _S_new_RopeConcatenation(__left, __right, __left->get_allocator()); + size_t __depth = __result->_M_depth; + + _STLP_ASSERT(__left->get_allocator() == __right->get_allocator()) + if (__depth > 20 && (__result->_M_size._M_data < 1000 || + __depth > _RopeRep::_S_max_rope_depth)) { + _RopeRep* __balanced; + + _STLP_TRY { + __balanced = _S_balance(__result); +# ifndef __GC + if (__result != __balanced) { + _STLP_ASSERT(1 == __result->_M_ref_count + && 1 == __balanced->_M_ref_count) + } +# endif + __result->_M_unref_nonnil(); + } + _STLP_UNWIND((_STLP_CREATE_ALLOCATOR(allocator_type,(allocator_type&)__left->_M_size, + _RopeConcatenation).deallocate(__result,1))); + // In case of exception, we need to deallocate + // otherwise dangling result node. But caller + // still owns its children. Thus unref is + // inappropriate. + return __balanced; + } else { + return __result; + } +} + +template +__RopeRep__* +rope<_CharT,_Alloc>::_S_concat_char_iter + (_RopeRep* __r, const _CharT*__s, size_t __slen) +{ + _RopeRep* __result; + if (0 == __slen) { + _S_ref(__r); + return __r; + } + if (0 == __r) + return _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, + /* __r->get_allocator()*/ allocator_type() ); + if (_RopeRep::_S_leaf == __r->_M_tag && + __r->_M_size._M_data + __slen <= _S_copy_max) { + __result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); +# ifndef __GC + _STLP_ASSERT(1 == __result->_M_ref_count) +# endif + return __result; + } + if (_RopeRep::_S_concat == __r->_M_tag + && _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) { + _RopeLeaf* __right = + (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right); + if (__right->_M_size._M_data + __slen <= _S_copy_max) { + _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left; + _RopeRep* __nright = + _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen); + __left->_M_ref_nonnil(); + _STLP_TRY { + __result = _S_tree_concat(__left, __nright); + } + _STLP_UNWIND(_S_unref(__left); _S_unref(__nright)); +# ifndef __GC + _STLP_ASSERT(1 == __result->_M_ref_count) +# endif + return __result; + } + } + _RopeRep* __nright = + _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); + _STLP_TRY { + __r->_M_ref_nonnil(); + __result = _S_tree_concat(__r, __nright); + } + _STLP_UNWIND(_S_unref(__r); _S_unref(__nright)); +# ifndef __GC + _STLP_ASSERT(1 == __result->_M_ref_count) +# endif + return __result; +} + +#ifndef __GC +template +__RopeRep__* +rope<_CharT,_Alloc>::_S_destr_concat_char_iter( + _RopeRep* __r, const _CharT* __s, size_t __slen) +{ + _RopeRep* __result; + if (0 == __r) + return _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, + /* __r-> */allocator_type()); + size_t __count = __r->_M_ref_count; + size_t __orig_size = __r->_M_size._M_data; + _STLP_ASSERT(__count >= 1) + if (__count > 1) return _S_concat_char_iter(__r, __s, __slen); + if (0 == __slen) { + __r->_M_ref_count = 2; // One more than before + return __r; + } + if (__orig_size + __slen <= _S_copy_max && + _RopeRep::_S_leaf == __r->_M_tag) { + __result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen); + return __result; + } + if (_RopeRep::_S_concat == __r->_M_tag) { + _RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right); + if (_RopeRep::_S_leaf == __right->_M_tag + && __right->_M_size._M_data + __slen <= _S_copy_max) { + _RopeRep* __new_right = + _S_destr_leaf_concat_char_iter(__right, __s, __slen); + if (__right == __new_right) { + _STLP_ASSERT(__new_right->_M_ref_count == 2) + __new_right->_M_ref_count = 1; + } else { + _STLP_ASSERT(__new_right->_M_ref_count >= 1) + __right->_M_unref_nonnil(); + } + _STLP_ASSERT(__r->_M_ref_count == 1) + __r->_M_ref_count = 2; // One more than before. + ((_RopeConcatenation*)__r)->_M_right = __new_right; + // E.Musser : moved below + // __r->_M_size._M_data = __orig_size + __slen; + if (0 != __r->_M_c_string) { + __r->_M_free_c_string(); + __r->_M_c_string = 0; + } + __r->_M_size._M_data = __orig_size + __slen; + return __r; + } + } + _RopeRep* __right = + _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator()); + __r->_M_ref_nonnil(); + _STLP_TRY { + __result = _S_tree_concat(__r, __right); + } + _STLP_UNWIND(_S_unref(__r); _S_unref(__right)) + _STLP_ASSERT(1 == __result->_M_ref_count) + return __result; +} +#endif /* !__GC */ + +template +__RopeRep__* +rope<_CharT,_Alloc>::_S_concat_rep(_RopeRep* __left, _RopeRep* __right) +{ + if (0 == __left) { + _S_ref(__right); + return __right; + } + if (0 == __right) { + __left->_M_ref_nonnil(); + return __left; + } + if (_RopeRep::_S_leaf == __right->_M_tag) { + if (_RopeRep::_S_leaf == __left->_M_tag) { + if (__right->_M_size._M_data + __left->_M_size._M_data <= _S_copy_max) { + return _S_leaf_concat_char_iter((_RopeLeaf*)__left, + ((_RopeLeaf*)__right)->_M_data, + __right->_M_size._M_data); + } + } else if (_RopeRep::_S_concat == __left->_M_tag + && _RopeRep::_S_leaf == + ((_RopeConcatenation*)__left)->_M_right->_M_tag) { + _RopeLeaf* __leftright = + (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); + if (__leftright->_M_size._M_data + __right->_M_size._M_data <= _S_copy_max) { + _RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left; + _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright, + ((_RopeLeaf*)__right)->_M_data, + __right->_M_size._M_data); + __leftleft->_M_ref_nonnil(); + _STLP_TRY { + return(_S_tree_concat(__leftleft, __rest)); + } + _STLP_UNWIND(_S_unref(__leftleft); _S_unref(__rest)) + } + } + } + __left->_M_ref_nonnil(); + __right->_M_ref_nonnil(); + _STLP_TRY { + return(_S_tree_concat(__left, __right)); + } + _STLP_UNWIND(_S_unref(__left); _S_unref(__right)); +#ifdef _STLP_THROW_RETURN_BUG + return 0; +#endif +} + +template +__RopeRep__* +rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base, + size_t __start, size_t __endp1) +{ + if (0 == __base) return 0; + size_t __len = __base->_M_size._M_data; + size_t __adj_endp1; + const size_t __lazy_threshold = 128; + + if (__endp1 >= __len) { + if (0 == __start) { + __base->_M_ref_nonnil(); + return __base; + } else { + __adj_endp1 = __len; + } + } else { + __adj_endp1 = __endp1; + } + switch(__base->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__base; + _RopeRep* __left = __c->_M_left; + _RopeRep* __right = __c->_M_right; + size_t __left_len = __left->_M_size._M_data; + _RopeRep* __result; + + if (__adj_endp1 <= __left_len) { + return _S_substring(__left, __start, __endp1); + } else if (__start >= __left_len) { + return _S_substring(__right, __start - __left_len, + __adj_endp1 - __left_len); + } + _Self_destruct_ptr __left_result( + _S_substring(__left, __start, __left_len)); + _Self_destruct_ptr __right_result( + _S_substring(__right, 0, __endp1 - __left_len)); + _STLP_MPWFIX_TRY //*TY 06/01/2000 - mpw forgets to call dtor on __left_result and __right_result without this try block + __result = _S_concat_rep(__left_result, __right_result); +# ifndef __GC + _STLP_ASSERT(1 == __result->_M_ref_count) +# endif + return __result; + _STLP_MPWFIX_CATCH //*TY 06/01/2000 - + } + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__base; + _RopeLeaf* __result; + size_t __result_len; + if (__start >= __adj_endp1) return 0; + __result_len = __adj_endp1 - __start; + if (__result_len > __lazy_threshold) goto lazy; +# ifdef __GC + const _CharT* __section = __l->_M_data + __start; + __result = _S_new_RopeLeaf(__section, __result_len, + __base->get_allocator()); + __result->_M_c_string = 0; // Not eos terminated. +# else + // We should sometimes create substring node instead. + __result = _STLP_ROPE_FROM_UNOWNED_CHAR_PTR( + __l->_M_data + __start, __result_len, + __base->get_allocator()); +# endif + return __result; + } + case _RopeRep::_S_substringfn: + // Avoid introducing multiple layers of substring nodes. + { + _RopeSubstring* __old = (_RopeSubstring*)__base; + size_t __result_len; + if (__start >= __adj_endp1) return 0; + __result_len = __adj_endp1 - __start; + if (__result_len > __lazy_threshold) { + _RopeSubstring* __result = + _S_new_RopeSubstring(__old->_M_base, + __start + __old->_M_start, + __adj_endp1 - __start, + __base->get_allocator()); + return __result; + + } // *** else fall through: *** + } + case _RopeRep::_S_function: + { + _RopeFunction* __f = (_RopeFunction*)__base; + if (__start >= __adj_endp1) return 0; + size_t __result_len = __adj_endp1 - __start; + + if (__result_len > __lazy_threshold) goto lazy; + _CharT* __section = __base->_M_size.allocate(_S_rounded_up_size(__result_len)); + _STLP_TRY { + (*(__f->_M_fn))(__start, __result_len, __section); + } + _STLP_UNWIND(_RopeRep::_S_free_string( + __section, __result_len, __base->get_allocator())); + _S_cond_store_eos(__section[__result_len]); + return _S_new_RopeLeaf(__section, __result_len, + __base->get_allocator()); + } + } + /*NOTREACHED*/ + _STLP_ASSERT(false) + lazy: + { + // Create substring node. + return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start, + __base->get_allocator()); + } +} + +template +class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> { + private: + _CharT* _M_buf_ptr; + public: + // _CharT* _M_buffer; // XXX not used + + _Rope_flatten_char_consumer(_CharT* __buffer) { + _M_buf_ptr = __buffer; + }; + ~_Rope_flatten_char_consumer() {} + bool operator() (const _CharT* __leaf, size_t __n) { + uninitialized_copy_n(__leaf, __n, _M_buf_ptr); + _M_buf_ptr += __n; + return true; + } +}; + +template +class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> { + private: + _CharT _M_pattern; + public: + size_t _M_count; // Number of nonmatching characters + _Rope_find_char_char_consumer(_CharT __p) + : _M_pattern(__p), _M_count(0) {} + ~_Rope_find_char_char_consumer() {} + bool operator() (const _CharT* __leaf, size_t __n) { + size_t __i; + for (__i = 0; __i < __n; __i++) { + if (__leaf[__i] == _M_pattern) { + _M_count += __i; return false; + } + } + _M_count += __n; return true; + } +}; + +#if !defined (_STLP_USE_NO_IOSTREAMS) +#if defined (_STLP_USE_NEW_IOSTREAMS) + template + // Here _CharT is both the stream and rope character type. +#else + template + // Here _CharT is the rope character type. Unlike in the + // above case, we somewhat handle the case in which it doesn't + // match the stream character type, i.e. char. +#endif +class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> { + private: +# if defined (_STLP_USE_NEW_IOSTREAMS) + typedef basic_ostream<_CharT,_Traits> _Insert_ostream; +# else + typedef ostream _Insert_ostream; +# endif + _Insert_ostream& _M_o; + public: + // _CharT* buffer; // XXX not used + _Rope_insert_char_consumer(_Insert_ostream& __writer) + : _M_o(__writer) {}; +#if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) //*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable + ~_Rope_insert_char_consumer(); //*TY 05/23/2000 - +#else //*TY 05/23/2000 - + ~_Rope_insert_char_consumer() {} +#endif //*TY 05/23/2000 - + // Caller is presumed to own the ostream + bool operator() (const _CharT* __leaf, size_t __n); + // Returns true to continue traversal. +}; + +# if defined ( _STLP_USE_NEW_IOSTREAMS ) +# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) //*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable + template + _Rope_insert_char_consumer<_CharT, _Traits>:: ~_Rope_insert_char_consumer() {} +# endif //*TY 05/23/2000 - + + template + bool _Rope_insert_char_consumer<_CharT, _Traits>::operator() + (const _CharT* __leaf, size_t __n) +{ + size_t __i; + // We assume that formatting is set up correctly for each element. + for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]); + return true; +} +# else +# if defined(__MRC__)||(defined(__SC__) && !defined(__DMC__)) //*TY 05/23/2000 - added support for mpw compiler's trigger function approach to generate vtable + template + _Rope_insert_char_consumer<_CharT>:: ~_Rope_insert_char_consumer() {} +# endif //*TY 05/23/2000 - + + template + bool _Rope_insert_char_consumer<_CharT>::operator() + (const _CharT* __leaf, size_t __n) + { + size_t __i; + // We assume that formatting is set up correctly for each element. + for (__i = 0; __i < __n; __i++) _M_o << __leaf[__i]; + return true; + } + +# if !defined (_STLP_NO_METHOD_SPECIALIZATION) +_STLP_TEMPLATE_NULL +inline bool +_Rope_insert_char_consumer::operator() + (const char* __leaf, size_t __n) +{ + size_t __i; + for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]); + return true; +} + +#endif /* _STLP_METHOD_SPECIALIZATION */ +#endif /* _STLP_USE_NEW_IOSTREAM */ +#endif /* if !defined (_STLP_USE_NO_IOSTREAMS) */ + +template +bool rope<_CharT, _Alloc>::_S_apply_to_pieces( + _Rope_char_consumer<_CharT>& __c, + const _RopeRep* __r, + size_t __begin, size_t __end) +{ + if (0 == __r) return true; + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __conc = (_RopeConcatenation*)__r; + _RopeRep* __left = __conc->_M_left; + size_t __left_len = __left->_M_size._M_data; + if (__begin < __left_len) { + size_t __left_end = (min) (__left_len, __end); + if (!_S_apply_to_pieces(__c, __left, __begin, __left_end)) + return false; + } + if (__end > __left_len) { + _RopeRep* __right = __conc->_M_right; + size_t __right_start = (max)(__left_len, __begin); + if (!_S_apply_to_pieces(__c, __right, + __right_start - __left_len, + __end - __left_len)) { + return false; + } + } + } + return true; + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + return __c.operator()(__l->_M_data + __begin, __end - __begin); + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + { + _RopeFunction* __f = (_RopeFunction*)__r; + size_t __len = __end - __begin; +#ifdef __SYMBIAN32__ + bool __result = false; +#else + bool __result; +#endif + _CharT* __buffer = + (_CharT*)__sgi_alloc::allocate(__len * sizeof(_CharT)); + _STLP_TRY { + (*(__f->_M_fn))(__begin, __len, __buffer); + __result = __c.operator()(__buffer, __len); + __sgi_alloc::deallocate(__buffer, __len * sizeof(_CharT)); + } + _STLP_UNWIND((__sgi_alloc::deallocate(__buffer, + __len * sizeof(_CharT)))) + return __result; + } + default: + _STLP_ASSERT(false) + /*NOTREACHED*/ + return false; + } +} + +template inline bool _Rope_is_simple(_CharT*) { return false; } +inline bool _Rope_is_simple(char*) { return true; } +# ifdef _STLP_HAS_WCHAR_T +inline bool _Rope_is_simple(wchar_t*) { return true; } +# endif + +#if !defined (_STLP_USE_NO_IOSTREAMS) +#if defined (_STLP_USE_NEW_IOSTREAMS) + template + inline void _Rope_fill(basic_ostream<_CharT, _Traits>& __o, size_t __n) +#else +inline void _Rope_fill(ostream& __o, size_t __n) +#endif +{ + char __f = __o.fill(); + size_t __i; + + for (__i = 0; __i < __n; __i++) __o.put(__f); +} + +#if defined (_STLP_USE_NEW_IOSTREAMS) + template + basic_ostream<_CharT, _Traits>& operator<< + (basic_ostream<_CharT, _Traits>& __o, + const rope<_CharT, _Alloc>& __r) +# else +template +ostream& operator<< (ostream& __o, const rope<_CharT, _Alloc>& __r) +#endif +{ + size_t __w = __o.width(); + bool __left = bool(__o.flags() & ios::left); + size_t __pad_len; + size_t __rope_len = __r.size(); +# if defined (_STLP_USE_NEW_IOSTREAMS) + _Rope_insert_char_consumer<_CharT, _Traits> __c(__o); +# else + _Rope_insert_char_consumer<_CharT> __c(__o); +# endif + bool __is_simple = _Rope_is_simple((_CharT*)0); + + if (__rope_len < __w) { + __pad_len = __w - __rope_len; + } else { + __pad_len = 0; + } + if (!__is_simple) __o.width(__w/__rope_len); + _STLP_TRY { + if (__is_simple && !__left && __pad_len > 0) { + _Rope_fill(__o, __pad_len); + } + __r.apply_to_pieces(0, __r.size(), __c); + if (__is_simple && __left && __pad_len > 0) { + _Rope_fill(__o, __pad_len); + } + if (!__is_simple) + __o.width(__w); + } + _STLP_UNWIND(if (!__is_simple) __o.width(__w)) + return __o; +} + +#endif /* NO_IOSTREAMS */ + +template +_CharT* +rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, + size_t __start, size_t __len, + _CharT* __buffer) +{ + _Rope_flatten_char_consumer<_CharT> __c(__buffer); + _S_apply_to_pieces(__c, __r, __start, __start + __len); + return(__buffer + __len); +} + +template +size_t +rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const +{ + _Rope_find_char_char_consumer<_CharT> __c(__pattern); + _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __start, size()); + size_type __result_pos = __start + __c._M_count; +# ifndef _STLP_OLD_ROPE_SEMANTICS + if (__result_pos == size()) __result_pos = npos; +# endif + return __result_pos; +} + +template +_CharT* +rope<_CharT,_Alloc>::_S_flatten(_Rope_RopeRep<_CharT, _Alloc>* __r, _CharT* __buffer) +{ + if (0 == __r) return __buffer; + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + _RopeRep* __right = __c->_M_right; + _CharT* __rest = _S_flatten(__left, __buffer); + return _S_flatten(__right, __rest); + } + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + return copy_n(__l->_M_data, __l->_M_size._M_data, __buffer).second; + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + // We dont yet do anything with substring nodes. + // This needs to be fixed before ropefiles will work well. + { + _RopeFunction* __f = (_RopeFunction*)__r; + (*(__f->_M_fn))(0, __f->_M_size._M_data, __buffer); + return __buffer + __f->_M_size._M_data; + } + default: + _STLP_ASSERT(false) + /*NOTREACHED*/ + return 0; + } +} + + +// This needs work for _CharT != char +template +void +rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent) +{ + for (int __i = 0; __i < __indent; __i++) putchar(' '); + if (0 == __r) { + printf("NULL\n"); return; + } + if (_RopeRep::_S_concat == __r->_M_tag) { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + _RopeRep* __right = __c->_M_right; + +# ifdef __GC + printf("Concatenation %p (depth = %d, len = %ld, %s balanced)\n", + __r, __r->_M_depth, __r->_M_size._M_data, __r->_M_is_balanced? "" : "not"); +# else + printf("Concatenation %p (rc = %ld, depth = %d, " + "len = %ld, %s balanced)\n", + __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data, + __r->_M_is_balanced? "" : "not"); +# endif + _S_dump(__left, __indent + 2); + _S_dump(__right, __indent + 2); + return; + } else { + const char* __kind; + + switch (__r->_M_tag) { + case _RopeRep::_S_leaf: + __kind = "Leaf"; + break; + case _RopeRep::_S_function: + __kind = "Function"; + break; + case _RopeRep::_S_substringfn: + __kind = "Function representing substring"; + break; + default: + __kind = "(corrupted kind field!)"; + } +# ifdef __GC + printf("%s %p (depth = %d, len = %ld) ", + __kind, __r, __r->_M_depth, __r->_M_size._M_data); +# else + printf("%s %p (rc = %ld, depth = %d, len = %ld) ", + __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size._M_data); +# endif + if (_S_is_one_byte_char_type((_CharT*)0)) { + const int __max_len = 40; + _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len)); + _CharT __buffer[__max_len + 1]; + bool __too_big = __r->_M_size._M_data > __prefix->_M_size._M_data; + + _S_flatten(__prefix, __buffer); + __buffer[__prefix->_M_size._M_data] = _S_eos((_CharT*)0); + printf("%s%s\n", + (char*)__buffer, __too_big? "...\n" : "\n"); + } else { + printf("\n"); + } + } +} + +# define __ROPE_TABLE_BODY = { \ +/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21, \ +/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377, \ +/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181, \ +/* 18 */6765ul, /* 19 */10946ul, /* 20 */17711ul, /* 21 */28657ul, /* 22 */46368ul, \ +/* 23 */75025ul, /* 24 */121393ul, /* 25 */196418ul, /* 26 */317811ul, \ +/* 27 */514229ul, /* 28 */832040ul, /* 29 */1346269ul, /* 30 */2178309ul, \ +/* 31 */3524578ul, /* 32 */5702887ul, /* 33 */9227465ul, /* 34 */14930352ul, \ +/* 35 */24157817ul, /* 36 */39088169ul, /* 37 */63245986ul, /* 38 */102334155ul, \ +/* 39 */165580141ul, /* 40 */267914296ul, /* 41 */433494437ul, \ +/* 42 */701408733ul, /* 43 */1134903170ul, /* 44 */1836311903ul, \ +/* 45 */2971215073ul } + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +template +const unsigned long +rope<_CharT,_Alloc>::_S_min_len[__ROPE_DEPTH_SIZE] __ROPE_TABLE_BODY ; +# else +__DECLARE_INSTANCE(const unsigned long, + crope::_S_min_len[__ROPE_DEPTH_SIZE], + __ROPE_TABLE_BODY); +# ifndef _STLP_NO_WCHAR_T +__DECLARE_INSTANCE(const unsigned long, + wrope::_S_min_len[__ROPE_DEPTH_SIZE], + __ROPE_TABLE_BODY); +# endif +# endif +# undef __ROPE_DEPTH_SIZE +# undef __ROPE_MAX_DEPTH +# undef __ROPE_TABLE_BODY + +// These are Fibonacci numbers < 2**32. + +template +__RopeRep__* +rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r) +{ + _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1]; + _RopeRep* __result = 0; + int __i; + // Invariant: + // The concatenation of forest in descending order is equal to __r. + // __forest[__i]._M_size._M_data >= _S_min_len[__i] + // __forest[__i]._M_depth = __i + // References from forest are included in refcount. + + for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) + __forest[__i] = 0; + _STLP_TRY { + _S_add_to_forest(__r, __forest); + for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) + if (0 != __forest[__i]) { +# ifndef __GC + _Self_destruct_ptr __old(__result); +# endif + __result = _S_concat_rep(__forest[__i], __result); + __forest[__i]->_M_unref_nonnil(); +# if !defined(__GC) && defined(_STLP_USE_EXCEPTIONS) + __forest[__i] = 0; +# endif + } + } + _STLP_UNWIND(for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++) + _S_unref(__forest[__i])) + if (__result->_M_depth > _RopeRep::_S_max_rope_depth) { + __stl_throw_range_error("rope too long"); + } + return(__result); +} + + +template +void +rope<_CharT,_Alloc>::_S_add_to_forest(_RopeRep* __r, _RopeRep** __forest) +{ + if (__r -> _M_is_balanced) { + _S_add_leaf_to_forest(__r, __forest); + return; + } + _STLP_ASSERT(__r->_M_tag == _RopeRep::_S_concat) + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + + _S_add_to_forest(__c->_M_left, __forest); + _S_add_to_forest(__c->_M_right, __forest); + } +} + + +template +void +rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest) +{ + _RopeRep* __insertee; // included in refcount + _RopeRep* __too_tiny = 0; // included in refcount + int __i; // forest[0..__i-1] is empty + size_t __s = __r->_M_size._M_data; + + for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) { + if (0 != __forest[__i]) { +# ifndef __GC + _Self_destruct_ptr __old(__too_tiny); +# endif + __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny); + __forest[__i]->_M_unref_nonnil(); + __forest[__i] = 0; + } + } + { +# ifndef __GC + _Self_destruct_ptr __old(__too_tiny); +# endif + __insertee = _S_concat_and_set_balanced(__too_tiny, __r); + } + // Too_tiny dead, and no longer included in refcount. + // Insertee is live and included. + _STLP_ASSERT(_S_is_almost_balanced(__insertee)) + _STLP_ASSERT(__insertee->_M_depth <= __r->_M_depth + 1) + for (;; ++__i) { + if (0 != __forest[__i]) { +# ifndef __GC + _Self_destruct_ptr __old(__insertee); +# endif + __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee); + __forest[__i]->_M_unref_nonnil(); + __forest[__i] = 0; + _STLP_ASSERT(_S_is_almost_balanced(__insertee)) + } + _STLP_ASSERT(_S_min_len[__i] <= __insertee->_M_size._M_data) + _STLP_ASSERT(__forest[__i] == 0) + if (__i == _RopeRep::_S_max_rope_depth || + __insertee->_M_size._M_data < _S_min_len[__i+1]) { + __forest[__i] = __insertee; + // refcount is OK since __insertee is now dead. + return; + } + } +} + +template +_CharT +rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i) +{ + __GC_CONST _CharT* __cstr = __r->_M_c_string; + + _STLP_ASSERT(__i < __r->_M_size._M_data) + if (0 != __cstr) return __cstr[__i]; + for(;;) { + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + size_t __left_len = __left->_M_size._M_data; + + if (__i >= __left_len) { + __i -= __left_len; + __r = __c->_M_right; + } else { + __r = __left; + } + } + break; + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + return __l->_M_data[__i]; + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + { + _RopeFunction* __f = (_RopeFunction*)__r; + _CharT __result; + + (*(__f->_M_fn))(__i, 1, &__result); + return __result; + } + } + } +#if defined(_STLP_NEED_UNREACHABLE_RETURN) + return 0; +#endif +} + +# ifndef __GC +// Return a uniquely referenced character slot for the given +// position, or 0 if that's not possible. +template +_CharT* +rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i) +{ + _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth]; + size_t __csptr = 0; + + for(;;) { + if (__r->_M_ref_count > 1) return 0; + switch(__r->_M_tag) { + case _RopeRep::_S_concat: + { + _RopeConcatenation* __c = (_RopeConcatenation*)__r; + _RopeRep* __left = __c->_M_left; + size_t __left_len = __left->_M_size._M_data; + + if (__c->_M_c_string != 0) __clrstack[__csptr++] = __c; + if (__i >= __left_len) { + __i -= __left_len; + __r = __c->_M_right; + } else { + __r = __left; + } + } + break; + case _RopeRep::_S_leaf: + { + _RopeLeaf* __l = (_RopeLeaf*)__r; + if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0) + __clrstack[__csptr++] = __l; + while (__csptr > 0) { + -- __csptr; + _RopeRep* __d = __clrstack[__csptr]; + __d->_M_free_c_string(); + __d->_M_c_string = 0; + } + return __l->_M_data + __i; + } + case _RopeRep::_S_function: + case _RopeRep::_S_substringfn: + return 0; + } + } +#if defined(_STLP_NEED_UNREACHABLE_RETURN) + return 0; +#endif + +} +# endif /* __GC */ + +// The following could be implemented trivially using +// lexicographical_compare_3way. +// We do a little more work to avoid dealing with rope iterators for +// flat strings. +template +int +rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left, + const _RopeRep* __right) +{ + size_t __left_len; + size_t __right_len; + + if (0 == __right) return 0 != __left; + if (0 == __left) return -1; + __left_len = __left->_M_size._M_data; + __right_len = __right->_M_size._M_data; + if (_RopeRep::_S_leaf == __left->_M_tag) { + _RopeLeaf* __l = (_RopeLeaf*) __left; + if (_RopeRep::_S_leaf == __right->_M_tag) { + _RopeLeaf* __r = (_RopeLeaf*) __right; + return lexicographical_compare_3way( + __l->_M_data, __l->_M_data + __left_len, + __r->_M_data, __r->_M_data + __right_len); + } else { + const_iterator __rstart(__right, 0); + const_iterator __rend(__right, __right_len); + return lexicographical_compare_3way( + __l->_M_data, __l->_M_data + __left_len, + __rstart, __rend); + } + } else { + const_iterator __lstart(__left, 0); + const_iterator __lend(__left, __left_len); + if (_RopeRep::_S_leaf == __right->_M_tag) { + _RopeLeaf* __r = (_RopeLeaf*) __right; + return lexicographical_compare_3way( + __lstart, __lend, + __r->_M_data, __r->_M_data + __right_len); + } else { + const_iterator __rstart(__right, 0); + const_iterator __rend(__right, __right_len); + return lexicographical_compare_3way( + __lstart, __lend, + __rstart, __rend); + } + } +} + +// Assignment to reference proxies. +template +_Rope_char_ref_proxy<_CharT, _Alloc>& +_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c) { + _RopeRep* __old = _M_root->_M_tree_ptr._M_data; +# ifndef __GC + // First check for the case in which everything is uniquely + // referenced. In that case we can do this destructively. + _CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos); + if (0 != __ptr) { + *__ptr = __c; + return *this; + } +# endif + _Self_destruct_ptr __left( + _My_rope::_S_substring(__old, 0, _M_pos)); + _Self_destruct_ptr __right( + _My_rope::_S_substring(__old, _M_pos+1, __old->_M_size._M_data)); + _Self_destruct_ptr __result_left( + _My_rope::_S_destr_concat_char_iter(__left, &__c, 1)); + +# ifndef __GC + _STLP_ASSERT(__left == __result_left || 1 == __result_left->_M_ref_count) +# endif + _RopeRep* __result = + _My_rope::_S_concat_rep(__result_left, __right); +# ifndef __GC + _STLP_ASSERT(1 <= __result->_M_ref_count) + _RopeRep::_S_unref(__old); +# endif + _M_root->_M_tree_ptr._M_data = __result; + return *this; +} + +template +_Rope_char_ptr_proxy<_CharT, _Alloc> +_Rope_char_ref_proxy<_CharT, _Alloc>::operator& () const { + return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this); +} + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +template +_CharT rope<_CharT,_Alloc>::_S_empty_c_str[1] = { _CharT() }; +# else +__DECLARE_INSTANCE(char, crope::_S_empty_c_str[1], ={0}); +# ifdef _STLP_HAS_WCHAR_T +__DECLARE_INSTANCE(wchar_t, wrope::_S_empty_c_str[1], ={0}); +# endif /* _STLP_HAS_WCHAR_T */ +# endif /* _STLP_STATIC_TEMPLATE_DATA */ +// # endif + +template +const _CharT* rope<_CharT,_Alloc>::c_str() const { + if (0 == _M_tree_ptr._M_data) { + _S_empty_c_str[0] = _S_eos((_CharT*)0); // Possibly redundant, + // but probably fast. + return _S_empty_c_str; + } + __GC_CONST _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string; + if (0 != __old_c_string) return(__old_c_string); + size_t __s = size(); + _CharT* __result = _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).allocate(__s + 1); + _S_flatten(_M_tree_ptr._M_data, __result); + __result[__s] = _S_eos((_CharT*)0); +# ifdef __GC + _M_tree_ptr._M_data->_M_c_string = __result; +# else + if ((__old_c_string = (__GC_CONST _CharT*) + _Atomic_swap((__stl_atomic_t *)(&(_M_tree_ptr._M_data->_M_c_string)), + (__stl_atomic_t)__result)) != 0) { + // It must have been added in the interim. Hence it had to have been + // separately allocated. Deallocate the old copy, since we just + // replaced it. + _STLP_STD::_Destroy(__old_c_string, __old_c_string + __s + 1); + _STLP_CREATE_ALLOCATOR(allocator_type,(const allocator_type&)_M_tree_ptr, _CharT).deallocate(__old_c_string, __s + 1); + } +# endif + return(__result); +} + +template +const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() { + if (0 == _M_tree_ptr._M_data) { + _S_empty_c_str[0] = _S_eos((_CharT*)0); + return _S_empty_c_str; + } + __GC_CONST _CharT* __old_c_string = _M_tree_ptr._M_data->_M_c_string; + if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && 0 != __old_c_string) { + return(__old_c_string); + } + size_t __s = size(); + _CharT* __result = _M_tree_ptr.allocate(_S_rounded_up_size(__s)); + _S_flatten(_M_tree_ptr._M_data, __result); + __result[__s] = _S_eos((_CharT*)0); + _M_tree_ptr._M_data->_M_unref_nonnil(); + _M_tree_ptr._M_data = _S_new_RopeLeaf(__result, __s, get_allocator()); + return(__result); +} + +// Algorithm specializations. More should be added. + +#ifndef _STLP_MSVC +// I couldn't get this to work with VC++ +template +void +_Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first, + _Rope_iterator<_CharT,_Alloc> __middle, + _Rope_iterator<_CharT,_Alloc> __last) +{ + _STLP_ASSERT(__first.container() == __middle.container() + && __middle.container() == __last.container()) + rope<_CharT,_Alloc>& __r(__first.container()); + rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index()); + rope<_CharT,_Alloc> __suffix = + __r.substr(__last.index(), __r.size() - __last.index()); + rope<_CharT,_Alloc> __part1 = + __r.substr(__middle.index(), __last.index() - __middle.index()); + rope<_CharT,_Alloc> __part2 = + __r.substr(__first.index(), __middle.index() - __first.index()); + __r = __prefix; + __r += __part1; + __r += __part2; + __r += __suffix; +} + + +# if 0 +// Probably not useful for several reasons: +// - for SGIs 7.1 compiler and probably some others, +// this forces lots of rope instantiations, creating a +// code bloat and compile time problem. (Fixed in 7.2.) +// - wchar_t is 4 bytes wide on most UNIX platforms, making it unattractive +// for unicode strings. Unsigned short may be a better character +// type. +inline void rotate( + _Rope_iterator __first, + _Rope_iterator __middle, + _Rope_iterator __last) { + _Rope_rotate(__first, __middle, __last); +} +# endif +#endif /* _STLP_MSVC */ + +# undef __RopeLeaf__ +# undef __RopeRep__ +# undef __RopeLeaf +# undef __RopeRep +# undef size_type + +_STLP_END_NAMESPACE + +# endif /* ROPEIMPL_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_rope.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_rope.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,2518 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +// rope<_CharT,_Alloc> is a sequence of _CharT. +// Ropes appear to be mutable, but update operations +// really copy enough of the data structure to leave the original +// valid. Thus ropes can be logically copied by just copying +// a pointer value. + +#ifndef _STLP_INTERNAL_ROPE_H +# define _STLP_INTERNAL_ROPE_H + +# ifndef _STLP_INTERNAL_ALGOBASE_H +# include +# endif + +# ifndef _STLP_IOSFWD +# include +# endif + +# ifndef _STLP_INTERNAL_ALLOC_H +# include +# endif + +# ifndef _STLP_INTERNAL_ITERATOR_H +# include +# endif + +# ifndef _STLP_INTERNAL_ALGO_H +# include +# endif + +# ifndef _STLP_INTERNAL_FUNCTION_H +# include +# endif + +# ifndef _STLP_INTERNAL_NUMERIC_H +# include +# endif + +# ifndef _STLP_INTERNAL_HASH_FUN_H +# include +# endif + +# ifdef __GC +# define __GC_CONST const +# else +# include +# define __GC_CONST // constant except for deallocation +# endif +# ifdef _STLP_SGI_THREADS +# include +# endif + +#ifdef _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM +# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) (_Alloc_traits<_Tp,__atype>::create_allocator(__a)) +#elif defined(__MRC__)||defined(__SC__) +# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create<_Tp,__atype>(__a,(_Tp*)0) +#else +# define _STLP_CREATE_ALLOCATOR(__atype,__a, _Tp) __stl_alloc_create(__a,(_Tp*)0) +#endif + +_STLP_BEGIN_NAMESPACE + +// First a lot of forward declarations. The standard seems to require +// much stricter "declaration before use" than many of the implementations +// that preceded it. +template class rope; +template struct _Rope_RopeConcatenation; +template struct _Rope_RopeRep; +template struct _Rope_RopeLeaf; +template struct _Rope_RopeFunction; +template struct _Rope_RopeSubstring; +template class _Rope_iterator; +template class _Rope_const_iterator; +template class _Rope_char_ref_proxy; +template class _Rope_char_ptr_proxy; + +// Some helpers, so we can use power on ropes. +// See below for why this isn't local to the implementation. + +// This uses a nonstandard refcount convention. +// The result has refcount 0. +template +struct _Rope_Concat_fn + : public binary_function, rope<_CharT,_Alloc>, + rope<_CharT,_Alloc> > { + rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x, + const rope<_CharT,_Alloc>& __y) { + return __x + __y; + } +}; + +template +inline +rope<_CharT,_Alloc> +__identity_element(_Rope_Concat_fn<_CharT, _Alloc>) +{ + return rope<_CharT,_Alloc>(); +} + +// The _S_eos function is used for those functions that +// convert to/from C-like strings to detect the end of the string. + +// The end-of-C-string character. +// This is what the draft standard says it should be. +template +inline _CharT _S_eos(_CharT*) { return _CharT(); } + +// fbp : some compilers fail to zero-initialize builtins ;( +inline const char _S_eos(const char*) { return 0; } +# ifdef _STLP_HAS_WCHAR_T +inline const wchar_t _S_eos(const wchar_t*) { return 0; } +# endif + +// Test for basic character types. +// For basic character types leaves having a trailing eos. +template +inline bool _S_is_basic_char_type(_CharT*) { return false; } +template +inline bool _S_is_one_byte_char_type(_CharT*) { return false; } + +inline bool _S_is_basic_char_type(char*) { return true; } +inline bool _S_is_one_byte_char_type(char*) { return true; } +# ifdef _STLP_HAS_WCHAR_T +inline bool _S_is_basic_char_type(wchar_t*) { return true; } +# endif + +// Store an eos iff _CharT is a basic character type. +// Do not reference _S_eos if it isn't. +template +inline void _S_cond_store_eos(_CharT&) {} + +inline void _S_cond_store_eos(char& __c) { __c = 0; } +# ifdef _STLP_HAS_WCHAR_T +inline void _S_cond_store_eos(wchar_t& __c) { __c = 0; } +# endif + +// char_producers are logically functions that generate a section of +// a string. These can be convereted to ropes. The resulting rope +// invokes the char_producer on demand. This allows, for example, +// files to be viewed as ropes without reading the entire file. +template +class char_producer { +public: + virtual ~char_producer() {}; + virtual void operator()(size_t __start_pos, size_t __len, + _CharT* __buffer) = 0; + // Buffer should really be an arbitrary output iterator. + // That way we could flatten directly into an ostream, etc. + // This is thoroughly impossible, since iterator types don't + // have runtime descriptions. +}; + +// Sequence buffers: +// +// Sequence must provide an append operation that appends an +// array to the sequence. Sequence buffers are useful only if +// appending an entire array is cheaper than appending element by element. +// This is true for many string representations. +// This should perhaps inherit from ostream +// and be implemented correspondingly, so that they can be used +// for formatted. For the sake of portability, we don't do this yet. +// +// For now, sequence buffers behave as output iterators. But they also +// behave a little like basic_ostringstream and a +// little like containers. + +template +// The 3rd parameter works around a common compiler bug. +class sequence_buffer : public iterator { +public: +# ifndef __TYPEDEF_WORKAROUND + typedef typename _Sequence::value_type value_type; + typedef sequence_buffer<_Sequence +# if !(defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) || \ + defined ( _STLP_NO_DEFAULT_NON_TYPE_PARAM )) + , _Buf_sz + > _Self; +# else /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ + > _Self; + enum { _Buf_sz = 100}; +# endif /* _STLP_NON_TYPE_TMPL_PARAM_BUG */ + // # endif +# else /* __TYPEDEF_WORKAROUND */ + typedef _V value_type; + typedef sequence_buffer<_Sequence, _Buf_sz, _V> _Self; +# endif /* __TYPEDEF_WORKAROUND */ +protected: + _Sequence* _M_prefix; + value_type _M_buffer[_Buf_sz]; + size_t _M_buf_count; +public: + void flush() { + _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count); + _M_buf_count = 0; + } + ~sequence_buffer() { flush(); } + sequence_buffer() : _M_prefix(0), _M_buf_count(0) {} + sequence_buffer(const _Self& __x) { + _M_prefix = __x._M_prefix; + _M_buf_count = __x._M_buf_count; + copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer); + } + sequence_buffer(_Self& __x) { + __x.flush(); + _M_prefix = __x._M_prefix; + _M_buf_count = 0; + } + sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {} + _Self& operator= (_Self& __x) { + __x.flush(); + _M_prefix = __x._M_prefix; + _M_buf_count = 0; + return *this; + } + _Self& operator= (const _Self& __x) { + _M_prefix = __x._M_prefix; + _M_buf_count = __x._M_buf_count; + copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer); + return *this; + } + void push_back(value_type __x) + { + if (_M_buf_count < _Buf_sz) { + _M_buffer[_M_buf_count] = __x; + ++_M_buf_count; + } else { + flush(); + _M_buffer[0] = __x; + _M_buf_count = 1; + } + } + void append(value_type* __s, size_t __len) + { + if (__len + _M_buf_count <= _Buf_sz) { + size_t __i = _M_buf_count; + size_t __j = 0; + for (; __j < __len; __i++, __j++) { + _M_buffer[__i] = __s[__j]; + } + _M_buf_count += __len; + } else if (0 == _M_buf_count) { + _M_prefix->append(__s, __s + __len); + } else { + flush(); + append(__s, __len); + } + } + _Self& write(value_type* __s, size_t __len) + { + append(__s, __len); + return *this; + } + _Self& put(value_type __x) + { + push_back(__x); + return *this; + } + _Self& operator=(const value_type& __rhs) + { + push_back(__rhs); + return *this; + } + _Self& operator*() { return *this; } + _Self& operator++() { return *this; } + _Self& operator++(int) { return *this; } +}; + +// The following should be treated as private, at least for now. +template +class _Rope_char_consumer { +public: + // If we had member templates, these should not be virtual. + // For now we need to use run-time parametrization where + // compile-time would do. _Hence this should all be private + // for now. + // The symmetry with char_producer is accidental and temporary. + virtual ~_Rope_char_consumer() {}; + virtual bool operator()(const _CharT* __buffer, size_t __len) = 0; +}; + +// +// What follows should really be local to rope. Unfortunately, +// that doesn't work, since it makes it impossible to define generic +// equality on rope iterators. According to the draft standard, the +// template parameters for such an equality operator cannot be inferred +// from the occurence of a member class as a parameter. +// (SGI compilers in fact allow this, but the __result wouldn't be +// portable.) +// Similarly, some of the static member functions are member functions +// only to avoid polluting the global namespace, and to circumvent +// restrictions on type inference for template functions. +// + +// +// The internal data structure for representing a rope. This is +// private to the implementation. A rope is really just a pointer +// to one of these. +// +// A few basic functions for manipulating this data structure +// are members of _RopeRep. Most of the more complex algorithms +// are implemented as rope members. +// +// Some of the static member functions of _RopeRep have identically +// named functions in rope that simply invoke the _RopeRep versions. +// +// A macro to introduce various allocation and deallocation functions +// These need to be defined differently depending on whether or not +// we are using standard conforming allocators, and whether the allocator +// instances have real state. Thus this macro is invoked repeatedly +// with different definitions of __ROPE_DEFINE_ALLOC. + +#if defined (_STLP_MEMBER_TEMPLATE_CLASSES) +# define __ROPE_DEFINE_ALLOC(_Tp, __name, _M_proxy) \ + typedef typename \ + _Alloc_traits<_Tp,_Alloc>::allocator_type __name##Allocator; + +#define __ROPE_DEFINE_ALLOCS(__a, _M_proxy) \ + __ROPE_DEFINE_ALLOC(_CharT,_Data, _M_proxy) /* character data */ \ + typedef _Rope_RopeConcatenation<_CharT,__a> __C; \ + __ROPE_DEFINE_ALLOC(__C,_C, _M_proxy) \ + typedef _Rope_RopeLeaf<_CharT,__a> __L; \ + __ROPE_DEFINE_ALLOC(__L,_L, _M_proxy) \ + typedef _Rope_RopeFunction<_CharT,__a> __F; \ + __ROPE_DEFINE_ALLOC(__F,_F, _M_proxy) \ + typedef _Rope_RopeSubstring<_CharT,__a> __S; \ + __ROPE_DEFINE_ALLOC(__S,_S,_M_proxy) +#else +#define __ROPE_DEFINE_ALLOC(_Tp, __name, _M_proxy) +#define __ROPE_DEFINE_ALLOCS(__a, _M_proxy) +#endif + + +template +struct _Rope_RopeRep +# ifndef __GC + : public _Refcount_Base +# endif +{ + typedef _Rope_RopeRep<_CharT, _Alloc> _Self; +public: +# define __ROPE_MAX_DEPTH 45 +# define __ROPE_DEPTH_SIZE 46 + enum { _S_max_rope_depth = __ROPE_MAX_DEPTH }; + enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function}; + // Apparently needed by VC++ + // The data fields of leaves are allocated with some + // extra space, to accomodate future growth and for basic + // character types, to hold a trailing eos character. + enum { _S_alloc_granularity = 8 }; + + + _Tag _M_tag:8; + bool _M_is_balanced:8; + + _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) + typedef typename _Alloc_traits<_CharT,_Alloc>::allocator_type + allocator_type; + + allocator_type get_allocator() const { return allocator_type(_M_size); } + + unsigned char _M_depth; + __GC_CONST _CharT* _M_c_string; + _STLP_alloc_proxy _M_size; + +# ifdef _STLP_NO_ARROW_OPERATOR + _Rope_RopeRep() : _Refcount_Base(1), _M_size(allocator_type(), 0) {} +# endif + + /* Flattened version of string, if needed. */ + /* typically 0. */ + /* If it's not 0, then the memory is owned */ + /* by this node. */ + /* In the case of a leaf, this may point to */ + /* the same memory as the data field. */ + _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t _p_size, + allocator_type __a) : +# ifndef __GC + _Refcount_Base(1), +# endif + _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0), _M_size(__a, _p_size) + { } +# ifdef __GC + void _M_incr () {} +# endif + + // fbp : moved from RopeLeaf + static size_t _S_rounded_up_size(size_t __n) { + size_t __size_with_eos; + + if (_S_is_basic_char_type((_CharT*)0)) { + __size_with_eos = __n + 1; + } else { + __size_with_eos = __n; + } +# ifdef __GC + return __size_with_eos; +# else + // Allow slop for in-place expansion. + return (__size_with_eos + _S_alloc_granularity-1) + &~ (_S_alloc_granularity-1); +# endif + } + + static void _S_free_string(__GC_CONST _CharT* __s, size_t __len, + allocator_type __a) { + + if (!_S_is_basic_char_type((_CharT*)0)) { + _STLP_STD::_Destroy(__s, __s + __len); + } + // This has to be a static member, so this gets a bit messy +# ifdef _STLP_USE_NESTED_TCLASS_THROUGHT_TPARAM + __a.deallocate(__s, _S_rounded_up_size(__len)); //*ty 03/24/2001 - restored not to use __stl_alloc_rebind() since it is not defined under _STLP_MEMBER_TEMPLATE_CLASSES +# else + __stl_alloc_rebind (__a, (_CharT*)0).deallocate(__s, _S_rounded_up_size(__len)); +# endif + } + + // Deallocate data section of a leaf. + // This shouldn't be a member function. + // But its hard to do anything else at the + // moment, because it's templatized w.r.t. + // an allocator. + // Does nothing if __GC is defined. +# ifndef __GC + void _M_free_c_string(); + void _M_free_tree(); + // Deallocate t. Assumes t is not 0. + void _M_unref_nonnil() + { + _M_decr(); if (!_M_ref_count) _M_free_tree(); + } + void _M_ref_nonnil() + { + _M_incr(); + } + static void _S_unref(_Self* __t) + { + if (0 != __t) { + __t->_M_unref_nonnil(); + } + } + static void _S_ref(_Self* __t) + { + if (0 != __t) __t->_M_incr(); + } + static void _S_free_if_unref(_Self* __t) + { + if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree(); + } +# else /* __GC */ + void _M_unref_nonnil() {} + void _M_ref_nonnil() {} + static void _S_unref(_Self*) {} + static void _S_ref(_Self*) {} + static void _S_free_if_unref(_Self*) {} +# endif + + __ROPE_DEFINE_ALLOCS(_Alloc, _M_size) + }; + +template +struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> { +public: + __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */ + /* The allocated size is */ + /* _S_rounded_up_size(size), except */ + /* in the GC case, in which it */ + /* doesn't matter. */ + _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) + typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; + _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t _p_size, allocator_type __a) + : _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_leaf, 0, true, _p_size, __a), + _M_data(__d) + { + _STLP_ASSERT(_p_size > 0) + if (_S_is_basic_char_type((_CharT *)0)) { + // already eos terminated. + this->_M_c_string = __d; + } + } + +# ifdef _STLP_NO_ARROW_OPERATOR + _Rope_RopeLeaf() {} + _Rope_RopeLeaf(const _Rope_RopeLeaf<_CharT, _Alloc>& ) {} +# endif + +// The constructor assumes that d has been allocated with + // the proper allocator and the properly padded size. + // In contrast, the destructor deallocates the data: +# ifndef __GC + ~_Rope_RopeLeaf() { + if (_M_data != this->_M_c_string) { + this->_M_free_c_string(); + } + _Rope_RopeRep<_CharT,_Alloc>::_S_free_string(_M_data, this->_M_size._M_data, this->get_allocator()); + } +# endif +}; + +template +struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT,_Alloc> { +public: + _Rope_RopeRep<_CharT,_Alloc>* _M_left; + _Rope_RopeRep<_CharT,_Alloc>* _M_right; + _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) + typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; + _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l, + _Rope_RopeRep<_CharT,_Alloc>* __r, + allocator_type __a) + : _Rope_RopeRep<_CharT,_Alloc>( + _Rope_RopeRep<_CharT,_Alloc>::_S_concat, + (max)(__l->_M_depth, __r->_M_depth) + 1, false, + __l->_M_size._M_data + __r->_M_size._M_data, __a), _M_left(__l), _M_right(__r) + {} +# ifdef _STLP_NO_ARROW_OPERATOR + _Rope_RopeConcatenation() {} + _Rope_RopeConcatenation(const _Rope_RopeConcatenation<_CharT, _Alloc>&) {} +# endif + +# ifndef __GC + ~_Rope_RopeConcatenation() { + this->_M_free_c_string(); + _M_left->_M_unref_nonnil(); + _M_right->_M_unref_nonnil(); + } +# endif +}; + +template +struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT,_Alloc> { +public: + char_producer<_CharT>* _M_fn; +# ifndef __GC + bool _M_delete_when_done; // Char_producer is owned by the + // rope and should be explicitly + // deleted when the rope becomes + // inaccessible. +# else + // In the GC case, we either register the rope for + // finalization, or not. Thus the field is unnecessary; + // the information is stored in the collector data structures. + // We do need a finalization procedure to be invoked by the + // collector. + static void _S_fn_finalization_proc(void * __tree, void *) { + delete ((_Rope_RopeFunction *)__tree) -> _M_fn; + } +# endif + _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) + typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; +# ifdef _STLP_NO_ARROW_OPERATOR + _Rope_RopeFunction() {} + _Rope_RopeFunction(const _Rope_RopeFunction<_CharT, _Alloc>& ) {} +# endif + + _Rope_RopeFunction(char_producer<_CharT>* __f, size_t _p_size, + bool __d, allocator_type __a) + : + _Rope_RopeRep<_CharT,_Alloc>(_Rope_RopeRep<_CharT,_Alloc>::_S_function, 0, true, _p_size, __a), + _M_fn(__f) +# ifndef __GC + , _M_delete_when_done(__d) +# endif + { + _STLP_ASSERT(_p_size > 0) +# ifdef __GC + if (__d) { + GC_REGISTER_FINALIZER( + this, _Rope_RopeFunction::_S_fn_finalization_proc, 0, 0, 0); + } +# endif + } +# ifndef __GC + ~_Rope_RopeFunction() { + this->_M_free_c_string(); + if (_M_delete_when_done) { + delete _M_fn; + } + } +# endif +}; +// Substring results are usually represented using just +// concatenation nodes. But in the case of very long flat ropes +// or ropes with a functional representation that isn't practical. +// In that case, we represent the __result as a special case of +// RopeFunction, whose char_producer points back to the rope itself. +// In all cases except repeated substring operations and +// deallocation, we treat the __result as a RopeFunction. +template +# if ( defined (__IBMCPP__) && (__IBMCPP__ == 500) ) // JFA 10-Aug-2000 for some reason xlC cares about the order +struct _Rope_RopeSubstring : public char_producer<_CharT> , public _Rope_RopeFunction<_CharT,_Alloc> +# else +struct _Rope_RopeSubstring : public _Rope_RopeFunction<_CharT,_Alloc>, + public char_producer<_CharT> +# endif +{ +public: + // XXX this whole class should be rewritten. + typedef _Rope_RopeRep<_CharT,_Alloc> _Base; + _Rope_RopeRep<_CharT,_Alloc>* _M_base; // not 0 + size_t _M_start; + virtual void operator()(size_t __start_pos, size_t __req_len, + _CharT* __buffer) { + switch(_M_base->_M_tag) { + case _Base::_S_function: + case _Base::_S_substringfn: + { + char_producer<_CharT>* __fn = + ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn; + _STLP_ASSERT(__start_pos + __req_len <= this->_M_size._M_data) + _STLP_ASSERT(_M_start + this->_M_size._M_data <= _M_base->_M_size._M_data) + (*__fn)(__start_pos + _M_start, __req_len, __buffer); + } + break; + case _Base::_S_leaf: + { + __GC_CONST _CharT* __s = + ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data; + uninitialized_copy_n(__s + __start_pos + _M_start, __req_len, + __buffer); + } + break; + default: + _STLP_ASSERT(false) + ; + } + } + + _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) + typedef typename _Rope_RopeRep<_CharT,_Alloc>::allocator_type allocator_type; + + _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s, + size_t __l, allocator_type __a) + : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a), + _M_base(__b), + _M_start(__s) + + { + _STLP_ASSERT(__l > 0) + _STLP_ASSERT(__s + __l <= __b->_M_size._M_data) +# ifndef __GC + _M_base->_M_ref_nonnil(); +# endif + this->_M_tag = _Base::_S_substringfn; + } + virtual ~_Rope_RopeSubstring() + { +# ifndef __GC + _M_base->_M_unref_nonnil(); +# endif + } +}; + +// Self-destructing pointers to Rope_rep. +// These are not conventional smart pointers. Their +// only purpose in life is to ensure that unref is called +// on the pointer either at normal exit or if an exception +// is raised. It is the caller's responsibility to +// adjust reference counts when these pointers are initialized +// or assigned to. (This convention significantly reduces +// the number of potentially expensive reference count +// updates.) +#ifndef __GC +template +struct _Rope_self_destruct_ptr { + _Rope_RopeRep<_CharT,_Alloc>* _M_ptr; + ~_Rope_self_destruct_ptr() + { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); } +# ifdef _STLP_USE_EXCEPTIONS + _Rope_self_destruct_ptr() : _M_ptr(0) {}; +# else + _Rope_self_destruct_ptr() {}; +# endif + _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {} + _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; } + _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; } + operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; } + _Rope_self_destruct_ptr<_CharT, _Alloc>& + operator= (_Rope_RopeRep<_CharT,_Alloc>* __x) + { _M_ptr = __x; return *this; } +}; +#endif + +// Dereferencing a nonconst iterator has to return something +// that behaves almost like a reference. It's not possible to +// return an actual reference since assignment requires extra +// work. And we would get into the same problems as with the +// CD2 version of basic_string. +template +class _Rope_char_ref_proxy { + typedef _Rope_char_ref_proxy<_CharT, _Alloc> _Self; + friend class rope<_CharT,_Alloc>; + friend class _Rope_iterator<_CharT,_Alloc>; + friend class _Rope_char_ptr_proxy<_CharT,_Alloc>; +# ifdef __GC + typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr; +# else + typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr; +# endif + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + typedef rope<_CharT,_Alloc> _My_rope; + size_t _M_pos; + _CharT _M_current; + bool _M_current_valid; + _My_rope* _M_root; // The whole rope. +public: + _Rope_char_ref_proxy(_My_rope* __r, size_t __p) : + _M_pos(__p), _M_current_valid(false), _M_root(__r) {} + _Rope_char_ref_proxy(const _Self& __x) : + _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {} + // Don't preserve cache if the reference can outlive the + // expression. We claim that's not possible without calling + // a copy constructor or generating reference to a proxy + // reference. We declare the latter to have undefined semantics. + _Rope_char_ref_proxy(_My_rope* __r, size_t __p, + _CharT __c) : + _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {} + inline operator _CharT () const; + _Self& operator= (_CharT __c); + _Rope_char_ptr_proxy<_CharT, _Alloc> operator& () const; + _Self& operator= (const _Self& __c) { + return operator=((_CharT)__c); + } +}; + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER +template +inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, + _Rope_char_ref_proxy <_CharT, __Alloc > __b) { + _CharT __tmp = __a; + __a = __b; + __b = __tmp; +} +#else +// There is no really acceptable way to handle this. The default +// definition of swap doesn't work for proxy references. +// It can't really be made to work, even with ugly hacks, since +// the only unusual operation it uses is the copy constructor, which +// is needed for other purposes. We provide a macro for +// full specializations, and instantiate the most common case. +# define _ROPE_SWAP_SPECIALIZATION(_CharT, __Alloc) \ + inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a, \ + _Rope_char_ref_proxy <_CharT, __Alloc > __b) { \ + _CharT __tmp = __a; \ + __a = __b; \ + __b = __tmp; \ + } + +_ROPE_SWAP_SPECIALIZATION(char,_STLP_DEFAULT_ALLOCATOR(char) ) + +#endif /* !_STLP_FUNCTION_TMPL_PARTIAL_ORDER */ + + template +class _Rope_char_ptr_proxy { + // XXX this class should be rewritten. +public: + typedef _Rope_char_ptr_proxy<_CharT, _Alloc> _Self; + friend class _Rope_char_ref_proxy<_CharT,_Alloc>; + size_t _M_pos; + rope<_CharT,_Alloc>* _M_root; // The whole rope. + + _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x) + : _M_pos(__x._M_pos), _M_root(__x._M_root) {} + _Rope_char_ptr_proxy(const _Self& __x) + : _M_pos(__x._M_pos), _M_root(__x._M_root) {} + _Rope_char_ptr_proxy() {} + _Rope_char_ptr_proxy(_CharT* __x) : _M_pos(0), _M_root(0) { + _STLP_ASSERT(0 == __x) + } + _Self& + operator= (const _Self& __x) { + _M_pos = __x._M_pos; + _M_root = __x._M_root; + return *this; + } + + _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const { + return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos); + } +}; + + +// Rope iterators: +// Unlike in the C version, we cache only part of the stack +// for rope iterators, since they must be efficiently copyable. +// When we run out of cache, we have to reconstruct the iterator +// value. +// Pointers from iterators are not included in reference counts. +// Iterators are assumed to be thread private. Ropes can +// be shared. + +template +class _Rope_iterator_base +/* : public random_access_iterator<_CharT, ptrdiff_t> */ +{ + friend class rope<_CharT,_Alloc>; + typedef _Rope_iterator_base<_CharT, _Alloc> _Self; +public: + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + // Borland doesnt want this to be protected. + // protected: + enum { _S_path_cache_len = 4 }; // Must be <= 9. + enum { _S_iterator_buf_len = 15 }; + size_t _M_current_pos; + _RopeRep* _M_root; // The whole rope. + size_t _M_leaf_pos; // Starting position for current leaf + __GC_CONST _CharT* _M_buf_start; + // Buffer possibly + // containing current char. + __GC_CONST _CharT* _M_buf_ptr; + // Pointer to current char in buffer. + // != 0 ==> buffer valid. + __GC_CONST _CharT* _M_buf_end; + // One past __last valid char in buffer. + // What follows is the path cache. We go out of our + // way to make this compact. + // Path_end contains the bottom section of the path from + // the root to the current leaf. + const _RopeRep* _M_path_end[_S_path_cache_len]; + int _M_leaf_index; // Last valid __pos in path_end; + // _M_path_end[0] ... _M_path_end[leaf_index-1] + // point to concatenation nodes. + unsigned char _M_path_directions; + // (path_directions >> __i) & 1 is 1 + // iff we got from _M_path_end[leaf_index - __i - 1] + // to _M_path_end[leaf_index - __i] by going to the + // __right. Assumes path_cache_len <= 9. + _CharT _M_tmp_buf[_S_iterator_buf_len]; + // Short buffer for surrounding chars. + // This is useful primarily for + // RopeFunctions. We put the buffer + // here to avoid locking in the + // multithreaded case. + // The cached path is generally assumed to be valid + // only if the buffer is valid. + static void _S_setbuf(_Rope_iterator_base<_CharT, _Alloc>& __x); + // Set buffer contents given + // path cache. + static void _S_setcache(_Rope_iterator_base<_CharT, _Alloc>& __x); + // Set buffer contents and + // path cache. + static void _S_setcache_for_incr(_Rope_iterator_base<_CharT, _Alloc>& __x); + // As above, but assumes path + // cache is valid for previous posn. + _Rope_iterator_base() {} + _Rope_iterator_base(_RopeRep* __root, size_t __pos) + : _M_current_pos(__pos),_M_root(__root), _M_buf_ptr(0) {} + void _M_incr(size_t __n); + void _M_decr(size_t __n); +public: + size_t index() const { return _M_current_pos; } + _Rope_iterator_base(const _Self& __x) { + if (0 != __x._M_buf_ptr) { + *this = __x; + } else { + _M_current_pos = __x._M_current_pos; + _M_root = __x._M_root; + _M_buf_ptr = 0; + } + } +}; + +template class _Rope_iterator; + +template +class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> { + friend class rope<_CharT,_Alloc>; + typedef _Rope_const_iterator<_CharT, _Alloc> _Self; + typedef _Rope_iterator_base<_CharT,_Alloc> _Base; + // protected: +public: +# ifndef _STLP_HAS_NO_NAMESPACES + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + // The one from the base class may not be directly visible. +# endif + _Rope_const_iterator(const _RopeRep* __root, size_t __pos): + _Rope_iterator_base<_CharT,_Alloc>( + __CONST_CAST(_RopeRep*,__root), __pos) + // Only nonconst iterators modify root ref count + {} +public: + typedef _CharT reference; // Really a value. Returning a reference + // Would be a mess, since it would have + // to be included in refcount. + typedef const _CharT* pointer; + typedef _CharT value_type; + typedef ptrdiff_t difference_type; + typedef random_access_iterator_tag iterator_category; + +public: + _Rope_const_iterator() {}; + _Rope_const_iterator(const _Self& __x) : + _Rope_iterator_base<_CharT,_Alloc>(__x) { } + _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x): + _Rope_iterator_base<_CharT,_Alloc>(__x) {} + _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) : + _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr._M_data, __pos) {} + _Self& operator= (const _Self& __x) { + if (0 != __x._M_buf_ptr) { + *(__STATIC_CAST(_Base*,this)) = __x; + } else { + this->_M_current_pos = __x._M_current_pos; + this->_M_root = __x._M_root; + this->_M_buf_ptr = 0; + } + return(*this); + } + reference operator*() { + if (0 == this->_M_buf_ptr) _S_setcache(*this); + return *(this->_M_buf_ptr); + } + _Self& operator++() { + __GC_CONST _CharT* __next; + if (0 != this->_M_buf_ptr && (__next = this->_M_buf_ptr + 1) < this->_M_buf_end) { + this->_M_buf_ptr = __next; + ++this->_M_current_pos; + } else { + this->_M_incr(1); + } + return *this; + } + _Self& operator+=(ptrdiff_t __n) { + if (__n >= 0) { + this->_M_incr(__n); + } else { + this->_M_decr(-__n); + } + return *this; + } + _Self& operator--() { + this->_M_decr(1); + return *this; + } + _Self& operator-=(ptrdiff_t __n) { + if (__n >= 0) { + this->_M_decr(__n); + } else { + this->_M_incr(-__n); + } + return *this; + } + _Self operator++(int) { + size_t __old_pos = this->_M_current_pos; + this->_M_incr(1); + return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos); + // This makes a subsequent dereference expensive. + // Perhaps we should instead copy the iterator + // if it has a valid cache? + } + _Self operator--(int) { + size_t __old_pos = this->_M_current_pos; + this->_M_decr(1); + return _Rope_const_iterator<_CharT,_Alloc>(this->_M_root, __old_pos); + } + inline reference operator[](size_t __n); +}; + +template +class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> { + friend class rope<_CharT,_Alloc>; + typedef _Rope_iterator<_CharT, _Alloc> _Self; + typedef _Rope_iterator_base<_CharT,_Alloc> _Base; + typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep; + // protected: +public: + rope<_CharT,_Alloc>* _M_root_rope; + // root is treated as a cached version of this, + // and is used to detect changes to the underlying + // rope. + // Root is included in the reference count. + // This is necessary so that we can detect changes reliably. + // Unfortunately, it requires careful bookkeeping for the + // nonGC case. + _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos); + + void _M_check(); +public: + typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference; + typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer; + typedef _CharT value_type; + typedef ptrdiff_t difference_type; + typedef random_access_iterator_tag iterator_category; +public: + ~_Rope_iterator() //*TY 5/6/00 - added dtor to balance reference count + { + _RopeRep::_S_unref(this->_M_root); + } + + rope<_CharT,_Alloc>& container() { return *_M_root_rope; } + _Rope_iterator() { + this->_M_root = 0; // Needed for reference counting. + }; + _Rope_iterator(const _Self& __x) : + _Rope_iterator_base<_CharT,_Alloc>(__x) { + _M_root_rope = __x._M_root_rope; + _RopeRep::_S_ref(this->_M_root); + } + _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos); + _Self& operator= (const _Self& __x) { + _RopeRep* __old = this->_M_root; + + _RopeRep::_S_ref(__x._M_root); + if (0 != __x._M_buf_ptr) { + _M_root_rope = __x._M_root_rope; + *(__STATIC_CAST(_Base*,this)) = __x; + } else { + this->_M_current_pos = __x._M_current_pos; + this->_M_root = __x._M_root; + _M_root_rope = __x._M_root_rope; + this->_M_buf_ptr = 0; + } + _RopeRep::_S_unref(__old); + return(*this); + } + reference operator*() { + _M_check(); + if (0 == this->_M_buf_ptr) { + return _Rope_char_ref_proxy<_CharT,_Alloc>( + _M_root_rope, this->_M_current_pos); + } else { + return _Rope_char_ref_proxy<_CharT,_Alloc>( + _M_root_rope, this->_M_current_pos, *(this->_M_buf_ptr)); + } + } + _Self& operator++() { + this->_M_incr(1); + return *this; + } + _Self& operator+=(ptrdiff_t __n) { + if (__n >= 0) { + this->_M_incr(__n); + } else { + this->_M_decr(-__n); + } + return *this; + } + _Self& operator--() { + this->_M_decr(1); + return *this; + } + _Self& operator-=(ptrdiff_t __n) { + if (__n >= 0) { + this->_M_decr(__n); + } else { + this->_M_incr(-__n); + } + return *this; + } + _Self operator++(int) { + size_t __old_pos = this->_M_current_pos; + this->_M_incr(1); + return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos); + } + _Self operator--(int) { + size_t __old_pos = this->_M_current_pos; + this->_M_decr(1); + return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos); + } + reference operator[](ptrdiff_t __n) { + return _Rope_char_ref_proxy<_CharT,_Alloc>( + _M_root_rope, this->_M_current_pos + __n); + } +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template +inline random_access_iterator_tag +iterator_category(const _Rope_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag();} +template +inline _CharT* value_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; } +template +inline ptrdiff_t* distance_type(const _Rope_iterator<_CharT,_Alloc>&) { return 0; } +template +inline random_access_iterator_tag +iterator_category(const _Rope_const_iterator<_CharT,_Alloc>&) { return random_access_iterator_tag(); } +template +inline _CharT* value_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; } +template +inline ptrdiff_t* distance_type(const _Rope_const_iterator<_CharT,_Alloc>&) { return 0; } +#endif + +template +class rope { + typedef rope<_CharT,_Alloc> _Self; +public: + typedef _CharT value_type; + typedef ptrdiff_t difference_type; + typedef size_t size_type; + typedef _CharT const_reference; + typedef const _CharT* const_pointer; + typedef _Rope_iterator<_CharT,_Alloc> iterator; + typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator; + typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference; + typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer; + + friend class _Rope_iterator<_CharT,_Alloc>; + friend class _Rope_const_iterator<_CharT,_Alloc>; + friend struct _Rope_RopeRep<_CharT,_Alloc>; + friend class _Rope_iterator_base<_CharT,_Alloc>; + friend class _Rope_char_ptr_proxy<_CharT,_Alloc>; + friend class _Rope_char_ref_proxy<_CharT,_Alloc>; + friend struct _Rope_RopeSubstring<_CharT,_Alloc>; + + _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS; + +protected: + typedef __GC_CONST _CharT* _Cstrptr; + + static _CharT _S_empty_c_str[1]; + + static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); } + enum { _S_copy_max = 23 }; + // For strings shorter than _S_copy_max, we copy to + // concatenate. + +public: + typedef _Rope_RopeRep<_CharT, _Alloc> _RopeRep; + _STLP_FORCE_ALLOCATORS(_CharT, _Alloc) + typedef typename _Alloc_traits<_CharT,_Alloc>::allocator_type allocator_type; + allocator_type get_allocator() const { return allocator_type(_M_tree_ptr); } +public: + // The only data member of a rope: + _STLP_alloc_proxy<_RopeRep*, _CharT, allocator_type> _M_tree_ptr; + + typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation; + typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf; + typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction; + typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring; + + + + // Retrieve a character at the indicated position. + static _CharT _S_fetch(_RopeRep* __r, size_type __pos); + +# ifndef __GC + // Obtain a pointer to the character at the indicated position. + // The pointer can be used to change the character. + // If such a pointer cannot be produced, as is frequently the + // case, 0 is returned instead. + // (Returns nonzero only if all nodes in the path have a refcount + // of 1.) + static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos); +# endif + + static bool _S_apply_to_pieces( + // should be template parameter + _Rope_char_consumer<_CharT>& __c, + const _RopeRep* __r, + size_t __begin, size_t __end); + // begin and end are assumed to be in range. + +# ifndef __GC + static void _S_unref(_RopeRep* __t) + { + _RopeRep::_S_unref(__t); + } + static void _S_ref(_RopeRep* __t) + { + _RopeRep::_S_ref(__t); + } +# else /* __GC */ + static void _S_unref(_RopeRep*) {} + static void _S_ref(_RopeRep*) {} +# endif + + +# ifdef __GC + typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr; +# else + typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr; +# endif + + // _Result is counted in refcount. + static _RopeRep* _S_substring(_RopeRep* __base, + size_t __start, size_t __endp1); + + static _RopeRep* _S_concat_char_iter(_RopeRep* __r, + const _CharT* __iter, size_t __slen); + // Concatenate rope and char ptr, copying __s. + // Should really take an arbitrary iterator. + // Result is counted in refcount. + static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r, + const _CharT* __iter, size_t __slen) + // As above, but one reference to __r is about to be + // destroyed. Thus the pieces may be recycled if all + // relevent reference counts are 1. +# ifdef __GC + // We can't really do anything since refcounts are unavailable. + { return _S_concat_char_iter(__r, __iter, __slen); } +# else + ; +# endif + + static _RopeRep* _S_concat_rep(_RopeRep* __left, _RopeRep* __right); + // General concatenation on _RopeRep. _Result + // has refcount of 1. Adjusts argument refcounts. + +public: + void apply_to_pieces( size_t __begin, size_t __end, + _Rope_char_consumer<_CharT>& __c) const { + _S_apply_to_pieces(__c, _M_tree_ptr._M_data, __begin, __end); + } + + +protected: + + static size_t _S_rounded_up_size(size_t __n) { + return _RopeRep::_S_rounded_up_size(__n); + } + + static size_t _S_allocated_capacity(size_t __n) { + if (_S_is_basic_char_type((_CharT*)0)) { + return _S_rounded_up_size(__n) - 1; + } else { + return _S_rounded_up_size(__n); + } + } + + // Allocate and construct a RopeLeaf using the supplied allocator + // Takes ownership of s instead of copying. + static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s, + size_t _p_size, allocator_type __a) + { + _RopeLeaf* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _RopeLeaf).allocate(1,(const void*)0); + _STLP_TRY { + _STLP_PLACEMENT_NEW(__space) _RopeLeaf(__s, _p_size, __a); + } + _STLP_UNWIND(_STLP_CREATE_ALLOCATOR(allocator_type,__a, + _RopeLeaf).deallocate(__space, 1)) + return __space; + } + + static _RopeConcatenation* _S_new_RopeConcatenation( + _RopeRep* __left, _RopeRep* __right, + allocator_type __a) + { + _RopeConcatenation* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, + _RopeConcatenation).allocate(1,(const void*)0); + return _STLP_PLACEMENT_NEW(__space) _RopeConcatenation(__left, __right, __a); + } + + static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f, + size_t _p_size, bool __d, allocator_type __a) + { + _RopeFunction* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, + _RopeFunction).allocate(1,(const void*)0); + return _STLP_PLACEMENT_NEW(__space) _RopeFunction(__f, _p_size, __d, __a); + } + + static _RopeSubstring* _S_new_RopeSubstring( + _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s, + size_t __l, allocator_type __a) + { + _RopeSubstring* __space = _STLP_CREATE_ALLOCATOR(allocator_type,__a, + _RopeSubstring).allocate(1,(const void*)0); + return _STLP_PLACEMENT_NEW(__space) _RopeSubstring(__b, __s, __l, __a); + } + +# define _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _p_size, __a) \ + _S_RopeLeaf_from_unowned_char_ptr(__s, _p_size, __a) + + static + _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s, + size_t _p_size, allocator_type __a) + { + if (0 == _p_size) return 0; + + _CharT* __buf = _STLP_CREATE_ALLOCATOR(allocator_type,__a, _CharT).allocate(_S_rounded_up_size(_p_size)); + + uninitialized_copy_n(__s, _p_size, __buf); + _S_cond_store_eos(__buf[_p_size]); + + _STLP_TRY { + return _S_new_RopeLeaf(__buf, _p_size, __a); + } + _STLP_UNWIND(_RopeRep::_S_free_string(__buf, _p_size, __a)) + +# if defined (_STLP_THROW_RETURN_BUG) + return 0; +# endif + } + + + // Concatenation of nonempty strings. + // Always builds a concatenation node. + // Rebalances if the result is too deep. + // Result has refcount 1. + // Does not increment left and right ref counts even though + // they are referenced. + static _RopeRep* + _S_tree_concat(_RopeRep* __left, _RopeRep* __right); + + // Concatenation helper functions + static _RopeLeaf* + _S_leaf_concat_char_iter(_RopeLeaf* __r, + const _CharT* __iter, size_t __slen); + // Concatenate by copying leaf. + // should take an arbitrary iterator + // result has refcount 1. +# ifndef __GC + static _RopeLeaf* _S_destr_leaf_concat_char_iter + (_RopeLeaf* __r, const _CharT* __iter, size_t __slen); + // A version that potentially clobbers __r if __r->_M_ref_count == 1. +# endif + + + // A helper function for exponentiating strings. + // This uses a nonstandard refcount convention. + // The result has refcount 0. + friend struct _Rope_Concat_fn<_CharT,_Alloc>; + typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn; + +public: + static size_t _S_char_ptr_len(const _CharT* __s) { + const _CharT* __p = __s; + + while (!_S_is0(*__p)) { ++__p; } + return (__p - __s); + } + +public: /* for operators */ + rope(_RopeRep* __t, const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, __t) { } +private: + // Copy __r to the _CharT buffer. + // Returns __buffer + __r->_M_size._M_data. + // Assumes that buffer is uninitialized. + static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer); + + // Again, with explicit starting position and length. + // Assumes that buffer is uninitialized. + static _CharT* _S_flatten(_RopeRep* __r, + size_t __start, size_t __len, + _CharT* __buffer); + + // fbp : HP aCC prohibits access to protected min_len from within static methods ( ?? ) +public: + static const unsigned long _S_min_len[46]; +protected: + static bool _S_is_balanced(_RopeRep* __r) + { return (__r->_M_size._M_data >= _S_min_len[__r->_M_depth]); } + + static bool _S_is_almost_balanced(_RopeRep* __r) + { return (__r->_M_depth == 0 || + __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 1]); } + + static bool _S_is_roughly_balanced(_RopeRep* __r) + { return (__r->_M_depth <= 1 || + __r->_M_size._M_data >= _S_min_len[__r->_M_depth - 2]); } + + // Assumes the result is not empty. + static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left, + _RopeRep* __right) + { + _RopeRep* __result = _S_concat_rep(__left, __right); + if (_S_is_balanced(__result)) __result->_M_is_balanced = true; + return __result; + } + + // The basic rebalancing operation. Logically copies the + // rope. The result has refcount of 1. The client will + // usually decrement the reference count of __r. + // The result is within height 2 of balanced by the above + // definition. + static _RopeRep* _S_balance(_RopeRep* __r); + + // Add all unbalanced subtrees to the forest of balanceed trees. + // Used only by balance. + static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest); + + // Add __r to forest, assuming __r is already balanced. + static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest); + + // Print to stdout, exposing structure + static void _S_dump(_RopeRep* __r, int __indent = 0); + + // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp. + static int _S_compare(const _RopeRep* __x, const _RopeRep* __y); + +public: + bool empty() const { return 0 == _M_tree_ptr._M_data; } + + // Comparison member function. This is public only for those + // clients that need a ternary comparison. Others + // should use the comparison operators below. + int compare(const _Self& __y) const { + return _S_compare(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data); + } + + rope(const _CharT* __s, const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),__a)) + { } + + rope(const _CharT* __s, size_t __len, + const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, (_STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, __a))) + { } + + // Should perhaps be templatized with respect to the iterator type + // and use Sequence_buffer. (It should perhaps use sequence_buffer + // even now.) + rope(const _CharT *__s, const _CharT *__e, + const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, __a)) + { } + + rope(const const_iterator& __s, const const_iterator& __e, + const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos, + __e._M_current_pos)) + { } + + rope(const iterator& __s, const iterator& __e, + const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, _S_substring(__s._M_root, __s._M_current_pos, + __e._M_current_pos)) + { } + + rope(_CharT __c, const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, (_RopeRep*)0) + { + _CharT* __buf = _M_tree_ptr.allocate(_S_rounded_up_size(1)); + + _Construct(__buf, __c); + _STLP_TRY { + _M_tree_ptr._M_data = _S_new_RopeLeaf(__buf, 1, __a); + } + _STLP_UNWIND(_RopeRep::_S_free_string(__buf, 1, __a)) + } + + rope(size_t __n, _CharT __c, + const allocator_type& __a = allocator_type()): + _M_tree_ptr(__a, (_RopeRep*)0) { + rope<_CharT,_Alloc> __result; +# define __exponentiate_threshold size_t(32) + _RopeRep* __remainder; + rope<_CharT,_Alloc> __remainder_rope; + + // gcc-2.7.2 bugs + typedef _Rope_Concat_fn<_CharT,_Alloc> _Concat_fn; + + if (0 == __n) + return; + + size_t __exponent = __n / __exponentiate_threshold; + size_t __rest = __n % __exponentiate_threshold; + if (0 == __rest) { + __remainder = 0; + } else { + _CharT* __rest_buffer = _M_tree_ptr.allocate(_S_rounded_up_size(__rest)); + uninitialized_fill_n(__rest_buffer, __rest, __c); + _S_cond_store_eos(__rest_buffer[__rest]); + _STLP_TRY { + __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, __a); + } + _STLP_UNWIND(_RopeRep::_S_free_string(__rest_buffer, __rest, __a)) + } + __remainder_rope._M_tree_ptr._M_data = __remainder; + if (__exponent != 0) { + _CharT* __base_buffer = + _M_tree_ptr.allocate(_S_rounded_up_size(__exponentiate_threshold)); + _RopeLeaf* __base_leaf; + rope<_CharT,_Alloc> __base_rope; + uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c); + _S_cond_store_eos(__base_buffer[__exponentiate_threshold]); + _STLP_TRY { + __base_leaf = _S_new_RopeLeaf(__base_buffer, + __exponentiate_threshold, __a); + } + _STLP_UNWIND(_RopeRep::_S_free_string(__base_buffer, + __exponentiate_threshold, __a)) + __base_rope._M_tree_ptr._M_data = __base_leaf; + if (1 == __exponent) { + __result = __base_rope; +# ifndef __GC + _STLP_ASSERT(2 == __result._M_tree_ptr._M_data->_M_ref_count) + // One each for base_rope and __result +# endif + } else { + __result = power(__base_rope, __exponent, _Concat_fn()); + } + if (0 != __remainder) { + __result += __remainder_rope; + } + } else { + __result = __remainder_rope; + } + _M_tree_ptr._M_data = __result._M_tree_ptr._M_data; + _M_tree_ptr._M_data->_M_ref_nonnil(); +# undef __exponentiate_threshold + } + + rope(const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, (_RopeRep*)0) {} + + // Construct a rope from a function that can compute its members + rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn, + const allocator_type& __a = allocator_type()) + : _M_tree_ptr(__a, (_RopeRep*)0) + { + _M_tree_ptr._M_data = (0 == __len) ? + 0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a); + } + + rope(const _Self& __x) + : _M_tree_ptr(__x.get_allocator(), __x._M_tree_ptr._M_data) + { + _S_ref(_M_tree_ptr._M_data); + } + + ~rope() + { + _S_unref(_M_tree_ptr._M_data); + } + + _Self& operator=(const _Self& __x) + { + _RopeRep* __old = _M_tree_ptr._M_data; + _STLP_ASSERT(get_allocator() == __x.get_allocator()) + _M_tree_ptr._M_data = __x._M_tree_ptr._M_data; + _S_ref(_M_tree_ptr._M_data); + _S_unref(__old); + return(*this); + } + void clear() + { + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = 0; + } + void push_back(_CharT __x) + { + _RopeRep* __old = _M_tree_ptr._M_data; + _M_tree_ptr._M_data = _S_destr_concat_char_iter(_M_tree_ptr._M_data, &__x, 1); + _S_unref(__old); + } + + void pop_back() + { + _RopeRep* __old = _M_tree_ptr._M_data; + _M_tree_ptr._M_data = + _S_substring(_M_tree_ptr._M_data, 0, _M_tree_ptr._M_data->_M_size._M_data - 1); + _S_unref(__old); + } + + _CharT back() const + { + return _S_fetch(_M_tree_ptr._M_data, _M_tree_ptr._M_data->_M_size._M_data - 1); + } + + void push_front(_CharT __x) + { + _RopeRep* __old = _M_tree_ptr._M_data; + _RopeRep* __left = + _STLP_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, get_allocator()); + _STLP_TRY { + _M_tree_ptr._M_data = _S_concat_rep(__left, _M_tree_ptr._M_data); + _S_unref(__old); + _S_unref(__left); + } + _STLP_UNWIND(_S_unref(__left)) + } + + void pop_front() + { + _RopeRep* __old = _M_tree_ptr._M_data; + _M_tree_ptr._M_data = _S_substring(_M_tree_ptr._M_data, 1, _M_tree_ptr._M_data->_M_size._M_data); + _S_unref(__old); + } + + _CharT front() const + { + return _S_fetch(_M_tree_ptr._M_data, 0); + } + + void balance() + { + _RopeRep* __old = _M_tree_ptr._M_data; + _M_tree_ptr._M_data = _S_balance(_M_tree_ptr._M_data); + _S_unref(__old); + } + + void copy(_CharT* __buffer) const { + _STLP_STD::_Destroy(__buffer, __buffer + size()); + _S_flatten(_M_tree_ptr._M_data, __buffer); + } + + // This is the copy function from the standard, but + // with the arguments reordered to make it consistent with the + // rest of the interface. + // Note that this guaranteed not to compile if the draft standard + // order is assumed. + size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const + { + size_t _p_size = size(); + size_t __len = (__pos + __n > _p_size? _p_size - __pos : __n); + + _STLP_STD::_Destroy(__buffer, __buffer + __len); + _S_flatten(_M_tree_ptr._M_data, __pos, __len, __buffer); + return __len; + } + + // Print to stdout, exposing structure. May be useful for + // performance debugging. + void dump() { + _S_dump(_M_tree_ptr._M_data); + } + + // Convert to 0 terminated string in new allocated memory. + // Embedded 0s in the input do not terminate the copy. + const _CharT* c_str() const; + + // As above, but lso use the flattened representation as the + // the new rope representation. + const _CharT* replace_with_c_str(); + + // Reclaim memory for the c_str generated flattened string. + // Intentionally undocumented, since it's hard to say when this + // is safe for multiple threads. + void delete_c_str () { + if (0 == _M_tree_ptr._M_data) return; + if (_RopeRep::_S_leaf == _M_tree_ptr._M_data->_M_tag && + ((_RopeLeaf*)_M_tree_ptr._M_data)->_M_data == + _M_tree_ptr._M_data->_M_c_string) { + // Representation shared + return; + } +# ifndef __GC + _M_tree_ptr._M_data->_M_free_c_string(); +# endif + _M_tree_ptr._M_data->_M_c_string = 0; + } + + _CharT operator[] (size_type __pos) const { + return _S_fetch(_M_tree_ptr._M_data, __pos); + } + + _CharT at(size_type __pos) const { + // if (__pos >= size()) throw out_of_range; // XXX + return (*this)[__pos]; + } + + const_iterator begin() const { + return(const_iterator(_M_tree_ptr._M_data, 0)); + } + + // An easy way to get a const iterator from a non-const container. + const_iterator const_begin() const { + return(const_iterator(_M_tree_ptr._M_data, 0)); + } + + const_iterator end() const { + return(const_iterator(_M_tree_ptr._M_data, size())); + } + + const_iterator const_end() const { + return(const_iterator(_M_tree_ptr._M_data, size())); + } + + size_type size() const { + return(0 == _M_tree_ptr._M_data? 0 : _M_tree_ptr._M_data->_M_size._M_data); + } + + size_type length() const { + return size(); + } + + size_type max_size() const { + return _S_min_len[__ROPE_MAX_DEPTH-1] - 1; + // Guarantees that the result can be sufficirntly + // balanced. Longer ropes will probably still work, + // but it's harder to make guarantees. + } + + const_reverse_iterator rbegin() const { + return const_reverse_iterator(end()); + } + + const_reverse_iterator const_rbegin() const { + return const_reverse_iterator(end()); + } + + const_reverse_iterator rend() const { + return const_reverse_iterator(begin()); + } + + const_reverse_iterator const_rend() const { + return const_reverse_iterator(begin()); + } + // The symmetric cases are intentionally omitted, since they're presumed + // to be less common, and we don't handle them as well. + + // The following should really be templatized. + // The first argument should be an input iterator or + // forward iterator with value_type _CharT. + _Self& append(const _CharT* __iter, size_t __n) { + _RopeRep* __result = + _S_destr_concat_char_iter(_M_tree_ptr._M_data, __iter, __n); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + return *this; + } + + _Self& append(const _CharT* __c_string) { + size_t __len = _S_char_ptr_len(__c_string); + append(__c_string, __len); + return(*this); + } + + _Self& append(const _CharT* __s, const _CharT* __e) { + _RopeRep* __result = + _S_destr_concat_char_iter(_M_tree_ptr._M_data, __s, __e - __s); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + return *this; + } + + _Self& append(const_iterator __s, const_iterator __e) { + _STLP_ASSERT(__s._M_root == __e._M_root) + _STLP_ASSERT(get_allocator() == __s._M_root->get_allocator()) + _Self_destruct_ptr __appendee(_S_substring( + __s._M_root, __s._M_current_pos, __e._M_current_pos)); + _RopeRep* __result = + _S_concat_rep(_M_tree_ptr._M_data, (_RopeRep*)__appendee); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + return *this; + } + + _Self& append(_CharT __c) { + _RopeRep* __result = + _S_destr_concat_char_iter(_M_tree_ptr._M_data, &__c, 1); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + return *this; + } + + _Self& append() { return append(_CharT()); } // XXX why? + + _Self& append(const _Self& __y) { + _STLP_ASSERT(__y.get_allocator() == get_allocator()) + _RopeRep* __result = _S_concat_rep(_M_tree_ptr._M_data, __y._M_tree_ptr._M_data); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + return *this; + } + + _Self& append(size_t __n, _CharT __c) { + rope<_CharT,_Alloc> __last(__n, __c); + return append(__last); + } + + void swap(_Self& __b) { + _STLP_ASSERT(get_allocator() == __b.get_allocator()) + _RopeRep* __tmp = _M_tree_ptr._M_data; + _M_tree_ptr._M_data = __b._M_tree_ptr._M_data; + __b._M_tree_ptr._M_data = __tmp; + } + + +protected: + // Result is included in refcount. + static _RopeRep* replace(_RopeRep* __old, size_t __pos1, + size_t __pos2, _RopeRep* __r) { + if (0 == __old) { _S_ref(__r); return __r; } + _Self_destruct_ptr __left( + _S_substring(__old, 0, __pos1)); + _Self_destruct_ptr __right( + _S_substring(__old, __pos2, __old->_M_size._M_data)); + _STLP_MPWFIX_TRY //*TY 06/01/2000 - + _RopeRep* __result; + + if (0 == __r) { + __result = _S_concat_rep(__left, __right); + } else { + _STLP_ASSERT(__old->get_allocator() == __r->get_allocator()) + _Self_destruct_ptr __left_result(_S_concat_rep(__left, __r)); + __result = _S_concat_rep(__left_result, __right); + } + return __result; + _STLP_MPWFIX_CATCH //*TY 06/01/2000 - + } + +public: + void insert(size_t __p, const _Self& __r) { + _RopeRep* __result = + replace(_M_tree_ptr._M_data, __p, __p, __r._M_tree_ptr._M_data); + _STLP_ASSERT(get_allocator() == __r.get_allocator()) + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + } + + void insert(size_t __p, size_t __n, _CharT __c) { + rope<_CharT,_Alloc> __r(__n,__c); + insert(__p, __r); + } + + void insert(size_t __p, const _CharT* __i, size_t __n) { + _Self_destruct_ptr __left(_S_substring(_M_tree_ptr._M_data, 0, __p)); + _Self_destruct_ptr __right(_S_substring(_M_tree_ptr._M_data, __p, size())); + _Self_destruct_ptr __left_result( + _S_concat_char_iter(__left, __i, __n)); + // _S_ destr_concat_char_iter should be safe here. + // But as it stands it's probably not a win, since __left + // is likely to have additional references. + _RopeRep* __result = _S_concat_rep(__left_result, __right); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + } + + void insert(size_t __p, const _CharT* __c_string) { + insert(__p, __c_string, _S_char_ptr_len(__c_string)); + } + + void insert(size_t __p, _CharT __c) { + insert(__p, &__c, 1); + } + + void insert(size_t __p) { + _CharT __c = _CharT(); + insert(__p, &__c, 1); + } + + void insert(size_t __p, const _CharT* __i, const _CharT* __j) { + _Self __r(__i, __j); + insert(__p, __r); + } + + void insert(size_t __p, const const_iterator& __i, + const const_iterator& __j) { + _Self __r(__i, __j); + insert(__p, __r); + } + + void insert(size_t __p, const iterator& __i, + const iterator& __j) { + _Self __r(__i, __j); + insert(__p, __r); + } + + // (position, length) versions of replace operations: + + void replace(size_t __p, size_t __n, const _Self& __r) { + _RopeRep* __result = + replace(_M_tree_ptr._M_data, __p, __p + __n, __r._M_tree_ptr._M_data); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + } + + void replace(size_t __p, size_t __n, + const _CharT* __i, size_t __i_len) { + _Self __r(__i, __i_len); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, _CharT __c) { + _Self __r(__c); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, const _CharT* __c_string) { + _Self __r(__c_string); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, + const _CharT* __i, const _CharT* __j) { + _Self __r(__i, __j); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, + const const_iterator& __i, const const_iterator& __j) { + _Self __r(__i, __j); + replace(__p, __n, __r); + } + + void replace(size_t __p, size_t __n, + const iterator& __i, const iterator& __j) { + _Self __r(__i, __j); + replace(__p, __n, __r); + } + + // Single character variants: + void replace(size_t __p, _CharT __c) { + iterator __i(this, __p); + *__i = __c; + } + + void replace(size_t __p, const _Self& __r) { + replace(__p, 1, __r); + } + + void replace(size_t __p, const _CharT* __i, size_t __i_len) { + replace(__p, 1, __i, __i_len); + } + + void replace(size_t __p, const _CharT* __c_string) { + replace(__p, 1, __c_string); + } + + void replace(size_t __p, const _CharT* __i, const _CharT* __j) { + replace(__p, 1, __i, __j); + } + + void replace(size_t __p, const const_iterator& __i, + const const_iterator& __j) { + replace(__p, 1, __i, __j); + } + + void replace(size_t __p, const iterator& __i, + const iterator& __j) { + replace(__p, 1, __i, __j); + } + + // Erase, (position, size) variant. + void erase(size_t __p, size_t __n) { + _RopeRep* __result = replace(_M_tree_ptr._M_data, __p, __p + __n, 0); + _S_unref(_M_tree_ptr._M_data); + _M_tree_ptr._M_data = __result; + } + + // Erase, single character + void erase(size_t __p) { + erase(__p, __p + 1); + } + + // Insert, iterator variants. + iterator insert(const iterator& __p, const _Self& __r) + { insert(__p.index(), __r); return __p; } + iterator insert(const iterator& __p, size_t __n, _CharT __c) + { insert(__p.index(), __n, __c); return __p; } + iterator insert(const iterator& __p, _CharT __c) + { insert(__p.index(), __c); return __p; } + iterator insert(const iterator& __p ) + { insert(__p.index()); return __p; } + iterator insert(const iterator& __p, const _CharT* c_string) + { insert(__p.index(), c_string); return __p; } + iterator insert(const iterator& __p, const _CharT* __i, size_t __n) + { insert(__p.index(), __i, __n); return __p; } + iterator insert(const iterator& __p, const _CharT* __i, + const _CharT* __j) + { insert(__p.index(), __i, __j); return __p; } + iterator insert(const iterator& __p, + const const_iterator& __i, const const_iterator& __j) + { insert(__p.index(), __i, __j); return __p; } + iterator insert(const iterator& __p, + const iterator& __i, const iterator& __j) + { insert(__p.index(), __i, __j); return __p; } + + // Replace, range variants. + void replace(const iterator& __p, const iterator& __q, + const _Self& __r) + { replace(__p.index(), __q.index() - __p.index(), __r); } + void replace(const iterator& __p, const iterator& __q, _CharT __c) + { replace(__p.index(), __q.index() - __p.index(), __c); } + void replace(const iterator& __p, const iterator& __q, + const _CharT* __c_string) + { replace(__p.index(), __q.index() - __p.index(), __c_string); } + void replace(const iterator& __p, const iterator& __q, + const _CharT* __i, size_t __n) + { replace(__p.index(), __q.index() - __p.index(), __i, __n); } + void replace(const iterator& __p, const iterator& __q, + const _CharT* __i, const _CharT* __j) + { replace(__p.index(), __q.index() - __p.index(), __i, __j); } + void replace(const iterator& __p, const iterator& __q, + const const_iterator& __i, const const_iterator& __j) + { replace(__p.index(), __q.index() - __p.index(), __i, __j); } + void replace(const iterator& __p, const iterator& __q, + const iterator& __i, const iterator& __j) + { replace(__p.index(), __q.index() - __p.index(), __i, __j); } + + // Replace, iterator variants. + void replace(const iterator& __p, const _Self& __r) + { replace(__p.index(), __r); } + void replace(const iterator& __p, _CharT __c) + { replace(__p.index(), __c); } + void replace(const iterator& __p, const _CharT* __c_string) + { replace(__p.index(), __c_string); } + void replace(const iterator& __p, const _CharT* __i, size_t __n) + { replace(__p.index(), __i, __n); } + void replace(const iterator& __p, const _CharT* __i, const _CharT* __j) + { replace(__p.index(), __i, __j); } + void replace(const iterator& __p, const_iterator __i, + const_iterator __j) + { replace(__p.index(), __i, __j); } + void replace(const iterator& __p, iterator __i, iterator __j) + { replace(__p.index(), __i, __j); } + + // Iterator and range variants of erase + iterator erase(const iterator& __p, const iterator& __q) { + size_t __p_index = __p.index(); + erase(__p_index, __q.index() - __p_index); + return iterator(this, __p_index); + } + iterator erase(const iterator& __p) { + size_t __p_index = __p.index(); + erase(__p_index, 1); + return iterator(this, __p_index); + } + + _Self substr(size_t __start, size_t __len = 1) const { + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr._M_data, __start, __start + __len)); + } + + _Self substr(iterator __start, iterator __end) const { + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr._M_data, __start.index(), __end.index())); + } + + _Self substr(iterator __start) const { + size_t __pos = __start.index(); + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr._M_data, __pos, __pos + 1)); + } + + _Self substr(const_iterator __start, const_iterator __end) const { + // This might eventually take advantage of the cache in the + // iterator. + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr._M_data, __start.index(), __end.index())); + } + + rope<_CharT,_Alloc> substr(const_iterator __start) { + size_t __pos = __start.index(); + return rope<_CharT,_Alloc>( + _S_substring(_M_tree_ptr._M_data, __pos, __pos + 1)); + } + + enum { npos = -1 }; + + // static const size_type npos; + + size_type find(_CharT __c, size_type __pos = 0) const; + size_type find(const _CharT* __s, size_type __pos = 0) const { + size_type __result_pos; + const_iterator __result = search(const_begin() + (ptrdiff_t)__pos, const_end(), + __s, __s + _S_char_ptr_len(__s)); + __result_pos = __result.index(); +# ifndef _STLP_OLD_ROPE_SEMANTICS + if (__result_pos == size()) __result_pos = npos; +# endif + return __result_pos; + } + + iterator mutable_begin() { + return(iterator(this, 0)); + } + + iterator mutable_end() { + return(iterator(this, size())); + } + + reverse_iterator mutable_rbegin() { + return reverse_iterator(mutable_end()); + } + + reverse_iterator mutable_rend() { + return reverse_iterator(mutable_begin()); + } + + reference mutable_reference_at(size_type __pos) { + return reference(this, __pos); + } + +# ifdef __STD_STUFF + reference operator[] (size_type __pos) { + return reference(this, __pos); + } + + reference at(size_type __pos) { + // if (__pos >= size()) throw out_of_range; // XXX + return (*this)[__pos]; + } + + void resize(size_type, _CharT) {} + void resize(size_type) {} + void reserve(size_type = 0) {} + size_type capacity() const { + return max_size(); + } + + // Stuff below this line is dangerous because it's error prone. + // I would really like to get rid of it. + // copy function with funny arg ordering. + size_type copy(_CharT* __buffer, size_type __n, + size_type __pos = 0) const { + return copy(__pos, __n, __buffer); + } + + iterator end() { return mutable_end(); } + + iterator begin() { return mutable_begin(); } + + reverse_iterator rend() { return mutable_rend(); } + + reverse_iterator rbegin() { return mutable_rbegin(); } + +# else + + const_iterator end() { return const_end(); } + + const_iterator begin() { return const_begin(); } + + const_reverse_iterator rend() { return const_rend(); } + + const_reverse_iterator rbegin() { return const_rbegin(); } + +# endif + + __ROPE_DEFINE_ALLOCS(_Alloc, _M_tree_ptr) + }; + +# undef __ROPE_DEFINE_ALLOC +# undef __ROPE_DEFINE_ALLOCS + +template +inline _CharT +_Rope_const_iterator< _CharT, _Alloc>::operator[](size_t __n) +{ + return rope<_CharT,_Alloc>::_S_fetch(this->_M_root, this->_M_current_pos + __n); +} + +template +inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos == __y._M_current_pos && + __x._M_root == __y._M_root); +} + +template +inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos < __y._M_current_pos); +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return !(__x < __y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +template +inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, + const _Rope_const_iterator<_CharT,_Alloc>& __y) { + return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; +} + +#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000 // dwa 8/21/97 - "ambiguous access to overloaded function" bug. +template +inline _Rope_const_iterator<_CharT,_Alloc> +operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) { + return _Rope_const_iterator<_CharT,_Alloc>( + __x._M_root, __x._M_current_pos - __n); +} +# endif + +template +inline _Rope_const_iterator<_CharT,_Alloc> +operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) { + return _Rope_const_iterator<_CharT,_Alloc>( + __x._M_root, __x._M_current_pos + __n); +} + +template +inline _Rope_const_iterator<_CharT,_Alloc> +operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x) { + return _Rope_const_iterator<_CharT,_Alloc>( + __x._M_root, __x._M_current_pos + __n); +} + +template +inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos == __y._M_current_pos && + __x._M_root_rope == __y._M_root_rope); +} + +template +inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return (__x._M_current_pos < __y._M_current_pos); +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return !(__x < __y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +template +inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x, + const _Rope_iterator<_CharT,_Alloc>& __y) { + return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos; +} + +#if !defined( __MWERKS__ ) || __MWERKS__ >= 0x2000 // dwa 8/21/97 - "ambiguous access to overloaded function" bug. +template +inline _Rope_iterator<_CharT,_Alloc> +operator-(const _Rope_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n) { + return _Rope_iterator<_CharT,_Alloc>( + __x._M_root_rope, __x._M_current_pos - __n); +} +# endif + +template +inline _Rope_iterator<_CharT,_Alloc> +operator+(const _Rope_iterator<_CharT,_Alloc>& __x, + ptrdiff_t __n) { + return _Rope_iterator<_CharT,_Alloc>( + __x._M_root_rope, __x._M_current_pos + __n); +} + +template +inline _Rope_iterator<_CharT,_Alloc> +operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) { + return _Rope_iterator<_CharT,_Alloc>( + __x._M_root_rope, __x._M_current_pos + __n); +} + +template +inline +rope<_CharT,_Alloc> +operator+ (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) +{ + _STLP_ASSERT(__left.get_allocator() == __right.get_allocator()) + return rope<_CharT,_Alloc>(rope<_CharT,_Alloc>::_S_concat_rep(__left._M_tree_ptr._M_data, __right._M_tree_ptr._M_data)); + // Inlining this should make it possible to keep __left and + // __right in registers. +} + +template +inline +rope<_CharT,_Alloc>& +operator+= (rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) +{ + __left.append(__right); + return __left; +} + +template +inline +rope<_CharT,_Alloc> +operator+ (const rope<_CharT,_Alloc>& __left, + const _CharT* __right) { + size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right); + return rope<_CharT,_Alloc>( + rope<_CharT,_Alloc>::_S_concat_char_iter( + __left._M_tree_ptr._M_data, __right, __rlen)); +} + +template +inline +rope<_CharT,_Alloc>& +operator+= (rope<_CharT,_Alloc>& __left, + const _CharT* __right) { + __left.append(__right); + return __left; +} + +template +inline +rope<_CharT,_Alloc> +operator+ (const rope<_CharT,_Alloc>& __left, _STLP_SIMPLE_TYPE(_CharT) __right) { + return rope<_CharT,_Alloc>( + rope<_CharT,_Alloc>::_S_concat_char_iter( + __left._M_tree_ptr._M_data, &__right, 1)); +} + +template +inline +rope<_CharT,_Alloc>& +operator+= (rope<_CharT,_Alloc>& __left, _STLP_SIMPLE_TYPE(_CharT) __right) { + __left.append(__right); + return __left; +} + +template +inline bool +operator< (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) { + return __left.compare(__right) < 0; +} + +template +inline bool +operator== (const rope<_CharT,_Alloc>& __left, + const rope<_CharT,_Alloc>& __right) { + return __left.compare(__right) == 0; +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline bool +operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +template +inline bool +operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return __y < __x; +} + +template +inline bool +operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return !(__y < __x); +} + +template +inline bool +operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) { + return !(__x < __y); +} + +template +inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, + const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) { + return !(__x == __y); +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +template +inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x, + const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) { + return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root); +} + +#ifdef _STLP_USE_NEW_IOSTREAMS +template +basic_ostream<_CharT, _Traits>& operator<< ( + basic_ostream<_CharT, _Traits>& __o, + const rope<_CharT, _Alloc>& __r); +#elif ! defined (_STLP_USE_NO_IOSTREAMS) +template +ostream& operator<< (ostream& __o, const rope<_CharT,_Alloc>& __r); +#endif + +typedef rope crope; +# ifdef _STLP_HAS_WCHAR_T +typedef rope wrope; +# endif + +inline crope::reference __mutable_reference_at(crope& __c, size_t __i) +{ + return __c.mutable_reference_at(__i); +} + +# ifdef _STLP_HAS_WCHAR_T +inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i) +{ + return __c.mutable_reference_at(__i); +} +# endif + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER + +template +inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y) { + __x.swap(__y); +} +#else + +inline void swap(crope& __x, crope& __y) { __x.swap(__y); } +# ifdef _STLP_HAS_WCHAR_T // dwa 8/21/97 +inline void swap(wrope& __x, wrope& __y) { __x.swap(__y); } +# endif + +#endif /* _STLP_FUNCTION_TMPL_PARTIAL_ORDER */ + + +// Hash functions should probably be revisited later: +_STLP_TEMPLATE_NULL struct hash +{ + size_t operator()(const crope& __str) const + { + size_t _p_size = __str.size(); + + if (0 == _p_size) return 0; + return 13*__str[0] + 5*__str[_p_size - 1] + _p_size; + } +}; + +# ifdef _STLP_HAS_WCHAR_T // dwa 8/21/97 +_STLP_TEMPLATE_NULL struct hash +{ + size_t operator()(const wrope& __str) const + { + size_t _p_size = __str.size(); + + if (0 == _p_size) return 0; + return 13*__str[0] + 5*__str[_p_size - 1] + _p_size; + } +}; +#endif + +#ifndef _STLP_MSVC +// I couldn't get this to work with VC++ +template +void +_Rope_rotate(_Rope_iterator<_CharT,_Alloc> __first, + _Rope_iterator<_CharT,_Alloc> __middle, + _Rope_iterator<_CharT,_Alloc> __last); + +#if !defined(__GNUC__) +// Appears to confuse g++ +inline void rotate(_Rope_iterator __first, + _Rope_iterator __middle, + _Rope_iterator __last) { + _Rope_rotate(__first, __middle, __last); +} +#endif + +#endif + +template +inline _Rope_char_ref_proxy<_CharT, _Alloc>::operator _CharT () const +{ + if (_M_current_valid) { + return _M_current; + } else { + return _My_rope::_S_fetch(_M_root->_M_tree_ptr._M_data, _M_pos); + } +} +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +# endif /* _STLP_INTERNAL_ROPE_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_slist.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_slist.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +/* + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_SLIST_C +#define _STLP_SLIST_C + +#ifndef _STLP_INTERNAL_SLIST_H +# include +#endif + +# undef slist +# define slist __WORKAROUND_DBG_RENAME(slist) +# if defined (_STLP_NESTED_TYPE_PARAM_BUG) +# define size_type size_t +# endif + +_STLP_BEGIN_NAMESPACE + +template +_Slist_node_base* +_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first, + _Slist_node_base* __last_node) { + _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next); + while (__cur != __last_node) { + _Slist_node<_Tp>* __tmp = __cur; + __cur = (_Slist_node<_Tp>*) __cur->_M_next; + _STLP_STD::_Destroy(&__tmp->_M_data); + _M_head.deallocate(__tmp,1); + } + __before_first->_M_next = __last_node; + return __last_node; +} + +template +slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x) +{ + if (&__x != this) { + _Node_base* __p1 = &this->_M_head._M_data; + _Node* __n1 = (_Node*) this->_M_head._M_data._M_next; + const _Node* __n2 = (const _Node*) __x._M_head._M_data._M_next; + while (__n1 && __n2) { + __n1->_M_data = __n2->_M_data; + __p1 = __n1; + __n1 = (_Node*) __n1->_M_next; + __n2 = (const _Node*) __n2->_M_next; + } + if (__n2 == 0) + this->_M_erase_after(__p1, 0); + else + _M_insert_after_range(__p1, const_iterator((_Node*)__n2), + const_iterator(0)); + } + return *this; +} + +template +void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) { + _Node_base* __prev = &this->_M_head._M_data; + _Node* __node = (_Node*) this->_M_head._M_data._M_next; + for ( ; __node != 0 && __n > 0 ; --__n) { + __node->_M_data = __val; + __prev = __node; + __node = (_Node*) __node->_M_next; + } + if (__n > 0) + _M_insert_after_fill(__prev, __n, __val); + else + this->_M_erase_after(__prev, 0); +} + + +template +void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x) +{ + _Node_base* __cur = &this->_M_head._M_data; + while (__cur->_M_next != 0 && __len > 0) { + --__len; + __cur = __cur->_M_next; + } + if (__cur->_M_next) + this->_M_erase_after(__cur, 0); + else + _M_insert_after_fill(__cur, __len, __x); +} + +template +void slist<_Tp,_Alloc>::remove(const _Tp& __val) +{ + _Node_base* __cur = &this->_M_head._M_data; + while (__cur && __cur->_M_next) { + if (((_Node*) __cur->_M_next)->_M_data == __val) + this->_M_erase_after(__cur); + else + __cur = __cur->_M_next; + } +} + +template +void slist<_Tp,_Alloc>::unique() +{ + _Node_base* __cur = this->_M_head._M_data._M_next; + if (__cur) { + while (__cur->_M_next) { + if (((_Node*)__cur)->_M_data == + ((_Node*)(__cur->_M_next))->_M_data) + this->_M_erase_after(__cur); + else + __cur = __cur->_M_next; + } + } +} + +template +void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x) +{ + _Node_base* __n1 = &this->_M_head._M_data; + while (__n1->_M_next && __x._M_head._M_data._M_next) { + if (((_Node*) __x._M_head._M_data._M_next)->_M_data < + ((_Node*) __n1->_M_next)->_M_data) + _Sl_global_inst::__splice_after(__n1, &__x._M_head._M_data, __x._M_head._M_data._M_next); + __n1 = __n1->_M_next; + } + if (__x._M_head._M_data._M_next) { + __n1->_M_next = __x._M_head._M_data._M_next; + __x._M_head._M_data._M_next = 0; + } +} + +template +void slist<_Tp,_Alloc>::sort() +{ + if (this->_M_head._M_data._M_next && this->_M_head._M_data._M_next->_M_next) { + _Self __carry; + _Self __counter[64]; + int __fill = 0; + while (!empty()) { + _Sl_global_inst::__splice_after(&__carry._M_head._M_data, &this->_M_head._M_data, this->_M_head._M_data._M_next); + int __i = 0; + while (__i < __fill && !__counter[__i].empty()) { + __counter[__i].merge(__carry); + __carry.swap(__counter[__i]); + ++__i; + } + __carry.swap(__counter[__i]); + if (__i == __fill) + ++__fill; + } + + for (int __i = 1; __i < __fill; ++__i) + __counter[__i].merge(__counter[__i-1]); + this->swap(__counter[__fill-1]); + } +} + +# undef slist +# undef size_type + +_STLP_END_NAMESPACE + +#endif /* _STLP_SLIST_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_slist_base.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_slist_base.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,109 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_SLIST_BASE_C +#define _STLP_SLIST_BASE_C + +#ifndef _STLP_INTERNAL_SLIST_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +template +_Slist_node_base* _STLP_CALL +_Sl_global<_Dummy>::__previous(_Slist_node_base* __head, + const _Slist_node_base* __node) +{ + while (__head && __head->_M_next != __node) + __head = __head->_M_next; + return __head; +} + +template +void _STLP_CALL +_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos, _Slist_node_base* __head) +{ + _Slist_node_base* __before_last = __previous(__head, 0); + if (__before_last != __head) { + _Slist_node_base* __after = __pos->_M_next; + __pos->_M_next = __head->_M_next; + __head->_M_next = 0; + __before_last->_M_next = __after; + } +} + +template +void _STLP_CALL +_Sl_global<_Dummy>::__splice_after(_Slist_node_base* __pos, + _Slist_node_base* __before_first, + _Slist_node_base* __before_last) +{ + if (__pos != __before_first && __pos != __before_last) { + _Slist_node_base* __first = __before_first->_M_next; + _Slist_node_base* __after = __pos->_M_next; + __before_first->_M_next = __before_last->_M_next; + __pos->_M_next = __first; + __before_last->_M_next = __after; + } +} + +template +_Slist_node_base* _STLP_CALL +_Sl_global<_Dummy>::__reverse(_Slist_node_base* __node) +{ + _Slist_node_base* __result = __node; + __node = __node->_M_next; + __result->_M_next = 0; + while(__node) { + _Slist_node_base* __next = __node->_M_next; + __node->_M_next = __result; + __result = __node; + __node = __next; + } + return __result; +} + +template +size_t _STLP_CALL +_Sl_global<_Dummy>::size(_Slist_node_base* __node) +{ + size_t __result = 0; + for ( ; __node != 0; __node = __node->_M_next) + ++__result; + return __result; +} + +#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_SLIST_BASE_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_slist_base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_slist_base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_SLIST_BASE_H +#define _STLP_INTERNAL_SLIST_BASE_H + +#ifndef _STLP_CSTDDEF +#include +#endif + +_STLP_BEGIN_NAMESPACE + +struct _Slist_node_base +{ + _Slist_node_base* _M_next; +}; + +inline _Slist_node_base* +__slist_make_link(_Slist_node_base* __prev_node, + _Slist_node_base* __new_node) +{ + __new_node->_M_next = __prev_node->_M_next; + __prev_node->_M_next = __new_node; + return __new_node; +} + + +template +class _Sl_global { +public: + // those used to be global functions + // moved here to reduce code bloat without templatizing _Slist_iterator_base + static size_t _STLP_CALL size(_Slist_node_base* __node); + static _Slist_node_base* _STLP_CALL __reverse(_Slist_node_base* __node); + static void _STLP_CALL __splice_after(_Slist_node_base* __pos, + _Slist_node_base* __before_first, + _Slist_node_base* __before_last); + + static void _STLP_CALL __splice_after(_Slist_node_base* __pos, _Slist_node_base* __head); + + static _Slist_node_base* _STLP_CALL __previous(_Slist_node_base* __head, + const _Slist_node_base* __node); + static const _Slist_node_base* _STLP_CALL __previous(const _Slist_node_base* __head, + const _Slist_node_base* __node) { + return _Sl_global<_Dummy>::__previous((_Slist_node_base*)__head, __node); + } +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS _Sl_global; +# endif +typedef _Sl_global _Sl_global_inst; + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_SLIST_BASE_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_sstream.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_sstream.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,671 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_SSTREAM_C +#define _STLP_SSTREAM_C + +#ifndef _STLP_SSTREAM_H +# include +#include +#endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +// no wint_t is supported for this mode +# define __BSB_int_type__ int +# define __BSB_pos_type__ streampos +# else +# define __BSB_int_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::int_type +# define __BSB_pos_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type +# endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// Non-inline stringbuf member functions. + +// Constructors. Note that the base class constructor sets all of the +// get and area pointers to null. + +template +_STLP_EXP_DECLSPEC basic_stringbuf<_CharT, _Traits, _Alloc> + ::basic_stringbuf(ios_base::openmode __mode) + : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str() +{ +#ifdef __SYMBIAN32__ +if (_M_mode & ios_base::out) { + if (_M_mode & (ios_base::app | ios_base::ate)) + //increment the streampos to reflect the current streampos while writing + _M_str._M_stream_pos += _M_str.size(); +} +#endif +} + +template +_STLP_EXP_DECLSPEC basic_stringbuf<_CharT, _Traits, _Alloc> + ::basic_stringbuf(const basic_string<_CharT, _Traits, _Alloc>& __s, ios_base::openmode __mode) + : basic_streambuf<_CharT, _Traits>(), _M_mode(__mode), _M_str(__s) +{ +#ifdef __SYMBIAN32__ +if (_M_mode & ios_base::out) { + if (_M_mode & (ios_base::app | ios_base::ate)) + //increment the streampos to reflect the current streampos while writing + _M_str._M_stream_pos += _M_str.size(); +} +#endif + _M_set_ptrs(); +} + +template +_STLP_EXP_DECLSPEC basic_stringbuf<_CharT, _Traits, _Alloc>::~basic_stringbuf() +{} + +// Set the underlying string to a new value. +template +_STLP_EXP_DECLSPEC void +basic_stringbuf<_CharT, _Traits, _Alloc>::str(const basic_string<_CharT, _Traits, _Alloc>& __s) +{ + _M_str = __s; + _M_set_ptrs(); +} + +template +void +basic_stringbuf<_CharT, _Traits, _Alloc>::_M_set_ptrs() { + _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); + _CharT* __data_end = __data_ptr + _M_str.size(); + // The initial read position is the beginning of the string. + if (_M_mode & ios_base::in) { + if (_M_mode & ios_base::ate) + this->setg(__data_ptr, __data_end, __data_end); + else + this->setg(__data_ptr, __data_ptr, __data_end); + } + + // The initial write position is the beginning of the string. + if (_M_mode & ios_base::out) { + if (_M_mode & (ios_base::app | ios_base::ate)) + this->setp(__data_end, __data_end); + else + this->setp(__data_ptr, __data_end); + } +} + +// Precondition: gptr() >= egptr(). Returns a character, if one is available. +template +_STLP_EXP_DECLSPEC __BSB_int_type__ +basic_stringbuf<_CharT, _Traits, _Alloc>::underflow() +{ + return this->gptr() != this->egptr() + ? _Traits::to_int_type(*this->gptr()) + : _Traits::eof(); +} + +// Precondition: gptr() >= egptr(). +template +_STLP_EXP_DECLSPEC __BSB_int_type__ +basic_stringbuf<_CharT, _Traits, _Alloc>::uflow() +{ + if (this->gptr() != this->egptr()) { + int_type __c = _Traits::to_int_type(*this->gptr()); + this->gbump(1); + return __c; + } + else + return _Traits::eof(); +} + +template +_STLP_EXP_DECLSPEC __BSB_int_type__ +basic_stringbuf<_CharT, _Traits, _Alloc>::pbackfail(int_type __c) +{ + if (this->gptr() != this->eback()) { + if (!_Traits::eq_int_type(__c, _Traits::eof())) { + +if (_Traits::eq(_Traits::to_char_type(__c), this->gptr()[-1]) + || _M_mode == (ios_base::in | ios_base::out)) { + this->gbump(-1); + *this->gptr() = _Traits::to_char_type(__c); + return _Traits::not_eof(__c); + } + else{ + return _Traits::eof(); + } + } + else { + this->gbump(-1); + return _Traits::not_eof(__c); + } + } + else + return _Traits::eof(); +} + +template +_STLP_EXP_DECLSPEC __BSB_int_type__ +basic_stringbuf<_CharT, _Traits, _Alloc>::overflow(int_type __c) +{ + // fbp : reverse order of "ifs" to pass Dietmar's test. + // Apparently, standard allows overflow with eof even for read-only streams. + if (!_Traits::eq_int_type(__c, _Traits::eof())) { + if (_M_mode & ios_base::out) { + if (!(_M_mode & ios_base::in)) { + // It's a write-only streambuf, so we can use special append buffer. + if (this->pptr() == this->epptr()) + this->_M_append_buffer(); + + if (this->pptr() != this->epptr()) { + *this->pptr() = _Traits::to_char_type(__c); + this->pbump(1); + return __c; + } + else + return _Traits::eof(); + } + + else { + // We're not using a special append buffer, just the string itself. + if (this->pptr() == this->epptr()) { + ptrdiff_t __offset = this->gptr() - this->eback(); + _M_str.push_back(_Traits::to_char_type(__c)); + + _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); + size_t __data_size = _M_str.size(); + + this->setg(__data_ptr, __data_ptr + __offset, __data_ptr+__data_size); + this->setp(__data_ptr, __data_ptr + __data_size); + this->pbump((int)__data_size); + return __c; + } + else { + *this->pptr() = _Traits::to_char_type(__c); + this->pbump(1); + return __c; + } + } + } + else // Overflow always fails if it's read-only + return _Traits::eof(); + } + else // __c is EOF, so we don't have to do anything + return _Traits::not_eof(__c); +} + +template +_STLP_EXP_DECLSPEC streamsize +basic_stringbuf<_CharT, _Traits, _Alloc>::xsputn(const char_type* __s, + streamsize __n) +{ + streamsize __nwritten = 0; + + if ((_M_mode & ios_base::out) && __n > 0) { + // If the put pointer is somewhere in the middle of the string, + // then overwrite instead of append. + if (this->pbase() == _M_str.data() ) { + ptrdiff_t __avail = _M_str.data() + _M_str.size() - this->pptr(); + if (__avail > __n) { + _Traits::copy(this->pptr(), __s, __n); + this->pbump((int)__n); +#ifdef __SYMBIAN32__ + // _M_str._M_stream_pos += __n; //increment streampos to number of characters in stream +#endif + return __n; + } + else { + _Traits::copy(this->pptr(), __s, __avail); + __nwritten += __avail; + __n -= __avail; + __s += __avail; +#ifdef __SYMBIAN32__ + // _M_str._M_stream_pos += __avail;//increment streampos to number of characters in stream +#endif + this->setp(_M_Buf, _M_Buf + __STATIC_CAST(int,_S_BufSiz)); + } + } + + // At this point we know we're appending. + if (_M_mode & ios_base::in) { + ptrdiff_t __get_offset = this->gptr() - this->eback(); + _M_str.append(__s, __s + __n); + + _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); + size_t __data_size = _M_str.size(); + + this->setg(__data_ptr, __data_ptr + __get_offset, __data_ptr+__data_size); + this->setp(__data_ptr, __data_ptr + __data_size); + this->pbump((int)__data_size); + } + else { + _M_append_buffer(); +#ifdef __SYMBIAN32__ + if (_M_str._M_stream_pos >= 0 + && (_M_str._M_stream_pos < _M_str.size())) { + if((_M_str.size() - _M_str._M_stream_pos) >= __n) + _M_str.replace(_M_str._M_stream_pos, __n, __s); + else + { + _M_str.replace(_M_str._M_stream_pos, (_M_str.size() - _M_str._M_stream_pos), __s); + _M_str.append(__s + (__n - (_M_str.size() - _M_str._M_stream_pos)), __s + __n); + } + } else { + _M_str.append(__s, __s + __n); + } + _M_str._M_stream_pos += __n; +#else //__SYMBIAN32__ + _M_str.append(__s, __s + __n); +#endif // __SYMBIAN32__ + } + __nwritten += __n; + } + + return __nwritten; +} + +template +streamsize +basic_stringbuf<_CharT, _Traits, _Alloc>::_M_xsputnc(char_type __c, + streamsize __n) +{ + streamsize __nwritten = 0; + + if ((_M_mode & ios_base::out) && __n > 0) { + // If the put pointer is somewhere in the middle of the string, + // then overwrite instead of append. + if (this->pbase() == _M_str.data()) { + ptrdiff_t __avail = _M_str.data() + _M_str.size() - this->pptr(); + if (__avail > __n) { + _Traits::assign(this->pptr(), __n, __c); + this->pbump((int)__n); + return __n; + } + else { + _Traits::assign(this->pptr(), __avail, __c); + __nwritten += __avail; + __n -= __avail; + this->setp(_M_Buf, _M_Buf + __STATIC_CAST(int,_S_BufSiz)); + } + } + + // At this point we know we're appending. + if (this->_M_mode & ios_base::in) { + ptrdiff_t __get_offset = this->gptr() - this->eback(); + _M_str.append(__n, __c); + + _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); + size_t __data_size = _M_str.size(); + + this->setg(__data_ptr, __data_ptr + __get_offset, __data_ptr+__data_size); + this->setp(__data_ptr, __data_ptr + __data_size); + this->pbump((int)__data_size); + + } + else { + _M_append_buffer(); +// _M_str.append(__n, __c); +#ifdef __SYMBIAN32__ + if (_M_str._M_stream_pos >= 0 + && (_M_str._M_stream_pos < _M_str.size())) { + if((_M_str.size() - _M_str._M_stream_pos) >= __n) + _M_str.replace(_M_str._M_stream_pos,__n, __n, __c); + else + { + _M_str.replace(_M_str._M_stream_pos, (_M_str.size() - _M_str._M_stream_pos), (_M_str.size() - _M_str._M_stream_pos), __c); + _M_str.append(__n, __c); + } + } else { + _M_str.append(__n, __c); + } + _M_str._M_stream_pos += __n; +#else //__SYMBIAN32__ + _M_str.append(__n, __c); +#endif // __SYMBIAN32__ + } + + __nwritten += __n; + } + + return __nwritten; +} + +// According to the C++ standard the effects of setbuf are implementation +// defined, except that setbuf(0, 0) has no effect. In this implementation, +// setbuf(, n), for n > 0, calls reserve(n) on the underlying +// string. +template +_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>* +#ifdef __SYMBIAN32__ +basic_stringbuf<_CharT, _Traits, _Alloc>::setbuf(_CharT* __s, streamsize __n) +#else +basic_stringbuf<_CharT, _Traits, _Alloc>::setbuf(_CharT*, streamsize __n) +#endif //__SYMBIAN32__ +{ + if (__n > 0) { + bool __do_get_area = false; + bool __do_put_area = false; + ptrdiff_t __offg = 0; + ptrdiff_t __offp = 0; + + if (this->pbase() == _M_str.data()) { + __do_put_area = true; + __offp = this->pptr() - this->pbase(); + } + + if (this->eback() == _M_str.data()) { + __do_get_area = true; + __offg = this->gptr() - this->eback(); + } + + if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in)) + _M_append_buffer(); + + _M_str.reserve(__n); + + _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); +#ifdef __SYMBIAN32__ + size_t __data_size = __n; + memmove(__data_ptr, __s, __n*sizeof(_CharT)); + _M_str._M_start = __data_ptr; + _M_str._M_finish = __data_ptr+__n; +#else + size_t __data_size = _M_str.size(); +#endif //__SYMBIAN32__ + + if (__do_get_area) { +#ifdef __SYMBIAN32__ + this->setg(__data_ptr, __data_ptr, __data_ptr+__data_size); +#else + this->setg(__data_ptr, __data_ptr + __offg, __data_ptr+__data_size); +#endif //__SYMBIAN32__ + } + + if (__do_put_area) { + this->setp(__data_ptr, __data_ptr+__data_size); +#ifndef __SYMBIAN32__ + this->pbump((int)__offp); +#endif //__SYMBIAN32__ + } + } + + return this; +} + +template +_STLP_EXP_DECLSPEC __BSB_pos_type__ +basic_stringbuf<_CharT, _Traits, _Alloc>::seekoff(off_type __off, + ios_base::seekdir __dir, + ios_base::openmode __mode) +{ + bool __stl_in = false; + bool __stl_out = false; + + if ((__mode & (ios_base::in | ios_base::out)) == (ios_base::in | ios_base::out) ) { + if (__dir == ios_base::beg || __dir == ios_base::end) + __stl_in = __stl_out = true; + } + else if (__mode & ios_base::in) + __stl_in = true; + else if (__mode & ios_base::out) + __stl_out = true; + + if (!__stl_in && !__stl_out) + return pos_type(off_type(-1)); + else if ((__stl_in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) || + (__stl_out && (!(_M_mode & ios_base::out) || this->pptr() == 0))) + return pos_type(off_type(-1)); + +#ifdef __SYMBIAN32__ + if (_M_mode & ios_base::out) +#else + if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in)) +#endif + _M_append_buffer(); + + streamoff __newoff; + switch(__dir) { + case ios_base::beg: + __newoff = 0; + break; + case ios_base::end: + __newoff = _M_str.size(); + break; + case ios_base::cur: + __newoff = __stl_in ? this->gptr() - this->eback() +#ifdef __SYMBIAN32__ + : ((this->pbase() != this->_M_str) ? _M_str._M_stream_pos + : this->pptr() - this->pbase()); +#else + : this->pptr() - this->pbase(); +#endif //__SYMBIAN32__ + break; + default: + return pos_type(off_type(-1)); + } + + __off += __newoff; + + if (__stl_in) { + ptrdiff_t __n = this->egptr() - this->eback(); + + if (__off < 0 || __off > __n) + return pos_type(off_type(-1)); + else + this->setg(this->eback(), this->eback() + __off, this->eback() + __n); + } + + if (__stl_out) { + ptrdiff_t __n; +#ifdef __SYMBIAN32__ + //if (this->pbase() != this->_M_str) { + void* __data_ptr1 = reinterpret_cast(this->pbase()); + _CharT* __data_ptr2 = __CONST_CAST(_CharT*,this->_M_str.data()); + + if (__data_ptr1 != __data_ptr2) { + __n = _M_str.size(); + } else { +#endif // __SYMBIAN32__ + __n = this->epptr() - this->pbase(); +#ifdef __SYMBIAN32__ + } +#endif //__SYMBIAN32__ + if (__off < 0 || __off > __n) + return pos_type(off_type(-1)); + else { +#ifdef __SYMBIAN32__ + void* __data_ptr1 = reinterpret_cast(this->pbase()); + _CharT* __data_ptr2 = __CONST_CAST(_CharT*,this->_M_str.data()); + + if (__data_ptr1 != __data_ptr2) { + _M_str._M_stream_pos = __off; + } else { +#endif //__SYMBIAN32__ + this->setp(this->pbase(), this->pbase() + __n); + this->pbump((int)__off); +#ifdef __SYMBIAN32__ + } +#endif // __SYMBIAN32__ + } + } + + return pos_type(__off); +} + +template +_STLP_EXP_DECLSPEC __BSB_pos_type__ +basic_stringbuf<_CharT, _Traits, _Alloc> + ::seekpos(pos_type __pos, ios_base::openmode __mode) +{ + bool __stl_in = (__mode & ios_base::in) != 0; + bool __stl_out = (__mode & ios_base::out) != 0; + + if ((__stl_in && (!(_M_mode & ios_base::in) || this->gptr() == 0)) || + (__stl_out && (!(_M_mode & ios_base::out) || this->pptr() == 0)) || + (!__stl_in && !__stl_out)) + return pos_type(off_type(-1)); + + const off_type __n = __pos - pos_type(off_type(0)); + if ((_M_mode & ios_base::out) && !(_M_mode & ios_base::in)) + _M_append_buffer(); + + if (__stl_in) { + if (__n < 0 || __n > this->egptr() - this->eback()) + return pos_type(off_type(-1)); + this->setg(this->eback(), this->eback() + __n, this->egptr()); + } + + if (__stl_out) { + if (__n < 0 || size_t(__n) > _M_str.size()) + return pos_type(off_type(-1)); + + _CharT* __data_ptr = __CONST_CAST(_CharT*,_M_str.data()); + size_t __data_size = _M_str.size(); + + this->setp(__data_ptr, __data_ptr+__data_size); + this->pbump((int)__n); + } + + return __pos; +} + +// This is declared as a const member function because it is +// called by basic_stringbuf<>::str(). Precondition: this is a +// write-only stringbuf. We can't use an output buffer for read- +// write stringbufs. Postcondition: pptr is reset to the beginning +// of the buffer. +template +void basic_stringbuf<_CharT, _Traits, _Alloc>::_M_append_buffer() const + +{ + // Do we have a buffer to append? + if (this->pbase() == this->_M_Buf && this->pptr() != this->_M_Buf) { + basic_stringbuf<_CharT, _Traits, _Alloc>* __this = __CONST_CAST(_Self*,this); +#ifdef __SYMBIAN32__ + size_t __n = this->pptr() - this->pbase(); + if (__this->_M_str._M_stream_pos >= 0 + && (__this->_M_str._M_stream_pos != __this->_M_str.size())) { + { + *(this->pptr()) = (_CharT)0; +#ifdef __SYMBIAN32__ + __this->_M_str.replace(_M_str._M_stream_pos, __n, (const _CharT*)this->pbase(), (const _CharT*)this->pptr()-(const _CharT*)this->pbase()); +#else + __this->_M_str.replace(_M_str._M_stream_pos, __n, (const _CharT*)this->pbase()); + +#endif + } + } else { + __this->_M_str.append((const _CharT*)this->pbase(), (const _CharT*)this->pptr()); + } + __this->_M_str._M_stream_pos += __n; +#else // __SYMBAIN32__ + __this->_M_str.append((const _CharT*)this->pbase(), (const _CharT*)this->pptr()); +#endif // __SYMBIAN32__ + __this->setp(__CONST_CAST(_CharT*,_M_Buf), + __CONST_CAST(_CharT*,_M_Buf + __STATIC_CAST(int,_S_BufSiz))); + } + + // Have we run off the end of the string? + else if (this->pptr() == this->epptr()) { + basic_stringbuf<_CharT, _Traits, _Alloc>* __this = __CONST_CAST(_Self*,this); + __this->setp(__CONST_CAST(_CharT*,_M_Buf), + __CONST_CAST(_CharT*,_M_Buf + __STATIC_CAST(int,_S_BufSiz))); + __this->_M_str._M_stream_pos = __this->_M_str._M_finish - __this->_M_str._M_start; + } +} + +//---------------------------------------------------------------------- +// Non-inline istringstream member functions. + +template +basic_istringstream<_CharT, _Traits, _Alloc> + ::basic_istringstream(ios_base::openmode __mode) + : basic_istream<_CharT, _Traits>(0), + _M_buf(__mode | ios_base::in) +{ + this->init(&_M_buf); +} + +template +basic_istringstream<_CharT, _Traits, _Alloc> + ::basic_istringstream(const _String& __str,ios_base::openmode __mode) + : basic_istream<_CharT, _Traits>(0), + _M_buf(__str, __mode | ios_base::in) +{ + this->init(&_M_buf); +} + +template +basic_istringstream<_CharT, _Traits, _Alloc>::~basic_istringstream() +{} + +//---------------------------------------------------------------------- +// Non-inline ostringstream member functions. + +template +basic_ostringstream<_CharT, _Traits, _Alloc> + ::basic_ostringstream(ios_base::openmode __mode) + : basic_ostream<_CharT, _Traits>(0), + _M_buf(__mode | ios_base::out) +{ + this->init(&_M_buf); +} + +template +basic_ostringstream<_CharT, _Traits, _Alloc> + ::basic_ostringstream(const _String& __str, ios_base::openmode __mode) + : basic_ostream<_CharT, _Traits>(0), + _M_buf(__str, __mode | ios_base::out) +{ + this->init(&_M_buf); +} + +template +basic_ostringstream<_CharT, _Traits, _Alloc>::~basic_ostringstream() +{} + +//---------------------------------------------------------------------- +// Non-inline stringstream member functions. + +template +_STLP_EXP_DECLSPEC basic_stringstream<_CharT, _Traits, _Alloc> + ::basic_stringstream(ios_base::openmode __mode) + : basic_iostream<_CharT, _Traits>(0), _M_buf(__mode) +{ + this->init(&_M_buf); +} + +template +_STLP_EXP_DECLSPEC basic_stringstream<_CharT, _Traits, _Alloc> + ::basic_stringstream(const _String& __str, ios_base::openmode __mode) + : basic_iostream<_CharT, _Traits>(0), _M_buf(__str, __mode) +{ + this->init(&_M_buf); +} + +template +basic_stringstream<_CharT, _Traits, _Alloc>::~basic_stringstream() +{} + +_STLP_END_NAMESPACE + +# undef __BSB_int_type__ +# undef __BSB_pos_type__ + +# endif /* EXPOSE */ + +#endif /* _STLP_SSTREAM_C */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_sstream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_sstream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,273 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + +// This header defines classes basic_stringbuf, basic_istringstream, +// basic_ostringstream, and basic_stringstream. These classes +// represent streamsbufs and streams whose sources or destinations are +// C++ strings. + +#ifndef _STLP_SSTREAM_H +#define _STLP_SSTREAM_H + +#ifndef _STLP_INTERNAL_STREAMBUF +# include +#endif + +#ifndef _STLP_INTERNAL_ISTREAM_H +# include // Includes , , +#endif + +#ifndef _STLP_STRING_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// This version of basic_stringbuf relies on the internal details of +// basic_string. It relies on the fact that, in this implementation, +// basic_string's iterators are pointers. It also assumes (as allowed +// by the standard) that _CharT is a POD type. + +// We have a very small buffer for the put area, just so that we don't +// have to use append() for every sputc. Conceptually, the buffer +// immediately follows the end of the underlying string. We use this +// buffer when appending to write-only streambufs, but we don't use it +// for read-write streambufs. + +template +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS ( basic_stringbuf ) : public basic_streambuf<_CharT, _Traits> +#else +class basic_stringbuf : public basic_streambuf<_CharT, _Traits> +#endif +{ +public: // Typedefs. + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_streambuf<_CharT, _Traits> _Base; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Self; + typedef basic_string<_CharT, _Traits, _Alloc> _String; + +public: // Constructors, destructor. + _STLP_DECLSPEC explicit basic_stringbuf(ios_base::openmode __mode + = ios_base::in | ios_base::out); + _STLP_DECLSPEC explicit basic_stringbuf(const _String& __s, ios_base::openmode __mode + = ios_base::in | ios_base::out); + _STLP_DECLSPEC virtual ~basic_stringbuf(); + +public: // Get or set the string. + _String str() const { + if ( _M_mode & ios_base::out ) + _M_append_buffer(); + return _M_str; + } + _STLP_DECLSPEC void str(const _String& __s); + +protected: // Overridden virtual member functions. + virtual int_type underflow(); + virtual int_type uflow(); + virtual int_type pbackfail(int_type __c); + virtual int_type overflow(int_type __c); + int_type pbackfail() {return pbackfail(_Traits::eof());} + int_type overflow() {return overflow(_Traits::eof());} + + virtual streamsize xsputn(const char_type* __s, streamsize __n); + virtual streamsize _M_xsputnc(char_type __c, streamsize __n); + + virtual _Base* setbuf(_CharT* __buf, streamsize __n); + virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir, + ios_base::openmode __mode + = ios_base::in | ios_base::out); + virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode + = ios_base::in | ios_base::out); + ios_base::openmode _M_mode; + +private: // Helper functions. + // Append the internal buffer to the string if necessary. + void _M_append_buffer() const; + void _M_set_ptrs(); + +private: + mutable basic_string<_CharT, _Traits, _Alloc> _M_str; + + enum _JustName { _S_BufSiz = 8 }; + _CharT _M_Buf[ 8 /* _S_BufSiz */]; +}; + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf, allocator >; +# if !defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_stringbuf, allocator >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +//---------------------------------------------------------------------- +// Class basic_istringstream, an input stream that uses a stringbuf. + +template +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS ( basic_istringstream ) : public basic_istream<_CharT, _Traits> +#else +class basic_istringstream : public basic_istream<_CharT, _Traits> +#endif +{ +public: // Typedefs + typedef typename _Traits::char_type char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_istream<_CharT, _Traits> _Base; + typedef basic_string<_CharT, _Traits, _Alloc> _String; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf; + +public: // Constructors, destructor. + basic_istringstream(ios_base::openmode __mode = ios_base::in); + basic_istringstream(const _String& __str, + ios_base::openmode __mode = ios_base::in); + ~basic_istringstream(); + +public: // Member functions + + basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const + { return __CONST_CAST(_Buf*,&_M_buf); } + + _String str() const { return _M_buf.str(); } + void str(const _String& __s) { _M_buf.str(__s); } + +private: + basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf; +}; + + +//---------------------------------------------------------------------- +// Class basic_ostringstream, an output stream that uses a stringbuf. + +template +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS ( basic_ostringstream ) : public basic_ostream<_CharT, _Traits> +#else +class basic_ostringstream : public basic_ostream<_CharT, _Traits> +#endif +{ +public: // Typedefs + typedef typename _Traits::char_type char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_ostream<_CharT, _Traits> _Base; + typedef basic_string<_CharT, _Traits, _Alloc> _String; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf; + +public: // Constructors, destructor. + basic_ostringstream(ios_base::openmode __mode = ios_base::out); + basic_ostringstream(const _String& __str, + ios_base::openmode __mode = ios_base::out); + ~basic_ostringstream(); + +public: // Member functions. + + basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const + { return __CONST_CAST(_Buf*,&_M_buf); } + + _String str() const { return _M_buf.str(); } + void str(const _String& __s) { _M_buf.str(__s); } // dwa 02/07/00 - BUG STOMPER DAVE + + +private: + basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf; +}; + + +//---------------------------------------------------------------------- +// Class basic_stringstream, a bidirectional stream that uses a stringbuf. + +template +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS ( basic_stringstream ) : public basic_iostream<_CharT, _Traits> +#else +class basic_stringstream : public basic_iostream<_CharT, _Traits> +#endif +{ +public: // Typedefs + typedef typename _Traits::char_type char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + + typedef basic_ios<_CharT, _Traits> _Basic_ios; + typedef basic_iostream<_CharT, _Traits> _Base; + typedef basic_string<_CharT, _Traits, _Alloc> _String; + typedef basic_stringbuf<_CharT, _Traits, _Alloc> _Buf; + + typedef ios_base::openmode openmode; + +public: // Constructors, destructor. + _STLP_DECLSPEC basic_stringstream(openmode __mod = ios_base::in | ios_base::out); + _STLP_DECLSPEC basic_stringstream(const _String& __str, + openmode __mod = ios_base::in | ios_base::out); + ~basic_stringstream(); + +public: // Member functions. + + basic_stringbuf<_CharT, _Traits, _Alloc>* rdbuf() const + { return __CONST_CAST(_Buf*,&_M_buf); } + + _String str() const { return _M_buf.str(); } + void str(const _String& __s) { _M_buf.str(__s); } + +private: + basic_stringbuf<_CharT, _Traits, _Alloc> _M_buf; +}; + + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream, allocator >; +_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream, allocator >; +_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream, allocator >; +# if !defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_istringstream, allocator >; +_STLP_EXPORT_TEMPLATE_CLASS basic_ostringstream, allocator >; +_STLP_EXPORT_TEMPLATE_CLASS basic_stringstream, allocator >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_SSTREAM_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_stack.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_stack.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,105 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_STACK_H +#define _STLP_INTERNAL_STACK_H + +#ifndef _STLP_INTERNAL_DEQUE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +# if !defined ( _STLP_LIMITED_DEFAULT_TEMPLATES ) +template > +# elif defined ( _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS ) +# define _STLP_STACK_ARGS _Tp +template +# else +template +# endif +class stack { + +# ifdef _STLP_STACK_ARGS + typedef deque<_Tp> _Sequence; +# endif + +public: + typedef typename _Sequence::value_type value_type; + typedef typename _Sequence::size_type size_type; + typedef _Sequence container_type; + + typedef typename _Sequence::reference reference; + typedef typename _Sequence::const_reference const_reference; +protected: + _Sequence c; +public: + stack() : c() {} + explicit stack(const _Sequence& __s) : c(__s) {} + + bool empty() const { return c.empty(); } + size_type size() const { return c.size(); } + reference top() { return c.back(); } + const_reference top() const { return c.back(); } + void push(const value_type& __x) { c.push_back(__x); } + void pop() { c.pop_back(); } + const _Sequence& _Get_c() const { return c; } +}; + +# ifndef _STLP_STACK_ARGS +# define _STLP_STACK_ARGS _Tp, _Sequence +# define _STLP_STACK_HEADER_ARGS class _Tp, class _Sequence +# else +# define _STLP_STACK_HEADER_ARGS class _Tp +# endif + +template < _STLP_STACK_HEADER_ARGS > +inline bool _STLP_CALL operator==(const stack< _STLP_STACK_ARGS >& __x, const stack< _STLP_STACK_ARGS >& __y) +{ + return __x._Get_c() == __y._Get_c(); +} + +template < _STLP_STACK_HEADER_ARGS > +inline bool _STLP_CALL operator<(const stack< _STLP_STACK_ARGS >& __x, const stack< _STLP_STACK_ARGS >& __y) +{ + return __x._Get_c() < __y._Get_c(); +} + +_STLP_RELOPS_OPERATORS(template < _STLP_STACK_HEADER_ARGS >, stack< _STLP_STACK_ARGS >) + +_STLP_END_NAMESPACE + +# undef _STLP_STACK_ARGS +# undef _STLP_STACK_HEADER_ARGS + +#endif /* _STLP_INTERNAL_STACK_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_stdexcept.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_stdexcept.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,110 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_STDEXCEPT +#define _STLP_INTERNAL_STDEXCEPT + +#ifndef _STLP_INTERNAL_STDEXCEPT_BASE +# include +#endif + +#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE) + +# if defined(_STLP_USE_EXCEPTIONS) || \ + !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32)) + +_STLP_BEGIN_NAMESPACE + +class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception { +public: + logic_error(const string& __s) : __Named_exception(__s) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~logic_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception { +public: + runtime_error(const string& __s) : __Named_exception(__s) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~runtime_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC domain_error : public logic_error { +public: + domain_error(const string& __arg) : logic_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~domain_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error { +public: + invalid_argument(const string& __arg) : logic_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~invalid_argument() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC length_error : public logic_error { +public: + length_error(const string& __arg) : logic_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~length_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC out_of_range : public logic_error { +public: + out_of_range(const string& __arg) : logic_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~out_of_range() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC range_error : public runtime_error { +public: + range_error(const string& __arg) : runtime_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~range_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error { +public: + overflow_error(const string& __arg) : runtime_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~overflow_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error { +public: + underflow_error(const string& __arg) : runtime_error(__arg) {} +# ifndef _STLP_USE_NO_IOSTREAMS + ~underflow_error() _STLP_NOTHROW_INHERENTLY; +# endif +}; + +_STLP_END_NAMESPACE + +# endif +#endif + +#endif /* _STLP_INTERNAL_STDEXCEPT */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_stdexcept_base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_stdexcept_base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,102 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_INTERNAL_STDEXCEPT_BASE +#define _STLP_INTERNAL_STDEXCEPT_BASE + +#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE) + +# ifndef _STLP_INTERNAL_EXCEPTION +# include +# endif + +# if defined(_STLP_USE_EXCEPTIONS) || \ + !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32)) + +# ifndef _STLP_INTERNAL_CSTRING +# include +# endif + +# ifndef _STLP_STRING_FWD_H +# include +# endif + +# ifndef _STLP_USE_NO_IOSTREAMS +# define _STLP_OWN_STDEXCEPT 1 +# endif + +_STLP_BEGIN_NAMESPACE + +/* We disable the 4275 warning for + * - WinCE where there are only static version of the native C++ runtime. + * - The MSVC compilers when the STLport user wants to make an STLport dll linked to + * the static C++ native runtime. In this case the std::exception base class is no more + * exported from native dll but is used as a base class for the exported __Named_exception + * class. + */ +# if defined (_STLP_WCE_NET) || \ + defined (_STLP_USE_DYNAMIC_LIB) && defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) +# define _STLP_DO_WARNING_POP +# pragma warning (push) +# pragma warning (disable: 4275) // Non dll interface class 'exception' used as base + // for dll-interface class '__Named_exception' +# endif + +# if !defined (_STLP_NO_EXCEPTION_HEADER) +# if !defined (_STLP_EXCEPTION_BASE) && !defined (_STLP_BROKEN_EXCEPTION_CLASS) && \ + defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE) +using _STLP_VENDOR_EXCEPT_STD::exception; +# endif +# endif +# define _STLP_EXCEPTION_BASE exception + +class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE { +public: + __Named_exception(const string& __str) +# ifndef _STLP_USE_NO_IOSTREAMS + ; + const char* what() const _STLP_NOTHROW_INHERENTLY; + ~__Named_exception() _STLP_NOTHROW_INHERENTLY; +# else + { +# if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS) + strncpy(_M_name, _STLP_PRIV __get_c_string(__str), _S_bufsize); +# else + strncpy_s(_STLP_ARRAY_AND_SIZE(_M_name), _STLP_PRIV __get_c_string(__str), _S_bufsize); +# endif + _M_name[_S_bufsize - 1] = '\0'; + } + const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; } +# endif + +private: + enum { _S_bufsize = 256 }; + char _M_name[_S_bufsize]; +}; + +# if defined (_STLP_DO_WARNING_POP) +# pragma warning (pop) +# undef _STLP_DO_WARNING_POP +# endif + +_STLP_END_NAMESPACE + +# endif /* Not o32, and no exceptions */ +#endif /* _STLP_STDEXCEPT_SEEN */ + +#endif /* _STLP_INTERNAL_STDEXCEPT_BASE */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_stlport_version.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_stlport_version.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,30 @@ + /* + * + * Copyright (c) 2005 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STLPORT_VERSION_H +#define _STLP_STLPORT_VERSION_H + +/* The last SGI STL release we merged with */ +#define __SGI_STL 0x330 + +/* STLport version */ +#define _STLPORT_MAJOR 5 +#define _STLPORT_MINOR 1 +#define _STLPORT_PATCHLEVEL 0 + +#define _STLPORT_VERSION 0x510 + +#endif /* _STLP_STLPORT_VERSION_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_stream_iterator.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_stream_iterator.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,343 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996-1998 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#if !defined (_STLP_INTERNAL_STREAM_ITERATOR_H) && ! defined (_STLP_USE_NO_IOSTREAMS) +#define _STLP_INTERNAL_STREAM_ITERATOR_H + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +// streambuf_iterators predeclarations must appear first +#ifndef _STLP_IOSFWD +# include +#endif + +#ifndef _STLP_INTERNAL_ALGOBASE_H +#include +#endif + +#if defined (_STLP_OWN_IOSTREAMS) + +#ifndef _STLP_INTERNAL_OSTREAMBUF_ITERATOR_H +# include +#endif + +#ifndef _STLP_INTERNAL_ISTREAMBUF_ITERATOR_H +# include +#endif + +#ifndef _STLP_INTERNAL_ISTREAM_H +# include +#endif +#endif /* _STLP_OWN_IOSTREAMS */ + +// istream_iterator and ostream_iterator look very different if we're +// using new, templatized iostreams than if we're using the old cfront +// version. + +# if defined (_STLP_USE_NEW_IOSTREAMS) + +_STLP_BEGIN_NAMESPACE + +# ifndef _STLP_LIMITED_DEFAULT_TEMPLATES +template , + class _Dist = ptrdiff_t> +# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _CharT, class _Traits, class _Dist +# define __ISI_TMPL_ARGUMENTS _Tp, _CharT, _Traits, _Dist +class istream_iterator : public iterator { +# else + +# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) +# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp +# define __ISI_TMPL_ARGUMENTS _Tp +template +class istream_iterator : public iterator { +# else +# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist +# define __ISI_TMPL_ARGUMENTS _Tp, _Dist +template +class istream_iterator : public iterator { +# endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */ + +# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */ + +# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES + typedef char _CharT; + typedef char_traits _Traits; +# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) + typedef ptrdiff_t _Dist; +# endif +# endif + + typedef istream_iterator< __ISI_TMPL_ARGUMENTS > _Self; +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_istream<_CharT, _Traits> istream_type; + + typedef input_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Dist difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + + istream_iterator() : _M_stream(0), _M_ok(false) {} + istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); } + + reference operator*() const { return _M_value; } + + _STLP_DEFINE_ARROW_OPERATOR + + _Self& operator++() { + _M_read(); + return *this; + } + _Self operator++(int) { + _Self __tmp = *this; + _M_read(); + return __tmp; + } + + bool _M_equal(const _Self& __x) const + { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream); } + +private: + istream_type* _M_stream; + _Tp _M_value; + bool _M_ok; + + void _M_read() { + _M_ok = (_M_stream && *_M_stream) ? true : false; + if (_M_ok) { + *_M_stream >> _M_value; + _M_ok = *_M_stream ? true : false; + } + } +}; + +#ifndef _STLP_LIMITED_DEFAULT_TEMPLATES +template > +#else +template +#endif +class ostream_iterator: public iterator { +# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES + typedef char _CharT; + typedef char_traits _Traits; + typedef ostream_iterator<_TpP> _Self; +# else + typedef ostream_iterator<_TpP, _CharT, _Traits> _Self; +# endif +public: + typedef _CharT char_type; + typedef _Traits traits_type; + typedef basic_ostream<_CharT, _Traits> ostream_type; + + typedef output_iterator_tag iterator_category; + + ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream_type& __s, const _CharT* __c) + : _M_stream(&__s), _M_string(__c) {} + _Self& operator=(const _TpP& __val) { + *_M_stream << __val; + if (_M_string) *_M_stream << _M_string; + return *this; + } + _Self& operator*() { return *this; } + _Self& operator++() { return *this; } + _Self& operator++(int) { return *this; } +private: + ostream_type* _M_stream; + const _CharT* _M_string; +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +# ifdef _STLP_LIMITED_DEFAULT_TEMPLATES +template +inline output_iterator_tag _STLP_CALL +iterator_category(const ostream_iterator<_TpP>&) { return output_iterator_tag(); } +# else +template +inline output_iterator_tag _STLP_CALL +iterator_category(const ostream_iterator<_TpP, _CharT, _Traits>&) { return output_iterator_tag(); } +# endif +# endif + +_STLP_END_NAMESPACE + +# elif ! defined(_STLP_USE_NO_IOSTREAMS) + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) +# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp +# define __ISI_TMPL_ARGUMENTS _Tp +template +class istream_iterator : public iterator { +# else +# define __ISI_TMPL_HEADER_ARGUMENTS class _Tp, class _Dist +# define __ISI_TMPL_ARGUMENTS _Tp, _Dist +template +class istream_iterator : public iterator { +# endif + +protected: + istream* _M_stream; + _Tp _M_value; + bool _M_end_marker; + void _M_read() { + _M_end_marker = (*_M_stream) ? true : false; + if (_M_end_marker) *_M_stream >> _M_value; + _M_end_marker = (*_M_stream) ? true : false; +} +public: + typedef input_iterator_tag iterator_category; + typedef _Tp value_type; + typedef _Dist difference_type; + typedef const _Tp* pointer; + typedef const _Tp& reference; + + istream_iterator() : _M_stream(&cin), _M_end_marker(false) {} + istream_iterator(istream& __s) : _M_stream(&__s) { _M_read(); } + reference operator*() const { return _M_value; } + + _STLP_DEFINE_ARROW_OPERATOR + + istream_iterator< __ISI_TMPL_ARGUMENTS >& operator++() { + _M_read(); + return *this; + } + istream_iterator< __ISI_TMPL_ARGUMENTS > operator++(int) { + istream_iterator< __ISI_TMPL_ARGUMENTS > __tmp = *this; + _M_read(); + return __tmp; + } + inline bool _M_equal(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) const { + return (_M_stream == __y._M_stream && + _M_end_marker == __y._M_end_marker) || + _M_end_marker == false && __y._M_end_marker == false; + } +}; + +template +class ostream_iterator { +protected: + ostream* _M_stream; + const char* _M_string; +public: + typedef output_iterator_tag iterator_category; +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; +# endif + ostream_iterator(ostream& __s) : _M_stream(&__s), _M_string(0) {} + ostream_iterator(ostream& __s, const char* __c) + : _M_stream(&__s), _M_string(__c) {} + ostream_iterator<_Tp>& operator=(const _Tp& __val) { + *_M_stream << __val; + if (_M_string) *_M_stream << _M_string; + return *this; + } + ostream_iterator<_Tp>& operator*() { return *this; } + ostream_iterator<_Tp>& operator++() { return *this; } + ostream_iterator<_Tp>& operator++(int) { return *this; } +}; + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template inline output_iterator_tag +iterator_category(const ostream_iterator<_Tp>&) { return output_iterator_tag(); } +#endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_USE_NEW_IOSTREAMS */ + +// form-independent definiotion of stream iterators +_STLP_BEGIN_NAMESPACE + +template < __ISI_TMPL_HEADER_ARGUMENTS > +inline bool _STLP_CALL +operator==(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x, + const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) { + return __x._M_equal(__y); +} + +# ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template < __ISI_TMPL_HEADER_ARGUMENTS > +inline bool _STLP_CALL +operator!=(const istream_iterator< __ISI_TMPL_ARGUMENTS >& __x, + const istream_iterator< __ISI_TMPL_ARGUMENTS >& __y) { + return !__x._M_equal(__y); +} + +# endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +# ifdef _STLP_USE_OLD_HP_ITERATOR_QUERIES +template < __ISI_TMPL_HEADER_ARGUMENTS > +inline input_iterator_tag _STLP_CALL +iterator_category(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) +{ return input_iterator_tag(); } +template < __ISI_TMPL_HEADER_ARGUMENTS > +inline _Tp* _STLP_CALL +value_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Tp*) 0; } + +# if defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && ! defined (_STLP_DEFAULT_TYPE_PARAM) +template < __ISI_TMPL_HEADER_ARGUMENTS > +inline ptrdiff_t* _STLP_CALL +distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (ptrdiff_t*)0; } +# else +template < __ISI_TMPL_HEADER_ARGUMENTS > +inline _Dist* _STLP_CALL +distance_type(const istream_iterator< __ISI_TMPL_ARGUMENTS >&) { return (_Dist*)0; } +# endif /* _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS */ + +# endif + +_STLP_END_NAMESPACE + +# undef __ISI_TMPL_HEADER_ARGUMENTS +# undef __ISI_TMPL_ARGUMENTS + + +#endif /* _STLP_INTERNAL_STREAM_ITERATOR_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_streambuf.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_streambuf.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,218 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_STREAMBUF_C +#define _STLP_STREAMBUF_C + +#ifndef _STLP_INTERNAL_STREAMBUF +# include +#endif + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +_STLP_BEGIN_NAMESPACE +//---------------------------------------------------------------------- +// Non-inline basic_streambuf<> member functions. + +template +_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>::basic_streambuf() + : _M_gbegin(0), _M_gnext(0), _M_gend(0), + _M_pbegin(0), _M_pnext(0), _M_pend(0), + _M_locale() +{ + // _M_lock._M_initialize(); +} + +template +_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>::~basic_streambuf() +{} + + +template +_STLP_EXP_DECLSPEC locale +basic_streambuf<_CharT, _Traits>::pubimbue(const locale& __loc) { + this->imbue(__loc); + locale __tmp = _M_locale; + _M_locale = __loc; + return __tmp; +} + +template +_STLP_EXP_DECLSPEC streamsize +basic_streambuf<_CharT, _Traits>::xsgetn(_CharT* __s, streamsize __n) +{ + streamsize __result = 0; + const int_type __eof = _Traits::eof(); + + while (__result < __n) { + if (_M_gnext < _M_gend) { + size_t __chunk = (min) (__STATIC_CAST(size_t,_M_gend - _M_gnext), + __STATIC_CAST(size_t,__n - __result)); + _Traits::copy(__s, _M_gnext, __chunk); + __result += __chunk; + __s += __chunk; + _M_gnext += __chunk; + } + else { + int_type __c = this->sbumpc(); + if (!_Traits::eq_int_type(__c, __eof)) { + *__s = __c; + ++__result; + ++__s; + } + else + break; + } + } + + return __result; +} + +template +_STLP_EXP_DECLSPEC streamsize +basic_streambuf<_CharT, _Traits>::xsputn(const _CharT* __s, streamsize __n) +{ + streamsize __result = 0; + const int_type __eof = _Traits::eof(); + + while (__result < __n) { + if (_M_pnext < _M_pend) { + size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext), + __STATIC_CAST(size_t,__n - __result)); + _Traits::copy(_M_pnext, __s, __chunk); + __result += __chunk; + __s += __chunk; + _M_pnext += __chunk; + } + + else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(*__s)), + __eof)) { + ++__result; + ++__s; + } + else + break; + } + return __result; +} + +template +_STLP_EXP_DECLSPEC streamsize +basic_streambuf<_CharT, _Traits>::_M_xsputnc(_CharT __c, streamsize __n) +{ + streamsize __result = 0; + const int_type __eof = _Traits::eof(); + + while (__result < __n) { + if (_M_pnext < _M_pend) { + size_t __chunk = (min) (__STATIC_CAST(size_t,_M_pend - _M_pnext), + __STATIC_CAST(size_t,__n - __result)); + _Traits::assign(_M_pnext, __chunk, __c); + __result += __chunk; + _M_pnext += __chunk; + } + + else if (!_Traits::eq_int_type(this->overflow(_Traits::to_int_type(__c)), + __eof)) + ++__result; + else + break; + } + return __result; +} + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::_M_snextc_aux() +{ + int_type __eof = _Traits::eof(); + if (_M_gend == _M_gnext) + return _Traits::eq_int_type(this->uflow(), __eof) ? __eof : this->sgetc(); + else { + _M_gnext = _M_gend; + return this->underflow(); + } +} + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::pbackfail(int_type) { + return _Traits::eof(); +} + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::overflow(int_type) { + return _Traits::eof(); +} + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::uflow() { + return ( _Traits::eq_int_type(this->underflow(),_Traits::eof()) ? + _Traits::eof() : + _Traits::to_int_type(*_M_gnext++)); +} + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::int_type +basic_streambuf<_CharT, _Traits>::underflow() +{ return _Traits::eof(); } + +template +_STLP_EXP_DECLSPEC streamsize +basic_streambuf<_CharT, _Traits>::showmanyc() +{ return 0; } + +template +_STLP_EXP_DECLSPEC void +basic_streambuf<_CharT, _Traits>::imbue(const locale&) {} + +template +_STLP_EXP_DECLSPEC int +basic_streambuf<_CharT, _Traits>::sync() { return 0; } + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type +basic_streambuf<_CharT, _Traits>::seekpos(pos_type, ios_base::openmode) +{ return pos_type(-1); } + +template +_STLP_EXP_DECLSPEC _STLP_TYPENAME_ON_RETURN_TYPE basic_streambuf<_CharT, _Traits>::pos_type +basic_streambuf<_CharT, _Traits>::seekoff(off_type, ios_base::seekdir, + ios_base::openmode) +{ return pos_type(-1); } + +template +_STLP_EXP_DECLSPEC basic_streambuf<_CharT, _Traits>* +basic_streambuf<_CharT, _Traits>:: setbuf(char_type*, streamsize) +{ return this; } + + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +# if !defined (_STLP_NO_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS basic_streambuf >; +# endif +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +_STLP_END_NAMESPACE + +# endif /* EXPOSE */ + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_streambuf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_streambuf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,537 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_INTERNAL_STREAMBUF +#define _STLP_INTERNAL_STREAMBUF + +#ifndef _STLP_IOS_BASE_H +#include // Needed for ios_base bitfield members. + // includes . +#endif + +#ifndef _STLP_STDIO_FILE_H +#include // Declaration of struct FILE, and of + // functions to manipulate it. +#endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// Class basic_streambuf<>, the base class of the streambuf hierarchy. + +// A basic_streambuf<> manages an input (get) area and an output (put) +// area. Each is described by three pointers: a beginning, an end, and a +// current position. basic_streambuf<> contains some very simple member +// functions that manipulate those six pointers, but almost all of the real +// functionality gets delegated to protected virtual member functions. +// All of the public member functions are inline, and most of the protected +// member functions are virtual. + +// Although basic_streambuf<> is not abstract, it is useful only as a base +// class. Its virtual member functions have default definitions such that +// reading from a basic_streambuf<> will always yield EOF, and writing to a +// basic_streambuf<> will always fail. + +// The second template parameter, _Traits, defaults to char_traits<_CharT>. +// The default is declared in header , and it isn't declared here +// because C++ language rules do not allow it to be declared twice. + +template +#ifdef __SYMBIAN32__ +class basic_streambuf +#else +class basic_streambuf +#endif +{ + friend class basic_istream<_CharT, _Traits>; + friend class basic_ostream<_CharT, _Traits>; + +public: // Typedefs. + typedef _CharT char_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef _Traits traits_type; + +private: // Data members. + + char_type* _M_gbegin; // Beginning of get area + char_type* _M_gnext; // Current position within the get area + char_type* _M_gend; // End of get area + + char_type* _M_pbegin; // Beginning of put area + char_type* _M_pnext; // Current position within the put area + char_type* _M_pend; // End of put area + + locale _M_locale; // The streambuf's locale object + +public: // Extension: locking, for thread safety. + _STLP_mutex _M_lock; + +public: // Destructor. + _STLP_DECLSPEC virtual ~basic_streambuf(); + +protected: // The default constructor. + _STLP_DECLSPEC basic_streambuf(); + +protected: // Protected interface to the get area. + char_type* eback() const { return _M_gbegin; } // Beginning + char_type* gptr() const { return _M_gnext; } // Current position + char_type* egptr() const { return _M_gend; } // End + + void gbump(int __n) { _M_gnext += __n; } + void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) { + _M_gbegin = __gbegin; + _M_gnext = __gnext; + _M_gend = __gend; + } + +public: + // An alternate public interface to the above functions + // which allows us to avoid using templated friends which + // are not supported on some compilers. + + char_type* _M_eback() const { return eback(); } + char_type* _M_gptr() const { return gptr(); } + char_type* _M_egptr() const { return egptr(); } + void _M_gbump(int __n) { gbump(__n); } + void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) + { setg(__gbegin, __gnext, __gend); } + +protected: // Protected interface to the put area + + char_type* pbase() const { return _M_pbegin; } // Beginning + char_type* pptr() const { return _M_pnext; } // Current position + char_type* epptr() const { return _M_pend; } // End + + void pbump(int __n) { _M_pnext += __n; } + void setp(char_type* __pbegin, char_type* __pend) { + _M_pbegin = __pbegin; + _M_pnext = __pbegin; + _M_pend = __pend; + } + +protected: // Virtual buffer management functions. + + _STLP_DECLSPEC virtual basic_streambuf<_CharT, _Traits>* setbuf(char_type*, streamsize); + + // Alters the stream position, using an integer offset. In this + // class seekoff does nothing; subclasses are expected to override it. + _STLP_DECLSPEC virtual pos_type seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out); + + // Alters the stream position, using a previously obtained streampos. In + // this class seekpos does nothing; subclasses are expected to override it. + _STLP_DECLSPEC virtual pos_type + seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out); + + // Synchronizes (i.e. flushes) the buffer. All subclasses are expected to + // override this virtual member function. + _STLP_DECLSPEC virtual int sync(); + + +public: // Buffer management. + basic_streambuf<_CharT, _Traits>* pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + + pos_type pubseekoff(off_type __offset, ios_base::seekdir __way, + ios_base::openmode __mod = ios_base::in | ios_base::out) + { return this->seekoff(__offset, __way, __mod); } + + pos_type pubseekpos(pos_type __sp, + ios_base::openmode __mod = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mod); } + + int pubsync() { return this->sync(); } + +protected: // Virtual get area functions, as defined in + // 17.5.2.4.3 and 17.5.2.4.4 of the standard. + // Returns a lower bound on the number of characters that we can read, + // with underflow, before reaching end of file. (-1 is a special value: + // it means that underflow will fail.) Most subclasses should probably + // override this virtual member function. + _STLP_DECLSPEC virtual streamsize showmanyc(); + + // Reads up to __n characters. Return value is the number of + // characters read. + _STLP_DECLSPEC virtual streamsize xsgetn(char_type* __s, streamsize __n); + + // Called when there is no read position, i.e. when gptr() is null + // or when gptr() >= egptr(). Subclasses are expected to override + // this virtual member function. + _STLP_DECLSPEC virtual int_type underflow(); + + // Similar to underflow(), but used for unbuffered input. Most + // subclasses should probably override this virtual member function. + _STLP_DECLSPEC virtual int_type uflow(); + + // Called when there is no putback position, i.e. when gptr() is null + // or when gptr() == eback(). All subclasses are expected to override + // this virtual member function. + _STLP_DECLSPEC virtual int_type pbackfail(int_type = traits_type::eof()); + +protected: // Virtual put area functions, as defined in + // 27.5.2.4.5 of the standard. + + // Writes up to __n characters. Return value is the number of characters + // written. + _STLP_DECLSPEC virtual streamsize xsputn(const char_type* __s, streamsize __n); + + // Extension: writes up to __n copies of __c. Return value is the number + // of characters written. + _STLP_DECLSPEC virtual streamsize _M_xsputnc(char_type __c, streamsize __n); + + // Called when there is no write position. All subclasses are expected to + // override this virtual member function. + _STLP_DECLSPEC virtual int_type overflow(int_type = traits_type::eof()); + +public: // Public members for writing characters. + // Write a single character. + int_type sputc(char_type __c) { + return ((_M_pnext < _M_pend) ? _Traits::to_int_type(*_M_pnext++ = __c) + : this->overflow(_Traits::to_int_type(__c))); + } + + // Write __n characters. + streamsize sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + // Extension: write __n copies of __c. + streamsize _M_sputnc(char_type __c, streamsize __n) + { return this->_M_xsputnc(__c, __n); } + +private: // Helper functions. + _STLP_DECLSPEC int_type _M_snextc_aux(); + + +public: // Public members for reading characters. + streamsize in_avail() { + return (_M_gnext < _M_gend) ? (_M_gend - _M_gnext) : this->showmanyc(); + } + + // Advance to the next character and return it. + int_type snextc() { + return ( _M_gend - _M_gnext > 1 ? + _Traits::to_int_type(*++_M_gnext) : + this->_M_snextc_aux()); + } + + // Return the current character and advance to the next. + int_type sbumpc() { + return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext++) + : this->uflow(); + } + + // Return the current character without advancing to the next. + int_type sgetc() { + return _M_gnext < _M_gend ? _Traits::to_int_type(*_M_gnext) + : this->underflow(); + } + + streamsize sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } + + int_type sputbackc(char_type __c) { + return ((_M_gbegin < _M_gnext) && _Traits::eq(__c, *(_M_gnext - 1))) + ? _Traits::to_int_type(*--_M_gnext) + : this->pbackfail(_Traits::to_int_type(__c)); + } + + int_type sungetc() { + return (_M_gbegin < _M_gnext) + ? _Traits::to_int_type(*--_M_gnext) + : this->pbackfail(); + } + +protected: // Virtual locale functions. + + // This is a hook, called by pubimbue() just before pubimbue() + // sets the streambuf's locale to __loc. Note that imbue should + // not (and cannot, since it has no access to streambuf's private + // members) set the streambuf's locale itself. + _STLP_DECLSPEC virtual void imbue(const locale&); + +public: // Locale-related functions. + _STLP_DECLSPEC locale pubimbue(const locale&); + locale getloc() const { return _M_locale; } + +# ifndef _STLP_NO_ANACHRONISMS + void stossc() { this->sbumpc(); } +# endif +#if defined(__MVS__) || defined(__OS400__) +private: // Data members. + + char_type* _M_gbegin; // Beginning of get area + char_type* _M_gnext; // Current position within the get area + char_type* _M_gend; // End of get area + + char_type* _M_pbegin; // Beginning of put area + char_type* _M_pnext; // Current position within the put area + char_type* _M_pend; // End of put area +#endif +}; + + +//---------------------------------------------------------------------- +// Specialization: basic_streambuf > + +// We implement basic_streambuf > very differently +// than the general basic_streambuf<> template. The main reason for this +// difference is a requirement in the C++ standard: the standard input +// and output streams cin and cout are required by default to be synchronized +// with the C library components stdin and stdout. This means it must be +// possible to synchronize a basic_streambuf with a C buffer. +// +// There are two basic ways to do that. First, the streambuf could be +// unbuffered and delegate all buffering to stdio operations. This +// would be correct, but slow: it would require at least one virtual +// function call for every character. Second, the streambuf could use +// a C stdio FILE as its buffer. +// +// We choose the latter option. Every streambuf has pointers to two +// FILE objects, one for the get area and one for the put area. Ordinarily +// it just uses a FILE object as a convenient way to package the three +// get/put area pointers. If a basic_streambuf is synchronized with +// a stdio stream, though, then the pointers are to a FILE object that's +// also used by the C library. +// +// The header encapsulates the implementation details +// of struct FILE. It contains low-level inline functions that convert +// between whe FILE's internal representation and the three-pointer +// representation that basic_streambuf<> needs. + +_STLP_TEMPLATE_NULL +#ifdef __SYMBIAN32__ +class basic_streambuf > +#else +class _STLP_CLASS_DECLSPEC basic_streambuf > +#endif +{ + friend class basic_istream >; + friend class basic_ostream >; +public: // Typedefs. + typedef char char_type; + typedef char_traits::int_type int_type; + typedef char_traits::pos_type pos_type; + typedef char_traits::off_type off_type; + typedef char_traits traits_type; + +private: // Data members. + + FILE* _M_get; // Reference to the get area + FILE* _M_put; // Reference to the put area + +#if defined(__hpux) + _FILEX _M_default_get; // Get area, unless we're syncing with stdio. + _FILEX _M_default_put; // Put area, unless we're syncing with stdio. +#else + FILE _M_default_get; // Get area, unless we're syncing with stdio. + FILE _M_default_put; // Put area, unless we're syncing with stdio. +#endif + + locale _M_locale; + +public: // Extension: locking, for thread safety. + _STLP_mutex _M_lock; + +public: // Destructor. + _STLP_DECLSPEC virtual ~basic_streambuf _STLP_PSPEC2(char, char_traits) (); + +public: + // The default constructor; defined here inline as some compilers require it + _STLP_DECLSPEC basic_streambuf _STLP_PSPEC2(char, char_traits) (); + // Extension: a constructor for streambufs synchronized with C stdio files. + _STLP_DECLSPEC basic_streambuf _STLP_PSPEC2(char, char_traits) (FILE* __get, FILE* __put); + +protected: // Protected interface to the get area. + char_type* eback() const { return _FILE_I_begin(_M_get); } + char_type* gptr() const { return _FILE_I_next(_M_get); } + char_type* egptr() const { return _FILE_I_end(_M_get); } + void gbump(int __n) { _FILE_I_bump(_M_get, __n); } + void setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) + { + _FILE_I_set(_M_get, __gbegin, __gnext, __gend); +#ifdef __SYMBIAN32__ + _change_input_mode(); +#endif + } + +public: + // An alternate public interface to the above functions + // which allows us to avoid using templated friends which + // are not supported on some compilers. + + char_type* _M_eback() const { return _FILE_I_begin(_M_get); } + char_type* _M_gptr() const { return _FILE_I_next(_M_get); } + char_type* _M_egptr() const { return _FILE_I_end(_M_get); } + + void _M_gbump(int __n) { _FILE_I_bump(_M_get, __n); } + void _M_setg(char_type* __gbegin, char_type* __gnext, char_type* __gend) + { _FILE_I_set(_M_get, __gbegin, __gnext, __gend); } + +protected: // Protected interface to the put area + char_type* pbase() const { return _FILE_O_begin(_M_put); } + char_type* pptr() const { return _FILE_O_next(_M_put); } + char_type* epptr() const { return _FILE_O_end(_M_put); } + + void pbump(int __n) { _FILE_O_bump(_M_put, __n); } + void setp(char_type* __pbegin, char_type* __pend) + { _FILE_O_set(_M_put, __pbegin, __pbegin, __pend); } + +protected: // Virtual buffer-management functions. + _STLP_DECLSPEC virtual basic_streambuf >* setbuf(char_type*, streamsize); + _STLP_DECLSPEC virtual pos_type seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out); + _STLP_DECLSPEC virtual pos_type + seekpos(pos_type, ios_base::openmode = ios_base::in | ios_base::out); + _STLP_DECLSPEC virtual int sync(); + +public: // Buffer management. + basic_streambuf >* pubsetbuf(char_type* __s, streamsize __n) + { return this->setbuf(__s, __n); } + + pos_type pubseekoff(off_type __offset, ios_base::seekdir __way, + ios_base::openmode __mod = ios_base::in | ios_base::out) + { return this->seekoff(__offset, __way, __mod); } + + pos_type pubseekpos(pos_type __sp, + ios_base::openmode __mod = ios_base::in | ios_base::out) + { return this->seekpos(__sp, __mod); } + + int pubsync() { return this->sync(); } + +protected: // Virtual get area functions. + _STLP_DECLSPEC virtual streamsize showmanyc(); + _STLP_DECLSPEC virtual streamsize xsgetn(char_type* __s, streamsize __n); + _STLP_DECLSPEC virtual int_type underflow(); + _STLP_DECLSPEC virtual int_type uflow(); + _STLP_DECLSPEC virtual int_type pbackfail(int_type __c = traits_type::eof()); + +protected: // Virtual put area functions. + _STLP_DECLSPEC virtual streamsize xsputn(const char_type* __s, streamsize __n); + _STLP_DECLSPEC virtual streamsize _M_xsputnc(char_type __c, streamsize __n); + _STLP_DECLSPEC virtual int_type overflow(int_type = traits_type::eof()); +#ifdef __SYMBIAN32__ + virtual int save_read_buffer () { return 0; } + virtual void _change_input_mode() {}; +#endif +public: // Public members for writing characters. + // Write a single character. + int_type sputc(char_type __c) { + int_type __res; + if( _FILE_O_avail(_M_put) > 0 ) + { + _FILE_O_postincr(_M_put) = __c; + __res = traits_type::to_int_type(__c); + } + else + __res = this->overflow(traits_type::to_int_type(__c)); + return __res; + } + + // Write __n characters. + streamsize sputn(const char_type* __s, streamsize __n) + { return this->xsputn(__s, __n); } + + // Extension: write __n copies of __c. + streamsize _M_sputnc(char_type __c, streamsize __n) + { return this->_M_xsputnc(__c, __n); } + +private: // Helper functions. + _STLP_DECLSPEC int_type _M_snextc_aux(); + +public: // Public members for reading characters. + streamsize in_avail() + { return _FILE_I_avail(_M_get) > 0 ? _FILE_I_avail(_M_get) +#ifdef __SYMBIAN32__ + + save_read_buffer() +#endif + : this->showmanyc(); } + + // Advance to the next character and return it. + int_type snextc() { + return _FILE_I_avail(_M_get) > 1 + ? traits_type::to_int_type(_FILE_I_preincr(_M_get)) + : this->_M_snextc_aux(); + } + + // Return the current character and advance to the next. + int_type sbumpc() { + return _FILE_I_avail(_M_get) > 0 + ? traits_type::to_int_type(_FILE_I_postincr(_M_get)) + : this->uflow(); + } + + // Return the current character without advancing to the next. + int_type sgetc() { + return _FILE_I_avail(_M_get) > 0 + ? traits_type::to_int_type(*_FILE_I_next(_M_get)) + : this->underflow(); + } + + streamsize sgetn(char_type* __s, streamsize __n) + { return this->xsgetn(__s, __n); } + + int_type sputbackc(char_type __c) { + return _FILE_I_begin(_M_get) < _FILE_I_next(_M_get) && + __c == *(_FILE_I_next(_M_get) - 1) + ? traits_type::to_int_type(_FILE_I_predecr(_M_get)) + : this->pbackfail(traits_type::to_int_type(__c)); + } + + int_type sungetc() { + return _FILE_I_begin(_M_get) < _FILE_I_next(_M_get) + ? traits_type::to_int_type(_FILE_I_predecr(_M_get)) + : this->pbackfail(); + } + +protected: // Virtual locale functions. + _STLP_DECLSPEC virtual void imbue(const locale&); +public: // Locale-related functions. + _STLP_DECLSPEC locale pubimbue(const locale&); + locale getloc() const { return _M_locale; } + +# ifndef _STLP_NO_ANACHRONISMS +public: + void stossc() { this->sbumpc(); } +# endif + +#if defined(__MVS__) || defined(__OS400__) +private: // Data members. + + char_type* _M_gbegin; // Beginning of get area + char_type* _M_gnext; // Current position within the get area + char_type* _M_gend; // End of get area + + char_type* _M_pbegin; // Beginning of put area + char_type* _M_pnext; // Current position within the put area + char_type* _M_pend; // End of put area +#endif + +}; +_STLP_END_NAMESPACE + +# if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,627 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_STRING_C +#define _STLP_STRING_C + +#ifndef _STLP_STRING_H +# include +#endif + +# ifdef _STLP_DEBUG +# define basic_string _Nondebug_string +# endif + +# if defined (_STLP_USE_OWN_NAMESPACE) || !defined (_STLP_USE_NATIVE_STRING) + +# if defined (_STLP_NESTED_TYPE_PARAM_BUG) +# define __size_type__ size_t +# define size_type size_t +# define iterator _CharT* +# else +# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE basic_string<_CharT,_Traits,_Alloc>::size_type +# endif + +_STLP_BEGIN_NAMESPACE + +// ------------------------------------------------------------ +// Non-inline declarations. + + +// Change the string's capacity so that it is large enough to hold +// at least __res_arg elements, plus the terminating _CharT(). Note that, +// if __res_arg < capacity(), this member function may actually decrease +// the string's capacity. +template +_STLP_EXP_DECLSPEC void basic_string<_CharT,_Traits,_Alloc>::reserve(size_type __res_arg) { + + if (__res_arg >= capacity()) + { + if (__res_arg > max_size()) + this->_M_throw_length_error(); + + size_type __n = __res_arg + 1; + _STLP_LEAVE_VOLATILE pointer __new_start = this->_M_end_of_storage.allocate(__n); + _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; + + _STLP_TRY { + __new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start); + _M_construct_null(__new_finish); + } + _STLP_UNWIND((_STLP_STD::_Destroy(__new_start, __new_finish), + this->_M_end_of_storage.deallocate(__new_start, __n))); + + _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); + this->_M_deallocate_block(); + this->_M_start = __new_start; + this->_M_finish = __new_finish; + this->_M_end_of_storage._M_data = __new_start + __n; + } +} + +template +_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& +basic_string<_CharT,_Traits,_Alloc>::append(size_type __n, _CharT __c) +{ + if (__n > max_size() || size() > max_size() - __n) + this->_M_throw_length_error(); + if (size() + __n > capacity()) + reserve(size() + (max)(size(), __n)); + if (__n > 0) { + uninitialized_fill_n(this->_M_finish + 1, __n - 1, __c); + _STLP_TRY { + _M_construct_null(this->_M_finish + __n); + } + _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n)); + _Traits::assign(*end(), __c); + this->_M_finish += __n; + } + return *this; +} + +#ifndef _STLP_MEMBER_TEMPLATES + +template +_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>& +basic_string<_CharT, _Traits, _Alloc>::append(const _CharT* __first, + const _CharT* __last) +{ + if (__first != __last) { + const size_type __old_size = size(); + ptrdiff_t __n = __last - __first; + if ((size_type)__n > max_size() || __old_size > max_size() - __n) + this->_M_throw_length_error(); + if (__old_size + __n > capacity()) { + const size_type __len = __old_size + (max)(__old_size, (size_t) __n) + 1; + pointer __new_start = this->_M_end_of_storage.allocate(__len); + _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; + _STLP_TRY { + __new_finish = uninitialized_copy(this->_M_start, this->_M_finish, __new_start); + __new_finish = uninitialized_copy(__first, __last, __new_finish); + _M_construct_null(__new_finish); + } + _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), + this->_M_end_of_storage.deallocate(__new_start,__len))); + _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); + this->_M_deallocate_block(); + this->_M_start = __new_start; + this->_M_finish = __new_finish; + this->_M_end_of_storage._M_data = __new_start + __len; + } + else { + const _CharT* __f1 = __first; + ++__f1; + uninitialized_copy(__f1, __last, this->_M_finish + 1); + _STLP_TRY { + _M_construct_null(this->_M_finish + __n); + } + _STLP_UNWIND(_STLP_STD::_Destroy(this->_M_finish + 1, this->_M_finish + __n)); + _Traits::assign(*end(), *__first); + this->_M_finish += __n; + } + } + return *this; +} + +#endif /* _STLP_MEMBER_TEMPLATES */ + +template +_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& +basic_string<_CharT,_Traits,_Alloc>::assign(size_type __n, _CharT __c) { + if (__n <= size()) { + _Traits::assign(this->_M_start, __n, __c); + erase(begin() + __n, end()); + } + else { + _Traits::assign(this->_M_start, size(), __c); + append(__n - size(), __c); + } + return *this; +} + +template +_CharT* basic_string<_CharT,_Traits,_Alloc> ::_M_insert_aux(_CharT* __p, + _CharT __c) +{ + pointer __new_pos = __p; + if (this->_M_finish + 1 < this->_M_end_of_storage._M_data) { + _M_construct_null(this->_M_finish + 1); + _Traits::move(__p + 1, __p, this->_M_finish - __p); + _Traits::assign(*__p, __c); + ++this->_M_finish; + } + else { + const size_type __old_len = size(); + const size_type __len = __old_len + + (max)(__old_len, __STATIC_CAST(size_type,1)) + 1; + pointer __new_start = this->_M_end_of_storage.allocate(__len); + _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; + _STLP_TRY { + __new_pos = uninitialized_copy(this->_M_start, __p, __new_start); + _Construct(__new_pos, __c); + __new_finish = __new_pos + 1; + __new_finish = uninitialized_copy(__p, this->_M_finish, __new_finish); + _M_construct_null(__new_finish); + } + _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), + this->_M_end_of_storage.deallocate(__new_start,__len))); + _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); + this->_M_deallocate_block(); + this->_M_start = __new_start; + this->_M_finish = __new_finish; + this->_M_end_of_storage._M_data = __new_start + __len; + } + return __new_pos; +} + +template +_STLP_EXP_DECLSPEC void basic_string<_CharT,_Traits,_Alloc>::insert(iterator __position, + size_t __n, _CharT __c) +{ + if (__n != 0) { + if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n + 1) { + const size_type __elems_after = this->_M_finish - __position; + pointer __old_finish = this->_M_finish; + if (__elems_after >= __n) { + uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1, + this->_M_finish + 1); + this->_M_finish += __n; + _Traits::move(__position + __n, + __position, (__elems_after - __n) + 1); + _Traits::assign(__position, __n, __c); + } + else { + uninitialized_fill_n(this->_M_finish + 1, __n - __elems_after - 1, __c); + this->_M_finish += __n - __elems_after; + _STLP_TRY { + uninitialized_copy(__position, __old_finish + 1, this->_M_finish); + this->_M_finish += __elems_after; + } + _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), + this->_M_finish = __old_finish)); + _Traits::assign(__position, __elems_after + 1, __c); + } + } + else { + const size_type __old_size = size(); + const size_type __len = __old_size + (max)(__old_size, __n) + 1; + pointer __new_start = this->_M_end_of_storage.allocate(__len); + _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; + _STLP_TRY { + __new_finish = uninitialized_copy(this->_M_start, __position, __new_start); + __new_finish = uninitialized_fill_n(__new_finish, __n, __c); + __new_finish = uninitialized_copy(__position, this->_M_finish, + __new_finish); + _M_construct_null(__new_finish); + } + _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), + this->_M_end_of_storage.deallocate(__new_start,__len))); + _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); + this->_M_deallocate_block(); + this->_M_start = __new_start; + this->_M_finish = __new_finish; + this->_M_end_of_storage._M_data = __new_start + __len; + } + } +} + +#ifndef _STLP_MEMBER_TEMPLATES + +template +_STLP_EXP_DECLSPEC void +basic_string<_CharT,_Traits,_Alloc>::insert(iterator __position, + const _CharT* __first, + const _CharT* __last) +{ + if (__first != __last) { + const ptrdiff_t __n = __last - __first; + if (this->_M_end_of_storage._M_data - this->_M_finish >= __n + 1) { + const ptrdiff_t __elems_after = this->_M_finish - __position; + pointer __old_finish = this->_M_finish; + if (__elems_after >= __n) { + uninitialized_copy((this->_M_finish - __n) + 1, this->_M_finish + 1, + this->_M_finish + 1); + this->_M_finish += __n; + _Traits::move(__position + __n, + __position, (__elems_after - __n) + 1); + _M_copy(__first, __last, __position); + } + else { + const _CharT* __mid = __first; + advance(__mid, __elems_after + 1); + uninitialized_copy(__mid, __last, this->_M_finish + 1); + this->_M_finish += __n - __elems_after; + _STLP_TRY { + uninitialized_copy(__position, __old_finish + 1, this->_M_finish); + this->_M_finish += __elems_after; + } + _STLP_UNWIND((_STLP_STD::_Destroy(__old_finish + 1, this->_M_finish), + this->_M_finish = __old_finish)); + _M_copy(__first, __mid, __position); + } + } + else { + size_type __old_size = size(); + size_type __len + = __old_size + (max)(__old_size, __STATIC_CAST(const size_type,__n)) + 1; + pointer __new_start = this->_M_end_of_storage.allocate(__len); + _STLP_LEAVE_VOLATILE pointer __new_finish = __new_start; + _STLP_TRY { + __new_finish = uninitialized_copy(this->_M_start, __position, __new_start); + __new_finish = uninitialized_copy(__first, __last, __new_finish); + __new_finish + = uninitialized_copy(__position, this->_M_finish, __new_finish); + _M_construct_null(__new_finish); + } + _STLP_UNWIND((_STLP_STD::_Destroy(__new_start,__new_finish), + this->_M_end_of_storage.deallocate(__new_start,__len))); + _STLP_STD::_Destroy(this->_M_start, this->_M_finish + 1); + this->_M_deallocate_block(); + this->_M_start = __new_start; + this->_M_finish = __new_finish; + this->_M_end_of_storage._M_data = __new_start + __len; + } + } +} + +#endif /* _STLP_MEMBER_TEMPLATES */ + +template +_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& +basic_string<_CharT,_Traits,_Alloc>::replace(iterator __first, iterator __last, size_type __n, _CharT __c) +{ + size_type __len = (size_type)(__last - __first); + + if (__len >= __n) { + _Traits::assign(__first, __n, __c); + erase(__first + __n, __last); + } + else { + _Traits::assign(__first, __len, __c); + insert(__last, __n - __len, __c); + } + return *this; +} + +#ifndef _STLP_MEMBER_TEMPLATES + + +template +_STLP_EXP_DECLSPEC basic_string<_CharT,_Traits,_Alloc>& +basic_string<_CharT,_Traits,_Alloc> ::replace(iterator __first, iterator __last, + const _CharT* __f, const _CharT* __l) +{ + const ptrdiff_t __n = __l - __f; + const difference_type __len = __last - __first; + if (__len >= __n) { + _M_copy(__f, __l, __first); + erase(__first + __n, __last); + } + else { + const _CharT* __m = __f + __len; + _M_copy(__f, __m, __first); + insert(__last, __m, __l); + } + return *this; +} + +#endif /* _STLP_MEMBER_TEMPLATES */ + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::find(const _CharT* __s, size_type __pos, size_type __n) const +{ +#ifndef __SYMBIAN32__ // A different implementation without using search + if (__pos + __n > size()) + return npos; + else { + const const_pointer __result = + _STLP_STD::search((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, + __s, __s + __n, _Eq_traits<_Traits>()); + return __result != this->_M_finish ? __result - this->_M_start : npos; + } +#else + const size_type __len = this->size(); + size_t __tpos = __pos; + const _CharT* __data = this->_M_start; + while (__tpos + __n <= __len) { + if (traits_type::compare(__data + __tpos, __s, __n) == 0) + return __tpos; + ++__tpos; + } + return npos; +#endif //__SYMBIAN32__ +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::find(_CharT __c, size_type __pos) const +{ + if (__pos >= size()) + return npos; + else { + const const_pointer __result = + _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, + _Eq_char_bound<_Traits>(__c)); + return __result != this->_M_finish ? __result - this->_M_start : npos; + } +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::rfind(const _CharT* __s, size_type __pos, size_type __n) const +{ + const size_t __len = size(); + + if (__n > __len) + return npos; + else if (__n == 0) + return (min) (__len, __pos); + else { + const_pointer __last = this->_M_start + (min) (__len - __n, __pos) + __n; + const_pointer __result = _STLP_STD::find_end((const_pointer)this->_M_start, __last, + __s, __s + __n, + _Eq_traits<_Traits>()); + return __result != __last ? __result - this->_M_start : npos; + } +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::rfind(_CharT __c, size_type __pos) const +{ + const size_type __len = size(); + + if (__len < 1) + return npos; + else { + const const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; + const_reverse_iterator __rresult = + _STLP_STD::find_if(const_reverse_iterator(__last), rend(), + _Eq_char_bound<_Traits>(__c)); + return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; + } +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> + ::find_first_of(const _CharT* __s, size_type __pos, size_type __n) const +{ + if (__pos >= size()) + return npos; + else { + const_iterator __result = __find_first_of(begin() + __pos, end(), + __s, __s + __n, + _Eq_traits<_Traits>()); + return __result != end() ? __result - begin() : npos; + } +} + + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> + ::find_last_of(const _CharT* __s, size_type __pos, size_type __n) const +{ + const size_type __len = size(); + + if (__len < 1) + return npos; + else { + const const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; + const const_reverse_iterator __rresult = + __find_first_of(const_reverse_iterator(__last), rend(), + __s, __s + __n, + _Eq_traits<_Traits>()); + return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; + } +} + + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const +{ + typedef typename _Traits::char_type _CharType; + if (__pos > size()) + return npos; + else { + const_pointer __result = _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, + (const _CharT*)this->_M_finish, + _Not_within_traits<_Traits>((const _CharType*)__s, + (const _CharType*)__s + __n)); + return __result != this->_M_finish ? __result - this->_M_start : npos; + } +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::find_first_not_of(_CharT __c, size_type __pos) const +{ + if (__pos > size()) + return npos; + else { + const_pointer __result = _STLP_STD::find_if((const _CharT*)this->_M_start + __pos, (const _CharT*)this->_M_finish, + _Neq_char_bound<_Traits>(__c)); + return __result != this->_M_finish ? __result - this->_M_start : npos; + } +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT,_Traits,_Alloc> ::find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const +{ + typedef typename _Traits::char_type _CharType; + const size_type __len = size(); + + if (__len < 1) + return npos; + else { + const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; + const_reverse_iterator __rlast = const_reverse_iterator(__last); + const_reverse_iterator __rresult = + _STLP_STD::find_if(__rlast, rend(), + _Not_within_traits<_Traits>((const _CharType*)__s, + (const _CharType*)__s + __n)); + return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; + } +} + +template +_STLP_EXP_DECLSPEC __size_type__ +basic_string<_CharT, _Traits, _Alloc> ::find_last_not_of(_CharT __c, size_type __pos) const +{ + const size_type __len = size(); + + if (__len < 1) + return npos; + else { + const_iterator __last = begin() + (min) (__len - 1, __pos) + 1; + const_reverse_iterator __rlast = const_reverse_iterator(__last); + const_reverse_iterator __rresult = + _STLP_STD::find_if(__rlast, rend(), + _Neq_char_bound<_Traits>(__c)); + return __rresult != rend() ? (__rresult.base() - 1) - begin() : npos; + } +} + +template +void _STLP_CALL _S_string_copy(const basic_string<_CharT,_Traits,_Alloc>& __s, + _CharT* __buf, + size_t __n) +{ + if (__n > 0) { + __n = (min) (__n - 1, __s.size()); + _STLP_STD::copy(__s.begin(), __s.begin() + __n, __buf); + __buf[__n] = _CharT(); + } +} +_STLP_END_NAMESPACE + +// _string_fwd has to see clean basic_string +# undef basic_string + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +# ifdef _STLP_DEBUG +# define basic_string _Nondebug_string +# endif + +# include +_STLP_BEGIN_NAMESPACE + +// _String_base methods +template +void _String_base<_Tp,_Alloc>::_M_throw_length_error() const { + __stl_throw_length_error("basic_string"); +} + +template +void _String_base<_Tp, _Alloc>::_M_throw_out_of_range() const { + __stl_throw_out_of_range("basic_string"); +} + +template +void _String_base<_Tp, _Alloc>::_M_allocate_block(size_t __n) { + if ((__n <= (max_size()+1)) && (__n>0)){ + _M_start = _M_end_of_storage.allocate(__n); + _M_finish = _M_start; + _M_end_of_storage._M_data = _M_start + __n; + } + else + _M_throw_length_error(); +} + +template +_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>::basic_string() + : _String_base<_CharT,_Alloc>(allocator_type()) +{ + this->_M_start = this->_M_end_of_storage.allocate(8); + this->_M_finish = this->_M_start; + this->_M_end_of_storage._M_data = this->_M_start + 8; + _M_terminate_string(); + _STLP_POP_CLEANUP_ITEM +} + + +template +_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>::basic_string(const _CharT* __s, + const allocator_type& __a) + : _String_base<_CharT,_Alloc>(__a) +{ + _STLP_FIX_LITERAL_BUG(__s) + _M_range_initialize(__s, __s + traits_type::length(__s)); + _STLP_POP_CLEANUP_ITEM +} + + +template +_STLP_EXP_DECLSPEC basic_string<_CharT, _Traits, _Alloc>::basic_string(const basic_string<_CharT, _Traits, _Alloc> & __s) + : _String_base<_CharT,_Alloc>(__s.get_allocator()) +{ + _M_range_initialize(__s._M_start, __s._M_finish); + _STLP_POP_CLEANUP_ITEM +} + +# if defined ( __SUNPRO_CC) && ! defined(_STLP_STATIC_CONST_INIT_BUG) +template const size_t basic_string<_CharT, _Traits, _Alloc>::npos; +# endif + +_STLP_END_NAMESPACE + +# undef basic_string +# undef __size_type__ +# undef size_type +# undef iterator +# endif /* NATIVE */ + +#endif /* _STLP_STRING_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_base.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_base.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,249 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * Copyright (c) 2003 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STRING_BASE_H +#define _STLP_STRING_BASE_H + +// ------------------------------------------------------------ +// Class _String_base. + +// _String_base is a helper class that makes it it easier to write an +// exception-safe version of basic_string. The constructor allocates, +// but does not initialize, a block of memory. The destructor +// deallocates, but does not destroy elements within, a block of +// memory. The destructor assumes that _M_start either is null, or else +// points to a block of memory that was allocated using _String_base's +// allocator and whose size is _M_end_of_storage._M_data - _M_start. + +_STLP_BEGIN_NAMESPACE + +_STLP_MOVE_TO_PRIV_NAMESPACE + +#ifndef _STLP_SHORT_STRING_SZ +# define _STLP_SHORT_STRING_SZ 16 +#endif + +template +class _String_base { + typedef _String_base<_Tp, _Alloc> _Self; +protected: + _STLP_FORCE_ALLOCATORS(_Tp, _Alloc) +public: + //dums: Some compiler(MSVC6) require it to be public not simply protected! + enum {_DEFAULT_SIZE = _STLP_SHORT_STRING_SZ}; + //This is needed by the full move framework + typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type; + typedef _STLP_alloc_proxy<_Tp*, _Tp, allocator_type> _AllocProxy; + typedef size_t size_type; +private: +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + union _Buffers { + _Tp* _M_dynamic_buf; + _Tp _M_static_buf[_DEFAULT_SIZE]; + } _M_buffers; +#else + _Tp* _M_start; +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ +protected: +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + bool _M_using_static_buf() const { + return (_M_end_of_storage._M_data == _M_buffers._M_static_buf + _DEFAULT_SIZE); + } + _Tp const* _M_Start() const { + return _M_using_static_buf()?_M_buffers._M_static_buf:_M_buffers._M_dynamic_buf; + } + _Tp* _M_Start() { + return _M_using_static_buf()?_M_buffers._M_static_buf:_M_buffers._M_dynamic_buf; + } +#else + _Tp const* _M_Start() const {return _M_start;} + _Tp* _M_Start() {return _M_start;} +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ + + _Tp* _M_finish; + _AllocProxy _M_end_of_storage; + + _Tp const* _M_Finish() const {return _M_finish;} + _Tp* _M_Finish() {return _M_finish;} + + // Precondition: 0 < __n <= max_size(). + void _M_allocate_block(size_t __n = _DEFAULT_SIZE); + void _M_deallocate_block() { +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + if (!_M_using_static_buf() && (_M_buffers._M_dynamic_buf != 0)) + _M_end_of_storage.deallocate(_M_buffers._M_dynamic_buf, _M_end_of_storage._M_data - _M_buffers._M_dynamic_buf); +#else + if (_M_start != 0) + _M_end_of_storage.deallocate(_M_start, _M_end_of_storage._M_data - _M_start); +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ + } + + size_t max_size() const { + const size_type __string_max_size = size_type(-1) / sizeof(_Tp); + typename allocator_type::size_type __alloc_max_size = _M_end_of_storage.max_size(); + return (min)(__alloc_max_size, __string_max_size) - 1; + } + + _String_base(const allocator_type& __a) +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + : _M_finish(_M_buffers._M_static_buf), _M_end_of_storage(__a, _M_buffers._M_static_buf + _DEFAULT_SIZE) +#else + : _M_start(0), _M_finish(0), _M_end_of_storage(__a, (_Tp*)0) +#endif + {} + + _String_base(const allocator_type& __a, size_t __n) +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + : _M_finish(_M_buffers._M_static_buf), _M_end_of_storage(__a, _M_buffers._M_static_buf + _DEFAULT_SIZE) { +#else + : _M_start(0), _M_finish(0), _M_end_of_storage(__a, (_Tp*)0) { +#endif + _M_allocate_block(__n); + } + +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + void _M_move_src (_Self &src) { + if (src._M_using_static_buf()) { + _M_buffers = src._M_buffers; + _M_finish = _M_buffers._M_static_buf + (src._M_finish - src._M_buffers._M_static_buf); + _M_end_of_storage._M_data = _M_buffers._M_static_buf + _DEFAULT_SIZE; + } + else { + _M_buffers._M_dynamic_buf = src._M_buffers._M_dynamic_buf; + _M_finish = src._M_finish; + _M_end_of_storage._M_data = src._M_end_of_storage._M_data; + src._M_buffers._M_dynamic_buf = 0; + } + } +#endif + + _String_base(__move_source<_Self> src) +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + : _M_end_of_storage(__move_source<_AllocProxy>(src.get()._M_end_of_storage)) { + _M_move_src(src.get()); +#else + : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish), + _M_end_of_storage(__move_source<_AllocProxy>(src.get()._M_end_of_storage)) { + src.get()._M_start = 0; +#endif + } + + ~_String_base() { _M_deallocate_block(); } + + void _M_reset(_Tp *__start, _Tp *__finish, _Tp *__end_of_storage) { +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + _M_buffers._M_dynamic_buf = __start; +#else + _M_start = __start; +#endif + _M_finish = __finish; + _M_end_of_storage._M_data = __end_of_storage; + } + + void _M_destroy_back () { +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + if (!_M_using_static_buf()) +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ + _STLP_STD::_Destroy(_M_finish); + } + + void _M_destroy_range(size_t __from_off = 0, size_t __to_off = 1) { +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + if (!_M_using_static_buf()) + _STLP_STD::_Destroy_Range(_M_buffers._M_dynamic_buf + __from_off, _M_finish + __to_off); +#else + _STLP_STD::_Destroy_Range(_M_start + __from_off, _M_finish + __to_off); +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ + } + + void _M_destroy_ptr_range(_Tp *__f, _Tp *__l) { +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + if (!_M_using_static_buf()) +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ + _STLP_STD::_Destroy_Range(__f, __l); + } + + void _M_Swap(_Self &__s) { +#if defined (_STLP_USE_SHORT_STRING_OPTIM) + if (_M_using_static_buf()) { + if (__s._M_using_static_buf()) { + _STLP_STD::swap(_M_buffers, __s._M_buffers); + _Tp *__tmp = _M_finish; + _M_finish = _M_buffers._M_static_buf + (__s._M_finish - __s._M_buffers._M_static_buf); + __s._M_finish = __s._M_buffers._M_static_buf + (__tmp - _M_buffers._M_static_buf); + //We need to swap _M_end_of_storage for allocators with state: + _M_end_of_storage.swap(__s._M_end_of_storage); + _M_end_of_storage._M_data = _M_buffers._M_static_buf + _DEFAULT_SIZE; + __s._M_end_of_storage._M_data = __s._M_buffers._M_static_buf + _DEFAULT_SIZE; + } else { + __s._M_Swap(*this); + return; + } + } + else if (__s._M_using_static_buf()) { + _Tp *__tmp = _M_buffers._M_dynamic_buf; + _Tp *__tmp_finish = _M_finish; + _Tp *__tmp_end_data = _M_end_of_storage._M_data; + _M_buffers = __s._M_buffers; + //We need to swap _M_end_of_storage for allocators with state: + _M_end_of_storage.swap(__s._M_end_of_storage); + _M_end_of_storage._M_data = _M_buffers._M_static_buf + _DEFAULT_SIZE; + _M_finish = _M_buffers._M_static_buf + (__s._M_finish - __s._M_buffers._M_static_buf); + __s._M_buffers._M_dynamic_buf = __tmp; + __s._M_end_of_storage._M_data = __tmp_end_data; + __s._M_finish = __tmp_finish; + } + else { + _STLP_STD::swap(_M_buffers._M_dynamic_buf, __s._M_buffers._M_dynamic_buf); + _M_end_of_storage.swap(__s._M_end_of_storage); + _STLP_STD::swap(_M_finish, __s._M_finish); + } +#else + _STLP_STD::swap(_M_start, __s._M_start); + _M_end_of_storage.swap(__s._M_end_of_storage); + _STLP_STD::swap(_M_finish, __s._M_finish); +#endif /* _STLP_USE_SHORT_STRING_OPTIM */ + } + + void _STLP_FUNCTION_THROWS _M_throw_length_error() const; + void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const; +}; + +#undef _STLP_SHORT_STRING_SZ + +#if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE_CLASS _String_base >; +# if defined (_STLP_HAS_WCHAR_T) +_STLP_EXPORT_TEMPLATE_CLASS _String_base >; +# endif +#endif /* _STLP_USE_TEMPLATE_EXPORT */ + +_STLP_MOVE_TO_STD_NAMESPACE + +_STLP_END_NAMESPACE + +#endif /* _STLP_STRING_BASE_H */ + +/* + * Local Variables: + * mode:C++ + * End: + */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_fwd.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_fwd.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,61 @@ +/* + * Copyright (c) 1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STRING_FWD_H +#define _STLP_STRING_FWD_H + +#ifndef _STLP_IOSFWD +# include +#endif + +_STLP_BEGIN_NAMESPACE + +# if !defined (_STLP_LIMITED_DEFAULT_TEMPLATES) +template , + class _Alloc = allocator<_CharT> > +class basic_string; +# else +template +class basic_string; +# endif /* _STLP_LIMITED_DEFAULT_TEMPLATES */ + +typedef basic_string, allocator > string; + +# ifdef _STLP_HAS_WCHAR_T +typedef basic_string, allocator > wstring; +# endif + +# ifdef _STLP_OWN_IOSTREAMS +_STLP_DECLSPEC const char* _STLP_CALL +__get_c_string(const string& __str); +# else +template +const char* _STLP_CALL +__get_c_string(const basic_string<_CharT, _Traits, _Alloc>& __str); +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_STRING_FWD_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_hash.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_hash.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STRING_HASH_H +# define _STLP_STRING_HASH_H + +#ifndef _STLP_HASH_FUN_H +# include +#endif + +#ifndef _STLP_STRING_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +_STLP_INLINE_LOOP size_t +__stl_string_hash(const basic_string<_CharT,_Traits,_Alloc>& __s) { + unsigned long __h = 0; + typedef typename basic_string<_CharT,_Traits,_Alloc>::const_pointer const_ptr; + size_t __len = __s.size(); + const _CharT* __data = __s.data(); + for ( size_t __i = 0; __i < __len; ++__i) + __h = 5*__h + __data[__i]; + return size_t(__h); +} + +#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION + +template +struct hash > { + size_t operator()(const basic_string<_CharT,_Traits,_Alloc>& __s) const + { return __stl_string_hash(__s); } +}; + +#else + +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash { + size_t operator()(const string& __s) const + { return __stl_string_hash(__s); } +}; + +# if defined (_STLP_HAS_WCHAR_T) +_STLP_TEMPLATE_NULL struct _STLP_CLASS_DECLSPEC hash { + size_t operator()(const wstring& __s) const + { return __stl_string_hash(__s); } +}; +# endif + +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +_STLP_END_NAMESPACE + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_io.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_io.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,369 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* 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. +* Neither the name of Nokia Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. + +* 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 HOLDER 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. +* +* Description: +* +*/ + +#ifndef _STLP_STRING_IO_C +#define _STLP_STRING_IO_C + +#ifndef _STLP_STRING_IO_H +# include +#endif + +#ifndef _STLP_INTERNAL_CTYPE_H +# include +#endif + +# ifdef _STLP_DEBUG +# define basic_string _Nondebug_string +# endif + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_OWN_IOSTREAMS) +# define _STLP_USING_IO +# else +# define _STLP_USING_IO _STLP_USING_VENDOR_STD +# endif + +#if defined (_STLP_USE_NEW_IOSTREAMS) + +template +bool _STLP_CALL +__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os, + basic_streambuf<_CharT, _Traits>* __buf, + size_t __n) +{ + _CharT __f = __os.fill(); + size_t __i; + bool __ok = true; + + for (__i = 0; __i < __n; ++__i) + __ok = __ok && !_Traits::eq_int_type(__buf->sputc(__f), _Traits::eof()); + return __ok; +} + +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT,_Traits,_Alloc>& __s) +{ + + _STLP_USING_IO + typedef basic_ostream<_CharT, _Traits> __ostream; + typename __ostream::sentry __sentry(__os); + bool __ok = false; + + if (__sentry) { + __ok = true; + size_t __n = __s.size(); + size_t __pad_len = 0; + const bool __left = (__os.flags() & __ostream::left) != 0; + const size_t __w = __os.width(0); + basic_streambuf<_CharT, _Traits>* __buf = __os.rdbuf(); + + if (__n < __w) { + __pad_len = __w - __n; + } + + if (!__left) + __ok = __stlp_string_fill(__os, __buf, __pad_len); + + __ok = __ok && (__buf->sputn(__s.data(), streamsize(__n)) == streamsize(__n)); + + if (__left) + __ok = __ok && __stlp_string_fill(__os, __buf, __pad_len); + } + + if (!__ok) + __os.setstate(__ostream::failbit); + + return __os; +} + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT,_Traits, _Alloc>& __s) +{ + _STLP_USING_IO + typedef basic_istream<_CharT, _Traits> __istream; + typename __istream::sentry __sentry(__is); + + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); + typedef ctype<_CharT> _C_type; + +#ifdef _STLP_OWN_IOSTREAMS + // const _C_type& _Ctype = use_facet<_C_type>(__loc); + const _C_type& _Ctype = *(const _C_type*)__is._M_ctype_facet(); +#else +# if defined (_STLP_MSVC) && (_STLP_MSVC <= 1200 ) || defined (__ICL) + const locale& __loc = __is.getloc(); + const _C_type& _Ctype = use_facet(__loc , ( _C_type * ) 0, true); +# elif defined (__SUNPRO_CC) + const locale& __loc = __is.getloc(); + const _C_type& _Ctype = use_facet(__loc , ( _C_type * ) 0); +# else + const locale& __loc = __is.getloc(); + const _C_type& _Ctype = use_facet<_C_type>(__loc); +# endif +#endif + __s.clear(); + size_t __n = __is.width(0); + if (__n == 0) + __n = __STATIC_CAST(size_t,-1); + else + __s.reserve(__n); + + + while (__n-- > 0) { + typename _Traits::int_type __c1 = __buf->sbumpc(); + if (_Traits::eq_int_type(__c1, _Traits::eof())) { + __is.setstate(__istream::eofbit); + break; + } + else { + _CharT __c = _Traits::to_char_type(__c1); + + if (_Ctype.is(_C_type::space, __c)) { + if (_Traits::eq_int_type(__buf->sputbackc(__c), _Traits::eof())) + __is.setstate(__istream::failbit); + break; + } +#ifdef __SYMBIAN32__ + else if (__c == '\b') { + __s.pop_back(); + } +#endif + else + __s.push_back(__c); + } + } + + // If we have read no characters, then set failbit. + if (__s.size() == 0) + __is.setstate(__istream::failbit); + } + else + __is.setstate(__istream::failbit); + + return __is; +} + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT,_Traits,_Alloc>& __s, + _CharT __delim) +{ + _STLP_USING_IO + typedef basic_istream<_CharT, _Traits> __istream; + size_t __nread = 0; + typename basic_istream<_CharT, _Traits>::sentry __sentry(__is, true); + if (__sentry) { + basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf(); + __s.clear(); + + while (__nread < __s.max_size()) { + int __c1 = __buf->sbumpc(); + if (_Traits::eq_int_type(__c1, _Traits::eof())) { + __is.setstate(__istream::eofbit); + break; + } + else { + ++__nread; + _CharT __c = _Traits::to_char_type(__c1); + if (!_Traits::eq(__c, __delim)) + __s.push_back(__c); + else + break; // Character is extracted but not appended. + } + } + } + if (__nread == 0 || __nread >= __s.max_size()) + __is.setstate(__istream::failbit); + + return __is; +} + +#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) + +// (reg) For Watcom IO, _OSTREAM_DLL tells if ostream class is in .exe or in .dll + +template +_OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, + const basic_string<_CharT,_Traits,_Alloc>& __s) +{ + _STLP_USING_IO + streambuf* __buf = __os.rdbuf(); + if (__buf) { + size_t __n = __s.size(); + size_t __pad_len = 0; + const bool __left = (__os.flags() & ios::left) !=0; + const size_t __w = __os.width(); + + if (__n < __w) { + __pad_len = __w - __n; + } + + if (!__left) + __stlp_string_fill(__os, __buf, __pad_len); + + const size_t __nwritten = __buf->sputn(__s.data(), __n); + + if (__left) + __stlp_string_fill(__os, __buf, __pad_len); + + if (__nwritten != __n) + __os.clear(__os.rdstate() | ios::failbit); + + __os.width(0); + } + else + __os.clear(__os.rdstate() | ios::badbit); + + return __os; +} + +template +_ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s) +{ + _STLP_USING_IO + if (!__is) + return __is; + + streambuf* __buf = __is.rdbuf(); + if (__buf) { + + if (__is.flags() & ios::skipws) { + // _CharT __c; + int __c; + do { + __c = __buf->sbumpc(); + } + while (__c != EOF && isspace((unsigned char)__c)); + + if (__c == EOF) { + __is.clear(__is.rdstate() | ios::eofbit | ios::failbit); + } + else { + if (__buf->sputbackc(__c) == EOF) + __is.clear(__is.rdstate() | ios::failbit); + } + } + + // If we arrive at end of file (or fail for some other reason) while + // still discarding whitespace, then we don't try to read the string. + if (__is) { + __s.clear(); + + size_t __n = __is.width(); + if (__n == 0) + __n = __STATIC_CAST(size_t,-1); + else + __s.reserve(__n); + + while (__n-- > 0) { + int __c1 = __buf->sbumpc(); + if (__c1 == EOF) { + __is.clear(__is.rdstate() | ios::eofbit); + break; + } + else { + _CharT __c = _Traits::to_char_type(__c1); + + if (isspace((unsigned char) __c)) { + if (__buf->sputbackc(__c) == EOF) + __is.clear(__is.rdstate() | ios::failbit); + break; + } + else + __s.push_back(__c); + } + } + + // If we have read no characters, then set failbit. + if (__s.size() == 0) + __is.clear(__is.rdstate() | ios::failbit); + } + + __is.width(0); + } + else // We have no streambuf. + __is.clear(__is.rdstate() | ios::badbit); + + return __is; +} + +template +_ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is, + basic_string<_CharT,_Traits,_Alloc>& __s, + _CharT __delim) +{ + _STLP_USING_IO + streambuf* __buf = __is.rdbuf(); + if (__buf) { + size_t __nread = 0; + if (__is) { + __s.clear(); + + while (__nread < __s.max_size()) { + int __c1 = __buf->sbumpc(); + if (__c1 == EOF) { + __is.clear(__is.rdstate() | ios::eofbit); + break; + } + else { + ++__nread; + _CharT __c = _Traits::to_char_type(__c1); + if (!_Traits::eq(__c, __delim)) + __s.push_back(__c); + else + break; // Character is extracted but not appended. + } + } + } + + if (__nread == 0 || __nread >= __s.max_size()) + __is.clear(__is.rdstate() | ios::failbit); + } + else + __is.clear(__is.rdstate() | ios::badbit); + + return __is; +} + +# endif /* _STLP_NEW_IOSTREAMS */ + +_STLP_END_NAMESPACE + +// # undef _STLP_USING_IO +# undef basic_string + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_io.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_io.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STRING_IO_H +#define _STLP_STRING_IO_H + +// this is for link-time instantiation +#if !defined ( _STLP_STRING ) +# include +# endif + +//#ifndef _STLP_LOCALE +//# include +//#endif + +# ifdef _STLP_DEBUG +# define basic_string _Nondebug_string +# endif + +// I/O. +_STLP_BEGIN_NAMESPACE + +#if defined (_STLP_USE_NEW_IOSTREAMS) + +template +basic_ostream<_CharT, _Traits>& _STLP_CALL +operator<<(basic_ostream<_CharT, _Traits>& __os, + const basic_string<_CharT,_Traits,_Alloc>& __s); + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +operator>>(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT,_Traits,_Alloc>& __s); + +template +basic_istream<_CharT, _Traits>& _STLP_CALL +getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT,_Traits,_Alloc>& __s, + _CharT __delim); + +# if !(defined (__BORLANDC__) && ! defined (_STLP_USE_OWN_NAMESPACE)) + +template +inline basic_istream<_CharT, _Traits>& _STLP_CALL +getline(basic_istream<_CharT, _Traits>& __is, + basic_string<_CharT,_Traits,_Alloc>& __s) +{ + return getline(__is, __s, __is.widen('\n')); +} +# endif + +template +bool _STLP_CALL +__stlp_string_fill(basic_ostream<_CharT, _Traits>& __os, + basic_streambuf<_CharT, _Traits>* __buf, + size_t __n); +#elif ! defined ( _STLP_USE_NO_IOSTREAMS ) + +// (reg) For Watcom IO, this tells if ostream class is in .exe or in .dll +# ifdef _WPRTLINK +typedef _WPRTLINK ostream _OSTREAM_DLL; +typedef _WPRTLINK istream _ISTREAM_DLL; +#else +typedef ostream _OSTREAM_DLL; +typedef istream _ISTREAM_DLL; +#endif + +template +_OSTREAM_DLL& _STLP_CALL operator<<(_OSTREAM_DLL& __os, + const basic_string<_CharT,_Traits,_Alloc>& __s); + +template +_ISTREAM_DLL& _STLP_CALL operator>>(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s); + +template +_ISTREAM_DLL& _STLP_CALL getline(_ISTREAM_DLL& __is, + basic_string<_CharT,_Traits,_Alloc>& __s, + _CharT __delim); + + +template +inline _ISTREAM_DLL& _STLP_CALL +getline(_ISTREAM_DLL& __is, basic_string<_CharT,_Traits,_Alloc>& __s) +{ + return getline(__is, __s, '\n'); +} + +inline void _STLP_CALL +__stlp_string_fill(_OSTREAM_DLL& __os, streambuf* __buf, size_t __n) +{ + char __f = __os.fill(); + size_t __i; + + for (__i = 0; __i < __n; ++__i) __buf->sputc(__f); +} + +#endif /* _STLP_USE_NEW_IOSTREAMS */ + +_STLP_END_NAMESPACE + +# undef basic_string + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_STRING_IO_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_npos.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_npos.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,27 @@ +/* + * Copyright (c) 2005 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + +/* This header contains npos definition used in basic_string and rope + * implementation. It do not have to be guarded as files including it + * are already guarded and it has sometimes to be included several times. + */ + +#if defined (_STLP_STATIC_CONST_INIT_BUG) + enum { npos = -1 }; +#elif defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96) + // inline initializer conflicts with 'extern template' + static const size_t npos; +#else + static const size_t npos = ~(size_t)0; +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_string_operators.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_string_operators.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,602 @@ +/* + * Copyright (c) 2003 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STRING_OPERATORS_H +#define _STLP_STRING_OPERATORS_H + +_STLP_BEGIN_NAMESPACE + +#if !defined (_STLP_USE_TEMPLATE_EXPRESSION) + +# if defined (__GNUC__) || defined (__MLCCPP__) +# define _STLP_INIT_AMBIGUITY 1 +# endif + +template +inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + typedef basic_string<_CharT,_Traits,_Alloc> _Str; + typedef typename _Str::_Reserve_t _Reserve_t; +# if defined (_STLP_INIT_AMBIGUITY) + // gcc counts this as a function + _Str __result = _Str(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator()); +# else + _Str __result(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator()); +# endif + __result.append(__s); + __result.append(__y); + return __result; +} + +template +inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL +operator+(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + typedef basic_string<_CharT,_Traits,_Alloc> _Str; + typedef typename _Str::_Reserve_t _Reserve_t; + const size_t __n = _Traits::length(__s); +# if defined (_STLP_INIT_AMBIGUITY) + _Str __result = _Str(_Reserve_t(), __n + __y.size(), __y.get_allocator()); +# else + _Str __result(_Reserve_t(), __n + __y.size(), __y.get_allocator()); +# endif + __result.append(__s, __s + __n); + __result.append(__y); + return __result; +} + +template +inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL +operator+(_CharT __c, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + typedef basic_string<_CharT,_Traits,_Alloc> _Str; + typedef typename _Str::_Reserve_t _Reserve_t; +# if defined (_STLP_INIT_AMBIGUITY) + _Str __result = _Str(_Reserve_t(), 1 + __y.size(), __y.get_allocator()); +# else + _Str __result(_Reserve_t(), 1 + __y.size(), __y.get_allocator()); +# endif + __result.push_back(__c); + __result.append(__y); + return __result; +} + +template +inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + typedef basic_string<_CharT,_Traits,_Alloc> _Str; + typedef typename _Str::_Reserve_t _Reserve_t; + const size_t __n = _Traits::length(__s); +# if defined (_STLP_INIT_AMBIGUITY) + _Str __result = _Str(_Reserve_t(), __x.size() + __n, __x.get_allocator()); +# else + _Str __result(_Reserve_t(), __x.size() + __n, __x.get_allocator()); +# endif + __result.append(__x); + __result.append(__s, __s + __n); + return __result; +} + +template +inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT __c) { + typedef basic_string<_CharT,_Traits,_Alloc> _Str; + typedef typename _Str::_Reserve_t _Reserve_t; +# if defined (_STLP_INIT_AMBIGUITY) + _Str __result = _Str(_Reserve_t(), __x.size() + 1, __x.get_allocator()); +# else + _Str __result(_Reserve_t(), __x.size() + 1, __x.get_allocator()); +# endif + __result.append(__x); + __result.push_back(__c); + return __result; +} + +# undef _STLP_INIT_AMBIGUITY + +#else /* _STLP_USE_TEMPLATE_EXPRESSION */ + +// addition with basic_string +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs) { + typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right> __root_type; + __root_type __root(__rhs, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__lhs.get_allocator())); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + __root_type, + _STLP_PRIV __on_right>(__lhs, __root); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs, + const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __rhs) { + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __on_right>(__lhs, __rhs); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __on_left> _STLP_CALL +operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __lhs, + const basic_string<_CharT,_Traits,_Alloc>& __rhs) { + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __on_left>(__lhs, __rhs); +} + +// addition with C string +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + const size_t __n = _Traits::length(__s); + typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right> __root_type; + __root_type __root(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + __root_type, _STLP_PRIV __on_right>(__x, __root); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + const size_t __n = _Traits::length(__s); + typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right> __root_type; + __root_type __root(__y, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__y.get_allocator())); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, + __root_type, + _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __root); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __on_left> _STLP_CALL +operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, + const _CharT* __s) { + const size_t __n = _Traits::length(__s); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __on_left>(__x, _STLP_PRIV __cstr_wrapper<_CharT>(__s, __n)); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __y) { + const size_t __n = _Traits::length(__s); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __y); +} + +// addition with char +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __char_wrapper<_CharT>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, const _CharT __c) { + typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right> __root_type; + __root_type __root(__c, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + __root_type, _STLP_PRIV __on_right>(__x, __root); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __char_wrapper<_CharT>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const _CharT __c, const basic_string<_CharT,_Traits,_Alloc>& __x) { + typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, + _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, + _STLP_PRIV __on_right> __root_type; + __root_type __root(__x, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, + __root_type, _STLP_PRIV __on_right>(__c, __root); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __char_wrapper<_CharT>, + _STLP_PRIV __on_left> _STLP_CALL +operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, const _CharT __c) { + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __char_wrapper<_CharT>, _STLP_PRIV __on_left>(__x, __c); +} + +template +inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __on_right> _STLP_CALL +operator+(const _CharT __c, const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x) { + return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, + _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, + _STLP_PRIV __on_right>(__c, __x); +} + +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +// Operator== and operator!= + +template +inline bool _STLP_CALL +operator==(const basic_string<_CharT,_Traits,_Alloc>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; +} + +template +inline bool _STLP_CALL +operator==(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + + +template +inline bool _STLP_CALL +operator==(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0; +} + +template +inline bool _STLP_CALL +operator==(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0; +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator==(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0; +} + +template +inline bool _STLP_CALL +operator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0; +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +// Operator< (and also >, <=, and >=). + +template +inline bool _STLP_CALL +operator<(const basic_string<_CharT,_Traits,_Alloc>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()) < 0; +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()) < 0; +} + +template +inline bool _STLP_CALL +operator<(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), + __y.begin(), __y.end()) < 0; +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +template +inline bool _STLP_CALL +operator<(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, + __y.begin(), __y.end()) < 0; +} + +template +inline bool _STLP_CALL +operator<(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), + __s, __s + __n) < 0; +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator<(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, + __y.begin(), __y.end()) < 0; +} + +template +inline bool _STLP_CALL +operator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + size_t __n = _Traits::length(__s); + return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), + __s, __s + __n) < 0; +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) + +/* Only defined if _STLP_USE_SEPARATE_RELOPS_NAMESPACE is defined otherwise + * it might introduce ambiguity with pure template relational operators + * from rel_ops namespace. + */ +template +inline bool _STLP_CALL +operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) +{ return !(__x == __y); } + +template +inline bool _STLP_CALL +operator>(const basic_string<_CharT,_Traits,_Alloc>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) +{ return __y < __x; } + +template +inline bool _STLP_CALL +operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) +{ return !(__y < __x); } + +template +inline bool _STLP_CALL +operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) +{ return !(__x < __y); } + +# if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const basic_string<_CharT,_Traits,_Alloc>& __y) +{ return !(__x==__y); } + +template +inline bool _STLP_CALL +operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) +{ return !(__x==__y); } +# endif + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ + +template +inline bool _STLP_CALL +operator!=(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__s == __y); +} + +template +inline bool _STLP_CALL +operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__x == __s); +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator!=(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__s == __y); +} + +template +inline bool _STLP_CALL +operator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__x == __s); +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +template +inline bool _STLP_CALL +operator>(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return __y < __s; +} + +template +inline bool _STLP_CALL +operator>(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return __s < __x; +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator>(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return __y < __s; +} + +template +inline bool _STLP_CALL +operator>(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return __s < __x; +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +template +inline bool _STLP_CALL +operator<=(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__y < __s); +} + +template +inline bool _STLP_CALL +operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__s < __x); +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator<=(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__y < __s); +} + +template +inline bool _STLP_CALL +operator<=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__s < __x); +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +template +inline bool _STLP_CALL +operator>=(const _CharT* __s, + const basic_string<_CharT,_Traits,_Alloc>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__s < __y); +} + +template +inline bool _STLP_CALL +operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__x < __s); +} + +#if defined (_STLP_USE_TEMPLATE_EXPRESSION) +template +inline bool _STLP_CALL +operator>=(const _CharT* __s, + const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__s < __y); +} + +template +inline bool _STLP_CALL +operator>=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, + const _CharT* __s) { + _STLP_FIX_LITERAL_BUG(__s) + return !(__x < __s); +} +#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_STRING_OPERATORS_H */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_strstream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_strstream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,213 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* 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. +* Neither the name of Nokia Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. + +* 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 HOLDER 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. +* +* Description: +* +*/ + +#ifndef _STLP_INTERNAL_STREAMBUF +#include +#endif +#ifndef _STLP_ISTREAM +#include // Includes , , +#endif +#ifndef _STLP_STRING_H +#include +#endif + +_STLP_BEGIN_NAMESPACE + +#ifndef _STLP_USE_NAMESPACES +# define strstream _STLP_strstream +# define ostrstream _STLP_ostrstream +# define istrstream _STLP_istrstream +# define strstreambuf _STLP_strstreambuf +#endif + +//---------------------------------------------------------------------- +// Class strstreambuf, a streambuf class that manages an array of char. +// Note that this class is not a template. +#ifdef __SYMBIAN32__ +class strstreambuf : public basic_streambuf > +#else +class _STLP_CLASS_DECLSPEC strstreambuf : public basic_streambuf > +#endif +{ +public: // Types. + typedef char_traits _Traits; + typedef basic_streambuf > _Base; + typedef void* (*__alloc_fn)(size_t); + typedef void (*__free_fn)(void*); +public: // Constructor, destructor + + explicit strstreambuf(streamsize _Initial_capacity = 0); + + _STLP_DECLSPEC strstreambuf(__alloc_fn, __free_fn); + + _STLP_DECLSPEC strstreambuf(char* __get, streamsize __n, char* __put = 0); + _STLP_DECLSPEC strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0); + _STLP_DECLSPEC strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0); + + _STLP_DECLSPEC strstreambuf(const char* __get, streamsize __n); + _STLP_DECLSPEC strstreambuf(const signed char* __get, streamsize __n); + _STLP_DECLSPEC strstreambuf(const unsigned char* __get, streamsize __n); + + virtual ~strstreambuf(); + +public: // strstreambuf operations. + _STLP_DECLSPEC void freeze(bool = true); + _STLP_DECLSPEC char* str(); + _STLP_DECLSPEC int pcount() const; + +protected: // Overridden virtual member functions. + virtual int_type overflow(int_type __c = _Traits::eof()); + virtual int_type pbackfail(int_type __c = _Traits::eof()); + virtual int_type underflow(); + virtual _Base* setbuf(char* __buf, streamsize __n); + virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir, + ios_base::openmode __mode + = ios_base::in | ios_base::out); + virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode + = ios_base::in | ios_base::out); + +private: // Helper functions. + // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun. + char* _M_alloc(size_t); + inline void _M_free(char*); + + // Helper function used in constructors. + void _M_setup(char* __get, char* __put, streamsize __n); +private: // Data members. + __alloc_fn _M_alloc_fun; + __free_fn _M_free_fun; + bool _M_dynamic : 1; + bool _M_frozen : 1; + bool _M_constant : 1; +#ifdef __SYMBIAN32__ + char* _pfrozenendsave; + char* _pgetfrozenendsave; +#endif +}; + +inline strstreambuf::~strstreambuf() +{ +#ifdef __SYMBIAN32__ + if (_M_dynamic && !_M_frozen) + { + if (_M_free_fun) + _M_free_fun(eback()); + else + _M_free(eback()); + } +#else + if (_M_dynamic && !_M_frozen) + _M_free(eback()); +#endif +} + +inline void strstreambuf::_M_free(char* p) +{ + if (p) + if (_M_free_fun) + _M_free_fun(p); + else + delete[] p; +} + + +//---------------------------------------------------------------------- +// Class istrstream, an istream that manages a strstreambuf. + +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS (istrstream) : public basic_istream > +#else +class _STLP_CLASS_DECLSPEC istrstream : public basic_istream > +#endif +{ +public: + _STLP_DECLSPEC explicit istrstream(char*); + _STLP_DECLSPEC explicit istrstream(const char*); + _STLP_DECLSPEC istrstream(char* , streamsize); + _STLP_DECLSPEC istrstream(const char*, streamsize); + virtual ~istrstream(); + + _STLP_DECLSPEC strstreambuf* rdbuf() const; + _STLP_DECLSPEC char* str(); + +private: + strstreambuf _M_buf; +}; + +//---------------------------------------------------------------------- +// Class ostrstream +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS (ostrstream) : public basic_ostream > +#else +class _STLP_CLASS_DECLSPEC ostrstream : public basic_ostream > +#endif +{ +public: + _STLP_DECLSPEC ostrstream(); + _STLP_DECLSPEC ostrstream(char*, int, ios_base::openmode = ios_base::out); + virtual ~ostrstream(); + + _STLP_DECLSPEC strstreambuf* rdbuf() const; + _STLP_DECLSPEC void freeze(bool = true); + _STLP_DECLSPEC char* str(); + _STLP_DECLSPEC int pcount() const; + +private: + strstreambuf _M_buf; +}; + +//---------------------------------------------------------------------- +// Class strstream +#ifdef __SYMBIAN32__ +NONSHARABLE_CLASS (strstream) : public basic_iostream > +#else +class _STLP_CLASS_DECLSPEC strstream : public basic_iostream > +#endif +{ +public: + typedef char char_type; + typedef char_traits::int_type int_type; + typedef char_traits::pos_type pos_type; + typedef char_traits::off_type off_type; + + _STLP_DECLSPEC strstream(); + _STLP_DECLSPEC strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out); + virtual ~strstream(); + + _STLP_DECLSPEC strstreambuf* rdbuf() const; + _STLP_DECLSPEC void freeze(bool = true); + _STLP_DECLSPEC int pcount() const; + _STLP_DECLSPEC char* str(); + +private: + strstreambuf _M_buf; +}; + +_STLP_END_NAMESPACE diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_tempbuf.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_tempbuf.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_TEMPBUF_C +#define _STLP_TEMPBUF_C + +#ifndef _STLP_INTERNAL_TEMPBUF_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +pair<_Tp*, ptrdiff_t> _STLP_CALL +__get_temporary_buffer(ptrdiff_t __len, _Tp*) +{ + if (__len > ptrdiff_t(INT_MAX / sizeof(_Tp))) + __len = INT_MAX / sizeof(_Tp); + + while (__len > 0) { + _Tp* __tmp = (_Tp*) malloc((size_t)__len * sizeof(_Tp)); + if (__tmp != 0) + return pair<_Tp*, ptrdiff_t>(__tmp, __len); + __len /= 2; + } + + return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0); +} +_STLP_END_NAMESPACE + +#endif /* _STLP_TEMPBUF_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_tempbuf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_tempbuf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,165 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_TEMPBUF_H +#define _STLP_INTERNAL_TEMPBUF_H + +# ifndef _STLP_CLIMITS +# include +# endif +# ifndef _STLP_CSTDLIB +# include +# endif +# ifndef _STLP_INTERNAL_UNINITIALIZED_H +# include +# endif + +_STLP_BEGIN_NAMESPACE + +template +pair<_Tp*, ptrdiff_t> _STLP_CALL +__get_temporary_buffer(ptrdiff_t __len, _Tp*); + +#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS + +template +inline pair<_Tp*, ptrdiff_t> _STLP_CALL get_temporary_buffer(ptrdiff_t __len) { + return __get_temporary_buffer(__len, (_Tp*) 0); +} + +# if ! defined(_STLP_NO_EXTENSIONS) +// This overload is not required by the standard; it is an extension. +// It is supported for backward compatibility with the HP STL, and +// because not all compilers support the language feature (explicit +// function template arguments) that is required for the standard +// version of get_temporary_buffer. +template +inline pair<_Tp*, ptrdiff_t> _STLP_CALL +get_temporary_buffer(ptrdiff_t __len, _Tp*) { + return __get_temporary_buffer(__len, (_Tp*) 0); +} +# endif +#endif + +template +inline void _STLP_CALL return_temporary_buffer(_Tp* __p) { +// SunPro brain damage + free((char*)__p); +} + +template +class _Temporary_buffer { +private: + ptrdiff_t _M_original_len; + ptrdiff_t _M_len; + _Tp* _M_buffer; + + void _M_allocate_buffer() { + _M_original_len = _M_len; + _M_buffer = 0; + + if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp))) + _M_len = INT_MAX / sizeof(_Tp); + + while (_M_len > 0) { + _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp)); + if (_M_buffer) + break; + _M_len /= 2; + } + } + + void _M_initialize_buffer(const _Tp&, const __true_type&) {} + void _M_initialize_buffer(const _Tp& val, const __false_type&) { + uninitialized_fill_n(_M_buffer, _M_len, val); + } + +public: + ptrdiff_t size() const { return _M_len; } + ptrdiff_t requested_size() const { return _M_original_len; } + _Tp* begin() { return _M_buffer; } + _Tp* end() { return _M_buffer + _M_len; } + + _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) { + // Workaround for a __type_traits bug in the pre-7.3 compiler. +# if defined(__sgi) && !defined(__GNUC__) && _COMPILER_VERSION < 730 + typedef typename __type_traits<_Tp>::is_POD_type _Trivial; +# else + typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Trivial; +# endif + _STLP_TRY { + _M_len = distance(__first, __last); + _M_allocate_buffer(); + if (_M_len > 0) + _M_initialize_buffer(*__first, _Trivial()); + } + _STLP_UNWIND(free(_M_buffer); _M_buffer = 0; _M_len = 0); + } + + ~_Temporary_buffer() { + _STLP_STD::_Destroy(_M_buffer, _M_buffer + _M_len); + free(_M_buffer); + } + +private: + // Disable copy constructor and assignment operator. + _Temporary_buffer(const _Temporary_buffer<_ForwardIterator, _Tp>&) {} + void operator=(const _Temporary_buffer<_ForwardIterator, _Tp>&) {} +}; + +# ifndef _STLP_NO_EXTENSIONS + +// Class temporary_buffer is not part of the standard. It is an extension. + +template ::value_type +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + > +struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp> +{ + temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) + : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {} + ~temporary_buffer() {} +}; + +# endif /* _STLP_NO_EXTENSIONS */ + +_STLP_END_NAMESPACE + +# ifndef _STLP_LINK_TIME_INSTANTIATION +# include +# endif + +#endif /* _STLP_INTERNAL_TEMPBUF_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_threads.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_threads.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,172 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_THREADS_C +#define _STLP_THREADS_C + +#ifndef _STLP_INTERNAL_THREADS_H +# include +#endif + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +# if defined(_STLP_SGI_THREADS) +# include +# elif defined (_STLP_UNIX) +# include +# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) +using _STLP_VENDOR_CSTD::time_t; +# endif +# include +# endif + +_STLP_BEGIN_NAMESPACE + +# if (_STLP_STATIC_TEMPLATE_DATA > 0) + +# ifdef _STLP_THREADS +# if !defined(_STLP_ATOMIC_EXCHANGE) && (defined(_STLP_PTHREADS) || defined(_STLP_UITHREADS) || defined(_STLP_OS2THREADS) || defined(_STLP_USE_PTHREAD_SPINLOCK)) +template +_STLP_STATIC_MUTEX +_Swap_lock_struct<__dummy>::_S_swap_lock _STLP_MUTEX_INITIALIZER; +# endif +# endif //_STLP_THREADS + +# ifndef _STLP_USE_PTHREAD_SPINLOCK +template +unsigned _STLP_mutex_spin<__inst>::__max = _STLP_mutex_spin<__inst>::__low_max; + +template +unsigned _STLP_mutex_spin<__inst>::__last = 0; +# endif // _STLP_USE_PTHREAD_SPINLOCK + +# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +# if defined(_STLP_PTHREADS) || defined(_STLP_UITHREADS) || defined(_STLP_OS2THREADS) +__DECLARE_INSTANCE(_STLP_STATIC_MUTEX, _Swap_lock_struct<0>::_S_swap_lock, + _STLP_MUTEX_INITIALIZER ); +# endif /* _STLP_PTHREADS */ + +# ifndef _STLP_USE_PTHREAD_SPINLOCK +__DECLARE_INSTANCE(unsigned, _STLP_mutex_spin<0>::__max, =30); +__DECLARE_INSTANCE(unsigned, _STLP_mutex_spin<0>::__last, =0); +# endif // _STLP_USE_PTHREAD_SPINLOCK + +# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +#ifndef _STLP_USE_PTHREAD_SPINLOCK + +#ifdef _STLP_SPARC_SOLARIS_THREADS +// underground function in libc.so; we do not want dependance on librt +extern "C" int __nanosleep(const struct timespec*, struct timespec*); +# define _STLP_NANOSLEEP __nanosleep +#else +# define _STLP_NANOSLEEP nanosleep +#endif + +template +void _STLP_CALL +_STLP_mutex_spin<__inst>::_S_nsec_sleep(int __log_nsec) { +# if defined(_STLP_WIN32THREADS) + if (__log_nsec <= 20) { + // Note from boost (www.boost.org): + // Changed to Sleep(1) from Sleep(0). + // According to MSDN, Sleep(0) will never yield + // to a lower-priority thread, whereas Sleep(1) + // will. Performance seems not to be affected. + Sleep(1); + } else { + Sleep(1 << (__log_nsec - 20)); + } +# elif defined(_STLP_OS2THREADS) + if (__log_nsec <= 20) { + DosSleep(0); + } else { + DosSleep(1 << (__log_nsec - 20)); + } +# elif defined (_STLP_UNIX) + timespec __ts; + /* Max sleep is 2**27nsec ~ 60msec */ + __ts.tv_sec = 0; + __ts.tv_nsec = 1 << __log_nsec; + _STLP_NANOSLEEP(&__ts, 0); +# endif + } + + +template +void _STLP_CALL +_STLP_mutex_spin<__inst>::_M_do_lock(volatile __stl_atomic_t* __lock) +{ +#if defined(_STLP_ATOMIC_EXCHANGE) + if (_Atomic_swap(__lock, 1)) { + unsigned __my_spin_max = _STLP_mutex_spin<0>::__max; + unsigned __my_last_spins = _STLP_mutex_spin<0>::__last; + volatile unsigned __junk = 17; // Value doesn't matter. + unsigned __i; + + for (__i = 0; __i < __my_spin_max; ++__i) { + if (__i < __my_last_spins/2 || *__lock) { + __junk *= __junk; __junk *= __junk; + __junk *= __junk; __junk *= __junk; + } else { + if (!_Atomic_swap(__lock, 1)) { + // got it! + // Spinning worked. Thus we're probably not being scheduled + // against the other process with which we were contending. + // Thus it makes sense to spin longer the next time. + _STLP_mutex_spin<0>::__last = __i; + _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__high_max; + return; + } + } + } + + // We are probably being scheduled against the other process. Sleep. + _STLP_mutex_spin<0>::__max = _STLP_mutex_spin<0>::__low_max; + + for (__i = 0 ;; ++__i) { + int __log_nsec = __i + 6; + + if (__log_nsec > 27) __log_nsec = 27; + if (!_Atomic_swap(__lock, 1)) { + break; + } + _S_nsec_sleep(__log_nsec); + } + + } /* first _Atomic_swap */ +# endif +} +#endif // _STLP_USE_PTHREAD_SPINLOCK + +_STLP_END_NAMESPACE + +# endif /* BUILDING_STLPORT */ +#endif /* _STLP_THREADS_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_threads.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_threads.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,666 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. +// Stl_config.h should be included before this file. + + +#ifndef _STLP_INTERNAL_THREADS_H +#define _STLP_INTERNAL_THREADS_H + +// Supported threading models are native SGI, pthreads, uithreads +// (similar to pthreads, but based on an earlier draft of the Posix +// threads standard), and Win32 threads. Uithread support by Jochen +// Schlick, 1999, and Solaris threads generalized to them. + +#ifndef _STLP_CONFIG_H +#include +#endif + +# if ! defined (_STLP_CSTDDEF) +# include +# endif + +# if ! defined (_STLP_CSTDLIB) +# include +# endif + +// On SUN and Mac OS X gcc, zero-initialization works just fine... +# if defined (__sun) || ( defined(__GNUC__) && defined(__APPLE__) ) +# define _STLP_MUTEX_INITIALIZER +# endif + +# if defined (_STLP_WIN32) || defined (__sgi) || defined (_STLP_SPARC_SOLARIS_THREADS) + typedef long __stl_atomic_t; +# else +# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) +// using _STLP_VENDOR_CSTD::size_t; +using namespace _STLP_VENDOR_CSTD; +# endif + typedef size_t __stl_atomic_t; +#endif + +# if defined(_STLP_SGI_THREADS) +# include +// Hack for SGI o32 compilers. +#if !defined(__add_and_fetch) && \ + (__mips < 3 || !(defined (_ABIN32) || defined(_ABI64))) +# define __add_and_fetch(__l,__v) add_then_test((unsigned long*)__l,__v) +# define __test_and_set(__l,__v) test_and_set(__l,__v) +#endif /* o32 */ + +# if __mips < 3 || !(defined (_ABIN32) || defined(_ABI64)) +# define _STLP_ATOMIC_EXCHANGE(__p, __q) test_and_set(__p, __q) +# else +# define _STLP_ATOMIC_EXCHANGE(__p, __q) __test_and_set((unsigned long*)__p, (unsigned long)__q) +# endif + +# define _STLP_ATOMIC_INCREMENT(__x) __add_and_fetch(__x, 1) +# define _STLP_ATOMIC_DECREMENT(__x) __add_and_fetch(__x, (size_t) -1) + +# elif defined (__GNUC__) && defined (__i386__) && defined (__unix__) && defined (_STLP_USE_INLINE_X86_SPINLOCK) + +// gcc on i386 linux, freebsd, etc. + +// This enables the memory caching on x86 linux. It is critical for SMP +// without it the performace is DISMAL! +static inline unsigned long __xchg(volatile __stl_atomic_t* target, int source) +{ + + // The target is refernce in memory rather than the register + // because making a copy of it from memory to the register and + // back again would ruin the atomic nature of the call. + // the source does not need to be delt with atomicly so it can + // be copied about as needed. + // + // The casting of the source is used to prevent gcc from optimizing + // in such a way that breaks the atomic nature of this call. + // + __asm__ __volatile__("xchgl %1,%0" + :"=m" (*(volatile long *) target), "=r" (source) + :"m" (*(volatile long *) target), "r" (source) ); + return source; + + // The assembly above does the following atomicly: + // int temp=source; + // source=(int)(*target); + // (int)(*target)=temp; + // return source +} + +static inline void __inc_and_fetch(volatile __stl_atomic_t* __x) +{ + // Referenced in memory rather than register to preserve the atomic nature. + // + __asm__ __volatile__( + "lock; incl %0" + :"=m" (*__x) + :"m" (*__x) ); + + // The assembly above does the following atomicly: + // ++(int)(*__x); + +} +static inline void __dec_and_fetch(volatile __stl_atomic_t* __x) +{ + // Referenced in memory rather than register to preserve the atomic nature. + // + __asm__ __volatile__( + "lock; decl %0" + :"=m" (*__x) + :"m" (*__x) ); + + // The assembly above does the following atomicly: + // --(int)(*__x); +} + +# define _STLP_ATOMIC_EXCHANGE(target, newValue) ((__xchg(target, newValue))) +# define _STLP_ATOMIC_INCREMENT(__x) __inc_and_fetch(__x) +# define _STLP_ATOMIC_DECREMENT(__x) __dec_and_fetch(__x) + +# elif defined(_STLP_PTHREADS) + +# include +# ifndef _STLP_USE_PTHREAD_SPINLOCK +# if defined(PTHREAD_MUTEX_INITIALIZER) && !defined(_STLP_MUTEX_INITIALIZER) +# define _STLP_MUTEX_INITIALIZER = { PTHREAD_MUTEX_INITIALIZER } +# endif + +//HPUX variants have (on some platforms optional) non-standard "DCE" pthreads impl +# if defined(_DECTHREADS_) && (defined(_PTHREAD_USE_D4) || defined(__hpux)) && !defined(_CMA_SUPPRESS_EXTERNALS_) +# define _STLP_PTHREAD_ATTR_DEFAULT pthread_mutexattr_default +# else +# define _STLP_PTHREAD_ATTR_DEFAULT 0 +# endif +# endif // !_STLP_USE_PTHREAD_SPINLOCK + +# elif defined(_STLP_WIN32THREADS) +# if !defined (_STLP_WINDOWS_H_INCLUDED) && ! defined (_WINDOWS_H) +# if ! (defined ( _STLP_MSVC ) || defined (__BORLANDC__) || defined (__ICL) || defined (__WATCOMC__) || defined (__MINGW32__) || defined (__DMC__)) +# ifdef _STLP_USE_MFC +# include +# else +# include +# endif +# define _STLP_WINDOWS_H_INCLUDED +# else +// This section serves as a replacement for windows.h header for Visual C++ +extern "C" { +# if (defined(_M_MRX000) || defined(_M_ALPHA) \ + || (defined(_M_PPC) && (_MSC_VER >= 1000))) && !defined(RC_INVOKED) +# define InterlockedIncrement _InterlockedIncrement +# define InterlockedDecrement _InterlockedDecrement +# define InterlockedExchange _InterlockedExchange +# define _STLP_STDCALL +# else +# ifdef _MAC +# define _STLP_STDCALL _cdecl +# else +# define _STLP_STDCALL __stdcall +# endif +# endif + +#if (_MSC_VER >= 1300) || defined (_STLP_NEW_PLATFORM_SDK) +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long); +#else + // boris : for the latest SDK, you may actually need the other version of the declaration (above) + // even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ... +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long); +#endif + +_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long); +_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA( const char* lpOutputString ); + +#ifdef _STLP_DEBUG +typedef unsigned long DWORD; +_STLP_IMPORT_DECLSPEC DWORD _STLP_STDCALL GetCurrentThreadId(); +#endif /* _STLP_DEBUG */ + +# if defined (InterlockedIncrement) +# pragma intrinsic(_InterlockedIncrement) +# pragma intrinsic(_InterlockedDecrement) +# pragma intrinsic(_InterlockedExchange) +# endif +} /* extern "C" */ + +# endif /* STL_MSVC */ + +# define _STLP_WINDOWS_H_INCLUDED + +# endif /* _STLP_WIN32 */ + +# ifndef _STLP_ATOMIC_INCREMENT +# define _STLP_ATOMIC_INCREMENT(__x) InterlockedIncrement((long*)__x) +# define _STLP_ATOMIC_DECREMENT(__x) InterlockedDecrement((long*)__x) +# define _STLP_ATOMIC_EXCHANGE(__x, __y) InterlockedExchange((long*)__x, (long)__y) +# endif +# elif defined(__DECC) || defined(__DECCXX) +# include +# define _STLP_ATOMIC_EXCHANGE __ATOMIC_EXCH_LONG +# define _STLP_ATOMIC_INCREMENT(__x) __ATOMIC_ADD_LONG(__x, 1) +# define _STLP_ATOMIC_DECREMENT(__x) __ATOMIC_ADD_LONG(__x, -1) +# elif defined(_STLP_SPARC_SOLARIS_THREADS) +# include +# elif defined (_STLP_UITHREADS) +// this inclusion is potential hazard to bring up all sorts +// of old-style headers. Let's assume vendor already know how +// to deal with that. +# include +# if defined (_STLP_USE_NAMESPACES) && ! defined (_STLP_VENDOR_GLOBAL_CSTD) +using _STLP_VENDOR_CSTD::time_t; +# endif +# include +# include +# include +# elif defined (_STLP_BETHREADS) +# include +#include +#include +# define _STLP_MUTEX_INITIALIZER = { 0 } +#elif defined(_STLP_OS2THREADS) +# ifdef __GNUC__ +# define INCL_DOSSEMAPHORES +# include +# else + // This section serves to replace os2.h for VisualAge C++ + typedef unsigned long ULONG; + #ifndef __HEV__ /* INCL_SEMAPHORE may also define HEV */ + #define __HEV__ + typedef ULONG HEV; + typedef HEV* PHEV; + #endif + typedef ULONG APIRET; + typedef ULONG HMTX; + typedef HMTX* PHMTX; + typedef const char* PCSZ; + typedef ULONG BOOL32; + APIRET _System DosCreateMutexSem(PCSZ pszName, PHEV phev, ULONG flAttr, BOOL32 fState); + APIRET _System DosRequestMutexSem(HMTX hmtx, ULONG ulTimeout); + APIRET _System DosReleaseMutexSem(HMTX hmtx); + APIRET _System DosCloseMutexSem(HMTX hmtx); +# define _STLP_MUTEX_INITIALIZER = { 0 }; +# endif /* GNUC */ +# elif defined(_STLP_VXWORKS_THREADS) +# include "semLib.h" +# endif + +# ifndef _STLP_MUTEX_INITIALIZER +# if defined(_STLP_ATOMIC_EXCHANGE) +// we are using our own spinlock. +# define _STLP_MUTEX_INITIALIZER = { 0 } +# elif defined(_STLP_UITHREADS) +// known case +# define _STLP_MUTEX_INITIALIZER = { DEFAULTMUTEX } +# else +// we do not have static initializer available. therefore, on-demand synchronization is needed. +# define _STLP_MUTEX_INITIALIZER +# define _STLP_MUTEX_NEEDS_ONDEMAND_INITIALIZATION +# endif +# endif + +_STLP_BEGIN_NAMESPACE + +#ifndef _STLP_USE_PTHREAD_SPINLOCK +// Helper struct. This is a workaround for various compilers that don't +// handle static variables in inline functions properly. +template +struct _STLP_mutex_spin { + enum { __low_max = 30, __high_max = 1000 }; + // Low if we suspect uniprocessor, high for multiprocessor. + static unsigned __max; + static unsigned __last; + static void _STLP_CALL _M_do_lock(volatile __stl_atomic_t* __lock); + static void _STLP_CALL _S_nsec_sleep(int __log_nsec); +}; +#endif // !_STLP_USE_PTHREAD_SPINLOCK + + +// Locking class. Note that this class *does not have a constructor*. +// It must be initialized either statically, with _STLP_MUTEX_INITIALIZER, +// or dynamically, by explicitly calling the _M_initialize member function. +// (This is similar to the ways that a pthreads mutex can be initialized.) +// There are explicit member functions for acquiring and releasing the lock. + +// There is no constructor because static initialization is essential for +// some uses, and only a class aggregate (see section 8.5.1 of the C++ +// standard) can be initialized that way. That means we must have no +// constructors, no base classes, no virtual functions, and no private or +// protected members. + +// For non-static cases, clients should use _STLP_mutex. + +struct _STLP_CLASS_DECLSPEC _STLP_mutex_base +{ +#if defined(_STLP_ATOMIC_EXCHANGE) || defined(_STLP_SGI_THREADS) + // It should be relatively easy to get this to work on any modern Unix. + volatile __stl_atomic_t _M_lock; +#endif + +#ifdef _STLP_THREADS + +# ifdef _STLP_ATOMIC_EXCHANGE + inline void _M_initialize() { _M_lock=0; } + inline void _M_destroy() {} + + void _M_acquire_lock() { + _STLP_mutex_spin<0>::_M_do_lock(&_M_lock); + } + + inline void _M_release_lock() { + volatile __stl_atomic_t* __lock = &_M_lock; +# if defined(_STLP_SGI_THREADS) && defined(__GNUC__) && __mips >= 3 + asm("sync"); + *__lock = 0; +# elif defined(_STLP_SGI_THREADS) && __mips >= 3 \ + && (defined (_ABIN32) || defined(_ABI64)) + __lock_release(__lock); +# elif defined (_STLP_SPARC_SOLARIS_THREADS) +# if defined (__WORD64) || defined (__arch64__) || defined (__sparcv9) || defined (__sparcv8plus) + asm("membar #StoreStore ; membar #LoadStore"); +# else + asm(" stbar "); +# endif + *__lock = 0; +# else + *__lock = 0; + // This is not sufficient on many multiprocessors, since + // writes to protected variables and the lock may be reordered. +# endif + } +# elif defined(_STLP_PTHREADS) +# ifdef _STLP_USE_PTHREAD_SPINLOCK + pthread_spinlock_t _M_lock; + inline void _M_initialize() { pthread_spin_init( &_M_lock, 0 ); } + inline void _M_destroy() { pthread_spin_destroy( &_M_lock ); } + + inline void _M_acquire_lock() { + // we do not care about race conditions here : there is only one thread at this point + if(!_M_lock) pthread_spin_init( &_M_lock, 0 ); + + // fbp: here, initialization on demand should happen before the lock + // we use simple strategy as we are sure this only happens on initialization + pthread_spin_lock( &_M_lock ); + } + + inline void _M_acquire_lock_nodemand() { + pthread_spin_lock( &_M_lock ); + } + inline void _M_release_lock() { pthread_spin_unlock( &_M_lock ); } +# else // !_STLP_USE_PTHREAD_SPINLOCK + pthread_mutex_t _M_lock; + + inline void _M_initialize() { + pthread_mutex_init(&_M_lock,_STLP_PTHREAD_ATTR_DEFAULT); + } + inline void _M_destroy() { + pthread_mutex_destroy(&_M_lock); + } + inline void _M_acquire_lock_nodemand() { + pthread_mutex_lock(&_M_lock); + } + + inline void _M_acquire_lock() { +# if defined (__hpux) && !defined (PTHREAD_MUTEX_INITIALIZER) + if (!_M_lock.field1) _M_initialize(); +# endif + pthread_mutex_lock(&_M_lock); + } + inline void _M_release_lock() { pthread_mutex_unlock(&_M_lock); } +# endif // !_STLP_USE_PTHREAD_SPINLOCK + +# elif defined (_STLP_UITHREADS) + mutex_t _M_lock; + inline void _M_initialize() { + mutex_init(&_M_lock,0,NULL); + } + inline void _M_destroy() { + mutex_destroy(&_M_lock); + } + inline void _M_acquire_lock() { mutex_lock(&_M_lock); } + inline void _M_release_lock() { mutex_unlock(&_M_lock); } + +# elif defined(_STLP_OS2THREADS) + HMTX _M_lock; + inline void _M_initialize() { DosCreateMutexSem(NULL, &_M_lock, 0, false); } + inline void _M_destroy() { DosCloseMutexSem(_M_lock); } + inline void _M_acquire_lock_nodemand() { + DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT); + } + inline void _M_acquire_lock() { + if(!_M_lock) _M_initialize(); + DosRequestMutexSem(_M_lock, SEM_INDEFINITE_WAIT); + } + inline void _M_release_lock() { DosReleaseMutexSem(_M_lock); } +# elif defined(_STLP_BETHREADS) + sem_id sem; + inline void _M_initialize() + { + sem = create_sem(1, "STLPort"); + assert(sem > 0); + } + inline void _M_destroy() + { + int t = delete_sem(sem); + assert(t == B_NO_ERROR); + } + inline void _M_acquire_lock_nodemand() + { + status_t t; + t = acquire_sem(sem); + assert(t == B_NO_ERROR); + } + inline void _M_acquire_lock(); + inline void _M_release_lock() + { + status_t t = release_sem(sem); + assert(t == B_NO_ERROR); + } +# elif defined(_STLP_VXWORKS_THREADS) + SEM_ID _M_sem; + inline void _M_initialize() + { + _M_sem = semMCreate(SEM_Q_FIFO); + assert(_M_sem > 0); + } + inline void _M_destroy() + { + STATUS __s; + semDelete (_M_sem); + assert(__s == OK); + } + inline void _M_acquire_lock_nodemand() + { + STATUS __s; + semTake (_M_sem, WAIT_FOREVER); + assert(__s == OK); + } + inline void _M_acquire_lock() + { + if (!_M_sem) + _M_initialize(); + _M_acquire_lock_nodemand(); + } + inline void _M_release_lock() + { + STATUS __s; + semGive (_M_sem, WAIT_FOREVER); + assert(__s == OK); + } +# else //*ty 11/24/2001 - added configuration check +# error "Unknown thread facility configuration" +# endif +#else /* No threads */ + inline void _M_initialize() {} + inline void _M_destroy() {} + inline void _M_acquire_lock() {} + inline void _M_release_lock() {} +#endif // _STLP_PTHREADS +}; + + +#if defined (_STLP_THREADS) && defined (_STLP_MUTEX_NEEDS_ONDEMAND_INITIALIZATION) +// for use in _STLP_mutex, our purposes do not require ondemand initialization +// also, mutex_base may use some hacks to determine uninitialized state by zero data, which only works for globals. +class _STLP_CLASS_DECLSPEC _STLP_mutex_nodemand : public _STLP_mutex_base { + inline void _M_acquire_lock() { + _M_acquire_lock_nodemand(); + } +}; +#else +typedef _STLP_mutex_base _STLP_mutex_nodemand; +#endif + + +// Locking class. The constructor initializes the lock, the destructor destroys it. +// Well - behaving class, does not need static initializer +class _STLP_CLASS_DECLSPEC _STLP_mutex : public _STLP_mutex_nodemand { + public: + inline _STLP_mutex () { _M_initialize(); } + inline ~_STLP_mutex () { _M_destroy(); } + private: + _STLP_mutex(const _STLP_mutex&); + void operator=(const _STLP_mutex&); +}; + + + +/* + * Class _Refcount_Base provides a type, __stl_atomic_t, a data member, + * _M_ref_count, and member functions _M_incr and _M_decr, which perform + * atomic preincrement/predecrement. The constructor initializes + * _M_ref_count. + */ +struct _STLP_CLASS_DECLSPEC _Refcount_Base +{ + // The data member _M_ref_count + volatile __stl_atomic_t _M_ref_count; + +# if !defined (_STLP_ATOMIC_EXCHANGE) + _STLP_mutex _M_mutex; +# endif + + // Constructor + _Refcount_Base(__stl_atomic_t __n) : _M_ref_count(__n) {} + + // _M_incr and _M_decr +# if defined (_STLP_THREADS) && defined (_STLP_ATOMIC_EXCHANGE) + void _M_incr() { _STLP_ATOMIC_INCREMENT((__stl_atomic_t*)&_M_ref_count); } + void _M_decr() { _STLP_ATOMIC_DECREMENT((__stl_atomic_t*)&_M_ref_count); } +# elif defined(_STLP_THREADS) + void _M_incr() { + _M_mutex._M_acquire_lock(); + ++_M_ref_count; + _M_mutex._M_release_lock(); + } + void _M_decr() { + _M_mutex._M_acquire_lock(); + --_M_ref_count; + _M_mutex._M_release_lock(); + } +# else /* No threads */ + void _M_incr() { ++_M_ref_count; } + void _M_decr() { --_M_ref_count; } +# endif +}; + +// Atomic swap on unsigned long +// This is guaranteed to behave as though it were atomic only if all +// possibly concurrent updates use _Atomic_swap. +// In some cases the operation is emulated with a lock. +# if defined (_STLP_THREADS) +# ifdef _STLP_ATOMIC_EXCHANGE +inline __stl_atomic_t _Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) { + return (__stl_atomic_t) _STLP_ATOMIC_EXCHANGE(__p,__q); +} +# elif defined(_STLP_PTHREADS) || defined (_STLP_UITHREADS) || defined (_STLP_OS2THREADS) || defined(_STLP_USE_PTHREAD_SPINLOCK) +// We use a template here only to get a unique initialized instance. +template +struct _Swap_lock_struct { + static _STLP_STATIC_MUTEX _S_swap_lock; +}; + + +// This should be portable, but performance is expected +// to be quite awful. This really needs platform specific +// code. +inline __stl_atomic_t _Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) { + _Swap_lock_struct<0>::_S_swap_lock._M_acquire_lock(); + __stl_atomic_t __result = *__p; + *__p = __q; + _Swap_lock_struct<0>::_S_swap_lock._M_release_lock(); + return __result; +} +# endif // _STLP_PTHREADS || _STLP_UITHREADS || _STLP_OS2THREADS || _STLP_USE_PTHREAD_SPINLOCK +# else // !_STLP_THREADS +/* no threads */ +static inline __stl_atomic_t _STLP_CALL +_Atomic_swap(volatile __stl_atomic_t * __p, __stl_atomic_t __q) { + __stl_atomic_t __result = *__p; + *__p = __q; + return __result; +} +# endif // _STLP_THREADS + +// A locking class that uses _STLP_STATIC_MUTEX. The constructor takes +// a reference to an _STLP_STATIC_MUTEX, and acquires a lock. The destructor +// releases the lock. + +struct _STLP_CLASS_DECLSPEC _STLP_auto_lock +{ + _STLP_STATIC_MUTEX& _M_lock; + + _STLP_auto_lock(_STLP_STATIC_MUTEX& __lock) : _M_lock(__lock) + { _M_lock._M_acquire_lock(); } + ~_STLP_auto_lock() { _M_lock._M_release_lock(); } + +private: + void operator=(const _STLP_auto_lock&); + _STLP_auto_lock(const _STLP_auto_lock&); +}; + +typedef _STLP_auto_lock _STLP_mutex_lock; + +#ifdef _STLP_BETHREADS + +template +struct _STLP_beos_static_lock_data +{ + static bool is_init; + struct mutex_t : public _STLP_mutex + { + mutex_t() + { + _STLP_beos_static_lock_data<0>::is_init = true; + } + ~mutex_t() + { + _STLP_beos_static_lock_data<0>::is_init = false; + } + }; + static mutex_t mut; +}; + +template +bool _STLP_beos_static_lock_data<__inst>::is_init = false; +template +typename _STLP_beos_static_lock_data<__inst>::mutex_t _STLP_beos_static_lock_data<__inst>::mut; + + +inline void _STLP_mutex_base::_M_acquire_lock() +{ + if(sem == 0) + { + // we need to initialise on demand here + // to prevent race conditions use our global + // mutex if it's available: + if(_STLP_beos_static_lock_data<0>::is_init) + { + _STLP_auto_lock al(_STLP_beos_static_lock_data<0>::mut); + if(sem == 0) _M_initialize(); + } + else + { + // no lock available, we must still be + // in startup code, THERE MUST BE ONE THREAD + // ONLY active at this point. + _M_initialize(); + } + } + _M_acquire_lock_nodemand(); +} + +#endif + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_THREADS_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_time_facets.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_time_facets.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,522 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_TIME_FACETS_C +#define _STLP_TIME_FACETS_C + +#ifndef _STLP_INTERNAL_TIME_FACETS_H +# include +#endif + +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) + +#ifndef _STLP_INTERNAL_NUM_PUT_H +# include +#endif + +#ifndef _STLP_INTERNAL_NUM_GET_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//---------------------------------------------------------------------- +// Declarations of static template members. +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +# if !defined(__LIBSTD_CPP_SYMBIAN32_WSD__) && !defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) +template +locale::id time_get<_CharT, _InputIterator>::id; + +template +locale::id time_put<_CharT, _OutputIterator>::id; +#endif + +# else /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +typedef time_get time_get_char; +typedef time_get time_get_char_2; +typedef time_get > > time_get_char_3; +typedef time_put time_put_char; +typedef time_put time_put_char_2; +typedef time_put > > time_put_char_3; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, time_get_char::id, ); +__DECLARE_INSTANCE(locale::id, time_get_char_2::id, ); +__DECLARE_INSTANCE(locale::id, time_get_char_3::id, ); +__DECLARE_INSTANCE(locale::id, time_put_char::id, ); +__DECLARE_INSTANCE(locale::id, time_put_char_2::id, ); +__DECLARE_INSTANCE(locale::id, time_put_char_3::id, ); +#endif + +# ifndef _STLP_NO_WCHAR_T + +typedef time_get time_get_wchar_t; +typedef time_get time_get_wchar_t_2; +typedef time_get > > time_get_wchar_t_3; +typedef time_put time_put_wchar_t; +typedef time_put time_put_wchar_t_2; +typedef time_put > > time_put_wchar_t_3; + +#ifndef __SYMBIAN32__ +__DECLARE_INSTANCE(locale::id, time_get_wchar_t::id, ); +__DECLARE_INSTANCE(locale::id, time_get_wchar_t_2::id, ); +__DECLARE_INSTANCE(locale::id, time_get_wchar_t_3::id, ); +__DECLARE_INSTANCE(locale::id, time_put_wchar_t::id, ); +__DECLARE_INSTANCE(locale::id, time_put_wchar_t_2::id, ); +__DECLARE_INSTANCE(locale::id, time_put_wchar_t_3::id, ); +#endif + +# endif + +# endif /* ( _STLP_STATIC_TEMPLATE_DATA > 0 ) */ + +template +_RAIt _STLP_CALL +__match(_InIt& __first, _InIt& __last, _RAIt __name, _RAIt __name_end, _DiffType*) { + typedef _DiffType difference_type; + difference_type __n = __name_end - __name; + size_t __max_pos = 0; + difference_type __i; + difference_type __pos = 0; + difference_type __check_count = __n; + bool __do_check[_MAXNAMES]; + _RAIt __matching_name[_MAX_NAME_LENGTH]; + + for (__i = 0; __i < __n; ++__i) + __max_pos = (max)(__max_pos, __name[__i].size()); + + for (__i = 0; __i < _MAXNAMES; ++__i) + __do_check[__i] = true; + + + + for (__i = 0; __i < _MAX_NAME_LENGTH; ++__i) + __matching_name[__i] = __name_end; + + while (__first != __last) { + for (__i = 0; __i < __n; ++__i) + if (__do_check[__i]) + if (*__first == __name[__i][__pos]) { + if (__pos == _DiffType(__name[__i].size()) - 1) { + __do_check[__i] = 0; + __matching_name[__pos+1] = __name + __i; + --__check_count; + if (__check_count == 0) { + ++__first; + return __name + __i; + } + } + } + else { + __do_check[__i] = 0; + --__check_count; + if (__check_count == 0) + return __matching_name[__pos]; + } + + ++__first; ++__pos; + } + + return __matching_name[__pos]; +} + +template +_RAIt _STLP_CALL +__match(_InIt& __first, _InIt& __last, _RAIt __name, _RAIt __name_end) { + return __match((_InIt&)__first, (_InIt&)__last, __name, __name_end, _STLP_DISTANCE_TYPE(__name, _InIt)); +} + +// __get_formatted_time reads input that is assumed to be formatted +// according to the rules for the C strftime function (C standard, +// 7.12.3.5). This function is used to implement the do_get_time +// and do_get_date virtual functions, which depend on the locale +// specifications for the time and day formats respectively. +// Note the catchall default case, intended mainly for the '%Z' +// format designator, which does not make sense here since the +// representation of timezones is not part of the locale. +// +// The case branches are implemented either by doing a match using +// the appopriate name table or by doing a __get_integer_nogroup. +// +// 'y' format is assumed to mean that the input represents years +// since 1900. That is, 2002 should be represented as 102. There +// is no century-guessing. +// +// The match is successful if and only if the second component of the +// return value is format_end. + +// Note that the antepenultimate parameter is being used only to determine +// the correct overloading for the calls to __get_integer_nogroup. + +template +_InIt2 _STLP_CALL +__get_formatted_time _STLP_WEAK (_InIt1 __first, _InIt1 __last, + _InIt2 __format, _InIt2 __format_end, + /* _Ch, */ const _Time_Info& __table, + ios_base::iostate& __err, + tm* __t) { + while(__first != __last && __format != __format_end) { + if (*__format == '%') { + ++__format; + char __c = *__format; + switch (__c) { + case 'a': { + const string* __pr = + __match(__first, __last, + (string*)__table._M_dayname + 0 , (string*)__table._M_dayname + 7); + if (__pr == (string*)__table._M_dayname + 7) + return __format; + __t->tm_wday = (int)(__pr - (string*)__table._M_dayname); + break; + } + + case 'A': { + const string* __pr = + __match(__first, __last, + (string*)__table._M_dayname + 7, (string*)__table._M_dayname + 14); + if (__pr == (string*)__table._M_dayname + 14) + return __format; + __t->tm_wday = (int)(__pr - (string*)__table._M_dayname - 7); + break; + } + + case 'b': { + const string* __pr = + __match(__first, __last, + (string*)__table._M_monthname + 0, (string*)__table._M_monthname + 12); + if (__pr == (string*)__table._M_monthname + 12) + return __format; + __t->tm_mon = (int)(__pr - (string*)__table._M_monthname); + break; + } + + case 'B': { + const string* __pr = + __match(__first, __last, + (string*)__table._M_monthname + 12, (string*)__table._M_monthname + 24); + if (__pr == (string*)__table._M_monthname + 24) + return __format; + __t->tm_mon = (int)(__pr - (string*)__table._M_monthname - 12); + break; + } + + case 'd': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_mday); + if (!__pr || __t->tm_mday < 1 || __t->tm_mday > 31) { + __err |= ios_base::failbit; + return __format; + } + break; + } + + case 'H': case 'I': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_hour); + if (!__pr) + return __format; + break; + } + + case 'j': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_yday); + if (!__pr) + return __format; + break; + } + + case 'm': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_mon); + --__t->tm_mon; + if (!__pr || __t->tm_mon < 0 || __t->tm_mon > 11) { + __err |= ios_base::failbit; + return __format; + } + break; + } + + case 'M': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_min); + if (!__pr) + return __format; + break; + } + + case 'p': { + const string* __pr = + __match(__first, __last, (string*)__table._M_am_pm + 0, (string*)__table._M_am_pm + 2); + if (__pr == (string*)__table._M_am_pm + 2) + return __format; + if (__pr == (string*)__table._M_am_pm + 1) + __t->tm_hour += 12; + break; + } + + case 'S': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_sec); + if (!__pr) + return __format; + break; + } + + case 'y': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_year); + if (!__pr) + return __format; + break; + } + + case 'Y': { + bool __pr = + __get_decimal_integer(__first, __last, __t->tm_year); + __t->tm_year -= 1900; + if (!__pr) + return __format; + break; + } + + default: + break; + } + + } + else { + if (*__first != *__format) + break; + __first++; + } + + ++__format; + } + + return __format; +} + +template +bool _STLP_CALL +__get_short_or_long_dayname(_InIt& __first, _InIt& __last, + const _Time_Info& __table, tm* __t) { + const string* __pr = + __match(__first, __last, __table._M_dayname + 0, __table._M_dayname + 14); + __t->tm_wday = (int)(__pr - __table._M_dayname) % 7; + return __pr != __table._M_dayname + 14; +} + +template +bool _STLP_CALL +__get_short_or_long_monthname(_InIt& __first, _InIt& __last, + const _Time_Info& __table, tm* __t) { + const string* __pr = + __match(__first, __last, (string*)__table._M_monthname + 0, (string*)__table._M_monthname + 24); + __t->tm_mon = (int)(__pr - __table._M_monthname) % 12; + return __pr != __table._M_monthname + 24; +} + +# ifndef _STLP_NO_WCHAR_T +template +_OuIt _STLP_CALL +__put_time(char * __first, char * __last, _OuIt __stl_out, + const ios_base& __s, wchar_t) { + //const ctype& __ct = *(ctype*)__s._M_ctype_facet(); + const ctype& __ct = use_facet< ctype >(__s.getloc()); + wchar_t __wbuf[64]; + __ct.widen(__first, __last, __wbuf); + ptrdiff_t __len = __last - __first; + wchar_t * __eend = __wbuf + __len; + return copy((wchar_t*)__wbuf, __eend, __stl_out); +} +# endif + +#ifdef __SYMBIAN32__ +template +_OuIt _STLP_CALL +__put_time(char * __first, char * __last, _OuIt __stl_out, + const ios_base& __s, _CharT) { + //const ctype& __ct = *(ctype*)__s._M_ctype_facet(); + const ctype<_CharT>& __ct = use_facet< ctype<_CharT> >(__s.getloc()); + _CharT __wbuf[64]; + __ct.widen(__first, __last, __wbuf); + ptrdiff_t __len = __last - __first; + _CharT * __eend = __wbuf + __len; + return copy((_CharT*)__wbuf, __eend, __stl_out); +} + +#endif +template +_InIt +time_get<_Ch, _InIt>::do_get_date(_InIt __s, _InIt __end, + ios_base& /* __str */, ios_base::iostate& __err, + tm* __t) const +{ + typedef string::const_iterator string_iterator; + + string_iterator __format + = _M_timeinfo._M_date_format.begin(); + string_iterator __format_end + = _M_timeinfo._M_date_format.end(); + + string_iterator __result + = __get_formatted_time(__s, __end, __format, __format_end, + /* _Ch() ,*/ _M_timeinfo, __err, __t); + if (__result == __format_end) + __err = ios_base::goodbit; + else { + __err = ios_base::failbit; + if (__s == __end) + __err |= ios_base::eofbit; + } + return __s; +} + +template +_InIt +time_get<_Ch, _InIt>::do_get_time(_InIt __s, _InIt __end, + ios_base& /* __str */, ios_base::iostate& __err, + tm* __t) const +{ + typedef string::const_iterator string_iterator; + string_iterator __format + = _M_timeinfo._M_time_format.begin(); + string_iterator __format_end + = _M_timeinfo._M_time_format.end(); + + string_iterator __result + = __get_formatted_time(__s, __end, __format, __format_end, + /* _Ch() , */ _M_timeinfo, __err, __t); + __err = __result == __format_end ? ios_base::goodbit + : ios_base::failbit; + if (__s == __end) + __err |= ios_base::eofbit; + return __s; +} + +template +_InIt +time_get<_Ch, _InIt>::do_get_year(_InIt __s, _InIt __end, + ios_base&, + ios_base::iostate& __err, + tm* __t) const +{ + + if (__s == __end) { + __err = ios_base::failbit | ios_base::eofbit; + return __s; + } + + bool __pr = __get_decimal_integer(__s, __end, __t->tm_year); + __t->tm_year -= 1900; + __err = __pr ? ios_base::goodbit : ios_base::failbit; + if (__s == __end) + __err |= ios_base::eofbit; + + return __s; +} + +template +_InIt +time_get<_Ch, _InIt>::do_get_weekday(_InIt __s, _InIt __end, + ios_base& /* __str */, + ios_base::iostate& __err, + tm* __t) const +{ + bool __result = + __get_short_or_long_dayname(__s, __end, _M_timeinfo, __t); + if (__result) + __err = ios_base::goodbit; + else { + __err = ios_base::failbit; + if (__s == __end) + __err |= ios_base::eofbit; + } + return __s; +} + +template +_InIt +time_get<_Ch, _InIt>::do_get_monthname(_InIt __s, _InIt __end, + ios_base& /* __str */, + ios_base::iostate& __err, + tm* __t) const +{ + bool __result = + __get_short_or_long_monthname(__s, __end, _M_timeinfo, __t); + if (__result) + __err = ios_base::goodbit; + else { + __err = ios_base::failbit; + if (__s == __end) + __err |= ios_base::eofbit; + } + return __s; +} + +template +_OutputIter +time_put<_Ch,_OutputIter>::put(_OutputIter __s, ios_base& __f, _Ch __fill, + const tm* __tmb, + const _Ch* __pat, const _Ch* __pat_end) const +{ + locale __loc = __f.getloc(); + const ctype<_Ch>& _Ct = use_facet >(__loc); + // const ctype<_Ch>& _Ct = *(ctype<_Ch>*)__f._M_ctype_facet(); + while (__pat != __pat_end) { + char __c = _Ct.narrow(*__pat, 0); + if (__c == '%') { + char __mod = 0; + ++__pat; + __c = _Ct.narrow(*__pat++, 0); + if(__c == '#') { // MS extension + __mod = __c; + __c = _Ct.narrow(*__pat++, 0); + } + __s = do_put(__s, __f, __fill, __tmb, __c, __mod); + } + else + *__s++ = *__pat++; + } + return __s; +} + +template +_OutputIter +time_put<_Ch,_OutputIter>::do_put(_OutputIter __s, ios_base& __f, _Ch /* __fill */ , + const tm* __tmb, + char __format, char __modifier ) const +{ + char __buf[64]; + char * __iend = __write_formatted_time(__buf, __format, __modifier, + _M_timeinfo, __tmb); + // locale __loc = __f.getloc(); + return __put_time(__buf, __iend, __s, __f, _Ch()); +} + +_STLP_END_NAMESPACE + +# endif /* defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) */ +#endif /* _STLP_TIME_FACETS_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_time_facets.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_time_facets.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,345 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +// WARNING: This is an internal header file, included by other C++ +// standard library headers. You should not attempt to use this header +// file directly. + + +#ifndef _STLP_INTERNAL_TIME_FACETS_H +#define _STLP_INTERNAL_TIME_FACETS_H + +#ifndef _STLP_CTIME +# include // Needed (for struct tm) by time facets +#endif + +#include +#include + +_STLP_BEGIN_NAMESPACE + +// Template functions used by time_get + +// Matching input against a list of names + +// Alphabetic input of the names of months and the names +// of weekdays requires matching input against a list of names. +// We use a simple generic algorithm to accomplish this. This +// algorithm is not very efficient, especially for longer lists +// of names, but it probably does not matter for the initial +// implementation and it may never matter, since we do not expect +// this kind of input to be used very often. The algorithm +// could be improved fairly simply by creating a new list of +// names still in the running at each iteration. A more sophisticated +// approach would be to build a trie to do the matching. +// +// We compare each character of the input to the corresponding +// character of each name on the list that has not been eliminated, +// either because every character in the name has already been +// matched, or because some character has not been matched. We +// continue only as long as there are some names that have not been +// eliminated. + +// We do not really need a random access iterator (a forward iterator +// would do), but the extra generality makes the notation clumsier, +// and we don't really need it. + +// We can recognize a failed match by the fact that the second +// component of the return value will be __name_end. + +#define _MAXNAMES 64 +#define _MAX_NAME_LENGTH 64 + +// Both time_get and time_put need a structure of type _Time_Info +// to provide names and abbreviated names for months and days, +// as well as the am/pm designator. The month and weekday tables +// have the all the abbreviated names before all the full names. +// The _Time_Info tables are initialized using the non-template +// function _Init_timeinfo, which has two overloadings: one +// with a single reference parameter for the table to be initialized, +// and one with a second _Locale_time * parameter. The first form +// is called by the default constructor and the second by a special +// constructor invoked from the _byname subclass constructor to +// construct the base class. + +class _STLP_CLASS_DECLSPEC _Time_Info { +public: + string _M_dayname[14]; + string _M_monthname[24]; + string _M_am_pm[2]; + string _M_time_format; + string _M_date_format; + string _M_date_time_format; + string _M_long_date_format; + string _M_long_date_time_format; +}; + +_STLP_DECLSPEC void _STLP_CALL _Init_timeinfo(_Time_Info&); +_STLP_DECLSPEC void _STLP_CALL _Init_timeinfo(_Time_Info&, _Locale_time*); + +class _STLP_CLASS_DECLSPEC time_base { +public: + enum dateorder {no_order, dmy, mdy, ymd, ydm}; +}; + + +template ) > +class time_get : public locale::facet, public time_base +{ + friend class _Locale; + +public: + typedef _Ch char_type; + typedef _InIt iter_type; + + explicit time_get(size_t __refs = 0) : _BaseFacet(__refs) { + _Init_timeinfo(_M_timeinfo); + } + dateorder date_order() const { return do_date_order(); } + iter_type get_time(iter_type __s, iter_type __end, ios_base& __str, + ios_base::iostate& __err, tm* __t) const + { return do_get_time(__s, __end, __str, __err, __t); } + iter_type get_date(iter_type __s, iter_type __end, ios_base& __str, + ios_base::iostate& __err, tm* __t) const + { return do_get_date(__s, __end, __str, __err, __t); } + iter_type get_weekday(iter_type __s, iter_type __end, ios_base& __str, + ios_base::iostate& __err, tm* __t) const + { return do_get_weekday(__s, __end, __str, __err, __t); } + iter_type get_monthname(iter_type __s, iter_type __end, ios_base& __str, + ios_base::iostate& __err, tm* __t) const + { return do_get_monthname(__s, __end, __str, __err, __t); } + iter_type get_year(iter_type __s, iter_type __end, ios_base& __str, + ios_base::iostate& __err, tm* __t) const + { return do_get_year(__s, __end, __str, __err, __t); } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >*); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const wchar_t**); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(istreambuf_iterator >*); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(const char**); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + _Time_Info _M_timeinfo; + + time_get(_Locale_time *, size_t __refs) : _BaseFacet(__refs) {} + + ~time_get() {} + + virtual dateorder do_date_order() const {return no_order;} + + virtual iter_type do_get_time(iter_type __s, iter_type __end, + ios_base&, ios_base::iostate& __err, + tm* __t) const; + + virtual iter_type do_get_date(iter_type __s, iter_type __end, + ios_base&, ios_base::iostate& __err, + tm* __t) const; + + virtual iter_type do_get_weekday(iter_type __s, iter_type __end, + ios_base&, + ios_base::iostate& __err, + tm* __t) const; + virtual iter_type do_get_monthname(iter_type __s, iter_type __end, + ios_base&, + ios_base::iostate& __err, + tm* __t) const; + + virtual iter_type do_get_year(iter_type __s, iter_type __end, + ios_base&, ios_base::iostate& __err, + tm* __t) const; +}; + +time_base::dateorder _STLP_CALL +_STLP_DECLSPEC __get_date_order(_Locale_time*); +_Locale_time* _STLP_CALL __acquire_time(const char* __name); +void _STLP_CALL __release_time(_Locale_time* __time); + +template ) > +class time_get_byname : public time_get<_Ch, _InIt> +{ +public: + typedef time_base::dateorder dateorder; + typedef _InIt iter_type; + + explicit time_get_byname(const char* __name, size_t __refs = 0) + : time_get<_Ch, _InIt>((_Locale_time*) 0, __refs), + _M_time(__acquire_time(__name)) + { _Init_timeinfo(this->_M_timeinfo, this->_M_time); } + +protected: + ~time_get_byname() { __release_time(_M_time); } + dateorder do_date_order() const { return __get_date_order(_M_time); } +private: + _Locale_time* _M_time; +}; + +// time_put facet + +// For the formats 'x, 'X', and 'c', do_put calls the first form of +// put with the pattern obtained from _M_timeinfo._M_date_format or +// _M_timeinfo._M_time_format. + +// Helper function: __ takes a single-character +// format. As indicated by the foregoing remark, this will never be +// 'x', 'X', or 'c'. + +_STLP_DECLSPEC char * _STLP_CALL +__write_formatted_time(char * __buf, char __format, char __modifier, + const _Time_Info& __table, const tm* __t); + +template +inline _OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out, + const ios_base& /* __loc */, char) { + return copy(__first, __last, __out); +} + +# ifndef _STLP_NO_WCHAR_T +template +_OuIt _STLP_CALL __put_time(char * __first, char * __last, _OuIt __out, + const ios_base& __s, wchar_t); +# endif + +template ) > +class time_put : public locale::facet, public time_base +{ + friend class _Locale; +public: + typedef _Ch char_type; + typedef _OutputIter iter_type; + + explicit time_put(size_t __refs = 0) : _BaseFacet(__refs) { + _Init_timeinfo(_M_timeinfo); + } + + _OutputIter put(iter_type __s, ios_base& __f, _Ch __fill, + const tm* __tmb, + const _Ch* __pat, const _Ch* __pat_end) const; + + _OutputIter put(iter_type __s, ios_base& __f, _Ch __fill, + const tm* __tmb, char __format, char __modifier = 0) const { + return do_put(__s, __f, __fill, __tmb, __format, __modifier); + } + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(ostreambuf_iterator >*); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(wchar_t**); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(ostreambuf_iterator >*); + _STLP_STATIC_MEMBER_DECLSPEC static locale::id& GetFacetLocaleId(char**); +#else + _STLP_STATIC_MEMBER_DECLSPEC static locale::id id; +#endif + +protected: + _Time_Info _M_timeinfo; + + time_put(_Locale_time* /*__time*/, size_t __refs) : _BaseFacet(__refs) { + // _Init_timeinfo(_M_timeinfo, __time); + } + + ~time_put() {} + virtual iter_type do_put(iter_type __s, ios_base& __f, + char_type /* __fill */, const tm* __tmb, + char __format, char /* __modifier */) const; +}; + +template ) > +class time_put_byname : public time_put<_Ch, _InIt> +{ + friend class _Locale; +public: + typedef time_base::dateorder dateorder; + typedef _InIt iter_type; + typedef _Ch char_type; + + explicit time_put_byname(const char * __name, size_t __refs = 0) + : time_put<_Ch, _InIt>((_Locale_time*) 0, __refs), + _M_time(__acquire_time(__name)) + { _Init_timeinfo(this->_M_timeinfo, this->_M_time); } + +protected: + ~time_put_byname() { __release_time(_M_time); } + +private: + _Locale_time* _M_time; +}; + +# ifdef _STLP_USE_TEMPLATE_EXPORT +_STLP_EXPORT_TEMPLATE_CLASS time_get > >; +_STLP_EXPORT_TEMPLATE_CLASS time_put > >; +// _STLP_EXPORT_TEMPLATE_CLASS time_get; +// _STLP_EXPORT_TEMPLATE_CLASS time_put; +# ifndef _STLP_NO_WCHAR_T +_STLP_EXPORT_TEMPLATE_CLASS time_get > >; +_STLP_EXPORT_TEMPLATE_CLASS time_put > >; +// _STLP_EXPORT_TEMPLATE_CLASS time_get; +// _STLP_EXPORT_TEMPLATE_CLASS time_put; +# endif /* INSTANTIATE_WIDE_STREAMS */ + +# endif + +# if defined (__BORLANDC__) && defined (_RTLDLL) +inline void _Stl_loc_init_time_facets() { + +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + time_get > >::GetFacetLocaleId()._M_index = 16; + time_get::GetFacetLocaleId()._M_index = 17; + time_put > >::GetFacetLocaleId()._M_index = 18; + time_put::GetFacetLocaleId()._M_index = 19; +#else + time_get > >::GetFacetLocaleId()._M_index = 16; + time_get::id._M_index = 17; + time_put > >::GetFacetLocaleId()._M_index = 18; + time_put::id._M_index = 19; +#endif + +# ifndef _STLP_NO_WCHAR_T +#if defined(__LIBSTD_CPP_SYMBIAN32_WSD__) || defined(_STLP_LIBSTD_CPP_NO_STATIC_VAR_) + time_get > >::GetFacetLocaleId()._M_index = 35; + time_get::GetFacetLocaleId()._M_index = 36; + time_put > >::GetFacetLocaleId()._M_index = 37; + time_put::GetFacetLocaleId()._M_index = 38; +#else + time_get > >::id._M_index = 35; + time_get::id._M_index = 36; + time_put > >::id._M_index = 37; + time_put::id._M_index = 38; +#endif //__SYMBIAN32__ +# endif //!_STLP_NO_WCHAR_T + +} +# endif + +_STLP_END_NAMESPACE + +#if defined (_STLP_EXPOSE_STREAM_IMPLEMENTATION) && !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_INTERNAL_TIME_FACETS_H */ + +// Local Variables: +// mode:C++ +// End: + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_tree.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_tree.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,715 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + * Modified CRP 7/10/00 for improved conformance / efficiency on insert_unique / + * insert_equal with valid hint -- efficiency is improved all around, and it is + * should now be standard conforming for complexity on insert point immediately + * after hint (amortized constant time). + * + */ +#ifndef _STLP_TREE_C +#define _STLP_TREE_C + +#ifndef _STLP_INTERNAL_TREE_H +# include +#endif + +// fbp: these defines are for outline methods definitions. +// needed for definitions to be portable. Should not be used in method bodies. +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +# define __iterator__ _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> > +# define __size_type__ size_t +# define iterator __iterator__ +# else +# define __iterator__ _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::iterator +# define __size_type__ _STLP_TYPENAME_ON_RETURN_TYPE _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>::size_type +# endif + +#if defined ( _STLP_DEBUG) +# define _Rb_tree __WORKAROUND_DBG_RENAME(Rb_tree) +#endif + +_STLP_BEGIN_NAMESPACE + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +template void _STLP_CALL +_Rb_global<_Dummy>::_Rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) +{ + _Rb_tree_node_base* __y = __x->_M_right; + __x->_M_right = __y->_M_left; + if (__y->_M_left !=0) + __y->_M_left->_M_parent = __x; + __y->_M_parent = __x->_M_parent; + + if (__x == __root) + __root = __y; + else if (__x == __x->_M_parent->_M_left) + __x->_M_parent->_M_left = __y; + else + __x->_M_parent->_M_right = __y; + __y->_M_left = __x; + __x->_M_parent = __y; +} + +template void _STLP_CALL +_Rb_global<_Dummy>::_Rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root) +{ + _Rb_tree_node_base* __y = __x->_M_left; + __x->_M_left = __y->_M_right; + if (__y->_M_right != 0) + __y->_M_right->_M_parent = __x; + __y->_M_parent = __x->_M_parent; + + if (__x == __root) + __root = __y; + else if (__x == __x->_M_parent->_M_right) + __x->_M_parent->_M_right = __y; + else + __x->_M_parent->_M_left = __y; + __y->_M_right = __x; + __x->_M_parent = __y; +} + +template void _STLP_CALL +_Rb_global<_Dummy>::_Rebalance(_Rb_tree_node_base* __x, + _Rb_tree_node_base*& __root) +{ + __x->_M_color = _S_rb_tree_red; + while (__x != __root && __x->_M_parent->_M_color == _S_rb_tree_red) { + if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left) { + _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right; + if (__y && __y->_M_color == _S_rb_tree_red) { + __x->_M_parent->_M_color = _S_rb_tree_black; + __y->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + __x = __x->_M_parent->_M_parent; + } + else { + if (__x == __x->_M_parent->_M_right) { + __x = __x->_M_parent; + _Rotate_left(__x, __root); + } + __x->_M_parent->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + _Rotate_right(__x->_M_parent->_M_parent, __root); + } + } + else { + _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left; + if (__y && __y->_M_color == _S_rb_tree_red) { + __x->_M_parent->_M_color = _S_rb_tree_black; + __y->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + __x = __x->_M_parent->_M_parent; + } + else { + if (__x == __x->_M_parent->_M_left) { + __x = __x->_M_parent; + _Rotate_right(__x, __root); + } + __x->_M_parent->_M_color = _S_rb_tree_black; + __x->_M_parent->_M_parent->_M_color = _S_rb_tree_red; + _Rotate_left(__x->_M_parent->_M_parent, __root); + } + } + } + __root->_M_color = _S_rb_tree_black; +} + +template _Rb_tree_node_base* _STLP_CALL +_Rb_global<_Dummy>::_Rebalance_for_erase(_Rb_tree_node_base* __z, + _Rb_tree_node_base*& __root, + _Rb_tree_node_base*& __leftmost, + _Rb_tree_node_base*& __rightmost) +{ + _Rb_tree_node_base* __y = __z; + _Rb_tree_node_base* __x = 0; + _Rb_tree_node_base* __x_parent = 0; + if (__y->_M_left == 0) // __z has at most one non-null child. y == z. + __x = __y->_M_right; // __x might be null. + else + if (__y->_M_right == 0) // __z has exactly one non-null child. y == z. + __x = __y->_M_left; // __x is not null. + else { // __z has two non-null children. Set __y to + __y = __y->_M_right; // __z's successor. __x might be null. + while (__y->_M_left != 0) + __y = __y->_M_left; + __x = __y->_M_right; + } + if (__y != __z) { // relink y in place of z. y is z's successor + __z->_M_left->_M_parent = __y; + __y->_M_left = __z->_M_left; + if (__y != __z->_M_right) { + __x_parent = __y->_M_parent; + if (__x) __x->_M_parent = __y->_M_parent; + __y->_M_parent->_M_left = __x; // __y must be a child of _M_left + __y->_M_right = __z->_M_right; + __z->_M_right->_M_parent = __y; + } + else + __x_parent = __y; + if (__root == __z) + __root = __y; + else if (__z->_M_parent->_M_left == __z) + __z->_M_parent->_M_left = __y; + else + __z->_M_parent->_M_right = __y; + __y->_M_parent = __z->_M_parent; + _STLP_STD::swap(__y->_M_color, __z->_M_color); + __y = __z; + // __y now points to node to be actually deleted + } + else { // __y == __z + __x_parent = __y->_M_parent; + if (__x) __x->_M_parent = __y->_M_parent; + if (__root == __z) + __root = __x; + else + if (__z->_M_parent->_M_left == __z) + __z->_M_parent->_M_left = __x; + else + __z->_M_parent->_M_right = __x; + if (__leftmost == __z) + if (__z->_M_right == 0) // __z->_M_left must be null also + __leftmost = __z->_M_parent; + // makes __leftmost == _M_header if __z == __root + else + __leftmost = _Rb_tree_node_base::_S_minimum(__x); + if (__rightmost == __z) + if (__z->_M_left == 0) // __z->_M_right must be null also + __rightmost = __z->_M_parent; + // makes __rightmost == _M_header if __z == __root + else // __x == __z->_M_left + __rightmost = _Rb_tree_node_base::_S_maximum(__x); + } + if (__y->_M_color != _S_rb_tree_red) { + while (__x != __root && (__x == 0 || __x->_M_color == _S_rb_tree_black)) + if (__x == __x_parent->_M_left) { + _Rb_tree_node_base* __w = __x_parent->_M_right; + if (__w->_M_color == _S_rb_tree_red) { + __w->_M_color = _S_rb_tree_black; + __x_parent->_M_color = _S_rb_tree_red; + _Rotate_left(__x_parent, __root); + __w = __x_parent->_M_right; + } + if ((__w->_M_left == 0 || + __w->_M_left->_M_color == _S_rb_tree_black) && (__w->_M_right == 0 || + __w->_M_right->_M_color == _S_rb_tree_black)) { + __w->_M_color = _S_rb_tree_red; + __x = __x_parent; + __x_parent = __x_parent->_M_parent; + } else { + if (__w->_M_right == 0 || + __w->_M_right->_M_color == _S_rb_tree_black) { + if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black; + __w->_M_color = _S_rb_tree_red; + _Rotate_right(__w, __root); + __w = __x_parent->_M_right; + } + __w->_M_color = __x_parent->_M_color; + __x_parent->_M_color = _S_rb_tree_black; + if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black; + _Rotate_left(__x_parent, __root); + break; + } + } else { // same as above, with _M_right <-> _M_left. + _Rb_tree_node_base* __w = __x_parent->_M_left; + if (__w->_M_color == _S_rb_tree_red) { + __w->_M_color = _S_rb_tree_black; + __x_parent->_M_color = _S_rb_tree_red; + _Rotate_right(__x_parent, __root); + __w = __x_parent->_M_left; + } + if ((__w->_M_right == 0 || + __w->_M_right->_M_color == _S_rb_tree_black) && (__w->_M_left == 0 || + __w->_M_left->_M_color == _S_rb_tree_black)) { + __w->_M_color = _S_rb_tree_red; + __x = __x_parent; + __x_parent = __x_parent->_M_parent; + } else { + if (__w->_M_left == 0 || + __w->_M_left->_M_color == _S_rb_tree_black) { + if (__w->_M_right) __w->_M_right->_M_color = _S_rb_tree_black; + __w->_M_color = _S_rb_tree_red; + _Rotate_left(__w, __root); + __w = __x_parent->_M_left; + } + __w->_M_color = __x_parent->_M_color; + __x_parent->_M_color = _S_rb_tree_black; + if (__w->_M_left) __w->_M_left->_M_color = _S_rb_tree_black; + _Rotate_right(__x_parent, __root); + break; + } + } + if (__x) __x->_M_color = _S_rb_tree_black; + } + return __y; +} + +template _Rb_tree_node_base* _STLP_CALL +_Rb_global<_Dummy>::_M_decrement(_Rb_tree_node_base* _M_node) +{ + if (_M_node->_M_color == _S_rb_tree_red && _M_node->_M_parent->_M_parent == _M_node) + _M_node = _M_node->_M_right; + else if (_M_node->_M_left != 0) { + _Base_ptr __y = _M_node->_M_left; + while (__y->_M_right != 0) + __y = __y->_M_right; + _M_node = __y; + } + else { + _Base_ptr __y = _M_node->_M_parent; + while (_M_node == __y->_M_left) { + _M_node = __y; + __y = __y->_M_parent; + } + _M_node = __y; + } + return _M_node; +} + +template _Rb_tree_node_base* _STLP_CALL +_Rb_global<_Dummy>::_M_increment(_Rb_tree_node_base* _M_node) +{ + if (_M_node->_M_right != 0) { + _M_node = _M_node->_M_right; + while (_M_node->_M_left != 0) + _M_node = _M_node->_M_left; + } + else { + _Base_ptr __y = _M_node->_M_parent; + while (_M_node == __y->_M_right) { + _M_node = __y; + __y = __y->_M_parent; + } + if (_M_node->_M_right != __y) + _M_node = __y; + } + return _M_node; +} + +#endif /* defined (__BUILDING_STLPORT) || ! defined (_STLP_OWN_IOSTREAMS) */ + + +template _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::operator=(const _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>& __x) +{ + if (this != &__x) { + // Note that _Key may be a constant type. + clear(); + _M_node_count = 0; + _M_key_compare = __x._M_key_compare; + if (__x._M_root() == 0) { + _M_root() = 0; + _M_leftmost() = this->_M_header._M_data; + _M_rightmost() = this->_M_header._M_data; + } + else { + _M_root() = _M_copy(__x._M_root(), this->_M_header._M_data); + _M_leftmost() = _S_minimum(_M_root()); + _M_rightmost() = _S_maximum(_M_root()); + _M_node_count = __x._M_node_count; + } + } + return *this; +} + +// CRP 7/10/00 inserted argument __w_, which is another hint (meant to +// act like __x_ and ignore a portion of the if conditions -- specify +// __w_ != 0 to bypass comparison as false or __x_ != 0 to bypass +// comparison as true) +template __iterator__ +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::_M_insert(_Rb_tree_node_base* __x_, _Rb_tree_node_base* __y_, const _Value& __v, + _Rb_tree_node_base* __w_) +{ + _Link_type __w = (_Link_type) __w_; + _Link_type __x = (_Link_type) __x_; + _Link_type __y = (_Link_type) __y_; + _Link_type __z; + + if ( __y == this->_M_header._M_data || + ( __w == 0 && // If w != 0, the remainder fails to false + ( __x != 0 || // If x != 0, the remainder succeeds to true + _M_key_compare( _KeyOfValue()(__v), _S_key(__y) ) ) + ) + ) { + + __z = _M_create_node(__v); + _S_left(__y) = __z; // also makes _M_leftmost() = __z + // when __y == _M_header + if (__y == this->_M_header._M_data) { + _M_root() = __z; + _M_rightmost() = __z; + } + else if (__y == _M_leftmost()) + _M_leftmost() = __z; // maintain _M_leftmost() pointing to min node + } + else { + __z = _M_create_node(__v); + _S_right(__y) = __z; + if (__y == _M_rightmost()) + _M_rightmost() = __z; // maintain _M_rightmost() pointing to max node + } + _S_parent(__z) = __y; + _S_left(__z) = 0; + _S_right(__z) = 0; + _Rb_global_inst::_Rebalance(__z, this->_M_header._M_data->_M_parent); + ++_M_node_count; + return iterator(__z); +} + +template __iterator__ +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_equal(const _Value& __v) +{ + _Link_type __y = this->_M_header._M_data; + _Link_type __x = _M_root(); + while (__x != 0) { + __y = __x; + __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? + _S_left(__x) : _S_right(__x); + } + return _M_insert(__x, __y, __v); +} + + +template pair< _Rb_tree_iterator<_Value, _Nonconst_traits<_Value> >, bool> _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_unique(const _Value& __v) +{ + _Link_type __y = this->_M_header._M_data; + _Link_type __x = _M_root(); + bool __comp = true; + while (__x != 0) { + __y = __x; + __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)); + __x = __comp ? _S_left(__x) : _S_right(__x); + } + iterator __j = iterator(__y); + if (__comp) + if (__j == begin()) + return pair(_M_insert(/* __x*/ __y, __y, __v), true); + else + --__j; + if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v))) + return pair(_M_insert(__x, __y, __v), true); + return pair(__j, false); +} + +// Modifications CRP 7/10/00 as noted to improve conformance and +// efficiency. +template __iterator__ +_Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> ::insert_unique(iterator __position, const _Value& __v) +{ + if (__position._M_node == this->_M_header._M_data->_M_left) { // begin() + + // if the container is empty, fall back on insert_unique. + if (size() <= 0) + return insert_unique(__v).first; + + if ( _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node))) + return _M_insert(__position._M_node, __position._M_node, __v); + // first argument just needs to be non-null + else + { + bool __comp_pos_v = _M_key_compare( _S_key(__position._M_node), _KeyOfValue()(__v) ); + + if (__comp_pos_v == false) // compare > and compare < both false so compare equal + return __position; + //Below __comp_pos_v == true + + // Standard-conformance - does the insertion point fall immediately AFTER + // the hint? + iterator __after = __position; + ++__after; + + // Check for only one member -- in that case, __position points to itself, + // and attempting to increment will cause an infinite loop. + if (__after._M_node == this->_M_header._M_data) + // Check guarantees exactly one member, so comparison was already + // performed and we know the result; skip repeating it in _M_insert + // by specifying a non-zero fourth argument. + return _M_insert(0, __position._M_node, __v, __position._M_node); + + + // All other cases: + + // Optimization to catch insert-equivalent -- save comparison results, + // and we get this for free. + if(_M_key_compare( _KeyOfValue()(__v), _S_key(__after._M_node) )) { + if (_S_right(__position._M_node) == 0) + return _M_insert(0, __position._M_node, __v, __position._M_node); + else + return _M_insert(__after._M_node, __after._M_node, __v); + } else { + return insert_unique(__v).first; + } + } + + } else if (__position._M_node == this->_M_header._M_data) { // end() + if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v))) + // pass along to _M_insert that it can skip comparing + // v, Key ; since compare Key, v was true, compare v, Key must be false. + return _M_insert(0, _M_rightmost(), __v, __position._M_node); // Last argument only needs to be non-null + else + return insert_unique(__v).first; + } else { + iterator __before = __position; + --__before; + + bool __comp_v_pos = _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)); + + if (__comp_v_pos + && _M_key_compare( _S_key(__before._M_node), _KeyOfValue()(__v) )) { + + if (_S_right(__before._M_node) == 0) + return _M_insert(0, __before._M_node, __v, __before._M_node); // Last argument only needs to be non-null + else + return _M_insert(__position._M_node, __position._M_node, __v); + // first argument just needs to be non-null + } else + { + // Does the insertion point fall immediately AFTER the hint? + iterator __after = __position; + ++__after; + + // Optimization to catch equivalent cases and avoid unnecessary comparisons + bool __comp_pos_v = !__comp_v_pos; // Stored this result earlier + // If the earlier comparison was true, this comparison doesn't need to be + // performed because it must be false. However, if the earlier comparison + // was false, we need to perform this one because in the equal case, both will + // be false. + if (!__comp_v_pos) __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)); + + if ( (!__comp_v_pos) // comp_v_pos true implies comp_v_pos false + && __comp_pos_v + && (__after._M_node == this->_M_header._M_data || + _M_key_compare( _KeyOfValue()(__v), _S_key(__after._M_node) ))) { + + if (_S_right(__position._M_node) == 0) + return _M_insert(0, __position._M_node, __v, __position._M_node); + else + return _M_insert(__after._M_node, __after._M_node, __v); + } else { + // Test for equivalent case + if (__comp_v_pos == __comp_pos_v) + return __position; + else + return insert_unique(__v).first; + } + } + } +} + + +template __iterator__ +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::insert_equal(iterator __position, const _Value& __v) +{ + if (__position._M_node == this->_M_header._M_data->_M_left) { // begin() + + // Check for zero members + if (size() <= 0) + return insert_equal(__v); + + if (!_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v))) + return _M_insert(__position._M_node, __position._M_node, __v); + else { + // Check for only one member + if (__position._M_node->_M_left == __position._M_node) + // Unlike insert_unique, can't avoid doing a comparison here. + return _M_insert(0, __position._M_node, __v); + + // All other cases: + // Standard-conformance - does the insertion point fall immediately AFTER + // the hint? + iterator __after = __position; + ++__after; + + // Already know that compare(pos, v) must be true! + // Therefore, we want to know if compare(after, v) is false. + // (i.e., we now pos < v, now we want to know if v <= after) + // If not, invalid hint. + if ( __after._M_node==this->_M_header._M_data || + !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__v) ) ) { + if (_S_right(__position._M_node) == 0) + return _M_insert(0, __position._M_node, __v, __position._M_node); + else + return _M_insert(__after._M_node, __after._M_node, __v); + } else // Invalid hint + return insert_equal(__v); + } + } else if (__position._M_node == this->_M_header._M_data) {// end() + if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost()))) + return _M_insert(0, _M_rightmost(), __v, __position._M_node); // Last argument only needs to be non-null + else + return insert_equal(__v); + } else { + iterator __before = __position; + --__before; + // store the result of the comparison between pos and v so + // that we don't have to do it again later. Note that this reverses the shortcut + // on the if, possibly harming efficiency in comparisons; I think the harm will + // be negligible, and to do what I want to do (save the result of a comparison so + // that it can be re-used) there is no alternative. Test here is for before <= v <= pos. + bool __comp_pos_v = _M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)); + if (!__comp_pos_v + && !_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node))) { + if (_S_right(__before._M_node) == 0) + return _M_insert(0, __before._M_node, __v, __before._M_node); // Last argument only needs to be non-null + else + return _M_insert(__position._M_node, __position._M_node, __v); + } else { + // Does the insertion point fall immediately AFTER the hint? + // Test for pos < v <= after + iterator __after = __position; + ++__after; + + if (__comp_pos_v + && ( __after._M_node==this->_M_header._M_data + || !_M_key_compare( _S_key(__after._M_node), _KeyOfValue()(__v) ) ) ) { + if (_S_right(__position._M_node) == 0) + return _M_insert(0, __position._M_node, __v, __position._M_node); + else + return _M_insert(__after._M_node, __after._M_node, __v); + } else // Invalid hint + return insert_equal(__v); + } + } +} + +template _Rb_tree_node<_Value>* +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::_M_copy(_Rb_tree_node<_Value>* __x, _Rb_tree_node<_Value>* __p) +{ + // structural copy. __x and __p must be non-null. + _STLP_LEAVE_VOLATILE _Link_type __top = _M_clone_node(__x); + __top->_M_parent = __p; + + _STLP_TRY { + if (__x->_M_right) + __top->_M_right = _M_copy(_S_right(__x), __top); + __p = __top; + __x = _S_left(__x); + + while (__x != 0) { + _Link_type __y = _M_clone_node(__x); + __p->_M_left = __y; + __y->_M_parent = __p; + if (__x->_M_right) + __y->_M_right = _M_copy(_S_right(__x), __y); + __p = __y; + __x = _S_left(__x); + } + } + _STLP_UNWIND(_M_erase(__top)); + + return __top; +} + +// this has to stay out-of-line : it's recursive +template void +_Rb_tree<_Key,_Value,_KeyOfValue, + _Compare,_Alloc>::_M_erase(_Rb_tree_node<_Value>* __x) +{ + // erase without rebalancing + while (__x != 0) { + _M_erase(_S_right(__x)); + _Link_type __y = _S_left(__x); + _STLP_STD::_Destroy(&__x->_M_value_field); + this->_M_header.deallocate(__x,1); + __x = __y; + } +} + +template __size_type__ +_Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc> ::count(const _Key& __k) const +{ + pair __p = equal_range(__k); + size_type __n = distance(__p.first, __p.second); + return __n; +} + +inline int +__black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root) +{ + if (__node == 0) + return 0; + else { + int __bc = __node->_M_color == _S_rb_tree_black ? 1 : 0; + if (__node == __root) + return __bc; + else + return __bc + __black_count(__node->_M_parent, __root); + } +} + +template bool _Rb_tree<_Key,_Value,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const +{ + if (_M_node_count == 0 || begin() == end()) + return _M_node_count == 0 && begin() == end() && this->_M_header._M_data->_M_left == this->_M_header._M_data + && this->_M_header._M_data->_M_right == this->_M_header._M_data; + + int __len = __black_count(_M_leftmost(), _M_root()); + for (const_iterator __it = begin(); __it != end(); ++__it) { + _Link_type __x = (_Link_type) __it._M_node; + _Link_type __L = _S_left(__x); + _Link_type __R = _S_right(__x); + + if (__x->_M_color == _S_rb_tree_red) + if ((__L && __L->_M_color == _S_rb_tree_red) || + (__R && __R->_M_color == _S_rb_tree_red)) + return false; + + if (__L && _M_key_compare(_S_key(__x), _S_key(__L))) + return false; + if (__R && _M_key_compare(_S_key(__R), _S_key(__x))) + return false; + + if (!__L && !__R && __black_count(__x, _M_root()) != __len) + return false; + } + + if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root())) + return false; + if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root())) + return false; + + return true; +} +_STLP_END_NAMESPACE + +# undef __iterator__ +# undef iterator +# undef __size_type__ + +#endif /* _STLP_TREE_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_uninitialized.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_uninitialized.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,291 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_UNINITIALIZED_H +#define _STLP_INTERNAL_UNINITIALIZED_H + +# ifndef _STLP_CSTRING +# include +# endif + +# ifndef _STLP_INTERNAL_ALGOBASE_H +# include +# endif + +# ifndef _STLP_INTERNAL_CONSTRUCT_H +# include +# endif + +_STLP_BEGIN_NAMESPACE + +// uninitialized_copy + +// Valid if copy construction is equivalent to assignment, and if the +// destructor is trivial. +template +inline _ForwardIter +__uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, + const __true_type&) { + return __copy_aux(__first, __last, __result, _BothPtrType< _InputIter, _ForwardIter> :: _Ret()); +} + +template +// _STLP_INLINE_LOOP +_ForwardIter +__uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result, + const __false_type&) +{ + _STLP_LEAVE_VOLATILE _ForwardIter __cur = __result; + _STLP_TRY { + for ( ; __first != __last; ++__first, ++__cur) + _Construct(&*__cur, *__first); + // return __cur; + } + _STLP_UNWIND (_STLP_STD::_Destroy(__result, __cur)); + return __cur; +} + +template +inline _ForwardIter +uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result) { + return __uninitialized_copy(__first, __last, __result, _IS_POD_ITER(__result, _ForwardIter)); +} + +inline char* +uninitialized_copy(const char* __first, const char* __last, char* __result) { + return (char*)__copy_trivial (__first, __last, __result); +} + +# ifdef _STLP_HAS_WCHAR_T // dwa 8/15/97 +inline wchar_t* +uninitialized_copy(const wchar_t* __first, const wchar_t* __last, wchar_t* __result) { + return (wchar_t*)__copy_trivial (__first, __last, __result); +} +# endif /* _STLP_HAS_WCHAR_T */ + +# ifndef _STLP_NO_EXTENSIONS +// uninitialized_copy_n (not part of the C++ standard) + +template +// _STLP_INLINE_LOOP +pair<_InputIter, _ForwardIter> +__uninitialized_copy_n(_InputIter __first, _Size __count, + _ForwardIter __result, + const input_iterator_tag &) +{ + _STLP_LEAVE_VOLATILE _ForwardIter __cur = __result; + _STLP_TRY { + for ( ; __count > 0 ; --__count, ++__first, ++__cur) + _Construct(&*__cur, *__first); + // return pair<_InputIter, _ForwardIter>(__first, __cur); + } + _STLP_UNWIND(_STLP_STD::_Destroy(__result, __cur)); + + return pair<_InputIter, _ForwardIter>(__first, __cur); + +} + +# if defined(_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline pair<_InputIterator, _ForwardIterator> +__uninitialized_copy_n(_InputIterator __first, _Size __count, + _ForwardIterator __result, + const forward_iterator_tag &) { + return __uninitialized_copy_n(__first, __count, __result, input_iterator_tag()); +} + +template +inline pair<_InputIterator, _ForwardIterator> +__uninitialized_copy_n(_InputIterator __first, _Size __count, + _ForwardIterator __result, + const bidirectional_iterator_tag &) { + return __uninitialized_copy_n(__first, __count, __result, input_iterator_tag()); +} +# endif + + +template +inline pair<_RandomAccessIter, _ForwardIter> +__uninitialized_copy_n(_RandomAccessIter __first, _Size __count, _ForwardIter __result, const random_access_iterator_tag &) { + _RandomAccessIter __last = __first + __count; + return pair<_RandomAccessIter, _ForwardIter>( __last, __uninitialized_copy(__first, __last, __result, + _IS_POD_ITER(__result, _ForwardIter))); +} + +// this is used internally in , which is extension itself. +template +inline pair<_InputIter, _ForwardIter> +uninitialized_copy_n(_InputIter __first, _Size __count, + _ForwardIter __result) { + return __uninitialized_copy_n(__first, __count, __result, _STLP_ITERATOR_CATEGORY(__first, _InputIter)); +} +# endif /* _STLP_NO_EXTENSIONS */ + +// Valid if copy construction is equivalent to assignment, and if the +// destructor is trivial. +template +inline void +__uninitialized_fill(_ForwardIter __first, _ForwardIter __last, + const _Tp& __x, const __true_type&) { + _STLP_STD::fill(__first, __last, __x); +} + +template +// _STLP_INLINE_LOOP +void +__uninitialized_fill(_ForwardIter __first, _ForwardIter __last, + const _Tp& __x, const __false_type&) +{ + _STLP_LEAVE_VOLATILE _ForwardIter __cur = __first; + _STLP_TRY { + for ( ; __cur != __last; ++__cur) + _Construct(&*__cur, __x); + } + _STLP_UNWIND(_STLP_STD::_Destroy(__first, __cur)); +} + +template +inline void uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x) { + __uninitialized_fill(__first, __last, __x, _IS_POD_ITER(__first, _ForwardIter)); +} + +// Valid if copy construction is equivalent to assignment, and if the +// destructor is trivial. +template +inline _ForwardIter +__uninitialized_fill_n(_ForwardIter __first, _Size __n, + const _Tp& __x, const __true_type&) { + return _STLP_STD::fill_n(__first, __n, __x); +} + +template +//_STLP_INLINE_LOOP +_ForwardIter +__uninitialized_fill_n(_ForwardIter __first, _Size __n, + const _Tp& __x, const __false_type&) +{ + _STLP_LEAVE_VOLATILE _ForwardIter __cur = __first; + _STLP_TRY { + for ( ; __n > 0; --__n, ++__cur) + _Construct(&*__cur, __x); + // return __cur; + } + _STLP_UNWIND(_STLP_STD::_Destroy(__first, __cur)); + // # ifdef _STLP_THROW_RETURN_BUG + return __cur; + //# endif +} + +template +inline _ForwardIter +uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x) { + return __uninitialized_fill_n(__first, __n, __x, _IS_POD_ITER(__first, _ForwardIter)); +} + +// Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, +// __uninitialized_fill_copy. + +// __uninitialized_copy_copy +// Copies [first1, last1) into [result, result + (last1 - first1)), and +// copies [first2, last2) into +// [result, result + (last1 - first1) + (last2 - first2)). + +template +inline _ForwardIter +__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _ForwardIter __result, __true_type) +{ + return __uninitialized_copy(__first2, __last2, + __uninitialized_copy(__first1, __last1, __result, __true_type()), __true_type()); +} + +template +// inline +_ForwardIter +__uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1, + _InputIter2 __first2, _InputIter2 __last2, + _ForwardIter __result, __false_type) +{ + _STLP_LEAVE_VOLATILE _ForwardIter __mid = __uninitialized_copy(__first1, __last1, __result, _IS_POD_ITER(__result, _ForwardIter)); + + _STLP_TRY { + return __uninitialized_copy(__first2, __last2, __mid , _IS_POD_ITER(__result, _ForwardIter)); + } + _STLP_UNWIND (_STLP_STD::_Destroy(__result, __mid)); +# ifdef _STLP_THROW_RETURN_BUG + return __mid; +# endif +} + +// __uninitialized_fill_copy +// Fills [result, mid) with x, and copies [first, last) into +// [mid, mid + (last - first)). +template +// inline +_ForwardIter +__uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid, const _Tp& __x, + _InputIter __first, _InputIter __last) +{ + typedef typename __type_traits<_Tp>::is_POD_type _I_POD; + __uninitialized_fill(__result, __mid, __x, _I_POD()); + _STLP_TRY { + return __uninitialized_copy(__first, __last, __mid, _I_POD()); + } + _STLP_UNWIND (_STLP_STD::_Destroy(__result, __mid)); +# ifdef _STLP_THROW_RETURN_BUG + return __result; +# endif +} + +// __uninitialized_copy_fill +// Copies [first1, last1) into [first2, first2 + (last1 - first1)), and +// fills [first2 + (last1 - first1), last2) with x. +template +// inline +void +__uninitialized_copy_fill(_InputIter __first1, _InputIter __last1, + _ForwardIter __first2, _ForwardIter __last2, + const _Tp& __x) +{ + typedef typename __type_traits<_Tp>::is_POD_type _I_POD; + _ForwardIter __mid2 = __uninitialized_copy(__first1, __last1, __first2, _I_POD()); + _STLP_TRY { + __uninitialized_fill(__mid2, __last2, __x, _I_POD()); + } + _STLP_UNWIND(_STLP_STD::_Destroy(__first2, __mid2)); +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_UNINITIALIZED_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_unordered_map.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_unordered_map.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,427 @@ +/* + * Copyright (c) 2004 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_UNORDERED_MAP_H +#define _STLP_INTERNAL_UNORDERED_MAP_H + +#ifndef _STLP_INTERNAL_HASHTABLE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//Specific iterator traits creation +_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMapTraitsT, traits) + +template ), + _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>), + _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > +class unordered_map +#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) + : public __stlport_class > +#endif +{ +private: + typedef unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self; +public: + typedef _Key key_type; + typedef _Tp data_type; + typedef _Tp mapped_type; +#if !defined (__DMC__) + typedef pair value_type; +#else + typedef pair value_type; +#endif +private: + //Specific iterator traits creation + typedef _STLP_PRIV _UnorderedMapTraitsT _UnorderedMapTraits; + +public: + typedef hashtable _Ht; + + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + typedef typename _Ht::local_iterator local_iterator; + typedef typename _Ht::const_local_iterator const_local_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_function() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +private: + _Ht _M_ht; + _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) + +public: + explicit unordered_map(size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + unordered_map(__move_source<_Self> src) + : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} + +#if defined (_STLP_MEMBER_TEMPLATES) + template + unordered_map(_InputIterator __f, _InputIterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } +#else + unordered_map(const value_type* __f, const value_type* __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } + + unordered_map(const_iterator __f, const_iterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } +#endif /*_STLP_MEMBER_TEMPLATES */ + + _Self& operator = (const _Self& __other) + { _M_ht = __other._M_ht; return *this; } + + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } + + iterator begin() { return _M_ht.begin(); } + iterator end() { return _M_ht.end(); } + const_iterator begin() const { return _M_ht.begin(); } + const_iterator end() const { return _M_ht.end(); } + + pair insert(const value_type& __obj) + { return _M_ht.insert_unique(__obj); } + iterator insert(const_iterator /*__hint*/, const value_type& __obj) + { return _M_ht.insert_unique(__obj); } +#if defined (_STLP_MEMBER_TEMPLATES) + template + void insert(_InputIterator __f, _InputIterator __l) +#else + void insert(const value_type* __f, const value_type* __l) + { _M_ht.insert_unique(__f,__l); } + void insert(const_iterator __f, const_iterator __l) +#endif /*_STLP_MEMBER_TEMPLATES */ + { _M_ht.insert_unique(__f, __l); } + + _STLP_TEMPLATE_FOR_CONT_EXT + iterator find(const _KT& __key) { return _M_ht.find(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + _Tp& operator[](const _KT& __key) { + iterator __it = _M_ht.find(__key); + return (__it == _M_ht.end() ? + _M_ht._M_insert(value_type(__key, _STLP_DEFAULT_CONSTRUCTED(_Tp))).second : + (*__it).second ); + } + + _STLP_TEMPLATE_FOR_CONT_EXT + size_type count(const _KT& __key) const { return _M_ht.count(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) + { return _M_ht.equal_range(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(const_iterator __it) { _M_ht.erase(__it); } + void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } + _STLP_TEMPLATE_FOR_CONT_EXT + size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } + local_iterator begin(size_type __n) { return _M_ht.begin(__n); } + local_iterator end(size_type __n) { return _M_ht.end(__n); } + const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } + const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } + + float load_factor() const { return _M_ht.load_factor(); } + float max_load_factor() const { return _M_ht.max_load_factor(); } + void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } + void rehash(size_type __hint) { _M_ht.rehash(__hint); } +}; + +//Specific iterator traits creation +_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMultimapTraitsT, traits) + +template ), + _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>), + _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > +class unordered_multimap +#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) + : public __stlport_class > +#endif +{ +private: + typedef unordered_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self; +public: + typedef _Key key_type; + typedef _Tp data_type; + typedef _Tp mapped_type; +#if !defined (__DMC__) + typedef pair value_type; +#else + typedef pair value_type; +#endif +private: + //Specific iterator traits creation + typedef _STLP_PRIV _UnorderedMultimapTraitsT _UnorderedMultimapTraits; + +public: + typedef hashtable _Ht; + + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + typedef typename _Ht::local_iterator local_iterator; + typedef typename _Ht::const_local_iterator const_local_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_function() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +private: + _Ht _M_ht; + _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) + +public: + explicit unordered_multimap(size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + unordered_multimap(__move_source<_Self> src) + : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} + +#if defined (_STLP_MEMBER_TEMPLATES) + template + unordered_multimap(_InputIterator __f, _InputIterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } +#else + unordered_multimap(const value_type* __f, const value_type* __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } + + unordered_multimap(const_iterator __f, const_iterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } +#endif /*_STLP_MEMBER_TEMPLATES */ + + _Self& operator = (const _Self& __other) + { _M_ht = __other._M_ht; return *this; } + + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } + + iterator begin() { return _M_ht.begin(); } + iterator end() { return _M_ht.end(); } + const_iterator begin() const { return _M_ht.begin(); } + const_iterator end() const { return _M_ht.end(); } + + iterator insert(const value_type& __obj) + { return _M_ht.insert_equal(__obj); } + iterator insert(const_iterator /*__hint*/, const value_type& __obj) + { return _M_ht.insert_equal(__obj); } +#if defined (_STLP_MEMBER_TEMPLATES) + template + void insert(_InputIterator __f, _InputIterator __l) +#else + void insert(const value_type* __f, const value_type* __l) + { _M_ht.insert_equal(__f,__l); } + void insert(const_iterator __f, const_iterator __l) +#endif /*_STLP_MEMBER_TEMPLATES */ + { _M_ht.insert_equal(__f, __l); } + + _STLP_TEMPLATE_FOR_CONT_EXT + iterator find(const _KT& __key) { return _M_ht.find(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + size_type count(const _KT& __key) const { return _M_ht.count(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) + { return _M_ht.equal_range(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(const_iterator __it) { _M_ht.erase(__it); } + void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } + _STLP_TEMPLATE_FOR_CONT_EXT + size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } + local_iterator begin(size_type __n) { return _M_ht.begin(__n); } + local_iterator end(size_type __n) { return _M_ht.end(__n); } + const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } + const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } + + float load_factor() const { return _M_ht.load_factor(); } + float max_load_factor() const { return _M_ht.max_load_factor(); } + void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } + void rehash(size_type __hint) { _M_ht.rehash(__hint); } +}; + +#define _STLP_TEMPLATE_HEADER template +#define _STLP_TEMPLATE_CONTAINER unordered_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc> + +#include + +#undef _STLP_TEMPLATE_CONTAINER +#define _STLP_TEMPLATE_CONTAINER unordered_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc> + +#include + +#undef _STLP_TEMPLATE_CONTAINER +#undef _STLP_TEMPLATE_HEADER + +// Specialization of insert_iterator so that it will work for unordered_map +// and unordered_multimap. + +#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +template +struct __move_traits > : + _STLP_PRIV __move_traits_help::_Ht> +{}; + +template +struct __move_traits > : + _STLP_PRIV __move_traits_help::_Ht> +{}; + +template +class insert_iterator > { +protected: + typedef unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container; + _Container* container; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __val) { + container->insert(__val); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +class insert_iterator > { +protected: + typedef unordered_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container; + _Container* container; + typename _Container::iterator iter; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __val) { + container->insert(__val); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_UNORDERED_MAP_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_unordered_set.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_unordered_set.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,398 @@ +/* + * Copyright (c) 2004 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* NOTE: This is an internal header file, included by other STL headers. + * You should not attempt to use it directly. + */ + +#ifndef _STLP_INTERNAL_UNORDERED_SET_H +#define _STLP_INTERNAL_UNORDERED_SET_H + +#ifndef _STLP_INTERNAL_HASHTABLE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//Specific iterator traits creation +_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedSetTraitsT, Const_traits) + +template ), + _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Value>), + _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) > +class unordered_set +#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) + : public __stlport_class > +#endif +{ + typedef unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self; + //Specific iterator traits creation + typedef _STLP_PRIV _UnorderedSetTraitsT<_Value> _UnorderedSetTraits; +public: + typedef hashtable<_Value, _Value, _HashFcn, + _UnorderedSetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; +public: + typedef typename _Ht::key_type key_type; + typedef typename _Ht::value_type value_type; + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + typedef typename _Ht::local_iterator local_iterator; + typedef typename _Ht::const_local_iterator const_local_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_function() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +private: + _Ht _M_ht; + _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) + +public: + explicit unordered_set(size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + unordered_set(__move_source<_Self> src) + : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} + +#if defined (_STLP_MEMBER_TEMPLATES) + template + unordered_set(_InputIterator __f, _InputIterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } +#else + unordered_set(const value_type* __f, const value_type* __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } + + unordered_set(const_iterator __f, const_iterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_unique(__f, __l); } +#endif /*_STLP_MEMBER_TEMPLATES */ + + _Self& operator = (const _Self& __other) + { _M_ht = __other._M_ht; return *this; } + + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } + + iterator begin() { return _M_ht.begin(); } + iterator end() { return _M_ht.end(); } + const_iterator begin() const { return _M_ht.begin(); } + const_iterator end() const { return _M_ht.end(); } + + pair insert(const value_type& __obj) + { return _M_ht.insert_unique(__obj); } + iterator insert(const_iterator /*__hint*/, const value_type& __obj) + { return _M_ht.insert_unique(__obj); } +#if defined (_STLP_MEMBER_TEMPLATES) + template + void insert(_InputIterator __f, _InputIterator __l) +#else + void insert(const_iterator __f, const_iterator __l) + {_M_ht.insert_unique(__f, __l); } + void insert(const value_type* __f, const value_type* __l) +#endif + { _M_ht.insert_unique(__f,__l); } + + _STLP_TEMPLATE_FOR_CONT_EXT + iterator find(const _KT& __key) { return _M_ht.find(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + size_type count(const _KT& __key) const { return _M_ht.count(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) + { return _M_ht.equal_range(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(const_iterator __it) { _M_ht.erase(__it); } + void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } + _STLP_TEMPLATE_FOR_CONT_EXT + size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } + local_iterator begin(size_type __n) { return _M_ht.begin(__n); } + local_iterator end(size_type __n) { return _M_ht.end(__n); } + const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } + const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } + + float load_factor() const { return _M_ht.load_factor(); } + float max_load_factor() const { return _M_ht.max_load_factor(); } + void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } + void rehash(size_type __hint) { _M_ht.rehash(__hint); } +}; + +//Specific iterator traits creation +_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMultisetTraitsT, Const_traits) + +template ), + _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Value>), + _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) > +class unordered_multiset +#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) + : public __stlport_class > +#endif +{ + typedef unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self; + //Specific iterator traits creation + typedef _STLP_PRIV _UnorderedMultisetTraitsT<_Value> _UnorderedMultisetTraits; +public: + typedef hashtable<_Value, _Value, _HashFcn, + _UnorderedMultisetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; + + typedef typename _Ht::key_type key_type; + typedef typename _Ht::value_type value_type; + typedef typename _Ht::hasher hasher; + typedef typename _Ht::key_equal key_equal; + + typedef typename _Ht::size_type size_type; + typedef typename _Ht::difference_type difference_type; + typedef typename _Ht::pointer pointer; + typedef typename _Ht::const_pointer const_pointer; + typedef typename _Ht::reference reference; + typedef typename _Ht::const_reference const_reference; + + typedef typename _Ht::iterator iterator; + typedef typename _Ht::const_iterator const_iterator; + typedef typename _Ht::local_iterator local_iterator; + typedef typename _Ht::const_local_iterator const_local_iterator; + + typedef typename _Ht::allocator_type allocator_type; + + hasher hash_function() const { return _M_ht.hash_funct(); } + key_equal key_eq() const { return _M_ht.key_eq(); } + allocator_type get_allocator() const { return _M_ht.get_allocator(); } + +private: + _Ht _M_ht; + _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) + +public: + explicit unordered_multiset(size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) {} + + unordered_multiset(__move_source<_Self> src) + : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} + +#if defined (_STLP_MEMBER_TEMPLATES) + template + unordered_multiset(_InputIterator __f, _InputIterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } +#else + unordered_multiset(const value_type* __f, const value_type* __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } + + unordered_multiset(const_iterator __f, const_iterator __l, + size_type __n = 100, const hasher& __hf = hasher(), + const key_equal& __eql = key_equal(), + const allocator_type& __a = allocator_type()) + : _M_ht(__n, __hf, __eql, __a) + { _M_ht.insert_equal(__f, __l); } +#endif /*_STLP_MEMBER_TEMPLATES */ + + _Self& operator = (const _Self& __other) + { _M_ht = __other._M_ht; return *this; } + + size_type size() const { return _M_ht.size(); } + size_type max_size() const { return _M_ht.max_size(); } + bool empty() const { return _M_ht.empty(); } + void swap(_Self& hs) { _M_ht.swap(hs._M_ht); } + + iterator begin() { return _M_ht.begin(); } + iterator end() { return _M_ht.end(); } + const_iterator begin() const { return _M_ht.begin(); } + const_iterator end() const { return _M_ht.end(); } + + iterator insert(const value_type& __obj) + { return _M_ht.insert_equal(__obj); } + iterator insert(const_iterator /*__hint*/, const value_type& __obj) + { return _M_ht.insert_equal(__obj); } +#if defined (_STLP_MEMBER_TEMPLATES) + template + void insert(_InputIterator __f, _InputIterator __l) +#else + void insert(const value_type* __f, const value_type* __l) + { _M_ht.insert_equal(__f,__l); } + void insert(const_iterator __f, const_iterator __l) +#endif /*_STLP_MEMBER_TEMPLATES */ + { _M_ht.insert_equal(__f, __l); } + + _STLP_TEMPLATE_FOR_CONT_EXT + iterator find(const _KT& __key) { return _M_ht.find(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + size_type count(const _KT& __key) const { return _M_ht.count(__key); } + + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) + { return _M_ht.equal_range(__key); } + _STLP_TEMPLATE_FOR_CONT_EXT + pair equal_range(const _KT& __key) const + { return _M_ht.equal_range(__key); } + + size_type erase(const key_type& __key) {return _M_ht.erase(__key); } + void erase(const_iterator __it) { _M_ht.erase(__it); } + void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } + void clear() { _M_ht.clear(); } + + size_type bucket_count() const { return _M_ht.bucket_count(); } + size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } + size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } + _STLP_TEMPLATE_FOR_CONT_EXT + size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } + local_iterator begin(size_type __n) { return _M_ht.begin(__n); } + local_iterator end(size_type __n) { return _M_ht.end(__n); } + const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } + const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } + + float load_factor() const { return _M_ht.load_factor(); } + float max_load_factor() const { return _M_ht.max_load_factor(); } + void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } + void rehash(size_type __hint) { _M_ht.rehash(__hint); } +}; + +#define _STLP_TEMPLATE_HEADER template +#define _STLP_TEMPLATE_CONTAINER unordered_set<_Value,_HashFcn,_EqualKey,_Alloc> + +#include + +#undef _STLP_TEMPLATE_CONTAINER +#define _STLP_TEMPLATE_CONTAINER unordered_multiset<_Value,_HashFcn,_EqualKey,_Alloc> +#include + +#undef _STLP_TEMPLATE_CONTAINER +#undef _STLP_TEMPLATE_HEADER + +// Specialization of insert_iterator so that it will work for unordered_set +// and unordered_multiset. + +#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +template +struct __move_traits > : + _STLP_PRIV __move_traits_aux::_Ht> +{}; + +template +struct __move_traits > : + _STLP_PRIV __move_traits_aux::_Ht> +{}; + +template +class insert_iterator > { +protected: + typedef unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container; + _Container* container; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __val) { + container->insert(__val); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; + +template +class insert_iterator > { +protected: + typedef unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container; + _Container* container; + typename _Container::iterator iter; +public: + typedef _Container container_type; + typedef output_iterator_tag iterator_category; + typedef void value_type; + typedef void difference_type; + typedef void pointer; + typedef void reference; + + insert_iterator(_Container& __x) : container(&__x) {} + insert_iterator(_Container& __x, typename _Container::iterator) + : container(&__x) {} + insert_iterator<_Container>& + operator=(const typename _Container::value_type& __val) { + container->insert(__val); + return *this; + } + insert_iterator<_Container>& operator*() { return *this; } + insert_iterator<_Container>& operator++() { return *this; } + insert_iterator<_Container>& operator++(int) { return *this; } +}; +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +_STLP_END_NAMESPACE + +#endif /* _STLP_INTERNAL_UNORDERED_SET_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_valarray.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_valarray.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,203 @@ +/* + * + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_VALARRAY_C +#define _STLP_VALARRAY_C + +#ifndef _STLP_VALARRAY_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +template +_Valarray_bool valarray<_Tp>:: operator!() const { + _Valarray_bool __tmp(this->size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < this->size(); ++__i) + __tmp[__i] = !(*this)[__i]; + return __tmp; +} + +// Behavior is undefined if __x and *this have different sizes +template +valarray<_Tp>& valarray<_Tp>::operator=(const slice_array<_Tp>& __x) +{ + size_t __index = __x._M_slice.start(); + for (size_t __i = 0; + __i < __x._M_slice.size(); + ++__i, __index += __x._M_slice.stride()) + (*this)[__i] = (*(__x._M_array))[__index]; + return *this; +} + +template +valarray<_Tp> valarray<_Tp>::operator[](slice __slice) const { + valarray<_Tp> __tmp(__slice.size(), _NoInit()); + size_t __index = __slice.start(); + for (size_t __i = 0; + __i < __slice.size(); + ++__i, __index += __slice.stride()) + __tmp[__i] = (*this)[__index]; + return __tmp; +} + +template +bool _Gslice_Iter_tmpl<_Size>::_M_incr() { + size_t __dim = _M_indices.size() - 1; + ++_M_step; + while (true) { + _M_1d_idx += _M_gslice._M_strides[__dim]; + if (++_M_indices[__dim] != _M_gslice._M_lengths[__dim]) + return true; + else if (__dim != 0) { + _M_1d_idx -= + _M_gslice._M_strides[__dim] * _M_gslice._M_lengths[__dim]; + _M_indices[__dim] = 0; + --__dim; + } + else + return false; + } +} + +// Behavior is undefined if __x and *this have different sizes, or if +// __x was constructed from a degenerate gslice. +template +valarray<_Tp>& valarray<_Tp>::operator=(const gslice_array<_Tp>& __x) +{ + if (this->size() != 0) { + _Gslice_Iter __i(__x._M_gslice); + do + (*this)[__i._M_step] = __x._M_array[__i._M_1d_idx]; + while(__i._M_incr()); + } + return *this; +} + +template +valarray<_Tp> valarray<_Tp>::operator[](gslice __slice) const +{ + valarray<_Tp> __tmp(__slice._M_size(), _NoInit()); + if (__tmp.size() != 0) { + _Gslice_Iter __i(__slice); + do __tmp[__i._M_step] = (*this)[__i._M_1d_idx]; while(__i._M_incr()); + } + return __tmp; +} + +template +valarray<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) const +{ + size_t _p_size = 0; + { + for (size_t __i = 0; __i < __mask.size(); ++__i) + if (__mask[__i]) ++_p_size; + } + + valarray<_Tp> __tmp(_p_size, _NoInit()); + size_t __idx = 0; + { + for (size_t __i = 0; __i < __mask.size(); ++__i) + if (__mask[__i]) __tmp[__idx++] = (*this)[__i]; + } + + return __tmp; +} + +template +valarray<_Tp>& valarray<_Tp>::operator=(const indirect_array<_Tp>& __x) { + for (size_t __i = 0; __i < __x._M_addr.size(); ++__i) + (*this)[__i] = __x._M_array[__x._M_addr[__i]]; + return *this; +} + +template +valarray<_Tp> +valarray<_Tp>::operator[](const _Valarray_size_t& __addr) const +{ + valarray<_Tp> __tmp(__addr.size(), _NoInit()); + for (size_t __i = 0; __i < __addr.size(); ++__i) + __tmp[__i] = (*this)[__addr[__i]]; + return __tmp; +} + +//---------------------------------------------------------------------- +// Other valarray noninline member functions + +// Shift and cshift + +template +valarray<_Tp> valarray<_Tp>::shift(int __n) const +{ + valarray<_Tp> __tmp(this->size()); + + if (__n >= 0) { + if (__n < this->size()) + copy(this->_M_first + __n, this->_M_first + this->size(), + __tmp._M_first); + } + else { + if (-__n < this->size()) + copy(this->_M_first, this->_M_first + this->size() + __n, + __tmp._M_first - __n); + } + return __tmp; +} + +template +valarray<_Tp> valarray<_Tp>::cshift(int __m) const +{ + valarray<_Tp> __tmp(this->size()); + +#ifdef __SYMBIAN32__ + if (!this->size()) + return __tmp; +#endif + + // Reduce __m to an equivalent number in the range [0, size()). We + // have to be careful with negative numbers, since the sign of a % b + // is unspecified when a < 0. + long __n = __m; + if (this->size() < (numeric_limits::max)()) + __n %= long(this->size()); + if (__n < 0) + __n += this->size(); + + copy(this->_M_first, this->_M_first + __n, + __tmp._M_first + (this->size() - __n)); + copy(this->_M_first + __n, this->_M_first + this->size(), + __tmp._M_first); + + return __tmp; +} + +_STLP_END_NAMESPACE + +#endif /* _STLP_VALARRAY_C */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_valarray.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_valarray.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1791 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_VALARRAY_H +#define _STLP_VALARRAY_H + +#ifndef _STLP_CMATH_H_HEADER +#include +#endif +#ifndef _STLP_INTERNAL_NEW_HEADER +#include +#endif +#ifndef _STLP_INTERNAL_ALGO_H +#include +#endif +#ifndef _STLP_INTERNAL_NUMERIC_H +#include +#endif +#ifndef _STLP_LIMITS_H +#include +#endif + +//To resolve the unidentified identifier __THROW_BAD_ALLOC +#include + +_STLP_BEGIN_NAMESPACE + +class slice; +class gslice; + +template class valarray; +typedef valarray _Valarray_bool; +typedef valarray _Valarray_size_t; + +template class slice_array; +template class gslice_array; +template class mask_array; +template class indirect_array; + +//---------------------------------------------------------------------- +// class valarray + +// Base class to handle memory allocation and deallocation. We can't just +// use vector<>, because vector would be unsuitable as an internal +// representation for valarray. + +template +struct _Valarray_base +{ + _Tp* _M_first; + size_t _M_size; + + _Valarray_base() : _M_first(0), _M_size(0) {} + _Valarray_base(size_t __n) : _M_first(0), _M_size(0) { _M_allocate(__n); } + ~_Valarray_base() { _M_deallocate(); } + + void _M_allocate(size_t __n) { + if (__n != 0) { +#ifdef __SYMBIAN32__ + _M_first = ::new _Tp[__n]; +#else + _M_first = __STATIC_CAST(_Tp*, (malloc(__n * sizeof(_Tp)))); +#endif + _M_size = __n; + if (_M_first == 0) { + _M_size = 0; + __THROW_BAD_ALLOC; + } + } + else { + _M_first = 0; + _M_size = 0; + } + } + + void _M_deallocate() { +#ifdef __SYMBIAN32__ + delete [] _M_first; +#else + free(_M_first); +#endif + _M_first = 0; + _M_size = 0; + } +}; + +template +class valarray : private _Valarray_base<_Tp> +{ + friend class gslice; + +public: + typedef _Tp value_type; + + // Basic constructors + valarray() : _Valarray_base<_Tp>() {} + valarray(size_t __n) : _Valarray_base<_Tp>(__n) {} + valarray(const value_type& __x, size_t __n) : _Valarray_base<_Tp>(__n) + { uninitialized_fill_n(this->_M_first, this->_M_size, __x); } + valarray(const value_type* __p, size_t __n) : _Valarray_base<_Tp>(__n) + { uninitialized_copy(__p, __p + __n, this->_M_first); } + valarray(const valarray<_Tp>& __x) : _Valarray_base<_Tp>(__x._M_size) { + uninitialized_copy(__x._M_first, __x._M_first + __x._M_size, + this->_M_first); + } + + // Constructors from auxiliary array types + valarray(const slice_array<_Tp>&); + valarray(const gslice_array<_Tp>&); + valarray(const mask_array<_Tp>&); + valarray(const indirect_array<_Tp>&); + + // Destructor + ~valarray() { _STLP_STD::_Destroy(this->_M_first, this->_M_first + this->_M_size); } + + // Extension: constructor that doesn't initialize valarray elements to a + // specific value. This is faster for types such as int and double. +private: + void _M_initialize(const __true_type&) {} + void _M_initialize(const __false_type&) + { uninitialized_fill_n(this->_M_first, this->_M_size, value_type()); } + +public: + struct _NoInit {}; + valarray(size_t __n, _NoInit) : _Valarray_base<_Tp>(__n) { + typedef typename __type_traits<_Tp>::has_trivial_default_constructor _Is_Trivial; + _M_initialize(_Is_Trivial()); + } + +public: // Assignment + // Basic assignment. Note that 'x = y' is undefined if x.size() != y.size() + valarray<_Tp>& operator=(const valarray<_Tp>& __x) { + _STLP_ASSERT(__x.size() == this->size()) + if (this != &__x) + { +#ifdef __SYMBIAN32__ + resize(__x._M_size); +#endif + copy(__x._M_first, __x._M_first + __x._M_size, this->_M_first); + } + return *this; + } + + // Scalar assignment + valarray<_Tp>& operator=(const value_type& __x) { + fill_n(this->_M_first, this->_M_size, __x); + return *this; + } + + // Assignment of auxiliary array types + valarray<_Tp>& operator=(const slice_array<_Tp>&); + valarray<_Tp>& operator=(const gslice_array<_Tp>&); + valarray<_Tp>& operator=(const mask_array<_Tp>&); + valarray<_Tp>& operator=(const indirect_array<_Tp>&); + +public: // Element access + value_type operator[](size_t __n) const { return this->_M_first[__n]; } + value_type& operator[](size_t __n) { return this->_M_first[__n]; } + size_t size() const { return this->_M_size; } + +public: // Subsetting operations with auxiliary type + valarray<_Tp> operator[](slice) const; + slice_array<_Tp> operator[](slice); + valarray<_Tp> operator[](gslice) const; + gslice_array<_Tp> operator[](const gslice&); + valarray<_Tp> operator[](const _Valarray_bool&) const; + mask_array<_Tp> operator[](const _Valarray_bool&); + valarray<_Tp> operator[](const _Valarray_size_t&) const; + indirect_array<_Tp> operator[](const _Valarray_size_t&); + +public: // Unary operators. + valarray<_Tp> operator+() const { return *this; } + + valarray<_Tp> operator-() const { + valarray<_Tp> __tmp(this->size(), _NoInit()); + for (size_t __i = 0; __i < this->size(); ++__i) + __tmp[__i] = -(*this)[__i]; + return __tmp; + } + + valarray<_Tp> operator~() const { + valarray<_Tp> __tmp(this->size(), _NoInit()); + for (size_t __i = 0; __i < this->size(); ++__i) + __tmp[__i] = ~(*this)[__i]; + return __tmp; + } + + _Valarray_bool operator!() const; + +public: // Scalar computed assignment. + valarray<_Tp>& operator*= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] *= __x; + return *this; + } + + valarray<_Tp>& operator/= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] /= __x; + return *this; + } + + valarray<_Tp>& operator%= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] %= __x; + return *this; + } + + valarray<_Tp>& operator+= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] += __x; + return *this; + } + + valarray<_Tp>& operator-= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] -= __x; + return *this; + } + + valarray<_Tp>& operator^= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] ^= __x; + return *this; + } + + valarray<_Tp>& operator&= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] &= __x; + return *this; + } + + valarray<_Tp>& operator|= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] |= __x; + return *this; + } + + valarray<_Tp>& operator<<= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] <<= __x; + return *this; + } + + valarray<_Tp>& operator>>= (const value_type& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] >>= __x; + return *this; + } + +public: // Array computed assignment. + valarray<_Tp>& operator*= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] *= __x[__i]; + return *this; + } + + valarray<_Tp>& operator/= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] /= __x[__i]; + return *this; + } + + valarray<_Tp>& operator%= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] %= __x[__i]; + return *this; + } + + valarray<_Tp>& operator+= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] += __x[__i]; + return *this; + } + + valarray<_Tp>& operator-= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] -= __x[__i]; + return *this; + } + + valarray<_Tp>& operator^= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] ^= __x[__i]; + return *this; + } + + valarray<_Tp>& operator&= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] &= __x[__i]; + return *this; + } + + valarray<_Tp>& operator|= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] |= __x[__i]; + return *this; + } + + valarray<_Tp>& operator<<= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] <<= __x[__i]; + return *this; + } + + valarray<_Tp>& operator>>= (const valarray<_Tp>& __x) { + for (size_t __i = 0; __i < this->size(); ++__i) + (*this)[__i] >>= __x[__i]; + return *this; + } + +public: // Other member functions. + + // The result is undefined for zero-length arrays + value_type sum() const { + return accumulate(this->_M_first + 1, this->_M_first + this->_M_size, + (*this)[0]); + } + + // The result is undefined for zero-length arrays + value_type (min) () const { + return *min_element(this->_M_first + 0, this->_M_first + this->_M_size); + } + + value_type (max) () const { + return *max_element(this->_M_first + 0, this->_M_first + this->_M_size); + } + + valarray<_Tp> shift(int __n) const; + valarray<_Tp> cshift(int __n) const; + + valarray<_Tp> apply(value_type __f(value_type)) const { + valarray<_Tp> __tmp(this->size()); + transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first, + __f); + return __tmp; + } + valarray<_Tp> apply(value_type __f(const value_type&)) const { + valarray<_Tp> __tmp(this->size()); + transform(this->_M_first + 0, this->_M_first + this->_M_size, __tmp._M_first, + __f); + return __tmp; + } + + void resize(size_t __n, value_type __x = value_type()) { + _STLP_STD::_Destroy(this->_M_first, this->_M_first + this->_M_size); + this->_Valarray_base<_Tp>::_M_deallocate(); + this->_Valarray_base<_Tp>::_M_allocate(__n); + uninitialized_fill_n(this->_M_first, this->_M_size, __x); + } +}; + +//---------------------------------------------------------------------- +// valarray non-member functions. + +// Binary arithmetic operations between two arrays. Behavior is +// undefined if the two arrays do not have the same length. + +template +inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] * __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] / __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] % __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] + __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] - __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] ^ __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] & __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] | __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] << __y[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] >> __y[__i]; + return __tmp; +} + +// Binary arithmetic operations between an array and a scalar. + +template +inline valarray<_Tp> _STLP_CALL operator*(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] * __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator*(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c * __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator/(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] / __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator/(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c / __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator%(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] % __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator%(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c % __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator+(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] + __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator+(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c + __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator-(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] - __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator-(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c - __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator^(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] ^ __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator^(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c ^ __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator&(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] & __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator&(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c & __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator|(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] | __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator|(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c | __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator<<(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] << __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator<<(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c << __x[__i]; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator>>(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] >> __c; + return __tmp; +} + +template +inline valarray<_Tp> _STLP_CALL operator>>(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c >> __x[__i]; + return __tmp; +} + +// Binary logical operations between two arrays. Behavior is undefined +// if the two arrays have different lengths. Note that operator== does +// not do what you might at first expect. + +template +inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] == __y[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] < __y[__i]; + return __tmp; +} + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE + +template +inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] != __y[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] > __y[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] <= __y[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] >= __y[__i]; + return __tmp; +} + +#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ +// fbp : swap ? + +template +inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] && __y[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] || __y[__i]; + return __tmp; +} + +// Logical operations between an array and a scalar. + +template +inline _Valarray_bool _STLP_CALL operator==(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] == __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator==(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c == __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator!=(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] != __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator!=(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c != __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator<(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] < __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator<(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c < __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator>(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] > __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator>(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c > __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator<=(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] <= __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator<=(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c <= __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator>=(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] >= __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator>=(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c >= __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator&&(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] && __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator&&(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c && __x[__i]; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator||(const valarray<_Tp>& __x, const _Tp& __c) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __x[__i] || __c; + return __tmp; +} + +template +inline _Valarray_bool _STLP_CALL operator||(const _Tp& __c, const valarray<_Tp>& __x) +{ + _Valarray_bool __tmp(__x.size(), _Valarray_bool::_NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = __c || __x[__i]; + return __tmp; +} + +// valarray "transcendentals" (the list includes abs and sqrt, which, +// of course, are not transcendental). + +template +inline valarray<_Tp> abs(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ABS(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> acos(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ACOS(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> asin(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ASIN(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> atan(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ATAN(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> atan2(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__x[__i], __y[__i]); + return __tmp; +} + +template +inline valarray<_Tp> atan2(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__x[__i], __c); + return __tmp; +} + +template +inline valarray<_Tp> atan2(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_ATAN2(_Tp)(__c, __x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> cos(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_COS(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> cosh(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_COSH(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> exp(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_EXP(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> log(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_LOG(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> log10(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_LOG10(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> pow(const valarray<_Tp>& __x, + const valarray<_Tp>& __y) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_POW(_Tp)(__x[__i], __y[__i]); + return __tmp; +} + +template +inline valarray<_Tp> pow(const valarray<_Tp>& __x, const _Tp& __c) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_POW(_Tp)(__x[__i], __c); + return __tmp; +} + +template +inline valarray<_Tp> pow(const _Tp& __c, const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_POW(_Tp)(__c, __x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> sin(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_SIN(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> sinh(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_SINH(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> sqrt(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_SQRT(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> tan(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_TAN(_Tp)(__x[__i]); + return __tmp; +} + +template +inline valarray<_Tp> tanh(const valarray<_Tp>& __x) { + typedef typename valarray<_Tp>::_NoInit _NoInit; + valarray<_Tp> __tmp(__x.size(), _NoInit()); + for (size_t __i = 0; __i < __x.size(); ++__i) + __tmp[__i] = _STLP_DO_TANH(_Tp)(__x[__i]); + return __tmp; +} + +//---------------------------------------------------------------------- +// slice and slice_array + +class slice { +public: + slice() : _M_start(0), _M_length(0), _M_stride(0) {} + slice(size_t __start, size_t __length, size_t __stride) + : _M_start(__start), _M_length(__length), _M_stride(__stride) + {} + __TRIVIAL_DESTRUCTOR(slice) + + size_t start() const { return _M_start; } + size_t size() const { return _M_length; } + size_t stride() const { return _M_stride; } + + +private: + size_t _M_start; + size_t _M_length; + size_t _M_stride; +}; + +template +class slice_array { + friend class valarray<_Tp>; +public: + typedef _Tp value_type; + + void operator=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] = __x[__i]; +#else + _M_array[__index] = __x[__i]; +#endif + } + + void operator*=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] *= __x[__i]; +#else + _M_array[__index] *= __x[__i]; +#endif + } + + void operator/=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] /= __x[__i]; +#else + _M_array[__index] /= __x[__i]; +#endif + } + + void operator%=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] %= __x[__i]; +#else + _M_array[__index] %= __x[__i]; +#endif + } + + void operator+=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] += __x[__i]; +#else + _M_array[__index] += __x[__i]; +#endif + } + + void operator-=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] -= __x[__i]; +#else + _M_array[__index] -= __x[__i]; +#endif + } + + void operator^=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] ^= __x[__i]; +#else + _M_array[__index] ^= __x[__i]; +#endif + } + + void operator&=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] &= __x[__i]; +#else + _M_array[__index] &= __x[__i]; +#endif + } + + void operator|=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] |= __x[__i]; +#else + _M_array[__index] |= __x[__i]; +#endif + } + + void operator<<=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] <<= __x[__i]; +#else + _M_array[__index] <<= __x[__i]; +#endif + } + + void operator>>=(const valarray& __x) const { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] >>= __x[__i]; +#else + _M_array[__index] >>= __x[__i]; +#endif + } + + void operator=(const value_type& __c) { + size_t __index = _M_slice.start(); + for (size_t __i = 0; + __i < _M_slice.size(); + ++__i, __index += _M_slice.stride()) +#ifdef __SYMBIAN32__ + (*_M_array)[__index] = __c; +#else + _M_array[__index] = __c; +#endif + } + + slice_array<_Tp>& + operator=(const slice_array<_Tp>& __a) + { + size_t __index = _M_slice.start(); + for (size_t __i = __a._M_slice.start(); + __i < _M_slice.size(); + __i += __a._M_slice.stride(), __index += _M_slice.stride()) + _M_array[__index] = __a._M_array[__index][__i]; + return *this; + } + + slice_array(const slice_array<_Tp>& a) + : _M_slice(a._M_slice), _M_array(a._M_array){} + + ~slice_array() {} + +private: + slice_array(const slice& __slice, valarray<_Tp>* __array) + : _M_slice(__slice), _M_array(__array) + {} + + slice _M_slice; + valarray<_Tp>* _M_array; + +private: // Disable assignment and default constructor + slice_array(); +}; + +// valarray member functions dealing with slice and slice_array + +template +inline valarray<_Tp>::valarray(const slice_array<_Tp>& __x) + : _Valarray_base<_Tp>(__x._M_slice.size()) +{ + typedef typename __type_traits<_Tp>::has_trivial_default_constructor + _Is_Trivial; + _M_initialize(_Is_Trivial()); + *this = __x; +} + + +template +inline slice_array<_Tp> valarray<_Tp>::operator[](slice __slice) { + return slice_array<_Tp>(__slice, this); +} + +//---------------------------------------------------------------------- +// gslice and gslice_array + +template +struct _Gslice_Iter_tmpl; + +class gslice { + friend struct _Gslice_Iter_tmpl; +public: + gslice() : _M_start(0), _M_lengths(0), _M_strides(0) {} + gslice(size_t __start, + const _Valarray_size_t& __lengths, const _Valarray_size_t& __strides) + : _M_start(__start), _M_lengths(__lengths), _M_strides(__strides) + {} + __TRIVIAL_DESTRUCTOR(gslice) + + size_t start() const { return _M_start; } + _Valarray_size_t size() const { return _M_lengths; } + _Valarray_size_t stride() const { return _M_strides; } + + // Extension: check for an empty gslice. + bool _M_empty() const { return _M_lengths.size() == 0; } + + // Extension: number of indices this gslice represents. (For a degenerate + // gslice, they're not necessarily all distinct.) + size_t _M_size() const { + return !this->_M_empty() + ? accumulate(_M_lengths._M_first + 1, + _M_lengths._M_first + _M_lengths._M_size, + _M_lengths[0], + multiplies()) + : 0; + } + +# ifndef __HP_aCC +private: +# endif + + size_t _M_start; + _Valarray_size_t _M_lengths; + _Valarray_size_t _M_strides; +}; + +// This is not an STL iterator. It is constructed from a gslice, and it +// steps through the gslice indices in sequence. See 23.3.6 of the C++ +// standard, paragraphs 2-3, for an explanation of the sequence. At +// each step we get two things: the ordinal (i.e. number of steps taken), +// and the one-dimensional index. + +template +struct _Gslice_Iter_tmpl { + _Gslice_Iter_tmpl(const gslice& __gslice) + : _M_step(0), _M_1d_idx(__gslice.start()), + _M_indices(size_t(0), __gslice._M_lengths.size()), + _M_gslice(__gslice) + {} + + bool _M_done() const { return _M_indices[0] == _M_gslice._M_lengths[0]; } + + bool _M_incr(); + + _Size _M_step; + _Size _M_1d_idx; + + valarray<_Size> _M_indices; + const gslice& _M_gslice; +}; + +typedef _Gslice_Iter_tmpl _Gslice_Iter; + +template +class gslice_array { + friend class valarray<_Tp>; +public: + typedef _Tp value_type; + + void operator= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] = __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator*= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] *= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator/= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] /= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator%= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] %= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator+= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] += __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator-= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] -= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator^= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] ^= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator&= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] &= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator|= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] |= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator<<= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] <<= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator>>= (const valarray& __x) const { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] >>= __x[__i._M_step]; while(__i._M_incr()); + } + } + + void operator= (const value_type& __c) { + if (!_M_gslice._M_empty()) { + _Gslice_Iter __i(_M_gslice); + do _M_array[__i._M_1d_idx] = __c; while(__i._M_incr()); + } + } + + ~gslice_array() {} + +private: + gslice_array(gslice __gslice, valarray<_Tp>& __array) + : _M_gslice(__gslice), _M_array(__array) + {} + + gslice _M_gslice; + valarray& _M_array; + +private: // Disable assignment + void operator=(const gslice_array<_Tp>&); +}; + +// valarray member functions dealing with gslice and gslice_array. Note +// that it is illegal (behavior is undefined) to construct a gslice_array +// from a degenerate gslice. + +template +inline valarray<_Tp>::valarray(const gslice_array<_Tp>& __x) + : _Valarray_base<_Tp>(__x._M_gslice._M_size()) +{ + typedef typename __type_traits<_Tp>::has_trivial_default_constructor + _Is_Trivial; + _M_initialize(_Is_Trivial()); + *this = __x; +} + +template +inline gslice_array<_Tp> valarray<_Tp>::operator[](const gslice& __slice) { + return gslice_array<_Tp>(__slice, *this); +} + + +//---------------------------------------------------------------------- +// mask_array + +template +class mask_array { + friend class valarray<_Tp>; +public: + typedef _Tp value_type; + + void operator=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] = __x[__idx++]; + } + + void operator*=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] *= __x[__idx++]; + } + + void operator/=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif //__SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] /= __x[__idx++]; + } + + void operator%=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif + if (_M_mask[__i]) _M_array[__i] %= __x[__idx++]; + } + + void operator+=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif + if (_M_mask[__i]) _M_array[__i] += __x[__idx++]; + } + + void operator-=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif //__SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] -= __x[__idx++]; + } + + void operator^=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] ^= __x[__idx++]; + } + + void operator&=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] &= __x[__idx++]; + } + + void operator|=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] |= __x[__idx++]; + } + + void operator<<=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] <<= __x[__idx++]; + } + + void operator>>=(const valarray& __x) const { + size_t __idx = 0; +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] >>= __x[__idx++]; + } + + void operator=(const value_type& __c) const { +#ifdef __SYMBIAN32__ + for (size_t __i = 0; __i < _M_array.size() && __i < _M_mask.size(); ++__i) +#else + for (size_t __i = 0; __i < _M_array.size(); ++__i) +#endif // __SYMBIAN32__ + if (_M_mask[__i]) _M_array[__i] = __c; + } + + ~mask_array() {} + + // Extension: number of true values in the mask + size_t _M_num_true() const { + size_t __result = 0; + for (size_t __i = 0; __i < _M_mask.size(); ++__i) + if (_M_mask[__i]) ++__result; + return __result; + } + +private: + mask_array(const _Valarray_bool& __mask, valarray<_Tp>& __array) + : _M_mask(__mask), _M_array(__array) + {} + + _Valarray_bool _M_mask; + valarray<_Tp>& _M_array; + +private: // Disable assignment + void operator=(const mask_array<_Tp>&); +}; + +// valarray member functions dealing with mask_array + +template +inline valarray<_Tp>::valarray(const mask_array<_Tp>& __x) + : _Valarray_base<_Tp>(__x._M_num_true()) +{ + typedef typename __type_traits<_Tp>::has_trivial_default_constructor + _Is_Trivial; + _M_initialize(_Is_Trivial()); + *this = __x; +} + +// Behavior is undefined if __x._M_num_true() != this->size() +template +inline valarray<_Tp>& valarray<_Tp>::operator=(const mask_array<_Tp>& __x) { + size_t __idx = 0; + for (size_t __i = 0; __i < __x._M_array.size(); ++__i) + if (__x._M_mask[__i]) + { +#ifdef __SYMBIAN32__ + if(__idx < this->_M_size) + (*this)[__idx++] = __x._M_array[__i]; + else + break; +#else + (*this)[__idx++] = __x._M_array[__i]; +#endif + } + return *this; +} + +template +inline mask_array<_Tp> valarray<_Tp>::operator[](const _Valarray_bool& __mask) +{ + return mask_array<_Tp>(__mask, *this); +} + + +//---------------------------------------------------------------------- +// indirect_array + +template +class indirect_array { + friend class valarray<_Tp>; +public: + typedef _Tp value_type; + + void operator=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] = __x[__i]; + } + + void operator*=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] *= __x[__i]; + } + + void operator/=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] /= __x[__i]; + } + + void operator%=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] %= __x[__i]; + } + + void operator+=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] += __x[__i]; + } + + void operator-=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] -= __x[__i]; + } + + void operator^=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] ^= __x[__i]; + } + + void operator&=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] &= __x[__i]; + } + + void operator|=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] |= __x[__i]; + } + + void operator<<=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] <<= __x[__i]; + } + + void operator>>=(const valarray& __x) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] >>= __x[__i]; + } + + void operator=(const value_type& __c) const { + for (size_t __i = 0; __i < _M_addr.size(); ++__i) + _M_array[_M_addr[__i]] = __c; + } + + ~indirect_array() {} + +private: + indirect_array(const _Valarray_size_t& __addr, valarray<_Tp>& __array) + : _M_addr(__addr), _M_array(__array) + {} + + _Valarray_size_t _M_addr; + valarray<_Tp>& _M_array; + +private: // Disable assignment + void operator=(const indirect_array<_Tp>&); +}; + +// valarray member functions dealing with indirect_array + +template +inline valarray<_Tp>::valarray(const indirect_array<_Tp>& __x) + : _Valarray_base<_Tp>(__x._M_addr.size()) +{ + typedef typename __type_traits<_Tp>::has_trivial_default_constructor + _Is_Trivial; + _M_initialize(_Is_Trivial()); + *this = __x; +} + + +template +inline indirect_array<_Tp> +valarray<_Tp>::operator[](const _Valarray_size_t& __addr) +{ + return indirect_array<_Tp>(__addr, *this); +} + +_STLP_END_NAMESPACE + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* _STLP_VALARRAY */ + + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/_vector.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/_vector.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,137 @@ +/* + * + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_VECTOR_C +#define _STLP_VECTOR_C + +# if !defined (_STLP_INTERNAL_VECTOR_H) +# include +# endif + +# if defined ( _STLP_NESTED_TYPE_PARAM_BUG ) +# define iterator _Tp* +# define size_type size_t +# endif + +# undef vector +# define vector __WORKAROUND_DBG_RENAME(vector) + +_STLP_BEGIN_NAMESPACE + +template +void +__vector__<_Tp, _Alloc>::reserve(size_type __n) { + if (capacity() < __n) { + const size_type __old_size = size(); + pointer __tmp; + if (this->_M_start) { + __tmp = _M_allocate_and_copy(__n, this->_M_start, this->_M_finish); + _M_clear(); + } else { + __tmp = this->_M_end_of_storage.allocate(__n); + } + _M_set(__tmp, __tmp + __old_size, __tmp + __n); + } +} + +template +void +__vector__<_Tp, _Alloc>::_M_fill_insert( + iterator __position, + size_type __n, const _Tp& __x) { + if (__n != 0) { + if (size_type(this->_M_end_of_storage._M_data - this->_M_finish) >= __n) { + _Tp __x_copy = __x; + const size_type __elems_after = this->_M_finish - __position; + pointer __old_finish = this->_M_finish; + if (__elems_after > __n) { + __uninitialized_copy(this->_M_finish - __n, this->_M_finish, this->_M_finish, _IsPODType()); + this->_M_finish += __n; + __copy_backward_ptrs(__position, __old_finish - __n, __old_finish, _TrivialAss()); + _STLP_STD::fill(__position, __position + __n, __x_copy); + } + else { + uninitialized_fill_n(this->_M_finish, __n - __elems_after, __x_copy); + this->_M_finish += __n - __elems_after; + __uninitialized_copy(__position, __old_finish, this->_M_finish, _IsPODType()); + this->_M_finish += __elems_after; + _STLP_STD::fill(__position, __old_finish, __x_copy); + } + } + else + _M_insert_overflow(__position, __x, _IsPODType(), __n); + } +} + +template +__vector__<_Tp,_Alloc>& +__vector__<_Tp,_Alloc>::operator=(const __vector__<_Tp, _Alloc>& __x) +{ + if (&__x != this) { + const size_type __xlen = __x.size(); + if (__xlen > capacity()) { + pointer __tmp = _M_allocate_and_copy(__xlen, (const_pointer)__x._M_start+0, (const_pointer)__x._M_finish+0); + _M_clear(); + this->_M_start = __tmp; + this->_M_end_of_storage._M_data = this->_M_start + __xlen; + } + else if (size() >= __xlen) { + pointer __i = __copy_ptrs((const_pointer)__x._M_start+0, (const_pointer)__x._M_finish+0, (pointer)this->_M_start, _TrivialAss()); + _STLP_STD::_Destroy(__i, this->_M_finish); + } + else { + __copy_ptrs((const_pointer)__x._M_start, (const_pointer)__x._M_start + size(), (pointer)this->_M_start, _TrivialAss()); + __uninitialized_copy((const_pointer)__x._M_start + size(), (const_pointer)__x._M_finish+0, this->_M_finish, _IsPODType()); + } + this->_M_finish = this->_M_start + __xlen; + } + return *this; +} + +template +void __vector__<_Tp, _Alloc>::_M_fill_assign(size_t __n, const _Tp& __val) { + if (__n > capacity()) { + __vector__<_Tp, _Alloc> __tmp(__n, __val, get_allocator()); + __tmp.swap(*this); + } + else if (__n > size()) { + fill(begin(), end(), __val); + this->_M_finish = _STLP_STD::uninitialized_fill_n(this->_M_finish, __n - size(), __val); + } + else + erase(_STLP_STD::fill_n(begin(), __n, __val), end()); +} + +_STLP_END_NAMESPACE + +# undef size_type +# undef iterator +# undef vector + +#endif /* _STLP_VECTOR_C */ + + // Local Variables: + // mode:C++ + // End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/c_locale.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/c_locale.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,459 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + +#ifndef _STLP_C_LOCALE_H +# define _STLP_C_LOCALE_H + +/* + * Implementation dependent definitions + */ +#ifdef __cplusplus +# include +#endif + +#if defined(__sgi) +# if defined(ROOT_65) /* IRIX 6.5.x */ +# include +# include +# include +# include + +# else + /* IRIX pre-6.5 */ +# include +# include + +# if !defined(_SIZE_T) && !defined(_SIZE_T_) +# define _SIZE_T +# if (_MIPS_SZLONG == 32) +typedef unsigned int size_t; +# endif +# if (_MIPS_SZLONG == 64) +typedef unsigned long size_t; +# endif +# endif + +# ifndef _WCHAR_T +# define _WCHAR_T +# if (_MIPS_SZLONG == 32) +typedef long wchar_t; +# endif +# if (_MIPS_SZLONG == 64) +typedef __int32_t wchar_t; +# endif +# endif /* _WCHAR_T */ + +# ifndef _WINT_T +# define _WINT_T +# if (_MIPS_SZLONG == 32) + typedef long wint_t; +# endif +# if (_MIPS_SZLONG == 64) + typedef __int32_t wint_t; +# endif +# endif /* _WINT_T */ + +# ifndef _MBSTATE_T +# define _MBSTATE_T +# ifdef _MSC_VER + typedef int mbstate_t; +# else + typedef char mbstate_t; +# endif +# endif /* _MBSTATE_T */ + +# endif /* ROOT65 */ + +# else /* __sgi */ + +# ifdef __cplusplus +# ifndef _STLP_CSTDDEF +# include +# endif +# ifndef _STLP_CWCHAR_H +# include +# endif +# ifndef _STLP_CCTYPE +# include +# endif +# else +# include +# include +# include +# endif + +#endif /* __sgi */ + +/* + * GENERAL FRAMEWORK + */ + +struct _Locale_ctype; +struct _Locale_numeric; +struct _Locale_time; +struct _Locale_collate; +struct _Locale_monetary; +struct _Locale_messages; + +/* + Bitmask macros. +*/ + +/* + * For narrow characters, we expose the lookup table interface. + */ + +/* Internal bitmask macros, os-specific. */ + +#if defined(__sgi) /* IRIX */ + +#define _Locale_S 0x00000008 /* Spacing character */ +#define _Locale_A 0x00004000 /* Alphabetical characters only */ +#define _Locale_B 0x00000040 /* Obsolete: was space char only */ +#define _Locale_PR 0x00008000 /* Printable characters only */ +#define _Locale_G 0x40000000 /* Graphic characters only */ +#define _Locale_BL 0x80000000 /* The blank character class */ + +/* Public bitmask macros, must be defined for every OS. These values, of + * course, are specific to IRIX. */ + +#define _Locale_CNTRL 0x00000020 /* Control character */ +#define _Locale_UPPER 0x00000001 /* Upper case */ +#define _Locale_LOWER 0x00000002 /* Lower case */ +#define _Locale_DIGIT 0x00000004 /* Numeral (digit) */ +#define _Locale_XDIGIT 0x00000080 /* heXadecimal digit */ +#define _Locale_PUNCT 0x00000010 /* Punctuation */ +#define _Locale_SPACE (_Locale_S | _Locale_BL) +#define _Locale_PRINT (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \ + _Locale_DIGIT | _Locale_A | _Locale_XDIGIT | \ + _Locale_PR) +#define _Locale_ALPHA _Locale_A + +/* +* All of these except for graph and blank are from the C standard; +* graph and blank are XPG4. (graph in XPG4 doesn't mean quite the +* same thing as graph in the C++ library) +*/ + +#endif /* IRIX */ + + +#if defined( __Lynx__ ) + /* azov: On Lynx isalpha defined as (_U | _L), which gives us a mask + * unusable in ctype_table. So we have to redefine it and use hard-coded + * numbers (to avoid potential clashes if system headers change). + * + * P.S. Actually, I see no reason in using platform-specific masks - + * having just one set of masks for all platforms should work just as + * well - we only use them internally and they don't have to be equal + * to whatever defined in local ctype.h + * + */ +# define _Locale_CNTRL 040 /* _C, Control character */ +# define _Locale_UPPER 01 /* _U, Upper case */ +# define _Locale_LOWER 02 /* _L, Lower case */ +# define _Locale_DIGIT 04 /* _N, Numeral (digit) */ +# define _Locale_XDIGIT 0200 /* _X, heXadecimal digit */ +# define _Locale_PUNCT 020 /* _P, Punctuation */ +# define _Locale_SPACE 010 /* _S, Spacing */ +# define _Locale_ALPHA 040000 /* none, Alphanumerical */ +# define _Locale_PRINT (_Locale_PUNCT | _Locale_UPPER | _Locale_LOWER | \ + _Locale_DIGIT | _Locale_ALPHA | _Locale_XDIGIT |\ + _Locale_SPACE ) /* Printable */ +# endif /* __Lynx__ */ + +#if defined(__GNUC__) || defined (__BORLANDC__) || defined (__COMO__) + +# if defined (__CYGWIN__) + +# define _Locale_CNTRL 040 +# define _Locale_UPPER 02 +# define _Locale_LOWER 01 +# define _Locale_DIGIT 04 +# define _Locale_XDIGIT ( 0100 | _Locale_DIGIT ) +# define _Locale_PUNCT 020 +# define _Locale_SPACE 010 +# define _Locale_ALPHA (_Locale_UPPER | _Locale_LOWER) +# define _Locale_PRINT (_Locale_ALPHA | _Locale_DIGIT | _Locale_PUNCT | 0200 ) + +# elif defined (__FreeBSD__) + +# define _Locale_CNTRL _CTYPE_C +# define _Locale_UPPER _CTYPE_U +# define _Locale_LOWER _CTYPE_L +# define _Locale_DIGIT _CTYPE_D +# define _Locale_XDIGIT _CTYPE_X +# define _Locale_PUNCT _CTYPE_P +# define _Locale_SPACE _CTYPE_S +# define _Locale_PRINT _CTYPE_R +# define _Locale_ALPHA _CTYPE_A + +# elif defined (__NetBSD__) || defined (__amigaos__) + +# define _Locale_CNTRL _C +# define _Locale_UPPER _U +# define _Locale_LOWER _L +# define _Locale_DIGIT _N +# define _Locale_XDIGIT (_N|_X) +# define _Locale_PUNCT _P +# define _Locale_SPACE _S +# define _Locale_PRINT (_P|_U|_L|_N|_B) +# define _Locale_ALPHA (_U|_L) +# elif defined(__EMX__) /* OS/2 with emx runtime */ +# define _Locale_CNTRL _CNTRL +# define _Locale_UPPER _UPPER +# define _Locale_LOWER _LOWER +# define _Locale_DIGIT _DIGIT +# define _Locale_XDIGIT _XDIGIT +# define _Locale_PUNCT _PUNCT +# define _Locale_SPACE _SPACE +# define _Locale_PRINT _PRINT +# define _Locale_ALPHA (_UPPER|_LOWER) + +# elif defined(_STLP_USE_GLIBC) /* linux, using the gnu compiler */ + +/* This section uses macros defined in the gnu libc ctype.h header */ + +# define _Locale_CNTRL _IScntrl +# define _Locale_UPPER _ISupper +# define _Locale_LOWER _ISlower +# define _Locale_DIGIT _ISdigit +# define _Locale_XDIGIT _ISxdigit +# define _Locale_PUNCT _ISpunct +# define _Locale_SPACE _ISspace +# define _Locale_PRINT _ISprint +# define _Locale_ALPHA _ISalpha + +# endif /* GLIBC */ + +#endif /* gnu */ + +#if ( defined(__sun) && defined (__SVR4) ) \ + || (defined (__digital__) && defined (__unix__)) \ + || defined(_AIX) +/* fbp : condition from AT&T code*/ +#if !(defined(__XPG4_CHAR_CLASS__) || defined(_XPG4_2) || \ + (defined(_XOPEN_SOURCE) && (_XOPEN_VERSION - 0 == 4))) && ! defined (_ISCNTRL) + /* fbp : on 2.5.1, the defines are different ;( */ + // # if ( defined (__sun) && defined (__SVR4) && ! defined (_ISCNTRL) ) +# define _ISCNTRL _C +# define _ISUPPER _U +# define _ISLOWER _L +# define _ISDIGIT _N +# define _ISXDIGIT _X +# define _ISPUNCT _P +# define _ISSPACE _S +# define _ISPRINT (_P | _U | _L | _N | _B) +# define _ISALPHA (_U | _L) +# endif + +# define _Locale_CNTRL _ISCNTRL +# define _Locale_UPPER _ISUPPER +# define _Locale_LOWER _ISLOWER +# define _Locale_DIGIT _ISDIGIT +# define _Locale_XDIGIT _ISXDIGIT +# define _Locale_PUNCT _ISPUNCT +# define _Locale_SPACE _ISSPACE +# define _Locale_PRINT _ISPRINT +# define _Locale_ALPHA _ISALPHA +# elif defined(__SYMBIAN32__) +# define _Locale_CNTRL _CTYPE_C +# define _Locale_UPPER _CTYPE_U +# define _Locale_LOWER _CTYPE_L +# define _Locale_DIGIT _CTYPE_D +# define _Locale_XDIGIT _CTYPE_X +# define _Locale_PUNCT _CTYPE_P +# define _Locale_SPACE _CTYPE_S +# define _Locale_PRINT _CTYPE_R +# define _Locale_ALPHA _CTYPE_A + +#elif defined (__MWERKS__) +# define _Locale_CNTRL __control_char +# define _Locale_UPPER __upper_case +# define _Locale_LOWER __lower_case +# define _Locale_DIGIT __digit +# define _Locale_XDIGIT __hex_digit +# define _Locale_PUNCT __punctuation +# define _Locale_SPACE __space_char +# define _Locale_PRINT __printable +# define _Locale_ALPHA __alphanumeric +#elif defined (__BORLANDC__) +# define _Locale_CNTRL _IS_CTL +# define _Locale_UPPER _IS_UPP +# define _Locale_LOWER _IS_LOW +# define _Locale_DIGIT _IS_DIG +# define _Locale_XDIGIT _IS_HEX +# define _Locale_PUNCT _IS_PUN +# define _Locale_SPACE _IS_SP +# define _Locale_PRINT (_IS_SP|_IS_PUN|_IS_UPP|_IS_LOW|_IS_DIG) +# define _Locale_ALPHA _IS_ALPHA +#elif defined (_MSC_VER) || defined (__MINGW32__) +# define _Locale_CNTRL _CONTROL +# define _Locale_UPPER _UPPER +# define _Locale_LOWER _LOWER +# define _Locale_DIGIT _DIGIT +# define _Locale_XDIGIT _HEX +# define _Locale_PUNCT _PUNCT +# define _Locale_SPACE _SPACE +# define _Locale_PRINT (_ALPHA | _DIGIT | _BLANK | _PUNCT) +// is this one has to be so complex ? +# define _Locale_ALPHA ( _ALPHA & ~ (_UPPER | _LOWER )) +#elif defined (__DMC__) +# define _Locale_CNTRL _CONTROL +# define _Locale_UPPER _UPPER +# define _Locale_LOWER _LOWER +# define _Locale_DIGIT _DIGIT +# define _Locale_XDIGIT _HEX +# define _Locale_PUNCT _PUNCT +# define _Locale_SPACE _SPACE +# define _Locale_PRINT (_UPPER | _LOWER | _DIGIT | _PUNCT | _SPACE) +# define _Locale_ALPHA _ALPHA +#elif defined(__MRC__) || defined(__SC__) //*TY 02/24/2000 - added support for MPW +# define _Locale_CNTRL _CTL +# define _Locale_UPPER _UPP +# define _Locale_LOWER _LOW +# define _Locale_DIGIT _DIG +# define _Locale_XDIGIT _HEX +# define _Locale_PUNCT _PUN +# define _Locale_SPACE _BLA +# define _Locale_PRINT (_UPP | _LOW | _DIG | _PUN | _BLA) +# define _Locale_ALPHA (_UPP | _LOW) +#elif defined(__MLCCPP__) +# define _Locale_CNTRL 1 +# define _Locale_UPPER 2 +# define _Locale_LOWER 4 +# define _Locale_DIGIT 8 +# define _Locale_XDIGIT 16 +# define _Locale_PUNCT 32 +# define _Locale_SPACE 64 +# define _Locale_PRINT 128 +# define _Locale_ALPHA 256 + +# elif defined (__GNUC__) && defined (__APPLE__) + +# define _Locale_CNTRL _C +# define _Locale_UPPER _U +# define _Locale_LOWER _L +# define _Locale_DIGIT _D +# define _Locale_XDIGIT _X +# define _Locale_PUNCT _P +# define _Locale_SPACE _S +# define _Locale_PRINT _R +# define _Locale_ALPHA _A + +# elif defined (__hpux) || defined (__osf__) + +# if defined(__HP_aCC) && !defined(_INCLUDE_HPUX_SOURCE) +# define _ISALPHA 0x001 +# define _ISALNUM 0x002 +# define _ISBLANK 0x004 +# define _ISCNTRL 0x008 +# define _ISDIGIT 0x010 +# define _ISGRAPH 0x020 +# define _ISLOWER 0x040 +# define _ISPRINT 0x080 +# define _ISPUNCT 0x100 +# define _ISSPACE 0x200 +# define _ISUPPER 0x400 +# define _ISXDIGIT 0x800 +# endif +# define _Locale_CNTRL _ISCNTRL +# define _Locale_UPPER _ISUPPER +# define _Locale_LOWER _ISLOWER +# define _Locale_DIGIT _ISDIGIT +# define _Locale_XDIGIT _ISXDIGIT +# define _Locale_PUNCT _ISPUNCT +# define _Locale_SPACE _ISSPACE +# define _Locale_PRINT _ISPRINT +# define _Locale_ALPHA _ISALPHA +# elif defined (__MVS__) || defined(__OS400__) +# define _Locale_CNTRL __ISCNTRL +# define _Locale_UPPER __ISUPPER +# define _Locale_LOWER __ISLOWER +# define _Locale_DIGIT __ISDIGIT +# define _Locale_XDIGIT __ISXDIGIT +# define _Locale_PUNCT __ISPUNCT +# define _Locale_SPACE __ISSPACE +# define _Locale_PRINT __ISPRINT +# define _Locale_ALPHA __ISALPHA +# elif defined (__QNXNTO__) || defined (__WATCOMC__) +# define _Locale_CNTRL _CNTRL +# define _Locale_UPPER _UPPER +# define _Locale_LOWER _LOWER +# define _Locale_DIGIT _DIGIT +# define _Locale_XDIGIT _XDIGT +# define _Locale_PUNCT _PUNCT +# define _Locale_SPACE _SPACE +# define _Locale_PRINT _PRINT +# define _Locale_ALPHA (_UPPER | _LOWER) +#elif defined (__DJGPP) +# define _Locale_CNTRL __dj_ISCNTRL +# define _Locale_UPPER __dj_ISUPPER +# define _Locale_LOWER __dj_ISLOWER +# define _Locale_DIGIT __dj_ISDIGIT +# define _Locale_XDIGIT __dj_ISXDIGIT +# define _Locale_PUNCT __dj_ISPUNCT +# define _Locale_SPACE __dj_ISSPACE +# define _Locale_PRINT __dj_ISPRINT +# define _Locale_ALPHA __dj_ISALPHA +#elif defined (_STLP_SCO_OPENSERVER) +# define _Locale_CNTRL _C +# define _Locale_UPPER _U +# define _Locale_LOWER _L +# define _Locale_DIGIT _N +# define _Locale_XDIGIT _X +# define _Locale_PUNCT _P +# define _Locale_SPACE _S +# define _Locale_PRINT _R +# define _Locale_ALPHA _A +#elif defined (__NCR_SVR) +# define _Locale_CNTRL _C +# define _Locale_UPPER _U +# define _Locale_LOWER _L +# define _Locale_DIGIT _N +# define _Locale_XDIGIT _X +# define _Locale_PUNCT _P +# define _Locale_SPACE _S +# define _Locale_PRINT (_P | _U | _L | _N | _B) +# define _Locale_ALPHA (_U | _L) +#elif defined (_CRAY) +# define _Locale_CNTRL _CNTRL +# define _Locale_UPPER _UPPER +# define _Locale_LOWER _LOWER +# define _Locale_DIGIT _DIGIT +# define _Locale_XDIGIT _XDIGIT +# define _Locale_PUNCT _PUNCT +# define _Locale_SPACE _SPACE +# define _Locale_PRINT _PRINT +# define _Locale_ALPHA _ALPHA +#elif defined (_STLP_VXWORKS_TORNADO) +#define _Locale_UPPER _C_UPPER /* 0x01 */ +#define _Locale_LOWER _C_LOWER /* 0x02 */ +#define _Locale_DIGIT _C_NUMBER /* 0x04 */ +#define _Locale_SPACE _C_WHITE_SPACE /* 0x08 */ +#define _Locale_PUNCT _C_PUNCT /* 0x10 */ +#define _Locale_CNTRL _C_CONTROL /* 0x20 */ +#define _Locale_XDIGIT _C_HEX_NUMBER /* 0x40 */ +#define _Locale_PRINT (_C_B | _C_UPPER | _C_LOWER | _C_NUMBER | _C_PUNCT) +#define _Locale_ALPHA (_C_UPPER | _C_LOWER) +#endif + +# endif /* _STLP_C_LOCALE_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/char_traits.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/char_traits.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,266 @@ +/* + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_CHAR_TRAITS_H +#define _STLP_CHAR_TRAITS_H + +// Define char_traits + +# if defined (_STLP_OWN_IOSTREAMS) || ! defined (_STLP_USE_NEW_IOSTREAMS) + +# if ! defined (_STLP_CSTDDEF) +# include +# endif + +#if ! defined (_STLP_CSTRING) +# include +#endif + +#if defined (_STLP_UNIX) && defined (_STLP_HAS_NO_NEW_C_HEADERS) +#include // For off_t +#endif /* __unix */ + +#ifdef __BORLANDC__ +# include +# include +# include <_stddef.h> +// class mbstate_t; +#endif + +#ifndef __TYPE_TRAITS_H +# include +#endif + +# if !defined (_STLP_CWCHAR) +# include +# endif + +_STLP_BEGIN_NAMESPACE + +# ifdef _STLP_OWN_IOSTREAMS + +template class allocator; + +#define _STLP_NULL_CHAR_INIT(_ChT) _STLP_DEFAULT_CONSTRUCTED(_ChT) + +#if defined (__sgi) && defined (_STLP_HAS_NO_NEW_C_HEADERS) /* IRIX */ +typedef off64_t streamoff; +// #elif defined (__unix) && defined (_STLP_HAS_NO_NEW_C_HEADERS) /* Other version of UNIX */ +// typedef off_t streamoff; +#else /* __unix */ +// boris : here, it's not ptrdiff_t as some Solaris systems have confusing definitions of these. +typedef long streamoff; +#endif /* _STLP_HAS_NO_NEW_C_HEADERS */ + +typedef ptrdiff_t streamsize; + +// Class fpos, which represents a position within a file. (The C++ +// standard calls for it to be defined in . This implementation +// moves it to , which is included by .) +template class fpos +{ +public: // From table 88 of the C++ standard. + fpos(streamoff __pos) : _M_pos(__pos), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {} + fpos() : _M_pos(0), _M_st(_STLP_NULL_CHAR_INIT(_StateT)) {} + + operator streamoff() const { return _M_pos; } + + bool _STLP_CALL operator==(const fpos<_StateT>& __y) const + { return _M_pos == __y._M_pos; } + bool _STLP_CALL operator!=(const fpos<_StateT>& __y) const + { return _M_pos != __y._M_pos; } + + fpos<_StateT>& operator+=(streamoff __off) { + _M_pos += __off; + return *this; + } + fpos<_StateT>& operator-=(streamoff __off) { + _M_pos -= __off; + return *this; + } + + fpos<_StateT> operator+(streamoff __off) { + fpos<_StateT> __tmp(*this); + __tmp += __off; + return __tmp; + } + fpos<_StateT> operator-(streamoff __off) { + fpos<_StateT> __tmp(*this); + __tmp -= __off; + return __tmp; + } + +public: // Manipulation of the state member. + _StateT state() const { return _M_st; } + void state(_StateT __st) { _M_st = __st; } +private: + streamoff _M_pos; + _StateT _M_st; +}; + +typedef fpos streampos; +typedef fpos wstreampos; +# endif + +// Class __char_traits_base. + +template class __char_traits_base { +public: + typedef _CharT char_type; + typedef _IntT int_type; +#ifdef _STLP_USE_NEW_IOSTREAMS + typedef streamoff off_type; + typedef streampos pos_type; +# ifdef _STLP_NO_MBSTATE_T + typedef char state_type; +# else + typedef mbstate_t state_type; +# endif +#endif /* _STLP_USE_NEW_IOSTREAMS */ + + static void _STLP_CALL assign(char_type& __c1, const char_type& __c2) { __c1 = __c2; } + static bool _STLP_CALL eq(const _CharT& __c1, const _CharT& __c2) + { return __c1 == __c2; } + static bool _STLP_CALL lt(const _CharT& __c1, const _CharT& __c2) + { return __c1 < __c2; } + + static int _STLP_CALL compare(const _CharT* __s1, const _CharT* __s2, size_t __n) { + for (size_t __i = 0; __i < __n; ++__i) + if (!eq(__s1[__i], __s2[__i])) + return __s1[__i] < __s2[__i] ? -1 : 1; + return 0; + } + + static size_t _STLP_CALL length(const _CharT* __s) { + const _CharT _NullChar = _STLP_DEFAULT_CONSTRUCTED(_CharT); + size_t __i; + for (__i = 0; !eq(__s[__i], _NullChar); ++__i) + {} + return __i; + } + + static const _CharT* _STLP_CALL find(const _CharT* __s, size_t __n, const _CharT& __c) { + for ( ; __n > 0 ; ++__s, --__n) + if (eq(*__s, __c)) + return __s; + return 0; + } + + + static _CharT* _STLP_CALL move(_CharT* __s1, const _CharT* __s2, size_t _Sz) { + return (_Sz == 0 ? __s1 : (_CharT*)memmove(__s1, __s2, _Sz * sizeof(_CharT))); + } + + static _CharT* _STLP_CALL copy(_CharT* __s1, const _CharT* __s2, size_t __n) { + return (__n == 0 ? __s1 : + (_CharT*)memcpy(__s1, __s2, __n * sizeof(_CharT))); + } + + static _CharT* _STLP_CALL assign(_CharT* __s, size_t __n, _CharT __c) { + for (size_t __i = 0; __i < __n; ++__i) + __s[__i] = __c; + return __s; + } + + static int_type _STLP_CALL not_eof(const int_type& __c) { + return !eq_int_type(__c, eof()) ? __c : __STATIC_CAST(int_type, 0); + } + + static char_type _STLP_CALL to_char_type(const int_type& __c) { + return (char_type)__c; + } + + static int_type _STLP_CALL to_int_type(const char_type& __c) { + return (int_type)__c; + } + + static bool _STLP_CALL eq_int_type(const int_type& __c1, const int_type& __c2) { + return __c1 == __c2; + } + + static int_type _STLP_CALL eof() { + return (int_type)-1; + // return __STATIC_CAST(int_type,-1); + } +}; + +// Generic char_traits class. Note that this class is provided only +// as a base for explicit specialization; it is unlikely to be useful +// as is for any particular user-defined type. In particular, it +// *will not work* for a non-POD type. + +template class char_traits + : public __char_traits_base<_CharT, _CharT> +{}; + +// Specialization for char. + +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC char_traits + : public __char_traits_base +{ +public: + typedef char char_type; + typedef int int_type; +#ifdef _STLP_USE_NEW_IOSTREAMS + typedef streamoff off_type; +# ifndef _STLP_NO_MBSTATE_T + typedef streampos pos_type; + typedef mbstate_t state_type; +# endif +#endif /* _STLP_USE_NEW_IOSTREAMS */ + + static char _STLP_CALL to_char_type(const int& __c) { + return (char)(unsigned char)__c; + } + + static int _STLP_CALL to_int_type(const char& __c) { + return (unsigned char)__c; + } + + static int _STLP_CALL compare(const char* __s1, const char* __s2, size_t __n) + { return memcmp(__s1, __s2, __n); } + + static size_t _STLP_CALL length(const char* __s) { return strlen(__s); } + + static void _STLP_CALL assign(char& __c1, const char& __c2) { __c1 = __c2; } + + static char* _STLP_CALL assign(char* __s, size_t __n, char __c) + { memset(__s, __c, __n); return __s; } +}; + +# if defined (_STLP_HAS_WCHAR_T) +// Specialization for wchar_t. +_STLP_TEMPLATE_NULL class _STLP_CLASS_DECLSPEC char_traits + : public __char_traits_base +{}; +# endif + +_STLP_END_NAMESPACE + +# else /* OWN_IOSTREAMS */ + +# include + +# endif /* OWN_IOSTREAMS */ + +#endif /* _STLP_CHAR_TRAITS_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/concept_checks.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/concept_checks.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,810 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Silicon Graphics makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + */ + +#ifndef __CONCEPT_CHECKS_H +#define __CONCEPT_CHECKS_H + +/* + Use these macro like assertions, but they assert properties + on types (usually template arguments). In technical terms they + verify whether a type "models" a "concept". + + This set of requirements and the terminology used here is derived + from the book "Generic Programming and the STL" by Matt Austern + (Addison Wesley). For further information please consult that + book. The requirements also are intended to match the ANSI/ISO C++ + standard. + + This file covers the basic concepts and the iterator concepts. + There are several other files that provide the requirements + for the STL containers: + container_concepts.h + sequence_concepts.h + assoc_container_concepts.h + + Jeremy Siek, 1999 + + TO DO: + - some issues with regards to concept classification and mutability + including AssociativeContianer -> ForwardContainer + and SortedAssociativeContainer -> ReversibleContainer + - HashedAssociativeContainer + - Allocator + - Function Object Concepts + + */ + +#ifndef _STLP_USE_CONCEPT_CHECKS + +// Some compilers lack the features that are necessary for concept checks. +// On those compilers we define the concept check macros to do nothing. +#define _STLP_REQUIRES(__type_var, __concept) do {} while(0) +#define _STLP_CLASS_REQUIRES(__type_var, __concept) \ + static int __##__type_var##_##__concept +#define _STLP_CONVERTIBLE(__type_x, __type_y) do {} while(0) +#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) do {} while(0) +#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \ + static int __##__type_x##__type_y##_require_same_type +#define _STLP_GENERATOR_CHECK(__func, __ret) do {} while(0) +#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \ + static int __##__func##__ret##_generator_check +#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) do {} while(0) +#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ + static int __##__func##__ret##__arg##_unary_function_check +#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ + do {} while(0) +#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ + static int __##__func##__ret##__first##__second##_binary_function_check +#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + do {} while(0) +#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + static int __##__opname##__ret##__first##__second##_require_binary_op + +#else /* _STLP_USE_CONCEPT_CHECKS */ + +// This macro tests whether the template argument "__type_var" +// satisfies the requirements of "__concept". Here is a list of concepts +// that we know how to check: +// _Allocator +// _Assignable +// _DefaultConstructible +// _EqualityComparable +// _LessThanComparable +// _TrivialIterator +// _InputIterator +// _OutputIterator +// _ForwardIterator +// _BidirectionalIterator +// _RandomAccessIterator +// _Mutable_TrivialIterator +// _Mutable_ForwardIterator +// _Mutable_BidirectionalIterator +// _Mutable_RandomAccessIterator + +#define _STLP_REQUIRES(__type_var, __concept) \ +do { \ + void (*__x)( __type_var ) = __concept##_concept_specification< __type_var >\ + ::##__concept##_requirement_violation; __x = __x; } while (0) + +// Use this to check whether type X is convertible to type Y +#define _STLP_CONVERTIBLE(__type_x, __type_y) \ +do { \ + void (*__x)( __type_x , __type_y ) = _STL_CONVERT_ERROR< __type_x , \ + __type_y >::__type_X_is_not_convertible_to_type_Y; \ + __x = __x; } while (0) + +// Use this to test whether two template arguments are the same type +#define _STLP_REQUIRES_SAME_TYPE(__type_x, __type_y) \ +do { \ + void (*__x)( __type_x , __type_y ) = _STL_SAME_TYPE_ERROR< __type_x, \ + __type_y >::__type_X_not_same_as_type_Y; \ + __x = __x; } while (0) + + +// function object checks +#define _STLP_GENERATOR_CHECK(__func, __ret) \ +do { \ + __ret (*__x)( __func&) = \ + _STL_GENERATOR_ERROR< \ + __func, __ret>::__generator_requirement_violation; \ + __x = __x; } while (0) + + +#define _STLP_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ +do { \ + __ret (*__x)( __func&, const __arg& ) = \ + _STL_UNARY_FUNCTION_ERROR< \ + __func, __ret, __arg>::__unary_function_requirement_violation; \ + __x = __x; } while (0) + + +#define _STLP_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ +do { \ + __ret (*__x)( __func&, const __first&, const __second& ) = \ + _STL_BINARY_FUNCTION_ERROR< \ + __func, __ret, __first, __second>::__binary_function_requirement_violation; \ + __x = __x; } while (0) + + +#define _STLP_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + do { \ + __ret (*__x)( __first&, __second& ) = _STL_BINARY##__opname##_ERROR< \ + __ret, __first, __second>::__binary_operator_requirement_violation; \ + __ret (*__y)( const __first&, const __second& ) = \ + _STL_BINARY##__opname##_ERROR< __ret, __first, __second>:: \ + __const_binary_operator_requirement_violation; \ + __y = __y; __x = __x; } while (0) + + +#ifdef _STLP_NO_FUNCTION_PTR_IN_CLASS_TEMPLATE + +#define _STLP_CLASS_REQUIRES(__type_var, __concept) +#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) +#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) +#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) +#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) +#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) + +#else + +// Use this macro inside of template classes, where you would +// like to place requirements on the template arguments to the class +// Warning: do not pass pointers and such (e.g. T*) in as the __type_var, +// since the type_var is used to construct identifiers. Instead typedef +// the pointer type, then use the typedef name for the __type_var. +#define _STLP_CLASS_REQUIRES(__type_var, __concept) \ + typedef void (* __func##__type_var##__concept)( __type_var ); \ + template <__func##__type_var##__concept _Tp1> \ + struct __dummy_struct_##__type_var##__concept { }; \ + static __dummy_struct_##__type_var##__concept< \ + __concept##_concept_specification< \ + __type_var>::__concept##_requirement_violation> \ + __dummy_ptr_##__type_var##__concept + + +#define _STLP_CLASS_REQUIRES_SAME_TYPE(__type_x, __type_y) \ + typedef void (* __func_##__type_x##__type_y##same_type)( __type_x, \ + __type_y ); \ + template < __func_##__type_x##__type_y##same_type _Tp1> \ + struct __dummy_struct_##__type_x##__type_y##_same_type { }; \ + static __dummy_struct_##__type_x##__type_y##_same_type< \ + _STL_SAME_TYPE_ERROR<__type_x, __type_y>::__type_X_not_same_as_type_Y> \ + __dummy_ptr_##__type_x##__type_y##_same_type + + +#define _STLP_CLASS_GENERATOR_CHECK(__func, __ret) \ + typedef __ret (* __f_##__func##__ret##_generator)( __func& ); \ + template <__f_##__func##__ret##_generator _Tp1> \ + struct __dummy_struct_##__func##__ret##_generator { }; \ + static __dummy_struct_##__func##__ret##_generator< \ + _STL_GENERATOR_ERROR< \ + __func, __ret>::__generator_requirement_violation> \ + __dummy_ptr_##__func##__ret##_generator + + +#define _STLP_CLASS_UNARY_FUNCTION_CHECK(__func, __ret, __arg) \ + typedef __ret (* __f_##__func##__ret##__arg##_unary_check)( __func&, \ + const __arg& ); \ + template <__f_##__func##__ret##__arg##_unary_check _Tp1> \ + struct __dummy_struct_##__func##__ret##__arg##_unary_check { }; \ + static __dummy_struct_##__func##__ret##__arg##_unary_check< \ + _STL_UNARY_FUNCTION_ERROR< \ + __func, __ret, __arg>::__unary_function_requirement_violation> \ + __dummy_ptr_##__func##__ret##__arg##_unary_check + + +#define _STLP_CLASS_BINARY_FUNCTION_CHECK(__func, __ret, __first, __second) \ + typedef __ret (* __f_##__func##__ret##__first##__second##_binary_check)( __func&, const __first&,\ + const __second& ); \ + template <__f_##__func##__ret##__first##__second##_binary_check _Tp1> \ + struct __dummy_struct_##__func##__ret##__first##__second##_binary_check { }; \ + static __dummy_struct_##__func##__ret##__first##__second##_binary_check< \ + _STL_BINARY_FUNCTION_ERROR<__func, __ret, __first, __second>:: \ + __binary_function_requirement_violation> \ + __dummy_ptr_##__func##__ret##__first##__second##_binary_check + + +#define _STLP_CLASS_REQUIRES_BINARY_OP(__opname, __ret, __first, __second) \ + typedef __ret (* __f_##__func##__ret##__first##__second##_binary_op)(const __first&, \ + const __second& ); \ + template <__f_##__func##__ret##__first##__second##_binary_op _Tp1> \ + struct __dummy_struct_##__func##__ret##__first##__second##_binary_op { }; \ + static __dummy_struct_##__func##__ret##__first##__second##_binary_op< \ + _STL_BINARY##__opname##_ERROR<__ret, __first, __second>:: \ + __binary_operator_requirement_violation> \ + __dummy_ptr_##__func##__ret##__first##__second##_binary_op + +#endif + +/* helper class for finding non-const version of a type. Need to have + something to assign to etc. when testing constant iterators. */ + +template +struct _Mutable_trait { + typedef _Tp _Type; +}; +template +struct _Mutable_trait { + typedef _Tp _Type; +}; + + +/* helper function for avoiding compiler warnings about unused variables */ +template +void __sink_unused_warning(_Type) { } + +template +struct _STL_CONVERT_ERROR { + static void + __type_X_is_not_convertible_to_type_Y(_TypeX __x, _TypeY) { + _TypeY __y = __x; + __sink_unused_warning(__y); + } +}; + + +template struct __check_equal { }; + +template +struct _STL_SAME_TYPE_ERROR { + static void + __type_X_not_same_as_type_Y(_TypeX , _TypeY ) { + __check_equal<_TypeX> t1 = __check_equal<_TypeY>(); + } +}; + + +// Some Functon Object Checks + +template +struct _STL_GENERATOR_ERROR { + static _Ret __generator_requirement_violation(_Func& __f) { + return __f(); + } +}; + +template +struct _STL_GENERATOR_ERROR<_Func, void> { + static void __generator_requirement_violation(_Func& __f) { + __f(); + } +}; + + +template +struct _STL_UNARY_FUNCTION_ERROR { + static _Ret + __unary_function_requirement_violation(_Func& __f, + const _Arg& __arg) { + return __f(__arg); + } +}; + +template +struct _STL_UNARY_FUNCTION_ERROR<_Func, void, _Arg> { + static void + __unary_function_requirement_violation(_Func& __f, + const _Arg& __arg) { + __f(__arg); + } +}; + +template +struct _STL_BINARY_FUNCTION_ERROR { + static _Ret + __binary_function_requirement_violation(_Func& __f, + const _First& __first, + const _Second& __second) { + return __f(__first, __second); + } +}; + +template +struct _STL_BINARY_FUNCTION_ERROR<_Func, void, _First, _Second> { + static void + __binary_function_requirement_violation(_Func& __f, + const _First& __first, + const _Second& __second) { + __f(__first, __second); + } +}; + + +#define _STLP_DEFINE_BINARY_OP_CHECK(_OP, _NAME) \ +template \ +struct _STL_BINARY##_NAME##_ERROR { \ + static _Ret \ + __const_binary_operator_requirement_violation(const _First& __first, \ + const _Second& __second) { \ + return __first _OP __second; \ + } \ + static _Ret \ + __binary_operator_requirement_violation(_First& __first, \ + _Second& __second) { \ + return __first _OP __second; \ + } \ +} + +_STLP_DEFINE_BINARY_OP_CHECK(==, _OP_EQUAL); +_STLP_DEFINE_BINARY_OP_CHECK(!=, _OP_NOT_EQUAL); +_STLP_DEFINE_BINARY_OP_CHECK(<, _OP_LESS_THAN); +_STLP_DEFINE_BINARY_OP_CHECK(<=, _OP_LESS_EQUAL); +_STLP_DEFINE_BINARY_OP_CHECK(>, _OP_GREATER_THAN); +_STLP_DEFINE_BINARY_OP_CHECK(>=, _OP_GREATER_EQUAL); +_STLP_DEFINE_BINARY_OP_CHECK(+, _OP_PLUS); +_STLP_DEFINE_BINARY_OP_CHECK(*, _OP_TIMES); +_STLP_DEFINE_BINARY_OP_CHECK(/, _OP_DIVIDE); +_STLP_DEFINE_BINARY_OP_CHECK(-, _OP_SUBTRACT); +_STLP_DEFINE_BINARY_OP_CHECK(%, _OP_MOD); +// ... + +// TODO, add unary operators (prefix and postfix) + +/* + The presence of this class is just to trick EDG into displaying + these error messages before any other errors. Without the + classes, the errors in the functions get reported after + other class errors deep inside the library. The name + choice just makes for an eye catching error message :) + */ +struct _STL_ERROR { + + template + static _Type + __default_constructor_requirement_violation(_Type) { + return _Type(); + } + template + static _Type + __assignment_operator_requirement_violation(_Type __a) { + __a = __a; + return __a; + } + template + static _Type + __copy_constructor_requirement_violation(_Type __a) { + _Type __c(__a); + return __c; + } + template + static _Type + __const_parameter_required_for_copy_constructor(_Type /* __a */, + const _Type& __b) { + _Type __c(__b); + return __c; + } + template + static _Type + __const_parameter_required_for_assignment_operator(_Type __a, + const _Type& __b) { + __a = __b; + return __a; + } + template + static _Type + __less_than_comparable_requirement_violation(_Type __a, _Type __b) { + if (__a < __b || __a > __b || __a <= __b || __a >= __b) return __a; + return __b; + } + template + static _Type + __equality_comparable_requirement_violation(_Type __a, _Type __b) { + if (__a == __b || __a != __b) return __a; + return __b; + } + template + static void + __dereference_operator_requirement_violation(_Iterator __i) { + __sink_unused_warning(*__i); + } + template + static void + __dereference_operator_and_assignment_requirement_violation(_Iterator __i) { + *__i = *__i; + } + template + static void + __preincrement_operator_requirement_violation(_Iterator __i) { + ++__i; + } + template + static void + __postincrement_operator_requirement_violation(_Iterator __i) { + __i++; + } + template + static void + __predecrement_operator_requirement_violation(_Iterator __i) { + --__i; + } + template + static void + __postdecrement_operator_requirement_violation(_Iterator __i) { + __i--; + } + template + static void + __postincrement_operator_and_assignment_requirement_violation(_Iterator __i, + _Type __t) { + *__i++ = __t; + } + template + static _Iterator + __iterator_addition_assignment_requirement_violation(_Iterator __i, + _Distance __n) { + __i += __n; + return __i; + } + template + static _Iterator + __iterator_addition_requirement_violation(_Iterator __i, _Distance __n) { + __i = __i + __n; + __i = __n + __i; + return __i; + } + template + static _Iterator + __iterator_subtraction_assignment_requirement_violation(_Iterator __i, + _Distance __n) { + __i -= __n; + return __i; + } + template + static _Iterator + __iterator_subtraction_requirement_violation(_Iterator __i, _Distance __n) { + __i = __i - __n; + return __i; + } + template + static _Distance + __difference_operator_requirement_violation(_Iterator __i, _Iterator __j, + _Distance __n) { + __n = __i - __j; + return __n; + } + template + static _Type + __element_access_operator_requirement_violation(_Exp __x, _Type*, + _Distance __n) { + return __x[__n]; + } + template + static void + __element_assignment_operator_requirement_violation(_Exp __x, + _Type* __t, + _Distance __n) { + __x[__n] = *__t; + } + +}; /* _STL_ERROR */ + +/* Associated Type Requirements */ + +_STLP_BEGIN_NAMESPACE +template struct iterator_traits; +_STLP_END_NAMESPACE + +template +struct __value_type_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::value_type value_type; +}; + +template +struct __difference_type_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::difference_type + difference_type; +}; + +template +struct __reference_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::reference reference; +}; + +template +struct __pointer_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::pointer pointer; +}; + +template +struct __iterator_category_type_definition_requirement_violation { + typedef typename __STD::iterator_traits<_Iter>::iterator_category + iterator_category; +}; + +/* Assignable Requirements */ + + +template +struct _Assignable_concept_specification { + static void _Assignable_requirement_violation(_Type __a) { + _STL_ERROR::__assignment_operator_requirement_violation(__a); + _STL_ERROR::__copy_constructor_requirement_violation(__a); + _STL_ERROR::__const_parameter_required_for_copy_constructor(__a,__a); + _STL_ERROR::__const_parameter_required_for_assignment_operator(__a,__a); + } +}; + +/* DefaultConstructible Requirements */ + + +template +struct _DefaultConstructible_concept_specification { + static void _DefaultConstructible_requirement_violation(_Type __a) { + _STL_ERROR::__default_constructor_requirement_violation(__a); + } +}; + +/* EqualityComparable Requirements */ + +template +struct _EqualityComparable_concept_specification { + static void _EqualityComparable_requirement_violation(_Type __a) { + _STL_ERROR::__equality_comparable_requirement_violation(__a, __a); + } +}; + +/* LessThanComparable Requirements */ +template +struct _LessThanComparable_concept_specification { + static void _LessThanComparable_requirement_violation(_Type __a) { + _STL_ERROR::__less_than_comparable_requirement_violation(__a, __a); + } +}; + +/* TrivialIterator Requirements */ + +template +struct _TrivialIterator_concept_specification { +static void +_TrivialIterator_requirement_violation(_TrivialIterator __i) { + typedef typename + __value_type_type_definition_requirement_violation<_TrivialIterator>:: + value_type __T; + // Refinement of Assignable + _Assignable_concept_specification<_TrivialIterator>:: + _Assignable_requirement_violation(__i); + // Refinement of DefaultConstructible + _DefaultConstructible_concept_specification<_TrivialIterator>:: + _DefaultConstructible_requirement_violation(__i); + // Refinement of EqualityComparable + _EqualityComparable_concept_specification<_TrivialIterator>:: + _EqualityComparable_requirement_violation(__i); + // Valid Expressions + _STL_ERROR::__dereference_operator_requirement_violation(__i); +} +}; + +template +struct _Mutable_TrivialIterator_concept_specification { +static void +_Mutable_TrivialIterator_requirement_violation(_TrivialIterator __i) { + _TrivialIterator_concept_specification<_TrivialIterator>:: + _TrivialIterator_requirement_violation(__i); + // Valid Expressions + _STL_ERROR::__dereference_operator_and_assignment_requirement_violation(__i); +} +}; + +/* InputIterator Requirements */ + +template +struct _InputIterator_concept_specification { +static void +_InputIterator_requirement_violation(_InputIterator __i) { + // Refinement of TrivialIterator + _TrivialIterator_concept_specification<_InputIterator>:: + _TrivialIterator_requirement_violation(__i); + // Associated Types + __difference_type_type_definition_requirement_violation<_InputIterator>(); + __reference_type_definition_requirement_violation<_InputIterator>(); + __pointer_type_definition_requirement_violation<_InputIterator>(); + __iterator_category_type_definition_requirement_violation<_InputIterator>(); + // Valid Expressions + _STL_ERROR::__preincrement_operator_requirement_violation(__i); + _STL_ERROR::__postincrement_operator_requirement_violation(__i); +} +}; + +/* OutputIterator Requirements */ + +template +struct _OutputIterator_concept_specification { +static void +_OutputIterator_requirement_violation(_OutputIterator __i) { + // Refinement of Assignable + _Assignable_concept_specification<_OutputIterator>:: + _Assignable_requirement_violation(__i); + // Associated Types + __iterator_category_type_definition_requirement_violation<_OutputIterator>(); + // Valid Expressions + _STL_ERROR::__dereference_operator_requirement_violation(__i); + _STL_ERROR::__preincrement_operator_requirement_violation(__i); + _STL_ERROR::__postincrement_operator_requirement_violation(__i); + _STL_ERROR:: + __postincrement_operator_and_assignment_requirement_violation(__i, *__i); +} +}; + +/* ForwardIterator Requirements */ + +template +struct _ForwardIterator_concept_specification { +static void +_ForwardIterator_requirement_violation(_ForwardIterator __i) { + // Refinement of InputIterator + _InputIterator_concept_specification<_ForwardIterator>:: + _InputIterator_requirement_violation(__i); +} +}; + +template +struct _Mutable_ForwardIterator_concept_specification { +static void +_Mutable_ForwardIterator_requirement_violation(_ForwardIterator __i) { + _ForwardIterator_concept_specification<_ForwardIterator>:: + _ForwardIterator_requirement_violation(__i); + // Refinement of OutputIterator + _OutputIterator_concept_specification<_ForwardIterator>:: + _OutputIterator_requirement_violation(__i); +} +}; + +/* BidirectionalIterator Requirements */ + +template +struct _BidirectionalIterator_concept_specification { +static void +_BidirectionalIterator_requirement_violation(_BidirectionalIterator __i) { + // Refinement of ForwardIterator + _ForwardIterator_concept_specification<_BidirectionalIterator>:: + _ForwardIterator_requirement_violation(__i); + // Valid Expressions + _STL_ERROR::__predecrement_operator_requirement_violation(__i); + _STL_ERROR::__postdecrement_operator_requirement_violation(__i); +} +}; + +template +struct _Mutable_BidirectionalIterator_concept_specification { +static void +_Mutable_BidirectionalIterator_requirement_violation( + _BidirectionalIterator __i) +{ + _BidirectionalIterator_concept_specification<_BidirectionalIterator>:: + _BidirectionalIterator_requirement_violation(__i); + // Refinement of mutable_ForwardIterator + _Mutable_ForwardIterator_concept_specification<_BidirectionalIterator>:: + _Mutable_ForwardIterator_requirement_violation(__i); + typedef typename + __value_type_type_definition_requirement_violation< + _BidirectionalIterator>::value_type __T; + typename _Mutable_trait<__T>::_Type* __tmp_ptr = 0; + // Valid Expressions + _STL_ERROR:: + __postincrement_operator_and_assignment_requirement_violation(__i, + *__tmp_ptr); +} +}; + +/* RandomAccessIterator Requirements */ + +template +struct _RandomAccessIterator_concept_specification { +static void +_RandomAccessIterator_requirement_violation(_RandAccIter __i) { + // Refinement of BidirectionalIterator + _BidirectionalIterator_concept_specification<_RandAccIter>:: + _BidirectionalIterator_requirement_violation(__i); + // Refinement of LessThanComparable + _LessThanComparable_concept_specification<_RandAccIter>:: + _LessThanComparable_requirement_violation(__i); + typedef typename + __value_type_type_definition_requirement_violation<_RandAccIter> + ::value_type + value_type; + typedef typename + __difference_type_type_definition_requirement_violation<_RandAccIter> + ::difference_type + _Dist; + typedef typename _Mutable_trait<_Dist>::_Type _MutDist; + + // Valid Expressions + _STL_ERROR::__iterator_addition_assignment_requirement_violation(__i, + _MutDist()); + _STL_ERROR::__iterator_addition_requirement_violation(__i, + _MutDist()); + _STL_ERROR:: + __iterator_subtraction_assignment_requirement_violation(__i, + _MutDist()); + _STL_ERROR::__iterator_subtraction_requirement_violation(__i, + _MutDist()); + _STL_ERROR::__difference_operator_requirement_violation(__i, __i, + _MutDist()); + typename _Mutable_trait::_Type* __dummy_ptr = 0; + _STL_ERROR::__element_access_operator_requirement_violation(__i, + __dummy_ptr, + _MutDist()); +} +}; + +template +struct _Mutable_RandomAccessIterator_concept_specification { +static void +_Mutable_RandomAccessIterator_requirement_violation(_RandAccIter __i) +{ + _RandomAccessIterator_concept_specification<_RandAccIter>:: + _RandomAccessIterator_requirement_violation(__i); + // Refinement of mutable_BidirectionalIterator + _Mutable_BidirectionalIterator_concept_specification<_RandAccIter>:: + _Mutable_BidirectionalIterator_requirement_violation(__i); + typedef typename + __value_type_type_definition_requirement_violation<_RandAccIter> + ::value_type + value_type; + typedef typename + __difference_type_type_definition_requirement_violation<_RandAccIter> + ::difference_type + _Dist; + + typename _Mutable_trait::_Type* __tmp_ptr = 0; + // Valid Expressions + _STL_ERROR::__element_assignment_operator_requirement_violation(__i, + __tmp_ptr, _Dist()); +} +}; + +#define _STLP_TYPEDEF_REQUIREMENT(__REQUIREMENT) \ +template \ +struct __##__REQUIREMENT##__typedef_requirement_violation { \ + typedef typename Type::__REQUIREMENT __REQUIREMENT; \ +}; + +_STLP_TYPEDEF_REQUIREMENT(value_type); +_STLP_TYPEDEF_REQUIREMENT(difference_type); +_STLP_TYPEDEF_REQUIREMENT(size_type); +_STLP_TYPEDEF_REQUIREMENT(reference); +_STLP_TYPEDEF_REQUIREMENT(const_reference); +_STLP_TYPEDEF_REQUIREMENT(pointer); +_STLP_TYPEDEF_REQUIREMENT(const_pointer); + + +template +struct _Allocator_concept_specification { +static void +_Allocator_requirement_violation(_Alloc __a) { + // Refinement of DefaultConstructible + _DefaultConstructible_concept_specification<_Alloc>:: + _DefaultConstructible_requirement_violation(__a); + // Refinement of EqualityComparable + _EqualityComparable_concept_specification<_Alloc>:: + _EqualityComparable_requirement_violation(__a); + // Associated Types + __value_type__typedef_requirement_violation<_Alloc>(); + __difference_type__typedef_requirement_violation<_Alloc>(); + __size_type__typedef_requirement_violation<_Alloc>(); + __reference__typedef_requirement_violation<_Alloc>(); + __const_reference__typedef_requirement_violation<_Alloc>(); + __pointer__typedef_requirement_violation<_Alloc>(); + __const_pointer__typedef_requirement_violation<_Alloc>(); + typedef typename _Alloc::value_type _Type; + _STLP_REQUIRES_SAME_TYPE(typename _Alloc::rebind<_Type>::other, _Alloc); +} +}; + +#endif /* _STLP_USE_CONCEPT_CHECKS */ + +#endif /* __CONCEPT_CHECKS_H */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/_mwerks.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/_mwerks.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,161 @@ +// STLport configuration file +// It is internal STLport header - DO NOT include it directly + +#define _STLP_COMPILER "Metrowerk Codewarrior" + +// Bring in definition of __MSL__ and related items +#include +#include + +// +// Compiler features +// + + +// *** CodeWarrior Compiler Common Features *** +# if __option(longlong) +# define _STLP_LONG_LONG long long +# endif + +# define _STLP_USE_UNIX_EMULATION_IO 1 + +# define _STLP_USE_AUTO_PTR_CONVERSIONS 1 + +# ifdef __INTEL__ +# define _STLP_LITTLE_ENDIAN +# else +# define _STLP_BIG_ENDIAN +# endif + +#if defined(_MSL_NO_LOCALE) +#define _STLP_NO_IMPORT_LOCALE +#endif +#if !__option( wchar_type ) +# define _STLP_WCHAR_T_IS_USHORT +#endif + +# if __MWERKS__ < 0x3000 +// *** CodeWarrior Compiler Common Bugs *** +# define __MSL_FIX_ITERATORS__(myType) // Some MSL headers rely on this +# define _STLP_NO_FRIEND_TEMPLATES 1 // Bug mysteriously reintroduced in this version. +# define _STLP_THROW_RETURN_BUG 1 +# endif + +// *** Version-specific settings *** + +# if __MWERKS__ >= 0x2405 +# define _STLP_HAS_NATIVE_FLOAT_ABS +# endif + +# if __MWERKS__ < 0x2405 +# define _STLP_STATIC_CONST_INIT_BUG +# endif + +# if __MWERKS__ <= 0x2303 +# define _STLP_NO_TEMPLATE_CONVERSIONS 1 +# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 +# endif + +# if __MWERKS__ < 0x2301 +# define _STLP_MEMBER_SPECIALIZATION_BUG 1 +# endif + +# if __MWERKS__ < 0x2300 // CW Pro5 features +# define _STLP_INLINE_MEMBER_TEMPLATES 1 +# define _STLP_RELOPS_IN_STD_BUG 1 +# define _STLP_DEF_CONST_PLCT_NEW_BUG 1 +# define _STLP_DEF_CONST_DEF_PARAM_BUG 1 +# define _STLP_NO_TYPENAME_ON_RETURN_TYPE +# endif + +# if __MWERKS__ < 0x2200 // CW Pro4 features +# define _STLP_BROKEN_USING_DIRECTIVE 1 +# define _STLP_NO_MEMBER_TEMPLATES 1 +# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 +# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 +# define _STLP_NO_FRIEND_TEMPLATES 1 +# define _STLP_NO_QUALIFIED_FRIENDS 1 +# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 +# endif + +# if __MWERKS__ < 0x2100 // CW Pro3 features +# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +# define _STLP_HAS_NO_NAMESPACES 1 +# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 + +# define _STLP_NEED_TYPENAME 1 +# define _STLP_NO_ARROW_OPERATOR 1 +# define _STLP_TEMPLATE_PARAM_SUBTYPE_BUG 1 +# define _STLP_FORCED_INLINE_INSTANTIATION_BUG 1 +# define _STLP_MULTI_CONST_TEMPLATE_ARG_BUG 1 +# define _STLP_INLINE_NAME_RESOLUTION_BUG 1 +// *** Metrowerks Standard Library Bug *** +# define _STLP_MSVC50_COMPATIBILITY 1 +# endif + +# if __MWERKS__ < 0x2000 // v. 2.0 features +# define _STLP_NO_WCHAR_T 1 +# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1 +# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 // dwa 8/21/97 - this bug fixed for CWPro2 +# endif + +# if __MWERKS__ < 0x1900 // dwa 8/19/97 - 1.9 Compiler feature defines +# define _STLP_LIMITED_DEFAULT_TEMPLATES 1 +# define _STLP_BASE_TYPEDEF_BUG 1 +# define _STLP_BASE_MATCH_BUG 1 +# define _STLP_NONTEMPL_BASE_MATCH_BUG 1 +# define _STLP_DEFAULT_TYPE_PARAM 1 // More limited template parameters + +# if __MWERKS__ < 0x1800 + __GIVE_UP_WITH_STL(CW_18) +# endif + +# endif + + +// fixes to native inclusion wrappers. +# if __MWERKS__ >= 0x2300 // CWPro5 changes paths - dwa 2/28/99 +# define _STLP_NATIVE_INCLUDE_PATH ../include +# define _STLP_NATIVE_C_INCLUDE_PATH ../include +# define _STLP_NATIVE_HEADER(header) <../include/##header> +# define _STLP_NATIVE_CPP_C_HEADER(header) <../include/##header> +# define _STLP_NATIVE_C_HEADER(header) <../include/##header> +# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header> +# else + +# define _STLP_NATIVE_INCLUDE_PATH Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include +# define _STLP_NATIVE_C_INCLUDE_PATH Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes +# define _STLP_NATIVE_HEADER(header) +# define _STLP_NATIVE_CPP_C_HEADER(header) +# define _STLP_NATIVE_C_HEADER(header) +# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) + +# endif + +//Following block come from boost intrinsics.hpp file: +#if defined (__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) + // Metrowerks compiler is acquiring intrinsic type traits support + // post version 8. We hook into the published interface to pick up + // user defined specializations as well as compiler intrinsics as + // and when they become available: +# include +# define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) Metrowerks::has_trivial_default_ctor::value +# define _STLP_HAS_TRIVIAL_COPY(T) Metrowerks::has_trivial_copy_ctor::value +# define _STLP_HAS_TRIVIAL_ASSIGN(T) Metrowerks::has_trivial_assignment::value +# define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) Metrowerks::has_trivial_dtor::value +# define _STLP_IS_POD(T) Metrowerks::is_POD::value +# define _STLP_HAS_TYPE_TRAITS_INTRINSICS +#endif + +// fbp +# if !defined( __MSL_CPP__ ) || __MSL_CPP__ <= 0x4105 +# define _STLP_NO_NATIVE_WIDE_STREAMS 1 +# endif + +# if defined(__MACH__) +# define _STLP_MAC +# define O_BINARY 0 +# elif defined(macintosh) +# define _NOTHREADS +# endif +# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1 diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/_native_headers.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/_native_headers.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,50 @@ + /* + * + * Copyright (c) 2006 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#if !defined (_STLP_MAKE_HEADER) +# define _STLP_MAKE_HEADER(path, header) +#endif + +#if !defined (_STLP_NATIVE_HEADER) +# if !defined (_STLP_NATIVE_INCLUDE_PATH) +# define _STLP_NATIVE_INCLUDE_PATH ../include +# endif +# define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header) +#endif + +/* For some compilers, C headers like are located in separate directory */ +#if !defined (_STLP_NATIVE_C_HEADER) +# if !defined (_STLP_NATIVE_C_INCLUDE_PATH) +# define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +# endif +# define _STLP_NATIVE_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_C_INCLUDE_PATH,header) +#endif + +/* For some compilers, C-library headers like are located in separate directory */ +#if !defined (_STLP_NATIVE_CPP_C_HEADER) +# if !defined (_STLP_NATIVE_CPP_C_INCLUDE_PATH) +# define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +# endif +# define _STLP_NATIVE_CPP_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_C_INCLUDE_PATH,header) +#endif + +/* Some compilers locate basic C++ runtime support headers (, , ) in separate directory */ +#if !defined ( _STLP_NATIVE_CPP_RUNTIME_HEADER ) +# if !defined (_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH) +# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +# endif +# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH,header) +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/_system.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/_system.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,179 @@ +/* + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* + * Purpose of this file : + * + * To hold COMPILER-SPECIFIC portion of STLport settings. + * In general, user should not edit this file unless + * using the compiler not recognized below. + * + * If your compiler is not being recognized yet, + * please look for definitions of macros in stl_mycomp.h, + * copy stl_mycomp.h to stl_YOUR_COMPILER_NAME, + * adjust flags for your compiler, and add + * to the secton controlled by unique macro defined internaly by your compiler. + * + * To change user-definable settings, please edit + * + */ + +#ifndef __stl_config__system_h +#define __stl_config__system_h + +#if defined (__sun) +# include +# if defined (__GNUC__) +# include +# elif defined (__SUNPRO_CC) +# include +/* +# ifdef __KCC +# include +# endif +*/ +# elif defined (__APOGEE__) /* Apogee 4.x */ +# include +# elif defined (__FCC_VERSION) /* Fujitsu Compiler, v4.0 assumed */ +# include +# endif +#elif defined (__hpux) +# include +# if defined (__GNUC__) +# include +# elif defined (__HP_aCC) +# include +# endif +#elif defined (linux) || defined (__linux__) +# include +/* Intel's icc define __GNUC__! */ +# if defined (__INTEL_COMPILER) +# include +# elif defined (__GNUC__) +# include +# endif +/* +# ifdef __KCC +# include +# endif +*/ +#elif defined (__FreeBSD__) +# include +# if defined (__GNUC__) +# include +# endif +#elif defined (__OpenBSD__) +# include +# if defined (__GNUC__) +# include +# endif +#elif defined (N_PLAT_NLM) /* Novell NetWare */ +# include +# ifdef __MWERKS__ /* Metrowerks CodeWarrior */ +# include +# endif +#elif defined (__sgi) /* IRIX? */ +# define _STLP_PLATFORM "SGI Irix" +# if defined (__GNUC__) +# include +# else +# include +# endif +#elif defined (__OS400__) /* AS/400 C++ */ +# define _STLP_PLATFORM "OS 400" +# if defined (__GNUC__) +# include +# else +# include +# endif +#elif defined (_AIX) +# include +# if defined (__xlC__) || defined (__IBMC__) || defined ( __IBMCPP__ ) + /* AIX xlC, Visual Age C++ , OS-390 C++ */ +# include +# endif +#elif defined (_CRAY) /* Cray C++ 3.4 or 3.5 */ +# define _STLP_PLATFORM "Cray" +# include +#elif defined (__DECCXX) || defined (__DECC) +# define _STLP_PLATFORM "DECC" +# ifdef __vms +# include +# else +# include +# endif +#elif defined (macintosh) || defined (_MAC) +# include +# if defined (__MWERKS__) +# include +# elif defined (__MRC__) || (defined (__SC__) && (__SC__ >= 0x882)) + /* Apple MPW SCpp 8.8.2, Apple MPW MrCpp 4.1.0 */ +# include +# endif +#elif defined (__APPLE__) +# include +# ifdef __GNUC__ +# include +# endif +#elif defined (__CYGWIN__) +# include +# if defined (__GNUC__) +# include +# endif +#elif defined (__MINGW32__) +# define _STLP_PLATFORM "MinGW" +# if defined (__GNUC__) +# include +# endif +# include +#elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__) || \ + defined (__WIN16) || defined (WIN16) || defined (_WIN16) +# if defined ( __BORLANDC__ ) /* Borland C++ ( 4.x - 5.x ) */ +# include +# elif defined (__WATCOM_CPLUSPLUS__) || defined (__WATCOMC__) /* Watcom C++ */ +# include +# elif defined (__COMO__) || defined (__COMO_VERSION_) +# include +# elif defined (__DMC__) /* Digital Mars C++ */ +# include +# elif defined (__SC__) && (__SC__ < 0x800) /* Symantec 7.5 */ +# include +# elif defined (__ICL) /* Intel reference compiler for Win */ +# include +# elif defined (__MWERKS__) +# include +# elif defined (_MSC_VER) && (_MSC_VER >= 1200) && defined (UNDER_CE) + /* Microsoft eMbedded Visual C++ 3.0, 4.0 (.NET) */ +# include +# elif defined (_MSC_VER) + /* Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0 */ +# include +# endif + +# include +#else +# error Unknown platform !! +#endif + +#if !defined (_STLP_COMPILER) +/* Unable to identify the compiler, issue error diagnostic. + * Edit to set STLport up for your compiler. */ +# include +#endif + +#endif /* __stl_config__system_h */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/_windows.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/_windows.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,209 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * Copyright (c) 2003 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ +#ifndef _STLP_INTERNAL_WINDOWS_H +#define _STLP_INTERNAL_WINDOWS_H + +#if !defined (_STLP_PLATFORM) +# define _STLP_PLATFORM "Windows" +#endif + +#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN) +# if defined (_MIPSEB) +# define _STLP_BIG_ENDIAN 1 +# endif +# if defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \ + defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \ + defined (__alpha__) +# define _STLP_LITTLE_ENDIAN 1 +# endif +# if defined (__ia64__) + /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */ +# if defined (__BIG_ENDIAN__) +# define _STLP_BIG_ENDIAN 1 +# else +# define _STLP_LITTLE_ENDIAN 1 +# endif +# endif +#endif /* _STLP_BIG_ENDIAN */ + +#if !defined (_STLP_WINDOWS_H_INCLUDED) +# define _STLP_WINDOWS_H_INCLUDED +# if !(defined ( _STLP_MSVC ) || defined (__BORLANDC__) || defined (__ICL) || defined (__WATCOMC__) || \ + defined (__MINGW32__) || defined (__DMC__)) +# if defined (_STLP_USE_MFC) +# include +# else +# include +# endif +# else +/* This section serves as a replacement for windows.h header for Visual C++ */ +# if defined (__cplusplus) +extern "C" { +# endif +# if (defined (_M_AMD64) || defined (_M_IA64) || (!defined (_STLP_WCE) && defined (_M_MRX000)) || defined (_M_ALPHA) || \ + (defined (_M_PPC) && (_STLP_MSVC_LIB >= 1000))) && !defined (RC_INVOKED) +# define InterlockedIncrement _InterlockedIncrement +# define InterlockedDecrement _InterlockedDecrement +# define InterlockedExchange _InterlockedExchange +/* Here we use a different macro name than the InterlockedExchangePointer SDK function + * to avoid macro definition conflict as the SDK might already define InterlockedExchangePointer + * as a macro. + */ +# define STLPInterlockedExchangePointer _InterlockedExchangePointer +# define _STLP_STDCALL +# else +# if defined (_MAC) +# define _STLP_STDCALL _cdecl +# else +# define _STLP_STDCALL __stdcall +# endif +# endif + +# if defined (_STLP_NEW_PLATFORM_SDK) +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long); +# if defined (STLPInterlockedExchangePointer) +_STLP_IMPORT_DECLSPEC void* _STLP_STDCALL STLPInterlockedExchangePointer(void* volatile *, void*); +# endif +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchangeAdd(long volatile *, long); +# elif defined (_STLP_WCE) + +/* start of eMbedded Visual C++ specific section */ +# include /* needed for basic windows types */ + + /** in SDKs generated with PB5, windef.h somehow includes headers which then + define setjmp. */ +# if (_WIN32_WCE >= 0x500) +# define _STLP_NATIVE_SETJMP_H_INCLUDED +# endif + +# ifndef _WINBASE_ /* winbase.h already included? */ +long WINAPI InterlockedIncrement(long*); +long WINAPI InterlockedDecrement(long*); +long WINAPI InterlockedExchange(long*, long); +# endif + +# ifndef __WINDOWS__ /* windows.h already included? */ + +# if defined (x86) +# include /* needed for inline versions of Interlocked* functions */ +# endif + +# ifndef _MFC_VER + +# define MessageBox MessageBoxW +int WINAPI MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType); + +# define wvsprintf wvsprintfW +int WINAPI wvsprintfW(LPWSTR, LPCWSTR, va_list ArgList); + +void WINAPI ExitThread(DWORD dwExitCode); + +# if !defined (COREDLL) +# define _STLP_WCE_WINBASEAPI DECLSPEC_IMPORT +# else +# define _STLP_WCE_WINBASEAPI +# endif + +_STLP_WCE_WINBASEAPI int WINAPI +MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, + int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); + +_STLP_WCE_WINBASEAPI UINT WINAPI GetACP(); + +_STLP_WCE_WINBASEAPI BOOL WINAPI TerminateProcess(HANDLE hProcess, DWORD uExitCode); + +# define OutputDebugString OutputDebugStringW +void WINAPI OutputDebugStringW(LPCWSTR); + +_STLP_WCE_WINBASEAPI void WINAPI Sleep(DWORD); + +# undef _STLP_WCE_WINBASEAPI + +# endif /* !_MFC_VER */ + +# endif /* !__WINDOWS__ */ + +/* end of eMbedded Visual C++ specific section */ + +# else +/* boris : for the latest SDK, you may actually need the other version of the declaration (above) + * even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ... + */ +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*); +_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long); +# endif + +# if !defined (STLPInterlockedExchangePointer) +/* This API function do not exist in the old platform SDK and is equivalent to + * InterlockedExchange on 32 bits platform: + */ +# if defined (__cplusplus) +/* We do not define this function if we are not in a C++ translation unit just + * because of the inline portability issue it would introduce. We will have to + * fix it the day we need this function for a C translation unit. + */ +inline +void* _STLP_CALL STLPInterlockedExchangePointer(void* volatile* __a, void* __b) { +# if defined (_STLP_MSVC) +/* Here MSVC produces warning if 64 bits portability issue is activated. + * MSVC do not see that _STLP_ATOMIC_EXCHANGE_PTR is a macro which content + * is based on the platform, Win32 or Win64 + */ +# pragma warning (push) +# pragma warning (disable : 4311) // pointer truncation from void* to long +# pragma warning (disable : 4312) // conversion from long to void* of greater size +# endif +# if !defined (_STLP_NO_NEW_STYLE_CASTS) + return reinterpret_cast(InterlockedExchange(reinterpret_cast(const_cast(__a)), + reinterpret_cast(__b))); +# else + return (void*)InterlockedExchange((long*)__a, (long)__b); +# endif +# if defined (_STLP_MSVC) +# pragma warning (pop) +# endif +} +# endif +# endif + +# if !defined (_STLP_WCE) +_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long); +_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA(const char* lpOutputString); +# endif + +# if defined (InterlockedIncrement) +# pragma intrinsic(_InterlockedIncrement) +# pragma intrinsic(_InterlockedDecrement) +# pragma intrinsic(_InterlockedExchange) +# pragma intrinsic(_InterlockedExchangePointer) +# endif +# if defined (__cplusplus) +} /* extern "C" */ +# endif + +# endif /* STL_MSVC __BORLANDC__ __ICL __WATCOMC__ __MINGW32__ __DMC__*/ + +#endif /* _STLP_WINDOWS_H_INCLUDED */ + +#endif /* _STLP_INTERNAL_WINDOWS_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/compat.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/compat.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,84 @@ + +/* + * Compatibility section + * This section sets new-style macros based on old-style ones, for compatibility + */ + +#if defined (__STL_DEBUG) && !defined (_STLP_DEBUG) +# define _STLP_DEBUG __STL_DEBUG +#endif +#if defined (__STL_NO_ANACHRONISMS) && !defined (_STLP_NO_ANACHRONISMS) +# define _STLP_NO_ANACHRONISMS __STL_NO_ANACHRONISMS +#endif +#if defined (__STL_NO_EXTENSIONS) && !defined (_STLP_NO_EXTENSIONS) +# define _STLP_NO_EXTENSIONS __STL_NO_EXTENSIONS +#endif +#if defined (__STL_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) +# define _STLP_NO_EXCEPTIONS __STL_NO_EXCEPTIONS +#endif +#if defined (__STL_NO_NAMESPACES) && !defined (_STLP_NO_NAMESPACES) +# define _STLP_NO_NAMESPACES __STL_NO_NAMESPACES +#endif +#if defined (__STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && !defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) +# define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS __STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS +#endif +#if defined (__STL_NO_OWN_NAMESPACE) && !defined (_STLP_NO_OWN_NAMESPACE) +# define _STLP_NO_OWN_NAMESPACE __STL_NO_OWN_NAMESPACE +#endif + +#if defined (__STL_NO_RELOPS_NAMESPACE) && !defined (_STLP_NO_RELOPS_NAMESPACE) +# define _STLP_NO_RELOPS_NAMESPACE __STL_NO_RELOPS_NAMESPACE +#endif + +#if defined (__STL_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_UNINITIALIZED) +# define _STLP_DEBUG_UNINITIALIZED __STL_DEBUG_UNINITIALIZED +#endif +#if defined (__STL_SHRED_BYTE) && !defined (_STLP_SHRED_BYTE) +# define _STLP_SHRED_BYTE __STL_SHRED_BYTE +#endif +#if defined (__STL_USE_MFC) && !defined (_STLP_USE_MFC) +# define _STLP_USE_MFC __STL_USE_MFC +#endif + +#if defined (__STL_USE_NEWALLOC) && !defined (_STLP_USE_NEWALLOC) +# define _STLP_USE_NEWALLOC __STL_USE_NEWALLOC +#endif +#if defined (__STL_USE_MALLOC) && !defined (_STLP_USE_MALLOC) +# define _STLP_USE_MALLOC __STL_USE_MALLOC +#endif + +#if defined (__STL_DEBUG_ALLOC) && !defined (_STLP_DEBUG_ALLOC) +# define _STLP_DEBUG_ALLOC __STL_DEBUG_ALLOC +#endif + +#if defined (__STL_DEBUG_MESSAGE) && !defined (_STLP_DEBUG_MESSAGE) +# define _STLP_DEBUG_MESSAGE __STL_DEBUG_MESSAGE +#endif + +#if defined (__STL_DEBUG_TERMINATE) && !defined (_STLP_DEBUG_TERMINATE) +# define _STLP_DEBUG_TERMINATE __STL_DEBUG_TERMINATE +#endif + +#if defined (__STL_USE_ABBREVS) && !defined (_STLP_USE_ABBREVS) +# define _STLP_USE_ABBREVS __STL_USE_ABBREVS +#endif + +#if defined (__STL_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_NO_MSVC50_COMPATIBILITY) +# define _STLP_NO_MSVC50_COMPATIBILITY __STL_NO_MSVC50_COMPATIBILITY +#endif + +#if defined (__STL_USE_RAW_SGI_ALLOCATORS) && !defined (_STLP_USE_RAW_SGI_ALLOCATORS) +# define _STLP_USE_RAW_SGI_ALLOCATORS __STL_USE_RAW_SGI_ALLOCATORS +#endif + +/* STLport do not support anymore the iostream wrapper mode so this macro should + * always been define for other libraries that was using it: + */ +#if !defined (_STLP_OWN_IOSTREAMS) +# define _STLP_OWN_IOSTREAMS +#endif + +#if defined (_STLP_NO_OWN_IOSTREAMS) +# error STLport do not support anymore the wrapper mode. If you want to use STLport \ +use its iostreams implementation or no iostreams at all. +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/features.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/features.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1194 @@ + /* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_FEATURES_H +#define _STLP_FEATURES_H + +/* + * Purpose of this file: + * + * Defines all STLport settings. + * This file is actually a wrapper : it includes compiler-specific + * settings from + * and user-defined settings from . + * See and for the description + * of those macros + * + */ + +/* Definition of the STLport version informations */ +#include + +/* Other macros defined by this file: + + * bool, true, and false, if _STLP_NO_BOOL is defined. + * typename, as a null macro if it's not already a keyword. + * explicit, as a null macro if it's not already a keyword. + * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.) + * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.) + * _STLP_ASSERT, either as a test or as a null macro, depending on + whether or not _STLP_ASSERTIONS is defined. +*/ + +/* Definition of the 2 STLport debug levels */ +#define _STLP_STLPORT_DBG_LEVEL 1 +#define _STLP_STANDARD_DBG_LEVEL 2 + +/* Placeholder for user to override settings. + * It could be also used to mask settings from + * different directories. + */ +#include + +#if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL) +# define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL +#endif + +#if defined (__BUILDING_STLPORT) +/* For the STLport implementation we can use everything: + */ +# if defined (_STLP_NO_ANACHRONISMS) +# undef _STLP_NO_ANACHRONISMS +# endif +# if defined (_STLP_NO_EXTENSIONS) +# undef _STLP_NO_EXTENSIONS +# endif +/* Moreover there are things that has no sens: + */ +# if defined (_STLP_NO_IOSTREAMS) +# error If you do not use iostreams you do not need to build the STLport library. +# endif +#endif + +/* ========================================================= */ +/* This file is used for compatibility; it accepts old-style config + switches */ +#include + +/* Common configuration file for this particular installation. */ +#include + +/* Operational Environment specific */ +#include + +/* ========================================================= */ + +/* some fixes to configuration. This also includes modifications + * of STLport switches depending on compiler flags, + * or settings applicable to a group of compilers, such as + * to all who use EDG front-end. + */ +#include + +#ifdef _STLP_USE_BOOST_SUPPORT +/* We are going to use the boost library support. To limit the problem + * of self referencing headers we have to specify clearly to the boost + * library that the Standard lib is STLport: + */ +# ifndef BOOST_STDLIB_CONFIG +# define BOOST_STDLIB_CONFIG +# endif +#endif + + +/* + * Performs integrity check on user-specified parameters + * and site-specific settings. + */ +/* +# include +*/ + +/* SGI terms */ + +#if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES) +# define _STLP_MEMBER_TEMPLATES 1 +#endif + +#if !defined (_STLP_NO_FRIEND_TEMPLATES) && !defined (_STLP_FRIEND_TEMPLATES) +# define _STLP_FRIEND_TEMPLATES 1 +#endif + +#if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES) +# define _STLP_MEMBER_TEMPLATE_CLASSES 1 +#endif + +#if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) +# define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1 +#endif + +#if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +# define _STLP_CLASS_PARTIAL_SPECIALIZATION 1 +#endif + +#if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER) +# define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1 +#endif + +#if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM) +# define _STLP_USE_SHORT_STRING_OPTIM 1 +#endif + +#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \ + !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION) +# define _STLP_USE_CONTAINERS_EXTENSION +#endif + +#if defined (_STLP_USE_CONTAINERS_EXTENSION) +# define _STLP_TEMPLATE_FOR_CONT_EXT template +#else +# define _STLP_TEMPLATE_FOR_CONT_EXT +#endif + +#if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \ + (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)) +# error "Sorry but according the STLport settings your compiler can not support the pointer specialization feature." +#endif + +#if defined (_STLP_NO_IOSTREAMS) && \ + !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC) +# define _STLP_USE_NEWALLOC +#endif + +#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN) +# if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \ + defined (__hpux) || defined (macintosh) || defined (_MAC) +# define _STLP_BIG_ENDIAN 1 +# elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \ + defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \ + defined (__alpha__) +# define _STLP_LITTLE_ENDIAN 1 +# elif defined (__ia64__) + /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */ +# if defined (__BIG_ENDIAN__) +# define _STLP_BIG_ENDIAN 1 +# else +# define _STLP_LITTLE_ENDIAN 1 +# endif +# else +# error "can't determine endianess" +# endif +#endif /* _STLP_BIG_ENDIAN */ + +/* ========================================================== + * final workaround tuning based on given flags + * ========================================================== */ + +#ifndef _STLP_UINT32_T +# define _STLP_UINT32_T unsigned long +#endif +#ifndef _STLP_ABORT +# define _STLP_ABORT() abort() +#endif + +#if !defined (_STLP_HAS_NO_NAMESPACES) +# if defined _STLP_NO_NAMESPACES +# undef _STLP_USE_NAMESPACES +# else +/* assume it as the default, turn it off later if NO_NAMESPACES selected */ +# undef _STLP_USE_NAMESPACES +# define _STLP_USE_NAMESPACES 1 +# endif +#endif + +#if defined (_STLP_NO_IOSTREAMS) +# define _STLP_USE_NO_IOSTREAMS +#endif + +/* Operating system recognition (basic) */ +#if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX) || defined (__NetBSD__) || defined(__OpenBSD__) || defined (__Lynx__) +# define _STLP_UNIX 1 +#elif defined(macintosh) || defined (_MAC) +# define _STLP_MAC 1 +#elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__) +# define _STLP_WIN32 1 +#elif defined (__WIN16) || defined (WIN16) || defined (_WIN16) +# define _STLP_WIN16 +#endif /* __unix */ + +#if defined (_STLP_WIN16) +# define _STLP_LDOUBLE_80 +#elif defined(_STLP_WIN32) +# if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) || defined (__CYGWIN__) +# define _STLP_LDOUBLE_64 +# else +# define _STLP_LDOUBLE_96 +# endif +#elif defined (_STLP_UNIX) +# if defined (__CYGWIN__) +# define _STLP_LDOUBLE_96 +# endif +#endif + +#if !defined (_STLP_LDOUBLE_64) && !defined (_STLP_LDOUBLE_80) && !defined (_STLP_LDOUBLE_96) && !defined (_STLP_LDOUBLE_128) +# define _STLP_LDOUBLE_128 +#endif + +#if !defined (_STLP_NO_LONG_DOUBLE) +# define _STLP_LONGEST_FLOAT_TYPE long double +#else +# define _STLP_LONGEST_FLOAT_TYPE double +#endif + +/* Native headers access macros */ +#include + +/* shared library tune-up */ + +#if defined (__BUILDING_STLPORT) +/* if we are rebuilding right now, place everything here */ +# undef _STLP_DESIGNATED_DLL +# define _STLP_DESIGNATED_DLL 1 +#endif + +/* Use own namespace always if possible and not explicitly instructed otherwise */ +#if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \ + !defined (_STLP_NO_OWN_NAMESPACE) +# undef _STLP_USE_OWN_NAMESPACE +# define _STLP_USE_OWN_NAMESPACE 1 +#else +# undef _STLP_WHOLE_NATIVE_STD +#endif + +#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED) + +# if defined (_PTHREADS) +# define _STLP_PTHREADS +# define _STLP_THREADS +# endif +# if defined (_UITHREADS) +# define _STLP_UITHREADS +# define _STLP_THREADS +# endif + +# if defined (__sgi) && !defined (__KCC) && !defined (__GNUC__) +# define _STLP_SGI_THREADS +# elif defined (__DECC) || defined (__DECCXX) +# define _STLP_DEC_THREADS +# elif defined (_STLP_WIN32) && !defined (_STLP_PTHREADS) +# define _STLP_WIN32THREADS 1 +# elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \ + !defined(_STLP_PTHREADS) +# define _STLP_UITHREADS +# elif defined (__OS2__) +# define _STLP_OS2THREADS +# elif defined (__BEOS__) +# define _STLP_BETHREADS +# elif defined (__MWERKS__) && defined (N_PLAT_NLM) /* (__dest_os == __netware_os) */ +# define _STLP_NWTHREADS +# else +# define _STLP_PTHREADS +# endif /* __sgi */ +# define _STLP_THREADS_DEFINED +#endif + +#if (defined (_REENTRANT) || defined (_THREAD_SAFE) || \ + (defined (_POSIX_THREADS) && defined (__OpenBSD__))) && \ + !defined (_STLP_THREADS) +# define _STLP_THREADS +#endif /* _REENTRANT */ + +#if defined (__linux__) && defined (_STLP_PTHREADS) +/* # include */ + +# if defined (__USE_XOPEN2K) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK) +# define _STLP_USE_PTHREAD_SPINLOCK +# define _STLP_STATIC_MUTEX _STLP_mutex +# endif /* __USE_XOPEN2K */ +#endif /* __linux__ && _STLP_PTHREADS */ + +#if defined (__OpenBSD__) && defined (_POSIX_THREADS) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK) +# define _STLP_USE_PTHREAD_SPINLOCK +# define _STLP_STATIC_MUTEX _STLP_mutex +#endif + +#ifndef _STLP_STATIC_MUTEX +# define _STLP_STATIC_MUTEX _STLP_mutex_base +#endif + +#if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC) +# define _STLP_USE_MFC 1 +#endif + +#if defined (_STLP_THREADS) +# define _STLP_VOLATILE volatile +/* windows.h _MUST be included before bool definition ;( */ +# if defined (_STLP_WIN32THREADS) && defined (_STLP_NO_BOOL) +# undef NOMINMAX +# define NOMINMAX +# ifdef _STLP_USE_MFC +# include +# else +# include +# endif +# define _STLP_WINDOWS_H_INCLUDED +# endif +#else +# define _STLP_VOLATILE +#endif + +#if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS) +# define _STLP_USE_NEW_C_HEADERS +#endif +/* disable new-style headers if requested */ +#if defined (_STLP_NO_NEW_C_HEADERS) +# undef _STLP_USE_NEW_C_HEADERS +#endif + +#if !defined (_STLP_STATIC_TEMPLATE_DATA) +# define _STLP_STATIC_TEMPLATE_DATA 1 +#endif + +#if defined (_STLP_BASE_TYPEDEF_BUG) +# undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG +# define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1 +#endif + +#if defined (_STLP_NESTED_TYPE_PARAM_BUG) || (defined (_STLP_MSVC) && (_STLP_MSVC < 1100)) +# define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG +#endif + +/* SUNpro 4.2 inline string literal bug */ +#ifdef _STLP_INLINE_STRING_LITERAL_BUG +# define _STLP_FIX_LITERAL_BUG(__x) __x = __x; +#else +# define _STLP_FIX_LITERAL_BUG(__x) +#endif + +#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) +# undef _STLP_NO_DEFAULT_NON_TYPE_PARAM +# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1 +#endif + +#define _STLP_NEW new +#define _STLP_PLACEMENT_NEW new + +#ifdef _STLP_DEBUG +# define _STLP_ASSERTIONS 1 +#endif + +#if !defined (_STLP_STATIC_ASSERT) +/* Some compiler support 0 size array so we use negative size array to generate + * a compilation time error. + */ +# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1]; +#endif + +/* apple mpw exception handling bug */ +#ifndef _STLP_MPWFIX_TRY +# define _STLP_MPWFIX_TRY +#endif +#ifndef _STLP_MPWFIX_CATCH +# define _STLP_MPWFIX_CATCH +#endif +#ifndef _STLP_MPWFIX_CATCH_ACTION +# define _STLP_MPWFIX_CATCH_ACTION(action) +#endif + +/* if _STLP_DEBUG or _STLP_ASSERTIONS are set, stl/debug/_debug.h defines those */ + +#if !defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_ALLOC) +# define _STLP_ASSERT(expr) +#endif + +#if !defined (_STLP_DEBUG) +# define _STLP_VERBOSE_ASSERT(expr,diagnostic) +# define _STLP_DEBUG_CHECK(expr) +# define _STLP_DEBUG_DO(expr) +#endif + +#if !defined (_STLP_WEAK) +# define _STLP_WEAK +#endif + +/* default parameters as template types derived from arguments ( not always supported ) */ +#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) +# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname +#else +# if !defined (_STLP_DEFAULT_TYPE_PARAM) +# define _STLP_DEFAULT_TYPE_PARAM 1 +# endif +# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval +#endif + +/* default parameters as complete types */ +#if defined (_STLP_DEFAULT_TYPE_PARAM) +# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval +# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val +#else +# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname +# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name +#endif + +/* SGI compatibility */ + +#ifdef _STLP_NO_WCHAR_T +# ifndef _STLP_NO_NATIVE_WIDE_STREAMS +# define _STLP_NO_NATIVE_WIDE_STREAMS 1 +# endif +#else +# define _STLP_HAS_WCHAR_T 1 +#endif + +#if !defined (_STLP_NO_AT_MEMBER_FUNCTION) +# define _STLP_CAN_THROW_RANGE_ERRORS 1 +#endif + +#if !defined (_STLP_USE_RAW_SGI_ALLOCATORS) +# define _STLP_DEFAULT_ALLOCATOR(_Tp) allocator< _Tp > +# define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) +# define _STLP_DEFAULT_PAIR_ALLOCATOR(_Key, _Tp) allocator< pair < _Key, _Tp > > +# if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) +# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc +# define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1 +# else +# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \ + class _Alloc = allocator< pair < _Key, _Tp > > +# endif +#else +# define _STLP_DEFAULT_ALLOCATOR( _Tp ) __sgi_alloc +# define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc) +# define _STLP_DEFAULT_PAIR_ALLOCATOR( _Key, _Tp ) __sgi_alloc +# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc) +# if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) && !defined (_STLP_DEFAULT_TYPE_PARAM) +# define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1 +# endif +#endif + +/* debug mode tool */ +#if defined (_STLP_DEBUG) +# define _STLP_NON_DBG_NAME(X) _NonDbg_##X +#endif + +/* pointer specialization tool */ +#if defined (_STLP_USE_PTR_SPECIALIZATIONS) +# define _STLP_PTR_IMPL_NAME(X) _Impl_##X +#endif + +#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) +# define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X +# if defined (_STLP_DEBUG) +# define _STLP_NON_DBG_NO_MEM_T_NAME(X) _NonDbg_NoMemT_##X +# endif +#endif + +/* this always mean the C library is in global namespace */ +#if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD) +# define _STLP_VENDOR_GLOBAL_CSTD 1 +#endif + +/* Depending of whether compiler supports namespaces, + * tune the parameters for vendor-supplied libraries. + * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES, + * since it depends only on the native features, not on user's preference whether + * to use namespace for STLport or not. + */ +#if !defined (_STLP_HAS_NO_NAMESPACES) +/* Import some vendor's headers into corresponding STLport ones if they might be needed + * (if we wrap native iostreams and use namepace other than std::) */ +# if defined (_STLP_WHOLE_NATIVE_STD) +# define _STLP_IMPORT_VENDOR_STD 1 +# undef _STLP_MINIMUM_IMPORT_STD +# endif + +/* if using stlport:: namespace or if C library stuff is not in vendor's std::, + * try importing 'em. + * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */ +# if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD)) +# define _STLP_IMPORT_VENDOR_CSTD 1 +# endif + +# if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS) +# define _STLP_NO_CSTD_FUNCTION_IMPORTS +# endif + +# define _STLP_USING_NAMESPACE(x) using namespace x ; + +namespace std { } +namespace __std_alias = std; + +/* assume std:: namespace for C++ std library if not being told otherwise */ +# if defined (_STLP_VENDOR_GLOBAL_STD) +# define _STLP_VENDOR_STD +# else +# define _STLP_VENDOR_STD __std_alias +# endif + +/* tune things that come from C library */ +# if defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS) +/* in old-style headers, C functions go to global scope. */ +# define _STLP_VENDOR_CSTD +# define _STLP_USING_VENDOR_CSTD +# else +# define _STLP_VENDOR_CSTD _STLP_VENDOR_STD +# define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD) +# endif /* _STLP_VENDOR_CSTD */ +/* exception, typeinfo, new - always come from the vendor */ +# if !defined (_STLP_VENDOR_EXCEPT_STD) +# if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD) +# define _STLP_VENDOR_EXCEPT_STD +# else +# define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD +# endif +# endif +# define _STLP_OLD_IO_NAMESPACE +# if !defined (_STLP_VENDOR_MB_NAMESPACE) +# define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD +# endif +#else +/* compiler has no namespace support */ +# define _STLP_VENDOR_STD +# define _STLP_VENDOR_CSTD +# define _STLP_USING_NAMESPACE(x) +# define _STLP_USING_VENDOR_CSTD +# define _STLP_VENDOR_EXCEPT_STD +#endif + +#if defined (_STLP_USE_NAMESPACES) + +# if defined (_STLP_USE_OWN_NAMESPACE) +# if !defined (_STLP_STD_NAME) +# if !defined (_STLP_DEBUG) +# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) +# ifndef _STLP_THREADS +# define _STLP_STD_NAME stlpmtx_std +# else +# define _STLP_STD_NAME stlp_std +# endif +# else +# ifndef _STLP_THREADS +# define _STLP_STD_NAME stlpxmtx_std +# else +# define _STLP_STD_NAME stlpx_std +# endif +# endif +# else +/* + * The STLport debug mode is binary incompatible with the other modes, + * lets make it clear on the STLport namespace to generate link errors rather + * than runtime. + */ +# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) +# ifndef _STLP_THREADS +# define _STLP_STD_NAME stlpdmtx_std +# else +# define _STLP_STD_NAME stlpd_std +# endif +# else +# ifndef _STLP_THREADS +# define _STLP_STD_NAME stlpdxmtx_std +# else +# define _STLP_STD_NAME stlpdx_std +# endif +# endif +# endif +# endif +namespace _STLP_STD_NAME { } +# else +# if defined (_STLP_DEBUG) +namespace stdD = std; +# endif +# define _STLP_STD_NAME std +# endif /* _STLP_USE_OWN_NAMESPACE */ + +# if !defined (_STLP_USING_NAMESPACE_BUG) +# define _STLP_PRIV_NAME stlp_priv +namespace _STLP_PRIV_NAME { + using namespace _STLP_STD_NAME; +} +# else +# define _STLP_PRIV_NAME priv +# endif + +# define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME { +# define _STLP_END_NAMESPACE } + +# if !defined (_STLP_DONT_USE_PRIV_NAMESPACE) +# if !defined (_STLP_USING_NAMESPACE_BUG) +/* We prefer to make private namespace a totaly seperated namespace... + */ +# define _STLP_PRIV ::_STLP_PRIV_NAME:: +# define _STLP_MOVE_TO_PRIV_NAMESPACE } namespace _STLP_PRIV_NAME { +# define _STLP_MOVE_TO_STD_NAMESPACE } namespace _STLP_STD_NAME { +# else +/* but sometimes we can't: + */ +# define _STLP_PRIV _STLP_PRIV_NAME:: +# define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME { +# define _STLP_MOVE_TO_STD_NAMESPACE } +# endif +# else +# define _STLP_PRIV +# define _STLP_MOVE_TO_PRIV_NAMESPACE +# define _STLP_MOVE_TO_STD_NAMESPACE +# endif + +/* decide whether or not we use separate namespace for rel ops */ +# if defined (_STLP_NO_RELOPS_NAMESPACE) +# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {} +# define _STLP_END_RELOPS_NAMESPACE } +# else +/* Use std::rel_ops namespace */ +# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops { +# define _STLP_END_RELOPS_NAMESPACE } } +# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE +# endif /* Use std::rel_ops namespace */ + +# define _STLP_STD ::_STLP_STD_NAME + +/* Official STLport namespace when std is not redefined. + * Here we don't use a macro as stlport is used as file name by boost + * and folder name under beos: + */ +namespace stlport = _STLP_STD_NAME; + +/* Backward compatibility: + */ +namespace _STL = _STLP_STD_NAME; +#undef __STLPORT_NAMESPACE +#define __STLPORT_NAMESPACE _STLP_STD_NAME + +#else /* _STLP_USE_NAMESPACES */ +/* STLport is being put into global namespace */ +# define _STLP_STD +# define _STLP_PRIV +# define _STLP_BEGIN_NAMESPACE +# define _STLP_END_NAMESPACE +# define _STLP_MOVE_TO_PRIV_NAMESPACE +# define _STLP_MOVE_TO_STD_NAMESPACE + +/* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE + causes less problems than having relational operator templates in global namespace + Please define _STLP_NO_RELOPS_NAMESPACE in stl_user_config.h if your code rely on them. */ +# if !defined (_STLP_NO_RELOPS_NAMESPACE) +# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE +# endif +# define _STLP_BEGIN_RELOPS_NAMESPACE +# define _STLP_END_RELOPS_NAMESPACE +# undef _STLP_USE_OWN_NAMESPACE +#endif /* _STLP_USE_NAMESPACES */ + +#define STLPORT_CSTD _STLP_VENDOR_CSTD +#define STLPORT _STLP_STD_NAME + +#if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG) +# define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy +#else +# define _STLP_SIMPLE_TYPE(T) T +#endif + +#ifndef _STLP_RAND48 +# define _STLP_NO_DRAND48 +#endif + +/* advanced keywords usage */ +#define __C_CAST(__x, __y) ((__x)(__y)) +#ifndef _STLP_NO_NEW_STYLE_CASTS +# define __CONST_CAST(__x,__y) const_cast<__x>(__y) +# define __STATIC_CAST(__x,__y) static_cast<__x>(__y) +# define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y) +# define __DYNAMIC_CAST(__x,__y) dynamic_cast<__x>(__y) +#else +# define __STATIC_CAST(__x,__y) __C_CAST(__x, __y) +# define __CONST_CAST(__x,__y) __C_CAST(__x, __y) +# define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y) +# define __DYNAMIC_CAST(__x,__y) __C_CAST(__x, __y) +#endif + +#if defined (_STLP_NEED_TYPENAME) && ! defined (typename) +# define typename +#endif + +#if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE ) +# define _STLP_TYPENAME_ON_RETURN_TYPE +#else +# define _STLP_TYPENAME_ON_RETURN_TYPE typename +#endif + +#ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER +# define _STLP_HEADER_TYPENAME +#else +# define _STLP_HEADER_TYPENAME typename +#endif + +#ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD +# define _STLP_TEMPLATE template +#else +# define _STLP_TEMPLATE +#endif + +#if defined (_STLP_USE_CONTAINERS_EXTENSION) +# define _STLP_KEY_TYPE_FOR_CONT_EXT(type) +# define _STLP_TEMPLATE_FOR_CONT_EXT template +#else +# define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT; +# define _STLP_TEMPLATE_FOR_CONT_EXT +#endif + +#if defined (_STLP_NEED_EXPLICIT) && !defined (explicit) +# define explicit +#endif + +#if !defined (_STLP_NEED_MUTABLE) +# define _STLP_ASSIGN_MUTABLE(type,x,y) x = y +#else +# define _STLP_ASSIGN_MUTABLE(type,x,y) __CONST_CAST(type,x)=y +# define mutable +#endif + +#if defined (_STLP_NO_SIGNED_BUILTINS) +/* old HP-UX doesn't understand "signed" keyword */ +# define signed +#endif + +#if defined (_STLP_LOOP_INLINE_PROBLEMS) +# define _STLP_INLINE_LOOP +#else +# define _STLP_INLINE_LOOP inline +#endif + +#define _STLP_PRIVATE public + +#ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX +# define _STLP_TEMPLATE_NULL template<> +#else +# define _STLP_TEMPLATE_NULL +#endif + +#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER +# define _STLP_OPERATOR_TEMPLATE +#else +# define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL +#endif + +#ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION +/* unless we have other compiler problem, try simulating partial spec here */ +# if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) +# define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS +# endif +/* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */ +# if (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)) +# if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES ) +# define _STLP_USE_OLD_HP_ITERATOR_QUERIES +# endif +# elif defined ( _STLP_NO_ANACHRONISMS ) +# undef _STLP_USE_OLD_HP_ITERATOR_QUERIES +# endif +#endif + +#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS +# define _STLP_NULL_TMPL_ARGS <> +# else +# define _STLP_NULL_TMPL_ARGS +#endif + +#if !defined (_STLP_ALLOCATOR_TYPE_DFL) +# if defined (_STLP_DONT_SUP_DFLT_PARAM) +# define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS +# endif +# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) +# define _STLP_ALLOCATOR_TYPE_DFL +# else +# define _STLP_ALLOCATOR_TYPE_DFL = allocator_type() +# endif +#endif + +/* When the compiler do not correctly initialized the basic types value in default parameters we prefer + * to avoid them to be able to correct this bug. + */ +#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG) +# define _STLP_DONT_SUP_DFLT_PARAM 1 +#endif + +#if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR) +# define _STLP_NO_ARROW_OPERATOR +#endif + +#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +# if !(defined (_STLP_NO_ARROW_OPERATOR)) && \ + !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY) +/* this one is needed for proper reverse_iterator<> operator ->() handling */ +# define _STLP_MSVC50_COMPATIBILITY 1 +# endif +#endif + +#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) +# if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) ) +# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ + typedef typename _STLP_STD :: reverse_iterator const_reverse_iterator; \ + typedef typename _STLP_STD :: reverse_iterator reverse_iterator +# elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__) +# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ + typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator const_reverse_iterator; \ + typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator reverse_iterator +# else +# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ + typedef _STLP_STD::reverse_iterator const_reverse_iterator; \ + typedef _STLP_STD::reverse_iterator reverse_iterator +# endif +#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ +# if defined (_STLP_MSVC50_COMPATIBILITY) +# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ + typedef _STLP_STD::__reverse_iterator const_reverse_iterator; \ + typedef _STLP_STD::__reverse_iterator \ + reverse_iterator +# else +# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ + typedef _STLP_STD::__reverse_iterator const_reverse_iterator; \ + typedef _STLP_STD::__reverse_iterator \ + reverse_iterator +# endif +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \ + _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator) +#define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \ + _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator) + +#define __IMPORT_CONTAINER_TYPEDEFS(_Super) \ + typedef typename _Super::value_type value_type; \ + typedef typename _Super::size_type size_type; \ + typedef typename _Super::difference_type difference_type; \ + typedef typename _Super::reference reference; \ + typedef typename _Super::const_reference const_reference; \ + typedef typename _Super::pointer pointer; \ + typedef typename _Super::const_pointer const_pointer; \ + typedef typename _Super::allocator_type allocator_type; + + +#define __IMPORT_ITERATORS(_Super) \ + typedef typename _Super::iterator iterator; \ + typedef typename _Super::const_iterator const_iterator; + +#define __IMPORT_REVERSE_ITERATORS(_Super) \ + typedef typename _Super::const_reverse_iterator const_reverse_iterator; \ + typedef typename _Super::reverse_iterator reverse_iterator; + +#define __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER) \ + __derived_name(const _Super& __x) : _SUPER(__x) {} \ + _Self& operator=(const _Super& __x) { \ + *(_Super*)this = __x; \ + return *this; \ + } \ + __derived_name(const _Self& __x) : _SUPER(__x) {} \ + _Self& operator=(const _Self& __x) { \ + *(_Super*)this = __x; \ + return *this; \ + } + +#define __IMPORT_WITH_ITERATORS(_Super) \ + __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super) + +#define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \ + __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super) + +#if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG) +# define __TRIVIAL_CONSTRUCTOR(__type) __type() {} +#else +# define __TRIVIAL_CONSTRUCTOR(__type) +#endif + +#if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG) +# define __TRIVIAL_DESTRUCTOR(__type) ~__type() {} +#else +# define __TRIVIAL_DESTRUCTOR(__type) +#endif + +#define __TRIVIAL_STUFF(__type) \ + __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type) + +#if defined (_STLP_HAS_NO_EXCEPTIONS) +# define _STLP_NO_EXCEPTIONS +#endif + +#if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS) +# define _STLP_USE_EXCEPTIONS +#endif + +#if defined (_STLP_USE_EXCEPTIONS) +# define _STLP_TRY try +# define _STLP_CATCH_ALL catch(...) +# ifndef _STLP_THROW +# define _STLP_THROW(x) throw x +# endif +# define _STLP_RETHROW throw + +# define _STLP_UNWIND(action) catch(...) { action; throw; } + +# ifdef _STLP_THROW_RETURN_BUG +# define _STLP_RET_AFTER_THROW(data) return data; +# else +# define _STLP_RET_AFTER_THROW(data) +# endif + +/* We do not use exception throw specifications unless we are forced to */ +# if !defined (_STLP_THROWS) +# define _STLP_THROWS(x) +# endif +# if !defined (_STLP_NOTHROW) +# define _STLP_NOTHROW +# endif +#else +# define _STLP_TRY +# define _STLP_CATCH_ALL if (false) +# ifndef _STLP_THROW +# define _STLP_THROW(x) +# endif +# define _STLP_RETHROW {} +# define _STLP_UNWIND(action) +# define _STLP_THROWS(x) +# define _STLP_NOTHROW +# define _STLP_RET_AFTER_THROW(data) +#endif + +/* + * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no + * exception support but not the _STLP_USE_EXCEPTIONS which simply means + * that the user do not want to use them. + */ +#if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC) +# define _STLP_THROWS_INHERENTLY(x) throw x +# define _STLP_NOTHROW_INHERENTLY throw() +#else +# define _STLP_THROWS_INHERENTLY(x) +# define _STLP_NOTHROW_INHERENTLY +#endif + +/* STLport function not returning are functions that throw so we translate + * the noreturn functions in throwing functions taking also into account + * exception support activation. + */ +#if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \ + !defined (_STLP_FUNCTION_THROWS) +# define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION +#else +# define _STLP_FUNCTION_THROWS +#endif + +#if defined(_STLP_NO_BOOL) +# if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX) +# include +# if defined (__OS400__) +typedef int bool; +# elif !( defined (__xlC__) || defined (_AIX)) +typedef Boolean bool; +# endif +# else +# if defined(_STLP_YVALS_H) +# include +# else +# if defined (_STLP_DONT_USE_BOOL_TYPEDEF) +# define bool int +# else +typedef int bool; +# endif +# define true 1 +# define false 0 +# endif +# endif /* __IBMCPP__ */ +#else +# define _STLP_BOOL_KEYWORD 1 +#endif /* _STLP_NO_BOOL */ + +#ifndef _STLP_MPW_EXTRA_CONST +# define _STLP_MPW_EXTRA_CONST +#endif + +#ifndef _STLP_DEFAULTCHAR +# define _STLP_DEFAULTCHAR char +#endif + +#if defined (_STLP_DEBUG_ALLOC) && !defined (_STLP_ASSERTIONS) +# define _STLP_ASSERTIONS 1 +#endif + +/* uninitialized value filler */ +#ifndef _STLP_SHRED_BYTE +/* This value is designed to cause problems if an error occurs */ +# define _STLP_SHRED_BYTE 0xA3 +#endif /* _STLP_SHRED_BYTE */ + +/* shared library tune-up */ +#ifndef _STLP_IMPORT_DECLSPEC +# define _STLP_IMPORT_DECLSPEC +#endif + +/* a keyword used to instantiate export template */ +#ifndef _STLP_EXPORT_TEMPLATE_KEYWORD +# define _STLP_EXPORT_TEMPLATE_KEYWORD +#endif +#ifndef _STLP_IMPORT_TEMPLATE_KEYWORD +# define _STLP_IMPORT_TEMPLATE_KEYWORD +#endif + +#ifdef _STLP_USE_NO_IOSTREAMS +/* + * If we do not use iostreams we do not use the export/import + * techniques to avoid build of the STLport library. + */ +# undef _STLP_USE_DECLSPEC +/* We also undef USE_DYNAMIC_LIB macro as this macro add some code + * to use the dynamic (shared) STLport library for some platform/compiler + * configuration leading to problem when do not link to the STLport lib. + */ +# undef _STLP_USE_DYNAMIC_LIB +#endif + +#if defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC) +# if ! defined (_STLP_USE_TEMPLATE_EXPORT) +/* this setting turns on "extern template" extension use */ +# define _STLP_USE_TEMPLATE_EXPORT +# endif +# if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE) +# define _STLP_NO_FORCE_INSTANTIATE +# endif +#endif + +#if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */ +# define _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD +#else +# define _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD +#endif + +#ifndef _STLP_EXPORT_TEMPLATE +# define _STLP_EXPORT_TEMPLATE _STLP_EXPORT template +#endif + +#if defined (_STLP_USE_DECLSPEC) /* using export/import technique */ + +# ifndef _STLP_EXPORT_DECLSPEC +# define _STLP_EXPORT_DECLSPEC +# endif +# ifndef _STLP_IMPORT_DECLSPEC +# define _STLP_IMPORT_DECLSPEC +# endif +# ifndef _STLP_CLASS_EXPORT_DECLSPEC +# define _STLP_CLASS_EXPORT_DECLSPEC +# endif +# ifndef _STLP_CLASS_IMPORT_DECLSPEC +# define _STLP_CLASS_IMPORT_DECLSPEC +# endif +# if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */ +# define _STLP_DECLSPEC _STLP_EXPORT_DECLSPEC +# define _STLP_CLASS_DECLSPEC _STLP_CLASS_EXPORT_DECLSPEC +# else +# define _STLP_DECLSPEC _STLP_IMPORT_DECLSPEC /* Other modules, importing STLport exports */ +# define _STLP_CLASS_DECLSPEC _STLP_CLASS_IMPORT_DECLSPEC +# endif + +#else /* Not using DLL export/import specifications */ + +# define _STLP_DECLSPEC +# define _STLP_CLASS_DECLSPEC + +#endif + +#define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC + +#if defined (_STLP_MSVC) || defined (__ICL) +# define _STLP_STATIC_MEMBER_DECLSPEC +#else +# define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC +#endif + +#if !defined (_STLP_CALL) +# define _STLP_CALL +#endif + +#ifndef _STLP_USE_NO_IOSTREAMS + +# if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM) +# define __USE_STD_IOSTREAM +# endif + +/* We only need to expose details of streams implementation + if we use non-standard i/o or are building STLport*/ +# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO) +# define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1 +# endif + +/* We only need to expose details of global implementation if we are building STLport + or have not instantiated everything in the lib */ +# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) +# undef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION +# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1 +# endif + +#else /* _STLP_USE_NO_IOSTREAMS */ +/* when we are not using SGI iostreams, we must expose globals, but not streams implementation */ +# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION +#endif /* _STLP_USE_NO_IOSTREAMS */ + +#ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS +# define _STLP_PSPEC2(t1,t2) < t1,t2 > +# define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 > +#else +# define _STLP_PSPEC2(t1,t2) /* nothing */ +# define _STLP_PSPEC3(t1,t2,t3) /* nothing */ +#endif + +/* Activation of the partial template workaround: + */ +#if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\ + (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER)) +# define _STLP_USE_PARTIAL_SPEC_WORKAROUND +#endif + +#ifndef _STLP_USE_NO_IOSTREAMS +# define _STLP_NEW_IO_NAMESPACE _STLP_STD +# define _STLP_NO_WIDE_STREAMS _STLP_NO_WCHAR_T +#endif + +#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE +# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \ +_TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\ +_TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y) {return __y < __x;}\ +_TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\ +_TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);} +#else +# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) +#endif + +#if defined ( _STLP_USE_ABBREVS ) +# include +#endif + +/* A really useful macro */ +#define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0]) +#define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0]) + +/* some cleanup */ +#undef _STLP_DONT_USE_BOOL_TYPEDEF +#undef _STLP_YVALS_H +#undef _STLP_LOOP_INLINE_PROBLEMS +#undef _STLP_NEED_EXPLICIT +#undef _STLP_NEED_TYPENAME +#undef _STLP_NO_NEW_STYLE_CASTS +#undef __AUTO_CONFIGURED + +#endif /* _STLP_FEATURES_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/host.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/host.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,265 @@ +/* + * This file defines site configuration. + */ + +/* + * _STLP_NO_THREADS: if defined, STLport don't use any + * multithreading support. Synonym is _NOTHREADS + */ +/* +#define _NOTHREADS +#define _STLP_NO_THREADS +*/ + +/* _PTHREADS: if defined, use POSIX threads for multithreading support. */ +/* +#define _PTHREADS +*/ + +/* compatibility section + */ + +#if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS)) +# if !defined (_NOTHREADS) +# define _NOTHREADS +# endif +# if !defined (_STLP_NO_THREADS) +# define _STLP_NO_THREADS +# endif +#endif + +#if !defined(_STLP_USE_DYNAMIC_LIB) && !defined(_STLP_USE_STATIC_LIB) +/* + * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library. + * NOTE: please do that only if you know what you are doing! + * Changing default will require you to change makefiles in "build" accordingly + * and to rebuild STLPort library! + * On UNIX, this has no effect, see build/lib/README for make tags. + * See STLport configuration file (build/lib/configure.bat) for help in building + * the require library versions. + */ +/* +#define _STLP_USE_DYNAMIC_LIB +*/ + +/* + * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library. + * NOTE: please do that only if you know what you are doing! + * Changing default will require you to change makefile in "build" accordingly + * and to rebuild STLPort library! + * On UNIX, this has no effect, see build/lib/README for make tags. + * See STLport configuration file (build/lib/configure.bat) for help in building + * the require library versions. + */ +/* +#define _STLP_USE_STATIC_LIB +*/ +#endif + +/* + * Signal STLport that we are using the cygwin distrib with the -mno-cygwin option. + * This is similar to a mingw environment except that relative path to native headers + * is different, this is why we need this macro. + */ +/* +#define _STLP_NO_CYGWIN + */ + +/* + * Edit relative path below (or put full path) to get native + * compiler vendor's headers included. Default is "../include" + * for _STLP_NATIVE_INCLUDE_PATH, default for other macros is + * _STLP_NATIVE_INCLUDE_PATH. + * Hint: never install STLport in the directory that ends with "include" + */ +/* +#undef _STLP_NATIVE_INCLUDE_PATH +#define _STLP_NATIVE_INCLUDE_PATH ../include +*/ +/* same for C library headers like */ +/* +#undef _STLP_NATIVE_CPP_C_INCLUDE_PATH +#define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +*/ +/* same for C headers like */ +/* +#undef _STLP_NATIVE_C_INCLUDE_PATH +#define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +*/ +/* Some compilers locate basic C++ runtime support headers (, , ) in separate directory */ +/* +#undef _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH +#define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH +*/ + +/* + * If namespases available, STLport use own namespace (and masquerade + * it as std). Disable own namespace may cause undefined behaviour. + */ +/* +#define _STLP_NO_OWN_NAMESPACE 1 +*/ + +/* + * Uncomment _STLP_LEAKS_PEDANTIC to force deallocation of ALL allocated + * memory chunks. Normally not required. But if you worry about quazi-leaks + * (may be reported by some leaks detection tools), use + * _STLP_LEAKS_PEDANTIC. It should be used with _STLP_USE_NEWALLOC or + * _STLP_USE_MALLOC (see below), the default node_alloc allocator also clean + * its internal memory pool but only if STLport is used as a dynamic library + * under Win32 (using MSVC like compilers). + */ +/* +#define _STLP_LEAKS_PEDANTIC 1 +*/ + +/* + * Uncomment _STLP_USE_NEWALLOC to force allocator to use plain "new" + * instead of STLport optimized node allocator engine. + */ +/* +#define _STLP_USE_NEWALLOC 1 +*/ + +/* + * Uncomment _STLP_USE_MALLOC to force allocator to use plain "malloc" + * instead of STLport optimized node allocator engine. + */ +/* +#define _STLP_USE_MALLOC 1 +*/ + +/* + * Uncomment _STLP_USE_PERTHREAD_ALLOC to force allocator to use + * a specific implementation targetting the massively multi-threaded + * environment. The implementation is based on the POSIX pthread + * interface. + */ +/* +#define _STLP_USE_PERTHREAD_ALLOC 1 +*/ + +/* + * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging, + * such as padding/checking for memory consistency + */ +/* +#define _STLP_DEBUG_ALLOC 1 +*/ + +/* + * For compiler not supporting partial template specialization or ordering of + * template functions STLport implement a workaround based on inheritance + * detection. This inheritance can introduce trouble in client code when + * a user class derived a STL container (which is not advised as STL containers + * do not have virtual destructors). To disable this workaround turn this macro on: + */ +/* +#define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1 +*/ + +/* + * Uncomment this to force all debug diagnostic to be directed through a + * user-defined global function: + * void __stl_debug_message(const char * format_str, ...) + * instead of predefined STLport routine. + * This allows you to take control of debug message output. + * Default routine calls fprintf(stderr,...) + * Note : If you set this macro, you must supply __stl_debug_message + * function definition somewhere. + */ +/* +#define _STLP_DEBUG_MESSAGE 1 +*/ + +/* + * Uncomment this to force all failed assertions to be executed through + * user-defined global function: + * void __stl_debug_terminate(void). This allows + * you to take control of assertion behaviour for debugging purposes. + * Default routine calls _STLP_ABORT(). + * Note : If you set this macro, you must supply __stl_debug_terminate + * function definition somewhere. + */ +/* +#define _STLP_DEBUG_TERMINATE 1 +*/ + +/* + * Uncomment that to disable exception handling code + */ +/* +#define _STLP_DONT_USE_EXCEPTIONS 1 +*/ + +/* + * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace + * stlport:: or std::, even if the compiler supports namespaces + */ +/* +#define _STLP_NO_NAMESPACES 1 +*/ + +/*========================================================== + * Compatibility section + *==========================================================*/ + +/* + * Use abbreviated class names for linker benefit (don't affect interface). + * This option is obsolete, but should work in this release. + * + */ +/* +#define _STLP_USE_ABBREVS +*/ + +/* + * This definition precludes STLport reverse_iterator to be compatible with + * other parts of MSVC library. (With partial specialization, it just + * has no effect). + * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly + */ +/* +#define _STLP_NO_MSVC50_COMPATIBILITY 1 +*/ + +/* + * _STLP_USE_RAW_SGI_ALLOCATORS is a hook so that users can disable use of + * allocator as default parameter for containers, and use SGI + * raw allocators as default ones, without having to edit library headers. + * Use of this macro is strongly discouraged. + */ +/* +#define _STLP_USE_RAW_SGI_ALLOCATORS 1 +*/ + +/* + * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type() + * for querying iterator properties. Please note those names are non-standard and are not guaranteed + * to be used by every implementation. However, this setting is on by default when partial specialization + * is not implemented in the compiler and cannot be simulated (only if _STLP_NO_ANACHRONISMS is not set). + * Use of those interfaces for user-defined iterators is strongly discouraged: + * please use public inheritance from iterator<> template to achieve desired effect. + * Second form is to disable old-style queries in any case. + */ +/* +#define _STLP_USE_OLD_HP_ITERATOR_QUERIES +#define _STLP_NO_OLD_HP_ITERATOR_QUERIES +*/ + + +/*==========================================================================*/ + +/* This section contains swithes which should be off by default, + * but so few compilers would have it undefined, so that we set them here, + * with the option to be turned off later in compiler-specific file + */ + +#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT +#define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT + +/* + Local Variables: + mode:C++ + End: +*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/stl_confix.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/stl_confix.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,78 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* + * STLport configuration file + * It is internal STLport header - DO NOT include it directly + * Purpose of this file : to define STLport settings that depend on + * compiler flags or can be otherwise missed + * + */ + +#ifndef _STLP_CONFIX_H +# define _STLP_CONFIX_H + +/* If, by any chance, C compiler gets there, try to help it to pass smoothly */ +# if ! defined (__cplusplus) && ! defined (_STLP_HAS_NO_NAMESPACES) +# define _STLP_HAS_NO_NAMESPACES +# endif + +# if defined(__MINGW32__) +# define _STLP_NO_DRAND48 +# endif + +/* Modena C++ library */ +#if defined (__MWERKS__) && __MWERKS__ <= 0x2303 || (defined (__KCC) && __KCC_VERSION < 3400) +# include +# define _STLP_USE_MSIPL 1 +# if defined (__KCC) || (defined(__MSL_CPP__) && \ + ( (__MSL_CPP__ >= 0x5000 && defined( _MSL_NO_MESSAGE_FACET )) || \ + (__MSL_CPP__ < 0x5000 && defined( MSIPL_NL_TYPES ))) \ + ) +# define _STLP_NO_NATIVE_MESSAGE_FACET 1 +# endif +#endif + +/* common switches for EDG front-end */ +# if defined (__EDG_SWITCHES) +# if !(defined(_TYPENAME) || defined (_TYPENAME_IS_KEYWORD)) +# undef _STLP_NEED_TYPENAME +# define _STLP_NEED_TYPENAME 1 +# endif +# if !defined(_WCHAR_T_IS_KEYWORD) +# undef _STLP_NO_WCHAR_T +# define _STLP_NO_WCHAR_T 1 +# endif +# ifndef _PARTIAL_SPECIALIZATION_OF_CLASS_TEMPLATES +# undef _STLP_NO_CLASS_PARTIAL_SPECIALIZATION +# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +# endif +# ifndef _MEMBER_TEMPLATES +# undef _STLP_NO_MEMBER_TEMPLATES +# define _STLP_NO_MEMBER_TEMPLATES 1 +# undef _STLP_NO_MEMBER_TEMPLATE_CLASSES +# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 +# endif +# if !defined(_MEMBER_TEMPLATE_KEYWORD) +# undef _STLP_NO_MEMBER_TEMPLATE_KEYWORD +# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 +# endif +# if !defined (__EXCEPTIONS) && ! defined (_EXCEPTIONS) +# undef _STLP_HAS_NO_EXCEPTIONS +# define _STLP_HAS_NO_EXCEPTIONS +# endif +# undef __EDG_SWITCHES +# endif /* EDG */ +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/stl_gcce.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/stl_gcce.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,244 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* 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. +* Neither the name of Nokia Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. + +* 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 HOLDER 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. +* +* Description: +* +*/ + +// ============================================================================= +// stl_gcce.h +// This is a list of settings for STLport specific to the GCCE compiler. +// Do not include this file directly. +// ============================================================================= + +# ifndef _STLP_GCCE_H +# define _STLP_GCCE_H + + +#if defined(__WINS__) +# pragma warning ( disable : 4018 4097 4100 4127 4244 4284 4511 4512 4514 4786 4800 ) //4355 4284 4231 4511 4512 4097 4786 4800 4018 4146 4244 4514 4127 4100 4663) +# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 +// Uncomment if partial order of template functions is not available +# define _STLP_NO_FUNC_PARTIAL_ORDERING 1 +#endif + +#ifndef _STLP_NO_IOSTREAMS +//# define _STLP_NO_IOSTREAMS 1 +#endif + +//# undef _STLP_OWN_IOSTREAMS +//#define _STLP_OWN_IOSTREAMS +#define _STLP_USE_NEW_IOSTREAMS +//# define _STLP_NO_NATIVE_MBSTATE_T 1 +//# define _NOTHREADS 1 +//# define _STLP_NO_TYPEINFO 1 + +#ifndef __PLACEMENT_NEW_INLINE +#ifndef __E32STD_H__ +#ifdef __cplusplus +inline void * operator new(unsigned int, void *_P) throw() { return (_P); } +inline void operator delete(void* /*aPtr*/, void* /*aBase*/) __NO_THROW {} +#endif +#define __PLACEMENT_NEW_INLINE +#endif // E32STD_H +#endif + + +//========================================================== + +// the values choosen here as defaults try to give +// maximum functionality on the most conservative settings + +// Mostly correct guess, change it for Alpha (and other environments +// that has 64-bit "long") +# define _STLP_UINT32_T unsigned long + + +// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. +// # define _STLP_WCHAR_T_IS_USHORT 1 + +// Uncomment if long long is available + # define _STLP_LONG_LONG long long + +// Uncomment if long double is not available +// # define _STLP_NO_LONG_DOUBLE 1 + +// Uncomment this if your compiler does not support namespaces +//# define _STLP_HAS_NO_NAMESPACES 1 + +// Uncomment if "using" keyword does not work with template types +// # define _STLP_BROKEN_USING_DIRECTIVE 1 + +// Uncomment this if your compiler does not support exceptions +//# define _STLP_HAS_NO_EXCEPTIONS 1 +//# define _STLP_USE_TRAP_LEAVE 1 + +// Header that comes with the compiler +// does not define bad_alloc exception +//#if defined(__WINS__) +// Possibly required ??? +# define _STLP_NO_BAD_ALLOC 1 +//#endif + +// Uncomment if member template methods are not available +// # define _STLP_NO_MEMBER_TEMPLATES 1 + +// Uncomment if member template classes are not available +#if defined(__WINS__) +# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 +#endif + +// Uncomment if friend member templates are not available +#if defined(__WINS__) +// Possibly required ??? +//# define _STLP_NO_FRIEND_TEMPLATES 1 +#endif + +// Compiler does not accept friend declaration qualified with namespace name. +// # define _STLP_NO_QUALIFIED_FRIENDS 1 + +// Uncomment if partial specialization is not available +#if defined(__WINS__) +# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +#endif + +// Define if class being partially specialized require full name (template parameters) +// of itself for method declarations +// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS + +// Compiler has problems specializing members of partially +// specialized class +// # define _STLP_MEMBER_SPECIALIZATION_BUG + +// Compiler requires typename keyword on outline method definition +// explicitly taking nested types/typedefs +// #define _STLP_TYPENAME_ON_RETURN_TYPE + +// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a +// constant-initializer in the declaration of a static const data member +// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) +#if defined(__WINS__) +# define _STLP_STATIC_CONST_INIT_BUG +#endif + +// Define if default constructor for builtin integer type fails to initialize it to 0 +// # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 + +// Defined if constructor +// required to explicitly call member's default constructors for const objects +// # define _STLP_CONST_CONSTRUCTOR_BUG 1 + +// Define this if compiler lacks header +# define _STLP_NO_EXCEPTION_HEADER 1 + +// Uncomment if native new-style C library headers lile , etc are not available. +# define _STLP_HAS_NO_NEW_C_HEADERS 1 + +// uncomment if new-style headers is available +// # define _STLP_HAS_NEW_NEW_HEADER 1 + +// uncomment this if and other STD headers put their stuff in ::namespace, +// not std:: +// # define _STLP_VENDOR_GLOBAL_STD + +// uncomment this if and the like put stuff in ::namespace, +// not std:: +# define _STLP_VENDOR_GLOBAL_CSTD +/* +# ifdef _PTHREADS +# undef _PTHREADS +# endif +# ifdef _STLP_PTHREADS +# undef _STLP_PTHREADS +# endif +# ifdef _STLP_THREADS +# undef _STLP_THREADS +# endif +*/ + +#ifdef _STLP_USE_NEW_C_HEADERS +#undef _STLP_USE_NEW_C_HEADERS +#endif + +#undef _STLP_NATIVE_C_HEADER +#ifndef __SYMBIAN32__ +#define _STLP_NATIVE_C_HEADER(x) +#endif +#define _STLP_NATIVE_HEADER(x) + + + +# define _STLP_NO_NEW_HEADER +# define _STLP_NO_THREADS + +# define _STLP_NO_EXCEPTIONS +//# define _STLP_USE_TRAP_LEAVE + +# define _STLP_NO_OWN_IOSTREAMS +//# undef _STLP_OWN_IOSTREAMS +//#define _STLP_OWN_IOSTREAMS +#define _STLP_USE_NEW_IOSTREAMS +# define _STLP_USE_NEWALLOC +//# define _STLP_NO_NODE_ALLOC +# define _STLP_NO_LONG_DOUBLE +# define _STLP_BIG_ENDIAN +// this one causes recursive abs() calls +# define _STLP_LABS +# define _STLP_LDIV +# define _STLP_CONST_CONSTRUCTOR_BUG +// # define _STLP_HAS_NAMESPACES + +//#define _STLP_NO_CSTD_FUNCTION_IMPORTS + + +//#warning ********** COMPILER SETTINGS ********** +// ----------------------------------------------------------------------------- +// wstring support +// This is a bit confusing. +// * _STLP_NO_WCHAR_T inhibits the standard C wchar functions (Symbian doesn't +// have them). +// * _STLP_HAS_WCHAR_T triggers the typedef of wstring. It's based on wint_t, +// which isn't typedef's elsewhere, so we take care of it here. +// ----------------------------------------------------------------------------- +//#define _STLP_NO_WCHAR_T 1 +#define _STLP_HAS_WCHAR_T 1 +//typedef unsigned int wint_t; +#include + +#ifdef _WCHAR_T +#warning ********** _WCHAR_T is defined ********** +#endif + +#define _STLP_COMPLEX_SPECIALIZATION_BUG +#define _STLP_USE_EXCEPTIONS +#define _STLP_EXTERN_RANGE_ERRORS +//#define _STLP_NO_FORCE_INSTANTIATE +//#define __BUILDING_STLPORT +# define _STLP_NO_NEW_NEW_HEADER 1 +# define _STLP_USE_DECLSPEC +#define _STLP_LIBSTD_CPP_NO_STATIC_VAR_ + +#endif // _STLP_GCCE_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/stl_rvct.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/stl_rvct.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,244 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* 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. +* Neither the name of Nokia Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. + +* 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 HOLDER 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. +* +* Description: +* +*/ + +// ============================================================================= +// stl_rvct.h +// This is a list of settings for STLport specific to the ARM RVCT compiler. +// Do not include this file directly. +// ============================================================================= + +# ifndef _STLP_RVCT_H +# define _STLP_RVCT_H + + +#if defined(__WINS__) +# pragma warning ( disable : 4018 4097 4100 4127 4244 4284 4511 4512 4514 4786 4800 ) //4355 4284 4231 4511 4512 4097 4786 4800 4018 4146 4244 4514 4127 4100 4663) +# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 +// Uncomment if partial order of template functions is not available +# define _STLP_NO_FUNC_PARTIAL_ORDERING 1 +#endif + +#ifndef _STLP_NO_IOSTREAMS +//# define _STLP_NO_IOSTREAMS 1 +#endif + +//# undef _STLP_OWN_IOSTREAMS +//#define _STLP_OWN_IOSTREAMS +#define _STLP_USE_NEW_IOSTREAMS +//# define _STLP_NO_NATIVE_MBSTATE_T 1 +//# define _NOTHREADS 1 +//# define _STLP_NO_TYPEINFO 1 + +#ifndef __PLACEMENT_NEW_INLINE +#ifndef __E32STD_H__ +#ifdef __cplusplus +inline void * operator new(unsigned int, void *_P) throw() { return (_P); } +inline void operator delete(void* /*aPtr*/, void* /*aBase*/) __NO_THROW {} +#endif +#define __PLACEMENT_NEW_INLINE +#endif // E32STD_H +#endif + + +//========================================================== + +// the values choosen here as defaults try to give +// maximum functionality on the most conservative settings + +// Mostly correct guess, change it for Alpha (and other environments +// that has 64-bit "long") +# define _STLP_UINT32_T unsigned long + + +// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. +// # define _STLP_WCHAR_T_IS_USHORT 1 + +// Uncomment if long long is available + # define _STLP_LONG_LONG long long + +// Uncomment if long double is not available +// # define _STLP_NO_LONG_DOUBLE 1 + +// Uncomment this if your compiler does not support namespaces +//# define _STLP_HAS_NO_NAMESPACES 1 + +// Uncomment if "using" keyword does not work with template types +// # define _STLP_BROKEN_USING_DIRECTIVE 1 + +// Uncomment this if your compiler does not support exceptions +//# define _STLP_HAS_NO_EXCEPTIONS 1 +//# define _STLP_USE_TRAP_LEAVE 1 + +// Header that comes with the compiler +// does not define bad_alloc exception +//#if defined(__WINS__) +// Possibly required ??? +# define _STLP_NO_BAD_ALLOC 1 +//#endif + +// Uncomment if member template methods are not available +// # define _STLP_NO_MEMBER_TEMPLATES 1 + +// Uncomment if member template classes are not available +#if defined(__WINS__) +# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 +#endif + +// Uncomment if friend member templates are not available +#if defined(__WINS__) +// Possibly required ??? +//# define _STLP_NO_FRIEND_TEMPLATES 1 +#endif + +// Compiler does not accept friend declaration qualified with namespace name. +// # define _STLP_NO_QUALIFIED_FRIENDS 1 + +// Uncomment if partial specialization is not available +#if defined(__WINS__) +# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +#endif + +// Define if class being partially specialized require full name (template parameters) +// of itself for method declarations +// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS + +// Compiler has problems specializing members of partially +// specialized class +// # define _STLP_MEMBER_SPECIALIZATION_BUG + +// Compiler requires typename keyword on outline method definition +// explicitly taking nested types/typedefs +// #define _STLP_TYPENAME_ON_RETURN_TYPE + +// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a +// constant-initializer in the declaration of a static const data member +// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) +#if defined(__WINS__) +# define _STLP_STATIC_CONST_INIT_BUG +#endif + +// Define if default constructor for builtin integer type fails to initialize it to 0 +// # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 + +// Defined if constructor +// required to explicitly call member's default constructors for const objects +// # define _STLP_CONST_CONSTRUCTOR_BUG 1 + +// Define this if compiler lacks header +# define _STLP_NO_EXCEPTION_HEADER 1 + +// Uncomment if native new-style C library headers lile , etc are not available. +# define _STLP_HAS_NO_NEW_C_HEADERS 1 + +// uncomment if new-style headers is available +// # define _STLP_HAS_NEW_NEW_HEADER 1 + +// uncomment this if and other STD headers put their stuff in ::namespace, +// not std:: +// # define _STLP_VENDOR_GLOBAL_STD + +// uncomment this if and the like put stuff in ::namespace, +// not std:: +# define _STLP_VENDOR_GLOBAL_CSTD +/* +# ifdef _PTHREADS +# undef _PTHREADS +# endif +# ifdef _STLP_PTHREADS +# undef _STLP_PTHREADS +# endif +# ifdef _STLP_THREADS +# undef _STLP_THREADS +# endif +*/ + +#ifdef _STLP_USE_NEW_C_HEADERS +#undef _STLP_USE_NEW_C_HEADERS +#endif + +#undef _STLP_NATIVE_C_HEADER +#ifndef __SYMBIAN32__ +#define _STLP_NATIVE_C_HEADER(x) +#endif +#define _STLP_NATIVE_HEADER(x) + + + +# define _STLP_NO_NEW_HEADER +# define _STLP_NO_THREADS + +# define _STLP_NO_EXCEPTIONS +//# define _STLP_USE_TRAP_LEAVE + +# define _STLP_NO_OWN_IOSTREAMS +//# undef _STLP_OWN_IOSTREAMS +//#define _STLP_OWN_IOSTREAMS +#define _STLP_USE_NEW_IOSTREAMS +# define _STLP_USE_NEWALLOC +//# define _STLP_NO_NODE_ALLOC +# define _STLP_NO_LONG_DOUBLE +# define _STLP_BIG_ENDIAN +// this one causes recursive abs() calls +# define _STLP_LABS +# define _STLP_LDIV +# define _STLP_CONST_CONSTRUCTOR_BUG +// # define _STLP_HAS_NAMESPACES + +//#define _STLP_NO_CSTD_FUNCTION_IMPORTS + + +//#warning ********** COMPILER SETTINGS ********** +// ----------------------------------------------------------------------------- +// wstring support +// This is a bit confusing. +// * _STLP_NO_WCHAR_T inhibits the standard C wchar functions (Symbian doesn't +// have them). +// * _STLP_HAS_WCHAR_T triggers the typedef of wstring. It's based on wint_t, +// which isn't typedef's elsewhere, so we take care of it here. +// ----------------------------------------------------------------------------- +//#define _STLP_NO_WCHAR_T 1 +#define _STLP_HAS_WCHAR_T 1 +//typedef unsigned int wint_t; +# include + +#ifdef _WCHAR_T +#warning ********** _WCHAR_T is defined ********** +#endif + +#define _STLP_COMPLEX_SPECIALIZATION_BUG +#define _STLP_USE_EXCEPTIONS +#define _STLP_EXTERN_RANGE_ERRORS +//#define _STLP_NO_FORCE_INSTANTIATE +//#define __BUILDING_STLPORT +# define _STLP_NO_NEW_NEW_HEADER 1 +# define _STLP_USE_DECLSPEC +#define _STLP_LIBSTD_CPP_NO_STATIC_VAR_ + +#endif // _STLP_RVCT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/stl_winscw.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/stl_winscw.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,236 @@ +/* +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. + +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this +* list of conditions and the following disclaimer. +* 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. +* Neither the name of Nokia Corporation nor the names of its contributors +* may be used to endorse or promote products derived from this software +* without specific prior written permission. + +* 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 HOLDER 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. +* +* Description: +* +*/ + +// ============================================================================= +// stl_winscw.h +// This is a list of settings for STLport specific to the Metrowerks +// CodeWarrior for Symbian compiler. Do not include this file directly. +// ============================================================================= + +#ifndef _STLP_WINSCW +# define _STLP_WINSCW + +// ----------------------------------------------------------------------------- +// iostreams +// No support for these in Symbian. +// ----------------------------------------------------------------------------- +/* +# ifndef _STLP_NO_IOSTREAMS +# define _STLP_NO_IOSTREAMS +# endif + +# ifdef _STLP_OWN_IOSTREAMS +# undef _STLP_OWN_IOSTREAMS +# endif +*/ +//# define _STLP_NO_NATIVE_MBSTATE_T 1 +//# define _NOTHREADS 1 +//# define _STLP_NO_TYPEINFO 1 + + +# ifndef __PLACEMENT_NEW_INLINE +# ifndef __E32STD_H__ +# ifdef __cplusplus + inline void * operator new(unsigned int, void *_P) throw(){ return (_P); } + inline void operator delete(void* /*aPtr*/, void* /*aBase*/) __NO_THROW {} +# endif +# define __PLACEMENT_NEW_INLINE +# endif // E32STD_H +# endif + +//# undef _STLP_OWN_IOSTREAMS +//#define _STLP_OWN_IOSTREAMS +#define _STLP_USE_NEW_IOSTREAMS + + +//========================================================== + +// the values choosen here as defaults try to give +// maximum functionality on the most conservative settings + +// Mostly correct guess, change it for Alpha (and other environments +// that has 64-bit "long") +# define _STLP_UINT32_T unsigned long + + +// Define if wchar_t is not a unique type, and is actually a typedef to unsigned short. +// # define _STLP_WCHAR_T_IS_USHORT 1 + +// Uncomment if long long is available +# define _STLP_LONG_LONG long long + +// Uncomment if long double is not available +// # define _STLP_NO_LONG_DOUBLE 1 + +// Uncomment this if your compiler does not support namespaces +//# define _STLP_HAS_NO_NAMESPACES 1 + +// Uncomment if "using" keyword does not work with template types +// # define _STLP_BROKEN_USING_DIRECTIVE 1 + +// Uncomment this if your compiler does not support exceptions +//# define _STLP_HAS_NO_EXCEPTIONS 1 +//# define _STLP_USE_TRAP_LEAVE 1 + +// Header that comes with the compiler +// does not define bad_alloc exception +//# if defined(__WINS__) +// Possibly required ??? +# define _STLP_NO_BAD_ALLOC 1 +//# endif + +// Uncomment if member template methods are not available +// # define _STLP_NO_MEMBER_TEMPLATES 1 + +// Uncomment if member template classes are not available +# if defined(__WINS__) +//# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 +# endif + +// Uncomment if friend member templates are not available +#if defined(__WINS__) +// Possibly required ??? +//# define _STLP_NO_FRIEND_TEMPLATES 1 +#endif + +// Compiler does not accept friend declaration qualified with namespace name. +// # define _STLP_NO_QUALIFIED_FRIENDS 1 + +// Uncomment if partial specialization is not available +# if defined(__WINS__) +//# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 +# endif + +// Define if class being partially specialized require full name (template parameters) +// of itself for method declarations +// # define _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS + +// Compiler has problems specializing members of partially +// specialized class +// # define _STLP_MEMBER_SPECIALIZATION_BUG + +// Compiler requires typename keyword on outline method definition +// explicitly taking nested types/typedefs +// #define _STLP_TYPENAME_ON_RETURN_TYPE + +// * _STLP_STATIC_CONST_INIT_BUG: defined if the compiler can't handle a +// constant-initializer in the declaration of a static const data member +// of integer type. (See section 9.4.2, paragraph 4, of the C++ standard.) +#if defined(__WINS__) +//# define _STLP_STATIC_CONST_INIT_BUG +#endif + +// Define if default constructor for builtin integer type fails to initialize it to 0 +// # define _STLP_DEFAULT_CONSTRUCTOR_BUG 1 + +// Defined if constructor +// required to explicitly call member's default constructors for const objects +// # define _STLP_CONST_CONSTRUCTOR_BUG 1 + +// Define this if compiler lacks header +# define _STLP_NO_EXCEPTION_HEADER 1 + +// Uncomment if native new-style C library headers lile , etc are not available. +# define _STLP_HAS_NO_NEW_C_HEADERS 1 + +// uncomment if new-style headers is available +// # define _STLP_HAS_NEW_NEW_HEADER 1 + +// uncomment this if and other STD headers put their stuff in ::namespace, +// not std:: +// # define _STLP_VENDOR_GLOBAL_STD + +// uncomment this if and the like put stuff in ::namespace, +// not std:: +# define _STLP_VENDOR_GLOBAL_CSTD +/* +# ifdef _PTHREADS +# undef _PTHREADS +# endif +# ifdef _STLP_PTHREADS +# undef _STLP_PTHREADS +# endif +# ifdef _STLP_THREADS +# undef _STLP_THREADS +# endif +*/ +# define _STLP_NATIVE_INCLUDE_PATH +# define _STLP_NATIVE_C_INCLUTE_PATH + +# define _STLP_NO_NEW_HEADER +# define _STLP_NO_THREADS + +# define _STLP_NO_EXCEPTIONS + +# define _STLP_USE_NEWALLOC +//# define _STLP_NO_NODE_ALLOC +# define _STLP_NO_LONG_DOUBLE +# define _STLP_BIG_ENDIAN +// this one causes recursive abs() calls +# define _STLP_LABS +# define _STLP_LDIV +# define _STLP_CONST_CONSTRUCTOR_BUG +// # define _STLP_HAS_NAMESPACES + +#ifdef _STLP_USE_NEW_C_HEADERS +#undef _STLP_USE_NEW_C_HEADERS +#endif + +#undef _STLP_NATIVE_C_HEADER +#ifndef __SYMBIAN32__ +#define _STLP_NATIVE_C_HEADER(x) +#endif +#define _STLP_NATIVE_HEADER(x) + +// ----------------------------------------------------------------------------- +// wstring support +// This is a bit confusing. +// * _STLP_NO_WCHAR_T inhibits the standard C wchar functions (Symbian doesn't +// have them). +// * _STLP_HAS_WCHAR_T triggers the typedef of wstring. It's based on wint_t, +// which isn't typedef's elsewhere, so we take care of it here. +// ----------------------------------------------------------------------------- +//# define _STLP_NO_WCHAR_T 1 +# define _STLP_HAS_WCHAR_T 1 +# define _STLP_WCHAR_T_IS_USHORT 1 +# include + +#define _STLP_COMPLEX_SPECIALIZATION_BUG +#define _STLP_USE_EXCEPTIONS +#define _STLP_EXTERN_RANGE_ERRORS +//#define _STLP_NO_FORCE_INSTANTIATE +//#define __BUILDING_STLPORT +//# define _STLP_USE_STDIO_IO +# define _STLP_NO_NEW_NEW_HEADER +# define _STLP_USE_DECLSPEC +#define __LIBSTD_CPP_SYMBIAN32_WSD__ + +//========================================================== +#endif // _STLP_WINSCW diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/config/user_config.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/config/user_config.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,312 @@ +/* + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + */ + +/* + * Purpose of this file : + * + * To hold user-definable portion of STLport settings which may be overridden + * on per-project basis. + * Please note that if you use STLport iostreams (compiled library) then you have + * to use consistent settings when you compile STLport library and your project. + * Those settings are defined in host.h and have to be the same for a given + * STLport installation. + */ + + +/*========================================================== + * User-settable macros that control compilation: + * Features selection + *==========================================================*/ + +/* + * Use this switch for embedded systems where no iostreams are available + * at all. STLport own iostreams will also get disabled automatically then. + * You can either use STLport iostreams, or no iostreams. + * If you want iostreams, you have to compile library in ../build/lib + * and supply resulting library at link time. + */ +/* +#define _STLP_NO_IOSTREAMS 1 +*/ + +/* + * Set _STLP_DEBUG to turn the "Debug Mode" on. + * That gets you checked iterators/ranges in the manner + * of "Safe STL". Very useful for debugging. Thread-safe. + * Please do not forget to link proper STLport library flavor + * (e.g libstlportstlg.so or libstlportstlg.a) when you set this flag + * in STLport iostreams mode, namespace customization guaranty that you + * link to the right library. + */ +/* +#define _STLP_DEBUG 1 +*/ +/* + * You can also choose the debug level: + * STLport debug level: Default value + * Check only what the STLport implementation consider as invalid. + * It also change the iterator invalidation schema. + * Standard debug level: Check for all operations the standard consider as "undefined behavior" + * even if STlport implement it correctly. It also invalidates iterators + * more often. + */ +/* +#define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL +#define _STLP_DEBUG_LEVEL _STLP_STANDARD_DBG_LEVEL +*/ +/* When an inconsistency is detected by the 'safe STL' the program will abort. + * If you prefer an exception define the following macro. The thrown exception + * will be the Standard runtime_error exception. + */ +/* +#define _STLP_DEBUG_MODE_THROWS + */ + +/* + * _STLP_NO_CUSTOM_IO : define this if you do not instantiate basic_xxx iostream + * classes with custom types (which is most likely the case). Custom means types + * other than char, wchar_t, char_traits<> and allocator<> like + * basic_ostream > or + * basic_string, my_allocator > + * When this option is on, most non-inline template functions definitions for iostreams + * are not seen by the client which saves a lot of compile time for most compilers, + * also object and executable size for some. + * Default is off, just not to break compilation for those who do use those types. + * That also guarantees that you still use optimized standard i/o when you compile + * your program without optimization. Option does not affect STLport library build; you + * may use the same binary library with and without this option, on per-project basis. + */ +/* +#define _STLP_NO_CUSTOM_IO +*/ + +/* + * _STLP_NO_RELOPS_NAMESPACE: if defined, don't put the relational + * operator templates (>, <=. >=, !=) in namespace std::rel_ops, even + * if the compiler supports namespaces. + * Note : if the compiler do not support namespaces, those operators are not be provided by default, + * to simulate hiding them into rel_ops. This was proved to resolve many compiler bugs with ambiguity. + */ +/* +#define _STLP_NO_RELOPS_NAMESPACE 1 +*/ + +/* + * If _STLP_USE_OWN_NAMESPACE is in effect, STLport by default will try + * to rename std:: for the user to stlport::. If you do not want this feature, + * please define the following switch and then use stlport:: + */ +/* +#define _STLP_DONT_REDEFINE_STD 1 +*/ + +/* + * _STLP_WHOLE_NATIVE_STD : only meaningful in _STLP_USE_OWN_NAMESPACE mode. + * Normally, STLport only imports necessary components from native std:: namespace - + * those not yet provided by STLport (, , etc.) + * and their dependencies (, ). + * You might want everything from std:: being available in std:: namespace when you + * include corresponding STLport header (like STLport provides std::map as well, etc.), + * if you are going to use both stlport:: and std:: components in your code. + * Otherwise this option is not recommended as it increases the size of your object files + * and slows down compilation. + */ +/* +#define _STLP_WHOLE_NATIVE_STD +*/ + +/* + * Use this option to catch uninitialized members in your classes. + * When it is set, construct() and destroy() fill the class storage + * with _STLP_SHRED_BYTE (see below). + * Note : _STLP_DEBUG and _STLP_DEBUG_ALLOC don't set this option automatically. + */ +/* +#define _STLP_DEBUG_UNINITIALIZED 1 +#define _STLP_DEBUG_ALLOC 1 +*/ + +/* + * Uncomment and provide a definition for the byte with which raw memory + * will be filled if _STLP_DEBUG_ALLOC or _STLP_DEBUG_UNINITIALIZED is defined. + * Choose a value which is likely to cause a noticeable problem if dereferenced + * or otherwise abused. A good value may already be defined for your platform; see + * stl/_config.h + */ +/* +#define _STLP_SHRED_BYTE 0xA3 +*/ + +/* + * This option is for gcc users only and only affects systems where native linker + * does not let gcc to implement automatic instantiation of static template data members/ + * It is being put in this file as there is no way to check if we are using GNU ld automatically, + * so it becomes user's responsibility. + */ +/* +#define _STLP_GCC_USES_GNU_LD +*/ + +/*========================================================== + * Compatibility section + *==========================================================*/ + +/* + * Define this macro to disable anachronistic constructs (like the ones used in HP STL and + * not included in final standard, etc. + */ +/* +#define _STLP_NO_ANACHRONISMS 1 +*/ + +/* + * Define this macro to disable STLport extensions (for example, to make sure your code will + * compile with some other implementation ) + */ +/* +#define _STLP_NO_EXTENSIONS 1 +*/ + +/* + * You should define this macro if compiling with MFC - STLport + * then include instead of to get synchronisation primitives + */ +/* +#define _STLP_USE_MFC 1 +*/ + +/* + * boris : this setting is here as we cannot detect precense of new Platform SDK automatically + * If you are using new PSDK with VC++ 6.0 or lower, + * please define this to get correct prototypes for InterlockedXXX functions + */ +/* +#define _STLP_NEW_PLATFORM_SDK 1 +*/ + +/* + * For the same reason as the one above we are not able to detect easily use + * of the compiler coming with the Platform SDK instead of the one coming with + * a Microsoft Visual Studio release. This change native C/C++ library location + * and implementation, please define this to get correct STLport configuration. + */ +/* +#define _STLP_USING_PLATFORM_SDK_COMPILER 1 +*/ + +/* + * Some compilers support the automatic linking feature. + * Uncomment the following if you prefer to specify the STLport library + * to link with yourself. + * For the moment, this feature is only supported and implemented within STLport + * by the Microsoft compilers. + */ +/* +#define _STLP_DONT_USE_AUTO_LINK 1 +*/ + +/* + * If you customize the STLport generated library names don't forget to give + * the motif you used during configuration here if you still want the auto link + * to work. (Do not remove double quotes in the macro value) + */ +/* +#define _STLP_LIB_NAME_MOTIF "???" + */ + +/* + * When using automatic linking (see above), output a message that tells the + * user which lib is getting linked via 'pragma message(..)'. + * This setting has no effect if automatic linking is not active. + */ +/* +#define _STLP_VERBOSE_AUTO_LINK 1 +*/ + +/* + * Use minimum set of default arguments on template classes that have more + * than one - for example map<>, set<>. + * This has effect only if _STLP_LIMITED_DEFAULT_TEMPLATES is on. + * If _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS is set, you'll be able to compile + * set with those compilers, but you'll have to use __set__> + * + * Affects : map<>, multimap<>, set<>, multiset<>, hash_*<>, + * queue<>, priority_queue<>, stack<>, istream_iterator<> + */ +/* +#define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS 1 +*/ + +/* + * The agregation of strings using the + operator is an expensive operation + * as it requires construction of temporary objects that need memory allocation + * and deallocation. The problem can be even more important if you are adding + * several strings together in a single expression. To avoid this problem STLport + * implement expression template. With this technique addition of 2 strings is not + * a string anymore but a temporary object having a reference to each of the + * original strings involved in the expression. This object carry information + * directly to the destination string to set its size correctly and only make + * a single call to the allocator. This technique also works for the addition of + * N elements where elements are basic_string, C string or a single character. + * The drawback can be longer compilation time and bigger executable size. + * STLport rebuild: Yes + */ +/* +#define _STLP_USE_TEMPLATE_EXPRESSION 1 +*/ + +/* + * By default the STLport basic_string implementation use a little static buffer + * (of 16 chars when writing this doc) to avoid systematically memory allocation + * in case of little basic_string. The drawback of such a method is bigger + * basic_string size and some performance penalty for method like swap. If you + * prefer systematical dynamic allocation turn on this macro. + * STLport rebuild: Yes + */ +/* +#define _STLP_DONT_USE_SHORT_STRING_OPTIM 1 +*/ + +/* + * To reduce the famous code bloat trouble due to the use of templates STLport grant + * a specialization of some containers for pointer types. So all instanciations + * of those containers with a pointer type will use the same implementation based on + * a container of void*. This feature has show very good result on object files size + * but after link phase and optimization you will only experiment benefit if you use + * many container with pointer types. + */ +/* +#define _STLP_USE_PTR_SPECIALIZATIONS 1 +*/ + +/* + * To achieve many different optimizations within the template implementations STLport + * uses some type traits technique. With this macro you can ask STLport to use the famous + * boost type traits rather than the internal one. The advantages are more compiler + * integration and a better support. If you only define this macro once the STLport has been + * built you just have to add the boost install path within your include path. If you want + * to use this feature at STLport built time you will have to define the + * STLP_BUILD_BOOST_PATH enrironment variable with the value of the boost library path. + */ +/* +#define _STLP_USE_BOOST_SUPPORT 1 +*/ + +/*==========================================================*/ + +/* + Local Variables: + mode: C++ + End: +*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/msl_string.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/msl_string.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,42 @@ +/* + * Copyright (c) 1998 + * Mark of the Unicorn, Inc. + * + * Permission to use, copy, modify, distribute and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation. Mark of the Unicorn, Inc. makes no + * representations about the suitability of this software for any + * purpose. It is provided "as is" without express or implied warranty. + * + */ +#if defined( _STLP_USE_MSIPL ) && !defined( _STLP_MSL_STRING_H_ ) +#define _STLP_MSL_STRING_H_ + +//# define char_traits __msl_char_traits +# define basic_string __msl_basic_string +# define b_str_ref __msl_b_str_ref +# define basic_istream __msl_basic_istream +# define basic_ostream __msl_basic_ostream +# define string __msl_string +# define wstring __msl_wstring +# define iterator_traits __msl_iterator_traits + +namespace std +{ + template class basic_istream; + template class basic_ostream; +} + +# include _STLP_NATIVE_HEADER(string) +// # undef char_traits +# undef basic_string +# undef b_str_ref +# undef basic_istream +# undef basic_ostream +# undef string +# undef wstring +# undef iterator_traits + +#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/type_manips.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/type_manips.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,328 @@ +/* + * + * Copyright (c) 2003 + * François Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + + +#ifndef _STLP_TYPE_MANIPS_H +#define _STLP_TYPE_MANIPS_H + +# if defined (__GNUC__) && (__GNUC__ > 3) +// See comment below +# include +# endif + +_STLP_BEGIN_NAMESPACE + +/* + * gcc (libstdc++) define __true_type in different headers, and while + * in gcc 3.x it in bits/type_traits.h that included only from headers + * that not included from STLport; in gcc 4.x it defined in + * bits/cpp_type_traits.h, that included well... from cmath for example + * + * libstdc++ v3, __GLIBCXX__ 20050519 (3.4.4) use variant 1, + * libstdc++ v3, __GLIBCXX__ 20060306 (3.4.6) use variant 1, + * while libstdc++ v3, __GLIBCXX__ 20050921 (4.0.2) use variant 2, + * __GLIBCXX__ 20060524 (4.1.1) use variant 2 + * muddle in libstdc++ versions... + * + */ +# if defined (__GNUC__) && (__GNUC__ > 3) +using ::__true_type; +using ::__false_type; +# else +struct __true_type {}; +struct __false_type {}; +# endif + +#if defined (_STLP_USE_NAMESPACES) +_STLP_MOVE_TO_PRIV_NAMESPACE +using _STLP_STD::__true_type; +using _STLP_STD::__false_type; +_STLP_MOVE_TO_STD_NAMESPACE +#endif + +//bool to type +template +struct __bool2type +{ typedef __true_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct __bool2type<1> { typedef __true_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct __bool2type<0> { typedef __false_type _Ret; }; + +//type to bool +template +struct __type2bool { enum {_Ret = 1}; }; + +_STLP_TEMPLATE_NULL +struct __type2bool<__true_type> { enum {_Ret = 1}; }; + +_STLP_TEMPLATE_NULL +struct __type2bool<__false_type> { enum {_Ret = 0}; }; + +//Negation +template +struct _Not { typedef __false_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct _Not<__false_type> { typedef __true_type _Ret; }; + +// logical and of 2 predicated +template +struct _Land2 { typedef __false_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct _Land2<__true_type, __true_type> { typedef __true_type _Ret; }; + +// logical and of 3 predicated +template +struct _Land3 { typedef __false_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct _Land3<__true_type, __true_type, __true_type> { typedef __true_type _Ret; }; + +//logical or of 2 predicated +template +struct _Lor2 { typedef __true_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct _Lor2<__false_type, __false_type> { typedef __false_type _Ret; }; + +// logical or of 3 predicated +template +struct _Lor3 { typedef __true_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct _Lor3<__false_type, __false_type, __false_type> { typedef __false_type _Ret; }; + +//////////////////////////////////////////////////////////////////////////////// +// class template __select +// Selects one of two types based upon a boolean constant +// Invocation: __select<_Cond, T, U>::Result +// where: +// flag is a compile-time boolean constant +// T and U are types +// Result evaluates to T if flag is true, and to U otherwise. +//////////////////////////////////////////////////////////////////////////////// +// BEWARE: If the compiler do not support partial template specialization or nested template +//classes the default behavior of the __select is to consider the condition as false and so return +//the second template type!! + +#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +template +struct __select { typedef _Tp1 _Ret; }; + +template +struct __select { typedef _Tp2 _Ret; }; + +# if defined (__BORLANDC__) +template +struct __selectT { typedef _Tp1 _Ret; }; + +template +struct __selectT<__false_type, _Tp1, _Tp2> { typedef _Tp2 _Ret; }; +# endif + +#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) +template +struct __select_aux { + template + struct _In { + typedef _Tp1 _Ret; + }; +}; + +_STLP_TEMPLATE_NULL +struct __select_aux<0> { + template + struct _In { + typedef _Tp2 _Ret; + }; +}; + +template +struct __select { + typedef typename __select_aux<_Cond>::_STLP_TEMPLATE _In<_Tp1, _Tp2>::_Ret _Ret; +}; +# else /* _STLP_MEMBER_TEMPLATE_CLASSES */ +//default behavior +template +struct __select { + typedef _Tp2 _Ret; +}; +# endif /* _STLP_MEMBER_TEMPLATE_CLASSES */ + +#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ + +#if defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) +// Boris : simulation technique is used here according to Adobe Open Source License Version 1.0. +// Copyright 2000 Adobe Systems Incorporated and others. All rights reserved. +// Authors: Mat Marcus and Jesse Jones +// The original version of this source code may be found at +// http://opensource.adobe.com. + +// These are the discriminating functions +template +char _STLP_CALL _IsSameFun(bool, _Tp const volatile*, _Tp const volatile*); // no implementation is required +char* _STLP_CALL _IsSameFun(bool, ...); // no implementation is required + +template +struct _IsSame { + static _Tp1* __null_rep1(); + static _Tp2* __null_rep2(); + enum { _Ret = (sizeof(_IsSameFun(false,__null_rep1(), __null_rep2())) == sizeof(char)) }; + typedef typename __bool2type<_Ret>::_Ret _RetT; +}; + +#else + +template +struct _IsSameAux { + typedef __false_type _RetT; + enum { _Ret = 0 }; +}; + +template +struct _UnConstType { typedef _Tp _Type; }; + +template +struct _UnVolatileType { typedef _Tp _Type; }; + +template +struct _UnCVType { + typedef typename _UnVolatileType<_Tp>::_Type _UnVType; + typedef typename _UnConstType<_UnVType>::_Type _Type; +}; + +# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) +template +struct _IsSameAux<_Tp, _Tp> { + typedef __true_type _RetT; + enum { _Ret = 1 }; +}; + +# if !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG) +template +struct _UnConstType { typedef _Tp _Type; }; + +template +struct _UnVolatileType { typedef _Tp _Type; }; +# endif + +# if defined(__BORLANDC__) +template +struct _UnConstPtr { typedef _Tp _Type; }; + +template +struct _UnConstPtr<_Tp*> { typedef _Tp _Type; }; + +template +struct _UnConstPtr { typedef _Tp _Type; }; +# endif +# endif + +template +struct _IsSame { + typedef typename _UnCVType<_Tp1>::_Type _Type1; + typedef typename _UnCVType<_Tp2>::_Type _Type2; + + typedef _IsSameAux<_Type1, _Type2> _Aux; + enum { _Ret = _Aux::_Ret }; + typedef typename _Aux::_RetT _RetT; +}; +#endif + +/* + * The following struct will tell you if 2 types are the same, the limitations are: + * - it compares the types without the const or volatile qualifiers, int and const int + * will be considered as same for instance. + * - the previous remarks do not apply to pointer types, int* and int const* won't be + * considered as comparable. (int * and int *const are). + */ +template +struct _AreSameUnCVTypes { + enum { _Same = _IsSame<_Tp1, _Tp2>::_Ret }; + typedef typename _IsSame<_Tp1, _Tp2>::_RetT _Ret; +}; + +/* Rather than introducing a new macro for the following constrution we use + * an existing one (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) that + * is used for a similar feature. + */ +#if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) +template +struct _ConversionHelper { + static char _Test(bool, _Dst); + static char* _Test(bool, ...); + static _Src _MakeSource(); +}; + +template +struct _IsConvertible { + typedef _ConversionHelper<_Src*, const volatile _Dst*> _H; + enum { value = (sizeof(char) == sizeof(_H::_Test(false, _H::_MakeSource()))) }; + typedef typename __bool2type::_Ret _Ret; +}; + +/* This struct is intended to say if a pointer can be convertible to an other + * taking into account cv qualifications. It shouldn't be instanciated with + * something else than pointer type as it uses pass by value parameter that + * results in compilation error when parameter type has a special memory + * alignment + */ +template +struct _IsCVConvertible { +#if !defined (__BORLANDC__) + typedef _ConversionHelper<_Src, _Dst> _H; + enum { value = (sizeof(char) == sizeof(_H::_Test(false, _H::_MakeSource()))) }; +#else + enum { _Is1 = __type2bool<_IsConst<_Src>::_Ret>::_Ret }; + enum { _Is2 = _IsConvertible<_UnConstPtr<_Src>::_Type, _UnConstPtr<_Dst>::_Type>::value }; + enum { value = _Is1 ? 0 : _Is2 }; +#endif + typedef typename __bool2type::_Ret _Ret; +}; + +#else +template +struct _IsConvertible { + enum {value = 0}; + typedef __false_type _Ret; +}; +#endif + +template +struct _IsConst { typedef __false_type _Ret; }; + +#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG) +template +struct _IsConst { typedef __true_type _Ret; }; +#endif + +# if defined(__BORLANDC__) +template +struct _IsConst { typedef __true_type _Ret; }; + +template +struct _IsConst { typedef __true_type _Ret; }; +# endif + +_STLP_END_NAMESPACE + +#endif /* _STLP_TYPE_MANIPS_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/stl/type_traits.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/stl/type_traits.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,418 @@ +/* + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_TYPE_TRAITS_H +#define _STLP_TYPE_TRAITS_H + +/* +This header file provides a framework for allowing compile time dispatch +based on type attributes. This is useful when writing template code. +For example, when making a copy of an array of an unknown type, it helps +to know if the type has a trivial copy constructor or not, to help decide +if a memcpy can be used. + +The class template __type_traits provides a series of typedefs each of +which is either __true_type or __false_type. The argument to +__type_traits can be any type. The typedefs within this template will +attain their correct values by one of these means: + 1. The general instantiation contain conservative values which work + for all types. + 2. Specializations may be declared to make distinctions between types. + 3. Some compilers (such as the Silicon Graphics N32 and N64 compilers) + will automatically provide the appropriate specializations for all + types. + +EXAMPLE: + +//Copy an array of elements which have non-trivial copy constructors +template void copy(T* source, T* destination, int n, __false_type); +//Copy an array of elements which have trivial copy constructors. Use memcpy. +template void copy(T* source, T* destination, int n, __true_type); + +//Copy an array of any type by using the most efficient copy mechanism +template inline void copy(T* source,T* destination,int n) { + copy(source, destination, n, + typename __type_traits::has_trivial_copy_constructor()); +} +*/ + +#ifdef __WATCOMC__ +# include +#endif + +_STLP_BEGIN_NAMESPACE + +struct __true_type {}; +struct __false_type {}; + + +template struct __bool2type { + typedef __false_type _Ret; +}; + +_STLP_TEMPLATE_NULL +struct __bool2type<1> { typedef __true_type _Ret; }; + +_STLP_TEMPLATE_NULL +struct __bool2type<0> { typedef __false_type _Ret; }; + +// logical end of 3 predicated +template +struct _Land3 { + typedef __false_type _Ret; +}; + +_STLP_TEMPLATE_NULL +struct _Land3<__true_type, __true_type, __true_type> { + typedef __true_type _Ret; +}; + + +// Forward declarations. +template struct __type_traits; +template struct __type_traits_aux { + typedef __false_type has_trivial_default_constructor; + typedef __false_type has_trivial_copy_constructor; + typedef __false_type has_trivial_assignment_operator; + typedef __false_type has_trivial_destructor; + typedef __false_type is_POD_type; +}; + +_STLP_TEMPLATE_NULL +struct __type_traits_aux<0> { + typedef __false_type has_trivial_default_constructor; + typedef __false_type has_trivial_copy_constructor; + typedef __false_type has_trivial_assignment_operator; + typedef __false_type has_trivial_destructor; + typedef __false_type is_POD_type; +}; + +_STLP_TEMPLATE_NULL +struct __type_traits_aux<1> { + typedef __true_type has_trivial_default_constructor; + typedef __true_type has_trivial_copy_constructor; + typedef __true_type has_trivial_assignment_operator; + typedef __true_type has_trivial_destructor; + typedef __true_type is_POD_type; +}; + +# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS + +// Boris : simulation technique is used here according to Adobe Open Source License Version 1.0. +// Copyright 2000 Adobe Systems Incorporated and others. All rights reserved. +// Authors: Mat Marcus and Jesse Jones +// The original version of this source code may be found at +// http://opensource.adobe.com. + +struct _PointerShim { + // Since the compiler only allows at most one non-trivial + // implicit conversion we can make use of a shim class to + // be sure that IsPtr below doesn't accept classes with + // implicit pointer conversion operators + _PointerShim(const volatile void*); // no implementation +}; + +// These are the discriminating functions + +char _STLP_CALL _IsP(bool, _PointerShim); // no implementation is required +char* _STLP_CALL _IsP(bool, ...); // no implementation is required + +template +char _STLP_CALL _IsSameFun(bool, _Tp*, _Tp*); // no implementation is required +char* _STLP_CALL _IsSameFun(bool, ...); // no implementation is required + +template +struct _IsSame { + // boris : check! + static _Tp1* __null_rep1(); + static _Tp2* __null_rep2(); + enum { _Ret = (sizeof(_IsSameFun(false,__null_rep1(),__null_rep2())) == sizeof(char)) }; +}; + +template +struct _IsPtr { + + // This template meta function takes a type T + // and returns true exactly when T is a pointer. + // One can imagine meta-functions discriminating on + // other criteria. + static _Tp& __null_rep(); + enum { _Ret = (sizeof(_IsP(false,__null_rep())) == sizeof(char)) }; + +}; + +template +struct _IsPtrType { + enum { _Is = _IsPtr<_Tp>::_Ret } ; + typedef __bool2type< _Is > _BT; + typedef typename _BT::_Ret _Type; + static _Type _Ret() { return _Type(); } +}; + +template +struct _BothPtrType { + typedef __bool2type< _IsPtr<_Tp1>::_Ret> _B1; + typedef __bool2type< _IsPtr<_Tp2>::_Ret> _B2; + typedef typename _B1::_Ret _Type1; + typedef typename _B2::_Ret _Type2; + typedef typename _Land3<_Type1, _Type2, __true_type>::_Ret _Type; + static _Type _Ret() { return _Type(); } +}; + +// we make general case dependant on the fact the type is actually a pointer. + +template +struct __type_traits : __type_traits_aux<_IsPtr<_Tp>::_Ret> {}; + +# else + +template +struct __type_traits { + typedef __true_type this_dummy_member_must_be_first; + /* Do not remove this member. It informs a compiler which + automatically specializes __type_traits that this + __type_traits template is special. It just makes sure that + things work if an implementation is using a template + called __type_traits for something unrelated. */ + + /* The following restrictions should be observed for the sake of + compilers which automatically produce type specific specializations + of this class: + - You may reorder the members below if you wish + - You may remove any of the members below if you wish + - You must not rename members without making the corresponding + name change in the compiler + - Members you add will be treated like regular members unless + you add the appropriate support in the compiler. */ + typedef __false_type has_trivial_default_constructor; + typedef __false_type has_trivial_copy_constructor; + typedef __false_type has_trivial_assignment_operator; + typedef __false_type has_trivial_destructor; + typedef __false_type is_POD_type; +}; + + +template struct _IsPtr { enum { _Ret = 0 }; }; +template struct _IsPtrType { + static __false_type _Ret() { return __false_type();} +}; +template struct _BothPtrType { + static __false_type _Ret() { return __false_type();} +}; + +template +struct _IsSame { enum { _Ret = 0 }; }; + +// template +// struct _IsSameType { static __false_type _Ret() { return __false_type(); } }; + +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION +template struct _IsPtr<_Tp*> { enum { _Ret = 1 }; }; +template struct _IsPtrType<_Tp*> { + static __true_type _Ret() { return __true_type();} +}; +template struct _BothPtrType<_Tp1*, _Tp2*> { + static __true_type _Ret() { return __true_type();} +}; +template +struct _IsSame<_Tp, _Tp> { enum { _Ret = 1 }; }; +# endif + +# endif /* _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS */ + +// Provide some specializations. This is harmless for compilers that +// have built-in __types_traits support, and essential for compilers +// that don't. +#ifndef _STLP_NO_BOOL +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +#endif /* _STLP_NO_BOOL */ +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +#ifndef _STLP_NO_SIGNED_BUILTINS +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +# endif +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT) +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +#endif /* _STLP_HAS_WCHAR_T */ + +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; + +#ifdef _STLP_LONG_LONG +_STLP_TEMPLATE_NULL struct __type_traits<_STLP_LONG_LONG> : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +#endif /* _STLP_LONG_LONG */ + +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; + +# if !defined ( _STLP_NO_LONG_DOUBLE ) +_STLP_TEMPLATE_NULL struct __type_traits : __type_traits_aux<1> {}; +# endif + +#ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION +template struct __type_traits<_Tp*> : __type_traits_aux<1> {}; +#endif + +// The following could be written in terms of numeric_limits. +// We're doing it separately to reduce the number of dependencies. + +template struct _Is_integer { + typedef __false_type _Integral; +}; + +#ifndef _STLP_NO_BOOL + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +#endif /* _STLP_NO_BOOL */ + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +#ifndef _STLP_NO_SIGNED_BUILTINS + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; +#endif + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT) + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +#endif /* _STLP_HAS_WCHAR_T */ + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +#ifdef _STLP_LONG_LONG + +_STLP_TEMPLATE_NULL struct _Is_integer<_STLP_LONG_LONG> { + typedef __true_type _Integral; +}; + +_STLP_TEMPLATE_NULL struct _Is_integer { + typedef __true_type _Integral; +}; + +#endif /* _STLP_LONG_LONG */ + +template +struct _OKToMemCpy { + enum { _Same = _IsSame<_Tp1,_Tp2>::_Ret } ; + typedef typename __type_traits<_Tp1>::has_trivial_assignment_operator _Tr1; + typedef typename __type_traits<_Tp2>::has_trivial_assignment_operator _Tr2; + typedef typename __bool2type< _Same >::_Ret _Tr3; + typedef typename _Land3<_Tr1, _Tr2, _Tr3>::_Ret _Type; + static _Type _Ret() { return _Type(); } +}; + +template +inline _OKToMemCpy<_Tp1, _Tp2> _IsOKToMemCpy(_Tp1*, _Tp2*) { + return _OKToMemCpy<_Tp1, _Tp2>(); +} + +template +struct _IsPOD { + typedef typename __type_traits<_Tp>::is_POD_type _Type; + static _Type _Ret() { return _Type(); } +}; + +template +inline _IsPOD<_Tp> _Is_POD (_Tp*) { return _IsPOD<_Tp>(); } + +# ifdef _STLP_CLASS_PARTIAL_SPECIALIZATION +# if defined (__BORLANDC__) || defined (__SUNPRO_CC) || ( defined (__MWERKS__) && (__MWERKS__ <= 0x2303)) || ( defined (__sgi) && defined (_COMPILER_VERSION)) || defined (__DMC__) +# define _IS_POD_ITER(_It, _Tp) __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type() +# else +# define _IS_POD_ITER(_It, _Tp) typename __type_traits< typename iterator_traits< _Tp >::value_type >::is_POD_type() +# endif +# else +# define _IS_POD_ITER(_It, _Tp) _Is_POD( _STLP_VALUE_TYPE( _It, _Tp ) )._Ret() +# endif + +# ifdef _STLP_DEFAULT_CONSTRUCTOR_BUG +// Those adaptors are here to fix common compiler bug regarding builtins: +// expressions like int k = int() should initialize k to 0 +template +inline _Tp __default_constructed_aux(_Tp*, const __false_type&) { + return _Tp(); +} +template +inline _Tp __default_constructed_aux(_Tp*, const __true_type&) { + return _Tp(0); +} + +template +inline _Tp __default_constructed(_Tp* __p) { + typedef typename _Is_integer<_Tp>::_Integral _Is_Integral; + return __default_constructed_aux(__p, _Is_Integral()); +} + +# define _STLP_DEFAULT_CONSTRUCTED(_TTp) __default_constructed((_TTp*)0) +# else +# define _STLP_DEFAULT_CONSTRUCTED(_TTp) _TTp() +# endif + +_STLP_END_NAMESPACE + +#endif /* __TYPE_TRAITS_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/string --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/string Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,62 @@ +/* + * Copyright (c) 1997-1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_STRING +# define _STLP_STRING + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x68 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#if defined (_STLP_USE_NATIVE_STRING) + +// as part of compiled runtime library depends on it. + +# if defined (_STLP_MSVC) +# include +# include +# endif + +# include _STLP_NATIVE_HEADER(string) + +# endif /* _STLP_USE_NATIVE_STRING */ + +# if !defined (_STLP_USE_NATIVE_STRING) || defined (_STLP_USE_OWN_NAMESPACE) +# include +# else +# include +# endif /*_STLP_USE_NATIVE_STRING */ + +// cleanup + +# if (_STLP_OUTERMOST_HEADER_ID == 0x68) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_STRING */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/unordered_map --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/unordered_map Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2004,2005 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_UNORDERED_MAP +#define _STLP_UNORDERED_MAP + +#ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x4030 +# include +#endif + +#ifdef _STLP_PRAGMA_ONCE +# pragma once +#endif + +#include + +#if (_STLP_OUTERMOST_HEADER_ID == 0x4030) +# include +# undef _STLP_OUTERMOST_HEADER_ID +#endif + +#endif /* _STLP_UNORDERED_MAP */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/unordered_set --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/unordered_set Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2004,2005 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_UNORDERED_SET +#define _STLP_UNORDERED_SET + +#ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x4031 +# include +#endif + +#ifdef _STLP_PRAGMA_ONCE +# pragma once +#endif + +#include + +#if (_STLP_OUTERMOST_HEADER_ID == 0x4031) +# include +# undef _STLP_OUTERMOST_HEADER_ID +#endif + +#endif /* _STLP_UNORDERED_SET */ + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/utility --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/utility Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,65 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_UTILITY +#define _STLP_UTILITY + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x75 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# ifndef __TYPE_TRAITS_H +# include +# endif + +# if !defined (_STLP_DEBUG_H) && (defined (_STLP_DEBUG) || defined (_STLP_ASSERTIONS)) +# include +# endif + +# ifndef _STLP_INTERNAL_PAIR_H +# include +# endif + +# if defined (_STLP_IMPORT_VENDOR_STD) +# include _STLP_NATIVE_HEADER(utility) +# else +# if defined (_STLP_MSVC) && ! defined (_STLP_INTERNAL_ITERATOR_H) +# include +# endif +# endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x75) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_UTILITY */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/valarray --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/valarray Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,47 @@ +/* + * Copyright (c) 1999 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_VALARRAY +#define _STLP_VALARRAY + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x76 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +#include + +#if defined (_STLP_WHOLE_VENDOR_STD) +# include _STLP_NATIVE_HEADER(valarray) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x76) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_VALARRAY */ + + +// Local Variables: +// mode:C++ +// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/stlportv5/vector --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/stdapis/stlportv5/vector Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,57 @@ +/* + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Copyright (c) 1996,1997 + * Silicon Graphics Computer Systems, Inc. + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_VECTOR +#define _STLP_VECTOR + +# ifndef _STLP_OUTERMOST_HEADER_ID +# define _STLP_OUTERMOST_HEADER_ID 0x77 +# include +# endif + +# ifdef _STLP_PRAGMA_ONCE +# pragma once +# endif + +# ifndef _STLP_INTERNAL_ALGOBASE_H +# include +# endif + +#ifndef _STLP_INTERNAL_VECTOR_H +# include +#endif + +#if defined (_STLP_IMPORT_VENDOR_STD) && ! defined (_STLP_MINIMUM_IMPORT_STD) +# include _STLP_NATIVE_HEADER(vector) +#endif + +# if (_STLP_OUTERMOST_HEADER_ID == 0x77) +# include +# undef _STLP_OUTERMOST_HEADER_ID +# endif + +#endif /* _STLP_VECTOR */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/zconf.h --- a/epoc32/include/stdapis/zconf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,374 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.h,v 1.1.2.1 2008/08/14 15:26:57 e0222316 Exp $ */ - -#ifndef _ZCONF_H -#define _ZCONF_H - -#if (defined(__TOOLS2__) || defined(__TOOLS__)) - /** Defined as nothing for tools builds, as EXPORT_C keyword not supported on these platforms */ - #define EXPORT_C -#else -#ifdef __SYMBIAN32__ - #include /* Include for definition of IMPORT_C below */ - /** This macro is used in function prototypes in zlib.h and libzcore.h. Use Symbian definition IMPORT_C instead of ZEXTERN */ - #define ZEXTERN IMPORT_C - /** This macro is used for EZLIB component */ - #define SYMBIAN_EZLIB_DEVICE -#endif /* __SYMBIAN32__ */ -#endif /* __TOOLS2__ || __TOOLS__ */ - - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define deflateBound z_deflateBound -# define deflatePrime z_deflatePrime -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table -# define zError z_zError - -# define alloc_func z_alloc_func -# define free_func z_free_func -# define in_func z_in_func -# define out_func z_out_func -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -/** define STDC i.e. Standard C */ -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -/** Maximum value for memLevel in deflateInit2 */ -# define MAX_MEM_LEVEL 8 -# else -/** Maximum value for memLevel in deflateInit2 */ -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -/** 32K LZ77 window */ -# define MAX_WBITS 15 -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -/** - Function prototypes - @param args arguments ... -*/ -# define OF(args) args -# else -/** Function prototypes */ -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -/** extern defined as ZEXTERN */ -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -/** 8 bits */ -typedef unsigned char Byte; -#endif -/** 16 bits or more */ -typedef unsigned int uInt; -/** 32 bits or more */ -typedef unsigned long uLong; - -#ifdef SMALL_MEDIUM - /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */ - typedef Byte FAR Bytef; -#endif -/** char typedef to charf */ -typedef char FAR charf; -/** int typedef to intf */ -typedef int FAR intf; -/** uInt typedef to uIntf */ -typedef uInt FAR uIntf; -/** uLong typedef to uLongf */ -typedef uLong FAR uLongf; - -#ifdef STDC - /** typedef void const* to voidpc */ - typedef void const *voidpc; - /** typedef void FAR* to voidpf */ - typedef void FAR *voidpf; - /** typedef void* to voidp */ - typedef void *voidp; -#else - /** typedef Byte const* to voidpc */ - typedef Byte const *voidpc; - /** typedef Byte FAR* to voidpf */ - typedef Byte FAR *voidpf; - /** typedef Byte* to voidp */ - typedef Byte *voidp; -#endif - -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# ifdef VMS -# include /* for off_t */ -# endif -# define z_off_t off_t -#endif -#ifndef SEEK_SET -/** Seek from beginning of file. */ -# define SEEK_SET 0 -/** Seek from current position. */ -# define SEEK_CUR 1 -/** Set file pointer to EOF plus "offset" */ -# define SEEK_END 2 -#endif -#ifndef z_off_t -/** define z_off_t as long */ -# define z_off_t long -#endif - -#if defined(__OS400__) -# define NO_vsnprintf -#endif - -#if defined(__MVS__) -# define NO_vsnprintf -# ifdef FAR -# undef FAR -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* _ZCONF_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/stdapis/zlib.h --- a/epoc32/include/stdapis/zlib.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1899 +0,0 @@ -/** -@file -@publishedAll -@released -*/ - -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 - - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). -*/ - - -#ifndef _ZLIB_H -#define _ZLIB_H - -#if (defined(__TOOLS2__) || defined(__TOOLS__)) - // A tools build picks up the zconf.h file from the user include path - #include "zconf.h" -#else - // Any other build picks up zconf.h from stdapis system include directory - #include -#endif - -#ifdef __cplusplus - extern "C" { -#endif - -/** Zlib version */ -#define ZLIB_VERSION "1.2.3" -/** Zlib version Number */ -#define ZLIB_VERNUM 0x1230 - -/** - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. - - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip streams in memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. -*/ - -/** Function pointer - used to allocate the internal state */ -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -/** Function pointer - used to free the internal state */ -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -/** - Encapsulates a zip stream -*/ -typedef struct z_stream_s { - /** Next input byte */ - Bytef *next_in; - /** Number of bytes available at next_in */ - uInt avail_in; - /** Total nb of input bytes read so far */ - uLong total_in; - - /** Next output byte should be put there */ - Bytef *next_out; - /** Remaining free space at next_out */ - uInt avail_out; - /** Total nb of bytes output so far */ - uLong total_out; - - /** Last error message, NULL if no error */ - char *msg; - /** Not visible by applications */ - struct internal_state FAR *state; - - /** Used to allocate the internal state */ - alloc_func zalloc; - /** Used to free the internal state */ - free_func zfree; - /** Private data object passed to zalloc and zfree */ - voidpf opaque; - - /** Best guess about the data type: binary or text */ - int data_type; - /** Adler32 value of the uncompressed data */ - uLong adler; - /** Reserved for future use */ - uLong reserved; -} z_stream; - -/** typedef z_stream* as z_streamp. Refer to z_stream_s for more details */ -typedef z_stream FAR *z_streamp; - -/** - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - /** True if compressed data believed to be text */ - int text; - /** Modification time */ - uLong time; - /** Extra flags (not used when writing a gzip file) */ - int xflags; - /** Operating system */ - int os; - /** Pointer to extra field or Z_NULL if none */ - Bytef *extra; - /** Extra field length (valid if extra != Z_NULL) */ - uInt extra_len; - /** Space at extra (only when reading header) */ - uInt extra_max; - /** Pointer to zero-terminated file name or Z_NULL */ - Bytef *name; - /** Space at name (only when reading header) */ - uInt name_max; - /** Pointer to zero-terminated comment or Z_NULL */ - Bytef *comment; - /** Space at comment (only when reading header) */ - uInt comm_max; - /** True if there was or will be a header crc */ - int hcrc; - /** True when done reading gzip header (not used when writing a gzip file) */ - int done; -} gz_header; - -/** gz_headerp is typedef gz_header* */ -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). -*/ - - /* constants */ - -/** Allowed flush values; see deflate() and inflate() below for details */ -#define Z_NO_FLUSH 0 -/** Allowed flush values; see deflate() and inflate() below for details. This constant will be removed, use Z_SYNC_FLUSH instead*/ -#define Z_PARTIAL_FLUSH 1 -/** Allowed flush values; see deflate() and inflate() below for details */ -#define Z_SYNC_FLUSH 2 -/** Allowed flush values; see deflate() and inflate() below for details */ -#define Z_FULL_FLUSH 3 -/** Allowed flush values; see deflate() and inflate() below for details */ -#define Z_FINISH 4 -/** Allowed flush values; see deflate() and inflate() below for details */ -#define Z_BLOCK 5 - - -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_OK 0 -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_STREAM_END 1 -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_NEED_DICT 2 -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_ERRNO (-1) -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_STREAM_ERROR (-2) -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_DATA_ERROR (-3) -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_MEM_ERROR (-4) -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_BUF_ERROR (-5) -/** Return codes for the compression/decompression functions. Negative -values are errors, positive values are used for special but normal events. */ -#define Z_VERSION_ERROR (-6) - - -/** Compression level as no compression */ -#define Z_NO_COMPRESSION 0 -/** Compression level for best speed */ -#define Z_BEST_SPEED 1 -/** Compression level for best compression */ -#define Z_BEST_COMPRESSION 9 -/** Compression level for default compression */ -#define Z_DEFAULT_COMPRESSION (-1) - - -/** Compression strategy; see deflateInit2() below for details */ -#define Z_FILTERED 1 -/** Compression strategy; see deflateInit2() below for details */ -#define Z_HUFFMAN_ONLY 2 -/** Compression strategy; see deflateInit2() below for details */ -#define Z_RLE 3 -/** Compression strategy; see deflateInit2() below for details */ -#define Z_FIXED 4 -/** Compression strategy; see deflateInit2() below for details */ -#define Z_DEFAULT_STRATEGY 0 - - -/** Possible values of the data_type field (though see inflate()) */ -#define Z_BINARY 0 -/** Possible values of the data_type field (though see inflate()) */ -#define Z_TEXT 1 -/** Possible values of the data_type field (though see inflate()). It is used for compatibility with 1.2.2 and earlier */ -#define Z_ASCII Z_TEXT -/** Possible values of the data_type field (though see inflate()) */ -#define Z_UNKNOWN 2 - - -/** The deflate compression method (the only one supported in this version) */ -#define Z_DEFLATED 8 - -/** For initializing zalloc, zfree, opaque */ -#define Z_NULL 0 - -/** For compatibility with versions < 1.0.2 */ -#define zlib_version zlibVersion() - - - /* basic functions */ - -/** The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. - @return returns zlib version - */ -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). -*/ - -/** - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumualte before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - the value returned by deflateBound (see below). If deflate does not return - Z_STREAM_END, then it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. - - @param strm Stream of data - @param flush Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumualte before producing output, in order to - maximize compression. Refer to the description above for more details. - @return deflate returns Z_OK on success. Refer to the description above for more details. -*/ -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); - -/** - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be - deallocated). - - @param strm Stream of data - @return deflateEnd returns Z_OK on success. Refer to the description above for more details. -*/ -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) -*/ - -/** - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() stop - if and when it gets to the next deflate block boundary. When decoding the - zlib or gzip format, this will cause inflate() to return immediately after - the header and before the first block. When doing a raw inflate, inflate() - will go ahead and process the first block, and will return when it gets to - the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 - if inflate() is currently decoding the last block in the deflate stream, - plus 128 if inflate() returned immediately after decoding an end-of-block - code or decoding the complete header up to just before the first byte of the - deflate stream. The end-of-block will not be indicated until all of the - uncompressed data from that block has been written to strm->next_out. The - number of unused bits may in general be greater than seven, except when - bit 7 of data_type is set, in which case the number of unused bits will be - less than eight. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster approach - may be used for the single inflate() call. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the only effect of the flush parameter in this implementation - is on the return value of inflate(), as noted below, or when it returns early - because Z_BLOCK is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the adler32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the adler32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() will decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically. Any information - contained in the gzip header is not retained, so applications that need that - information should instead use raw inflate, see inflateInit2() below, or - inflateBack() and perform their own processing of the gzip header and - trailer. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may then - call inflateSync() to look for a good compression block if a partial recovery - of the data is desired. - - @param strm Stream of data - @param flush This parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Refer to the description for more details. - @return inflate returns Z_OK on success. Refer to the description above for more details. -*/ -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); - -/** - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. - - @param strm Stream of data - @return inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - Note: In this version of the library a windowBits value of 8 is unsupported - due to a problem with the window size being set to 256 bytes. Although a - value of 8 will be accepted by deflateInit2(), as it is being changed - internally from 8 to 9, it will not be possible to use the same value when it - comes to decompression. This is because inflateInit2() does not make the same - change internally and as a result a Z_DATA_ERROR is returned when calling - inflate(). It is therefore advised that for this version of the library - windowBits of 9 is used in place of 8. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 3 (UNIX). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as - Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy - parameter only affects the compression ratio but not the correctness of the - compressed output even if it is not set appropriately. Z_FIXED prevents the - use of dynamic Huffman codes, allowing for a simpler decoder for special - applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). -*/ - -/** - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same - dictionary (see inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. In addition, the - current implementation of deflate will use at most the window size minus - 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. - - @param strm Stream of data - @param dictionary Pointer to the dictionary. Refer to the description above for more details. - @param dictLength Dictionay Length - @return deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not - perform any compression: this will be done by deflate(). -*/ -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); - -/** - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. - - @param dest destination stream - @param souce source stream of data - @return deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and - destination. -*/ -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); - -/** - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. - - @param strm stream of data - @return deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -*/ -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); - -/** - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. - - @param strm stream of data - @param level compression level - @param strategy compression algorithm - @return deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. -*/ -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); - -/** - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2() - - @param strm stream of data - @param good_length reduce lazy search above this match length - @param max_lazy do not perform lazy search above this match length - @param nice_length quit search above this match length - @param max_chain - @return deflateTune returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); - -/** - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() - or deflateInit2(). This would be used to allocate an output buffer - for deflation in a single pass, and so would be called before deflate(). - - @param strm stream of data - @param sourceLen source length - @return deflateBound returns an upper bound on the compressed size after - deflation of sourceLen bytes. -*/ -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); - -/** - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the - bits leftover from a previous deflate stream when appending to it. As such, - this function can only be used for raw deflate, and must be used before the - first deflate() call after a deflateInit2() or deflateReset(). bits must be - less than or equal to 16, and that many of the least significant bits of - value will be inserted in the output. - - @param strm stream of data - @param bits bits must be less than or equal to 16, and that many of the least - significant bits of value will be inserted in the output. - @param value represents value of the bits to be inserted - @return deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); - -/** - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 3, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - @param strm stream of data - @param head gzip header - @return deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - Note: In this version of the library a windowBits value of 8 is unsupported - due to a problem with the window size being set to 256 bytes. Although a - value of 8 will be accepted by deflateInit2(), as it is being changed - internally from 8 to 9, it will not be possible to use the same value when it - comes to decompression. This is because inflateInit2() does not make the same - change internally and as a result a Z_DATA_ERROR is returned when calling - inflate(). It is therefore advised that for this version of the library - windowBits of 9 is used in place of 8. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) -*/ - -/** - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called - immediately after inflateInit2() or inflateReset() and before any call of - inflate() to set the dictionary. The application must insure that the - dictionary that was used for compression is provided. - - inflateSetDictionary does not perform any decompression: this will be done - by subsequent calls of inflate(). - - @param strm stream of data - @param dictionary Pointer to dictionary - @param dictLength Dictionary Length - @return inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). -*/ -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); - -/** - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - @param strm Stream of data - @return inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. -*/ -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); - -/** - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - @param dest destination stream - @param source source stream of data - @return inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and - destination. -*/ -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); - -/** - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. - - @param strm Stream of data - @return inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -*/ -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); - -/** - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - @param strm stream of data - @param bits bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - @param value @param value represents value of the bits to be inserted - @return inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); - -/** - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK can be used to - force inflate() to return immediately after header processing is complete - and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When - any of extra, name, or comment are not Z_NULL and the respective field is - not present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - @param stream of data - @param head gzip header - @return inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - Note: In this version of the library a windowBits value of 8 is unsupported - due to a problem with the window size being set to 256 bytes. Although a - value of 8 will be accepted by deflateInit2(), as it is being changed - internally from 8 to 9, it will not be possible to use the same value when it - comes to decompression. This is because inflateInit2() does not make the same - change internally and as a result a Z_DATA_ERROR is returned when calling - inflate(). It is therefore advised that for this version of the library - windowBits of 9 is used in place of 8. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the paramaters are invalid, Z_MEM_ERROR if the internal state could not - be allocated, or Z_VERSION_ERROR if the version of the library does not - match the version of the header file. -*/ - -/** Input function pointer defined to be used in inflateBack */ -typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); -/** Output function pointer defined to be used in inflateBack */ -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - - -/** - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is more efficient than inflate() for - file i/o applications in that it avoids copying between the output and the - sliding window by simply making the window itself the output buffer. This - function trusts the application to not change the output buffer passed by - the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free - the allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects - only the raw deflate stream to decompress. This is different from the - normal behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format - error in the deflate stream (in which case strm->msg is set to indicate the - nature of the error), or Z_STREAM_ERROR if the stream was not properly - initialized. In the case of Z_BUF_ERROR, an input or output error can be - distinguished using strm->next_in which will be Z_NULL only if in() returned - an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to - out() returning non-zero. (in() will always be called before out(), so - strm->next_in is assured to be defined if out() returns non-zero.) Note - that inflateBack() cannot return Z_OK. - - @param strm stream of data - @param in input function pointer - @param in_desc input parameters for in_func - @param out output function pointer - @param out_desc output parameters for out_func - @return Refer to the above description for detailed explanation -*/ -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); - -/** - All memory allocated by inflateBackInit() is freed. - - @param strm stream of data - @return inflateBackEnd returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); - -/** - Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - - @return Refer to the above description for detailed explanation - */ -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); - - /* utility functions */ - -/* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. -*/ - -/** - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least the value returned - by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. - - @param dest destination buffer - @param destLen byte length of destination buffer - @param source source buffer - @param sourceLen byte length of source buffer - @return compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); - -/** - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - @param dest destination buffer - @param destLen byte length of destination buffer - @param source source buffer - @param sourceLen byte length of source buffer - @param level Compression level - @return compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); - -/** - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before - a compress() or compress2() call to allocate the destination buffer. - - @param source buffer length - @return compressBound returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. -*/ -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); - -/** - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. - - @param dest destination buffer - @param destLen byte length of destination buffer - @param source source buffer - @param sourceLen byte length of source buffer - @return uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. -*/ -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); - -#ifndef SYMBIAN_EZLIB_EXCLUDE_GZ_FUNCTIONS -/** gzfile is typedef to voidp i.e. void pointer(void*) */ -typedef voidp gzFile; - -/** - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h", or 'R' for run-length encoding - as in "wb1R". (See the description of deflateInit2 for more information - about the strategy parameter.) - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. - - @param path location of the file - @param mode refer to above description - @return gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). -*/ -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); - -/** - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - - @param fd file descriptor - @param mode The mode parameter is as in gzopen - @return gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. -*/ -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); - -/** - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - - @param file gzip file - @param level compression level - @param strategy compression algorithm - @return gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); - -/** - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - - @param file gzip file - @param buf buffer to store the copied data from the gzip file - @param len length of the data to be copied - @return gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). -*/ -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); - -/** - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). - - @param file gzip file - @param buf buffer containing data to be written to the gzip file - @param len length of the data - @return gzwrite returns the number of uncompressed bytes actually written - (0 in case of error) -*/ -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); - -/** - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). The number of - uncompressed bytes written is limited to 4095. The caller should assure that - this limit is not exceeded. If it is exceeded, then gzprintf() will return - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf() - because the secure snprintf() or vsnprintf() functions were not available. - - @param file gzip file - @param format format string - @return refer to the description above -*/ -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); - -/** - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - - @param file gzip file - @param s null-terminated string - @return gzputs returns the number of characters written, or -1 in case of error. -*/ -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); - -/** - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - - @param file gzip file - @param buf buffer to store the copied data from the gzip file - @param len number of characters to be read (len-1) - @return gzgets returns buf, or Z_NULL in case of error. -*/ -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); - -/** - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. - - @param file gzip file - @param c character - @return gzputc returns the value that was written, or -1 in case of error. -*/ -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); - -/** - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. - - @param file gzip file - @return gzgetc returns this byte or -1 in case of end of file or error. -*/ -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); - -/** - Push one character back onto the stream to be read again later. - Only one character of push-back is allowed. gzungetc() returns the - character pushed, or -1 on failure. gzungetc() will fail if a - character has been pushed but not read yet, or if c is -1. The pushed - character will be discarded if the stream is repositioned with gzseek() - or gzrewind(). - - @param c character - @param file gzip file - @return gzungetc returns the character pushed, or -1 on failure. -*/ -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); - -/** - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. - - @param file gzip file - @param flush parameter flush is as in the deflate() function - @return gzflush returns Z_OK if the flush parameter is Z_FINISH and all output could be flushed. -*/ -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); - -/** - Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - @param file gzip file - @param offset represents a number of bytes in the uncompressed data stream - @param whence defined as in lseek(2); the value SEEK_END is not supported. - @return gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); - -/** - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) - - @param file gzip file - @return refer to gzseek() return value & description -*/ -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); - -/** - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) - - @param file gzip file - @return gztell returns the starting position for the next gzread or gzwrite on the - given compressed file -*/ -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); - -/** - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. - - @param file gzip file - @return gzeof returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -*/ -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); - -/** - Returns 1 if file is being read directly without decompression, otherwise - zero. - - @param file gzip file - @return gzdirect returns 1 if file is being read directly without decompression, otherwise zero. -*/ -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); - -/** - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). - - @param file gzip file - @return gzclose returns the zlib error number (see function gzerror below). -*/ -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); - -/** - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. - - @param file gzip file - @param errnum error number - @return gzerror returns the error message for the last error which occurred on the - given compressed file. -*/ -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); - -/** - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. - - @param file gzip file -*/ -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); - -#endif //SYMBIAN_EZLIB_EXCLUDE_GZ_FUNCTIONS - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. -*/ - -/** - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); - - @param adler Adler-32 checksum - @param buf pointer to buffer - @param len length of buffer - @return If buf is NULL, this function returns - the required initial value for the checksum. -*/ -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); - -/** - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. - - @param adler1 Adler-32 checksum - @param adler2 Adler-32 checksum - @param len2 length - @return adler32_combine returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. -*/ -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); - -/** - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is NULL, this function returns the required initial - value for the for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); - - @param crc CRC-32 check value - @param buf pointer to buffer - @param len length of buffer - @return If buf is NULL, this function returns the required initial - value for the for the crc. -*/ -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); - -/** - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. - - @param crc1 CRC-32 check value - @param crc2 CRC-32 check value - @param len2 length - @return crc32_combine returns the CRC-32 check value of seq1 and seq2 - concatenated, requiring only crc1, crc2, and len2. -*/ -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -/** - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). - - deflateInit does not perform any compression: this will be done by deflate(). - - @param strm stream of data - @param level compression level - @param version version of library - @param stream_size stream size - @return deflateInit_ returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. -*/ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); - -/** - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) - - @param strm stream of data - @param version version of library - @param stream_size stream size - @return inflateInit_ returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. -*/ -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); - -/** - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - Note: In this version of the library a windowBits value of 8 is unsupported - due to a problem with the window size being set to 256 bytes. Although a - value of 8 will be accepted by deflateInit2(), as it is being changed - internally from 8 to 9, it will not be possible to use the same value when it - comes to decompression. This is because inflateInit2() does not make the same - change internally and as a result a Z_DATA_ERROR is returned when calling - inflate(). It is therefore advised that for this version of the library - windowBits of 9 is used in place of 8. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 3 (UNIX). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as - Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy - parameter only affects the compression ratio but not the correctness of the - compressed output even if it is not set appropriately. Z_FIXED prevents the - use of dynamic Huffman codes, allowing for a simpler decoder for special - applications. - deflateInit2 does not perform any compression: this will be done by deflate(). - - @param strm stream of data - @param level compression level - @param method compression method - @param windowBits refer to above note & description for window bits value - @param memLevel memory level (i.e. how much memory should be allocated). refer to above description for more detail - @param strategy compression algorithm - @param version version of library - @param stream_size size of stream - @return deflateInit2_ returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. -*/ -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); - -/** - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - Note: In this version of the library a windowBits value of 8 is unsupported - due to a problem with the window size being set to 256 bytes. Although a - value of 8 will be accepted by deflateInit2(), as it is being changed - internally from 8 to 9, it will not be possible to use the same value when it - comes to decompression. This is because inflateInit2() does not make the same - change internally and as a result a Z_DATA_ERROR is returned when calling - inflate(). It is therefore advised that for this version of the library - windowBits of 9 is used in place of 8. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. - - @param strm stream of data - @param windowBits refer to above note & description for window bits value - @param version version of library - @param stream_size size of stream - @return inflateInit2_ returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) -*/ -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); - -/** - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - Note: In this version of the library a windowBits value of 8 is unsupported - due to a problem with the window size being set to 256 bytes. Although a - value of 8 will be accepted by deflateInit2(), as it is being changed - internally from 8 to 9, it will not be possible to use the same value when it - comes to decompression. This is because inflateInit2() does not make the same - change internally and as a result a Z_DATA_ERROR is returned when calling - inflate(). It is therefore advised that for this version of the library - windowBits of 9 is used in place of 8. - - See inflateBack() for the usage of these routines. - - @param strm stream of data - @param windowBits refer to above note for window bits value - @param window window is a caller supplied buffer of that size - @param version version of library - @param stream_size size of stream - @return inflateBackInit_ returns Z_OK on success, Z_STREAM_ERROR if any of - the paramaters are invalid, Z_MEM_ERROR if the internal state could not - be allocated, or Z_VERSION_ERROR if the version of the library does not - match the version of the header file. -*/ -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); - -/** - Macro deflateInit defined for deflateInit_() - @param strm stream of data - @param level compression level -*/ -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) -/** - Macro inflateInit defined for inflateInit_() - @param strm stream of data -*/ -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) -/** - Macro deflateInit2 defined for deflateInit2_() - @param strm stream of data - @param level compression level - @param method compression method - @param windowBits refer to the note for window bits value in deflateInit2_() - @param memLevel memory level (i.e. how much memory should be allocated). refer to above description for more detail - @param strategy compression algorithm -*/ -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, sizeof(z_stream)) -/** - Macro inflateInit2 defined for inflateInit2_() - @param strm stream of data - @param windowBits refer to the note for window bits value in inflateInit2_() -*/ -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) -/** - Macro inflateBackInit defined for inflateBackInit_() - @param strm stream of data - @param windowBits refer to the note for window bits value in inflateBackInit_() - @param window window is a caller supplied buffer of that size -*/ -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, sizeof(z_stream)) - - -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - /** Hack for buggy compilers */ - struct internal_state {int dummy;}; -#endif - -/** - Returns the string representing the error code - - @param int error code - @return zError returns string representing the error code -*/ -ZEXTERN const char * ZEXPORT zError OF((int)); -/** - Checks whether inflate is currently at the end of a block generated by Z_SYNC_FLUSH or Z_FULL_FLUSH - - @param z stream of data - @return inflateSyncPoint returns true(1) if inflate is currently at the end of a block. Otherwise false(0) -*/ -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); -/** - Initialize the tables before allowing more than one thread to use crc32() - - @return get_crc_table returns pointer to the crc table after initialisation -*/ -ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); - -#ifdef __cplusplus -} -#endif - -#endif /* _ZLIB_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/swi/pkgremover.h --- a/epoc32/include/swi/pkgremover.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,200 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Interface class for listing/removing uninstalled packages from a removable drive -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __PKGREMOVER_H__ -#define __PKGREMOVER_H__ - -#include -#include -#include - -namespace Swi -{ - -class CUninstalledPackageEntry; - - -/** - * This class provides static methods for managing uninstalled native packages - * (SIS files) that are taking up space on removable drives. - * - * @publishedAll - * @released - */ - -NONSHARABLE_CLASS(UninstalledSisPackages) -{ -public: - - /** - * Get the list of uninstalled packages on a specified removable drive. In - * this context uninstalled means 'not known by this phone'. This will list - * uninstalled PA & PP files found in the SWI Daemon's private directory, and - * will also search the sis registry files on the drive for uninstalled - * applications. - * - * @param aDrive Removable drive number (@see TDriveNumber) - * @param aPackageList Array of pointers to the uninstalled packages - * found on the specified drive (@see - * CUninstalledPackageEntry). This array is assumed to be empty. - * The caller takes ownership of the elements added to the array. - * @leave One of the system-wide error codes. - * @leave KErrNotRemovable If the drive is not removable or is substed - * @leave KErrPackageFileCorrupt If an error occurs during the processing of files - * @capability ReadDeviceData Required to access protected directories during listing operation - * @capability ProtServ Required to access services of software installer - * @capability TrustedUI Required to access services of software installer - */ - IMPORT_C static void ListL(TDriveNumber aDrive, RPointerArray& aPackageList); - - /** - * Remove the specified uninstalled package. The following restrictions apply to the files that will be removed: - *
    - *
  • For security reasons only files on the same drive as the package controller will be removed. Files on other drives will be orphaned. - *
  • Files belonging to other packages will not be removed. - *
- * - * @param aPackage The uninstalled package to remove (@see CUninstalledPackageEntry) - * @leave One of the system-wide error codes. - * @leave KErrNotRemovable If the drive is not removable or is substed - * @leave KErrPackageIsInstalled If the specified package is installed on the device - * @leave KErrPackageFileCorrupt If an error occurs during the processing of files - * @capability WriteDeviceData Required to write to protected directories during remove operation - * @capability ProtServ Required to access services of software installer - * @capability TrustedUI Required to access services of software installer - */ - IMPORT_C static void RemoveL(const CUninstalledPackageEntry& aPackage); -}; - - -/** - * Uninstalled application entry class. - * - * This class is not externally instantiable. It is returned as a result of - * querying for a list of uninstalled packages present on a removable drive. - * Each object of this type represents one uninstalled package. Methods can - * be called on this object to retrieve the package details such as - * Package UID, Name, Vendor, Version and Type. - * - * @publishedAll - * @released - */ - -NONSHARABLE_CLASS(CUninstalledPackageEntry) : public CBase -{ -public: - enum TPackageType - { - ESaPackage, ///< Standard Application - ESpPackage, ///< Standard Patch (augmentation) - EPuPackage, ///< Partial Upgrade - EPaPackage, ///< Preinstalled Application - EPpPackage ///< Preinstalled Patch - }; - - /** - * Get the package Uid - * - * @return The Uid of this package - */ - IMPORT_C const TUid& Uid() const; - - /** - * Get the package name - * - * @return The name of this package as reference to TDesC - */ - IMPORT_C const TDesC& Name() const; - - /** - * Get the package unique vendor name - * - * @return The unique vendor name of this package as reference to TDesC - */ - IMPORT_C const TDesC& Vendor() const; - - /** - * Get the package version - * - * @return The version number of this package - */ - IMPORT_C const TVersion& Version() const; - - /** - * Get the package type - * - * @return The package type of this package - */ - IMPORT_C const TPackageType& PackageType() const; - - /** - * Destructor - */ - virtual ~CUninstalledPackageEntry(); - -private: - static CUninstalledPackageEntry* NewLC(const TUid& aUid, const TDesC& aPackageName, - const TDesC& aVendorName, const TVersion& aVersion, const TPackageType aPackageType, - const TDesC& aPackageFile, const TDesC& aAssocStubSisFile); - -private: - CUninstalledPackageEntry(); - -private: - void ConstructL(const TUid& aUid, const TDesC& aPackageName, const TDesC& aVendorName, - const TVersion& aVersion, const TPackageType aPackageType, const TDesC& aPackageFile, - const TDesC& aAssocStubSisFile); - - const TDesC& PackageFile() const; - const TDesC& AssociatedStubSisFile() const; - -private: - /// The package Uid - TUid iUid; - - /// The package name - HBufC* iPackageName; - - /// The package unique vendor name - HBufC* iVendorName; - - /// The package version - TVersion iVersion; - - /// The package type - TPackageType iType; - - // The sis/controller file name with full path - HBufC* iPackageFile; - - // The stub sis file name with full path (if the package file is a controller file) - HBufC* iAssocStubSisFile; -private: - friend class UninstalledSisPackages; -}; - -} // namespace Swi - -#endif // __PKGREMOVER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/swi/pkgremovererrors.h --- a/epoc32/include/swi/pkgremovererrors.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Definition of the package list/remove error codes -// -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __PKGREMOVERERRORS_H__ -#define __PKGREMOVERERRORS_H__ - -#include - -/** -* -* A non-removable drive was passed. -* -*/ -const TInt KErrNotRemovable = -10280; -/** -* -* No uninstalled packages were found. -* -*/ -const TInt KErrNoUninstalledPackages = -10281; -/** -* -* The package being attempted to remove is installed on the device. -* -*/ -const TInt KErrPackageIsInstalled = -10282; -/** -* -* The package being attempted to list/remove is corrupted. -* -*/ -const TInt KErrPackageFileCorrupt = -10283; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/sysutil.h --- a/epoc32/include/sysutil.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,210 +0,0 @@ -/* -* Copyright (c) 2000-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: SysUtil API provides functions for applications to retrieve -* SW and language package versions and check whether there is -* free space on a disk drive. -* -*/ - - -#ifndef SYSUTIL_H -#define SYSUTIL_H - -#include - -/** -* Helper constant to allocate buffers for GetSWVersion, GetLangSWVersion, -* GetLangVersion. -*/ -const TInt KSysUtilVersionTextLength = 64; - -class RFs; - -/** - * SysUtil provides various utility methods for applications. - * - * SysUtil API provides functions for applications to retrieve SW and language - * package versions and check whether there is free space on a disk drive. - * - * @lib sysutil.lib - * @since S60 v2.0 - */ -class SysUtil - { - -public: - - /** - * Obtains the software version string. - * - * @since S60 v2.0 - * - * Usage example: - * @code - * TBuf version; - * if ( SysUtil::GetSWVersion( version ) == KErrNone ) - * { - * // Use the version string. - * ... - * } - * @endcode - * - * @param aValue On return, contains the software version string. - * The buffer should have space for KSysUtilVersionTextLength - * characters. - * - * @return KErrNone on success, or one of the Symbian error codes if reading - * the version string fails. - */ - IMPORT_C static TInt GetSWVersion( TDes& aValue ); - - /** - * Returns software version which the currently installed language package - * is compatible with. - * - * @since S60 v2.0 - * - * @param aValue On return, contains the version string. - * The buffer should have space for KSysUtilVersionTextLength - * characters. - * - * @return KErrNone on success, or one of the Symbian error codes if reading - * the version string fails. - */ - IMPORT_C static TInt GetLangSWVersion( TDes& aValue ); - - /** - * Obtains the version of the currently installed language package. - * - * @since S60 v2.0 - * - * @param aValue On return, contains the language package version string. - * The buffer should have space for KSysUtilVersionTextLength - * characters. - * - * @return KErrNone on success, or one of the Symbian error codes if reading - * the version string fails. - */ - IMPORT_C static TInt GetLangVersion( TDes& aValue ); - - /** - * Checks if free FFS (internal flash file system) storage space is or will - * fall below critical level. Static configuration value stored in Central - * Repository is used to determine the critical level for the FFS drive. - * - * @since S60 v2.0 - * - * @param aFs File server session. Must be given if available, e.g. from - * EIKON environment. If NULL, this method will create a - * temporary session, which causes the method to consume more - * time and system resources. - * @param aBytesToWrite Number of bytes the caller is about to write to - * FFS. If value 0 is given, this method checks - * if the current FFS space is already below critical - * level. - * - * @return ETrue if FFS space would go below critical level after writing - * aBytesToWrite more data, EFalse otherwise. - * - * @leave Leaves with one of the Symbian error codes if checking the FFS - * space fails, for instance if there is not enough free memory to - * create a temporary connection to file server. - */ - IMPORT_C static TBool FFSSpaceBelowCriticalLevelL( - RFs* aFs, - TInt aBytesToWrite = 0 ); - - - /** - * Checks if free MMC storage space is or will fall below critical - * level. Static configuration value stored in Central Repository is - * used to determine the critical level for the MMC drive. - * PathInfo API is used to determine the drive letter for the MMC drive. - * - * @since S60 v2.0 - * - * @param aFs File server session. Must be given if available, e.g. from - * EIKON environment. If NULL, this method will create a - * temporary session, which causes the method to consume more - * time and system resources. - * @param aBytesToWrite Number of bytes the caller is about to write to - * MMC. If value 0 is given, this method checks - * if the current MMC space is already below critical - * level. - * - * @return ETrue if MMC space would go below critical level after writing - * aBytesToWrite more data, EFalse otherwise. - * EFalse if the system has no MMC drive support. - * - * @leave Leaves with one of the Symbian error codes if checking the MMC - * space fails, for instance if the MMC drive contains no media or - * there is not enough free memory to create a temporary connection to - * file server. - */ - IMPORT_C static TBool MMCSpaceBelowCriticalLevelL( - RFs* aFs, - TInt aBytesToWrite = 0 ); - - /** - * Checks if free disk drive storage space is or will fall below critical - * level. Static configuration values stored in Central Repository are - * used to determine a critical level for each drive. - * - * Usage example: - * @code - * TInt dataSize = 500; - * if ( SysUtil::DiskSpaceBelowCriticalLevelL( &iFsSession, dataSize, EDriveC ) ) - * { - * // Can not write the data, there's not enough free space on disk. - * ... - * } - * else - * { - * // It's ok to actually write the data. - * ... - * } - * @endcode - * - * @since S60 v2.0 - * - * @param aFs File server session. Must be given if available, e.g. from - * EIKON environment. If NULL, this method will create a - * temporary session, which causes the method to consume more - * time and system resources. - * @param aBytesToWrite Number of bytes the caller is about to write to - * disk. If value 0 is given, this method checks - * if the current disk space is already below critical - * level. - * @param aDrive Identifies the disk drive to be checked. Numeric values - * for identifying disk drives are defined in TDriveNumber - * enumeration. - * - * @see TDriveNumber in f32file.h. - * - * @return ETrue if disk space would go below critical level after writing - * aBytesToWrite more data, EFalse otherwise. - * - * @leave Leaves with one of the Symbian error codes if checking the disk - * space fails, for instance if the drive contains no media or there - * is not enough free memory to create a temporary connection to - * file server. - */ - IMPORT_C static TBool DiskSpaceBelowCriticalLevelL( - RFs* aFs, - TInt aBytesToWrite, - TInt aDrive ); - - }; - -#endif // SYSUTIL_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/telsess.h --- a/epoc32/include/telsess.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,314 +0,0 @@ -/** -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Telnet Session API -* -* -*/ - - - - - -/** - @file TELSESS.H -*/ - -#ifndef _TELSESS_H_ -#define _TELSESS_H_ - -#include -#include -#include -#include - -#define __TELNETSESSDEBUG__ // Put in Debug mode - -class CTelnetControl; - -// Used by client to retrieve RFC option state -// Flags for Telnet negotiated options -// 1 = Enabled 0 = Disabled - -/** -Defines the supported, RFC-defined, option status. - -@publishedAll -@released -*/ -typedef struct - { - /** If ETrue, the server is sending in binary (RFC 856). */ - TBool iServerBinary; ///< RFC 856 (Server Sending in Binary) - /** If ETrue, the client is sending in binary (RFC 856). */ - TBool iClientBinary; ///< RFC 856 (Client Sending in Binary) - /** If ETrue, the server is echoing data back to the client (RFC 857). */ - TBool iEcho; ///< RFC 857 (Server Echoing Data from Client) - /** If ETrue, the client will negotiate about window size (RFC 1073). */ - TBool iNAWS; ///< RFC 1073 (Client Providing Window Size Information) - /** If ETrue, the terminal speed option is enabled (RFC 1079). */ - TBool iTerminalSpeed;///< RFC 1079 (Client Providing Terminal Speed Information) - /** If ETrue, the client is providing terminal type information (RFC 1091). */ - TBool iTerminalType; ///< RFC 1091 (Client Providing Terminal Type Information) - /** If ETrue, if the server is providing status information (RFC 859). */ - TBool iServerStatus; ///< RFC 859 (Server Providing Status Information) - /** If ETrue, if the client is providing status information (RFC 859). */ - TBool iClientStatus; ///< RFC 859 (Client Providing Status Information) - }TOptionStatus; - -// Used by client to configure the Symbian Telnet -class TTelnetConfig -/** -* Specifies telnet session configuration information. -* -* The client must provide a reference to an instance of this class as a parameter -* to the CTelnetSession::NewL() function. -* -* Configuration options can be modified, when the session is in progress, using -* the CTelnetSession::DoModifyConfig() function. -* -* Configuration option state can be obtained using the CTelnetSession::OptionStatus() -* function. -* @publishedAll -* @released -*/ - { - public: - - /** Constructor. */ - TTelnetConfig() { - iAllowLogout = TRUE; // RFC 727 - Default TRUE = Server Can Logout Client - iWindowSize.x = (TInt16)80; // RFC 1073 - Default 80 x 24 - iWindowSize.y = (TInt16)24; - iTermSpeed = _L8("38400"); // RFC 1079 - Default to 38400 Baud Terminal - iTermType = _L8("dumb"); // RFC 1091 - Default to base NVT Terminal - } - /** Destructor. */ - ~TTelnetConfig(){} - - typedef struct - /** - * Specifies the client's window size. - * - * The default is 80 columns by 24 rows which constructs to x=80, y=24. - */ - { - /** The client window's width (number of columns). */ - TInt16 x; - /** The client window's height (number of rows). */ - TInt16 y; - }TWindowSize; - - /** - * Specifies the client's window size. - * - * The default is 80 columns by 24 rows. - * - * (RFC 1073 -- Set to Configure Window Size) - */ - TWindowSize iWindowSize; - - /** - * Specifies the speed of the telnet connection. - * - * The default is "38400" (in ASCII characters). Must be set to a server-supported rate. - * - * (RFC 1079 -- Set to Configure Terminal Speed) - */ - TBuf8<20> iTermSpeed; - - /** - * Specifies the terminal type. - * - * The default is "dumb" (in ASCII characters). - * - * (RFC 1091 -- Set to Configure Terminal Type) - */ - TBuf8<20> iTermType; - - /** - * Specifies whether the telnet server can logout the client. - * - * The default, ETrue, enables the server to logout the client. If EFalse any - * logout request from the telnet server is rejected by the client. - * - * (RFC 727 -- Set/Clear to Enable/Disable Server Logout) - */ - TBool iAllowLogout; - - /** - * Enables or disables telnet server echo to client. - * - * The default, ETrue, enables server echo. Note that although this is normal - * telnet server behaviour, it is not a formal telnet requirement. It is therefore - * recommended that the client implement an optional local echo. - * - * (RFC 857 -- Set/Clear to Enable/Disable Server Echo to client) - */ - TBool iServerEcho; - }; - -// Client can pass these in overloaded CTelnetSession::Write(TTelnetUserControl& aControlCode); - -/** -* Specifies the telnet control code to send to the server. -* -* This is done using the overloaded CTelnetSession::Write() function. -* @publishedAll -* @released -*/ -enum TTelnetUserControl - { - /** Control code not supported. */ - ENotSupported = 0, - - /** - * Break (the NVT 129th ASCII break code). - * The default is 243. This is not a valid control in Binary mode. - */ - EBrk = 243, - - /** - * Interupt Process. - * The default is 244. - */ - EIp = 244, - - /** - * Abort Output. - * The default is 245. - */ - EAo = 245, - - /** - Are you there? - * The default is 246. - */ - EAyt = 246, - - /** - * Erase Character. - * The default is 247. This is not a valid control in Binary mode. - */ - EEc = 247, - - /** - * Erase Line. - * The default is 248. This is not a valid control in Binary mode. - */ - EEl = 248, - }; - -// Client MUST override this class -// Client MUST provide a pointer to an instance of this class as a parameter to CTelnetSession::NewL() -class MTelnetNotification -/** -* Symbian telnet notification interface. -* -* Informs the client when an error occurs, when reads and writes have completed, -* when a connection is made or closed and when configuration options change. -* @publishedAll -* @released -*/ - { - public: - /** - * Reports errors on the Telnet connection. - * - * The error code is supplied by the server. If this function is called, it is - * likely that the connection has failed. Therefore it is recommended that the - * client disconnects and resets its state. - * - * @param aError Error code from server. - */ - virtual void Error(TInt aError) = 0; ///< Miscellaneous Error callback - - /** - * Passes the data that was received from the server to the client. - * - * It is recommended that the client copies the data from this buffer, as it - * is owned by the Symbian telnet. - * - * @param aBuffer Data received from server. - */ - virtual void ReadComplete(const TDesC8& aBuffer) = 0; ///< Last Read to Server completion callback - - /** Notifies the client that a write to the server from the client has completed. */ - virtual void WriteComplete() = 0; ///< Last Write to Server completion callback - - /** Notifies the client that the connection to the server has been closed. */ - virtual void ConnectionClosed() = 0; ///< Telnet Connection Closed callback - - /** Notifies the client that a connection to the server has been made. */ - virtual void Connected() = 0; ///< Telnet Connected callback - - /** Notifies the client that telnet configuration options have changed. */ - virtual void OptionsChanged() = 0; ///< Telnet RFC Options Changed callback - }; - -class CTelnetControl; - -class CTelnetSession : public CBase -/** -* The main Symbian telnet class. -* -* Consists of a connection interface and a protocol interface. The connection -* interface comprises member functions that: connect to, read from, write to -* and disconnect from a telnet server. -* -* The protocol interface includes member functions that get and set telnet configuration. -* -* @publishedAll -* @released -*/ - { - //public: - // Data Structures - public: - ~CTelnetSession(); - // Construction - // Need to add max buffer size to constructor [check] - IMPORT_C static CTelnetSession* NewL(const TTelnetConfig& aConfig,const MTelnetNotification* aNotifier); - protected: - IMPORT_C void ConstructL(const TTelnetConfig& aConfig,const MTelnetNotification* aNotifier); - // - // Connection Interface - // - public: - IMPORT_C TInt Connect(const TInetAddr& aNetAddr); ///< Connects to aNetAddr on the standard telnet port (port 23) - IMPORT_C TInt Connect(const TInetAddr& aNetAddr, TUint aPort); ///< Connects to aNetAddr on user specified port - IMPORT_C TInt Connect(const TDesC& aServerName); ///< Connects to aSeverName on the standard telnet port (port 23) - IMPORT_C TInt Connect(const TDesC& aServerName, TUint aPort); ///< Connects to aServerName on user specified port - IMPORT_C TInt Disconnect(); ///< Disconnects current connection - IMPORT_C TInt Write(const TDesC8& aBuffer); ///< Writes a byte stream over the open telnet connection. - IMPORT_C TInt Write(TTelnetUserControl& aControlCode); ///< Writes NVT code to stream. Prepends \ code (255) - IMPORT_C TInt Read(); ///< Read data received over telnet buffer. - - // - // Protocol Interface - // - IMPORT_C TInt DoForceLogout(); - IMPORT_C TInt DoModifyConfig(TTelnetConfig& aConfig); - IMPORT_C TInt OptionStatus(TOptionStatus& aStatus); - private: - CTelnetSession(); - - private: - MTelnetNotification* iNotifier; - CTelnetControl* iTelnetProtocol; - - }; - - -#endif // _TELNETPROTOCOLAPI_H_ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/template/mconf.h --- a/epoc32/include/template/mconf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// template\template_variant\inc\mconf.h -// Template Persistent Machine Configuration -// -// - - - -#ifndef __MCONF_H__ -#define __MCONF_H__ -#include - -class TDigitizerCalibrateValues - { -public: - TInt iR11; - TInt iR12; - TInt iR21; - TInt iR22; - TInt iTx; - TInt iTy; - }; - -class TTemplateMachineConfig : public TMachineConfig - { -public: - TSoundInfoV1 iSoundInfo; - TOnOffInfoV1 iOnOffInfo; - TTimeK iMainBatteryInsertionTime; - Int64 iMainBatteryInUseMicroSeconds; - Int64 iExternalPowerInUseMicroSeconds; - Int64 iMainBatteryMilliAmpTicks; - TDigitizerCalibrateValues iCalibration; - TDigitizerCalibrateValues iCalibrationSaved; - TDigitizerCalibrateValues iCalibrationFactory; - }; - -typedef TTemplateMachineConfig TActualMachineConfig; - -inline TActualMachineConfig& TheActualMachineConfig() - {return (TActualMachineConfig&)Kern::MachineConfig();} - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/template/specific/iolines.h --- a/epoc32/include/template/specific/iolines.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,132 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// template\template_variant\inc\iolines.h -// Variant layer header for Template Platform -// -// - - - -#ifndef __V32TEMPLATEV1_H__ -#define __V32TEMPLATEV1_H__ -#include -#include - -//---------------------------------------------------------------------------- -// Variant-specific constants: use #define if constant dependencies are not -// declared within this file (this breaks the dependency on other header files) -//---------------------------------------------------------------------------- - -// Examples of what goes in here include: -// -// - General-purpose I/O allocation such as -// #define KtVariantGpio32KHzClkOut KHtGpioPort1 -// #define KtVariantGpioRClkOut KHtGpioPort0 -// -// #define KmVariantPinDirectionIn Sleep 0 -// -// - Memory constants (type, geometry, wait states, etc) such as: -// #define KwVariantRom0Type TTemplate::ERomTypeBurst4Rom -// #define KwVariantRom0Width TTemplate::ERomWidth32 -// const TUint KwVariantRom0WaitNs = 150; -// const TUint KwVariantRom0PageNs = 30; -// const TUint KwVariantRom0RecoverNs = 55; -// -// - Specific Peripherals (Keyboard, LCD, CODECS, Serial Ports) such as -// const TUint KwVariantKeyColLshift = 7; -// #define KwVariantLcdBpp TTemplate::ELcd8BitsPerPixel -// const TUint KwVariantLcdMaxColors = 4096; -// const TUint KwVariantCodecMaxVolume = 0; -// -// - Off-chip hardware control blocks (addresses, register make-up) -// -// - Interrupts (second-level Interrupt controller base address, register make-up): -// (EXAMPLE ONLY:) -const TUint32 KHwVariantPhysBase = 0x40000000; -const TUint32 KHoVariantRegSpacing = 0x200; - -const TUint32 KHoBaseIntCont = 0x0B*KHoVariantRegSpacing; - -const TUint32 KHoIntContEnable = 0x00; // offsets from KHwVariantPhysBase+KHoBaseIntCont -const TUint32 KHoIntContPending = 0x04; -// other Variant and external blocks Base adrress offsets to KHwVariantPhysBase - - -// TO DO: (optional) -// -// Enumerate here all Variant (2nd level) interrupt sources. It could be a good idea to enumerate them in a way that -// facilitates operating on the corresponding interrupt controller registers (e.g using their value as a shift count) -// -// (EXAMPLE ONLY:) -enum TTemplateInterruptId - { - // the top-level bit is set to distinguish from first level (ASSP) Interrupts - EXIntIdA=0x80000000, - EXIntIdB=0x80000001, - // ... - EXIntIdZ=0x80000019, - - ENumXInts=0x1A - }; - -// -// TO DO: (optional) -// -// Define here some commonly used Variant (2nd level) interrupts -// -// (EXAMPLE ONLY:) -const TInt KIntIdKeyboard=EXIntIdB; - -class Variant - { - // below is a selection of functions usually implemented at this level. This do not constitute a mandatory - // set and it might not be relevant for your hardware... -public: - /** - * initialisation - */ - static void Init3(); - /** - * Returns the Linear Base address of the Variant Hardware - */ - IMPORT_C static TUint BaseLinAddress(); - /** - * When invoked, turns off all power supplies - */ - IMPORT_C static void PowerReset(); - /** - * When invoked, it marks the Serial port used for outputting debug strings as requiring re-initialisation - * As in, for example, the serial port was used by a device driver or the system is coming back from Standby - */ - IMPORT_C static void MarkDebugPortOff(); - /** - * When invoked, initialises the Serial Port hardware for the serial port used to output Debug strings - * Called by Template::DebugInit() - */ - IMPORT_C static void UartInit(); - /** - * When invoked, read the state of on-board switches - * @return A bitmask with the state of on-board switches - */ - IMPORT_C static TUint Switches(); - // other functions to access hardware not covered by specific device-drivres, which may be called from drivers - // or platform-specifc code - // ... -public: - static TUint32 iBaseAddress; - // (optional): May need to have a follower variable to store the value of a read only register initialised at boot time - // static TUint aFollower; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/thttpfields.h --- a/epoc32/include/thttpfields.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,544 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Purpose: This file contains definitions of types THttpStatusCode, -// THttpParameter, THttpHeaderField, KHttpContentTypes, -// KHttpCharacterSetNames and KHttpCharacterSetCodes -// This header is a direct transcoding of [WSP] Appendix A - Assigned -// Numbers, which contains the following assignment tables: -// Table 34 : PDU Type Assignments -// 35 : Abort Reason Code Assignments -// 36 : Status Code Assignments -// 37 : Capability Assignments -// 38 : Well-Known Parameter Assignments -// 39 : Header Field Name Assignments -// 40 : Content-Type Assignments -// 41 : ISO-639 Language Assignments -// 42 : Character Set Assignments -// -// - -#if !defined(__THTTPFIELDS_H__) -#define __THTTPFIELDS_H__ - -// -// Table 34 not implemented -// - - -// -// Table 35 not implemented -// - - -/** -HTTP/1.1 Status Codes: WSP Code Assignments - -(see [WSP] Appdx A Table 36) -Codes from RFC-2616 added where necessary for HTTP Caching -@publishedAll -@deprecated -*/ -enum THttpStatusCode - { - EHttpUnknown = 0, - EHttpContinue = 100, - EHttpSwitchingProtocols, - EHttpWarnStaleContent = 110, // From RFC-2616 - EHttpWarnRevalidationFailed, // " - EHttpWarnDisconnectedOperation, // " - EHttpWarnHeuristicExpiration, // " - EHttpWarnMiscellaneous, // " - EHttpOK = 200, - EHttpCreated, - EHttpAccepted, - EHttpNonAuthorativeInformation, - EHttpNoContent, - EHttpResetContent, - EHttpPartialContent, - EHttpWarnTransformationApplied, // From RFC-2616 - EHttpWarnPersistentMiscellanous, // " - EHttpMultipleChoices = 300, - EHttpMovedPermanently, - EHttpMovedTemporarily, - EHttpSeeOther, - EHttpNotModified, - EHttpUseProxy, - EHttpTemporaryRedirect = 307, // From RFC-2616 - EHttpBadRequest = 400, - EHttpUnauthorized, - EHttpPaymentRequired, - EHttpForbidden, - EHttpNotFound, - EHttpMethodNotAllowed, - EHttpNotAcceptable, - EHttpProxyAuthenticationRequired, - EHttpRequestTimeout, - EHttpConflict, - EHttpGone, - EHttpLengthRequired, - EHttpPreconditionFailed, - EHttpRequestEntityTooLarge, - EHttpRequestURITooLong, - EHttpUnsupportedMediaType, - EHttpRequestRangeNotSatisfiable, // From RFC-2616 - EHttpExpectationFailed, // From RFC-2616 - EHttpInternalServerError = 500, - EHttpNotImplemented, - EHttpBadGateway, - EHttpServiceUnavailable, - EHttpGatewayTimeout, - EHttpHTTPVersionNotSupported - // All other codes are extension codes - }; - - -// -// Table 37 not implemented -// - - -/** -HTTP/1.1 Parameters: WSP Well-known Parameter Assignments - -(see [WSP] Appdx A Table 38) -@publishedAll -@deprecated -*/ -enum THttpParameter - { - EHttpQ = 0x00, - EHttpCharset = 0x01, - EHttpLevel = 0x02, - EHttpType = 0x03, - EHttpName = 0x04, - EHttpFilename = 0x05, - EHttpDifferences = 0x06, - EHttpPadding = 0x07 - }; - - -/** -HTTP/1.1 Headers: WSP Field Name Assignments - -(see [WSP] Appdx A Table 39) -@publishedAll -@deprecated -*/ -enum THttpHeaderField - { - EHttpAccept = 0x00, - EHttpAcceptCharset, - EHttpAcceptEncoding, - EHttpAcceptLanguage, - EHttpAcceptRanges, - EHttpAge, - EHttpAllow, - EHttpAuthorization, - EHttpCacheControl = 0x08, - EHttpConnection, - EHttpContentBase, - EHttpContentEncoding, - EHttpContentLanguage, - EHttpContentLength, - EHttpContentLocation, - EHttpContentMD5, - EHttpContentRange = 0x10, - EHttpContentType, - EHttpDate, - EHttpETag, - EHttpExpires, - EHttpFrom, - EHttpHost, - EHttpIfModifiedSince, - EHttpIfMatch = 0x18, - EHttpIfNoneMatch, - EHttpIfRange, - EHttpIfUnmodifiedSince, - EHttpLocation, - EHttpLastModified, - EHttpMaxForwards, - EHttpPragma, - EHttpProxyAuthenticate = 0x20, - EHttpProxyAuthorization, - EHttpPublic, - EHttpRange, - EHttpReferer, - EHttpRetryAfter, - EHttpServer, - EHttpTransferEncoding, - EHttpUpgrade = 0x28, - EHttpUserAgent, - EHttpVary, - EHttpVia, - EHttpWarning, - EHttpWWWAuthenticate, - EHttpContentDisposition, - EHttpXWapApplicationID = 0x2F, // Additional Enums required for WAP1.2 Push - EHttpXWapContentURI, - EHttpXWapInitiatorURI, - EHttpAcceptApplication, - EHttpBearerIndication, - EHttpPushFlag, - EHttpProfile, - EHttpProfileDiff, - EHttpProfileWarning - }; - - -// -// WSP Content-Type Assignments -// -// (see [WSP] Appdx A Table 40) -// -/** -@publishedAll -@deprecated -*/ -const TInt KHttpNumContentTypes = 77; - -/** -@publishedAll -@deprecated -*/ -const TInt KHttpMaxLenghtOfContentType = 42; - -/** -@publishedAll -@deprecated -*/ -static const TText8* const KHttpContentTypes[] = - { - _S8("*/*"), //0x00 - _S8("text/*"), - _S8("text/html"), - _S8("text/plain"), - _S8("text/x-hdml"), - _S8("text/x-ttml"), - _S8("text/x-vCalendar"), - _S8("text/x-vCard"), - _S8("text/vnd.wap.wml"), // 0x08 - _S8("text/vnd.wap.wmlscript"), - _S8("application/vnd.wap.catc"), - _S8("Multipart/*"), - _S8("Multipart/mixed"), - _S8("Multipart/form-data"), - _S8("Multipart/byteranges"), - _S8("multipart/alternative"), - _S8("application/*"), // 0x10 - _S8("application/java-vm"), - _S8("application/x-www-form-urlencoded"), - _S8("application/x-hdmlc"), - _S8("application/vnd.wap.wmlc"), - _S8("application/vnd.wap.wmlscriptc"), - _S8("application/vnd.wap.wsic"), - _S8("application/vnd.wap.uaprof"), - _S8("application/vnd.wap.wtls-ca-certificate"), // 0x18 - _S8("application/vnd.wap.wtls-user-certificate"), - _S8("application/x-x509-ca-cert"), - _S8("application/x-x509-user-cert"), - _S8("image/*"), - _S8("image/gif"), - _S8("image/jpeg"), - _S8("image/tiff"), - _S8("image/png"), // 0x20 - _S8("image/vnd.wap.wbmp"), - _S8("application/vnd.wap.multipart.*"), - _S8("application/vnd.wap.multipart.mixed"), - _S8("application/vnd.wap.multipart.form-data"), - _S8("application/vnd.wap.multipart.byteranges"), - _S8("application/vnd.wap.multipart.alternative"), - _S8("application/xml"), - _S8("text/xml"), // 0x28 - _S8("application/vnd.wap.wbxml"), - _S8("application/x-x968-cross-cert"), //Additional C-Types in WAP 1.2 - _S8("application/x-x968-ca-cert"), - _S8("application/x-x968-user-cert"), - _S8("text/vnd.wap.si"), - _S8("application/vnd.wap.sic"), - _S8("text/vnd.wap.sl"), - _S8("application/vnd.wap.slc"), //0x30 - _S8("text/vnd.wap.co"), - _S8("application/vnd.wap.coc"), - _S8("application/vnd.wap.multipart.related"), - _S8("application/vnd.wap.sia"), //0x34 or 52 in decimal - _S8("text/vnd.wap.connectivity-xml"), - _S8("application/vnd.wap.connectivity-wbxml"), - _S8("application/pkcs7-mime"), - _S8("application/vnd.wap.hashed-certificate"), - _S8("application/vnd.wap.signed-certificate"), - _S8("application/vnd.wap.cert-response"), - _S8("application/xhtml+xml"), - _S8("application/wml+xml"), - _S8("text/css"), - _S8("application/vnd.wap.mms-message"), - _S8("application/vnd.wap.rollover-certificate"), - _S8("application/vnd.wap.locc+wbxml"), - _S8("application/vnd.wap.loc+xml"), - _S8("application/vnd.syncml.dm+wbxml"), - _S8("application/vnd.syncml.dm+xml"), - _S8("application/vnd.syncml.notification"), - _S8("application/vnd.wap.xhtml+xml"), - _S8("application/vnd.wv.csp.cir"), - _S8("application/vnd.oma.dd+xml"), - _S8("application/vnd.oma.drm.message"), - _S8("application/vnd.oma.drm.content"), - _S8("application/vnd.oma.drm.rights+xml"), - _S8("application/vnd.oma.drm.rights+wbxml"), - _S8("application/vnd.oma.drm.roap-trigger+xml"), - _S8("application/vnd.oma.drm.roap-trigger+wbxml"),//0x4D - }; - - -// -// Table 41. Languages -// -/** -@publishedAll -@deprecated -*/ -const TInt KHttpNumLanguages = 0x8D; - -/** -@publishedAll -@deprecated -*/ -static const TText8* const KHttpLanguages[] = - { - _S8("AFAR AA"), - _S8("ABKHAZIAN AB"), - _S8("AFRIKAANS AF"), - _S8("AMHARIC AM"), - _S8("ARABIC AR"), - _S8("ASSAMESE AS"), - _S8("AYMARA AY"), - _S8("AZERBAIJANI AZ"), - _S8("BASHKIR BA"), - _S8("BYELORUSSIAN BE"), - _S8("BULGARIAN BG"), - _S8("BIHARI BH"), - _S8("BISLAMA BI"), - _S8("BENGALI BANGLA BN"), - _S8("TIBETAN BO"), - _S8("BRETON BR"), - _S8("CATALAN CA"), - _S8("CORSICAN CO"), - _S8("CZECH CS"), - _S8("WELSH CY"), - _S8("DANISH DA"), - _S8("GERMAN DE"), - _S8("BHUTANI DZ"), - _S8("GREEK EL"), - _S8("ENGLISH EN"), - _S8("ESPERANTO EO"), - _S8("SPANISH ES"), - _S8("ESTONIAN ET"), - _S8("BASQUE EU"), - _S8("PERSIAN farsi FA"), - _S8("FINNISH FI"), - _S8("FIJI FJ"), - _S8("URDU UR"), - _S8("FRENCH FR"), - _S8("UZBEK UZ"), - _S8("IRISH GA"), - _S8("SCOTS-GAELIC GD"), - _S8("GALICIAN GL"), - _S8("GUARANI GN"), - _S8("GUJARATI GU"), - _S8("HAUSA HA"), - _S8("HEBREW HE"), - _S8("HINDI HI"), - _S8("CROATIAN HR"), - _S8("HUNGARIAN HU"), - _S8("ARMENIAN HY"), - _S8("VIETNAMESE VI"), - _S8("INDONESIAN ID"), - _S8("WOLOF WO"), - _S8("XHOSA XH"), - _S8("ICELANDIC IS"), - _S8("ITALIAN IT"), - _S8("YORUBA YO"), - _S8("JAPANESE JA"), - _S8("JAVANESE JV"), - _S8("GEORGIAN KA"), - _S8("KAZAKH KK"), - _S8("ZHUANG ZA"), - _S8("CAMBODIAN KM"), - _S8("KANNADA KN"), - _S8("KOREAN KO"), - _S8("KASHMIRI KS"), - _S8("KURDISH KU"), - _S8("KIRGHIZ KY"), - _S8("CHINESE ZH"), - _S8("LINGALA LN"), - _S8("LAOTHIAN LO"), - _S8("LITHUANIAN LT"), - _S8("LATVIAN LETTISH LV"), - _S8("MALAGASY MG"), - _S8("MAORI MI"), - _S8("MACEDONIAN MK"), - _S8("MALAYALAM ML"), - _S8("MONGOLIAN MN"), - _S8("MOLDAVIAN MO"), - _S8("MARATHI MR"), - _S8("MALAY MS"), - _S8("MALTESE MT"), - _S8("BURMESE MY"), - _S8("UKRAINIAN UK"), - _S8("NEPALI NE"), - _S8("DUTCH NL"), - _S8("NORWEGIAN NO"), - _S8("OCCITAN OC"), - _S8("AFAN OROMO OM"), - _S8("ORIYA OR"), - _S8("PUNJABI PA"), - _S8("POLISH PL"), - _S8("PASHTO PUSHTO PS"), - _S8("PORTUGUESE PT"), - _S8("QUECHUA QU"), - _S8("ZULU ZU"), - _S8("KURUNDI RN"), - _S8("ROMANIAN RO"), - _S8("RUSSIAN RU"), - _S8("KINYARWANDA RW"), - _S8("SANSKRIT SA"), - _S8("SINDHI SD"), - _S8("SANGHO SG"), - _S8("SERBO-CROATIAN SH"), - _S8("SINGHALESE SI"), - _S8("SLOVAK SK"), - _S8("SLOVENIAN SL"), - _S8("SAMOAN SM"), - _S8("SHONA SN"), - _S8("SOMALI SO"), - _S8("ALBANIAN SQ"), - _S8("SERBIAN SR"), - _S8("SISWATI SS"), - _S8("SESOTHO ST"), - _S8("SUNDANESE SU"), - _S8("SWEDISH SV"), - _S8("SWAHILI SW"), - _S8("TAMIL TA"), - _S8("TELUGU TE"), - _S8("TAJIK TG"), - _S8("THAI TH"), - _S8("TIGRINYA TI"), - _S8("TURKMEN TK"), - _S8("TAGALOG TL"), - _S8("SETSWANA TN"), - _S8("TONGA TO"), - _S8("TURKISH TR"), - _S8("TSONGA TS"), - _S8("TATAR TT"), - _S8("TWI TW"), - _S8("UIGUR UG"), - _S8(""), - _S8("NAURU NA"), - _S8("FAROESE FO"), - _S8("FRISIAN FY"), - _S8("INTERLINGUA IA"), - _S8("VOLAPUK VO"), - _S8("INTERLINGUE IE"), - _S8("INUPIAK IK"), - _S8("YIDDISH YI"), - _S8("INUKTITUT IU"), - _S8("GREENLANDIC KL"), - _S8("LATIN LA"), - _S8("RHAETO-ROMANCE RM") - }; - -// -// WSP Character Set Assignments -// -// (see [WSP] Appdx A Table 42) -// -// The following two arrays form a paired look-up table -// -/** -@publishedAll -@deprecated -*/ -const TInt KHttpNumCharacterSets = 15; - -/** -@publishedAll -@deprecated -*/ -static const TText8* const KHttpCharacterSetNames[] = - { - _S8("big5"), - _S8("iso-10646-ucs-2"), - _S8("iso-8859-1"), - _S8("iso-8859-2"), - _S8("iso-8859-3"), - _S8("iso-8859-4"), - _S8("iso-8859-5"), - _S8("iso-8859-6"), - _S8("iso-8859-7"), - _S8("iso-8859-8"), - _S8("iso-8859-9"), - _S8("shift_JIS"), - _S8("us-ascii"), - _S8("utf-8"), - _S8("gsm-default-alphabet") // (not yet assigned) - }; - -/** -@publishedAll -@deprecated -*/ -static const TInt KHttpCharacterSetCodes[] = - { - 0x07ea, // big5 - 0x03e8, // iso-10646-ucs-2 - 0x04, // iso-8859-1 - 0x05, // iso-8859-2 - 0x06, // iso-8859-3 - 0x07, // iso-8859-4 - 0x08, // iso-8859-5 - 0x09, // iso-8859-6 - 0x0a, // iso-8859-7 - 0x0b, // iso-8859-8 - 0x0c, // iso-8859-9 - 0x11, // shift_JIS - 0x03, // us-ascii - 0x6a, // utf-8 - 0xffff // gsm-default-alphabet (not yet assigned) - }; - - -/** -Additional enumeration implementations for well known field values -that may be found in the Cache-Control header -As described in section 14.9 of RFC-2616 -Assigned WSP encodings -@publishedAll -@deprecated -*/ -enum TCacheControlFieldValue - { - ECacheControlNoCache = 0x80,// "no-cache" - ECacheCtrlNoStore, // "no-store" - ECacheCtrlMaxAge, // "max-age" - ECacheCtrlMaxStale, // "max-stale" - ECacheCtrlMinFresh, // "min-fresh" - ECacheCtrlOnlyIfCached, // "only-if-cached" - ECacheCtrlPublic, // "public" - ECacheCtrlPrivate, // "private" - ECacheCtrlNoTransform, // "no-transform" - ECacheCtrlMustRevalidate, // "must-revalidate" - ECacheCtrlProxyRevalidate, // "proxy-revalidate" - ECacheCtrlCacheExtension // "cache-extension" - }; - -#endif // __THTTPFIELDS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tmsvsystemprogress.h --- a/epoc32/include/tmsvsystemprogress.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// TMSVSYSTEMPROGRES.H -// -// - -#ifndef __TMSVSYSTEMPROGRESS_H__ -#define __TMSVSYSTEMPROGRESS_H__ - -#include - -const TUint KUIDMsgMsvSystemProgress = 0x1028308F; - -/** -Progress information that is defined by and understood by the system as well as client MTM's - -@publishedAll -@released -*/ -class TMsvSystemProgress - { -public: - IMPORT_C TMsvSystemProgress(); - IMPORT_C TMsvSystemProgress(const TMsvSystemProgress& aSysProg); - IMPORT_C TMsvSystemProgress& operator=(const TMsvSystemProgress& aSysProg); - -public: - /** the version number of class */ - const TInt iVersion; - /** Operation error code.*/ - TInt iErrorCode; - /** the id of an entry in an operation*/ - TMsvId iId; - }; - -#endif // #define __TMSVSYSTEMPROGRESS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/ciso646 --- a/epoc32/include/tools/stlport/ciso646 Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_CISO646 -#define _STLP_CISO646 - -#ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x107 -# include -#endif - -#if !defined(_STLP_WCE_EVC3) && !defined (N_PLAT_NLM) && !defined (__BORLANDC__) -# if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(ciso646) -# else -# include -# endif /* _STLP_USE_NEW_C_HEADERS */ -#endif - -#if (_STLP_OUTERMOST_HEADER_ID == 0x107 ) -# include -# undef _STLP_OUTERMOST_HEADER_ID -#endif - -#endif /* _STLP_CISO646 */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/float.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/tools/stlport/float.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,76 @@ +/*- + * Copyright (c) 1989 Regents of the University of California. + * All rights reserved. + * + * 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. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. + * + * from: @(#)float.h 7.1 (Berkeley) 5/8/90 + * $FreeBSD: src/sys/arm/include/float.h,v 1.5 2005/03/20 00:34:24 cognet Exp $ + */ + +#ifndef _MACHINE_FLOAT_H_ +#define _MACHINE_FLOAT_H_ 1 + +#include + +__BEGIN_DECLS +extern int __flt_rounds(void); +__END_DECLS + +#define FLT_RADIX 2 /* b */ +#define FLT_ROUNDS -1 +#define FLT_EVAL_METHOD (-1) /* XXX */ +#define DECIMAL_DIG 17 /* max precision in decimal digits */ + +#define FLT_MANT_DIG 24 /* p */ +#define FLT_EPSILON 1.19209290E-07F /* b**(1-p) */ +#define FLT_DIG 6 /* floor((p-1)*log10(b))+(b == 10) */ +#define FLT_MIN_EXP (-125) /* emin */ +#define FLT_MIN 1.17549435E-38F /* b**(emin-1) */ +#define FLT_MIN_10_EXP (-37) /* ceil(log10(b**(emin-1))) */ +#define FLT_MAX_EXP 128 /* emax */ +#define FLT_MAX 3.40282347E+38F /* (1-b**(-p))*b**emax */ +#define FLT_MAX_10_EXP 38 /* floor(log10((1-b**(-p))*b**emax)) */ + +#define DBL_MANT_DIG 53 +#define DBL_EPSILON 2.2204460492503131E-16 +#define DBL_DIG 15 +#define DBL_MIN_EXP (-1021) +#define DBL_MIN 2.2250738585072014E-308 +#define DBL_MIN_10_EXP (-307) +#define DBL_MAX_EXP 1024 +#define DBL_MAX 1.7976931348623157E+308 +#define DBL_MAX_10_EXP 308 + +#define LDBL_MANT_DIG DBL_MANT_DIG +#define LDBL_EPSILON DBL_EPSILON +#define LDBL_DIG DBL_DIG +#define LDBL_MIN_EXP DBL_MIN_EXP +#define LDBL_MIN DBL_MIN +#define LDBL_MIN_10_EXP DBL_MIN_10_EXP +#define LDBL_MAX_EXP DBL_MAX_EXP +#define LDBL_MAX DBL_MAX +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP +#endif /* _MACHINE_FLOAT_H_ */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/iso646.h --- a/epoc32/include/tools/stlport/iso646.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#if !defined (_STLP_OUTERMOST_HEADER_ID) -# define _STLP_OUTERMOST_HEADER_ID 0x204 -# include -#elif (_STLP_OUTERMOST_HEADER_ID == 0x204) && !defined (_STLP_DONT_POP_HEADER_ID) -# define _STLP_DONT_POP_HEADER_ID -#endif - -/* evc3 doesn't have iso646.h */ -#if !defined (_STLP_WCE_EVC3) && !defined (N_PLAT_NLM) && !defined (__BORLANDC__) -# include _STLP_NATIVE_C_HEADER(iso646.h) -#endif - -#if (_STLP_OUTERMOST_HEADER_ID == 0x204) -# if ! defined (_STLP_DONT_POP_HEADER_ID) -# include -# undef _STLP_OUTERMOST_HEADER_ID -# endif -# undef _STLP_DONT_POP_HEADER_ID -#endif - -/* Local Variables: - * mode:C++ - * End: - */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_carray.h --- a/epoc32/include/tools/stlport/stl/_carray.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2005 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_CARRAY_H -#define _STLP_CARRAY_H - -/* Purpose: Mimic a pur C array with the additionnal feature of - * being able to be used with type not default constructible. - */ - -#ifndef _STLP_INTERNAL_CONSTRUCT_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -_STLP_MOVE_TO_PRIV_NAMESPACE - -template -struct _CArray { - _CArray (const _Tp& __val) { - for (size_t __i = 0; __i < _Nb; ++__i) { - _Copy_Construct(__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)), __val); - } - } - - ~_CArray() { - _Destroy_Range(__REINTERPRET_CAST(_Tp*, _M_data + 0), - __REINTERPRET_CAST(_Tp*, _M_data + _Nb * sizeof(_Tp))); - } - - _Tp& operator [] (size_t __i) { - _STLP_ASSERT(__i < _Nb) - return *__REINTERPRET_CAST(_Tp*, _M_data + __i * sizeof(_Tp)); - } - -private: - char _M_data[sizeof(_Tp) * _Nb]; -}; - -_STLP_MOVE_TO_STD_NAMESPACE - -_STLP_END_NAMESPACE - -#endif //_STLP_CARRAY_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cctype.h --- a/epoc32/include/tools/stlport/stl/_cctype.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CCTYPE -#define _STLP_INTERNAL_CCTYPE - -#if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(cctype) -#else -# include -#endif /* _STLP_USE_NEW_C_HEADERS */ - -#if ! defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -# if defined ( _STLP_IMPORT_VENDOR_CSTD ) -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::isalnum; -using _STLP_VENDOR_CSTD::isalpha; -using _STLP_VENDOR_CSTD::iscntrl; -using _STLP_VENDOR_CSTD::isdigit; -using _STLP_VENDOR_CSTD::isgraph; -using _STLP_VENDOR_CSTD::islower; -using _STLP_VENDOR_CSTD::isprint; -using _STLP_VENDOR_CSTD::ispunct; -using _STLP_VENDOR_CSTD::isspace; -using _STLP_VENDOR_CSTD::isupper; -using _STLP_VENDOR_CSTD::isxdigit; -using _STLP_VENDOR_CSTD::tolower; -using _STLP_VENDOR_CSTD::toupper; -_STLP_END_NAMESPACE -# endif /* _STLP_IMPORT_VENDOR_CSTD*/ -#endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_clocale.h --- a/epoc32/include/tools/stlport/stl/_clocale.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CLOCALE -#define _STLP_INTERNAL_CLOCALE - -#if !defined (_STLP_WCE_EVC3) - -# if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(clocale) -# else -# include _STLP_NATIVE_C_HEADER(locale.h) -# endif - -# if defined (_STLP_IMPORT_VENDOR_CSTD) -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::lconv; -# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -using _STLP_VENDOR_CSTD::localeconv; -using _STLP_VENDOR_CSTD::setlocale; -# endif -_STLP_END_NAMESPACE -# endif - -#endif /* !_STLP_WCE_EVC3 */ - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_csetjmp.h --- a/epoc32/include/tools/stlport/stl/_csetjmp.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,65 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CSETJMP -#define _STLP_INTERNAL_CSETJMP - -// if the macro is on, the header is already there -#if !defined (setjmp) -# if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(csetjmp) -# else -# define _STLP_NATIVE_SETJMP_H_INCLUDED -# include _STLP_NATIVE_C_HEADER(setjmp.h) -# endif -#endif - -#if defined (_STLP_IMPORT_VENDOR_CSTD) - -# if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS) -/* For Borland, even if stdjmp.h is included symbols won't be in global namespace - * so we need to reach them in vendor namespace: - */ -# undef _STLP_NATIVE_SETJMP_H_INCLUDED -# endif - -_STLP_BEGIN_NAMESPACE -# if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED) -using _STLP_VENDOR_CSTD::jmp_buf; -# else -// if setjmp.h was included first, this is in global namespace, not in -// vendor's std. - 2005-08-04, ptr -using ::jmp_buf; -# endif -# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -# if !defined (setjmp) -# if !defined (__MSL__) || ((__MSL__ > 0x7001) && (__MSL__ < 0x8000)) -# ifndef _STLP_NATIVE_SETJMP_H_INCLUDED -using _STLP_VENDOR_CSTD::setjmp; -# else -using ::setjmp; -# endif -# endif -# endif -# if !defined (_STLP_NATIVE_SETJMP_H_INCLUDED) -using _STLP_VENDOR_CSTD::longjmp; -# else -using ::longjmp; -# endif -# endif -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_csignal.h --- a/epoc32/include/tools/stlport/stl/_csignal.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CSIGNAL -#define _STLP_INTERNAL_CSIGNAL - -#if !defined (_STLP_WCE) -# if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(csignal) -# else -# include _STLP_NATIVE_C_HEADER(signal.h) -# endif - -# if defined (_STLP_IMPORT_VENDOR_CSTD) -_STLP_BEGIN_NAMESPACE -# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -using _STLP_VENDOR_CSTD::signal; -using _STLP_VENDOR_CSTD::raise; -# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ -using _STLP_VENDOR_CSTD::sig_atomic_t; -_STLP_END_NAMESPACE -# endif /* _STLP_IMPORT_VENDOR_CSTD */ -#endif - -#endif /* _STLP_INTERNAL_CSIGNAL */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cstdarg.h --- a/epoc32/include/tools/stlport/stl/_cstdarg.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - -#ifndef _STLP_INTERNAL_CSTDARG -#define _STLP_INTERNAL_CSTDARG - -#if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(cstdarg) -#else -# include _STLP_NATIVE_C_HEADER(stdarg.h) -#endif - -#ifdef _STLP_IMPORT_VENDOR_CSTD -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::va_list; -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cstddef.h --- a/epoc32/include/tools/stlport/stl/_cstddef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CSTDDEF -#define _STLP_INTERNAL_CSTDDEF - -# if (__GNUC__ >= 3) && defined (__CYGWIN__) // this total HACK is the only expedient way I could cygwin to work with GCC 3.0 -# define __need_wint_t // mostly because wint_t didn't seem to get defined otherwise :( -# define __need_wchar_t -# define __need_size_t -# define __need_ptrdiff_t -# define __need_NULL -# endif - -# if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(cstddef) -# else -# include -# endif - -# ifdef _STLP_IMPORT_VENDOR_CSTD -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::ptrdiff_t; -using _STLP_VENDOR_CSTD::size_t; -_STLP_END_NAMESPACE -# endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif /* _STLP_INTERNAL_CSTDDEF */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cstdio.h --- a/epoc32/include/tools/stlport/stl/_cstdio.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CSTDIO -#define _STLP_INTERNAL_CSTDIO - -#if defined (__Lynx__) -# include _STLP_NATIVE_C_HEADER(stdarg.h) -#endif - -#if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(cstdio) -#else -# include _STLP_NATIVE_C_HEADER(stdio.h) -#endif - -#if (defined (__MWERKS__) && !defined (N_PLAT_NLM)) || defined (__BORLANDC__) -# undef stdin -# undef stdout -# undef stderr -# if defined (__MWERKS__) -# define stdin (&_STLP_VENDOR_CSTD::__files[0]) -# define stdout (&_STLP_VENDOR_CSTD::__files[1]) -# define stderr (&_STLP_VENDOR_CSTD::__files[2]) -# elif defined (__BORLANDC__) -# define stdin (&_STLP_VENDOR_CSTD::_streams[0]) -# define stdout (&_STLP_VENDOR_CSTD::_streams[1]) -# define stderr (&_STLP_VENDOR_CSTD::_streams[2]) -# endif -#endif - -#if defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) -inline int vsnprintf(char *s1, size_t n, const char *s2, va_list v) -{ return _STLP_VENDOR_CSTD::_vsnprintf(s1, n, s2, v); } -#endif - -#if defined (_STLP_IMPORT_VENDOR_CSTD ) -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::FILE; -using _STLP_VENDOR_CSTD::fpos_t; -using _STLP_VENDOR_CSTD::size_t; - -// undef obsolete macros -# undef putc -# undef getc -# undef getchar -# undef putchar -# undef feof -# undef ferror - -# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -using _STLP_VENDOR_CSTD::clearerr; -using _STLP_VENDOR_CSTD::fclose; -using _STLP_VENDOR_CSTD::feof; -using _STLP_VENDOR_CSTD::ferror; -using _STLP_VENDOR_CSTD::fflush; -using _STLP_VENDOR_CSTD::fgetc; -using _STLP_VENDOR_CSTD::fgetpos; -using _STLP_VENDOR_CSTD::fgets; -using _STLP_VENDOR_CSTD::fopen; -using _STLP_VENDOR_CSTD::fprintf; -using _STLP_VENDOR_CSTD::fputc; -using _STLP_VENDOR_CSTD::fputs; -using _STLP_VENDOR_CSTD::fread; -# if _WIN32_WCE < 0x500 // CE5 stopped supplying this -using _STLP_VENDOR_CSTD::freopen; -# endif -using _STLP_VENDOR_CSTD::fscanf; -using _STLP_VENDOR_CSTD::fseek; -using _STLP_VENDOR_CSTD::fsetpos; -using _STLP_VENDOR_CSTD::ftell; -using _STLP_VENDOR_CSTD::fwrite; - -# if !(defined (__IBMCPP__) && (__IBMCPP__ >= 500)) -# if _WIN32_WCE < 0x500 // CE5 stopped supplying this except as macros. TODO: use inline function to redirect to the macros? - using _STLP_VENDOR_CSTD::getc; - using _STLP_VENDOR_CSTD::putc; -# endif - using _STLP_VENDOR_CSTD::getchar; - using _STLP_VENDOR_CSTD::putchar; -# endif - -using _STLP_VENDOR_CSTD::gets; -# if _WIN32_WCE < 0x500 // CE5 stopped supplying this -using _STLP_VENDOR_CSTD::perror; -# endif -using _STLP_VENDOR_CSTD::printf; -using _STLP_VENDOR_CSTD::puts; -# if _WIN32_WCE < 0x500 // CE5 stopped supplying this -using _STLP_VENDOR_CSTD::remove; -using _STLP_VENDOR_CSTD::rename; -using _STLP_VENDOR_CSTD::rewind; -using _STLP_VENDOR_CSTD::setbuf; -using _STLP_VENDOR_CSTD::tmpfile; -using _STLP_VENDOR_CSTD::tmpnam; -# endif -using _STLP_VENDOR_CSTD::scanf; -using _STLP_VENDOR_CSTD::setvbuf; -using _STLP_VENDOR_CSTD::sprintf; -using _STLP_VENDOR_CSTD::sscanf; -using _STLP_VENDOR_CSTD::ungetc; -using _STLP_VENDOR_CSTD::vfprintf; -using _STLP_VENDOR_CSTD::vprintf; -using _STLP_VENDOR_CSTD::vsprintf; -# if ((defined (__MWERKS__) && !defined (N_PLAT_NLM)) || (defined (_STLP_MSVC_LIB) && (_STLP_MSVC_LIB < 1400)) || \ - (defined (__BORLANDC__))) -using _STLP_VENDOR_CSTD::vsnprintf; -# endif -# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif /* _STLP_INTERNAL_CSTDIO */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cstdlib.h --- a/epoc32/include/tools/stlport/stl/_cstdlib.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CSTDLIB -#define _STLP_INTERNAL_CSTDLIB - -#if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(cstdlib) -#else -# include -#endif - -#if defined (__BORLANDC__) -/* Borland process.h header do not bring anything here and is just included - * in order to avoid inclusion later. This header cannot be included later - * because Borland compiler consider that for instance the abort function - * defined as extern "C" cannot be overloaded and it finds 2 "overloads", - * once in native std namespace and the other in STLport namespace... - */ -# include -#endif - -/* on evc3/evc4 including stdlib.h also defines setjmp macro */ -#if defined (_STLP_WCE) -# define _STLP_NATIVE_SETJMP_H_INCLUDED -#endif - -#if defined (__MSL__) && (__MSL__ <= 0x5003) -namespace std { - typedef ::div_t div_t; - typedef ::ldiv_t ldiv_t; -# ifdef __MSL_LONGLONG_SUPPORT__ - typedef ::lldiv_t lldiv_t; -# endif -} -#endif - -#ifdef _STLP_IMPORT_VENDOR_CSTD -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::div_t; -using _STLP_VENDOR_CSTD::ldiv_t; -using _STLP_VENDOR_CSTD::size_t; - -# ifndef _STLP_NO_CSTD_FUNCTION_IMPORTS -# ifndef _STLP_WCE -// these functions just don't exist on Windows CE -using _STLP_VENDOR_CSTD::abort; -using _STLP_VENDOR_CSTD::getenv; -using _STLP_VENDOR_CSTD::mblen; -using _STLP_VENDOR_CSTD::mbtowc; -using _STLP_VENDOR_CSTD::system; -using _STLP_VENDOR_CSTD::bsearch; -# endif -using _STLP_VENDOR_CSTD::atexit; -using _STLP_VENDOR_CSTD::exit; -using _STLP_VENDOR_CSTD::calloc; -using _STLP_VENDOR_CSTD::free; -using _STLP_VENDOR_CSTD::malloc; -using _STLP_VENDOR_CSTD::realloc; -using _STLP_VENDOR_CSTD::atof; -using _STLP_VENDOR_CSTD::atoi; -using _STLP_VENDOR_CSTD::atol; -using _STLP_VENDOR_CSTD::mbstowcs; -using _STLP_VENDOR_CSTD::strtod; -using _STLP_VENDOR_CSTD::strtol; -using _STLP_VENDOR_CSTD::strtoul; - -# if !(defined (_STLP_NO_NATIVE_WIDE_STREAMS) || defined (_STLP_NO_MBSTATE_T)) -using _STLP_VENDOR_CSTD::wcstombs; -# ifndef _STLP_WCE -using _STLP_VENDOR_CSTD::wctomb; -# endif -# endif -using _STLP_VENDOR_CSTD::qsort; -using _STLP_VENDOR_CSTD::labs; -using _STLP_VENDOR_CSTD::ldiv; -# if defined (_STLP_LONG_LONG) && !defined (_STLP_NO_VENDOR_STDLIB_L) -# if !defined(__sun) -using _STLP_VENDOR_CSTD::llabs; -using _STLP_VENDOR_CSTD::lldiv_t; -using _STLP_VENDOR_CSTD::lldiv; -# else -using ::llabs; -using ::lldiv_t; -using ::lldiv; -# endif -# endif -using _STLP_VENDOR_CSTD::rand; -using _STLP_VENDOR_CSTD::srand; -# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#if defined (__BORLANDC__) && defined (_STLP_USE_NEW_C_HEADERS) -//In this config bcc define everything in std namespace and not in -//the global one. -inline int abs(int __x) { return _STLP_VENDOR_CSTD::abs(__x); } -inline _STLP_VENDOR_CSTD::div_t div(int __x, int __y) { return _STLP_VENDOR_CSTD::div(__x, __y); } -#endif - -#if defined(_MSC_EXTENSIONS) && defined(_STLP_MSVC) && (_STLP_MSVC <= 1300) -# define _STLP_RESTORE_FUNCTION_INTRINSIC -# pragma warning (push) -# pragma warning (disable: 4162) -# pragma function (abs) -#endif - -//HP-UX native lib has abs() and div() functions in global namespace -#if !defined (__HP_aCC) || (__HP_aCC < 30000) - -//MSVC starting with .Net 2003 already define all math functions in global namespace: -# if !defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1310) || defined(UNDER_CE) -inline long abs(long __x) { return _STLP_VENDOR_CSTD::labs(__x); } -# endif - -/** VC since version 8 has this, the platform SDK and CE SDKs hanging behind. */ -# if !defined (_STLP_MSVC_LIB) || (_STLP_MSVC_LIB < 1400) || defined (_STLP_USING_PLATFORM_SDK_COMPILER) || defined(UNDER_CE) -inline _STLP_VENDOR_CSTD::ldiv_t div(long __x, long __y) { return _STLP_VENDOR_CSTD::ldiv(__x, __y); } -# endif - -#endif - -#if defined (_STLP_RESTORE_FUNCTION_INTRINSIC) -# pragma intrinsic (abs) -# pragma warning (pop) -# undef _STLP_RESTORE_FUNCTION_INTRINSIC -#endif - -#if defined (_STLP_LONG_LONG) -# if !defined (_STLP_NO_VENDOR_STDLIB_L) -# if !defined (__sun) -inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return _STLP_VENDOR_CSTD::llabs(__x); } -inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return _STLP_VENDOR_CSTD::lldiv(__x, __y); } -# else -inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return ::llabs(__x); } -inline lldiv_t div(_STLP_LONG_LONG __x, _STLP_LONG_LONG __y) { return ::lldiv(__x, __y); } -# endif -# else -inline _STLP_LONG_LONG abs(_STLP_LONG_LONG __x) { return __x < 0 ? -__x : __x; } -# endif -#endif - -/* C++ Standard is unclear about several call to 'using ::func' if new overloads - * of ::func appears between 2 successive 'using' calls. To avoid this potential - * problem we provide all abs overload before the 'using' call. - * Beware: This header inclusion has to be after all abs overload of this file. - * The first 'using ::abs' call is going to be in the other header. - */ -#ifndef _STLP_INTERNAL_CMATH -# include -#endif - -#if defined (_STLP_IMPORT_VENDOR_CSTD) && !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -// ad hoc, don't replace with _STLP_VENDOR_CSTD::abs here! - ptr 2005-03-05 -_STLP_BEGIN_NAMESPACE -using ::abs; -# if !defined (N_PLAT_NLM) -using ::div; -# else -// Don't use div from clib or libc on NetWare---buggy! - ptr 2005-06-06 -inline div_t div(int __x, int __y) { div_t d; d.quot = __x / __y; d.rem = __x % __y; return d; } -inline ldiv_t div(long __x, long __y) { ldiv_t d; d.quot = __x / __y; d.rem = __x % __y; return d; } -# endif -_STLP_END_NAMESPACE -#endif - -#endif /* _STLP_INTERNAL_CSTDLIB */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cstring.h --- a/epoc32/include/tools/stlport/stl/_cstring.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CSTRING -#define _STLP_INTERNAL_CSTRING - -#if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(cstring) -#else -# include _STLP_NATIVE_C_HEADER(string.h) -#endif - -#ifdef _STLP_IMPORT_VENDOR_CSTD -_STLP_BEGIN_NAMESPACE -# include -_STLP_END_NAMESPACE -#endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif /* _STLP_INTERNAL_CSTRING */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_ctime.h --- a/epoc32/include/tools/stlport/stl/_ctime.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CTIME -#define _STLP_INTERNAL_CTIME - -#if !defined (_STLP_WCE_EVC3) - -# if defined (_STLP_USE_NEW_C_HEADERS) -# include _STLP_NATIVE_CPP_C_HEADER(ctime) -# else -# include _STLP_NATIVE_C_HEADER(time.h) -# endif - -# if defined (_STLP_IMPORT_VENDOR_CSTD) -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD::size_t; -using _STLP_VENDOR_CSTD::clock_t; -using _STLP_VENDOR_CSTD::time_t; -using _STLP_VENDOR_CSTD::tm; -# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -using _STLP_VENDOR_CSTD::clock; -using _STLP_VENDOR_CSTD::asctime; -using _STLP_VENDOR_CSTD::ctime; -using _STLP_VENDOR_CSTD::gmtime; - -# if _WIN32_WCE < 0x500 // CE5 stopped supplying this -using _STLP_VENDOR_CSTD::difftime; -# endif -using _STLP_VENDOR_CSTD::mktime; -using _STLP_VENDOR_CSTD::localtime; -using _STLP_VENDOR_CSTD::strftime; -using _STLP_VENDOR_CSTD::time; -# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ -_STLP_END_NAMESPACE -# endif /* _STLP_IMPORT_VENDOR_CSTD */ - -#endif - -#endif /* _STLP_INTERNAL_CTIME */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_cwctype.h --- a/epoc32/include/tools/stlport/stl/_cwctype.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_CWCTYPE -#define _STLP_INTERNAL_CWCTYPE - -#if defined (__BORLANDC__) && !defined (_STLP_INTERNAL_CCTYPE) -# include -#endif - -#if !defined (_STLP_WCE_EVC3) -# if defined (_STLP_USE_NEW_C_HEADERS) -# if !defined (N_PLAT_NLM) -# include _STLP_NATIVE_CPP_C_HEADER(cwctype) -# else - // see comments in stlport/cwchar about wint_t on Novell -# include _STLP_NATIVE_CPP_C_HEADER(wchar_t.h) -# include _STLP_NATIVE_C_HEADER(stddef.h) -# include _STLP_NATIVE_C_HEADER(stdio.h) -# endif -# if defined (__MSL__) && !defined (N_PLAT_NLM) -namespace std { - typedef wchar_t wctrans_t; - wint_t towctrans(wint_t c, wctrans_t value); - wctrans_t wctrans(const char *name); -} -using std::wctrans_t; -using std::towctrans; -using std::wctrans; -# endif -# else -# include _STLP_NATIVE_C_HEADER(wctype.h) -# endif - -# if defined (_STLP_IMPORT_VENDOR_CSTD) - -# if defined (_STLP_USE_GLIBC) && !(defined (_GLIBCPP_USE_WCHAR_T) || defined (_GLIBCXX_USE_WCHAR_T)) || \ - defined (__sun) || defined (__FreeBSD__) || \ - defined (__MINGW32__) && ((__MINGW32_MAJOR_VERSION < 3) || (__MINGW32_MAJOR_VERSION == 3) && (__MINGW32_MINOR_VERSION <= 0)) -//We take wide functions from global namespace: -# define _STLP_VENDOR_CSTD_WFUNC -# else -# define _STLP_VENDOR_CSTD_WFUNC _STLP_VENDOR_CSTD -# endif - -_STLP_BEGIN_NAMESPACE -using _STLP_VENDOR_CSTD_WFUNC::wctype_t; -using _STLP_VENDOR_CSTD_WFUNC::wint_t; -# if !defined (_STLP_NO_CSTD_FUNCTION_IMPORTS) -# if !defined (__BORLANDC__) && !defined (__MSL__) -using _STLP_VENDOR_CSTD_WFUNC::wctrans_t; -# if !defined (__DMC__) && (!defined(_WIN32_WCE) || _WIN32_WCE<0x500) -using _STLP_VENDOR_CSTD_WFUNC::towctrans; -using _STLP_VENDOR_CSTD_WFUNC::wctrans; -using _STLP_VENDOR_CSTD_WFUNC::wctype; -# endif -using _STLP_VENDOR_CSTD_WFUNC::iswctype; -# endif -# if !defined(N_PLAT_NLM) -using _STLP_VENDOR_CSTD_WFUNC::iswalnum; -using _STLP_VENDOR_CSTD_WFUNC::iswalpha; -using _STLP_VENDOR_CSTD_WFUNC::iswcntrl; - -using _STLP_VENDOR_CSTD_WFUNC::iswdigit; -using _STLP_VENDOR_CSTD_WFUNC::iswgraph; -using _STLP_VENDOR_CSTD_WFUNC::iswlower; -using _STLP_VENDOR_CSTD_WFUNC::iswprint; -using _STLP_VENDOR_CSTD_WFUNC::iswpunct; -using _STLP_VENDOR_CSTD_WFUNC::iswspace; -using _STLP_VENDOR_CSTD_WFUNC::iswupper; -using _STLP_VENDOR_CSTD_WFUNC::iswxdigit; - -using _STLP_VENDOR_CSTD_WFUNC::towlower; -using _STLP_VENDOR_CSTD_WFUNC::towupper; -# endif /* !N_PLAT_NLM */ -# endif /* _STLP_NO_CSTD_FUNCTION_IMPORTS */ -_STLP_END_NAMESPACE -# endif /* _STLP_IMPORT_VENDOR_CSTD */ -#endif /* _STLP_WCE_EVC3 */ - -#endif /* _STLP_INTERNAL_CWCTYPE */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_ioserr.h --- a/epoc32/include/tools/stlport/stl/_ioserr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -/* - * This file is included in every header that needs the STLport library to be - * built; the header files mostly are the iostreams-headers. The file checks for - * _STLP_USE_NO_IOSTREAMS or _STLP_NO_IOSTREAMS being not defined, so that the - * iostreams part of STLport cannot be used when the symbols were defined - * accidentally. - */ -#if defined (_STLP_NO_IOSTREAMS) -# error STLport iostreams header cannot be used; you chose not to use iostreams in the STLport configuration file (stlport/stl/config/user_config.h). -#elif defined (_STLP_USE_NO_IOSTREAMS ) -# error STLport iostreams header cannot be used; your compiler do not support it. -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_iostream_string.h --- a/epoc32/include/tools/stlport/stl/_iostream_string.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2004 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - /* - * This is an internal string for the STLport own iostream implementation. - * The only diference rely on the allocator used to instanciate the basic_string. - * Its goals is to improve performance limitating the number of dynamic allocation - * that could occur when requesting a big float ouput for instance. This allocator - * is not standard conformant as it has an internal state (the static buffer) - */ - - -#ifndef _STLP_INTERNAL_IOSTREAM_STRING_H -#define _STLP_INTERNAL_IOSTREAM_STRING_H - -#ifndef _STLP_INTERNAL_ALLOC_H -# include -#endif /* _STLP_INTERNAL_ALLOC_H */ - -#ifndef _STLP_INTERNAL_STRING_H -# include -#endif /* _STLP_INTERNAL_STRING_H */ - -_STLP_BEGIN_NAMESPACE - -_STLP_MOVE_TO_PRIV_NAMESPACE - -template -class __iostring_allocator : public allocator<_CharT> { -public: - enum { _STR_SIZE = 256 }; - -private: - enum { _BUF_SIZE = _STR_SIZE + 1 }; - typedef allocator<_CharT> _Base; - _CharT _M_static_buf[_BUF_SIZE]; - -public: - typedef typename _Base::size_type size_type; - typedef typename _Base::pointer pointer; -#if defined (_STLP_MEMBER_TEMPLATE_CLASSES) - template struct rebind { -# if !defined (_STLP_MSVC) || (_STLP_MSVC >= 1300) - typedef __iostring_allocator<_Tp1> other; -# else - typedef _STLP_PRIV __iostring_allocator<_Tp1> other; -# endif - }; -#endif - - _CharT* allocate(size_type __n, const void* __ptr = 0) { - if (__n > _BUF_SIZE) { - return _Base::allocate(__n, __ptr); - } - return _M_static_buf; - } - void deallocate(pointer __p, size_type __n) { - if (__p != _M_static_buf) _Base::deallocate(__p, __n); - } -}; - -#if defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) || !defined (_STLP_MEMBER_TEMPLATES) -/* - * As the __iostring_allocator allocator will only be used in the basic_string implementation - * we known that it is never going to be bound to another type that the one used to instantiate - * the basic_string. This is why the associated __stl_alloc_rebind has only one template - * parameter. - */ -_STLP_MOVE_TO_STD_NAMESPACE - -template -inline _STLP_PRIV __iostring_allocator<_Tp>& _STLP_CALL -__stl_alloc_rebind(_STLP_PRIV __iostring_allocator<_Tp>& __a, const _Tp*) -{ return __a; } -template -inline _STLP_PRIV __iostring_allocator<_Tp> _STLP_CALL -__stl_alloc_create(const _STLP_PRIV __iostring_allocator<_Tp>&, const _Tp*) -{ return _STLP_PRIV __iostring_allocator<_Tp>(); } - -_STLP_MOVE_TO_PRIV_NAMESPACE -#endif /* _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE */ - -#if !defined (_STLP_DEBUG) -template -struct __basic_iostring : public basic_string<_CharT, char_traits<_CharT>, __iostring_allocator<_CharT> > { - /* - * A consequence of the non standard conformant allocator is that a string using it - * must always be presized to the allocator static buffer size because the basic_string implementation - * do not manage an allocator returning always the same memory adress as long as the - * requested memory block size is under a certain value. - */ - typedef __basic_iostring<_CharT> _Self; - typedef basic_string<_CharT, char_traits<_CharT>, __iostring_allocator<_CharT> > _Base; - typedef typename _Base::_Reserve_t _Reserve_t; - - __basic_iostring() : _Base(_Reserve_t(), __iostring_allocator<_CharT>::_STR_SIZE) - {} - - _Self& operator=(const _CharT* __s) { - _Base::operator=(__s); - return *this; - } -}; - -typedef __basic_iostring __iostring; - -# if !defined (_STLP_NO_WCHAR_T) -typedef __basic_iostring __iowstring; -# endif - -# define _STLP_BASIC_IOSTRING(_CharT) _STLP_PRIV __basic_iostring<_CharT> - -#else - -typedef string __iostring; -# if !defined (_STLP_NO_WCHAR_T) -typedef wstring __iowstring; -# endif - -# define _STLP_BASIC_IOSTRING(_CharT) basic_string<_CharT, char_traits<_CharT>, allocator<_CharT> > - -#endif - -_STLP_MOVE_TO_STD_NAMESPACE - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_IOSTREAM_STRING_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_mbstate_t.h --- a/epoc32/include/tools/stlport/stl/_mbstate_t.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_MBSTATE_T -#define _STLP_INTERNAL_MBSTATE_T - -#if (defined (__OpenBSD__) || defined (__FreeBSD__)) && defined (__GNUC__) && !defined (_GLIBCPP_HAVE_MBSTATE_T) -# define __mbstate_t_defined /* mbstate_t defined in native , so not defined in C! */ -#endif - -#if defined (_STLP_NO_NATIVE_MBSTATE_T) && !defined (_STLP_NO_MBSTATE_T) && !defined (_MBSTATE_T) && !defined (__mbstate_t_defined) -# define _STLP_USE_OWN_MBSTATE_T -# define _MBSTATE_T -#endif - -#if defined (_STLP_USE_OWN_MBSTATE_T) -typedef int mbstate_t; - -# if defined (__cplusplus) -_STLP_BEGIN_NAMESPACE -using ::mbstate_t; -_STLP_END_NAMESPACE -# endif - -#endif /* _STLP_USE_OWN_MBSTATE_T */ - -#endif /* _STLP_INTERNAL_MBSTATE_T */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_move_construct_fwk.h --- a/epoc32/include/tools/stlport/stl/_move_construct_fwk.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,160 +0,0 @@ -/* - * - * Copyright (c) 2003 - * François Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_MOVE_CONSTRUCT_FWK_H -#define _STLP_MOVE_CONSTRUCT_FWK_H - -#ifndef _STLP_TYPE_TRAITS_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -/************************************************************* - * Move constructor framework - *************************************************************/ - -/************************************************************* - *Partial move: - *The source HAS to be a valid instance after the move! - *************************************************************/ -template -class __move_source { -public: - explicit __move_source (_Tp &_src) : _M_data(_src) - {} - - _Tp& get() const - { return _M_data; } -private: - _Tp &_M_data; - - //We explicitely forbid assignment to avoid warning: - typedef __move_source<_Tp> _Self; - _Self& operator = (_Self const&); -}; - -//Class used to signal move constructor support, implementation and type. -template -struct __move_traits { - /* - * implemented tells if a the special move constructor has to be called or the classic - * copy constructor is just fine. Most of the time the copy constructor is fine only - * if the following info is true. - */ -#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) && \ - !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && \ - !defined (_STLP_NO_MOVE_SEMANTIC) - typedef typename _IsSTLportClass<_Tp>::_Ret implemented; -#else - typedef __false_type implemented; -#endif - /* - * complete tells if the move is complete or partial, that is to say, does the source - * needs to be destroyed once it has been moved. - */ - typedef typename __type_traits<_Tp>::has_trivial_destructor complete; -}; - -#if !defined (_STLP_NO_MOVE_SEMANTIC) -typedef __true_type __stlp_movable; -#else -typedef __false_type __stlp_movable; -#endif - -_STLP_MOVE_TO_PRIV_NAMESPACE - -/* - * This struct should never be used if the user has not explicitely stipulated - * that its class support the full move concept. To check that the return type - * in such a case will be __invalid_source<_Tp> to generate a compile error - * revealing the configuration problem. - */ -template -struct _MoveSourceTraits { - typedef typename __move_traits<_Tp>::implemented _MvImpRet; -#if defined (__BORLANDC__) - typedef typename __selectT<_MvImpRet, -#else - enum {_MvImp = __type2bool<_MvImpRet>::_Ret}; - typedef typename __select<_MvImp, -#endif - __move_source<_Tp>, - _Tp const&>::_Ret _Type; -}; - -//The helper function -template -inline _STLP_TYPENAME_ON_RETURN_TYPE _MoveSourceTraits<_Tp>::_Type -_AsMoveSource (_Tp &src) { - typedef typename _MoveSourceTraits<_Tp>::_Type _SrcType; - return _SrcType(src); -} - -//Helper structs used for many class. -template -struct __move_traits_aux { - typedef typename __move_traits<_Tp>::implemented implemented; - typedef typename __move_traits<_Tp>::complete complete; -}; - -template -struct __move_traits_aux2 { - typedef __move_traits<_Tp1> _MoveTraits1; - typedef __move_traits<_Tp2> _MoveTraits2; - - typedef typename _Lor2::_Ret implemented; - typedef typename _Land2::_Ret complete; -}; - -/* - * Most of the time a class implement a move constructor but its use depends - * on a third party, this is what the following struct are for. - */ -template -struct __move_traits_help { - typedef __true_type implemented; - typedef typename __move_traits<_Tp>::complete complete; -}; - -template -struct __move_traits_help1 { - typedef __move_traits<_Tp1> _MoveTraits1; - typedef __move_traits<_Tp2> _MoveTraits2; - - typedef typename _Lor2::_Ret implemented; - typedef typename _Land2::_Ret complete; -}; - -template -struct __move_traits_help2 { - typedef __move_traits<_Tp1> _MoveTraits1; - typedef __move_traits<_Tp2> _MoveTraits2; - - typedef __stlp_movable implemented; - typedef typename _Land2::_Ret complete; -}; - -_STLP_MOVE_TO_STD_NAMESPACE - -_STLP_END_NAMESPACE - -#endif /* _STLP_MOVE_CONSTRUCT_FWK_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_stdexcept.h --- a/epoc32/include/tools/stlport/stl/_stdexcept.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_STDEXCEPT -#define _STLP_INTERNAL_STDEXCEPT - -#ifndef _STLP_INTERNAL_STDEXCEPT_BASE -# include -#endif - -#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE) - -# if defined(_STLP_USE_EXCEPTIONS) || \ - !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32)) - -_STLP_BEGIN_NAMESPACE - -class _STLP_CLASS_DECLSPEC logic_error : public __Named_exception { -public: - logic_error(const string& __s) : __Named_exception(__s) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~logic_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC runtime_error : public __Named_exception { -public: - runtime_error(const string& __s) : __Named_exception(__s) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~runtime_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC domain_error : public logic_error { -public: - domain_error(const string& __arg) : logic_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~domain_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC invalid_argument : public logic_error { -public: - invalid_argument(const string& __arg) : logic_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~invalid_argument() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC length_error : public logic_error { -public: - length_error(const string& __arg) : logic_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~length_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC out_of_range : public logic_error { -public: - out_of_range(const string& __arg) : logic_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~out_of_range() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC range_error : public runtime_error { -public: - range_error(const string& __arg) : runtime_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~range_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC overflow_error : public runtime_error { -public: - overflow_error(const string& __arg) : runtime_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~overflow_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -class _STLP_CLASS_DECLSPEC underflow_error : public runtime_error { -public: - underflow_error(const string& __arg) : runtime_error(__arg) {} -# ifndef _STLP_USE_NO_IOSTREAMS - ~underflow_error() _STLP_NOTHROW_INHERENTLY; -# endif -}; - -_STLP_END_NAMESPACE - -# endif -#endif - -#endif /* _STLP_INTERNAL_STDEXCEPT */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_stdexcept_base.h --- a/epoc32/include/tools/stlport/stl/_stdexcept_base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,102 +0,0 @@ -/* - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_INTERNAL_STDEXCEPT_BASE -#define _STLP_INTERNAL_STDEXCEPT_BASE - -#if !defined (_STLP_USE_NATIVE_STDEXCEPT) || defined (_STLP_USE_OWN_NAMESPACE) - -# ifndef _STLP_INTERNAL_EXCEPTION -# include -# endif - -# if defined(_STLP_USE_EXCEPTIONS) || \ - !(defined(_MIPS_SIM) && defined(_ABIO32) && (_MIPS_SIM == _ABIO32)) - -# ifndef _STLP_INTERNAL_CSTRING -# include -# endif - -# ifndef _STLP_STRING_FWD_H -# include -# endif - -# ifndef _STLP_USE_NO_IOSTREAMS -# define _STLP_OWN_STDEXCEPT 1 -# endif - -_STLP_BEGIN_NAMESPACE - -/* We disable the 4275 warning for - * - WinCE where there are only static version of the native C++ runtime. - * - The MSVC compilers when the STLport user wants to make an STLport dll linked to - * the static C++ native runtime. In this case the std::exception base class is no more - * exported from native dll but is used as a base class for the exported __Named_exception - * class. - */ -# if defined (_STLP_WCE_NET) || \ - defined (_STLP_USE_DYNAMIC_LIB) && defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) -# define _STLP_DO_WARNING_POP -# pragma warning (push) -# pragma warning (disable: 4275) // Non dll interface class 'exception' used as base - // for dll-interface class '__Named_exception' -# endif - -# if !defined (_STLP_NO_EXCEPTION_HEADER) -# if !defined (_STLP_EXCEPTION_BASE) && !defined (_STLP_BROKEN_EXCEPTION_CLASS) && \ - defined (_STLP_USE_NAMESPACES) && defined (_STLP_USE_OWN_NAMESPACE) -using _STLP_VENDOR_EXCEPT_STD::exception; -# endif -# endif -# define _STLP_EXCEPTION_BASE exception - -class _STLP_CLASS_DECLSPEC __Named_exception : public _STLP_EXCEPTION_BASE { -public: - __Named_exception(const string& __str) -# ifndef _STLP_USE_NO_IOSTREAMS - ; - const char* what() const _STLP_NOTHROW_INHERENTLY; - ~__Named_exception() _STLP_NOTHROW_INHERENTLY; -# else - { -# if !defined (_STLP_USE_SAFE_STRING_FUNCTIONS) - strncpy(_M_name, _STLP_PRIV __get_c_string(__str), _S_bufsize); -# else - strncpy_s(_STLP_ARRAY_AND_SIZE(_M_name), _STLP_PRIV __get_c_string(__str), _S_bufsize); -# endif - _M_name[_S_bufsize - 1] = '\0'; - } - const char* what() const _STLP_NOTHROW_INHERENTLY { return _M_name; } -# endif - -private: - enum { _S_bufsize = 256 }; - char _M_name[_S_bufsize]; -}; - -# if defined (_STLP_DO_WARNING_POP) -# pragma warning (pop) -# undef _STLP_DO_WARNING_POP -# endif - -_STLP_END_NAMESPACE - -# endif /* Not o32, and no exceptions */ -#endif /* _STLP_STDEXCEPT_SEEN */ - -#endif /* _STLP_INTERNAL_STDEXCEPT_BASE */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_stlport_version.h --- a/epoc32/include/tools/stlport/stl/_stlport_version.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ - /* - * - * Copyright (c) 2005 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STLPORT_VERSION_H -#define _STLP_STLPORT_VERSION_H - -/* The last SGI STL release we merged with */ -#define __SGI_STL 0x330 - -/* STLport version */ -#define _STLPORT_MAJOR 5 -#define _STLPORT_MINOR 1 -#define _STLPORT_PATCHLEVEL 0 - -#define _STLPORT_VERSION 0x510 - -#endif /* _STLP_STLPORT_VERSION_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_string_base.h --- a/epoc32/include/tools/stlport/stl/_string_base.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,249 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * Copyright (c) 2003 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STRING_BASE_H -#define _STLP_STRING_BASE_H - -// ------------------------------------------------------------ -// Class _String_base. - -// _String_base is a helper class that makes it it easier to write an -// exception-safe version of basic_string. The constructor allocates, -// but does not initialize, a block of memory. The destructor -// deallocates, but does not destroy elements within, a block of -// memory. The destructor assumes that _M_start either is null, or else -// points to a block of memory that was allocated using _String_base's -// allocator and whose size is _M_end_of_storage._M_data - _M_start. - -_STLP_BEGIN_NAMESPACE - -_STLP_MOVE_TO_PRIV_NAMESPACE - -#ifndef _STLP_SHORT_STRING_SZ -# define _STLP_SHORT_STRING_SZ 16 -#endif - -template -class _String_base { - typedef _String_base<_Tp, _Alloc> _Self; -protected: - _STLP_FORCE_ALLOCATORS(_Tp, _Alloc) -public: - //dums: Some compiler(MSVC6) require it to be public not simply protected! - enum {_DEFAULT_SIZE = _STLP_SHORT_STRING_SZ}; - //This is needed by the full move framework - typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type; - typedef _STLP_alloc_proxy<_Tp*, _Tp, allocator_type> _AllocProxy; - typedef size_t size_type; -private: -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - union _Buffers { - _Tp* _M_dynamic_buf; - _Tp _M_static_buf[_DEFAULT_SIZE]; - } _M_buffers; -#else - _Tp* _M_start; -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ -protected: -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - bool _M_using_static_buf() const { - return (_M_end_of_storage._M_data == _M_buffers._M_static_buf + _DEFAULT_SIZE); - } - _Tp const* _M_Start() const { - return _M_using_static_buf()?_M_buffers._M_static_buf:_M_buffers._M_dynamic_buf; - } - _Tp* _M_Start() { - return _M_using_static_buf()?_M_buffers._M_static_buf:_M_buffers._M_dynamic_buf; - } -#else - _Tp const* _M_Start() const {return _M_start;} - _Tp* _M_Start() {return _M_start;} -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ - - _Tp* _M_finish; - _AllocProxy _M_end_of_storage; - - _Tp const* _M_Finish() const {return _M_finish;} - _Tp* _M_Finish() {return _M_finish;} - - // Precondition: 0 < __n <= max_size(). - void _M_allocate_block(size_t __n = _DEFAULT_SIZE); - void _M_deallocate_block() { -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - if (!_M_using_static_buf() && (_M_buffers._M_dynamic_buf != 0)) - _M_end_of_storage.deallocate(_M_buffers._M_dynamic_buf, _M_end_of_storage._M_data - _M_buffers._M_dynamic_buf); -#else - if (_M_start != 0) - _M_end_of_storage.deallocate(_M_start, _M_end_of_storage._M_data - _M_start); -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ - } - - size_t max_size() const { - const size_type __string_max_size = size_type(-1) / sizeof(_Tp); - typename allocator_type::size_type __alloc_max_size = _M_end_of_storage.max_size(); - return (min)(__alloc_max_size, __string_max_size) - 1; - } - - _String_base(const allocator_type& __a) -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - : _M_finish(_M_buffers._M_static_buf), _M_end_of_storage(__a, _M_buffers._M_static_buf + _DEFAULT_SIZE) -#else - : _M_start(0), _M_finish(0), _M_end_of_storage(__a, (_Tp*)0) -#endif - {} - - _String_base(const allocator_type& __a, size_t __n) -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - : _M_finish(_M_buffers._M_static_buf), _M_end_of_storage(__a, _M_buffers._M_static_buf + _DEFAULT_SIZE) { -#else - : _M_start(0), _M_finish(0), _M_end_of_storage(__a, (_Tp*)0) { -#endif - _M_allocate_block(__n); - } - -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - void _M_move_src (_Self &src) { - if (src._M_using_static_buf()) { - _M_buffers = src._M_buffers; - _M_finish = _M_buffers._M_static_buf + (src._M_finish - src._M_buffers._M_static_buf); - _M_end_of_storage._M_data = _M_buffers._M_static_buf + _DEFAULT_SIZE; - } - else { - _M_buffers._M_dynamic_buf = src._M_buffers._M_dynamic_buf; - _M_finish = src._M_finish; - _M_end_of_storage._M_data = src._M_end_of_storage._M_data; - src._M_buffers._M_dynamic_buf = 0; - } - } -#endif - - _String_base(__move_source<_Self> src) -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - : _M_end_of_storage(__move_source<_AllocProxy>(src.get()._M_end_of_storage)) { - _M_move_src(src.get()); -#else - : _M_start(src.get()._M_start), _M_finish(src.get()._M_finish), - _M_end_of_storage(__move_source<_AllocProxy>(src.get()._M_end_of_storage)) { - src.get()._M_start = 0; -#endif - } - - ~_String_base() { _M_deallocate_block(); } - - void _M_reset(_Tp *__start, _Tp *__finish, _Tp *__end_of_storage) { -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - _M_buffers._M_dynamic_buf = __start; -#else - _M_start = __start; -#endif - _M_finish = __finish; - _M_end_of_storage._M_data = __end_of_storage; - } - - void _M_destroy_back () { -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - if (!_M_using_static_buf()) -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ - _STLP_STD::_Destroy(_M_finish); - } - - void _M_destroy_range(size_t __from_off = 0, size_t __to_off = 1) { -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - if (!_M_using_static_buf()) - _STLP_STD::_Destroy_Range(_M_buffers._M_dynamic_buf + __from_off, _M_finish + __to_off); -#else - _STLP_STD::_Destroy_Range(_M_start + __from_off, _M_finish + __to_off); -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ - } - - void _M_destroy_ptr_range(_Tp *__f, _Tp *__l) { -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - if (!_M_using_static_buf()) -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ - _STLP_STD::_Destroy_Range(__f, __l); - } - - void _M_Swap(_Self &__s) { -#if defined (_STLP_USE_SHORT_STRING_OPTIM) - if (_M_using_static_buf()) { - if (__s._M_using_static_buf()) { - _STLP_STD::swap(_M_buffers, __s._M_buffers); - _Tp *__tmp = _M_finish; - _M_finish = _M_buffers._M_static_buf + (__s._M_finish - __s._M_buffers._M_static_buf); - __s._M_finish = __s._M_buffers._M_static_buf + (__tmp - _M_buffers._M_static_buf); - //We need to swap _M_end_of_storage for allocators with state: - _M_end_of_storage.swap(__s._M_end_of_storage); - _M_end_of_storage._M_data = _M_buffers._M_static_buf + _DEFAULT_SIZE; - __s._M_end_of_storage._M_data = __s._M_buffers._M_static_buf + _DEFAULT_SIZE; - } else { - __s._M_Swap(*this); - return; - } - } - else if (__s._M_using_static_buf()) { - _Tp *__tmp = _M_buffers._M_dynamic_buf; - _Tp *__tmp_finish = _M_finish; - _Tp *__tmp_end_data = _M_end_of_storage._M_data; - _M_buffers = __s._M_buffers; - //We need to swap _M_end_of_storage for allocators with state: - _M_end_of_storage.swap(__s._M_end_of_storage); - _M_end_of_storage._M_data = _M_buffers._M_static_buf + _DEFAULT_SIZE; - _M_finish = _M_buffers._M_static_buf + (__s._M_finish - __s._M_buffers._M_static_buf); - __s._M_buffers._M_dynamic_buf = __tmp; - __s._M_end_of_storage._M_data = __tmp_end_data; - __s._M_finish = __tmp_finish; - } - else { - _STLP_STD::swap(_M_buffers._M_dynamic_buf, __s._M_buffers._M_dynamic_buf); - _M_end_of_storage.swap(__s._M_end_of_storage); - _STLP_STD::swap(_M_finish, __s._M_finish); - } -#else - _STLP_STD::swap(_M_start, __s._M_start); - _M_end_of_storage.swap(__s._M_end_of_storage); - _STLP_STD::swap(_M_finish, __s._M_finish); -#endif /* _STLP_USE_SHORT_STRING_OPTIM */ - } - - void _STLP_FUNCTION_THROWS _M_throw_length_error() const; - void _STLP_FUNCTION_THROWS _M_throw_out_of_range() const; -}; - -#undef _STLP_SHORT_STRING_SZ - -#if defined (_STLP_USE_TEMPLATE_EXPORT) -_STLP_EXPORT_TEMPLATE_CLASS _String_base >; -# if defined (_STLP_HAS_WCHAR_T) -_STLP_EXPORT_TEMPLATE_CLASS _String_base >; -# endif -#endif /* _STLP_USE_TEMPLATE_EXPORT */ - -_STLP_MOVE_TO_STD_NAMESPACE - -_STLP_END_NAMESPACE - -#endif /* _STLP_STRING_BASE_H */ - -/* - * Local Variables: - * mode:C++ - * End: - */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_string_npos.h --- a/epoc32/include/tools/stlport/stl/_string_npos.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2005 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - -/* This header contains npos definition used in basic_string and rope - * implementation. It do not have to be guarded as files including it - * are already guarded and it has sometimes to be included several times. - */ - -#if defined (_STLP_STATIC_CONST_INIT_BUG) - enum { npos = -1 }; -#elif defined (__GNUC__) && (__GNUC__ == 2) && (__GNUC_MINOR__ == 96) - // inline initializer conflicts with 'extern template' - static const size_t npos; -#else - static const size_t npos = ~(size_t)0; -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_string_operators.h --- a/epoc32/include/tools/stlport/stl/_string_operators.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,602 +0,0 @@ -/* - * Copyright (c) 2003 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_STRING_OPERATORS_H -#define _STLP_STRING_OPERATORS_H - -_STLP_BEGIN_NAMESPACE - -#if !defined (_STLP_USE_TEMPLATE_EXPRESSION) - -# if defined (__GNUC__) || defined (__MLCCPP__) -# define _STLP_INIT_AMBIGUITY 1 -# endif - -template -inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - typedef basic_string<_CharT,_Traits,_Alloc> _Str; - typedef typename _Str::_Reserve_t _Reserve_t; -# if defined (_STLP_INIT_AMBIGUITY) - // gcc counts this as a function - _Str __result = _Str(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator()); -# else - _Str __result(_Reserve_t(), __s.size() + __y.size(), __s.get_allocator()); -# endif - __result.append(__s); - __result.append(__y); - return __result; -} - -template -inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL -operator+(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - typedef basic_string<_CharT,_Traits,_Alloc> _Str; - typedef typename _Str::_Reserve_t _Reserve_t; - const size_t __n = _Traits::length(__s); -# if defined (_STLP_INIT_AMBIGUITY) - _Str __result = _Str(_Reserve_t(), __n + __y.size(), __y.get_allocator()); -# else - _Str __result(_Reserve_t(), __n + __y.size(), __y.get_allocator()); -# endif - __result.append(__s, __s + __n); - __result.append(__y); - return __result; -} - -template -inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL -operator+(_CharT __c, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - typedef basic_string<_CharT,_Traits,_Alloc> _Str; - typedef typename _Str::_Reserve_t _Reserve_t; -# if defined (_STLP_INIT_AMBIGUITY) - _Str __result = _Str(_Reserve_t(), 1 + __y.size(), __y.get_allocator()); -# else - _Str __result(_Reserve_t(), 1 + __y.size(), __y.get_allocator()); -# endif - __result.push_back(__c); - __result.append(__y); - return __result; -} - -template -inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - typedef basic_string<_CharT,_Traits,_Alloc> _Str; - typedef typename _Str::_Reserve_t _Reserve_t; - const size_t __n = _Traits::length(__s); -# if defined (_STLP_INIT_AMBIGUITY) - _Str __result = _Str(_Reserve_t(), __x.size() + __n, __x.get_allocator()); -# else - _Str __result(_Reserve_t(), __x.size() + __n, __x.get_allocator()); -# endif - __result.append(__x); - __result.append(__s, __s + __n); - return __result; -} - -template -inline basic_string<_CharT,_Traits,_Alloc> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT __c) { - typedef basic_string<_CharT,_Traits,_Alloc> _Str; - typedef typename _Str::_Reserve_t _Reserve_t; -# if defined (_STLP_INIT_AMBIGUITY) - _Str __result = _Str(_Reserve_t(), __x.size() + 1, __x.get_allocator()); -# else - _Str __result(_Reserve_t(), __x.size() + 1, __x.get_allocator()); -# endif - __result.append(__x); - __result.push_back(__c); - return __result; -} - -# undef _STLP_INIT_AMBIGUITY - -#else /* _STLP_USE_TEMPLATE_EXPRESSION */ - -// addition with basic_string -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs, - const basic_string<_CharT,_Traits,_Alloc>& __rhs) { - typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right> __root_type; - __root_type __root(__rhs, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__lhs.get_allocator())); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - __root_type, - _STLP_PRIV __on_right>(__lhs, __root); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __lhs, - const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __rhs) { - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __on_right>(__lhs, __rhs); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __on_left> _STLP_CALL -operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __lhs, - const basic_string<_CharT,_Traits,_Alloc>& __rhs) { - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __on_left>(__lhs, __rhs); -} - -// addition with C string -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - const size_t __n = _Traits::length(__s); - typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right> __root_type; - __root_type __root(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - __root_type, _STLP_PRIV __on_right>(__x, __root); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - const size_t __n = _Traits::length(__s); - typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right> __root_type; - __root_type __root(__y, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__y.get_allocator())); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, - __root_type, - _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __root); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __on_left> _STLP_CALL -operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, - const _CharT* __s) { - const size_t __n = _Traits::length(__s); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __on_left>(__x, _STLP_PRIV __cstr_wrapper<_CharT>(__s, __n)); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __y) { - const size_t __n = _Traits::length(__s); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __cstr_wrapper<_CharT>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __on_right>(_STLP_PRIV __cstr_wrapper<_CharT>(__s, __n), __y); -} - -// addition with char -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __char_wrapper<_CharT>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const basic_string<_CharT,_Traits,_Alloc>& __x, const _CharT __c) { - typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right> __root_type; - __root_type __root(__c, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - __root_type, _STLP_PRIV __on_right>(__x, __root); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __char_wrapper<_CharT>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const _CharT __c, const basic_string<_CharT,_Traits,_Alloc>& __x) { - typedef _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_wrapper<_CharT,_Traits,_Alloc>, - _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>, - _STLP_PRIV __on_right> __root_type; - __root_type __root(__x, _STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc>(__x.get_allocator())); - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, - __root_type, _STLP_PRIV __on_right>(__c, __root); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __char_wrapper<_CharT>, - _STLP_PRIV __on_left> _STLP_CALL -operator+(const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x, const _CharT __c) { - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __char_wrapper<_CharT>, _STLP_PRIV __on_left>(__x, __c); -} - -template -inline _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __on_right> _STLP_CALL -operator+(const _CharT __c, const _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>& __x) { - return _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _STLP_PRIV __char_wrapper<_CharT>, - _STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir>, - _STLP_PRIV __on_right>(__c, __x); -} - -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -// Operator== and operator!= - -template -inline bool _STLP_CALL -operator==(const basic_string<_CharT,_Traits,_Alloc>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; -} - -template -inline bool _STLP_CALL -operator==(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - return __x.size() == __y.size() && _Traits::compare(__x.data(), __y.data(), __x.size()) == 0; -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - - -template -inline bool _STLP_CALL -operator==(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0; -} - -template -inline bool _STLP_CALL -operator==(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0; -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator==(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return __n == __y.size() && _Traits::compare(__s, __y.data(), __n) == 0; -} - -template -inline bool _STLP_CALL -operator==(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return __x.size() == __n && _Traits::compare(__x.data(), __s, __n) == 0; -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -// Operator< (and also >, <=, and >=). - -template -inline bool _STLP_CALL -operator<(const basic_string<_CharT,_Traits,_Alloc>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()) < 0; -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()) < 0; -} - -template -inline bool _STLP_CALL -operator<(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), - __y.begin(), __y.end()) < 0; -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -template -inline bool _STLP_CALL -operator<(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, - __y.begin(), __y.end()) < 0; -} - -template -inline bool _STLP_CALL -operator<(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), - __s, __s + __n) < 0; -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator<(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__s, __s + __n, - __y.begin(), __y.end()) < 0; -} - -template -inline bool _STLP_CALL -operator<(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - size_t __n = _Traits::length(__s); - return basic_string<_CharT,_Traits,_Alloc> ::_M_compare(__x.begin(), __x.end(), - __s, __s + __n) < 0; -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -#if defined (_STLP_USE_SEPARATE_RELOPS_NAMESPACE) - -/* Only defined if _STLP_USE_SEPARATE_RELOPS_NAMESPACE is defined otherwise - * it might introduce ambiguity with pure template relational operators - * from rel_ops namespace. - */ -template -inline bool _STLP_CALL -operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) -{ return !(__x == __y); } - -template -inline bool _STLP_CALL -operator>(const basic_string<_CharT,_Traits,_Alloc>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) -{ return __y < __x; } - -template -inline bool _STLP_CALL -operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) -{ return !(__y < __x); } - -template -inline bool _STLP_CALL -operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) -{ return !(__x < __y); } - -# if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const basic_string<_CharT,_Traits,_Alloc>& __y) -{ return !(__x==__y); } - -template -inline bool _STLP_CALL -operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) -{ return !(__x==__y); } -# endif - -#endif /* _STLP_USE_SEPARATE_RELOPS_NAMESPACE */ - -template -inline bool _STLP_CALL -operator!=(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__s == __y); -} - -template -inline bool _STLP_CALL -operator!=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__x == __s); -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator!=(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__s == __y); -} - -template -inline bool _STLP_CALL -operator!=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__x == __s); -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -template -inline bool _STLP_CALL -operator>(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return __y < __s; -} - -template -inline bool _STLP_CALL -operator>(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return __s < __x; -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator>(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return __y < __s; -} - -template -inline bool _STLP_CALL -operator>(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return __s < __x; -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -template -inline bool _STLP_CALL -operator<=(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__y < __s); -} - -template -inline bool _STLP_CALL -operator<=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__s < __x); -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator<=(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__y < __s); -} - -template -inline bool _STLP_CALL -operator<=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__s < __x); -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -template -inline bool _STLP_CALL -operator>=(const _CharT* __s, - const basic_string<_CharT,_Traits,_Alloc>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__s < __y); -} - -template -inline bool _STLP_CALL -operator>=(const basic_string<_CharT,_Traits,_Alloc>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__x < __s); -} - -#if defined (_STLP_USE_TEMPLATE_EXPRESSION) -template -inline bool _STLP_CALL -operator>=(const _CharT* __s, - const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __y) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__s < __y); -} - -template -inline bool _STLP_CALL -operator>=(const _STLP_PRIV __bstr_sum<_CharT,_Traits,_Alloc,_Lhs,_Rhs,_StoreDir>& __x, - const _CharT* __s) { - _STLP_FIX_LITERAL_BUG(__s) - return !(__x < __s); -} -#endif /* _STLP_USE_TEMPLATE_EXPRESSION */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_STRING_OPERATORS_H */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_string_sum_methods.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/tools/stlport/stl/_string_sum_methods.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2003 + * Francois Dumont + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +/* + * All the necessary methods used for template expressions with basic_string + * This file do not have to be macro guarded as it is only used in the _string.h + * file and it is a part of the basic_string definition. + */ + + template + basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s) + : _M_non_dbg_impl(_Reserve_t(), __s.size(), __s.get_allocator()), + _M_iter_list(&_M_non_dbg_impl) + { _M_append_sum(__s, _M_non_dbg_impl); } + + template + basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, + size_type __pos, size_type __n = npos, + const allocator_type& __a = allocator_type()) + : _M_non_dbg_impl(_Reserve_t(), (__pos <= __s.size()) ? ((min) (__n, __s.size() - __pos)) : 0, __a), + _M_iter_list(&_M_non_dbg_impl) { + size_type __size = __s.size(); + if (__pos > __size) + //This call will generate the necessary out of range exception: + _M_non_dbg_impl.at(0); + else + _M_append_sum_pos(__s, __pos, (min) (__n, __size - __pos), _M_non_dbg_impl); + } + +private: + _Base& _M_append_fast(_STLP_PRIV __char_wrapper<_CharT> __c, _Base &__str) + { return __str += __c.getValue(); } + _Base& _M_append_fast(_CharT const* __s, size_type __s_size, _Base &__str) + { return __str.append(__s, __s_size); } + _Base& _M_append_fast(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _Base &__str) + { return _M_append_fast(__s.c_str(), __s.size(), __str); } + _Base& _M_append_fast(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _Base &__str) + { return _M_append_fast(__s.b_str(), __str); } + _Base& _M_append_fast(_Self const& __s, _Base &__str) + { return _M_append_fast(__s.data(), __s.size(), __str); } + _Base& _M_append_fast(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _Base &__str) + { return __str; } + template + _Base& _M_append_fast(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, _Base &__str) + { return _M_append_fast(__s.getRhs(), _M_append_fast(__s.getLhs(), __str)); } + + _Base& _M_append_fast_pos(_STLP_PRIV __char_wrapper<_CharT> __c, _Base &__str, size_type /*__pos*/, size_type __n) { + if (__n == 0) + return __str; + return __str += __c.getValue(); + } + _Base& _M_append_fast_pos(_CharT const* __s, size_type __s_size, _Base &__str, + size_type __pos, size_type __n) + { return __str.append(__s + __pos, __s + __pos + (min)(__n, __s_size - __pos)); } + _Base& _M_append_fast_pos(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _Base &__str, + size_type __pos, size_type __n) + { return _M_append_fast_pos(__s.c_str(), __s.size(), __str, __pos, __n); } + _Base& _M_append_fast_pos(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _Base &__str, + size_type __pos, size_type __n) + { return _M_append_fast_pos(__s.b_str(), __str, __pos, __n); } + _Base& _M_append_fast_pos(_Self const& __s, _Base &__str, size_type __pos, size_type __n) + { return _M_append_fast_pos(__s.data(), __s.size(), __str, __pos, __n); } + _Base& _M_append_fast_pos(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _Base &__str, + size_type /*__pos*/, size_type /*__n*/) + { return __str; } + + template + _Base& _M_append_fast_pos(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, + _Base &__str, size_type __pos, size_type __n) { + if (__n == 0) { + return __str; + } + size_type __lhs_size = __s.getLhs().size(); + if (__pos < __lhs_size) { + if (__n < (__lhs_size - __pos)) { + return _M_append_fast_pos(__s.getLhs(), __str, __pos, __n); + } else { + return _M_append_fast_pos(__s.getRhs(), _M_append_fast_pos(__s.getLhs(), __str, __pos, __n), + 0, __n - (__lhs_size - __pos)); + } + } else { + return _M_append_fast_pos(__s.getRhs(), __str, __pos - __lhs_size, __n); + } + } + + template + _Self& _M_append_sum (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, + _Base &__impl) { + _M_append_fast(__s, __impl); + return *this; + } + + template + _Self& _M_append_sum_pos (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, + size_type __pos, size_type __n, _Base &__impl) { + _M_non_dbg_impl.reserve(_M_non_dbg_impl.size() + (min) (__s.size() - __pos, __n)); + _M_append_fast_pos(__s, __impl, __pos, __n); + return *this; + } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_unordered_map.h --- a/epoc32/include/tools/stlport/stl/_unordered_map.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,427 +0,0 @@ -/* - * Copyright (c) 2004 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_UNORDERED_MAP_H -#define _STLP_INTERNAL_UNORDERED_MAP_H - -#ifndef _STLP_INTERNAL_HASHTABLE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//Specific iterator traits creation -_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMapTraitsT, traits) - -template ), - _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>), - _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > -class unordered_map -#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) - : public __stlport_class > -#endif -{ -private: - typedef unordered_map<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self; -public: - typedef _Key key_type; - typedef _Tp data_type; - typedef _Tp mapped_type; -#if !defined (__DMC__) - typedef pair value_type; -#else - typedef pair value_type; -#endif -private: - //Specific iterator traits creation - typedef _STLP_PRIV _UnorderedMapTraitsT _UnorderedMapTraits; - -public: - typedef hashtable _Ht; - - typedef typename _Ht::hasher hasher; - typedef typename _Ht::key_equal key_equal; - - typedef typename _Ht::size_type size_type; - typedef typename _Ht::difference_type difference_type; - typedef typename _Ht::pointer pointer; - typedef typename _Ht::const_pointer const_pointer; - typedef typename _Ht::reference reference; - typedef typename _Ht::const_reference const_reference; - - typedef typename _Ht::iterator iterator; - typedef typename _Ht::const_iterator const_iterator; - typedef typename _Ht::local_iterator local_iterator; - typedef typename _Ht::const_local_iterator const_local_iterator; - - typedef typename _Ht::allocator_type allocator_type; - - hasher hash_function() const { return _M_ht.hash_funct(); } - key_equal key_eq() const { return _M_ht.key_eq(); } - allocator_type get_allocator() const { return _M_ht.get_allocator(); } - -private: - _Ht _M_ht; - _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) - -public: - explicit unordered_map(size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) {} - - unordered_map(__move_source<_Self> src) - : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} - -#if defined (_STLP_MEMBER_TEMPLATES) - template - unordered_map(_InputIterator __f, _InputIterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } -#else - unordered_map(const value_type* __f, const value_type* __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } - - unordered_map(const_iterator __f, const_iterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } -#endif /*_STLP_MEMBER_TEMPLATES */ - - _Self& operator = (const _Self& __other) - { _M_ht = __other._M_ht; return *this; } - - size_type size() const { return _M_ht.size(); } - size_type max_size() const { return _M_ht.max_size(); } - bool empty() const { return _M_ht.empty(); } - void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } - - iterator begin() { return _M_ht.begin(); } - iterator end() { return _M_ht.end(); } - const_iterator begin() const { return _M_ht.begin(); } - const_iterator end() const { return _M_ht.end(); } - - pair insert(const value_type& __obj) - { return _M_ht.insert_unique(__obj); } - iterator insert(const_iterator /*__hint*/, const value_type& __obj) - { return _M_ht.insert_unique(__obj); } -#if defined (_STLP_MEMBER_TEMPLATES) - template - void insert(_InputIterator __f, _InputIterator __l) -#else - void insert(const value_type* __f, const value_type* __l) - { _M_ht.insert_unique(__f,__l); } - void insert(const_iterator __f, const_iterator __l) -#endif /*_STLP_MEMBER_TEMPLATES */ - { _M_ht.insert_unique(__f, __l); } - - _STLP_TEMPLATE_FOR_CONT_EXT - iterator find(const _KT& __key) { return _M_ht.find(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - _Tp& operator[](const _KT& __key) { - iterator __it = _M_ht.find(__key); - return (__it == _M_ht.end() ? - _M_ht._M_insert(value_type(__key, _STLP_DEFAULT_CONSTRUCTED(_Tp))).second : - (*__it).second ); - } - - _STLP_TEMPLATE_FOR_CONT_EXT - size_type count(const _KT& __key) const { return _M_ht.count(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) - { return _M_ht.equal_range(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) const - { return _M_ht.equal_range(__key); } - - size_type erase(const key_type& __key) {return _M_ht.erase(__key); } - void erase(const_iterator __it) { _M_ht.erase(__it); } - void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } - void clear() { _M_ht.clear(); } - - size_type bucket_count() const { return _M_ht.bucket_count(); } - size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } - size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } - _STLP_TEMPLATE_FOR_CONT_EXT - size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } - local_iterator begin(size_type __n) { return _M_ht.begin(__n); } - local_iterator end(size_type __n) { return _M_ht.end(__n); } - const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } - const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } - - float load_factor() const { return _M_ht.load_factor(); } - float max_load_factor() const { return _M_ht.max_load_factor(); } - void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } - void rehash(size_type __hint) { _M_ht.rehash(__hint); } -}; - -//Specific iterator traits creation -_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMultimapTraitsT, traits) - -template ), - _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Key>), - _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(const _Key, _Tp) > -class unordered_multimap -#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) - : public __stlport_class > -#endif -{ -private: - typedef unordered_multimap<_Key, _Tp, _HashFcn, _EqualKey, _Alloc> _Self; -public: - typedef _Key key_type; - typedef _Tp data_type; - typedef _Tp mapped_type; -#if !defined (__DMC__) - typedef pair value_type; -#else - typedef pair value_type; -#endif -private: - //Specific iterator traits creation - typedef _STLP_PRIV _UnorderedMultimapTraitsT _UnorderedMultimapTraits; - -public: - typedef hashtable _Ht; - - typedef typename _Ht::hasher hasher; - typedef typename _Ht::key_equal key_equal; - - typedef typename _Ht::size_type size_type; - typedef typename _Ht::difference_type difference_type; - typedef typename _Ht::pointer pointer; - typedef typename _Ht::const_pointer const_pointer; - typedef typename _Ht::reference reference; - typedef typename _Ht::const_reference const_reference; - - typedef typename _Ht::iterator iterator; - typedef typename _Ht::const_iterator const_iterator; - typedef typename _Ht::local_iterator local_iterator; - typedef typename _Ht::const_local_iterator const_local_iterator; - - typedef typename _Ht::allocator_type allocator_type; - - hasher hash_function() const { return _M_ht.hash_funct(); } - key_equal key_eq() const { return _M_ht.key_eq(); } - allocator_type get_allocator() const { return _M_ht.get_allocator(); } - -private: - _Ht _M_ht; - _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) - -public: - explicit unordered_multimap(size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) {} - - unordered_multimap(__move_source<_Self> src) - : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} - -#if defined (_STLP_MEMBER_TEMPLATES) - template - unordered_multimap(_InputIterator __f, _InputIterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } -#else - unordered_multimap(const value_type* __f, const value_type* __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } - - unordered_multimap(const_iterator __f, const_iterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } -#endif /*_STLP_MEMBER_TEMPLATES */ - - _Self& operator = (const _Self& __other) - { _M_ht = __other._M_ht; return *this; } - - size_type size() const { return _M_ht.size(); } - size_type max_size() const { return _M_ht.max_size(); } - bool empty() const { return _M_ht.empty(); } - void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } - - iterator begin() { return _M_ht.begin(); } - iterator end() { return _M_ht.end(); } - const_iterator begin() const { return _M_ht.begin(); } - const_iterator end() const { return _M_ht.end(); } - - iterator insert(const value_type& __obj) - { return _M_ht.insert_equal(__obj); } - iterator insert(const_iterator /*__hint*/, const value_type& __obj) - { return _M_ht.insert_equal(__obj); } -#if defined (_STLP_MEMBER_TEMPLATES) - template - void insert(_InputIterator __f, _InputIterator __l) -#else - void insert(const value_type* __f, const value_type* __l) - { _M_ht.insert_equal(__f,__l); } - void insert(const_iterator __f, const_iterator __l) -#endif /*_STLP_MEMBER_TEMPLATES */ - { _M_ht.insert_equal(__f, __l); } - - _STLP_TEMPLATE_FOR_CONT_EXT - iterator find(const _KT& __key) { return _M_ht.find(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - size_type count(const _KT& __key) const { return _M_ht.count(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) - { return _M_ht.equal_range(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) const - { return _M_ht.equal_range(__key); } - - size_type erase(const key_type& __key) {return _M_ht.erase(__key); } - void erase(const_iterator __it) { _M_ht.erase(__it); } - void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } - void clear() { _M_ht.clear(); } - - size_type bucket_count() const { return _M_ht.bucket_count(); } - size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } - size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } - _STLP_TEMPLATE_FOR_CONT_EXT - size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } - local_iterator begin(size_type __n) { return _M_ht.begin(__n); } - local_iterator end(size_type __n) { return _M_ht.end(__n); } - const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } - const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } - - float load_factor() const { return _M_ht.load_factor(); } - float max_load_factor() const { return _M_ht.max_load_factor(); } - void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } - void rehash(size_type __hint) { _M_ht.rehash(__hint); } -}; - -#define _STLP_TEMPLATE_HEADER template -#define _STLP_TEMPLATE_CONTAINER unordered_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc> - -#include - -#undef _STLP_TEMPLATE_CONTAINER -#define _STLP_TEMPLATE_CONTAINER unordered_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc> - -#include - -#undef _STLP_TEMPLATE_CONTAINER -#undef _STLP_TEMPLATE_HEADER - -// Specialization of insert_iterator so that it will work for unordered_map -// and unordered_multimap. - -#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -template -struct __move_traits > : - _STLP_PRIV __move_traits_help::_Ht> -{}; - -template -struct __move_traits > : - _STLP_PRIV __move_traits_help::_Ht> -{}; - -template -class insert_iterator > { -protected: - typedef unordered_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container; - _Container* container; -public: - typedef _Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(_Container& __x) : container(&__x) {} - insert_iterator(_Container& __x, typename _Container::iterator) - : container(&__x) {} - insert_iterator<_Container>& - operator=(const typename _Container::value_type& __val) { - container->insert(__val); - return *this; - } - insert_iterator<_Container>& operator*() { return *this; } - insert_iterator<_Container>& operator++() { return *this; } - insert_iterator<_Container>& operator++(int) { return *this; } -}; - -template -class insert_iterator > { -protected: - typedef unordered_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container; - _Container* container; - typename _Container::iterator iter; -public: - typedef _Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(_Container& __x) : container(&__x) {} - insert_iterator(_Container& __x, typename _Container::iterator) - : container(&__x) {} - insert_iterator<_Container>& - operator=(const typename _Container::value_type& __val) { - container->insert(__val); - return *this; - } - insert_iterator<_Container>& operator*() { return *this; } - insert_iterator<_Container>& operator++() { return *this; } - insert_iterator<_Container>& operator++(int) { return *this; } -}; - -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_UNORDERED_MAP_H */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/_unordered_set.h --- a/epoc32/include/tools/stlport/stl/_unordered_set.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,398 +0,0 @@ -/* - * Copyright (c) 2004 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* NOTE: This is an internal header file, included by other STL headers. - * You should not attempt to use it directly. - */ - -#ifndef _STLP_INTERNAL_UNORDERED_SET_H -#define _STLP_INTERNAL_UNORDERED_SET_H - -#ifndef _STLP_INTERNAL_HASHTABLE_H -# include -#endif - -_STLP_BEGIN_NAMESPACE - -//Specific iterator traits creation -_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedSetTraitsT, Const_traits) - -template ), - _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Value>), - _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) > -class unordered_set -#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) - : public __stlport_class > -#endif -{ - typedef unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> _Self; - //Specific iterator traits creation - typedef _STLP_PRIV _UnorderedSetTraitsT<_Value> _UnorderedSetTraits; -public: - typedef hashtable<_Value, _Value, _HashFcn, - _UnorderedSetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; -public: - typedef typename _Ht::key_type key_type; - typedef typename _Ht::value_type value_type; - typedef typename _Ht::hasher hasher; - typedef typename _Ht::key_equal key_equal; - - typedef typename _Ht::size_type size_type; - typedef typename _Ht::difference_type difference_type; - typedef typename _Ht::pointer pointer; - typedef typename _Ht::const_pointer const_pointer; - typedef typename _Ht::reference reference; - typedef typename _Ht::const_reference const_reference; - - typedef typename _Ht::iterator iterator; - typedef typename _Ht::const_iterator const_iterator; - typedef typename _Ht::local_iterator local_iterator; - typedef typename _Ht::const_local_iterator const_local_iterator; - - typedef typename _Ht::allocator_type allocator_type; - - hasher hash_function() const { return _M_ht.hash_funct(); } - key_equal key_eq() const { return _M_ht.key_eq(); } - allocator_type get_allocator() const { return _M_ht.get_allocator(); } - -private: - _Ht _M_ht; - _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) - -public: - explicit unordered_set(size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) {} - - unordered_set(__move_source<_Self> src) - : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} - -#if defined (_STLP_MEMBER_TEMPLATES) - template - unordered_set(_InputIterator __f, _InputIterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } -#else - unordered_set(const value_type* __f, const value_type* __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } - - unordered_set(const_iterator __f, const_iterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_unique(__f, __l); } -#endif /*_STLP_MEMBER_TEMPLATES */ - - _Self& operator = (const _Self& __other) - { _M_ht = __other._M_ht; return *this; } - - size_type size() const { return _M_ht.size(); } - size_type max_size() const { return _M_ht.max_size(); } - bool empty() const { return _M_ht.empty(); } - void swap(_Self& __hs) { _M_ht.swap(__hs._M_ht); } - - iterator begin() { return _M_ht.begin(); } - iterator end() { return _M_ht.end(); } - const_iterator begin() const { return _M_ht.begin(); } - const_iterator end() const { return _M_ht.end(); } - - pair insert(const value_type& __obj) - { return _M_ht.insert_unique(__obj); } - iterator insert(const_iterator /*__hint*/, const value_type& __obj) - { return _M_ht.insert_unique(__obj); } -#if defined (_STLP_MEMBER_TEMPLATES) - template - void insert(_InputIterator __f, _InputIterator __l) -#else - void insert(const_iterator __f, const_iterator __l) - {_M_ht.insert_unique(__f, __l); } - void insert(const value_type* __f, const value_type* __l) -#endif - { _M_ht.insert_unique(__f,__l); } - - _STLP_TEMPLATE_FOR_CONT_EXT - iterator find(const _KT& __key) { return _M_ht.find(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - size_type count(const _KT& __key) const { return _M_ht.count(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) - { return _M_ht.equal_range(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) const - { return _M_ht.equal_range(__key); } - - size_type erase(const key_type& __key) {return _M_ht.erase(__key); } - void erase(const_iterator __it) { _M_ht.erase(__it); } - void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } - void clear() { _M_ht.clear(); } - - size_type bucket_count() const { return _M_ht.bucket_count(); } - size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } - size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } - _STLP_TEMPLATE_FOR_CONT_EXT - size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } - local_iterator begin(size_type __n) { return _M_ht.begin(__n); } - local_iterator end(size_type __n) { return _M_ht.end(__n); } - const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } - const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } - - float load_factor() const { return _M_ht.load_factor(); } - float max_load_factor() const { return _M_ht.max_load_factor(); } - void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } - void rehash(size_type __hint) { _M_ht.rehash(__hint); } -}; - -//Specific iterator traits creation -_STLP_CREATE_HASH_ITERATOR_TRAITS(UnorderedMultisetTraitsT, Const_traits) - -template ), - _STLP_DFL_TMPL_PARAM(_EqualKey,equal_to<_Value>), - _STLP_DEFAULT_ALLOCATOR_SELECT(_Value) > -class unordered_multiset -#if defined (_STLP_USE_PARTIAL_SPEC_WORKAROUND) - : public __stlport_class > -#endif -{ - typedef unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Self; - //Specific iterator traits creation - typedef _STLP_PRIV _UnorderedMultisetTraitsT<_Value> _UnorderedMultisetTraits; -public: - typedef hashtable<_Value, _Value, _HashFcn, - _UnorderedMultisetTraits, _STLP_PRIV _Identity<_Value>, _EqualKey, _Alloc> _Ht; - - typedef typename _Ht::key_type key_type; - typedef typename _Ht::value_type value_type; - typedef typename _Ht::hasher hasher; - typedef typename _Ht::key_equal key_equal; - - typedef typename _Ht::size_type size_type; - typedef typename _Ht::difference_type difference_type; - typedef typename _Ht::pointer pointer; - typedef typename _Ht::const_pointer const_pointer; - typedef typename _Ht::reference reference; - typedef typename _Ht::const_reference const_reference; - - typedef typename _Ht::iterator iterator; - typedef typename _Ht::const_iterator const_iterator; - typedef typename _Ht::local_iterator local_iterator; - typedef typename _Ht::const_local_iterator const_local_iterator; - - typedef typename _Ht::allocator_type allocator_type; - - hasher hash_function() const { return _M_ht.hash_funct(); } - key_equal key_eq() const { return _M_ht.key_eq(); } - allocator_type get_allocator() const { return _M_ht.get_allocator(); } - -private: - _Ht _M_ht; - _STLP_KEY_TYPE_FOR_CONT_EXT(key_type) - -public: - explicit unordered_multiset(size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) {} - - unordered_multiset(__move_source<_Self> src) - : _M_ht(__move_source<_Ht>(src.get()._M_ht)) {} - -#if defined (_STLP_MEMBER_TEMPLATES) - template - unordered_multiset(_InputIterator __f, _InputIterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } -#else - unordered_multiset(const value_type* __f, const value_type* __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } - - unordered_multiset(const_iterator __f, const_iterator __l, - size_type __n = 100, const hasher& __hf = hasher(), - const key_equal& __eql = key_equal(), - const allocator_type& __a = allocator_type()) - : _M_ht(__n, __hf, __eql, __a) - { _M_ht.insert_equal(__f, __l); } -#endif /*_STLP_MEMBER_TEMPLATES */ - - _Self& operator = (const _Self& __other) - { _M_ht = __other._M_ht; return *this; } - - size_type size() const { return _M_ht.size(); } - size_type max_size() const { return _M_ht.max_size(); } - bool empty() const { return _M_ht.empty(); } - void swap(_Self& hs) { _M_ht.swap(hs._M_ht); } - - iterator begin() { return _M_ht.begin(); } - iterator end() { return _M_ht.end(); } - const_iterator begin() const { return _M_ht.begin(); } - const_iterator end() const { return _M_ht.end(); } - - iterator insert(const value_type& __obj) - { return _M_ht.insert_equal(__obj); } - iterator insert(const_iterator /*__hint*/, const value_type& __obj) - { return _M_ht.insert_equal(__obj); } -#if defined (_STLP_MEMBER_TEMPLATES) - template - void insert(_InputIterator __f, _InputIterator __l) -#else - void insert(const value_type* __f, const value_type* __l) - { _M_ht.insert_equal(__f,__l); } - void insert(const_iterator __f, const_iterator __l) -#endif /*_STLP_MEMBER_TEMPLATES */ - { _M_ht.insert_equal(__f, __l); } - - _STLP_TEMPLATE_FOR_CONT_EXT - iterator find(const _KT& __key) { return _M_ht.find(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - const_iterator find(const _KT& __key) const { return _M_ht.find(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - size_type count(const _KT& __key) const { return _M_ht.count(__key); } - - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) - { return _M_ht.equal_range(__key); } - _STLP_TEMPLATE_FOR_CONT_EXT - pair equal_range(const _KT& __key) const - { return _M_ht.equal_range(__key); } - - size_type erase(const key_type& __key) {return _M_ht.erase(__key); } - void erase(const_iterator __it) { _M_ht.erase(__it); } - void erase(const_iterator __f, const_iterator __l) { _M_ht.erase(__f, __l); } - void clear() { _M_ht.clear(); } - - size_type bucket_count() const { return _M_ht.bucket_count(); } - size_type max_bucket_count() const { return _M_ht.max_bucket_count(); } - size_type bucket_size(size_type __n) const { return _M_ht.elems_in_bucket(__n); } - _STLP_TEMPLATE_FOR_CONT_EXT - size_type bucket(const _KT& __k) const { return _M_ht.bucket(__k); } - local_iterator begin(size_type __n) { return _M_ht.begin(__n); } - local_iterator end(size_type __n) { return _M_ht.end(__n); } - const_local_iterator begin(size_type __n) const { return _M_ht.begin(__n); } - const_local_iterator end(size_type __n) const { return _M_ht.end(__n); } - - float load_factor() const { return _M_ht.load_factor(); } - float max_load_factor() const { return _M_ht.max_load_factor(); } - void max_load_factor(float __val) { _M_ht.max_load_factor(__val); } - void rehash(size_type __hint) { _M_ht.rehash(__hint); } -}; - -#define _STLP_TEMPLATE_HEADER template -#define _STLP_TEMPLATE_CONTAINER unordered_set<_Value,_HashFcn,_EqualKey,_Alloc> - -#include - -#undef _STLP_TEMPLATE_CONTAINER -#define _STLP_TEMPLATE_CONTAINER unordered_multiset<_Value,_HashFcn,_EqualKey,_Alloc> -#include - -#undef _STLP_TEMPLATE_CONTAINER -#undef _STLP_TEMPLATE_HEADER - -// Specialization of insert_iterator so that it will work for unordered_set -// and unordered_multiset. - -#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -template -struct __move_traits > : - _STLP_PRIV __move_traits_aux::_Ht> -{}; - -template -struct __move_traits > : - _STLP_PRIV __move_traits_aux::_Ht> -{}; - -template -class insert_iterator > { -protected: - typedef unordered_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container; - _Container* container; -public: - typedef _Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(_Container& __x) : container(&__x) {} - insert_iterator(_Container& __x, typename _Container::iterator) - : container(&__x) {} - insert_iterator<_Container>& - operator=(const typename _Container::value_type& __val) { - container->insert(__val); - return *this; - } - insert_iterator<_Container>& operator*() { return *this; } - insert_iterator<_Container>& operator++() { return *this; } - insert_iterator<_Container>& operator++(int) { return *this; } -}; - -template -class insert_iterator > { -protected: - typedef unordered_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container; - _Container* container; - typename _Container::iterator iter; -public: - typedef _Container container_type; - typedef output_iterator_tag iterator_category; - typedef void value_type; - typedef void difference_type; - typedef void pointer; - typedef void reference; - - insert_iterator(_Container& __x) : container(&__x) {} - insert_iterator(_Container& __x, typename _Container::iterator) - : container(&__x) {} - insert_iterator<_Container>& - operator=(const typename _Container::value_type& __val) { - container->insert(__val); - return *this; - } - insert_iterator<_Container>& operator*() { return *this; } - insert_iterator<_Container>& operator++() { return *this; } - insert_iterator<_Container>& operator++(int) { return *this; } -}; -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -_STLP_END_NAMESPACE - -#endif /* _STLP_INTERNAL_UNORDERED_SET_H */ - -// Local Variables: -// mode:C++ -// End: - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/_gcc.h --- a/epoc32/include/tools/stlport/stl/config/_gcc.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,461 +0,0 @@ -/* STLport configuration file - * It is internal STLport header - DO NOT include it directly - */ - -#define _STLP_COMPILER "gcc" - -/* Systems having GLIBC installed have different traits */ -#if defined (__linux__) -# ifndef _STLP_USE_GLIBC -# define _STLP_USE_GLIBC 1 -# endif -# if defined (__UCLIBC__) && !defined (_STLP_USE_UCLIBC) -# define _STLP_USE_UCLIBC 1 -# endif -#endif - -#if defined (__CYGWIN__) && \ - (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 3) && !defined (_GLIBCPP_USE_C99) -# define _STLP_NO_VENDOR_MATH_L -# define _STLP_NO_VENDOR_STDLIB_L -#endif - -#if (__GNUC__ < 3) -# define _STLP_NO_VENDOR_STDLIB_L -#endif - -/* We guess if we are using the cygwin distrib that has a special include schema. - * There is no way to distinguish a cygwin distrib used in no-cygwin mode from a - * mingw install. We are forced to use a configuration option - */ -#if !defined (_STLP_NATIVE_INCLUDE_PATH) && \ - (defined (__CYGWIN__) || defined (__MINGW32__) && defined (_STLP_NO_CYGWIN)) -# if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)) -# define _STLP_NATIVE_INCLUDE_PATH ../../../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__/include/c++ -# elif defined (_STLP_NO_CYGWIN) -# define _STLP_NATIVE_INCLUDE_PATH ../mingw -/*# else - * Before version gcc 3.4, the cygwin package include path was conform to the - * GNU convention which is set later in this file. - */ -# endif -#endif - -#if (__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) -/* define for gcc versions before 3.4.0. */ -# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD -#endif - -/* azov: gcc on lynx have a bug that causes internal - * compiler errors when compiling STLport with namespaces turned on. - * When the compiler gets better - comment out _STLP_HAS_NO_NAMESPACES - */ -#if defined (__Lynx__) && (__GNUC__ < 3) -# define _STLP_HAS_NO_NAMESPACES 1 -# define _STLP_NO_STATIC_TEMPLATE_DATA 1 -/* turn off useless warning about including system headers */ -# define __NO_INCLUDE_WARN__ 1 -#endif - -/* Tru64 Unix, AIX, HP : gcc there by default uses native ld and hence cannot auto-instantiate - static template data. If you are using GNU ld, please say so in stl_user_config.h header */ -#if (__GNUC__ < 3) && !defined(_STLP_GCC_USES_GNU_LD) && \ - ((defined (__osf__) && defined (__alpha__)) || defined (_AIX) || defined (__hpux) || defined(__amigaos__) ) -# define _STLP_NO_STATIC_TEMPLATE_DATA -#endif - -#if !defined (_REENTRANT) && (defined (_THREAD_SAFE) || \ - (defined (__OpenBSD__) && defined (_POSIX_THREADS)) || \ - (defined (__MINGW32__) && defined (_MT))) -# define _REENTRANT -#endif - -#if defined (__DJGPP) -# define _STLP_RAND48 1 -# define _NOTHREADS 1 -# undef _PTHREADS -# define _STLP_LITTLE_ENDIAN -#endif - -#if defined (__MINGW32__) -/* Mingw32, egcs compiler using the Microsoft C runtime */ -# undef _STLP_NO_DRAND48 -# define _STLP_NO_DRAND48 -# define _STLP_CALL - -# if defined (_STLP_NEW_PLATFORM_SDK) -/* For the moment the Windows SDK coming with Mingw still mimik the old platform SDK. */ -# undef _STLP_NEW_PLATFORM_SDK -# endif -#endif /* __MINGW32__ */ - -#if defined (__CYGWIN__) || defined (__MINGW32__) -# if !defined (_STLP_USE_STATIC_LIB) -# define _STLP_USE_DECLSPEC 1 -# if !defined (_STLP_USE_DYNAMIC_LIB) -# define _STLP_USE_DYNAMIC_LIB -# endif -# define _STLP_EXPORT_DECLSPEC __declspec(dllexport) -# define _STLP_CLASS_EXPORT_DECLSPEC __declspec(dllexport) -# define _STLP_CLASS_IMPORT_DECLSPEC __declspec(dllimport) -# endif -/* The following is defined independently of _STLP_USE_STATIC_LIB because it is also - * used to import symbols from PSDK under MinGW - */ -# define _STLP_IMPORT_DECLSPEC __declspec(dllimport) -#endif - -#if defined (__CYGWIN__) || defined (__MINGW32__) || !(defined (_STLP_USE_GLIBC) || defined (__sun) || defined(__APPLE__)) -# if !defined (__MINGW32__) && !defined (__CYGWIN__) -# define _STLP_NO_NATIVE_MBSTATE_T 1 -# endif -# if !defined (__MINGW32__) || (__GNUC__ < 3) || (__GNUC__ == 3) && (__GNUC_MINOR__ < 4) -# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 -# endif -# define _STLP_NO_NATIVE_WIDE_STREAMS 1 -#endif - -#define _STLP_NORETURN_FUNCTION __attribute__((noreturn)) - -/* Mac OS X is a little different with namespaces and cannot instantiate - * static data members in template classes */ -#if defined (__APPLE__) -# if ((__GNUC__ < 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ < 3))) -/* Mac OS X is missing a required typedef and standard macro */ -typedef unsigned int wint_t; -# endif - -# define __unix - -# if (__GNUC__ < 3) - - /* Mac OS X needs one and only one source file to initialize all static data - * members in template classes. Only one source file in an executable or - * library can declare instances for such data members, otherwise duplicate - * symbols will be generated. */ - -# define _STLP_NO_STATIC_TEMPLATE_DATA -# define _STLP_STATIC_CONST_INIT_BUG 1 -# define _STLP_STATIC_TEMPLATE_DATA 0 -# define _STLP_WEAK_ATTRIBUTE 1 - /* Workaround for the broken Mac OS X C++ preprocessor which cannot handle - * parameterized macros in #include statements */ -# define _STLP_NATIVE_HEADER(header) <../g++/##header##> -# define _STLP_NATIVE_C_HEADER(header) <../include/##header##> -# define _STLP_NATIVE_CPP_C_HEADER(header) <../g++/##header##> -# define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../g++/##header##> -# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../g++/##header##> -# endif /* __GNUC__ < 3 */ - -# define _STLP_NO_LONG_DOUBLE - -/* Mac OS X needs all "::" scope references to be "std::" */ -# define _STLP_USE_NEW_C_HEADERS - -# define _STLP_NO_VENDOR_STDLIB_L - -#endif /* __APPLE__ */ - - -#if defined(__BEOS__) && defined(__INTEL__) -# define _STLP_NATIVE_HEADER(header) <../stlport/beos/##header##> -# define _STLP_NATIVE_C_HEADER(header) <../stlport/beos/##header##> -# define _STLP_NATIVE_CPP_C_HEADER(header) <../stlport/beos/##header##> -# define _STLP_NATIVE_OLD_STREAMS_HEADER(header) <../stlport/beos/##header##> -# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../stlport/beos/##header##> -# define _STLP_NO_NATIVE_WIDE_FUNCTIONS 1 -# define _STLP_NO_NATIVE_WIDE_STREAMS 1 -/* -# define _NOTHREADS 1 -*/ -# ifdef _PTHREADS -# undef _PTHREADS -# endif -# ifdef _STLP_PTHREADS -# undef _STLP_PTHREADS -# endif -# define _STLP_USE_STDIO_IO 1 -# define _STLP_USE_GLIBC 1 -#endif - -/* g++ 2.7.x and above */ -#define _STLP_LONG_LONG long long - -#ifdef _STLP_USE_UCLIBC -/* -# ifndef __DO_C99_MATH__ -*/ - /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */ -# define _STLP_NO_VENDOR_MATH_F - /* No *l math fuctions variants (i.e. sqrtl, fabsl, etc.) */ -# define _STLP_NO_VENDOR_MATH_L -# define _STLP_NO_LONG_DOUBLE -/* -# endif -*/ -#endif - -#if defined (__OpenBSD__) || defined (__FreeBSD__) -# define _STLP_NO_VENDOR_MATH_L -# define _STLP_NO_VENDOR_STDLIB_L /* no llabs */ -# ifndef __unix -# define __unix -# endif -#endif - -#if defined (__alpha__) -# define _STLP_NO_VENDOR_MATH_L -# define _STLP_NO_IEC559_SUPPORT -#endif - -#if defined (__hpux) -# define _STLP_NO_VENDOR_STDLIB_L /* no llabs */ - /* No *f math fuctions variants (i.e. sqrtf, fabsf, etc.) */ -# define _STLP_NO_VENDOR_MATH_F -#endif - -#if (__GNUC__ >= 3) -# ifndef _STLP_HAS_NO_NEW_C_HEADERS -/* -# ifndef _STLP_USE_UCLIBC -*/ -# define _STLP_HAS_NATIVE_FLOAT_ABS -/* -# endif -*/ -# else -# ifdef _STLP_USE_GLIBC -# define _STLP_VENDOR_LONG_DOUBLE_MATH 1 -# endif -# endif -#endif - -#if (__GNUC__ < 3) -# define _STLP_HAS_NO_NEW_C_HEADERS 1 -# define _STLP_VENDOR_GLOBAL_CSTD 1 -# define _STLP_DONT_USE_PTHREAD_SPINLOCK 1 -# ifndef __HONOR_STD -# define _STLP_VENDOR_GLOBAL_EXCEPT_STD 1 -# endif -/* egcs fails to initialize builtin types in expr. like this : new(p) char(); */ -# define _STLP_DEF_CONST_PLCT_NEW_BUG 1 -#endif - -/* -#define _STLP_VENDOR_GLOBAL_CSTD 1 -*/ - -#if (__GNUC__ == 2) && (__GNUC_MINOR__ < 95) -# define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT -# define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT -# define _STLP_DEF_CONST_DEF_PARAM_BUG 1 -#else -# undef _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT -# undef _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT -#endif - -#if (__GNUC_MINOR__ < 9) && (__GNUC__ < 3) /* gcc 2.8 */ -# define _STLP_NO_TEMPLATE_CONVERSIONS -# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 -# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 -# define _STLP_NO_FRIEND_TEMPLATES 1 -# define _STLP_HAS_NO_NAMESPACES 1 -# define _STLP_NO_METHOD_SPECIALIZATION 1 -# define _STLP_NO_MEMBER_TEMPLATES 1 -# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 -# define _STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS -/* DJGPP doesn't seem to implement it in 2.8.x */ -# ifdef DJGPP -# define _STLP_NO_STATIC_TEMPLATE_DATA 1 -# endif -#endif - -#if __GNUC__ <= 2 && __GNUC_MINOR__ <= 7 && !defined (__CYGWIN32__) -/* Will it work with 2.6 ? I doubt it. */ -# if ( __GNUC_MINOR__ < 6 ) -__GIVE_UP_WITH_STL(GCC_272); -# endif - -# define _STLP_NO_RELOPS_NAMESPACE -# define _STLP_NON_TYPE_TMPL_PARAM_BUG -# define _STLP_LIMITED_DEFAULT_TEMPLATES 1 -# define _STLP_DEFAULT_TYPE_PARAM 1 -# define _STLP_NO_BAD_ALLOC -# define _STLP_NO_ARROW_OPERATOR 1 -# ifndef _STLP_NO_STATIC_TEMPLATE_DATA -# define _STLP_NO_STATIC_TEMPLATE_DATA -# endif -# define _STLP_STATIC_CONST_INIT_BUG 1 -# define _STLP_NO_METHOD_SPECIALIZATION 1 - -# if !defined (__CYGWIN32__) -# define _STLP_NESTED_TYPE_PARAM_BUG 1 -# define _STLP_BASE_MATCH_BUG 1 -/* unused operators are required (forward) */ -# define _STLP_CONST_CONSTRUCTOR_BUG -# define _STLP_NO_DEFAULT_NON_TYPE_PARAM -# endif -# define _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX 1 -# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 -# define _STLP_NO_EXCEPTION_HEADER 1 -#else /* ! <= 2.7.* */ -#endif /* ! <= 2.7.* */ - -/* static template data members workaround strategy for gcc tries - * to use weak symbols. - * if you don't want to use that, #define _STLP_WEAK_ATTRIBUTE=0 ( you'll - * have to put "#define __PUT_STATIC_DATA_MEMBERS_HERE" line in one of your - * compilation unit ( or CFLAGS for it ) _before_ including any STL header ). - */ -#if defined (_STLP_NO_STATIC_TEMPLATE_DATA) && ! defined (_STLP_WEAK_ATTRIBUTE ) -/* systems using GNU ld or format that supports weak symbols - may use "weak" attribute - Linux & Solaris ( x86 & SPARC ) are being auto-recognized here */ -# if defined(_STLP_GNU_LD) || defined(__ELF__) || defined (__CYGWIN__) || \ - (( defined (__SVR4) || defined ( __svr4__ )) && \ - ( defined (sun) || defined ( __sun__ ))) -# define _STLP_WEAK_ATTRIBUTE 1 -# endif -#endif /* _STLP_WEAK_ATTRIBUTE */ - - -/* strict ANSI prohibits "long long" ( gcc) */ -#if defined ( __STRICT_ANSI__ ) -# undef _STLP_LONG_LONG -/* -# define _STLP_STRICT_ANSI 1 -*/ -#endif - -/* -#if !defined (__STRICT_ANSI__) || defined (__BUILDING_STLPORT) -# define _STLP_USE_TEMPLATE_EXPORT -# define _STLP_EXPORT_TEMPLATE_KEYWORD extern -# define _STLP_IMPORT_TEMPLATE_KEYWORD extern -#endif -*/ - -#ifndef __EXCEPTIONS -# undef _STLP_DONT_USE_EXCEPTIONS -# define _STLP_DONT_USE_EXCEPTIONS 1 -#endif - -#if (__GNUC__ >= 3) - -# if !defined (_STLP_NATIVE_INCLUDE_PATH) -# if ( (__GNUC__ == 3 ) && ((__GNUC_MINOR__ == 0) || ((__GNUC_MINOR__ < 3) && defined(__APPLE_CC__)))) -# define _STLP_NATIVE_INCLUDE_PATH ../g++-v3 -# else -# if ( ((__GNUC__ == 4 ) || (__GNUC_MINOR__ >= 3)) && defined(__APPLE_CC__)) -# define _STLP_NATIVE_INCLUDE_PATH ../c++ -/* -* Before version 3.4.0 the 0 patch level was not part of the include path: -*/ -# elif defined (__GNUC_PATCHLEVEL__) && ((__GNUC_PATCHLEVEL__ > 0) || \ - (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || \ - (__GNUC__ > 3)) -# define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__.__GNUC_PATCHLEVEL__ -# else -# define _STLP_NATIVE_INCLUDE_PATH ../__GNUC__.__GNUC_MINOR__ -# endif -# endif -# endif - -/* Instantiation scheme that used (default) in gcc 3 made void of sense explicit - instantiation within library: nothing except increased library size. - ptr - */ -# define _STLP_NO_FORCE_INSTANTIATE - -#elif (__GNUC_MINOR__ < 8) - -# if !defined (_STLP_NATIVE_INCLUDE_PATH) -# define _STLP_NATIVE_INCLUDE_PATH ../g++-include -# endif - -/* tuning of static template data members workaround */ -# if ( _STLP_STATIC_TEMPLATE_DATA < 1 ) -# if ( _STLP_WEAK_ATTRIBUTE > 0 ) -# define _STLP_WEAK __attribute__ (( weak )) -# else -# define _STLP_WEAK -# endif /* _STLP_WEAK_ATTRIBUTE */ - -# ifdef __PUT_STATIC_DATA_MEMBERS_HERE -# define __DECLARE_INSTANCE(type,item,init) type item _STLP_WEAK init -# else -# define __DECLARE_INSTANCE(type,item,init) -# endif /* __PUT_STATIC_DATA_MEMBERS_HERE */ -# endif /* _STLP_STATIC_TEMPLATE_DATA */ - -#else - -/* gcc-2.95.0 used to use "g++-3" directory which has been changed to "g++" in - * system-dependent "include" for 2.95.2 except for Cygwin and Mingw packages. - * I expect "g++-3" not being used in later releases. - * If your installation use "g++-3" include directory for any reason (pre-2.95.2 or Win binary kit), - * please change the macro below to point to your directory. - */ - -# if !defined (_STLP_NATIVE_INCLUDE_PATH) -# if defined(__DJGPP) -# define _STLP_NATIVE_INCLUDE_PATH ../lang/cxx -# elif (__GNUC__ >= 3) || (__GNUC_MINOR__ >= 97) -# define _STLP_NATIVE_INCLUDE_PATH ../include/g++-v3 -# elif ((__GNUC_MINOR__ >= 95 && __GNUC_MINOR__ < 97) && \ - !( defined (__FreeBSD__) || defined (__NetBSD__) || defined(__sgi) || defined (__OS2__) ) ) -# define _STLP_NATIVE_INCLUDE_PATH ../g++-3 -# elif (__GNUC_MINOR__ > 8) && (__GNUC_MINOR__ < 95) && (__GNUC__ < 3) && !defined( __Lynx__ ) -/* this really sucks, as GNUpro does not really identifies itself, so we have to guess - * depending on a platform - */ -# ifdef __hpux -# define _STLP_NATIVE_INCLUDE_PATH ../g++-3 -# else -# define _STLP_NATIVE_INCLUDE_PATH ../g++-2 -# endif -# else -# define _STLP_NATIVE_INCLUDE_PATH g++ -# endif -# endif - -/* et al */ -# ifdef __FreeBSD__ -# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 95) -# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include -# endif -# else -/* azov */ -# ifndef __Lynx__ -# if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97) -/* -# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../g++-v3 -*/ -# else -# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH ../include -# endif -# endif -# endif - -#endif /* GNUC_MINOR < 8 */ - -#if !defined (_STLP_NATIVE_C_INCLUDE_PATH) -# define _STLP_NATIVE_C_INCLUDE_PATH ../include -#endif - -/* Tune settings for the case where static template data members are not - * instaniated by default - */ -#if defined ( _STLP_NO_STATIC_TEMPLATE_DATA ) -# define _STLP_STATIC_TEMPLATE_DATA 0 -# if !defined ( _STLP_WEAK_ATTRIBUTE ) -# define _STLP_WEAK_ATTRIBUTE 0 -# endif -# ifdef __PUT_STATIC_DATA_MEMBERS_HERE -# define __DECLARE_INSTANCE(type,item,init) type item init -# else -# define __DECLARE_INSTANCE(type,item,init) -# endif -#else -# define _STLP_STATIC_TEMPLATE_DATA 1 -#endif - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/_mwerks.h --- a/epoc32/include/tools/stlport/stl/config/_mwerks.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -// STLport configuration file -// It is internal STLport header - DO NOT include it directly - -#define _STLP_COMPILER "Metrowerk Codewarrior" - -// Bring in definition of __MSL__ and related items -#include -#include - -// -// Compiler features -// - - -// *** CodeWarrior Compiler Common Features *** -# if __option(longlong) -# define _STLP_LONG_LONG long long -# endif - -# define _STLP_USE_UNIX_EMULATION_IO 1 - -# define _STLP_USE_AUTO_PTR_CONVERSIONS 1 - -# ifdef __INTEL__ -# define _STLP_LITTLE_ENDIAN -# else -# define _STLP_BIG_ENDIAN -# endif - -#if defined(_MSL_NO_LOCALE) -#define _STLP_NO_IMPORT_LOCALE -#endif -#if !__option( wchar_type ) -# define _STLP_WCHAR_T_IS_USHORT -#endif - -# if __MWERKS__ < 0x3000 -// *** CodeWarrior Compiler Common Bugs *** -# define __MSL_FIX_ITERATORS__(myType) // Some MSL headers rely on this -# define _STLP_NO_FRIEND_TEMPLATES 1 // Bug mysteriously reintroduced in this version. -# define _STLP_THROW_RETURN_BUG 1 -# endif - -// *** Version-specific settings *** - -# if __MWERKS__ >= 0x2405 -# define _STLP_HAS_NATIVE_FLOAT_ABS -# endif - -# if __MWERKS__ < 0x2405 -# define _STLP_STATIC_CONST_INIT_BUG -# endif - -# if __MWERKS__ <= 0x2303 -# define _STLP_NO_TEMPLATE_CONVERSIONS 1 -# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 -# endif - -# if __MWERKS__ < 0x2301 -# define _STLP_MEMBER_SPECIALIZATION_BUG 1 -# endif - -# if __MWERKS__ < 0x2300 // CW Pro5 features -# define _STLP_INLINE_MEMBER_TEMPLATES 1 -# define _STLP_RELOPS_IN_STD_BUG 1 -# define _STLP_DEF_CONST_PLCT_NEW_BUG 1 -# define _STLP_DEF_CONST_DEF_PARAM_BUG 1 -# define _STLP_NO_TYPENAME_ON_RETURN_TYPE -# endif - -# if __MWERKS__ < 0x2200 // CW Pro4 features -# define _STLP_BROKEN_USING_DIRECTIVE 1 -# define _STLP_NO_MEMBER_TEMPLATES 1 -# define _STLP_NO_MEMBER_TEMPLATE_CLASSES 1 -# define _STLP_NO_MEMBER_TEMPLATE_KEYWORD 1 -# define _STLP_NO_FRIEND_TEMPLATES 1 -# define _STLP_NO_QUALIFIED_FRIENDS 1 -# define _STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER 1 -# endif - -# if __MWERKS__ < 0x2100 // CW Pro3 features -# define _STLP_NO_CLASS_PARTIAL_SPECIALIZATION 1 -# define _STLP_HAS_NO_NAMESPACES 1 -# define _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS 1 - -# define _STLP_NEED_TYPENAME 1 -# define _STLP_NO_ARROW_OPERATOR 1 -# define _STLP_TEMPLATE_PARAM_SUBTYPE_BUG 1 -# define _STLP_FORCED_INLINE_INSTANTIATION_BUG 1 -# define _STLP_MULTI_CONST_TEMPLATE_ARG_BUG 1 -# define _STLP_INLINE_NAME_RESOLUTION_BUG 1 -// *** Metrowerks Standard Library Bug *** -# define _STLP_MSVC50_COMPATIBILITY 1 -# endif - -# if __MWERKS__ < 0x2000 // v. 2.0 features -# define _STLP_NO_WCHAR_T 1 -# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1 -# define _STLP_NON_TYPE_TMPL_PARAM_BUG 1 // dwa 8/21/97 - this bug fixed for CWPro2 -# endif - -# if __MWERKS__ < 0x1900 // dwa 8/19/97 - 1.9 Compiler feature defines -# define _STLP_LIMITED_DEFAULT_TEMPLATES 1 -# define _STLP_BASE_TYPEDEF_BUG 1 -# define _STLP_BASE_MATCH_BUG 1 -# define _STLP_NONTEMPL_BASE_MATCH_BUG 1 -# define _STLP_DEFAULT_TYPE_PARAM 1 // More limited template parameters - -# if __MWERKS__ < 0x1800 - __GIVE_UP_WITH_STL(CW_18) -# endif - -# endif - - -// fixes to native inclusion wrappers. -# if __MWERKS__ >= 0x2300 // CWPro5 changes paths - dwa 2/28/99 -# define _STLP_NATIVE_INCLUDE_PATH ../include -# define _STLP_NATIVE_C_INCLUDE_PATH ../include -# define _STLP_NATIVE_HEADER(header) <../include/##header> -# define _STLP_NATIVE_CPP_C_HEADER(header) <../include/##header> -# define _STLP_NATIVE_C_HEADER(header) <../include/##header> -# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) <../include/##header> -# else - -# define _STLP_NATIVE_INCLUDE_PATH Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C++:Include -# define _STLP_NATIVE_C_INCLUDE_PATH Macintosh HD:Codewarrior Pro 4:Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:MSL Common:Public Includes -# define _STLP_NATIVE_HEADER(header) -# define _STLP_NATIVE_CPP_C_HEADER(header) -# define _STLP_NATIVE_C_HEADER(header) -# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) - -# endif - -//Following block come from boost intrinsics.hpp file: -#if defined (__MSL_CPP__) && (__MSL_CPP__ >= 0x8000) - // Metrowerks compiler is acquiring intrinsic type traits support - // post version 8. We hook into the published interface to pick up - // user defined specializations as well as compiler intrinsics as - // and when they become available: -# include -# define _STLP_HAS_TRIVIAL_CONSTRUCTOR(T) Metrowerks::has_trivial_default_ctor::value -# define _STLP_HAS_TRIVIAL_COPY(T) Metrowerks::has_trivial_copy_ctor::value -# define _STLP_HAS_TRIVIAL_ASSIGN(T) Metrowerks::has_trivial_assignment::value -# define _STLP_HAS_TRIVIAL_DESTRUCTOR(T) Metrowerks::has_trivial_dtor::value -# define _STLP_IS_POD(T) Metrowerks::is_POD::value -# define _STLP_HAS_TYPE_TRAITS_INTRINSICS -#endif - -// fbp -# if !defined( __MSL_CPP__ ) || __MSL_CPP__ <= 0x4105 -# define _STLP_NO_NATIVE_WIDE_STREAMS 1 -# endif - -# if defined(__MACH__) -# define _STLP_MAC -# define O_BINARY 0 -# elif defined(macintosh) -# define _NOTHREADS -# endif -# define _STLP_DLLEXPORT_NEEDS_PREDECLARATION 1 diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/_native_headers.h --- a/epoc32/include/tools/stlport/stl/config/_native_headers.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ - /* - * - * Copyright (c) 2006 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#if !defined (_STLP_MAKE_HEADER) -# define _STLP_MAKE_HEADER(path, header) -#endif - -#if !defined (_STLP_NATIVE_HEADER) -# if !defined (_STLP_NATIVE_INCLUDE_PATH) -# define _STLP_NATIVE_INCLUDE_PATH ../include -# endif -# define _STLP_NATIVE_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_INCLUDE_PATH,header) -#endif - -/* For some compilers, C headers like are located in separate directory */ -#if !defined (_STLP_NATIVE_C_HEADER) -# if !defined (_STLP_NATIVE_C_INCLUDE_PATH) -# define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH -# endif -# define _STLP_NATIVE_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_C_INCLUDE_PATH,header) -#endif - -/* For some compilers, C-library headers like are located in separate directory */ -#if !defined (_STLP_NATIVE_CPP_C_HEADER) -# if !defined (_STLP_NATIVE_CPP_C_INCLUDE_PATH) -# define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH -# endif -# define _STLP_NATIVE_CPP_C_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_C_INCLUDE_PATH,header) -#endif - -/* Some compilers locate basic C++ runtime support headers (, , ) in separate directory */ -#if !defined ( _STLP_NATIVE_CPP_RUNTIME_HEADER ) -# if !defined (_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH) -# define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH -# endif -# define _STLP_NATIVE_CPP_RUNTIME_HEADER(header) _STLP_MAKE_HEADER(_STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH,header) -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/_system.h --- a/epoc32/include/tools/stlport/stl/config/_system.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,179 +0,0 @@ -/* - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* - * Purpose of this file : - * - * To hold COMPILER-SPECIFIC portion of STLport settings. - * In general, user should not edit this file unless - * using the compiler not recognized below. - * - * If your compiler is not being recognized yet, - * please look for definitions of macros in stl_mycomp.h, - * copy stl_mycomp.h to stl_YOUR_COMPILER_NAME, - * adjust flags for your compiler, and add - * to the secton controlled by unique macro defined internaly by your compiler. - * - * To change user-definable settings, please edit - * - */ - -#ifndef __stl_config__system_h -#define __stl_config__system_h - -#if defined (__sun) -# include -# if defined (__GNUC__) -# include -# elif defined (__SUNPRO_CC) -# include -/* -# ifdef __KCC -# include -# endif -*/ -# elif defined (__APOGEE__) /* Apogee 4.x */ -# include -# elif defined (__FCC_VERSION) /* Fujitsu Compiler, v4.0 assumed */ -# include -# endif -#elif defined (__hpux) -# include -# if defined (__GNUC__) -# include -# elif defined (__HP_aCC) -# include -# endif -#elif defined (linux) || defined (__linux__) -# include -/* Intel's icc define __GNUC__! */ -# if defined (__INTEL_COMPILER) -# include -# elif defined (__GNUC__) -# include -# endif -/* -# ifdef __KCC -# include -# endif -*/ -#elif defined (__FreeBSD__) -# include -# if defined (__GNUC__) -# include -# endif -#elif defined (__OpenBSD__) -# include -# if defined (__GNUC__) -# include -# endif -#elif defined (N_PLAT_NLM) /* Novell NetWare */ -# include -# ifdef __MWERKS__ /* Metrowerks CodeWarrior */ -# include -# endif -#elif defined (__sgi) /* IRIX? */ -# define _STLP_PLATFORM "SGI Irix" -# if defined (__GNUC__) -# include -# else -# include -# endif -#elif defined (__OS400__) /* AS/400 C++ */ -# define _STLP_PLATFORM "OS 400" -# if defined (__GNUC__) -# include -# else -# include -# endif -#elif defined (_AIX) -# include -# if defined (__xlC__) || defined (__IBMC__) || defined ( __IBMCPP__ ) - /* AIX xlC, Visual Age C++ , OS-390 C++ */ -# include -# endif -#elif defined (_CRAY) /* Cray C++ 3.4 or 3.5 */ -# define _STLP_PLATFORM "Cray" -# include -#elif defined (__DECCXX) || defined (__DECC) -# define _STLP_PLATFORM "DECC" -# ifdef __vms -# include -# else -# include -# endif -#elif defined (macintosh) || defined (_MAC) -# include -# if defined (__MWERKS__) -# include -# elif defined (__MRC__) || (defined (__SC__) && (__SC__ >= 0x882)) - /* Apple MPW SCpp 8.8.2, Apple MPW MrCpp 4.1.0 */ -# include -# endif -#elif defined (__APPLE__) -# include -# ifdef __GNUC__ -# include -# endif -#elif defined (__CYGWIN__) -# include -# if defined (__GNUC__) -# include -# endif -#elif defined (__MINGW32__) -# define _STLP_PLATFORM "MinGW" -# if defined (__GNUC__) -# include -# endif -# include -#elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__) || \ - defined (__WIN16) || defined (WIN16) || defined (_WIN16) -# if defined ( __BORLANDC__ ) /* Borland C++ ( 4.x - 5.x ) */ -# include -# elif defined (__WATCOM_CPLUSPLUS__) || defined (__WATCOMC__) /* Watcom C++ */ -# include -# elif defined (__COMO__) || defined (__COMO_VERSION_) -# include -# elif defined (__DMC__) /* Digital Mars C++ */ -# include -# elif defined (__SC__) && (__SC__ < 0x800) /* Symantec 7.5 */ -# include -# elif defined (__ICL) /* Intel reference compiler for Win */ -# include -# elif defined (__MWERKS__) -# include -# elif defined (_MSC_VER) && (_MSC_VER >= 1200) && defined (UNDER_CE) - /* Microsoft eMbedded Visual C++ 3.0, 4.0 (.NET) */ -# include -# elif defined (_MSC_VER) - /* Microsoft Visual C++ 6.0, 7.0, 7.1, 8.0 */ -# include -# endif - -# include -#else -# error Unknown platform !! -#endif - -#if !defined (_STLP_COMPILER) -/* Unable to identify the compiler, issue error diagnostic. - * Edit to set STLport up for your compiler. */ -# include -#endif - -#endif /* __stl_config__system_h */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/_windows.h --- a/epoc32/include/tools/stlport/stl/config/_windows.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,209 +0,0 @@ -/* - * Copyright (c) 1997-1999 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * Copyright (c) 2003 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ -#ifndef _STLP_INTERNAL_WINDOWS_H -#define _STLP_INTERNAL_WINDOWS_H - -#if !defined (_STLP_PLATFORM) -# define _STLP_PLATFORM "Windows" -#endif - -#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN) -# if defined (_MIPSEB) -# define _STLP_BIG_ENDIAN 1 -# endif -# if defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \ - defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \ - defined (__alpha__) -# define _STLP_LITTLE_ENDIAN 1 -# endif -# if defined (__ia64__) - /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */ -# if defined (__BIG_ENDIAN__) -# define _STLP_BIG_ENDIAN 1 -# else -# define _STLP_LITTLE_ENDIAN 1 -# endif -# endif -#endif /* _STLP_BIG_ENDIAN */ - -#if !defined (_STLP_WINDOWS_H_INCLUDED) -# define _STLP_WINDOWS_H_INCLUDED -# if !(defined ( _STLP_MSVC ) || defined (__BORLANDC__) || defined (__ICL) || defined (__WATCOMC__) || \ - defined (__MINGW32__) || defined (__DMC__)) -# if defined (_STLP_USE_MFC) -# include -# else -# include -# endif -# else -/* This section serves as a replacement for windows.h header for Visual C++ */ -# if defined (__cplusplus) -extern "C" { -# endif -# if (defined (_M_AMD64) || defined (_M_IA64) || (!defined (_STLP_WCE) && defined (_M_MRX000)) || defined (_M_ALPHA) || \ - (defined (_M_PPC) && (_STLP_MSVC_LIB >= 1000))) && !defined (RC_INVOKED) -# define InterlockedIncrement _InterlockedIncrement -# define InterlockedDecrement _InterlockedDecrement -# define InterlockedExchange _InterlockedExchange -/* Here we use a different macro name than the InterlockedExchangePointer SDK function - * to avoid macro definition conflict as the SDK might already define InterlockedExchangePointer - * as a macro. - */ -# define STLPInterlockedExchangePointer _InterlockedExchangePointer -# define _STLP_STDCALL -# else -# if defined (_MAC) -# define _STLP_STDCALL _cdecl -# else -# define _STLP_STDCALL __stdcall -# endif -# endif - -# if defined (_STLP_NEW_PLATFORM_SDK) -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long volatile *); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long volatile *); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long volatile *, long); -# if defined (STLPInterlockedExchangePointer) -_STLP_IMPORT_DECLSPEC void* _STLP_STDCALL STLPInterlockedExchangePointer(void* volatile *, void*); -# endif -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchangeAdd(long volatile *, long); -# elif defined (_STLP_WCE) - -/* start of eMbedded Visual C++ specific section */ -# include /* needed for basic windows types */ - - /** in SDKs generated with PB5, windef.h somehow includes headers which then - define setjmp. */ -# if (_WIN32_WCE >= 0x500) -# define _STLP_NATIVE_SETJMP_H_INCLUDED -# endif - -# ifndef _WINBASE_ /* winbase.h already included? */ -long WINAPI InterlockedIncrement(long*); -long WINAPI InterlockedDecrement(long*); -long WINAPI InterlockedExchange(long*, long); -# endif - -# ifndef __WINDOWS__ /* windows.h already included? */ - -# if defined (x86) -# include /* needed for inline versions of Interlocked* functions */ -# endif - -# ifndef _MFC_VER - -# define MessageBox MessageBoxW -int WINAPI MessageBoxW(HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType); - -# define wvsprintf wvsprintfW -int WINAPI wvsprintfW(LPWSTR, LPCWSTR, va_list ArgList); - -void WINAPI ExitThread(DWORD dwExitCode); - -# if !defined (COREDLL) -# define _STLP_WCE_WINBASEAPI DECLSPEC_IMPORT -# else -# define _STLP_WCE_WINBASEAPI -# endif - -_STLP_WCE_WINBASEAPI int WINAPI -MultiByteToWideChar(UINT CodePage, DWORD dwFlags, LPCSTR lpMultiByteStr, - int cbMultiByte, LPWSTR lpWideCharStr, int cchWideChar); - -_STLP_WCE_WINBASEAPI UINT WINAPI GetACP(); - -_STLP_WCE_WINBASEAPI BOOL WINAPI TerminateProcess(HANDLE hProcess, DWORD uExitCode); - -# define OutputDebugString OutputDebugStringW -void WINAPI OutputDebugStringW(LPCWSTR); - -_STLP_WCE_WINBASEAPI void WINAPI Sleep(DWORD); - -# undef _STLP_WCE_WINBASEAPI - -# endif /* !_MFC_VER */ - -# endif /* !__WINDOWS__ */ - -/* end of eMbedded Visual C++ specific section */ - -# else -/* boris : for the latest SDK, you may actually need the other version of the declaration (above) - * even for earlier VC++ versions. There is no way to tell SDK versions apart, sorry ... - */ -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedIncrement(long*); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedDecrement(long*); -_STLP_IMPORT_DECLSPEC long _STLP_STDCALL InterlockedExchange(long*, long); -# endif - -# if !defined (STLPInterlockedExchangePointer) -/* This API function do not exist in the old platform SDK and is equivalent to - * InterlockedExchange on 32 bits platform: - */ -# if defined (__cplusplus) -/* We do not define this function if we are not in a C++ translation unit just - * because of the inline portability issue it would introduce. We will have to - * fix it the day we need this function for a C translation unit. - */ -inline -void* _STLP_CALL STLPInterlockedExchangePointer(void* volatile* __a, void* __b) { -# if defined (_STLP_MSVC) -/* Here MSVC produces warning if 64 bits portability issue is activated. - * MSVC do not see that _STLP_ATOMIC_EXCHANGE_PTR is a macro which content - * is based on the platform, Win32 or Win64 - */ -# pragma warning (push) -# pragma warning (disable : 4311) // pointer truncation from void* to long -# pragma warning (disable : 4312) // conversion from long to void* of greater size -# endif -# if !defined (_STLP_NO_NEW_STYLE_CASTS) - return reinterpret_cast(InterlockedExchange(reinterpret_cast(const_cast(__a)), - reinterpret_cast(__b))); -# else - return (void*)InterlockedExchange((long*)__a, (long)__b); -# endif -# if defined (_STLP_MSVC) -# pragma warning (pop) -# endif -} -# endif -# endif - -# if !defined (_STLP_WCE) -_STLP_IMPORT_DECLSPEC void _STLP_STDCALL Sleep(unsigned long); -_STLP_IMPORT_DECLSPEC void _STLP_STDCALL OutputDebugStringA(const char* lpOutputString); -# endif - -# if defined (InterlockedIncrement) -# pragma intrinsic(_InterlockedIncrement) -# pragma intrinsic(_InterlockedDecrement) -# pragma intrinsic(_InterlockedExchange) -# pragma intrinsic(_InterlockedExchangePointer) -# endif -# if defined (__cplusplus) -} /* extern "C" */ -# endif - -# endif /* STL_MSVC __BORLANDC__ __ICL __WATCOMC__ __MINGW32__ __DMC__*/ - -#endif /* _STLP_WINDOWS_H_INCLUDED */ - -#endif /* _STLP_INTERNAL_WINDOWS_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/compat.h --- a/epoc32/include/tools/stlport/stl/config/compat.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ - -/* - * Compatibility section - * This section sets new-style macros based on old-style ones, for compatibility - */ - -#if defined (__STL_DEBUG) && !defined (_STLP_DEBUG) -# define _STLP_DEBUG __STL_DEBUG -#endif -#if defined (__STL_NO_ANACHRONISMS) && !defined (_STLP_NO_ANACHRONISMS) -# define _STLP_NO_ANACHRONISMS __STL_NO_ANACHRONISMS -#endif -#if defined (__STL_NO_EXTENSIONS) && !defined (_STLP_NO_EXTENSIONS) -# define _STLP_NO_EXTENSIONS __STL_NO_EXTENSIONS -#endif -#if defined (__STL_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) -# define _STLP_NO_EXCEPTIONS __STL_NO_EXCEPTIONS -#endif -#if defined (__STL_NO_NAMESPACES) && !defined (_STLP_NO_NAMESPACES) -# define _STLP_NO_NAMESPACES __STL_NO_NAMESPACES -#endif -#if defined (__STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS) && !defined (_STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS) -# define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS __STL_MINIMUM_DEFAULT_TEMPLATE_PARAMS -#endif -#if defined (__STL_NO_OWN_NAMESPACE) && !defined (_STLP_NO_OWN_NAMESPACE) -# define _STLP_NO_OWN_NAMESPACE __STL_NO_OWN_NAMESPACE -#endif - -#if defined (__STL_NO_RELOPS_NAMESPACE) && !defined (_STLP_NO_RELOPS_NAMESPACE) -# define _STLP_NO_RELOPS_NAMESPACE __STL_NO_RELOPS_NAMESPACE -#endif - -#if defined (__STL_DEBUG_UNINITIALIZED) && !defined (_STLP_DEBUG_UNINITIALIZED) -# define _STLP_DEBUG_UNINITIALIZED __STL_DEBUG_UNINITIALIZED -#endif -#if defined (__STL_SHRED_BYTE) && !defined (_STLP_SHRED_BYTE) -# define _STLP_SHRED_BYTE __STL_SHRED_BYTE -#endif -#if defined (__STL_USE_MFC) && !defined (_STLP_USE_MFC) -# define _STLP_USE_MFC __STL_USE_MFC -#endif - -#if defined (__STL_USE_NEWALLOC) && !defined (_STLP_USE_NEWALLOC) -# define _STLP_USE_NEWALLOC __STL_USE_NEWALLOC -#endif -#if defined (__STL_USE_MALLOC) && !defined (_STLP_USE_MALLOC) -# define _STLP_USE_MALLOC __STL_USE_MALLOC -#endif - -#if defined (__STL_DEBUG_ALLOC) && !defined (_STLP_DEBUG_ALLOC) -# define _STLP_DEBUG_ALLOC __STL_DEBUG_ALLOC -#endif - -#if defined (__STL_DEBUG_MESSAGE) && !defined (_STLP_DEBUG_MESSAGE) -# define _STLP_DEBUG_MESSAGE __STL_DEBUG_MESSAGE -#endif - -#if defined (__STL_DEBUG_TERMINATE) && !defined (_STLP_DEBUG_TERMINATE) -# define _STLP_DEBUG_TERMINATE __STL_DEBUG_TERMINATE -#endif - -#if defined (__STL_USE_ABBREVS) && !defined (_STLP_USE_ABBREVS) -# define _STLP_USE_ABBREVS __STL_USE_ABBREVS -#endif - -#if defined (__STL_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_NO_MSVC50_COMPATIBILITY) -# define _STLP_NO_MSVC50_COMPATIBILITY __STL_NO_MSVC50_COMPATIBILITY -#endif - -#if defined (__STL_USE_RAW_SGI_ALLOCATORS) && !defined (_STLP_USE_RAW_SGI_ALLOCATORS) -# define _STLP_USE_RAW_SGI_ALLOCATORS __STL_USE_RAW_SGI_ALLOCATORS -#endif - -/* STLport do not support anymore the iostream wrapper mode so this macro should - * always been define for other libraries that was using it: - */ -#if !defined (_STLP_OWN_IOSTREAMS) -# define _STLP_OWN_IOSTREAMS -#endif - -#if defined (_STLP_NO_OWN_IOSTREAMS) -# error STLport do not support anymore the wrapper mode. If you want to use STLport \ -use its iostreams implementation or no iostreams at all. -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/features.h --- a/epoc32/include/tools/stlport/stl/config/features.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1194 +0,0 @@ - /* - * - * Copyright (c) 1994 - * Hewlett-Packard Company - * - * Copyright (c) 1996,1997 - * Silicon Graphics Computer Systems, Inc. - * - * Copyright (c) 1997 - * Moscow Center for SPARC Technology - * - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_FEATURES_H -#define _STLP_FEATURES_H - -/* - * Purpose of this file: - * - * Defines all STLport settings. - * This file is actually a wrapper : it includes compiler-specific - * settings from - * and user-defined settings from . - * See and for the description - * of those macros - * - */ - -/* Definition of the STLport version informations */ -#include - -/* Other macros defined by this file: - - * bool, true, and false, if _STLP_NO_BOOL is defined. - * typename, as a null macro if it's not already a keyword. - * explicit, as a null macro if it's not already a keyword. - * namespace-related macros (_STLP_STD, _STLP_BEGIN_NAMESPACE, etc.) - * exception-related macros (_STLP_TRY, _STLP_UNWIND, etc.) - * _STLP_ASSERT, either as a test or as a null macro, depending on - whether or not _STLP_ASSERTIONS is defined. -*/ - -/* Definition of the 2 STLport debug levels */ -#define _STLP_STLPORT_DBG_LEVEL 1 -#define _STLP_STANDARD_DBG_LEVEL 2 - -/* Placeholder for user to override settings. - * It could be also used to mask settings from - * different directories. - */ -#include - -#if defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_LEVEL) -# define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL -#endif - -#if defined (__BUILDING_STLPORT) -/* For the STLport implementation we can use everything: - */ -# if defined (_STLP_NO_ANACHRONISMS) -# undef _STLP_NO_ANACHRONISMS -# endif -# if defined (_STLP_NO_EXTENSIONS) -# undef _STLP_NO_EXTENSIONS -# endif -/* Moreover there are things that has no sens: - */ -# if defined (_STLP_NO_IOSTREAMS) -# error If you do not use iostreams you do not need to build the STLport library. -# endif -#endif - -/* ========================================================= */ -/* This file is used for compatibility; it accepts old-style config - switches */ -#include - -/* Common configuration file for this particular installation. */ -#include - -/* Operational Environment specific */ -#include - -/* ========================================================= */ - -/* some fixes to configuration. This also includes modifications - * of STLport switches depending on compiler flags, - * or settings applicable to a group of compilers, such as - * to all who use EDG front-end. - */ -#include - -#ifdef _STLP_USE_BOOST_SUPPORT -/* We are going to use the boost library support. To limit the problem - * of self referencing headers we have to specify clearly to the boost - * library that the Standard lib is STLport: - */ -# ifndef BOOST_STDLIB_CONFIG -# define BOOST_STDLIB_CONFIG -# endif -#endif - - -/* - * Performs integrity check on user-specified parameters - * and site-specific settings. - */ -/* -# include -*/ - -/* SGI terms */ - -#if !defined (_STLP_NO_MEMBER_TEMPLATES) && !defined (_STLP_MEMBER_TEMPLATES) -# define _STLP_MEMBER_TEMPLATES 1 -#endif - -#if !defined (_STLP_NO_FRIEND_TEMPLATES) && !defined (_STLP_FRIEND_TEMPLATES) -# define _STLP_FRIEND_TEMPLATES 1 -#endif - -#if !defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_MEMBER_TEMPLATE_CLASSES) -# define _STLP_MEMBER_TEMPLATE_CLASSES 1 -#endif - -#if defined (_STLP_NO_MEMBER_TEMPLATE_CLASSES) && !defined (_STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE) -# define _STLP_DONT_SUPPORT_REBIND_MEMBER_TEMPLATE 1 -#endif - -#if !defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -# define _STLP_CLASS_PARTIAL_SPECIALIZATION 1 -#endif - -#if !defined (_STLP_FUNCTION_TMPL_PARTIAL_ORDER) && !defined (_STLP_NO_FUNCTION_TMPL_PARTIAL_ORDER) -# define _STLP_FUNCTION_TMPL_PARTIAL_ORDER 1 -#endif - -#if !defined (_STLP_DONT_USE_SHORT_STRING_OPTIM) && !defined (_STLP_USE_SHORT_STRING_OPTIM) -# define _STLP_USE_SHORT_STRING_OPTIM 1 -#endif - -#if defined (_STLP_MEMBER_TEMPLATES) && !defined (_STLP_NO_EXTENSIONS) && \ - !defined (_STLP_NO_CONTAINERS_EXTENSION) && !defined (_STLP_USE_CONTAINERS_EXTENSION) -# define _STLP_USE_CONTAINERS_EXTENSION -#endif - -#if defined (_STLP_USE_CONTAINERS_EXTENSION) -# define _STLP_TEMPLATE_FOR_CONT_EXT template -#else -# define _STLP_TEMPLATE_FOR_CONT_EXT -#endif - -#if defined (_STLP_USE_PTR_SPECIALIZATIONS) && \ - (defined (_STLP_NO_CLASS_PARTIAL_SPECIALIZATION) && defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)) -# error "Sorry but according the STLport settings your compiler can not support the pointer specialization feature." -#endif - -#if defined (_STLP_NO_IOSTREAMS) && \ - !defined (_STLP_USE_NEWALLOC) && !defined (_STLP_USE_MALLOC) -# define _STLP_USE_NEWALLOC -#endif - -#if !defined (_STLP_BIG_ENDIAN) && !defined (_STLP_LITTLE_ENDIAN) -# if defined (_MIPSEB) || defined (__sparc) || defined (_AIX) || \ - defined (__hpux) || defined (macintosh) || defined (_MAC) -# define _STLP_BIG_ENDIAN 1 -# elif defined (__i386) || defined (_M_IX86) || defined (_M_ARM) || \ - defined (__amd64__) || defined (_M_AMD64) || defined (__x86_64__) || \ - defined (__alpha__) -# define _STLP_LITTLE_ENDIAN 1 -# elif defined (__ia64__) - /* itanium allows both settings (for instance via gcc -mbig-endian) - hence a seperate check is required */ -# if defined (__BIG_ENDIAN__) -# define _STLP_BIG_ENDIAN 1 -# else -# define _STLP_LITTLE_ENDIAN 1 -# endif -# else -# error "can't determine endianess" -# endif -#endif /* _STLP_BIG_ENDIAN */ - -/* ========================================================== - * final workaround tuning based on given flags - * ========================================================== */ - -#ifndef _STLP_UINT32_T -# define _STLP_UINT32_T unsigned long -#endif -#ifndef _STLP_ABORT -# define _STLP_ABORT() abort() -#endif - -#if !defined (_STLP_HAS_NO_NAMESPACES) -# if defined _STLP_NO_NAMESPACES -# undef _STLP_USE_NAMESPACES -# else -/* assume it as the default, turn it off later if NO_NAMESPACES selected */ -# undef _STLP_USE_NAMESPACES -# define _STLP_USE_NAMESPACES 1 -# endif -#endif - -#if defined (_STLP_NO_IOSTREAMS) -# define _STLP_USE_NO_IOSTREAMS -#endif - -/* Operating system recognition (basic) */ -#if defined (__unix) || defined (__linux__) || defined (__QNX__) || defined (_AIX) || defined (__NetBSD__) || defined(__OpenBSD__) || defined (__Lynx__) -# define _STLP_UNIX 1 -#elif defined(macintosh) || defined (_MAC) -# define _STLP_MAC 1 -#elif defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__) -# define _STLP_WIN32 1 -#elif defined (__WIN16) || defined (WIN16) || defined (_WIN16) -# define _STLP_WIN16 -#endif /* __unix */ - -#if defined (_STLP_WIN16) -# define _STLP_LDOUBLE_80 -#elif defined(_STLP_WIN32) -# if defined (_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__) || defined (__CYGWIN__) -# define _STLP_LDOUBLE_64 -# else -# define _STLP_LDOUBLE_96 -# endif -#elif defined (_STLP_UNIX) -# if defined (__CYGWIN__) -# define _STLP_LDOUBLE_96 -# endif -#endif - -#if !defined (_STLP_LDOUBLE_64) && !defined (_STLP_LDOUBLE_80) && !defined (_STLP_LDOUBLE_96) && !defined (_STLP_LDOUBLE_128) -# define _STLP_LDOUBLE_128 -#endif - -#if !defined (_STLP_NO_LONG_DOUBLE) -# define _STLP_LONGEST_FLOAT_TYPE long double -#else -# define _STLP_LONGEST_FLOAT_TYPE double -#endif - -/* Native headers access macros */ -#include - -/* shared library tune-up */ - -#if defined (__BUILDING_STLPORT) -/* if we are rebuilding right now, place everything here */ -# undef _STLP_DESIGNATED_DLL -# define _STLP_DESIGNATED_DLL 1 -#endif - -/* Use own namespace always if possible and not explicitly instructed otherwise */ -#if defined (_STLP_USE_NAMESPACES) && !defined (_STLP_BROKEN_USING_DIRECTIVE) && \ - !defined (_STLP_NO_OWN_NAMESPACE) -# undef _STLP_USE_OWN_NAMESPACE -# define _STLP_USE_OWN_NAMESPACE 1 -#else -# undef _STLP_WHOLE_NATIVE_STD -#endif - -#if !defined (_NOTHREADS) && !defined (_STLP_THREADS_DEFINED) - -# if defined (_PTHREADS) -# define _STLP_PTHREADS -# define _STLP_THREADS -# endif -# if defined (_UITHREADS) -# define _STLP_UITHREADS -# define _STLP_THREADS -# endif - -# if defined (__sgi) && !defined (__KCC) && !defined (__GNUC__) -# define _STLP_SGI_THREADS -# elif defined (__DECC) || defined (__DECCXX) -# define _STLP_DEC_THREADS -# elif defined (_STLP_WIN32) && !defined (_STLP_PTHREADS) -# define _STLP_WIN32THREADS 1 -# elif ((defined (__sun) && !defined (__linux__)) || defined (_UITHREADS) ) && \ - !defined(_STLP_PTHREADS) -# define _STLP_UITHREADS -# elif defined (__OS2__) -# define _STLP_OS2THREADS -# elif defined (__BEOS__) -# define _STLP_BETHREADS -# elif defined (__MWERKS__) && defined (N_PLAT_NLM) /* (__dest_os == __netware_os) */ -# define _STLP_NWTHREADS -# else -# define _STLP_PTHREADS -# endif /* __sgi */ -# define _STLP_THREADS_DEFINED -#endif - -#if (defined (_REENTRANT) || defined (_THREAD_SAFE) || \ - (defined (_POSIX_THREADS) && defined (__OpenBSD__))) && \ - !defined (_STLP_THREADS) -# define _STLP_THREADS -#endif /* _REENTRANT */ - -#if defined (__linux__) && defined (_STLP_PTHREADS) -/* # include */ - -# if defined (__USE_XOPEN2K) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK) -# define _STLP_USE_PTHREAD_SPINLOCK -# define _STLP_STATIC_MUTEX _STLP_mutex -# endif /* __USE_XOPEN2K */ -#endif /* __linux__ && _STLP_PTHREADS */ - -#if defined (__OpenBSD__) && defined (_POSIX_THREADS) && !defined (_STLP_DONT_USE_PTHREAD_SPINLOCK) -# define _STLP_USE_PTHREAD_SPINLOCK -# define _STLP_STATIC_MUTEX _STLP_mutex -#endif - -#ifndef _STLP_STATIC_MUTEX -# define _STLP_STATIC_MUTEX _STLP_mutex_base -#endif - -#if (defined (_MFC_VER) || defined (_AFXDLL)) && !defined (_STLP_USE_MFC) -# define _STLP_USE_MFC 1 -#endif - -#if defined (_STLP_THREADS) -# define _STLP_VOLATILE volatile -/* windows.h _MUST be included before bool definition ;( */ -# if defined (_STLP_WIN32THREADS) && defined (_STLP_NO_BOOL) -# undef NOMINMAX -# define NOMINMAX -# ifdef _STLP_USE_MFC -# include -# else -# include -# endif -# define _STLP_WINDOWS_H_INCLUDED -# endif -#else -# define _STLP_VOLATILE -#endif - -#if !defined (_STLP_USE_NEW_C_HEADERS) && !defined (_STLP_HAS_NO_NEW_C_HEADERS) -# define _STLP_USE_NEW_C_HEADERS -#endif -/* disable new-style headers if requested */ -#if defined (_STLP_NO_NEW_C_HEADERS) -# undef _STLP_USE_NEW_C_HEADERS -#endif - -#if !defined (_STLP_STATIC_TEMPLATE_DATA) -# define _STLP_STATIC_TEMPLATE_DATA 1 -#endif - -#if defined (_STLP_BASE_TYPEDEF_BUG) -# undef _STLP_BASE_TYPEDEF_OUTSIDE_BUG -# define _STLP_BASE_TYPEDEF_OUTSIDE_BUG 1 -#endif - -#if defined (_STLP_NESTED_TYPE_PARAM_BUG) || (defined (_STLP_MSVC) && (_STLP_MSVC < 1100)) -# define _STLP_GLOBAL_NESTED_RETURN_TYPE_PARAM_BUG -#endif - -/* SUNpro 4.2 inline string literal bug */ -#ifdef _STLP_INLINE_STRING_LITERAL_BUG -# define _STLP_FIX_LITERAL_BUG(__x) __x = __x; -#else -# define _STLP_FIX_LITERAL_BUG(__x) -#endif - -#if defined (_STLP_NON_TYPE_TMPL_PARAM_BUG) -# undef _STLP_NO_DEFAULT_NON_TYPE_PARAM -# define _STLP_NO_DEFAULT_NON_TYPE_PARAM 1 -#endif - -#define _STLP_NEW new -#define _STLP_PLACEMENT_NEW new - -#ifdef _STLP_DEBUG -# define _STLP_ASSERTIONS 1 -#endif - -#if !defined (_STLP_STATIC_ASSERT) -/* Some compiler support 0 size array so we use negative size array to generate - * a compilation time error. - */ -# define _STLP_STATIC_ASSERT(expr) typedef char __static_assert[expr ? 1 : -1]; -#endif - -/* apple mpw exception handling bug */ -#ifndef _STLP_MPWFIX_TRY -# define _STLP_MPWFIX_TRY -#endif -#ifndef _STLP_MPWFIX_CATCH -# define _STLP_MPWFIX_CATCH -#endif -#ifndef _STLP_MPWFIX_CATCH_ACTION -# define _STLP_MPWFIX_CATCH_ACTION(action) -#endif - -/* if _STLP_DEBUG or _STLP_ASSERTIONS are set, stl/debug/_debug.h defines those */ - -#if !defined (_STLP_ASSERTIONS) && !defined (_STLP_DEBUG) && !defined (_STLP_DEBUG_ALLOC) -# define _STLP_ASSERT(expr) -#endif - -#if !defined (_STLP_DEBUG) -# define _STLP_VERBOSE_ASSERT(expr,diagnostic) -# define _STLP_DEBUG_CHECK(expr) -# define _STLP_DEBUG_DO(expr) -#endif - -#if !defined (_STLP_WEAK) -# define _STLP_WEAK -#endif - -/* default parameters as template types derived from arguments ( not always supported ) */ -#if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) -# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname -#else -# if !defined (_STLP_DEFAULT_TYPE_PARAM) -# define _STLP_DEFAULT_TYPE_PARAM 1 -# endif -# define _STLP_DFL_TMPL_PARAM( classname, defval ) class classname = defval -#endif - -/* default parameters as complete types */ -#if defined (_STLP_DEFAULT_TYPE_PARAM) -# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname = defval -# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name = val -#else -# define _STLP_DFL_TYPE_PARAM( classname, defval ) class classname -# define _STLP_DFL_NON_TYPE_PARAM(type,name,val) type name -#endif - -/* SGI compatibility */ - -#ifdef _STLP_NO_WCHAR_T -# ifndef _STLP_NO_NATIVE_WIDE_STREAMS -# define _STLP_NO_NATIVE_WIDE_STREAMS 1 -# endif -#else -# define _STLP_HAS_WCHAR_T 1 -#endif - -#if !defined (_STLP_NO_AT_MEMBER_FUNCTION) -# define _STLP_CAN_THROW_RANGE_ERRORS 1 -#endif - -#if !defined (_STLP_USE_RAW_SGI_ALLOCATORS) -# define _STLP_DEFAULT_ALLOCATOR(_Tp) allocator< _Tp > -# define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TMPL_PARAM(_Alloc, allocator< _Tp >) -# define _STLP_DEFAULT_PAIR_ALLOCATOR(_Key, _Tp) allocator< pair < _Key, _Tp > > -# if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) -# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) class _Alloc -# define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1 -# else -# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) \ - class _Alloc = allocator< pair < _Key, _Tp > > -# endif -#else -# define _STLP_DEFAULT_ALLOCATOR( _Tp ) __sgi_alloc -# define _STLP_DEFAULT_ALLOCATOR_SELECT( _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc) -# define _STLP_DEFAULT_PAIR_ALLOCATOR( _Key, _Tp ) __sgi_alloc -# define _STLP_DEFAULT_PAIR_ALLOCATOR_SELECT(_Key, _Tp ) _STLP_DFL_TYPE_PARAM(_Alloc,__sgi_alloc) -# if defined (_STLP_LIMITED_DEFAULT_TEMPLATES) && !defined (_STLP_DEFAULT_TYPE_PARAM) -# define _STLP_USE_WRAPPER_FOR_ALLOC_PARAM 1 -# endif -#endif - -/* debug mode tool */ -#if defined (_STLP_DEBUG) -# define _STLP_NON_DBG_NAME(X) _NonDbg_##X -#endif - -/* pointer specialization tool */ -#if defined (_STLP_USE_PTR_SPECIALIZATIONS) -# define _STLP_PTR_IMPL_NAME(X) _Impl_##X -#endif - -#if defined (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND) -# define _STLP_NO_MEM_T_NAME(X) _NoMemT_##X -# if defined (_STLP_DEBUG) -# define _STLP_NON_DBG_NO_MEM_T_NAME(X) _NonDbg_NoMemT_##X -# endif -#endif - -/* this always mean the C library is in global namespace */ -#if defined (_STLP_HAS_NO_NEW_C_HEADERS) && !defined (_STLP_VENDOR_GLOBAL_CSTD) -# define _STLP_VENDOR_GLOBAL_CSTD 1 -#endif - -/* Depending of whether compiler supports namespaces, - * tune the parameters for vendor-supplied libraries. - * This section is guarded by _STLP_HAS_NO_NAMESPACES, not by _STLP_USE_NAMESPACES, - * since it depends only on the native features, not on user's preference whether - * to use namespace for STLport or not. - */ -#if !defined (_STLP_HAS_NO_NAMESPACES) -/* Import some vendor's headers into corresponding STLport ones if they might be needed - * (if we wrap native iostreams and use namepace other than std::) */ -# if defined (_STLP_WHOLE_NATIVE_STD) -# define _STLP_IMPORT_VENDOR_STD 1 -# undef _STLP_MINIMUM_IMPORT_STD -# endif - -/* if using stlport:: namespace or if C library stuff is not in vendor's std::, - * try importing 'em. - * MSVC has ambiguity problem when we try to import C-style std:: stuff back into global namespace */ -# if defined (_STLP_USE_NAMESPACES) && (defined(_STLP_USE_OWN_NAMESPACE) || defined (_STLP_VENDOR_GLOBAL_CSTD)) -# define _STLP_IMPORT_VENDOR_CSTD 1 -# endif - -# if defined (_STLP_NO_USING_FOR_GLOBAL_FUNCTIONS) && !defined (_STLP_DO_IMPORT_CSTD_FUNCTIONS) -# define _STLP_NO_CSTD_FUNCTION_IMPORTS -# endif - -# define _STLP_USING_NAMESPACE(x) using namespace x ; - -namespace std { } -namespace __std_alias = std; - -/* assume std:: namespace for C++ std library if not being told otherwise */ -# if defined (_STLP_VENDOR_GLOBAL_STD) -# define _STLP_VENDOR_STD -# else -# define _STLP_VENDOR_STD __std_alias -# endif - -/* tune things that come from C library */ -# if defined (_STLP_VENDOR_GLOBAL_CSTD) || !defined(_STLP_USE_NEW_C_HEADERS) -/* in old-style headers, C functions go to global scope. */ -# define _STLP_VENDOR_CSTD -# define _STLP_USING_VENDOR_CSTD -# else -# define _STLP_VENDOR_CSTD _STLP_VENDOR_STD -# define _STLP_USING_VENDOR_CSTD _STLP_USING_NAMESPACE(_STLP_VENDOR_CSTD) -# endif /* _STLP_VENDOR_CSTD */ -/* exception, typeinfo, new - always come from the vendor */ -# if !defined (_STLP_VENDOR_EXCEPT_STD) -# if defined (_STLP_VENDOR_GLOBAL_EXCEPT_STD) -# define _STLP_VENDOR_EXCEPT_STD -# else -# define _STLP_VENDOR_EXCEPT_STD _STLP_VENDOR_STD -# endif -# endif -# define _STLP_OLD_IO_NAMESPACE -# if !defined (_STLP_VENDOR_MB_NAMESPACE) -# define _STLP_VENDOR_MB_NAMESPACE _STLP_VENDOR_CSTD -# endif -#else -/* compiler has no namespace support */ -# define _STLP_VENDOR_STD -# define _STLP_VENDOR_CSTD -# define _STLP_USING_NAMESPACE(x) -# define _STLP_USING_VENDOR_CSTD -# define _STLP_VENDOR_EXCEPT_STD -#endif - -#if defined (_STLP_USE_NAMESPACES) - -# if defined (_STLP_USE_OWN_NAMESPACE) -# if !defined (_STLP_STD_NAME) -# if !defined (_STLP_DEBUG) -# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) -# ifndef _STLP_THREADS -# define _STLP_STD_NAME stlpmtx_std -# else -# define _STLP_STD_NAME stlp_std -# endif -# else -# ifndef _STLP_THREADS -# define _STLP_STD_NAME stlpxmtx_std -# else -# define _STLP_STD_NAME stlpx_std -# endif -# endif -# else -/* - * The STLport debug mode is binary incompatible with the other modes, - * lets make it clear on the STLport namespace to generate link errors rather - * than runtime. - */ -# if !defined (_STLP_USING_CROSS_NATIVE_RUNTIME_LIB) -# ifndef _STLP_THREADS -# define _STLP_STD_NAME stlpdmtx_std -# else -# define _STLP_STD_NAME stlpd_std -# endif -# else -# ifndef _STLP_THREADS -# define _STLP_STD_NAME stlpdxmtx_std -# else -# define _STLP_STD_NAME stlpdx_std -# endif -# endif -# endif -# endif -namespace _STLP_STD_NAME { } -# else -# if defined (_STLP_DEBUG) -namespace stdD = std; -# endif -# define _STLP_STD_NAME std -# endif /* _STLP_USE_OWN_NAMESPACE */ - -# if !defined (_STLP_USING_NAMESPACE_BUG) -# define _STLP_PRIV_NAME stlp_priv -namespace _STLP_PRIV_NAME { - using namespace _STLP_STD_NAME; -} -# else -# define _STLP_PRIV_NAME priv -# endif - -# define _STLP_BEGIN_NAMESPACE namespace _STLP_STD_NAME { -# define _STLP_END_NAMESPACE } - -# if !defined (_STLP_DONT_USE_PRIV_NAMESPACE) -# if !defined (_STLP_USING_NAMESPACE_BUG) -/* We prefer to make private namespace a totaly seperated namespace... - */ -# define _STLP_PRIV ::_STLP_PRIV_NAME:: -# define _STLP_MOVE_TO_PRIV_NAMESPACE } namespace _STLP_PRIV_NAME { -# define _STLP_MOVE_TO_STD_NAMESPACE } namespace _STLP_STD_NAME { -# else -/* but sometimes we can't: - */ -# define _STLP_PRIV _STLP_PRIV_NAME:: -# define _STLP_MOVE_TO_PRIV_NAMESPACE namespace _STLP_PRIV_NAME { -# define _STLP_MOVE_TO_STD_NAMESPACE } -# endif -# else -# define _STLP_PRIV -# define _STLP_MOVE_TO_PRIV_NAMESPACE -# define _STLP_MOVE_TO_STD_NAMESPACE -# endif - -/* decide whether or not we use separate namespace for rel ops */ -# if defined (_STLP_NO_RELOPS_NAMESPACE) -# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops {} -# define _STLP_END_RELOPS_NAMESPACE } -# else -/* Use std::rel_ops namespace */ -# define _STLP_BEGIN_RELOPS_NAMESPACE _STLP_BEGIN_NAMESPACE namespace rel_ops { -# define _STLP_END_RELOPS_NAMESPACE } } -# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE -# endif /* Use std::rel_ops namespace */ - -# define _STLP_STD ::_STLP_STD_NAME - -/* Official STLport namespace when std is not redefined. - * Here we don't use a macro as stlport is used as file name by boost - * and folder name under beos: - */ -namespace stlport = _STLP_STD_NAME; - -/* Backward compatibility: - */ -namespace _STL = _STLP_STD_NAME; -#undef __STLPORT_NAMESPACE -#define __STLPORT_NAMESPACE _STLP_STD_NAME - -#else /* _STLP_USE_NAMESPACES */ -/* STLport is being put into global namespace */ -# define _STLP_STD -# define _STLP_PRIV -# define _STLP_BEGIN_NAMESPACE -# define _STLP_END_NAMESPACE -# define _STLP_MOVE_TO_PRIV_NAMESPACE -# define _STLP_MOVE_TO_STD_NAMESPACE - -/* boris : it was found out that _STLP_USE_SEPARATE_RELOPS_NAMESPACE - causes less problems than having relational operator templates in global namespace - Please define _STLP_NO_RELOPS_NAMESPACE in stl_user_config.h if your code rely on them. */ -# if !defined (_STLP_NO_RELOPS_NAMESPACE) -# define _STLP_USE_SEPARATE_RELOPS_NAMESPACE -# endif -# define _STLP_BEGIN_RELOPS_NAMESPACE -# define _STLP_END_RELOPS_NAMESPACE -# undef _STLP_USE_OWN_NAMESPACE -#endif /* _STLP_USE_NAMESPACES */ - -#define STLPORT_CSTD _STLP_VENDOR_CSTD -#define STLPORT _STLP_STD_NAME - -#if defined(_STLP_BOGUS_TEMPLATE_TYPE_MATCHING_BUG) -# define _STLP_SIMPLE_TYPE(T) _stl_trivial_proxy -#else -# define _STLP_SIMPLE_TYPE(T) T -#endif - -#ifndef _STLP_RAND48 -# define _STLP_NO_DRAND48 -#endif - -/* advanced keywords usage */ -#define __C_CAST(__x, __y) ((__x)(__y)) -#ifndef _STLP_NO_NEW_STYLE_CASTS -# define __CONST_CAST(__x,__y) const_cast<__x>(__y) -# define __STATIC_CAST(__x,__y) static_cast<__x>(__y) -# define __REINTERPRET_CAST(__x,__y) reinterpret_cast<__x>(__y) -# define __DYNAMIC_CAST(__x,__y) dynamic_cast<__x>(__y) -#else -# define __STATIC_CAST(__x,__y) __C_CAST(__x, __y) -# define __CONST_CAST(__x,__y) __C_CAST(__x, __y) -# define __REINTERPRET_CAST(__x,__y) __C_CAST(__x, __y) -# define __DYNAMIC_CAST(__x,__y) __C_CAST(__x, __y) -#endif - -#if defined (_STLP_NEED_TYPENAME) && ! defined (typename) -# define typename -#endif - -#if defined (_STLP_NEED_TYPENAME) || defined (_STLP_NO_TYPENAME_ON_RETURN_TYPE ) -# define _STLP_TYPENAME_ON_RETURN_TYPE -#else -# define _STLP_TYPENAME_ON_RETURN_TYPE typename -#endif - -#ifdef _STLP_NO_TYPENAME_IN_TEMPLATE_HEADER -# define _STLP_HEADER_TYPENAME -#else -# define _STLP_HEADER_TYPENAME typename -#endif - -#ifndef _STLP_NO_MEMBER_TEMPLATE_KEYWORD -# define _STLP_TEMPLATE template -#else -# define _STLP_TEMPLATE -#endif - -#if defined (_STLP_USE_CONTAINERS_EXTENSION) -# define _STLP_KEY_TYPE_FOR_CONT_EXT(type) -# define _STLP_TEMPLATE_FOR_CONT_EXT template -#else -# define _STLP_KEY_TYPE_FOR_CONT_EXT(type) typedef type _KT; -# define _STLP_TEMPLATE_FOR_CONT_EXT -#endif - -#if defined (_STLP_NEED_EXPLICIT) && !defined (explicit) -# define explicit -#endif - -#if !defined (_STLP_NEED_MUTABLE) -# define _STLP_ASSIGN_MUTABLE(type,x,y) x = y -#else -# define _STLP_ASSIGN_MUTABLE(type,x,y) __CONST_CAST(type,x)=y -# define mutable -#endif - -#if defined (_STLP_NO_SIGNED_BUILTINS) -/* old HP-UX doesn't understand "signed" keyword */ -# define signed -#endif - -#if defined (_STLP_LOOP_INLINE_PROBLEMS) -# define _STLP_INLINE_LOOP -#else -# define _STLP_INLINE_LOOP inline -#endif - -#define _STLP_PRIVATE public - -#ifndef _STLP_NO_PARTIAL_SPECIALIZATION_SYNTAX -# define _STLP_TEMPLATE_NULL template<> -#else -# define _STLP_TEMPLATE_NULL -#endif - -#ifdef _STLP_FUNCTION_TMPL_PARTIAL_ORDER -# define _STLP_OPERATOR_TEMPLATE -#else -# define _STLP_OPERATOR_TEMPLATE _STLP_TEMPLATE_NULL -#endif - -#ifndef _STLP_CLASS_PARTIAL_SPECIALIZATION -/* unless we have other compiler problem, try simulating partial spec here */ -# if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) -# define _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS -# endif -/* For your own iterators, please use inheritance from iterator<> instead of these obsolete queries. */ -# if (defined (_STLP_NESTED_TYPE_PARAM_BUG) || !defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS)) -# if ! defined ( _STLP_USE_OLD_HP_ITERATOR_QUERIES ) -# define _STLP_USE_OLD_HP_ITERATOR_QUERIES -# endif -# elif defined ( _STLP_NO_ANACHRONISMS ) -# undef _STLP_USE_OLD_HP_ITERATOR_QUERIES -# endif -#endif - -#ifndef _STLP_NO_EXPLICIT_FUNCTION_TMPL_ARGS -# define _STLP_NULL_TMPL_ARGS <> -# else -# define _STLP_NULL_TMPL_ARGS -#endif - -#if !defined (_STLP_ALLOCATOR_TYPE_DFL) -# if defined (_STLP_DONT_SUP_DFLT_PARAM) -# define _STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS -# endif -# if defined (_STLP_NEEDS_EXTRA_TEMPLATE_CONSTRUCTORS) -# define _STLP_ALLOCATOR_TYPE_DFL -# else -# define _STLP_ALLOCATOR_TYPE_DFL = allocator_type() -# endif -#endif - -/* When the compiler do not correctly initialized the basic types value in default parameters we prefer - * to avoid them to be able to correct this bug. - */ -#if defined (_STLP_DEF_CONST_DEF_PARAM_BUG) -# define _STLP_DONT_SUP_DFLT_PARAM 1 -#endif - -#if defined (__SGI_STL_NO_ARROW_OPERATOR) && ! defined (_STLP_NO_ARROW_OPERATOR) -# define _STLP_NO_ARROW_OPERATOR -#endif - -#if !defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -# if !(defined (_STLP_NO_ARROW_OPERATOR)) && \ - !defined (_STLP_NO_MSVC50_COMPATIBILITY) && !defined (_STLP_MSVC50_COMPATIBILITY) -/* this one is needed for proper reverse_iterator<> operator ->() handling */ -# define _STLP_MSVC50_COMPATIBILITY 1 -# endif -#endif - -#if defined ( _STLP_CLASS_PARTIAL_SPECIALIZATION ) -# if (defined(__IBMCPP__) && (500 <= __IBMCPP__) && (__IBMCPP__ < 600) ) -# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ - typedef typename _STLP_STD :: reverse_iterator const_reverse_iterator; \ - typedef typename _STLP_STD :: reverse_iterator reverse_iterator -# elif (defined (__sgi) && ! defined (__GNUC__)) || defined (__SUNPRO_CC) || defined (__xlC__) -# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ - typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator const_reverse_iterator; \ - typedef _STLP_STD:: _STLP_TEMPLATE reverse_iterator reverse_iterator -# else -# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ - typedef _STLP_STD::reverse_iterator const_reverse_iterator; \ - typedef _STLP_STD::reverse_iterator reverse_iterator -# endif -#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ -# if defined (_STLP_MSVC50_COMPATIBILITY) -# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ - typedef _STLP_STD::__reverse_iterator const_reverse_iterator; \ - typedef _STLP_STD::__reverse_iterator \ - reverse_iterator -# else -# define _STLP_DECLARE_REVERSE_ITERATORS(__reverse_iterator) \ - typedef _STLP_STD::__reverse_iterator const_reverse_iterator; \ - typedef _STLP_STD::__reverse_iterator \ - reverse_iterator -# endif -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -#define _STLP_DECLARE_BIDIRECTIONAL_REVERSE_ITERATORS \ - _STLP_DECLARE_REVERSE_ITERATORS(reverse_bidirectional_iterator) -#define _STLP_DECLARE_RANDOM_ACCESS_REVERSE_ITERATORS \ - _STLP_DECLARE_REVERSE_ITERATORS(reverse_iterator) - -#define __IMPORT_CONTAINER_TYPEDEFS(_Super) \ - typedef typename _Super::value_type value_type; \ - typedef typename _Super::size_type size_type; \ - typedef typename _Super::difference_type difference_type; \ - typedef typename _Super::reference reference; \ - typedef typename _Super::const_reference const_reference; \ - typedef typename _Super::pointer pointer; \ - typedef typename _Super::const_pointer const_pointer; \ - typedef typename _Super::allocator_type allocator_type; - - -#define __IMPORT_ITERATORS(_Super) \ - typedef typename _Super::iterator iterator; \ - typedef typename _Super::const_iterator const_iterator; - -#define __IMPORT_REVERSE_ITERATORS(_Super) \ - typedef typename _Super::const_reverse_iterator const_reverse_iterator; \ - typedef typename _Super::reverse_iterator reverse_iterator; - -#define __IMPORT_SUPER_COPY_ASSIGNMENT(__derived_name, _Self, _SUPER) \ - __derived_name(const _Super& __x) : _SUPER(__x) {} \ - _Self& operator=(const _Super& __x) { \ - *(_Super*)this = __x; \ - return *this; \ - } \ - __derived_name(const _Self& __x) : _SUPER(__x) {} \ - _Self& operator=(const _Self& __x) { \ - *(_Super*)this = __x; \ - return *this; \ - } - -#define __IMPORT_WITH_ITERATORS(_Super) \ - __IMPORT_CONTAINER_TYPEDEFS(_Super) __IMPORT_ITERATORS(_Super) - -#define __IMPORT_WITH_REVERSE_ITERATORS(_Super) \ - __IMPORT_WITH_ITERATORS(_Super) __IMPORT_REVERSE_ITERATORS(_Super) - -#if defined (_STLP_TRIVIAL_CONSTRUCTOR_BUG) -# define __TRIVIAL_CONSTRUCTOR(__type) __type() {} -#else -# define __TRIVIAL_CONSTRUCTOR(__type) -#endif - -#if defined (_STLP_TRIVIAL_DESTRUCTOR_BUG) -# define __TRIVIAL_DESTRUCTOR(__type) ~__type() {} -#else -# define __TRIVIAL_DESTRUCTOR(__type) -#endif - -#define __TRIVIAL_STUFF(__type) \ - __TRIVIAL_CONSTRUCTOR(__type) __TRIVIAL_DESTRUCTOR(__type) - -#if defined (_STLP_HAS_NO_EXCEPTIONS) -# define _STLP_NO_EXCEPTIONS -#endif - -#if !defined (_STLP_DONT_USE_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_USE_EXCEPTIONS) -# define _STLP_USE_EXCEPTIONS -#endif - -#if defined (_STLP_USE_EXCEPTIONS) -# define _STLP_TRY try -# define _STLP_CATCH_ALL catch(...) -# ifndef _STLP_THROW -# define _STLP_THROW(x) throw x -# endif -# define _STLP_RETHROW throw - -# define _STLP_UNWIND(action) catch(...) { action; throw; } - -# ifdef _STLP_THROW_RETURN_BUG -# define _STLP_RET_AFTER_THROW(data) return data; -# else -# define _STLP_RET_AFTER_THROW(data) -# endif - -/* We do not use exception throw specifications unless we are forced to */ -# if !defined (_STLP_THROWS) -# define _STLP_THROWS(x) -# endif -# if !defined (_STLP_NOTHROW) -# define _STLP_NOTHROW -# endif -#else -# define _STLP_TRY -# define _STLP_CATCH_ALL if (false) -# ifndef _STLP_THROW -# define _STLP_THROW(x) -# endif -# define _STLP_RETHROW {} -# define _STLP_UNWIND(action) -# define _STLP_THROWS(x) -# define _STLP_NOTHROW -# define _STLP_RET_AFTER_THROW(data) -#endif - -/* - * Here we check _STLP_NO_EXCEPTIONS which means that the compiler has no - * exception support but not the _STLP_USE_EXCEPTIONS which simply means - * that the user do not want to use them. - */ -#if !defined (_STLP_NO_EXCEPTIONS) && !defined (_STLP_NO_EXCEPTION_SPEC) -# define _STLP_THROWS_INHERENTLY(x) throw x -# define _STLP_NOTHROW_INHERENTLY throw() -#else -# define _STLP_THROWS_INHERENTLY(x) -# define _STLP_NOTHROW_INHERENTLY -#endif - -/* STLport function not returning are functions that throw so we translate - * the noreturn functions in throwing functions taking also into account - * exception support activation. - */ -#if defined (_STLP_NORETURN_FUNCTION) && !defined (_STLP_NO_EXCEPTIONS) && \ - !defined (_STLP_FUNCTION_THROWS) -# define _STLP_FUNCTION_THROWS _STLP_NORETURN_FUNCTION -#else -# define _STLP_FUNCTION_THROWS -#endif - -#if defined(_STLP_NO_BOOL) -# if (defined (__IBMCPP__) && (__IBMCPP__ < 400)) && ! defined (_AIX) -# include -# if defined (__OS400__) -typedef int bool; -# elif !( defined (__xlC__) || defined (_AIX)) -typedef Boolean bool; -# endif -# else -# if defined(_STLP_YVALS_H) -# include -# else -# if defined (_STLP_DONT_USE_BOOL_TYPEDEF) -# define bool int -# else -typedef int bool; -# endif -# define true 1 -# define false 0 -# endif -# endif /* __IBMCPP__ */ -#else -# define _STLP_BOOL_KEYWORD 1 -#endif /* _STLP_NO_BOOL */ - -#ifndef _STLP_MPW_EXTRA_CONST -# define _STLP_MPW_EXTRA_CONST -#endif - -#ifndef _STLP_DEFAULTCHAR -# define _STLP_DEFAULTCHAR char -#endif - -#if defined (_STLP_DEBUG_ALLOC) && !defined (_STLP_ASSERTIONS) -# define _STLP_ASSERTIONS 1 -#endif - -/* uninitialized value filler */ -#ifndef _STLP_SHRED_BYTE -/* This value is designed to cause problems if an error occurs */ -# define _STLP_SHRED_BYTE 0xA3 -#endif /* _STLP_SHRED_BYTE */ - -/* shared library tune-up */ -#ifndef _STLP_IMPORT_DECLSPEC -# define _STLP_IMPORT_DECLSPEC -#endif - -/* a keyword used to instantiate export template */ -#ifndef _STLP_EXPORT_TEMPLATE_KEYWORD -# define _STLP_EXPORT_TEMPLATE_KEYWORD -#endif -#ifndef _STLP_IMPORT_TEMPLATE_KEYWORD -# define _STLP_IMPORT_TEMPLATE_KEYWORD -#endif - -#ifdef _STLP_USE_NO_IOSTREAMS -/* - * If we do not use iostreams we do not use the export/import - * techniques to avoid build of the STLport library. - */ -# undef _STLP_USE_DECLSPEC -/* We also undef USE_DYNAMIC_LIB macro as this macro add some code - * to use the dynamic (shared) STLport library for some platform/compiler - * configuration leading to problem when do not link to the STLport lib. - */ -# undef _STLP_USE_DYNAMIC_LIB -#endif - -#if defined (_STLP_DLLEXPORT_NEEDS_PREDECLARATION) && defined (_STLP_USE_DECLSPEC) -# if ! defined (_STLP_USE_TEMPLATE_EXPORT) -/* this setting turns on "extern template" extension use */ -# define _STLP_USE_TEMPLATE_EXPORT -# endif -# if defined (_STLP_DESIGNATED_DLL) && ! defined (_STLP_NO_FORCE_INSTANTIATE) -# define _STLP_NO_FORCE_INSTANTIATE -# endif -#endif - -#if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */ -# define _STLP_EXPORT _STLP_EXPORT_TEMPLATE_KEYWORD -#else -# define _STLP_EXPORT _STLP_IMPORT_TEMPLATE_KEYWORD -#endif - -#ifndef _STLP_EXPORT_TEMPLATE -# define _STLP_EXPORT_TEMPLATE _STLP_EXPORT template -#endif - -#if defined (_STLP_USE_DECLSPEC) /* using export/import technique */ - -# ifndef _STLP_EXPORT_DECLSPEC -# define _STLP_EXPORT_DECLSPEC -# endif -# ifndef _STLP_IMPORT_DECLSPEC -# define _STLP_IMPORT_DECLSPEC -# endif -# ifndef _STLP_CLASS_EXPORT_DECLSPEC -# define _STLP_CLASS_EXPORT_DECLSPEC -# endif -# ifndef _STLP_CLASS_IMPORT_DECLSPEC -# define _STLP_CLASS_IMPORT_DECLSPEC -# endif -# if defined (_STLP_DESIGNATED_DLL) /* This is a lib which will contain STLport exports */ -# define _STLP_DECLSPEC _STLP_EXPORT_DECLSPEC -# define _STLP_CLASS_DECLSPEC _STLP_CLASS_EXPORT_DECLSPEC -# else -# define _STLP_DECLSPEC _STLP_IMPORT_DECLSPEC /* Other modules, importing STLport exports */ -# define _STLP_CLASS_DECLSPEC _STLP_CLASS_IMPORT_DECLSPEC -# endif - -#else /* Not using DLL export/import specifications */ - -# define _STLP_DECLSPEC -# define _STLP_CLASS_DECLSPEC - -#endif - -#define _STLP_EXPORT_TEMPLATE_CLASS _STLP_EXPORT template class _STLP_CLASS_DECLSPEC - -#if defined (_STLP_MSVC) || defined (__ICL) -# define _STLP_STATIC_MEMBER_DECLSPEC -#else -# define _STLP_STATIC_MEMBER_DECLSPEC _STLP_DECLSPEC -#endif - -#if !defined (_STLP_CALL) -# define _STLP_CALL -#endif - -#ifndef _STLP_USE_NO_IOSTREAMS - -# if defined (__DECCXX) && ! defined (__USE_STD_IOSTREAM) -# define __USE_STD_IOSTREAM -# endif - -/* We only need to expose details of streams implementation - if we use non-standard i/o or are building STLport*/ -# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) || !defined(_STLP_NO_CUSTOM_IO) -# define _STLP_EXPOSE_STREAM_IMPLEMENTATION 1 -# endif - -/* We only need to expose details of global implementation if we are building STLport - or have not instantiated everything in the lib */ -# if defined (__BUILDING_STLPORT) || defined (_STLP_NO_FORCE_INSTANTIATE) -# undef _STLP_EXPOSE_GLOBALS_IMPLEMENTATION -# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION 1 -# endif - -#else /* _STLP_USE_NO_IOSTREAMS */ -/* when we are not using SGI iostreams, we must expose globals, but not streams implementation */ -# define _STLP_EXPOSE_GLOBALS_IMPLEMENTATION -#endif /* _STLP_USE_NO_IOSTREAMS */ - -#ifdef _STLP_PARTIAL_SPEC_NEEDS_TEMPLATE_ARGS -# define _STLP_PSPEC2(t1,t2) < t1,t2 > -# define _STLP_PSPEC3(t1,t2,t3) < t1,t2,t3 > -#else -# define _STLP_PSPEC2(t1,t2) /* nothing */ -# define _STLP_PSPEC3(t1,t2,t3) /* nothing */ -#endif - -/* Activation of the partial template workaround: - */ -#if !defined(_STLP_DONT_USE_PARTIAL_SPEC_WRKD) &&\ - (!defined(_STLP_CLASS_PARTIAL_SPECIALIZATION) || !defined(_STLP_FUNCTION_TMPL_PARTIAL_ORDER)) -# define _STLP_USE_PARTIAL_SPEC_WORKAROUND -#endif - -#ifndef _STLP_USE_NO_IOSTREAMS -# define _STLP_NEW_IO_NAMESPACE _STLP_STD -# define _STLP_NO_WIDE_STREAMS _STLP_NO_WCHAR_T -#endif - -#ifdef _STLP_USE_SEPARATE_RELOPS_NAMESPACE -# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) \ -_TMPL inline bool _STLP_CALL operator!=(const _TP& __x, const _TP& __y) {return !(__x == __y);}\ -_TMPL inline bool _STLP_CALL operator>(const _TP& __x, const _TP& __y) {return __y < __x;}\ -_TMPL inline bool _STLP_CALL operator<=(const _TP& __x, const _TP& __y) { return !(__y < __x);}\ -_TMPL inline bool _STLP_CALL operator>=(const _TP& __x, const _TP& __y) { return !(__x < __y);} -#else -# define _STLP_RELOPS_OPERATORS(_TMPL, _TP) -#endif - -#if defined ( _STLP_USE_ABBREVS ) -# include -#endif - -/* A really useful macro */ -#define _STLP_ARRAY_SIZE(A) sizeof(A) / sizeof(A[0]) -#define _STLP_ARRAY_AND_SIZE(A) A, sizeof(A) / sizeof(A[0]) - -/* some cleanup */ -#undef _STLP_DONT_USE_BOOL_TYPEDEF -#undef _STLP_YVALS_H -#undef _STLP_LOOP_INLINE_PROBLEMS -#undef _STLP_NEED_EXPLICIT -#undef _STLP_NEED_TYPENAME -#undef _STLP_NO_NEW_STYLE_CASTS -#undef __AUTO_CONFIGURED - -#endif /* _STLP_FEATURES_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/host.h --- a/epoc32/include/tools/stlport/stl/config/host.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,265 +0,0 @@ -/* - * This file defines site configuration. - */ - -/* - * _STLP_NO_THREADS: if defined, STLport don't use any - * multithreading support. Synonym is _NOTHREADS - */ -/* -#define _NOTHREADS -#define _STLP_NO_THREADS -*/ - -/* _PTHREADS: if defined, use POSIX threads for multithreading support. */ -/* -#define _PTHREADS -*/ - -/* compatibility section - */ - -#if (defined (_STLP_NOTHREADS) || defined (_STLP_NO_THREADS) || defined (NOTHREADS)) -# if !defined (_NOTHREADS) -# define _NOTHREADS -# endif -# if !defined (_STLP_NO_THREADS) -# define _STLP_NO_THREADS -# endif -#endif - -#if !defined(_STLP_USE_DYNAMIC_LIB) && !defined(_STLP_USE_STATIC_LIB) -/* - * Turn _STLP_USE_DYNAMIC_LIB to enforce use of .dll version of STLport library. - * NOTE: please do that only if you know what you are doing! - * Changing default will require you to change makefiles in "build" accordingly - * and to rebuild STLPort library! - * On UNIX, this has no effect, see build/lib/README for make tags. - * See STLport configuration file (build/lib/configure.bat) for help in building - * the require library versions. - */ -/* -#define _STLP_USE_DYNAMIC_LIB -*/ - -/* - * Turn _STLP_USE_STATIC_LIB to enforce use of static version of STLport library. - * NOTE: please do that only if you know what you are doing! - * Changing default will require you to change makefile in "build" accordingly - * and to rebuild STLPort library! - * On UNIX, this has no effect, see build/lib/README for make tags. - * See STLport configuration file (build/lib/configure.bat) for help in building - * the require library versions. - */ -/* -#define _STLP_USE_STATIC_LIB -*/ -#endif - -/* - * Signal STLport that we are using the cygwin distrib with the -mno-cygwin option. - * This is similar to a mingw environment except that relative path to native headers - * is different, this is why we need this macro. - */ -/* -#define _STLP_NO_CYGWIN - */ - -/* - * Edit relative path below (or put full path) to get native - * compiler vendor's headers included. Default is "../include" - * for _STLP_NATIVE_INCLUDE_PATH, default for other macros is - * _STLP_NATIVE_INCLUDE_PATH. - * Hint: never install STLport in the directory that ends with "include" - */ -/* -#undef _STLP_NATIVE_INCLUDE_PATH -#define _STLP_NATIVE_INCLUDE_PATH ../include -*/ -/* same for C library headers like */ -/* -#undef _STLP_NATIVE_CPP_C_INCLUDE_PATH -#define _STLP_NATIVE_CPP_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH -*/ -/* same for C headers like */ -/* -#undef _STLP_NATIVE_C_INCLUDE_PATH -#define _STLP_NATIVE_C_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH -*/ -/* Some compilers locate basic C++ runtime support headers (, , ) in separate directory */ -/* -#undef _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH -#define _STLP_NATIVE_CPP_RUNTIME_INCLUDE_PATH _STLP_NATIVE_INCLUDE_PATH -*/ - -/* - * If namespases available, STLport use own namespace (and masquerade - * it as std). Disable own namespace may cause undefined behaviour. - */ -/* -#define _STLP_NO_OWN_NAMESPACE 1 -*/ - -/* - * Uncomment _STLP_LEAKS_PEDANTIC to force deallocation of ALL allocated - * memory chunks. Normally not required. But if you worry about quazi-leaks - * (may be reported by some leaks detection tools), use - * _STLP_LEAKS_PEDANTIC. It should be used with _STLP_USE_NEWALLOC or - * _STLP_USE_MALLOC (see below), the default node_alloc allocator also clean - * its internal memory pool but only if STLport is used as a dynamic library - * under Win32 (using MSVC like compilers). - */ -/* -#define _STLP_LEAKS_PEDANTIC 1 -*/ - -/* - * Uncomment _STLP_USE_NEWALLOC to force allocator to use plain "new" - * instead of STLport optimized node allocator engine. - */ -/* -#define _STLP_USE_NEWALLOC 1 -*/ - -/* - * Uncomment _STLP_USE_MALLOC to force allocator to use plain "malloc" - * instead of STLport optimized node allocator engine. - */ -/* -#define _STLP_USE_MALLOC 1 -*/ - -/* - * Uncomment _STLP_USE_PERTHREAD_ALLOC to force allocator to use - * a specific implementation targetting the massively multi-threaded - * environment. The implementation is based on the POSIX pthread - * interface. - */ -/* -#define _STLP_USE_PERTHREAD_ALLOC 1 -*/ - -/* - * Set _STLP_DEBUG_ALLOC to use allocators that perform memory debugging, - * such as padding/checking for memory consistency - */ -/* -#define _STLP_DEBUG_ALLOC 1 -*/ - -/* - * For compiler not supporting partial template specialization or ordering of - * template functions STLport implement a workaround based on inheritance - * detection. This inheritance can introduce trouble in client code when - * a user class derived a STL container (which is not advised as STL containers - * do not have virtual destructors). To disable this workaround turn this macro on: - */ -/* -#define _STLP_DONT_USE_PARTIAL_SPEC_WRKD 1 -*/ - -/* - * Uncomment this to force all debug diagnostic to be directed through a - * user-defined global function: - * void __stl_debug_message(const char * format_str, ...) - * instead of predefined STLport routine. - * This allows you to take control of debug message output. - * Default routine calls fprintf(stderr,...) - * Note : If you set this macro, you must supply __stl_debug_message - * function definition somewhere. - */ -/* -#define _STLP_DEBUG_MESSAGE 1 -*/ - -/* - * Uncomment this to force all failed assertions to be executed through - * user-defined global function: - * void __stl_debug_terminate(void). This allows - * you to take control of assertion behaviour for debugging purposes. - * Default routine calls _STLP_ABORT(). - * Note : If you set this macro, you must supply __stl_debug_terminate - * function definition somewhere. - */ -/* -#define _STLP_DEBUG_TERMINATE 1 -*/ - -/* - * Uncomment that to disable exception handling code - */ -/* -#define _STLP_DONT_USE_EXCEPTIONS 1 -*/ - -/* - * _STLP_NO_NAMESPACES: if defined, don't put the library in namespace - * stlport:: or std::, even if the compiler supports namespaces - */ -/* -#define _STLP_NO_NAMESPACES 1 -*/ - -/*========================================================== - * Compatibility section - *==========================================================*/ - -/* - * Use abbreviated class names for linker benefit (don't affect interface). - * This option is obsolete, but should work in this release. - * - */ -/* -#define _STLP_USE_ABBREVS -*/ - -/* - * This definition precludes STLport reverse_iterator to be compatible with - * other parts of MSVC library. (With partial specialization, it just - * has no effect). - * Use it _ONLY_ if you use SGI-style reverse_iterator<> template explicitly - */ -/* -#define _STLP_NO_MSVC50_COMPATIBILITY 1 -*/ - -/* - * _STLP_USE_RAW_SGI_ALLOCATORS is a hook so that users can disable use of - * allocator as default parameter for containers, and use SGI - * raw allocators as default ones, without having to edit library headers. - * Use of this macro is strongly discouraged. - */ -/* -#define _STLP_USE_RAW_SGI_ALLOCATORS 1 -*/ - -/* - * Use obsolete overloaded template functions iterator_category(), value_type(), distance_type() - * for querying iterator properties. Please note those names are non-standard and are not guaranteed - * to be used by every implementation. However, this setting is on by default when partial specialization - * is not implemented in the compiler and cannot be simulated (only if _STLP_NO_ANACHRONISMS is not set). - * Use of those interfaces for user-defined iterators is strongly discouraged: - * please use public inheritance from iterator<> template to achieve desired effect. - * Second form is to disable old-style queries in any case. - */ -/* -#define _STLP_USE_OLD_HP_ITERATOR_QUERIES -#define _STLP_NO_OLD_HP_ITERATOR_QUERIES -*/ - - -/*==========================================================================*/ - -/* This section contains swithes which should be off by default, - * but so few compilers would have it undefined, so that we set them here, - * with the option to be turned off later in compiler-specific file - */ - -#define _STLP_NO_UNCAUGHT_EXCEPT_SUPPORT -#define _STLP_NO_UNEXPECTED_EXCEPT_SUPPORT - -/* - Local Variables: - mode:C++ - End: -*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/config/user_config.h --- a/epoc32/include/tools/stlport/stl/config/user_config.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,312 +0,0 @@ -/* - * Copyright (c) 1999 - * Boris Fomitchev - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - */ - -/* - * Purpose of this file : - * - * To hold user-definable portion of STLport settings which may be overridden - * on per-project basis. - * Please note that if you use STLport iostreams (compiled library) then you have - * to use consistent settings when you compile STLport library and your project. - * Those settings are defined in host.h and have to be the same for a given - * STLport installation. - */ - - -/*========================================================== - * User-settable macros that control compilation: - * Features selection - *==========================================================*/ - -/* - * Use this switch for embedded systems where no iostreams are available - * at all. STLport own iostreams will also get disabled automatically then. - * You can either use STLport iostreams, or no iostreams. - * If you want iostreams, you have to compile library in ../build/lib - * and supply resulting library at link time. - */ -/* -#define _STLP_NO_IOSTREAMS 1 -*/ - -/* - * Set _STLP_DEBUG to turn the "Debug Mode" on. - * That gets you checked iterators/ranges in the manner - * of "Safe STL". Very useful for debugging. Thread-safe. - * Please do not forget to link proper STLport library flavor - * (e.g libstlportstlg.so or libstlportstlg.a) when you set this flag - * in STLport iostreams mode, namespace customization guaranty that you - * link to the right library. - */ -/* -#define _STLP_DEBUG 1 -*/ -/* - * You can also choose the debug level: - * STLport debug level: Default value - * Check only what the STLport implementation consider as invalid. - * It also change the iterator invalidation schema. - * Standard debug level: Check for all operations the standard consider as "undefined behavior" - * even if STlport implement it correctly. It also invalidates iterators - * more often. - */ -/* -#define _STLP_DEBUG_LEVEL _STLP_STLPORT_DBG_LEVEL -#define _STLP_DEBUG_LEVEL _STLP_STANDARD_DBG_LEVEL -*/ -/* When an inconsistency is detected by the 'safe STL' the program will abort. - * If you prefer an exception define the following macro. The thrown exception - * will be the Standard runtime_error exception. - */ -/* -#define _STLP_DEBUG_MODE_THROWS - */ - -/* - * _STLP_NO_CUSTOM_IO : define this if you do not instantiate basic_xxx iostream - * classes with custom types (which is most likely the case). Custom means types - * other than char, wchar_t, char_traits<> and allocator<> like - * basic_ostream > or - * basic_string, my_allocator > - * When this option is on, most non-inline template functions definitions for iostreams - * are not seen by the client which saves a lot of compile time for most compilers, - * also object and executable size for some. - * Default is off, just not to break compilation for those who do use those types. - * That also guarantees that you still use optimized standard i/o when you compile - * your program without optimization. Option does not affect STLport library build; you - * may use the same binary library with and without this option, on per-project basis. - */ -/* -#define _STLP_NO_CUSTOM_IO -*/ - -/* - * _STLP_NO_RELOPS_NAMESPACE: if defined, don't put the relational - * operator templates (>, <=. >=, !=) in namespace std::rel_ops, even - * if the compiler supports namespaces. - * Note : if the compiler do not support namespaces, those operators are not be provided by default, - * to simulate hiding them into rel_ops. This was proved to resolve many compiler bugs with ambiguity. - */ -/* -#define _STLP_NO_RELOPS_NAMESPACE 1 -*/ - -/* - * If _STLP_USE_OWN_NAMESPACE is in effect, STLport by default will try - * to rename std:: for the user to stlport::. If you do not want this feature, - * please define the following switch and then use stlport:: - */ -/* -#define _STLP_DONT_REDEFINE_STD 1 -*/ - -/* - * _STLP_WHOLE_NATIVE_STD : only meaningful in _STLP_USE_OWN_NAMESPACE mode. - * Normally, STLport only imports necessary components from native std:: namespace - - * those not yet provided by STLport (, , etc.) - * and their dependencies (, ). - * You might want everything from std:: being available in std:: namespace when you - * include corresponding STLport header (like STLport provides std::map as well, etc.), - * if you are going to use both stlport:: and std:: components in your code. - * Otherwise this option is not recommended as it increases the size of your object files - * and slows down compilation. - */ -/* -#define _STLP_WHOLE_NATIVE_STD -*/ - -/* - * Use this option to catch uninitialized members in your classes. - * When it is set, construct() and destroy() fill the class storage - * with _STLP_SHRED_BYTE (see below). - * Note : _STLP_DEBUG and _STLP_DEBUG_ALLOC don't set this option automatically. - */ -/* -#define _STLP_DEBUG_UNINITIALIZED 1 -#define _STLP_DEBUG_ALLOC 1 -*/ - -/* - * Uncomment and provide a definition for the byte with which raw memory - * will be filled if _STLP_DEBUG_ALLOC or _STLP_DEBUG_UNINITIALIZED is defined. - * Choose a value which is likely to cause a noticeable problem if dereferenced - * or otherwise abused. A good value may already be defined for your platform; see - * stl/_config.h - */ -/* -#define _STLP_SHRED_BYTE 0xA3 -*/ - -/* - * This option is for gcc users only and only affects systems where native linker - * does not let gcc to implement automatic instantiation of static template data members/ - * It is being put in this file as there is no way to check if we are using GNU ld automatically, - * so it becomes user's responsibility. - */ -/* -#define _STLP_GCC_USES_GNU_LD -*/ - -/*========================================================== - * Compatibility section - *==========================================================*/ - -/* - * Define this macro to disable anachronistic constructs (like the ones used in HP STL and - * not included in final standard, etc. - */ -/* -#define _STLP_NO_ANACHRONISMS 1 -*/ - -/* - * Define this macro to disable STLport extensions (for example, to make sure your code will - * compile with some other implementation ) - */ -/* -#define _STLP_NO_EXTENSIONS 1 -*/ - -/* - * You should define this macro if compiling with MFC - STLport - * then include instead of to get synchronisation primitives - */ -/* -#define _STLP_USE_MFC 1 -*/ - -/* - * boris : this setting is here as we cannot detect precense of new Platform SDK automatically - * If you are using new PSDK with VC++ 6.0 or lower, - * please define this to get correct prototypes for InterlockedXXX functions - */ -/* -#define _STLP_NEW_PLATFORM_SDK 1 -*/ - -/* - * For the same reason as the one above we are not able to detect easily use - * of the compiler coming with the Platform SDK instead of the one coming with - * a Microsoft Visual Studio release. This change native C/C++ library location - * and implementation, please define this to get correct STLport configuration. - */ -/* -#define _STLP_USING_PLATFORM_SDK_COMPILER 1 -*/ - -/* - * Some compilers support the automatic linking feature. - * Uncomment the following if you prefer to specify the STLport library - * to link with yourself. - * For the moment, this feature is only supported and implemented within STLport - * by the Microsoft compilers. - */ -/* -#define _STLP_DONT_USE_AUTO_LINK 1 -*/ - -/* - * If you customize the STLport generated library names don't forget to give - * the motif you used during configuration here if you still want the auto link - * to work. (Do not remove double quotes in the macro value) - */ -/* -#define _STLP_LIB_NAME_MOTIF "???" - */ - -/* - * When using automatic linking (see above), output a message that tells the - * user which lib is getting linked via 'pragma message(..)'. - * This setting has no effect if automatic linking is not active. - */ -/* -#define _STLP_VERBOSE_AUTO_LINK 1 -*/ - -/* - * Use minimum set of default arguments on template classes that have more - * than one - for example map<>, set<>. - * This has effect only if _STLP_LIMITED_DEFAULT_TEMPLATES is on. - * If _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS is set, you'll be able to compile - * set with those compilers, but you'll have to use __set__> - * - * Affects : map<>, multimap<>, set<>, multiset<>, hash_*<>, - * queue<>, priority_queue<>, stack<>, istream_iterator<> - */ -/* -#define _STLP_MINIMUM_DEFAULT_TEMPLATE_PARAMS 1 -*/ - -/* - * The agregation of strings using the + operator is an expensive operation - * as it requires construction of temporary objects that need memory allocation - * and deallocation. The problem can be even more important if you are adding - * several strings together in a single expression. To avoid this problem STLport - * implement expression template. With this technique addition of 2 strings is not - * a string anymore but a temporary object having a reference to each of the - * original strings involved in the expression. This object carry information - * directly to the destination string to set its size correctly and only make - * a single call to the allocator. This technique also works for the addition of - * N elements where elements are basic_string, C string or a single character. - * The drawback can be longer compilation time and bigger executable size. - * STLport rebuild: Yes - */ -/* -#define _STLP_USE_TEMPLATE_EXPRESSION 1 -*/ - -/* - * By default the STLport basic_string implementation use a little static buffer - * (of 16 chars when writing this doc) to avoid systematically memory allocation - * in case of little basic_string. The drawback of such a method is bigger - * basic_string size and some performance penalty for method like swap. If you - * prefer systematical dynamic allocation turn on this macro. - * STLport rebuild: Yes - */ -/* -#define _STLP_DONT_USE_SHORT_STRING_OPTIM 1 -*/ - -/* - * To reduce the famous code bloat trouble due to the use of templates STLport grant - * a specialization of some containers for pointer types. So all instanciations - * of those containers with a pointer type will use the same implementation based on - * a container of void*. This feature has show very good result on object files size - * but after link phase and optimization you will only experiment benefit if you use - * many container with pointer types. - */ -/* -#define _STLP_USE_PTR_SPECIALIZATIONS 1 -*/ - -/* - * To achieve many different optimizations within the template implementations STLport - * uses some type traits technique. With this macro you can ask STLport to use the famous - * boost type traits rather than the internal one. The advantages are more compiler - * integration and a better support. If you only define this macro once the STLport has been - * built you just have to add the boost install path within your include path. If you want - * to use this feature at STLport built time you will have to define the - * STLP_BUILD_BOOST_PATH enrironment variable with the value of the boost library path. - */ -/* -#define _STLP_USE_BOOST_SUPPORT 1 -*/ - -/*==========================================================*/ - -/* - Local Variables: - mode: C++ - End: -*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/debug/_debug.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/tools/stlport/stl/debug/_debug.c Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,496 @@ +/* + * © Portions copyright (c) 2006-2007 Nokia Corporation. All rights reserved. + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +# ifndef _STLP_DEBUG_C +# define _STLP_DEBUG_C + +#if defined ( _STLP_DEBUG ) + +# ifdef _STLP_THREADS +# ifndef _STLP_NEED_MUTABLE +# define _STLP_ACQUIRE_LOCK(_Lock) _Lock._M_acquire_lock(); +# define _STLP_RELEASE_LOCK(_Lock) _Lock._M_release_lock(); +# else +# define _STLP_ACQUIRE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_acquire_lock(); +# define _STLP_RELEASE_LOCK(_Lock) ((_STLP_mutex&)_Lock)._M_release_lock(); +# endif /* _STLP_NEED_MUTABLE */ +# else +# define _STLP_ACQUIRE_LOCK(_Lock) +# define _STLP_RELEASE_LOCK(_Lock) +# endif /* _STLP_THREADS */ + +_STLP_BEGIN_NAMESPACE + +//========================================================== +// global non-inline functions +//========================================================== + +// [ i1, i2) +template +inline bool _STLP_CALL +__in_range_aux(const _Iterator& __it, const _Iterator& __first, + const _Iterator& __last, const random_access_iterator_tag &) { + return ( __it >= __first && + __it < __last); +} + +template +# if defined (_STLP_MSVC) && (_STLP_MSVC >= 1100) +inline bool _STLP_CALL __in_range_aux(_Iterator1 __it, const _Iterator& __first, +# else +inline bool _STLP_CALL __in_range_aux(const _Iterator1& __it, const _Iterator& __first, +# endif + const _Iterator& __last, const forward_iterator_tag &) { + _Iterator1 __i(__first); + for (; __i != __last && __i != __it; ++__i); + return (__i!=__last); +} + +# if defined (_STLP_NONTEMPL_BASE_MATCH_BUG) +template +inline bool _STLP_CALL +__in_range_aux(const _Iterator1& __it, const _Iterator& __first, + const _Iterator& __last, const bidirectional_iterator_tag &) { + _Iterator1 __i(__first); + for (; __i != __last && __i != __it; ++__i); + return (__i !=__last); +} +# endif + +template +bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last) { + _STLP_VERBOSE_RETURN(__valid_range(__first,__last), _StlMsg_INVALID_RANGE ) + return true; +} + +template +bool _STLP_CALL __check_range(const _Iterator& __it, + const _Iterator& __start, const _Iterator& __finish) { + _STLP_VERBOSE_RETURN(__in_range(__it,__start, __finish), + _StlMsg_NOT_IN_RANGE_1) + return true; +} + +template +bool _STLP_CALL __check_range(const _Iterator& __first, const _Iterator& __last, + const _Iterator& __start, const _Iterator& __finish) { + _STLP_VERBOSE_RETURN(__in_range(__first, __last, __start, __finish), + _StlMsg_NOT_IN_RANGE_2) + return true; +} + +//=============================================================== + +template +void _STLP_CALL __invalidate_range(const __owned_list* __base, + const _Iterator& __first, + const _Iterator& __last) +{ + typedef _Iterator* _Safe_iterator_ptr; + typedef __owned_link _L_type; + _STLP_ACQUIRE_LOCK(__base->_M_lock) + _L_type* __pos; + _L_type* __prev; + + for (__prev = (_L_type*)&__base->_M_node, __pos= (_L_type*)__prev->_M_next; + __pos!=0;) { + if ((!(&__first == (_Iterator*)__pos || &__last == (_Iterator*)__pos)) + && __in_range_aux( + ((_Iterator*)__pos)->_M_iterator, + __first._M_iterator, + __last._M_iterator, + _STLP_ITERATOR_CATEGORY(__first, _Iterator))) { + __pos->_M_owner = 0; + __pos = (_L_type*) (__prev->_M_next = __pos->_M_next); + } + else { + __prev = __pos; + __pos=(_L_type*)__pos->_M_next; + } + } + _STLP_RELEASE_LOCK(__base->_M_lock) +} + +template +void _STLP_CALL __invalidate_iterator(const __owned_list* __base, + const _Iterator& __it) +{ + typedef __owned_link _L_type; + _L_type* __position, *__prev; + _STLP_ACQUIRE_LOCK(__base->_M_lock) + for (__prev = (_L_type*)&__base->_M_node, __position = (_L_type*)__prev->_M_next; + __position!= 0;) { + // this requires safe iterators to be derived from __owned_link + if ((__position != (_L_type*)&__it) && ((_Iterator*)__position)->_M_iterator ==__it._M_iterator) { + __position->_M_owner = 0; + __position = (_L_type*) (__prev->_M_next = __position->_M_next); + } + else { + __prev = __position; + __position=(_L_type*)__position->_M_next; + } + } + _STLP_RELEASE_LOCK(__base->_M_lock) +} + +_STLP_END_NAMESPACE + +# endif /* _STLP_DEBUG */ + +# if defined (_STLP_EXPOSE_GLOBALS_IMPLEMENTATION) + +// dwa 12/26/99 -- for abort +# if defined (_STLP_USE_NEW_C_HEADERS) +# include +# else +# include +# endif + +# if defined (_STLP_WIN32) +# include +# endif + +//========================================================== +// .c section +// owned_list non-inline methods and global functions +//========================================================== + +#if defined ( _STLP_ASSERTIONS ) + +_STLP_BEGIN_NAMESPACE + +# ifndef _STLP_STRING_LITERAL +# define _STLP_STRING_LITERAL(__x) __x +# endif + +# ifdef _STLP_WINCE +# define _STLP_PERCENT_S "%hs" +# else +# define _STLP_PERCENT_S "%s" +# endif + +# define _STLP_MESSAGE_TABLE_BODY = { \ +_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error: %s\n"), \ +_STLP_STRING_LITERAL(_STLP_PERCENT_S "(%d): STL assertion failure : " _STLP_PERCENT_S "\n" _STLP_ASSERT_MSG_TRAILER), \ +_STLP_STRING_LITERAL("\n" _STLP_PERCENT_S "(%d): STL error : " _STLP_PERCENT_S "\n" _STLP_PERCENT_S "(%d): STL assertion failure: " _STLP_PERCENT_S " \n" _STLP_ASSERT_MSG_TRAILER), \ +_STLP_STRING_LITERAL("Invalid argument to operation (see operation documentation)"), \ +_STLP_STRING_LITERAL("Taking an iterator out of destroyed (or otherwise corrupted) container"), \ +_STLP_STRING_LITERAL("Trying to extract an object out from empty container"),\ +_STLP_STRING_LITERAL("Past-the-end iterator could not be erased"), \ +_STLP_STRING_LITERAL("Index out of bounds"), \ +_STLP_STRING_LITERAL("Container doesn't own the iterator"), \ +_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) iterator used"), \ +_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) lefthand iterator in expression"), \ +_STLP_STRING_LITERAL("Uninitialized or invalidated (by mutating operation) righthand iterator in expression"), \ +_STLP_STRING_LITERAL("Iterators used in expression are from different owners"), \ +_STLP_STRING_LITERAL("Iterator could not be dereferenced (past-the-end ?)"), \ +_STLP_STRING_LITERAL("Range [first,last) is invalid"), \ +_STLP_STRING_LITERAL("Iterator is not in range [first,last)"), \ +_STLP_STRING_LITERAL("Range [first,last) is not in range [start,finish)"), \ +_STLP_STRING_LITERAL("The advance would produce invalid iterator"), \ +_STLP_STRING_LITERAL("Iterator is singular (advanced beyond the bounds ?)"), \ +_STLP_STRING_LITERAL("Memory block deallocated twice"), \ +_STLP_STRING_LITERAL("Deallocating a block that was never allocated"), \ +_STLP_STRING_LITERAL("Deallocating a memory block allocated for another type"), \ +_STLP_STRING_LITERAL("Size of block passed to deallocate() doesn't match block size"), \ +_STLP_STRING_LITERAL("Pointer underrun - safety margin at front of memory block overwritten"), \ +_STLP_STRING_LITERAL("Pointer overrrun - safety margin at back of memory block overwritten"), \ +_STLP_STRING_LITERAL("Attempt to dereference null pointer returned by auto_ptr::get()"), \ +_STLP_STRING_LITERAL("Unknown problem") \ + } + +# if ( _STLP_STATIC_TEMPLATE_DATA > 0 ) +#ifdef __SYMBIAN32__ +template +const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX];// _STLP_MESSAGE_TABLE_BODY; +#else +template +const char* __stl_debug_engine<_Dummy>::_Message_table[_StlMsg_MAX] _STLP_MESSAGE_TABLE_BODY; +#endif + +# else +__DECLARE_INSTANCE(const char*, __stl_debug_engine::_Message_table[_StlMsg_MAX], + _STLP_MESSAGE_TABLE_BODY); + +# endif + +# undef _STLP_STRING_LITERAL +# undef _STLP_PERCENT_S +_STLP_END_NAMESPACE + +// abort() +# include + +# if !defined( _STLP_DEBUG_MESSAGE ) + +# include +# include + +_STLP_BEGIN_NAMESPACE + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Message(const char * __format_str, ...) +{ + STLPORT_CSTD::va_list __args; + va_start( __args, __format_str ); + +# if defined (_STLP_WINCE) + TCHAR __buffer[512]; + int _convert = strlen(__format_str) + 1; + LPWSTR _lpw = (LPWSTR)alloca(_convert*sizeof(wchar_t)); + _lpw[0] = '\0'; + MultiByteToWideChar(GetACP(), 0, __format_str, -1, _lpw, _convert); + wvsprintf(__buffer, _lpw, __args); + // wvsprintf(__buffer, __format_str, __args); + _STLP_WINCE_TRACE(__buffer); +# elif defined (_STLP_WIN32) && ( defined(_STLP_MSVC) || defined (__ICL) || defined (__BORLANDC__)) && ! defined (__WINS__) + char __buffer [4096]; + _vsnprintf(__buffer, sizeof(__buffer) / sizeof(char), + __format_str, __args); + OutputDebugStringA(__buffer); +# elif defined (__amigaos__) + STLPORT_CSTD::vfprintf(stderr, __format_str, (char *)__args); +# else + STLPORT_CSTD::vfprintf(stderr, __format_str, __args); +# endif /* WINCE */ + +# ifdef _STLP_DEBUG_MESSAGE_POST + _STLP_DEBUG_MESSAGE_POST +# endif + + va_end(__args); + +} + +_STLP_END_NAMESPACE + +# endif /* _STLP_DEBUG_MESSAGE */ + + +_STLP_BEGIN_NAMESPACE + + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_IndexedError(int __error_ind, const char* __f, int __l) +{ + __stl_debug_message(_Message_table[_StlFormat_ERROR_RETURN], + __f, __l, _Message_table[__error_ind]); +} + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l) +{ + __stl_debug_message(_Message_table[_StlFormat_VERBOSE_ASSERTION_FAILURE], + __f, __l, _Message_table[__error_ind], __f, __l, __expr); + __stl_debug_terminate(); +} + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Assert(const char* __expr, const char* __f, int __l) +{ + __stl_debug_message(_Message_table[_StlFormat_ASSERTION_FAILURE],__f, __l, __expr); + __stl_debug_terminate(); +} + +// if exceptions are present, sends unique exception +// if not, calls abort() to terminate +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Terminate() +{ +# ifdef _STLP_USE_NAMESPACES + using namespace _STLP_STD; +# endif +# if defined (_STLP_USE_EXCEPTIONS) && ! defined (_STLP_NO_DEBUG_EXCEPTIONS) + throw __stl_debug_exception(); +# else + _STLP_ABORT(); +# endif +} + +_STLP_END_NAMESPACE + +# endif /* _STLP_ASSERTIONS */ + +#ifdef _STLP_DEBUG + +_STLP_BEGIN_NAMESPACE + +//========================================================== +// owned_list non-inline methods +//========================================================== + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Invalidate_all(__owned_list* __l) { + _STLP_ACQUIRE_LOCK(__l->_M_lock); + _Stamp_all(__l, 0); + __l->_M_node._M_next =0; + _STLP_RELEASE_LOCK(__l->_M_lock); +} + +// boris : this is unasafe routine; should be used from within critical section only ! +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Stamp_all(__owned_list* __l, __owned_list* __o) { + // crucial + if (__l->_M_node._M_owner) { + for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next; + __position != 0; __position= (__owned_link*)__position->_M_next) { + _STLP_ASSERT(__position->_Owner()== __l) + __position->_M_owner=__o; + } + } +} + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Verify(const __owned_list* __l) { + _STLP_ACQUIRE_LOCK(__l->_M_lock); + if (__l) { + _STLP_ASSERT(__l->_M_node._Owner() != 0) + for (__owned_link* __position = (__owned_link*)__l->_M_node._M_next; + __position != 0; __position= (__owned_link*)__position->_M_next) { + _STLP_ASSERT(__position->_Owner()== __l) + } + } + _STLP_RELEASE_LOCK(__l->_M_lock); +} + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_Swap_owners(__owned_list& __x, __owned_list& __y) { + + // according to the standard : --no swap() function invalidates any references, + // pointers, or iterators referring to the elements of the containers being swapped. + + __owned_link* __tmp; + + // boris : there is a deadlock potential situation here if we lock two containers sequentially. + // As user is supposed to provide its own synchronization around swap() ( it is unsafe to do any container/iterator access + // in parallel with swap()), we just do not use any locking at all -- that behaviour is closer to non-debug version + + __tmp = __x._M_node._M_next; + + _Stamp_all(&__x, &__y); + _Stamp_all(&__y, &__x); + + __x._M_node._M_next = __y._M_node._M_next; + __y._M_node._M_next = __tmp; + +} + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_M_detach(__owned_list* __l, __owned_link* __c_node) { + if (__l != 0) { + + _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER) + + _STLP_ACQUIRE_LOCK(__l->_M_lock) + // boris : re-test the condition in case someone else already deleted us + if(__c_node->_M_owner != 0) { + __owned_link* __prev, *__next; + + for (__prev = &__l->_M_node; (__next = __prev->_M_next) != __c_node; + __prev = __next) { + _STLP_ASSERT(__next && __next->_Owner() == __l) + } + + __prev->_M_next = __c_node->_M_next; + __c_node->_M_owner=0; + } + _STLP_RELEASE_LOCK(__l->_M_lock) + } +} + +template +void _STLP_CALL +__stl_debug_engine<_Dummy>::_M_attach(__owned_list* __l, __owned_link* __c_node) { + if (__l ==0) { + (__c_node)->_M_owner = 0; + } else { + _STLP_VERBOSE_ASSERT(__l->_Owner()!=0, _StlMsg_INVALID_CONTAINER) + _STLP_ACQUIRE_LOCK(__l->_M_lock) + __c_node->_M_owner = __l; + __c_node->_M_next = __l->_M_node._M_next; + __l->_M_node._M_next = __c_node; + _STLP_RELEASE_LOCK(__l->_M_lock) + } +} + + +template +void* _STLP_CALL +__stl_debug_engine<_Dummy>::_Get_container_ptr(const __owned_link* __l) { + const __owned_list* __owner = __l->_Owner(); + _STLP_VERBOSE_RETURN_0(__owner != 0, _StlMsg_INVALID_ITERATOR) + void* __ret = __CONST_CAST(void*,__owner->_Owner()); + _STLP_VERBOSE_RETURN_0(__ret !=0, _StlMsg_INVALID_CONTAINER) + return __ret; +} + +template +bool _STLP_CALL +__stl_debug_engine<_Dummy>::_Check_same_owner( const __owned_link& __i1, + const __owned_link& __i2) +{ + _STLP_VERBOSE_RETURN(__i1._Valid(), _StlMsg_INVALID_LEFTHAND_ITERATOR) + _STLP_VERBOSE_RETURN(__i2._Valid(), _StlMsg_INVALID_RIGHTHAND_ITERATOR) + _STLP_VERBOSE_RETURN((__i1._Owner()==__i2._Owner()), _StlMsg_DIFFERENT_OWNERS) + return true; +} + +template +bool _STLP_CALL +__stl_debug_engine<_Dummy>::_Check_same_owner_or_null( const __owned_link& __i1, + const __owned_link& __i2) +{ + _STLP_VERBOSE_RETURN(__i1._Owner()==__i2._Owner(), _StlMsg_DIFFERENT_OWNERS) + return true; +} + +template +bool _STLP_CALL +__stl_debug_engine<_Dummy>::_Check_if_owner( const __owned_list * __l, const __owned_link& __it) +{ + const __owned_list* __owner_ptr = __it._Owner(); + _STLP_VERBOSE_RETURN(__owner_ptr!=0, _StlMsg_INVALID_ITERATOR) + _STLP_VERBOSE_RETURN(__l==__owner_ptr, _StlMsg_NOT_OWNER) + return true; +} + + +_STLP_END_NAMESPACE + +#endif /* _STLP_DEBUG */ + +#endif /* if defined (EXPOSE_GLOBALS_IMPLEMENTATION) */ + +#endif /* header guard */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/debug/_debug.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/tools/stlport/stl/debug/_debug.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,426 @@ +/* + * + * Copyright (c) 1997 + * Moscow Center for SPARC Technology + * + * Copyright (c) 1999 + * Boris Fomitchev + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + */ + +#ifndef _STLP_DEBUG_H +# define _STLP_DEBUG_H + +# if defined (_STLP_ASSERTIONS) || defined (_STLP_DEBUG) + +#ifndef _STLP_CONFIG_H +# include +#endif + +# if !defined (_STLP_EXTRA_OPERATORS_FOR_DEBUG) && \ + ( defined (_STLP_BASE_MATCH_BUG) || (defined (_STLP_MSVC) && _STLP_MSVC < 1100 ) ) +# define _STLP_EXTRA_OPERATORS_FOR_DEBUG +# endif + +# if !defined(_STLP_FILE__) +# define _STLP_FILE__ __FILE__ +# endif + +enum { + _StlFormat_ERROR_RETURN, + _StlFormat_ASSERTION_FAILURE, + _StlFormat_VERBOSE_ASSERTION_FAILURE, + _StlMsg_INVALID_ARGUMENT, + _StlMsg_INVALID_CONTAINER, + _StlMsg_EMPTY_CONTAINER, + _StlMsg_ERASE_PAST_THE_END, + _StlMsg_OUT_OF_BOUNDS, + _StlMsg_NOT_OWNER, + _StlMsg_INVALID_ITERATOR, + _StlMsg_INVALID_LEFTHAND_ITERATOR, + _StlMsg_INVALID_RIGHTHAND_ITERATOR, + _StlMsg_DIFFERENT_OWNERS , + _StlMsg_NOT_DEREFERENCEABLE , + _StlMsg_INVALID_RANGE , + _StlMsg_NOT_IN_RANGE_1 , + _StlMsg_NOT_IN_RANGE_2 , + _StlMsg_INVALID_ADVANCE , + _StlMsg_SINGULAR_ITERATOR , + // debug alloc messages + _StlMsg_DBA_DELETED_TWICE , + _StlMsg_DBA_NEVER_ALLOCATED , + _StlMsg_DBA_TYPE_MISMATCH , + _StlMsg_DBA_SIZE_MISMATCH , + _StlMsg_DBA_UNDERRUN , + _StlMsg_DBA_OVERRUN , + // auto_ptr messages + _StlMsg_AUTO_PTR_NULL , + _StlMsg_UNKNOWN + /* _StlMsg_MAX */ +}; + +/* have to hardcode that ;() */ +# define _StlMsg_MAX 27 + +_STLP_BEGIN_NAMESPACE + +// This class is unique (not inherited from exception), +// to disallow catch in anything but (...) +struct __stl_debug_exception { + // no members +}; + +class _STLP_CLASS_DECLSPEC __owned_link; +class _STLP_CLASS_DECLSPEC __owned_list; + +template +struct __stl_debug_engine { + + // Basic routine to report any debug message + // Use _STLP_DEBUG_MESSAGE to override + static void _STLP_CALL _Message(const char * format_str, ...); + + // Micsellanous function to report indexed error message + static void _STLP_CALL _IndexedError(int __ind, const char* __f, int __l); + + // Basic assertion report mechanism. + // Reports failed assertion via __stl_debug_message and calls _Terminate + // if _STLP_DEBUG_TERMINATE is specified, calls __stl_debug_terminate instead + static void _STLP_CALL _Assert(const char* __expr, const char* __f, int __l); + + // The same, with additional diagnostics + static void _STLP_CALL _VerboseAssert(const char* __expr, int __error_ind, const char* __f, int __l); + + // If exceptions are present, sends unique exception + // If not, calls _STLP_ABORT() to terminate + // Use _STLP_DEBUG_TERMINATE to override + static void _STLP_CALL _Terminate(); + +# ifdef _STLP_DEBUG + + // owned_list/link delegate non-inline functions here + + static bool _STLP_CALL _Check_same_owner( const __owned_link& __i1, + const __owned_link& __i2); + static bool _STLP_CALL _Check_same_owner_or_null( const __owned_link& __i1, + const __owned_link& __i2); + static bool _STLP_CALL _Check_if_owner( const __owned_list*, const __owned_link&); + + static void _STLP_CALL _Verify(const __owned_list*); + + static void _STLP_CALL _Swap_owners(__owned_list&, __owned_list& /*, bool __swap_roots */ ); + + static void _STLP_CALL _Invalidate_all(__owned_list*); + + static void _STLP_CALL _Stamp_all(__owned_list*, __owned_list*); + + static void _STLP_CALL _M_detach(__owned_list*, __owned_link*); + + static void _STLP_CALL _M_attach(__owned_list*, __owned_link*); + + // accessor : check and get pointer to the container + static void* _STLP_CALL _Get_container_ptr(const __owned_link*); +# endif /* _STLP_DEBUG */ + + // debug messages and formats + _STLP_STATIC_MEMBER_DECLSPEC static const char* _Message_table[_StlMsg_MAX]; +}; + + +# if defined (_STLP_USE_TEMPLATE_EXPORT) +_STLP_EXPORT_TEMPLATE struct _STLP_CLASS_DECLSPEC __stl_debug_engine; +# endif /* _STLP_USE_TEMPLATE_EXPORT */ + +typedef __stl_debug_engine __stl_debugger; + +_STLP_END_NAMESPACE + +# ifndef _STLP_ASSERT +# define _STLP_ASSERT(expr) \ + if (!(expr)) {STLPORT::__stl_debugger::_Assert( # expr, _STLP_FILE__, __LINE__);} +# endif + +# endif /* _STLP_ASSERTIONS || _STLP_DEBUG */ + + +// this section is for _STLP_DEBUG only +#if defined ( _STLP_DEBUG ) + +# ifndef _STLP_VERBOSE_ASSERT +// fbp : new form not requiring ";" +# define _STLP_VERBOSE_ASSERT(expr,__diag_num) \ + if (!(expr)) { STLPORT::__stl_debugger::_VerboseAssert\ + ( # expr, __diag_num, _STLP_FILE__, __LINE__ ); \ + } +# endif + +# define _STLP_DEBUG_CHECK(expr) _STLP_ASSERT(expr) +# define _STLP_DEBUG_DO(expr) expr; + +# ifndef _STLP_VERBOSE_RETURN +# define _STLP_VERBOSE_RETURN(__expr,__diag_num) if (!(__expr)) { \ + __stl_debugger::_IndexedError(__diag_num, __FILE__ , __LINE__); \ + return false; } +# endif + +# ifndef _STLP_VERBOSE_RETURN_0 +# define _STLP_VERBOSE_RETURN_0(__expr,__diag_num) if (!(__expr)) { \ + __stl_debugger::_IndexedError(__diag_num, __FILE__ , __LINE__); \ + return 0; } +# endif + +#if ! defined (_STLP_INTERNAL_THREADS_H) +# include +#endif + +#ifndef _STLP_INTERNAL_ITERATOR_BASE_H +# include +#endif + +_STLP_BEGIN_NAMESPACE + +//============================================================= +template +inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, + const random_access_iterator_tag&) { + return (__i1< __i2) || (__i1 == __i2); +} + +template +inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, + const bidirectional_iterator_tag&) { + // check if comparable + bool __dummy(__i1==__i2); + return (__dummy==__dummy); +} + +template +inline bool _STLP_CALL __valid_range(const _Iterator& __i1 ,const _Iterator& __i2, const forward_iterator_tag&) { + // check if comparable + bool __dummy(__i1==__i2); + return (__dummy==__dummy); +} + +template +inline bool _STLP_CALL __valid_range(const _Iterator&,const _Iterator&, const input_iterator_tag&) { + return true; +} + +template +inline bool _STLP_CALL __valid_range(const _Iterator&,const _Iterator&, const output_iterator_tag&) { + return true; +} + +template +inline bool _STLP_CALL __valid_range(const _Iterator& __i1, const _Iterator& __i2) { + return __valid_range(__i1,__i2,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)); +} + +// Note : that means in range [i1, i2]. +template +inline bool _STLP_CALL __in_range(const _Iterator& _It, const _Iterator& __i1, + const _Iterator& __i2) { + return __valid_range(__i1,_It,_STLP_ITERATOR_CATEGORY(__i1, _Iterator)) && + __valid_range(_It,__i2,_STLP_ITERATOR_CATEGORY(_It, _Iterator)); +} + +template +inline bool _STLP_CALL __in_range(const _Iterator& __first, const _Iterator& __last, + const _Iterator& __start, const _Iterator& __finish) { + return __valid_range(__first,__last,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) && + __valid_range(__start,__first,_STLP_ITERATOR_CATEGORY(__first, _Iterator)) && + __valid_range(__last,__finish,_STLP_ITERATOR_CATEGORY(__last, _Iterator)); +} + +//========================================================== + + +class _STLP_CLASS_DECLSPEC __owned_link { +public: + + __owned_link() : _M_owner(0) {} + __owned_link(const __owned_list* __c) : _M_owner(0), _M_next(0) { + __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__c), this); + } + __owned_link(const __owned_link& __rhs): _M_owner(0) { + __stl_debugger::_M_attach(__CONST_CAST(__owned_list*,__rhs._M_owner), this); + } + __owned_link& operator=(const __owned_link& __rhs) { + __owned_list* __new_owner = __CONST_CAST(__owned_list*,__rhs._M_owner); + __owned_list* __old_owner = _M_owner; + if ( __old_owner != __new_owner ) { + __stl_debugger::_M_detach(__old_owner, this); + __stl_debugger::_M_attach(__new_owner, this); + } + return *this; + } + ~__owned_link() { + __stl_debugger::_M_detach(_M_owner, this); + _Invalidate(); + } + + const __owned_list* _Owner() const { + return _M_owner; + } + __owned_list* _Owner() { + return _M_owner; + } + void _Set_owner(const __owned_list* __o) { + _M_owner= __CONST_CAST(__owned_list*,__o); + } + bool _Valid() const { + return _M_owner !=0; + } + + void _Invalidate() { _M_owner=0; _M_next = 0; } + void _Link_to_self() { _M_next= 0; } + + __owned_link* _Next() { return _M_next; } + const __owned_link* _Next() const { return _M_next; } + +public: + __owned_list* _M_owner; + __owned_link* _M_next; +}; + + +class _STLP_CLASS_DECLSPEC __owned_list { +public: + __owned_list(const void* __o) { + // fprintf(stderr, "__owned_list(): %p\n",(void*)this); + _M_node._M_owner = __CONST_CAST(__owned_list*, __REINTERPRET_CAST(const __owned_list*,__o)); + _M_node._M_next=0; + } + ~__owned_list() { + // fprintf(stderr, "~__owned_list(): %p\n",(void*)this); + _Invalidate_all(); + // that prevents detach + _M_node._Invalidate(); + } + const void* _Owner() const { + return (const void*)_M_node._M_owner; + } + void* _Owner() { + return (void*)_M_node._M_owner; + } + bool _Valid() const { + return _M_node._M_owner!=0; + } + void _Invalidate() { _M_node._M_owner=0; } + + __owned_link* _First() { return _M_node._Next(); } + __owned_link* _Last() { return 0 ; } + + const __owned_link* _First() const { return (__owned_link*)_M_node._M_next; } + const __owned_link* _Last() const { return 0 ;} + + void _Verify() const { + __stl_debugger::_Verify(this); + } + + void _Swap_owners(__owned_list& __y) { + __stl_debugger::_Swap_owners(*this, __y); + } + + void _Invalidate_all() { + __stl_debugger::_Invalidate_all(this); + } + + mutable __owned_link _M_node; + mutable _STLP_mutex _M_lock; + +private: + // should never be called, should be left undefined, + // but some compilers complain about it ;( + __owned_list(const __owned_list&){} + void operator=(const __owned_list&) {} + + friend class __owned_link; + friend struct __stl_debug_engine; +}; + + +//========================================================== + +// forward declaratioins + +template +bool _STLP_CALL __check_range(const _Iterator&, const _Iterator&); +template +bool _STLP_CALL __check_range(const _Iterator&, + const _Iterator&, const _Iterator&); +template +bool _STLP_CALL __check_range(const _Iterator&, const _Iterator& , + const _Iterator&, const _Iterator& ); + +template +void _STLP_CALL __invalidate_range(const __owned_list* __base, + const _Iterator& __first, + const _Iterator& __last); + +template +void _STLP_CALL __invalidate_iterator(const __owned_list* __base, + const _Iterator& __it); + +//============================================================ + +inline bool _STLP_CALL +__check_same_owner( const __owned_link& __i1, const __owned_link& __i2) { + return __stl_debugger::_Check_same_owner(__i1,__i2); +} +inline bool _STLP_CALL +__check_same_owner_or_null( const __owned_link& __i1, const __owned_link& __i2) { + return __stl_debugger::_Check_same_owner_or_null(__i1,__i2); +} + +template +inline bool _STLP_CALL __check_if_owner( const __owned_list* __owner, + const _Iterator& __it) { + return __stl_debugger::_Check_if_owner(__owner, (const __owned_link&)__it); +} + +_STLP_END_NAMESPACE + +# endif /* _STLP_DEBUG */ + +#if defined ( _STLP_ASSERTIONS ) + +# ifndef _STLP_ASSERT_MSG_TRAILER +# define _STLP_ASSERT_MSG_TRAILER +# endif + +// dwa 12/30/98 - if _STLP_DEBUG_MESSAGE is defined, the user can supply own definition. +# if !defined( _STLP_DEBUG_MESSAGE ) +# define __stl_debug_message __stl_debugger::_Message +# else + extern void __stl_debug_message(const char * format_str, ...); +# endif + +// fbp: if _STLP_DEBUG_TERMINATE is defined, the user can supply own definition. +# if !defined( _STLP_DEBUG_TERMINATE ) +# define __stl_debug_terminate __stl_debugger::_Terminate +# else + extern void __stl_debug_terminate(void); +# endif + +#endif + +# if !defined (_STLP_LINK_TIME_INSTANTIATION) +# include +# endif + +#endif /* DEBUG_H */ + +// Local Variables: +// mode:C++ +// End: + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/debug/_string_sum_methods.h --- a/epoc32/include/tools/stlport/stl/debug/_string_sum_methods.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2003 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -/* - * All the necessary methods used for template expressions with basic_string - * This file do not have to be macro guarded as it is only used in the _string.h - * file and it is a part of the basic_string definition. - */ - - template - basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s) - : _M_non_dbg_impl(_Reserve_t(), __s.size(), __s.get_allocator()), - _M_iter_list(&_M_non_dbg_impl) - { _M_append_sum(__s, _M_non_dbg_impl); } - - template - basic_string(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, - size_type __pos, size_type __n = npos, - const allocator_type& __a = allocator_type()) - : _M_non_dbg_impl(_Reserve_t(), (__pos <= __s.size()) ? ((min) (__n, __s.size() - __pos)) : 0, __a), - _M_iter_list(&_M_non_dbg_impl) { - size_type __size = __s.size(); - if (__pos > __size) - //This call will generate the necessary out of range exception: - _M_non_dbg_impl.at(0); - else - _M_append_sum_pos(__s, __pos, (min) (__n, __size - __pos), _M_non_dbg_impl); - } - -private: - _Base& _M_append_fast(_STLP_PRIV __char_wrapper<_CharT> __c, _Base &__str) - { return __str += __c.getValue(); } - _Base& _M_append_fast(_CharT const* __s, size_type __s_size, _Base &__str) - { return __str.append(__s, __s_size); } - _Base& _M_append_fast(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _Base &__str) - { return _M_append_fast(__s.c_str(), __s.size(), __str); } - _Base& _M_append_fast(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _Base &__str) - { return _M_append_fast(__s.b_str(), __str); } - _Base& _M_append_fast(_Self const& __s, _Base &__str) - { return _M_append_fast(__s.data(), __s.size(), __str); } - _Base& _M_append_fast(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _Base &__str) - { return __str; } - template - _Base& _M_append_fast(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, _Base &__str) - { return _M_append_fast(__s.getRhs(), _M_append_fast(__s.getLhs(), __str)); } - - _Base& _M_append_fast_pos(_STLP_PRIV __char_wrapper<_CharT> __c, _Base &__str, size_type /*__pos*/, size_type __n) { - if (__n == 0) - return __str; - return __str += __c.getValue(); - } - _Base& _M_append_fast_pos(_CharT const* __s, size_type __s_size, _Base &__str, - size_type __pos, size_type __n) - { return __str.append(__s + __pos, __s + __pos + (min)(__n, __s_size - __pos)); } - _Base& _M_append_fast_pos(_STLP_PRIV __cstr_wrapper<_CharT> const& __s, _Base &__str, - size_type __pos, size_type __n) - { return _M_append_fast_pos(__s.c_str(), __s.size(), __str, __pos, __n); } - _Base& _M_append_fast_pos(_STLP_PRIV __bstr_wrapper<_CharT, _Traits, _Alloc> __s, _Base &__str, - size_type __pos, size_type __n) - { return _M_append_fast_pos(__s.b_str(), __str, __pos, __n); } - _Base& _M_append_fast_pos(_Self const& __s, _Base &__str, size_type __pos, size_type __n) - { return _M_append_fast_pos(__s.data(), __s.size(), __str, __pos, __n); } - _Base& _M_append_fast_pos(_STLP_PRIV __sum_storage_elem<_CharT, _Traits, _Alloc> const&, _Base &__str, - size_type /*__pos*/, size_type /*__n*/) - { return __str; } - - template - _Base& _M_append_fast_pos(_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, - _Base &__str, size_type __pos, size_type __n) { - if (__n == 0) { - return __str; - } - size_type __lhs_size = __s.getLhs().size(); - if (__pos < __lhs_size) { - if (__n < (__lhs_size - __pos)) { - return _M_append_fast_pos(__s.getLhs(), __str, __pos, __n); - } else { - return _M_append_fast_pos(__s.getRhs(), _M_append_fast_pos(__s.getLhs(), __str, __pos, __n), - 0, __n - (__lhs_size - __pos)); - } - } else { - return _M_append_fast_pos(__s.getRhs(), __str, __pos - __lhs_size, __n); - } - } - - template - _Self& _M_append_sum (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, - _Base &__impl) { - _M_append_fast(__s, __impl); - return *this; - } - - template - _Self& _M_append_sum_pos (_STLP_PRIV __bstr_sum<_CharT, _Traits, _Alloc, _Left, _Right, _StorageDir> const& __s, - size_type __pos, size_type __n, _Base &__impl) { - _M_non_dbg_impl.reserve(_M_non_dbg_impl.size() + (min) (__s.size() - __pos, __n)); - _M_append_fast_pos(__s, __impl, __pos, __n); - return *this; - } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/stl/type_manips.h --- a/epoc32/include/tools/stlport/stl/type_manips.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,328 +0,0 @@ -/* - * - * Copyright (c) 2003 - * François Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - - -#ifndef _STLP_TYPE_MANIPS_H -#define _STLP_TYPE_MANIPS_H - -# if defined (__GNUC__) && (__GNUC__ > 3) -// See comment below -# include -# endif - -_STLP_BEGIN_NAMESPACE - -/* - * gcc (libstdc++) define __true_type in different headers, and while - * in gcc 3.x it in bits/type_traits.h that included only from headers - * that not included from STLport; in gcc 4.x it defined in - * bits/cpp_type_traits.h, that included well... from cmath for example - * - * libstdc++ v3, __GLIBCXX__ 20050519 (3.4.4) use variant 1, - * libstdc++ v3, __GLIBCXX__ 20060306 (3.4.6) use variant 1, - * while libstdc++ v3, __GLIBCXX__ 20050921 (4.0.2) use variant 2, - * __GLIBCXX__ 20060524 (4.1.1) use variant 2 - * muddle in libstdc++ versions... - * - */ -# if defined (__GNUC__) && (__GNUC__ > 3) -using ::__true_type; -using ::__false_type; -# else -struct __true_type {}; -struct __false_type {}; -# endif - -#if defined (_STLP_USE_NAMESPACES) -_STLP_MOVE_TO_PRIV_NAMESPACE -using _STLP_STD::__true_type; -using _STLP_STD::__false_type; -_STLP_MOVE_TO_STD_NAMESPACE -#endif - -//bool to type -template -struct __bool2type -{ typedef __true_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct __bool2type<1> { typedef __true_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct __bool2type<0> { typedef __false_type _Ret; }; - -//type to bool -template -struct __type2bool { enum {_Ret = 1}; }; - -_STLP_TEMPLATE_NULL -struct __type2bool<__true_type> { enum {_Ret = 1}; }; - -_STLP_TEMPLATE_NULL -struct __type2bool<__false_type> { enum {_Ret = 0}; }; - -//Negation -template -struct _Not { typedef __false_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct _Not<__false_type> { typedef __true_type _Ret; }; - -// logical and of 2 predicated -template -struct _Land2 { typedef __false_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct _Land2<__true_type, __true_type> { typedef __true_type _Ret; }; - -// logical and of 3 predicated -template -struct _Land3 { typedef __false_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct _Land3<__true_type, __true_type, __true_type> { typedef __true_type _Ret; }; - -//logical or of 2 predicated -template -struct _Lor2 { typedef __true_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct _Lor2<__false_type, __false_type> { typedef __false_type _Ret; }; - -// logical or of 3 predicated -template -struct _Lor3 { typedef __true_type _Ret; }; - -_STLP_TEMPLATE_NULL -struct _Lor3<__false_type, __false_type, __false_type> { typedef __false_type _Ret; }; - -//////////////////////////////////////////////////////////////////////////////// -// class template __select -// Selects one of two types based upon a boolean constant -// Invocation: __select<_Cond, T, U>::Result -// where: -// flag is a compile-time boolean constant -// T and U are types -// Result evaluates to T if flag is true, and to U otherwise. -//////////////////////////////////////////////////////////////////////////////// -// BEWARE: If the compiler do not support partial template specialization or nested template -//classes the default behavior of the __select is to consider the condition as false and so return -//the second template type!! - -#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -template -struct __select { typedef _Tp1 _Ret; }; - -template -struct __select { typedef _Tp2 _Ret; }; - -# if defined (__BORLANDC__) -template -struct __selectT { typedef _Tp1 _Ret; }; - -template -struct __selectT<__false_type, _Tp1, _Tp2> { typedef _Tp2 _Ret; }; -# endif - -#else /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -# if defined (_STLP_MEMBER_TEMPLATE_CLASSES) -template -struct __select_aux { - template - struct _In { - typedef _Tp1 _Ret; - }; -}; - -_STLP_TEMPLATE_NULL -struct __select_aux<0> { - template - struct _In { - typedef _Tp2 _Ret; - }; -}; - -template -struct __select { - typedef typename __select_aux<_Cond>::_STLP_TEMPLATE _In<_Tp1, _Tp2>::_Ret _Ret; -}; -# else /* _STLP_MEMBER_TEMPLATE_CLASSES */ -//default behavior -template -struct __select { - typedef _Tp2 _Ret; -}; -# endif /* _STLP_MEMBER_TEMPLATE_CLASSES */ - -#endif /* _STLP_CLASS_PARTIAL_SPECIALIZATION */ - -#if defined (_STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) -// Boris : simulation technique is used here according to Adobe Open Source License Version 1.0. -// Copyright 2000 Adobe Systems Incorporated and others. All rights reserved. -// Authors: Mat Marcus and Jesse Jones -// The original version of this source code may be found at -// http://opensource.adobe.com. - -// These are the discriminating functions -template -char _STLP_CALL _IsSameFun(bool, _Tp const volatile*, _Tp const volatile*); // no implementation is required -char* _STLP_CALL _IsSameFun(bool, ...); // no implementation is required - -template -struct _IsSame { - static _Tp1* __null_rep1(); - static _Tp2* __null_rep2(); - enum { _Ret = (sizeof(_IsSameFun(false,__null_rep1(), __null_rep2())) == sizeof(char)) }; - typedef typename __bool2type<_Ret>::_Ret _RetT; -}; - -#else - -template -struct _IsSameAux { - typedef __false_type _RetT; - enum { _Ret = 0 }; -}; - -template -struct _UnConstType { typedef _Tp _Type; }; - -template -struct _UnVolatileType { typedef _Tp _Type; }; - -template -struct _UnCVType { - typedef typename _UnVolatileType<_Tp>::_Type _UnVType; - typedef typename _UnConstType<_UnVType>::_Type _Type; -}; - -# if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) -template -struct _IsSameAux<_Tp, _Tp> { - typedef __true_type _RetT; - enum { _Ret = 1 }; -}; - -# if !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG) -template -struct _UnConstType { typedef _Tp _Type; }; - -template -struct _UnVolatileType { typedef _Tp _Type; }; -# endif - -# if defined(__BORLANDC__) -template -struct _UnConstPtr { typedef _Tp _Type; }; - -template -struct _UnConstPtr<_Tp*> { typedef _Tp _Type; }; - -template -struct _UnConstPtr { typedef _Tp _Type; }; -# endif -# endif - -template -struct _IsSame { - typedef typename _UnCVType<_Tp1>::_Type _Type1; - typedef typename _UnCVType<_Tp2>::_Type _Type2; - - typedef _IsSameAux<_Type1, _Type2> _Aux; - enum { _Ret = _Aux::_Ret }; - typedef typename _Aux::_RetT _RetT; -}; -#endif - -/* - * The following struct will tell you if 2 types are the same, the limitations are: - * - it compares the types without the const or volatile qualifiers, int and const int - * will be considered as same for instance. - * - the previous remarks do not apply to pointer types, int* and int const* won't be - * considered as comparable. (int * and int *const are). - */ -template -struct _AreSameUnCVTypes { - enum { _Same = _IsSame<_Tp1, _Tp2>::_Ret }; - typedef typename _IsSame<_Tp1, _Tp2>::_RetT _Ret; -}; - -/* Rather than introducing a new macro for the following constrution we use - * an existing one (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) that - * is used for a similar feature. - */ -#if !defined (_STLP_DONT_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS) -template -struct _ConversionHelper { - static char _Test(bool, _Dst); - static char* _Test(bool, ...); - static _Src _MakeSource(); -}; - -template -struct _IsConvertible { - typedef _ConversionHelper<_Src*, const volatile _Dst*> _H; - enum { value = (sizeof(char) == sizeof(_H::_Test(false, _H::_MakeSource()))) }; - typedef typename __bool2type::_Ret _Ret; -}; - -/* This struct is intended to say if a pointer can be convertible to an other - * taking into account cv qualifications. It shouldn't be instanciated with - * something else than pointer type as it uses pass by value parameter that - * results in compilation error when parameter type has a special memory - * alignment - */ -template -struct _IsCVConvertible { -#if !defined (__BORLANDC__) - typedef _ConversionHelper<_Src, _Dst> _H; - enum { value = (sizeof(char) == sizeof(_H::_Test(false, _H::_MakeSource()))) }; -#else - enum { _Is1 = __type2bool<_IsConst<_Src>::_Ret>::_Ret }; - enum { _Is2 = _IsConvertible<_UnConstPtr<_Src>::_Type, _UnConstPtr<_Dst>::_Type>::value }; - enum { value = _Is1 ? 0 : _Is2 }; -#endif - typedef typename __bool2type::_Ret _Ret; -}; - -#else -template -struct _IsConvertible { - enum {value = 0}; - typedef __false_type _Ret; -}; -#endif - -template -struct _IsConst { typedef __false_type _Ret; }; - -#if defined (_STLP_CLASS_PARTIAL_SPECIALIZATION) && !defined (_STLP_QUALIFIED_SPECIALIZATION_BUG) -template -struct _IsConst { typedef __true_type _Ret; }; -#endif - -# if defined(__BORLANDC__) -template -struct _IsConst { typedef __true_type _Ret; }; - -template -struct _IsConst { typedef __true_type _Ret; }; -# endif - -_STLP_END_NAMESPACE - -#endif /* _STLP_TYPE_MANIPS_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/unordered_map --- a/epoc32/include/tools/stlport/unordered_map Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2004,2005 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_UNORDERED_MAP -#define _STLP_UNORDERED_MAP - -#ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x4030 -# include -#endif - -#ifdef _STLP_PRAGMA_ONCE -# pragma once -#endif - -#include - -#if (_STLP_OUTERMOST_HEADER_ID == 0x4030) -# include -# undef _STLP_OUTERMOST_HEADER_ID -#endif - -#endif /* _STLP_UNORDERED_MAP */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tools/stlport/unordered_set --- a/epoc32/include/tools/stlport/unordered_set Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2004,2005 - * Francois Dumont - * - * This material is provided "as is", with absolutely no warranty expressed - * or implied. Any use is at your own risk. - * - * Permission to use or copy this software for any purpose is hereby granted - * without fee, provided the above notices are retained on all copies. - * Permission to modify the code and to distribute modified code is granted, - * provided the above notices are retained, and a notice that the code was - * modified is included with the above copyright notice. - * - */ - -#ifndef _STLP_UNORDERED_SET -#define _STLP_UNORDERED_SET - -#ifndef _STLP_OUTERMOST_HEADER_ID -# define _STLP_OUTERMOST_HEADER_ID 0x4031 -# include -#endif - -#ifdef _STLP_PRAGMA_ONCE -# pragma once -#endif - -#include - -#if (_STLP_OUTERMOST_HEADER_ID == 0x4031) -# include -# undef _STLP_OUTERMOST_HEADER_ID -#endif - -#endif /* _STLP_UNORDERED_SET */ - -// Local Variables: -// mode:C++ -// End: diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tsendasclientpanic.h --- a/epoc32/include/tsendasclientpanic.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TSENDASCLIENTPANIC_H__ -#define __TSENDASCLIENTPANIC_H__ - -/** -Defines the SendAs client panic codes. - -@publishedAll -@released -*/ -enum TSendAsClientPanic - { - /** - Indicates an invalid request was made. - */ - ESendAsClientPanicBadRequest = 0, - - /** - Indicates a request was made on a session with an invalid handle. - */ - ESendAsClientPanicBadSubSessionHandle = 1, - - /** - Indicates a request was made with invalid an argument. - */ - ESendAsClientPanicBadRequestArgument = 2, - - /** - Indicates a request while the session is already in use. - */ - ESendAsClientPanicSubsessionInUse = 3, - - /** - Indicates a request relating to a message was made where no message exists. - */ - ESendAsClientPanicNoCurrentMessage = 4, - - /** - Indicates a request deleting a non-existent message was made. - */ - ESendAsClientPanicMessageAlreadyDeleted = 5, - - /** - Indicates a request to send a message encountered a problem. - */ - ESendAsClientPanicSendingMessage = 6, - - /** - Indicates a request to add or create an attachment encountered a problem. - */ - ESendAsClientPanicAddingCreatingAttachment = 7 - - }; - -#endif // __TSENDASCLIENTPANIC_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tsendasmessagetypefilter.h --- a/epoc32/include/tsendasmessagetypefilter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TSENDASMESSAGETYPEFILTER_H__ -#define __TSENDASMESSAGETYPEFILTER_H__ - - -#include - -/** -This class encapsulates filter information for available message type modules -(MTMs) held by the SendAs session. - -@publishedAll -@released -*/ -class TSendAsMessageTypeFilter - { -public: - IMPORT_C TSendAsMessageTypeFilter(); - IMPORT_C TSendAsMessageTypeFilter(TUid aMsgCap); - IMPORT_C TSendAsMessageTypeFilter(TUid aMsgCap, TInt aVal, RSendAs::TSendAsConditionType aCond); - IMPORT_C void Reset(); -public: - TUid iMessageCapability; - TInt iValue; - RSendAs::TSendAsConditionType iCondition; - }; - - -#endif // __TSENDASMESSAGETYPEFILTER_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tuladdressstringtokenizer.h --- a/epoc32/include/tuladdressstringtokenizer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,165 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __TULADDRESSSTRINGTOKENIZER_H__ -#define __TULADDRESSSTRINGTOKENIZER_H__ - -#include - -/** -Address String Tokenizer API offers methods for parsing phone numbers and e-mail, -URL and URI addresses from the given text. The API consists of the -CTulAddressStringTokenizer class. - -Usage: - -@code - #include - - // SFoundItem instance - CTulAddressStringTokenizer::SFoundItem item; - - // Some text - TBufC<256> strSomeText(_L("Mail to me@someplace.com or call 040 1234567. - You can also tune in to audio feed at rtsp://someplace.com/somefeed.ra.")); - - // First the user has to create an instance of CTulAddressStringTokenizer by using the - // factory method NewL(). The method takes two parameters. The first - // parameter defines the text to be searched from and the second parameter - // tells what exactly is being looked for. - CTulAddressStringTokenizer singleSearch = CTulAddressStringTokenizer::NewL(strSomeText, - CTulAddressStringTokenizer::EFindItemSearchMailAddressBin); - - // The passed text is parsed in construction, and found items can be fetched - // by using the ItemArray() method. It returns a constant array containing - // all the found items. The interface also offers helper functions for - // handling the item array by itself. - - // Get count of found items. - TInt count(singleSearch->ItemCount()); - - // Get currently selected item (me@someplace.com) to the result1 variable. - singleSearch->Item(item); - TPtrC16 result1(strSomeText.Mid(item.iStartPos, item.iLength)); - - // Deallocate memory - delete singleSearch; - - // Create an instance of CTulAddressStringTokenizer and look for all possible - // things (cases work as binary mask). - CTulAddressStringTokenizer* multiSearch = CTulAddressStringTokenizer::NewL(strSomeText, - (CTulAddressStringTokenizer::EFindItemSearchPhoneNumberBin | - CTulAddressStringTokenizer::EFindItemSearchURLBin | - CTulAddressStringTokenizer::EFindItemSearchMailAddressBin | - CTulAddressStringTokenizer::EFindItemSearchScheme)); - - // Get count of found items. - TInt count2(multiSearch->ItemCount()); - - // Get currently selected item to the result2 variable. - multiSearch->Item(item); - - // Debug print all items and their type. - for( TInt i=0; iNextItem(item); - } - - // Deallocate memory - delete multiSearch; -@endcode - -@publishedAll -@released -*/ - -class CTulAddressStringTokenizer : public CBase - { -public: -#define TFindItemSearchCase TTokenizerSearchCase // For source compatibility with S60 only - /** - Enumeration to define the search case. - Multiple enumerations can be used as binary mask. - */ - enum TTokenizerSearchCase - { - // Searches phone numbers. - EFindItemSearchPhoneNumberBin = 4, - // Searches mail addresses. - EFindItemSearchMailAddressBin = 8, - // Searches fixed start URLs ("http://", "https://", "rtsp://"), "www.", "wap." and IPv4 addresses. - EFindItemSearchURLBin = 16, - // Searches for all URIs containing a scheme. - EFindItemSearchScheme = 32 - }; - - // Struct to contain a found item. - struct SFoundItem - { - TInt iStartPos; // Start position of the found item. - TInt iLength; // Length of the found item (characters). - TTokenizerSearchCase iItemType; // Search case of the found item - }; - -public: // Constructors and destructor - IMPORT_C static CTulAddressStringTokenizer* NewL( const TDesC& aText, TInt aSearchCases ); - IMPORT_C static CTulAddressStringTokenizer* NewL( const TDesC& aText, TInt aSearchCases, TInt aMinNumbers ); - IMPORT_C ~CTulAddressStringTokenizer(); -public: - IMPORT_C TInt ItemCount() const; - IMPORT_C TBool Item( SFoundItem& aItem ) const; - IMPORT_C TBool NextItem( SFoundItem& aItem ); - IMPORT_C TBool PrevItem( SFoundItem& aItem ); - IMPORT_C const CArrayFixFlat* ItemArray() const; - IMPORT_C TInt Position() const; - IMPORT_C void ResetPosition(); - IMPORT_C TInt DoNewSearchL( const TDesC& aText, TInt aSearchCases); - IMPORT_C TInt DoNewSearchL( const TDesC& aText, TInt aSearchCases, TInt aMinNumbers ); -private: - CTulAddressStringTokenizer(); - void AddItemL( TInt aStartPos, TInt aLength, TTokenizerSearchCase aType ); - - TBool SearchPhoneNumberL( const TDesC& aText ); - TBool SearchMailAddressL( const TDesC& aText ); - TBool SearchGenericUriL( const TDesC& aText ); - TBool SearchUrlL( const TDesC& aText, TBool aFindFixedSchemas ); - TBool ParseUrlL( const TDesC& aType, const TPtrC& aTokenPtr, TInt aTextOffset ); - - static TBool IsValidEmailChar(const TChar& charac); // Login part of the e-mail address - static TBool IsValidEmailHostChar(const TChar& charac); // Host part of the e-mail address - static TBool IsValidPhoneNumberChar(const TChar& charac); // Phone number - static TBool IsValidUrlChar( const TChar& charac); // URL - - void ConstructL( const TDesC& aText, TInt aSearchCases, TInt aMinNumbers ); - void PerformSearchL( const TDesC& aText, TInt aSearchCases ); - - CTulAddressStringTokenizer( const CTulAddressStringTokenizer& ); // Prohibit copy constructor - CTulAddressStringTokenizer& operator= ( const CTulAddressStringTokenizer& ); // Prohibit assigment operator -private: - CArrayFixFlat* iFoundItems; // Array of all found items. - TInt iPosition; // Engine's position in the iFoundItems. - TInt iMinNumbers; // Minimum count of numbers in a phone number - }; - - -#endif // __TULADDRESSSTRINGTOKENIZER_H__ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tulpanics.h --- a/epoc32/include/tulpanics.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __TULPANICS_H__ -#define __TULPANICS_H__ - -// ========== DATA TYPES =================================== - -enum TTulPanic - { - ETulPanicDescriptorLength = 0x100, - ETulPanicInvalidTokenizerSearchCase - }; - - -//Error codes -enum TStringLoaderPanic - { - ETooFewArguments = 0, // Unsolved parameters in resource string. - ETooManyArguments = 1, // Already solved all parameters in resource string. - EKeyStringNotFound = 2, // The key string wasn't found in formating. - EInvalidIndex = 3, // Invalid index in Format-method - EDescriptorTooSmall = 4, // Too small destination descriptor. - ECCoeEnvNotInitialized = 5, // CCoeEnv is not initialized - EInvalidSubstitute = 6 // Substituted string contains KSubStringSeparator - }; - - -// ========== FUNCTION PROTOTYPES ========================== - -// --------------------------------------------------------- -// Panic -// -// --------------------------------------------------------- -// -GLREF_C void Panic (TTulPanic); - -#endif // __TULPANICS_H__ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tulphonenumberutils.h --- a/epoc32/include/tulphonenumberutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,115 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __TULPHONENUMBERUTILS_H__ -#define __TULPHONENUMBERUTILS_H__ - -#include - - -/** -Class offers static methods for parsing and validating phone numbers. -Phone Parser API provides methods which are used to parse and validate -phone numbers. The API consists of the TulPhoneNumberUtils class. - -Examples of valid phone numbers: -1. +358501234567 -2. +358 (50) 123 4567 - -Even though both of the above examples are valid phone numbers, only 1) is -accepted as a phone number by many systems. To convert 2) to 1), use the -parsing method of the API. - -Usage: - -@code - #include - - // Example shows how to use the parsing method of the API. - - // A number to be parsed. - TBuf<50> number1 = _L("+358 (40) 123 132"); - - // Type of the phone number to be parsed is a regular phone number. - TBool validNumber1 = - TulPhoneNumberUtils::NormalizePhoneNumber( number1, - TulPhoneNumberUtils::EPlainPhoneNumber ); - - // The phone number number1 is a valid regular phone number. - // After parsing validNumber1 is ETrue and - // number1 is "+35840123132". - // Do something like SendSMS( number1 ) etc. - - // A number to be parsed. - TBuf<50> number2 = _L("+358 (40) 123p132"); // note 'p' - - // Type of the phone number to be parsed is a regular phone number. - TBool validNumber2 = - TulPhoneNumberUtils::NormalizePhoneNumber( number2, - TulPhoneNumberUtils::EPlainPhoneNumber ); - - // The phone number number2 is not a valid regular phone number. - // After parsing validNumber2 is EFalse and - // number2 is "+358 (40) 123p132" (unchanged). -@endcode - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TulPhoneNumberUtils) - { -public: - /** - * Enumeration for phone number types. - * Used to specify the type of phone numbers in methods of - * TulPhoneNumberUtils class. - */ - enum TPhoneNumberType - { - /** The supplied phone number is a regular phone number. */ - EPlainPhoneNumber, - /** The supplied phone number is a contact card number. */ - EContactCardNumber, - /** The supplied phone number is is a phone client number. */ - EPhoneClientNumber, - /** The supplied phone number is an SMS number. */ - ESMSNumber - }; - - IMPORT_C static TBool Normalize( TDes& aNumber, TPhoneNumberType aType = EPlainPhoneNumber); - IMPORT_C static TBool IsValid( const TDesC& aNumber, TPhoneNumberType aType = EPlainPhoneNumber ); -public: // deprecated - inline static TBool ParsePhoneNumber( TDes& aNumber, TInt aType ); - inline static TBool IsValidPhoneNumber( const TDesC& aNumber, TInt aType ); -private: - static TBool IsValidPhoneNumber( const TDesC& aNumber, const TDesC& aValidChars); - static void ParseInvalidChars( TDes& aNumber, const TDesC& aInvalidChars); - }; - -// For source compatibility with S60 - -/** @deprecated */ -inline TBool TulPhoneNumberUtils::ParsePhoneNumber( TDes& aNumber, TInt aType ) - { return TulPhoneNumberUtils::Normalize(aNumber, static_cast(aType)); } -/** @deprecated */ -inline TBool TulPhoneNumberUtils::IsValidPhoneNumber( const TDesC& aNumber, TInt aType ) - { return TulPhoneNumberUtils::IsValid(aNumber, static_cast(aType)); } - -#endif // __TULPHONENUMBERUTILS_H__ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tulstringresourcereader.h --- a/epoc32/include/tulstringresourcereader.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* -* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef TULSTRINGRESOURCEREADER_H -#define TULSTRINGRESOURCEREADER_H - -#include // RResourceReader - -/** -CTulStringResourceReader reads strings from resource without CCoeEnv. -If resource file given to the constructor is not found, the constructor leaves. -This module is mainly for server usage, where there is the need to read resources, -but no CCoeEnv instance is present. - -Usage: - -@code -#include -#include // Resource to be read header - -TFileName myFileName( _L("z:\\resource\\errorres.rsc") ); -CTulStringResourceReader* test = CTulStringResourceReader::NewL( myFileName ); - -TPtrC buf; -buf.Set(test-> ReadResourceString(R_ERROR_RES_GENERAL)); - -// Note that buf will only be valid as long as CTulStringResourceReader -// instance is alive and no new string is read by the same instance. -// If you need to read multiple strings, make copies. - -delete test; -@endcode - -@publishedAll -@released -*/ -class CTulStringResourceReader : public CBase - { -public: // Constructors and destructor - IMPORT_C static CTulStringResourceReader* NewL(TFileName& aResFile); - IMPORT_C static CTulStringResourceReader* NewLC(TFileName& aResFile); - IMPORT_C static CTulStringResourceReader* NewL(TFileName& aResFile, RFs& aFs); - IMPORT_C static CTulStringResourceReader* NewLC(TFileName& aResFile, RFs& aFs); - ~CTulStringResourceReader(); -public: - IMPORT_C const TDesC& ReadResourceString( TInt aResourceId ); -private: - CTulStringResourceReader(); - void ConstructL(TFileName& aResFile); - void ConstructL(TFileName& aResFile, RFs& aFs); -private: - RResourceFile iResourceFile; - HBufC* iResourceBuffer; - RFs iFsSession; - TPtrC iTruncatedTextPointer; - TBool iFsConnected; // ETrue if connected to the file server, else EFalse - }; - -#endif // TULSTRINGRESOURCEREADER_H - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tultextresourceutils.h --- a/epoc32/include/tultextresourceutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* -*/ - - - -#ifndef __TULTEXTRESOURCEUTILS_H__ -#define __TULTEXTRESOURCEUTILS_H__ - -#include -#include // class CArrayFix -#include // class MDesCArray -#include // class TBidiText -class CCoeEnv; - - -/** -Utility that provides methods to load and format resource strings. -String Loader API provides an interface to load and format resource strings -that may contain parameter(s) (\%U for (unicode) text or or \%N for numerical). -Resource strings are usually defined in an RSS file. - -The API consists of the TulTextResourceUtils class. All methods are static, so there is -no need to explicitly allocate memory for the interface class. -The implementation needs a CCoeEnv instance to access for example the -resource files. - - -Usage: - -Applications load and format resource strings from normal resources with -static methods of the TulTextResourceUtils class. The loading is done with the LoadL -and LoadLC methods and with the Load method in situations where memory -allocation from the heap is not possible. Formatting is done automatically -after loading in the LoadL and LoadLC methods, but it can also be done -separately with the Format method in situations where memory allocation from -the heap is not possible. For reading the resource strings with the Load, -LoadL and LoadLC methods, the user should provide a pointer to CCoeEnv for -efficiency reasons. If the pointer is not provided, the implementation uses -the CCoeEnv::Static method internally to get it. - -Different size displays can handle different length strings. To take full -advantage of this fact, TulTextResourceUtils supports resource strings with multiple -options for strings, separated by the character 0x0001. Each such string can -contain the same or different sub string keys (\%U and \%N). TulTextResourceUtils returns -all strings, it is the responsibility of the caller to parse the result and -choose the proper string to display. - -Setting the maximum sub string length may be done in the text resources. Sub -string maximum lengths can be localized separately for every language. -The maximum sub string length is of the format: \%U[NN] -where NN is a number [01..99]. Please note that NN must always consist of two -characters, i.e. if the sub string maximum length is eight characters, the -value to be used is 08, not plain 8. If the number of characters exceeds the -maximum length, the sub string is cut to fit and the last character is -replaced with an ellipsis character. - -The following examples describe the usage of the String Loader API. - -Usage when one TInt is added: - -@code - // In .loc -file - // #define text_example "You have %N undone tasks." - - // In .rss -file - // RESOURCE TBUF r_text_example { buf = text_example; } - - // (In the .cpp -file) - #include - - // Get CCoeEnv instance - CEikonEnv* iEikonEnv = CEikonEnv::Static(); - - TInt number(324); - - // Method reads a resource string with memory allocation - // and replaces the first %N-string in it with replacement TInt. - // The heap descriptor must be destroyed when it is no longer needed. - // iEikonEnv is needed for loading the resource string. - HBufC* stringholder = TulTextResourceUtils::LoadL(R_TEXT_EXAMPLE, number, iEikonEnv); - - // The 'number' is added to the resource string. The result is - // that stringholder points to a heap descriptor containing string: - // "You have 324 undone tasks." - - // Delete the heap descriptor - delete stringholder; -@endcode - - -Usage when several strings are added: - -An index can be included to parameters. Several parameters can have same index -if the same replacement is needed multiple times. - -@code - // In .loc -file - // #define text_example "I'm %2U%1U %3U%0U fine." - - // In .rss -file - // RESOURCE TBUF r_text_example { buf = text_example; } - - // In the .cpp -file - #include - - // Get CCoeEnv instance - CEikonEnv* iEikonEnv = CEikonEnv::Static(); - - CDesCArrayFlat* strings = new CDesCArrayFlat(4); - CleanupStack::PushL(strings); - - strings->AppendL(_L("orking")); //First string - - strings->AppendL(_L("ll")); //Second string - - strings->AppendL(_L("sti")); //Third string - - strings->AppendL(_L("w")); //Fourth string - - // Method reads a resource string with memory allocation and replaces - // the %(index)U strings in it with replacement strings from an array. - // The heap descriptor must be destroyed when it is no longer needed. - // iEikonEnv is needed for loading the resource string. - HBufC* stringholder = TulTextResourceUtils::LoadL(R_TEXT_EXAMPLE, *strings, iEikonEnv); - - // Four strings are added to the resource string. The result is - // that stringholder points to a heap descriptor containing string: - // "I'm still working fine." - - // Pop and delete strings array - CleanupStack::PopAndDestroy(); - - // Delete the heap descriptor - delete stringholder; -@endcode - - -Usage with scalable UI support: - -@code - // In .loc -file - // #define TEXT_EXAMPLE "You have missed %N messages from %U."<0x0001>"Missed %N msgs from %U."<0x0001>"Missed %N msgs." - - // In .rss -file - // RESOURCE TBUF R_TEXT_EXAMPLE { buf = TEXT_EXAMPLE; } - - // In the .cpp -file - #include - - // Get CCoeEnv instance - CEikonEnv* iEikonEnv = CEikonEnv::Static(); - - TInt number(12); - _LIT(name, "John Doe"); - - // Method reads a resource string with memory allocation, - // replaces all %N strings in it with a replacement TInt and - // all %U strings in it with a replacement string. - // The heap descriptor must be destroyed when it is no longer needed. - // iEikonEnv is needed for loading the resource string. - HBufC stringholder = TulTextResourceUtils::LoadL(R_TEXT_EXAMPLE, name, number, iEikonEnv); - - // The number and name are added to the resource string. The result is - // that stringholder points to a heap descriptor containing string: - // "You have missed 12 messages from John Doe.\001Missed 12 msgs from John - // Doe.\001Missed 12 msgs." - - // Delete the heap descriptor - delete stringholder; -@endcode - - -Error handling: - -The leave mechanism of the Symbian OS environment is used to handle memory -exhaustion. The panic mechanism is used to handle programming errors while -debugging. TulTextResourceUtils panics for seven different reasons. The panic -category is named TulTextResourceUtils. The panic codes are: - -- ETooFewArguments = 0 (Unsolved parameters in resource string.) -- ETooManyArguments = 1 (Already solved all parameters in resource string.) -- EKeyStringNotFound = 2 (The key string wasn't found in formatting.) -- EInvalidIndex = 3 (Invalid index in Format-method) -- EDescriptorTooSmall = 4 (Too small destination descriptor.) -- ECCoeEnvNotInitialized = 5 (CCoeEnv is not initialized) -- EInvalidSubstitute = 6 (Substituted string contains KSubStringSeparator) - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(TulTextResourceUtils) - { -public: - IMPORT_C static void Load(TDes& aDest, TInt aResourceId, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static void Format(TDes& aDest, const TDesC& aSource, TInt aPosition, TInt aSubs); - IMPORT_C static void Format(TDes& aDest, const TDesC& aSource, TInt aPosition, const TDesC& aSubs); - IMPORT_C static HBufC* LoadL(TInt aResourceId, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadL(TInt aResourceId, TInt aInt, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadL(TInt aResourceId, const TDesC& aString, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadL(TInt aResourceId, const TDesC& aString, TInt aInt, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadL(TInt aResourceId, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadL(TInt aResourceId, const MDesCArray& aStrings, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadL(TInt aResourceId, const MDesCArray& aStrings, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, TInt aInt, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, const TDesC& aString, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, const TDesC& aString, TInt aInt, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, const MDesCArray& aStrings, CCoeEnv* aLoaderEnv = NULL); - IMPORT_C static HBufC* LoadLC(TInt aResourceId, const MDesCArray& aStrings, const CArrayFix& aInts, CCoeEnv* aLoaderEnv = NULL); -private: - TulTextResourceUtils(); - TulTextResourceUtils(const TulTextResourceUtils&); // Prohibit copy constructor - TulTextResourceUtils& operator= (const TulTextResourceUtils&); // Prohibit assigment operator - static HBufC* FormatStringL(const TDesC& aSource, const TDesC& aKey, const TDesC& aSubs, TBidiText::TDirectionality aDir); - static HBufC* FormatStringL(const TDesC& aSource, const TDesC& aKey, const TDesC& aSubs, - TBidiText::TDirectionality aDirectionality, TInt& aParamCount, TInt aSubCount); - static HBufC* FormatStringL(TDesC& aSource, const CArrayFix& aInts, TInt aMax, TBidiText::TDirectionality aDir); - static HBufC* FormatStringL(TDesC& aSource, const MDesCArray& aStrings, TInt aMax, TBidiText::TDirectionality aDir); - static TInt Formater(TDes& aDest, const TDesC& aSource, const TDesC& aKey, - const TDesC& aSubs, TBidiText::TDirectionality aDirectionality); - - static void KeyStringFormater(TDes& aDest, const TText& aKey, TInt aPosition, const TDesC& aKeyString); - static TBidiText::TDirectionality ResolveDirectionality(TDes& aText, TBool* aFound); - static TInt GetParamCount(const TDesC& aText, TInt aIndex = -1); - static TInt GetSubStringCount(const TDesC& aText); - - static TBidiText::TDirectionality DirectionalityL(const TDesC& aText, TBool* aFound); - static HBufC* ResolveSubStringDirsL(TDes& aText, TInt aCount, TBool* aMarker); - static HBufC* ResolveSubStringL(TDes& aText, TBool* aMarker); - static void RemoveNoDirMarkers(TDes& aText); - static void FormatL(TDes& aDest, const TDesC& aSource, const TDesC& aKeybuf, const TDesC& aSubs); - }; - - -#endif // __TULTEXTRESOURCEUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tz.h --- a/epoc32/include/tz.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,347 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TIMEZONE_H__ -#define __TIMEZONE_H__ - -#include -#include -#include -#include - -class CTzChangeNotifier; -class CTzRules; -class CTzRuleHolder; - -//------------------------------------------------------------------------- -/** -Encapsulates a time zone identifier. - -The identifier may be either a name or a number. -@publishedAll -@released -@since 9.1 -*/ -class CTzId : public CBase - { -public: - - IMPORT_C ~CTzId(); - - /** - @internalComponent - */ - IMPORT_C CTzId* CloneL() const; - - IMPORT_C static CTzId* NewL(TUint aNumericId); - - IMPORT_C static CTzId* NewL(const TDesC8& aNameIdentity); - - /** - @internalComponent - */ - IMPORT_C static CTzId* NewL(RReadStream& aStream); - - /** - @internalComponent - */ - IMPORT_C void SetId(TUint aNumericId); - - /** - @internalComponent - */ - IMPORT_C void SetIdL(const TDesC8& aNameIdentity); - - /** - @internalComponent - */ - IMPORT_C void InternalizeL(RReadStream& aStream); - - /** - @internalComponent - */ - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - - IMPORT_C const TDesC8& TimeZoneNameID() const; - - IMPORT_C TUint TimeZoneNumericID() const; - - IMPORT_C TBool operator==(const CTzId& aTZId) const; - - inline TBool operator!=(const CTzId& aTZId) const; - -public: - static CTzId* NewL(TUint aReferenceId, const TDesC8& aZoneIdentity); - void SetIdL(TUint aNumRefId, const TDesC8& aZoneIdentity); - -private: - void ConstructL(const TDesC8& aZoneIdentity); - CTzId(); - CTzId(TUint aNumericId); - -private: - HBufC8* iZoneId; - TUint32 iReferenceId; - }; - - -/** -The client interface to the time zone server. - -This class performs two basic functions: -1. Converts between UTC time and local time. -2. Sets the current local time zone. - -NOTE: The presence of a time zone server will alter the behaviour of the -time zone related function calls User::SetUTCOffset() and -User::SetUTCTimeAndOffset(). The time zone server is shutdown when the -last session (RTz) is closed. Therefore, to maintain consistent time related behaviour, -licensees may want to keep a system level time zone server session open at all times. - -@see User - -Exceptional cases occur when a user requests conversion -for a non-existent local time or a double local time. - -Non-existent local times occur when the local time -changes from winter to summer for DST. - -For example, 01:59 local time is non-existent on the day of a change to BST -in Europe/London since the time changes directly from 12:59:59 to 2:00. - -A double local time occurs when the local time changes from -summer to winter. - -For example, if the time changes at 02:00 AM BST to 01:00 AM GMT -then local times between 01:00 and 01:59 occur twice. - -The conversion applies the DST offset if the local time value is double and applies -the standard UTC offset if the local time does not exists. - -This decision makes the conversion process asymmetrical around -the discontinuity in the local time when there is a DST change. - -An example conversion from a double local time to UTC and -from UTC to a double local time is: - - 01:59 AM BST => 00:59 AM UTC - 01:59 AM UTC => 01:59 AM GMT - -An example conversion from a non-existent local time to UTC -and from UTC to local time is: - - 01:59 AM GMT => 01:59 AM UTC - 01:59 AM UTC => 02:59 AM BST - - -@publishedAll -@released -@since 9.1 -*/ -class RTz : public RSessionBase - { -public: - /** - These enumerators are to describe different modes of the automatic - DST event handling. - - These are used both as arguments for the API SetAutoUpdateBehaviorL, - and as notifications for the publish and subscribe. - */ - enum TTzAutoDSTUpdateModes - { - /** No auto update notification when a DST event occurs. */ - ETZAutoDSTUpdateOff = 0, - - /** Automatic time update will occur and the client app will be notified. */ - ETZAutoDSTUpdateOn, - - /** Client app needs to confirm that the time should be updated whenever a DST event occurs. */ - ETZAutoDSTNotificationOnly, - }; - - enum TTzChanges - { - /** Used for notifying that the timezone database has changed.*/ - ETZDatabaseChanged = 1, - /** Used for notifying that the system timezone database has changed.*/ - ETZSystemTimeZoneChanged, - /** Used for notifying that the DST rule has changed. */ - ETZDSTRuleChanged, - /** Used for notifying that an automatic time update has taken place. */ - ETZAutomaticTimeUpdate - }; - - enum TPanic - { - /** This panic indicates that the time zone server has not been found.*/ - EPanicServerNotFound = 1, - /** This panic indicates that the server has died.*/ - EPanicServerDead, - /** This panic indicates that the time zone ID is not set.*/ - EPanicTimeZoneNameIdNotSet, - /** This panic indicates that an out of range index was accessed.*/ - EPanicRulesIndexOutofRange, - /** This panic indicates that there are no rules present for this time zone.*/ - EPanicTimeNotCoveredByRules, - /** This panic indicates that the time zone rules are unusable.*/ - EPanicBadTimeZoneRules, - /** This panic indicates that an unsupported time reference has been accessed.*/ - EPanicUnsupportedTimeReference, - /** This panic indicates that the time zone ID is not supported.*/ - EPanicUnsupportedTimeZoneNoId, - /** This panic indicates that a request for notification is already pending from the client.*/ - EPanicNotificationRequestPending, - /** This panic indicates that an incorrect data has been sent to the server.*/ - EPanicInvalidArgument - }; - - /** - @internalComponent - */ - IMPORT_C static void Panic(TPanic aPanic); - - /** - @internalTechnology - */ - IMPORT_C CTzId* GetTimeZoneIdL() const; - - /** - @internalTechnology - */ - IMPORT_C void SetTimeZoneL(CTzId& aZone) const; - - IMPORT_C void Close(); - - IMPORT_C TInt Connect(); - - IMPORT_C ~RTz(); - - IMPORT_C RTz(); - - IMPORT_C TInt ConvertToLocalTime(TTime& aTime) const; - - IMPORT_C TInt ConvertToLocalTime(TTime& aTime, const CTzId& aZone) const; - - IMPORT_C TInt ConvertToUniversalTime(TTime& aTime) const; - - IMPORT_C TInt ConvertToUniversalTime(TTime& aTime, const CTzId& aZone) const; - - IMPORT_C void GetOffsetsForTimeZoneIdsL(const RArray& aTzNumericIds, RArray& aOffsets) const; - - IMPORT_C TInt AutoUpdateSettingL(); - - IMPORT_C void SetAutoUpdateBehaviorL(TTzAutoDSTUpdateModes aUpdateEnabled); - - // Methods for setting the system time. - IMPORT_C TInt SetHomeTime(const TTime& aLocalTime) const; - - IMPORT_C TBool IsDaylightSavingOnL(CTzId& aZone) const; - - IMPORT_C TBool IsDaylightSavingOnL(CTzId& aZone, const TTime& aUTCTime) const; - - // Get Encoded Rules for Current Local Time Zone - IMPORT_C CTzRules* GetTimeZoneRulesL(const TTime& aStartTime, const TTime& aEndTime, TTzTimeReference aTimeRef) const; - - IMPORT_C CTzRules* GetTimeZoneRulesL(const CTzId& aZone, const TTime& aStartTime, const TTime& aEndTime, TTzTimeReference aTimeRef) const; - - void RegisterTzChangeNotifier(TRequestStatus& aStatus) const; - TInt CancelRequestForNotice() const; - TVersion Version() const; - - IMPORT_C void NotifyHomeTimeZoneChangedL(const NTzUpdate::TTimeZoneChange& aChange) const; - - IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime, const TInt aUTCOffset); - - IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime, const TInt aUTCOffset, TBool aPersistInCenRep); - - IMPORT_C void __dbgClearCacheL(TBool aRestartCaching); - - TBool StartCachingL(); - TUint16 CurrentCachedTzId(); - -private: - static TInt StartServer(); - TInt DoConnect(); - void doConvertL(const CTzId& aZone, TTime& aTime, - TTzTimeReference aTimerRef) const; - void doConvertL(TTime& aTime, - TTzTimeReference aTimerRef) const; -private: - CTzRuleHolder* iRulesHolder; - }; - -/** -Encapsulates a TTime and a TTzTimeReference. -Use, for example, for iCalendar's DTSTART. - -@publishedAll -@released -*/ -class TTimeWithReference - { -public: - static inline TTimeWithReference Max(); - inline TTimeWithReference(); - inline TTimeWithReference(TTime aTime, TTzTimeReference aTimeReference=ETzUtcTimeReference); - inline TTimeWithReference(TDateTime aTime, TTzTimeReference aTimeReference=ETzUtcTimeReference); - inline bool operator==(const TTimeWithReference& aTime) const; - inline bool operator!=(const TTimeWithReference& aTime) const; - - TTime iTime; - TTzTimeReference iTimeReference; - }; - -/** Inequality operator. - -@param aTZId The time zone ID to compare with this one. -@return True if the two IDs are different. False if they are the same. -*/ -inline TBool CTzId::operator!=(const CTzId& aTZId) const - { - return (!operator==(aTZId)); - } - -////////////////////////////////// -// TTimeWithReference -////////////////////////////////// -inline TTimeWithReference TTimeWithReference::Max() - { - return TTimeWithReference( - TDateTime(9999,EDecember,30,23,59,59,0), - ETzUtcTimeReference); - } - -inline TTimeWithReference::TTimeWithReference() - : iTime(0), iTimeReference(ETzUtcTimeReference) - { - } -inline TTimeWithReference::TTimeWithReference(TTime aTime, TTzTimeReference aTimeReference) - : iTime(aTime), iTimeReference(aTimeReference) - { - } -inline TTimeWithReference::TTimeWithReference(TDateTime aTime, TTzTimeReference aTimeReference) - : iTime(aTime), iTimeReference(aTimeReference) - { - } -inline bool TTimeWithReference::operator==(const TTimeWithReference& aTime) const - { - return(aTime.iTime == iTime && aTime.iTimeReference == iTimeReference); - } -inline bool TTimeWithReference::operator!=(const TTimeWithReference& aTime) const - { - return(!(*this == aTime)); - } -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tzconverter.h --- a/epoc32/include/tzconverter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,62 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TZ_CONVERTER_H__ -#define __TZ_CONVERTER_H__ - -#include -#include -#include - -class CTzChangeNotifier; -class CVTzActualisedRules; -class CTzRuleHolder; - -/** -Converts between time expressed in UTC and local time. - -@publishedAll -@released - -@see RTz -@since 9.1 -*/ -class CTzConverter : public CBase - { -public: - - IMPORT_C static CTzConverter* NewL(RTz& aTzServer); - IMPORT_C ~CTzConverter(); - IMPORT_C TInt ConvertToLocalTime(TTime& aTime); - IMPORT_C TInt ConvertToLocalTime(TTime& aTime, const CTzId& aZone); - IMPORT_C TInt ConvertToUniversalTime(TTime& aTime); - IMPORT_C TInt ConvertToUniversalTime(TTime& aTime, const CTzId& aZone); - IMPORT_C TUint16 CurrentTzId(); - - void NotifyTimeZoneChangeL(RTz::TTzChanges aChange); - const RTz& Server() const; -private: - CTzConverter(RTz& aTzServer); - void ConstructL(); - - -private: - RTz& iTzServer; - - TAny* iReserved; - TAny* iReserved2; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tzdefines.h --- a/epoc32/include/tzdefines.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TZDEFINES_H__ -#define __TZDEFINES_H__ - -/** Time Zone Rule Day Rules. -@publishedAll -@released -*/ -enum TTzRuleDay - { - ETzFixedDate = 0, // e.g. 11th October - ETzDayAfterDate, // e.g. first Sunday after 8th October - ETzDayBeforeDate, // e.g. Sunday before 7th October - ETzDayInLastWeekOfMonth // e.g. last Sunday in October - }; - -/** -this const must match the last TTzRuleDay enumeration; -'int' is deliberately used because this file is shared with non Symbian C++ environments -@internalComponent -*/ -const int KValidatedLastDayRule = ETzDayInLastWeekOfMonth; - -/** Time reference. -@publishedAll -@released -*/ -enum TTzTimeReference - { - ETzUtcTimeReference = 0, - ETzStdTimeReference, - ETzWallTimeReference // Local time - }; - -/** -this const must match the last TTzTimeReference enumeration -'int' is deliberately used because this file is shared with non Symbian C++ environments -@internalComponent -*/ -const int KValidatedLastTimeReference = ETzWallTimeReference; -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tzlocalizationdatatypes.h --- a/epoc32/include/tzlocalizationdatatypes.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,295 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TZLOCAL_DATATYPES_H__ -#define __TZLOCAL_DATATYPES_H__ - -#include //CBase - -/** -Encapsulates the correspondence between a time zone ID and a resource ID and -facilitates fast finding of resources in the resource file. For internal use only. - -@internalTechnology -*/ -class TTzLocalizedId - { - public: - // Represents an invalid UTC offset of 25 hours and 1 minutes, in minutes - enum TTzUTCOffset - { - ETzInvalidUTCOffset = 1501 - }; - - public: - TTzLocalizedId(const TUint16 aTzId, const TUint aResourceId =0); - - //Accessor methods - inline TUint16 TimeZoneId() const; - inline TUint ResourceId() const; - inline TInt UTCOffset() const; - inline void SetUTCOffset(TInt aOffsetInMinutes); - - private: - TUint16 iTzId; - TUint iResourceId; - TInt iUTCOffset; //UTC offset stored in minutes - }; - -/** -Encapsulates a localized (exemplar) city. - -@publishedAll -@released -*/ -class CTzLocalizedCity : public CBase - { - public: - static CTzLocalizedCity* NewL( - const TDesC& aName, - const TTzLocalizedId& aTzLocalizedId, - const TUint8 aGroupId =0); - static CTzLocalizedCity* NewLC( - const TDesC& aName, - const TTzLocalizedId& aTzLocalizedId, - const TUint8 aGroupId =0); - ~CTzLocalizedCity(); - - //Accessor methods - IMPORT_C TPtrC Name() const; - IMPORT_C TUint16 TimeZoneId() const; - IMPORT_C TUint8 GroupId() const; - TTzLocalizedId TzLocalizedId() const; - TInt UTCOffset() const; - void SetUTCOffset(TInt aUTCoffset); - void SetCityIndex(TInt aIndex); - TInt CityIndex() const; - - private: - void ConstructL(const TDesC& aName); - CTzLocalizedCity(const TUint8 aGroupId, const TTzLocalizedId& aTzLocalizedId); - - private: - //Member data - HBufC* iName; - TUint8 iGroupId; - TTzLocalizedId iTzLocalizedId; - TInt iCityIndex; - }; - -/** -Encapsulates a localized group of (exemplar) cities. - -@publishedAll -@released -*/ -class CTzLocalizedCityGroup : public CBase - { - public: - static CTzLocalizedCityGroup* NewL(const TDesC& aName, const TUint8 aGroupId); - static CTzLocalizedCityGroup* NewLC(const TDesC& aName, const TUint8 aGroupId); - ~CTzLocalizedCityGroup(); - - //Accessor methods - IMPORT_C TPtrC Name() const; - IMPORT_C TUint8 Id() const; - - private: - void ConstructL(const TDesC& aName); - CTzLocalizedCityGroup(const TUint8 aGroupId); - - private: - //Member data - HBufC* iName; - TUint8 iGroupId; - }; - -/** -Encapsulates a group of LDML localized timezone names. -LDML stands for Locale Data Markup Language. For details, see -http://www.openi18n.org/specs/ldml/1.0/ldml-spec.htm. - -@publishedAll -@released -*/ -class CTzLocalizedTimeZone : public CBase - { - public: //enums - /** - Flags to identify a cached zone. - @publishedAll - @released - */ - enum TTzFrequentlyUsedZone - { - /** The current zone. */ - ECurrentZone, - /** The home zone. */ - EHomeZone, - /** The zone of interest. */ - EInterestZone, - /** The first recently-used zone. */ - ERecentZone1, - /** The second recently-used zone. */ - ERecentZone2, - /** Specifies the number of cached zones. Not to be used as an API argument. */ - ECachedTimeZones // If new items are added to this enum, this must - // left as last item, because it is used to keep - // count of the number of cached zones - }; - - public: - static CTzLocalizedTimeZone* NewL( - const TTzLocalizedId& aTzLocalizedId, - const TDesC& aStandardName, - const TDesC& aDaylightName, - const TDesC& aShortStandardName, - const TDesC& aShortDaylightName); - - static CTzLocalizedTimeZone* NewLC( - const TTzLocalizedId& aTzLocalizedId, - const TDesC& aStandardName, - const TDesC& aDaylightName, - const TDesC& aShortStandardName, - const TDesC& aShortDaylightName); - - ~CTzLocalizedTimeZone(); - - //Accessor methods - IMPORT_C TUint16 TimeZoneId() const; - IMPORT_C TPtrC StandardName() const; - IMPORT_C TPtrC DaylightName() const; - IMPORT_C TPtrC ShortStandardName() const; - IMPORT_C TPtrC ShortDaylightName() const; - TTzLocalizedId TzLocalizedId() const; - TInt UTCOffset() const; - void SetUTCOffset(TInt aUTCoffset); - - private: - void ConstructL( - const TDesC& aStandardName, - const TDesC& aDaylightName, - const TDesC& aShortStandardName, - const TDesC& aShortDaylightName); - CTzLocalizedTimeZone(const TTzLocalizedId& aTzLocalizedId); - - private: - //Member data - TTzLocalizedId iTzLocalizedId; - HBufC* iStandardName; - HBufC* iDaylightName; - HBufC* iShortStandardName; - HBufC* iShortDaylightName; - }; - -/** -Template for arrays of localized objects. Implemented using a thin template. -All functions are inline. - -@publishedAll -@released -*/ -template -class CTzLocalizedArray : public CBase - { - protected: - inline ~CTzLocalizedArray(); - - inline T& At(TInt aIndex) const; - inline TInt Count() const; - inline void AppendL(T* aElement); - inline void Remove(TInt aIndex); - inline void Sort(TLinearOrder aOrder); - inline TInt Find(T* aEntry,TIdentityRelation aIdentityRelation); - - inline CTzLocalizedArray(); - - private: - //Member data - RPointerArray iArray; - }; - -// Assign concrete classes for each of the arrays that will be used -// This guards against future BC problems - -/** -An array of cities. This just passes function calls on to its templated base -class, CTzLocalizedArray. - -@publishedAll -@released -*/ -class CTzLocalizedCityArray : public CTzLocalizedArray - { - public: - IMPORT_C static CTzLocalizedCityArray* NewL(); - IMPORT_C static CTzLocalizedCityArray* NewLC(); - - IMPORT_C CTzLocalizedCity& At(TInt aIndex) const; - IMPORT_C TInt Count() const; - IMPORT_C void AppendL(CTzLocalizedCity* aCity); - IMPORT_C void Remove(TInt aIndex); - IMPORT_C void Sort(TLinearOrder anOrder); - IMPORT_C TInt Find(CTzLocalizedCity* anEntry,TIdentityRelation aIdentityRelation); - }; - -/** -An array of city groups. This just passes function calls on to its templated base -class, CTzLocalizedArray. - -@publishedAll -@released -*/ -class CTzLocalizedCityGroupArray : public CTzLocalizedArray - { - public: - IMPORT_C static CTzLocalizedCityGroupArray* NewL(); - IMPORT_C static CTzLocalizedCityGroupArray* NewLC(); - - IMPORT_C CTzLocalizedCityGroup& At(TInt aIndex) const; - IMPORT_C TInt Count() const; - IMPORT_C void AppendL(CTzLocalizedCityGroup* aGroup); - IMPORT_C void Remove(TInt aIndex); - IMPORT_C void Sort(TLinearOrder anOrder); - IMPORT_C TInt Find(CTzLocalizedCityGroup* anEntry,TIdentityRelation aIdentityRelation); - }; - -/** -An array of time zones. This just passes function calls on to its templated base -class, CTzLocalizedArray. - -@publishedAll -@released -*/ -class CTzLocalizedTimeZoneArray : public CTzLocalizedArray - { - public: - IMPORT_C static CTzLocalizedTimeZoneArray* NewL(); - IMPORT_C static CTzLocalizedTimeZoneArray* NewLC(); - - IMPORT_C CTzLocalizedTimeZone& At(TInt aIndex) const; - IMPORT_C TInt Count() const; - IMPORT_C void AppendL(CTzLocalizedTimeZone* aElement); - IMPORT_C void Remove(TInt aIndex); - IMPORT_C void Sort(TLinearOrder anOrder); - IMPORT_C TInt Find(CTzLocalizedTimeZone* anEntry,TIdentityRelation aIdentityRelation); - }; - -#include - -#endif //__TZLOCAL_DATATYPES_H__ -//================================================================== -// End of file -//================================================================== diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tzlocalizationdatatypes.inl --- a/epoc32/include/tzlocalizationdatatypes.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TZLOCAL_DATATYPES_INL__ -#define __TZLOCAL_DATATYPES_INL__ - -//================================================================== -// TTzLocalizedId inline Functions -//================================================================== -/** -Returns the time zone ID. -@return The time zone ID. -*/ -inline TUint16 TTzLocalizedId::TimeZoneId() const - { - return iTzId; - } - -/** -Returns the resource ID. -@return The resource ID. -*/ -inline TUint TTzLocalizedId::ResourceId() const - { - return iResourceId; - } - -/** -Returns the UTC offset in minutes. -This value should only be used for array sorting. -@return The UTC offset in minutes. -*/ -inline TInt TTzLocalizedId::UTCOffset() const - { - return iUTCOffset; - } - -/** -Sets the UTC offset in minutes. -This value should only be used for internal array sorting. -@param aOffsetInMinutes The new UTC offset in minutes. -*/ -inline void TTzLocalizedId::SetUTCOffset(TInt aOffsetInMinutes) - { - iUTCOffset = aOffsetInMinutes; - } - -//================================================================== -// CTzLocalizedArray's inline functions -//================================================================== -/** -Destructor -@internalTechnology -*/ -template -inline CTzLocalizedArray::~CTzLocalizedArray() - { - iArray.ResetAndDestroy(); - } - -/** -Default constructor -@internalTechnology -*/ -template -inline CTzLocalizedArray::CTzLocalizedArray() - { - } -/** -Returns the element at the specified index. -@param aIndex Index of the element to get. -@return The element at aIndex. -@internalTechnology -*/ -template -inline T& CTzLocalizedArray::At(TInt aIndex) const - { - return *(iArray[aIndex]); - } - -/** -Returns the number of elements in the array. -@return The number of elements in the array. -@internalTechnology -*/ -template -inline TInt CTzLocalizedArray::Count() const - { - return iArray.Count(); - } - -/** -Appends aElement to this array. -@param aElement The element to add. -@internalTechnology -*/ -template -inline void CTzLocalizedArray::AppendL(T* aElement) - { - iArray.AppendL(aElement); - } - -/** -Removes the element at the specified index. -@param aIndex The index of the element to remove. -@internalTechnology -*/ -template -inline void CTzLocalizedArray::Remove(TInt aIndex) - { - iArray.Remove(aIndex); - } - -/** -Sorts this array. -@param aOrder The sorting function to use. -@internalTechnology -*/ -template -inline void CTzLocalizedArray::Sort(TLinearOrder aOrder) - { - iArray.Sort(aOrder); - } - -/** -Finds an element in this array. -@param aIdentityRelation finding function to use. -@internalTechnology -*/ -template -inline TInt CTzLocalizedArray::Find(T* aEntry,TIdentityRelation aIdentityRelation) - { - return iArray.Find(aEntry,aIdentityRelation); - } - -#endif //__TZLOCAL_DATATYPES_INL__ - -//================================================================== -// End of file -//================================================================== diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tzlocalizer.h --- a/epoc32/include/tzlocalizer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,175 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TzLocalizer_H__ -#define __TzLocalizer_H__ - -#include //CBase - -#include //CTzLocalizedCity, CTzLocalizedCityGroup etc - -// Forward Declarations -class MTzLocalizationReader; -class MTzLocalizationWriter; - -/** -Retrieves localized time zone information based on a time zone ID. - -Time zone information is available in the following forms: -- Standard Name, for instance Greenwich Mean Time, -- Short Standard Name, for instance GMT, -- Daylight Savings Name, for instance British Summer Time, -- Short Daylight Savings Name, for instance BST. - -This information is encapsulated in a CTzLocalizedTimeZone object. - -A collection of localizable cities for a specific time zone can also be returned. -New cities can be added to a time zone. Cities may also be added to groups, but -a city may only be a member of one group. - -@publishedAll -@released -*/ -class CTzLocalizer : public CBase - { - public: - /** Panic reasons for the time zone localization component. */ - enum TTzLocalizerPanics - { - /** The time zone server was not found. */ - ETzLocalizerPanicTimeZoneServerNotFound, - /** A resource file was not found. */ - ETzLocalizerPanicResourceFileNotFound - }; - - /** Used to specify the sort order of localized time zone information. */ - enum TTzSortOrder - { - /** Unsorted. This is the fastest way to get localized data. */ - ETzUnsorted, - /** Sort by UTC offset starting with the lowest. */ - ETzUTCAscending, - /** Sort by UTC offset starting with the highest. */ - ETzUTCDescending, - /** Sort by name (city name/group name/standard time zone name), from A-Z. */ - ETzAlphaNameAscending, - /** Sort by name (city name/group name/standard time zone name), from Z-A. */ - ETzAlphaNameDescending, - /** Sort by standard name from A-Z. */ - ETzAlphaStandardNameAscending, - /** Sort by daylight savings name from A-Z. */ - ETzAlphaDaylightNameAscending, - /** Sort by short standard name from A-Z. */ - ETzAlphaShortStandardNameAscending, - /** Sort by short daylight savings name from A-Z. */ - ETzAlphaShortDaylightNameAscending, - /** Sort by standard name from Z-A. */ - ETzAlphaStandardNameDescending, - /** Sort by daylight savings name from Z-A. */ - ETzAlphaDaylightNameDescending, - /** Sort by short standard name from Z-A. */ - ETzAlphaShortStandardNameDescending, - /** Sort by short daylight savings name from Z-A. */ - ETzAlphaShortDaylightNameDescending - }; - - public: - //Construction / Destruction - IMPORT_C static CTzLocalizer* NewL(); - IMPORT_C static CTzLocalizer* NewLC(); - IMPORT_C ~CTzLocalizer(); - - //Time zones - IMPORT_C CTzLocalizedTimeZone* GetLocalizedTimeZoneL(TInt aTimeZoneId) const; - IMPORT_C CTzLocalizedTimeZone* GetLocalizedTimeZoneL(const CTzLocalizedCity& aCity) const; - IMPORT_C CTzLocalizedTimeZoneArray* GetAllTimeZonesL(const TTzSortOrder aSortOrder = ETzUnsorted); - - IMPORT_C void SetTimeZoneL(TInt aTimeZoneId); - - //City Management - IMPORT_C CTzLocalizedCity* GetDefaultCityL(TInt aTimeZoneId) const; - IMPORT_C CTzLocalizedCity* GetDefaultCityL(const CTzLocalizedCity& aCity) const; - IMPORT_C CTzLocalizedCity* GetDefaultCityL(const CTzLocalizedTimeZone& aTimeZone) const; - - IMPORT_C CTzLocalizedCityArray* GetCitiesL(const TTzSortOrder aSortOrder = ETzUnsorted); - IMPORT_C CTzLocalizedCityArray* GetCitiesL(TInt aTimeZoneId,const TTzSortOrder aSortOrder = ETzUnsorted); - IMPORT_C CTzLocalizedCityArray* GetCitiesL(const CTzLocalizedTimeZone& aTimeZone,const TTzSortOrder aSortOrder = ETzUnsorted); - IMPORT_C CTzLocalizedCityArray* GetCitiesL(const CTzLocalizedCity& aCity,const TTzSortOrder aSortOrder = ETzUnsorted); - - IMPORT_C CTzLocalizedCity* AddCityL(TInt aTimeZoneId,const TDesC& aCityName, TInt aGroupId = 0); - IMPORT_C void RemoveCityL(CTzLocalizedCity* aCity); - - //City Groups - IMPORT_C CTzLocalizedCityGroupArray* GetAllCityGroupsL(const TTzSortOrder aSortOrder = ETzUnsorted) const; - IMPORT_C CTzLocalizedCityGroup* GetCityGroupL(TInt aGroupId) const; - IMPORT_C CTzLocalizedCityGroup* GetCityGroupL(const CTzLocalizedCity& aCity) const ; - - IMPORT_C CTzLocalizedCityArray* GetCitiesInGroupL(TInt aGroupId,const TTzSortOrder aSortOrder = ETzUnsorted); - IMPORT_C CTzLocalizedCityArray* GetCitiesInGroupL(const CTzLocalizedCity& aCity,const TTzSortOrder aSortOrder = ETzUnsorted); - IMPORT_C CTzLocalizedCityArray* GetCitiesInGroupL(const CTzLocalizedCityGroup& aCityGroup,const TTzSortOrder aSortOrder = ETzUnsorted); - - //Frequently Used Zones - IMPORT_C CTzLocalizedTimeZone* GetFrequentlyUsedZoneL(const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); - IMPORT_C CTzLocalizedCity* GetFrequentlyUsedZoneCityL(const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); - IMPORT_C void SetFrequentlyUsedZoneL(TInt aTimeZoneId,const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); - IMPORT_C void SetFrequentlyUsedZoneL(const CTzLocalizedTimeZone& aTimeZone,const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); - IMPORT_C void SetFrequentlyUsedZoneL(const CTzLocalizedCity& aCity,const CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFrequentlyUsedZone); - - //Find functions - IMPORT_C CTzLocalizedCity* FindCityByNameL(const TDesC& aCityName, const TInt aTimeZoneId = 0); - IMPORT_C CTzLocalizedTimeZone* FindTimeZoneByNameL(const TDesC& aTimeZoneName); - IMPORT_C CTzLocalizedCityGroup* FindCityGroupByNameL(const TDesC& aCityGroupName); - - IMPORT_C TBool CheckLanguage(); - - //Cities and Time Zones with a specified UTC offset - IMPORT_C CTzLocalizedCityArray* GetCitiesWithUTCOffsetL(TInt aUTCOffsetInMinutes, const TTzSortOrder aSortOrder = ETzUnsorted); - IMPORT_C CTzLocalizedTimeZoneArray* GetTimeZonesWithUTCOffsetL(TInt aUTCOffsetInMinutes, const TTzSortOrder aSortOrder = ETzUnsorted); - - private: - void ConstructL(); - CTzLocalizer(); - - TBool PrepareFrequentlyUsedZonesL(); - void UpdateFrequentlyUsedZonesL(); - CTzLocalizedTimeZone* GetFrequentlyUsedDefaultZoneL(CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFreqUsedZone); - TUint32 GetFrequentlyUsedDefaultZoneCenRepKeyL(CTzLocalizedTimeZone::TTzFrequentlyUsedZone aFreqUsedZone); - - void GetCitiesL(CTzLocalizedCityArray& aCities, const TTzLocalizedId& aLocalizedId, const TTzSortOrder aSortOrder = ETzUnsorted); - - TLinearOrder CitySortOrderL(const TTzSortOrder aSortOrder); - TLinearOrder TimeZoneSortOrderL(const TTzSortOrder aSortOrder); - template void PrepareForUTCSortL(T& aArray); - - TInt GetTimeZoneIdFromTzServerL(); - void DoSetTimeZoneL(TInt aTimeZoneId); - void ChangeHomeTimeZoneL(TInt aNewId); - - void ValidateDbL(); - void RecreateDbL(); - TBool DbNeedsUpdatingL() const; - TBool DbIsInvalidL() const; - void UpgradeDbVersionL(); - void FetchCityToUpgradeL(CTzLocalizedTimeZoneArray& aTimeZoneArray, CTzLocalizedCityArray& aCityArray, CTzLocalizedTimeZone::TTzFrequentlyUsedZone aCachedZone); - - private: - //Member data - MTzLocalizationReader* iStaticDataReader; - MTzLocalizationReader* iPersistedDataReader; - MTzLocalizationWriter* iPersistedDataWriter; - TLanguage iLanguage; - }; - -#endif//__TzLocalizer_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/tzupdate.h --- a/epoc32/include/tzupdate.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __TZUPDATE_H__ -#define __TZUPDATE_H__ - -#include // TUid. - -/** UTC Offset update notification constants. When the UTC offset is automatically -adjusted for Daylight Saving then it is possible to receive -notification using the Publish and Subscribe API with the -values defined here. Note that this property is updated by the Time Zone Server -as this is the only component that can modify the UTC Offset. - -@see RProperty in e32property.h -@publishedAll -@released -@since 9.1 -*/ -namespace NTzUpdate - { - const TUid KPropertyCategory = { 0x1020383E }; - - enum TPropertyKeys - { - EUtcOffsetChangeNotification, - ECurrentTimeZoneId, - EHomeTimeZoneId, - ENextDSTChange - }; - - struct TTimeZoneChange - { - TInt iNewTimeZoneId; - TInt iOldTimeZoneId; - }; - - /** This struct is used to publish DST Change info in an RProperty. - Subscribers to the property will define a copy of this struct - so that they are not dependant on the tz component. - If this struct changes then the copies must also be changed. - @internalTechnology - */ - struct TDSTChangeInfo - { - /** The version of the struct. Currently always 1 */ - TUint8 iVersion; - - /** The time of the next offset change in UTC */ - TTime iNextDSTChangeUTC; - /** The offset from UTC (in minutes) after the next DST change will take place.*/ - TInt iNextUTCOffset; - - /** The time of the previous offset change in UTC. This member is only valid if the version is 2 or above. */ - TTime iPreviousDSTChangeUTC; - - /** The offset from UTC (in minutes) before the previous DST change took place. This member is only valid - if the version is 2 or above.*/ - TInt iPreviousUTCOffset; - - /** Reserved for future use. */ - TInt iReserved[12]; - }; - } - -#endif // __TZUPDATE_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/uikon/eikalsrv.h --- a/epoc32/include/uikon/eikalsrv.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,133 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @internalComponent -*/ - -#ifndef __EIKALSRV_H__ -#define __EIKALSRV_H__ - -#include -#include -#include - -class MEikServAlarmFactory; -class MEikServAlarm; -class CEikServAlarmAlertSession; - -/** -@internalComponent -*/ -NONSHARABLE_CLASS(CEikServAlarmAlertServer) : public CPolicyServer - { -public: - IMPORT_C static CEikServAlarmAlertServer* NewL(MEikServAlarmFactory* aAlarmControlFactory); - IMPORT_C static CEikServAlarmAlertServer* NewL(MEikServAlarmFactory* aAlarmControlFactory, TInt aMaxAlarms); - ~CEikServAlarmAlertServer(); - IMPORT_C void HandleSwitchOnEvent(); - IMPORT_C void TaskKeyPressedL(); - inline TBool AlarmAlertIsVisible() const; - inline void SessionDied(); - IMPORT_C void SetQuietPeriodL(TTime aQuietPeriodEndTime); - IMPORT_C void ClearAllAlarmsL(); -public: // from CPolicyServer - CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; -private: - CEikServAlarmAlertServer(TInt aPriority, MEikServAlarmFactory& aAlarmControlFactory, TInt aMaxAlarms); -private: - CEikServAlarmAlertSession* iSession; // iSession does not *own* what it points to - MEikServAlarmFactory& iAlarmControlFactory; - TInt iMaxAlarms; - }; - - -class CEikAlmControlSupervisor; - -/** -Helper class for CEikServAlarmAlertSession. Holds response data for queuing -@internalComponent -*/ -NONSHARABLE_CLASS(TAlarmResponse) - { -public: - TAlarmResponse (TASAltAlertServerResponse aCode, TAlarmId aId, TTime aTime); - TASAltAlertServerResponse ResponseCode () const; - TAlarmId AlarmId () const; - TTime TimeToSnooze() const; -private: - TASAltAlertServerResponse iCode; - TAlarmId iId; - TTime iTime; - }; - -// supposed to be maximum one response in a queue, because client should resubmit request -// for response as soon as it receive previous -const TInt KAlertResponseQueueSize = 20; - -/** -Represents a session for a client thread on the server-side. -@internalComponent -*/ -NONSHARABLE_CLASS(CEikServAlarmAlertSession) : public CSession2 - { -public: - static CEikServAlarmAlertSession* NewL(MEikServAlarmFactory& aAlarmControlFactory, TInt aMaxAlarms); - ~CEikServAlarmAlertSession(); - void TaskKeyPressedL(); - void HandleSwitchOnEvent(); - inline TBool AlarmAlertIsVisible() const; - - void SetQuietPeriodL(TTime aQuietPeriodEndTime); - inline TTime QuietPeriodEndTime() const; - void RespondEventL(TASAltAlertServerResponse aCode); - void RespondEventL(TASAltAlertServerResponse aCode, TAlarmId aId, TTime aTimeToSnooze = 0); - void ClearAllAlarmsL(); -private: - CEikServAlarmAlertServer* AlarmAlertServer() const; - void ConstructL(); - virtual void ServiceL(const RMessage2 &aMessage); - - CEikServAlarmAlertSession(MEikServAlarmFactory& aAlarmControl, TInt aMaxAlarms); - void QueueEventL (TASAltAlertServerResponse& aCode,TAlarmId& aId, TTime& aTimeToSnooze); - TInt FindAlarm(TAlarmId aAlarmId) const; - void DeleteAlarmL(const RMessage2& aMessage); - void UpdateVisibility(); -private: - TBool iVisible; - MEikServAlarmFactory& iAlarmControlFactory; - TTime iQuietPeriodEndTime; - TInt iMaxAlarms; - RPointerArray iAlarmSupervisors; - RArray iResponseQueue; - RMessage2 iMessage; - }; - -inline TBool CEikServAlarmAlertServer::AlarmAlertIsVisible() const - { return iSession->AlarmAlertIsVisible(); } - -inline TBool CEikServAlarmAlertSession::AlarmAlertIsVisible() const - { return iVisible; } - -inline void CEikServAlarmAlertServer::SessionDied() - { iSession = NULL; } - -inline TTime CEikServAlarmAlertSession::QuietPeriodEndTime() const - { return iQuietPeriodEndTime; } - -#endif //__EIKALSRV_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/variant/platform_paths.hrh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/variant/platform_paths.hrh Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,585 @@ +/* +* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Predefined include paths to be used in the mmp-files for the +* components in the layered model. There is one definition for +* each layer. The mmp-file should use the statement that is +* intended for the same layer as where the mmp-file resides. +* +* There is also macros to be used in the bld.inf-files to +* export of Public and Platform headers into +* correct locations. +* +* Usage examples: +* --------------------------------------------- +* How to include this file in bld.inf and mmp-files. +* Reasoning: The build system is such that at the time the +* bld.inf and mmp-files are "compiled" the available +* include paths are limited. Only the /epoc32/include +* can be guaranteed. Thus to get this file available +* you need to make include relative to the mentioned +* directory. +* --------------------------------------------- +* +* #include +* +* ************************************************************* +* * MMP file related macro usages to add the system include paths +* * +* * The include paths has to be related to the layer in which your SW +* * resides. Thus as an example: a component residing in middleware +* * layer should use the MW specific macro. +* * Keep this as a separate line in the mmp-files. If you need to +* * add your own SYSTEMINCLUDE paths, please defined them as +* * separate statement. +* ************************************************************* +* APP_LAYER_SYSTEMINCLUDE +* MW_LAYER_SYSTEMINCLUDE +* OS_LAYER_SYSTEMINCLUDE +** +* ************************************************************* +* * Macros related to using various parts of stdapis +* ************************************************************* +* To use STLLIB you need to have this in your mmp-file +* STLLIB_USAGE_DEFINITIONS +* +* Depending on what module you are using from stdapis you need to have +* one or more of the following macros in your mmp-file (every one in +* separate line !) +* +* OS_LAYER_LIBC_SYSTEMINCLUDE +* OS_LAYER_GLIB_SYSTEMINCLUDE +* OS_LAYER_SSL_SYSTEMINCLUDE +* OS_LAYER_STDCPP_SYSTEMINCLUDE +* OS_LAYER_BOOST_SYSTEMINCLUDE +* OS_LAYER_DBUS_SYSTEMINCLUDE +* OS_LAYER_LIBUTILITY_SYSTEMINCLUDE +* +* ************************************************************* +* * Macros related to exporting Public and Platform APIs into +* * correct place in the new system. +* * +* * The macro that you should use depends on 2 things: +* * - in which layer your package, which exports the APIs resides +* * - what is the visibility of the API (public or platform) +* ************************************************************* +* // the exporting of public APIs should use one of below macros +* // depending on which layer the API belogs to +* APP_LAYER_PUBLIC_EXPORT_PATH +* MW_LAYER_PUBLIC_EXPORT_PATH +* OS_LAYER_PUBLIC_EXPORT_PATH +* +* // the exporting of platform APIs should use one of below macros +* // depending on which layer the API belogs to +* APP_LAYER_PLATFORM_EXPORT_PATH +* MW_LAYER_PLATFORM_EXPORT_PATH +* OS_LAYER_PLATFORM_EXPORT_PATH +* +* The hierarchy how APIs should reside in foundation has been specified +* in developer documentation. See further details from documentation. +* Below is example case relying on the structure +* my_own_api/group/bld.inf +* my_own_api/inc/header1.h +* my_own_api/inc/subdir/header2.h +* +* Assuming that the API is in middleware layer and a public API. +* Then the bld.inf should have the following +* ../inc/header1.h APP_LAYER_PUBLIC_EXPORT_PATH(header1.h) +* ../inc/subdir/header2.h APP_LAYER_PUBLIC_EXPORT_PATH(subdir/header2.h) +* +* In the above case the locations are as follow (with current MACRO settings): +* header1.h in /epoc32/include/app +* header2.h in /epoc32/include/app/subdir +* +* +* ************************************************************* +* * Macros related to IBY file exporting +* ************************************************************* +* +* Component bld.inf files need to include platform_paths.hrh, see +* beginning of this file on how to do this correctly. Component bld.inf +* files need to use these macros in PRJ_EXPORTS to get their IBY files +* to ROM image. +* +* --------------------------------------------- +* Usage for Core image (ROM+ROFS1): +* --------------------------------------------- +* // Layer specific specific macros. Use the macro, which is specified +* // for the layer, in which your component resides +* / CORE_APP_LAYER_IBY_EXPORT_PATH() +* / CORE_MW_LAYER_IBY_EXPORT_PATH() +* / CORE_OS_LAYER_IBY_EXPORT_PATH() +* +* //stub iby files +* / CORE_IBY_EXPORT_PATH(stubs,) +* //tool iby files +* / CORE_IBY_EXPORT_PATH(tools,) +* +* --------------------------------------------- +* Usage for Variant image, Language part (ROFS2): +* --------------------------------------------- +* // Layer specific specific macros. Use the macro, which is specified +* // for the layer, in which your component resides +* / LANGUAGE_APP_LAYER_IBY_EXPORT_PATH() +* / LANGUAGE_MW_LAYER_IBY_EXPORT_PATH() +* / LANGUAGE_OS_LAYER_IBY_EXPORT_PATH() +* +* --------------------------------------------- +* Usage for Variant image, Language part (ROFS2): +* --------------------------------------------- +* // Layer specific specific macros. Use the macro, which is specified +* // for the layer, in which your component resides +* / CUSTOMER_APP_LAYER_IBY_EXPORT_PATH() +* / CUSTOMER_MW_LAYER_IBY_EXPORT_PATH() +* / CUSTOMER_OS_LAYER_IBY_EXPORT_PATH() +* +* --------------------------------------------- +* Usage for Customer Variant image, (ROFS3): +* --------------------------------------------- +* // Layer specific specific macros. Use the macro, which is specified +* // for the layer, in which your component resides +* / CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH() +* / CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH() +* / CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH() +* +* +* ************************************************************* +* * Macro related to Exporting localization .loc files into +* * correct place in the system. +* ************************************************************* +* +* --------------------------------------------- +* Usage for components: +* --------------------------------------------- +* Component bld.inf files need to include platform_paths.hrh, see +* beginning of this file on how to do this correctly. Component bld.inf +* files need to use these macros in PRJ_EXPORTS to get their loc files +* for localization. +* loc files that should be localized by localisation team should be in +* loc-folder in the source tree (see developer guidelines) +* +* // Layer specific specific macros. Use the macro, which is specified +* // for the layer, in which your component resides +* /loc/.loc APP_LAYER_LOC_EXPORT_PATH(.loc) +* /loc/.loc MW_LAYER_LOC_EXPORT_PATH(.loc) +* /loc/.loc OS_LAYER_LOC_EXPORT_PATH(.loc) +* +* +* +* +*/ + + +#ifndef PLATFORM_PATHS_HRH +#define PLATFORM_PATHS_HRH + +/** +************************************************************************** +* General comments about the exporting of headers macros +* 1) The definitions point currently to the old locations. (which makes some +* macros to have same values. The idea is that you can already start using +* them now and those will be later on changed => change affects everybody. +*************************************************************************** +*/ + +/** +* --------------------------------------- +* Location, where the applications layer specific public headers should be exported +* See usage on top of this hrh-file. +* --------------------------------------- +*/ + +#if __GNUC__ >= 3 +#define APP_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error +#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/app/exported +#else +#define APP_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error +#define APP_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/app/##exported +#endif + +/** +* --------------------------------------- +* Location, where the applications layer specific platform headers should be exported +* See usage on top of this hrh-file. +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error +#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/app/exported +#else +#define APP_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error +#define APP_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/app/##exported +#endif + +/** +* --------------------------------------- +* Location, where the middleware layer specific public headers should be exported +* See usage on top of this hrh-file. +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define MW_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error +#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/mw/exported +#else +#define MW_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error +#define MW_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/mw/##exported +#endif + +/** +* --------------------------------------- +* Location, where the middleware layer specific platform headers should be exported +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error +#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/mw/exported +#else +#define MW_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error +#define MW_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/mw/##exported +#endif + +/** +* --------------------------------------- +* Location, where the os layer specific public headers should be exported +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define OSEXT_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error +#define OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/exported +#else +#define OSEXT_LAYER_SDK_EXPORT_PATH(exported) do not use intentionally generates error +#define OS_LAYER_PUBLIC_EXPORT_PATH(exported) /epoc32/include/##exported +#endif + +/** +* --------------------------------------- +* Location, where the os specific platform headers should be exported +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error +#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/exported +#else +#define OSEXT_LAYER_DOMAIN_EXPORT_PATH(exported) do not use intentionally generates error +#define OS_LAYER_PLATFORM_EXPORT_PATH(exported) /epoc32/include/platform/##exported +#endif + +/** +* --------------------------------------- +* Location, where the cenrep excel sheets should be exported +* Deprecated: should no longer be used. Kept for compability. +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/exported +#else +#define CENREP_XLS_EXPORT_PATH(exported) /epoc32/tools/cenrep/data/src/##exported +#endif + +/** +************************************************************************** +* General comments about the 3 define statements related to include paths: +* 1) the /epoc32/include/oem is now defined there for backward compability. +* Once the directory is empty, the directory will be removed. However this +* enables us to ensure that if you use these define statements => you do +* not have to remove the statements later on, when the directory no longer +* exists. +* 2) These statements should be enough in normal cases. For certain specific +* cases you migth need to add some specific directory from /epoc32/include +* (for instance /epoc32/include/ecom). +* In normal cases the include staments in code should be relative to one of +* the system include paths, but in certain cases, the included files requires +* that the subdirectory is also part of the system include paths. +**************************************************************************** +*/ + +/** +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be +* used in the mmp-files that are part of the applications-layer. It includes all +* the needed directories from the /epoc32/include, that are valid ones for the +* application-layer components. +* +* Applications layer is the last one in the list, since most likely the most of +* the headers come from middleware or os-layer => thus they are first. +*/ +#define APP_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ + /epoc32/include \ + /epoc32/include/mw \ + /epoc32/include/platform/mw \ + /epoc32/include/platform \ + /epoc32/include/app \ + /epoc32/include/platform/app \ + /epoc32/include/platform/loc \ + /epoc32/include/platform/mw/loc \ + /epoc32/include/platform/app/loc \ + /epoc32/include/platform/loc/sc \ + /epoc32/include/platform/mw/loc/sc \ + /epoc32/include/platform/app/loc/sc + +/** +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be +* used in the mmp-files that are part of the middleware-layer. It includes all +* the needed directories from the /epoc32/include, that are valid ones for the +* middleware-layer components. +*/ +#define MW_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ + /epoc32/include \ + /epoc32/include/mw \ + /epoc32/include/platform/mw \ + /epoc32/include/platform \ + /epoc32/include/platform/loc \ + /epoc32/include/platform/mw/loc \ + /epoc32/include/platform/loc/sc \ + /epoc32/include/platform/mw/loc/sc + +/** +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be +* used in the mmp-files that are part of the osextensions-layer. It includes all +* the needed directories from the /epoc32/include, that are valid ones for the +* os-layer components. +*/ +#define OS_LAYER_SYSTEMINCLUDE SYSTEMINCLUDE \ + /epoc32/include \ + /epoc32/include/platform \ + /epoc32/include/platform/loc \ + /epoc32/include/platform/loc/sc + +// Below statement is Deprecated and the OS_LAYER_SYSTEMINCLUDE-macro has to be +// used. +// Removed, use teh OS_LAYER_SYSTEMINCLUDE instead. +// #define OSEXT_LAYER_SYSTEMINCLUDE OS_LAYER_SYSTEMINCLUDE + +/** +* This define statements defines the SYSTEMINCLUDE-line, which is intended to be +* used in the mmp-files that are part of the os-layer. This is intended +* to be only used by those components which need to use in their mmp-file either +* kern_ext.mmh or nkern_ext.mmh. Reason is that those +* 2 files already contain the /epoc32/include as system include path. +* +*/ +#define OS_LAYER_KERNEL_SYSTEMINCLUDE SYSTEMINCLUDE \ + /epoc32/include/platform + +// Below statement is Deprecated and the OS_LAYER_KERNEL_SYSTEMINCLUDE-macro +// has to be used. +// Removed, use the OS_LAYER_KERNER_SYSTEMINCLUDE instead. +// #define OSEXT_LAYER_KERNEL_SYSTEMINCLUDE OS_LAYER_KERNEL_SYSTEMINCLUDE + +/** +**************************************************************************** +* Definitions that also define the systeminclude paths for various +* part of stdapis. Each statement has to be in its own line in the using +* mmp-file. There are be more than 1 statement in single mmp-file. +**************************************************************************** +*/ +#define OS_LAYER_LIBC_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis) + +#define OS_LAYER_GLIB_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0) \ + OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/glib) \ + OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/glib-2.0/gObject) + + +#define OS_LAYER_SSL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/openssl) + +#define OS_LAYER_STDCPP_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/stlport) + +#define OS_LAYER_BOOST_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/boost) + +#define OS_LAYER_DBUS_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0) \ + OS_LAYER_PUBLIC_EXPORT_PATH(stdapis/dbus-1.0/dbus) +#define OS_LAYER_LIBUTILITY_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/utility) + +#define OS_LAYER_LIBOIL_SYSTEMINCLUDE SYSTEMINCLUDE OS_LAYER_PLATFORM_EXPORT_PATH(stdapis/liboil) + +#define MW_LAYER_GSTREAMER_SYSTEMINCLUDE SYSTEMINCLUDE \ + /epoc32/include/platform/mw/gstreamer/10_18 \ + /epoc32/include/platform/mw/gstreamer/10_18/gst \ + /epoc32/include/platform/mw/gstreamer/10_18/gst/gstcontroller \ + /epoc32/include/stdapis/machine + +// You need to add STLLIB_USAGE_DEFINITIONS as a separate line into your mmp-file, if you are using +// the stllib. +#define STLLIB_USAGE_DEFINITIONS OPTION CW -wchar_t on\ + MACRO _WCHAR_T_DECLARED + + +/** +**************************************************************************** +* Definitions that also define the paths to the layer specific source directories. +**************************************************************************** +*/ +/** +* The below 3 macros define the paths to the layer-specific source dirs. +* See usage on top of this hrh-file, these are used the same way as +* for instance the OS_LAYER_DOMAIN_EXPORT_PATH +* Deprecated: is not allowed to be using in Symbian Foundation +*/ +#if __GNUC__ >= 3 +#define APP_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export +#define MW_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export +#define OSEXT_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export +#else +#define APP_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export +#define MW_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export +#define OSEXT_LAYER_SOURCE_PATH(rest) do not use intentionally generates error in export +#endif + +/** +**************************************************************************** +* Definitions to export IBY files to different folders where they will be taken +* to ROM image +**************************************************************************** +*/ + +// Following three definitions are used for exporting IBY files to +// Core image (ROM+ROFS1). IBY files are exported according to their layer. +#if __GNUC__ >= 3 +#define CORE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/app/exported +#define CORE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/mw/exported +#define CORE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define CORE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/os/exported +#define CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/exported +#else +#define CORE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/app/##exported +#define CORE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/mw/##exported +#define CORE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define CORE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/core/os/##exported +#define CORE_ADAPT_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/##exported +#endif + +// Following three definitions are used for exporting IBY files to Variant image, +// Language part (ROFS2). IBY files are exported according to their layer. +#if __GNUC__ >= 3 +#define LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/app/exported +#define LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/mw/exported +#define LANGUAGE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/os/exported +#else +#define LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/app/##exported +#define LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/mw/##exported +#define LANGUAGE_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define LANGUAGE_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/language/os/##exported +#endif + +// Following three definitions are used for exporting IBY files to Variant image, (ROFS2). +// BY files are exported according to their layer. +#if __GNUC__ >= 3 +#define CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/app/exported +#define CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/mw/exported +#define CUSTOMER_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/os/exported +#else +#define CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/app/##exported +#define CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/mw/##exported +#define CUSTOMER_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define CUSTOMER_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customer/os/##exported +#endif + +// Following three definitions are used for exporting IBY files to +// Variant Customer part, (ROFS3). IBY files are exported according to +// their layer. +#if __GNUC__ >= 3 +#define CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/app/exported +#define CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/mw/exported +#define CUSTOMER_VARIANT_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/os/exported +#else +#define CUSTOMER_VARIANT_APP_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/app/##exported +#define CUSTOMER_VARIANT_MW_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/mw/##exported +#define CUSTOMER_VARIANT_OSEXT_LAYER_IBY_EXPORT_PATH(exported) do not use intentionally generates error +#define CUSTOMER_VARIANT_OS_LAYER_IBY_EXPORT_PATH(exported) /epoc32/rom/include/customervariant/os/##exported +#endif + + +// Following definition is used for exporting tools and stubs IBY files to +// Core image. +#if __GNUC__ >= 3 +#define CORE_IBY_EXPORT_PATH(path,exported) /epoc32/rom/include/core/path/exported +#else +#define CORE_IBY_EXPORT_PATH(path,exported) /epoc32/rom/include/core/##path##/##exported +#endif + +/** +* --------------------------------------- +* Location, where the localization .loc file should be exported +* --------------------------------------- +*/ +// Location, where the os layer localization .loc file should be +// exported +#if __GNUC__ >= 3 +// Deprecated: use the OS_LAYER_LOC_EXPORT_PATH instead +#define OSEXT_LAYER_LOC_EXPORT_PATH(exported) do not use intentionally generates error +#define OS_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/loc/sc/exported + +// Location, where the middleware layer localization .loc file should be +// exported +#define MW_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/mw/loc/sc/exported + +// Location, where the application layer localization .loc file should be +// exported +#define APP_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/app/loc/sc/exported + +#else + +// Deprecated: use the OS_LAYER_LOC_EXPORT_PATH instead +#define OSEXT_LAYER_LOC_EXPORT_PATH(exported) do not use intentionally generates error +#define OS_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/loc/sc/##exported + +// Location, where the middleware layer localization .loc file should be exported +#define MW_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/mw/loc/sc/##exported + +// Location, where the application layer localization .loc file should be exported +#define APP_LAYER_LOC_EXPORT_PATH(exported) /epoc32/include/platform/app/loc/sc/##exported +#endif + +/** +* --------------------------------------- +* Macros for Configuration tool migration. +* The below macros define the location under epoc32, where the confml +* (Configuration Markup Language) and crml (Central Repository Markup Language) +* files should be exported. +* --------------------------------------- +*/ +#if __GNUC__ >= 3 +#define CONFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/file +#define CRML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/file +#define GCFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/file +#define CONFML_CONFIG_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/category/config/file +#else +#define CONFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/##file +#define CRML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/##file +#define GCFML_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/##file +#define CONFML_CONFIG_EXPORT_PATH(file,category) /epoc32/rom/config/confml_data/##category##/config/##file +#endif + +#define APP_LAYER_CONFML(exported) CONFML_EXPORT_PATH(exported,s60) +#define APP_LAYER_CRML(exported) CRML_EXPORT_PATH(exported,s60) +#define APP_LAYER_GCFML(exported) GCFML_EXPORT_PATH(exported,s60) +#define APP_LAYER_CONFML_CONFIG(exported) CONFML_CONFIG_EXPORT_PATH(exported,s60) + +#define MW_LAYER_CONFML(exported) CONFML_EXPORT_PATH(exported,s60) +#define MW_LAYER_CRML(exported) CRML_EXPORT_PATH(exported,s60) +#define MW_LAYER_GCFML(exported) GCFML_EXPORT_PATH(exported,s60) +#define MW_LAYER_CONFML_CONFIG(exported) CONFML_CONFIG_EXPORT_PATH(exported,s60) + +// Deprecate: Use the OS_LAYER_* macros instead of OSEXT_LAYER_* +#define OSEXT_LAYER_CONFML(exported) do not use intentionally generates error +#define OSEXT_LAYER_CRML(exported) do not use intentionally generates error +#define OSEXT_LAYER_GCFML(exported) do not use intentionally generates error +#define OSEXT_LAYER_CONFML_CONFIG(exported) do not use intentionally generates error +#define OS_LAYER_CONFML(exported) CONFML_EXPORT_PATH(exported,s60) +#define OS_LAYER_CRML(exported) CRML_EXPORT_PATH(exported,s60) +#define OS_LAYER_GCFML(exported) GCFML_EXPORT_PATH(exported,s60) +#define OS_LAYER_CONFML_CONFIG(exported) CONFML_CONFIG_EXPORT_PATH(exported,s60) + +#endif // end of PLATFORM_PATHS_HRH diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vcal.h --- a/epoc32/include/vcal.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,269 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__VCAL_H__) -#define __VCAL_H__ - -#if !defined(__VERSIT_H__) -#include -#endif - -#if !defined(__VRECUR_H__) -#include -#endif - -_LIT(KVersitTokenVCalVersionNo, "1.0"); - -// -// CParserVCal -// -class CParserVCal : public CVersitParser -/** A vCalendar parser. - -Adds support for parsing vToDos and vEvents, and associated alarms -(see CParserPropertyValueAlarm) to the functionality of CVersitParser. - -Adds a constructor and overrides CVersitParser::InternalizeL() for streams, -ExternalizeL() for streams, RecognizeToken(), RecognizeEntityName() and MakeEntityL(). - -The vCalendar data is read from or written to a stream or file, using the -InternalizeL() and ExternalizeL() functions. Most users of this class will -only need to use these functions. - -Note: if you are sequentially creating and destroying multiple -parsers, a major performance improvement may be achieved by using thread local -storage to store an instance of CVersitUnicodeUtils which persists and can be -used by all of the parsers. - -See CVersitTlsData for more information. - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserVCal* NewL(); -public: // from CVersitParser - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream); -protected: // from CVersitParser - IMPORT_C CVersitParser* MakeEntityL(TInt aEntityUid,HBufC* aEntityName); -public: // from CVersitParser - IMPORT_C TUid RecognizeToken(const TDesC8& aToken) const; - IMPORT_C TInt RecognizeEntityName() const; -private: - CParserVCal(); -private: // from CVersitParser - IMPORT_C virtual void Reserved1(); - IMPORT_C virtual void Reserved2(); - }; - -// -// CVersitAlarm -// -class CVersitAlarm : public CBase -/** An alarm for a vEvent or a vTodo. - -Specifies the date/time for the alarm, the amount of time the alarm will be -snoozed (optional), the number of times that the alarm will repeat, the binary -data of the sound to be played when the alarm runs (optional), and some text -to associate with the alarm (optional). - -An object of this class is owned by the CParserPropertyValueAlarm class. - -This class supports the following types of alarm: - -- Audible Alarm - -- Display Alarm (displays message on the screen) - -- Procedure Alarm (calls a procedure) - -- Mail Alarm (sends an email). - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CVersitAlarm* NewL(TVersitDateTime* aRunTime, TTime* aSnoozeTime, TInt aRepeatCount, const TDesC& aAudioContent, const TDesC& aNote); - IMPORT_C ~CVersitAlarm(); -private: - CVersitAlarm(TVersitDateTime* aRunTime, TTime* aSnoozeTime, TInt aRepeatCount); - void ConstructL(const TDesC& aAudioContent, const TDesC& aNote); -public: - /** The date/time for the alarm. */ - TVersitDateTime* iRunTime; - /** The amount of time the alarm will be snoozed (optional). */ - TTime* iSnoozeTime; - /** The number of times that the alarm will repeat. */ - TInt iRepeatCount; - /** The binary data describing the sound to play for an AALARM (optional), or - the string which specifies the address to send the e-mail to, for an MALARM. */ - HBufC* iAudioContent; - /** The mesage to display on the screen for a DALARM (optional), or - the body of the e-mail to be sent for an MALARM, or the name of the procedure - to call for a PALARM. */ - HBufC* iNote;//Empty except for MAlarm - }; - -class CVersitExtendedAlarm : public CBase -/** An extended alarm for a vEvent or a vTodo. - -Specifies the date/time for the alarm, the amount of time the alarm will be -snoozed (optional), the number of times that the alarm will repeat, and the -action for the alarm. -An object of this class is owned by the CParserPropertyValueAlarm class. - -This class supports the following types of alarm: -- X-EPOCALARM - -@publishedPartner -@released -*/ - { -public: - - /** Extended Alarm's disposition types. - */ - enum TDisposition - { - /** URL disposition - */ - EDispositionUrl = 0, - /** Inline disposition - */ - EDispositionInline = 1, - /** Unknown disposition - */ - EDispositionUnknown = 15 - }; - - IMPORT_C static CVersitExtendedAlarm* NewL(const TDesC8& aContent,const TDesC8& aContentMimeType, CVersitExtendedAlarm::TDisposition aDisposition); - IMPORT_C ~CVersitExtendedAlarm(); -private: - CVersitExtendedAlarm(); - void ConstructL(const TDesC8& aContent, const TDesC8& aContentMimeType, CVersitExtendedAlarm::TDisposition aContentDisposition); -public: - /** The data describing the action for the alarm.*/ - HBufC8* iContent; - /** The MIME type of the data describing the action for the alarm.*/ - HBufC8* iMimeType; - /** The disposition of the data for the alarm action (i.e whether it is inline or an URI).*/ - CVersitExtendedAlarm::TDisposition iDisposition; - }; - -// -// CParserVCalEntity -// -class CParserVCalEntity : public CRecurrenceParser -/** A parser for vCalendar sub-entities. - -A vCalendar sub-entity is a vEvent or vToDo contained in a vCalendar. vEvents -and vToDos are derived from CRecurrenceParser, which provides recurrence functionality. - -vEvents and vTodos may have alarm properties (see CParserPropertyValueAlarm). - -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserVCalEntity* NewL(); - IMPORT_C ~CParserVCalEntity(); -public: // from CVersitParser - IMPORT_C void ExternalizeL(RWriteStream& aStream); -protected: // from CVersitParser - IMPORT_C CParserPropertyValue* MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue); - IMPORT_C CVersitAlarm* MakePropertyValueAlarmL(TPtr16 aAlarmValue); - IMPORT_C CVersitExtendedAlarm* MakePropertyValueExtendedAlarmL(TPtr16 aAlarmValue); - IMPORT_C CVersitExtendedAlarm* MakePropertyValueExtendedAlarmL(CBufSeg& aAlarmValue); - IMPORT_C CVersitExtendedAlarm::TDisposition DecodeDisposition(const TDesC8& aContentDispositionToken) const; - IMPORT_C TUid RecognizeToken(const TDesC8& aToken) const; -private: - CParserVCalEntity(); -private: // from CVersitParser - IMPORT_C virtual void Reserved1(); - IMPORT_C virtual void Reserved2(); - }; - - -// -// CParserPropertyValueAlarm -// -class CParserPropertyValueAlarm : public CParserTimePropertyValue -/** An alarm property value parser for a vCalendar entity. - -An alarm can be associated with a vEvent or a vTodo. The value for the alarm -is stored as a CVersitAlarm. - -Note: The UID for an alarm property value is KVCalPropertyAlarmUid. - -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueAlarm(CVersitAlarm* aValue); - IMPORT_C CParserPropertyValueAlarm(); - IMPORT_C ~CParserPropertyValueAlarm(); - inline CVersitAlarm* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); - IMPORT_C TBool IsAsciiCharacterSetSufficient(); -private: - CVersitAlarm* iValue; - }; - - -// -// CParserPropertyValueExtendedAlarm -// -class CParserPropertyValueExtendedAlarm : public CParserTimePropertyValue -/** An extended alarm property value parser for a vCalendar entity. - -An alarm action can be attached with a vEvent or a vTodo. The value for the alarm -action is stored as a CVersitExtendedAlarm object. - -Note: The UID for an extended alarm property value is KVCalPropertyExtendedAlarmUid. - -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueExtendedAlarm(CVersitExtendedAlarm* aValue); - IMPORT_C ~CParserPropertyValueExtendedAlarm(); - inline CVersitExtendedAlarm* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput); - IMPORT_C TBool IsAsciiCharacterSetSufficient(); -private: - void ExternalizeUrlL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput); - void ExternalizeInlineL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput); - -private: - CVersitExtendedAlarm* iValue; - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vcal.inl --- a/epoc32/include/vcal.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,31 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CParserPropertyValueAlarm -// -// - -inline CVersitAlarm* CParserPropertyValueAlarm::Value() const -/** Gets a pointer to the alarm property value. - -@return Pointer to the alarm property value. */ - {return iValue;} - -// -// CParserPropertyValueExtendedAlarm -// -inline CVersitExtendedAlarm* CParserPropertyValueExtendedAlarm::Value() const -/** Gets a pointer to the extended alarm property value. - -@return Pointer to the extended alarm property value. */ - {return iValue;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vcard.h --- a/epoc32/include/vcard.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,183 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VCARD_H__ -#define __VCARD_H__ - -#ifndef __VERSIT_H__ -#include -#endif - -#include - -_LIT(KVersitTokenVCardVersionNo, "2.1"); - -class CVCard3ParserPlugIn; - -// -// CParserVCard -// -class CParserVCard : public CVersitParser -/** A vCard parser. - -Adds support for property groups (see CParserGroupedProperty) and agents -(see CParserPropertyValueAgent) to the functionality of CVersitParser. - -Provides a constructor and overrides CVersitParser::InternalizeL(), -ExternalizeL(), RecognizeToken(), ConvertAllPropertyDateTimesToMachineLocalL(), -ParsePropertyL() and MakePropertyValueL(). - -The vCard data is read from or written to a stream or file, using the InternalizeL() -and ExternalizeL() functions. Most users of this class will only need to use -these functions. - -If you are sequentially creating and destroying multiple parsers, a major performance -improvement may be achieved by using thread local storage to store an instance of -CVersitUnicodeUtils which persists and can be used by all of the parsers. - -See CVersitTlsData for more information. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserVCard* NewL(); - IMPORT_C CArrayPtr* GroupOfPropertiesL(const TDesC8& aName) const; -public: //from CVersitParser - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C void ExternalizeL(RWriteStream& aStream); - IMPORT_C void ConvertAllPropertyDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); -protected: - IMPORT_C virtual CParserPropertyValue* MakePropertyValueAgentL(TPtr16 aValue); - IMPORT_C CDesC8Array* GetGroupNamesL(TPtr8& aGroupsAndName); -protected: // from CVersitParser - IMPORT_C void ParsePropertyL(); - IMPORT_C CParserPropertyValue* MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue); - IMPORT_C CParserPropertyValue* MakePropertyValueSoundL(HBufC16*& aValue); -public: //from CVersitParser - IMPORT_C TUid RecognizeToken(const TDesC8& aToken) const; - IMPORT_C void ConvertDateTimesToMachineLocalAndDeleteTZL(); -protected: - CParserVCard(); -private: // from CVersitParser - IMPORT_C virtual void Reserved1(); - IMPORT_C virtual void Reserved2(); - }; - -NONSHARABLE_CLASS(CParserVCard3) : public CParserVCard -/** A vCard 3.0 parser. - -Overrides CParserVCard::InternalizeL(). Internalizing of vCard 3.0 -objects is not supported - -@internalTechnology -@prototype -*/ - { -public: - IMPORT_C static CParserVCard3* NewL(); - ~CParserVCard3(); - -public: //from CParserVCard - IMPORT_C void InternalizeL(RReadStream& aStream); - -private: - CParserVCard3(); - void ConstructL(); - void CreateParserPlugInL(); - -private: - CVCard3ParserPlugIn* iPlugInImpl; - }; - -// -// CParserGroupedProperty -// -class CParserGroupedProperty : public CParserProperty -/** A grouped property. - -This is a vCard property which may be a member of one or more property groups. -It owns an array of descriptors, each of which identifies a group -to which the property belongs. - -An example of how grouped properties may be useful is for a person with two -homes. Each home has an address and telephone number, both of which are to -be stored on the vCard. The address and telephone number are grouped for each -home. A prefix for the address and telephone number properties is provided: -one for each home. Each prefix is stored as a property group. - -When the property is externalised, the identities of all the groups to which -the property belongs (i.e. the prefixes) are written to the stream before -CParserProperty::ExternalizeL() is called. - -The class also provides a function which can be used to test whether -the property is a member of a given group. - -Note that the vCard parser stores all properties using this class; if the -vCard property is not grouped then the array of property groups is empty. -Conversely, the vCalender parser does not have property groups, and so stores -all properties using the CParserProperty base class. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserGroupedProperty* NewL(CParserPropertyValue& aPropertyValue, const TDesC8& aName, CDesC8Array* aArrayOfGroups, CArrayPtr* aArrayOfParams); - IMPORT_C CParserGroupedProperty(CDesC8Array* aArrayOfGroups, CArrayPtr* aArrayOfParams); - IMPORT_C ~CParserGroupedProperty(); - IMPORT_C TBool Group(const TDesC8& aGroup) const; - inline void SetGroups(CDesC8Array* aArrayOfGroups); - inline const CDesC8Array* Groups(); -public: //from CParserProperty - IMPORT_C TBool SupportsInterface(const TUid& aInterfaceUid) const; - IMPORT_C void ExternalizeL(RWriteStream& aStream, CVersitParser* aVersitParser = NULL); -protected: - CParserGroupedProperty(CParserPropertyValue& aPropertyValue, CDesC8Array* aArrayOfGroups, CArrayPtr* aArrayOfParams); -private: //from CParserProperty - IMPORT_C virtual void Reserved(); -protected: - CDesC8Array* iArrayOfGroups; - }; - -// -// CParserPropertyValueAgent -// -class CParserPropertyValueAgent : public CParserPropertyValue -/** An agent property value parser. - -An agent property value contains information about a person who is not the -main subject of the vCard. It is implemented as a vCard nested within another -vCard. The agent's vCard is held in the property value of the parent vCard. - -The UID for an agent property value is KVCardPropertyAgentUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueAgent(CParserVCard* aValue); - IMPORT_C ~CParserPropertyValueAgent(); - inline CParserVCard* Value() const; - -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt /*aLengthOutput*/); -protected: - CParserVCard* iValue; -private: - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vcard.inl --- a/epoc32/include/vcard.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,36 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CParserPropertyValueAgent -// -// - -inline CParserVCard* CParserPropertyValueAgent::Value() const -/** Gets the agent object owned by the property value. - -@return A pointer to the agent property value. */ - {return iValue;} - -inline void CParserGroupedProperty::SetGroups(CDesC8Array* aArrayOfGroups) -/** Sets the list of groups to which the property belongs, replacing any existing -list. - -@param aArrayOfGroups Array of descriptors; each of which specifies -a group name. The grouped property takes ownership of the array. */ - {iArrayOfGroups=aArrayOfGroups;} - -inline const CDesC8Array* CParserGroupedProperty::Groups() -/** Gets the groups to which the property belongs. - -@return Pointer to an array of descriptors. Each one specifies a group name. */ - {return iArrayOfGroups;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/versit.h --- a/epoc32/include/versit.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,485 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VERSIT_H__ -#define __VERSIT_H__ - -// System includes -#include -#include -#include - -// User includes -#include -#include -#include -#include - -// Classes referenced -class RFile; -class TVersitDateTime; -class MVersitObserver; -class MVersitPlugIn; - -// Panic enumeration -/** Versit panic numbers. The Versit panic numbers have a category of "Versit-Parser". -@internalComponent -@released -*/ -enum TVersitParserPanic - { - ECurrentTokenNotFound, //Unused - EUnicodeUtilsNotFound, //Unused - ENoPropertyValue, //Unused - /** A CWeekDayArray contains an invalid value (not between EMonday - and ESunday inclusive). */ - ENoWeekdayFound, - /** The number of a week within a month is invalid. */ - EWeekNoOverTen, - /** The repeat type for a recurrence rule property value is not one of the values - specified in CVersitRecurrence::TType. */ - ENoRecognizedRepeatType, - EVersitPanicEscapedTextAlreadyExists, //Unused - /** 8-bit encoding is proposed as the default for a parser but may not be appropriate. */ - EVersitPanicCannotSetEightBitEncoding, - /** 8-bit encoding is encountered or proposed where it is not expected. */ - EVersitPanicUnexpectedEightBitEncoding, - /** A parser was not specified when externalising a property. */ - EVersitPanicNeedToSpecifyParser, - /** The additional storage slot for the given property has already been used */ - EVersitPanicAdditionalStorageSlotAlreadyInUse, - /** Attempting to assign a NULL value to an additional storage slot */ - EVersitPanicNullValueAssignedToAdditionalStorageSlot, - // - EVersitPanicLast - }; - -/** -Used as key into additional storage within tls object, for CVersitTLSContainer -Value should not conflict with genuine compiler generated pointer values -*/ -const static TInt* const KTLSVars = reinterpret_cast(1); - -GLREF_C void DestroyHBufC(TAny* aHBufC); -IMPORT_C void Panic(TVersitParserPanic aPanic); - - -/** Extension mechanism for CLineReader -This is an internal class and is only for use by CLineReader -@internalComponent -@released -*/ -class CLineReaderExtension : public CBase - { - friend class CLineReader; -private: - CLineReaderExtension(); - static CLineReaderExtension* NewL(); -private: - TUint8 iBuf[1024]; - TInt iOffset; - TInt iSize; - }; - -class CLineReader : public CBase -/** Line reader for a vCalendar or vCard parser. - -Reads in a line at a time for the parser. - -Also allows the first character of the next line to be checked to see if it -is a space, which can indicate that the line is wrapped. This enables the -reading of multi-line property values. - -Used by CVersitParser to internalise streams. -@publishedAll -@released -*/ - { -public: - /** Defines the initial line size of, and the size of expansions to, the buffer - which stores the line being read. */ - enum - { - /** The initial size of the buffer (pointed to by iBuf). */ - EInitialLineSize=96, - /** The size by which the buffer (pointed to by iBuf) - is expanded when it has run out of room. */ - EExpandSize=16, - }; - /** Defines values which describe the content of a line that has been read. - - This is the return value from the function ReadLine(). */ - enum - { - /** The line has content (not white space). */ - ELineHasContent=0, - /** The line has white space only. */ - ELineIsWhiteSpace=1, //Doesn't include next case - /** The line has no content, and so is just a carriage return and line - feed ("/r/n"). */ - ELineIsCRLFOnly=2, - }; -public: - IMPORT_C static CLineReader* NewL(RReadStream& aStream); - IMPORT_C ~CLineReader(); - IMPORT_C virtual TBool ReadLineL(TInt aPos,TInt& aErr); - IMPORT_C TBool AppendLineIfSpaceNextL(); - IMPORT_C TBool IsSpaceNextL(); - IMPORT_C TInt AppendSpaceL(); - inline void SetPlugIn(MVersitPlugIn* aPlugIn); - inline void SetSkipWhiteSpaceAtStart(TBool aDoSkip); -protected: - inline CLineReader(RReadStream& aStream) :iReadStream(&aStream), iBufPtr(NULL,0), iFirstCharNextLine(-1) {} - IMPORT_C void ConstructL(); - IMPORT_C void ExpandBufferL(TInt aCurrentSize); - IMPORT_C TUint8 ReadChar(TInt& aErr); -private: - IMPORT_C virtual void Reserved(); -public: - /** A pointer to an RReadStream object, the ReadUint8L() function of which is used - to read single characters from the stream. - - This is passed into the NewL() function upon construction. */ - RReadStream* iReadStream; - /** A pointer to a buffer which stores data read from the stream. - - Its size on construction is EInitialLineSize, and it is expanded by EExpandSize - when necessary. - - A copy of this value should not be stored, since the buffer location may change - if the buffer is expanded. - - Data in the buffer is not lost when the buffer is expanded, but is copied - to the new location. */ - TPtr8 iBufPtr; -protected: - HBufC8* iLineBuf; - TInt iFirstCharNextLine; -private: - MVersitPlugIn* iPlugIn; - TBool iSkipWhiteSpaceAtStart; - CLineReaderExtension* iExtension; - }; - -class CVersitParser : public CBase -/** A generic Versit parser. - -Provides generic functions which implement behaviour common to both vCalendar -and vCard parsers. For instance: - -- InternalizeL() and ExternalizeL() functions, for writing and reading -data from a stream or file. - -- adding/retrieving properties and sub-entities to/from an existing entity. - -- encoding and character set conversion capabilities. - -Although this is not an abstract class, in practice you would create and use -objects of a derived class instead (CParserVCal or CParserVCard), as these -provide additional functionality needed for parsing vCalendars and vCards. - -Note: a flag used in the class constructor indicates whether the entity needs -a version property. The version property will be inserted at the start of -the array of properties for the entity, and specifies the version of the vCard/vCalendar -specification used by the data of this particular vCard/vCalendar. The versions -that are currently supported are vCard v2.1 and vCalendar v1.0. - -A typical vCard looks like this: - -BEGIN VCARD - -VERSION 2.1 ... - -END VCARD - -Note: if you are sequentially creating and destroying multiple -parsers, a major performance improvement may be achieved -by using thread local storage to store an instance of CVersitUnicodeUtils -which persists and can be used by all of the parsers. - -See CVersitTlsData for more details. -@publishedAll -@released -*/ - { - friend class CParserProperty; -public: - IMPORT_C CVersitParser(TUint aFlags); - IMPORT_C void ConstructL(); - IMPORT_C ~CVersitParser(); - IMPORT_C void InternalizeL(RFile& aInputFile,TInt& aBytesThroughFile); - IMPORT_C virtual void InternalizeL(RReadStream& aStream); - IMPORT_C virtual void InternalizeL(HBufC* aEntityName,CLineReader* aLineReader); - IMPORT_C void ExternalizeL(RFile& aOutputFile); - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream); - IMPORT_C void AddEntityL(CVersitParser* aEntity); - IMPORT_C void AddPropertyL(CParserProperty* aProperty,TBool aInternalizing=EFalse); - IMPORT_C CArrayPtr* EntityL(const TDesC& aEntityName,TBool aTakeOwnership=ETrue); - IMPORT_C CArrayPtr* ArrayOfEntities(TBool aTakeOwnership=ETrue); - IMPORT_C CArrayPtr* PropertyL(const TDesC8& aPropertyName,const TUid& aPropertyUid,TBool aTakeOwnership=ETrue) const; - IMPORT_C CArrayPtr* ArrayOfProperties(TBool aTakeOwnership=ETrue); - IMPORT_C virtual void ConvertAllPropertyDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void AdjustAllPropertyDateTimesToMachineLocalL(); - IMPORT_C static TBool IsValidParameterValue(TInt& aPos,const TDesC& aParamValue); - IMPORT_C void SetEntityNameL(const TDesC& aEntityName); - IMPORT_C TPtrC EntityName() const; - IMPORT_C static TBool IsValidLabel(const TDesC& aLabel, TInt& aPos); - IMPORT_C static TInt Val(const TDesC& aString, TInt& aNumber); - IMPORT_C void SetCharacterConverter(Versit::TEncodingAndCharset& encodingAndCharset); - - // - // Set/Get the default settings for the [en|de]coding process - // - IMPORT_C Versit::TVersitEncoding DefaultEncoding() const; - IMPORT_C void SetDefaultEncoding(const Versit::TVersitEncoding aEncoding); - IMPORT_C Versit::TVersitCharSet DefaultCharSet() const; - IMPORT_C TUint DefaultCharSetId() const; - IMPORT_C void SetDefaultCharSet(const Versit::TVersitCharSet aCharSet); - IMPORT_C void SetDefaultCharSetId(TUint aCharSetId); - IMPORT_C void SetAutoDetect(TBool aOn,const CArrayFix* aAutoDetectCharSets=NULL); - - // - // Set/Get Observers and PlugIn's - // - inline void SetObserver(MVersitObserver* aObserver); - inline MVersitObserver* Observer(); - inline void SetPlugIn(MVersitPlugIn* aPlugIn); - inline MVersitPlugIn* PlugIn(); - -public: - - IMPORT_C TInt LoadBinaryValuesFromFilesL(); - IMPORT_C TInt LoadBinaryValuesFromFilesL(RFs& aFileSession); - IMPORT_C TInt SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath); - IMPORT_C TInt SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath,RFs& aFileSession); -public: - /** White space character codes: used while analysing the syntax of the received - data and while externalising data. - @publishedAll - @released - */ - enum TCharCodes - { - /** ' ' */ - ESpace = ' ', - /** 9 */ - EHTab = 9, - /** 10 */ - ELineFeed = 10, - /** 13 */ - ECarriageReturn = 13 - }; - /** Flags that can be specified on construction. - @publishedAll - @released - */ - enum TVersitParserFlags - { - /** This entity does not need a version property. */ - ENoVersionProperty = 0, - /** This entity should have a version property. */ - ESupportsVersion = 0x01, - //Gaps since other flags have been used in past - EImportSyncML = 0x1000, //Importing from a SyncML server - /** Indicates whether the parser should use auto-detection of character sets when - one has not been explicitly specified. */ - EUseAutoDetection = 0x4000, - //versit Internal use only - /** The current property has specified a character set. */ - ECharSetIdentified = 0x8000, - /** If the charset is not explicitly specified, the default charset will be used instead of US-ASCII as required - by the Versit specification . */ - EUseDefaultCharSetForAllProperties = 0x2000 - }; - - // - // Unicode support conversion functions - // - IMPORT_C static TInt ConvertFromUnicodeToISOL(TDes8& aIso, const TDesC16& aUnicode, CCnvCharacterSetConverter* aConverter); - IMPORT_C TVersitDateTime* DecodeDateTimeL(TDes& aToken) const; - -protected: - IMPORT_C TInt ConvertToUnicodeFromISOL(TDes16& aUnicode, const TDesC8& aIso, TUint aCharacterSet); - - // - // Parsing high level functions - // - IMPORT_C void ParsePropertiesL(); - IMPORT_C void ParseBeginL(); - IMPORT_C void ParseEndL(); - void ParseEndL(HBufC16& aEntityName); - IMPORT_C TBool ParseEntityL(); - IMPORT_C virtual void ParsePropertyL(); - IMPORT_C CArrayPtr* ReadLineAndDecodeParamsLC(TInt& aValueStart,TInt& aNameLen); - IMPORT_C void MakePropertyL(TPtr8& aPropName,TInt aValueStart); - IMPORT_C CArrayPtr* GetPropertyParamsLC(TPtr8 aParams); - IMPORT_C void ParseParamL(CArrayPtr* aArray,TPtr8 aParam); - IMPORT_C void AnalysesEncodingCharset(CArrayPtr* aArrayOfParams); - IMPORT_C void ReadMultiLineValueL(TPtr8& aValue,TInt aValueStart,TBool aBinaryData); - inline TPtr8& BufPtr(); - - // - // Append standard versit tokens to streams - // - IMPORT_C void AppendBeginL(); - IMPORT_C void AppendEndL(); - void AppendEntityNameL(); - IMPORT_C void DoAddPropertyL(CParserProperty* aProperty); - - // - // Dispatcher functions to create entities/properties based upon a Versit identifying Uid - // - IMPORT_C virtual CVersitParser* MakeEntityL(TInt aEntityUid,HBufC* aEntityName); - CParserPropertyValueHBufC* MakeDefaultPropertyValueL(HBufC16*& aValue); - IMPORT_C virtual CParserPropertyValue* MakePropertyValueL(const TUid& aPropertyUid,HBufC16*& aValue); - IMPORT_C HBufC* DecodePropertyValueL(const TDesC8& aValue); - IMPORT_C void DecodePropertyValueL(const TDesC8& aValue,const TUid& aEncodingUid); - HBufC* ConvertToUnicodeL(const TDesC8& aValue); - IMPORT_C CDesCArray* MakePropertyValueCDesCArrayL(TPtr16 aStringValue); - IMPORT_C CArrayPtr* MakePropertyValueMultiDateTimeL(TPtr16 aDateTimeGroup); - IMPORT_C CVersitDaylight* MakePropertyValueDaylightL(TPtr16 aDaylightValue); - IMPORT_C TBool FindFirstField(TPtr16& aField,TPtr16& aRemaining, TBool aTrimSpace=ETrue); - IMPORT_C void FindRemainingField(TPtr16& aField,TPtr16& aRemaining); - - // - // Helper methods to decode versit dates, times, and time periods - // - IMPORT_C TTimeIntervalSeconds DecodeTimeZoneL(const TDesC& aToken) const; - IMPORT_C TTime* DecodeTimePeriodL(const TDesC& aToken) const; - IMPORT_C TInt GetNumberL(const TDesC& aToken,TInt& aNumChars) const; - -public: - IMPORT_C virtual TUid RecognizeToken(const TDesC8& aToken) const; - IMPORT_C virtual TInt RecognizeEntityName() const; - // - // Cleanup support methods - // - IMPORT_C static void ResetAndDestroyArrayOfParams(TAny* aObject); - IMPORT_C static void ResetAndDestroyArrayOfProperties(TAny* aObject); - IMPORT_C static void ResetAndDestroyArrayOfEntities(TAny* aObject); - IMPORT_C static void ResetAndDestroyArrayOfDateTimes(TAny* aObject); - - inline void SetFlags(TUint aFlags); - - - -protected: - // - // Enquiry functions - // - static TBool IsPunctuationToken(TUint aChar); - inline TBool SupportsVersion() const; - inline void SetSupportsVersion(); - inline void ClearSupportsVersion(); - - // - // Set the settings for the [en|de]coding of the current property - // - IMPORT_C void RestoreLineCodingDetailsToDefault(); - IMPORT_C void SetLineEncoding(Versit::TVersitEncoding aLineEncoding); - IMPORT_C void SetLineEncoding(TUint aVersitEncodingUid); - IMPORT_C void SetLineCharacterSet(Versit::TVersitCharSet aLineCharSet); - IMPORT_C void SetLineCharacterSetId(TUint aLineCharSetId); - IMPORT_C void SetLineCoding(Versit::TVersitCharSet aLineCharSet, Versit::TVersitEncoding aLineEncoding); - - // - // Return the settings for the current property - // - IMPORT_C Versit::TVersitEncoding LineEncoding() const; - IMPORT_C Versit::TVersitCharSet LineCharSet() const; - IMPORT_C TUint LineEncodingId() const; - IMPORT_C TUint LineCharSetId() const; - - inline CVersitUnicodeUtils& UnicodeUtils(); - -public: - // - // Static utility functions to aid with the Unicode conversion process - // - static TUint MapVersitCharsetToCharConvCharset(Versit::TVersitCharSet aVersitSet); - static TUint MapVersitEncodingToConArcUid(Versit::TVersitEncoding aVersitEncoding); - -private: - void SetLineCharsetDetailsToDefault(); - void SetLineEncodingDetailsToDefault(); - -private: //To fix TimeZone SyncML bug - void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - void ConvertUTCDateTimeToMachineLocal(TVersitDateTime* aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - //void AddTimeZonePropertyL(); - -protected: - struct TParserCodingDetails - { - Versit::TVersitEncoding iEncoding; - TUint iEncodingUid; - Versit::TVersitCharSet iCharSet; - TUint iCharSetUid; - }; - -protected: - // Default settings & internal flags - TInt iFlags; - TParserCodingDetails iDefaultCodingDetails; - TParserCodingDetails iCurrentPropertyCodingDetails; - TBuf iDefaultVersion; - const CArrayFix* iAutoDetectCharSets; - - // Member data relating to the current item being parsed - HBufC* iEntityName; - CArrayPtr* iArrayOfEntities; - CArrayPtr* iArrayOfProperties; - CParserProperty* iCurrentProperty; - CLineReader* iOwnedLineReader; - CLineReader* iLineReader; - HBufC8* iDecodedValue; - CBufSeg* iLargeDataBuf; - - // In memory buffers - RWriteStream* iWriteStream; - - // General utility class - CVersitTlsData* iStaticUtils; - - // Plug-in classes - MVersitObserver* iObserver; - MVersitPlugIn* iPlugIn; - -private: - void DoInternalizeL(); - IMPORT_C virtual void Reserved1(); - IMPORT_C virtual void Reserved2(); -private: - TInt iParseBegin; - TInt iReserved2; - }; - -NONSHARABLE_CLASS( CVersitTLSContainer ): public CBase -/** -Wrapper class for static variables to be stored in TLS -@internalComponent -@released -*/ - { -public: - static CVersitTLSContainer *NewLC(const TInt aSize); - ~CVersitTLSContainer(); -public: - HBufC * iShiftJisEscape;//Store shift-jis escape charcter, as generated by relevant charconv plugin - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/versit.inl --- a/epoc32/include/versit.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,112 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CVersitParser -// -// - -inline void CLineReader::SetPlugIn(MVersitPlugIn* aPlugIn) -/** Sets the plug-in. - -Allows implemented functions of the MVersitPlugIn class to be used in specifying -options for adding and deleting spaces to/from the buffer. - -Specifically, the plug-in is used to determine whether an additional space should -be added when appending a line to the buffer (by default a space will be added), -and whether the white space at the start of a line should form part of the data -(by default it will not form part of the data). - -Using a plug-in is optional. - -@param aPlugIn A pointer to an MVersitPlugIn instance. */ - {iPlugIn=aPlugIn;} - -inline void CLineReader::SetSkipWhiteSpaceAtStart(TBool aDoSkip) - {iSkipWhiteSpaceAtStart=aDoSkip;} - - -// -// CVersitParser -// - -inline void CVersitParser::SetObserver(MVersitObserver* aObserver) -/** Sets the Versit observer. - -@param aObserver A pointer to the observer. */ - {iObserver=aObserver;} - -inline MVersitObserver* CVersitParser::Observer() -/** Gets a pointer to the Versit observer. - -@return A pointer to the observer. */ - {return iObserver;} - -inline void CVersitParser::SetPlugIn(MVersitPlugIn* aPlugIn) -/** Sets the Versit plug-in. - -If there is one, the Versit plug-in needs to be set before any properties are -added to the parser. This is done for you when internalising (using InternalizeL()) -or adding properties (using AddPropertyL()). - -@param aPlugIn A pointer to the plug in. */ - {iPlugIn=aPlugIn;} - -inline MVersitPlugIn* CVersitParser::PlugIn() -/** Gets a pointer to the Versit plug-in. - -@return A pointer to the plug-in. */ - {return iPlugIn;} - -/* Gets a pointer to the read buffer owned by the CLineReader. - * - * @return Pointer to the read buffer. */ -inline TPtr8& CVersitParser::BufPtr() - {return iLineReader->iBufPtr;} - -/* - * Check the iFlags to see if ESupportsVersion is set - * - * @return " TBool " - * ETrue if the parser supports the version property - * EFalse otherwise - */ -inline TBool CVersitParser::SupportsVersion() const - {return iFlags & ESupportsVersion;} - -/* - * Sets the iFlags to ESupportsVersion - */ -inline void CVersitParser::SetSupportsVersion() - {iFlags |= ESupportsVersion;} - -/* - * Clear the bit of ESupportsVersion in iFlags' - */ -inline void CVersitParser::ClearSupportsVersion() - {iFlags &= ~ESupportsVersion;} - -/* - * Set Flags - */ -inline void CVersitParser::SetFlags(TUint aFlags) - {iFlags |= aFlags;} - -/* - * Gets a reference to CVersitUnicodeUtils - * which is used for charset conversion - * - * @return " CVersitUnicodeUtils&" - * reference to CVersitUnicodeUtils - */ -inline CVersitUnicodeUtils& CVersitParser::UnicodeUtils() - { return iStaticUtils->UnicodeUtils(); } diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/versittls.h --- a/epoc32/include/versittls.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,110 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VERSITTLS_H__ -#define __VERSITTLS_H__ - -// System includes -#include -#include - -#include - -class CVersitTimer; -class CVersitAdditionalStorage; - -class CVersitTlsData : public CBase -/** Versit thread local storage. - -This class provides a performance improvement by allowing a CVersitUnicodeUtils -instance to be shared between parsers operating in the same thread, so that -a new instance does not have to be created for each parser. A pointer to the -unicode utilities object is held in thread local storage: a single word (32bits) -of data. Each unicode utilities object is managed by an instance of this class. - -Every time a parser is created, CVersitParser::ConstructL() calls the -CVersitTlsData constructor, and when the parser is destroyed the CVersitTlsData -destructor is called. If a CVersitTlsData object exists, the constructor -returns a pointer to it, otherwise a new one is constructed. The CVersitTlsData -object is only destroyed when no more parsers refer to it: a count is kept, -which is incremented every time the constructor is called and decremented each -time the destructor is called, and the object is only destroyed when the count -reaches zero. - -This class provides an additional major performance improvement -if you are sequentially constructing and destructing multiple parsers. -By default, when the count of parsers reaches zero, the thread local -storage object is destroyed (even if the thread has not finished). However, -by using the technique described below, the thread local storage object, and therefore -the unicode utilities object, can be made to persist, significantly reducing -the overhead of sequentially constructing and destructing parsers. - -The constructor needs to be called an extra time before creating any parsers, -and the destructor needs to be called an extra time once the parsers have -been destroyed. This has the effect of adding one to the reference count so -that during all the parser construction and deletion the count never hits -zero, which would trigger the TLS object's destruction. - -This can be implemented as follows: - -1. Create a thread local storage data class instance as follows: -@code -CVersitTlsData* versitTLS = CVersitTlsData::VersitTlsDataL(); -@endcode - -2. Create and delete the parsers. - -3. Delete the Thread Local Storage Data class instance: -@code -delete versitTLS; -@endcode -@publishedAll -@released -*/ - { - friend class CVersitTimer; - -public: - IMPORT_C static CVersitTlsData& VersitTlsDataL(); - IMPORT_C static void CloseVersitTlsData(); - IMPORT_C void VersitTlsDataClose(); - -public: - inline CVersitUnicodeUtils& UnicodeUtils() - /** Returns a pointer to the current Unicode utilities object. - - @return A pointer to the current Unicode utilities object. */ - { return *iUnicodeUtils; } - - inline CVersitAdditionalStorage& AdditionalStorage() - /** Returns a pointer to the additional property storage object. - - @return A pointer to the additional property storage. */ - { - return *iAdditionalStorage; - } - -private: - static CVersitTlsData* NewL(); - void ConstructL(); - ~CVersitTlsData(); - -private: - TInt iRefCount; - CVersitUnicodeUtils* iUnicodeUtils; - CVersitAdditionalStorage* iAdditionalStorage; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/viewcli.h --- a/epoc32/include/viewcli.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,166 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VIEWCLI_H__ -#define __VIEWCLI_H__ - -#include -#include -#include - -// -// Forward declarations. -// - -class RVwsSession; -class CVwsSessionEventHandler; -class MVwsAppStarter; - -class MVwsSessionWrapperObserver -/** -The MVwsSessionObserver specifies an interface through which server events to be handled by the owner of -a client session are notified - -@publishedAll -@deprecated -*/ -//@internalTechnology @released - - { -public: - - /** - * Handles the view event aEvent for a view added through the client session being observed. - * Handles events for all the views added by the client. - */ - virtual void HandleViewEventL(const TVwsViewEvent& aEvent)=0; - }; - - -class CVwsSessionWrapper : public CBase -/** -The CVwsSessionWrapper class mediates access to the view server client session which it creates, and wraps in -support for notification of server events. A session observer will be called back with server events if -it maintains an outstanding request for asynchronous event notification. - -@publishedPartner -@released -*/ -//@internalTechnology @released - - { -public: - IMPORT_C static CVwsSessionWrapper* NewL(); - IMPORT_C static CVwsSessionWrapper* NewLC(); - IMPORT_C static CVwsSessionWrapper* NewL(MVwsSessionWrapperObserver& aObserver); - IMPORT_C static CVwsSessionWrapper* NewLC(MVwsSessionWrapperObserver& aObserver); - IMPORT_C ~CVwsSessionWrapper(); - IMPORT_C static TInt StartViewServer(MVwsAppStarter& aAppStarter); - IMPORT_C TInt ShutdownViewServer(); - IMPORT_C TInt AddView(const TVwsViewId& aViewId); - IMPORT_C TInt RemoveView(const TVwsViewId& aViewId) const; - IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId,TInt aMode); - IMPORT_C TInt SetSystemDefaultView(const TVwsViewId& aViewId); - IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); - IMPORT_C TInt ActivateViewViaViewEvent(const TVwsViewIdAndMessage& aViewIdAndMessage); - IMPORT_C TInt RequestCustomMessage(TDes8& aMessageBufPtr) const; - IMPORT_C void QueueAsyncRequest(); - IMPORT_C TInt StartApp(TUid aAppToStart); - IMPORT_C TInt DeactivateActiveView(); - IMPORT_C TInt DeactivateActiveViewIfOwnerMatch(); - IMPORT_C TInt NotifyNextDeactivation(const TVwsViewId& aViewId); - IMPORT_C TInt NotifyNextDeactivation(); - IMPORT_C TInt NotifyNextActivation(const TVwsViewId& aViewId); - IMPORT_C TInt NotifyNextActivation(); - IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId,TInt aMode) const; - IMPORT_C TInt SetDefaultView(const TVwsViewId& aViewId) const; - IMPORT_C TInt GetSystemDefaultView(TVwsViewId& aViewId); - IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage); - IMPORT_C TInt SetClientRequestTimeOut(TTimeIntervalMicroSeconds32 aDuration); - IMPORT_C TInt SetServerEventTimeOut(TTimeIntervalMicroSeconds32 aDuration); - IMPORT_C TInt EnableServerEventTimeOut(TBool aEnable); - IMPORT_C TInt CheckSourceOfViewSwitch(TBool& aResult,const TSecurityPolicy& aSecurityPolicy,const char* aDiagnostic); - IMPORT_C TInt EnableServerBlankScreen(TBool aEnable); - IMPORT_C TInt EnableExternalViewSwitches(TBool aEnable); - IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus); - IMPORT_C TInt SetCrossCheckUid(const TUid& aCrossCheckUid); - IMPORT_C TInt SetWindowBackgroundColor(const TRgb& aBgColor); -public: - /** - @internalComponent - @released - */ - IMPORT_C TInt ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl); - /** - @internalComponent - @released - */ - IMPORT_C void ActivateView(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TRequestStatus& aStatus, TInt aCustomControl); - /** - @internalComponent - @released - */IMPORT_C TInt CreateActivateViewEvent(const TVwsViewId& aViewId,TUid aCustomMessageId,const TDesC8& aCustomMessage, TInt aCustomControl); - /** - @internalComponent - @released - */ - IMPORT_C TInt GetCurrentActiveViewInSystem(TVwsViewId& aActiveViewId); -private: - CVwsSessionWrapper(); - CVwsSessionWrapper(MVwsSessionWrapperObserver& aObserver); - void ConstructL(); - TInt CheckCreateViewServerSession(); - TBool IsSchedulerRunning(); -private: - RVwsSession* iVwsSession; - CVwsSessionEventHandler* iViewEventHandler; - MVwsSessionWrapperObserver* iObserver; - }; - - -// -// Panic. -// -/** -@internalComponent -*/ -enum TVwsPanic - { - EVwsCreateScheduler=1, - EVwsThreadRename - }; - -/** -@internalComponent -*/ -GLREF_C void Panic(TVwsPanic aPanic); - -/** -Server thread start. - -@internalComponent -*/ -GLDEF_C TInt ViewServerThreadStart(TAny* aPtr); - -/** -@internalComponent -*/ -struct SVwsCommandLine - { - MVwsAppStarter* iAppStarter; - }; - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vobserv.h --- a/epoc32/include/vobserv.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,257 +0,0 @@ -// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VOBSERV_H__ -#define __VOBSERV_H__ - -#ifndef __E32DEF_H__ -#include -#endif -#ifndef __E32STD_H__ -#include -#endif -#ifndef __E32DES16_H__ -#include -#endif -#ifndef __S32STRM_H__ -#include -#endif -#ifndef __VUTIL_H__ -#include -#endif - -class CVersitParser; - -class MVersitObserver -/** A Versit parser observer. - -This is a plug-in class and contains only pure virtual functions. - -An implementator of this class can find out the version number of an entity -being parsed. The version number specifies the version of the vCard/vCalendar -specification used by the data of the vCard/vCalendar. This is for use in -conjunction with the MVersitPlugin class, which adjusts the parser's behaviour -according to the vCard/vCalendar version. - -An implementator of this class can also respond to the creation of a new parser -for an embedded sub-entity. This is so that the observer can set the MVersitPlugin, -as well as itself, for each new parser that is created. - -An observer is set up for a Versit parser using CVersitParser::SetObserver(). -@publishedAll -@released -*/ - { -public: - /** Called when the version property (a property of the name KVersitTokenVERSION) - of an entity is parsed during internalisation of a stream, if the Versit parser - has an observer. - - An implementation of this function can determine the version of an entity - being parsed. - - Called by CVersitParser::ParsePropertiesL(). - - @param aParser A pointer to the parser object that detected the version. - @param aVersion A unicode string containing the version number detected. */ - virtual void VersionSet(CVersitParser* aParser,const TDesC16& aVersion)=0; - /** Called when a new Versit parser is created to parse an embedded object, - specifically a vEvent, a vTodo or an agent, if the Versit parser has an observer. - - @param aParser The newly created Versit entity. */ - virtual void NewParser(CVersitParser* aParser)=0; -private: - IMPORT_C virtual void Reserved1(); - IMPORT_C virtual void Reserved2(); - }; - -class MVersitPlugIn -/** A Versit parser plug-in. - -This is a plug-in class and contains only pure virtual functions. - -An implementator of this class can override some of the low level behaviour -of a Versit parser. For instance, options are provided to determine behaviour -during line wrapping and unwrapping. - -The use of this plug-in is optional, and when there is no plug-in the parser -object will use default behaviour. However, vCard v3.0 has some differences -to vCard v2.1, such as for line wrapping and unwrapping. Symbian OS supports -vCard v2.1 in its default behaviour. Therefore this plug-in can be used to -provide compatibility with vCard v3.0. -@publishedAll -@released -*/ - { -public: - /** Tests whether a space is to be added when merging (unwrapping) two lines - while internalising a stream. - - If there is no plug-in then a space will be added. - - Used by the CLineReader class. - - @return ETrue if a space is to be added and EFalse if not. */ - virtual TBool AddSpace()=0; //Unwrapping lines - /** Tests whether white space at the start of a line, apart from the first space, - forms part of the data when internalising a stream. - - Note that the first space is always ignored and never included. - - If there is no plug-in then the rest of the white space at the start of a - line (tabs and spaces) is skipped and does not form part of the data when - internalising a stream. - - Used by the CLineReader class. - - @return EFalse if the spaces are to be part of the data and ETrue if not. */ - virtual TBool DeleteAllSpaces()=0; //Unwrapping lines - /** Tests how the end of Base64 data (data encoded using Versit::EBase64Encoding) - should be detected when internalising a stream. - - To determine the end of Base64 data, either a blank line can be used, or a line - without a space at the start. - - If there is no plug-in then a blank line will be looked for. - - Used by the CVersitParser class. - - @return ETrue if a blank line should be used and EFalse if a line without - a space at the start should be used. */ - virtual TBool NeedsBlankLine()=0; //Unwrapping Base64 data - /** Allows the removal of escape characters from a property value when internalising - from a stream. - - Versit deals with the escaping of semi-colons and the escape character itself - (that is, the Yen character for Shift-JIS or a backslash for other character - sets) without the help of a plug-in. Other characters, such as commas and - carriage returns, can be escaped and un-escaped using the plug-in's AddEscaping() - and RemoveEscaping(). - - This function is needed as escaping is done differently in vCard v3.0: firstly, - commas are used as syntactical characters and so need to be escaped when they - are just part of the text; secondly, \\r\\n in plain (un-encoded) text is used - to mean a CRLF, whereas v2.1 forces you to use Quoted Printble encoding if - there is a CRLF in the data. - - Note that, although the string passed into this function can be changed, it - must not be made longer. - - Used by the CVersitParser class. - - @param aText The property value text from which escape characters are to be - removed. */ - virtual void RemoveEscaping(TPtr16& aText)=0; - /** Allows the addition of escape characters to a property value when externalising - to a stream. - - Versit deals with the escaping of semi-colons and the escape character itself - (that is, the Yen character for Shift-JIS or a backslash for other character - sets) without the help of a plug-in. Other characters, such as commas and - carriage returns, can be escaped and un-escaped using the plug-in's RemoveEscaping() - and AddEscaping(). - - This function is needed as escaping is done differently in vCard v3.0: firstly, - commas are used as syntactical characters and so need to be escaped when they - are just part of the text; secondly, \\r\\n in plain (un-encoded) text is used - to mean a CRLF, whereas v2.1 forces you to use Quoted Printble encoding if - there is a CRLF in the data. - - If the string passed into this function needs to be made longer, then this - should be done with the following command, otherwise the cleanup stack will - eventually panic: - - @code - aText=aText->ReAllocL(newSize); - @endcode - - Used by the CParserPropertyValue class. - - @param aText The property value text to which escape characters are to be - added. */ - virtual void AddEscaping(HBufC16*& aText)=0; - /** Determines how an unencoded property value should be wrapped when externalising - to a stream. - - If there is no plug-in then line wrapping will follow vCal v1.0 and vCard - v2.1 wrapping rules. In this case, the text is split into lines with a maximum - length of KMaxExternalizedTokenLength (70) characters, and two spaces are inserted - at the beginning of each new line. - - Used by the CParserPropertyValue class. - - @param aStream The stream to write the text to. - @param aCurrentLineLength The number of characters already written to the current - line, which needs to be taken into account when calculating where the next - line break should occur. This value should be updated before returning. - @param aText The property value text to write to the stream, in the correct - character set and encoded as necessary. - @return ETrue if the property value is wrapped using the method defined in - this (overloaded) function. EFalse if the property value text is not wrapped - by this function (in which case the default wrapping rules are implemented). */ - virtual TBool WrapLine(RWriteStream& aStream,TInt& aCurrentLineLength,const TPtr8& aText)=0; - /** Determines how property values are encoded when externalising a property to - a stream. - - This function is called for each property in turn and can specify how encoding - should be implemented for the value of that property. - - If there is no plug-in, or this function returns EFalse, then the default - rules are used to determine how each property value is encoded. - - Used by the CVersitParser plug-in when externalising a property. - - @param aEncoding On return, specifies the encoding type used. - @param aRequiresEncoding ETrue if encoding is required. This is the case if - either the default encoding is not Versit::ENoEncoding, or if the property - value contains characters that cannot be written out directly (e.g. equals, - CR, LF, tab or non-ASCII characters). - @param aDefaultEncoding The default encoding specifed by the user of the parser. - @param aPropertyUid The property UID of the property being externalised. These are - defined in vuid.h. - @param aPropertyCharsetId The character set UID of the character set being - used to output the property. - @return ETrue if the encoding type to be used is defined in this (overloaded) - function. EFalse if this function does not determine the encoding type (in - which case Versit's default method is used to decide the encoding type). */ - virtual TBool EncodingType(Versit::TVersitEncoding& aEncoding,TBool aRequiresEncoding,Versit::TVersitEncoding aDefaultEncoding - ,TUid aPropertyUid,TUint aPropertyCharsetId)=0; - /** Returns the encoding name to be used for a specified encoding type when externalising - a property to a stream, or allows the default name to be used. - - Can override the default name Versit would select if there was no plug-in ("BASE64", - "QUOTED-PRINTABLE", "8-BIT"). - - The default names are selected using VersitUtils::IANAEncodingName(). - - Used by the CVersitParser class when externalising a property. - - @param aEncoding The encoding type the name is required for. - @return The name to use for the encoding type, or a zero length descriptor - if the default name should be used. */ - virtual const TDesC8& EncodingName(Versit::TVersitEncoding aEncoding)=0; - - /** Returns a pointer to a specified interface extension - to allow future extension - of this class without breaking binary compatibility - - @param aInterfaceUid Identifier of the interface to be retrieved - @param aInterface A reference to a pointer that retrieves the specified interface. - */ - IMPORT_C virtual void GetInterface(TUid aInterfaceUid, TAny*& aInterface); -private: - IMPORT_C virtual void Reserved2(); - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vprop.h --- a/epoc32/include/vprop.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,697 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VPROP_H__ -#define __VPROP_H__ - -#ifndef __E32BASE_H__ -#include -#endif - -#ifndef __BADESCA_H__ -#include -#endif - -#ifndef __S32STRM_H__ -#include -#endif - -#ifndef __E32MATH_H__ -#include -#endif - - -#ifndef __VUID_H__ -#include -#endif - -#ifndef __VTOKEN_H__ -#include -#endif - -#ifndef __VUTIL_H__ -#include -#endif - -#ifndef __S32FILE_H__ -#include -#endif -// - -class CParserProperty; -class CVersitParser; -class MVersitPlugIn; -class CParserPropertyValueCDesCArray; - -const TInt KRandomnumberlen = 5; -const TInt KMaxGeneratedfilenamelen =16; -// -// CParserParam -// - -class CParserParam : public CBase -/** A Versit property parameter. - -A property parameter consists of a name and optionally a value, both in descriptor -form. Parser properties (class CParserProperty) may own one or more property -parameters. - -Note: - -The private parameter name and value members are stored as narrow (8-bit) -rather than 16-bit Unicode descriptors. - -However, certain member functions take or return a Unicode value, -for the purpose of backwards compatibility. In this case a simple conversion -takes place: this ignores the top 8 bits (for Unicode -> Narrow) or adds zero -for the top 8-bits (for Narrow->Unicode). -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserParam* NewL(const TDesC8& aName, const TDesC8& aValue); - IMPORT_C static CParserParam* NewL(const TDesC8& aName, const TDesC& aValue); - IMPORT_C ~CParserParam(); - IMPORT_C void SetValueL(const TDesC8& aValue); - IMPORT_C void SetValueL(HBufC8* aValue); - IMPORT_C TInt ExternalizeL(RWriteStream& aStream) const; - IMPORT_C TPtrC8 Name() const; - IMPORT_C TPtrC8 Value() const; - IMPORT_C HBufC* ValueL() const; - IMPORT_C TInt ExternalizeL(RWriteStream& aStream, TInt& aLengthOutput, CVersitParser* aVersitParser) const; -private: - CParserParam(HBufC8* aName, HBufC8* aValue); -private: - HBufC8* iParamName; - HBufC8* iValue; - }; - -// -// TVersitDateTime -// - -class TVersitDateTime -/** Defines a Versit date and time. - -This class is used throughout Versit to represent the date and time. It uses -a TDateTime object to store the date/time value and records whether this value -is local to the machine which originated the vCard, local to the machine on -which the code is running, or universal time (UTC). - -The Year(), Month() and Day() member functions of class TDateTime may be used -to extract the date and time components from the TVersitDateTime::iDateTime. -@publishedAll -@released */ - { -public: - /** Relative time flags. */ - enum TRelativeTime - { - /** Time is stored in UTC. */ - EIsUTC, - /** Time is local to the machine which originated the vCard. */ - EIsVCardLocal, - /** Time is local to the machine on which the code is running. */ - EIsMachineLocal, - /** Unused. */ - EIsCorrect - }; - IMPORT_C TVersitDateTime(const TDateTime& aDateTime,TRelativeTime aRelativeTime); - - /** Date/time flags. - @publishedAll - @deprecated since 9.1*/ - enum TVersitDateTimeFlags - { - EExportNullFlag=0, - /** Indicates whether the relative time is to be externalized along with the date/time - value. - - The flag is set to 'EExportNullFlag' by default. - - This is only implemented (by CParserTimePropertyValue::EncodeVersitDateTimeL()) - if the date/time is universal. When the flag is set, the externalised value - is followed by the token, KVersitTokenUniversalTime. */ - EExportTimeZoneDesignator=0x01, - EExportLeaveAsLocalTime=0x02 - }; - /** - @deprecated since 9.1 - */ - inline void SetFlag(TVersitDateTimeFlags aFlag) { iFlags |= aFlag; } - /** - @deprecated since 9.1 - */ - inline TBool IsFlagSet(TVersitDateTimeFlags aFlag) const { return iFlags & aFlag; } - /** - @deprecated since 9.1 - */ - inline void ClearFlag(TVersitDateTimeFlags aFlag) { iFlags &= ~aFlag; } -public: - /** The date/time value. */ - TDateTime iDateTime; - /** Specifies whether the time value is local to the machine which originated the - vCard, local to the machine on which the code is running, or universal. */ - TRelativeTime iRelativeTime; -private: - TInt iFlags; - }; - -// -// CParserPropertyValue -// -class CParserPropertyValue : public CBase -/** Abstract base class for all property values. - -Defines a pure virtual ExternalizeL() function which should write out the -property value to a stream. - -The type of derived class is returned by the Uid() function; the UID value is -specified on construction. - -The other functions relate to the character set, encoding format and plug-in -used during externalising. -@publishedAll -@released -*/ - { -public: - /** Externalises the property value to a write stream. - - Implementations of this function are invoked by the parser's ExternalizeL() - function. - - @param aStream Stream to which the property value is externalised. - @param aEncodingCharset The character set and encoding information. - @param aLengthOutput The amount of text that has been outputted so far on the - line (for the property name), which may need to be taken into account when - calculating if and where any line break should occur. */ - virtual void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput)=0; - IMPORT_C virtual TBool IsAsciiCharacterSetSufficient(); - IMPORT_C virtual void EncodeL(CBufBase* aTarget,const TDesC8& aSource,const TUid& aEncoding) const; - IMPORT_C virtual TBool SupportsInterface(const TUid& /*aInterfaceUid*/) const; - inline TUid Uid() const; - inline void SetPlugIn(MVersitPlugIn* aPlugIn); -protected: - IMPORT_C CParserPropertyValue(const TUid& aPropertyValueUid); - IMPORT_C void FoldEncodeAndWriteValueToStreamL(RWriteStream& aStream, const TDesC& aValue - ,const Versit::TEncodingAndCharset& aEncodingCharset,TInt& aLengthOutput) const; - IMPORT_C void FoldEncodeAndWriteValueToStreamL(RWriteStream& aStream, const CDesCArray* aValueArray - ,const Versit::TEncodingAndCharset& aEncodingCharset,TInt& aLengthOutput) const; - IMPORT_C void FoldAndWriteValueToStreamL(RWriteStream& aStream, const TDesC& aValue - ,const Versit::TEncodingAndCharset& aEncodingCharset,TInt& aLengthOutput) const; - IMPORT_C static void Append(TDes16& aTarget,TDesC8& aSource); -protected: - inline MVersitPlugIn* PlugIn(); - -private: - TUid iPropertyValueTypeUid; - MVersitPlugIn* iPlugIn; - }; - -// -// CParserTimePropertyValue -// - -class CVersitDaylight; - -class CParserTimePropertyValue : public CParserPropertyValue -/** Abstract base class for all of the date/time property value classes. - -Provides date/time conversion functions between machine-local and universal -time. - -The date/time property value classes are CParserPropertyValueAlarm, -CParserPropertyValueDate, CParserPropertyValueDateTime, -CParserPropertyValueMultiDateTime, CParserPropertyValueDaylight and -CParserPropertyValueRecurrence. -@publishedAll -@released -*/ - { -public: - /** This is implemented, where applicable, to convert date/time - values into universal time. - - The date/time is checked against the daylight saving information provided - in aDaylight. If it falls inside the daylight saving period then the daylight - saving offset is subtracted from the time to convert it to universal time. - Otherwise aIncrement is added to the date/time of the alarm to convert it - to universal time. - - Note that the daylight savings offset will adjust the time both for the daylight - saving and for the time zone. - - The function has no effect if it date/times are already stored in universal - time. - - If aDaylight is a NULL pointer then aIncrement is used. - - @param aIncrement A time interval in seconds which represents the time zone's - offset from universal time. - @param aDaylight Pointer to the specification for daylight saving. If the alarm's - time value is within the period for daylight saving, the value is modified - by the daylight saving offset (which accounts for both the time zone and daylight - saving rule). - @deprecated since 9.1 - */ - IMPORT_C virtual void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight)=0; - /** Pure virtual function which is implemented, where applicable, to convert the - date/time property value into machine-local time. - - This process involves adjusting the date/time value by the offset in aIncrement. - - The function has no effect if the value is already stored as machine-local - time. - - The universal date/times are assumed to have been corrected for any daylight saving - rule in effect. - - @param aIncrement A time interval which represents the number of seconds which - is to be added to the date/time value. This should normally be the universal - time offset for the machine's locale. - @deprecated since 9.1 */ - IMPORT_C virtual void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement)=0; - static void ConvertDateTime(TDateTime& aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight,TBool aTo); -public: //from CParserPropertyValue - IMPORT_C virtual TBool SupportsInterface(const TUid& aInterfaceUid) const; -protected: - IMPORT_C CParserTimePropertyValue(const TUid& aPropertyValueUid); - IMPORT_C void ConvertDateTime(TDateTime* aDateTime,const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void EncodeVersitDateTimeL(TDes8& aBuf,const TVersitDateTime& aDateTime,TBool aEncodeTime=ETrue) const; - IMPORT_C void EncodeTimePeriodL(TDes8& aBuf,const TTime& aTimePeriod) const; - }; - -// -// CParserPropertyValueHBufC -// -class CParserPropertyValueHBufC : public CParserPropertyValue -/** A heap descriptor property value parser. - -Many properties are stored using this class. Examples are vCard e-mails and -vCalendar locations. - -The UID for a heap descriptor property value is KVersitPropertyHBufCUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserPropertyValueHBufC* NewL(const TDesC& aValue); - IMPORT_C CParserPropertyValueHBufC(HBufC16* aValue); - IMPORT_C ~CParserPropertyValueHBufC(); - IMPORT_C TPtrC Value() const; - IMPORT_C HBufC* TakeValueOwnership(); - IMPORT_C CParserPropertyValueCDesCArray* TreatAsArrayPropertyLC(const CParserProperty& aOwningProperty) const; -public: // from CParserPropertyValue - IMPORT_C TBool IsAsciiCharacterSetSufficient(); - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); -private: - CParserPropertyValueHBufC(); - void ConstructL(const TDesC& aValue); -protected: - HBufC* iValue; - }; - -// -// CParserPropertyValueBinary -// - -class CParserPropertyValueBinary : public CParserPropertyValue -/** A binary property value parser. - -It is used to store logos, photos, alarm content and binary attachment as binary values. - -The UID for a binary property value is KVersitPropertyBinaryUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserPropertyValueBinary* NewL(const TDesC8& aValue); - IMPORT_C static CParserPropertyValueBinary* NewLC(const TDesC8& aValue); - - inline CParserPropertyValueBinary(CBufSeg& aValue); - IMPORT_C ~CParserPropertyValueBinary(); - IMPORT_C const CBufSeg* Value() const; -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); -protected: - inline CParserPropertyValueBinary(); - void ConstructL(const TDesC8& aValue); - void ExternalizeL(RWriteStream& aStream, const Versit::TEncodingAndCharset& aEncodingCharset, TInt aLengthOutput, RReadStream& aReadStream); - -protected: - CBufSeg* iValue; - };// - -NONSHARABLE_CLASS(CParserPropertyValueBinaryFile) : public CParserPropertyValueBinary -/** A file property value parser. - -It is used to store a file handle so that the binary data can be read through the handle when exporting. -It is not used when importing. -The UID for a binary property value is KVersitPropertyBinaryUid. -@publishedPartner -@prototype -*/ - { -public: - IMPORT_C static CParserPropertyValueBinaryFile* NewL(const RFile& aFileHandle); - IMPORT_C ~CParserPropertyValueBinaryFile(); -public: // from CParserPropertyValue - void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); - -private: - void ConstructL(const RFile& aFileHandle); -private: - RFileReadStream iFileStream; - }; - -// CParserPropertyValueCDesCArray -// -class CParserPropertyValueCDesCArray : public CParserPropertyValue -/** A property value parser which stores an array of descriptors. - -Can be used by both vCards and vCalendars, for example to store a postal address -or information about an organisation. - -The UID for a descriptor array property value is KVersitPropertyCDesCArrayUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueCDesCArray(CDesCArray* aValue); - IMPORT_C ~CParserPropertyValueCDesCArray(); - inline CDesCArray* Value() const; - IMPORT_C TBool IsPresent(const TDesC& aValue) const; -public: // from CParserPropertyValue - IMPORT_C TBool IsAsciiCharacterSetSufficient(); - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); -protected: - CDesCArray* iValue; - }; - -// -// CParserPropertyValueTimeZone -// - -class CParserPropertyValueTimeZone: public CParserPropertyValue -/** A time zone property value parser. - -Stores and externalises a property value which represents the time zone information -for a vCard or vCalendar. - -The time zone is specified as the universal time offset. This is a time interval -which is a positive or negative number of seconds from universal time. Time -zones east of universal time have positive numbers. Time zones west of universal -time have negative numbers. - -The UID for a time zone property value is KVersitPropertyTimeZoneUid. -@publishedAll -@released -*/ - { -public: - static void EncodeTimeZone(TDes8& aBuf,TTimeIntervalSeconds iValue); - IMPORT_C CParserPropertyValueTimeZone(TTimeIntervalSeconds aValue); - inline TTimeIntervalSeconds Value() const; -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); -protected: - TTimeIntervalSeconds iValue; - }; - -// -// CVersitDaylight -// -class CVersitDaylight : public CBase -/** Universal time offset information, including the daylight savings offset. - -This class deals with the daylight saving offset: a one hour offset that occurs -in many countries during part of the year. This offset needs to be taken into -account when converting Versit times (TVersitDateTimes) between universal -and machine-local times. - -This class stores information about the offset, including its length in seconds, -when it takes effect and the standard time designations. - -Note that the universal offset (iOffset) is the sum of the daylight saving -offset and any time zone offset, as it is the absolute offset from GMT. - -An instance of this class is owned by the CParserPropertyValueDaylight class. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CVersitDaylight* NewL(TBool aSavings, TTimeIntervalSeconds aOffset, TVersitDateTime* aStartTime, TVersitDateTime* aEndTime, const TDesC& aStandardDesignation, const TDesC& aDaylightDesignation); - IMPORT_C ~CVersitDaylight(); -private: - CVersitDaylight(TBool aSavings, TTimeIntervalSeconds aOffset, TVersitDateTime* aStartTime, TVersitDateTime* aEndTime); - void ConstructL(const TDesC& aStandardDesignation, const TDesC& aDaylightDesignation); -public: - /** A sort key than can be used when sorting an array of properties by start date/time. */ - TInt64 iStartTimeSortKey; - /** The daylight savings flag: this is ETrue if daylight saving is in effect - in the locale and EFalse if not. */ - TBool iSavings; - /** The absolute offset from GMT, which is the sum of the time zone and daylight - saving offsets (in seconds). */ - TTimeIntervalSeconds iOffset; - /** The date/time at which the period for daylight saving begins. */ - TVersitDateTime* iStartTime; - /** The date/time at which the period for daylight saving ends. */ - TVersitDateTime* iEndTime; - /** The standard time designation, e.g. GMT, EST. */ - HBufC* iStandardDesignation; - /** The daylight saving time designation, e.g. BST, EDT. */ - HBufC* iDaylightDesignation; - }; - -// -// CParserPropertyValueDaylight -// -class CParserPropertyValueDaylight : public CParserTimePropertyValue -/** A property value parser which contains the daylight savings rule for a vCalendar. - -The property value is stored using an instance of the CVersitDaylight class. - -The UID for a daylight savings rule property value is KVersitPropertyDaylightUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueDaylight(CVersitDaylight* aValue); - IMPORT_C ~CParserPropertyValueDaylight(); - inline CVersitDaylight* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt aLengthOutput); -private: - CVersitDaylight* iValue; - }; - -// -// CParserPropertyValueDateTime -// -class CParserPropertyValueDateTime : public CParserTimePropertyValue -/** A date/time property value parser. - -The date/time value is contained in a TVersitDateTime object. - -The UID for a date/time property value is KVersitPropertyDateTimeUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueDateTime(TVersitDateTime* aValue); - IMPORT_C ~CParserPropertyValueDateTime(); - inline TVersitDateTime* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt /*aLengthOutput*/); -protected: - TVersitDateTime* iValue; - }; - -// -// CParserPropertyValueDate -// -class CParserPropertyValueDate : public CParserTimePropertyValue -/** A date property value parser. - -The date value is contained in a TVersitDateTime object. - -The UID for a date property value is KVersitPropertyDateUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueDate(TVersitDateTime* aValue); - IMPORT_C ~CParserPropertyValueDate(); - inline TVersitDateTime* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& /*aIncrement*/,const CVersitDaylight* /*aDaylight*/); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& /*aIncrement*/); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); -private: - TVersitDateTime* iValue; - }; - -// -// CParserPropertyValueMultiDateTime -// -class CParserPropertyValueMultiDateTime : public CParserTimePropertyValue -/** A property value parser which stores a list of date/time values using an array -of TVersitDateTime objects. - -The UID for a multiple date/time property value is KVersitPropertyMultiDateTimeUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueMultiDateTime(CArrayPtr* aValue); - IMPORT_C ~CParserPropertyValueMultiDateTime(); - inline CArrayPtr* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt aLengthOutput); -protected: - CArrayPtr* iValue; - }; - -// -// CParserPropertyValueInt -// -class CParserPropertyValueInt : public CParserPropertyValue -/** An integer property value parser. - -This stores a property value as a signed integer. For example, an employee -ID number might be stored using this class. - -The UID for an integer property value is KVersitPropertyIntUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueInt(TInt aValue); - inline TInt Value() const; -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& aEncodingCharset,TInt /*aLengthOutput*/); -protected: - TInt iValue; - }; - -// -// CParserProperty -// - -class CParserProperty : public CBase -/** A vCard or vCalendar property. - -A property consists of a name, an optional value and one or more optional -parameters. - -The name, value and parameters are initialised on construction. - -Versit properties have the general form: - -Property Name (; Property Parameter Name(=Property Parameter Value)* : Property -Value) - -where items in brackets are optional and * indicates that the item may be -repeated. - -For instance, TEL; HOME; ENCODING=QUOTED-PRINTABLE; CHARSET=US-ASCII : 01234 567890 - -Here, TEL is the property name; HOME, ENCODING and CHARSET are property parameter -names; QUOTED-PRINTABLE and US-ASCII are property parameter values. The component -following the colon is the property value. - -Properties also have a name UID, which set during internalisation of a property -and used only during internalisation. It is set by SetNameUid() and is used -to allow number comparisons during internalisation. This provides a faster -alternative to string comparisons when checking a property to see if it is -a significant one (e.g. a begin or binary property). This is the only use -of the name UID: it is not used during externalisation of a property. - -Note that grouped properties are supported by the derived class, CParserGroupedProperty. -The vCalender parser does not have property groups, and so stores all properties -using this base class, whereas the vCard parser stores all properties using -CParserGroupedProperty. -@publishedAll -@released -*/ - { -public: - IMPORT_C static CParserProperty* NewL(CParserPropertyValue& aPropertyValue, const TDesC8& aName, CArrayPtr* aArrayOfParams); - IMPORT_C CParserProperty(CArrayPtr* aArrayOfParams); - IMPORT_C ~CParserProperty(); - IMPORT_C virtual void ExternalizeL(RWriteStream& aStream, CVersitParser* aVersitParser = NULL); - IMPORT_C CParserParam* Param(const TDesC8& aParamName) const; // note params can only appear once - IMPORT_C void AddParamL(CParserParam* aParam); - IMPORT_C void DeleteParam(TDesC8& aParamName); - IMPORT_C void SetNameL(const TDesC8& aName); - IMPORT_C virtual TBool SupportsInterface(const TUid& /*aInterfaceUid*/) const; - IMPORT_C TPtrC8 Name() const; - inline void SetValue(CParserPropertyValue* aPropertyValue); - inline CParserPropertyValue* Value() const; - inline TUid Uid() const; - inline void SetNameUid(TUid aUid); - inline TUid NameUid() const; - inline void SetParamArray(CArrayPtr* aArrayOfParams); - - - IMPORT_C TBool LoadBinaryValuesFromFilesL(RFs& aFileSession); - IMPORT_C TBool SaveBinaryValuesToFilesL(TInt aSizeThreshold,const TDesC& aPath,RFs& aFileSession); -protected: - IMPORT_C CParserProperty(CParserPropertyValue& aPropertyValue, CArrayPtr* aArrayOfParams); - IMPORT_C static void ConstructSelfL(CParserProperty& aSelf,const TDesC8& aName); - -public: - IMPORT_C CArrayPtr* ParamArray()const; - -protected: - CParserPropertyValue* iPropertyValue; - HBufC8* iPropertyName; - TUid iPropertyNameUid; - CArrayPtr* iArrayOfParams; - -private: - friend class CVersitParser; - inline HBufC8*& NameBuf(); - IMPORT_C virtual void Reserved(); - void ReadBinaryDataL(const CBufSeg* aBufseg_ptr,HBufC8** aBuffer); - void GenerateNameAndCreateFileL(RFs& aFileSession,TPtr8 aPropertyName,RFile& aFile,TDes& aFileName); - - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vprop.inl --- a/epoc32/include/vprop.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,181 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CParserPropertyValue -// -// - -inline TUid CParserPropertyValue::Uid() const -/** Returns the property value's UID. - -This UID identifies the property value's type and is specified on construction. -The values are defined in vuid.h. - -@return The property value's UID. */ - {return iPropertyValueTypeUid;} - -inline void CParserPropertyValue::SetPlugIn(MVersitPlugIn* aPlugIn) -/** Assigns a Versit plug-in to the property value. - -Allows functions of the MVersitPlugIn class to be used when writing to a stream. - -If a plug-in is in use then this function needs to be called with each property value -before it is externalised. However, this will be done for you if you add a property -using the function CVersitParser::AddPropertyL(). - -@param aPlugIn A pointer to an MVersitPlugIn instance. */ - {iPlugIn=aPlugIn;} - -inline MVersitPlugIn* CParserPropertyValue::PlugIn() -/** Gets a pointer to the Versit plug-in - -@return A pointer to the plug-in. */ - {return iPlugIn;} - -// -// CParserPropertyValueCDesCArray -// -inline CParserPropertyValueBinary::CParserPropertyValueBinary() :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)) -/** Constructs a binary property value. - -Sets the property value UID to KVersitPropertyBinaryUid. */ - {} - -inline CParserPropertyValueBinary::CParserPropertyValueBinary(CBufSeg& aValue) :CParserPropertyValue(TUid::Uid(KVersitPropertyBinaryUid)), iValue(&aValue) -/** Constructs a binary property value. - -Sets the property value to aValue and the property value UID to KVersitPropertyBinaryUid. - -@param aValue The property value. */ - {} - -// -// CParserPropertyValueCDesCArray -// -inline CDesCArray* CParserPropertyValueCDesCArray::Value() const -/** Gets the property value. - -@return Pointer to the array of descriptors owned by the property value object. */ - {return iValue;} - -// -// CParserPropertyValueTimeZone -// -inline TTimeIntervalSeconds CParserPropertyValueTimeZone::Value() const -/** Gets the time zone property value. - -@return A time interval (in seconds) which represents the offset from universal -time. */ - {return iValue;} - -// -// CParserPropertyValueDaylight -// -inline CVersitDaylight* CParserPropertyValueDaylight::Value() const -/** Gets the daylight saving property value. - -@return Pointer to the daylight saving specification. */ - {return iValue;} - -// -// CParserPropertyValueDateTime -// -inline TVersitDateTime* CParserPropertyValueDateTime::Value() const -/** Gets a pointer to the date/time property value. - -@return Pointer to the date/time property value. */ - {return iValue;} - -// -// CParserPropertyValueDate -// -inline TVersitDateTime* CParserPropertyValueDate::Value() const -/** Gets a pointer to the date property value. - -@return Pointer to the date property value. */ - {return iValue;} - -// -// CParserPropertyValueMultiDateTime -// -inline CArrayPtr* CParserPropertyValueMultiDateTime::Value() const -/** Gets a pointer to the object's list of date/time property values. - -@return Pointer to the array of date/time property values. */ - {return iValue;} - -// -// CParserPropertyValueInt -// -inline TInt CParserPropertyValueInt::Value() const -/** Gets the signed integer property value. - -@return The signed integer property value. */ - {return iValue;} - -// -// CParserProperty -// -inline void CParserProperty::SetValue(CParserPropertyValue* aPropertyValue) -/** Sets the property value. - -The property takes ownership of the property value. - -@param aPropertyValue A pointer to the property value to be set. */ - {iPropertyValue=aPropertyValue;} - -inline CParserPropertyValue* CParserProperty::Value() const -/** Gets a pointer to the property value. - -Ownership of the property value is not transferred by this function. - -@return Pointer to generic parser property value. */ - {return iPropertyValue;} - -inline TUid CParserProperty::Uid() const -/** Gets the UID of the property value. - -@return UID of the property value. */ - {return iPropertyValue->Uid();} - -/* - * Gets the name of the property. - * - * @return " HBufC8*& " - * Pointer to the property name. - */ -inline HBufC8*& CParserProperty::NameBuf() - {return iPropertyName;} - -inline void CParserProperty::SetNameUid(TUid aUid) -/** Sets a property name UID. - -This function is called by CVersitParser::AddProperty() when internalising, -and will not normally be used directly. - -@param aUid A property name UID. */ - {iPropertyNameUid=aUid;} - -inline TUid CParserProperty::NameUid() const -/** Gets the property name UID. - -@return UID of the property name. */ - {return iPropertyNameUid;} - -inline void CParserProperty::SetParamArray(CArrayPtr* aArrayOfParams) -/** Sets the array of property parameters. - -The property takes ownership of aArrayOfParams - -@param aArrayOfParams Array of property parameters. */ - {iArrayOfParams=aArrayOfParams;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vrecur.h --- a/epoc32/include/vrecur.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,355 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VRECUR_H__ -#define __VRECUR_H__ - -#include - -// -// CWeekDayArray -// - -class CWeekDayArray : public CBase -/** Defines an array of the days in the week on which a 'weekly' -or 'monthly by position' repeat event occurs. -@publishedAll -@released -*/ - { -public: - IMPORT_C CWeekDayArray(); - IMPORT_C ~CWeekDayArray(); - IMPORT_C void ExternalizeL(RWriteStream& aStream); -public: - /** The array of days in the week. */ - CArrayFix* iArray; - }; - -// -// CVersitRecurrence -// -class CVersitRecurrence : public CBase -/** Abstract base class for all recurrence property value classes. - -A pointer to a derived recurrence property value class instance is owned by -the CParserPropertyValueRecurrence class. - -Implementations of this class define when an event is to repeat. -@publishedAll -@released -*/ - { -public: - IMPORT_C CVersitRecurrence(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate); - IMPORT_C ~CVersitRecurrence(); - /** Externalises an occurrence list to aStream. - - @param aStream The stream to which the occurrence list is to be externalised. */ - virtual void ExternalizeOccurrenceListsL(RWriteStream& aStream) const=0; - /** Repeat type. - @publishedAll - @released */ - enum TType - { - /** Daily repeat. */ - EDaily=1, - /** Weekly repeat. */ - EWeekly, - /** Monthly repeat, by relative position within the month. */ - EMonthlyByPos, - /** Monthly repeat, by day number within the month. */ - EMonthlyByDay, - /** Yearly repeat, by specific months within the year. */ - EYearlyByMonth, - /** Yearly repeat, by specific days within the year. */ - EYearlyByDay - }; -public: - /** The type of repeat (daily, weekly etc.). */ - TType iRepeatType; - /** The interval between repeats: a number of days, weeks, months or years, depending - on the repeat type. */ - TInt iInterval; - /** The duration in days, weeks, months or years (depending on the repeat type) - for the repeat. - - A value of zero indicates the repeat should continue forever. */ - TInt iDuration; - /** Specification for the date at which the repeat will end. If a duration and - an end date are both specified, the end date takes precedence. */ - TVersitDateTime* iEndDate; - }; - -// -// CVersitRecurrenceDaily -// -class CVersitRecurrenceDaily : public CVersitRecurrence -/** Defines when a 'daily' recurrence is to be repeated. - -Used by a repeating event (a vCalendar event or to-do) to define when it is -to occur. The days on which the event occurs are identified by the number -of days between repeats, e.g. every third day. - -A pointer to this object may be owned by a CParserPropertyValueRecurrence -object. -@publishedAll -@released -*/ - { -public: - IMPORT_C CVersitRecurrenceDaily(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate); -public: //from CVersitRecurrence - IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& /*aStream*/) const; - }; - -// -// CVersitRecurrenceWeekly -// -class CVersitRecurrenceWeekly : public CVersitRecurrence -/** Defines a list of days when a 'weekly' recurrence is to be -repeated. - -Used by a repeating event (a vCalendar event or to-do) to define when it is -to occur. The days on which the event occurs are identified by the number -of weeks between repeats and the day(s) of the week on which the event occurs, -e.g. on Monday every other week. - -A pointer to this object may be owned by a CParserPropertyValueRecurrence -object. -@publishedAll -@released -*/ - { -public: - IMPORT_C CVersitRecurrenceWeekly(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CWeekDayArray* aArrayOfWeekDayOccurrences); - IMPORT_C ~CVersitRecurrenceWeekly(); -public: //from CVersitRecurrence - IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; -public: - CWeekDayArray* iArrayOfWeekDayOccurrences; //Mon-Sun - }; - -// -// CVersitRecurrenceMonthlyByPos -// -class CVersitRecurrenceMonthlyByPos : public CVersitRecurrence -/** Defines a list of days when a 'monthly by position' recurrence -is to be repeated. - -Used by a repeating event (a vCalendar event or to-do) to define when it is -to occur. - -The days on which the event occurs are identified by their relative position -within the month, for example the second Monday or the last Friday. - -A pointer to this object may be owned by a CParserPropertyValueRecurrence -object - -Note: The CMonthPosition class, defined within this class, is used to -define the positions of days within the month. -@publishedAll -@released -*/ - { -public: - class CMonthPosition : public CBase - /** Defines a week within the month, using the numeric occurrence of the week - (between 1 and 5 inclusive) counting from either the start or end of the month, - and defines an array of days within this week. - @publishedAll - @released - */ - { - public: - IMPORT_C ~CMonthPosition(); - public: - /** Flags that define whether the week number is counted from the start or end of the month. - @publishedAll - @released */ - enum TSign - { - /** Indicates that the iWeekNo member specifies a number counting forwards - from the start of the month. */ - EWeeksFromStartOfMonth, - /** Indicates that the iWeekNo member specifies a number counting backwards from - the end of the month. */ - EWeeksFromEndOfMonth - }; - public: - /** Indicates whether the week number iWeekNo is counted from the start or the - end of the month. A plus sign denotes from the start of the month and a minus - sign denotes from the end. */ - TSign iSign; - /** A week number within the month, between 1 and 5 inclusive. */ - TInt iWeekNo; - /** Pointer to an array of week days. */ - CWeekDayArray* iArrayOfWeekDays; - }; - IMPORT_C CVersitRecurrenceMonthlyByPos(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CArrayPtrFlat* aMonthPositions); - IMPORT_C ~CVersitRecurrenceMonthlyByPos(); -public: //framework - IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; -public: - /** Array of 'month positions' which define the days on which the event occurs. */ - CArrayPtrFlat* iMonthPositions; - }; - -// -// CVersitRecurrenceMonthlyByDay -// -class CVersitRecurrenceMonthlyByDay : public CVersitRecurrence -/** Defines a list of days when a 'monthly by day' recurrence -is to repeat. - -Used by a repeating event (a vCalendar event or to-do) to define when it is -to occur. - -The days on which the event occurs are identified by a number, counting -either from the start or the end of the month. - -A pointer to this object may be owned by a CParserPropertyValueRecurrence -object. -@publishedAll -@released -*/ - { -public: - IMPORT_C CVersitRecurrenceMonthlyByDay(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate, CArrayFix* aArrayOfOccurrencesInDaysFromStartOfMonth - ,CArrayFix* aArrayOfOccurrencesInDaysFromEndOfMonth,TBool aLastDay); - IMPORT_C ~CVersitRecurrenceMonthlyByDay(); -public: //framework - IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; -public: - /** Array of days, counting from the start of the month, on which the event occurs. */ - CArrayFix* iArrayOfOccurrencesInDaysFromStartOfMonth; //1-31 - /** Array of days, counting from the end of the month, on which the event occurs. */ - CArrayFix* iArrayOfOccurrencesInDaysFromEndOfMonth; //1-31 - /** Identifies whether the event occurs on the last day of the month. */ - TBool iLastDay; - }; - -// -// CVersitRecurrenceYearlyByMonth -// -class CVersitRecurrenceYearlyByMonth : public CVersitRecurrence -/** Defines a list of months when a 'yearly by month' recurrence -is to repeat. - -Used by a repeating event (a vCalendar event or to-do) to define the months -in which it is to occur. The months on which the event occurs are identified -by their number in the year (between 1 and 12 inclusive). - -A pointer to this object may be owned by a CParserPropertyValueRecurrence -object. -@publishedAll -@released -*/ - { -public: - IMPORT_C CVersitRecurrenceYearlyByMonth(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CArrayFix* aArrayOfMonthsInYearOccurrences); - IMPORT_C ~CVersitRecurrenceYearlyByMonth(); -public: //framework - IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; -public: - /** Pointer to an array of month values. */ - CArrayFix* iArrayOfMonthsInYearOccurrences; //Jan-Dec - }; - -// -// CVersitRecurrenceYearlyByDay -// -class CVersitRecurrenceYearlyByDay : public CVersitRecurrence -/** Defines a list of days when a 'yearly by day' recurrence is -to be repeated. - -Used by a repeating event (a vCalendar event or to-do) to define when it is -to occur. - -The days on which the repeat occurs are identified by their day number in -the year (between 1 and 366 inclusive). - -A pointer to this object may be owned by a CParserPropertyValueRecurrence -object. -@publishedAll -@released -*/ - { -public: - IMPORT_C CVersitRecurrenceYearlyByDay(TInt aInterval,TInt aDuration,TVersitDateTime* aEndDate,CArrayFix* aArrayOfDaysInYearOccurrences); - IMPORT_C ~CVersitRecurrenceYearlyByDay(); -public: //framework - IMPORT_C void ExternalizeOccurrenceListsL(RWriteStream& aStream) const; -public: - /** Pointer to an array of integers between 1 and 366 inclusive. - - Each integer represents a day on which the repeat event occurs. */ - CArrayFix* iArrayOfDaysInYearOccurrences; - }; - -// -// CParserPropertyValueRecurrence -// -class CParserPropertyValueRecurrence : public CParserTimePropertyValue -/** A recurrence property value parser. - -This is used to store and retrieve the recurrence information for a repeating -vEvent or vTodo. This information is stored as a CVersitRecurrence object. - -The UID for a recurrence property value is KVCalPropertyRecurrenceUid. -@publishedAll -@released -*/ - { -public: - IMPORT_C CParserPropertyValueRecurrence(CVersitRecurrence* aValue); - IMPORT_C ~CParserPropertyValueRecurrence(); - inline CVersitRecurrence* Value() const; -public: // from CParserTimePropertyValue - IMPORT_C void ConvertAllDateTimesToUTCL(const TTimeIntervalSeconds& aIncrement,const CVersitDaylight* aDaylight); - IMPORT_C void ConvertAllUTCDateTimesToMachineLocalL(const TTimeIntervalSeconds& aIncrement); -public: // from CParserPropertyValue - IMPORT_C void ExternalizeL(RWriteStream& aStream,const Versit::TEncodingAndCharset& /*aEncodingCharset*/,TInt /*aLengthOutput*/); -protected: - CVersitRecurrence* iValue; - }; - -// -// CRecurrenceParser -// -class CRecurrenceParser : public CVersitParser -/** Base class used in the derivation of CParserVCalEntity. - -Provides recurrence functionality for vEvents and vToDos in vCalendars. -@publishedAll -@released -*/ - { -public: - IMPORT_C CRecurrenceParser(TBool aHasVersion); - IMPORT_C CParserPropertyValue* MakePropertyValueRecurrenceL(TDes& aRecurringEntity); -private: - static void ResetAndDestroyArrayOfMonthPositions(TAny* aObject); - void GetFrequencyAndIntervalL(CVersitRecurrence::TType& aFrequency,TInt& aInterval, const TDesC& aRecurrenceType); - CVersitRecurrence* GetFrequencyModifiersL(const CVersitRecurrence::TType& aRepeatType,TInt aInterval, const TDesC& aListDates); - CWeekDayArray* GetListOfWeekDayOccurrencesL(const TDesC& aListDays); -private: // from CVersitParser - IMPORT_C virtual void Reserved1(); - IMPORT_C virtual void Reserved2(); - }; - -#include - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vrecur.inl --- a/epoc32/include/vrecur.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CParserPropertyValueRecurrence -// -// - -inline CVersitRecurrence* CParserPropertyValueRecurrence::Value() const -/** Gets the recurrence value. - -@return A pointer to the recurrence value. */ - {return iValue;} diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vstaticutils.h --- a/epoc32/include/vstaticutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VSTATICUTILS_H__ -#define __VSTATICUTILS_H__ - -// System includes -#include - -// User includes -#include - -// Classes referenced -class CVersitAdditionalPropertyStorage; - -class VersitUtils -/** A utility class which provides functions for handling character set conversions, -and for the parsing of character strings. -@publishedAll -@released -*/ - { -public: - IMPORT_C static TBool EightBitEncoding(Versit::TVersitCharSet aCharSet); - IMPORT_C static TBool EightBitEncoding(TUint aCharSetId); - IMPORT_C static TUid ConArcEncodingUid(Versit::TVersitEncoding aEncoding); - IMPORT_C static const TDesC8& IANACharacterSetName(Versit::TVersitCharSet aCharSet); - IMPORT_C static const TDesC8& IANAEncodingName(Versit::TVersitEncoding aEncoding); - IMPORT_C static TUid CharConvCharSetUid(Versit::TVersitCharSet aVersitSet); - static Versit::TVersitCharSet CharSet(TUint aCharConvCharSetUid); - IMPORT_C static TBool DescriptorContainsOnlySevenBitCharacters(const TDesC& aText); - IMPORT_C static TBool RequiresEncoding(const TDesC& aText); - IMPORT_C static void UncodeToNarrowL(const TDesC& aUnicode, TDes8& aNarrow, const Versit::TEncodingAndCharset& aEncodingCharset); - IMPORT_C static void AddEscapedString(TDes& aDestination,const TDesC& aTextToEscape,Versit::TVersitCharSet aCharSet); - IMPORT_C static void AddEscapedString(TDes& aDestination,const TDesC& aTextToEscape,TUint aCharSetId); - IMPORT_C static void ConArcEncodeL(RReadStream& aSource, CBufBase& aTarget, TUid aConArcEncodingUid); - IMPORT_C static void WrapLinesL(CBufBase& aBuffer, TInt aMaxLineLength); - IMPORT_C static TBool CheckAndIgnoreCustomErrorL(TInt aError); - IMPORT_C static void RemoveEscapeChars(TPtr8& aText); - IMPORT_C static void RemoveEscapeChars(HBufC16& aText); - IMPORT_C static void RemoveEscapeChars(HBufC16& aText, TUint aCharSetUid); - IMPORT_C static void RemoveEscapeChars(TPtr16& aText, TUint aCharSetUid); - IMPORT_C static TBool IsNoneWhiteSpaceChar(const TDesC8& aString); - IMPORT_C static void StripWhiteSpace(TPtr8& aString); - IMPORT_C static void StripWhiteSpace(TPtr16& aString); - static inline TBool IsWhiteSpace(TUint aChar); - static inline TBool IsBeginOrEnd(TUid aUid); - IMPORT_C static TBool IsNoneWhiteSpaceWideChar(const TDesC16& aString); - IMPORT_C static CDesCArray* ParseForArrayPropertiesL(TPtr16 aStringValue, TUint aLineCharacterSetId); - // - IMPORT_C static void AllocateAdditionalPropertyStorageL(CVersitTlsData& aTlsData, CParserProperty& aProperty, TPtr16& aStringValue, TUint aLineCharacterSetId); - IMPORT_C static void FreeAdditionalPropertyStorageL(const CParserProperty& aProperty); - IMPORT_C static CParserPropertyValue* AdditionalPropertyValueFromStorageL(const CParserProperty& aProperty); - -private: - static void AddEscapedString(TBool aIsShiftJis,TDes& aDestination,const TDesC& aTextToEscape); - static const TDesC &VersitUtils::EscapeChar(TBool aIsShiftJis); - }; - -inline TBool VersitUtils::IsWhiteSpace(TUint aChar) -/** Tests whether the specified character is white space -(either a tab or a space character). - -@param aChar The character to test. -@return ETrue if the character is white space, otherwise EFalse. */ - {return (aChar==CVersitParser::ESpace || aChar==CVersitParser::EHTab);} -inline TBool VersitUtils::IsBeginOrEnd(TUid aUid) -/** Tests whether the specified UID is the Versit Begin or End UID (KVersitTokenBeginUid -or KVersitTokenEndUid). - -@param aUid The UID to test. -@return ETrue if the UID is the Begin or End UID, otherwise EFalse. */ - {return (aUid.iUid==KVersitTokenBeginUid || aUid.iUid==KVersitTokenEndUid);} -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vtoken.h --- a/epoc32/include/vtoken.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,366 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __VTOKEN_H__ -#define __VTOKEN_H__ - -#include - -#define KMaxExternalizedTokenLength 70 -#define KMinLineLengthToWriteTo 1 - -/** A colon string. */ -_LIT8(KVersitTokenColon, ":"); -/** A Unicode colon string. */ -_LIT(KVersitTokenColonUnicode, ":"); -/** A semi-colon string. */ -_LIT8(KVersitTokenSemiColon, ";"); -/** A Unicode semi-colon string. */ -_LIT(KVersitTokenSemiColonUnicode, ";"); -/** A backslash string (escaped). */ -_LIT8(KVersitBackSlash, "\\"); -/** An escaped semi-colon string. */ -_LIT8(KVersitEscapedSemiColon, "\\;"); -/** An escaped Unicode semi-colon string. */ -_LIT(KVersitEscapedSemiColonUnicode, "\\;"); -/** An equals sign string. */ -_LIT8(KVersitTokenEquals, "="); -/** A full stop string. */ -_LIT8(KVersitTokenPeriod, "."); -/** A space string. */ -_LIT8(KVersitTokenSpace, " "); -/** A minus sign string. */ -_LIT8(KVersitTokenMinus, "-"); -/** A plus sign string. */ -_LIT8(KVersitTokenPlus, "+"); -/** A line break string. */ -_LIT8(KVersitLineBreak, "\r\n "); -/** The string used at the start of a time interval string. */ -_LIT8(KVersitTimePeriodBegin, "P"); -/** The string appended to the number of years when encoding a time interval. */ -_LIT8(KVersitTimePeriodYear, "Y"); -/** The string appended to the number of months when encoding a time interval. */ -_LIT8(KVersitTimePeriodMonth, "M"); -/** Not used. */ -_LIT8(KVersitTimePeriodWeek, "W"); //unused -/** The string appended to the number of days when encoding a time interval. */ -_LIT8(KVersitTimePeriodDay, "D"); -/** The string added before the time of day when encoding a Versit date/time. - -Also the string added before the time of day when encoding a time interval. */ -_LIT8(KVersitTimePeriodTime, "T"); -/** The string appended to the hour value when encoding a time interval. */ -_LIT8(KVersitTimePeriodHour, "H"); -/** The string appended to the minutes value when encoding a time interval. */ -_LIT8(KVersitTimePeriodMinute, "M"); -/** The string appended to the seconds value when encoding a time interval. */ -_LIT8(KVersitTimePeriodSecond, "S"); -/** The string appended to a date/time when encoding a Versit -date/time, if the value is in universal time. */ -_LIT8(KVersitTokenUniversalTime, "Z"); - -/** A colon character. */ -const TUint KVersitTokenColonVal =':'; -/** A semi-colon character. */ -const TUint KVersitTokenSemiColonVal =';'; -/** A backslash character. */ -const TUint KVersitTokenBackslashVal ='\\'; -/** An equals sign character. */ -const TUint KVersitTokenEqualsVal ='='; -/** A full stop character. */ -const TUint KVersitTokenPeriodVal ='.'; -/** A comma character. */ -const TUint KVersitTokenCommaVal =','; -/** A left square bracket character. */ -const TUint KVersitTokenLSquareBracketVal ='['; -/** A right square bracket character. */ -const TUint KVersitTokenRSquareBracketVal =']'; -/** A minus sign character. */ -const TUint KVersitTokenMinusVal ='-'; -/** A plus sign character. */ -const TUint KVersitTokenPlusVal ='+'; -/** A Yen character: the escape character for the 'ShiftJis' character set. */ -const TUint KVersitTokenYenVal =0xa5; -/** The character at the beginning of a time interval string. */ -const TUint KVersitTimePeriodBeginVal ='P'; -/** The character following the number of years in a time interval string. */ -const TUint KVersitTimePeriodYearVal ='Y'; -/** The character following the number of months in a time interval string. */ -const TUint KVersitTimePeriodMonthVal ='M'; -/** The character following the number of weeks in a time interval string. */ -const TUint KVersitTimePeriodWeekVal ='W'; -/** The character following the number of days in a time interval string. */ -const TUint KVersitTimePeriodDayVal ='D'; -/** The character preceding a length of day (hours,minutes and seconds) in a time -interval string. - -Also the character preceding the time of day in a date/time string. */ -const TUint KVersitTimePeriodTimeVal ='T'; -/** The character following the number of hours in a time interval string. */ -const TUint KVersitTimePeriodHourVal ='H'; -/** The character following the number of minutes in a time interval string. */ -const TUint KVersitTimePeriodMinuteVal ='M'; -/** The character following the number of seconds in a time interval string. */ -const TUint KVersitTimePeriodSecondVal ='S'; -/** The character at the end of a universal date/time string. */ -const TUint KVersitTokenUniversalTimeVal ='Z'; -/** The character at the start of a daily recurring entity string. */ -const TUint KVersitRecurrenceDailyVal ='D'; -/** The character at the start of a weekly recurring entity string. */ -const TUint KVersitRecurrenceWeeklyVal ='W'; -/** The character which precedes the number of recurrences, when specified, in -a recurring entity. */ -const TUint KVersitRecurrenceNumberOfVal ='#'; -/** The string at the beginning of a 'monthly by position' recurring entity -(see CVersitRecurrenceMonthlyByPos). Used when internalising. */ -_LIT(KVersitRecurrenceMonthlyByPos, "MP"); -/** Not used. */ -_LIT(KVersitRecurrenceMonthlyByDay, "MD"); -/** Not used. */ -_LIT(KVersitRecurrenceYearlyByMonth, "YM"); -/** The string at the beginning of a 'yearly by day' recurring entity, -(see CVersitRecurrenceYearlyByDay). Used when internalising. */ -_LIT(KVersitRecurrenceYearlyByDay, "YD"); -/** A string in the date list (if a date list is defined) of an entity -that recurs either weekly or 'monthly by position' on Mondays. Used when -internalising. */ -_LIT(KVersitRecurrenceMonday, "MO"); -/** A string in the date list (if a date list is defined) of an entity -that recurs either weekly or 'monthly by position' on Tuesdays. Used when internalising. */ -_LIT(KVersitRecurrenceTuesday, "TU"); -/** A string in the date list (if a date list is defined) of an entity -that recurs either weekly or 'monthly by position' on Wednesdays. Used when internalising. */ -_LIT(KVersitRecurrenceWednesday, "WE"); -/** A string in the date list (if a date list is defined) of an entity that -recurs either weekly or 'monthly by position' on Thursdays. Used when internalising. */ -_LIT(KVersitRecurrenceThursday, "TH"); -/** A string in the date list (if a date list is defined) of an entity that -recurs either weekly or 'monthly by position' on Fridays. Used when internalising. */ -_LIT(KVersitRecurrenceFriday, "FR"); -/** A string in the date list (if a date list is defined) of an entity that -recurs either weekly or 'monthly by position' on Saturdays. Used when internalising. */ -_LIT(KVersitRecurrenceSaturday, "SA"); -/** A string in the date list (if a date list is defined) of an entity that -recurs either weekly or 'monthly by position' on Sundays. Used when internalising. */ -_LIT(KVersitRecurrenceSunday, "SU"); -/** The string appended to the 'occurrence list' section of an entity that -recurs on the last day of the month. Used when internalising. */ -_LIT(KVersitRecurrenceLastDay, "LD"); - -/** The string used at the start of a daily recurring entity. */ -_LIT8(KVersitRecurrenceDaily, "D"); -/** The string used at the start of a weekly recurring entity. */ -_LIT8(KVersitRecurrenceWeekly, "W"); -/** The string appended just before the number of occurrences, when encoding a recurring -entity as a descriptor. */ -_LIT8(KVersitRecurrenceNumberOf, "#"); -/** The string used at the start of a 'monthly by position' recurring entity, -(see CVersitRecurrenceMonthlyByPos). Used when externalising. */ -_LIT8(KVersitRecurrenceMonthlyByPos8, "MP"); -/** Not used. */ -_LIT8(KVersitRecurrenceMonthlyByDay8, "MD"); -/** Not used. */ -_LIT8(KVersitRecurrenceYearlyByMonth8, "YM"); -/** The string used at the start of a 'yearly by day' recurring entity, -(see CVersitRecurrenceYearlyByDay). Used when externalising. */ -_LIT8(KVersitRecurrenceYearlyByDay8, "YD"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Mondays. -Used when externalising. */ -_LIT8(KVersitRecurrenceMonday8, "MO"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Tuesdays. -Used when externalising. */ -_LIT8(KVersitRecurrenceTuesday8, "TU"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Wednesdays. -Used when externalising. */ -_LIT8(KVersitRecurrenceWednesday8, "WE"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Thursdays. -Used when externalising. */ -_LIT8(KVersitRecurrenceThursday8, "TH"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Fridays. -Used when externalising. */ -_LIT8(KVersitRecurrenceFriday8, "FR"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Saturdays. -Used when externalising. */ -_LIT8(KVersitRecurrenceSaturday8, "SA"); -/** The string appended to the 'occurrence list' section of an entity that recurs on Sundays. -Used when externalising. */ -_LIT8(KVersitRecurrenceSunday8, "SU"); -/** The string appended to the 'occurrence list' section of an entity that recurs on the last day of -the month. Used when externalising. */ -_LIT8(KVersitRecurrenceLastDay8, "LD"); -/** The string at the start of an entity encoded in a stream. - -This is implemented as the name of a property, but this property is not stored in the entity's array -of properties. */ -_LIT8(KVersitTokenBEGIN, "BEGIN"); -/** The string at the start of an agent vCard entity encoded in a stream. - -The reason for needing a Unicode version, is that the agent vCard is held in a -property value in the parent vCard, and all property values are converted -to Unicode when they are internalised, in order to make them character set-independent. - -This is implemented as the name of a property, but this property is not stored in the -entity's array of properties. */ -_LIT(KVersitVarTokenBEGIN, "BEGIN"); -/** The string which follows the body of data of a vCard/vCalendar encoded in a stream. -It is followed only by the entity name. - -This is implemented as the name of a property, but this property is not stored in the -entity's array of properties. */ -_LIT8(KVersitTokenEND, "END"); -/** A carriage return and line feed */ -_LIT8(KVersitTokenCRLF, "\r\n"); // carriage return, line feed -/** A boolean true value. Not used. */ -_LIT8(KVersitTokenTRUE, "TRUE"); -/** A boolean true value. */ -_LIT(KVersitVarTokenTRUE, "TRUE"); -/** A boolean false value. Not used. */ -_LIT8(KVersitTokenFALSE, "FALSE"); -/** A boolean false value. */ -_LIT(KVersitVarTokenFALSE, "FALSE"); -/** The symbol added to the beginning of an unrecognised property name while -internalising from a stream. */ -_LIT8(KVersitTokenXDashEPOC, "X-EPOC"); -_LIT8(KVersitTokenXDash, "X-"); -/** An empty string. */ -_LIT8(KVersitTokenEmptyNarrow, ""); -/** An empty string. */ -_LIT(KVersitTokenEmpty, ""); - -//The following names should not be used, versit now uses CharConv character set names. -// params -_LIT8(KVersitTokenENCODING, "ENCODING"); -_LIT8(KVersitTokenBASE64, "BASE64"); -_LIT8(KVersitTokenQUOTEDPRINTABLE, "QUOTED-PRINTABLE"); -_LIT8(KVersitToken8BIT, "8-BIT"); -_LIT8(KVersitTokenCHARSET, "CHARSET"); -_LIT8(KVersitTokenUTF8, "UTF-8"); -_LIT8(KVersitTokenUTF7, "UTF-7"); -_LIT8(KVersitTokenISO1, "ISO-8859-1"); -_LIT8(KVersitTokenISO2, "ISO-8859-2"); -_LIT8(KVersitTokenISO4, "ISO-8859-4"); -_LIT8(KVersitTokenISO5, "ISO-8859-5"); -_LIT8(KVersitTokenISO7, "ISO-8859-7"); -_LIT8(KVersitTokenISO9, "ISO-8859-9"); -_LIT8(KVersitTokenTYPE, "TYPE"); //used for photo format type - -// parameters for the X-EPOCALARM -_LIT8(KVersitTokenVALUE, "VALUE"); -_LIT8(KVersitTokenCONTENTTYPE, "X-CONTENTTYPE"); -_LIT8(KVersitTokenINLINE, "INLINE"); -_LIT8(KVersitTokenBINARY, "BINARY"); - -// additional character sets -_LIT8(KVersitTokenISO3, "ISO-8859-3"); -_LIT8(KVersitTokenISO10, "ISO-8859-10"); -_LIT8(KVersitTokenShiftJIS, "SHIFT_JIS"); -_LIT8(KVersitTokenGB2312, "GB 2312-80"); //This and the following contain the wrong name. -_LIT8(KVersitTokenGBK, "GBK"); -_LIT8(KVersitTokenBIG5, "BIG5 level 1 and 2"); -_LIT8(KVersitTokenISO2022JP, "ISO 2022-JP"); -_LIT8(KVersitTokenEUCJP, "EUC-JP"); -_LIT8(KVersitTokenJIS, "JIS"); - - -// entities -_LIT8(KVersitTokenVCALENDAR, "VCALENDAR"); -_LIT8(KVersitTokenVCARD, "VCARD"); -_LIT(KVersitVarTokenVCALENDAR, "VCALENDAR"); -_LIT(KVersitVarTokenVCARD, "VCARD"); -_LIT(KVersitVarTokenVEVENT, "VEVENT"); -_LIT(KVersitVarTokenVTODO, "VTODO"); - -// properties -_LIT8(KVersitTokenXALARM, "X-EPOCALARM"); -_LIT8(KVersitTokenAALARM, "AALARM"); -_LIT8(KVersitTokenDALARM, "DALARM"); -_LIT8(KVersitTokenPALARM, "PALARM"); -_LIT8(KVersitTokenMALARM, "MALARM"); -_LIT8(KVersitTokenDAYLIGHT, "DAYLIGHT"); -_LIT(KVersitVarTokenDAYLIGHT, "DAYLIGHT"); -_LIT8(KVersitTokenVERSION, "VERSION"); -_LIT8(KVersitTokenCATEGORIES, "CATEGORIES"); -_LIT8(KVersitTokenRESOURCES, "RESOURCES"); -_LIT8(KVersitTokenDCREATED, "DCREATED"); -_LIT8(KVersitTokenDTSTART, "DTSTART"); -_LIT8(KVersitTokenDTEND, "DTEND"); -_LIT8(KVersitTokenLASTMODIFIED, "LAST-MODIFIED"); -_LIT8(KVersitTokenCOMPLETED, "COMPLETED"); -_LIT8(KVersitTokenDUE, "DUE"); -_LIT8(KVersitTokenEXDATE, "EXDATE"); -_LIT8(KVersitTokenEXRULE, "EXRULE"); -_LIT8(KVersitTokenRDATE, "RDATE"); -_LIT8(KVersitTokenRRULE, "RRULE"); -_LIT8(KVersitTokenRNUM, "RNUM"); -_LIT8(KVersitTokenPRIORITY, "PRIORITY"); -_LIT8(KVersitTokenSEQUENCE, "SEQUENCE"); -_LIT8(KVersitTokenTRANSP, "TRANSP"); -_LIT8(KVersitTokenBDAY, "BDAY"); -_LIT8(KVersitTokenAGENT, "AGENT"); -_LIT8(KVersitTokenLABEL, "LABEL"); -_LIT8(KVersitTokenPHOTO, "PHOTO"); -_LIT8(KVersitTokenEMAIL, "EMAIL"); -_LIT8(KVersitTokenINTERNET, "INTERNET"); -_LIT8(KVersitTokenTITLE, "TITLE"); -_LIT8(KVersitTokenROLE, "ROLE"); -_LIT8(KVersitTokenLOGO, "LOGO"); -_LIT8(KVersitTokenNOTE, "NOTE"); -_LIT8(KVersitTokenSOUND, "SOUND"); -_LIT8(KVersitTokenMAILER, "MAILER"); -_LIT8(KVersitTokenPRODID, "PRODID"); -_LIT8(KVersitTokenATTACH, "ATTACH"); -_LIT8(KVersitTokenATTENDEE, "ATTENDEE"); -_LIT8(KVersitTokenCLASS, "CLASS"); -_LIT8(KVersitTokenDESCRIPTION, "DESCRIPTION"); -_LIT8(KVersitTokenLOCATION, "LOCATION"); -_LIT8(KVersitTokenRELATEDTO, "RELATED-TO"); -_LIT8(KVersitTokenSTATUS, "STATUS"); -_LIT8(KVersitTokenSUMMARY, "SUMMARY"); -_LIT8(KVersitTokenN, "N"); -_LIT8(KVersitTokenTZ, "TZ"); -_LIT8(KVersitTokenADR, "ADR"); -_LIT8(KVersitTokenORG, "ORG"); -_LIT8(KVersitTokenREV, "REV"); -_LIT8(KVersitTokenFN, "FN"); -_LIT8(KVersitTokenTEL, "TEL"); -_LIT8(KVersitTokenURL, "URL"); -_LIT8(KVersitTokenGEO, "GEO"); -_LIT8(KVersitTokenUID, "UID"); -_LIT8(KVersitTokenKEY, "KEY"); -_LIT8(KVersitTokenSECONDNAME, "X-EPOCSECONDNAME"); -_LIT8(KVersitTokenXMETHOD, "X-METHOD"); // For Group Scheduling -_LIT8(KVersitTokenXRECURRENCEID, "X-RECURRENCE-ID"); // For Group Scheduling -_LIT8(KVersitTokenXLOCALUID, "X-SYMBIAN-LUID"); -_LIT8(KVersitTokenXDTSTAMP, "X-SYMBIAN-DTSTAMP"); -_LIT(KVersitVarTokenINTERNET, "INTERNET"); //Used by Jave Phone and not by versit -_LIT8(KVersitTokenAssistant, "X-ASSISTANT"); -_LIT8(KVersitTokenAssistantTel, "X-ASSISTANT-TEL"); -_LIT8(KVersitTokenAnniversary, "X-ANNIVERSARY"); -_LIT8(KVersitTokenSpouse, "X-SPOUSE"); -_LIT8(KVersitTokenChildren, "X-CHILDREN"); -_LIT8(KVersitTokenClass, "X-CLASS"); -_LIT8(KVersitAttachLabel, "X-NAME"); -_LIT8(KVersitAttachMimeType, "X-FMTTYPE"); -_LIT8(KVersitXUserIntType, "X-SYMBIAN-USERINT"); - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vtzrules.h --- a/epoc32/include/vtzrules.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,187 +0,0 @@ -// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VTZRULES_H__ -#define __VTZRULES_H__ - -#include -#include -#include -#include - -class CVTzActualisedRules; -class TVTzActualisedRule; - -const TInt KVTzRulesGranularity = 4; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Time zone rules - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/** -Encapsulates one time zone rule. - -@publishedAll -@released -*/ -class TTzRule - { -public: - IMPORT_C TTzRule(TInt16 aFromYear, TInt16 aToYear, TInt16 aOldOffset, TInt16 aNewOffset, TMonth aMonth, TTzRuleDay aDayRule, - TUint8 aDayOfMonth, TUint8 aDayOfWeek, TTzTimeReference aTimeReference, TUint16 aTimeOfChange); - IMPORT_C TTzRule(); - IMPORT_C TTzRule(const TTzRule& aRule); - IMPORT_C TTzRule(TTimeWithReference aFromYear, TTimeWithReference aToYear, TInt16 aOldOffset, TInt16 aNewOffset, TMonth aMonth, TTzRuleDay aDayRule, - TUint8 aDayOfMonth, TUint8 aDayOfWeek, TTzTimeReference aTimeReference, TUint16 aTimeOfChange); - - - void ExternalizeL(RWriteStream& aStream) const; - void InternalizeL(RReadStream& aStream); - TBool RuleApplies(const TTime& aStart, const TTime& aEnd) const; - - IMPORT_C TVTzActualisedRule Actualise(TInt aYear) const; // deprecated, replace by the L version - IMPORT_C TVTzActualisedRule ActualiseL(TInt aYear) const; - -public: - TTimeWithReference iFrom; // first date the rule applies - TTimeWithReference iTo; // last date the rule applies - TInt16 iOldLocalTimeOffset; // local time offset (in minutes) BEFORE the change (local time = UTC + DST) - TInt16 iNewLocalTimeOffset; // local time offset (in minutes) AFTER the change - TMonth iMonth; - TTzRuleDay iDayRule; // format in which the rule is expressed - TUint8 iDayOfMonth; - TUint8 iDayOfWeek; - TTzTimeReference iTimeReference; - TUint16 iTimeOfChange; // number of minutes since midnight - TUint32 iReserved; - }; - - - -/** -Encapsulates a collection of time zone rules, and includes the period covered by the rules -and the standard time offset at the start of that period. - -@publishedAll -@released -*/ -class CTzRules : public CBase - { -public: - IMPORT_C static CTzRules* NewL(); - IMPORT_C static CTzRules* NewL(TInt aStartYear, TInt aEndYear); - IMPORT_C static CTzRules* NewL(RReadStream& aStream); - IMPORT_C ~CTzRules(); - IMPORT_C TBool RulesApply(const TTime& aTime) const; - IMPORT_C void AddRuleL(TTzRule aRule); - IMPORT_C void RemoveRule(TInt aIndex); - IMPORT_C TTzRule& operator[](TInt aIndex); - IMPORT_C TInt Count() const; - IMPORT_C TInt StartYear() const; - IMPORT_C TInt EndYear() const; - IMPORT_C void SetStartYear(TInt aYear); - IMPORT_C void SetEndYear(TInt aYear); - IMPORT_C void ExternalizeL(RWriteStream& aStream) const; - IMPORT_C void InternalizeL(RReadStream& aStream); - IMPORT_C TInt InitialStdTimeOffset() const; - IMPORT_C void SetInitialStdTimeOffset(TInt aOffset); - IMPORT_C void ConvertToUtcL(TTime& aLocalTime) const; - IMPORT_C void ConvertToLocalL(TTime& aUtcTime) const; - IMPORT_C CTzRules* CloneL() const; - IMPORT_C TBool IsEqualTo(const CTzRules& aRules) const; - - IMPORT_C void GetActualisedRulesL(CVTzActualisedRules& aActRules) const; - IMPORT_C TInt ConvertTime(CVTzActualisedRules& aRules, TTime& aTime, TTzTimeReference aTimerRef) const; - -private: - CTzRules(); - CTzRules(TInt aStartYear, TInt aEndYear); - void GetActualisedRulesL(CVTzActualisedRules& aActRules, TInt aYear) const; - TInt GetOffsetL(const TTime& aTime, TTzTimeReference aTimeRef) const; - TInt AddActualisedRulesL(CVTzActualisedRules& aActRules, TInt aYear) const; - TInt CompareTimesWithRef(TTime aTimeA, TTzTimeReference aTimeARef, - TTime aTimeB, TTzTimeReference aTimeBRef, TInt aStdOffset, TInt aWallOffset, - TTimeIntervalMinutes* aMinutesDifference) const; - -private: - TInt16 iStartYear; - TInt16 iEndYear; - RArray iRules; - TInt iInitialStdTimeOffset; - }; - - - -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * - * Actualised time zone rules - * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -/** -Encapsulates a local time change. - -@publishedAll -@released -*/ -class TVTzActualisedRule - { -public: - IMPORT_C TVTzActualisedRule(TTime aTimeOfChange, TInt aNewOffset, TTzTimeReference aTimeReference); - IMPORT_C TVTzActualisedRule(); - - IMPORT_C void operator=(TVTzActualisedRule aRule); - static TInt Order(const TVTzActualisedRule& aLeft, const TVTzActualisedRule& aRight); - -public: - TTime iTimeOfChange; - TInt32 iNewOffset; - TTzTimeReference iTimeReference; - }; - - -/** -Encapsulates a collection of the local time changes occurring during a range of years. - -@publishedAll -@released -*/ -NONSHARABLE_CLASS(CVTzActualisedRules) : public CBase - { -public: - IMPORT_C static CVTzActualisedRules* NewL(TInt aStartYear, TInt aEndYear); - IMPORT_C ~CVTzActualisedRules(); - IMPORT_C void AddRuleL(const TVTzActualisedRule& aRule); - IMPORT_C TInt Count() const; - IMPORT_C TVTzActualisedRule& operator[](TInt aIndex) const; - - IMPORT_C TInt StartYear() const; - IMPORT_C TInt EndYear() const; - - IMPORT_C TBool IsDaylightSavingOn(TTime& aTime) const; - IMPORT_C TInt GetOffsetFromRuleL(const TTime& aTime, TTzTimeReference aTimeRef) const; - -private: - CVTzActualisedRules(TInt aStartYear, TInt aEndYear); - CVTzActualisedRules(); - TInt CompareTimesWithRef(TTime aRolloverTime, TTzTimeReference aTimeRefRollover, - TTime aUserTime, TTzTimeReference aTimeRefUser, - TInt aOldWallOffset, TTimeIntervalMinutes& aDiffMinutes) const; - -private: - TInt32 iStartYear; // years covered by - TInt32 iEndYear; // the actualised rules - RArray iRules; - }; - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vuid.h --- a/epoc32/include/vuid.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,156 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file - @publishedAll - @released -*/ - -#ifndef __VUID_H__ -#define __VUID_H__ - -/** The default size for 8-bit buffers used in Versit. */ -#define KVersitDefaultBufferSize 32 -/** The maximum length for a Versit date/time buffer. */ -#define KVersitMaxDateTimeLength 16 -/** Not used. */ -#define KVersitMaxVersionLength 16 -_LIT8(KVersitQuestionMark, "?"); - -// -// Uid's -// 268440459-268440508 have been allocated to Versit initially -// - -/** The UID for a KVersitTokenBEGIN property. - -Used in vCards and vCalendars. */ -#define KVersitTokenBeginUid 268440459 -/** The UID for a KVersitTokenEND property. - -Used in vCards and vCalendars. */ -#define KVersitTokenEndUid 268440460 -/** The UID for a property with an unrecognised name. */ -#define KVersitTokenUnknownUid 268440461 -/** The UID for a version property. - -Used in vCards and vCalendars. */ -#define KVersitTokenVersionUid 270490587 -/** The UID for an agent property. - -Used in vCards. */ -#define KVCardPropertyAgentUid 268440471 -/** The UID for a SOUND property. - -Used in vCards. */ -#define KVCardPropertySoundUid 270537213 -/** The UID for an alarm property. - -Used in vCalendars and associated with a vEvent or vToDo. */ -#define KVCalPropertyAlarmUid 268440472 -/** The UID for a vEvent entity. */ -#define KVCalEntityUidVEvent 268440473 -/** The UID for a vTodo entity. */ -#define KVCalEntityUidVTodo 268440474 -/** A grouped property UID. This is used to determine whether a property -is grouped. */ -#define KVersitGroupedPropertyUid 268440475 -/** The UID for a time zone property. - -Used in vCards and vCalendars. */ -#define KVersitPropertyTimeZoneUid 268440476 -/** The UID for a date property. */ -#define KVersitPropertyDateUid 268440477 -/** A time property UID. */ -#define KVersitTimePropertyUid 268440478 - -/** The UID for an rich (extended) alarm property. - -Used in vCalendars and associated with a vEvent or vToDo. */ -#define KVCalPropertyExtendedAlarmUid 268440479 - - - -/** Used by the contacts database to identify a vCard. */ -#define KVersitEntityUidVCard 268440483 //Used by cntmodel and not by versit -/** The UID for a recurrence property. */ -#define KVCalPropertyRecurrenceUid 268440484 -/** The UID for a daylight savings property. */ -#define KVersitPropertyDaylightUid 268440485 -/** The UID for a character set property parameter. */ -#define KVersitParamCharsetUid 268440488 - -/** The UID for a quoted printable to text converter. */ -#define KQuotedPrintableToTextConverter 268441637 -/** The UID for a text to quoted printable converter. */ -#define KTextToQuotedPrintableConverter 268441638 -/** The UID for a base 64 to text converter. */ -#define KBase64ToTextConverter 268440005 -/** The UID for a text to base 64 converter. */ -#define KTextToBase64Converter 268437281 - -/** The UID for a character encoding property parameter. */ -#define KVersitParamEncodingUid 268440463 -/** The UID for a QUOTED-PRINTABLE property parameter. */ -#define KVersitParamEncodingQuotedPrintableUid 268440464 -/** The UID for a BASE64 property parameter. */ -#define KVersitParamEncodingBase64Uid 268440465 - - -/* - * These are versit data-type uids for property values. They - * are versit-internal. - */ - -/** The UID for a heap descriptor property. */ -#define KVersitPropertyHBufCUid 268440466 -/** The UID for a binary property. - -Used in vCards for logos and photos. */ -#define KVersitPropertyBinaryUid 268470833 -/** The UID for a descriptor array property. - -Used in vCards and vCalendars. */ -#define KVersitPropertyCDesCArrayUid 268440467 -/** The UID for a multiple date/time property. - -Used in vCalendars. */ -#define KVersitPropertyMultiDateTimeUid 268440468 -/** The UID for a date/time property. - -Used in vCards and vCalendars. */ -#define KVersitPropertyDateTimeUid 268440469 -/** The UID for an integer property. - -Used in vCalendars, e.g. for priorities and sequences. */ -#define KVersitPropertyIntUid 268440470 - - -/* - * The following is a list of UIDs that were used by versit but are not now - */ -//UID's for tokens -//268440462 -//UID's used for character sets -//268440489, 268440499-506, 268457255-6, 268457654-8, 268478097 -//UID's used for Quoted Printable with a character set -//268440486, 268440490-8, 268457253-4, 268457801-5 -//UID's used for Base64 with a character set -//268440480-82, 268440487, 268440508, 268456960, 268457257-62, 268470904-6, 268479493 - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vutil.h --- a/epoc32/include/vutil.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,189 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VUTIL_H__ -#define __VUTIL_H__ - -// System includes -#ifndef __E32BASE_H__ -#include -#endif -#ifndef __F32FILE_H__ -#include -#endif -#ifndef __CHARCONV_H__ -#include -#endif - - -class Versit -/** Provides Versit-specific encoding and character set identifiers. -@publishedAll -@released -*/ - { -public: - /** Versit-specific encoding identifiers. - @publishedAll - @released - */ - enum TVersitEncoding - { - /** No encoding. */ - ENoEncoding, - /** Quoted Printable encoding. */ - EQuotedPrintableEncoding, - /** Base 64 encoding. */ - EBase64Encoding, - - // Used internally - not to be used by versit clients - /** Eight bit encoding. */ - EEightBitEncoding - }; - - /** Versit-specific character set identifiers. These are used in the Versit API - to represent foreign (non-Unicode) character sets for vCard and vCalendar - properties. - @publishedAll - @released */ - enum TVersitCharSet - { - /** Unknown character set. */ - EUnknownCharSet, - /** ASCII (7-bit).*/ - EUSAsciiCharSet, - /** UTF-8 Unicode transformation format. */ - EUTF8CharSet, - /** UTF-7 Unicode transformation format. */ - EUTF7CharSet, - /** ISO 8859-1 (8-bit). */ - EISO88591CharSet, - /** ISO 8859-2 (8-bit). */ - EISO88592CharSet, - /** ISO 8859-4 (8-bit). */ - EISO88594CharSet, - /** ISO 8859-5 (8-bit). */ - EISO88595CharSet, - /** ISO 8859-7 (8-bit). */ - EISO88597CharSet, - /** ISO 8859-9 (8-bit). */ - EISO88599CharSet, - /** ISO 8859-3 (8-bit). */ - EISO88593CharSet, - /** ISO 8859-10 (8-bit). */ - EISO885910CharSet, - /** GB 2312. */ - EGB231280CharSet, - /** GBK. */ - EGBKCharSet, - /** Big 5. */ - EBIG5CharSet, - /** ISO-2022-JP. */ - EISO2022JPCharSet, - /** EUC-JP. */ - EEUCJPCharSet, - /** Shift JIS. */ - EShiftJISCharSet, - /** JIS. */ - EJISCharSet, - /** Must be first character set. */ - EFirstCharSet=EUSAsciiCharSet, - /** Must be last character set. */ - ELastCharSet=EJISCharSet - }; - - class TEncodingAndCharset - /** Specifies an encoding, a character set and a character set converter. - @publishedAll - @released */ - { - public: - inline TEncodingAndCharset(TVersitEncoding aEncoding,TUint aCharSetId) :iEncoding(aEncoding), iCharSetId(aCharSetId) - /** The C++ constructor initialises the encoding and character set. - - @param aEncoding An encoding. - @param aCharSetId A character set. */ - {} - public: - /** An encoding. */ - TVersitEncoding iEncoding; - /** A character set. */ - TUint iCharSetId; - /** A character set converter. */ - CCnvCharacterSetConverter* iConverter; - }; - }; - -class CVersitUnicodeUtils : public CBase -/** Versit Unicode utilities class. - -This enables conversion between Unicode and ISO character sets. -@publishedAll -@released -*/ - { -public: - IMPORT_C ~CVersitUnicodeUtils(); - IMPORT_C HBufC8* NarrowL(const TDesC& aDesC); - IMPORT_C HBufC8* NarrowLC(const TDesC& aDesC); - IMPORT_C HBufC* WidenL(const TDesC8& aDesC8); - IMPORT_C HBufC* WidenLC(const TDesC8& aDesC8); - IMPORT_C void CreateConverterL(); - CCnvCharacterSetConverter::TAvailability SetCurrentCharSetL(TUint aCharacterSet); - -public: - inline CCnvCharacterSetConverter& CharacterSetConverter() const; - inline TUint ConvertStandardNameL(const TDesC8& aStandardNameOfCharacterSet); - inline HBufC8* StandardNameL(TUint aCharSetId); - TUint AutoDetectCharSetL(const TDesC8& aSample,const CArrayFix* aAutoDetectCharSets); - -private: - RFs iFsSession; - CCnvCharacterSetConverter* iUnicodeConverter; - TBool iFsConnected; - TUint iCurrentConverterCharSet; - CArrayFix* iCharSetsAvailable; - }; - - -inline CCnvCharacterSetConverter& CVersitUnicodeUtils::CharacterSetConverter() const -/** Returns the character set converter created in CreateConverterL(). - -@return A character set converter. */ - { - return *iUnicodeConverter; - } -inline TUint CVersitUnicodeUtils::ConvertStandardNameL(const TDesC8& aStandardNameOfCharacterSet) -/** Returns the Symbian OS UID for a character set from its Internet-standard -name. - -@param aStandardNameOfCharacterSet Internet-standard name of a character set -encoded in 8-bit ASCII. -@return The Symbian OS UID of the specified character set. If the name is not -known, zero is returned. */ - { - return iUnicodeConverter->ConvertStandardNameOfCharacterSetToIdentifierL(aStandardNameOfCharacterSet,iFsSession); - } -inline HBufC8* CVersitUnicodeUtils::StandardNameL(TUint aCharSetId) -/** Returns the Internet-standard name of a character set, from its Symbian OS UID. - -@param aCharSetId The Symbian OS UID of a character set. -@return The Internet-standard name or MIME name of the specified character -set, or NULL if the UID is not known. The name is encoded in 8-bit ASCII. */ - { - return iUnicodeConverter->ConvertCharacterSetIdentifierToStandardNameL(aCharSetId,iFsSession); - } - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/vwsdef.h --- a/epoc32/include/vwsdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,277 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __VWSDEF_H__ -#define __VWSDEF_H__ - -#include - -/** -@publishedPartner -*/ -#define KUidCustomCrossCheckValue 0x80282748 - -/** -@publishedPartner -*/ -const TUid KUidCustomCrossCheck={KUidCustomCrossCheckValue}; - -class TVwsViewId -/** Identifies an application view using two unique identifiers (UIDs): a view -UID and an application UID. - -The application UID is required so that the application associated with the view -can be started if it is not already running. - -@publishedAll -@released */ - { -public: - inline TVwsViewId(); - inline TVwsViewId(const TVwsViewId& aUid); - inline TVwsViewId(TUid aAppUid,TUid aViewUid); - inline TBool operator==(const TVwsViewId& aUid) const; - inline TBool operator!=(const TVwsViewId& aUid) const; -public: - /** A unique application ID (or application UID). - - Uniquely identifies the application associated with the view. */ - TUid iAppUid; - /** A unique view ID (or view UID). - - Uniquely identifies the view. */ - TUid iViewUid; - }; - -/** @internalTechnology */ -#define KNullViewId TVwsViewId(KNullUid,KNullUid) - -/** @internalTechnology */ -const TInt KErrViewWrongMode=1; // !!! Wrong error code - should be -ve & unique - - -class TVwsViewIdAndMessage -/** -The TVwsViewIdAndMessage class identifies a view and encapsulates a message to -be read by the view when it is activated. - -@publishedAll -@released -*/ - { -public: - inline TVwsViewIdAndMessage(); - inline TVwsViewIdAndMessage(const TVwsViewId& aId); - inline TVwsViewIdAndMessage(const TVwsViewId& aId,TUid aCustomMessageId,const TDesC8& aCustomMessage); - inline TVwsViewIdAndMessage& operator=(const TVwsViewIdAndMessage& aVwsViewIdAndMessage); -public: - TVwsViewId iViewId; - TUid iCustomMessageId; - TInt iCustomMessageLength; - TPtrC8 iCustomMessage; - }; - - - -class TVwsViewEvent -/** -The TVwsViewEvent class encapsulates the attributes of a view server event. -These are: -- The event type -- The view ids of the two views associated with the event -- The attributes of any message which can go with the event. - -@publishedPartner -@released -*/ - { -public: - enum TVwsViewEventType - { - EVwsActivateView, - EVwsDeactivateView, - EVwsScreenDeviceChanged, - EVwsDeactivationNotification, - EVwsActivationNotification, - EVwsDeactivateViewDifferentInstance - }; -public: - inline TVwsViewEvent(); - inline TVwsViewEvent(TVwsViewEventType aEventType); - inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId); - inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId); - inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId,TUid aCustomMessageId,TInt aCustomMessageLength); -public: - /** - The event type. - */ - TVwsViewEventType iEventType; - /** - The first view id associated with the event. This has a different meaning for each of the event types: - - For ActivateView events, it is the view to activate - - For DeactivateView events, it is the view to deactivate - - For ScreenDeviceChange events, it is the id of the currently active view - - For ActivationNotification events, it is the id of the activated view - - For DeactivationNotification events, it is the id of the deactivated view - */ - TVwsViewId iViewOneId; - /** - The second view id associated with the event. This has a different meaning for each of the event types: - - For ActivateView events, it is the view that will be deactivated - - For DeactivateView events, it is the view that has been activated - - For ScreenDeviceChange events, it is unused - - For ActivationNotification events, it is the view that will be deactivated - - For DeactivationNotification events, it is the id of the view that has been activated - */ - TVwsViewId iViewTwoId; - /** - The type of message being passed in the custom message buffer - */ - TUid iCustomMessageId; - /** - The length of the custom message being held by the server. - To retrieve the message itself from the server, a buffer of this length must be allocated - */ - TInt iCustomMessageLength; - }; - - -// -// Typedefs. -// -/** @internalComponent */ -typedef TPckgBuf TVwsViewIdAndMessageBuf; - -/** @internalComponent */ -typedef TPckgBuf TVwsViewEventBuf; - - -// -// Inlines -// - -inline TVwsViewId::TVwsViewId() -/** Constructs a TVwsViewId object, and initialises both the application UID and -the view UID to NULL. */ - : iAppUid(KNullUid), iViewUid(KNullUid) {} - -inline TVwsViewId::TVwsViewId(const TVwsViewId& aUid) -/** Constructs a new TVwsViewId object from an existing one. This simply performs -a member-wise copy, each member variable of the passed in object is individually -copied to the corresponding member variable of the new object. - -@param aUid A reference to the TVwsViewId object to be copied. */ - : iAppUid(aUid.iAppUid), iViewUid(aUid.iViewUid) {} - -inline TVwsViewId::TVwsViewId(TUid aAppUid,TUid aViewUid) -/** Constructs a TVwsViewId object with the specified application UID and view UID. - -@param aAppUid The application UID. -@param aViewUid The view UID. */ - : iAppUid(aAppUid), iViewUid(aViewUid) {} - -inline TBool TVwsViewId::operator==(const TVwsViewId& aUid) const -/** Checks whether the TVwsViewId object being operated upon and the TVwsViewId -object specified are the same. - -Returns true if both application UIDs and both view UIDs are the same, otherwise -returns false. - -@param aUid A reference to a TVwsViewId object. -@return ETrue if objects are the same, EFalse otherwise. */ - { - return (aUid.iAppUid==iAppUid && aUid.iViewUid==iViewUid); - } - -inline TBool TVwsViewId::operator!=(const TVwsViewId& aUid) const -/** Checks whether the TVwsViewId object being operated upon and the TVwsViewId -object specified are different. - -Returns true if either the application UIDs or view UIDs are different, otherwise -returns false. - -@param aUid A reference to a TVwsViewId object. -@return ETrue if objects are different, EFalse otherwise. */ - { - return (aUid.iAppUid!=iAppUid || aUid.iViewUid!=iViewUid); - } - - -/** Constructs a TVwsViewIdAndMessage object, and initialises it to contain a -NULL view UID and an empty message */ -inline TVwsViewIdAndMessage::TVwsViewIdAndMessage() - : iViewId(TVwsViewId()), iCustomMessageLength(0) - { - iCustomMessageId.iUid=0; - iCustomMessage.Set(KNullDesC8); - } - -/** Constructs a TVwsViewIdAndMessage object, and initialises it to contain the -specified view UID and an empty message - -@param aId A reference to the TVwsViewId to be used -*/ -inline TVwsViewIdAndMessage::TVwsViewIdAndMessage(const TVwsViewId& aId) - : iViewId(aId), iCustomMessageLength(0) - { - iCustomMessageId.iUid=0; - iCustomMessage.Set(KNullDesC8); - } - -/** Constructs a TVwsViewIdAndMessage object, and initialises it to contain the -specified view UID and the specified message - -@param aId A reference to the TVwsViewId to be used -@param aCustomMessageId The message Id to use -@param aCustomMessage A narrow descriptor containing the message -*/ -inline TVwsViewIdAndMessage::TVwsViewIdAndMessage(const TVwsViewId& aId,TUid aCustomMessageId,const TDesC8& aCustomMessage) - : iViewId(aId), iCustomMessageId(aCustomMessageId) - { - iCustomMessageLength=aCustomMessage.Length(); - iCustomMessage.Set(aCustomMessage); - } - -/** Copies the contents of another TVwsViewIdAndMessage into this one - -@param aVwsViewIdAndMessage A reference to the TVwsViewIdAndMessage to be copied - -@return A reference to the object being copied into -*/ -inline TVwsViewIdAndMessage& TVwsViewIdAndMessage::operator=(const TVwsViewIdAndMessage& aVwsViewIdAndMessage) - { - iViewId=aVwsViewIdAndMessage.iViewId; - iCustomMessageId=aVwsViewIdAndMessage.iCustomMessageId; - iCustomMessageLength=aVwsViewIdAndMessage.iCustomMessage.Length(); - iCustomMessage.Set(aVwsViewIdAndMessage.iCustomMessage); - return(*this); - } - -inline TVwsViewEvent::TVwsViewEvent() {} - -inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType) - : iEventType(aEventType),iViewOneId(),iViewTwoId(),iCustomMessageId(KNullUid),iCustomMessageLength(0) {} - -inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId) - : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(),iCustomMessageId(KNullUid),iCustomMessageLength(0) {} - -inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId) - : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(aViewTwoId),iCustomMessageId(KNullUid),iCustomMessageLength(0) {} - -inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId,TUid aCustomMessageId,TInt aCustomMessageLength) - : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(aViewTwoId),iCustomMessageId(aCustomMessageId),iCustomMessageLength(aCustomMessageLength) {} - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/wapattrdf.h --- a/epoc32/include/wapattrdf.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,49 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// WAP Attribute Std -// Standard attribute keys -// -// - -#ifndef __WAPATTRIBUTESTD_H -#define __WAPATTRIBUTESTD_H - -// Document node -// -_LIT(KWAPNodeMimeTypeAttributeName,"KWapAttrNodeMimeType"); // node mime type -_LIT(KWAPNodeContentEncodingTypeAttributeName,"KWapAttrNodeContentEncodingType"); // node content encoding type -_LIT(KWAPDocumentNodeURLAttributeName,"KWapAttrNodeURL"); // URL of node - - -// Data Storage node -// -_LIT(KWAPNodeErrorCodeAttributeName,"KWapAttrNodeErrorCode"); // node error code - -// Image nodes -// -_LIT(KWAPBitmapHandleAttributeName,"KWapAttrImgBmpHnd"); // standard bitmap handle -_LIT(KWAPZoomedBitmapHandleAttributeName,"KWapAttrImgZoomBmpHnd"); // zoomed bitmap handle -_LIT(KWAPZoomedBitmapZoomFactorAttributeName,"KWapAttrImgZoomFactor"); // zoomed bitmap zoom factor - -// Document root node -// -_LIT(KWAPDocumentValidStatusAttributeName,"KWapAttrDocValid"); // set if the doucment has been validated -_LIT(KWAPDocumentCompletedAttributeName,"KWapAttrDocCompleted"); // set if the doucment is complete -_LIT(KWAPDocumentWmlVersion,"KWapAAttrWmlVersion"); //1.1 or 1.2 - -// Script Node -_LIT(KWAPScriptReferingCardUrl, "KWapAttrReferingUrl"); // URL to the card that refered to this script - - -#endif // __WAPATTRIBUTESTD_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/wapengstd.h --- a/epoc32/include/wapengstd.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,278 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// WAP Engine Standard -// Standard status codes used by data handlers and the WAP engine. Note that some are exact duplicates of error -// codes from sub-components (e.g. HTTP) or from components outside of the WAP Browser (e.g. NetDial, ETEL) -// -// - -#ifndef __WAPENGINESTANDARD_H__ -#define __WAPENGINESTANDARD_H__ - -// System includes -// -#include - -// -// Status code offset for HTTP status values and stack connection progress -// e.g. HTTP/200 becomes KHttpPluginStatusBase + 200 -// -const TInt KHttpPluginStatusBase = 1000; -const TInt KWapDocumentLoadStatusBase = 2000; - -typedef enum TWapEngineStatus -{ - // DRAFT - // Some of these errors MAY be handled in the control level. - - // - // HTTP/1.1 Status/Error codes from 40x and 50x series - // - EWapErrHttp_505_HTTPVersionNotSupported = -20505, // has to be 1.1 at the client end; talking to a 1.0 origin server might cause this? Or the client erroneously claiming to do HTTP/3 or something. - EWapErrHttp_504_GatewayTimeout = -20504, // not sure if this refers to Gateway in the WAP sense - EWapErrHttp_503_ServiceUnavailable = -20503, // ? - EWapErrHttp_502_BadGateway = -20502, // could occur with a badly configured WAP GW = e.g. the gateway uses a proxy which cannot be reached = there should probably be some indication to the user. - EWapErrHttp_501_NotImplemented = -20501, // duh. Bad server. - EWapErrHttp_500_InternalServerError = -20500, // bad news again; this one can either come from the origin server _or_ from the WAP GW, which may convert a different server code into 500 if the WML is bad. Report. - - EWapErrHttp_415_UnsupportedMediaType = -20415, // see RFC2068 - EWapErrHttp_414_RequestUriTooLong = -20414, // report to user - EWapErrHttp_413_RequestEntityTooLarge = -20413, // see RFC2068 - EWapErrHttp_412_PreconditionFailed = -20412, // see RFC2068 - EWapErrHttp_411_LengthRequired = -20411, // error in our use of HTTP if this occurs. - EWapErrHttp_410_Gone = -20410, // like 404, except more definite! report to user. - EWapErrHttp_409_Conflict = -20409, // see RFC2068 - EWapErrHttp_408_RequestTimeout = -20408, // dealt with in HTTP, shouldn't have to be presented to the user - EWapErrHttp_407_ProxyAuthenticationRequired = -20407,// - not sure, we don't correctly deal with this at the moment. Is it needed? - EWapErrHttp_406_NotAcceptable = -20406, // this is returned if the resource requested is not acceptable to the client according to its own accept- strings in the HTTP request header. e.g. accept-charset, accept (content types). accept-language. This shows that we're getting our headers wrong, so should be considered a software error and not be reported. I think. - EWapErrHttp_405_MethodNotAllowed = -20405, // e.g. attempt to POST to a URL that is not appropriate for POSTing. Probably a result of poor site design? - EWapErrHttp_404_NotFound = -20404, // document missing on origin server. This one would be a good one to report to the user since it happens frequently with badly maintained sites! - EWapErrHttp_403_Forbidden = -20403, // the server HTTPD does refuses to return the requested document, for internal reasons not necessarily disclosed to the client - EWapErrHttp_402_PaymentRequired = -20402, // I don't think this is used in our world of e-commerce. RFC2068 says it is reserved for future use. -// -// // NOTE THAT HTTP/401 IS NOT TREATED AS AN ERROR, BECAUSE IT IS -// // FULLY HANDLED IN HTTP - see HTTP status codes below -// - EWapErrHttp_400_BadRequest = -20400, // client sent a request with a malformed syntax (in HTTP request headers) = I assume this indicates a programming error on our part ,and should not happen, or be reported? - - // - // HTTP Data Provider plug-in 'inherited' error codes - // - EWapErrHttpReceivingErrorDeck = -20014, // Could not find document, so receiving an error deck - EWapErrHttpCancellationAbort = -20013, // Error code for leave when cancellation has occured during RunL() - EWapErrHttpGatewaySessionDisconnect = -20012, // The session was disconnected by the WAP Gateway - EWapErrHttpGatewayTransactionAbort = -20011, // A transaction was aborted by the gateway or the stack - EWapErrHttpGatewayCannotBeReached = -20010, // A session could not be established with the WAP Gateway - // Note that EWapErrHttpAuthenticationFailed and EWapErrHttpAuthenticationCancelled are now information status codes - see below. - EWapErrHttpWtlsCipherRejected = -20009, // The user rejected the cipher strength negotiated in WTLS - EWapErrHttpWtlsServerCertRejected = -20008, // The user rejected the certificate from the WAP GW - EWapErrHttpWtlsBadServerCert = -20007, // WTLS rejected the certificate obtained from the WAP GW - EWapErrHttpWtlsConfigFailed = -20006, // Failed to configure the WTLS layer of the WAP Stack - EWapErrHttpNetDialSetupFailed = -20005, // Failed to configure Net Dial - EWapErrHttpWapAPReadFailure = -20004, // An error occurred when reading the WAP AP from CommsDB - EWapErrHttpUnsupportedMethod = -20003, // An HTTP method was specified that is not supported - EWapErrHttpCannotFindPlugin = -20002, // Plug-in server failed to create an HTTP plugin - EWapErrHttpCannotFindServer = -20001, // URL specified a non-existent or inaccessible domain - EWapErrHttpGeneralError = -20000, // Unspecified error condition - - // - // XMLLIB ERROR CODES - // - - // XmlLib -#define XmlLibErrorBase -13200 - EWapErrXmlLibInvalidDocument = XmlLibErrorBase, - EWapErrXmlLibDocumentBuffered = XmlLibErrorBase - 1, - EWapErrXmlLibDocumentAlreadyValid = XmlLibErrorBase - 2, - EWapErrXmlLibInvalidDTD = XmlLibErrorBase - 3, - - // Validator -#define XmlValidatorErrorBase -13100 - EWapErrXmlLibIllegalTagName = XmlValidatorErrorBase, - EWapErrXmlLibIllegalFixedAttributeValue = XmlValidatorErrorBase - 1, - EWapErrXmlLibMissingRequiredAttribute = XmlValidatorErrorBase - 2, - EWapErrXmlLibMissingDocument = XmlValidatorErrorBase - 4, - EWapErrXmlLibInvalidDocumentStructure = XmlValidatorErrorBase - 6, - EWapErrXmlLibIllegalAttributeValue = XmlValidatorErrorBase - 7, - - // Parser -#define XmlParserErrorBase -13000 - EWapErrXmlLibMissingCDATASectionEndTag = XmlParserErrorBase, - EWapErrXmlLibInvalidAttributeDeclaration = XmlParserErrorBase - 1, - EWapErrXmlLibEndTagMismatch = XmlParserErrorBase - 2, - EWapErrXmlLibInvalidCharacterReference = XmlParserErrorBase - 3, - EWapErrXmlLibUnknownEntityReference = XmlParserErrorBase - 4, - EWapErrXmlLibNoDTD = XmlParserErrorBase - 5, - EWapErrXmlLibMissingDocumentRootNode = XmlParserErrorBase - 6, - EWapErrXmlLibInvalidXmlVersionDefinition = XmlParserErrorBase - 7, - EWapErrXmlLibRootElementNameMismatch = XmlParserErrorBase - 8, - - - // - // WMLLIB ERROR CODES - // - - // WmlLib - // No WmlLib (interface module) specific errors defined - - // Validator -#define WmlValidatorErrorBase -12100 - EWapErrWmlLibAccessViolation = WmlValidatorErrorBase - 1, - EWapErrWmlLibInvalidVariableReference = WmlValidatorErrorBase - 2, - EWapErrWmlLibInvalidConversionMethod = WmlValidatorErrorBase - 3, - EWapErrWmlLibIllegalVariableName = WmlValidatorErrorBase - 4, - EWapErrWmlLibIllegalTaskCountOnAnchor = WmlValidatorErrorBase - 5, - EWapErrWmlLibNULLVariableName = WmlValidatorErrorBase - 6, - EWapErrWmlLibNestedTables = WmlValidatorErrorBase - 7, - EWapErrWmlLibDuplicateDoNodeName = WmlValidatorErrorBase - 8, - EWapErrWmlLibUsageOfReservedWord = WmlValidatorErrorBase - 9, - EWapErrWmlLibZeroTableColumns = WmlValidatorErrorBase - 10, - EWapErrWmlLibNonWmlDocument = WmlValidatorErrorBase - 11, - EWapErrWmlLibMultipleMetaPropertyName = WmlValidatorErrorBase - 12, - EWapErrWmlLibEventBindingConflict = WmlValidatorErrorBase - 14, - EWapErrWmlLibMultipleAccessElements = WmlValidatorErrorBase - 15, - EWapErrWmlLibNonUniqueIds = WmlValidatorErrorBase - 16, - EWapErrWmlLibVariableInInvalidLocation = WmlValidatorErrorBase - 17, - - // Parser -#define WmlParserErrorBase -12000 - EWapErrWmlLibNullNode = WmlParserErrorBase, - EWapErrWmlLibCDATANodeWithoutParent = WmlParserErrorBase - 1, - - - // - // WAP Engine 'native' error codes - // - EWapErrSubDocumentNotFound = -10027, - EWapErrCannotCreateDeck = -10026, // Failed to create a deck - EWapErrMimeTypeMissing = -10025, // Engine tried to access the mime-type attribute in a - // tree node but it was missing - EWapErrUnknownDocument = -10024, - EWapErrInvalidDTD = -10023, - EWapErrDTDUnavailable = -10022, // Document cannot be validated as DTD is not available - - EWapErrUnknownScheme = -10021, // unknown scheme - EWapErrCorruptScheme = -10020, // scheme contains invalid characters - EWapErrCorruptUrl = -10019, // part of url contains invalid characters - - EWapErrPluginNotFound = -10018, // couldn't find the requested plugin - - EWapErrImageConversionFailed = -10017, // image data handler got error from media server - - EWapErrAccessPointNotSetUpForCSD = -10016, // Access point lacked info for Data call - EWapErrAccessPointNotSetUpForSMS = -10015, - EWapErrAccessPointNotSetUpForUSSD = -10014, - EWapErrAccessPointNotSetUpGeneric = -10013, - EWapErrProtocolNotSupported = -10012, // Current network does not support the requested service - - EWapErrAuthorizationFailed = -10011, - - EWapErrScriptObscureLibraryCall = -10010, // The script function was unavailable - EWapErrScriptIllegalAction = -10009, // The script attempted an illegal action and was terminated - EWapErrScriptCorrupt = -10008, // Script had errors - EWapErrScriptError = -10007, // Script returned a fatal error - EWapErrScriptNotFound = -10006, // Requested script was not found - - EWapErrDataCallUnavailable = -10005, // The data call is being used by another application - EWapErrDataCallDropped = -10004, // CSD connection was closed - - EWapErrAccessViolation = -10003, // Access to the document was denied - EWapErrDocumentCorrupted = -10002, - EWapErrDocumentNotFound = -10001, - EWapErrGeneral = -10000, - - // - // PPP connection 'inherited' error codes - // - EWapErrPppIfLRDBadLine = -3059, // ?? - EWapErrPppIfDNSNotFound = -3058, // ?? - EWapErrPppIfCallbackNotAcceptable = -3057, // NTRAS: client requested server Callback but was refused - EWapErrPppIfChangingPassword = -3056, // NTRAS: User's password is currently being changed - EWapErrPppIfNoDialInPermission = -3055, // NTRAS: User has not got dial-in permission on the server - EWapErrPppIfPasswdExpired = -3054, // NTRAS: User's password has expired - EWapErrPppIfRestrictedLogonHours = -3053, // NTRAS: User is attempting to log-in outside their hours - EWapErrPppIfAccountDisabled = -3052, // NTRAS: User's account has been disabled - EWapErrPppIfAuthNotSecure = -3051, // ?? - EWapErrPppIfAuthenticationFailure = -3050, // The supplied password was wrong?? - - // - // NetDial 'inherited' error codes - // - EWapErrNetDialScriptError = -3005, // NetDial Exit Condition - Script Error - EWapErrNetDialScriptTimeOut = -3004, // NetDial Exit Condition - Script Timed Out - EWapErrNetDialLoginFail = -3003, // NetDial Exit Condition - Login Failure - EWapErrNetDialModemError = -3002, // NetDial Exit Condition - Modem error - EWapErrNetDialNoModem = -3001, // NetDial Exit Condition - No Modem Response - - // - // ETEL 'inherited' error codes - // - EWapErrEtelModemSettingsCorrupt = -2018, - EWapErrEtelModemNotDetected = -2017, - EWapErrEtelAnswerAlreadyOutstanding = -2016, - EWapErrEtelUnknownModemCapability = -2015, - EWapErrEtelWrongModemType = -2014, - EWapErrEtelPortNotLoanedToClient = -2013, - EWapErrEtelNotFaxOwner = -2012, - EWapErrEtelFaxChunkNotCreated = -2011, - EWapErrEtelConfigPortFailure = -2010, - EWapErrEtelNoDialTone = -2009, - EWapErrEtelNoAnswer = -2008, - EWapErrEtelCallNotActive = -2007, - EWapErrEtelInitialisationFailure = -2006, - EWapErrEtelNoClientInterestedInThisCall= -2005, - EWapErrEtelBusyDetected = -2004, - EWapErrEtelNoCarrier = -2003, - EWapErrEtelAlreadyCallOwner = -2002, - EWapErrEtelDuplicatePhoneName = -2001, - EWapErrEtelNotCallOwner = -2000, - - // - // General EPOC 'inherited' error codes - // - EWapErrEpocTimedOut = -33, - EWapErrEpocNotFound = -1, - EWapErrEpocAccessDenied = -21, - - // - // - // Wap engine status messages - // - EWapStatusDownloadProgress = 1, // Amount complete in aValue (0...100) - EWapStatusDownloadComplete, // Document fetch is complete - EWapStatusSubDocumentChanged, // XML subdocument (card in WML) has changed - EWapStatusRefreshRequest, // Observer is requested to refresh display - EWapStatusError, // Error - EWapStatusInformational, // Information other than download progress - EWapStatusInitialisingConnection = KHttpPluginStatusBase, - EWapStatusConnecting = KHttpPluginStatusBase + 1, - EWapStatusAuthenticating = KHttpPluginStatusBase + 2, - EWapStatusConnected = KHttpPluginStatusBase + 3, - EWapStatusDisconnecting = KHttpPluginStatusBase + 4, - EWapStatusHttpAuthenticationFailed = KHttpPluginStatusBase + 10, // The user's password was rejected by the origin server - EWapStatusHttpAuthenticationAborted = KHttpPluginStatusBase + 11, // The user cancelled the password box - EWapStatusHttp_401_Unauthorized = KHttpPluginStatusBase + 401, // occurs when HTTP authentication is used, username/password dialogs raised as a response. Need to consider how UI deals with authentication failures here. - EWapStatusValidating = KWapDocumentLoadStatusBase, // Validating document - EWapStatusReceivingErrorDeck = KWapDocumentLoadStatusBase + 1 // Receiving error deck - -} TWapEngineStatus; - -enum TWmlFetchFlag - { - EWmlFetchNoFlag = 0x00, - EWmlFetchReload = 0x01, - EWmlFetchTimerFetch = 0x02 - }; - -#endif // __WAPENGINESTANDARD_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/waplog.h --- a/epoc32/include/waplog.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// WAP Logging public header, defines the name of the -// file to use for WAP activity logging messages -// -// - -#if !defined(__WAPLOG_H__) -#define __WAPLOG_H__ - -#if !defined(__E32STD_H__) -#include -#endif - -#ifdef _DEBUG -/** -@publishedAll -@deprecated -*/ -_LIT(KWapLogFileName,"WAPLog.html"); -#define __LOG_WAP_FILE_NAME KWapLogFileName -#else -#define __LOG_WAP_FILE_NAME -#endif - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/wappdef.h --- a/epoc32/include/wappdef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,223 +0,0 @@ -// Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// Definitions of WBXML message tokens for use in the Wap Parser, WAPP -// -// - -#if !defined (__WAPPDEF_H__) -#define __WAPPDEF_H__ - -// ********* GENERAL WBXML TOKENS *************** -// WBXML global tokens - applicable to all messages -// See WAP Binary XML Content Format, 16-Jun-99, p16. -// These and our message specific tokens define our DTD - -// As our DTD is hard coded into the app, we don't use the following - -// SWITCH_PAGE - not defined as we only have 1 page -// EXT_I_0, EXT_I_1, EXT_I_2 -// PI - don't define processing inline - all hard coded -// LITERAL,LITERAL_C,LITERAL_A,LITERAL_AC - not using literals, don't define elements inline -// EXT_T_0,EXT_T_1,EXT_T_2, EXT_0, EXT_1, EXT_2 - not using document extensions -// OPAQUE - not using opaque data - -#define KWAPP_STR_TERM 0x00 // Basically the NULL terminator character for a string -#define KWAPP_END_TAG 0x01 // Code for the end of an element -#define KWAPP_ENTITY 0x02 // indicates the start of a character entity number -#define KWAPP_STR_I 0x03 // indicates the start of an inline string, - // terminated by '\0', OR STR_TERMINATOR -#define KWAPP_STR_T 0X83 // a reference to the string table follows. Token is followed - // by multi byte Int32 referencing an offset in the string table - -#define KWAPP_TAG_CONTENT 0x40 // Bit 6 of the Wap Tag is set when a element has content -#define KWAPP_TAG_ATTRIBUTES 0x80 // Bit 7 of Tag is set when the element has attributes -#define KWAPP_TAG_ATTRIBUTES_CONTENT 0XC0 // Bits 6 & 7 are set - attributes and content -#define KWAPP_MB_INT32_CONTINUATION 0x80 // Continuation Bit of an octet of a Multibyte 32 bit int is set. -// Binary encoding for remote configuration of WAP browser settings -// same as for the Nokia 7110 - -// ********** APPLICATION SPECIFIC CODE LEVEL TAG TOKENS ************* -#define KWAPP_CHAR_LIST 0x05 // Code level tag (CLT), indicates start - // of a characteristic list element -#define KWAPP_CHARACTERISTIC 0x06 // code level tag (CLT), indicates start - // of a characteristic element -#define KWAPP_PARM 0x07 // CLT indicating start of a - // attribute element of a characteristic - -// *************** ATTRIBUTE TOKENS ***************************** -#define KWAPP_TYPE 0x05 // Undocumented token which indicates the - // start of a TYPE attribute i.e. "TYPE=" -#define KWAPP_ADDR_TYPE 0x06 // Characteristic type = ADDRESS -#define KWAPP_URL_TYPE 0x07 // Characteristic type = URL -#define KWAPP_NAME_TYPE 0x08 // Characteristic Type = NAME -#define KWAPP_ID 0x7D // Characteristic Type = ID -#define KWAPP_BOOKMARK 0x7F // Characteristic Type = BOOKMARK - -#define KWAPP_NAME_ATTRIB 0x10 // A NAME attribute follows, i.e "NAME=" -#define KWAPP_VALUE_ATTRIB 0x11 // A VALUE attribute follows, i.e "VALUE" - -// *************** PARM TYPES and VALUES *************************** -#define KWAPP_BEARER 0x12 // This is a BEARER element -#define KWAPP_PROXY 0x13 // This is a PROXY -#define KWAPP_PORT 0x14 // PORT element -#define KWAPP_NAME 0x15 // This is a NAME element - -// IMPORTANT tag 0x16 had different meanings for different versions of the OTA settings -// Not in Ver 4.0, = ICON token in Version 4.3 but 4.3 NOT SUPPORTED!! - -#define KWAPP_PROXYTYPE 0x16 // PROXY_TYPE in Settings specification version 5.0! - -#define KWAPP_URL 0x17 // Not defined for Version 4.0 - // Start of a URL, i.e. "TYPE=URL" for Version 5.0 -#define KWAPP_PROXY_AUTHNAME 0x18 // Not defined for Ver. 4.0 - website uses Proxy token and inline string "AUTHNAME" - // Version 5.0 - proxy name follows -#define KWAPP_PROXY_AUTHSECRET 0x19 // Not defined for Version 4.0 - use Proxy token and inline string - // Versions 5.0 - the password for the proxy follows -#define KWAPP_SMS_SMSC_ADDR 0x1A // Service centre address for SMS service -#define KWAPP_USSD_SERV_CODE 0x1B // Service centre address for USSD service -#define KWAPP_ACCESS_POINT_NAME 0x1C // GPRS access point -#define KWAPP_PPP_LOGIN_TYPE 0x1D -#define KWAPP_PROXY_LOGIN_TYPE 0x1E -#define KWAPP_CSD_DIALSTRING 0x21 // Dialing sting for CSD gateway -#define KWAPP_PPP_AUTHTYPE 0x22 // type of authentification -#define KWAPP_PPP_AUTHNAME 0x23 // authentification name -#define KWAPP_PPP_AUTHSECRET 0x24 // authentification password -#define KWAPP_PPP_LOGINTYPE 0x25 // authentification password -#define KWAPP_CSD_CALLTYPE 0x28 // CSD calltype -#define KWAPP_CSD_CALLSPEED 0x29 // CSD callspeed - -#define KWAPP_GSM_SMS_OLD 0x41 // Defined as GSM\SMS in Nokia Spec version 4.0,but not 5.0 - // Distinguish it's Ver 4.0 by WAP Version ( = 1.0 ) - // For versions 5.0 the WAP XML version = 1.1, & token = 0x46 - -#define KWAPP_GSM_CSD 0x45 // GSM CSD service - -// IMPORTANT tag 0x46 has multiple meaning across different versions of the Over the Air settings -#define KWAPP_GSM_SMS_NEW 0x46 // Not defined for Version 4.0 - // GSM SMS Nokia spec version 5.0 - -#define KWAPP_GSM_USSD 0x47 // Unstructured Short Service Data service - // Not defined for version 4.0 - -//IMPORTANT tag 0x48 has different meanings in different versions of the Over the Air Settings specs -#define KWAPP_IS136 0x48 // Not defined for Version 4.0 - // IS-136/CSD service in Nokia spec version 5.0 - -#define KWAPP_GPRS 0x49 // GSM/GPRS service - added in OTA v6.0 - - -#define KWAPP_PORT_9200 0x60 // Port 9200 - non continuous and not secure -#define KWAPP_PORT_9201 0x61 // Port 9201 - continuous but not secure -#define KWAPP_PORT_9202 0x62 // Indicates port 9202 - secure but non continuous conection -#define KWAPP_PORT_9203 0x63 // Indicates port 9203 - secure and continuous -#define KWAPP_AUTOMATIC 0x64 -#define KWAPP_MANUAL 0x65 -#define KWAPP_SPEED_AUTO 0x6A // Use auto selection of speed -#define KWAPP_SPEED_9600 0x6B // Indicates comm speed is 9600 -#define KWAPP_SPEED_14400 0x6C // Indicates comm speed is 14400 -#define KWAPP_SPEED_19200 0x6D // Comm speed is 19200 -#define KWAPP_SPEED_28800 0x6E // Comms speed is 28800 -#define KWAPP_SPEED_38400 0x6F // Comms speed is 38400 -#define KWAPP_PAP 0x70 // Interface protocol = PAP -#define KWAPP_CHAP 0x71 // Interface protocol = CHAP -#define KWAPP_ANALOGUE 0x72 // Analogue connection -#define KWAPP_ISDN 0x73 // Digital ISDN connection -#define KWAPP_SPEED_43200 0x74 // Communication speed of 42K -#define KWAPP_SPEED_56700 0x75 // Comm speed of 56k -#define KWAPP_MSISDN_NO 0x76 // Proxy type is MSISDN number (relevant for USSD) -#define KWAPP_IPV4 0x77 // Proxy type is an IP address (relevant for USSD) -#define KWAPP_MSCHAP 0x78 // Interface protocol = CHAP -#define KWAPP_NAME_ISP 0X7E // Start of Internet Service Provider follows -#define KWAPP_MMS_URL 0x7C // Address of Multi Media Service Centre -added in OTA v7.0 - - -// Labels for use in array of ParsedFields - application specific not Nokia - -// CHARACTERISTIC DELIMITORS -_LIT(KWappCharAddress, "CHAR-ADDRESS"); // Start of an Address Characteristic -_LIT(KWappCharName, "CHAR-NAME"); // Start of a Name Characteristic -_LIT(KWappCharURL, "CHAR-URL"); // Start of a URL Characteristic -_LIT(KWappCharMMSURL, "CHAR-MMSURL"); // Start of a URL Characteristic -_LIT(KWappCharBookmark, "CHAR-BOOKMARK");// Start of a Bookmark Characteristic -_LIT(KWappCharID, "CHAR-ID"); // Start of an ID characteristic - -_LIT(KWappXMLversion,"VERSIONx10"); -_LIT(KWappPublicID, "PUBLICID"); -_LIT(KWappCharacterSet, "CHARSET"); - -//XML Document Characteristic Tags -_LIT(KWappAddr, "ADDRESS"); -_LIT(KWappURL, "URL"); -_LIT(KWappMMSURL, "MMSURL"); // Added in v6.6 of Nokia OTA Spec -_LIT(KWappName, "NAME"); -_LIT(KWappBookmark, "BOOKMARK"); -_LIT(KWappID, "ID"); - - -// General tags -_LIT(KWappBearer, "BEARER"); -_LIT(KWappProxy, "PROXY"); -_LIT(KWappPort, "PORT"); -_LIT(KWappProxyType, "PROXY_TYPE"); - -_LIT(KWappProxyAuthName, "PROXY_AUTHNAME"); -_LIT(KWappProxyAuthSecret, "PROXY_AUTHSECRET"); -_LIT(KWappProxyLoginType, "PROXY_LOGINTYPE"); -_LIT(KWappSMSCAddress, "SMS_SMSC_ADDRESS"); -_LIT(KWappUSSDCode, "USSD_SERVICE_CODE"); -_LIT(KWappISP, "ISP_NAME"); -_LIT(KWappAccessPointName, "ACCESS_POINT_NAME"); - -_LIT(KWappCsdDial, "CSD_DIALSTRING"); -_LIT(KWappPPPAuthType, "PPP_AUTHTYPE"); -_LIT(KWappPPPAuthName, "PPP_AUTHNAME"); -_LIT(KWappPPPAuthSecret, "PPP_AUTHSECRET"); -_LIT(KWappPPPLoginType, "PPP_LOGINTYPE"); -_LIT(KWappCsdCallType, "CSD_CALLTYPE"); -_LIT(KWappCsdCallSpeed, "CSD_CALLSPEED"); - -_LIT(KWappGsmCsd, "GSM/CSD"); -_LIT(KWappGsmSms, "GSM/SMS"); -_LIT(KWappGsmUssd, "GSM/USSD"); -_LIT(KWappIS136Csd, "IS136/CSD"); -_LIT(KWappGprs, "GPRS"); // Added in OTA v6.0 - -_LIT(KWappPort9200, "9200"); -_LIT(KWappPort9201, "9201"); -_LIT(KWappPort9202, "9202"); -_LIT(KWappPort9203, "9203"); - -_LIT(KWappSpeedAuto, "AUTO"); -_LIT(KWappSpeed9600, "9600"); -_LIT(KWappSpeed14400, "14400"); -// Additional speeds added in Version 5.0 -_LIT(KWappSpeed19200, "19200"); -_LIT(KWappSpeed28800, "28800"); -_LIT(KWappSpeed38400, "38400"); -_LIT(KWappSpeed43200, "43200"); -_LIT(KWappSpeed56700, "57600"); - -_LIT(KWappPAP, "PAP"); -_LIT(KWappCHAP, "CHAP"); -_LIT(KWappMSCHAP, "MSCHAP"); -_LIT(KWappAnalogue, "ANALOGUE"); -_LIT(KWappISDN, "ISDN"); - -_LIT(KWappAuthAutomatic, "AUTOMATIC"); -_LIT(KWappAuthManual, "MANUAL"); - -_LIT(KWappMsisdnNo, "MSISDN_NO"); -_LIT(KWappIpv4, "IPV4"); - - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/waptestutils.h --- a/epoc32/include/waptestutils.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -// Copyright (c) 2000-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#if !defined(__WAPTESTUTILS_H__) -#define __WAPTESTUTILS_H__ - -#include -#include -#include -#include - -#if !defined(__LOGGING) - #define __LOGGING -#endif - -#include "waplog.h" -#include "logdef.h" - -// Constants -const TUid KUidWapTestUtils = {0x10005188}; -const TInt KMaxUserEntrySize = 50; - -//Test Harness Logging - -#define KLogsDir _L("c:\\logs\\") -#define KWapLogsDirName _L("WapTest") - -#define KTestHeader _L("Test Results") -#define KTestStarting _L("Test %d Starting") -#define KTestStartingWithDesc _L("Test %d Starting (%S)") -#define KNextTestStepWithDesc _L("Test %d Step %d (%S)") -#define KTestPassed _L("Test %d OK") -#define KTestFailed _L("Test %d FAILED (error = %d)") -#define KTestHarnessCompleted _L("Tests Completed Ok") -#define KTestHarnessFailed _L("Test FAILED (%d failed test(s))") -#define KTestFailInfo _L("Test %d : %S failed with Error %d") -#define KTestCommentPrepend _L("\t") - - -class CWapTestHarness : public CBase -/** - Test harness providing logging features - @publishedAll - @released -*/ - - { -public: - IMPORT_C static CWapTestHarness* NewLC(const TDesC& aTitle); - IMPORT_C static CWapTestHarness* NewL(const TDesC& aTitle); - ~CWapTestHarness(); - - IMPORT_C void StartTestL(const TDesC& aName); - IMPORT_C void NextStep(const TDesC& aStepName); - IMPORT_C void EndTest(TInt aErrorCode); - IMPORT_C void LogIt(TRefByValue aFmt, ...); - IMPORT_C void operator()(TInt aResult,TInt aLineNum); - IMPORT_C void operator()(TInt aResult); - IMPORT_C void PressAnyKey(); - IMPORT_C void DumpData(HBufC8& aData, TBool logIt = EFalse); - IMPORT_C void GetAnEntry(const TDesC & ourPrompt, TDes & currentstring); - IMPORT_C TInt GetSelection(const TDesC& ourPrompt, const TDesC& validChoices); - IMPORT_C void SetScript(RFile& scriptFile); - inline void DoResourceLeakTest(TBool aValue); - inline RTest& Test(); - - inline static void DefaultLogFileName(TDes& aFileName); -private: - CWapTestHarness(const TDesC& aTitle); - void ConstructL(const TDesC& aTitle); - void Panic(TInt aPanic); - void TestHarnessFailed(); - void TestHarnessComplete(); - void ResourceLeakTest(); - inline void CreateFlogger(const TDesC& aFileName, TInt aShowDate=ETrue, TInt aShowTime=ETrue); - inline void WriteComment(const TDesC& aComment); - TInt ReadLineFromScript(TDes& aBuffer); - -private: - // Helper class to store failed tests - class CTestInfo; - enum TPanicCode - { - EBadStartTest, - EBadEndTest, - EBadCLogPtr - }; -private: - RTest iTest; - RFileLogger iFlogger; - RFile* iScriptFile; - __DECLARE_LOG; // Does CLogClient* iLogPtr; - TInt iTestCount; - CArrayPtrFlat* iFailedTests; - TTime iStartTime; - TBool iCanStartTest; - TInt iStepNumber; - TInt iStartHandleCount; - TBool iDoResourceLeakTest; - TBool iScriptRunning; - }; - -class CWapTestHarness::CTestInfo : public CBase - -/** - Holds test number and name - @publishedAll - @released -*/ - { -public: - static CTestInfo* NewLC(const TDesC& aName, TInt aNumber, TInt aErrorCode); - static CTestInfo* NewL(const TDesC& aName, TInt aNumber, TInt aErrorCode); - ~CTestInfo(); - - void SetNameL(const TDesC& aName); - void SetNumber(TInt aNumber); - void SetErrorCode(TInt aErrorCode); - - inline TPtr Name() const; - inline TInt Number() const; - inline TInt ErrorCode() const; -private: - CTestInfo(); - void ConstructL(const TDesC& aName, TInt aNumber, TInt aErrorCode); -private: - HBufC* iName; - TInt iNumber; - TInt iErrorCode; - }; - -#include - -#endif // __WAPTESTUTILS_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/wbconverter.h --- a/epoc32/include/wbconverter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,471 +0,0 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - -#ifndef __WBCONVERTER_H -#define __WBCONVERTER_H - -#include -#include -#include - -// forward declarations -// -class CWbxmlToken; -class MWbxmlConverterObserver; -class CByteList; -class CCnvCharacterSetConverter; - -// consts, defines, enums -// -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbXmlVersion10,""); - -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbPublicIdStartWml,""); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbPublicIdEnd12,"\" \"http://www.wapforum.org/DTD/wml_1.2.xml\">"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbPublicIdEndSI10,"\" \"http://www.wapforum.org/DTD/si.dtd\">"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbPublicIdEndSL10,"\" \"http://www.wapforum.org/DTD/sl.dtd\">"); - -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbTagStart,"<"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbTagStartClose,""); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbTagEndWithoutContent,"/>"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbVariableStart,"$("); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbVariableEscaped,":E)"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbVariableUnescaped,":U)"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbVariableNoescape,":N)"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbVariableNormal,")"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbQuote,"\""); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbSpace," "); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbTab,"\t"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KWbLineBreak,"\n"); - -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdIndex = 0; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdUnknown = 1; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdWml10 = 2; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdWta10 = 3; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdWml11 = 4; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdSI = 5; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdSL = 6; -/** -@publishedAll -@deprecated -*/ -const TInt8 KWbxmlIdWml12 = 9; - -// Entity translation literals -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityDollar,"$$"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityAmp,"&"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityLt,"<"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityGt,">"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityQuot,"""); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityApos,"'"); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityNbsp," "); -/** -@publishedAll -@deprecated -*/ -_LIT8(KEntityShy,"­"); - -/** -@publishedAll -@deprecated -*/ -const TUint16 KWbxmlSkipLiteralEndTagMagicToken = 0xac1d; - - -/////////////////////////////////////////////////////////////////// -// CWbxmlConverter -/////////////////////////////////////////////////////////////////// -class RFileReadStream; -//##ModelId=3B6678E20007 -class CWbxmlConverter : public CBase -/** -@publishedAll -@deprecated -*/ -{ -public: // Methods - //##ModelId=3B6678E30199 - ~CWbxmlConverter(); - - // NOTE: input data really is 8bit bytecode - //##ModelId=3B6678E300F9 - IMPORT_C static CWbxmlConverter* CWbxmlConverter::NewL(RFs& aFs, MWbxmlConverterObserver* aObserver); - //##ModelId=3B6678E300BD - IMPORT_C static CWbxmlConverter* CWbxmlConverter::NewLC(RFs& aFs, MWbxmlConverterObserver* aObserver); - //##ModelId=3B6678E30135 - IMPORT_C static CWbxmlConverter* CWbxmlConverter::NewL(RFs& aFs, MWbxmlConverterObserver* aObserver, const TDesC* aCharacterEncoding); - //##ModelId=3B6678E3009F - IMPORT_C void ProcessDataL(HBufC8& aBuffer); - //##ModelId=3B6678E3009E - IMPORT_C void CommitL(); - -private: // Emumerations - - enum TGotoState - { - EGotoStreaming = 1, - EGotoString, - EGotoOpaque - }; - enum TConvertState - { - EConvertError = 1, - EConvertVersion, - EConvertPublicIdValue, - EConvertCharset, - EConvertStringTable, - EConvertPublicIdName, - EConvertData, - EConvertFinished - }; - -private: // Methods - - //##ModelId=3B6678E30080 - CWbxmlConverter(RFs& aFs); - //##ModelId=3B6678E30045 - void ConstructL(MWbxmlConverterObserver* aObserver, const TDesC* aCharacterEncoding); - - //##ModelId=3B6678E30044 - void HandleDataL(); - //##ModelId=3B6678E30009 - void SetNextStateL(const TInt aResult, const TConvertState aState); - //##ModelId=3B6678E30008 - TInt ConvertWbxmlVersionL(); - //##ModelId=3B6678E203E8 - TInt ConvertPublicIdValueL(); // Extract PublicId - //##ModelId=3B6678E203E7 - TInt ConvertPublicIdNameL(); // Report PublicId - //##ModelId=3B6678E203E6 - TInt ConvertCharsetL(); - //##ModelId=3B6678E203DE - TInt ConvertStringTableL(); - //##ModelId=3B6678E203DD - TInt ConvertDataL(); - //##ModelId=3B6678E203DC - TInt ConvertDataStreamingL(); - //##ModelId=3B6678E203D3 - TInt ConvertDataStringL(); - //##ModelId=3B6678E203D2 - TInt ConvertOpaqueDataL(); - //##ModelId=3B6678E203B4 - HBufC16* FormatDateStringL(TDesC8& aData); - - //##ModelId=3B6678E20396 - TInt OpenTokenFileL(HBufC& aFileName); - //##ModelId=3B6678E2035A - void ReadTokenFileL(RFileReadStream& aStream, HBufC8& aBuffer); - //##ModelId=3B6678E2033C - TInt LoadTokensL(HBufC* aBuffer); - - //##ModelId=3B6678E2030A - TInt ExtractMultiByte(TUint32* aMultiByte, TInt aSkipHeader); - //##ModelId=3B6678E202E3 - void Indent(const TInt aCount) const; - //##ModelId=3B6678E202E2 - void FinishStringL(); - //##ModelId=3B6678E202C4 - HBufC16* CharsetConvertDataL(TDesC8& aData); - - // Gets the full path to wmlc token table. Input aTokenFilePath is the path, without the drive. - // - // In: - // aTokenFilePath - the path to the token table file. - // - // Rtn: the full path to the token table file. Ownership is transfered to caller. - // - //##ModelId=3B6678E202A6 - HBufC* FindTokenFileL(const TDesC& aTokenFilePath) const; - - // Replaces characters originating from chracter entity references with the reference string - // For example chracter '&' will be "decoded" back to "&" - // - // In: - // aString - The original string containing the undedcoded characters. - // This string can get ReAllocated during the process - DO NOT USE THIS POINTER - // AFTER THE CALL to this method. (use the returned one instead...) - // Return: - // HBufC* - Pointer to the string with replaced stuff - // - //##ModelId=3B6678E20288 - HBufC* ReplaceCharacterEntitiesL(HBufC* aString); - - // MWbxmlConverterObserver interface overloads - //##ModelId=3B6678E2024C - void OutputL(const TUint32 aSource) const; - - //##ModelId=3B6678E2022E - TBool OutputCheckQuoteL(HBufC8& aSource) const; - - // Helper method to optimise the OutputL oveloads - //##ModelId=3B6678E20211 - void BufferAndOutputL(const TDesC8& aSource) const; - - // Must exist for Binary Compatibility - //##ModelId=3B6678E20210 - IMPORT_C virtual void CWbxmlConverter_Reserved1(); - -private: // Attributes - - // For binary compatibility - //##ModelId=3B6678E20206 - TAny* CWbxmlConverter_Reserved; - - // Attributes - // Note: conversion table from disk ie. you can change it at runtime - //##ModelId=3B6678E201F2 - CArrayPtrFlat* iTagArray; - //##ModelId=3B6678E201D3 - CArrayPtrFlat* iAttArray; - - //##ModelId=3B6678E2018D - MWbxmlConverterObserver* iObserver; - - //##ModelId=3B6678E20179 - TUint8 iWbxmlVersion; - //##ModelId=3B6678E20165 - TUint32 iWbxmlCharset; - //##ModelId=3B6678E20151 - TUint32 iPublicId; - //##ModelId=3B6678E2013D - TUint32 iPublicIdIndex; - - // Note: must handle source as 8bit data even in Unicode compile! - //##ModelId=3B6678E2012B - CByteList* iByteList; - //##ModelId=3B6678E2011F - HBufC8* iStringTable; - //##ModelId=3B6678E2010D - HBufC8* iPublicIdStr; - //##ModelId=3B6678E20101 - RFs& iFs; - - //##ModelId=3B6678E200ED - TInt iState; - //##ModelId=3B6678E200E3 - TUint32 iContinue; - - //##ModelId=3B6678E200D1 - TUint8 iVariable; - //##ModelId=3B6678E200C5 - TUint8 hasAttrs; - //##ModelId=3B6678E200B3 - TUint8 hasContent; - - - //##ModelId=3B6678E200A7 - TInt iTagIndex; - //##ModelId=3B6678E20095 - CArrayFixFlat* iTagStack; - //##ModelId=3B6678E2006B - TBool iRestrictedOutput; - - enum TParsing - { - EParseNot = 0, - EParseTag, - EParseAttrs - }; - //##ModelId=3B6678E20059 - TParsing iParsing; - //##ModelId=3B6678E2004F - TBool iOpenQuote; - - //##ModelId=3B6678E20045 - mutable HBufC8* iOutputBuffer; // Buffered output buffer : Optimisation - - //##ModelId=3B6678E2003B - CCnvCharacterSetConverter* iCharsetConverter; - -#ifdef __OUTPUT_WMLC - //##ModelId=3B6678E20031 - RFile iWmlcFile; // Debug stuff - //##ModelId=3B6678E20025 - RFs iWmlcFs; // Debug stuff -#endif - -}; - -#endif // __WBCONVERTER_H - -/////////////////////////////////////////////////////////////////// -// End of file -/////////////////////////////////////////////////////////////////// diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/wins/variantmediadef.h --- a/epoc32/include/wins/variantmediadef.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// wins\inc\variantmediadef.h -// Media definitions for the Wins Variant. -// Each Media Driver requires the following definitions -// DRIVECOUNT - The total number of local drive object to be assigned to the Media Driver (1-KMaxLocalDrives) -// DRIVELIST - A list of the local drive numbers (each separated with a comma) to be assigned to the Media Driver. -// Each in the range 0 - (KMaxLocalDrives-1). Total number of drive numbers must equal the value -// of DRIVECOUNT. -// NUMMEDIA - The total number of media objects to be assigned to the Media Driver. -// DRIVENAME - A name for the drive group. -// For the complete set of media definitions -// - The total number of local drive objects assigned should not exceed KMaxLocalDrives. -// - Each Media Driver should be assigned a unique set of drive numbers - no conflicts between Media Drivers. -// - The total number of media objects assigned should not exceed KMaxLocalDrives. -// -// - -#ifndef __VARIANTMEDIADEF_H__ -#define __VARIANTMEDIADEF_H__ - -// Variant parameters for IRAM Media Driver (MEDINT.PDD) -#define IRAM_DRIVECOUNT 1 -#define IRAM_DRIVELIST 0 -#define IRAM_NUMMEDIA 1 -#define IRAM_DRIVENAME "IRam" - -// Variant parameters for LFFS Media Driver (MEDLFS.PDD) -#define LFFS_DRIVECOUNT 1 -#define LFFS_DRIVELIST 8 -#define LFFS_NUMMEDIA 1 -#define LFFS_DRIVENAME "Flash" - -// Variant parameters for the MMC Controller (EPBUSMMC.DLL) -#define MMC0_DRIVECOUNT 4 -#define MMC0_DRIVELIST 1,2,3,4 -#define MMC0_NUMMEDIA 4 -#define MMC0_DRIVENAME "MultiMediaCard0" - -// Variant parameters for NAND flash media driver (mednand.pdd) -#define NAND_DRIVECOUNT 3 -#define NAND_DRIVELIST 5,6,9 -#define NAND_NUMMEDIA 1 -#define NAND_DRIVENAME "Nand" - -#endif diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/wsp/wsptypes.h --- a/epoc32/include/wsp/wsptypes.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,535 +0,0 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// - - - -/** - @file WspTypes.h - @warning : This file contains Rose Model ID comments - please do not delete -*/ - -#ifndef __WSPTYPES_H__ -#define __WSPTYPES_H__ - -// System includes -#include -#include - -//TODO - These will move to a common WAPMSG/WSPTransport file at a later stage, -//in the wap-stack subsystem, to be shared with the WAP Messaging API. - -namespace Wap -/** -All type definitions and enumerations used in WSP are in placed in a wider WAP -namespace, to avoid name conflicts with other components. -@publishedAll -@released -*/ -{ - -/** The TWspPrimitive type represents the WSP primitives defined in the WSP - Specification, July 2001. -*/ -enum TWspPrimitive - { - /** - */ - ESConnect = 0, - /** - */ - ESDisconnect, - /** - */ - ESSuspend, - /** - */ - ESResume, - /** - */ - ESException, - /** - */ - ESMethodInvoke, - /** - */ - ESMethodInvokeData, - /** - */ - ESMethodResult, - /** - */ - ESMethodResultData, - /** - */ - ESMethodAbort, - /** - */ - ESPush, - /** - */ - ESConfirmedPush, - /** - */ - ESPushAbort - }; - -/** The TWspProtocolOptions type represents the optional protocol functions - defined in the WSP Specification, July 2001. When the client sends the - Protocol Capability to the server, it indicates which functions it will - accept from the server. The server returns from the set of functions sent - by the client those that it will perform. -*/ -enum TWspProtocolOptions - { - /** The Large Data Transfer feature includes support for multiple SDU's and - support for the Data Fragment PDU. Setting this falg indicates support - for sending and receiving large data. If a client only wishes to receive - large data, then it should set the Client and Server Message size fields - appropriately. - */ - ELargeDataTransfer = 0x08, - /** The acknowledgement headers flag specifies that the client wishes to send - acknowledgement headers. If the server cannot process them (indicated by - negotiating down the flag) the client should not send the headers as they - will be ignored. - */ - EAcknowledgementHeaders = 0x10, - /** The client enables the Suspend Resume facility when it wishes to suspend - and resume the session. If the server does not support suspend and resume - then this flag must be cleared in the negotiated capabilities. - */ - ESessionResumeFacility = 0x20, - /** The client uses this flag to indicate that it is able and willing to - receive push information. If the server cannot send pushes then this flag - must be cleared in the negotiated capabilities. - */ - EPushFacility = 0x40, - /** The client uses this flag to indicate that it is able and willing to - receive confirmed push information. If the server cannot send pushes - then this flag must be cleared in the negotiated capabilities. - */ - EConfirmedPushFacility = 0x80 - }; - -/** The TWspSessionState type represents the states of a WSP session, as defined - by the WSP Specification, July 2001. -*/ -enum TWspSessionState - { - /** - */ - ENull = 0, - /** - */ - EConnecting, - /** - */ - EConnected, - /** - */ - ESuspending, - /** - */ - ESuspended, - /** - */ - EClosing, - /** - */ - EResuming - }; - -/** The TWspMethodState type represents the states of a WSP method transaction, - as defined by the WSP Specification, July 2001. -*/ -enum TWspMethodState - { - /** - */ - ENullMethod =0, - /** - */ - ERequesting, - /** - */ - EWaiting, - /** - */ - EWaiting2, - /** - */ - ECompleting, - /** - */ - EAborting - }; - -/** The TWspBearer type defines the set of supported bearers. -*/ -enum TWspBearer - { - /** Specifier for any bearer. - */ - EAny = 0, - /** IP bearer. - */ - EIP, - /** A 7-bit SMS bearer. - */ - ESMS7, - /** An 8-bit SMS bearer. - */ - ESMS, - /** A 7-bit WAP SMS bearer. - */ - EWAPSMS7, - /** An 8-bit WAP SMS bearer. - */ - EWAPSMS - }; - -/** The TWspSession type defines the 2 types of WSP Session Service; Connection - Oriented and Connectionless. -*/ -enum TWspSession - { - /** Specifier for Connection Oriented Session Service. - */ - EWspConnectionOriented = 0, - /** Specifier for Connectionless Session Service. - */ - EWspConnectionLess - }; - -/** The TWspReason type is used by to report the cause of a particular indication - primitive. The WSP Specification, July 2001, specifies a given set that MUST - be recognised (6.2.5). Further values may be added. -*/ -enum TWspReason - { - /** The rules of the protocol were broken and in its current state, the peer - could not perform the specified operation. E.g. the PDU was not allowed. - */ - EProtoErr = 0xE0, - /** The session was disconnected while the operation was still in progress. - */ - EDisconnect = 0xE1, - /** The session was suspended while the operation was still in progress. - */ - ESuspend = 0xE2, - /** The session was resumed while the operation was still in progress. - */ - EResume = 0xE3, - /** The request could not be processed due to a lack of resources. - */ - ECongestion = 0xE4, - /** The connection was prevented due to an error. - */ - EConnectErr = 0xE5, - /** The SDU size in a request exceeded the maximum negotiated SDU size. - */ - EMRUExceeded = 0xE6, - /** The negotiated value of the maximum outstanding transactions (either for - push or method transactions) has been exceeded. - */ - EMORExceeded = 0xE7, - /** The operation was aborted by the Provider. - */ - EPeerReq = 0xE8, - /** An underlying network error prevented the completion of a request. - */ - ENetErr = 0xE9, - /** The cause of the indication was an action by the Client. - */ - EUserReq = 0xEA, - /** The client has refesed the Push message, no specific reason, no retries. - */ - EUserRfs = 0xEB, - /** The Push message cannot be delivered to the intended destination. - */ - EUserPnd = 0xEC, - /** The Push message was discarded due to resource shortage. - */ - EUserDcr = 0xED, - /** The content-type of the Push message cannot be processed. - */ - EUserDcu = 0xEE, - /** The session connect request has been redirected to a new proxy. This is - a temporary redirection and the original proxy should be used in the - future when trying to access this service. This is not defined by the - WSP Specification. - */ - ETemporaryRedirectedProxy =0, - /** The session connect request has been redirected to a new proxy. This is - a permanent redirection and the new proxy should be used in the future - when trying to access this service. The client will be notified of this - event and the HTTP session property EWspProxyAddressnew will contain the - new proxy's address. The client should update its access point database. - This is not defined by the WSP Specification. - */ - EPermanentRedirectedProxy, - /** The client had disconnected the session, but as Suspend Resume facility - was being used, the session was suspended. The client then changed the - proxy and did a connect. The suspended session cannot be resumed, so the - the current session must be disconnected (with this reason) and a - session connect initiated with the new proxy. This is not defined by the - WSP Specification. - */ - EChangedProxyInSuspendedSession, - /** The client's WSP session was disconnected in the Connecting state because - configuration of the underlying WTLS layer failed prior to the phase 1 - WTLS handshake. - */ - EWtlsConfigurationFailed, - /** The client's WSP session was disconnected in the Connecting state because - phase 1 of the WTLS handshake failed. - */ - EWtlsPhase1HandshakeFailed, - /** The client's WSP session was disconnected in the Connecting state because - phase 2 of the WTLS handshake failed. - */ - EWtlsPhase2HandshakeFailed, - /** The client's WSP session was disconnected in the Connecting state because - the proxy's WTLS certificate was invalid - e.g. badly formed, or out of date. - */ - EWtlsInvalidServerCert, - /** The client's WSP session was disconnected in the Connecting state because - the proxy's WTLS certificate could not be trusted. This means it was not signed - by any root certificate on the device, and the security policy criteria could not - determine further whether it could be trusted or not. - */ - EWtlsUntrustedServerCert, - /** The client's WSP session was disconnected in the Connecting state because - the negotiated WTLS configuration at completion of the secure handshake was - rejected by criteria in the security policy. - */ - EWtlsNegotiatedConfigRejected, - /** The client's transaction or session has failed due to an out-of-memory situation. - */ - EOutOfMemory, - /** The client's session has entered an inconsistent state, probably due to a failure caused - by an out-of-memory situation. - */ - ESessionStateFailure - }; - -/** The enum TWspCapabilty is used to select a capability to reset (if required) - before setting the value of the capability. -*/ -enum TWspCapability - { - /** Specifies the Alias Addresses capability. - */ - EAliasAddresses = 0, - /** Specifies the Extended Methods capability. - */ - EExtendedMethods, - /** Specifies the Header Code Pages capability. - */ - EHeaderCodePages, - /** Specifies the Method Maximum Outstanding Requests capability. Default value is 1. - */ - EMethodMOR, - /** Specifies the Push Maximum Outstanding Requests capability. Default value is 1. - */ - EPushMOR, - /** Specifies the Protocol Options capability. Default value is 0x00. - */ - EProtocolOptions, - /** Specifies the Client SDU size capability. Default value is 1400 octets. - */ - EClientSDUSize, - /** Specifies the Server SDU size capability. Default value is 1400 octets. - */ - EServerSDUSize, - /** Specifies the Client Message size capability. Default value is 1400 octets. - */ - EClientMessageSize, - /** Specifies the Server Message size capability. Default value is 1400 octets. - */ - EServerMessageSize, - /** Specifies the Unknown capabilities. - */ - EUnknownCapabilities, - /** Specifies all the capabilities. - */ - EAllCapabilities - }; - -} // end of namespace Wap - - -/** -Maximum Proxy address length, this is large enough for a full IPv6 address. -@publishedAll -@released -*/ -const TInt KMaxProxyAddrLen = 40; - -//##ModelId=3C4C41B20079 -class TWspRedirectedAddress -/** -The TWspRedirectedAddress type represents an alternate address to which -Clients must use to establish a session with the same service that was -initially contacted. If the bearer or port fields have been excluded, then -the orginal bearer and port should be used to contact the new server. The -WSP Specification, July 2001, defines an Address Type (8.2.2.3) upon which -this class is based. -@publishedAll -@released -*/ - { -public: // Attributes - - /** A flag to indicate that the port field is set. - */ - //##ModelId=3C4C41B200DD - TBool iHasPort; - - /** A flag to indicate that the bearer field is set. - */ - //##ModelId=3C4C41B200CB - TBool iHasBearer; - - /** The proxy address. - */ - //##ModelId=3C4C41B200C1 - TBuf8 iProxyAddress; - - /** The port number. - */ - //##ModelId=3C4C41B200B5 - TUint16 iPort; - - /** The bearer type. - */ - //##ModelId=3C4C41B200A3 - Wap::TWspBearer iBearer; - }; - -/** -Maximum length of a key ID for WTLS -@publishedAll -@released -*/ -const TInt KWtlsMaxKeyIdLength = 512; - -class TWtlsKeyExchangeSuite -/** -The class TWtlsKeyExchangeSuite contain the definitions of WTLS -Key Exchange Suites as defined in the WAP WTLS Specification, July 2001 -@publishedAll -@released -*/ - { -public: - enum TKeyExchangeSuite - { - ENULL =0, - ESHARED_SECRET =1, - EDH_anon =2, - EDH_anon_512 =3, - EDH_anon_768 =4, - ERSA_anon =5, - ERSA_anon_512 =6, - ERSA_anon_768 =7, - ERSA =8, - ERSA_512 =9, - ERSA_768 =10, - EECDH_anon =11, - EECDH_anon_113 =12, - EECDH_anon_131 =13, - EECDH_ECDSA =14, - EECDH_anon_uncomp =15, - EECDH_anon_uncomp_113 =16, - EECDH_anon_uncomp_131 =17, - EECDH_ECDSA_uncomp =18 - }; - enum TKeyIdType - { - EIdNull = 0, - EText = 1, - EBinary = 2, - EKeyHashSha = 254, - EX509Name = 255 - }; - -public: - TWtlsKeyExchangeSuite(TKeyExchangeSuite aKeyExchangeSuite, TKeyIdType aKeyIdType, const TBuf8& aKeyId); - -public: - TKeyExchangeSuite iKeyExchangeSuite; - TKeyIdType iKeyIdType; - TBuf8 iKeyId; - }; - -class TWtlsCipherSuite -/** -The class TWtlsCipherSuite encapsulates a WTLS cipher suite as defined in -the WAP WTLS Specification, July 2001 -This is a pair made up of a Bulk Encryption Algorithm and a Mac Algorithm -@publishedAll -@released -*/ - { -public: - - enum TBulkEncryptionAlgorithm - { - ENULL =0, - ERC5_CBC_40 =1, - ERC5_CBC_56 =2, - ERC5_CBC =3, - EDES_CBC_40 =4, - EDES_CBC =5, - E3DES_CBC_EDE =6, - EIDEA_CBC_40 =7, - EIDEA_CBC_56 =8, - EIDEA_CBC =9, - ERC5_CBC_64 =10, - EIDEA_CBC_64 =11 - }; - - enum TMacAlgorithm - { - ESHA_0 =0, - ESHA_40 =1, - ESHA_80 =2, - ESHA =3, -// N/A (removed) =4, - EMD5_40 =5, - EMD5_80 =6, - EMD5 =7, - }; - - TWtlsCipherSuite(TBulkEncryptionAlgorithm aBulkEncryptionAlgorithm, TMacAlgorithm aMacAlgorithm); - -public: - TBulkEncryptionAlgorithm iBulkEncryptionAlgorithm; - TMacAlgorithm iMacAlgorithm; - }; - -inline TWtlsCipherSuite::TWtlsCipherSuite(TBulkEncryptionAlgorithm aBulkEncryptionAlgorithm, TMacAlgorithm aMacAlgorithm) - : iBulkEncryptionAlgorithm(aBulkEncryptionAlgorithm), iMacAlgorithm(aMacAlgorithm) - { - } - -inline TWtlsKeyExchangeSuite::TWtlsKeyExchangeSuite(TKeyExchangeSuite aKeyExchangeSuite, TKeyIdType aKeyIdType, const TBuf8& aKeyId) - : iKeyExchangeSuite(aKeyExchangeSuite), iKeyIdType(aKeyIdType), iKeyId(aKeyId) - { - } - - -#endif // __WSPTYPES_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengattr.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengattr.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,192 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Attribute node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_ATTR_H_INCLUDED +#define XMLENGINE_ATTR_H_INCLUDED + +#include "xmlengnode.h" + +/** + * Instance of TXmlEngAttr class represents an XML attribute in the DOM tree. + * + * Is a storage attributes properties. Implements DOM action for it. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngAttr : public TXmlEngNode +{ + public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngAttr(); + + + /** + * Clones attribute node + * + * @since S60 v3.1 + * @return A copy of the attribute with its value + * + * @note Namespace of the attribute is reset; use + * TXmlEngNode::CopyToL(TXmlEngNode), which finds appropriate or creates + * new namespace declaration on the new parent node (argument should be + * an TXmlEngElement handle) + * + * @see CopyToL(TXmlEngNode) + */ + IMPORT_C TXmlEngAttr CopyL() const; + + /** + * Get owner element + * + * @since S60 v3.1 + * @return TXmlEngElement that contains the attribute + * + * Same as TXmlEngNode::ParentNode() but returns TXmlEngElement + * instead of TXmlEngNode. + * + * @note Copies of attributes [TXmlEngAttr::CopyL()] and newly created + * attribute nodes [RXmlEngDocument::CreateAttributeL(..)] do not have + * parent element until they are attached to some element. + */ + IMPORT_C const TXmlEngElement OwnerElement() const; + + /** + * Check attribute name. + * + * @since S60 v3.1 + * @return Local name of the attribute + * + * @note Equal to TXmlEngNode::Name(), but works faster. + * + * Never call this on NULL object! + * @see TXmlEngNode::Name() + */ + IMPORT_C TPtrC8 Name() const; + + /** + * Get element value. + * + * @since S60 v3.1 + * @return Attribute's contents + * + * @note For values consisting of more then one TXmlEngTextNode node + * (as attribute's child) returns only the begining of the value; + * this happens when the value is represented by list of TXmlEngTextNode + * and TXmlEngEntityReference nodes. + * + * @see IsSimpleContents(), WholeValueCopyL() + */ + IMPORT_C TPtrC8 Value() const; + + /** + * Get copy of attribute content + * + * @since S60 v3.1 + * @return Complex value of the attribute, + * probably consisting of text nodes and entity references + * + * Since the value may be composed from a set of TXmlEngTextNode + * and EntityRefernce nodes, the returned result is newly allocated + * string, which should be freed by caller. + * + * BE SURE TO FREE THE RESULT STRING!!! + * + * Example usage of the API: + * @code + * RBuf8 value; + * attr.WholeValueCopyL(value); + * ... + * value.Close(); + * @endcode + * + * @see TXmlEngAttr::Value(), TXmlEngNode::Value(), + * TXmlEngNode::IsSimpleTextContents(), + * TXmlEngNode::WholeTextContentsCopyL() + * + * @note In most cases using Value() is enough (and it needs no memory allocation). + * Use IsSimpleTextContents() if there doubts can Value() be used or not safely. + */ + IMPORT_C void WholeValueCopyL(RBuf8& aBuffer) const; + + /** + * Sets new value of the attribute. Provided new value will be escaped + * as needed. + * + * @ since S60 v3.1 + * @param aNewValue A string value for the attribute + * + * The new value should not contain entity references. + * Entity references are not expanded, but used as text, because + * the ampersand (&) character of reference is escaped. + * + * @see SetEscapedValueL(const TDesC8&) + */ + IMPORT_C void SetValueL(const TDesC8& aNewValue); + + /** + * Sets new value from escaped XML character data that may contain + * entity references. + * + * The value as if it is an escaped contents from XML file. + * If the value contains entity references, then the resulting + * content of the attribute is a list of TXmlEngTextNode + * and TXmlEngEntityRefeerence nodes. + * Predefined entities are converted into characters they represent. + * + * @param aNewValue is a new attribute value + * @since S60 v3.1 + * + * @see TXmlEngAttr::SetValueL(const TDesC8&) + */ + IMPORT_C void SetEscapedValueL(const TDesC8& aNewValue); + + /** + * Sets new attribute value exactly as presented in the string. + * + * Predefined entities are not converted into characters they represent. + * + * @param aNewValue is a new attribute value + * @since S60 v3.2 + * + * @see TXmlEngAttr::SetValueL(const TDesC8&) + */ + IMPORT_C void SetValueNoEncL(const TDesC8& aNewValue ); + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal attribute pointer + */ + inline TXmlEngAttr(void* aInternal); +}; + +#include "xmlengattr.inl" + +#endif /* XMLENGINE_ATTR_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengattr.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengattr.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Attribute node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngAttr::TXmlEngAttr() + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngAttr::TXmlEngAttr(void* aInternal):TXmlEngNode(aInternal) + { + } + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengbinarycontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengbinarycontainer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,103 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: All binary data functions +* +*/ + + + + + + + +#ifndef XMLENGINE_BINARYCONTAINER_H_INCLUDED +#define XMLENGINE_BINARYCONTAINER_H_INCLUDED + +#include "xmlengdatacontainer.h" + +/** +* Instance of TXmlEngBinaryContainer class represents binary data in +* DOM tree. +* +* Binary data is treated in general as text nodes in DOM tree. +* Some of the fields in xmlNode structure are reused in order to save memory. +* Data is stored in process's heap memory. +* +* Sample code for creating binary container: +* @code +* RXmlEngDOMImplementation domImpl; +* domImpl.OpenL(); ///< opening DOM implementation object +* RXmlEngDocument iDoc; +* ///< create document element +* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); +* ///< create binary container from buffer (str1) and CID equals cid +* TXmlEngBinaryContainer binData=iDoc.CreateBinaryContainerL(cid,*str1); +* elem.AppendChildL(binData); ///< append container to the dom tree +* iDoc.Close(); ///< closing all opened objects +* domImpl.Close(); +* @endcode +* +* @lib XmlEngineDOM.lib +* @since S60 v3.2 +*/ +class TXmlEngBinaryContainer : public TXmlEngDataContainer +{ +public: + + /** + * Get content of the container. + * + * @since S60 v3.2 + * @return TPtrC8 with container content + * + */ + IMPORT_C TPtrC8 Contents() const; + + /** + * Sets contents of binary container + * + * @since S60 v3.2 + * @param aNewContents The actual value to store + */ + IMPORT_C void SetContentsL( const TDesC8& aNewContents ); + + /** + * Appends contents to binary container + * + * @since S60 v3.2 + * @param aData Content to be appended to current content + */ + EXPORT_C void AppendContentsL( const TDesC8& aData ); + + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngBinaryContainer(); + +protected: + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal node pointer + */ + inline TXmlEngBinaryContainer(void* aInternal); +}; + +#include "xmlengbinarycontainer.inl" + +#endif /* XMLENGINE_BINARYCONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengbinarycontainer.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengbinarycontainer.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Binary data node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// + +inline TXmlEngBinaryContainer::TXmlEngBinaryContainer():TXmlEngDataContainer(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// + +inline TXmlEngBinaryContainer::TXmlEngBinaryContainer(void* aInternal):TXmlEngDataContainer(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengcdatasection.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengcdatasection.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,58 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: CDATASection node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_CDATASECTION_H_INCLUDED +#define XMLENGINE_CDATASECTION_H_INCLUDED + +#include "xmlengtext.h" + +/** + * Instance of TXmlEngCDATASection class represents an XML CDATASection in the DOM tree. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngCDATASection : public TXmlEngTextNode +{ +public: + /** + * Default constructor + */ + inline TXmlEngCDATASection(); + + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal CDATASection pointer + */ + inline TXmlEngCDATASection(void* aInternal); +}; + + + +#include "xmlengcdatasection.inl" + +#endif /* XMLENGINE_CDATASECTION_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengcdatasection.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengcdatasection.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Data section node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngCDATASection::TXmlEngCDATASection():TXmlEngTextNode(NULL) + { + } + + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngCDATASection::TXmlEngCDATASection(void* aInternal):TXmlEngTextNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengcharacterdata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengcharacterdata.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,105 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: All text nodes functions +* +*/ + + + + + + + +#ifndef XMLENGINE_CHARACTERDATA_H_INCLUDED +#define XMLENGINE_CHARACTERDATA_H_INCLUDED + +#include "xmlengnode.h" + +/** +* Instance of TXmlEngCharacterData class represents all kinds of XML text nodes +* (i.e. text node, comment node) in the DOM tree. +* +* Describe DOM action for nodes that contains text data. +* DOM spec: +* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306 +* +* @lib XmlEngineDOM.lib +* @since S60 v3.1 +*/ +class TXmlEngCharacterData : public TXmlEngNode +{ +public: + + /** + * Get content of the node. + * + * @since S60 v3.1 + * @return String with nodes content + * + * This method applies to TXmlEngCDATASection, TXmlEngComment and TXmlEngTextNode nodes. + */ + IMPORT_C TPtrC8 Contents() const; + + /** + * Sets contents of basic character nodes: TXmlEngTextNode, TXmlEngComment, TXmlEngCDATASection + * + * @since S60 v3.1 + * @param aNewContents The actual value to store + * + * The input is taken as non-escaped: for example, + * aNewContents = "123 > 34 && P" will be serialized as "123 > 34 && P" + * + * Escaped contents may be set only for TXmlEngElement and TXmlEngAttr nodes. + * @see TXmlEngAttr::SetEscapedValueL(const TDesC8&), TXmlEngElement::SetEscapedTextL(const TDesC8&), + */ + IMPORT_C void SetContentsL(const TDesC8& aNewContents); + + /** + * Extends the contents of the node by appending aString + * + * @since S60 v3.1 + * @param aString Content to be added to current content + */ + IMPORT_C void AppendContentsL(const TDesC8& aString); + + /** + * Get length of the content + * + * @since S60 v3.1 + * @return Number of characters in the contents + */ + IMPORT_C TUint Length() const; + +protected: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngCharacterData(); // protected from API users + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal node pointer + */ + inline TXmlEngCharacterData(void* aInternal); +}; + + +#include "xmlengcharacterdata.inl" + +#endif /* XMLENGINE_CHARACTERDATA_H_INCLUDED */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengcharacterdata.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengcharacterdata.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Character data node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngCharacterData::TXmlEngCharacterData() + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngCharacterData::TXmlEngCharacterData(void* aInternal):TXmlEngNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengchunkcontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengchunkcontainer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,104 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: All memory chunk data functions +* +*/ + + + + + + + +#ifndef XMLENGINE_CHUNKCONTAINER_H_INCLUDED +#define XMLENGINE_CHUNKCONTAINER_H_INCLUDED + +#include "xmlengdatacontainer.h" + + +/** +* Instance of TXmlEngChunkContainer class represents data stored in RChunks in DOM tree +* +* RChunk data is treated in general as text nodes in DOM tree. +* Some of the fields in xmlNode structure are reused in order to save memory. +* Data is stored in memory referenced to by RChunk. +* +* Sample code for creating chunk container: +* @code +* RXmlEngDOMImplementation domImpl; +* domImpl.OpenL(); ///< opening DOM implementation object +* RXmlEngDocument iDoc; +* ///< create document element +* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); +* ///< create RChunk object with chunkName name and size +* RChunk chunk; +* chunk.CreateGlobal(chunkName, size, maxSize); +* CleanupClosePushL(chunk); +* ///< create chunk container from Rchunk object with offset to the +* ///< binary data in chunk and binary data size in chunk (binarySize) +* TXmlEngChunkContainer binData = iDoc.CreateChunkContainerL( +* cid,chunk,offset,binarySize); +* ///< append chunkcontainer to the dom tree +* TXmlEngNode ref = iDoc.DocumentElement().AppendChildL(binData); +* ///< closing all opened objects +* CleanupStack::PopAndDestroy();//chunk +* iDoc.Close(); +* domImpl.Close(); +* @endcode +* +* @lib XmlEngineDOM.lib +* @since S60 v3.2 +*/ +class TXmlEngChunkContainer : public TXmlEngDataContainer +{ +public: + /** + * Get memory chunk reference + * + * @since S60 v3.2 + * @return Memory chunk reference + * + */ + IMPORT_C RChunk& Chunk() const; + + /** + * Get offset of binary data in memory chunk + * + * @since S60 v3.2 + * @return Offset of binary data in memory chunk + */ + IMPORT_C TUint ChunkOffset() const; + +protected: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngChunkContainer(); + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal node pointer + */ + inline TXmlEngChunkContainer(void* aInternal); +}; + + + +#include "xmlengchunkcontainer.inl" + +#endif /* XMLENGINE_CHUNKCONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengchunkcontainer.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengchunkcontainer.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: RChunk container functions +* +*/ + + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngChunkContainer::TXmlEngChunkContainer():TXmlEngDataContainer(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngChunkContainer::TXmlEngChunkContainer(void* aInternal):TXmlEngDataContainer(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengcomment.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengcomment.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Comment node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_COMMENT_H_INCLUDED +#define XMLENGINE_COMMENT_H_INCLUDED + +#include "xmlengcharacterdata.h" + +/** + * Instance of TXmlEngComment class represents an XML comments in the DOM tree. + * + * DOM spec: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306 + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngComment : public TXmlEngCharacterData +{ +public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngComment(); + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal Comment pointer + */ + inline TXmlEngComment(void* aInternal); +}; + +#include "xmlengcomment.inl" + +#endif /* XMLENGINE_COMMENT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengcomment.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengcomment.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,39 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Comment node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngComment::TXmlEngComment():TXmlEngCharacterData(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngComment::TXmlEngComment(void* aInternal):TXmlEngCharacterData(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdatacontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdatacontainer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,82 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: All binary data functions +* +*/ + + + + + + + +#ifndef XMLENGINE_DATACONTAINER_H_INCLUDED +#define XMLENGINE_DATACONTAINER_H_INCLUDED + +#include "xmlengnode.h" + + +/** +* TXmlEngDataContainer is a class for representing different types +* of binary data in DOM tree. +* +* It can be cusom-serialized using MXmlEngDataSerializer interface which can +* be set in TXmlEngSerializationOptions used for saving the tree. +* +* @lib XmlEngineDOM.lib +* @since S60 v3.2 +*/ +class TXmlEngDataContainer : public TXmlEngNode +{ +public: + + /** + * Get CID of data container. + * + * @since S60 v3.2 + * @return Cid of data container + * + */ + IMPORT_C TPtrC8 Cid() const; + + /** + * Get data size in bytes + * + * @since S60 v3.1 + * @return Number of bytes occupied by data + */ + IMPORT_C TUint Size() const; + +protected: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngDataContainer(); + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal node pointer + */ + inline TXmlEngDataContainer(void* aInternal); +}; + + + +#include "xmlengdatacontainer.inl" + +#endif /* XMLENGINE_DATACONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdatacontainer.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdatacontainer.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,43 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Binary data node functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// + +inline TXmlEngDataContainer::TXmlEngDataContainer() + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// + +inline TXmlEngDataContainer::TXmlEngDataContainer(void* aInternal):TXmlEngNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdataserializer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdataserializer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,51 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface class describing class that may be used as +* serializer for binary data +* +*/ + + + + + + + +#ifndef XMLENGINE_MDATASERIALIZER_H_INCLUDED +#define XMLENGINE_MDATASERIALIZER_H_INCLUDED + +#include "xmlengnode.h" + +/** + * MXmlEngDataSerializer interface used by XML Engine to serialize binary data for example binary data + * stored in node, external memory chunk (RChunk) or file. This interface may be implemented by client application. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.2 + */ +class MXmlEngDataSerializer + { +public: + /** + * Callback for serializing data + * + * @since S60 v3.1 + * @param aNode is a node to serialize + * @return Replacement string for node data + */ + virtual TPtrC8 SerializeDataL(TXmlEngNode aNode) = 0; + }; + + +#endif /* XMLENGINE_MDATASERIALIZER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdocument.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdocument.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,573 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Document node functions +* +*/ + + + + + + +#ifndef XMLENGINE_DOCUMENT_H_INCLUDED +#define XMLENGINE_DOCUMENT_H_INCLUDED + +#include + +#include "xmlengnode.h" +#include "xmlengserializationoptions.h" + +// FORWARD DECLARATION +class RXmlEngDOMImplementation; + +/** + * Instance of RXmlEngDocument class represents an XML document in the DOM tree. + * + * Is a storage all nodes and information about XML data. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class RXmlEngDocument : public TXmlEngNode +{ +public: + /** + * Default constructor. + * + * Instance of RXmlEngDocument must be "opened" with one of OpenL() overloads. + * + * @since S60 v3.1 + */ + IMPORT_C RXmlEngDocument(); + + /** + * Opens the document. + * + * @since S60 v3.2 + * @param aDOMImpl DOM implementation object + * @return KErrNone if succeed. + */ + IMPORT_C void OpenL(RXmlEngDOMImplementation& aDOMImpl); + + /** + * Opens the document. + * + * @since S60 v3.2 + * @param aDOMImpl DOM implementation object + * @param aInternal Document pointer + * @return KErrNone if succeed. + */ + IMPORT_C void OpenL(RXmlEngDOMImplementation& aDOMImpl, void* aInternal); + + /** + * Opens the document. + * + * @since S60 v3.2 + * @param aDOMImpl DOM implementation object + * @param aRoot element taht will be root of the DOM tree + * @return KErrNone if succeed. + */ + IMPORT_C void OpenL(RXmlEngDOMImplementation& aDOMImpl, TXmlEngElement aRoot); + + /** + * Closes document + * + * @since S60 v3.1 + */ + IMPORT_C void Close(); + + /** + * Serializes document tree into a file. For nodes containing binary data in the form of BinaryDataContainer, + * FileContainer or ChunkContainer, client can implement custom serialization by implementing the interface + * MXmlEngDataSerializer and specify the pointer in iDataSerializer member of aSaveOptions parameter. If no + * custom serialization is specified, the binary data container nodes are serialized like text nodes. + * + * @since S60 v3.2 + * @param aFileName A file name (with path) + * @param aRoot Root node to be serialized + * @param aSaveOptions Options that control how serialization is performed + * @return Number of byte written + * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding, KErrDiskFull. + */ + IMPORT_C TInt SaveL( const TDesC& aFileName, + TXmlEngNode aRoot = TXmlEngNode(), + const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions() ) const; + + /** + * Serializes document tree into a file. For nodes containing binary data in the form of BinaryDataContainer, + * FileContainer or ChunkContainer, client can implement custom serialization by implementing the interface + * MXmlEngDataSerializer and specify the pointer in iDataSerializer member of aSaveOptions parameter. If no + * custom serialization is specified, the binary data container nodes are serialized like text nodes. + * + * @since S60 v3.2 + * @param aRFs File Server session + * @param aFileName A file name (with path) + * @param aRoot Root node to be serialized + * @param aSaveOptions Options that control how serialization is performed + * @return Number of byte written + * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding, KErrDiskFull. + */ + IMPORT_C TInt SaveL( RFs& aRFs, + const TDesC& aFileName, + TXmlEngNode aRoot = TXmlEngNode(), + const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions() ) const; + + /** + * Serializes a document tree into provided output stream, which supports progressive writing of data. + * For nodes containing binary data in the form of BinaryDataContainer, FileContainer or ChunkContainer, + * client can implement custom serialization by implementing the interface MXmlEngDataSerializer and specify + * the pointer in iDataSerializer member of aSaveOptions parameter. If no custom serialization is specified, + * the binary data container nodes are serialized like text nodes. + * + * @since S60 v3.1 + * @param aStream An output stream to write serialized DOM tree + * @param aRoot Root node to be serialized + * @param aSaveOptions Options that control how serialization is performed + * @return Number of byte written + * @leave KXmlEngErrWrongUseOfAPI or one of general codes (e.g.KErrNoMemory) + * @see MXmlEngOutputStream + */ + IMPORT_C TInt SaveL( MXmlEngOutputStream& aStream, + TXmlEngNode aRoot = TXmlEngNode(), + const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions() ) const; + + /** + * Saves document tree into memory buffer + * + * @since S60 v3.1 + * @param aBuffer Resulting buffer + * @param aRoot A "root" of the subtree to serialize + * @param aSaveOptions Various options to be effective during serialization + * @return Number of bytes in updated buffer + * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding. + * + * @note Result returned via aBuffer argument owns the memory buffer; it is up to + * method caller to free it like in this sample: + * + * @see TXmlEngSerializationOptions + */ + IMPORT_C TInt SaveL(RBuf8& aBuffer, + TXmlEngNode aRoot = TXmlEngNode(), + const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions()) const; + + /** + * Creates complete copy of the document + * + * @since S60 v3.1 + * @return Complete copy of the document tree + */ + IMPORT_C RXmlEngDocument CloneDocumentL() const; + + /** + * Creates new element from specific namespace to be a root of the document tree. + * Any existing document element of the document is destroyed + * + * @since S60 v3.1 + * @param aName Element name + * @param aNamespaceUri Element namespace URI + * @param aPrefix Element namemespace prefix + * @return A new root element + */ + IMPORT_C TXmlEngElement CreateDocumentElementL(const TDesC8& aName, + const TDesC8& aNamespaceUri = KNullDesC8, + const TDesC8& aPrefix = KNullDesC8); + + /** + * Replaces (and destroys) document element with another one + * New document element is added as the last child to the document node + * + * @since S60 v3.1 + * @param aNewDocElement New document tree + * + * @note Use TXmlEngElement::ReconcileNamespacesL() on the new document element + * if it or its descendants can contain references to namespace declarations + * out of the element + * @see TXmlEngElement::ReconcileNamespacesL() + */ + IMPORT_C void SetDocumentElement(TXmlEngElement aNewDocElement); + + /** + * Get document encoding + * + * @since S60 v3.1 + * @return Encoding of the source XML data. + */ + IMPORT_C TPtrC8 XmlEncoding() const; + + /** + * Get xml version + * + * @since S60 v3.1 + * @return Version number of XML taken from XML declaration + */ + IMPORT_C TPtrC8 XmlVersion() const; + + /** + * Retrieves base URI (if defined) of the document or NULL + * + * @since S60 v3.1 + * @return Document URI + */ + IMPORT_C TPtrC8 DocumentUri() const; + + /** + * Check if document is standalone + * + * @since S60 v3.1 + * @return Whether standalone="true" was specified in XML declaration in the source XML file. + */ + IMPORT_C TBool IsStandalone() const; + + /** + * Sets XML version number to be shown in XML declaration when document is serialized. + * + * @since S60 v3.1 + * @param aVersion New version + */ + IMPORT_C void SetXmlVersionL(const TDesC8& aVersion); + + /** + * Sets location of the document. + * Document's URI is used as top-level base URI definition. + * + * @since S60 v3.1 + * @param aUri New document URI + */ + IMPORT_C void SetDocumentUriL(const TDesC8& aUri); + + /** + * Sets 'standalone' attribute of XML declaration for a document + * + * @since S60 v3.1 + * @param aStandalone Is document standalone + */ + IMPORT_C void SetStandalone(TBool aStandalone); + + /** + * Get dom implementation. + * + * @since S60 v3.1 + * @return Object that represents current DOM implementation + * + * @note There is no practical use of implementation object in this version + * of API other than for creating new RXmlEngDocument instances, but + * it will change in the future, when an implementation object + * is used for changing configuration settings at run-time. + */ + IMPORT_C RXmlEngDOMImplementation Implementation() const; + + /** + * Get document element + * + * @since S60 v3.1 + * @return A document element - the top-most element in the document tree + */ + IMPORT_C TXmlEngElement DocumentElement() const; + + /** + * Sets "document" property on the node and all its descendants to be this RXmlEngDocument node + * + * @since S60 v3.1 + * @param aSource Node that should be added. + * @return Adopted node + */ + IMPORT_C TXmlEngNode AdoptNodeL(TXmlEngNode aSource); + + /** + * Creates new attribute, + * + * @since S60 v3.1 + * @param aName Name of the atribute; no prefix allowed + * @param aValue Value of the attribute (optional) + * @return Handler to the newly created attribute + * + * @note + * aValue should represent a correct value of an attribute if it is put as is into XML file + * (with all characters correctly escaped with entity references when XML spec requires) + * + * TXmlEngElement class provides a rich set of attribute creation methods, which not + * just create attribute but also link it into element. + * + * There is no way to create attributes with namespace (despite the DOM spec); + * you have to use one of the TXmlEngElement::AddNewAttributeL(..) methods instead + * + * Returned handler is the only reference to the allocated memory + * until you have attached the attribute to some element node + */ + IMPORT_C TXmlEngAttr CreateAttributeL(const TDesC8& aName, + const TDesC8& aValue = KNullDesC8); + + /** + * Creates new text node and copies the content string into it. + * + * @since S60 v3.1 + * @param aCharacters Text node content + * @return Created node + */ + IMPORT_C TXmlEngTextNode CreateTextNodeL(const TDesC8& aCharacters = KNullDesC8); + + /** + * Creates new binary container and copies the content string into it. + * Pointer to the container is stored in the document's + * data container list that can be fetched using GetDataContainerList(). + * @see GetDataContainerList( RArray& aList ) + * + * @since S60 v3.2 + * @param aCid Content identifier + * @param aData Binary octets + * @return Created node + */ + IMPORT_C TXmlEngBinaryContainer CreateBinaryContainerL( const TDesC8& aCid, + const TDesC8& aData ); + + /** + * Creates new chunk container that stores reference to + * memory chunk. + * Pointer to the container is stored in the document's + * data container list that can be fetched using GetDataContainerList(). + * @see GetDataContainerList( RArray& aList ) + * + * @since S60 v3.2 + * @param aCid Content identifier + * @param aChunk RChunk reference + * @param aChunkOffset Offset to the binary data in aChunk + * @param aDataSize Size of binary data in aChunk + * @return Created node + */ + IMPORT_C TXmlEngChunkContainer CreateChunkContainerL( const TDesC8& aCid, + const RChunk& aChunk, + const TInt aChunkOffset, + const TInt aDataSize ); + + /** + * Creates new file container that stores reference to + * file in file system. + * Pointer to the container is stored in the document's + * data container list that can be fetched using GetDataContainerList(). + * @see GetDataContainerList( RArray& aList ) + * + * @since S60 v3.2 + * @param aCid Content identifier + * @param aFile RFile reference + * @return Created node + */ + IMPORT_C TXmlEngFileContainer CreateFileContainerL( const TDesC8& aCid, + const RFile& aFile ); + + /** + * Creates new element node that belongs to specific namespace. + * A namespace declaration node is created on the element. + * + * @since S60 v3.1 + * @param aNamespaceUri Namespace of new element + * @param aPrefix Prefix to use for namespace binding and QName of the element + * @param aLocalName Local name of the element + * @return Created node + * @note If null namespace uri is provided element will be created without namespace. + */ + IMPORT_C TXmlEngElement CreateElementL(const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8, + const TDesC8& aPrefix = KNullDesC8); + + /** + * Creates new comment node and copies the content string into it. + * + * @since S60 v3.1 + * @param aText New comment + * @return Created node + */ + IMPORT_C TXmlEngComment CreateCommentL(const TDesC8& aText = KNullDesC8); + + /** + * Creates new CDATA section node and copies the content into it. + * + * @since S60 v3.1 + * @param aContents CDATASection content + * @return Created node + */ + IMPORT_C TXmlEngCDATASection CreateCDATASectionL(const TDesC8& aContents = KNullDesC8); + + /** + * Creates new entity reference node for aEntityName entity + * + * @since S60 v3.1 + * @param aEntityRef is a string in one of the forms: + * - name + * - &name + * - &name; + * where name is the name of the entity + * @return Created node + * + * @note < , > , ' , " and other predefined entity references + * should not be created with this method. These entity refs are rather + * "character references" and encoded/decoded automatically. + */ + IMPORT_C TXmlEngEntityReference CreateEntityReferenceL(const TDesC8& aEntityRef); + + /** + * Creates new processing instruction node and set its "target" and "data" values + * + * @since S60 v3.1 + * @param aTarget Target + * @param aData Data + * @return Created node + */ + IMPORT_C TXmlEngProcessingInstruction CreateProcessingInstructionL(const TDesC8& aTarget, + const TDesC8& aData = KNullDesC8); + + /** + * Registers specified attribute as xml:id. + * First parametr allows user, to specify sub-tree, not to search whole document. + * To search whole tree see @see RegisterXmlId(const TDesC8,const TDesC8) + * + * @since S60 v3.2 + * @param aStartElement Root of tree to search (should be part of the document) + * @param aLocalName Name of attribute + * @param aNamespaceUri Namespace of new element (default empty) + */ + IMPORT_C void RegisterXmlIdL(TXmlEngElement aStartElement, + const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8); + + /** + * Registers specified attribute as xml:id. + * Not to search whole tree see @see RegisterXmlId(TXmlEngElement,const TDesC8,const TDesC8) + * + * @since S60 v3.2 + * @param aLocalName Name of attribute + * @param aNamespaceUri Namespace of new element (default empty) + */ + IMPORT_C void RegisterXmlIdL(const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8); + + /** + * Looks for element with specified value of xml:id + * + * @since S60 v3.2 + * @param aValue Name of attribute + * @return found element or null-element. + */ + IMPORT_C TXmlEngElement FindElementByXmlIdL(const TDesC8& aValue ) const; + + /** + * Retrieves an array of data containers owned by this document. + * + * @note The document ceases to be the owner of data container when data container + * (or one of its predecessors) is removed from the document or data container + * (or one of its predecessors) becomes a part of another document. + * Unlinking data container (or one of its predecessors) doesn't remove + * ownership of data container from the this document so the list might + * contain containers that are not linked to this document anymore. + * @since S60 v3.2 + * @param aList Array of data containers + */ + IMPORT_C void GetDataContainerList( RArray& aList ); + +protected: + friend class RXmlEngDOMParser; + friend class TXmlEngNode; + friend class TXmlEngAttr; + friend class TXmlEngElement; + friend class RXmlEngDOMImplementation; + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal Document pointer + */ + inline RXmlEngDocument(void* aInternal); + + /** + * DISABLED for document; CloneDocumentL() must be used + * + * @since S60 v3.1 + */ + inline TXmlEngNode CopyL() const; + + /** + * DISABLED for document; Destroy() must be used + * + * @since S60 v3.1 + */ + inline void Remove(); + + /** + * DISABLED for document; Destroy() must be used + * + * @since S60 v3.1 + */ + inline void ReplaceWith(TXmlEngNode aNode); +private: + /** + * Main implementation of SaveL() functions that puts together all common code + * and serializes to buffer or output stream. + * + * @since S60 v3.2 + * @param aNode Root node to be serialized + * @param aBuffer buffer with serialized data. + * @param aOutputStream stream that should be used during serialization + * @param aSaveOptions Options that control how serialization is performed + * @return Number of bytes written + * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding, KErrDiskFull. + */ + TInt SaveNodeL( TXmlEngNode aNode, + RBuf8& aBuffer, + MXmlEngOutputStream* aOutputStream = NULL, + TXmlEngSerializationOptions aOpt = TXmlEngSerializationOptions()) const; + + /** + * "Secondary" constructor that should be called on every newly created document node. + * Initializes container for nodes owned by the document. + * + * The need for such secondary constructor is in the fact that underlying libxml2 + * library knows nothing about ownership of unlinked nodes -- this feature is + * implemented in C++ DOM wrapper. + * + * @since S60 v3.1 + */ + void InitOwnedNodeListL(); + + /** + * Adds aNode to the list of owned nodes - the nodes that are not linked yet into a + * document tree, but still destroyed with the document that owns them. + * + * @since S60 v3.1 + * @param aNode Node that should be added to document + * + * In case of OOM (during growing node list container) the argument node is freed with + * xmlFreeNode() + */ + void TakeOwnership(TXmlEngNode aNode); + + /** + * Remove aNode from the list of owned nodes. + * + * @since S60 v3.1 + * @param aNode Node that should be removed from document + */ + void RemoveOwnership(TXmlEngNode aNode); + +protected: + /** Pointer to DOM implementation object */ + RXmlEngDOMImplementation* iImpl; + +};// class RXmlEngDocument + + + +#include "xmlengdocument.inl" + +#endif /* XMLENGINE_DOCUMENT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdocument.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdocument.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,33 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Document node functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline RXmlEngDocument::RXmlEngDocument(void* aInternal):TXmlEngNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdocumentfragment.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdocumentfragment.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,60 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Document fragment node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_DOCUMENTFRAGMENT_H_INCLUDED +#define XMLENGINE_DOCUMENTFRAGMENT_H_INCLUDED + +#include "xmlengnode.h" + + + +/** + * Instance of TXmlEngDocumentFragment class represents an document fragment of the DOM tree. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngDocumentFragment : public TXmlEngNode +{ +public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngDocumentFragment(); + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal Document fragment pointer + */ + inline TXmlEngDocumentFragment(void* aInternal); +}; + +#include "xmlengdocumentfragment.inl" + +#endif /* XMLENGINE_DOCUMENTFRAGMENT_H_INCLUDED */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdocumentfragment.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdocumentfragment.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Document fragment node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngDocumentFragment::TXmlEngDocumentFragment():TXmlEngNode(NULL) + { + } + + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngDocumentFragment::TXmlEngDocumentFragment(void* aInternal):TXmlEngNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdom.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdom.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: This file is to be included by DOM API clients +* +*/ + + + + + + + +#ifndef XMLENGINE_DOM_H_INCLEDED +#define XMLENGINE_DOM_H_INCLEDED + +#include "XmlEngAttr.h" +#include "XmlEngElement.h" +#include "XmlEngDocument.h" +#include "XmlEngElement.h" +#include "XmlEngCDATASection.h" +#include "XmlEngProcessingInstruction.h" +#include "XmlEngComment.h" +#include "XmlEngDocumentFragment.h" +#include "XmlEngEntityReference.h" +#include "XmlEngNamespace.h" +#include "XmlEngText.h" + +#include "XmlEngBinaryContainer.h" +#include "XmlEngChunkContainer.h" +#include "XmlEngFileContainer.h" + +#include "XmlEngNodeList.h" + +#include "XmlEngErrors.h" +#include "xmlengserializationoptions.h" +#include "xmlengnodefilter.h" +#include "xmlengoutputstream.h" //pjj18 new +#include "xmlengdataserializer.h" //pjj18 new +#include "xmlenguserdata.h" +#include "xmlengdomimplementation.h" +#include "xmlengdomparser.h" + + +#endif // XMLENGINE_DOM_H_INCLEDED + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdomimplementation.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdomimplementation.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,70 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: DOM implementation functions +* +*/ + + + + + + + +#ifndef XMLENGINE_DOMIMPLEMENTATION_H_INCLUDED +#define XMLENGINE_DOMIMPLEMENTATION_H_INCLUDED + +#include + +/** + * The RXmlEngDOMImplementation interface provides a number of methods for performing + * operations that are independent of any particular instance of the document object model. + * + * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-102161490 + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class RXmlEngDOMImplementation +{ + public: + + + /** + * Open method needed to initialize the XmlEngineDOM library and should be called before using any + * class/function from this library. The initialization is required in every client thread in which + * it used. Calling this method multiple times in a thread is allowed. There should be a call to Close() + * for every call to Open, per thread. + * + * @since S60 v3.2 + * @param aHeap - pointer to client created heap. If aHeap argument is NULL (by default) + * client thread's default heap is used.- NOT IMPLEMENTED YET + * @return Document handle + */ + IMPORT_C void OpenL( RHeap* aHeap = NULL ); + + /** + * Close method. It does cleanup of resources used by XmlengineDOM library. Client should call this + * method at the end of library usage. The library should not be used after this call. If needed, client + * can initialize the library again by calling Open() method. Libxml2 uses Symbian implementation of POSIX + * standard libraries. During closure of XmlEngineDOM library, the standard library is also closed by default. + * User can choose not to close standard libraries when XmlEngine shuts down, by specifying FALSE in aCloseStdLib flag. + * + * @since S60 v3.2 + * @param aCloseStdLib A flag, if TRUE will close the STDLIB resources belonging to this thread. + * else STDLIB is not closed. + */ + IMPORT_C void Close(TBool aCloseStdLib = ETrue); +}; + +#endif /* XMLENGINE_DOMIMPLEMENTATION_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengdomparser.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengdomparser.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,184 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: DOM parser functions +* +*/ + + + + + + + +#ifndef XMLENGINE_DOMPARSER_H_INCLUDED +#define XMLENGINE_DOMPARSER_H_INCLUDED + +#include + +class RXmlEngDOMImplementation; +class RXmlEngDocument; + +/** + * DOM parser class implements methods for parsing XML data. + * + * Parse XML data in one chunk. Data can be parsed from file + * or memory buffer. + * + * Sample code for parsing from buffer: + * @code + * RXmlEngDOMImplementation domImpl; + * domImpl.OpenL(); ///< opening DOM implementation object + * RXmlEngDOMParser parser; + * parser.Open( domImpl ); ///< opening parser object + * RXmlEngDocument iDoc; + * iDoc =parser.ParseL( *aInput ); ///< parsing aInput - buffer + * iDoc.Close(); ///< closing all opened objects + * parser.Close(); + * domImpl.Close(); + * @endcode + * + * Sample code for parsing from file: + * @code + * RXmlEngDOMImplementation domImpl; + * domImpl.OpenL(); ///< opening DOM implementation object + * RXmlEngDOMParser parser; + * parser.Open( domImpl ); ///< opening parser object + * RXmlEngDocument iDoc; + * iDoc =parser.ParseFileL( aFileName ); ///< parsing from file + * iDoc.Close(); ///< closing all openend objects + * parser.Close(); + * domImpl.Close(); + * @endcode + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class RXmlEngDOMParser +{ +public: + /** + * Default constructor + */ + IMPORT_C RXmlEngDOMParser(); + + /** + * Opens the parser. + * + * @since S60 v3.2 + * @param aDOMImpl DOM implementation object + * @return KErrNone if succeed. + */ + IMPORT_C TInt Open(RXmlEngDOMImplementation& aDOMImpl); + + /** + * Closes the parser. + * + * @since S60 v3.2 + */ + IMPORT_C void Close(); + + /** + * Parses chunk of XML data from memory buffer and builds DOM RXmlEngDocument. + * + * @since S60 v3.2 + * @param aBuffer XML data buffer + * + * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) + */ + IMPORT_C void ParseChunkL(const TDesC8& aBuffer); + /** + * Creates document from parsed chunks of data. + * Should be called after parsing of allchunks. + * Ownership over returned RXmlEngDocument object is transferred to the caller of the method. + * + * @since S60 v3.2 + * @return RXmlEngDocument created document. + * + * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) + */ + IMPORT_C RXmlEngDocument FinishL(); + + /** + * Parses XML file and builds DOM RXmlEngDocument + * + * @since S60 v3.2 + * @param aRFs File server session + * @param aFileName File name + * @param aChunkSize Size of chunk (if 0 chunks won't be used) + * @return Document handle + * + * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) + */ + IMPORT_C RXmlEngDocument ParseFileL(RFs &aRFs, const TDesC& aFileName, TUint aChunkSize = 0); + + /** + * Parses XML file and builds DOM RXmlEngDocument + * + * @since S60 v3.2 + * @param aFileName File name + * @param aChunkSize Size of chunk (if 0 chunks won't be used) + * @return Document handle + * + * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) + */ + IMPORT_C RXmlEngDocument ParseFileL(const TDesC& aFileName, TUint aChunkSize = 0); + + /** + * Parses XML data from memory buffer and builds DOM RXmlEngDocument without chunks + * + * @since S60 v3.1 + * @param aBuffer XML data buffer + * @return Document handle + * + * @leave KXmlEngErrParsing code (besides system I/O error codes) + */ + IMPORT_C RXmlEngDocument ParseL(const TDesC8& aBuffer); + + /** + * Return last parsing error code. + * + * @since S60 v3.2 + * @return positive number + * + * @note Error codes are positive numbers. User can find them + * in XmlEngDErrors.h + */ + IMPORT_C TInt GetLastParsingError(); +private: + /** + * Parses XML file and builds DOM RXmlEngDocument without usage of chunks + * + * @param aRFs File server session + * @param aFileName File name + * @return Document handle + * + * @leave KXmlEngErrParsing code (besides system I/O error codes) + */ + RXmlEngDocument ParseFileWithoutChunksL(RFs& aRFs, const TDesC& aFileName); + + /** + * Cleanup internal data. + * + * @since S60 v3.2 + */ + void Cleanup(); +private: + void* iInternal; + TInt iError; + RXmlEngDOMImplementation* iImpl; +}; + + + +#endif /* XMLENGINE_DOMPARSER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengelement.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengelement.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,995 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Element node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_ELEMENT_H_INCLUDED +#define XMLENGINE_ELEMENT_H_INCLUDED + +#include "XmlEngAttr.h" +#include "XmlEngNamespace.h" + +template class RXmlEngNodeList; + + +/** + * Instance of TXmlEngElement class represents an XML element in the DOM tree. + * + * Namespace handling: + * + * Namespace of XML element is an URI that in pair with local part of + * element's name consistute expanded-name of element. It is said that "the element + * is of NNN namespace". + * + * XML elements are shown as belonging to a specific namespace by using prefixes + * that previously were bound to some namespace URIs. The scope of a prefix is the + * element, where it was declared and all its child (sub-)elements. + * + * Namespace declaration is created by using special xmlns:{prefix-name} + * attribute (which is not really considered as attribute in DOM): + * @code + * ... + * OR + * ... + * ... + * @endcode + * + * The latter two examples are equivalent and show the use of default namespace. + * + * Implementation notes: + * - Element having no namespace is either presented with a NULL TXmlEngNamespace node + * or a TXmlEngNamespace node that has NULL prefix and namespace URI set to "". + * The former is used by default on all nodes, whereas the latter is for cases + * when some node contains undeclaration of the default namespace: + * @code + * .. + * @endcode + * + * - The prefix of the default attribute is NULL, not "" (zero-length string) + * "" corresponds to + * @code + * ... + * @endcode + * (it does not contradict XML spec, but you are strongly advised against using this) + * + * - Prefix "xml" is reserved by XML Namespace spec for special purposes; it is implicitly bound + * to XML's namespace "http://www.w3.org/XML/1998/namespace" and no one is allowed + * to use this prefix except as with spec-defined elements and attributes or to rebind this + * prefix to other namespaces + * + * - Namespace URI may be "" only for default namespace. In other words, + * "" namespace URI may not be bound to non-NULL prefix. + * + * Declaration of "" namespace with NULL prefix results in: + * @code + * ... + * @endcode + * which undeclares any existing (in some parent element) default namespace + * for the scope of element 'a': element, its attributes and all child nodes of DOM tree. + * Note, that such "undeclaration" will be added only if neccessary. + * + * - Unneccessary namespace declaration are ignored. Attemps to add namespace binding + * using same namespace URI and prefix if such binding already exists in the scope + * will have no effect. + * + * - IMPORTANT! Attributes DO NOT HAVE default namespaces. If an attribute has no + * prefix, its namespace is undeclared even if there is some default namespaces for + * the scope of the element, which contains the attribute. + * + * So, it is wrong to write something like this: + * @code + * ... + * @endcode + * and assume that the attr belongs to namespace pointed to with ns_uri. + * + * HINTS: + * - Use namespace declaration nodes as much as possible (but watch out prefix collisions). + * - Add most referred to namespace declarations (AddNamespaceDeclarationL(uri,pref)) after + * any other namespace declarations in a element -- the will be found faster in + * namespace lookups. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ + +class TXmlEngElement : public TXmlEngNode +{ + public: + /** + * Default constructor for automatic variables (not initialized) + * + * @since S60 v3.1 + */ + inline TXmlEngElement(); + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal element pointer + */ + inline TXmlEngElement(void* aInternal); + + /** + * @name XmlEngine's non-DOM extensions + */ + /** @{ */ + + /** + * Retrieves list of attribute nodes of the element + * + * @param aList - a node list object to initialize + * + * Passed by reference list of nodes is initialized and after call to + * Attributes(..) is ready for use with HasNext() and Next() methods: + * + * @code + * ... + * TXmlEngElement root = doc.DocumentElement(); + * RXmlEngNodeList attlist; + * root.GetAttributes(attlist); + * while (attlist.HasNext()) + * processAttribute(attlist.Next()); + * ... + * attlist.Close(); + * @endcode + * + * @since S60 v3.1 + */ + IMPORT_C void GetAttributes(RXmlEngNodeList& aList) const; + + /** + * Retrieves list of child elements of the element + * + * @since S60 v3.1 + * @param aList - a node list object to initialize + * + * Passed by reference list of nodes is initialized and after the call + * it is ready for use with HasNext() and Next() methods: + * + * @note Returned list is a "filtered view" of the underlying + * list of all element's children (with text nodes, comments + * processing instructions, etc.) + */ + IMPORT_C void GetChildElements(RXmlEngNodeList& aList) const; + + /** + * Creates new attribute node out of any namespace (i.e. it has no prefix), + * sets attribute's value and links it as the last attribute of the current element + * + * @since S60 v3.1 + * @param aName A local name of attribute + * @param aValue Value to set for new attribute or NULL (sets value to "") + * @return A handler to the newly created attribute node; + * + * For adding attribute as the first one, use TXmlEngNode::SetAsFirstSibling() on the attribute: + * @code + * TXmlEngElement el = ... ; // get some element + * el.AddNewAttributeL("version","0.1").SetAsFirstSibling(); + * @endcode + * + * @see SetAsLastSibling(), MoveBeforeSibling(TXmlEngNode) and MoveAfterSibling(TXmlEngNode) + * + * @note - No checks are made that attribute with such name exists + * Use this method only on newly created elements! + * Otherwise, use TXmlEngElement::SetAttributeL(..) + * - Attributes do not inherit default namespace of its element + * (http://w3.org/TR/REC-xml-names/#defaulting) + * - attribute's value is the second argument in all AddNewAttributeL(..) methods + * - Use of NULL as value is more preferrable then "" + */ + IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, const TDesC8& aValue); + + /** + * Creates new attribute node and add it to the element + * + * Provided handle to namespace declaration is used to set up + * attribute's namespace. + * + * @since S60 v3.1 + * @param aName A local name of attribute + * @param aValue Value to set for new attribute or NULL (sets value to "") + * @param aNsDef Namespace to add to the attribute + * @return A handler to the newly created attribute node; + * + * @note If aNsDef is not defined in some of attributes ascendants + * (including this element), then + * ReconcileNamespacesL() method must be called on + * this element later. + */ + IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, + const TDesC8& aValue, + const TXmlEngNamespace aNsDef); + + /** + * Creates new attribute on the element. Namespace declaration for the attribute namespace is + * created too. + * + * @since S60 v3.1 + * @param aName A local name of attribute + * @param aValue Value to set for new attribute or NULL (sets value to "") + * @param aNsUri Namespace uri + * @param aPrefix Namespace prefix + * @return A handler to the newly created attribute node; + * + * @note + * - Namespace declarations are reused if possible (no redundant ones are created) + */ + IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, + const TDesC8& aValue, + const TDesC8& aNsUri, + const TDesC8& aPrefix); + + /** + * Creates new attribute node using namespace of its parent element (this element), + * sets attribute's value and links it as the last attribute of the element + * + * @since S60 v3.1 + * @param aName Local name of attribute + * @param aValue Value to set for new attribute or NULL (sets value to "") + * @return A handler to the newly created attribute node; + * + * For more hints how to use it refer to AddNewAttributeL(const TDesC8&,const TDesC8&) + * + * @note + * - No checks are made that attribute with such name exists + * - if namespace of the parent element is default (i.e. bound prefix is NULL), + * then temporary prefix will be used and bound to the same namespace URI as elements + * (It is due to the fact that default namespaces do not spread on unprefixed attributes, + * see http://w3.org/TR/REC-xml-names/#defaulting) + */ + inline TXmlEngAttr AddNewAttributeSameNsL(const TDesC8& aName, const TDesC8& aValue); + + /** + * Creates new attributes using namespace, which is bound to the specified prefix + * + * @since S60 v3.1 + * @param aLocalName A local name of attribute + * @param aValue Value to set for new attribute or NULL (sets value to "") + * @param aPrefix Namespace prefix for new attribute + * @return A handler to the newly created attribute node; + * + * Use this mothod only for construction of new parts of DOM tree, where + * you know for sure that prefix is bound in the given scope. + * @code + * TXmlEngElement el = parent.AddNewAttributeUsePrefixL("property","ObjName","rdf"); + * el.AddNewAttributeUsePrefixL("type", "xs:integer", "rdf"); + * @endcode + * + * Otherwise, you should check that prefix is bound like this example shows: + * @code + * TXmlEngNamespace boundNS = TXmlEngNamespace::LookupByPrefix(thisElement, prefix); + * if (boundNS.NotNull()){ + * thisElement.AddNewAttributeUsePrefixL("name", value, prefix); + * } + * @endcode + * + * @note + * Use AddNewAttributeNsL(name,value,nsDefNode) as much as you can, because + * it is most efficient way to create namespaced DOM elements (no additional + * lookups for namespace declarations are required). + * + * @code + * // If namespace with given URI is not in the scope, then it will be declared + * // and bound to "data" prefix. + * TXmlEngNamespace nsDef = elem.FindOrCreateNsDefL("http://../Data", "data"); + * elem.AddNewAttributeL("location", "...", nsDef); + * elem.AddNewElementL("child", nsDef).AddNewAttributeL("attr","...value..."); + * // the result is + * ... + * + * + * + * ... + * // + * @endcode + */ + IMPORT_C TXmlEngAttr AddNewAttributeUsePrefixL(const TDesC8& aLocalName, + const TDesC8& aValue, + const TDesC8& aPrefix); + + /** + * Creates new attributes using namespace in the scope, which has specified URI + * + * Almost the same as AddNewAttributeUsePrefixL(...) but does lookup by namespace URI + * + * @since S60 v3.1 + * @param aLocalName A local name of attribute + * @param aValue Value to set for new attribute or NULL (sets value to "") + * @param aNsUri Namespace uri for new attribute + * @return - NULL attribute if namespace declaration is not found OR newly added to the end of + * attribute list attribute of this element. + * + * @see AddNewAttributeUsePrefixL(const TDesC8&,const TDesC8&,const TDesC8&) + */ + IMPORT_C TXmlEngAttr AddNewAttributeWithNsL(const TDesC8& aLocalName, + const TDesC8& aValue, + const TDesC8& aNsUri); + + /** + * Add attribute to element that will be used as Xml:Id. + * + * No check if such attribute exists are made. + * + * @since S60 v3.2 + * @param aLocalName Name of attribute that should be add. + * @param aValue Value of the attribute + * @param aNs Namespace of the attribute + * @return Attribute if created. Null attribute if Id exist + * + * @note Call RXmlEngDocument.RegisterXmlIdL(aName,aNsUri) first + * to register existed id's in the document. + */ + IMPORT_C TXmlEngAttr AddXmlIdL(const TDesC8& aLocalName, + const TDesC8& aValue, + TXmlEngNamespace aNs = TXmlEngNamespace()); + + /** + * Adds child element with no namespace + * + * @since S60 v3.1 + * @param aName name of the element + * @return A handler to the newly created element node; + * + * Results in adding element with aName and no prefix. + * + * This method is the best for creation of non-namespace based documents + * or document fragments, where no default namespace declared. + * + * It may be used also as a method for adding element from default namespace, + * BUT namespace will be assigned ONLY after serialization of the current + * document and parsing it back into a DOM tree!! If you need that default namespace + * was inherited by new element immediately use: + * @code + * ... + * TXmlEngNamespace defns = element.DefaultNamespace(); + * TXmlEngElement newEl = element.AddNewElementL("Name",defns); + * ... + * @endcode + * + * If truly undefined namespace for the element is required, then DO NOT USE + * this method if there is a default namespace in the scope! + */ + IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aName); + + /** + * Creates new child element with provided name and namespace declaration + * + * @since S60 v3.1 + * @param aLocalName Name of the element + * @param aNsDecl Handle of the namespace declaration, that must be retrieved from + * one of the ascendant nodes of the new elements (and its prefix + * should not be remapped to another namespace URI for the scope + * of the new element) + * @return Created element node (and added as the last child of its parent) + */ + IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aLocalName, TXmlEngNamespace aNsDecl); + + /** + * Creates new child element with provided name, prefix and namespace URI + * + * New namespace declaration will be attached to the parent (this) element and used + * as namespace for newly created child element. If such binding already exists + * (same prefix is bound to same URI), it will be reused. If the prefix is already + * bound to some another namespace URI, it will be rebound by the new namespace + * declaration node. + * + * @since S60 v3.1 + * @param aLocalName Name of the element + * @param aNsUri URI of element's namespace + * @param aPrefix Prefix of the element + * @return Created element node (and added as the last child of its parent) + */ + IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aLocalName, + const TDesC8& aNsUri, + const TDesC8& aPrefix); + + /** + * Adds child element with same namespace (and prefix if present) as parent element has + * + * @since S60 v3.1 + * @param aLocalName element's name + * @return New element that was added to the end of children list of its parent (this element) + */ + IMPORT_C TXmlEngElement AddNewElementSameNsL(const TDesC8& aLocalName); + + /** + * Performs lookup for the namespace declaration for specified prefix and + * adds new child element with found namespace. + * + * The assumption is that prefix is bound, otherwise run-time error + * (Symbian's Leave or exception) occurs + * + * @note Use this method only if there is a binding for the given prefix. + * + * @since S60 v3.1 + * @param aLocalName element's name + * @param aPrefix prefix to use + * @return new TXmlEngElement that was added to the end of children list of its parent (this element) + */ + IMPORT_C TXmlEngElement AddNewElementUsePrefixL(const TDesC8& aLocalName, const TDesC8& aPrefix); + + /** + * Performs lookup for the namespace declaration for specified namespace URI and + * adds new child element with found namespace. + * + * The assumption is that namespace with given URI was declared, + * otherwise run-time error (Symbian' Leave or exception) occurs + * + * @note Use this method only if namespace declaration for the provided URI exists. + * + * @since S60 v3.1 + * @param aLocalName element's name + * @param aNsUri namespace of element + * @return new TXmlEngElement that was added to the end of children list of its parent (this element) + */ + IMPORT_C TXmlEngElement AddNewElementWithNsL(const TDesC8& aLocalName, const TDesC8& aNsUri); + + /** + * Creates new child element; if there is no a prefix binding for new element's namespace, + * a namespace decaration is created with generated prefix at specified element. + * + * @since S60 v3.1 + * @param aLocalName Name of the element to create + * @param aNsUri Namespace URI of the new element + * @param aNsDeclTarget An element where namespace declaraton should be placed + * if there is a needed to create new namespace declaration; + * NULL is used to specify the created element itself + * + * As aNsDeclTarget any ascendant of the new node may be provided: + * @code + * el.AddNewElementAutoPrefixL(tagName,uri,NULL); // declare on the new element + * el.AddNewElementAutoPrefixL(tagName,uri,el); // declare on the parent element + * el.AddNewElementAutoPrefixL(tagName,uri,doc.DocumentElement()); // declare on the root element + * ... + * @endcode + * + * @note + * The farther namespace declaration up in the document tree, + * the longer time namespace declaration lookups take. + */ + IMPORT_C TXmlEngElement AddNewElementAutoPrefixL(const TDesC8& aLocalName, + const TDesC8& aNsUri, + TXmlEngElement aNsDeclTarget); + + /** + * Get element content. + * This method may be used in most cases, when element has only simple text content + * (without entity references embedded). + * If element's contents is mixed (other types of nodes present), only contents of + * first child node is returned if it is a TXmlEngTextNode node. For getting mixed contents of the + * element of contents with entity references, WholeTextValueCopyL() should be used. + * + * @since S60 v3.1 + * @return Basic contents of the element + * + * @see TXmlEngNode::WholeTextContentsCopyL() + */ + IMPORT_C TPtrC8 Text() const; + + /** + * Adds text as a child of the element. + * + * @since S60 v3.1 + * @param aString text to be added as element's content. + * + * @note There may be several TXmlEngTextNode and TXmlEngEntityReference nodes added actually, + * depending on the aString value + */ + IMPORT_C void AddTextL(const TDesC8& aString); + + /** + * Sets text contents for the element. + * Any child nodes are removed. + * Same as TXmlEngNode::SetValueL(TDesC8&) + * + * @since S60 v3.1 + * @param aString text to be set as element's content. + * + * @see TXmlEngNode::SetValueL(TDesC8&) + */ + IMPORT_C void SetTextL(const TDesC8& aString); + + /** + * Sets text content of the element from escaped string. + * + * @since S60 v3.1 + * @param aEscapedString New value + * + * @see TXmlEngAttr::SetEscapedValueL(TDesC8&) + */ + IMPORT_C void SetEscapedTextL(const TDesC8& aEscapedString); + + /** + * Sets new element value exactly as presented in the string. + * Predefined entities are not converted into characters they represent. + * Any child nodes are removed. + * + * @since S60 v3.2 + * @param aNotEncText New element value + * + * @see TXmlEngAttr::SetValueNoEncL(const TDesC8& aNewValue); + */ + IMPORT_C void SetTextNoEncL(const TDesC8& aNotEncString); + + /** + * Appends new text node with the value exactly as presented in the string. + * Predefined entities are not converted into characters they represent. + * Existing child nodes are not removed. + * + * @since S60 v3.2 + * @param aNotEncText Appended element value + * + * @see TXmlEngAttr::SetValueNoEncL(const TDesC8& aNewValue); + */ + IMPORT_C void AppendTextNoEncL(const TDesC8& aNotEncString); + + /** + * Adds namespace declaration to the current element, a binding of prefix to namespace URI. + * + * If same namespace declaration exists (same prefix and URI), redundant namespace declaration + * will not be created. + * + * Both NULL or "" (empty string) may be used for "UNDEFINED URI" and "NO PREFIX" values of arguments. + * + * @since S60 v3.1 + * @param aNsUri Namespace URI + * @param aPrefix Namespace prefix + * @return A handle to the created (or found, if there is such) namespace declaration node. + * If namespace undeclaration is being created, NULL handle is returned -- it can be + * used in node-creation methods that take namespace handle as an argument. + * + * @note Undeclaring of default namespace (xmlns="") is supported by + * SetNoDefaultNamespace() method + * + * @see SetNoDefaulNamespace() + * + * @note By adding namespace declaration that rebinds prefix mapping (or default namespace) + * used by nodes lower in the tree, document tree may become + * wrongly constructed, because references to namespace declaration are + * not updated. However, after serialization the document will have + * desired structure. + * Use this method with care! + */ + IMPORT_C TXmlEngNamespace AddNamespaceDeclarationL(const TDesC8& aNsUri, const TDesC8& aPrefix); + + /** + * Adds default namespace declaration. + * + * @since S60 v3.1 + * @param aNsUri Namespace URI; both NULL and "" (empty string) are allowed to represent UNDEFINED NAMSPACE + * @return Handle to the created namespace declaration (NULL for UNDEFINED NAMESPACE) + * + * Same result as with AddNamespaceDeclarationL(aNsUri, NULL), but additionally + * element's namespace modified (if it has no prefix and there were no default + * namespace declaration in the scope) to the new default one. + */ + IMPORT_C TXmlEngNamespace SetDefaultNamespaceL(const TDesC8& aNsUri); + + /** + * Undeclares any default namespace for current element and its descendants. + * + * If there is already some default namespace, xmlns="" namespace + * declaration is added. Otherwise, nothing happens, since element with no + * prefix in such scope is automaticaly considered as out of any namespace. + * + * The side effect of this method is that namespace of the current element + * may change from previous default namespace to NULL TXmlEngNamespace, which is + * considered an absence of namespace. + * + * If the element has prefix (i.e. not having default namespace), + * then the only effect for the element is undeclaration of existing default namespace. + * + * If element is in the scope of another xmlns="" undeclaration, no + * actions are taken. + * + * @note + * Use AddNamespaceDeclarationL(NULL,NULL) to force creation of + * xmlns="" declaration within scope of another such declaration + * (otherwise unneccessary/duplicate declarations are not created) + * + * @note + * This method should be called on elements before adding children, + * because default namespace undeclaration is not spread into its subtree and + * descedants' default namespaces are not reset to NULL. This should be taken into + * account if later some processing on the subtree occurs. + * However, after serialization and deserialization, undeclared default namespace will + * affect whole element's subtree correctly. + * + * @since S60 v3.1 + */ + IMPORT_C void SetNoDefaultNamespaceL(); + + /** + * Finds namespace declaration that has specific prefix in the scope for given node + * + * Prefix "" or NULL are considered the same, meaning "NO PREFIX". + * If namespace declaration for "no prefix" is searched, then default namespace is returned. + * + * @since S60 v3.1 + * @param aPrefix Namespace prefix + * @return Namespace handler, which may be NULL if prefix is not bound. + * + * NULL result for "no prefix" means that default namespace is undefined. + */ + IMPORT_C TXmlEngNamespace LookupNamespaceByPrefixL(const TDesC8& aPrefix) const; + + /** + * Finds namespace declaration that has specific namespace URI + * in the scope for the given node. + * + * @since S60 v3.1 + * @param aUri Namespace URI, for which namespace declaration is searched + * @return Handler to the namespace declaration that binds given namespace URI to some prefix + * or sets it a default namespace. + * + * NULL value of aUri is equivalent to "" and means "UNDEFINED NAMESPACE". + * For such URI a NULL namespace handle is always returned even if there is + * namespace undeclaration, which has "" URI (and NULL prefix). + * + * Hint:

+ * Use returned instance of TXmlEngNamespace as aNsDef argument to element's methods + * that create new element's child elements and attributes. The same handler + * may be used on more deep descentants of the reference element (and doing + * this way will generally increase performance of DOM tree construction).
+ * However, if namespace bindings are not controlled + * for element's children and prefix, which is bound to the search namespace, is + * rebound to some other namespace URI, then reusing namespace may lead to + * unwanted result. + * + * Consider an example: + * @code + * TXmlEngElement root = doc.DocumentElement(); + * TXmlEngNamespace targetNs = root.AddNamespaceDeclarationL("http://example.com/","ex"); + * TXmlEngElement el_1 = root.AddNewElementL("outer", targetNs); + * TXmlEngElement el_2 = el_1.AddNewElementL("inner"); // element without prefix + * + * // NOTE: prefix "ex" is not bound to "http://example.com/" anymore! + * el_2.AddNamespaceDeclarationL("http://whatever.com/","ex"); + * TXmlEngElement el_3 = el_2.AddNewElementL("problem", targetNs); + * ... + * @endcode + * + * The sought result was (showing expanded names of elements): + * @code + * --> "root" + * --> {"http://example.com/","outer"} + * --> "inner" + * -->{"http://example.com/","problem"} + * ... + * <-- + * <-- "inner" + * <-- {"http://example.com/","outer"} + * ... + * <-- + * @endcode + * and it may look that it has been achieved. Indeed, if namespace of element "problem" + * was queried, it would have URI "http://example.com/" and prefix "ex". + * However, if namespace URI was looked up by "problem"'s prefix, it would be + * "http://whatever.com/". We have created illegal DOM tree. + * + * The actual DOM tree in serialized form will be: + * @code + * + * + * + * + * ... + * + * + * + * ... + * + * @endcode + * + * So, reuse of namespace handlers should be performed with special care. + * + * @note + * At the moment it is possible to retrieve namespace declaration nodes + * whose prefixes were rebound. Be careful when use returned TXmlEngNamespace object + * for creation of new elements. In later releases, this method will perform + * safe lookup. And so far, it is better to make check that prefix of returned + * namespace declaration has not rebound: + * @code + * TXmlEngNamespace ns = element.LookupNamespaceByUri("a_uri"); + * if (element.LookupNamespaceByPrefix(ns.Prefix()).IsSameNode(ns)){ + * ... // now it is safe to create new elements by using "ns" + * element.AddNewElementL("product",ns); + * ... + * } + * @endcode + */ + IMPORT_C TXmlEngNamespace LookupNamespaceByUriL(const TDesC8& aUri) const; + + /** + * Retrieves implicitly declared on every XML infoset binding + * of 'xml' prefix to XML's namespace URI: + * "http://www.w3.org/XML/1998/namespace" + * + * @since S60 v3.1 + * @return Handler to {xml,"http://www.w3.org/XML/1998/namespace"} prefix + * binding in the current document + * + * The result should be used for creating attributes beloging to the XML namespace + * (xml:lang, xml:space, xml:id , etc.) + * + * DO NOT USE methods LookupNamespaceByUriL(const TDesC8&) and LookupNamespaceByPrefixL(const TDesC8&) + * (with "http://www.w3.org/XML/1998/namespace" and "xml" arguments) for retrieving + * namespace node, since in a case of [possible] memory allocation fault + * NULL result is returned (and breaks your program silently) + * + * @note Normally 'xml' prefix is bound to XML namespace URI in the document + * node, BUT if current node is not a part of the document tree yet, + * the requested namespace declaration WILL BE ADDED to the current node. + * This is the reason why the method may fail in OOM conditions. + */ + IMPORT_C TXmlEngNamespace TheXMLNamespaceL() const; + + /** + * Get default namespace for element. + * + * @since S60 v3.1 + * @return Default namespace in the scope of the element + * + * NULL TXmlEngNamespace means that element with no prefix have no namespace associated + * because no default namespace was declared or default namespace was undeclared with xmlns="" + * + * Equivalent to LookupNamespaceByPrefixL(const TDesC8&) with NULL (or "") prefix provided + */ + inline TXmlEngNamespace DefaultNamespaceL() const; + + /** + * Performs search of namespace handler in the scope of the element. This method will + * create new namespace declaration on the element if such namespace is not available. + * + * @since S60 v3.1 + * @param aNsUri Searched namespace + * @param aPrefix Prefix to use for new namespace declaration (if it is to be created) + * @return TXmlEngNamespace handler that may be used to create new attributes and child elements of + * the element. The namespace may be one of those existed previously or was created + * + * @note + * Be sure not to use the result of this method for non-descendants of the element or in situations + * when prefix overlapping might occur (read also about general general considerations of attributes + * and elements creation using namespace handlers) + */ + IMPORT_C TXmlEngNamespace FindOrCreateNsDeclL(const TDesC8& aNsUri, const TDesC8& aPrefix); + + /** + * Performs search on the element and its ascendants for any namespace declaration + * with given URI and create a new namespace declaration with some (unique) prefix + * if the search was not successful. + * + * @since S60 v3.1 + * @param aNsUri Searched namespace + * @return TXmlEngNamespace handler that may be used to create new attributes and child elements of + * the element. The namespace may be one of those existed previously or was created + */ + IMPORT_C TXmlEngNamespace FindOrCreateNsDeclL(const TDesC8& aNsUri); + + /** + * Checks whether a prefix has been bound in this element (not in one of its ascendants) + * + * Use this method for preventig prefix-name collision in a element node + * + * @since S60 v3.1 + * @param aPrefix Namespace prefix + * @return TRUE if there is already namespace declaration that uses aPrefix on this element + */ + IMPORT_C TBool HasNsDeclarationForPrefixL(const TDesC8& aPrefix) const; + + /** + * Copies the element with its attributes, but not child nodes + * + * If context is preserved, then all namespace declarations that are in the element are + * writen to element's start tag too. + * + * @since S60 v3.1 + * @param preserveNsContext TRUE if context should be preserved + * @return handle to copy of element + */ + IMPORT_C TXmlEngElement ElementCopyNoChildrenL(TBool preserveNsContext) const; + + /** + * Specialized version of TXmlEngNode::CopyL() + * + * @since S60 v3.1 + * @return Deep copy of the element. + */ + inline TXmlEngElement CopyL() const; + + /** + * Resets element's content: all child nodes are removed + * + * @since S60 v3.1 + */ + IMPORT_C void RemoveChildren(); + + /** + * Resets element's attributes + * + * @since S60 v3.1 + */ + IMPORT_C void RemoveAttributes(); + + /** + * Resets all namespace declarations made in the element + * + * @note There can be references to these namespace declaration from elsewhere! + * Use ReconcileNamespacesL() to fix that. + * + * @since S60 v3.1 + */ + IMPORT_C void RemoveNamespaceDeclarations(); + + /** + * Removes all element contents: child nodes, attributes and namespace declarations + * + * @see RemoveChildren(), RemoveAttributes(), RemoveNamespaceDeclarations(); + * + * @since S60 v3.1 + */ + inline void ClearElement(); + + /** + * Copies attributes from another element + * + * It may be a very convenient method for initializing element with a set of predefined attributes. + * + * @since S60 v3.1 + * @param aSrc source element + * + * @note + * Namespaces of the this element may need to be reconciled if copied attributes + * belong to any namespace that is not declared on some ascendant of this node. + * @see ReconcileNamespacesL() + */ + IMPORT_C void CopyAttributesL(TXmlEngElement aSrc); + + /** + * Copies a list of elements. + * + * Elements are appended to the element's children list. + * + * @since S60 v3.1 + * @param aSrc source element + * + * @note Namespaces of the this element may need to be reconciled after copy operation + * @see ReconcileNamespacesL() + */ + IMPORT_C void CopyChildrenL(TXmlEngElement aSrc); + + /** + * Removes attribute with given name and namespace URI(if such exists). + * Memory allocated for the attribute is freed. + * + * @since S60 v3.1 + * @param aLocalName Element name + * @param aNamespaceUri Element namespace + */ + IMPORT_C void RemoveChildElementsL(const TDesC8& aLocalName,const TDesC8& aNamespaceUri); + + /** @} */ + + /** + * @name DOM Level 3 Core methods + * + * @note + * Most methods of DOM spec operate with fully-qualified names (QNames) + * of elements and attributes. It is different in this API - all methods + * instead accept prefix and localName parts of QName. + */ + /** @{ */ + + /** + * Returns value of attribute with given name and namespace URI + * + * @since S60 v3.1 + * @param aLocalName Local name of attribute node + * @param aNamespaceUri Namespace URI of attribute + * @return Attribute value + */ + IMPORT_C TPtrC8 AttributeValueL(const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8) const; + + /** + * Initializes list of child elements with matching name and namespace URI. + * + * @since S60 v3.1 + * @param aList Node list to be initialized + * @param aLocalName Element name + * @param aNamespaceUri Namespace URI, default is NULL + * + * @note This method does not lists all descedants of the element, only child elements + */ + IMPORT_C void GetElementsByTagNameL(RXmlEngNodeList& aList, + const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8) const; + + /** + * Sets value of attribute; attribute is created if there is no such attribute yet + * + * @since S60 v3.1 + * @param aLocalName Attribute name + * @param aValue Attribute value + * @param aNamespaceUri Namespace URI - default is NULL + * @param aPrefix Namespace prefix - default is NULL + * + * @note + * If prefix is not NULL (or ""), then namespace URI may not be empty + * see http://www.w3.org/TR/REC-xml-names/#ns-decl (Definition #3) + */ + IMPORT_C void SetAttributeL(const TDesC8& aLocalName, + const TDesC8& aValue, + const TDesC8& aNamespaceUri = KNullDesC8, + const TDesC8& aPrefix = KNullDesC8); + + /** + * Removes attribute with given name and namespace URI(if such exists). + * Memory allocated for the attribute is freed. + * + * @since S60 v3.1 + * @param aLocalName Name of the attribute + * @param aNamespaceUri Attribute namespace URI, default is NULL + */ + IMPORT_C void RemoveAttributeL(const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8); + + /** + * Retrieves attribute node from specific namespace by its name. + * + * @since S60 v3.1 + * @param aLocalName Name of the attribute + * @param aNamespaceUri Attribute namespace URI, default is NULL + * @return Attribute node with matching namespace URI and name + */ + IMPORT_C TXmlEngAttr AttributeNodeL(const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8) const; + + /** + * Check if element has attribute with given parameters. + * + * @since S60 v3.1 + * @param aLocalName Name of attribute + * @param aNamespaceUri Namespace uri, default is NULL. + * @return TRUE if the element holds an attribute with such namespace URI and name. + * + * Same result gives AttributeNodeL(uri,name).NotNull() + */ + inline TBool HasAttributeL(const TDesC8& aLocalName, + const TDesC8& aNamespaceUri = KNullDesC8) const; + + /** + * Links attribute into tree + * + * @since S60 v3.1 + * @param aNewAttr new attribute + * + * The replaced attribute node is not returned and just deleted + */ + IMPORT_C void SetAttributeNodeL(TXmlEngAttr aNewAttr); +}; + + + +#include "xmlengelement.inl" + +#endif /* XMLENGINE_ELEMENT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengelement.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengelement.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,113 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Inline functions specyfic for element node +* +*/ + + + + + + + + +// ------------------------------------------------------------------------------------- +// Default constructor +// ------------------------------------------------------------------------------------- +// +inline TXmlEngElement::TXmlEngElement():TXmlEngNode(NULL) {} + +// ------------------------------------------------------------------------------------- +// Constructor +// ------------------------------------------------------------------------------------- +// +inline TXmlEngElement::TXmlEngElement(void* aInternal): TXmlEngNode(aInternal) {} + + +// ------------------------------------------------------------------------------------- +// Creates new attribute node using namespace of its parent element (this element), +// sets attribute's value and links it as the last attribute of the element +// +// @param aName - Local name of attribute +// @param aValue - Value to set for new attribute or NULL (sets value to "") +// @return A handler to the newly created attribute node; +// +// For more hints how to use it refer to AddNewAttributeL(const TDesC8&,const TDesC8&) +// +// @note +// - No checks are made that attribute with such name exists +// - if namespace of the parent element is default (i.e. bound prefix is NULL), +// then temporary prefix will be used and bound to the same namespace URI as elements +// (It is due to the fact that default namespaces do not spread on unprefixed attributes, +// see http://w3.org/TR/REC-xml-names/#defaulting) +// ------------------------------------------------------------------------------------- +// +inline TXmlEngAttr TXmlEngElement::AddNewAttributeSameNsL(const TDesC8& aName, const TDesC8& aValue) + { + return AddNewAttributeL(aName, aValue, NamespaceDeclaration()); + } + +// ------------------------------------------------------------------------------------- +// @return Default namespace in the scope of the element +// +// NULL TXmlEngNamespace means that element with no prefix have no namespace associated +// because no default namespace was declared or default namespace was undeclared with xmlns="" +// +// Equivalent to LookupNamespaceByPrefixL() with NULL (or "") prefix provided +// ------------------------------------------------------------------------------------- +// +inline TXmlEngNamespace TXmlEngElement::DefaultNamespaceL() const + { + return LookupNamespaceByPrefixL(KNullDesC8); + } + +// ------------------------------------------------------------------------------------- +// Specialized version of TXmlEngNode::CopyL() +// +// @return Deep copy of the element. +// ------------------------------------------------------------------------------------- +// +inline TXmlEngElement TXmlEngElement::CopyL() const + {return TXmlEngNode::CopyL().AsElement();} + +// ------------------------------------------------------------------------------------- +// Removes all element contents: child nodes, attributes and namespace declarations +// +// @see RemoveChildren(), RemoveAttributes(), RemoveNamespaceDeclarations(); +// ------------------------------------------------------------------------------------- +// +inline void TXmlEngElement::ClearElement() + { + RemoveChildren(); + RemoveAttributes(); + RemoveNamespaceDeclarations(); + } + +// ------------------------------------------------------------------------------------- +// ------------------------------------------------------------------------------------- +// + + +// ------------------------------------------------------------------------------------- +// Returns TRUE if the element holds an attribute with such namespace URI and name. +// +// Same result gives AttributeNodeL(uri,name).NotNull() +// ------------------------------------------------------------------------------------- +// +inline TBool TXmlEngElement::HasAttributeL(const TDesC8& aLocalName, const TDesC8& aNamespaceUri) const + {return AttributeNodeL(aLocalName, aNamespaceUri).NotNull();} + + + + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengentityreference.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengentityreference.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,59 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Entity reference node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_ENTITYREFERENCE_H_INCLUDED +#define XMLENGINE_ENTITYREFERENCE_H_INCLUDED + +#include "xmlengnode.h" + + +/** + * Instance of TXmlEngEntityReference class represents an XML entity reference in the DOM tree. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngEntityReference : public TXmlEngNode +{ +public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngEntityReference(); + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal Entity reference pointer + */ + inline TXmlEngEntityReference(void* aInternal); +}; + +#include "xmlengentityreference.inl" + +#endif /* XMLENGINE_ENTITYREFERENCE_H_INCLUDED */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengentityreference.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengentityreference.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,40 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Entity reference node functions +* +*/ + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngEntityReference::TXmlEngEntityReference():TXmlEngNode(NULL) + { + } + + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngEntityReference::TXmlEngEntityReference(void* aInternal):TXmlEngNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengerrors.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengerrors.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,161 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: DOM errors codes +* +*/ + + + + + + + + +/** + * NOTE1: All errors returned by DOM parser (positive values) are propagated from open-source library. + * They can be found in documentation to Libxml2 (version 2.6.10). See http://xmlsoft.org, and find enum xmlParserErrors. + * + * NOTE2: This errors CANNOT be propagated to other applications. + * It should be handled by user application. + */ + +#ifndef XMLENGINE_DOM_ERRORS_H__ +#define XMLENGINE_DOM_ERRORS_H__ + +#include + +/** DOM parsing error */ +const TInt KXmlEngErrParsing = -32397; +/** DOM save errors */ +const TInt KXmlEngErrNegativeOutputSize = -32383; +const TInt KXmlEngErrWrongEncoding = -32382; + +/** KXmlEngErrNullNode error */ +const TInt KXmlEngErrNullNode = -32380; +/** KXmlEngErrWrongUseOfAPI error */ +const TInt KXmlEngErrWrongUseOfAPI = -32381; + +#endif // XMLENGINE_DOM_ERRORS_H__ + +/* +* PARSING ERRORS: +* +* XML_ERR_OK = 0 +* XML_ERR_INTERNAL_ERROR 1 +* XML_ERR_NO_MEMORY 2 +* XML_ERR_DOCUMENT_START 3 +* XML_ERR_DOCUMENT_EMPTY 4 +* XML_ERR_DOCUMENT_END 5 +* XML_ERR_INVALID_HEX_CHARREF 6 +* XML_ERR_INVALID_DEC_CHARREF 7 +* XML_ERR_INVALID_CHARREF 8 +* XML_ERR_INVALID_CHAR 9 +* XML_ERR_CHARREF_AT_EOF 10 +* XML_ERR_CHARREF_IN_PROLOG 11 +* XML_ERR_CHARREF_IN_EPILOG 12 +* XML_ERR_CHARREF_IN_DTD 13 +* XML_ERR_ENTITYREF_AT_EOF 14 +* XML_ERR_ENTITYREF_IN_PROLOG 15 +* XML_ERR_ENTITYREF_IN_EPILOG 16 +* XML_ERR_ENTITYREF_IN_DTD 17 +* XML_ERR_PEREF_AT_EOF 18 +* XML_ERR_PEREF_IN_PROLOG 19 +* XML_ERR_PEREF_IN_EPILOG 20 +* XML_ERR_PEREF_IN_INT_SUBSET 21 +* XML_ERR_ENTITYREF_NO_NAME 22 +* XML_ERR_ENTITYREF_SEMICOL_MISSING 23 +* XML_ERR_PEREF_NO_NAME 24 +* XML_ERR_PEREF_SEMICOL_MISSING 25 +* XML_ERR_UNDECLARED_ENTITY 26 +* XML_WAR_UNDECLARED_ENTITY 27 +* XML_ERR_UNPARSED_ENTITY 28 +* XML_ERR_ENTITY_IS_EXTERNAL 29 +* XML_ERR_ENTITY_IS_PARAMETER 30 +* XML_ERR_UNKNOWN_ENCODING 31 +* XML_ERR_UNSUPPORTED_ENCODING 32 +* XML_ERR_STRING_NOT_STARTED 33 +* XML_ERR_STRING_NOT_CLOSED 34 +* XML_ERR_NS_DECL_ERROR 35 +* XML_ERR_ENTITY_NOT_STARTED 36 +* XML_ERR_ENTITY_NOT_FINISHED 37 +* XML_ERR_LT_IN_ATTRIBUTE 38 +* XML_ERR_ATTRIBUTE_NOT_STARTED 39 +* XML_ERR_ATTRIBUTE_NOT_FINISHED 40 +* XML_ERR_ATTRIBUTE_WITHOUT_VALUE 41 +* XML_ERR_ATTRIBUTE_REDEFINED 42 +* XML_ERR_LITERAL_NOT_STARTED 43 +* XML_ERR_LITERAL_NOT_FINISHED 44 +* XML_ERR_COMMENT_NOT_FINISHED 45 +* XML_ERR_PI_NOT_STARTED 46 +* XML_ERR_PI_NOT_FINISHED 47 +* XML_ERR_NOTATION_NOT_STARTED 48 +* XML_ERR_NOTATION_NOT_FINISHED 49 +* XML_ERR_ATTLIST_NOT_STARTED 50 +* XML_ERR_ATTLIST_NOT_FINISHED 51 +* XML_ERR_MIXED_NOT_STARTED 52 +* XML_ERR_MIXED_NOT_FINISHED 53 +* XML_ERR_ELEMCONTENT_NOT_STARTED 54 +* XML_ERR_ELEMCONTENT_NOT_FINISHED 55 +* XML_ERR_XMLDECL_NOT_STARTED 56 +* XML_ERR_XMLDECL_NOT_FINISHED 57 +* XML_ERR_CONDSEC_NOT_STARTED 58 +* XML_ERR_CONDSEC_NOT_FINISHED 59 +* XML_ERR_EXT_SUBSET_NOT_FINISHED 60 +* XML_ERR_DOCTYPE_NOT_FINISHED 61 +* XML_ERR_MISPLACED_CDATA_END 62 +* XML_ERR_CDATA_NOT_FINISHED 63 +* XML_ERR_RESERVED_XML_NAME 64 +* XML_ERR_SPACE_REQUIRED 65 +* XML_ERR_SEPARATOR_REQUIRED 66 +* XML_ERR_NMTOKEN_REQUIRED 67 +* XML_ERR_NAME_REQUIRED 68 +* XML_ERR_PCDATA_REQUIRED 69 +* XML_ERR_URI_REQUIRED 70 +* XML_ERR_PUBID_REQUIRED 71 +* XML_ERR_LT_REQUIRED 72 +* XML_ERR_GT_REQUIRED 73 +* XML_ERR_LTSLASH_REQUIRED 74 +* XML_ERR_EQUAL_REQUIRED 75 +* XML_ERR_TAG_NAME_MISMATCH 76 +* XML_ERR_TAG_NOT_FINISHED 77 +* XML_ERR_STANDALONE_VALUE 78 +* XML_ERR_ENCODING_NAME 79 +* XML_ERR_HYPHEN_IN_COMMENT 80 +* XML_ERR_INVALID_ENCODING 81 +* XML_ERR_EXT_ENTITY_STANDALONE 82 +* XML_ERR_CONDSEC_INVALID 83 +* XML_ERR_VALUE_REQUIRED 84 +* XML_ERR_NOT_WELL_BALANCED 85 +* XML_ERR_EXTRA_CONTENT 86 +* XML_ERR_ENTITY_CHAR_ERROR 87 +* XML_ERR_ENTITY_PE_INTERNAL 88 +* XML_ERR_ENTITY_LOOP 89 +* XML_ERR_ENTITY_BOUNDARY 90 +* XML_ERR_INVALID_URI 91 +* XML_ERR_URI_FRAGMENT 92 +* XML_WAR_CATALOG_PI 93 +* XML_ERR_NO_DTD 94 +* XML_ERR_CONDSEC_INVALID_KEYWORD 95 +* XML_ERR_VERSION_MISSING 96 +* XML_WAR_UNKNOWN_VERSION 97 +* XML_WAR_LANG_VALUE 98 +* XML_WAR_NS_URI 99 +* XML_WAR_NS_URI_RELATIVE 100 +* XML_ERR_MISSING_ENCODING 101 +* XML_NS_ERR_XML_NAMESPACE 200 +* XML_NS_ERR_UNDEFINED_NAMESPACE 201 +* XML_NS_ERR_QNAME 202 +* XML_NS_ERR_ATTRIBUTE_REDEFINED 203 +*/ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengfilecontainer.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengfilecontainer.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: All file container data functions +* +*/ + + + + + + + +#ifndef XMLENGINE_FILECONTAINER_H_INCLUDED +#define XMLENGINE_FILECONTAINER_H_INCLUDED + +#include "xmlengdatacontainer.h" + +class RFile; + + + +/** +* Instance of TXmlEngFileContainer class represents data stored in RFile in DOM tree +* +* RFile container is treated in general as text nodes in DOM tree. +* Some of the fields in xmlNode structure are reused in order to save memory. +* Data is stored in file system referenced to by RFile handle. +* +* Sample code for creating filecontainer: +* @code +* RXmlEngDOMImplementation domImpl; +* domImpl.OpenL(); ///< opening DOM implementation object +* RXmlEngDocument iDoc; +* ///< create document element +* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); +* ///< create file container from file (file1 is an RFile object) and CID equals cid +* TXmlEngFileContainer binData = iDoc.CreateFileContainerL(cid, file1); +* elem.AppendChildL(binData); ///< append container to the dom tree +* iDoc.Close(); ///< closing all opened objects +* domImpl.Close(); +* @endcode +* +* @lib XmlEngineDOM.lib +* @since S60 v3.2 +*/ +class TXmlEngFileContainer : public TXmlEngDataContainer +{ +public: + /** + * Get RFile reference + * + * @since S60 v3.2 + * @return RFile reference + * + */ + IMPORT_C RFile& File() const; + +protected: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngFileContainer(); + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal node pointer + */ + inline TXmlEngFileContainer(void* aInternal); +}; + + + +#include "xmlengfilecontainer.inl" + +#endif /* XMLENGINE_FILECONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengfilecontainer.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengfilecontainer.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: File container functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngFileContainer::TXmlEngFileContainer():TXmlEngDataContainer(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngFileContainer::TXmlEngFileContainer(void* aInternal):TXmlEngDataContainer(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnamespace.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnamespace.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,161 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Namespace node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_NAMESPACE_H_INCLUDED +#define XMLENGINE_NAMESPACE_H_INCLUDED + +#include "xmlengnode.h" + +/** + * Represents existing namespace declaration in DOM tree OR namespace node returned + * in RXmlEngNodeSet as a result of some XPath expression. + * + * All elements and attributes may have a namespace instance associated. + * Once put in element, a namespace declaration (instance of TXmlEngNamespace) may be + * referred to by all attributes and descentants of the element (unless + * prefix that this namespace-to-prefix binding uses is overriden somewhere below in the document tree) + * + * General rules of namespace handling: + * + * - NULL prefix in namespace node means NO PREFIX. ""(empty string '\\0') can be used for specifying + * absense of prefix when setting it, however NULL will be stored and returned. + * + * - NULL value of namespace URI is legal only with NULL prefix and only met in + * undeclaration of namespace (xmlns=""). "" (empty string) can be used too, however it + * will be returned as NULL. + * + * - NULL or "" namespace URI with non-NULL prefix is illegal acording to the XML specification. + * + * - Namespace of a element is default if it is associated with some namespace declaration with NULL prefix. + * + * - Elements are never associated with namespace undeclarations (xmlns=""), instead, such elements have no + * namespace declaration referred to. + * + * - Attributes do not have default namespace. Even if it is effective at element scope, + * default namespace declaration is not applied to element's attributes (according to the XML specification) + * + * - Namespace of a node (element or attribute) is undefined if no namespace declaration is + * associated with it. + * + * - Node with undefined namespace is serialized as having no prefix. In general, + * DOM API handles the complexity of namespace declaration handling and creates neccessary + * namespace declarations and undeclares default namespace. However, some node-creation methods (e.g. TXmlEngElement::AddNewElementL()) + * do not ensure that created node with undefined namespace (thus, without a prefix) will + * actually treated after serialization as having some default namespace + * + * @note + * Namespace nodes that are result of XPath expression have following restrictions: + * - they cannot be used as namespace definitions, because they are not part of + * the DOM tree, but copies of existing namespace definitions. + * - namespace prefix is not available because it is not mandated by DOM Level 3 XPath module API, + * so in returned copies of DOM tree, namespaces prefix strings are not preserved + * and Prefix() returns NULL. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngNamespace: public TXmlEngNode +{ + public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngNamespace(); + + /** + /** + * Get namespace URI + * + * @since S60 v3.1 + * @return Namespace URI string + * @note "" is never returned - it is replaced with NULL + * + * For TXmlEngNamespace(NULL) or namespace undeclaration (xmlns=""), which are + * treatet as undefined namespace returns NULL, + * otherwise result is not a NULL string and not a "" (empty string). + */ + IMPORT_C TPtrC8 Uri() const; + + /** + * Get namespace prefix. + * + * @since S60 v3.1 + * @return prefix that is bound in the namespace declaration + * or NULL string for default namespace or if no binding exist + */ + IMPORT_C TPtrC8 Prefix() const; + + /** + * Check if namespace is default. + * + * @since S60 v3.1 + * @return Whether it is a definition of default namespace + * TRUE -- is a default namespace (no prefix) + * FALSE -- not a default namespace (bound to prefix) or empty TXmlEngNamespace(NULL) instance + */ + IMPORT_C TBool IsDefault() const; + + /** + * Check if namespace is undefined + * + * @since S60 v3.1 + * @return Whether the namespace is undefined + * + * A node's namespace is undefined if no namespace declaration associated with it. + * @note Same as TXmlEngNode::IsNull() + */ + IMPORT_C TBool IsUndefined() const; + +protected: + /** + * Workaround to avoid misuse of TXmlEngNode::NamespaceUri() method, which should not be + * applied to TXmlEngNamespace node. Since the name of the inherited method from TXmlEngNode + * is too similar to TXmlEngNamespace::Uri(), NamespaceUri() is disabled for direct + * use. + * If NamespaceUri() is called on the TXmlEngNamespace object that is downcasted to TXmlEngNode, then + * NamespaceUri()'s result equals to result of Uri() method. + * + * @since S60 v3.1 + * @return NULL + */ + inline TPtrC8 NamespaceUri(); + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aPtr Namespace pointer + */ + inline TXmlEngNamespace(void* aPtr); + + friend class TXmlEngElement; + friend class TXmlEngNode; +}; + +#include "xmlengnamespace.inl" + +#endif /* XMLENGINE_NAMESPACE_H_INCLUDED */ + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnamespace.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnamespace.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,56 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Namespace node functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngNamespace::TXmlEngNamespace():TXmlEngNode(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Workaround to avoid misuse of TXmlEngNode::NamespaceUri() method, which should not +// be applied to TXmlEngNamespace node. Since the name of the inherited method from +// TXmlEngNode is too similar to TXmlEngNamespace::Uri(), NamespaceUri() is disabled for +// direct use. +// +// If NamespaceUri() is called on the TXmlEngNamespace object that is downcasted to +// TXmlEngNode, then NamespaceUri()'s result equals to result of Uri() method. +// ----------------------------------------------------------------------------- +// +inline TPtrC8 TXmlEngNamespace::NamespaceUri() + { + return KNullDesC8(); + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngNamespace::TXmlEngNamespace(void* aPtr):TXmlEngNode(aPtr) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnode.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnode.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,805 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Node class declaration +* +*/ + + + + + + + +#ifndef XMLENGINE_NODE_H_INCLUDED +#define XMLENGINE_NODE_H_INCLUDED + +#include + +// forward declaration +class TXmlEngNode; + +// Forward declarations +template class RXmlEngNodeList; + +class RXmlEngDocument; +class TXmlEngElement; +class TXmlEngAttr; +class TXmlEngTextNode; +class TXmlEngNamespace; +class TXmlEngComment; +class TXmlEngCDATASection; +class TXmlEngDocumentFragment; +class TXmlEngEntityReference; +class TXmlEngProcessingInstruction; +class MXmlEngUserData; +class TXmlEngBinaryContainer; +class TXmlEngChunkContainer; +class TXmlEngDataContainer; +class TXmlEngFileContainer; +// + +/** + * Instance of TXmlEngNode class represents an XML node in the DOM tree. + * + * Class implements methods that are similar for all XML node types + * i.e. element, attribute. + * + * Sample code for node tree modifications: + * @code + * RXmlEngDOMImplementation domImpl; + * domImpl.OpenL(); ///< opening DOM implementation object + * RXmlEngDocument iDoc; ///< iDoc with created nodes tree + * TXmlEngNode tmp = iDoc.DocumentElement(); + * ///< copying first child of iDoc to tmp2 node and appending it + * TXmlEngNode tmp2 = tmp.FirstChild().CopyL(); + * tmp.AppendChildL(tmp2); + * ///< copying next node to the first child of iDoc to the last child place + * tmp.FirstChild().NextSibling().CopyToL(tmp.LastChild()); + * ///< replasing before last child with second child + * tmp.LastChild().PreviousSibling().ReplaceWith(tmp.FirstChild().NextSibling()); + * ///< moving first child of iDoc to second child childrens + * tmp.FirstChild().MoveTo(tmp.FirstChild().NextSibling()); + * iDoc.Close(); ///< closing all opened objects + * domImpl.Close(); + * @endcode + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngNode +{ +public: + /** + * The different element types carried by an XML tree. + * + * @note This is synchronized with DOM Level 3 values + * See http://www.w3.org/TR/DOM-Level-3-Core/ + * + */ + enum TXmlEngDOMNodeType { + EElement = 1, + EAttribute = 2, + EText = 3, + ECDATASection = 4, + EEntityReference = 5, + EEntity = 6, //> Not supported currently + EProcessingInstruction = 7, + EComment = 8, + EDocument = 9, + EDocumentType = 10, //> Not supported currently + EDocumentFragment = 11, + ENotation = 12, //> Not supported currently + ENamespaceDeclaration = 18, //> Not in DOM spec + EBinaryContainer = 30, //> Not in DOM spec + EChunkContainer = 31, //> Not in DOM spec + EFileContainer = 32 //> Not in DOM spec + }; + +public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngNode(); + + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal node pointer + */ + inline TXmlEngNode(void* aInternal); + + /** + * Check if node is NULL + * + * @since S60 v3.1 + * @return TRUE if node is NULL in other case FALSE + */ + inline TBool IsNull() const; + + /** + * Check if node is NULL + * + * @since S60 v3.1 + * @return TRUE if node is not NULL in other case FALSE + */ + inline TBool NotNull()const; + + /** + * Cast node to attribute node. + * + * @since S60 v3.1 + * @return Attribute node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngAttr& AsAttr() const; + + /** + * Cast node to text node. + * + * @since S60 v3.1 + * @return Text node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngTextNode& AsText() const; + + /** + * Cast node to binary data container + * + * @since S60 v3.2 + * @return Binary container + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngBinaryContainer& AsBinaryContainer() const; + + /** + * Cast node to memory chunk container + * + * @since S60 v3.2 + * @return Chunk container + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngChunkContainer& AsChunkContainer() const; + + /** + * Cast node to file container + * + * @since S60 v3.2 + * @return File container + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngFileContainer& AsFileContainer() const; + + /** + * Cast node to memory chunk container + * + * @since S60 v3.1 + * @return Chunk container + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngDataContainer& AsDataContainer() const; + + /** + * Cast node to element node. + * + * @since S60 v3.1 + * @return Element node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngElement& AsElement() const; + + /** + * Cast node to comment node. + * + * @since S60 v3.1 + * @return Comment node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngComment& AsComment() const; + + /** + * Cast node to namespace node. + * + * @since S60 v3.1 + * @return Namespace node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngNamespace& AsNamespace() const; + + /** + * Cast node to CDATA section node. + * + * @since S60 v3.1 + * @return CDATA section node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngCDATASection& AsCDATASection() const; + + /** + * Cast node to entity reference node. + * + * @since S60 v3.1 + * @return Entity reference node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngEntityReference& AsEntityReference() const; + + /** + * Cast node to processing instruction node. + * + * @since S60 v3.1 + * @return Processing instruction node + * + * @note + * - Never cast nodes to a wrong node type! + * - Casting removes const'ness of the node + */ + inline TXmlEngProcessingInstruction& AsProcessingInstruction() const; + + /** + * Get innerXML string. This method returns all content of the node. + * Output text does not include node markup. + * + * @since S60 v3.1 + * @param aBuffer RBuf8 in which output should be save + * @return Size of output buffer + * @note Returned RBuf8 should be freed + */ + IMPORT_C TInt InnerXmlL(RBuf8& aBuffer); + + /** + * Get outerXML string. This method returns all content of the node. + * Output text includes node markup. + * + * @since S60 v3.1 + * @param aBuffer RBuf8 in which output should be save + * @return Size of output buffer + * @note Returned RBuf8 should be freed + */ + IMPORT_C TInt OuterXmlL(RBuf8& aBuffer); + + /** + * Moves the node to become the first in the list of its siblings + * Node is expected to have a parent. + * + * @since S60 v3.1 + */ + IMPORT_C void SetAsFirstSibling(); + + /** + * Moves the node to become the last in the list of its siblings + * Node is expected to have a parent. + * + * @since S60 v3.1 + */ + IMPORT_C void SetAsLastSibling(); + + /** + * Moves the node in the list of sibling nodes before another node + * Node is expected to have a parent. + * Do nothing if aSiblingNode is not one of node's siblings + * + * @since S60 v3.1 + * @param aSiblingNode Node that should be after current node + */ + IMPORT_C void MoveBeforeSibling(TXmlEngNode aSiblingNode); + + /** + * Moves the node in the list of sibling nodes after another node + * Node is expected to have a parent. + * Do nothing if aSiblingNode is not one of the node's siblings + * + * @since S60 v3.1 + * @param aSiblingNode Node that should be after current node + */ + IMPORT_C void MoveAfterSibling(TXmlEngNode aSiblingNode); + + /** + * Moves the node to another part of the tree or another document + * The node is unliked from current postion (if any) and appended + * to the its new parent. + * + * @since S60 v3.1 + * @param aParent Parent node + * @return Node handle + * + * @note + * In many cases this method call should be followed by ReconcileNamespacesL() on the moved node + */ + inline TXmlEngNode MoveTo(TXmlEngNode aParent); + + /** + * Detaches a node from document tree + * + * @since S60 v3.1 + * @return This node, which is already not a part of any document + * @note Remember to use ReconcileNamespacesL() later, if extracted node (subtree) + * contains references to namespace declarations outside of the subtree. + * @see ReconcileNamespacesL() + * @note The document, from which the is being unlinked, becomes an owner of the node + * until it is linked elsewhere. + */ + IMPORT_C TXmlEngNode Unlink(); + + /** + * Ensures that namespaces referred to in the node and its descendants are + * in the scope the node. + * + * This method checks that all the namespaces declared within the given + * tree are properly declared. This is needed for example after Copy or Unlink + * and then Append operations. The subtree may still hold pointers to + * namespace declarations outside the subtree or they may be invalid/masked. As much + * as possible the function try to reuse the existing namespaces found in + * the new environment. If not possible, the new namespaces are redeclared + * on the top of the subtree. + * + * This method should be used after unlinking nodes and inserting to another + * document tree or to a another part of the original tree, if some nodes of the subtree + * are remove from the scope of a namespace declaration they refer to. + * + * When node is unlinked, it may still refer to namespace declarations from the previous location. + * It is important to reconcile subtree's namespaces if previous parent tree is to be destroyed. + * On the other hand, if the parent tree is not changed before pasting its unlinked part into another + * tree, then reconciliation is needed only after paste operation. + * + * @since S60 v3.1 + */ + IMPORT_C void ReconcileNamespacesL(); + + /** + * Unlinks the node and destroys it; all child nodes are destroyed as well and all memory is freed + * + * @note Document nodes cannot be "removed" with this method, uses RXmlEngDocument-specific methods. + * + * @since S60 v3.1 + */ + IMPORT_C void Remove(); + + /** + * Current node is replaced with another node (subtree). + * + * The replacement node is linked into document tree instead of this node. + * The replaced node is destroyed. + * + * @since S60 v3.1 + * @param aNode Node that repleace current node + * + * @see SubstituteFor(TXmlEngNode) + * + * In both cases the argument node is unlinked from its previous location + * (which can be NONE, i.e. not linked; SAME or ANOTHER document tree). + * + * @note Replacement of a node with NULL TXmlEngNode is legal and equivalent to removing the node. + * @note Not applicable to document nodes + */ + IMPORT_C void ReplaceWith(TXmlEngNode aNode); + + /** + * Another node is put instead of the current node. + * + * Does the same as ReplaceWith(TXmlEngNode) but does not free node and just returns it. + * + * @since S60 v3.1 + * @param aNode Node that repleace current node + * @return Current node after unlinking it from document tree + * @see ReplaceWith(TXmlEngNode) + * + * In both cases the argument node is unlinked from its previous location + * (which can be NONE, i.e. not linked; SAME or ANOTHER document tree) + * + * It is possible to use NULL TXmlEngNode object as an argument. In such case + * no new node will be put instead of unlinked one. + * + * @note Not applicable to document nodes + */ + IMPORT_C TXmlEngNode SubstituteForL(TXmlEngNode aNode); + + /** + * Retrieves a "handle" for namespace declaration that applies to the node's namespace + * Note: DOM specs do not consider namespace declarations as a kind of nodes + * This API adds TXmlEngNamespace type of nodes, which is derived from TXmlEngNode. + * + * @since S60 v3.1 + * @return Object that represents namespace declaration and prefix binding that + * act on the node; returns NULL object (check using TXmlEngNamespace.IsNull() + * or TXmlEngNamespace.NotNull()) if no namespace associated + */ + IMPORT_C TXmlEngNamespace NamespaceDeclaration() const; + + /** + * Attaches a user data object to this node. The ownership of the object is transferred. + * When the (underlying) node is deleted the Destroy method of the MXmlEngUserData class will be + * called. If there already is a user data object associated with this node, it will be + * deleted before attaching the new object. + * + * @since S60 v3.1 + * @param aData Pointer to the data object. + * @return true if successful, false if for example underlying node type doesn't support + * attaching user data. + * @note Only TXmlEngElement and Attribute nodes currently support this feature. + * User data is not copied, when node is copied. + */ + IMPORT_C TBool AddUserData(MXmlEngUserData* aData); + + /** + * Returns the user data object attached to this node. Ownership is not transferred. + * + * @since S60 v3.1 + * @return Pointer to data object or NULL if it doesn't exist. + */ + IMPORT_C MXmlEngUserData* UserData() const; + + /** + * Removes the user data onject attached to this node. Ownership is transferred + * (the object is not deleted). + * + * @since S60 v3.1 + * @return Pointer to data object or NULL if it doesn't exist. + */ + IMPORT_C MXmlEngUserData* RemoveUserData(); + + /** + * Clones the node completely: all attributes and namespace declarations (for TXmlEngElement nodes), + * values and children nodes are copied as well. + * + * Document nodes cannot be copied with this method: RXmlEngDocument::CloneDocumentL() must be used. + * + * @since S60 v3.1 + * @return Complete copy of a node or leaves. + * @note The node should not be NULL! + */ + IMPORT_C TXmlEngNode CopyL() const; + + /** + * Creates a deep copy of the node and appends the subtree as a new child + * to the provided parent node. + * + * @since S60 v3.1 + * @return Created copy of the node after linking it into the target document tree. + * @note Document nodes cannot be copied with this method; use RXmlEngDocument::CloneDocumentL() + */ + IMPORT_C TXmlEngNode CopyToL(TXmlEngNode aParent) const; + + /** + * Append a child node. + * + * This is universal operation for any types of nodes. + * Note, that some types of nodes cannot have children and + * some types of nodes are not allowed to be children of some other types. + * + * @since S60 v3.1 + * @param aNewChild Child node that should be added + * @return Appended node, which could changed as a result of adding it to + * list of child nodes (e.g. text nodes can coalesce together) + */ + IMPORT_C TXmlEngNode AppendChildL(TXmlEngNode aNewChild); + + /** + * Initializes a node list with all children of the node + * + * @since S60 v3.1 + * @param aList node list that should be initialized + */ + IMPORT_C void GetChildNodes(RXmlEngNodeList& aList) const; + + /** + * Get parent node of current node. + * + * @since S60 v3.1 + * @return Parent node of the node or NULL if no parent + */ + IMPORT_C TXmlEngNode ParentNode() const; + + /** + * Get first child of current node + * + * @since S60 v3.1 + * @return The first child node or NULL if no children + */ + IMPORT_C TXmlEngNode FirstChild() const; + + /** + * Get last child of current node + * + * @since S60 v3.1 + * @return The last child node or NULL if no children + */ + IMPORT_C TXmlEngNode LastChild() const; + + /** + * Get previous node of current node + * + * @since S60 v3.1 + * @return Previous node in a child list or NULL if no sibling before + */ + IMPORT_C TXmlEngNode PreviousSibling() const; + + /** + * Get fallowing node of current node + * + * @since S60 v3.1 + * @return Following node in a child list or NULL if no sibling after + */ + IMPORT_C TXmlEngNode NextSibling() const; + + /** + * Get document handle + * + * @since S60 v3.1 + * @return A document node of the DOM tree this node belongs to + * + * @note An instance of RXmlEngDocument class returns itself + */ + IMPORT_C RXmlEngDocument OwnerDocument() const; + + /** + * Fetches value of this node, depending on its type. + * + * @note It is better to always cast nodes to specific type and then use specific + * method for getting "node value" + * + * @since S60 v3.1 + * @return Node value + */ + IMPORT_C TPtrC8 Value() const; + + /** + * Get copy of node's text content + * What is returned depends on the node type. + * Method caller is responsible for freeing returned string. + * + * @since S60 v3.1 + * @return the content of the node + */ + IMPORT_C void WholeTextContentsCopyL(RBuf8& aOutput) const; + + /** + * Sets value of this node. + * + * @since S60 v3.1 + * @param aValue New value + */ + IMPORT_C void SetValueL(const TDesC8& aValue); + + /** + * Check if node content is "simple text". + * + * @since S60 v3.1 + * @return Whether the value of the node is presented by only one TXmlEngTextNode node + * + * If the value is "simple text" then it is possible to access it as TDOMString + * without making copy, which combines values of all text nodes and entity reference nodes. + * + * @see TXmlEngNode::Value(), TXmlEngAttr::Value(), TXmlEngElement::Text() + * + * This method is applicable to TXmlEngElement and TXmlEngAttr nodes. On other nodes FALSE is returned. + * + * @note + * Values (contents) of TXmlEngComment, TXmlEngCDATASection, TXmlEngTextNode, ProcessingInstuction data are + * always "simple". + * + * When the returned result is FALSE, getting value of the node would not returned + * whole contents because of either entity references present in the contents or + * the contents is mixed (for TXmlEngElement node). In this case WholeTextContentsCopyL() + * should be used. + * + * @see TXmlEngNode::WholeTextContentsCopyL() + */ + IMPORT_C TBool IsSimpleTextContents() const; + + /** + * Use NodeType() to find out the type of the node prior to casting object + * of TXmlEngNode class to one of its derived subclasses (TXmlEngElement, TXmlEngAttr, TXmlEngTextNode, etc.) + * + * @since S60 v3.1 + * @return Type of the node + * + * @see TXmlEngDOMNodeType + */ + IMPORT_C TXmlEngDOMNodeType NodeType() const; + + /** + * Get node name + * + * @since S60 v3.1 + * @return Name of the node + * + * This method generally follows DOM spec : + * ------------------------------------------------------------------------------- + * The values of nodeName, nodeValue, and attributes vary according to the node + * type as follows: + * + * interface nodeName nodeValue attributes + * ------------------------------------------------------------------------------- + * Attr = Attr.name = Attr.value = null + * CDATASection = "#cdata-section" = CharacterData.data = null + * Comment = "#comment" = CharacterData.data = null + * Document = "#document" = null = null + * DocumentFragment = "#document-fragment" = null = null + * DocumentType = DocumentType.name = null = null + * Element = Element.tagName = null = NamedNodeMap + * Entity = entity name = null = null + * EntityReference = name of entity referenced = null = null + * Notation = notation name = null = null + * ProcessingInstruction = target = data = null + * Text = "#text" = CharacterData.data = null + * ------------------------------------------------------------------------------- + */ + IMPORT_C TPtrC8 Name() const; + + + /** + * Check if node has child nodes. + * + * @since S60 v3.1 + * @return True if the node is TXmlEngElement and has at least one child node + */ + IMPORT_C TBool HasChildNodes() const; + + /** + * Check if node has attributes. + * + * @since S60 v3.1 + * @return True if the node is TXmlEngElement and has at least one attribute + * + * @note Namespace-to-prefix bindings are not attributes. + */ + IMPORT_C TBool HasAttributes() const; + + /** + * Evaluates active base URI for the node by processing xml:base attributes of parents + * + * @since S60 v3.1 + * @return A copy of effective base URI for the node + * @note It's up to the caller to free the string + */ + IMPORT_C void BaseUriL(RBuf8& aBaseUri) const; + + /** + * Compares nodes. + * + * The nodes are the same if they are referring to the same in-memory + * data structure. + * + * @since S60 v3.1 + * @param aOther Node to compare + * @return TRUE if the same + */ + inline TBool IsSameNode(TXmlEngNode aOther) const; + + /** + * Get namespace uri. + * + * @since S60 v3.1 + * @return Namespace URI of a node + * - NULL is returned for elements and attributes that do not + * belong to any namespace. + * - bound namespace URI is returned for namespace declaration nodes (instances of TXmlEngNamespace). + * - NULL is returned to all other types of node. + * + * @note use IsNull() and NotNull() for testing returned result on the subject + * of having some URI + */ + IMPORT_C TPtrC8 NamespaceUri() const; + + /** + * Get namespace prefix. + * + * @since S60 v3.1 + * @return Prefix of a node + * Returns NULL for elements and attributes that do not have prefix + * (node belongs to the default namespace or does not belong to any namespace) + * NULL is also returned for all types of node other than TXmlEngElement or TXmlEngAttr + */ + IMPORT_C TPtrC8 Prefix() const; + + /** + * Check if nemespace is default for this node + * + * @since S60 v3.1 + * @param aNamespaceUri Namespace URI + * @return True if given namespace URI is a default one for the node (applicable to elements only) + * + * @note "" or NULL can be used to denote undefined namespace + */ + IMPORT_C TBool IsDefaultNamespaceL(const TDesC8& aNamespaceUri) const; + + /** + * Searches the prefix that is bound to the given aNamespaceUri and + * applicable in the scope of this TXmlEngNode. + * + * @since S60 v3.1 + * @param aNamespaceUri Namespace Uri that should be found + * @return A sought prefix or NULL if not found or aNamespaceUri is the default namespace + * + * @see TXmlEngElement::LookupNamespaceByUriL(const TDesC8&) + */ + IMPORT_C TPtrC8 LookupPrefixL(const TDesC8& aNamespaceUri) const; + + /** + * Searches the namespace URI that is bound to the given prefix. + * + * @since S60 v3.1 + * @param aPrefix Namespace prefix that should be found + * @return A sought URI or NULL if the prefix is not bound + * + * @see TXmlEngElement::LookupNamespaceByPrefixL(const TDesC8&) + */ + IMPORT_C TPtrC8 LookupNamespaceUriL(const TDesC8& aPrefix) const; + +protected: + /** + * Unlinks the internal libxml2's node from double-linked list. + * Relinks neighbour nodes.The node stays virtually linked to its old neighbours! Use with care!! + * + * No checks are made; nor parent's, nor node's properties updated + * + * @since S60 v3.1 + */ + void DoUnlinkNode(); + + /** + * Inserts the node in a double-linked list of nodes before specified node. + * + * No checks are made; nor parent's, nor node's properties updated (except prev/next) + * + * @since S60 v3.1 + * @param aNode Target node + */ + void LinkBefore(TXmlEngNode aNode); + +protected: + /** Node pointer */ + void* iInternal; + +}; + +#include "xmlengnode.inl" + +#endif /* XMLENGINE_NODE_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnode.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnode.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,94 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Node functions implementation +* +*/ + + + + + + + +inline TXmlEngNode::TXmlEngNode() + : iInternal(NULL) {} + +inline TXmlEngNode::TXmlEngNode(void* aInternal) + : iInternal(aInternal) {} + +inline TBool TXmlEngNode::IsNull() const + {return iInternal == NULL;} + +inline TBool TXmlEngNode::NotNull() const + {return iInternal != NULL;} + +// ------------------------------------------------------------------------ +// Compares nodes. +// +// The nodes are the same if they are referring to the same in-memory +// data structure. +// ------------------------------------------------------------------------ +// +inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const + {return iInternal == aOther.iInternal;} + +// ------------------------------------------------------------------------ +// Moves the node to another part of the tree or another document +// The node is unliked from current postion (if any) and appended +// to the its new parent. +// +// @note +// In many cases this method call should be followed by ReconcileNamespacesL() on the moved node +// ------------------------------------------------------------------------ +// +inline TXmlEngNode TXmlEngNode::MoveTo(TXmlEngNode aParent) + {return aParent.AppendChildL(Unlink());} + +inline TXmlEngAttr& TXmlEngNode::AsAttr() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngElement& TXmlEngNode::AsElement() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngTextNode& TXmlEngNode::AsText() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngBinaryContainer& TXmlEngNode::AsBinaryContainer() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngChunkContainer& TXmlEngNode::AsChunkContainer() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngFileContainer& TXmlEngNode::AsFileContainer() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngDataContainer& TXmlEngNode::AsDataContainer() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngNamespace& TXmlEngNode::AsNamespace() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngComment& TXmlEngNode::AsComment() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection() const + {return *reinterpret_cast(const_cast(this));} + + +inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const + {return *reinterpret_cast(const_cast(this));} + +inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const + {return *reinterpret_cast(const_cast(this));} + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnodefilter.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnodefilter.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,63 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Node filter interface +* +*/ + + + + + + + +#ifndef XMLENGINE_NODEFILTER_H_INCLUDED +#define XMLENGINE_NODEFILTER_H_INCLUDED + +#include + +class TXmlEngNode; + +/** + * Results that can be returned by node filter + */ +enum TXmlEngNodeFilterResult + { + EAccept = 1, + EReject = 2, + ESkip = 3, + ESkipContents = 4 /** non-standard feature */ + }; + +/** + * Interface of nodes filter class + * + * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.html#Traversal-NodeFilter + * + * @since S60 v3.1 + */ +class MXmlEngNodeFilter + { +public: + /** + * Check if node is accepted. + * + * @since S60 v3.1 + * @param aNode Node to check + * @return Node filter result + */ + virtual TXmlEngNodeFilterResult AcceptNode(TXmlEngNode aNode) = 0; + }; + + +#endif /* XMLENGINE_NODEFILTER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnodelist.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnodelist.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,131 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Node list inline functions +* +*/ + + + + + + + +#ifndef XMLENGINE_NODELIST_H_INCLUDED +#define XMLENGINE_NODELIST_H_INCLUDED + +#include "xmlengnode.h" +#include "xmlengnodelist_impl.h" + + + +/** + * Template implements list container. + * + * List may contain different types of nodes. + * Node pointer is casted to specify node type when + * is returned by Next() method. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.2 + */ +template +class RXmlEngNodeList +{ +public: + /** + * Get list length. + * + * @since S60 v3.2 + * @return Number of nodes in a node list + */ + inline TInt Count() const; + + /** + * Checks whether next node exists in a node list + * + * @since S60 v3.2 + * @return TRUE if next node exists, FALSE otherwise + */ + inline TBool HasNext() const; + + /** + * Retrieves next node from a node list + * + * @since S60 v3.2 + * @return Next node + */ + inline T Next(); + + /** + * Closes a node list + * + * @since S60 v3.2 + */ + inline void Close(); + +private: + friend class TXmlEngNode; + friend class TXmlEngElement; + + /* + * Opens node. + * + * @since S60 v3.2 + * @param aHead node pointer to the node from which the searching + of list elements is started + * @param aType type of list elements + * @param aName name of list elements + * @param aNs namespace of list elements + * + * @note If aType is NULL, aName and aNs are ignored + */ + void OpenL( + void* aHead, + TXmlEngNode::TXmlEngDOMNodeType aType, + const TDesC8& aName = KNullDesC8, + const TDesC8& aNs = KNullDesC8); + + /** + * Opens node. + * + * @since S60 v3.2 + * @param aHead node pointer to the node from which the searching + of list elements is started + * @param aType type of list elements + */ + void Open( + void* aHead, + TXmlEngNode::TXmlEngDOMNodeType aType); + + /** List with nodes */ + RXmlEngNodeListImpl iList; +}; + +/** + * Template implements list container for nodes. + * + * Specialization for trivial case: list of TXmlEngNode objects + * No "thin wrapper" pattern needed, operate directly on NodeListImpl + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +template<> +class RXmlEngNodeList: public RXmlEngNodeListImpl {}; + + + +#include "xmlengnodelist.inl" + +#endif /* XMLENGINE_NODELIST_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnodelist.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnodelist.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,86 @@ +/* +* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Node list inline functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Retrieves number of items in node list +// ----------------------------------------------------------------------------- +// +template inline TInt RXmlEngNodeList::Count() const + { + return iList.Count(); + } + +// ----------------------------------------------------------------------------- +// Returns true if this node has next sibling, false otherwise. +// ----------------------------------------------------------------------------- +// +template inline TBool RXmlEngNodeList::HasNext() const + { + return iList.HasNext(); + } + +// ----------------------------------------------------------------------------- +// Retrieves next node +// ----------------------------------------------------------------------------- +// +template inline T RXmlEngNodeList::Next() + { + TXmlEngNode t = iList.Next(); + return *(static_cast(&t)); + } + +// ----------------------------------------------------------------------------- +// Closes node list +// ----------------------------------------------------------------------------- +// +template inline void RXmlEngNodeList::Close() + { + iList.Close(); + } + +// ----------------------------------------------------------------------------- +// Opens node list +// ----------------------------------------------------------------------------- +// +template inline void RXmlEngNodeList::OpenL( + void* aHead, + TXmlEngNode::TXmlEngDOMNodeType aType, + const TDesC8& aName, + const TDesC8& aNs) + { + iList.OpenL(aHead, aType, aName, aNs); + } + +// ----------------------------------------------------------------------------- +// Opens node list +// ----------------------------------------------------------------------------- +// +template inline void RXmlEngNodeList::Open( + void* aHead, + TXmlEngNode::TXmlEngDOMNodeType aType) + { + iList.Open(aHead, aType); + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengnodelist_impl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengnodelist_impl.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,122 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Node list implementation functions +* +*/ + + + + + + + +#ifndef XMLENGINE_NODELIST_IMPL_H_INCLUDED +#define XMLENGINE_NODELIST_IMPL_H_INCLUDED + +#include +#include "xmlengnode.h" + +/** + * Class implements list container. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.2 + */ +class RXmlEngNodeListImpl +{ +public: + + /** + * Default constructor + * + * @since S60 v3.2 + */ + IMPORT_C RXmlEngNodeListImpl(); + + /** + * Closes node list + * + * @since S60 v3.2 + */ + IMPORT_C void Close(); + + /** + * Get list length. + * + * @since S60 v3.2 + * @return Number of nodes in a node list + */ + IMPORT_C TInt Count() const; + + /** + * Checks whether next node exists in a node list + * + * @since S60 v3.2 + * @return TRUE if next node exists, FALSE otherwise + */ + IMPORT_C TBool HasNext() const; + + /** + * Retrieves next node from a node list + * + * @since S60 v3.2 + * @return Next node + */ + IMPORT_C TXmlEngNode Next(); + + /** + * Opens node. + * + * @since S60 v3.2 + * @param aHead node pointer to the node from which the searching + of list elements is started + * @param aType type of list elements + * @param aName name of list elements + * @param aNs namespace of list elements + * + * @note If aType is NULL, aName and aNs are ignored + */ + void OpenL( + void* aHead, + TXmlEngNode::TXmlEngDOMNodeType aType, + const TDesC8& aName = KNullDesC8, + const TDesC8& aNs = KNullDesC8); + + /** + * Opens node. + * + * @since S60 v3.2 + * @param aHead node pointer to the node from which the searching + of list elements is started + * @param aType type of list elements + */ + void Open( + void* aHead, + TXmlEngNode::TXmlEngDOMNodeType aType); + +private: + + void* FindNextNode(void* aCurrentNode) const; + + void* iCurrentNode; + TInt iType; // NodeType:4 bits (0-3) & MatchName flag (bit 4) + unsigned char* iName; + unsigned char* iNsUri; +}; + +TBool StrEqualOrNull(const void* aStr1, const void* aStr2); + + + +#endif /* XMLENGINE_NODELIST_IMPL_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengoutputstream.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengoutputstream.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,64 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface class describing class that may be used as +* output stream for dom tree +* +*/ + + + + + + + +#ifndef XMLENGINE_MOUTPUTSTREAM_H_INCLUDED +#define XMLENGINE_MOUTPUTSTREAM_H_INCLUDED + +#include + + + +/** + * MXmlEngOutputStream is used by XML Engine to write serialized XML data + * to stream. This interface should be implemented by client application + * when RXmlEngDocument::SaveL() method is used to serialize xml data to stream. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class MXmlEngOutputStream + { +public: + /** + * Callback for writing a buffer with data to output stream + * + * @since S60 v3.1 + * @return number of bytes written or -1 in case of error + */ + virtual TInt Write(const TDesC8& aBuffer) = 0; + + /** + * Callback for closing output stream + * + * @since S60 v3.1 + * @return + * 0 is succeeded, + * -1 in case of error + */ + virtual TInt Close() = 0; + }; + + + +#endif /* XMLENGINE_MOUTPUTSTREAM_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengprocessinginstruction.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengprocessinginstruction.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,96 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Processing instruction node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_PROCESSINGINSTRUCTION_H_INCLUDED +#define XMLENGINE_PROCESSINGINSTRUCTION_H_INCLUDED + +#include "xmlengnode.h" + + + +/** + * Instance of TXmlEngProcessingInstruction class represents an XML processing + * instruction in the DOM tree. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngProcessingInstruction : public TXmlEngNode +{ + public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngProcessingInstruction(); + + /** + * Get target of processing instruction. + * + * @since S60 v3.1 + * @return "Target" part of a processing instruction + * + * @code + * + * @endcode + * @see http://www.w3.org/TR/2004/REC-xml-20040204/#sec-pi + */ + IMPORT_C TPtrC8 Target() const; + + /** + * Get data of processing instruction. + * + * @since S60 v3.1 + * @return "Data" part of a processing instruction + * + * @code + * + * @endcode + * @see http://www.w3.org/TR/2004/REC-xml-20040204/#sec-pi + */ + IMPORT_C TPtrC8 Data() const; + + /** + * Sets data part of processing instruction + * + * @since S60 v3.1 + * @param aData New data part of processing instruction + * @note PI contents should not contain "?>" sequence + */ + IMPORT_C void SetDataL(const TDesC8& aData); + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal processing instruction pointer + */ + inline TXmlEngProcessingInstruction(void* aInternal); +}; + + + +#include "xmlengprocessinginstruction.inl" +#endif /* XMLENGINE_PROCESSINGINSTRUCTION_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengprocessinginstruction.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengprocessinginstruction.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Processing instruction inline functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngProcessingInstruction::TXmlEngProcessingInstruction():TXmlEngNode(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngProcessingInstruction::TXmlEngProcessingInstruction(void* aInternal):TXmlEngNode(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengserializationoptions.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengserializationoptions.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,93 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Serialization options functions +* +*/ + + + + + + + + +#ifndef XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED +#define XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED + +#include + +// FORWARD DECLARATION +class MXmlEngOutputStream; +class MXmlEngDataSerializer; +class MXmlEngNodeFilter; + +/** + * Class allow to set serialization option during document save. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngSerializationOptions + { +public: + /** Use indent in output */ + static const TUint KOptionIndent = 0x01; + /** Skip xml declaration */ + static const TUint KOptionOmitXMLDeclaration = 0x02; + /** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */ + static const TUint KOptionStandalone = 0x04; + /** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */ + static const TUint KOptionEncoding = 0x08; + /** Not supported currently */ + static const TUint KOptionIncludeNsPrefixes = 0x10; + /** Not supported currently */ + static const TUint KOptionCDATASectionElements = 0x20; + /** Decode base64 encoded binary containers content upon XOP serialization*/ + static const TUint KOptionDecodeBinaryContainers = 0x40; + + /** + * Constructor + * + * @since S60 v3.1 + * @param aOptionFlags Serialization options + * @param aEncoding Serialization encoding + */ + IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = + (TXmlEngSerializationOptions::KOptionIndent | + TXmlEngSerializationOptions::KOptionStandalone | + TXmlEngSerializationOptions::KOptionEncoding), + const TDesC8& aEncoding = KNullDesC8); + + /** + * Set node filter + * + * @since S60 v3.1 + * @param aFilter New node filter + */ + IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter); + +public: + /** Options flag */ + TUint iOptions; + /** Encoding */ + TPtrC8 iEncoding; + /** Node filter */ + MXmlEngNodeFilter* iNodeFilter; + /** Object whose serialization callback is invoked **/ + MXmlEngDataSerializer* iDataSerializer; + }; + + + +#endif /* XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengtext.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengtext.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,90 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Text node functions +* +*/ + + + + + + + +#ifndef XMLENGINE_TEXT_H_INCLUDED +#define XMLENGINE_TEXT_H_INCLUDED + +#include "xmlengcharacterdata.h" + + + +/** + * The TXmlEngTextNode interface inherits from TXmlEngCharacterData and represents the textual content + * (termed "character data" in XML) of an Element or TXmlEngAttr. + * + * If there is no markup inside an element's content, the text is contained in a single object + * of the TXmlEngTextNode interface that is the only child of the element. If there is markup, + * it is parsed into the information items (elements, comments, etc.) and TXmlEngTextNode nodes that + * form the list of children of the element. + * + * When a document is first made available via the DOM, there is only one TXmlEngTextNode node for each + * block of text. Users may create adjacent TXmlEngTextNode nodes that represent the contents of a given + * element without any intervening markup, but should be aware that there is no way to + * represent the separations between these nodes in XML or HTML, so they will not (in general) + * persist between DOM editing sessions. + * + * No lexical check is done on the content of a TXmlEngTextNode node and, depending on its position in + * the document, some characters must be escaped during serialization using character references; + * e.g. the characters "<&" if the textual content is part of an element or of an attribute, + * the character sequence "]]>" when part of an element, the quotation mark character " or + * the apostrophe character ' when part of an attribute. + * + * DOM Level 3 spec: + *

http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1312295772 + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class TXmlEngTextNode : public TXmlEngCharacterData +{ +public: + /** + * Default constructor + * + * @since S60 v3.1 + */ + inline TXmlEngTextNode(); + + /** + * Check if element content is whitespace. + * + * @since S60 v3.1 + * @return TRUE if is only whitespace + */ + IMPORT_C TBool IsElementContentWhitespace() const; + +protected: + /** + * Constructor + * + * @since S60 v3.1 + * @param aInternal Text node pointer + */ + inline TXmlEngTextNode(void* aInternal); +}; + + + +#include "xmlengtext.inl" + +#endif /* XMLENGINE_TEXT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlengtext.inl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlengtext.inl Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,41 @@ +/* +* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Text node inline functions +* +*/ + + + + + + + + + +// ----------------------------------------------------------------------------- +// Default constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngTextNode::TXmlEngTextNode():TXmlEngCharacterData(NULL) + { + } + +// ----------------------------------------------------------------------------- +// Constructor +// ----------------------------------------------------------------------------- +// +inline TXmlEngTextNode::TXmlEngTextNode(void* aInternal):TXmlEngCharacterData(aInternal) + { + } + diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xml/dom/xmlenguserdata.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/xml/dom/xmlenguserdata.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,74 @@ +/* +* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members +* which accompanies this distribution, and is available +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: Interface class describing class that may contains user + * data aded to node + * +*/ + + + + + + + +#ifndef XMLENGINE_USERDATA_H_INCLUDED +#define XMLENGINE_USERDATA_H_INCLUDED + +#include + +/** + * MXmlEngUserData is an abstract base class (interface) for user data that can be + * stored in the DOM tree. Applications that wish to store user data in the + * DOM tree must wrap the user data in a class that implemens this interface. + * + * @lib XmlEngineDOM.lib + * @since S60 v3.1 + */ +class MXmlEngUserData { +public: + /** + * Free memory that is allocated and do other case specific cleanup. + * + * @since S60 v3.1 + */ + virtual void Destroy() = 0; + + /** + * Make a copy of the the object. Note that if reference counting is used or + * the same pointer can be safely copied to other places the implementation + * of this method may just return a pointer to self. + * + * Copying user data when copying nodes has not been implemented + * so this method is for future use (though there's no harm in implementing + * it, of course). + * + * @since S60 v3.1 + * @return Pointer to a copy of this object. + */ + virtual MXmlEngUserData* CloneL() = 0; + + /** + * Get id of the object. It is up to user-data provider what the result is. + * Such a "user data identification" may be in use if several types of + * MXmlEngUserData objects are used. + * + * @since S60 v3.1 + * @return Pointer that somehow identifies the type of MXmlEngUserData (NULL by default) + */ + virtual void* ID() {return NULL;} +}; + + + +#endif /* XMLENGINE_USERDATA_H_INCLUDED*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlelemt.h --- a/epoc32/include/xmlelemt.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// XmlElement.h -// XML Element class -// Derived from CTypedNode. Adds functionality -// to make the use of the node simpler -// -// - -#ifndef __XMLELEMT_H -#define __XMLELEMT_H - -// -// INCLUDES -// -#include -#include - -// -// CONSTANTS -// -/** -@publishedAll -@deprecated -*/ -_LIT(KXmlElementDataItemAttributeName, "__XML_DI"); - -// -// DATA TYPES -// -enum TXmlElementPanic -/** -@publishedAll -@deprecated -*/ -{ - EXmlElPanicInvalidDataItem = 1 -}; - -// Type of an attribute in a node -typedef const TDesC* TXmlAttributeType; -// Type of an element (type of node) -typedef const TDesC* TXmlElementType; - -// -// FUNCTION PROTOTYPES -// -/** -@publishedAll -@deprecated -*/ -GLREF_C void Panic(TXmlElementPanic aPanic); - -// -// FORWARD DECLARATIONS -// -class RFile; -class CAttributeLookupTable; - -// -// CLASS DEFINITIONS -// -//##ModelId=3B66798702FF -class CXmlElement : public CTypedNode -/** -@publishedAll -@deprecated -*/ -{ -public: - // Construction - //##ModelId=3B6679870364 - static inline CXmlElement* NewL(TXmlElementType aType,CNode* aParent); - - // Attributes - // Return the value of a particular attribute - //##ModelId=3B667987035D - IMPORT_C const TDesC* Attribute(const TDesC& aAttributeName) const; - // Return the value of an aIndexth attribute - //##ModelId=3B6679870362 - inline const TDesC* Attribute(TInt aIndex) const; - - // Set attribute value - //##ModelId=3B6679870359 - IMPORT_C void SetAttributeL(const TDesC& aAttributeName, const TDesC& aAttributeValue, CAttributeLookupTable& aAttributeLUT); - - // Store a unicode descriptor as data value. - //##ModelId=3B6679870357 - IMPORT_C void SetTextL(const TDesC& aData); - // Get data value - //##ModelId=3B6679870352 - inline const TDesC* Text() const; - - // Children - //##ModelId=3B6679870350 - inline void AppendChildL(CXmlElement* aElement); - - //##ModelId=3B667987034D - IMPORT_C void InsertChildL(TInt aIndexToInsertBefore, CXmlElement* aElement); - - //##ModelId=3B6679870347 - inline TInt Count() const; - - //##ModelId=3B6679870345 - inline CXmlElement* Child(TInt aIndex) const; - - // Find out the index of this child - // INPUT: - // aChild - Pointer to the child node - // RETURN: - // TInt - index to the child, -1 if no child found - //##ModelId=3B6679870343 - IMPORT_C TInt ChildIndex(CXmlElement* aChild) const; - - // Data item - //##ModelId=3B667987033C - IMPORT_C void SetDataItemL(CBase* aDataItem, CAttributeLookupTable& aAttributeLUT); // takes ownership of aDataItem - //##ModelId=3B667987033B - IMPORT_C CBase* DataItem() const; - //##ModelId=3B6679870339 - IMPORT_C void DeleteDataItem(CAttributeLookupTable& aAttributeLUT); - -private: - // Data Item handling - class CDataItemAttribute : public CBase - { - public: - ~CDataItemAttribute() { delete iDataItem; }; - CBase* iDataItem; - }; - - //##ModelId=3B6679870335 - CXmlElement() : CTypedNode(NULL, NULL) {}; - -// Debug stuff -//#ifdef _DEBUG -public: - //##ModelId=3B6679870334 - IMPORT_C void WriteIntoFileL(); - //##ModelId=3B6679870331 - void StartWriteL(RFile& aFile, TInt aIndentation); -private: - //##ModelId=3B6679870327 - void WriteNameL(RFile& aFile, TInt aIndentation); -//#endif -}; - -// -// INLINE METHODS -// -inline CXmlElement* CXmlElement::NewL(TXmlElementType aType,CNode* aParent) -{ - return (CXmlElement*)CTypedNode::NewL(aType, aParent); -} - -inline const TDesC* CXmlElement::Attribute(TInt aIndex) const -{ - return (TDesC*)((CDataDelete*)AttributeByIndex(aIndex))->Data(); -} - -inline const TDesC* CXmlElement::Text() const -{ - return (const TDesC*)CTypedNode::Data(); -} - -inline void CXmlElement::AppendChildL(CXmlElement* aElement) -{ - CTypedNode::AppendNodeToThisNodeL(aElement); -} - -inline TInt CXmlElement::Count() const -{ - return NumberImmediateChildren(); -} - -inline CXmlElement* CXmlElement::Child(TInt aIndex) const -{ - return (CXmlElement*)CTypedNode::Child(aIndex); -} - -#endif //__XMLELEMT_H diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengattr.h --- a/epoc32/include/xmlengattr.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,192 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Attribute node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_ATTR_H_INCLUDED -#define XMLENGINE_ATTR_H_INCLUDED - -#include "xmlengnode.h" - -/** - * Instance of TXmlEngAttr class represents an XML attribute in the DOM tree. - * - * Is a storage attributes properties. Implements DOM action for it. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngAttr : public TXmlEngNode -{ - public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngAttr(); - - - /** - * Clones attribute node - * - * @since S60 v3.1 - * @return A copy of the attribute with its value - * - * @note Namespace of the attribute is reset; use - * TXmlEngNode::CopyToL(TXmlEngNode), which finds appropriate or creates - * new namespace declaration on the new parent node (argument should be - * an TXmlEngElement handle) - * - * @see CopyToL(TXmlEngNode) - */ - IMPORT_C TXmlEngAttr CopyL() const; - - /** - * Get owner element - * - * @since S60 v3.1 - * @return TXmlEngElement that contains the attribute - * - * Same as TXmlEngNode::ParentNode() but returns TXmlEngElement - * instead of TXmlEngNode. - * - * @note Copies of attributes [TXmlEngAttr::CopyL()] and newly created - * attribute nodes [RXmlEngDocument::CreateAttributeL(..)] do not have - * parent element until they are attached to some element. - */ - IMPORT_C const TXmlEngElement OwnerElement() const; - - /** - * Check attribute name. - * - * @since S60 v3.1 - * @return Local name of the attribute - * - * @note Equal to TXmlEngNode::Name(), but works faster. - * - * Never call this on NULL object! - * @see TXmlEngNode::Name() - */ - IMPORT_C TPtrC8 Name() const; - - /** - * Get element value. - * - * @since S60 v3.1 - * @return Attribute's contents - * - * @note For values consisting of more then one TXmlEngTextNode node - * (as attribute's child) returns only the begining of the value; - * this happens when the value is represented by list of TXmlEngTextNode - * and TXmlEngEntityReference nodes. - * - * @see IsSimpleContents(), WholeValueCopyL() - */ - IMPORT_C TPtrC8 Value() const; - - /** - * Get copy of attribute content - * - * @since S60 v3.1 - * @return Complex value of the attribute, - * probably consisting of text nodes and entity references - * - * Since the value may be composed from a set of TXmlEngTextNode - * and EntityRefernce nodes, the returned result is newly allocated - * string, which should be freed by caller. - * - * BE SURE TO FREE THE RESULT STRING!!! - * - * Example usage of the API: - * @code - * RBuf8 value; - * attr.WholeValueCopyL(value); - * ... - * value.Close(); - * @endcode - * - * @see TXmlEngAttr::Value(), TXmlEngNode::Value(), - * TXmlEngNode::IsSimpleTextContents(), - * TXmlEngNode::WholeTextContentsCopyL() - * - * @note In most cases using Value() is enough (and it needs no memory allocation). - * Use IsSimpleTextContents() if there doubts can Value() be used or not safely. - */ - IMPORT_C void WholeValueCopyL(RBuf8& aBuffer) const; - - /** - * Sets new value of the attribute. Provided new value will be escaped - * as needed. - * - * @ since S60 v3.1 - * @param aNewValue A string value for the attribute - * - * The new value should not contain entity references. - * Entity references are not expanded, but used as text, because - * the ampersand (&) character of reference is escaped. - * - * @see SetEscapedValueL(const TDesC8&) - */ - IMPORT_C void SetValueL(const TDesC8& aNewValue); - - /** - * Sets new value from escaped XML character data that may contain - * entity references. - * - * The value as if it is an escaped contents from XML file. - * If the value contains entity references, then the resulting - * content of the attribute is a list of TXmlEngTextNode - * and TXmlEngEntityRefeerence nodes. - * Predefined entities are converted into characters they represent. - * - * @param aNewValue is a new attribute value - * @since S60 v3.1 - * - * @see TXmlEngAttr::SetValueL(const TDesC8&) - */ - IMPORT_C void SetEscapedValueL(const TDesC8& aNewValue); - - /** - * Sets new attribute value exactly as presented in the string. - * - * Predefined entities are not converted into characters they represent. - * - * @param aNewValue is a new attribute value - * @since S60 v3.2 - * - * @see TXmlEngAttr::SetValueL(const TDesC8&) - */ - IMPORT_C void SetValueNoEncL(const TDesC8& aNewValue ); - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal attribute pointer - */ - inline TXmlEngAttr(void* aInternal); -}; - -#include "xmlengattr.inl" - -#endif /* XMLENGINE_ATTR_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengattr.inl --- a/epoc32/include/xmlengattr.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Attribute node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngAttr::TXmlEngAttr() - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngAttr::TXmlEngAttr(void* aInternal):TXmlEngNode(aInternal) - { - } - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengbinarycontainer.h --- a/epoc32/include/xmlengbinarycontainer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,103 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: All binary data functions -* -*/ - - - - - - - -#ifndef XMLENGINE_BINARYCONTAINER_H_INCLUDED -#define XMLENGINE_BINARYCONTAINER_H_INCLUDED - -#include "xmlengdatacontainer.h" - -/** -* Instance of TXmlEngBinaryContainer class represents binary data in -* DOM tree. -* -* Binary data is treated in general as text nodes in DOM tree. -* Some of the fields in xmlNode structure are reused in order to save memory. -* Data is stored in process's heap memory. -* -* Sample code for creating binary container: -* @code -* RXmlEngDOMImplementation domImpl; -* domImpl.OpenL(); ///< opening DOM implementation object -* RXmlEngDocument iDoc; -* ///< create document element -* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); -* ///< create binary container from buffer (str1) and CID equals cid -* TXmlEngBinaryContainer binData=iDoc.CreateBinaryContainerL(cid,*str1); -* elem.AppendChildL(binData); ///< append container to the dom tree -* iDoc.Close(); ///< closing all opened objects -* domImpl.Close(); -* @endcode -* -* @lib XmlEngineDOM.lib -* @since S60 v3.2 -*/ -class TXmlEngBinaryContainer : public TXmlEngDataContainer -{ -public: - - /** - * Get content of the container. - * - * @since S60 v3.2 - * @return TPtrC8 with container content - * - */ - IMPORT_C TPtrC8 Contents() const; - - /** - * Sets contents of binary container - * - * @since S60 v3.2 - * @param aNewContents The actual value to store - */ - IMPORT_C void SetContentsL( const TDesC8& aNewContents ); - - /** - * Appends contents to binary container - * - * @since S60 v3.2 - * @param aData Content to be appended to current content - */ - EXPORT_C void AppendContentsL( const TDesC8& aData ); - - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngBinaryContainer(); - -protected: - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal node pointer - */ - inline TXmlEngBinaryContainer(void* aInternal); -}; - -#include "xmlengbinarycontainer.inl" - -#endif /* XMLENGINE_BINARYCONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengbinarycontainer.inl --- a/epoc32/include/xmlengbinarycontainer.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Binary data node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// - -inline TXmlEngBinaryContainer::TXmlEngBinaryContainer():TXmlEngDataContainer(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// - -inline TXmlEngBinaryContainer::TXmlEngBinaryContainer(void* aInternal):TXmlEngDataContainer(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengcdatasection.h --- a/epoc32/include/xmlengcdatasection.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CDATASection node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_CDATASECTION_H_INCLUDED -#define XMLENGINE_CDATASECTION_H_INCLUDED - -#include "xmlengtext.h" - -/** - * Instance of TXmlEngCDATASection class represents an XML CDATASection in the DOM tree. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngCDATASection : public TXmlEngTextNode -{ -public: - /** - * Default constructor - */ - inline TXmlEngCDATASection(); - - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal CDATASection pointer - */ - inline TXmlEngCDATASection(void* aInternal); -}; - - - -#include "xmlengcdatasection.inl" - -#endif /* XMLENGINE_CDATASECTION_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengcdatasection.inl --- a/epoc32/include/xmlengcdatasection.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Data section node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngCDATASection::TXmlEngCDATASection():TXmlEngTextNode(NULL) - { - } - - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngCDATASection::TXmlEngCDATASection(void* aInternal):TXmlEngTextNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengcharacterdata.h --- a/epoc32/include/xmlengcharacterdata.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: All text nodes functions -* -*/ - - - - - - - -#ifndef XMLENGINE_CHARACTERDATA_H_INCLUDED -#define XMLENGINE_CHARACTERDATA_H_INCLUDED - -#include "xmlengnode.h" - -/** -* Instance of TXmlEngCharacterData class represents all kinds of XML text nodes -* (i.e. text node, comment node) in the DOM tree. -* -* Describe DOM action for nodes that contains text data. -* DOM spec: -* http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306 -* -* @lib XmlEngineDOM.lib -* @since S60 v3.1 -*/ -class TXmlEngCharacterData : public TXmlEngNode -{ -public: - - /** - * Get content of the node. - * - * @since S60 v3.1 - * @return String with nodes content - * - * This method applies to TXmlEngCDATASection, TXmlEngComment and TXmlEngTextNode nodes. - */ - IMPORT_C TPtrC8 Contents() const; - - /** - * Sets contents of basic character nodes: TXmlEngTextNode, TXmlEngComment, TXmlEngCDATASection - * - * @since S60 v3.1 - * @param aNewContents The actual value to store - * - * The input is taken as non-escaped: for example, - * aNewContents = "123 > 34 && P" will be serialized as "123 > 34 && P" - * - * Escaped contents may be set only for TXmlEngElement and TXmlEngAttr nodes. - * @see TXmlEngAttr::SetEscapedValueL(const TDesC8&), TXmlEngElement::SetEscapedTextL(const TDesC8&), - */ - IMPORT_C void SetContentsL(const TDesC8& aNewContents); - - /** - * Extends the contents of the node by appending aString - * - * @since S60 v3.1 - * @param aString Content to be added to current content - */ - IMPORT_C void AppendContentsL(const TDesC8& aString); - - /** - * Get length of the content - * - * @since S60 v3.1 - * @return Number of characters in the contents - */ - IMPORT_C TUint Length() const; - -protected: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngCharacterData(); // protected from API users - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal node pointer - */ - inline TXmlEngCharacterData(void* aInternal); -}; - - -#include "xmlengcharacterdata.inl" - -#endif /* XMLENGINE_CHARACTERDATA_H_INCLUDED */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengcharacterdata.inl --- a/epoc32/include/xmlengcharacterdata.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Character data node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngCharacterData::TXmlEngCharacterData() - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngCharacterData::TXmlEngCharacterData(void* aInternal):TXmlEngNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengchunkcontainer.h --- a/epoc32/include/xmlengchunkcontainer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: All memory chunk data functions -* -*/ - - - - - - - -#ifndef XMLENGINE_CHUNKCONTAINER_H_INCLUDED -#define XMLENGINE_CHUNKCONTAINER_H_INCLUDED - -#include "xmlengdatacontainer.h" - - -/** -* Instance of TXmlEngChunkContainer class represents data stored in RChunks in DOM tree -* -* RChunk data is treated in general as text nodes in DOM tree. -* Some of the fields in xmlNode structure are reused in order to save memory. -* Data is stored in memory referenced to by RChunk. -* -* Sample code for creating chunk container: -* @code -* RXmlEngDOMImplementation domImpl; -* domImpl.OpenL(); ///< opening DOM implementation object -* RXmlEngDocument iDoc; -* ///< create document element -* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); -* ///< create RChunk object with chunkName name and size -* RChunk chunk; -* chunk.CreateGlobal(chunkName, size, maxSize); -* CleanupClosePushL(chunk); -* ///< create chunk container from Rchunk object with offset to the -* ///< binary data in chunk and binary data size in chunk (binarySize) -* TXmlEngChunkContainer binData = iDoc.CreateChunkContainerL( -* cid,chunk,offset,binarySize); -* ///< append chunkcontainer to the dom tree -* TXmlEngNode ref = iDoc.DocumentElement().AppendChildL(binData); -* ///< closing all opened objects -* CleanupStack::PopAndDestroy();//chunk -* iDoc.Close(); -* domImpl.Close(); -* @endcode -* -* @lib XmlEngineDOM.lib -* @since S60 v3.2 -*/ -class TXmlEngChunkContainer : public TXmlEngDataContainer -{ -public: - /** - * Get memory chunk reference - * - * @since S60 v3.2 - * @return Memory chunk reference - * - */ - IMPORT_C RChunk& Chunk() const; - - /** - * Get offset of binary data in memory chunk - * - * @since S60 v3.2 - * @return Offset of binary data in memory chunk - */ - IMPORT_C TUint ChunkOffset() const; - -protected: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngChunkContainer(); - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal node pointer - */ - inline TXmlEngChunkContainer(void* aInternal); -}; - - - -#include "xmlengchunkcontainer.inl" - -#endif /* XMLENGINE_CHUNKCONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengchunkcontainer.inl --- a/epoc32/include/xmlengchunkcontainer.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: RChunk container functions -* -*/ - - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngChunkContainer::TXmlEngChunkContainer():TXmlEngDataContainer(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngChunkContainer::TXmlEngChunkContainer(void* aInternal):TXmlEngDataContainer(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengcomment.h --- a/epoc32/include/xmlengcomment.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Comment node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_COMMENT_H_INCLUDED -#define XMLENGINE_COMMENT_H_INCLUDED - -#include "xmlengcharacterdata.h" - -/** - * Instance of TXmlEngComment class represents an XML comments in the DOM tree. - * - * DOM spec: http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-FF21A306 - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngComment : public TXmlEngCharacterData -{ -public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngComment(); - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal Comment pointer - */ - inline TXmlEngComment(void* aInternal); -}; - -#include "xmlengcomment.inl" - -#endif /* XMLENGINE_COMMENT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengcomment.inl --- a/epoc32/include/xmlengcomment.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Comment node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngComment::TXmlEngComment():TXmlEngCharacterData(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngComment::TXmlEngComment(void* aInternal):TXmlEngCharacterData(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdatacontainer.h --- a/epoc32/include/xmlengdatacontainer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: All binary data functions -* -*/ - - - - - - - -#ifndef XMLENGINE_DATACONTAINER_H_INCLUDED -#define XMLENGINE_DATACONTAINER_H_INCLUDED - -#include "xmlengnode.h" - - -/** -* TXmlEngDataContainer is a class for representing different types -* of binary data in DOM tree. -* -* It can be cusom-serialized using MXmlEngDataSerializer interface which can -* be set in TXmlEngSerializationOptions used for saving the tree. -* -* @lib XmlEngineDOM.lib -* @since S60 v3.2 -*/ -class TXmlEngDataContainer : public TXmlEngNode -{ -public: - - /** - * Get CID of data container. - * - * @since S60 v3.2 - * @return Cid of data container - * - */ - IMPORT_C TPtrC8 Cid() const; - - /** - * Get data size in bytes - * - * @since S60 v3.1 - * @return Number of bytes occupied by data - */ - IMPORT_C TUint Size() const; - -protected: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngDataContainer(); - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal node pointer - */ - inline TXmlEngDataContainer(void* aInternal); -}; - - - -#include "xmlengdatacontainer.inl" - -#endif /* XMLENGINE_DATACONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdatacontainer.inl --- a/epoc32/include/xmlengdatacontainer.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,43 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Binary data node functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// - -inline TXmlEngDataContainer::TXmlEngDataContainer() - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// - -inline TXmlEngDataContainer::TXmlEngDataContainer(void* aInternal):TXmlEngNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdataserializer.h --- a/epoc32/include/xmlengdataserializer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface class describing class that may be used as -* serializer for binary data -* -*/ - - - - - - - -#ifndef XMLENGINE_MDATASERIALIZER_H_INCLUDED -#define XMLENGINE_MDATASERIALIZER_H_INCLUDED - -#include "xmlengnode.h" - -/** - * MXmlEngDataSerializer interface used by XML Engine to serialize binary data for example binary data - * stored in node, external memory chunk (RChunk) or file. This interface may be implemented by client application. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.2 - */ -class MXmlEngDataSerializer - { -public: - /** - * Callback for serializing data - * - * @since S60 v3.1 - * @param aNode is a node to serialize - * @return Replacement string for node data - */ - virtual TPtrC8 SerializeDataL(TXmlEngNode aNode) = 0; - }; - - -#endif /* XMLENGINE_MDATASERIALIZER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdocument.h --- a/epoc32/include/xmlengdocument.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,573 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Document node functions -* -*/ - - - - - - -#ifndef XMLENGINE_DOCUMENT_H_INCLUDED -#define XMLENGINE_DOCUMENT_H_INCLUDED - -#include - -#include "xmlengnode.h" -#include "xmlengserializationoptions.h" - -// FORWARD DECLARATION -class RXmlEngDOMImplementation; - -/** - * Instance of RXmlEngDocument class represents an XML document in the DOM tree. - * - * Is a storage all nodes and information about XML data. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class RXmlEngDocument : public TXmlEngNode -{ -public: - /** - * Default constructor. - * - * Instance of RXmlEngDocument must be "opened" with one of OpenL() overloads. - * - * @since S60 v3.1 - */ - IMPORT_C RXmlEngDocument(); - - /** - * Opens the document. - * - * @since S60 v3.2 - * @param aDOMImpl DOM implementation object - * @return KErrNone if succeed. - */ - IMPORT_C void OpenL(RXmlEngDOMImplementation& aDOMImpl); - - /** - * Opens the document. - * - * @since S60 v3.2 - * @param aDOMImpl DOM implementation object - * @param aInternal Document pointer - * @return KErrNone if succeed. - */ - IMPORT_C void OpenL(RXmlEngDOMImplementation& aDOMImpl, void* aInternal); - - /** - * Opens the document. - * - * @since S60 v3.2 - * @param aDOMImpl DOM implementation object - * @param aRoot element taht will be root of the DOM tree - * @return KErrNone if succeed. - */ - IMPORT_C void OpenL(RXmlEngDOMImplementation& aDOMImpl, TXmlEngElement aRoot); - - /** - * Closes document - * - * @since S60 v3.1 - */ - IMPORT_C void Close(); - - /** - * Serializes document tree into a file. For nodes containing binary data in the form of BinaryDataContainer, - * FileContainer or ChunkContainer, client can implement custom serialization by implementing the interface - * MXmlEngDataSerializer and specify the pointer in iDataSerializer member of aSaveOptions parameter. If no - * custom serialization is specified, the binary data container nodes are serialized like text nodes. - * - * @since S60 v3.2 - * @param aFileName A file name (with path) - * @param aRoot Root node to be serialized - * @param aSaveOptions Options that control how serialization is performed - * @return Number of byte written - * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding, KErrDiskFull. - */ - IMPORT_C TInt SaveL( const TDesC& aFileName, - TXmlEngNode aRoot = TXmlEngNode(), - const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions() ) const; - - /** - * Serializes document tree into a file. For nodes containing binary data in the form of BinaryDataContainer, - * FileContainer or ChunkContainer, client can implement custom serialization by implementing the interface - * MXmlEngDataSerializer and specify the pointer in iDataSerializer member of aSaveOptions parameter. If no - * custom serialization is specified, the binary data container nodes are serialized like text nodes. - * - * @since S60 v3.2 - * @param aRFs File Server session - * @param aFileName A file name (with path) - * @param aRoot Root node to be serialized - * @param aSaveOptions Options that control how serialization is performed - * @return Number of byte written - * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding, KErrDiskFull. - */ - IMPORT_C TInt SaveL( RFs& aRFs, - const TDesC& aFileName, - TXmlEngNode aRoot = TXmlEngNode(), - const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions() ) const; - - /** - * Serializes a document tree into provided output stream, which supports progressive writing of data. - * For nodes containing binary data in the form of BinaryDataContainer, FileContainer or ChunkContainer, - * client can implement custom serialization by implementing the interface MXmlEngDataSerializer and specify - * the pointer in iDataSerializer member of aSaveOptions parameter. If no custom serialization is specified, - * the binary data container nodes are serialized like text nodes. - * - * @since S60 v3.1 - * @param aStream An output stream to write serialized DOM tree - * @param aRoot Root node to be serialized - * @param aSaveOptions Options that control how serialization is performed - * @return Number of byte written - * @leave KXmlEngErrWrongUseOfAPI or one of general codes (e.g.KErrNoMemory) - * @see MXmlEngOutputStream - */ - IMPORT_C TInt SaveL( MXmlEngOutputStream& aStream, - TXmlEngNode aRoot = TXmlEngNode(), - const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions() ) const; - - /** - * Saves document tree into memory buffer - * - * @since S60 v3.1 - * @param aBuffer Resulting buffer - * @param aRoot A "root" of the subtree to serialize - * @param aSaveOptions Various options to be effective during serialization - * @return Number of bytes in updated buffer - * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding. - * - * @note Result returned via aBuffer argument owns the memory buffer; it is up to - * method caller to free it like in this sample: - * - * @see TXmlEngSerializationOptions - */ - IMPORT_C TInt SaveL(RBuf8& aBuffer, - TXmlEngNode aRoot = TXmlEngNode(), - const TXmlEngSerializationOptions& aSaveOptions = TXmlEngSerializationOptions()) const; - - /** - * Creates complete copy of the document - * - * @since S60 v3.1 - * @return Complete copy of the document tree - */ - IMPORT_C RXmlEngDocument CloneDocumentL() const; - - /** - * Creates new element from specific namespace to be a root of the document tree. - * Any existing document element of the document is destroyed - * - * @since S60 v3.1 - * @param aName Element name - * @param aNamespaceUri Element namespace URI - * @param aPrefix Element namemespace prefix - * @return A new root element - */ - IMPORT_C TXmlEngElement CreateDocumentElementL(const TDesC8& aName, - const TDesC8& aNamespaceUri = KNullDesC8, - const TDesC8& aPrefix = KNullDesC8); - - /** - * Replaces (and destroys) document element with another one - * New document element is added as the last child to the document node - * - * @since S60 v3.1 - * @param aNewDocElement New document tree - * - * @note Use TXmlEngElement::ReconcileNamespacesL() on the new document element - * if it or its descendants can contain references to namespace declarations - * out of the element - * @see TXmlEngElement::ReconcileNamespacesL() - */ - IMPORT_C void SetDocumentElement(TXmlEngElement aNewDocElement); - - /** - * Get document encoding - * - * @since S60 v3.1 - * @return Encoding of the source XML data. - */ - IMPORT_C TPtrC8 XmlEncoding() const; - - /** - * Get xml version - * - * @since S60 v3.1 - * @return Version number of XML taken from XML declaration - */ - IMPORT_C TPtrC8 XmlVersion() const; - - /** - * Retrieves base URI (if defined) of the document or NULL - * - * @since S60 v3.1 - * @return Document URI - */ - IMPORT_C TPtrC8 DocumentUri() const; - - /** - * Check if document is standalone - * - * @since S60 v3.1 - * @return Whether standalone="true" was specified in XML declaration in the source XML file. - */ - IMPORT_C TBool IsStandalone() const; - - /** - * Sets XML version number to be shown in XML declaration when document is serialized. - * - * @since S60 v3.1 - * @param aVersion New version - */ - IMPORT_C void SetXmlVersionL(const TDesC8& aVersion); - - /** - * Sets location of the document. - * Document's URI is used as top-level base URI definition. - * - * @since S60 v3.1 - * @param aUri New document URI - */ - IMPORT_C void SetDocumentUriL(const TDesC8& aUri); - - /** - * Sets 'standalone' attribute of XML declaration for a document - * - * @since S60 v3.1 - * @param aStandalone Is document standalone - */ - IMPORT_C void SetStandalone(TBool aStandalone); - - /** - * Get dom implementation. - * - * @since S60 v3.1 - * @return Object that represents current DOM implementation - * - * @note There is no practical use of implementation object in this version - * of API other than for creating new RXmlEngDocument instances, but - * it will change in the future, when an implementation object - * is used for changing configuration settings at run-time. - */ - IMPORT_C RXmlEngDOMImplementation Implementation() const; - - /** - * Get document element - * - * @since S60 v3.1 - * @return A document element - the top-most element in the document tree - */ - IMPORT_C TXmlEngElement DocumentElement() const; - - /** - * Sets "document" property on the node and all its descendants to be this RXmlEngDocument node - * - * @since S60 v3.1 - * @param aSource Node that should be added. - * @return Adopted node - */ - IMPORT_C TXmlEngNode AdoptNodeL(TXmlEngNode aSource); - - /** - * Creates new attribute, - * - * @since S60 v3.1 - * @param aName Name of the atribute; no prefix allowed - * @param aValue Value of the attribute (optional) - * @return Handler to the newly created attribute - * - * @note - * aValue should represent a correct value of an attribute if it is put as is into XML file - * (with all characters correctly escaped with entity references when XML spec requires) - * - * TXmlEngElement class provides a rich set of attribute creation methods, which not - * just create attribute but also link it into element. - * - * There is no way to create attributes with namespace (despite the DOM spec); - * you have to use one of the TXmlEngElement::AddNewAttributeL(..) methods instead - * - * Returned handler is the only reference to the allocated memory - * until you have attached the attribute to some element node - */ - IMPORT_C TXmlEngAttr CreateAttributeL(const TDesC8& aName, - const TDesC8& aValue = KNullDesC8); - - /** - * Creates new text node and copies the content string into it. - * - * @since S60 v3.1 - * @param aCharacters Text node content - * @return Created node - */ - IMPORT_C TXmlEngTextNode CreateTextNodeL(const TDesC8& aCharacters = KNullDesC8); - - /** - * Creates new binary container and copies the content string into it. - * Pointer to the container is stored in the document's - * data container list that can be fetched using GetDataContainerList(). - * @see GetDataContainerList( RArray& aList ) - * - * @since S60 v3.2 - * @param aCid Content identifier - * @param aData Binary octets - * @return Created node - */ - IMPORT_C TXmlEngBinaryContainer CreateBinaryContainerL( const TDesC8& aCid, - const TDesC8& aData ); - - /** - * Creates new chunk container that stores reference to - * memory chunk. - * Pointer to the container is stored in the document's - * data container list that can be fetched using GetDataContainerList(). - * @see GetDataContainerList( RArray& aList ) - * - * @since S60 v3.2 - * @param aCid Content identifier - * @param aChunk RChunk reference - * @param aChunkOffset Offset to the binary data in aChunk - * @param aDataSize Size of binary data in aChunk - * @return Created node - */ - IMPORT_C TXmlEngChunkContainer CreateChunkContainerL( const TDesC8& aCid, - const RChunk& aChunk, - const TInt aChunkOffset, - const TInt aDataSize ); - - /** - * Creates new file container that stores reference to - * file in file system. - * Pointer to the container is stored in the document's - * data container list that can be fetched using GetDataContainerList(). - * @see GetDataContainerList( RArray& aList ) - * - * @since S60 v3.2 - * @param aCid Content identifier - * @param aFile RFile reference - * @return Created node - */ - IMPORT_C TXmlEngFileContainer CreateFileContainerL( const TDesC8& aCid, - const RFile& aFile ); - - /** - * Creates new element node that belongs to specific namespace. - * A namespace declaration node is created on the element. - * - * @since S60 v3.1 - * @param aNamespaceUri Namespace of new element - * @param aPrefix Prefix to use for namespace binding and QName of the element - * @param aLocalName Local name of the element - * @return Created node - * @note If null namespace uri is provided element will be created without namespace. - */ - IMPORT_C TXmlEngElement CreateElementL(const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8, - const TDesC8& aPrefix = KNullDesC8); - - /** - * Creates new comment node and copies the content string into it. - * - * @since S60 v3.1 - * @param aText New comment - * @return Created node - */ - IMPORT_C TXmlEngComment CreateCommentL(const TDesC8& aText = KNullDesC8); - - /** - * Creates new CDATA section node and copies the content into it. - * - * @since S60 v3.1 - * @param aContents CDATASection content - * @return Created node - */ - IMPORT_C TXmlEngCDATASection CreateCDATASectionL(const TDesC8& aContents = KNullDesC8); - - /** - * Creates new entity reference node for aEntityName entity - * - * @since S60 v3.1 - * @param aEntityRef is a string in one of the forms: - * - name - * - &name - * - &name; - * where name is the name of the entity - * @return Created node - * - * @note < , > , ' , " and other predefined entity references - * should not be created with this method. These entity refs are rather - * "character references" and encoded/decoded automatically. - */ - IMPORT_C TXmlEngEntityReference CreateEntityReferenceL(const TDesC8& aEntityRef); - - /** - * Creates new processing instruction node and set its "target" and "data" values - * - * @since S60 v3.1 - * @param aTarget Target - * @param aData Data - * @return Created node - */ - IMPORT_C TXmlEngProcessingInstruction CreateProcessingInstructionL(const TDesC8& aTarget, - const TDesC8& aData = KNullDesC8); - - /** - * Registers specified attribute as xml:id. - * First parametr allows user, to specify sub-tree, not to search whole document. - * To search whole tree see @see RegisterXmlId(const TDesC8,const TDesC8) - * - * @since S60 v3.2 - * @param aStartElement Root of tree to search (should be part of the document) - * @param aLocalName Name of attribute - * @param aNamespaceUri Namespace of new element (default empty) - */ - IMPORT_C void RegisterXmlIdL(TXmlEngElement aStartElement, - const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8); - - /** - * Registers specified attribute as xml:id. - * Not to search whole tree see @see RegisterXmlId(TXmlEngElement,const TDesC8,const TDesC8) - * - * @since S60 v3.2 - * @param aLocalName Name of attribute - * @param aNamespaceUri Namespace of new element (default empty) - */ - IMPORT_C void RegisterXmlIdL(const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8); - - /** - * Looks for element with specified value of xml:id - * - * @since S60 v3.2 - * @param aValue Name of attribute - * @return found element or null-element. - */ - IMPORT_C TXmlEngElement FindElementByXmlIdL(const TDesC8& aValue ) const; - - /** - * Retrieves an array of data containers owned by this document. - * - * @note The document ceases to be the owner of data container when data container - * (or one of its predecessors) is removed from the document or data container - * (or one of its predecessors) becomes a part of another document. - * Unlinking data container (or one of its predecessors) doesn't remove - * ownership of data container from the this document so the list might - * contain containers that are not linked to this document anymore. - * @since S60 v3.2 - * @param aList Array of data containers - */ - IMPORT_C void GetDataContainerList( RArray& aList ); - -protected: - friend class RXmlEngDOMParser; - friend class TXmlEngNode; - friend class TXmlEngAttr; - friend class TXmlEngElement; - friend class RXmlEngDOMImplementation; - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal Document pointer - */ - inline RXmlEngDocument(void* aInternal); - - /** - * DISABLED for document; CloneDocumentL() must be used - * - * @since S60 v3.1 - */ - inline TXmlEngNode CopyL() const; - - /** - * DISABLED for document; Destroy() must be used - * - * @since S60 v3.1 - */ - inline void Remove(); - - /** - * DISABLED for document; Destroy() must be used - * - * @since S60 v3.1 - */ - inline void ReplaceWith(TXmlEngNode aNode); -private: - /** - * Main implementation of SaveL() functions that puts together all common code - * and serializes to buffer or output stream. - * - * @since S60 v3.2 - * @param aNode Root node to be serialized - * @param aBuffer buffer with serialized data. - * @param aOutputStream stream that should be used during serialization - * @param aSaveOptions Options that control how serialization is performed - * @return Number of bytes written - * @leave KErrNoMemory, KErrGeneral, KXmlEngErrWrongEncoding, KErrDiskFull. - */ - TInt SaveNodeL( TXmlEngNode aNode, - RBuf8& aBuffer, - MXmlEngOutputStream* aOutputStream = NULL, - TXmlEngSerializationOptions aOpt = TXmlEngSerializationOptions()) const; - - /** - * "Secondary" constructor that should be called on every newly created document node. - * Initializes container for nodes owned by the document. - * - * The need for such secondary constructor is in the fact that underlying libxml2 - * library knows nothing about ownership of unlinked nodes -- this feature is - * implemented in C++ DOM wrapper. - * - * @since S60 v3.1 - */ - void InitOwnedNodeListL(); - - /** - * Adds aNode to the list of owned nodes - the nodes that are not linked yet into a - * document tree, but still destroyed with the document that owns them. - * - * @since S60 v3.1 - * @param aNode Node that should be added to document - * - * In case of OOM (during growing node list container) the argument node is freed with - * xmlFreeNode() - */ - void TakeOwnership(TXmlEngNode aNode); - - /** - * Remove aNode from the list of owned nodes. - * - * @since S60 v3.1 - * @param aNode Node that should be removed from document - */ - void RemoveOwnership(TXmlEngNode aNode); - -protected: - /** Pointer to DOM implementation object */ - RXmlEngDOMImplementation* iImpl; - -};// class RXmlEngDocument - - - -#include "xmlengdocument.inl" - -#endif /* XMLENGINE_DOCUMENT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdocument.inl --- a/epoc32/include/xmlengdocument.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Document node functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline RXmlEngDocument::RXmlEngDocument(void* aInternal):TXmlEngNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdocumentfragment.h --- a/epoc32/include/xmlengdocumentfragment.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Document fragment node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_DOCUMENTFRAGMENT_H_INCLUDED -#define XMLENGINE_DOCUMENTFRAGMENT_H_INCLUDED - -#include "xmlengnode.h" - - - -/** - * Instance of TXmlEngDocumentFragment class represents an document fragment of the DOM tree. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngDocumentFragment : public TXmlEngNode -{ -public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngDocumentFragment(); - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal Document fragment pointer - */ - inline TXmlEngDocumentFragment(void* aInternal); -}; - -#include "xmlengdocumentfragment.inl" - -#endif /* XMLENGINE_DOCUMENTFRAGMENT_H_INCLUDED */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdocumentfragment.inl --- a/epoc32/include/xmlengdocumentfragment.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Document fragment node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngDocumentFragment::TXmlEngDocumentFragment():TXmlEngNode(NULL) - { - } - - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngDocumentFragment::TXmlEngDocumentFragment(void* aInternal):TXmlEngNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdom.h --- a/epoc32/include/xmlengdom.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This file is to be included by DOM API clients -* -*/ - - - - - - - -#ifndef XMLENGINE_DOM_H_INCLEDED -#define XMLENGINE_DOM_H_INCLEDED - -#include "XmlEngAttr.h" -#include "XmlEngElement.h" -#include "XmlEngDocument.h" -#include "XmlEngElement.h" -#include "XmlEngCDATASection.h" -#include "XmlEngProcessingInstruction.h" -#include "XmlEngComment.h" -#include "XmlEngDocumentFragment.h" -#include "XmlEngEntityReference.h" -#include "XmlEngNamespace.h" -#include "XmlEngText.h" - -#include "XmlEngBinaryContainer.h" -#include "XmlEngChunkContainer.h" -#include "XmlEngFileContainer.h" - -#include "XmlEngNodeList.h" - -#include "XmlEngErrors.h" -#include "xmlengserializationoptions.h" -#include "xmlengnodefilter.h" -#include "xmlengoutputstream.h" //pjj18 new -#include "xmlengdataserializer.h" //pjj18 new -#include "xmlenguserdata.h" -#include "xmlengdomimplementation.h" -#include "xmlengdomparser.h" - - -#endif // XMLENGINE_DOM_H_INCLEDED - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdomimplementation.h --- a/epoc32/include/xmlengdomimplementation.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,70 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: DOM implementation functions -* -*/ - - - - - - - -#ifndef XMLENGINE_DOMIMPLEMENTATION_H_INCLUDED -#define XMLENGINE_DOMIMPLEMENTATION_H_INCLUDED - -#include - -/** - * The RXmlEngDOMImplementation interface provides a number of methods for performing - * operations that are independent of any particular instance of the document object model. - * - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-102161490 - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class RXmlEngDOMImplementation -{ - public: - - - /** - * Open method needed to initialize the XmlEngineDOM library and should be called before using any - * class/function from this library. The initialization is required in every client thread in which - * it used. Calling this method multiple times in a thread is allowed. There should be a call to Close() - * for every call to Open, per thread. - * - * @since S60 v3.2 - * @param aHeap - pointer to client created heap. If aHeap argument is NULL (by default) - * client thread's default heap is used.- NOT IMPLEMENTED YET - * @return Document handle - */ - IMPORT_C void OpenL( RHeap* aHeap = NULL ); - - /** - * Close method. It does cleanup of resources used by XmlengineDOM library. Client should call this - * method at the end of library usage. The library should not be used after this call. If needed, client - * can initialize the library again by calling Open() method. Libxml2 uses Symbian implementation of POSIX - * standard libraries. During closure of XmlEngineDOM library, the standard library is also closed by default. - * User can choose not to close standard libraries when XmlEngine shuts down, by specifying FALSE in aCloseStdLib flag. - * - * @since S60 v3.2 - * @param aCloseStdLib A flag, if TRUE will close the STDLIB resources belonging to this thread. - * else STDLIB is not closed. - */ - IMPORT_C void Close(TBool aCloseStdLib = ETrue); -}; - -#endif /* XMLENGINE_DOMIMPLEMENTATION_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengdomparser.h --- a/epoc32/include/xmlengdomparser.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,184 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: DOM parser functions -* -*/ - - - - - - - -#ifndef XMLENGINE_DOMPARSER_H_INCLUDED -#define XMLENGINE_DOMPARSER_H_INCLUDED - -#include - -class RXmlEngDOMImplementation; -class RXmlEngDocument; - -/** - * DOM parser class implements methods for parsing XML data. - * - * Parse XML data in one chunk. Data can be parsed from file - * or memory buffer. - * - * Sample code for parsing from buffer: - * @code - * RXmlEngDOMImplementation domImpl; - * domImpl.OpenL(); ///< opening DOM implementation object - * RXmlEngDOMParser parser; - * parser.Open( domImpl ); ///< opening parser object - * RXmlEngDocument iDoc; - * iDoc =parser.ParseL( *aInput ); ///< parsing aInput - buffer - * iDoc.Close(); ///< closing all opened objects - * parser.Close(); - * domImpl.Close(); - * @endcode - * - * Sample code for parsing from file: - * @code - * RXmlEngDOMImplementation domImpl; - * domImpl.OpenL(); ///< opening DOM implementation object - * RXmlEngDOMParser parser; - * parser.Open( domImpl ); ///< opening parser object - * RXmlEngDocument iDoc; - * iDoc =parser.ParseFileL( aFileName ); ///< parsing from file - * iDoc.Close(); ///< closing all openend objects - * parser.Close(); - * domImpl.Close(); - * @endcode - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class RXmlEngDOMParser -{ -public: - /** - * Default constructor - */ - IMPORT_C RXmlEngDOMParser(); - - /** - * Opens the parser. - * - * @since S60 v3.2 - * @param aDOMImpl DOM implementation object - * @return KErrNone if succeed. - */ - IMPORT_C TInt Open(RXmlEngDOMImplementation& aDOMImpl); - - /** - * Closes the parser. - * - * @since S60 v3.2 - */ - IMPORT_C void Close(); - - /** - * Parses chunk of XML data from memory buffer and builds DOM RXmlEngDocument. - * - * @since S60 v3.2 - * @param aBuffer XML data buffer - * - * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) - */ - IMPORT_C void ParseChunkL(const TDesC8& aBuffer); - /** - * Creates document from parsed chunks of data. - * Should be called after parsing of allchunks. - * Ownership over returned RXmlEngDocument object is transferred to the caller of the method. - * - * @since S60 v3.2 - * @return RXmlEngDocument created document. - * - * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) - */ - IMPORT_C RXmlEngDocument FinishL(); - - /** - * Parses XML file and builds DOM RXmlEngDocument - * - * @since S60 v3.2 - * @param aRFs File server session - * @param aFileName File name - * @param aChunkSize Size of chunk (if 0 chunks won't be used) - * @return Document handle - * - * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) - */ - IMPORT_C RXmlEngDocument ParseFileL(RFs &aRFs, const TDesC& aFileName, TUint aChunkSize = 0); - - /** - * Parses XML file and builds DOM RXmlEngDocument - * - * @since S60 v3.2 - * @param aFileName File name - * @param aChunkSize Size of chunk (if 0 chunks won't be used) - * @return Document handle - * - * @leave KXmlEngErrParsing or one of general codes (e.g. KErrNoMemory) - */ - IMPORT_C RXmlEngDocument ParseFileL(const TDesC& aFileName, TUint aChunkSize = 0); - - /** - * Parses XML data from memory buffer and builds DOM RXmlEngDocument without chunks - * - * @since S60 v3.1 - * @param aBuffer XML data buffer - * @return Document handle - * - * @leave KXmlEngErrParsing code (besides system I/O error codes) - */ - IMPORT_C RXmlEngDocument ParseL(const TDesC8& aBuffer); - - /** - * Return last parsing error code. - * - * @since S60 v3.2 - * @return positive number - * - * @note Error codes are positive numbers. User can find them - * in XmlEngDErrors.h - */ - IMPORT_C TInt GetLastParsingError(); -private: - /** - * Parses XML file and builds DOM RXmlEngDocument without usage of chunks - * - * @param aRFs File server session - * @param aFileName File name - * @return Document handle - * - * @leave KXmlEngErrParsing code (besides system I/O error codes) - */ - RXmlEngDocument ParseFileWithoutChunksL(RFs& aRFs, const TDesC& aFileName); - - /** - * Cleanup internal data. - * - * @since S60 v3.2 - */ - void Cleanup(); -private: - void* iInternal; - TInt iError; - RXmlEngDOMImplementation* iImpl; -}; - - - -#endif /* XMLENGINE_DOMPARSER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengelement.h --- a/epoc32/include/xmlengelement.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,995 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Element node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_ELEMENT_H_INCLUDED -#define XMLENGINE_ELEMENT_H_INCLUDED - -#include "XmlEngAttr.h" -#include "XmlEngNamespace.h" - -template class RXmlEngNodeList; - - -/** - * Instance of TXmlEngElement class represents an XML element in the DOM tree. - * - * Namespace handling: - * - * Namespace of XML element is an URI that in pair with local part of - * element's name consistute expanded-name of element. It is said that "the element - * is of NNN namespace". - * - * XML elements are shown as belonging to a specific namespace by using prefixes - * that previously were bound to some namespace URIs. The scope of a prefix is the - * element, where it was declared and all its child (sub-)elements. - * - * Namespace declaration is created by using special xmlns:{prefix-name} - * attribute (which is not really considered as attribute in DOM): - * @code - * ... - * OR - * ... - * ... - * @endcode - * - * The latter two examples are equivalent and show the use of default namespace. - * - * Implementation notes: - * - Element having no namespace is either presented with a NULL TXmlEngNamespace node - * or a TXmlEngNamespace node that has NULL prefix and namespace URI set to "". - * The former is used by default on all nodes, whereas the latter is for cases - * when some node contains undeclaration of the default namespace: - * @code - * .. - * @endcode - * - * - The prefix of the default attribute is NULL, not "" (zero-length string) - * "" corresponds to - * @code - * ... - * @endcode - * (it does not contradict XML spec, but you are strongly advised against using this) - * - * - Prefix "xml" is reserved by XML Namespace spec for special purposes; it is implicitly bound - * to XML's namespace "http://www.w3.org/XML/1998/namespace" and no one is allowed - * to use this prefix except as with spec-defined elements and attributes or to rebind this - * prefix to other namespaces - * - * - Namespace URI may be "" only for default namespace. In other words, - * "" namespace URI may not be bound to non-NULL prefix. - * - * Declaration of "" namespace with NULL prefix results in: - * @code - * ... - * @endcode - * which undeclares any existing (in some parent element) default namespace - * for the scope of element 'a': element, its attributes and all child nodes of DOM tree. - * Note, that such "undeclaration" will be added only if neccessary. - * - * - Unneccessary namespace declaration are ignored. Attemps to add namespace binding - * using same namespace URI and prefix if such binding already exists in the scope - * will have no effect. - * - * - IMPORTANT! Attributes DO NOT HAVE default namespaces. If an attribute has no - * prefix, its namespace is undeclared even if there is some default namespaces for - * the scope of the element, which contains the attribute. - * - * So, it is wrong to write something like this: - * @code - * ... - * @endcode - * and assume that the attr belongs to namespace pointed to with ns_uri. - * - * HINTS: - * - Use namespace declaration nodes as much as possible (but watch out prefix collisions). - * - Add most referred to namespace declarations (AddNamespaceDeclarationL(uri,pref)) after - * any other namespace declarations in a element -- the will be found faster in - * namespace lookups. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ - -class TXmlEngElement : public TXmlEngNode -{ - public: - /** - * Default constructor for automatic variables (not initialized) - * - * @since S60 v3.1 - */ - inline TXmlEngElement(); - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal element pointer - */ - inline TXmlEngElement(void* aInternal); - - /** - * @name XmlEngine's non-DOM extensions - */ - /** @{ */ - - /** - * Retrieves list of attribute nodes of the element - * - * @param aList - a node list object to initialize - * - * Passed by reference list of nodes is initialized and after call to - * Attributes(..) is ready for use with HasNext() and Next() methods: - * - * @code - * ... - * TXmlEngElement root = doc.DocumentElement(); - * RXmlEngNodeList attlist; - * root.GetAttributes(attlist); - * while (attlist.HasNext()) - * processAttribute(attlist.Next()); - * ... - * attlist.Close(); - * @endcode - * - * @since S60 v3.1 - */ - IMPORT_C void GetAttributes(RXmlEngNodeList& aList) const; - - /** - * Retrieves list of child elements of the element - * - * @since S60 v3.1 - * @param aList - a node list object to initialize - * - * Passed by reference list of nodes is initialized and after the call - * it is ready for use with HasNext() and Next() methods: - * - * @note Returned list is a "filtered view" of the underlying - * list of all element's children (with text nodes, comments - * processing instructions, etc.) - */ - IMPORT_C void GetChildElements(RXmlEngNodeList& aList) const; - - /** - * Creates new attribute node out of any namespace (i.e. it has no prefix), - * sets attribute's value and links it as the last attribute of the current element - * - * @since S60 v3.1 - * @param aName A local name of attribute - * @param aValue Value to set for new attribute or NULL (sets value to "") - * @return A handler to the newly created attribute node; - * - * For adding attribute as the first one, use TXmlEngNode::SetAsFirstSibling() on the attribute: - * @code - * TXmlEngElement el = ... ; // get some element - * el.AddNewAttributeL("version","0.1").SetAsFirstSibling(); - * @endcode - * - * @see SetAsLastSibling(), MoveBeforeSibling(TXmlEngNode) and MoveAfterSibling(TXmlEngNode) - * - * @note - No checks are made that attribute with such name exists - * Use this method only on newly created elements! - * Otherwise, use TXmlEngElement::SetAttributeL(..) - * - Attributes do not inherit default namespace of its element - * (http://w3.org/TR/REC-xml-names/#defaulting) - * - attribute's value is the second argument in all AddNewAttributeL(..) methods - * - Use of NULL as value is more preferrable then "" - */ - IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, const TDesC8& aValue); - - /** - * Creates new attribute node and add it to the element - * - * Provided handle to namespace declaration is used to set up - * attribute's namespace. - * - * @since S60 v3.1 - * @param aName A local name of attribute - * @param aValue Value to set for new attribute or NULL (sets value to "") - * @param aNsDef Namespace to add to the attribute - * @return A handler to the newly created attribute node; - * - * @note If aNsDef is not defined in some of attributes ascendants - * (including this element), then - * ReconcileNamespacesL() method must be called on - * this element later. - */ - IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, - const TDesC8& aValue, - const TXmlEngNamespace aNsDef); - - /** - * Creates new attribute on the element. Namespace declaration for the attribute namespace is - * created too. - * - * @since S60 v3.1 - * @param aName A local name of attribute - * @param aValue Value to set for new attribute or NULL (sets value to "") - * @param aNsUri Namespace uri - * @param aPrefix Namespace prefix - * @return A handler to the newly created attribute node; - * - * @note - * - Namespace declarations are reused if possible (no redundant ones are created) - */ - IMPORT_C TXmlEngAttr AddNewAttributeL(const TDesC8& aName, - const TDesC8& aValue, - const TDesC8& aNsUri, - const TDesC8& aPrefix); - - /** - * Creates new attribute node using namespace of its parent element (this element), - * sets attribute's value and links it as the last attribute of the element - * - * @since S60 v3.1 - * @param aName Local name of attribute - * @param aValue Value to set for new attribute or NULL (sets value to "") - * @return A handler to the newly created attribute node; - * - * For more hints how to use it refer to AddNewAttributeL(const TDesC8&,const TDesC8&) - * - * @note - * - No checks are made that attribute with such name exists - * - if namespace of the parent element is default (i.e. bound prefix is NULL), - * then temporary prefix will be used and bound to the same namespace URI as elements - * (It is due to the fact that default namespaces do not spread on unprefixed attributes, - * see http://w3.org/TR/REC-xml-names/#defaulting) - */ - inline TXmlEngAttr AddNewAttributeSameNsL(const TDesC8& aName, const TDesC8& aValue); - - /** - * Creates new attributes using namespace, which is bound to the specified prefix - * - * @since S60 v3.1 - * @param aLocalName A local name of attribute - * @param aValue Value to set for new attribute or NULL (sets value to "") - * @param aPrefix Namespace prefix for new attribute - * @return A handler to the newly created attribute node; - * - * Use this mothod only for construction of new parts of DOM tree, where - * you know for sure that prefix is bound in the given scope. - * @code - * TXmlEngElement el = parent.AddNewAttributeUsePrefixL("property","ObjName","rdf"); - * el.AddNewAttributeUsePrefixL("type", "xs:integer", "rdf"); - * @endcode - * - * Otherwise, you should check that prefix is bound like this example shows: - * @code - * TXmlEngNamespace boundNS = TXmlEngNamespace::LookupByPrefix(thisElement, prefix); - * if (boundNS.NotNull()){ - * thisElement.AddNewAttributeUsePrefixL("name", value, prefix); - * } - * @endcode - * - * @note - * Use AddNewAttributeNsL(name,value,nsDefNode) as much as you can, because - * it is most efficient way to create namespaced DOM elements (no additional - * lookups for namespace declarations are required). - * - * @code - * // If namespace with given URI is not in the scope, then it will be declared - * // and bound to "data" prefix. - * TXmlEngNamespace nsDef = elem.FindOrCreateNsDefL("http://../Data", "data"); - * elem.AddNewAttributeL("location", "...", nsDef); - * elem.AddNewElementL("child", nsDef).AddNewAttributeL("attr","...value..."); - * // the result is - * ... - * - * - * - * ... - * // - * @endcode - */ - IMPORT_C TXmlEngAttr AddNewAttributeUsePrefixL(const TDesC8& aLocalName, - const TDesC8& aValue, - const TDesC8& aPrefix); - - /** - * Creates new attributes using namespace in the scope, which has specified URI - * - * Almost the same as AddNewAttributeUsePrefixL(...) but does lookup by namespace URI - * - * @since S60 v3.1 - * @param aLocalName A local name of attribute - * @param aValue Value to set for new attribute or NULL (sets value to "") - * @param aNsUri Namespace uri for new attribute - * @return - NULL attribute if namespace declaration is not found OR newly added to the end of - * attribute list attribute of this element. - * - * @see AddNewAttributeUsePrefixL(const TDesC8&,const TDesC8&,const TDesC8&) - */ - IMPORT_C TXmlEngAttr AddNewAttributeWithNsL(const TDesC8& aLocalName, - const TDesC8& aValue, - const TDesC8& aNsUri); - - /** - * Add attribute to element that will be used as Xml:Id. - * - * No check if such attribute exists are made. - * - * @since S60 v3.2 - * @param aLocalName Name of attribute that should be add. - * @param aValue Value of the attribute - * @param aNs Namespace of the attribute - * @return Attribute if created. Null attribute if Id exist - * - * @note Call RXmlEngDocument.RegisterXmlIdL(aName,aNsUri) first - * to register existed id's in the document. - */ - IMPORT_C TXmlEngAttr AddXmlIdL(const TDesC8& aLocalName, - const TDesC8& aValue, - TXmlEngNamespace aNs = TXmlEngNamespace()); - - /** - * Adds child element with no namespace - * - * @since S60 v3.1 - * @param aName name of the element - * @return A handler to the newly created element node; - * - * Results in adding element with aName and no prefix. - * - * This method is the best for creation of non-namespace based documents - * or document fragments, where no default namespace declared. - * - * It may be used also as a method for adding element from default namespace, - * BUT namespace will be assigned ONLY after serialization of the current - * document and parsing it back into a DOM tree!! If you need that default namespace - * was inherited by new element immediately use: - * @code - * ... - * TXmlEngNamespace defns = element.DefaultNamespace(); - * TXmlEngElement newEl = element.AddNewElementL("Name",defns); - * ... - * @endcode - * - * If truly undefined namespace for the element is required, then DO NOT USE - * this method if there is a default namespace in the scope! - */ - IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aName); - - /** - * Creates new child element with provided name and namespace declaration - * - * @since S60 v3.1 - * @param aLocalName Name of the element - * @param aNsDecl Handle of the namespace declaration, that must be retrieved from - * one of the ascendant nodes of the new elements (and its prefix - * should not be remapped to another namespace URI for the scope - * of the new element) - * @return Created element node (and added as the last child of its parent) - */ - IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aLocalName, TXmlEngNamespace aNsDecl); - - /** - * Creates new child element with provided name, prefix and namespace URI - * - * New namespace declaration will be attached to the parent (this) element and used - * as namespace for newly created child element. If such binding already exists - * (same prefix is bound to same URI), it will be reused. If the prefix is already - * bound to some another namespace URI, it will be rebound by the new namespace - * declaration node. - * - * @since S60 v3.1 - * @param aLocalName Name of the element - * @param aNsUri URI of element's namespace - * @param aPrefix Prefix of the element - * @return Created element node (and added as the last child of its parent) - */ - IMPORT_C TXmlEngElement AddNewElementL(const TDesC8& aLocalName, - const TDesC8& aNsUri, - const TDesC8& aPrefix); - - /** - * Adds child element with same namespace (and prefix if present) as parent element has - * - * @since S60 v3.1 - * @param aLocalName element's name - * @return New element that was added to the end of children list of its parent (this element) - */ - IMPORT_C TXmlEngElement AddNewElementSameNsL(const TDesC8& aLocalName); - - /** - * Performs lookup for the namespace declaration for specified prefix and - * adds new child element with found namespace. - * - * The assumption is that prefix is bound, otherwise run-time error - * (Symbian's Leave or exception) occurs - * - * @note Use this method only if there is a binding for the given prefix. - * - * @since S60 v3.1 - * @param aLocalName element's name - * @param aPrefix prefix to use - * @return new TXmlEngElement that was added to the end of children list of its parent (this element) - */ - IMPORT_C TXmlEngElement AddNewElementUsePrefixL(const TDesC8& aLocalName, const TDesC8& aPrefix); - - /** - * Performs lookup for the namespace declaration for specified namespace URI and - * adds new child element with found namespace. - * - * The assumption is that namespace with given URI was declared, - * otherwise run-time error (Symbian' Leave or exception) occurs - * - * @note Use this method only if namespace declaration for the provided URI exists. - * - * @since S60 v3.1 - * @param aLocalName element's name - * @param aNsUri namespace of element - * @return new TXmlEngElement that was added to the end of children list of its parent (this element) - */ - IMPORT_C TXmlEngElement AddNewElementWithNsL(const TDesC8& aLocalName, const TDesC8& aNsUri); - - /** - * Creates new child element; if there is no a prefix binding for new element's namespace, - * a namespace decaration is created with generated prefix at specified element. - * - * @since S60 v3.1 - * @param aLocalName Name of the element to create - * @param aNsUri Namespace URI of the new element - * @param aNsDeclTarget An element where namespace declaraton should be placed - * if there is a needed to create new namespace declaration; - * NULL is used to specify the created element itself - * - * As aNsDeclTarget any ascendant of the new node may be provided: - * @code - * el.AddNewElementAutoPrefixL(tagName,uri,NULL); // declare on the new element - * el.AddNewElementAutoPrefixL(tagName,uri,el); // declare on the parent element - * el.AddNewElementAutoPrefixL(tagName,uri,doc.DocumentElement()); // declare on the root element - * ... - * @endcode - * - * @note - * The farther namespace declaration up in the document tree, - * the longer time namespace declaration lookups take. - */ - IMPORT_C TXmlEngElement AddNewElementAutoPrefixL(const TDesC8& aLocalName, - const TDesC8& aNsUri, - TXmlEngElement aNsDeclTarget); - - /** - * Get element content. - * This method may be used in most cases, when element has only simple text content - * (without entity references embedded). - * If element's contents is mixed (other types of nodes present), only contents of - * first child node is returned if it is a TXmlEngTextNode node. For getting mixed contents of the - * element of contents with entity references, WholeTextValueCopyL() should be used. - * - * @since S60 v3.1 - * @return Basic contents of the element - * - * @see TXmlEngNode::WholeTextContentsCopyL() - */ - IMPORT_C TPtrC8 Text() const; - - /** - * Adds text as a child of the element. - * - * @since S60 v3.1 - * @param aString text to be added as element's content. - * - * @note There may be several TXmlEngTextNode and TXmlEngEntityReference nodes added actually, - * depending on the aString value - */ - IMPORT_C void AddTextL(const TDesC8& aString); - - /** - * Sets text contents for the element. - * Any child nodes are removed. - * Same as TXmlEngNode::SetValueL(TDesC8&) - * - * @since S60 v3.1 - * @param aString text to be set as element's content. - * - * @see TXmlEngNode::SetValueL(TDesC8&) - */ - IMPORT_C void SetTextL(const TDesC8& aString); - - /** - * Sets text content of the element from escaped string. - * - * @since S60 v3.1 - * @param aEscapedString New value - * - * @see TXmlEngAttr::SetEscapedValueL(TDesC8&) - */ - IMPORT_C void SetEscapedTextL(const TDesC8& aEscapedString); - - /** - * Sets new element value exactly as presented in the string. - * Predefined entities are not converted into characters they represent. - * Any child nodes are removed. - * - * @since S60 v3.2 - * @param aNotEncText New element value - * - * @see TXmlEngAttr::SetValueNoEncL(const TDesC8& aNewValue); - */ - IMPORT_C void SetTextNoEncL(const TDesC8& aNotEncString); - - /** - * Appends new text node with the value exactly as presented in the string. - * Predefined entities are not converted into characters they represent. - * Existing child nodes are not removed. - * - * @since S60 v3.2 - * @param aNotEncText Appended element value - * - * @see TXmlEngAttr::SetValueNoEncL(const TDesC8& aNewValue); - */ - IMPORT_C void AppendTextNoEncL(const TDesC8& aNotEncString); - - /** - * Adds namespace declaration to the current element, a binding of prefix to namespace URI. - * - * If same namespace declaration exists (same prefix and URI), redundant namespace declaration - * will not be created. - * - * Both NULL or "" (empty string) may be used for "UNDEFINED URI" and "NO PREFIX" values of arguments. - * - * @since S60 v3.1 - * @param aNsUri Namespace URI - * @param aPrefix Namespace prefix - * @return A handle to the created (or found, if there is such) namespace declaration node. - * If namespace undeclaration is being created, NULL handle is returned -- it can be - * used in node-creation methods that take namespace handle as an argument. - * - * @note Undeclaring of default namespace (xmlns="") is supported by - * SetNoDefaultNamespace() method - * - * @see SetNoDefaulNamespace() - * - * @note By adding namespace declaration that rebinds prefix mapping (or default namespace) - * used by nodes lower in the tree, document tree may become - * wrongly constructed, because references to namespace declaration are - * not updated. However, after serialization the document will have - * desired structure. - * Use this method with care! - */ - IMPORT_C TXmlEngNamespace AddNamespaceDeclarationL(const TDesC8& aNsUri, const TDesC8& aPrefix); - - /** - * Adds default namespace declaration. - * - * @since S60 v3.1 - * @param aNsUri Namespace URI; both NULL and "" (empty string) are allowed to represent UNDEFINED NAMSPACE - * @return Handle to the created namespace declaration (NULL for UNDEFINED NAMESPACE) - * - * Same result as with AddNamespaceDeclarationL(aNsUri, NULL), but additionally - * element's namespace modified (if it has no prefix and there were no default - * namespace declaration in the scope) to the new default one. - */ - IMPORT_C TXmlEngNamespace SetDefaultNamespaceL(const TDesC8& aNsUri); - - /** - * Undeclares any default namespace for current element and its descendants. - * - * If there is already some default namespace, xmlns="" namespace - * declaration is added. Otherwise, nothing happens, since element with no - * prefix in such scope is automaticaly considered as out of any namespace. - * - * The side effect of this method is that namespace of the current element - * may change from previous default namespace to NULL TXmlEngNamespace, which is - * considered an absence of namespace. - * - * If the element has prefix (i.e. not having default namespace), - * then the only effect for the element is undeclaration of existing default namespace. - * - * If element is in the scope of another xmlns="" undeclaration, no - * actions are taken. - * - * @note - * Use AddNamespaceDeclarationL(NULL,NULL) to force creation of - * xmlns="" declaration within scope of another such declaration - * (otherwise unneccessary/duplicate declarations are not created) - * - * @note - * This method should be called on elements before adding children, - * because default namespace undeclaration is not spread into its subtree and - * descedants' default namespaces are not reset to NULL. This should be taken into - * account if later some processing on the subtree occurs. - * However, after serialization and deserialization, undeclared default namespace will - * affect whole element's subtree correctly. - * - * @since S60 v3.1 - */ - IMPORT_C void SetNoDefaultNamespaceL(); - - /** - * Finds namespace declaration that has specific prefix in the scope for given node - * - * Prefix "" or NULL are considered the same, meaning "NO PREFIX". - * If namespace declaration for "no prefix" is searched, then default namespace is returned. - * - * @since S60 v3.1 - * @param aPrefix Namespace prefix - * @return Namespace handler, which may be NULL if prefix is not bound. - * - * NULL result for "no prefix" means that default namespace is undefined. - */ - IMPORT_C TXmlEngNamespace LookupNamespaceByPrefixL(const TDesC8& aPrefix) const; - - /** - * Finds namespace declaration that has specific namespace URI - * in the scope for the given node. - * - * @since S60 v3.1 - * @param aUri Namespace URI, for which namespace declaration is searched - * @return Handler to the namespace declaration that binds given namespace URI to some prefix - * or sets it a default namespace. - * - * NULL value of aUri is equivalent to "" and means "UNDEFINED NAMESPACE". - * For such URI a NULL namespace handle is always returned even if there is - * namespace undeclaration, which has "" URI (and NULL prefix). - * - * Hint:

- * Use returned instance of TXmlEngNamespace as aNsDef argument to element's methods - * that create new element's child elements and attributes. The same handler - * may be used on more deep descentants of the reference element (and doing - * this way will generally increase performance of DOM tree construction).
- * However, if namespace bindings are not controlled - * for element's children and prefix, which is bound to the search namespace, is - * rebound to some other namespace URI, then reusing namespace may lead to - * unwanted result. - * - * Consider an example: - * @code - * TXmlEngElement root = doc.DocumentElement(); - * TXmlEngNamespace targetNs = root.AddNamespaceDeclarationL("http://example.com/","ex"); - * TXmlEngElement el_1 = root.AddNewElementL("outer", targetNs); - * TXmlEngElement el_2 = el_1.AddNewElementL("inner"); // element without prefix - * - * // NOTE: prefix "ex" is not bound to "http://example.com/" anymore! - * el_2.AddNamespaceDeclarationL("http://whatever.com/","ex"); - * TXmlEngElement el_3 = el_2.AddNewElementL("problem", targetNs); - * ... - * @endcode - * - * The sought result was (showing expanded names of elements): - * @code - * --> "root" - * --> {"http://example.com/","outer"} - * --> "inner" - * -->{"http://example.com/","problem"} - * ... - * <-- - * <-- "inner" - * <-- {"http://example.com/","outer"} - * ... - * <-- - * @endcode - * and it may look that it has been achieved. Indeed, if namespace of element "problem" - * was queried, it would have URI "http://example.com/" and prefix "ex". - * However, if namespace URI was looked up by "problem"'s prefix, it would be - * "http://whatever.com/". We have created illegal DOM tree. - * - * The actual DOM tree in serialized form will be: - * @code - * - * - * - * - * ... - * - * - * - * ... - * - * @endcode - * - * So, reuse of namespace handlers should be performed with special care. - * - * @note - * At the moment it is possible to retrieve namespace declaration nodes - * whose prefixes were rebound. Be careful when use returned TXmlEngNamespace object - * for creation of new elements. In later releases, this method will perform - * safe lookup. And so far, it is better to make check that prefix of returned - * namespace declaration has not rebound: - * @code - * TXmlEngNamespace ns = element.LookupNamespaceByUri("a_uri"); - * if (element.LookupNamespaceByPrefix(ns.Prefix()).IsSameNode(ns)){ - * ... // now it is safe to create new elements by using "ns" - * element.AddNewElementL("product",ns); - * ... - * } - * @endcode - */ - IMPORT_C TXmlEngNamespace LookupNamespaceByUriL(const TDesC8& aUri) const; - - /** - * Retrieves implicitly declared on every XML infoset binding - * of 'xml' prefix to XML's namespace URI: - * "http://www.w3.org/XML/1998/namespace" - * - * @since S60 v3.1 - * @return Handler to {xml,"http://www.w3.org/XML/1998/namespace"} prefix - * binding in the current document - * - * The result should be used for creating attributes beloging to the XML namespace - * (xml:lang, xml:space, xml:id , etc.) - * - * DO NOT USE methods LookupNamespaceByUriL(const TDesC8&) and LookupNamespaceByPrefixL(const TDesC8&) - * (with "http://www.w3.org/XML/1998/namespace" and "xml" arguments) for retrieving - * namespace node, since in a case of [possible] memory allocation fault - * NULL result is returned (and breaks your program silently) - * - * @note Normally 'xml' prefix is bound to XML namespace URI in the document - * node, BUT if current node is not a part of the document tree yet, - * the requested namespace declaration WILL BE ADDED to the current node. - * This is the reason why the method may fail in OOM conditions. - */ - IMPORT_C TXmlEngNamespace TheXMLNamespaceL() const; - - /** - * Get default namespace for element. - * - * @since S60 v3.1 - * @return Default namespace in the scope of the element - * - * NULL TXmlEngNamespace means that element with no prefix have no namespace associated - * because no default namespace was declared or default namespace was undeclared with xmlns="" - * - * Equivalent to LookupNamespaceByPrefixL(const TDesC8&) with NULL (or "") prefix provided - */ - inline TXmlEngNamespace DefaultNamespaceL() const; - - /** - * Performs search of namespace handler in the scope of the element. This method will - * create new namespace declaration on the element if such namespace is not available. - * - * @since S60 v3.1 - * @param aNsUri Searched namespace - * @param aPrefix Prefix to use for new namespace declaration (if it is to be created) - * @return TXmlEngNamespace handler that may be used to create new attributes and child elements of - * the element. The namespace may be one of those existed previously or was created - * - * @note - * Be sure not to use the result of this method for non-descendants of the element or in situations - * when prefix overlapping might occur (read also about general general considerations of attributes - * and elements creation using namespace handlers) - */ - IMPORT_C TXmlEngNamespace FindOrCreateNsDeclL(const TDesC8& aNsUri, const TDesC8& aPrefix); - - /** - * Performs search on the element and its ascendants for any namespace declaration - * with given URI and create a new namespace declaration with some (unique) prefix - * if the search was not successful. - * - * @since S60 v3.1 - * @param aNsUri Searched namespace - * @return TXmlEngNamespace handler that may be used to create new attributes and child elements of - * the element. The namespace may be one of those existed previously or was created - */ - IMPORT_C TXmlEngNamespace FindOrCreateNsDeclL(const TDesC8& aNsUri); - - /** - * Checks whether a prefix has been bound in this element (not in one of its ascendants) - * - * Use this method for preventig prefix-name collision in a element node - * - * @since S60 v3.1 - * @param aPrefix Namespace prefix - * @return TRUE if there is already namespace declaration that uses aPrefix on this element - */ - IMPORT_C TBool HasNsDeclarationForPrefixL(const TDesC8& aPrefix) const; - - /** - * Copies the element with its attributes, but not child nodes - * - * If context is preserved, then all namespace declarations that are in the element are - * writen to element's start tag too. - * - * @since S60 v3.1 - * @param preserveNsContext TRUE if context should be preserved - * @return handle to copy of element - */ - IMPORT_C TXmlEngElement ElementCopyNoChildrenL(TBool preserveNsContext) const; - - /** - * Specialized version of TXmlEngNode::CopyL() - * - * @since S60 v3.1 - * @return Deep copy of the element. - */ - inline TXmlEngElement CopyL() const; - - /** - * Resets element's content: all child nodes are removed - * - * @since S60 v3.1 - */ - IMPORT_C void RemoveChildren(); - - /** - * Resets element's attributes - * - * @since S60 v3.1 - */ - IMPORT_C void RemoveAttributes(); - - /** - * Resets all namespace declarations made in the element - * - * @note There can be references to these namespace declaration from elsewhere! - * Use ReconcileNamespacesL() to fix that. - * - * @since S60 v3.1 - */ - IMPORT_C void RemoveNamespaceDeclarations(); - - /** - * Removes all element contents: child nodes, attributes and namespace declarations - * - * @see RemoveChildren(), RemoveAttributes(), RemoveNamespaceDeclarations(); - * - * @since S60 v3.1 - */ - inline void ClearElement(); - - /** - * Copies attributes from another element - * - * It may be a very convenient method for initializing element with a set of predefined attributes. - * - * @since S60 v3.1 - * @param aSrc source element - * - * @note - * Namespaces of the this element may need to be reconciled if copied attributes - * belong to any namespace that is not declared on some ascendant of this node. - * @see ReconcileNamespacesL() - */ - IMPORT_C void CopyAttributesL(TXmlEngElement aSrc); - - /** - * Copies a list of elements. - * - * Elements are appended to the element's children list. - * - * @since S60 v3.1 - * @param aSrc source element - * - * @note Namespaces of the this element may need to be reconciled after copy operation - * @see ReconcileNamespacesL() - */ - IMPORT_C void CopyChildrenL(TXmlEngElement aSrc); - - /** - * Removes attribute with given name and namespace URI(if such exists). - * Memory allocated for the attribute is freed. - * - * @since S60 v3.1 - * @param aLocalName Element name - * @param aNamespaceUri Element namespace - */ - IMPORT_C void RemoveChildElementsL(const TDesC8& aLocalName,const TDesC8& aNamespaceUri); - - /** @} */ - - /** - * @name DOM Level 3 Core methods - * - * @note - * Most methods of DOM spec operate with fully-qualified names (QNames) - * of elements and attributes. It is different in this API - all methods - * instead accept prefix and localName parts of QName. - */ - /** @{ */ - - /** - * Returns value of attribute with given name and namespace URI - * - * @since S60 v3.1 - * @param aLocalName Local name of attribute node - * @param aNamespaceUri Namespace URI of attribute - * @return Attribute value - */ - IMPORT_C TPtrC8 AttributeValueL(const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8) const; - - /** - * Initializes list of child elements with matching name and namespace URI. - * - * @since S60 v3.1 - * @param aList Node list to be initialized - * @param aLocalName Element name - * @param aNamespaceUri Namespace URI, default is NULL - * - * @note This method does not lists all descedants of the element, only child elements - */ - IMPORT_C void GetElementsByTagNameL(RXmlEngNodeList& aList, - const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8) const; - - /** - * Sets value of attribute; attribute is created if there is no such attribute yet - * - * @since S60 v3.1 - * @param aLocalName Attribute name - * @param aValue Attribute value - * @param aNamespaceUri Namespace URI - default is NULL - * @param aPrefix Namespace prefix - default is NULL - * - * @note - * If prefix is not NULL (or ""), then namespace URI may not be empty - * see http://www.w3.org/TR/REC-xml-names/#ns-decl (Definition #3) - */ - IMPORT_C void SetAttributeL(const TDesC8& aLocalName, - const TDesC8& aValue, - const TDesC8& aNamespaceUri = KNullDesC8, - const TDesC8& aPrefix = KNullDesC8); - - /** - * Removes attribute with given name and namespace URI(if such exists). - * Memory allocated for the attribute is freed. - * - * @since S60 v3.1 - * @param aLocalName Name of the attribute - * @param aNamespaceUri Attribute namespace URI, default is NULL - */ - IMPORT_C void RemoveAttributeL(const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8); - - /** - * Retrieves attribute node from specific namespace by its name. - * - * @since S60 v3.1 - * @param aLocalName Name of the attribute - * @param aNamespaceUri Attribute namespace URI, default is NULL - * @return Attribute node with matching namespace URI and name - */ - IMPORT_C TXmlEngAttr AttributeNodeL(const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8) const; - - /** - * Check if element has attribute with given parameters. - * - * @since S60 v3.1 - * @param aLocalName Name of attribute - * @param aNamespaceUri Namespace uri, default is NULL. - * @return TRUE if the element holds an attribute with such namespace URI and name. - * - * Same result gives AttributeNodeL(uri,name).NotNull() - */ - inline TBool HasAttributeL(const TDesC8& aLocalName, - const TDesC8& aNamespaceUri = KNullDesC8) const; - - /** - * Links attribute into tree - * - * @since S60 v3.1 - * @param aNewAttr new attribute - * - * The replaced attribute node is not returned and just deleted - */ - IMPORT_C void SetAttributeNodeL(TXmlEngAttr aNewAttr); -}; - - - -#include "xmlengelement.inl" - -#endif /* XMLENGINE_ELEMENT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengelement.inl --- a/epoc32/include/xmlengelement.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Inline functions specyfic for element node -* -*/ - - - - - - - - -// ------------------------------------------------------------------------------------- -// Default constructor -// ------------------------------------------------------------------------------------- -// -inline TXmlEngElement::TXmlEngElement():TXmlEngNode(NULL) {} - -// ------------------------------------------------------------------------------------- -// Constructor -// ------------------------------------------------------------------------------------- -// -inline TXmlEngElement::TXmlEngElement(void* aInternal): TXmlEngNode(aInternal) {} - - -// ------------------------------------------------------------------------------------- -// Creates new attribute node using namespace of its parent element (this element), -// sets attribute's value and links it as the last attribute of the element -// -// @param aName - Local name of attribute -// @param aValue - Value to set for new attribute or NULL (sets value to "") -// @return A handler to the newly created attribute node; -// -// For more hints how to use it refer to AddNewAttributeL(const TDesC8&,const TDesC8&) -// -// @note -// - No checks are made that attribute with such name exists -// - if namespace of the parent element is default (i.e. bound prefix is NULL), -// then temporary prefix will be used and bound to the same namespace URI as elements -// (It is due to the fact that default namespaces do not spread on unprefixed attributes, -// see http://w3.org/TR/REC-xml-names/#defaulting) -// ------------------------------------------------------------------------------------- -// -inline TXmlEngAttr TXmlEngElement::AddNewAttributeSameNsL(const TDesC8& aName, const TDesC8& aValue) - { - return AddNewAttributeL(aName, aValue, NamespaceDeclaration()); - } - -// ------------------------------------------------------------------------------------- -// @return Default namespace in the scope of the element -// -// NULL TXmlEngNamespace means that element with no prefix have no namespace associated -// because no default namespace was declared or default namespace was undeclared with xmlns="" -// -// Equivalent to LookupNamespaceByPrefixL() with NULL (or "") prefix provided -// ------------------------------------------------------------------------------------- -// -inline TXmlEngNamespace TXmlEngElement::DefaultNamespaceL() const - { - return LookupNamespaceByPrefixL(KNullDesC8); - } - -// ------------------------------------------------------------------------------------- -// Specialized version of TXmlEngNode::CopyL() -// -// @return Deep copy of the element. -// ------------------------------------------------------------------------------------- -// -inline TXmlEngElement TXmlEngElement::CopyL() const - {return TXmlEngNode::CopyL().AsElement();} - -// ------------------------------------------------------------------------------------- -// Removes all element contents: child nodes, attributes and namespace declarations -// -// @see RemoveChildren(), RemoveAttributes(), RemoveNamespaceDeclarations(); -// ------------------------------------------------------------------------------------- -// -inline void TXmlEngElement::ClearElement() - { - RemoveChildren(); - RemoveAttributes(); - RemoveNamespaceDeclarations(); - } - -// ------------------------------------------------------------------------------------- -// ------------------------------------------------------------------------------------- -// - - -// ------------------------------------------------------------------------------------- -// Returns TRUE if the element holds an attribute with such namespace URI and name. -// -// Same result gives AttributeNodeL(uri,name).NotNull() -// ------------------------------------------------------------------------------------- -// -inline TBool TXmlEngElement::HasAttributeL(const TDesC8& aLocalName, const TDesC8& aNamespaceUri) const - {return AttributeNodeL(aLocalName, aNamespaceUri).NotNull();} - - - - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengentityreference.h --- a/epoc32/include/xmlengentityreference.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Entity reference node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_ENTITYREFERENCE_H_INCLUDED -#define XMLENGINE_ENTITYREFERENCE_H_INCLUDED - -#include "xmlengnode.h" - - -/** - * Instance of TXmlEngEntityReference class represents an XML entity reference in the DOM tree. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngEntityReference : public TXmlEngNode -{ -public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngEntityReference(); - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal Entity reference pointer - */ - inline TXmlEngEntityReference(void* aInternal); -}; - -#include "xmlengentityreference.inl" - -#endif /* XMLENGINE_ENTITYREFERENCE_H_INCLUDED */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengentityreference.inl --- a/epoc32/include/xmlengentityreference.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Entity reference node functions -* -*/ - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngEntityReference::TXmlEngEntityReference():TXmlEngNode(NULL) - { - } - - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngEntityReference::TXmlEngEntityReference(void* aInternal):TXmlEngNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengerrors.h --- a/epoc32/include/xmlengerrors.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: DOM errors codes -* -*/ - - - - - - - - -/** - * NOTE1: All errors returned by DOM parser (positive values) are propagated from open-source library. - * They can be found in documentation to Libxml2 (version 2.6.10). See http://xmlsoft.org, and find enum xmlParserErrors. - * - * NOTE2: This errors CANNOT be propagated to other applications. - * It should be handled by user application. - */ - -#ifndef XMLENGINE_DOM_ERRORS_H__ -#define XMLENGINE_DOM_ERRORS_H__ - -#include - -/** DOM parsing error */ -const TInt KXmlEngErrParsing = -32397; -/** DOM save errors */ -const TInt KXmlEngErrNegativeOutputSize = -32383; -const TInt KXmlEngErrWrongEncoding = -32382; - -/** KXmlEngErrNullNode error */ -const TInt KXmlEngErrNullNode = -32380; -/** KXmlEngErrWrongUseOfAPI error */ -const TInt KXmlEngErrWrongUseOfAPI = -32381; - -#endif // XMLENGINE_DOM_ERRORS_H__ - -/* -* PARSING ERRORS: -* -* XML_ERR_OK = 0 -* XML_ERR_INTERNAL_ERROR 1 -* XML_ERR_NO_MEMORY 2 -* XML_ERR_DOCUMENT_START 3 -* XML_ERR_DOCUMENT_EMPTY 4 -* XML_ERR_DOCUMENT_END 5 -* XML_ERR_INVALID_HEX_CHARREF 6 -* XML_ERR_INVALID_DEC_CHARREF 7 -* XML_ERR_INVALID_CHARREF 8 -* XML_ERR_INVALID_CHAR 9 -* XML_ERR_CHARREF_AT_EOF 10 -* XML_ERR_CHARREF_IN_PROLOG 11 -* XML_ERR_CHARREF_IN_EPILOG 12 -* XML_ERR_CHARREF_IN_DTD 13 -* XML_ERR_ENTITYREF_AT_EOF 14 -* XML_ERR_ENTITYREF_IN_PROLOG 15 -* XML_ERR_ENTITYREF_IN_EPILOG 16 -* XML_ERR_ENTITYREF_IN_DTD 17 -* XML_ERR_PEREF_AT_EOF 18 -* XML_ERR_PEREF_IN_PROLOG 19 -* XML_ERR_PEREF_IN_EPILOG 20 -* XML_ERR_PEREF_IN_INT_SUBSET 21 -* XML_ERR_ENTITYREF_NO_NAME 22 -* XML_ERR_ENTITYREF_SEMICOL_MISSING 23 -* XML_ERR_PEREF_NO_NAME 24 -* XML_ERR_PEREF_SEMICOL_MISSING 25 -* XML_ERR_UNDECLARED_ENTITY 26 -* XML_WAR_UNDECLARED_ENTITY 27 -* XML_ERR_UNPARSED_ENTITY 28 -* XML_ERR_ENTITY_IS_EXTERNAL 29 -* XML_ERR_ENTITY_IS_PARAMETER 30 -* XML_ERR_UNKNOWN_ENCODING 31 -* XML_ERR_UNSUPPORTED_ENCODING 32 -* XML_ERR_STRING_NOT_STARTED 33 -* XML_ERR_STRING_NOT_CLOSED 34 -* XML_ERR_NS_DECL_ERROR 35 -* XML_ERR_ENTITY_NOT_STARTED 36 -* XML_ERR_ENTITY_NOT_FINISHED 37 -* XML_ERR_LT_IN_ATTRIBUTE 38 -* XML_ERR_ATTRIBUTE_NOT_STARTED 39 -* XML_ERR_ATTRIBUTE_NOT_FINISHED 40 -* XML_ERR_ATTRIBUTE_WITHOUT_VALUE 41 -* XML_ERR_ATTRIBUTE_REDEFINED 42 -* XML_ERR_LITERAL_NOT_STARTED 43 -* XML_ERR_LITERAL_NOT_FINISHED 44 -* XML_ERR_COMMENT_NOT_FINISHED 45 -* XML_ERR_PI_NOT_STARTED 46 -* XML_ERR_PI_NOT_FINISHED 47 -* XML_ERR_NOTATION_NOT_STARTED 48 -* XML_ERR_NOTATION_NOT_FINISHED 49 -* XML_ERR_ATTLIST_NOT_STARTED 50 -* XML_ERR_ATTLIST_NOT_FINISHED 51 -* XML_ERR_MIXED_NOT_STARTED 52 -* XML_ERR_MIXED_NOT_FINISHED 53 -* XML_ERR_ELEMCONTENT_NOT_STARTED 54 -* XML_ERR_ELEMCONTENT_NOT_FINISHED 55 -* XML_ERR_XMLDECL_NOT_STARTED 56 -* XML_ERR_XMLDECL_NOT_FINISHED 57 -* XML_ERR_CONDSEC_NOT_STARTED 58 -* XML_ERR_CONDSEC_NOT_FINISHED 59 -* XML_ERR_EXT_SUBSET_NOT_FINISHED 60 -* XML_ERR_DOCTYPE_NOT_FINISHED 61 -* XML_ERR_MISPLACED_CDATA_END 62 -* XML_ERR_CDATA_NOT_FINISHED 63 -* XML_ERR_RESERVED_XML_NAME 64 -* XML_ERR_SPACE_REQUIRED 65 -* XML_ERR_SEPARATOR_REQUIRED 66 -* XML_ERR_NMTOKEN_REQUIRED 67 -* XML_ERR_NAME_REQUIRED 68 -* XML_ERR_PCDATA_REQUIRED 69 -* XML_ERR_URI_REQUIRED 70 -* XML_ERR_PUBID_REQUIRED 71 -* XML_ERR_LT_REQUIRED 72 -* XML_ERR_GT_REQUIRED 73 -* XML_ERR_LTSLASH_REQUIRED 74 -* XML_ERR_EQUAL_REQUIRED 75 -* XML_ERR_TAG_NAME_MISMATCH 76 -* XML_ERR_TAG_NOT_FINISHED 77 -* XML_ERR_STANDALONE_VALUE 78 -* XML_ERR_ENCODING_NAME 79 -* XML_ERR_HYPHEN_IN_COMMENT 80 -* XML_ERR_INVALID_ENCODING 81 -* XML_ERR_EXT_ENTITY_STANDALONE 82 -* XML_ERR_CONDSEC_INVALID 83 -* XML_ERR_VALUE_REQUIRED 84 -* XML_ERR_NOT_WELL_BALANCED 85 -* XML_ERR_EXTRA_CONTENT 86 -* XML_ERR_ENTITY_CHAR_ERROR 87 -* XML_ERR_ENTITY_PE_INTERNAL 88 -* XML_ERR_ENTITY_LOOP 89 -* XML_ERR_ENTITY_BOUNDARY 90 -* XML_ERR_INVALID_URI 91 -* XML_ERR_URI_FRAGMENT 92 -* XML_WAR_CATALOG_PI 93 -* XML_ERR_NO_DTD 94 -* XML_ERR_CONDSEC_INVALID_KEYWORD 95 -* XML_ERR_VERSION_MISSING 96 -* XML_WAR_UNKNOWN_VERSION 97 -* XML_WAR_LANG_VALUE 98 -* XML_WAR_NS_URI 99 -* XML_WAR_NS_URI_RELATIVE 100 -* XML_ERR_MISSING_ENCODING 101 -* XML_NS_ERR_XML_NAMESPACE 200 -* XML_NS_ERR_UNDEFINED_NAMESPACE 201 -* XML_NS_ERR_QNAME 202 -* XML_NS_ERR_ATTRIBUTE_REDEFINED 203 -*/ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengfilecontainer.h --- a/epoc32/include/xmlengfilecontainer.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: All file container data functions -* -*/ - - - - - - - -#ifndef XMLENGINE_FILECONTAINER_H_INCLUDED -#define XMLENGINE_FILECONTAINER_H_INCLUDED - -#include "xmlengdatacontainer.h" - -class RFile; - - - -/** -* Instance of TXmlEngFileContainer class represents data stored in RFile in DOM tree -* -* RFile container is treated in general as text nodes in DOM tree. -* Some of the fields in xmlNode structure are reused in order to save memory. -* Data is stored in file system referenced to by RFile handle. -* -* Sample code for creating filecontainer: -* @code -* RXmlEngDOMImplementation domImpl; -* domImpl.OpenL(); ///< opening DOM implementation object -* RXmlEngDocument iDoc; -* ///< create document element -* TXmlEngElement elem = iDoc.CreateDocumentElementL(_L8("doc")); -* ///< create file container from file (file1 is an RFile object) and CID equals cid -* TXmlEngFileContainer binData = iDoc.CreateFileContainerL(cid, file1); -* elem.AppendChildL(binData); ///< append container to the dom tree -* iDoc.Close(); ///< closing all opened objects -* domImpl.Close(); -* @endcode -* -* @lib XmlEngineDOM.lib -* @since S60 v3.2 -*/ -class TXmlEngFileContainer : public TXmlEngDataContainer -{ -public: - /** - * Get RFile reference - * - * @since S60 v3.2 - * @return RFile reference - * - */ - IMPORT_C RFile& File() const; - -protected: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngFileContainer(); - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal node pointer - */ - inline TXmlEngFileContainer(void* aInternal); -}; - - - -#include "xmlengfilecontainer.inl" - -#endif /* XMLENGINE_FILECONTAINER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengfilecontainer.inl --- a/epoc32/include/xmlengfilecontainer.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: File container functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngFileContainer::TXmlEngFileContainer():TXmlEngDataContainer(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngFileContainer::TXmlEngFileContainer(void* aInternal):TXmlEngDataContainer(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnamespace.h --- a/epoc32/include/xmlengnamespace.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,161 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Namespace node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_NAMESPACE_H_INCLUDED -#define XMLENGINE_NAMESPACE_H_INCLUDED - -#include "xmlengnode.h" - -/** - * Represents existing namespace declaration in DOM tree OR namespace node returned - * in RXmlEngNodeSet as a result of some XPath expression. - * - * All elements and attributes may have a namespace instance associated. - * Once put in element, a namespace declaration (instance of TXmlEngNamespace) may be - * referred to by all attributes and descentants of the element (unless - * prefix that this namespace-to-prefix binding uses is overriden somewhere below in the document tree) - * - * General rules of namespace handling: - * - * - NULL prefix in namespace node means NO PREFIX. ""(empty string '\\0') can be used for specifying - * absense of prefix when setting it, however NULL will be stored and returned. - * - * - NULL value of namespace URI is legal only with NULL prefix and only met in - * undeclaration of namespace (xmlns=""). "" (empty string) can be used too, however it - * will be returned as NULL. - * - * - NULL or "" namespace URI with non-NULL prefix is illegal acording to the XML specification. - * - * - Namespace of a element is default if it is associated with some namespace declaration with NULL prefix. - * - * - Elements are never associated with namespace undeclarations (xmlns=""), instead, such elements have no - * namespace declaration referred to. - * - * - Attributes do not have default namespace. Even if it is effective at element scope, - * default namespace declaration is not applied to element's attributes (according to the XML specification) - * - * - Namespace of a node (element or attribute) is undefined if no namespace declaration is - * associated with it. - * - * - Node with undefined namespace is serialized as having no prefix. In general, - * DOM API handles the complexity of namespace declaration handling and creates neccessary - * namespace declarations and undeclares default namespace. However, some node-creation methods (e.g. TXmlEngElement::AddNewElementL()) - * do not ensure that created node with undefined namespace (thus, without a prefix) will - * actually treated after serialization as having some default namespace - * - * @note - * Namespace nodes that are result of XPath expression have following restrictions: - * - they cannot be used as namespace definitions, because they are not part of - * the DOM tree, but copies of existing namespace definitions. - * - namespace prefix is not available because it is not mandated by DOM Level 3 XPath module API, - * so in returned copies of DOM tree, namespaces prefix strings are not preserved - * and Prefix() returns NULL. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngNamespace: public TXmlEngNode -{ - public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngNamespace(); - - /** - /** - * Get namespace URI - * - * @since S60 v3.1 - * @return Namespace URI string - * @note "" is never returned - it is replaced with NULL - * - * For TXmlEngNamespace(NULL) or namespace undeclaration (xmlns=""), which are - * treatet as undefined namespace returns NULL, - * otherwise result is not a NULL string and not a "" (empty string). - */ - IMPORT_C TPtrC8 Uri() const; - - /** - * Get namespace prefix. - * - * @since S60 v3.1 - * @return prefix that is bound in the namespace declaration - * or NULL string for default namespace or if no binding exist - */ - IMPORT_C TPtrC8 Prefix() const; - - /** - * Check if namespace is default. - * - * @since S60 v3.1 - * @return Whether it is a definition of default namespace - * TRUE -- is a default namespace (no prefix) - * FALSE -- not a default namespace (bound to prefix) or empty TXmlEngNamespace(NULL) instance - */ - IMPORT_C TBool IsDefault() const; - - /** - * Check if namespace is undefined - * - * @since S60 v3.1 - * @return Whether the namespace is undefined - * - * A node's namespace is undefined if no namespace declaration associated with it. - * @note Same as TXmlEngNode::IsNull() - */ - IMPORT_C TBool IsUndefined() const; - -protected: - /** - * Workaround to avoid misuse of TXmlEngNode::NamespaceUri() method, which should not be - * applied to TXmlEngNamespace node. Since the name of the inherited method from TXmlEngNode - * is too similar to TXmlEngNamespace::Uri(), NamespaceUri() is disabled for direct - * use. - * If NamespaceUri() is called on the TXmlEngNamespace object that is downcasted to TXmlEngNode, then - * NamespaceUri()'s result equals to result of Uri() method. - * - * @since S60 v3.1 - * @return NULL - */ - inline TPtrC8 NamespaceUri(); - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aPtr Namespace pointer - */ - inline TXmlEngNamespace(void* aPtr); - - friend class TXmlEngElement; - friend class TXmlEngNode; -}; - -#include "xmlengnamespace.inl" - -#endif /* XMLENGINE_NAMESPACE_H_INCLUDED */ - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnamespace.inl --- a/epoc32/include/xmlengnamespace.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Namespace node functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngNamespace::TXmlEngNamespace():TXmlEngNode(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Workaround to avoid misuse of TXmlEngNode::NamespaceUri() method, which should not -// be applied to TXmlEngNamespace node. Since the name of the inherited method from -// TXmlEngNode is too similar to TXmlEngNamespace::Uri(), NamespaceUri() is disabled for -// direct use. -// -// If NamespaceUri() is called on the TXmlEngNamespace object that is downcasted to -// TXmlEngNode, then NamespaceUri()'s result equals to result of Uri() method. -// ----------------------------------------------------------------------------- -// -inline TPtrC8 TXmlEngNamespace::NamespaceUri() - { - return KNullDesC8(); - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngNamespace::TXmlEngNamespace(void* aPtr):TXmlEngNode(aPtr) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnode.h --- a/epoc32/include/xmlengnode.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,805 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Node class declaration -* -*/ - - - - - - - -#ifndef XMLENGINE_NODE_H_INCLUDED -#define XMLENGINE_NODE_H_INCLUDED - -#include - -// forward declaration -class TXmlEngNode; - -// Forward declarations -template class RXmlEngNodeList; - -class RXmlEngDocument; -class TXmlEngElement; -class TXmlEngAttr; -class TXmlEngTextNode; -class TXmlEngNamespace; -class TXmlEngComment; -class TXmlEngCDATASection; -class TXmlEngDocumentFragment; -class TXmlEngEntityReference; -class TXmlEngProcessingInstruction; -class MXmlEngUserData; -class TXmlEngBinaryContainer; -class TXmlEngChunkContainer; -class TXmlEngDataContainer; -class TXmlEngFileContainer; -// - -/** - * Instance of TXmlEngNode class represents an XML node in the DOM tree. - * - * Class implements methods that are similar for all XML node types - * i.e. element, attribute. - * - * Sample code for node tree modifications: - * @code - * RXmlEngDOMImplementation domImpl; - * domImpl.OpenL(); ///< opening DOM implementation object - * RXmlEngDocument iDoc; ///< iDoc with created nodes tree - * TXmlEngNode tmp = iDoc.DocumentElement(); - * ///< copying first child of iDoc to tmp2 node and appending it - * TXmlEngNode tmp2 = tmp.FirstChild().CopyL(); - * tmp.AppendChildL(tmp2); - * ///< copying next node to the first child of iDoc to the last child place - * tmp.FirstChild().NextSibling().CopyToL(tmp.LastChild()); - * ///< replasing before last child with second child - * tmp.LastChild().PreviousSibling().ReplaceWith(tmp.FirstChild().NextSibling()); - * ///< moving first child of iDoc to second child childrens - * tmp.FirstChild().MoveTo(tmp.FirstChild().NextSibling()); - * iDoc.Close(); ///< closing all opened objects - * domImpl.Close(); - * @endcode - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngNode -{ -public: - /** - * The different element types carried by an XML tree. - * - * @note This is synchronized with DOM Level 3 values - * See http://www.w3.org/TR/DOM-Level-3-Core/ - * - */ - enum TXmlEngDOMNodeType { - EElement = 1, - EAttribute = 2, - EText = 3, - ECDATASection = 4, - EEntityReference = 5, - EEntity = 6, //> Not supported currently - EProcessingInstruction = 7, - EComment = 8, - EDocument = 9, - EDocumentType = 10, //> Not supported currently - EDocumentFragment = 11, - ENotation = 12, //> Not supported currently - ENamespaceDeclaration = 18, //> Not in DOM spec - EBinaryContainer = 30, //> Not in DOM spec - EChunkContainer = 31, //> Not in DOM spec - EFileContainer = 32 //> Not in DOM spec - }; - -public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngNode(); - - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal node pointer - */ - inline TXmlEngNode(void* aInternal); - - /** - * Check if node is NULL - * - * @since S60 v3.1 - * @return TRUE if node is NULL in other case FALSE - */ - inline TBool IsNull() const; - - /** - * Check if node is NULL - * - * @since S60 v3.1 - * @return TRUE if node is not NULL in other case FALSE - */ - inline TBool NotNull()const; - - /** - * Cast node to attribute node. - * - * @since S60 v3.1 - * @return Attribute node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngAttr& AsAttr() const; - - /** - * Cast node to text node. - * - * @since S60 v3.1 - * @return Text node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngTextNode& AsText() const; - - /** - * Cast node to binary data container - * - * @since S60 v3.2 - * @return Binary container - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngBinaryContainer& AsBinaryContainer() const; - - /** - * Cast node to memory chunk container - * - * @since S60 v3.2 - * @return Chunk container - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngChunkContainer& AsChunkContainer() const; - - /** - * Cast node to file container - * - * @since S60 v3.2 - * @return File container - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngFileContainer& AsFileContainer() const; - - /** - * Cast node to memory chunk container - * - * @since S60 v3.1 - * @return Chunk container - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngDataContainer& AsDataContainer() const; - - /** - * Cast node to element node. - * - * @since S60 v3.1 - * @return Element node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngElement& AsElement() const; - - /** - * Cast node to comment node. - * - * @since S60 v3.1 - * @return Comment node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngComment& AsComment() const; - - /** - * Cast node to namespace node. - * - * @since S60 v3.1 - * @return Namespace node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngNamespace& AsNamespace() const; - - /** - * Cast node to CDATA section node. - * - * @since S60 v3.1 - * @return CDATA section node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngCDATASection& AsCDATASection() const; - - /** - * Cast node to entity reference node. - * - * @since S60 v3.1 - * @return Entity reference node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngEntityReference& AsEntityReference() const; - - /** - * Cast node to processing instruction node. - * - * @since S60 v3.1 - * @return Processing instruction node - * - * @note - * - Never cast nodes to a wrong node type! - * - Casting removes const'ness of the node - */ - inline TXmlEngProcessingInstruction& AsProcessingInstruction() const; - - /** - * Get innerXML string. This method returns all content of the node. - * Output text does not include node markup. - * - * @since S60 v3.1 - * @param aBuffer RBuf8 in which output should be save - * @return Size of output buffer - * @note Returned RBuf8 should be freed - */ - IMPORT_C TInt InnerXmlL(RBuf8& aBuffer); - - /** - * Get outerXML string. This method returns all content of the node. - * Output text includes node markup. - * - * @since S60 v3.1 - * @param aBuffer RBuf8 in which output should be save - * @return Size of output buffer - * @note Returned RBuf8 should be freed - */ - IMPORT_C TInt OuterXmlL(RBuf8& aBuffer); - - /** - * Moves the node to become the first in the list of its siblings - * Node is expected to have a parent. - * - * @since S60 v3.1 - */ - IMPORT_C void SetAsFirstSibling(); - - /** - * Moves the node to become the last in the list of its siblings - * Node is expected to have a parent. - * - * @since S60 v3.1 - */ - IMPORT_C void SetAsLastSibling(); - - /** - * Moves the node in the list of sibling nodes before another node - * Node is expected to have a parent. - * Do nothing if aSiblingNode is not one of node's siblings - * - * @since S60 v3.1 - * @param aSiblingNode Node that should be after current node - */ - IMPORT_C void MoveBeforeSibling(TXmlEngNode aSiblingNode); - - /** - * Moves the node in the list of sibling nodes after another node - * Node is expected to have a parent. - * Do nothing if aSiblingNode is not one of the node's siblings - * - * @since S60 v3.1 - * @param aSiblingNode Node that should be after current node - */ - IMPORT_C void MoveAfterSibling(TXmlEngNode aSiblingNode); - - /** - * Moves the node to another part of the tree or another document - * The node is unliked from current postion (if any) and appended - * to the its new parent. - * - * @since S60 v3.1 - * @param aParent Parent node - * @return Node handle - * - * @note - * In many cases this method call should be followed by ReconcileNamespacesL() on the moved node - */ - inline TXmlEngNode MoveTo(TXmlEngNode aParent); - - /** - * Detaches a node from document tree - * - * @since S60 v3.1 - * @return This node, which is already not a part of any document - * @note Remember to use ReconcileNamespacesL() later, if extracted node (subtree) - * contains references to namespace declarations outside of the subtree. - * @see ReconcileNamespacesL() - * @note The document, from which the is being unlinked, becomes an owner of the node - * until it is linked elsewhere. - */ - IMPORT_C TXmlEngNode Unlink(); - - /** - * Ensures that namespaces referred to in the node and its descendants are - * in the scope the node. - * - * This method checks that all the namespaces declared within the given - * tree are properly declared. This is needed for example after Copy or Unlink - * and then Append operations. The subtree may still hold pointers to - * namespace declarations outside the subtree or they may be invalid/masked. As much - * as possible the function try to reuse the existing namespaces found in - * the new environment. If not possible, the new namespaces are redeclared - * on the top of the subtree. - * - * This method should be used after unlinking nodes and inserting to another - * document tree or to a another part of the original tree, if some nodes of the subtree - * are remove from the scope of a namespace declaration they refer to. - * - * When node is unlinked, it may still refer to namespace declarations from the previous location. - * It is important to reconcile subtree's namespaces if previous parent tree is to be destroyed. - * On the other hand, if the parent tree is not changed before pasting its unlinked part into another - * tree, then reconciliation is needed only after paste operation. - * - * @since S60 v3.1 - */ - IMPORT_C void ReconcileNamespacesL(); - - /** - * Unlinks the node and destroys it; all child nodes are destroyed as well and all memory is freed - * - * @note Document nodes cannot be "removed" with this method, uses RXmlEngDocument-specific methods. - * - * @since S60 v3.1 - */ - IMPORT_C void Remove(); - - /** - * Current node is replaced with another node (subtree). - * - * The replacement node is linked into document tree instead of this node. - * The replaced node is destroyed. - * - * @since S60 v3.1 - * @param aNode Node that repleace current node - * - * @see SubstituteFor(TXmlEngNode) - * - * In both cases the argument node is unlinked from its previous location - * (which can be NONE, i.e. not linked; SAME or ANOTHER document tree). - * - * @note Replacement of a node with NULL TXmlEngNode is legal and equivalent to removing the node. - * @note Not applicable to document nodes - */ - IMPORT_C void ReplaceWith(TXmlEngNode aNode); - - /** - * Another node is put instead of the current node. - * - * Does the same as ReplaceWith(TXmlEngNode) but does not free node and just returns it. - * - * @since S60 v3.1 - * @param aNode Node that repleace current node - * @return Current node after unlinking it from document tree - * @see ReplaceWith(TXmlEngNode) - * - * In both cases the argument node is unlinked from its previous location - * (which can be NONE, i.e. not linked; SAME or ANOTHER document tree) - * - * It is possible to use NULL TXmlEngNode object as an argument. In such case - * no new node will be put instead of unlinked one. - * - * @note Not applicable to document nodes - */ - IMPORT_C TXmlEngNode SubstituteForL(TXmlEngNode aNode); - - /** - * Retrieves a "handle" for namespace declaration that applies to the node's namespace - * Note: DOM specs do not consider namespace declarations as a kind of nodes - * This API adds TXmlEngNamespace type of nodes, which is derived from TXmlEngNode. - * - * @since S60 v3.1 - * @return Object that represents namespace declaration and prefix binding that - * act on the node; returns NULL object (check using TXmlEngNamespace.IsNull() - * or TXmlEngNamespace.NotNull()) if no namespace associated - */ - IMPORT_C TXmlEngNamespace NamespaceDeclaration() const; - - /** - * Attaches a user data object to this node. The ownership of the object is transferred. - * When the (underlying) node is deleted the Destroy method of the MXmlEngUserData class will be - * called. If there already is a user data object associated with this node, it will be - * deleted before attaching the new object. - * - * @since S60 v3.1 - * @param aData Pointer to the data object. - * @return true if successful, false if for example underlying node type doesn't support - * attaching user data. - * @note Only TXmlEngElement and Attribute nodes currently support this feature. - * User data is not copied, when node is copied. - */ - IMPORT_C TBool AddUserData(MXmlEngUserData* aData); - - /** - * Returns the user data object attached to this node. Ownership is not transferred. - * - * @since S60 v3.1 - * @return Pointer to data object or NULL if it doesn't exist. - */ - IMPORT_C MXmlEngUserData* UserData() const; - - /** - * Removes the user data onject attached to this node. Ownership is transferred - * (the object is not deleted). - * - * @since S60 v3.1 - * @return Pointer to data object or NULL if it doesn't exist. - */ - IMPORT_C MXmlEngUserData* RemoveUserData(); - - /** - * Clones the node completely: all attributes and namespace declarations (for TXmlEngElement nodes), - * values and children nodes are copied as well. - * - * Document nodes cannot be copied with this method: RXmlEngDocument::CloneDocumentL() must be used. - * - * @since S60 v3.1 - * @return Complete copy of a node or leaves. - * @note The node should not be NULL! - */ - IMPORT_C TXmlEngNode CopyL() const; - - /** - * Creates a deep copy of the node and appends the subtree as a new child - * to the provided parent node. - * - * @since S60 v3.1 - * @return Created copy of the node after linking it into the target document tree. - * @note Document nodes cannot be copied with this method; use RXmlEngDocument::CloneDocumentL() - */ - IMPORT_C TXmlEngNode CopyToL(TXmlEngNode aParent) const; - - /** - * Append a child node. - * - * This is universal operation for any types of nodes. - * Note, that some types of nodes cannot have children and - * some types of nodes are not allowed to be children of some other types. - * - * @since S60 v3.1 - * @param aNewChild Child node that should be added - * @return Appended node, which could changed as a result of adding it to - * list of child nodes (e.g. text nodes can coalesce together) - */ - IMPORT_C TXmlEngNode AppendChildL(TXmlEngNode aNewChild); - - /** - * Initializes a node list with all children of the node - * - * @since S60 v3.1 - * @param aList node list that should be initialized - */ - IMPORT_C void GetChildNodes(RXmlEngNodeList& aList) const; - - /** - * Get parent node of current node. - * - * @since S60 v3.1 - * @return Parent node of the node or NULL if no parent - */ - IMPORT_C TXmlEngNode ParentNode() const; - - /** - * Get first child of current node - * - * @since S60 v3.1 - * @return The first child node or NULL if no children - */ - IMPORT_C TXmlEngNode FirstChild() const; - - /** - * Get last child of current node - * - * @since S60 v3.1 - * @return The last child node or NULL if no children - */ - IMPORT_C TXmlEngNode LastChild() const; - - /** - * Get previous node of current node - * - * @since S60 v3.1 - * @return Previous node in a child list or NULL if no sibling before - */ - IMPORT_C TXmlEngNode PreviousSibling() const; - - /** - * Get fallowing node of current node - * - * @since S60 v3.1 - * @return Following node in a child list or NULL if no sibling after - */ - IMPORT_C TXmlEngNode NextSibling() const; - - /** - * Get document handle - * - * @since S60 v3.1 - * @return A document node of the DOM tree this node belongs to - * - * @note An instance of RXmlEngDocument class returns itself - */ - IMPORT_C RXmlEngDocument OwnerDocument() const; - - /** - * Fetches value of this node, depending on its type. - * - * @note It is better to always cast nodes to specific type and then use specific - * method for getting "node value" - * - * @since S60 v3.1 - * @return Node value - */ - IMPORT_C TPtrC8 Value() const; - - /** - * Get copy of node's text content - * What is returned depends on the node type. - * Method caller is responsible for freeing returned string. - * - * @since S60 v3.1 - * @return the content of the node - */ - IMPORT_C void WholeTextContentsCopyL(RBuf8& aOutput) const; - - /** - * Sets value of this node. - * - * @since S60 v3.1 - * @param aValue New value - */ - IMPORT_C void SetValueL(const TDesC8& aValue); - - /** - * Check if node content is "simple text". - * - * @since S60 v3.1 - * @return Whether the value of the node is presented by only one TXmlEngTextNode node - * - * If the value is "simple text" then it is possible to access it as TDOMString - * without making copy, which combines values of all text nodes and entity reference nodes. - * - * @see TXmlEngNode::Value(), TXmlEngAttr::Value(), TXmlEngElement::Text() - * - * This method is applicable to TXmlEngElement and TXmlEngAttr nodes. On other nodes FALSE is returned. - * - * @note - * Values (contents) of TXmlEngComment, TXmlEngCDATASection, TXmlEngTextNode, ProcessingInstuction data are - * always "simple". - * - * When the returned result is FALSE, getting value of the node would not returned - * whole contents because of either entity references present in the contents or - * the contents is mixed (for TXmlEngElement node). In this case WholeTextContentsCopyL() - * should be used. - * - * @see TXmlEngNode::WholeTextContentsCopyL() - */ - IMPORT_C TBool IsSimpleTextContents() const; - - /** - * Use NodeType() to find out the type of the node prior to casting object - * of TXmlEngNode class to one of its derived subclasses (TXmlEngElement, TXmlEngAttr, TXmlEngTextNode, etc.) - * - * @since S60 v3.1 - * @return Type of the node - * - * @see TXmlEngDOMNodeType - */ - IMPORT_C TXmlEngDOMNodeType NodeType() const; - - /** - * Get node name - * - * @since S60 v3.1 - * @return Name of the node - * - * This method generally follows DOM spec : - * ------------------------------------------------------------------------------- - * The values of nodeName, nodeValue, and attributes vary according to the node - * type as follows: - * - * interface nodeName nodeValue attributes - * ------------------------------------------------------------------------------- - * Attr = Attr.name = Attr.value = null - * CDATASection = "#cdata-section" = CharacterData.data = null - * Comment = "#comment" = CharacterData.data = null - * Document = "#document" = null = null - * DocumentFragment = "#document-fragment" = null = null - * DocumentType = DocumentType.name = null = null - * Element = Element.tagName = null = NamedNodeMap - * Entity = entity name = null = null - * EntityReference = name of entity referenced = null = null - * Notation = notation name = null = null - * ProcessingInstruction = target = data = null - * Text = "#text" = CharacterData.data = null - * ------------------------------------------------------------------------------- - */ - IMPORT_C TPtrC8 Name() const; - - - /** - * Check if node has child nodes. - * - * @since S60 v3.1 - * @return True if the node is TXmlEngElement and has at least one child node - */ - IMPORT_C TBool HasChildNodes() const; - - /** - * Check if node has attributes. - * - * @since S60 v3.1 - * @return True if the node is TXmlEngElement and has at least one attribute - * - * @note Namespace-to-prefix bindings are not attributes. - */ - IMPORT_C TBool HasAttributes() const; - - /** - * Evaluates active base URI for the node by processing xml:base attributes of parents - * - * @since S60 v3.1 - * @return A copy of effective base URI for the node - * @note It's up to the caller to free the string - */ - IMPORT_C void BaseUriL(RBuf8& aBaseUri) const; - - /** - * Compares nodes. - * - * The nodes are the same if they are referring to the same in-memory - * data structure. - * - * @since S60 v3.1 - * @param aOther Node to compare - * @return TRUE if the same - */ - inline TBool IsSameNode(TXmlEngNode aOther) const; - - /** - * Get namespace uri. - * - * @since S60 v3.1 - * @return Namespace URI of a node - * - NULL is returned for elements and attributes that do not - * belong to any namespace. - * - bound namespace URI is returned for namespace declaration nodes (instances of TXmlEngNamespace). - * - NULL is returned to all other types of node. - * - * @note use IsNull() and NotNull() for testing returned result on the subject - * of having some URI - */ - IMPORT_C TPtrC8 NamespaceUri() const; - - /** - * Get namespace prefix. - * - * @since S60 v3.1 - * @return Prefix of a node - * Returns NULL for elements and attributes that do not have prefix - * (node belongs to the default namespace or does not belong to any namespace) - * NULL is also returned for all types of node other than TXmlEngElement or TXmlEngAttr - */ - IMPORT_C TPtrC8 Prefix() const; - - /** - * Check if nemespace is default for this node - * - * @since S60 v3.1 - * @param aNamespaceUri Namespace URI - * @return True if given namespace URI is a default one for the node (applicable to elements only) - * - * @note "" or NULL can be used to denote undefined namespace - */ - IMPORT_C TBool IsDefaultNamespaceL(const TDesC8& aNamespaceUri) const; - - /** - * Searches the prefix that is bound to the given aNamespaceUri and - * applicable in the scope of this TXmlEngNode. - * - * @since S60 v3.1 - * @param aNamespaceUri Namespace Uri that should be found - * @return A sought prefix or NULL if not found or aNamespaceUri is the default namespace - * - * @see TXmlEngElement::LookupNamespaceByUriL(const TDesC8&) - */ - IMPORT_C TPtrC8 LookupPrefixL(const TDesC8& aNamespaceUri) const; - - /** - * Searches the namespace URI that is bound to the given prefix. - * - * @since S60 v3.1 - * @param aPrefix Namespace prefix that should be found - * @return A sought URI or NULL if the prefix is not bound - * - * @see TXmlEngElement::LookupNamespaceByPrefixL(const TDesC8&) - */ - IMPORT_C TPtrC8 LookupNamespaceUriL(const TDesC8& aPrefix) const; - -protected: - /** - * Unlinks the internal libxml2's node from double-linked list. - * Relinks neighbour nodes.The node stays virtually linked to its old neighbours! Use with care!! - * - * No checks are made; nor parent's, nor node's properties updated - * - * @since S60 v3.1 - */ - void DoUnlinkNode(); - - /** - * Inserts the node in a double-linked list of nodes before specified node. - * - * No checks are made; nor parent's, nor node's properties updated (except prev/next) - * - * @since S60 v3.1 - * @param aNode Target node - */ - void LinkBefore(TXmlEngNode aNode); - -protected: - /** Node pointer */ - void* iInternal; - -}; - -#include "xmlengnode.inl" - -#endif /* XMLENGINE_NODE_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnode.inl --- a/epoc32/include/xmlengnode.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Node functions implementation -* -*/ - - - - - - - -inline TXmlEngNode::TXmlEngNode() - : iInternal(NULL) {} - -inline TXmlEngNode::TXmlEngNode(void* aInternal) - : iInternal(aInternal) {} - -inline TBool TXmlEngNode::IsNull() const - {return iInternal == NULL;} - -inline TBool TXmlEngNode::NotNull() const - {return iInternal != NULL;} - -// ------------------------------------------------------------------------ -// Compares nodes. -// -// The nodes are the same if they are referring to the same in-memory -// data structure. -// ------------------------------------------------------------------------ -// -inline TBool TXmlEngNode::IsSameNode(TXmlEngNode aOther) const - {return iInternal == aOther.iInternal;} - -// ------------------------------------------------------------------------ -// Moves the node to another part of the tree or another document -// The node is unliked from current postion (if any) and appended -// to the its new parent. -// -// @note -// In many cases this method call should be followed by ReconcileNamespacesL() on the moved node -// ------------------------------------------------------------------------ -// -inline TXmlEngNode TXmlEngNode::MoveTo(TXmlEngNode aParent) - {return aParent.AppendChildL(Unlink());} - -inline TXmlEngAttr& TXmlEngNode::AsAttr() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngElement& TXmlEngNode::AsElement() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngTextNode& TXmlEngNode::AsText() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngBinaryContainer& TXmlEngNode::AsBinaryContainer() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngChunkContainer& TXmlEngNode::AsChunkContainer() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngFileContainer& TXmlEngNode::AsFileContainer() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngDataContainer& TXmlEngNode::AsDataContainer() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngNamespace& TXmlEngNode::AsNamespace() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngComment& TXmlEngNode::AsComment() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngCDATASection& TXmlEngNode::AsCDATASection() const - {return *reinterpret_cast(const_cast(this));} - - -inline TXmlEngEntityReference& TXmlEngNode::AsEntityReference() const - {return *reinterpret_cast(const_cast(this));} - -inline TXmlEngProcessingInstruction& TXmlEngNode::AsProcessingInstruction() const - {return *reinterpret_cast(const_cast(this));} - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnodefilter.h --- a/epoc32/include/xmlengnodefilter.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,63 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Node filter interface -* -*/ - - - - - - - -#ifndef XMLENGINE_NODEFILTER_H_INCLUDED -#define XMLENGINE_NODEFILTER_H_INCLUDED - -#include - -class TXmlEngNode; - -/** - * Results that can be returned by node filter - */ -enum TXmlEngNodeFilterResult - { - EAccept = 1, - EReject = 2, - ESkip = 3, - ESkipContents = 4 /** non-standard feature */ - }; - -/** - * Interface of nodes filter class - * - * @see http://www.w3.org/TR/2000/REC-DOM-Level-2-Traversal-Range-20001113/traversal.html#Traversal-NodeFilter - * - * @since S60 v3.1 - */ -class MXmlEngNodeFilter - { -public: - /** - * Check if node is accepted. - * - * @since S60 v3.1 - * @param aNode Node to check - * @return Node filter result - */ - virtual TXmlEngNodeFilterResult AcceptNode(TXmlEngNode aNode) = 0; - }; - - -#endif /* XMLENGINE_NODEFILTER_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnodelist.h --- a/epoc32/include/xmlengnodelist.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Node list inline functions -* -*/ - - - - - - - -#ifndef XMLENGINE_NODELIST_H_INCLUDED -#define XMLENGINE_NODELIST_H_INCLUDED - -#include "xmlengnode.h" -#include "xmlengnodelist_impl.h" - - - -/** - * Template implements list container. - * - * List may contain different types of nodes. - * Node pointer is casted to specify node type when - * is returned by Next() method. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.2 - */ -template -class RXmlEngNodeList -{ -public: - /** - * Get list length. - * - * @since S60 v3.2 - * @return Number of nodes in a node list - */ - inline TInt Count() const; - - /** - * Checks whether next node exists in a node list - * - * @since S60 v3.2 - * @return TRUE if next node exists, FALSE otherwise - */ - inline TBool HasNext() const; - - /** - * Retrieves next node from a node list - * - * @since S60 v3.2 - * @return Next node - */ - inline T Next(); - - /** - * Closes a node list - * - * @since S60 v3.2 - */ - inline void Close(); - -private: - friend class TXmlEngNode; - friend class TXmlEngElement; - - /* - * Opens node. - * - * @since S60 v3.2 - * @param aHead node pointer to the node from which the searching - of list elements is started - * @param aType type of list elements - * @param aName name of list elements - * @param aNs namespace of list elements - * - * @note If aType is NULL, aName and aNs are ignored - */ - void OpenL( - void* aHead, - TXmlEngNode::TXmlEngDOMNodeType aType, - const TDesC8& aName = KNullDesC8, - const TDesC8& aNs = KNullDesC8); - - /** - * Opens node. - * - * @since S60 v3.2 - * @param aHead node pointer to the node from which the searching - of list elements is started - * @param aType type of list elements - */ - void Open( - void* aHead, - TXmlEngNode::TXmlEngDOMNodeType aType); - - /** List with nodes */ - RXmlEngNodeListImpl iList; -}; - -/** - * Template implements list container for nodes. - * - * Specialization for trivial case: list of TXmlEngNode objects - * No "thin wrapper" pattern needed, operate directly on NodeListImpl - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -template<> -class RXmlEngNodeList: public RXmlEngNodeListImpl {}; - - - -#include "xmlengnodelist.inl" - -#endif /* XMLENGINE_NODELIST_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnodelist.inl --- a/epoc32/include/xmlengnodelist.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,86 +0,0 @@ -/* -* Copyright (c) 2006-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Node list inline functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Retrieves number of items in node list -// ----------------------------------------------------------------------------- -// -template inline TInt RXmlEngNodeList::Count() const - { - return iList.Count(); - } - -// ----------------------------------------------------------------------------- -// Returns true if this node has next sibling, false otherwise. -// ----------------------------------------------------------------------------- -// -template inline TBool RXmlEngNodeList::HasNext() const - { - return iList.HasNext(); - } - -// ----------------------------------------------------------------------------- -// Retrieves next node -// ----------------------------------------------------------------------------- -// -template inline T RXmlEngNodeList::Next() - { - TXmlEngNode t = iList.Next(); - return *(static_cast(&t)); - } - -// ----------------------------------------------------------------------------- -// Closes node list -// ----------------------------------------------------------------------------- -// -template inline void RXmlEngNodeList::Close() - { - iList.Close(); - } - -// ----------------------------------------------------------------------------- -// Opens node list -// ----------------------------------------------------------------------------- -// -template inline void RXmlEngNodeList::OpenL( - void* aHead, - TXmlEngNode::TXmlEngDOMNodeType aType, - const TDesC8& aName, - const TDesC8& aNs) - { - iList.OpenL(aHead, aType, aName, aNs); - } - -// ----------------------------------------------------------------------------- -// Opens node list -// ----------------------------------------------------------------------------- -// -template inline void RXmlEngNodeList::Open( - void* aHead, - TXmlEngNode::TXmlEngDOMNodeType aType) - { - iList.Open(aHead, aType); - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengnodelist_impl.h --- a/epoc32/include/xmlengnodelist_impl.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,122 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Node list implementation functions -* -*/ - - - - - - - -#ifndef XMLENGINE_NODELIST_IMPL_H_INCLUDED -#define XMLENGINE_NODELIST_IMPL_H_INCLUDED - -#include -#include "xmlengnode.h" - -/** - * Class implements list container. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.2 - */ -class RXmlEngNodeListImpl -{ -public: - - /** - * Default constructor - * - * @since S60 v3.2 - */ - IMPORT_C RXmlEngNodeListImpl(); - - /** - * Closes node list - * - * @since S60 v3.2 - */ - IMPORT_C void Close(); - - /** - * Get list length. - * - * @since S60 v3.2 - * @return Number of nodes in a node list - */ - IMPORT_C TInt Count() const; - - /** - * Checks whether next node exists in a node list - * - * @since S60 v3.2 - * @return TRUE if next node exists, FALSE otherwise - */ - IMPORT_C TBool HasNext() const; - - /** - * Retrieves next node from a node list - * - * @since S60 v3.2 - * @return Next node - */ - IMPORT_C TXmlEngNode Next(); - - /** - * Opens node. - * - * @since S60 v3.2 - * @param aHead node pointer to the node from which the searching - of list elements is started - * @param aType type of list elements - * @param aName name of list elements - * @param aNs namespace of list elements - * - * @note If aType is NULL, aName and aNs are ignored - */ - void OpenL( - void* aHead, - TXmlEngNode::TXmlEngDOMNodeType aType, - const TDesC8& aName = KNullDesC8, - const TDesC8& aNs = KNullDesC8); - - /** - * Opens node. - * - * @since S60 v3.2 - * @param aHead node pointer to the node from which the searching - of list elements is started - * @param aType type of list elements - */ - void Open( - void* aHead, - TXmlEngNode::TXmlEngDOMNodeType aType); - -private: - - void* FindNextNode(void* aCurrentNode) const; - - void* iCurrentNode; - TInt iType; // NodeType:4 bits (0-3) & MatchName flag (bit 4) - unsigned char* iName; - unsigned char* iNsUri; -}; - -TBool StrEqualOrNull(const void* aStr1, const void* aStr2); - - - -#endif /* XMLENGINE_NODELIST_IMPL_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengoutputstream.h --- a/epoc32/include/xmlengoutputstream.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,64 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface class describing class that may be used as -* output stream for dom tree -* -*/ - - - - - - - -#ifndef XMLENGINE_MOUTPUTSTREAM_H_INCLUDED -#define XMLENGINE_MOUTPUTSTREAM_H_INCLUDED - -#include - - - -/** - * MXmlEngOutputStream is used by XML Engine to write serialized XML data - * to stream. This interface should be implemented by client application - * when RXmlEngDocument::SaveL() method is used to serialize xml data to stream. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class MXmlEngOutputStream - { -public: - /** - * Callback for writing a buffer with data to output stream - * - * @since S60 v3.1 - * @return number of bytes written or -1 in case of error - */ - virtual TInt Write(const TDesC8& aBuffer) = 0; - - /** - * Callback for closing output stream - * - * @since S60 v3.1 - * @return - * 0 is succeeded, - * -1 in case of error - */ - virtual TInt Close() = 0; - }; - - - -#endif /* XMLENGINE_MOUTPUTSTREAM_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengprocessinginstruction.h --- a/epoc32/include/xmlengprocessinginstruction.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,96 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Processing instruction node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_PROCESSINGINSTRUCTION_H_INCLUDED -#define XMLENGINE_PROCESSINGINSTRUCTION_H_INCLUDED - -#include "xmlengnode.h" - - - -/** - * Instance of TXmlEngProcessingInstruction class represents an XML processing - * instruction in the DOM tree. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngProcessingInstruction : public TXmlEngNode -{ - public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngProcessingInstruction(); - - /** - * Get target of processing instruction. - * - * @since S60 v3.1 - * @return "Target" part of a processing instruction - * - * @code - * - * @endcode - * @see http://www.w3.org/TR/2004/REC-xml-20040204/#sec-pi - */ - IMPORT_C TPtrC8 Target() const; - - /** - * Get data of processing instruction. - * - * @since S60 v3.1 - * @return "Data" part of a processing instruction - * - * @code - * - * @endcode - * @see http://www.w3.org/TR/2004/REC-xml-20040204/#sec-pi - */ - IMPORT_C TPtrC8 Data() const; - - /** - * Sets data part of processing instruction - * - * @since S60 v3.1 - * @param aData New data part of processing instruction - * @note PI contents should not contain "?>" sequence - */ - IMPORT_C void SetDataL(const TDesC8& aData); - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal processing instruction pointer - */ - inline TXmlEngProcessingInstruction(void* aInternal); -}; - - - -#include "xmlengprocessinginstruction.inl" -#endif /* XMLENGINE_PROCESSINGINSTRUCTION_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengprocessinginstruction.inl --- a/epoc32/include/xmlengprocessinginstruction.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Processing instruction inline functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngProcessingInstruction::TXmlEngProcessingInstruction():TXmlEngNode(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngProcessingInstruction::TXmlEngProcessingInstruction(void* aInternal):TXmlEngNode(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengserializationoptions.h --- a/epoc32/include/xmlengserializationoptions.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Serialization options functions -* -*/ - - - - - - - - -#ifndef XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED -#define XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED - -#include - -// FORWARD DECLARATION -class MXmlEngOutputStream; -class MXmlEngDataSerializer; -class MXmlEngNodeFilter; - -/** - * Class allow to set serialization option during document save. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngSerializationOptions - { -public: - /** Use indent in output */ - static const TUint KOptionIndent = 0x01; - /** Skip xml declaration */ - static const TUint KOptionOmitXMLDeclaration = 0x02; - /** Add standalone in xml declaration. KOptionOmitXMLDeclaration must not be set */ - static const TUint KOptionStandalone = 0x04; - /** Add encoding in xml declaration. KOptionOmitXMLDeclaration must not be set */ - static const TUint KOptionEncoding = 0x08; - /** Not supported currently */ - static const TUint KOptionIncludeNsPrefixes = 0x10; - /** Not supported currently */ - static const TUint KOptionCDATASectionElements = 0x20; - /** Decode base64 encoded binary containers content upon XOP serialization*/ - static const TUint KOptionDecodeBinaryContainers = 0x40; - - /** - * Constructor - * - * @since S60 v3.1 - * @param aOptionFlags Serialization options - * @param aEncoding Serialization encoding - */ - IMPORT_C TXmlEngSerializationOptions( TUint aOptionFlags = - (TXmlEngSerializationOptions::KOptionIndent | - TXmlEngSerializationOptions::KOptionStandalone | - TXmlEngSerializationOptions::KOptionEncoding), - const TDesC8& aEncoding = KNullDesC8); - - /** - * Set node filter - * - * @since S60 v3.1 - * @param aFilter New node filter - */ - IMPORT_C void SetNodeFilter(MXmlEngNodeFilter* aFilter); - -public: - /** Options flag */ - TUint iOptions; - /** Encoding */ - TPtrC8 iEncoding; - /** Node filter */ - MXmlEngNodeFilter* iNodeFilter; - /** Object whose serialization callback is invoked **/ - MXmlEngDataSerializer* iDataSerializer; - }; - - - -#endif /* XMLENGINE_SERIALIZATIONOPTIONS_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengtext.h --- a/epoc32/include/xmlengtext.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,90 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Text node functions -* -*/ - - - - - - - -#ifndef XMLENGINE_TEXT_H_INCLUDED -#define XMLENGINE_TEXT_H_INCLUDED - -#include "xmlengcharacterdata.h" - - - -/** - * The TXmlEngTextNode interface inherits from TXmlEngCharacterData and represents the textual content - * (termed "character data" in XML) of an Element or TXmlEngAttr. - * - * If there is no markup inside an element's content, the text is contained in a single object - * of the TXmlEngTextNode interface that is the only child of the element. If there is markup, - * it is parsed into the information items (elements, comments, etc.) and TXmlEngTextNode nodes that - * form the list of children of the element. - * - * When a document is first made available via the DOM, there is only one TXmlEngTextNode node for each - * block of text. Users may create adjacent TXmlEngTextNode nodes that represent the contents of a given - * element without any intervening markup, but should be aware that there is no way to - * represent the separations between these nodes in XML or HTML, so they will not (in general) - * persist between DOM editing sessions. - * - * No lexical check is done on the content of a TXmlEngTextNode node and, depending on its position in - * the document, some characters must be escaped during serialization using character references; - * e.g. the characters "<&" if the textual content is part of an element or of an attribute, - * the character sequence "]]>" when part of an element, the quotation mark character " or - * the apostrophe character ' when part of an attribute. - * - * DOM Level 3 spec: - *

http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#ID-1312295772 - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class TXmlEngTextNode : public TXmlEngCharacterData -{ -public: - /** - * Default constructor - * - * @since S60 v3.1 - */ - inline TXmlEngTextNode(); - - /** - * Check if element content is whitespace. - * - * @since S60 v3.1 - * @return TRUE if is only whitespace - */ - IMPORT_C TBool IsElementContentWhitespace() const; - -protected: - /** - * Constructor - * - * @since S60 v3.1 - * @param aInternal Text node pointer - */ - inline TXmlEngTextNode(void* aInternal); -}; - - - -#include "xmlengtext.inl" - -#endif /* XMLENGINE_TEXT_H_INCLUDED */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlengtext.inl --- a/epoc32/include/xmlengtext.inl Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2004-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Text node inline functions -* -*/ - - - - - - - - - -// ----------------------------------------------------------------------------- -// Default constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngTextNode::TXmlEngTextNode():TXmlEngCharacterData(NULL) - { - } - -// ----------------------------------------------------------------------------- -// Constructor -// ----------------------------------------------------------------------------- -// -inline TXmlEngTextNode::TXmlEngTextNode(void* aInternal):TXmlEngCharacterData(aInternal) - { - } - diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmlenguserdata.h --- a/epoc32/include/xmlenguserdata.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* -* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -* which accompanies this distribution, and is available -* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Interface class describing class that may contains user - * data aded to node - * -*/ - - - - - - - -#ifndef XMLENGINE_USERDATA_H_INCLUDED -#define XMLENGINE_USERDATA_H_INCLUDED - -#include - -/** - * MXmlEngUserData is an abstract base class (interface) for user data that can be - * stored in the DOM tree. Applications that wish to store user data in the - * DOM tree must wrap the user data in a class that implemens this interface. - * - * @lib XmlEngineDOM.lib - * @since S60 v3.1 - */ -class MXmlEngUserData { -public: - /** - * Free memory that is allocated and do other case specific cleanup. - * - * @since S60 v3.1 - */ - virtual void Destroy() = 0; - - /** - * Make a copy of the the object. Note that if reference counting is used or - * the same pointer can be safely copied to other places the implementation - * of this method may just return a pointer to self. - * - * Copying user data when copying nodes has not been implemented - * so this method is for future use (though there's no harm in implementing - * it, of course). - * - * @since S60 v3.1 - * @return Pointer to a copy of this object. - */ - virtual MXmlEngUserData* CloneL() = 0; - - /** - * Get id of the object. It is up to user-data provider what the result is. - * Such a "user data identification" may be in use if several types of - * MXmlEngUserData objects are used. - * - * @since S60 v3.1 - * @return Pointer that somehow identifies the type of MXmlEngUserData (NULL by default) - */ - virtual void* ID() {return NULL;} -}; - - - -#endif /* XMLENGINE_USERDATA_H_INCLUDED*/ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/xmllib.h --- a/epoc32/include/xmllib.h Tue Mar 16 16:12:26 2010 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,234 +0,0 @@ -// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members -// which accompanies this distribution, and is available -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// CXmlLibrary is an interface class for a client to access the Xml parsing and validation -// services provided by the library. In general, CXmlLibrary should be concidered as a base -// class for a library which implements the language specific bits of an Xml-language parser. -// USAGE: -// - Construction of the class using NewL or NewL -// - Pass data to parsing by calling ProcessDataL. -// - When all data has been parsed, call CommitL -// -// - -#ifndef __XMLLIB_H__ -#define __XMLLIB_H__ - -// System includes -// -#include -#include - -// CONSTANT DEFINITIONS -// - -/** -ID for the root node attribute that contains the buffered document in case no DTD was available -@publishedAll -@deprecated -*/ -_LIT(KXmlLibBufferedDocumentAttribute, "XmlLibBufferedDocument"); - -/** -The Xml version that XML currently parser supports -@publishedAll -@deprecated -*/ -_LIT(KSupportedXmlVersion, "1.0"); - -/** -ID for node containing text data defined in a CDATA section (i.e. within ) -@publishedAll -@deprecated -*/ -_LIT(KCDataID, "CDATA"); - -/** -ID for "normal" text nodes -@publishedAll -@deprecated -*/ -_LIT(KPCDataID, "#PCDATA"); - - -// Forward class declarations -// -class CXmlElement; -class CXmlParser; -class CBNFNode; -class CAttributeLookupTable; -class MWapPluginSP; - -// CXmlLibrary -// -//##ModelId=3B6679A401C8 -class CXmlLibrary : public CBase -/** -@publishedAll -@deprecated -*/ - { -public: // Methods - // Default constuctor - // Sets default values values iMIMEType, iDefaultDoctype and iDefaultDTDUrl - // An inheriting class should override this constructor and set the variables - // with their correct values. - //##ModelId=3B6679A402CD - IMPORT_C virtual ~CXmlLibrary(); - //##ModelId=3B6679A402BA - IMPORT_C static CXmlLibrary* NewL(MWapPluginSP& aPluginSP, CXmlElement* aRootNode); - //##ModelId=3B6679A402AF - IMPORT_C static CXmlLibrary* NewLC(MWapPluginSP& aPluginSP, CXmlElement* aRootNode); - - //##ModelId=3B6679A40287 - IMPORT_C virtual TInt ProcessDataL(TDesC8& aData); - - // Xml Parse given data and generate document tree to the given root node. - // INPUT: - // aData - document text, or a piece of it - // RETURN: - // TInt - an error code defined above, KErrNone if no errors. - //##ModelId=3B6679A40291 - IMPORT_C virtual TInt ProcessDataL(HBufC8& aData); - - // Signal parser that incoming data stream has finished - // RETURN: - // TInt - an error code defined above, KErrNone if no error occured. - // NOTE: In case no DTD was available, the document got buffered and was attached - // to an attribute in the root node and CommitL returns KErrDocumentBuffered. - // The buffered document will be re-parsed when engine receives the requested - // DTD and calls a data handler (defined by iMIMEType) for validation. - //##ModelId=3B6679A4027E - IMPORT_C virtual TInt CommitL(); - - // Validate the document according to the given DTD. - // INPUT: - // aDTDRootNode - Root node to the DTD tree which defines the structure of the document. - // This referenced node is the DTD root node created by the engine. - // The actual DTD tree, if any, is attached as a child to this node. - // NO INHERITING CLASS SHOULD OVERRIDE THIS! Override the protected - // ValidateL instead. - // RETURN: - // TInt - an error code defining the reason for validation failure. KErrNone if no errors. - //##ModelId=3B6679A40274 - IMPORT_C virtual TInt ValidateL(CBNFNode& aDTDRootNode); - - // Set parser and library to its initial state to start parsing of a new document - // INPUT: - // aRootNode - root node for the new document tree - //##ModelId=3B6679A4026B - IMPORT_C virtual void ResetL(CXmlElement* aRootNode); - - // ----------------------------------------------------------------------- - // (WAP Push Addition) - // Wap Push specific method to switch off use of XML validator which doesn't work - // with push messages. - // iIgnoreValidator will be set on class construction to False with complies with - // current code usage; for push messages ONLY set iIgnoreValidator to True - // ----------------------------------------------------------------------- -// inline void OmitValidator(TBool aIgnoreValidator) { iIgnoreValidator = aIgnoreValidator; } ; - // - // ----------------------------------------------------------------------- - -protected: - // A simple, internal utility function to setup the Xml parser - //##ModelId=3B6679A4026A - IMPORT_C void PrepareParserL(); - - //##ModelId=3B6679A40269 - IMPORT_C void ConstructL(); - - // Default constructor - // SEE NOTES ON iMimeType, iDefaultDocType and iDefaultDTDUrl for inheriting class's constuctor - IMPORT_C CXmlLibrary(MWapPluginSP& aPluginSP, CXmlElement* aRootNode); - - // Data parsing method for internal usage. Takes ownership of the given data - // INPUT: - // aData - Pointer to the UNICODE text data. Parser shall take ownership of this data! - // RETURN: - // TInt - Error code, KErrNone if no errors. - //##ModelId=3B6679A402A5 - TInt ProcessDataL(HBufC16* aData); - - // Internal utility function for finishing with the parser - // RETURN: - // TInt - Error code. KErrNone if no errors. - //##ModelId=3B6679A40260 - TInt CommitParserL(); - - // Internal utility function for handling return values from parsing and initiating DTD fetch - // RETURN: - // TInt - Error code. KErrNone if no errors. - //##ModelId=3B6679A4025F - TInt ExecuteDataProcessingL(); - - //##ModelId=3B6679A40255 - CBNFNode* ExtractDTDTree(CBNFNode* aDTDRoot); - - // Internal validation function that actually performs the validation. - // INPUT: - // aDTDRootNode - Pointer to the _actual_ dtd tree root node, NOT the root given by angine - // OUTPUT: - // TInt - Error code, KErrNone if no errors - //##ModelId=3B6679A4024B - IMPORT_C virtual TInt ExecuteValidateL(CBNFNode* aDTDRootNode); - -protected: // Attributes - - /** Plugin Service Provider - */ - //##ModelId=3B6679A40239 - MWapPluginSP& iPluginSP; - - /** Document Root Node - */ - //##ModelId=3B6679A40225 - CXmlElement* iRootNode; - - // The default DTD doctype and Url in case no DTD was defined - // NOTE: Inheriting class should set these values in its constructor!! - //##ModelId=3B6679A4021B - const TDesC* iDefaultDoctype; - - //##ModelId=3B6679A40211 - const TDesC* iDefaultDTDUrl; - - /** The actual DTD tree - not owned - */ - //##ModelId=3B6679A401FC - CBNFNode* iDTD; - -private: // Attributes - - /** The XML parser - */ - //##ModelId=3B6679A401F2 - CXmlParser* iParser; - -private: // BC-proofing - -/** - Intended Usage : Reserved for future use - @since 6.0 - */ - //##ModelId=3B6679A40241 - IMPORT_C virtual void CXmlLibrary_Reserved1(); - - /** Reserved for future use - */ - //##ModelId=3B6679A401E8 - TAny* iCXmlLibrary_Reserved; - - }; - -#endif // __XMLLIB_H__ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/zconf.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/zconf.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,374 @@ +/* zconf.h -- configuration of the zlib compression library + * Copyright (C) 1995-2005 Jean-loup Gailly. + * For conditions of distribution and use, see copyright notice in zlib.h + */ + +/* @(#) $Id: zconf.h,v 1.1.2.1 2008/08/14 15:26:57 e0222316 Exp $ */ + +#ifndef _ZCONF_H +#define _ZCONF_H + +#if (defined(__TOOLS2__) || defined(__TOOLS__)) + /** Defined as nothing for tools builds, as EXPORT_C keyword not supported on these platforms */ + #define EXPORT_C +#else +#ifdef __SYMBIAN32__ + #include /* Include for definition of IMPORT_C below */ + /** This macro is used in function prototypes in zlib.h and libzcore.h. Use Symbian definition IMPORT_C instead of ZEXTERN */ + #define ZEXTERN IMPORT_C + /** This macro is used for EZLIB component */ + #define SYMBIAN_EZLIB_DEVICE +#endif /* __SYMBIAN32__ */ +#endif /* __TOOLS2__ || __TOOLS__ */ + + +/* + * If you *really* need a unique prefix for all types and library functions, + * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. + */ +#ifdef Z_PREFIX +# define deflateInit_ z_deflateInit_ +# define deflate z_deflate +# define deflateEnd z_deflateEnd +# define inflateInit_ z_inflateInit_ +# define inflate z_inflate +# define inflateEnd z_inflateEnd +# define deflateInit2_ z_deflateInit2_ +# define deflateSetDictionary z_deflateSetDictionary +# define deflateCopy z_deflateCopy +# define deflateReset z_deflateReset +# define deflateParams z_deflateParams +# define deflateBound z_deflateBound +# define deflatePrime z_deflatePrime +# define inflateInit2_ z_inflateInit2_ +# define inflateSetDictionary z_inflateSetDictionary +# define inflateSync z_inflateSync +# define inflateSyncPoint z_inflateSyncPoint +# define inflateCopy z_inflateCopy +# define inflateReset z_inflateReset +# define inflateBack z_inflateBack +# define inflateBackEnd z_inflateBackEnd +# define compress z_compress +# define compress2 z_compress2 +# define compressBound z_compressBound +# define uncompress z_uncompress +# define adler32 z_adler32 +# define crc32 z_crc32 +# define get_crc_table z_get_crc_table +# define zError z_zError + +# define alloc_func z_alloc_func +# define free_func z_free_func +# define in_func z_in_func +# define out_func z_out_func +# define Byte z_Byte +# define uInt z_uInt +# define uLong z_uLong +# define Bytef z_Bytef +# define charf z_charf +# define intf z_intf +# define uIntf z_uIntf +# define uLongf z_uLongf +# define voidpf z_voidpf +# define voidp z_voidp +#endif + +#if defined(__MSDOS__) && !defined(MSDOS) +# define MSDOS +#endif +#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) +# define OS2 +#endif +#if defined(_WINDOWS) && !defined(WINDOWS) +# define WINDOWS +#endif +#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) +# ifndef WIN32 +# define WIN32 +# endif +#endif +#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) +# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) +# ifndef SYS16BIT +# define SYS16BIT +# endif +# endif +#endif + +/* + * Compile with -DMAXSEG_64K if the alloc function cannot allocate more + * than 64k bytes at a time (needed on systems with 16-bit int). + */ +#ifdef SYS16BIT +# define MAXSEG_64K +#endif +#ifdef MSDOS +# define UNALIGNED_OK +#endif + +#ifdef __STDC_VERSION__ +# ifndef STDC +# define STDC +# endif +# if __STDC_VERSION__ >= 199901L +# ifndef STDC99 +# define STDC99 +# endif +# endif +#endif +#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) +/** define STDC i.e. Standard C */ +# define STDC +#endif +#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) +# define STDC +#endif +#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) +# define STDC +#endif +#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) +# define STDC +#endif + +#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ +# define STDC +#endif + +#ifndef STDC +# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ +# define const /* note: need a more gentle solution here */ +# endif +#endif + +/* Some Mac compilers merge all .h files incorrectly: */ +#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) +# define NO_DUMMY_DECL +#endif + +#ifndef MAX_MEM_LEVEL +# ifdef MAXSEG_64K +/** Maximum value for memLevel in deflateInit2 */ +# define MAX_MEM_LEVEL 8 +# else +/** Maximum value for memLevel in deflateInit2 */ +# define MAX_MEM_LEVEL 9 +# endif +#endif + +/* Maximum value for windowBits in deflateInit2 and inflateInit2. + * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files + * created by gzip. (Files created by minigzip can still be extracted by + * gzip.) + */ +#ifndef MAX_WBITS +/** 32K LZ77 window */ +# define MAX_WBITS 15 +#endif + +/* The memory requirements for deflate are (in bytes): + (1 << (windowBits+2)) + (1 << (memLevel+9)) + that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) + plus a few kilobytes for small objects. For example, if you want to reduce + the default memory requirements from 256K to 128K, compile with + make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" + Of course this will generally degrade compression (there's no free lunch). + + The memory requirements for inflate are (in bytes) 1 << windowBits + that is, 32K for windowBits=15 (default value) plus a few kilobytes + for small objects. +*/ + + /* Type declarations */ + +#ifndef OF /* function prototypes */ +# ifdef STDC +/** + Function prototypes + @param args arguments ... +*/ +# define OF(args) args +# else +/** Function prototypes */ +# define OF(args) () +# endif +#endif + +/* The following definitions for FAR are needed only for MSDOS mixed + * model programming (small or medium model with some far allocations). + * This was tested only with MSC; for other MSDOS compilers you may have + * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, + * just define FAR to be empty. + */ +#ifdef SYS16BIT +# if defined(M_I86SM) || defined(M_I86MM) + /* MSC small or medium model */ +# define SMALL_MEDIUM +# ifdef _MSC_VER +# define FAR _far +# else +# define FAR far +# endif +# endif +# if (defined(__SMALL__) || defined(__MEDIUM__)) + /* Turbo C small or medium model */ +# define SMALL_MEDIUM +# ifdef __BORLANDC__ +# define FAR _far +# else +# define FAR far +# endif +# endif +#endif + +#if defined(WINDOWS) || defined(WIN32) + /* If building or using zlib as a DLL, define ZLIB_DLL. + * This is not mandatory, but it offers a little performance increase. + */ +# ifdef ZLIB_DLL +# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) +# ifdef ZLIB_INTERNAL +# define ZEXTERN extern __declspec(dllexport) +# else +# define ZEXTERN extern __declspec(dllimport) +# endif +# endif +# endif /* ZLIB_DLL */ + /* If building or using zlib with the WINAPI/WINAPIV calling convention, + * define ZLIB_WINAPI. + * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. + */ +# ifdef ZLIB_WINAPI +# ifdef FAR +# undef FAR +# endif +# include + /* No need for _export, use ZLIB.DEF instead. */ + /* For complete Windows compatibility, use WINAPI, not __stdcall. */ +# define ZEXPORT WINAPI +# ifdef WIN32 +# define ZEXPORTVA WINAPIV +# else +# define ZEXPORTVA FAR CDECL +# endif +# endif +#endif + +#if defined (__BEOS__) +# ifdef ZLIB_DLL +# ifdef ZLIB_INTERNAL +# define ZEXPORT __declspec(dllexport) +# define ZEXPORTVA __declspec(dllexport) +# else +# define ZEXPORT __declspec(dllimport) +# define ZEXPORTVA __declspec(dllimport) +# endif +# endif +#endif + +#ifndef ZEXTERN +/** extern defined as ZEXTERN */ +# define ZEXTERN extern +#endif +#ifndef ZEXPORT +# define ZEXPORT +#endif +#ifndef ZEXPORTVA +# define ZEXPORTVA +#endif + + +#ifndef FAR +# define FAR +#endif + +#if !defined(__MACTYPES__) +/** 8 bits */ +typedef unsigned char Byte; +#endif +/** 16 bits or more */ +typedef unsigned int uInt; +/** 32 bits or more */ +typedef unsigned long uLong; + +#ifdef SMALL_MEDIUM + /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */ +# define Bytef Byte FAR +#else + /** Borland C/C++ and some old MSC versions ignore FAR inside typedef */ + typedef Byte FAR Bytef; +#endif +/** char typedef to charf */ +typedef char FAR charf; +/** int typedef to intf */ +typedef int FAR intf; +/** uInt typedef to uIntf */ +typedef uInt FAR uIntf; +/** uLong typedef to uLongf */ +typedef uLong FAR uLongf; + +#ifdef STDC + /** typedef void const* to voidpc */ + typedef void const *voidpc; + /** typedef void FAR* to voidpf */ + typedef void FAR *voidpf; + /** typedef void* to voidp */ + typedef void *voidp; +#else + /** typedef Byte const* to voidpc */ + typedef Byte const *voidpc; + /** typedef Byte FAR* to voidpf */ + typedef Byte FAR *voidpf; + /** typedef Byte* to voidp */ + typedef Byte *voidp; +#endif + +#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ +# include /* for off_t */ +# include /* for SEEK_* and off_t */ +# ifdef VMS +# include /* for off_t */ +# endif +# define z_off_t off_t +#endif +#ifndef SEEK_SET +/** Seek from beginning of file. */ +# define SEEK_SET 0 +/** Seek from current position. */ +# define SEEK_CUR 1 +/** Set file pointer to EOF plus "offset" */ +# define SEEK_END 2 +#endif +#ifndef z_off_t +/** define z_off_t as long */ +# define z_off_t long +#endif + +#if defined(__OS400__) +# define NO_vsnprintf +#endif + +#if defined(__MVS__) +# define NO_vsnprintf +# ifdef FAR +# undef FAR +# endif +#endif + +/* MVS linker does not support external names larger than 8 bytes */ +#if defined(__MVS__) +# pragma map(deflateInit_,"DEIN") +# pragma map(deflateInit2_,"DEIN2") +# pragma map(deflateEnd,"DEEND") +# pragma map(deflateBound,"DEBND") +# pragma map(inflateInit_,"ININ") +# pragma map(inflateInit2_,"ININ2") +# pragma map(inflateEnd,"INEND") +# pragma map(inflateSync,"INSY") +# pragma map(inflateSetDictionary,"INSEDI") +# pragma map(compressBound,"CMBND") +# pragma map(inflate_table,"INTABL") +# pragma map(inflate_fast,"INFA") +# pragma map(inflate_copyright,"INCOPY") +#endif + +#endif /* _ZCONF_H */ diff -r 2fe1408b6811 -r e1b950c65cb4 epoc32/include/zlib.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/epoc32/include/zlib.h Wed Mar 31 12:27:01 2010 +0100 @@ -0,0 +1,1899 @@ +/** +@file +@publishedAll +@released +*/ + +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.3, July 18th, 2005 + + Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + + + The data format used by the zlib library is described by RFCs (Request for + Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt + (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). +*/ + + +#ifndef _ZLIB_H +#define _ZLIB_H + +#if (defined(__TOOLS2__) || defined(__TOOLS__)) + // A tools build picks up the zconf.h file from the user include path + #include "zconf.h" +#else + // Any other build picks up zconf.h from stdapis system include directory + #include +#endif + +#ifdef __cplusplus + extern "C" { +#endif + +/** Zlib version */ +#define ZLIB_VERSION "1.2.3" +/** Zlib version Number */ +#define ZLIB_VERNUM 0x1230 + +/** + The 'zlib' compression library provides in-memory compression and + decompression functions, including integrity checks of the uncompressed + data. This version of the library supports only one compression method + (deflation) but other algorithms will be added later and will have the same + stream interface. + + Compression can be done in a single step if the buffers are large + enough (for example if an input file is mmap'ed), or can be done by + repeated calls of the compression function. In the latter case, the + application must provide more input and/or consume the output + (providing more output space) before each call. + + The compressed data format used by default by the in-memory functions is + the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped + around a deflate stream, which is itself documented in RFC 1951. + + The library also supports reading and writing files in gzip (.gz) format + with an interface similar to that of stdio using the functions that start + with "gz". The gzip format is different from the zlib format. gzip is a + gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. + + This library can optionally read and write gzip streams in memory as well. + + The zlib format was designed to be compact and fast for use in memory + and on communications channels. The gzip format was designed for single- + file compression on file systems, has a larger header than zlib to maintain + directory information, and uses a different, slower check method than zlib. + + The library does not install any signal handler. The decoder checks + the consistency of the compressed data, so the library should never + crash even in case of corrupted input. +*/ + +/** Function pointer - used to allocate the internal state */ +typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); +/** Function pointer - used to free the internal state */ +typedef void (*free_func) OF((voidpf opaque, voidpf address)); + +struct internal_state; + +/** + Encapsulates a zip stream +*/ +typedef struct z_stream_s { + /** Next input byte */ + Bytef *next_in; + /** Number of bytes available at next_in */ + uInt avail_in; + /** Total nb of input bytes read so far */ + uLong total_in; + + /** Next output byte should be put there */ + Bytef *next_out; + /** Remaining free space at next_out */ + uInt avail_out; + /** Total nb of bytes output so far */ + uLong total_out; + + /** Last error message, NULL if no error */ + char *msg; + /** Not visible by applications */ + struct internal_state FAR *state; + + /** Used to allocate the internal state */ + alloc_func zalloc; + /** Used to free the internal state */ + free_func zfree; + /** Private data object passed to zalloc and zfree */ + voidpf opaque; + + /** Best guess about the data type: binary or text */ + int data_type; + /** Adler32 value of the uncompressed data */ + uLong adler; + /** Reserved for future use */ + uLong reserved; +} z_stream; + +/** typedef z_stream* as z_streamp. Refer to z_stream_s for more details */ +typedef z_stream FAR *z_streamp; + +/** + gzip header information passed to and from zlib routines. See RFC 1952 + for more details on the meanings of these fields. +*/ +typedef struct gz_header_s { + /** True if compressed data believed to be text */ + int text; + /** Modification time */ + uLong time; + /** Extra flags (not used when writing a gzip file) */ + int xflags; + /** Operating system */ + int os; + /** Pointer to extra field or Z_NULL if none */ + Bytef *extra; + /** Extra field length (valid if extra != Z_NULL) */ + uInt extra_len; + /** Space at extra (only when reading header) */ + uInt extra_max; + /** Pointer to zero-terminated file name or Z_NULL */ + Bytef *name; + /** Space at name (only when reading header) */ + uInt name_max; + /** Pointer to zero-terminated comment or Z_NULL */ + Bytef *comment; + /** Space at comment (only when reading header) */ + uInt comm_max; + /** True if there was or will be a header crc */ + int hcrc; + /** True when done reading gzip header (not used when writing a gzip file) */ + int done; +} gz_header; + +/** gz_headerp is typedef gz_header* */ +typedef gz_header FAR *gz_headerp; + +/* + The application must update next_in and avail_in when avail_in has + dropped to zero. It must update next_out and avail_out when avail_out + has dropped to zero. The application must initialize zalloc, zfree and + opaque before calling the init function. All other fields are set by the + compression library and must not be updated by the application. + + The opaque value provided by the application will be passed as the first + parameter for calls of zalloc and zfree. This can be useful for custom + memory management. The compression library attaches no meaning to the + opaque value. + + zalloc must return Z_NULL if there is not enough memory for the object. + If zlib is used in a multi-threaded application, zalloc and zfree must be + thread safe. + + On 16-bit systems, the functions zalloc and zfree must be able to allocate + exactly 65536 bytes, but will not be required to allocate more than this + if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, + pointers returned by zalloc for objects of exactly 65536 bytes *must* + have their offset normalized to zero. The default allocation function + provided by this library ensures this (see zutil.c). To reduce memory + requirements and avoid any allocation of 64K objects, at the expense of + compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). + + The fields total_in and total_out can be used for statistics or + progress reports. After compression, total_in holds the total size of + the uncompressed data and may be saved for use in the decompressor + (particularly if the decompressor wants to decompress everything in + a single step). +*/ + + /* constants */ + +/** Allowed flush values; see deflate() and inflate() below for details */ +#define Z_NO_FLUSH 0 +/** Allowed flush values; see deflate() and inflate() below for details. This constant will be removed, use Z_SYNC_FLUSH instead*/ +#define Z_PARTIAL_FLUSH 1 +/** Allowed flush values; see deflate() and inflate() below for details */ +#define Z_SYNC_FLUSH 2 +/** Allowed flush values; see deflate() and inflate() below for details */ +#define Z_FULL_FLUSH 3 +/** Allowed flush values; see deflate() and inflate() below for details */ +#define Z_FINISH 4 +/** Allowed flush values; see deflate() and inflate() below for details */ +#define Z_BLOCK 5 + + +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_OK 0 +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_STREAM_END 1 +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_NEED_DICT 2 +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_ERRNO (-1) +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_STREAM_ERROR (-2) +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_DATA_ERROR (-3) +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_MEM_ERROR (-4) +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_BUF_ERROR (-5) +/** Return codes for the compression/decompression functions. Negative +values are errors, positive values are used for special but normal events. */ +#define Z_VERSION_ERROR (-6) + + +/** Compression level as no compression */ +#define Z_NO_COMPRESSION 0 +/** Compression level for best speed */ +#define Z_BEST_SPEED 1 +/** Compression level for best compression */ +#define Z_BEST_COMPRESSION 9 +/** Compression level for default compression */ +#define Z_DEFAULT_COMPRESSION (-1) + + +/** Compression strategy; see deflateInit2() below for details */ +#define Z_FILTERED 1 +/** Compression strategy; see deflateInit2() below for details */ +#define Z_HUFFMAN_ONLY 2 +/** Compression strategy; see deflateInit2() below for details */ +#define Z_RLE 3 +/** Compression strategy; see deflateInit2() below for details */ +#define Z_FIXED 4 +/** Compression strategy; see deflateInit2() below for details */ +#define Z_DEFAULT_STRATEGY 0 + + +/** Possible values of the data_type field (though see inflate()) */ +#define Z_BINARY 0 +/** Possible values of the data_type field (though see inflate()) */ +#define Z_TEXT 1 +/** Possible values of the data_type field (though see inflate()). It is used for compatibility with 1.2.2 and earlier */ +#define Z_ASCII Z_TEXT +/** Possible values of the data_type field (though see inflate()) */ +#define Z_UNKNOWN 2 + + +/** The deflate compression method (the only one supported in this version) */ +#define Z_DEFLATED 8 + +/** For initializing zalloc, zfree, opaque */ +#define Z_NULL 0 + +/** For compatibility with versions < 1.0.2 */ +#define zlib_version zlibVersion() + + + /* basic functions */ + +/** The application can compare zlibVersion and ZLIB_VERSION for consistency. + If the first character differs, the library code actually used is + not compatible with the zlib.h header file used by the application. + This check is automatically made by deflateInit and inflateInit. + @return returns zlib version + */ +ZEXTERN const char * ZEXPORT zlibVersion OF((void)); + +/* +ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); + + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. deflateInit does not + perform any compression: this will be done by deflate(). +*/ + +/** + deflate compresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce some + output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. deflate performs one or both of the + following actions: + + - Compress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in and avail_in are updated and + processing will resume at this point for the next call of deflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. This action is forced if the parameter flush is non zero. + Forcing flush frequently degrades the compression ratio, so this parameter + should be set only when necessary (in interactive applications). + Some output may be provided even if flush is not set. + + Before the call of deflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating avail_in or avail_out accordingly; avail_out + should never be zero before the call. The application can consume the + compressed output when it wants, for example when the output buffer is full + (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK + and with zero avail_out, it must be called again after making room in the + output buffer because there might be more output pending. + + Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumualte before producing output, in order to + maximize compression. + + If the parameter flush is set to Z_SYNC_FLUSH, all pending output is + flushed to the output buffer and the output is aligned on a byte boundary, so + that the decompressor can get all input data available so far. (In particular + avail_in is zero after the call if enough output space has been provided + before the call.) Flushing may degrade compression for some compression + algorithms and so it should be used only when necessary. + + If flush is set to Z_FULL_FLUSH, all output is flushed as with + Z_SYNC_FLUSH, and the compression state is reset so that decompression can + restart from this point if previous compressed data has been damaged or if + random access is desired. Using Z_FULL_FLUSH too often can seriously degrade + compression. + + If deflate returns with avail_out == 0, this function must be called again + with the same value of the flush parameter and more output space (updated + avail_out), until the flush is complete (deflate returns with non-zero + avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that + avail_out is greater than six to avoid repeated flush markers due to + avail_out == 0 on return. + + If the parameter flush is set to Z_FINISH, pending input is processed, + pending output is flushed and deflate returns with Z_STREAM_END if there + was enough output space; if deflate returns with Z_OK, this function must be + called again with Z_FINISH and more output space (updated avail_out) but no + more input data, until it returns with Z_STREAM_END or an error. After + deflate has returned Z_STREAM_END, the only possible operations on the + stream are deflateReset or deflateEnd. + + Z_FINISH can be used immediately after deflateInit if all the compression + is to be done in a single step. In this case, avail_out must be at least + the value returned by deflateBound (see below). If deflate does not return + Z_STREAM_END, then it must be called again as described above. + + deflate() sets strm->adler to the adler32 checksum of all input read + so far (that is, total_in bytes). + + deflate() may update strm->data_type if it can make a good guess about + the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered + binary. This field is only for information purposes and does not affect + the compression algorithm in any manner. + + deflate() returns Z_OK if some progress has been made (more input + processed or more output produced), Z_STREAM_END if all input has been + consumed and all output has been produced (only when flush is set to + Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example + if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible + (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not + fatal, and deflate() can be called again with more input and more output + space to continue compressing. + + @param strm Stream of data + @param flush Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to + decide how much data to accumualte before producing output, in order to + maximize compression. Refer to the description above for more details. + @return deflate returns Z_OK on success. Refer to the description above for more details. +*/ +ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); + +/** + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the + stream state was inconsistent, Z_DATA_ERROR if the stream was freed + prematurely (some input or output was discarded). In the error case, + msg may be set but then points to a static string (which must not be + deallocated). + + @param strm Stream of data + @return deflateEnd returns Z_OK on success. Refer to the description above for more details. +*/ +ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); + +/* +ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); + + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) +*/ + +/** + inflate decompresses as much data as possible, and stops when the input + buffer becomes empty or the output buffer becomes full. It may introduce + some output latency (reading input without producing any output) except when + forced to flush. + + The detailed semantics are as follows. inflate performs one or both of the + following actions: + + - Decompress more input starting at next_in and update next_in and avail_in + accordingly. If not all input can be processed (because there is not + enough room in the output buffer), next_in is updated and processing + will resume at this point for the next call of inflate(). + + - Provide more output starting at next_out and update next_out and avail_out + accordingly. inflate() provides as much output as possible, until there + is no more input data or no more space in the output buffer (see below + about the flush parameter). + + Before the call of inflate(), the application should ensure that at least + one of the actions is possible, by providing more input and/or consuming + more output, and updating the next_* and avail_* values accordingly. + The application can consume the uncompressed output when it wants, for + example when the output buffer is full (avail_out == 0), or after each + call of inflate(). If inflate returns Z_OK and with zero avail_out, it + must be called again after making room in the output buffer because there + might be more output pending. + + The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, + Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much + output as possible to the output buffer. Z_BLOCK requests that inflate() stop + if and when it gets to the next deflate block boundary. When decoding the + zlib or gzip format, this will cause inflate() to return immediately after + the header and before the first block. When doing a raw inflate, inflate() + will go ahead and process the first block, and will return when it gets to + the end of that block, or when it runs out of data. + + The Z_BLOCK option assists in appending to or combining deflate streams. + Also to assist in this, on return inflate() will set strm->data_type to the + number of unused bits in the last byte taken from strm->next_in, plus 64 + if inflate() is currently decoding the last block in the deflate stream, + plus 128 if inflate() returned immediately after decoding an end-of-block + code or decoding the complete header up to just before the first byte of the + deflate stream. The end-of-block will not be indicated until all of the + uncompressed data from that block has been written to strm->next_out. The + number of unused bits may in general be greater than seven, except when + bit 7 of data_type is set, in which case the number of unused bits will be + less than eight. + + inflate() should normally be called until it returns Z_STREAM_END or an + error. However if all decompression is to be performed in a single step + (a single call of inflate), the parameter flush should be set to + Z_FINISH. In this case all pending input is processed and all pending + output is flushed; avail_out must be large enough to hold all the + uncompressed data. (The size of the uncompressed data may have been saved + by the compressor for this purpose.) The next operation on this stream must + be inflateEnd to deallocate the decompression state. The use of Z_FINISH + is never required, but can be used to inform inflate that a faster approach + may be used for the single inflate() call. + + In this implementation, inflate() always flushes as much output as + possible to the output buffer, and always uses the faster approach on the + first call. So the only effect of the flush parameter in this implementation + is on the return value of inflate(), as noted below, or when it returns early + because Z_BLOCK is used. + + If a preset dictionary is needed after this call (see inflateSetDictionary + below), inflate sets strm->adler to the adler32 checksum of the dictionary + chosen by the compressor and returns Z_NEED_DICT; otherwise it sets + strm->adler to the adler32 checksum of all output produced so far (that is, + total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described + below. At the end of the stream, inflate() checks that its computed adler32 + checksum is equal to that saved by the compressor and returns Z_STREAM_END + only if the checksum is correct. + + inflate() will decompress and check either zlib-wrapped or gzip-wrapped + deflate data. The header type is detected automatically. Any information + contained in the gzip header is not retained, so applications that need that + information should instead use raw inflate, see inflateInit2() below, or + inflateBack() and perform their own processing of the gzip header and + trailer. + + inflate() returns Z_OK if some progress has been made (more input processed + or more output produced), Z_STREAM_END if the end of the compressed data has + been reached and all uncompressed output has been produced, Z_NEED_DICT if a + preset dictionary is needed at this point, Z_DATA_ERROR if the input data was + corrupted (input stream not conforming to the zlib format or incorrect check + value), Z_STREAM_ERROR if the stream structure was inconsistent (for example + if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, + Z_BUF_ERROR if no progress is possible or if there was not enough room in the + output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and + inflate() can be called again with more input and more output space to + continue decompressing. If Z_DATA_ERROR is returned, the application may then + call inflateSync() to look for a good compression block if a partial recovery + of the data is desired. + + @param strm Stream of data + @param flush This parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, + Z_FINISH, or Z_BLOCK. Refer to the description for more details. + @return inflate returns Z_OK on success. Refer to the description above for more details. +*/ +ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); + +/** + All dynamically allocated data structures for this stream are freed. + This function discards any unprocessed input and does not flush any + pending output. + + @param strm Stream of data + @return inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state + was inconsistent. In the error case, msg may be set but then points to a + static string (which must not be deallocated). +*/ +ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); + + /* Advanced functions */ + +/* + The following functions are needed only in some special applications. +*/ + +/* +ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, + int level, + int method, + int windowBits, + int memLevel, + int strategy)); + + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + Note: In this version of the library a windowBits value of 8 is unsupported + due to a problem with the window size being set to 256 bytes. Although a + value of 8 will be accepted by deflateInit2(), as it is being changed + internally from 8 to 9, it will not be possible to use the same value when it + comes to decompression. This is because inflateInit2() does not make the same + change internally and as a result a Z_DATA_ERROR is returned when calling + inflate(). It is therefore advised that for this version of the library + windowBits of 9 is used in place of 8. + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute an adler32 check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), + no header crc, and the operating system will be set to 3 (UNIX). If a + gzip stream is being written, strm->adler is a crc32 instead of an adler32. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as + Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy + parameter only affects the compression ratio but not the correctness of the + compressed output even if it is not set appropriately. Z_FIXED prevents the + use of dynamic Huffman codes, allowing for a simpler decoder for special + applications. + + deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. deflateInit2 does + not perform any compression: this will be done by deflate(). +*/ + +/** + Initializes the compression dictionary from the given byte sequence + without producing any compressed output. This function must be called + immediately after deflateInit, deflateInit2 or deflateReset, before any + call of deflate. The compressor and decompressor must use exactly the same + dictionary (see inflateSetDictionary). + + The dictionary should consist of strings (byte sequences) that are likely + to be encountered later in the data to be compressed, with the most commonly + used strings preferably put towards the end of the dictionary. Using a + dictionary is most useful when the data to be compressed is short and can be + predicted with good accuracy; the data can then be compressed better than + with the default empty dictionary. + + Depending on the size of the compression data structures selected by + deflateInit or deflateInit2, a part of the dictionary may in effect be + discarded, for example if the dictionary is larger than the window size in + deflate or deflate2. Thus the strings most likely to be useful should be + put at the end of the dictionary, not at the front. In addition, the + current implementation of deflate will use at most the window size minus + 262 bytes of the provided dictionary. + + Upon return of this function, strm->adler is set to the adler32 value + of the dictionary; the decompressor may later use this value to determine + which dictionary has been used by the compressor. (The adler32 value + applies to the whole dictionary even if only a subset of the dictionary is + actually used by the compressor.) If a raw deflate was requested, then the + adler32 value is not computed and strm->adler is not set. + + @param strm Stream of data + @param dictionary Pointer to the dictionary. Refer to the description above for more details. + @param dictLength Dictionay Length + @return deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent (for example if deflate has already been called for this stream + or if the compression method is bsort). deflateSetDictionary does not + perform any compression: this will be done by deflate(). +*/ +ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); + +/** + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when several compression strategies will be + tried, for example when there are several ways of pre-processing the input + data with a filter. The streams that will be discarded should then be freed + by calling deflateEnd. Note that deflateCopy duplicates the internal + compression state which can be quite large, so this strategy is slow and + can consume lots of memory. + + @param dest destination stream + @param souce source stream of data + @return deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ +ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, + z_streamp source)); + +/** + This function is equivalent to deflateEnd followed by deflateInit, + but does not free and reallocate all the internal compression state. + The stream will keep the same compression level and any other attributes + that may have been set by deflateInit2. + + @param strm stream of data + @return deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ +ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); + +/** + Dynamically update the compression level and compression strategy. The + interpretation of level and strategy is as in deflateInit2. This can be + used to switch between compression and straight copy of the input data, or + to switch to a different kind of input data requiring a different + strategy. If the compression level is changed, the input available so far + is compressed with the old level (and may be flushed); the new level will + take effect only at the next call of deflate(). + + Before the call of deflateParams, the stream state must be set as for + a call of deflate(), since the currently available input may have to + be compressed and flushed. In particular, strm->avail_out must be non-zero. + + @param strm stream of data + @param level compression level + @param strategy compression algorithm + @return deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source + stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR + if strm->avail_out was zero. +*/ +ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, + int level, + int strategy)); + +/** + Fine tune deflate's internal compression parameters. This should only be + used by someone who understands the algorithm used by zlib's deflate for + searching for the best matching string, and even then only by the most + fanatic optimizer trying to squeeze out the last compressed bit for their + specific input data. Read the deflate.c source code for the meaning of the + max_lazy, good_length, nice_length, and max_chain parameters. + + deflateTune() can be called after deflateInit() or deflateInit2() + + @param strm stream of data + @param good_length reduce lazy search above this match length + @param max_lazy do not perform lazy search above this match length + @param nice_length quit search above this match length + @param max_chain + @return deflateTune returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. + */ +ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, + int good_length, + int max_lazy, + int nice_length, + int max_chain)); + +/** + deflateBound() returns an upper bound on the compressed size after + deflation of sourceLen bytes. It must be called after deflateInit() + or deflateInit2(). This would be used to allocate an output buffer + for deflation in a single pass, and so would be called before deflate(). + + @param strm stream of data + @param sourceLen source length + @return deflateBound returns an upper bound on the compressed size after + deflation of sourceLen bytes. +*/ +ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, + uLong sourceLen)); + +/** + deflatePrime() inserts bits in the deflate output stream. The intent + is that this function is used to start off the deflate output with the + bits leftover from a previous deflate stream when appending to it. As such, + this function can only be used for raw deflate, and must be used before the + first deflate() call after a deflateInit2() or deflateReset(). bits must be + less than or equal to 16, and that many of the least significant bits of + value will be inserted in the output. + + @param strm stream of data + @param bits bits must be less than or equal to 16, and that many of the least + significant bits of value will be inserted in the output. + @param value represents value of the bits to be inserted + @return deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ +ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, + int bits, + int value)); + +/** + deflateSetHeader() provides gzip header information for when a gzip + stream is requested by deflateInit2(). deflateSetHeader() may be called + after deflateInit2() or deflateReset() and before the first call of + deflate(). The text, time, os, extra field, name, and comment information + in the provided gz_header structure are written to the gzip header (xflag is + ignored -- the extra flags are set according to the compression level). The + caller must assure that, if not Z_NULL, name and comment are terminated with + a zero byte, and that if extra is not Z_NULL, that extra_len bytes are + available there. If hcrc is true, a gzip header crc is included. Note that + the current versions of the command-line version of gzip (up through version + 1.3.x) do not support header crc's, and will report that it is a "multi-part + gzip file" and give up. + + If deflateSetHeader is not used, the default gzip header has text false, + the time set to zero, and os set to 3, with no extra, name, or comment + fields. The gzip header is returned to the default state by deflateReset(). + + @param strm stream of data + @param head gzip header + @return deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ +ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, + gz_headerp head)); + +/* +ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, + int windowBits)); + + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + Note: In this version of the library a windowBits value of 8 is unsupported + due to a problem with the window size being set to 256 bytes. Although a + value of 8 will be accepted by deflateInit2(), as it is being changed + internally from 8 to 9, it will not be possible to use the same value when it + comes to decompression. This is because inflateInit2() does not make the same + change internally and as a result a Z_DATA_ERROR is returned when calling + inflate(). It is therefore advised that for this version of the library + windowBits of 9 is used in place of 8. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an adler32 or a crc32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is + a crc32 instead of an adler32. + + inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg + is set to null if there is no error message. inflateInit2 does not perform + any decompression apart from reading the zlib header if present: this will + be done by inflate(). (So next_in and avail_in may be modified, but next_out + and avail_out are unchanged.) +*/ + +/** + Initializes the decompression dictionary from the given uncompressed byte + sequence. This function must be called immediately after a call of inflate, + if that call returned Z_NEED_DICT. The dictionary chosen by the compressor + can be determined from the adler32 value returned by that call of inflate. + The compressor and decompressor must use exactly the same dictionary (see + deflateSetDictionary). For raw inflate, this function can be called + immediately after inflateInit2() or inflateReset() and before any call of + inflate() to set the dictionary. The application must insure that the + dictionary that was used for compression is provided. + + inflateSetDictionary does not perform any decompression: this will be done + by subsequent calls of inflate(). + + @param strm stream of data + @param dictionary Pointer to dictionary + @param dictLength Dictionary Length + @return inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a + parameter is invalid (such as NULL dictionary) or the stream state is + inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the + expected one (incorrect adler32 value). +*/ +ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, + const Bytef *dictionary, + uInt dictLength)); + +/** + Skips invalid compressed data until a full flush point (see above the + description of deflate with Z_FULL_FLUSH) can be found, or until all + available input is skipped. No output is provided. + + @param strm Stream of data + @return inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR + if no more input was provided, Z_DATA_ERROR if no flush point has been found, + or Z_STREAM_ERROR if the stream structure was inconsistent. In the success + case, the application may save the current current value of total_in which + indicates where valid compressed data was found. In the error case, the + application may repeatedly call inflateSync, providing more input each time, + until success or end of the input data. +*/ +ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); + +/** + Sets the destination stream as a complete copy of the source stream. + + This function can be useful when randomly accessing a large stream. The + first pass through the stream can periodically record the inflate state, + allowing restarting inflate at those points when randomly accessing the + stream. + + @param dest destination stream + @param source source stream of data + @return inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if the source stream state was inconsistent + (such as zalloc being NULL). msg is left unchanged in both source and + destination. +*/ +ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, + z_streamp source)); + +/** + This function is equivalent to inflateEnd followed by inflateInit, + but does not free and reallocate all the internal decompression state. + The stream will keep attributes that may have been set by inflateInit2. + + @param strm Stream of data + @return inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent (such as zalloc or state being NULL). +*/ +ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); + +/** + This function inserts bits in the inflate input stream. The intent is + that this function is used to start inflating at a bit position in the + middle of a byte. The provided bits will be used before any bytes are used + from next_in. This function should only be used with raw inflate, and + should be used before the first inflate() call after inflateInit2() or + inflateReset(). bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + + @param strm stream of data + @param bits bits must be less than or equal to 16, and that many of the + least significant bits of value will be inserted in the input. + @param value @param value represents value of the bits to be inserted + @return inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ +ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, + int bits, + int value)); + +/** + inflateGetHeader() requests that gzip header information be stored in the + provided gz_header structure. inflateGetHeader() may be called after + inflateInit2() or inflateReset(), and before the first call of inflate(). + As inflate() processes the gzip stream, head->done is zero until the header + is completed, at which time head->done is set to one. If a zlib stream is + being decoded, then head->done is set to -1 to indicate that there will be + no gzip header information forthcoming. Note that Z_BLOCK can be used to + force inflate() to return immediately after header processing is complete + and before any actual data is decompressed. + + The text, time, xflags, and os fields are filled in with the gzip header + contents. hcrc is set to true if there is a header CRC. (The header CRC + was valid if done is set to one.) If extra is not Z_NULL, then extra_max + contains the maximum number of bytes to write to extra. Once done is true, + extra_len contains the actual extra field length, and extra contains the + extra field, or that field truncated if extra_max is less than extra_len. + If name is not Z_NULL, then up to name_max characters are written there, + terminated with a zero unless the length is greater than name_max. If + comment is not Z_NULL, then up to comm_max characters are written there, + terminated with a zero unless the length is greater than comm_max. When + any of extra, name, or comment are not Z_NULL and the respective field is + not present in the header, then that field is set to Z_NULL to signal its + absence. This allows the use of deflateSetHeader() with the returned + structure to duplicate the header. However if those fields are set to + allocated memory, then the application will need to save those pointers + elsewhere so that they can be eventually freed. + + If inflateGetHeader is not used, then the header information is simply + discarded. The header is always checked for validity, including the header + CRC if present. inflateReset() will reset the process to discard the header + information. The application would need to call inflateGetHeader() again to + retrieve the header from the next gzip stream. + + @param stream of data + @param head gzip header + @return inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source + stream state was inconsistent. +*/ +ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, + gz_headerp head)); + +/* +ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, + unsigned char FAR *window)); + + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + Note: In this version of the library a windowBits value of 8 is unsupported + due to a problem with the window size being set to 256 bytes. Although a + value of 8 will be accepted by deflateInit2(), as it is being changed + internally from 8 to 9, it will not be possible to use the same value when it + comes to decompression. This is because inflateInit2() does not make the same + change internally and as a result a Z_DATA_ERROR is returned when calling + inflate(). It is therefore advised that for this version of the library + windowBits of 9 is used in place of 8. + + See inflateBack() for the usage of these routines. + + inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of + the paramaters are invalid, Z_MEM_ERROR if the internal state could not + be allocated, or Z_VERSION_ERROR if the version of the library does not + match the version of the header file. +*/ + +/** Input function pointer defined to be used in inflateBack */ +typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); +/** Output function pointer defined to be used in inflateBack */ +typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); + + +/** + inflateBack() does a raw inflate with a single call using a call-back + interface for input and output. This is more efficient than inflate() for + file i/o applications in that it avoids copying between the output and the + sliding window by simply making the window itself the output buffer. This + function trusts the application to not change the output buffer passed by + the output function, at least until inflateBack() returns. + + inflateBackInit() must be called first to allocate the internal state + and to initialize the state with the user-provided window buffer. + inflateBack() may then be used multiple times to inflate a complete, raw + deflate stream with each call. inflateBackEnd() is then called to free + the allocated state. + + A raw deflate stream is one with no zlib or gzip header or trailer. + This routine would normally be used in a utility that reads zip or gzip + files and writes out uncompressed files. The utility would decode the + header and process the trailer on its own, hence this routine expects + only the raw deflate stream to decompress. This is different from the + normal behavior of inflate(), which expects either a zlib or gzip header and + trailer around the deflate stream. + + inflateBack() uses two subroutines supplied by the caller that are then + called by inflateBack() for input and output. inflateBack() calls those + routines until it reads a complete deflate stream and writes out all of the + uncompressed data, or until it encounters an error. The function's + parameters and return types are defined above in the in_func and out_func + typedefs. inflateBack() will call in(in_desc, &buf) which should return the + number of bytes of provided input, and a pointer to that input in buf. If + there is no input available, in() must return zero--buf is ignored in that + case--and inflateBack() will return a buffer error. inflateBack() will call + out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() + should return zero on success, or non-zero on failure. If out() returns + non-zero, inflateBack() will return with an error. Neither in() nor out() + are permitted to change the contents of the window provided to + inflateBackInit(), which is also the buffer that out() uses to write from. + The length written by out() will be at most the window size. Any non-zero + amount of input may be provided by in(). + + For convenience, inflateBack() can be provided input on the first call by + setting strm->next_in and strm->avail_in. If that input is exhausted, then + in() will be called. Therefore strm->next_in must be initialized before + calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called + immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in + must also be initialized, and then if strm->avail_in is not zero, input will + initially be taken from strm->next_in[0 .. strm->avail_in - 1]. + + The in_desc and out_desc parameters of inflateBack() is passed as the + first parameter of in() and out() respectively when they are called. These + descriptors can be optionally used to pass any information that the caller- + supplied in() and out() functions need to do their job. + + On return, inflateBack() will set strm->next_in and strm->avail_in to + pass back any unused input that was provided by the last in() call. The + return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR + if in() or out() returned an error, Z_DATA_ERROR if there was a format + error in the deflate stream (in which case strm->msg is set to indicate the + nature of the error), or Z_STREAM_ERROR if the stream was not properly + initialized. In the case of Z_BUF_ERROR, an input or output error can be + distinguished using strm->next_in which will be Z_NULL only if in() returned + an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to + out() returning non-zero. (in() will always be called before out(), so + strm->next_in is assured to be defined if out() returns non-zero.) Note + that inflateBack() cannot return Z_OK. + + @param strm stream of data + @param in input function pointer + @param in_desc input parameters for in_func + @param out output function pointer + @param out_desc output parameters for out_func + @return Refer to the above description for detailed explanation +*/ +ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, + in_func in, void FAR *in_desc, + out_func out, void FAR *out_desc)); + +/** + All memory allocated by inflateBackInit() is freed. + + @param strm stream of data + @return inflateBackEnd returns Z_OK on success, or Z_STREAM_ERROR if the stream + state was inconsistent. +*/ +ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); + +/** + Return flags indicating compile-time options. + + Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: + 1.0: size of uInt + 3.2: size of uLong + 5.4: size of voidpf (pointer) + 7.6: size of z_off_t + + Compiler, assembler, and debug options: + 8: DEBUG + 9: ASMV or ASMINF -- use ASM code + 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention + 11: 0 (reserved) + + One-time table building (smaller code, but not thread-safe if true): + 12: BUILDFIXED -- build static block decoding tables when needed + 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed + 14,15: 0 (reserved) + + Library content (indicates missing functionality): + 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking + deflate code when not needed) + 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect + and decode gzip streams (to avoid linking crc code) + 18-19: 0 (reserved) + + Operation variations (changes in library functionality): + 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate + 21: FASTEST -- deflate algorithm with only one, lowest compression level + 22,23: 0 (reserved) + + The sprintf variant used by gzprintf (zero is best): + 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format + 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! + 26: 0 = returns value, 1 = void -- 1 means inferred string length returned + + Remainder: + 27-31: 0 (reserved) + + @return Refer to the above description for detailed explanation + */ +ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); + + /* utility functions */ + +/* + The following utility functions are implemented on top of the + basic stream-oriented functions. To simplify the interface, some + default options are assumed (compression level and memory usage, + standard memory allocation functions). The source code of these + utility functions can easily be modified if you need special options. +*/ + +/** + Compresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be at least the value returned + by compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed buffer. + This function can be used to compress a whole file at once if the + input file is mmap'ed. + + @param dest destination buffer + @param destLen byte length of destination buffer + @param source source buffer + @param sourceLen byte length of source buffer + @return compress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer. +*/ +ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); + +/** + Compresses the source buffer into the destination buffer. The level + parameter has the same meaning as in deflateInit. sourceLen is the byte + length of the source buffer. Upon entry, destLen is the total size of the + destination buffer, which must be at least the value returned by + compressBound(sourceLen). Upon exit, destLen is the actual size of the + compressed buffer. + + @param dest destination buffer + @param destLen byte length of destination buffer + @param source source buffer + @param sourceLen byte length of source buffer + @param level Compression level + @return compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_BUF_ERROR if there was not enough room in the output buffer, + Z_STREAM_ERROR if the level parameter is invalid. +*/ +ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen, + int level)); + +/** + compressBound() returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. It would be used before + a compress() or compress2() call to allocate the destination buffer. + + @param source buffer length + @return compressBound returns an upper bound on the compressed size after + compress() or compress2() on sourceLen bytes. +*/ +ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); + +/** + Decompresses the source buffer into the destination buffer. sourceLen is + the byte length of the source buffer. Upon entry, destLen is the total + size of the destination buffer, which must be large enough to hold the + entire uncompressed data. (The size of the uncompressed data must have + been saved previously by the compressor and transmitted to the decompressor + by some mechanism outside the scope of this compression library.) + Upon exit, destLen is the actual size of the compressed buffer. + This function can be used to decompress a whole file at once if the + input file is mmap'ed. + + @param dest destination buffer + @param destLen byte length of destination buffer + @param source source buffer + @param sourceLen byte length of source buffer + @return uncompress returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_BUF_ERROR if there was not enough room in the output + buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. +*/ +ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, + const Bytef *source, uLong sourceLen)); + +#ifndef SYMBIAN_EZLIB_EXCLUDE_GZ_FUNCTIONS +/** gzfile is typedef to voidp i.e. void pointer(void*) */ +typedef voidp gzFile; + +/** + Opens a gzip (.gz) file for reading or writing. The mode parameter + is as in fopen ("rb" or "wb") but can also include a compression level + ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for + Huffman only compression as in "wb1h", or 'R' for run-length encoding + as in "wb1R". (See the description of deflateInit2 for more information + about the strategy parameter.) + + gzopen can be used to read a file which is not in gzip format; in this + case gzread will directly read from the file without decompression. + + @param path location of the file + @param mode refer to above description + @return gzopen returns NULL if the file could not be opened or if there was + insufficient memory to allocate the (de)compression state; errno + can be checked to distinguish the two cases (if errno is zero, the + zlib error is Z_MEM_ERROR). +*/ +ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); + +/** + gzdopen() associates a gzFile with the file descriptor fd. File + descriptors are obtained from calls like open, dup, creat, pipe or + fileno (in the file has been previously opened with fopen). + The mode parameter is as in gzopen. + The next call of gzclose on the returned gzFile will also close the + file descriptor fd, just like fclose(fdopen(fd), mode) closes the file + descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). + + @param fd file descriptor + @param mode The mode parameter is as in gzopen + @return gzdopen returns NULL if there was insufficient memory to allocate + the (de)compression state. +*/ +ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); + +/** + Dynamically update the compression level or strategy. See the description + of deflateInit2 for the meaning of these parameters. + + @param file gzip file + @param level compression level + @param strategy compression algorithm + @return gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not + opened for writing. +*/ +ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); + +/** + Reads the given number of uncompressed bytes from the compressed file. + If the input file was not in gzip format, gzread copies the given number + of bytes into the buffer. + + @param file gzip file + @param buf buffer to store the copied data from the gzip file + @param len length of the data to be copied + @return gzread returns the number of uncompressed bytes actually read (0 for + end of file, -1 for error). +*/ +ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); + +/** + Writes the given number of uncompressed bytes into the compressed file. + gzwrite returns the number of uncompressed bytes actually written + (0 in case of error). + + @param file gzip file + @param buf buffer containing data to be written to the gzip file + @param len length of the data + @return gzwrite returns the number of uncompressed bytes actually written + (0 in case of error) +*/ +ZEXTERN int ZEXPORT gzwrite OF((gzFile file, + voidpc buf, unsigned len)); + +/** + Converts, formats, and writes the args to the compressed file under + control of the format string, as in fprintf. gzprintf returns the number of + uncompressed bytes actually written (0 in case of error). The number of + uncompressed bytes written is limited to 4095. The caller should assure that + this limit is not exceeded. If it is exceeded, then gzprintf() will return + return an error (0) with nothing written. In this case, there may also be a + buffer overflow with unpredictable consequences, which is possible only if + zlib was compiled with the insecure functions sprintf() or vsprintf() + because the secure snprintf() or vsnprintf() functions were not available. + + @param file gzip file + @param format format string + @return refer to the description above +*/ +ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); + +/** + Writes the given null-terminated string to the compressed file, excluding + the terminating null character. + + @param file gzip file + @param s null-terminated string + @return gzputs returns the number of characters written, or -1 in case of error. +*/ +ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); + +/** + Reads bytes from the compressed file until len-1 characters are read, or + a newline character is read and transferred to buf, or an end-of-file + condition is encountered. The string is then terminated with a null + character. + + @param file gzip file + @param buf buffer to store the copied data from the gzip file + @param len number of characters to be read (len-1) + @return gzgets returns buf, or Z_NULL in case of error. +*/ +ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); + +/** + Writes c, converted to an unsigned char, into the compressed file. + gzputc returns the value that was written, or -1 in case of error. + + @param file gzip file + @param c character + @return gzputc returns the value that was written, or -1 in case of error. +*/ +ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); + +/** + Reads one byte from the compressed file. gzgetc returns this byte + or -1 in case of end of file or error. + + @param file gzip file + @return gzgetc returns this byte or -1 in case of end of file or error. +*/ +ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); + +/** + Push one character back onto the stream to be read again later. + Only one character of push-back is allowed. gzungetc() returns the + character pushed, or -1 on failure. gzungetc() will fail if a + character has been pushed but not read yet, or if c is -1. The pushed + character will be discarded if the stream is repositioned with gzseek() + or gzrewind(). + + @param c character + @param file gzip file + @return gzungetc returns the character pushed, or -1 on failure. +*/ +ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); + +/** + Flushes all pending output into the compressed file. The parameter + flush is as in the deflate() function. The return value is the zlib + error number (see function gzerror below). gzflush returns Z_OK if + the flush parameter is Z_FINISH and all output could be flushed. + gzflush should be called only when strictly necessary because it can + degrade compression. + + @param file gzip file + @param flush parameter flush is as in the deflate() function + @return gzflush returns Z_OK if the flush parameter is Z_FINISH and all output could be flushed. +*/ +ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); + +/** + Sets the starting position for the next gzread or gzwrite on the + given compressed file. The offset represents a number of bytes in the + uncompressed data stream. The whence parameter is defined as in lseek(2); + the value SEEK_END is not supported. + If the file is opened for reading, this function is emulated but can be + extremely slow. If the file is opened for writing, only forward seeks are + supported; gzseek then compresses a sequence of zeroes up to the new + starting position. + + @param file gzip file + @param offset represents a number of bytes in the uncompressed data stream + @param whence defined as in lseek(2); the value SEEK_END is not supported. + @return gzseek returns the resulting offset location as measured in bytes from + the beginning of the uncompressed stream, or -1 in case of error, in + particular if the file is opened for writing and the new starting position + would be before the current position. +*/ +ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, + z_off_t offset, int whence)); + +/** + Rewinds the given file. This function is supported only for reading. + + gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) + + @param file gzip file + @return refer to gzseek() return value & description +*/ +ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); + +/** + Returns the starting position for the next gzread or gzwrite on the + given compressed file. This position represents a number of bytes in the + uncompressed data stream. + + gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) + + @param file gzip file + @return gztell returns the starting position for the next gzread or gzwrite on the + given compressed file +*/ +ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); + +/** + Returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. + + @param file gzip file + @return gzeof returns 1 when EOF has previously been detected reading the given + input stream, otherwise zero. +*/ +ZEXTERN int ZEXPORT gzeof OF((gzFile file)); + +/** + Returns 1 if file is being read directly without decompression, otherwise + zero. + + @param file gzip file + @return gzdirect returns 1 if file is being read directly without decompression, otherwise zero. +*/ +ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); + +/** + Flushes all pending output if necessary, closes the compressed file + and deallocates all the (de)compression state. The return value is the zlib + error number (see function gzerror below). + + @param file gzip file + @return gzclose returns the zlib error number (see function gzerror below). +*/ +ZEXTERN int ZEXPORT gzclose OF((gzFile file)); + +/** + Returns the error message for the last error which occurred on the + given compressed file. errnum is set to zlib error number. If an + error occurred in the file system and not in the compression library, + errnum is set to Z_ERRNO and the application may consult errno + to get the exact error code. + + @param file gzip file + @param errnum error number + @return gzerror returns the error message for the last error which occurred on the + given compressed file. +*/ +ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); + +/** + Clears the error and end-of-file flags for file. This is analogous to the + clearerr() function in stdio. This is useful for continuing to read a gzip + file that is being written concurrently. + + @param file gzip file +*/ +ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); + +#endif //SYMBIAN_EZLIB_EXCLUDE_GZ_FUNCTIONS + + /* checksum functions */ + +/* + These functions are not related to compression but are exported + anyway because they might be useful in applications using the + compression library. +*/ + +/** + Update a running Adler-32 checksum with the bytes buf[0..len-1] and + return the updated checksum. If buf is NULL, this function returns + the required initial value for the checksum. + An Adler-32 checksum is almost as reliable as a CRC32 but can be computed + much faster. Usage example: + + uLong adler = adler32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + adler = adler32(adler, buffer, length); + } + if (adler != original_adler) error(); + + @param adler Adler-32 checksum + @param buf pointer to buffer + @param len length of buffer + @return If buf is NULL, this function returns + the required initial value for the checksum. +*/ +ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); + +/** + Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 + and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for + each, adler1 and adler2. + + @param adler1 Adler-32 checksum + @param adler2 Adler-32 checksum + @param len2 length + @return adler32_combine returns the Adler-32 checksum of + seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. +*/ +ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, + z_off_t len2)); + +/** + Update a running CRC-32 with the bytes buf[0..len-1] and return the + updated CRC-32. If buf is NULL, this function returns the required initial + value for the for the crc. Pre- and post-conditioning (one's complement) is + performed within this function so it shouldn't be done by the application. + Usage example: + + uLong crc = crc32(0L, Z_NULL, 0); + + while (read_buffer(buffer, length) != EOF) { + crc = crc32(crc, buffer, length); + } + if (crc != original_crc) error(); + + @param crc CRC-32 check value + @param buf pointer to buffer + @param len length of buffer + @return If buf is NULL, this function returns the required initial + value for the for the crc. +*/ +ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); + +/** + Combine two CRC-32 check values into one. For two sequences of bytes, + seq1 and seq2 with lengths len1 and len2, CRC-32 check values were + calculated for each, crc1 and crc2. + + @param crc1 CRC-32 check value + @param crc2 CRC-32 check value + @param len2 length + @return crc32_combine returns the CRC-32 check value of seq1 and seq2 + concatenated, requiring only crc1, crc2, and len2. +*/ +ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); + + + + /* various hacks, don't look :) */ + +/* deflateInit and inflateInit are macros to allow checking the zlib version + * and the compiler's view of z_stream: + */ +/** + Initializes the internal stream state for compression. The fields + zalloc, zfree and opaque must be initialized before by the caller. + If zalloc and zfree are set to Z_NULL, deflateInit updates them to + use default allocation functions. + + The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: + 1 gives best speed, 9 gives best compression, 0 gives no compression at + all (the input data is simply copied a block at a time). + Z_DEFAULT_COMPRESSION requests a default compromise between speed and + compression (currently equivalent to level 6). + + deflateInit does not perform any compression: this will be done by deflate(). + + @param strm stream of data + @param level compression level + @param version version of library + @param stream_size stream size + @return deflateInit_ returns Z_OK if success, Z_MEM_ERROR if there was not + enough memory, Z_STREAM_ERROR if level is not a valid compression level, + Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible + with the version assumed by the caller (ZLIB_VERSION). + msg is set to null if there is no error message. +*/ +ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, + const char *version, int stream_size)); + +/** + Initializes the internal stream state for decompression. The fields + next_in, avail_in, zalloc, zfree and opaque must be initialized before by + the caller. If next_in is not Z_NULL and avail_in is large enough (the exact + value depends on the compression method), inflateInit determines the + compression method from the zlib header and allocates all data structures + accordingly; otherwise the allocation will be deferred to the first call of + inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to + use default allocation functions. + + inflateInit does not perform any decompression apart from reading + the zlib header if present: this will be done by inflate(). (So next_in and + avail_in may be modified, but next_out and avail_out are unchanged.) + + @param strm stream of data + @param version version of library + @param stream_size stream size + @return inflateInit_ returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_VERSION_ERROR if the zlib library version is incompatible with the + version assumed by the caller. msg is set to null if there is no error + message. +*/ +ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, + const char *version, int stream_size)); + +/** + This is another version of deflateInit with more compression options. The + fields next_in, zalloc, zfree and opaque must be initialized before by + the caller. + + The method parameter is the compression method. It must be Z_DEFLATED in + this version of the library. + + The windowBits parameter is the base two logarithm of the window size + (the size of the history buffer). It should be in the range 8..15 for this + version of the library. Larger values of this parameter result in better + compression at the expense of memory usage. The default value is 15 if + deflateInit is used instead. + + Note: In this version of the library a windowBits value of 8 is unsupported + due to a problem with the window size being set to 256 bytes. Although a + value of 8 will be accepted by deflateInit2(), as it is being changed + internally from 8 to 9, it will not be possible to use the same value when it + comes to decompression. This is because inflateInit2() does not make the same + change internally and as a result a Z_DATA_ERROR is returned when calling + inflate(). It is therefore advised that for this version of the library + windowBits of 9 is used in place of 8. + + windowBits can also be -8..-15 for raw deflate. In this case, -windowBits + determines the window size. deflate() will then generate raw deflate data + with no zlib header or trailer, and will not compute an adler32 check value. + + windowBits can also be greater than 15 for optional gzip encoding. Add + 16 to windowBits to write a simple gzip header and trailer around the + compressed data instead of a zlib wrapper. The gzip header will have no + file name, no extra data, no comment, no modification time (set to zero), + no header crc, and the operating system will be set to 3 (UNIX). If a + gzip stream is being written, strm->adler is a crc32 instead of an adler32. + + The memLevel parameter specifies how much memory should be allocated + for the internal compression state. memLevel=1 uses minimum memory but + is slow and reduces compression ratio; memLevel=9 uses maximum memory + for optimal speed. The default value is 8. See zconf.h for total memory + usage as a function of windowBits and memLevel. + + The strategy parameter is used to tune the compression algorithm. Use the + value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a + filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no + string match), or Z_RLE to limit match distances to one (run-length + encoding). Filtered data consists mostly of small values with a somewhat + random distribution. In this case, the compression algorithm is tuned to + compress them better. The effect of Z_FILTERED is to force more Huffman + coding and less string matching; it is somewhat intermediate between + Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as + Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy + parameter only affects the compression ratio but not the correctness of the + compressed output even if it is not set appropriately. Z_FIXED prevents the + use of dynamic Huffman codes, allowing for a simpler decoder for special + applications. + deflateInit2 does not perform any compression: this will be done by deflate(). + + @param strm stream of data + @param level compression level + @param method compression method + @param windowBits refer to above note & description for window bits value + @param memLevel memory level (i.e. how much memory should be allocated). refer to above description for more detail + @param strategy compression algorithm + @param version version of library + @param stream_size size of stream + @return deflateInit2_ returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid + method). msg is set to null if there is no error message. +*/ +ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, + int windowBits, int memLevel, + int strategy, const char *version, + int stream_size)); + +/** + This is another version of inflateInit with an extra parameter. The + fields next_in, avail_in, zalloc, zfree and opaque must be initialized + before by the caller. + + The windowBits parameter is the base two logarithm of the maximum window + size (the size of the history buffer). It should be in the range 8..15 for + this version of the library. The default value is 15 if inflateInit is used + instead. windowBits must be greater than or equal to the windowBits value + provided to deflateInit2() while compressing, or it must be equal to 15 if + deflateInit2() was not used. If a compressed stream with a larger window + size is given as input, inflate() will return with the error code + Z_DATA_ERROR instead of trying to allocate a larger window. + + Note: In this version of the library a windowBits value of 8 is unsupported + due to a problem with the window size being set to 256 bytes. Although a + value of 8 will be accepted by deflateInit2(), as it is being changed + internally from 8 to 9, it will not be possible to use the same value when it + comes to decompression. This is because inflateInit2() does not make the same + change internally and as a result a Z_DATA_ERROR is returned when calling + inflate(). It is therefore advised that for this version of the library + windowBits of 9 is used in place of 8. + + windowBits can also be -8..-15 for raw inflate. In this case, -windowBits + determines the window size. inflate() will then process raw deflate data, + not looking for a zlib or gzip header, not generating a check value, and not + looking for any check values for comparison at the end of the stream. This + is for use with other formats that use the deflate compressed data format + such as zip. Those formats provide their own check values. If a custom + format is developed using the raw deflate format for compressed data, it is + recommended that a check value such as an adler32 or a crc32 be applied to + the uncompressed data as is done in the zlib, gzip, and zip formats. For + most applications, the zlib format should be used as is. Note that comments + above on the use in deflateInit2() applies to the magnitude of windowBits. + + windowBits can also be greater than 15 for optional gzip decoding. Add + 32 to windowBits to enable zlib and gzip decoding with automatic header + detection, or add 16 to decode only the gzip format (the zlib format will + return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is + a crc32 instead of an adler32. + + @param strm stream of data + @param windowBits refer to above note & description for window bits value + @param version version of library + @param stream_size size of stream + @return inflateInit2_ returns Z_OK if success, Z_MEM_ERROR if there was not enough + memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg + is set to null if there is no error message. inflateInit2 does not perform + any decompression apart from reading the zlib header if present: this will + be done by inflate(). (So next_in and avail_in may be modified, but next_out + and avail_out are unchanged.) +*/ +ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, + const char *version, int stream_size)); + +/** + Initialize the internal stream state for decompression using inflateBack() + calls. The fields zalloc, zfree and opaque in strm must be initialized + before the call. If zalloc and zfree are Z_NULL, then the default library- + derived memory allocation routines are used. windowBits is the base two + logarithm of the window size, in the range 8..15. window is a caller + supplied buffer of that size. Except for special applications where it is + assured that deflate was used with small window sizes, windowBits must be 15 + and a 32K byte window must be supplied to be able to decompress general + deflate streams. + + Note: In this version of the library a windowBits value of 8 is unsupported + due to a problem with the window size being set to 256 bytes. Although a + value of 8 will be accepted by deflateInit2(), as it is being changed + internally from 8 to 9, it will not be possible to use the same value when it + comes to decompression. This is because inflateInit2() does not make the same + change internally and as a result a Z_DATA_ERROR is returned when calling + inflate(). It is therefore advised that for this version of the library + windowBits of 9 is used in place of 8. + + See inflateBack() for the usage of these routines. + + @param strm stream of data + @param windowBits refer to above note for window bits value + @param window window is a caller supplied buffer of that size + @param version version of library + @param stream_size size of stream + @return inflateBackInit_ returns Z_OK on success, Z_STREAM_ERROR if any of + the paramaters are invalid, Z_MEM_ERROR if the internal state could not + be allocated, or Z_VERSION_ERROR if the version of the library does not + match the version of the header file. +*/ +ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, + unsigned char FAR *window, + const char *version, + int stream_size)); + +/** + Macro deflateInit defined for deflateInit_() + @param strm stream of data + @param level compression level +*/ +#define deflateInit(strm, level) \ + deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) +/** + Macro inflateInit defined for inflateInit_() + @param strm stream of data +*/ +#define inflateInit(strm) \ + inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) +/** + Macro deflateInit2 defined for deflateInit2_() + @param strm stream of data + @param level compression level + @param method compression method + @param windowBits refer to the note for window bits value in deflateInit2_() + @param memLevel memory level (i.e. how much memory should be allocated). refer to above description for more detail + @param strategy compression algorithm +*/ +#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ + deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ + (strategy), ZLIB_VERSION, sizeof(z_stream)) +/** + Macro inflateInit2 defined for inflateInit2_() + @param strm stream of data + @param windowBits refer to the note for window bits value in inflateInit2_() +*/ +#define inflateInit2(strm, windowBits) \ + inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) +/** + Macro inflateBackInit defined for inflateBackInit_() + @param strm stream of data + @param windowBits refer to the note for window bits value in inflateBackInit_() + @param window window is a caller supplied buffer of that size +*/ +#define inflateBackInit(strm, windowBits, window) \ + inflateBackInit_((strm), (windowBits), (window), \ + ZLIB_VERSION, sizeof(z_stream)) + + +#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) + /** Hack for buggy compilers */ + struct internal_state {int dummy;}; +#endif + +/** + Returns the string representing the error code + + @param int error code + @return zError returns string representing the error code +*/ +ZEXTERN const char * ZEXPORT zError OF((int)); +/** + Checks whether inflate is currently at the end of a block generated by Z_SYNC_FLUSH or Z_FULL_FLUSH + + @param z stream of data + @return inflateSyncPoint returns true(1) if inflate is currently at the end of a block. Otherwise false(0) +*/ +ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); +/** + Initialize the tables before allowing more than one thread to use crc32() + + @return get_crc_table returns pointer to the crc table after initialisation +*/ +ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); + +#ifdef __cplusplus +} +#endif + +#endif /* _ZLIB_H */